import{v as d,A as n,R as p,ay as u,az as c}from"./qex-fw8l.js";function y(a,r,e){d(()=>{var t=n(()=>r(a,e?.())||{});if(e&&t?.update){var f=!1,s={};p(()=>{var o=e();u(o),f&&c(s,o)&&(s=o,t.update(o))}),f=!0}if(t?.destroy)return()=>t.destroy()})}function l(a,r=document.body){const e=typeof r=="string"?document.querySelector(r):r;return e&&e.appendChild(a),{destroy(){a.parentNode&&a.parentNode.removeChild(a)}}}export{y as a,l as p};
