@snabcentr/common-lib 2.5.2 → 2.6.0

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.
@@ -1,8 +1,8 @@
1
- var dr = Object.defineProperty;
2
- var Lr = (i, r, e) => r in i ? dr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
1
+ var Ir = Object.defineProperty;
2
+ var Lr = (i, r, e) => r in i ? Ir(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
3
  var t = (i, r, e) => Lr(i, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as nr } from "jwt-decode";
5
- import { merge as ue, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as xr, split as _r, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as me, forEach as Fr, isDate as _e, omitBy as cr, isObject as lr } from "lodash-es";
5
+ import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as xr, split as _r, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as fe, forEach as Fr, isDate as _e, omitBy as cr, isObject as lr } from "lodash-es";
6
6
  import { objectToCamel as He, objectToSnake as Ee } from "ts-case-convert";
7
7
  import { defineStore as W } from "pinia";
8
8
  import { ref as y, markRaw as Hr, computed as P } from "vue";
@@ -99,7 +99,7 @@ class j {
99
99
  * @inheritDoc
100
100
  */
101
101
  t(this, "email", "");
102
- ue(this, r);
102
+ pe(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -143,7 +143,7 @@ class Bt extends j {
143
143
  * @inheritDoc
144
144
  */
145
145
  t(this, "address");
146
- ue(this, e);
146
+ pe(this, e);
147
147
  }
148
148
  /**
149
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -336,7 +336,7 @@ class rt {
336
336
  };
337
337
  }
338
338
  }
339
- const k = W("common.config", () => {
339
+ const d = W("common.config", () => {
340
340
  const i = y(new rt());
341
341
  return {
342
342
  /**
@@ -355,7 +355,7 @@ const k = W("common.config", () => {
355
355
  * @param appConfig Конфигурация приложения.
356
356
  */
357
357
  setConfig: (s) => {
358
- i.value = ue(i.value, s);
358
+ i.value = pe(i.value, s);
359
359
  }
360
360
  };
361
361
  });
@@ -486,7 +486,7 @@ const V = W("common.auth_state_private", () => {
486
486
  );
487
487
  if (o)
488
488
  return Promise.resolve(o);
489
- const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
489
+ const c = (u = d().config.devMode) == null ? void 0 : u.initAuthBearerToken;
490
490
  return c ? Promise.resolve(c) : void 0;
491
491
  })()
492
492
  ), r = y(void 0), e = y(void 0), s = Hr(/* @__PURE__ */ new Map());
@@ -631,7 +631,7 @@ class b extends re {
631
631
  this.name = (e == null ? void 0 : e.name) ?? "";
632
632
  }
633
633
  }
634
- class pe extends b {
634
+ class he extends b {
635
635
  /**
636
636
  * Инициализирует экземпляр класса {@link NamedIdentity}.
637
637
  *
@@ -718,7 +718,7 @@ class st {
718
718
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
719
719
  }
720
720
  }
721
- class pr extends pe {
721
+ class pr extends he {
722
722
  /**
723
723
  * Инициализирует экземпляр класса {@link CatalogableItem}.
724
724
  *
@@ -786,7 +786,7 @@ class je {
786
786
  return new r(e);
787
787
  }
788
788
  }
789
- class L extends b {
789
+ class x extends b {
790
790
  /**
791
791
  * Инициализирует экземпляр класса {@link UserShortInfo}.
792
792
  *
@@ -837,7 +837,7 @@ class nt extends b {
837
837
  * Дата и время удаления.
838
838
  */
839
839
  t(this, "deletedAt");
840
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new L(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
840
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new x(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
841
841
  }
842
842
  }
843
843
  class Q extends ur {
@@ -918,7 +918,7 @@ class gr {
918
918
  }
919
919
  class F extends w {
920
920
  }
921
- class fe extends w {
921
+ class ye extends w {
922
922
  /**
923
923
  * Инициализирует экземпляр класса {@link Warehouse}.
924
924
  *
@@ -965,7 +965,7 @@ class ot {
965
965
  * Количество остатков товара на складе.
966
966
  */
967
967
  t(this, "count");
968
- this.warehouse = new fe(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
968
+ this.warehouse = new ye(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
969
969
  }
970
970
  }
971
971
  class O extends b {
@@ -1022,7 +1022,7 @@ class Qe extends b {
1022
1022
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
1023
1023
  }
1024
1024
  }
1025
- class d extends it {
1025
+ class L extends it {
1026
1026
  /**
1027
1027
  * Инициализирует экземпляр класса {@link Product}.
1028
1028
  *
@@ -1101,7 +1101,7 @@ class d extends it {
1101
1101
  t(this, "priceCoefficients");
1102
1102
  this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1103
1103
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
1104
- s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, k().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1104
+ s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, d().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1105
1105
  }
1106
1106
  /**
1107
1107
  * Возвращает признак, что это измеряемый товар.
@@ -1123,7 +1123,7 @@ class d extends it {
1123
1123
  }
1124
1124
  }
1125
1125
  var Me = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(Me || {});
1126
- class G extends d {
1126
+ class G extends L {
1127
1127
  /**
1128
1128
  * Инициализирует экземпляр класса {@link ClientProduct}.
1129
1129
  *
@@ -1162,7 +1162,7 @@ class G extends d {
1162
1162
  this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Me.Product, this.discount = e != null && e.discount ? new nt(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new Q(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1163
1163
  }
1164
1164
  }
1165
- class ye extends qe {
1165
+ class we extends qe {
1166
1166
  /**
1167
1167
  * Инициализирует экземпляр класса {@link BaseCategory}.
1168
1168
  *
@@ -1261,7 +1261,7 @@ class mr extends re {
1261
1261
  * @inheritDoc
1262
1262
  */
1263
1263
  t(this, "originalId");
1264
- this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ye(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1264
+ this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new we(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new x(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1265
1265
  }
1266
1266
  }
1267
1267
  let ct = class extends mr {
@@ -1311,7 +1311,7 @@ let ct = class extends mr {
1311
1311
  this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new O(e.currency);
1312
1312
  }
1313
1313
  };
1314
- class we {
1314
+ class ne {
1315
1315
  /**
1316
1316
  * Инициализирует экземпляр класса {@link Cart}.
1317
1317
  *
@@ -1345,7 +1345,7 @@ const R = class R {
1345
1345
  /**
1346
1346
  * Базовый URL путь для выполнения запросов.
1347
1347
  */
1348
- t(this, "baseUrl", `${k().config.http.portalApiUrl}/api`);
1348
+ t(this, "baseUrl", `${d().config.http.portalApiUrl}/api`);
1349
1349
  /**
1350
1350
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
1351
1351
  *
@@ -1611,7 +1611,7 @@ class Wt extends p {
1611
1611
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
1612
1612
  */
1613
1613
  getCart(r) {
1614
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new we(e.data));
1614
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ne(e.data));
1615
1615
  }
1616
1616
  /**
1617
1617
  * Удаляет всё содержимое корзины.
@@ -1649,7 +1649,7 @@ class Wt extends p {
1649
1649
  is_additional_sale: e.isAdditionalSale,
1650
1650
  ...e.configuratorParams
1651
1651
  },
1652
- (n) => new we(n.data),
1652
+ (n) => new ne(n.data),
1653
1653
  s
1654
1654
  );
1655
1655
  }
@@ -1679,7 +1679,7 @@ class Wt extends p {
1679
1679
  is_additional_sale: e.isAdditionalSale,
1680
1680
  ...e.configuratorParams
1681
1681
  },
1682
- (n) => new we(n.data),
1682
+ (n) => new ne(n.data),
1683
1683
  s
1684
1684
  );
1685
1685
  }
@@ -1692,7 +1692,7 @@ class Wt extends p {
1692
1692
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_delete_item
1693
1693
  */
1694
1694
  deleteCartItem(r, e) {
1695
- return this.get(`internal/clients/${r.id}/cart/${e.id}`, {});
1695
+ return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (s) => new ne(s.data));
1696
1696
  }
1697
1697
  /**
1698
1698
  * Добавляет продукты в корзину из файла CSV.
@@ -1703,7 +1703,7 @@ class Wt extends p {
1703
1703
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1704
1704
  */
1705
1705
  addCartItemFromCSV(r, e) {
1706
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new we(s.data));
1706
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new ne(s.data));
1707
1707
  }
1708
1708
  /**
1709
1709
  * Возвращает пример CSV файла для добавления продуктов в корзину.
@@ -1717,7 +1717,7 @@ class Wt extends p {
1717
1717
  }
1718
1718
  }
1719
1719
  var lt = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(lt || {}), ut = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))(ut || {});
1720
- class N extends ye {
1720
+ class N extends we {
1721
1721
  /**
1722
1722
  * Инициализирует экземпляр класса {@link Category}.
1723
1723
  *
@@ -1734,7 +1734,7 @@ class N extends ye {
1734
1734
  * Список продуктов категории.
1735
1735
  */
1736
1736
  t(this, "products");
1737
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new d(o));
1737
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new L(o));
1738
1738
  }
1739
1739
  }
1740
1740
  class fr {
@@ -1853,7 +1853,7 @@ class Pe extends Be {
1853
1853
  this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new pt(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((n) => new ze(n))) ?? [];
1854
1854
  }
1855
1855
  }
1856
- class ht extends ye {
1856
+ class ht extends we {
1857
1857
  /**
1858
1858
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1859
1859
  *
@@ -1922,7 +1922,7 @@ class yr {
1922
1922
  this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1923
1923
  }
1924
1924
  }
1925
- class ke extends yr {
1925
+ class de extends yr {
1926
1926
  /**
1927
1927
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1928
1928
  *
@@ -1934,7 +1934,7 @@ class ke extends yr {
1934
1934
  * Базовые данные о продукте.
1935
1935
  */
1936
1936
  t(this, "productCategory");
1937
- this.productCategory = new ye(e == null ? void 0 : e.productCategory);
1937
+ this.productCategory = new we(e == null ? void 0 : e.productCategory);
1938
1938
  }
1939
1939
  }
1940
1940
  class We extends b {
@@ -1962,7 +1962,7 @@ class We extends b {
1962
1962
  }
1963
1963
  class Z extends w {
1964
1964
  }
1965
- class he extends w {
1965
+ class ge extends w {
1966
1966
  /**
1967
1967
  * Инициализирует экземпляр класса {@link Region}.
1968
1968
  *
@@ -1988,8 +1988,8 @@ class De extends w {
1988
1988
  /**
1989
1989
  * Данные о регионе, в котором расположен город.
1990
1990
  */
1991
- t(this, "region", new he());
1992
- e && (this.region = new he(e.region));
1991
+ t(this, "region", new ge());
1992
+ e && (this.region = new ge(e.region));
1993
1993
  }
1994
1994
  }
1995
1995
  class wr extends b {
@@ -2080,7 +2080,7 @@ class te extends wr {
2080
2080
  this.salesDirection = new q(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 De(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((o) => new Be(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new We(o))) ?? void 0;
2081
2081
  }
2082
2082
  }
2083
- class ne extends re {
2083
+ class oe extends re {
2084
2084
  /**
2085
2085
  * Инициализирует новый экземпляр класса.
2086
2086
  *
@@ -2107,7 +2107,7 @@ class ne extends re {
2107
2107
  this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2108
2108
  }
2109
2109
  }
2110
- class Ie extends yr {
2110
+ class ke extends yr {
2111
2111
  /**
2112
2112
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
2113
2113
  *
@@ -2119,12 +2119,12 @@ class Ie extends yr {
2119
2119
  * Базовые данные о продукте.
2120
2120
  */
2121
2121
  t(this, "product");
2122
- this.product = new d(e == null ? void 0 : e.product);
2122
+ this.product = new L(e == null ? void 0 : e.product);
2123
2123
  }
2124
2124
  }
2125
2125
  class vr extends w {
2126
2126
  }
2127
- class oe extends b {
2127
+ class ce extends b {
2128
2128
  /**
2129
2129
  * Инициализирует экземпляр класса {@link Property}.
2130
2130
  *
@@ -2163,7 +2163,7 @@ class K {
2163
2163
  * Может быть строкой, числом, boolean, диапазоном или JSON объектом.
2164
2164
  */
2165
2165
  t(this, "value");
2166
- this.property = new oe(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
2166
+ this.property = new ce(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
2167
2167
  }
2168
2168
  }
2169
2169
  class S {
@@ -2248,7 +2248,7 @@ class Jt {
2248
2248
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((n = r == null ? void 0 : r.updatedAt) != null && n.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2249
2249
  }
2250
2250
  }
2251
- class ce extends b {
2251
+ class le extends b {
2252
2252
  /**
2253
2253
  * Инициализирует экземпляр класса {@link PricingRole}.
2254
2254
  *
@@ -2302,7 +2302,7 @@ class Ye {
2302
2302
  * Минимальный коэффициент цены.
2303
2303
  */
2304
2304
  t(this, "minCoefficient");
2305
- this.role = new ce(r == null ? void 0 : r.role), this.category = new ye(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
2305
+ this.role = new le(r == null ? void 0 : r.role), this.category = new we(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
2306
2306
  }
2307
2307
  }
2308
2308
  class Et extends p {
@@ -2332,7 +2332,7 @@ class Et extends p {
2332
2332
  */
2333
2333
  // eslint-disable-next-line class-methods-use-this
2334
2334
  getPriceExportLink(r = "csv", e = !1, s = void 0, n = void 0) {
2335
- let c = `${k().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2335
+ let c = `${d().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2336
2336
  return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
2337
2337
  }
2338
2338
  }
@@ -2547,7 +2547,7 @@ class Kt extends p {
2547
2547
  return this.get(
2548
2548
  `/internal/clients/${r}/price/templates`,
2549
2549
  {},
2550
- (e) => e.data.map((s) => new ne(s))
2550
+ (e) => e.data.map((s) => new oe(s))
2551
2551
  );
2552
2552
  }
2553
2553
  /**
@@ -2558,7 +2558,7 @@ class Kt extends p {
2558
2558
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
2559
2559
  */
2560
2560
  getActiveTemplate(r) {
2561
- return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ne(e.data), !0);
2561
+ return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new oe(e.data), !0);
2562
2562
  }
2563
2563
  /**
2564
2564
  * Добавляет связь между клиентом и шаблоном прайс-листа.
@@ -2570,14 +2570,14 @@ class Kt extends p {
2570
2570
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2571
2571
  */
2572
2572
  attachTemplate(r, e, s) {
2573
- const n = k().config.dateFormats.api;
2573
+ const n = d().config.dateFormats.api;
2574
2574
  return this.post(
2575
2575
  `/internal/clients/${r}/price/templates/${e}`,
2576
2576
  s && {
2577
2577
  startAt: s.startAt && I(s.startAt, n),
2578
2578
  endAt: s.endAt && I(s.endAt, n)
2579
2579
  },
2580
- (o) => new ne(o.data),
2580
+ (o) => new oe(o.data),
2581
2581
  {},
2582
2582
  !0
2583
2583
  );
@@ -2604,14 +2604,14 @@ class Kt extends p {
2604
2604
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2605
2605
  */
2606
2606
  changeTemplate(r, e, s, n) {
2607
- const o = k().config.dateFormats.api;
2607
+ const o = d().config.dateFormats.api;
2608
2608
  return this.patch(
2609
2609
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2610
2610
  n && {
2611
2611
  startAt: n.startAt && I(n.startAt, o),
2612
2612
  endAt: n.endAt && I(n.endAt, o)
2613
2613
  },
2614
- (c) => new ne(c.data)
2614
+ (c) => new oe(c.data)
2615
2615
  );
2616
2616
  }
2617
2617
  /**
@@ -2687,7 +2687,7 @@ class Qt extends p {
2687
2687
  showHidden: s,
2688
2688
  withPriceCoefficients: e
2689
2689
  },
2690
- (n) => me(n.data, (o) => new d(o))
2690
+ (n) => fe(n.data, (o) => new L(o))
2691
2691
  );
2692
2692
  }
2693
2693
  /**
@@ -2729,7 +2729,7 @@ class Yt extends p {
2729
2729
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2730
2730
  */
2731
2731
  getProductData(r, e = !1) {
2732
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new d(s.data));
2732
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new L(s.data));
2733
2733
  }
2734
2734
  /**
2735
2735
  * Возвращает публичные данные об указанном продукте.
@@ -2737,7 +2737,7 @@ class Yt extends p {
2737
2737
  * @param productId Идентификатор продукта.
2738
2738
  */
2739
2739
  getPublicProductData(r) {
2740
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new d(e.data));
2740
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new L(e.data));
2741
2741
  }
2742
2742
  /**
2743
2743
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2750,7 +2750,7 @@ class Yt extends p {
2750
2750
  return this.get(
2751
2751
  `/internal/catalog/products/${r}/coefficients`,
2752
2752
  {},
2753
- (e) => me(e.data, (s) => new Ge(s))
2753
+ (e) => fe(e.data, (s) => new Ge(s))
2754
2754
  );
2755
2755
  }
2756
2756
  /**
@@ -2762,7 +2762,7 @@ class Yt extends p {
2762
2762
  publicSimpleSearch(r, e = 10) {
2763
2763
  return new Promise((s, n) => {
2764
2764
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2765
- s(o.products.map((c) => new d(c)));
2765
+ s(o.products.map((c) => new L(c)));
2766
2766
  }).catch((o) => {
2767
2767
  n(o);
2768
2768
  });
@@ -2827,7 +2827,7 @@ class Xt extends p {
2827
2827
  showHidden: n,
2828
2828
  withPriceCoefficients: s
2829
2829
  },
2830
- (o) => me(o.data, (c) => new G(c))
2830
+ (o) => fe(o.data, (c) => new G(c))
2831
2831
  );
2832
2832
  }
2833
2833
  }
@@ -2884,7 +2884,7 @@ class Xe {
2884
2884
  field: this.field,
2885
2885
  op: this.op
2886
2886
  };
2887
- return r.value = _e(this.value) ? I(this.value, k().config.dateFormats.api) : this.value, r;
2887
+ return r.value = _e(this.value) ? I(this.value, d().config.dateFormats.api) : this.value, r;
2888
2888
  }
2889
2889
  }
2890
2890
  class M {
@@ -3015,7 +3015,7 @@ class es extends Ae {
3015
3015
  return this.get(
3016
3016
  `/internal/price/templates/${r}/products`,
3017
3017
  {},
3018
- (e) => e.data.map((s) => new Ie(s))
3018
+ (e) => e.data.map((s) => new ke(s))
3019
3019
  );
3020
3020
  }
3021
3021
  /**
@@ -3027,7 +3027,7 @@ class es extends Ae {
3027
3027
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
3028
3028
  */
3029
3029
  getProductTemplatePrice(r, e) {
3030
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Ie(s.data));
3030
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ke(s.data));
3031
3031
  }
3032
3032
  /**
3033
3033
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -3046,7 +3046,7 @@ class es extends Ae {
3046
3046
  price_coefficient_id: (n = s.coefficient) == null ? void 0 : n.id,
3047
3047
  increase_percent: s.value
3048
3048
  },
3049
- (o) => new Ie(o.data)
3049
+ (o) => new ke(o.data)
3050
3050
  );
3051
3051
  }
3052
3052
  /**
@@ -3071,7 +3071,7 @@ class es extends Ae {
3071
3071
  return this.get(
3072
3072
  `/internal/price/templates/${r}/categories`,
3073
3073
  {},
3074
- (e) => e.data.map((s) => new ke(s))
3074
+ (e) => e.data.map((s) => new de(s))
3075
3075
  );
3076
3076
  }
3077
3077
  /**
@@ -3086,7 +3086,7 @@ class es extends Ae {
3086
3086
  return this.get(
3087
3087
  `/internal/price/templates/${r}/categories/${e}`,
3088
3088
  {},
3089
- (s) => new ke(s.data)
3089
+ (s) => new de(s.data)
3090
3090
  );
3091
3091
  }
3092
3092
  /**
@@ -3112,7 +3112,7 @@ class es extends Ae {
3112
3112
  },
3113
3113
  params: n ? { recursively: !0 } : {}
3114
3114
  },
3115
- (c) => new ke(c.data)
3115
+ (c) => new de(c.data)
3116
3116
  );
3117
3117
  }
3118
3118
  /**
@@ -3143,7 +3143,7 @@ class es extends Ae {
3143
3143
  return this.get(
3144
3144
  `/internal/price/templates/${r}/clients`,
3145
3145
  {},
3146
- (e) => e.data.map((s) => new ne(s))
3146
+ (e) => e.data.map((s) => new oe(s))
3147
3147
  );
3148
3148
  }
3149
3149
  }
@@ -3154,7 +3154,7 @@ class rs extends p {
3154
3154
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
3155
3155
  */
3156
3156
  getRoles() {
3157
- return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ce(e)));
3157
+ return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new le(e)));
3158
3158
  }
3159
3159
  /**
3160
3160
  * Добавляет новую роль ценообразования.
@@ -3164,7 +3164,7 @@ class rs extends p {
3164
3164
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
3165
3165
  */
3166
3166
  createRole(r) {
3167
- return this.post("/internal/price/roles", r, (e) => new ce(e.data));
3167
+ return this.post("/internal/price/roles", r, (e) => new le(e.data));
3168
3168
  }
3169
3169
  /**
3170
3170
  * Возвращает данные роли ценообразования.
@@ -3174,7 +3174,7 @@ class rs extends p {
3174
3174
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
3175
3175
  */
3176
3176
  getRole(r) {
3177
- return this.get(`/internal/price/roles/${r}`, {}, (e) => new ce(e.data));
3177
+ return this.get(`/internal/price/roles/${r}`, {}, (e) => new le(e.data));
3178
3178
  }
3179
3179
  /**
3180
3180
  * Обновляет данные роли ценообразования.
@@ -3185,7 +3185,7 @@ class rs extends p {
3185
3185
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
3186
3186
  */
3187
3187
  updateRole(r, e) {
3188
- return this.patch(`/internal/price/roles/${r}`, e, (s) => new ce(s.data));
3188
+ return this.patch(`/internal/price/roles/${r}`, e, (s) => new le(s.data));
3189
3189
  }
3190
3190
  /**
3191
3191
  * Удаляет роль ценообразования.
@@ -3240,7 +3240,7 @@ class ts extends Ae {
3240
3240
  getProperties(r, e, s) {
3241
3241
  return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (n) => {
3242
3242
  const o = { ...n.data };
3243
- return o.data = o.data.map((c) => new oe(c)), o;
3243
+ return o.data = o.data.map((c) => new ce(c)), o;
3244
3244
  });
3245
3245
  }
3246
3246
  /**
@@ -3257,7 +3257,7 @@ class ts extends Ae {
3257
3257
  ...s,
3258
3258
  type: e
3259
3259
  },
3260
- (n) => new oe(n.data)
3260
+ (n) => new ce(n.data)
3261
3261
  );
3262
3262
  }
3263
3263
  /**
@@ -3267,7 +3267,7 @@ class ts extends Ae {
3267
3267
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get
3268
3268
  */
3269
3269
  getProperty(r) {
3270
- return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new oe(e.data));
3270
+ return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ce(e.data));
3271
3271
  }
3272
3272
  /**
3273
3273
  * Обновляет существующее свойство.
@@ -3284,7 +3284,7 @@ class ts extends Ae {
3284
3284
  ...n,
3285
3285
  type: s
3286
3286
  },
3287
- (o) => new oe(o.data)
3287
+ (o) => new ce(o.data)
3288
3288
  );
3289
3289
  }
3290
3290
  /**
@@ -3657,7 +3657,7 @@ class ss extends p {
3657
3657
  showHidden: n,
3658
3658
  withPriceCoefficients: s
3659
3659
  },
3660
- (o) => me(o.data, (c) => new d(c))
3660
+ (o) => fe(o.data, (c) => new L(c))
3661
3661
  );
3662
3662
  }
3663
3663
  }
@@ -3883,7 +3883,7 @@ class Ar extends b {
3883
3883
  */
3884
3884
  t(this, "updater");
3885
3885
  if (e) {
3886
- if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3886
+ if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new x(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new x(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3887
3887
  const s = [];
3888
3888
  e.contacts.forEach((n) => {
3889
3889
  s.push(new z(n));
@@ -4008,7 +4008,7 @@ class ae {
4008
4008
  }
4009
4009
  }
4010
4010
  }
4011
- class de extends re {
4011
+ class Ie extends re {
4012
4012
  /**
4013
4013
  * Инициализирует экземпляр класса {@link ContactRelation}.
4014
4014
  *
@@ -4048,10 +4048,10 @@ class at extends z {
4048
4048
  */
4049
4049
  addresses: []
4050
4050
  });
4051
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new de(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new de(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new de(s))));
4051
+ e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
4052
4052
  }
4053
4053
  }
4054
- class le extends tt {
4054
+ class ue extends tt {
4055
4055
  /**
4056
4056
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
4057
4057
  *
@@ -4141,7 +4141,7 @@ class rr extends te {
4141
4141
  * @inheritDoc
4142
4142
  */
4143
4143
  t(this, "extraData");
4144
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ae.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new le(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new fe(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4144
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ae.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ue(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4145
4145
  }
4146
4146
  }
4147
4147
  class br {
@@ -4259,7 +4259,7 @@ class os extends br {
4259
4259
  * @inheritDoc
4260
4260
  */
4261
4261
  t(this, "lastOrder");
4262
- this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new De(D)), this.region = new he(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new F(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4262
+ this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new De(D)), this.region = new ge(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new F(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4263
4263
  createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
4264
4264
  creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
4265
4265
  isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
@@ -4274,7 +4274,7 @@ class os extends br {
4274
4274
  this.cities = [];
4275
4275
  break;
4276
4276
  case "region":
4277
- this.region = new he();
4277
+ this.region = new ge();
4278
4278
  break;
4279
4279
  case "isActive":
4280
4280
  this.isActive = !0;
@@ -4340,7 +4340,7 @@ class Sr extends re {
4340
4340
  * @inheritDoc
4341
4341
  */
4342
4342
  t(this, "creator");
4343
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new L(e == null ? void 0 : e.creator);
4343
+ this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new x(e == null ? void 0 : e.creator);
4344
4344
  }
4345
4345
  }
4346
4346
  class Rt extends b {
@@ -4854,7 +4854,7 @@ class _ extends Ae {
4854
4854
  return this.get(
4855
4855
  `/internal/clients/${r}/delivery-addresses`,
4856
4856
  {},
4857
- (e) => e.data.map((s) => new le(s))
4857
+ (e) => e.data.map((s) => new ue(s))
4858
4858
  );
4859
4859
  }
4860
4860
  /**
@@ -4869,7 +4869,7 @@ class _ extends Ae {
4869
4869
  return this.post(
4870
4870
  `/internal/clients/${r}/delivery-addresses`,
4871
4871
  _.transformClientDeliveryAddressToRequest(e),
4872
- (n) => new le(n.data),
4872
+ (n) => new ue(n.data),
4873
4873
  s
4874
4874
  );
4875
4875
  }
@@ -4885,7 +4885,7 @@ class _ extends Ae {
4885
4885
  return this.patch(
4886
4886
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4887
4887
  _.transformClientDeliveryAddressToRequest(e),
4888
- (n) => new le(n.data),
4888
+ (n) => new ue(n.data),
4889
4889
  s
4890
4890
  );
4891
4891
  }
@@ -5161,7 +5161,7 @@ const Y = class Y extends p {
5161
5161
  * Время кэширования данных ответов на запросы (секунд).
5162
5162
  */
5163
5163
  t(this, "responseDataCacheTimeout");
5164
- this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
5164
+ this.responseDataCacheTimeout = d().config.http.responseDataCacheTimeout;
5165
5165
  }
5166
5166
  /**
5167
5167
  * Возвращает кэшированные данные.
@@ -5209,7 +5209,7 @@ const Y = class Y extends p {
5209
5209
  * Кэш результатов запросов.
5210
5210
  */
5211
5211
  t(Y, "responseDataCache", /* @__PURE__ */ new Map());
5212
- let ge = Y;
5212
+ let me = Y;
5213
5213
  class us extends p {
5214
5214
  /**
5215
5215
  * Выполняет проверку занят ли указанный номер телефона.
@@ -5277,7 +5277,7 @@ class hs extends p {
5277
5277
  const o = this.get(
5278
5278
  `internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
5279
5279
  { params: s, client_id: e },
5280
- (u) => new d(u.data)
5280
+ (u) => new L(u.data)
5281
5281
  );
5282
5282
  return o.catch((u) => {
5283
5283
  this.errorResponseHandler(u, n);
@@ -5353,7 +5353,7 @@ class gs {
5353
5353
  };
5354
5354
  }
5355
5355
  }
5356
- class kr {
5356
+ class dr {
5357
5357
  /**
5358
5358
  * Возвращает признак, что указанный товар имеет линейную единицу измерения.
5359
5359
  *
@@ -5369,7 +5369,7 @@ class kr {
5369
5369
  */
5370
5370
  static getProductMultiplicity(r) {
5371
5371
  var e, s;
5372
- return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !kr.productIsMeasurable(r) ? r.properties.minCount : 1;
5372
+ return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !dr.productIsMeasurable(r) ? r.properties.minCount : 1;
5373
5373
  }
5374
5374
  /**
5375
5375
  * Возвращает кратность длины для указанного товара.
@@ -5401,19 +5401,19 @@ class fs {
5401
5401
  return r.id === 0 && r.guid === "-undefined-";
5402
5402
  }
5403
5403
  }
5404
- class At extends ge {
5404
+ class At extends me {
5405
5405
  /**
5406
5406
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5407
5407
  */
5408
5408
  async getManagers() {
5409
- const r = "/internal/managers", e = ge.getCachedResponse(r);
5409
+ const r = "/internal/managers", e = me.getCachedResponse(r);
5410
5410
  if (e)
5411
5411
  return e;
5412
5412
  const n = (await this.get(r)).data.map((o) => je.instanceInitializer(Pe, o));
5413
5413
  return this.cacheResponse(r, n), n;
5414
5414
  }
5415
5415
  }
5416
- var $t = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))($t || {});
5416
+ var $t = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.ChangeAttachedOperator = "change_attached_operator", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))($t || {});
5417
5417
  class ys {
5418
5418
  /**
5419
5419
  * Инициализирует экземпляр класса {@link OrderEditorData}.
@@ -5481,7 +5481,7 @@ class ys {
5481
5481
  this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (s = r == null ? void 0 : r.delivery.address) == null ? void 0 : s.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
5482
5482
  }
5483
5483
  }
5484
- class Ir extends Sr {
5484
+ class kr extends Sr {
5485
5485
  /**
5486
5486
  * Инициализирует экземпляр класса {@link OrderInfo}.
5487
5487
  *
@@ -5545,13 +5545,13 @@ class Ir extends Sr {
5545
5545
  }, this.delivery = {
5546
5546
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5547
5547
  date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5548
- address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new le(e.delivery.address) : void 0,
5549
- warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new fe(e.delivery.warehouse) : void 0
5550
- }, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5548
+ address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ue(e.delivery.address) : void 0,
5549
+ warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new ye(e.delivery.warehouse) : void 0
5550
+ }, this.attachedUser = e != null && e.attachedUser ? new x(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5551
5551
  }
5552
5552
  }
5553
5553
  var Tt = /* @__PURE__ */ ((i) => (i.New = "new", i.Processing = "processing", i.AwaitingSupplyProducts = "awaiting_supply_products", i.InvoiceIssued = "invoice_issued", i.ProcessingOnStock = "processing_on_stock", i.Finished = "finished", i.OrderUpdated = "order_updated", i.Canceled = "canceled", i.Error = "error", i))(Tt || {});
5554
- class T extends ge {
5554
+ class T extends me {
5555
5555
  /**
5556
5556
  * Возвращает {@link Promise} для получения данных указанного справочника.
5557
5557
  *
@@ -5656,7 +5656,7 @@ class T extends ge {
5656
5656
  * @param term Терм поиска.
5657
5657
  */
5658
5658
  searchRegion(r) {
5659
- return this.getTypedDataArrayRequester(he, `/internal/references/region-with-country/search?term=${r}`);
5659
+ return this.getTypedDataArrayRequester(ge, `/internal/references/region-with-country/search?term=${r}`);
5660
5660
  }
5661
5661
  /**
5662
5662
  * Выполняет поиск данных о странах по терму в названии.
@@ -5676,7 +5676,7 @@ class T extends ge {
5676
5676
  * Возвращает {@link Promise} для получения справочника складов.
5677
5677
  */
5678
5678
  getWarehouses() {
5679
- return this.getTypedDataArrayRequester(fe, "/public/references/warehouse", !0);
5679
+ return this.getTypedDataArrayRequester(ye, "/public/references/warehouse", !0);
5680
5680
  }
5681
5681
  /**
5682
5682
  * Возвращает {@link Promise} для получения справочника типов свойств.
@@ -6045,7 +6045,7 @@ class vs extends br {
6045
6045
  * @inheritDoc
6046
6046
  */
6047
6047
  t(this, "onlyMyRegions");
6048
- this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new De(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new fe(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6048
+ this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new x(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new De(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6049
6049
  }
6050
6050
  /**
6051
6051
  * @inheritDoc
@@ -6145,7 +6145,7 @@ class bt extends mr {
6145
6145
  this.product = new G(e.product), this.currency = new O(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
6146
6146
  }
6147
6147
  }
6148
- class x extends Ir {
6148
+ class k extends kr {
6149
6149
  /**
6150
6150
  * Инициализирует экземпляр класса {@link Order}.
6151
6151
  *
@@ -6202,7 +6202,11 @@ class x extends Ir {
6202
6202
  * @inheritDoc
6203
6203
  */
6204
6204
  t(this, "operatorsForWarehouseComment");
6205
- this.products = (e.products ?? []).map((n) => new bt(n)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ae.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment;
6205
+ /**
6206
+ * @inheritDoc
6207
+ */
6208
+ t(this, "erpOrderUrl");
6209
+ this.products = (e.products ?? []).map((n) => new bt(n)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ae.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
6206
6210
  }
6207
6211
  }
6208
6212
  class St {
@@ -6228,7 +6232,7 @@ class St {
6228
6232
  * @inheritDoc
6229
6233
  */
6230
6234
  t(this, "createdAt");
6231
- this.user = new L(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6235
+ this.user = new x(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6232
6236
  }
6233
6237
  }
6234
6238
  class Cs extends Ae {
@@ -6251,7 +6255,7 @@ class Cs extends Ae {
6251
6255
  {},
6252
6256
  (o) => {
6253
6257
  const c = { ...o.data };
6254
- return c.data = c.data.map((u) => new Ir(u)), c;
6258
+ return c.data = c.data.map((u) => new kr(u)), c;
6255
6259
  },
6256
6260
  void 0,
6257
6261
  n
@@ -6291,7 +6295,7 @@ class Cs extends Ae {
6291
6295
  * @see /doc/api/internal#/Заказы/api_internal_orders_get
6292
6296
  */
6293
6297
  getOrder(r) {
6294
- return this.get(`/internal/orders/${r}`, {}, (e) => new x(e.data));
6298
+ return this.get(`/internal/orders/${r}`, {}, (e) => new k(e.data));
6295
6299
  }
6296
6300
  /**
6297
6301
  * Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
@@ -6305,14 +6309,14 @@ class Cs extends Ae {
6305
6309
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
6306
6310
  */
6307
6311
  createClientOrder(r, e, s, n = {}) {
6308
- const o = k().config.dateFormats.api;
6312
+ const o = d().config.dateFormats.api;
6309
6313
  return this.post(
6310
6314
  `/internal/clients/${r}/orders/${e}`,
6311
6315
  {
6312
6316
  ...s,
6313
6317
  deliveryDate: I(s.deliveryDate, o)
6314
6318
  },
6315
- (c) => c.data.map((u) => new x(u)),
6319
+ (c) => c.data.map((u) => new k(u)),
6316
6320
  n
6317
6321
  );
6318
6322
  }
@@ -6324,7 +6328,7 @@ class Cs extends Ae {
6324
6328
  * @see /doc/api/internal#/Заказы/api_internal_orders_attach
6325
6329
  */
6326
6330
  attachOrder(r) {
6327
- return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new x(e.data));
6331
+ return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new k(e.data));
6328
6332
  }
6329
6333
  /**
6330
6334
  * Открепляет указанный заказ от оператора и возвращает полные данные заказа.
@@ -6334,7 +6338,7 @@ class Cs extends Ae {
6334
6338
  * @see /doc/api/internal#/Заказы/api_internal_orders_detach
6335
6339
  */
6336
6340
  detachOrder(r) {
6337
- return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new x(e.data));
6341
+ return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new k(e.data));
6338
6342
  }
6339
6343
  /**
6340
6344
  * Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
@@ -6348,14 +6352,14 @@ class Cs extends Ae {
6348
6352
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
6349
6353
  */
6350
6354
  updateOrder(r, e, s = {}) {
6351
- const n = k().config.dateFormats.api;
6355
+ const n = d().config.dateFormats.api;
6352
6356
  return this.patch(
6353
6357
  `/internal/orders/${r}`,
6354
6358
  {
6355
6359
  ...e,
6356
6360
  deliveryDate: e.deliveryDate ? I(e.deliveryDate, n) : void 0
6357
6361
  },
6358
- (o) => new x(o.data),
6362
+ (o) => new k(o.data),
6359
6363
  s
6360
6364
  );
6361
6365
  }
@@ -6385,7 +6389,7 @@ class Cs extends Ae {
6385
6389
  is_additional_sale: e.isAdditionalSale,
6386
6390
  ...e.configuratorParams
6387
6391
  },
6388
- (n) => new x(n.data),
6392
+ (n) => new k(n.data),
6389
6393
  s
6390
6394
  );
6391
6395
  }
@@ -6408,7 +6412,7 @@ class Cs extends Ae {
6408
6412
  status: e,
6409
6413
  statusDetail: s
6410
6414
  },
6411
- (o) => new x(o.data),
6415
+ (o) => new k(o.data),
6412
6416
  n
6413
6417
  );
6414
6418
  }
@@ -6426,6 +6430,17 @@ class Cs extends Ae {
6426
6430
  (e) => e.data.map((s) => new St(s))
6427
6431
  );
6428
6432
  }
6433
+ /**
6434
+ * Заменяет закреплённого за заказом оператора и возвращает обновлённые данные заказа.
6435
+ *
6436
+ * @param orderId Идентификатор заказа.
6437
+ * @param operatorId Идентификатор нового оператора.
6438
+ *
6439
+ * @see /doc/api/internal#/Заказы/api_internal_orders_change_attached_operator
6440
+ */
6441
+ changeAttachedOperator(r, e) {
6442
+ return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (s) => new k(s.data));
6443
+ }
6429
6444
  /**
6430
6445
  * Удаляет файл, прикреплённый к заказу клиентом, и возвращает обновлённые данные заказа.
6431
6446
  *
@@ -6434,7 +6449,18 @@ class Cs extends Ae {
6434
6449
  * @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
6435
6450
  */
6436
6451
  deleteOrderAttachedFile(r) {
6437
- return this.delete(`/internal/orders/${r}/file/attached`, (e) => new x(e.data));
6452
+ return this.delete(`/internal/orders/${r}/file/attached`, (e) => new k(e.data));
6453
+ }
6454
+ /**
6455
+ * Удаляет продукт из заказа и возвращает обновлённые данные заказа.
6456
+ *
6457
+ * @param orderId Идентификатор заказа.
6458
+ * @param orderProductId Идентификатор записи продукта заказа.
6459
+ *
6460
+ * @see /doc/api/internal#/operations/api_internal_orders_product_delete
6461
+ */
6462
+ deleteOrderProduct(r, e) {
6463
+ return this.delete(`/internal/orders/${r}/products/${e}`, (s) => new k(s.data));
6438
6464
  }
6439
6465
  /**
6440
6466
  * Изменяет продукт заказа и возвращает обновлённые данные заказа.
@@ -6462,7 +6488,7 @@ class Cs extends Ae {
6462
6488
  marker: s.marker,
6463
6489
  ...s.configuratorParams
6464
6490
  },
6465
- (o) => new x(o.data),
6491
+ (o) => new k(o.data),
6466
6492
  n
6467
6493
  );
6468
6494
  }
@@ -6497,7 +6523,7 @@ class Cs extends Ae {
6497
6523
  * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
6498
6524
  */
6499
6525
  getDeliveryCost(r, e, s, n = void 0) {
6500
- const o = k().config.dateFormats.api;
6526
+ const o = d().config.dateFormats.api;
6501
6527
  return this.get(
6502
6528
  `/internal/orders/delivery/${r}/cost`,
6503
6529
  {
@@ -6537,7 +6563,7 @@ class Le {
6537
6563
  * Источник клиентской цены.
6538
6564
  */
6539
6565
  t(this, "source");
6540
- this.client = new te(r == null ? void 0 : r.client), this.product = new d(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) ?? Me.Product;
6566
+ 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) ?? Me.Product;
6541
6567
  }
6542
6568
  }
6543
6569
  const xe = (i) => {
@@ -6618,7 +6644,7 @@ class as extends p {
6618
6644
  );
6619
6645
  }
6620
6646
  }
6621
- class kt {
6647
+ class dt {
6622
6648
  /**
6623
6649
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
6624
6650
  *
@@ -6665,10 +6691,10 @@ class kt {
6665
6691
  * @inheritDoc
6666
6692
  */
6667
6693
  t(this, "currency");
6668
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new pe(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
6694
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new he(r.product) : void 0, this.client = r.client ? new x(r.client) : void 0, this.executor = r.executor ? new x(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
6669
6695
  }
6670
6696
  }
6671
- class It extends pe {
6697
+ class kt extends he {
6672
6698
  /**
6673
6699
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6674
6700
  *
@@ -6680,7 +6706,7 @@ class It extends pe {
6680
6706
  * @inheritDoc
6681
6707
  */
6682
6708
  t(this, "history");
6683
- this.history = me(e.history, (s) => new kt(s));
6709
+ this.history = fe(e.history, (s) => new dt(s));
6684
6710
  }
6685
6711
  }
6686
6712
  class Rs extends p {
@@ -6693,8 +6719,8 @@ class Rs extends p {
6693
6719
  */
6694
6720
  getProductPriceHistory(r) {
6695
6721
  var o, c, u, h, m;
6696
- const e = k().config.dateFormats.api, s = cr(
6697
- ue(r, {
6722
+ const e = d().config.dateFormats.api, s = cr(
6723
+ pe(r, {
6698
6724
  costDate: {
6699
6725
  from: _e((o = r.costDate) == null ? void 0 : o.from) ? I(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6700
6726
  to: _e((u = r.costDate) == null ? void 0 : u.to) ? I(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
@@ -6703,7 +6729,7 @@ class Rs extends p {
6703
6729
  (f) => A(f) || (H(f) || lr(f)) && X(f)
6704
6730
  ), n = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6705
6731
  return delete s.product, this.get(`/internal/price/products/${n}/history`, s).then((f) => [
6706
- new It(ue(f[0], { history: f }))
6732
+ new kt(pe(f[0], { history: f }))
6707
6733
  ]);
6708
6734
  }
6709
6735
  }
@@ -6722,7 +6748,7 @@ class sr {
6722
6748
  * Список рекомендованных категорий продуктов.
6723
6749
  */
6724
6750
  t(this, "productCategories", []);
6725
- r != null && r.products && (this.products = r.products.map((e) => new pe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new pe(e)));
6751
+ r != null && r.products && (this.products = r.products.map((e) => new he(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new he(e)));
6726
6752
  }
6727
6753
  }
6728
6754
  class Ps extends p {
@@ -6771,7 +6797,7 @@ class Ps extends p {
6771
6797
  });
6772
6798
  }
6773
6799
  }
6774
- class dt {
6800
+ class It {
6775
6801
  /**
6776
6802
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6777
6803
  *
@@ -6829,7 +6855,7 @@ class ir {
6829
6855
  */
6830
6856
  t(this, "tags");
6831
6857
  var e;
6832
- this.resourceType = new Pr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new dt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6858
+ this.resourceType = new Pr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new It(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6833
6859
  }
6834
6860
  }
6835
6861
  class Ds extends p {
@@ -6939,7 +6965,7 @@ class $s extends p {
6939
6965
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6940
6966
  */
6941
6967
  constructor() {
6942
- super(), this.baseUrl = `${k().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6968
+ super(), this.baseUrl = `${d().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6943
6969
  }
6944
6970
  /**
6945
6971
  * Функция для получения обновленных токенов доступа.
@@ -7013,7 +7039,7 @@ export {
7013
7039
  Ne as BankAccount,
7014
7040
  Ae as BasePaginationProvider,
7015
7041
  lt as CalculationTypeEnum,
7016
- we as Cart,
7042
+ ne as Cart,
7017
7043
  Wt as CartProvider,
7018
7044
  Et as CatalogProvider,
7019
7045
  pr as CatalogableItem,
@@ -7034,7 +7060,7 @@ export {
7034
7060
  te as ClientShortInfo,
7035
7061
  gt as ClientsAdditionalDataRequestTypeEnum,
7036
7062
  os as ClientsListFilters,
7037
- pe as CodedIdentity,
7063
+ he as CodedIdentity,
7038
7064
  hs as ConfiguratorProvider,
7039
7065
  Dt as ConfiguratorsEnum,
7040
7066
  Ue as Contact,
@@ -7042,7 +7068,7 @@ export {
7042
7068
  z as ContactPerson,
7043
7069
  at as ContactPersonRelated,
7044
7070
  ft as ContactPosition,
7045
- de as ContactRelation,
7071
+ Ie as ContactRelation,
7046
7072
  Ar as ContragentBase,
7047
7073
  ae as ContragentFactory,
7048
7074
  $r as ContragentIc,
@@ -7060,7 +7086,7 @@ export {
7060
7086
  ls as DataTableSortRequestParams,
7061
7087
  gs as DateTimeProvider,
7062
7088
  tt as DeletableNamedIdentity,
7063
- le as DeliveryAddress,
7089
+ ue as DeliveryAddress,
7064
7090
  F as DeliveryType,
7065
7091
  Bt as DetailedJwtPayload,
7066
7092
  Yr as DeviceTypeResolutionConfig,
@@ -7071,7 +7097,7 @@ export {
7071
7097
  Je as FilterOpEnum,
7072
7098
  gr as GeoCoordinates,
7073
7099
  it as HiddenCatalogableItem,
7074
- ge as HttpCachedRequester,
7100
+ me as HttpCachedRequester,
7075
7101
  Xr as HttpParamsConfig,
7076
7102
  p as HttpRequester,
7077
7103
  re as Identity,
@@ -7081,15 +7107,15 @@ export {
7081
7107
  Be as ManagerCommon,
7082
7108
  fs as ManagerDataFactory,
7083
7109
  At as ManagerDataProvider,
7084
- dt as MetaTagItem,
7110
+ It as MetaTagItem,
7085
7111
  b as NamedIdentity,
7086
7112
  ar as Operator,
7087
7113
  B as Opf,
7088
7114
  U as OpfEnum,
7089
- x as Order,
7115
+ k as Order,
7090
7116
  $t as OrderAction,
7091
7117
  ys as OrderEditorData,
7092
- Ir as OrderInfo,
7118
+ kr as OrderInfo,
7093
7119
  bt as OrderItem,
7094
7120
  mr as OrderItemBase,
7095
7121
  yt as OrderPaymentStatus,
@@ -7108,25 +7134,25 @@ export {
7108
7134
  Re as PriceCoefficient,
7109
7135
  hr as PriceCoefficientEnum,
7110
7136
  Rs as PriceHistoryDataProvider,
7111
- kt as PriceHistoryItem,
7137
+ dt as PriceHistoryItem,
7112
7138
  Q as PriceTemplate,
7113
- ke as PriceTemplateCategory,
7114
- ne as PriceTemplateClient,
7139
+ de as PriceTemplateCategory,
7140
+ oe as PriceTemplateClient,
7115
7141
  yr as PriceTemplateICatalogableItem,
7116
- Ie as PriceTemplateProduct,
7142
+ ke as PriceTemplateProduct,
7117
7143
  es as PriceTemplateProvider,
7118
- ce as PricingRole,
7144
+ le as PricingRole,
7119
7145
  rs as PricingRoleProvider,
7120
7146
  qe as PrimaryCatalogableItem,
7121
- d as Product,
7147
+ L as Product,
7122
7148
  Qt as ProductCategoryDataProvider,
7123
7149
  Yt as ProductDataProvider,
7124
7150
  wt as ProductFileType,
7125
7151
  Ge as ProductPriceCoefficient,
7126
- It as ProductPriceHistory,
7152
+ kt as ProductPriceHistory,
7127
7153
  Qe as ProductUnit,
7128
7154
  ts as PropertiesProvider,
7129
- oe as Property,
7155
+ ce as Property,
7130
7156
  vr as PropertyType,
7131
7157
  ut as PropertyTypeEnum,
7132
7158
  K as PropertyValue,
@@ -7135,7 +7161,7 @@ export {
7135
7161
  w as Reference,
7136
7162
  ns as ReferenceDataFactory,
7137
7163
  T as ReferenceDataProvider,
7138
- he as Region,
7164
+ ge as Region,
7139
7165
  Pr as ResourceType,
7140
7166
  q as SalesDirection,
7141
7167
  Zr as SentryConfig,
@@ -7146,7 +7172,7 @@ export {
7146
7172
  ss as TemplateProductCategoryDataProvider,
7147
7173
  Jt as TemplatesListFilters,
7148
7174
  je as TypedInstanceFactory,
7149
- kr as UnitsHelper,
7175
+ dr as UnitsHelper,
7150
7176
  us as UnknownClientDataProvider,
7151
7177
  ur as UpdatableNamedIdentity,
7152
7178
  xt as User,
@@ -7154,16 +7180,16 @@ export {
7154
7180
  wr as UserCommonInfo,
7155
7181
  _t as UserDataProvider,
7156
7182
  pt as UserPricingRole,
7157
- L as UserShortInfo,
7183
+ x as UserShortInfo,
7158
7184
  Lt as UserTypeEnum,
7159
7185
  ps as VersionConfig,
7160
- fe as Warehouse,
7186
+ ye as Warehouse,
7161
7187
  et as WebSocketConfig,
7162
7188
  Ze as findCatalogItemByIdRecursive,
7163
7189
  er as flattenCatalogItems,
7164
7190
  ms as pluralize,
7165
7191
  Se as useAuthStateStore,
7166
- k as useBaseConfigStateStore,
7192
+ d as useBaseConfigStateStore,
7167
7193
  ws as useReferencesStore,
7168
7194
  Ts as useUserStateStore
7169
7195
  };