@sarafapp/iron_core 1.0.53 → 1.0.55

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/IronCore.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import P from "dayjs";
2
- import { toRaw as Ge, reactive as ot, ref as M, watch as Rt, computed as S, onBeforeUnmount as Dt } from "vue";
3
- import { JsonConvert as At, JsonProperty as B, JsonObject as Ne } from "json2typescript";
2
+ import { toRaw as Ge, reactive as ot, ref as M, watch as Dt, computed as S, onBeforeUnmount as At } from "vue";
3
+ import { JsonConvert as _t, JsonProperty as B, JsonObject as Ne } from "json2typescript";
4
4
  import { defineStore as lt } from "pinia";
5
5
  var Pe = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(Pe || {}), re = /* @__PURE__ */ ((t) => (t.FullDate = "YYYY/M/D HH:mm", t.SimpleDate = "YYYY/M/D", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(re || {});
6
- const _t = [
6
+ const Ct = [
7
7
  {
8
8
  62198619: {
9
9
  persian: "بلو",
@@ -250,7 +250,7 @@ const _t = [
250
250
  english: "agriculture"
251
251
  }
252
252
  }
253
- ], Ct = [
253
+ ], Mt = [
254
254
  {
255
255
  "010": {
256
256
  persian: "بانک مرکزی",
@@ -414,16 +414,16 @@ const _t = [
414
414
  }
415
415
  }
416
416
  ];
417
- var Mt = /* @__PURE__ */ ((t) => (t.Normal = "YYYY-MM-DD", t.ContainsHour = "YYYY-MM-DD HH:mm", t.OnlyHour = "HH:mm", t))(Mt || {});
417
+ var Et = /* @__PURE__ */ ((t) => (t.Normal = "YYYY-MM-DD", t.ContainsHour = "YYYY-MM-DD HH:mm", t.OnlyHour = "HH:mm", t))(Et || {});
418
418
  function _e(t) {
419
419
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
420
420
  }
421
- var ve = { exports: {} }, Et = ve.exports, Ke;
422
- function Ot() {
421
+ var ve = { exports: {} }, Ot = ve.exports, Ke;
422
+ function Pt() {
423
423
  return Ke || (Ke = 1, function(t, e) {
424
424
  (function(s, r) {
425
425
  t.exports = r();
426
- })(Et, function() {
426
+ })(Ot, function() {
427
427
  return function(s, r) {
428
428
  r.prototype.weekday = function(n) {
429
429
  var i = this.$locale().weekStart || 0, a = this.$W, l = (a < i ? a + 7 : a) - i;
@@ -433,14 +433,14 @@ function Ot() {
433
433
  });
434
434
  }(ve)), ve.exports;
435
435
  }
436
- var Pt = Ot();
437
- const Lt = /* @__PURE__ */ _e(Pt);
438
- var ge = { exports: {} }, kt = ge.exports, Ze;
439
- function xt() {
436
+ var Lt = Pt();
437
+ const kt = /* @__PURE__ */ _e(Lt);
438
+ var ge = { exports: {} }, xt = ge.exports, Ze;
439
+ function Tt() {
440
440
  return Ze || (Ze = 1, function(t, e) {
441
441
  (function(s, r) {
442
442
  t.exports = r();
443
- })(kt, function() {
443
+ })(xt, function() {
444
444
  var s = "week", r = "year";
445
445
  return function(n, i, a) {
446
446
  var l = i.prototype;
@@ -460,14 +460,14 @@ function xt() {
460
460
  });
461
461
  }(ge)), ge.exports;
462
462
  }
463
- var Tt = xt();
464
- const $t = /* @__PURE__ */ _e(Tt);
465
- var me = { exports: {} }, Vt = me.exports, Xe;
466
- function Nt() {
463
+ var $t = Tt();
464
+ const Vt = /* @__PURE__ */ _e($t);
465
+ var me = { exports: {} }, Nt = me.exports, Xe;
466
+ function jt() {
467
467
  return Xe || (Xe = 1, function(t, e) {
468
468
  (function(s, r) {
469
469
  t.exports = r();
470
- })(Vt, function() {
470
+ })(Nt, function() {
471
471
  return function(s, r) {
472
472
  r.prototype.weekYear = function() {
473
473
  var n = this.month(), i = this.week(), a = this.year();
@@ -477,14 +477,14 @@ function Nt() {
477
477
  });
478
478
  }(me)), me.exports;
479
479
  }
480
- var jt = Nt();
481
- const Ft = /* @__PURE__ */ _e(jt);
482
- var ye = { exports: {} }, Yt = ye.exports, Qe;
483
- function Ut() {
480
+ var Ft = jt();
481
+ const Yt = /* @__PURE__ */ _e(Ft);
482
+ var ye = { exports: {} }, Ut = ye.exports, Qe;
483
+ function Bt() {
484
484
  return Qe || (Qe = 1, function(t, e) {
485
485
  (function(s, r) {
486
486
  t.exports = r(P);
487
- })(Yt, function(s) {
487
+ })(Ut, function(s) {
488
488
  function r(a) {
489
489
  return a && typeof a == "object" && "default" in a ? a : { default: a };
490
490
  }
@@ -495,15 +495,15 @@ function Ut() {
495
495
  });
496
496
  }(ye)), ye.exports;
497
497
  }
498
- var Bt = Ut();
499
- const Ht = /* @__PURE__ */ _e(Bt);
498
+ var Ht = Bt();
499
+ const qt = /* @__PURE__ */ _e(Ht);
500
500
  function he(t, e) {
501
- return qt(t) || zt(t, e) || Wt();
501
+ return zt(t) || Wt(t, e) || Jt();
502
502
  }
503
- function qt(t) {
503
+ function zt(t) {
504
504
  if (Array.isArray(t)) return t;
505
505
  }
506
- function zt(t, e) {
506
+ function Wt(t, e) {
507
507
  var s = [], r = !0, n = !1, i = void 0;
508
508
  try {
509
509
  for (var a = t[Symbol.iterator](), l; !(r = (l = a.next()).done) && (s.push(l.value), !(e && s.length === e)); r = !0)
@@ -519,7 +519,7 @@ function zt(t, e) {
519
519
  }
520
520
  return s;
521
521
  }
522
- function Wt() {
522
+ function Jt() {
523
523
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
524
524
  }
525
525
  function ct(t, e, s) {
@@ -527,7 +527,7 @@ function ct(t, e, s) {
527
527
  var r = Math.floor(t / 100), n = 2 - r + Math.floor(r / 4), i = Math.floor(365.25 * (t + 4716)) + Math.floor(30.6001 * (e + 1)) + s + n - 1524.5;
528
528
  return i;
529
529
  }
530
- function Jt(t) {
530
+ function Gt(t) {
531
531
  t = t + 0.5;
532
532
  var e = Math.floor(t), s = t - e, r = e;
533
533
  if (e >= 2299161) {
@@ -535,9 +535,9 @@ function Jt(t) {
535
535
  r = e + 1 + n - Math.floor(n / 4);
536
536
  }
537
537
  var i = r + 1524, a = Math.floor((i - 122.1) / 365.25), l = Math.floor(365.25 * a), o = Math.floor((i - l) / 30.6001), c = i - l - Math.floor(30.6001 * o) + s, f = o < 14 ? o - 1 : o - 13, d = f > 2 ? a - 4716 : a - 4715;
538
- return Zt(d, f, c);
538
+ return Xt(d, f, c);
539
539
  }
540
- function Gt(t) {
540
+ function Kt(t) {
541
541
  t = t + 0.5;
542
542
  var e = Math.floor(t), s = t - e, r = e;
543
543
  if (e >= 2299161) {
@@ -547,7 +547,7 @@ function Gt(t) {
547
547
  var i = r + 1524, a = Math.floor((i - 122.1) / 365.25), l = Math.floor(365.25 * a), o = Math.floor((i - l) / 30.6001), c = i - l - Math.floor(30.6001 * o) + s, f = o < 14 ? o - 1 : o - 13, d = f > 2 ? a - 4716 : a - 4715;
548
548
  return [Math.floor(d), Math.floor(f), Math.floor(c)];
549
549
  }
550
- function Kt(t, e, s) {
550
+ function Zt(t, e, s) {
551
551
  var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], n = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
552
552
  function i(m, b) {
553
553
  return Math.floor(m / b);
@@ -564,7 +564,7 @@ function Kt(t, e, s) {
564
564
  var d = l + 1, v = o + 1;
565
565
  return ct(c, d, v);
566
566
  }
567
- function Zt(t, e, s) {
567
+ function Xt(t, e, s) {
568
568
  var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], n = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
569
569
  function i(z, W) {
570
570
  return Math.floor(z / W);
@@ -583,14 +583,14 @@ function Zt(t, e, s) {
583
583
  }
584
584
  var de = {
585
585
  J: function(e, s, r) {
586
- return Jt(ct(e, s, r));
586
+ return Gt(ct(e, s, r));
587
587
  },
588
588
  G: function(e, s, r) {
589
- return Gt(Kt(e, s, r));
589
+ return Kt(Zt(e, s, r));
590
590
  }
591
- }, Xt = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, Qt = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Oe = "date", K = "day", T = "month", $ = "year", et = "week", es = "YYYY-MM-DDTHH:mm:ssZ", ts = {
591
+ }, Qt = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, es = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Oe = "date", K = "day", T = "month", $ = "year", et = "week", ts = "YYYY-MM-DDTHH:mm:ssZ", ss = {
592
592
  jmonths: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")
593
- }, ss = function(t, e, s) {
593
+ }, rs = function(t, e, s) {
594
594
  var r = e.prototype, n = r.$utils(), i = function(h) {
595
595
  return h.$C === "jalali";
596
596
  }, a = n.prettyUnit || n.p, l = n.isUndefined || n.u, o = n.padStart || n.s, c = n.monthDiff || n.m, f = n.absFloor || n.a, d = function(h) {
@@ -608,7 +608,7 @@ var de = {
608
608
  return h.$C = u, h.isJalali() && h.InitJalali(), h;
609
609
  }, r.isJalali = function() {
610
610
  return i(this);
611
- }, s.en.jmonths = "Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"), s.locale("fa", Object.assign({}, Ht, {}, ts), !0);
611
+ }, s.en.jmonths = "Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"), s.locale("fa", Object.assign({}, qt, {}, ss), !0);
612
612
  var J = function(h, p) {
613
613
  return s(h, {
614
614
  locale: p.$L,
@@ -621,7 +621,7 @@ var de = {
621
621
  m.bind(this)(u), this.isJalali() && this.InitJalali();
622
622
  }, r.parse = function(u) {
623
623
  var h;
624
- if (this.$C = u.calendar || this.$C || s.$C, u.jalali && typeof u.date == "string" && /.*[^Z]$/i.test(u.date) && (h = u.date.match(Xt))) {
624
+ if (this.$C = u.calendar || this.$C || s.$C, u.jalali && typeof u.date == "string" && /.*[^Z]$/i.test(u.date) && (h = u.date.match(Qt))) {
625
625
  var p = de.G(parseInt(h[1], 10), parseInt(h[2], 10), parseInt(h[3] || 1, 10)), w = he(p, 3), I = w[0], y = w[1], R = w[2];
626
626
  u.date = "".concat(I, "-").concat(y, "-").concat(R).concat(h[4] || "");
627
627
  }
@@ -634,7 +634,7 @@ var de = {
634
634
  if (!i(this))
635
635
  return b.bind(this)(u, h);
636
636
  var w = l(h) ? !0 : h, I = a(u), y = function(G, k) {
637
- var O = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : p.$jy, ce = de.G(O, k + 1, G), x = he(ce, 3), se = x[0], ue = x[1], bt = x[2], Je = J(new Date(se, ue - 1, bt), p);
637
+ var O = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : p.$jy, ce = de.G(O, k + 1, G), x = he(ce, 3), se = x[0], ue = x[1], Rt = x[2], Je = J(new Date(se, ue - 1, Rt), p);
638
638
  return (w ? Je : Je.endOf(K)).$set("hour", 1);
639
639
  }, R = (this.$W + (7 - s.$fdow)) % 7;
640
640
  switch (I) {
@@ -698,8 +698,8 @@ var de = {
698
698
  var p = this;
699
699
  if (!i(this))
700
700
  return z.bind(this)(u, h);
701
- var w = u || es, I = h || this.$locale(), y = I.jmonths;
702
- return w.replace(Qt, function(R) {
701
+ var w = u || ts, I = h || this.$locale(), y = I.jmonths;
702
+ return w.replace(es, function(R) {
703
703
  if (R.indexOf("[") > -1) return R.replace(/\[|\]/g, "");
704
704
  switch (R) {
705
705
  case "YY":
@@ -752,7 +752,7 @@ var de = {
752
752
  return J(this.toDate(), this);
753
753
  };
754
754
  };
755
- const rs = {
755
+ const ns = {
756
756
  ordinal(t) {
757
757
  },
758
758
  relativeTime: void 0,
@@ -774,8 +774,8 @@ const rs = {
774
774
  LLLL: "dddd, D MMMM YYYY HH:mm"
775
775
  }
776
776
  };
777
- function ns() {
778
- P.extend(ss), P.calendar("jalali"), P.extend(Lt), P.extend($t), P.extend(Ft), P.locale(rs, {}, !0);
777
+ function is() {
778
+ P.extend(rs), P.calendar("jalali"), P.extend(kt), P.extend(Vt), P.extend(Yt), P.locale(ns, {}, !0);
779
779
  }
780
780
  class Gs {
781
781
  constructor(e, s) {
@@ -814,7 +814,7 @@ class we {
814
814
  return Z.getUnixEndOfDayInUnix(s) <= Z.getUnixEndOfDayInUnix(e);
815
815
  }
816
816
  }
817
- ns();
817
+ is();
818
818
  class C {
819
819
  static toCurrency(e, s) {
820
820
  return e.toLocaleString("en-US", s);
@@ -853,7 +853,7 @@ class C {
853
853
  return P(new Date(e)).subtract(1, "day").format(s);
854
854
  }
855
855
  }
856
- var g = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(g || {}), V = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(V || {}), L = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(L || {}), is = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))(is || {}), je = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))(je || {}), Fe = /* @__PURE__ */ ((t) => (t.Text = "text", t))(Fe || {}), Ye = /* @__PURE__ */ ((t) => (t.Text = "text", t.ACTION = "action", t.Tag = "tag", t.Iban = "iban", t.BankCard = "bankCard", t.Symbol = "symbol", t.TradeDetail = "tradeDetail", t.SymbolPrice = "symbolPrice", t.TradeSymbol = "tradeSymbol", t.Price = "price", t.DynamicCurrencyPrice = "dynamicCurrencyPrice", t.TradeDate = "tradeDate", t.RequestResponseIdentity = "requestResponseIdentity", t.Image = "image", t))(Ye || {}), ut = /* @__PURE__ */ ((t) => (t[t.MINIMAL_LOADABLE_HEADER_COUNT = 0] = "MINIMAL_LOADABLE_HEADER_COUNT", t[t.DEFAULT_ITEM_COUNT_PER_PAGE = 20] = "DEFAULT_ITEM_COUNT_PER_PAGE", t.PAGINATION_POSITION = "bottomCenter", t))(ut || {}), Ue = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Ue || {}), ne = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(ne || {}), as = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(as || {}), Se = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(Se || {}), U = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(U || {}), Ue = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Ue || {}), Be = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(Be || {}), os = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(os || {});
856
+ var g = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(g || {}), V = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(V || {}), L = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(L || {}), as = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))(as || {}), je = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))(je || {}), Fe = /* @__PURE__ */ ((t) => (t.Text = "text", t))(Fe || {}), Ye = /* @__PURE__ */ ((t) => (t.Text = "text", t.ACTION = "action", t.Tag = "tag", t.Iban = "iban", t.BankCard = "bankCard", t.Symbol = "symbol", t.TradeDetail = "tradeDetail", t.SymbolPrice = "symbolPrice", t.TradeSymbol = "tradeSymbol", t.Price = "price", t.DynamicCurrencyPrice = "dynamicCurrencyPrice", t.TradeDate = "tradeDate", t.RequestResponseIdentity = "requestResponseIdentity", t.Image = "image", t))(Ye || {}), ut = /* @__PURE__ */ ((t) => (t[t.MINIMAL_LOADABLE_HEADER_COUNT = 0] = "MINIMAL_LOADABLE_HEADER_COUNT", t[t.DEFAULT_ITEM_COUNT_PER_PAGE = 20] = "DEFAULT_ITEM_COUNT_PER_PAGE", t.PAGINATION_POSITION = "bottomCenter", t))(ut || {}), Ue = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Ue || {}), ne = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(ne || {}), os = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(os || {}), Se = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(Se || {}), U = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(U || {}), Ue = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Ue || {}), Be = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(Be || {}), ls = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(ls || {});
857
857
  class Q {
858
858
  static getBankImageBaseOnCardInfo(e, s) {
859
859
  return e === void 0 ? "/img/banks/shetab.png" : s === "IBAN" ? (e = C.toEnglishDigits(
@@ -867,7 +867,7 @@ class Q {
867
867
  if (e == null) return s;
868
868
  e = e.substring(0, 6);
869
869
  try {
870
- const r = _t.find((n) => Object.keys(n)[0] === e);
870
+ const r = Ct.find((n) => Object.keys(n)[0] === e);
871
871
  return r === void 0 ? s : Object.values(r)[0];
872
872
  } catch {
873
873
  return s;
@@ -880,7 +880,7 @@ class Q {
880
880
  if (e == null) return s;
881
881
  e = e.substring(2, 5);
882
882
  try {
883
- const r = Ct.find((n) => Object.keys(n)[0] === e);
883
+ const r = Mt.find((n) => Object.keys(n)[0] === e);
884
884
  return r === void 0 ? s : Object.values(r)[0];
885
885
  } catch {
886
886
  return s;
@@ -1050,7 +1050,7 @@ class er extends dt {
1050
1050
  return this._authorizationService.someAccess(e, s);
1051
1051
  }
1052
1052
  }
1053
- class ls {
1053
+ class cs {
1054
1054
  constructor() {
1055
1055
  this.value = null, this.initialValue = null, this.name = "", this.isValid = !1, this.isBlurSensitive = !1, this.isRequired = !1, this.isIncludeInRequestBody = !0, this.isChangeSensitive = !1, this.notValidMessage = "", this.isEmptySensitive = !0, this.hasCustomValidationCheck = !1, this.shouldRemoveValidationMessageOnInteract = !1;
1056
1056
  }
@@ -1061,7 +1061,7 @@ function tr(t) {
1061
1061
  function sr(t, e) {
1062
1062
  return t - 1 === e;
1063
1063
  }
1064
- function cs(t) {
1064
+ function us(t) {
1065
1065
  return String(t).length === 0 || t === null || t === void 0;
1066
1066
  }
1067
1067
  function rr(t) {
@@ -1069,10 +1069,10 @@ function rr(t) {
1069
1069
  }
1070
1070
  class nr {
1071
1071
  constructor(e, s) {
1072
- this.initialData = null, this.data = new ls(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
1072
+ this.initialData = null, this.data = new cs(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
1073
1073
  }
1074
1074
  shouldRunValidation() {
1075
- return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !cs(this.data.value);
1075
+ return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !us(this.data.value);
1076
1076
  }
1077
1077
  async runValidation(e = !1) {
1078
1078
  for (const s of this._validators) {
@@ -1295,7 +1295,7 @@ function lr(t, e = !1) {
1295
1295
  const s = ot(t), r = M(
1296
1296
  Se.Invalid
1297
1297
  );
1298
- return Rt(
1298
+ return Dt(
1299
1299
  () => s.getInputControlsAsArray(),
1300
1300
  () => {
1301
1301
  e || (s.runValidation(), s.getIsValid() ? r.value = Se.Valid : r.value = Se.Invalid);
@@ -1335,7 +1335,7 @@ const pt = "150px", vt = 2, cr = {
1335
1335
  align: je.Center,
1336
1336
  headerType: Fe.Text,
1337
1337
  accessLevel: null
1338
- }, us = {
1338
+ }, hs = {
1339
1339
  width: pt,
1340
1340
  align: je.Center,
1341
1341
  headerType: Fe.Text,
@@ -1377,7 +1377,7 @@ class ur {
1377
1377
  return s === L.ASC ? r.aSort(e) : r.bSort(e);
1378
1378
  }
1379
1379
  }
1380
- class hs {
1380
+ class ds {
1381
1381
  constructor(e) {
1382
1382
  this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new He(
1383
1383
  "id",
@@ -1488,7 +1488,7 @@ class A {
1488
1488
  return this._value;
1489
1489
  }
1490
1490
  }
1491
- class hr extends hs {
1491
+ class hr extends ds {
1492
1492
  constructor(e) {
1493
1493
  super(e), this.selectedRows = new A(/* @__PURE__ */ new Map()), this.rowSelect = this.rowSelect.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.handlePagination = this.handlePagination.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRows = this.getSelectedRows.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
1494
1494
  }
@@ -1529,7 +1529,7 @@ class hr extends hs {
1529
1529
  }
1530
1530
  function dr(t) {
1531
1531
  return {
1532
- ...us,
1532
+ ...hs,
1533
1533
  ...t
1534
1534
  };
1535
1535
  }
@@ -1597,7 +1597,7 @@ class yr {
1597
1597
  e.update(this);
1598
1598
  }
1599
1599
  }
1600
- class ds {
1600
+ class fs {
1601
1601
  constructor(e) {
1602
1602
  this.rows = new A([]), this.headerSchema = new A([]), this.currentPage = new A(1), this.currentPageSize = new A(20), this.totalItems = new A(0), this.currentSortDetail = new A(new He("id", L.DESC)), this.scrollDetail = new A(null), this.isExpandable = new A(!1), this.tableSource = e, this.accessService = ae.GetInstance();
1603
1603
  }
@@ -1652,7 +1652,7 @@ class ds {
1652
1652
  this.tableSource.onTableDestroy();
1653
1653
  }
1654
1654
  }
1655
- class wr extends ds {
1655
+ class wr extends fs {
1656
1656
  constructor(e) {
1657
1657
  super(e), this.selectedRows = new A(
1658
1658
  /* @__PURE__ */ new Map()
@@ -1720,7 +1720,7 @@ function Rr(t) {
1720
1720
  t.prototype.loadHeaderSchema = r;
1721
1721
  };
1722
1722
  }
1723
- function fs() {
1723
+ function ps() {
1724
1724
  const t = M(
1725
1725
  /* @__PURE__ */ new Map()
1726
1726
  ), e = M(0), s = M(null), r = S(() => Array.from(t.value.values()));
@@ -1763,7 +1763,7 @@ function fs() {
1763
1763
  clearCurrentItem: d
1764
1764
  };
1765
1765
  }
1766
- class ps {
1766
+ class vs {
1767
1767
  constructor() {
1768
1768
  this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new He("id", L.DESC), this.filters = [];
1769
1769
  }
@@ -1778,8 +1778,8 @@ class Ar {
1778
1778
  this.shouldKeepSync = e, this.intervalInMillisecond = s;
1779
1779
  }
1780
1780
  }
1781
- const st = new ps();
1782
- function vs() {
1781
+ const st = new vs();
1782
+ function gs() {
1783
1783
  const t = M(structuredClone(st));
1784
1784
  function e() {
1785
1785
  t.value.pageNumber = t.value.pageNumber + 1;
@@ -1843,7 +1843,7 @@ function vs() {
1843
1843
  setFiltersBaseOnRequestBody: a
1844
1844
  };
1845
1845
  }
1846
- function gs() {
1846
+ function ms() {
1847
1847
  const t = M(/* @__PURE__ */ new Set()), e = S(() => t.value.has(g.FetchList)), s = S(() => t.value.has(g.FetchItem)), r = S(() => t.value.has(g.FetchLastItems)), n = S(() => t.value.has(g.FetchPreviousItems)), i = S(() => t.value.has(g.Create)), a = S(() => t.value.has(g.Update)), l = S(() => t.value.has(g.Delete)), o = S(() => t.value.has(g.Search)), c = S(() => t.value.has(g.Sort));
1848
1848
  function f(v) {
1849
1849
  t.value.add(v);
@@ -1867,7 +1867,7 @@ function gs() {
1867
1867
  };
1868
1868
  }
1869
1869
  function _r(t) {
1870
- const e = fs(), s = vs(), r = gs(), n = new ft({
1870
+ const e = ps(), s = gs(), r = ms(), n = new ft({
1871
1871
  runAction: async () => d(g.AutoRefresh)
1872
1872
  }), i = S(() => {
1873
1873
  const u = s.params.value.pageNumber, h = s.params.value.itemCount, p = u * h - h, w = u * h - 1, I = [];
@@ -1955,7 +1955,7 @@ function _r(t) {
1955
1955
  async function J() {
1956
1956
  return s.clearParam(), await d();
1957
1957
  }
1958
- return Dt(() => {
1958
+ return At(() => {
1959
1959
  b();
1960
1960
  }), {
1961
1961
  loadingStatusManager: r,
@@ -2206,7 +2206,7 @@ class Tr {
2206
2206
  }
2207
2207
  const Y = class Y {
2208
2208
  constructor() {
2209
- this.jsonConverter = new At();
2209
+ this.jsonConverter = new _t();
2210
2210
  }
2211
2211
  serializeObject(e, s) {
2212
2212
  return this.jsonConverter.serializeObject(e, s);
@@ -2231,7 +2231,7 @@ const Y = class Y {
2231
2231
  };
2232
2232
  Y.Instance = null;
2233
2233
  let nt = Y;
2234
- var ms = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(ms || {}), gt = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(gt || {});
2234
+ var ys = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(ys || {}), gt = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(gt || {});
2235
2235
  class $r {
2236
2236
  constructor(e, s, r) {
2237
2237
  this.placement = gt.BottomLeft, this.type = e, this.message = s, this.description = r;
@@ -2394,9 +2394,9 @@ class Ur {
2394
2394
  this.scheduler.clearInterval();
2395
2395
  }
2396
2396
  }
2397
- class ys {
2397
+ class ws {
2398
2398
  }
2399
- class Br extends ys {
2399
+ class Br extends ws {
2400
2400
  search(e, s, r) {
2401
2401
  const n = [];
2402
2402
  e: for (const i of e)
@@ -2419,10 +2419,10 @@ class Hr {
2419
2419
  });
2420
2420
  }
2421
2421
  }
2422
- var ws = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, E = (t, e, s, r) => {
2423
- for (var n = r > 1 ? void 0 : r ? Ss(e, s) : e, i = t.length - 1, a; i >= 0; i--)
2422
+ var Ss = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, E = (t, e, s, r) => {
2423
+ for (var n = r > 1 ? void 0 : r ? Is(e, s) : e, i = t.length - 1, a; i >= 0; i--)
2424
2424
  (a = t[i]) && (n = (r ? a(e, s, n) : a(n)) || n);
2425
- return r && n && ws(e, s, n), n;
2425
+ return r && n && Ss(e, s, n), n;
2426
2426
  };
2427
2427
  let Re = class {
2428
2428
  constructor() {
@@ -2554,7 +2554,7 @@ function qe(t, e) {
2554
2554
  }
2555
2555
  t.prototype = e === null ? Object.create(e) : (s.prototype = e.prototype, new s());
2556
2556
  }
2557
- function Is(t, e, s, r) {
2557
+ function bs(t, e, s, r) {
2558
2558
  function n(i) {
2559
2559
  return i instanceof s ? i : new s(function(a) {
2560
2560
  a(i);
@@ -2581,7 +2581,7 @@ function Is(t, e, s, r) {
2581
2581
  c((r = r.apply(t, [])).next());
2582
2582
  });
2583
2583
  }
2584
- function bs(t, e) {
2584
+ function Rs(t, e) {
2585
2585
  var s = { label: 0, sent: function() {
2586
2586
  if (i[0] & 1) throw i[1];
2587
2587
  return i[1];
@@ -2674,13 +2674,13 @@ function N() {
2674
2674
  return t;
2675
2675
  }
2676
2676
  var Te = "injectionTokens";
2677
- function Rs(t) {
2677
+ function Ds(t) {
2678
2678
  var e = Reflect.getMetadata("design:paramtypes", t) || [], s = Reflect.getOwnMetadata(Te, t) || {};
2679
2679
  return Object.keys(s).forEach(function(r) {
2680
2680
  e[+r] = s[r];
2681
2681
  }), e;
2682
2682
  }
2683
- function Ds(t, e) {
2683
+ function As(t, e) {
2684
2684
  return function(s, r, n) {
2685
2685
  var i = Reflect.getOwnMetadata(Te, s) || {};
2686
2686
  i[n] = t, Reflect.defineMetadata(Te, i, s);
@@ -2729,13 +2729,13 @@ var wt = function() {
2729
2729
  function X(t) {
2730
2730
  return typeof t == "string" || typeof t == "symbol";
2731
2731
  }
2732
- function As(t) {
2732
+ function _s(t) {
2733
2733
  return typeof t == "object" && "token" in t && "multiple" in t;
2734
2734
  }
2735
2735
  function it(t) {
2736
2736
  return typeof t == "object" && "token" in t && "transform" in t;
2737
2737
  }
2738
- function _s(t) {
2738
+ function Cs(t) {
2739
2739
  return typeof t == "function" || t instanceof wt;
2740
2740
  }
2741
2741
  function Ie(t) {
@@ -2744,7 +2744,7 @@ function Ie(t) {
2744
2744
  function be(t) {
2745
2745
  return t.useValue != null;
2746
2746
  }
2747
- function Cs(t) {
2747
+ function Ms(t) {
2748
2748
  return yt(t) || be(t) || Ie(t) || $e(t);
2749
2749
  }
2750
2750
  var ze = function() {
@@ -2770,7 +2770,7 @@ var ze = function() {
2770
2770
  }, t.prototype.ensure = function(e) {
2771
2771
  this._registryMap.has(e) || this._registryMap.set(e, []);
2772
2772
  }, t;
2773
- }(), Ms = function(t) {
2773
+ }(), Es = function(t) {
2774
2774
  qe(e, t);
2775
2775
  function e() {
2776
2776
  return t !== null && t.apply(this, arguments) || this;
@@ -2782,54 +2782,54 @@ var ze = function() {
2782
2782
  }
2783
2783
  return t;
2784
2784
  }();
2785
- function Es(t, e) {
2785
+ function Os(t, e) {
2786
2786
  if (t === null)
2787
2787
  return "at position #" + e;
2788
2788
  var s = t.split(",")[e].trim();
2789
2789
  return '"' + s + '" at position #' + e;
2790
2790
  }
2791
- function Os(t, e, s) {
2791
+ function Ps(t, e, s) {
2792
2792
  return s === void 0 && (s = " "), N([t], e.message.split(`
2793
2793
  `).map(function(r) {
2794
2794
  return s + r;
2795
2795
  })).join(`
2796
2796
  `);
2797
2797
  }
2798
- function Ps(t, e, s) {
2799
- var r = Ae(t.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), n = r[1], i = n === void 0 ? null : n, a = Es(i, e);
2800
- return Os("Cannot inject the dependency " + a + ' of "' + t.name + '" constructor. Reason:', s);
2798
+ function Ls(t, e, s) {
2799
+ var r = Ae(t.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), n = r[1], i = n === void 0 ? null : n, a = Os(i, e);
2800
+ return Ps("Cannot inject the dependency " + a + ' of "' + t.name + '" constructor. Reason:', s);
2801
2801
  }
2802
- function Ls(t) {
2802
+ function ks(t) {
2803
2803
  if (typeof t.dispose != "function")
2804
2804
  return !1;
2805
2805
  var e = t.dispose;
2806
2806
  return !(e.length > 0);
2807
2807
  }
2808
- var ks = function(t) {
2808
+ var xs = function(t) {
2809
2809
  qe(e, t);
2810
2810
  function e() {
2811
2811
  return t !== null && t.apply(this, arguments) || this;
2812
2812
  }
2813
2813
  return e;
2814
- }(ze), xs = function(t) {
2814
+ }(ze), Ts = function(t) {
2815
2815
  qe(e, t);
2816
2816
  function e() {
2817
2817
  return t !== null && t.apply(this, arguments) || this;
2818
2818
  }
2819
2819
  return e;
2820
- }(ze), Ts = /* @__PURE__ */ function() {
2820
+ }(ze), $s = /* @__PURE__ */ function() {
2821
2821
  function t() {
2822
- this.preResolution = new ks(), this.postResolution = new xs();
2822
+ this.preResolution = new xs(), this.postResolution = new Ts();
2823
2823
  }
2824
2824
  return t;
2825
- }(), St = /* @__PURE__ */ new Map(), $s = function() {
2825
+ }(), St = /* @__PURE__ */ new Map(), Vs = function() {
2826
2826
  function t(e) {
2827
- this.parent = e, this._registry = new Ms(), this.interceptors = new Ts(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
2827
+ this.parent = e, this._registry = new Es(), this.interceptors = new $s(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
2828
2828
  }
2829
2829
  return t.prototype.register = function(e, s, r) {
2830
2830
  r === void 0 && (r = { lifecycle: D.Transient }), this.ensureNotDisposed();
2831
2831
  var n;
2832
- if (Cs(s) ? n = s : n = { useClass: s }, Ie(n))
2832
+ if (Ms(s) ? n = s : n = { useClass: s }, Ie(n))
2833
2833
  for (var i = [e], a = n; a != null; ) {
2834
2834
  var l = a.useToken;
2835
2835
  if (i.includes(l))
@@ -2879,7 +2879,7 @@ var ks = function(t) {
2879
2879
  var i = this.resolveRegistration(n, s);
2880
2880
  return this.executePostResolutionInterceptor(e, i, "Single"), i;
2881
2881
  }
2882
- if (_s(e)) {
2882
+ if (Cs(e)) {
2883
2883
  var i = this.construct(e, s);
2884
2884
  return this.executePostResolutionInterceptor(e, i, "Single"), i;
2885
2885
  }
@@ -3009,9 +3009,9 @@ var ks = function(t) {
3009
3009
  options: r
3010
3010
  });
3011
3011
  }, t.prototype.dispose = function() {
3012
- return Is(this, void 0, void 0, function() {
3012
+ return bs(this, void 0, void 0, function() {
3013
3013
  var e;
3014
- return bs(this, function(s) {
3014
+ return Rs(this, function(s) {
3015
3015
  switch (s.label) {
3016
3016
  case 0:
3017
3017
  return this.disposed = !0, e = [], this.disposables.forEach(function(r) {
@@ -3043,38 +3043,38 @@ var ks = function(t) {
3043
3043
  var a = i.map(r.resolveParams(s, e));
3044
3044
  return new (e.bind.apply(e, N([void 0], a)))();
3045
3045
  }();
3046
- return Ls(n) && this.disposables.add(n), n;
3046
+ return ks(n) && this.disposables.add(n), n;
3047
3047
  }, t.prototype.resolveParams = function(e, s) {
3048
3048
  var r = this;
3049
3049
  return function(n, i) {
3050
3050
  var a, l, o;
3051
3051
  try {
3052
- return As(n) ? it(n) ? n.multiple ? (a = r.resolve(n.transform)).transform.apply(a, N([r.resolveAll(n.token, new pe(), n.isOptional)], n.transformArgs)) : (l = r.resolve(n.transform)).transform.apply(l, N([r.resolve(n.token, e, n.isOptional)], n.transformArgs)) : n.multiple ? r.resolveAll(n.token, new pe(), n.isOptional) : r.resolve(n.token, e, n.isOptional) : it(n) ? (o = r.resolve(n.transform, e)).transform.apply(o, N([r.resolve(n.token, e)], n.transformArgs)) : r.resolve(n, e);
3052
+ return _s(n) ? it(n) ? n.multiple ? (a = r.resolve(n.transform)).transform.apply(a, N([r.resolveAll(n.token, new pe(), n.isOptional)], n.transformArgs)) : (l = r.resolve(n.transform)).transform.apply(l, N([r.resolve(n.token, e, n.isOptional)], n.transformArgs)) : n.multiple ? r.resolveAll(n.token, new pe(), n.isOptional) : r.resolve(n.token, e, n.isOptional) : it(n) ? (o = r.resolve(n.transform, e)).transform.apply(o, N([r.resolve(n.token, e)], n.transformArgs)) : r.resolve(n, e);
3053
3053
  } catch (c) {
3054
- throw new Error(Ps(s, i, c));
3054
+ throw new Error(Ls(s, i, c));
3055
3055
  }
3056
3056
  };
3057
3057
  }, t.prototype.ensureNotDisposed = function() {
3058
3058
  if (this.disposed)
3059
3059
  throw new Error("This container has been disposed, you cannot interact with a disposed container");
3060
3060
  }, t;
3061
- }(), Vs = new $s();
3061
+ }(), It = new Vs();
3062
3062
  function Ns(t, e) {
3063
3063
  var s = {
3064
3064
  token: t,
3065
3065
  multiple: !1,
3066
3066
  isOptional: e
3067
3067
  };
3068
- return Ds(s);
3068
+ return As(s);
3069
3069
  }
3070
3070
  function js(t) {
3071
3071
  return function(e) {
3072
- St.set(e, Rs(e));
3072
+ St.set(e, Ds(e));
3073
3073
  };
3074
3074
  }
3075
- function It() {
3075
+ function bt() {
3076
3076
  return function(t) {
3077
- js()(t), Vs.registerSingleton(t);
3077
+ js()(t), It.registerSingleton(t);
3078
3078
  };
3079
3079
  }
3080
3080
  if (typeof Reflect > "u" || !Reflect.getMetadata)
@@ -3093,7 +3093,7 @@ let Ve = class {
3093
3093
  }
3094
3094
  };
3095
3095
  Ve = Ys([
3096
- It()
3096
+ bt()
3097
3097
  ], Ve);
3098
3098
  class We extends Event {
3099
3099
  constructor(e) {
@@ -3118,10 +3118,9 @@ function Gr(t, e = !1) {
3118
3118
  return function(s, r, n) {
3119
3119
  const i = n.value;
3120
3120
  n.value = function(a) {
3121
- const l = this;
3122
- if (i.call(l, a), e)
3123
- for (const o of t)
3124
- window.removeEventListener(o, n.value);
3121
+ if (console.log("the container", It.resolve(s.constructor)), i(a), e)
3122
+ for (const l of t)
3123
+ window.removeEventListener(l, n.value);
3125
3124
  };
3126
3125
  for (const a of t)
3127
3126
  window.addEventListener(a, n.value);
@@ -3220,7 +3219,7 @@ let at = class {
3220
3219
  }
3221
3220
  };
3222
3221
  at = Bs([
3223
- It(),
3222
+ bt(),
3224
3223
  Hs(0, Ns(Ve))
3225
3224
  ], at);
3226
3225
  export {
@@ -3237,11 +3236,11 @@ export {
3237
3236
  dt as AuthorizationDirective,
3238
3237
  Le as AuthorizationService,
3239
3238
  De as BaseModel,
3240
- hs as BaseTable,
3239
+ ds as BaseTable,
3241
3240
  A as BehaviorSubject,
3242
3241
  Ye as CellType,
3243
3242
  Br as ClientArraySearch,
3244
- ys as ClientSearch,
3243
+ ws as ClientSearch,
3245
3244
  fr as Column,
3246
3245
  Pe as CommonMaskFormats,
3247
3246
  Ur as CrudService,
@@ -3249,7 +3248,7 @@ export {
3249
3248
  Z as DateConverter,
3250
3249
  Ks as DateDisabledOptions,
3251
3250
  re as DateFormat,
3252
- Mt as DateFormats,
3251
+ Et as DateFormats,
3253
3252
  we as DateTools,
3254
3253
  Er as DebounceService,
3255
3254
  V as DialogDimensions,
@@ -3268,12 +3267,12 @@ export {
3268
3267
  xr as HttpClient,
3269
3268
  nr as InputControl,
3270
3269
  ir as InputControlBuilder,
3271
- ls as InputControlData,
3270
+ cs as InputControlData,
3272
3271
  nt as JsonMapper,
3273
3272
  g as LoadingStatus,
3274
3273
  ee as MinifiedSymbolModel,
3275
3274
  Gr as OnEvent,
3276
- ps as Params,
3275
+ vs as Params,
3277
3276
  Fr as Process,
3278
3277
  jr as ProcessManager,
3279
3278
  Gs as RangeValue,
@@ -3286,30 +3285,30 @@ export {
3286
3285
  er as SomeLevelsAuthorizationDirective,
3287
3286
  He as SortDetail,
3288
3287
  L as SortOrder,
3289
- is as SortOrderTableHeader,
3288
+ as as SortOrderTableHeader,
3290
3289
  ur as Sorter,
3291
- as as StatusCode,
3290
+ os as StatusCode,
3292
3291
  U as StorageKeys,
3293
3292
  Be as StoreNames,
3294
3293
  Jr as SymbolInTrade,
3295
3294
  Wr as SymbolPriceInTrade,
3296
- os as Symbols,
3295
+ ls as Symbols,
3297
3296
  Ar as SyncDetail,
3298
3297
  cr as TABLE_ACTION_COLUMN,
3299
3298
  vt as TABLE_COLUMN_DEFAULT_COLSPAN,
3300
- us as TABLE_COLUMN_DEFAULT_VALUES,
3299
+ hs as TABLE_COLUMN_DEFAULT_VALUES,
3301
3300
  pt as TABLE_COLUMN_DEFAULT_WIDTH,
3302
3301
  pr as Table,
3303
3302
  Ir as TableCellComponentRegistry,
3304
3303
  Sr as TableConfig,
3305
3304
  ut as TableConstants,
3306
3305
  gr as TableDestroy,
3307
- ds as TableGenerator,
3306
+ fs as TableGenerator,
3308
3307
  je as TableHeaderAlign,
3309
3308
  mr as TableRowClick,
3310
3309
  gt as ToastLocation,
3311
3310
  $r as ToastMessage,
3312
- ms as ToastType,
3311
+ ys as ToastType,
3313
3312
  ar as TouchSensitiveControl,
3314
3313
  zr as TradeAmount,
3315
3314
  qr as TradeDate,
@@ -3320,21 +3319,21 @@ export {
3320
3319
  ie as WebSocketEvents,
3321
3320
  Kr as WebSocketPostMessage,
3322
3321
  at as WebSocketService,
3323
- _t as cards,
3322
+ Ct as cards,
3324
3323
  dr as generateHeader,
3325
- Ct as ibans,
3326
- cs as isEmpty,
3324
+ Mt as ibans,
3325
+ us as isEmpty,
3327
3326
  sr as isLastItem,
3328
3327
  tr as isOnlyOneItem,
3329
- ns as setupJalaliDate,
3328
+ is as setupJalaliDate,
3330
3329
  rr as setupStore,
3331
3330
  Mr as useCrud,
3332
- fs as useData,
3331
+ ps as useData,
3333
3332
  Vr as useDialogService,
3334
3333
  Nr as useDrawerService,
3335
3334
  lr as useForm,
3336
- gs as useLoadingStatus,
3337
- vs as useParams,
3335
+ ms as useLoadingStatus,
3336
+ gs as useParams,
3338
3337
  _r as useRepository,
3339
3338
  Cr as useStaticTableService
3340
3339
  };
@@ -1,5 +1,5 @@
1
- (function(o,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],C):(o=typeof globalThis<"u"?globalThis:o||self,C(o.IronCore={},o.dayjs,o.Vue,o.json2typescript,o.pinia))})(this,function(o,C,g,_,Qe){"use strict";var le=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(le||{}),J=(t=>(t.FullDate="YYYY/M/D HH:mm",t.SimpleDate="YYYY/M/D",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(J||{});const et=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایران‌زمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],tt=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var st=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(st||{});function ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ue={exports:{}},Tt=ue.exports,rt;function Pt(){return rt||(rt=1,function(t,e){(function(s,r){t.exports=r()})(Tt,function(){return function(s,r){r.prototype.weekday=function(n){var i=this.$locale().weekStart||0,a=this.$W,c=(a<i?a+7:a)-i;return this.$utils().u(n)?c:this.subtract(c,"day").add(n,"day")}}})}(ue)),ue.exports}var Lt=Pt();const kt=ce(Lt);var he={exports:{}},Vt=he.exports,nt;function $t(){return nt||(nt=1,function(t,e){(function(s,r){t.exports=r()})(Vt,function(){var s="week",r="year";return function(n,i,a){var c=i.prototype;c.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var v=a(this).startOf(r).add(1,r).date(u),f=a(this).endOf(s);if(v.isBefore(f))return 1}var p=a(this).startOf(r).date(u).startOf(s).subtract(1,"millisecond"),S=this.diff(p,s,!0);return S<0?a(this).startOf("week").week():Math.ceil(S)},c.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(he)),he.exports}var Nt=$t();const Ft=ce(Nt);var de={exports:{}},jt=de.exports,it;function Bt(){return it||(it=1,function(t,e){(function(s,r){t.exports=r()})(jt,function(){return function(s,r){r.prototype.weekYear=function(){var n=this.month(),i=this.week(),a=this.year();return i===1&&n===11?a+1:n===0&&i>=52?a-1:a}}})}(de)),de.exports}var Ut=Bt();const Yt=ce(Ut);var fe={exports:{}},Ht=fe.exports,at;function qt(){return at||(at=1,function(t,e){(function(s,r){t.exports=r(C)})(Ht,function(s){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var n=r(s),i={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return n.default.locale(i,null,!0),i})}(fe)),fe.exports}var zt=qt();const Jt=ce(zt);function ve(t,e){return Wt(t)||Gt(t,e)||xt()}function Wt(t){if(Array.isArray(t))return t}function Gt(t,e){var s=[],r=!0,n=!1,i=void 0;try{for(var a=t[Symbol.iterator](),c;!(r=(c=a.next()).done)&&(s.push(c.value),!(e&&s.length===e));r=!0);}catch(l){n=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return s}function xt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ot(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),n=2-r+Math.floor(r/4),i=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+n-1524.5;return i}function Kt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var n=Math.floor((e-186721625e-2)/36524.25);r=e+1+n-Math.floor(n/4)}var i=r+1524,a=Math.floor((i-122.1)/365.25),c=Math.floor(365.25*a),l=Math.floor((i-c)/30.6001),u=i-c-Math.floor(30.6001*l)+s,v=l<14?l-1:l-13,f=v>2?a-4716:a-4715;return Qt(f,v,u)}function Zt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var n=Math.floor((e-186721625e-2)/36524.25);r=e+1+n-Math.floor(n/4)}var i=r+1524,a=Math.floor((i-122.1)/365.25),c=Math.floor(365.25*a),l=Math.floor((i-c)/30.6001),u=i-c-Math.floor(30.6001*l)+s,v=l<14?l-1:l-13,f=v>2?a-4716:a-4715;return[Math.floor(f),Math.floor(v),Math.floor(u)]}function Xt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],n=[31,31,31,31,31,31,30,30,30,30,30,29];function i(S,D){return Math.floor(S/D)}t-=979;for(var a=365*t+i(t,33)*8+i(t%33+3,4),c=0;c<e-1;++c)a+=n[c];a+=s-1;var l=a+79,u=1600+400*i(l,146097);l=l%146097;var v=!0;for(l>=36525&&(l--,u+=100*i(l,36524),l=l%36524,l>=365?l++:v=!1),u+=4*i(l,1461),l%=1461,l>=366&&(v=!1,l--,u+=i(l,365),l=l%365),c=0;l>=r[c]+(c==1&&v);c++)l-=r[c]+(c==1&&v);var f=c+1,p=l+1;return ot(u,f,p)}function Qt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],n=[31,31,31,31,31,31,30,30,30,30,30,29];function i(ee,te){return Math.floor(ee/te)}for(var a=t-1600,c=e-1,l=s-1,u=365*a+i(a+3,4)-i(a+99,100)+i(a+399,400),v=0;v<c;++v)u+=r[v];c>1&&(t%4==0&&t%100!=0||t%400==0)&&u++,u+=l;var f=u-79,p=i(f,12053);f%=12053;var S=979+33*p+4*i(f,1461);f%=1461,f>=366&&(S+=i(f-1,365),f=(f-1)%365);for(var D=0;D<11&&f>=n[D];++D)f-=n[D];var X=D+1,Q=f+1;return[S,X,Q]}var me={J:function(e,s,r){return Kt(ot(e,s,r))},G:function(e,s,r){return Zt(Xt(e,s,r))}},es=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,ts=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Pe="date",W="day",$="month",N="year",lt="week",ss="YYYY-MM-DDTHH:mm:ssZ",rs={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},ns=function(t,e,s){var r=e.prototype,n=r.$utils(),i=function(d){return d.$C==="jalali"},a=n.prettyUnit||n.p,c=n.isUndefined||n.u,l=n.padStart||n.s,u=n.monthDiff||n.m,v=n.absFloor||n.a,f=function(d){return function(){var m=d.bind(this).apply(void 0,arguments);return m.$C=this.$C,m.isJalali()&&m.InitJalali(),m}};r.startOf=f(r.startOf),r.endOf=f(r.endOf),r.add=f(r.add),r.subtract=f(r.subtract),r.set=f(r.set);var p=r.parse,S=r.init,D=r.startOf,X=r.$set,Q=r.add,ee=r.format,te=r.diff,Ke=r.year,Ze=r.month,Me=r.date,Xe=r.daysInMonth,ae=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(h){return s.$C=h,s},r.calendar=function(h){var d=this.clone();return d.$C=h,d.isJalali()&&d.InitJalali(),d},r.isJalali=function(){return i(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},Jt,{},rs),!0);var se=function(d,m){return s(d,{locale:m.$L,utc:m.$u,calendar:m.$C})};r.init=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(h),this.isJalali()&&this.InitJalali()},r.parse=function(h){var d;if(this.$C=h.calendar||this.$C||s.$C,h.jalali&&typeof h.date=="string"&&/.*[^Z]$/i.test(h.date)&&(d=h.date.match(es))){var m=me.G(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3]||1,10)),I=ve(m,3),b=I[0],w=I[1],R=I[2];h.date="".concat(b,"-").concat(w,"-").concat(R).concat(d[4]||"")}return p.bind(this)(h)},r.InitJalali=function(){var h=me.J(this.$y,this.$M+1,this.$D),d=ve(h,3),m=d[0],I=d[1],b=d[2];this.$jy=m,this.$jM=I-1,this.$jD=b},r.startOf=function(h,d){var m=this;if(!i(this))return D.bind(this)(h,d);var I=c(d)?!0:d,b=a(h),w=function(re,q){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.$jy,Oe=me.G(L,q+1,re),z=ve(Oe,3),oe=z[0],Te=z[1],kr=z[2],Ot=se(new Date(oe,Te-1,kr),m);return(I?Ot:Ot.endOf(W)).$set("hour",1)},R=(this.$W+(7-s.$fdow))%7;switch(b){case N:return I?w(1,0):w(0,0,this.$jy+1);case $:return I?w(1,this.$jM):w(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case lt:return I?w(this.$jD-R,this.$jM):w(this.$jD+(6-R),this.$jM);default:return D.bind(this)(h,d)}},r.$set=function(h,d){var m=this;if(!i(this))return X.bind(this)(h,d);var I=a(h),b=function(R,Ee){var re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.$jy,q=me.G(re,Ee+1,R),L=ve(q,3),Oe=L[0],z=L[1],oe=L[2];return m.$d.setFullYear(Oe),m.$d.setMonth(z-1),m.$d.setDate(oe),m};switch(I){case Pe:case W:b(d,this.$jM);break;case $:b(this.$jD,d);break;case N:b(this.$jD,this.$jM,d);break;default:return X.bind(this)(h,d)}return this.init(),this},r.add=function(h,d){var m=this;if(!i(this))return Q.bind(this)(h,d);h=Number(h);var I=d&&(d.length===1||d==="ms")?d:a(d),b=function(z,oe){var Te=m.set(Pe,1).set(z,oe+h);return Te.set(Pe,Math.min(m.$jD,Te.daysInMonth()))};if(["M",$].indexOf(I)>-1){var w=this.$jM+h,R=w<0?-Math.ceil(-w/12):Math.floor(w/12),Ee=this.$jD,re=this.set(W,1).add(R,N).set($,w-R*12);return re.set(W,Math.min(re.daysInMonth(),Ee))}if(["y",N].indexOf(I)>-1)return b(N,this.$jy);if(["d",W].indexOf(I)>-1){var q=new Date(this.$d);return q.setDate(q.getDate()+h),se(q,this)}if(["w",lt].indexOf(I)>-1){var L=new Date(this.$d);return L.setDate(L.getDate()+h*7),se(L,this)}return Q.bind(this)(h,d)},r.format=function(h,d){var m=this;if(!i(this))return ee.bind(this)(h,d);var I=h||ss,b=d||this.$locale(),w=b.jmonths;return I.replace(ts,function(R){if(R.indexOf("[")>-1)return R.replace(/\[|\]/g,"");switch(R){case"YY":return String(m.$jy).slice(-2);case"YYYY":return String(m.$jy);case"M":return String(m.$jM+1);case"MM":return l(m.$jM+1,2,"0");case"MMM":return w[m.$jM].slice(0,3);case"MMMM":return w[m.$jM];case"D":return String(m.$jD);case"DD":return l(m.$jD,2,"0");default:return ee.bind(m)(R,d)}})},r.diff=function(h,d,m){if(!i(this))return te.bind(this)(h,d,m);var I=a(d),b=s(h),w=u(this,b);switch(I){case N:w/=12;break;case $:break;default:return te.bind(this)(h,d,m)}return m?w:v(w)},r.$g=function(h,d,m){return c(h)?this[d]:this.set(m,h)},r.year=function(h){return i(this)?this.$g(h,"$jy",N):Ke.bind(this)(h)},r.month=function(h){return i(this)?this.$g(h,"$jM",$):Ze.bind(this)(h)},r.date=function(h){return i(this)?this.$g(h,"$jD",W):Me.bind(this)(h)},r.daysInMonth=function(){return i(this)?this.endOf($).$jD:Xe.bind(this)()},ae&&(r.toArray=function(){return i(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:ae.bind(this)()}),r.clone=function(){return se(this.toDate(),this)}};const is={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function ct(){C.extend(ns),C.calendar("jalali"),C.extend(kt),C.extend(Ft),C.extend(Yt),C.locale(is,{},!0)}class as{constructor(e,s){this.start=e,this.end=s}}class os{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return C.unix(e).endOf("day").unix()}}class ne{static isDateDisabled(e,s){for(const r of e.disabledDates)if(ne.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&ne.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&ne.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}ct();class M{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return M.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",n=0,i=0;for(;n<e.length;){if(e[n]==="#"){if(i>=s.length)throw new Error("Value length does not match the format.");r+=s[i],i++}else r+=e[n];n++}if(i!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return M.applyMask(le.BankCard,String(e))}static applyIbanMask(e){return M.applyMask(le.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],n=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(i=>n[s.indexOf(i)]||n[r.indexOf(i)]||i).join("")}static mapUnixToDate(e,s){return C(new Date(e)).subtract(1,"day").format(s)}}var y=(t=>(t.FetchList="fetchList",t.AutoRefresh="autoRefresh",t.FetchItem="fetchItem",t.FetchLastItems="fetchLastItems",t.FetchPreviousItems="fetchPreviousItems",t.Create="CREATE",t.Update="UPDATE",t.Delete="DELETE",t.Search="SEARCH",t.Sort="SORT",t.Success="SUCCESS",t.Error="ERROR",t.Idle="IDLE",t))(y||{}),k=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(k||{}),P=(t=>(t.ASC="ASC",t.DESC="DESC",t))(P||{}),ut=(t=>(t.ASC="ascend",t.DESC="descend",t))(ut||{}),pe=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(pe||{}),ge=(t=>(t.Text="text",t))(ge||{}),ye=(t=>(t.Text="text",t.ACTION="action",t.Tag="tag",t.Iban="iban",t.BankCard="bankCard",t.Symbol="symbol",t.TradeDetail="tradeDetail",t.SymbolPrice="symbolPrice",t.TradeSymbol="tradeSymbol",t.Price="price",t.DynamicCurrencyPrice="dynamicCurrencyPrice",t.TradeDate="tradeDate",t.RequestResponseIdentity="requestResponseIdentity",t.Image="image",t))(ye||{}),Le=(t=>(t[t.MINIMAL_LOADABLE_HEADER_COUNT=0]="MINIMAL_LOADABLE_HEADER_COUNT",t[t.DEFAULT_ITEM_COUNT_PER_PAGE=20]="DEFAULT_ITEM_COUNT_PER_PAGE",t.PAGINATION_POSITION="bottomCenter",t))(Le||{});o.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(o.ApplicationTheme||{});var G=(t=>(t.Open="open",t.Close="close",t))(G||{}),ht=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(ht||{}),ie=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(ie||{}),V=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(V||{});o.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(o.ApplicationTheme||{});var Se=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(Se||{}),dt=(t=>(t.USDT="USDT",t))(dt||{});class j{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=M.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${j.iban(e).english}.png`):(e=M.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${j.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=et.find(n=>Object.keys(n)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=tt.find(n=>Object.keys(n)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=j.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,n,i,a;return((a=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:a.slice(1,((i=(n=e.headers["content-disposition"])==null?void 0:n.split("filename="))==null?void 0:i[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=n=>n,r=P.ASC){return e.every((n,i)=>e.length-1===i?!0:r===P.ASC?s(n)<=s(e[i+1]):s(n)>=s(e[i+1]))}}const U=class U{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(V.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(V.AccessList)}initialize(){const e=localStorage.getItem(V.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return U.Instance||(U.Instance=new U),U.Instance}};U.Instance=null;let x=U;class ke{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=x.GetInstance()}}class ls extends ke{hasAccess(e){return this.accessService.everyAccess(e)}}class cs extends ke{hasAccess(e){return this.accessService.someAccess(e)}}const Y=class Y{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(V.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(V.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(n=>r.has(n)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(n=>r.has(n)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(V.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return Y._instance||(Y._instance=new Y),Y._instance}};Y._instance=null;let we=Y;class Ve{constructor(){this._authorizationService=we.GetInstance(),this.mounted=this.mounted.bind(this),this.updated=this.updated.bind(this),this.hasAccess=this.hasAccess.bind(this),this.manageElement=this.manageElement.bind(this)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const n=this.getAccessLevels(s,r);this.hasAccess(s,n)||e.remove()}getAccessLevels(e,s){var n;let r=Object.keys(s);return r.length||(r=Array.from(((n=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:n.values())??[])),r}}class us extends Ve{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class hs extends Ve{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class ft{constructor(){this.value=null,this.initialValue=null,this.name="",this.isValid=!1,this.isBlurSensitive=!1,this.isRequired=!1,this.isIncludeInRequestBody=!0,this.isChangeSensitive=!1,this.notValidMessage="",this.isEmptySensitive=!0,this.hasCustomValidationCheck=!1,this.shouldRemoveValidationMessageOnInteract=!1}}function ds(t){return t===1}function fs(t,e){return t-1===e}function vt(t){return String(t).length===0||t===null||t===void 0}function vs(t){t()}class ms{constructor(e,s){this.initialData=null,this.data=new ft,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.hasCustomValidationCheck?!1:this.data.isRequired?!0:!vt(this.data.value)}async runValidation(e=!1){for(const s of this._validators){const r=await s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
2
- the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){if(e&&this.data.shouldRemoveValidationMessageOnInteract)throw new Error("Input control "+this.getName()+" can not be both change sensitive and remove validation meessage on interact");this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}setHasCustomValidationCheck(e){this.data.hasCustomValidationCheck=e}setShouldRemoveValidationOnInteract(e){if(e&&this.data.isChangeSensitive)throw new Error("Input control "+this.getName()+" can not be both change sensitive and remove validation meessage on interact");this.data.shouldRemoveValidationMessageOnInteract=e}getShouldRemoveValidationOnInteract(){return this.data.shouldRemoveValidationMessageOnInteract}hasCustomValidationCheck(){return this.data.hasCustomValidationCheck}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation(),this.getShouldRemoveValidationOnInteract()&&this.setNotValidMessage("")}get value(){return this.data.value}}class ps{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}setHasCustomValidationCheck(){return this._inputControl.setHasCustomValidationCheck(!0),this}removeErrorOnInteract(){return this._inputControl.setShouldRemoveValidationOnInteract(!0),this}build(){return this._inputControl}}class gs{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class ys{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}async runValidation(e){let s=!0;for(const r of this.getInputControlsAsArray())if(e&&await r.runValidation(!0),!r.getIsValid()&&(s=!1,!e)){this._isValid=!1;return}this._isValid=s}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function Ss(t,e=!1){const s=g.reactive(t),r=g.ref(ie.Invalid);return g.watch(()=>s.getInputControlsAsArray(),()=>{e||(s.runValidation(),s.getIsValid()?r.value=ie.Valid:r.value=ie.Invalid)},{immediate:!0,deep:!0}),{reactiveForm:s,validationStatus:r}}class $e{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const Ne="150px",Fe=2,ws={path:"id",key:"id",title:"عملیات",colspan:Fe,width:Ne,cellType:ye.ACTION,align:pe.Center,headerType:ge.Text,accessLevel:null},mt={width:Ne,align:pe.Center,headerType:ge.Text,cellType:ye.Text,colspan:Fe};class Ie{constructor(e,s){this.key=e,this.order=s}}class je{aSort(e,s){return e.sort((r,n)=>{const i=r[s]??r,a=n[s]??n;if(typeof i=="string"&&typeof a=="string")return i.localeCompare(a);if(typeof i=="number"&&typeof a=="number")return i-a;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,n)=>{const i=r[s]??r,a=n[s]??n;if(typeof i=="string"&&typeof a=="string")return a.localeCompare(i);if(typeof i=="number"&&typeof a=="number")return a-i;throw new Error("Not supported data type")})}}class Is{arrayOfObjectSort(e,s,r,n=new je){return r===P.ASC?n.aSort(e,s):n.bSort(e,s)}arraySort(e,s,r=new je){return s===P.ASC?r.aSort(e):r.bSort(e)}}class pt{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ie("id",P.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=x.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return Le.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(y.Search)||e.has(y.FetchList)||e.has(y.Sort)||e.has(y.FetchLastItems)||e.has(y.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class E{constructor(e){this.observers=[],this.attach=this.attach.bind(this),this.detach=this.detach.bind(this),this.notify=this.notify.bind(this),this.notifyObject=this.notifyObject.bind(this),this.next=this.next.bind(this),this.getValue=this.getValue.bind(this),this.next(e)}attach(e){this.observers.push(e),this.notifyObject(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)this.notifyObject(e)}notifyObject(e){typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class bs extends pt{constructor(e){super(e),this.selectedRows=new E(new Map),this.rowSelect=this.rowSelect.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.handlePagination=this.handlePagination.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRows=this.getSelectedRows.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}rowSelect(e){this.getSelectedRowsValue().has(e.id)?(this.getSelectedRowsValue().delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function Ds(t){return{...mt,...t}}function As(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function Rs(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function n(c){const l=[],u=s.prototype.actions||[];for(const v of u){if(!v.isAvailable(c))continue;const f={handler:v.handler.bind(c),accessLevel:v.accessLevel,actionName:v.actionName};l.push(f)}return l}async function i(c){s.prototype.rowClick&&await s.prototype.rowClick.call(c)}async function a(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=n,t.prototype.handleClick=i,t.prototype.onDestroy=a}}function Cs(t){return function(s,r,n){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=n.value,s.constructor.prototype.actions.push(t)}}function _s(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function Ms(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}class Es{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class gt{constructor(e){this.rows=new E([]),this.headerSchema=new E([]),this.currentPage=new E(1),this.currentPageSize=new E(20),this.totalItems=new E(0),this.currentSortDetail=new E(new Ie("id",P.DESC)),this.scrollDetail=new E(null),this.isExpandable=new E(!1),this.tableSource=e,this.accessService=x.GetInstance()}async load(){this.rows.next(await this.tableSource.loadRows()),this.headerSchema.next(this.filterItemsBaseOnAccessLevel(await this.tableSource.loadHeaderSchema()))}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage.next(e),this.currentPageSize.next(s),this.rows.next(await this.tableSource.paginate(e,s)))}shouldSendPaginationRequest(e,s){return this.currentPage.getValue()!==e||this.currentPageSize.getValue()!==s}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail.next(e),this.rows.next(await this.tableSource.sort(e)))}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.getValue().key||e.order!==this.currentSortDetail.getValue().order}async handleClick(e){this.tableSource.onRowClick&&await this.tableSource.onRowClick()}async handleMetaClick(e){this.tableSource.onRowMetaClick&&await this.tableSource.onRowMetaClick}async handleDoubleClick(e){this.tableSource.onRowDoubleClick&&await this.tableSource.onRowDoubleClick()}hasAnyAction(){for(const e of this.rows.getValue())if(this.getRowActions(e).length)return!0;return!1}getRowActions(e){return this.filterItemsBaseOnAccessLevel(this.tableSource.loadRowActions(e))}loadSummarySchema(){return this.tableSource.loadSummarySchema?this.tableSource.loadSummarySchema():{summaryTitle:"",summaryItems:[]}}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async onDestroy(){this.tableSource.onTableDestroy()}}class Os extends gt{constructor(e){super(e),this.selectedRows=new E(new Map),this.selectRow=this.selectRow.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}selectRow(e){const s=this.getSelectedRows();s.has(e.id)?(s.delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(s.set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.rows.getValue())this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRows().size===this.currentPageSize.getValue()||this.rows.getValue().length===this.getSelectedRows().size}clearAllSelectedItems(){this.getSelectedRows().clear(),this.selectedRows.next(this.selectedRows.getValue)}getSelectedRows(){return this.selectedRows.getValue()}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}}class Ts{constructor(){this.setCellComponentRegistry=this.setCellComponentRegistry.bind(this),this.getCellComponentRegistry=this.getCellComponentRegistry.bind(this)}setCellComponentRegistry(e){this.cellComponentRegistry=e}getCellComponentRegistry(){return this.cellComponentRegistry}}class Ps{constructor(){this.registeredComponents=new Map}initialize(){this.registerComponents()}getRegisteredComponents(){return this.registeredComponents}}function Ls(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function ks(t){return function(s){async function r(){return s.prototype.headers||[]}t.prototype.loadHeaderSchema=r}}function yt(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function n(p){e.value=p}function i(p){for(const S of p)a(S)}function a(p){t.value.set(p.id,p)}function c(p){return s.value=t.value.get(p)||null,s.value}function l(p){const S=c(p);return S&&t.value.delete(p),!!S}function u(){t.value.clear()}function v(p){s.value=p}function f(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:n,addOrReplaceItems:i,getById:c,removeById:l,clearItems:u,setCurrentItem:v,clearCurrentItem:f}}class St{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ie("id",P.DESC),this.filters=[]}}class Vs{constructor(e,s){this.items=e,this.totalItems=s}}class $s{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const wt=new St;function It(){const t=g.ref(structuredClone(wt));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(f){t.value.pageNumber=f}function n(f){t.value.itemCount=f}function i(f){t.value.sortDetail.key=f.key,t.value.sortDetail.order=f.order}function a(f){for(const p in f)c(p,f[p])}function c(f,p){const S=t.value.filters.findIndex(D=>D.key===f);S>-1?t.value.filters[S].value=p:t.value.filters.push({key:f,value:p})}function l(f){let p=t.value.filters;p=p.filter(S=>S.key!==f),t.value.filters=p}function u(){const f={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(f.by=t.value.sortDetail.key,f.order=t.value.sortDetail.order);for(const p of t.value.filters)if(p.value)if(typeof p.value=="string"||typeof p.value=="number")f[p.key]=p.value;else{const S=JSON.stringify(p.value);S!=="[]"&&S!=="{}"&&(f[p.key]=S)}return f}function v(){t.value=structuredClone(wt)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:n,setSortDetail:i,setFilter:c,removeFilter:l,getRequestParams:u,clearParam:v,setFiltersBaseOnRequestBody:a}}function bt(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(y.FetchList)),s=g.computed(()=>t.value.has(y.FetchItem)),r=g.computed(()=>t.value.has(y.FetchLastItems)),n=g.computed(()=>t.value.has(y.FetchPreviousItems)),i=g.computed(()=>t.value.has(y.Create)),a=g.computed(()=>t.value.has(y.Update)),c=g.computed(()=>t.value.has(y.Delete)),l=g.computed(()=>t.value.has(y.Search)),u=g.computed(()=>t.value.has(y.Sort));function v(p){t.value.add(p)}function f(p){t.value.delete(p)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:n,isCreating:i,isUpdating:a,isDeleting:c,isSearching:l,isSorting:u,setStatus:v,removeStatus:f}}function Ns(t){const e=yt(),s=It(),r=bt(),n=new $e({runAction:async()=>f(y.AutoRefresh)}),i=g.computed(()=>{const h=s.params.value.pageNumber,d=s.params.value.itemCount,m=h*d-d,I=h*d-1,b=[];for(let w=m;w<=I&&e.itemsAsArray.value[w];w++)b.push(e.itemsAsArray.value[w]);return b}),a=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:i.value})),c=g.computed(()=>({getData:u,sort:ae,paginate:Me,fetchRows:f})),l=g.computed(()=>t.getSyncDetail());function u(){return a.value}async function v(h){const d=await t.fetchList(h);return e.clearItems(),e.addOrReplaceItems(d.items),e.setTotalCount(d.totalItems),d}async function f(h=y.FetchList){r.setStatus(h);const d=await v(s.getRequestParams());return r.removeStatus(h),d}async function p(){S(),await f()}function S(){if(!l.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");n.setupInterval(l.value.intervalInMillisecond)}function D(){n.clearInterval()}async function X(h,d=!0){r.setStatus(y.FetchItem),d&&e.clearCurrentItem();const m=await t.fetchItemById(h);return e.setCurrentItem(m),r.removeStatus(y.FetchItem),m}async function Q(h){r.setStatus(y.Create);const d=await t.createItem(h);return d&&e.addOrReplaceItems([d]),r.removeStatus(y.Create),d}async function ee(h,d){r.setStatus(y.Update);const m=await t.updateItem(h,d);return m&&e.addOrReplaceItems([m]),r.removeStatus(y.Update),m}async function te(h){return r.setStatus(y.Delete),await t.deleteItem(h),r.removeStatus(y.Delete),e.removeById(h)}async function Ke(){s.setNextPage(),r.setStatus(y.FetchLastItems);const h=await v(s.getRequestParams());return r.removeStatus(y.FetchLastItems),h}async function Ze(){s.setPreventPage(),r.setStatus(y.FetchPreviousItems);const h=await v(s.getRequestParams());return r.removeStatus(y.FetchPreviousItems),h}async function Me(h){s.setPageNumber(h),r.setStatus(y.FetchList);const d=await v(s.getRequestParams());return r.removeStatus(y.FetchList),d}async function Xe(h){s.setFilter("search",h),r.setStatus(y.Search),e.clearItems();const d=await v(s.getRequestParams());return r.removeStatus(y.Search),d}async function ae(h){s.setSortDetail(h),r.setStatus(y.Sort),e.clearItems();const d=await v(s.getRequestParams());return r.removeStatus(y.Sort),d}async function se(){return s.clearParam(),await f()}return g.onBeforeUnmount(()=>{D()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:a,fetchList:f,fetchWithAutoRefresh:p,setupAutoRefresh:S,stopAutoRefresh:D,fetchItemById:X,createItem:Q,updateItem:ee,deleteItem:te,fetchLastItems:Ke,fetchPreviousItems:Ze,fetchItemsByPageNumber:Me,search:Xe,sort:ae,clearFilters:se,tableService:c,currentPageItems:i}}function Fs(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,n){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function js(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function n(v){e.value=v}function i(v){for(const f of v)a(f)}function a(v){t.value.set(String(v.id),v)}function c(v){const f=l(v);return t.value.delete(String(v)),f}function l(v){return t.value.get(String(v))||null}function u(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:i,removeById:c,getItemById:l,clearItems:u,setTotalCount:n,getTotalCount:s}}class Bs{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function Us(t){return function(e,s,r){const n=r.value;r.value=async function(...i){try{return await n.apply(this,i)}catch(a){for(const c of t)await c.handleError(a)}}}}function Ys(t){return function(e,s,r){const n=r.value;r.value=async function(...i){try{const a=await n.apply(this,i);for(const c of t)c.shouldResolveSuccess(a)&&await c.handleSuccess(a);return a}catch(a){for(const c of t)c.shouldResolveFailure(a)&&await c.handleFailure(a)}}}}class Hs{constructor(e,s,r=()=>!0,n=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=n}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const T=class T{constructor(){}static GetInstance(){return T.instance||(T.instance=new T),T.instance}static registerHandler(e,s){T.handlers.set(e,s)}handle(e){var n;const s=((n=e.response)==null?void 0:n.status)??0,r=T.handlers.get(s);r&&r.handleError(e)}};T.handlers=new Map,T.instance=null;let Be=T;class qs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class zs{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class Js{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const H=class H{constructor(){this.jsonConverter=new _.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return H.Instance||(H.Instance=new H),H.Instance}};H.Instance=null;let Ue=H;var Dt=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(Dt||{}),Ye=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ye||{});class Ws{constructor(e,s,r){this.placement=Ye.BottomLeft,this.type=e,this.message=s,this.description=r}}const Gs=Qe.defineStore(Se.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:k.DefaultWidth,height:k.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(l){t.dialogComponent=l}function n(l){t.header=l}function i(l){if(!e.value)throw new Error("there is no dialog to set props on");t.props=l}function a(l,u){if(!e.value)throw new Error("there is no dialog to set size on");if(l<k.MinimalAvailableSize)throw new Error("negative size not supported");u===k.Width?t.width=l:t.height=l}function c(){t.props=null,t.height=k.DefaultHeight,t.width=k.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:c,setSize:a,setDialogHeader:n,setProps:i,isDialogExists:e,hasDefaultHeader:s}}),xs=Qe.defineStore(Se.Drawer,()=>{const t=g.ref(G.Close),e=g.computed(()=>t.value===G.Open);function s(){t.value=G.Close}function r(){t.value=G.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class Ks{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class Zs{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class Xs{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}if(await this.getDestinationRouteLocation(e,s)){r(await this.getDestinationRouteLocation(e,s));return}r(!1)}async getDestinationRouteName(){return""}async getDestinationRouteLocation(e,s){return null}}class Qs{constructor(e,s,r){this.scheduler=new $e({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class At{}class er extends At{search(e,s,r){const n=[];e:for(const i of e)for(const a of r(i))if(j.removeSpacesFromString(String(a).toLowerCase()).indexOf(j.removeSpacesFromString(String(s).toLowerCase()))>-1){n.push(i);continue e}return n}}var He=(t=>(t.Hidden="hidden",t.Visible="visible",t))(He||{});class tr{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===He.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var sr=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,O=(t,e,s,r)=>{for(var n=r>1?void 0:r?rr(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=(r?a(e,s,n):a(n))||n);return r&&n&&sr(e,s,n),n};o.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},O([_.JsonProperty("value",String,!0)],o.Amount.prototype,"value",2),O([_.JsonProperty("symbol",String)],o.Amount.prototype,"symbol",2),o.Amount=O([_.JsonObject("Amount")],o.Amount),o.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},O([_.JsonProperty("id",Object)],o.BaseModel.prototype,"id",2),o.BaseModel=O([_.JsonObject("BaseModel")],o.BaseModel),o.MinifiedSymbolModel=class extends o.BaseModel{},O([_.JsonProperty("symbol",String)],o.MinifiedSymbolModel.prototype,"symbol",2),O([_.JsonProperty("enName",String)],o.MinifiedSymbolModel.prototype,"enName",2),O([_.JsonProperty("faName",String)],o.MinifiedSymbolModel.prototype,"faName",2),O([_.JsonProperty("image",String)],o.MinifiedSymbolModel.prototype,"image",2),o.MinifiedSymbolModel=O([_.JsonObject("MinifiedSymbolModel")],o.MinifiedSymbolModel);class nr{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return M.mapUnixToDate(this.requestedDate,J.SimpleDate)}get requestedTime(){return M.mapUnixToDate(this.requestedDate,J.JustHour)}get executedDateInJalali(){return M.mapUnixToDate(this.executedDate,J.SimpleDate)}get executedDateTime(){return M.mapUnixToDate(this.executedDate,J.JustHour)}}class ir{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class ar{constructor(e,s,r,n,i){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=n,this.USDTImage=i}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class or{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}var qe;(function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"})(qe||(qe={}));const A=qe;/*! *****************************************************************************
1
+ (function(o,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],C):(o=typeof globalThis<"u"?globalThis:o||self,C(o.IronCore={},o.dayjs,o.Vue,o.json2typescript,o.pinia))})(this,function(o,C,g,_,Qe){"use strict";var le=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(le||{}),J=(t=>(t.FullDate="YYYY/M/D HH:mm",t.SimpleDate="YYYY/M/D",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(J||{});const et=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایران‌زمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],tt=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var st=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(st||{});function ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ue={exports:{}},Pt=ue.exports,rt;function Lt(){return rt||(rt=1,function(t,e){(function(s,r){t.exports=r()})(Pt,function(){return function(s,r){r.prototype.weekday=function(n){var i=this.$locale().weekStart||0,a=this.$W,c=(a<i?a+7:a)-i;return this.$utils().u(n)?c:this.subtract(c,"day").add(n,"day")}}})}(ue)),ue.exports}var kt=Lt();const Vt=ce(kt);var he={exports:{}},$t=he.exports,nt;function Nt(){return nt||(nt=1,function(t,e){(function(s,r){t.exports=r()})($t,function(){var s="week",r="year";return function(n,i,a){var c=i.prototype;c.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var v=a(this).startOf(r).add(1,r).date(u),f=a(this).endOf(s);if(v.isBefore(f))return 1}var p=a(this).startOf(r).date(u).startOf(s).subtract(1,"millisecond"),S=this.diff(p,s,!0);return S<0?a(this).startOf("week").week():Math.ceil(S)},c.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(he)),he.exports}var Ft=Nt();const jt=ce(Ft);var de={exports:{}},Bt=de.exports,it;function Ut(){return it||(it=1,function(t,e){(function(s,r){t.exports=r()})(Bt,function(){return function(s,r){r.prototype.weekYear=function(){var n=this.month(),i=this.week(),a=this.year();return i===1&&n===11?a+1:n===0&&i>=52?a-1:a}}})}(de)),de.exports}var Yt=Ut();const Ht=ce(Yt);var fe={exports:{}},qt=fe.exports,at;function zt(){return at||(at=1,function(t,e){(function(s,r){t.exports=r(C)})(qt,function(s){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var n=r(s),i={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return n.default.locale(i,null,!0),i})}(fe)),fe.exports}var Jt=zt();const Wt=ce(Jt);function ve(t,e){return Gt(t)||xt(t,e)||Kt()}function Gt(t){if(Array.isArray(t))return t}function xt(t,e){var s=[],r=!0,n=!1,i=void 0;try{for(var a=t[Symbol.iterator](),c;!(r=(c=a.next()).done)&&(s.push(c.value),!(e&&s.length===e));r=!0);}catch(l){n=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return s}function Kt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ot(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),n=2-r+Math.floor(r/4),i=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+n-1524.5;return i}function Zt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var n=Math.floor((e-186721625e-2)/36524.25);r=e+1+n-Math.floor(n/4)}var i=r+1524,a=Math.floor((i-122.1)/365.25),c=Math.floor(365.25*a),l=Math.floor((i-c)/30.6001),u=i-c-Math.floor(30.6001*l)+s,v=l<14?l-1:l-13,f=v>2?a-4716:a-4715;return es(f,v,u)}function Xt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var n=Math.floor((e-186721625e-2)/36524.25);r=e+1+n-Math.floor(n/4)}var i=r+1524,a=Math.floor((i-122.1)/365.25),c=Math.floor(365.25*a),l=Math.floor((i-c)/30.6001),u=i-c-Math.floor(30.6001*l)+s,v=l<14?l-1:l-13,f=v>2?a-4716:a-4715;return[Math.floor(f),Math.floor(v),Math.floor(u)]}function Qt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],n=[31,31,31,31,31,31,30,30,30,30,30,29];function i(S,D){return Math.floor(S/D)}t-=979;for(var a=365*t+i(t,33)*8+i(t%33+3,4),c=0;c<e-1;++c)a+=n[c];a+=s-1;var l=a+79,u=1600+400*i(l,146097);l=l%146097;var v=!0;for(l>=36525&&(l--,u+=100*i(l,36524),l=l%36524,l>=365?l++:v=!1),u+=4*i(l,1461),l%=1461,l>=366&&(v=!1,l--,u+=i(l,365),l=l%365),c=0;l>=r[c]+(c==1&&v);c++)l-=r[c]+(c==1&&v);var f=c+1,p=l+1;return ot(u,f,p)}function es(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],n=[31,31,31,31,31,31,30,30,30,30,30,29];function i(ee,te){return Math.floor(ee/te)}for(var a=t-1600,c=e-1,l=s-1,u=365*a+i(a+3,4)-i(a+99,100)+i(a+399,400),v=0;v<c;++v)u+=r[v];c>1&&(t%4==0&&t%100!=0||t%400==0)&&u++,u+=l;var f=u-79,p=i(f,12053);f%=12053;var S=979+33*p+4*i(f,1461);f%=1461,f>=366&&(S+=i(f-1,365),f=(f-1)%365);for(var D=0;D<11&&f>=n[D];++D)f-=n[D];var X=D+1,Q=f+1;return[S,X,Q]}var me={J:function(e,s,r){return Zt(ot(e,s,r))},G:function(e,s,r){return Xt(Qt(e,s,r))}},ts=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,ss=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Pe="date",W="day",$="month",N="year",lt="week",rs="YYYY-MM-DDTHH:mm:ssZ",ns={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},is=function(t,e,s){var r=e.prototype,n=r.$utils(),i=function(d){return d.$C==="jalali"},a=n.prettyUnit||n.p,c=n.isUndefined||n.u,l=n.padStart||n.s,u=n.monthDiff||n.m,v=n.absFloor||n.a,f=function(d){return function(){var m=d.bind(this).apply(void 0,arguments);return m.$C=this.$C,m.isJalali()&&m.InitJalali(),m}};r.startOf=f(r.startOf),r.endOf=f(r.endOf),r.add=f(r.add),r.subtract=f(r.subtract),r.set=f(r.set);var p=r.parse,S=r.init,D=r.startOf,X=r.$set,Q=r.add,ee=r.format,te=r.diff,Ke=r.year,Ze=r.month,Me=r.date,Xe=r.daysInMonth,ae=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(h){return s.$C=h,s},r.calendar=function(h){var d=this.clone();return d.$C=h,d.isJalali()&&d.InitJalali(),d},r.isJalali=function(){return i(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},Wt,{},ns),!0);var se=function(d,m){return s(d,{locale:m.$L,utc:m.$u,calendar:m.$C})};r.init=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(h),this.isJalali()&&this.InitJalali()},r.parse=function(h){var d;if(this.$C=h.calendar||this.$C||s.$C,h.jalali&&typeof h.date=="string"&&/.*[^Z]$/i.test(h.date)&&(d=h.date.match(ts))){var m=me.G(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3]||1,10)),I=ve(m,3),b=I[0],w=I[1],R=I[2];h.date="".concat(b,"-").concat(w,"-").concat(R).concat(d[4]||"")}return p.bind(this)(h)},r.InitJalali=function(){var h=me.J(this.$y,this.$M+1,this.$D),d=ve(h,3),m=d[0],I=d[1],b=d[2];this.$jy=m,this.$jM=I-1,this.$jD=b},r.startOf=function(h,d){var m=this;if(!i(this))return D.bind(this)(h,d);var I=c(d)?!0:d,b=a(h),w=function(re,q){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.$jy,Oe=me.G(L,q+1,re),z=ve(Oe,3),oe=z[0],Te=z[1],kr=z[2],Tt=se(new Date(oe,Te-1,kr),m);return(I?Tt:Tt.endOf(W)).$set("hour",1)},R=(this.$W+(7-s.$fdow))%7;switch(b){case N:return I?w(1,0):w(0,0,this.$jy+1);case $:return I?w(1,this.$jM):w(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case lt:return I?w(this.$jD-R,this.$jM):w(this.$jD+(6-R),this.$jM);default:return D.bind(this)(h,d)}},r.$set=function(h,d){var m=this;if(!i(this))return X.bind(this)(h,d);var I=a(h),b=function(R,Ee){var re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.$jy,q=me.G(re,Ee+1,R),L=ve(q,3),Oe=L[0],z=L[1],oe=L[2];return m.$d.setFullYear(Oe),m.$d.setMonth(z-1),m.$d.setDate(oe),m};switch(I){case Pe:case W:b(d,this.$jM);break;case $:b(this.$jD,d);break;case N:b(this.$jD,this.$jM,d);break;default:return X.bind(this)(h,d)}return this.init(),this},r.add=function(h,d){var m=this;if(!i(this))return Q.bind(this)(h,d);h=Number(h);var I=d&&(d.length===1||d==="ms")?d:a(d),b=function(z,oe){var Te=m.set(Pe,1).set(z,oe+h);return Te.set(Pe,Math.min(m.$jD,Te.daysInMonth()))};if(["M",$].indexOf(I)>-1){var w=this.$jM+h,R=w<0?-Math.ceil(-w/12):Math.floor(w/12),Ee=this.$jD,re=this.set(W,1).add(R,N).set($,w-R*12);return re.set(W,Math.min(re.daysInMonth(),Ee))}if(["y",N].indexOf(I)>-1)return b(N,this.$jy);if(["d",W].indexOf(I)>-1){var q=new Date(this.$d);return q.setDate(q.getDate()+h),se(q,this)}if(["w",lt].indexOf(I)>-1){var L=new Date(this.$d);return L.setDate(L.getDate()+h*7),se(L,this)}return Q.bind(this)(h,d)},r.format=function(h,d){var m=this;if(!i(this))return ee.bind(this)(h,d);var I=h||rs,b=d||this.$locale(),w=b.jmonths;return I.replace(ss,function(R){if(R.indexOf("[")>-1)return R.replace(/\[|\]/g,"");switch(R){case"YY":return String(m.$jy).slice(-2);case"YYYY":return String(m.$jy);case"M":return String(m.$jM+1);case"MM":return l(m.$jM+1,2,"0");case"MMM":return w[m.$jM].slice(0,3);case"MMMM":return w[m.$jM];case"D":return String(m.$jD);case"DD":return l(m.$jD,2,"0");default:return ee.bind(m)(R,d)}})},r.diff=function(h,d,m){if(!i(this))return te.bind(this)(h,d,m);var I=a(d),b=s(h),w=u(this,b);switch(I){case N:w/=12;break;case $:break;default:return te.bind(this)(h,d,m)}return m?w:v(w)},r.$g=function(h,d,m){return c(h)?this[d]:this.set(m,h)},r.year=function(h){return i(this)?this.$g(h,"$jy",N):Ke.bind(this)(h)},r.month=function(h){return i(this)?this.$g(h,"$jM",$):Ze.bind(this)(h)},r.date=function(h){return i(this)?this.$g(h,"$jD",W):Me.bind(this)(h)},r.daysInMonth=function(){return i(this)?this.endOf($).$jD:Xe.bind(this)()},ae&&(r.toArray=function(){return i(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:ae.bind(this)()}),r.clone=function(){return se(this.toDate(),this)}};const as={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function ct(){C.extend(is),C.calendar("jalali"),C.extend(Vt),C.extend(jt),C.extend(Ht),C.locale(as,{},!0)}class os{constructor(e,s){this.start=e,this.end=s}}class ls{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return C.unix(e).endOf("day").unix()}}class ne{static isDateDisabled(e,s){for(const r of e.disabledDates)if(ne.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&ne.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&ne.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}ct();class M{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return M.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",n=0,i=0;for(;n<e.length;){if(e[n]==="#"){if(i>=s.length)throw new Error("Value length does not match the format.");r+=s[i],i++}else r+=e[n];n++}if(i!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return M.applyMask(le.BankCard,String(e))}static applyIbanMask(e){return M.applyMask(le.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],n=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(i=>n[s.indexOf(i)]||n[r.indexOf(i)]||i).join("")}static mapUnixToDate(e,s){return C(new Date(e)).subtract(1,"day").format(s)}}var y=(t=>(t.FetchList="fetchList",t.AutoRefresh="autoRefresh",t.FetchItem="fetchItem",t.FetchLastItems="fetchLastItems",t.FetchPreviousItems="fetchPreviousItems",t.Create="CREATE",t.Update="UPDATE",t.Delete="DELETE",t.Search="SEARCH",t.Sort="SORT",t.Success="SUCCESS",t.Error="ERROR",t.Idle="IDLE",t))(y||{}),k=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(k||{}),P=(t=>(t.ASC="ASC",t.DESC="DESC",t))(P||{}),ut=(t=>(t.ASC="ascend",t.DESC="descend",t))(ut||{}),pe=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(pe||{}),ge=(t=>(t.Text="text",t))(ge||{}),ye=(t=>(t.Text="text",t.ACTION="action",t.Tag="tag",t.Iban="iban",t.BankCard="bankCard",t.Symbol="symbol",t.TradeDetail="tradeDetail",t.SymbolPrice="symbolPrice",t.TradeSymbol="tradeSymbol",t.Price="price",t.DynamicCurrencyPrice="dynamicCurrencyPrice",t.TradeDate="tradeDate",t.RequestResponseIdentity="requestResponseIdentity",t.Image="image",t))(ye||{}),Le=(t=>(t[t.MINIMAL_LOADABLE_HEADER_COUNT=0]="MINIMAL_LOADABLE_HEADER_COUNT",t[t.DEFAULT_ITEM_COUNT_PER_PAGE=20]="DEFAULT_ITEM_COUNT_PER_PAGE",t.PAGINATION_POSITION="bottomCenter",t))(Le||{});o.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(o.ApplicationTheme||{});var G=(t=>(t.Open="open",t.Close="close",t))(G||{}),ht=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(ht||{}),ie=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(ie||{}),V=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(V||{});o.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(o.ApplicationTheme||{});var Se=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(Se||{}),dt=(t=>(t.USDT="USDT",t))(dt||{});class j{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=M.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${j.iban(e).english}.png`):(e=M.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${j.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=et.find(n=>Object.keys(n)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=tt.find(n=>Object.keys(n)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=j.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,n,i,a;return((a=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:a.slice(1,((i=(n=e.headers["content-disposition"])==null?void 0:n.split("filename="))==null?void 0:i[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=n=>n,r=P.ASC){return e.every((n,i)=>e.length-1===i?!0:r===P.ASC?s(n)<=s(e[i+1]):s(n)>=s(e[i+1]))}}const U=class U{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(V.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(V.AccessList)}initialize(){const e=localStorage.getItem(V.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return U.Instance||(U.Instance=new U),U.Instance}};U.Instance=null;let x=U;class ke{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=x.GetInstance()}}class cs extends ke{hasAccess(e){return this.accessService.everyAccess(e)}}class us extends ke{hasAccess(e){return this.accessService.someAccess(e)}}const Y=class Y{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(V.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(V.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(n=>r.has(n)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(n=>r.has(n)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(V.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return Y._instance||(Y._instance=new Y),Y._instance}};Y._instance=null;let we=Y;class Ve{constructor(){this._authorizationService=we.GetInstance(),this.mounted=this.mounted.bind(this),this.updated=this.updated.bind(this),this.hasAccess=this.hasAccess.bind(this),this.manageElement=this.manageElement.bind(this)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const n=this.getAccessLevels(s,r);this.hasAccess(s,n)||e.remove()}getAccessLevels(e,s){var n;let r=Object.keys(s);return r.length||(r=Array.from(((n=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:n.values())??[])),r}}class hs extends Ve{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class ds extends Ve{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class ft{constructor(){this.value=null,this.initialValue=null,this.name="",this.isValid=!1,this.isBlurSensitive=!1,this.isRequired=!1,this.isIncludeInRequestBody=!0,this.isChangeSensitive=!1,this.notValidMessage="",this.isEmptySensitive=!0,this.hasCustomValidationCheck=!1,this.shouldRemoveValidationMessageOnInteract=!1}}function fs(t){return t===1}function vs(t,e){return t-1===e}function vt(t){return String(t).length===0||t===null||t===void 0}function ms(t){t()}class ps{constructor(e,s){this.initialData=null,this.data=new ft,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.hasCustomValidationCheck?!1:this.data.isRequired?!0:!vt(this.data.value)}async runValidation(e=!1){for(const s of this._validators){const r=await s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
2
+ the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){if(e&&this.data.shouldRemoveValidationMessageOnInteract)throw new Error("Input control "+this.getName()+" can not be both change sensitive and remove validation meessage on interact");this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}setHasCustomValidationCheck(e){this.data.hasCustomValidationCheck=e}setShouldRemoveValidationOnInteract(e){if(e&&this.data.isChangeSensitive)throw new Error("Input control "+this.getName()+" can not be both change sensitive and remove validation meessage on interact");this.data.shouldRemoveValidationMessageOnInteract=e}getShouldRemoveValidationOnInteract(){return this.data.shouldRemoveValidationMessageOnInteract}hasCustomValidationCheck(){return this.data.hasCustomValidationCheck}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation(),this.getShouldRemoveValidationOnInteract()&&this.setNotValidMessage("")}get value(){return this.data.value}}class gs{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}setHasCustomValidationCheck(){return this._inputControl.setHasCustomValidationCheck(!0),this}removeErrorOnInteract(){return this._inputControl.setShouldRemoveValidationOnInteract(!0),this}build(){return this._inputControl}}class ys{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class Ss{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}async runValidation(e){let s=!0;for(const r of this.getInputControlsAsArray())if(e&&await r.runValidation(!0),!r.getIsValid()&&(s=!1,!e)){this._isValid=!1;return}this._isValid=s}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function ws(t,e=!1){const s=g.reactive(t),r=g.ref(ie.Invalid);return g.watch(()=>s.getInputControlsAsArray(),()=>{e||(s.runValidation(),s.getIsValid()?r.value=ie.Valid:r.value=ie.Invalid)},{immediate:!0,deep:!0}),{reactiveForm:s,validationStatus:r}}class $e{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const Ne="150px",Fe=2,Is={path:"id",key:"id",title:"عملیات",colspan:Fe,width:Ne,cellType:ye.ACTION,align:pe.Center,headerType:ge.Text,accessLevel:null},mt={width:Ne,align:pe.Center,headerType:ge.Text,cellType:ye.Text,colspan:Fe};class Ie{constructor(e,s){this.key=e,this.order=s}}class je{aSort(e,s){return e.sort((r,n)=>{const i=r[s]??r,a=n[s]??n;if(typeof i=="string"&&typeof a=="string")return i.localeCompare(a);if(typeof i=="number"&&typeof a=="number")return i-a;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,n)=>{const i=r[s]??r,a=n[s]??n;if(typeof i=="string"&&typeof a=="string")return a.localeCompare(i);if(typeof i=="number"&&typeof a=="number")return a-i;throw new Error("Not supported data type")})}}class bs{arrayOfObjectSort(e,s,r,n=new je){return r===P.ASC?n.aSort(e,s):n.bSort(e,s)}arraySort(e,s,r=new je){return s===P.ASC?r.aSort(e):r.bSort(e)}}class pt{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ie("id",P.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=x.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return Le.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(y.Search)||e.has(y.FetchList)||e.has(y.Sort)||e.has(y.FetchLastItems)||e.has(y.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class E{constructor(e){this.observers=[],this.attach=this.attach.bind(this),this.detach=this.detach.bind(this),this.notify=this.notify.bind(this),this.notifyObject=this.notifyObject.bind(this),this.next=this.next.bind(this),this.getValue=this.getValue.bind(this),this.next(e)}attach(e){this.observers.push(e),this.notifyObject(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)this.notifyObject(e)}notifyObject(e){typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class Ds extends pt{constructor(e){super(e),this.selectedRows=new E(new Map),this.rowSelect=this.rowSelect.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.handlePagination=this.handlePagination.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRows=this.getSelectedRows.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}rowSelect(e){this.getSelectedRowsValue().has(e.id)?(this.getSelectedRowsValue().delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function As(t){return{...mt,...t}}function Rs(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function Cs(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function n(c){const l=[],u=s.prototype.actions||[];for(const v of u){if(!v.isAvailable(c))continue;const f={handler:v.handler.bind(c),accessLevel:v.accessLevel,actionName:v.actionName};l.push(f)}return l}async function i(c){s.prototype.rowClick&&await s.prototype.rowClick.call(c)}async function a(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=n,t.prototype.handleClick=i,t.prototype.onDestroy=a}}function _s(t){return function(s,r,n){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=n.value,s.constructor.prototype.actions.push(t)}}function Ms(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function Es(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}class Os{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class gt{constructor(e){this.rows=new E([]),this.headerSchema=new E([]),this.currentPage=new E(1),this.currentPageSize=new E(20),this.totalItems=new E(0),this.currentSortDetail=new E(new Ie("id",P.DESC)),this.scrollDetail=new E(null),this.isExpandable=new E(!1),this.tableSource=e,this.accessService=x.GetInstance()}async load(){this.rows.next(await this.tableSource.loadRows()),this.headerSchema.next(this.filterItemsBaseOnAccessLevel(await this.tableSource.loadHeaderSchema()))}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage.next(e),this.currentPageSize.next(s),this.rows.next(await this.tableSource.paginate(e,s)))}shouldSendPaginationRequest(e,s){return this.currentPage.getValue()!==e||this.currentPageSize.getValue()!==s}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail.next(e),this.rows.next(await this.tableSource.sort(e)))}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.getValue().key||e.order!==this.currentSortDetail.getValue().order}async handleClick(e){this.tableSource.onRowClick&&await this.tableSource.onRowClick()}async handleMetaClick(e){this.tableSource.onRowMetaClick&&await this.tableSource.onRowMetaClick}async handleDoubleClick(e){this.tableSource.onRowDoubleClick&&await this.tableSource.onRowDoubleClick()}hasAnyAction(){for(const e of this.rows.getValue())if(this.getRowActions(e).length)return!0;return!1}getRowActions(e){return this.filterItemsBaseOnAccessLevel(this.tableSource.loadRowActions(e))}loadSummarySchema(){return this.tableSource.loadSummarySchema?this.tableSource.loadSummarySchema():{summaryTitle:"",summaryItems:[]}}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async onDestroy(){this.tableSource.onTableDestroy()}}class Ts extends gt{constructor(e){super(e),this.selectedRows=new E(new Map),this.selectRow=this.selectRow.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}selectRow(e){const s=this.getSelectedRows();s.has(e.id)?(s.delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(s.set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.rows.getValue())this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRows().size===this.currentPageSize.getValue()||this.rows.getValue().length===this.getSelectedRows().size}clearAllSelectedItems(){this.getSelectedRows().clear(),this.selectedRows.next(this.selectedRows.getValue)}getSelectedRows(){return this.selectedRows.getValue()}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}}class Ps{constructor(){this.setCellComponentRegistry=this.setCellComponentRegistry.bind(this),this.getCellComponentRegistry=this.getCellComponentRegistry.bind(this)}setCellComponentRegistry(e){this.cellComponentRegistry=e}getCellComponentRegistry(){return this.cellComponentRegistry}}class Ls{constructor(){this.registeredComponents=new Map}initialize(){this.registerComponents()}getRegisteredComponents(){return this.registeredComponents}}function ks(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function Vs(t){return function(s){async function r(){return s.prototype.headers||[]}t.prototype.loadHeaderSchema=r}}function yt(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function n(p){e.value=p}function i(p){for(const S of p)a(S)}function a(p){t.value.set(p.id,p)}function c(p){return s.value=t.value.get(p)||null,s.value}function l(p){const S=c(p);return S&&t.value.delete(p),!!S}function u(){t.value.clear()}function v(p){s.value=p}function f(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:n,addOrReplaceItems:i,getById:c,removeById:l,clearItems:u,setCurrentItem:v,clearCurrentItem:f}}class St{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ie("id",P.DESC),this.filters=[]}}class $s{constructor(e,s){this.items=e,this.totalItems=s}}class Ns{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const wt=new St;function It(){const t=g.ref(structuredClone(wt));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(f){t.value.pageNumber=f}function n(f){t.value.itemCount=f}function i(f){t.value.sortDetail.key=f.key,t.value.sortDetail.order=f.order}function a(f){for(const p in f)c(p,f[p])}function c(f,p){const S=t.value.filters.findIndex(D=>D.key===f);S>-1?t.value.filters[S].value=p:t.value.filters.push({key:f,value:p})}function l(f){let p=t.value.filters;p=p.filter(S=>S.key!==f),t.value.filters=p}function u(){const f={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(f.by=t.value.sortDetail.key,f.order=t.value.sortDetail.order);for(const p of t.value.filters)if(p.value)if(typeof p.value=="string"||typeof p.value=="number")f[p.key]=p.value;else{const S=JSON.stringify(p.value);S!=="[]"&&S!=="{}"&&(f[p.key]=S)}return f}function v(){t.value=structuredClone(wt)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:n,setSortDetail:i,setFilter:c,removeFilter:l,getRequestParams:u,clearParam:v,setFiltersBaseOnRequestBody:a}}function bt(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(y.FetchList)),s=g.computed(()=>t.value.has(y.FetchItem)),r=g.computed(()=>t.value.has(y.FetchLastItems)),n=g.computed(()=>t.value.has(y.FetchPreviousItems)),i=g.computed(()=>t.value.has(y.Create)),a=g.computed(()=>t.value.has(y.Update)),c=g.computed(()=>t.value.has(y.Delete)),l=g.computed(()=>t.value.has(y.Search)),u=g.computed(()=>t.value.has(y.Sort));function v(p){t.value.add(p)}function f(p){t.value.delete(p)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:n,isCreating:i,isUpdating:a,isDeleting:c,isSearching:l,isSorting:u,setStatus:v,removeStatus:f}}function Fs(t){const e=yt(),s=It(),r=bt(),n=new $e({runAction:async()=>f(y.AutoRefresh)}),i=g.computed(()=>{const h=s.params.value.pageNumber,d=s.params.value.itemCount,m=h*d-d,I=h*d-1,b=[];for(let w=m;w<=I&&e.itemsAsArray.value[w];w++)b.push(e.itemsAsArray.value[w]);return b}),a=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:i.value})),c=g.computed(()=>({getData:u,sort:ae,paginate:Me,fetchRows:f})),l=g.computed(()=>t.getSyncDetail());function u(){return a.value}async function v(h){const d=await t.fetchList(h);return e.clearItems(),e.addOrReplaceItems(d.items),e.setTotalCount(d.totalItems),d}async function f(h=y.FetchList){r.setStatus(h);const d=await v(s.getRequestParams());return r.removeStatus(h),d}async function p(){S(),await f()}function S(){if(!l.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");n.setupInterval(l.value.intervalInMillisecond)}function D(){n.clearInterval()}async function X(h,d=!0){r.setStatus(y.FetchItem),d&&e.clearCurrentItem();const m=await t.fetchItemById(h);return e.setCurrentItem(m),r.removeStatus(y.FetchItem),m}async function Q(h){r.setStatus(y.Create);const d=await t.createItem(h);return d&&e.addOrReplaceItems([d]),r.removeStatus(y.Create),d}async function ee(h,d){r.setStatus(y.Update);const m=await t.updateItem(h,d);return m&&e.addOrReplaceItems([m]),r.removeStatus(y.Update),m}async function te(h){return r.setStatus(y.Delete),await t.deleteItem(h),r.removeStatus(y.Delete),e.removeById(h)}async function Ke(){s.setNextPage(),r.setStatus(y.FetchLastItems);const h=await v(s.getRequestParams());return r.removeStatus(y.FetchLastItems),h}async function Ze(){s.setPreventPage(),r.setStatus(y.FetchPreviousItems);const h=await v(s.getRequestParams());return r.removeStatus(y.FetchPreviousItems),h}async function Me(h){s.setPageNumber(h),r.setStatus(y.FetchList);const d=await v(s.getRequestParams());return r.removeStatus(y.FetchList),d}async function Xe(h){s.setFilter("search",h),r.setStatus(y.Search),e.clearItems();const d=await v(s.getRequestParams());return r.removeStatus(y.Search),d}async function ae(h){s.setSortDetail(h),r.setStatus(y.Sort),e.clearItems();const d=await v(s.getRequestParams());return r.removeStatus(y.Sort),d}async function se(){return s.clearParam(),await f()}return g.onBeforeUnmount(()=>{D()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:a,fetchList:f,fetchWithAutoRefresh:p,setupAutoRefresh:S,stopAutoRefresh:D,fetchItemById:X,createItem:Q,updateItem:ee,deleteItem:te,fetchLastItems:Ke,fetchPreviousItems:Ze,fetchItemsByPageNumber:Me,search:Xe,sort:ae,clearFilters:se,tableService:c,currentPageItems:i}}function js(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,n){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function Bs(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function n(v){e.value=v}function i(v){for(const f of v)a(f)}function a(v){t.value.set(String(v.id),v)}function c(v){const f=l(v);return t.value.delete(String(v)),f}function l(v){return t.value.get(String(v))||null}function u(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:i,removeById:c,getItemById:l,clearItems:u,setTotalCount:n,getTotalCount:s}}class Us{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function Ys(t){return function(e,s,r){const n=r.value;r.value=async function(...i){try{return await n.apply(this,i)}catch(a){for(const c of t)await c.handleError(a)}}}}function Hs(t){return function(e,s,r){const n=r.value;r.value=async function(...i){try{const a=await n.apply(this,i);for(const c of t)c.shouldResolveSuccess(a)&&await c.handleSuccess(a);return a}catch(a){for(const c of t)c.shouldResolveFailure(a)&&await c.handleFailure(a)}}}}class qs{constructor(e,s,r=()=>!0,n=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=n}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const T=class T{constructor(){}static GetInstance(){return T.instance||(T.instance=new T),T.instance}static registerHandler(e,s){T.handlers.set(e,s)}handle(e){var n;const s=((n=e.response)==null?void 0:n.status)??0,r=T.handlers.get(s);r&&r.handleError(e)}};T.handlers=new Map,T.instance=null;let Be=T;class zs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class Js{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class Ws{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const H=class H{constructor(){this.jsonConverter=new _.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return H.Instance||(H.Instance=new H),H.Instance}};H.Instance=null;let Ue=H;var Dt=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(Dt||{}),Ye=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ye||{});class Gs{constructor(e,s,r){this.placement=Ye.BottomLeft,this.type=e,this.message=s,this.description=r}}const xs=Qe.defineStore(Se.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:k.DefaultWidth,height:k.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(l){t.dialogComponent=l}function n(l){t.header=l}function i(l){if(!e.value)throw new Error("there is no dialog to set props on");t.props=l}function a(l,u){if(!e.value)throw new Error("there is no dialog to set size on");if(l<k.MinimalAvailableSize)throw new Error("negative size not supported");u===k.Width?t.width=l:t.height=l}function c(){t.props=null,t.height=k.DefaultHeight,t.width=k.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:c,setSize:a,setDialogHeader:n,setProps:i,isDialogExists:e,hasDefaultHeader:s}}),Ks=Qe.defineStore(Se.Drawer,()=>{const t=g.ref(G.Close),e=g.computed(()=>t.value===G.Open);function s(){t.value=G.Close}function r(){t.value=G.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class Zs{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class Xs{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class Qs{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}if(await this.getDestinationRouteLocation(e,s)){r(await this.getDestinationRouteLocation(e,s));return}r(!1)}async getDestinationRouteName(){return""}async getDestinationRouteLocation(e,s){return null}}class er{constructor(e,s,r){this.scheduler=new $e({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class At{}class tr extends At{search(e,s,r){const n=[];e:for(const i of e)for(const a of r(i))if(j.removeSpacesFromString(String(a).toLowerCase()).indexOf(j.removeSpacesFromString(String(s).toLowerCase()))>-1){n.push(i);continue e}return n}}var He=(t=>(t.Hidden="hidden",t.Visible="visible",t))(He||{});class sr{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===He.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var rr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,O=(t,e,s,r)=>{for(var n=r>1?void 0:r?nr(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=(r?a(e,s,n):a(n))||n);return r&&n&&rr(e,s,n),n};o.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},O([_.JsonProperty("value",String,!0)],o.Amount.prototype,"value",2),O([_.JsonProperty("symbol",String)],o.Amount.prototype,"symbol",2),o.Amount=O([_.JsonObject("Amount")],o.Amount),o.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},O([_.JsonProperty("id",Object)],o.BaseModel.prototype,"id",2),o.BaseModel=O([_.JsonObject("BaseModel")],o.BaseModel),o.MinifiedSymbolModel=class extends o.BaseModel{},O([_.JsonProperty("symbol",String)],o.MinifiedSymbolModel.prototype,"symbol",2),O([_.JsonProperty("enName",String)],o.MinifiedSymbolModel.prototype,"enName",2),O([_.JsonProperty("faName",String)],o.MinifiedSymbolModel.prototype,"faName",2),O([_.JsonProperty("image",String)],o.MinifiedSymbolModel.prototype,"image",2),o.MinifiedSymbolModel=O([_.JsonObject("MinifiedSymbolModel")],o.MinifiedSymbolModel);class ir{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return M.mapUnixToDate(this.requestedDate,J.SimpleDate)}get requestedTime(){return M.mapUnixToDate(this.requestedDate,J.JustHour)}get executedDateInJalali(){return M.mapUnixToDate(this.executedDate,J.SimpleDate)}get executedDateTime(){return M.mapUnixToDate(this.executedDate,J.JustHour)}}class ar{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class or{constructor(e,s,r,n,i){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=n,this.USDTImage=i}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class lr{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}var qe;(function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"})(qe||(qe={}));const A=qe;/*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
@@ -12,6 +12,6 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var ze=function(t,e){return ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var n in r)r.hasOwnProperty(n)&&(s[n]=r[n])},ze(t,e)};function Je(t,e){ze(t,e);function s(){this.constructor=t}t.prototype=e===null?Object.create(e):(s.prototype=e.prototype,new s)}function lr(t,e,s,r){function n(i){return i instanceof s?i:new s(function(a){a(i)})}return new(s||(s=Promise))(function(i,a){function c(v){try{u(r.next(v))}catch(f){a(f)}}function l(v){try{u(r.throw(v))}catch(f){a(f)}}function u(v){v.done?i(v.value):n(v.value).then(c,l)}u((r=r.apply(t,[])).next())})}function cr(t,e){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(v){return l([u,v])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=u[0]&2?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){s=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(u[0]===6&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(v){u=[6,v],n=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function be(t){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&t[e],r=0;if(s)return s.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function De(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var r=s.call(t),n,i=[],a;try{for(;(e===void 0||e-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(c){a={error:c}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}return i}function B(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(De(arguments[e]));return t}var We="injectionTokens";function ur(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],s=Reflect.getOwnMetadata(We,t)||{};return Object.keys(s).forEach(function(r){e[+r]=s[r]}),e}function hr(t,e){return function(s,r,n){var i=Reflect.getOwnMetadata(We,s)||{};i[n]=t,Reflect.defineMetadata(We,i,s)}}function Rt(t){return!!t.useClass}function Ge(t){return!!t.useFactory}var Ct=function(){function t(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(e){var s=this,r={},n=!1,i,a=function(){return n||(i=e(s.wrap()),n=!0),i};return new Proxy(r,this.createHandler(a))},t.prototype.createHandler=function(e){var s={},r=function(n){s[n]=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];i[0]=e();var c=Reflect[n];return c.apply(void 0,B(i))}};return this.reflectMethods.forEach(r),s},t}();function K(t){return typeof t=="string"||typeof t=="symbol"}function dr(t){return typeof t=="object"&&"token"in t&&"multiple"in t}function _t(t){return typeof t=="object"&&"token"in t&&"transform"in t}function fr(t){return typeof t=="function"||t instanceof Ct}function Ae(t){return!!t.useToken}function Re(t){return t.useValue!=null}function vr(t){return Rt(t)||Re(t)||Ae(t)||Ge(t)}var xe=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(e){return this.ensure(e),this._registryMap.get(e)},t.prototype.get=function(e){this.ensure(e);var s=this._registryMap.get(e);return s[s.length-1]||null},t.prototype.set=function(e,s){this.ensure(e),this._registryMap.get(e).push(s)},t.prototype.setAll=function(e,s){this._registryMap.set(e,s)},t.prototype.has=function(e){return this.ensure(e),this._registryMap.get(e).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(e){this._registryMap.has(e)||this._registryMap.set(e,[])},t}(),mr=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),Ce=function(){function t(){this.scopedResolutions=new Map}return t}();function pr(t,e){if(t===null)return"at position #"+e;var s=t.split(",")[e].trim();return'"'+s+'" at position #'+e}function gr(t,e,s){return s===void 0&&(s=" "),B([t],e.message.split(`
15
+ ***************************************************************************** */var ze=function(t,e){return ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var n in r)r.hasOwnProperty(n)&&(s[n]=r[n])},ze(t,e)};function Je(t,e){ze(t,e);function s(){this.constructor=t}t.prototype=e===null?Object.create(e):(s.prototype=e.prototype,new s)}function cr(t,e,s,r){function n(i){return i instanceof s?i:new s(function(a){a(i)})}return new(s||(s=Promise))(function(i,a){function c(v){try{u(r.next(v))}catch(f){a(f)}}function l(v){try{u(r.throw(v))}catch(f){a(f)}}function u(v){v.done?i(v.value):n(v.value).then(c,l)}u((r=r.apply(t,[])).next())})}function ur(t,e){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(v){return l([u,v])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=u[0]&2?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){s=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(u[0]===6&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(v){u=[6,v],n=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function be(t){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&t[e],r=0;if(s)return s.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function De(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var r=s.call(t),n,i=[],a;try{for(;(e===void 0||e-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(c){a={error:c}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}return i}function B(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(De(arguments[e]));return t}var We="injectionTokens";function hr(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],s=Reflect.getOwnMetadata(We,t)||{};return Object.keys(s).forEach(function(r){e[+r]=s[r]}),e}function dr(t,e){return function(s,r,n){var i=Reflect.getOwnMetadata(We,s)||{};i[n]=t,Reflect.defineMetadata(We,i,s)}}function Rt(t){return!!t.useClass}function Ge(t){return!!t.useFactory}var Ct=function(){function t(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(e){var s=this,r={},n=!1,i,a=function(){return n||(i=e(s.wrap()),n=!0),i};return new Proxy(r,this.createHandler(a))},t.prototype.createHandler=function(e){var s={},r=function(n){s[n]=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];i[0]=e();var c=Reflect[n];return c.apply(void 0,B(i))}};return this.reflectMethods.forEach(r),s},t}();function K(t){return typeof t=="string"||typeof t=="symbol"}function fr(t){return typeof t=="object"&&"token"in t&&"multiple"in t}function _t(t){return typeof t=="object"&&"token"in t&&"transform"in t}function vr(t){return typeof t=="function"||t instanceof Ct}function Ae(t){return!!t.useToken}function Re(t){return t.useValue!=null}function mr(t){return Rt(t)||Re(t)||Ae(t)||Ge(t)}var xe=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(e){return this.ensure(e),this._registryMap.get(e)},t.prototype.get=function(e){this.ensure(e);var s=this._registryMap.get(e);return s[s.length-1]||null},t.prototype.set=function(e,s){this.ensure(e),this._registryMap.get(e).push(s)},t.prototype.setAll=function(e,s){this._registryMap.set(e,s)},t.prototype.has=function(e){return this.ensure(e),this._registryMap.get(e).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(e){this._registryMap.has(e)||this._registryMap.set(e,[])},t}(),pr=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),Ce=function(){function t(){this.scopedResolutions=new Map}return t}();function gr(t,e){if(t===null)return"at position #"+e;var s=t.split(",")[e].trim();return'"'+s+'" at position #'+e}function yr(t,e,s){return s===void 0&&(s=" "),B([t],e.message.split(`
16
16
  `).map(function(r){return s+r})).join(`
17
- `)}function yr(t,e,s){var r=De(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2),n=r[1],i=n===void 0?null:n,a=pr(i,e);return gr("Cannot inject the dependency "+a+' of "'+t.name+'" constructor. Reason:',s)}function Sr(t){if(typeof t.dispose!="function")return!1;var e=t.dispose;return!(e.length>0)}var wr=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),Ir=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),br=function(){function t(){this.preResolution=new wr,this.postResolution=new Ir}return t}(),Mt=new Map,Dr=function(){function t(e){this.parent=e,this._registry=new mr,this.interceptors=new br,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(e,s,r){r===void 0&&(r={lifecycle:A.Transient}),this.ensureNotDisposed();var n;if(vr(s)?n=s:n={useClass:s},Ae(n))for(var i=[e],a=n;a!=null;){var c=a.useToken;if(i.includes(c))throw new Error("Token registration cycle detected! "+B(i,[c]).join(" -> "));i.push(c);var l=this._registry.get(c);l&&Ae(l.provider)?a=l.provider:a=null}if((r.lifecycle===A.Singleton||r.lifecycle==A.ContainerScoped||r.lifecycle==A.ResolutionScoped)&&(Re(n)||Ge(n)))throw new Error('Cannot use lifecycle "'+A[r.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(e,{provider:n,options:r}),this},t.prototype.registerType=function(e,s){return this.ensureNotDisposed(),K(s)?this.register(e,{useToken:s}):this.register(e,{useClass:s})},t.prototype.registerInstance=function(e,s){return this.ensureNotDisposed(),this.register(e,{useValue:s})},t.prototype.registerSingleton=function(e,s){if(this.ensureNotDisposed(),K(e)){if(K(s))return this.register(e,{useToken:s},{lifecycle:A.Singleton});if(s)return this.register(e,{useClass:s},{lifecycle:A.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var r=e;return s&&!K(s)&&(r=s),this.register(e,{useClass:r},{lifecycle:A.Singleton})},t.prototype.resolve=function(e,s,r){s===void 0&&(s=new Ce),r===void 0&&(r=!1),this.ensureNotDisposed();var n=this.getRegistration(e);if(!n&&K(e)){if(r)return;throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"Single"),n){var i=this.resolveRegistration(n,s);return this.executePostResolutionInterceptor(e,i,"Single"),i}if(fr(e)){var i=this.construct(e,s);return this.executePostResolutionInterceptor(e,i,"Single"),i}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(e,s){var r,n;if(this.interceptors.preResolution.has(e)){var i=[];try{for(var a=be(this.interceptors.preResolution.getAll(e)),c=a.next();!c.done;c=a.next()){var l=c.value;l.options.frequency!="Once"&&i.push(l),l.callback(e,s)}}catch(u){r={error:u}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.interceptors.preResolution.setAll(e,i)}},t.prototype.executePostResolutionInterceptor=function(e,s,r){var n,i;if(this.interceptors.postResolution.has(e)){var a=[];try{for(var c=be(this.interceptors.postResolution.getAll(e)),l=c.next();!l.done;l=c.next()){var u=l.value;u.options.frequency!="Once"&&a.push(u),u.callback(e,s,r)}}catch(v){n={error:v}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}this.interceptors.postResolution.setAll(e,a)}},t.prototype.resolveRegistration=function(e,s){if(this.ensureNotDisposed(),e.options.lifecycle===A.ResolutionScoped&&s.scopedResolutions.has(e))return s.scopedResolutions.get(e);var r=e.options.lifecycle===A.Singleton,n=e.options.lifecycle===A.ContainerScoped,i=r||n,a;return Re(e.provider)?a=e.provider.useValue:Ae(e.provider)?a=i?e.instance||(e.instance=this.resolve(e.provider.useToken,s)):this.resolve(e.provider.useToken,s):Rt(e.provider)?a=i?e.instance||(e.instance=this.construct(e.provider.useClass,s)):this.construct(e.provider.useClass,s):Ge(e.provider)?a=e.provider.useFactory(this):a=this.construct(e.provider,s),e.options.lifecycle===A.ResolutionScoped&&s.scopedResolutions.set(e,a),a},t.prototype.resolveAll=function(e,s,r){var n=this;s===void 0&&(s=new Ce),r===void 0&&(r=!1),this.ensureNotDisposed();var i=this.getAllRegistrations(e);if(!i&&K(e)){if(r)return[];throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"All"),i){var a=i.map(function(l){return n.resolveRegistration(l,s)});return this.executePostResolutionInterceptor(e,a,"All"),a}var c=[this.construct(e,s)];return this.executePostResolutionInterceptor(e,c,"All"),c},t.prototype.isRegistered=function(e,s){return s===void 0&&(s=!1),this.ensureNotDisposed(),this._registry.has(e)||s&&(this.parent||!1)&&this.parent.isRegistered(e,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var e,s;this.ensureNotDisposed();try{for(var r=be(this._registry.entries()),n=r.next();!n.done;n=r.next()){var i=De(n.value,2),a=i[0],c=i[1];this._registry.setAll(a,c.filter(function(l){return!Re(l.provider)}).map(function(l){return l.instance=void 0,l}))}}catch(l){e={error:l}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(e)throw e.error}}},t.prototype.createChildContainer=function(){var e,s;this.ensureNotDisposed();var r=new t(this);try{for(var n=be(this._registry.entries()),i=n.next();!i.done;i=n.next()){var a=De(i.value,2),c=a[0],l=a[1];l.some(function(u){var v=u.options;return v.lifecycle===A.ContainerScoped})&&r._registry.setAll(c,l.map(function(u){return u.options.lifecycle===A.ContainerScoped?{provider:u.provider,options:u.options}:u}))}}catch(u){e={error:u}}finally{try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}return r},t.prototype.beforeResolution=function(e,s,r){r===void 0&&(r={frequency:"Always"}),this.interceptors.preResolution.set(e,{callback:s,options:r})},t.prototype.afterResolution=function(e,s,r){r===void 0&&(r={frequency:"Always"}),this.interceptors.postResolution.set(e,{callback:s,options:r})},t.prototype.dispose=function(){return lr(this,void 0,void 0,function(){var e;return cr(this,function(s){switch(s.label){case 0:return this.disposed=!0,e=[],this.disposables.forEach(function(r){var n=r.dispose();n&&e.push(n)}),[4,Promise.all(e)];case 1:return s.sent(),[2]}})})},t.prototype.getRegistration=function(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null},t.prototype.getAllRegistrations=function(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null},t.prototype.construct=function(e,s){var r=this;if(e instanceof Ct)return e.createProxy(function(i){return r.resolve(i,s)});var n=function(){var i=Mt.get(e);if(!i||i.length===0){if(e.length===0)return new e;throw new Error('TypeInfo not known for "'+e.name+'"')}var a=i.map(r.resolveParams(s,e));return new(e.bind.apply(e,B([void 0],a)))}();return Sr(n)&&this.disposables.add(n),n},t.prototype.resolveParams=function(e,s){var r=this;return function(n,i){var a,c,l;try{return dr(n)?_t(n)?n.multiple?(a=r.resolve(n.transform)).transform.apply(a,B([r.resolveAll(n.token,new Ce,n.isOptional)],n.transformArgs)):(c=r.resolve(n.transform)).transform.apply(c,B([r.resolve(n.token,e,n.isOptional)],n.transformArgs)):n.multiple?r.resolveAll(n.token,new Ce,n.isOptional):r.resolve(n.token,e,n.isOptional):_t(n)?(l=r.resolve(n.transform,e)).transform.apply(l,B([r.resolve(n.token,e)],n.transformArgs)):r.resolve(n,e)}catch(u){throw new Error(yr(s,i,u))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),Ar=new Dr;function Rr(t,e){var s={token:t,multiple:!1,isOptional:e};return hr(s)}function Cr(t){return function(e){Mt.set(e,ur(e))}}function Et(){return function(t){Cr()(t),Ar.registerSingleton(t)}}if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var _r=Object.getOwnPropertyDescriptor,Mr=(t,e,s,r)=>{for(var n=r>1?void 0:r?_r(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=a(n)||n);return n};o.CustomEventDispatcher=class{dispatchOnWindow(e){window.dispatchEvent(new CustomEvent(e))}dispatchWebSocketOnWindow(e){window.dispatchEvent(e)}},o.CustomEventDispatcher=Mr([Et()],o.CustomEventDispatcher);class _e extends Event{constructor(e){const s=_e.ParseData(e.data);super(s.type),this.getMessageEvent=this.getMessageEvent.bind(this),this.getResult=this.getResult.bind(this),this.messageEvent=e,this.data=s}getMessageEvent(){return this.messageEvent}getResult(){return this.data}static ParseData(e){try{return JSON.parse(e)}catch{return e}}}function Er(t,e=!1){return function(s,r,n){const i=n.value;n.value=function(a){const c=this;if(i.call(c,a),e)for(const l of t)window.removeEventListener(l,n.value)};for(const a of t)window.addEventListener(a,n.value)}}class Or{constructor(e,s){this.type=e,this.data=s}getPayload(){return JSON.stringify({type:this.type,data:this.data})}}var Z=(t=>(t.CLOSE="wsClose",t.OPEN="wsOpen",t.ERROR="wsError",t.TIMEOUT="wsTimeout",t))(Z||{}),Tr=Object.getOwnPropertyDescriptor,Pr=(t,e,s,r)=>{for(var n=r>1?void 0:r?Tr(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=a(n)||n);return n},Lr=(t,e)=>(s,r)=>e(s,r,t);o.WebSocketService=class{constructor(e){this.customEventDispatcher=e,this.webSocket=null,this.retry=3,this.url="",this.protocols=[],this.delayTimeInMillieSeconds=500,this.baseUrl="",this.intervalId=null,this.onOpen=this.onOpen.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),this.onClose=this.onClose.bind(this),this.checkHealth=this.checkHealth.bind(this),this.sendPing=this.sendPing.bind(this),this.reconnect=this.reconnect.bind(this),this.fakeWait=this.fakeWait.bind(this),this.isClosing=this.isClosing.bind(this),this.isClosed=this.isClosed.bind(this),this.connect=this.connect.bind(this),this.registerPingPontInterval=this.registerPingPontInterval.bind(this),this.closeConnection=this.closeConnection.bind(this),this.isConnectionOpen=this.isConnectionOpen.bind(this),this.isConnecting=this.isConnecting.bind(this),this.send=this.send.bind(this),this.setBaseUrl=this.setBaseUrl.bind(this)}connect(e,s=[],r=3){this.webSocket&&(this.webSocket.removeEventListener("open",this.onOpen),this.webSocket.removeEventListener("close",this.onClose),this.webSocket.removeEventListener("error",this.onError)),this.webSocket=new WebSocket(this.baseUrl+e,s),this.retry=r,this.url=e,this.protocols=s,this.webSocket.addEventListener("error",this.onError),this.webSocket.addEventListener("close",this.onClose),this.webSocket.addEventListener("open",this.onOpen),this.checkHealth()}async checkHealth(){try{await this.fakeWait(this.delayTimeInMillieSeconds),!this.isClosed()&&!this.isClosing()&&!this.isConnectionOpen()&&this.sendPing()}catch{this.reconnect()}}sendPing(){this.webSocket.send("PING")}reconnect(){this.retry===0&&this.customEventDispatcher.dispatchOnWindow(Z.TIMEOUT),this.retry>0&&(this.delayTimeInMillieSeconds=this.delayTimeInMillieSeconds*2,this.connect(this.url,this.protocols,--this.retry))}fakeWait(e){return new Promise(s=>{setTimeout(()=>{s(null)},e)})}onError(){this.customEventDispatcher.dispatchOnWindow(Z.ERROR),this.closeConnection()}onOpen(){this.webSocket.addEventListener("message",this.onMessage),this.customEventDispatcher.dispatchOnWindow(Z.OPEN),this.registerPingPontInterval()}registerPingPontInterval(){this.intervalId=setInterval(()=>{this.sendPing()},1e4)}onMessage(e){const s=new _e(e);this.customEventDispatcher.dispatchWebSocketOnWindow(s)}onClose(){this.customEventDispatcher.dispatchOnWindow(Z.CLOSE),this.intervalId&&clearInterval(this.intervalId)}closeConnection(){if(!this.webSocket){console.warn("No connection to close");return}this.webSocket.close()}isConnectionOpen(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===1}isConnecting(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===0}isClosing(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===2}isClosed(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===3}send(e){if(!this.webSocket)throw new Error("NO webSocket to send data");this.webSocket.send(e.getPayload())}setBaseUrl(e){this.baseUrl=e}},o.WebSocketService=Pr([Et(),Lr(0,Rr(o.CustomEventDispatcher))],o.WebSocketService),o.APIErrorHandlerRegistry=Be,o.AbstractSubject=Es,o.AccessControl=ke,o.AccessLevel=x,o.Action=Cs,o.ApiBuilder=qs,o.ApplicationDrawerStatus=G,o.ApplicationInitializer=Js,o.AuthorizationDirective=Ve,o.AuthorizationService=we,o.BaseTable=pt,o.BehaviorSubject=E,o.CellType=ye,o.ClientArraySearch=er,o.ClientSearch=At,o.Column=As,o.CommonMaskFormats=le,o.CrudService=Qs,o.DateConverter=F,o.DateDisabledOptions=os,o.DateFormat=J,o.DateFormats=st,o.DateTools=ne,o.DebounceService=Bs,o.DialogDimensions=k,o.EveryAccess=ls,o.EveryLevelAuthorizationDirective=us,o.Feedback=Hs,o.FetchListResponse=Vs,o.FormManager=ys,o.FormValidationStatus=ie,o.Formatter=M,o.GColumn=Ls,o.GTable=ks,o.HandleError=Us,o.HandleFeedback=Ys,o.HeaderType=ge,o.HttpClient=zs,o.InputControl=ms,o.InputControlBuilder=ps,o.InputControlData=ft,o.JsonMapper=Ue,o.LoadingStatus=y,o.OnEvent=Er,o.Params=St,o.Process=Zs,o.ProcessManager=Ks,o.RangeValue=as,o.RouteGuard=Xs,o.Scheduler=$e,o.SelectableTable=bs,o.SelectableTableGenerator=Os,o.SimpleSort=je,o.SomeAccess=cs,o.SomeLevelsAuthorizationDirective=hs,o.SortDetail=Ie,o.SortOrder=P,o.SortOrderTableHeader=ut,o.Sorter=Is,o.StatusCode=ht,o.StorageKeys=V,o.StoreNames=Se,o.SymbolInTrade=or,o.SymbolPriceInTrade=ar,o.Symbols=dt,o.SyncDetail=$s,o.TABLE_ACTION_COLUMN=ws,o.TABLE_COLUMN_DEFAULT_COLSPAN=Fe,o.TABLE_COLUMN_DEFAULT_VALUES=mt,o.TABLE_COLUMN_DEFAULT_WIDTH=Ne,o.Table=Rs,o.TableCellComponentRegistry=Ps,o.TableConfig=Ts,o.TableConstants=Le,o.TableDestroy=_s,o.TableGenerator=gt,o.TableHeaderAlign=pe,o.TableRowClick=Ms,o.ToastLocation=Ye,o.ToastMessage=Ws,o.ToastType=Dt,o.TouchSensitiveControl=gs,o.TradeAmount=ir,o.TradeDate=nr,o.Util=j,o.VisibilityManager=tr,o.VisibilityState=He,o.WebSocketEvent=_e,o.WebSocketEvents=Z,o.WebSocketPostMessage=Or,o.cards=et,o.generateHeader=Ds,o.ibans=tt,o.isEmpty=vt,o.isLastItem=fs,o.isOnlyOneItem=ds,o.setupJalaliDate=ct,o.setupStore=vs,o.useCrud=js,o.useData=yt,o.useDialogService=Gs,o.useDrawerService=xs,o.useForm=Ss,o.useLoadingStatus=bt,o.useParams=It,o.useRepository=Ns,o.useStaticTableService=Fs,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
17
+ `)}function Sr(t,e,s){var r=De(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2),n=r[1],i=n===void 0?null:n,a=gr(i,e);return yr("Cannot inject the dependency "+a+' of "'+t.name+'" constructor. Reason:',s)}function wr(t){if(typeof t.dispose!="function")return!1;var e=t.dispose;return!(e.length>0)}var Ir=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),br=function(t){Je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(xe),Dr=function(){function t(){this.preResolution=new Ir,this.postResolution=new br}return t}(),Mt=new Map,Ar=function(){function t(e){this.parent=e,this._registry=new pr,this.interceptors=new Dr,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(e,s,r){r===void 0&&(r={lifecycle:A.Transient}),this.ensureNotDisposed();var n;if(mr(s)?n=s:n={useClass:s},Ae(n))for(var i=[e],a=n;a!=null;){var c=a.useToken;if(i.includes(c))throw new Error("Token registration cycle detected! "+B(i,[c]).join(" -> "));i.push(c);var l=this._registry.get(c);l&&Ae(l.provider)?a=l.provider:a=null}if((r.lifecycle===A.Singleton||r.lifecycle==A.ContainerScoped||r.lifecycle==A.ResolutionScoped)&&(Re(n)||Ge(n)))throw new Error('Cannot use lifecycle "'+A[r.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(e,{provider:n,options:r}),this},t.prototype.registerType=function(e,s){return this.ensureNotDisposed(),K(s)?this.register(e,{useToken:s}):this.register(e,{useClass:s})},t.prototype.registerInstance=function(e,s){return this.ensureNotDisposed(),this.register(e,{useValue:s})},t.prototype.registerSingleton=function(e,s){if(this.ensureNotDisposed(),K(e)){if(K(s))return this.register(e,{useToken:s},{lifecycle:A.Singleton});if(s)return this.register(e,{useClass:s},{lifecycle:A.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var r=e;return s&&!K(s)&&(r=s),this.register(e,{useClass:r},{lifecycle:A.Singleton})},t.prototype.resolve=function(e,s,r){s===void 0&&(s=new Ce),r===void 0&&(r=!1),this.ensureNotDisposed();var n=this.getRegistration(e);if(!n&&K(e)){if(r)return;throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"Single"),n){var i=this.resolveRegistration(n,s);return this.executePostResolutionInterceptor(e,i,"Single"),i}if(vr(e)){var i=this.construct(e,s);return this.executePostResolutionInterceptor(e,i,"Single"),i}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(e,s){var r,n;if(this.interceptors.preResolution.has(e)){var i=[];try{for(var a=be(this.interceptors.preResolution.getAll(e)),c=a.next();!c.done;c=a.next()){var l=c.value;l.options.frequency!="Once"&&i.push(l),l.callback(e,s)}}catch(u){r={error:u}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.interceptors.preResolution.setAll(e,i)}},t.prototype.executePostResolutionInterceptor=function(e,s,r){var n,i;if(this.interceptors.postResolution.has(e)){var a=[];try{for(var c=be(this.interceptors.postResolution.getAll(e)),l=c.next();!l.done;l=c.next()){var u=l.value;u.options.frequency!="Once"&&a.push(u),u.callback(e,s,r)}}catch(v){n={error:v}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}this.interceptors.postResolution.setAll(e,a)}},t.prototype.resolveRegistration=function(e,s){if(this.ensureNotDisposed(),e.options.lifecycle===A.ResolutionScoped&&s.scopedResolutions.has(e))return s.scopedResolutions.get(e);var r=e.options.lifecycle===A.Singleton,n=e.options.lifecycle===A.ContainerScoped,i=r||n,a;return Re(e.provider)?a=e.provider.useValue:Ae(e.provider)?a=i?e.instance||(e.instance=this.resolve(e.provider.useToken,s)):this.resolve(e.provider.useToken,s):Rt(e.provider)?a=i?e.instance||(e.instance=this.construct(e.provider.useClass,s)):this.construct(e.provider.useClass,s):Ge(e.provider)?a=e.provider.useFactory(this):a=this.construct(e.provider,s),e.options.lifecycle===A.ResolutionScoped&&s.scopedResolutions.set(e,a),a},t.prototype.resolveAll=function(e,s,r){var n=this;s===void 0&&(s=new Ce),r===void 0&&(r=!1),this.ensureNotDisposed();var i=this.getAllRegistrations(e);if(!i&&K(e)){if(r)return[];throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"All"),i){var a=i.map(function(l){return n.resolveRegistration(l,s)});return this.executePostResolutionInterceptor(e,a,"All"),a}var c=[this.construct(e,s)];return this.executePostResolutionInterceptor(e,c,"All"),c},t.prototype.isRegistered=function(e,s){return s===void 0&&(s=!1),this.ensureNotDisposed(),this._registry.has(e)||s&&(this.parent||!1)&&this.parent.isRegistered(e,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var e,s;this.ensureNotDisposed();try{for(var r=be(this._registry.entries()),n=r.next();!n.done;n=r.next()){var i=De(n.value,2),a=i[0],c=i[1];this._registry.setAll(a,c.filter(function(l){return!Re(l.provider)}).map(function(l){return l.instance=void 0,l}))}}catch(l){e={error:l}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(e)throw e.error}}},t.prototype.createChildContainer=function(){var e,s;this.ensureNotDisposed();var r=new t(this);try{for(var n=be(this._registry.entries()),i=n.next();!i.done;i=n.next()){var a=De(i.value,2),c=a[0],l=a[1];l.some(function(u){var v=u.options;return v.lifecycle===A.ContainerScoped})&&r._registry.setAll(c,l.map(function(u){return u.options.lifecycle===A.ContainerScoped?{provider:u.provider,options:u.options}:u}))}}catch(u){e={error:u}}finally{try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}return r},t.prototype.beforeResolution=function(e,s,r){r===void 0&&(r={frequency:"Always"}),this.interceptors.preResolution.set(e,{callback:s,options:r})},t.prototype.afterResolution=function(e,s,r){r===void 0&&(r={frequency:"Always"}),this.interceptors.postResolution.set(e,{callback:s,options:r})},t.prototype.dispose=function(){return cr(this,void 0,void 0,function(){var e;return ur(this,function(s){switch(s.label){case 0:return this.disposed=!0,e=[],this.disposables.forEach(function(r){var n=r.dispose();n&&e.push(n)}),[4,Promise.all(e)];case 1:return s.sent(),[2]}})})},t.prototype.getRegistration=function(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null},t.prototype.getAllRegistrations=function(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null},t.prototype.construct=function(e,s){var r=this;if(e instanceof Ct)return e.createProxy(function(i){return r.resolve(i,s)});var n=function(){var i=Mt.get(e);if(!i||i.length===0){if(e.length===0)return new e;throw new Error('TypeInfo not known for "'+e.name+'"')}var a=i.map(r.resolveParams(s,e));return new(e.bind.apply(e,B([void 0],a)))}();return wr(n)&&this.disposables.add(n),n},t.prototype.resolveParams=function(e,s){var r=this;return function(n,i){var a,c,l;try{return fr(n)?_t(n)?n.multiple?(a=r.resolve(n.transform)).transform.apply(a,B([r.resolveAll(n.token,new Ce,n.isOptional)],n.transformArgs)):(c=r.resolve(n.transform)).transform.apply(c,B([r.resolve(n.token,e,n.isOptional)],n.transformArgs)):n.multiple?r.resolveAll(n.token,new Ce,n.isOptional):r.resolve(n.token,e,n.isOptional):_t(n)?(l=r.resolve(n.transform,e)).transform.apply(l,B([r.resolve(n.token,e)],n.transformArgs)):r.resolve(n,e)}catch(u){throw new Error(Sr(s,i,u))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),Et=new Ar;function Rr(t,e){var s={token:t,multiple:!1,isOptional:e};return dr(s)}function Cr(t){return function(e){Mt.set(e,hr(e))}}function Ot(){return function(t){Cr()(t),Et.registerSingleton(t)}}if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var _r=Object.getOwnPropertyDescriptor,Mr=(t,e,s,r)=>{for(var n=r>1?void 0:r?_r(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=a(n)||n);return n};o.CustomEventDispatcher=class{dispatchOnWindow(e){window.dispatchEvent(new CustomEvent(e))}dispatchWebSocketOnWindow(e){window.dispatchEvent(e)}},o.CustomEventDispatcher=Mr([Ot()],o.CustomEventDispatcher);class _e extends Event{constructor(e){const s=_e.ParseData(e.data);super(s.type),this.getMessageEvent=this.getMessageEvent.bind(this),this.getResult=this.getResult.bind(this),this.messageEvent=e,this.data=s}getMessageEvent(){return this.messageEvent}getResult(){return this.data}static ParseData(e){try{return JSON.parse(e)}catch{return e}}}function Er(t,e=!1){return function(s,r,n){const i=n.value;n.value=function(a){if(console.log("the container",Et.resolve(s.constructor)),i(a),e)for(const c of t)window.removeEventListener(c,n.value)};for(const a of t)window.addEventListener(a,n.value)}}class Or{constructor(e,s){this.type=e,this.data=s}getPayload(){return JSON.stringify({type:this.type,data:this.data})}}var Z=(t=>(t.CLOSE="wsClose",t.OPEN="wsOpen",t.ERROR="wsError",t.TIMEOUT="wsTimeout",t))(Z||{}),Tr=Object.getOwnPropertyDescriptor,Pr=(t,e,s,r)=>{for(var n=r>1?void 0:r?Tr(e,s):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(n=a(n)||n);return n},Lr=(t,e)=>(s,r)=>e(s,r,t);o.WebSocketService=class{constructor(e){this.customEventDispatcher=e,this.webSocket=null,this.retry=3,this.url="",this.protocols=[],this.delayTimeInMillieSeconds=500,this.baseUrl="",this.intervalId=null,this.onOpen=this.onOpen.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),this.onClose=this.onClose.bind(this),this.checkHealth=this.checkHealth.bind(this),this.sendPing=this.sendPing.bind(this),this.reconnect=this.reconnect.bind(this),this.fakeWait=this.fakeWait.bind(this),this.isClosing=this.isClosing.bind(this),this.isClosed=this.isClosed.bind(this),this.connect=this.connect.bind(this),this.registerPingPontInterval=this.registerPingPontInterval.bind(this),this.closeConnection=this.closeConnection.bind(this),this.isConnectionOpen=this.isConnectionOpen.bind(this),this.isConnecting=this.isConnecting.bind(this),this.send=this.send.bind(this),this.setBaseUrl=this.setBaseUrl.bind(this)}connect(e,s=[],r=3){this.webSocket&&(this.webSocket.removeEventListener("open",this.onOpen),this.webSocket.removeEventListener("close",this.onClose),this.webSocket.removeEventListener("error",this.onError)),this.webSocket=new WebSocket(this.baseUrl+e,s),this.retry=r,this.url=e,this.protocols=s,this.webSocket.addEventListener("error",this.onError),this.webSocket.addEventListener("close",this.onClose),this.webSocket.addEventListener("open",this.onOpen),this.checkHealth()}async checkHealth(){try{await this.fakeWait(this.delayTimeInMillieSeconds),!this.isClosed()&&!this.isClosing()&&!this.isConnectionOpen()&&this.sendPing()}catch{this.reconnect()}}sendPing(){this.webSocket.send("PING")}reconnect(){this.retry===0&&this.customEventDispatcher.dispatchOnWindow(Z.TIMEOUT),this.retry>0&&(this.delayTimeInMillieSeconds=this.delayTimeInMillieSeconds*2,this.connect(this.url,this.protocols,--this.retry))}fakeWait(e){return new Promise(s=>{setTimeout(()=>{s(null)},e)})}onError(){this.customEventDispatcher.dispatchOnWindow(Z.ERROR),this.closeConnection()}onOpen(){this.webSocket.addEventListener("message",this.onMessage),this.customEventDispatcher.dispatchOnWindow(Z.OPEN),this.registerPingPontInterval()}registerPingPontInterval(){this.intervalId=setInterval(()=>{this.sendPing()},1e4)}onMessage(e){const s=new _e(e);this.customEventDispatcher.dispatchWebSocketOnWindow(s)}onClose(){this.customEventDispatcher.dispatchOnWindow(Z.CLOSE),this.intervalId&&clearInterval(this.intervalId)}closeConnection(){if(!this.webSocket){console.warn("No connection to close");return}this.webSocket.close()}isConnectionOpen(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===1}isConnecting(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===0}isClosing(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===2}isClosed(){var e;return((e=this.webSocket)==null?void 0:e.readyState)===3}send(e){if(!this.webSocket)throw new Error("NO webSocket to send data");this.webSocket.send(e.getPayload())}setBaseUrl(e){this.baseUrl=e}},o.WebSocketService=Pr([Ot(),Lr(0,Rr(o.CustomEventDispatcher))],o.WebSocketService),o.APIErrorHandlerRegistry=Be,o.AbstractSubject=Os,o.AccessControl=ke,o.AccessLevel=x,o.Action=_s,o.ApiBuilder=zs,o.ApplicationDrawerStatus=G,o.ApplicationInitializer=Ws,o.AuthorizationDirective=Ve,o.AuthorizationService=we,o.BaseTable=pt,o.BehaviorSubject=E,o.CellType=ye,o.ClientArraySearch=tr,o.ClientSearch=At,o.Column=Rs,o.CommonMaskFormats=le,o.CrudService=er,o.DateConverter=F,o.DateDisabledOptions=ls,o.DateFormat=J,o.DateFormats=st,o.DateTools=ne,o.DebounceService=Us,o.DialogDimensions=k,o.EveryAccess=cs,o.EveryLevelAuthorizationDirective=hs,o.Feedback=qs,o.FetchListResponse=$s,o.FormManager=Ss,o.FormValidationStatus=ie,o.Formatter=M,o.GColumn=ks,o.GTable=Vs,o.HandleError=Ys,o.HandleFeedback=Hs,o.HeaderType=ge,o.HttpClient=Js,o.InputControl=ps,o.InputControlBuilder=gs,o.InputControlData=ft,o.JsonMapper=Ue,o.LoadingStatus=y,o.OnEvent=Er,o.Params=St,o.Process=Xs,o.ProcessManager=Zs,o.RangeValue=os,o.RouteGuard=Qs,o.Scheduler=$e,o.SelectableTable=Ds,o.SelectableTableGenerator=Ts,o.SimpleSort=je,o.SomeAccess=us,o.SomeLevelsAuthorizationDirective=ds,o.SortDetail=Ie,o.SortOrder=P,o.SortOrderTableHeader=ut,o.Sorter=bs,o.StatusCode=ht,o.StorageKeys=V,o.StoreNames=Se,o.SymbolInTrade=lr,o.SymbolPriceInTrade=or,o.Symbols=dt,o.SyncDetail=Ns,o.TABLE_ACTION_COLUMN=Is,o.TABLE_COLUMN_DEFAULT_COLSPAN=Fe,o.TABLE_COLUMN_DEFAULT_VALUES=mt,o.TABLE_COLUMN_DEFAULT_WIDTH=Ne,o.Table=Cs,o.TableCellComponentRegistry=Ls,o.TableConfig=Ps,o.TableConstants=Le,o.TableDestroy=Ms,o.TableGenerator=gt,o.TableHeaderAlign=pe,o.TableRowClick=Es,o.ToastLocation=Ye,o.ToastMessage=Gs,o.ToastType=Dt,o.TouchSensitiveControl=ys,o.TradeAmount=ar,o.TradeDate=ir,o.Util=j,o.VisibilityManager=sr,o.VisibilityState=He,o.WebSocketEvent=_e,o.WebSocketEvents=Z,o.WebSocketPostMessage=Or,o.cards=et,o.generateHeader=As,o.ibans=tt,o.isEmpty=vt,o.isLastItem=vs,o.isOnlyOneItem=fs,o.setupJalaliDate=ct,o.setupStore=ms,o.useCrud=Bs,o.useData=yt,o.useDialogService=xs,o.useDrawerService=Ks,o.useForm=ws,o.useLoadingStatus=bt,o.useParams=It,o.useRepository=Fs,o.useStaticTableService=js,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- export declare function OnEvent(eventsToSubscribe: string[], unSubscribeAfterRun?: boolean): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
1
+ export declare function OnEvent(eventsToSubscribe: string[], unSubscribeAfterRun?: boolean): (target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sarafapp/iron_core",
3
3
  "private": false,
4
- "version": "1.0.53",
4
+ "version": "1.0.55",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"