import decompose_default, { identity } from "./decompose.js";
var svgNode;
function parseCss(r) {
	let i = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(r + "");
	return i.isIdentity ? identity : decompose_default(i.a, i.b, i.c, i.d, i.e, i.f);
}
function parseSvg(i) {
	return i == null || (svgNode ||= document.createElementNS("http://www.w3.org/2000/svg", "g"), svgNode.setAttribute("transform", i), !(i = svgNode.transform.baseVal.consolidate())) ? identity : (i = i.matrix, decompose_default(i.a, i.b, i.c, i.d, i.e, i.f));
}
export { parseCss, parseSvg };
