import { __commonJS, __toESM } from "./chunk-kPDogv7o.js";
import { merge, merge as merge$1 } from "remeda";

//#region ../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/umd/natural-orderby.production.min.js
var require_natural_orderby_production_min = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/umd/natural-orderby.production.min.js": ((exports, module) => {
	/**
	* natural-orderby v5.0.0
	*
	* Copyright (c) Olaf Ennen
	*
	* This source code is licensed under the MIT license found in the
	* LICENSE.md file in the root directory of this source tree.
	*
	* @license MIT
	*/
	(function(r, n) {
		"object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n((r = "undefined" != typeof globalThis ? globalThis : r || self).naturalOrderBy = {});
	})(exports, (function(r) {
		var n = function(r$1, n$1) {
			return r$1 < n$1 ? -1 : r$1 > n$1 ? 1 : 0;
		}, e = function(r$1, n$1, e$1) {
			var t$1 = r$1.localeCompare(n$1, e$1);
			return t$1 ? t$1 / Math.abs(t$1) : 0;
		}, t = /(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g, i = /^\s+|\s+$/g, o = /\s+/g, u = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/, a = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, s = /^0+[1-9]{1}[0-9]*$/, c = /[^\x00-\x80]/, f = function(r$1, n$1) {
			return r$1 < n$1 ? -1 : r$1 > n$1 ? 1 : 0;
		}, l = function(r$1, t$1, i$1) {
			return r$1.value === t$1.value ? 0 : void 0 !== r$1.parsedNumber && void 0 !== t$1.parsedNumber ? n(r$1.parsedNumber, t$1.parsedNumber) : r$1.chunks && t$1.chunks ? function(r$2, t$2, i$2) {
				for (var o$1 = r$2.length, u$1 = t$2.length, a$1 = Math.min(o$1, u$1), s$1 = 0; s$1 < a$1; s$1++) {
					var l$1 = r$2[s$1], d$1 = t$2[s$1];
					if (l$1.normalizedString !== d$1.normalizedString) {
						if ("" === l$1.normalizedString != ("" === d$1.normalizedString)) return "" === l$1.normalizedString ? -1 : 1;
						if (void 0 !== l$1.parsedNumber && void 0 !== d$1.parsedNumber) {
							var m$1 = n(l$1.parsedNumber, d$1.parsedNumber);
							return 0 === m$1 ? f(l$1.normalizedString, d$1.normalizedString) : m$1;
						}
						return void 0 !== l$1.parsedNumber || void 0 !== d$1.parsedNumber ? void 0 !== l$1.parsedNumber ? -1 : 1 : c.test(l$1.normalizedString + d$1.normalizedString) ? e(l$1.normalizedString, d$1.normalizedString, i$2) : f(l$1.normalizedString, d$1.normalizedString);
					}
				}
				return o$1 > a$1 || u$1 > a$1 ? o$1 <= a$1 ? -1 : 1 : 0;
			}(r$1.chunks, t$1.chunks, i$1) : function(r$2, n$1) {
				return (r$2.chunks ? !n$1.chunks : n$1.chunks) ? r$2.chunks ? -1 : 1 : (r$2.isNaN ? !n$1.isNaN : n$1.isNaN) ? r$2.isNaN ? -1 : 1 : (r$2.isSymbol ? !n$1.isSymbol : n$1.isSymbol) ? r$2.isSymbol ? -1 : 1 : (r$2.isObject ? !n$1.isObject : n$1.isObject) ? r$2.isObject ? -1 : 1 : (r$2.isArray ? !n$1.isArray : n$1.isArray) ? r$2.isArray ? -1 : 1 : (r$2.isFunction ? !n$1.isFunction : n$1.isFunction) ? r$2.isFunction ? -1 : 1 : (r$2.isNull ? !n$1.isNull : n$1.isNull) ? r$2.isNull ? -1 : 1 : 0;
			}(r$1, t$1);
		}, d = function(r$1) {
			return r$1.replace(o, " ").replace(i, "");
		}, m = function(r$1) {
			if (0 !== r$1.length) {
				var n$1 = Number(r$1.replace(/_/g, ""));
				if (!Number.isNaN(n$1)) return n$1;
			}
		}, p = function(r$1, n$1, e$1) {
			if (u.test(r$1) && (!s.test(r$1) || 0 === n$1 || "." !== e$1[n$1 - 1])) return m(r$1) || 0;
		}, y = function(r$1, n$1, e$1) {
			return {
				parsedNumber: p(r$1, n$1, e$1),
				normalizedString: d(r$1)
			};
		}, b = function(r$1) {
			return function(r$2) {
				return r$2.replace(t, "\0$1\0").replace(/\0$/, "").replace(/^\0/, "").split("\0");
			}(r$1).map(y);
		}, N = function(r$1) {
			return "function" == typeof r$1;
		}, v = function(r$1) {
			return Number.isNaN(r$1) || r$1 instanceof Number && Number.isNaN(r$1.valueOf());
		}, g = function(r$1) {
			return null === r$1;
		}, S = function(r$1) {
			return !(null === r$1 || "object" != typeof r$1 || Array.isArray(r$1) || r$1 instanceof Number || r$1 instanceof String || r$1 instanceof Boolean || r$1 instanceof Date);
		}, h = function(r$1) {
			return "symbol" == typeof r$1;
		}, A = function(r$1) {
			return void 0 === r$1;
		}, z = function(r$1) {
			var n$1 = m(r$1);
			return void 0 !== n$1 ? n$1 : function(r$2) {
				try {
					var n$2 = Date.parse(r$2);
					return !Number.isNaN(n$2) && a.test(r$2) ? n$2 : void 0;
				} catch (r$3) {
					return;
				}
			}(r$1);
		}, j = function(r$1) {
			if ("string" == typeof r$1 || r$1 instanceof String || ("number" == typeof r$1 || r$1 instanceof Number) && !v(r$1) || "boolean" == typeof r$1 || r$1 instanceof Boolean || r$1 instanceof Date) {
				var n$1 = function(r$2) {
					return "boolean" == typeof r$2 || r$2 instanceof Boolean ? Number(r$2).toString() : "number" == typeof r$2 || r$2 instanceof Number ? r$2.toString() : r$2 instanceof Date ? r$2.getTime().toString() : "string" == typeof r$2 || r$2 instanceof String ? r$2.toLowerCase().replace(i, "") : "";
				}(r$1), e$1 = z(n$1);
				return {
					parsedNumber: e$1,
					chunks: b(e$1 ? "" + e$1 : n$1),
					value: r$1
				};
			}
			return {
				isArray: Array.isArray(r$1),
				isFunction: N(r$1),
				isNaN: v(r$1),
				isNull: g(r$1),
				isObject: S(r$1),
				isSymbol: h(r$1),
				isUndefined: A(r$1),
				value: r$1
			};
		}, x = function(r$1) {
			return "string" == typeof r$1 && ("asc" === r$1 || "desc" === r$1);
		};
		var k = function(r$1) {
			return "function" == typeof r$1 ? r$1 : function(n$1) {
				if (Array.isArray(n$1)) {
					var e$1 = Number(r$1);
					if (Number.isInteger(e$1)) return n$1[e$1];
				} else if (n$1 && "object" == typeof n$1) {
					var t$1 = Object.getOwnPropertyDescriptor(n$1, r$1);
					return null == t$1 ? void 0 : t$1.value;
				}
				return n$1;
			};
		}, w = function(r$1, n$1, e$1, t$1) {
			var i$1 = n$1.length ? n$1.map(k) : [function(r$2) {
				return r$2;
			}], o$1 = r$1.map((function(r$2, n$2) {
				return {
					index: n$2,
					values: i$1.map((function(n$3) {
						return n$3(r$2);
					})).map(j)
				};
			}));
			return o$1.sort((function(r$2, n$2) {
				return function(r$3, n$3, e$2, t$2) {
					for (var i$2 = r$3.index, o$2 = r$3.values, u$1 = n$3.index, a$1 = n$3.values, s$1 = o$2.length, c$1 = e$2.length, f$1 = 0; f$1 < s$1; f$1++) {
						var d$1 = f$1 < c$1 ? e$2[f$1] : null;
						if (d$1 && "function" == typeof d$1) {
							var m$1 = d$1(o$2[f$1].value, a$1[f$1].value);
							if (m$1) return m$1;
						} else {
							var p$1 = l(o$2[f$1], a$1[f$1], t$2);
							if (p$1) return p$1 * ("desc" === d$1 ? -1 : 1);
						}
					}
					return i$2 - u$1;
				}(r$2, n$2, e$1, t$1);
			})), o$1.map((function(n$2) {
				return function(r$2, n$3) {
					return r$2[n$3];
				}(r$1, n$2.index);
			}));
		};
		r.compare = function(r$1) {
			var n$1, e$1, t$1;
			return function(r$2) {
				return function(n$2, e$2) {
					var t$2 = j(n$2), i$1 = j(e$2);
					return l(t$2, i$1, r$2.locale) * ("desc" === r$2.order ? -1 : 1);
				};
			}((t$1 = "asc", "string" == typeof (n$1 = r$1) && x(n$1) ? t$1 = n$1 : n$1 && "object" == typeof n$1 && (n$1.order && x(n$1.order) && (t$1 = n$1.order), n$1.locale && n$1.locale.length > 0 && (e$1 = n$1.locale)), {
				order: t$1,
				locale: e$1
			}));
		}, r.orderBy = function(r$1, n$1, e$1, t$1) {
			if (!r$1 || !Array.isArray(r$1)) return [];
			var i$1 = function(r$2) {
				if (!r$2) return [];
				var n$2 = Array.isArray(r$2) ? [].concat(r$2) : [r$2];
				return n$2.some((function(r$3) {
					return "string" != typeof r$3 && "number" != typeof r$3 && "function" != typeof r$3;
				})) ? [] : n$2;
			}(n$1), o$1 = function(r$2) {
				if (!r$2) return [];
				var n$2 = Array.isArray(r$2) ? [].concat(r$2) : [r$2];
				return n$2.some((function(r$3) {
					return "asc" !== r$3 && "desc" !== r$3 && "function" != typeof r$3;
				})) ? [] : n$2;
			}(e$1);
			return w(r$1, i$1, o$1, t$1);
		};
	}));
}) });

//#endregion
//#region ../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/umd/natural-orderby.development.js
var require_natural_orderby_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/umd/natural-orderby.development.js": ((exports, module) => {
	/**
	* natural-orderby v5.0.0
	*
	* Copyright (c) Olaf Ennen
	*
	* This source code is licensed under the MIT license found in the
	* LICENSE.md file in the root directory of this source tree.
	*
	* @license MIT
	*/
	(function(global, factory) {
		typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.naturalOrderBy = {}));
	})(exports, (function(exports$1) {
		var compareNumbers = function compareNumbers$1(numberA, numberB) {
			if (numberA < numberB) return -1;
			if (numberA > numberB) return 1;
			return 0;
		};
		var compareUnicode = function compareUnicode$1(stringA, stringB, locale) {
			var result = stringA.localeCompare(stringB, locale);
			return result ? result / Math.abs(result) : 0;
		};
		var RE_NUMBERS = /(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g;
		var RE_LEADING_OR_TRAILING_WHITESPACES = /^\s+|\s+$/g;
		var RE_WHITESPACES = /\s+/g;
		var RE_INT_OR_FLOAT = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
		var RE_DATE = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;
		var RE_LEADING_ZERO = /^0+[1-9]{1}[0-9]*$/;
		var RE_UNICODE_CHARACTERS = /[^\x00-\x80]/;
		var stringCompare = function stringCompare$1(stringA, stringB) {
			if (stringA < stringB) return -1;
			if (stringA > stringB) return 1;
			return 0;
		};
		var compareChunks = function compareChunks$1(chunksA, chunksB, locale) {
			var lengthA = chunksA.length;
			var lengthB = chunksB.length;
			var size = Math.min(lengthA, lengthB);
			for (var i = 0; i < size; i++) {
				var chunkA = chunksA[i];
				var chunkB = chunksB[i];
				if (chunkA.normalizedString !== chunkB.normalizedString) {
					if (chunkA.normalizedString === "" !== (chunkB.normalizedString === "")) return chunkA.normalizedString === "" ? -1 : 1;
					if (chunkA.parsedNumber !== void 0 && chunkB.parsedNumber !== void 0) {
						var result = compareNumbers(chunkA.parsedNumber, chunkB.parsedNumber);
						if (result === 0) return stringCompare(chunkA.normalizedString, chunkB.normalizedString);
						return result;
					} else if (chunkA.parsedNumber !== void 0 || chunkB.parsedNumber !== void 0) return chunkA.parsedNumber !== void 0 ? -1 : 1;
					else if (RE_UNICODE_CHARACTERS.test(chunkA.normalizedString + chunkB.normalizedString)) return compareUnicode(chunkA.normalizedString, chunkB.normalizedString, locale);
					else return stringCompare(chunkA.normalizedString, chunkB.normalizedString);
				}
			}
			if (lengthA > size || lengthB > size) return lengthA <= size ? -1 : 1;
			return 0;
		};
		var compareOtherTypes = function compareOtherTypes$1(valueA, valueB) {
			if (!valueA.chunks ? valueB.chunks : !valueB.chunks) return !valueA.chunks ? 1 : -1;
			if (valueA.isNaN ? !valueB.isNaN : valueB.isNaN) return valueA.isNaN ? -1 : 1;
			if (valueA.isSymbol ? !valueB.isSymbol : valueB.isSymbol) return valueA.isSymbol ? -1 : 1;
			if (valueA.isObject ? !valueB.isObject : valueB.isObject) return valueA.isObject ? -1 : 1;
			if (valueA.isArray ? !valueB.isArray : valueB.isArray) return valueA.isArray ? -1 : 1;
			if (valueA.isFunction ? !valueB.isFunction : valueB.isFunction) return valueA.isFunction ? -1 : 1;
			if (valueA.isNull ? !valueB.isNull : valueB.isNull) return valueA.isNull ? -1 : 1;
			return 0;
		};
		var compareValues = function compareValues$1(valueA, valueB, locale) {
			if (valueA.value === valueB.value) return 0;
			if (valueA.parsedNumber !== void 0 && valueB.parsedNumber !== void 0) return compareNumbers(valueA.parsedNumber, valueB.parsedNumber);
			if (valueA.chunks && valueB.chunks) return compareChunks(valueA.chunks, valueB.chunks, locale);
			return compareOtherTypes(valueA, valueB);
		};
		var normalizeAlphaChunk = function normalizeAlphaChunk$1(chunk) {
			return chunk.replace(RE_WHITESPACES, " ").replace(RE_LEADING_OR_TRAILING_WHITESPACES, "");
		};
		var parseNumber = function parseNumber$1(value) {
			if (value.length !== 0) {
				var parsedNumber = Number(value.replace(/_/g, ""));
				if (!Number.isNaN(parsedNumber)) return parsedNumber;
			}
		};
		var normalizeNumericChunk = function normalizeNumericChunk$1(chunk, index, chunks) {
			if (RE_INT_OR_FLOAT.test(chunk)) {
				if (!RE_LEADING_ZERO.test(chunk) || index === 0 || chunks[index - 1] !== ".") return parseNumber(chunk) || 0;
			}
		};
		var createChunkMap = function createChunkMap$1(chunk, index, chunks) {
			return {
				parsedNumber: normalizeNumericChunk(chunk, index, chunks),
				normalizedString: normalizeAlphaChunk(chunk)
			};
		};
		var createChunks = function createChunks$1(value) {
			return value.replace(RE_NUMBERS, "\0$1\0").replace(/\0$/, "").replace(/^\0/, "").split("\0");
		};
		var createChunkMaps = function createChunkMaps$1(value) {
			return createChunks(value).map(createChunkMap);
		};
		var isFunction = function isFunction$1(value) {
			return typeof value === "function";
		};
		var isNaN = function isNaN$1(value) {
			return Number.isNaN(value) || value instanceof Number && Number.isNaN(value.valueOf());
		};
		var isNull = function isNull$1(value) {
			return value === null;
		};
		var isObject = function isObject$1(value) {
			return value !== null && typeof value === "object" && !Array.isArray(value) && !(value instanceof Number) && !(value instanceof String) && !(value instanceof Boolean) && !(value instanceof Date);
		};
		var isSymbol = function isSymbol$1(value) {
			return typeof value === "symbol";
		};
		var isUndefined = function isUndefined$1(value) {
			return value === void 0;
		};
		var parseDate = function parseDate$1(value) {
			try {
				var parsedDate = Date.parse(value);
				if (!Number.isNaN(parsedDate)) {
					if (RE_DATE.test(value)) return parsedDate;
				}
				return;
			} catch (_unused) {
				return;
			}
		};
		var numberify = function numberify$1(value) {
			var parsedNumber = parseNumber(value);
			if (parsedNumber !== void 0) return parsedNumber;
			return parseDate(value);
		};
		var stringify$1 = function stringify$2(value) {
			if (typeof value === "boolean" || value instanceof Boolean) return Number(value).toString();
			if (typeof value === "number" || value instanceof Number) return value.toString();
			if (value instanceof Date) return value.getTime().toString();
			if (typeof value === "string" || value instanceof String) return value.toLowerCase().replace(RE_LEADING_OR_TRAILING_WHITESPACES, "");
			return "";
		};
		var getMappedValueRecord = function getMappedValueRecord$1(value) {
			if (typeof value === "string" || value instanceof String || (typeof value === "number" || value instanceof Number) && !isNaN(value) || typeof value === "boolean" || value instanceof Boolean || value instanceof Date) {
				var stringValue = stringify$1(value);
				var parsedNumber = numberify(stringValue);
				var chunks = createChunkMaps(parsedNumber ? "" + parsedNumber : stringValue);
				return {
					parsedNumber,
					chunks,
					value
				};
			}
			return {
				isArray: Array.isArray(value),
				isFunction: isFunction(value),
				isNaN: isNaN(value),
				isNull: isNull(value),
				isObject: isObject(value),
				isSymbol: isSymbol(value),
				isUndefined: isUndefined(value),
				value
			};
		};
		var baseCompare = function baseCompare$1(options) {
			return function(valueA, valueB) {
				var a = getMappedValueRecord(valueA);
				var b = getMappedValueRecord(valueB);
				return compareValues(a, b, options.locale) * (options.order === "desc" ? -1 : 1);
			};
		};
		var isValidOrder = function isValidOrder$1(value) {
			return typeof value === "string" && (value === "asc" || value === "desc");
		};
		var getOptions = function getOptions$1(customOptions) {
			var order = "asc";
			var locale;
			if (typeof customOptions === "string" && isValidOrder(customOptions)) order = customOptions;
			else if (customOptions && typeof customOptions === "object") {
				if (customOptions.order && isValidOrder(customOptions.order)) order = customOptions.order;
				if (customOptions.locale && customOptions.locale.length > 0) locale = customOptions.locale;
			}
			return {
				order,
				locale
			};
		};
		/**
		* Creates a compare function that defines the natural sort order considering
		* the given `options` which may be passed to [`Array.prototype.sort()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
		*/
		function compare(options) {
			var validatedOptions = getOptions(options);
			return baseCompare(validatedOptions);
		}
		var compareMultiple = function compareMultiple$1(recordA, recordB, orders, locale) {
			var indexA = recordA.index, valuesA = recordA.values;
			var indexB = recordB.index, valuesB = recordB.values;
			var length = valuesA.length;
			var ordersLength = orders.length;
			for (var i = 0; i < length; i++) {
				var order = i < ordersLength ? orders[i] : null;
				if (order && typeof order === "function") {
					var result = order(valuesA[i].value, valuesB[i].value);
					if (result) return result;
				} else {
					var _result = compareValues(valuesA[i], valuesB[i], locale);
					if (_result) return _result * (order === "desc" ? -1 : 1);
				}
			}
			return indexA - indexB;
		};
		var createIdentifierFn = function createIdentifierFn$1(identifier) {
			if (typeof identifier === "function") return identifier;
			return function(value) {
				if (Array.isArray(value)) {
					var index = Number(identifier);
					if (Number.isInteger(index)) return value[index];
				} else if (value && typeof value === "object") {
					var result = Object.getOwnPropertyDescriptor(value, identifier);
					return result == null ? void 0 : result.value;
				}
				return value;
			};
		};
		var getElementByIndex = function getElementByIndex$1(collection, index) {
			return collection[index];
		};
		var getValueByIdentifier = function getValueByIdentifier$1(value, getValue) {
			return getValue(value);
		};
		var baseOrderBy = function baseOrderBy$1(collection, identifiers, orders, locale) {
			var identifierFns = identifiers.length ? identifiers.map(createIdentifierFn) : [function(value) {
				return value;
			}];
			var mappedCollection = collection.map(function(element, index) {
				var values = identifierFns.map(function(identifier) {
					return getValueByIdentifier(element, identifier);
				}).map(getMappedValueRecord);
				return {
					index,
					values
				};
			});
			mappedCollection.sort(function(recordA, recordB) {
				return compareMultiple(recordA, recordB, orders, locale);
			});
			return mappedCollection.map(function(element) {
				return getElementByIndex(collection, element.index);
			});
		};
		var getIdentifiers = function getIdentifiers$1(identifiers) {
			if (!identifiers) return [];
			var identifierList = !Array.isArray(identifiers) ? [identifiers] : [].concat(identifiers);
			if (identifierList.some(function(identifier) {
				return typeof identifier !== "string" && typeof identifier !== "number" && typeof identifier !== "function";
			})) return [];
			return identifierList;
		};
		var getOrders = function getOrders$1(orders) {
			if (!orders) return [];
			var orderList = !Array.isArray(orders) ? [orders] : [].concat(orders);
			if (orderList.some(function(order) {
				return order !== "asc" && order !== "desc" && typeof order !== "function";
			})) return [];
			return orderList;
		};
		/**
		* Creates an array of elements, natural sorted by specified identifiers and
		* the corresponding sort orders. This method implements a stable sort
		* algorithm, which means the original sort order of equal elements is
		* preserved.
		*/
		function orderBy$2(collection, identifiers, orders, locale) {
			if (!collection || !Array.isArray(collection)) return [];
			var validatedIdentifiers = getIdentifiers(identifiers);
			var validatedOrders = getOrders(orders);
			return baseOrderBy(collection, validatedIdentifiers, validatedOrders, locale);
		}
		exports$1.compare = compare;
		exports$1.orderBy = orderBy$2;
	}));
}) });

//#endregion
//#region ../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/main.js
var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/natural-orderby@5.0.0/node_modules/natural-orderby/dist/main.js": ((exports, module) => {
	if (process.env.NODE_ENV === "production") module.exports = require_natural_orderby_production_min();
	else module.exports = require_natural_orderby_development();
}) });

//#endregion
//#region ../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js
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 = /* @__PURE__ */ 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, preserveConsecutiveUppercase$1) => {
	let isLastCharLower = false;
	let isLastCharUpper = false;
	let isLastLastCharUpper = false;
	let isLastLastCharPreserved = false;
	for (let index = 0; index < string.length; index++) {
		const character = string[index];
		isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
		if (isLastCharLower && UPPERCASE.test(character)) {
			string = string.slice(0, index) + "-" + string.slice(index);
			isLastCharLower = false;
			isLastLastCharUpper = isLastCharUpper;
			isLastCharUpper = true;
			index++;
		} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase$1)) {
			string = string.slice(0, index - 1) + "-" + string.slice(index - 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.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
};
const postProcess = (input, toUpperCase) => {
	SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
	NUMBERS_AND_IDENTIFIER.lastIndex = 0;
	return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));
};
function camelCase$1(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) {
		if (SEPARATORS.test(input)) return "";
		return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
	}
	if (input !== toLowerCase(input)) input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
	input = input.replace(LEADING_SEPARATORS, "");
	input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
	if (options.pascalCase) input = toUpperCase(input.charAt(0)) + input.slice(1);
	return postProcess(input, toUpperCase);
}

//#endregion
//#region src/transformers/casing.ts
function camelCase(text, { isFile, prefix = "", suffix = "" } = {}) {
	if (isFile) {
		const splitArray = text.split(".");
		return splitArray.map((item, i) => i === splitArray.length - 1 ? camelCase(item, {
			prefix,
			suffix
		}) : camelCase(item)).join("/");
	}
	return camelCase$1(`${prefix} ${text} ${suffix}`, {
		pascalCase: false,
		preserveConsecutiveUppercase: true
	}).replace(/[^a-zA-Z0-9]/g, "");
}
function pascalCase(text, { isFile, prefix = "", suffix = "" } = {}) {
	if (isFile) {
		const splitArray = text.split(".");
		return splitArray.map((item, i) => i === splitArray.length - 1 ? pascalCase(item, {
			prefix,
			suffix
		}) : camelCase(item)).join("/");
	}
	return camelCase$1(`${prefix} ${text} ${suffix}`, {
		pascalCase: true,
		preserveConsecutiveUppercase: true
	}).replace(/[^a-zA-Z0-9]/g, "");
}

//#endregion
//#region src/transformers/combineCodes.ts
function combineCodes(codes) {
	return codes.join("\n");
}

//#endregion
//#region src/transformers/createJSDocBlockText.ts
function createJSDocBlockText({ comments }) {
	const filteredComments = comments.filter(Boolean);
	if (!filteredComments.length) return "";
	return `/**\n * ${filteredComments.join("\n * ")}\n */`;
}

//#endregion
//#region src/transformers/escape.ts
function escape(text) {
	return text ? text.replaceAll("`", "\\`") : "";
}
/**
* Escape all characters not included in SingleStringCharacters and DoubleStringCharacters on
* @link http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4
* @link https://github.com/joliss/js-string-escape/blob/master/index.js
*/
function jsStringEscape(input) {
	return `${input}`.replace(/["'\\\n\r\u2028\u2029]/g, (character) => {
		switch (character) {
			case "\"":
			case "'":
			case "\\": return `\\${character}`;
			case "\n": return "\\n";
			case "\r": return "\\r";
			case "\u2028": return "\\u2028";
			case "\u2029": return "\\u2029";
			default: return "";
		}
	});
}

//#endregion
//#region src/transformers/indent.ts
function createIndent(size) {
	return Array.from({ length: size + 1 }).join(" ");
}

//#endregion
//#region src/transformers/nameSorter.ts
function nameSorter(a, b) {
	if (a.name < b.name) return -1;
	if (a.name > b.name) return 1;
	return 0;
}

//#endregion
//#region src/transformers/searchAndReplace.ts
function searchAndReplace(options) {
	const { text, replaceBy, prefix = "", key } = options;
	return (options.searchValues?.(prefix, key) || [
		`${prefix}["${key}"]`,
		`${prefix}['${key}']`,
		`${prefix}[\`${key}\`]`,
		`${prefix}"${key}"`,
		`${prefix}'${key}'`,
		`${prefix}\`${key}\``,
		new RegExp(`${prefix}${key}`, "g")
	]).reduce((prev, searchValue) => {
		return prev.toString().replaceAll(searchValue, replaceBy);
	}, text);
}

//#endregion
//#region src/transformers/trim.ts
function trim(text) {
	return text.replaceAll(/\n/g, "").trim();
}
function trimQuotes(text) {
	if (text.match(/^"(.*)"$/)) return text.replace(/^"(.*)"$/, "$1");
	if (text.match(/^'(.*)'$/)) return text.replace(/^'(.*)'$/, "$1");
	if (text.match(/^`(.*)`$/)) return text.replace(/^`(.*)`$/, "$1");
	return text;
}

//#endregion
//#region src/transformers/stringify.ts
function stringify(value) {
	if (value === void 0 || value === null) return "\"\"";
	return JSON.stringify(trimQuotes(value.toString()));
}
function stringifyObject(value) {
	return Object.entries(value).map(([key, value$1]) => {
		if (typeof value$1 === "object") return `${key}: {
        ${stringifyObject(value$1)}
      }`;
		return `${key}: ${value$1}`;
	}).filter(Boolean).join(",\n");
}

//#endregion
//#region src/transformers/toRegExp.ts
function toRegExpString(text, func = "RegExp") {
	const cleaned = trimQuotes(text).replace(/^\\?\//, "").replace(/\\?\/$/, "");
	const regex = new RegExp(cleaned);
	const source = regex.source;
	const flags = regex.flags;
	if (func === null) return `/${source}/${flags}`;
	return `new ${func}(${JSON.stringify(source)}${flags ? `, ${JSON.stringify(flags)}` : ""})`;
}

//#endregion
//#region src/transformers/transformReservedWord.ts
/**
* @link https://github.com/jonschlinkert/reserved/blob/master/index.js
*/
const reservedWords = [
	"abstract",
	"arguments",
	"boolean",
	"break",
	"byte",
	"case",
	"catch",
	"char",
	"class",
	"const",
	"continue",
	"debugger",
	"default",
	"delete",
	"do",
	"double",
	"else",
	"enum",
	"eval",
	"export",
	"extends",
	"false",
	"final",
	"finally",
	"float",
	"for",
	"function",
	"goto",
	"if",
	"implements",
	"import",
	"in",
	"instanceof",
	"int",
	"interface",
	"let",
	"long",
	"native",
	"new",
	"null",
	"package",
	"private",
	"protected",
	"public",
	"return",
	"short",
	"static",
	"super",
	"switch",
	"synchronized",
	"this",
	"throw",
	"throws",
	"transient",
	"true",
	"try",
	"typeof",
	"var",
	"void",
	"volatile",
	"while",
	"with",
	"yield",
	"Array",
	"Date",
	"eval",
	"function",
	"hasOwnProperty",
	"Infinity",
	"isFinite",
	"isNaN",
	"isPrototypeOf",
	"length",
	"Math",
	"name",
	"NaN",
	"Number",
	"Object",
	"prototype",
	"String",
	"toString",
	"undefined",
	"valueOf"
];
function transformReservedWord(word) {
	if (word && reservedWords.includes(word) || word?.match(/^\d/)) return `_${word}`;
	return word;
}
function isValidVarName(name) {
	try {
		Function(`var ${name}`);
	} catch (_e) {
		return false;
	}
	return true;
}

//#endregion
//#region src/transformers/index.ts
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
var import_main$1 = /* @__PURE__ */ __toESM(require_main(), 1);
var transformers_default = {
	combineCodes,
	escape,
	jsStringEscape,
	createIndent,
	transformReservedWord,
	isValidVarName,
	nameSorter,
	searchAndReplace,
	stringify,
	stringifyObject,
	toRegExpString,
	trim,
	trimQuotes,
	JSDoc: { createJSDocBlockText },
	orderBy: import_main.orderBy,
	merge,
	camelCase,
	pascalCase
};

//#endregion
export { camelCase, combineCodes, createIndent, createJSDocBlockText, escape, import_main$1 as import_main, isValidVarName, jsStringEscape, merge$1 as merge, nameSorter, pascalCase, require_main, searchAndReplace, stringify, stringifyObject, toRegExpString, transformReservedWord, transformers_default, trim, trimQuotes };
//# sourceMappingURL=transformers-CXIKOVl0.js.map