import { __exports as e } from "../../../../../../_virtual/stringify.js";
import { __require as c } from "../../../../domhandler@5.0.3/node_modules/domhandler/lib/index.js";
import { __require as h } from "../../../../dom-serializer@2.0.0/node_modules/dom-serializer/lib/index.js";
import { __require as y } from "../../../../domelementtype@2.3.0/node_modules/domelementtype/lib/index.js";
var s;
function o() {
  if (s) return e;
  s = 1;
  var _ = e && e.__importDefault || function(r) {
    return r && r.__esModule ? r : { default: r };
  };
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getOuterHTML = f, e.getInnerHTML = p, e.getText = i, e.textContent = n, e.innerText = u;
  var t = /* @__PURE__ */ c(), l = _(/* @__PURE__ */ h()), m = /* @__PURE__ */ y();
  function f(r, a) {
    return (0, l.default)(r, a);
  }
  function p(r, a) {
    return (0, t.hasChildren)(r) ? r.children.map(function(T) {
      return f(T, a);
    }).join("") : "";
  }
  function i(r) {
    return Array.isArray(r) ? r.map(i).join("") : (0, t.isTag)(r) ? r.name === "br" ? `
` : i(r.children) : (0, t.isCDATA)(r) ? i(r.children) : (0, t.isText)(r) ? r.data : "";
  }
  function n(r) {
    return Array.isArray(r) ? r.map(n).join("") : (0, t.hasChildren)(r) && !(0, t.isComment)(r) ? n(r.children) : (0, t.isText)(r) ? r.data : "";
  }
  function u(r) {
    return Array.isArray(r) ? r.map(u).join("") : (0, t.hasChildren)(r) && (r.type === m.ElementType.Tag || (0, t.isCDATA)(r)) ? u(r.children) : (0, t.isText)(r) ? r.data : "";
  }
  return e;
}
export {
  o as __require
};
//# sourceMappingURL=stringify.js.map
