@socotra/ec-react-utils 2.2.5-alpha.1 → 2.2.5-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,429 +1,429 @@
1
- const X = (n) => {
2
- const { data: e, scope: r, dataTypes: $, rootDisplayName: b, account: g, quote: w, element: h } = n, V = [];
3
- let P = {};
4
- const B = Object.fromEntries(
1
+ const q = (t) => {
2
+ const { data: e, scope: i, dataTypes: f, rootDisplayName: v, account: d, quote: $, element: m } = t, M = [];
3
+ let k = {};
4
+ const V = Object.fromEntries(
5
5
  Object.entries(e ?? {}).filter(([, p]) => {
6
- var O;
7
- const l = (O = p.scope) == null ? void 0 : O.split(",").map((L) => L.trim());
8
- return !!(!l || r === "P" && (l != null && l.includes("P")) || l != null && l.includes("Q") || r === "Q" && (l != null && l.includes("Q")));
9
- }).map(([p, l]) => {
10
- var A, R, u, a, t, s, i, c, f, m, v, D, T, S, Q, N, H;
11
- let O = !1, L = !1, z = !1;
12
- const U = l.displayName ?? p, Z = (A = l.type) == null ? void 0 : A.slice(-1), E = l.maxLength, C = l.minLength, k = l.max, _ = l.min, F = l.regex;
13
- let o = l.type ?? "", j;
6
+ var T;
7
+ const r = (T = p.scope) == null ? void 0 : T.split(",").map((Y) => Y.trim());
8
+ return !!(!r || i === "P" && (r != null && r.includes("P")) || r != null && r.includes("Q") || i === "Q" && (r != null && r.includes("Q")));
9
+ }).map(([p, r]) => {
10
+ var H, z, u, a, n, c, s, o, l, g, D, x, O, S, Q, N, C;
11
+ let T = !1, Y = !1, W = !1;
12
+ const J = r.displayName ?? p, Z = (H = r.type) == null ? void 0 : H.slice(-1), A = r.maxLength, B = r.minLength, _ = r.max, j = r.min, F = r.regex;
13
+ let h = r.type ?? "", L;
14
14
  switch (Z) {
15
15
  case "*":
16
- L = !0, O = !0, o = o == null ? void 0 : o.split("*")[0];
16
+ Y = !0, T = !0, h = h == null ? void 0 : h.split("*")[0];
17
17
  break;
18
18
  case "?":
19
- o = o == null ? void 0 : o.split("?")[0], O = !0;
19
+ h = h == null ? void 0 : h.split("?")[0], T = !0;
20
20
  break;
21
21
  case "+":
22
- L = !0, o = o == null ? void 0 : o.split("+")[0];
22
+ Y = !0, h = h == null ? void 0 : h.split("+")[0];
23
23
  break;
24
24
  case "!":
25
- o = o == null ? void 0 : o.split("!")[0];
25
+ h = h == null ? void 0 : h.split("!")[0];
26
26
  break;
27
27
  }
28
- switch (o) {
28
+ switch (h) {
29
29
  case "string":
30
- o = "string";
30
+ h = "string";
31
31
  break;
32
32
  case "int":
33
33
  case "long":
34
- o = "integer";
34
+ h = "integer";
35
35
  break;
36
36
  case "decimal":
37
- o = "number";
37
+ h = "number";
38
38
  break;
39
39
  case "dateTime":
40
40
  case "datetime":
41
- o = "string", j = "date-time";
41
+ h = "string", L = "date-time";
42
42
  break;
43
43
  case "date":
44
- o = "string", j = "date";
44
+ h = "string", L = "date";
45
45
  break;
46
46
  case "boolean":
47
47
  case "bool":
48
- o = "boolean";
48
+ h = "boolean";
49
49
  break;
50
50
  default:
51
- z = !0;
51
+ W = !0;
52
52
  break;
53
53
  }
54
- if (!O && !z && !L && V.push(p), z) {
55
- const x = $ == null ? void 0 : $[o];
56
- if (x) {
57
- let M = L ? [] : {};
58
- const I = X({
59
- data: x.data ?? {},
60
- scope: r,
61
- dataTypes: $,
62
- rootDisplayName: x.displayName ?? p
54
+ if (!T && !W && !Y && M.push(p), W) {
55
+ const P = f == null ? void 0 : f[h];
56
+ if (P) {
57
+ let w = Y ? [] : {};
58
+ const I = q({
59
+ data: P.data ?? {},
60
+ scope: i,
61
+ dataTypes: f,
62
+ rootDisplayName: P.displayName ?? p
63
63
  });
64
- return w && (u = (R = w.element) == null ? void 0 : R.data) != null && u[p] && (M = (t = (a = w.element) == null ? void 0 : a.data) == null ? void 0 : t[p]), h && (s = h == null ? void 0 : h.data) != null && s[p] && (M = (i = h == null ? void 0 : h.data) == null ? void 0 : i[p]), g && (c = g == null ? void 0 : g.data) != null && c[p] && (M = (f = g == null ? void 0 : g.data) == null ? void 0 : f[p]), P = {
65
- ...P,
66
- [`${o}`]: I
67
- }, L ? [
64
+ return $ && (u = (z = $.element) == null ? void 0 : z.data) != null && u[p] && (w = (n = (a = $.element) == null ? void 0 : a.data) == null ? void 0 : n[p]), m && (c = m == null ? void 0 : m.data) != null && c[p] && (w = (s = m == null ? void 0 : m.data) == null ? void 0 : s[p]), d && (o = d == null ? void 0 : d.data) != null && o[p] && (w = (l = d == null ? void 0 : d.data) == null ? void 0 : l[p]), k = {
65
+ ...k,
66
+ [`${h}`]: I
67
+ }, Y ? [
68
68
  p,
69
69
  {
70
- title: x.displayName ?? p,
70
+ title: P.displayName ?? p,
71
71
  type: "array",
72
- default: M,
72
+ default: w,
73
73
  items: {
74
- $ref: `#/definitions/${o}`
74
+ $ref: `#/definitions/${h}`
75
75
  },
76
- ...!O && { minItems: 1 }
76
+ ...!T && { minItems: 1 }
77
77
  }
78
78
  ] : [
79
79
  p,
80
80
  {
81
- title: x.displayName ?? p,
82
- default: M,
83
- $ref: `#/definitions/${o}`
81
+ title: P.displayName ?? p,
82
+ default: w,
83
+ $ref: `#/definitions/${h}`
84
84
  }
85
85
  ];
86
86
  }
87
87
  }
88
- let y = "";
89
- if (g) {
90
- const x = (g == null ? void 0 : g.state) === "validated" ? p.charAt(0).toLowerCase() + p.slice(1) : p;
91
- y = (m = g == null ? void 0 : g.data) != null && m[x] ? (v = g == null ? void 0 : g.data) == null ? void 0 : v[x] : o === "boolean" ? !!l.defaultValue : l.defaultValue;
88
+ let b = "";
89
+ if (d) {
90
+ const P = (d == null ? void 0 : d.state) === "validated" ? p.charAt(0).toLowerCase() + p.slice(1) : p;
91
+ b = (g = d == null ? void 0 : d.data) != null && g[P] ? (D = d == null ? void 0 : d.data) == null ? void 0 : D[P] : h === "boolean" ? !!r.defaultValue : r.defaultValue;
92
92
  }
93
- return w && (y = (T = (D = w.element) == null ? void 0 : D.data) != null && T[p] ? (Q = (S = w.element) == null ? void 0 : S.data) == null ? void 0 : Q[p] : o === "boolean" ? !!l.defaultValue : l.defaultValue), h && (y = (N = h == null ? void 0 : h.data) != null && N[p] ? (H = h == null ? void 0 : h.data) == null ? void 0 : H[p] : o === "boolean" ? !!l.defaultValue : l.defaultValue), L ? [
93
+ return $ && (b = (O = (x = $.element) == null ? void 0 : x.data) != null && O[p] ? (Q = (S = $.element) == null ? void 0 : S.data) == null ? void 0 : Q[p] : h === "boolean" ? !!r.defaultValue : r.defaultValue), m && (b = (N = m == null ? void 0 : m.data) != null && N[p] ? (C = m == null ? void 0 : m.data) == null ? void 0 : C[p] : h === "boolean" ? !!r.defaultValue : r.defaultValue), Y ? [
94
94
  p,
95
95
  {
96
- title: U,
96
+ title: J,
97
97
  type: "array",
98
- default: y,
98
+ default: b,
99
99
  items: {
100
- type: o,
101
- ...E && { maxLength: E },
102
- ...C && { minLength: C },
103
- ..._ && { min: _ },
104
- ...k && { max: k },
105
- ...j && { format: j },
106
- ...F && { pattern: l.regex }
100
+ type: h,
101
+ ...A && { maxLength: A },
102
+ ...B && { minLength: B },
103
+ ...j && { min: j },
104
+ ..._ && { max: _ },
105
+ ...L && { format: L },
106
+ ...F && { pattern: r.regex }
107
107
  },
108
- ...!O && { minItems: 1 }
108
+ ...!T && { minItems: 1 }
109
109
  }
110
110
  ] : [
111
111
  p,
112
112
  {
113
- title: U,
114
- type: o,
115
- ...y && { default: y },
116
- ...C && { minLength: C },
117
- ...E && { maxLength: E },
118
- ..._ && { minimum: parseInt(_) },
119
- ...k && { maximum: parseInt(k) },
120
- ...j && { format: j },
121
- ...l.options && { enum: l.options },
122
- ...F && { pattern: l.regex }
113
+ title: J,
114
+ type: h,
115
+ ...b && { default: b },
116
+ ...B && { minLength: B },
117
+ ...A && { maxLength: A },
118
+ ...j && { minimum: parseInt(j) },
119
+ ..._ && { maximum: parseInt(_) },
120
+ ...L && { format: L },
121
+ ...r.options && { enum: r.options },
122
+ ...F && { pattern: r.regex }
123
123
  }
124
124
  ];
125
125
  })
126
126
  );
127
127
  return {
128
- title: b,
128
+ title: v,
129
129
  type: "object",
130
- definitions: P,
131
- required: V,
132
- properties: B
130
+ definitions: k,
131
+ required: M,
132
+ properties: V
133
133
  };
134
- }, ae = (n) => {
135
- const e = n.autoValidate, r = n.delinquencyPlanName, $ = n.accountType, b = Object.keys(n).reduce(
136
- (w, h) => (h !== "accountType" && h !== "autoValidate" && h !== "delinquencyPlanName" && (w[h] = n[h]), w),
134
+ }, oe = (t) => {
135
+ const e = t.autoValidate, i = t.delinquencyPlanName, f = t.accountType, v = Object.keys(t).reduce(
136
+ ($, m) => (m !== "accountType" && m !== "autoValidate" && m !== "delinquencyPlanName" && ($[m] = t[m]), $),
137
137
  {}
138
138
  );
139
139
  return {
140
140
  autoValidate: e,
141
- delinquencyPlanName: r,
142
- type: $,
143
- data: b
141
+ delinquencyPlanName: i,
142
+ type: f,
143
+ data: v
144
144
  };
145
- }, se = ({
146
- formData: n,
145
+ }, le = ({
146
+ formData: t,
147
147
  locator: e
148
148
  }) => ({
149
149
  elements: [{
150
150
  locator: e,
151
- setData: n
151
+ setData: t
152
152
  }]
153
153
  });
154
- var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
155
- function ee(n) {
156
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
154
+ var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
155
+ function te(t) {
156
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
157
157
  }
158
158
  var K = { exports: {} };
159
- (function(n, e) {
160
- (function(r, $) {
161
- n.exports = $();
162
- })(q, function() {
163
- var r = 1e3, $ = 6e4, b = 36e5, g = "millisecond", w = "second", h = "minute", V = "hour", P = "day", B = "week", Y = "month", p = "quarter", l = "year", O = "date", L = "Invalid Date", z = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, U = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
164
- var a = ["th", "st", "nd", "rd"], t = u % 100;
165
- return "[" + u + (a[(t - 20) % 10] || a[t] || a[0]) + "]";
166
- } }, E = function(u, a, t) {
167
- var s = String(u);
168
- return !s || s.length >= a ? u : "" + Array(a + 1 - s.length).join(t) + u;
169
- }, C = { s: E, z: function(u) {
170
- var a = -u.utcOffset(), t = Math.abs(a), s = Math.floor(t / 60), i = t % 60;
171
- return (a <= 0 ? "+" : "-") + E(s, 2, "0") + ":" + E(i, 2, "0");
172
- }, m: function u(a, t) {
173
- if (a.date() < t.date())
174
- return -u(t, a);
175
- var s = 12 * (t.year() - a.year()) + (t.month() - a.month()), i = a.clone().add(s, Y), c = t - i < 0, f = a.clone().add(s + (c ? -1 : 1), Y);
176
- return +(-(s + (t - i) / (c ? i - f : f - i)) || 0);
159
+ (function(t, e) {
160
+ (function(i, f) {
161
+ t.exports = f();
162
+ })(ee, function() {
163
+ var i = 1e3, f = 6e4, v = 36e5, d = "millisecond", $ = "second", m = "minute", M = "hour", k = "day", V = "week", E = "month", p = "quarter", r = "year", T = "date", Y = "Invalid Date", W = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
164
+ var a = ["th", "st", "nd", "rd"], n = u % 100;
165
+ return "[" + u + (a[(n - 20) % 10] || a[n] || a[0]) + "]";
166
+ } }, A = function(u, a, n) {
167
+ var c = String(u);
168
+ return !c || c.length >= a ? u : "" + Array(a + 1 - c.length).join(n) + u;
169
+ }, B = { s: A, z: function(u) {
170
+ var a = -u.utcOffset(), n = Math.abs(a), c = Math.floor(n / 60), s = n % 60;
171
+ return (a <= 0 ? "+" : "-") + A(c, 2, "0") + ":" + A(s, 2, "0");
172
+ }, m: function u(a, n) {
173
+ if (a.date() < n.date())
174
+ return -u(n, a);
175
+ var c = 12 * (n.year() - a.year()) + (n.month() - a.month()), s = a.clone().add(c, E), o = n - s < 0, l = a.clone().add(c + (o ? -1 : 1), E);
176
+ return +(-(c + (n - s) / (o ? s - l : l - s)) || 0);
177
177
  }, a: function(u) {
178
178
  return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
179
179
  }, p: function(u) {
180
- return { M: Y, y: l, w: B, d: P, D: O, h: V, m: h, s: w, ms: g, Q: p }[u] || String(u || "").toLowerCase().replace(/s$/, "");
180
+ return { M: E, y: r, w: V, d: k, D: T, h: M, m, s: $, ms: d, Q: p }[u] || String(u || "").toLowerCase().replace(/s$/, "");
181
181
  }, u: function(u) {
182
182
  return u === void 0;
183
- } }, k = "en", _ = {};
184
- _[k] = Z;
185
- var F = "$isDayjsObject", o = function(u) {
186
- return u instanceof A || !(!u || !u[F]);
187
- }, j = function u(a, t, s) {
188
- var i;
183
+ } }, _ = "en", j = {};
184
+ j[_] = Z;
185
+ var F = "$isDayjsObject", h = function(u) {
186
+ return u instanceof H || !(!u || !u[F]);
187
+ }, L = function u(a, n, c) {
188
+ var s;
189
189
  if (!a)
190
- return k;
190
+ return _;
191
191
  if (typeof a == "string") {
192
- var c = a.toLowerCase();
193
- _[c] && (i = c), t && (_[c] = t, i = c);
194
- var f = a.split("-");
195
- if (!i && f.length > 1)
196
- return u(f[0]);
192
+ var o = a.toLowerCase();
193
+ j[o] && (s = o), n && (j[o] = n, s = o);
194
+ var l = a.split("-");
195
+ if (!s && l.length > 1)
196
+ return u(l[0]);
197
197
  } else {
198
- var m = a.name;
199
- _[m] = a, i = m;
198
+ var g = a.name;
199
+ j[g] = a, s = g;
200
200
  }
201
- return !s && i && (k = i), i || !s && k;
202
- }, y = function(u, a) {
203
- if (o(u))
201
+ return !c && s && (_ = s), s || !c && _;
202
+ }, b = function(u, a) {
203
+ if (h(u))
204
204
  return u.clone();
205
- var t = typeof a == "object" ? a : {};
206
- return t.date = u, t.args = arguments, new A(t);
207
- }, d = C;
208
- d.l = j, d.i = o, d.w = function(u, a) {
209
- return y(u, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
205
+ var n = typeof a == "object" ? a : {};
206
+ return n.date = u, n.args = arguments, new H(n);
207
+ }, y = B;
208
+ y.l = L, y.i = h, y.w = function(u, a) {
209
+ return b(u, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
210
210
  };
211
- var A = function() {
212
- function u(t) {
213
- this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[F] = !0;
211
+ var H = function() {
212
+ function u(n) {
213
+ this.$L = L(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[F] = !0;
214
214
  }
215
215
  var a = u.prototype;
216
- return a.parse = function(t) {
217
- this.$d = function(s) {
218
- var i = s.date, c = s.utc;
219
- if (i === null)
216
+ return a.parse = function(n) {
217
+ this.$d = function(c) {
218
+ var s = c.date, o = c.utc;
219
+ if (s === null)
220
220
  return /* @__PURE__ */ new Date(NaN);
221
- if (d.u(i))
221
+ if (y.u(s))
222
222
  return /* @__PURE__ */ new Date();
223
- if (i instanceof Date)
224
- return new Date(i);
225
- if (typeof i == "string" && !/Z$/i.test(i)) {
226
- var f = i.match(z);
227
- if (f) {
228
- var m = f[2] - 1 || 0, v = (f[7] || "0").substring(0, 3);
229
- return c ? new Date(Date.UTC(f[1], m, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, v)) : new Date(f[1], m, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, v);
223
+ if (s instanceof Date)
224
+ return new Date(s);
225
+ if (typeof s == "string" && !/Z$/i.test(s)) {
226
+ var l = s.match(W);
227
+ if (l) {
228
+ var g = l[2] - 1 || 0, D = (l[7] || "0").substring(0, 3);
229
+ return o ? new Date(Date.UTC(l[1], g, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, D)) : new Date(l[1], g, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, D);
230
230
  }
231
231
  }
232
- return new Date(i);
233
- }(t), this.init();
232
+ return new Date(s);
233
+ }(n), this.init();
234
234
  }, a.init = function() {
235
- var t = this.$d;
236
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
235
+ var n = this.$d;
236
+ this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
237
237
  }, a.$utils = function() {
238
- return d;
238
+ return y;
239
239
  }, a.isValid = function() {
240
- return this.$d.toString() !== L;
241
- }, a.isSame = function(t, s) {
242
- var i = y(t);
243
- return this.startOf(s) <= i && i <= this.endOf(s);
244
- }, a.isAfter = function(t, s) {
245
- return y(t) < this.startOf(s);
246
- }, a.isBefore = function(t, s) {
247
- return this.endOf(s) < y(t);
248
- }, a.$g = function(t, s, i) {
249
- return d.u(t) ? this[s] : this.set(i, t);
240
+ return this.$d.toString() !== Y;
241
+ }, a.isSame = function(n, c) {
242
+ var s = b(n);
243
+ return this.startOf(c) <= s && s <= this.endOf(c);
244
+ }, a.isAfter = function(n, c) {
245
+ return b(n) < this.startOf(c);
246
+ }, a.isBefore = function(n, c) {
247
+ return this.endOf(c) < b(n);
248
+ }, a.$g = function(n, c, s) {
249
+ return y.u(n) ? this[c] : this.set(s, n);
250
250
  }, a.unix = function() {
251
251
  return Math.floor(this.valueOf() / 1e3);
252
252
  }, a.valueOf = function() {
253
253
  return this.$d.getTime();
254
- }, a.startOf = function(t, s) {
255
- var i = this, c = !!d.u(s) || s, f = d.p(t), m = function(x, M) {
256
- var I = d.w(i.$u ? Date.UTC(i.$y, M, x) : new Date(i.$y, M, x), i);
257
- return c ? I : I.endOf(P);
258
- }, v = function(x, M) {
259
- return d.w(i.toDate()[x].apply(i.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(M)), i);
260
- }, D = this.$W, T = this.$M, S = this.$D, Q = "set" + (this.$u ? "UTC" : "");
261
- switch (f) {
262
- case l:
263
- return c ? m(1, 0) : m(31, 11);
264
- case Y:
265
- return c ? m(1, T) : m(0, T + 1);
266
- case B:
267
- var N = this.$locale().weekStart || 0, H = (D < N ? D + 7 : D) - N;
268
- return m(c ? S - H : S + (6 - H), T);
269
- case P:
270
- case O:
271
- return v(Q + "Hours", 0);
254
+ }, a.startOf = function(n, c) {
255
+ var s = this, o = !!y.u(c) || c, l = y.p(n), g = function(P, w) {
256
+ var I = y.w(s.$u ? Date.UTC(s.$y, w, P) : new Date(s.$y, w, P), s);
257
+ return o ? I : I.endOf(k);
258
+ }, D = function(P, w) {
259
+ return y.w(s.toDate()[P].apply(s.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(w)), s);
260
+ }, x = this.$W, O = this.$M, S = this.$D, Q = "set" + (this.$u ? "UTC" : "");
261
+ switch (l) {
262
+ case r:
263
+ return o ? g(1, 0) : g(31, 11);
264
+ case E:
265
+ return o ? g(1, O) : g(0, O + 1);
272
266
  case V:
273
- return v(Q + "Minutes", 1);
274
- case h:
275
- return v(Q + "Seconds", 2);
276
- case w:
277
- return v(Q + "Milliseconds", 3);
267
+ var N = this.$locale().weekStart || 0, C = (x < N ? x + 7 : x) - N;
268
+ return g(o ? S - C : S + (6 - C), O);
269
+ case k:
270
+ case T:
271
+ return D(Q + "Hours", 0);
272
+ case M:
273
+ return D(Q + "Minutes", 1);
274
+ case m:
275
+ return D(Q + "Seconds", 2);
276
+ case $:
277
+ return D(Q + "Milliseconds", 3);
278
278
  default:
279
279
  return this.clone();
280
280
  }
281
- }, a.endOf = function(t) {
282
- return this.startOf(t, !1);
283
- }, a.$set = function(t, s) {
284
- var i, c = d.p(t), f = "set" + (this.$u ? "UTC" : ""), m = (i = {}, i[P] = f + "Date", i[O] = f + "Date", i[Y] = f + "Month", i[l] = f + "FullYear", i[V] = f + "Hours", i[h] = f + "Minutes", i[w] = f + "Seconds", i[g] = f + "Milliseconds", i)[c], v = c === P ? this.$D + (s - this.$W) : s;
285
- if (c === Y || c === l) {
286
- var D = this.clone().set(O, 1);
287
- D.$d[m](v), D.init(), this.$d = D.set(O, Math.min(this.$D, D.daysInMonth())).$d;
281
+ }, a.endOf = function(n) {
282
+ return this.startOf(n, !1);
283
+ }, a.$set = function(n, c) {
284
+ var s, o = y.p(n), l = "set" + (this.$u ? "UTC" : ""), g = (s = {}, s[k] = l + "Date", s[T] = l + "Date", s[E] = l + "Month", s[r] = l + "FullYear", s[M] = l + "Hours", s[m] = l + "Minutes", s[$] = l + "Seconds", s[d] = l + "Milliseconds", s)[o], D = o === k ? this.$D + (c - this.$W) : c;
285
+ if (o === E || o === r) {
286
+ var x = this.clone().set(T, 1);
287
+ x.$d[g](D), x.init(), this.$d = x.set(T, Math.min(this.$D, x.daysInMonth())).$d;
288
288
  } else
289
- m && this.$d[m](v);
289
+ g && this.$d[g](D);
290
290
  return this.init(), this;
291
- }, a.set = function(t, s) {
292
- return this.clone().$set(t, s);
293
- }, a.get = function(t) {
294
- return this[d.p(t)]();
295
- }, a.add = function(t, s) {
296
- var i, c = this;
297
- t = Number(t);
298
- var f = d.p(s), m = function(T) {
299
- var S = y(c);
300
- return d.w(S.date(S.date() + Math.round(T * t)), c);
291
+ }, a.set = function(n, c) {
292
+ return this.clone().$set(n, c);
293
+ }, a.get = function(n) {
294
+ return this[y.p(n)]();
295
+ }, a.add = function(n, c) {
296
+ var s, o = this;
297
+ n = Number(n);
298
+ var l = y.p(c), g = function(O) {
299
+ var S = b(o);
300
+ return y.w(S.date(S.date() + Math.round(O * n)), o);
301
301
  };
302
- if (f === Y)
303
- return this.set(Y, this.$M + t);
304
- if (f === l)
305
- return this.set(l, this.$y + t);
306
- if (f === P)
307
- return m(1);
308
- if (f === B)
309
- return m(7);
310
- var v = (i = {}, i[h] = $, i[V] = b, i[w] = r, i)[f] || 1, D = this.$d.getTime() + t * v;
311
- return d.w(D, this);
312
- }, a.subtract = function(t, s) {
313
- return this.add(-1 * t, s);
314
- }, a.format = function(t) {
315
- var s = this, i = this.$locale();
302
+ if (l === E)
303
+ return this.set(E, this.$M + n);
304
+ if (l === r)
305
+ return this.set(r, this.$y + n);
306
+ if (l === k)
307
+ return g(1);
308
+ if (l === V)
309
+ return g(7);
310
+ var D = (s = {}, s[m] = f, s[M] = v, s[$] = i, s)[l] || 1, x = this.$d.getTime() + n * D;
311
+ return y.w(x, this);
312
+ }, a.subtract = function(n, c) {
313
+ return this.add(-1 * n, c);
314
+ }, a.format = function(n) {
315
+ var c = this, s = this.$locale();
316
316
  if (!this.isValid())
317
- return i.invalidDate || L;
318
- var c = t || "YYYY-MM-DDTHH:mm:ssZ", f = d.z(this), m = this.$H, v = this.$m, D = this.$M, T = i.weekdays, S = i.months, Q = i.meridiem, N = function(M, I, J, G) {
319
- return M && (M[I] || M(s, c)) || J[I].slice(0, G);
320
- }, H = function(M) {
321
- return d.s(m % 12 || 12, M, "0");
322
- }, x = Q || function(M, I, J) {
323
- var G = M < 12 ? "AM" : "PM";
324
- return J ? G.toLowerCase() : G;
317
+ return s.invalidDate || Y;
318
+ var o = n || "YYYY-MM-DDTHH:mm:ssZ", l = y.z(this), g = this.$H, D = this.$m, x = this.$M, O = s.weekdays, S = s.months, Q = s.meridiem, N = function(w, I, R, U) {
319
+ return w && (w[I] || w(c, o)) || R[I].slice(0, U);
320
+ }, C = function(w) {
321
+ return y.s(g % 12 || 12, w, "0");
322
+ }, P = Q || function(w, I, R) {
323
+ var U = w < 12 ? "AM" : "PM";
324
+ return R ? U.toLowerCase() : U;
325
325
  };
326
- return c.replace(U, function(M, I) {
327
- return I || function(J) {
328
- switch (J) {
326
+ return o.replace(J, function(w, I) {
327
+ return I || function(R) {
328
+ switch (R) {
329
329
  case "YY":
330
- return String(s.$y).slice(-2);
330
+ return String(c.$y).slice(-2);
331
331
  case "YYYY":
332
- return d.s(s.$y, 4, "0");
332
+ return y.s(c.$y, 4, "0");
333
333
  case "M":
334
- return D + 1;
334
+ return x + 1;
335
335
  case "MM":
336
- return d.s(D + 1, 2, "0");
336
+ return y.s(x + 1, 2, "0");
337
337
  case "MMM":
338
- return N(i.monthsShort, D, S, 3);
338
+ return N(s.monthsShort, x, S, 3);
339
339
  case "MMMM":
340
- return N(S, D);
340
+ return N(S, x);
341
341
  case "D":
342
- return s.$D;
342
+ return c.$D;
343
343
  case "DD":
344
- return d.s(s.$D, 2, "0");
344
+ return y.s(c.$D, 2, "0");
345
345
  case "d":
346
- return String(s.$W);
346
+ return String(c.$W);
347
347
  case "dd":
348
- return N(i.weekdaysMin, s.$W, T, 2);
348
+ return N(s.weekdaysMin, c.$W, O, 2);
349
349
  case "ddd":
350
- return N(i.weekdaysShort, s.$W, T, 3);
350
+ return N(s.weekdaysShort, c.$W, O, 3);
351
351
  case "dddd":
352
- return T[s.$W];
352
+ return O[c.$W];
353
353
  case "H":
354
- return String(m);
354
+ return String(g);
355
355
  case "HH":
356
- return d.s(m, 2, "0");
356
+ return y.s(g, 2, "0");
357
357
  case "h":
358
- return H(1);
358
+ return C(1);
359
359
  case "hh":
360
- return H(2);
360
+ return C(2);
361
361
  case "a":
362
- return x(m, v, !0);
362
+ return P(g, D, !0);
363
363
  case "A":
364
- return x(m, v, !1);
364
+ return P(g, D, !1);
365
365
  case "m":
366
- return String(v);
366
+ return String(D);
367
367
  case "mm":
368
- return d.s(v, 2, "0");
368
+ return y.s(D, 2, "0");
369
369
  case "s":
370
- return String(s.$s);
370
+ return String(c.$s);
371
371
  case "ss":
372
- return d.s(s.$s, 2, "0");
372
+ return y.s(c.$s, 2, "0");
373
373
  case "SSS":
374
- return d.s(s.$ms, 3, "0");
374
+ return y.s(c.$ms, 3, "0");
375
375
  case "Z":
376
- return f;
376
+ return l;
377
377
  }
378
378
  return null;
379
- }(M) || f.replace(":", "");
379
+ }(w) || l.replace(":", "");
380
380
  });
381
381
  }, a.utcOffset = function() {
382
382
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
383
- }, a.diff = function(t, s, i) {
384
- var c, f = this, m = d.p(s), v = y(t), D = (v.utcOffset() - this.utcOffset()) * $, T = this - v, S = function() {
385
- return d.m(f, v);
383
+ }, a.diff = function(n, c, s) {
384
+ var o, l = this, g = y.p(c), D = b(n), x = (D.utcOffset() - this.utcOffset()) * f, O = this - D, S = function() {
385
+ return y.m(l, D);
386
386
  };
387
- switch (m) {
388
- case l:
389
- c = S() / 12;
387
+ switch (g) {
388
+ case r:
389
+ o = S() / 12;
390
390
  break;
391
- case Y:
392
- c = S();
391
+ case E:
392
+ o = S();
393
393
  break;
394
394
  case p:
395
- c = S() / 3;
395
+ o = S() / 3;
396
396
  break;
397
- case B:
398
- c = (T - D) / 6048e5;
397
+ case V:
398
+ o = (O - x) / 6048e5;
399
399
  break;
400
- case P:
401
- c = (T - D) / 864e5;
400
+ case k:
401
+ o = (O - x) / 864e5;
402
402
  break;
403
- case V:
404
- c = T / b;
403
+ case M:
404
+ o = O / v;
405
405
  break;
406
- case h:
407
- c = T / $;
406
+ case m:
407
+ o = O / f;
408
408
  break;
409
- case w:
410
- c = T / r;
409
+ case $:
410
+ o = O / i;
411
411
  break;
412
412
  default:
413
- c = T;
413
+ o = O;
414
414
  }
415
- return i ? c : d.a(c);
415
+ return s ? o : y.a(o);
416
416
  }, a.daysInMonth = function() {
417
- return this.endOf(Y).$D;
417
+ return this.endOf(E).$D;
418
418
  }, a.$locale = function() {
419
- return _[this.$L];
420
- }, a.locale = function(t, s) {
421
- if (!t)
419
+ return j[this.$L];
420
+ }, a.locale = function(n, c) {
421
+ if (!n)
422
422
  return this.$L;
423
- var i = this.clone(), c = j(t, s, !0);
424
- return c && (i.$L = c), i;
423
+ var s = this.clone(), o = L(n, c, !0);
424
+ return o && (s.$L = o), s;
425
425
  }, a.clone = function() {
426
- return d.w(this.$d, this);
426
+ return y.w(this.$d, this);
427
427
  }, a.toDate = function() {
428
428
  return new Date(this.valueOf());
429
429
  }, a.toJSON = function() {
@@ -433,91 +433,181 @@ var K = { exports: {} };
433
433
  }, a.toString = function() {
434
434
  return this.$d.toUTCString();
435
435
  }, u;
436
- }(), R = A.prototype;
437
- return y.prototype = R, [["$ms", g], ["$s", w], ["$m", h], ["$H", V], ["$W", P], ["$M", Y], ["$y", l], ["$D", O]].forEach(function(u) {
438
- R[u[1]] = function(a) {
436
+ }(), z = H.prototype;
437
+ return b.prototype = z, [["$ms", d], ["$s", $], ["$m", m], ["$H", M], ["$W", k], ["$M", E], ["$y", r], ["$D", T]].forEach(function(u) {
438
+ z[u[1]] = function(a) {
439
439
  return this.$g(a, u[0], u[1]);
440
440
  };
441
- }), y.extend = function(u, a) {
442
- return u.$i || (u(a, A, y), u.$i = !0), y;
443
- }, y.locale = j, y.isDayjs = o, y.unix = function(u) {
444
- return y(1e3 * u);
445
- }, y.en = _[k], y.Ls = _, y.p = {}, y;
441
+ }), b.extend = function(u, a) {
442
+ return u.$i || (u(a, H, b), u.$i = !0), b;
443
+ }, b.locale = L, b.isDayjs = h, b.unix = function(u) {
444
+ return b(1e3 * u);
445
+ }, b.en = j[_], b.Ls = j, b.p = {}, b;
446
446
  });
447
447
  })(K);
448
- var te = K.exports;
449
- const W = /* @__PURE__ */ ee(te), re = ({ data: n }) => {
450
- const e = {}, r = { ...n };
451
- return r.default && (r.default.startTime && (e.startTime = W(r.default.startTime).format()), r.default.endTime && (e.endTime = W(r.default.endTime).format()), r.default.expirationTime && (e.expirationTime = W(r.default.expirationTime).format())), r.advanced && (r.advanced.currency && (e.currency = r.advanced.currency), r.advanced.timezone && (e.timezone = r.advanced.timezone), r.advanced.billingPlan && (e.billingPlan = r.advanced.billingPlan), r.advanced.defaultTermDuration && (e.defaultTermDuration = r.advanced.defaultTermDuration), r.advanced.installmentPlan && (e.installmentPlan = r.advanced.installmentPlan), r.advanced.durationBasis && (e.durationBasis = r.advanced.durationBasis), r.advanced.delinquencyPlanName && (e.delinquencyPlanName = r.advanced.delinquencyPlanName)), delete r.default, delete r.advanced, e.setData = r, e;
452
- }, ne = (n) => {
453
- const e = /^(.*?)(Quote|QuickQuote|Policy)$/, r = n.match(e);
454
- return r && (r[2] === "Quote" || r[2] === "QuickQuote" || r[2] === "Policy") ? [r[1], r[2]] : [n, null];
448
+ var ne = K.exports;
449
+ const G = /* @__PURE__ */ te(ne), fe = ({ data: t }) => {
450
+ const e = {}, i = { ...t };
451
+ return i.default && (i.default.startTime && (e.startTime = G(i.default.startTime).format()), i.default.endTime && (e.endTime = G(i.default.endTime).format()), i.default.expirationTime && (e.expirationTime = G(i.default.expirationTime).format())), i.advanced && (i.advanced.currency && (e.currency = i.advanced.currency), i.advanced.timezone && (e.timezone = i.advanced.timezone), i.advanced.billingPlan && (e.billingPlan = i.advanced.billingPlan), i.advanced.defaultTermDuration && (e.defaultTermDuration = i.advanced.defaultTermDuration), i.advanced.installmentPlan && (e.installmentPlan = i.advanced.installmentPlan), i.advanced.durationBasis && (e.durationBasis = i.advanced.durationBasis), i.advanced.delinquencyPlanName && (e.delinquencyPlanName = i.advanced.delinquencyPlanName)), delete i.default, delete i.advanced, e.setData = i, e;
452
+ }, se = (t) => {
453
+ const e = /^(.*?)(Quote|QuickQuote|Policy)$/, i = t.match(e);
454
+ return i && (i[2] === "Quote" || i[2] === "QuickQuote" || i[2] === "Policy") ? [i[1], i[2]] : [t, null];
455
455
  };
456
- function ie(n, e) {
457
- if (n.locator === e)
458
- return n;
459
- if (n.elements)
460
- for (const r of n.elements) {
461
- const $ = ie(r, e);
462
- if ($)
463
- return $;
456
+ function ie(t, e) {
457
+ if (t.locator === e)
458
+ return t;
459
+ if (t.elements)
460
+ for (const i of t.elements) {
461
+ const f = ie(i, e);
462
+ if (f)
463
+ return f;
464
464
  }
465
465
  }
466
- function ue(n, e) {
467
- const [r] = ne(
468
- n.type ?? ""
466
+ function de(t, e) {
467
+ const [i] = se(
468
+ t.type ?? ""
469
469
  );
470
- let $ = {};
471
- return e.exposures && Object.keys(e.exposures).forEach((b) => {
472
- b === r && e.exposures && ($ = e.exposures[b]);
473
- }), e.coverages && Object.keys(e.coverages).forEach((b) => {
474
- b === r && e.coverages && ($ = e.coverages[b]);
475
- }), e.policyLines && Object.keys(e.policyLines).forEach((b) => {
476
- b === r && e.policyLines && ($ = e.policyLines[b]);
477
- }), e.exposureGroups && Object.keys(e.exposureGroups).forEach((b) => {
478
- b === r && e.exposureGroups && ($ = e.exposureGroups[b]);
479
- }), $;
470
+ let f = {};
471
+ return e.exposures && Object.keys(e.exposures).forEach((v) => {
472
+ v === i && e.exposures && (f = e.exposures[v]);
473
+ }), e.coverages && Object.keys(e.coverages).forEach((v) => {
474
+ v === i && e.coverages && (f = e.coverages[v]);
475
+ }), e.policyLines && Object.keys(e.policyLines).forEach((v) => {
476
+ v === i && e.policyLines && (f = e.policyLines[v]);
477
+ }), e.exposureGroups && Object.keys(e.exposureGroups).forEach((v) => {
478
+ v === i && e.exposureGroups && (f = e.exposureGroups[v]);
479
+ }), f;
480
480
  }
481
- function ce(n) {
482
- return n == null ? void 0 : n.map((e) => (e.keyword === "pattern" && (e.message = `Invalid format, must match pattern ${e.params.pattern}`), e.keyword === "format" && (e.message = "Invalid format"), e.keyword === "required" && (e.message = "Required"), e.keyword === "minItems" && (e.message = `Must have at least ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "maxItems" && (e.message = `Must have at most ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "type" && (e.message = "Invalid format"), e.keyword === "maxLength" && (e.message = `Must be at most ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minLength" && (e.message = `Must be at least ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minimum" && (e.message = `Must be greater than or equal to ${e.params.limit}`), e.keyword === "maximum" && (e.message = `Must be less than or equal to ${e.params.limit}`), e.keyword === "enum" && (e.message = "Invalid value"), e));
481
+ function me(t) {
482
+ return t == null ? void 0 : t.map((e) => (e.keyword === "pattern" && (e.message = `Invalid format, must match pattern ${e.params.pattern}`), e.keyword === "format" && (e.message = "Invalid format"), e.keyword === "required" && (e.message = "Required"), e.keyword === "minItems" && (e.message = `Must have at least ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "maxItems" && (e.message = `Must have at most ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "type" && (e.message = "Invalid format"), e.keyword === "maxLength" && (e.message = `Must be at most ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minLength" && (e.message = `Must be at least ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minimum" && (e.message = `Must be greater than or equal to ${e.params.limit}`), e.keyword === "maximum" && (e.message = `Must be less than or equal to ${e.params.limit}`), e.keyword === "enum" && (e.message = "Invalid value"), e));
483
483
  }
484
- const fe = (n) => {
485
- var e, r, $, b, g, w;
484
+ const he = (t) => {
485
+ var e, i, f, v, d, $;
486
486
  return {
487
- ...((e = n == null ? void 0 : n.element) == null ? void 0 : e.data) && {
488
- ...(r = n == null ? void 0 : n.element) == null ? void 0 : r.data
487
+ ...((e = t == null ? void 0 : t.element) == null ? void 0 : e.data) && {
488
+ ...(i = t == null ? void 0 : t.element) == null ? void 0 : i.data
489
489
  },
490
490
  default: {
491
491
  // set date to yyyy-MM-dd format if it exists
492
- ...(n == null ? void 0 : n.startTime) && {
493
- startTime: W(n.startTime).format("YYYY-MM-DD")
492
+ ...(t == null ? void 0 : t.startTime) && {
493
+ startTime: G(t.startTime).format("YYYY-MM-DD")
494
494
  },
495
- ...(n == null ? void 0 : n.endTime) && {
496
- endTime: W(n.endTime).format("YYYY-MM-DD")
495
+ ...(t == null ? void 0 : t.endTime) && {
496
+ endTime: G(t.endTime).format("YYYY-MM-DD")
497
497
  },
498
- ...(n == null ? void 0 : n.expirationTime) && {
499
- expirationTime: W(n.expirationTime).format("YYYY-MM-DD")
498
+ ...(t == null ? void 0 : t.expirationTime) && {
499
+ expirationTime: G(t.expirationTime).format("YYYY-MM-DD")
500
500
  }
501
501
  },
502
502
  advanced: {
503
- currency: (n == null ? void 0 : n.currency) ?? void 0,
504
- timezone: (n == null ? void 0 : n.timezone) ?? void 0,
505
- billingPlan: ((b = ($ = n == null ? void 0 : n.preferences) == null ? void 0 : $.billingPreferences) == null ? void 0 : b.billingPlanName) ?? void 0,
506
- installmentPlan: ((w = (g = n == null ? void 0 : n.preferences) == null ? void 0 : g.installmentPreferences) == null ? void 0 : w.installmentPlanName) ?? void 0,
507
- durationBasis: (n == null ? void 0 : n.durationBasis) ?? void 0,
508
- delinquencyPlanName: (n == null ? void 0 : n.delinquencyPlanName) ?? void 0
503
+ currency: (t == null ? void 0 : t.currency) ?? void 0,
504
+ timezone: (t == null ? void 0 : t.timezone) ?? void 0,
505
+ billingPlan: ((v = (f = t == null ? void 0 : t.preferences) == null ? void 0 : f.billingPreferences) == null ? void 0 : v.billingPlanName) ?? void 0,
506
+ installmentPlan: (($ = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.installmentPreferences) == null ? void 0 : $.installmentPlanName) ?? void 0,
507
+ durationBasis: (t == null ? void 0 : t.durationBasis) ?? void 0,
508
+ delinquencyPlanName: (t == null ? void 0 : t.delinquencyPlanName) ?? void 0
509
509
  }
510
510
  };
511
+ }, X = (t, e) => {
512
+ for (const i of t) {
513
+ if (i.locator === e)
514
+ return i;
515
+ const f = X(
516
+ i.elements ?? [],
517
+ e
518
+ );
519
+ if (f)
520
+ return f;
521
+ }
522
+ return !1;
523
+ }, ae = (t, e) => {
524
+ var i, f;
525
+ return ((i = t.element) == null ? void 0 : i.locator) === e ? t.element : X(
526
+ ((f = t.element) == null ? void 0 : f.elements) ?? [],
527
+ e
528
+ );
529
+ }, re = ({
530
+ dataModel: t,
531
+ element: { productName: e }
532
+ }) => t.products[e] ?? {}, ce = (t) => {
533
+ var f;
534
+ t = t ?? "";
535
+ const e = t.replace(/\?|\*|!|\+/g, ""), i = (f = t.match(/\?|\*|!|\+/g)) == null ? void 0 : f.pop();
536
+ return {
537
+ name: e,
538
+ quantifier: i ?? ""
539
+ };
540
+ }, ue = ({
541
+ dataModel: t,
542
+ productDataModel: e
543
+ }) => {
544
+ const i = t.exposures ?? {}, f = t.coverages ?? {}, v = t.policyLines ?? {}, d = t.exposureGroups ?? {}, m = (e.contents ?? []).map((r) => {
545
+ const { name: T } = ce(r);
546
+ return T;
547
+ }), M = Object.keys(i).filter(
548
+ (r) => m.includes(r)
549
+ ), k = Object.keys(f).filter(
550
+ (r) => m.includes(r)
551
+ ), V = Object.keys(v).filter(
552
+ (r) => m.includes(r)
553
+ ), E = Object.keys(
554
+ d
555
+ ).filter((r) => m.includes(r)), p = {
556
+ coverages: {},
557
+ exposures: {},
558
+ policyLines: {},
559
+ exposureGroups: {}
560
+ };
561
+ for (const r of M)
562
+ p.exposures[r] = i[r];
563
+ for (const r of k)
564
+ p.coverages[r] = f[r];
565
+ for (const r of V)
566
+ p.policyLines[r] = v[r];
567
+ for (const r of E)
568
+ p.exposureGroups[r] = d[r];
569
+ return p;
570
+ }, pe = ({
571
+ dataModel: t,
572
+ quote: e,
573
+ elementLocator: i
574
+ }) => {
575
+ const f = ae(e, i);
576
+ if (!f)
577
+ return {};
578
+ const v = re({
579
+ element: e,
580
+ dataModel: t
581
+ }), d = ue({
582
+ dataModel: t,
583
+ productDataModel: v
584
+ });
585
+ let $ = !1;
586
+ const m = f.type.split("Quote")[0];
587
+ return Object.keys(d.exposures).forEach((M) => {
588
+ M === m && ($ = d.exposures[M]);
589
+ }), $ || Object.keys(d.coverages).forEach((M) => {
590
+ M === m && ($ = d.coverages[M]);
591
+ }), $ || Object.keys(d.policyLines).forEach((M) => {
592
+ M === m && ($ = d.policyLines[M]);
593
+ }), $ || Object.keys(d.exposureGroups).forEach((M) => {
594
+ M === m && ($ = d.exposureGroups[M]);
595
+ }), $;
511
596
  };
512
597
  export {
513
- X as dataModelToJSONSchema,
514
- ae as getAccountRequest,
515
- fe as getDefaultValues,
516
- se as getQuoteElementRequest,
517
- re as getQuoteRequest,
518
- ne as parseElementTypeAndScopeByElementType,
519
- ue as retrieveDataModelFromElement,
598
+ q as dataModelToJSONSchema,
599
+ pe as extractElementDataModel,
600
+ ae as extractElementFromQuote,
601
+ re as extractProductDataModel,
602
+ ue as extractProductElements,
603
+ oe as getAccountRequest,
604
+ he as getDefaultValues,
605
+ le as getQuoteElementRequest,
606
+ fe as getQuoteRequest,
607
+ se as parseElementTypeAndScopeByElementType,
608
+ de as retrieveDataModelFromElement,
520
609
  ie as retrieveElementFromQuoteByLocator,
521
- ce as transformErrors
610
+ ce as splitInputAndQuantifier,
611
+ me as transformErrors
522
612
  };
523
613
  //# sourceMappingURL=index.es.js.map