// @bun
var{defineProperty:B,getOwnPropertyNames:Q,getOwnPropertyDescriptor:R}=Object,T=Object.prototype.hasOwnProperty;function U(j){return this[j]}var Z=(j)=>{var w=(G??=new WeakMap).get(j),A;if(w)return w;if(w=B({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var z of Q(j))if(!T.call(w,z))B(w,z,{get:U.bind(j,z),enumerable:!(A=R(j,z))||A.enumerable})}return G.set(j,w),w},G;var V=(j)=>j;function W(j,w){this[j]=V.bind(null,w)}var _=(j,w)=>{for(var A in w)B(j,A,{get:w[A],enumerable:!0,configurable:!0,set:W.bind(w,A)})};var X=(j,w)=>()=>(j&&(w=j(j=0)),w);var $=import.meta.require;function H(j,...w){for(let A of w){if(j.serverDynamic[A]!==void 0)return String(j.serverDynamic[A]);let z=j.static[A];if(typeof z==="string")return z}return}function I(j,w){let A=new RegExp(`<(template|div|span)[^>]*\\bslot=["']${w}["'][^>]*>([\\s\\S]*?)<\\/\\1>`,"i"),z=j.match(A);if(!z)return{region:null,rest:j};return{region:z[2],rest:j.replace(z[0],"")}}var q;var Y=X(()=>{q={name:"Suspense",aliases:["suspense"],render(j,w,A){let z=I(w,"fallback"),J=z.rest,E=I(J,"error"),K=E.rest,L=z.region??H(j,"fallback")??'<div class="stx-suspense-loading">Loading\u2026</div>',N=E.region??H(j,"errorFallback","error-fallback")??'<div class="stx-suspense-error">Something went wrong.</div>';return`<div data-stx-suspense><div data-stx-suspense-fallback>${L}</div><div data-stx-suspense-error hidden>${N}</div><div data-stx-suspense-content hidden>${K}</div></div>`}}});Y();export{q as SuspenseBuiltin};
