import { a as __toESM, i as __require, t as __commonJSMin } from "./rolldown-runtime-5mvAOt7F.mjs";
import { i as init_esm_shims, n as __dirname, r as __filename, t as require_typescript } from "./typescript-DqXqqY-f.mjs";
import { t as require_lib } from "./lib-DDLcvVQg.mjs";
//#region ../node_modules/@svgr/core/node_modules/camelcase/index.js
var require_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const UPPERCASE = /[\p{Lu}]/u;
	const LOWERCASE = /[\p{Ll}]/u;
	const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
	const IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
	const SEPARATORS = /[_.\- ]+/;
	const LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
	const SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
	const NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
	const preserveCamelCase = (string, toLowerCase, toUpperCase) => {
		let isLastCharLower = false;
		let isLastCharUpper = false;
		let isLastLastCharUpper = false;
		for (let i = 0; i < string.length; i++) {
			const character = string[i];
			if (isLastCharLower && UPPERCASE.test(character)) {
				string = string.slice(0, i) + "-" + string.slice(i);
				isLastCharLower = false;
				isLastLastCharUpper = isLastCharUpper;
				isLastCharUpper = true;
				i++;
			} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
				string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
				isLastLastCharUpper = isLastCharUpper;
				isLastCharUpper = false;
				isLastCharLower = true;
			} else {
				isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
				isLastLastCharUpper = isLastCharUpper;
				isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
			}
		}
		return string;
	};
	const preserveConsecutiveUppercase = (input, toLowerCase) => {
		LEADING_CAPITAL.lastIndex = 0;
		return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
	};
	const postProcess = (input, toUpperCase) => {
		SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
		NUMBERS_AND_IDENTIFIER.lastIndex = 0;
		return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
	};
	const camelCase = (input, options) => {
		if (!(typeof input === "string" || Array.isArray(input))) throw new TypeError("Expected the input to be `string | string[]`");
		options = {
			pascalCase: false,
			preserveConsecutiveUppercase: false,
			...options
		};
		if (Array.isArray(input)) input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
		else input = input.trim();
		if (input.length === 0) return "";
		const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
		const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
		if (input.length === 1) return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
		if (input !== toLowerCase(input)) input = preserveCamelCase(input, toLowerCase, toUpperCase);
		input = input.replace(LEADING_SEPARATORS, "");
		if (options.preserveConsecutiveUppercase) input = preserveConsecutiveUppercase(input, toLowerCase);
		else input = toLowerCase(input);
		if (options.pascalCase) input = toUpperCase(input.charAt(0)) + input.slice(1);
		return postProcess(input, toUpperCase);
	};
	module.exports = camelCase;
	module.exports.default = camelCase;
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/types.js
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
}));
//#endregion
//#region ../node_modules/path-type/index.js
var require_path_type = /* @__PURE__ */ __commonJSMin(((exports) => {
	const { promisify } = __require("util");
	const fs$1 = __require("fs");
	async function isType(fsStatType, statsMethodName, filePath) {
		if (typeof filePath !== "string") throw new TypeError(`Expected a string, got ${typeof filePath}`);
		try {
			return (await promisify(fs$1[fsStatType])(filePath))[statsMethodName]();
		} catch (error) {
			if (error.code === "ENOENT") return false;
			throw error;
		}
	}
	function isTypeSync(fsStatType, statsMethodName, filePath) {
		if (typeof filePath !== "string") throw new TypeError(`Expected a string, got ${typeof filePath}`);
		try {
			return fs$1[fsStatType](filePath)[statsMethodName]();
		} catch (error) {
			if (error.code === "ENOENT") return false;
			throw error;
		}
	}
	exports.isFile = isType.bind(null, "stat", "isFile");
	exports.isDirectory = isType.bind(null, "stat", "isDirectory");
	exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink");
	exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile");
	exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory");
	exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink");
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/util.js
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.removeUndefinedValuesFromObject = exports.getPropertyByPath = exports.emplace = void 0;
	/**
	* @internal
	*/
	function emplace(map, key, fn) {
		const cached = map.get(key);
		if (cached !== void 0) return cached;
		const result = fn();
		map.set(key, result);
		return result;
	}
	exports.emplace = emplace;
	/**
	* @internal
	*/
	function getPropertyByPath(source, path) {
		if (typeof path === "string" && Object.prototype.hasOwnProperty.call(source, path)) return source[path];
		return (typeof path === "string" ? path.split(".") : path).reduce((previous, key) => {
			if (previous === void 0) return previous;
			return previous[key];
		}, source);
	}
	exports.getPropertyByPath = getPropertyByPath;
	/** @internal */
	function removeUndefinedValuesFromObject(options) {
		/* istanbul ignore if -- @preserve */
		if (!options) return;
		return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== void 0));
	}
	exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/ExplorerBase.js
var require_ExplorerBase = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.getExtensionDescription = exports.ExplorerBase = void 0;
	const path_1$3 = __importDefault(__require("path"));
	const util_js_1 = require_util();
	/**
	* @internal
	*/
	var ExplorerBase = class {
		#loadingMetaConfig = false;
		config;
		loadCache;
		searchCache;
		constructor(options) {
			this.config = options;
			if (options.cache) {
				this.loadCache = /* @__PURE__ */ new Map();
				this.searchCache = /* @__PURE__ */ new Map();
			}
			this.#validateConfig();
		}
		set loadingMetaConfig(value) {
			this.#loadingMetaConfig = value;
		}
		#validateConfig() {
			const config = this.config;
			for (const place of config.searchPlaces) {
				const extension = path_1$3.default.extname(place);
				const loader = this.config.loaders[extension || "noExt"] ?? this.config.loaders["default"];
				if (loader === void 0) throw new Error(`Missing loader for ${getExtensionDescription(place)}.`);
				if (typeof loader !== "function") throw new Error(`Loader for ${getExtensionDescription(place)} is not a function: Received ${typeof loader}.`);
			}
		}
		clearLoadCache() {
			if (this.loadCache) this.loadCache.clear();
		}
		clearSearchCache() {
			if (this.searchCache) this.searchCache.clear();
		}
		clearCaches() {
			this.clearLoadCache();
			this.clearSearchCache();
		}
		toCosmiconfigResult(filepath, config) {
			if (config === null) return null;
			if (config === void 0) return {
				filepath,
				config: void 0,
				isEmpty: true
			};
			if (this.config.applyPackagePropertyPathToConfiguration || this.#loadingMetaConfig) config = (0, util_js_1.getPropertyByPath)(config, this.config.packageProp);
			if (config === void 0) return {
				filepath,
				config: void 0,
				isEmpty: true
			};
			return {
				config,
				filepath
			};
		}
	};
	exports.ExplorerBase = ExplorerBase;
	/**
	* @internal
	*/
	function getExtensionDescription(extension) {
		/* istanbul ignore next -- @preserve */
		return extension ? `extension "${extension}"` : "files without extensions";
	}
	exports.getExtensionDescription = getExtensionDescription;
}));
//#endregion
//#region ../node_modules/import-fresh/node_modules/resolve-from/index.js
var require_resolve_from = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const path$2 = __require("path");
	const Module = __require("module");
	const fs = __require("fs");
	const resolveFrom = (fromDir, moduleId, silent) => {
		if (typeof fromDir !== "string") throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
		if (typeof moduleId !== "string") throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
		try {
			fromDir = fs.realpathSync(fromDir);
		} catch (err) {
			if (err.code === "ENOENT") fromDir = path$2.resolve(fromDir);
			else if (silent) return null;
			else throw err;
		}
		const fromFile = path$2.join(fromDir, "noop.js");
		const resolveFileName = () => Module._resolveFilename(moduleId, {
			id: fromFile,
			filename: fromFile,
			paths: Module._nodeModulePaths(fromDir)
		});
		if (silent) try {
			return resolveFileName();
		} catch (err) {
			return null;
		}
		return resolveFileName();
	};
	module.exports = (fromDir, moduleId) => resolveFrom(fromDir, moduleId);
	module.exports.silent = (fromDir, moduleId) => resolveFrom(fromDir, moduleId, true);
}));
//#endregion
//#region ../node_modules/callsites/index.js
var require_callsites = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const callsites = () => {
		const _prepareStackTrace = Error.prepareStackTrace;
		Error.prepareStackTrace = (_, stack) => stack;
		const stack = (/* @__PURE__ */ new Error()).stack.slice(1);
		Error.prepareStackTrace = _prepareStackTrace;
		return stack;
	};
	module.exports = callsites;
	module.exports.default = callsites;
}));
//#endregion
//#region ../node_modules/parent-module/index.js
var require_parent_module = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const callsites = require_callsites();
	module.exports = (filepath) => {
		const stacks = callsites();
		if (!filepath) return stacks[2].getFileName();
		let seenVal = false;
		stacks.shift();
		for (const stack of stacks) {
			const parentFilepath = stack.getFileName();
			if (typeof parentFilepath !== "string") continue;
			if (parentFilepath === filepath) {
				seenVal = true;
				continue;
			}
			if (parentFilepath === "module.js") continue;
			if (seenVal && parentFilepath !== filepath) return parentFilepath;
		}
	};
}));
//#endregion
//#region ../node_modules/import-fresh/index.js
var require_import_fresh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	init_esm_shims();
	const path$1 = __require("path");
	const resolveFrom = require_resolve_from();
	const parentModule = require_parent_module();
	module.exports = (moduleId) => {
		if (typeof moduleId !== "string") throw new TypeError("Expected a string");
		const parentPath = parentModule(__filename);
		const filePath = resolveFrom(parentPath ? path$1.dirname(parentPath) : __dirname, moduleId);
		const oldModule = __require.cache[filePath];
		if (oldModule && oldModule.parent) {
			let i = oldModule.parent.children.length;
			while (i--) if (oldModule.parent.children[i].id === filePath) oldModule.parent.children.splice(i, 1);
		}
		delete __require.cache[filePath];
		const parent = __require.cache[parentPath];
		return parent === void 0 || parent.require === void 0 ? __require(filePath) : parent.require(filePath);
	};
}));
//#endregion
//#region ../node_modules/error-ex/node_modules/is-arrayish/index.js
var require_is_arrayish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = function isArrayish(obj) {
		if (!obj) return false;
		return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function;
	};
}));
//#endregion
//#region ../node_modules/error-ex/index.js
var require_error_ex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	var util = __require("util");
	var isArrayish = require_is_arrayish();
	var errorEx = function errorEx(name, properties) {
		if (!name || name.constructor !== String) {
			properties = name || {};
			name = Error.name;
		}
		var errorExError = function ErrorEXError(message) {
			if (!this) return new ErrorEXError(message);
			message = message instanceof Error ? message.message : message || this.message;
			Error.call(this, message);
			Error.captureStackTrace(this, errorExError);
			this.name = name;
			Object.defineProperty(this, "message", {
				configurable: true,
				enumerable: false,
				get: function() {
					var newMessage = message.split(/\r?\n/g);
					for (var key in properties) {
						if (!properties.hasOwnProperty(key)) continue;
						var modifier = properties[key];
						if ("message" in modifier) {
							newMessage = modifier.message(this[key], newMessage) || newMessage;
							if (!isArrayish(newMessage)) newMessage = [newMessage];
						}
					}
					return newMessage.join("\n");
				},
				set: function(v) {
					message = v;
				}
			});
			var overwrittenStack = null;
			var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack");
			var stackGetter = stackDescriptor.get;
			var stackValue = stackDescriptor.value;
			delete stackDescriptor.value;
			delete stackDescriptor.writable;
			stackDescriptor.set = function(newstack) {
				overwrittenStack = newstack;
			};
			stackDescriptor.get = function() {
				var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g);
				if (!overwrittenStack) stack[0] = this.name + ": " + this.message;
				var lineCount = 1;
				for (var key in properties) {
					if (!properties.hasOwnProperty(key)) continue;
					var modifier = properties[key];
					if ("line" in modifier) {
						var line = modifier.line(this[key]);
						if (line) stack.splice(lineCount++, 0, "    " + line);
					}
					if ("stack" in modifier) modifier.stack(this[key], stack);
				}
				return stack.join("\n");
			};
			Object.defineProperty(this, "stack", stackDescriptor);
		};
		if (Object.setPrototypeOf) {
			Object.setPrototypeOf(errorExError.prototype, Error.prototype);
			Object.setPrototypeOf(errorExError, Error);
		} else util.inherits(errorExError, Error);
		return errorExError;
	};
	errorEx.append = function(str, def) {
		return { message: function(v, message) {
			v = v || def;
			if (v) message[0] += " " + str.replace("%s", v.toString());
			return message;
		} };
	};
	errorEx.line = function(str, def) {
		return { line: function(v) {
			v = v || def;
			if (v) return str.replace("%s", v.toString());
			return null;
		} };
	};
	module.exports = errorEx;
}));
//#endregion
//#region ../node_modules/json-parse-even-better-errors/index.js
var require_json_parse_even_better_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const hexify = (char) => {
		const h = char.charCodeAt(0).toString(16).toUpperCase();
		return "0x" + (h.length % 2 ? "0" : "") + h;
	};
	const parseError = (e, txt, context) => {
		if (!txt) return {
			message: e.message + " while parsing empty string",
			position: 0
		};
		const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
		const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
		const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message;
		if (errIdx !== null && errIdx !== void 0) {
			const start = errIdx <= context ? 0 : errIdx - context;
			const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
			const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "...");
			return {
				message: msg + ` while parsing ${txt === slice ? "" : "near "}${JSON.stringify(slice)}`,
				position: errIdx
			};
		} else return {
			message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
			position: 0
		};
	};
	var JSONParseError = class extends SyntaxError {
		constructor(er, txt, context, caller) {
			context = context || 20;
			const metadata = parseError(er, txt, context);
			super(metadata.message);
			Object.assign(this, metadata);
			this.code = "EJSONPARSE";
			this.systemError = er;
			Error.captureStackTrace(this, caller || this.constructor);
		}
		get name() {
			return this.constructor.name;
		}
		set name(n) {}
		get [Symbol.toStringTag]() {
			return this.constructor.name;
		}
	};
	const kIndent = Symbol.for("indent");
	const kNewline = Symbol.for("newline");
	const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
	const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
	const parseJson = (txt, reviver, context) => {
		const parseText = stripBOM(txt);
		context = context || 20;
		try {
			const [, newline = "\n", indent = "  "] = parseText.match(emptyRE) || parseText.match(formatRE) || [
				,
				"",
				""
			];
			const result = JSON.parse(parseText, reviver);
			if (result && typeof result === "object") {
				result[kNewline] = newline;
				result[kIndent] = indent;
			}
			return result;
		} catch (e) {
			if (typeof txt !== "string" && !Buffer.isBuffer(txt)) {
				const isEmptyArray = Array.isArray(txt) && txt.length === 0;
				throw Object.assign(/* @__PURE__ */ new TypeError(`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`), {
					code: "EJSONPARSE",
					systemError: e
				});
			}
			throw new JSONParseError(e, parseText, context, parseJson);
		}
	};
	const stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
	module.exports = parseJson;
	parseJson.JSONParseError = JSONParseError;
	parseJson.noExceptions = (txt, reviver) => {
		try {
			return JSON.parse(stripBOM(txt), reviver);
		} catch (e) {}
	};
}));
//#endregion
//#region ../node_modules/lines-and-columns/build/index.js
var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
	exports.__esModule = true;
	exports.LinesAndColumns = void 0;
	var LF = "\n";
	var CR = "\r";
	var LinesAndColumns = function() {
		function LinesAndColumns(string) {
			this.string = string;
			var offsets = [0];
			for (var offset = 0; offset < string.length;) switch (string[offset]) {
				case LF:
					offset += LF.length;
					offsets.push(offset);
					break;
				case CR:
					offset += CR.length;
					if (string[offset] === LF) offset += LF.length;
					offsets.push(offset);
					break;
				default:
					offset++;
					break;
			}
			this.offsets = offsets;
		}
		LinesAndColumns.prototype.locationForIndex = function(index) {
			if (index < 0 || index > this.string.length) return null;
			var line = 0;
			var offsets = this.offsets;
			while (offsets[line + 1] <= index) line++;
			var column = index - offsets[line];
			return {
				line,
				column
			};
		};
		LinesAndColumns.prototype.indexForLocation = function(location) {
			var line = location.line, column = location.column;
			if (line < 0 || line >= this.offsets.length) return null;
			if (column < 0 || column > this.lengthOfLine(line)) return null;
			return this.offsets[line] + column;
		};
		LinesAndColumns.prototype.lengthOfLine = function(line) {
			var offset = this.offsets[line];
			return (line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]) - offset;
		};
		return LinesAndColumns;
	}();
	exports.LinesAndColumns = LinesAndColumns;
	exports["default"] = LinesAndColumns;
}));
//#endregion
//#region ../node_modules/cosmiconfig/node_modules/parse-json/index.js
var require_parse_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const errorEx = require_error_ex();
	const fallback = require_json_parse_even_better_errors();
	const { default: LinesAndColumns } = require_build();
	const { codeFrameColumns } = require_lib();
	const JSONError = errorEx("JSONError", {
		fileName: errorEx.append("in %s"),
		codeFrame: errorEx.append("\n\n%s\n")
	});
	const parseJson = (string, reviver, filename) => {
		if (typeof reviver === "string") {
			filename = reviver;
			reviver = null;
		}
		try {
			try {
				return JSON.parse(string, reviver);
			} catch (error) {
				fallback(string, reviver);
				throw error;
			}
		} catch (error) {
			error.message = error.message.replace(/\n/g, "");
			const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
			const jsonError = new JSONError(error);
			if (filename) jsonError.fileName = filename;
			if (indexMatch && indexMatch.length > 0) {
				const lines = new LinesAndColumns(string);
				const index = Number(indexMatch[1]);
				const location = lines.locationForIndex(index);
				jsonError.codeFrame = codeFrameColumns(string, { start: {
					line: location.line + 1,
					column: location.column + 1
				} }, { highlightCode: true });
			}
			throw jsonError;
		}
	};
	parseJson.JSONError = JSONError;
	module.exports = parseJson;
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/loaders.js
var require_loaders = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.loadTs = exports.loadTsSync = exports.loadYaml = exports.loadJson = exports.loadJs = exports.loadJsSync = void 0;
	const fs_1$1 = __require("fs");
	const promises_1$1 = __require("fs/promises");
	const path_1$2 = __importDefault(__require("path"));
	const url_1 = __require("url");
	let importFresh;
	exports.loadJsSync = function loadJsSync(filepath) {
		if (importFresh === void 0) importFresh = require_import_fresh();
		return importFresh(filepath);
	};
	exports.loadJs = async function loadJs(filepath) {
		try {
			const { href } = (0, url_1.pathToFileURL)(filepath);
			return (await import(href)).default;
		} catch (error) {
			return (0, exports.loadJsSync)(filepath, "");
		}
	};
	let parseJson;
	exports.loadJson = function loadJson(filepath, content) {
		if (parseJson === void 0) parseJson = require_parse_json();
		try {
			return parseJson(content);
		} catch (error) {
			error.message = `JSON Error in ${filepath}:\n${error.message}`;
			throw error;
		}
	};
	let yaml;
	exports.loadYaml = function loadYaml(filepath, content) {
		if (yaml === void 0) yaml = __require("js-yaml");
		try {
			return yaml.load(content);
		} catch (error) {
			error.message = `YAML Error in ${filepath}:\n${error.message}`;
			throw error;
		}
	};
	let typescript;
	exports.loadTsSync = function loadTsSync(filepath, content) {
		/* istanbul ignore next -- @preserve */
		if (typescript === void 0) typescript = require_typescript();
		const compiledFilepath = `${filepath.slice(0, -2)}cjs`;
		try {
			const config = resolveTsConfig(path_1$2.default.dirname(filepath)) ?? {};
			config.compilerOptions = {
				...config.compilerOptions,
				module: typescript.ModuleKind.NodeNext,
				moduleResolution: typescript.ModuleResolutionKind.NodeNext,
				target: typescript.ScriptTarget.ES2022,
				noEmit: false
			};
			content = typescript.transpileModule(content, config).outputText;
			(0, fs_1$1.writeFileSync)(compiledFilepath, content);
			return (0, exports.loadJsSync)(compiledFilepath, content).default;
		} catch (error) {
			error.message = `TypeScript Error in ${filepath}:\n${error.message}`;
			throw error;
		} finally {
			if ((0, fs_1$1.existsSync)(compiledFilepath)) (0, fs_1$1.rmSync)(compiledFilepath);
		}
	};
	exports.loadTs = async function loadTs(filepath, content) {
		if (typescript === void 0) typescript = (await import("./typescript-DqXqqY-f.mjs").then((n) => /* @__PURE__ */ __toESM(n.t()))).default;
		const compiledFilepath = `${filepath.slice(0, -2)}mjs`;
		try {
			const config = resolveTsConfig(path_1$2.default.dirname(filepath)) ?? {};
			config.compilerOptions = {
				...config.compilerOptions,
				module: typescript.ModuleKind.ES2022,
				moduleResolution: typescript.ModuleResolutionKind.Bundler,
				target: typescript.ScriptTarget.ES2022,
				noEmit: false
			};
			content = typescript.transpileModule(content, config).outputText;
			await (0, promises_1$1.writeFile)(compiledFilepath, content);
			const { href } = (0, url_1.pathToFileURL)(compiledFilepath);
			return (await import(href)).default;
		} catch (error) {
			error.message = `TypeScript Error in ${filepath}:\n${error.message}`;
			throw error;
		} finally {
			if ((0, fs_1$1.existsSync)(compiledFilepath)) await (0, promises_1$1.rm)(compiledFilepath);
		}
	};
	function resolveTsConfig(directory) {
		const filePath = typescript.findConfigFile(directory, (fileName) => {
			return typescript.sys.fileExists(fileName);
		});
		if (filePath !== void 0) {
			const { config, error } = typescript.readConfigFile(filePath, (path) => typescript.sys.readFile(path));
			if (error) throw new Error(`Error in ${filePath}: ${error.messageText.toString()}`);
			return config;
		}
	}
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/Explorer.js
var require_Explorer = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.Explorer = void 0;
	const promises_1 = __importDefault(__require("fs/promises"));
	const path_1$1 = __importDefault(__require("path"));
	const path_type_1 = require_path_type();
	const ExplorerBase_js_1 = require_ExplorerBase();
	const loaders_js_1 = require_loaders();
	const util_js_1 = require_util();
	/**
	* @internal
	*/
	var Explorer = class extends ExplorerBase_js_1.ExplorerBase {
		async load(filepath) {
			filepath = path_1$1.default.resolve(filepath);
			const load = async () => {
				return await this.config.transform(await this.#readConfiguration(filepath));
			};
			if (this.loadCache) return await (0, util_js_1.emplace)(this.loadCache, filepath, load);
			return await load();
		}
		async search(from = "") {
			if (this.config.metaConfigFilePath) {
				this.loadingMetaConfig = true;
				const config = await this.load(this.config.metaConfigFilePath);
				this.loadingMetaConfig = false;
				if (config && !config.isEmpty) return config;
			}
			const stopDir = path_1$1.default.resolve(this.config.stopDir);
			from = path_1$1.default.resolve(from);
			const search = async () => {
				/* istanbul ignore if -- @preserve */
				if (await (0, path_type_1.isDirectory)(from)) for (const place of this.config.searchPlaces) {
					const filepath = path_1$1.default.join(from, place);
					try {
						const result = await this.#readConfiguration(filepath);
						if (result !== null && !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) return await this.config.transform(result);
					} catch (error) {
						if (error.code === "ENOENT" || error.code === "EISDIR" || error.code === "ENOTDIR") continue;
						throw error;
					}
				}
				const dir = path_1$1.default.dirname(from);
				if (from !== stopDir && from !== dir) {
					from = dir;
					if (this.searchCache) return await (0, util_js_1.emplace)(this.searchCache, from, search);
					return await search();
				}
				return await this.config.transform(null);
			};
			if (this.searchCache) return await (0, util_js_1.emplace)(this.searchCache, from, search);
			return await search();
		}
		async #readConfiguration(filepath) {
			const contents = await promises_1.default.readFile(filepath, { encoding: "utf-8" });
			return this.toCosmiconfigResult(filepath, await this.#loadConfiguration(filepath, contents));
		}
		async #loadConfiguration(filepath, contents) {
			if (contents.trim() === "") return;
			if (path_1$1.default.basename(filepath) === "package.json") return (0, util_js_1.getPropertyByPath)((0, loaders_js_1.loadJson)(filepath, contents), this.config.packageProp) ?? null;
			const extension = path_1$1.default.extname(filepath);
			try {
				const loader = this.config.loaders[extension || "noExt"] ?? this.config.loaders["default"];
				if (loader !== void 0) return await loader(filepath, contents);
			} catch (error) {
				error.filepath = filepath;
				throw error;
			}
			throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`);
		}
	};
	exports.Explorer = Explorer;
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/ExplorerSync.js
var require_ExplorerSync = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ExplorerSync = void 0;
	const fs_1 = __importDefault(__require("fs"));
	const path_1 = __importDefault(__require("path"));
	const path_type_1 = require_path_type();
	const ExplorerBase_js_1 = require_ExplorerBase();
	const loaders_js_1 = require_loaders();
	const util_js_1 = require_util();
	/**
	* @internal
	*/
	var ExplorerSync = class extends ExplorerBase_js_1.ExplorerBase {
		load(filepath) {
			filepath = path_1.default.resolve(filepath);
			const load = () => {
				return this.config.transform(this.#readConfiguration(filepath));
			};
			if (this.loadCache) return (0, util_js_1.emplace)(this.loadCache, filepath, load);
			return load();
		}
		search(from = "") {
			if (this.config.metaConfigFilePath) {
				this.loadingMetaConfig = true;
				const config = this.load(this.config.metaConfigFilePath);
				this.loadingMetaConfig = false;
				if (config && !config.isEmpty) return config;
			}
			const stopDir = path_1.default.resolve(this.config.stopDir);
			from = path_1.default.resolve(from);
			const search = () => {
				/* istanbul ignore if -- @preserve */
				if ((0, path_type_1.isDirectorySync)(from)) for (const place of this.config.searchPlaces) {
					const filepath = path_1.default.join(from, place);
					try {
						const result = this.#readConfiguration(filepath);
						if (result !== null && !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) return this.config.transform(result);
					} catch (error) {
						if (error.code === "ENOENT" || error.code === "EISDIR" || error.code === "ENOTDIR") continue;
						throw error;
					}
				}
				const dir = path_1.default.dirname(from);
				if (from !== stopDir && from !== dir) {
					from = dir;
					if (this.searchCache) return (0, util_js_1.emplace)(this.searchCache, from, search);
					return search();
				}
				return this.config.transform(null);
			};
			if (this.searchCache) return (0, util_js_1.emplace)(this.searchCache, from, search);
			return search();
		}
		#readConfiguration(filepath) {
			const contents = fs_1.default.readFileSync(filepath, "utf8");
			return this.toCosmiconfigResult(filepath, this.#loadConfiguration(filepath, contents));
		}
		#loadConfiguration(filepath, contents) {
			if (contents.trim() === "") return;
			if (path_1.default.basename(filepath) === "package.json") return (0, util_js_1.getPropertyByPath)((0, loaders_js_1.loadJson)(filepath, contents), this.config.packageProp) ?? null;
			const extension = path_1.default.extname(filepath);
			try {
				const loader = this.config.loaders[extension || "noExt"] ?? this.config.loaders["default"];
				if (loader !== void 0) return loader(filepath, contents);
			} catch (error) {
				error.filepath = filepath;
				throw error;
			}
			throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`);
		}
		/**
		* @deprecated Use {@link ExplorerSync.prototype.load}.
		*/
		/* istanbul ignore next */
		loadSync(filepath) {
			return this.load(filepath);
		}
		/**
		* @deprecated Use {@link ExplorerSync.prototype.search}.
		*/
		/* istanbul ignore next */
		searchSync(from = "") {
			return this.search(from);
		}
	};
	exports.ExplorerSync = ExplorerSync;
}));
//#endregion
//#region ../node_modules/cosmiconfig/dist/index.js
var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
		for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
	};
	var __importDefault = exports && exports.__importDefault || function(mod) {
		return mod && mod.__esModule ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.cosmiconfigSync = exports.cosmiconfig = exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = void 0;
	__exportStar(require_types(), exports);
	const os_1 = __importDefault(__require("os"));
	const Explorer_js_1 = require_Explorer();
	const ExplorerSync_js_1 = require_ExplorerSync();
	const loaders_js_1 = require_loaders();
	const util_1 = require_util();
	exports.metaSearchPlaces = [
		"package.json",
		".config.json",
		".config.yaml",
		".config.yml",
		".config.js",
		".config.ts",
		".config.cjs",
		".config.mjs"
	];
	exports.defaultLoaders = Object.freeze({
		".mjs": loaders_js_1.loadJs,
		".cjs": loaders_js_1.loadJs,
		".js": loaders_js_1.loadJs,
		".ts": loaders_js_1.loadTs,
		".json": loaders_js_1.loadJson,
		".yaml": loaders_js_1.loadYaml,
		".yml": loaders_js_1.loadYaml,
		noExt: loaders_js_1.loadYaml
	});
	exports.defaultLoadersSync = Object.freeze({
		".cjs": loaders_js_1.loadJsSync,
		".js": loaders_js_1.loadJsSync,
		".ts": loaders_js_1.loadTsSync,
		".json": loaders_js_1.loadJson,
		".yaml": loaders_js_1.loadYaml,
		".yml": loaders_js_1.loadYaml,
		noExt: loaders_js_1.loadYaml
	});
	const identity = function identity(x) {
		return x;
	};
	function getInternalOptions(moduleName, options) {
		const metaConfig = new ExplorerSync_js_1.ExplorerSync({
			packageProp: "cosmiconfig",
			stopDir: process.cwd(),
			searchPlaces: exports.metaSearchPlaces,
			ignoreEmptySearchPlaces: false,
			applyPackagePropertyPathToConfiguration: true,
			loaders: exports.defaultLoaders,
			transform: identity,
			cache: true,
			metaConfigFilePath: null
		}).search();
		if (!metaConfig) return options;
		if (metaConfig.config?.loaders) throw new Error("Can not specify loaders in meta config file");
		const overrideOptions = metaConfig.config ?? {};
		if (overrideOptions.searchPlaces) overrideOptions.searchPlaces = overrideOptions.searchPlaces.map((path) => path.replace("{name}", moduleName));
		overrideOptions.metaConfigFilePath = metaConfig.filepath;
		return {
			...options,
			...(0, util_1.removeUndefinedValuesFromObject)(overrideOptions)
		};
	}
	function normalizeOptions(moduleName, options) {
		const defaults = {
			packageProp: moduleName,
			searchPlaces: [
				"package.json",
				`.${moduleName}rc`,
				`.${moduleName}rc.json`,
				`.${moduleName}rc.yaml`,
				`.${moduleName}rc.yml`,
				`.${moduleName}rc.js`,
				`.${moduleName}rc.ts`,
				`.${moduleName}rc.cjs`,
				`.${moduleName}rc.mjs`,
				`.config/${moduleName}rc`,
				`.config/${moduleName}rc.json`,
				`.config/${moduleName}rc.yaml`,
				`.config/${moduleName}rc.yml`,
				`.config/${moduleName}rc.js`,
				`.config/${moduleName}rc.ts`,
				`.config/${moduleName}rc.cjs`,
				`.config/${moduleName}rc.mjs`,
				`${moduleName}.config.js`,
				`${moduleName}.config.ts`,
				`${moduleName}.config.cjs`,
				`${moduleName}.config.mjs`
			],
			ignoreEmptySearchPlaces: true,
			stopDir: os_1.default.homedir(),
			cache: true,
			transform: identity,
			loaders: exports.defaultLoaders,
			metaConfigFilePath: null
		};
		return {
			...defaults,
			...(0, util_1.removeUndefinedValuesFromObject)(options),
			loaders: {
				...defaults.loaders,
				...options.loaders
			}
		};
	}
	function normalizeOptionsSync(moduleName, options) {
		const defaults = {
			packageProp: moduleName,
			searchPlaces: [
				"package.json",
				`.${moduleName}rc`,
				`.${moduleName}rc.json`,
				`.${moduleName}rc.yaml`,
				`.${moduleName}rc.yml`,
				`.${moduleName}rc.js`,
				`.${moduleName}rc.ts`,
				`.${moduleName}rc.cjs`,
				`.config/${moduleName}rc`,
				`.config/${moduleName}rc.json`,
				`.config/${moduleName}rc.yaml`,
				`.config/${moduleName}rc.yml`,
				`.config/${moduleName}rc.js`,
				`.config/${moduleName}rc.ts`,
				`.config/${moduleName}rc.cjs`,
				`${moduleName}.config.js`,
				`${moduleName}.config.ts`,
				`${moduleName}.config.cjs`
			],
			ignoreEmptySearchPlaces: true,
			stopDir: os_1.default.homedir(),
			cache: true,
			transform: identity,
			loaders: exports.defaultLoadersSync,
			metaConfigFilePath: null
		};
		return {
			...defaults,
			...(0, util_1.removeUndefinedValuesFromObject)(options),
			loaders: {
				...defaults.loaders,
				...options.loaders
			}
		};
	}
	function cosmiconfig(moduleName, options = {}) {
		const normalizedOptions = normalizeOptions(moduleName, getInternalOptions(moduleName, options));
		const explorer = new Explorer_js_1.Explorer(normalizedOptions);
		return {
			search: explorer.search.bind(explorer),
			load: explorer.load.bind(explorer),
			clearLoadCache: explorer.clearLoadCache.bind(explorer),
			clearSearchCache: explorer.clearSearchCache.bind(explorer),
			clearCaches: explorer.clearCaches.bind(explorer)
		};
	}
	exports.cosmiconfig = cosmiconfig;
	function cosmiconfigSync(moduleName, options = {}) {
		const normalizedOptions = normalizeOptionsSync(moduleName, getInternalOptions(moduleName, options));
		const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions);
		return {
			search: explorerSync.search.bind(explorerSync),
			load: explorerSync.load.bind(explorerSync),
			clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
			clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
			clearCaches: explorerSync.clearCaches.bind(explorerSync)
		};
	}
	exports.cosmiconfigSync = cosmiconfigSync;
}));
//#endregion
//#region ../node_modules/@svgr/core/dist/index.js
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
	var path = __require("path");
	var camelCase = require_camelcase();
	var cosmiconfig = require_dist$1();
	var __defProp$1 = Object.defineProperty;
	var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
	var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
	var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
	var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
		enumerable: true,
		configurable: true,
		writable: true,
		value
	}) : obj[key] = value;
	var __spreadValues$1 = (a, b) => {
		for (var prop in b || (b = {})) if (__hasOwnProp$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
		if (__getOwnPropSymbols$1) {
			for (var prop of __getOwnPropSymbols$1(b)) if (__propIsEnum$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
		}
		return a;
	};
	const VALID_CHAR_REGEX = /[^a-zA-Z0-9 _-]/g;
	const getComponentName = (filePath) => {
		if (!filePath) return "SvgComponent";
		return `Svg${camelCase(path.parse(filePath).name.replace(VALID_CHAR_REGEX, ""), { pascalCase: true })}`;
	};
	const expandState = (state) => {
		return __spreadValues$1({ componentName: state.componentName || getComponentName(state.filePath) }, state);
	};
	var __defProp = Object.defineProperty;
	var __getOwnPropSymbols = Object.getOwnPropertySymbols;
	var __hasOwnProp = Object.prototype.hasOwnProperty;
	var __propIsEnum = Object.prototype.propertyIsEnumerable;
	var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
		enumerable: true,
		configurable: true,
		writable: true,
		value
	}) : obj[key] = value;
	var __spreadValues = (a, b) => {
		for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
		if (__getOwnPropSymbols) {
			for (var prop of __getOwnPropSymbols(b)) if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
		}
		return a;
	};
	var __objRest = (source, exclude) => {
		var target = {};
		for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
		if (source != null && __getOwnPropSymbols) {
			for (var prop of __getOwnPropSymbols(source)) if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
		}
		return target;
	};
	const DEFAULT_CONFIG = {
		dimensions: true,
		expandProps: "end",
		icon: false,
		native: false,
		typescript: false,
		prettier: true,
		prettierConfig: void 0,
		memo: false,
		ref: false,
		replaceAttrValues: void 0,
		svgProps: void 0,
		svgo: true,
		svgoConfig: void 0,
		template: void 0,
		index: false,
		titleProp: false,
		descProp: false,
		runtimeConfig: true,
		namedExport: "ReactComponent",
		exportType: "default"
	};
	const explorer = cosmiconfig.cosmiconfig("svgr");
	const explorerSync = cosmiconfig.cosmiconfigSync("svgr");
	const resolveConfig = async (searchFrom, configFile) => {
		if (configFile == null) {
			const result2 = await explorer.search(searchFrom);
			return result2 ? result2.config : null;
		}
		const result = await explorer.load(configFile);
		return result ? result.config : null;
	};
	resolveConfig.sync = (searchFrom, configFile) => {
		if (configFile == null) {
			const result2 = explorerSync.search(searchFrom);
			return result2 ? result2.config : null;
		}
		const result = explorerSync.load(configFile);
		return result ? result.config : null;
	};
	const resolveConfigFile = async (filePath) => {
		const result = await explorer.search(filePath);
		return result ? result.filepath : null;
	};
	resolveConfigFile.sync = (filePath) => {
		const result = explorerSync.search(filePath);
		return result ? result.filepath : null;
	};
	const loadConfig = async (_a, state = {}) => {
		var _b = _a, { configFile } = _b, baseConfig = __objRest(_b, ["configFile"]);
		const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? await resolveConfig(state.filePath, configFile) : {};
		return __spreadValues(__spreadValues(__spreadValues({}, DEFAULT_CONFIG), baseConfig), rcConfig);
	};
	loadConfig.sync = (_c, state = {}) => {
		var _d = _c, { configFile } = _d, baseConfig = __objRest(_d, ["configFile"]);
		const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? resolveConfig.sync(state.filePath, configFile) : {};
		return __spreadValues(__spreadValues(__spreadValues({}, DEFAULT_CONFIG), baseConfig), rcConfig);
	};
	const DEFAULT_PLUGINS = [];
	const getPlugins = (config, state) => {
		var _a;
		if (config.plugins) return config.plugins;
		if ((_a = state.caller) == null ? void 0 : _a.defaultPlugins) return state.caller.defaultPlugins;
		return DEFAULT_PLUGINS;
	};
	const resolvePlugin = (plugin) => {
		if (typeof plugin === "function") return plugin;
		if (typeof plugin === "string") return loadPlugin(plugin);
		throw new Error(`Invalid plugin "${plugin}"`);
	};
	const pluginCache = {};
	const resolveModule = (m) => m ? m.default || m : null;
	const loadPlugin = (moduleName) => {
		if (pluginCache[moduleName]) return pluginCache[moduleName];
		try {
			const plugin = resolveModule(__require(moduleName));
			if (!plugin) throw new Error(`Invalid plugin "${moduleName}"`);
			pluginCache[moduleName] = plugin;
			return pluginCache[moduleName];
		} catch (error) {
			console.log(error);
			throw new Error(`Module "${moduleName}" missing. Maybe \`npm install ${moduleName}\` could help!`);
		}
	};
	const run = (code, config, state) => {
		const expandedState = expandState(state);
		const plugins = getPlugins(config, state).map(resolvePlugin);
		let nextCode = String(code).replace("\0", "");
		for (const plugin of plugins) nextCode = plugin(nextCode, config, expandedState);
		return nextCode;
	};
	const transform = async (code, config = {}, state = {}) => {
		config = await loadConfig(config, state);
		return run(code, config, state);
	};
	transform.sync = (code, config = {}, state = {}) => {
		config = loadConfig.sync(config, state);
		return run(code, config, state);
	};
	exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
	exports.loadConfig = loadConfig;
	exports.resolveConfig = resolveConfig;
	exports.resolveConfigFile = resolveConfigFile;
	exports.transform = transform;
}));
//#endregion
export default require_dist();
export {};
