@snabcentr/common-lib 1.60.5 → 1.60.6

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.
@@ -4,7 +4,7 @@ var t = (n, r, e) => ir(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { isNil as ee, toUpper as nr, constant as or, isUndefined as cr, isString as m, cloneDeep as lr, noop as y, toLower as pr, isEmpty as Fe, isFunction as Se, map as ce, forEach as ur, isDate as hr, isArray as gr } from "lodash-es";
5
5
  import { parseISO as f, format as B, addSeconds as mr, isAfter as fr, startOfToday as He, addBusinessDays as yr, endOfTomorrow as wr, startOfTomorrow as Cr, endOfYesterday as vr, startOfYesterday as Pr, endOfToday as Rr, endOfDay as Dr, startOfDay as Ar } from "date-fns";
6
6
  import $r from "axios";
7
- import { objectToSnake as ke, objectToCamel as Tr } from "ts-case-convert";
7
+ import { objectToSnake as ke, objectToCamel as br } from "ts-case-convert";
8
8
  import { defineStore as me } from "pinia";
9
9
  import { ref as C, computed as v } from "vue";
10
10
  class H {
@@ -139,7 +139,7 @@ class fe extends w {
139
139
  return { id: -2, slug: Be.Retail, name: "Розн. цена", guid: "", isNewRec: or(!0) };
140
140
  }
141
141
  }
142
- class ae {
142
+ class Le {
143
143
  /**
144
144
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
145
145
  *
@@ -221,7 +221,7 @@ class ye extends w {
221
221
  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 K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new We(e == null ? void 0 : e.coordinates);
222
222
  }
223
223
  }
224
- class br {
224
+ class Tr {
225
225
  /**
226
226
  * Инициализирует экземпляр класса {@link StockCount}.
227
227
  *
@@ -275,7 +275,7 @@ const j = class j {
275
275
  * Конфигурация приложения.
276
276
  */
277
277
  t(j, "config");
278
- let T = j;
278
+ let b = j;
279
279
  class _r extends ze {
280
280
  /**
281
281
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
@@ -387,24 +387,32 @@ class _ extends _r {
387
387
  * Список свойств продукта.
388
388
  */
389
389
  t(this, "properties");
390
+ /**
391
+ * Розничная цена.
392
+ */
393
+ t(this, "retailCost");
394
+ /**
395
+ * Розничная стоимость продукта в рублях.
396
+ */
397
+ t(this, "retailCostRub");
390
398
  /**
391
399
  * Список коэффициентов цен на продукт.
392
400
  */
393
401
  t(this, "priceCoefficients");
394
- 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 br(g))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
402
+ 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 Tr(g))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
395
403
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
396
- s && (this.category = new Ae({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new Ae(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new Sr(g, T.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 ae(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
404
+ s && (this.category = new Ae({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new Ae(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new Sr(g, b.getConfig().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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new Le(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
397
405
  }
398
406
  /**
399
407
  * Возвращает признак, что это измеряемый товар.
400
408
  */
401
409
  getIsMeasurable() {
402
410
  var s;
403
- const e = (s = T.getConfig().catalog) == null ? void 0 : s.products.units;
411
+ const e = (s = b.getConfig().catalog) == null ? void 0 : s.products.units;
404
412
  return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
405
413
  }
406
414
  }
407
- class ar extends H {
415
+ class Lr extends H {
408
416
  /**
409
417
  * Инициализирует экземпляр класса {@link CartItemBase}.
410
418
  *
@@ -459,7 +467,7 @@ class ar extends H {
459
467
  this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ie(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && lr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
460
468
  }
461
469
  }
462
- class Lr extends ar {
470
+ class Ir extends Lr {
463
471
  /**
464
472
  * Инициализирует экземпляр класса {@link CartItem}.
465
473
  *
@@ -528,10 +536,10 @@ class oe {
528
536
  * Список итоговых сумм по направлениям продаж.
529
537
  */
530
538
  t(this, "directionsSum");
531
- this.items = r.items.map((e) => new Lr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
539
+ this.items = r.items.map((e) => new Ir(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
532
540
  }
533
541
  }
534
- class Ir {
542
+ class xr {
535
543
  /**
536
544
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
537
545
  *
@@ -553,7 +561,7 @@ class Ir {
553
561
  this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
554
562
  }
555
563
  }
556
- class xr {
564
+ class ar {
557
565
  /**
558
566
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
559
567
  *
@@ -682,7 +690,7 @@ class ft {
682
690
  */
683
691
  t(this, "dateFormats");
684
692
  var e, s, i;
685
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new xr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Ir(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new kr({
693
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new ar(r == null ? void 0 : r.http), this.deviceTypeByResolution = new xr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new kr({
686
694
  environment: this.environment,
687
695
  ...r == null ? void 0 : r.sentry
688
696
  }), this.urls = r == null ? void 0 : r.urls, this.version = new Nr(r == null ? void 0 : r.version), this.dateFormats = {
@@ -692,7 +700,7 @@ class ft {
692
700
  };
693
701
  }
694
702
  }
695
- class Le {
703
+ class Ie {
696
704
  /**
697
705
  * Инициализирует экземпляр указанного класса.
698
706
  *
@@ -711,7 +719,7 @@ class Le {
711
719
  return new r(e);
712
720
  }
713
721
  }
714
- const a = class a {
722
+ const L = class L {
715
723
  /**
716
724
  * Инициализирует экземпляр класса {@link HttpRequester}.
717
725
  *
@@ -731,12 +739,12 @@ const a = class a {
731
739
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
732
740
  */
733
741
  t(this, "defaultInstanceNotificationErrorResponseHandler", y);
734
- const s = T.getConfig().version;
735
- this.defaultInstanceNotificationErrorResponseHandler = a.baseDefaultNotificationErrorResponseHandler, this.httpClient = $r.create({
742
+ const s = b.getConfig().version;
743
+ this.defaultInstanceNotificationErrorResponseHandler = L.baseDefaultNotificationErrorResponseHandler, this.httpClient = $r.create({
736
744
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
737
745
  baseURL: r,
738
746
  headers: {
739
- "APP-VERSION": `${s.name} (${s.version}, ${B(s.date, T.getConfig().dateFormats.uiDate)})`,
747
+ "APP-VERSION": `${s.name} (${s.version}, ${B(s.date, b.getConfig().dateFormats.uiDate)})`,
740
748
  Accept: "application/json",
741
749
  "Content-Type": "application/json",
742
750
  ...e
@@ -745,9 +753,9 @@ const a = class a {
745
753
  (i) => (i.method && (i.method === "get" && i.params && (i.params = ke(i.params)), ["put", "patch", "post"].includes(pr(i.method)) && i.data && (i.data = ke(i.data))), i),
746
754
  (i) => Promise.reject(i)
747
755
  ), this.httpClient.interceptors.response.use(
748
- (i) => (i.data && (i.data = Tr(i.data)), i),
756
+ (i) => (i.data && (i.data = br(i.data)), i),
749
757
  // Возвращаем изменённую структуру сообщения об ошибке.
750
- (i) => a.convertHttpErrorResponse(i)
758
+ (i) => L.convertHttpErrorResponse(i)
751
759
  );
752
760
  }
753
761
  /**
@@ -756,7 +764,7 @@ const a = class a {
756
764
  * @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
757
765
  */
758
766
  static setBaseDefaultNotificationErrorResponseHandler(r) {
759
- a.baseDefaultNotificationErrorResponseHandler = r;
767
+ L.baseDefaultNotificationErrorResponseHandler = r;
760
768
  }
761
769
  /**
762
770
  * Возвращает экземпляр объекта текущего класса.
@@ -764,7 +772,7 @@ const a = class a {
764
772
  * @param type Тип данных, которыми оперирует метод.
765
773
  */
766
774
  static getInstance(r) {
767
- return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = Le.simpleInstanceInitializer(r)), a.instances[r.name];
775
+ return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = Ie.simpleInstanceInitializer(r)), L.instances[r.name];
768
776
  }
769
777
  /**
770
778
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -859,15 +867,15 @@ const a = class a {
859
867
  * Экземпляр объекта текущего класса.
860
868
  */
861
869
  // eslint-disable-next-line no-use-before-define
862
- t(a, "instances", {}), /**
870
+ t(L, "instances", {}), /**
863
871
  * Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
864
872
  *
865
873
  * Параметры:
866
874
  * - error Данные об ошибке.
867
875
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
868
876
  */
869
- t(a, "baseDefaultNotificationErrorResponseHandler", y);
870
- let $e = a;
877
+ t(L, "baseDefaultNotificationErrorResponseHandler", y);
878
+ let $e = L;
871
879
  const V = class V extends $e {
872
880
  /**
873
881
  * Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
@@ -881,7 +889,7 @@ const V = class V extends $e {
881
889
  * Время кэширования данных ответов на запросы (секунд).
882
890
  */
883
891
  t(this, "responseDataCacheTimeout");
884
- const i = T.getConfig();
892
+ const i = b.getConfig();
885
893
  this.responseDataCacheTimeout = i.http.responseDataCacheTimeout;
886
894
  }
887
895
  /**
@@ -920,7 +928,7 @@ const V = class V extends $e {
920
928
  getTypedDataArrayRequester(e, s, i = !1, o = {}) {
921
929
  const l = s + (Fe(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(l) : void 0;
922
930
  return p ? Promise.resolve(p) : this.get(s, o).then((g) => {
923
- const R = g.map((A) => Le.instanceInitializer(e, A));
931
+ const R = g.map((A) => Ie.instanceInitializer(e, A));
924
932
  return i && R && this.cacheResponse(s, R), R;
925
933
  });
926
934
  }
@@ -929,14 +937,14 @@ const V = class V extends $e {
929
937
  * Кэш результатов запросов.
930
938
  */
931
939
  t(V, "responseDataCache", /* @__PURE__ */ new Map());
932
- let Te = V;
933
- class u extends Te {
940
+ let be = V;
941
+ class u extends be {
934
942
  /**
935
943
  * Инициализирует экземпляр класса {@link HttpRequester}.
936
944
  */
937
945
  constructor() {
938
946
  var s, i;
939
- const r = T.getConfig(), e = {};
947
+ const r = b.getConfig(), e = {};
940
948
  (s = r.devMode) != null && s.authBearerToken && (e.Authorization = `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
941
949
  }
942
950
  }
@@ -1043,7 +1051,7 @@ class yt extends u {
1043
1051
  return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new oe(e.data));
1044
1052
  }
1045
1053
  }
1046
- var Or = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Or || {}), Ie = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ie || {}), dr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(dr || {});
1054
+ var Or = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Or || {}), xe = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(xe || {}), dr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(dr || {});
1047
1055
  class q extends ie {
1048
1056
  /**
1049
1057
  * Инициализирует экземпляр класса {@link Category}.
@@ -1237,7 +1245,7 @@ class J extends _ {
1237
1245
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1238
1246
  */
1239
1247
  t(this, "isFavorite");
1240
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ie.Product, this.discount = e != null && e.discount ? new Ur(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(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;
1248
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? xe.Product, this.discount = e != null && e.discount ? new Ur(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(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;
1241
1249
  }
1242
1250
  }
1243
1251
  class Gr {
@@ -1379,12 +1387,12 @@ class Ve {
1379
1387
  /**
1380
1388
  * Коэффициент цены.
1381
1389
  */
1382
- t(this, "coefficient");
1390
+ t(this, "priceCoefficient");
1383
1391
  /**
1384
1392
  * Процент, который прибавляется к значению выбранного коэффициента.
1385
1393
  */
1386
1394
  t(this, "increasePercent");
1387
- this.coefficient = (r == null ? void 0 : r.coefficient) && new fe(r.coefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1395
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new fe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1388
1396
  }
1389
1397
  }
1390
1398
  class ve extends Ve {
@@ -1713,7 +1721,7 @@ class ue extends $ {
1713
1721
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
1714
1722
  }
1715
1723
  }
1716
- var b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
1724
+ var T = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(T || {});
1717
1725
  class G extends w {
1718
1726
  /**
1719
1727
  * Возвращает сгенерированную запись-описание физического лица.
@@ -1722,7 +1730,7 @@ class G extends w {
1722
1730
  return new G({
1723
1731
  id: 1,
1724
1732
  guid: "",
1725
- slug: b.Person,
1733
+ slug: T.Person,
1726
1734
  name: ""
1727
1735
  });
1728
1736
  }
@@ -2056,7 +2064,7 @@ class Re {
2056
2064
  * Источник клиентской цены.
2057
2065
  */
2058
2066
  t(this, "source");
2059
- this.client = new ne(r == null ? void 0 : r.client), this.product = new _(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) ?? Ie.Product;
2067
+ this.client = new ne(r == null ? void 0 : r.client), this.product = new _(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) ?? xe.Product;
2060
2068
  }
2061
2069
  }
2062
2070
  class Pt extends u {
@@ -2086,7 +2094,7 @@ class Pt extends u {
2086
2094
  */
2087
2095
  // eslint-disable-next-line class-methods-use-this
2088
2096
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2089
- let l = `${T.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2097
+ let l = `${b.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2090
2098
  return s && (l += `&category_id=${s}`), i && (l += `&client_id=${i}`), l;
2091
2099
  }
2092
2100
  }
@@ -2324,7 +2332,7 @@ class Dt extends u {
2324
2332
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2325
2333
  */
2326
2334
  attachTemplate(r, e, s) {
2327
- const i = T.getConfig().dateFormats.api;
2335
+ const i = b.getConfig().dateFormats.api;
2328
2336
  return this.post(
2329
2337
  `/internal/clients/${r}/price/templates/${e}`,
2330
2338
  s && {
@@ -2356,7 +2364,7 @@ class Dt extends u {
2356
2364
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2357
2365
  */
2358
2366
  changeTemplate(r, e, s, i) {
2359
- const o = T.getConfig().dateFormats.api;
2367
+ const o = b.getConfig().dateFormats.api;
2360
2368
  return this.patch(
2361
2369
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2362
2370
  i && {
@@ -2452,7 +2460,7 @@ class At extends u {
2452
2460
  getCategoryProductsCoefficients(r) {
2453
2461
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2454
2462
  const { data: s } = e;
2455
- return ur(s, (i) => i.map((o) => new ae(o))), s;
2463
+ return ur(s, (i) => i.map((o) => new Le(o))), s;
2456
2464
  });
2457
2465
  }
2458
2466
  /**
@@ -2502,7 +2510,7 @@ class $t extends u {
2502
2510
  return this.get(
2503
2511
  `/internal/catalog/products/${r}/coefficients`,
2504
2512
  {},
2505
- (e) => ce(e.data, (s) => new ae(s))
2513
+ (e) => ce(e.data, (s) => new Le(s))
2506
2514
  );
2507
2515
  }
2508
2516
  /**
@@ -2533,7 +2541,7 @@ class $t extends u {
2533
2541
  });
2534
2542
  }
2535
2543
  }
2536
- class Tt extends u {
2544
+ class bt extends u {
2537
2545
  /**
2538
2546
  * Возвращает список данных о корневых категориях указанного клиента.
2539
2547
  *
@@ -2595,7 +2603,7 @@ class Tt extends u {
2595
2603
  );
2596
2604
  }
2597
2605
  }
2598
- class bt extends u {
2606
+ class Tt extends u {
2599
2607
  /**
2600
2608
  * Возвращает данные об указанном продукте для указанного клиента.
2601
2609
  *
@@ -2616,7 +2624,7 @@ class bt extends u {
2616
2624
  );
2617
2625
  }
2618
2626
  }
2619
- var xe = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(xe || {});
2627
+ var ae = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(ae || {});
2620
2628
  class de {
2621
2629
  /**
2622
2630
  * Инициализирует экземпляр класса {@link FilterItem}.
@@ -2636,7 +2644,7 @@ class de {
2636
2644
  * Значение с которым сравнивается поле.
2637
2645
  */
2638
2646
  t(this, "value");
2639
- this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? xe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2647
+ this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? ae.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2640
2648
  }
2641
2649
  /**
2642
2650
  * Преобразует фильтр в примитивное представление для API.
@@ -2648,7 +2656,7 @@ class de {
2648
2656
  field: this.field,
2649
2657
  op: this.op
2650
2658
  };
2651
- return r.value = hr(this.value) ? B(this.value, T.getConfig().dateFormats.api) : this.value, r;
2659
+ return r.value = hr(this.value) ? B(this.value, b.getConfig().dateFormats.api) : this.value, r;
2652
2660
  }
2653
2661
  }
2654
2662
  class se {
@@ -2978,7 +2986,7 @@ class St extends u {
2978
2986
  );
2979
2987
  }
2980
2988
  }
2981
- class at extends Ce {
2989
+ class Lt extends Ce {
2982
2990
  /**
2983
2991
  * Возвращает пагинированный список свойств.
2984
2992
  *
@@ -3350,7 +3358,7 @@ class at extends Ce {
3350
3358
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3351
3359
  }
3352
3360
  }
3353
- class Lt extends u {
3361
+ class It extends u {
3354
3362
  /**
3355
3363
  * Возвращает данные о рекомендациях указанной категории продуктов.
3356
3364
  *
@@ -3396,7 +3404,7 @@ const qe = (n) => {
3396
3404
  const r = {};
3397
3405
  return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
3398
3406
  };
3399
- class It extends u {
3407
+ class xt extends u {
3400
3408
  /**
3401
3409
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
3402
3410
  *
@@ -3446,7 +3454,7 @@ class It extends u {
3446
3454
  }
3447
3455
  }
3448
3456
  var Qr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(Qr || {});
3449
- class be extends H {
3457
+ class Te extends H {
3450
3458
  /**
3451
3459
  * Инициализирует экземпляр класса {@link BankAccount}.
3452
3460
  *
@@ -3598,7 +3606,7 @@ class Xe extends $ {
3598
3606
  if (e.bankAccounts) {
3599
3607
  const s = [];
3600
3608
  e.bankAccounts.forEach((i) => {
3601
- s.push(new be(i));
3609
+ s.push(new Te(i));
3602
3610
  }), this.bankAccounts = s;
3603
3611
  }
3604
3612
  }
@@ -3703,11 +3711,11 @@ class he {
3703
3711
  */
3704
3712
  static createInstance(r) {
3705
3713
  switch (r.opf.slug) {
3706
- case b.Ic:
3714
+ case T.Ic:
3707
3715
  return new Ze(r);
3708
- case b.UlR:
3716
+ case T.UlR:
3709
3717
  return new er(r);
3710
- case b.UlNr:
3718
+ case T.UlNr:
3711
3719
  return new Xr(r);
3712
3720
  default:
3713
3721
  return new Yr(r);
@@ -3854,7 +3862,7 @@ class Ue extends ne {
3854
3862
  this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => he.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new M(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new ge(p))) ?? [], this.channelPrimaryInterest = new Je(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ye(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3855
3863
  }
3856
3864
  }
3857
- class xt {
3865
+ class at {
3858
3866
  /**
3859
3867
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
3860
3868
  *
@@ -4186,7 +4194,7 @@ class Ot extends Ce {
4186
4194
  return this.getClientsList({
4187
4195
  groupOp: "and",
4188
4196
  groups: [],
4189
- filters: [{ field: "phone", op: xe.Contains, value: r }]
4197
+ filters: [{ field: "phone", op: ae.Contains, value: r }]
4190
4198
  });
4191
4199
  }
4192
4200
  /**
@@ -4352,11 +4360,11 @@ class Ot extends Ce {
4352
4360
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4353
4361
  */
4354
4362
  createContragentClientData(r, e, s = {}) {
4355
- var g, R, A, L, I, x, k, N;
4363
+ var g, R, A, I, x, a, k, N;
4356
4364
  let i;
4357
4365
  const o = e, l = e, p = e;
4358
4366
  switch (e.opf.slug) {
4359
- case b.Ic:
4367
+ case T.Ic:
4360
4368
  i = {
4361
4369
  opf: o.opf.slug,
4362
4370
  name: o.name,
@@ -4374,13 +4382,13 @@ class Ot extends Ce {
4374
4382
  actual_address: o.actualAddress
4375
4383
  };
4376
4384
  break;
4377
- case b.UlR:
4385
+ case T.UlR:
4378
4386
  i = {
4379
4387
  opf: l.opf.slug,
4380
4388
  name: l.name,
4381
4389
  alternative_name: l.alternativeName,
4382
4390
  partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
4383
- manager_id: (L = l.manager) == null ? void 0 : L.id,
4391
+ manager_id: (I = l.manager) == null ? void 0 : I.id,
4384
4392
  comment: l.comment,
4385
4393
  inn: l.inn,
4386
4394
  kpp: l.kpp,
@@ -4393,13 +4401,13 @@ class Ot extends Ce {
4393
4401
  actual_address: l.actualAddress
4394
4402
  };
4395
4403
  break;
4396
- case b.UlNr:
4404
+ case T.UlNr:
4397
4405
  i = {
4398
4406
  opf: p.opf.slug,
4399
4407
  name: p.name,
4400
4408
  alternative_name: p.alternativeName,
4401
- partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4402
- manager_id: (x = p.manager) == null ? void 0 : x.id,
4409
+ partner_group_id: (x = p.partnerGroup) == null ? void 0 : x.id,
4410
+ manager_id: (a = p.manager) == null ? void 0 : a.id,
4403
4411
  comment: p.comment,
4404
4412
  director_name: p.directorName,
4405
4413
  director_position: p.directorPosition,
@@ -4441,11 +4449,11 @@ class Ot extends Ce {
4441
4449
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4442
4450
  */
4443
4451
  updateContragentClientData(r, e, s = {}) {
4444
- var g, R, A, L, I, x, k, N;
4452
+ var g, R, A, I, x, a, k, N;
4445
4453
  let i;
4446
4454
  const o = e, l = e, p = e;
4447
4455
  switch (e.opf.slug) {
4448
- case b.Ic:
4456
+ case T.Ic:
4449
4457
  i = {
4450
4458
  opf: o.opf.slug,
4451
4459
  name: o.name,
@@ -4463,13 +4471,13 @@ class Ot extends Ce {
4463
4471
  actual_address: o.actualAddress
4464
4472
  };
4465
4473
  break;
4466
- case b.UlR:
4474
+ case T.UlR:
4467
4475
  i = {
4468
4476
  opf: l.opf.slug,
4469
4477
  name: l.name,
4470
4478
  alternative_name: l.alternativeName,
4471
4479
  partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
4472
- manager_id: (L = l.manager) == null ? void 0 : L.id,
4480
+ manager_id: (I = l.manager) == null ? void 0 : I.id,
4473
4481
  comment: l.comment,
4474
4482
  inn: l.inn,
4475
4483
  kpp: l.kpp,
@@ -4482,13 +4490,13 @@ class Ot extends Ce {
4482
4490
  actual_address: l.actualAddress
4483
4491
  };
4484
4492
  break;
4485
- case b.UlNr:
4493
+ case T.UlNr:
4486
4494
  i = {
4487
4495
  opf: p.opf.slug,
4488
4496
  name: p.name,
4489
4497
  alternative_name: p.alternativeName,
4490
- partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4491
- manager_id: (x = p.manager) == null ? void 0 : x.id,
4498
+ partner_group_id: (x = p.partnerGroup) == null ? void 0 : x.id,
4499
+ manager_id: (a = p.manager) == null ? void 0 : a.id,
4492
4500
  comment: p.comment,
4493
4501
  director_name: p.directorName,
4494
4502
  director_position: p.directorPosition,
@@ -4618,7 +4626,7 @@ class Ot extends Ce {
4618
4626
  correspondent_account: s.correspondentAccount,
4619
4627
  currency_id: s.currency.id
4620
4628
  },
4621
- (o) => new be(o.data),
4629
+ (o) => new Te(o.data),
4622
4630
  i
4623
4631
  );
4624
4632
  }
@@ -4644,7 +4652,7 @@ class Ot extends Ce {
4644
4652
  correspondent_account: s.correspondentAccount,
4645
4653
  currency_id: s.currency.id
4646
4654
  },
4647
- (o) => new be(o.data),
4655
+ (o) => new Te(o.data),
4648
4656
  i
4649
4657
  );
4650
4658
  }
@@ -5041,7 +5049,7 @@ class tt extends u {
5041
5049
  getManagers() {
5042
5050
  const r = "/internal/managers", e = u.getCachedResponse(r);
5043
5051
  return e ? Promise.resolve(e) : this.get(r).then((s) => {
5044
- const i = s.data.map((o) => Le.instanceInitializer(we, o));
5052
+ const i = s.data.map((o) => Ie.instanceInitializer(we, o));
5045
5053
  return i && this.cacheResponse(r, i), i;
5046
5054
  });
5047
5055
  }
@@ -5356,7 +5364,7 @@ class Ft extends u {
5356
5364
  }
5357
5365
  }
5358
5366
  const P = me("__references_private", () => {
5359
- const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), l = C(void 0), p = C(void 0), g = C(void 0), R = C(void 0), A = C(void 0), L = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), N = C(void 0), d = C(void 0), c = C(void 0);
5367
+ const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), l = C(void 0), p = C(void 0), g = C(void 0), R = C(void 0), A = C(void 0), I = C(void 0), x = C(void 0), a = C(void 0), k = C(void 0), N = C(void 0), d = C(void 0), c = C(void 0);
5360
5368
  return {
5361
5369
  /**
5362
5370
  * Список загружаемых/загруженных на данный момент значений.
@@ -5405,15 +5413,15 @@ const P = me("__references_private", () => {
5405
5413
  /**
5406
5414
  * Справочник типов файлов продукктов/категорий.
5407
5415
  */
5408
- productFileTypeReference: L,
5416
+ productFileTypeReference: I,
5409
5417
  /**
5410
5418
  * Справочник типов ресурсов.
5411
5419
  */
5412
- resourceTypesReference: I,
5420
+ resourceTypesReference: x,
5413
5421
  /**
5414
5422
  * Справочник направлений продаж.
5415
5423
  */
5416
- salesDirectionsReference: x,
5424
+ salesDirectionsReference: a,
5417
5425
  /**
5418
5426
  * Справочник источников первичного интереса.
5419
5427
  */
@@ -5487,17 +5495,17 @@ const P = me("__references_private", () => {
5487
5495
  return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, u.getInstance(D).getSalesDirections().then((h) => {
5488
5496
  c.salesDirectionsReference = h;
5489
5497
  }).catch(y)), c.salesDirectionsReference;
5490
- }), L = v(() => {
5498
+ }), I = v(() => {
5491
5499
  const c = P();
5492
5500
  return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(D).getSourcePrimaryInterest().then((h) => {
5493
5501
  c.sourcePrimaryInterestReference = h;
5494
5502
  }).catch(y)), c.sourcePrimaryInterestReference;
5495
- }), I = v(() => {
5503
+ }), x = v(() => {
5496
5504
  const c = P();
5497
5505
  return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, u.getInstance(D).getDeliveryTypes().then((h) => {
5498
5506
  c.deliveryTypeReference = h;
5499
5507
  }).catch(y)), c.deliveryTypeReference;
5500
- }), x = v(() => {
5508
+ }), a = v(() => {
5501
5509
  const c = P();
5502
5510
  return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(tt).getManagers().then((h) => {
5503
5511
  c.managersList = h;
@@ -5566,15 +5574,15 @@ const P = me("__references_private", () => {
5566
5574
  /**
5567
5575
  * Справочник каналов первичного интереса.
5568
5576
  */
5569
- sourcePrimaryInterestsReference: L,
5577
+ sourcePrimaryInterestsReference: I,
5570
5578
  /**
5571
5579
  * Справочник типов доставки.
5572
5580
  */
5573
- deliveryTypeReference: I,
5581
+ deliveryTypeReference: x,
5574
5582
  /**
5575
5583
  * Список менеджеров.
5576
5584
  */
5577
- managersList: x,
5585
+ managersList: a,
5578
5586
  /**
5579
5587
  * Справочник складов.
5580
5588
  */
@@ -5684,13 +5692,13 @@ class Wt {
5684
5692
  export {
5685
5693
  Fr as AnyReference,
5686
5694
  ft as AppBaseConfig,
5687
- T as AppConfigProvider,
5688
- be as BankAccount,
5695
+ b as AppConfigProvider,
5696
+ Te as BankAccount,
5689
5697
  Ce as BasePaginationProvider,
5690
5698
  Or as CalculationTypeEnum,
5691
5699
  oe as Cart,
5692
- Lr as CartItem,
5693
- ar as CartItemBase,
5700
+ Ir as CartItem,
5701
+ Lr as CartItemBase,
5694
5702
  yt as CartProvider,
5695
5703
  Pt as CatalogProvider,
5696
5704
  ze as CatalogableItem,
@@ -5706,11 +5714,11 @@ export {
5706
5714
  Rt as ClientPriceProvider,
5707
5715
  Dt as ClientPriceTemplateProvider,
5708
5716
  J as ClientProduct,
5709
- Tt as ClientProductCategoryDataProvider,
5710
- bt as ClientProductDataProvider,
5717
+ bt as ClientProductCategoryDataProvider,
5718
+ Tt as ClientProductDataProvider,
5711
5719
  ne as ClientShortInfo,
5712
5720
  Qr as ClientsAdditionalDataRequestTypeEnum,
5713
- xt as ClientsListFilters,
5721
+ at as ClientsListFilters,
5714
5722
  qt as ConfiguratorProvider,
5715
5723
  _e as Contact,
5716
5724
  Gr as ContactLinks,
@@ -5724,7 +5732,7 @@ export {
5724
5732
  Yr as ContragentPerson,
5725
5733
  Xr as ContragentUlNr,
5726
5734
  er as ContragentUlR,
5727
- Ie as CostSourceEnum,
5735
+ xe as CostSourceEnum,
5728
5736
  Q as Country,
5729
5737
  ue as Currency,
5730
5738
  Bt as DataSuggestionProvider,
@@ -5735,17 +5743,17 @@ export {
5735
5743
  qr as DeletableNamedIdentity,
5736
5744
  ge as DeliveryAddress,
5737
5745
  K as DeliveryType,
5738
- Ir as DeviceTypeResolutionConfig,
5746
+ xr as DeviceTypeResolutionConfig,
5739
5747
  Ur as DiscountShortInfo,
5740
5748
  Wt as FieldValidationResultData,
5741
5749
  se as FilterGroup,
5742
5750
  de as FilterItem,
5743
- xe as FilterOpEnum,
5751
+ ae as FilterOpEnum,
5744
5752
  We as GeoCoordinates,
5745
5753
  _r as HiddenCatalogableItem,
5746
- Te as HttpBaseCachedRequester,
5754
+ be as HttpBaseCachedRequester,
5747
5755
  $e as HttpBaseRequester,
5748
- xr as HttpParamsConfig,
5756
+ ar as HttpParamsConfig,
5749
5757
  u as HttpRequester,
5750
5758
  H as Identity,
5751
5759
  Sr as Image,
@@ -5756,7 +5764,7 @@ export {
5756
5764
  nt as MetaTagItem,
5757
5765
  $ as NamedIdentity,
5758
5766
  G as Opf,
5759
- b as OpfEnum,
5767
+ T as OpfEnum,
5760
5768
  it as Order,
5761
5769
  tr as OrderInfo,
5762
5770
  zr as OrderPaymentStatus,
@@ -5768,7 +5776,7 @@ export {
5768
5776
  Wr as PaymentType,
5769
5777
  wt as PreferencesStorageProvider,
5770
5778
  Re as PriceAnalyze,
5771
- It as PriceAnalyzeProvider,
5779
+ xt as PriceAnalyzeProvider,
5772
5780
  fe as PriceCoefficient,
5773
5781
  Be as PriceCoefficientEnum,
5774
5782
  W as PriceTemplate,
@@ -5784,14 +5792,14 @@ export {
5784
5792
  At as ProductCategoryDataProvider,
5785
5793
  $t as ProductDataProvider,
5786
5794
  jr as ProductFileType,
5787
- ae as ProductPriceCoefficient,
5795
+ Le as ProductPriceCoefficient,
5788
5796
  Jr as ProductPriceHistory,
5789
- at as PropertiesProvider,
5797
+ Lt as PropertiesProvider,
5790
5798
  X as Property,
5791
5799
  Ke as PropertyType,
5792
5800
  dr as PropertyTypeEnum,
5793
5801
  z as PropertyValue,
5794
- Lt as RecommendationsDataProvider,
5802
+ It as RecommendationsDataProvider,
5795
5803
  Ne as RecommendationsList,
5796
5804
  w as Reference,
5797
5805
  D as ReferenceDataProvider,
@@ -5802,9 +5810,9 @@ export {
5802
5810
  Me as Seo,
5803
5811
  Ft as SeoDataProvider,
5804
5812
  Ye as SourcePrimaryInterest,
5805
- br as StockCount,
5813
+ Tr as StockCount,
5806
5814
  Ct as TemplatesListFilters,
5807
- Le as TypedInstanceFactory,
5815
+ Ie as TypedInstanceFactory,
5808
5816
  Ge as UnitsHelper,
5809
5817
  dt as UnknownClientDataProvider,
5810
5818
  je as UpdatableNamedIdentity,