import{r as o}from"./index.CaZlGE7t.js";import{r as b}from"./index.CCkGd1JC.js";var s={},E;function g(){if(E)return s;E=1;var t=b();return s.createRoot=t.createRoot,s.hydrateRoot=t.hydrateRoot,s}var p=g();const v=({value:t,name:e,hydrate:r=!0})=>{if(!t)return null;const a=r?"astro-slot":"astro-static-slot";return o.createElement(a,{name:e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}})};v.shouldComponentUpdate=()=>!1;var N=v;function C(t){for(const e in t)if(e.startsWith("__reactContainer"))return e}function R(t){let e={};for(const r of t.attributes)e[r.name]=r.value;return t.firstChild===null?o.createElement(t.localName,e):o.createElement(t.localName,e,Array.from(t.childNodes).map(r=>r.nodeType===Node.TEXT_NODE?r.data:r.nodeType===Node.ELEMENT_NODE?R(r):void 0).filter(r=>!!r))}function O(t,e){if(e&&t){let r=[],a=document.createElement("template");a.innerHTML=t;for(let u of a.content.children)r.push(R(u));return r}else return t?o.createElement(N,{value:t}):void 0}let y=new WeakMap;const h=(t,e)=>{let r=y.get(t);return r||(r=e(),y.set(t,r)),r};var H=t=>(e,r,{default:a,...u},{client:A})=>{if(!t.hasAttribute("ssr"))return;const d=t.getAttribute("data-action-key"),l=t.getAttribute("data-action-name"),f=t.getAttribute("data-action-result"),T=d&&l&&f?[JSON.parse(f),d,l]:void 0,_={identifierPrefix:t.getAttribute("prefix"),formState:T};for(const[i,n]of Object.entries(u))r[i]=o.createElement(N,{value:n,name:i});const c=o.createElement(e,r,O(a,t.hasAttribute("data-react-children"))),m=C(t);if(m&&delete t[m],A==="only")return o.startTransition(()=>{h(t,()=>{const n=p.createRoot(t);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(c)});o.startTransition(()=>{h(t,()=>{const n=p.hydrateRoot(t,c,_);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(c)})};export{H as default};
