From c1ade4dc2a320d3795a7f7aea9843272622dac9a Mon Sep 17 00:00:00 2001 From: zhujingjing Date: Sun, 28 Jan 2024 18:30:46 +0800 Subject: [PATCH] build --- lib/commons/str-utils.d.ts | 2 + lib/index.es.js.map | 2 +- lib/index.umd.js.map | 2 +- package.json | 2 +- pnpm-lock.yaml | 1031 +++++++++++++++++++++++++----------- src/commons/str-utils.ts | 18 +- tsconfig.json | 6 +- 7 files changed, 746 insertions(+), 317 deletions(-) diff --git a/lib/commons/str-utils.d.ts b/lib/commons/str-utils.d.ts index 7212110..a4184db 100644 --- a/lib/commons/str-utils.d.ts +++ b/lib/commons/str-utils.d.ts @@ -26,3 +26,5 @@ export declare function equalsIgnoreCase(source: string | undefined, target: str * @returns 是否包含 */ export declare const includeIgnoreCase: (list: string[], search: string) => boolean; +export declare const strLength: (str: string) => number; +export declare const strMonospacePad: (str: string, length: number, pad?: string) => string; diff --git a/lib/index.es.js.map b/lib/index.es.js.map index face709..ca56a18 100644 --- a/lib/index.es.js.map +++ b/lib/index.es.js.map @@ -1 +1 @@ -{"version":3,"file":"index.es.js","sources":["../src/commons/record-util.ts","../src/commons/str-utils.ts","../src/commons/file-util.ts"],"sourcesContent":["import { UnwrapNestedRefs } from \"vue\";\r\nexport enum RecordClearMode {\r\n delete = 2,\r\n reset = 1,\r\n}\r\nexport const withRecord = (obj: UnwrapNestedRefs>) => {\r\n return {\r\n clear: function (mode: RecordClearMode = RecordClearMode.delete) {\r\n if (mode === RecordClearMode.reset) {\r\n Object.keys(obj).forEach((key) => {\r\n obj[key] = undefined;\r\n });\r\n } else if (mode === RecordClearMode.delete) {\r\n Object.keys(obj).forEach((key) => {\r\n delete obj[key];\r\n });\r\n }\r\n },\r\n replace: function (newVal: UnwrapNestedRefs>) {\r\n this.clear(RecordClearMode.delete);\r\n Object.assign(obj, newVal);\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * 这是一个泛型函数,接受任意个数的数组作为参数,并返回一个对象。\r\n * 该对象包含两个方法:test 和 path。\r\n * test 方法用于测试所有数组的元素是否相等,\r\n * path 方法用于测试所有数组的指定路径的值是否相等。\r\n\r\n * @param arrays \r\n * @returns \r\n */\r\nexport function assignRecords>(...arrays: T[][]) {\r\n let _arrays = arrays ?? [];\r\n\r\n return {\r\n test: function (equal?: (l: T, r: T) => boolean) {\r\n if (_arrays.length <= 1) {\r\n return _arrays.length === 1 ? _arrays[0] : [];\r\n }\r\n\r\n let localEqual =\r\n equal ??\r\n function (ll: T, rr: T) {\r\n return ll === rr;\r\n };\r\n return _arrays.reduce((acc, crt) => {\r\n if (crt && crt.length > 0) {\r\n if (acc.length === 0) {\r\n acc.push(...crt);\r\n } else {\r\n crt.forEach((c) => {\r\n const some = acc.some((a) => localEqual(a, c));\r\n if (!some) {\r\n acc.push(c);\r\n }\r\n });\r\n }\r\n }\r\n return acc;\r\n }, []);\r\n },\r\n path: function (...paths: string[]) {\r\n return this.test((l, r) => {\r\n return paths.every((path) => {\r\n return l[path] === r[path];\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * 接受一个目标对象和多个源对象作为参数,并返回合并后的对象。\r\n * 它会将源对象的属性复制到目标对象中,\r\n * 如果多个源对象有同名属性,\r\n * 则最后的属性值将覆盖前面的属性值。\r\n * @param target 目标对象\r\n * @param sources 来源对象参数\r\n * @returns 目标对象\r\n */\r\nexport const extend = >(\r\n // 目标对象\r\n target: T,\r\n // 其他对象参数\r\n ...sources: (T | undefined)[]\r\n): T => {\r\n // 遍历其他对象参数\r\n for (const source of sources) {\r\n if (source !== undefined) {\r\n // 遍历参数对象的属性\r\n for (const key in source) {\r\n // 判断属性存在于参数对象中且值不为 null\r\n if (source.hasOwnProperty(key) && source[key] != null) {\r\n // 将属性赋值给目标对象\r\n target[key] = source[key];\r\n }\r\n }\r\n }\r\n }\r\n // 返回目标对象\r\n return target;\r\n};\r\n","/**\r\n * 生成给定函数体的函数注释。\r\n *\r\n * @param {RegExp} regExp - 用于匹配的正则表达式。\r\n * @param {(text: string, match: boolean) => T} matchHandler - 处理匹配到的文本的函数。\r\n * @param {(text: string, match: boolean) => T} [textHandler] - 处理未匹配到的文本的函数。\r\n * @return {(str: string) => T[]} - 分词器函数。\r\n */\r\nexport function stringTokenizer(\r\n regExp: RegExp,\r\n matchHandler: (text: string, match: boolean) => T,\r\n textHandler?: (text: string, match: boolean) => T\r\n): (str: string) => T[] {\r\n\r\n const ifMatch = matchHandler;\r\n const ifText = textHandler?textHandler: matchHandler;\r\n\r\n return function (str: string) {\r\n const result: T[] = [];\r\n const matches = str.matchAll(regExp);\r\n let index = 0;\r\n for (const match of matches) {\r\n const before = str.slice(index, match.index);\r\n if (before) {\r\n result.push(ifText(before, false));\r\n }\r\n result.push(ifMatch(match[0], true));\r\n index = match.index! + match[0].length;\r\n }\r\n if (index < str.length) {\r\n result.push(ifText(str.slice(index), false));\r\n }\r\n return result;\r\n };\r\n}\r\n\r\n/**\r\n * 该函数接受两个参数,判断它们是否相等,不区分大小写。\r\n * 如果参数都是字符串类型,则将它们转换为小写后比较。\r\n * 如果两个参数都是undefined,则返回true,\r\n * 否则返回false。\r\n * @param source \r\n * @param target \r\n * @returns \r\n */\r\nexport function equalsIgnoreCase(\r\n source: string | undefined,\r\n target: string | undefined\r\n) {\r\n if (typeof source === \"string\" && typeof target === \"string\") {\r\n return source.toLowerCase() === target.toLowerCase();\r\n } else if (source === undefined && target === undefined) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * 这个函数接受一个字符串数组和一个字符串作为参数,\r\n * 在数组中判断是否存在与搜索字符串相同或相似的字符串,忽略大小写。\r\n * 如果找到匹配项则返回true,否则返回false。\r\n * @param list 字符串数组\r\n * @param search 用来搜索的字符串\r\n * @returns 是否包含\r\n */\r\nexport const includeIgnoreCase = (list: string[], search: string) => {\r\n for (let i = 0; i < list.length; i++) {\r\n let item = list[i];\r\n if (equalsIgnoreCase(item, search)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\n","/**\r\n * 获取文件的后缀名\r\n * @param fileName 文件名\r\n * @returns 文件后缀名\r\n */\r\nexport function getFileExt(fileName: string): string {\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return \"\";\r\n }\r\n return fileName.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件全名(包含扩展名)\r\n * 该函数接收一个表示文件路径的字符串作为参数,返回该路径中文件名部分。\r\n * 首先查找路径中最后一个斜杠或反斜杠的索引,若未找到则直接返回路径;\r\n * 若找到,则使用substring方法提取最后一个斜杠或反斜杠后面的字符串作为文件名并返回。\r\n * @param path 文件路径\r\n * @returns 文件全名(包含扩展名)\r\n */\r\nexport function getFileFullName(path: string): string {\r\n let index = path.lastIndexOf(\"/\");\r\n if (index === -1) {\r\n index = path.lastIndexOf(\"\\\\\");\r\n if (index === -1) {\r\n return path;\r\n }\r\n }\r\n return path.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件名不包含扩展名\r\n */\r\nexport function getFileNameWithoutExt(path: string): string {\r\n const fileName = getFileFullName(path);\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return fileName;\r\n }\r\n return fileName.substring(0, index);\r\n}\r\n\r\n/**\r\n * 文件信息\r\n */\r\nexport interface IFileInfo {\r\n /** 文件名(包含扩展名) */\r\n fileName: string;\r\n /**\r\n * 文件名不带扩展名\r\n */\r\n fileNameNoExt: string;\r\n /** 文件扩展名 */\r\n fileExtName: string;\r\n /** 路径仅包含文件夹 */\r\n pathOnly: string;\r\n /** 完整路径 */\r\n fullPath: string;\r\n}\r\n\r\n/**\r\n * 获取文件信息\r\n * @param path 文件路径\r\n * @param platform 平台名称,默认为\"win32\"\r\n * @returns 包含文件名、文件名不带扩展名、文件扩展名、路径仅包含文件夹、完整路径的对象\r\n */\r\nexport function getFileInfo(\r\n path: string,\r\n platform: string = \"win32\"\r\n): IFileInfo {\r\n const pathSaprator = platform === \"win32\" ? \"\\\\\" : \"/\";\r\n\r\n let pathOnly: string;\r\n\r\n let fileName: string;\r\n let fileExtName: string;\r\n let fileNameNoExt: string;\r\n const pathIndex = path.lastIndexOf(pathSaprator);\r\n if (pathIndex === -1) {\r\n pathOnly = \"\";\r\n fileName = path;\r\n } else {\r\n pathOnly = path.substring(0, pathIndex + 1);\r\n fileName = path.substring(pathIndex + 1);\r\n }\r\n\r\n const extIndex = fileName.lastIndexOf(\".\");\r\n if (extIndex === -1) {\r\n fileExtName = \"\";\r\n fileNameNoExt = fileName;\r\n } else {\r\n fileExtName = fileName.substring(extIndex + 1);\r\n fileNameNoExt = fileName.substring(0, extIndex);\r\n }\r\n\r\n return {\r\n fileName,\r\n fileNameNoExt,\r\n fileExtName,\r\n fullPath: path,\r\n pathOnly,\r\n };\r\n}\r\n"],"names":["RecordClearMode","withRecord","obj","mode","key","newVal","assignRecords","arrays","_arrays","equal","localEqual","ll","rr","acc","crt","c","a","paths","l","r","path","stringTokenizer","regExp","matchHandler","textHandler","ifMatch","ifText","str","result","matches","index","match","before","equalsIgnoreCase","source","target","includeIgnoreCase","list","search","i","item","getFileExt","fileName","getFileFullName","getFileNameWithoutExt","getFileInfo","platform","pathSaprator","pathOnly","fileExtName","fileNameNoExt","pathIndex","extIndex"],"mappings":"AACY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,SAAS,CAAT,IAAA,UACAA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SAFUA,IAAAA,KAAA,CAAA,CAAA;AAIC,MAAAC,IAAa,CAACC,OAClB;AAAA,EACL,OAAO,SAAUC,IAAwB,GAAwB;AAC/D,IAAIA,MAAS,IACX,OAAO,KAAKD,CAAG,EAAE,QAAQ,CAACE,MAAQ;AAChC,MAAAF,EAAIE,CAAG,IAAI;AAAA,IAAA,CACZ,IACQD,MAAS,KAClB,OAAO,KAAKD,CAAG,EAAE,QAAQ,CAACE,MAAQ;AAChC,aAAOF,EAAIE,CAAG;AAAA,IAAA,CACf;AAAA,EAEL;AAAA,EACA,SAAS,SAAU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T,IAAAtB,EAAK,UAAU+B,IAAY,CAAC;AAGnC,QAAAC,IAAWV,EAAS,YAAY,GAAG;AACzC,SAAIU,MAAa,MACDH,IAAA,IACEC,IAAAR,MAEFO,IAAAP,EAAS,UAAUU,IAAW,CAAC,GAC7BF,IAAAR,EAAS,UAAU,GAAGU,CAAQ,IAGzC;AAAA,IACL,UAAAV;AAAA,IACA,eAAAQ;AAAA,IACA,aAAAD;AAAA,IACA,UAAU7B;AAAA,IACV,UAAA4B;AAAA,EAAA;AAEJ;"} \ No newline at end of file +{"version":3,"file":"index.es.js","sources":["../src/commons/record-util.ts","../src/commons/str-utils.ts","../src/commons/file-util.ts"],"sourcesContent":["import { UnwrapNestedRefs } from \"vue\";\r\nexport enum RecordClearMode {\r\n delete = 2,\r\n reset = 1,\r\n}\r\nexport const withRecord = (obj: UnwrapNestedRefs>) => {\r\n return {\r\n clear: function (mode: RecordClearMode = RecordClearMode.delete) {\r\n if (mode === RecordClearMode.reset) {\r\n Object.keys(obj).forEach((key) => {\r\n obj[key] = undefined;\r\n });\r\n } else if (mode === RecordClearMode.delete) {\r\n Object.keys(obj).forEach((key) => {\r\n delete obj[key];\r\n });\r\n }\r\n },\r\n replace: function (newVal: UnwrapNestedRefs>) {\r\n this.clear(RecordClearMode.delete);\r\n Object.assign(obj, newVal);\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * 这是一个泛型函数,接受任意个数的数组作为参数,并返回一个对象。\r\n * 该对象包含两个方法:test 和 path。\r\n * test 方法用于测试所有数组的元素是否相等,\r\n * path 方法用于测试所有数组的指定路径的值是否相等。\r\n\r\n * @param arrays \r\n * @returns \r\n */\r\nexport function assignRecords>(...arrays: T[][]) {\r\n let _arrays = arrays ?? [];\r\n\r\n return {\r\n test: function (equal?: (l: T, r: T) => boolean) {\r\n if (_arrays.length <= 1) {\r\n return _arrays.length === 1 ? _arrays[0] : [];\r\n }\r\n\r\n let localEqual =\r\n equal ??\r\n function (ll: T, rr: T) {\r\n return ll === rr;\r\n };\r\n return _arrays.reduce((acc, crt) => {\r\n if (crt && crt.length > 0) {\r\n if (acc.length === 0) {\r\n acc.push(...crt);\r\n } else {\r\n crt.forEach((c) => {\r\n const some = acc.some((a) => localEqual(a, c));\r\n if (!some) {\r\n acc.push(c);\r\n }\r\n });\r\n }\r\n }\r\n return acc;\r\n }, []);\r\n },\r\n path: function (...paths: string[]) {\r\n return this.test((l, r) => {\r\n return paths.every((path) => {\r\n return l[path] === r[path];\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * 接受一个目标对象和多个源对象作为参数,并返回合并后的对象。\r\n * 它会将源对象的属性复制到目标对象中,\r\n * 如果多个源对象有同名属性,\r\n * 则最后的属性值将覆盖前面的属性值。\r\n * @param target 目标对象\r\n * @param sources 来源对象参数\r\n * @returns 目标对象\r\n */\r\nexport const extend = >(\r\n // 目标对象\r\n target: T,\r\n // 其他对象参数\r\n ...sources: (T | undefined)[]\r\n): T => {\r\n // 遍历其他对象参数\r\n for (const source of sources) {\r\n if (source !== undefined) {\r\n // 遍历参数对象的属性\r\n for (const key in source) {\r\n // 判断属性存在于参数对象中且值不为 null\r\n if (source.hasOwnProperty(key) && source[key] != null) {\r\n // 将属性赋值给目标对象\r\n target[key] = source[key];\r\n }\r\n }\r\n }\r\n }\r\n // 返回目标对象\r\n return target;\r\n};\r\n","/**\r\n * 生成给定函数体的函数注释。\r\n *\r\n * @param {RegExp} regExp - 用于匹配的正则表达式。\r\n * @param {(text: string, match: boolean) => T} matchHandler - 处理匹配到的文本的函数。\r\n * @param {(text: string, match: boolean) => T} [textHandler] - 处理未匹配到的文本的函数。\r\n * @return {(str: string) => T[]} - 分词器函数。\r\n */\r\nexport function stringTokenizer(\r\n regExp: RegExp,\r\n matchHandler: (text: string, match: boolean) => T,\r\n textHandler?: (text: string, match: boolean) => T\r\n): (str: string) => T[] {\r\n\r\n const ifMatch = matchHandler;\r\n const ifText = textHandler?textHandler: matchHandler;\r\n\r\n return function (str: string) {\r\n const result: T[] = [];\r\n const matches = str.matchAll(regExp);\r\n let index = 0;\r\n for (const match of matches) {\r\n const before = str.slice(index, match.index);\r\n if (before) {\r\n result.push(ifText(before, false));\r\n }\r\n result.push(ifMatch(match[0], true));\r\n index = match.index! + match[0].length;\r\n }\r\n if (index < str.length) {\r\n result.push(ifText(str.slice(index), false));\r\n }\r\n return result;\r\n };\r\n}\r\n\r\n/**\r\n * 该函数接受两个参数,判断它们是否相等,不区分大小写。\r\n * 如果参数都是字符串类型,则将它们转换为小写后比较。\r\n * 如果两个参数都是undefined,则返回true,\r\n * 否则返回false。\r\n * @param source\r\n * @param target\r\n * @returns\r\n */\r\nexport function equalsIgnoreCase(\r\n source: string | undefined,\r\n target: string | undefined\r\n) {\r\n if (typeof source === \"string\" && typeof target === \"string\") {\r\n return source.toLowerCase() === target.toLowerCase();\r\n } else if (source === undefined && target === undefined) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * 这个函数接受一个字符串数组和一个字符串作为参数,\r\n * 在数组中判断是否存在与搜索字符串相同或相似的字符串,忽略大小写。\r\n * 如果找到匹配项则返回true,否则返回false。\r\n * @param list 字符串数组\r\n * @param search 用来搜索的字符串\r\n * @returns 是否包含\r\n */\r\nexport const includeIgnoreCase = (list: string[], search: string) => {\r\n for (let i = 0; i < list.length; i++) {\r\n let item = list[i];\r\n if (equalsIgnoreCase(item, search)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\nexport const strLength = (str: string) => {\r\n return str.replaceAll(/[\\u4e00-\\u9fa5]/g, \"--\").length;\r\n};\r\n\r\nexport const strMonospacePad = (\r\n str: string,\r\n length: number,\r\n pad: string = \" \"\r\n) => {\r\n const visibleLength = length - (strLength(str) - str.length);\r\n return str.padEnd(visibleLength, pad);\r\n};\r\n","/**\r\n * 获取文件的后缀名\r\n * @param fileName 文件名\r\n * @returns 文件后缀名\r\n */\r\nexport function getFileExt(fileName: string): string {\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return \"\";\r\n }\r\n return fileName.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件全名(包含扩展名)\r\n * 该函数接收一个表示文件路径的字符串作为参数,返回该路径中文件名部分。\r\n * 首先查找路径中最后一个斜杠或反斜杠的索引,若未找到则直接返回路径;\r\n * 若找到,则使用substring方法提取最后一个斜杠或反斜杠后面的字符串作为文件名并返回。\r\n * @param path 文件路径\r\n * @returns 文件全名(包含扩展名)\r\n */\r\nexport function getFileFullName(path: string): string {\r\n let index = path.lastIndexOf(\"/\");\r\n if (index === -1) {\r\n index = path.lastIndexOf(\"\\\\\");\r\n if (index === -1) {\r\n return path;\r\n }\r\n }\r\n return path.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件名不包含扩展名\r\n */\r\nexport function getFileNameWithoutExt(path: string): string {\r\n const fileName = getFileFullName(path);\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return fileName;\r\n }\r\n return fileName.substring(0, index);\r\n}\r\n\r\n/**\r\n * 文件信息\r\n */\r\nexport interface IFileInfo {\r\n /** 文件名(包含扩展名) */\r\n fileName: string;\r\n /**\r\n * 文件名不带扩展名\r\n */\r\n fileNameNoExt: string;\r\n /** 文件扩展名 */\r\n fileExtName: string;\r\n /** 路径仅包含文件夹 */\r\n pathOnly: string;\r\n /** 完整路径 */\r\n fullPath: string;\r\n}\r\n\r\n/**\r\n * 获取文件信息\r\n * @param path 文件路径\r\n * @param platform 平台名称,默认为\"win32\"\r\n * @returns 包含文件名、文件名不带扩展名、文件扩展名、路径仅包含文件夹、完整路径的对象\r\n */\r\nexport function getFileInfo(\r\n path: string,\r\n platform: string = \"win32\"\r\n): IFileInfo {\r\n const pathSaprator = platform === \"win32\" ? \"\\\\\" : \"/\";\r\n\r\n let pathOnly: string;\r\n\r\n let fileName: string;\r\n let fileExtName: string;\r\n let fileNameNoExt: string;\r\n const pathIndex = path.lastIndexOf(pathSaprator);\r\n if (pathIndex === -1) {\r\n pathOnly = \"\";\r\n fileName = path;\r\n } else {\r\n pathOnly = path.substring(0, pathIndex + 1);\r\n fileName = path.substring(pathIndex + 1);\r\n }\r\n\r\n const extIndex = fileName.lastIndexOf(\".\");\r\n if (extIndex === -1) {\r\n fileExtName = \"\";\r\n fileNameNoExt = fileName;\r\n } else {\r\n fileExtName = fileName.substring(extIndex + 1);\r\n fileNameNoExt = fileName.substring(0, extIndex);\r\n }\r\n\r\n return {\r\n fileName,\r\n fileNameNoExt,\r\n fileExtName,\r\n fullPath: path,\r\n pathOnly,\r\n };\r\n}\r\n"],"names":["RecordClearMode","withRecord","obj","mode","key","newVal","assignRecords","arrays","_arrays","equal","localEqual","ll","rr","acc","crt","c","a","paths","l","r","path","stringTokenizer","regExp","matchHandler","textHandler","ifMatch","ifText","str","result","matches","index","match","before","equalsIgnoreCase","source","target","includeIgnoreCase","list","search","i","item","getFileExt","fileName","getFileFullName","getFileNameWithoutExt","getFileInfo","platform","pathSaprator","pathOnly","fileExtName","fileNameNoExt","pathIndex","extIndex"],"mappings":"AACY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,SAAS,CAAT,IAAA,UACAA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SAFUA,IAAAA,KAAA,CAAA,CAAA;AAIC,MAAAC,IAAa,CAACC,OAClB;AAAA,EACL,OAAO,SAAUC,IAAwB,GAAwB;AAC/D,IAAIA,MAAS,IACX,OAAO,KAAKD,CAAG,EAAE,QAAQ,CAACE,MAAQ;AAChC,MAAAF,EAAIE,CAAG,IAAI;AAAA,IAAA,CACZ,IACQD,MAAS,KAClB,OAAO,KAAKD,CAAG,EAAE,QAAQ,CAACE,MAAQ;AAChC,aAAOF,EAAIE,CAAG;AAAA,IAAA,CACf;AAAA,EAEL;AAAA,EACA,SAAS,SAAUC,GAA+C;AAChE,SAAK;AAAA,MAAM;AAAA;AAAA,OACJ,OAAA,OAAOH,GAAKG,CAAM;AAAA,EAC3B;AAAA;AAaG,SAASC,KAAgDC,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AR,MAEFO,IAAAP,EAAS,UAAUU,IAAW,CAAC,GAC7BF,IAAAR,EAAS,UAAU,GAAGU,CAAQ,IAGzC;AAAA,IACL,UAAAV;AAAA,IACA,eAAAQ;AAAA,IACA,aAAAD;AAAA,IACA,UAAU7B;AAAA,IACV,UAAA4B;AAAA,EAAA;AAEJ;"} \ No newline at end of file diff --git a/lib/index.umd.js.map b/lib/index.umd.js.map index c7bed20..95dda3d 100644 --- a/lib/index.umd.js.map +++ b/lib/index.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"index.umd.js","sources":["../src/commons/record-util.ts","../src/commons/str-utils.ts","../src/commons/file-util.ts"],"sourcesContent":["import { UnwrapNestedRefs } from \"vue\";\r\nexport enum RecordClearMode {\r\n delete = 2,\r\n reset = 1,\r\n}\r\nexport const withRecord = (obj: UnwrapNestedRefs>) => {\r\n return {\r\n clear: function (mode: RecordClearMode = RecordClearMode.delete) {\r\n if (mode === RecordClearMode.reset) {\r\n Object.keys(obj).forEach((key) => {\r\n obj[key] = undefined;\r\n });\r\n } else if (mode === RecordClearMode.delete) {\r\n Object.keys(obj).forEach((key) => {\r\n delete obj[key];\r\n });\r\n }\r\n },\r\n replace: function (newVal: UnwrapNestedRefs>) {\r\n this.clear(RecordClearMode.delete);\r\n Object.assign(obj, newVal);\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * 这是一个泛型函数,接受任意个数的数组作为参数,并返回一个对象。\r\n * 该对象包含两个方法:test 和 path。\r\n * test 方法用于测试所有数组的元素是否相等,\r\n * path 方法用于测试所有数组的指定路径的值是否相等。\r\n\r\n * @param arrays \r\n * @returns \r\n */\r\nexport function assignRecords>(...arrays: T[][]) {\r\n let _arrays = arrays ?? [];\r\n\r\n return {\r\n test: function (equal?: (l: T, r: T) => boolean) {\r\n if (_arrays.length <= 1) {\r\n return _arrays.length === 1 ? _arrays[0] : [];\r\n }\r\n\r\n let localEqual =\r\n equal ??\r\n function (ll: T, rr: T) {\r\n return ll === rr;\r\n };\r\n return _arrays.reduce((acc, crt) => {\r\n if (crt && crt.length > 0) {\r\n if (acc.length === 0) {\r\n acc.push(...crt);\r\n } else {\r\n crt.forEach((c) => {\r\n const some = acc.some((a) => localEqual(a, c));\r\n if (!some) {\r\n acc.push(c);\r\n }\r\n });\r\n }\r\n }\r\n return acc;\r\n }, []);\r\n },\r\n path: function (...paths: string[]) {\r\n return this.test((l, r) => {\r\n return paths.every((path) => {\r\n return l[path] === r[path];\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * 接受一个目标对象和多个源对象作为参数,并返回合并后的对象。\r\n * 它会将源对象的属性复制到目标对象中,\r\n * 如果多个源对象有同名属性,\r\n * 则最后的属性值将覆盖前面的属性值。\r\n * @param target 目标对象\r\n * @param sources 来源对象参数\r\n * @returns 目标对象\r\n */\r\nexport const extend = >(\r\n // 目标对象\r\n target: T,\r\n // 其他对象参数\r\n ...sources: (T | undefined)[]\r\n): T => {\r\n // 遍历其他对象参数\r\n for (const source of sources) {\r\n if (source !== undefined) {\r\n // 遍历参数对象的属性\r\n for (const key in source) {\r\n // 判断属性存在于参数对象中且值不为 null\r\n if (source.hasOwnProperty(key) && source[key] != null) {\r\n // 将属性赋值给目标对象\r\n target[key] = source[key];\r\n }\r\n }\r\n }\r\n }\r\n // 返回目标对象\r\n return target;\r\n};\r\n","/**\r\n * 生成给定函数体的函数注释。\r\n *\r\n * @param {RegExp} regExp - 用于匹配的正则表达式。\r\n * @param {(text: string, match: boolean) => T} matchHandler - 处理匹配到的文本的函数。\r\n * @param {(text: string, match: boolean) => T} [textHandler] - 处理未匹配到的文本的函数。\r\n * @return {(str: string) => T[]} - 分词器函数。\r\n */\r\nexport function stringTokenizer(\r\n regExp: RegExp,\r\n matchHandler: (text: string, match: boolean) => T,\r\n textHandler?: (text: string, match: boolean) => T\r\n): (str: string) => T[] {\r\n\r\n const ifMatch = matchHandler;\r\n const ifText = textHandler?textHandler: matchHandler;\r\n\r\n return function (str: string) {\r\n const result: T[] = [];\r\n const matches = str.matchAll(regExp);\r\n let index = 0;\r\n for (const match of matches) {\r\n const before = str.slice(index, match.index);\r\n if (before) {\r\n result.push(ifText(before, false));\r\n }\r\n result.push(ifMatch(match[0], true));\r\n index = match.index! + match[0].length;\r\n }\r\n if (index < str.length) {\r\n result.push(ifText(str.slice(index), false));\r\n }\r\n return result;\r\n };\r\n}\r\n\r\n/**\r\n * 该函数接受两个参数,判断它们是否相等,不区分大小写。\r\n * 如果参数都是字符串类型,则将它们转换为小写后比较。\r\n * 如果两个参数都是undefined,则返回true,\r\n * 否则返回false。\r\n * @param source \r\n * @param target \r\n * @returns \r\n */\r\nexport function equalsIgnoreCase(\r\n source: string | undefined,\r\n target: string | undefined\r\n) {\r\n if (typeof source === \"string\" && typeof target === \"string\") {\r\n return source.toLowerCase() === target.toLowerCase();\r\n } else if (source === undefined && target === undefined) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * 这个函数接受一个字符串数组和一个字符串作为参数,\r\n * 在数组中判断是否存在与搜索字符串相同或相似的字符串,忽略大小写。\r\n * 如果找到匹配项则返回true,否则返回false。\r\n * @param list 字符串数组\r\n * @param search 用来搜索的字符串\r\n * @returns 是否包含\r\n */\r\nexport const includeIgnoreCase = (list: string[], search: string) => {\r\n for (let i = 0; i < list.length; i++) {\r\n let item = list[i];\r\n if (equalsIgnoreCase(item, search)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\n","/**\r\n * 获取文件的后缀名\r\n * @param fileName 文件名\r\n * @returns 文件后缀名\r\n */\r\nexport function getFileExt(fileName: string): string {\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return \"\";\r\n }\r\n return fileName.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件全名(包含扩展名)\r\n * 该函数接收一个表示文件路径的字符串作为参数,返回该路径中文件名部分。\r\n * 首先查找路径中最后一个斜杠或反斜杠的索引,若未找到则直接返回路径;\r\n * 若找到,则使用substring方法提取最后一个斜杠或反斜杠后面的字符串作为文件名并返回。\r\n * @param path 文件路径\r\n * @returns 文件全名(包含扩展名)\r\n */\r\nexport function getFileFullName(path: string): string {\r\n let index = path.lastIndexOf(\"/\");\r\n if (index === -1) {\r\n index = path.lastIndexOf(\"\\\\\");\r\n if (index === -1) {\r\n return path;\r\n }\r\n }\r\n return path.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件名不包含扩展名\r\n */\r\nexport function getFileNameWithoutExt(path: string): string {\r\n const fileName = getFileFullName(path);\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return fileName;\r\n }\r\n return fileName.substring(0, index);\r\n}\r\n\r\n/**\r\n * 文件信息\r\n */\r\nexport interface IFileInfo {\r\n /** 文件名(包含扩展名) */\r\n fileName: string;\r\n /**\r\n * 文件名不带扩展名\r\n */\r\n fileNameNoExt: string;\r\n /** 文件扩展名 */\r\n fileExtName: string;\r\n /** 路径仅包含文件夹 */\r\n pathOnly: string;\r\n /** 完整路径 */\r\n fullPath: string;\r\n}\r\n\r\n/**\r\n * 获取文件信息\r\n * @param path 文件路径\r\n * @param platform 平台名称,默认为\"win32\"\r\n * @returns 包含文件名、文件名不带扩展名、文件扩展名、路径仅包含文件夹、完整路径的对象\r\n */\r\nexport function getFileInfo(\r\n path: string,\r\n platform: string = \"win32\"\r\n): IFileInfo {\r\n const pathSaprator = platform === \"win32\" ? \"\\\\\" : \"/\";\r\n\r\n let pathOnly: string;\r\n\r\n let fileName: string;\r\n let fileExtName: string;\r\n let fileNameNoExt: string;\r\n const pathIndex = path.lastIndexOf(pathSaprator);\r\n if (pathIndex === -1) {\r\n pathOnly = \"\";\r\n fileName = path;\r\n } else {\r\n pathOnly = path.substring(0, pathIndex + 1);\r\n fileName = path.substring(pathIndex + 1);\r\n }\r\n\r\n const extIndex = fileName.lastIndexOf(\".\");\r\n if (extIndex === -1) {\r\n fileExtName = \"\";\r\n fileNameNoExt = fileName;\r\n } else {\r\n fileExtName = fileName.substring(extIndex + 1);\r\n fileNameNoExt = fileName.substring(0, extIndex);\r\n }\r\n\r\n return {\r\n fileName,\r\n fileNameNoExt,\r\n fileExtName,\r\n fullPath: path,\r\n pathOnly,\r\n };\r\n}\r\n"],"names":["RecordClearMode","withRecord","obj","mode","key","newVal","assignRecords","arrays","_arrays","equal","localEqual","ll","rr","acc","crt","c","a","paths","l","r","path","stringTokenizer","regExp","matchHandler","textHandler","ifMatch","ifText","str","result","matches","index","match","before","equalsIgnoreCase","source","target","includeIgnoreCase","list","search","item","getFileExt","fileName","getFileFullName","getFileNameWithoutExt","getFileInfo","platform","pathSaprator","pathOnly","fileExtName","fileNameNoExt","pathIndex","extIndex"],"mappings":"uOACY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,CAAR,EAAA,QAFUA,IAAAA,GAAA,CAAA,CAAA,EAIC,MAAAC,EAAcC,IAClB,CACL,MAAO,SAAUC,EAAwB,EAAwB,CAC3DA,IAAS,EACX,OAAO,KAAKD,CAAG,EAAE,QAASE,GAAQ,CAChCF,EAAIE,CAAG,EAAI,MAAA,CACZ,EACQD,IAAS,GAClB,OAAO,KAAKD,CAAG,EAAE,QAASE,GAAQ,CAChC,OAAOF,EAAIE,CAAG,CAAA,CACf,CAEL,EACA,QAAS,SAAUC,EAA+C,CAChE,KAAK,MAAM,GACJ,OAAA,OAAOH,EAAKG,CAAM,CAC3B,CAAA,GAaG,SAASC,KAAgDC,EAAe,CACzE,IAAAC,EAAUD,GAAU,GAEjB,MAAA,CACL,KAAM,SAAUE,EAAiC,CAC3C,GAAAD,EAAQ,QAAU,EACpB,OAAOA,EAAQ,SAAW,EAAIA,EAAQ,CAAC,EAAI,GAG7C,IAAIE,EACFD,GACA,SAAUE,EAAOC,EAAO,CACtB,OAAOD,IAAOC,CAAA,EAElB,OAAOJ,EAAQ,OAAO,CAACK,EAAKC,KACtBA,GAAOA,EAAI,OAAS,IAClBD,EAA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AAWC,EAA0B,CAC7C,MAAAX,EAAQW,EAAS,YAAY,GAAG,EACtC,OAAIX,IAAU,GACL,GAEFW,EAAS,UAAUX,EAAQ,CAAC,CACrC,CAUO,SAASY,EAAgBtB,EAAsB,CAChD,IAAAU,EAAQV,EAAK,YAAY,GAAG,EAChC,OAAIU,IAAU,KACJA,EAAAV,EAAK,YAAY,IAAI,EACzBU,IAAU,IACLV,EAGJA,EAAK,UAAUU,EAAQ,CAAC,CACjC,CAKO,SAASa,EAAsBvB,EAAsB,CACpD,MAAAqB,EAAWC,EAAgBtB,CAAI,EAC/BU,EAAQW,EAAS,YAAY,GAAG,EACtC,OAAIX,IAAU,GACLW,EAEFA,EAAS,UAAU,EAAGX,CAAK,CACpC,CA0BgB,SAAAc,EACdxB,EACAyB,EAAmB,QACR,CACL,MAAAC,EAAeD,IAAa,QAAU,KAAO,IAE/C,IAAAE,EAEAN,EACAO,EACAC,EACE,MAAAC,EAAY9B,EAAK,YAAY0B,CAAY,EAC3CI,IAAc,IACLH,EAAA,GACAN,EAAArB,IAEX2B,EAAW3B,EAAK,UAAU,EAAG8B,EAAY,CAAC,EAC/BT,EAAArB,EAAK,UAAU8B,EAAY,CAAC,GAGnC,MAAAC,EAAWV,EAAS,YAAY,GAAG,EACzC,OAAIU,IAAa,IACDH,EAAA,GACEC,EAAAR,IAEFO,EAAAP,EAAS,UAAUU,EAAW,CAAC,EAC7BF,EAAAR,EAAS,UAAU,EAAGU,CAAQ,GAGzC,CACL,SAAAV,EACA,cAAAQ,EACA,YAAAD,EACA,SAAU5B,EACV,SAAA2B,CAAA,CAEJ"} \ No newline at end of file +{"version":3,"file":"index.umd.js","sources":["../src/commons/record-util.ts","../src/commons/str-utils.ts","../src/commons/file-util.ts"],"sourcesContent":["import { UnwrapNestedRefs } from \"vue\";\r\nexport enum RecordClearMode {\r\n delete = 2,\r\n reset = 1,\r\n}\r\nexport const withRecord = (obj: UnwrapNestedRefs>) => {\r\n return {\r\n clear: function (mode: RecordClearMode = RecordClearMode.delete) {\r\n if (mode === RecordClearMode.reset) {\r\n Object.keys(obj).forEach((key) => {\r\n obj[key] = undefined;\r\n });\r\n } else if (mode === RecordClearMode.delete) {\r\n Object.keys(obj).forEach((key) => {\r\n delete obj[key];\r\n });\r\n }\r\n },\r\n replace: function (newVal: UnwrapNestedRefs>) {\r\n this.clear(RecordClearMode.delete);\r\n Object.assign(obj, newVal);\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * 这是一个泛型函数,接受任意个数的数组作为参数,并返回一个对象。\r\n * 该对象包含两个方法:test 和 path。\r\n * test 方法用于测试所有数组的元素是否相等,\r\n * path 方法用于测试所有数组的指定路径的值是否相等。\r\n\r\n * @param arrays \r\n * @returns \r\n */\r\nexport function assignRecords>(...arrays: T[][]) {\r\n let _arrays = arrays ?? [];\r\n\r\n return {\r\n test: function (equal?: (l: T, r: T) => boolean) {\r\n if (_arrays.length <= 1) {\r\n return _arrays.length === 1 ? _arrays[0] : [];\r\n }\r\n\r\n let localEqual =\r\n equal ??\r\n function (ll: T, rr: T) {\r\n return ll === rr;\r\n };\r\n return _arrays.reduce((acc, crt) => {\r\n if (crt && crt.length > 0) {\r\n if (acc.length === 0) {\r\n acc.push(...crt);\r\n } else {\r\n crt.forEach((c) => {\r\n const some = acc.some((a) => localEqual(a, c));\r\n if (!some) {\r\n acc.push(c);\r\n }\r\n });\r\n }\r\n }\r\n return acc;\r\n }, []);\r\n },\r\n path: function (...paths: string[]) {\r\n return this.test((l, r) => {\r\n return paths.every((path) => {\r\n return l[path] === r[path];\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * 接受一个目标对象和多个源对象作为参数,并返回合并后的对象。\r\n * 它会将源对象的属性复制到目标对象中,\r\n * 如果多个源对象有同名属性,\r\n * 则最后的属性值将覆盖前面的属性值。\r\n * @param target 目标对象\r\n * @param sources 来源对象参数\r\n * @returns 目标对象\r\n */\r\nexport const extend = >(\r\n // 目标对象\r\n target: T,\r\n // 其他对象参数\r\n ...sources: (T | undefined)[]\r\n): T => {\r\n // 遍历其他对象参数\r\n for (const source of sources) {\r\n if (source !== undefined) {\r\n // 遍历参数对象的属性\r\n for (const key in source) {\r\n // 判断属性存在于参数对象中且值不为 null\r\n if (source.hasOwnProperty(key) && source[key] != null) {\r\n // 将属性赋值给目标对象\r\n target[key] = source[key];\r\n }\r\n }\r\n }\r\n }\r\n // 返回目标对象\r\n return target;\r\n};\r\n","/**\r\n * 生成给定函数体的函数注释。\r\n *\r\n * @param {RegExp} regExp - 用于匹配的正则表达式。\r\n * @param {(text: string, match: boolean) => T} matchHandler - 处理匹配到的文本的函数。\r\n * @param {(text: string, match: boolean) => T} [textHandler] - 处理未匹配到的文本的函数。\r\n * @return {(str: string) => T[]} - 分词器函数。\r\n */\r\nexport function stringTokenizer(\r\n regExp: RegExp,\r\n matchHandler: (text: string, match: boolean) => T,\r\n textHandler?: (text: string, match: boolean) => T\r\n): (str: string) => T[] {\r\n\r\n const ifMatch = matchHandler;\r\n const ifText = textHandler?textHandler: matchHandler;\r\n\r\n return function (str: string) {\r\n const result: T[] = [];\r\n const matches = str.matchAll(regExp);\r\n let index = 0;\r\n for (const match of matches) {\r\n const before = str.slice(index, match.index);\r\n if (before) {\r\n result.push(ifText(before, false));\r\n }\r\n result.push(ifMatch(match[0], true));\r\n index = match.index! + match[0].length;\r\n }\r\n if (index < str.length) {\r\n result.push(ifText(str.slice(index), false));\r\n }\r\n return result;\r\n };\r\n}\r\n\r\n/**\r\n * 该函数接受两个参数,判断它们是否相等,不区分大小写。\r\n * 如果参数都是字符串类型,则将它们转换为小写后比较。\r\n * 如果两个参数都是undefined,则返回true,\r\n * 否则返回false。\r\n * @param source\r\n * @param target\r\n * @returns\r\n */\r\nexport function equalsIgnoreCase(\r\n source: string | undefined,\r\n target: string | undefined\r\n) {\r\n if (typeof source === \"string\" && typeof target === \"string\") {\r\n return source.toLowerCase() === target.toLowerCase();\r\n } else if (source === undefined && target === undefined) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * 这个函数接受一个字符串数组和一个字符串作为参数,\r\n * 在数组中判断是否存在与搜索字符串相同或相似的字符串,忽略大小写。\r\n * 如果找到匹配项则返回true,否则返回false。\r\n * @param list 字符串数组\r\n * @param search 用来搜索的字符串\r\n * @returns 是否包含\r\n */\r\nexport const includeIgnoreCase = (list: string[], search: string) => {\r\n for (let i = 0; i < list.length; i++) {\r\n let item = list[i];\r\n if (equalsIgnoreCase(item, search)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\nexport const strLength = (str: string) => {\r\n return str.replaceAll(/[\\u4e00-\\u9fa5]/g, \"--\").length;\r\n};\r\n\r\nexport const strMonospacePad = (\r\n str: string,\r\n length: number,\r\n pad: string = \" \"\r\n) => {\r\n const visibleLength = length - (strLength(str) - str.length);\r\n return str.padEnd(visibleLength, pad);\r\n};\r\n","/**\r\n * 获取文件的后缀名\r\n * @param fileName 文件名\r\n * @returns 文件后缀名\r\n */\r\nexport function getFileExt(fileName: string): string {\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return \"\";\r\n }\r\n return fileName.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件全名(包含扩展名)\r\n * 该函数接收一个表示文件路径的字符串作为参数,返回该路径中文件名部分。\r\n * 首先查找路径中最后一个斜杠或反斜杠的索引,若未找到则直接返回路径;\r\n * 若找到,则使用substring方法提取最后一个斜杠或反斜杠后面的字符串作为文件名并返回。\r\n * @param path 文件路径\r\n * @returns 文件全名(包含扩展名)\r\n */\r\nexport function getFileFullName(path: string): string {\r\n let index = path.lastIndexOf(\"/\");\r\n if (index === -1) {\r\n index = path.lastIndexOf(\"\\\\\");\r\n if (index === -1) {\r\n return path;\r\n }\r\n }\r\n return path.substring(index + 1);\r\n}\r\n\r\n/**\r\n * 获取文件名不包含扩展名\r\n */\r\nexport function getFileNameWithoutExt(path: string): string {\r\n const fileName = getFileFullName(path);\r\n const index = fileName.lastIndexOf(\".\");\r\n if (index === -1) {\r\n return fileName;\r\n }\r\n return fileName.substring(0, index);\r\n}\r\n\r\n/**\r\n * 文件信息\r\n */\r\nexport interface IFileInfo {\r\n /** 文件名(包含扩展名) */\r\n fileName: string;\r\n /**\r\n * 文件名不带扩展名\r\n */\r\n fileNameNoExt: string;\r\n /** 文件扩展名 */\r\n fileExtName: string;\r\n /** 路径仅包含文件夹 */\r\n pathOnly: string;\r\n /** 完整路径 */\r\n fullPath: string;\r\n}\r\n\r\n/**\r\n * 获取文件信息\r\n * @param path 文件路径\r\n * @param platform 平台名称,默认为\"win32\"\r\n * @returns 包含文件名、文件名不带扩展名、文件扩展名、路径仅包含文件夹、完整路径的对象\r\n */\r\nexport function getFileInfo(\r\n path: string,\r\n platform: string = \"win32\"\r\n): IFileInfo {\r\n const pathSaprator = platform === \"win32\" ? \"\\\\\" : \"/\";\r\n\r\n let pathOnly: string;\r\n\r\n let fileName: string;\r\n let fileExtName: string;\r\n let fileNameNoExt: string;\r\n const pathIndex = path.lastIndexOf(pathSaprator);\r\n if (pathIndex === -1) {\r\n pathOnly = \"\";\r\n fileName = path;\r\n } else {\r\n pathOnly = path.substring(0, pathIndex + 1);\r\n fileName = path.substring(pathIndex + 1);\r\n }\r\n\r\n const extIndex = fileName.lastIndexOf(\".\");\r\n if (extIndex === -1) {\r\n fileExtName = \"\";\r\n fileNameNoExt = fileName;\r\n } else {\r\n fileExtName = fileName.substring(extIndex + 1);\r\n fileNameNoExt = fileName.substring(0, extIndex);\r\n }\r\n\r\n return {\r\n fileName,\r\n fileNameNoExt,\r\n fileExtName,\r\n fullPath: path,\r\n pathOnly,\r\n };\r\n}\r\n"],"names":["RecordClearMode","withRecord","obj","mode","key","newVal","assignRecords","arrays","_arrays","equal","localEqual","ll","rr","acc","crt","c","a","paths","l","r","path","stringTokenizer","regExp","matchHandler","textHandler","ifMatch","ifText","str","result","matches","index","match","before","equalsIgnoreCase","source","target","includeIgnoreCase","list","search","item","getFileExt","fileName","getFileFullName","getFileNameWithoutExt","getFileInfo","platform","pathSaprator","pathOnly","fileExtName","fileNameNoExt","pathIndex","extIndex"],"mappings":"uOACY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,CAAR,EAAA,QAFUA,IAAAA,GAAA,CAAA,CAAA,EAIC,MAAAC,EAAcC,IAClB,CACL,MAAO,SAAUC,EAAwB,EAAwB,CAC3DA,IAAS,EACX,OAAO,KAAKD,CAAG,EAAE,QAASE,GAAQ,CAChCF,EAAIE,CAAG,EAAI,MAAA,CACZ,EACQD,IAAS,GAClB,OAAO,KAAKD,CAAG,EAAE,QAASE,GAAQ,CAChC,OAAOF,EAAIE,CAAG,CAAA,CACf,CAEL,EACA,QAAS,SAAUC,EAA+C,CAChE,KAAK,MAAM,GACJ,OAAA,OAAOH,EAAKG,CAAM,CAC3B,CAAA,GAaG,SAASC,KAAgDC,EAAe,CACzE,IAAAC,EAAUD,GAAU,GAEjB,MAAA,CACL,KAAM,SAAUE,EAAiC,CAC3C,GAAAD,EAAQ,QAAU,EACpB,OAAOA,EAAQ,SAAW,EAAIA,EAAQ,CAAC,EAAI,GAG7C,IAAIE,EACFD,GACA,SAAUE,EAAOC,EAAO,CACtB,OAAOD,IAAOC,CAAA,EAElB,OAAOJ,EAAQ,OAAO,CAACK,EAAKC,KACtBA,GAAOA,EAAI,OAAS,IAClBD,EAAI,SAAW,EACbA,EAAA,KAAK,GAAGC,CAAG,EAEXA,EAAA,QAASC,GAAM,CACJF,EAAI,KAAMG,GAAMN,EAAWM,EAAGD,CAAC,CAAC,GAE3CF,EAAI,KAAKE,CAAC,CACZ,CACD,GAGEF,GACN,CAAE,CAAA,CACP,EACA,KAAM,YAAaI,EAAiB,CAClC,OAAO,KAAK,KAAK,CAACC,EAAGC,IACZF,EAAM,MAAOG,GACXF,EAAEE,CAAI,IAAMD,EAAEC,CAAI,CAC1B,CACF,CACH,CAAA,CAEJ,CChEgB,SAAA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BtB,CAAI,EAC/BU,EAAQW,EAAS,YAAY,GAAG,EACtC,OAAIX,IAAU,GACLW,EAEFA,EAAS,UAAU,EAAGX,CAAK,CACpC,CA0BgB,SAAAc,EACdxB,EACAyB,EAAmB,QACR,CACL,MAAAC,EAAeD,IAAa,QAAU,KAAO,IAE/C,IAAAE,EAEAN,EACAO,EACAC,EACE,MAAAC,EAAY9B,EAAK,YAAY0B,CAAY,EAC3CI,IAAc,IACLH,EAAA,GACAN,EAAArB,IAEX2B,EAAW3B,EAAK,UAAU,EAAG8B,EAAY,CAAC,EAC/BT,EAAArB,EAAK,UAAU8B,EAAY,CAAC,GAGnC,MAAAC,EAAWV,EAAS,YAAY,GAAG,EACzC,OAAIU,IAAa,IACDH,EAAA,GACEC,EAAAR,IAEFO,EAAAP,EAAS,UAAUU,EAAW,CAAC,EAC7BF,EAAAR,EAAS,UAAU,EAAGU,CAAQ,GAGzC,CACL,SAAAV,EACA,cAAAQ,EACA,YAAAD,EACA,SAAU5B,EACV,SAAA2B,CAAA,CAEJ"} \ No newline at end of file diff --git a/package.json b/package.json index 5210167..ada93d9 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "devDependencies": { "prettier": "^3.0.3", "typescript": "^5.0.2", - "vite": "^4.4.5", + "vite": "^5.1.0-beta.5", "vite-plugin-dts": "^3.6.3", "vue": "^3.2.47" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39936ac..f3a2fd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,17 +17,704 @@ devDependencies: specifier: ^5.0.2 version: registry.npmmirror.com/typescript@5.2.2 vite: - specifier: ^4.4.5 - version: registry.npmmirror.com/vite@4.5.0(@types/node@20.9.0) + specifier: ^5.1.0-beta.5 + version: 5.1.0-beta.5 vite-plugin-dts: specifier: ^3.6.3 - version: registry.npmmirror.com/vite-plugin-dts@3.6.3(typescript@5.2.2)(vite@4.5.0) + version: registry.npmmirror.com/vite-plugin-dts@3.6.3(typescript@5.2.2)(vite@5.1.0-beta.5) vue: specifier: ^3.2.47 version: registry.npmmirror.com/vue@3.3.8(typescript@5.2.2) packages: + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==, tarball: https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==, tarball: https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==, tarball: https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==, tarball: https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==, tarball: https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==, tarball: https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==, tarball: https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==, tarball: https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==, tarball: https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==, tarball: https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==, tarball: https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==, tarball: https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==, tarball: https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==, tarball: https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==, tarball: https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==, tarball: https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==, tarball: https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==, tarball: https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==, tarball: https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==, tarball: https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==, tarball: https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==, tarball: https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==, tarball: https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==, tarball: https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==, tarball: https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==, tarball: https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==, tarball: https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==, tarball: https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==, tarball: https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==, tarball: https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==, tarball: https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==, tarball: https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: false + optional: true + + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==, tarball: https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==, tarball: https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==, tarball: https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==, tarball: https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==, tarball: https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==, tarball: https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==, tarball: https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm-eabi@4.9.6: + resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==, tarball: https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.6: + resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==, tarball: https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.6: + resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==, tarball: https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.6: + resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==, tarball: https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.6: + resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.6: + resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz} + cpu: [arm64] + os: [linux] + libc: [glibc] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.6: + resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz} + cpu: [arm64] + os: [linux] + libc: [musl] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.6: + resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz} + cpu: [riscv64] + os: [linux] + libc: [glibc] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.6: + resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz} + cpu: [x64] + os: [linux] + libc: [glibc] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.6: + resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz} + cpu: [x64] + os: [linux] + libc: [musl] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.6: + resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.6: + resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.6: + resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==, tarball: https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==, tarball: https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz} + dev: true + + /commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==, tarball: https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz} + engines: {node: ^12.20.0 || >=14} + requiresBuild: true + dev: true + optional: true + + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==, tarball: https://registry.npmmirror.com/esbuild/-/esbuild-0.19.12.tgz} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + optional: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, tarball: https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz} + requiresBuild: true + dev: true + optional: true + + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==, tarball: https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz} + dev: true + + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==, tarball: https://registry.npmmirror.com/postcss/-/postcss-8.4.33.tgz} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup@4.9.6: + resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==, tarball: https://registry.npmmirror.com/rollup/-/rollup-4.9.6.tgz} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.6 + '@rollup/rollup-android-arm64': 4.9.6 + '@rollup/rollup-darwin-arm64': 4.9.6 + '@rollup/rollup-darwin-x64': 4.9.6 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 + '@rollup/rollup-linux-arm64-gnu': 4.9.6 + '@rollup/rollup-linux-arm64-musl': 4.9.6 + '@rollup/rollup-linux-riscv64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-musl': 4.9.6 + '@rollup/rollup-win32-arm64-msvc': 4.9.6 + '@rollup/rollup-win32-ia32-msvc': 4.9.6 + '@rollup/rollup-win32-x64-msvc': 4.9.6 + fsevents: 2.3.3 + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, tarball: https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz} + engines: {node: '>=0.10.0'} + dev: true + + /vite@4.5.0(@types/node@20.9.0): + resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==, tarball: https://registry.npmmirror.com/vite/-/vite-4.5.0.tgz} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': registry.npmmirror.com/@types/node@20.9.0 + esbuild: registry.npmmirror.com/esbuild@0.18.20 + postcss: registry.npmmirror.com/postcss@8.4.31 + rollup: registry.npmmirror.com/rollup@3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: false + + /vite@5.1.0-beta.5: + resolution: {integrity: sha512-u0r4fLUPhUb7NjRSr4LiKa5B5crDvLKCQg00wEBTaTi5vmqGEOI51jvgwoRSoNWNbr13cAQgs9/gjgynndHxfg==, tarball: https://registry.npmmirror.com/vite/-/vite-5.1.0-beta.5.tgz} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.12 + postcss: 8.4.33 + rollup: 4.9.6 + optionalDependencies: + fsevents: 2.3.3 + dev: true + registry.npmmirror.com/@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz} name: '@babel/helper-string-parser' @@ -63,226 +750,6 @@ packages: to-fast-properties: registry.npmmirror.com/to-fast-properties@2.0.0 dev: true - registry.npmmirror.com/@esbuild/android-arm64@0.18.20: - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz} - name: '@esbuild/android-arm64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/android-arm@0.18.20: - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz} - name: '@esbuild/android-arm' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/android-x64@0.18.20: - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz} - name: '@esbuild/android-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/darwin-arm64@0.18.20: - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz} - name: '@esbuild/darwin-arm64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/darwin-x64@0.18.20: - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz} - name: '@esbuild/darwin-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/freebsd-arm64@0.18.20: - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz} - name: '@esbuild/freebsd-arm64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/freebsd-x64@0.18.20: - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz} - name: '@esbuild/freebsd-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-arm64@0.18.20: - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz} - name: '@esbuild/linux-arm64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-arm@0.18.20: - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz} - name: '@esbuild/linux-arm' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-ia32@0.18.20: - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz} - name: '@esbuild/linux-ia32' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-loong64@0.18.20: - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz} - name: '@esbuild/linux-loong64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-mips64el@0.18.20: - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz} - name: '@esbuild/linux-mips64el' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-ppc64@0.18.20: - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz} - name: '@esbuild/linux-ppc64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-riscv64@0.18.20: - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz} - name: '@esbuild/linux-riscv64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-s390x@0.18.20: - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz} - name: '@esbuild/linux-s390x' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/linux-x64@0.18.20: - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz} - name: '@esbuild/linux-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/netbsd-x64@0.18.20: - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz} - name: '@esbuild/netbsd-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/openbsd-x64@0.18.20: - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz} - name: '@esbuild/openbsd-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/sunos-x64@0.18.20: - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz} - name: '@esbuild/sunos-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/win32-arm64@0.18.20: - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz} - name: '@esbuild/win32-arm64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/win32-ia32@0.18.20: - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz} - name: '@esbuild/win32-ia32' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - optional: true - - registry.npmmirror.com/@esbuild/win32-x64@0.18.20: - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz} - name: '@esbuild/win32-x64' - version: 0.18.20 - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true - registry.npmmirror.com/@jest/schemas@29.6.3: resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@jest/schemas/-/schemas-29.6.3.tgz} name: '@jest/schemas' @@ -441,6 +908,7 @@ packages: version: 20.9.0 dependencies: undici-types: registry.npmmirror.com/undici-types@5.26.5 + dev: false registry.npmmirror.com/@vitest/expect@0.34.6: resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitest/expect/-/expect-0.34.6.tgz} @@ -739,15 +1207,6 @@ packages: engines: {node: '>=0.1.90'} dev: true - registry.npmmirror.com/commander@9.5.0: - resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz} - name: commander - version: 9.5.0 - engines: {node: ^12.20.0 || >=14} - requiresBuild: true - dev: true - optional: true - registry.npmmirror.com/computeds@0.0.1: resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/computeds/-/computeds-0.0.1.tgz} name: computeds @@ -803,28 +1262,29 @@ packages: hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': registry.npmmirror.com/@esbuild/android-arm@0.18.20 - '@esbuild/android-arm64': registry.npmmirror.com/@esbuild/android-arm64@0.18.20 - '@esbuild/android-x64': registry.npmmirror.com/@esbuild/android-x64@0.18.20 - '@esbuild/darwin-arm64': registry.npmmirror.com/@esbuild/darwin-arm64@0.18.20 - '@esbuild/darwin-x64': registry.npmmirror.com/@esbuild/darwin-x64@0.18.20 - '@esbuild/freebsd-arm64': registry.npmmirror.com/@esbuild/freebsd-arm64@0.18.20 - '@esbuild/freebsd-x64': registry.npmmirror.com/@esbuild/freebsd-x64@0.18.20 - '@esbuild/linux-arm': registry.npmmirror.com/@esbuild/linux-arm@0.18.20 - '@esbuild/linux-arm64': registry.npmmirror.com/@esbuild/linux-arm64@0.18.20 - '@esbuild/linux-ia32': registry.npmmirror.com/@esbuild/linux-ia32@0.18.20 - '@esbuild/linux-loong64': registry.npmmirror.com/@esbuild/linux-loong64@0.18.20 - '@esbuild/linux-mips64el': registry.npmmirror.com/@esbuild/linux-mips64el@0.18.20 - '@esbuild/linux-ppc64': registry.npmmirror.com/@esbuild/linux-ppc64@0.18.20 - '@esbuild/linux-riscv64': registry.npmmirror.com/@esbuild/linux-riscv64@0.18.20 - '@esbuild/linux-s390x': registry.npmmirror.com/@esbuild/linux-s390x@0.18.20 - '@esbuild/linux-x64': registry.npmmirror.com/@esbuild/linux-x64@0.18.20 - '@esbuild/netbsd-x64': registry.npmmirror.com/@esbuild/netbsd-x64@0.18.20 - '@esbuild/openbsd-x64': registry.npmmirror.com/@esbuild/openbsd-x64@0.18.20 - '@esbuild/sunos-x64': registry.npmmirror.com/@esbuild/sunos-x64@0.18.20 - '@esbuild/win32-arm64': registry.npmmirror.com/@esbuild/win32-arm64@0.18.20 - '@esbuild/win32-ia32': registry.npmmirror.com/@esbuild/win32-ia32@0.18.20 - '@esbuild/win32-x64': registry.npmmirror.com/@esbuild/win32-x64@0.18.20 + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: false registry.npmmirror.com/estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz} @@ -855,15 +1315,6 @@ packages: universalify: registry.npmmirror.com/universalify@0.1.2 dev: true - registry.npmmirror.com/fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz} - name: fsevents - version: 2.3.3 - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - optional: true - registry.npmmirror.com/function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz} name: function-bind @@ -936,7 +1387,7 @@ packages: name: jsonfile version: 4.0.0 optionalDependencies: - graceful-fs: registry.npmmirror.com/graceful-fs@4.2.11 + graceful-fs: 4.2.11 dev: true registry.npmmirror.com/kolorist@1.8.0: @@ -1157,7 +1608,8 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: registry.npmmirror.com/fsevents@2.3.3 + fsevents: 2.3.3 + dev: false registry.npmmirror.com/semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz} @@ -1295,6 +1747,7 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz} name: undici-types version: 5.26.5 + dev: false registry.npmmirror.com/universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz} @@ -1331,7 +1784,7 @@ packages: mlly: registry.npmmirror.com/mlly@1.4.2 pathe: registry.npmmirror.com/pathe@1.1.1 picocolors: registry.npmmirror.com/picocolors@1.0.0 - vite: registry.npmmirror.com/vite@4.5.0(@types/node@20.9.0) + vite: 4.5.0(@types/node@20.9.0) transitivePeerDependencies: - '@types/node' - less @@ -1343,7 +1796,7 @@ packages: - terser dev: false - registry.npmmirror.com/vite-plugin-dts@3.6.3(typescript@5.2.2)(vite@4.5.0): + registry.npmmirror.com/vite-plugin-dts@3.6.3(typescript@5.2.2)(vite@5.1.0-beta.5): resolution: {integrity: sha512-NyRvgobl15rYj65coi/gH7UAEH+CpSjh539DbGb40DfOTZSvDLNYTzc8CK4460W+LqXuMK7+U3JAxRB3ksrNPw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-dts/-/vite-plugin-dts-3.6.3.tgz} id: registry.npmmirror.com/vite-plugin-dts/3.6.3 name: vite-plugin-dts @@ -1362,7 +1815,7 @@ packages: debug: registry.npmmirror.com/debug@4.3.4 kolorist: registry.npmmirror.com/kolorist@1.8.0 typescript: registry.npmmirror.com/typescript@5.2.2 - vite: registry.npmmirror.com/vite@4.5.0(@types/node@20.9.0) + vite: 5.1.0-beta.5 vue-tsc: registry.npmmirror.com/vue-tsc@1.8.22(typescript@5.2.2) transitivePeerDependencies: - '@types/node' @@ -1370,44 +1823,6 @@ packages: - supports-color dev: true - registry.npmmirror.com/vite@4.5.0(@types/node@20.9.0): - resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/-/vite-4.5.0.tgz} - id: registry.npmmirror.com/vite/4.5.0 - name: vite - version: 4.5.0 - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': registry.npmmirror.com/@types/node@20.9.0 - esbuild: registry.npmmirror.com/esbuild@0.18.20 - postcss: registry.npmmirror.com/postcss@8.4.31 - rollup: registry.npmmirror.com/rollup@3.29.4 - optionalDependencies: - fsevents: registry.npmmirror.com/fsevents@2.3.3 - registry.npmmirror.com/vitest@0.34.6: resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vitest/-/vitest-0.34.6.tgz} name: vitest @@ -1462,7 +1877,7 @@ packages: strip-literal: registry.npmmirror.com/strip-literal@1.3.0 tinybench: registry.npmmirror.com/tinybench@2.5.1 tinypool: registry.npmmirror.com/tinypool@0.7.0 - vite: registry.npmmirror.com/vite@4.5.0(@types/node@20.9.0) + vite: 4.5.0(@types/node@20.9.0) vite-node: registry.npmmirror.com/vite-node@0.34.6(@types/node@20.9.0) why-is-node-running: registry.npmmirror.com/why-is-node-running@2.2.2 transitivePeerDependencies: @@ -1553,5 +1968,5 @@ packages: lodash.isequal: registry.npmmirror.com/lodash.isequal@4.5.0 validator: registry.npmmirror.com/validator@13.11.0 optionalDependencies: - commander: registry.npmmirror.com/commander@9.5.0 + commander: 9.5.0 dev: true diff --git a/src/commons/str-utils.ts b/src/commons/str-utils.ts index d41dfba..da622a2 100644 --- a/src/commons/str-utils.ts +++ b/src/commons/str-utils.ts @@ -39,9 +39,9 @@ export function stringTokenizer( * 如果参数都是字符串类型,则将它们转换为小写后比较。 * 如果两个参数都是undefined,则返回true, * 否则返回false。 - * @param source - * @param target - * @returns + * @param source + * @param target + * @returns */ export function equalsIgnoreCase( source: string | undefined, @@ -73,3 +73,15 @@ export const includeIgnoreCase = (list: string[], search: string) => { return false; }; +export const strLength = (str: string) => { + return str.replaceAll(/[\u4e00-\u9fa5]/g, "--").length; +}; + +export const strMonospacePad = ( + str: string, + length: number, + pad: string = " " +) => { + const visibleLength = length - (strLength(str) - str.length); + return str.padEnd(visibleLength, pad); +}; diff --git a/tsconfig.json b/tsconfig.json index 8fc6354..758ff4a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ESNext", "useDefineForClassFields": true, "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "skipLibCheck": true, + "lib": ["ES2021", "DOM", "DOM.Iterable"], + "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler",