qcobjects 2.5.142 → 2.6.3

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.
@@ -279,9 +279,9 @@ var init_platform = __esm({
279
279
  return r;
280
280
  })(name);
281
281
  }, "_require_");
282
- is_phonegap = /* @__PURE__ */ function() {
282
+ is_phonegap = /* @__PURE__ */ (function() {
283
283
  return typeof cordova !== "undefined";
284
- }();
284
+ })();
285
285
  }
286
286
  });
287
287
 
@@ -299,6 +299,7 @@ var init_Logger = __esm({
299
299
  debugEnabled = true;
300
300
  infoEnabled = true;
301
301
  warnEnabled = true;
302
+ errorEnabled = true;
302
303
  debug(message) {
303
304
  if (this.debugEnabled) {
304
305
  console.log("\x1B[35m%s\x1B[0m", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);
@@ -320,6 +321,11 @@ var init_Logger = __esm({
320
321
  console.warn("\x1B[31m%s\x1B[0m", `[WARN][${performance.now().toLocaleString()}] ${message}`);
321
322
  }
322
323
  }
324
+ error(message) {
325
+ if (this.errorEnabled) {
326
+ console.error("\x1B[31m%s\x1B[0m", `[ERROR][${performance.now().toLocaleString()}] ${message}`);
327
+ }
328
+ }
323
329
  };
324
330
  logger = new Logger();
325
331
  Export(logger);
@@ -401,7 +407,7 @@ var init_DOMCreateElement = __esm({
401
407
  });
402
408
  }
403
409
  if (Array.isArray(children)) {
404
- children.filter((child) => child instanceof Node).forEach((child) => {
410
+ children.filter(((child) => child instanceof Node)).forEach((child) => {
405
411
  element.appendChild(child);
406
412
  });
407
413
  } else if (children instanceof Node) {
@@ -432,9 +438,9 @@ var init_introspection = __esm({
432
438
  "src/introspection.ts"() {
433
439
  "use strict";
434
440
  _protected_code_ = /* @__PURE__ */ __name((_) => {
435
- const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : function() {
441
+ const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : (function() {
436
442
  return "";
437
- };
443
+ });
438
444
  if (typeof _.prototype !== "undefined") {
439
445
  _.prototype.toString = function() {
440
446
  const _protected_symbols = [
@@ -1222,27 +1228,31 @@ var init_Base64 = __esm({
1222
1228
  });
1223
1229
 
1224
1230
  // src/basePath.ts
1225
- var import_node_process, _basePath_, setBasePath;
1231
+ var _basePath_, setBasePath;
1226
1232
  var init_basePath = __esm({
1227
1233
  "src/basePath.ts"() {
1228
1234
  "use strict";
1229
1235
  init_platform();
1230
- import_node_process = __toESM(require("node:process"));
1231
- _basePath_ = function() {
1236
+ _basePath_ = (function() {
1232
1237
  let _basePath = "";
1233
1238
  if (isBrowser) {
1234
1239
  const baseURI = document.baseURI.split("?")[0].split("/");
1235
1240
  baseURI.pop();
1236
1241
  _basePath = baseURI.join("/") + "/";
1237
1242
  } else {
1238
- if (typeof import_node_process.default !== "undefined") {
1239
- _basePath = `${import_node_process.default.cwd()}/`;
1240
- } else {
1243
+ try {
1244
+ const nodeProcess = require("node:process");
1245
+ if (typeof nodeProcess !== "undefined") {
1246
+ _basePath = `${nodeProcess.cwd()}/`;
1247
+ } else {
1248
+ _basePath = "";
1249
+ }
1250
+ } catch {
1241
1251
  _basePath = "";
1242
1252
  }
1243
1253
  }
1244
1254
  return _basePath;
1245
- }();
1255
+ })();
1246
1256
  setBasePath = /* @__PURE__ */ __name((value) => {
1247
1257
  _basePath_ = value;
1248
1258
  }, "setBasePath");
@@ -1479,14 +1489,14 @@ var init_CONFIG = __esm({
1479
1489
  }
1480
1490
  let _conf;
1481
1491
  try {
1482
- _conf = function(config) {
1492
+ _conf = (function(config) {
1483
1493
  if (config._CONFIG_ENC === null) {
1484
1494
  config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);
1485
1495
  }
1486
1496
  const _protectedEnc = config._CONFIG_ENC.valueOf();
1487
1497
  const _protectedConf = config._CONFIG?.valueOf();
1488
1498
  return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));
1489
- }(ConfigSettings.instance);
1499
+ })(ConfigSettings.instance);
1490
1500
  } catch (e) {
1491
1501
  _conf = {};
1492
1502
  console.error(e);
@@ -1499,14 +1509,14 @@ var init_CONFIG = __esm({
1499
1509
  get(name, _default) {
1500
1510
  let _value;
1501
1511
  try {
1502
- const _conf = function(config) {
1512
+ const _conf = (function(config) {
1503
1513
  if (config._CONFIG_ENC === null) {
1504
1514
  config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);
1505
1515
  }
1506
1516
  const _protectedEnc = config._CONFIG_ENC.valueOf();
1507
1517
  const _protectedConf = config._CONFIG.valueOf();
1508
1518
  return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));
1509
- }(ConfigSettings.instance);
1519
+ })(ConfigSettings.instance);
1510
1520
  if (typeof _conf[name] !== "undefined") {
1511
1521
  _value = _conf[name];
1512
1522
  }
@@ -4048,7 +4058,7 @@ var init_defaultProcessors = __esm({
4048
4058
  });
4049
4059
 
4050
4060
  // src/findPackageNodePath.ts
4051
- var import_node_fs, findPackageNodePath;
4061
+ var findPackageNodePath;
4052
4062
  var init_findPackageNodePath = __esm({
4053
4063
  "src/findPackageNodePath.ts"() {
4054
4064
  "use strict";
@@ -4056,11 +4066,11 @@ var init_findPackageNodePath = __esm({
4056
4066
  init_Export();
4057
4067
  init_Logger();
4058
4068
  init_platform();
4059
- import_node_fs = __toESM(require("node:fs"));
4060
4069
  findPackageNodePath = /* @__PURE__ */ __name(function(packagename) {
4061
4070
  let sdkPath = null;
4062
4071
  if (!isBrowser) {
4063
4072
  try {
4073
+ const fs = require("node:fs");
4064
4074
  let sdkPaths = [
4065
4075
  `${CONFIG.get("projectPath")}${CONFIG.get("relativeImportPath")}`,
4066
4076
  `${CONFIG.get("basePath")}${CONFIG.get("relativeImportPath")}`,
@@ -4076,7 +4086,7 @@ var init_findPackageNodePath = __esm({
4076
4086
  ""
4077
4087
  ].concat(module.paths);
4078
4088
  sdkPaths = sdkPaths.filter((p) => {
4079
- return import_node_fs.default.existsSync(p + "/" + packagename);
4089
+ return fs.existsSync(p + "/" + packagename);
4080
4090
  });
4081
4091
  if (sdkPaths.length > 0) {
4082
4092
  sdkPath = sdkPaths[0];
@@ -4343,11 +4353,11 @@ var init_ArrayCollection = __esm({
4343
4353
  }, 0);
4344
4354
  }
4345
4355
  sortBy(propName, sortAsc) {
4346
- const sort_function = sortAsc ? function(prev, current) {
4356
+ const sort_function = sortAsc ? (function(prev, current) {
4347
4357
  return current[propName] < prev[propName] ? 1 : -1;
4348
- } : function(prev, current) {
4358
+ }) : (function(prev, current) {
4349
4359
  return current[propName] > prev[propName] ? 1 : -1;
4350
- };
4360
+ });
4351
4361
  return this.sort(sort_function);
4352
4362
  }
4353
4363
  matrix(length, fillValue) {
@@ -4414,7 +4424,7 @@ var init_ArrayCollection = __esm({
4414
4424
  const self2 = this;
4415
4425
  let _index = 0;
4416
4426
  self2.source = New(ClassFactory("ArrayList"), source);
4417
- for (const _k in self2.source) {
4427
+ for (const _k of Object.keys(self2.source)) {
4418
4428
  if (!isNaN(_k)) {
4419
4429
  logger.debug("binding " + _k.toString());
4420
4430
  (function(_pname) {
@@ -4481,7 +4491,7 @@ var init_Tag = __esm({
4481
4491
  findElements(elementName) {
4482
4492
  const _o = New(ClassFactory("TagElements"));
4483
4493
  if (isBrowser) {
4484
- for (const _k in this) {
4494
+ for (const _k of Object.keys(this)) {
4485
4495
  if (typeof _k === "number" && typeof this[_k] !== "function" && Object.hasOwn(this[_k], "subelements")) {
4486
4496
  _o.push(this[_k].subelements(elementName));
4487
4497
  }
@@ -4699,7 +4709,7 @@ var require_MainProcess = __commonJS({
4699
4709
  init_globalSettings();
4700
4710
  init_loadSDK();
4701
4711
  init_range();
4702
- (/* @__PURE__ */ __name(function __qcobjects__(_top2) {
4712
+ (/* @__PURE__ */ __name((function __qcobjects__(_top2) {
4703
4713
  if (typeof Object.defineProperty !== "undefined" && typeof _top2 !== "undefined") {
4704
4714
  try {
4705
4715
  Object.defineProperty(_top2, "__qcobjects__", {
@@ -4872,11 +4882,11 @@ var require_MainProcess = __commonJS({
4872
4882
  _protected_code_(Array.max);
4873
4883
  _protected_code_(Array.prototype.max);
4874
4884
  Array.prototype.sortBy = function(propName, sortAsc = true) {
4875
- const sort_function = sortAsc ? function(prev, current) {
4885
+ const sort_function = sortAsc ? (function(prev, current) {
4876
4886
  return current[propName] < prev[propName] ? 1 : -1;
4877
- } : function(prev, current) {
4887
+ }) : (function(prev, current) {
4878
4888
  return current[propName] > prev[propName] ? 1 : -1;
4879
- };
4889
+ });
4880
4890
  return this.sort(sort_function);
4881
4891
  };
4882
4892
  Array.sortBy = function(a, propName, sortAsc = true) {
@@ -5047,7 +5057,7 @@ var require_MainProcess = __commonJS({
5047
5057
  }
5048
5058
  })(isBrowser);
5049
5059
  }
5050
- }, "__qcobjects__"))(_top);
5060
+ }), "__qcobjects__"))(_top);
5051
5061
  }
5052
5062
  });
5053
5063
 
@@ -5531,7 +5541,7 @@ var SourceJS = class extends InheritClass {
5531
5541
  const context = this;
5532
5542
  try {
5533
5543
  document.getElementsByTagName(context.containerTag)[0].appendChild(
5534
- function(s, url, context2) {
5544
+ (function(s, url, context2) {
5535
5545
  s.type = context2.type;
5536
5546
  s.src = url;
5537
5547
  s.crossOrigin = Object.hasOwn(context2, "crossOrigin") ? context2.crossOrigin : "anonymous";
@@ -5551,7 +5561,7 @@ var SourceJS = class extends InheritClass {
5551
5561
  };
5552
5562
  context2.body = s;
5553
5563
  return s;
5554
- }.call(
5564
+ }).call(
5555
5565
  this,
5556
5566
  _DOMCreateElement("script"),
5557
5567
  this.external ? this.url : this.basePath + this.url,
@@ -5614,7 +5624,7 @@ var SourceCSS = class extends InheritClass {
5614
5624
  const context = this;
5615
5625
  if (isBrowser) {
5616
5626
  window.document.getElementsByTagName("head")[0].appendChild(
5617
- function(s, url, context2) {
5627
+ (function(s, url, context2) {
5618
5628
  s.type = "text/css";
5619
5629
  s.rel = "stylesheet";
5620
5630
  s.href = url;
@@ -5627,7 +5637,7 @@ var SourceCSS = class extends InheritClass {
5627
5637
  s.onload = context2.done;
5628
5638
  context2.body = s;
5629
5639
  return s;
5630
- }.call(
5640
+ }).call(
5631
5641
  this,
5632
5642
  _DOMCreateElement("link"),
5633
5643
  this.external ? this.url : this.basePath + this.url,