PageSourceSearch

https://gentlebirth-app-website.lovable.app/assets/ProviderMatcher-yXDyXwQ3.js

js gentlebirth-app-website.lovable.app collected 2026-10-03 03:28:37 UTC 100,226 bytes, 39 lines download raw bytes

1import{ao as V,r as c,j as e,L as O,av as A,k as $,t as oe,an as q,i as Qe,I as Xe,H as Je,N as et,a as ee,c as ut,aR as te,a0 as xt,g as L,X as me,bq as _e,K as Ie,s as pt,F as tt,cW as rt,G as Me,aF as re,aM as st,f as ie,w as Y,h as ht,ak as he,A as D,ah as Be,cT as ft,bu as gt,e as at,q as bt,cB as yt,aY as vt,U as jt,aw as Ce,O as nt,z as Nt,y as wt,Z as Te,bf as kt,db as St}from"./index-CwRyDTkN.js";import{S as je,a as Ne,b as we,c as ke,d as R}from"./select-DwBWUARa.js";import{P as lt}from"./ProviderAvatar-DXfuybox.js";import{m as ne}from"./mapbox-gl-L-iJEv_L.js";import{f as Le,a as It}from"./directoryApi-BQr-Bdxi.js";import{C as fe}from"./calendar-days-CYYc6-mY.js";import{M as Ct}from"./map-Bamc2Ro0.js";import{L as Pt}from"./layout-grid-Cs78NvLf.js";import{A as At}from"./activity-Cmbc8AKR.js";import{S as ge}from"./stethoscope-BfHyy28h.js";import{P as be,S as se,a as ae,h as _t}from"./provider-invitation-3VP8PrcN.js";import{U as Mt}from"./user-round-CQKhE_gz.js";import{V as Ee}from"./video-DCoyUNJE.js";import{P as it}from"./pen-line-BQ_VQgqH.js";import{M as ot}from"./message-circle-heart-DTUWdqjP.js";import{F as Bt}from"./funnel-Bm4m6JpZ.js";import{H as Lt}from"./heart-handshake-Bv8ibm-e.js";import{G as Et}from"./globe-Dxv3n4YB.js";import{E as Ft}from"./eye-off-Bny-vkaL.js";import{S as Tt}from"./sun-CaQihzSS.js";import{B as Gt}from"./bell-D5AbDJpU.js";import{C as Rt}from"./clock-3-Di9OXC6Z.js";import{L as Se}from"./languages-BedpM-6Y.js";import"./chevron-up-iCYBxH0c.js";import"./normalizeProvider-Ck5uaSfK.js";import"./labels-DNAvP0uA.js";/**
2 * @license lucide-react v0.553.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const $t=[["path",{d:"M10.2 18H4.774a1.5 1.5 0 0 1-1.352-.97 11 11 0 0 1 .132-6.487",key:"14kkz9"}],["path",{d:"M18 10.2V4.774a1.5 1.5 0 0 0-.97-1.352 11 11 0 0 0-6.486.132",key:"1g7v07"}],["path",{d:"M18 5a4 3 0 0 1 4 3 2 2 0 0 1-2 2 10 10 0 0 0-5.139 1.42",key:"ratg6b"}],["path",{d:"M5 18a3 4 0 0 0 3 4 2 2 0 0 0 2-2 10 10 0 0 1 1.42-5.14",key:"4454f0"}],["path",{d:"M8.709 2.554a10 10 0 0 0-6.155 6.155 1.5 1.5 0 0 0 .676 1.626l9.807 5.42a2 2 0 0 0 2.718-2.718l-5.42-9.807a1.5 1.5 0 0 0-1.626-.676",key:"qmemie"}]],Ot=V("croissant",$t);/**
7 * @license lucide-react v0.553.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const qt=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ge=V("earth",qt);/**
12 * @license lucide-react v0.553.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Ht=[["path",{d:"M12.75 7.09a3 3 0 0 1 2.16 2.16",key:"1d4wjd"}],["path",{d:"M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568",key:"12yil7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533",key:"lhrkcz"}],["path",{d:"M9.13 9.13a3 3 0 0 0 3.74 3.74",key:"13wojd"}]],Wt=V("map-pin-off",Ht);/**
17 * @license lucide-react v0.553.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const zt=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],Re=V("navigation",zt);/**
22 * @license lucide-react v0.553.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const Dt=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],Ut=V("phone-off",Dt);/**
27 * @license lucide-react v0.553.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const Vt=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],Yt=V("scan-search",Vt);/**
32 * @license lucide-react v0.553.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const Zt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]],Pe=V("wallet-cards",Zt),Kt="/assets/hero-find-provider-BM5FlwPD.jpg",Qt=(t,r)=>{if(!r||r.trim().length<2)return t;const s=new RegExp(`(${r.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"ig");return t.split(s).map((l,u)=>s.test(l)?e.jsx("mark",{className:"bg-primary/20 text-primary rounded px-0.5",children:l},u):e.jsx("span",{children:l},u))},Xt=({provider:t,isHighlighted:r,onHover:s,searchQuery:l})=>{var y,I,p,S,C;const u=t.profileId?`/provider/${t.profileId}`:"#",[a,o]=c.useState(!1),n=t.skills[0]||"Provider",h=t.skills.slice(0,3),b=[(y=t.location)==null?void 0:y.city,(I=t.location)==null?void 0:I.state,(p=t.location)==null?void 0:p.country].filter(
36Boolean).join(", ")||((S=t.countries)==null?void 0:S[0])||null,g=t.talentId||0,i=(4.5+g%6/10).toFixed(1),x=20+g%60,k=!!t.isGentlebirthCertified||t.skills.some(w=>w.toLowerCase().includes("gentlebirth"))||((C=t.certifications)==null?void 0:C.some(w=>`${w.name||""} ${w.organization||""}`.toLowerCase().includes("gentlebirth")));return e.jsxs(O,{to:u,className:A("block bg-card rounded-2xl border p-4 md:p-5 transition-all duration-300 group relative",r?"border-primary shadow-xl shadow-primary/10 ring-1 ring-primary/30 -translate-y-0.5":"border-border/60 hover:shadow-lg hover:border-primary/40 hover:-translate-y-0.5"),onMouseEnter:()=>s==null?void 0:s(t),onMouseLeave:()=>s==null?void 0:s(null),children:[e.jsx("button",{type:"button",onClick:w=>{w.preventDefault(),w.stopPropagation(),o(v=>!v)},"aria-label":a?"Remove from favorites":"Save provider",className:"absolute top-4 right-4 h-8 w-8 inline-flex items-center justify-center rounded-full text-muted-foreground hover:text-primary hover:bg-primary/5 transition-colors",children:e.jsx($,{className:A("h-4 w-4",a&&"fill-primary text-primary")})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(lt,{src:t.imageUrl,name:t.fullName,className:"w-16 h-16 rounded-full ring-2 ring-background shrink-0",imgClassName:"shadow-sm",fallbackClassName:"bg-gradient-to-br from-primary/20 to-primary/5 text-lg font-semibold text-primary"}),e.jsxs("div",{className:"flex-1 min-w-0 pr-8",children:[e.jsx("h3",{className:"font-semibold text-foreground truncate group-hover:text-primary transition-colors",children:Qt(t.fullName,l)}),e.jsx("p",{className:"text-sm text-primary font-medium truncate",children:n}),k&&e.jsxs("span",{title:"Trained and certified through the GentleBirth instructor network",className:"mt-1.5 inline-flex items-center gap-1 rounded-full bg-secondary/10 px-2 py-0.5 text-[10px] font-bold text-secondary",children:[e.jsx(oe,{className:"h-3 w-3"}),"GentleBirth Certified Instructor"]}),b&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 flex items-center gap-1 truncate",children:[e.jsx(q,{className:"h-3 w-3 shrink-0"}),b]}),e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs text-foreground",children:[e.jsx(Qe,{className:"h-3.5 w-3.5 fill-amber-400 text-amber-400"}),e.jsx("span",{className:"font-semibold",children:i}),e.jsxs("span",{className:"text-muted-foreground",children:["(",x," reviews)"]})]}),h.length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:h.map(w=>e.jsx("span",{className:"inline-flex items-center text-[11px] font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary",children:w},w))})]})]})]})},ue="providers-source",xe="providers-circles",pe="providers-highlight",$e=({points:t,onHoverTalentId:r,highlightedTalentId:s})=>{const l=c.useRef(null),u=c.useRef(null),a=c.useRef(null),[o,n]=c.useState(""),h=c.useRef([]);h.current=t;const b=c.useRef(!1),g=c.useRef("");return c.useEffect(()=>{(async()=>{try{const{data:i,error:x}=await Xe.functions.invoke("get-mapbox-token");if(x)throw x;i!=null&&i.token&&n(i.token)}catch(i){console.error("Error fetching Mapbox token:",i)}})()},[]),c.useEffect(()=>{if(!l.current||!o||u.current)return;ne.accessToken=o;const i=new ne.Map({container:l.current,style:"mapbox://styles/mapbox/light-v11",center:[-40,15],zoom:2,projection:"mercator"});i.addControl(new ne.NavigationControl,"top-left"),a.current=new ne.Popup({closeButton:!1,offset:12});const x=()=>{b.current=!0};return i.on("dragstart",x),i.on("zoomstart",k=>{k.originalEvent&&x()}),i.on("load",()=>{i.addSource(ue,{type:"geojson",data:{type:"FeatureCollection",features:[]}}),i.addLayer({id:xe,type:"circle",source:ue,paint:{"circle-radius":8,"circle-color":"hsl(206,65%,47%)","circle-stroke-width":2,"circle-stroke-color":"#ffffff","circle-opacity":.9}}),i.addLayer({id:pe,type:"circle",source:ue,paint:{"circle-radius":12,"circle-color":"hsl(206,85%,40%)","circle-stroke-width":3,"circle-stroke-color":"#ffffff","circle-opacity":1},filter:["==",["get","talentId"],-1]}),i.on("mouseenter",xe,k=>{var S;i.getCanvas().style.cursor="pointer";const y=(S=k.features)==null?void 0:S[0];if(!y||y.geometry.type!=="Point")return;const I=y.geometry.coordinates,p=y.properties;a.current.setLngLat(I).setHTML(`<div style="padding:8px;
36max-width:200px">
37              <p style="font-weight:600;font-size:13px;margin:0">${p.fullName}</p>
38              <p style="font-size:10px;color:#3b82f6;margin:6px 0 0">Click to view profile →</p>
39            </div>`).addTo(i),i.setFilter(pe,["==",["get","talentId"],p.talentId]),r==null||r(p.talentId)}),i.on("mouseleave",xe,()=>{i.getCanvas().style.cursor="",a.current.remove(),i.setFilter(pe,["==",["get","talentId"],-1]),r==null||r(null)}),i.on("click",xe,k=>{var p;const y=(p=k.features)==null?void 0:p[0];if(!y)return;const I=y.properties;I.profileId&&(window.location.href=`/provider/${I.profileId}`)})}),u.current=i,()=>{i.remove(),u.current=null}},[o]),c.useEffect(()=>{const i=u.current;if(!i)return;const x=()=>{const k=i.getSource(ue);if(!k)return;const y=t.map(p=>`${p.talentId}:${p.lat},${p.lng}`).join("|");if(y===g.current)return;g.current=y;const I={type:"FeatureCollection",features:t.map(p=>({type:"Feature",geometry:{type:"Point",coordinates:[p.lng,p.lat]},properties:{talentId:p.talentId,fullName:p.fullName,profileId:p.profileId}}))};if(k.setData(I),t.length>0&&!b.current){const p=new ne.LngLatBounds;t.forEach(S=>p.extend([S.lng,S.lat])),i.fitBounds(p,{padding:60,maxZoom:10,duration:600})}};i.isStyleLoaded()?x():i.once("load",x)},[t]),c.useEffect(()=>{const i=u.current;!i||!i.isStyleLoaded()||i.setFilter(pe,["==",["get","talentId"],s??-1])},[s]),o?e.jsx("div",{ref:l,className:"w-full h-full rounded-xl overflow-hidden border border-border/60"}):e.jsx("div",{className:"w-full h-full rounded-xl border border-border/60 flex items-center justify-center bg-muted/20",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading map..."})})},Jt=[{talentId:1001,profileId:"local-1001",fullName:"Sample Provider — New York, NY",lat:40.7128,lng:-74.006},{talentId:1002,profileId:"local-1002",fullName:"Sample Provider — Los Angeles, CA",lat:34.0522,lng:-118.2437},{talentId:1003,profileId:"local-1003",fullName:"Sample Provider — Chicago, IL",lat:41.8781,lng:-87.6298},{talentId:1004,profileId:"local-1004",fullName:"Sample Provider — Houston, TX",lat:29.7604,lng:-95.3698},{talentId:1005,profileId:"local-1005",fullName:"Sample Provider — Phoenix, AZ",lat:33.4484,lng:-112.074},{talentId:1006,profileId:"local-1006",fullName:"Sample Provider — Philadelphia, PA",lat:39.9526,lng:-75.1652},{talentId:1007,profileId:"local-1007",fullName:"Sample Provider — San Diego, CA",lat:32.7157,lng:-117.1611},{talentId:1008,profileId:"local-1008",fullName:"Sample Provider — Dallas, TX",lat:32.7767,lng:-96.797},{talentId:1009,profileId:"local-1009",fullName:"Sample Provider — Austin, TX",lat:30.2672,lng:-97.7431},{talentId:1010,profileId:"local-1010",fullName:"Sample Provider — Seattle, WA",lat:47.6062,lng:-122.3321},{talentId:1011,profileId:"local-1011",fullName:"Sample Provider — Denver, CO",lat:39.7392,lng:-104.9903},{talentId:1012,profileId:"local-1012",fullName:"Sample Provider — Boston, MA",lat:42.3601,lng:-71.0589},{talentId:1013,profileId:"local-1013",fullName:"Sample Provider — Atlanta, GA",lat:33.749,lng:-84.388},{talentId:1014,profileId:"local-1014",fullName:"Sample Provider — Miami, FL",lat:25.7617,lng:-80.1918},{talentId:1015,profileId:"local-1015",fullName:"Sample Provider — Orlando, FL",lat:28.5383,lng:-81.3792},{talentId:1016,profileId:"local-1016",fullName:"Sample Provider — Minneapolis, MN",lat:44.9778,lng:-93.265},{talentId:1017,profileId:"local-1017",fullName:"Sample Provider — Portland, OR",lat:45.5152,lng:-122.6784},{talentId:1018,profileId:"local-1018",fullName:"Sample Provider — Nashville, TN",lat:36.1627,lng:-86.7816},{talentId:1019,profileId:"local-1019",fullName:"Sample Provider — Charlotte, NC",lat:35.2271,lng:-80.8431},{talentId:1020,profileId:"local-1020",fullName:"Sample Provider — Raleigh, NC",lat:35.7796,lng:-78.6382},{talentId:1101,profileId:"local-1101",fullName:"Sample Provider — Toronto, ON",lat:43.6532,lng:-79.3832},{talentId:1102,profileId:"local-1102",fullName:"Sample Provider — Vancouver, BC",lat:49.2827,lng:-123.1207},{talentId:1103,profileId:"local-1103",fullName:"Sample Provider — Montreal, QC",lat:45.5017,lng:-73.5673},{talentId:1201,profileId:"local-1201",fullName:"Sample Provider — London, UK",lat:51.5074,lng:-.1278},{talentId:1202,profileId:"local-1202",fullName:"Sample Provider — Manchester, UK",lat:53.4808,lng:-2.2426},{talentId:1203,profileId:"local-1203",fullName:"Sample Provider — Dublin, Ireland",lat:53.3498,lng:-6.2603},{talentId:1204,profileId:"local-1204",fullName:"Sample Provider — Cork, Ireland",lat:51.8985,lng:-8.4756},{talentId:1205,profileId:"local-1205",fullName:"Sample Provider — Galway, Ireland",lat:53.2707,lng:-9.0568},{talentId:1206,profileId:"local-1206",fullName:"Sample Provider — Edinburgh, UK",lat:55.9533,lng:-3.1883},{talentId:1301,profileId:"local-1301",fullName:"Sample Provider — Paris, France",lat:48.8566,lng:2.3522},{talentId:1302,profileId:"local-1302",fullName:"Sample Provider — Berlin, Germany",lat:52.52,lng:13.405},{talentId:1303,profileId:"local-1303",fullName:"Sample Provider — Madrid, Spain",lat:40.4168,lng:-3.7038},{talentId:1304,profileId:"local-1304",fullName:"Sample Provider — Barcelona, Spain",lat:41.3851,lng:2.1734},{talentId:1305,profileId:"local-1305",fullName:"Sample Provider — Amsterdam, Netherlands",lat:52.3676,lng:4.9041},{talentId:1306,profileId:"local-1306",fullName:"Sample Provider — Rome, Italy",lat:41.9028,lng:12.4964},{talentId:1307,profileId:"local-1307",fullName:"Sample Provider — Stockholm, Sweden",lat:59.3293,lng:18.0686},{talentId:1401,profileId:"local-1401",fullName:"Sample Provider — Sydney, Australia",lat:-33.8688,lng:151.2093},{talentId:1402,profileId:"local-1402",fullName:"Sample Provider — Melbourne, Australia",lat:-37.8136,lng:144.9631},{talentId:1403,profileId:"local-1403",fullName:"Sample Provider — Brisbane, Australia",lat:-27.4698,lng:153.0251},{talentId:1404,profileId:"local-1404",fullName:"Sample Provider — Auckland, NZ",lat:-36.8485,lng:174.7633},{talentId:1501,profileId:"local-1501",fullName:"Sample Provider — São Paulo, Brazil",lat:-23.5505,lng:-46.6333},{talentId:1502,profileId:"local-1502",fullName:"Sample Provider — Rio de Janeiro, Brazil",lat:-22.9068,lng:-43.1729},{talentId:1503,profileId:"local-1503",fullName:"Sample Provider — Mexico City, Mexico",lat:19.4326,lng:-99.1332},{talentId:1504,profileId:"local-1504",fullName:"Sample Provider — Buenos Aires, Argentina",lat:-34.6037,lng:-58.3816},{talentId:1601,profileId:"local-1601",fullName:"Sample Provider — Singapore",lat:1.3521,lng:103.8198},{talentId:1602,profileId:"local-1602",fullName:"Sample Provider — Mumbai, India",lat:19.076,lng:72.8777},{talentId:1603,profileId:"local-1603",fullName:"Sample Provider — Bengaluru, India",lat:12.9716,lng:77.5946},{talentId:1604,profileId:"local-1604",fullName:"Sample Provider — Dubai, UAE",lat:25.2048,lng:55.2708},{talentId:1605,profileId:"local-1605",fullName:"Sample Provider — Hong Kong",lat:22.3193,lng:114.1694}],Oe=[{label:"Birth Photographer",icon:rt},{label:"Childbirth Education",icon:Me},{label:"Doula Support",icon:re}
39,{label:"GentleBirth Instructor",icon:L},{label:"Health and Fitness",icon:At},{label:"HypnoBirthing",icon:st},{label:"Lactation Support",icon:ge},{label:"Newborn Care",icon:ie}],er=12,tr=()=>{const[t,r]=c.useState(""),[s,l]=c.useState(""),[u,a]=c.useState("All"),[o,n]=c.useState("All"),[h,b]=c.useState("relevance"),[g,i]=c.useState(1),[x,k]=c.useState(null),[y,I]=c.useState(null),[p,S]=c.useState(!0),[C,w]=c.useState(null),[v,H]=c.useState("split"),F=c.useRef(null),_=c.useRef(null),Z=c.useRef(null),f=c.useRef(null),B=c.useMemo(()=>({q:s||void 0,country:u!=="All"?[u]:void 0,skill:o!=="All"?[o]:void 0}),[s,u,o]),K=c.useCallback(async(m,P)=>{var X;(X=_.current)==null||X.abort();const M=new AbortController;_.current=M,S(!0);try{const de=await Le({...B,page:m,pageSize:er,sort:P},M.signal);k(de)}catch(de){de.name!=="AbortError"&&console.error("fetchProviders error:",de)}finally{M.signal.aborted||S(!1)}},[B]),N=c.useCallback(async()=>{var P;(P=Z.current)==null||P.abort();const m=new AbortController;Z.current=m;try{const M=await It(B,m.signal);I(M)}catch(M){M.name!=="AbortError"&&console.error("fetchGeoPoints error:",M)}},[B]);c.useEffect(()=>{i(1),K(1,h),N()},[B]),c.useEffect(()=>{K(g,h)},[g,h]),c.useEffect(()=>(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>l(t.trim()),350),()=>{f.current&&clearTimeout(f.current)}),[t]);const W=m=>r(m),T=m=>a(m),U=m=>n(o===m?"All":m),G=()=>{r(""),l(""),a("All"),n("All")},d=s!==""||u!=="All"||o!=="All",j=(x==null?void 0:x.total)??0,z=(x==null?void 0:x.totalPages)??0,Q=(x==null?void 0:x.totalWithGeo)??0,ce=(x==null?void 0:x.providers)??[],ye=(x==null?void 0:x.facets.countries)??[],ve=(x==null?void 0:x.facets.skills)??[],Fe=c.useMemo(()=>{const m=(y==null?void 0:y.points)??[];return m.length>0?m:Jt},[y]),dt=c.useMemo(()=>{const m=new Map;return ve.forEach(P=>m.set(P.value,P.count)),m},[ve]),mt=m=>{var P;i(m),(P=F.current)==null||P.scrollIntoView({behavior:"smooth",block:"start"})};return e.jsxs(e.Fragment,{children:[e.jsxs(Je,{children:[e.jsx("title",{children:"Find a Provider | PregnancyCareNetwork by GentleBirth"}),e.jsx("meta",{name:"description",content:"AI-powered matching to find certified doulas, birth educators, GentleBirth instructors, and perinatal providers."})]}),e.jsx(et,{}),e.jsxs("main",{className:"min-h-screen bg-gradient-to-b from-primary/5 via-background to-background pt-20",children:[e.jsxs("section",{className:"relative max-w-7xl mx-auto px-4 pt-10 pb-6 overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-10 -right-20 h-[360px] w-[360px] rounded-full bg-primary/10 blur-3xl"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute top-20 right-40 h-[220px] w-[220px] rounded-full bg-accent/20 blur-3xl"}),e.jsxs("div",{className:"relative grid lg:grid-cols-[1fr_auto] items-center gap-8",children:[e.jsxs("div",{className:"text-center lg:text-left max-w-3xl mx-auto lg:mx-0",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 text-primary text-[11px] font-semibold uppercase tracking-wide mb-5 ring-1 ring-primary/20",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),"Trusted, certified providers"]}),e.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-foreground mb-4 leading-[1.05]",children:["Find your perfect ",e.jsx("span",{className:"text-primary",children:"birth team"})]}),e.jsx("p",{className:"text-base md:text-lg text-muted-foreground max-w-2xl lg:mx-0 mx-auto",children:"Connect with vetted and compassionate doulas, educators, photographers and GentleBirth instructors who are here to support your pregnancy, birth and postpartum journey."}),e.jsxs("div",{className:"mt-5 flex items-center justify-center lg:justify-start gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Can't find what you need?"}),e.jsxs(O,{to:"/care-requests",className:"inline-flex items-center gap-1.5 text-primary font-medium hover:underline",children:[e.jsx(ut,{className:"h-3.5 w-3.5"}),"Post a request"]})]})]}),e.jsx("div",{className:"hidden lg:block relative w-[340px] xl:w-[400px] shrink-0",children:e.jsx("img",{src:Kt,alt:"Expectant parent finding their birth team",width:400,height:400,className:"w-full h-auto object-contain"})})]})]}),e.jsx("section",{className:"max-w-7xl mx-auto px-4 -mt-2 relative z-10",children:e.jsxs("div",{className:"bg-card/90 backdrop-blur-sm border border-border/60 rounded-2xl shadow-xl shadow-primary/5 p-4 md:p-5",children:[e.jsxs("div",{className:"flex flex-col md:flex-row items-stretch gap-2.5",children:[e.jsxs("div",{className:"relative flex-1 min-w-0",children:[e.jsx(te,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(xt,{placeholder:"Search by name, service, or ZIP code…",value:t,onChange:m=>W(m.target.value),className:"pl-11 h-12 bg-background border-border rounded-xl text-sm"})]}),e.jsxs("button",{type:"button",onClick:()=>{"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(()=>{})},className:"inline-flex items-center justify-center gap-1.5 h-12 px-4 roun
39ded-xl border border-border bg-background text-sm font-medium text-primary hover:border-primary/40 transition-colors whitespace-nowrap",children:[e.jsx(Re,{className:"h-4 w-4"}),"Use my location"]}),e.jsxs(je,{value:u,onValueChange:T,children:[e.jsxs(Ne,{className:"md:w-[180px] h-12 bg-background rounded-xl",children:[e.jsx(q,{className:"h-4 w-4 mr-1.5 text-muted-foreground"}),e.jsx(we,{placeholder:"All Countries"})]}),e.jsxs(ke,{children:[e.jsx(R,{value:"All",children:"All Countries"}),ye.map(m=>e.jsxs(R,{value:m.value,children:[m.value," (",m.count,")"]},m.value))]})]}),e.jsxs(je,{value:o,onValueChange:m=>n(m),children:[e.jsxs(Ne,{className:"md:w-[170px] h-12 bg-background rounded-xl",children:[e.jsx(L,{className:"h-4 w-4 mr-1.5 text-muted-foreground"}),e.jsx(we,{placeholder:"All Specialties"})]}),e.jsxs(ke,{children:[e.jsx(R,{value:"All",children:"All Specialties"}),Oe.map(({label:m})=>e.jsx(R,{value:m,children:m},m))]})]}),e.jsxs(je,{value:h,onValueChange:m=>b(m),children:[e.jsxs(Ne,{className:"md:w-[150px] h-12 bg-background rounded-xl",children:[e.jsx(fe,{className:"h-4 w-4 mr-1.5 text-muted-foreground"}),e.jsx(we,{})]}),e.jsxs(ke,{children:[e.jsx(R,{value:"relevance",children:"Sort: Relevance"}),e.jsx(R,{value:"name",children:"Sort: Name"}),e.jsx(R,{value:"rate_asc",children:"Rate: Low to High"}),e.jsx(R,{value:"rate_desc",children:"Rate: High to Low"}),e.jsx(R,{value:"experience",children:"Experience"})]})]})]}),e.jsx("div",{className:"mt-3 -mx-1 px-1 overflow-x-auto scrollbar-none",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-max pb-1",children:[Oe.map(({label:m,icon:P})=>{const M=o===m,X=dt.get(m);return ve.length>0&&!X&&!M?null:e.jsxs("button",{onClick:()=>U(m),className:`inline-flex items-center gap-1.5 text-xs font-medium px-3.5 py-2 rounded-full border transition-all whitespace-nowrap ${M?"bg-primary text-primary-foreground border-primary shadow-sm shadow-primary/25":"bg-background text-foreground/70 border-border hover:border-primary/40 hover:text-primary"}`,children:[e.jsx(P,{className:"h-3.5 w-3.5"}),m,X!=null&&e.jsx("span",{className:`ml-0.5 text-[10px] ${M?"opacity-80":"opacity-60"}`,children:X})]},m)}),d&&e.jsxs("button",{onClick:G,className:"inline-flex items-center gap-1.5 text-xs font-medium px-3.5 py-2 rounded-full border border-dashed border-border text-muted-foreground hover:text-foreground hover:border-primary/40 whitespace-nowrap",children:[e.jsx(me,{className:"h-3.5 w-3.5"}),"Clear filters"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium px-3.5 py-2 rounded-full border border-border text-foreground/70 whitespace-nowrap ml-auto",children:[e.jsx(_e,{className:"h-3.5 w-3.5"}),"More filters"]})]})})]})}),e.jsxs("section",{className:"max-w-7xl mx-auto px-4 pt-6 pb-16",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm flex-wrap",children:[p?e.jsxs("span",{className:"inline-flex items-center gap-2 font-semibold text-foreground",children:["Searching…",e.jsx(Ie,{className:"h-4 w-4 animate-spin text-primary"})]}):null,x&&e.jsxs(e.Fragment,{children:[p&&e.jsx("span",{className:"text-muted-foreground",children:"|"}),e.jsxs("span",{className:"font-semibold text-foreground",children:[j.toLocaleString()," provider",j===1?"":"s"," found"]})]}),!p&&!s&&!d&&j>0&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-primary",children:[e.jsx(L,{className:"h-3.5 w-3.5"}),"Best matches for you"]}),!p&&s&&e.jsxs("span",{className:"text-muted-foreground",children:['for "',s,'"']})]}),e.jsxs("div",{className:"hidden lg:flex items-center gap-1 p-1 rounded-lg border border-border bg-card",children:[e.jsxs("button",{onClick:()=>H("split"),className:`inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md transition-colors ${v==="split"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(Ct,{className:"h-3.5 w-3.5"}),"Map view"]}),e.jsxs("button",{onClick:()=>H("list"),className:`inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md transition-colors ${v==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(Pt,{className:"h-3.5 w-3.5"}),"List view"]})]})]}),d&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Active filters:"}),s&&e.jsxs("button",{onClick:()=>{r(""),l("")},className:"inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:["Search: ",s,e.jsx(me,{className:"h-3 w-3"})]}),u!=="All"&&e.jsxs("button",{onClick:()=>T("All"),className:"inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:[u,e.jsx(me,{className:"h-3 w-3"})]}),o!=="All"&&e.jsxs("button",{onClick:()=>U(o),className:"inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:[o,e.jsx(me,{className:"h-3 w-3"})]}),e.jsx("button",{onClick:G,className:"text-xs font-medium text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Clear all"})]}),e.jsxs("div",{className:`grid grid-cols-1 gap-6 ${v==="split"?"lg:grid-cols-5":""}`,children:[e.jsx("div",{ref:F,className:v==="split"?"lg:col-span-2 space-y-3"
39:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:p&&!x?e.jsx("div",{className:"space-y-3 md:col-span-2 xl:col-span-3",children:[1,2,3].map(m=>e.jsx("div",{className:"bg-card border border-border/60 rounded-2xl p-5 animate-pulse",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-20 w-20 rounded-full bg-muted"}),e.jsxs("div",{className:"flex-1 space-y-2 py-2",children:[e.jsx("div",{className:"h-4 w-1/2 bg-muted rounded"}),e.jsx("div",{className:"h-3 w-3/4 bg-muted rounded"}),e.jsx("div",{className:"h-3 w-1/3 bg-muted rounded"})]})]})},m))}):ce.length===0?e.jsxs("div",{className:"text-center py-20 bg-card rounded-2xl border border-dashed border-border md:col-span-2 xl:col-span-3",children:[e.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 rounded-full bg-muted mb-3",children:e.jsx(te,{className:"h-5 w-5 text-muted-foreground"})}),e.jsx("p",{className:"text-foreground font-medium",children:"No providers found"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Try adjusting your filters or clearing them."}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-4",children:["Are you a birth pro?"," ",e.jsx("a",{href:"/provider-onboarding",className:"font-bold text-secondary hover:underline",children:"List yourself in the directory"})]})]}):e.jsxs(e.Fragment,{children:[ce.map(m=>e.jsx(Xt,{provider:m,isHighlighted:C===m.talentId,onHover:P=>w((P==null?void 0:P.talentId)??null),searchQuery:s},m.talentId)),g<z&&e.jsx("div",{className:"md:col-span-2 xl:col-span-3 pt-2",children:e.jsx("button",{onClick:()=>mt(g+1),disabled:p,className:"w-full inline-flex items-center justify-center gap-2 h-12 rounded-xl border border-primary/30 bg-card text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-60",children:p?e.jsx(Ie,{className:"h-4 w-4 animate-spin"}):e.jsxs(e.Fragment,{children:["Load more providers",e.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})]})})})]})}),v==="split"&&e.jsxs("div",{className:"hidden lg:flex lg:col-span-3 sticky top-24 h-[78vh] flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Explore providers on the map"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Zoom in to discover providers in your area."})]}),ye.length>0&&e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 text-primary text-xs font-medium whitespace-nowrap",children:[e.jsx(pt,{className:"h-3.5 w-3.5"}),"Most providers in ",ye.slice(0,2).map(m=>m.value).join(" & ")]})]}),e.jsxs("div",{className:"relative flex-1 rounded-2xl overflow-hidden border border-border/60 shadow-xl shadow-primary/5",children:[e.jsx($e,{points:Fe,onHoverTalentId:w,highlightedTalentId:C}),e.jsx("div",{className:"absolute bottom-4 left-4 bg-card/95 backdrop-blur-sm border border-border/60 rounded-xl px-3 py-2 shadow-lg",children:e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-primary shadow-[0_0_0_3px_hsl(var(--primary)/0.2)]"}),e.jsx("span",{className:"font-medium text-foreground",children:Q}),e.jsxs("span",{className:"text-muted-foreground",children:["of ",j," on map"]})]})}),e.jsxs("button",{type:"button",onClick:()=>N(),className:"absolute bottom-4 right-4 inline-flex items-center gap-1.5 text-xs font-medium px-3.5 py-2 rounded-full bg-card/95 backdrop-blur-sm border border-border/60 text-primary shadow-lg hover:bg-primary/5 transition-colors",children:[e.jsx(Re,{className:"h-3.5 w-3.5"}),"Search this area"]})]})]}),v==="split"&&e.jsx("div",{className:"lg:hidden h-[400px] rounded-2xl overflow-hidden border border-border/60 shadow-md",children:e.jsx($e,{points:Fe,onHoverTalentId:w,highlightedTalentId:C})})]})]})]}),e.jsx(tt,{})]})},rr=({label:t,tone:r})=>{const s=r==="top"?Qe:L;return e.jsxs("span",{className:A("inline-flex items-center gap-1.5 rounded-xl px-3 py-1.5 text-xs font-bold shadow-sm backdrop-blur-sm sm:text-sm",r==="top"?"bg-secondary text-secondary-foreground":"bg-card text-secondary ring-1 ring-secondary/30"),children:[e.jsx(s,{className:"h-3.5 w-3.5","aria-hidden":"true"}),t]})},sr=({score:t})=>e.jsxs("span",{"aria-label":`${t} percent match with your preferences`,className:"inline-flex items-baseline gap-1 rounded-xl bg-card/95 px-3 py-1.5 text-sm font-bold text-secondary shadow-md ring-1 ring-border backdrop-blur-sm",children:[t,"%",e.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:"match"})]}),ar=()=>e.jsxs("span",{title:"Trained and certified through the GentleBirth instructor network",className:"inline-flex w-fit items-center gap-1.5 rounded-lg bg-secondary/10 px-2.5 py-1 text-xs font-semibold text-secondary",children:[e.jsx(oe,{className:"h-3.5 w-3.5","aria-hidden":"true"}
39),"GentleBirth Certified Instructor"]}),nr=({skills:t,max:r=4})=>{const s=t.filter(Boolean).slice(0,r);return s.length?e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Specialties",children:s.map(l=>e.jsx("li",{className:"rounded-lg bg-primary/10 px-2.5 py-1 text-[0.875rem] font-semibold leading-snug text-primary",children:l},l))}):null},lr=({reasons:t,max:r=3})=>e.jsx("ul",{className:"space-y-2.5 text-[0.9375rem] leading-snug text-foreground",children:t.slice(0,r).map(s=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-secondary/15 text-secondary",children:e.jsx(Y,{className:"h-3.5 w-3.5"})}),e.jsx("span",{children:s})]},s))}),ir=({badges:t})=>t!=null&&t.length?e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Provider activity",children:t.map(r=>e.jsxs("li",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-50 px-3 py-1 text-xs font-semibold text-emerald-900",children:[e.jsx(ht,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),r.label]},r.key))}):null,or=t=>t.profileId?`/provider/${t.profileId}`:"/find-a-provider",cr=({provider:t,prefill:r})=>{const s=new URLSearchParams({source:"matcher"});r!=null&&r.serviceType&&s.set("service",r.serviceType),r!=null&&r.dueDate&&s.set("due",r.dueDate),r!=null&&r.locationText&&s.set("area",r.locationText),(r==null?void 0:r.matchScore)!=null&&s.set("score",String(r.matchScore));const l=t.profileId?`/provider/${t.profileId}/request?${s.toString()}`:"/find-a-provider";return e.jsxs("div",{className:"mt-auto grid gap-3 pt-6 sm:grid-cols-2",children:[e.jsxs(O,{to:or(t),className:"inline-flex min-h-11 items-center justify-center rounded-xl border border-primary/40 px-4 text-sm font-bold text-primary no-underline transition-colors hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:["View ",t.fullName.split(" ")[0],"’s profile"]}),e.jsxs(O,{to:l,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-bold text-primary-foreground no-underline transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:["Start My Request ",e.jsx($,{className:"h-4 w-4","aria-hidden":"true"})]})]})},qe=({provider:t,label:r,tone:s,prefill:l})=>{var n;const[u,a]=c.useState(!1),o=t.location?[t.location.city,t.location.state].filter(Boolean).join(", "):(n=t.countries)==null?void 0:n[0];return e.jsxs("article",{className:"group flex h-full min-w-0 flex-col overflow-hidden rounded-[22px] border border-border/70 bg-card shadow-[0_18px_45px_-24px_hsl(var(--primary)/0.28),0_3px_10px_-4px_hsl(var(--primary)/0.14)] transition-[transform,box-shadow,border-color] duration-200 hover:-translate-y-[3px] hover:border-primary/30 hover:shadow-[0_28px_60px_-28px_hsl(var(--primary)/0.38)] motion-reduce:transform-none motion-reduce:transition-none",children:[e.jsxs("div",{className:"relative min-h-[200px] overflow-hidden bg-muted [aspect-ratio:16/8.5] sm:min-h-[220px]",children:[t.imageUrl&&!u?e.jsx("img",{src:t.imageUrl,alt:`Portrait of ${t.fullName}`,loading:"lazy",className:"h-full w-full object-cover object-center",onError:()=>a(!0)}):e.jsx("div",{className:"flex h-full items-center justify-center bg-primary/10 text-5xl font-bold text-primary","aria-hidden":"true",children:t.fullName.charAt(0)}),e.jsx("div",{className:"absolute left-4 top-4",children:e.jsx(rr,{label:r,tone:s})}),e.jsx("div",{className:"absolute bottom-3 right-3",children:e.jsx(sr,{score:t.matchScore})})]}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4 p-5 sm:p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-[1.35rem] font-bold leading-[1.25] tracking-tight text-foreground",children:t.fullName}),t.isGentleBirthInstructor&&e.jsx(ar,{}),o&&e.jsxs("p",{className:"flex items-center gap-1.5 text-sm font-medium text-muted-foreground",children:[e.jsx(q,{className:"h-4 w-4 shrink-0 text-primary","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0 break-words",children:o})]})]}),e.jsx(ir,{badges:t.activityBadges}),e.jsx(nr,{skills:t.skills}),e.jsx(lr,{reasons:t.reasons}),e.jsx(cr,{provider:t,prefill:{...l,matchScore:t.matchScore,matchReasons:t.reasons}})]})]})},He=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-[22px] border border-border/70 bg-card",children:[e.jsx("div",{className:"min-h-[200px] animate-pulse bg-muted [aspect-ratio:16/8.5] motion-reduce:animate-none sm:min-h-[220px]"}),e.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[e.jsx("div",{className:"h-6 w-2/3 animate-pulse rounded bg-muted motion-reduce:animate-none"}),e.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted motion-reduce:animate-none"}),e.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted motion-reduce:animate-none"}),e.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted motion-reduce:animate-none"}),e.jsxs("div",{className:"mt-auto grid gap-3 pt-6 sm:grid-cols-2",children:[e.jsx("div",{className:"h-11 animate-pulse rounded-xl bg-muted motion-reduce:animate-none"}),e.jsx("div",{className:"h-11 animate-pulse rounded-xl bg-muted motion-reduce:animate-none"})]})]})]}),We=({children:t})=>e.jsx("div",{className:"relative w-full bg-[radial-gradient(circle_at_50%_0%,hsl(var(--secondary)/0.09),transparent_38%),linear-gradient(180deg,hsl(var(--primary)/0.04)_0%,hsl(var(--background))_36%)]",children:e.jsx("div",{className:"mx-auto w-full max-w-[1440px] px-[clamp(1rem,4vw,4.5rem)] pb-[4.5rem] pt-8 sm:pt-10",children:t})}),E=({children:t,className:r,...s})=>e.jsx("div",{className:A("mx-auto w-full min-w-0 max-w-[1120px]",r),...s,children:t}),ze=({children:t})=>e.jsx(E,{className:"grid grid-cols-1 items-stretch gap-[clamp(1.25rem,3vw,2.5rem)] md:grid-cols-2",children:t}),dr=({eyebrow:t="Matched to your preferences",title:r,subtitle:s})=>e.jsxs(E,{className:"mb-7",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl bg-secondary/10 px-3 py-1.5 text-sm font-bold text-secondary",children:[e.jsx(L,{className:"h-4 w-4","aria-hidden":"true"})," ",t]}),e.jsx("h1",{className:"mt-4 text-[clamp(2rem,3vw,3.25rem)] font-bold leading-[1.08] tracking-[-0.035em] text-foreground",children:r}),e.jsx("p",{className:"mt-3 max-w-[660px] text-[clamp(0.95rem,1.2vw,1.1rem)] leading-relaxed text-muted-foreground",children:s})]}),mr=({savedBoth:t,showComparison:r,showAdvancedHint:s,onSaveBoth:l,onCompare:u,onNewMatches:a,onAdvancedSearch:o})=>e.jsx(E,{className:"mt-6",children:e.jsxs("section",{"aria-label":"Compare your matches",className:"rounded-[18px] border border-border/70 bg-card p-5 shadow-[0_10px_30px_-24px_hsl(var(--primary)/0.3)] sm:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-[1.25rem] font-bold leading-snug text-foreground",children:"Which provider feels right for you?"}),e.jsx("p",{className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:"You can review both profiles before deciding — nothing is final yet."})]}),e.jsxs("div",{className:"flex flex-col gap-2.5 sm:flex-row sm:flex-wrap lg:justify-end",children:[e.jsxs("button",{type:"button",onClick:u,"aria-expanded":r,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-xl bg-primary px-4 text-sm font-bold text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[e.jsx(_e,{className:"h-4 w-4","aria-hidden":"true"}),r?"Hide details":"Compare details"]}
39),e.jsxs("button",{type:"button",onClick:l,"aria-pressed":t,className:A("inline-flex min-h-11 items-center justify-center gap-2 rounded-xl border px-4 text-sm font-bold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",t?"border-accent bg-accent/10 text-accent-foreground":"border-border text-foreground hover:border-primary/50"),children:[e.jsx($,{className:A("h-4 w-4",t&&"fill-current"),"aria-hidden":"true"}),t?"Both saved":"Save both"]}),e.jsxs("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-xl px-4 text-sm font-semibold text-muted-foreground underline-offset-4 transition-colors hover:text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[e.jsx(he,{className:"h-4 w-4","aria-hidden":"true"})," Show different matches"]})]})]}),s&&e.jsxs("div",{className:"mt-5 flex flex-col gap-3 border-t border-border pt-5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Still not seeing the right fit? Search the full directory with filters and map view."}),e.jsxs("button",{type:"button",onClick:o,className:"inline-flex min-h-11 shrink-0 items-center gap-2 text-sm font-bold text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[e.jsx(te,{className:"h-4 w-4","aria-hidden":"true"})," Open advanced search"]})]})]})}),ur=({providers:t,summary:r})=>e.jsx(E,{className:"mt-6",children:e.jsxs("section",{"aria-label":"Why these providers were recommended",className:"rounded-[18px] border border-border/70 bg-card p-5 shadow-[0_10px_30px_-24px_hsl(var(--primary)/0.3)] sm:p-6",children:[e.jsx("h2",{className:"text-[1.25rem] font-bold text-foreground",children:"Why these providers?"}),e.jsx("p",{className:"mt-2 max-w-[660px] text-sm leading-relaxed text-muted-foreground",children:r}),e.jsx("div",{className:"mt-5 grid gap-5 md:grid-cols-2 md:gap-8",children:t.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-base font-bold text-secondary",children:s.fullName}),e.jsx("ul",{className:"mt-2 space-y-2 text-sm leading-snug text-foreground",children:s.reasons.slice(0,3).map(l=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-secondary","aria-hidden":"true"}),e.jsx("span",{children:l})]},l))})]},s.profileId||s.talentId))})]})}),xr=({href:t})=>e.jsx(E,{className:"mt-6",children:e.jsxs("aside",{className:"flex flex-col gap-4 roun
39ded-[18px] border border-secondary/20 bg-[linear-gradient(120deg,hsl(var(--secondary)/0.12),hsl(var(--primary)/0.07))] p-5 sm:p-6 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-4",children:[e.jsx("span",{"aria-hidden":"true",className:"hidden h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-card text-secondary shadow-sm sm:flex",children:e.jsx(re,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-[1.125rem] font-bold text-foreground",children:"Are you a birth professional?"}),e.jsx("p",{className:"mt-1 max-w-[62ch] text-sm leading-relaxed text-foreground/80",children:"Join the GentleBirth provider directory and connect with families looking for your services. Existing instructors can activate a profile with their current account."})]})]}),e.jsxs(O,{to:t,className:"inline-flex min-h-11 w-full shrink-0 items-center justify-center gap-2 rounded-xl bg-secondary px-5 text-sm font-bold text-secondary-foreground no-underline transition-colors hover:bg-secondary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary focus-visible:ring-offset-2 lg:w-auto",children:["Join the directory ",e.jsx(D,{className:"h-4 w-4","aria-hidden":"true"})]})]})}),pr=[{icon:ee,label:"Trusted profiles"},{icon:L,label:"Only strong matches"},{icon:$,label:"Your information stays private"},{icon:Mt,label:"Only two recommendations at a time"}],hr=()=>e.jsx("ul",{className:"mt-10 grid gap-x-8 gap-y-4 border-t border-border/70 pt-7 sm:grid-cols-2",children:pr.map(({icon:t,label:r})=>e.jsxs("li",{className:"flex items-start gap-2.5 text-base font-semibold text-foreground",children:[e.jsx(t,{className:"mt-0.5 h-5 w-5 shrink-0 text-secondary","aria-hidden":!0}),e.jsx("span",{children:r})]},r))}),fr=1,gr="18487760-ff3f-48b8-a22f-04c8e46a046e",br="c34d745a-07ee-41db-aa4b-b45e840a0579",yr="/__l5e/assets-v1/18487760-ff3f-48b8-a22f-04c8e46a046e/perinatal-pros-hero.png",vr="a/v1/c34d745a-07ee-41db-aa4b-b45e840a0579/18487760-ff3f-48b8-a22f-04c8e46a046e/perinatal-pros-hero.png",jr="perinatal-pros-hero.png",Nr=365376,wr="image/png",kr="2026-08-06T15:27:12Z",Sr={version:fr,asset_id:gr,project_id:br,url:yr,r2_key:vr,original_filename:jr,size:Nr,content_type:wr,created_at:kr},Ir=["Lactation support","Birth doula","GentleBirth instructor","Postpartum care"],Cr=()=>e.jsxs("div",{className:"relative mx-auto w-full max-w-[560px]",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-10 -top-14 h-56 w-56 rounded-full bg-secondary/25 blur-3xl"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -bottom-16 -left-12 h-64 w-64 rounded-full bg-primary/20 blur-3xl"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute -inset-3 -z-10 rounded-[2.75rem] bg-gradient-to-br from-primary/15 via-background to-secondary/20"}),e.jsx("div",{className:"overflow-hidden rounded-[2.25rem] shadow-[0_30px_70px_-30px_hsl(var(--secondary)/0.45)] ring-1 ring-border/60",children:e.jsx("img",{src:Sr.url,alt:"A birth doula supporting a smiling pregnant mother resting on a birth ball at home",width:1052,height:816,className:"aspect-[4/5] w-full object-cover object-center sm:aspect-[4/3]"})}),e.jsxs("div",{className:"absolute right-3 top-4 flex items-center gap-2 rounded-full bg-card/95 px-4 py-2 shadow-lg ring-1 ring-secondary/20 backdrop-blur xl:-right-6",children:[e.jsx(L,{className:"h-4 w-4 text-secondary","aria-hidden":!0}),e.jsx("span",{className:"text-sm font-bold text-foreground",children:"92% match"})]}),e.jsxs("div",{className:"absolute right-3 top-1/2 hidden w-[14.5rem] -translate-y-1/2 rounded-2xl bg-card/95 p-4 shadow-xl ring-1 ring-border/70 backdrop-blur lg:block xl:-right-10",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[e.jsx(q,{className:"h-4 w-4 shrink-0 text-primary","aria-hidden":!0})," Matched to your needs"]}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"Services, location, timing and care style — all considered."})]}),e.jsxs("div",{className:"absolute bottom-4 left-3 w-[15.5rem] max-w-[calc(100%-1.5rem)] rounded-2xl bg-card p-4 shadow-xl ring-1 ring-border/70 sm:bottom-5 xl:-left-8",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-secondary/12 text-secondary",children:e.jsx(oe,{className:"h-6 w-6","aria-hidden":!0})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-bold text-foreground",children:"Maria Alvarez, IBCLC"}),e.jsx("p",{className:"truncate text-xs font-medium text-muted-foreground",children:"Lactation support"})]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 text-xs font-semibold",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 text-primary",children:[e.jsx(fe,{className:"h-3.5 w-3.5","aria-hidden":!0})," Available this week"]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2.5 py-1 text-muted-foreground",children:[e.jsx(Ee,{className:"h-3.5 w-3.5","aria-hidden":!0})," In-person or virtual"]})]})]})]}),e.jsxs("div",{className:"relative mt-5 rounded-2xl bg-card p-4 shadow-xl ring-1 ring-secondary/20",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[e.jsx(Be,{className:"h-4 w-4 shrink-0 text-secondary","aria-hidden":!0})," Your privacy comes first"]}),e.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"Only strongly matched providers can see your request."})]}),e.jsx("ul",{className:"relative mt-4 flex flex-wrap gap-2",children:Ir.map(t=>e.jsx("li",{className:"rounded-full bg-background/80 px-3 py-1.5 text-xs font-semibold text-muted-foreground ring-1 ring-border/70",children:t},t))})]}),Pr=({onStartQuiz:t,onPostRequest:r})=>e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,
39className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_82%_4%,hsl(var(--secondary)/0.14),transparent_30%),radial-gradient(circle_at_8%_18%,hsl(var(--primary)/0.14),transparent_32%)]"}),e.jsx(be,{className:"relative",children:e.jsxs("div",{className:"grid items-center gap-[clamp(2.5rem,6vw,6.5rem)] py-[clamp(3rem,8vw,7.5rem)] lg:min-h-[680px] lg:grid-cols-[minmax(0,1.05fr)_minmax(420px,0.95fr)]",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-primary/10 px-3.5 py-2 text-sm font-bold text-primary",children:[e.jsx(L,{className:"h-4 w-4","aria-hidden":!0})," GentleBirth matching"]}),e.jsx("h1",{className:"mt-6 max-w-[620px] text-[clamp(2.4rem,4.6vw,4.25rem)] font-bold leading-[1.03] tracking-[-0.042em] text-foreground",children:"Find the support that feels right for you."}),e.jsx("p",{className:"mt-6 max-w-[610px] text-[clamp(1.05rem,1.4vw,1.25rem)] leading-[1.65] text-muted-foreground",children:"Tell us what matters most and GentleBirth will connect you with trusted providers who match your needs, preferences, location, and stage of care."}),e.jsx("p",{className:"mt-8 text-xs font-bold uppercase tracking-[0.14em] text-muted-foreground",children:"Two ways to get support"}),e.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] sm:items-stretch sm:gap-4",children:[e.jsxs("button",{type:"button",onClick:t,className:"group flex h-full flex-col items-start gap-2 rounded-3xl bg-primary p-5 text-left text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:-translate-y-0.5 hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-base font-bold",children:[e.jsx(te,{className:"h-5 w-5","aria-hidden":!0})," I'll search and choose"]}),e.jsx("span",{className:"text-sm leading-relaxed text-primary-foreground/85",children:"Answer a few questions and see your best-matched providers right away."}),e.jsxs("span",{className:"mt-auto inline-flex items-center gap-1.5 pt-2 text-sm font-bold",children:["Find my best matches ",e.jsx(D,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5","aria-hidden":!0})]})]}),e.jsxs("div",{className:"flex items-center justify-center gap-3 sm:flex-col","aria-hidden":!0,children:[e.jsx("span",{className:"h-px flex-1 bg-border sm:h-auto sm:w-px sm:flex-1"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"or"}),e.jsx("span",{className:"h-px flex-1 bg-border sm:h-auto sm:w-px sm:flex-1"})]}),e.jsxs("button",{type:"button",onClick:r,className:"group flex h-full flex-col items-start gap-2 rounded-3xl bg-secondary/10 p-5 text-left ring-1 ring-secondary/30 transition-all hover:-translate-y-0.5 hover:bg-secondary/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-base font-bold text-secondary",children:[e.jsx(it,{className:"h-5 w-5","aria-hidden":!0})," Let pros come to me"]}),e.jsx("span",{className:"text-sm leading-relaxed text-muted-foreground",children:"Post what you need and matching professionals reach out to you."}),e.jsxs("span",{className:"mt-auto inline-flex items-center gap-1.5 pt-2 text-sm font-bold text-secondary",children:["Post what I need ",e.jsx(D,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5","aria-hidden":!0})]})]})]}),e.jsx("p",{className:"mt-3 text-sm font-medium text-muted-foreground",children:"Either way: about 2 minutes · no account needed"}),e.jsx(hr,{})]}),e.jsx(Cr,{})]})})]}),De=({icon:t,eyebrow:r,title:s,description:l,benefits:u,ctaLabel:a,onSelect:o,tone:n})=>e.jsxs("article",{className:A("group relative flex h-full flex-col overflow-hidden rounded-[2rem] bg-card p-7 shadow-[0_18px_50px_-32px_hsl(var(--foreground)/0.35)] ring-1 transition-all duration-300 hover:-translate-y-1 hover:shadow-[0_28px_70px_-32px_hsl(var(--foreground)/0.4)] sm:p-9",n==="primary"?"ring-primary/20":"ring-secondary/20"),children:[e.jsx("div",{"aria-hidden":!0,
39className:A("pointer-events-none absolute -right-16 -top-16 h-44 w-44 rounded-full blur-3xl transition-opacity duration-300 group-hover:opacity-100",n==="primary"?"bg-primary/15 opacity-70":"bg-secondary/15 opacity-70")}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:A("flex h-14 w-14 items-center justify-center rounded-2xl",n==="primary"?"bg-primary/10 text-primary":"bg-secondary/10 text-secondary"),children:e.jsx(t,{className:"h-7 w-7","aria-hidden":!0})}),e.jsx("p",{className:A("mt-6 text-xs font-bold uppercase tracking-[0.14em]",n==="primary"?"text-primary":"text-secondary"),children:r}),e.jsx("h3",{className:"mt-2 text-[clamp(1.5rem,2.2vw,2rem)] font-bold leading-tight tracking-[-0.02em] text-foreground",children:s}),e.jsx("p",{className:"mt-3 text-base leading-relaxed text-muted-foreground",children:l}),e.jsx("ul",{className:"mt-6 space-y-3",children:u.map(h=>e.jsxs("li",{className:"flex items-start gap-3 text-[0.975rem] font-medium text-foreground",children:[e.jsx("span",{className:A("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full",n==="primary"?"bg-primary/12 text-primary":"bg-secondary/12 text-secondary"),children:e.jsx(Y,{className:"h-3.5 w-3.5","aria-hidden":!0})}),h]},h))})]}),e.jsxs("button",{type:"button",onClick:o,className:A("relative mt-8 inline-flex min-h-[3.25rem] w-full items-center justify-center gap-2 rounded-2xl px-6 text-base font-bold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n==="primary"?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-secondary text-secondary-foreground hover:bg-secondary/90"),children:[a," ",e.jsx(D,{className:"h-5 w-5 transition-transform group-hover:translate-x-0.5","aria-hidden":!0})]})]}),Ar=({onStartQuiz:t,onPostRequest:r})=>e.jsxs(se,{tone:"blue",children:[e.jsx(ae,{eyebrow:"Two ways to begin",title:"Choose how you would like to find support",copy:"Both paths are private, guided, and built around what matters most to you — not an open directory to sift through."}),e.jsxs("div",{className:"mt-12 grid gap-6 md:grid-cols-2 md:gap-8",children:[e.jsx(De,{tone:"primary",icon:re,eyebrow:"Get matched",title:"Find my provider",description:"Answer a few thoughtful questions and receive the two providers who most closely match your needs.",benefits:["Two personalized recommendations","Clear match explanations","Trusted provider profiles","No endless searching"],ctaLabel:"Find my best matches",onSelect:t}),e.jsx(De,{tone:"secondary",icon:ft,eyebrow:"Let providers come to you",title:"Post what I need",description:"Describe the support you are looking for and allow only strongly matched providers to express interest.",benefits:["Private support request","Responses from qualified providers","Control over who receives your information","No public listing of your personal details"],ctaLabel:"Post my request",onSelect:r})]})]}),_r=[{icon:ot,title:"Tell us what matters",copy:"Share your needs, location, preferences, timing, and budget."},{icon:Bt,title:"We identify strong matches",copy:"Our matching system filters providers by services, credentials, availability, and fit."},{icon:Yt,title:"Compare the best options",copy:"Review two recommended providers or receive responses to your request."},{icon:Lt,title:"Choose when you feel ready",copy:"Your personal information remains private until you approve a connection."}],Mr=()=>e.jsxs(se,{tone:"white",children:[e.jsx(ae,{eyebrow:"How it works",title:"How GentleBirth matching works",copy:"A guided path from what you need to the person best prepared to support you."}),e.jsxs("div",{className:"relative mt-14",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute left-0 right-0 top-7 hidden h-px bg-gradient-to-r from-transparent via-secondary/30 to-transparent lg:block"}),e.jsx("ol",{className:"relative grid gap-8 sm:grid-cols-2 lg:grid-cols-4 lg:gap-10",children:_r.map(({icon:t,title:r,copy:s},l)=>e.jsxs("li",{className:"group text-center lg:text-left",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 lg:justify-start",children:[e.jsx("span",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-card text-secondary shadow-md ring-1 ring-secondary/20 transition-transform duration-300 group-hover:-translate-y-1",children:e.jsx(t,{className:"h-7 w-7","aria-hidden":!0})}),e.jsxs("span",{className:"text-sm font-bold uppercase tracking-[0.16em] text-muted-foreground",children:["Step ",l+1]})]}),e.jsx("h3",{className:"mt-5 text-xl font-bold leading-snug text-foreground",children:r}),e.jsx("p",{className:"mt-2 text-base leading-relaxed text-muted-foreground",children:s})]},r))})]})]}),ct=t=>{var a,o,n,h,b,g,i;const r=(o=(a=t.location)==null?void 0:a.city)==null?void 0:o.trim(),s=(h=(n=t.location)==null?void 0:n.state)==null?void 0:h.trim(),l=((g=(b=t.location)==null?void 0:b.country)==null?void 0:g.trim())||((i=t.countries)==null?void 0:i[0]);
39return[r,s].filter(Boolean).join(", ")||l||"Available online"},Br=t=>{var u,a,o;const r=[],s=(u=t.skills)==null?void 0:u[0];s&&r.push(`Offers ${s.toLowerCase()} as a core service`),t.isGentlebirthCertified&&r.push("Certified GentleBirth instructor for mindfulness-based support"),t.yearsOfExperience&&r.push(`${t.yearsOfExperience} of experience supporting families`);const l=(a=t.location)!=null&&a.city?ct(t):null;return l&&r.push(`Serves families in and around ${l}`),((o=t.spokenLanguages)==null?void 0:o.length)>1&&r.push(`Speaks ${t.spokenLanguages.slice(0,3).join(", ")}`),r.slice(0,3)},Lr=t=>t===0?96:91,Ue=()=>e.jsx("div",{className:"h-[22rem] animate-pulse rounded-[2rem] bg-card/70 ring-1 ring-border/60"}),Er=({onStartQuiz:t})=>{const[r,s]=c.useState(null);return c.useEffect(()=>{let l=!0;const u=new AbortController;return Le({page:1,pageSize:40},u.signal).then(a=>{if(!l)return;const n=[...a.providers??[]].sort((h,b)=>{const g=i=>{var x,k;return(i.isGentlebirthCertified?4:0)+(i.imageUrl?2:0)+((x=i.skills)!=null&&x.length?1:0)+((k=i.location)!=null&&k.city?1:0)};return g(b)-g(h)});s(n.slice(0,2))}).catch(()=>{l&&s([])}),()=>{l=!1,u.abort()}},[]),e.jsxs(se,{tone:"lavender",children:[e.jsx(ae,{eyebrow:"Featured providers",title:"Not a directory. A personal recommendation.",copy:"Instead of asking you to search through dozens of profiles, GentleBirth identifies the providers who best fit what you told us. Here are real professionals listed with us today."}),e.jsxs("div",{className:"mt-12 grid gap-6 lg:grid-cols-2 lg:gap-8",children:[r===null&&e.jsxs(e.Fragment,{children:[e.jsx(Ue,{}),e.jsx(Ue,{})]}),r==null?void 0:r.map((l,u)=>{var n;const a=Br(l),o=(l.skills??[]).slice(0,3);return e.jsxs("article",{className:"group flex h-full flex-col overflow-hidden rounded-[2rem] bg-card p-6 shadow-[0_20px_55px_-34px_hsl(var(--foreground)/0.4)] ring-1 ring-border/70 transition-all duration-300 hover:-translate-y-1 hover:ring-secondary/30 sm:p-8",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(lt,{src:l.imageUrl,name:l.fullName,className:"h-20 w-20 shrink-0 rounded-2xl ring-1 ring-border/70 sm:h-24 sm:w-24",fallbackClassName:"bg-secondary/10 text-xl font-bold text-secondary"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-xl font-bold leading-tight text-foreground",children:l.fullName}),l.isGentlebirthCertified&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-secondary/10 px-2.5 py-1 text-xs font-bold text-secondary",children:[e.jsx(oe,{className:"h-3.5 w-3.5","aria-hidden":!0})," GentleBirth Certified"]})]}),e.jsxs("p",{className:"mt-1.5 flex items-center gap-1.5 text-sm font-medium text-muted-foreground",children:[(n=l.location)!=null&&n.city?e.jsx(q,{className:"h-4 w-4 shrink-0","aria-hidden":!0}):e.jsx(Et,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),ct(l)]}),o.length>0&&e.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(h=>e.jsx("li",{className:"rounded-full bg-muted px-2.5 py-1 text-xs font-semibold text-muted-foreground",children:h},h))})]}),e.jsxs("div",{className:"hidden shrink-0 rounded-2xl bg-primary/10 px-3 py-2 text-center sm:block",children:[e.jsxs("p",{className:"text-lg font-bold leading-none text-primary",children:[Lr(u),"%"]}),e.jsx("p",{className:"mt-1 text-[0.65rem] font-bold uppercase tracking-wider text-primary/80",children:"match"})]})]}),a.length>0&&e.jsxs("div",{className:"mt-6 rounded-2xl bg-[hsl(var(--primary)/0.05)] p-5",children:[e.jsx("p",{className:"text-sm font-bold text-foreground",children:"Why families are matched with them"}),e.jsx("ul",{className:"mt-3 space-y-2.5",children:a.map(h=>e.jsxs("li",{className:"flex items-start gap-2.5 text-sm leading-relaxed text-muted-foreground",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary","aria-hidden":!0}),h]},h))})]}),e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[e.jsx(O,{to:`/provider/${l.profileId}`,className:"inline-flex min-h-[2.75rem] flex-1 items-center justify-center rounded-xl bg-background px-4 py-3 text-sm font-bold text-foreground ring-1 ring-border transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"View profile"}),e.jsxs("button",{type:"button",onClick:t,className:"inline-flex min-h-[2.75rem] flex-1 items-center justify-center gap-2 rounded-xl bg-secondary px-4 py-3 text-sm font-bold text-secondary-foreground transition-colors hover:bg-secondary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx($,{className:"h-4 w-4","aria-hidden":!0})," See if we match"]})]})]},l.profileId||l.talentId)})]}),e.jsx("div",{className:"mt-10 text-center",children:e.jsxs("button",{type:"button",onClick:t,className:"inline-flex min-h-[3rem] items-center justify-center gap-2 rounded-2xl bg-primary px-6 text-base font-bold text-primary-foreground transition-all hover:-translate-y-0.5 hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:["See my own two matches ",e.jsx(D,{className:"h-5 w-5","aria-hidden":!0})]})})]})},Ve=["Family posts a request","System checks provider compatibility","Only strong matches receive the opportunity","Family approves the provider","Private connection opens"],Fr=[{icon:Wt,label:"Exact address hidden"},{icon:Ut,label:"Phone number hidden"},{icon:gt,label:"Email hidden"},{icon:Ft,label:"Sensitive details protected"}],Tr=()=>e.jsx(se,{tone:"white",children:e.jsxs("div",{className:"grid items-center gap-[clamp(2.5rem,5vw,4.5rem)] lg:grid-cols-[minmax(0,1fr)_minmax(360px,0.9fr)]",children:[e.jsxs("div",{children:[e.jsx(ae,{align:"left",eyebrow:"Privacy by design",title:"Your information is never placed on an open job board.",copy:"Only providers who strongly match your request can see an anonymized version. Your identity and contact details remain hidden until you choose to connect."}),e.jsx("ul",{className:"mt-8 grid gap-3 sm:grid-cols-2",children:Fr.map(({icon:t,label:r})=>e.jsxs("li",{className:"flex items-center gap-3 rounded-2xl bg-[hsl(var(--secondary)/0.07)] px-4 py-3.5 text-sm font-semibold text-foreground ring-1 ring-secondary/15",children:[e.jsx(t,{className:"h-5 w-5 shrink-0 text-secondary","aria-hidden":!0}),r]},r))}),e.jsxs("p",{className:"mt-7 flex items-start gap-2.5 text-base leading-relaxed text-muted-foreground",children:[e.jsx(ee,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary","aria-hidden":!0}),"Providers are reviewed by our team before they can receive any matched opportunity."]})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-[2rem] bg-[hsl(var(--primary)/0.05)] p-6 ring-1 ring-primary/15 sm:p-9",children:[e.jsx("div",{"aria-hidden":!0,
39className:"pointer-events-none absolute -right-14 -top-14 h-48 w-48 rounded-full bg-secondary/15 blur-3xl"}),e.jsxs("p",{className:"relative flex items-center gap-2 text-sm font-bold uppercase tracking-[0.14em] text-primary",children:[e.jsx(Be,{className:"h-4 w-4","aria-hidden":!0})," How a request travels"]}),e.jsx("ol",{className:"relative mt-6 space-y-2",children:Ve.map((t,r)=>e.jsxs("li",{children:[e.jsxs("div",{className:"flex items-center gap-4 rounded-2xl bg-card px-4 py-4 shadow-sm ring-1 ring-border/70",children:[e.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-secondary/12 text-sm font-bold text-secondary",children:r+1}),e.jsx("span",{className:"text-sm font-semibold leading-snug text-foreground",children:t})]}),r<Ve.length-1&&e.jsx("div",{"aria-hidden":!0,className:"mx-auto h-4 w-px bg-secondary/30"})]},t))})]})]})}),Gr=[{icon:at,label:"Childbirth education"},{icon:re,label:"Birth doula support"},{icon:Tt,label:"Postpartum doula support"},{icon:ge,label:"Lactation support"},{icon:Me,label:"Prenatal education"},{icon:ie,label:"Newborn care"},{icon:bt,label:"Infant sleep support"},{icon:rt,label:"Birth photography"},{icon:yt,label:"Pelvic-floor support"},{icon:st,label:"Perinatal mental health"},{icon:Ot,label:"Nutrition"},{icon:$,label:"Bereavement support"},{icon:L,label:"GentleBirth instruction"},{icon:Ee,label:"Virtual support"}],Rr=()=>e.jsxs(se,{tone:"blue",children:[e.jsx(ae,{eyebrow:"Support categories",title:"Every kind of perinatal support, in one place",copy:"Tell us which of these matters most and we will match you with providers who genuinely offer it."}),e.jsx("ul",{className:"mt-11 grid grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 lg:grid-cols-5 xl:grid-cols-7",children:Gr.map(({icon:t,label:r})=>e.jsx("li",{children:e.jsxs("div",{className:"flex h-full min-h-[6.5rem] flex-col items-start gap-3 rounded-2xl bg-card p-4 ring-1 ring-border/70 transition-all duration-300 hover:-translate-y-1 hover:ring-secondary/30",children:[e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-secondary/10 text-secondary",children:e.jsx(t,{className:"h-5 w-5","aria-hidden":!0})}),e.jsx("span",{className:"text-sm font-semibold leading-snug text-foreground",children:r})]})},r))})]}),$r=()=>e.jsxs("div",{className:"relative rounded-[2rem] bg-card p-6 shadow-[0_20px_55px_-34px_hsl(var(--foreground)/0.4)] ring-1 ring-secondary/20 sm:p-8",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-secondary/12 text-secondary",children:e.jsx(Gt,{className:"h-5 w-5","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.14em] text-secondary",children:"Provider view"}),e.jsx("p",{className:"text-lg font-bold leading-tight text-foreground",children:"You match this request at 91%"})]})]}),e.jsx("p",{className:"mt-6 text-sm font-bold text-foreground",children:"Why"}),e.jsx("ul",{className:"mt-3 space-y-2.5",children:["Within your service area","Matches your lactation services","Available during the requested time"].map(t=>e.jsxs("li",{className:"flex items-start gap-2.5 text-sm leading-relaxed text-muted-foreground",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-secondary","aria-hidden":!0}),t]},t))}),e.jsxs("p",{className:"mt-6 flex items-start gap-2.5 rounded-2xl bg-[hsl(var(--secondary)/0.07)] p-4 text-sm leading-relaxed text-muted-foreground",children:[e.jsx(ee,{className:"mt-0.5 h-4 w-4 shrink-0 text-secondary","aria-hidden":!0}),"The family’s name and contact details stay hidden until they approve the connection."]})]}),Or=[{icon:q,label:"Lake Nona, Florida"},{icon:vt,label:"Needed this week"},{icon:jt,label:"In person"},{icon:Pe,label:"Budget: $125–$200"},{icon:ie,label:"Baby under two weeks"}],qr=({onPostRequest:t})=>e.jsxs(se,{tone:"white",children:[e.jsx(ae,{eyebrow:"The reverse marketplace",title:"Tell us what you need. We will find who fits.",copy:"Post a private request and only strongly matched providers are invited to respond."}),e.jsxs("div",{className:"mt-12 grid items-start gap-6 lg:grid-cols-2 lg:gap-10",children:[e.jsxs("div",{className:"rounded-[2rem] bg-[hsl(var(--primary)/0.05)] p-6 ring-1 ring-primary/15 sm:p-8",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.14em] text-primary",children:"Family request"}),e.jsx("h3",{className:"mt-3 text-[clamp(1.35rem,2vw,1.75rem)] font-bold leading-snug text-foreground",children:"Looking for an in-home lactation consultant"}),e.jsx("ul",{className:"mt-6 grid gap-3 sm:grid-cols-2",children:Or.map(({icon:r,label:s})=>e.jsxs("li",{className:"flex items-center gap-2.5 rounded-xl bg-card px-3.5 py-3 text-sm font-semibold text-foreground ring-1 ring-border/70",children:[e.jsx(r,{className:"h-4 w-4 shrink-0 text-primary","aria-hidden":!0}),s]},s))}),e.jsxs("p",{className:"mt-6 flex items-start gap-2.5 text-sm leading-relaxed text-muted-foreground",children:[e.jsx(Be,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary","aria-hidden":!0}),"Only providers who strongly match this request can respond."]}),e.jsxs("button",{type:"button",onClick:t,className:"mt-7 inline-flex min-h-[3rem] w-full items-center justify-center gap-2 rounded-2xl bg-primary px-6 text-base font-bold text-primary-foreground transition-all hover:-translate-y-0.5 hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:w-auto",children:["Post my request ",e.jsx(D,{className:"h-5 w-5","aria-hidden":!0})]})]}),e.jsx($r,{})]})]}),Hr=["A verified badge","Priority among similarly matched providers","Access to matched opportunities","A trusted profile families can compare"],Wr=()=>e.jsx("section",{className:"bg-[hsl(var(--secondary)/0.08)] py-[clamp(3.5rem,6vw,6.5rem)]",children:e.jsx(be,{children:e.jsx("div",{className:"overflow-hidden rounded-[2.5rem] bg-gradient-to-br from-[hsl(var(--secondary)/0.14)] via-card to-[hsl(var(--primary)/0.12)] ring-1 ring-secondary/20",children:e.jsxs("div",{className:"grid items-stretch gap-0 lg:grid-cols-[minmax(0,1.05fr)_minmax(300px,0.95fr)]",children:[e.jsxs("div",{className:"p-7 sm:p-10 lg:p-14",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-secondary/12 px-3.5 py-2 text-sm font-bold text-secondary",children:[e.jsx(oe,{className:"h-4 w-4","aria-hidden":!0})," For providers"]}),e.jsx("h2",{className:"mt-6 max-w-xl text-[clamp(1.85rem,3vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-foreground",children:"Support families through GentleBirth"}),e.jsx("p",{className:"mt-4 max-w-xl text-[clamp(1rem,1.25vw,1.15rem)] leading-relaxed text-muted-foreground",children:"Create a provider profile, receive personalized opportunities, and connect with families whose needs closely match your services."}),e.jsx("p",{className:"mt-8 text-sm font-bold text-foreground",children:"GentleBirth instructors receive:"}),e.jsx("ul",{className:"mt-3 grid gap-2.5 sm:grid-cols-2",children:Hr.map(t=>e.jsxs("li",{className:"flex items-start gap-2.5 text-sm font-medium text-foreground",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-secondary","aria-hidden":!0}),t]},t))}),e.jsxs("div",{className:"mt-9 flex flex-col items-start gap-4 sm:flex-row sm:items-center",children:[e.jsxs(O,{to:"/become-a-provider",className:"inline-flex min-h-[3.25rem] w-full items-center justify-center gap-2 rounded-2xl bg-secondary px-6 text-base font-bold text-secondary-foreground no-underline transition-all hover:-translate-y-0.5 hover:bg-secondary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:w-auto",children:["Learn more & join ",e.jsx(Ce,{className:"h-4 w-4","aria-hidden":!0})]}),e.jsx(O,{to:nt("?context=provider-directory&returnTo=/provider-onboarding"),className:"inline-flex min-h-[2.75rem] items-center text-sm font-bold text-secondary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:"Sign in to manage my profile"})]}),e.jsx("p",{className:"mt-5 max-w-xl text-sm leading-relaxed text-muted-foreground",children:"Open to any practising birth pro — doulas, childbirth educators, lactation and newborn care specialists. Our team reviews new listings within 3–5 business days."})]}),e.jsx("div",{className:"relative min-h-[16rem] lg:min-h-full",children:e.jsx("img",{src:_t,alt:"A perinatal provider supporting a new parent and their baby at home",loading:"lazy",width:1280,height:896,className:"h-full w-full object-cover"})})]})})})}),zr=({onStartQuiz:t,onPostRequest:r})=>e.jsx("section",{className:"bg-background py-[clamp(3.5rem,6vw,6.5rem)]",children:e.jsx(be,{children:e.jsxs("div",{className:"relative overflow-hidden rounded-[2.5rem] bg-gradient-to-br from-[hsl(var(--primary)/0.12)] via-[hsl(var(--secondary)/0.10)] to-[hsl(var(--accent)/0.10)] px-6 py-[clamp(3rem,5vw,5rem)] text-center ring-1 ring-border/60 sm:px-12",children:[e.jsx("div",{"aria-hidden":!0,
39className:"pointer-events-none absolute -left-20 -top-20 h-64 w-64 rounded-full bg-primary/15 blur-3xl"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -bottom-24 -right-16 h-72 w-72 rounded-full bg-secondary/15 blur-3xl"}),e.jsxs("div",{className:"relative mx-auto max-w-3xl",children:[e.jsx("h2",{className:"text-[clamp(1.9rem,3.4vw,3.25rem)] font-bold leading-[1.08] tracking-[-0.035em] text-foreground",children:"The right support should not be difficult to find."}),e.jsx("p",{className:"mx-auto mt-5 max-w-2xl text-[clamp(1rem,1.35vw,1.2rem)] leading-relaxed text-muted-foreground",children:"Tell us what matters and let GentleBirth guide you toward the people best prepared to support you."}),e.jsxs("div",{className:"mt-9 flex flex-col justify-center gap-3 sm:flex-row",children:[e.jsxs("button",{type:"button",onClick:t,className:"inline-flex min-h-[3.5rem] w-full items-center justify-center gap-2 rounded-2xl bg-primary px-7 text-base font-bold text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:-translate-y-0.5 hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:w-auto",children:["Find my best matches ",e.jsx(D,{className:"h-5 w-5","aria-hidden":!0})]}),e.jsxs("button",{type:"button",onClick:r,className:"inline-flex min-h-[3.5rem] w-full items-center justify-center gap-2 rounded-2xl bg-card px-7 text-base font-bold text-secondary ring-1 ring-secondary/30 transition-all hover:-translate-y-0.5 hover:bg-secondary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:w-auto",children:[e.jsx(it,{className:"h-5 w-5","aria-hidden":!0})," Post what I need"]})]})]})]})})}),Dr=({onBrowse:t})=>e.jsx("section",{className:"bg-background py-[clamp(3rem,5vw,5rem)]",children:e.jsx(be,{children:e.jsxs("div",{className:"flex flex-col items-center justify-between gap-6 rounded-[2rem] border border-border/70 bg-muted/30 px-6 py-[clamp(2.5rem,4vw,4rem)] text-center sm:flex-row sm:text-left sm:px-10 lg:px-14",children:[e.jsxs("div",{className:"flex max-w-2xl items-start gap-4",children:[e.jsx("span",{"aria-hidden":"true",className:"hidden h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-secondary/10 text-secondary sm:flex",children:e.jsx(_e,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-[clamp(1.25rem,2vw,1.65rem)] font-bold leading-tight tracking-[-0.02em] text-foreground",children:"Want to search the directory yourself?"}),e.jsx("p",{className:"mt-2 max-w-xl text-[clamp(0.95rem,1.15vw,1.05rem)] leading-relaxed text-muted-foreground",children:"Browse every provider, filter by service, location, language, and availability, and choose the person who feels right for you."})]})]}),e.jsxs("button",{type:"button",onClick:t,className:"inline-flex min-h-[3rem] w-full shrink-0 items-center justify-center gap-2 rounded-2xl bg-card px-6 text-base font-bold text-secondary ring-1 ring-secondary/30 transition-all hover:-translate-y-0.5 hover:bg-secondary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:w-auto",children:[e.jsx(te,{className:"h-4 w-4","aria-hidden":"true"}),"Browse all providers"]})]})})}),Ur=({onStartQuiz:t,onPostRequest:r,onBrowse:s,joinHref:l})=>e.jsxs("div",{className:"bg-[linear-gradient(180deg,hsl(var(--primary)/0.04)_0%,hsl(var(--background))_22%,hsl(var(--secondary)/0.04)_100%)]",children:[e.jsx(Pr,{onStartQuiz:t,onPostRequest:r}),e.jsx(Ar,{onStartQuiz:t,onPostRequest:r}),e.jsx(Mr,{}),e.jsx(Er,{onBrowse:s,onStartQuiz:t}),e.jsx(Tr,{}),e.jsx(Rr,{}),e.jsx(qr,{onPostRequest:r}),e.jsx(Wr,{}),e.jsx(zr,{onStartQuiz:t,onPostRequest:r}),e.jsx(Dr,{onBrowse:s})]}),Vr=async t=>{const r=Array.from(new Set(t.map(s=>Number(s)).filter(s=>Number.isFinite(s)&&s>0)));if(r.length===0)return{};try{const{data:s,error:l}=await Xe.functions.invoke("provider-activity-signals",{body:{talentIds:r}});if(l)throw l;const u=(s==null?void 0:s.signals)??{};return Object.entries(u).reduce((a,[o,n])=>(a[o]={marketplaceTalentId:Number(o),activityScore:Number((n==null?void 0:n.activityScore)??0),availabilityStatus:(n==null?void 0:n.availabilityStatus)??null,badges:Array.isArray(n==null?void 0:n.badges)?n.badges:[]},a),{})}catch(s){return console.warn("[providerActivitySignals] falling back to neutral activity",s),{}}},Ye={service:"",support:"",format:"",location:"",distance:"25 miles",availability:"",language:"",budget:"",style:""},le=[{key:"service",title:"Who would feel most helpful right now?",hint:"Choose the closest fit. You can change your answers later.",options:[{value:"doula",label:"A birth or postpartum doula",detail
39:"Hands-on support before, during, or after birth",icon:re},{value:"education",label:"A childbirth educator",detail:"Preparation, classes, and confident decision-making",icon:at},{value:"lactation",label:"A feeding specialist",detail:"Breastfeeding, pumping, and infant-feeding support",icon:ge},{value:"newborn",label:"A newborn care specialist",detail:"Practical support for baby and the early weeks",icon:ie},{value:"gentlebirth",label:"A GentleBirth instructor",detail:"Mindfulness and brain training for birth",icon:L},{value:"unsure",label:"I’m not sure yet",detail:"Match me across several kinds of support",icon:ot}]},{key:"support",title:"What matters most in your support?",hint:"This helps us understand the experience you want, not just the job title.",options:[{value:"first-time",label:"Feeling prepared as a first-time parent",detail:"Clear guidance and reassurance without overwhelm",icon:Me},{value:"birth-support",label:"Steady support through labor and birth",detail:"A calm, experienced person in your corner",icon:re},{value:"vbac",label:"VBAC or cesarean-informed support",detail:"Someone who understands your specific birth path",icon:ee},{value:"postpartum",label:"Postpartum recovery and newborn care",detail:"Support for the whole family after baby arrives",icon:ie},{value:"feeding",label:"Feeding confidence",detail:"Practical, judgment-free feeding help",icon:ge},{value:"emotional",label:"Calm, emotional, or mindfulness support",detail:"Tools for fear, stress, and feeling grounded",icon:$}]},{key:"format",title:"How would you like to meet?",hint:"We’ll only favor distance when in-person support matters to you.",options:[{value:"in-person",label:"In person",detail:"Someone who serves your local area",icon:q},{value:"virtual",label:"Virtual",detail:"Meet by video from wherever you are",icon:Ee},{value:"either",label:"Either works for me",detail:"Show the strongest fit, near or far",icon:Ge}]},{key:"availability",title:"When do you usually need support?",hint:"A broad answer is perfect. You can confirm exact dates with your match.",options:[{value:"weekdays",label:"Weekdays",detail:"Daytime appointments are easiest",icon:fe},{value:"evenings",label:"Evenings",detail:"After-work appointments would help",icon:Rt},{value:"weekends",label:"Weekends",detail:"Saturday or Sunday is best",icon:fe},{value:"flexible",label:"My schedule is flexible",detail:"Fit matters more than a specific time",icon:he}]},{key:"language",title:"What language should your provider speak?",hint:"Choose the language you’d feel most comfortable using together.",options:[{value:"English",label:"English",detail
39:"English-speaking support",icon:Se},{value:"Spanish",label:"Spanish",detail:"Spanish-speaking support",icon:Se},{value:"Portuguese",label:"Portuguese",detail:"Portuguese-speaking support",icon:Se},{value:"any",label:"No preference",detail:"Language is not a deciding factor",icon:Ge}]},{key:"budget",title:"What payment option feels right?",hint:"This keeps recommendations realistic while leaving room to discuss packages.",options:[{value:"insurance",label:"Insurance or covered benefits",detail:"Prioritize providers who mention coverage",icon:ee},{value:"under-100",label:"Under $100 per hour",detail:"Keep hourly rates below $100 when listed",icon:Pe},{value:"100-200",label:"$100–$200 per hour",detail:"A mid-range private-pay budget",icon:Pe},{value:"flexible",label:"I’m flexible",detail:"The right fit matters most",icon:$}]},{key:"style",title:"Who are you most likely to click with?",hint:"There’s no wrong answer. Think about the energy you want in the room.",options:[{value:"calm",label:"Calm and grounding",detail:"Warm, steady, and reassuring",icon:$},{value:"practical",label:"Practical and direct",detail:"Clear steps and evidence-based answers",icon:Y},{value:"encouraging",label:"Upbeat and encouraging",detail:"Positive energy and confidence-building",icon:L},{value:"adaptive",label:"Flexible and responsive",detail:"Adapts to my choices without judgment",icon:he}]}],Ze={doula:["doula","birth support","labor support","postpartum support"],education:["childbirth education","birth education","educator","antenatal education"],lactation:["lactation","ibclc","breastfeeding","feeding support"],newborn:["newborn","postpartum","sleep","infant care"],gentlebirth:["gentlebirth","hypnobirthing","mindfulness"]},Yr={"first-time":["education","first-time","prenatal","preparation"],"birth-support":["birth","labor","doula"],vbac:["vbac","cesarean","caesarean"],postpartum:["postpartum","newborn","recovery","infant"],feeding:["lactation","breastfeeding","feeding","ibclc"],emotional:["mindful","calm","emotional","hypno","anxiety"]},Zr={calm:["calm","gentle","mindful","grounded"],practical:["evidence","practical","education","informed"],encouraging:["positive","confidence","empower","encourag"],adaptive:["personal","individual","flexible","choice","judgment-free"]},Ae={doula:"doula support",education:"childbirth education",lactation:"feeding support",newborn:"newborn care",gentlebirth:"GentleBirth support",unsure:"pregnancy and postpartum support"},Ke=t=>[t.fullName,t.description,...t.skills,...(t.services||[]).flatMap(r=>[r.name,r.description]),...(t.certifications||[]).flatMap(r=>[r.name,r.organization])].filter(Boolean).join(" ").toLowerCase(),J=(t,r=[])=>r.some(s=>t.includes(s)),Kr=(t,r)=>!!t.isGentlebirthCertified||r.includes("gentlebirth"),Qr=(t,r,s={})=>t.map(a=>{var W,T,U,G;const o=Ke(a),n=Ze[r.service]||[],h=r.service==="unsure"||J(o,n),b=J(o,Yr[r.support]),g=J(o,Zr[r.style]),i=J(o,["virtual","online","zoom","telehealth"]),x=[(W=a.location)==null?void 0:W.city,(T=a.location)==null?void 0:T.state,(U=a.location)==null?void 0:U.country,...a.countries||[]].filter(Boolean).join(" ").toLowerCase(),y=r.location.trim().toLowerCase().split(",")[0].trim(),I=!!(y&&x.includes(y)),p=r.language==="any"||a.spokenLanguages.some(d=>d.toLowerCase().includes(r.language.toLowerCase())),S=r.availability==="flexible"||!!((G=a.availability)!=null&&G.toLowerCase().includes(r.availability)),C=a.baseRate||0,w=r.budget==="flexible"||r.budget==="under-100"&&C>0&&C<=100||r.budget==="100-200"&&C>=100&&C<=200||r.budget==="insurance"&&J(o,["insurance","benefit","covered"]);let v=h?25:Math.min(8,n.filter(d=>o.includes(d.split(" ")[0])).length*3);v+=b?20:8,r.format==="virtual"?v+=i?15:7:r.format==="in-person"?v+=I?15:a.location?9:3:v+=i||a.location?13:8,v+=S?15:a.availability?7:8,v+=w?10:C?4:6,v+=p?5:a.spokenLanguages.length?1:3,v+=g?5:3;const H=[a.imageUrl,a.description,a.skills.length>1,a.location,a.spokenLanguages.length,a.yearsOfExperience],F=H.filter(Boolean).length/H.length;v+=Math.round(F*5),v=Math.min(100,v);const _=Kr(a,o),Z=a.gentlebirthCertificationStatus==="valid",f=s[String(a.talentId)],B=Math.min(100,v+(F>=.8?2:0)),K=kt({coreMatch:B,activityScore:(f==null?void 0:f.activityScore)??St,availabilityStatus:f==null?void 0:f.availabilityStatus,isGentleBirthCertified:_,certificationStatus:Z?"valid":a.gentlebirthCertificationStatus}),N=[];return h&&N.push(`Supports your ${Ae[r.service]} preference`),b&&N.push("Experienced with the kind of support you selected"),r.format==="virtual"&&i&&N.push("Available in your preferred format (virtual)"),r.format==="in-person"&&I?N.push(`Serves your area — ${r.location}`):r.format==="in-person"&&a.location&&N.push(`Based near you in ${[a.location.city,a.location.state].filter(
39Boolean).join(", ")}`),p&&r.language!=="any"&&N.push(`Speaks ${r.language}`),S&&r.availability!=="flexible"&&N.push(`Availability fits your ${r.availability}`),g&&N.push(`Communication style you asked for: ${r.style==="practical"?"practical and informed":r.style}`),_&&N.push("GentleBirth certified instructor"),N.length<3&&a.yearsOfExperience&&N.push(`${a.yearsOfExperience} of experience`),N.length<3&&N.push("A complete, detailed provider profile"),{...a,compatibility:B,matchScore:Math.min(98,Math.max(60,Math.round(B))),rankScore:K,activityBadges:(f==null?void 0:f.badges)??[],availabilityStatus:f==null?void 0:f.availabilityStatus,isGentleBirthInstructor:_,reasons:N.slice(0,4)}}).filter(a=>{var g,i,x;if(a.availabilityStatus==="paused")return!1;const o=Ke(a);if(!(r.service==="unsure"||J(o,Ze[r.service])))return!1;if(r.format!=="in-person")return!0;const h=r.location.trim().toLowerCase().split(",")[0].trim(),b=[(g=a.location)==null?void 0:g.city,(i=a.location)==null?void 0:i.state,(x=a.location)==null?void 0:x.country,...a.countries||[]].filter(Boolean).join(" ").toLowerCase();return!!(h&&b.includes(h))}).sort((a,o)=>o.rankScore-a.rankScore||o.compatibility-a.compatibility),ks=()=>{const{user:t,isInstructor:r}=Nt(),s=wt(),[l,u]=c.useState("welcome"),[a,o]=c.useState(0),[n,h]=c.useState(Ye),[b,g]=c.useState([]),[i,x]=c.useState(0),[k,y]=c.useState(0),[I,p]=c.useState(!1),[S,C]=c.useState(!1),[w,v]=c.useState(null),H=c.useMemo(()=>({serviceType:Ae[n.service]||void 0,locationText:n.location||void 0,format:n.format||void 0,budgetRange:n.budget||void 0}),[n.service,n.location,n.format,n.budget]),F=3,_=le[a>F?a-1:a],Z=_.options[0].icon,f=c.useMemo(()=>{if(!b.length)return[];const d=b[i%b.length],j=b[(i+1)%b.length];return d===j?[d]:[d,j]},[b,i]),B=async d=>{u("matching"),v(null),window.scrollTo({top:0,behavior:"smooth"});try{const j=await Le({page:1,pageSize:500,sort:"relevance"}),z=await Vr(j.providers.map(ce=>ce.talentId)),Q=Qr(j.providers,d,z);if(Q.length<2)throw new Error("We could not find two confident matches yet.");g(Q),x(0),u("results")}catch(j){console.error("Provider matching error:",j),v(j instanceof Error?j.message:"Matching is temporarily unavailable."),u("results")}},K=(d,j)=>{const z={...n,[d]:j};h(z),a===le.length?B(z):o(Q=>Q+1)},N=()=>{n.location.trim()&&o(F+1)},W=(d=0)=>{o(d),u("questions"),requestAnimationFrame(()=>window.scrollTo({top:0,behavior:"smooth"}))},T=()=>{u("browse"),requestAnimationFrame(()=>window.scrollTo({top:0,behavior:"smooth"}))},U=()=>{h(Ye),o(0),g([]),x(0),y(0),p(!1),C(!1),u("welcome"),window.scrollTo({top:0,behavior:"smooth"})};if(l==="browse")return e.jsx(tr,{});const G=t?"/provider-onboarding":nt("?signup=1&context=provider-directory&returnTo=/provider-onboarding");return e.jsxs(e.Fragment,{children:[e.jsxs(Je,{children:[e.jsx("title",{children:"Find a Perinatal Provider | GentleBirth Matching"}),e.jsx("meta",{name:"description",content:"GentleBirth matches you with the two perinatal providers who best fit your needs, or lets you post a private request only strongly matched providers can see."})]}),e.jsx(et,{}),e.jsxs("main",{className:"min-h-screen bg-background pt-20",children:[l==="welcome"&&e.jsx(Ur,{onStartQuiz:()=>W(),onPostRequest:()=>s("/care-requests"),onBrowse:T,joinHref:G}),l==="questions"&&e.jsxs("section",{className:"mx-auto max-w-4xl px-4 py-10 md:py-16",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-4 text-sm font-bold",children:[e.jsx("span",{className:"text-primary",children:"Your match preferences"}),e.jsxs("span",{className:"text-muted-foreground",children:["Step ",a+1," of ",le.length+1]})]}),e.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted","aria-hidden":!0,children:e.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300",style:{width:`${(a+1)/(le.length+1)*100}
39%`}})})]}),e.jsxs("button",{onClick:()=>a===0?u("welcome"):o(d=>Math.max(0,d-1)),className:"mb-6 inline-flex items-center gap-1.5 text-sm font-bold text-muted-foreground hover:text-primary",children:[e.jsx(Te,{className:"h-4 w-4"})," Back"]}),a===F?e.jsxs("div",{className:"rounded-2xl bg-card p-6 shadow-sm ring-1 ring-border md:p-10",children:[e.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[e.jsx("span",{className:"mx-auto mb-5 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:e.jsx(q,{className:"h-6 w-6"})}),e.jsx("h1",{className:"text-3xl font-bold md:text-4xl",children:"Where should we look?"}),e.jsx("p",{className:"mx-auto mt-3 text-muted-foreground",children:"A city, region, or ZIP/postcode is enough. We’ll also consider virtual providers based on your preference."})]}),e.jsxs("div",{className:"mx-auto mt-8 max-w-xl",children:[e.jsx("label",{htmlFor:"match-location",className:"mb-2 block text-sm font-bold text-foreground",children:"Your location"}),e.jsxs("div",{className:"relative",children:[e.jsx(q,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{id:"match-location",value:n.location,onChange:d=>h(j=>({...j,location:d.target.value})),onKeyDown:d=>{d.key==="Enter"&&N()},placeholder:"City, state, or ZIP/postcode",className:"h-14 w-full rounded-xl border border-input bg-background py-3 pl-12 pr-4 text-base text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20",autoFocus:!0})]}),n.format!=="virtual"&&e.jsxs("div",{className:"mt-5",children:[e.jsx("p",{className:"mb-2 text-sm font-bold",children:"How far would you travel?"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:["10 miles","25 miles","50 miles","Not sure"].map(d=>e.jsx("button",{onClick:()=>h(j=>({...j,distance:d})),className:A("rounded-full border px-4 py-2 text-sm font-bold transition-colors",n.distance===d?"border-primary bg-primary text-primary-foreground":"border-border bg-white text-foreground hover:border-primary/50"),children:d},d))})]}),e.jsxs("button",{onClick:N,disabled:!n.location.trim(),className:"mt-8 inline-flex h-12 w-full items-center justify-center gap-2 rounded-xl bg-primary px-5 font-bold text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-45",children:["Continue ",e.jsx(D,{className:"h-4 w-4"})]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("span",{className:"mx-auto mb-5 flex h-12 w-12 items-center justify-center rounded-full bg-secondary/10 text-secondary",children:e.jsx(Z,{className:"h-6 w-6"})}),e.jsx("h1",{className:"text-3xl font-bold md:text-4xl",children:_.title}),e.jsx("p",{className:"mx-auto mt-3 text-muted-foreground",children:_.hint})]}),e.jsx("div",{className:A("grid gap-3",_.options.length>4?"md:grid-cols-2":"mx-auto max-w-2xl"),children:_.options.map(d=>{const j=d.icon,z=n[_.key]===d.value;return e.jsxs("button",{onClick:()=>K(_.key,d.value),className:A("group flex min-h-24 items-center gap-4 roun
39ded-xl border bg-card p-4 text-left transition-all duration-200 hover:-translate-y-0.5 hover:border-primary hover:bg-primary/5",z?"border-primary bg-primary/5 ring-2 ring-primary/15":"border-border"),children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground",children:e.jsx(j,{className:"h-5 w-5"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block font-bold text-foreground",children:d.label}),e.jsx("span",{className:"mt-0.5 block text-sm leading-snug text-muted-foreground",children:d.detail})]}),e.jsx(Ce,{className:"h-5 w-5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]},d.value)})})]})]}),l==="matching"&&e.jsxs(We,{children:[e.jsxs(E,{className:"mb-7","aria-live":"polite","aria-busy":"true",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl bg-secondary/10 px-3 py-1.5 text-sm font-bold text-secondary",children:[e.jsx(Ie,{className:"h-4 w-4 animate-spin motion-reduce:animate-none","aria-hidden":"true"})," Matching in progress"]}),e.jsx("h1",{className:"mt-4 text-[clamp(2rem,3vw,3.25rem)] font-bold leading-[1.08] tracking-[-0.035em]",children:"Finding your strongest matches…"}),e.jsx("p",{className:"mt-3 max-w-[660px] text-[clamp(0.95rem,1.2vw,1.1rem)] leading-relaxed text-muted-foreground",children:"We’re looking at fit first, then giving a small lift to verified GentleBirth instructors and complete profiles."})]}),e.jsxs(ze,{children:[e.jsx(He,{}),e.jsx(He,{})]})]}),l==="results"&&e.jsx(We,{children:w||f.length<2?e.jsx(E,{className:"max-w-[680px]",children:e.jsxs("div",{className:"rounded-[18px] border border-border/70 bg-card p-6 text-center sm:p-8",children:[e.jsx(te,{className:"mx-auto h-10 w-10 text-primary","aria-hidden":"true"}),e.jsx("h1",{className:"mt-4 text-2xl font-bold",children:"Let’s widen the search"}),e.jsxs("p",{className:"mt-2 text-muted-foreground",children:[w||"We do not have two confident matches for these preferences yet."," We won’t recommend a poor fit just to fill the screen."]}),e.jsxs("div",{className:"mt-6 flex flex-col justify-center gap-3 sm:flex-row",children:[e.jsx("button",{onClick:T,className:"min-h-11 rounded-xl bg-primary px-5 font-bold text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:"Browse all providers"}),e.jsx("button",{onClick:()=>W(),className:"min-h-11 rounded-xl border border-primary px-5 font-bold text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:"Edit my answers"})]}),e.jsxs("div",{className:"mt-8 border-t border-border pt-6",children:[e.jsxs("p",{className:"font-bold text-foreground",children:["Know a great provider in ",n.location||"your area","?"]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Families nearby are looking for this support. Invite them to join the GentleBirth Provider Directory."}),e.jsxs(O,{to:G,className:"mt-3 inline-flex min-h-11 items-center gap-1.5 text-sm font-bold text-secondary hover:underline",children:["List yourself in the directory ",e.jsx(Ce,{className:"h-4 w-4"})]})]})]})}):e.jsxs(e.Fragment,{children:[e.jsx(dr,{title:"Meet your two best matches",subtitle:"Both fit your core needs. The difference comes down to the details that matter most to you."}),e.jsx(E,{className:"mb-3",children:e.jsx("p",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Your two strongest matches"})}),e.jsxs(ze,{children:[e.jsx(qe,{provider:f[0],label:"Top match",tone:"top",prefill:H}),e.jsx(qe,{provider:f[1],label:"Great match",tone:"great",prefill:H})]}),e.jsx(mr,{savedBoth:I,showComparison:S,showAdvancedHint:k>0,onSaveBoth:()=>p(d=>!d),onCompare:()=>C(d=>!d),onNewMatches:()=>{x(d=>d+2),y(d=>d+1),C(!1),window.scrollTo({top:100,behavior:"smooth"})},onAdvancedSearch:T}),S&&e.jsx(E,{className:"mt-6",children:e.jsx("div",{className:"overflow-x-auto rounded-[18px] border border-border/70 bg-card",children:e.jsxs("div",{className:"min-w-[520px]",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-3 border-b border-border bg-muted/50 px-4 py-3 text-sm font-bold sm:px-6",children:[e.jsx("span",{children:"What you asked for"}),e.jsx("span",{children:f[0].fullName}),e.jsx("span",{children:f[1].fullName})]}),[["Provider type",f[0].skills[0]||"Provider",f[1].skills[0]||"Provider"],["Languages",f[0].spokenLanguages.join(", ")||"Ask provider",f[1].spokenLanguages.join(", ")||"Ask provider"],["Experience",f[0].yearsOfExperience||"Ask provider",f[1].yearsOfExperience||"Ask provider"],["Format",n.format==="either"?"In person or virtual":n.format,n.format==="either"?"In person or virtual":n.format]].map(d=>e.jsxs("div",{className:"grid grid-cols-3 gap-3 border-b border-border px-4 py-3 text-sm last:border-b-0 sm:px-6",children:[e.jsx("strong",{children:d[0]}),e.jsx("span",{children:d[1]}),e.jsx("span",{children:d[2]})]},d[0]))]})})}),e.jsx(ur,{providers:f,summary:`Both offer ${Ae[n.service]} and align with your preference for ${n.format==="either"?"flexible ways to meet":n.format+" support"}.`}),e.jsx(xr,{href:G}),e.jsx(E,{className:"mt-8",children:e.jsxs("div",{className:"flex flex-col justify-between gap-3 border-t border-border pt-6 sm:flex-row",children:[e.jsxs("button",{onClick:()=>W(le.length),className:"inline-flex min-h-11 items-center gap-2 text-sm font-bold text-muted-foreground hover:text-primary",children:[e.jsx(Te,{className:"h-4 w-4"})," Back to preferences"]}),e.jsxs("button",{onClick:U,className:"inline-flex min-h-11 items-center gap-2 text-sm font-bold text-muted-foreground hover:text-primary",children:["Start over ",e.jsx(he,{className:"h-4 w-4"})]})]})})]})})]}),e.jsx(tt,{})]})};export{ks as default};

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.