@snabcentr/common-lib 4.1.0-dev → 4.3.0-dev

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.
Files changed (106) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/sc-common-lib.js +614 -543
  3. package/dist/sc-common-lib.js.map +1 -1
  4. package/dist/sc-common-lib.umd.cjs +1 -1
  5. package/dist/sc-common-lib.umd.cjs.map +1 -1
  6. package/dist/src/blog/providers/blog-provider.d.ts +1 -5
  7. package/dist/src/blog/providers/blog-provider.d.ts.map +1 -1
  8. package/dist/src/catalog/providers/client-product-data-provider.d.ts +1 -3
  9. package/dist/src/catalog/providers/client-product-data-provider.d.ts.map +1 -1
  10. package/dist/src/catalog/providers/price-template-provider.d.ts +1 -5
  11. package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
  12. package/dist/src/catalog/providers/product-data-provider.d.ts +1 -3
  13. package/dist/src/catalog/providers/product-data-provider.d.ts.map +1 -1
  14. package/dist/src/catalog/providers/properties-provider.d.ts +1 -5
  15. package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
  16. package/dist/src/clients/providers/client-data-provider.d.ts +1 -5
  17. package/dist/src/clients/providers/client-data-provider.d.ts.map +1 -1
  18. package/dist/src/discounts/providers/discount-provider.d.ts +1 -5
  19. package/dist/src/discounts/providers/discount-provider.d.ts.map +1 -1
  20. package/dist/src/faq/providers/faq-provider.d.ts +1 -3
  21. package/dist/src/faq/providers/faq-provider.d.ts.map +1 -1
  22. package/dist/src/index.d.ts +1 -0
  23. package/dist/src/index.d.ts.map +1 -1
  24. package/dist/src/managers/classes/index.d.ts +1 -0
  25. package/dist/src/managers/classes/index.d.ts.map +1 -1
  26. package/dist/src/managers/classes/managers-list-filters.d.ts +47 -0
  27. package/dist/src/managers/classes/managers-list-filters.d.ts.map +1 -0
  28. package/dist/src/managers/index.d.ts +1 -0
  29. package/dist/src/managers/index.d.ts.map +1 -1
  30. package/dist/src/managers/interfaces/i-manager-save-data.d.ts +18 -0
  31. package/dist/src/managers/interfaces/i-manager-save-data.d.ts.map +1 -0
  32. package/dist/src/managers/interfaces/i-managers-list-filters.d.ts +36 -0
  33. package/dist/src/managers/interfaces/i-managers-list-filters.d.ts.map +1 -0
  34. package/dist/src/managers/interfaces/index.d.ts +2 -0
  35. package/dist/src/managers/interfaces/index.d.ts.map +1 -1
  36. package/dist/src/managers/providers/index.d.ts +2 -0
  37. package/dist/src/managers/providers/index.d.ts.map +1 -0
  38. package/dist/src/managers/providers/manager-provider.d.ts +63 -0
  39. package/dist/src/managers/providers/manager-provider.d.ts.map +1 -0
  40. package/dist/src/offers/providers/offers-data-provider.d.ts +10 -5
  41. package/dist/src/offers/providers/offers-data-provider.d.ts.map +1 -1
  42. package/dist/src/operators/classes/index.d.ts +4 -0
  43. package/dist/src/operators/classes/index.d.ts.map +1 -0
  44. package/dist/src/operators/classes/operator-full-info.d.ts +23 -0
  45. package/dist/src/operators/classes/operator-full-info.d.ts.map +1 -0
  46. package/dist/src/operators/classes/operator-short-info.d.ts +18 -0
  47. package/dist/src/operators/classes/operator-short-info.d.ts.map +1 -0
  48. package/dist/src/operators/classes/operators-list-filters.d.ts +47 -0
  49. package/dist/src/operators/classes/operators-list-filters.d.ts.map +1 -0
  50. package/dist/src/operators/index.d.ts +4 -0
  51. package/dist/src/operators/index.d.ts.map +1 -0
  52. package/dist/src/operators/interfaces/i-operator-full-info.d.ts +16 -0
  53. package/dist/src/operators/interfaces/i-operator-full-info.d.ts.map +1 -0
  54. package/dist/src/operators/interfaces/i-operator-save-data.d.ts +18 -0
  55. package/dist/src/operators/interfaces/i-operator-save-data.d.ts.map +1 -0
  56. package/dist/src/operators/interfaces/i-operator-short-info.d.ts +11 -0
  57. package/dist/src/operators/interfaces/i-operator-short-info.d.ts.map +1 -0
  58. package/dist/src/operators/interfaces/i-operators-list-filters.d.ts +36 -0
  59. package/dist/src/operators/interfaces/i-operators-list-filters.d.ts.map +1 -0
  60. package/dist/src/operators/interfaces/index.d.ts +5 -0
  61. package/dist/src/operators/interfaces/index.d.ts.map +1 -0
  62. package/dist/src/operators/providers/index.d.ts +2 -0
  63. package/dist/src/operators/providers/index.d.ts.map +1 -0
  64. package/dist/src/operators/providers/operator-provider.d.ts +61 -0
  65. package/dist/src/operators/providers/operator-provider.d.ts.map +1 -0
  66. package/dist/src/orders/providers/orders-data-provider.d.ts +1 -5
  67. package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
  68. package/dist/src/pagination/index.d.ts +0 -1
  69. package/dist/src/pagination/index.d.ts.map +1 -1
  70. package/dist/src/reclamations/providers/reclamation-provider.d.ts +1 -5
  71. package/dist/src/reclamations/providers/reclamation-provider.d.ts.map +1 -1
  72. package/dist/src/table-data/classes/index.d.ts +0 -2
  73. package/dist/src/table-data/classes/index.d.ts.map +1 -1
  74. package/dist/src/table-data/classes/table-data-pagination-request-params.d.ts +1 -1
  75. package/dist/src/table-data/classes/table-data-pagination-request-params.d.ts.map +1 -1
  76. package/dist/src/table-data/classes/table-data-sort-request-params.d.ts +1 -1
  77. package/dist/src/table-data/classes/table-data-sort-request-params.d.ts.map +1 -1
  78. package/dist/src/table-data/index.d.ts +0 -1
  79. package/dist/src/table-data/index.d.ts.map +1 -1
  80. package/dist/src/table-data/interfaces/i-pagination.d.ts +1 -1
  81. package/dist/src/table-data/interfaces/i-pagination.d.ts.map +1 -1
  82. package/dist/src/table-data/interfaces/index.d.ts +0 -4
  83. package/dist/src/table-data/interfaces/index.d.ts.map +1 -1
  84. package/dist/src/user-regions/providers/user-region-provider.d.ts +1 -5
  85. package/dist/src/user-regions/providers/user-region-provider.d.ts.map +1 -1
  86. package/package.json +2 -2
  87. package/dist/src/pagination/providers/base-pagination-provider.d.ts +0 -37
  88. package/dist/src/pagination/providers/base-pagination-provider.d.ts.map +0 -1
  89. package/dist/src/pagination/providers/index.d.ts +0 -2
  90. package/dist/src/pagination/providers/index.d.ts.map +0 -1
  91. package/dist/src/table-data/classes/filter-group.d.ts +0 -32
  92. package/dist/src/table-data/classes/filter-group.d.ts.map +0 -1
  93. package/dist/src/table-data/classes/filter-item.d.ts +0 -33
  94. package/dist/src/table-data/classes/filter-item.d.ts.map +0 -1
  95. package/dist/src/table-data/enums/filter-op-enum.d.ts +0 -74
  96. package/dist/src/table-data/enums/filter-op-enum.d.ts.map +0 -1
  97. package/dist/src/table-data/enums/index.d.ts +0 -2
  98. package/dist/src/table-data/enums/index.d.ts.map +0 -1
  99. package/dist/src/table-data/interfaces/i-filter-group.d.ts +0 -19
  100. package/dist/src/table-data/interfaces/i-filter-group.d.ts.map +0 -1
  101. package/dist/src/table-data/interfaces/i-filter-item.d.ts +0 -20
  102. package/dist/src/table-data/interfaces/i-filter-item.d.ts.map +0 -1
  103. package/dist/src/table-data/interfaces/i-pagination-request-params.d.ts +0 -14
  104. package/dist/src/table-data/interfaces/i-pagination-request-params.d.ts.map +0 -1
  105. package/dist/src/table-data/interfaces/i-sort-request-params.d.ts +0 -14
  106. package/dist/src/table-data/interfaces/i-sort-request-params.d.ts.map +0 -1
@@ -1,41 +1,41 @@
1
- import { ChannelPrimaryInterest as e, CityWithRegionAndCountry as t, ContactLinks as n, Country as r, CuratedDirection as i, Currency as a, DateHelper as o, DeliveryType as s, FieldValidationResultData as c, GeoCoordinates as ee, HttpRequester as l, Identity as u, Manager as te, ManagerCommon as ne, NamedIdentity as d, Operator as re, Opf as ie, OpfEnum as f, OrderStatus as ae, PartnerGroup as p, PaymentType as oe, PriceCoefficient as se, PropertyType as ce, Reference as le, Region as ue, ResourceType as de, SalesDirection as m, SourcePrimaryInterest as fe, TypedInstanceFactory as h, UpdatableNamedIdentity as pe, UserCommonInfo as me, UserRegionShortInfo as he, Warehouse as ge, useBaseConfigStore as g } from "@snabcentr/common-core";
2
- import { addBusinessDays as _e, addDays as _, addMonths as v, addQuarters as ve, addWeeks as ye, addYears as be, differenceInCalendarDays as xe, differenceInCalendarMonths as Se, endOfDay as y, endOfMonth as b, endOfQuarter as Ce, endOfToday as we, endOfTomorrow as Te, endOfWeek as Ee, endOfYear as De, endOfYesterday as Oe, format as x, getDate as ke, getDaysInMonth as Ae, parseISO as S, setDate as je, startOfDay as C, startOfMonth as w, startOfQuarter as Me, startOfToday as Ne, startOfTomorrow as Pe, startOfWeek as T, startOfYear as E, startOfYesterday as Fe, subDays as Ie, subMonths as Le, subQuarters as Re, subWeeks as ze, subYears as Be } from "date-fns";
3
- import { cloneDeep as Ve, endsWith as He, forEach as Ue, includes as We, isArray as Ge, isDate as Ke, isEmpty as qe, isFunction as Je, isNil as D, isObject as Ye, isPlainObject as Xe, isString as O, isUndefined as Ze, map as k, merge as Qe, omitBy as $e, round as et, some as tt, startsWith as nt, toUpper as rt } from "lodash-es";
1
+ import { BasePaginationProvider as e, ChannelPrimaryInterest as t, CityWithRegionAndCountry as n, ContactLinks as r, Country as i, CuratedDirection as a, Currency as o, DateHelper as s, DeliveryType as c, FieldValidationResultData as l, FilterGroup as ee, FilterOpEnum as te, GeoCoordinates as ne, HttpRequester as u, Identity as d, Manager as f, ManagerCommon as re, ManagerDataProvider as ie, NamedIdentity as p, Operator as ae, Opf as oe, OpfEnum as m, OrderStatus as se, PartnerGroup as h, PaymentType as ce, PriceCoefficient as le, PropertyType as ue, Reference as de, Region as fe, ResourceType as pe, SalesDirection as g, Shop as me, SourcePrimaryInterest as he, TypedInstanceFactory as _, UpdatableNamedIdentity as ge, User as _e, UserCommonInfo as ve, UserRegionShortInfo as ye, Warehouse as be, useBaseConfigStore as v } from "@snabcentr/common-core";
2
+ import { addBusinessDays as xe, addDays as y, addMonths as b, addQuarters as Se, addWeeks as Ce, addYears as we, differenceInCalendarDays as Te, differenceInCalendarMonths as Ee, endOfDay as x, endOfMonth as S, endOfQuarter as De, endOfToday as Oe, endOfTomorrow as ke, endOfWeek as Ae, endOfYear as je, endOfYesterday as Me, format as C, getDate as Ne, getDaysInMonth as Pe, parseISO as w, setDate as Fe, startOfDay as T, startOfMonth as E, startOfQuarter as Ie, startOfToday as Le, startOfTomorrow as Re, startOfWeek as D, startOfYear as O, startOfYesterday as ze, subDays as Be, subMonths as Ve, subQuarters as He, subWeeks as Ue, subYears as We } from "date-fns";
3
+ import { cloneDeep as Ge, endsWith as Ke, forEach as qe, includes as Je, isArray as Ye, isDate as Xe, isEmpty as Ze, isFunction as Qe, isNil as k, isObject as $e, isString as A, isUndefined as et, map as j, merge as tt, omitBy as nt, round as rt, some as it, startsWith as at, toUpper as ot } from "lodash-es";
4
4
  export * from "@snabcentr/common-core";
5
5
  //#region src/blog/enums/blog-post-media-type-enum.ts
6
- var it = /* @__PURE__ */ function(e) {
6
+ var st = /* @__PURE__ */ function(e) {
7
7
  return e.Image = "image", e.Video = "video", e;
8
- }({}), at = class extends u {
8
+ }({}), ct = class extends d {
9
9
  mediaType;
10
10
  isCover;
11
11
  isUnused;
12
12
  url;
13
13
  urlWebp;
14
14
  constructor(e) {
15
- super(e, ""), this.mediaType = e?.mediaType ?? it.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
15
+ super(e, ""), this.mediaType = e?.mediaType ?? st.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
16
16
  }
17
17
  isImage() {
18
- return this.mediaType === it.Image;
18
+ return this.mediaType === st.Image;
19
19
  }
20
20
  isVideo() {
21
- return this.mediaType === it.Video;
21
+ return this.mediaType === st.Video;
22
22
  }
23
- }, ot = /* @__PURE__ */ function(e) {
23
+ }, lt = /* @__PURE__ */ function(e) {
24
24
  return e.Draft = "draft", e.Published = "published", e.Scheduled = "scheduled", e;
25
- }({}), A = class extends u {
25
+ }({}), M = class extends d {
26
26
  createdAt;
27
27
  constructor(e, t) {
28
- super(e, t), this.createdAt = o.parse(e?.createdAt) ?? /* @__PURE__ */ new Date();
28
+ super(e, t), this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date();
29
29
  }
30
- }, st = class e extends A {
30
+ }, ut = class e extends M {
31
31
  static resolvePublicationStatus(e) {
32
- return D(e) ? ot.Draft : e.getTime() > Date.now() ? ot.Scheduled : ot.Published;
32
+ return k(e) ? lt.Draft : e.getTime() > Date.now() ? lt.Scheduled : lt.Published;
33
33
  }
34
34
  static getSlugError(e) {
35
- return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : nt(e, "-") || He(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : We(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
35
+ return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : at(e, "-") || Ke(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Je(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
36
36
  }
37
37
  static parseDate(e) {
38
- return D(e) ? null : O(e) ? S(e) : e;
38
+ return k(e) ? null : A(e) ? w(e) : e;
39
39
  }
40
40
  slug;
41
41
  title;
@@ -46,11 +46,11 @@ var it = /* @__PURE__ */ function(e) {
46
46
  getPublicationStatus() {
47
47
  return e.resolvePublicationStatus(this.publishedAt);
48
48
  }
49
- }, ct = class extends st {
49
+ }, dt = class extends ut {
50
50
  content;
51
51
  media;
52
52
  constructor(e) {
53
- super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new at(e));
53
+ super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new ct(e));
54
54
  }
55
55
  toSaveData(e = !1) {
56
56
  return {
@@ -66,21 +66,21 @@ var it = /* @__PURE__ */ function(e) {
66
66
  getUnusedMedia() {
67
67
  return this.media.filter((e) => e.isUnused);
68
68
  }
69
- }, j = class {
69
+ }, N = class {
70
70
  asClearRaw() {
71
71
  let e = {};
72
72
  return Object.keys(this).forEach((t) => {
73
73
  let n = this[t];
74
- D(n) || O(n) && n.trim().length === 0 || Je(n.isNewRec) && n.isNewRec() || (e[t] = n);
74
+ k(n) || A(n) && n.trim().length === 0 || Qe(n.isNewRec) && n.isNewRec() || (e[t] = n);
75
75
  }), e;
76
76
  }
77
- }, M = class {
77
+ }, P = class {
78
78
  from;
79
79
  to;
80
80
  constructor(e) {
81
- this.from = O(e?.from) ? S(e.from) : e?.from ?? null, this.to = O(e?.to) ? S(e.to) : e?.to ?? null;
81
+ this.from = A(e?.from) ? w(e.from) : e?.from ?? null, this.to = A(e?.to) ? w(e.to) : e?.to ?? null;
82
82
  }
83
- }, lt = class extends j {
83
+ }, ft = class extends N {
84
84
  id;
85
85
  title;
86
86
  slug;
@@ -89,7 +89,7 @@ var it = /* @__PURE__ */ function(e) {
89
89
  publishedAt;
90
90
  createdAt;
91
91
  constructor(e) {
92
- super(), this.id = e?.id, this.title = e?.title, this.slug = e?.slug, this.content = e?.content, this.publicationStatus = e?.publicationStatus, this.publishedAt = new M(e?.publishedAt), this.createdAt = new M(e?.createdAt);
92
+ super(), this.id = e?.id, this.title = e?.title, this.slug = e?.slug, this.content = e?.content, this.publicationStatus = e?.publicationStatus, this.publishedAt = new P(e?.publishedAt), this.createdAt = new P(e?.createdAt);
93
93
  }
94
94
  resetFilterValue(e) {
95
95
  switch (e) {
@@ -111,84 +111,29 @@ var it = /* @__PURE__ */ function(e) {
111
111
  let e = super.asClearRaw();
112
112
  return !e?.publishedAt?.from && !e?.publishedAt?.to && delete e.publishedAt, !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
113
113
  }
114
- }, ut = /* @__PURE__ */ function(e) {
115
- return e.BeginWith = "bw", e.Contains = "cn", e.Custom = "custom", e.EndsWith = "ew", e.Equals = "eq", e.GreaterOrEqual = "ge", e.GreaterThan = "gt", e.InList = "in", e.LessOrEqual = "le", e.LessThan = "lt", e.NotBeginWith = "bn", e.NotContains = "nc", e.NotEndsWith = "en", e.NotEqual = "ne", e.NotInList = "ni", e.NotNull = "nn", e.Null = "nu", e;
116
- }({}), dt = class {
117
- field;
118
- op;
119
- value;
120
- constructor(e) {
121
- this.field = e?.field ?? "", this.op = e?.op ?? ut.Equals, this.value = e?.value ?? "";
122
- }
123
- toPrimitive() {
124
- let e = g().config.dateFormats.api, t = {
125
- field: this.field,
126
- op: this.op
127
- };
128
- if (Ke(this.value)) t.value = x(this.value, e);
129
- else if (Xe(this.value)) {
130
- let n = this.value;
131
- t.value = {
132
- from: n.from ? x(n.from, e) : null,
133
- to: n.to ? x(n.to, e) : null
134
- };
135
- } else t.value = this.value;
136
- return t;
137
- }
138
- }, ft = class e {
139
- groupOp;
140
- filters;
141
- groups;
142
- constructor(t) {
143
- this.groupOp = t?.groupOp ?? "and", this.filters = t?.filters?.map((e) => new dt(e)) ?? [], this.groups = t?.groups?.map((t) => new e(t)) ?? [];
144
- }
145
- toPrimitive() {
146
- return {
147
- groupOp: this.groupOp,
148
- filters: this.filters.map((e) => e instanceof dt && Je(e.toPrimitive) ? e.toPrimitive() : e),
149
- groups: this.groups.map((t) => t instanceof e ? t.toPrimitive() : t)
150
- };
151
- }
152
- }, N = class extends l {
153
- getPaginated(e, t, n, r, i, a, o, s) {
154
- let c = {
155
- page: r?.page ?? 1,
156
- perPage: r?.pageSize ?? 10
157
- };
158
- return t && (c.filters = JSON.stringify((t instanceof ft ? t : new ft(t)).toPrimitive())), qe(n) || (c.sort = Ge(n) ? n : [n]), i && (c = {
159
- ...c,
160
- ...i
161
- }), this.get(e, c, a, o, s);
162
- }
163
- getTypedPaginated(e, t, n, r, i, a, o, s) {
164
- return this.getPaginated(t, n, r, i, a, (t) => ({
165
- ...t.data,
166
- data: h.instanceListInitializer(e, t.data.data)
167
- }), o, s);
168
- }
169
- }, pt = class e extends N {
114
+ }, pt = class t extends e {
170
115
  static preparePostSaveData(e) {
171
116
  let t = {};
172
- if (Ze(e.title) || (t.title = e.title), Ze(e.slug) || (t.slug = e.slug), Ze(e.content) || (t.content = e.content), !Ze(e.publishedAt)) {
173
- let n = g().config.dateFormats.api;
174
- t.publishedAt = D(e.publishedAt) ? null : x(e.publishedAt, n);
117
+ if (et(e.title) || (t.title = e.title), et(e.slug) || (t.slug = e.slug), et(e.content) || (t.content = e.content), !et(e.publishedAt)) {
118
+ let n = v().config.dateFormats.api;
119
+ t.publishedAt = k(e.publishedAt) ? null : C(e.publishedAt, n);
175
120
  }
176
121
  return t;
177
122
  }
178
123
  getPostList(e, t, n) {
179
124
  return this.getPaginated("/internal/blog", e, t, n, {}, (e) => ({
180
125
  ...e.data,
181
- data: e.data.data.map((e) => new st(e))
126
+ data: e.data.data.map((e) => new ut(e))
182
127
  }));
183
128
  }
184
129
  getPost(e) {
185
- return this.get(`/internal/blog/${e}`, {}, (e) => new ct(e.data));
130
+ return this.get(`/internal/blog/${e}`, {}, (e) => new dt(e.data));
186
131
  }
187
- createPost(t, n = {}) {
188
- return this.post("/internal/blog", e.preparePostSaveData(t), (e) => new ct(e.data), n);
132
+ createPost(e, n = {}) {
133
+ return this.post("/internal/blog", t.preparePostSaveData(e), (e) => new dt(e.data), n);
189
134
  }
190
- updatePost(t, n, r = {}) {
191
- return this.patch(`/internal/blog/${t}`, e.preparePostSaveData(n), (e) => new ct(e.data), r);
135
+ updatePost(e, n, r = {}) {
136
+ return this.patch(`/internal/blog/${e}`, t.preparePostSaveData(n), (e) => new dt(e.data), r);
192
137
  }
193
138
  removePost(e) {
194
139
  return this.delete(`/internal/blog/${e}`);
@@ -204,20 +149,20 @@ var it = /* @__PURE__ */ function(e) {
204
149
  onUploadProgress: (e) => {
205
150
  r && r(e.total ? Math.round(e.loaded / e.total * 100) : 0);
206
151
  }
207
- }, (e) => new at(e.data), i);
152
+ }, (e) => new ct(e.data), i);
208
153
  }
209
154
  updateMedia(e, t, n, r = {}) {
210
- return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new at(e.data), r);
155
+ return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new ct(e.data), r);
211
156
  }
212
157
  removeMedia(e, t) {
213
158
  return this.delete(`/internal/blog/${e}/media/${t}`);
214
159
  }
215
- }, mt = class extends pe {
160
+ }, mt = class extends ge {
216
161
  deletedAt;
217
162
  constructor(e) {
218
- super(e), this.deletedAt = o.parse(e?.deletedAt);
163
+ super(e), this.deletedAt = s.parse(e?.deletedAt);
219
164
  }
220
- }, P = class extends d {
165
+ }, F = class extends p {
221
166
  type;
222
167
  isActive;
223
168
  constructor(e) {
@@ -231,13 +176,13 @@ var it = /* @__PURE__ */ function(e) {
231
176
  percent;
232
177
  owner;
233
178
  constructor(e) {
234
- super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.isLowPriceAllowed = e?.isLowPriceAllowed ?? !1, this.publishedAt = o.parse(e?.publishedAt), this.description = e?.description ?? void 0, this.percent = e?.percent ?? 0, this.owner = new P(e?.owner);
179
+ super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.isLowPriceAllowed = e?.isLowPriceAllowed ?? !1, this.publishedAt = s.parse(e?.publishedAt), this.description = e?.description ?? void 0, this.percent = e?.percent ?? 0, this.owner = new F(e?.owner);
235
180
  }
236
- }, F = class extends pe {
181
+ }, I = class extends ge {
237
182
  description;
238
183
  owner;
239
184
  constructor(e) {
240
- super(e), this.description = e?.description ?? "", this.owner = e?.owner ? new P(e.owner) : void 0;
185
+ super(e), this.description = e?.description ?? "", this.owner = e?.owner ? new F(e.owner) : void 0;
241
186
  }
242
187
  }, gt = class {
243
188
  coefficient;
@@ -246,15 +191,15 @@ var it = /* @__PURE__ */ function(e) {
246
191
  percent;
247
192
  readOnly;
248
193
  constructor(e) {
249
- this.coefficient = new se(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
194
+ this.coefficient = new le(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
250
195
  }
251
196
  }, _t = class {
252
197
  warehouse;
253
198
  count;
254
199
  constructor(e) {
255
- this.warehouse = new ge(e?.warehouse), this.count = e?.count ?? 0;
200
+ this.warehouse = new be(e?.warehouse), this.count = e?.count ?? 0;
256
201
  }
257
- }, vt = class extends d {
202
+ }, vt = class extends p {
258
203
  slug = "";
259
204
  description;
260
205
  isSquare = !1;
@@ -262,12 +207,12 @@ var it = /* @__PURE__ */ function(e) {
262
207
  constructor(e) {
263
208
  super(e), e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
264
209
  }
265
- }, I = class extends d {
210
+ }, L = class extends p {
266
211
  code = "";
267
212
  constructor(e) {
268
213
  super(e), this.code = e?.code ?? "";
269
214
  }
270
- }, yt = class extends I {
215
+ }, yt = class extends L {
271
216
  slug;
272
217
  type;
273
218
  constructor(e) {
@@ -290,7 +235,7 @@ var it = /* @__PURE__ */ function(e) {
290
235
  constructor(e) {
291
236
  super(e), this.isPrimary = e?.isPrimary ?? !1;
292
237
  }
293
- }, L = class extends bt {
238
+ }, R = class extends bt {
294
239
  supplierSku;
295
240
  unit;
296
241
  pack;
@@ -309,12 +254,12 @@ var it = /* @__PURE__ */ function(e) {
309
254
  retailCostRub;
310
255
  priceCoefficients;
311
256
  constructor(e) {
312
- super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new vt(e.unit) : new vt(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new a(e.currency) : new a(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = O(e?.costDate) ? S(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new _t(e)) ?? [], this.type = "product";
257
+ super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new vt(e.unit) : new vt(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new o(e.currency) : new o(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = A(e?.costDate) ? w(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new _t(e)) ?? [], this.type = "product";
313
258
  let t = e?.category ?? e?.categories?.find((e) => e.isPrimary);
314
259
  t && (this.category = new St({
315
260
  ...t,
316
261
  isPrimary: !0
317
- }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new St(e))), this.images = e?.images?.map((e) => new xt(e, g().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new gt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
262
+ }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new St(e))), this.images = e?.images?.map((e) => new xt(e, v().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new gt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
318
263
  }
319
264
  getIsMeasurable() {
320
265
  return this.unit.isLinear || this.unit.isSquare;
@@ -327,7 +272,7 @@ var it = /* @__PURE__ */ function(e) {
327
272
  }
328
273
  }, Ct = /* @__PURE__ */ function(e) {
329
274
  return e.Discount = "discount", e.PriceTemplate = "price_template", e.ClientPrice = "client_price", e.Product = "product", e;
330
- }({}), R = class extends L {
275
+ }({}), z = class extends R {
331
276
  costCoefficient;
332
277
  costSource;
333
278
  discount;
@@ -338,17 +283,17 @@ var it = /* @__PURE__ */ function(e) {
338
283
  isRequired;
339
284
  isFavorite;
340
285
  constructor(e) {
341
- super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? Ct.Product, this.discount = e?.discount ? new ht(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new F(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new se(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
286
+ super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? Ct.Product, this.discount = e?.discount ? new ht(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new I(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new le(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
342
287
  }
343
- }, z = class extends St {
288
+ }, B = class extends St {
344
289
  isHidden;
345
290
  parentCategoryId;
346
291
  properties;
347
292
  currencyRates;
348
293
  constructor(e) {
349
- super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [rt(e), t])) : void 0;
294
+ super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [ot(e), t])) : void 0;
350
295
  }
351
- }, wt = class extends u {
296
+ }, wt = class extends d {
352
297
  category;
353
298
  product;
354
299
  quantity;
@@ -367,7 +312,7 @@ var it = /* @__PURE__ */ function(e) {
367
312
  originalId;
368
313
  replacementId;
369
314
  constructor(e) {
370
- super(e), this.product = new R(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new z(), this.currency = e.currency ? new a(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ve(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new P(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
315
+ super(e), this.product = new z(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new B(), 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 && Ge(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new F(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
371
316
  }
372
317
  }, Tt = class extends wt {
373
318
  cost;
@@ -380,18 +325,18 @@ var it = /* @__PURE__ */ function(e) {
380
325
  sawing;
381
326
  currency;
382
327
  constructor(e) {
383
- super(e), 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 = Ge(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new a(e.currency);
328
+ super(e), 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 = Ye(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new o(e.currency);
384
329
  }
385
- }, B = class {
330
+ }, V = class {
386
331
  items;
387
332
  resultSum;
388
333
  directionsSum;
389
334
  constructor(e) {
390
335
  this.items = e.items.map((e) => new Tt(e)), this.resultSum = e.resultSum, this.directionsSum = e.directionsSum;
391
336
  }
392
- }, Et = class extends l {
337
+ }, Et = class extends u {
393
338
  getCart(e) {
394
- return this.get(`internal/clients/${e.id}/cart`, {}, (e) => new B(e.data));
339
+ return this.get(`internal/clients/${e.id}/cart`, {}, (e) => new V(e.data));
395
340
  }
396
341
  deleteCart(e) {
397
342
  return this.delete(`internal/clients/${e.id}/cart`);
@@ -408,7 +353,7 @@ var it = /* @__PURE__ */ function(e) {
408
353
  marker: t.marker,
409
354
  is_additional_sale: t.isAdditionalSale,
410
355
  ...t.configuratorParams
411
- }, (e) => new B(e.data), n);
356
+ }, (e) => new V(e.data), n);
412
357
  }
413
358
  patchCartItem(e, t, n = {}) {
414
359
  return this.patch(`internal/clients/${e.id}/cart/${t.id}`, {
@@ -422,13 +367,13 @@ var it = /* @__PURE__ */ function(e) {
422
367
  marker: t.marker,
423
368
  is_additional_sale: t.isAdditionalSale,
424
369
  ...t.configuratorParams
425
- }, (e) => new B(e.data), n);
370
+ }, (e) => new V(e.data), n);
426
371
  }
427
372
  deleteCartItem(e, t) {
428
- return this.delete(`internal/clients/${e.id}/cart/${t.id}`, (e) => new B(e.data));
373
+ return this.delete(`internal/clients/${e.id}/cart/${t.id}`, (e) => new V(e.data));
429
374
  }
430
375
  addCartItemFromCSV(e, t) {
431
- return this.post(`internal/clients/${e.id}/cart/add-products-from-csv`, t, (e) => new B(e.data));
376
+ return this.post(`internal/clients/${e.id}/cart/add-products-from-csv`, t, (e) => new V(e.data));
432
377
  }
433
378
  getCartItemFromCSVExample(e) {
434
379
  return this.get(`internal/clients/${e.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
@@ -437,32 +382,32 @@ var it = /* @__PURE__ */ function(e) {
437
382
  return e.m2Cost = "m2Cost", e.percent = "percent", e.value = "value", e;
438
383
  }({}), Ot = /* @__PURE__ */ function(e) {
439
384
  return e.Checkbox = "checkbox", e.Range = "range", e.Toggle = "toggle", e;
440
- }({}), V = class e extends z {
385
+ }({}), H = class e extends B {
441
386
  categories;
442
387
  products;
443
388
  constructor(t) {
444
- super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new L(e));
389
+ super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new R(e));
445
390
  }
446
- }, kt = class extends z {
391
+ }, kt = class extends B {
447
392
  isDisabled;
448
393
  isRequired;
449
394
  isFavorite;
450
395
  hidingComment;
451
396
  manager;
452
397
  constructor(e) {
453
- super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new te(e.manager) : void 0;
398
+ super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new f(e.manager) : void 0;
454
399
  }
455
400
  }, At = class e extends kt {
456
401
  categories;
457
402
  products;
458
403
  constructor(t) {
459
- super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new R(e));
404
+ super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new z(e));
460
405
  }
461
406
  }, jt = class {
462
407
  priceCoefficient;
463
408
  increasePercent;
464
409
  constructor(e) {
465
- this.priceCoefficient = e?.priceCoefficient && new se(e.priceCoefficient), this.increasePercent = e?.increasePercent;
410
+ this.priceCoefficient = e?.priceCoefficient && new le(e.priceCoefficient), this.increasePercent = e?.increasePercent;
466
411
  }
467
412
  }, Mt = class extends jt {
468
413
  constructor(e) {
@@ -471,16 +416,16 @@ var it = /* @__PURE__ */ function(e) {
471
416
  }, Nt = class extends Mt {
472
417
  productCategory;
473
418
  constructor(e) {
474
- super(e), this.productCategory = new z(e?.productCategory);
419
+ super(e), this.productCategory = new B(e?.productCategory);
475
420
  }
476
- }, Pt = class extends d {
421
+ }, Pt = class extends p {
477
422
  photo;
478
423
  contacts;
479
424
  curatedDirection;
480
425
  constructor(e) {
481
- super(e), this.photo = e.photo, this.contacts = new n(e.contacts), this.curatedDirection = new i(e.curatedDirection);
426
+ super(e), this.photo = e.photo, this.contacts = new r(e.contacts), this.curatedDirection = new a(e.curatedDirection);
482
427
  }
483
- }, H = class extends me {
428
+ }, U = class extends ve {
484
429
  salesDirection;
485
430
  debt;
486
431
  alternativeName;
@@ -491,47 +436,47 @@ var it = /* @__PURE__ */ function(e) {
491
436
  managers;
492
437
  curators;
493
438
  constructor(e) {
494
- super(e), this.salesDirection = new m(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new t(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new ne(e)) ?? [], this.curators = e?.curators?.map((e) => new Pt(e)) ?? void 0;
439
+ super(e), this.salesDirection = new g(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new n(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new re(e)) ?? [], this.curators = e?.curators?.map((e) => new Pt(e)) ?? void 0;
495
440
  }
496
- }, Ft = class extends A {
441
+ }, Ft = class extends M {
497
442
  deletedAt;
498
443
  constructor(e, t) {
499
- super(e, t), this.deletedAt = o.parse(e?.deletedAt);
444
+ super(e, t), this.deletedAt = s.parse(e?.deletedAt);
500
445
  }
501
- }, U = class extends Ft {
446
+ }, W = class extends Ft {
502
447
  client;
503
448
  priceTemplate;
504
449
  constructor(e) {
505
- super(e), this.client = new H(e?.client), this.priceTemplate = new F(e?.priceTemplate);
450
+ super(e), this.client = new U(e?.client), this.priceTemplate = new I(e?.priceTemplate);
506
451
  }
507
452
  }, It = class extends Mt {
508
453
  product;
509
454
  constructor(e) {
510
- super(e), this.product = new L(e?.product);
455
+ super(e), this.product = new R(e?.product);
511
456
  }
512
- }, W = class extends d {
457
+ }, G = class extends p {
513
458
  type;
514
459
  description;
515
460
  metadata;
516
461
  isFilterable;
517
462
  constructor(e) {
518
- super(e), this.type = new ce(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
463
+ super(e), this.type = new ue(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
519
464
  }
520
- }, G = class {
465
+ }, K = class {
521
466
  property;
522
467
  value;
523
468
  constructor(e) {
524
- this.property = new W(e?.property), this.value = e?.value ?? "";
469
+ this.property = new G(e?.property), this.value = e?.value ?? "";
525
470
  }
526
471
  }, Lt = class {
527
472
  id;
528
473
  name;
529
474
  description;
530
475
  ownerName;
531
- createdAt = new M();
532
- updatedAt = new M();
476
+ createdAt = new P();
477
+ updatedAt = new P();
533
478
  constructor(e) {
534
- this.id = e?.id, this.name = e?.name, this.description = e?.description, this.ownerName = e?.ownerName, this.createdAt = new M(e?.createdAt), this.updatedAt = new M(e?.updatedAt);
479
+ this.id = e?.id, this.name = e?.name, this.description = e?.description, this.ownerName = e?.ownerName, this.createdAt = new P(e?.createdAt), this.updatedAt = new P(e?.updatedAt);
535
480
  }
536
481
  resetFilterValue(e) {
537
482
  switch (e) {
@@ -552,26 +497,26 @@ var it = /* @__PURE__ */ function(e) {
552
497
  let e = {};
553
498
  return Object.keys(this).forEach((t) => {
554
499
  let n = this[t];
555
- D(n) || O(n) && n.trim().length === 0 || Je(n.isNewRec) && n.isNewRec() || (e[t] = n);
500
+ k(n) || A(n) && n.trim().length === 0 || Qe(n.isNewRec) && n.isNewRec() || (e[t] = n);
556
501
  }), !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.updatedAt?.from && !e?.updatedAt?.to && delete e.updatedAt, e;
557
502
  }
558
503
  }, Rt = class extends jt {
559
504
  executor;
560
505
  createdAt;
561
506
  constructor(e) {
562
- super(e), this.executor = e?.executor ? new P(e.executor) : void 0, this.createdAt = o.parse(e?.createdAt);
507
+ super(e), this.executor = e?.executor ? new F(e.executor) : void 0, this.createdAt = s.parse(e?.createdAt);
563
508
  }
564
509
  }, zt = class extends Rt {
565
510
  product;
566
511
  constructor(e) {
567
- super(e), this.product = new L(e?.product);
512
+ super(e), this.product = new R(e?.product);
568
513
  }
569
514
  }, Bt = class extends Rt {
570
515
  productCategory;
571
516
  constructor(e) {
572
- super(e), this.productCategory = new z(e?.productCategory);
517
+ super(e), this.productCategory = new B(e?.productCategory);
573
518
  }
574
- }, K = class extends d {
519
+ }, q = class extends p {
575
520
  description;
576
521
  canChangeLowCost;
577
522
  parentRoleId;
@@ -586,7 +531,7 @@ var it = /* @__PURE__ */ function(e) {
586
531
  category;
587
532
  minCoefficient;
588
533
  constructor(e) {
589
- this.role = new K(e?.role), this.category = new z(e?.category), this.minCoefficient = new se(e?.minCoefficient);
534
+ this.role = new q(e?.role), this.category = new B(e?.category), this.minCoefficient = new le(e?.minCoefficient);
590
535
  }
591
536
  }, Ht = class {
592
537
  isFake;
@@ -602,7 +547,7 @@ var it = /* @__PURE__ */ function(e) {
602
547
  property;
603
548
  settings;
604
549
  constructor(e) {
605
- this.category = new z(e?.category), this.property = new W(e?.property), this.settings = new Ht(e?.settings);
550
+ this.category = new B(e?.category), this.property = new G(e?.property), this.settings = new Ht(e?.settings);
606
551
  }
607
552
  }, Wt = class {
608
553
  id;
@@ -622,7 +567,7 @@ var it = /* @__PURE__ */ function(e) {
622
567
  constructor(e) {
623
568
  this.id = e?.id ?? "", this.label = e?.label ?? "", this.type = e?.type ?? Ot.Checkbox, this.ord = e?.ord ?? 0, this.isMultiple = e?.isMultiple ?? null, this.values = e?.values?.map((e) => new Wt(e)) ?? [], this.min = e?.min ?? null, this.max = e?.max ?? null;
624
569
  }
625
- }, Kt = class extends l {
570
+ }, Kt = class extends u {
626
571
  search(e, t = !1) {
627
572
  return this.get("/internal/catalog/search", {
628
573
  term: e,
@@ -630,10 +575,10 @@ var it = /* @__PURE__ */ function(e) {
630
575
  });
631
576
  }
632
577
  getPriceExportLink(e = "csv", t = !1, n = void 0, r = void 0) {
633
- let i = `${g().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
578
+ let i = `${v().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
634
579
  return n && (i += `&category_id=${n}`), r && (i += `&client_id=${r}`), i;
635
580
  }
636
- }, qt = class extends l {
581
+ }, qt = class extends u {
637
582
  importPrices(e, t, n = !1) {
638
583
  return this.post(`/internal/clients/${e}/price/import`, t, void 0, {}, n);
639
584
  }
@@ -716,94 +661,94 @@ var it = /* @__PURE__ */ function(e) {
716
661
  sendCommercialOffer(e, t) {
717
662
  return this.post(`/internal/clients/${e}/price/commercial-offer/send`, t);
718
663
  }
719
- }, Jt = class extends l {
664
+ }, Jt = class extends u {
720
665
  getTemplateList(e) {
721
- return this.getTypedList(U, `/internal/clients/${e}/price/templates`);
666
+ return this.getTypedList(W, `/internal/clients/${e}/price/templates`);
722
667
  }
723
668
  getActiveTemplate(e) {
724
- return this.get(`/internal/clients/${e}/price/templates/active`, {}, (e) => new U(e.data), !0);
669
+ return this.get(`/internal/clients/${e}/price/templates/active`, {}, (e) => new W(e.data), !0);
725
670
  }
726
671
  attachTemplate(e, t, n) {
727
- let r = g().config.dateFormats.api;
672
+ let r = v().config.dateFormats.api;
728
673
  return this.post(`/internal/clients/${e}/price/templates/${t}`, n && {
729
- startAt: n.startAt && x(n.startAt, r),
730
- endAt: n.endAt && x(n.endAt, r)
731
- }, (e) => new U(e.data), {}, !0);
674
+ startAt: n.startAt && C(n.startAt, r),
675
+ endAt: n.endAt && C(n.endAt, r)
676
+ }, (e) => new W(e.data), {}, !0);
732
677
  }
733
678
  applyTemplate(e, t) {
734
679
  return this.post(`/internal/clients/${e}/price/templates/${t}/apply`, {}, void 0, {}, !0);
735
680
  }
736
681
  changeTemplate(e, t, n, r) {
737
- let i = g().config.dateFormats.api;
682
+ let i = v().config.dateFormats.api;
738
683
  return this.patch(`/internal/clients/${e}/price/templates/${t}/${n}`, r && {
739
- startAt: r.startAt && x(r.startAt, i),
740
- endAt: r.endAt && x(r.endAt, i)
741
- }, (e) => new U(e.data));
684
+ startAt: r.startAt && C(r.startAt, i),
685
+ endAt: r.endAt && C(r.endAt, i)
686
+ }, (e) => new W(e.data));
742
687
  }
743
688
  detachTemplate(e, t, n) {
744
689
  return this.delete(`/internal/clients/${e}/price/templates/${t}/${n}`);
745
690
  }
746
- }, Yt = class extends l {
691
+ }, Yt = class extends u {
747
692
  getRootCategoriesList(e = !1) {
748
- return this.getTypedList(V, "/internal/catalog/categories", { showHidden: e });
693
+ return this.getTypedList(H, "/internal/catalog/categories", { showHidden: e });
749
694
  }
750
695
  getCategoryData(e, t = !1, n = !1) {
751
696
  return this.get(`/internal/catalog/categories/${e}`, {
752
697
  showHidden: t,
753
698
  withNestedCategories: n
754
- }, (e) => new V(e.data));
699
+ }, (e) => new H(e.data));
755
700
  }
756
701
  getPublicCategoryData(e) {
757
- return this.get(`/public/catalog/categories/${e}`, {}, (e) => new V(e.data));
702
+ return this.get(`/public/catalog/categories/${e}`, {}, (e) => new H(e.data));
758
703
  }
759
704
  getCategoryProductsList(e, t = !0, n = !1) {
760
705
  return this.get(`/internal/catalog/categories/${e}/products`, {
761
706
  showHidden: n,
762
707
  withPriceCoefficients: t
763
- }, (e) => k(e.data, (e) => new L(e)));
708
+ }, (e) => j(e.data, (e) => new R(e)));
764
709
  }
765
710
  getCategoryProductsCoefficients(e) {
766
711
  return this.get(`/internal/catalog/categories/${e}/products/coefficients`, {}, (e) => {
767
712
  let { data: t } = e;
768
- return Ue(t, (e) => e.map((e) => new gt(e))), t;
713
+ return qe(t, (e) => e.map((e) => new gt(e))), t;
769
714
  });
770
715
  }
771
716
  publicSimpleSearch(e, t = 10) {
772
717
  return new Promise((n, r) => {
773
718
  this.get(`/public/catalog/search/simple?limit=${t}&term=${e}`).then((e) => {
774
- n(e.categories.map((e) => new V(e)));
719
+ n(e.categories.map((e) => new H(e)));
775
720
  }).catch((e) => {
776
721
  r(e);
777
722
  });
778
723
  });
779
724
  }
780
- }, Xt = class extends N {
725
+ }, Xt = class extends e {
781
726
  getProductData(e, t = !1) {
782
- return this.get(`/internal/catalog/products/${e}`, { withPriceCoefficients: t }, (e) => new L(e.data));
727
+ return this.get(`/internal/catalog/products/${e}`, { withPriceCoefficients: t }, (e) => new R(e.data));
783
728
  }
784
729
  getPublicProductData(e) {
785
- return this.get(`/public/catalog/products/${e}`, {}, (e) => new L(e.data));
730
+ return this.get(`/public/catalog/products/${e}`, {}, (e) => new R(e.data));
786
731
  }
787
732
  getProductPriceCoefficients(e) {
788
- return this.get(`/internal/catalog/products/${e}/coefficients`, {}, (e) => k(e.data, (e) => new gt(e)));
733
+ return this.get(`/internal/catalog/products/${e}/coefficients`, {}, (e) => j(e.data, (e) => new gt(e)));
789
734
  }
790
735
  getNewProducts(e, t, n = !0) {
791
- let r = g().config.dateFormats.api;
792
- return this.getTypedPaginated(L, "/internal/catalog/products/new", void 0, void 0, t, {
793
- period: { from: x(e, r) },
736
+ let r = v().config.dateFormats.api;
737
+ return this.getTypedPaginated(R, "/internal/catalog/products/new", void 0, void 0, t, {
738
+ period: { from: C(e, r) },
794
739
  withPriceCoefficients: n
795
740
  });
796
741
  }
797
742
  publicSimpleSearch(e, t = 10) {
798
743
  return new Promise((n, r) => {
799
744
  this.get(`/public/catalog/search/simple?limit=${t}&term=${e}`).then((e) => {
800
- n(e.products.map((e) => new L(e)));
745
+ n(e.products.map((e) => new R(e)));
801
746
  }).catch((e) => {
802
747
  r(e);
803
748
  });
804
749
  });
805
750
  }
806
- }, Zt = class extends l {
751
+ }, Zt = class extends u {
807
752
  getRootCategoriesList(e, t = !1) {
808
753
  return this.getTypedList(At, "/internal/catalog/categories", {
809
754
  clientId: e,
@@ -822,35 +767,35 @@ var it = /* @__PURE__ */ function(e) {
822
767
  client_id: e,
823
768
  showHidden: r,
824
769
  withPriceCoefficients: n
825
- }, (e) => k(e.data, (e) => new R(e)));
770
+ }, (e) => j(e.data, (e) => new z(e)));
826
771
  }
827
- }, Qt = class extends N {
772
+ }, Qt = class extends e {
828
773
  getProductData(e, t, n = !1) {
829
774
  return this.get(`/internal/catalog/products/${e}`, {
830
775
  clientId: t,
831
776
  withPriceCoefficients: n
832
- }, (e) => new R(e.data));
777
+ }, (e) => new z(e.data));
833
778
  }
834
779
  getNewProducts(e, t, n, r = !0) {
835
- let i = g().config.dateFormats.api;
836
- return this.getTypedPaginated(R, "/internal/catalog/products/new", void 0, void 0, n, {
780
+ let i = v().config.dateFormats.api;
781
+ return this.getTypedPaginated(z, "/internal/catalog/products/new", void 0, void 0, n, {
837
782
  clientId: e,
838
- period: { from: x(t, i) },
783
+ period: { from: C(t, i) },
839
784
  withPriceCoefficients: r
840
785
  });
841
786
  }
842
- }, $t = class extends N {
787
+ }, $t = class extends e {
843
788
  getTemplateList(e, t, n) {
844
- return this.getTypedPaginated(F, "/internal/price/templates", e, t, n);
789
+ return this.getTypedPaginated(I, "/internal/price/templates", e, t, n);
845
790
  }
846
791
  createTemplate(e, t = {}) {
847
- return this.post("/internal/price/templates", e, (e) => new F(e.data), t);
792
+ return this.post("/internal/price/templates", e, (e) => new I(e.data), t);
848
793
  }
849
794
  getTemplate(e) {
850
- return this.get(`/internal/price/templates/${e}`, {}, (e) => new F(e.data));
795
+ return this.get(`/internal/price/templates/${e}`, {}, (e) => new I(e.data));
851
796
  }
852
797
  updateTemplate(e, t, n = {}) {
853
- return this.patch(`/internal/price/templates/${e}`, t, (e) => new F(e.data), n);
798
+ return this.patch(`/internal/price/templates/${e}`, t, (e) => new I(e.data), n);
854
799
  }
855
800
  removeTemplate(e) {
856
801
  return this.delete(`/internal/price/templates/${e}`);
@@ -895,20 +840,20 @@ var it = /* @__PURE__ */ function(e) {
895
840
  });
896
841
  }
897
842
  getTemplateClients(e) {
898
- return this.getTypedList(U, `/internal/price/templates/${e}/clients`);
843
+ return this.getTypedList(W, `/internal/price/templates/${e}/clients`);
899
844
  }
900
- }, en = class extends l {
845
+ }, en = class extends u {
901
846
  getRoles() {
902
- return this.getTypedList(K, "/internal/price/roles");
847
+ return this.getTypedList(q, "/internal/price/roles");
903
848
  }
904
849
  createRole(e) {
905
- return this.post("/internal/price/roles", e, (e) => new K(e.data));
850
+ return this.post("/internal/price/roles", e, (e) => new q(e.data));
906
851
  }
907
852
  getRole(e) {
908
- return this.get(`/internal/price/roles/${e}`, {}, (e) => new K(e.data));
853
+ return this.get(`/internal/price/roles/${e}`, {}, (e) => new q(e.data));
909
854
  }
910
855
  updateRole(e, t) {
911
- return this.patch(`/internal/price/roles/${e}`, t, (e) => new K(e.data));
856
+ return this.patch(`/internal/price/roles/${e}`, t, (e) => new q(e.data));
912
857
  }
913
858
  deleteRole(e) {
914
859
  return this.delete(`/internal/price/roles/${e}`);
@@ -917,40 +862,40 @@ var it = /* @__PURE__ */ function(e) {
917
862
  return this.getTypedList(Vt, `/internal/price/roles/rules/categories/${e}`);
918
863
  }
919
864
  updateCategoryRules(e, t) {
920
- return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => h.instanceListInitializer(Vt, e.data));
865
+ return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => _.instanceListInitializer(Vt, e.data));
921
866
  }
922
- }, tn = class extends N {
867
+ }, tn = class extends e {
923
868
  getProperties(e, t, n) {
924
- return this.getTypedPaginated(W, "/internal/catalog/properties", e, t, n);
869
+ return this.getTypedPaginated(G, "/internal/catalog/properties", e, t, n);
925
870
  }
926
871
  createProperty(e) {
927
872
  let { typeId: t, ...n } = e;
928
873
  return this.post("/internal/catalog/properties", {
929
874
  ...n,
930
875
  type: t
931
- }, (e) => new W(e.data));
876
+ }, (e) => new G(e.data));
932
877
  }
933
878
  getProperty(e) {
934
- return this.get(`/internal/catalog/properties/${e}`, {}, (e) => new W(e.data));
879
+ return this.get(`/internal/catalog/properties/${e}`, {}, (e) => new G(e.data));
935
880
  }
936
881
  updateProperty(e, t) {
937
882
  let { typeId: n, ...r } = t;
938
883
  return this.patch(`/internal/catalog/properties/${e}`, {
939
884
  ...r,
940
885
  type: n
941
- }, (e) => new W(e.data));
886
+ }, (e) => new G(e.data));
942
887
  }
943
888
  deleteProperty(e) {
944
889
  return this.delete(`/internal/catalog/properties/${e}`);
945
890
  }
946
891
  getProductProperties(e) {
947
- return this.getTypedList(G, `/internal/catalog/products/${e}/properties`);
892
+ return this.getTypedList(K, `/internal/catalog/products/${e}/properties`);
948
893
  }
949
894
  getProductProperty(e, t) {
950
- return this.get(`/internal/catalog/products/${e}/properties/${t}`, {}, (e) => new G(e.data));
895
+ return this.get(`/internal/catalog/products/${e}/properties/${t}`, {}, (e) => new K(e.data));
951
896
  }
952
897
  updateProductProperty(e, t, n) {
953
- return this.patch(`/internal/catalog/products/${e}/properties/${t}`, { value: n }, (e) => new G(e.data));
898
+ return this.patch(`/internal/catalog/products/${e}/properties/${t}`, { value: n }, (e) => new K(e.data));
954
899
  }
955
900
  deleteProductProperty(e, t) {
956
901
  return this.delete(`/internal/catalog/products/${e}/properties/${t}`);
@@ -989,13 +934,13 @@ var it = /* @__PURE__ */ function(e) {
989
934
  return this.patch(`/internal/catalog/products/${e}/properties/slug`, { slug: t });
990
935
  }
991
936
  getCategoryProperties(e) {
992
- return this.getTypedList(G, `/internal/catalog/categories/${e}/properties`);
937
+ return this.getTypedList(K, `/internal/catalog/categories/${e}/properties`);
993
938
  }
994
939
  getCategoryProperty(e, t) {
995
- return this.get(`/internal/catalog/categories/${e}/properties/${t}`, {}, (e) => new G(e.data));
940
+ return this.get(`/internal/catalog/categories/${e}/properties/${t}`, {}, (e) => new K(e.data));
996
941
  }
997
942
  updateCategoryProperty(e, t, n) {
998
- return this.patch(`/internal/catalog/categories/${e}/properties/${t}`, { value: n }, (e) => new G(e.data));
943
+ return this.patch(`/internal/catalog/categories/${e}/properties/${t}`, { value: n }, (e) => new K(e.data));
999
944
  }
1000
945
  deleteCategoryProperty(e, t) {
1001
946
  return this.delete(`/internal/catalog/categories/${e}/properties/${t}`);
@@ -1048,9 +993,9 @@ var it = /* @__PURE__ */ function(e) {
1048
993
  deleteCategoryFilterSetting(e, t) {
1049
994
  return this.delete(`/internal/catalog/categories/${e}/filter-settings/${t}`);
1050
995
  }
1051
- }, nn = class extends l {
996
+ }, nn = class extends u {
1052
997
  getRootCategoriesList(e, t = !1) {
1053
- return this.getTypedList(V, "/internal/catalog/categories", {
998
+ return this.getTypedList(H, "/internal/catalog/categories", {
1054
999
  priceTemplateId: e,
1055
1000
  showHidden: t
1056
1001
  });
@@ -1060,14 +1005,14 @@ var it = /* @__PURE__ */ function(e) {
1060
1005
  priceTemplateId: e,
1061
1006
  showHidden: n,
1062
1007
  withNestedCategories: r
1063
- }, (e) => new V(e.data));
1008
+ }, (e) => new H(e.data));
1064
1009
  }
1065
1010
  getCategoryProductsList(e, t, n = !0, r = !1) {
1066
1011
  return this.get(`/internal/catalog/categories/${t}/products`, {
1067
1012
  priceTemplateId: e,
1068
1013
  showHidden: r,
1069
1014
  withPriceCoefficients: n
1070
- }, (e) => k(e.data, (e) => new L(e)));
1015
+ }, (e) => j(e.data, (e) => new R(e)));
1071
1016
  }
1072
1017
  };
1073
1018
  //#endregion
@@ -1104,14 +1049,14 @@ function an(e) {
1104
1049
  //#region src/clients/enums/clients-additional-data-request-type-enum.ts
1105
1050
  var on = /* @__PURE__ */ function(e) {
1106
1051
  return e.LastOrder = "last_order", e.Contacts = "contacts", e.PartnerGroups = "partner_groups", e.PreferredDeliveryType = "preferred_delivery_type", e.SalesDirection = "sales_direction", e.Managers = "managers", e.Curators = "curators", e;
1107
- }({}), sn = class extends u {
1052
+ }({}), sn = class extends d {
1108
1053
  bankName = "";
1109
1054
  bic = "";
1110
1055
  accountNumber = "";
1111
1056
  correspondentAccount = "";
1112
- currency = new a();
1057
+ currency = new o();
1113
1058
  constructor(e) {
1114
- super(e), e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new a(e.currency));
1059
+ super(e), e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new o(e.currency));
1115
1060
  }
1116
1061
  }, cn = class extends mt {
1117
1062
  phone;
@@ -1119,7 +1064,7 @@ var on = /* @__PURE__ */ function(e) {
1119
1064
  constructor(e) {
1120
1065
  super(e), this.email = e?.email, this.phone = /^\d+$/.test(e?.phone ?? "") ? `+${e?.phone}` : e?.phone;
1121
1066
  }
1122
- }, q = class extends cn {
1067
+ }, J = class extends cn {
1123
1068
  isPrimary;
1124
1069
  position;
1125
1070
  notDisturb;
@@ -1128,8 +1073,8 @@ var on = /* @__PURE__ */ function(e) {
1128
1073
  super(e), this.isPrimary = e?.isPrimary ?? !1, this.position = e?.position, this.notDisturb = e?.notDisturb ?? !1, this.comment = e?.comment;
1129
1074
  }
1130
1075
  }, ln = class extends mt {
1131
- opf = ie.generatePersonItem();
1132
- partnerGroup = new p();
1076
+ opf = oe.generatePersonItem();
1077
+ partnerGroup = new h();
1133
1078
  contacts = [];
1134
1079
  bankAccounts = [];
1135
1080
  comment;
@@ -1138,10 +1083,10 @@ var on = /* @__PURE__ */ function(e) {
1138
1083
  updater;
1139
1084
  constructor(e) {
1140
1085
  if (super(e), e) {
1141
- if (this.opf = new ie(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new P(e.creator) : void 0, this.updater = e.updater ? new P(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new p(e.partnerGroup)), e.contacts) {
1086
+ if (this.opf = new oe(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new F(e.creator) : void 0, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new h(e.partnerGroup)), e.contacts) {
1142
1087
  let t = [];
1143
1088
  e.contacts.forEach((e) => {
1144
- t.push(new q(e));
1089
+ t.push(new J(e));
1145
1090
  }), this.contacts = t;
1146
1091
  }
1147
1092
  if (e.bankAccounts) {
@@ -1175,28 +1120,28 @@ var on = /* @__PURE__ */ function(e) {
1175
1120
  super(e), e && (this.kpp = e.kpp ?? "");
1176
1121
  }
1177
1122
  }, pn = class extends fn {
1178
- registrationCountry = new r();
1123
+ registrationCountry = new i();
1179
1124
  registrationNumber = "";
1180
1125
  taxNumber = "";
1181
1126
  constructor(e) {
1182
- super(e), e && (this.registrationCountry = new r(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
1127
+ super(e), e && (this.registrationCountry = new i(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
1183
1128
  }
1184
1129
  }, mn = class {
1185
1130
  static createInstance(e) {
1186
1131
  switch (e.opf.slug) {
1187
- case f.Ic: return new dn(e);
1188
- case f.UlR: return new fn(e);
1189
- case f.UlNr: return new pn(e);
1132
+ case m.Ic: return new dn(e);
1133
+ case m.UlR: return new fn(e);
1134
+ case m.UlNr: return new pn(e);
1190
1135
  default: return new un(e);
1191
1136
  }
1192
1137
  }
1193
- }, hn = class extends d {
1138
+ }, hn = class extends p {
1194
1139
  city;
1195
1140
  isActive;
1196
1141
  constructor(e) {
1197
- super(e), this.city = e?.city ? new t(e.city) : void 0, this.isActive = e?.isActive ?? !1;
1142
+ super(e), this.city = e?.city ? new n(e.city) : void 0, this.isActive = e?.isActive ?? !1;
1198
1143
  }
1199
- }, J = class extends mt {
1144
+ }, Y = class extends mt {
1200
1145
  address = "";
1201
1146
  coordinates;
1202
1147
  contacts;
@@ -1205,9 +1150,9 @@ var on = /* @__PURE__ */ function(e) {
1205
1150
  isOneTime;
1206
1151
  isTransportCompanyAddress;
1207
1152
  constructor(e) {
1208
- super(e), this.address = e?.address ?? "", this.coordinates = new ee(e?.coordinates), this.contacts = e?.contacts?.map((e) => new q(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1153
+ super(e), this.address = e?.address ?? "", this.coordinates = new ne(e?.coordinates), this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1209
1154
  }
1210
- }, gn = class extends H {
1155
+ }, gn = class extends U {
1211
1156
  contragents;
1212
1157
  partnerGroups;
1213
1158
  contacts;
@@ -1218,10 +1163,10 @@ var on = /* @__PURE__ */ function(e) {
1218
1163
  primaryDemand;
1219
1164
  preferredWarehouse;
1220
1165
  extraData;
1221
- constructor(t) {
1222
- super(t), this.contragents = t?.contragents?.map((e) => mn.createInstance(e)) ?? [], this.partnerGroups = t?.partnerGroups?.map((e) => new p(e)) ?? [], this.contacts = t?.contacts?.map((e) => new q(e)) ?? [], this.deliveryAddresses = t?.deliveryAddresses?.map((e) => new J(e)) ?? [], this.channelPrimaryInterest = new e(t?.channelPrimaryInterest), this.sourcePrimaryInterest = new fe(t?.sourcePrimaryInterest), this.preferredDeliveryType = new s(t?.preferredDeliveryType), this.primaryDemand = t?.primaryDemand, this.preferredWarehouse = t?.preferredWarehouse ? new ge(t.preferredWarehouse) : void 0, this.extraData = t?.extraData ?? {};
1166
+ constructor(e) {
1167
+ super(e), this.contragents = e?.contragents?.map((e) => mn.createInstance(e)) ?? [], this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)) ?? [], this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.deliveryAddresses = e?.deliveryAddresses?.map((e) => new Y(e)) ?? [], this.channelPrimaryInterest = new t(e?.channelPrimaryInterest), this.sourcePrimaryInterest = new he(e?.sourcePrimaryInterest), this.preferredDeliveryType = new c(e?.preferredDeliveryType), this.primaryDemand = e?.primaryDemand, this.preferredWarehouse = e?.preferredWarehouse ? new be(e.preferredWarehouse) : void 0, this.extraData = e?.extraData ?? {};
1223
1168
  }
1224
- }, _n = class extends j {
1169
+ }, _n = class extends N {
1225
1170
  id;
1226
1171
  guid;
1227
1172
  name;
@@ -1233,8 +1178,8 @@ var on = /* @__PURE__ */ function(e) {
1233
1178
  phone;
1234
1179
  email;
1235
1180
  isActive;
1236
- createdAt = new M();
1237
- lastLoginDate = new M();
1181
+ createdAt = new P();
1182
+ lastLoginDate = new P();
1238
1183
  lastLoginDateHasOrder;
1239
1184
  managers;
1240
1185
  includeSubordinateManagers;
@@ -1247,13 +1192,13 @@ var on = /* @__PURE__ */ function(e) {
1247
1192
  partnerGroups;
1248
1193
  contact;
1249
1194
  lastOrder;
1250
- noOrdersPeriod = new M();
1195
+ noOrdersPeriod = new P();
1251
1196
  constructor(e) {
1252
- super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new t(e)), this.region = new ue(e?.region), this.country = new r(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new M(e?.createdAt), this.lastLoginDate = new M(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new te(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Pt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new m(e)), this.contragentInn = e?.contragentInn, this.contragentType = new ie(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new s(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new p(e)), this.contact = new cn(e?.contact), this.lastOrder = {
1253
- createdAt: new M(e?.lastOrder?.createdAt),
1197
+ super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new n(e)), this.region = new fe(e?.region), this.country = new i(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new P(e?.createdAt), this.lastLoginDate = new P(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new f(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Pt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.contragentInn = e?.contragentInn, this.contragentType = new oe(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new c(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)), this.contact = new cn(e?.contact), this.lastOrder = {
1198
+ createdAt: new P(e?.lastOrder?.createdAt),
1254
1199
  creator: e?.lastOrder?.creator,
1255
1200
  isApproved: e?.lastOrder?.isApproved
1256
- }, this.noOrdersPeriod = new M(e?.noOrdersPeriod);
1201
+ }, this.noOrdersPeriod = new P(e?.noOrdersPeriod);
1257
1202
  }
1258
1203
  resetFilterValue(e) {
1259
1204
  switch (e) {
@@ -1261,7 +1206,7 @@ var on = /* @__PURE__ */ function(e) {
1261
1206
  this.cities = [];
1262
1207
  break;
1263
1208
  case "region":
1264
- this.region = new ue();
1209
+ this.region = new fe();
1265
1210
  break;
1266
1211
  case "isActive":
1267
1212
  this.isActive = !0;
@@ -1288,10 +1233,10 @@ var on = /* @__PURE__ */ function(e) {
1288
1233
  this.salesDirections = [];
1289
1234
  break;
1290
1235
  case "contragentType":
1291
- this.contragentType = new ie();
1236
+ this.contragentType = new oe();
1292
1237
  break;
1293
1238
  case "preferredDeliveryType":
1294
- this.preferredDeliveryType = new s();
1239
+ this.preferredDeliveryType = new c();
1295
1240
  break;
1296
1241
  case "partnerGroups":
1297
1242
  this.partnerGroups = [];
@@ -1307,12 +1252,12 @@ var on = /* @__PURE__ */ function(e) {
1307
1252
  let e = super.asClearRaw();
1308
1253
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.lastLoginDate?.from && !e?.lastLoginDate?.to && delete e.lastLoginDate, !e?.noOrdersPeriod?.from && !e?.noOrdersPeriod?.to && delete e.noOrdersPeriod, e;
1309
1254
  }
1310
- }, vn = class extends A {
1255
+ }, vn = class extends M {
1311
1256
  creator;
1312
1257
  constructor(e) {
1313
- super(e), this.creator = new P(e?.creator);
1258
+ super(e), this.creator = new F(e?.creator);
1314
1259
  }
1315
- }, yn = class extends d {
1260
+ }, yn = class extends p {
1316
1261
  contacts = [];
1317
1262
  preferredDeliveryType;
1318
1263
  partnerGroups = [];
@@ -1321,14 +1266,14 @@ var on = /* @__PURE__ */ function(e) {
1321
1266
  managers;
1322
1267
  curators;
1323
1268
  constructor(e) {
1324
- super(e), this.contacts = e.contacts?.map((e) => new q(e)) ?? void 0, this.lastOrder = e.lastOrder ? new vn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new p(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new s(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new m(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new ne(e)) ?? void 0, this.curators = e.curators?.map((e) => new Pt(e)) ?? void 0;
1269
+ super(e), this.contacts = e.contacts?.map((e) => new J(e)) ?? void 0, this.lastOrder = e.lastOrder ? new vn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new h(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new c(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new g(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new re(e)) ?? void 0, this.curators = e.curators?.map((e) => new Pt(e)) ?? void 0;
1325
1270
  }
1326
- }, bn = class extends u {
1271
+ }, bn = class extends d {
1327
1272
  isPrimary;
1328
1273
  constructor(e) {
1329
1274
  super(e), this.isPrimary = e.isPrimary;
1330
1275
  }
1331
- }, xn = class extends q {
1276
+ }, xn = class extends J {
1332
1277
  relations = {
1333
1278
  clients: [],
1334
1279
  contragents: [],
@@ -1337,7 +1282,7 @@ var on = /* @__PURE__ */ function(e) {
1337
1282
  constructor(e) {
1338
1283
  super(e), e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((e) => new bn(e))), e.relations.clients && (this.relations.clients = e.relations.clients.map((e) => new bn(e))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((e) => new bn(e))));
1339
1284
  }
1340
- }, Sn = class e extends N {
1285
+ }, Sn = class t extends e {
1341
1286
  static transformClientDataToRequest(e) {
1342
1287
  return {
1343
1288
  name: e.name,
@@ -1356,7 +1301,7 @@ var on = /* @__PURE__ */ function(e) {
1356
1301
  static transformContragentClientDataToRequest(e) {
1357
1302
  let t, n = e, r = e, i = e;
1358
1303
  switch (e.opf.slug) {
1359
- case f.Ic:
1304
+ case m.Ic:
1360
1305
  t = {
1361
1306
  opf: n.opf.slug,
1362
1307
  name: n.name,
@@ -1374,7 +1319,7 @@ var on = /* @__PURE__ */ function(e) {
1374
1319
  actual_address: n.actualAddress
1375
1320
  };
1376
1321
  break;
1377
- case f.UlR:
1322
+ case m.UlR:
1378
1323
  t = {
1379
1324
  opf: r.opf.slug,
1380
1325
  name: r.name,
@@ -1393,7 +1338,7 @@ var on = /* @__PURE__ */ function(e) {
1393
1338
  actual_address: r.actualAddress
1394
1339
  };
1395
1340
  break;
1396
- case f.UlNr:
1341
+ case m.UlNr:
1397
1342
  t = {
1398
1343
  opf: i.opf.slug,
1399
1344
  name: i.name,
@@ -1449,7 +1394,7 @@ var on = /* @__PURE__ */ function(e) {
1449
1394
  return this.get(`/internal/clients/${e}`, {}, (e) => new gn(e.data));
1450
1395
  }
1451
1396
  getClientsList(e, t, n, r, i) {
1452
- return this.getTypedPaginated(H, "/internal/clients", e, t, n, r, void 0, i);
1397
+ return this.getTypedPaginated(U, "/internal/clients", e, t, n, r, void 0, i);
1453
1398
  }
1454
1399
  searchClient(e) {
1455
1400
  return this.getClientsList(void 0, void 0, void 0, { searchTerm: e }).then((e) => e.data);
@@ -1460,7 +1405,7 @@ var on = /* @__PURE__ */ function(e) {
1460
1405
  groups: [],
1461
1406
  filters: [{
1462
1407
  field: "phone",
1463
- op: ut.Contains,
1408
+ op: te.Contains,
1464
1409
  value: e
1465
1410
  }]
1466
1411
  });
@@ -1470,16 +1415,16 @@ var on = /* @__PURE__ */ function(e) {
1470
1415
  return this.post("/internal/clients/additional-data", {
1471
1416
  clients: n,
1472
1417
  requested_data_types: t
1473
- }, (e) => h.instanceListInitializer(yn, e.data));
1418
+ }, (e) => _.instanceListInitializer(yn, e.data));
1474
1419
  }
1475
1420
  getAllClientContacts(e) {
1476
1421
  return this.getTypedList(xn, `/internal/clients/${e}/contacts/all`);
1477
1422
  }
1478
- createClientCommonData(t, n = {}) {
1479
- return this.post("/internal/clients", e.transformClientDataToRequest(t), (e) => new gn(e.data), n);
1423
+ createClientCommonData(e, n = {}) {
1424
+ return this.post("/internal/clients", t.transformClientDataToRequest(e), (e) => new gn(e.data), n);
1480
1425
  }
1481
- updateClientCommonData(t, n = {}) {
1482
- return this.patch(`/internal/clients/${t.id}`, e.transformClientDataToRequest(t), void 0, n);
1426
+ updateClientCommonData(e, n = {}) {
1427
+ return this.patch(`/internal/clients/${e.id}`, t.transformClientDataToRequest(e), void 0, n);
1483
1428
  }
1484
1429
  updateClientNotDistribCommonData(e, t = {}) {
1485
1430
  let n = { get_news: e.getNews };
@@ -1517,32 +1462,32 @@ var on = /* @__PURE__ */ function(e) {
1517
1462
  curated_direction_id: e.curatedDirection.id
1518
1463
  })) });
1519
1464
  }
1520
- createContragentClientData(t, n, r = {}) {
1521
- return this.post(`/internal/clients/${t}/contragents`, e.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1465
+ createContragentClientData(e, n, r = {}) {
1466
+ return this.post(`/internal/clients/${e}/contragents`, t.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1522
1467
  }
1523
- updateContragentClientData(t, n, r = {}) {
1524
- return this.patch(`/internal/clients/${t}/contragents/${n.id}`, e.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1468
+ updateContragentClientData(e, n, r = {}) {
1469
+ return this.patch(`/internal/clients/${e}/contragents/${n.id}`, t.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1525
1470
  }
1526
1471
  deleteClientContragent(e, t) {
1527
1472
  return this.delete(`/internal/clients/${e}/contragents/${t.id}`);
1528
1473
  }
1529
1474
  getClientDeliveryAddresses(e) {
1530
- return this.getTypedList(J, `/internal/clients/${e}/delivery-addresses`);
1475
+ return this.getTypedList(Y, `/internal/clients/${e}/delivery-addresses`);
1531
1476
  }
1532
- createClientDeliveryAddress(t, n, r = {}) {
1533
- return this.post(`/internal/clients/${t}/delivery-addresses`, e.transformClientDeliveryAddressToRequest(n), (e) => new J(e.data), r);
1477
+ createClientDeliveryAddress(e, n, r = {}) {
1478
+ return this.post(`/internal/clients/${e}/delivery-addresses`, t.transformClientDeliveryAddressToRequest(n), (e) => new Y(e.data), r);
1534
1479
  }
1535
- updateClientDeliveryAddress(t, n, r = {}) {
1536
- return this.patch(`/internal/clients/${t}/delivery-addresses/${n.id}`, e.transformClientDeliveryAddressToRequest(n), (e) => new J(e.data), r);
1480
+ updateClientDeliveryAddress(e, n, r = {}) {
1481
+ return this.patch(`/internal/clients/${e}/delivery-addresses/${n.id}`, t.transformClientDeliveryAddressToRequest(n), (e) => new Y(e.data), r);
1537
1482
  }
1538
1483
  deleteClientDeliveryAddress(e, t) {
1539
1484
  return this.delete(`/internal/clients/${e}/delivery-addresses/${t.id}`);
1540
1485
  }
1541
- createContragentBankAccount(t, n, r, i = {}) {
1542
- return this.post(`/internal/clients/${t}/contragents/${n}/bank-accounts`, e.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1486
+ createContragentBankAccount(e, n, r, i = {}) {
1487
+ return this.post(`/internal/clients/${e}/contragents/${n}/bank-accounts`, t.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1543
1488
  }
1544
- updateContragentBankAccount(t, n, r, i = {}) {
1545
- return this.patch(`/internal/clients/${t}/contragents/${n}/bank-accounts/${r.id}`, e.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1489
+ updateContragentBankAccount(e, n, r, i = {}) {
1490
+ return this.patch(`/internal/clients/${e}/contragents/${n}/bank-accounts/${r.id}`, t.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1546
1491
  }
1547
1492
  deleteContragentBankAccount(e, t, n) {
1548
1493
  return this.delete(`/internal/clients/${e}/contragents/${t}/bank-accounts/${n.id}`);
@@ -1562,7 +1507,7 @@ var on = /* @__PURE__ */ function(e) {
1562
1507
  email: t.email,
1563
1508
  comment: t.comment,
1564
1509
  not_disturb: t.notDisturb
1565
- }, (e) => new q(e.data), n);
1510
+ }, (e) => new J(e.data), n);
1566
1511
  }
1567
1512
  setPrimaryClientContact(e, t) {
1568
1513
  return this.setPrimaryContact(`/internal/clients/${e}/contacts/${t.id}/primary`, t.isPrimary ?? !1);
@@ -1603,7 +1548,7 @@ var on = /* @__PURE__ */ function(e) {
1603
1548
  comment: t.comment,
1604
1549
  ...n
1605
1550
  };
1606
- return t.phone?.length && (i.phone = t.phone), t.email?.length && (i.email = t.email), this.post(`/internal/clients/${e}/contacts`, i, (e) => new q(e.data), r);
1551
+ return t.phone?.length && (i.phone = t.phone), t.email?.length && (i.email = t.email), this.post(`/internal/clients/${e}/contacts`, i, (e) => new J(e.data), r);
1607
1552
  }
1608
1553
  setPrimaryContact(e, t) {
1609
1554
  return this.patch(e, { is_primary: t });
@@ -1614,7 +1559,7 @@ var on = /* @__PURE__ */ function(e) {
1614
1559
  sendClientEmailConfirmation(e) {
1615
1560
  return this.get(`/internal/clients/${e.id}/verification/email?email=${e.email}`);
1616
1561
  }
1617
- }, Cn = class extends l {
1562
+ }, Cn = class extends u {
1618
1563
  checkPhoneIsBusy(e) {
1619
1564
  return new Promise((t, n) => {
1620
1565
  this.request({
@@ -1631,11 +1576,11 @@ var on = /* @__PURE__ */ function(e) {
1631
1576
  name;
1632
1577
  version;
1633
1578
  constructor(e) {
1634
- this.date = O(e?.date) ? S(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1579
+ this.date = A(e?.date) ? w(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1635
1580
  }
1636
1581
  }, Tn = /* @__PURE__ */ function(e) {
1637
1582
  return e.Kozyrek = "kozyrek", e.Mosquitto = "mosquitto", e.Strip = "strip", e.MetalForDoors = "metal_for_doors", e.Sandwich = "sandwich", e.SandwichM2 = "sandwich_m2", e;
1638
- }({}), En = class extends l {
1583
+ }({}), En = class extends u {
1639
1584
  getConfiguratorSettings(e, t) {
1640
1585
  return this.get(`internal/catalog/categories/${e.id}/configurators/${e.properties?.configurator}/settings?client_id=${t}`);
1641
1586
  }
@@ -1647,7 +1592,7 @@ var on = /* @__PURE__ */ function(e) {
1647
1592
  params: n,
1648
1593
  client_id: t
1649
1594
  }
1650
- }, (e) => new L(e.data), r);
1595
+ }, (e) => new R(e.data), r);
1651
1596
  }
1652
1597
  createTemplate(e, t, n, r = {}) {
1653
1598
  return this.post(`internal/catalog/categories/${e.id}/configurators/${e.properties?.configurator}/template?client_id=${t}`, { ...n }, () => {}, r);
@@ -1690,7 +1635,7 @@ var on = /* @__PURE__ */ function(e) {
1690
1635
  constructor(e) {
1691
1636
  this.field = e?.field ?? "", this.direction = e?.direction ?? "asc";
1692
1637
  }
1693
- }, Y = class e {
1638
+ }, X = class e {
1694
1639
  static decadeInterval(t) {
1695
1640
  let [n, r] = e.shiftedDecadeBounds(t, 0);
1696
1641
  return {
@@ -1709,43 +1654,43 @@ var on = /* @__PURE__ */ function(e) {
1709
1654
  return new Date(e.getFullYear(), e.getMonth() < 6 ? 0 : 6, 1);
1710
1655
  }
1711
1656
  static endOfHalfYear(e) {
1712
- return b(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1657
+ return S(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1713
1658
  }
1714
1659
  static addHalfYears(e, t) {
1715
- return v(e, t * 6);
1660
+ return b(e, t * 6);
1716
1661
  }
1717
1662
  static intervalTillSameDate(e, t, n) {
1718
- let r = Se(w(n), w(e)), i = w(v(t, r)), a = Math.min(ke(n), Ae(i));
1663
+ let r = Ee(E(n), E(e)), i = E(b(t, r)), a = Math.min(Ne(n), Pe(i));
1719
1664
  return {
1720
- from: C(t),
1721
- to: y(je(i, a))
1665
+ from: T(t),
1666
+ to: x(Fe(i, a))
1722
1667
  };
1723
1668
  }
1724
1669
  static weekTillSameWeekday(e, t) {
1725
- let n = T(ye(e, t), { weekStartsOn: 1 }), r = xe(e, T(e, { weekStartsOn: 1 }));
1670
+ let n = D(Ce(e, t), { weekStartsOn: 1 }), r = Te(e, D(e, { weekStartsOn: 1 }));
1726
1671
  return {
1727
1672
  from: n,
1728
- to: y(_(n, r))
1673
+ to: x(y(n, r))
1729
1674
  };
1730
1675
  }
1731
1676
  static decadeTillSameDayNumber(t, n) {
1732
- let [r] = e.shiftedDecadeBounds(t, 0), i = xe(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = xe(o, a) + 1;
1677
+ let [r] = e.shiftedDecadeBounds(t, 0), i = Te(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = Te(o, a) + 1;
1733
1678
  return {
1734
1679
  from: a,
1735
- to: y(_(a, Math.min(i, s) - 1))
1680
+ to: x(y(a, Math.min(i, s) - 1))
1736
1681
  };
1737
1682
  }
1738
1683
  static shiftedDecadeBounds(e, t) {
1739
- let n = ke(e), r = 2;
1684
+ let n = Ne(e), r = 2;
1740
1685
  n <= 10 ? r = 0 : n <= 20 && (r = 1);
1741
- let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = w(v(e, a)), c = _(s, o * 10);
1742
- return [c, o === 2 ? b(s) : y(_(c, 9))];
1686
+ let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = E(b(e, a)), c = y(s, o * 10);
1687
+ return [c, o === 2 ? S(s) : x(y(c, 9))];
1743
1688
  }
1744
1689
  };
1745
1690
  //#endregion
1746
1691
  //#region src/date-time/helpers/days-ago-iso.ts
1747
1692
  function An(e) {
1748
- return x(Ie(Ne(), e), "yyyy-MM-dd");
1693
+ return C(Be(Le(), e), "yyyy-MM-dd");
1749
1694
  }
1750
1695
  //#endregion
1751
1696
  //#region src/i18n/helpers/pluralize.ts
@@ -1763,7 +1708,7 @@ function jn(e, t) {
1763
1708
  //#endregion
1764
1709
  //#region src/date-time/helpers/format-relative-date.ts
1765
1710
  function Mn(e) {
1766
- let t = S(e), n = xe(Ne(), t);
1711
+ let t = w(e), n = Te(Le(), t);
1767
1712
  switch (!0) {
1768
1713
  case n === 0: return "Сегодня";
1769
1714
  case n === 1: return "Вчера";
@@ -1779,81 +1724,81 @@ function Mn(e) {
1779
1724
  //#region src/date-time/providers/date-time-provider.ts
1780
1725
  var Nn = class {
1781
1726
  static defaultDateRanges(e) {
1782
- let t = _e(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = E(e === void 0 ? n : new Date(e, 0, 1)), i = De(r);
1727
+ let t = xe(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = O(e === void 0 ? n : new Date(e, 0, 1)), i = je(r);
1783
1728
  return {
1784
1729
  nextWorkingDay: {
1785
1730
  label: "Следующий рабочий день",
1786
- from: C(t),
1787
- to: y(t)
1731
+ from: T(t),
1732
+ to: x(t)
1788
1733
  },
1789
1734
  today: {
1790
1735
  label: "Сегодня",
1791
- from: Ne(),
1792
- to: we()
1736
+ from: Le(),
1737
+ to: Oe()
1793
1738
  },
1794
1739
  yesterday: {
1795
1740
  label: "Вчера",
1796
- from: Fe(),
1797
- to: Oe()
1741
+ from: ze(),
1742
+ to: Me()
1798
1743
  },
1799
1744
  tomorrow: {
1800
1745
  label: "Завтра",
1801
- from: Pe(),
1802
- to: Te()
1746
+ from: Re(),
1747
+ to: ke()
1803
1748
  },
1804
1749
  currentWeek: {
1805
1750
  label: "Неделя",
1806
- from: T(n, { weekStartsOn: 1 }),
1807
- to: Ee(n, { weekStartsOn: 1 })
1751
+ from: D(n, { weekStartsOn: 1 }),
1752
+ to: Ae(n, { weekStartsOn: 1 })
1808
1753
  },
1809
1754
  currentMonth: {
1810
1755
  label: "Месяц",
1811
- from: w(n),
1812
- to: b(n)
1756
+ from: E(n),
1757
+ to: S(n)
1813
1758
  },
1814
1759
  oneMonth: {
1815
1760
  label: "1 месяц",
1816
1761
  from: r,
1817
- to: b(r)
1762
+ to: S(r)
1818
1763
  },
1819
1764
  threeMonths: {
1820
1765
  label: "3 месяца",
1821
1766
  from: r,
1822
- to: b(v(r, 2))
1767
+ to: S(b(r, 2))
1823
1768
  },
1824
1769
  nineMonths: {
1825
1770
  label: "9 месяцев",
1826
1771
  from: r,
1827
- to: b(v(r, 8))
1772
+ to: S(b(r, 8))
1828
1773
  },
1829
1774
  firstQuarter: {
1830
1775
  label: "I квартал",
1831
1776
  from: r,
1832
- to: b(v(r, 2))
1777
+ to: S(b(r, 2))
1833
1778
  },
1834
1779
  secondQuarter: {
1835
1780
  label: "II квартал",
1836
- from: v(r, 3),
1837
- to: b(v(r, 5))
1781
+ from: b(r, 3),
1782
+ to: S(b(r, 5))
1838
1783
  },
1839
1784
  thirdQuarter: {
1840
1785
  label: "III квартал",
1841
- from: v(r, 6),
1842
- to: b(v(r, 8))
1786
+ from: b(r, 6),
1787
+ to: S(b(r, 8))
1843
1788
  },
1844
1789
  fourthQuarter: {
1845
1790
  label: "IV квартал",
1846
- from: v(r, 9),
1847
- to: b(v(r, 11))
1791
+ from: b(r, 9),
1792
+ to: S(b(r, 11))
1848
1793
  },
1849
1794
  firstHalfYear: {
1850
1795
  label: "I полугодие",
1851
1796
  from: r,
1852
- to: b(v(r, 5))
1797
+ to: S(b(r, 5))
1853
1798
  },
1854
1799
  secondHalfYear: {
1855
1800
  label: "II полугодие",
1856
- from: v(r, 6),
1801
+ from: b(r, 6),
1857
1802
  to: i
1858
1803
  },
1859
1804
  currentYear: {
@@ -1864,13 +1809,13 @@ var Nn = class {
1864
1809
  };
1865
1810
  }
1866
1811
  static standardPeriods(e = /* @__PURE__ */ new Date()) {
1867
- let t = { weekStartsOn: 1 }, n = C(e), r = y(e), i = Y.decadeInterval(e), a = w(e), o = Me(e), s = Y.startOfHalfYear(e), c = E(e), ee = Y.addHalfYears(e, -1), l = Y.addHalfYears(e, 1);
1812
+ let t = { weekStartsOn: 1 }, n = T(e), r = x(e), i = X.decadeInterval(e), a = E(e), o = Ie(e), s = X.startOfHalfYear(e), c = O(e), l = X.addHalfYears(e, -1), ee = X.addHalfYears(e, 1);
1868
1813
  return {
1869
1814
  yesterday: {
1870
1815
  label: "Вчера",
1871
1816
  group: "day",
1872
- from: C(Ie(e, 1)),
1873
- to: y(Ie(e, 1))
1817
+ from: T(Be(e, 1)),
1818
+ to: x(Be(e, 1))
1874
1819
  },
1875
1820
  today: {
1876
1821
  label: "Сегодня",
@@ -1881,31 +1826,31 @@ var Nn = class {
1881
1826
  tomorrow: {
1882
1827
  label: "Завтра",
1883
1828
  group: "day",
1884
- from: C(_(e, 1)),
1885
- to: y(_(e, 1))
1829
+ from: T(y(e, 1)),
1830
+ to: x(y(e, 1))
1886
1831
  },
1887
1832
  lastWeek: {
1888
1833
  label: "Прошлая неделя",
1889
1834
  group: "week",
1890
- from: T(ze(e, 1), t),
1891
- to: Ee(ze(e, 1), t)
1835
+ from: D(Ue(e, 1), t),
1836
+ to: Ae(Ue(e, 1), t)
1892
1837
  },
1893
1838
  thisWeek: {
1894
1839
  label: "Эта неделя",
1895
1840
  group: "week",
1896
- from: T(e, t),
1897
- to: Ee(e, t)
1841
+ from: D(e, t),
1842
+ to: Ae(e, t)
1898
1843
  },
1899
1844
  nextWeek: {
1900
1845
  label: "Следующая неделя",
1901
1846
  group: "week",
1902
- from: T(ye(e, 1), t),
1903
- to: Ee(ye(e, 1), t)
1847
+ from: D(Ce(e, 1), t),
1848
+ to: Ae(Ce(e, 1), t)
1904
1849
  },
1905
1850
  lastTenDays: {
1906
1851
  label: "Прошлая декада",
1907
1852
  group: "decade",
1908
- ...Y.shiftDecadeInterval(e, -1)
1853
+ ...X.shiftDecadeInterval(e, -1)
1909
1854
  },
1910
1855
  thisTenDays: {
1911
1856
  label: "Эта декада",
@@ -1915,85 +1860,85 @@ var Nn = class {
1915
1860
  nextTenDays: {
1916
1861
  label: "Следующая декада",
1917
1862
  group: "decade",
1918
- ...Y.shiftDecadeInterval(e, 1)
1863
+ ...X.shiftDecadeInterval(e, 1)
1919
1864
  },
1920
1865
  lastMonth: {
1921
1866
  label: "Прошлый месяц",
1922
1867
  group: "month",
1923
- from: w(Le(e, 1)),
1924
- to: b(Le(e, 1))
1868
+ from: E(Ve(e, 1)),
1869
+ to: S(Ve(e, 1))
1925
1870
  },
1926
1871
  thisMonth: {
1927
1872
  label: "Этот месяц",
1928
1873
  group: "month",
1929
1874
  from: a,
1930
- to: b(e)
1875
+ to: S(e)
1931
1876
  },
1932
1877
  nextMonth: {
1933
1878
  label: "Следующий месяц",
1934
1879
  group: "month",
1935
- from: w(v(e, 1)),
1936
- to: b(v(e, 1))
1880
+ from: E(b(e, 1)),
1881
+ to: S(b(e, 1))
1937
1882
  },
1938
1883
  lastQuarter: {
1939
1884
  label: "Прошлый квартал",
1940
1885
  group: "quarter",
1941
- from: Me(Re(e, 1)),
1942
- to: Ce(Re(e, 1))
1886
+ from: Ie(He(e, 1)),
1887
+ to: De(He(e, 1))
1943
1888
  },
1944
1889
  thisQuarter: {
1945
1890
  label: "Этот квартал",
1946
1891
  group: "quarter",
1947
1892
  from: o,
1948
- to: Ce(e)
1893
+ to: De(e)
1949
1894
  },
1950
1895
  nextQuarter: {
1951
1896
  label: "Следующий квартал",
1952
1897
  group: "quarter",
1953
- from: Me(ve(e, 1)),
1954
- to: Ce(ve(e, 1))
1898
+ from: Ie(Se(e, 1)),
1899
+ to: De(Se(e, 1))
1955
1900
  },
1956
1901
  lastHalfYear: {
1957
1902
  label: "Прошлое полугодие",
1958
1903
  group: "halfYear",
1959
- from: Y.startOfHalfYear(ee),
1960
- to: Y.endOfHalfYear(ee)
1904
+ from: X.startOfHalfYear(l),
1905
+ to: X.endOfHalfYear(l)
1961
1906
  },
1962
1907
  thisHalfYear: {
1963
1908
  label: "Это полугодие",
1964
1909
  group: "halfYear",
1965
1910
  from: s,
1966
- to: Y.endOfHalfYear(e)
1911
+ to: X.endOfHalfYear(e)
1967
1912
  },
1968
1913
  nextHalfYear: {
1969
1914
  label: "Следующее полугодие",
1970
1915
  group: "halfYear",
1971
- from: Y.startOfHalfYear(l),
1972
- to: Y.endOfHalfYear(l)
1916
+ from: X.startOfHalfYear(ee),
1917
+ to: X.endOfHalfYear(ee)
1973
1918
  },
1974
1919
  lastYear: {
1975
1920
  label: "Прошлый год",
1976
1921
  group: "year",
1977
- from: E(Be(e, 1)),
1978
- to: De(Be(e, 1))
1922
+ from: O(We(e, 1)),
1923
+ to: je(We(e, 1))
1979
1924
  },
1980
1925
  thisYear: {
1981
1926
  label: "Этот год",
1982
1927
  group: "year",
1983
1928
  from: c,
1984
- to: De(e)
1929
+ to: je(e)
1985
1930
  },
1986
1931
  nextYear: {
1987
1932
  label: "Следующий год",
1988
1933
  group: "year",
1989
- from: E(be(e, 1)),
1990
- to: De(be(e, 1))
1934
+ from: O(we(e, 1)),
1935
+ to: je(we(e, 1))
1991
1936
  },
1992
1937
  fromBeginningOfThisWeek: {
1993
1938
  label: "С начала этой недели",
1994
1939
  group: "other",
1995
1940
  section: "fromBeginning",
1996
- from: T(e, t),
1941
+ from: D(e, t),
1997
1942
  to: r
1998
1943
  },
1999
1944
  fromBeginningOfThisTenDays: {
@@ -2036,7 +1981,7 @@ var Nn = class {
2036
1981
  group: "other",
2037
1982
  section: "tillEnd",
2038
1983
  from: n,
2039
- to: Ee(e, t)
1984
+ to: Ae(e, t)
2040
1985
  },
2041
1986
  tillEndOfThisTenDays: {
2042
1987
  label: "До конца этой декады",
@@ -2050,106 +1995,106 @@ var Nn = class {
2050
1995
  group: "other",
2051
1996
  section: "tillEnd",
2052
1997
  from: n,
2053
- to: b(e)
1998
+ to: S(e)
2054
1999
  },
2055
2000
  tillEndOfThisQuarter: {
2056
2001
  label: "До конца этого квартала",
2057
2002
  group: "other",
2058
2003
  section: "tillEnd",
2059
2004
  from: n,
2060
- to: Ce(e)
2005
+ to: De(e)
2061
2006
  },
2062
2007
  tillEndOfThisHalfYear: {
2063
2008
  label: "До конца этого полугодия",
2064
2009
  group: "other",
2065
2010
  section: "tillEnd",
2066
2011
  from: n,
2067
- to: Y.endOfHalfYear(e)
2012
+ to: X.endOfHalfYear(e)
2068
2013
  },
2069
2014
  tillEndOfThisYear: {
2070
2015
  label: "До конца этого года",
2071
2016
  group: "other",
2072
2017
  section: "tillEnd",
2073
2018
  from: n,
2074
- to: De(e)
2019
+ to: je(e)
2075
2020
  },
2076
2021
  lastWeekTillSameWeekDay: {
2077
2022
  label: "Прошлая неделя, до такого же дня недели",
2078
2023
  group: "other",
2079
2024
  section: "lastTillSame",
2080
- ...Y.weekTillSameWeekday(e, -1)
2025
+ ...X.weekTillSameWeekday(e, -1)
2081
2026
  },
2082
2027
  lastTenDaysTillSameDayNumber: {
2083
2028
  label: "Прошлая декада, до такого же номера дня",
2084
2029
  group: "other",
2085
2030
  section: "lastTillSame",
2086
- ...Y.decadeTillSameDayNumber(e, -1)
2031
+ ...X.decadeTillSameDayNumber(e, -1)
2087
2032
  },
2088
2033
  lastMonthTillSameDate: {
2089
2034
  label: "Прошлый месяц, до такой же даты",
2090
2035
  group: "other",
2091
2036
  section: "lastTillSame",
2092
- ...Y.intervalTillSameDate(a, w(Le(e, 1)), e)
2037
+ ...X.intervalTillSameDate(a, E(Ve(e, 1)), e)
2093
2038
  },
2094
2039
  lastQuarterTillSameDate: {
2095
2040
  label: "Прошлый квартал, до такой же даты",
2096
2041
  group: "other",
2097
2042
  section: "lastTillSame",
2098
- ...Y.intervalTillSameDate(o, Me(Re(e, 1)), e)
2043
+ ...X.intervalTillSameDate(o, Ie(He(e, 1)), e)
2099
2044
  },
2100
2045
  lastHalfYearTillSameDate: {
2101
2046
  label: "Прошлое полугодие, до такой же даты",
2102
2047
  group: "other",
2103
2048
  section: "lastTillSame",
2104
- ...Y.intervalTillSameDate(s, Y.startOfHalfYear(ee), e)
2049
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(l), e)
2105
2050
  },
2106
2051
  lastYearTillSameDate: {
2107
2052
  label: "Прошлый год, до такой же даты",
2108
2053
  group: "other",
2109
2054
  section: "lastTillSame",
2110
- ...Y.intervalTillSameDate(c, E(Be(e, 1)), e)
2055
+ ...X.intervalTillSameDate(c, O(We(e, 1)), e)
2111
2056
  },
2112
2057
  nextWeekTillSameWeekDay: {
2113
2058
  label: "Следующая неделя, до такого же дня недели",
2114
2059
  group: "other",
2115
2060
  section: "nextTillSame",
2116
- ...Y.weekTillSameWeekday(e, 1)
2061
+ ...X.weekTillSameWeekday(e, 1)
2117
2062
  },
2118
2063
  nextTenDaysTillSameDayNumber: {
2119
2064
  label: "Следующая декада, до такого же номера дня",
2120
2065
  group: "other",
2121
2066
  section: "nextTillSame",
2122
- ...Y.decadeTillSameDayNumber(e, 1)
2067
+ ...X.decadeTillSameDayNumber(e, 1)
2123
2068
  },
2124
2069
  nextMonthTillSameDate: {
2125
2070
  label: "Следующий месяц, до такой же даты",
2126
2071
  group: "other",
2127
2072
  section: "nextTillSame",
2128
- ...Y.intervalTillSameDate(a, w(v(e, 1)), e)
2073
+ ...X.intervalTillSameDate(a, E(b(e, 1)), e)
2129
2074
  },
2130
2075
  nextQuarterTillSameDate: {
2131
2076
  label: "Следующий квартал, до такой же даты",
2132
2077
  group: "other",
2133
2078
  section: "nextTillSame",
2134
- ...Y.intervalTillSameDate(o, Me(ve(e, 1)), e)
2079
+ ...X.intervalTillSameDate(o, Ie(Se(e, 1)), e)
2135
2080
  },
2136
2081
  nextHalfYearTillSameDate: {
2137
2082
  label: "Следующее полугодие, до такой же даты",
2138
2083
  group: "other",
2139
2084
  section: "nextTillSame",
2140
- ...Y.intervalTillSameDate(s, Y.startOfHalfYear(l), e)
2085
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(ee), e)
2141
2086
  },
2142
2087
  nextYearTillSameDate: {
2143
2088
  label: "Следующий год, до такой же даты",
2144
2089
  group: "other",
2145
2090
  section: "nextTillSame",
2146
- ...Y.intervalTillSameDate(c, E(be(e, 1)), e)
2091
+ ...X.intervalTillSameDate(c, O(we(e, 1)), e)
2147
2092
  },
2148
2093
  last7Days: {
2149
2094
  label: "Последние 7 дней",
2150
2095
  group: "other",
2151
2096
  section: "rollingDays",
2152
- from: C(Ie(e, 6)),
2097
+ from: T(Be(e, 6)),
2153
2098
  to: r
2154
2099
  },
2155
2100
  next7Days: {
@@ -2157,7 +2102,7 @@ var Nn = class {
2157
2102
  group: "other",
2158
2103
  section: "rollingDays",
2159
2104
  from: n,
2160
- to: y(_(e, 6))
2105
+ to: x(y(e, 6))
2161
2106
  }
2162
2107
  };
2163
2108
  }
@@ -2226,10 +2171,10 @@ var Nn = class {
2226
2171
  lastLoginDate;
2227
2172
  lastOrderDate;
2228
2173
  constructor(e) {
2229
- this.salesDirections = k(e?.salesDirections ?? [], (e) => new m(e)), this.partnerGroups = k(e?.partnerGroups ?? [], (e) => new p(e)), this.managers = k(e?.managers ?? [], (e) => new P(e)), this.additionalClients = k(e?.additionalClients ?? [], (e) => new In(e)), this.fixedClients = k(e?.fixedClients ?? [], (e) => new In(e)), this.regions = k(e?.regions ?? [], (e) => new ue(e)), this.cities = k(e?.cities ?? [], (e) => new t(e)), this.lastLoginDate = new M(e?.lastLoginDate), this.lastOrderDate = new M(e?.lastOrderDate);
2174
+ this.salesDirections = j(e?.salesDirections ?? [], (e) => new g(e)), this.partnerGroups = j(e?.partnerGroups ?? [], (e) => new h(e)), this.managers = j(e?.managers ?? [], (e) => new F(e)), this.additionalClients = j(e?.additionalClients ?? [], (e) => new In(e)), this.fixedClients = j(e?.fixedClients ?? [], (e) => new In(e)), this.regions = j(e?.regions ?? [], (e) => new fe(e)), this.cities = j(e?.cities ?? [], (e) => new n(e)), this.lastLoginDate = new P(e?.lastLoginDate), this.lastOrderDate = new P(e?.lastOrderDate);
2230
2175
  }
2231
2176
  hasClientConditions() {
2232
- return tt([
2177
+ return it([
2233
2178
  this.salesDirections,
2234
2179
  this.partnerGroups,
2235
2180
  this.managers,
@@ -2237,24 +2182,24 @@ var Nn = class {
2237
2182
  this.fixedClients,
2238
2183
  this.regions,
2239
2184
  this.cities
2240
- ], (e) => !qe(e)) || tt([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2185
+ ], (e) => !Ze(e)) || it([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2241
2186
  }
2242
2187
  setPeriod(e, t) {
2243
- return this[e] = new M({
2244
- from: t?.from ? C(t.from) : null,
2245
- to: t?.to ? y(t.to) : null
2188
+ return this[e] = new P({
2189
+ from: t?.from ? T(t.from) : null,
2190
+ to: t?.to ? x(t.to) : null
2246
2191
  }), this;
2247
2192
  }
2248
2193
  toSaveData() {
2249
2194
  return {
2250
- salesDirections: k(this.salesDirections, "id"),
2251
- partnerGroups: k(this.partnerGroups, "id"),
2252
- managers: k(this.managers, "id"),
2253
- additionalClients: k(this.additionalClients, "id"),
2254
- regions: k(this.regions, "id"),
2255
- cities: k(this.cities, "id"),
2256
- lastLoginDate: new M(this.lastLoginDate),
2257
- lastOrderDate: new M(this.lastOrderDate)
2195
+ salesDirections: j(this.salesDirections, "id"),
2196
+ partnerGroups: j(this.partnerGroups, "id"),
2197
+ managers: j(this.managers, "id"),
2198
+ additionalClients: j(this.additionalClients, "id"),
2199
+ regions: j(this.regions, "id"),
2200
+ cities: j(this.cities, "id"),
2201
+ lastLoginDate: new P(this.lastLoginDate),
2202
+ lastOrderDate: new P(this.lastOrderDate)
2258
2203
  };
2259
2204
  }
2260
2205
  }, Rn = /* @__PURE__ */ function(e) {
@@ -2272,7 +2217,7 @@ var Nn = class {
2272
2217
  countDiscountedProducts;
2273
2218
  countDiscountedClients;
2274
2219
  constructor(e) {
2275
- super(e), this.conditions = new Ln(e?.conditions), this.products = k(e?.products ?? [], (e) => new L(e)), this.productCategories = k(e?.productCategories ?? [], (e) => new V(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2220
+ super(e), this.conditions = new Ln(e?.conditions), this.products = j(e?.products ?? [], (e) => new R(e)), this.productCategories = j(e?.productCategories ?? [], (e) => new H(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2276
2221
  }
2277
2222
  getState(e = /* @__PURE__ */ new Date()) {
2278
2223
  return zn.resolve(this, e);
@@ -2291,8 +2236,8 @@ var Nn = class {
2291
2236
  publishedAt: this.publishedAt ?? null,
2292
2237
  deletedAt: this.deletedAt ?? null,
2293
2238
  description: this.description ?? "",
2294
- products: k(this.products, "id"),
2295
- productCategories: k(this.productCategories, "id"),
2239
+ products: j(this.products, "id"),
2240
+ productCategories: j(this.productCategories, "id"),
2296
2241
  conditions: this.conditions.toSaveData()
2297
2242
  };
2298
2243
  }
@@ -2311,7 +2256,7 @@ var Nn = class {
2311
2256
  isEligible() {
2312
2257
  return this.additionalClientsCondition || this.fixedClientsCondition || this.partnerGroupsCondition || this.managersCondition || this.citiesCondition || this.regionsCondition || this.salesDirectionsCondition;
2313
2258
  }
2314
- }, Hn = class extends j {
2259
+ }, Hn = class extends N {
2315
2260
  id;
2316
2261
  name;
2317
2262
  states;
@@ -2326,16 +2271,16 @@ var Nn = class {
2326
2271
  }
2327
2272
  return this;
2328
2273
  }
2329
- }, Un = class e extends N {
2274
+ }, Un = class t extends e {
2330
2275
  static prepareSaveData(e, t) {
2331
2276
  return {
2332
2277
  ...e,
2333
- publishedAt: o.toApiFormat(e.publishedAt),
2334
- deletedAt: o.toApiFormat(e.deletedAt),
2278
+ publishedAt: s.toApiFormat(e.publishedAt),
2279
+ deletedAt: s.toApiFormat(e.deletedAt),
2335
2280
  conditions: {
2336
2281
  ...e.conditions,
2337
- lastLoginDate: o.periodToApiFormat(e.conditions.lastLoginDate),
2338
- lastOrderDate: o.periodToApiFormat(e.conditions.lastOrderDate),
2282
+ lastLoginDate: s.periodToApiFormat(e.conditions.lastLoginDate),
2283
+ lastOrderDate: s.periodToApiFormat(e.conditions.lastOrderDate),
2339
2284
  updateFixedClients: t
2340
2285
  }
2341
2286
  };
@@ -2346,11 +2291,11 @@ var Nn = class {
2346
2291
  getDiscount(e) {
2347
2292
  return this.get(`/internal/price/discounts/${e}`, {}, (e) => new Bn(e.data));
2348
2293
  }
2349
- createDiscount(t, n, r = {}) {
2350
- return this.post("/internal/price/discounts", e.prepareSaveData(t, n), (e) => new Bn(e.data), r);
2294
+ createDiscount(e, n, r = {}) {
2295
+ return this.post("/internal/price/discounts", t.prepareSaveData(e, n), (e) => new Bn(e.data), r);
2351
2296
  }
2352
- updateDiscount(t, n, r, i = {}) {
2353
- return this.patch(`/internal/price/discounts/${t}`, e.prepareSaveData(n, r), (e) => new Bn(e.data), i);
2297
+ updateDiscount(e, n, r, i = {}) {
2298
+ return this.patch(`/internal/price/discounts/${e}`, t.prepareSaveData(n, r), (e) => new Bn(e.data), i);
2354
2299
  }
2355
2300
  removeDiscount(e) {
2356
2301
  return this.delete(`/internal/price/discounts/${e}`);
@@ -2361,36 +2306,36 @@ var Nn = class {
2361
2306
  checkClient(e, t) {
2362
2307
  return this.get(`/internal/price/discounts/${e}/clients/${t}/check`, {}, (e) => new Vn(e.data));
2363
2308
  }
2364
- }, Wn = class extends d {
2309
+ }, Wn = class extends p {
2365
2310
  constructor(e) {
2366
2311
  super(e);
2367
2312
  }
2368
- }, X = class extends u {
2313
+ }, Gn = class extends d {
2369
2314
  question;
2370
2315
  answer;
2371
2316
  groups;
2372
2317
  constructor(e) {
2373
- super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = k(e?.groups ?? [], (e) => new Wn(e));
2318
+ super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = j(e?.groups ?? [], (e) => new Wn(e));
2374
2319
  }
2375
2320
  toSaveData() {
2376
2321
  return {
2377
2322
  question: this.question,
2378
2323
  answer: this.answer,
2379
- groups: k(this.groups, "id")
2324
+ groups: j(this.groups, "id")
2380
2325
  };
2381
2326
  }
2382
- }, Gn = class extends N {
2327
+ }, Kn = class extends e {
2383
2328
  getFaqList(e, t) {
2384
- return this.getTypedPaginated(X, "/internal/faq", void 0, void 0, t, D(e) ? {} : { group: e });
2329
+ return this.getTypedPaginated(Gn, "/internal/faq", void 0, void 0, t, k(e) ? {} : { group: e });
2385
2330
  }
2386
2331
  getFaq(e) {
2387
- return this.get(`/internal/faq/${e}`, {}, (e) => new X(e.data));
2332
+ return this.get(`/internal/faq/${e}`, {}, (e) => new Gn(e.data));
2388
2333
  }
2389
2334
  createFaq(e, t = {}) {
2390
- return this.post("/internal/faq", e, (e) => new X(e.data), t);
2335
+ return this.post("/internal/faq", e, (e) => new Gn(e.data), t);
2391
2336
  }
2392
2337
  updateFaq(e, t, n = {}) {
2393
- return this.patch(`/internal/faq/${e}`, t, (e) => new X(e.data), n);
2338
+ return this.patch(`/internal/faq/${e}`, t, (e) => new Gn(e.data), n);
2394
2339
  }
2395
2340
  removeFaq(e) {
2396
2341
  return this.delete(`/internal/faq/${e}`);
@@ -2410,13 +2355,13 @@ var Nn = class {
2410
2355
  };
2411
2356
  //#endregion
2412
2357
  //#region src/helpers/format-percent-change.ts
2413
- function Kn(e) {
2414
- let t = et(e * 100);
2358
+ function qn(e) {
2359
+ let t = rt(e * 100);
2415
2360
  return `${t >= 0 ? "+" : ""}${t}%`;
2416
2361
  }
2417
2362
  //#endregion
2418
2363
  //#region src/helpers/units-helper.ts
2419
- var qn = class e {
2364
+ var Jn = class e {
2420
2365
  static productIsMeasurable(e) {
2421
2366
  return e.unit.isLinear || e.unit.isSquare;
2422
2367
  }
@@ -2426,9 +2371,9 @@ var qn = class e {
2426
2371
  static getProductLengthMultiplicity(e) {
2427
2372
  return e.properties?.lengthStep == null ? !e.properties?.ignoreMinCountCheck && e.properties?.minCount != null ? e.properties.minCount : .01 : e.properties.lengthStep;
2428
2373
  }
2429
- }, Jn = class {
2374
+ }, Yn = class {
2430
2375
  static generateUndefinedManagerInstance() {
2431
- return new te({
2376
+ return new f({
2432
2377
  id: 0,
2433
2378
  name: "- Не назначен -",
2434
2379
  isActive: !0,
@@ -2438,18 +2383,74 @@ var qn = class e {
2438
2383
  static isUndefinedManagerInstance(e) {
2439
2384
  return e.id === 0 && e.guid === "-undefined-";
2440
2385
  }
2441
- }, Yn = /* @__PURE__ */ function(e) {
2386
+ }, Xn = class extends N {
2387
+ name;
2388
+ phone;
2389
+ email;
2390
+ salesDirections;
2391
+ isActive;
2392
+ isSupervisor;
2393
+ canDoReclamations;
2394
+ constructor(e) {
2395
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.isActive = e?.isActive, this.isSupervisor = e?.isSupervisor, this.canDoReclamations = e?.canDoReclamations;
2396
+ }
2397
+ resetFilterValue(e) {
2398
+ switch (e) {
2399
+ case "name":
2400
+ case "phone":
2401
+ case "email":
2402
+ case "salesDirections":
2403
+ case "isActive":
2404
+ case "isSupervisor":
2405
+ case "canDoReclamations": this[e] = void 0;
2406
+ }
2407
+ return this;
2408
+ }
2409
+ }, Zn = class e extends ie {
2410
+ static transformManagerDataToRequest(e) {
2411
+ return {
2412
+ name: e.name,
2413
+ phone: e.contacts?.phone ?? "",
2414
+ email: e.contacts?.email ?? "",
2415
+ password: e.password,
2416
+ isActive: e.isActive,
2417
+ isSupervisor: e.isSupervisor,
2418
+ canDoReclamations: e.canDoReclamations,
2419
+ authAsOperator: e.authAsOperator ?? !1,
2420
+ salesDirectionId: e.salesDirection.id,
2421
+ pricingRoleId: e.pricingRole?.id,
2422
+ showAllCosts: e.showAllCosts ?? !1,
2423
+ storeIds: j(e.stores, "id"),
2424
+ curatedDirectionIds: j(e.curatedDirections, "id"),
2425
+ managerRegionIds: j(e.managerRegions, "id"),
2426
+ managerIds: j(e.managers, "id"),
2427
+ photo: e.photoFile
2428
+ };
2429
+ }
2430
+ getManagersList(e, t, n, r) {
2431
+ return this.getTypedPaginated(f, "/internal/managers", e, t, n, {}, void 0, r);
2432
+ }
2433
+ createManager(t, n = {}) {
2434
+ return this.post("/internal/managers", e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2435
+ }
2436
+ updateManager(t, n = {}) {
2437
+ return this.patch(`/internal/managers/${t.id}`, e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2438
+ }
2439
+ getManagerRegionsList(e, t, n) {
2440
+ return this.getTypedPaginated(ye, "/internal/managers/regions", e, t, n);
2441
+ }
2442
+ }, Qn = /* @__PURE__ */ function(e) {
2442
2443
  return e.Processing = "processing", e.Completed = "completed", e.Error = "error", e.NeedsActualization = "needs_actualization", e;
2443
- }({}), Xn = class {
2444
+ }({}), $n = class {
2444
2445
  status;
2445
2446
  actualizedAt;
2446
2447
  expiresAt;
2447
2448
  error;
2448
2449
  constructor(e) {
2449
- this.status = e?.status ?? Yn.Processing, this.actualizedAt = o.parse(e?.actualizedAt), this.expiresAt = o.parse(e?.expiresAt), this.error = e?.error;
2450
+ this.status = e?.status ?? Qn.Processing, this.actualizedAt = s.parse(e?.actualizedAt), this.expiresAt = s.parse(e?.expiresAt), this.error = e?.error;
2450
2451
  }
2451
2452
  get isProcessing() {
2452
- return this.status === Yn.Processing;
2453
+ return this.status === Qn.Processing;
2453
2454
  }
2454
2455
  get isOutdated() {
2455
2456
  return this.isOutdatedAt(/* @__PURE__ */ new Date());
@@ -2458,12 +2459,12 @@ var qn = class e {
2458
2459
  return this.isOrderAllowedAt(/* @__PURE__ */ new Date());
2459
2460
  }
2460
2461
  isOutdatedAt(e) {
2461
- return this.status !== Yn.Completed || D(this.actualizedAt) ? !0 : !D(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2462
+ return this.status !== Qn.Completed || k(this.actualizedAt) ? !0 : !k(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2462
2463
  }
2463
2464
  isOrderAllowedAt(e) {
2464
- return this.status === Yn.Completed && !this.isOutdatedAt(e);
2465
+ return this.status === Qn.Completed && !this.isOutdatedAt(e);
2465
2466
  }
2466
- }, Zn = class extends A {
2467
+ }, er = class extends M {
2467
2468
  name;
2468
2469
  client;
2469
2470
  sum;
@@ -2471,9 +2472,9 @@ var qn = class e {
2471
2472
  actualization;
2472
2473
  file;
2473
2474
  constructor(e) {
2474
- super(e), this.name = e?.name, this.client = new H(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new Xn(e.actualization), this.file = e?.file;
2475
+ super(e), this.name = e?.name, this.client = new U(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new $n(e.actualization), this.file = e?.file;
2475
2476
  }
2476
- }, Qn = class extends Tt {
2477
+ }, tr = class extends Tt {
2477
2478
  groupName;
2478
2479
  supplierSku;
2479
2480
  isIgnored;
@@ -2482,24 +2483,24 @@ var qn = class e {
2482
2483
  super(e), this.groupName = e.groupName, this.supplierSku = e.supplierSku ?? e.product.supplierSku, this.isIgnored = e.isIgnored, this.lineError = e.lineError;
2483
2484
  }
2484
2485
  get isProductStub() {
2485
- return D(this.product.id);
2486
+ return k(this.product.id);
2486
2487
  }
2487
2488
  get isOrderable() {
2488
- return !this.isProductStub && !this.isIgnored && qe(this.lineError);
2489
+ return !this.isProductStub && !this.isIgnored && Ze(this.lineError);
2489
2490
  }
2490
- }, Z = class extends Zn {
2491
+ }, Z = class extends er {
2491
2492
  sum;
2492
2493
  products;
2493
2494
  constructor(e) {
2494
- super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new Qn(t) : new Tt(t));
2495
+ super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new tr(t) : new Tt(t));
2495
2496
  }
2496
- }, $n = class extends j {
2497
+ }, nr = class extends N {
2497
2498
  id;
2498
2499
  clientSearchTerm;
2499
2500
  name;
2500
- createdAt = new M();
2501
+ createdAt = new P();
2501
2502
  constructor(e) {
2502
- super(), this.id = e?.id, this.clientSearchTerm = e?.clientSearchTerm, this.name = e?.name, this.createdAt = new M(e?.createdAt);
2503
+ super(), this.id = e?.id, this.clientSearchTerm = e?.clientSearchTerm, this.name = e?.name, this.createdAt = new P(e?.createdAt);
2503
2504
  }
2504
2505
  resetFilterValue(e) {
2505
2506
  return e === "createdAt" ? (this.createdAt.from = null, this.createdAt.to = null) : this[e] = void 0, this;
@@ -2508,7 +2509,7 @@ var qn = class e {
2508
2509
  let e = super.asClearRaw();
2509
2510
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
2510
2511
  }
2511
- }, er = class extends vn {
2512
+ }, rr = class extends vn {
2512
2513
  client;
2513
2514
  payment;
2514
2515
  delivery;
@@ -2523,20 +2524,20 @@ var qn = class e {
2523
2524
  sum;
2524
2525
  isLargeOrder;
2525
2526
  constructor(e) {
2526
- super(e), this.client = new H(e?.client), this.payment = {
2527
+ super(e), this.client = new U(e?.client), this.payment = {
2527
2528
  type: e?.payment?.type ?? -1,
2528
2529
  status: e?.payment?.status ?? -1,
2529
2530
  onlinePaymentLink: e?.payment?.onlinePaymentLink
2530
2531
  }, this.delivery = {
2531
2532
  type: e?.delivery?.type ?? -1,
2532
- date: O(e?.delivery?.date) ? S(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2533
- address: e?.delivery?.address ? new J(e.delivery.address) : void 0,
2534
- warehouse: e?.delivery?.warehouse ? new ge(e.delivery.warehouse) : void 0
2535
- }, this.attachedUser = e?.attachedUser ? new P(e?.attachedUser) : void 0, this.status = new ae(e?.status), this.statusDetail = e?.statusDetail ? new le(e.statusDetail) : void 0, this.salesDirection = new m(e?.salesDirection);
2533
+ date: A(e?.delivery?.date) ? w(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2534
+ address: e?.delivery?.address ? new Y(e.delivery.address) : void 0,
2535
+ warehouse: e?.delivery?.warehouse ? new be(e.delivery.warehouse) : void 0
2536
+ }, this.attachedUser = e?.attachedUser ? new F(e?.attachedUser) : void 0, this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0, this.salesDirection = new g(e?.salesDirection);
2536
2537
  let t = e?.attachedAt;
2537
- this.attachedAt = O(t) ? S(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2538
+ this.attachedAt = A(t) ? w(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2538
2539
  }
2539
- }, tr = class extends wt {
2540
+ }, ir = class extends wt {
2540
2541
  product;
2541
2542
  cost;
2542
2543
  costOne;
@@ -2550,9 +2551,9 @@ var qn = class e {
2550
2551
  changedFields = [];
2551
2552
  replacement;
2552
2553
  constructor(e, t) {
2553
- super(e), this.product = new R(e.product), this.currency = new a(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 = Ge(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
2554
+ super(e), this.product = new z(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 = Ye(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
2554
2555
  }
2555
- }, Q = class extends er {
2556
+ }, Q = class extends rr {
2556
2557
  products;
2557
2558
  invoices;
2558
2559
  comment;
@@ -2568,11 +2569,11 @@ var qn = class e {
2568
2569
  erpOrderUrl;
2569
2570
  numberDoc;
2570
2571
  constructor(e) {
2571
- super(e), this.products = (e.products ?? []).map((t) => new tr(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? mn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new le(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new ae(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2572
+ super(e), this.products = (e.products ?? []).map((t) => new ir(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? mn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new de(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new se(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2572
2573
  }
2573
- }, nr = class extends N {
2574
+ }, ar = class extends e {
2574
2575
  getOffers(e, t, n, r) {
2575
- return this.getTypedPaginated(Zn, "/internal/orders/offers", e, t, n, {}, void 0, r);
2576
+ return this.getTypedPaginated(er, "/internal/orders/offers", e, t, n, {}, void 0, r);
2576
2577
  }
2577
2578
  createOfferFromCart(e, t, n) {
2578
2579
  return this.post(`/internal/orders/offers/${e}`, {
@@ -2602,12 +2603,12 @@ var qn = class e {
2602
2603
  return this.delete(`/internal/orders/offers/${e}`);
2603
2604
  }
2604
2605
  createOrderFromDraft(e, t, n, r = {}) {
2605
- let i = g().config.dateFormats.api;
2606
+ let i = v().config.dateFormats.api;
2606
2607
  return this.post(`/internal/orders/offers/${e}/create-order`, {
2607
2608
  ...t,
2608
- deliveryDate: t.deliveryDate ? x(t.deliveryDate, i) : void 0,
2609
+ deliveryDate: t.deliveryDate ? C(t.deliveryDate, i) : void 0,
2609
2610
  items: n?.length ? n : void 0
2610
- }, (e) => h.instanceListInitializer(Q, e.data), r);
2611
+ }, (e) => _.instanceListInitializer(Q, e.data), r);
2611
2612
  }
2612
2613
  addOfferProduct(e, t, n = {}) {
2613
2614
  return this.post(`/internal/orders/offers/${e}/products`, {
@@ -2640,6 +2641,13 @@ var qn = class e {
2640
2641
  deleteOfferProduct(e, t) {
2641
2642
  return this.delete(`/internal/orders/offers/${e}/products/${t}`, (e) => new Z(e.data));
2642
2643
  }
2644
+ deleteOfferProducts(e, t) {
2645
+ return this.request({
2646
+ method: "DELETE",
2647
+ url: `/internal/orders/offers/${e}/products`,
2648
+ data: { items: t }
2649
+ }, (e) => new Z(e.data));
2650
+ }
2643
2651
  getOfferHtml(e, t) {
2644
2652
  return this.get(`/internal/orders/offers/${e}/view`, t ? { recipientText: t } : {}, (e) => new Blob([e.data], { type: "text/html" }));
2645
2653
  }
@@ -2649,16 +2657,79 @@ var qn = class e {
2649
2657
  sendOffer(e, t) {
2650
2658
  return this.post(`/internal/orders/offers/${e}/send`, t);
2651
2659
  }
2652
- }, rr = class {
2660
+ }, or = class {
2653
2661
  static isProfstroy(e) {
2654
2662
  return !!e?.isProfstroy;
2655
2663
  }
2656
2664
  static isProfstroyOffer(e) {
2657
- return !D(e) && e.isProfstroy === !0 && !D(e.actualization);
2665
+ return !k(e) && e.isProfstroy === !0 && !k(e.actualization);
2666
+ }
2667
+ }, sr = class extends _e {
2668
+ isBillingSupervisor;
2669
+ constructor(e) {
2670
+ super(e), this.isBillingSupervisor = e?.isBillingSupervisor ?? !1;
2671
+ }
2672
+ }, cr = class extends sr {
2673
+ showAllCosts;
2674
+ stores;
2675
+ constructor(e) {
2676
+ super(e), this.showAllCosts = e?.showAllCosts, this.stores = e?.stores?.map((e) => new me(e));
2677
+ }
2678
+ }, lr = class extends N {
2679
+ name;
2680
+ phone;
2681
+ email;
2682
+ salesDirections;
2683
+ isActive;
2684
+ isBillingSupervisor;
2685
+ canDoReclamations;
2686
+ constructor(e) {
2687
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.isActive = e?.isActive, this.isBillingSupervisor = e?.isBillingSupervisor, this.canDoReclamations = e?.canDoReclamations;
2688
+ }
2689
+ resetFilterValue(e) {
2690
+ switch (e) {
2691
+ case "name":
2692
+ case "phone":
2693
+ case "email":
2694
+ case "salesDirections":
2695
+ case "isActive":
2696
+ case "isBillingSupervisor":
2697
+ case "canDoReclamations": this[e] = void 0;
2698
+ }
2699
+ return this;
2700
+ }
2701
+ }, ur = class t extends e {
2702
+ static transformOperatorDataToRequest(e) {
2703
+ return {
2704
+ name: e.name,
2705
+ phone: e.phone,
2706
+ email: e.email,
2707
+ password: e.password,
2708
+ isActive: e.isActive,
2709
+ isBillingSupervisor: e.isBillingSupervisor,
2710
+ canDoReclamations: e.canDoReclamations,
2711
+ salesDirectionId: e.salesDirection?.id,
2712
+ pricingRoleId: e.pricingRole?.id,
2713
+ showAllCosts: e.showAllCosts ?? !1,
2714
+ storeIds: j(e.stores, "id"),
2715
+ photo: e.photoFile
2716
+ };
2717
+ }
2718
+ getOperatorsList(e, t, n, r) {
2719
+ return this.getTypedPaginated(sr, "/internal/operators", e, t, n, {}, void 0, r);
2658
2720
  }
2659
- }, ir = /* @__PURE__ */ function(e) {
2721
+ getOperator(e, t = !1) {
2722
+ return this.get(`/internal/operators/${e}`, {}, (e) => new cr(e.data), t);
2723
+ }
2724
+ createOperator(e, n = {}) {
2725
+ return this.post("/internal/operators", t.transformOperatorDataToRequest(e), (e) => new cr(e.data), n);
2726
+ }
2727
+ updateOperator(e, n = {}) {
2728
+ return this.patch(`/internal/operators/${e.id}`, t.transformOperatorDataToRequest(e), (e) => new cr(e.data), n);
2729
+ }
2730
+ }, dr = /* @__PURE__ */ function(e) {
2660
2731
  return e.View = "view", e.Share = "share", e.EditTags = "edit_tags", e.SaveOrderIgnoredProducts = "save_order_ignored_products", e.ChangeStatus = "change_status", e.ChangeProducts = "change_products", e.ChangeOrderParameters = "change_order_parameters", e.Recalculate = "recalculate", e.AttachOrder = "attach_order", e.DetachOrder = "detach_order", e.ChangeAttachedOperator = "change_attached_operator", e.SendOnlinePaymentLink = "send_online_payment_link", e.ConfirmOnlineFullPayment = "confirm_online_full_payment", e.MergeOrders = "merge_orders", e.GetHistory = "get_history", e.CloneOrder = "clone_order", e.DeleteAttachedFile = "delete_attached_file", e;
2661
- }({}), ar = class {
2732
+ }({}), fr = class {
2662
2733
  paymentType;
2663
2734
  deliveryType;
2664
2735
  contragentId;
@@ -2676,21 +2747,21 @@ var qn = class e {
2676
2747
  constructor(e) {
2677
2748
  this.paymentType = e?.payment.type, this.deliveryType = e?.delivery.type, this.contragentId = e?.contragent?.id, this.deliveryDate = e?.delivery.date ? new Date(e.delivery.date) : void 0, this.addressId = e?.delivery.address?.id, this.warehouseId = e?.delivery.warehouse?.id, this.comment = e?.comment, this.barcode = e?.barcode, this.operatorsComment = e?.operatorsComment, this.operatorsForWarehouseComment = e?.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = e?.isAllowProcessingWithoutPayment;
2678
2749
  }
2679
- }, or = class extends j {
2750
+ }, pr = class extends N {
2680
2751
  attachedUsers;
2681
2752
  clientSearchTerm;
2682
2753
  client;
2683
2754
  contragent;
2684
- createdAt = new M();
2755
+ createdAt = new P();
2685
2756
  creator;
2686
- deliveryDate = new M();
2757
+ deliveryDate = new P();
2687
2758
  deliveryAddressSearch;
2688
2759
  clientCities;
2689
2760
  id;
2690
2761
  isApproved;
2691
2762
  isNotInStock;
2692
2763
  isOnOrder;
2693
- attachedAt = new M();
2764
+ attachedAt = new P();
2694
2765
  salesDirections;
2695
2766
  status;
2696
2767
  statusDetail;
@@ -2701,7 +2772,7 @@ var qn = class e {
2701
2772
  isToProcess;
2702
2773
  onlyMyRegions;
2703
2774
  constructor(e) {
2704
- super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new te(e) : new re(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new H(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new M(e?.createdAt), this.creator = e?.creator ? new P(e.creator) : void 0, this.deliveryDate = new M(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new t(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new M(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new m(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new s(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new oe(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new ge(e)), this.isToProcess = e?.isToProcess;
2775
+ super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new f(e) : new ae(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new P(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new P(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new P(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new ce(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new be(e)), this.isToProcess = e?.isToProcess;
2705
2776
  }
2706
2777
  resetFilterValue(e) {
2707
2778
  switch (e) {
@@ -2715,7 +2786,7 @@ var qn = class e {
2715
2786
  this.deliveryDate.from = null, this.deliveryDate.to = null;
2716
2787
  break;
2717
2788
  case "deliveryType":
2718
- this.deliveryType = new s();
2789
+ this.deliveryType = new c();
2719
2790
  break;
2720
2791
  case "clientCities":
2721
2792
  this.clientCities = [];
@@ -2742,22 +2813,22 @@ var qn = class e {
2742
2813
  let e = super.asClearRaw();
2743
2814
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.deliveryDate?.from && !e?.deliveryDate?.to && delete e.deliveryDate, !e?.attachedAt?.from && !e?.attachedAt?.to && delete e.attachedAt, e;
2744
2815
  }
2745
- }, sr = class {
2816
+ }, mr = class {
2746
2817
  user;
2747
2818
  status;
2748
2819
  statusDetail;
2749
2820
  createdAt;
2750
2821
  constructor(e) {
2751
- this.user = new P(e?.user), this.status = new ae(e?.status), this.statusDetail = e?.statusDetail ? new le(e.statusDetail) : void 0;
2822
+ this.user = new F(e?.user), this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0;
2752
2823
  let t = e?.createdAt;
2753
- this.createdAt = O(t) ? S(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2824
+ this.createdAt = A(t) ? w(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2754
2825
  }
2755
- }, cr = class extends N {
2826
+ }, hr = class extends e {
2756
2827
  getOrders(e, t, n, r) {
2757
- return this.getTypedPaginated(er, "/internal/orders", e, t, n, {}, void 0, r);
2828
+ return this.getTypedPaginated(rr, "/internal/orders", e, t, n, {}, void 0, r);
2758
2829
  }
2759
2830
  getOrdersCount(e, t) {
2760
- return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof ft ? e : new ft(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2831
+ return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof ee ? e : new ee(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2761
2832
  }
2762
2833
  getClientOrderStatistics(e, t) {
2763
2834
  return this.get(`/internal/clients/${e}/orders/statistics`, t ? { period: t } : {});
@@ -2766,12 +2837,12 @@ var qn = class e {
2766
2837
  return this.get(`/internal/orders/${e}`, {}, (e) => new Q(e.data));
2767
2838
  }
2768
2839
  createClientOrder(e, t, n, r = {}) {
2769
- let i = g().config.dateFormats.api;
2840
+ let i = v().config.dateFormats.api;
2770
2841
  return this.post(`/internal/clients/${e}/orders`, {
2771
2842
  ...t,
2772
- deliveryDate: x(t.deliveryDate, i),
2843
+ deliveryDate: C(t.deliveryDate, i),
2773
2844
  items: n?.length ? n : void 0
2774
- }, (e) => h.instanceListInitializer(Q, e.data), r);
2845
+ }, (e) => _.instanceListInitializer(Q, e.data), r);
2775
2846
  }
2776
2847
  attachOrder(e) {
2777
2848
  return this.patch(`/internal/orders/${e}/attach`, {}, (e) => new Q(e.data));
@@ -2789,10 +2860,10 @@ var qn = class e {
2789
2860
  return this.get(`/internal/orders/${e}/clone`, {});
2790
2861
  }
2791
2862
  updateOrder(e, t, n = {}) {
2792
- let r = g().config.dateFormats.api;
2863
+ let r = v().config.dateFormats.api;
2793
2864
  return this.patch(`/internal/orders/${e}`, {
2794
2865
  ...t,
2795
- deliveryDate: t.deliveryDate ? x(t.deliveryDate, r) : void 0
2866
+ deliveryDate: t.deliveryDate ? C(t.deliveryDate, r) : void 0
2796
2867
  }, (e) => new Q(e.data), n);
2797
2868
  }
2798
2869
  addOrderProduct(e, t, n = {}) {
@@ -2819,7 +2890,7 @@ var qn = class e {
2819
2890
  return this.patch(`/internal/orders/${e}/status`, { statusDetail: t }, (e) => new Q(e.data));
2820
2891
  }
2821
2892
  getOrderStatusHistory(e) {
2822
- return this.getTypedList(sr, `/internal/orders/${e}/history`);
2893
+ return this.getTypedList(mr, `/internal/orders/${e}/history`);
2823
2894
  }
2824
2895
  getOrderPrintHtml(e, t) {
2825
2896
  return this.get(`/internal/orders/${e}/print/view`, { ...t }, (e) => new Blob([e.data], { type: "text/html" }));
@@ -2860,51 +2931,51 @@ var qn = class e {
2860
2931
  return this.get(`/internal/orders/self-delivery/${e}/nearest-dates`, {}, (e) => e.data, void 0, t);
2861
2932
  }
2862
2933
  getDeliveryCost(e, t, n, r) {
2863
- let i = g().config.dateFormats.api;
2934
+ let i = v().config.dateFormats.api;
2864
2935
  return this.get(`/internal/orders/delivery/${e}/cost`, {
2865
- date: x(t, i),
2936
+ date: C(t, i),
2866
2937
  warehouse_id: n
2867
2938
  }, (e) => e.data, void 0, r);
2868
2939
  }
2869
- }, lr = Symbol("currentOrder"), ur = class {
2940
+ }, gr = Symbol("currentOrder"), _r = class {
2870
2941
  client;
2871
2942
  product;
2872
2943
  cost;
2873
2944
  costCoefficient;
2874
2945
  source;
2875
2946
  constructor(e) {
2876
- this.client = new H(e?.client), this.product = new L(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? Ct.Product;
2947
+ this.client = new U(e?.client), this.product = new R(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? Ct.Product;
2877
2948
  }
2878
- }, dr = (e) => e ? $e({
2949
+ }, vr = (e) => e ? nt({
2879
2950
  cities: e.cities?.map((e) => e.id),
2880
2951
  clients: e.clients?.map((e) => e.id),
2881
2952
  managers: e.managers?.map((e) => e.id),
2882
2953
  partnerGroups: e.partnerGroups?.map((e) => e.id),
2883
2954
  salesDirections: e.salesDirections?.map((e) => e.id),
2884
2955
  hideNotActive: e.hideNotActive
2885
- }, (e) => D(e) || (Ge(e) || Ye(e)) && qe(e)) : {}, fr = (e) => {
2956
+ }, (e) => k(e) || (Ye(e) || $e(e)) && Ze(e)) : {}, yr = (e) => {
2886
2957
  let t = {};
2887
2958
  return e.from && (e.from.coefficient || e.from.value) && (t.from = {}, e.from.coefficient && (t.from.priceCoefficientId = e.from.coefficient.id), e.from.value && (t.from.increasePercent = e.from.value)), e.to && (e.to.coefficient || e.to.value) && (t.to = {}, e.to.coefficient && (t.to.priceCoefficientId = e.to.coefficient.id), e.to.value && (t.to.increasePercent = e.to.value)), t;
2888
- }, pr = class extends l {
2959
+ }, br = class extends u {
2889
2960
  analyzeProductPrices(e, t, n) {
2890
2961
  return this.get(`/internal/price/products/${e}/analyze`, {
2891
- ...fr(t),
2892
- filters: dr(n)
2893
- }, (e) => h.instanceListInitializer(ur, e.data));
2962
+ ...yr(t),
2963
+ filters: vr(n)
2964
+ }, (e) => _.instanceListInitializer(_r, e.data));
2894
2965
  }
2895
2966
  analyzeCategoryPrices(e, t, n) {
2896
2967
  return this.get(`/internal/price/categories/${e}/analyze`, {
2897
- ...fr(t),
2898
- filters: dr(n)
2899
- }, (e) => h.instanceListInitializer(ur, e.data));
2968
+ ...yr(t),
2969
+ filters: vr(n)
2970
+ }, (e) => _.instanceListInitializer(_r, e.data));
2900
2971
  }
2901
2972
  analyzeCategoryPricesBySquare(e, t, n) {
2902
2973
  return this.get(`/internal/price/categories/${e}/analyze/square`, {
2903
2974
  ...t,
2904
- filters: dr(n)
2905
- }, (e) => h.instanceListInitializer(ur, e.data));
2975
+ filters: vr(n)
2976
+ }, (e) => _.instanceListInitializer(_r, e.data));
2906
2977
  }
2907
- }, mr = class {
2978
+ }, xr = class {
2908
2979
  cost;
2909
2980
  isLowCost;
2910
2981
  isRetail;
@@ -2916,43 +2987,43 @@ var qn = class e {
2916
2987
  executor;
2917
2988
  currency;
2918
2989
  constructor(e) {
2919
- this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = O(e.costDate) ? S(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new I(e.product) : void 0, this.client = e.client ? new P(e.client) : void 0, this.executor = e.executor ? new P(e.executor) : void 0, this.currency = e.currency ? new a(e.currency) : void 0;
2990
+ this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = A(e.costDate) ? w(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new L(e.product) : void 0, this.client = e.client ? new F(e.client) : void 0, this.executor = e.executor ? new F(e.executor) : void 0, this.currency = e.currency ? new o(e.currency) : void 0;
2920
2991
  }
2921
- }, hr = class extends I {
2992
+ }, Sr = class extends L {
2922
2993
  history;
2923
2994
  constructor(e) {
2924
- super(e), this.history = k(e.history, (e) => new mr(e));
2995
+ super(e), this.history = j(e.history, (e) => new xr(e));
2925
2996
  }
2926
- }, gr = class extends l {
2997
+ }, Cr = class extends u {
2927
2998
  getProductPriceHistory(e) {
2928
- let t = g().config.dateFormats.api, n = $e(Qe(e, { costDate: {
2929
- from: Ke(e.costDate?.from) ? x(e.costDate.from, t) : e.costDate?.from,
2930
- to: Ke(e.costDate?.to) ? x(e.costDate.to, t) : e.costDate?.to
2931
- } }), (e) => D(e) || (Ge(e) || Ye(e)) && qe(e)), r = e.product?.[0] ?? 0;
2932
- return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new hr(Qe(e[0], { history: e }))]);
2999
+ let t = v().config.dateFormats.api, n = nt(tt(e, { costDate: {
3000
+ from: Xe(e.costDate?.from) ? C(e.costDate.from, t) : e.costDate?.from,
3001
+ to: Xe(e.costDate?.to) ? C(e.costDate.to, t) : e.costDate?.to
3002
+ } }), (e) => k(e) || (Ye(e) || $e(e)) && Ze(e)), r = e.product?.[0] ?? 0;
3003
+ return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new Sr(tt(e[0], { history: e }))]);
2933
3004
  }
2934
- }, _r = class {
3005
+ }, wr = class {
2935
3006
  createdAt;
2936
3007
  creator;
2937
3008
  files;
2938
3009
  text;
2939
3010
  status;
2940
3011
  constructor(e) {
2941
- this.createdAt = o.parse(e?.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = D(e?.creator) ? void 0 : new P(e.creator), this.files = e?.files ?? [], this.text = e?.text ?? void 0, this.status = e?.status ?? void 0;
3012
+ this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = k(e?.creator) ? void 0 : new F(e.creator), this.files = e?.files ?? [], this.text = e?.text ?? void 0, this.status = e?.status ?? void 0;
2942
3013
  }
2943
3014
  isStatusChanged() {
2944
- return !D(this.status);
3015
+ return !k(this.status);
2945
3016
  }
2946
3017
  }, $ = /* @__PURE__ */ function(e) {
2947
3018
  return e[e.Initiated = 1] = "Initiated", e[e.InfoRequired = 2] = "InfoRequired", e[e.Pending = 3] = "Pending", e[e.Completed = 4] = "Completed", e;
2948
- }({}), vr = class extends A {
3019
+ }({}), Tr = class extends M {
2949
3020
  status;
2950
3021
  closedAt;
2951
3022
  isRead;
2952
3023
  isDeleted;
2953
3024
  client;
2954
3025
  constructor(e) {
2955
- super(e), this.status = e?.status ?? $.Initiated, this.closedAt = o.parse(e?.closedAt), this.isRead = e?.isRead ?? !1, this.isDeleted = e?.isDeleted ?? !1, this.client = new hn(e?.client);
3026
+ super(e), this.status = e?.status ?? $.Initiated, this.closedAt = s.parse(e?.closedAt), this.isRead = e?.isRead ?? !1, this.isDeleted = e?.isDeleted ?? !1, this.client = new hn(e?.client);
2956
3027
  }
2957
3028
  isClosed() {
2958
3029
  return this.status === $.Completed;
@@ -2964,17 +3035,17 @@ var qn = class e {
2964
3035
  return !this.isClosed();
2965
3036
  }
2966
3037
  getConsiderationDays(e = /* @__PURE__ */ new Date()) {
2967
- return Math.max(xe(this.closedAt ?? e, this.createdAt), 0);
3038
+ return Math.max(Te(this.closedAt ?? e, this.createdAt), 0);
2968
3039
  }
2969
- }, yr = class extends vr {
3040
+ }, Er = class extends Tr {
2970
3041
  items;
2971
3042
  constructor(e) {
2972
- super(e), this.items = k(e?.items ?? [], (e) => new _r(e));
3043
+ super(e), this.items = j(e?.items ?? [], (e) => new wr(e));
2973
3044
  }
2974
3045
  isClientMessage(e) {
2975
3046
  return e.creator?.id === this.client.id;
2976
3047
  }
2977
- }, br = class extends j {
3048
+ }, Dr = class extends N {
2978
3049
  id;
2979
3050
  statuses;
2980
3051
  createdAt;
@@ -2987,7 +3058,7 @@ var qn = class e {
2987
3058
  super(), this.id = {
2988
3059
  from: e?.id?.from ?? null,
2989
3060
  to: e?.id?.to ?? null
2990
- }, this.statuses = e?.statuses, this.createdAt = new M(e?.createdAt), this.closedAt = new M(e?.closedAt), this.isRead = e?.isRead, this.isDeleted = e?.isDeleted, this.clientName = e?.clientName, this.cityName = e?.cityName;
3061
+ }, this.statuses = e?.statuses, this.createdAt = new P(e?.createdAt), this.closedAt = new P(e?.closedAt), this.isRead = e?.isRead, this.isDeleted = e?.isDeleted, this.clientName = e?.clientName, this.cityName = e?.cityName;
2991
3062
  }
2992
3063
  resetFilterValue(e) {
2993
3064
  switch (e) {
@@ -3010,7 +3081,7 @@ var qn = class e {
3010
3081
  }
3011
3082
  return this;
3012
3083
  }
3013
- }, xr = class e {
3084
+ }, Or = class e {
3014
3085
  static apiCodes = {
3015
3086
  [$.Initiated]: "initiated",
3016
3087
  [$.InfoRequired]: "info_required",
@@ -3021,23 +3092,23 @@ var qn = class e {
3021
3092
  return e.apiCodes[t];
3022
3093
  }
3023
3094
  static toApiCodes(t) {
3024
- return k(t, (t) => e.toApiCode(t));
3095
+ return j(t, (t) => e.toApiCode(t));
3025
3096
  }
3026
- }, Sr = class extends N {
3097
+ }, kr = class extends e {
3027
3098
  getReclamationsList(e, t, n, r, i = !1) {
3028
- return this.getTypedPaginated(vr, "/internal/reclamations", e, t, n, {}, i, r);
3099
+ return this.getTypedPaginated(Tr, "/internal/reclamations", e, t, n, {}, i, r);
3029
3100
  }
3030
3101
  getReclamation(e, t, n = !1) {
3031
- return this.get(`/internal/reclamations/${e}`, {}, (e) => new yr(e.data), n, t);
3102
+ return this.get(`/internal/reclamations/${e}`, {}, (e) => new Er(e.data), n, t);
3032
3103
  }
3033
3104
  createMessage(e, t, n = {}) {
3034
- return this.post(`/internal/reclamations/${e}/messages`, t, (e) => new yr(e.data), n);
3105
+ return this.post(`/internal/reclamations/${e}/messages`, t, (e) => new Er(e.data), n);
3035
3106
  }
3036
3107
  deleteReclamation(e) {
3037
3108
  return this.delete(`/internal/reclamations/${e}`);
3038
3109
  }
3039
3110
  restoreReclamation(e) {
3040
- return this.post(`/internal/reclamations/${e}/restore`, {}, (e) => new yr(e.data));
3111
+ return this.post(`/internal/reclamations/${e}/restore`, {}, (e) => new Er(e.data));
3041
3112
  }
3042
3113
  downloadReclamation(e, t = !1) {
3043
3114
  return this.getBlob(`/internal/reclamations/${e}/download`, {}, (e) => new Blob([e.request.response], { type: "application/pdf" }), t);
@@ -3045,18 +3116,18 @@ var qn = class e {
3045
3116
  getUpdates(e, t = !1) {
3046
3117
  return this.get("/internal/reclamations/updates", {}, void 0, t, e);
3047
3118
  }
3048
- }, Cr = class {
3119
+ }, Ar = class {
3049
3120
  products = [];
3050
3121
  productCategories = [];
3051
3122
  constructor(e) {
3052
- e?.products && (this.products = e.products.map((e) => new I(e))), e?.productCategories && (this.productCategories = e.productCategories.map((e) => new I(e)));
3123
+ e?.products && (this.products = e.products.map((e) => new L(e))), e?.productCategories && (this.productCategories = e.productCategories.map((e) => new L(e)));
3053
3124
  }
3054
- }, wr = class extends l {
3125
+ }, jr = class extends u {
3055
3126
  getProductCategoryRecommendations(e) {
3056
- return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new Cr(e.data));
3127
+ return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new Ar(e.data));
3057
3128
  }
3058
3129
  getProductRecommendations(e) {
3059
- return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new Cr(e.data));
3130
+ return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new Ar(e.data));
3060
3131
  }
3061
3132
  saveProductCategoryRecommendations(e, t) {
3062
3133
  return this.post(`/internal/catalog/recommendations/categories/${e.id}`, {
@@ -3070,7 +3141,7 @@ var qn = class e {
3070
3141
  products: t.products.map((e) => e.id)
3071
3142
  });
3072
3143
  }
3073
- }, Tr = class {
3144
+ }, Mr = class {
3074
3145
  static generateUndefinedInstance(e, t = "- Не определён -") {
3075
3146
  return new e({
3076
3147
  id: 0,
@@ -3081,13 +3152,13 @@ var qn = class e {
3081
3152
  static isUndefinedInstance(e) {
3082
3153
  return e.id === 0 && e.slug === "-undefined-";
3083
3154
  }
3084
- }, Er = class {
3155
+ }, Nr = class {
3085
3156
  name;
3086
3157
  content;
3087
3158
  constructor(e) {
3088
3159
  this.name = e.name, this.content = e.content;
3089
3160
  }
3090
- }, Dr = class {
3161
+ }, Pr = class {
3091
3162
  resourceType;
3092
3163
  resourceId;
3093
3164
  h1;
@@ -3097,42 +3168,42 @@ var qn = class e {
3097
3168
  meta;
3098
3169
  tags;
3099
3170
  constructor(e) {
3100
- this.resourceType = new de(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new Er(e)) ?? [], this.tags = e?.tags;
3171
+ this.resourceType = new pe(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new Nr(e)) ?? [], this.tags = e?.tags;
3101
3172
  }
3102
- }, Or = class extends l {
3173
+ }, Fr = class extends u {
3103
3174
  getResourceSeoData(e, t) {
3104
- return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new Dr(e.data));
3175
+ return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new Pr(e.data));
3105
3176
  }
3106
3177
  saveResourceSeoData(e, t = {}) {
3107
- return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new Dr(e.data), t);
3178
+ return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new Pr(e.data), t);
3108
3179
  }
3109
3180
  deleteResourceSeoData(e, t) {
3110
3181
  return this.delete(`/internal/seo/${e.slug}/${t}`);
3111
3182
  }
3112
- }, kr = class extends u {
3183
+ }, Ir = class extends d {
3113
3184
  text;
3114
3185
  searchCount;
3115
3186
  lastSearchedAt;
3116
3187
  constructor(e) {
3117
- super(e), this.text = e?.text ?? "", this.searchCount = e?.searchCount ?? 0, this.lastSearchedAt = o.parse(e?.lastSearchedAt);
3188
+ super(e), this.text = e?.text ?? "", this.searchCount = e?.searchCount ?? 0, this.lastSearchedAt = s.parse(e?.lastSearchedAt);
3118
3189
  }
3119
- }, Ar = class extends l {
3190
+ }, Lr = class extends u {
3120
3191
  getSearchProductsStatistics(e, t) {
3121
- return this.getTypedList(kr, "/internal/statistics/search/products", { date: o.periodToApiFormat(e) }, !1, t);
3192
+ return this.getTypedList(Ir, "/internal/statistics/search/products", { date: s.periodToApiFormat(e) }, !1, t);
3122
3193
  }
3123
3194
  removeSearchProductStatistic(e) {
3124
3195
  return this.delete(`/internal/statistics/search/products/${e}`);
3125
3196
  }
3126
- }, jr = /* @__PURE__ */ function(e) {
3197
+ }, Rr = /* @__PURE__ */ function(e) {
3127
3198
  return e[e.Undetermined = 0] = "Undetermined", e[e.Complete = 1] = "Complete", e[e.Incomplete = 2] = "Incomplete", e;
3128
- }({}), Mr = class e {
3199
+ }({}), zr = class e {
3129
3200
  static isBlocked(e, t) {
3130
- return t && e === jr.Incomplete;
3201
+ return t && e === Rr.Incomplete;
3131
3202
  }
3132
3203
  static getValidationResult(t, n) {
3133
- return e.isBlocked(t, n) ? new c("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === jr.Incomplete || t === jr.Undetermined ? new c("Проверьте правильность адреса", "warning") : void 0;
3204
+ return e.isBlocked(t, n) ? new l("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === Rr.Incomplete || t === Rr.Undetermined ? new l("Проверьте правильность адреса", "warning") : void 0;
3134
3205
  }
3135
- }, Nr = class extends l {
3206
+ }, Br = class extends u {
3136
3207
  searchAddresses(e) {
3137
3208
  return this.execSuggestionQuery("/public/suggestions/address", e);
3138
3209
  }
@@ -3150,26 +3221,26 @@ var qn = class e {
3150
3221
  }), t;
3151
3222
  });
3152
3223
  }
3153
- }, Pr = class extends l {
3224
+ }, Vr = class extends u {
3154
3225
  constructor() {
3155
- super(), this.baseUrl = `${g().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3226
+ super(), this.baseUrl = `${v().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3156
3227
  }
3157
3228
  getAccessToken() {
3158
3229
  return this.get("internal/users/current-tokens").then((e) => e.accessToken);
3159
3230
  }
3160
- }, Fr = class {
3231
+ }, Hr = class {
3161
3232
  user;
3162
3233
  salesDirection;
3163
3234
  constructor(e) {
3164
- this.user = new P(e?.user), this.salesDirection = new m(e?.salesDirection);
3235
+ this.user = new F(e?.user), this.salesDirection = new g(e?.salesDirection);
3165
3236
  }
3166
- }, Ir = class extends he {
3237
+ }, Ur = class extends ye {
3167
3238
  cities;
3168
3239
  users;
3169
3240
  constructor(e) {
3170
- super(e), this.cities = e?.cities?.map((e) => new t(e)) ?? [], this.users = e?.users?.map((e) => new Fr(e)) ?? [];
3241
+ super(e), this.cities = e?.cities?.map((e) => new n(e)) ?? [], this.users = e?.users?.map((e) => new Hr(e)) ?? [];
3171
3242
  }
3172
- }, Lr = class extends j {
3243
+ }, Wr = class extends N {
3173
3244
  id;
3174
3245
  name;
3175
3246
  abbr;
@@ -3184,27 +3255,27 @@ var qn = class e {
3184
3255
  }
3185
3256
  return this;
3186
3257
  }
3187
- }, Rr = class extends N {
3258
+ }, Gr = class extends e {
3188
3259
  getRegionsList(e, t, n) {
3189
- return this.getTypedPaginated(he, "/internal/users/regions", e, t, n);
3260
+ return this.getTypedPaginated(ye, "/internal/users/regions", e, t, n);
3190
3261
  }
3191
3262
  getRegion(e) {
3192
- return this.get(`/internal/users/regions/${e}`, {}, (e) => new Ir(e.data));
3263
+ return this.get(`/internal/users/regions/${e}`, {}, (e) => new Ur(e.data));
3193
3264
  }
3194
3265
  createRegion(e, t = {}) {
3195
- return this.post("/internal/users/regions", e, (e) => new Ir(e.data), t);
3266
+ return this.post("/internal/users/regions", e, (e) => new Ur(e.data), t);
3196
3267
  }
3197
3268
  updateRegion(e, t, n = {}) {
3198
- return this.patch(`/internal/users/regions/${e}`, t, (e) => new Ir(e.data), n);
3269
+ return this.patch(`/internal/users/regions/${e}`, t, (e) => new Ur(e.data), n);
3199
3270
  }
3200
3271
  removeRegion(e) {
3201
3272
  return this.delete(`/internal/users/regions/${e}`);
3202
3273
  }
3203
3274
  getRegionEmployees(e) {
3204
- return this.getTypedList(Fr, `/internal/users/regions/${e}/users`);
3275
+ return this.getTypedList(Hr, `/internal/users/regions/${e}/users`);
3205
3276
  }
3206
3277
  attachRegionEmployee(e, t, n) {
3207
- return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Fr(e.data));
3278
+ return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Hr(e.data));
3208
3279
  }
3209
3280
  detachRegionEmployee(e, t, n) {
3210
3281
  return this.request({
@@ -3215,4 +3286,4 @@ var qn = class e {
3215
3286
  }
3216
3287
  };
3217
3288
  //#endregion
3218
- export { jr as AddressQualityEnum, Mr as AddressQualityHelper, sn as BankAccount, N as BasePaginationProvider, ct as BlogPost, at as BlogPostMediaFile, it as BlogPostMediaTypeEnum, ot as BlogPostPublicationStatusEnum, st as BlogPostShortInfo, lt as BlogPostsListFilters, pt as BlogProvider, Dt as CalculationTypeEnum, Y as CalendarHelper, B as Cart, Et as CartProvider, Kt as CatalogProvider, yt as CatalogableItem, V as Category, Gt as CategoryFilter, Ut as CategoryFilterSetting, Wt as CategoryFilterValue, Vt as CategoryPricingRule, gn as Client, yn as ClientAdditionalData, hn as ClientBaseInfo, At as ClientCategory, Sn as ClientDataProvider, Rt as ClientPriceCatalogableItem, Bt as ClientPriceCategory, zt as ClientPriceProduct, qt as ClientPriceProvider, Jt as ClientPriceTemplateProvider, R as ClientProduct, Zt as ClientProductCategoryDataProvider, Qt as ClientProductDataProvider, H as ClientShortInfo, on as ClientsAdditionalDataRequestTypeEnum, _n as ClientsListFilters, I as CodedIdentity, En as ConfiguratorProvider, Tn as ConfiguratorsEnum, cn as Contact, q as ContactPerson, xn as ContactPersonRelated, bn as ContactRelation, ln as ContragentBase, mn as ContragentFactory, dn as ContragentIc, un as ContragentPerson, pn as ContragentUlNr, fn as ContragentUlR, Ct as CostSourceEnum, A as CreatableIdentity, Pt as Curator, Nr as DataSuggestionProvider, Nn as DateTimeProvider, Ft as DeletableIdentity, mt as DeletableNamedIdentity, J as DeliveryAddress, Bn as Discount, In as DiscountClient, Vn as DiscountClientEligibility, Ln as DiscountConditions, Un as DiscountProvider, ht as DiscountShortInfo, Rn as DiscountStateEnum, zn as DiscountStateHelper, Hn as DiscountsListFilters, X as Faq, Wn as FaqGroup, Gn as FaqProvider, ft as FilterGroup, dt as FilterItem, ut as FilterOpEnum, Ht as FilterSettings, bt as HiddenCatalogableItem, xt as Image, Jn as ManagerDataFactory, Er as MetaTagItem, Z as Offer, Xn as OfferActualization, Yn as OfferActualizationStatus, rr as OfferHelper, Zn as OfferShortInfo, nr as OffersDataProvider, $n as OffersListFilters, Q as Order, ir as OrderAction, ar as OrderEditorData, er as OrderInfo, tr as OrderItem, wt as OrderItemBase, vn as OrderShortInfo, sr as OrderStatusHistoryInfo, cr as OrdersDataProvider, or as OrdersListFilters, j as PaginationFiltersBase, ur as PriceAnalyze, pr as PriceAnalyzeProvider, jt as PriceCatalogableItem, gr as PriceHistoryDataProvider, mr as PriceHistoryItem, F as PriceTemplate, Nt as PriceTemplateCategory, U as PriceTemplateClient, Mt as PriceTemplateICatalogableItem, It as PriceTemplateProduct, $t as PriceTemplateProvider, K as PricingRole, en as PricingRoleProvider, St as PrimaryCatalogableItem, L as Product, Yt as ProductCategoryDataProvider, Xt as ProductDataProvider, Ot as ProductFilterTypeEnum, gt as ProductPriceCoefficient, hr as ProductPriceHistory, vt as ProductUnit, Qn as ProfstroyOfferItem, tn as PropertiesProvider, W as Property, G as PropertyValue, yr as Reclamation, _r as ReclamationItem, Sr as ReclamationProvider, vr as ReclamationShortInfo, $ as ReclamationStatusEnum, xr as ReclamationStatusHelper, br as ReclamationsListFilters, wr as RecommendationsDataProvider, Cr as RecommendationsList, Tr as ReferenceDataFactory, Pn as STANDARD_PERIOD_GROUPS, Fn as STANDARD_PERIOD_SECTIONS, kr as SearchProductStatistic, Dr as Seo, Or as SeoDataProvider, Ar as StatisticsProvider, _t as StockCount, On as TableDataPagination, Dn as TableDataPaginationRequestParams, kn as TableDataSortRequestParams, nn as TemplateProductCategoryDataProvider, Lt as TemplatesListFilters, qn as UnitsHelper, Cn as UnknownClientDataProvider, Pr as UserAuthDataProvider, Ir as UserRegion, Fr as UserRegionEmployee, Rr as UserRegionProvider, Lr as UserRegionsListFilters, P as UserShortInfo, wn as VersionConfig, lr as currentOrderInjectionKey, An as daysAgoIso, rn as findCatalogItemByIdRecursive, an as flattenCatalogItems, Kn as formatPercentChange, Mn as formatRelativeDate, jn as pluralize };
3289
+ export { Rr as AddressQualityEnum, zr as AddressQualityHelper, sn as BankAccount, dt as BlogPost, ct as BlogPostMediaFile, st as BlogPostMediaTypeEnum, lt as BlogPostPublicationStatusEnum, ut as BlogPostShortInfo, ft as BlogPostsListFilters, pt as BlogProvider, Dt as CalculationTypeEnum, X as CalendarHelper, V as Cart, Et as CartProvider, Kt as CatalogProvider, yt as CatalogableItem, H as Category, Gt as CategoryFilter, Ut as CategoryFilterSetting, Wt as CategoryFilterValue, Vt as CategoryPricingRule, gn as Client, yn as ClientAdditionalData, hn as ClientBaseInfo, At as ClientCategory, Sn as ClientDataProvider, Rt as ClientPriceCatalogableItem, Bt as ClientPriceCategory, zt as ClientPriceProduct, qt as ClientPriceProvider, Jt as ClientPriceTemplateProvider, z as ClientProduct, Zt as ClientProductCategoryDataProvider, Qt as ClientProductDataProvider, U as ClientShortInfo, on as ClientsAdditionalDataRequestTypeEnum, _n as ClientsListFilters, L as CodedIdentity, En as ConfiguratorProvider, Tn as ConfiguratorsEnum, cn as Contact, J as ContactPerson, xn as ContactPersonRelated, bn as ContactRelation, ln as ContragentBase, mn as ContragentFactory, dn as ContragentIc, un as ContragentPerson, pn as ContragentUlNr, fn as ContragentUlR, Ct as CostSourceEnum, M as CreatableIdentity, Pt as Curator, Br as DataSuggestionProvider, Nn as DateTimeProvider, Ft as DeletableIdentity, mt as DeletableNamedIdentity, Y as DeliveryAddress, Bn as Discount, In as DiscountClient, Vn as DiscountClientEligibility, Ln as DiscountConditions, Un as DiscountProvider, ht as DiscountShortInfo, Rn as DiscountStateEnum, zn as DiscountStateHelper, Hn as DiscountsListFilters, Gn as Faq, Wn as FaqGroup, Kn as FaqProvider, Ht as FilterSettings, bt as HiddenCatalogableItem, xt as Image, Yn as ManagerDataFactory, Zn as ManagerProvider, Xn as ManagersListFilters, Nr as MetaTagItem, Z as Offer, $n as OfferActualization, Qn as OfferActualizationStatus, or as OfferHelper, er as OfferShortInfo, ar as OffersDataProvider, nr as OffersListFilters, cr as OperatorFullInfo, ur as OperatorProvider, sr as OperatorShortInfo, lr as OperatorsListFilters, Q as Order, dr as OrderAction, fr as OrderEditorData, rr as OrderInfo, ir as OrderItem, wt as OrderItemBase, vn as OrderShortInfo, mr as OrderStatusHistoryInfo, hr as OrdersDataProvider, pr as OrdersListFilters, N as PaginationFiltersBase, _r as PriceAnalyze, br as PriceAnalyzeProvider, jt as PriceCatalogableItem, Cr as PriceHistoryDataProvider, xr as PriceHistoryItem, I as PriceTemplate, Nt as PriceTemplateCategory, W as PriceTemplateClient, Mt as PriceTemplateICatalogableItem, It as PriceTemplateProduct, $t as PriceTemplateProvider, q as PricingRole, en as PricingRoleProvider, St as PrimaryCatalogableItem, R as Product, Yt as ProductCategoryDataProvider, Xt as ProductDataProvider, Ot as ProductFilterTypeEnum, gt as ProductPriceCoefficient, Sr as ProductPriceHistory, vt as ProductUnit, tr as ProfstroyOfferItem, tn as PropertiesProvider, G as Property, K as PropertyValue, Er as Reclamation, wr as ReclamationItem, kr as ReclamationProvider, Tr as ReclamationShortInfo, $ as ReclamationStatusEnum, Or as ReclamationStatusHelper, Dr as ReclamationsListFilters, jr as RecommendationsDataProvider, Ar as RecommendationsList, Mr as ReferenceDataFactory, Pn as STANDARD_PERIOD_GROUPS, Fn as STANDARD_PERIOD_SECTIONS, Ir as SearchProductStatistic, Pr as Seo, Fr as SeoDataProvider, Lr as StatisticsProvider, _t as StockCount, On as TableDataPagination, Dn as TableDataPaginationRequestParams, kn as TableDataSortRequestParams, nn as TemplateProductCategoryDataProvider, Lt as TemplatesListFilters, Jn as UnitsHelper, Cn as UnknownClientDataProvider, Vr as UserAuthDataProvider, Ur as UserRegion, Hr as UserRegionEmployee, Gr as UserRegionProvider, Wr as UserRegionsListFilters, F as UserShortInfo, wn as VersionConfig, gr as currentOrderInjectionKey, An as daysAgoIso, rn as findCatalogItemByIdRecursive, an as flattenCatalogItems, qn as formatPercentChange, Mn as formatRelativeDate, jn as pluralize };