import{W as w,a7 as T,aL as x,b6 as E,G,d as L,S as O}from"./B630xGby.js";function n(r,a){return r===a||(r==null?void 0:r[O])===a}function A(r={},a,i,Y){var p=w.r,S=G;return T(()=>{var f,t;return x(()=>{f=t,t=[],E(()=>{n(i(...t),r)||(a(r,...t),f&&n(i(...f),r)&&a(null,...f))})}),()=>{let s=S;for(;s!==p&&s.parent!==null&&s.parent.f&L;)s=s.parent;const h=()=>{t&&n(i(...t),r)&&a(null,...t)},c=s.teardown;s.teardown=()=>{h(),c==null||c()}}}),r}export{A as b};
