febs-browser 1.2.9 → 1.2.11

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * febs v1.2.9
3
- * Copyright (c) 2021 bpoint.lee@gmail.com All Rights Reserved.
2
+ * febs v1.2.11
3
+ * Copyright (c) 2026 bpoint.lee@gmail.com All Rights Reserved.
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
@@ -10,6 +10,10 @@ function createCommonjsModule(fn, module) {
10
10
  return module = { exports: {} }, fn(module, module.exports), module.exports;
11
11
  }
12
12
 
13
+ function getCjsExportFromNamespace (n) {
14
+ return n && n['default'] || n;
15
+ }
16
+
13
17
  var check = function (it) {
14
18
  return it && it.Math == Math && it;
15
19
  };
@@ -1424,6 +1428,10 @@ if ( typeof nativePromiseConstructor == 'function' && !nativePromiseConstructor.
1424
1428
  };
1425
1429
  })();
1426
1430
 
1431
+ var promiseFinallyPolyfill = /*#__PURE__*/Object.freeze({
1432
+ __proto__: null
1433
+ });
1434
+
1427
1435
  var slice = [].slice;
1428
1436
  var MSIE = /MSIE .\./.test(engineUserAgent); // <- dirty ie9- check
1429
1437
 
@@ -4659,7 +4667,7 @@ function ajax(ctx) {
4659
4667
  if (cbError) cbError(xhr, null, new TypeError('Network request failed'));
4660
4668
  };
4661
4669
 
4662
- if (ctx.progress) {
4670
+ if (ctx && ctx.progress) {
4663
4671
  if ('upload' in xhr && 'onprogress' in xhr.upload) {
4664
4672
  xhr.upload.onprogress = function (event) {
4665
4673
  if (event.lengthComputable) {
@@ -5525,10 +5533,40 @@ var net$1 = {}; //--------------------------------------------------------
5525
5533
  //--------------------------------------------------------
5526
5534
 
5527
5535
  {
5536
+ var AbortController = function AbortController() {
5537
+ var _this = this;
5538
+
5539
+ Object.defineProperty(this, 'signal', {
5540
+ get: function get() {
5541
+ if (!_this.__signalWrap) {
5542
+ _this.__signalWrap = {};
5543
+ }
5544
+
5545
+ return _this.__signalWrap;
5546
+ },
5547
+ enumerable: true,
5548
+ configurable: true
5549
+ });
5550
+ };
5551
+
5528
5552
  if (!Promise) {
5529
5553
  throw new Error('unsupported Promise');
5530
- } // https://github.com/github/fetch
5554
+ }
5531
5555
 
5556
+ AbortController.prototype.abort = function () {
5557
+ if (this.__signalWrap && this.__signalWrap.__xhr) {
5558
+ try {
5559
+ this.__signalWrap.__xhr.abort();
5560
+ } catch (e) {
5561
+ console.log(e);
5562
+ }
5563
+
5564
+ this.__signalWrap.__xhr = null;
5565
+ }
5566
+ };
5567
+
5568
+ Window$2._AbortController = AbortController;
5569
+ net$1.AbortController = AbortController; // https://github.com/github/fetch
5532
5570
 
5533
5571
  febsnet.normalizeName = function (name) {
5534
5572
  if (typeof name !== 'string') {
@@ -5910,7 +5948,7 @@ var net$1 = {}; //--------------------------------------------------------
5910
5948
  var status = xhr.status === 1223 ? 204 : xhr.status;
5911
5949
 
5912
5950
  if (status < 100 || status > 599) {
5913
- reject(new exception('Network request failed', 'NetworkFailed', __filename, __line, __column));
5951
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
5914
5952
  return;
5915
5953
  }
5916
5954
 
@@ -5926,21 +5964,25 @@ var net$1 = {}; //--------------------------------------------------------
5926
5964
  };
5927
5965
 
5928
5966
  xhr.ontimeout = function () {
5929
- reject(new exception('Network timeout', 'NetworkTimeout', __filename, __line, __column));
5967
+ reject(new exception('Network timeout', 'NetworkTimeout', null, null, null));
5930
5968
  };
5931
5969
 
5932
5970
  xhr.onerror = function () {
5933
- reject(new exception('Network request failed', 'NetworkFailed', __filename, __line, __column));
5971
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
5934
5972
  };
5935
5973
 
5936
- if (init.progress) {
5974
+ if (init && init.progress) {
5937
5975
  xhr.onprogress = function (event) {
5938
5976
  if (event.lengthComputable) {
5939
- init.progress(event.position / event.totalSize);
5977
+ init.progress((event.position || event.loaded || 0) / (event.totalSize || event.total || 1));
5940
5978
  }
5941
5979
  };
5942
5980
  }
5943
5981
 
5982
+ if (init && init.signal) {
5983
+ init.signal.__xhr = xhr;
5984
+ }
5985
+
5944
5986
  xhr.open(request.method, request.url, true);
5945
5987
  var timeout = init ? init.timeout : null;
5946
5988
  xhr.timeout = timeout !== undefined && timeout !== null ? timeout : net_transfer.DefaultTimeout;
@@ -5963,7 +6005,11 @@ var net$1 = {}; //--------------------------------------------------------
5963
6005
  console.log('fetch can\'t set headers');
5964
6006
  }
5965
6007
 
5966
- xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
6008
+ try {
6009
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
6010
+ } catch (e) {
6011
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
6012
+ }
5967
6013
  });
5968
6014
  };
5969
6015
 
@@ -6045,6 +6091,7 @@ var net_jsonp = net$2;
6045
6091
 
6046
6092
  var net$3 = {
6047
6093
  ajax: net_ajax.ajax,
6094
+ AbortController: net_fetch.AbortController,
6048
6095
  fetch: net_fetch.fetch,
6049
6096
  jsonp: net_jsonp.jsonp
6050
6097
  };
@@ -7952,6 +7999,8 @@ var dom = {
7952
7999
  CreateDom: CreateDom_1
7953
8000
  };
7954
8001
 
8002
+ getCjsExportFromNamespace(promiseFinallyPolyfill);
8003
+
7955
8004
  var Window$5 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : undefined;
7956
8005
 
7957
8006
  if (!Window$5.__line) {
@@ -8210,15 +8259,17 @@ var utils_bigint_native_11 = utils_bigint_native.bigint_less_than_e;
8210
8259
  var utils_bigint_native_12 = utils_bigint_native.bigint_mod;
8211
8260
  var utils_bigint_native_13 = utils_bigint_native.bigint_toFixed;
8212
8261
 
8213
- var __debug$1 = index_base.__debug;
8214
- var date$2 = index_base.date;
8215
- var utils$2 = index_base.utils.mergeMap(index_base.utils, utils_bigint_native);
8216
- var string$2 = index_base.string;
8217
- var crypt$2 = index_base.crypt;
8218
- var net$5 = index_base.net;
8219
- var $$1 = index_base['$'];
8220
- var dom$2 = index_base.dom;
8221
- var exception$2 = index_base.exception;
8262
+ var febs$1 = getCjsExportFromNamespace(index_base);
8263
+
8264
+ var __debug$1 = febs$1.__debug;
8265
+ var date$2 = febs$1.date;
8266
+ var utils$2 = febs$1.utils.mergeMap(febs$1.utils, utils_bigint_native);
8267
+ var string$2 = febs$1.string;
8268
+ var crypt$2 = febs$1.crypt;
8269
+ var net$5 = febs$1.net;
8270
+ var $$1 = febs$1['$'];
8271
+ var dom$2 = febs$1.dom;
8272
+ var exception$2 = febs$1.exception;
8222
8273
 
8223
8274
  export { $$1 as $, __debug$1 as __debug, crypt$2 as crypt, date$2 as date, dom$2 as dom, exception$2 as exception, net$5 as net, string$2 as string, utils$2 as utils };
8224
8275
  //# sourceMappingURL=index.noBignumber.esm.js.map