@anoki/fse-ui
Version:
FSE UI components library
38 lines (37 loc) • 1.43 kB
JavaScript
import { __exports as e } from "./index.es770.js";
import { __require as c } from "./index.es679.js";
import { __require as h } from "./index.es771.js";
import { __require as y } from "./index.es681.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=index.es720.js.map