@base-web-kits/base-tools-ts 1.2.0-alpha.0 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3,23 +3,10 @@ var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
6
  var __getProtoOf = Object.getPrototypeOf;
8
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
8
  var __pow = Math.pow;
11
9
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
10
  var __export = (target, all) => {
24
11
  for (var name in all)
25
12
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -66,64 +53,64 @@ var __async = (__this, __arguments, generator) => {
66
53
  // src/ts/index.ts
67
54
  var index_exports = {};
68
55
  __export(index_exports, {
69
- AbortError: () => AbortError,
56
+ AbortError: () => import_es_toolkit.AbortError,
70
57
  BigNumber: () => import_bignumber.default,
71
58
  EventBus: () => EventBus,
72
- Mutex: () => Mutex,
73
- Semaphore: () => Semaphore,
74
- TimeoutError: () => TimeoutError,
75
- after: () => after,
59
+ Mutex: () => import_es_toolkit.Mutex,
60
+ Semaphore: () => import_es_toolkit.Semaphore,
61
+ TimeoutError: () => import_es_toolkit.TimeoutError,
62
+ after: () => import_es_toolkit.after,
76
63
  appendUrlParam: () => appendUrlParam,
77
64
  arrayMove: () => arrayMove,
78
- ary: () => ary,
79
- assert: () => invariant,
80
- asyncNoop: () => asyncNoop,
81
- at: () => at,
82
- attempt: () => attempt,
83
- attemptAsync: () => attemptAsync,
84
- before: () => before,
65
+ ary: () => import_es_toolkit.ary,
66
+ assert: () => import_es_toolkit.assert,
67
+ asyncNoop: () => import_es_toolkit.asyncNoop,
68
+ at: () => import_es_toolkit.at,
69
+ attempt: () => import_es_toolkit.attempt,
70
+ attemptAsync: () => import_es_toolkit.attemptAsync,
71
+ before: () => import_es_toolkit.before,
85
72
  buildOSSUrl: () => buildOSSUrl,
86
- camelCase: () => camelCase,
87
- capitalize: () => capitalize,
88
- chunk: () => chunk,
89
- clamp: () => clamp,
90
- clone: () => clone,
91
- cloneDeep: () => cloneDeep,
92
- cloneDeepWith: () => cloneDeepWith,
93
- compact: () => compact,
94
- constantCase: () => constantCase,
95
- countBy: () => countBy,
73
+ camelCase: () => import_es_toolkit.camelCase,
74
+ capitalize: () => import_es_toolkit.capitalize,
75
+ chunk: () => import_es_toolkit.chunk,
76
+ clamp: () => import_es_toolkit.clamp,
77
+ clone: () => import_es_toolkit.clone,
78
+ cloneDeep: () => import_es_toolkit.cloneDeep,
79
+ cloneDeepWith: () => import_es_toolkit.cloneDeepWith,
80
+ compact: () => import_es_toolkit.compact,
81
+ constantCase: () => import_es_toolkit.constantCase,
82
+ countBy: () => import_es_toolkit.countBy,
96
83
  createTimeRandId: () => createTimeRandId,
97
84
  createUUID: () => createUUID,
98
85
  createViewRandId: () => createViewRandId,
99
- curry: () => curry,
100
- curryRight: () => curryRight,
86
+ curry: () => import_es_toolkit.curry,
87
+ curryRight: () => import_es_toolkit.curryRight,
101
88
  dayjs: () => import_dayjs.default,
102
- debounce: () => debounce,
103
- deburr: () => deburr,
104
- delay: () => delay,
105
- difference: () => difference,
106
- differenceBy: () => differenceBy,
107
- differenceWith: () => differenceWith,
108
- drop: () => drop,
109
- dropRight: () => dropRight,
110
- dropRightWhile: () => dropRightWhile,
111
- dropWhile: () => dropWhile,
112
- escape: () => escape,
113
- escapeRegExp: () => escapeRegExp,
114
- fill: () => fill,
115
- filterAsync: () => filterAsync,
116
- findKey: () => findKey,
117
- flatMap: () => flatMap,
118
- flatMapAsync: () => flatMapAsync,
119
- flatMapDeep: () => flatMapDeep,
120
- flatten: () => flatten,
121
- flattenDeep: () => flattenDeep,
122
- flattenObject: () => flattenObject,
123
- flow: () => flow,
124
- flowRight: () => flowRight,
125
- forEachAsync: () => forEachAsync,
126
- forEachRight: () => forEachRight,
89
+ debounce: () => import_es_toolkit.debounce,
90
+ deburr: () => import_es_toolkit.deburr,
91
+ delay: () => import_es_toolkit.delay,
92
+ difference: () => import_es_toolkit.difference,
93
+ differenceBy: () => import_es_toolkit.differenceBy,
94
+ differenceWith: () => import_es_toolkit.differenceWith,
95
+ drop: () => import_es_toolkit.drop,
96
+ dropRight: () => import_es_toolkit.dropRight,
97
+ dropRightWhile: () => import_es_toolkit.dropRightWhile,
98
+ dropWhile: () => import_es_toolkit.dropWhile,
99
+ escape: () => import_es_toolkit.escape,
100
+ escapeRegExp: () => import_es_toolkit.escapeRegExp,
101
+ fill: () => import_es_toolkit.fill,
102
+ filterAsync: () => import_es_toolkit.filterAsync,
103
+ findKey: () => import_es_toolkit.findKey,
104
+ flatMap: () => import_es_toolkit.flatMap,
105
+ flatMapAsync: () => import_es_toolkit.flatMapAsync,
106
+ flatMapDeep: () => import_es_toolkit.flatMapDeep,
107
+ flatten: () => import_es_toolkit.flatten,
108
+ flattenDeep: () => import_es_toolkit.flattenDeep,
109
+ flattenObject: () => import_es_toolkit.flattenObject,
110
+ flow: () => import_es_toolkit.flow,
111
+ flowRight: () => import_es_toolkit.flowRight,
112
+ forEachAsync: () => import_es_toolkit.forEachAsync,
113
+ forEachRight: () => import_es_toolkit.forEachRight,
127
114
  getAgeByBirthdate: () => getAgeByBirthdate,
128
115
  getByteLength: () => getByteLength,
129
116
  getCountdownParts: () => getCountdownParts,
@@ -141,86 +128,88 @@ __export(index_exports, {
141
128
  getQnHls: () => getQnHls,
142
129
  getQnImg: () => getQnImg,
143
130
  getQnVideo: () => getQnVideo,
144
- groupBy: () => groupBy,
145
- head: () => head,
146
- identity: () => identity,
147
- inRange: () => inRange,
148
- initial: () => initial,
149
- intersection: () => intersection,
150
- intersectionBy: () => intersectionBy,
151
- intersectionWith: () => intersectionWith,
152
- invariant: () => invariant,
153
- invert: () => invert,
154
- isArrayBuffer: () => isArrayBuffer,
131
+ groupBy: () => import_es_toolkit.groupBy,
132
+ head: () => import_es_toolkit.head,
133
+ identity: () => import_es_toolkit.identity,
134
+ inRange: () => import_es_toolkit.inRange,
135
+ initial: () => import_es_toolkit.initial,
136
+ intersection: () => import_es_toolkit.intersection,
137
+ intersectionBy: () => import_es_toolkit.intersectionBy,
138
+ intersectionWith: () => import_es_toolkit.intersectionWith,
139
+ invariant: () => import_es_toolkit.invariant,
140
+ invert: () => import_es_toolkit.invert,
141
+ isArrayBuffer: () => import_es_toolkit.isArrayBuffer,
155
142
  isBankCard: () => isBankCard,
156
- isBlob: () => isBlob,
157
- isBoolean: () => isBoolean,
158
- isBrowser: () => isBrowser,
159
- isBuffer: () => isBuffer,
143
+ isBlob: () => import_es_toolkit.isBlob,
144
+ isBoolean: () => import_es_toolkit.isBoolean,
145
+ isBrowser: () => import_es_toolkit.isBrowser,
146
+ isBuffer: () => import_es_toolkit.isBuffer,
160
147
  isChinese: () => isChinese,
161
148
  isChineseName: () => isChineseName,
162
- isDate: () => isDate,
149
+ isDate: () => import_es_toolkit.isDate,
163
150
  isDigits: () => isDigits,
164
151
  isEmail: () => isEmail,
165
- isEqual: () => isEqual,
166
- isEqualWith: () => isEqualWith,
167
- isError: () => isError,
168
- isFile: () => isFile,
169
- isFunction: () => isFunction,
152
+ isEmptyObject: () => import_es_toolkit.isEmptyObject,
153
+ isEqual: () => import_es_toolkit.isEqual,
154
+ isEqualWith: () => import_es_toolkit.isEqualWith,
155
+ isError: () => import_es_toolkit.isError,
156
+ isFile: () => import_es_toolkit.isFile,
157
+ isFunction: () => import_es_toolkit.isFunction,
170
158
  isHKMOPermit: () => isHKMOPermit,
171
159
  isHexColor: () => isHexColor,
172
160
  isIP: () => isIP,
173
161
  isIPRange: () => isIPRange,
174
162
  isIPv6: () => isIPv6,
175
163
  isIdentityCard: () => isIdentityCard,
176
- isJSON: () => isJSON,
177
- isJSONArray: () => isJSONArray,
178
- isJSONObject: () => isJSONObject,
179
- isJSONValue: () => isJSONValue,
164
+ isJSON: () => import_es_toolkit.isJSON,
165
+ isJSONArray: () => import_es_toolkit.isJSONArray,
166
+ isJSONObject: () => import_es_toolkit.isJSONObject,
167
+ isJSONValue: () => import_es_toolkit.isJSONValue,
180
168
  isLandline: () => isLandline,
181
169
  isLatitude: () => isLatitude,
182
- isLength: () => isLength,
170
+ isLength: () => import_es_toolkit.isLength,
183
171
  isLetter: () => isLetter,
184
172
  isLicensePlate: () => isLicensePlate,
185
173
  isLongitude: () => isLongitude,
186
- isMap: () => isMap,
174
+ isMap: () => import_es_toolkit.isMap,
187
175
  isMilitaryId: () => isMilitaryId,
188
176
  isMobilePhone: () => isMobilePhone,
189
- isNil: () => isNil,
190
- isNode: () => isNode,
191
- isNotNil: () => isNotNil,
192
- isNull: () => isNull,
177
+ isNil: () => import_es_toolkit.isNil,
178
+ isNode: () => import_es_toolkit.isNode,
179
+ isNotNil: () => import_es_toolkit.isNotNil,
180
+ isNull: () => import_es_toolkit.isNull,
181
+ isNumber: () => import_es_toolkit.isNumber,
193
182
  isNumeric: () => isNumeric,
194
183
  isOfficerId: () => isOfficerId,
195
184
  isPassport: () => isPassport,
196
185
  isPhone: () => isPhone,
197
- isPlainObject: () => isPlainObject,
186
+ isPlainObject: () => import_es_toolkit.isPlainObject,
198
187
  isPortNumber: () => isPortNumber,
199
- isPrimitive: () => isPrimitive,
200
- isPromise: () => isPromise,
201
- isRegExp: () => isRegExp,
202
- isSet: () => isSet,
188
+ isPrimitive: () => import_es_toolkit.isPrimitive,
189
+ isPromise: () => import_es_toolkit.isPromise,
190
+ isRegExp: () => import_es_toolkit.isRegExp,
191
+ isSet: () => import_es_toolkit.isSet,
203
192
  isSoldierId: () => isSoldierId,
204
- isString: () => isString,
205
- isSubset: () => isSubset,
206
- isSubsetWith: () => isSubsetWith,
207
- isSymbol: () => isSymbol2,
193
+ isString: () => import_es_toolkit.isString,
194
+ isSubset: () => import_es_toolkit.isSubset,
195
+ isSubsetWith: () => import_es_toolkit.isSubsetWith,
196
+ isSymbol: () => import_es_toolkit.isSymbol,
208
197
  isTaiwanPermit: () => isTaiwanPermit,
209
198
  isTaxID: () => isTaxID,
210
- isTypedArray: () => isTypedArray,
199
+ isTypedArray: () => import_es_toolkit.isTypedArray,
211
200
  isURL: () => isURL,
212
- isUndefined: () => isUndefined,
213
- isWeakMap: () => isWeakMap,
214
- isWeakSet: () => isWeakSet,
215
- kebabCase: () => kebabCase,
216
- keyBy: () => keyBy,
217
- last: () => last,
218
- limitAsync: () => limitAsync,
219
- lowerCase: () => lowerCase,
220
- lowerFirst: () => lowerFirst,
221
- mapAsync: () => mapAsync,
222
- mapKeys: () => mapKeys,
223
- mapValues: () => mapValues,
201
+ isUndefined: () => import_es_toolkit.isUndefined,
202
+ isWeakMap: () => import_es_toolkit.isWeakMap,
203
+ isWeakSet: () => import_es_toolkit.isWeakSet,
204
+ kebabCase: () => import_es_toolkit.kebabCase,
205
+ keyBy: () => import_es_toolkit.keyBy,
206
+ last: () => import_es_toolkit.last,
207
+ limitAsync: () => import_es_toolkit.limitAsync,
208
+ lowerCase: () => import_es_toolkit.lowerCase,
209
+ lowerFirst: () => import_es_toolkit.lowerFirst,
210
+ mapAsync: () => import_es_toolkit.mapAsync,
211
+ mapKeys: () => import_es_toolkit.mapKeys,
212
+ mapValues: () => import_es_toolkit.mapValues,
224
213
  mathCompare: () => mathCompare,
225
214
  mathDiv: () => mathDiv,
226
215
  mathEqual: () => mathEqual,
@@ -234,99 +223,99 @@ __export(index_exports, {
234
223
  mathPow: () => mathPow,
235
224
  mathRound: () => mathRound,
236
225
  mathTimes: () => mathTimes,
237
- maxBy: () => maxBy,
238
- mean: () => mean,
239
- meanBy: () => meanBy,
240
- median: () => median,
241
- medianBy: () => medianBy,
242
- memoize: () => memoize,
243
- merge: () => merge,
244
- mergeWith: () => mergeWith,
245
- minBy: () => minBy,
246
- negate: () => negate,
247
- noop: () => noop,
248
- omit: () => omit,
249
- omitBy: () => omitBy,
250
- once: () => once,
251
- orderBy: () => orderBy,
252
- pad: () => pad,
253
- partial: () => partial,
254
- partialRight: () => partialRight,
255
- partition: () => partition,
256
- pascalCase: () => pascalCase,
257
- pick: () => pick,
258
- pickBy: () => pickBy,
259
- pull: () => pull,
260
- pullAt: () => pullAt,
261
- random: () => random,
226
+ maxBy: () => import_es_toolkit.maxBy,
227
+ mean: () => import_es_toolkit.mean,
228
+ meanBy: () => import_es_toolkit.meanBy,
229
+ median: () => import_es_toolkit.median,
230
+ medianBy: () => import_es_toolkit.medianBy,
231
+ memoize: () => import_es_toolkit.memoize,
232
+ merge: () => import_es_toolkit.merge,
233
+ mergeWith: () => import_es_toolkit.mergeWith,
234
+ minBy: () => import_es_toolkit.minBy,
235
+ negate: () => import_es_toolkit.negate,
236
+ noop: () => import_es_toolkit.noop,
237
+ omit: () => import_es_toolkit.omit,
238
+ omitBy: () => import_es_toolkit.omitBy,
239
+ once: () => import_es_toolkit.once,
240
+ orderBy: () => import_es_toolkit.orderBy,
241
+ pad: () => import_es_toolkit.pad,
242
+ partial: () => import_es_toolkit.partial,
243
+ partialRight: () => import_es_toolkit.partialRight,
244
+ partition: () => import_es_toolkit.partition,
245
+ pascalCase: () => import_es_toolkit.pascalCase,
246
+ pick: () => import_es_toolkit.pick,
247
+ pickBy: () => import_es_toolkit.pickBy,
248
+ pull: () => import_es_toolkit.pull,
249
+ pullAt: () => import_es_toolkit.pullAt,
250
+ random: () => import_es_toolkit.random,
262
251
  randomBoolean: () => randomBoolean,
263
- randomInt: () => randomInt,
264
- range: () => range,
265
- rangeRight: () => rangeRight,
266
- reduceAsync: () => reduceAsync,
267
- remove: () => remove,
268
- rest: () => rest,
269
- retry: () => retry,
270
- reverseString: () => reverseString,
271
- round: () => round,
272
- sample: () => sample,
273
- sampleSize: () => sampleSize,
252
+ randomInt: () => import_es_toolkit.randomInt,
253
+ range: () => import_es_toolkit.range,
254
+ rangeRight: () => import_es_toolkit.rangeRight,
255
+ reduceAsync: () => import_es_toolkit.reduceAsync,
256
+ remove: () => import_es_toolkit.remove,
257
+ rest: () => import_es_toolkit.rest,
258
+ retry: () => import_es_toolkit.retry,
259
+ reverseString: () => import_es_toolkit.reverseString,
260
+ round: () => import_es_toolkit.round,
261
+ sample: () => import_es_toolkit.sample,
262
+ sampleSize: () => import_es_toolkit.sampleSize,
274
263
  setObjectValue: () => setObjectValue,
275
- shuffle: () => shuffle,
276
- snakeCase: () => snakeCase,
277
- sortBy: () => sortBy,
278
- spread: () => spread,
279
- startCase: () => startCase,
280
- sum: () => sum,
281
- sumBy: () => sumBy,
282
- tail: () => tail,
283
- take: () => take,
284
- takeRight: () => takeRight,
285
- takeRightWhile: () => takeRightWhile,
286
- takeWhile: () => takeWhile,
287
- throttle: () => throttle,
288
- timeout: () => timeout,
264
+ shuffle: () => import_es_toolkit.shuffle,
265
+ snakeCase: () => import_es_toolkit.snakeCase,
266
+ sortBy: () => import_es_toolkit.sortBy,
267
+ spread: () => import_es_toolkit.spread,
268
+ startCase: () => import_es_toolkit.startCase,
269
+ sum: () => import_es_toolkit.sum,
270
+ sumBy: () => import_es_toolkit.sumBy,
271
+ tail: () => import_es_toolkit.tail,
272
+ take: () => import_es_toolkit.take,
273
+ takeRight: () => import_es_toolkit.takeRight,
274
+ takeRightWhile: () => import_es_toolkit.takeRightWhile,
275
+ takeWhile: () => import_es_toolkit.takeWhile,
276
+ throttle: () => import_es_toolkit.throttle,
277
+ timeout: () => import_es_toolkit.timeout,
289
278
  toAsync: () => toAsync,
290
- toCamelCaseKeys: () => toCamelCaseKeys,
279
+ toCamelCaseKeys: () => import_es_toolkit.toCamelCaseKeys,
291
280
  toChineseCurrency: () => toChineseCurrency,
292
281
  toChineseNum: () => toChineseNum,
293
282
  toDayjs: () => toDayjs,
294
- toFilled: () => toFilled,
283
+ toFilled: () => import_es_toolkit.toFilled,
295
284
  toMaskName: () => toMaskName,
296
285
  toMaskPhone: () => toMaskPhone,
297
286
  toMaskText: () => toMaskText,
298
- toMerged: () => toMerged,
299
- toSnakeCaseKeys: () => toSnakeCaseKeys,
287
+ toMerged: () => import_es_toolkit.toMerged,
288
+ toSnakeCaseKeys: () => import_es_toolkit.toSnakeCaseKeys,
300
289
  toThousandth: () => toThousandth,
301
- trim: () => trim,
302
- trimEnd: () => trimEnd,
303
- trimStart: () => trimStart,
304
- unary: () => unary,
305
- unescape: () => unescape2,
306
- union: () => union,
307
- unionBy: () => unionBy,
308
- unionWith: () => unionWith,
309
- uniq: () => uniq,
310
- uniqBy: () => uniqBy,
311
- uniqWith: () => uniqWith,
312
- unzip: () => unzip,
313
- unzipWith: () => unzipWith,
314
- upperCase: () => upperCase,
315
- upperFirst: () => upperFirst,
316
- windowed: () => windowed,
290
+ trim: () => import_es_toolkit.trim,
291
+ trimEnd: () => import_es_toolkit.trimEnd,
292
+ trimStart: () => import_es_toolkit.trimStart,
293
+ unary: () => import_es_toolkit.unary,
294
+ unescape: () => import_es_toolkit.unescape,
295
+ union: () => import_es_toolkit.union,
296
+ unionBy: () => import_es_toolkit.unionBy,
297
+ unionWith: () => import_es_toolkit.unionWith,
298
+ uniq: () => import_es_toolkit.uniq,
299
+ uniqBy: () => import_es_toolkit.uniqBy,
300
+ uniqWith: () => import_es_toolkit.uniqWith,
301
+ unzip: () => import_es_toolkit.unzip,
302
+ unzipWith: () => import_es_toolkit.unzipWith,
303
+ upperCase: () => import_es_toolkit.upperCase,
304
+ upperFirst: () => import_es_toolkit.upperFirst,
305
+ windowed: () => import_es_toolkit.windowed,
317
306
  withDistance: () => withDistance,
318
- withTimeout: () => withTimeout,
307
+ withTimeout: () => import_es_toolkit.withTimeout,
319
308
  withUnit: () => withUnit,
320
309
  withUnitPx: () => withUnitPx,
321
- without: () => without,
322
- words: () => words,
323
- xor: () => xor,
324
- xorBy: () => xorBy,
325
- xorWith: () => xorWith,
310
+ without: () => import_es_toolkit.without,
311
+ words: () => import_es_toolkit.words,
312
+ xor: () => import_es_toolkit.xor,
313
+ xorBy: () => import_es_toolkit.xorBy,
314
+ xorWith: () => import_es_toolkit.xorWith,
326
315
  zeroPad: () => zeroPad,
327
- zip: () => zip,
328
- zipObject: () => zipObject,
329
- zipWith: () => zipWith
316
+ zip: () => import_es_toolkit.zip,
317
+ zipObject: () => import_es_toolkit.zipObject,
318
+ zipWith: () => import_es_toolkit.zipWith
330
319
  });
331
320
  module.exports = __toCommonJS(index_exports);
332
321
 
@@ -665,2718 +654,16 @@ function getAgeByBirthdate(birthdate) {
665
654
  return { age: adjustedMonths, type: "month" };
666
655
  }
667
656
 
668
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/at.mjs
669
- function at(arr, indices) {
670
- const result = new Array(indices.length);
671
- const length = arr.length;
672
- for (let i = 0; i < indices.length; i++) {
673
- let index = indices[i];
674
- index = Number.isInteger(index) ? index : Math.trunc(index) || 0;
675
- if (index < 0) {
676
- index += length;
677
- }
678
- result[i] = arr[index];
679
- }
680
- return result;
681
- }
682
-
683
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/chunk.mjs
684
- function chunk(arr, size) {
685
- if (!Number.isInteger(size) || size <= 0) {
686
- throw new Error("Size must be an integer greater than zero.");
687
- }
688
- const chunkLength = Math.ceil(arr.length / size);
689
- const result = Array(chunkLength);
690
- for (let index = 0; index < chunkLength; index++) {
691
- const start = index * size;
692
- const end = start + size;
693
- result[index] = arr.slice(start, end);
694
- }
695
- return result;
696
- }
697
-
698
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/compact.mjs
699
- function compact(arr) {
700
- const result = [];
701
- for (let i = 0; i < arr.length; i++) {
702
- const item = arr[i];
703
- if (item) {
704
- result.push(item);
705
- }
706
- }
707
- return result;
708
- }
709
-
710
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/countBy.mjs
711
- function countBy(arr, mapper) {
712
- var _a;
713
- const result = {};
714
- for (let i = 0; i < arr.length; i++) {
715
- const item = arr[i];
716
- const key = mapper(item);
717
- result[key] = ((_a = result[key]) != null ? _a : 0) + 1;
718
- }
719
- return result;
720
- }
721
-
722
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/difference.mjs
723
- function difference(firstArr, secondArr) {
724
- const secondSet = new Set(secondArr);
725
- return firstArr.filter((item) => !secondSet.has(item));
726
- }
727
-
728
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/differenceBy.mjs
729
- function differenceBy(firstArr, secondArr, mapper) {
730
- const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
731
- return firstArr.filter((item) => {
732
- return !mappedSecondSet.has(mapper(item));
733
- });
734
- }
735
-
736
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/differenceWith.mjs
737
- function differenceWith(firstArr, secondArr, areItemsEqual) {
738
- return firstArr.filter((firstItem) => {
739
- return secondArr.every((secondItem) => {
740
- return !areItemsEqual(firstItem, secondItem);
741
- });
742
- });
743
- }
744
-
745
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/drop.mjs
746
- function drop(arr, itemsCount) {
747
- itemsCount = Math.max(itemsCount, 0);
748
- return arr.slice(itemsCount);
749
- }
750
-
751
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/dropRight.mjs
752
- function dropRight(arr, itemsCount) {
753
- itemsCount = Math.min(-itemsCount, 0);
754
- if (itemsCount === 0) {
755
- return arr.slice();
756
- }
757
- return arr.slice(0, itemsCount);
758
- }
759
-
760
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/dropRightWhile.mjs
761
- function dropRightWhile(arr, canContinueDropping) {
762
- for (let i = arr.length - 1; i >= 0; i--) {
763
- if (!canContinueDropping(arr[i], i, arr)) {
764
- return arr.slice(0, i + 1);
765
- }
766
- }
767
- return [];
768
- }
769
-
770
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/dropWhile.mjs
771
- function dropWhile(arr, canContinueDropping) {
772
- const dropEndIndex = arr.findIndex((item, index, arr2) => !canContinueDropping(item, index, arr2));
773
- if (dropEndIndex === -1) {
774
- return [];
775
- }
776
- return arr.slice(dropEndIndex);
777
- }
778
-
779
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/fill.mjs
780
- function fill(array, value, start = 0, end = array.length) {
781
- const length = array.length;
782
- const finalStart = Math.max(start >= 0 ? start : length + start, 0);
783
- const finalEnd = Math.min(end >= 0 ? end : length + end, length);
784
- for (let i = finalStart; i < finalEnd; i++) {
785
- array[i] = value;
786
- }
787
- return array;
788
- }
789
-
790
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/promise/semaphore.mjs
791
- var Semaphore = class {
792
- constructor(capacity) {
793
- __publicField(this, "capacity");
794
- __publicField(this, "available");
795
- __publicField(this, "deferredTasks", []);
796
- this.capacity = capacity;
797
- this.available = capacity;
798
- }
799
- acquire() {
800
- return __async(this, null, function* () {
801
- if (this.available > 0) {
802
- this.available--;
803
- return;
804
- }
805
- return new Promise((resolve) => {
806
- this.deferredTasks.push(resolve);
807
- });
808
- });
809
- }
810
- release() {
811
- const deferredTask = this.deferredTasks.shift();
812
- if (deferredTask != null) {
813
- deferredTask();
814
- return;
815
- }
816
- if (this.available < this.capacity) {
817
- this.available++;
818
- }
819
- }
820
- };
821
-
822
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/limitAsync.mjs
823
- function limitAsync(callback, concurrency) {
824
- const semaphore = new Semaphore(concurrency);
825
- return function(...args) {
826
- return __async(this, null, function* () {
827
- try {
828
- yield semaphore.acquire();
829
- return yield callback.apply(this, args);
830
- } finally {
831
- semaphore.release();
832
- }
833
- });
834
- };
835
- }
836
-
837
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/filterAsync.mjs
838
- function filterAsync(array, predicate, options) {
839
- return __async(this, null, function* () {
840
- if ((options == null ? void 0 : options.concurrency) != null) {
841
- predicate = limitAsync(predicate, options.concurrency);
842
- }
843
- const results = yield Promise.all(array.map(predicate));
844
- return array.filter((_, index) => results[index]);
845
- });
846
- }
847
-
848
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/flatten.mjs
849
- function flatten(arr, depth = 1) {
850
- const result = [];
851
- const flooredDepth = Math.floor(depth);
852
- const recursive = (arr2, currentDepth) => {
853
- for (let i = 0; i < arr2.length; i++) {
854
- const item = arr2[i];
855
- if (Array.isArray(item) && currentDepth < flooredDepth) {
856
- recursive(item, currentDepth + 1);
857
- } else {
858
- result.push(item);
859
- }
860
- }
861
- };
862
- recursive(arr, 0);
863
- return result;
864
- }
865
-
866
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/flatMap.mjs
867
- function flatMap(arr, iteratee, depth = 1) {
868
- return flatten(arr.map((item) => iteratee(item)), depth);
869
- }
870
-
871
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/flatMapAsync.mjs
872
- function flatMapAsync(array, callback, options) {
873
- return __async(this, null, function* () {
874
- if ((options == null ? void 0 : options.concurrency) != null) {
875
- callback = limitAsync(callback, options.concurrency);
876
- }
877
- const results = yield Promise.all(array.map(callback));
878
- return flatten(results);
879
- });
880
- }
881
-
882
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/flattenDeep.mjs
883
- function flattenDeep(arr) {
884
- return flatten(arr, Infinity);
885
- }
886
-
887
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/flatMapDeep.mjs
888
- function flatMapDeep(arr, iteratee) {
889
- return flattenDeep(arr.map((item) => iteratee(item)));
890
- }
891
-
892
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/forEachAsync.mjs
893
- function forEachAsync(array, callback, options) {
894
- return __async(this, null, function* () {
895
- if ((options == null ? void 0 : options.concurrency) != null) {
896
- callback = limitAsync(callback, options.concurrency);
897
- }
898
- yield Promise.all(array.map(callback));
899
- });
900
- }
901
-
902
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/forEachRight.mjs
903
- function forEachRight(arr, callback) {
904
- for (let i = arr.length - 1; i >= 0; i--) {
905
- const element = arr[i];
906
- callback(element, i, arr);
907
- }
908
- }
909
-
910
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/groupBy.mjs
911
- function groupBy(arr, getKeyFromItem) {
912
- const result = {};
913
- for (let i = 0; i < arr.length; i++) {
914
- const item = arr[i];
915
- const key = getKeyFromItem(item);
916
- if (!Object.hasOwn(result, key)) {
917
- result[key] = [];
918
- }
919
- result[key].push(item);
920
- }
921
- return result;
922
- }
923
-
924
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/head.mjs
925
- function head(arr) {
926
- return arr[0];
927
- }
928
-
929
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/initial.mjs
930
- function initial(arr) {
931
- return arr.slice(0, -1);
932
- }
933
-
934
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/intersection.mjs
935
- function intersection(firstArr, secondArr) {
936
- const secondSet = new Set(secondArr);
937
- return firstArr.filter((item) => {
938
- return secondSet.has(item);
939
- });
940
- }
941
-
942
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/intersectionBy.mjs
943
- function intersectionBy(firstArr, secondArr, mapper) {
944
- const mappedSecondSet = new Set(secondArr.map(mapper));
945
- return firstArr.filter((item) => mappedSecondSet.has(mapper(item)));
946
- }
947
-
948
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/intersectionWith.mjs
949
- function intersectionWith(firstArr, secondArr, areItemsEqual) {
950
- return firstArr.filter((firstItem) => {
951
- return secondArr.some((secondItem) => {
952
- return areItemsEqual(firstItem, secondItem);
953
- });
954
- });
955
- }
956
-
957
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/isSubset.mjs
958
- function isSubset(superset, subset) {
959
- return difference(subset, superset).length === 0;
960
- }
961
-
962
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/isSubsetWith.mjs
963
- function isSubsetWith(superset, subset, areItemsEqual) {
964
- return differenceWith(subset, superset, areItemsEqual).length === 0;
965
- }
966
-
967
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/keyBy.mjs
968
- function keyBy(arr, getKeyFromItem) {
969
- const result = {};
970
- for (let i = 0; i < arr.length; i++) {
971
- const item = arr[i];
972
- const key = getKeyFromItem(item);
973
- result[key] = item;
974
- }
975
- return result;
976
- }
977
-
978
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/last.mjs
979
- function last(arr) {
980
- return arr[arr.length - 1];
981
- }
982
-
983
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/mapAsync.mjs
984
- function mapAsync(array, callback, options) {
985
- if ((options == null ? void 0 : options.concurrency) != null) {
986
- callback = limitAsync(callback, options.concurrency);
987
- }
988
- return Promise.all(array.map(callback));
989
- }
990
-
991
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/maxBy.mjs
992
- function maxBy(items, getValue) {
993
- if (items.length === 0) {
994
- return void 0;
995
- }
996
- let maxElement = items[0];
997
- let max = getValue(maxElement);
998
- for (let i = 1; i < items.length; i++) {
999
- const element = items[i];
1000
- const value = getValue(element);
1001
- if (value > max) {
1002
- max = value;
1003
- maxElement = element;
1004
- }
1005
- }
1006
- return maxElement;
1007
- }
1008
-
1009
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/minBy.mjs
1010
- function minBy(items, getValue) {
1011
- if (items.length === 0) {
1012
- return void 0;
1013
- }
1014
- let minElement = items[0];
1015
- let min = getValue(minElement);
1016
- for (let i = 1; i < items.length; i++) {
1017
- const element = items[i];
1018
- const value = getValue(element);
1019
- if (value < min) {
1020
- min = value;
1021
- minElement = element;
1022
- }
1023
- }
1024
- return minElement;
1025
- }
1026
-
1027
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
1028
- function compareValues(a, b, order) {
1029
- if (a < b) {
1030
- return order === "asc" ? -1 : 1;
1031
- }
1032
- if (a > b) {
1033
- return order === "asc" ? 1 : -1;
1034
- }
1035
- return 0;
1036
- }
1037
-
1038
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/orderBy.mjs
1039
- function orderBy(arr, criteria, orders) {
1040
- return arr.slice().sort((a, b) => {
1041
- const ordersLength = orders.length;
1042
- for (let i = 0; i < criteria.length; i++) {
1043
- const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
1044
- const criterion = criteria[i];
1045
- const criterionIsFunction = typeof criterion === "function";
1046
- const valueA = criterionIsFunction ? criterion(a) : a[criterion];
1047
- const valueB = criterionIsFunction ? criterion(b) : b[criterion];
1048
- const result = compareValues(valueA, valueB, order);
1049
- if (result !== 0) {
1050
- return result;
1051
- }
1052
- }
1053
- return 0;
1054
- });
1055
- }
1056
-
1057
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/partition.mjs
1058
- function partition(arr, isInTruthy) {
1059
- const truthy = [];
1060
- const falsy = [];
1061
- for (let i = 0; i < arr.length; i++) {
1062
- const item = arr[i];
1063
- if (isInTruthy(item)) {
1064
- truthy.push(item);
1065
- } else {
1066
- falsy.push(item);
1067
- }
1068
- }
1069
- return [truthy, falsy];
1070
- }
1071
-
1072
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/pull.mjs
1073
- function pull(arr, valuesToRemove) {
1074
- const valuesSet = new Set(valuesToRemove);
1075
- let resultIndex = 0;
1076
- for (let i = 0; i < arr.length; i++) {
1077
- if (valuesSet.has(arr[i])) {
1078
- continue;
1079
- }
1080
- if (!Object.hasOwn(arr, i)) {
1081
- delete arr[resultIndex++];
1082
- continue;
1083
- }
1084
- arr[resultIndex++] = arr[i];
1085
- }
1086
- arr.length = resultIndex;
1087
- return arr;
1088
- }
1089
-
1090
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/pullAt.mjs
1091
- function pullAt(arr, indicesToRemove) {
1092
- const removed = at(arr, indicesToRemove);
1093
- const indices = new Set(indicesToRemove.slice().sort((x, y) => y - x));
1094
- for (const index of indices) {
1095
- arr.splice(index, 1);
1096
- }
1097
- return removed;
1098
- }
1099
-
1100
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/reduceAsync.mjs
1101
- function reduceAsync(array, reducer, initialValue) {
1102
- return __async(this, null, function* () {
1103
- let startIndex = 0;
1104
- if (initialValue == null) {
1105
- initialValue = array[0];
1106
- startIndex = 1;
1107
- }
1108
- let accumulator = initialValue;
1109
- for (let i = startIndex; i < array.length; i++) {
1110
- accumulator = yield reducer(accumulator, array[i], i, array);
1111
- }
1112
- return accumulator;
1113
- });
1114
- }
1115
-
1116
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/remove.mjs
1117
- function remove(arr, shouldRemoveElement) {
1118
- const originalArr = arr.slice();
1119
- const removed = [];
1120
- let resultIndex = 0;
1121
- for (let i = 0; i < arr.length; i++) {
1122
- if (shouldRemoveElement(arr[i], i, originalArr)) {
1123
- removed.push(arr[i]);
1124
- continue;
1125
- }
1126
- if (!Object.hasOwn(arr, i)) {
1127
- delete arr[resultIndex++];
1128
- continue;
1129
- }
1130
- arr[resultIndex++] = arr[i];
1131
- }
1132
- arr.length = resultIndex;
1133
- return removed;
1134
- }
1135
-
1136
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/sample.mjs
1137
- function sample(arr) {
1138
- const randomIndex = Math.floor(Math.random() * arr.length);
1139
- return arr[randomIndex];
1140
- }
1141
-
1142
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/random.mjs
1143
- function random(minimum, maximum) {
1144
- if (maximum == null) {
1145
- maximum = minimum;
1146
- minimum = 0;
1147
- }
1148
- if (minimum >= maximum) {
1149
- throw new Error("Invalid input: The maximum value must be greater than the minimum value.");
1150
- }
1151
- return Math.random() * (maximum - minimum) + minimum;
1152
- }
1153
-
1154
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/randomInt.mjs
1155
- function randomInt(minimum, maximum) {
1156
- return Math.floor(random(minimum, maximum));
1157
- }
1158
-
1159
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/sampleSize.mjs
1160
- function sampleSize(array, size) {
1161
- if (size > array.length) {
1162
- throw new Error("Size must be less than or equal to the length of array.");
1163
- }
1164
- const result = new Array(size);
1165
- const selected = /* @__PURE__ */ new Set();
1166
- for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
1167
- let index = randomInt(0, step + 1);
1168
- if (selected.has(index)) {
1169
- index = step;
1170
- }
1171
- selected.add(index);
1172
- result[resultIndex] = array[index];
1173
- }
1174
- return result;
1175
- }
1176
-
1177
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/shuffle.mjs
1178
- function shuffle(arr) {
1179
- const result = arr.slice();
1180
- for (let i = result.length - 1; i >= 1; i--) {
1181
- const j = Math.floor(Math.random() * (i + 1));
1182
- [result[i], result[j]] = [result[j], result[i]];
1183
- }
1184
- return result;
1185
- }
1186
-
1187
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/sortBy.mjs
1188
- function sortBy(arr, criteria) {
1189
- return orderBy(arr, criteria, ["asc"]);
1190
- }
1191
-
1192
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/tail.mjs
1193
- function tail(arr) {
1194
- return arr.slice(1);
1195
- }
1196
-
1197
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
1198
- function isSymbol(value) {
1199
- return typeof value === "symbol" || value instanceof Symbol;
1200
- }
1201
-
1202
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/toNumber.mjs
1203
- function toNumber(value) {
1204
- if (isSymbol(value)) {
1205
- return NaN;
1206
- }
1207
- return Number(value);
1208
- }
1209
-
1210
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/toFinite.mjs
1211
- function toFinite(value) {
1212
- if (!value) {
1213
- return value === 0 ? value : 0;
1214
- }
1215
- value = toNumber(value);
1216
- if (value === Infinity || value === -Infinity) {
1217
- const sign = value < 0 ? -1 : 1;
1218
- return sign * Number.MAX_VALUE;
1219
- }
1220
- return value === value ? value : 0;
1221
- }
1222
-
1223
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/toInteger.mjs
1224
- function toInteger(value) {
1225
- const finite = toFinite(value);
1226
- const remainder = finite % 1;
1227
- return remainder ? finite - remainder : finite;
1228
- }
1229
-
1230
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/take.mjs
1231
- function take(arr, count, guard) {
1232
- count = guard || count === void 0 ? 1 : toInteger(count);
1233
- return arr.slice(0, count);
1234
- }
1235
-
1236
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/takeRight.mjs
1237
- function takeRight(arr, count, guard) {
1238
- count = guard || count === void 0 ? 1 : toInteger(count);
1239
- if (count <= 0 || arr.length === 0) {
1240
- return [];
1241
- }
1242
- return arr.slice(-count);
1243
- }
1244
-
1245
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/takeRightWhile.mjs
1246
- function takeRightWhile(arr, shouldContinueTaking) {
1247
- for (let i = arr.length - 1; i >= 0; i--) {
1248
- if (!shouldContinueTaking(arr[i])) {
1249
- return arr.slice(i + 1);
1250
- }
1251
- }
1252
- return arr.slice();
1253
- }
1254
-
1255
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/takeWhile.mjs
1256
- function takeWhile(arr, shouldContinueTaking) {
1257
- const result = [];
1258
- for (let i = 0; i < arr.length; i++) {
1259
- const item = arr[i];
1260
- if (!shouldContinueTaking(item)) {
1261
- break;
1262
- }
1263
- result.push(item);
1264
- }
1265
- return result;
1266
- }
1267
-
1268
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/toFilled.mjs
1269
- function toFilled(arr, value, start = 0, end = arr.length) {
1270
- const length = arr.length;
1271
- const finalStart = Math.max(start >= 0 ? start : length + start, 0);
1272
- const finalEnd = Math.min(end >= 0 ? end : length + end, length);
1273
- const newArr = arr.slice();
1274
- for (let i = finalStart; i < finalEnd; i++) {
1275
- newArr[i] = value;
1276
- }
1277
- return newArr;
1278
- }
1279
-
1280
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/uniq.mjs
1281
- function uniq(arr) {
1282
- return [...new Set(arr)];
1283
- }
1284
-
1285
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/union.mjs
1286
- function union(arr1, arr2) {
1287
- return uniq(arr1.concat(arr2));
1288
- }
1289
-
1290
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/uniqBy.mjs
1291
- function uniqBy(arr, mapper) {
1292
- const map = /* @__PURE__ */ new Map();
1293
- for (let i = 0; i < arr.length; i++) {
1294
- const item = arr[i];
1295
- const key = mapper(item);
1296
- if (!map.has(key)) {
1297
- map.set(key, item);
1298
- }
1299
- }
1300
- return Array.from(map.values());
1301
- }
1302
-
1303
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/unionBy.mjs
1304
- function unionBy(arr1, arr2, mapper) {
1305
- return uniqBy(arr1.concat(arr2), mapper);
1306
- }
1307
-
1308
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
1309
- function uniqWith(arr, areItemsEqual) {
1310
- const result = [];
1311
- for (let i = 0; i < arr.length; i++) {
1312
- const item = arr[i];
1313
- const isUniq = result.every((v) => !areItemsEqual(v, item));
1314
- if (isUniq) {
1315
- result.push(item);
1316
- }
1317
- }
1318
- return result;
1319
- }
1320
-
1321
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/unionWith.mjs
1322
- function unionWith(arr1, arr2, areItemsEqual) {
1323
- return uniqWith(arr1.concat(arr2), areItemsEqual);
1324
- }
1325
-
1326
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/unzip.mjs
1327
- function unzip(zipped) {
1328
- let maxLen = 0;
1329
- for (let i = 0; i < zipped.length; i++) {
1330
- if (zipped[i].length > maxLen) {
1331
- maxLen = zipped[i].length;
1332
- }
1333
- }
1334
- const result = new Array(maxLen);
1335
- for (let i = 0; i < maxLen; i++) {
1336
- result[i] = new Array(zipped.length);
1337
- for (let j = 0; j < zipped.length; j++) {
1338
- result[i][j] = zipped[j][i];
1339
- }
1340
- }
1341
- return result;
1342
- }
1343
-
1344
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/unzipWith.mjs
1345
- function unzipWith(target, iteratee) {
1346
- const maxLength = Math.max(...target.map((innerArray) => innerArray.length));
1347
- const result = new Array(maxLength);
1348
- for (let i = 0; i < maxLength; i++) {
1349
- const group = new Array(target.length);
1350
- for (let j = 0; j < target.length; j++) {
1351
- group[j] = target[j][i];
1352
- }
1353
- result[i] = iteratee(...group);
1354
- }
1355
- return result;
1356
- }
1357
-
1358
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/windowed.mjs
1359
- function windowed(arr, size, step = 1, { partialWindows = false } = {}) {
1360
- if (size <= 0 || !Number.isInteger(size)) {
1361
- throw new Error("Size must be a positive integer.");
1362
- }
1363
- if (step <= 0 || !Number.isInteger(step)) {
1364
- throw new Error("Step must be a positive integer.");
1365
- }
1366
- const result = [];
1367
- const end = partialWindows ? arr.length : arr.length - size + 1;
1368
- for (let i = 0; i < end; i += step) {
1369
- result.push(arr.slice(i, i + size));
1370
- }
1371
- return result;
1372
- }
1373
-
1374
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/without.mjs
1375
- function without(array, ...values) {
1376
- return difference(array, values);
1377
- }
1378
-
1379
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/xor.mjs
1380
- function xor(arr1, arr2) {
1381
- return difference(union(arr1, arr2), intersection(arr1, arr2));
1382
- }
1383
-
1384
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/xorBy.mjs
1385
- function xorBy(arr1, arr2, mapper) {
1386
- const union2 = unionBy(arr1, arr2, mapper);
1387
- const intersection2 = intersectionBy(arr1, arr2, mapper);
1388
- return differenceBy(union2, intersection2, mapper);
1389
- }
1390
-
1391
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/xorWith.mjs
1392
- function xorWith(arr1, arr2, areElementsEqual) {
1393
- const union2 = unionWith(arr1, arr2, areElementsEqual);
1394
- const intersection2 = intersectionWith(arr1, arr2, areElementsEqual);
1395
- return differenceWith(union2, intersection2, areElementsEqual);
1396
- }
1397
-
1398
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/zip.mjs
1399
- function zip(...arrs) {
1400
- let rowCount = 0;
1401
- for (let i = 0; i < arrs.length; i++) {
1402
- if (arrs[i].length > rowCount) {
1403
- rowCount = arrs[i].length;
1404
- }
1405
- }
1406
- const columnCount = arrs.length;
1407
- const result = Array(rowCount);
1408
- for (let i = 0; i < rowCount; ++i) {
1409
- const row = Array(columnCount);
1410
- for (let j = 0; j < columnCount; ++j) {
1411
- row[j] = arrs[j][i];
1412
- }
1413
- result[i] = row;
1414
- }
1415
- return result;
1416
- }
1417
-
1418
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/zipObject.mjs
1419
- function zipObject(keys, values) {
1420
- const result = {};
1421
- for (let i = 0; i < keys.length; i++) {
1422
- result[keys[i]] = values[i];
1423
- }
1424
- return result;
1425
- }
1426
-
1427
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/array/zipWith.mjs
1428
- function zipWith(arr1, ...rest2) {
1429
- const arrs = [arr1, ...rest2.slice(0, -1)];
1430
- const combine = rest2[rest2.length - 1];
1431
- const maxIndex = Math.max(...arrs.map((arr) => arr.length));
1432
- const result = Array(maxIndex);
1433
- for (let i = 0; i < maxIndex; i++) {
1434
- const elements = arrs.map((arr) => arr[i]);
1435
- result[i] = combine(...elements);
1436
- }
1437
- return result;
1438
- }
1439
-
1440
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/error/AbortError.mjs
1441
- var AbortError = class extends Error {
1442
- constructor(message = "The operation was aborted") {
1443
- super(message);
1444
- this.name = "AbortError";
1445
- }
1446
- };
1447
-
1448
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/error/TimeoutError.mjs
1449
- var TimeoutError = class extends Error {
1450
- constructor(message = "The operation was timed out") {
1451
- super(message);
1452
- this.name = "TimeoutError";
1453
- }
1454
- };
1455
-
1456
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/after.mjs
1457
- function after(n, func) {
1458
- if (!Number.isInteger(n) || n < 0) {
1459
- throw new Error(`n must be a non-negative integer.`);
1460
- }
1461
- let counter = 0;
1462
- return (...args) => {
1463
- if (++counter >= n) {
1464
- return func(...args);
1465
- }
1466
- return void 0;
1467
- };
1468
- }
1469
-
1470
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/ary.mjs
1471
- function ary(func, n) {
1472
- return function(...args) {
1473
- return func.apply(this, args.slice(0, n));
1474
- };
1475
- }
1476
-
1477
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/asyncNoop.mjs
1478
- function asyncNoop() {
1479
- return __async(this, null, function* () {
1480
- });
1481
- }
1482
-
1483
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/before.mjs
1484
- function before(n, func) {
1485
- if (!Number.isInteger(n) || n < 0) {
1486
- throw new Error("n must be a non-negative integer.");
1487
- }
1488
- let counter = 0;
1489
- return (...args) => {
1490
- if (++counter < n) {
1491
- return func(...args);
1492
- }
1493
- return void 0;
1494
- };
1495
- }
1496
-
1497
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/curry.mjs
1498
- function curry(func) {
1499
- if (func.length === 0 || func.length === 1) {
1500
- return func;
1501
- }
1502
- return function(arg) {
1503
- return makeCurry(func, func.length, [arg]);
1504
- };
1505
- }
1506
- function makeCurry(origin, argsLength, args) {
1507
- if (args.length === argsLength) {
1508
- return origin(...args);
1509
- } else {
1510
- const next = function(arg) {
1511
- return makeCurry(origin, argsLength, [...args, arg]);
1512
- };
1513
- return next;
1514
- }
1515
- }
1516
-
1517
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/curryRight.mjs
1518
- function curryRight(func) {
1519
- if (func.length === 0 || func.length === 1) {
1520
- return func;
1521
- }
1522
- return function(arg) {
1523
- return makeCurryRight(func, func.length, [arg]);
1524
- };
1525
- }
1526
- function makeCurryRight(origin, argsLength, args) {
1527
- if (args.length === argsLength) {
1528
- return origin(...args);
1529
- } else {
1530
- const next = function(arg) {
1531
- return makeCurryRight(origin, argsLength, [arg, ...args]);
1532
- };
1533
- return next;
1534
- }
1535
- }
1536
-
1537
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/debounce.mjs
1538
- function debounce(func, debounceMs, { signal, edges } = {}) {
1539
- let pendingThis = void 0;
1540
- let pendingArgs = null;
1541
- const leading = edges != null && edges.includes("leading");
1542
- const trailing = edges == null || edges.includes("trailing");
1543
- const invoke = () => {
1544
- if (pendingArgs !== null) {
1545
- func.apply(pendingThis, pendingArgs);
1546
- pendingThis = void 0;
1547
- pendingArgs = null;
1548
- }
1549
- };
1550
- const onTimerEnd = () => {
1551
- if (trailing) {
1552
- invoke();
1553
- }
1554
- cancel();
1555
- };
1556
- let timeoutId = null;
1557
- const schedule = () => {
1558
- if (timeoutId != null) {
1559
- clearTimeout(timeoutId);
1560
- }
1561
- timeoutId = setTimeout(() => {
1562
- timeoutId = null;
1563
- onTimerEnd();
1564
- }, debounceMs);
1565
- };
1566
- const cancelTimer = () => {
1567
- if (timeoutId !== null) {
1568
- clearTimeout(timeoutId);
1569
- timeoutId = null;
1570
- }
1571
- };
1572
- const cancel = () => {
1573
- cancelTimer();
1574
- pendingThis = void 0;
1575
- pendingArgs = null;
1576
- };
1577
- const flush = () => {
1578
- invoke();
1579
- };
1580
- const debounced = function(...args) {
1581
- if (signal == null ? void 0 : signal.aborted) {
1582
- return;
1583
- }
1584
- pendingThis = this;
1585
- pendingArgs = args;
1586
- const isFirstCall = timeoutId == null;
1587
- schedule();
1588
- if (leading && isFirstCall) {
1589
- invoke();
1590
- }
1591
- };
1592
- debounced.schedule = schedule;
1593
- debounced.cancel = cancel;
1594
- debounced.flush = flush;
1595
- signal == null ? void 0 : signal.addEventListener("abort", cancel, { once: true });
1596
- return debounced;
1597
- }
1598
-
1599
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/flow.mjs
1600
- function flow(...funcs) {
1601
- return function(...args) {
1602
- let result = funcs.length ? funcs[0].apply(this, args) : args[0];
1603
- for (let i = 1; i < funcs.length; i++) {
1604
- result = funcs[i].call(this, result);
1605
- }
1606
- return result;
1607
- };
1608
- }
1609
-
1610
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/flowRight.mjs
1611
- function flowRight(...funcs) {
1612
- return flow(...funcs.reverse());
1613
- }
1614
-
1615
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/identity.mjs
1616
- function identity(x) {
1617
- return x;
1618
- }
1619
-
1620
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/memoize.mjs
1621
- function memoize(fn, options = {}) {
1622
- const { cache = /* @__PURE__ */ new Map(), getCacheKey } = options;
1623
- const memoizedFn = function(arg) {
1624
- const key = getCacheKey ? getCacheKey(arg) : arg;
1625
- if (cache.has(key)) {
1626
- return cache.get(key);
1627
- }
1628
- const result = fn.call(this, arg);
1629
- cache.set(key, result);
1630
- return result;
1631
- };
1632
- memoizedFn.cache = cache;
1633
- return memoizedFn;
1634
- }
1635
-
1636
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/negate.mjs
1637
- function negate(func) {
1638
- return ((...args) => !func(...args));
1639
- }
1640
-
1641
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/noop.mjs
1642
- function noop() {
1643
- }
1644
-
1645
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/once.mjs
1646
- function once(func) {
1647
- let called = false;
1648
- let cache;
1649
- return function(...args) {
1650
- if (!called) {
1651
- called = true;
1652
- cache = func(...args);
1653
- }
1654
- return cache;
1655
- };
1656
- }
1657
-
1658
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/partial.mjs
1659
- function partial(func, ...partialArgs) {
1660
- return partialImpl(func, placeholderSymbol, ...partialArgs);
1661
- }
1662
- function partialImpl(func, placeholder, ...partialArgs) {
1663
- const partialed = function(...providedArgs) {
1664
- let providedArgsIndex = 0;
1665
- const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
1666
- const remainingArgs = providedArgs.slice(providedArgsIndex);
1667
- return func.apply(this, substitutedArgs.concat(remainingArgs));
1668
- };
1669
- if (func.prototype) {
1670
- partialed.prototype = Object.create(func.prototype);
1671
- }
1672
- return partialed;
1673
- }
1674
- var placeholderSymbol = /* @__PURE__ */ Symbol("partial.placeholder");
1675
- partial.placeholder = placeholderSymbol;
1676
-
1677
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/partialRight.mjs
1678
- function partialRight(func, ...partialArgs) {
1679
- return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
1680
- }
1681
- function partialRightImpl(func, placeholder, ...partialArgs) {
1682
- const partialedRight = function(...providedArgs) {
1683
- const placeholderLength = partialArgs.filter((arg) => arg === placeholder).length;
1684
- const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);
1685
- const remainingArgs = providedArgs.slice(0, rangeLength);
1686
- let providedArgsIndex = rangeLength;
1687
- const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
1688
- return func.apply(this, remainingArgs.concat(substitutedArgs));
1689
- };
1690
- if (func.prototype) {
1691
- partialedRight.prototype = Object.create(func.prototype);
1692
- }
1693
- return partialedRight;
1694
- }
1695
- var placeholderSymbol2 = /* @__PURE__ */ Symbol("partialRight.placeholder");
1696
- partialRight.placeholder = placeholderSymbol2;
1697
-
1698
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/rest.mjs
1699
- function rest(func, startIndex = func.length - 1) {
1700
- return function(...args) {
1701
- const rest2 = args.slice(startIndex);
1702
- const params = args.slice(0, startIndex);
1703
- while (params.length < startIndex) {
1704
- params.push(void 0);
1705
- }
1706
- return func.apply(this, [...params, rest2]);
1707
- };
1708
- }
1709
-
1710
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/promise/delay.mjs
1711
- function delay(ms, { signal } = {}) {
1712
- return new Promise((resolve, reject) => {
1713
- const abortError = () => {
1714
- reject(new AbortError());
1715
- };
1716
- const abortHandler = () => {
1717
- clearTimeout(timeoutId);
1718
- abortError();
1719
- };
1720
- if (signal == null ? void 0 : signal.aborted) {
1721
- return abortError();
1722
- }
1723
- const timeoutId = setTimeout(() => {
1724
- signal == null ? void 0 : signal.removeEventListener("abort", abortHandler);
1725
- resolve();
1726
- }, ms);
1727
- signal == null ? void 0 : signal.addEventListener("abort", abortHandler, { once: true });
1728
- });
1729
- }
1730
-
1731
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/retry.mjs
1732
- var DEFAULT_DELAY = 0;
1733
- var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
1734
- function retry(func, _options) {
1735
- return __async(this, null, function* () {
1736
- var _a, _b;
1737
- let delay$1;
1738
- let retries;
1739
- let signal;
1740
- if (typeof _options === "number") {
1741
- delay$1 = DEFAULT_DELAY;
1742
- retries = _options;
1743
- signal = void 0;
1744
- } else {
1745
- delay$1 = (_a = _options == null ? void 0 : _options.delay) != null ? _a : DEFAULT_DELAY;
1746
- retries = (_b = _options == null ? void 0 : _options.retries) != null ? _b : DEFAULT_RETRIES;
1747
- signal = _options == null ? void 0 : _options.signal;
1748
- }
1749
- let error;
1750
- for (let attempts = 0; attempts < retries; attempts++) {
1751
- if (signal == null ? void 0 : signal.aborted) {
1752
- throw error != null ? error : new Error(`The retry operation was aborted due to an abort signal.`);
1753
- }
1754
- try {
1755
- return yield func();
1756
- } catch (err) {
1757
- error = err;
1758
- const currentDelay = typeof delay$1 === "function" ? delay$1(attempts) : delay$1;
1759
- yield delay(currentDelay);
1760
- }
1761
- }
1762
- throw error;
1763
- });
1764
- }
1765
-
1766
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/spread.mjs
1767
- function spread(func) {
1768
- return function(argsArr) {
1769
- return func.apply(this, argsArr);
1770
- };
1771
- }
1772
-
1773
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/throttle.mjs
1774
- function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] } = {}) {
1775
- let pendingAt = null;
1776
- const debounced = debounce(func, throttleMs, { signal, edges });
1777
- const throttled = function(...args) {
1778
- if (pendingAt == null) {
1779
- pendingAt = Date.now();
1780
- } else {
1781
- if (Date.now() - pendingAt >= throttleMs) {
1782
- pendingAt = Date.now();
1783
- debounced.cancel();
1784
- }
1785
- }
1786
- debounced.apply(this, args);
1787
- };
1788
- throttled.cancel = debounced.cancel;
1789
- throttled.flush = debounced.flush;
1790
- return throttled;
1791
- }
1792
-
1793
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/function/unary.mjs
1794
- function unary(func) {
1795
- return ary(func, 1);
1796
- }
1797
-
1798
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/clamp.mjs
1799
- function clamp(value, bound1, bound2) {
1800
- if (bound2 == null) {
1801
- return Math.min(value, bound1);
1802
- }
1803
- return Math.min(Math.max(value, bound1), bound2);
1804
- }
1805
-
1806
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/inRange.mjs
1807
- function inRange(value, minimum, maximum) {
1808
- if (maximum == null) {
1809
- maximum = minimum;
1810
- minimum = 0;
1811
- }
1812
- if (minimum >= maximum) {
1813
- throw new Error("The maximum value must be greater than the minimum value.");
1814
- }
1815
- return minimum <= value && value < maximum;
1816
- }
1817
-
1818
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/sum.mjs
1819
- function sum(nums) {
1820
- let result = 0;
1821
- for (let i = 0; i < nums.length; i++) {
1822
- result += nums[i];
1823
- }
1824
- return result;
1825
- }
1826
-
1827
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/mean.mjs
1828
- function mean(nums) {
1829
- return sum(nums) / nums.length;
1830
- }
1831
-
1832
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/sumBy.mjs
1833
- function sumBy(items, getValue) {
1834
- let result = 0;
1835
- for (let i = 0; i < items.length; i++) {
1836
- result += getValue(items[i], i);
1837
- }
1838
- return result;
1839
- }
1840
-
1841
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/meanBy.mjs
1842
- function meanBy(items, getValue) {
1843
- return sumBy(items, (item) => getValue(item)) / items.length;
1844
- }
1845
-
1846
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/median.mjs
1847
- function median(nums) {
1848
- if (nums.length === 0) {
1849
- return NaN;
1850
- }
1851
- const sorted = nums.slice().sort((a, b) => a - b);
1852
- const middleIndex = Math.floor(sorted.length / 2);
1853
- if (sorted.length % 2 === 0) {
1854
- return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2;
1855
- } else {
1856
- return sorted[middleIndex];
1857
- }
1858
- }
1859
-
1860
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/medianBy.mjs
1861
- function medianBy(items, getValue) {
1862
- const nums = items.map((x) => getValue(x));
1863
- return median(nums);
1864
- }
1865
-
1866
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/range.mjs
1867
- function range(start, end, step = 1) {
1868
- if (end == null) {
1869
- end = start;
1870
- start = 0;
1871
- }
1872
- if (!Number.isInteger(step) || step === 0) {
1873
- throw new Error(`The step value must be a non-zero integer.`);
1874
- }
1875
- const length = Math.max(Math.ceil((end - start) / step), 0);
1876
- const result = new Array(length);
1877
- for (let i = 0; i < length; i++) {
1878
- result[i] = start + i * step;
1879
- }
1880
- return result;
1881
- }
1882
-
1883
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/rangeRight.mjs
1884
- function rangeRight(start, end, step = 1) {
1885
- if (end == null) {
1886
- end = start;
1887
- start = 0;
1888
- }
1889
- if (!Number.isInteger(step) || step === 0) {
1890
- throw new Error(`The step value must be a non-zero integer.`);
1891
- }
1892
- const length = Math.max(Math.ceil((end - start) / step), 0);
1893
- const result = new Array(length);
1894
- for (let i = 0; i < length; i++) {
1895
- result[i] = start + (length - i - 1) * step;
1896
- }
1897
- return result;
1898
- }
1899
-
1900
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/math/round.mjs
1901
- function round(value, precision = 0) {
1902
- if (!Number.isInteger(precision)) {
1903
- throw new Error("Precision must be an integer.");
1904
- }
1905
- const multiplier = Math.pow(10, precision);
1906
- return Math.round(value * multiplier) / multiplier;
1907
- }
1908
-
1909
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1910
- function isPrimitive(value) {
1911
- return value == null || typeof value !== "object" && typeof value !== "function";
1912
- }
1913
-
1914
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
1915
- function isTypedArray(x) {
1916
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
1917
- }
1918
-
1919
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/clone.mjs
1920
- function clone(obj) {
1921
- if (isPrimitive(obj)) {
1922
- return obj;
1923
- }
1924
- if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) {
1925
- return obj.slice(0);
1926
- }
1927
- const prototype = Object.getPrototypeOf(obj);
1928
- const Constructor = prototype.constructor;
1929
- if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {
1930
- return new Constructor(obj);
1931
- }
1932
- if (obj instanceof RegExp) {
1933
- const newRegExp = new Constructor(obj);
1934
- newRegExp.lastIndex = obj.lastIndex;
1935
- return newRegExp;
1936
- }
1937
- if (obj instanceof DataView) {
1938
- return new Constructor(obj.buffer.slice(0));
1939
- }
1940
- if (obj instanceof Error) {
1941
- const newError = new Constructor(obj.message);
1942
- newError.stack = obj.stack;
1943
- newError.name = obj.name;
1944
- newError.cause = obj.cause;
1945
- return newError;
1946
- }
1947
- if (typeof File !== "undefined" && obj instanceof File) {
1948
- const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
1949
- return newFile;
1950
- }
1951
- if (typeof obj === "object") {
1952
- const newObject = Object.create(prototype);
1953
- return Object.assign(newObject, obj);
1954
- }
1955
- return obj;
1956
- }
1957
-
1958
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
1959
- function getSymbols(object) {
1960
- return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
1961
- }
1962
-
1963
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
1964
- function getTag(value) {
1965
- if (value == null) {
1966
- return value === void 0 ? "[object Undefined]" : "[object Null]";
1967
- }
1968
- return Object.prototype.toString.call(value);
1969
- }
1970
-
1971
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
1972
- var regexpTag = "[object RegExp]";
1973
- var stringTag = "[object String]";
1974
- var numberTag = "[object Number]";
1975
- var booleanTag = "[object Boolean]";
1976
- var argumentsTag = "[object Arguments]";
1977
- var symbolTag = "[object Symbol]";
1978
- var dateTag = "[object Date]";
1979
- var mapTag = "[object Map]";
1980
- var setTag = "[object Set]";
1981
- var arrayTag = "[object Array]";
1982
- var functionTag = "[object Function]";
1983
- var arrayBufferTag = "[object ArrayBuffer]";
1984
- var objectTag = "[object Object]";
1985
- var errorTag = "[object Error]";
1986
- var dataViewTag = "[object DataView]";
1987
- var uint8ArrayTag = "[object Uint8Array]";
1988
- var uint8ClampedArrayTag = "[object Uint8ClampedArray]";
1989
- var uint16ArrayTag = "[object Uint16Array]";
1990
- var uint32ArrayTag = "[object Uint32Array]";
1991
- var bigUint64ArrayTag = "[object BigUint64Array]";
1992
- var int8ArrayTag = "[object Int8Array]";
1993
- var int16ArrayTag = "[object Int16Array]";
1994
- var int32ArrayTag = "[object Int32Array]";
1995
- var bigInt64ArrayTag = "[object BigInt64Array]";
1996
- var float32ArrayTag = "[object Float32Array]";
1997
- var float64ArrayTag = "[object Float64Array]";
1998
-
1999
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
2000
- function cloneDeepWith(obj, cloneValue) {
2001
- return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
2002
- }
2003
- function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
2004
- const cloned = cloneValue == null ? void 0 : cloneValue(valueToClone, keyToClone, objectToClone, stack);
2005
- if (cloned !== void 0) {
2006
- return cloned;
2007
- }
2008
- if (isPrimitive(valueToClone)) {
2009
- return valueToClone;
2010
- }
2011
- if (stack.has(valueToClone)) {
2012
- return stack.get(valueToClone);
2013
- }
2014
- if (Array.isArray(valueToClone)) {
2015
- const result = new Array(valueToClone.length);
2016
- stack.set(valueToClone, result);
2017
- for (let i = 0; i < valueToClone.length; i++) {
2018
- result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
2019
- }
2020
- if (Object.hasOwn(valueToClone, "index")) {
2021
- result.index = valueToClone.index;
2022
- }
2023
- if (Object.hasOwn(valueToClone, "input")) {
2024
- result.input = valueToClone.input;
2025
- }
2026
- return result;
2027
- }
2028
- if (valueToClone instanceof Date) {
2029
- return new Date(valueToClone.getTime());
2030
- }
2031
- if (valueToClone instanceof RegExp) {
2032
- const result = new RegExp(valueToClone.source, valueToClone.flags);
2033
- result.lastIndex = valueToClone.lastIndex;
2034
- return result;
2035
- }
2036
- if (valueToClone instanceof Map) {
2037
- const result = /* @__PURE__ */ new Map();
2038
- stack.set(valueToClone, result);
2039
- for (const [key, value] of valueToClone) {
2040
- result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
2041
- }
2042
- return result;
2043
- }
2044
- if (valueToClone instanceof Set) {
2045
- const result = /* @__PURE__ */ new Set();
2046
- stack.set(valueToClone, result);
2047
- for (const value of valueToClone) {
2048
- result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
2049
- }
2050
- return result;
2051
- }
2052
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) {
2053
- return valueToClone.subarray();
2054
- }
2055
- if (isTypedArray(valueToClone)) {
2056
- const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
2057
- stack.set(valueToClone, result);
2058
- for (let i = 0; i < valueToClone.length; i++) {
2059
- result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
2060
- }
2061
- return result;
2062
- }
2063
- if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) {
2064
- return valueToClone.slice(0);
2065
- }
2066
- if (valueToClone instanceof DataView) {
2067
- const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
2068
- stack.set(valueToClone, result);
2069
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2070
- return result;
2071
- }
2072
- if (typeof File !== "undefined" && valueToClone instanceof File) {
2073
- const result = new File([valueToClone], valueToClone.name, {
2074
- type: valueToClone.type
2075
- });
2076
- stack.set(valueToClone, result);
2077
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2078
- return result;
2079
- }
2080
- if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
2081
- const result = new Blob([valueToClone], { type: valueToClone.type });
2082
- stack.set(valueToClone, result);
2083
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2084
- return result;
2085
- }
2086
- if (valueToClone instanceof Error) {
2087
- const result = new valueToClone.constructor();
2088
- stack.set(valueToClone, result);
2089
- result.message = valueToClone.message;
2090
- result.name = valueToClone.name;
2091
- result.stack = valueToClone.stack;
2092
- result.cause = valueToClone.cause;
2093
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2094
- return result;
2095
- }
2096
- if (valueToClone instanceof Boolean) {
2097
- const result = new Boolean(valueToClone.valueOf());
2098
- stack.set(valueToClone, result);
2099
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2100
- return result;
2101
- }
2102
- if (valueToClone instanceof Number) {
2103
- const result = new Number(valueToClone.valueOf());
2104
- stack.set(valueToClone, result);
2105
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2106
- return result;
2107
- }
2108
- if (valueToClone instanceof String) {
2109
- const result = new String(valueToClone.valueOf());
2110
- stack.set(valueToClone, result);
2111
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2112
- return result;
2113
- }
2114
- if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
2115
- const result = Object.create(Object.getPrototypeOf(valueToClone));
2116
- stack.set(valueToClone, result);
2117
- copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
2118
- return result;
2119
- }
2120
- return valueToClone;
2121
- }
2122
- function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
2123
- const keys = [...Object.keys(source), ...getSymbols(source)];
2124
- for (let i = 0; i < keys.length; i++) {
2125
- const key = keys[i];
2126
- const descriptor = Object.getOwnPropertyDescriptor(target, key);
2127
- if (descriptor == null || descriptor.writable) {
2128
- target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
2129
- }
2130
- }
2131
- }
2132
- function isCloneableObject(object) {
2133
- switch (getTag(object)) {
2134
- case argumentsTag:
2135
- case arrayTag:
2136
- case arrayBufferTag:
2137
- case dataViewTag:
2138
- case booleanTag:
2139
- case dateTag:
2140
- case float32ArrayTag:
2141
- case float64ArrayTag:
2142
- case int8ArrayTag:
2143
- case int16ArrayTag:
2144
- case int32ArrayTag:
2145
- case mapTag:
2146
- case numberTag:
2147
- case objectTag:
2148
- case regexpTag:
2149
- case setTag:
2150
- case stringTag:
2151
- case symbolTag:
2152
- case uint8ArrayTag:
2153
- case uint8ClampedArrayTag:
2154
- case uint16ArrayTag:
2155
- case uint32ArrayTag: {
2156
- return true;
2157
- }
2158
- default: {
2159
- return false;
2160
- }
2161
- }
2162
- }
2163
-
2164
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
2165
- function cloneDeep(obj) {
2166
- return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
2167
- }
2168
-
2169
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/findKey.mjs
2170
- function findKey(obj, predicate) {
2171
- const keys = Object.keys(obj);
2172
- return keys.find((key) => predicate(obj[key], key, obj));
2173
- }
2174
-
2175
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2176
- function isPlainObject(value) {
2177
- if (!value || typeof value !== "object") {
2178
- return false;
2179
- }
2180
- const proto = Object.getPrototypeOf(value);
2181
- const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
2182
- if (!hasObjectPrototype) {
2183
- return false;
2184
- }
2185
- return Object.prototype.toString.call(value) === "[object Object]";
2186
- }
2187
-
2188
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/flattenObject.mjs
2189
- function flattenObject(object, { delimiter = "." } = {}) {
2190
- return flattenObjectImpl(object, "", delimiter);
2191
- }
2192
- function flattenObjectImpl(object, prefix, delimiter) {
2193
- const result = {};
2194
- const keys = Object.keys(object);
2195
- for (let i = 0; i < keys.length; i++) {
2196
- const key = keys[i];
2197
- const value = object[key];
2198
- const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;
2199
- if (isPlainObject(value) && Object.keys(value).length > 0) {
2200
- Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
2201
- continue;
2202
- }
2203
- if (Array.isArray(value)) {
2204
- Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
2205
- continue;
2206
- }
2207
- result[prefixedKey] = value;
2208
- }
2209
- return result;
2210
- }
2211
-
2212
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/invert.mjs
2213
- function invert(obj) {
2214
- const result = {};
2215
- const keys = Object.keys(obj);
2216
- for (let i = 0; i < keys.length; i++) {
2217
- const key = keys[i];
2218
- const value = obj[key];
2219
- result[value] = key;
2220
- }
2221
- return result;
2222
- }
2223
-
2224
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/mapKeys.mjs
2225
- function mapKeys(object, getNewKey) {
2226
- const result = {};
2227
- const keys = Object.keys(object);
2228
- for (let i = 0; i < keys.length; i++) {
2229
- const key = keys[i];
2230
- const value = object[key];
2231
- result[getNewKey(value, key, object)] = value;
2232
- }
2233
- return result;
2234
- }
2235
-
2236
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/mapValues.mjs
2237
- function mapValues(object, getNewValue) {
2238
- const result = {};
2239
- const keys = Object.keys(object);
2240
- for (let i = 0; i < keys.length; i++) {
2241
- const key = keys[i];
2242
- const value = object[key];
2243
- result[key] = getNewValue(value, key, object);
2244
- }
2245
- return result;
2246
- }
2247
-
2248
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
2249
- function isUnsafeProperty(key) {
2250
- return key === "__proto__";
2251
- }
2252
-
2253
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/merge.mjs
2254
- function merge(target, source) {
2255
- const sourceKeys = Object.keys(source);
2256
- for (let i = 0; i < sourceKeys.length; i++) {
2257
- const key = sourceKeys[i];
2258
- if (isUnsafeProperty(key)) {
2259
- continue;
2260
- }
2261
- const sourceValue = source[key];
2262
- const targetValue = target[key];
2263
- if (Array.isArray(sourceValue)) {
2264
- if (Array.isArray(targetValue)) {
2265
- target[key] = merge(targetValue, sourceValue);
2266
- } else {
2267
- target[key] = merge([], sourceValue);
2268
- }
2269
- } else if (isPlainObject(sourceValue)) {
2270
- if (isPlainObject(targetValue)) {
2271
- target[key] = merge(targetValue, sourceValue);
2272
- } else {
2273
- target[key] = merge({}, sourceValue);
2274
- }
2275
- } else if (targetValue === void 0 || sourceValue !== void 0) {
2276
- target[key] = sourceValue;
2277
- }
2278
- }
2279
- return target;
2280
- }
2281
-
2282
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
2283
- function mergeWith(target, source, merge2) {
2284
- const sourceKeys = Object.keys(source);
2285
- for (let i = 0; i < sourceKeys.length; i++) {
2286
- const key = sourceKeys[i];
2287
- if (isUnsafeProperty(key)) {
2288
- continue;
2289
- }
2290
- const sourceValue = source[key];
2291
- const targetValue = target[key];
2292
- const merged = merge2(targetValue, sourceValue, key, target, source);
2293
- if (merged !== void 0) {
2294
- target[key] = merged;
2295
- } else if (Array.isArray(sourceValue)) {
2296
- if (Array.isArray(targetValue)) {
2297
- target[key] = mergeWith(targetValue, sourceValue, merge2);
2298
- } else {
2299
- target[key] = mergeWith([], sourceValue, merge2);
2300
- }
2301
- } else if (isPlainObject(sourceValue)) {
2302
- if (isPlainObject(targetValue)) {
2303
- target[key] = mergeWith(targetValue, sourceValue, merge2);
2304
- } else {
2305
- target[key] = mergeWith({}, sourceValue, merge2);
2306
- }
2307
- } else if (targetValue === void 0 || sourceValue !== void 0) {
2308
- target[key] = sourceValue;
2309
- }
2310
- }
2311
- return target;
2312
- }
2313
-
2314
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/omit.mjs
2315
- function omit(obj, keys) {
2316
- const result = __spreadValues({}, obj);
2317
- for (let i = 0; i < keys.length; i++) {
2318
- const key = keys[i];
2319
- delete result[key];
2320
- }
2321
- return result;
2322
- }
2323
-
2324
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/omitBy.mjs
2325
- function omitBy(obj, shouldOmit) {
2326
- const result = {};
2327
- const keys = Object.keys(obj);
2328
- for (let i = 0; i < keys.length; i++) {
2329
- const key = keys[i];
2330
- const value = obj[key];
2331
- if (!shouldOmit(value, key)) {
2332
- result[key] = value;
2333
- }
2334
- }
2335
- return result;
2336
- }
2337
-
2338
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/pick.mjs
2339
- function pick(obj, keys) {
2340
- const result = {};
2341
- for (let i = 0; i < keys.length; i++) {
2342
- const key = keys[i];
2343
- if (Object.hasOwn(obj, key)) {
2344
- result[key] = obj[key];
2345
- }
2346
- }
2347
- return result;
2348
- }
2349
-
2350
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/pickBy.mjs
2351
- function pickBy(obj, shouldPick) {
2352
- const result = {};
2353
- const keys = Object.keys(obj);
2354
- for (let i = 0; i < keys.length; i++) {
2355
- const key = keys[i];
2356
- const value = obj[key];
2357
- if (shouldPick(value, key)) {
2358
- result[key] = value;
2359
- }
2360
- }
2361
- return result;
2362
- }
2363
-
2364
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
2365
- function isArray(value) {
2366
- return Array.isArray(value);
2367
- }
2368
-
2369
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/capitalize.mjs
2370
- function capitalize(str) {
2371
- return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
2372
- }
2373
-
2374
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/words.mjs
2375
- var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
2376
- function words(str) {
2377
- var _a;
2378
- return Array.from((_a = str.match(CASE_SPLIT_PATTERN)) != null ? _a : []);
2379
- }
2380
-
2381
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/camelCase.mjs
2382
- function camelCase(str) {
2383
- const words$1 = words(str);
2384
- if (words$1.length === 0) {
2385
- return "";
2386
- }
2387
- const [first, ...rest2] = words$1;
2388
- return `${first.toLowerCase()}${rest2.map((word) => capitalize(word)).join("")}`;
2389
- }
2390
-
2391
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/toCamelCaseKeys.mjs
2392
- function toCamelCaseKeys(obj) {
2393
- if (isArray(obj)) {
2394
- return obj.map((item) => toCamelCaseKeys(item));
2395
- }
2396
- if (isPlainObject(obj)) {
2397
- const result = {};
2398
- const keys = Object.keys(obj);
2399
- for (let i = 0; i < keys.length; i++) {
2400
- const key = keys[i];
2401
- const camelKey = camelCase(key);
2402
- const convertedValue = toCamelCaseKeys(obj[key]);
2403
- result[camelKey] = convertedValue;
2404
- }
2405
- return result;
2406
- }
2407
- return obj;
2408
- }
2409
-
2410
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/toMerged.mjs
2411
- function toMerged(target, source) {
2412
- return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
2413
- if (Array.isArray(sourceValue)) {
2414
- if (Array.isArray(targetValue)) {
2415
- return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
2416
- } else {
2417
- return mergeWith([], sourceValue, mergeRecursively);
2418
- }
2419
- } else if (isPlainObject(sourceValue)) {
2420
- if (isPlainObject(targetValue)) {
2421
- return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
2422
- } else {
2423
- return mergeWith({}, sourceValue, mergeRecursively);
2424
- }
2425
- }
2426
- });
2427
- }
2428
-
2429
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
2430
- function isPlainObject2(object) {
2431
- var _a;
2432
- if (typeof object !== "object") {
2433
- return false;
2434
- }
2435
- if (object == null) {
2436
- return false;
2437
- }
2438
- if (Object.getPrototypeOf(object) === null) {
2439
- return true;
2440
- }
2441
- if (Object.prototype.toString.call(object) !== "[object Object]") {
2442
- const tag = object[Symbol.toStringTag];
2443
- if (tag == null) {
2444
- return false;
2445
- }
2446
- const isTagReadonly = !((_a = Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)) == null ? void 0 : _a.writable);
2447
- if (isTagReadonly) {
2448
- return false;
2449
- }
2450
- return object.toString() === `[object ${tag}]`;
2451
- }
2452
- let proto = object;
2453
- while (Object.getPrototypeOf(proto) !== null) {
2454
- proto = Object.getPrototypeOf(proto);
2455
- }
2456
- return Object.getPrototypeOf(object) === proto;
2457
- }
2458
-
2459
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/snakeCase.mjs
2460
- function snakeCase(str) {
2461
- const words$1 = words(str);
2462
- return words$1.map((word) => word.toLowerCase()).join("_");
2463
- }
2464
-
2465
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/object/toSnakeCaseKeys.mjs
2466
- function toSnakeCaseKeys(obj) {
2467
- if (isArray(obj)) {
2468
- return obj.map((item) => toSnakeCaseKeys(item));
2469
- }
2470
- if (isPlainObject2(obj)) {
2471
- const result = {};
2472
- const keys = Object.keys(obj);
2473
- for (let i = 0; i < keys.length; i++) {
2474
- const key = keys[i];
2475
- const snakeKey = snakeCase(key);
2476
- const convertedValue = toSnakeCaseKeys(obj[key]);
2477
- result[snakeKey] = convertedValue;
2478
- }
2479
- return result;
2480
- }
2481
- return obj;
2482
- }
2483
-
2484
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isArrayBuffer.mjs
2485
- function isArrayBuffer(value) {
2486
- return value instanceof ArrayBuffer;
2487
- }
2488
-
2489
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isBlob.mjs
2490
- function isBlob(x) {
2491
- if (typeof Blob === "undefined") {
2492
- return false;
2493
- }
2494
- return x instanceof Blob;
2495
- }
2496
-
2497
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isBoolean.mjs
2498
- function isBoolean(x) {
2499
- return typeof x === "boolean";
2500
- }
2501
-
2502
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isBrowser.mjs
2503
- function isBrowser() {
2504
- return typeof window !== "undefined" && (window == null ? void 0 : window.document) != null;
2505
- }
2506
-
2507
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
2508
- function isBuffer(x) {
2509
- return typeof Buffer !== "undefined" && Buffer.isBuffer(x);
2510
- }
2511
-
2512
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isDate.mjs
2513
- function isDate(value) {
2514
- return value instanceof Date;
2515
- }
2516
-
2517
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
2518
- function eq(value, other) {
2519
- return value === other || Number.isNaN(value) && Number.isNaN(other);
2520
- }
2521
-
2522
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2523
- function isEqualWith(a, b, areValuesEqual) {
2524
- return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
2525
- }
2526
- function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
2527
- const result = areValuesEqual(a, b, property, aParent, bParent, stack);
2528
- if (result !== void 0) {
2529
- return result;
2530
- }
2531
- if (typeof a === typeof b) {
2532
- switch (typeof a) {
2533
- case "bigint":
2534
- case "string":
2535
- case "boolean":
2536
- case "symbol":
2537
- case "undefined": {
2538
- return a === b;
2539
- }
2540
- case "number": {
2541
- return a === b || Object.is(a, b);
2542
- }
2543
- case "function": {
2544
- return a === b;
2545
- }
2546
- case "object": {
2547
- return areObjectsEqual(a, b, stack, areValuesEqual);
2548
- }
2549
- }
2550
- }
2551
- return areObjectsEqual(a, b, stack, areValuesEqual);
2552
- }
2553
- function areObjectsEqual(a, b, stack, areValuesEqual) {
2554
- if (Object.is(a, b)) {
2555
- return true;
2556
- }
2557
- let aTag = getTag(a);
2558
- let bTag = getTag(b);
2559
- if (aTag === argumentsTag) {
2560
- aTag = objectTag;
2561
- }
2562
- if (bTag === argumentsTag) {
2563
- bTag = objectTag;
2564
- }
2565
- if (aTag !== bTag) {
2566
- return false;
2567
- }
2568
- switch (aTag) {
2569
- case stringTag:
2570
- return a.toString() === b.toString();
2571
- case numberTag: {
2572
- const x = a.valueOf();
2573
- const y = b.valueOf();
2574
- return eq(x, y);
2575
- }
2576
- case booleanTag:
2577
- case dateTag:
2578
- case symbolTag:
2579
- return Object.is(a.valueOf(), b.valueOf());
2580
- case regexpTag: {
2581
- return a.source === b.source && a.flags === b.flags;
2582
- }
2583
- case functionTag: {
2584
- return a === b;
2585
- }
2586
- }
2587
- stack = stack != null ? stack : /* @__PURE__ */ new Map();
2588
- const aStack = stack.get(a);
2589
- const bStack = stack.get(b);
2590
- if (aStack != null && bStack != null) {
2591
- return aStack === b;
2592
- }
2593
- stack.set(a, b);
2594
- stack.set(b, a);
2595
- try {
2596
- switch (aTag) {
2597
- case mapTag: {
2598
- if (a.size !== b.size) {
2599
- return false;
2600
- }
2601
- for (const [key, value] of a.entries()) {
2602
- if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) {
2603
- return false;
2604
- }
2605
- }
2606
- return true;
2607
- }
2608
- case setTag: {
2609
- if (a.size !== b.size) {
2610
- return false;
2611
- }
2612
- const aValues = Array.from(a.values());
2613
- const bValues = Array.from(b.values());
2614
- for (let i = 0; i < aValues.length; i++) {
2615
- const aValue = aValues[i];
2616
- const index = bValues.findIndex((bValue) => {
2617
- return isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);
2618
- });
2619
- if (index === -1) {
2620
- return false;
2621
- }
2622
- bValues.splice(index, 1);
2623
- }
2624
- return true;
2625
- }
2626
- case arrayTag:
2627
- case uint8ArrayTag:
2628
- case uint8ClampedArrayTag:
2629
- case uint16ArrayTag:
2630
- case uint32ArrayTag:
2631
- case bigUint64ArrayTag:
2632
- case int8ArrayTag:
2633
- case int16ArrayTag:
2634
- case int32ArrayTag:
2635
- case bigInt64ArrayTag:
2636
- case float32ArrayTag:
2637
- case float64ArrayTag: {
2638
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) {
2639
- return false;
2640
- }
2641
- if (a.length !== b.length) {
2642
- return false;
2643
- }
2644
- for (let i = 0; i < a.length; i++) {
2645
- if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) {
2646
- return false;
2647
- }
2648
- }
2649
- return true;
2650
- }
2651
- case arrayBufferTag: {
2652
- if (a.byteLength !== b.byteLength) {
2653
- return false;
2654
- }
2655
- return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
2656
- }
2657
- case dataViewTag: {
2658
- if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) {
2659
- return false;
2660
- }
2661
- return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
2662
- }
2663
- case errorTag: {
2664
- return a.name === b.name && a.message === b.message;
2665
- }
2666
- case objectTag: {
2667
- const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b);
2668
- if (!areEqualInstances) {
2669
- return false;
2670
- }
2671
- const aKeys = [...Object.keys(a), ...getSymbols(a)];
2672
- const bKeys = [...Object.keys(b), ...getSymbols(b)];
2673
- if (aKeys.length !== bKeys.length) {
2674
- return false;
2675
- }
2676
- for (let i = 0; i < aKeys.length; i++) {
2677
- const propKey = aKeys[i];
2678
- const aProp = a[propKey];
2679
- if (!Object.hasOwn(b, propKey)) {
2680
- return false;
2681
- }
2682
- const bProp = b[propKey];
2683
- if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) {
2684
- return false;
2685
- }
2686
- }
2687
- return true;
2688
- }
2689
- default: {
2690
- return false;
2691
- }
2692
- }
2693
- } finally {
2694
- stack.delete(a);
2695
- stack.delete(b);
2696
- }
2697
- }
2698
-
2699
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
2700
- function isEqual(a, b) {
2701
- return isEqualWith(a, b, noop);
2702
- }
2703
-
2704
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isError.mjs
2705
- function isError(value) {
2706
- return value instanceof Error;
2707
- }
2708
-
2709
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isFile.mjs
2710
- function isFile(x) {
2711
- if (typeof File === "undefined") {
2712
- return false;
2713
- }
2714
- return isBlob(x) && x instanceof File;
2715
- }
2716
-
2717
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isFunction.mjs
2718
- function isFunction(value) {
2719
- return typeof value === "function";
2720
- }
2721
-
2722
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isJSON.mjs
2723
- function isJSON(value) {
2724
- if (typeof value !== "string") {
2725
- return false;
2726
- }
2727
- try {
2728
- JSON.parse(value);
2729
- return true;
2730
- } catch (e) {
2731
- return false;
2732
- }
2733
- }
2734
-
2735
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isJSONValue.mjs
2736
- function isJSONValue(value) {
2737
- switch (typeof value) {
2738
- case "object": {
2739
- return value === null || isJSONArray(value) || isJSONObject(value);
2740
- }
2741
- case "string":
2742
- case "number":
2743
- case "boolean": {
2744
- return true;
2745
- }
2746
- default: {
2747
- return false;
2748
- }
2749
- }
2750
- }
2751
- function isJSONArray(value) {
2752
- if (!Array.isArray(value)) {
2753
- return false;
2754
- }
2755
- return value.every((item) => isJSONValue(item));
2756
- }
2757
- function isJSONObject(obj) {
2758
- if (!isPlainObject(obj)) {
2759
- return false;
2760
- }
2761
- const keys = Reflect.ownKeys(obj);
2762
- for (let i = 0; i < keys.length; i++) {
2763
- const key = keys[i];
2764
- const value = obj[key];
2765
- if (typeof key !== "string") {
2766
- return false;
2767
- }
2768
- if (!isJSONValue(value)) {
2769
- return false;
2770
- }
2771
- }
2772
- return true;
2773
- }
2774
-
2775
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
2776
- function isLength(value) {
2777
- return Number.isSafeInteger(value) && value >= 0;
2778
- }
2779
-
2780
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isMap.mjs
2781
- function isMap(value) {
2782
- return value instanceof Map;
2783
- }
2784
-
2785
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isNil.mjs
2786
- function isNil(x) {
2787
- return x == null;
2788
- }
2789
-
2790
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isNode.mjs
2791
- function isNode() {
2792
- var _a;
2793
- return typeof process !== "undefined" && ((_a = process == null ? void 0 : process.versions) == null ? void 0 : _a.node) != null;
2794
- }
2795
-
2796
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isNotNil.mjs
2797
- function isNotNil(x) {
2798
- return x != null;
2799
- }
2800
-
2801
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isNull.mjs
2802
- function isNull(x) {
2803
- return x === null;
2804
- }
2805
-
2806
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isPromise.mjs
2807
- function isPromise(value) {
2808
- return value instanceof Promise;
2809
- }
2810
-
2811
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isRegExp.mjs
2812
- function isRegExp(value) {
2813
- return value instanceof RegExp;
2814
- }
2815
-
2816
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isSet.mjs
2817
- function isSet(value) {
2818
- return value instanceof Set;
2819
- }
2820
-
2821
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isString.mjs
2822
- function isString(value) {
2823
- return typeof value === "string";
2824
- }
2825
-
2826
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isSymbol.mjs
2827
- function isSymbol2(value) {
2828
- return typeof value === "symbol";
2829
- }
2830
-
2831
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isUndefined.mjs
2832
- function isUndefined(x) {
2833
- return x === void 0;
2834
- }
2835
-
2836
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isWeakMap.mjs
2837
- function isWeakMap(value) {
2838
- return value instanceof WeakMap;
2839
- }
2840
-
2841
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/predicate/isWeakSet.mjs
2842
- function isWeakSet(value) {
2843
- return value instanceof WeakSet;
2844
- }
2845
-
2846
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/promise/mutex.mjs
2847
- var Mutex = class {
2848
- constructor() {
2849
- __publicField(this, "semaphore", new Semaphore(1));
2850
- }
2851
- get isLocked() {
2852
- return this.semaphore.available === 0;
2853
- }
2854
- acquire() {
2855
- return __async(this, null, function* () {
2856
- return this.semaphore.acquire();
2857
- });
2858
- }
2859
- release() {
2860
- this.semaphore.release();
2861
- }
2862
- };
2863
-
2864
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/promise/timeout.mjs
2865
- function timeout(ms) {
2866
- return __async(this, null, function* () {
2867
- yield delay(ms);
2868
- throw new TimeoutError();
2869
- });
2870
- }
2871
-
2872
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/promise/withTimeout.mjs
2873
- function withTimeout(run, ms) {
2874
- return __async(this, null, function* () {
2875
- return Promise.race([run(), timeout(ms)]);
2876
- });
2877
- }
2878
-
2879
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/constantCase.mjs
2880
- function constantCase(str) {
2881
- const words$1 = words(str);
2882
- return words$1.map((word) => word.toUpperCase()).join("_");
2883
- }
2884
-
2885
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/deburr.mjs
2886
- var deburrMap = new Map(Object.entries({
2887
- \u00C6: "Ae",
2888
- \u00D0: "D",
2889
- \u00D8: "O",
2890
- \u00DE: "Th",
2891
- \u00DF: "ss",
2892
- \u00E6: "ae",
2893
- \u00F0: "d",
2894
- \u00F8: "o",
2895
- \u00FE: "th",
2896
- \u0110: "D",
2897
- \u0111: "d",
2898
- \u0126: "H",
2899
- \u0127: "h",
2900
- \u0131: "i",
2901
- \u0132: "IJ",
2902
- \u0133: "ij",
2903
- \u0138: "k",
2904
- \u013F: "L",
2905
- \u0140: "l",
2906
- \u0141: "L",
2907
- \u0142: "l",
2908
- \u0149: "'n",
2909
- \u014A: "N",
2910
- \u014B: "n",
2911
- \u0152: "Oe",
2912
- \u0153: "oe",
2913
- \u0166: "T",
2914
- \u0167: "t",
2915
- \u017F: "s"
2916
- }));
2917
- function deburr(str) {
2918
- var _a;
2919
- str = str.normalize("NFD");
2920
- let result = "";
2921
- for (let i = 0; i < str.length; i++) {
2922
- const char = str[i];
2923
- if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23") {
2924
- continue;
2925
- }
2926
- result += (_a = deburrMap.get(char)) != null ? _a : char;
2927
- }
2928
- return result;
2929
- }
2930
-
2931
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/escape.mjs
2932
- var htmlEscapes = {
2933
- "&": "&amp;",
2934
- "<": "&lt;",
2935
- ">": "&gt;",
2936
- '"': "&quot;",
2937
- "'": "&#39;"
2938
- };
2939
- function escape(str) {
2940
- return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
2941
- }
2942
-
2943
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/escapeRegExp.mjs
2944
- function escapeRegExp(str) {
2945
- return str.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
2946
- }
2947
-
2948
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/kebabCase.mjs
2949
- function kebabCase(str) {
2950
- const words$1 = words(str);
2951
- return words$1.map((word) => word.toLowerCase()).join("-");
2952
- }
2953
-
2954
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/lowerCase.mjs
2955
- function lowerCase(str) {
2956
- const words$1 = words(str);
2957
- return words$1.map((word) => word.toLowerCase()).join(" ");
2958
- }
2959
-
2960
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/lowerFirst.mjs
2961
- function lowerFirst(str) {
2962
- return str.substring(0, 1).toLowerCase() + str.substring(1);
2963
- }
2964
-
2965
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/pad.mjs
2966
- function pad(str, length, chars = " ") {
2967
- return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
2968
- }
2969
-
2970
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/pascalCase.mjs
2971
- function pascalCase(str) {
2972
- const words$1 = words(str);
2973
- return words$1.map((word) => capitalize(word)).join("");
2974
- }
2975
-
2976
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/reverseString.mjs
2977
- function reverseString(value) {
2978
- return [...value].reverse().join("");
2979
- }
2980
-
2981
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/startCase.mjs
2982
- function startCase(str) {
2983
- const words$1 = words(str.trim());
2984
- let result = "";
2985
- for (let i = 0; i < words$1.length; i++) {
2986
- const word = words$1[i];
2987
- if (result) {
2988
- result += " ";
2989
- }
2990
- result += word[0].toUpperCase() + word.slice(1).toLowerCase();
2991
- }
2992
- return result;
2993
- }
2994
-
2995
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/trimEnd.mjs
2996
- function trimEnd(str, chars) {
2997
- if (chars === void 0) {
2998
- return str.trimEnd();
2999
- }
3000
- let endIndex = str.length;
3001
- switch (typeof chars) {
3002
- case "string": {
3003
- if (chars.length !== 1) {
3004
- throw new Error(`The 'chars' parameter should be a single character string.`);
3005
- }
3006
- while (endIndex > 0 && str[endIndex - 1] === chars) {
3007
- endIndex--;
3008
- }
3009
- break;
3010
- }
3011
- case "object": {
3012
- while (endIndex > 0 && chars.includes(str[endIndex - 1])) {
3013
- endIndex--;
3014
- }
3015
- }
3016
- }
3017
- return str.substring(0, endIndex);
3018
- }
3019
-
3020
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/trimStart.mjs
3021
- function trimStart(str, chars) {
3022
- if (chars === void 0) {
3023
- return str.trimStart();
3024
- }
3025
- let startIndex = 0;
3026
- switch (typeof chars) {
3027
- case "string": {
3028
- while (startIndex < str.length && str[startIndex] === chars) {
3029
- startIndex++;
3030
- }
3031
- break;
3032
- }
3033
- case "object": {
3034
- while (startIndex < str.length && chars.includes(str[startIndex])) {
3035
- startIndex++;
3036
- }
3037
- }
3038
- }
3039
- return str.substring(startIndex);
3040
- }
3041
-
3042
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/trim.mjs
3043
- function trim(str, chars) {
3044
- if (chars === void 0) {
3045
- return str.trim();
3046
- }
3047
- return trimStart(trimEnd(str, chars), chars);
3048
- }
3049
-
3050
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/unescape.mjs
3051
- var htmlUnescapes = {
3052
- "&amp;": "&",
3053
- "&lt;": "<",
3054
- "&gt;": ">",
3055
- "&quot;": '"',
3056
- "&#39;": "'"
3057
- };
3058
- function unescape2(str) {
3059
- return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, (match) => htmlUnescapes[match] || "'");
3060
- }
3061
-
3062
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/upperCase.mjs
3063
- function upperCase(str) {
3064
- const words$1 = words(str);
3065
- let result = "";
3066
- for (let i = 0; i < words$1.length; i++) {
3067
- result += words$1[i].toUpperCase();
3068
- if (i < words$1.length - 1) {
3069
- result += " ";
3070
- }
3071
- }
3072
- return result;
3073
- }
3074
-
3075
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/string/upperFirst.mjs
3076
- function upperFirst(str) {
3077
- return str.substring(0, 1).toUpperCase() + str.substring(1);
3078
- }
3079
-
3080
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/util/attempt.mjs
3081
- function attempt(func) {
3082
- try {
3083
- return [null, func()];
3084
- } catch (error) {
3085
- return [error, null];
3086
- }
3087
- }
3088
-
3089
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/util/attemptAsync.mjs
3090
- function attemptAsync(func) {
3091
- return __async(this, null, function* () {
3092
- try {
3093
- const result = yield func();
3094
- return [null, result];
3095
- } catch (error) {
3096
- return [error, null];
3097
- }
3098
- });
3099
- }
3100
-
3101
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/util/invariant.mjs
3102
- function invariant(condition, message) {
3103
- if (condition) {
3104
- return;
3105
- }
3106
- if (typeof message === "string") {
3107
- throw new Error(message);
3108
- }
3109
- throw message;
3110
- }
3111
-
3112
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
3113
- function isDeepKey(key) {
3114
- switch (typeof key) {
3115
- case "number":
3116
- case "symbol": {
3117
- return false;
3118
- }
3119
- case "string": {
3120
- return key.includes(".") || key.includes("[") || key.includes("]");
3121
- }
3122
- }
3123
- }
3124
-
3125
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
3126
- function toKey(value) {
3127
- var _a;
3128
- if (typeof value === "string" || typeof value === "symbol") {
3129
- return value;
3130
- }
3131
- if (Object.is((_a = value == null ? void 0 : value.valueOf) == null ? void 0 : _a.call(value), -0)) {
3132
- return "-0";
3133
- }
3134
- return String(value);
3135
- }
3136
-
3137
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
3138
- function toString(value) {
3139
- if (value == null) {
3140
- return "";
3141
- }
3142
- if (typeof value === "string") {
3143
- return value;
3144
- }
3145
- if (Array.isArray(value)) {
3146
- return value.map(toString).join(",");
3147
- }
3148
- const result = String(value);
3149
- if (result === "0" && Object.is(Number(value), -0)) {
3150
- return "-0";
3151
- }
3152
- return result;
3153
- }
3154
-
3155
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
3156
- function toPath(deepKey) {
3157
- if (Array.isArray(deepKey)) {
3158
- return deepKey.map(toKey);
3159
- }
3160
- if (typeof deepKey === "symbol") {
3161
- return [deepKey];
3162
- }
3163
- deepKey = toString(deepKey);
3164
- const result = [];
3165
- const length = deepKey.length;
3166
- if (length === 0) {
3167
- return result;
3168
- }
3169
- let index = 0;
3170
- let key = "";
3171
- let quoteChar = "";
3172
- let bracket = false;
3173
- if (deepKey.charCodeAt(0) === 46) {
3174
- result.push("");
3175
- index++;
3176
- }
3177
- while (index < length) {
3178
- const char = deepKey[index];
3179
- if (quoteChar) {
3180
- if (char === "\\" && index + 1 < length) {
3181
- index++;
3182
- key += deepKey[index];
3183
- } else if (char === quoteChar) {
3184
- quoteChar = "";
3185
- } else {
3186
- key += char;
3187
- }
3188
- } else if (bracket) {
3189
- if (char === '"' || char === "'") {
3190
- quoteChar = char;
3191
- } else if (char === "]") {
3192
- bracket = false;
3193
- result.push(key);
3194
- key = "";
3195
- } else {
3196
- key += char;
3197
- }
3198
- } else {
3199
- if (char === "[") {
3200
- bracket = true;
3201
- if (key) {
3202
- result.push(key);
3203
- key = "";
3204
- }
3205
- } else if (char === ".") {
3206
- if (key) {
3207
- result.push(key);
3208
- key = "";
3209
- }
3210
- } else {
3211
- key += char;
3212
- }
3213
- }
3214
- index++;
3215
- }
3216
- if (key) {
3217
- result.push(key);
3218
- }
3219
- return result;
3220
- }
3221
-
3222
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/object/get.mjs
3223
- function get(object, path, defaultValue) {
3224
- if (object == null) {
3225
- return defaultValue;
3226
- }
3227
- switch (typeof path) {
3228
- case "string": {
3229
- if (isUnsafeProperty(path)) {
3230
- return defaultValue;
3231
- }
3232
- const result = object[path];
3233
- if (result === void 0) {
3234
- if (isDeepKey(path)) {
3235
- return get(object, toPath(path), defaultValue);
3236
- } else {
3237
- return defaultValue;
3238
- }
3239
- }
3240
- return result;
3241
- }
3242
- case "number":
3243
- case "symbol": {
3244
- if (typeof path === "number") {
3245
- path = toKey(path);
3246
- }
3247
- const result = object[path];
3248
- if (result === void 0) {
3249
- return defaultValue;
3250
- }
3251
- return result;
3252
- }
3253
- default: {
3254
- if (Array.isArray(path)) {
3255
- return getWithPath(object, path, defaultValue);
3256
- }
3257
- if (Object.is(path == null ? void 0 : path.valueOf(), -0)) {
3258
- path = "-0";
3259
- } else {
3260
- path = String(path);
3261
- }
3262
- if (isUnsafeProperty(path)) {
3263
- return defaultValue;
3264
- }
3265
- const result = object[path];
3266
- if (result === void 0) {
3267
- return defaultValue;
3268
- }
3269
- return result;
3270
- }
3271
- }
3272
- }
3273
- function getWithPath(object, path, defaultValue) {
3274
- if (path.length === 0) {
3275
- return defaultValue;
3276
- }
3277
- let current = object;
3278
- for (let index = 0; index < path.length; index++) {
3279
- if (current == null) {
3280
- return defaultValue;
3281
- }
3282
- if (isUnsafeProperty(path[index])) {
3283
- return defaultValue;
3284
- }
3285
- current = current[path[index]];
3286
- }
3287
- if (current === void 0) {
3288
- return defaultValue;
3289
- }
3290
- return current;
3291
- }
3292
-
3293
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
3294
- function isObject(value) {
3295
- return value !== null && (typeof value === "object" || typeof value === "function");
3296
- }
3297
-
3298
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
3299
- var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
3300
- function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
3301
- switch (typeof value) {
3302
- case "number": {
3303
- return Number.isInteger(value) && value >= 0 && value < length;
3304
- }
3305
- case "symbol": {
3306
- return false;
3307
- }
3308
- case "string": {
3309
- return IS_UNSIGNED_INTEGER.test(value);
3310
- }
3311
- }
3312
- }
3313
-
3314
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
3315
- var regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
3316
- var regexIsPlainProp = /^\w*$/;
3317
- function isKey(value, object) {
3318
- if (Array.isArray(value)) {
3319
- return false;
3320
- }
3321
- if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) {
3322
- return true;
3323
- }
3324
- return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
3325
- }
3326
-
3327
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
3328
- var assignValue = (object, key, value) => {
3329
- const objValue = object[key];
3330
- if (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
3331
- object[key] = value;
3332
- }
3333
- };
3334
-
3335
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
3336
- function updateWith(obj, path, updater, customizer) {
3337
- if (obj == null && !isObject(obj)) {
3338
- return obj;
3339
- }
3340
- let resolvedPath;
3341
- if (isKey(path, obj)) {
3342
- resolvedPath = [path];
3343
- } else if (Array.isArray(path)) {
3344
- resolvedPath = path;
3345
- } else {
3346
- resolvedPath = toPath(path);
3347
- }
3348
- const updateValue = updater(get(obj, resolvedPath));
3349
- let current = obj;
3350
- for (let i = 0; i < resolvedPath.length && current != null; i++) {
3351
- const key = toKey(resolvedPath[i]);
3352
- if (isUnsafeProperty(key)) {
3353
- continue;
3354
- }
3355
- let newValue;
3356
- if (i === resolvedPath.length - 1) {
3357
- newValue = updateValue;
3358
- } else {
3359
- const objValue = current[key];
3360
- const customizerResult = customizer == null ? void 0 : customizer(objValue, key, obj);
3361
- newValue = customizerResult !== void 0 ? customizerResult : isObject(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {};
3362
- }
3363
- assignValue(current, key, newValue);
3364
- current = current[key];
3365
- }
3366
- return obj;
3367
- }
3368
-
3369
- // node_modules/.pnpm/es-toolkit@1.42.0/node_modules/es-toolkit/dist/compat/object/set.mjs
3370
- function set(obj, path, value) {
3371
- return updateWith(obj, path, () => value, () => void 0);
3372
- }
657
+ // src/ts/es-toolkit/index.ts
658
+ var import_es_toolkit = require("es-toolkit");
3373
659
 
3374
660
  // src/ts/object/index.ts
661
+ var import_compat = require("es-toolkit/compat");
3375
662
  function getObjectKeys(obj) {
3376
663
  return Object.keys(obj);
3377
664
  }
3378
- var getObjectValue = get;
3379
- var setObjectValue = set;
665
+ var getObjectValue = import_compat.get;
666
+ var setObjectValue = import_compat.set;
3380
667
 
3381
668
  // src/ts/string/format.ts
3382
669
  function toMaskText(s, keepLeft = 1, keepRight = 0, maskChar = "*") {
@@ -4033,6 +1320,7 @@ function isLongitude(s) {
4033
1320
  isDate,
4034
1321
  isDigits,
4035
1322
  isEmail,
1323
+ isEmptyObject,
4036
1324
  isEqual,
4037
1325
  isEqualWith,
4038
1326
  isError,
@@ -4061,6 +1349,7 @@ function isLongitude(s) {
4061
1349
  isNode,
4062
1350
  isNotNil,
4063
1351
  isNull,
1352
+ isNumber,
4064
1353
  isNumeric,
4065
1354
  isOfficerId,
4066
1355
  isPassport,