@snabcentr/common-lib 1.49.1 → 1.49.2

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.
@@ -7,7 +7,7 @@ import Rr from "axios";
7
7
  import { objectToSnake as Le, objectToCamel as Dr } from "ts-case-convert";
8
8
  import { defineStore as he } from "pinia";
9
9
  import { ref as w, computed as P } from "vue";
10
- class H {
10
+ class F {
11
11
  /**
12
12
  * Инициализирует экземпляр класса {@link Identity}.
13
13
  *
@@ -31,7 +31,7 @@ class H {
31
31
  return this.id === -1;
32
32
  }
33
33
  }
34
- class A extends H {
34
+ class A extends F {
35
35
  /**
36
36
  * Инициализирует экземпляр класса {@link NamedIdentity}.
37
37
  *
@@ -107,7 +107,7 @@ class re extends Re {
107
107
  this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category";
108
108
  }
109
109
  }
110
- var He = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(He || {});
110
+ var Fe = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Fe || {});
111
111
  class C extends A {
112
112
  /**
113
113
  * Инициализирует экземпляр класса {@link Reference}.
@@ -132,7 +132,7 @@ class ge extends C {
132
132
  * Возвращает значение справочника коэффициента розничной цены.
133
133
  */
134
134
  static getRetailPriceCoefficient() {
135
- return { id: -2, slug: He.Retail, name: "Розничная цена", guid: "", isNewRec: tr(!0) };
135
+ return { id: -2, slug: Fe.Retail, name: "Розничная цена", guid: "", isNewRec: tr(!0) };
136
136
  }
137
137
  }
138
138
  class be {
@@ -165,7 +165,7 @@ class be {
165
165
  this.coefficient = new ge(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
166
166
  }
167
167
  }
168
- class Fe {
168
+ class He {
169
169
  /**
170
170
  * Инициализирует экземпляр класса {@link GeoCoordinates}.
171
171
  *
@@ -214,7 +214,7 @@ class me extends C {
214
214
  * Координаты склада.
215
215
  */
216
216
  t(this, "coordinates");
217
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new E(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Fe(e == null ? void 0 : e.coordinates);
217
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new E(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new He(e == null ? void 0 : e.coordinates);
218
218
  }
219
219
  }
220
220
  class $r {
@@ -271,7 +271,7 @@ const W = class W {
271
271
  * Конфигурация приложения.
272
272
  */
273
273
  t(W, "config");
274
- let x = W;
274
+ let a = W;
275
275
  class Ar extends Me {
276
276
  /**
277
277
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
@@ -310,7 +310,7 @@ class Tr {
310
310
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
311
311
  }
312
312
  }
313
- class S extends Ar {
313
+ class L extends Ar {
314
314
  /**
315
315
  * Инициализирует экземпляр класса {@link Product}.
316
316
  *
@@ -385,17 +385,17 @@ class S extends Ar {
385
385
  t(this, "priceCoefficients");
386
386
  this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? f(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((g) => new $r(g))) ?? [], this.type = "product";
387
387
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
388
- s && (this.category = new Re({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new Re(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new Tr(g, x.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new be(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
388
+ s && (this.category = new Re({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new Re(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new Tr(g, a.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new be(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
389
389
  }
390
390
  /**
391
391
  * Возвращает признак, что это измеряемый товар.
392
392
  */
393
393
  getIsMeasurable() {
394
- const e = x.getConfig().products.units;
394
+ const e = a.getConfig().products.units;
395
395
  return [...e.linear, ...e.square].includes(this.unit);
396
396
  }
397
397
  }
398
- class br extends H {
398
+ class br extends F {
399
399
  /**
400
400
  * Инициализирует экземпляр класса {@link CartItemBase}.
401
401
  *
@@ -447,7 +447,7 @@ class br extends H {
447
447
  * Признак того, что позиция является дополнительной продажей.
448
448
  */
449
449
  t(this, "isAdditionalSale");
450
- this.product = new S(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new re(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
450
+ this.product = new L(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new re(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
451
451
  }
452
452
  }
453
453
  class ar extends br {
@@ -677,9 +677,10 @@ class ht {
677
677
  */
678
678
  t(this, "version");
679
679
  /**
680
- * Формат даты в API.
680
+ * Форматы дат.
681
681
  */
682
- t(this, "apiDateFormat");
682
+ t(this, "dateFormats");
683
+ var e, s, i;
683
684
  this.environment = (r == null ? void 0 : r.environment) ?? "production", this.currentDomain = (r == null ? void 0 : r.currentDomain) ?? "", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Sr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new _r(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
684
685
  units: {
685
686
  linear: ["пог.м.", "м."],
@@ -689,7 +690,11 @@ class ht {
689
690
  }, this.sentry = new Lr({
690
691
  environment: this.environment,
691
692
  ...r == null ? void 0 : r.sentry
692
- }), this.urls = r == null ? void 0 : r.urls, this.version = new xr(r == null ? void 0 : r.version), this.apiDateFormat = (r == null ? void 0 : r.apiDateFormat) ?? "yyyy-MM-dd HH:mm:ss";
693
+ }), this.urls = r == null ? void 0 : r.urls, this.version = new xr(r == null ? void 0 : r.version), this.dateFormats = {
694
+ api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
695
+ uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
696
+ uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
697
+ };
693
698
  }
694
699
  }
695
700
  class ae {
@@ -711,7 +716,7 @@ class ae {
711
716
  return new r(e);
712
717
  }
713
718
  }
714
- const L = class L {
719
+ const x = class x {
715
720
  /**
716
721
  * Инициализирует экземпляр класса {@link HttpRequester}.
717
722
  *
@@ -731,12 +736,12 @@ const L = class L {
731
736
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
732
737
  */
733
738
  t(this, "defaultInstanceNotificationErrorResponseHandler", y);
734
- const s = x.getConfig().version;
735
- this.defaultInstanceNotificationErrorResponseHandler = L.baseDefaultNotificationErrorResponseHandler, this.httpClient = Rr.create({
739
+ const s = a.getConfig().version;
740
+ this.defaultInstanceNotificationErrorResponseHandler = x.baseDefaultNotificationErrorResponseHandler, this.httpClient = Rr.create({
736
741
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
737
742
  baseURL: r,
738
743
  headers: {
739
- "APP-VERSION": `${s.name} (${s.version}, ${z(s.date, "dd.MM.yyyy")})`,
744
+ "APP-VERSION": `${s.name} (${s.version}, ${z(s.date, a.getConfig().dateFormats.api)})`,
740
745
  Accept: "application/json",
741
746
  "Content-Type": "application/json",
742
747
  ...e
@@ -747,7 +752,7 @@ const L = class L {
747
752
  ), this.httpClient.interceptors.response.use(
748
753
  (i) => (i.data && (i.data = Dr(i.data)), i),
749
754
  // Возвращаем изменённую структуру сообщения об ошибке.
750
- (i) => L.convertHttpErrorResponse(i)
755
+ (i) => x.convertHttpErrorResponse(i)
751
756
  );
752
757
  }
753
758
  /**
@@ -756,7 +761,7 @@ const L = class L {
756
761
  * @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
757
762
  */
758
763
  static setBaseDefaultNotificationErrorResponseHandler(r) {
759
- L.baseDefaultNotificationErrorResponseHandler = r;
764
+ x.baseDefaultNotificationErrorResponseHandler = r;
760
765
  }
761
766
  /**
762
767
  * Возвращает экземпляр объекта текущего класса.
@@ -764,7 +769,7 @@ const L = class L {
764
769
  * @param type Тип данных, которыми оперирует метод.
765
770
  */
766
771
  static getInstance(r) {
767
- return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = ae.simpleInstanceInitializer(r)), L.instances[r.name];
772
+ return Object.prototype.hasOwnProperty.call(x.instances, r.name) || (x.instances[r.name] = ae.simpleInstanceInitializer(r)), x.instances[r.name];
768
773
  }
769
774
  /**
770
775
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -859,15 +864,15 @@ const L = class L {
859
864
  * Экземпляр объекта текущего класса.
860
865
  */
861
866
  // eslint-disable-next-line no-use-before-define
862
- t(L, "instances", {}), /**
867
+ t(x, "instances", {}), /**
863
868
  * Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
864
869
  *
865
870
  * Параметры:
866
871
  * - error Данные об ошибке.
867
872
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
868
873
  */
869
- t(L, "baseDefaultNotificationErrorResponseHandler", y);
870
- let De = L;
874
+ t(x, "baseDefaultNotificationErrorResponseHandler", y);
875
+ let De = x;
871
876
  const j = class j extends De {
872
877
  /**
873
878
  * Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
@@ -881,7 +886,7 @@ const j = class j extends De {
881
886
  * Время кэширования данных ответов на запросы (секунд).
882
887
  */
883
888
  t(this, "responseDataCacheTimeout");
884
- const i = x.getConfig();
889
+ const i = a.getConfig();
885
890
  this.responseDataCacheTimeout = i.http.responseDataCacheTimeout;
886
891
  }
887
892
  /**
@@ -935,7 +940,7 @@ class u extends $e {
935
940
  */
936
941
  constructor() {
937
942
  var s, i;
938
- const r = x.getConfig(), e = {};
943
+ const r = a.getConfig(), e = {};
939
944
  (s = r.devMode) != null && s.authBearerToken && (e.Authorization = `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
940
945
  }
941
946
  }
@@ -1060,7 +1065,7 @@ class d extends re {
1060
1065
  * Список продуктов категории.
1061
1066
  */
1062
1067
  t(this, "products");
1063
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new d(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new S(o));
1068
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new d(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new L(o));
1064
1069
  }
1065
1070
  }
1066
1071
  class ze extends A {
@@ -1200,7 +1205,7 @@ class B extends ze {
1200
1205
  this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1201
1206
  }
1202
1207
  }
1203
- class K extends S {
1208
+ class K extends L {
1204
1209
  /**
1205
1210
  * Инициализирует экземпляр класса {@link ClientProduct}.
1206
1211
  *
@@ -1517,7 +1522,7 @@ class te extends We {
1517
1522
  this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new ce(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
1518
1523
  }
1519
1524
  }
1520
- class Q extends H {
1525
+ class Q extends F {
1521
1526
  /**
1522
1527
  * Инициализирует новый экземпляр класса.
1523
1528
  *
@@ -1556,7 +1561,7 @@ class we extends Be {
1556
1561
  * Базовые данные о продукте.
1557
1562
  */
1558
1563
  t(this, "product");
1559
- this.product = new S(e == null ? void 0 : e.product);
1564
+ this.product = new L(e == null ? void 0 : e.product);
1560
1565
  }
1561
1566
  }
1562
1567
  class je extends C {
@@ -1584,7 +1589,7 @@ class Y extends A {
1584
1589
  this.type = new je(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1585
1590
  }
1586
1591
  }
1587
- class F {
1592
+ class H {
1588
1593
  /**
1589
1594
  * Инициализирует экземпляр класса {@link PropertyValue}.
1590
1595
  *
@@ -1630,7 +1635,7 @@ class le extends A {
1630
1635
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
1631
1636
  }
1632
1637
  }
1633
- var _ = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(_ || {});
1638
+ var S = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(S || {});
1634
1639
  class U extends C {
1635
1640
  /**
1636
1641
  * Возвращает сгенерированную запись-описание физического лица.
@@ -1639,18 +1644,18 @@ class U extends C {
1639
1644
  return new U({
1640
1645
  id: 1,
1641
1646
  guid: "",
1642
- slug: _.Person,
1647
+ slug: S.Person,
1643
1648
  name: ""
1644
1649
  });
1645
1650
  }
1646
1651
  }
1647
1652
  class Mr extends C {
1648
1653
  }
1649
- class Hr extends C {
1654
+ class Fr extends C {
1650
1655
  }
1651
1656
  class G extends C {
1652
1657
  }
1653
- class Fr extends C {
1658
+ class Hr extends C {
1654
1659
  }
1655
1660
  class zr extends C {
1656
1661
  }
@@ -1711,13 +1716,13 @@ class D extends u {
1711
1716
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
1712
1717
  */
1713
1718
  getOrderStatuses() {
1714
- return this.getTypedDataArrayRequester(Hr, "/public/references/order-status", !0);
1719
+ return this.getTypedDataArrayRequester(Fr, "/public/references/order-status", !0);
1715
1720
  }
1716
1721
  /**
1717
1722
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
1718
1723
  */
1719
1724
  getPaymentTypes() {
1720
- return this.getTypedDataArrayRequester(Fr, "/public/references/payment-type", !0);
1725
+ return this.getTypedDataArrayRequester(Hr, "/public/references/payment-type", !0);
1721
1726
  }
1722
1727
  /**
1723
1728
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
@@ -1886,7 +1891,7 @@ class xe {
1886
1891
  * Список рекомендованных категорий продуктов.
1887
1892
  */
1888
1893
  t(this, "productCategories", []);
1889
- r != null && r.products && (this.products = r.products.map((e) => new S(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new d(e)));
1894
+ r != null && r.products && (this.products = r.products.map((e) => new L(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new d(e)));
1890
1895
  }
1891
1896
  }
1892
1897
  class X extends A {
@@ -1947,7 +1952,7 @@ class Ie {
1947
1952
  }
1948
1953
  }
1949
1954
  var Er = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n))(Er || {});
1950
- class Ae extends H {
1955
+ class Ae extends F {
1951
1956
  /**
1952
1957
  * Инициализирует экземпляр класса {@link BankAccount}.
1953
1958
  *
@@ -2204,18 +2209,18 @@ class pe {
2204
2209
  */
2205
2210
  static createInstance(r) {
2206
2211
  switch (r.opf.slug) {
2207
- case _.Ic:
2212
+ case S.Ic:
2208
2213
  return new Qe(r);
2209
- case _.UlR:
2214
+ case S.UlR:
2210
2215
  return new Ye(r);
2211
- case _.UlNr:
2216
+ case S.UlNr:
2212
2217
  return new Jr(r);
2213
2218
  default:
2214
2219
  return new Kr(r);
2215
2220
  }
2216
2221
  }
2217
2222
  }
2218
- class ve extends H {
2223
+ class ve extends F {
2219
2224
  /**
2220
2225
  * Инициализирует экземпляр класса {@link ContactRelation}.
2221
2226
  *
@@ -2295,7 +2300,7 @@ class ue extends Nr {
2295
2300
  * Признак того, что указанный адрес является адресом транспортной компании.
2296
2301
  */
2297
2302
  t(this, "isTransportCompanyAddress");
2298
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Fe(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
2303
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new He(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
2299
2304
  }
2300
2305
  }
2301
2306
  class ke extends te {
@@ -2459,7 +2464,7 @@ class yt {
2459
2464
  }, this.lastLoginDate = {
2460
2465
  from: m((l = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : l.from) ? f((p = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : p.from) : null,
2461
2466
  to: m((g = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : g.to) ? f((v = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : v.to) : null
2462
- }, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((a) => new fe(a)) : [], this.salesDirection = new I(r == null ? void 0 : r.salesDirection), this.contragentInn = (r == null ? void 0 : r.contragentInn) ?? "", this.contragentType = new U(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new E(r == null ? void 0 : r.preferredDeliveryType), this.hasCostLessThenStop = r != null && r.hasCostLessThenStop ? !0 : void 0, this.partnerGroup = new G(r == null ? void 0 : r.partnerGroup), this.contact = new Te(r == null ? void 0 : r.contact), this.lastOrder = {
2467
+ }, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((_) => new fe(_)) : [], this.salesDirection = new I(r == null ? void 0 : r.salesDirection), this.contragentInn = (r == null ? void 0 : r.contragentInn) ?? "", this.contragentType = new U(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new E(r == null ? void 0 : r.preferredDeliveryType), this.hasCostLessThenStop = r != null && r.hasCostLessThenStop ? !0 : void 0, this.partnerGroup = new G(r == null ? void 0 : r.partnerGroup), this.contact = new Te(r == null ? void 0 : r.contact), this.lastOrder = {
2463
2468
  createdAt: ($ = r == null ? void 0 : r.lastOrder) == null ? void 0 : $.createdAt,
2464
2469
  creator: (T = r == null ? void 0 : r.lastOrder) == null ? void 0 : T.creator,
2465
2470
  isApproved: (b = r == null ? void 0 : r.lastOrder) == null ? void 0 : b.isApproved
@@ -2539,7 +2544,7 @@ class yt {
2539
2544
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
2540
2545
  }
2541
2546
  }
2542
- class Xe extends H {
2547
+ class Xe extends F {
2543
2548
  /**
2544
2549
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
2545
2550
  *
@@ -2623,7 +2628,7 @@ class Ze extends Xe {
2623
2628
  }, this.attachedUser = new q(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
2624
2629
  }
2625
2630
  }
2626
- class Yr extends H {
2631
+ class Yr extends F {
2627
2632
  /**
2628
2633
  * Инициализирует экземпляр класса {@link OrderProduct}.
2629
2634
  *
@@ -2781,7 +2786,7 @@ class Ne {
2781
2786
  field: this.field,
2782
2787
  op: this.op
2783
2788
  };
2784
- return r.value = or(this.value) ? z(this.value, x.getConfig().apiDateFormat) : this.value, r;
2789
+ return r.value = or(this.value) ? z(this.value, a.getConfig().dateFormats.api) : this.value, r;
2785
2790
  }
2786
2791
  }
2787
2792
  class ee {
@@ -3173,11 +3178,11 @@ class Pt extends ye {
3173
3178
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
3174
3179
  */
3175
3180
  createContragentClientData(r, e, s = {}) {
3176
- var g, v, $, T, b, a, k, N;
3181
+ var g, v, $, T, b, _, k, N;
3177
3182
  let i;
3178
3183
  const o = e, l = e, p = e;
3179
3184
  switch (e.opf.slug) {
3180
- case _.Ic:
3185
+ case S.Ic:
3181
3186
  i = {
3182
3187
  opf: o.opf.slug,
3183
3188
  name: o.name,
@@ -3195,7 +3200,7 @@ class Pt extends ye {
3195
3200
  actual_address: o.actualAddress
3196
3201
  };
3197
3202
  break;
3198
- case _.UlR:
3203
+ case S.UlR:
3199
3204
  i = {
3200
3205
  opf: l.opf.slug,
3201
3206
  name: l.name,
@@ -3214,13 +3219,13 @@ class Pt extends ye {
3214
3219
  actual_address: l.actualAddress
3215
3220
  };
3216
3221
  break;
3217
- case _.UlNr:
3222
+ case S.UlNr:
3218
3223
  i = {
3219
3224
  opf: p.opf.slug,
3220
3225
  name: p.name,
3221
3226
  alternative_name: p.alternativeName,
3222
3227
  partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
3223
- manager_id: (a = p.manager) == null ? void 0 : a.id,
3228
+ manager_id: (_ = p.manager) == null ? void 0 : _.id,
3224
3229
  comment: p.comment,
3225
3230
  inn: p.inn,
3226
3231
  kpp: p.kpp,
@@ -3265,11 +3270,11 @@ class Pt extends ye {
3265
3270
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
3266
3271
  */
3267
3272
  updateContragentClientData(r, e, s = {}) {
3268
- var g, v, $, T, b, a, k, N;
3273
+ var g, v, $, T, b, _, k, N;
3269
3274
  let i;
3270
3275
  const o = e, l = e, p = e;
3271
3276
  switch (e.opf.slug) {
3272
- case _.Ic:
3277
+ case S.Ic:
3273
3278
  i = {
3274
3279
  opf: o.opf.slug,
3275
3280
  name: o.name,
@@ -3287,7 +3292,7 @@ class Pt extends ye {
3287
3292
  actual_address: o.actualAddress
3288
3293
  };
3289
3294
  break;
3290
- case _.UlR:
3295
+ case S.UlR:
3291
3296
  i = {
3292
3297
  opf: l.opf.slug,
3293
3298
  name: l.name,
@@ -3306,13 +3311,13 @@ class Pt extends ye {
3306
3311
  actual_address: l.actualAddress
3307
3312
  };
3308
3313
  break;
3309
- case _.UlNr:
3314
+ case S.UlNr:
3310
3315
  i = {
3311
3316
  opf: p.opf.slug,
3312
3317
  name: p.name,
3313
3318
  alternative_name: p.alternativeName,
3314
3319
  partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
3315
- manager_id: (a = p.manager) == null ? void 0 : a.id,
3320
+ manager_id: (_ = p.manager) == null ? void 0 : _.id,
3316
3321
  comment: p.comment,
3317
3322
  inn: p.inn,
3318
3323
  kpp: p.kpp,
@@ -3745,7 +3750,7 @@ class Pe {
3745
3750
  * Источник клиентской цены.
3746
3751
  */
3747
3752
  t(this, "source");
3748
- this.client = new te(r == null ? void 0 : r.client), this.product = new S(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? _e.Product;
3753
+ this.client = new te(r == null ? void 0 : r.client), this.product = new L(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? _e.Product;
3749
3754
  }
3750
3755
  }
3751
3756
  class Dt extends u {
@@ -3775,7 +3780,7 @@ class Dt extends u {
3775
3780
  */
3776
3781
  // eslint-disable-next-line class-methods-use-this
3777
3782
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
3778
- let l = `${x.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
3783
+ let l = `${a.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
3779
3784
  return s && (l += `&category_id=${s}`), i && (l += `&client_id=${i}`), l;
3780
3785
  }
3781
3786
  }
@@ -4013,7 +4018,7 @@ class At extends u {
4013
4018
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
4014
4019
  */
4015
4020
  attachTemplate(r, e, s) {
4016
- const { apiDateFormat: i } = x.getConfig();
4021
+ const i = a.getConfig().dateFormats.api;
4017
4022
  return this.post(
4018
4023
  `/internal/clients/${r}/price/templates/${e}`,
4019
4024
  s && {
@@ -4045,13 +4050,14 @@ class At extends u {
4045
4050
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
4046
4051
  */
4047
4052
  changeTemplate(r, e, s, i) {
4053
+ const o = a.getConfig().dateFormats.api;
4048
4054
  return this.patch(
4049
4055
  `/internal/clients/${r}/price/templates/${e}/${s}`,
4050
4056
  i && {
4051
- startAt: i.startAt ? z(i.startAt, "yyyy-MM-dd HH:mm:ss") : void 0,
4052
- endAt: i.endAt ? z(i.endAt, "yyyy-MM-dd HH:mm:ss") : void 0
4057
+ startAt: i.startAt && z(i.startAt, o),
4058
+ endAt: i.endAt && z(i.endAt, o)
4053
4059
  },
4054
- (o) => new Q(o.data)
4060
+ (l) => new Q(l.data)
4055
4061
  );
4056
4062
  }
4057
4063
  /**
@@ -4127,7 +4133,7 @@ class Tt extends u {
4127
4133
  showHidden: s,
4128
4134
  withPriceCoefficients: e
4129
4135
  },
4130
- (i) => ie(i.data, (o) => new S(o))
4136
+ (i) => ie(i.data, (o) => new L(o))
4131
4137
  );
4132
4138
  }
4133
4139
  /**
@@ -4169,7 +4175,7 @@ class bt extends u {
4169
4175
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
4170
4176
  */
4171
4177
  getProductData(r, e = !1) {
4172
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new S(s.data));
4178
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new L(s.data));
4173
4179
  }
4174
4180
  /**
4175
4181
  * Возвращает публичные данные об указанном продукте.
@@ -4177,7 +4183,7 @@ class bt extends u {
4177
4183
  * @param productId Идентификатор продукта.
4178
4184
  */
4179
4185
  getPublicProductData(r) {
4180
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new S(e.data));
4186
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new L(e.data));
4181
4187
  }
4182
4188
  /**
4183
4189
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -4214,7 +4220,7 @@ class bt extends u {
4214
4220
  publicSimpleSearch(r, e = 10) {
4215
4221
  return new Promise((s, i) => {
4216
4222
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
4217
- s(o.products.map((l) => new S(l)));
4223
+ s(o.products.map((l) => new L(l)));
4218
4224
  }).catch((o) => {
4219
4225
  i(o);
4220
4226
  });
@@ -4647,7 +4653,7 @@ class xt extends ye {
4647
4653
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
4648
4654
  */
4649
4655
  getProductProperties(r) {
4650
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new F(s)));
4656
+ return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
4651
4657
  }
4652
4658
  /**
4653
4659
  * Возвращает значение свойства продукта.
@@ -4657,7 +4663,7 @@ class xt extends ye {
4657
4663
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
4658
4664
  */
4659
4665
  getProductProperty(r, e) {
4660
- return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new F(s.data));
4666
+ return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new H(s.data));
4661
4667
  }
4662
4668
  /**
4663
4669
  * Обновляет значение свойства продукта.
@@ -4668,7 +4674,7 @@ class xt extends ye {
4668
4674
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
4669
4675
  */
4670
4676
  updateProductProperty(r, e, s) {
4671
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new F(i.data));
4677
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
4672
4678
  }
4673
4679
  /**
4674
4680
  * Удаляет значение свойства продукта.
@@ -4793,7 +4799,7 @@ class xt extends ye {
4793
4799
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
4794
4800
  */
4795
4801
  getCategoryProperties(r) {
4796
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new F(s)));
4802
+ return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
4797
4803
  }
4798
4804
  /**
4799
4805
  * Возвращает значение свойства категории.
@@ -4803,7 +4809,7 @@ class xt extends ye {
4803
4809
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
4804
4810
  */
4805
4811
  getCategoryProperty(r, e) {
4806
- return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new F(s.data));
4812
+ return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new H(s.data));
4807
4813
  }
4808
4814
  /**
4809
4815
  * Обновляет значение свойства категории.
@@ -4814,7 +4820,7 @@ class xt extends ye {
4814
4820
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
4815
4821
  */
4816
4822
  updateCategoryProperty(r, e, s) {
4817
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new F(i.data));
4823
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
4818
4824
  }
4819
4825
  /**
4820
4826
  * Удаляет значение свойства категории.
@@ -5058,7 +5064,7 @@ class Nt extends u {
5058
5064
  const i = this.get(
5059
5065
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
5060
5066
  { params: e },
5061
- (l) => new S(l.data)
5067
+ (l) => new L(l.data)
5062
5068
  );
5063
5069
  return i.catch((l) => {
5064
5070
  this.defaultInstanceNotificationErrorResponseHandler(l, s);
@@ -5274,7 +5280,7 @@ class qt extends u {
5274
5280
  }
5275
5281
  }
5276
5282
  const R = he("__references_private", () => {
5277
- const n = w({}), r = w(void 0), e = w(void 0), s = w(void 0), i = w(void 0), o = w(void 0), l = w(void 0), p = w(void 0), g = w(void 0), v = w(void 0), $ = w(void 0), T = w(void 0), b = w(void 0), a = w(void 0), k = w(void 0), N = w(void 0), O = w(void 0), c = w(void 0);
5283
+ const n = w({}), r = w(void 0), e = w(void 0), s = w(void 0), i = w(void 0), o = w(void 0), l = w(void 0), p = w(void 0), g = w(void 0), v = w(void 0), $ = w(void 0), T = w(void 0), b = w(void 0), _ = w(void 0), k = w(void 0), N = w(void 0), O = w(void 0), c = w(void 0);
5278
5284
  return {
5279
5285
  /**
5280
5286
  * Список загружаемых/загруженных на данный момент значений.
@@ -5331,7 +5337,7 @@ const R = he("__references_private", () => {
5331
5337
  /**
5332
5338
  * Справочник направлений продаж.
5333
5339
  */
5334
- salesDirectionsReference: a,
5340
+ salesDirectionsReference: _,
5335
5341
  /**
5336
5342
  * Справочник источников первичного интереса.
5337
5343
  */
@@ -5415,7 +5421,7 @@ const R = he("__references_private", () => {
5415
5421
  return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, u.getInstance(D).getDeliveryTypes().then((h) => {
5416
5422
  c.deliveryTypeReference = h;
5417
5423
  }).catch(y)), c.deliveryTypeReference;
5418
- }), a = P(() => {
5424
+ }), _ = P(() => {
5419
5425
  const c = R();
5420
5426
  return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(rt).getManagers().then((h) => {
5421
5427
  c.managersList = h;
@@ -5492,7 +5498,7 @@ const R = he("__references_private", () => {
5492
5498
  /**
5493
5499
  * Список менеджеров.
5494
5500
  */
5495
- managersList: a,
5501
+ managersList: _,
5496
5502
  /**
5497
5503
  * Справочник складов.
5498
5504
  */
@@ -5576,7 +5582,7 @@ class Mt extends u {
5576
5582
  });
5577
5583
  }
5578
5584
  }
5579
- class Ht {
5585
+ class Ft {
5580
5586
  /**
5581
5587
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
5582
5588
  *
@@ -5602,7 +5608,7 @@ class Ht {
5602
5608
  export {
5603
5609
  Ur as AnyReference,
5604
5610
  ht as AppBaseConfig,
5605
- x as AppConfigProvider,
5611
+ a as AppConfigProvider,
5606
5612
  Ae as BankAccount,
5607
5613
  ye as BasePaginationProvider,
5608
5614
  Ir as CalculationTypeEnum,
@@ -5655,17 +5661,17 @@ export {
5655
5661
  E as DeliveryType,
5656
5662
  _r as DeviceTypeResolutionConfig,
5657
5663
  Or as DiscountShortInfo,
5658
- Ht as FieldValidationResultData,
5664
+ Ft as FieldValidationResultData,
5659
5665
  ee as FilterGroup,
5660
5666
  Ne as FilterItem,
5661
5667
  Se as FilterOpEnum,
5662
- Fe as GeoCoordinates,
5668
+ He as GeoCoordinates,
5663
5669
  Ar as HiddenCatalogableItem,
5664
5670
  $e as HttpBaseCachedRequester,
5665
5671
  De as HttpBaseRequester,
5666
5672
  Sr as HttpParamsConfig,
5667
5673
  u as HttpRequester,
5668
- H as Identity,
5674
+ F as Identity,
5669
5675
  Tr as Image,
5670
5676
  fe as Manager,
5671
5677
  ne as ManagerCommon,
@@ -5674,21 +5680,21 @@ export {
5674
5680
  tt as MetaTagItem,
5675
5681
  A as NamedIdentity,
5676
5682
  U as Opf,
5677
- _ as OpfEnum,
5683
+ S as OpfEnum,
5678
5684
  Xr as Order,
5679
5685
  Ze as OrderInfo,
5680
5686
  Mr as OrderPaymentStatus,
5681
5687
  Yr as OrderProduct,
5682
5688
  Xe as OrderShortInfo,
5683
- Hr as OrderStatus,
5689
+ Fr as OrderStatus,
5684
5690
  Ct as OrdersDataProvider,
5685
5691
  G as PartnerGroup,
5686
- Fr as PaymentType,
5692
+ Hr as PaymentType,
5687
5693
  mt as PreferencesStorageProvider,
5688
5694
  Pe as PriceAnalyze,
5689
5695
  kt as PriceAnalyzeProvider,
5690
5696
  ge as PriceCoefficient,
5691
- He as PriceCoefficientEnum,
5697
+ Fe as PriceCoefficientEnum,
5692
5698
  B as PriceTemplate,
5693
5699
  Ce as PriceTemplateCategory,
5694
5700
  Q as PriceTemplateClient,
@@ -5698,7 +5704,7 @@ export {
5698
5704
  X as PricingRole,
5699
5705
  Lt as PricingRoleProvider,
5700
5706
  Re as PrimaryCatalogableItem,
5701
- S as Product,
5707
+ L as Product,
5702
5708
  Tt as ProductCategoryDataProvider,
5703
5709
  bt as ProductDataProvider,
5704
5710
  zr as ProductFileType,
@@ -5708,7 +5714,7 @@ export {
5708
5714
  Y as Property,
5709
5715
  je as PropertyType,
5710
5716
  kr as PropertyTypeEnum,
5711
- F as PropertyValue,
5717
+ H as PropertyValue,
5712
5718
  It as RecommendationsDataProvider,
5713
5719
  xe as RecommendationsList,
5714
5720
  C as Reference,