//#region src/svg/helpers.ts
/** Returns an object with given element's HTML attributes. */
function getAttributes(element) {
	if (!element) return {};
	return Array.from(element.attributes).reduce((props, attr) => {
		const { name, value } = attr;
		props[name] = value;
		return props;
	}, {});
}
/** Returns content of the SVG HTML string by stripping the svg tag. */
function getSvgContent(html = "") {
	return html.replace(/(<\/?svg(?:.|\n)*?>)|(\r\n|\n|\r)/gm, "");
}
/** Returns object with initial state values. */
function initState() {
	return {
		content: "",
		svgAttributes: {}
	};
}
/** Returns given HTML string as an HTML element. */
function stringToHTML(html) {
	const container = document.createElement("div");
	container.innerHTML = html;
	return container.firstElementChild;
}

//#endregion
export { getAttributes, getSvgContent, initState, stringToHTML };
globalThis.__vuiVersion__ = "4.0.0"
//# sourceMappingURL=helpers.js.map