@kevisual/cli 0.1.23 → 0.1.25

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.
@@ -1954,26 +1954,26 @@ var require_escape_html = __commonJS((exports, module) => {
1954
1954
  if (!match) {
1955
1955
  return str;
1956
1956
  }
1957
- var escape;
1957
+ var escape2;
1958
1958
  var html = "";
1959
1959
  var index = 0;
1960
1960
  var lastIndex = 0;
1961
1961
  for (index = match.index;index < str.length; index++) {
1962
1962
  switch (str.charCodeAt(index)) {
1963
1963
  case 34:
1964
- escape = "&quot;";
1964
+ escape2 = "&quot;";
1965
1965
  break;
1966
1966
  case 38:
1967
- escape = "&amp;";
1967
+ escape2 = "&amp;";
1968
1968
  break;
1969
1969
  case 39:
1970
- escape = "&#39;";
1970
+ escape2 = "&#39;";
1971
1971
  break;
1972
1972
  case 60:
1973
- escape = "&lt;";
1973
+ escape2 = "&lt;";
1974
1974
  break;
1975
1975
  case 62:
1976
- escape = "&gt;";
1976
+ escape2 = "&gt;";
1977
1977
  break;
1978
1978
  default:
1979
1979
  continue;
@@ -1982,7 +1982,7 @@ var require_escape_html = __commonJS((exports, module) => {
1982
1982
  html += str.substring(lastIndex, index);
1983
1983
  }
1984
1984
  lastIndex = index + 1;
1985
- html += escape;
1985
+ html += escape2;
1986
1986
  }
1987
1987
  return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
1988
1988
  }
@@ -11786,9 +11786,9 @@ var require_range_parser = __commonJS((exports, module) => {
11786
11786
  var ranges = [];
11787
11787
  ranges.type = str.slice(0, index);
11788
11788
  for (var i = 0;i < arr.length; i++) {
11789
- var range = arr[i].split("-");
11790
- var start = parseInt(range[0], 10);
11791
- var end = parseInt(range[1], 10);
11789
+ var range2 = arr[i].split("-");
11790
+ var start = parseInt(range2[0], 10);
11791
+ var end = parseInt(range2[1], 10);
11792
11792
  if (isNaN(start)) {
11793
11793
  start = size - end;
11794
11794
  end = size - 1;
@@ -11814,13 +11814,13 @@ var require_range_parser = __commonJS((exports, module) => {
11814
11814
  function combineRanges(ranges) {
11815
11815
  var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart);
11816
11816
  for (var j = 0, i = 1;i < ordered.length; i++) {
11817
- var range = ordered[i];
11817
+ var range2 = ordered[i];
11818
11818
  var current = ordered[j];
11819
- if (range.start > current.end + 1) {
11820
- ordered[++j] = range;
11821
- } else if (range.end > current.end) {
11822
- current.end = range.end;
11823
- current.index = Math.min(current.index, range.index);
11819
+ if (range2.start > current.end + 1) {
11820
+ ordered[++j] = range2;
11821
+ } else if (range2.end > current.end) {
11822
+ current.end = range2.end;
11823
+ current.index = Math.min(current.index, range2.index);
11824
11824
  }
11825
11825
  }
11826
11826
  ordered.length = j + 1;
@@ -11828,17 +11828,17 @@ var require_range_parser = __commonJS((exports, module) => {
11828
11828
  combined.type = ranges.type;
11829
11829
  return combined;
11830
11830
  }
11831
- function mapWithIndex(range, index) {
11831
+ function mapWithIndex(range2, index) {
11832
11832
  return {
11833
- start: range.start,
11834
- end: range.end,
11833
+ start: range2.start,
11834
+ end: range2.end,
11835
11835
  index
11836
11836
  };
11837
11837
  }
11838
- function mapWithoutIndex(range) {
11838
+ function mapWithoutIndex(range2) {
11839
11839
  return {
11840
- start: range.start,
11841
- end: range.end
11840
+ start: range2.start,
11841
+ end: range2.end
11842
11842
  };
11843
11843
  }
11844
11844
  function sortByRangeIndex(a, b) {
@@ -12273,8 +12273,8 @@ var require_send = __commonJS((exports, module) => {
12273
12273
  }
12274
12274
  return false;
12275
12275
  }
12276
- function contentRange(type, size, range) {
12277
- return type + " " + (range ? range.start + "-" + range.end : "*") + "/" + size;
12276
+ function contentRange(type, size, range2) {
12277
+ return type + " " + (range2 ? range2.start + "-" + range2.end : "*") + "/" + size;
12278
12278
  }
12279
12279
  function createHtmlDocument(title, body) {
12280
12280
  return `<!DOCTYPE html>
@@ -15133,7 +15133,7 @@ var require_micromatch = __commonJS((exports, module) => {
15133
15133
  var micromatch = (list3, patterns, options) => {
15134
15134
  patterns = [].concat(patterns);
15135
15135
  list3 = [].concat(list3);
15136
- let omit3 = new Set;
15136
+ let omit2 = new Set;
15137
15137
  let keep = new Set;
15138
15138
  let items = new Set;
15139
15139
  let negatives = 0;
@@ -15154,15 +15154,15 @@ var require_micromatch = __commonJS((exports, module) => {
15154
15154
  if (!match)
15155
15155
  continue;
15156
15156
  if (negated) {
15157
- omit3.add(matched.output);
15157
+ omit2.add(matched.output);
15158
15158
  } else {
15159
- omit3.delete(matched.output);
15159
+ omit2.delete(matched.output);
15160
15160
  keep.add(matched.output);
15161
15161
  }
15162
15162
  }
15163
15163
  }
15164
15164
  let result = negatives === patterns.length ? [...items] : [...keep];
15165
- let matches = result.filter((item) => !omit3.has(item));
15165
+ let matches = result.filter((item) => !omit2.has(item));
15166
15166
  if (options && matches.length === 0) {
15167
15167
  if (options.failglob === true) {
15168
15168
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
@@ -16195,7 +16195,7 @@ var require_out2 = __commonJS((exports) => {
16195
16195
  }
16196
16196
  });
16197
16197
 
16198
- // ../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js
16198
+ // ../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js
16199
16199
  var require_reusify = __commonJS((exports, module) => {
16200
16200
  function reusify(Constructor) {
16201
16201
  var head2 = new Constructor;
@@ -16223,7 +16223,7 @@ var require_reusify = __commonJS((exports, module) => {
16223
16223
  module.exports = reusify;
16224
16224
  });
16225
16225
 
16226
- // ../node_modules/.pnpm/fastq@1.17.1/node_modules/fastq/queue.js
16226
+ // ../node_modules/.pnpm/fastq@1.20.1/node_modules/fastq/queue.js
16227
16227
  var require_queue = __commonJS((exports, module) => {
16228
16228
  var reusify = require_reusify();
16229
16229
  function fastqueue(context, worker, _concurrency) {
@@ -16270,7 +16270,8 @@ var require_queue = __commonJS((exports, module) => {
16270
16270
  empty: noop2,
16271
16271
  kill,
16272
16272
  killAndDrain,
16273
- error: error49
16273
+ error: error49,
16274
+ abort
16274
16275
  };
16275
16276
  return self2;
16276
16277
  function running() {
@@ -16390,6 +16391,28 @@ var require_queue = __commonJS((exports, module) => {
16390
16391
  self2.drain();
16391
16392
  self2.drain = noop2;
16392
16393
  }
16394
+ function abort() {
16395
+ var current = queueHead;
16396
+ queueHead = null;
16397
+ queueTail = null;
16398
+ while (current) {
16399
+ var next = current.next;
16400
+ var callback = current.callback;
16401
+ var errorHandler2 = current.errorHandler;
16402
+ var val = current.value;
16403
+ var context2 = current.context;
16404
+ current.value = null;
16405
+ current.callback = noop2;
16406
+ current.errorHandler = null;
16407
+ if (errorHandler2) {
16408
+ errorHandler2(new Error("abort"), val);
16409
+ }
16410
+ callback.call(context2, new Error("abort"));
16411
+ current.release(current);
16412
+ current = next;
16413
+ }
16414
+ self2.drain = noop2;
16415
+ }
16393
16416
  function error49(handler) {
16394
16417
  errorHandler = handler;
16395
16418
  }
@@ -16461,17 +16484,20 @@ var require_queue = __commonJS((exports, module) => {
16461
16484
  return p;
16462
16485
  }
16463
16486
  function drained() {
16464
- if (queue2.idle()) {
16465
- return new Promise(function(resolve) {
16466
- resolve();
16467
- });
16468
- }
16469
- var previousDrain = queue2.drain;
16470
16487
  var p = new Promise(function(resolve) {
16471
- queue2.drain = function() {
16472
- previousDrain();
16473
- resolve();
16474
- };
16488
+ process.nextTick(function() {
16489
+ if (queue2.idle()) {
16490
+ resolve();
16491
+ } else {
16492
+ var previousDrain = queue2.drain;
16493
+ queue2.drain = function() {
16494
+ if (typeof previousDrain === "function")
16495
+ previousDrain();
16496
+ resolve();
16497
+ queue2.drain = previousDrain;
16498
+ };
16499
+ }
16500
+ });
16475
16501
  });
16476
16502
  return p;
16477
16503
  }
@@ -44107,7 +44133,53 @@ var pipeBusboy = async (req, res, busboy) => {
44107
44133
  req.pipe(busboy);
44108
44134
  }
44109
44135
  };
44136
+ // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
44137
+ function isUnsafeProperty2(key) {
44138
+ return key === "__proto__";
44139
+ }
44110
44140
 
44141
+ // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
44142
+ function isPlainObject3(value) {
44143
+ if (!value || typeof value !== "object") {
44144
+ return false;
44145
+ }
44146
+ const proto = Object.getPrototypeOf(value);
44147
+ const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
44148
+ if (!hasObjectPrototype) {
44149
+ return false;
44150
+ }
44151
+ return Object.prototype.toString.call(value) === "[object Object]";
44152
+ }
44153
+
44154
+ // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
44155
+ function merge3(target, source) {
44156
+ const sourceKeys = Object.keys(source);
44157
+ for (let i = 0;i < sourceKeys.length; i++) {
44158
+ const key = sourceKeys[i];
44159
+ if (isUnsafeProperty2(key)) {
44160
+ continue;
44161
+ }
44162
+ const sourceValue = source[key];
44163
+ const targetValue = target[key];
44164
+ if (isMergeableValue2(sourceValue) && isMergeableValue2(targetValue)) {
44165
+ target[key] = merge3(targetValue, sourceValue);
44166
+ } else if (Array.isArray(sourceValue)) {
44167
+ target[key] = merge3([], sourceValue);
44168
+ } else if (isPlainObject3(sourceValue)) {
44169
+ target[key] = merge3({}, sourceValue);
44170
+ } else if (targetValue === undefined || sourceValue !== undefined) {
44171
+ target[key] = sourceValue;
44172
+ }
44173
+ }
44174
+ return target;
44175
+ }
44176
+ function isMergeableValue2(value) {
44177
+ return isPlainObject3(value) || Array.isArray(value);
44178
+ }
44179
+ // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isBrowser.mjs
44180
+ function isBrowser4() {
44181
+ return typeof window !== "undefined" && window?.document != null;
44182
+ }
44111
44183
  // src/module/assistant/proxy/s3.ts
44112
44184
  var mapS3 = new Map;
44113
44185
 
@@ -44239,14 +44311,14 @@ function isObject2(value) {
44239
44311
  var type = typeof value;
44240
44312
  return value != null && (type == "object" || type == "function");
44241
44313
  }
44242
- function identity(value) {
44314
+ function identity2(value) {
44243
44315
  return value;
44244
44316
  }
44245
44317
  var asyncTag = "[object AsyncFunction]";
44246
44318
  var funcTag$1 = "[object Function]";
44247
44319
  var genTag = "[object GeneratorFunction]";
44248
44320
  var proxyTag = "[object Proxy]";
44249
- function isFunction(value) {
44321
+ function isFunction2(value) {
44250
44322
  if (!isObject2(value)) {
44251
44323
  return false;
44252
44324
  }
@@ -44285,7 +44357,7 @@ function baseIsNative(value) {
44285
44357
  if (!isObject2(value) || isMasked(value)) {
44286
44358
  return false;
44287
44359
  }
44288
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
44360
+ var pattern = isFunction2(value) ? reIsNative : reIsHostCtor;
44289
44361
  return pattern.test(toSource(value));
44290
44362
  }
44291
44363
  function getValue(object2, key) {
@@ -44362,7 +44434,7 @@ var defineProperty = function() {
44362
44434
  return func;
44363
44435
  } catch (e) {}
44364
44436
  }();
44365
- var baseSetToString = !defineProperty ? identity : function(func, string4) {
44437
+ var baseSetToString = !defineProperty ? identity2 : function(func, string4) {
44366
44438
  return defineProperty(func, "toString", {
44367
44439
  configurable: true,
44368
44440
  enumerable: false,
@@ -44437,14 +44509,14 @@ function overRest(func, start, transform2) {
44437
44509
  };
44438
44510
  }
44439
44511
  function baseRest(func, start) {
44440
- return setToString(overRest(func, start, identity), func + "");
44512
+ return setToString(overRest(func, start, identity2), func + "");
44441
44513
  }
44442
44514
  var MAX_SAFE_INTEGER = 9007199254740991;
44443
- function isLength(value) {
44515
+ function isLength2(value) {
44444
44516
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
44445
44517
  }
44446
44518
  function isArrayLike(value) {
44447
- return value != null && isLength(value.length) && !isFunction(value);
44519
+ return value != null && isLength2(value.length) && !isFunction2(value);
44448
44520
  }
44449
44521
  function isIterateeCall(value, index, object2) {
44450
44522
  if (!isObject2(object2)) {
@@ -44506,7 +44578,7 @@ var freeModule$2 = freeExports$2 && typeof module_manager == "object" && module_
44506
44578
  var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
44507
44579
  var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
44508
44580
  var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
44509
- var isBuffer = nativeIsBuffer || stubFalse;
44581
+ var isBuffer2 = nativeIsBuffer || stubFalse;
44510
44582
  var argsTag = "[object Arguments]";
44511
44583
  var arrayTag = "[object Array]";
44512
44584
  var boolTag = "[object Boolean]";
@@ -44535,7 +44607,7 @@ var typedArrayTags = {};
44535
44607
  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
44536
44608
  typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
44537
44609
  function baseIsTypedArray(value) {
44538
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
44610
+ return isObjectLike(value) && isLength2(value.length) && !!typedArrayTags[baseGetTag(value)];
44539
44611
  }
44540
44612
  function baseUnary(func) {
44541
44613
  return function(value) {
@@ -44556,9 +44628,9 @@ var nodeUtil = function() {
44556
44628
  } catch (e) {}
44557
44629
  }();
44558
44630
  var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
44559
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
44631
+ var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
44560
44632
  function arrayLikeKeys(value, inherited) {
44561
- var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
44633
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray2(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
44562
44634
  for (var key in value) {
44563
44635
  if (!(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
44564
44636
  result.push(key);
@@ -44757,7 +44829,7 @@ var objectProto = Object.prototype;
44757
44829
  var funcToString = funcProto.toString;
44758
44830
  var hasOwnProperty = objectProto.hasOwnProperty;
44759
44831
  var objectCtorString = funcToString.call(Object);
44760
- function isPlainObject3(value) {
44832
+ function isPlainObject6(value) {
44761
44833
  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
44762
44834
  return false;
44763
44835
  }
@@ -44873,7 +44945,7 @@ function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, st
44873
44945
  var newValue = customizer ? customizer(objValue, srcValue, key + "", object2, source, stack) : undefined;
44874
44946
  var isCommon = newValue === undefined;
44875
44947
  if (isCommon) {
44876
- var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
44948
+ var isArr = isArray(srcValue), isBuff = !isArr && isBuffer2(srcValue), isTyped = !isArr && !isBuff && isTypedArray2(srcValue);
44877
44949
  newValue = srcValue;
44878
44950
  if (isArr || isBuff || isTyped) {
44879
44951
  if (isArray(objValue)) {
@@ -44889,11 +44961,11 @@ function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, st
44889
44961
  } else {
44890
44962
  newValue = [];
44891
44963
  }
44892
- } else if (isPlainObject3(srcValue) || isArguments(srcValue)) {
44964
+ } else if (isPlainObject6(srcValue) || isArguments(srcValue)) {
44893
44965
  newValue = objValue;
44894
44966
  if (isArguments(objValue)) {
44895
44967
  newValue = toPlainObject(objValue);
44896
- } else if (!isObject2(objValue) || isFunction(objValue)) {
44968
+ } else if (!isObject2(objValue) || isFunction2(objValue)) {
44897
44969
  newValue = initCloneObject(srcValue);
44898
44970
  }
44899
44971
  } else {
@@ -44924,7 +44996,7 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
44924
44996
  }
44925
44997
  }, keysIn);
44926
44998
  }
44927
- var merge3 = createAssigner(function(object2, source, srcIndex) {
44999
+ var merge5 = createAssigner(function(object2, source, srcIndex) {
44928
45000
  baseMerge(object2, source, srcIndex);
44929
45001
  });
44930
45002
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -44941,10 +45013,10 @@ function requireArray() {
44941
45013
  hasRequiredArray = 1;
44942
45014
  Object.defineProperty(array2, "__esModule", { value: true });
44943
45015
  array2.splitWhen = array2.flatten = undefined;
44944
- function flatten(items) {
45016
+ function flatten2(items) {
44945
45017
  return items.reduce((collection, item) => [].concat(collection, item), []);
44946
45018
  }
44947
- array2.flatten = flatten;
45019
+ array2.flatten = flatten2;
44948
45020
  function splitWhen(items, predicate) {
44949
45021
  const result = [[]];
44950
45022
  let groupIndex = 0;
@@ -45383,13 +45455,13 @@ function requireStringify() {
45383
45455
  * Copyright (c) 2014-present, Jon Schlinkert.
45384
45456
  * Released under the MIT License.
45385
45457
  */
45386
- var isNumber;
45458
+ var isNumber2;
45387
45459
  var hasRequiredIsNumber;
45388
45460
  function requireIsNumber() {
45389
45461
  if (hasRequiredIsNumber)
45390
- return isNumber;
45462
+ return isNumber2;
45391
45463
  hasRequiredIsNumber = 1;
45392
- isNumber = function(num) {
45464
+ isNumber2 = function(num) {
45393
45465
  if (typeof num === "number") {
45394
45466
  return num - num === 0;
45395
45467
  }
@@ -45398,7 +45470,7 @@ function requireIsNumber() {
45398
45470
  }
45399
45471
  return false;
45400
45472
  };
45401
- return isNumber;
45473
+ return isNumber2;
45402
45474
  }
45403
45475
  /*!
45404
45476
  * to-regex-range <https://github.com/micromatch/to-regex-range>
@@ -45412,15 +45484,15 @@ function requireToRegexRange() {
45412
45484
  if (hasRequiredToRegexRange)
45413
45485
  return toRegexRange_1;
45414
45486
  hasRequiredToRegexRange = 1;
45415
- const isNumber2 = requireIsNumber();
45487
+ const isNumber3 = requireIsNumber();
45416
45488
  const toRegexRange = (min, max, options) => {
45417
- if (isNumber2(min) === false) {
45489
+ if (isNumber3(min) === false) {
45418
45490
  throw new TypeError("toRegexRange: expected the first argument to be a number");
45419
45491
  }
45420
45492
  if (max === undefined || min === max) {
45421
45493
  return String(min);
45422
45494
  }
45423
- if (isNumber2(max) === false) {
45495
+ if (isNumber3(max) === false) {
45424
45496
  throw new TypeError("toRegexRange: expected the second argument to be a number.");
45425
45497
  }
45426
45498
  let opts = { relaxZeros: true, ...options };
@@ -45505,7 +45577,7 @@ function requireToRegexRange() {
45505
45577
  if (start === stop) {
45506
45578
  return { pattern: start, count: [], digits: 0 };
45507
45579
  }
45508
- let zipped = zip(start, stop);
45580
+ let zipped = zip2(start, stop);
45509
45581
  let digits = zipped.length;
45510
45582
  let pattern2 = "";
45511
45583
  let count = 0;
@@ -45552,20 +45624,20 @@ function requireToRegexRange() {
45552
45624
  }
45553
45625
  return tokens;
45554
45626
  }
45555
- function filterPatterns(arr, comparison, prefix, intersection2, options) {
45627
+ function filterPatterns(arr, comparison, prefix, intersection3, options) {
45556
45628
  let result = [];
45557
45629
  for (let ele of arr) {
45558
45630
  let { string: string4 } = ele;
45559
- if (!intersection2 && !contains(comparison, "string", string4)) {
45631
+ if (!intersection3 && !contains(comparison, "string", string4)) {
45560
45632
  result.push(prefix + string4);
45561
45633
  }
45562
- if (intersection2 && contains(comparison, "string", string4)) {
45634
+ if (intersection3 && contains(comparison, "string", string4)) {
45563
45635
  result.push(prefix + string4);
45564
45636
  }
45565
45637
  }
45566
45638
  return result;
45567
45639
  }
45568
- function zip(a, b) {
45640
+ function zip2(a, b) {
45569
45641
  let arr = [];
45570
45642
  for (let i = 0;i < a.length; i++)
45571
45643
  arr.push([a[i], b[i]]);
@@ -45640,7 +45712,7 @@ function requireFillRange() {
45640
45712
  const isValidValue = (value) => {
45641
45713
  return typeof value === "number" || typeof value === "string" && value !== "";
45642
45714
  };
45643
- const isNumber2 = (num) => Number.isInteger(+num);
45715
+ const isNumber3 = (num) => Number.isInteger(+num);
45644
45716
  const zeros = (input) => {
45645
45717
  let value = `${input}`;
45646
45718
  let index = -1;
@@ -45658,7 +45730,7 @@ function requireFillRange() {
45658
45730
  }
45659
45731
  return options.stringify === true;
45660
45732
  };
45661
- const pad = (input, maxLength, toNumber) => {
45733
+ const pad2 = (input, maxLength, toNumber) => {
45662
45734
  if (maxLength > 0) {
45663
45735
  let dash = input[0] === "-" ? "-" : "";
45664
45736
  if (dash)
@@ -45761,24 +45833,24 @@ function requireFillRange() {
45761
45833
  }
45762
45834
  let parts = { negatives: [], positives: [] };
45763
45835
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
45764
- let range = [];
45836
+ let range2 = [];
45765
45837
  let index = 0;
45766
45838
  while (descending ? a >= b : a <= b) {
45767
45839
  if (options.toRegex === true && step > 1) {
45768
45840
  push(a);
45769
45841
  } else {
45770
- range.push(pad(format(a, index), maxLen, toNumber));
45842
+ range2.push(pad2(format(a, index), maxLen, toNumber));
45771
45843
  }
45772
45844
  a = descending ? a - step : a + step;
45773
45845
  index++;
45774
45846
  }
45775
45847
  if (options.toRegex === true) {
45776
- return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options });
45848
+ return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range2, null, { wrap: false, ...options });
45777
45849
  }
45778
- return range;
45850
+ return range2;
45779
45851
  };
45780
45852
  const fillLetters = (start, end, step = 1, options = {}) => {
45781
- if (!isNumber2(start) && start.length > 1 || !isNumber2(end) && end.length > 1) {
45853
+ if (!isNumber3(start) && start.length > 1 || !isNumber3(end) && end.length > 1) {
45782
45854
  return invalidRange(start, end, options);
45783
45855
  }
45784
45856
  let format = options.transform || ((val) => String.fromCharCode(val));
@@ -45790,19 +45862,19 @@ function requireFillRange() {
45790
45862
  if (options.toRegex && step === 1) {
45791
45863
  return toRange(min, max, false, options);
45792
45864
  }
45793
- let range = [];
45865
+ let range2 = [];
45794
45866
  let index = 0;
45795
45867
  while (descending ? a >= b : a <= b) {
45796
- range.push(format(a, index));
45868
+ range2.push(format(a, index));
45797
45869
  a = descending ? a - step : a + step;
45798
45870
  index++;
45799
45871
  }
45800
45872
  if (options.toRegex === true) {
45801
- return toRegex(range, null, { wrap: false, options });
45873
+ return toRegex(range2, null, { wrap: false, options });
45802
45874
  }
45803
- return range;
45875
+ return range2;
45804
45876
  };
45805
- const fill = (start, end, step, options = {}) => {
45877
+ const fill2 = (start, end, step, options = {}) => {
45806
45878
  if (end == null && isValidValue(start)) {
45807
45879
  return [start];
45808
45880
  }
@@ -45810,26 +45882,26 @@ function requireFillRange() {
45810
45882
  return invalidRange(start, end, options);
45811
45883
  }
45812
45884
  if (typeof step === "function") {
45813
- return fill(start, end, 1, { transform: step });
45885
+ return fill2(start, end, 1, { transform: step });
45814
45886
  }
45815
45887
  if (isObject3(step)) {
45816
- return fill(start, end, 0, step);
45888
+ return fill2(start, end, 0, step);
45817
45889
  }
45818
45890
  let opts = { ...options };
45819
45891
  if (opts.capture === true)
45820
45892
  opts.wrap = true;
45821
45893
  step = step || opts.step || 1;
45822
- if (!isNumber2(step)) {
45894
+ if (!isNumber3(step)) {
45823
45895
  if (step != null && !isObject3(step))
45824
45896
  return invalidStep(step, opts);
45825
- return fill(start, end, 1, step);
45897
+ return fill2(start, end, 1, step);
45826
45898
  }
45827
- if (isNumber2(start) && isNumber2(end)) {
45899
+ if (isNumber3(start) && isNumber3(end)) {
45828
45900
  return fillNumbers(start, end, step, opts);
45829
45901
  }
45830
45902
  return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
45831
45903
  };
45832
- fillRange = fill;
45904
+ fillRange = fill2;
45833
45905
  return fillRange;
45834
45906
  }
45835
45907
  var compile_1;
@@ -45838,7 +45910,7 @@ function requireCompile() {
45838
45910
  if (hasRequiredCompile)
45839
45911
  return compile_1;
45840
45912
  hasRequiredCompile = 1;
45841
- const fill = requireFillRange();
45913
+ const fill2 = requireFillRange();
45842
45914
  const utils = requireUtils$3();
45843
45915
  const compile = (ast, options = {}) => {
45844
45916
  const walk = (node, parent = {}) => {
@@ -45868,9 +45940,9 @@ function requireCompile() {
45868
45940
  }
45869
45941
  if (node.nodes && node.ranges > 0) {
45870
45942
  const args2 = utils.reduce(node.nodes);
45871
- const range = fill(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
45872
- if (range.length !== 0) {
45873
- return args2.length > 1 && range.length > 1 ? `(${range})` : range;
45943
+ const range2 = fill2(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
45944
+ if (range2.length !== 0) {
45945
+ return args2.length > 1 && range2.length > 1 ? `(${range2})` : range2;
45874
45946
  }
45875
45947
  }
45876
45948
  if (node.nodes) {
@@ -45891,7 +45963,7 @@ function requireExpand() {
45891
45963
  if (hasRequiredExpand)
45892
45964
  return expand_1;
45893
45965
  hasRequiredExpand = 1;
45894
- const fill = requireFillRange();
45966
+ const fill2 = requireFillRange();
45895
45967
  const stringify2 = requireStringify();
45896
45968
  const utils = requireUtils$3();
45897
45969
  const append = (queue = "", stash = "", enclose = false) => {
@@ -45941,11 +46013,11 @@ function requireExpand() {
45941
46013
  if (utils.exceedsLimit(...args2, options.step, rangeLimit)) {
45942
46014
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
45943
46015
  }
45944
- let range = fill(...args2, options);
45945
- if (range.length === 0) {
45946
- range = stringify2(node, options);
46016
+ let range2 = fill2(...args2, options);
46017
+ if (range2.length === 0) {
46018
+ range2 = stringify2(node, options);
45947
46019
  }
45948
- q.push(append(q.pop(), range));
46020
+ q.push(append(q.pop(), range2));
45949
46021
  node.nodes = [];
45950
46022
  return;
45951
46023
  }
@@ -46234,9 +46306,9 @@ function requireParse$1() {
46234
46306
  }
46235
46307
  if (prev.type === "range") {
46236
46308
  siblings.pop();
46237
- const before = siblings[siblings.length - 1];
46238
- before.value += prev.value + value;
46239
- prev = before;
46309
+ const before2 = siblings[siblings.length - 1];
46310
+ before2.value += prev.value + value;
46311
+ prev = before2;
46240
46312
  block.ranges--;
46241
46313
  continue;
46242
46314
  }
@@ -46973,7 +47045,7 @@ function requireParse() {
46973
47045
  state.output += token.output != null ? token.output : token.value;
46974
47046
  consume(token.value);
46975
47047
  };
46976
- const negate = () => {
47048
+ const negate2 = () => {
46977
47049
  let count = 1;
46978
47050
  while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
46979
47051
  advance();
@@ -47034,7 +47106,7 @@ function requireParse() {
47034
47106
  };
47035
47107
  const extglobClose = (token) => {
47036
47108
  let output = token.close + (opts.capture ? ")" : "");
47037
- let rest;
47109
+ let rest2;
47038
47110
  if (token.type === "negate") {
47039
47111
  let extglobStar = star;
47040
47112
  if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
@@ -47043,8 +47115,8 @@ function requireParse() {
47043
47115
  if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
47044
47116
  output = token.close = `)$))${extglobStar}`;
47045
47117
  }
47046
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
47047
- const expression = parse2(rest, { ...options, fastpaths: false }).output;
47118
+ if (token.inner.includes("*") && (rest2 = remaining()) && /^\.[^\\/.]+$/.test(rest2)) {
47119
+ const expression = parse2(rest2, { ...options, fastpaths: false }).output;
47048
47120
  output = token.close = `)${expression})${extglobStar})`;
47049
47121
  }
47050
47122
  if (token.prev.type === "bos") {
@@ -47056,17 +47128,17 @@ function requireParse() {
47056
47128
  };
47057
47129
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
47058
47130
  let backslashes = false;
47059
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc2, chars, first, rest, index) => {
47131
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc2, chars, first, rest2, index) => {
47060
47132
  if (first === "\\") {
47061
47133
  backslashes = true;
47062
47134
  return m;
47063
47135
  }
47064
47136
  if (first === "?") {
47065
47137
  if (esc2) {
47066
- return esc2 + first + (rest ? QMARK.repeat(rest.length) : "");
47138
+ return esc2 + first + (rest2 ? QMARK.repeat(rest2.length) : "");
47067
47139
  }
47068
47140
  if (index === 0) {
47069
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
47141
+ return qmarkNoDot + (rest2 ? QMARK.repeat(rest2.length) : "");
47070
47142
  }
47071
47143
  return QMARK.repeat(chars.length);
47072
47144
  }
@@ -47075,7 +47147,7 @@ function requireParse() {
47075
47147
  }
47076
47148
  if (first === "*") {
47077
47149
  if (esc2) {
47078
- return esc2 + first + (rest ? star : "");
47150
+ return esc2 + first + (rest2 ? star : "");
47079
47151
  }
47080
47152
  return star;
47081
47153
  }
@@ -47142,8 +47214,8 @@ function requireParse() {
47142
47214
  if (inner.includes(":")) {
47143
47215
  const idx = prev.value.lastIndexOf("[");
47144
47216
  const pre = prev.value.slice(0, idx);
47145
- const rest2 = prev.value.slice(idx + 2);
47146
- const posix = POSIX_REGEX_SOURCE[rest2];
47217
+ const rest3 = prev.value.slice(idx + 2);
47218
+ const posix = POSIX_REGEX_SOURCE[rest3];
47147
47219
  if (posix) {
47148
47220
  prev.value = pre + posix;
47149
47221
  state.backtrack = true;
@@ -47267,17 +47339,17 @@ function requireParse() {
47267
47339
  let output = ")";
47268
47340
  if (brace.dots === true) {
47269
47341
  const arr = tokens.slice();
47270
- const range = [];
47342
+ const range2 = [];
47271
47343
  for (let i = arr.length - 1;i >= 0; i--) {
47272
47344
  tokens.pop();
47273
47345
  if (arr[i].type === "brace") {
47274
47346
  break;
47275
47347
  }
47276
47348
  if (arr[i].type !== "dots") {
47277
- range.unshift(arr[i].value);
47349
+ range2.unshift(arr[i].value);
47278
47350
  }
47279
47351
  }
47280
- output = expandRange(range, opts);
47352
+ output = expandRange(range2, opts);
47281
47353
  state.backtrack = true;
47282
47354
  }
47283
47355
  if (brace.comma !== true && brace.dots !== true) {
@@ -47375,7 +47447,7 @@ function requireParse() {
47375
47447
  }
47376
47448
  }
47377
47449
  if (opts.nonegate !== true && state.index === 0) {
47378
- negate();
47450
+ negate2();
47379
47451
  continue;
47380
47452
  }
47381
47453
  }
@@ -47425,8 +47497,8 @@ function requireParse() {
47425
47497
  consume(value);
47426
47498
  continue;
47427
47499
  }
47428
- let rest = remaining();
47429
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
47500
+ let rest2 = remaining();
47501
+ if (opts.noextglob !== true && /^\([^?]/.test(rest2)) {
47430
47502
  extglobOpen("star", value);
47431
47503
  continue;
47432
47504
  }
@@ -47436,10 +47508,10 @@ function requireParse() {
47436
47508
  continue;
47437
47509
  }
47438
47510
  const prior = prev.prev;
47439
- const before = prior.prev;
47511
+ const before2 = prior.prev;
47440
47512
  const isStart = prior.type === "slash" || prior.type === "bos";
47441
- const afterStar = before && (before.type === "star" || before.type === "globstar");
47442
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
47513
+ const afterStar = before2 && (before2.type === "star" || before2.type === "globstar");
47514
+ if (opts.bash === true && (!isStart || rest2[0] && rest2[0] !== "/")) {
47443
47515
  push({ type: "star", value, output: "" });
47444
47516
  continue;
47445
47517
  }
@@ -47449,12 +47521,12 @@ function requireParse() {
47449
47521
  push({ type: "star", value, output: "" });
47450
47522
  continue;
47451
47523
  }
47452
- while (rest.slice(0, 3) === "/**") {
47453
- const after = input[state.index + 4];
47454
- if (after && after !== "/") {
47524
+ while (rest2.slice(0, 3) === "/**") {
47525
+ const after2 = input[state.index + 4];
47526
+ if (after2 && after2 !== "/") {
47455
47527
  break;
47456
47528
  }
47457
- rest = rest.slice(3);
47529
+ rest2 = rest2.slice(3);
47458
47530
  consume("/**", 3);
47459
47531
  }
47460
47532
  if (prior.type === "bos" && eos()) {
@@ -47477,8 +47549,8 @@ function requireParse() {
47477
47549
  consume(value);
47478
47550
  continue;
47479
47551
  }
47480
- if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
47481
- const end = rest[1] !== undefined ? "|$" : "";
47552
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest2[0] === "/") {
47553
+ const end = rest2[1] !== undefined ? "|$" : "";
47482
47554
  state.output = state.output.slice(0, -(prior.output + prev.output).length);
47483
47555
  prior.output = `(?:${prior.output}`;
47484
47556
  prev.type = "globstar";
@@ -47490,7 +47562,7 @@ function requireParse() {
47490
47562
  push({ type: "slash", value: "/", output: "" });
47491
47563
  continue;
47492
47564
  }
47493
- if (prior.type === "bos" && rest[0] === "/") {
47565
+ if (prior.type === "bos" && rest2[0] === "/") {
47494
47566
  prev.type = "globstar";
47495
47567
  prev.value += value;
47496
47568
  prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
@@ -48284,10 +48356,10 @@ function requireString() {
48284
48356
  hasRequiredString = 1;
48285
48357
  Object.defineProperty(string4, "__esModule", { value: true });
48286
48358
  string4.isEmpty = string4.isString = undefined;
48287
- function isString(input) {
48359
+ function isString2(input) {
48288
48360
  return typeof input === "string";
48289
48361
  }
48290
- string4.isString = isString;
48362
+ string4.isString = isString2;
48291
48363
  function isEmpty(input) {
48292
48364
  return input === "";
48293
48365
  }
@@ -48981,22 +49053,22 @@ function requireReusify() {
48981
49053
  return reusify_1;
48982
49054
  hasRequiredReusify = 1;
48983
49055
  function reusify(Constructor) {
48984
- var head = new Constructor;
48985
- var tail = head;
49056
+ var head2 = new Constructor;
49057
+ var tail2 = head2;
48986
49058
  function get() {
48987
- var current = head;
49059
+ var current = head2;
48988
49060
  if (current.next) {
48989
- head = current.next;
49061
+ head2 = current.next;
48990
49062
  } else {
48991
- head = new Constructor;
48992
- tail = head;
49063
+ head2 = new Constructor;
49064
+ tail2 = head2;
48993
49065
  }
48994
49066
  current.next = null;
48995
49067
  return current;
48996
49068
  }
48997
49069
  function release(obj) {
48998
- tail.next = obj;
48999
- tail = obj;
49070
+ tail2.next = obj;
49071
+ tail2 = obj;
49000
49072
  }
49001
49073
  return {
49002
49074
  get,
@@ -49028,8 +49100,8 @@ function requireQueue() {
49028
49100
  var errorHandler = null;
49029
49101
  var self2 = {
49030
49102
  push,
49031
- drain: noop,
49032
- saturated: noop,
49103
+ drain: noop2,
49104
+ saturated: noop2,
49033
49105
  pause,
49034
49106
  paused: false,
49035
49107
  get concurrency() {
@@ -49053,7 +49125,7 @@ function requireQueue() {
49053
49125
  length,
49054
49126
  getQueue,
49055
49127
  unshift,
49056
- empty: noop,
49128
+ empty: noop2,
49057
49129
  kill,
49058
49130
  killAndDrain,
49059
49131
  error: error48
@@ -49105,7 +49177,7 @@ function requireQueue() {
49105
49177
  current.context = context;
49106
49178
  current.release = release;
49107
49179
  current.value = value;
49108
- current.callback = done || noop;
49180
+ current.callback = done || noop2;
49109
49181
  current.errorHandler = errorHandler;
49110
49182
  if (_running >= _concurrency || self2.paused) {
49111
49183
  if (queueTail) {
@@ -49126,7 +49198,7 @@ function requireQueue() {
49126
49198
  current.context = context;
49127
49199
  current.release = release;
49128
49200
  current.value = value;
49129
- current.callback = done || noop;
49201
+ current.callback = done || noop2;
49130
49202
  current.errorHandler = errorHandler;
49131
49203
  if (_running >= _concurrency || self2.paused) {
49132
49204
  if (queueHead) {
@@ -49168,24 +49240,24 @@ function requireQueue() {
49168
49240
  function kill() {
49169
49241
  queueHead = null;
49170
49242
  queueTail = null;
49171
- self2.drain = noop;
49243
+ self2.drain = noop2;
49172
49244
  }
49173
49245
  function killAndDrain() {
49174
49246
  queueHead = null;
49175
49247
  queueTail = null;
49176
49248
  self2.drain();
49177
- self2.drain = noop;
49249
+ self2.drain = noop2;
49178
49250
  }
49179
49251
  function error48(handler) {
49180
49252
  errorHandler = handler;
49181
49253
  }
49182
49254
  }
49183
- function noop() {}
49255
+ function noop2() {}
49184
49256
  function Task() {
49185
49257
  this.value = null;
49186
- this.callback = noop;
49258
+ this.callback = noop2;
49187
49259
  this.next = null;
49188
- this.release = noop;
49260
+ this.release = noop2;
49189
49261
  this.context = null;
49190
49262
  this.errorHandler = null;
49191
49263
  var self2 = this;
@@ -49194,7 +49266,7 @@ function requireQueue() {
49194
49266
  var errorHandler = self2.errorHandler;
49195
49267
  var val = self2.value;
49196
49268
  self2.value = null;
49197
- self2.callback = noop;
49269
+ self2.callback = noop2;
49198
49270
  if (self2.errorHandler) {
49199
49271
  errorHandler(err, val);
49200
49272
  }
@@ -49230,7 +49302,7 @@ function requireQueue() {
49230
49302
  resolve(result);
49231
49303
  });
49232
49304
  });
49233
- p.catch(noop);
49305
+ p.catch(noop2);
49234
49306
  return p;
49235
49307
  }
49236
49308
  function unshift(value) {
@@ -49243,7 +49315,7 @@ function requireQueue() {
49243
49315
  resolve(result);
49244
49316
  });
49245
49317
  });
49246
- p.catch(noop);
49318
+ p.catch(noop2);
49247
49319
  return p;
49248
49320
  }
49249
49321
  function drained() {
@@ -49807,7 +49879,7 @@ function requireAsync$1() {
49807
49879
  }
49808
49880
  var provider = {};
49809
49881
  var deep = {};
49810
- var partial2 = {};
49882
+ var partial3 = {};
49811
49883
  var matcher = {};
49812
49884
  var hasRequiredMatcher;
49813
49885
  function requireMatcher() {
@@ -49864,9 +49936,9 @@ function requireMatcher() {
49864
49936
  var hasRequiredPartial;
49865
49937
  function requirePartial() {
49866
49938
  if (hasRequiredPartial)
49867
- return partial2;
49939
+ return partial3;
49868
49940
  hasRequiredPartial = 1;
49869
- Object.defineProperty(partial2, "__esModule", { value: true });
49941
+ Object.defineProperty(partial3, "__esModule", { value: true });
49870
49942
  const matcher_1 = requireMatcher();
49871
49943
 
49872
49944
  class PartialMatcher extends matcher_1.default {
@@ -49896,8 +49968,8 @@ function requirePartial() {
49896
49968
  return false;
49897
49969
  }
49898
49970
  }
49899
- partial2.default = PartialMatcher;
49900
- return partial2;
49971
+ partial3.default = PartialMatcher;
49972
+ return partial3;
49901
49973
  }
49902
49974
  var hasRequiredDeep;
49903
49975
  function requireDeep() {
@@ -50932,7 +51004,7 @@ class Manager {
50932
51004
  if (!app) {
50933
51005
  return;
50934
51006
  }
50935
- merge3(app, info);
51007
+ merge5(app, info);
50936
51008
  this.loadApp(app);
50937
51009
  await this.saveAppInfo(app);
50938
51010
  return onAppShowInfo(app);
@@ -51164,54 +51236,6 @@ var deleteFileAppInfo2 = async (key, appsPath) => {
51164
51236
 
51165
51237
  // src/module/local-apps/src/modules/manager.ts
51166
51238
  import { fork as fork2 } from "node:child_process";
51167
- // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
51168
- function isUnsafeProperty2(key) {
51169
- return key === "__proto__";
51170
- }
51171
-
51172
- // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
51173
- function isPlainObject5(value) {
51174
- if (!value || typeof value !== "object") {
51175
- return false;
51176
- }
51177
- const proto = Object.getPrototypeOf(value);
51178
- const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
51179
- if (!hasObjectPrototype) {
51180
- return false;
51181
- }
51182
- return Object.prototype.toString.call(value) === "[object Object]";
51183
- }
51184
-
51185
- // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
51186
- function merge5(target, source) {
51187
- const sourceKeys = Object.keys(source);
51188
- for (let i = 0;i < sourceKeys.length; i++) {
51189
- const key = sourceKeys[i];
51190
- if (isUnsafeProperty2(key)) {
51191
- continue;
51192
- }
51193
- const sourceValue = source[key];
51194
- const targetValue = target[key];
51195
- if (isMergeableValue2(sourceValue) && isMergeableValue2(targetValue)) {
51196
- target[key] = merge5(targetValue, sourceValue);
51197
- } else if (Array.isArray(sourceValue)) {
51198
- target[key] = merge5([], sourceValue);
51199
- } else if (isPlainObject5(sourceValue)) {
51200
- target[key] = merge5({}, sourceValue);
51201
- } else if (targetValue === undefined || sourceValue !== undefined) {
51202
- target[key] = sourceValue;
51203
- }
51204
- }
51205
- return target;
51206
- }
51207
- function isMergeableValue2(value) {
51208
- return isPlainObject5(value) || Array.isArray(value);
51209
- }
51210
- // ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isBrowser.mjs
51211
- function isBrowser4() {
51212
- return typeof window !== "undefined" && window?.document != null;
51213
- }
51214
- // src/module/local-apps/src/modules/manager.ts
51215
51239
  import path6 from "node:path";
51216
51240
  var import_fast_glob = __toESM(require_out4(), 1);
51217
51241
  import fs7 from "node:fs";
@@ -51595,7 +51619,7 @@ class Manager2 {
51595
51619
  if (!app) {
51596
51620
  return;
51597
51621
  }
51598
- merge5(app, info);
51622
+ merge3(app, info);
51599
51623
  this.loadApp(app);
51600
51624
  await this.saveAppInfo(app);
51601
51625
  return onAppShowInfo2(app);
@@ -53245,7 +53269,7 @@ __export3(exports_util2, {
53245
53269
  partial: () => partial4,
53246
53270
  parsedType: () => parsedType2,
53247
53271
  optionalKeys: () => optionalKeys2,
53248
- omit: () => omit3,
53272
+ omit: () => omit2,
53249
53273
  objectClone: () => objectClone2,
53250
53274
  numKeys: () => numKeys2,
53251
53275
  nullish: () => nullish3,
@@ -53624,7 +53648,7 @@ function pick22(schema, mask) {
53624
53648
  });
53625
53649
  return clone3(schema, def);
53626
53650
  }
53627
- function omit3(schema, mask) {
53651
+ function omit2(schema, mask) {
53628
53652
  const currDef = schema._zod.def;
53629
53653
  const checks = currDef.checks;
53630
53654
  const hasChecks = checks && checks.length > 0;
@@ -66438,7 +66462,7 @@ function filter(data, query) {
66438
66462
  return executor.execute(ast, data);
66439
66463
  }
66440
66464
 
66441
- // ../node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-proxy/router-api-proxy.ts
66465
+ // ../node_modules/.pnpm/@kevisual+api@0.0.64_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-proxy/router-api-proxy.ts
66442
66466
  var initApi = async (opts) => {
66443
66467
  const router = opts?.router;
66444
66468
  const item = opts?.item;
@@ -67464,7 +67488,7 @@ __export(exports_util3, {
67464
67488
  partial: () => partial5,
67465
67489
  parsedType: () => parsedType3,
67466
67490
  optionalKeys: () => optionalKeys3,
67467
- omit: () => omit4,
67491
+ omit: () => omit3,
67468
67492
  objectClone: () => objectClone3,
67469
67493
  numKeys: () => numKeys3,
67470
67494
  nullish: () => nullish5,
@@ -67843,7 +67867,7 @@ function pick5(schema, mask) {
67843
67867
  });
67844
67868
  return clone4(schema, def);
67845
67869
  }
67846
- function omit4(schema, mask) {
67870
+ function omit3(schema, mask) {
67847
67871
  const currDef = schema._zod.def;
67848
67872
  const checks = currDef.checks;
67849
67873
  const hasChecks = checks && checks.length > 0;
@@ -81560,7 +81584,7 @@ class Query2 {
81560
81584
  }
81561
81585
  }
81562
81586
 
81563
- // ../node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-login-node.js
81587
+ // ../node_modules/.pnpm/@kevisual+api@0.0.64_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-login-node.js
81564
81588
  import { homedir as homedir2 } from "node:os";
81565
81589
  import { join, dirname } from "node:path";
81566
81590
  import fs13 from "node:fs";
@@ -85463,7 +85487,7 @@ __export4(exports_util4, {
85463
85487
  partial: () => partial6,
85464
85488
  parsedType: () => parsedType4,
85465
85489
  optionalKeys: () => optionalKeys4,
85466
- omit: () => omit5,
85490
+ omit: () => omit4,
85467
85491
  objectClone: () => objectClone4,
85468
85492
  numKeys: () => numKeys4,
85469
85493
  nullish: () => nullish7,
@@ -85842,7 +85866,7 @@ function pick6(schema, mask) {
85842
85866
  });
85843
85867
  return clone5(schema, def);
85844
85868
  }
85845
- function omit5(schema, mask) {
85869
+ function omit4(schema, mask) {
85846
85870
  const currDef = schema._zod.def;
85847
85871
  const checks3 = currDef.checks;
85848
85872
  const hasChecks = checks3 && checks3.length > 0;
@@ -100639,7 +100663,7 @@ app.route({
100639
100663
  }).addTo(app, {
100640
100664
  overwrite: false
100641
100665
  });
100642
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
100666
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
100643
100667
  var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url4, ...options }) => {
100644
100668
  let lastEventId;
100645
100669
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -100748,7 +100772,7 @@ var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseVa
100748
100772
  return { stream: stream2 };
100749
100773
  };
100750
100774
 
100751
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/auth.gen.js
100775
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/auth.gen.js
100752
100776
  var getAuthToken = async (auth, callback) => {
100753
100777
  const token = typeof callback === "function" ? await callback(auth) : callback;
100754
100778
  if (!token) {
@@ -100763,12 +100787,12 @@ var getAuthToken = async (auth, callback) => {
100763
100787
  return token;
100764
100788
  };
100765
100789
 
100766
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js
100790
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js
100767
100791
  var jsonBodySerializer = {
100768
100792
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
100769
100793
  };
100770
100794
 
100771
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js
100795
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js
100772
100796
  var separatorArrayExplode = (style) => {
100773
100797
  switch (style) {
100774
100798
  case "label":
@@ -100871,7 +100895,7 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
100871
100895
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
100872
100896
  };
100873
100897
 
100874
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
100898
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
100875
100899
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
100876
100900
  var defaultPathSerializer = ({ path: path14, url: _url5 }) => {
100877
100901
  let url4 = _url5;
@@ -100939,7 +100963,7 @@ var getUrl = ({ baseUrl, path: path14, query: query2, querySerializer, url: _url
100939
100963
  return url4;
100940
100964
  };
100941
100965
 
100942
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
100966
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
100943
100967
  var createQuerySerializer = ({ allowReserved, array: array6, object: object5 } = {}) => {
100944
100968
  const querySerializer = (queryParams) => {
100945
100969
  const search = [];
@@ -101147,7 +101171,7 @@ var createConfig = (override = {}) => ({
101147
101171
  ...override
101148
101172
  });
101149
101173
 
101150
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client/client.gen.js
101174
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/client/client.gen.js
101151
101175
  var createClient = (config7 = {}) => {
101152
101176
  let _config = mergeConfigs(createConfig(), config7);
101153
101177
  const getConfig2 = () => ({ ..._config });
@@ -101294,7 +101318,7 @@ var createClient = (config7 = {}) => {
101294
101318
  trace: makeMethod("TRACE")
101295
101319
  };
101296
101320
  };
101297
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/params.gen.js
101321
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/core/params.gen.js
101298
101322
  var extraPrefixesMap = {
101299
101323
  $body_: "body",
101300
101324
  $headers_: "headers",
@@ -101302,12 +101326,12 @@ var extraPrefixesMap = {
101302
101326
  $query_: "query"
101303
101327
  };
101304
101328
  var extraPrefixes = Object.entries(extraPrefixesMap);
101305
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client.gen.js
101329
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/client.gen.js
101306
101330
  var client = createClient(createConfig({
101307
101331
  baseUrl: "http://localhost:4096"
101308
101332
  }));
101309
101333
 
101310
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/sdk.gen.js
101334
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/gen/sdk.gen.js
101311
101335
  class _HeyApiClient {
101312
101336
  _client = client;
101313
101337
  constructor(args2) {
@@ -101977,7 +102001,7 @@ class OpencodeClient extends _HeyApiClient {
101977
102001
  event = new Event({ client: this._client });
101978
102002
  }
101979
102003
 
101980
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/client.js
102004
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/client.js
101981
102005
  function createOpencodeClient(config7) {
101982
102006
  if (!config7?.fetch) {
101983
102007
  const customFetch = (req) => {
@@ -101998,7 +102022,7 @@ function createOpencodeClient(config7) {
101998
102022
  const client2 = createClient(config7);
101999
102023
  return new OpencodeClient({ client: client2 });
102000
102024
  }
102001
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/server.js
102025
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/server.js
102002
102026
  import { spawn as spawn3 } from "node:child_process";
102003
102027
  async function createOpencodeServer(options) {
102004
102028
  options = Object.assign({
@@ -102067,7 +102091,7 @@ Server output: ${output}`;
102067
102091
  }
102068
102092
  };
102069
102093
  }
102070
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/index.js
102094
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.2.26/node_modules/@opencode-ai/sdk/dist/index.js
102071
102095
  async function createOpencode(options) {
102072
102096
  const server2 = await createOpencodeServer({
102073
102097
  ...options
@@ -102445,6 +102469,70 @@ app.route({
102445
102469
  }
102446
102470
  }).addTo(app);
102447
102471
 
102472
+ // src/routes/opencode/module/client.ts
102473
+ var getClient = async (opts) => {
102474
+ const client3 = await createOpencodeClient({
102475
+ baseUrl: opts?.baseUrl ?? "http://localhost:4096"
102476
+ });
102477
+ return client3;
102478
+ };
102479
+
102480
+ // src/routes/opencode/cnb.ts
102481
+ app.route({
102482
+ path: "opencode-cnb",
102483
+ key: "question",
102484
+ middleware: ["auth-admin"],
102485
+ description: "创建 OpenCode 客户端",
102486
+ metadata: {
102487
+ args: {
102488
+ question: exports_external3.string().describe("问题"),
102489
+ baseUrl: exports_external3.string().optional().describe("OpenCode 服务地址,默认为 http://localhost:4096"),
102490
+ directory: exports_external3.string().optional().describe("运行目录,默认为根目录"),
102491
+ messageID: exports_external3.string().optional().describe("消息 ID,选填"),
102492
+ sessionId: exports_external3.string().optional().describe("会话 ID,选填"),
102493
+ parts: exports_external3.array(exports_external3.any()).optional().describe("消息内容的分块,优先于 question 参数")
102494
+ }
102495
+ }
102496
+ }).define(async (ctx) => {
102497
+ const { question, baseUrl, directory = "/workspace", messageID, sessionId, parts } = ctx.query;
102498
+ const client3 = await getClient({ baseUrl });
102499
+ if (!client3) {
102500
+ ctx.body = { content: `OpenCode 客户端获取失败` };
102501
+ return;
102502
+ }
102503
+ if (!question) {
102504
+ ctx.body = { content: `问题不能为空` };
102505
+ return;
102506
+ }
102507
+ let session = null;
102508
+ if (sessionId) {
102509
+ try {
102510
+ const getSession = await client3.session.get({ path: { id: sessionId } });
102511
+ session = getSession.data;
102512
+ } catch (error111) {}
102513
+ }
102514
+ if (!session) {
102515
+ const createSession = await client3.session.create({
102516
+ query: {
102517
+ directory
102518
+ }
102519
+ });
102520
+ session = createSession.data;
102521
+ }
102522
+ let _parts = parts ?? [{ type: "text", text: question }];
102523
+ const message = await client3.session.prompt({
102524
+ body: {
102525
+ messageID,
102526
+ parts: _parts
102527
+ },
102528
+ path: {
102529
+ id: sessionId || session.id
102530
+ }
102531
+ });
102532
+ const data = message.data;
102533
+ ctx.body = { content: `已经启动`, data };
102534
+ }).addTo(app);
102535
+
102448
102536
  // src/routes/remote/index.ts
102449
102537
  app.route({
102450
102538
  path: "remote",
@@ -103229,12 +103317,12 @@ app.route({
103229
103317
  execCommand(cmd);
103230
103318
  }).addTo(app, { overwrite: false });
103231
103319
 
103232
- // ../node_modules/.pnpm/lru-cache@11.2.6/node_modules/lru-cache/dist/esm/index.min.js
103233
- var M = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
103320
+ // ../node_modules/.pnpm/lru-cache@11.2.7/node_modules/lru-cache/dist/esm/index.min.js
103321
+ var x = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
103234
103322
  var I = new Set;
103235
103323
  var R = typeof process == "object" && process ? process : {};
103236
- var x = (a, t, e, i) => {
103237
- typeof R.emitWarning == "function" ? R.emitWarning(a, t, e, i) : console.error(`[${e}] ${t}: ${a}`);
103324
+ var U = (c, t, e, i) => {
103325
+ typeof R.emitWarning == "function" ? R.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
103238
103326
  };
103239
103327
  var C = globalThis.AbortController;
103240
103328
  var D = globalThis.AbortSignal;
@@ -103261,33 +103349,33 @@ if (typeof C > "u") {
103261
103349
  }
103262
103350
  }
103263
103351
  };
103264
- let a = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
103265
- a && (a = false, x("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
103352
+ let c = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
103353
+ c && (c = false, U("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
103266
103354
  };
103267
103355
  }
103268
- var G = (a) => !I.has(a);
103356
+ var G = (c) => !I.has(c);
103269
103357
  var H = Symbol("type");
103270
- var y = (a) => a && a === Math.floor(a) && a > 0 && isFinite(a);
103271
- var U = (a) => y(a) ? a <= Math.pow(2, 8) ? Uint8Array : a <= Math.pow(2, 16) ? Uint16Array : a <= Math.pow(2, 32) ? Uint32Array : a <= Number.MAX_SAFE_INTEGER ? z5 : null : null;
103358
+ var y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c);
103359
+ var M = (c) => y(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? z5 : null : null;
103272
103360
  var z5 = class extends Array {
103273
103361
  constructor(t) {
103274
103362
  super(t), this.fill(0);
103275
103363
  }
103276
103364
  };
103277
- var W = class a {
103365
+ var W = class c {
103278
103366
  heap;
103279
103367
  length;
103280
103368
  static #o = false;
103281
103369
  static create(t) {
103282
- let e = U(t);
103370
+ let e = M(t);
103283
103371
  if (!e)
103284
103372
  return [];
103285
- a.#o = true;
103286
- let i = new a(t, e);
103287
- return a.#o = false, i;
103373
+ c.#o = true;
103374
+ let i = new c(t, e);
103375
+ return c.#o = false, i;
103288
103376
  }
103289
103377
  constructor(t, e) {
103290
- if (!a.#o)
103378
+ if (!c.#o)
103291
103379
  throw new TypeError("instantiate Stack using Stack.create(n)");
103292
103380
  this.heap = new e(t), this.length = 0;
103293
103381
  }
@@ -103298,7 +103386,7 @@ var W = class a {
103298
103386
  return this.heap[--this.length];
103299
103387
  }
103300
103388
  };
103301
- var L = class a2 {
103389
+ var L = class c2 {
103302
103390
  #o;
103303
103391
  #c;
103304
103392
  #w;
@@ -103343,13 +103431,13 @@ var L = class a2 {
103343
103431
  #T;
103344
103432
  #v;
103345
103433
  #f;
103346
- #x;
103434
+ #U;
103347
103435
  static unsafeExposeInternals(t) {
103348
103436
  return { starts: t.#A, ttls: t.#d, autopurgeTimers: t.#g, sizes: t.#y, keyMap: t.#s, keyList: t.#i, valList: t.#t, next: t.#a, prev: t.#u, get head() {
103349
103437
  return t.#l;
103350
103438
  }, get tail() {
103351
103439
  return t.#h;
103352
- }, free: t.#b, isBackgroundFetch: (e) => t.#e(e), backgroundFetch: (e, i, s, h) => t.#G(e, i, s, h), moveToTail: (e) => t.#D(e), indexes: (e) => t.#F(e), rindexes: (e) => t.#O(e), isStale: (e) => t.#p(e) };
103440
+ }, free: t.#b, isBackgroundFetch: (e) => t.#e(e), backgroundFetch: (e, i, s, n) => t.#G(e, i, s, n), moveToTail: (e) => t.#D(e), indexes: (e) => t.#F(e), rindexes: (e) => t.#O(e), isStale: (e) => t.#p(e) };
103353
103441
  }
103354
103442
  get max() {
103355
103443
  return this.#o;
@@ -103379,12 +103467,12 @@ var L = class a2 {
103379
103467
  return this.#S;
103380
103468
  }
103381
103469
  constructor(t) {
103382
- let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: h, updateAgeOnGet: n, updateAgeOnHas: o, allowStale: r, dispose: f, onInsert: m, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: g, maxSize: A = 0, maxEntrySize: p = 0, sizeCalculation: _, fetchMethod: l, memoMethod: w, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: S, allowStaleOnFetchRejection: u, allowStaleOnFetchAbort: T, ignoreFetchAbort: F, perf: v } = t;
103470
+ let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: r, dispose: a, onInsert: w, disposeAfter: f, noDisposeOnSet: d, noUpdateTTL: g, maxSize: A = 0, maxEntrySize: p = 0, sizeCalculation: _, fetchMethod: l, memoMethod: S, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: m, allowStaleOnFetchRejection: u, allowStaleOnFetchAbort: T, ignoreFetchAbort: F, perf: v } = t;
103383
103471
  if (v !== undefined && typeof v?.now != "function")
103384
103472
  throw new TypeError("perf option must have a now() method if specified");
103385
- if (this.#m = v ?? M, e !== 0 && !y(e))
103473
+ if (this.#m = v ?? x, e !== 0 && !y(e))
103386
103474
  throw new TypeError("max option must be a nonnegative integer");
103387
- let O = e ? U(e) : Array;
103475
+ let O = e ? M(e) : Array;
103388
103476
  if (!O)
103389
103477
  throw new Error("invalid max value: " + e);
103390
103478
  if (this.#o = e, this.#c = A, this.maxEntrySize = p || this.#c, this.sizeCalculation = _, this.sizeCalculation) {
@@ -103393,18 +103481,18 @@ var L = class a2 {
103393
103481
  if (typeof this.sizeCalculation != "function")
103394
103482
  throw new TypeError("sizeCalculation set to non-function");
103395
103483
  }
103396
- if (w !== undefined && typeof w != "function")
103484
+ if (S !== undefined && typeof S != "function")
103397
103485
  throw new TypeError("memoMethod must be a function if defined");
103398
- if (this.#I = w, l !== undefined && typeof l != "function")
103486
+ if (this.#I = S, l !== undefined && typeof l != "function")
103399
103487
  throw new TypeError("fetchMethod must be a function if specified");
103400
- if (this.#L = l, this.#v = !!l, this.#s = new Map, this.#i = new Array(e).fill(undefined), this.#t = new Array(e).fill(undefined), this.#a = new O(e), this.#u = new O(e), this.#l = 0, this.#h = 0, this.#b = W.create(e), this.#n = 0, this.#_ = 0, typeof f == "function" && (this.#w = f), typeof m == "function" && (this.#C = m), typeof c == "function" ? (this.#S = c, this.#r = []) : (this.#S = undefined, this.#r = undefined), this.#T = !!this.#w, this.#x = !!this.#C, this.#f = !!this.#S, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!g, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!u, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!F, this.maxEntrySize !== 0) {
103488
+ if (this.#L = l, this.#v = !!l, this.#s = new Map, this.#i = new Array(e).fill(undefined), this.#t = new Array(e).fill(undefined), this.#a = new O(e), this.#u = new O(e), this.#l = 0, this.#h = 0, this.#b = W.create(e), this.#n = 0, this.#_ = 0, typeof a == "function" && (this.#w = a), typeof w == "function" && (this.#C = w), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = undefined, this.#r = undefined), this.#T = !!this.#w, this.#U = !!this.#C, this.#f = !!this.#S, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!g, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!u, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!F, this.maxEntrySize !== 0) {
103401
103489
  if (this.#c !== 0 && !y(this.#c))
103402
103490
  throw new TypeError("maxSize must be a positive integer if specified");
103403
103491
  if (!y(this.maxEntrySize))
103404
103492
  throw new TypeError("maxEntrySize must be a positive integer if specified");
103405
103493
  this.#B();
103406
103494
  }
103407
- if (this.allowStale = !!r, this.noDeleteOnStaleGet = !!S, this.updateAgeOnGet = !!n, this.updateAgeOnHas = !!o, this.ttlResolution = y(s) || s === 0 ? s : 1, this.ttlAutopurge = !!h, this.ttl = i || 0, this.ttl) {
103495
+ if (this.allowStale = !!r, this.noDeleteOnStaleGet = !!m, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!h, this.ttlResolution = y(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
103408
103496
  if (!y(this.ttl))
103409
103497
  throw new TypeError("ttl must be a positive integer if specified");
103410
103498
  this.#j();
@@ -103413,7 +103501,7 @@ var L = class a2 {
103413
103501
  throw new TypeError("At least one of max, maxSize, or ttl is required");
103414
103502
  if (!this.ttlAutopurge && !this.#o && !this.#c) {
103415
103503
  let E = "LRU_CACHE_UNBOUNDED";
103416
- G(E) && (I.add(E), x("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, a2));
103504
+ G(E) && (I.add(E), U("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, c2));
103417
103505
  }
103418
103506
  }
103419
103507
  getRemainingTTL(t) {
@@ -103423,46 +103511,50 @@ var L = class a2 {
103423
103511
  let t = new z5(this.#o), e = new z5(this.#o);
103424
103512
  this.#d = t, this.#A = e;
103425
103513
  let i = this.ttlAutopurge ? new Array(this.#o) : undefined;
103426
- this.#g = i, this.#N = (n, o, r = this.#m.now()) => {
103427
- if (e[n] = o !== 0 ? r : 0, t[n] = o, i?.[n] && (clearTimeout(i[n]), i[n] = undefined), o !== 0 && i) {
103428
- let f = setTimeout(() => {
103429
- this.#p(n) && this.#E(this.#i[n], "expire");
103430
- }, o + 1);
103431
- f.unref && f.unref(), i[n] = f;
103432
- }
103433
- }, this.#R = (n) => {
103434
- e[n] = t[n] !== 0 ? this.#m.now() : 0;
103435
- }, this.#z = (n, o) => {
103436
- if (t[o]) {
103437
- let r = t[o], f = e[o];
103438
- if (!r || !f)
103514
+ this.#g = i, this.#N = (h, r, a = this.#m.now()) => {
103515
+ e[h] = r !== 0 ? a : 0, t[h] = r, s(h, r);
103516
+ }, this.#R = (h) => {
103517
+ e[h] = t[h] !== 0 ? this.#m.now() : 0, s(h, t[h]);
103518
+ };
103519
+ let s = this.ttlAutopurge ? (h, r) => {
103520
+ if (i?.[h] && (clearTimeout(i[h]), i[h] = undefined), r && r !== 0 && i) {
103521
+ let a = setTimeout(() => {
103522
+ this.#p(h) && this.#E(this.#i[h], "expire");
103523
+ }, r + 1);
103524
+ a.unref && a.unref(), i[h] = a;
103525
+ }
103526
+ } : () => {};
103527
+ this.#z = (h, r) => {
103528
+ if (t[r]) {
103529
+ let a = t[r], w = e[r];
103530
+ if (!a || !w)
103439
103531
  return;
103440
- n.ttl = r, n.start = f, n.now = s || h();
103441
- let m = n.now - f;
103442
- n.remainingTTL = r - m;
103532
+ h.ttl = a, h.start = w, h.now = n || o();
103533
+ let f = h.now - w;
103534
+ h.remainingTTL = a - f;
103443
103535
  }
103444
103536
  };
103445
- let s = 0, h = () => {
103446
- let n = this.#m.now();
103537
+ let n = 0, o = () => {
103538
+ let h = this.#m.now();
103447
103539
  if (this.ttlResolution > 0) {
103448
- s = n;
103449
- let o = setTimeout(() => s = 0, this.ttlResolution);
103450
- o.unref && o.unref();
103540
+ n = h;
103541
+ let r = setTimeout(() => n = 0, this.ttlResolution);
103542
+ r.unref && r.unref();
103451
103543
  }
103452
- return n;
103544
+ return h;
103453
103545
  };
103454
- this.getRemainingTTL = (n) => {
103455
- let o = this.#s.get(n);
103456
- if (o === undefined)
103546
+ this.getRemainingTTL = (h) => {
103547
+ let r = this.#s.get(h);
103548
+ if (r === undefined)
103457
103549
  return 0;
103458
- let r = t[o], f = e[o];
103459
- if (!r || !f)
103550
+ let a = t[r], w = e[r];
103551
+ if (!a || !w)
103460
103552
  return 1 / 0;
103461
- let m = (s || h()) - f;
103462
- return r - m;
103463
- }, this.#p = (n) => {
103464
- let o = e[n], r = t[n];
103465
- return !!r && !!o && (s || h()) - o > r;
103553
+ let f = (n || o()) - w;
103554
+ return a - f;
103555
+ }, this.#p = (h) => {
103556
+ let r = e[h], a = t[h];
103557
+ return !!a && !!r && (n || o()) - r > a;
103466
103558
  };
103467
103559
  }
103468
103560
  #R = () => {};
@@ -103473,29 +103565,29 @@ var L = class a2 {
103473
103565
  let t = new z5(this.#o);
103474
103566
  this.#_ = 0, this.#y = t, this.#W = (e) => {
103475
103567
  this.#_ -= t[e], t[e] = 0;
103476
- }, this.#P = (e, i, s, h) => {
103568
+ }, this.#P = (e, i, s, n) => {
103477
103569
  if (this.#e(i))
103478
103570
  return 0;
103479
103571
  if (!y(s))
103480
- if (h) {
103481
- if (typeof h != "function")
103572
+ if (n) {
103573
+ if (typeof n != "function")
103482
103574
  throw new TypeError("sizeCalculation must be a function");
103483
- if (s = h(i, e), !y(s))
103575
+ if (s = n(i, e), !y(s))
103484
103576
  throw new TypeError("sizeCalculation return invalid (expect positive integer)");
103485
103577
  } else
103486
103578
  throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
103487
103579
  return s;
103488
- }, this.#U = (e, i, s) => {
103580
+ }, this.#M = (e, i, s) => {
103489
103581
  if (t[e] = i, this.#c) {
103490
- let h = this.#c - t[e];
103491
- for (;this.#_ > h; )
103492
- this.#M(true);
103582
+ let n = this.#c - t[e];
103583
+ for (;this.#_ > n; )
103584
+ this.#x(true);
103493
103585
  }
103494
103586
  this.#_ += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#_);
103495
103587
  };
103496
103588
  }
103497
103589
  #W = (t) => {};
103498
- #U = (t, e, i) => {};
103590
+ #M = (t, e, i) => {};
103499
103591
  #P = (t, e, i, s) => {
103500
103592
  if (i || s)
103501
103593
  throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
@@ -103548,21 +103640,21 @@ var L = class a2 {
103548
103640
  [Symbol.toStringTag] = "LRUCache";
103549
103641
  find(t, e = {}) {
103550
103642
  for (let i of this.#F()) {
103551
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
103552
- if (h !== undefined && t(h, this.#i[i], this))
103643
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
103644
+ if (n !== undefined && t(n, this.#i[i], this))
103553
103645
  return this.get(this.#i[i], e);
103554
103646
  }
103555
103647
  }
103556
103648
  forEach(t, e = this) {
103557
103649
  for (let i of this.#F()) {
103558
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
103559
- h !== undefined && t.call(e, h, this.#i[i], this);
103650
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
103651
+ n !== undefined && t.call(e, n, this.#i[i], this);
103560
103652
  }
103561
103653
  }
103562
103654
  rforEach(t, e = this) {
103563
103655
  for (let i of this.#O()) {
103564
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
103565
- h !== undefined && t.call(e, h, this.#i[i], this);
103656
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
103657
+ n !== undefined && t.call(e, n, this.#i[i], this);
103566
103658
  }
103567
103659
  }
103568
103660
  purgeStale() {
@@ -103578,29 +103670,29 @@ var L = class a2 {
103578
103670
  let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
103579
103671
  if (s === undefined)
103580
103672
  return;
103581
- let h = { value: s };
103673
+ let n = { value: s };
103582
103674
  if (this.#d && this.#A) {
103583
- let n = this.#d[e], o = this.#A[e];
103584
- if (n && o) {
103585
- let r = n - (this.#m.now() - o);
103586
- h.ttl = r, h.start = Date.now();
103675
+ let o = this.#d[e], h = this.#A[e];
103676
+ if (o && h) {
103677
+ let r = o - (this.#m.now() - h);
103678
+ n.ttl = r, n.start = Date.now();
103587
103679
  }
103588
103680
  }
103589
- return this.#y && (h.size = this.#y[e]), h;
103681
+ return this.#y && (n.size = this.#y[e]), n;
103590
103682
  }
103591
103683
  dump() {
103592
103684
  let t = [];
103593
103685
  for (let e of this.#F({ allowStale: true })) {
103594
- let i = this.#i[e], s = this.#t[e], h = this.#e(s) ? s.__staleWhileFetching : s;
103595
- if (h === undefined || i === undefined)
103686
+ let i = this.#i[e], s = this.#t[e], n = this.#e(s) ? s.__staleWhileFetching : s;
103687
+ if (n === undefined || i === undefined)
103596
103688
  continue;
103597
- let n = { value: h };
103689
+ let o = { value: n };
103598
103690
  if (this.#d && this.#A) {
103599
- n.ttl = this.#d[e];
103600
- let o = this.#m.now() - this.#A[e];
103601
- n.start = Math.floor(Date.now() - o);
103691
+ o.ttl = this.#d[e];
103692
+ let h = this.#m.now() - this.#A[e];
103693
+ o.start = Math.floor(Date.now() - h);
103602
103694
  }
103603
- this.#y && (n.size = this.#y[e]), t.unshift([i, n]);
103695
+ this.#y && (o.size = this.#y[e]), t.unshift([i, o]);
103604
103696
  }
103605
103697
  return t;
103606
103698
  }
@@ -103617,32 +103709,32 @@ var L = class a2 {
103617
103709
  set(t, e, i = {}) {
103618
103710
  if (e === undefined)
103619
103711
  return this.delete(t), this;
103620
- let { ttl: s = this.ttl, start: h, noDisposeOnSet: n = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: r } = i, { noUpdateTTL: f = this.noUpdateTTL } = i, m = this.#P(t, e, i.size || 0, o);
103621
- if (this.maxEntrySize && m > this.maxEntrySize)
103712
+ let { ttl: s = this.ttl, start: n, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: r } = i, { noUpdateTTL: a = this.noUpdateTTL } = i, w = this.#P(t, e, i.size || 0, h);
103713
+ if (this.maxEntrySize && w > this.maxEntrySize)
103622
103714
  return r && (r.set = "miss", r.maxEntrySizeExceeded = true), this.#E(t, "set"), this;
103623
- let c = this.#n === 0 ? undefined : this.#s.get(t);
103624
- if (c === undefined)
103625
- c = this.#n === 0 ? this.#h : this.#b.length !== 0 ? this.#b.pop() : this.#n === this.#o ? this.#M(false) : this.#n, this.#i[c] = t, this.#t[c] = e, this.#s.set(t, c), this.#a[this.#h] = c, this.#u[c] = this.#h, this.#h = c, this.#n++, this.#U(c, m, r), r && (r.set = "add"), f = false, this.#x && this.#C?.(e, t, "add");
103715
+ let f = this.#n === 0 ? undefined : this.#s.get(t);
103716
+ if (f === undefined)
103717
+ f = this.#n === 0 ? this.#h : this.#b.length !== 0 ? this.#b.pop() : this.#n === this.#o ? this.#x(false) : this.#n, this.#i[f] = t, this.#t[f] = e, this.#s.set(t, f), this.#a[this.#h] = f, this.#u[f] = this.#h, this.#h = f, this.#n++, this.#M(f, w, r), r && (r.set = "add"), a = false, this.#U && this.#C?.(e, t, "add");
103626
103718
  else {
103627
- this.#D(c);
103628
- let d = this.#t[c];
103719
+ this.#D(f);
103720
+ let d = this.#t[f];
103629
103721
  if (e !== d) {
103630
103722
  if (this.#v && this.#e(d)) {
103631
103723
  d.__abortController.abort(new Error("replaced"));
103632
103724
  let { __staleWhileFetching: g } = d;
103633
- g !== undefined && !n && (this.#T && this.#w?.(g, t, "set"), this.#f && this.#r?.push([g, t, "set"]));
103725
+ g !== undefined && !o && (this.#T && this.#w?.(g, t, "set"), this.#f && this.#r?.push([g, t, "set"]));
103634
103726
  } else
103635
- n || (this.#T && this.#w?.(d, t, "set"), this.#f && this.#r?.push([d, t, "set"]));
103636
- if (this.#W(c), this.#U(c, m, r), this.#t[c] = e, r) {
103727
+ o || (this.#T && this.#w?.(d, t, "set"), this.#f && this.#r?.push([d, t, "set"]));
103728
+ if (this.#W(f), this.#M(f, w, r), this.#t[f] = e, r) {
103637
103729
  r.set = "replace";
103638
103730
  let g = d && this.#e(d) ? d.__staleWhileFetching : d;
103639
103731
  g !== undefined && (r.oldValue = g);
103640
103732
  }
103641
103733
  } else
103642
103734
  r && (r.set = "update");
103643
- this.#x && this.onInsert?.(e, t, e === d ? "update" : "replace");
103735
+ this.#U && this.onInsert?.(e, t, e === d ? "update" : "replace");
103644
103736
  }
103645
- if (s !== 0 && !this.#d && this.#j(), this.#d && (f || this.#N(c, s, h), r && this.#z(r, c)), !n && this.#f && this.#r) {
103737
+ if (s !== 0 && !this.#d && this.#j(), this.#d && (a || this.#N(f, s, n), r && this.#z(r, f)), !o && this.#f && this.#r) {
103646
103738
  let d = this.#r, g;
103647
103739
  for (;g = d?.shift(); )
103648
103740
  this.#S?.(...g);
@@ -103653,7 +103745,7 @@ var L = class a2 {
103653
103745
  try {
103654
103746
  for (;this.#n; ) {
103655
103747
  let t = this.#t[this.#l];
103656
- if (this.#M(true), this.#e(t)) {
103748
+ if (this.#x(true), this.#e(t)) {
103657
103749
  if (t.__staleWhileFetching)
103658
103750
  return t.__staleWhileFetching;
103659
103751
  } else if (t !== undefined)
@@ -103667,20 +103759,20 @@ var L = class a2 {
103667
103759
  }
103668
103760
  }
103669
103761
  }
103670
- #M(t) {
103762
+ #x(t) {
103671
103763
  let e = this.#l, i = this.#i[e], s = this.#t[e];
103672
103764
  return this.#v && this.#e(s) ? s.__abortController.abort(new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([s, i, "evict"])), this.#W(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = undefined), t && (this.#i[e] = undefined, this.#t[e] = undefined, this.#b.push(e)), this.#n === 1 ? (this.#l = this.#h = 0, this.#b.length = 0) : this.#l = this.#a[e], this.#s.delete(i), this.#n--, e;
103673
103765
  }
103674
103766
  has(t, e = {}) {
103675
- let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, h = this.#s.get(t);
103676
- if (h !== undefined) {
103677
- let n = this.#t[h];
103678
- if (this.#e(n) && n.__staleWhileFetching === undefined)
103767
+ let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, n = this.#s.get(t);
103768
+ if (n !== undefined) {
103769
+ let o = this.#t[n];
103770
+ if (this.#e(o) && o.__staleWhileFetching === undefined)
103679
103771
  return false;
103680
- if (this.#p(h))
103681
- s && (s.has = "stale", this.#z(s, h));
103772
+ if (this.#p(n))
103773
+ s && (s.has = "stale", this.#z(s, n));
103682
103774
  else
103683
- return i && this.#R(h), s && (s.has = "hit", this.#z(s, h)), true;
103775
+ return i && this.#R(n), s && (s.has = "hit", this.#z(s, n)), true;
103684
103776
  } else
103685
103777
  s && (s.has = "miss");
103686
103778
  return false;
@@ -103689,35 +103781,35 @@ var L = class a2 {
103689
103781
  let { allowStale: i = this.allowStale } = e, s = this.#s.get(t);
103690
103782
  if (s === undefined || !i && this.#p(s))
103691
103783
  return;
103692
- let h = this.#t[s];
103693
- return this.#e(h) ? h.__staleWhileFetching : h;
103784
+ let n = this.#t[s];
103785
+ return this.#e(n) ? n.__staleWhileFetching : n;
103694
103786
  }
103695
103787
  #G(t, e, i, s) {
103696
- let h = e === undefined ? undefined : this.#t[e];
103697
- if (this.#e(h))
103698
- return h;
103699
- let n = new C, { signal: o } = i;
103700
- o?.addEventListener("abort", () => n.abort(o.reason), { signal: n.signal });
103701
- let r = { signal: n.signal, options: i, context: s }, f = (p, _ = false) => {
103702
- let { aborted: l } = n.signal, w = i.ignoreFetchAbort && p !== undefined, b = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && p !== undefined);
103703
- if (i.status && (l && !_ ? (i.status.fetchAborted = true, i.status.fetchError = n.signal.reason, w && (i.status.fetchAbortIgnored = true)) : i.status.fetchResolved = true), l && !w && !_)
103704
- return c(n.signal.reason, b);
103705
- let S = g, u = this.#t[e];
103706
- return (u === g || w && _ && u === undefined) && (p === undefined ? S.__staleWhileFetching !== undefined ? this.#t[e] = S.__staleWhileFetching : this.#E(t, "fetch") : (i.status && (i.status.fetchUpdated = true), this.set(t, p, r.options))), p;
103707
- }, m = (p) => (i.status && (i.status.fetchRejected = true, i.status.fetchError = p), c(p, false)), c = (p, _) => {
103708
- let { aborted: l } = n.signal, w = l && i.allowStaleOnFetchAbort, b = w || i.allowStaleOnFetchRejection, S = b || i.noDeleteOnFetchRejection, u = g;
103709
- if (this.#t[e] === g && (!S || !_ && u.__staleWhileFetching === undefined ? this.#E(t, "fetch") : w || (this.#t[e] = u.__staleWhileFetching)), b)
103788
+ let n = e === undefined ? undefined : this.#t[e];
103789
+ if (this.#e(n))
103790
+ return n;
103791
+ let o = new C, { signal: h } = i;
103792
+ h?.addEventListener("abort", () => o.abort(h.reason), { signal: o.signal });
103793
+ let r = { signal: o.signal, options: i, context: s }, a = (p, _ = false) => {
103794
+ let { aborted: l } = o.signal, S = i.ignoreFetchAbort && p !== undefined, b = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && p !== undefined);
103795
+ if (i.status && (l && !_ ? (i.status.fetchAborted = true, i.status.fetchError = o.signal.reason, S && (i.status.fetchAbortIgnored = true)) : i.status.fetchResolved = true), l && !S && !_)
103796
+ return f(o.signal.reason, b);
103797
+ let m = g, u = this.#t[e];
103798
+ return (u === g || S && _ && u === undefined) && (p === undefined ? m.__staleWhileFetching !== undefined ? this.#t[e] = m.__staleWhileFetching : this.#E(t, "fetch") : (i.status && (i.status.fetchUpdated = true), this.set(t, p, r.options))), p;
103799
+ }, w = (p) => (i.status && (i.status.fetchRejected = true, i.status.fetchError = p), f(p, false)), f = (p, _) => {
103800
+ let { aborted: l } = o.signal, S = l && i.allowStaleOnFetchAbort, b = S || i.allowStaleOnFetchRejection, m = b || i.noDeleteOnFetchRejection, u = g;
103801
+ if (this.#t[e] === g && (!m || !_ && u.__staleWhileFetching === undefined ? this.#E(t, "fetch") : S || (this.#t[e] = u.__staleWhileFetching)), b)
103710
103802
  return i.status && u.__staleWhileFetching !== undefined && (i.status.returnedStale = true), u.__staleWhileFetching;
103711
103803
  if (u.__returned === u)
103712
103804
  throw p;
103713
103805
  }, d = (p, _) => {
103714
- let l = this.#L?.(t, h, r);
103715
- l && l instanceof Promise && l.then((w) => p(w === undefined ? undefined : w), _), n.signal.addEventListener("abort", () => {
103716
- (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (p(undefined), i.allowStaleOnFetchAbort && (p = (w) => f(w, true)));
103806
+ let l = this.#L?.(t, n, r);
103807
+ l && l instanceof Promise && l.then((S) => p(S === undefined ? undefined : S), _), o.signal.addEventListener("abort", () => {
103808
+ (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (p(undefined), i.allowStaleOnFetchAbort && (p = (S) => a(S, true)));
103717
103809
  });
103718
103810
  };
103719
103811
  i.status && (i.status.fetchDispatched = true);
103720
- let g = new Promise(d).then(f, m), A = Object.assign(g, { __abortController: n, __staleWhileFetching: h, __returned: undefined });
103812
+ let g = new Promise(d).then(a, w), A = Object.assign(g, { __abortController: o, __staleWhileFetching: n, __returned: undefined });
103721
103813
  return e === undefined ? (this.set(t, A, { ...r.options, status: undefined }), e = this.#s.get(t)) : this.#t[e] = A, A;
103722
103814
  }
103723
103815
  #e(t) {
@@ -103727,24 +103819,24 @@ var L = class a2 {
103727
103819
  return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof C;
103728
103820
  }
103729
103821
  async fetch(t, e = {}) {
103730
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, ttl: n = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: r = 0, sizeCalculation: f = this.sizeCalculation, noUpdateTTL: m = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: g = this.ignoreFetchAbort, allowStaleOnFetchAbort: A = this.allowStaleOnFetchAbort, context: p, forceRefresh: _ = false, status: l, signal: w } = e;
103822
+ let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: r = 0, sizeCalculation: a = this.sizeCalculation, noUpdateTTL: w = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: g = this.ignoreFetchAbort, allowStaleOnFetchAbort: A = this.allowStaleOnFetchAbort, context: p, forceRefresh: _ = false, status: l, signal: S } = e;
103731
103823
  if (!this.#v)
103732
- return l && (l.fetch = "get"), this.get(t, { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: h, status: l });
103733
- let b = { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: h, ttl: n, noDisposeOnSet: o, size: r, sizeCalculation: f, noUpdateTTL: m, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: g, status: l, signal: w }, S = this.#s.get(t);
103734
- if (S === undefined) {
103824
+ return l && (l.fetch = "get"), this.get(t, { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, status: l });
103825
+ let b = { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, ttl: o, noDisposeOnSet: h, size: r, sizeCalculation: a, noUpdateTTL: w, noDeleteOnFetchRejection: f, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: g, status: l, signal: S }, m = this.#s.get(t);
103826
+ if (m === undefined) {
103735
103827
  l && (l.fetch = "miss");
103736
- let u = this.#G(t, S, b, p);
103828
+ let u = this.#G(t, m, b, p);
103737
103829
  return u.__returned = u;
103738
103830
  } else {
103739
- let u = this.#t[S];
103831
+ let u = this.#t[m];
103740
103832
  if (this.#e(u)) {
103741
103833
  let E = i && u.__staleWhileFetching !== undefined;
103742
103834
  return l && (l.fetch = "inflight", E && (l.returnedStale = true)), E ? u.__staleWhileFetching : u.__returned = u;
103743
103835
  }
103744
- let T = this.#p(S);
103836
+ let T = this.#p(m);
103745
103837
  if (!_ && !T)
103746
- return l && (l.fetch = "hit"), this.#D(S), s && this.#R(S), l && this.#z(l, S), u;
103747
- let F = this.#G(t, S, b, p), O = F.__staleWhileFetching !== undefined && i;
103838
+ return l && (l.fetch = "hit"), this.#D(m), s && this.#R(m), l && this.#z(l, m), u;
103839
+ let F = this.#G(t, m, b, p), O = F.__staleWhileFetching !== undefined && i;
103748
103840
  return l && (l.fetch = T ? "stale" : "refresh", O && T && (l.returnedStale = true)), O ? F.__staleWhileFetching : F.__returned = F;
103749
103841
  }
103750
103842
  }
@@ -103758,19 +103850,19 @@ var L = class a2 {
103758
103850
  let i = this.#I;
103759
103851
  if (!i)
103760
103852
  throw new Error("no memoMethod provided to constructor");
103761
- let { context: s, forceRefresh: h, ...n } = e, o = this.get(t, n);
103762
- if (!h && o !== undefined)
103763
- return o;
103764
- let r = i(t, o, { options: n, context: s });
103765
- return this.set(t, r, n), r;
103853
+ let { context: s, forceRefresh: n, ...o } = e, h = this.get(t, o);
103854
+ if (!n && h !== undefined)
103855
+ return h;
103856
+ let r = i(t, h, { options: o, context: s });
103857
+ return this.set(t, r, o), r;
103766
103858
  }
103767
103859
  get(t, e = {}) {
103768
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, status: n } = e, o = this.#s.get(t);
103769
- if (o !== undefined) {
103770
- let r = this.#t[o], f = this.#e(r);
103771
- return n && this.#z(n, o), this.#p(o) ? (n && (n.get = "stale"), f ? (n && i && r.__staleWhileFetching !== undefined && (n.returnedStale = true), i ? r.__staleWhileFetching : undefined) : (h || this.#E(t, "expire"), n && i && (n.returnedStale = true), i ? r : undefined)) : (n && (n.get = "hit"), f ? r.__staleWhileFetching : (this.#D(o), s && this.#R(o), r));
103860
+ let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = e, h = this.#s.get(t);
103861
+ if (h !== undefined) {
103862
+ let r = this.#t[h], a = this.#e(r);
103863
+ return o && this.#z(o, h), this.#p(h) ? (o && (o.get = "stale"), a ? (o && i && r.__staleWhileFetching !== undefined && (o.returnedStale = true), i ? r.__staleWhileFetching : undefined) : (n || this.#E(t, "expire"), o && i && (o.returnedStale = true), i ? r : undefined)) : (o && (o.get = "hit"), a ? r.__staleWhileFetching : (this.#D(h), s && this.#R(h), r));
103772
103864
  } else
103773
- n && (n.get = "miss");
103865
+ o && (o.get = "miss");
103774
103866
  }
103775
103867
  #k(t, e) {
103776
103868
  this.#u[e] = t, this.#a[t] = e;
@@ -103790,24 +103882,24 @@ var L = class a2 {
103790
103882
  this.#V(e);
103791
103883
  else {
103792
103884
  this.#W(s);
103793
- let h = this.#t[s];
103794
- if (this.#e(h) ? h.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(h, t, e), this.#f && this.#r?.push([h, t, e])), this.#s.delete(t), this.#i[s] = undefined, this.#t[s] = undefined, s === this.#h)
103885
+ let n = this.#t[s];
103886
+ if (this.#e(n) ? n.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, t, e), this.#f && this.#r?.push([n, t, e])), this.#s.delete(t), this.#i[s] = undefined, this.#t[s] = undefined, s === this.#h)
103795
103887
  this.#h = this.#u[s];
103796
103888
  else if (s === this.#l)
103797
103889
  this.#l = this.#a[s];
103798
103890
  else {
103799
- let n = this.#u[s];
103800
- this.#a[n] = this.#a[s];
103801
- let o = this.#a[s];
103802
- this.#u[o] = this.#u[s];
103891
+ let o = this.#u[s];
103892
+ this.#a[o] = this.#a[s];
103893
+ let h = this.#a[s];
103894
+ this.#u[h] = this.#u[s];
103803
103895
  }
103804
103896
  this.#n--, this.#b.push(s);
103805
103897
  }
103806
103898
  }
103807
103899
  if (this.#f && this.#r?.length) {
103808
- let s = this.#r, h;
103809
- for (;h = s?.shift(); )
103810
- this.#S?.(...h);
103900
+ let s = this.#r, n;
103901
+ for (;n = s?.shift(); )
103902
+ this.#S?.(...n);
103811
103903
  }
103812
103904
  return i;
103813
103905
  }