@yuneta/gobj-js 7.22.0 → 7.22.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.
@@ -130,7 +130,7 @@ function o(e, t, n, r, o) {
130
130
  data: o || []
131
131
  };
132
132
  }
133
- var s = "7.0.0a", l = null, i = null, _ = null, a = null, u = null, c = null, f = [], g = Object.create(null), p = {}, d = null, b = null, m = 0, E = Object.freeze({
133
+ var s = "7.0.0a", l = null, i = null, _ = null, a = null, u = null, c = null, f = [], g = Object.create(null), p = {}, d = null, b = null, m = 0, h = Object.freeze({
134
134
  DTP_STRING: 1,
135
135
  DTP_BOOLEAN: 2,
136
136
  DTP_INTEGER: 3,
@@ -140,8 +140,8 @@ var s = "7.0.0a", l = null, i = null, _ = null, a = null, u = null, c = null, f
140
140
  DTP_JSON: 7,
141
141
  DTP_POINTER: 8
142
142
  });
143
- E.DTP_POINTER;
144
- var h = Object.freeze({
143
+ h.DTP_POINTER;
144
+ var E = Object.freeze({
145
145
  SDF_NOTACCESS: 1,
146
146
  SDF_RD: 2,
147
147
  SDF_WR: 4,
@@ -164,7 +164,7 @@ var h = Object.freeze({
164
164
  SDF_AUTHZ_S: 524288,
165
165
  SDF_AUTHZ_RS: 1048576
166
166
  });
167
- h.SDF_RD, h.SDF_WR, h.SDF_STATS, h.SDF_PERSIST, h.SDF_VOLATIL, h.SDF_RSTATS, h.SDF_PSTATS, h.SDF_WR, h.SDF_PERSIST;
167
+ E.SDF_RD, E.SDF_WR, E.SDF_STATS, E.SDF_PERSIST, E.SDF_VOLATIL, E.SDF_RSTATS, E.SDF_PSTATS, E.SDF_WR, E.SDF_PERSIST;
168
168
  var T = class {
169
169
  constructor(e, t, n = 0, r = null, o = "", s = null, l = null, i = 0, _ = null, a = null, u = null) {
170
170
  this.type = e, this.name = t, this.alias = s, this.flag = n, this.default_value = r, this.header = l, this.fillspace = i, this.description = o, this.json_fn = _, this.schema = a, this.authpth = u;
@@ -425,19 +425,19 @@ function ie(e, t) {
425
425
  function _e(e, t, n) {
426
426
  let r, o = n.default_value;
427
427
  switch (n.type) {
428
- case E.DTP_STRING:
428
+ case h.DTP_STRING:
429
429
  r = String(o);
430
430
  break;
431
- case E.DTP_BOOLEAN:
431
+ case h.DTP_BOOLEAN:
432
432
  r = Fn(o);
433
433
  break;
434
- case E.DTP_INTEGER:
434
+ case h.DTP_INTEGER:
435
435
  r = parseInt(o), isNaN(r) && un(`${Ze(e)}: attr NaN: ${n.name}`);
436
436
  break;
437
- case E.DTP_REAL:
437
+ case h.DTP_REAL:
438
438
  r = Number(o), isNaN(r) && un(`${Ze(e)}: attr NaN: ${n.name}`);
439
439
  break;
440
- case E.DTP_LIST:
440
+ case h.DTP_LIST:
441
441
  if (kn(o)) try {
442
442
  r = JSON.parse(o);
443
443
  } catch (e) {
@@ -446,7 +446,7 @@ function _e(e, t, n) {
446
446
  else r = o;
447
447
  An(r) || (r = []);
448
448
  break;
449
- case E.DTP_DICT:
449
+ case h.DTP_DICT:
450
450
  if (kn(o)) try {
451
451
  r = JSON.parse(o);
452
452
  } catch (e) {
@@ -455,7 +455,7 @@ function _e(e, t, n) {
455
455
  else r = o;
456
456
  Dn(r) || (r = {});
457
457
  break;
458
- case E.DTP_JSON:
458
+ case h.DTP_JSON:
459
459
  if (kn(o)) try {
460
460
  r = JSON.parse(o);
461
461
  } catch (e) {
@@ -463,14 +463,14 @@ function _e(e, t, n) {
463
463
  }
464
464
  else r = o;
465
465
  break;
466
- case E.DTP_POINTER: r = o;
466
+ case h.DTP_POINTER: r = o;
467
467
  }
468
468
  return void 0 === r && (un(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
469
469
  }
470
470
  function ae(e, t, n, r) {
471
471
  let o;
472
472
  switch (n.type) {
473
- case E.DTP_STRING:
473
+ case h.DTP_STRING:
474
474
  if (null == r) o = "";
475
475
  else if (kn(r)) o = String(r);
476
476
  else {
@@ -478,16 +478,16 @@ function ae(e, t, n, r) {
478
478
  e && (o = String(e));
479
479
  }
480
480
  break;
481
- case E.DTP_BOOLEAN:
481
+ case h.DTP_BOOLEAN:
482
482
  o = Fn(r);
483
483
  break;
484
- case E.DTP_INTEGER:
484
+ case h.DTP_INTEGER:
485
485
  o = parseInt(r), isNaN(o) && un(`${Ze(e)}: attr NaN: ${n.name}`);
486
486
  break;
487
- case E.DTP_REAL:
487
+ case h.DTP_REAL:
488
488
  o = Number(r), isNaN(o) && un(`${Ze(e)}: attr NaN: ${n.name}`);
489
489
  break;
490
- case E.DTP_LIST:
490
+ case h.DTP_LIST:
491
491
  if (kn(r)) try {
492
492
  o = JSON.parse(r);
493
493
  } catch (e) {
@@ -496,7 +496,7 @@ function ae(e, t, n, r) {
496
496
  else o = r;
497
497
  if (!An(o)) return un(`attr must be an array: ${n.name}`), -1;
498
498
  break;
499
- case E.DTP_DICT:
499
+ case h.DTP_DICT:
500
500
  if (kn(r)) try {
501
501
  o = JSON.parse(r);
502
502
  } catch (e) {
@@ -505,7 +505,7 @@ function ae(e, t, n, r) {
505
505
  else o = r;
506
506
  if (!Dn(o)) return un(`attr must be an object: ${n.name}`), -1;
507
507
  break;
508
- case E.DTP_JSON:
508
+ case h.DTP_JSON:
509
509
  if (kn(r)) try {
510
510
  o = JSON.parse(r);
511
511
  } catch (e) {
@@ -514,7 +514,7 @@ function ae(e, t, n, r) {
514
514
  else o = r;
515
515
  if (!An(o) && !Dn(o)) return un(`attr must be a json dict/list: ${n.name}`), -1;
516
516
  break;
517
- case E.DTP_POINTER: o = r;
517
+ case h.DTP_POINTER: o = r;
518
518
  }
519
519
  return void 0 === o && un(`${Ze(e)}: attr undefined: ${n.name}`), t[n.name] = o, Dn(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = o), e.obflag & N.obflag_created && !(e.obflag & N.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
520
520
  }
@@ -549,7 +549,7 @@ function ge(e, t, n, r, o, s, l, i, _, a, u) {
549
549
  const o = r.length;
550
550
  for (let e = 0; e < o; e++) {
551
551
  let n = r[e][0], o = r[e][1], s = r[e][2];
552
- Un(n) || Ee(c, t, n, o, s);
552
+ Un(n) || he(c, t, n, o, s);
553
553
  }
554
554
  }
555
555
  for (let e = 0; e < t.length; e++) {
@@ -594,17 +594,17 @@ function be(e, t) {
594
594
  function me(e, t) {
595
595
  return e instanceof j ? de(e, t) ? (un(`state already exists: ${t}`), -1) : (e.dl_states.push(new A(t)), 0) : (un("Cannot add state, typeof not GClass"), -1);
596
596
  }
597
- function Ee(e, t, n, r, o) {
597
+ function he(e, t, n, r, o) {
598
598
  if (!(e instanceof j)) return un("Cannot add state, typeof not GClass"), -1;
599
599
  if (Un(t)) return un("state_name EMPTY"), -1;
600
600
  let s = de(e, t);
601
601
  return s ? be(s, n) ? (un(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (s.dl_actions.push(new D(n, r, o)), 0) : (un(`state not found: ${t}`), -1);
602
602
  }
603
- function he(e, t, n) {
603
+ function Ee(e, t, n) {
604
604
  Un(t) || e.push(new k(t, n));
605
605
  }
606
606
  function Te(e, t, n) {
607
- return e instanceof j ? he(e.dl_events, t, n) : (un("Cannot add state, typeof not GClass"), -1);
607
+ return e instanceof j ? Ee(e.dl_events, t, n) : (un("Cannot add state, typeof not GClass"), -1);
608
608
  }
609
609
  function ye(e, t) {
610
610
  if (!(e instanceof j)) return un("Cannot add state, typeof not GClass"), 0;
@@ -677,7 +677,7 @@ function Ae(e, t, n) {
677
677
  let s = 0;
678
678
  for (const [l, i] of Object.entries(t)) {
679
679
  const t = fe(o.gclass, l, !1);
680
- t ? (-1 === n || t.flag & n) && (t.flag & h.SDF_DEPRECATED && cn(`${Ze(o)}: Deprecated attribute used in gobj creation: ${l}`), s += ae(o, e, t, i)) : r && (r(o, l), s--);
680
+ t ? (-1 === n || t.flag & n) && (t.flag & E.SDF_DEPRECATED && cn(`${Ze(o)}: Deprecated attribute used in gobj creation: ${l}`), s += ae(o, e, t, i)) : r && (r(o, l), s--);
681
681
  }
682
682
  return s;
683
683
  })(ue(e), r, -1, e.gclass.gclass_flag & O.gcflag_ignore_unknown_attrs ? 0 : De, e) < 0 && (un(`${Ze(e)} json2data() FAILED`), pn(r));
@@ -931,7 +931,7 @@ function bt(e, t) {
931
931
  function mt(e, t) {
932
932
  return !Un(t) && !!fe(e.gclass, t, !1);
933
933
  }
934
- function Et(e, t, n) {
934
+ function ht(e, t, n) {
935
935
  let r = e.jn_attrs;
936
936
  if (t in r && r.hasOwnProperty(t)) {
937
937
  let n = r[t];
@@ -939,7 +939,7 @@ function Et(e, t, n) {
939
939
  }
940
940
  return un(`${Ze(e)}: GClass Attribute NOT FOUND, attr ${t}`), null;
941
941
  }
942
- function ht(e, t, n) {
942
+ function Et(e, t, n) {
943
943
  let r = {}, o = e.gclass.attrs_table;
944
944
  for (let n = 0; n < o.length; n++) {
945
945
  const s = o[n];
@@ -1087,16 +1087,16 @@ var Ut = Object.freeze({
1087
1087
  __hard_subscription__: 1,
1088
1088
  __own_event__: 2
1089
1089
  }), Ft = [
1090
- v(E.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
1091
- v(E.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
1092
- v(E.DTP_STRING, "event", 0, "", "event name subscribed"),
1093
- v(E.DTP_STRING, "renamed_event", 0, "", "rename event name"),
1094
- v(E.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
1095
- v(E.DTP_JSON, "__config__", 0, null, "subscription config"),
1096
- v(E.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
1097
- v(E.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
1098
- v(E.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
1099
- v(E.DTP_STRING, "__service__", 0, "", "subscription service"),
1090
+ v(h.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
1091
+ v(h.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
1092
+ v(h.DTP_STRING, "event", 0, "", "event name subscribed"),
1093
+ v(h.DTP_STRING, "renamed_event", 0, "", "rename event name"),
1094
+ v(h.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
1095
+ v(h.DTP_JSON, "__config__", 0, null, "subscription config"),
1096
+ v(h.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
1097
+ v(h.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
1098
+ v(h.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
1099
+ v(h.DTP_STRING, "__service__", 0, "", "subscription service"),
1100
1100
  y()
1101
1101
  ];
1102
1102
  function Gt(e, t, n, r, o) {
@@ -1348,12 +1348,12 @@ function mn(e, t) {
1348
1348
  for (let n of Object.keys(t)) e[n] = t[n];
1349
1349
  return e;
1350
1350
  }
1351
- function En(e, t) {
1351
+ function hn(e, t) {
1352
1352
  if (!t) return e;
1353
1353
  for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
1354
1354
  return e;
1355
1355
  }
1356
- function hn(e, t) {
1356
+ function En(e, t) {
1357
1357
  if (!t) return e;
1358
1358
  for (let n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);
1359
1359
  return e;
@@ -1730,7 +1730,7 @@ function br(e, t, n) {
1730
1730
  function mr(e, t) {
1731
1731
  return qn(e, t, "__md_iev__`__msg_type__", "", 0);
1732
1732
  }
1733
- function Er(e, t, n) {
1733
+ function hr(e, t, n) {
1734
1734
  void 0 !== n && kn(n) || (n = "");
1735
1735
  for (let r of Object.keys(e)) {
1736
1736
  if (!e.hasOwnProperty(r)) continue;
@@ -1740,10 +1740,10 @@ function Er(e, t, n) {
1740
1740
  r,
1741
1741
  e[r],
1742
1742
  n
1743
- ]), Dn(e[r]) && Er(e[r], t, n), n = n.slice(0, -o.length);
1743
+ ]), Dn(e[r]) && hr(e[r], t, n), n = n.slice(0, -o.length);
1744
1744
  }
1745
1745
  }
1746
- function hr(e, t, n, r) {
1746
+ function Er(e, t, n, r) {
1747
1747
  if (!e) return null;
1748
1748
  let o, s = e.length;
1749
1749
  for (o = 0; o < s; o++) {
@@ -1752,7 +1752,7 @@ function hr(e, t, n, r) {
1752
1752
  let e = s.id;
1753
1753
  if (e && e === n) return s;
1754
1754
  if (r && Kn(s, t)) {
1755
- let e = hr(s[t], t, n, r);
1755
+ let e = Er(s[t], t, n, r);
1756
1756
  if (e) return e;
1757
1757
  }
1758
1758
  }
@@ -1797,9 +1797,9 @@ function vr(e) {
1797
1797
  const t = document.createElement("template");
1798
1798
  return t.innerHTML = e.trim(), t.content.firstChild;
1799
1799
  }
1800
- function jr() {
1801
- const e = /* @__PURE__ */ new Date(), t = e.toISOString().slice(0, 19), n = String(e.getMilliseconds()).padStart(3, "0"), r = e.getTimezoneOffset();
1802
- return `${t}.${n}${r > 0 ? "-" : "+"}${String(Math.abs(r) / 60).padStart(2, "0")}${String(Math.abs(r) % 60).padStart(2, "0")}`;
1800
+ function jr(e) {
1801
+ const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), o = e.getTimezoneOffset();
1802
+ return `${n}.${r}${o > 0 ? "-" : "+"}${t(Math.floor(Math.abs(o) / 60), 2)}${t(Math.abs(o) % 60, 2)}`;
1803
1803
  }
1804
1804
  function Sr(e, t) {
1805
1805
  if (!e) throw "ERROR: index_in_list() list empty";
@@ -1974,9 +1974,9 @@ function Lr(e) {
1974
1974
  return t.is_file && (t.type = "file"), t;
1975
1975
  }
1976
1976
  var Ur = [
1977
- v(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
1978
- v(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
1979
- v(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
1977
+ v(h.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
1978
+ v(h.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
1979
+ v(h.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
1980
1980
  y()
1981
1981
  ], Fr = {
1982
1982
  periodic: !1,
@@ -2024,28 +2024,28 @@ function Yr(e) {
2024
2024
  return e instanceof S ? "C_TIMER" !== Xe(e) ? (un("not C_TIMER GObj"), -1) : void Nt(e, "msec", -1) : (un("not GObj TYPE"), -1);
2025
2025
  }
2026
2026
  var Br = [
2027
- v(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
2028
- v(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
2029
- v(E.DTP_STRING, "__username__", 0, "", "Username"),
2030
- v(E.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
2031
- v(E.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
2032
- v(E.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
2033
- v(E.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
2034
- v(E.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
2035
- v(E.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
2036
- v(E.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
2037
- v(E.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
2038
- v(E.DTP_STRING, "yuneta_version", 0, s, "Yuneta version"),
2039
- v(E.DTP_LIST, "required_services", 0, "[]", "Required services"),
2040
- v(E.DTP_DICT, "trace_levels", h.SDF_PERSIST, "{}", "Trace levels"),
2041
- v(E.DTP_DICT, "no_trace_levels", h.SDF_PERSIST, "{}", "No trace levels"),
2042
- v(E.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
2043
- v(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
2044
- v(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
2027
+ v(h.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
2028
+ v(h.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
2029
+ v(h.DTP_STRING, "__username__", 0, "", "Username"),
2030
+ v(h.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
2031
+ v(h.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
2032
+ v(h.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
2033
+ v(h.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
2034
+ v(h.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
2035
+ v(h.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
2036
+ v(h.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
2037
+ v(h.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
2038
+ v(h.DTP_STRING, "yuneta_version", 0, s, "Yuneta version"),
2039
+ v(h.DTP_LIST, "required_services", 0, "[]", "Required services"),
2040
+ v(h.DTP_DICT, "trace_levels", E.SDF_PERSIST, "{}", "Trace levels"),
2041
+ v(h.DTP_DICT, "no_trace_levels", E.SDF_PERSIST, "{}", "No trace levels"),
2042
+ v(h.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
2043
+ v(h.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
2044
+ v(h.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
2045
2045
  y()
2046
2046
  ], Jr = { gobj_timer: null }, Hr = null;
2047
2047
  function qr(e, t, n, r) {
2048
- let o = Et(e, t);
2048
+ let o = ht(e, t);
2049
2049
  return Dn(o) || (o = {}), o[n] = r, St(e, t, o), xe(e, t);
2050
2050
  }
2051
2051
  function zr(e) {
@@ -2062,8 +2062,8 @@ function Xr(e, t, n, r) {
2062
2062
  var Zr = {
2063
2063
  mt_create: function(e) {
2064
2064
  let t = e.priv;
2065
- Rt(e, "start_date", jr()), Rt(e, "node_uuid", Or()), e.priv.gobj_timer = $e(Qe(e), "C_TIMER", {}, e), t.periodic_timeout = Et(e, "periodic_timeout"), function(e) {
2066
- let t = Et(e, "trace_levels");
2065
+ Rt(e, "start_date", jr()), Rt(e, "node_uuid", Or()), e.priv.gobj_timer = $e(Qe(e), "C_TIMER", {}, e), t.periodic_timeout = ht(e, "periodic_timeout"), function(e) {
2066
+ let t = ht(e, "trace_levels");
2067
2067
  if (!Dn(t)) return 0;
2068
2068
  let n = t.__global_trace__;
2069
2069
  if (An(n)) {
@@ -2078,7 +2078,7 @@ var Zr = {
2078
2078
  } else un(`${Qe(e)}: trace_levels of ${n} MUST be a list`);
2079
2079
  }
2080
2080
  }(e), function(e) {
2081
- let t = Et(e, "no_trace_levels");
2081
+ let t = ht(e, "no_trace_levels");
2082
2082
  if (!Dn(t)) return 0;
2083
2083
  let n = t.__global_no_trace__;
2084
2084
  if (An(n)) {
@@ -2133,21 +2133,21 @@ var Zr = {
2133
2133
  }
2134
2134
  };
2135
2135
  var eo = "ievent_gate_stack", to = [
2136
- v(E.DTP_STRING, "wanted_yuno_role", h.SDF_RD, "", "wanted yuno role"),
2137
- v(E.DTP_STRING, "wanted_yuno_name", h.SDF_RD, "", "wanted yuno name"),
2138
- v(E.DTP_STRING, "wanted_yuno_service", h.SDF_RD, "", "wanted yuno service"),
2139
- v(E.DTP_STRING, "remote_yuno_role", h.SDF_RD, "", "confirmed remote yuno role"),
2140
- v(E.DTP_STRING, "remote_yuno_name", h.SDF_RD, "", "confirmed remote yuno name"),
2141
- v(E.DTP_STRING, "remote_yuno_service", h.SDF_RD, "", "confirmed remote yuno service"),
2142
- v(E.DTP_STRING, "url", h.SDF_RD, "", "Url to connect"),
2143
- v(E.DTP_STRING, "jwt", h.SDF_PERSIST, "", "JWT"),
2144
- v(E.DTP_STRING, "cert_pem", h.SDF_PERSIST, "", "SSL server certification, PEM str format"),
2145
- v(E.DTP_JSON, "extra_info", h.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
2146
- v(E.DTP_LIST, "required_services", h.SDF_RD, "[]", "Services this LINK requires (identity card). Empty = the yuno's `required_services`, as before. A yuno with several links to DIFFERENT backends must set it per link: the yuno-wide list is the union, so every backend is told the service names of all the others."),
2147
- v(E.DTP_INTEGER, "timeout_retry", h.SDF_RD, "5000", "First reconnect delay (ms). It BACKS OFF from here, doubling up to timeout_retry_max, and resets when a session is reached"),
2148
- v(E.DTP_INTEGER, "timeout_retry_max", h.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
2149
- v(E.DTP_INTEGER, "timeout_idack", h.SDF_RD, "5000", "timeout waiting idAck"),
2150
- v(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
2136
+ v(h.DTP_STRING, "wanted_yuno_role", E.SDF_RD, "", "wanted yuno role"),
2137
+ v(h.DTP_STRING, "wanted_yuno_name", E.SDF_RD, "", "wanted yuno name"),
2138
+ v(h.DTP_STRING, "wanted_yuno_service", E.SDF_RD, "", "wanted yuno service"),
2139
+ v(h.DTP_STRING, "remote_yuno_role", E.SDF_RD, "", "confirmed remote yuno role"),
2140
+ v(h.DTP_STRING, "remote_yuno_name", E.SDF_RD, "", "confirmed remote yuno name"),
2141
+ v(h.DTP_STRING, "remote_yuno_service", E.SDF_RD, "", "confirmed remote yuno service"),
2142
+ v(h.DTP_STRING, "url", E.SDF_RD, "", "Url to connect"),
2143
+ v(h.DTP_STRING, "jwt", E.SDF_PERSIST, "", "JWT"),
2144
+ v(h.DTP_STRING, "cert_pem", E.SDF_PERSIST, "", "SSL server certification, PEM str format"),
2145
+ v(h.DTP_JSON, "extra_info", E.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
2146
+ v(h.DTP_LIST, "required_services", E.SDF_RD, "[]", "Services this LINK requires (identity card). Empty = the yuno's `required_services`, as before. A yuno with several links to DIFFERENT backends must set it per link: the yuno-wide list is the union, so every backend is told the service names of all the others."),
2147
+ v(h.DTP_INTEGER, "timeout_retry", E.SDF_RD, "5000", "First reconnect delay (ms). It BACKS OFF from here, doubling up to timeout_retry_max, and resets when a session is reached"),
2148
+ v(h.DTP_INTEGER, "timeout_retry_max", E.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
2149
+ v(h.DTP_INTEGER, "timeout_idack", E.SDF_RD, "5000", "timeout waiting idAck"),
2150
+ v(h.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
2151
2151
  y()
2152
2152
  ], no = [
2153
2153
  ["ievents", "Trace inter-events with metadata of kw"],
@@ -2220,7 +2220,7 @@ function uo(e, t, n, r) {
2220
2220
  return function(e, t) {
2221
2221
  let n = e.priv, r = JSON.stringify(t);
2222
2222
  if (ro(e)) {
2223
- let n = vt(e, "url"), o = Qe(Je()) + " ==> " + n, s = Et(Je(), "trace_ievent_callback");
2223
+ let n = vt(e, "url"), o = Qe(Je()) + " ==> " + n, s = ht(Je(), "trace_ievent_callback");
2224
2224
  s ? s(o, t, 1, r.length) : _o(0, o, t);
2225
2225
  }
2226
2226
  if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return cn(`${Ze(e)}: send_iev(): websocket not open, message lost`), -1;
@@ -2246,8 +2246,8 @@ function co(e, t, n) {
2246
2246
  };
2247
2247
  }
2248
2248
  function fo(e) {
2249
- let t = e.priv, n = Be(Je()), r = vt(Je(), "yuno_version"), o = vt(Je(), "yuno_release"), l = vt(Je(), "yuno_tag"), i = Et(e, "required_services");
2250
- i && i.length || (i = Et(Je(), "required_services"));
2249
+ let t = e.priv, n = Be(Je()), r = vt(Je(), "yuno_version"), o = vt(Je(), "yuno_release"), l = vt(Je(), "yuno_tag"), i = ht(e, "required_services");
2250
+ i && i.length || (i = ht(Je(), "required_services"));
2251
2251
  let _ = {
2252
2252
  yuno_role: qe(),
2253
2253
  yuno_id: ze(),
@@ -2306,10 +2306,10 @@ function mo(e, t, n, r) {
2306
2306
  return Math.max(1, Math.round(s));
2307
2307
  }(e)), 0;
2308
2308
  }
2309
- function Eo(e, t, n, r) {
2309
+ function ho(e, t, n, r) {
2310
2310
  return fo(e), 0;
2311
2311
  }
2312
- function ho(e, t, n, r) {
2312
+ function Eo(e, t, n, r) {
2313
2313
  let o = e.priv;
2314
2314
  Yr(o.gobj_timer);
2315
2315
  let s = dr(e, n, eo, !0), l = qn(e, s, "src_yuno", ""), i = qn(e, s, "src_role", ""), _ = qn(e, s, "src_service", "");
@@ -2365,7 +2365,7 @@ function To(e, t, n, r) {
2365
2365
  } : (un("parsing inter_event: kw not a json object"), null) : (un("parsing inter_kw: no kw"), null);
2366
2366
  }(0, n.data);
2367
2367
  if (ro(e)) {
2368
- let e = Qe(Je()) + " <== " + o, t = n.data.length, r = Et(Je(), "trace_ievent_callback");
2368
+ let e = Qe(Je()) + " <== " + o, t = n.data.length, r = ht(Je(), "trace_ievent_callback");
2369
2369
  r ? r(e, s, 2, t) : _o(0, e, s);
2370
2370
  }
2371
2371
  let l = s.event, i = s.kw;
@@ -2497,7 +2497,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2497
2497
  return i;
2498
2498
  }, exports.createOneHtml = vr, exports.create_json_record = function(e, t) {
2499
2499
  let n = dn(e);
2500
- return En(n, t), n;
2500
+ return hn(n, t), n;
2501
2501
  }, exports.create_template_record = function(e, t) {
2502
2502
  let n = {};
2503
2503
  return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
@@ -2506,21 +2506,21 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2506
2506
  let s = Xn(null, t, e, o);
2507
2507
  n[e] = s;
2508
2508
  }), n;
2509
- }, exports.current_timestamp = jr, exports.data_type_t = E, exports.db_list_persistent_attrs = function(e, t) {
2509
+ }, exports.current_timestamp = jr, exports.data_type_t = h, exports.db_list_persistent_attrs = function(e, t) {
2510
2510
  let n = sr(kr(e), null, !1), r = {};
2511
2511
  return n && Dn(n) && (r = rr(e, n, t, !1)), r;
2512
2512
  }, exports.db_load_persistent_attrs = function(e, t) {
2513
- let n = ht(e, h.SDF_PERSIST), r = sr(kr(e), null, !1);
2513
+ let n = Et(e, E.SDF_PERSIST), r = sr(kr(e), null, !1);
2514
2514
  if (r && Dn(r)) {
2515
2515
  let o = rr(e, r, t, !1);
2516
- o = rr(e, o, n, !1), Ot(e, o, h.SDF_PERSIST);
2516
+ o = rr(e, o, n, !1), Ot(e, o, E.SDF_PERSIST);
2517
2517
  }
2518
2518
  }, exports.db_remove_persistent_attrs = function(e, t) {
2519
2519
  let n = or(e, sr(kr(e), null, !1), t, !1);
2520
2520
  0 === Nn(n) ? ir(kr(e)) : lr(kr(e), n);
2521
2521
  }, exports.db_save_persistent_attrs = function(e, t) {
2522
- let n = rr(e, ht(e, h.SDF_PERSIST), t, !1), r = sr(kr(e), null, !1);
2523
- return r && Dn(r) && hn(n, r), lr(kr(e), n);
2522
+ let n = rr(e, Et(e, E.SDF_PERSIST), t, !1), r = sr(kr(e), null, !1);
2523
+ return r && Dn(r) && En(n, r), lr(kr(e), n);
2524
2524
  }, exports.debounce = function(e, t = 0, n = !1) {
2525
2525
  let r = null, o = null, s = null;
2526
2526
  const l = (...l) => {
@@ -2608,7 +2608,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2608
2608
  return o;
2609
2609
  }, exports.flat_key_join = function(e) {
2610
2610
  return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : xr(e)).join("`") : "";
2611
- }, exports.flat_key_split = Dr, exports.gclass_add_ev_action = Ee, exports.gclass_add_event_type = Te, exports.gclass_add_state = me, exports.gclass_check_fsm = ve, exports.gclass_create = ge, exports.gclass_event_type = ye, exports.gclass_find_by_name = je, exports.gclass_flag_t = O, exports.gclass_unregister = pe, exports.getPositionRelativeToBody = function(e) {
2611
+ }, exports.flat_key_split = Dr, exports.gclass_add_ev_action = he, exports.gclass_add_event_type = Te, exports.gclass_add_state = me, exports.gclass_check_fsm = ve, exports.gclass_create = ge, exports.gclass_event_type = ye, exports.gclass_find_by_name = je, exports.gclass_flag_t = O, exports.gclass_unregister = pe, exports.getPositionRelativeToBody = function(e) {
2612
2612
  if (!e) return {
2613
2613
  top: 0,
2614
2614
  left: 0,
@@ -2703,7 +2703,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2703
2703
  }), H(e, n) && !q(o, n) && I(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Ze(e), n, It.length)), Ct || (Ct = !0, setTimeout(Pt, 0)), 0) : (un(`gobj_post_event(): event NOT DEFINED in gclass ${Xe(e)}, event ${n}`), -1) : (un(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
2704
2704
  }, exports.gobj_posted_events_size = function() {
2705
2705
  return It.length;
2706
- }, exports.gobj_publish_event = Ht, exports.gobj_read_attr = Et, exports.gobj_read_attrs = ht, exports.gobj_read_bool_attr = Tt, exports.gobj_read_integer_attr = yt, exports.gobj_read_pointer_attr = jt, exports.gobj_read_str_attr = vt, exports.gobj_remove_persistent_attrs = function(e, t) {
2706
+ }, exports.gobj_publish_event = Ht, exports.gobj_read_attr = ht, exports.gobj_read_attrs = Et, exports.gobj_read_bool_attr = Tt, exports.gobj_read_integer_attr = yt, exports.gobj_read_pointer_attr = jt, exports.gobj_read_str_attr = vt, exports.gobj_remove_persistent_attrs = function(e, t) {
2707
2707
  return Ye(e) ? _ ? _(e, t) : -1 : (un(`${Ze(e)}: Only gobj services can load/save writable-persistent`), -1);
2708
2708
  }, exports.gobj_repr_global_trace_levels = function() {
2709
2709
  return P.map(([e, t, n]) => ({
@@ -2724,7 +2724,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2724
2724
  }
2725
2725
  }
2726
2726
  return 0;
2727
- }(e, h.SDF_VOLATIL, 0);
2727
+ }(e, E.SDF_VOLATIL, 0);
2728
2728
  }, exports.gobj_save_persistent_attrs = xe, exports.gobj_search_path = bt, exports.gobj_send_event = Lt, exports.gobj_services = function() {
2729
2729
  let e = [];
2730
2730
  for (const t of Object.keys(p)) On(e, t);
@@ -2750,7 +2750,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2750
2750
  const p = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
2751
2751
  for (let e = 0; e < p.length; e++) {
2752
2752
  let t = p[e][0], n = p[e][1];
2753
- he(f, t, n);
2753
+ Ee(f, t, n);
2754
2754
  }
2755
2755
  return 0;
2756
2756
  }, exports.gobj_stats = function(e, n, r, s) {
@@ -2801,7 +2801,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2801
2801
  if (!o) return un("jdb_delete: topic not found: " + t), null;
2802
2802
  if (Un(r.id)) return un("jdb_delete: record without id: " + r), gn(r), null;
2803
2803
  let s, l = n.split("`"), i = o;
2804
- for (; (s = l.shift()) && !Un(s) && i;) Dn(i) && (i = Xn(null, i, e.hook, null, 0)), i = hr(i, null, s, !1);
2804
+ for (; (s = l.shift()) && !Un(s) && i;) Dn(i) && (i = Xn(null, i, e.hook, null, 0)), i = Er(i, null, s, !1);
2805
2805
  if (0 === l.length && i) if (An(i)) {
2806
2806
  let e = ur(i, r.id);
2807
2807
  e >= 0 && i.splice(e, 1);
@@ -2812,7 +2812,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2812
2812
  return o;
2813
2813
  }, exports.jdb_get = function(e, t, n, r) {
2814
2814
  let o = Xn(null, Xn(null, e, "topics", null, 0), t, null, 0);
2815
- return o ? (void 0 === r && (r = !0), hr(o, e.hook, n, r)) : (un("jdb_get: topic not found: " + t), null);
2815
+ return o ? (void 0 === r && (r = !0), Er(o, e.hook, n, r)) : (un("jdb_get: topic not found: " + t), null);
2816
2816
  }, exports.jdb_get_by_idx = function(e, t, n) {
2817
2817
  let r = Xn(null, Xn(null, e, "topics", null, 0), t, null, 0);
2818
2818
  return r ? n < r.length ? r[n] : {} : (un("jdb_get_by_idx: topic not found: " + t), null);
@@ -2825,7 +2825,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2825
2825
  let r = Xn(null, e, "type", [], 1);
2826
2826
  qn(null, e, "hook", "data", 1);
2827
2827
  let o = Xn(null, e, "schema", {}, 1), s = Xn(null, e, "topics", {}, 1);
2828
- return Er(o, function(e, t, n, o) {
2828
+ return hr(o, function(e, t, n, o) {
2829
2829
  "__" !== t.substring(0, 2) && Xn(null, s, o, dn(r), 1);
2830
2830
  }, t), e;
2831
2831
  }, exports.jdb_update = function(e, t, n, r) {
@@ -2833,11 +2833,11 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2833
2833
  if (!o) return un("jdb_update: topic not found: " + t), null;
2834
2834
  if (Un(r.id)) return un("jdb_update: record without id: " + r), gn(r), null;
2835
2835
  let s, l = n.split("`"), i = o;
2836
- for (; (s = l.shift()) && !Un(s) && i;) Dn(i) && (i = Xn(null, i, e.hook, [], 1)), i = hr(i, null, s, !1);
2836
+ for (; (s = l.shift()) && !Un(s) && i;) Dn(i) && (i = Xn(null, i, e.hook, [], 1)), i = Er(i, null, s, !1);
2837
2837
  if (0 === l.length && i) if (An(i)) i.push(r);
2838
2838
  else if (i.id === r.id) Object.assign(i, r);
2839
2839
  else {
2840
- let t = Xn(null, i, e.hook, [], 1), n = hr(t, e.hook, r.id, !1);
2840
+ let t = Xn(null, i, e.hook, [], 1), n = Er(t, e.hook, r.id, !1);
2841
2841
  n ? Object.assign(n, r) : t.push(r);
2842
2842
  }
2843
2843
  return o;
@@ -2864,7 +2864,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2864
2864
  return null == e || n(e, "", 0), t;
2865
2865
  }, exports.json_array_append = Sn, exports.json_array_append_new = On, exports.json_array_extend = function(e, t) {
2866
2866
  return t ? (Array.prototype.push.apply(e, t), e) : e;
2867
- }, exports.json_array_remove = wn, exports.json_array_size = Rn, exports.json_deep_copy = dn, exports.json_is_identical = bn, exports.json_object_del = yn, exports.json_object_get = Tn, exports.json_object_set = vn, exports.json_object_set_new = jn, exports.json_object_size = Nn, exports.json_object_update = mn, exports.json_object_update_existing = En, exports.json_object_update_missing = hn, exports.json_size = xn, exports.jwt2json = function(e, t) {
2867
+ }, exports.json_array_remove = wn, exports.json_array_size = Rn, exports.json_deep_copy = dn, exports.json_is_identical = bn, exports.json_object_del = yn, exports.json_object_get = Tn, exports.json_object_set = vn, exports.json_object_set_new = jn, exports.json_object_size = Nn, exports.json_object_update = mn, exports.json_object_update_existing = hn, exports.json_object_update_missing = En, exports.json_size = xn, exports.jwt2json = function(e, t) {
2868
2868
  try {
2869
2869
  let n = Tr(e);
2870
2870
  switch (t) {
@@ -3076,7 +3076,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
3076
3076
  ],
3077
3077
  [
3078
3078
  "EV_IDENTITY_CARD_ACK",
3079
- ho,
3079
+ Eo,
3080
3080
  null
3081
3081
  ],
3082
3082
  [
@@ -3086,7 +3086,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
3086
3086
  ],
3087
3087
  [
3088
3088
  "EV_TIMEOUT",
3089
- Eo,
3089
+ ho,
3090
3090
  null
3091
3091
  ],
3092
3092
  [
@@ -3165,7 +3165,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
3165
3165
  if (!e) return "";
3166
3166
  const t = String(e).trim();
3167
3167
  return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : yr(t);
3168
- }, exports.sdata_flag_t = h, exports.send_http_json_post = function(e, t, n) {
3168
+ }, exports.sdata_flag_t = E, exports.send_http_json_post = function(e, t, n) {
3169
3169
  let r = new XMLHttpRequest();
3170
3170
  r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
3171
3171
  4 === r.readyState && n(r.status, r.responseText);