import { y as u, h as d, a as _, a6 as y, bz as g, a5 as h, a7 as p, aG as b, aN as w, aH as N, s as O, ax as t } from "./index-BBXAtvZr.js";
import { y as m, z as R } from "./AssetItem-BxjLUzNd.js";
function C(c, v, i = !1, o = !1, E = !1) {
  var l = c, s = "";
  u(() => {
    var f = (
      /** @type {Effect} */
      y
    );
    if (s === (s = v() ?? "")) {
      d && _();
      return;
    }
    if (f.nodes !== null && (g(
      f.nodes.start,
      /** @type {TemplateNode} */
      f.nodes.end
    ), f.nodes = null), s !== "") {
      if (d) {
        h.data;
        for (var a = _(), n = a; a !== null && (a.nodeType !== p || /** @type {Comment} */
        a.data !== ""); )
          n = a, a = b(a);
        if (a === null)
          throw w(), N;
        m(h, n), l = O(a);
        return;
      }
      var r = s + "";
      i ? r = `<svg>${r}</svg>` : o && (r = `<math>${r}</math>`);
      var e = R(r);
      if ((i || o) && (e = /** @type {Element} */
      t(e)), m(
        /** @type {TemplateNode} */
        t(e),
        /** @type {TemplateNode} */
        e.lastChild
      ), i || o)
        for (; t(e); )
          l.before(
            /** @type {TemplateNode} */
            t(e)
          );
      else
        l.before(e);
    }
  });
}
export {
  C as h
};
//# sourceMappingURL=html-BVy6qQOC.js.map
