@ks-web/use 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -47,6 +47,62 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
47
47
  ));
48
48
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
49
 
50
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
51
+ var require_es_errors = __commonJS({
52
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) {
53
+ "use strict";
54
+ module2.exports = Error;
55
+ }
56
+ });
57
+
58
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
59
+ var require_eval = __commonJS({
60
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) {
61
+ "use strict";
62
+ module2.exports = EvalError;
63
+ }
64
+ });
65
+
66
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
67
+ var require_range = __commonJS({
68
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) {
69
+ "use strict";
70
+ module2.exports = RangeError;
71
+ }
72
+ });
73
+
74
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
75
+ var require_ref = __commonJS({
76
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) {
77
+ "use strict";
78
+ module2.exports = ReferenceError;
79
+ }
80
+ });
81
+
82
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
83
+ var require_syntax = __commonJS({
84
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) {
85
+ "use strict";
86
+ module2.exports = SyntaxError;
87
+ }
88
+ });
89
+
90
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
91
+ var require_type = __commonJS({
92
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) {
93
+ "use strict";
94
+ module2.exports = TypeError;
95
+ }
96
+ });
97
+
98
+ // ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
99
+ var require_uri = __commonJS({
100
+ "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) {
101
+ "use strict";
102
+ module2.exports = URIError;
103
+ }
104
+ });
105
+
50
106
  // ../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js
51
107
  var require_shams = __commonJS({
52
108
  "../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports2, module2) {
@@ -123,44 +179,85 @@ var require_has_symbols = __commonJS({
123
179
  }
124
180
  });
125
181
 
126
- // ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js
182
+ // ../../node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js
183
+ var require_has_proto = __commonJS({
184
+ "../../node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports2, module2) {
185
+ "use strict";
186
+ var test = {
187
+ __proto__: null,
188
+ foo: {}
189
+ };
190
+ var $Object = Object;
191
+ module2.exports = function hasProto() {
192
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
193
+ };
194
+ }
195
+ });
196
+
197
+ // ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
127
198
  var require_implementation = __commonJS({
128
- "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) {
199
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports2, module2) {
129
200
  "use strict";
130
201
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
131
- var slice = Array.prototype.slice;
132
202
  var toStr = Object.prototype.toString;
203
+ var max = Math.max;
133
204
  var funcType = "[object Function]";
205
+ var concatty = function concatty2(a, b) {
206
+ var arr = [];
207
+ for (var i = 0; i < a.length; i += 1) {
208
+ arr[i] = a[i];
209
+ }
210
+ for (var j = 0; j < b.length; j += 1) {
211
+ arr[j + a.length] = b[j];
212
+ }
213
+ return arr;
214
+ };
215
+ var slicy = function slicy2(arrLike, offset) {
216
+ var arr = [];
217
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
218
+ arr[j] = arrLike[i];
219
+ }
220
+ return arr;
221
+ };
222
+ var joiny = function(arr, joiner) {
223
+ var str = "";
224
+ for (var i = 0; i < arr.length; i += 1) {
225
+ str += arr[i];
226
+ if (i + 1 < arr.length) {
227
+ str += joiner;
228
+ }
229
+ }
230
+ return str;
231
+ };
134
232
  module2.exports = function bind2(that) {
135
233
  var target = this;
136
- if (typeof target !== "function" || toStr.call(target) !== funcType) {
234
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
137
235
  throw new TypeError(ERROR_MESSAGE + target);
138
236
  }
139
- var args = slice.call(arguments, 1);
237
+ var args = slicy(arguments, 1);
140
238
  var bound;
141
239
  var binder = function() {
142
240
  if (this instanceof bound) {
143
241
  var result = target.apply(
144
242
  this,
145
- args.concat(slice.call(arguments))
243
+ concatty(args, arguments)
146
244
  );
147
245
  if (Object(result) === result) {
148
246
  return result;
149
247
  }
150
248
  return this;
151
- } else {
152
- return target.apply(
153
- that,
154
- args.concat(slice.call(arguments))
155
- );
156
249
  }
250
+ return target.apply(
251
+ that,
252
+ concatty(args, arguments)
253
+ );
157
254
  };
158
- var boundLength = Math.max(0, target.length - args.length);
255
+ var boundLength = max(0, target.length - args.length);
159
256
  var boundArgs = [];
160
257
  for (var i = 0; i < boundLength; i++) {
161
- boundArgs.push("$" + i);
258
+ boundArgs[i] = "$" + i;
162
259
  }
163
- bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
260
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
164
261
  if (target.prototype) {
165
262
  var Empty = function Empty2() {
166
263
  };
@@ -173,32 +270,39 @@ var require_implementation = __commonJS({
173
270
  }
174
271
  });
175
272
 
176
- // ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js
273
+ // ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
177
274
  var require_function_bind = __commonJS({
178
- "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) {
275
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports2, module2) {
179
276
  "use strict";
180
277
  var implementation = require_implementation();
181
278
  module2.exports = Function.prototype.bind || implementation;
182
279
  }
183
280
  });
184
281
 
185
- // ../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js
186
- var require_src = __commonJS({
187
- "../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) {
282
+ // ../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
283
+ var require_hasown = __commonJS({
284
+ "../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports2, module2) {
188
285
  "use strict";
286
+ var call = Function.prototype.call;
287
+ var $hasOwn = Object.prototype.hasOwnProperty;
189
288
  var bind2 = require_function_bind();
190
- module2.exports = bind2.call(Function.call, Object.prototype.hasOwnProperty);
289
+ module2.exports = bind2.call(call, $hasOwn);
191
290
  }
192
291
  });
193
292
 
194
- // ../../node_modules/.pnpm/get-intrinsic@1.1.3/node_modules/get-intrinsic/index.js
293
+ // ../../node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js
195
294
  var require_get_intrinsic = __commonJS({
196
- "../../node_modules/.pnpm/get-intrinsic@1.1.3/node_modules/get-intrinsic/index.js"(exports2, module2) {
295
+ "../../node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports2, module2) {
197
296
  "use strict";
198
297
  var undefined2;
199
- var $SyntaxError = SyntaxError;
298
+ var $Error = require_es_errors();
299
+ var $EvalError = require_eval();
300
+ var $RangeError = require_range();
301
+ var $ReferenceError = require_ref();
302
+ var $SyntaxError = require_syntax();
303
+ var $TypeError = require_type();
304
+ var $URIError = require_uri();
200
305
  var $Function = Function;
201
- var $TypeError = TypeError;
202
306
  var getEvalledConstructor = function(expressionSyntax) {
203
307
  try {
204
308
  return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
@@ -229,16 +333,18 @@ var require_get_intrinsic = __commonJS({
229
333
  }
230
334
  }() : throwTypeError;
231
335
  var hasSymbols = require_has_symbols()();
232
- var getProto = Object.getPrototypeOf || function(x) {
336
+ var hasProto = require_has_proto()();
337
+ var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
233
338
  return x.__proto__;
234
- };
339
+ } : null);
235
340
  var needsEval = {};
236
- var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array);
341
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
237
342
  var INTRINSICS = {
343
+ __proto__: null,
238
344
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
239
345
  "%Array%": Array,
240
346
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
241
- "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,
347
+ "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
242
348
  "%AsyncFromSyncIteratorPrototype%": undefined2,
243
349
  "%AsyncFunction%": needsEval,
244
350
  "%AsyncGenerator%": needsEval,
@@ -246,6 +352,8 @@ var require_get_intrinsic = __commonJS({
246
352
  "%AsyncIteratorPrototype%": needsEval,
247
353
  "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
248
354
  "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
355
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
356
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
249
357
  "%Boolean%": Boolean,
250
358
  "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
251
359
  "%Date%": Date,
@@ -253,10 +361,10 @@ var require_get_intrinsic = __commonJS({
253
361
  "%decodeURIComponent%": decodeURIComponent,
254
362
  "%encodeURI%": encodeURI,
255
363
  "%encodeURIComponent%": encodeURIComponent,
256
- "%Error%": Error,
364
+ "%Error%": $Error,
257
365
  "%eval%": eval,
258
366
  // eslint-disable-line no-eval
259
- "%EvalError%": EvalError,
367
+ "%EvalError%": $EvalError,
260
368
  "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
261
369
  "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
262
370
  "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
@@ -267,10 +375,10 @@ var require_get_intrinsic = __commonJS({
267
375
  "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
268
376
  "%isFinite%": isFinite,
269
377
  "%isNaN%": isNaN,
270
- "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,
378
+ "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
271
379
  "%JSON%": typeof JSON === "object" ? JSON : undefined2,
272
380
  "%Map%": typeof Map === "undefined" ? undefined2 : Map,
273
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
381
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
274
382
  "%Math%": Math,
275
383
  "%Number%": Number,
276
384
  "%Object%": Object,
@@ -278,15 +386,15 @@ var require_get_intrinsic = __commonJS({
278
386
  "%parseInt%": parseInt,
279
387
  "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
280
388
  "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
281
- "%RangeError%": RangeError,
282
- "%ReferenceError%": ReferenceError,
389
+ "%RangeError%": $RangeError,
390
+ "%ReferenceError%": $ReferenceError,
283
391
  "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
284
392
  "%RegExp%": RegExp,
285
393
  "%Set%": typeof Set === "undefined" ? undefined2 : Set,
286
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
394
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
287
395
  "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
288
396
  "%String%": String,
289
- "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2,
397
+ "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
290
398
  "%Symbol%": hasSymbols ? Symbol : undefined2,
291
399
  "%SyntaxError%": $SyntaxError,
292
400
  "%ThrowTypeError%": ThrowTypeError,
@@ -296,11 +404,20 @@ var require_get_intrinsic = __commonJS({
296
404
  "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
297
405
  "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
298
406
  "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
299
- "%URIError%": URIError,
407
+ "%URIError%": $URIError,
300
408
  "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
301
409
  "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
302
410
  "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
303
411
  };
412
+ if (getProto) {
413
+ try {
414
+ null.error;
415
+ } catch (e) {
416
+ errorProto = getProto(getProto(e));
417
+ INTRINSICS["%Error.prototype%"] = errorProto;
418
+ }
419
+ }
420
+ var errorProto;
304
421
  var doEval = function doEval2(name) {
305
422
  var value;
306
423
  if (name === "%AsyncFunction%") {
@@ -316,7 +433,7 @@ var require_get_intrinsic = __commonJS({
316
433
  }
317
434
  } else if (name === "%AsyncIteratorPrototype%") {
318
435
  var gen = doEval2("%AsyncGenerator%");
319
- if (gen) {
436
+ if (gen && getProto) {
320
437
  value = getProto(gen.prototype);
321
438
  }
322
439
  }
@@ -324,6 +441,7 @@ var require_get_intrinsic = __commonJS({
324
441
  return value;
325
442
  };
326
443
  var LEGACY_ALIASES = {
444
+ __proto__: null,
327
445
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
328
446
  "%ArrayPrototype%": ["Array", "prototype"],
329
447
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -377,7 +495,7 @@ var require_get_intrinsic = __commonJS({
377
495
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
378
496
  };
379
497
  var bind2 = require_function_bind();
380
- var hasOwn = require_src();
498
+ var hasOwn = require_hasown();
381
499
  var $concat = bind2.call(Function.call, Array.prototype.concat);
382
500
  var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
383
501
  var $replace = bind2.call(Function.call, String.prototype.replace);
@@ -486,38 +604,186 @@ var require_get_intrinsic = __commonJS({
486
604
  }
487
605
  });
488
606
 
489
- // ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js
490
- var require_call_bind = __commonJS({
491
- "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(exports2, module2) {
607
+ // ../../node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js
608
+ var require_es_define_property = __commonJS({
609
+ "../../node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js"(exports2, module2) {
492
610
  "use strict";
493
- var bind2 = require_function_bind();
494
611
  var GetIntrinsic = require_get_intrinsic();
495
- var $apply = GetIntrinsic("%Function.prototype.apply%");
496
- var $call = GetIntrinsic("%Function.prototype.call%");
497
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
498
- var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
499
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
500
- var $max = GetIntrinsic("%Math.max%");
612
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
501
613
  if ($defineProperty) {
502
614
  try {
503
615
  $defineProperty({}, "a", { value: 1 });
504
616
  } catch (e) {
505
- $defineProperty = null;
617
+ $defineProperty = false;
506
618
  }
507
619
  }
508
- module2.exports = function callBind(originalFunction) {
509
- var func = $reflectApply(bind2, $call, arguments);
510
- if ($gOPD && $defineProperty) {
511
- var desc = $gOPD(func, "length");
512
- if (desc.configurable) {
513
- $defineProperty(
514
- func,
620
+ module2.exports = $defineProperty;
621
+ }
622
+ });
623
+
624
+ // ../../node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js
625
+ var require_gopd = __commonJS({
626
+ "../../node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) {
627
+ "use strict";
628
+ var GetIntrinsic = require_get_intrinsic();
629
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
630
+ if ($gOPD) {
631
+ try {
632
+ $gOPD([], "length");
633
+ } catch (e) {
634
+ $gOPD = null;
635
+ }
636
+ }
637
+ module2.exports = $gOPD;
638
+ }
639
+ });
640
+
641
+ // ../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
642
+ var require_define_data_property = __commonJS({
643
+ "../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports2, module2) {
644
+ "use strict";
645
+ var $defineProperty = require_es_define_property();
646
+ var $SyntaxError = require_syntax();
647
+ var $TypeError = require_type();
648
+ var gopd = require_gopd();
649
+ module2.exports = function defineDataProperty(obj, property, value) {
650
+ if (!obj || typeof obj !== "object" && typeof obj !== "function") {
651
+ throw new $TypeError("`obj` must be an object or a function`");
652
+ }
653
+ if (typeof property !== "string" && typeof property !== "symbol") {
654
+ throw new $TypeError("`property` must be a string or a symbol`");
655
+ }
656
+ if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
657
+ throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
658
+ }
659
+ if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
660
+ throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
661
+ }
662
+ if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
663
+ throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
664
+ }
665
+ if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
666
+ throw new $TypeError("`loose`, if provided, must be a boolean");
667
+ }
668
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
669
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
670
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
671
+ var loose = arguments.length > 6 ? arguments[6] : false;
672
+ var desc = !!gopd && gopd(obj, property);
673
+ if ($defineProperty) {
674
+ $defineProperty(obj, property, {
675
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
676
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
677
+ value,
678
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
679
+ });
680
+ } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
681
+ obj[property] = value;
682
+ } else {
683
+ throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
684
+ }
685
+ };
686
+ }
687
+ });
688
+
689
+ // ../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
690
+ var require_has_property_descriptors = __commonJS({
691
+ "../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports2, module2) {
692
+ "use strict";
693
+ var $defineProperty = require_es_define_property();
694
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
695
+ return !!$defineProperty;
696
+ };
697
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
698
+ if (!$defineProperty) {
699
+ return null;
700
+ }
701
+ try {
702
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
703
+ } catch (e) {
704
+ return true;
705
+ }
706
+ };
707
+ module2.exports = hasPropertyDescriptors;
708
+ }
709
+ });
710
+
711
+ // ../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
712
+ var require_set_function_length = __commonJS({
713
+ "../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports2, module2) {
714
+ "use strict";
715
+ var GetIntrinsic = require_get_intrinsic();
716
+ var define2 = require_define_data_property();
717
+ var hasDescriptors = require_has_property_descriptors()();
718
+ var gOPD = require_gopd();
719
+ var $TypeError = require_type();
720
+ var $floor = GetIntrinsic("%Math.floor%");
721
+ module2.exports = function setFunctionLength(fn, length) {
722
+ if (typeof fn !== "function") {
723
+ throw new $TypeError("`fn` is not a function");
724
+ }
725
+ if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
726
+ throw new $TypeError("`length` must be a positive 32-bit integer");
727
+ }
728
+ var loose = arguments.length > 2 && !!arguments[2];
729
+ var functionLengthIsConfigurable = true;
730
+ var functionLengthIsWritable = true;
731
+ if ("length" in fn && gOPD) {
732
+ var desc = gOPD(fn, "length");
733
+ if (desc && !desc.configurable) {
734
+ functionLengthIsConfigurable = false;
735
+ }
736
+ if (desc && !desc.writable) {
737
+ functionLengthIsWritable = false;
738
+ }
739
+ }
740
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
741
+ if (hasDescriptors) {
742
+ define2(
743
+ /** @type {Parameters<define>[0]} */
744
+ fn,
745
+ "length",
746
+ length,
747
+ true,
748
+ true
749
+ );
750
+ } else {
751
+ define2(
752
+ /** @type {Parameters<define>[0]} */
753
+ fn,
515
754
  "length",
516
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
755
+ length
517
756
  );
518
757
  }
519
758
  }
520
- return func;
759
+ return fn;
760
+ };
761
+ }
762
+ });
763
+
764
+ // ../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js
765
+ var require_call_bind = __commonJS({
766
+ "../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js"(exports2, module2) {
767
+ "use strict";
768
+ var bind2 = require_function_bind();
769
+ var GetIntrinsic = require_get_intrinsic();
770
+ var setFunctionLength = require_set_function_length();
771
+ var $TypeError = require_type();
772
+ var $apply = GetIntrinsic("%Function.prototype.apply%");
773
+ var $call = GetIntrinsic("%Function.prototype.call%");
774
+ var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
775
+ var $defineProperty = require_es_define_property();
776
+ var $max = GetIntrinsic("%Math.max%");
777
+ module2.exports = function callBind(originalFunction) {
778
+ if (typeof originalFunction !== "function") {
779
+ throw new $TypeError("a function is required");
780
+ }
781
+ var func = $reflectApply(bind2, $call, arguments);
782
+ return setFunctionLength(
783
+ func,
784
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
785
+ true
786
+ );
521
787
  };
522
788
  var applyBind = function applyBind2() {
523
789
  return $reflectApply(bind2, $apply, arguments);
@@ -530,9 +796,9 @@ var require_call_bind = __commonJS({
530
796
  }
531
797
  });
532
798
 
533
- // ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js
799
+ // ../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js
534
800
  var require_callBound = __commonJS({
535
- "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(exports2, module2) {
801
+ "../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js"(exports2, module2) {
536
802
  "use strict";
537
803
  var GetIntrinsic = require_get_intrinsic();
538
804
  var callBind = require_call_bind();
@@ -547,15 +813,15 @@ var require_callBound = __commonJS({
547
813
  }
548
814
  });
549
815
 
550
- // (disabled):../../node_modules/.pnpm/object-inspect@1.12.2/node_modules/object-inspect/util.inspect
816
+ // (disabled):../../node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect
551
817
  var require_util = __commonJS({
552
- "(disabled):../../node_modules/.pnpm/object-inspect@1.12.2/node_modules/object-inspect/util.inspect"() {
818
+ "(disabled):../../node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect"() {
553
819
  }
554
820
  });
555
821
 
556
- // ../../node_modules/.pnpm/object-inspect@1.12.2/node_modules/object-inspect/index.js
822
+ // ../../node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js
557
823
  var require_object_inspect = __commonJS({
558
- "../../node_modules/.pnpm/object-inspect@1.12.2/node_modules/object-inspect/index.js"(exports2, module2) {
824
+ "../../node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js"(exports2, module2) {
559
825
  var hasMap = typeof Map === "function" && Map.prototype;
560
826
  var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
561
827
  var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
@@ -732,16 +998,20 @@ var require_object_inspect = __commonJS({
732
998
  }
733
999
  if (isMap(obj)) {
734
1000
  var mapParts = [];
735
- mapForEach.call(obj, function(value, key) {
736
- mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
737
- });
1001
+ if (mapForEach) {
1002
+ mapForEach.call(obj, function(value, key) {
1003
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
1004
+ });
1005
+ }
738
1006
  return collectionOf("Map", mapSize.call(obj), mapParts, indent);
739
1007
  }
740
1008
  if (isSet(obj)) {
741
1009
  var setParts = [];
742
- setForEach.call(obj, function(value) {
743
- setParts.push(inspect(value, obj));
744
- });
1010
+ if (setForEach) {
1011
+ setForEach.call(obj, function(value) {
1012
+ setParts.push(inspect(value, obj));
1013
+ });
1014
+ }
745
1015
  return collectionOf("Set", setSize.call(obj), setParts, indent);
746
1016
  }
747
1017
  if (isWeakMap(obj)) {
@@ -765,6 +1035,12 @@ var require_object_inspect = __commonJS({
765
1035
  if (isString3(obj)) {
766
1036
  return markBoxed(inspect(String(obj)));
767
1037
  }
1038
+ if (typeof window !== "undefined" && obj === window) {
1039
+ return "{ [object Window] }";
1040
+ }
1041
+ if (obj === global) {
1042
+ return "{ [object globalThis] }";
1043
+ }
768
1044
  if (!isDate2(obj) && !isRegExp2(obj)) {
769
1045
  var ys = arrObjKeys(obj, inspect);
770
1046
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
@@ -1058,14 +1334,14 @@ var require_object_inspect = __commonJS({
1058
1334
  }
1059
1335
  });
1060
1336
 
1061
- // ../../node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js
1337
+ // ../../node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js
1062
1338
  var require_side_channel = __commonJS({
1063
- "../../node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js"(exports2, module2) {
1339
+ "../../node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js"(exports2, module2) {
1064
1340
  "use strict";
1065
1341
  var GetIntrinsic = require_get_intrinsic();
1066
1342
  var callBound = require_callBound();
1067
1343
  var inspect = require_object_inspect();
1068
- var $TypeError = GetIntrinsic("%TypeError%");
1344
+ var $TypeError = require_type();
1069
1345
  var $WeakMap = GetIntrinsic("%WeakMap%", true);
1070
1346
  var $Map = GetIntrinsic("%Map%", true);
1071
1347
  var $weakMapGet = callBound("WeakMap.prototype.get", true);
@@ -1075,10 +1351,13 @@ var require_side_channel = __commonJS({
1075
1351
  var $mapSet = callBound("Map.prototype.set", true);
1076
1352
  var $mapHas = callBound("Map.prototype.has", true);
1077
1353
  var listGetNode = function(list, key) {
1078
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1354
+ var prev = list;
1355
+ var curr;
1356
+ for (; (curr = prev.next) !== null; prev = curr) {
1079
1357
  if (curr.key === key) {
1080
1358
  prev.next = curr.next;
1081
- curr.next = list.next;
1359
+ curr.next = /** @type {NonNullable<typeof list.next>} */
1360
+ list.next;
1082
1361
  list.next = curr;
1083
1362
  return curr;
1084
1363
  }
@@ -1093,8 +1372,9 @@ var require_side_channel = __commonJS({
1093
1372
  if (node) {
1094
1373
  node.value = value;
1095
1374
  } else {
1096
- objects.next = {
1097
- // eslint-disable-line no-param-reassign
1375
+ objects.next = /** @type {import('.').ListNode<typeof value>} */
1376
+ {
1377
+ // eslint-disable-line no-param-reassign, no-extra-parens
1098
1378
  key,
1099
1379
  next: objects.next,
1100
1380
  value
@@ -5177,8 +5457,14 @@ function handleOptions(httpInstance, url, method2, param, config) {
5177
5457
  break;
5178
5458
  case CONTENT_TYPE.form:
5179
5459
  const formData = new FormData();
5180
- for (const [key, val] of Object.entries(param)) {
5181
- formData.append(key, val);
5460
+ if (param instanceof FormData) {
5461
+ for (const [key, val] of param.entries()) {
5462
+ formData.append(key, val);
5463
+ }
5464
+ } else if (param && typeof param === "object") {
5465
+ for (const [key, val] of Object.entries(param)) {
5466
+ formData.append(key, val);
5467
+ }
5182
5468
  }
5183
5469
  options.data = formData;
5184
5470
  break;