febs-browser 1.2.10 → 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.10
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
 
@@ -14,6 +14,10 @@ function createCommonjsModule(fn, module) {
14
14
  return module = { exports: {} }, fn(module, module.exports), module.exports;
15
15
  }
16
16
 
17
+ function getCjsExportFromNamespace (n) {
18
+ return n && n['default'] || n;
19
+ }
20
+
17
21
  var check = function (it) {
18
22
  return it && it.Math == Math && it;
19
23
  };
@@ -1428,6 +1432,10 @@ if ( typeof nativePromiseConstructor == 'function' && !nativePromiseConstructor.
1428
1432
  };
1429
1433
  })();
1430
1434
 
1435
+ var promiseFinallyPolyfill = /*#__PURE__*/Object.freeze({
1436
+ __proto__: null
1437
+ });
1438
+
1431
1439
  var slice = [].slice;
1432
1440
  var MSIE = /MSIE .\./.test(engineUserAgent); // <- dirty ie9- check
1433
1441
 
@@ -5529,10 +5537,40 @@ var net$1 = {}; //--------------------------------------------------------
5529
5537
  //--------------------------------------------------------
5530
5538
 
5531
5539
  {
5540
+ var AbortController = function AbortController() {
5541
+ var _this = this;
5542
+
5543
+ Object.defineProperty(this, 'signal', {
5544
+ get: function get() {
5545
+ if (!_this.__signalWrap) {
5546
+ _this.__signalWrap = {};
5547
+ }
5548
+
5549
+ return _this.__signalWrap;
5550
+ },
5551
+ enumerable: true,
5552
+ configurable: true
5553
+ });
5554
+ };
5555
+
5532
5556
  if (!Promise) {
5533
5557
  throw new Error('unsupported Promise');
5534
- } // https://github.com/github/fetch
5558
+ }
5535
5559
 
5560
+ AbortController.prototype.abort = function () {
5561
+ if (this.__signalWrap && this.__signalWrap.__xhr) {
5562
+ try {
5563
+ this.__signalWrap.__xhr.abort();
5564
+ } catch (e) {
5565
+ console.log(e);
5566
+ }
5567
+
5568
+ this.__signalWrap.__xhr = null;
5569
+ }
5570
+ };
5571
+
5572
+ Window$2._AbortController = AbortController;
5573
+ net$1.AbortController = AbortController; // https://github.com/github/fetch
5536
5574
 
5537
5575
  febsnet.normalizeName = function (name) {
5538
5576
  if (typeof name !== 'string') {
@@ -5914,7 +5952,7 @@ var net$1 = {}; //--------------------------------------------------------
5914
5952
  var status = xhr.status === 1223 ? 204 : xhr.status;
5915
5953
 
5916
5954
  if (status < 100 || status > 599) {
5917
- reject(new exception('Network request failed', 'NetworkFailed', __filename, __line, __column));
5955
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
5918
5956
  return;
5919
5957
  }
5920
5958
 
@@ -5930,21 +5968,25 @@ var net$1 = {}; //--------------------------------------------------------
5930
5968
  };
5931
5969
 
5932
5970
  xhr.ontimeout = function () {
5933
- reject(new exception('Network timeout', 'NetworkTimeout', __filename, __line, __column));
5971
+ reject(new exception('Network timeout', 'NetworkTimeout', null, null, null));
5934
5972
  };
5935
5973
 
5936
5974
  xhr.onerror = function () {
5937
- reject(new exception('Network request failed', 'NetworkFailed', __filename, __line, __column));
5975
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
5938
5976
  };
5939
5977
 
5940
5978
  if (init && init.progress) {
5941
5979
  xhr.onprogress = function (event) {
5942
5980
  if (event.lengthComputable) {
5943
- init.progress(event.position / event.totalSize);
5981
+ init.progress((event.position || event.loaded || 0) / (event.totalSize || event.total || 1));
5944
5982
  }
5945
5983
  };
5946
5984
  }
5947
5985
 
5986
+ if (init && init.signal) {
5987
+ init.signal.__xhr = xhr;
5988
+ }
5989
+
5948
5990
  xhr.open(request.method, request.url, true);
5949
5991
  var timeout = init ? init.timeout : null;
5950
5992
  xhr.timeout = timeout !== undefined && timeout !== null ? timeout : net_transfer.DefaultTimeout;
@@ -5967,7 +6009,11 @@ var net$1 = {}; //--------------------------------------------------------
5967
6009
  console.log('fetch can\'t set headers');
5968
6010
  }
5969
6011
 
5970
- xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
6012
+ try {
6013
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
6014
+ } catch (e) {
6015
+ reject(new exception('Network request failed', 'NetworkFailed', null, null, null));
6016
+ }
5971
6017
  });
5972
6018
  };
5973
6019
 
@@ -6049,6 +6095,7 @@ var net_jsonp = net$2;
6049
6095
 
6050
6096
  var net$3 = {
6051
6097
  ajax: net_ajax.ajax,
6098
+ AbortController: net_fetch.AbortController,
6052
6099
  fetch: net_fetch.fetch,
6053
6100
  jsonp: net_jsonp.jsonp
6054
6101
  };
@@ -7956,6 +8003,8 @@ var dom = {
7956
8003
  CreateDom: CreateDom_1
7957
8004
  };
7958
8005
 
8006
+ getCjsExportFromNamespace(promiseFinallyPolyfill);
8007
+
7959
8008
  var Window$5 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : undefined;
7960
8009
 
7961
8010
  if (!Window$5.__line) {
@@ -8214,15 +8263,17 @@ var utils_bigint_native_11 = utils_bigint_native.bigint_less_than_e;
8214
8263
  var utils_bigint_native_12 = utils_bigint_native.bigint_mod;
8215
8264
  var utils_bigint_native_13 = utils_bigint_native.bigint_toFixed;
8216
8265
 
8217
- var __debug$1 = index_base.__debug;
8218
- var date$2 = index_base.date;
8219
- var utils$2 = index_base.utils.mergeMap(index_base.utils, utils_bigint_native);
8220
- var string$2 = index_base.string;
8221
- var crypt$2 = index_base.crypt;
8222
- var net$5 = index_base.net;
8223
- var $$1 = index_base['$'];
8224
- var dom$2 = index_base.dom;
8225
- var exception$2 = index_base.exception;
8266
+ var febs$1 = getCjsExportFromNamespace(index_base);
8267
+
8268
+ var __debug$1 = febs$1.__debug;
8269
+ var date$2 = febs$1.date;
8270
+ var utils$2 = febs$1.utils.mergeMap(febs$1.utils, utils_bigint_native);
8271
+ var string$2 = febs$1.string;
8272
+ var crypt$2 = febs$1.crypt;
8273
+ var net$5 = febs$1.net;
8274
+ var $$1 = febs$1['$'];
8275
+ var dom$2 = febs$1.dom;
8276
+ var exception$2 = febs$1.exception;
8226
8277
 
8227
8278
  exports.$ = $$1;
8228
8279
  exports.__debug = __debug$1;