@snabcentr/common-lib 2.20.0 → 2.20.1

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,6 +4,6 @@
4
4
  "name": "public-api",
5
5
  "src": "src/public-api.ts",
6
6
  "isEntry": true,
7
- "integrity": "sha384-tiEKVIiH42db3xokVyBwHh2SJkxWoGkNBs+jC60A11TCRhNKiNKrZPlumx/oHjLN"
7
+ "integrity": "sha384-fC+QXTFQtmz1rjea5SE3N4WSG1ByxhpGj6t4lGZWOMc+d9rEilRTlHyR3YOHYMWb"
8
8
  }
9
9
  }
@@ -1,7 +1,6 @@
1
- ## 2.20.0 (2026-08-20)
1
+ ## 2.20.1 (2026-08-28)
2
2
 
3
- ### added (2 changes)
3
+ ### added (1 change)
4
4
 
5
- - [#13629: Добавлены модели, фильтры и провайдер данных статей блога](web_soft/libs/ts/snabcentr-common-lib@a5c34a24f14c6f12c29b44e64fcf23faed89a82f) ([merge request](web_soft/libs/ts/snabcentr-common-lib!221))
6
- - [#13666: Добавлен тип пользователя внешнего SEO-специалиста](web_soft/libs/ts/snabcentr-common-lib@7469071883f5acd4c62d6e8e646f50636de7c619) ([merge request](web_soft/libs/ts/snabcentr-common-lib!220))
5
+ - [#: Добавлен ключ для доступа к данным о текущем заказе](web_soft/libs/ts/snabcentr-common-lib@bf1b4a796175840722dd8e3b3ae9773ea1c0ac01)
7
6
 
@@ -2,11 +2,11 @@ var Rt = Object.defineProperty;
2
2
  var bt = (n, r, e) => r in n ? Rt(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var s = (n, r, e) => bt(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as zr } from "jwt-decode";
5
- import { merge as Ie, isNil as T, isEmpty as me, noop as w, mapValues as Er, isArray as W, every as Pt, split as Tt, startsWith as At, endsWith as dt, includes as St, isString as D, isFunction as Cr, map as Ce, isObject as Dr, isError as kr, toLower as $t, isDate as pr, isPlainObject as kt, isUndefined as Ue, constant as Lt, toUpper as It, cloneDeep as Ot, forEach as xt, omitBy as Qr } from "lodash-es";
5
+ import { merge as Oe, isNil as T, isEmpty as me, noop as w, mapValues as Er, isArray as W, every as Pt, split as Tt, startsWith as At, endsWith as dt, includes as St, isString as D, isFunction as Cr, map as Ce, isObject as Dr, isError as kr, toLower as $t, isDate as pr, isPlainObject as kt, isUndefined as Ue, constant as Lt, toUpper as Ot, cloneDeep as It, forEach as xt, omitBy as Qr } from "lodash-es";
6
6
  import { objectToCamel as Rr, objectToSnake as Lr } from "ts-case-convert";
7
7
  import { defineStore as ee } from "pinia";
8
8
  import { ref as v, markRaw as _t, computed as P } from "vue";
9
- import { isAfter as Ir, parseISO as R, startOfToday as hr, format as x, endOfMonth as I, addMonths as $, differenceInCalendarMonths as qt, startOfMonth as N, getDate as Or, getDaysInMonth as Nt, endOfDay as B, startOfDay as ue, setDate as Ut, startOfWeek as Q, addWeeks as gr, differenceInCalendarDays as Je, addDays as J, addBusinessDays as Ft, startOfYear as ne, endOfYear as Te, endOfWeek as Ae, endOfTomorrow as Ht, startOfTomorrow as Mt, endOfYesterday as Bt, startOfYesterday as Wt, endOfToday as jt, startOfQuarter as de, endOfQuarter as Fe, subDays as Ve, addYears as Ke, addQuarters as Xe, subYears as Ze, subQuarters as er, subMonths as rr, subWeeks as xr, addSeconds as Gt } from "date-fns";
9
+ import { isAfter as Or, parseISO as R, startOfToday as hr, format as x, endOfMonth as O, addMonths as $, differenceInCalendarMonths as qt, startOfMonth as N, getDate as Ir, getDaysInMonth as Nt, endOfDay as B, startOfDay as ue, setDate as Ut, startOfWeek as Q, addWeeks as gr, differenceInCalendarDays as Je, addDays as J, addBusinessDays as Ft, startOfYear as ne, endOfYear as Te, endOfWeek as Ae, endOfTomorrow as Ht, startOfTomorrow as Mt, endOfYesterday as Bt, startOfYesterday as Wt, endOfToday as jt, startOfQuarter as de, endOfQuarter as Fe, subDays as Ve, addYears as Ke, addQuarters as Xe, subYears as Ze, subQuarters as er, subMonths as rr, subWeeks as xr, addSeconds as Gt } from "date-fns";
10
10
  import Yt, { CanceledError as zt } from "axios";
11
11
  class De {
12
12
  /**
@@ -99,7 +99,7 @@ class De {
99
99
  * @inheritDoc
100
100
  */
101
101
  s(this, "email", "");
102
- Ie(this, r);
102
+ Oe(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -143,7 +143,7 @@ class Jr extends De {
143
143
  * @inheritDoc
144
144
  */
145
145
  s(this, "address");
146
- Ie(this, e);
146
+ Oe(this, e);
147
147
  }
148
148
  /**
149
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -337,7 +337,7 @@ class Kt {
337
337
  };
338
338
  }
339
339
  }
340
- const O = ee("common.config", () => {
340
+ const I = ee("common.config", () => {
341
341
  const n = v(new Kt());
342
342
  return {
343
343
  /**
@@ -356,7 +356,7 @@ const O = ee("common.config", () => {
356
356
  * @param appConfig Конфигурация приложения.
357
357
  */
358
358
  setConfig: (t) => {
359
- n.value = Ie(n.value, t);
359
+ n.value = Oe(n.value, t);
360
360
  }
361
361
  };
362
362
  });
@@ -379,7 +379,7 @@ class He {
379
379
  if (e)
380
380
  try {
381
381
  const t = JSON.parse(e);
382
- if (!t.availableFor || Ir(R(t.availableFor) || hr(), /* @__PURE__ */ new Date())) {
382
+ if (!t.availableFor || Or(R(t.availableFor) || hr(), /* @__PURE__ */ new Date())) {
383
383
  if (T(t.data) || me(t.data))
384
384
  throw new Error("Data is empty");
385
385
  return t.data;
@@ -454,7 +454,7 @@ class He {
454
454
  const i = localStorage.getItem(t);
455
455
  if (i) {
456
456
  const o = JSON.parse(i);
457
- o.availableFor && !Ir(R(o.availableFor) || hr(), /* @__PURE__ */ new Date()) && r.push(t);
457
+ o.availableFor && !Or(R(o.availableFor) || hr(), /* @__PURE__ */ new Date()) && r.push(t);
458
458
  }
459
459
  } catch {
460
460
  r.push(t);
@@ -488,7 +488,7 @@ const oe = ee("common.auth_state_private", () => {
488
488
  );
489
489
  if (o)
490
490
  return Promise.resolve(o);
491
- const c = (u = O().config.devMode) == null ? void 0 : u.initAuthBearerToken;
491
+ const c = (u = I().config.devMode) == null ? void 0 : u.initAuthBearerToken;
492
492
  return c ? Promise.resolve(c) : void 0;
493
493
  })()
494
494
  ), r = v(void 0), e = v(void 0), t = _t(/* @__PURE__ */ new Map());
@@ -922,7 +922,7 @@ const b = class b {
922
922
  /**
923
923
  * Базовый URL путь для выполнения запросов.
924
924
  */
925
- s(this, "baseUrl", `${O().config.http.portalApiUrl}/api`);
925
+ s(this, "baseUrl", `${I().config.http.portalApiUrl}/api`);
926
926
  /**
927
927
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
928
928
  *
@@ -1243,7 +1243,7 @@ class qr {
1243
1243
  * @returns Примитивное представление фильтра.
1244
1244
  */
1245
1245
  toPrimitive() {
1246
- const r = O().config.dateFormats.api, e = {
1246
+ const r = I().config.dateFormats.api, e = {
1247
1247
  field: this.field,
1248
1248
  op: this.op
1249
1249
  };
@@ -1355,7 +1355,7 @@ class mr extends re {
1355
1355
  static preparePostSaveData(r) {
1356
1356
  const e = {};
1357
1357
  if (Ue(r.title) || (e.title = r.title), Ue(r.slug) || (e.slug = r.slug), Ue(r.content) || (e.content = r.content), !Ue(r.publishedAt)) {
1358
- const t = O().config.dateFormats.api;
1358
+ const t = I().config.dateFormats.api;
1359
1359
  e.publishedAt = T(r.publishedAt) ? null : x(r.publishedAt, t);
1360
1360
  }
1361
1361
  return e;
@@ -1780,7 +1780,7 @@ class Nr extends k {
1780
1780
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
1781
1781
  }
1782
1782
  }
1783
- class Oe extends k {
1783
+ class Ie extends k {
1784
1784
  /**
1785
1785
  * Инициализирует экземпляр класса {@link NamedIdentity}.
1786
1786
  *
@@ -1795,7 +1795,7 @@ class Oe extends k {
1795
1795
  this.code = (e == null ? void 0 : e.code) ?? "";
1796
1796
  }
1797
1797
  }
1798
- class Zr extends Oe {
1798
+ class Zr extends Ie {
1799
1799
  /**
1800
1800
  * Инициализирует экземпляр класса {@link CatalogableItem}.
1801
1801
  *
@@ -1946,7 +1946,7 @@ class U extends es {
1946
1946
  s(this, "priceCoefficients");
1947
1947
  this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Nr(e.unit) : new Nr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new j(e.currency) : new j(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = D(e == null ? void 0 : e.costDate) ? R(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((p) => new Zt(p))) ?? [], this.type = "product";
1948
1948
  const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
1949
- t && (this.category = new yr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new yr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new rs(p, O().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((p) => new Pr(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1949
+ t && (this.category = new yr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new yr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new rs(p, I().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((p) => new Pr(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1950
1950
  }
1951
1951
  /**
1952
1952
  * Возвращает признак, что это измеряемый товар.
@@ -2031,7 +2031,7 @@ class Re extends yr {
2031
2031
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
2032
2032
  */
2033
2033
  s(this, "currencyRates");
2034
- this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [It(t), i])) : void 0;
2034
+ this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [Ot(t), i])) : void 0;
2035
2035
  }
2036
2036
  }
2037
2037
  class et extends G {
@@ -2110,7 +2110,7 @@ class et extends G {
2110
2110
  * @inheritDoc
2111
2111
  */
2112
2112
  s(this, "replacementId");
2113
- this.product = new K(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new Re(), this.currency = e.currency ? new j(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ot(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new q(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
2113
+ this.product = new K(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new Re(), this.currency = e.currency ? new j(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && It(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new q(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
2114
2114
  }
2115
2115
  }
2116
2116
  let rt = class extends et {
@@ -3022,7 +3022,7 @@ class zs extends h {
3022
3022
  */
3023
3023
  // eslint-disable-next-line class-methods-use-this
3024
3024
  getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
3025
- let c = `${O().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
3025
+ let c = `${I().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
3026
3026
  return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
3027
3027
  }
3028
3028
  }
@@ -3256,7 +3256,7 @@ class Qs extends h {
3256
3256
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
3257
3257
  */
3258
3258
  attachTemplate(r, e, t) {
3259
- const i = O().config.dateFormats.api;
3259
+ const i = I().config.dateFormats.api;
3260
3260
  return this.post(
3261
3261
  `/internal/clients/${r}/price/templates/${e}`,
3262
3262
  t && {
@@ -3290,7 +3290,7 @@ class Qs extends h {
3290
3290
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
3291
3291
  */
3292
3292
  changeTemplate(r, e, t, i) {
3293
- const o = O().config.dateFormats.api;
3293
+ const o = I().config.dateFormats.api;
3294
3294
  return this.patch(
3295
3295
  `/internal/clients/${r}/price/templates/${e}/${t}`,
3296
3296
  i && {
@@ -5875,7 +5875,7 @@ class m {
5875
5875
  * @param date Дата.
5876
5876
  */
5877
5877
  static endOfHalfYear(r) {
5878
- return I(new Date(r.getFullYear(), r.getMonth() < 6 ? 5 : 11, 1));
5878
+ return O(new Date(r.getFullYear(), r.getMonth() < 6 ? 5 : 11, 1));
5879
5879
  }
5880
5880
  /**
5881
5881
  * Возвращает дату, сдвинутую на указанное число полугодий.
@@ -5896,7 +5896,7 @@ class m {
5896
5896
  * @param date Опорная дата.
5897
5897
  */
5898
5898
  static intervalTillSameDate(r, e, t) {
5899
- const i = qt(N(t), N(r)), o = N($(e, i)), c = Math.min(Or(t), Nt(o));
5899
+ const i = qt(N(t), N(r)), o = N($(e, i)), c = Math.min(Ir(t), Nt(o));
5900
5900
  return { from: ue(e), to: B(Ut(o, c)) };
5901
5901
  }
5902
5902
  /**
@@ -5927,10 +5927,10 @@ class m {
5927
5927
  * @param shift Смещение в декадах, может быть отрицательным.
5928
5928
  */
5929
5929
  static shiftedDecadeBounds(r, e) {
5930
- const t = Or(r);
5930
+ const t = Ir(r);
5931
5931
  let i = 2;
5932
5932
  t <= 10 ? i = 0 : t <= 20 && (i = 1);
5933
- const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = N($(r, c)), g = J(p, u * 10), y = u === 2 ? I(p) : B(J(g, 9));
5933
+ const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = N($(r, c)), g = J(p, u * 10), y = u === 2 ? O(p) : B(J(g, 9));
5934
5934
  return [g, y];
5935
5935
  }
5936
5936
  }
@@ -5949,15 +5949,15 @@ class ui {
5949
5949
  yesterday: { label: "Вчера", from: Wt(), to: Bt() },
5950
5950
  tomorrow: { label: "Завтра", from: Mt(), to: Ht() },
5951
5951
  currentWeek: { label: "Неделя", from: Q(t, { weekStartsOn: 1 }), to: Ae(t, { weekStartsOn: 1 }) },
5952
- currentMonth: { label: "Месяц", from: N(t), to: I(t) },
5953
- oneMonth: { label: "1 месяц", from: i, to: I(i) },
5954
- threeMonths: { label: "3 месяца", from: i, to: I($(i, 2)) },
5955
- nineMonths: { label: "9 месяцев", from: i, to: I($(i, 8)) },
5956
- firstQuarter: { label: "I квартал", from: i, to: I($(i, 2)) },
5957
- secondQuarter: { label: "II квартал", from: $(i, 3), to: I($(i, 5)) },
5958
- thirdQuarter: { label: "III квартал", from: $(i, 6), to: I($(i, 8)) },
5959
- fourthQuarter: { label: "IV квартал", from: $(i, 9), to: I($(i, 11)) },
5960
- firstHalfYear: { label: "I полугодие", from: i, to: I($(i, 5)) },
5952
+ currentMonth: { label: "Месяц", from: N(t), to: O(t) },
5953
+ oneMonth: { label: "1 месяц", from: i, to: O(i) },
5954
+ threeMonths: { label: "3 месяца", from: i, to: O($(i, 2)) },
5955
+ nineMonths: { label: "9 месяцев", from: i, to: O($(i, 8)) },
5956
+ firstQuarter: { label: "I квартал", from: i, to: O($(i, 2)) },
5957
+ secondQuarter: { label: "II квартал", from: $(i, 3), to: O($(i, 5)) },
5958
+ thirdQuarter: { label: "III квартал", from: $(i, 6), to: O($(i, 8)) },
5959
+ fourthQuarter: { label: "IV квартал", from: $(i, 9), to: O($(i, 11)) },
5960
+ firstHalfYear: { label: "I полугодие", from: i, to: O($(i, 5)) },
5961
5961
  secondHalfYear: { label: "II полугодие", from: $(i, 6), to: o },
5962
5962
  currentYear: { label: "12 месяцев", from: i, to: o }
5963
5963
  };
@@ -5981,9 +5981,9 @@ class ui {
5981
5981
  lastTenDays: { label: "Прошлая декада", group: "decade", ...m.shiftDecadeInterval(r, -1) },
5982
5982
  thisTenDays: { label: "Эта декада", group: "decade", ...o },
5983
5983
  nextTenDays: { label: "Следующая декада", group: "decade", ...m.shiftDecadeInterval(r, 1) },
5984
- lastMonth: { label: "Прошлый месяц", group: "month", from: N(rr(r, 1)), to: I(rr(r, 1)) },
5985
- thisMonth: { label: "Этот месяц", group: "month", from: c, to: I(r) },
5986
- nextMonth: { label: "Следующий месяц", group: "month", from: N($(r, 1)), to: I($(r, 1)) },
5984
+ lastMonth: { label: "Прошлый месяц", group: "month", from: N(rr(r, 1)), to: O(rr(r, 1)) },
5985
+ thisMonth: { label: "Этот месяц", group: "month", from: c, to: O(r) },
5986
+ nextMonth: { label: "Следующий месяц", group: "month", from: N($(r, 1)), to: O($(r, 1)) },
5987
5987
  lastQuarter: { label: "Прошлый квартал", group: "quarter", from: de(er(r, 1)), to: Fe(er(r, 1)) },
5988
5988
  thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to: Fe(r) },
5989
5989
  nextQuarter: { label: "Следующий квартал", group: "quarter", from: de(Xe(r, 1)), to: Fe(Xe(r, 1)) },
@@ -6006,7 +6006,7 @@ class ui {
6006
6006
  fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: i },
6007
6007
  tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to: Ae(r, e) },
6008
6008
  tillEndOfThisTenDays: { label: "До конца этой декады", group: "other", section: "tillEnd", from: t, to: o.to },
6009
- tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: I(r) },
6009
+ tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: O(r) },
6010
6010
  tillEndOfThisQuarter: { label: "До конца этого квартала", group: "other", section: "tillEnd", from: t, to: Fe(r) },
6011
6011
  tillEndOfThisHalfYear: { label: "До конца этого полугодия", group: "other", section: "tillEnd", from: t, to: m.endOfHalfYear(r) },
6012
6012
  tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to: Te(r) },
@@ -6131,7 +6131,7 @@ const ge = class ge extends h {
6131
6131
  * Время кэширования данных ответов на запросы (секунд).
6132
6132
  */
6133
6133
  s(this, "responseDataCacheTimeout");
6134
- this.responseDataCacheTimeout = O().config.http.responseDataCacheTimeout;
6134
+ this.responseDataCacheTimeout = I().config.http.responseDataCacheTimeout;
6135
6135
  }
6136
6136
  /**
6137
6137
  * Возвращает кэшированные данные.
@@ -6575,7 +6575,7 @@ class yi extends re {
6575
6575
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
6576
6576
  */
6577
6577
  createOrderFromDraft(r, e, t, i = {}) {
6578
- const o = O().config.dateFormats.api;
6578
+ const o = I().config.dateFormats.api;
6579
6579
  return this.post(
6580
6580
  `/internal/orders/offers/${r}/create-order`,
6581
6581
  {
@@ -7010,7 +7010,7 @@ class wi extends re {
7010
7010
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
7011
7011
  */
7012
7012
  createClientOrder(r, e, t, i, o = {}) {
7013
- const c = O().config.dateFormats.api;
7013
+ const c = I().config.dateFormats.api;
7014
7014
  return this.post(
7015
7015
  `/internal/clients/${r}/orders/${e}`,
7016
7016
  {
@@ -7085,7 +7085,7 @@ class wi extends re {
7085
7085
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
7086
7086
  */
7087
7087
  updateOrder(r, e, t = {}) {
7088
- const i = O().config.dateFormats.api;
7088
+ const i = I().config.dateFormats.api;
7089
7089
  return this.patch(
7090
7090
  `/internal/orders/${r}`,
7091
7091
  {
@@ -7297,7 +7297,7 @@ class wi extends re {
7297
7297
  * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
7298
7298
  */
7299
7299
  getDeliveryCost(r, e, t, i = void 0) {
7300
- const o = O().config.dateFormats.api;
7300
+ const o = I().config.dateFormats.api;
7301
7301
  return this.get(
7302
7302
  `/internal/orders/delivery/${r}/cost`,
7303
7303
  {
@@ -7310,6 +7310,7 @@ class wi extends re {
7310
7310
  );
7311
7311
  }
7312
7312
  }
7313
+ const Ci = Symbol("currentOrder");
7313
7314
  class cr {
7314
7315
  /**
7315
7316
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
@@ -7357,7 +7358,7 @@ const lr = (n) => {
7357
7358
  const r = {};
7358
7359
  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;
7359
7360
  };
7360
- class Ci extends h {
7361
+ class Di extends h {
7361
7362
  /**
7362
7363
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
7363
7364
  *
@@ -7465,10 +7466,10 @@ class Cs {
7465
7466
  * @inheritDoc
7466
7467
  */
7467
7468
  s(this, "currency");
7468
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = D(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Oe(r.product) : void 0, this.client = r.client ? new q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
7469
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = D(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Ie(r.product) : void 0, this.client = r.client ? new q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
7469
7470
  }
7470
7471
  }
7471
- class Ds extends Oe {
7472
+ class Ds extends Ie {
7472
7473
  /**
7473
7474
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
7474
7475
  *
@@ -7483,7 +7484,7 @@ class Ds extends Oe {
7483
7484
  this.history = Ce(e.history, (t) => new Cs(t));
7484
7485
  }
7485
7486
  }
7486
- class Di extends h {
7487
+ class Ri extends h {
7487
7488
  /**
7488
7489
  * Возвращает данные об истории изменения цен.
7489
7490
  *
@@ -7493,8 +7494,8 @@ class Di extends h {
7493
7494
  */
7494
7495
  getProductPriceHistory(r) {
7495
7496
  var o, c, u, p, g;
7496
- const e = O().config.dateFormats.api, t = Qr(
7497
- Ie(r, {
7497
+ const e = I().config.dateFormats.api, t = Qr(
7498
+ Oe(r, {
7498
7499
  costDate: {
7499
7500
  from: pr((o = r.costDate) == null ? void 0 : o.from) ? x(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
7500
7501
  to: pr((u = r.costDate) == null ? void 0 : u.to) ? x(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
@@ -7503,7 +7504,7 @@ class Di extends h {
7503
7504
  (y) => T(y) || (W(y) || Dr(y)) && me(y)
7504
7505
  ), i = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
7505
7506
  return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((y) => [
7506
- new Ds(Ie(y[0], { history: y }))
7507
+ new Ds(Oe(y[0], { history: y }))
7507
7508
  ]);
7508
7509
  }
7509
7510
  }
@@ -7522,10 +7523,10 @@ class jr {
7522
7523
  * Список рекомендованных категорий продуктов.
7523
7524
  */
7524
7525
  s(this, "productCategories", []);
7525
- r != null && r.products && (this.products = r.products.map((e) => new Oe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Oe(e)));
7526
+ r != null && r.products && (this.products = r.products.map((e) => new Ie(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Ie(e)));
7526
7527
  }
7527
7528
  }
7528
- class Ri extends h {
7529
+ class bi extends h {
7529
7530
  /**
7530
7531
  * Возвращает данные о рекомендациях указанной категории продуктов.
7531
7532
  *
@@ -7615,7 +7616,7 @@ class Ss extends a {
7615
7616
  }
7616
7617
  class $s extends a {
7617
7618
  }
7618
- class bi {
7619
+ class Pi {
7619
7620
  /**
7620
7621
  * Генерирует и возвращает данные-заглушку неопределённой записи справочника.
7621
7622
  *
@@ -7951,7 +7952,7 @@ const S = ee("common.references_private", () => {
7951
7952
  */
7952
7953
  priceCoefficientsReference: l
7953
7954
  };
7954
- }), Pi = ee("common.references", () => {
7955
+ }), Ti = ee("common.references", () => {
7955
7956
  const n = P(() => {
7956
7957
  const l = S();
7957
7958
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(d).getChannelPrimaryInterest().then((f) => {
@@ -8188,7 +8189,7 @@ class Yr {
8188
8189
  this.resourceType = new Dt(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((t) => new ks(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
8189
8190
  }
8190
8191
  }
8191
- class Ti extends h {
8192
+ class Ai extends h {
8192
8193
  /**
8193
8194
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
8194
8195
  *
@@ -8219,7 +8220,7 @@ class Ti extends h {
8219
8220
  return this.delete(`/internal/seo/${r.slug}/${e}`);
8220
8221
  }
8221
8222
  }
8222
- class Ai extends h {
8223
+ class di extends h {
8223
8224
  /**
8224
8225
  * Возвращает подсказки по адресам.
8225
8226
  *
@@ -8267,7 +8268,7 @@ class Ai extends h {
8267
8268
  }
8268
8269
  }
8269
8270
  var Ls = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.ExternalSeo = "external_seo", n.Guest = "guest", n))(Ls || {});
8270
- class Is extends ot {
8271
+ class Os extends ot {
8271
8272
  /**
8272
8273
  * Инициализирует экземпляр класса {@link User}.
8273
8274
  *
@@ -8294,12 +8295,12 @@ class Is extends ot {
8294
8295
  this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new it(e.pricingRole) : void 0;
8295
8296
  }
8296
8297
  }
8297
- class di extends h {
8298
+ class Si extends h {
8298
8299
  /**
8299
8300
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
8300
8301
  */
8301
8302
  constructor() {
8302
- super(), this.baseUrl = `${O().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
8303
+ super(), this.baseUrl = `${I().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
8303
8304
  }
8304
8305
  /**
8305
8306
  * Функция для получения обновленных токенов доступа.
@@ -8310,13 +8311,13 @@ class di extends h {
8310
8311
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
8311
8312
  }
8312
8313
  }
8313
- class Os extends h {
8314
+ class Is extends h {
8314
8315
  /**
8315
8316
  * Возвращает данные о текущем пользователе.
8316
8317
  */
8317
8318
  // eslint-disable-next-line class-methods-use-this
8318
8319
  getCurrentUser() {
8319
- return this.get("/internal/users/info", {}, (r) => new Is(r.data), !0);
8320
+ return this.get("/internal/users/info", {}, (r) => new Os(r.data), !0);
8320
8321
  }
8321
8322
  }
8322
8323
  const xs = ee("common.user_state_private", () => {
@@ -8331,13 +8332,13 @@ const xs = ee("common.user_state_private", () => {
8331
8332
  */
8332
8333
  currentUser: r
8333
8334
  };
8334
- }), Si = ee("common.user_state", () => ({
8335
+ }), $i = ee("common.user_state", () => ({
8335
8336
  /**
8336
8337
  * Данные о текущем пользователе.
8337
8338
  */
8338
8339
  currentUser: P(() => {
8339
8340
  const r = xs();
8340
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Os).getCurrentUser().then((e) => {
8341
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Is).getCurrentUser().then((e) => {
8341
8342
  r.currentUser = e;
8342
8343
  }).catch(w).finally(() => {
8343
8344
  r.dataLoaderList.currentUser = !1;
@@ -8382,7 +8383,7 @@ class ur extends $r {
8382
8383
  this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new ve(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new wr(o))) ?? [];
8383
8384
  }
8384
8385
  }
8385
- class $i extends _e {
8386
+ class ki extends _e {
8386
8387
  /**
8387
8388
  * Инициализирует экземпляр класса {@link UserRegionsListFilters}.
8388
8389
  *
@@ -8418,7 +8419,7 @@ class $i extends _e {
8418
8419
  return this;
8419
8420
  }
8420
8421
  }
8421
- class ki extends re {
8422
+ class Li extends re {
8422
8423
  /**
8423
8424
  * Возвращает список регионов пользователей.
8424
8425
  *
@@ -8517,7 +8518,7 @@ class ki extends re {
8517
8518
  });
8518
8519
  }
8519
8520
  }
8520
- class Li {
8521
+ class Oi {
8521
8522
  /**
8522
8523
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
8523
8524
  *
@@ -8579,7 +8580,7 @@ export {
8579
8580
  te as ClientShortInfo,
8580
8581
  ls as ClientsAdditionalDataRequestTypeEnum,
8581
8582
  si as ClientsListFilters,
8582
- Oe as CodedIdentity,
8583
+ Ie as CodedIdentity,
8583
8584
  oi as ConfiguratorProvider,
8584
8585
  fs as ConfiguratorsEnum,
8585
8586
  vr as Contact,
@@ -8599,7 +8600,7 @@ export {
8599
8600
  dr as CuratedDirection,
8600
8601
  Sr as Curator,
8601
8602
  j as Currency,
8602
- Ai as DataSuggestionProvider,
8603
+ di as DataSuggestionProvider,
8603
8604
  ui as DateTimeProvider,
8604
8605
  lt as DeletableNamedIdentity,
8605
8606
  Le as DeliveryAddress,
@@ -8607,7 +8608,7 @@ export {
8607
8608
  Jr as DetailedJwtPayload,
8608
8609
  Et as DeviceTypeResolutionConfig,
8609
8610
  Xt as DiscountShortInfo,
8610
- Li as FieldValidationResultData,
8611
+ Oi as FieldValidationResultData,
8611
8612
  V as FilterGroup,
8612
8613
  qr as FilterItem,
8613
8614
  br as FilterOpEnum,
@@ -8653,10 +8654,10 @@ export {
8653
8654
  Ct as PaymentType,
8654
8655
  He as PreferencesStorageProvider,
8655
8656
  cr as PriceAnalyze,
8656
- Ci as PriceAnalyzeProvider,
8657
+ Di as PriceAnalyzeProvider,
8657
8658
  Ge as PriceCoefficient,
8658
8659
  Kr as PriceCoefficientEnum,
8659
- Di as PriceHistoryDataProvider,
8660
+ Ri as PriceHistoryDataProvider,
8660
8661
  Cs as PriceHistoryItem,
8661
8662
  pe as PriceTemplate,
8662
8663
  ir as PriceTemplateCategory,
@@ -8680,10 +8681,10 @@ export {
8680
8681
  ct as PropertyType,
8681
8682
  ss as PropertyTypeEnum,
8682
8683
  ce as PropertyValue,
8683
- Ri as RecommendationsDataProvider,
8684
+ bi as RecommendationsDataProvider,
8684
8685
  jr as RecommendationsList,
8685
8686
  a as Reference,
8686
- bi as ReferenceDataFactory,
8687
+ Pi as ReferenceDataFactory,
8687
8688
  d as ReferenceDataProvider,
8688
8689
  ae as Region,
8689
8690
  Dt as ResourceType,
@@ -8692,7 +8693,7 @@ export {
8692
8693
  F as SalesDirection,
8693
8694
  Jt as SentryConfig,
8694
8695
  Yr as Seo,
8695
- Ti as SeoDataProvider,
8696
+ Ai as SeoDataProvider,
8696
8697
  ft as SourcePrimaryInterest,
8697
8698
  Zt as StockCount,
8698
8699
  ci as TableDataPagination,
@@ -8704,26 +8705,27 @@ export {
8704
8705
  yt as UnitsHelper,
8705
8706
  ii as UnknownClientDataProvider,
8706
8707
  Vr as UpdatableNamedIdentity,
8707
- Is as User,
8708
- di as UserAuthDataProvider,
8708
+ Os as User,
8709
+ Si as UserAuthDataProvider,
8709
8710
  ot as UserCommonInfo,
8710
- Os as UserDataProvider,
8711
+ Is as UserDataProvider,
8711
8712
  it as UserPricingRole,
8712
8713
  ur as UserRegion,
8713
8714
  wr as UserRegionEmployee,
8714
- ki as UserRegionProvider,
8715
+ Li as UserRegionProvider,
8715
8716
  $r as UserRegionShortInfo,
8716
- $i as UserRegionsListFilters,
8717
+ ki as UserRegionsListFilters,
8717
8718
  q as UserShortInfo,
8718
8719
  Ls as UserTypeEnum,
8719
8720
  ni as VersionConfig,
8720
8721
  qe as Warehouse,
8721
8722
  Vt as WebSocketConfig,
8723
+ Ci as currentOrderInjectionKey,
8722
8724
  Hr as findCatalogItemByIdRecursive,
8723
8725
  Mr as flattenCatalogItems,
8724
8726
  gi as pluralize,
8725
8727
  tr as useAuthStateStore,
8726
- O as useBaseConfigStateStore,
8727
- Pi as useReferencesStore,
8728
- Si as useUserStateStore
8728
+ I as useBaseConfigStateStore,
8729
+ Ti as useReferencesStore,
8730
+ $i as useUserStateStore
8729
8731
  };