sprof 0.0.31 → 0.0.33

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/sprof.js CHANGED
@@ -315,9 +315,9 @@ var Rs;
315
315
  throw new TypeError();
316
316
  if (!he(C))
317
317
  throw new TypeError();
318
- if (!he(F) && !j(F) && !It(F))
318
+ if (!he(F) && !j(F) && !kt(F))
319
319
  throw new TypeError();
320
- return It(F) && (F = void 0), k = Qe(k), ba(b, C, k, F);
320
+ return kt(F) && (F = void 0), k = Qe(k), ba(b, C, k, F);
321
321
  }
322
322
  }
323
323
  e("decorate", Y);
@@ -362,12 +362,12 @@ var Rs;
362
362
  return j(k) || (k = Qe(k)), hs(b, C, k);
363
363
  }
364
364
  e("getOwnMetadata", ht);
365
- function kt(b, C) {
365
+ function Mt(b, C) {
366
366
  if (!he(b))
367
367
  throw new TypeError();
368
368
  return j(C) || (C = Qe(C)), ms(b, C);
369
369
  }
370
- e("getMetadataKeys", kt);
370
+ e("getMetadataKeys", Mt);
371
371
  function hi(b, C) {
372
372
  if (!he(b))
373
373
  throw new TypeError();
@@ -392,7 +392,7 @@ var Rs;
392
392
  function wa(b, C) {
393
393
  for (var k = b.length - 1; k >= 0; --k) {
394
394
  var F = b[k], W = F(C);
395
- if (!j(W) && !It(W)) {
395
+ if (!j(W) && !kt(W)) {
396
396
  if (!ws(W))
397
397
  throw new TypeError();
398
398
  C = W;
@@ -403,7 +403,7 @@ var Rs;
403
403
  function ba(b, C, k, F) {
404
404
  for (var W = b.length - 1; W >= 0; --W) {
405
405
  var ye = b[W], fe = ye(C, k, F);
406
- if (!j(fe) && !It(fe)) {
406
+ if (!j(fe) && !kt(fe)) {
407
407
  if (!he(fe))
408
408
  throw new TypeError();
409
409
  F = fe;
@@ -416,7 +416,7 @@ var Rs;
416
416
  if (F)
417
417
  return !0;
418
418
  var W = an(C);
419
- return It(W) ? !1 : cs(b, W, k);
419
+ return kt(W) ? !1 : cs(b, W, k);
420
420
  }
421
421
  function rn(b, C, k) {
422
422
  var F = _t(
@@ -432,7 +432,7 @@ var Rs;
432
432
  if (F)
433
433
  return hs(b, C, k);
434
434
  var W = an(C);
435
- if (!It(W))
435
+ if (!kt(W))
436
436
  return ds(b, W, k);
437
437
  }
438
438
  function hs(b, C, k) {
@@ -505,7 +505,7 @@ var Rs;
505
505
  function j(b) {
506
506
  return b === void 0;
507
507
  }
508
- function It(b) {
508
+ function kt(b) {
509
509
  return b === null;
510
510
  }
511
511
  function Sa(b) {
@@ -1077,7 +1077,7 @@ function $e(t, e, i) {
1077
1077
  const n = t.random || (t.rng || ol)();
1078
1078
  return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, al(n);
1079
1079
  }
1080
- const vt = class vt {
1080
+ const gt = class gt {
1081
1081
  static BuildClass(e, i) {
1082
1082
  i && Object.keys(i).forEach((n) => {
1083
1083
  const s = i[n];
@@ -1100,13 +1100,13 @@ const vt = class vt {
1100
1100
  return e !== null && typeof e < "u" && e !== Object(e);
1101
1101
  }
1102
1102
  static RemoveFromClassByIndex(e, i, n) {
1103
- vt.RemoveFromClass(e, i, n);
1103
+ gt.RemoveFromClass(e, i, n);
1104
1104
  }
1105
1105
  static RemoveFromClassById(e, i, n) {
1106
1106
  if (!e)
1107
1107
  return;
1108
1108
  const s = i.findIndex((r) => r.id === e);
1109
- vt.RemoveFromClass(s, i, n);
1109
+ gt.RemoveFromClass(s, i, n);
1110
1110
  }
1111
1111
  static RemoveFromClass(e, i, n) {
1112
1112
  if (e < 0)
@@ -1127,17 +1127,17 @@ const vt = class vt {
1127
1127
  }
1128
1128
  static InitClassInstance(e, i) {
1129
1129
  const n = e.constructor(i);
1130
- return vt.BuildClass(n), n.id = vt.CreateUUID(), n;
1130
+ return gt.BuildClass(n), n.id = gt.CreateUUID(), n;
1131
1131
  }
1132
1132
  static ExistsWithId(e, i) {
1133
1133
  return e.some((n) => n.id === i);
1134
1134
  }
1135
1135
  };
1136
- a(vt, "GetClassConstructor", (e) => (i, n) => {
1136
+ a(gt, "GetClassConstructor", (e) => (i, n) => {
1137
1137
  const s = Reflect.getMetadata(`property:${n}`, i) || {};
1138
1138
  s[n] = e, Reflect.defineMetadata(n, s, i);
1139
1139
  });
1140
- let R = vt;
1140
+ let R = gt;
1141
1141
  const ul = { class: "item" }, cl = { class: "move" }, dl = { class: "item-tools" }, hl = ["onClick"], fl = { class: "item-description" }, ml = ["onUpdate:modelValue"], pl = /* @__PURE__ */ $({
1142
1142
  __name: "AdminGallery",
1143
1143
  props: {
@@ -1774,7 +1774,7 @@ const un = /* @__PURE__ */ new WeakMap(), Bl = (t, e) => {
1774
1774
  ], 4)
1775
1775
  ], 4));
1776
1776
  }
1777
- }), xt = /* @__PURE__ */ E(Wl, [["__scopeId", "data-v-3e6801ac"]]), Vl = ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"], Gl = "ru-RU";
1777
+ }), Ct = /* @__PURE__ */ E(Wl, [["__scopeId", "data-v-3e6801ac"]]), Vl = ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"], Gl = "ru-RU";
1778
1778
  class lt {
1779
1779
  constructor() {
1780
1780
  a(this, "locale", "ru-RU");
@@ -2979,7 +2979,7 @@ function Dr(t, e) {
2979
2979
  return s;
2980
2980
  return null;
2981
2981
  }
2982
- const yt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, zr = (t) => !ti(t) && t !== yt;
2982
+ const vt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, zr = (t) => !ti(t) && t !== vt;
2983
2983
  function kn() {
2984
2984
  const { caseless: t } = zr(this) && this || {}, e = {}, i = (n, s) => {
2985
2985
  const r = t && Dr(e, s) || s;
@@ -3096,14 +3096,14 @@ const ec = (t) => {
3096
3096
  return n;
3097
3097
  };
3098
3098
  return i(t, 0);
3099
- }, tc = Je("AsyncFunction"), ic = (t) => t && (Gi(t) || Be(t)) && Be(t.then) && Be(t.catch), Nr = ((t, e) => t ? setImmediate : e ? ((i, n) => (yt.addEventListener("message", ({ source: s, data: r }) => {
3100
- s === yt && r === i && n.length && n.shift()();
3099
+ }, tc = Je("AsyncFunction"), ic = (t) => t && (Gi(t) || Be(t)) && Be(t.then) && Be(t.catch), Nr = ((t, e) => t ? setImmediate : e ? ((i, n) => (vt.addEventListener("message", ({ source: s, data: r }) => {
3100
+ s === vt && r === i && n.length && n.shift()();
3101
3101
  }, !1), (s) => {
3102
- n.push(s), yt.postMessage(i, "*");
3102
+ n.push(s), vt.postMessage(i, "*");
3103
3103
  }))(`axios@${Math.random()}`, []) : (i) => setTimeout(i))(
3104
3104
  typeof setImmediate == "function",
3105
- Be(yt.postMessage)
3106
- ), nc = typeof queueMicrotask < "u" ? queueMicrotask.bind(yt) : typeof process < "u" && process.nextTick || Nr, x = {
3105
+ Be(vt.postMessage)
3106
+ ), nc = typeof queueMicrotask < "u" ? queueMicrotask.bind(vt) : typeof process < "u" && process.nextTick || Nr, x = {
3107
3107
  isArray: Wt,
3108
3108
  isArrayBuffer: Fr,
3109
3109
  isBuffer: bu,
@@ -3152,7 +3152,7 @@ const ec = (t) => {
3152
3152
  noop: Ju,
3153
3153
  toFiniteNumber: Xu,
3154
3154
  findKey: Dr,
3155
- global: yt,
3155
+ global: vt,
3156
3156
  isContextDefined: zr,
3157
3157
  ALPHABET: Br,
3158
3158
  generateString: Qu,
@@ -3871,7 +3871,7 @@ function Yr(t, e) {
3871
3871
  return t && !Pc(e) ? Tc(t, e) : e;
3872
3872
  }
3873
3873
  const js = (t) => t instanceof Le ? { ...t } : t;
3874
- function bt(t, e) {
3874
+ function wt(t, e) {
3875
3875
  e = e || {};
3876
3876
  const i = {};
3877
3877
  function n(c, d, h) {
@@ -3936,7 +3936,7 @@ function bt(t, e) {
3936
3936
  }), i;
3937
3937
  }
3938
3938
  const Jr = (t) => {
3939
- const e = bt({}, t);
3939
+ const e = wt({}, t);
3940
3940
  let { data: i, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: r, headers: o, auth: l } = e;
3941
3941
  e.headers = o = Le.from(o), e.url = Vr(Yr(e.baseURL, e.url), t.params, t.paramsSerializer), l && o.set(
3942
3942
  "Authorization",
@@ -4187,8 +4187,8 @@ const qc = async (t) => {
4187
4187
  const X = An && (c === "stream" || c === "response");
4188
4188
  if (An && (l || X && M)) {
4189
4189
  const G = {};
4190
- ["status", "statusText", "headers"].forEach((kt) => {
4191
- G[kt] = Y[kt];
4190
+ ["status", "statusText", "headers"].forEach((Mt) => {
4191
+ G[Mt] = Y[Mt];
4192
4192
  });
4193
4193
  const ze = x.toFiniteNumber(Y.headers.get("content-length")), [qe, ht] = l && Vs(
4194
4194
  ze,
@@ -4334,7 +4334,7 @@ const En = {
4334
4334
  assertOptions: Gc,
4335
4335
  validators: Yn
4336
4336
  }, ft = En.validators;
4337
- class wt {
4337
+ class yt {
4338
4338
  constructor(e) {
4339
4339
  this.defaults = e, this.interceptors = {
4340
4340
  request: new Us(),
@@ -4367,7 +4367,7 @@ class wt {
4367
4367
  }
4368
4368
  }
4369
4369
  _request(e, i) {
4370
- typeof e == "string" ? (i = i || {}, i.url = e) : i = e || {}, i = bt(this.defaults, i);
4370
+ typeof e == "string" ? (i = i || {}, i.url = e) : i = e || {}, i = wt(this.defaults, i);
4371
4371
  const { transitional: n, paramsSerializer: s, headers: r } = i;
4372
4372
  n !== void 0 && En.assertOptions(n, {
4373
4373
  silentJSONParsing: ft.transitional(ft.boolean),
@@ -4426,14 +4426,14 @@ class wt {
4426
4426
  return d;
4427
4427
  }
4428
4428
  getUri(e) {
4429
- e = bt(this.defaults, e);
4429
+ e = wt(this.defaults, e);
4430
4430
  const i = Yr(e.baseURL, e.url);
4431
4431
  return Vr(i, e.params, e.paramsSerializer);
4432
4432
  }
4433
4433
  }
4434
4434
  x.forEach(["delete", "get", "head", "options"], function(e) {
4435
- wt.prototype[e] = function(i, n) {
4436
- return this.request(bt(n || {}, {
4435
+ yt.prototype[e] = function(i, n) {
4436
+ return this.request(wt(n || {}, {
4437
4437
  method: e,
4438
4438
  url: i,
4439
4439
  data: (n || {}).data
@@ -4443,7 +4443,7 @@ x.forEach(["delete", "get", "head", "options"], function(e) {
4443
4443
  x.forEach(["post", "put", "patch"], function(e) {
4444
4444
  function i(n) {
4445
4445
  return function(r, o, l) {
4446
- return this.request(bt(l || {}, {
4446
+ return this.request(wt(l || {}, {
4447
4447
  method: e,
4448
4448
  headers: n ? {
4449
4449
  "Content-Type": "multipart/form-data"
@@ -4453,7 +4453,7 @@ x.forEach(["post", "put", "patch"], function(e) {
4453
4453
  }));
4454
4454
  };
4455
4455
  }
4456
- wt.prototype[e] = i(), wt.prototype[e + "Form"] = i(!0);
4456
+ yt.prototype[e] = i(), yt.prototype[e + "Form"] = i(!0);
4457
4457
  });
4458
4458
  class Jn {
4459
4459
  constructor(e) {
@@ -4605,13 +4605,13 @@ Object.entries(Pn).forEach(([t, e]) => {
4605
4605
  Pn[e] = t;
4606
4606
  });
4607
4607
  function to(t) {
4608
- const e = new wt(t), i = Tr(wt.prototype.request, e);
4609
- return x.extend(i, wt.prototype, e, { allOwnKeys: !0 }), x.extend(i, e, null, { allOwnKeys: !0 }), i.create = function(s) {
4610
- return to(bt(t, s));
4608
+ const e = new yt(t), i = Tr(yt.prototype.request, e);
4609
+ return x.extend(i, yt.prototype, e, { allOwnKeys: !0 }), x.extend(i, e, null, { allOwnKeys: !0 }), i.create = function(s) {
4610
+ return to(wt(t, s));
4611
4611
  }, i;
4612
4612
  }
4613
4613
  const de = to(ci);
4614
- de.Axios = wt;
4614
+ de.Axios = yt;
4615
4615
  de.CanceledError = Vt;
4616
4616
  de.CancelToken = Jn;
4617
4617
  de.isCancel = _r;
@@ -4624,7 +4624,7 @@ de.all = function(e) {
4624
4624
  };
4625
4625
  de.spread = jc;
4626
4626
  de.isAxiosError = _c;
4627
- de.mergeConfig = bt;
4627
+ de.mergeConfig = wt;
4628
4628
  de.AxiosHeaders = Le;
4629
4629
  de.formToJSON = (t) => jr(x.isHTMLForm(t) ? new FormData(t) : t);
4630
4630
  de.getAdapter = Kr.getAdapter;
@@ -5068,7 +5068,7 @@ var ed = Object.defineProperty, di = (t, e, i, n) => {
5068
5068
  (o = t[r]) && (s = o(e, i, s) || s);
5069
5069
  return s && ed(e, i, s), s;
5070
5070
  };
5071
- const St = class ki {
5071
+ const bt = class ki {
5072
5072
  constructor(e) {
5073
5073
  a(this, "id");
5074
5074
  a(this, "name", "");
@@ -5177,20 +5177,20 @@ const St = class ki {
5177
5177
  };
5178
5178
  di([
5179
5179
  R.GetClassConstructor(Dt)
5180
- ], St.prototype, "answerVariants");
5180
+ ], bt.prototype, "answerVariants");
5181
5181
  di([
5182
5182
  R.GetClassConstructor(Kc)
5183
- ], St.prototype, "fieldExamples");
5183
+ ], bt.prototype, "fieldExamples");
5184
5184
  di([
5185
5185
  R.GetClassConstructor(ii)
5186
- ], St.prototype, "fieldVariants");
5186
+ ], bt.prototype, "fieldVariants");
5187
5187
  di([
5188
5188
  R.GetClassConstructor(so)
5189
- ], St.prototype, "fieldMeasures");
5189
+ ], bt.prototype, "fieldMeasures");
5190
5190
  di([
5191
- R.GetClassConstructor(St)
5192
- ], St.prototype, "children");
5193
- let Qn = St;
5191
+ R.GetClassConstructor(bt)
5192
+ ], bt.prototype, "children");
5193
+ let Qn = bt;
5194
5194
  class ro {
5195
5195
  constructor(e) {
5196
5196
  a(this, "id");
@@ -5568,1295 +5568,1296 @@ class Id {
5568
5568
  }
5569
5569
  }
5570
5570
  const mo = new Id();
5571
- class Rd {
5572
- constructor() {
5573
- a(this, "title", "");
5574
- // showBackButton? = false;
5575
- a(this, "buttons", []);
5576
- }
5577
- // count? = 0;
5578
- Set(e = "", i) {
5579
- typeof e == "function" ? this.title = e() : typeof e == "string" ? this.title = e : this.title = e.value, this.buttons = i;
5571
+ let Rd = class {
5572
+ async Login(e) {
5573
+ const i = e ?? B.Auth.Form.GetValues(), n = await Ie.Post({
5574
+ query: "auth/login",
5575
+ payload: i
5576
+ });
5577
+ if (!n)
5578
+ throw B.Notification.Error("Ошибка авторизации"), "Ошибка авторизации";
5579
+ B.Auth.Status.SetState(n);
5580
5580
  }
5581
- }
5582
- const Ad = new Rd();
5583
- class $d {
5584
- constructor() {
5585
- a(this, "menu", []);
5586
- a(this, "path", "");
5587
- a(this, "isOpen", !0);
5588
- a(this, "filterString", "");
5581
+ async LoginAs(e) {
5582
+ if (!await Ie.Post({
5583
+ query: "auth/login-as",
5584
+ payload: { email: e }
5585
+ })) {
5586
+ B.Notification.Error("Ошибка авторизации");
5587
+ return;
5588
+ }
5589
5589
  }
5590
- Set(e) {
5591
- this.menu = e;
5590
+ async Register() {
5592
5591
  }
5593
- Get() {
5594
- return this.filterString ? this.filterMenu() : this.menu;
5592
+ async RestorePassword() {
5595
5593
  }
5596
- filterMenu() {
5597
- return this.menu.filter((e) => {
5598
- var i;
5599
- return te.SearchIn(e.name, this.filterString) || ((i = e.children) == null ? void 0 : i.some((n) => te.SearchIn(n.name, this.filterString)));
5594
+ async passwordChange() {
5595
+ await Ie.Put({
5596
+ query: "auth/password-change"
5597
+ // payload: { id: userId, email: PHelp.AuthForm.Email().email, password: PHelp.AuthForm.Password().password },
5600
5598
  });
5601
5599
  }
5602
- IsOpen() {
5603
- return this.isOpen;
5604
- }
5605
- Toggle() {
5606
- this.isOpen = !this.isOpen;
5607
- }
5608
- SetPath(e) {
5609
- this.path = e;
5610
- }
5611
- GetPath() {
5612
- return this.path;
5600
+ async RefreshToken() {
5601
+ await Ie.Post({
5602
+ query: "auth/refresh-token",
5603
+ payload: { refreshToken: Pi.getRefreshToken() }
5604
+ });
5613
5605
  }
5614
- SetFilter(e) {
5615
- this.filterString = e;
5606
+ async CheckUuid(e) {
5607
+ await Ie.Get({ query: `auth/check-uuid/${e.userId}/${e.uniqueId}` });
5616
5608
  }
5617
- GetChildren(e) {
5618
- var i;
5619
- return this.filterString ? (i = e.children) == null ? void 0 : i.filter((n) => te.SearchIn(n.name, this.filterString)) : e.children;
5609
+ };
5610
+ const Ad = new Rd();
5611
+ let $d = class extends ae {
5612
+ constructor() {
5613
+ super(ei, "contacts");
5620
5614
  }
5621
- }
5615
+ };
5622
5616
  const Ed = new $d();
5623
- class Pd {
5617
+ let Pd = class extends ae {
5624
5618
  constructor() {
5625
- a(this, "Menu", Ed);
5626
- a(this, "Head", Ad);
5619
+ super(Ft, "emails");
5627
5620
  }
5628
- }
5621
+ };
5629
5622
  const po = new Pd();
5630
- class go {
5623
+ let Td = class extends ae {
5631
5624
  constructor() {
5632
- a(this, "visible", !1);
5633
- }
5634
- hide() {
5635
- this.visible = !1;
5625
+ super(ge, "file-infos");
5636
5626
  }
5637
- show() {
5638
- this.hide(), this.visible = !0;
5627
+ };
5628
+ const Fd = new Td();
5629
+ class ts {
5630
+ constructor(e) {
5631
+ a(this, "id");
5632
+ a(this, "ftsp");
5633
+ a(this, "name", "");
5634
+ R.BuildClass(this, e);
5639
5635
  }
5640
- IsVisible() {
5641
- return this.visible;
5636
+ static Create(e) {
5637
+ const i = new ts();
5638
+ return i.id = R.CreateUUID(), i.ftsp = JSON.stringify(e), i;
5642
5639
  }
5643
5640
  }
5644
- class vo extends go {
5641
+ let Ld = class extends ae {
5645
5642
  constructor() {
5646
- super(...arguments);
5647
- a(this, "type", Pe.Success);
5648
- a(this, "text", "");
5649
- a(this, "title", "");
5650
- }
5651
- showMessage(i, n) {
5652
- this.hide(), this.type = n, typeof i == "string" ? this.text = i : (this.text = i.text, this.title = i.title ?? ""), super.show();
5653
- }
5654
- GetText() {
5655
- return this.text;
5643
+ super(ts, "ftsp-presets");
5656
5644
  }
5657
- GetTitle() {
5658
- return this.title;
5645
+ };
5646
+ const Dd = new Ld();
5647
+ let zd = class extends ae {
5648
+ constructor() {
5649
+ super(kr, "humans");
5659
5650
  }
5660
- GetType() {
5661
- return this.type;
5651
+ };
5652
+ const Od = new zd();
5653
+ class go {
5654
+ constructor(e) {
5655
+ a(this, "id");
5656
+ a(this, "name", "");
5657
+ a(this, "order", 0);
5658
+ a(this, "downloadToFile", !1);
5659
+ a(this, "pageSectionId");
5660
+ // pageSection: IPageSection = new PageSection();
5661
+ a(this, "scan", new ge());
5662
+ a(this, "scanId");
5663
+ e && (this.id = e == null ? void 0 : e.id, this.name = e.name, this.order = e.order, this.downloadToFile = e.downloadToFile, this.pageSectionId = e.pageSectionId, e.scan && (this.scan = new ge(e.scan)), this.scanId = e.scanId);
5662
5664
  }
5663
- Info(i) {
5664
- this.showMessage(i, Pe.Info);
5665
+ getFileInfos() {
5666
+ return [this.scan];
5665
5667
  }
5666
- Success(i) {
5667
- this.showMessage(i, Pe.Success);
5668
+ uploadScan(e) {
5669
+ return this.scan.id || (this.scan.id = $e()), this.scan.originalName = e.name, this.scan.file = e.raw, this.scan.fileSystemPath = $e(), this.scan.url = e.url, this.scan;
5668
5670
  }
5669
- Error(i) {
5670
- this.showMessage(i, Pe.Error);
5671
+ getFileName() {
5672
+ return this.name ? this.name : this.scan.originalName;
5671
5673
  }
5672
- Warning(i) {
5673
- this.showMessage(i, Pe.Warning);
5674
+ }
5675
+ class Bd {
5676
+ constructor(e) {
5677
+ a(this, "id");
5678
+ a(this, "documentType", new xt());
5679
+ a(this, "documentTypeId");
5680
+ a(this, "order", 0);
5681
+ R.BuildClass(this, e);
5674
5682
  }
5675
- // eslint-disable-next-line
5676
- FormMessage(i) {
5677
- let n = "<strong>Проверьте правильность введенных данных:</strong><ul>";
5678
- for (const s of Object.keys(i))
5679
- i[s][0] && i[s][0].message && (n += `<li>${i[s][0].message}</li>`);
5680
- return n += "</ul>", n;
5683
+ getFileInfos() {
5684
+ const e = [];
5685
+ return e.push(...this.documentType.getFileInfos()), e;
5681
5686
  }
5682
5687
  }
5683
- class Td extends vo {
5684
- constructor() {
5685
- super(...arguments);
5686
- a(this, "confirmButtonText", "Да");
5687
- a(this, "cancelButtonText", "Нет");
5688
- // eslint-disable-next-line
5689
- a(this, "resolve");
5690
- // eslint-disable-next-line
5691
- a(this, "reject");
5692
- }
5693
- GetConfirmButtonText() {
5694
- return this.confirmButtonText;
5688
+ var Nd = Object.defineProperty, vo = (t, e, i, n) => {
5689
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
5690
+ (o = t[r]) && (s = o(e, i, s) || s);
5691
+ return s && Nd(e, i, s), s;
5692
+ };
5693
+ class xt {
5694
+ constructor(e) {
5695
+ a(this, "id");
5696
+ a(this, "name", "");
5697
+ a(this, "singleScan", !1);
5698
+ a(this, "scan");
5699
+ a(this, "scanId");
5700
+ a(this, "order", 0);
5701
+ a(this, "description", "");
5702
+ a(this, "scans", []);
5703
+ a(this, "scansForDelete", []);
5704
+ a(this, "pageSectionDocuments", []);
5705
+ a(this, "pageSectionDocumentsForDelete", []);
5706
+ a(this, "pageSectionImages", []);
5707
+ a(this, "pageSectionImagesForDelete", []);
5708
+ // pageSideMenu: IPageSideMenu = new PageSideMenu();
5709
+ a(this, "pageSideMenuId");
5710
+ a(this, "pageId");
5711
+ a(this, "text", "");
5712
+ a(this, "documents", []);
5713
+ R.BuildClass(this, e), this.documents = this.pageSectionDocuments, this.text = this.description.replace("<p>undefined</p>", "");
5695
5714
  }
5696
- GetCancelButtonText() {
5697
- return this.cancelButtonText;
5715
+ addDocument() {
5716
+ const e = new go();
5717
+ e.order = this.pageSectionDocuments.length - 1, this.pageSectionDocuments.push(e);
5698
5718
  }
5699
- Show(i) {
5700
- return super.show(), typeof i != "string" && (this.confirmButtonText = i.confirmButtonText, this.cancelButtonText = i.cancelButtonText), new Promise((n, s) => {
5701
- this.resolve = n, this.reject = s;
5702
- });
5719
+ getFileInfos() {
5720
+ const e = [];
5721
+ return this.pageSectionDocuments.forEach((i) => {
5722
+ e.push(...i.getFileInfos());
5723
+ }), e;
5703
5724
  }
5704
- Save() {
5705
- return this.Show({
5706
- text: вас есть несохранённые изменения",
5707
- confirmButtonText: "Сохранить",
5708
- cancelButtonText: "Не сохранять"
5709
- });
5725
+ infoExists(e) {
5726
+ const i = te.SearchIn(this.name, e), n = te.SearchIn(this.description, e), s = this.getDocuments(e);
5727
+ return i || n || s.length > 0;
5710
5728
  }
5711
- Submit() {
5712
- this.resolve(!0), this.hide();
5729
+ getDocuments(e) {
5730
+ return this.pageSectionDocuments.filter((i) => te.SearchIn(i.name, e));
5713
5731
  }
5714
- Cancel() {
5715
- this.reject(), this.hide();
5732
+ getDescription(e) {
5733
+ return e ? te.WrapSubStr(this.description, e) : this.description;
5716
5734
  }
5717
- hide() {
5718
- this.resolve = void 0, this.reject = void 0, super.hide();
5735
+ filter(e) {
5736
+ if (!e) {
5737
+ this.text = this.description, this.documents = this.pageSectionDocuments;
5738
+ return;
5739
+ }
5740
+ this.text = te.SearchIn(this.description, e) ? te.WrapSubStr(this.description, e) : "", this.documents = this.pageSectionDocuments.filter((i) => te.SearchIn(i.name, e));
5719
5741
  }
5720
5742
  }
5721
- const yo = new Td();
5722
- class Fd extends go {
5723
- Show() {
5724
- super.show();
5743
+ vo([
5744
+ R.GetClassConstructor(go)
5745
+ ], xt.prototype, "pageSectionDocuments");
5746
+ vo([
5747
+ R.GetClassConstructor(Bd)
5748
+ ], xt.prototype, "pageSectionImages");
5749
+ class Hd {
5750
+ constructor(e) {
5751
+ a(this, "id");
5752
+ a(this, "document", new xt());
5753
+ a(this, "documentId");
5754
+ a(this, "pageId");
5755
+ R.BuildClass(this, e);
5725
5756
  }
5726
- Hide() {
5727
- super.hide();
5757
+ static GetFileInfos(e) {
5758
+ const i = [];
5759
+ return e.forEach((n) => {
5760
+ const s = n.document.scan;
5761
+ s && i.push(s);
5762
+ }), i;
5728
5763
  }
5729
5764
  }
5730
- const wo = new Fd();
5731
- class Ti {
5732
- static Get(e, i, n = "-") {
5733
- return !e || !i ? "" : `${e}${n}${i}`;
5765
+ var qd = Object.defineProperty, Ud = (t, e, i, n) => {
5766
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
5767
+ (o = t[r]) && (s = o(e, i, s) || s);
5768
+ return s && qd(e, i, s), s;
5769
+ };
5770
+ class yo {
5771
+ constructor(e) {
5772
+ a(this, "id");
5773
+ a(this, "pageId");
5774
+ a(this, "fileInfoId");
5775
+ a(this, "fileInfo");
5776
+ a(this, "description");
5777
+ R.BuildClass(this, e);
5734
5778
  }
5735
- static In(e, i, n) {
5736
- return e >= i && e <= n;
5779
+ }
5780
+ Ud([
5781
+ R.GetClassConstructor(ge)
5782
+ ], yo.prototype, "fileInfo");
5783
+ var Wd = Object.defineProperty, Vd = (t, e, i, n) => {
5784
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
5785
+ (o = t[r]) && (s = o(e, i, s) || s);
5786
+ return s && Wd(e, i, s), s;
5787
+ };
5788
+ class Pt {
5789
+ constructor(e) {
5790
+ a(this, "id");
5791
+ a(this, "name", "Новое меню");
5792
+ a(this, "order", 0);
5793
+ a(this, "description", "");
5794
+ a(this, "routeAnchor", "");
5795
+ a(this, "slug", "");
5796
+ a(this, "pageSections", []);
5797
+ a(this, "pageSectionsForDelete", []);
5798
+ a(this, "showContent", !1);
5799
+ a(this, "pageId");
5800
+ a(this, "selected", !1);
5801
+ a(this, "sections", []);
5802
+ a(this, "text", "");
5803
+ R.BuildClass(this, e), this.sections = this.pageSections, this.text = this.description.replace("<p>undefined</p>", "");
5737
5804
  }
5738
- static Intersects(e, i, n, s) {
5739
- return e === n || i === s || e > n && e < s || i > n && i < s || i > s && e < n;
5805
+ getFileInfos() {
5806
+ const e = [];
5807
+ return this.pageSections.forEach((i) => {
5808
+ e.push(...i.getFileInfos());
5809
+ }), e;
5810
+ }
5811
+ addPageSection() {
5812
+ const e = new xt();
5813
+ e.order = this.pageSections.length + 1, e.name = `Новой раздел ${e.order}`, e.id = $e(), this.pageSections.push(e);
5814
+ }
5815
+ infoExists(e) {
5816
+ const i = te.SearchIn(this.name, e), n = te.SearchIn(this.description, e), s = this.getPageSections(e).length > 0;
5817
+ return i || n || s;
5818
+ }
5819
+ getPageSections(e) {
5820
+ return e.length ? this.pageSections.filter((i) => i.infoExists(e)) : this.pageSections;
5821
+ }
5822
+ filter(e) {
5823
+ e.length ? (this.sections = this.pageSections.filter((i) => i.infoExists(e)), this.text = te.SearchIn(this.description, e) ? te.WrapSubStr(this.description, e) : "") : (this.sections = this.pageSections, this.text = this.description), this.sections.forEach((i) => i.filter(e));
5740
5824
  }
5741
5825
  }
5742
- const bo = 1e3, So = 60 * bo, gn = 60 * So;
5743
- var ni = /* @__PURE__ */ ((t) => (t.FiveMinutes = "5", t.HourQuarter = "15", t.HourHalf = "30", t.Hour = "60", t))(ni || {});
5744
- const Fi = {
5745
- 5: ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"],
5746
- 15: ["00", "15", "30", "45"],
5747
- 30: ["00", "30"],
5748
- 60: ["00"]
5826
+ Vd([
5827
+ R.GetClassConstructor(xt)
5828
+ ], Pt.prototype, "pageSections");
5829
+ var wo = /* @__PURE__ */ ((t) => (t.User = "USER", t.Admin = "ADMIN", t))(wo || {});
5830
+ class Gd {
5831
+ constructor(e) {
5832
+ a(this, "id");
5833
+ a(this, "name", wo.User);
5834
+ a(this, "label", "");
5835
+ a(this, "startPage", "");
5836
+ R.BuildClass(this, e);
5837
+ }
5838
+ }
5839
+ var jd = Object.defineProperty, Yi = (t, e, i, n) => {
5840
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
5841
+ (o = t[r]) && (s = o(e, i, s) || s);
5842
+ return s && jd(e, i, s), s;
5749
5843
  };
5750
- class ee {
5751
- static S(e) {
5752
- return bo * e;
5844
+ class Gt {
5845
+ constructor(e) {
5846
+ a(this, "id");
5847
+ a(this, "title", "");
5848
+ a(this, "content", "");
5849
+ a(this, "slug", "");
5850
+ a(this, "pagesGroup", "Без группы");
5851
+ a(this, "link", "");
5852
+ a(this, "withComments", !1);
5853
+ a(this, "showContacts", !1);
5854
+ a(this, "collaps", !1);
5855
+ a(this, "showContent", !1);
5856
+ a(this, "pageImages", []);
5857
+ a(this, "pageImagesForDelete", []);
5858
+ a(this, "pageImagesNames", []);
5859
+ a(this, "pageSideMenus", []);
5860
+ a(this, "menus", []);
5861
+ a(this, "pageSideMenusForDelete", []);
5862
+ a(this, "pageSections", []);
5863
+ a(this, "pageSectionsForDelete", []);
5864
+ a(this, "pageDocuments", []);
5865
+ // @ClassHelper.GetClassConstructor(PageComment)
5866
+ // pageComments: PageComment[] = [];
5867
+ a(this, "contact", new ei());
5868
+ a(this, "contactId");
5869
+ a(this, "role", new Gd());
5870
+ a(this, "roleId");
5871
+ //
5872
+ a(this, "filterStr", "");
5873
+ a(this, "activeMenuId", "");
5874
+ R.BuildClass(this, e), this.menus = this.pageSideMenus;
5753
5875
  }
5754
- static M(e) {
5755
- return So * e;
5876
+ getActiveMenu() {
5877
+ const e = this.pageSideMenus.find((i) => i.id === this.activeMenuId);
5878
+ return e || this.pageSideMenus[0];
5756
5879
  }
5757
- static H(e) {
5758
- return gn * e;
5880
+ setActiveMenuId(e) {
5881
+ this.activeMenuId = e;
5759
5882
  }
5760
- static D(e) {
5761
- return gn * e;
5883
+ getLink() {
5884
+ return this.slug !== "" ? `/pages/${this.slug}` : "404";
5762
5885
  }
5763
- static W(e) {
5764
- return gn * e;
5886
+ getFileInfos() {
5887
+ const e = [];
5888
+ return this.pageSideMenus.forEach((i) => {
5889
+ e.push(...i.getFileInfos());
5890
+ }), this.pageDocuments.forEach((i) => {
5891
+ i.document.scan && e.push(i.document.scan);
5892
+ }), this.pageImages.forEach((i) => {
5893
+ i.fileInfo && e.push(i.fileInfo);
5894
+ }), e;
5765
5895
  }
5766
- static NormalizeTime(e) {
5767
- return String(e).padStart(2, "0");
5896
+ addSideMenu() {
5897
+ const e = new Pt();
5898
+ return e.order = this.pageSideMenus.length + 1, e.name = `Новое меню ${e.order}`, e.id = $e(), this.pageSideMenus.push(e), e.id;
5768
5899
  }
5769
- static HMtoM(e) {
5770
- const i = ee.SplitHM(e);
5771
- return i.length > 1 ? ee.HtoM(i[0]) + i[1] : ee.HtoM(i[0]);
5900
+ selectSideMenu(e, i) {
5901
+ if (!e && this.pageSideMenus.length > 0) {
5902
+ this.pageSideMenus[0].selected = !0;
5903
+ return;
5904
+ }
5905
+ this.pageSideMenus.forEach((n) => {
5906
+ i ? n.selected = n.id === e : n.selected = n.slug === e;
5907
+ });
5772
5908
  }
5773
- static HtoM(e) {
5774
- return Number(e) * 60;
5909
+ getSelectedSideMenu() {
5910
+ const e = this.pageSideMenus.find((i) => i.selected);
5911
+ return e || new Pt();
5775
5912
  }
5776
- static SplitHM(e) {
5777
- if (!e)
5778
- return [];
5779
- const i = e.split(":");
5780
- return [Number(i[0]), Number(i[1])];
5913
+ //
5914
+ addCustomSectionsToSideMenu(e) {
5915
+ e.forEach((i) => {
5916
+ const n = new Pt();
5917
+ n.id = i.id, n.name = i.name, typeof i.order < "u" ? this.pageSideMenus.splice(i.order, 0, n) : this.pageSideMenus.push(n);
5918
+ });
5781
5919
  }
5782
- static HmsToHm(e) {
5783
- const i = ee.SplitHM(e);
5784
- return ee.ConcatHM(i[0], i[1]);
5920
+ //
5921
+ getPageSideMenus() {
5922
+ if (this.showContacts && !this.pageSideMenus.find((e) => e.id === "contacts")) {
5923
+ const e = new Pt();
5924
+ e.id = "contacts", e.name = "Контакты", this.pageSideMenus.push(e);
5925
+ }
5926
+ return this.filterStr === "" ? this.pageSideMenus : this.pageSideMenus.filter((e) => e.infoExists(this.filterStr));
5785
5927
  }
5786
- static AddMtoHM(e, i) {
5787
- const n = /* @__PURE__ */ new Date(), s = ee.SplitHM(e);
5788
- n.setHours(s[0], s[1], 0, 0);
5789
- const r = new Date(n.getTime() + i * 6e4), o = r.getHours(), l = r.getMinutes();
5790
- return ee.ConcatHM(o, l);
5928
+ filter() {
5929
+ this.filterStr === "" ? this.menus = this.pageSideMenus : this.menus = this.pageSideMenus.filter((e) => e.infoExists(this.filterStr)), this.menus.forEach((e) => e.filter(this.filterStr));
5791
5930
  }
5792
- static ConcatHM(e, i) {
5793
- return `${e}:${ee.NormalizeTime(i)}`;
5931
+ static GetClassName() {
5932
+ return "page";
5794
5933
  }
5795
- static DiffM(e, i) {
5796
- return ee.Gt(i, e) ? ee.HMtoM(i) - ee.HMtoM(e) : ee.HMtoM(e) - ee.HMtoM(i);
5934
+ }
5935
+ Yi([
5936
+ R.GetClassConstructor(yo)
5937
+ ], Gt.prototype, "pageImages");
5938
+ Yi([
5939
+ R.GetClassConstructor(Pt)
5940
+ ], Gt.prototype, "pageSideMenus");
5941
+ Yi([
5942
+ R.GetClassConstructor(xt)
5943
+ ], Gt.prototype, "pageSections");
5944
+ Yi([
5945
+ R.GetClassConstructor(Hd)
5946
+ ], Gt.prototype, "pageDocuments");
5947
+ class bo {
5948
+ constructor(e) {
5949
+ a(this, "id");
5950
+ a(this, "name", "");
5951
+ a(this, "link", "");
5952
+ a(this, "selected", !1);
5953
+ a(this, "hide", !1);
5954
+ a(this, "editMode", !1);
5955
+ a(this, "color", "");
5956
+ a(this, "background", "");
5957
+ a(this, "page", new Gt());
5958
+ a(this, "pageId");
5959
+ a(this, "order", 0);
5960
+ a(this, "menuId");
5961
+ a(this, "iconId");
5962
+ a(this, "icon", new ge());
5963
+ a(this, "iconName", "");
5964
+ a(this, "svgCode", "");
5965
+ R.BuildClass(this, e);
5797
5966
  }
5798
- static GetPeriod(e, i) {
5799
- return Ti.Get(e, i);
5967
+ getLink() {
5968
+ return this.isLink() && !this.isPageLink() ? this.link : !this.isLink() && this.isPageLink() ? this.page.getLink() : "";
5800
5969
  }
5801
- static Gt(e, i) {
5802
- return ee.HMtoM(e) > ee.HMtoM(i);
5970
+ isLink() {
5971
+ return this.link !== "";
5803
5972
  }
5804
- static GtOrEq(e, i) {
5805
- return ee.Gt(e, i) || ee.Eq(e, i);
5973
+ isPageLink() {
5974
+ return this.pageId !== void 0 && this.pageId !== "";
5806
5975
  }
5807
- static Eq(e, i) {
5808
- return ee.HMtoM(e) === ee.HMtoM(i);
5976
+ addFile(e) {
5977
+ this.icon.id || (this.icon.id = $e()), this.icon.originalName = e.name, this.icon.file = e.raw;
5809
5978
  }
5810
- static PeriodInPeriod(e, i, n, s) {
5811
- return ee.HMtoM(e) >= ee.HMtoM(n) && ee.HMtoM(i) <= ee.HMtoM(s);
5979
+ }
5980
+ var _d = Object.defineProperty, Zd = (t, e, i, n) => {
5981
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
5982
+ (o = t[r]) && (s = o(e, i, s) || s);
5983
+ return s && _d(e, i, s), s;
5984
+ };
5985
+ class So {
5986
+ constructor(e) {
5987
+ a(this, "id");
5988
+ a(this, "name", "");
5989
+ a(this, "link", "");
5990
+ a(this, "top", !0);
5991
+ a(this, "side", !0);
5992
+ a(this, "show", !1);
5993
+ a(this, "hide", !1);
5994
+ a(this, "active", !1);
5995
+ a(this, "order", 0);
5996
+ a(this, "selected", !1);
5997
+ a(this, "editMode", !1);
5998
+ a(this, "page", new Gt());
5999
+ a(this, "pageId");
6000
+ a(this, "subMenus", []);
6001
+ a(this, "subMenusForDelete", []);
6002
+ a(this, "iconId");
6003
+ a(this, "icon", new ge());
6004
+ R.BuildClass(this, e);
5812
6005
  }
5813
- static PeriodsIntersects(e, i, n, s) {
5814
- return Ti.Intersects(ee.HMtoM(e), ee.HMtoM(i), ee.HMtoM(n), ee.HMtoM(s));
6006
+ getLink() {
6007
+ return this.isLink() && !this.isPageLink() ? this.link : !this.isLink() && this.isPageLink() ? this.page.getLink() : "";
5815
6008
  }
5816
- }
5817
- class Li {
5818
- static Wait(e, i) {
5819
- return new Promise((n) => setTimeout(() => n(i), e));
6009
+ withoutChildren() {
6010
+ return this.subMenus.length === 0;
5820
6011
  }
5821
- static WaitS(e, i) {
5822
- return Li.Wait(ee.S(e), i);
6012
+ isLink() {
6013
+ return this.link !== "";
5823
6014
  }
5824
- static WaitM(e, i) {
5825
- return Li.Wait(ee.M(e), i);
6015
+ isPageLink() {
6016
+ return !!this.pageId && this.pageId !== "";
6017
+ }
6018
+ getFileInfos() {
6019
+ const e = [];
6020
+ return e.push(this.icon), this.subMenus.forEach((i) => {
6021
+ e.push(i.icon);
6022
+ }), e;
6023
+ }
6024
+ addFile(e) {
6025
+ this.icon.id || (this.icon.id = $e()), this.icon.originalName = e.name, this.icon.file = e.raw;
6026
+ }
6027
+ addSubMenu() {
6028
+ this.subMenus.push(new bo());
6029
+ }
6030
+ removeSubMenu(e) {
6031
+ const i = this.subMenus[e].id;
6032
+ i && this.subMenusForDelete.push(i), this.subMenus.splice(e, 1);
6033
+ }
6034
+ setColorsForSubMenus() {
6035
+ const e = ["#00A248", "#E63021", "#006BB5", "#F3911F", "#6F6D6B"];
6036
+ let i = 0;
6037
+ this.subMenus.forEach((n) => {
6038
+ n.color = e[i], i = e.length - 1 ? i = 0 : i++;
6039
+ });
6040
+ }
6041
+ containPath(e) {
6042
+ return this.getLink() === e || !!this.subMenus.find((i) => i.getLink() === e);
6043
+ }
6044
+ static GetClassName() {
6045
+ return "menu";
5826
6046
  }
5827
6047
  }
5828
- class Ld extends vo {
6048
+ Zd([
6049
+ R.GetClassConstructor(bo)
6050
+ ], So.prototype, "subMenus");
6051
+ let Yd = class extends ae {
5829
6052
  constructor() {
5830
- super(...arguments);
5831
- a(this, "duration", ee.S(3));
5832
- }
5833
- showMessage(i, n) {
5834
- super.showMessage(i, n), typeof i != "string" && (this.duration = i.duration ?? this.duration), Li.Wait(this.GetDuration()).then(() => super.hide());
6053
+ super(So, "menus");
5835
6054
  }
5836
- GetDuration() {
5837
- return this.duration;
6055
+ };
6056
+ const Jd = new Yd();
6057
+ let Xd = class extends ae {
6058
+ constructor() {
6059
+ super(Lt, "phones");
5838
6060
  }
5839
- Dev() {
5840
- const i = режиме разработки", n = Pe.Warning;
5841
- super.showMessage(i, n);
6061
+ };
6062
+ const Co = new Xd();
6063
+ class Qd {
6064
+ constructor(e) {
6065
+ a(this, "id");
6066
+ a(this, "nameRus", "");
6067
+ R.BuildClass(this, e);
5842
6068
  }
5843
- Save() {
5844
- const i = "Изменения успешно сохранены", n = Pe.Success;
5845
- super.showMessage(i, n);
6069
+ }
6070
+ var Kd = Object.defineProperty, eh = (t, e, i, n) => {
6071
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6072
+ (o = t[r]) && (s = o(e, i, s) || s);
6073
+ return s && Kd(e, i, s), s;
6074
+ };
6075
+ class xo {
6076
+ constructor(e) {
6077
+ a(this, "id");
6078
+ a(this, "nameRus", "");
6079
+ a(this, "fields", []);
6080
+ R.BuildClass(this, e);
5846
6081
  }
5847
6082
  }
5848
- const Co = new Ld();
5849
- class Dd {
6083
+ eh([
6084
+ R.GetClassConstructor(Qd)
6085
+ ], xo.prototype, "fields");
6086
+ let th = class extends ae {
5850
6087
  constructor() {
5851
- a(this, "limit", 25);
5852
- a(this, "count", 0);
5853
- a(this, "curPage", 1);
5854
- a(this, "storeModule", "");
5855
- }
5856
- setCurPage(e) {
5857
- this.curPage = e;
6088
+ super(xo, "schemas");
5858
6089
  }
5859
- pagesCount() {
5860
- return Math.ceil(this.count / this.limit) ?? 1;
5861
- }
5862
- reset() {
5863
- this.count = 0, this.curPage = 1;
6090
+ };
6091
+ const ih = new th();
6092
+ class Mo {
6093
+ constructor(e) {
6094
+ a(this, "id", "");
6095
+ a(this, "value", "");
6096
+ a(this, "label", "");
6097
+ a(this, "key", "");
6098
+ a(this, "description", "");
6099
+ a(this, "route", "");
6100
+ // searchGroup: SearchGroup = new SearchGroup();
6101
+ a(this, "searchElementMetas", []);
6102
+ R.BuildClass(this, e);
5864
6103
  }
5865
6104
  }
5866
- const xo = new Dd();
5867
- class B {
5868
- }
5869
- a(B, "Auth", ke(mo)), a(B, "AdminUI", ke(po)), a(B, "Dialog", ke(yo)), a(B, "Notification", ke(Co)), a(B, "Loading", ke(wo)), a(B, "Paginator", ke(xo));
5870
- function zd() {
5871
- const t = P(!1), e = P(!1);
5872
- return {
5873
- confirmLeave: t,
5874
- saveButtonClick: e,
5875
- beforeWindowUnload: (r) => {
5876
- t.value && r.preventDefault();
5877
- },
5878
- formUpdated: () => {
5879
- t.value = !0;
5880
- },
5881
- showConfirmModal: (r, o) => {
5882
- t.value && !e.value ? B.Dialog.Save().then(() => {
5883
- r(), o();
5884
- }).catch(() => {
5885
- B.Notification.Warning("Изменения не были сохранены"), o();
5886
- }) : o();
5887
- }
5888
- };
5889
- }
5890
- const A0 = (() => {
5891
- const t = (r, o) => st(async () => {
5892
- var l;
5893
- be.Get().reset(), tt.Set(o == null ? void 0 : o.sortsLib), be.Get().setSortModel(tt.GetDefault()), tt.Set(o == null ? void 0 : o.sortsLib), be.Get().setSortModel(tt.GetDefault()), B.Paginator.storeModule = (l = o == null ? void 0 : o.pagination) == null ? void 0 : l.storeModule, await r();
5894
- }), { saveButtonClick: e, showConfirmModal: i } = zd(), n = (r) => tu((o, l, u) => {
5895
- i((r || s)(), u);
5896
- }), s = (r) => async () => {
5897
- e.value = !0;
5898
- try {
5899
- r && await r(), B.Notification.Success("Сохранено");
5900
- } catch (o) {
5901
- B.Notification.Success("Что-то пошло не так. " + o);
5902
- return;
5903
- }
5904
- };
5905
- return {
5906
- onBeforeMount: t,
5907
- onBeforeRouteLeave: n,
5908
- submit: s
5909
- };
5910
- })(), Qs = ["#31af5e", "#ff4d3b", "#006BB5", "#f3911c"];
5911
- function $0() {
5912
- return Qs[Math.floor(Math.random() * Qs.length)];
5913
- }
5914
- function E0(t, e) {
5915
- const i = [2, 0, 1, 1, 1, 2];
5916
- return t.length + " " + e[t.length % 100 > 4 && t.length % 100 < 20 ? 2 : i[t.length % 10 < 5 ? t.length % 10 : 5]];
5917
- }
5918
- class P0 {
6105
+ class nh {
5919
6106
  constructor(e) {
6107
+ a(this, "id");
5920
6108
  a(this, "name", "");
6109
+ a(this, "label", "");
5921
6110
  R.BuildClass(this, e);
5922
6111
  }
5923
- cache() {
5924
- }
5925
- getFromCache(e) {
5926
- const i = sessionStorage.getItem(this.name);
5927
- if (i) {
5928
- const n = JSON.parse(i), s = /* @__PURE__ */ new Date(), r = new Date(n.time), o = s.getTime() - r.getTime();
5929
- return Math.round(o / 6e4) > (e || 10) ? null : n.data;
5930
- } else
5931
- return null;
5932
- }
5933
- async storeGetWithCache(e, i) {
5934
- let n;
5935
- return n = this.getFromCache(i), n || (n = await e(), n && this.cache()), n;
5936
- }
5937
6112
  }
5938
- function T0(t, e) {
5939
- t == "left" && e.next(), t == "right" && e.prev();
5940
- }
5941
- const Od = ["#31af5e", "#ff4d3b", "#006BB5", "#f3911c"];
5942
- class F0 {
5943
- static GetRandColor(e) {
5944
- return dt.GetRandEL(e ?? Od);
6113
+ var sh = Object.defineProperty, ko = (t, e, i, n) => {
6114
+ for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6115
+ (o = t[r]) && (s = o(e, i, s) || s);
6116
+ return s && sh(e, i, s), s;
6117
+ };
6118
+ class Tt {
6119
+ constructor(e) {
6120
+ a(this, "id");
6121
+ a(this, "key", "");
6122
+ a(this, "label", "");
6123
+ a(this, "order", 0);
6124
+ a(this, "route", "");
6125
+ a(this, "table", "");
6126
+ a(this, "active", !0);
6127
+ a(this, "searchColumn", "");
6128
+ a(this, "descriptionColumn", "");
6129
+ a(this, "labelColumn", "");
6130
+ a(this, "valueColumn", "");
6131
+ a(this, "options", []);
6132
+ a(this, "searchGroupMetaColumns", []);
6133
+ R.BuildClass(this, e);
5945
6134
  }
5946
6135
  }
5947
- function L0(t) {
5948
- const e = t.filter((s) => s.rating !== 0);
5949
- let i = 0;
5950
- e.forEach((s) => i = i + s.rating);
5951
- const n = i / e.length;
5952
- return isNaN(n) ? 0 : Number((i / e.length).toFixed(2));
5953
- }
5954
- let D0 = class {
5955
- constructor() {
5956
- a(this, "startHour", 9);
5957
- a(this, "endHour", 19);
5958
- a(this, "timelinePxHeight", 50);
5959
- a(this, "timelineStep", ni.FiveMinutes);
5960
- a(this, "activeTime", "");
5961
- a(this, "activeObjectId", "");
5962
- a(this, "dragged", !1);
5963
- a(this, "draggedStartTime", "");
5964
- a(this, "draggedEndTime", "");
5965
- a(this, "timelines", Fi[ni.FiveMinutes]);
5966
- }
5967
- startDrag(e, i) {
5968
- this.draggedStartTime = e, this.draggedEndTime = i, this.dragged = !0;
5969
- }
5970
- endDrag() {
5971
- this.activeTime = "", this.dragged = !1;
5972
- }
5973
- setTimelineStep(e) {
5974
- this.timelineStep = e, this.setTimelines();
6136
+ ko([
6137
+ R.GetClassConstructor(Mo)
6138
+ ], Tt.prototype, "options");
6139
+ ko([
6140
+ R.GetClassConstructor(nh)
6141
+ ], Tt.prototype, "searchGroupMetaColumns");
6142
+ class gn {
6143
+ constructor(e) {
6144
+ a(this, "query", "");
6145
+ a(this, "key", "");
6146
+ a(this, "params", "");
6147
+ a(this, "suggester", !1);
6148
+ a(this, "mustBeTranslated", !0);
6149
+ a(this, "options", []);
6150
+ a(this, "searchGroupId", "");
6151
+ a(this, "searchGroups", []);
6152
+ a(this, "searchGroup", new Tt());
6153
+ a(this, "searchObjects", []);
6154
+ a(this, "pagination", new Ai());
6155
+ a(this, "count", 0);
6156
+ e && (this.query = e.query, e.searchGroups && (this.searchGroups = e.searchGroups.map((i) => new Tt(i))), e.searchGroup && (this.searchGroup = new Tt(e.searchGroup)), e.options && (this.options = e.options.map((i) => new Mo(i))), this.count = e.count);
5975
6157
  }
5976
- setTimelines() {
5977
- this.timelines = Fi[this.timelineStep];
6158
+ toUrl() {
6159
+ return JSON.stringify(this);
5978
6160
  }
5979
- getScheduleHeight() {
5980
- return this.getHourHeight() * this.getHoursArr().length;
6161
+ async setSearchGroup(e) {
6162
+ const i = this.searchGroups.find((n) => n.id === e);
6163
+ i ? this.searchGroup = i : this.searchGroup = new Tt();
5981
6164
  }
5982
- getHourHeight() {
5983
- return this.timelinePxHeight * this.timelines.length;
6165
+ async reproduceFromRoute() {
6166
+ this.setQuery(), await this.setSearchGroup(Ot.Route().query.groupId);
5984
6167
  }
5985
- getHoursArr() {
5986
- return dt.GenerateNumsRange(this.startHour, this.endHour);
6168
+ setQuery() {
6169
+ const e = Ot.Route().query.query;
6170
+ e && (this.query = e);
5987
6171
  }
5988
- };
5989
- const Bd = ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"];
5990
- class Jt {
5991
- constructor(e) {
5992
- a(this, "locale", "ru-RU");
5993
- this.locale = e ?? this.locale;
6172
+ }
6173
+ let rh = class {
6174
+ constructor() {
6175
+ a(this, "isSearchDrawerOpen", P(!1));
6176
+ a(this, "searchModel", ke(new gn()));
6177
+ a(this, "searchGroups", ke([]));
6178
+ a(this, "count", 0);
5994
6179
  }
5995
- format(e, i) {
5996
- if (!e)
5997
- return "";
5998
- const n = { year: "numeric", month: "2-digit", day: "2-digit", hour: void 0, minute: void 0 };
5999
- return i && (n.year = i.year || i.year === void 0 ? i.year : n.year, n.month = i.month || i.month === void 0 ? i.month : n.month, n.day = i.day || i.day === void 0 ? i.day : n.day, n.hour = i.hour ?? n.hour, n.minute = i.minute ?? n.minute), Intl.DateTimeFormat(this.locale, n).format(new Date(e));
6180
+ async Search(e) {
6181
+ const i = await Ie.Get({ query: `?key=${e.key}&query=${e.query}` });
6182
+ i && i.searchGroup && i.searchGroup.options.forEach((n) => {
6183
+ e.searchObjects.push({ id: n.id, value: n.value, label: n.label, description: n.description });
6184
+ });
6000
6185
  }
6001
- getPeriod(e, i, n) {
6002
- return `${this.format(e, n)}-${this.format(i, n)}`;
6186
+ async mainSearch(e) {
6187
+ this.SetSearchModel(await Ie.Get({ query: `/main?searchModel=${e.toUrl()}` }));
6003
6188
  }
6004
- getShortDayName(e) {
6005
- return e ? Bd[e.getDay()] : "";
6189
+ async Full(e) {
6190
+ e.options = [], e.searchGroups.forEach((n) => {
6191
+ n.options = [];
6192
+ });
6193
+ const i = await Ie.Get({ query: `main?searchModel=${e.toUrl()}` });
6194
+ this.SetSearchModel(i);
6006
6195
  }
6007
- getCurrentWeekPeriod(e) {
6008
- const i = /* @__PURE__ */ new Date(), n = new Date(i.getFullYear(), i.getMonth(), i.getDate() - i.getDay() + 1), s = new Date(i.getFullYear(), i.getMonth(), n.getDate() + 7);
6009
- return this.getPeriod(n, s, e || { month: "2-digit", day: "numeric", year: void 0 });
6196
+ ToggleDrawer(e) {
6197
+ this.isSearchDrawerOpen.value = e, this.searchModel = new gn();
6010
6198
  }
6011
- getDurationInDay(e, i) {
6012
- const n = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date(), r = Jt.SplitHourTime(e), o = Jt.SplitHourTime(i);
6013
- return n.setHours(r[0], r[1], 0, 0), s.setHours(o[0], o[1], 0, 0), (s.getTime() - n.getTime()) / 1e3 / 60;
6199
+ SetSearchModel(e) {
6200
+ e && (this.searchModel = new gn(e));
6014
6201
  }
6015
- static HourTimeinMunutes(e) {
6016
- const i = Jt.SplitHourTime(e);
6017
- return i[0] * 60 + i[1];
6202
+ SetSearchGroups() {
6018
6203
  }
6019
- static SplitHourTime(e) {
6020
- const i = e.split(":");
6021
- return [Number(i[0]), Number(i[1])];
6204
+ IsSearchDrawerOpen() {
6205
+ return this.isSearchDrawerOpen;
6022
6206
  }
6023
- static AddMinutesToHM(e, i) {
6024
- const n = /* @__PURE__ */ new Date(), s = Jt.SplitHourTime(e);
6025
- n.setHours(s[0], s[1], 0, 0);
6026
- const r = new Date(n.getTime() + i * 6e4), o = r.getHours(), l = r.getMinutes();
6027
- return `${o}:${l}`;
6207
+ SearchModel() {
6208
+ return this.searchModel;
6028
6209
  }
6029
- getMonthsDiff(e, i) {
6030
- return i.getMonth() - e.getMonth() + 12 * (i.getFullYear() - e.getFullYear());
6210
+ SearchGroups() {
6211
+ return this.searchGroups;
6031
6212
  }
6032
- stringToDate(e) {
6033
- const i = e.split(".");
6034
- return /* @__PURE__ */ new Date(`${i[2]}-${i[1]}-${i[0]}`);
6213
+ Count() {
6214
+ return this.count;
6035
6215
  }
6036
- }
6037
- const Ln = (t) => t === 8 || t === 46, Nd = (t) => t > 46 && t < 58, Hd = (t) => t > 34 && t < 41, qd = (t) => t + ".", Ud = (t, e, i) => {
6038
- Ln(e) || Hd(e) || (!Nd(e) || i > 9) && t.preventDefault();
6039
6216
  };
6040
- function Wd(t, e) {
6041
- if (e > 8) {
6042
- let i = t.substring(0, 2).replace(".", "1");
6043
- Number(i) > 31 && (i = "31");
6044
- let n = t.substring(3, 5).replace(".", "1");
6045
- Number(n) > 12 && (n = "12");
6046
- let s = t.substring(6, 10).replace(".", "1");
6047
- Number(s) > 2100 && (s = "2100"), t = i + "." + n + "." + s;
6217
+ const Ln = new rh();
6218
+ class is {
6219
+ constructor(e) {
6220
+ a(this, "id");
6221
+ a(this, "login", "");
6222
+ a(this, "email", "");
6223
+ a(this, "password", "");
6224
+ R.BuildClass(this, e);
6048
6225
  }
6049
- return t;
6050
- }
6051
- function O0(t) {
6052
- const e = t.keyCode;
6053
- let i = t.srcElement.value;
6054
- const n = i.length;
6055
- Ud(t, e, n), !Ln(e) && (n === 2 || n === 5) && (i = qd(i));
6056
- const s = t.srcElement.value + String.fromCharCode(t.which);
6057
- if (Ln(e)) {
6058
- t.srcElement.value = i;
6059
- return;
6226
+ static Create() {
6227
+ const e = new is();
6228
+ return e.id = R.CreateUUID(), e;
6060
6229
  }
6061
- i.length === 0 && Number(s) > 3 && (i = "3", t.preventDefault()), i.length === 1 && Number(s) > 31 && (i = "31", t.preventDefault()), s.length === 5 && Number(s.substring(3, 5)) > 12 && (i = i.substring(0, 3) + "12", t.preventDefault()), i = Wd(i, n), t.srcElement.value = i;
6062
6230
  }
6063
- class Mo {
6064
- static GetPeriod(e, i) {
6065
- return Ti.Get(lt.Format(e), lt.Format(i));
6231
+ let oh = class extends ae {
6232
+ constructor() {
6233
+ super(is, "users-accounts");
6066
6234
  }
6067
- static GetDateOrToday(e) {
6068
- return e ? e.date : /* @__PURE__ */ new Date();
6235
+ };
6236
+ const ah = new oh();
6237
+ let lh = class extends ae {
6238
+ constructor() {
6239
+ super(Rr, "value-types");
6069
6240
  }
6070
- static InPeriod(e, i, n) {
6071
- return Ti.In(new Date(e), new Date(i), new Date(n));
6241
+ };
6242
+ const uh = new lh();
6243
+ class Ji {
6244
+ constructor() {
6245
+ a(this, "Auth", Ad);
6246
+ a(this, "Contacts", Ed);
6247
+ a(this, "Emails", po);
6248
+ a(this, "FileInfos", Fd);
6249
+ a(this, "FTSPPresets", Dd);
6250
+ a(this, "Humans", Od);
6251
+ a(this, "Menus", Jd);
6252
+ a(this, "Phones", Co);
6253
+ a(this, "Schemas", ih);
6254
+ a(this, "Search", Ln);
6255
+ a(this, "UserAccounts", ah);
6256
+ a(this, "ValueTypes", uh);
6072
6257
  }
6073
- static GetDatesFromPeriod(e, i) {
6074
- const n = [new Date(e)];
6075
- let s = e;
6076
- for (; s <= i; )
6077
- s = Mo.AddDays(s, 1), n.push(s);
6078
- return n;
6258
+ static Extend(e) {
6259
+ let i;
6260
+ for (i in e)
6261
+ Object.defineProperty(Ji, i, {
6262
+ // key: stores[key],
6263
+ [i]: {
6264
+ get: () => e[i]
6265
+ }
6266
+ });
6079
6267
  }
6080
- static AddDays(e, i) {
6081
- const n = new Date(e);
6082
- return n.setDate(n.getDate() + i), n;
6268
+ }
6269
+ Ji.Extend(Md);
6270
+ class ch {
6271
+ constructor() {
6272
+ a(this, "title", "");
6273
+ // showBackButton? = false;
6274
+ a(this, "buttons", []);
6083
6275
  }
6084
- static Eq(e, i) {
6085
- return e.getTime() === i.getTime();
6276
+ // count? = 0;
6277
+ Set(e = "", i) {
6278
+ typeof e == "function" ? this.title = e() : typeof e == "string" ? this.title = e : this.title = e.value, this.buttons = i;
6086
6279
  }
6087
6280
  }
6088
- class B0 {
6281
+ const dh = new ch();
6282
+ class hh {
6089
6283
  constructor() {
6090
- a(this, "dragged", !1);
6091
- a(this, "dragImg", new Image());
6092
- this.dragImg.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
6284
+ a(this, "menu", []);
6285
+ a(this, "path", "");
6286
+ a(this, "isOpen", !0);
6287
+ a(this, "filterString", "");
6093
6288
  }
6094
- start(e) {
6095
- this.dragged = !0, e && e.dataTransfer && e.dataTransfer.setDragImage(this.dragImg, 0, 0);
6289
+ Set(e) {
6290
+ this.menu = e;
6096
6291
  }
6097
- end() {
6098
- this.dragged = !1;
6292
+ Get() {
6293
+ return this.filterString ? this.filterMenu() : this.menu;
6099
6294
  }
6100
- isDragged() {
6101
- return this.dragged;
6295
+ filterMenu() {
6296
+ return this.menu.filter((e) => {
6297
+ var i;
6298
+ return te.SearchIn(e.name, this.filterString) || ((i = e.children) == null ? void 0 : i.some((n) => te.SearchIn(n.name, this.filterString)));
6299
+ });
6102
6300
  }
6103
- }
6104
- class Vd {
6105
- static Get(e) {
6106
- const i = e.split(".");
6107
- return i[i.length - 1];
6301
+ IsOpen() {
6302
+ return this.isOpen;
6108
6303
  }
6109
- }
6110
- const N0 = /* @__PURE__ */ (() => {
6111
- function t(r, o) {
6112
- localStorage.setItem(`${r}_favourite`, o.toString());
6304
+ Toggle() {
6305
+ this.isOpen = !this.isOpen;
6113
6306
  }
6114
- function e(r, o) {
6115
- const l = localStorage.getItem(`${r}_favourite`);
6116
- return l ? l.split(",").includes(o) : !1;
6307
+ SetPath(e) {
6308
+ this.path = e;
6117
6309
  }
6118
- function i(r, o) {
6119
- const l = localStorage.getItem(`${r}_favourite`);
6120
- if (!l) {
6121
- t(r, [o]);
6122
- return;
6123
- }
6124
- const u = l.split(",");
6125
- u.push(o), t(r, u);
6310
+ GetPath() {
6311
+ return this.path;
6126
6312
  }
6127
- function n(r, o) {
6128
- const l = localStorage.getItem(`${r}_favourite`);
6129
- if (!l)
6130
- return;
6131
- const u = l.split(",").filter((c) => c !== o);
6132
- t(r, u);
6313
+ SetFilter(e) {
6314
+ this.filterString = e;
6133
6315
  }
6134
- function s() {
6135
- for (const r in localStorage)
6136
- r.includes("_favourite") && localStorage.removeItem(r);
6316
+ GetChildren(e) {
6317
+ var i;
6318
+ return this.filterString ? (i = e.children) == null ? void 0 : i.filter((n) => te.SearchIn(n.name, this.filterString)) : e.children;
6137
6319
  }
6138
- return {
6139
- addToFavourite: i,
6140
- removeFromFavourite: n,
6141
- setFavourite: t,
6142
- isFavourite: e,
6143
- clearFavourite: s
6144
- };
6145
- })();
6146
- function Gd(t, e) {
6147
- const i = [];
6148
- if (t)
6149
- for (let n = 0; n < Math.ceil(t.length / e); n++)
6150
- i[n] = t.slice(n * e, n * e + e);
6151
- return i;
6152
- }
6153
- function H0(t, e) {
6154
- t[e].order = e - 1, t[e - 1] && (t[e - 1].order = e), [t[e], t[e - 1]] = [t[e - 1], t[e]];
6155
6320
  }
6156
- function q0(t, e) {
6157
- t[e].order = e + 1, t[e + 1] && (t[e + 1].order = e), [t[e], t[e + 1]] = [t[e + 1], t[e]];
6321
+ const fh = new hh();
6322
+ class mh {
6323
+ constructor() {
6324
+ a(this, "Menu", fh);
6325
+ a(this, "Head", dh);
6326
+ }
6158
6327
  }
6159
- let jd = class {
6160
- async Login(e) {
6161
- const i = e ?? B.Auth.Form.GetValues(), n = await Ie.Post({
6162
- query: "auth/login",
6163
- payload: i
6164
- });
6165
- if (!n)
6166
- throw B.Notification.Error("Ошибка авторизации"), "Ошибка авторизации";
6167
- B.Auth.Status.SetState(n);
6328
+ const Io = new mh();
6329
+ class Ro {
6330
+ constructor() {
6331
+ a(this, "visible", !1);
6168
6332
  }
6169
- async LoginAs(e) {
6170
- if (!await Ie.Post({
6171
- query: "auth/login-as",
6172
- payload: { email: e }
6173
- })) {
6174
- B.Notification.Error("Ошибка авторизации");
6175
- return;
6176
- }
6333
+ hide() {
6334
+ this.visible = !1;
6177
6335
  }
6178
- async Register() {
6336
+ show() {
6337
+ this.hide(), this.visible = !0;
6179
6338
  }
6180
- async RestorePassword() {
6339
+ IsVisible() {
6340
+ return this.visible;
6181
6341
  }
6182
- async passwordChange() {
6183
- await Ie.Put({
6184
- query: "auth/password-change"
6185
- // payload: { id: userId, email: PHelp.AuthForm.Email().email, password: PHelp.AuthForm.Password().password },
6186
- });
6342
+ }
6343
+ class Ao extends Ro {
6344
+ constructor() {
6345
+ super(...arguments);
6346
+ a(this, "type", Pe.Success);
6347
+ a(this, "text", "");
6348
+ a(this, "title", "");
6187
6349
  }
6188
- async RefreshToken() {
6189
- await Ie.Post({
6190
- query: "auth/refresh-token",
6191
- payload: { refreshToken: Pi.getRefreshToken() }
6192
- });
6350
+ showMessage(i, n) {
6351
+ this.hide(), this.type = n, typeof i == "string" ? this.text = i : (this.text = i.text, this.title = i.title ?? ""), super.show();
6193
6352
  }
6194
- async CheckUuid(e) {
6195
- await Ie.Get({ query: `auth/check-uuid/${e.userId}/${e.uniqueId}` });
6353
+ GetText() {
6354
+ return this.text;
6196
6355
  }
6197
- };
6198
- const _d = new jd();
6199
- let Zd = class extends ae {
6200
- constructor() {
6201
- super(ei, "contacts");
6356
+ GetTitle() {
6357
+ return this.title;
6202
6358
  }
6203
- };
6204
- const Yd = new Zd();
6205
- let Jd = class extends ae {
6206
- constructor() {
6207
- super(Ft, "emails");
6359
+ GetType() {
6360
+ return this.type;
6208
6361
  }
6209
- };
6210
- const ko = new Jd();
6211
- let Xd = class extends ae {
6212
- constructor() {
6213
- super(ge, "file-infos");
6362
+ Info(i) {
6363
+ this.showMessage(i, Pe.Info);
6214
6364
  }
6215
- };
6216
- const Qd = new Xd();
6217
- class ts {
6218
- constructor(e) {
6219
- a(this, "id");
6220
- a(this, "ftsp");
6221
- a(this, "name", "");
6222
- R.BuildClass(this, e);
6365
+ Success(i) {
6366
+ this.showMessage(i, Pe.Success);
6223
6367
  }
6224
- static Create(e) {
6225
- const i = new ts();
6226
- return i.id = R.CreateUUID(), i.ftsp = JSON.stringify(e), i;
6368
+ Error(i) {
6369
+ this.showMessage(i, Pe.Error);
6370
+ }
6371
+ Warning(i) {
6372
+ this.showMessage(i, Pe.Warning);
6373
+ }
6374
+ // eslint-disable-next-line
6375
+ FormMessage(i) {
6376
+ let n = "<strong>Проверьте правильность введенных данных:</strong><ul>";
6377
+ for (const s of Object.keys(i))
6378
+ i[s][0] && i[s][0].message && (n += `<li>${i[s][0].message}</li>`);
6379
+ return n += "</ul>", n;
6227
6380
  }
6228
6381
  }
6229
- let Kd = class extends ae {
6382
+ class ph extends Ao {
6230
6383
  constructor() {
6231
- super(ts, "ftsp-presets");
6384
+ super(...arguments);
6385
+ a(this, "confirmButtonText", "Да");
6386
+ a(this, "cancelButtonText", "Нет");
6387
+ // eslint-disable-next-line
6388
+ a(this, "resolve");
6389
+ // eslint-disable-next-line
6390
+ a(this, "reject");
6391
+ }
6392
+ GetConfirmButtonText() {
6393
+ return this.confirmButtonText;
6394
+ }
6395
+ GetCancelButtonText() {
6396
+ return this.cancelButtonText;
6232
6397
  }
6233
- };
6234
- const eh = new Kd();
6235
- let th = class extends ae {
6236
- constructor() {
6237
- super(kr, "humans");
6398
+ Show(i) {
6399
+ return super.show(), typeof i != "string" && (this.confirmButtonText = i.confirmButtonText, this.cancelButtonText = i.cancelButtonText), new Promise((n, s) => {
6400
+ this.resolve = n, this.reject = s;
6401
+ });
6238
6402
  }
6239
- };
6240
- const ih = new th();
6241
- class Io {
6242
- constructor(e) {
6243
- a(this, "id");
6244
- a(this, "name", "");
6245
- a(this, "order", 0);
6246
- a(this, "downloadToFile", !1);
6247
- a(this, "pageSectionId");
6248
- // pageSection: IPageSection = new PageSection();
6249
- a(this, "scan", new ge());
6250
- a(this, "scanId");
6251
- e && (this.id = e == null ? void 0 : e.id, this.name = e.name, this.order = e.order, this.downloadToFile = e.downloadToFile, this.pageSectionId = e.pageSectionId, e.scan && (this.scan = new ge(e.scan)), this.scanId = e.scanId);
6403
+ Save() {
6404
+ return this.Show({
6405
+ text: вас есть несохранённые изменения",
6406
+ confirmButtonText: "Сохранить",
6407
+ cancelButtonText: "Не сохранять"
6408
+ });
6252
6409
  }
6253
- getFileInfos() {
6254
- return [this.scan];
6410
+ Submit() {
6411
+ this.resolve(!0), this.hide();
6255
6412
  }
6256
- uploadScan(e) {
6257
- return this.scan.id || (this.scan.id = $e()), this.scan.originalName = e.name, this.scan.file = e.raw, this.scan.fileSystemPath = $e(), this.scan.url = e.url, this.scan;
6413
+ Cancel() {
6414
+ this.reject(), this.hide();
6258
6415
  }
6259
- getFileName() {
6260
- return this.name ? this.name : this.scan.originalName;
6416
+ hide() {
6417
+ this.resolve = void 0, this.reject = void 0, super.hide();
6261
6418
  }
6262
6419
  }
6263
- class nh {
6264
- constructor(e) {
6265
- a(this, "id");
6266
- a(this, "documentType", new Mt());
6267
- a(this, "documentTypeId");
6268
- a(this, "order", 0);
6269
- R.BuildClass(this, e);
6420
+ const $o = new ph();
6421
+ class gh extends Ro {
6422
+ Show() {
6423
+ super.show();
6270
6424
  }
6271
- getFileInfos() {
6272
- const e = [];
6273
- return e.push(...this.documentType.getFileInfos()), e;
6425
+ Hide() {
6426
+ super.hide();
6274
6427
  }
6275
6428
  }
6276
- var sh = Object.defineProperty, Ro = (t, e, i, n) => {
6277
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6278
- (o = t[r]) && (s = o(e, i, s) || s);
6279
- return s && sh(e, i, s), s;
6280
- };
6281
- class Mt {
6282
- constructor(e) {
6283
- a(this, "id");
6284
- a(this, "name", "");
6285
- a(this, "singleScan", !1);
6286
- a(this, "scan");
6287
- a(this, "scanId");
6288
- a(this, "order", 0);
6289
- a(this, "description", "");
6290
- a(this, "scans", []);
6291
- a(this, "scansForDelete", []);
6292
- a(this, "pageSectionDocuments", []);
6293
- a(this, "pageSectionDocumentsForDelete", []);
6294
- a(this, "pageSectionImages", []);
6295
- a(this, "pageSectionImagesForDelete", []);
6296
- // pageSideMenu: IPageSideMenu = new PageSideMenu();
6297
- a(this, "pageSideMenuId");
6298
- a(this, "pageId");
6299
- a(this, "text", "");
6300
- a(this, "documents", []);
6301
- R.BuildClass(this, e), this.documents = this.pageSectionDocuments, this.text = this.description.replace("<p>undefined</p>", "");
6429
+ const Eo = new gh();
6430
+ class Ti {
6431
+ static Get(e, i, n = "-") {
6432
+ return !e || !i ? "" : `${e}${n}${i}`;
6302
6433
  }
6303
- addDocument() {
6304
- const e = new Io();
6305
- e.order = this.pageSectionDocuments.length - 1, this.pageSectionDocuments.push(e);
6434
+ static In(e, i, n) {
6435
+ return e >= i && e <= n;
6306
6436
  }
6307
- getFileInfos() {
6308
- const e = [];
6309
- return this.pageSectionDocuments.forEach((i) => {
6310
- e.push(...i.getFileInfos());
6311
- }), e;
6437
+ static Intersects(e, i, n, s) {
6438
+ return e === n || i === s || e > n && e < s || i > n && i < s || i > s && e < n;
6312
6439
  }
6313
- infoExists(e) {
6314
- const i = te.SearchIn(this.name, e), n = te.SearchIn(this.description, e), s = this.getDocuments(e);
6315
- return i || n || s.length > 0;
6440
+ }
6441
+ const Po = 1e3, To = 60 * Po, vn = 60 * To;
6442
+ var ni = /* @__PURE__ */ ((t) => (t.FiveMinutes = "5", t.HourQuarter = "15", t.HourHalf = "30", t.Hour = "60", t))(ni || {});
6443
+ const Fi = {
6444
+ 5: ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"],
6445
+ 15: ["00", "15", "30", "45"],
6446
+ 30: ["00", "30"],
6447
+ 60: ["00"]
6448
+ };
6449
+ class ee {
6450
+ static S(e) {
6451
+ return Po * e;
6316
6452
  }
6317
- getDocuments(e) {
6318
- return this.pageSectionDocuments.filter((i) => te.SearchIn(i.name, e));
6453
+ static M(e) {
6454
+ return To * e;
6319
6455
  }
6320
- getDescription(e) {
6321
- return e ? te.WrapSubStr(this.description, e) : this.description;
6456
+ static H(e) {
6457
+ return vn * e;
6322
6458
  }
6323
- filter(e) {
6324
- if (!e) {
6325
- this.text = this.description, this.documents = this.pageSectionDocuments;
6326
- return;
6327
- }
6328
- this.text = te.SearchIn(this.description, e) ? te.WrapSubStr(this.description, e) : "", this.documents = this.pageSectionDocuments.filter((i) => te.SearchIn(i.name, e));
6459
+ static D(e) {
6460
+ return vn * e;
6329
6461
  }
6330
- }
6331
- Ro([
6332
- R.GetClassConstructor(Io)
6333
- ], Mt.prototype, "pageSectionDocuments");
6334
- Ro([
6335
- R.GetClassConstructor(nh)
6336
- ], Mt.prototype, "pageSectionImages");
6337
- class rh {
6338
- constructor(e) {
6339
- a(this, "id");
6340
- a(this, "document", new Mt());
6341
- a(this, "documentId");
6342
- a(this, "pageId");
6343
- R.BuildClass(this, e);
6462
+ static W(e) {
6463
+ return vn * e;
6344
6464
  }
6345
- static GetFileInfos(e) {
6346
- const i = [];
6347
- return e.forEach((n) => {
6348
- const s = n.document.scan;
6349
- s && i.push(s);
6350
- }), i;
6465
+ static NormalizeTime(e) {
6466
+ return String(e).padStart(2, "0");
6351
6467
  }
6352
- }
6353
- var oh = Object.defineProperty, ah = (t, e, i, n) => {
6354
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6355
- (o = t[r]) && (s = o(e, i, s) || s);
6356
- return s && oh(e, i, s), s;
6357
- };
6358
- class Ao {
6359
- constructor(e) {
6360
- a(this, "id");
6361
- a(this, "pageId");
6362
- a(this, "fileInfoId");
6363
- a(this, "fileInfo");
6364
- a(this, "description");
6365
- R.BuildClass(this, e);
6468
+ static HMtoM(e) {
6469
+ const i = ee.SplitHM(e);
6470
+ return i.length > 1 ? ee.HtoM(i[0]) + i[1] : ee.HtoM(i[0]);
6366
6471
  }
6367
- }
6368
- ah([
6369
- R.GetClassConstructor(ge)
6370
- ], Ao.prototype, "fileInfo");
6371
- var lh = Object.defineProperty, uh = (t, e, i, n) => {
6372
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6373
- (o = t[r]) && (s = o(e, i, s) || s);
6374
- return s && lh(e, i, s), s;
6375
- };
6376
- class Pt {
6377
- constructor(e) {
6378
- a(this, "id");
6379
- a(this, "name", "Новое меню");
6380
- a(this, "order", 0);
6381
- a(this, "description", "");
6382
- a(this, "routeAnchor", "");
6383
- a(this, "slug", "");
6384
- a(this, "pageSections", []);
6385
- a(this, "pageSectionsForDelete", []);
6386
- a(this, "showContent", !1);
6387
- a(this, "pageId");
6388
- a(this, "selected", !1);
6389
- a(this, "sections", []);
6390
- a(this, "text", "");
6391
- R.BuildClass(this, e), this.sections = this.pageSections, this.text = this.description.replace("<p>undefined</p>", "");
6472
+ static HtoM(e) {
6473
+ return Number(e) * 60;
6392
6474
  }
6393
- getFileInfos() {
6394
- const e = [];
6395
- return this.pageSections.forEach((i) => {
6396
- e.push(...i.getFileInfos());
6397
- }), e;
6475
+ static SplitHM(e) {
6476
+ if (!e)
6477
+ return [];
6478
+ const i = e.split(":");
6479
+ return [Number(i[0]), Number(i[1])];
6398
6480
  }
6399
- addPageSection() {
6400
- const e = new Mt();
6401
- e.order = this.pageSections.length + 1, e.name = `Новой раздел ${e.order}`, e.id = $e(), this.pageSections.push(e);
6481
+ static HmsToHm(e) {
6482
+ const i = ee.SplitHM(e);
6483
+ return ee.ConcatHM(i[0], i[1]);
6402
6484
  }
6403
- infoExists(e) {
6404
- const i = te.SearchIn(this.name, e), n = te.SearchIn(this.description, e), s = this.getPageSections(e).length > 0;
6405
- return i || n || s;
6485
+ static AddMtoHM(e, i) {
6486
+ const n = /* @__PURE__ */ new Date(), s = ee.SplitHM(e);
6487
+ n.setHours(s[0], s[1], 0, 0);
6488
+ const r = new Date(n.getTime() + i * 6e4), o = r.getHours(), l = r.getMinutes();
6489
+ return ee.ConcatHM(o, l);
6406
6490
  }
6407
- getPageSections(e) {
6408
- return e.length ? this.pageSections.filter((i) => i.infoExists(e)) : this.pageSections;
6491
+ static ConcatHM(e, i) {
6492
+ return `${e}:${ee.NormalizeTime(i)}`;
6409
6493
  }
6410
- filter(e) {
6411
- e.length ? (this.sections = this.pageSections.filter((i) => i.infoExists(e)), this.text = te.SearchIn(this.description, e) ? te.WrapSubStr(this.description, e) : "") : (this.sections = this.pageSections, this.text = this.description), this.sections.forEach((i) => i.filter(e));
6494
+ static DiffM(e, i) {
6495
+ return ee.Gt(i, e) ? ee.HMtoM(i) - ee.HMtoM(e) : ee.HMtoM(e) - ee.HMtoM(i);
6412
6496
  }
6413
- }
6414
- uh([
6415
- R.GetClassConstructor(Mt)
6416
- ], Pt.prototype, "pageSections");
6417
- var $o = /* @__PURE__ */ ((t) => (t.User = "USER", t.Admin = "ADMIN", t))($o || {});
6418
- class ch {
6419
- constructor(e) {
6420
- a(this, "id");
6421
- a(this, "name", $o.User);
6422
- a(this, "label", "");
6423
- a(this, "startPage", "");
6424
- R.BuildClass(this, e);
6497
+ static GetPeriod(e, i) {
6498
+ return Ti.Get(e, i);
6425
6499
  }
6426
- }
6427
- var dh = Object.defineProperty, Yi = (t, e, i, n) => {
6428
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6429
- (o = t[r]) && (s = o(e, i, s) || s);
6430
- return s && dh(e, i, s), s;
6431
- };
6432
- class Gt {
6433
- constructor(e) {
6434
- a(this, "id");
6435
- a(this, "title", "");
6436
- a(this, "content", "");
6437
- a(this, "slug", "");
6438
- a(this, "pagesGroup", "Без группы");
6439
- a(this, "link", "");
6440
- a(this, "withComments", !1);
6441
- a(this, "showContacts", !1);
6442
- a(this, "collaps", !1);
6443
- a(this, "showContent", !1);
6444
- a(this, "pageImages", []);
6445
- a(this, "pageImagesForDelete", []);
6446
- a(this, "pageImagesNames", []);
6447
- a(this, "pageSideMenus", []);
6448
- a(this, "menus", []);
6449
- a(this, "pageSideMenusForDelete", []);
6450
- a(this, "pageSections", []);
6451
- a(this, "pageSectionsForDelete", []);
6452
- a(this, "pageDocuments", []);
6453
- // @ClassHelper.GetClassConstructor(PageComment)
6454
- // pageComments: PageComment[] = [];
6455
- a(this, "contact", new ei());
6456
- a(this, "contactId");
6457
- a(this, "role", new ch());
6458
- a(this, "roleId");
6459
- //
6460
- a(this, "filterStr", "");
6461
- a(this, "activeMenuId", "");
6462
- R.BuildClass(this, e), this.menus = this.pageSideMenus;
6500
+ static Gt(e, i) {
6501
+ return ee.HMtoM(e) > ee.HMtoM(i);
6463
6502
  }
6464
- getActiveMenu() {
6465
- const e = this.pageSideMenus.find((i) => i.id === this.activeMenuId);
6466
- return e || this.pageSideMenus[0];
6503
+ static GtOrEq(e, i) {
6504
+ return ee.Gt(e, i) || ee.Eq(e, i);
6467
6505
  }
6468
- setActiveMenuId(e) {
6469
- this.activeMenuId = e;
6506
+ static Eq(e, i) {
6507
+ return ee.HMtoM(e) === ee.HMtoM(i);
6470
6508
  }
6471
- getLink() {
6472
- return this.slug !== "" ? `/pages/${this.slug}` : "404";
6509
+ static PeriodInPeriod(e, i, n, s) {
6510
+ return ee.HMtoM(e) >= ee.HMtoM(n) && ee.HMtoM(i) <= ee.HMtoM(s);
6473
6511
  }
6474
- getFileInfos() {
6475
- const e = [];
6476
- return this.pageSideMenus.forEach((i) => {
6477
- e.push(...i.getFileInfos());
6478
- }), this.pageDocuments.forEach((i) => {
6479
- i.document.scan && e.push(i.document.scan);
6480
- }), this.pageImages.forEach((i) => {
6481
- i.fileInfo && e.push(i.fileInfo);
6482
- }), e;
6512
+ static PeriodsIntersects(e, i, n, s) {
6513
+ return Ti.Intersects(ee.HMtoM(e), ee.HMtoM(i), ee.HMtoM(n), ee.HMtoM(s));
6483
6514
  }
6484
- addSideMenu() {
6485
- const e = new Pt();
6486
- return e.order = this.pageSideMenus.length + 1, e.name = `Новое меню ${e.order}`, e.id = $e(), this.pageSideMenus.push(e), e.id;
6515
+ }
6516
+ class Li {
6517
+ static Wait(e, i) {
6518
+ return new Promise((n) => setTimeout(() => n(i), e));
6487
6519
  }
6488
- selectSideMenu(e, i) {
6489
- if (!e && this.pageSideMenus.length > 0) {
6490
- this.pageSideMenus[0].selected = !0;
6491
- return;
6492
- }
6493
- this.pageSideMenus.forEach((n) => {
6494
- i ? n.selected = n.id === e : n.selected = n.slug === e;
6495
- });
6520
+ static WaitS(e, i) {
6521
+ return Li.Wait(ee.S(e), i);
6496
6522
  }
6497
- getSelectedSideMenu() {
6498
- const e = this.pageSideMenus.find((i) => i.selected);
6499
- return e || new Pt();
6523
+ static WaitM(e, i) {
6524
+ return Li.Wait(ee.M(e), i);
6500
6525
  }
6501
- //
6502
- addCustomSectionsToSideMenu(e) {
6503
- e.forEach((i) => {
6504
- const n = new Pt();
6505
- n.id = i.id, n.name = i.name, typeof i.order < "u" ? this.pageSideMenus.splice(i.order, 0, n) : this.pageSideMenus.push(n);
6506
- });
6526
+ }
6527
+ class vh extends Ao {
6528
+ constructor() {
6529
+ super(...arguments);
6530
+ a(this, "duration", ee.S(3));
6507
6531
  }
6508
- //
6509
- getPageSideMenus() {
6510
- if (this.showContacts && !this.pageSideMenus.find((e) => e.id === "contacts")) {
6511
- const e = new Pt();
6512
- e.id = "contacts", e.name = "Контакты", this.pageSideMenus.push(e);
6513
- }
6514
- return this.filterStr === "" ? this.pageSideMenus : this.pageSideMenus.filter((e) => e.infoExists(this.filterStr));
6532
+ showMessage(i, n) {
6533
+ super.showMessage(i, n), typeof i != "string" && (this.duration = i.duration ?? this.duration), Li.Wait(this.GetDuration()).then(() => super.hide());
6515
6534
  }
6516
- filter() {
6517
- this.filterStr === "" ? this.menus = this.pageSideMenus : this.menus = this.pageSideMenus.filter((e) => e.infoExists(this.filterStr)), this.menus.forEach((e) => e.filter(this.filterStr));
6535
+ GetDuration() {
6536
+ return this.duration;
6518
6537
  }
6519
- static GetClassName() {
6520
- return "page";
6538
+ Dev() {
6539
+ const i = "В режиме разработки", n = Pe.Warning;
6540
+ super.showMessage(i, n);
6521
6541
  }
6522
- }
6523
- Yi([
6524
- R.GetClassConstructor(Ao)
6525
- ], Gt.prototype, "pageImages");
6526
- Yi([
6527
- R.GetClassConstructor(Pt)
6528
- ], Gt.prototype, "pageSideMenus");
6529
- Yi([
6530
- R.GetClassConstructor(Mt)
6531
- ], Gt.prototype, "pageSections");
6532
- Yi([
6533
- R.GetClassConstructor(rh)
6534
- ], Gt.prototype, "pageDocuments");
6535
- class Eo {
6536
- constructor(e) {
6537
- a(this, "id");
6538
- a(this, "name", "");
6539
- a(this, "link", "");
6540
- a(this, "selected", !1);
6541
- a(this, "hide", !1);
6542
- a(this, "editMode", !1);
6543
- a(this, "color", "");
6544
- a(this, "background", "");
6545
- a(this, "page", new Gt());
6546
- a(this, "pageId");
6547
- a(this, "order", 0);
6548
- a(this, "menuId");
6549
- a(this, "iconId");
6550
- a(this, "icon", new ge());
6551
- a(this, "iconName", "");
6552
- a(this, "svgCode", "");
6553
- R.BuildClass(this, e);
6542
+ Save() {
6543
+ const i = "Изменения успешно сохранены", n = Pe.Success;
6544
+ super.showMessage(i, n);
6554
6545
  }
6555
- getLink() {
6556
- return this.isLink() && !this.isPageLink() ? this.link : !this.isLink() && this.isPageLink() ? this.page.getLink() : "";
6546
+ }
6547
+ const Fo = new vh();
6548
+ class yh {
6549
+ constructor() {
6550
+ a(this, "limit", 25);
6551
+ a(this, "count", 0);
6552
+ a(this, "curPage", 1);
6553
+ a(this, "storeModule", "");
6557
6554
  }
6558
- isLink() {
6559
- return this.link !== "";
6555
+ setCurPage(e) {
6556
+ this.curPage = e;
6560
6557
  }
6561
- isPageLink() {
6562
- return this.pageId !== void 0 && this.pageId !== "";
6558
+ pagesCount() {
6559
+ return Math.ceil(this.count / this.limit) ?? 1;
6563
6560
  }
6564
- addFile(e) {
6565
- this.icon.id || (this.icon.id = $e()), this.icon.originalName = e.name, this.icon.file = e.raw;
6561
+ reset() {
6562
+ this.count = 0, this.curPage = 1;
6566
6563
  }
6567
6564
  }
6568
- var hh = Object.defineProperty, fh = (t, e, i, n) => {
6569
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6570
- (o = t[r]) && (s = o(e, i, s) || s);
6571
- return s && hh(e, i, s), s;
6572
- };
6573
- class Po {
6565
+ const Lo = new yh();
6566
+ class B {
6567
+ }
6568
+ a(B, "Auth", ke(mo)), a(B, "AdminUI", ke(Io)), a(B, "Dialog", ke($o)), a(B, "Notification", ke(Fo)), a(B, "Loading", ke(Eo)), a(B, "Paginator", ke(Lo)), a(B, "Store", Ji);
6569
+ function wh() {
6570
+ const t = P(!1), e = P(!1);
6571
+ return {
6572
+ confirmLeave: t,
6573
+ saveButtonClick: e,
6574
+ beforeWindowUnload: (r) => {
6575
+ t.value && r.preventDefault();
6576
+ },
6577
+ formUpdated: () => {
6578
+ t.value = !0;
6579
+ },
6580
+ showConfirmModal: (r, o) => {
6581
+ t.value && !e.value ? B.Dialog.Save().then(() => {
6582
+ r(), o();
6583
+ }).catch(() => {
6584
+ B.Notification.Warning("Изменения не были сохранены"), o();
6585
+ }) : o();
6586
+ }
6587
+ };
6588
+ }
6589
+ const H0 = (() => {
6590
+ const t = (r, o) => st(async () => {
6591
+ var l;
6592
+ be.Get().reset(), tt.Set(o == null ? void 0 : o.sortsLib), be.Get().setSortModel(tt.GetDefault()), tt.Set(o == null ? void 0 : o.sortsLib), be.Get().setSortModel(tt.GetDefault()), B.Paginator.storeModule = (l = o == null ? void 0 : o.pagination) == null ? void 0 : l.storeModule, await r();
6593
+ }), { saveButtonClick: e, showConfirmModal: i } = wh(), n = (r) => tu((o, l, u) => {
6594
+ i((r || s)(), u);
6595
+ }), s = (r) => async () => {
6596
+ e.value = !0;
6597
+ try {
6598
+ r && await r(), B.Notification.Success("Сохранено");
6599
+ } catch (o) {
6600
+ B.Notification.Success("Что-то пошло не так. " + o);
6601
+ return;
6602
+ }
6603
+ };
6604
+ return {
6605
+ onBeforeMount: t,
6606
+ onBeforeRouteLeave: n,
6607
+ submit: s
6608
+ };
6609
+ })(), Qs = ["#31af5e", "#ff4d3b", "#006BB5", "#f3911c"];
6610
+ function q0() {
6611
+ return Qs[Math.floor(Math.random() * Qs.length)];
6612
+ }
6613
+ function U0(t, e) {
6614
+ const i = [2, 0, 1, 1, 1, 2];
6615
+ return t.length + " " + e[t.length % 100 > 4 && t.length % 100 < 20 ? 2 : i[t.length % 10 < 5 ? t.length % 10 : 5]];
6616
+ }
6617
+ class W0 {
6574
6618
  constructor(e) {
6575
- a(this, "id");
6576
6619
  a(this, "name", "");
6577
- a(this, "link", "");
6578
- a(this, "top", !0);
6579
- a(this, "side", !0);
6580
- a(this, "show", !1);
6581
- a(this, "hide", !1);
6582
- a(this, "active", !1);
6583
- a(this, "order", 0);
6584
- a(this, "selected", !1);
6585
- a(this, "editMode", !1);
6586
- a(this, "page", new Gt());
6587
- a(this, "pageId");
6588
- a(this, "subMenus", []);
6589
- a(this, "subMenusForDelete", []);
6590
- a(this, "iconId");
6591
- a(this, "icon", new ge());
6592
6620
  R.BuildClass(this, e);
6593
6621
  }
6594
- getLink() {
6595
- return this.isLink() && !this.isPageLink() ? this.link : !this.isLink() && this.isPageLink() ? this.page.getLink() : "";
6596
- }
6597
- withoutChildren() {
6598
- return this.subMenus.length === 0;
6599
- }
6600
- isLink() {
6601
- return this.link !== "";
6622
+ cache() {
6602
6623
  }
6603
- isPageLink() {
6604
- return !!this.pageId && this.pageId !== "";
6624
+ getFromCache(e) {
6625
+ const i = sessionStorage.getItem(this.name);
6626
+ if (i) {
6627
+ const n = JSON.parse(i), s = /* @__PURE__ */ new Date(), r = new Date(n.time), o = s.getTime() - r.getTime();
6628
+ return Math.round(o / 6e4) > (e || 10) ? null : n.data;
6629
+ } else
6630
+ return null;
6605
6631
  }
6606
- getFileInfos() {
6607
- const e = [];
6608
- return e.push(this.icon), this.subMenus.forEach((i) => {
6609
- e.push(i.icon);
6610
- }), e;
6632
+ async storeGetWithCache(e, i) {
6633
+ let n;
6634
+ return n = this.getFromCache(i), n || (n = await e(), n && this.cache()), n;
6611
6635
  }
6612
- addFile(e) {
6613
- this.icon.id || (this.icon.id = $e()), this.icon.originalName = e.name, this.icon.file = e.raw;
6636
+ }
6637
+ function V0(t, e) {
6638
+ t == "left" && e.next(), t == "right" && e.prev();
6639
+ }
6640
+ const bh = ["#31af5e", "#ff4d3b", "#006BB5", "#f3911c"];
6641
+ class G0 {
6642
+ static GetRandColor(e) {
6643
+ return dt.GetRandEL(e ?? bh);
6614
6644
  }
6615
- addSubMenu() {
6616
- this.subMenus.push(new Eo());
6645
+ }
6646
+ function j0(t) {
6647
+ const e = t.filter((s) => s.rating !== 0);
6648
+ let i = 0;
6649
+ e.forEach((s) => i = i + s.rating);
6650
+ const n = i / e.length;
6651
+ return isNaN(n) ? 0 : Number((i / e.length).toFixed(2));
6652
+ }
6653
+ let _0 = class {
6654
+ constructor() {
6655
+ a(this, "startHour", 9);
6656
+ a(this, "endHour", 19);
6657
+ a(this, "timelinePxHeight", 50);
6658
+ a(this, "timelineStep", ni.FiveMinutes);
6659
+ a(this, "activeTime", "");
6660
+ a(this, "activeObjectId", "");
6661
+ a(this, "dragged", !1);
6662
+ a(this, "draggedStartTime", "");
6663
+ a(this, "draggedEndTime", "");
6664
+ a(this, "timelines", Fi[ni.FiveMinutes]);
6617
6665
  }
6618
- removeSubMenu(e) {
6619
- const i = this.subMenus[e].id;
6620
- i && this.subMenusForDelete.push(i), this.subMenus.splice(e, 1);
6666
+ startDrag(e, i) {
6667
+ this.draggedStartTime = e, this.draggedEndTime = i, this.dragged = !0;
6621
6668
  }
6622
- setColorsForSubMenus() {
6623
- const e = ["#00A248", "#E63021", "#006BB5", "#F3911F", "#6F6D6B"];
6624
- let i = 0;
6625
- this.subMenus.forEach((n) => {
6626
- n.color = e[i], i = e.length - 1 ? i = 0 : i++;
6627
- });
6669
+ endDrag() {
6670
+ this.activeTime = "", this.dragged = !1;
6628
6671
  }
6629
- containPath(e) {
6630
- return this.getLink() === e || !!this.subMenus.find((i) => i.getLink() === e);
6672
+ setTimelineStep(e) {
6673
+ this.timelineStep = e, this.setTimelines();
6631
6674
  }
6632
- static GetClassName() {
6633
- return "menu";
6675
+ setTimelines() {
6676
+ this.timelines = Fi[this.timelineStep];
6634
6677
  }
6635
- }
6636
- fh([
6637
- R.GetClassConstructor(Eo)
6638
- ], Po.prototype, "subMenus");
6639
- let mh = class extends ae {
6640
- constructor() {
6641
- super(Po, "menus");
6678
+ getScheduleHeight() {
6679
+ return this.getHourHeight() * this.getHoursArr().length;
6642
6680
  }
6643
- };
6644
- const ph = new mh();
6645
- let gh = class extends ae {
6646
- constructor() {
6647
- super(Lt, "phones");
6681
+ getHourHeight() {
6682
+ return this.timelinePxHeight * this.timelines.length;
6648
6683
  }
6649
- };
6650
- const To = new gh();
6651
- class vh {
6652
- constructor(e) {
6653
- a(this, "id");
6654
- a(this, "nameRus", "");
6655
- R.BuildClass(this, e);
6684
+ getHoursArr() {
6685
+ return dt.GenerateNumsRange(this.startHour, this.endHour);
6656
6686
  }
6657
- }
6658
- var yh = Object.defineProperty, wh = (t, e, i, n) => {
6659
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6660
- (o = t[r]) && (s = o(e, i, s) || s);
6661
- return s && yh(e, i, s), s;
6662
6687
  };
6663
- class Fo {
6688
+ const Sh = ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"];
6689
+ class Jt {
6664
6690
  constructor(e) {
6665
- a(this, "id");
6666
- a(this, "nameRus", "");
6667
- a(this, "fields", []);
6668
- R.BuildClass(this, e);
6691
+ a(this, "locale", "ru-RU");
6692
+ this.locale = e ?? this.locale;
6669
6693
  }
6670
- }
6671
- wh([
6672
- R.GetClassConstructor(vh)
6673
- ], Fo.prototype, "fields");
6674
- let bh = class extends ae {
6675
- constructor() {
6676
- super(Fo, "schemas");
6694
+ format(e, i) {
6695
+ if (!e)
6696
+ return "";
6697
+ const n = { year: "numeric", month: "2-digit", day: "2-digit", hour: void 0, minute: void 0 };
6698
+ return i && (n.year = i.year || i.year === void 0 ? i.year : n.year, n.month = i.month || i.month === void 0 ? i.month : n.month, n.day = i.day || i.day === void 0 ? i.day : n.day, n.hour = i.hour ?? n.hour, n.minute = i.minute ?? n.minute), Intl.DateTimeFormat(this.locale, n).format(new Date(e));
6677
6699
  }
6678
- };
6679
- const Sh = new bh();
6680
- class Lo {
6681
- constructor(e) {
6682
- a(this, "id", "");
6683
- a(this, "value", "");
6684
- a(this, "label", "");
6685
- a(this, "key", "");
6686
- a(this, "description", "");
6687
- a(this, "route", "");
6688
- // searchGroup: SearchGroup = new SearchGroup();
6689
- a(this, "searchElementMetas", []);
6690
- R.BuildClass(this, e);
6700
+ getPeriod(e, i, n) {
6701
+ return `${this.format(e, n)}-${this.format(i, n)}`;
6691
6702
  }
6692
- }
6693
- class Ch {
6694
- constructor(e) {
6695
- a(this, "id");
6696
- a(this, "name", "");
6697
- a(this, "label", "");
6698
- R.BuildClass(this, e);
6703
+ getShortDayName(e) {
6704
+ return e ? Sh[e.getDay()] : "";
6699
6705
  }
6700
- }
6701
- var xh = Object.defineProperty, Do = (t, e, i, n) => {
6702
- for (var s = void 0, r = t.length - 1, o; r >= 0; r--)
6703
- (o = t[r]) && (s = o(e, i, s) || s);
6704
- return s && xh(e, i, s), s;
6705
- };
6706
- class Tt {
6707
- constructor(e) {
6708
- a(this, "id");
6709
- a(this, "key", "");
6710
- a(this, "label", "");
6711
- a(this, "order", 0);
6712
- a(this, "route", "");
6713
- a(this, "table", "");
6714
- a(this, "active", !0);
6715
- a(this, "searchColumn", "");
6716
- a(this, "descriptionColumn", "");
6717
- a(this, "labelColumn", "");
6718
- a(this, "valueColumn", "");
6719
- a(this, "options", []);
6720
- a(this, "searchGroupMetaColumns", []);
6721
- R.BuildClass(this, e);
6706
+ getCurrentWeekPeriod(e) {
6707
+ const i = /* @__PURE__ */ new Date(), n = new Date(i.getFullYear(), i.getMonth(), i.getDate() - i.getDay() + 1), s = new Date(i.getFullYear(), i.getMonth(), n.getDate() + 7);
6708
+ return this.getPeriod(n, s, e || { month: "2-digit", day: "numeric", year: void 0 });
6722
6709
  }
6723
- }
6724
- Do([
6725
- R.GetClassConstructor(Lo)
6726
- ], Tt.prototype, "options");
6727
- Do([
6728
- R.GetClassConstructor(Ch)
6729
- ], Tt.prototype, "searchGroupMetaColumns");
6730
- class vn {
6731
- constructor(e) {
6732
- a(this, "query", "");
6733
- a(this, "key", "");
6734
- a(this, "params", "");
6735
- a(this, "suggester", !1);
6736
- a(this, "mustBeTranslated", !0);
6737
- a(this, "options", []);
6738
- a(this, "searchGroupId", "");
6739
- a(this, "searchGroups", []);
6740
- a(this, "searchGroup", new Tt());
6741
- a(this, "searchObjects", []);
6742
- a(this, "pagination", new Ai());
6743
- a(this, "count", 0);
6744
- e && (this.query = e.query, e.searchGroups && (this.searchGroups = e.searchGroups.map((i) => new Tt(i))), e.searchGroup && (this.searchGroup = new Tt(e.searchGroup)), e.options && (this.options = e.options.map((i) => new Lo(i))), this.count = e.count);
6710
+ getDurationInDay(e, i) {
6711
+ const n = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date(), r = Jt.SplitHourTime(e), o = Jt.SplitHourTime(i);
6712
+ return n.setHours(r[0], r[1], 0, 0), s.setHours(o[0], o[1], 0, 0), (s.getTime() - n.getTime()) / 1e3 / 60;
6745
6713
  }
6746
- toUrl() {
6747
- return JSON.stringify(this);
6714
+ static HourTimeinMunutes(e) {
6715
+ const i = Jt.SplitHourTime(e);
6716
+ return i[0] * 60 + i[1];
6748
6717
  }
6749
- async setSearchGroup(e) {
6750
- const i = this.searchGroups.find((n) => n.id === e);
6751
- i ? this.searchGroup = i : this.searchGroup = new Tt();
6718
+ static SplitHourTime(e) {
6719
+ const i = e.split(":");
6720
+ return [Number(i[0]), Number(i[1])];
6752
6721
  }
6753
- async reproduceFromRoute() {
6754
- this.setQuery(), await this.setSearchGroup(Ot.Route().query.groupId);
6722
+ static AddMinutesToHM(e, i) {
6723
+ const n = /* @__PURE__ */ new Date(), s = Jt.SplitHourTime(e);
6724
+ n.setHours(s[0], s[1], 0, 0);
6725
+ const r = new Date(n.getTime() + i * 6e4), o = r.getHours(), l = r.getMinutes();
6726
+ return `${o}:${l}`;
6755
6727
  }
6756
- setQuery() {
6757
- const e = Ot.Route().query.query;
6758
- e && (this.query = e);
6728
+ getMonthsDiff(e, i) {
6729
+ return i.getMonth() - e.getMonth() + 12 * (i.getFullYear() - e.getFullYear());
6730
+ }
6731
+ stringToDate(e) {
6732
+ const i = e.split(".");
6733
+ return /* @__PURE__ */ new Date(`${i[2]}-${i[1]}-${i[0]}`);
6759
6734
  }
6760
6735
  }
6761
- let Mh = class {
6762
- constructor() {
6763
- a(this, "isSearchDrawerOpen", P(!1));
6764
- a(this, "searchModel", ke(new vn()));
6765
- a(this, "searchGroups", ke([]));
6766
- a(this, "count", 0);
6736
+ const Dn = (t) => t === 8 || t === 46, Ch = (t) => t > 46 && t < 58, xh = (t) => t > 34 && t < 41, Mh = (t) => t + ".", kh = (t, e, i) => {
6737
+ Dn(e) || xh(e) || (!Ch(e) || i > 9) && t.preventDefault();
6738
+ };
6739
+ function Ih(t, e) {
6740
+ if (e > 8) {
6741
+ let i = t.substring(0, 2).replace(".", "1");
6742
+ Number(i) > 31 && (i = "31");
6743
+ let n = t.substring(3, 5).replace(".", "1");
6744
+ Number(n) > 12 && (n = "12");
6745
+ let s = t.substring(6, 10).replace(".", "1");
6746
+ Number(s) > 2100 && (s = "2100"), t = i + "." + n + "." + s;
6767
6747
  }
6768
- async Search(e) {
6769
- const i = await Ie.Get({ query: `?key=${e.key}&query=${e.query}` });
6770
- i && i.searchGroup && i.searchGroup.options.forEach((n) => {
6771
- e.searchObjects.push({ id: n.id, value: n.value, label: n.label, description: n.description });
6772
- });
6748
+ return t;
6749
+ }
6750
+ function Y0(t) {
6751
+ const e = t.keyCode;
6752
+ let i = t.srcElement.value;
6753
+ const n = i.length;
6754
+ kh(t, e, n), !Dn(e) && (n === 2 || n === 5) && (i = Mh(i));
6755
+ const s = t.srcElement.value + String.fromCharCode(t.which);
6756
+ if (Dn(e)) {
6757
+ t.srcElement.value = i;
6758
+ return;
6773
6759
  }
6774
- async mainSearch(e) {
6775
- this.SetSearchModel(await Ie.Get({ query: `/main?searchModel=${e.toUrl()}` }));
6760
+ i.length === 0 && Number(s) > 3 && (i = "3", t.preventDefault()), i.length === 1 && Number(s) > 31 && (i = "31", t.preventDefault()), s.length === 5 && Number(s.substring(3, 5)) > 12 && (i = i.substring(0, 3) + "12", t.preventDefault()), i = Ih(i, n), t.srcElement.value = i;
6761
+ }
6762
+ class Do {
6763
+ static GetPeriod(e, i) {
6764
+ return Ti.Get(lt.Format(e), lt.Format(i));
6776
6765
  }
6777
- async Full(e) {
6778
- e.options = [], e.searchGroups.forEach((n) => {
6779
- n.options = [];
6780
- });
6781
- const i = await Ie.Get({ query: `main?searchModel=${e.toUrl()}` });
6782
- this.SetSearchModel(i);
6766
+ static GetDateOrToday(e) {
6767
+ return e ? e.date : /* @__PURE__ */ new Date();
6783
6768
  }
6784
- ToggleDrawer(e) {
6785
- this.isSearchDrawerOpen.value = e, this.searchModel = new vn();
6769
+ static InPeriod(e, i, n) {
6770
+ return Ti.In(new Date(e), new Date(i), new Date(n));
6786
6771
  }
6787
- SetSearchModel(e) {
6788
- e && (this.searchModel = new vn(e));
6772
+ static GetDatesFromPeriod(e, i) {
6773
+ const n = [new Date(e)];
6774
+ let s = e;
6775
+ for (; s <= i; )
6776
+ s = Do.AddDays(s, 1), n.push(s);
6777
+ return n;
6789
6778
  }
6790
- SetSearchGroups() {
6779
+ static AddDays(e, i) {
6780
+ const n = new Date(e);
6781
+ return n.setDate(n.getDate() + i), n;
6791
6782
  }
6792
- IsSearchDrawerOpen() {
6793
- return this.isSearchDrawerOpen;
6783
+ static Eq(e, i) {
6784
+ return e.getTime() === i.getTime();
6794
6785
  }
6795
- SearchModel() {
6796
- return this.searchModel;
6786
+ }
6787
+ class J0 {
6788
+ constructor() {
6789
+ a(this, "dragged", !1);
6790
+ a(this, "dragImg", new Image());
6791
+ this.dragImg.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
6797
6792
  }
6798
- SearchGroups() {
6799
- return this.searchGroups;
6793
+ start(e) {
6794
+ this.dragged = !0, e && e.dataTransfer && e.dataTransfer.setDragImage(this.dragImg, 0, 0);
6800
6795
  }
6801
- Count() {
6802
- return this.count;
6796
+ end() {
6797
+ this.dragged = !1;
6803
6798
  }
6804
- };
6805
- const Dn = new Mh();
6806
- class is {
6807
- constructor(e) {
6808
- a(this, "id");
6809
- a(this, "login", "");
6810
- a(this, "email", "");
6811
- a(this, "password", "");
6812
- R.BuildClass(this, e);
6799
+ isDragged() {
6800
+ return this.dragged;
6813
6801
  }
6814
- static Create() {
6815
- const e = new is();
6816
- return e.id = R.CreateUUID(), e;
6802
+ }
6803
+ class Rh {
6804
+ static Get(e) {
6805
+ const i = e.split(".");
6806
+ return i[i.length - 1];
6817
6807
  }
6818
6808
  }
6819
- let kh = class extends ae {
6820
- constructor() {
6821
- super(is, "users-accounts");
6809
+ const X0 = /* @__PURE__ */ (() => {
6810
+ function t(r, o) {
6811
+ localStorage.setItem(`${r}_favourite`, o.toString());
6822
6812
  }
6823
- };
6824
- const Ih = new kh();
6825
- let Rh = class extends ae {
6826
- constructor() {
6827
- super(Rr, "value-types");
6813
+ function e(r, o) {
6814
+ const l = localStorage.getItem(`${r}_favourite`);
6815
+ return l ? l.split(",").includes(o) : !1;
6828
6816
  }
6829
- };
6830
- const Ah = new Rh();
6831
- class Ji {
6832
- constructor() {
6833
- a(this, "Auth", _d);
6834
- a(this, "Contacts", Yd);
6835
- a(this, "Emails", ko);
6836
- a(this, "FileInfos", Qd);
6837
- a(this, "FTSPPresets", eh);
6838
- a(this, "Humans", ih);
6839
- a(this, "Menus", ph);
6840
- a(this, "Phones", To);
6841
- a(this, "Schemas", Sh);
6842
- a(this, "Search", Dn);
6843
- a(this, "UserAccounts", Ih);
6844
- a(this, "ValueTypes", Ah);
6817
+ function i(r, o) {
6818
+ const l = localStorage.getItem(`${r}_favourite`);
6819
+ if (!l) {
6820
+ t(r, [o]);
6821
+ return;
6822
+ }
6823
+ const u = l.split(",");
6824
+ u.push(o), t(r, u);
6845
6825
  }
6846
- static Extend(e) {
6847
- for (const i in e)
6848
- Object.defineProperties(Ji, {
6849
- key: e[i]
6850
- // [key]: {
6851
- // get: () => stores[key],
6852
- // },
6853
- });
6826
+ function n(r, o) {
6827
+ const l = localStorage.getItem(`${r}_favourite`);
6828
+ if (!l)
6829
+ return;
6830
+ const u = l.split(",").filter((c) => c !== o);
6831
+ t(r, u);
6832
+ }
6833
+ function s() {
6834
+ for (const r in localStorage)
6835
+ r.includes("_favourite") && localStorage.removeItem(r);
6854
6836
  }
6837
+ return {
6838
+ addToFavourite: i,
6839
+ removeFromFavourite: n,
6840
+ setFavourite: t,
6841
+ isFavourite: e,
6842
+ clearFavourite: s
6843
+ };
6844
+ })();
6845
+ function Ah(t, e) {
6846
+ const i = [];
6847
+ if (t)
6848
+ for (let n = 0; n < Math.ceil(t.length / e); n++)
6849
+ i[n] = t.slice(n * e, n * e + e);
6850
+ return i;
6855
6851
  }
6856
- Ji.Extend(Md);
6857
- class gt {
6852
+ function Q0(t, e) {
6853
+ t[e].order = e - 1, t[e - 1] && (t[e - 1].order = e), [t[e], t[e - 1]] = [t[e - 1], t[e]];
6854
+ }
6855
+ function K0(t, e) {
6856
+ t[e].order = e + 1, t[e + 1] && (t[e + 1].order = e), [t[e], t[e + 1]] = [t[e + 1], t[e]];
6857
+ }
6858
+ class It {
6858
6859
  }
6859
- a(gt, "Auth", ke(mo)), a(gt, "AdminUI", ke(po)), a(gt, "Dialog", ke(yo)), a(gt, "Notification", ke(Co)), a(gt, "Loading", ke(wo)), a(gt, "Paginator", ke(xo)), a(gt, "Store", Ji);
6860
+ a(It, "Auth", ke(mo)), a(It, "AdminUI", ke(Io)), a(It, "Dialog", ke($o)), a(It, "Notification", ke(Fo)), a(It, "Loading", ke(Eo)), a(It, "Paginator", ke(Lo));
6860
6861
  const zi = class zi {
6861
6862
  static Format(e) {
6862
6863
  let i = e;
@@ -7148,7 +7149,7 @@ const Oo = /* @__PURE__ */ $({
7148
7149
  n.value = c, i("beforeChange", c), i("change", c);
7149
7150
  }, l = (u) => u.length != 10 ? (r.value = s, B.Notification.Error("Неверный формат даты"), !1) : Number(r.value.slice(0, 2)) > 31 ? (r.value = s, B.Notification.Error("Неверный день месяца"), !1) : Number(r.value.slice(3, 5)) > 12 ? (r.value = s, B.Notification.Error("Неверный месяц"), !1) : Number(r.value.slice(6, 10)) > 2100 ? (r.value = s, B.Notification.Error("Неверный год"), !1) : !0;
7150
7151
  return (u, c) => {
7151
- const d = xt;
7152
+ const d = Ct;
7152
7153
  return m(), y("div", {
7153
7154
  class: "style-container",
7154
7155
  style: I({
@@ -7955,7 +7956,7 @@ const Oo = /* @__PURE__ */ $({
7955
7956
  return Vn(() => {
7956
7957
  i.Reset();
7957
7958
  }), (l, u) => {
7958
- const c = xt, d = Ne;
7959
+ const c = Ct, d = Ne;
7959
7960
  return m(), y("div", {
7960
7961
  class: "auth-card",
7961
7962
  style: I({ width: t.width, margin: t.margin, padding: t.padding })
@@ -8112,7 +8113,7 @@ const If = { class: "container" }, Rf = { class: "slide-box" }, Af = { class: "l
8112
8113
  hr((w) => ({
8113
8114
  "17adb052": i
8114
8115
  }));
8115
- const e = t, i = `${e.animationTime}ms`, n = P(e.startActiveGroupIndex), s = P(at.None), r = P(Gd(e.events, e.quantity)), o = pe(() => r.value[n.value]);
8116
+ const e = t, i = `${e.animationTime}ms`, n = P(e.startActiveGroupIndex), s = P(at.None), r = P(Ah(e.events, e.quantity)), o = pe(() => r.value[n.value]);
8116
8117
  ri(() => {
8117
8118
  });
8118
8119
  const l = () => n.value = n.value + 1 < r.value.length ? n.value + 1 : 0, u = () => n.value = n.value - 1 < 0 ? r.value.length - 1 : n.value - 1, c = (w) => {
@@ -8212,10 +8213,10 @@ const No = new Tf(), Ff = /* @__PURE__ */ $({
8212
8213
  emits: ["update:modelValue"],
8213
8214
  setup(t) {
8214
8215
  const e = rt(t, "modelValue"), i = async () => {
8215
- ko.Update(e.value);
8216
+ po.Update(e.value);
8216
8217
  };
8217
8218
  return (n, s) => {
8218
- const r = xt;
8219
+ const r = Ct;
8219
8220
  return m(), y(U, null, [
8220
8221
  A(r, {
8221
8222
  modelValue: e.value.address,
@@ -8239,10 +8240,10 @@ const No = new Tf(), Ff = /* @__PURE__ */ $({
8239
8240
  emits: ["update:modelValue"],
8240
8241
  setup(t) {
8241
8242
  const e = rt(t, "modelValue"), i = async () => {
8242
- await To.Update(e.value);
8243
+ await Co.Update(e.value);
8243
8244
  };
8244
8245
  return (n, s) => {
8245
- const r = xt;
8246
+ const r = Ct;
8246
8247
  return m(), y(U, null, [
8247
8248
  A(r, {
8248
8249
  modelValue: e.value.number,
@@ -8285,7 +8286,7 @@ const No = new Tf(), Ff = /* @__PURE__ */ $({
8285
8286
  e.value.removePhone(o);
8286
8287
  };
8287
8288
  return (o, l) => {
8288
- const u = xt, c = Ne;
8289
+ const u = Ct, c = Ne;
8289
8290
  return m(), y(U, null, [
8290
8291
  t.full ? (m(), y("div", Df, [
8291
8292
  A(u, {
@@ -8620,7 +8621,7 @@ const Yf = /* @__PURE__ */ E(jf, [["render", Zf], ["__scopeId", "data-v-80580591
8620
8621
  o.value = !1, l.value = !1;
8621
8622
  };
8622
8623
  return (_, G) => {
8623
- const ze = He, qe = Ne, ht = Qi, kt = fr("click-outside");
8624
+ const ze = He, qe = Ne, ht = Qi, Mt = fr("click-outside");
8624
8625
  return m(), y(U, null, [
8625
8626
  g(o) ? (m(), y("div", im)) : Z("", !0),
8626
8627
  f("div", {
@@ -8650,7 +8651,7 @@ const Yf = /* @__PURE__ */ E(jf, [["render", Zf], ["__scopeId", "data-v-80580591
8650
8651
  T(_.$slots, "open-inside-content", {}, void 0, !0)
8651
8652
  ], 4)), [
8652
8653
  [
8653
- kt,
8654
+ Mt,
8654
8655
  L,
8655
8656
  void 0,
8656
8657
  { prevent: !0 }
@@ -9452,7 +9453,7 @@ function Tm(t, e) {
9452
9453
  }
9453
9454
  return s;
9454
9455
  }
9455
- function Ct(t) {
9456
+ function St(t) {
9456
9457
  return function(e) {
9457
9458
  if (Array.isArray(e)) return yn(e);
9458
9459
  }(t) || function(e) {
@@ -9628,7 +9629,7 @@ var Qt = function(t, e) {
9628
9629
  }, onMouseLeave: function() {
9629
9630
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
9630
9631
  }, onTouchStart: function(t) {
9631
- t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = Ct(t.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
9632
+ t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = St(t.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
9632
9633
  return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };
9633
9634
  }, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());
9634
9635
  }, onTouchEnd: function() {
@@ -9648,7 +9649,7 @@ var Qt = function(t, e) {
9648
9649
  var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, n = e.right, s = e.bottom, r = e.top;
9649
9650
  this.anchor = { left: t.clientX - i, top: t.clientY - r, bottom: s - t.clientY, right: n - t.clientX };
9650
9651
  }, processMove: function(t, e) {
9651
- var i = Ct(e);
9652
+ var i = St(e);
9652
9653
  if (this.touches.length) {
9653
9654
  if (this.touches.length === 1 && i.length === 1) {
9654
9655
  var n = this.$refs.draggable;
@@ -10077,7 +10078,7 @@ var rp = Xe("vue-draggable-area"), oa = { name: "DraggableArea", props: { movabl
10077
10078
  }, methods: { onTouchStart: function(t) {
10078
10079
  if (t.cancelable) {
10079
10080
  var e = this.movable && t.touches.length === 1;
10080
- e && (this.touches = Ct(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
10081
+ e && (this.touches = St(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
10081
10082
  }
10082
10083
  }, onTouchEnd: function() {
10083
10084
  this.touchStarted = !1, this.processEnd();
@@ -10096,7 +10097,7 @@ var rp = Xe("vue-draggable-area"), oa = { name: "DraggableArea", props: { movabl
10096
10097
  var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top;
10097
10098
  this.anchor = { x: t.clientX - i, y: t.clientY - n };
10098
10099
  }, processMove: function(t, e) {
10099
- var i = Ct(e);
10100
+ var i = St(e);
10100
10101
  if (this.touches.length) {
10101
10102
  var n = this.$refs.container.getBoundingClientRect(), s = n.left, r = n.top;
10102
10103
  this.touches.length === 1 && i.length === 1 && this.$emit("move", new rs({ left: i[0].clientX - (s + this.anchor.x), top: i[0].clientY - (r + this.anchor.y) }));
@@ -10216,7 +10217,7 @@ var la = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
10216
10217
  }, onTouchStart: function(t) {
10217
10218
  if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {
10218
10219
  var e = this.$refs.container, i = e.getBoundingClientRect(), n = i.left, s = i.top, r = i.bottom, o = i.right;
10219
- this.touches = Ct(t.touches).filter(function(l) {
10220
+ this.touches = St(t.touches).filter(function(l) {
10220
10221
  return l.clientX > n && l.clientX < o && l.clientY > s && l.clientY < r;
10221
10222
  }), this.oldGeometricProperties = ur(this.touches, e);
10222
10223
  }
@@ -10225,7 +10226,7 @@ var la = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
10225
10226
  }, onTouchMove: function(t) {
10226
10227
  var e = this;
10227
10228
  if (this.touches.length) {
10228
- var i = Ct(t.touches).filter(function(n) {
10229
+ var i = St(t.touches).filter(function(n) {
10229
10230
  return !n.identifier || e.touches.find(function(s) {
10230
10231
  return s.identifier === n.identifier;
10231
10232
  });
@@ -10602,7 +10603,7 @@ var lp = ["transitions"], ot = Xe("vue-advanced-cropper"), ha = { name: "Cropper
10602
10603
  var l = o.coordinates;
10603
10604
  return ie({}, Rt(s) ? s({ coordinates: l, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
10604
10605
  }];
10605
- this.delayedTransforms && r.push.apply(r, Ct(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(r, !0), this.delayedTransforms = null;
10606
+ this.delayedTransforms && r.push.apply(r, St(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(r, !0), this.delayedTransforms = null;
10606
10607
  }
10607
10608
  }, clearImage: function() {
10608
10609
  var t = this;
@@ -11536,7 +11537,7 @@ const Bp = { render: Op }, Np = { class: "tab" }, Hp = { class: "rotate" }, qp =
11536
11537
  });
11537
11538
  });
11538
11539
  const u = (c) => {
11539
- let d = Vd.Get(c);
11540
+ let d = Rh.Get(c);
11540
11541
  return !!i.formats.includes(d.toLowerCase());
11541
11542
  };
11542
11543
  return (c, d) => {
@@ -11690,7 +11691,7 @@ const ga = /* @__PURE__ */ E(gg, [["render", yg]]), wg = /* @__PURE__ */ Object.
11690
11691
  i("select", c);
11691
11692
  }
11692
11693
  return (c, d) => {
11693
- const h = Vo, p = xt;
11694
+ const h = Vo, p = Ct;
11694
11695
  return m(), y("div", bg, [
11695
11696
  A(p, {
11696
11697
  modelValue: g(s),
@@ -11978,7 +11979,7 @@ const Eg = /* @__PURE__ */ E(Ag, [["render", $g], ["__scopeId", "data-v-879cfd55
11978
11979
  },
11979
11980
  emits: ["select", "load", "input"],
11980
11981
  setup(t, { emit: e }) {
11981
- const i = t, n = e, s = P(i.modelValue), r = P(), o = Dn.SearchModel();
11982
+ const i = t, n = e, s = P(i.modelValue), r = P(), o = Ln.SearchModel();
11982
11983
  it(
11983
11984
  () => i.focus,
11984
11985
  () => {
@@ -11992,7 +11993,7 @@ const Eg = /* @__PURE__ */ E(Ag, [["render", $g], ["__scopeId", "data-v-879cfd55
11992
11993
  return;
11993
11994
  r.value.activated = !0, o.searchObjects = [], o.query = d, o.key = i.keyValue;
11994
11995
  const h = o.searchGroups.find((p) => p.key === i.keyValue);
11995
- return h && (o.searchGroup = h), await Dn.Search(o), o.searchObjects;
11996
+ return h && (o.searchGroup = h), await Ln.Search(o), o.searchObjects;
11996
11997
  }, u = async (d) => {
11997
11998
  n("select", d), s.value = "";
11998
11999
  }, c = (d) => {
@@ -13117,11 +13118,11 @@ class dv extends qi {
13117
13118
  }
13118
13119
  const hv = {
13119
13120
  install: function(t) {
13120
- t.component("PButton", Ne), t.component("PCheckBox", yr), t.component("PDatePicker", Al), t.component("PFlex", wr), t.component("PInput", xt), t.component("PInputDate", Oo), t.component("PInputNumber", Oh), t.component("PLeftSlider", Uh), t.component("PList", Vh), t.component("PListItem", jh), t.component("PRadio", Jh), t.component("PRightSlider", ef), t.component("PSelect", jt), t.component("PSticky", ns), t.component("PString", He), t.component("PTextarea", gf), t.component("PTopSlider", bf), t.component("IconDownload", Uo), t.component("IconFilter", Wo), t.component("ArrowLeft", Go), t.component("ArrowRight", jo), t.component("DoubleArrowLeft", _o), t.component("DoubleArrowRight", Zo), t.component("EllipsisSvg", Yo), t.component("IconArrowLeft", vm), t.component("IconCheckDefault", vr), t.component("IconClose", Xi), t.component("IconEdit", wm), t.component("IconEmail", Sm), t.component("IconMove", xm), t.component("IconPhone", km), t.component("IconSearch", Vo), t.component("IconSelectArrow", Bo), t.component("CollapseContainer", Rp), t.component("CollapseItem", Tp), t.component("VerticalCollapseContainer", Vp), t.component("PAdd", _p), t.component("PContainer", ma), t.component("PContainerStickyHead", Xp), t.component("PDel", tg), t.component("PTabs", sg), t.component("UploaderFile", hg), t.component("AuthForm", ss), t.component("PModal", Qi), t.component("AuthPage", pa), t.component("PageNotFound", ga), t.component("AdaptiveContainer", el), t.component("AdaptiveContainerHorizontal", sl), t.component("AdminGallery", gl), t.component("AuthModal", Mf), t.component("CarouselImages", Pf), t.component("ContactForm", qf), t.component("ContextWindow", Uf), t.component("DateInputRangeV2", Yf), t.component("DateInputRange", Gf), t.component("DropList", Kf), t.component("EmailForm", Ho), t.component("FilterCheckbox", tm), t.component("FiltersButtonsSelect", om), t.component("FilterSelect", um), t.component("FTSPPanel", dm), t.component("GeneralItem", fm), t.component("GridContainer", Ki), t.component("ImageCropper", fa), t.component("InfoItem", Bt), t.component("InfoItemSelectButtons", vp), t.component("LeftRightContainer", Sp), t.component("MessageBody", us), t.component("PAutocomplete", va), t.component("PDialog", Rg), t.component("PhoneForm", qo), t.component("PLoader", Eg), t.component("PNotification", Tg), t.component("PPagination", Bg), t.component("RemoteSearch", Hg), t.component("ResearcheContainer", Vg), t.component("RightSliderContainer", Jg), t.component("RightTabsContainer", t1), t.component("RSContainer", f1), t.component("SelectValueType", g1), t.component("SingleNameToggleForm", w1), t.component("SortList", C1), t.component("SortSelect", k1), t.component("Switch3Pos", E1), t.component("ThemeWrapper", L1), t.component("ToggleInfoItem", z1), t.component("TopSliderContainer", H1), t.component("UploaderImage", Y1);
13121
+ t.component("PButton", Ne), t.component("PCheckBox", yr), t.component("PDatePicker", Al), t.component("PFlex", wr), t.component("PInput", Ct), t.component("PInputDate", Oo), t.component("PInputNumber", Oh), t.component("PLeftSlider", Uh), t.component("PList", Vh), t.component("PListItem", jh), t.component("PRadio", Jh), t.component("PRightSlider", ef), t.component("PSelect", jt), t.component("PSticky", ns), t.component("PString", He), t.component("PTextarea", gf), t.component("PTopSlider", bf), t.component("IconDownload", Uo), t.component("IconFilter", Wo), t.component("ArrowLeft", Go), t.component("ArrowRight", jo), t.component("DoubleArrowLeft", _o), t.component("DoubleArrowRight", Zo), t.component("EllipsisSvg", Yo), t.component("IconArrowLeft", vm), t.component("IconCheckDefault", vr), t.component("IconClose", Xi), t.component("IconEdit", wm), t.component("IconEmail", Sm), t.component("IconMove", xm), t.component("IconPhone", km), t.component("IconSearch", Vo), t.component("IconSelectArrow", Bo), t.component("CollapseContainer", Rp), t.component("CollapseItem", Tp), t.component("VerticalCollapseContainer", Vp), t.component("PAdd", _p), t.component("PContainer", ma), t.component("PContainerStickyHead", Xp), t.component("PDel", tg), t.component("PTabs", sg), t.component("UploaderFile", hg), t.component("AuthForm", ss), t.component("PModal", Qi), t.component("AuthPage", pa), t.component("PageNotFound", ga), t.component("AdaptiveContainer", el), t.component("AdaptiveContainerHorizontal", sl), t.component("AdminGallery", gl), t.component("AuthModal", Mf), t.component("CarouselImages", Pf), t.component("ContactForm", qf), t.component("ContextWindow", Uf), t.component("DateInputRangeV2", Yf), t.component("DateInputRange", Gf), t.component("DropList", Kf), t.component("EmailForm", Ho), t.component("FilterCheckbox", tm), t.component("FiltersButtonsSelect", om), t.component("FilterSelect", um), t.component("FTSPPanel", dm), t.component("GeneralItem", fm), t.component("GridContainer", Ki), t.component("ImageCropper", fa), t.component("InfoItem", Bt), t.component("InfoItemSelectButtons", vp), t.component("LeftRightContainer", Sp), t.component("MessageBody", us), t.component("PAutocomplete", va), t.component("PDialog", Rg), t.component("PhoneForm", qo), t.component("PLoader", Eg), t.component("PNotification", Tg), t.component("PPagination", Bg), t.component("RemoteSearch", Hg), t.component("ResearcheContainer", Vg), t.component("RightSliderContainer", Jg), t.component("RightTabsContainer", t1), t.component("RSContainer", f1), t.component("SelectValueType", g1), t.component("SingleNameToggleForm", w1), t.component("SortList", C1), t.component("SortSelect", k1), t.component("Switch3Pos", E1), t.component("ThemeWrapper", L1), t.component("ToggleInfoItem", z1), t.component("TopSliderContainer", H1), t.component("UploaderImage", Y1);
13121
13122
  }
13122
13123
  };
13123
13124
  export {
13124
- gt as $P,
13125
+ It as $P,
13125
13126
  el as AdaptiveContainer,
13126
13127
  sl as AdaptiveContainerHorizontal,
13127
13128
  gl as AdminGallery,
@@ -13139,54 +13140,54 @@ export {
13139
13140
  li as AuthMethods,
13140
13141
  Mf as AuthModal,
13141
13142
  pa as AuthPage,
13142
- _d as AuthStore,
13143
+ Ad as AuthStore,
13143
13144
  gi as Axios,
13144
13145
  ae as BaseStore,
13145
13146
  $t as Button,
13146
- P0 as Cache,
13147
+ W0 as Cache,
13147
13148
  Pf as CarouselImages,
13148
- T0 as CarouselSwipe,
13149
+ V0 as CarouselSwipe,
13149
13150
  R as ClassHelper,
13150
13151
  Rp as CollapseContainer,
13151
13152
  Tp as CollapseItem,
13152
- F0 as Color,
13153
+ G0 as Color,
13153
13154
  Zi as ColorTheme,
13154
13155
  R0 as ColorThemesStore,
13155
13156
  ei as Contact,
13156
13157
  qf as ContactForm,
13157
- Yd as ContactsStore,
13158
+ Ed as ContactsStore,
13158
13159
  Uf as ContextWindow,
13159
13160
  iu as CreateSortModels,
13160
13161
  No as CropperStore,
13161
- D0 as Cursor,
13162
+ _0 as Cursor,
13162
13163
  Jt as DateFormat,
13163
13164
  Gf as DateInputRange,
13164
13165
  Yf as DateInputRange_v2,
13165
- O0 as DateMask,
13166
- Mo as Dates,
13166
+ Y0 as DateMask,
13167
+ Do as Dates,
13167
13168
  lt as DatesFormatter,
13168
13169
  _o as DoubleArrowLeft,
13169
13170
  Zo as DoubleArrowRight,
13170
- B0 as Dragger,
13171
+ J0 as Dragger,
13171
13172
  Kf as DropList,
13172
13173
  Yo as EllipsisSvg,
13173
13174
  Ft as Email,
13174
13175
  cn as EmailField,
13175
13176
  Ho as EmailForm,
13176
- ko as EmailsStore,
13177
- Vd as Extension,
13177
+ po as EmailsStore,
13178
+ Rh as Extension,
13178
13179
  no as Extract,
13179
13180
  y0 as ExtractsStore,
13180
13181
  be as FTSP,
13181
13182
  dm as FTSPPanel,
13182
- eh as FTSPPresetsStore,
13183
- N0 as Favourite,
13183
+ Dd as FTSPPresetsStore,
13184
+ X0 as Favourite,
13184
13185
  Qn as Field,
13185
13186
  Xt as FieldFill,
13186
13187
  fd as FieldFillsStore,
13187
13188
  pd as FieldsStore,
13188
13189
  ge as FileInfo,
13189
- Qd as FileInfosStore,
13190
+ Fd as FileInfosStore,
13190
13191
  tm as FilterCheckbox,
13191
13192
  Mr as FilterModel,
13192
13193
  um as FilterSelect,
@@ -13199,10 +13200,10 @@ export {
13199
13200
  Sd as FormsStore,
13200
13201
  fm as GeneralItem,
13201
13202
  Ki as GridContainer,
13202
- A0 as Hooks,
13203
+ H0 as Hooks,
13203
13204
  Ie as HttpClient,
13204
13205
  kr as Human,
13205
- ih as HumansStore,
13206
+ Od as HumansStore,
13206
13207
  vm as IconArrowLeft,
13207
13208
  vr as IconCheckDefault,
13208
13209
  Xi as IconClose,
@@ -13221,8 +13222,8 @@ export {
13221
13222
  c0 as InnsStore,
13222
13223
  Sp as LeftRightContainer,
13223
13224
  dv as LoginField,
13224
- Gd as MakeCarousel,
13225
- ph as MenusStore,
13225
+ Ah as MakeCarousel,
13226
+ Jd as MenusStore,
13226
13227
  us as MessageBody,
13227
13228
  ut as Orders,
13228
13229
  _p as PAdd,
@@ -13236,7 +13237,7 @@ export {
13236
13237
  Rg as PDialog,
13237
13238
  wr as PFlex,
13238
13239
  B as PHelp,
13239
- xt as PInput,
13240
+ Ct as PInput,
13240
13241
  Oo as PInputDate,
13241
13242
  Oh as PInputNumber,
13242
13243
  Uh as PLeftSlider,
@@ -13264,7 +13265,7 @@ export {
13264
13265
  Ti as Period,
13265
13266
  qo as PhoneForm,
13266
13267
  Ks as PhoneService,
13267
- To as PhonesStore,
13268
+ Co as PhonesStore,
13268
13269
  f1 as RSContainer,
13269
13270
  Hg as RemoteSearch,
13270
13271
  Vg as ResearcheContainer,
@@ -13273,9 +13274,9 @@ export {
13273
13274
  Ot as Router,
13274
13275
  ev as RouterGuard,
13275
13276
  tv as Scheduler,
13276
- Sh as SchemasStore,
13277
+ ih as SchemasStore,
13277
13278
  iv as Scroll,
13278
- Dn as SearchStore,
13279
+ Ln as SearchStore,
13279
13280
  g1 as SelectValueType,
13280
13281
  zt as SelectedAnswerVariant,
13281
13282
  xd as SelectedAnswerVariantsStore,
@@ -13299,24 +13300,24 @@ export {
13299
13300
  H1 as TopSliderContainer,
13300
13301
  hg as UploaderFile,
13301
13302
  Y1 as UploaderImage,
13302
- Ih as UserAccountsStore,
13303
+ ah as UserAccountsStore,
13303
13304
  Rr as ValueType,
13304
- Ah as ValueTypesStore,
13305
+ uh as ValueTypesStore,
13305
13306
  Vp as VerticalCollapseContainer,
13306
13307
  sv as WaitElement,
13307
13308
  rv as WebSocketClient,
13308
- $0 as brandColors,
13309
- E0 as buildNameNumbers,
13309
+ q0 as brandColors,
13310
+ U0 as buildNameNumbers,
13310
13311
  s0 as classesNames,
13311
- L0 as countRating,
13312
+ j0 as countRating,
13312
13313
  Md as m,
13313
13314
  av as modulesNames,
13314
- q0 as moveDown,
13315
- H0 as moveUp,
13315
+ K0 as moveDown,
13316
+ Q0 as moveUp,
13316
13317
  hv as servicesComponents,
13317
13318
  lv as servicesNames,
13318
13319
  uv as servicesStoresNames,
13319
13320
  cv as typesNames,
13320
- zd as useConfirmLeavePage,
13321
+ wh as useConfirmLeavePage,
13321
13322
  nv as validate
13322
13323
  };