@sprig-technologies/sprig-browser 2.33.1 → 2.33.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.
@@ -1,229 +1,158 @@
1
- import { C as Ht, A as Se, D as Gr, a as Kr, i as Yr, E as Qr, b as De, d as Ct, r as Jr, e as At } from "./core-BPGg40bv.js";
2
- import { b as Xr, D as Bt, e as Be, h as We, S as ne, s as ht, v as mt } from "./metricsReporter-Dsn4xUH7.js";
3
- var Me, P, Rn, xe, qt, Nn, gt, Ln, Le = {}, Mn = [], eo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ze = Array.isArray;
4
- function pe(e, t) {
5
- for (var n in t)
6
- e[n] = t[n];
1
+ import { A as ke, D as Wr, a as Zr, C as Lt, i as Gr, E as Kr, b as Se, d as bt, r as Yr, e as Mt } from "./core-C0XvmpIu.js";
2
+ import { e as Me, h as qe, S as X, s as lt, D as Ot, b as Qr, v as dt } from "./metricsReporter-uTmb1eaJ.js";
3
+ var Pe, P, Dn, fe, Ut, Rn, ct, Nn, Te = {}, Ln = [], Jr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ze = Array.isArray;
4
+ function ae(e, t) {
5
+ for (var n in t) e[n] = t[n];
7
6
  return e;
8
7
  }
9
- function On(e) {
8
+ function Mn(e) {
10
9
  var t = e.parentNode;
11
10
  t && t.removeChild(e);
12
11
  }
13
- function F(e, t, n) {
12
+ function V(e, t, n) {
14
13
  var r, o, i, s = {};
15
- for (i in t)
16
- i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
17
- if (arguments.length > 2 && (s.children = arguments.length > 3 ? Me.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
18
- for (i in e.defaultProps)
19
- s[i] === void 0 && (s[i] = e.defaultProps[i]);
20
- return Re(e, s, r, o, null);
21
- }
22
- function Re(e, t, n, r, o) {
23
- var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++Rn, __i: -1, __u: 0 };
14
+ for (i in t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
15
+ if (arguments.length > 2 && (s.children = arguments.length > 3 ? Pe.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (i in e.defaultProps) s[i] === void 0 && (s[i] = e.defaultProps[i]);
16
+ return je(e, s, r, o, null);
17
+ }
18
+ function je(e, t, n, r, o) {
19
+ var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++Dn, __i: -1, __u: 0 };
24
20
  return o == null && P.vnode != null && P.vnode(i), i;
25
21
  }
26
- function Un() {
22
+ function On() {
27
23
  return { current: null };
28
24
  }
29
- function Y(e) {
25
+ function Z(e) {
30
26
  return e.children;
31
27
  }
32
- function se(e, t) {
28
+ function te(e, t) {
33
29
  this.props = e, this.context = t;
34
30
  }
35
- function je(e, t) {
36
- if (t == null)
37
- return e.__ ? je(e.__, e.__i + 1) : null;
38
- for (var n; t < e.__k.length; t++)
39
- if ((n = e.__k[t]) != null && n.__e != null)
40
- return n.__e;
41
- return typeof e.type == "function" ? je(e) : null;
31
+ function we(e, t) {
32
+ if (t == null) return e.__ ? we(e.__, e.__i + 1) : null;
33
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
34
+ return typeof e.type == "function" ? we(e) : null;
42
35
  }
43
- function Hn(e) {
36
+ function Un(e) {
44
37
  var t, n;
45
38
  if ((e = e.__) != null && e.__c != null) {
46
- for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
47
- if ((n = e.__k[t]) != null && n.__e != null) {
48
- e.__e = e.__c.base = n.__e;
49
- break;
50
- }
51
- return Hn(e);
39
+ for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) {
40
+ e.__e = e.__c.base = n.__e;
41
+ break;
42
+ }
43
+ return Un(e);
52
44
  }
53
45
  }
54
- function vt(e) {
55
- (!e.__d && (e.__d = !0) && xe.push(e) && !Ge.__r++ || qt !== P.debounceRendering) && ((qt = P.debounceRendering) || Nn)(Ge);
56
- }
57
- function Ge() {
58
- var e, t, n, r, o, i, s, d, l;
59
- for (xe.sort(gt); e = xe.shift(); )
60
- e.__d && (t = xe.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = pe({}, o)).__v = o.__v + 1, P.vnode && P.vnode(r), Et(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? je(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, Bn(d, r, l), r.__e != i && Hn(r)), xe.length > t && xe.sort(gt));
61
- Ge.__r = 0;
62
- }
63
- function Vt(e, t, n, r, o, i, s, d, l, p, h) {
64
- var c, u, m, g, f, v = r && r.__k || Mn, k = t.length;
65
- for (n.__d = l, function(_, T, j) {
66
- var E, w, I, D, x, b = T.length, y = j.length, S = y, L = 0;
67
- for (_.__k = [], E = 0; E < b; E++)
68
- (w = _.__k[E] = (w = T[E]) == null || typeof w == "boolean" || typeof w == "function" ? null : typeof w == "string" || typeof w == "number" || typeof w == "bigint" || w.constructor == String ? Re(null, w, null, null, w) : Ze(w) ? Re(Y, { children: w }, null, null, null) : w.constructor === void 0 && w.__b > 0 ? Re(w.type, w.props, w.key, w.ref ? w.ref : null, w.__v) : w) != null ? (w.__ = _, w.__b = _.__b + 1, x = to(w, j, D = E + L, S), w.__i = x, I = null, x !== -1 && (S--, (I = j[x]) && (I.__u |= 131072)), I == null || I.__v === null ? (x == -1 && L--, typeof w.type != "function" && (w.__u |= 65536)) : x !== D && (x === D + 1 ? L++ : x > D ? S > b - D ? L += x - D : L-- : L = x < D && x == D - 1 ? x - D : 0, x !== E + L && (w.__u |= 65536))) : (I = j[E]) && I.key == null && I.__e && (I.__e == _.__d && (_.__d = je(I)), ft(I, I, !1), j[E] = null, S--);
69
- if (S)
70
- for (E = 0; E < y; E++)
71
- (I = j[E]) != null && !(131072 & I.__u) && (I.__e == _.__d && (_.__d = je(I)), ft(I, I));
72
- }(n, t, v), l = n.__d, c = 0; c < k; c++)
73
- (m = n.__k[c]) != null && typeof m != "boolean" && typeof m != "function" && (u = m.__i === -1 ? Le : v[m.__i] || Le, m.__i = c, Et(e, m, u, o, i, s, d, l, p, h), g = m.__e, m.ref && u.ref != m.ref && (u.ref && St(u.ref, null, m), h.push(m.ref, m.__c || g, m)), f == null && g != null && (f = g), 65536 & m.__u || u.__k === m.__k ? l = An(m, l, e) : typeof m.type == "function" && m.__d !== void 0 ? l = m.__d : g && (l = g.nextSibling), m.__d = void 0, m.__u &= -196609);
74
- n.__d = l, n.__e = f;
46
+ function ut(e) {
47
+ (!e.__d && (e.__d = !0) && fe.push(e) && !Ve.__r++ || Ut !== P.debounceRendering) && ((Ut = P.debounceRendering) || Rn)(Ve);
48
+ }
49
+ function Ve() {
50
+ var e, t, n, r, o, i, s, d, a;
51
+ for (fe.sort(ct); e = fe.shift(); ) e.__d && (t = fe.length, r = void 0, i = (o = (n = e).__v).__e, d = [], a = [], (s = n.__P) && ((r = ae({}, o)).__v = o.__v + 1, P.vnode && P.vnode(r), yt(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? we(o), !!(32 & o.__u), a), r.__.__k[r.__i] = r, Bn(d, r, a), r.__e != i && Un(r)), fe.length > t && fe.sort(ct));
52
+ Ve.__r = 0;
53
+ }
54
+ function Hn(e, t, n, r, o, i, s, d, a, u, h) {
55
+ var c, p, m, g, b, v = r && r.__k || Ln, _ = t.length;
56
+ for (n.__d = a, function(f, T, S) {
57
+ var w, x, j, D, y, E = T.length, k = S.length, I = k, N = 0;
58
+ for (f.__k = [], w = 0; w < E; w++) (x = f.__k[w] = (x = T[w]) == null || typeof x == "boolean" || typeof x == "function" ? null : typeof x == "string" || typeof x == "number" || typeof x == "bigint" || x.constructor == String ? je(null, x, null, null, x) : Ze(x) ? je(Z, { children: x }, null, null, null) : x.constructor === void 0 && x.__b > 0 ? je(x.type, x.props, x.key, x.ref ? x.ref : null, x.__v) : x) != null ? (x.__ = f, x.__b = f.__b + 1, y = Xr(x, S, D = w + N, I), x.__i = y, j = null, y !== -1 && (I--, (j = S[y]) && (j.__u |= 131072)), j == null || j.__v === null ? (y == -1 && N--, typeof x.type != "function" && (x.__u |= 65536)) : y !== D && (y === D + 1 ? N++ : y > D ? I > E - D ? N += y - D : N-- : N = y < D && y == D - 1 ? y - D : 0, y !== w + N && (x.__u |= 65536))) : (j = S[w]) && j.key == null && j.__e && (j.__e == f.__d && (f.__d = we(j)), pt(j, j, !1), S[w] = null, I--);
59
+ if (I) for (w = 0; w < k; w++) (j = S[w]) != null && !(131072 & j.__u) && (j.__e == f.__d && (f.__d = we(j)), pt(j, j));
60
+ }(n, t, v), a = n.__d, c = 0; c < _; c++) (m = n.__k[c]) != null && typeof m != "boolean" && typeof m != "function" && (p = m.__i === -1 ? Te : v[m.__i] || Te, m.__i = c, yt(e, m, p, o, i, s, d, a, u, h), g = m.__e, m.ref && p.ref != m.ref && (p.ref && xt(p.ref, null, m), h.push(m.ref, m.__c || g, m)), b == null && g != null && (b = g), 65536 & m.__u || p.__k === m.__k ? a = An(m, a, e) : typeof m.type == "function" && m.__d !== void 0 ? a = m.__d : g && (a = g.nextSibling), m.__d = void 0, m.__u &= -196609);
61
+ n.__d = a, n.__e = b;
75
62
  }
76
63
  function An(e, t, n) {
77
64
  var r, o;
78
65
  if (typeof e.type == "function") {
79
- for (r = e.__k, o = 0; r && o < r.length; o++)
80
- r[o] && (r[o].__ = e, t = An(r[o], t, n));
66
+ for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = An(r[o], t, n));
81
67
  return t;
82
68
  }
83
69
  return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
84
70
  }
85
- function he(e, t) {
71
+ function le(e, t) {
86
72
  return t = t || [], e == null || typeof e == "boolean" || (Ze(e) ? e.some(function(n) {
87
- he(n, t);
73
+ le(n, t);
88
74
  }) : t.push(e)), t;
89
75
  }
90
- function to(e, t, n, r) {
91
- var o = e.key, i = e.type, s = n - 1, d = n + 1, l = t[n];
92
- if (l === null || l && o == l.key && i === l.type)
93
- return n;
94
- if (r > (l == null || 131072 & l.__u ? 0 : 1))
95
- for (; s >= 0 || d < t.length; ) {
96
- if (s >= 0) {
97
- if ((l = t[s]) && !(131072 & l.__u) && o == l.key && i === l.type)
98
- return s;
99
- s--;
100
- }
101
- if (d < t.length) {
102
- if ((l = t[d]) && !(131072 & l.__u) && o == l.key && i === l.type)
103
- return d;
104
- d++;
105
- }
76
+ function Xr(e, t, n, r) {
77
+ var o = e.key, i = e.type, s = n - 1, d = n + 1, a = t[n];
78
+ if (a === null || a && o == a.key && i === a.type) return n;
79
+ if (r > (a == null || 131072 & a.__u ? 0 : 1)) for (; s >= 0 || d < t.length; ) {
80
+ if (s >= 0) {
81
+ if ((a = t[s]) && !(131072 & a.__u) && o == a.key && i === a.type) return s;
82
+ s--;
83
+ }
84
+ if (d < t.length) {
85
+ if ((a = t[d]) && !(131072 & a.__u) && o == a.key && i === a.type) return d;
86
+ d++;
106
87
  }
88
+ }
107
89
  return -1;
108
90
  }
109
- function zt(e, t, n) {
110
- t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || eo.test(t) ? n : n + "px";
91
+ function Ht(e, t, n) {
92
+ t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || Jr.test(t) ? n : n + "px";
111
93
  }
112
- function Ae(e, t, n, r, o) {
94
+ function Le(e, t, n, r, o) {
113
95
  var i;
114
- e:
115
- if (t === "style")
116
- if (typeof n == "string")
117
- e.style.cssText = n;
118
- else {
119
- if (typeof r == "string" && (e.style.cssText = r = ""), r)
120
- for (t in r)
121
- n && t in n || zt(e.style, t, "");
122
- if (n)
123
- for (t in n)
124
- r && n[t] === r[t] || zt(e.style, t, n[t]);
125
- }
126
- else if (t[0] === "o" && t[1] === "n")
127
- i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? Ft : $t, i)) : e.removeEventListener(t, i ? Ft : $t, i);
128
- else {
129
- if (o)
130
- t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
131
- else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e)
132
- try {
133
- e[t] = n ?? "";
134
- break e;
135
- } catch {
136
- }
137
- typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
96
+ e: if (t === "style") if (typeof n == "string") e.style.cssText = n;
97
+ else {
98
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || Ht(e.style, t, "");
99
+ if (n) for (t in n) r && n[t] === r[t] || Ht(e.style, t, n[t]);
100
+ }
101
+ else if (t[0] === "o" && t[1] === "n") i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? Bt : At, i)) : e.removeEventListener(t, i ? Bt : At, i);
102
+ else {
103
+ if (o) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
104
+ else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e) try {
105
+ e[t] = n ?? "";
106
+ break e;
107
+ } catch {
138
108
  }
109
+ typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
110
+ }
139
111
  }
140
- function $t(e) {
112
+ function At(e) {
141
113
  var t = this.l[e.type + !1];
142
114
  if (e.t) {
143
- if (e.t <= t.u)
144
- return;
145
- } else
146
- e.t = Date.now();
115
+ if (e.t <= t.u) return;
116
+ } else e.t = Date.now();
147
117
  return t(P.event ? P.event(e) : e);
148
118
  }
149
- function Ft(e) {
119
+ function Bt(e) {
150
120
  return this.l[e.type + !0](P.event ? P.event(e) : e);
151
121
  }
152
- function Et(e, t, n, r, o, i, s, d, l, p) {
153
- var h, c, u, m, g, f, v, k, _, T, j, E, w, I, D, x = t.type;
154
- if (t.constructor !== void 0)
155
- return null;
156
- 128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (h = P.__b) && h(t);
157
- e:
158
- if (typeof x == "function")
159
- try {
160
- if (k = t.props, _ = (h = x.contextType) && r[h.__c], T = h ? _ ? _.props.value : h.__ : r, n.__c ? v = (c = t.__c = n.__c).__ = c.__E : ("prototype" in x && x.prototype.render ? t.__c = c = new x(k, T) : (t.__c = c = new se(k, T), c.constructor = x, c.render = no), _ && _.sub(c), c.props = k, c.state || (c.state = {}), c.context = T, c.__n = r, u = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), x.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = pe({}, c.__s)), pe(c.__s, x.getDerivedStateFromProps(k, c.__s))), m = c.props, g = c.state, c.__v = t, u)
161
- x.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
162
- else {
163
- if (x.getDerivedStateFromProps == null && k !== m && c.componentWillReceiveProps != null && c.componentWillReceiveProps(k, T), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(k, c.__s, T) === !1 || t.__v === n.__v)) {
164
- for (t.__v !== n.__v && (c.props = k, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(b) {
165
- b && (b.__ = t);
166
- }), j = 0; j < c._sb.length; j++)
167
- c.__h.push(c._sb[j]);
168
- c._sb = [], c.__h.length && s.push(c);
169
- break e;
170
- }
171
- c.componentWillUpdate != null && c.componentWillUpdate(k, c.__s, T), c.componentDidUpdate != null && c.__h.push(function() {
172
- c.componentDidUpdate(m, g, f);
173
- });
174
- }
175
- if (c.context = T, c.props = k, c.__P = e, c.__e = !1, E = P.__r, w = 0, "prototype" in x && x.prototype.render) {
176
- for (c.state = c.__s, c.__d = !1, E && E(t), h = c.render(c.props, c.state, c.context), I = 0; I < c._sb.length; I++)
177
- c.__h.push(c._sb[I]);
178
- c._sb = [];
179
- } else
180
- do
181
- c.__d = !1, E && E(t), h = c.render(c.props, c.state, c.context), c.state = c.__s;
182
- while (c.__d && ++w < 25);
183
- c.state = c.__s, c.getChildContext != null && (r = pe(pe({}, r), c.getChildContext())), u || c.getSnapshotBeforeUpdate == null || (f = c.getSnapshotBeforeUpdate(m, g)), Vt(e, Ze(D = h != null && h.type === Y && h.key == null ? h.props.children : h) ? D : [D], t, n, r, o, i, s, d, l, p), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), v && (c.__E = c.__ = null);
184
- } catch (b) {
185
- t.__v = null, l || i != null ? (t.__e = d, t.__u |= l ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k), P.__e(b, t, n);
122
+ function yt(e, t, n, r, o, i, s, d, a, u) {
123
+ var h, c, p, m, g, b, v, _, f, T, S, w, x, j, D, y = t.type;
124
+ if (t.constructor !== void 0) return null;
125
+ 128 & n.__u && (a = !!(32 & n.__u), i = [d = t.__e = n.__e]), (h = P.__b) && h(t);
126
+ e: if (typeof y == "function") try {
127
+ if (_ = t.props, f = (h = y.contextType) && r[h.__c], T = h ? f ? f.props.value : h.__ : r, n.__c ? v = (c = t.__c = n.__c).__ = c.__E : ("prototype" in y && y.prototype.render ? t.__c = c = new y(_, T) : (t.__c = c = new te(_, T), c.constructor = y, c.render = to), f && f.sub(c), c.props = _, c.state || (c.state = {}), c.context = T, c.__n = r, p = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), y.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ae({}, c.__s)), ae(c.__s, y.getDerivedStateFromProps(_, c.__s))), m = c.props, g = c.state, c.__v = t, p) y.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
128
+ else {
129
+ if (y.getDerivedStateFromProps == null && _ !== m && c.componentWillReceiveProps != null && c.componentWillReceiveProps(_, T), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(_, c.__s, T) === !1 || t.__v === n.__v)) {
130
+ for (t.__v !== n.__v && (c.props = _, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(E) {
131
+ E && (E.__ = t);
132
+ }), S = 0; S < c._sb.length; S++) c.__h.push(c._sb[S]);
133
+ c._sb = [], c.__h.length && s.push(c);
134
+ break e;
186
135
  }
187
- else
188
- i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = function(b, y, S, L, C, M, A, H, B) {
189
- var R, $, Z, ee, V, Q, be, re = S.props, ce = y.props, oe = y.type;
190
- if (oe === "svg" && (C = !0), M != null) {
191
- for (R = 0; R < M.length; R++)
192
- if ((V = M[R]) && "setAttribute" in V == !!oe && (oe ? V.localName === oe : V.nodeType === 3)) {
193
- b = V, M[R] = null;
194
- break;
195
- }
196
- }
197
- if (b == null) {
198
- if (oe === null)
199
- return document.createTextNode(ce);
200
- b = C ? document.createElementNS("http://www.w3.org/2000/svg", oe) : document.createElement(oe, ce.is && ce), M = null, H = !1;
201
- }
202
- if (oe === null)
203
- re === ce || H && b.data === ce || (b.data = ce);
204
- else {
205
- if (M = M && Me.call(b.childNodes), re = S.props || Le, !H && M != null)
206
- for (re = {}, R = 0; R < b.attributes.length; R++)
207
- re[(V = b.attributes[R]).name] = V.value;
208
- for (R in re)
209
- V = re[R], R == "children" || (R == "dangerouslySetInnerHTML" ? Z = V : R === "key" || R in ce || Ae(b, R, null, V, C));
210
- for (R in ce)
211
- V = ce[R], R == "children" ? ee = V : R == "dangerouslySetInnerHTML" ? $ = V : R == "value" ? Q = V : R == "checked" ? be = V : R === "key" || H && typeof V != "function" || re[R] === V || Ae(b, R, V, re[R], C);
212
- if ($)
213
- H || Z && ($.__html === Z.__html || $.__html === b.innerHTML) || (b.innerHTML = $.__html), y.__k = [];
214
- else if (Z && (b.innerHTML = ""), Vt(b, Ze(ee) ? ee : [ee], y, S, L, C && oe !== "foreignObject", M, A, M ? M[0] : S.__k && je(S, 0), H, B), M != null)
215
- for (R = M.length; R--; )
216
- M[R] != null && On(M[R]);
217
- H || (R = "value", Q !== void 0 && (Q !== b[R] || oe === "progress" && !Q || oe === "option" && Q !== re[R]) && Ae(b, R, Q, re[R], !1), R = "checked", be !== void 0 && be !== b[R] && Ae(b, R, be, re[R], !1));
218
- }
219
- return b;
220
- }(n.__e, t, n, r, o, i, s, l, p);
136
+ c.componentWillUpdate != null && c.componentWillUpdate(_, c.__s, T), c.componentDidUpdate != null && c.__h.push(function() {
137
+ c.componentDidUpdate(m, g, b);
138
+ });
139
+ }
140
+ if (c.context = T, c.props = _, c.__P = e, c.__e = !1, w = P.__r, x = 0, "prototype" in y && y.prototype.render) {
141
+ for (c.state = c.__s, c.__d = !1, w && w(t), h = c.render(c.props, c.state, c.context), j = 0; j < c._sb.length; j++) c.__h.push(c._sb[j]);
142
+ c._sb = [];
143
+ } else do
144
+ c.__d = !1, w && w(t), h = c.render(c.props, c.state, c.context), c.state = c.__s;
145
+ while (c.__d && ++x < 25);
146
+ c.state = c.__s, c.getChildContext != null && (r = ae(ae({}, r), c.getChildContext())), p || c.getSnapshotBeforeUpdate == null || (b = c.getSnapshotBeforeUpdate(m, g)), Hn(e, Ze(D = h != null && h.type === Z && h.key == null ? h.props.children : h) ? D : [D], t, n, r, o, i, s, d, a, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), v && (c.__E = c.__ = null);
147
+ } catch (E) {
148
+ t.__v = null, a || i != null ? (t.__e = d, t.__u |= a ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k), P.__e(E, t, n);
149
+ }
150
+ else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = eo(n.__e, t, n, r, o, i, s, a, u);
221
151
  (h = P.diffed) && h(t);
222
152
  }
223
153
  function Bn(e, t, n) {
224
154
  t.__d = void 0;
225
- for (var r = 0; r < n.length; r++)
226
- St(n[r], n[++r], n[++r]);
155
+ for (var r = 0; r < n.length; r++) xt(n[r], n[++r], n[++r]);
227
156
  P.__c && P.__c(t, e), e.some(function(o) {
228
157
  try {
229
158
  e = o.__h, o.__h = [], e.some(function(i) {
@@ -234,47 +163,66 @@ function Bn(e, t, n) {
234
163
  }
235
164
  });
236
165
  }
237
- function St(e, t, n) {
166
+ function eo(e, t, n, r, o, i, s, d, a) {
167
+ var u, h, c, p, m, g, b, v = n.props, _ = t.props, f = t.type;
168
+ if (f === "svg" && (o = !0), i != null) {
169
+ for (u = 0; u < i.length; u++) if ((m = i[u]) && "setAttribute" in m == !!f && (f ? m.localName === f : m.nodeType === 3)) {
170
+ e = m, i[u] = null;
171
+ break;
172
+ }
173
+ }
174
+ if (e == null) {
175
+ if (f === null) return document.createTextNode(_);
176
+ e = o ? document.createElementNS("http://www.w3.org/2000/svg", f) : document.createElement(f, _.is && _), i = null, d = !1;
177
+ }
178
+ if (f === null) v === _ || d && e.data === _ || (e.data = _);
179
+ else {
180
+ if (i = i && Pe.call(e.childNodes), v = n.props || Te, !d && i != null) for (v = {}, u = 0; u < e.attributes.length; u++) v[(m = e.attributes[u]).name] = m.value;
181
+ for (u in v) m = v[u], u == "children" || (u == "dangerouslySetInnerHTML" ? c = m : u === "key" || u in _ || Le(e, u, null, m, o));
182
+ for (u in _) m = _[u], u == "children" ? p = m : u == "dangerouslySetInnerHTML" ? h = m : u == "value" ? g = m : u == "checked" ? b = m : u === "key" || d && typeof m != "function" || v[u] === m || Le(e, u, m, v[u], o);
183
+ if (h) d || c && (h.__html === c.__html || h.__html === e.innerHTML) || (e.innerHTML = h.__html), t.__k = [];
184
+ else if (c && (e.innerHTML = ""), Hn(e, Ze(p) ? p : [p], t, n, r, o && f !== "foreignObject", i, s, i ? i[0] : n.__k && we(n, 0), d, a), i != null) for (u = i.length; u--; ) i[u] != null && Mn(i[u]);
185
+ d || (u = "value", g !== void 0 && (g !== e[u] || f === "progress" && !g || f === "option" && g !== v[u]) && Le(e, u, g, v[u], !1), u = "checked", b !== void 0 && b !== e[u] && Le(e, u, b, v[u], !1));
186
+ }
187
+ return e;
188
+ }
189
+ function xt(e, t, n) {
238
190
  try {
239
191
  typeof e == "function" ? e(t) : e.current = t;
240
192
  } catch (r) {
241
193
  P.__e(r, n);
242
194
  }
243
195
  }
244
- function ft(e, t, n) {
196
+ function pt(e, t, n) {
245
197
  var r, o;
246
- if (P.unmount && P.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || St(r, null, t)), (r = e.__c) != null) {
247
- if (r.componentWillUnmount)
248
- try {
249
- r.componentWillUnmount();
250
- } catch (i) {
251
- P.__e(i, t);
252
- }
198
+ if (P.unmount && P.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || xt(r, null, t)), (r = e.__c) != null) {
199
+ if (r.componentWillUnmount) try {
200
+ r.componentWillUnmount();
201
+ } catch (i) {
202
+ P.__e(i, t);
203
+ }
253
204
  r.base = r.__P = null, e.__c = void 0;
254
205
  }
255
- if (r = e.__k)
256
- for (o = 0; o < r.length; o++)
257
- r[o] && ft(r[o], t, n || typeof e.type != "function");
258
- n || e.__e == null || On(e.__e), e.__ = e.__e = e.__d = void 0;
206
+ if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && pt(r[o], t, n || typeof e.type != "function");
207
+ n || e.__e == null || Mn(e.__e), e.__ = e.__e = e.__d = void 0;
259
208
  }
260
- function no(e, t, n) {
209
+ function to(e, t, n) {
261
210
  return this.constructor(e, n);
262
211
  }
263
- function Ie(e, t, n) {
212
+ function Ce(e, t, n) {
264
213
  var r, o, i, s;
265
- P.__ && P.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], Et(t, e = (!r && n || t).__k = F(Y, null, [e]), o || Le, Le, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? Me.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Bn(i, e, s);
214
+ P.__ && P.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], yt(t, e = (!r && n || t).__k = V(Z, null, [e]), o || Te, Te, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? Pe.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Bn(i, e, s);
266
215
  }
267
216
  function qn(e, t) {
268
- Ie(e, t, qn);
217
+ Ce(e, t, qn);
269
218
  }
270
- function ro(e, t, n) {
271
- var r, o, i, s, d = pe({}, e.props);
272
- for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t)
273
- i == "key" ? r = t[i] : i == "ref" ? o = t[i] : d[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
274
- return arguments.length > 2 && (d.children = arguments.length > 3 ? Me.call(arguments, 2) : n), Re(e.type, d, r || e.key, o || e.ref, null);
219
+ function no(e, t, n) {
220
+ var r, o, i, s, d = ae({}, e.props);
221
+ for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : d[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
222
+ return arguments.length > 2 && (d.children = arguments.length > 3 ? Pe.call(arguments, 2) : n), je(e.type, d, r || e.key, o || e.ref, null);
275
223
  }
276
224
  function Vn(e, t) {
277
- var n = { __c: t = "__cC" + Ln++, __: e, Consumer: function(r, o) {
225
+ var n = { __c: t = "__cC" + Nn++, __: e, Consumer: function(r, o) {
278
226
  return r.children(o);
279
227
  }, Provider: function(r) {
280
228
  var o, i;
@@ -282,7 +230,7 @@ function Vn(e, t) {
282
230
  return i;
283
231
  }, this.shouldComponentUpdate = function(s) {
284
232
  this.props.value !== s.value && o.some(function(d) {
285
- d.__e = !0, vt(d);
233
+ d.__e = !0, ut(d);
286
234
  });
287
235
  }, this.sub = function(s) {
288
236
  o.push(s);
@@ -294,84 +242,87 @@ function Vn(e, t) {
294
242
  } };
295
243
  return n.Provider.__ = n.Consumer.contextType = n;
296
244
  }
297
- Me = Mn.slice, P = { __e: function(e, t, n, r) {
298
- for (var o, i, s; t = t.__; )
299
- if ((o = t.__c) && !o.__)
300
- try {
301
- if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s)
302
- return o.__E = o;
303
- } catch (d) {
304
- e = d;
305
- }
245
+ Pe = Ln.slice, P = { __e: function(e, t, n, r) {
246
+ for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
247
+ if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s) return o.__E = o;
248
+ } catch (d) {
249
+ e = d;
250
+ }
306
251
  throw e;
307
- } }, Rn = 0, se.prototype.setState = function(e, t) {
252
+ } }, Dn = 0, te.prototype.setState = function(e, t) {
308
253
  var n;
309
- n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = pe({}, this.state), typeof e == "function" && (e = e(pe({}, n), this.props)), e && pe(n, e), e != null && this.__v && (t && this._sb.push(t), vt(this));
310
- }, se.prototype.forceUpdate = function(e) {
311
- this.__v && (this.__e = !0, e && this.__h.push(e), vt(this));
312
- }, se.prototype.render = Y, xe = [], Nn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, gt = function(e, t) {
254
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ae({}, this.state), typeof e == "function" && (e = e(ae({}, n), this.props)), e && ae(n, e), e != null && this.__v && (t && this._sb.push(t), ut(this));
255
+ }, te.prototype.forceUpdate = function(e) {
256
+ this.__v && (this.__e = !0, e && this.__h.push(e), ut(this));
257
+ }, te.prototype.render = Z, fe = [], Rn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ct = function(e, t) {
313
258
  return e.__v.__b - t.__v.__b;
314
- }, Ge.__r = 0, Ln = 0;
315
- var me, z, rt, Wt, Te = 0, zn = [], qe = [], Zt = P.__b, Gt = P.__r, Kt = P.diffed, Yt = P.__c, Qt = P.unmount;
316
- function we(e, t) {
317
- P.__h && P.__h(z, e, Te || t), Te = 0;
318
- var n = z.__H || (z.__H = { __: [], __h: [] });
319
- return e >= n.__.length && n.__.push({ __V: qe }), n.__[e];
320
- }
321
- function W(e) {
322
- return Te = 1, jt(Zn, e);
323
- }
324
- function jt(e, t, n) {
325
- var r = we(me++, 2);
259
+ }, Ve.__r = 0, Nn = 0;
260
+ var ro = 0;
261
+ function l(e, t, n, r, o, i) {
262
+ var s, d, a = {};
263
+ for (d in t) d == "ref" ? s = t[d] : a[d] = t[d];
264
+ var u = { type: e, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --ro, __i: -1, __u: 0, __source: o, __self: i };
265
+ if (typeof e == "function" && (s = e.defaultProps)) for (d in s) a[d] === void 0 && (a[d] = s[d]);
266
+ return P.vnode && P.vnode(u), u;
267
+ }
268
+ var de, q, Qe, qt, Ee = 0, zn = [], Oe = [], Vt = P.__b, zt = P.__r, $t = P.diffed, Ft = P.__c, Wt = P.unmount;
269
+ function be(e, t) {
270
+ P.__h && P.__h(q, e, Ee || t), Ee = 0;
271
+ var n = q.__H || (q.__H = { __: [], __h: [] });
272
+ return e >= n.__.length && n.__.push({ __V: Oe }), n.__[e];
273
+ }
274
+ function z(e) {
275
+ return Ee = 1, kt(Zn, e);
276
+ }
277
+ function kt(e, t, n) {
278
+ var r = be(de++, 2);
326
279
  if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Zn(void 0, t), function(d) {
327
- var l = r.__N ? r.__N[0] : r.__[0], p = r.t(l, d);
328
- l !== p && (r.__N = [p, r.__[1]], r.__c.setState({}));
329
- }], r.__c = z, !z.u)) {
330
- var o = function(d, l, p) {
331
- if (!r.__c.__H)
332
- return !0;
333
- var h = r.__c.__H.__.filter(function(u) {
334
- return u.__c;
280
+ var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, d);
281
+ a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
282
+ }], r.__c = q, !q.u)) {
283
+ var o = function(d, a, u) {
284
+ if (!r.__c.__H) return !0;
285
+ var h = r.__c.__H.__.filter(function(p) {
286
+ return p.__c;
335
287
  });
336
- if (h.every(function(u) {
337
- return !u.__N;
338
- }))
339
- return !i || i.call(this, d, l, p);
288
+ if (h.every(function(p) {
289
+ return !p.__N;
290
+ })) return !i || i.call(this, d, a, u);
340
291
  var c = !1;
341
- return h.forEach(function(u) {
342
- if (u.__N) {
343
- var m = u.__[0];
344
- u.__ = u.__N, u.__N = void 0, m !== u.__[0] && (c = !0);
292
+ return h.forEach(function(p) {
293
+ if (p.__N) {
294
+ var m = p.__[0];
295
+ p.__ = p.__N, p.__N = void 0, m !== p.__[0] && (c = !0);
345
296
  }
346
- }), !(!c && r.__c.props === d) && (!i || i.call(this, d, l, p));
297
+ }), !(!c && r.__c.props === d) && (!i || i.call(this, d, a, u));
347
298
  };
348
- z.u = !0;
349
- var i = z.shouldComponentUpdate, s = z.componentWillUpdate;
350
- z.componentWillUpdate = function(d, l, p) {
299
+ q.u = !0;
300
+ var i = q.shouldComponentUpdate, s = q.componentWillUpdate;
301
+ q.componentWillUpdate = function(d, a, u) {
351
302
  if (this.__e) {
352
303
  var h = i;
353
- i = void 0, o(d, l, p), i = h;
304
+ i = void 0, o(d, a, u), i = h;
354
305
  }
355
- s && s.call(this, d, l, p);
356
- }, z.shouldComponentUpdate = o;
306
+ s && s.call(this, d, a, u);
307
+ }, q.shouldComponentUpdate = o;
357
308
  }
358
309
  return r.__N || r.__;
359
310
  }
360
- function K(e, t) {
361
- var n = we(me++, 3);
362
- !P.__s && Tt(n.__H, t) && (n.__ = e, n.i = t, z.__H.__h.push(n));
311
+ function F(e, t) {
312
+ var n = be(de++, 3);
313
+ !P.__s && Ct(n.__H, t) && (n.__ = e, n.i = t, q.__H.__h.push(n));
363
314
  }
364
- function Oe(e, t) {
365
- var n = we(me++, 4);
366
- !P.__s && Tt(n.__H, t) && (n.__ = e, n.i = t, z.__h.push(n));
315
+ function De(e, t) {
316
+ var n = be(de++, 4);
317
+ !P.__s && Ct(n.__H, t) && (n.__ = e, n.i = t, q.__h.push(n));
367
318
  }
368
- function te(e) {
369
- return Te = 5, Ue(function() {
319
+ function J(e) {
320
+ return Ee = 5, Re(function() {
370
321
  return { current: e };
371
322
  }, []);
372
323
  }
373
324
  function $n(e, t, n) {
374
- Te = 6, Oe(function() {
325
+ Ee = 6, De(function() {
375
326
  return typeof e == "function" ? (e(t()), function() {
376
327
  return e(null);
377
328
  }) : e ? (e.current = t(), function() {
@@ -379,94 +330,91 @@ function $n(e, t, n) {
379
330
  }) : void 0;
380
331
  }, n == null ? n : n.concat(e));
381
332
  }
382
- function Ue(e, t) {
383
- var n = we(me++, 7);
384
- return Tt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
333
+ function Re(e, t) {
334
+ var n = be(de++, 7);
335
+ return Ct(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
385
336
  }
386
- function Ke(e, t) {
387
- return Te = 8, Ue(function() {
337
+ function ze(e, t) {
338
+ return Ee = 8, Re(function() {
388
339
  return e;
389
340
  }, t);
390
341
  }
391
342
  function Fn(e) {
392
- var t = z.context[e.__c], n = we(me++, 9);
393
- return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(z)), t.props.value) : e.__;
343
+ var t = q.context[e.__c], n = be(de++, 9);
344
+ return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(q)), t.props.value) : e.__;
394
345
  }
395
- function It(e, t) {
346
+ function wt(e, t) {
396
347
  P.useDebugValue && P.useDebugValue(t ? t(e) : e);
397
348
  }
398
349
  function Wn() {
399
- var e = we(me++, 11);
350
+ var e = be(de++, 11);
400
351
  if (!e.__) {
401
- for (var t = z.__v; t !== null && !t.__m && t.__ !== null; )
402
- t = t.__;
352
+ for (var t = q.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
403
353
  var n = t.__m || (t.__m = [0, 0]);
404
354
  e.__ = "P" + n[0] + "-" + n[1]++;
405
355
  }
406
356
  return e.__;
407
357
  }
408
358
  function oo() {
409
- for (var e; e = zn.shift(); )
410
- if (e.__P && e.__H)
411
- try {
412
- e.__H.__h.forEach(Ve), e.__H.__h.forEach(_t), e.__H.__h = [];
413
- } catch (t) {
414
- e.__H.__h = [], P.__e(t, e.__v);
415
- }
359
+ for (var e; e = zn.shift(); ) if (e.__P && e.__H) try {
360
+ e.__H.__h.forEach(Ue), e.__H.__h.forEach(ht), e.__H.__h = [];
361
+ } catch (t) {
362
+ e.__H.__h = [], P.__e(t, e.__v);
363
+ }
416
364
  }
417
365
  P.__b = function(e) {
418
- z = null, Zt && Zt(e);
366
+ q = null, Vt && Vt(e);
419
367
  }, P.__r = function(e) {
420
- Gt && Gt(e), me = 0;
421
- var t = (z = e.__c).__H;
422
- t && (rt === z ? (t.__h = [], z.__h = [], t.__.forEach(function(n) {
423
- n.__N && (n.__ = n.__N), n.__V = qe, n.__N = n.i = void 0;
424
- })) : (t.__h.forEach(Ve), t.__h.forEach(_t), t.__h = [], me = 0)), rt = z;
368
+ zt && zt(e), de = 0;
369
+ var t = (q = e.__c).__H;
370
+ t && (Qe === q ? (t.__h = [], q.__h = [], t.__.forEach(function(n) {
371
+ n.__N && (n.__ = n.__N), n.__V = Oe, n.__N = n.i = void 0;
372
+ })) : (t.__h.forEach(Ue), t.__h.forEach(ht), t.__h = [], de = 0)), Qe = q;
425
373
  }, P.diffed = function(e) {
426
- Kt && Kt(e);
374
+ $t && $t(e);
427
375
  var t = e.__c;
428
- t && t.__H && (t.__H.__h.length && (zn.push(t) !== 1 && Wt === P.requestAnimationFrame || ((Wt = P.requestAnimationFrame) || io)(oo)), t.__H.__.forEach(function(n) {
429
- n.i && (n.__H = n.i), n.__V !== qe && (n.__ = n.__V), n.i = void 0, n.__V = qe;
430
- })), rt = z = null;
376
+ t && t.__H && (t.__H.__h.length && (zn.push(t) !== 1 && qt === P.requestAnimationFrame || ((qt = P.requestAnimationFrame) || io)(oo)), t.__H.__.forEach(function(n) {
377
+ n.i && (n.__H = n.i), n.__V !== Oe && (n.__ = n.__V), n.i = void 0, n.__V = Oe;
378
+ })), Qe = q = null;
431
379
  }, P.__c = function(e, t) {
432
380
  t.some(function(n) {
433
381
  try {
434
- n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
435
- return !r.__ || _t(r);
382
+ n.__h.forEach(Ue), n.__h = n.__h.filter(function(r) {
383
+ return !r.__ || ht(r);
436
384
  });
437
385
  } catch (r) {
438
386
  t.some(function(o) {
439
387
  o.__h && (o.__h = []);
440
388
  }), t = [], P.__e(r, n.__v);
441
389
  }
442
- }), Yt && Yt(e, t);
390
+ }), Ft && Ft(e, t);
443
391
  }, P.unmount = function(e) {
444
- Qt && Qt(e);
392
+ Wt && Wt(e);
445
393
  var t, n = e.__c;
446
394
  n && n.__H && (n.__H.__.forEach(function(r) {
447
395
  try {
448
- Ve(r);
396
+ Ue(r);
449
397
  } catch (o) {
450
398
  t = o;
451
399
  }
452
400
  }), n.__H = void 0, t && P.__e(t, n.__v));
453
401
  };
454
- var Jt = typeof requestAnimationFrame == "function";
402
+ var Zt = typeof requestAnimationFrame == "function";
455
403
  function io(e) {
456
404
  var t, n = function() {
457
- clearTimeout(r), Jt && cancelAnimationFrame(t), setTimeout(e);
405
+ clearTimeout(r), Zt && cancelAnimationFrame(t), setTimeout(e);
458
406
  }, r = setTimeout(n, 100);
459
- Jt && (t = requestAnimationFrame(n));
407
+ Zt && (t = requestAnimationFrame(n));
460
408
  }
461
- function Ve(e) {
462
- var t = z, n = e.__c;
463
- typeof n == "function" && (e.__c = void 0, n()), z = t;
409
+ function Ue(e) {
410
+ var t = q, n = e.__c;
411
+ typeof n == "function" && (e.__c = void 0, n()), q = t;
464
412
  }
465
- function _t(e) {
466
- var t = z;
467
- e.__c = e.__(), z = t;
413
+ function ht(e) {
414
+ var t = q;
415
+ e.__c = e.__(), q = t;
468
416
  }
469
- function Tt(e, t) {
417
+ function Ct(e, t) {
470
418
  return !e || e.length !== t.length || t.some(function(n, r) {
471
419
  return n !== e[r];
472
420
  });
@@ -475,66 +423,58 @@ function Zn(e, t) {
475
423
  return typeof t == "function" ? t(e) : t;
476
424
  }
477
425
  function Gn(e, t) {
478
- for (var n in t)
479
- e[n] = t[n];
426
+ for (var n in t) e[n] = t[n];
480
427
  return e;
481
428
  }
482
- function bt(e, t) {
483
- for (var n in e)
484
- if (n !== "__source" && !(n in t))
485
- return !0;
486
- for (var r in t)
487
- if (r !== "__source" && e[r] !== t[r])
488
- return !0;
429
+ function mt(e, t) {
430
+ for (var n in e) if (n !== "__source" && !(n in t)) return !0;
431
+ for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
489
432
  return !1;
490
433
  }
491
- function Ye(e) {
434
+ function $e(e) {
492
435
  this.props = e;
493
436
  }
494
437
  function Kn(e, t) {
495
438
  function n(o) {
496
439
  var i = this.props.ref, s = i == o.ref;
497
- return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : bt(this.props, o);
440
+ return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : mt(this.props, o);
498
441
  }
499
442
  function r(o) {
500
- return this.shouldComponentUpdate = n, F(e, o);
443
+ return this.shouldComponentUpdate = n, V(e, o);
501
444
  }
502
445
  return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
503
446
  }
504
- (Ye.prototype = new se()).isPureReactComponent = !0, Ye.prototype.shouldComponentUpdate = function(e, t) {
505
- return bt(this.props, e) || bt(this.state, t);
447
+ ($e.prototype = new te()).isPureReactComponent = !0, $e.prototype.shouldComponentUpdate = function(e, t) {
448
+ return mt(this.props, e) || mt(this.state, t);
506
449
  };
507
- var Xt = P.__b;
450
+ var Gt = P.__b;
508
451
  P.__b = function(e) {
509
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Xt && Xt(e);
452
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Gt && Gt(e);
510
453
  };
511
454
  var so = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
512
- function Pt(e) {
455
+ function Et(e) {
513
456
  function t(n) {
514
457
  var r = Gn({}, n);
515
458
  return delete r.ref, e(r, n.ref || null);
516
459
  }
517
460
  return t.$$typeof = so, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
518
461
  }
519
- var en = function(e, t) {
520
- return e == null ? null : he(he(e).map(t));
521
- }, Yn = { map: en, forEach: en, count: function(e) {
522
- return e ? he(e).length : 0;
462
+ var Kt = function(e, t) {
463
+ return e == null ? null : le(le(e).map(t));
464
+ }, Yn = { map: Kt, forEach: Kt, count: function(e) {
465
+ return e ? le(e).length : 0;
523
466
  }, only: function(e) {
524
- var t = he(e);
525
- if (t.length !== 1)
526
- throw "Children.only";
467
+ var t = le(e);
468
+ if (t.length !== 1) throw "Children.only";
527
469
  return t[0];
528
- }, toArray: he }, ao = P.__e;
470
+ }, toArray: le }, ao = P.__e;
529
471
  P.__e = function(e, t, n, r) {
530
472
  if (e.then) {
531
- for (var o, i = t; i = i.__; )
532
- if ((o = i.__c) && o.__c)
533
- return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
473
+ for (var o, i = t; i = i.__; ) if ((o = i.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
534
474
  }
535
475
  ao(e, t, n, r);
536
476
  };
537
- var tn = P.unmount;
477
+ var Yt = P.unmount;
538
478
  function Qn(e, t, n) {
539
479
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
540
480
  typeof r.__c == "function" && r.__c();
@@ -547,7 +487,7 @@ function Jn(e, t, n) {
547
487
  return Jn(r, t, n);
548
488
  }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
549
489
  }
550
- function Ne() {
490
+ function Ie() {
551
491
  this.__u = 0, this.t = null, this.__b = null;
552
492
  }
553
493
  function Xn(e) {
@@ -561,21 +501,19 @@ function er(e) {
561
501
  n = s.default || s;
562
502
  }, function(s) {
563
503
  r = s;
564
- }), r)
565
- throw r;
566
- if (!n)
567
- throw t;
568
- return F(n, i);
504
+ }), r) throw r;
505
+ if (!n) throw t;
506
+ return V(n, i);
569
507
  }
570
508
  return o.displayName = "Lazy", o.__f = !0, o;
571
509
  }
572
- function Ee() {
510
+ function xe() {
573
511
  this.u = null, this.o = null;
574
512
  }
575
513
  P.unmount = function(e) {
576
514
  var t = e.__c;
577
- t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), tn && tn(e);
578
- }, (Ne.prototype = new se()).__c = function(e, t) {
515
+ t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Yt && Yt(e);
516
+ }, (Ie.prototype = new te()).__c = function(e, t) {
579
517
  var n = t.__c, r = this;
580
518
  r.t == null && (r.t = []), r.t.push(n);
581
519
  var o = Xn(r.__v), i = !1, s = function() {
@@ -585,18 +523,17 @@ P.unmount = function(e) {
585
523
  var d = function() {
586
524
  if (!--r.__u) {
587
525
  if (r.state.__a) {
588
- var l = r.state.__a;
589
- r.__v.__k[0] = Jn(l, l.__c.__P, l.__c.__O);
526
+ var a = r.state.__a;
527
+ r.__v.__k[0] = Jn(a, a.__c.__P, a.__c.__O);
590
528
  }
591
- var p;
592
- for (r.setState({ __a: r.__b = null }); p = r.t.pop(); )
593
- p.forceUpdate();
529
+ var u;
530
+ for (r.setState({ __a: r.__b = null }); u = r.t.pop(); ) u.forceUpdate();
594
531
  }
595
532
  };
596
533
  r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
597
- }, Ne.prototype.componentWillUnmount = function() {
534
+ }, Ie.prototype.componentWillUnmount = function() {
598
535
  this.t = [];
599
- }, Ne.prototype.render = function(e, t) {
536
+ }, Ie.prototype.render = function(e, t) {
600
537
  if (this.__b) {
601
538
  if (this.__v.__k) {
602
539
  var n = document.createElement("div"), r = this.__v.__k[0].__c;
@@ -604,18 +541,15 @@ P.unmount = function(e) {
604
541
  }
605
542
  this.__b = null;
606
543
  }
607
- var o = t.__a && F(Y, null, e.fallback);
608
- return o && (o.__u &= -33), [F(Y, null, t.__a ? null : e.children), o];
544
+ var o = t.__a && V(Z, null, e.fallback);
545
+ return o && (o.__u &= -33), [V(Z, null, t.__a ? null : e.children), o];
609
546
  };
610
- var nn = function(e, t, n) {
611
- if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
612
- for (n = e.u; n; ) {
613
- for (; n.length > 3; )
614
- n.pop()();
615
- if (n[1] < n[0])
616
- break;
617
- e.u = n = n[2];
618
- }
547
+ var Qt = function(e, t, n) {
548
+ if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (n = e.u; n; ) {
549
+ for (; n.length > 3; ) n.pop()();
550
+ if (n[1] < n[0]) break;
551
+ e.u = n = n[2];
552
+ }
619
553
  };
620
554
  function lo(e) {
621
555
  return this.getChildContext = function() {
@@ -625,57 +559,56 @@ function lo(e) {
625
559
  function co(e) {
626
560
  var t = this, n = e.i;
627
561
  t.componentWillUnmount = function() {
628
- Ie(null, t.l), t.l = null, t.i = null;
562
+ Ce(null, t.l), t.l = null, t.i = null;
629
563
  }, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
630
564
  this.childNodes.push(r), t.i.appendChild(r);
631
565
  }, insertBefore: function(r, o) {
632
566
  this.childNodes.push(r), t.i.appendChild(r);
633
567
  }, removeChild: function(r) {
634
568
  this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
635
- } }), Ie(F(lo, { context: t.context }, e.__v), t.l);
569
+ } }), Ce(V(lo, { context: t.context }, e.__v), t.l);
636
570
  }
637
571
  function tr(e, t) {
638
- var n = F(co, { __v: e, i: t });
572
+ var n = V(co, { __v: e, i: t });
639
573
  return n.containerInfo = t, n;
640
574
  }
641
- (Ee.prototype = new se()).__a = function(e) {
575
+ (xe.prototype = new te()).__a = function(e) {
642
576
  var t = this, n = Xn(t.__v), r = t.o.get(e);
643
577
  return r[0]++, function(o) {
644
578
  var i = function() {
645
- t.props.revealOrder ? (r.push(o), nn(t, e, r)) : o();
579
+ t.props.revealOrder ? (r.push(o), Qt(t, e, r)) : o();
646
580
  };
647
581
  n ? n(i) : i();
648
582
  };
649
- }, Ee.prototype.render = function(e) {
583
+ }, xe.prototype.render = function(e) {
650
584
  this.u = null, this.o = /* @__PURE__ */ new Map();
651
- var t = he(e.children);
585
+ var t = le(e.children);
652
586
  e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
653
- for (var n = t.length; n--; )
654
- this.o.set(t[n], this.u = [1, 0, this.u]);
587
+ for (var n = t.length; n--; ) this.o.set(t[n], this.u = [1, 0, this.u]);
655
588
  return e.children;
656
- }, Ee.prototype.componentDidUpdate = Ee.prototype.componentDidMount = function() {
589
+ }, xe.prototype.componentDidUpdate = xe.prototype.componentDidMount = function() {
657
590
  var e = this;
658
591
  this.o.forEach(function(t, n) {
659
- nn(e, n, t);
592
+ Qt(e, n, t);
660
593
  });
661
594
  };
662
595
  var nr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, uo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, po = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ho = /[A-Z0-9]/g, mo = typeof document < "u", go = function(e) {
663
596
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
664
597
  };
665
598
  function rr(e, t, n) {
666
- return t.__k == null && (t.textContent = ""), Ie(e, t), typeof n == "function" && n(), e ? e.__c : null;
599
+ return t.__k == null && (t.textContent = ""), Ce(e, t), typeof n == "function" && n(), e ? e.__c : null;
667
600
  }
668
601
  function or(e, t, n) {
669
602
  return qn(e, t), typeof n == "function" && n(), e ? e.__c : null;
670
603
  }
671
- se.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
672
- Object.defineProperty(se.prototype, e, { configurable: !0, get: function() {
604
+ te.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
605
+ Object.defineProperty(te.prototype, e, { configurable: !0, get: function() {
673
606
  return this["UNSAFE_" + e];
674
607
  }, set: function(t) {
675
608
  Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
676
609
  } });
677
610
  });
678
- var rn = P.event;
611
+ var Jt = P.event;
679
612
  function vo() {
680
613
  }
681
614
  function fo() {
@@ -685,11 +618,11 @@ function _o() {
685
618
  return this.defaultPrevented;
686
619
  }
687
620
  P.event = function(e) {
688
- return rn && (e = rn(e)), e.persist = vo, e.isPropagationStopped = fo, e.isDefaultPrevented = _o, e.nativeEvent = e;
621
+ return Jt && (e = Jt(e)), e.persist = vo, e.isPropagationStopped = fo, e.isDefaultPrevented = _o, e.nativeEvent = e;
689
622
  };
690
- var Dt, bo = { enumerable: !1, configurable: !0, get: function() {
623
+ var St, bo = { enumerable: !1, configurable: !0, get: function() {
691
624
  return this.class;
692
- } }, on = P.vnode;
625
+ } }, Xt = P.vnode;
693
626
  P.vnode = function(e) {
694
627
  typeof e.type == "string" && function(t) {
695
628
  var n = t.props, r = t.type, o = {};
@@ -700,40 +633,40 @@ P.vnode = function(e) {
700
633
  i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : d === "ondoubleclick" ? i = "ondblclick" : d !== "onchange" || r !== "input" && r !== "textarea" || go(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : po.test(i) ? i = d : r.indexOf("-") === -1 && uo.test(i) ? i = i.replace(ho, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
701
634
  }
702
635
  }
703
- r == "select" && o.multiple && Array.isArray(o.value) && (o.value = he(n.children).forEach(function(l) {
704
- l.props.selected = o.value.indexOf(l.props.value) != -1;
705
- })), r == "select" && o.defaultValue != null && (o.value = he(n.children).forEach(function(l) {
706
- l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
636
+ r == "select" && o.multiple && Array.isArray(o.value) && (o.value = le(n.children).forEach(function(a) {
637
+ a.props.selected = o.value.indexOf(a.props.value) != -1;
638
+ })), r == "select" && o.defaultValue != null && (o.value = le(n.children).forEach(function(a) {
639
+ a.props.selected = o.multiple ? o.defaultValue.indexOf(a.props.value) != -1 : o.defaultValue == a.props.value;
707
640
  })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", bo)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
708
- }(e), e.$$typeof = nr, on && on(e);
641
+ }(e), e.$$typeof = nr, Xt && Xt(e);
709
642
  };
710
- var sn = P.__r;
643
+ var en = P.__r;
711
644
  P.__r = function(e) {
712
- sn && sn(e), Dt = e.__c;
645
+ en && en(e), St = e.__c;
713
646
  };
714
- var an = P.diffed;
647
+ var tn = P.diffed;
715
648
  P.diffed = function(e) {
716
- an && an(e);
649
+ tn && tn(e);
717
650
  var t = e.props, n = e.__e;
718
- n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Dt = null;
651
+ n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), St = null;
719
652
  };
720
653
  var ir = { ReactCurrentDispatcher: { current: { readContext: function(e) {
721
- return Dt.__n[e.__c].props.value;
654
+ return St.__n[e.__c].props.value;
722
655
  } } } };
723
656
  function sr(e) {
724
- return F.bind(null, e);
657
+ return V.bind(null, e);
725
658
  }
726
- function He(e) {
659
+ function Ne(e) {
727
660
  return !!e && e.$$typeof === nr;
728
661
  }
729
662
  function ar(e) {
730
- return He(e) && e.type === Y;
663
+ return Ne(e) && e.type === Z;
731
664
  }
732
665
  function lr(e) {
733
- return He(e) ? ro.apply(null, arguments) : e;
666
+ return Ne(e) ? no.apply(null, arguments) : e;
734
667
  }
735
668
  function dr(e) {
736
- return !!e.__k && (Ie(null, e), !0);
669
+ return !!e.__k && (Ce(null, e), !0);
737
670
  }
738
671
  function cr(e) {
739
672
  return e && (e.base || e.nodeType === 1 && e) || null;
@@ -742,28 +675,28 @@ var ur = function(e, t) {
742
675
  return e(t);
743
676
  }, pr = function(e, t) {
744
677
  return e(t);
745
- }, hr = Y;
746
- function Rt(e) {
678
+ }, hr = Z;
679
+ function jt(e) {
747
680
  e();
748
681
  }
749
682
  function mr(e) {
750
683
  return e;
751
684
  }
752
685
  function gr() {
753
- return [!1, Rt];
686
+ return [!1, jt];
754
687
  }
755
- var vr = Oe, fr = He;
688
+ var vr = De, fr = Ne;
756
689
  function _r(e, t) {
757
- var n = t(), r = W({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
758
- return Oe(function() {
759
- o.__ = n, o.v = t, ot(o) && i({ h: o });
760
- }, [e, n, t]), K(function() {
761
- return ot(o) && i({ h: o }), e(function() {
762
- ot(o) && i({ h: o });
690
+ var n = t(), r = z({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
691
+ return De(function() {
692
+ o.__ = n, o.v = t, Je(o) && i({ h: o });
693
+ }, [e, n, t]), F(function() {
694
+ return Je(o) && i({ h: o }), e(function() {
695
+ Je(o) && i({ h: o });
763
696
  });
764
697
  }, [e]), n;
765
698
  }
766
- function ot(e) {
699
+ function Je(e) {
767
700
  var t, n, r = e.v, o = e.__;
768
701
  try {
769
702
  var i = r();
@@ -772,21 +705,21 @@ function ot(e) {
772
705
  return !0;
773
706
  }
774
707
  }
775
- var yo = { useState: W, useId: Wn, useReducer: jt, useEffect: K, useLayoutEffect: Oe, useInsertionEffect: vr, useTransition: gr, useDeferredValue: mr, useSyncExternalStore: _r, startTransition: Rt, useRef: te, useImperativeHandle: $n, useMemo: Ue, useCallback: Ke, useContext: Fn, useDebugValue: It, version: "17.0.2", Children: Yn, render: rr, hydrate: or, unmountComponentAtNode: dr, createPortal: tr, createElement: F, createContext: Vn, createFactory: sr, cloneElement: lr, createRef: Un, Fragment: Y, isValidElement: He, isElement: fr, isFragment: ar, findDOMNode: cr, Component: se, PureComponent: Ye, memo: Kn, forwardRef: Pt, flushSync: pr, unstable_batchedUpdates: ur, StrictMode: hr, Suspense: Ne, SuspenseList: Ee, lazy: er, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir };
776
- const xo = Object.freeze(Object.defineProperty({ __proto__: null, Children: Yn, Component: se, Fragment: Y, PureComponent: Ye, StrictMode: hr, Suspense: Ne, SuspenseList: Ee, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir, cloneElement: lr, createContext: Vn, createElement: F, createFactory: sr, createPortal: tr, createRef: Un, default: yo, findDOMNode: cr, flushSync: pr, forwardRef: Pt, hydrate: or, isElement: fr, isFragment: ar, isValidElement: He, lazy: er, memo: Kn, render: rr, startTransition: Rt, unmountComponentAtNode: dr, unstable_batchedUpdates: ur, useCallback: Ke, useContext: Fn, useDebugValue: It, useDeferredValue: mr, useEffect: K, useErrorBoundary: function(e) {
777
- var t = we(me++, 10), n = W();
778
- return t.__ = e, z.componentDidCatch || (z.componentDidCatch = function(r, o) {
708
+ var yo = { useState: z, useId: Wn, useReducer: kt, useEffect: F, useLayoutEffect: De, useInsertionEffect: vr, useTransition: gr, useDeferredValue: mr, useSyncExternalStore: _r, startTransition: jt, useRef: J, useImperativeHandle: $n, useMemo: Re, useCallback: ze, useContext: Fn, useDebugValue: wt, version: "17.0.2", Children: Yn, render: rr, hydrate: or, unmountComponentAtNode: dr, createPortal: tr, createElement: V, createContext: Vn, createFactory: sr, cloneElement: lr, createRef: On, Fragment: Z, isValidElement: Ne, isElement: fr, isFragment: ar, findDOMNode: cr, Component: te, PureComponent: $e, memo: Kn, forwardRef: Et, flushSync: pr, unstable_batchedUpdates: ur, StrictMode: hr, Suspense: Ie, SuspenseList: xe, lazy: er, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir };
709
+ const xo = Object.freeze(Object.defineProperty({ __proto__: null, Children: Yn, Component: te, Fragment: Z, PureComponent: $e, StrictMode: hr, Suspense: Ie, SuspenseList: xe, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir, cloneElement: lr, createContext: Vn, createElement: V, createFactory: sr, createPortal: tr, createRef: On, default: yo, findDOMNode: cr, flushSync: pr, forwardRef: Et, hydrate: or, isElement: fr, isFragment: ar, isValidElement: Ne, lazy: er, memo: Kn, render: rr, startTransition: jt, unmountComponentAtNode: dr, unstable_batchedUpdates: ur, useCallback: ze, useContext: Fn, useDebugValue: wt, useDeferredValue: mr, useEffect: F, useErrorBoundary: function(e) {
710
+ var t = be(de++, 10), n = z();
711
+ return t.__ = e, q.componentDidCatch || (q.componentDidCatch = function(r, o) {
779
712
  t.__ && t.__(r, o), n[1](r);
780
713
  }), [n[0], function() {
781
714
  n[1](void 0);
782
715
  }];
783
- }, useId: Wn, useImperativeHandle: $n, useInsertionEffect: vr, useLayoutEffect: Oe, useMemo: Ue, useReducer: jt, useRef: te, useState: W, useSyncExternalStore: _r, useTransition: gr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), ln = (e) => {
716
+ }, useId: Wn, useImperativeHandle: $n, useInsertionEffect: vr, useLayoutEffect: De, useMemo: Re, useReducer: kt, useRef: J, useState: z, useSyncExternalStore: _r, useTransition: gr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), nn = (e) => {
784
717
  let t;
785
718
  const n = /* @__PURE__ */ new Set(), r = (s, d) => {
786
- const l = typeof s == "function" ? s(t) : s;
787
- if (!Object.is(l, t)) {
788
- const p = t;
789
- t = d ?? typeof l != "object" ? l : Object.assign({}, t, l), n.forEach((h) => h(t, p));
719
+ const a = typeof s == "function" ? s(t) : s;
720
+ if (!Object.is(a, t)) {
721
+ const u = t;
722
+ t = d ?? typeof a != "object" ? a : Object.assign({}, t, a), n.forEach((h) => h(t, u));
790
723
  }
791
724
  }, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
792
725
  return t = e(r, o, i), i;
@@ -795,16 +728,14 @@ function ko(e) {
795
728
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
796
729
  }
797
730
  function wo(e) {
798
- if (e.__esModule)
799
- return e;
731
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
800
732
  var t = e.default;
801
733
  if (typeof t == "function") {
802
734
  var n = function r() {
803
735
  return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
804
736
  };
805
737
  n.prototype = t.prototype;
806
- } else
807
- n = {};
738
+ } else n = {};
808
739
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
809
740
  var o = Object.getOwnPropertyDescriptor(e, r);
810
741
  Object.defineProperty(n, r, o.get ? o : { enumerable: !0, get: function() {
@@ -812,87 +743,93 @@ function wo(e) {
812
743
  } });
813
744
  }), n;
814
745
  }
815
- var br = { exports: {} }, dn = {};
816
- const yr = wo(xo);
817
- var xr = { exports: {} }, cn = {}, Pe = yr, Co = typeof Object.is == "function" ? Object.is : function(e, t) {
818
- return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
819
- }, Eo = Pe.useState, So = Pe.useEffect, jo = Pe.useLayoutEffect, Io = Pe.useDebugValue;
820
- function it(e) {
821
- var t = e.getSnapshot;
822
- e = e.value;
823
- try {
824
- var n = t();
825
- return !Co(e, n);
826
- } catch {
827
- return !0;
828
- }
829
- }
830
- var To = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(e, t) {
831
- return t();
832
- } : function(e, t) {
833
- var n = t(), r = Eo({ inst: { value: n, getSnapshot: t } }), o = r[0].inst, i = r[1];
834
- return jo(function() {
835
- o.value = n, o.getSnapshot = t, it(o) && i({ inst: o });
836
- }, [e, n, t]), So(function() {
837
- return it(o) && i({ inst: o }), e(function() {
838
- it(o) && i({ inst: o });
839
- });
840
- }, [e]), Io(n), n;
841
- };
842
- cn.useSyncExternalStore = Pe.useSyncExternalStore !== void 0 ? Pe.useSyncExternalStore : To, xr.exports = cn;
843
- var Xe = yr, Po = xr.exports, Do = typeof Object.is == "function" ? Object.is : function(e, t) {
844
- return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
845
- }, Ro = Po.useSyncExternalStore, No = Xe.useRef, Lo = Xe.useEffect, Mo = Xe.useMemo, Oo = Xe.useDebugValue;
846
- dn.useSyncExternalStoreWithSelector = function(e, t, n, r, o) {
847
- var i = No(null);
848
- if (i.current === null) {
849
- var s = { hasValue: !1, value: null };
850
- i.current = s;
851
- } else
852
- s = i.current;
853
- i = Mo(function() {
854
- function l(m) {
855
- if (!c) {
856
- if (c = !0, p = m, m = r(m), o !== void 0 && s.hasValue) {
857
- var g = s.value;
858
- if (o(g, m))
859
- return h = g;
860
- }
861
- return h = m;
746
+ var rn = { exports: {} }, Xe = {};
747
+ const br = wo(xo);
748
+ var on, sn, an, ln, dn = { exports: {} }, et = {};
749
+ function Co() {
750
+ return sn || (sn = 1, dn.exports = function() {
751
+ if (on) return et;
752
+ on = 1;
753
+ var e = br, t = typeof Object.is == "function" ? Object.is : function(a, u) {
754
+ return a === u && (a !== 0 || 1 / a == 1 / u) || a != a && u != u;
755
+ }, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
756
+ function s(a) {
757
+ var u = a.getSnapshot;
758
+ a = a.value;
759
+ try {
760
+ var h = u();
761
+ return !t(a, h);
762
+ } catch {
763
+ return !0;
862
764
  }
863
- if (g = h, Do(p, m))
864
- return g;
865
- var f = r(m);
866
- return o !== void 0 && o(g, f) ? g : (p = m, h = f);
867
765
  }
868
- var p, h, c = !1, u = n === void 0 ? null : n;
869
- return [function() {
870
- return l(t());
871
- }, u === null ? void 0 : function() {
872
- return l(u());
873
- }];
874
- }, [t, n, r, o]);
875
- var d = Ro(e, i[0], i[1]);
876
- return Lo(function() {
877
- s.hasValue = !0, s.value = d;
878
- }, [d]), Oo(d), d;
879
- }, br.exports = dn;
880
- const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (e) => {
881
- const t = typeof e == "function" ? ((r) => r ? ln(r) : ln)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
882
- const l = Ho(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
883
- return It(l), l;
766
+ var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(a, u) {
767
+ return u();
768
+ } : function(a, u) {
769
+ var h = u(), c = n({ inst: { value: h, getSnapshot: u } }), p = c[0].inst, m = c[1];
770
+ return o(function() {
771
+ p.value = h, p.getSnapshot = u, s(p) && m({ inst: p });
772
+ }, [a, h, u]), r(function() {
773
+ return s(p) && m({ inst: p }), a(function() {
774
+ s(p) && m({ inst: p });
775
+ });
776
+ }, [a]), i(h), h;
777
+ };
778
+ return et.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, et;
779
+ }()), dn.exports;
780
+ }
781
+ var Eo = (ln || (ln = 1, rn.exports = function() {
782
+ if (an) return Xe;
783
+ an = 1;
784
+ var e = br, t = Co(), n = typeof Object.is == "function" ? Object.is : function(a, u) {
785
+ return a === u && (a !== 0 || 1 / a == 1 / u) || a != a && u != u;
786
+ }, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, s = e.useMemo, d = e.useDebugValue;
787
+ return Xe.useSyncExternalStoreWithSelector = function(a, u, h, c, p) {
788
+ var m = o(null);
789
+ if (m.current === null) {
790
+ var g = { hasValue: !1, value: null };
791
+ m.current = g;
792
+ } else g = m.current;
793
+ m = s(function() {
794
+ function v(w) {
795
+ if (!T) {
796
+ if (T = !0, _ = w, w = c(w), p !== void 0 && g.hasValue) {
797
+ var x = g.value;
798
+ if (p(x, w)) return f = x;
799
+ }
800
+ return f = w;
801
+ }
802
+ if (x = f, n(_, w)) return x;
803
+ var j = c(w);
804
+ return p !== void 0 && p(x, j) ? x : (_ = w, f = j);
805
+ }
806
+ var _, f, T = !1, S = h === void 0 ? null : h;
807
+ return [function() {
808
+ return v(u());
809
+ }, S === null ? void 0 : function() {
810
+ return v(S());
811
+ }];
812
+ }, [u, h, c, p]);
813
+ var b = r(a, m[0], m[1]);
814
+ return i(function() {
815
+ g.hasValue = !0, g.value = b;
816
+ }, [b]), d(b), b;
817
+ }, Xe;
818
+ }()), rn.exports);
819
+ const So = ko(Eo), { useSyncExternalStoreWithSelector: jo } = So, cn = (e) => {
820
+ const t = typeof e == "function" ? ((r) => r ? nn(r) : nn)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
821
+ const a = jo(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
822
+ return wt(a), a;
884
823
  }(t, r, o);
885
824
  return Object.assign(n, t), n;
886
- }, kr = (e) => e ? un(e) : un, Ao = 1, Bo = 2, Nt = { eq: (e, t) => e == t, neq(e, t) {
825
+ }, yr = (e) => e ? cn(e) : cn, Io = 1, To = 2, It = { eq: (e, t) => e == t, neq(e, t) {
887
826
  return !this.eq(e, t);
888
827
  }, gt: (e, t) => e > t, gte: (e, t) => e >= t, lt: (e, t) => e < t, lte: (e, t) => e <= t, list_exact: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && e.slice().sort().join(",") === t.slice().sort().join(","), list_all: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && !t.some((n) => e.indexOf(n) === -1), list_alo(e, t) {
889
- if (!Array.isArray(t))
890
- return !1;
828
+ if (!Array.isArray(t)) return !1;
891
829
  const n = Array.isArray(e) ? e : [e], r = new Set(n);
892
830
  return t.some((o) => r.has(o));
893
831
  }, list_dni(e, t) {
894
- if (!Array.isArray(t))
895
- return !1;
832
+ if (!Array.isArray(t)) return !1;
896
833
  const n = Array.isArray(e) ? e : [e], r = new Set(n);
897
834
  return t.every((o) => !r.has(o));
898
835
  }, contains(e, t) {
@@ -900,7 +837,7 @@ const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (
900
837
  return n.includes(r);
901
838
  }, notcontains(e, t) {
902
839
  return !this.contains(e, t);
903
- } }, qo = (e, t, n) => {
840
+ } }, Po = (e, t, n) => {
904
841
  switch (t) {
905
842
  case "videovoice":
906
843
  return !!(e && e.value);
@@ -923,109 +860,100 @@ const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (
923
860
  default:
924
861
  return !0;
925
862
  }
926
- }, wr = (e, t) => {
863
+ }, xr = (e, t) => {
927
864
  if (t === "matrix") {
928
865
  const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
929
866
  return r > 0 && r < n;
930
867
  }
931
868
  return !1;
932
- }, Cr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
933
- if (t >= e.length || t < 0)
934
- return null;
869
+ }, kr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
870
+ if (t >= e.length || t < 0) return null;
935
871
  const i = e[t];
936
872
  let s = t + 1;
937
873
  const d = i.props.routingOptions || [];
938
874
  for (let h = 0; h < d.length; h++) {
939
- const { group: c, target: u } = d[h];
940
- if (!(c != null && c.length))
941
- continue;
875
+ const { group: c, target: p } = d[h];
876
+ if (!(c != null && c.length)) continue;
942
877
  const m = c[0];
943
- if (m.questionIndex === void 0 || m.questionIndex > r.length)
944
- continue;
945
- let g = pn({ comparator: m.comparator, response: r[m.questionIndex], type: i.type, value: m.value });
946
- for (let f = 1; f < c.length; f += 2) {
947
- const v = c[f], k = c[f + 1], _ = pn({ comparator: k.comparator, response: r[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
948
- v === Ao ? g && (g = _) : v === Bo && (g || (g = _));
878
+ if (m.questionIndex === void 0 || m.questionIndex > r.length) continue;
879
+ let g = un({ comparator: m.comparator, response: r[m.questionIndex], type: i.type, value: m.value });
880
+ for (let b = 1; b < c.length; b += 2) {
881
+ const v = c[b], _ = c[b + 1], f = un({ comparator: _.comparator, response: r[_.questionIndex], type: e[_.questionIndex].type, value: _.value });
882
+ v === Io ? g && (g = f) : v === To && (g || (g = f));
949
883
  }
950
884
  if (g) {
951
- s = u === -1 && n ? e.length - 1 : u;
885
+ s = p === -1 && n ? e.length - 1 : p;
952
886
  break;
953
887
  }
954
888
  }
955
- const l = e.findIndex((h) => h.type === "uploading");
956
- let p;
957
- return p = l > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= p || s === -1 || s !== null && s > p ? l > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? l : n ? e.length - 1 : null : s === -1 ? null : s;
958
- }, pn = ({ comparator: e, response: t, type: n, value: r }) => {
959
- if (e === "answered")
960
- switch (n) {
961
- case "texturlprompt":
962
- return t === void 0;
963
- case "consentlegal":
964
- return t && t.submitted === !0;
965
- case "recordedtask":
966
- return "taskStatus" in t && t.taskStatus === "completed";
967
- case "likert":
968
- case "nps":
969
- return Number.isInteger(t);
970
- case "matrix":
971
- return Object.values(t).every((o) => o !== null);
972
- case "multiplechoice":
973
- return t !== void 0;
974
- case "multipleselect":
975
- return (t == null ? void 0 : t.length) > 0;
976
- case "open":
977
- return t && t.length > 0;
978
- case "videovoice":
979
- return !!(t != null && t.mediaRecordingUid);
980
- default:
981
- return !1;
982
- }
983
- if (e === "given_up")
984
- return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
985
- if (e === "partial")
986
- return n === "matrix" && wr(t, n);
987
- if (e === "skipped")
988
- switch (n) {
989
- case "texturlprompt":
990
- return t == null ? void 0 : t.skipped;
991
- case "consentlegal":
992
- case "likert":
993
- case "nps":
994
- case "videovoice":
995
- return t === null;
996
- case "recordedtask":
997
- return "taskStatus" in t && t.taskStatus === "abandoned";
998
- case "open":
999
- case "multipleselect":
1000
- return (t == null ? void 0 : t.length) === 0;
1001
- case "multiplechoice":
1002
- return t === void 0;
1003
- case "matrix":
1004
- return Object.values(t).every((o) => o === null);
1005
- default:
1006
- return !1;
1007
- }
1008
- return Nt[e](t, r);
1009
- }, Vo = (e) => {
889
+ const a = e.findIndex((h) => h.type === "uploading");
890
+ let u;
891
+ return u = a > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= u || s === -1 || s !== null && s > u ? a > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? a : n ? e.length - 1 : null : s === -1 ? null : s;
892
+ }, un = ({ comparator: e, response: t, type: n, value: r }) => {
893
+ if (e === "answered") switch (n) {
894
+ case "texturlprompt":
895
+ return t === void 0;
896
+ case "consentlegal":
897
+ return t && t.submitted === !0;
898
+ case "recordedtask":
899
+ return "taskStatus" in t && t.taskStatus === "completed";
900
+ case "likert":
901
+ case "nps":
902
+ return Number.isInteger(t);
903
+ case "matrix":
904
+ return Object.values(t).every((o) => o !== null);
905
+ case "multiplechoice":
906
+ return t !== void 0;
907
+ case "multipleselect":
908
+ return (t == null ? void 0 : t.length) > 0;
909
+ case "open":
910
+ return t && t.length > 0;
911
+ case "videovoice":
912
+ return !!(t != null && t.mediaRecordingUid);
913
+ default:
914
+ return !1;
915
+ }
916
+ if (e === "given_up") return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
917
+ if (e === "partial") return n === "matrix" && xr(t, n);
918
+ if (e === "skipped") switch (n) {
919
+ case "texturlprompt":
920
+ return t == null ? void 0 : t.skipped;
921
+ case "consentlegal":
922
+ case "likert":
923
+ case "nps":
924
+ case "videovoice":
925
+ return t === null;
926
+ case "recordedtask":
927
+ return "taskStatus" in t && t.taskStatus === "abandoned";
928
+ case "open":
929
+ case "multipleselect":
930
+ return (t == null ? void 0 : t.length) === 0;
931
+ case "multiplechoice":
932
+ return t === void 0;
933
+ case "matrix":
934
+ return Object.values(t).every((o) => o === null);
935
+ default:
936
+ return !1;
937
+ }
938
+ return It[e](t, r);
939
+ }, Do = (e) => {
1010
940
  var r, o, i;
1011
941
  switch (e.type) {
1012
942
  case "multipleselect":
1013
- return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((s) => [s.value]) : (t = e.props.options.map((s) => s.value), n = !e.props.properties.required, t.reduce((s, d) => s.concat(s.map((l) => [...l, d])), [[]]).filter((s) => n || s.length > 0)) : null;
943
+ return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((s) => [s.value]) : (t = e.props.options.map((s) => s.value), n = !e.props.properties.required, t.reduce((s, d) => s.concat(s.map((a) => [...a, d])), [[]]).filter((s) => n || s.length > 0)) : null;
1014
944
  case "multiplechoice": {
1015
- if (!e || !e.props || !e.props.options)
1016
- return null;
945
+ if (!e || !e.props || !e.props.options) return null;
1017
946
  const s = e.props.options.map((d) => d.value);
1018
947
  return e.props.properties.required || s.push(void 0), s;
1019
948
  }
1020
949
  case "matrix": {
1021
- if (!((r = e == null ? void 0 : e.props) != null && r.options))
1022
- return null;
1023
- const s = e.props.properties.matrixColumn, d = e.props.options, l = d.reduce((h, c) => (h[c.id] = null, h), {}), p = [{ ...l, [d[0].id]: s[0].value }, d.reduce((h, c) => (h[c.id] = s[0].value, h), {})];
1024
- return e.props.properties.required || p.push(l), p;
950
+ if (!((r = e == null ? void 0 : e.props) != null && r.options)) return null;
951
+ const s = e.props.properties.matrixColumn, d = e.props.options, a = d.reduce((h, c) => (h[c.id] = null, h), {}), u = [{ ...a, [d[0].id]: s[0].value }, d.reduce((h, c) => (h[c.id] = s[0].value, h), {})];
952
+ return e.props.properties.required || u.push(a), u;
1025
953
  }
1026
954
  case "likert": {
1027
955
  const s = Number((i = (o = e.props) == null ? void 0 : o.properties) == null ? void 0 : i.range) || 5;
1028
- return [...Array.from(Array(s).keys()).map((l) => l + 1), ...e.props.properties.required ? [] : [null]];
956
+ return [...Array.from(Array(s).keys()).map((a) => a + 1), ...e.props.properties.required ? [] : [null]];
1029
957
  }
1030
958
  case "nps":
1031
959
  return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
@@ -1044,25 +972,24 @@ const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (
1044
972
  return [1];
1045
973
  }
1046
974
  var t, n;
1047
- }, zo = (e) => e in Nt, $o = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Fo = (e, t = []) => t.reduce((n, r) => {
975
+ }, Ro = (e) => e in It, No = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Lo = (e, t = []) => t.reduce((n, r) => {
1048
976
  const { group: o, target: i } = r;
1049
- if (!(o != null && o.length))
1050
- return [...n];
977
+ if (!(o != null && o.length)) return [...n];
1051
978
  const s = o.filter((d) => !!Number(d) || typeof d == "object" && d.questionIndex === e).map((d) => {
1052
- const { comparator: l, value: p } = d;
1053
- return { comparator: l, target: i, value: p };
979
+ const { comparator: a, value: u } = d;
980
+ return { comparator: a, target: i, value: u };
1054
981
  });
1055
982
  return [...n, ...s];
1056
- }, []), st = /* @__PURE__ */ new Set(["thanks", "uploading"]), q = kr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = Se) => {
983
+ }, []), tt = /* @__PURE__ */ new Set(["thanks", "uploading"]), U = yr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = ke) => {
1057
984
  const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: d } = r;
1058
- await o(n), at(r) || s({ event: "closed" }), Xr.info("SurveyClosing", { surveyId: r.surveyId }), Ht.enable(), i({ initiator: Bt.Closed, studyType: d });
985
+ await o(n), nt(r) || s({ event: "closed" }), Qr.info("SurveyClosing", { surveyId: r.surveyId }), Lt.enable(), i({ initiator: Ot.Closed, studyType: d });
1059
986
  }, configureExitOnOverlayClick: () => {
1060
987
  }, customMetadata: {}, destroy: async (n) => {
1061
988
  const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: d } = t();
1062
- r("survey.complete", d), await o(n), Ht.enable(), i({ initiator: Bt.Complete, studyType: s });
1063
- }, endCard: { headline: "" }, envId: "", eventEmitFn: Be.emit.bind(Be), fadeout: async (n) => {
989
+ r("survey.complete", d), await o(n), Lt.enable(), i({ initiator: Ot.Complete, studyType: s });
990
+ }, endCard: { headline: "" }, envId: "", eventEmitFn: Me.emit.bind(Me), fadeout: async (n) => {
1064
991
  const { eventEmitFn: r, headers: o, viewDocument: i } = t();
1065
- return We(o) ? Promise.resolve() : (r(ne.SurveyFadingOut), new Promise((s) => {
992
+ return qe(o) ? Promise.resolve() : (r(X.SurveyFadingOut), new Promise((s) => {
1066
993
  const d = i.getElementById(n);
1067
994
  d ? (d.addEventListener("transitionend", () => {
1068
995
  s();
@@ -1072,137 +999,118 @@ const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (
1072
999
  const { cards: r, eventEmitFn: o, index: i } = t();
1073
1000
  o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
1074
1001
  }, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
1075
- var m, g, f;
1076
- const { cards: s, destroy: d, index: l, uploadProgress: p } = t(), h = r || ((m = p[n]) == null ? void 0 : m.isComplete), c = { ...p, [n]: { progressPct: h ? 100 : o || ((g = p[n]) == null ? void 0 : g.progressPct), isComplete: h, isSubmitted: i || ((f = p[n]) == null ? void 0 : f.isSubmitted) } };
1077
- if (e({ uploadProgress: c }), s[l].type !== "uploading")
1078
- return;
1079
- const u = Object.entries(p).every(([v, k]) => !k.isSubmitted || k.isComplete || n == v && r);
1080
- if (u && l >= s.length - 1)
1081
- return d(Se);
1082
- e({ index: u ? l + 1 : l, uploadingCardViewed: !0 });
1002
+ var m, g, b;
1003
+ const { cards: s, destroy: d, index: a, uploadProgress: u } = t(), h = r || ((m = u[n]) == null ? void 0 : m.isComplete), c = { ...u, [n]: { progressPct: h ? 100 : o || ((g = u[n]) == null ? void 0 : g.progressPct), isComplete: h, isSubmitted: i || ((b = u[n]) == null ? void 0 : b.isSubmitted) } };
1004
+ if (e({ uploadProgress: c }), s[a].type !== "uploading") return;
1005
+ const p = Object.entries(u).every(([v, _]) => !_.isSubmitted || _.isComplete || n == v && r);
1006
+ if (p && a >= s.length - 1) return d(ke);
1007
+ e({ index: p ? a + 1 : a, uploadingCardViewed: !0 });
1083
1008
  }, hasViewedEmbed: !1, headers: { Authorization: "", "Content-Type": "", "userleap-platform": "web", "x-ul-environment-id": "", "x-ul-installation-method": "web-snippet", "x-ul-sdk-version": "", "x-ul-visitor-id": "" }, index: 0, isPreview: !1, marketingUrl: "https://sprig.com", meta: { ch: 0, cw: 0, l: "", mode: null, p: "", sh: 0, sw: 0 }, mode: void 0, next: (n) => {
1084
- const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: p, uploadProgress: h, viewedCardCount: c } = t();
1009
+ const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: a, trackHistory: u, uploadProgress: h, viewedCardCount: c } = t();
1085
1010
  e({ minScrollableHeight: void 0 });
1086
- const u = Date.now(), m = [...o], g = m[s], { type: f } = n.data, v = { ...n.data }, k = v.value;
1087
- ((D) => !st.has(D.type))(g) && (g.value = k), v.answeredAt = u, delete v.type;
1088
- const _ = { response: v, responseGroupUid: d, questionIndex: s };
1089
- let T = f === "multiplechoice" ? Object.values(k).find((D) => D !== !1) : k;
1090
- f === "multipleselect" && (T = m[s].props.options.reduce((D, x) => (k[x.id] && D.push(x.value), D), []));
1091
- const j = r.slice(0);
1092
- j[s] = T, e({ allResponses: j });
1093
- const E = Cr({ cards: m, index: s, hasEndCard: !!n.endCard, uploadProgress: h, allResponses: j });
1094
- if (E === null)
1095
- return _.completedAt = u, l(_), void n.completeSurvey();
1096
- st.has(m[E].type) && (_.completedAt = u);
1097
- const w = l(_);
1098
- st.has(m[E].type) || w.finally(() => {
1099
- p({ event: "seen", index: E });
1011
+ const p = Date.now(), m = [...o], g = m[s], { type: b } = n.data, v = { ...n.data }, _ = v.value;
1012
+ ((D) => !tt.has(D.type))(g) && (g.value = _), v.answeredAt = p, delete v.type;
1013
+ const f = { response: v, responseGroupUid: d, questionIndex: s };
1014
+ let T = b === "multiplechoice" ? Object.values(_).find((D) => D !== !1) : _;
1015
+ b === "multipleselect" && (T = m[s].props.options.reduce((D, y) => (_[y.id] && D.push(y.value), D), []));
1016
+ const S = r.slice(0);
1017
+ S[s] = T, e({ allResponses: S });
1018
+ const w = kr({ cards: m, index: s, hasEndCard: !!n.endCard, uploadProgress: h, allResponses: S });
1019
+ if (w === null) return f.completedAt = p, a(f), void n.completeSurvey();
1020
+ tt.has(m[w].type) && (f.completedAt = p);
1021
+ const x = a(f);
1022
+ tt.has(m[w].type) || x.finally(() => {
1023
+ u({ event: "seen", index: w });
1100
1024
  });
1101
- const I = m[E];
1102
- m[E] && i && i("survey.question", { qid: I.name, props: I.props }), e({ cards: m, hasViewedEmbed: !1, index: E, viewedCardCount: c + 1 });
1025
+ const j = m[w];
1026
+ m[w] && i && i("survey.question", { qid: j.name, props: j.props }), e({ cards: m, hasViewedEmbed: !1, index: w, viewedCardCount: c + 1 });
1103
1027
  }, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
1104
- }, recorderEventEmitter: Be, resolveTrackedPromise: () => {
1028
+ }, recorderEventEmitter: Me, resolveTrackedPromise: () => {
1105
1029
  const { removeIframeIfReady: n } = t();
1106
1030
  e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
1107
1031
  }, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
1108
1032
  const { eventEmitFn: o, removeIframeIfReady: i, surveyId: s } = t();
1109
- e({ pendingRemoveIframeReason: n, studyType: r }), o(ne.SurveyCloseRequested, { name: ne.SurveyCloseRequested, initiator: n, studyType: r, "survey.id": s }), i();
1033
+ e({ pendingRemoveIframeReason: n, studyType: r }), o(X.SurveyCloseRequested, { name: X.SurveyCloseRequested, initiator: n, studyType: r, "survey.id": s }), i();
1110
1034
  }, removeIframeIfReady: () => {
1111
1035
  const { eventEmitFn: n, pendingRemoveIframeReason: r, unresolvedRequestCount: o, studyType: i, surveyId: s } = t();
1112
- r && o === 0 && (n(ne.SurveyWillClose, { name: ne.SurveyWillClose, initiator: r, studyType: i, "survey.id": s }), e({ pendingRemoveIframeReason: null, studyType: i }));
1036
+ r && o === 0 && (n(X.SurveyWillClose, { name: X.SurveyWillClose, initiator: r, studyType: i, "survey.id": s }), e({ pendingRemoveIframeReason: null, studyType: i }));
1113
1037
  }, seen: async () => {
1114
1038
  const { trackHistory: n } = t();
1115
1039
  return n({ event: "seen", isNew: !0 });
1116
1040
  }, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
1117
1041
  const s = t();
1118
- if (!i || at(s))
1119
- return;
1120
- const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: [o], completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(ht(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
1121
- l.ok ? s.eventEmitFn(ne.QuestionAnswered, { ...o, questionIndex: r, "survey.id": s.surveyId }) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(hn(s, "submitResponse", l.error)));
1042
+ if (!i || nt(s)) return;
1043
+ const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: [o], completedAt: n, previewKey: s.previewKey }, a = await s.trackPromise(lt(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
1044
+ a.ok ? s.eventEmitFn(X.QuestionAnswered, { ...o, questionIndex: r, "survey.id": s.surveyId }) : a.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", a.error), await s.trackPromise(pn(s, "submitResponse", a.error)));
1122
1045
  }, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
1123
1046
  const i = t();
1124
- if (at(i))
1125
- return;
1126
- const { cards: s, index: d } = i, l = r !== void 0 ? s[r] : s[d], p = { sid: i.surveyId, qid: l.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, h = await i.trackPromise(ht(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { body: JSON.stringify(p), headers: i.headers, method: "POST" }));
1127
- !h.ok && h.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", h.error), await i.trackPromise(hn(i, "trackHistory", h.error)));
1047
+ if (nt(i)) return;
1048
+ const { cards: s, index: d } = i, a = r !== void 0 ? s[r] : s[d], u = { sid: i.surveyId, qid: a.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, h = await i.trackPromise(lt(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { body: JSON.stringify(u), headers: i.headers, method: "POST" }));
1049
+ !h.ok && h.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", h.error), await i.trackPromise(pn(i, "trackHistory", h.error)));
1128
1050
  }, trackPromise: async (n) => {
1129
1051
  const { resolveTrackedPromise: r } = t();
1130
1052
  return e((o) => ({ unresolvedRequestCount: o.unresolvedRequestCount + 1 })), n.then((o) => (r(), o)).catch((o) => {
1131
1053
  throw r(), o;
1132
1054
  });
1133
1055
  }, unresolvedRequestCount: 0, update: () => {
1134
- const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: p } = t(), h = o["userleap-platform"] === "web", c = We(o), u = n[r], m = u.type === "matrix" && !(u.props.properties.displayMatrixAsAccordion || d);
1056
+ const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: a, viewDocument: u } = t(), h = o["userleap-platform"] === "web", c = qe(o), p = n[r], m = p.type === "matrix" && !(p.props.properties.displayMatrixAsAccordion || d);
1135
1057
  e({ minScrollableHeight: void 0 }), setTimeout(() => {
1136
- var k, _, T;
1137
- !c && !d && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s, Gr));
1138
- const [g, f, v] = Kr(p, h && !d, c);
1139
- c ? (i(ne.SurveyHeight, { name: ne.SurveyHeight, contentFrameHeight: g, "survey.id": l }), i(ne.SurveyWidth, { name: ne.SurveyWidth, contentFrameWidth: f, "survey.id": l })) : ((_ = s.setHeight) == null || _.call(s, g), e({ minScrollableHeight: v }), !d && m && ((T = s.setWidth) == null || T.call(s, f)));
1058
+ var _, f, T;
1059
+ !c && !d && ((_ = s == null ? void 0 : s.setWidth) == null || _.call(s, Wr));
1060
+ const [g, b, v] = Zr(u, h && !d, c);
1061
+ c ? (i(X.SurveyHeight, { name: X.SurveyHeight, contentFrameHeight: g, "survey.id": a }), i(X.SurveyWidth, { name: X.SurveyWidth, contentFrameWidth: b, "survey.id": a })) : ((f = s.setHeight) == null || f.call(s, g), e({ minScrollableHeight: v }), !d && m && ((T = s.setWidth) == null || T.call(s, b)));
1140
1062
  }, 100);
1141
- }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0 })), at = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, hn = async (e, t, n) => {
1142
- const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, p = l.documentElement, h = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: p.clientWidth, clientHeight: p.clientHeight, location: window.location.href, language: window.navigator.language }, c = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: h, vid: o, envId: i };
1143
- (await ht(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, d), body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
1144
- }, Er = (e) => F("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, F("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Sr = (e) => F("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, F("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 }));
1145
- var Wo = 0;
1146
- function a(e, t, n, r, o, i) {
1147
- var s, d, l = {};
1148
- for (d in t)
1149
- d == "ref" ? s = t[d] : l[d] = t[d];
1150
- var p = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --Wo, __i: -1, __u: 0, __source: o, __self: i };
1151
- if (typeof e == "function" && (s = e.defaultProps))
1152
- for (d in s)
1153
- l[d] === void 0 && (l[d] = s[d]);
1154
- return P.vnode && P.vnode(p), p;
1155
- }
1156
- const Zo = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Sr, { className: "sprig-check" }) }), mn = "250ms", Go = Pt(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
1157
- const d = te(null), [l, p] = W(0), [h, c] = W("none"), [u, m] = W(!0);
1158
- return K(() => {
1159
- var f;
1160
- const g = (f = d.current) == null ? void 0 : f.getBoundingClientRect();
1161
- p(r && g ? g.height : 0);
1162
- }, [r]), K(() => {
1163
- !l && r || !u || m(!1), c(e && !u ? `height ${mn} ease` : "none");
1164
- }, [e, u, l, r]), a("div", { className: "sprig-accordion", ref: s, children: [a("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [a("div", { className: "sprig-header-label-container", children: [a("span", { className: "sprig-header-label", children: n }), a(Zo, { visible: i })] }), a(Er, { className: "sprig-caret", style: { transitionDuration: e ? mn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: h, height: l }, children: a("div", { ref: d, children: t }) })] });
1165
- }), O = (...e) => e.filter(Boolean).join(" "), G = (e, t, n) => {
1063
+ }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0 })), nt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, pn = async (e, t, n) => {
1064
+ const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: a } = e, u = a.documentElement, h = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: u.clientWidth, clientHeight: u.clientHeight, location: window.location.href, language: window.navigator.language }, c = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: h, vid: o, envId: i };
1065
+ (await lt(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, d), body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
1066
+ }, wr = (e) => V("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, V("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Cr = (e) => V("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, V("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), Mo = ({ visible: e }) => l("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: l(Cr, { className: "sprig-check" }) }), hn = "250ms", Oo = Et(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
1067
+ const d = J(null), [a, u] = z(0), [h, c] = z("none"), [p, m] = z(!0);
1068
+ return F(() => {
1069
+ var b;
1070
+ const g = (b = d.current) == null ? void 0 : b.getBoundingClientRect();
1071
+ u(r && g ? g.height : 0);
1072
+ }, [r]), F(() => {
1073
+ !a && r || !p || m(!1), c(e && !p ? `height ${hn} ease` : "none");
1074
+ }, [e, p, a, r]), l("div", { className: "sprig-accordion", ref: s, children: [l("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [l("div", { className: "sprig-header-label-container", children: [l("span", { className: "sprig-header-label", children: n }), l(Mo, { visible: i })] }), l(wr, { className: "sprig-caret", style: { transitionDuration: e ? hn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), l("div", { className: "sprig-accordion-body", style: { transition: h, height: a }, children: l("div", { ref: d, children: t }) })] });
1075
+ }), L = (...e) => e.filter(Boolean).join(" "), W = (e, t, n) => {
1166
1076
  const r = t ? "--mobile" : "--desktop";
1167
1077
  return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
1168
- }, Ko = (e, t) => `${e} ${e}__${t}`, X = (e) => a("button", { ...e, className: O("ul-card-text__button", e.className), id: "ul-card-text__button" }), jr = () => {
1169
- const { viewDocument: e } = q((r) => ({ viewDocument: r.viewDocument })), [t, n] = W(!1);
1170
- return K(() => {
1078
+ }, Uo = (e, t) => `${e} ${e}__${t}`, Y = (e) => l("button", { ...e, className: L("ul-card-text__button", e.className), id: "ul-card-text__button" }), Er = () => {
1079
+ const { viewDocument: e } = U((r) => ({ viewDocument: r.viewDocument })), [t, n] = z(!1);
1080
+ return F(() => {
1171
1081
  const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
1172
1082
  window.requestAnimationFrame(() => {
1173
- n(!!(r && Yr(r) && r.scrollHeight > r.offsetHeight));
1083
+ n(!!(r && Gr(r) && r.scrollHeight > r.offsetHeight));
1174
1084
  });
1175
1085
  });
1176
1086
  return r && o.observe(r), () => {
1177
1087
  r && o.unobserve(r);
1178
1088
  };
1179
1089
  }, [e]), t;
1180
- }, gn = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? a("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? a(o ? "h1" : "p", { className: r, id: n, children: e }) : null, Yo = () => {
1181
- const { cards: e, close: t, endCard: n, headers: r, index: o } = q((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = Ue(() => () => t(Se), [t]);
1182
- return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : a("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (d) => {
1090
+ }, mn = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? l("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? l(o ? "h1" : "p", { className: r, id: n, children: e }) : null, Ho = () => {
1091
+ const { cards: e, close: t, endCard: n, headers: r, index: o } = U((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = Re(() => () => t(ke), [t]);
1092
+ return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : l("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (d) => {
1183
1093
  d.key === "Enter" && s();
1184
- }, role: "button", tabIndex: 0, children: a("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z", fill: "#262136" }) }) });
1185
- }, ae = ({ message: e, properties: t }) => {
1186
- const n = te(null), r = t == null ? void 0 : t.captionText, o = jr();
1187
- return a("div", { className: O("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(gn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(Yo, {})] }), a(gn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
1188
- }, vn = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), ge = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1094
+ }, role: "button", tabIndex: 0, children: l("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z", fill: "#262136" }) }) });
1095
+ }, ne = ({ message: e, properties: t }) => {
1096
+ const n = J(null), r = t == null ? void 0 : t.captionText, o = Er();
1097
+ return l("div", { className: L("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [l("div", { className: "question-header-button-container", children: [l(mn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), l(Ho, {})] }), l(mn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
1098
+ }, gn = ({ buttonText: e = "View Prototype", handleClick: t }) => l("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), ce = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1189
1099
  var c;
1190
- const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = q((u) => ({ handleClickEmbedButton: u.handleClickEmbedButton, hasViewedEmbed: u.hasViewedEmbed, headers: u.headers, useDesktopPrototype: u.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < Qr, p = i["userleap-platform"], h = (u, m) => {
1191
- u.preventDefault(), r(m);
1100
+ const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = U((p) => ({ handleClickEmbedButton: p.handleClickEmbedButton, hasViewedEmbed: p.hasViewedEmbed, headers: p.headers, useDesktopPrototype: p.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), a = window.innerWidth < Kr, u = i["userleap-platform"], h = (p, m) => {
1101
+ p.preventDefault(), r(m);
1192
1102
  };
1193
- if (!s && l && !o && d && ["email", "link"].includes(p)) {
1194
- if (t === "prototype")
1195
- return a(vn, { handleClick: (u) => {
1196
- h(u, "question.prototype.click");
1197
- } });
1198
- if (t === "pdf")
1199
- return a(vn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (u) => {
1200
- h(u, "question.agreement.click");
1201
- } });
1103
+ if (!s && a && !o && d && ["email", "link"].includes(u)) {
1104
+ if (t === "prototype") return l(gn, { handleClick: (p) => {
1105
+ h(p, "question.prototype.click");
1106
+ } });
1107
+ if (t === "pdf") return l(gn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (p) => {
1108
+ h(p, "question.agreement.click");
1109
+ } });
1202
1110
  }
1203
1111
  return e();
1204
- }, Ir = ({ isSelected: e, id: t, divId: n, themeColor: r }) => a("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, tabIndex: 0, children: e && a(Sr, {}) }), Tr = (e, t) => {
1205
- const n = te(0);
1112
+ }, Sr = ({ isSelected: e, id: t, divId: n, themeColor: r }) => l("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, tabIndex: 0, children: e && l(Cr, {}) }), jr = (e, t) => {
1113
+ const n = J(0);
1206
1114
  return () => {
1207
1115
  if (e.current) {
1208
1116
  const r = e.current;
@@ -1211,449 +1119,433 @@ const Zo = ({ visible: e }) => a("div", { className: "sprig-check-background", s
1211
1119
  n.current !== s && t(), n.current = s, r.style.height = `${s}px`;
1212
1120
  }
1213
1121
  };
1214
- }, et = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: p, error: h, allowTextEntry: c, noneOfTheAbove: u, promptText: m, onUserInputChanged: g }) => {
1215
- const { styleNonce: f, viewDocument: v } = q((S) => ({ styleNonce: S.styleNonce, viewDocument: S.viewDocument })), [k, _] = W(!1);
1216
- Jo(v, t, f);
1217
- const T = ({ isSelected: S, userText: L }) => {
1218
- g && g({ id: d, selected: S, value: i, userText: L, noneOfTheAbove: u });
1219
- }, j = (S) => {
1220
- S.stopPropagation(), T({ isSelected: l || !o, userText: s }), _(!1);
1221
- }, E = () => {
1222
- k || _(!0);
1122
+ }, Ge = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: a, useMobileStyling: u, error: h, allowTextEntry: c, noneOfTheAbove: p, promptText: m, onUserInputChanged: g }) => {
1123
+ const { styleNonce: b, viewDocument: v } = U((I) => ({ styleNonce: I.styleNonce, viewDocument: I.viewDocument })), [_, f] = z(!1);
1124
+ Bo(v, t, b);
1125
+ const T = ({ isSelected: I, userText: N }) => {
1126
+ g && g({ id: d, selected: I, value: i, userText: N, noneOfTheAbove: p });
1127
+ }, S = (I) => {
1128
+ I.stopPropagation(), T({ isSelected: a || !o, userText: s }), f(!1);
1223
1129
  }, w = () => {
1224
- k && _(!1);
1225
- }, I = { onClick: (S) => j(S), onKeyPress: (S) => ((L) => {
1226
- L.key !== "Enter" && L.key !== " " || j(L);
1227
- })(S) };
1228
- "ontouchstart" in v.documentElement ? (I.onTouchStart = w, I.onTouchCancel = w, I.onTouchEnd = w) : (I.onMouseDown = E, I.onMouseLeave = w);
1229
- const D = l ? `radio-${d}` : `checkbox-${d}`, x = o || k ? [ze] : [], b = [...h ? [Pr] : [], ...x], y = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
1230
- return a("div", { className: O(G("choice", p), ...b), id: `choice-div-${d}`, style: { ...n, ...h ? { borderColor: De } : {} }, ...I, children: [a("div", { className: O("choice-label-container"), children: [l ? a("div", { ...y, className: O("select-radio", ...x), id: D, role: "radio", tabIndex: 0 }) : a(Ir, { divId: D, id: d, isSelected: o, themeColor: t }), r && a("label", { className: O(G("select-label", p)), htmlFor: D, id: `label-${d}`, children: r })] }), c && o && a("div", { className: O("choice-text-entry-container", ...x), children: a(Qo, { onTextChange: (S) => T({ isSelected: o, userText: S }), promptText: m || "Please specify", textValue: s, useMobileStyling: p }) })] });
1231
- }, Qo = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1232
- const o = te(null), { update: i } = q((d) => ({ update: d.update })), s = Tr(o, () => i());
1233
- return K(() => (s(), o.current && o.current.focus(), () => {
1130
+ _ || f(!0);
1131
+ }, x = () => {
1132
+ _ && f(!1);
1133
+ }, j = { onClick: (I) => S(I), onKeyPress: (I) => ((N) => {
1134
+ N.key !== "Enter" && N.key !== " " || S(N);
1135
+ })(I) };
1136
+ "ontouchstart" in v.documentElement ? (j.onTouchStart = x, j.onTouchCancel = x, j.onTouchEnd = x) : (j.onMouseDown = w, j.onMouseLeave = x);
1137
+ const D = a ? `radio-${d}` : `checkbox-${d}`, y = o || _ ? [He] : [], E = [...h ? [Ir] : [], ...y], k = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
1138
+ return l("div", { className: L(W("choice", u), ...E), id: `choice-div-${d}`, style: { ...n, ...h ? { borderColor: Se } : {} }, ...j, children: [l("div", { className: L("choice-label-container"), children: [a ? l("div", { ...k, className: L("select-radio", ...y), id: D, role: "radio", tabIndex: 0 }) : l(Sr, { divId: D, id: d, isSelected: o, themeColor: t }), r && l("label", { className: L(W("select-label", u)), htmlFor: D, id: `label-${d}`, children: r })] }), c && o && l("div", { className: L("choice-text-entry-container", ...y), children: l(Ao, { onTextChange: (I) => T({ isSelected: o, userText: I }), promptText: m || "Please specify", textValue: s, useMobileStyling: u }) })] });
1139
+ }, Ao = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1140
+ const o = J(null), { update: i } = U((d) => ({ update: d.update })), s = jr(o, () => i());
1141
+ return F(() => (s(), o.current && o.current.focus(), () => {
1234
1142
  i();
1235
- }), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: O(G("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
1143
+ }), []), l("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: L(W("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
1236
1144
  s(), d.stopPropagation(), n(d.currentTarget.value);
1237
1145
  }, onClick: (d) => {
1238
1146
  d.stopPropagation();
1239
1147
  }, onKeyPress: (d) => {
1240
1148
  d.stopPropagation();
1241
1149
  }, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
1242
- }, fn = "ul-select-style-element", ze = "ul-select-active-dynamic-style", Pr = "ul-select-error-dynamic-style", Jo = (e, t, n) => {
1243
- let r = e.getElementById(fn), o = !1;
1244
- r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = fn, n && (r.nonce = n), r.textContent = Xo(t), o && e.head.appendChild(r));
1245
- }, Xo = (e) => `
1246
- .${ze} {
1150
+ }, vn = "ul-select-style-element", He = "ul-select-active-dynamic-style", Ir = "ul-select-error-dynamic-style", Bo = (e, t, n) => {
1151
+ let r = e.getElementById(vn), o = !1;
1152
+ r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = vn, n && (r.nonce = n), r.textContent = qo(t), o && e.head.appendChild(r));
1153
+ }, qo = (e) => `
1154
+ .${He} {
1247
1155
  border-color: ${e};
1248
1156
  }
1249
- .${ze} .select-radio, .${ze}.select-radio {
1157
+ .${He} .select-radio, .${He}.select-radio {
1250
1158
  border: 6px solid ${e};
1251
1159
  box-shadow: none;
1252
1160
  }
1253
- .${Pr} {
1254
- border-color: ${De};
1161
+ .${Ir} {
1162
+ border-color: ${Se};
1255
1163
  }
1256
- `, ve = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), _e = ({ children: e }) => {
1257
- const t = jr();
1258
- return a("div", { className: O("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
1259
- }, Ce = (e) => (e == null ? void 0 : e.buttonText) || "Next", Lt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", ei = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1260
- const { useMobileStyling: s, border: d } = q((x) => ({ useMobileStyling: x.useMobileStyling, border: x.border })), [l, p] = W(!1), [h, c] = W(""), [u, m] = W(!1), g = r == null ? void 0 : r.collectName, f = (r == null ? void 0 : r.nameLabelText) || "Full Name", v = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", k = (r == null ? void 0 : r.submitButtonText) || "Submit", _ = !!h.trim(), T = l && (!g || _), j = (x, b = !1) => {
1261
- x.preventDefault(), x.stopPropagation();
1262
- let y = null;
1263
- if (!b) {
1264
- if (!T)
1265
- return void m(!0);
1266
- y = { submitted: !0 }, g && (y.name = h);
1164
+ `, ue = ({ children: e }) => l("div", { className: "sprig-question-body", children: e }), ge = ({ children: e }) => {
1165
+ const t = Er();
1166
+ return l("div", { className: L("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
1167
+ }, ye = (e) => (e == null ? void 0 : e.buttonText) || "Next", Tt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", Vo = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1168
+ const { useMobileStyling: s, border: d } = U((y) => ({ useMobileStyling: y.useMobileStyling, border: y.border })), [a, u] = z(!1), [h, c] = z(""), [p, m] = z(!1), g = r == null ? void 0 : r.collectName, b = (r == null ? void 0 : r.nameLabelText) || "Full Name", v = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", _ = (r == null ? void 0 : r.submitButtonText) || "Submit", f = !!h.trim(), T = a && (!g || f), S = (y, E = !1) => {
1169
+ y.preventDefault(), y.stopPropagation();
1170
+ let k = null;
1171
+ if (!E) {
1172
+ if (!T) return void m(!0);
1173
+ k = { submitted: !0 }, g && (k.name = h);
1267
1174
  }
1268
- n({ value: y, questionId: o, type: i });
1269
- }, E = (x) => {
1270
- x.preventDefault(), x.stopPropagation(), c(x.currentTarget.value);
1271
- }, w = (x) => {
1272
- x.currentTarget.style.borderColor = u && !_ ? De : d;
1273
- }, I = (x) => {
1274
- x.currentTarget.style.borderColor = u && !_ ? De : Ct;
1275
- }, D = () => a(_e, { children: [a("div", { className: "sprig-stretch", children: [a(et, { allowTextEntry: !1, border: d, error: u && !l, id: "consent", isRadio: !1, isSelected: l, label: v, onUserInputChanged: ({ selected: x }) => {
1276
- x !== l && p(!l);
1277
- }, useMobileStyling: s }), g && a("input", { "aria-label": f, "aria-placeholder": f, className: O(G("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: I, onFocus: w, onInput: E, placeholder: f, style: u && !_ ? { borderColor: De } : {}, tabIndex: 0, value: h })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(X, { className: T ? "" : "sprig-button-disabled", onClick: j, children: k }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (x) => j(x, !0), children: Lt(r) })] })] });
1278
- return a("div", { className: O(e, "ul-card__consent-legal", "fade-in-transition"), children: [a(ae, { message: t, properties: { questionHtml: r.questionHtml } }), a(Y, { children: [r != null && r.richTextBody ? a(ve, { children: a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }) }) : null, a(ge, { properties: r, defaultBody: D, embeddedType: "pdf" })] })] }, o);
1279
- }, ti = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, setActiveValue: d, setIsPressed: l, useMobileStyling: p, value: h, viewDocument: c }) => {
1280
- const u = `option-${h}`, m = s === "number", g = s === "star", f = m && h === e, [v, k] = h <= e && g || h === e ? r ? [t, 1] : [t, 0.3] : ["", 1];
1281
- return a("button", { "aria-label": m ? void 0 : String(h), className: (() => {
1175
+ n({ value: k, questionId: o, type: i });
1176
+ }, w = (y) => {
1177
+ y.preventDefault(), y.stopPropagation(), c(y.currentTarget.value);
1178
+ }, x = (y) => {
1179
+ y.currentTarget.style.borderColor = p && !f ? Se : d;
1180
+ }, j = (y) => {
1181
+ y.currentTarget.style.borderColor = p && !f ? Se : bt;
1182
+ }, D = () => l(ge, { children: [l("div", { className: "sprig-stretch", children: [l(Ge, { allowTextEntry: !1, border: d, error: p && !a, id: "consent", isRadio: !1, isSelected: a, label: v, onUserInputChanged: ({ selected: y }) => {
1183
+ y !== a && u(!a);
1184
+ }, useMobileStyling: s }), g && l("input", { "aria-label": b, "aria-placeholder": b, className: L(W("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: j, onFocus: x, onInput: w, placeholder: b, style: p && !f ? { borderColor: Se } : {}, tabIndex: 0, value: h })] }), l("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [l(Y, { className: T ? "" : "sprig-button-disabled", onClick: S, children: _ }), r.required === !1 && l("button", { className: "ul-card-skip__button", onClick: (y) => S(y, !0), children: Tt(r) })] })] });
1185
+ return l("div", { className: L(e, "ul-card__consent-legal", "fade-in-transition"), children: [l(ne, { message: t, properties: { questionHtml: r.questionHtml } }), l(Z, { children: [r != null && r.richTextBody ? l(ue, { children: l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }) }) : null, l(ce, { properties: r, defaultBody: D, embeddedType: "pdf" })] })] }, o);
1186
+ }, zo = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, setActiveValue: d, setIsPressed: a, useMobileStyling: u, value: h, viewDocument: c }) => {
1187
+ const p = `option-${h}`, m = s === "number", g = s === "star", b = m && h === e, [v, _] = h <= e && g || h === e ? r ? [t, 1] : [t, 0.3] : ["", 1];
1188
+ return l("button", { "aria-label": m ? void 0 : String(h), className: (() => {
1282
1189
  switch (s) {
1283
1190
  case "star":
1284
- return O(G("likert-star", p), G(`likert-star-${h}`, p));
1191
+ return L(W("likert-star", u), W(`likert-star-${h}`, u));
1285
1192
  case "smiley":
1286
- return O(G("likert-smiley", p), G(`likert-smiley-${h}`, p));
1193
+ return L(W("likert-smiley", u), W(`likert-smiley-${h}`, u));
1287
1194
  default:
1288
- return h === i ? O(G("likert-number", p), G(`likert-number-${h}`, p), G("likert-last-option", p)) : O(G("likert-number", p), G(`likert-number-${h}`, p));
1195
+ return h === i ? L(W("likert-number", u), W(`likert-number-${h}`, u), W("likert-last-option", u)) : L(W("likert-number", u), W(`likert-number-${h}`, u));
1289
1196
  }
1290
- })(), dangerouslySetInnerHTML: { __html: n }, id: u, onClick: () => o(), onKeyDown: (_) => {
1291
- var E, w;
1292
- const T = c.querySelectorAll(`.likert-${s ?? "number"}`), j = h - 1;
1293
- _.key === "ArrowRight" ? (E = T[j + 1]) == null || E.focus() : _.key === "ArrowLeft" ? (w = T[j - 1]) == null || w.focus() : _.key !== "Enter" && _.key !== " " || o();
1294
- }, onPointerDown: () => l(!0), onPointerEnter: () => d(h), onPointerLeave: () => {
1295
- d(-1), l(!1);
1296
- }, style: { color: m ? "" : v, borderColor: f ? v : "", fillOpacity: f ? "" : k, zIndex: f ? 3 : "auto" }, tabIndex: 0 });
1297
- }, ni = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
1298
- const { border: d, useMobileStyling: l, viewDocument: p } = q((D) => ({ border: D.border, useMobileStyling: D.useMobileStyling, viewDocument: D.viewDocument })), [h, c] = W(-1), [u, m] = W(!1), g = t && t.left, f = t && t.right;
1197
+ })(), dangerouslySetInnerHTML: { __html: n }, id: p, onClick: () => o(), onKeyDown: (f) => {
1198
+ var w, x;
1199
+ const T = c.querySelectorAll(`.likert-${s ?? "number"}`), S = h - 1;
1200
+ f.key === "ArrowRight" ? (w = T[S + 1]) == null || w.focus() : f.key === "ArrowLeft" ? (x = T[S - 1]) == null || x.focus() : f.key !== "Enter" && f.key !== " " || o();
1201
+ }, onPointerDown: () => a(!0), onPointerEnter: () => d(h), onPointerLeave: () => {
1202
+ d(-1), a(!1);
1203
+ }, style: { color: m ? "" : v, borderColor: b ? v : "", fillOpacity: b ? "" : _, zIndex: b ? 3 : "auto" }, tabIndex: 0 });
1204
+ }, $o = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
1205
+ const { border: d, useMobileStyling: a, viewDocument: u } = U((D) => ({ border: D.border, useMobileStyling: D.useMobileStyling, viewDocument: D.viewDocument })), [h, c] = z(-1), [p, m] = z(!1), g = t && t.left, b = t && t.right;
1299
1206
  let v;
1300
- const { range: k, scaleLabelType: _, ratingIcons: T } = o;
1301
- k && (v = Number(k));
1302
- const j = v || 5, E = (D) => {
1303
- var x, b;
1304
- switch (_) {
1207
+ const { range: _, scaleLabelType: f, ratingIcons: T } = o;
1208
+ _ && (v = Number(_));
1209
+ const S = v || 5, w = (D) => {
1210
+ var y, E;
1211
+ switch (f) {
1305
1212
  case "star":
1306
- return (x = T[0]) == null ? void 0 : x.svg;
1213
+ return (y = T[0]) == null ? void 0 : y.svg;
1307
1214
  case "smiley":
1308
- return (b = T[D]) == null ? void 0 : b.svg;
1215
+ return (E = T[D]) == null ? void 0 : E.svg;
1309
1216
  default:
1310
1217
  return String(D + 1);
1311
1218
  }
1312
- }, w = [...Array(j)].map((D, x) => {
1313
- const b = x + 1;
1314
- return a(ti, { activeValue: h, border: d, icon: E(x), isPressed: u, onSubmit: () => r({ value: b, questionId: i, type: s }), range: j, scaleLabelType: _, setActiveValue: c, setIsPressed: m, useMobileStyling: l, value: b, viewDocument: p }, x);
1315
- }), I = (D) => {
1219
+ }, x = [...Array(S)].map((D, y) => {
1220
+ const E = y + 1;
1221
+ return l(zo, { activeValue: h, border: d, icon: w(y), isPressed: p, onSubmit: () => r({ value: E, questionId: i, type: s }), range: S, scaleLabelType: f, setActiveValue: c, setIsPressed: m, useMobileStyling: a, value: E, viewDocument: u }, y);
1222
+ }), j = (D) => {
1316
1223
  D.preventDefault(), D.stopPropagation(), r({ value: null, questionId: i, type: s });
1317
1224
  };
1318
- return a("form", { className: O(e, "ul-card--likert", "fade-in-transition"), children: [a(ae, { message: n, properties: o }), a(ge, { properties: o, defaultBody: () => a(Y, { children: [a(ve, { children: [a("div", { "aria-label": `Rating (1 - ${j})`, className: "ul-card--likert__numbers", role: "radiogroup", children: w }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: g }), a("span", { children: f })] })] }), !o.required && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: I, children: Ce(o) }) }) })] }) })] }, i);
1319
- }, Dr = (e) => e && (e.scrollHeight > e.offsetHeight ? e : Dr(e.parentElement)), ri = (e) => {
1320
- if (!e || !((n) => n instanceof HTMLElement)(e))
1321
- return 0;
1225
+ return l("form", { className: L(e, "ul-card--likert", "fade-in-transition"), children: [l(ne, { message: n, properties: o }), l(ce, { properties: o, defaultBody: () => l(Z, { children: [l(ue, { children: [l("div", { "aria-label": `Rating (1 - ${S})`, className: "ul-card--likert__numbers", role: "radiogroup", children: x }), l("div", { className: "ul-card--likert__labels", children: [l("span", { children: g }), l("span", { children: b })] })] }), !o.required && l(ge, { children: l("div", { className: "ul-vertical-centered-container", children: l(Y, { onClick: j, children: ye(o) }) }) })] }) })] }, i);
1226
+ }, Tr = (e) => e && (e.scrollHeight > e.offsetHeight ? e : Tr(e.parentElement)), Fo = (e) => {
1227
+ if (!e || !((n) => n instanceof HTMLElement)(e)) return 0;
1322
1228
  const t = getComputedStyle(e);
1323
1229
  return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
1324
- }, oi = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1325
- const o = te([]), { border: i, useMobileStyling: s } = q((u) => ({ border: u.border, useMobileStyling: u.useMobileStyling })), d = n.findIndex((u) => r[u.id] === null), [l, p] = W(d), h = Ke((u, m) => {
1326
- t(u, m);
1327
- const g = l + 1, f = n[g];
1328
- if (f && r[f.id] === null) {
1329
- p(g);
1330
- const v = o.current[l];
1230
+ }, Wo = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1231
+ const o = J([]), { border: i, useMobileStyling: s } = U((p) => ({ border: p.border, useMobileStyling: p.useMobileStyling })), d = n.findIndex((p) => r[p.id] === null), [a, u] = z(d), h = ze((p, m) => {
1232
+ t(p, m);
1233
+ const g = a + 1, b = n[g];
1234
+ if (b && r[b.id] === null) {
1235
+ u(g);
1236
+ const v = o.current[a];
1331
1237
  if (v != null && v.firstElementChild) {
1332
- const k = Dr(v), _ = v.firstElementChild, T = ri(v) + _.clientHeight;
1333
- k == null || k.scrollTo(0, v.offsetTop + T);
1238
+ const _ = Tr(v), f = v.firstElementChild, T = Fo(v) + f.clientHeight;
1239
+ _ == null || _.scrollTo(0, v.offsetTop + T);
1334
1240
  }
1335
1241
  }
1336
- }, [t, n, r, l]), c = Ke((u, m) => {
1337
- const g = l === u;
1338
- return a(Go, { animate: !0, header: m.label, isOpen: g, onClick: () => p(g && !window.UserLeap.isMobileSDK ? -1 : u), ref: (f) => {
1339
- f && (o.current[u] = f);
1340
- }, showHeaderCheck: r[m.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((f) => a(et, { allowTextEntry: !1, ariaLabel: `${m.label}-${f.label}`, border: i, error: !1, id: `${m.id}-${f.value}`, isRadio: !0, isSelected: r[m.id] === f.value, label: f.label, onUserInputChanged: () => h(m.id, f.value), useMobileStyling: s }, f.label)) }) }, m.id);
1341
- }, [i, e, l, h, r, s]);
1342
- return a("div", { children: n.map((u, m) => c(m, u)) });
1343
- }, ii = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1344
- const { border: o, useMobileStyling: i } = q((c) => ({ border: c.border, useMobileStyling: c.useMobileStyling })), s = n.length, d = e.length, l = te(null), [p, h] = W(!1);
1345
- return K(() => {
1346
- const c = l.current, u = new ResizeObserver((m) => {
1242
+ }, [t, n, r, a]), c = ze((p, m) => {
1243
+ const g = a === p;
1244
+ return l(Oo, { animate: !0, header: m.label, isOpen: g, onClick: () => u(g && !window.UserLeap.isMobileSDK ? -1 : p), ref: (b) => {
1245
+ b && (o.current[p] = b);
1246
+ }, showHeaderCheck: r[m.id] !== null, children: l("div", { style: { paddingTop: "12px" }, children: e.map((b) => l(Ge, { allowTextEntry: !1, ariaLabel: `${m.label}-${b.label}`, border: i, error: !1, id: `${m.id}-${b.value}`, isRadio: !0, isSelected: r[m.id] === b.value, label: b.label, onUserInputChanged: () => h(m.id, b.value), useMobileStyling: s }, b.label)) }) }, m.id);
1247
+ }, [i, e, a, h, r, s]);
1248
+ return l("div", { children: n.map((p, m) => c(m, p)) });
1249
+ }, Zo = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1250
+ const { border: o, useMobileStyling: i } = U((c) => ({ border: c.border, useMobileStyling: c.useMobileStyling })), s = n.length, d = e.length, a = J(null), [u, h] = z(!1);
1251
+ return F(() => {
1252
+ const c = a.current, p = new ResizeObserver((m) => {
1347
1253
  window.requestAnimationFrame(() => {
1348
1254
  c && h(Math.round(m[0].contentRect.width) < c.scrollWidth);
1349
1255
  });
1350
1256
  });
1351
- return c && u.observe(c), () => {
1352
- c && u.unobserve(c);
1257
+ return c && p.observe(c), () => {
1258
+ c && p.unobserve(c);
1353
1259
  };
1354
- }, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: O("ul-card--matrix_container", p && "ul-matrix-scroll-gradient"), onScroll: () => {
1260
+ }, []), l("div", { className: "ul-card--matrix_question_container", children: [l("div", { className: L("ul-card--matrix_container", u && "ul-matrix-scroll-gradient"), onScroll: () => {
1355
1261
  (() => {
1356
- const c = l.current;
1262
+ const c = a.current;
1357
1263
  c && h(c.clientWidth + Math.abs(c.scrollLeft) < c.scrollWidth);
1358
1264
  })();
1359
- }, ref: l, children: a("div", { className: "ul-card--matrix_grid", style: `--numColumns: ${d}; --numRows: ${s + 1}`, children: [a("div", {}), " ", e.map((c) => a("div", { className: "ul-matrix-column-label", children: c.label }, c.label)), n.map((c) => a(Y, { children: [a("div", { "aria-label": c.label, className: "ul-matrix-row-label", children: c.label }, c.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((u, m) => a("div", { className: O("ul-matrix-option-wrapper", m === d - 1 && "ul-matrix-last-option"), children: a(et, { allowTextEntry: !1, ariaLabel: `${c.label}-${u.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${c.id}-${u.value}`, isRadio: !0, isSelected: r[c.id] === u.value, onUserInputChanged: () => t(c.id, u.value), useMobileStyling: i }) }, u.value)) })] }))] }) }), p && a("button", { className: "ul-matrix-scroll-arrow", onClick: (c) => {
1265
+ }, ref: a, children: l("div", { className: "ul-card--matrix_grid", style: `--numColumns: ${d}; --numRows: ${s + 1}`, children: [l("div", {}), " ", e.map((c) => l("div", { className: "ul-matrix-column-label", children: c.label }, c.label)), n.map((c) => l(Z, { children: [l("div", { "aria-label": c.label, className: "ul-matrix-row-label", children: c.label }, c.label), l("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((p, m) => l("div", { className: L("ul-matrix-option-wrapper", m === d - 1 && "ul-matrix-last-option"), children: l(Ge, { allowTextEntry: !1, ariaLabel: `${c.label}-${p.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${c.id}-${p.value}`, isRadio: !0, isSelected: r[c.id] === p.value, onUserInputChanged: () => t(c.id, p.value), useMobileStyling: i }) }, p.value)) })] }))] }) }), u && l("button", { className: "ul-matrix-scroll-arrow", onClick: (c) => {
1360
1266
  c.preventDefault();
1361
- const u = l.current;
1362
- if (u) {
1363
- const m = getComputedStyle(u).direction === "rtl";
1364
- u.scrollLeft = m ? u.clientWidth - u.scrollWidth : u.scrollWidth;
1267
+ const p = a.current;
1268
+ if (p) {
1269
+ const m = getComputedStyle(p).direction === "rtl";
1270
+ p.scrollLeft = m ? p.clientWidth - p.scrollWidth : p.scrollWidth;
1365
1271
  }
1366
- }, children: a("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }) })] });
1367
- }, si = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s }) => {
1368
- const { useMobileStyling: d } = q((v) => ({ useMobileStyling: v.useMobileStyling })), l = o.matrixColumn, p = o.required, h = r.reduce((v, k) => (v[k.id] = null, v), {}), [c, u] = W(h), m = (v, k) => {
1369
- u((_) => ({ ..._, [v]: k }));
1370
- }, g = p && Object.values(c).every((v) => v == null), f = o.displayMatrixAsAccordion || d;
1371
- return a("form", { className: O(e, "fade-in-transition", "ul-card__matrix"), id: "text-form", onSubmit: (v) => {
1272
+ }, children: l("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }) }) })] });
1273
+ }, Go = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s }) => {
1274
+ const { useMobileStyling: d } = U((v) => ({ useMobileStyling: v.useMobileStyling })), a = o.matrixColumn, u = o.required, h = r.reduce((v, _) => (v[_.id] = null, v), {}), [c, p] = z(h), m = (v, _) => {
1275
+ p((f) => ({ ...f, [v]: _ }));
1276
+ }, g = u && Object.values(c).every((v) => v == null), b = o.displayMatrixAsAccordion || d;
1277
+ return l("form", { className: L(e, "fade-in-transition", "ul-card__matrix"), id: "text-form", onSubmit: (v) => {
1372
1278
  v.preventDefault(), v.stopPropagation(), n({ value: c, questionId: i, type: s });
1373
- }, children: [a(ae, { message: t, properties: o }), a(ge, { properties: o, defaultBody: () => a(Y, { children: [a(ve, { children: a(f ? oi : ii, { columns: l, onSelect: m, options: r, selectedOptions: c }) }), a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: g, children: Ce(o) }) }) })] }) })] }, i);
1374
- }, ai = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
1375
- const { themeColor: o } = q((i) => ({ doc: i.viewDocument, themeColor: i.border }));
1376
- return a("div", { className: "select-list", children: e.map((i) => {
1377
- return a("div", { className: "select-option", onClick: (d) => {
1279
+ }, children: [l(ne, { message: t, properties: o }), l(ce, { properties: o, defaultBody: () => l(Z, { children: [l(ue, { children: l(b ? Wo : Zo, { columns: a, onSelect: m, options: r, selectedOptions: c }) }), l(ge, { children: l("div", { className: "ul-card__button-wrapper", children: l(Y, { disabled: g, children: ye(o) }) }) })] }) })] }, i);
1280
+ }, Ko = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
1281
+ const { themeColor: o } = U((i) => ({ doc: i.viewDocument, themeColor: i.border }));
1282
+ return l("div", { className: "select-list", children: e.map((i) => {
1283
+ return l("div", { className: "select-option", onClick: (d) => {
1378
1284
  t(i), d.stopPropagation();
1379
- }, role: "option", children: [r && a(Ir, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
1285
+ }, role: "option", children: [r && l(Sr, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
1380
1286
  var s;
1381
1287
  }) });
1382
- }, li = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
1383
- const [s, d] = W(!1), { viewDocument: l, update: p } = q((u) => ({ viewDocument: u.viewDocument, update: u.update })), h = () => {
1384
- d(!s), p();
1288
+ }, Yo = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
1289
+ const [s, d] = z(!1), { viewDocument: a, update: u } = U((p) => ({ viewDocument: p.viewDocument, update: p.update })), h = () => {
1290
+ d(!s), u();
1385
1291
  };
1386
- K(() => {
1292
+ F(() => {
1387
1293
  var m;
1388
- const u = () => {
1389
- d(!1), p();
1294
+ const p = () => {
1295
+ d(!1), u();
1390
1296
  };
1391
- l.addEventListener("click", u);
1297
+ a.addEventListener("click", p);
1392
1298
  try {
1393
- (m = window.parent) == null || m.addEventListener("click", u);
1299
+ (m = window.parent) == null || m.addEventListener("click", p);
1394
1300
  } catch {
1395
- window.addEventListener("click", u);
1301
+ window.addEventListener("click", p);
1396
1302
  }
1397
1303
  return () => {
1398
1304
  var g;
1399
- l.removeEventListener("click", u);
1305
+ a.removeEventListener("click", p);
1400
1306
  try {
1401
- (g = window.parent) == null || g.removeEventListener("click", u);
1307
+ (g = window.parent) == null || g.removeEventListener("click", p);
1402
1308
  } catch {
1403
- window.removeEventListener("click", u);
1309
+ window.removeEventListener("click", p);
1404
1310
  }
1405
1311
  };
1406
- }, [l, p]);
1312
+ }, [a, u]);
1407
1313
  const c = i.length === 0 ? ["select-button-placeholder"] : [];
1408
- return a(Y, { children: [a("button", { "aria-label": "choice dropdown button", className: O("select-button", ...c), onClick: (u) => {
1409
- u.stopPropagation(), h();
1410
- }, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Er, {})] }), s && a(ai, { options: r, selectedOptions: i, selectItem: (u) => {
1411
- var f;
1412
- const m = i.some((v) => v.id === u.id), g = i.some((v) => {
1413
- var k;
1414
- return (k = v.optionProperties) == null ? void 0 : k.noneOfTheAbove;
1314
+ return l(Z, { children: [l("button", { "aria-label": "choice dropdown button", className: L("select-button", ...c), onClick: (p) => {
1315
+ p.stopPropagation(), h();
1316
+ }, type: "button", children: [l("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), l(wr, {})] }), s && l(Ko, { options: r, selectedOptions: i, selectItem: (p) => {
1317
+ var b;
1318
+ const m = i.some((v) => v.id === p.id), g = i.some((v) => {
1319
+ var _;
1320
+ return (_ = v.optionProperties) == null ? void 0 : _.noneOfTheAbove;
1415
1321
  });
1416
- (f = u.optionProperties) != null && f.noneOfTheAbove && !m ? n([u]) : e ? n(m ? i.filter((v) => v.id !== u.id) : g ? [u] : [...i, u]) : m || n([u]), e || h();
1322
+ (b = p.optionProperties) != null && b.noneOfTheAbove && !m ? n([p]) : e ? n(m ? i.filter((v) => v.id !== p.id) : g ? [p] : [...i, p]) : m || n([p]), e || h();
1417
1323
  }, showCheckbox: e })] });
1418
- }, Rr = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s }) => {
1419
- const { border: d, useMobileStyling: l } = q((E) => ({ border: E.border, useMobileStyling: E.useMobileStyling })), p = r.reduce((E, w) => (E[w.id] = { isSelected: !1 }, E), {}), [h, c] = W(p), u = s === "multiplechoice", m = o.required, g = r.find((E) => {
1420
- var w;
1421
- return (w = E.optionProperties) == null ? void 0 : w.noneOfTheAbove;
1422
- }), f = Object.entries(h).some(([E, w]) => {
1324
+ }, Pr = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s }) => {
1325
+ const { border: d, useMobileStyling: a } = U((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling })), u = r.reduce((w, x) => (w[x.id] = { isSelected: !1 }, w), {}), [h, c] = z(u), p = s === "multiplechoice", m = o.required, g = r.find((w) => {
1423
1326
  var x;
1424
- const I = r.find((b) => `${b.id}` === E), D = w.userText === void 0 || w.userText.trim() === "";
1425
- return ((x = I == null ? void 0 : I.optionProperties) == null ? void 0 : x.allowsTextEntry) && D && w.isSelected;
1426
- }), v = Object.values(h).some((E) => E.isSelected), k = f || m && !v, _ = r.map(({ id: E, label: w, value: I, optionProperties: D }) => {
1427
- var S, L;
1428
- const x = `${E}`, { allowsTextEntry: b, noneOfTheAbove: y } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...D };
1429
- return a(et, { allowTextEntry: b, border: d, error: !1, id: x, isRadio: u, isSelected: !!((S = h[x]) != null && S.isSelected), label: w, noneOfTheAbove: y, onUserInputChanged: (C) => j(C.id, C.selected, C.userText, C.noneOfTheAbove), promptText: "Please specify", text: (L = h[E]) == null ? void 0 : L.userText, useMobileStyling: l, value: I }, x);
1430
- }), T = (E) => {
1431
- E.preventDefault(), E.stopPropagation(), n(h);
1432
- }, j = (E, w, I, D) => {
1433
- const x = Object.assign({}, h);
1434
- if ((u || D) && w)
1435
- for (const b of Object.values(x))
1436
- b.isSelected = !1, delete b.userText;
1437
- else
1438
- g && !D && h[g.id].isSelected && (x[g.id].isSelected = !1);
1439
- x[E] = { isSelected: w, userText: I }, c(x);
1327
+ return (x = w.optionProperties) == null ? void 0 : x.noneOfTheAbove;
1328
+ }), b = Object.entries(h).some(([w, x]) => {
1329
+ var y;
1330
+ const j = r.find((E) => `${E.id}` === w), D = x.userText === void 0 || x.userText.trim() === "";
1331
+ return ((y = j == null ? void 0 : j.optionProperties) == null ? void 0 : y.allowsTextEntry) && D && x.isSelected;
1332
+ }), v = Object.values(h).some((w) => w.isSelected), _ = b || m && !v, f = r.map(({ id: w, label: x, value: j, optionProperties: D }) => {
1333
+ var I, N;
1334
+ const y = `${w}`, { allowsTextEntry: E, noneOfTheAbove: k } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...D };
1335
+ return l(Ge, { allowTextEntry: E, border: d, error: !1, id: y, isRadio: p, isSelected: !!((I = h[y]) != null && I.isSelected), label: x, noneOfTheAbove: k, onUserInputChanged: (C) => S(C.id, C.selected, C.userText, C.noneOfTheAbove), promptText: "Please specify", text: (N = h[w]) == null ? void 0 : N.userText, useMobileStyling: a, value: j }, y);
1336
+ }), T = (w) => {
1337
+ w.preventDefault(), w.stopPropagation(), n(h);
1338
+ }, S = (w, x, j, D) => {
1339
+ const y = Object.assign({}, h);
1340
+ if ((p || D) && x) for (const E of Object.values(y)) E.isSelected = !1, delete E.userText;
1341
+ else g && !D && h[g.id].isSelected && (y[g.id].isSelected = !1);
1342
+ y[w] = { isSelected: x, userText: j }, c(y);
1440
1343
  };
1441
- return a("form", { className: O(e, "ul-card--multiple", "fade-in-transition"), id: "text-form", onSubmit: T, children: [a(ae, { message: t, properties: o }), a(ge, { properties: o, defaultBody: () => a(Y, { children: [a(ve, { children: o.isDropdown ? a(li, { isMultiSelect: !u, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (E) => {
1442
- const w = { ...h };
1443
- for (const I of r)
1444
- E.includes(I) ? w[I.id].isSelected = !0 : w[I.id].isSelected = !1;
1445
- c(w);
1446
- }, options: r, placeholderText: o.dropdownPlaceholderText ?? (u ? "Select choice" : "Select choice(s)"), value: r.filter((E) => h[E.id].isSelected) }) : a("div", { className: O(G("ul-card__choices", l)), role: u ? "radiogroup" : "group", children: _ }) }), a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: k, onClick: T, children: Ce(o) }) }) })] }) })] }, i);
1447
- }, di = (e) => {
1344
+ return l("form", { className: L(e, "ul-card--multiple", "fade-in-transition"), id: "text-form", onSubmit: T, children: [l(ne, { message: t, properties: o }), l(ce, { properties: o, defaultBody: () => l(Z, { children: [l(ue, { children: o.isDropdown ? l(Yo, { isMultiSelect: !p, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (w) => {
1345
+ const x = { ...h };
1346
+ for (const j of r) w.includes(j) ? x[j.id].isSelected = !0 : x[j.id].isSelected = !1;
1347
+ c(x);
1348
+ }, options: r, placeholderText: o.dropdownPlaceholderText ?? (p ? "Select choice" : "Select choice(s)"), value: r.filter((w) => h[w.id].isSelected) }) : l("div", { className: L(W("ul-card__choices", a)), role: p ? "radiogroup" : "group", children: f }) }), l(ge, { children: l("div", { className: "ul-card__button-wrapper", children: l(Y, { disabled: _, onClick: T, children: ye(o) }) }) })] }) })] }, i);
1349
+ }, Qo = (e) => {
1448
1350
  const { questionId: t, type: n, next: r, options: o } = e;
1449
- return a(Rr, { ...e, onSubmit: (i) => {
1450
- const s = Object.entries(i).find(([, c]) => c.isSelected) || [void 0, void 0], [d, l] = s, p = o.find((c) => `${c.id}` === d), h = l != null && l.userText ? { [d]: { userText: l.userText } } : null;
1451
- r({ value: p && d ? { [d]: p.value } : {}, secondaryValue: h, questionId: t, type: n });
1351
+ return l(Pr, { ...e, onSubmit: (i) => {
1352
+ const s = Object.entries(i).find(([, c]) => c.isSelected) || [void 0, void 0], [d, a] = s, u = o.find((c) => `${c.id}` === d), h = a != null && a.userText ? { [d]: { userText: a.userText } } : null;
1353
+ r({ value: u && d ? { [d]: u.value } : {}, secondaryValue: h, questionId: t, type: n });
1452
1354
  } });
1453
- }, ci = (e) => {
1355
+ }, Jo = (e) => {
1454
1356
  const { questionId: t, type: n, next: r } = e;
1455
- return a(Rr, { ...e, onSubmit: (o) => {
1456
- const i = Object.entries(o).reduce((d, [l, p]) => (d[l] = p.isSelected, d), {}), s = Object.entries(o).reduce((d, [l, p]) => {
1457
- if (!p.userText)
1458
- return d;
1357
+ return l(Pr, { ...e, onSubmit: (o) => {
1358
+ const i = Object.entries(o).reduce((d, [a, u]) => (d[a] = u.isSelected, d), {}), s = Object.entries(o).reduce((d, [a, u]) => {
1359
+ if (!u.userText) return d;
1459
1360
  const h = d || {};
1460
- return h[l] = { userText: p.userText }, h;
1361
+ return h[a] = { userText: u.userText }, h;
1461
1362
  }, null);
1462
1363
  r({ value: i, secondaryValue: s, questionId: t, type: n });
1463
1364
  } });
1464
- }, ui = ({ className: e, props: { labels: t, message: n, properties: r }, next: o, questionId: i, type: s }) => {
1465
- const { border: d, useMobileStyling: l, viewDocument: p } = q((g) => ({ border: g.border, useMobileStyling: g.useMobileStyling, viewDocument: g.viewDocument })), h = t && t.left, c = t && t.right, u = [...Array(11)].map((g, f) => a("button", { className: O(G("nps-number", l), G(`nps-number-${f}`, l)), id: `option-${f}`, onClick: () => o({ value: f, questionId: i, type: s }), onKeyDown: (v) => {
1466
- var _, T;
1467
- const k = p.querySelectorAll("button.nps-number");
1468
- v.key === "ArrowRight" ? (_ = k[f + 1]) == null || _.focus() : v.key === "ArrowLeft" ? (T = k[f - 1]) == null || T.focus() : v.key !== "Enter" && v.key !== " " || o({ value: f, questionId: i, type: s });
1365
+ }, Xo = ({ className: e, props: { labels: t, message: n, properties: r }, next: o, questionId: i, type: s }) => {
1366
+ const { border: d, useMobileStyling: a, viewDocument: u } = U((g) => ({ border: g.border, useMobileStyling: g.useMobileStyling, viewDocument: g.viewDocument })), h = t && t.left, c = t && t.right, p = [...Array(11)].map((g, b) => l("button", { className: L(W("nps-number", a), W(`nps-number-${b}`, a)), id: `option-${b}`, onClick: () => o({ value: b, questionId: i, type: s }), onKeyDown: (v) => {
1367
+ var f, T;
1368
+ const _ = u.querySelectorAll("button.nps-number");
1369
+ v.key === "ArrowRight" ? (f = _[b + 1]) == null || f.focus() : v.key === "ArrowLeft" ? (T = _[b - 1]) == null || T.focus() : v.key !== "Enter" && v.key !== " " || o({ value: b, questionId: i, type: s });
1469
1370
  }, onPointerDown: (v) => {
1470
1371
  v.currentTarget.style.zIndex = "2", v.currentTarget.style.borderColor = d;
1471
1372
  }, onPointerLeave: (v) => {
1472
- v.currentTarget.style.zIndex = "auto", v.currentTarget.style.borderColor = Ct;
1473
- }, tabIndex: 0, children: f }, f)), m = (g) => {
1373
+ v.currentTarget.style.zIndex = "auto", v.currentTarget.style.borderColor = bt;
1374
+ }, tabIndex: 0, children: b }, b)), m = (g) => {
1474
1375
  g.preventDefault(), g.stopPropagation(), o({ value: null, questionId: i, type: s });
1475
1376
  };
1476
- return a("form", { className: O(e, "ul-card--nps", "fade-in-transition"), children: [a(ae, { message: n, properties: r }), a(ge, { properties: r, defaultBody: () => a(Y, { children: [a(ve, { children: [a("div", { className: "ul-card--nps__numbers", children: u }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: h }), a("span", { children: c })] })] }), !r.required && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: m, children: Ce(r) }) }) })] }) })] }, i);
1477
- }, pi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1478
- const { border: s, useMobileStyling: d, update: l } = q((j) => ({ border: j.border, useMobileStyling: j.useMobileStyling, update: j.update })), [p, h] = W(""), c = te(null), u = p.trim(), m = r.required === !0 && !u, g = Tr(c, () => l()), f = (j) => {
1479
- g(), j.preventDefault(), j.stopPropagation(), h(j.currentTarget.value);
1480
- }, v = (j) => {
1481
- j.preventDefault(), j.stopPropagation(), n({ value: p, questionId: o, type: i });
1482
- }, k = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", _ = (j) => {
1483
- j.currentTarget.style.borderColor = s;
1484
- }, T = (j) => {
1485
- j.currentTarget.style.borderColor = Ct;
1377
+ return l("form", { className: L(e, "ul-card--nps", "fade-in-transition"), children: [l(ne, { message: n, properties: r }), l(ce, { properties: r, defaultBody: () => l(Z, { children: [l(ue, { children: [l("div", { className: "ul-card--nps__numbers", children: p }), l("div", { className: "ul-card--nps__labels", children: [l("span", { children: h }), l("span", { children: c })] })] }), !r.required && l(ge, { children: l("div", { className: "ul-vertical-centered-container", children: l(Y, { onClick: m, children: ye(r) }) }) })] }) })] }, i);
1378
+ }, ei = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1379
+ const { border: s, useMobileStyling: d, update: a } = U((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, update: S.update })), [u, h] = z(""), c = J(null), p = u.trim(), m = r.required === !0 && !p, g = jr(c, () => a()), b = (S) => {
1380
+ g(), S.preventDefault(), S.stopPropagation(), h(S.currentTarget.value);
1381
+ }, v = (S) => {
1382
+ S.preventDefault(), S.stopPropagation(), n({ value: u, questionId: o, type: i });
1383
+ }, _ = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", f = (S) => {
1384
+ S.currentTarget.style.borderColor = s;
1385
+ }, T = (S) => {
1386
+ S.currentTarget.style.borderColor = bt;
1486
1387
  };
1487
- return a("form", { className: O(e, "ul-card--text", "fade-in-transition"), id: "text-form", children: [a(ae, { message: t, properties: r }), a(ge, { defaultBody: () => a("div", { className: "ul-card-text", children: [a(ve, { children: a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-labelledby": "ul-question", "aria-describedby": "ul-caption", "aria-multiline": "true", "aria-placeholder": k, className: O(G("ul-card-text__input", d)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: f, onFocus: _, placeholder: k, ref: c, role: "textbox", tabIndex: 0 }) }) }), a(_e, { children: [a(X, { disabled: m, onClick: v, children: Ce(r) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] })] }), properties: r })] }, o);
1488
- }, yt = 1, Nr = 2, Lr = 3, Qe = (e) => e.type === "av_permission", _n = (e) => e.type === "screen_permission", Mr = (e, t) => e === void 0 ? yt : e ? ((n, r) => !(Qe(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Lr : yt : Nr, bn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1489
- }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, de = kr((e) => ({ ...bn, reset: () => {
1490
- e(bn);
1388
+ return l("form", { className: L(e, "ul-card--text", "fade-in-transition"), id: "text-form", children: [l(ne, { message: t, properties: r }), l(ce, { defaultBody: () => l("div", { className: "ul-card-text", children: [l(ue, { children: l("div", { className: "ul-card-text__container", children: l("textarea", { "aria-labelledby": "ul-question", "aria-describedby": "ul-caption", "aria-multiline": "true", "aria-placeholder": _, className: L(W("ul-card-text__input", d)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: b, onFocus: f, placeholder: _, ref: c, role: "textbox", tabIndex: 0 }) }) }), l(ge, { children: [l(Y, { disabled: m, onClick: v, children: ye(r) }), r.footerHtml && l("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] })] }), properties: r })] }, o);
1389
+ }, gt = 1, Dr = 2, Rr = 3, Fe = (e) => e.type === "av_permission", fn = (e) => e.type === "screen_permission", Nr = (e, t) => e === void 0 ? gt : e ? ((n, r) => !(Fe(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Rr : gt : Dr, _n = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1390
+ }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, ie = yr((e) => ({ ..._n, reset: () => {
1391
+ e(_n);
1491
1392
  }, updatePage: (t) => {
1492
1393
  e(t);
1493
1394
  } }));
1494
- function xt({ currentPage: e, pages: t }) {
1495
- const { avStream: n, recordingMediaTypes: r, updatePage: o } = de.getState(), { recorderEventEmitter: i } = q.getState();
1395
+ function vt({ currentPage: e, pages: t }) {
1396
+ const { avStream: n, recordingMediaTypes: r, updatePage: o } = ie.getState(), { recorderEventEmitter: i } = U.getState();
1496
1397
  i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, d) => {
1497
- if (n === s)
1498
- return;
1499
- let l = e;
1398
+ if (n === s) return;
1399
+ let a = e;
1500
1400
  if (s && !e.permissionDescriptors.includes("camera")) {
1501
- const p = t.indexOf(e), h = d != null && d.active ? p + 2 : p + 1;
1502
- d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), l = t[h];
1401
+ const u = t.indexOf(e), h = d != null && d.active ? u + 2 : u + 1;
1402
+ d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), a = t[h];
1503
1403
  }
1504
- o({ currentPage: l, avStream: s });
1404
+ o({ currentPage: a, avStream: s });
1505
1405
  } });
1506
1406
  }
1507
- function kt({ status: e }) {
1508
- const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = de.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = q.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1509
- n && i.emit("finish.task", { "begin.callback": (p) => {
1510
- s({ mediaRecordingUid: p, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1511
- }, "progress.callback": (p, h) => {
1512
- s({ mediaRecordingUid: p, progressPct: h.detail, isSubmitted: !1, isComplete: !1 });
1513
- }, "upload.callback": (p) => {
1514
- p && s({ mediaRecordingUid: p, isComplete: !0, isSubmitted: !0, progressPct: 100 });
1515
- }, "passthrough.data": n, "current.index": d, "task.response": l, "task.complete.callback": (p) => {
1516
- l.value.taskDurationMillisecond = p, r && (l.value.mediaRecordingUids = r), o(), t(l);
1407
+ function ft({ status: e }) {
1408
+ const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = ie.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = U.getState(), a = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1409
+ n && i.emit("finish.task", { "begin.callback": (u) => {
1410
+ s({ mediaRecordingUid: u, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1411
+ }, "progress.callback": (u, h) => {
1412
+ s({ mediaRecordingUid: u, progressPct: h.detail, isSubmitted: !1, isComplete: !1 });
1413
+ }, "upload.callback": (u) => {
1414
+ u && s({ mediaRecordingUid: u, isComplete: !0, isSubmitted: !0, progressPct: 100 });
1415
+ }, "passthrough.data": n, "current.index": d, "task.response": a, "task.complete.callback": (u) => {
1416
+ a.value.taskDurationMillisecond = u, r && (a.value.mediaRecordingUids = r), o(), t(a);
1517
1417
  } });
1518
1418
  }
1519
- function Mt({ pages: e, setIsRequestingPermission: t }) {
1520
- const { recorderEventEmitter: n, eventEmitFn: r } = q.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = de.getState();
1521
- if (!i)
1522
- return;
1523
- const l = e.indexOf(i);
1419
+ function Pt({ pages: e, setIsRequestingPermission: t }) {
1420
+ const { recorderEventEmitter: n, eventEmitFn: r } = U.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = ie.getState();
1421
+ if (!i) return;
1422
+ const a = e.indexOf(i);
1524
1423
  switch (i.type) {
1525
1424
  case "av_permission": {
1526
- const p = d ? l + 2 : l + 1;
1425
+ const u = d ? a + 2 : a + 1;
1527
1426
  return d && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (h) => {
1528
1427
  o({ mediaRecordingUids: h });
1529
- } }), void o({ currentPage: e[p] });
1428
+ } }), void o({ currentPage: e[u] });
1530
1429
  }
1531
1430
  case "screen_permission":
1532
- return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (p, h) => {
1533
- const c = h ? e[l + 1] : i;
1534
- h && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (u) => {
1535
- o({ captureStream: h, mediaRecordingUids: u });
1431
+ return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (u, h) => {
1432
+ const c = h ? e[a + 1] : i;
1433
+ h && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (p) => {
1434
+ o({ captureStream: h, mediaRecordingUids: p });
1536
1435
  } }), o({ currentPage: c, screenPermissionRequested: !0, captureStream: h });
1537
1436
  } });
1538
1437
  case "start_task":
1539
- return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[l + 1], screenPermissionRequested: !0 });
1438
+ return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[a + 1], screenPermissionRequested: !0 });
1540
1439
  case "complete_task":
1541
1440
  return;
1542
1441
  }
1543
1442
  }
1544
- const Or = "ul-permission-graphics-container", Ur = "ul-permission-body", Hr = O(Or, "ul_recorded-task-inset-spacing"), tt = O("ul-horizontal-button-container", "ul-horizontal-button-container-left"), Ar = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), nt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(X, { className: O(n && "ul-skip-button-below", "ul-button-inactive"), onClick: kt.bind(null, { status: "abandoned" }), children: t || "Skip" }), Ot = (e) => {
1545
- const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = de.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1546
- K(() => {
1443
+ const Lr = "ul-permission-graphics-container", Mr = "ul-permission-body", Or = L(Lr, "ul_recorded-task-inset-spacing"), Ke = L("ul-horizontal-button-container", "ul-horizontal-button-container-left"), Ur = ({ richTextBody: e }) => l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), Ye = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : l(Y, { className: L(n && "ul-skip-button-below", "ul-button-inactive"), onClick: ft.bind(null, { status: "abandoned" }), children: t || "Skip" }), Dt = (e) => {
1444
+ const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = ie.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1445
+ F(() => {
1547
1446
  const s = setInterval(() => {
1548
1447
  i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
1549
1448
  }, 1e3);
1550
1449
  return () => clearInterval(s);
1551
1450
  }, [t, n, i, e, r, o]);
1552
- }, hi = ({ content: e, pages: t, required: n }) => {
1451
+ }, ti = ({ content: e, pages: t, required: n }) => {
1553
1452
  const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
1554
- return Ot(t), a("div", { className: "ul-task-page", children: [i && a(Ar, { richTextBody: i }), a("div", { className: tt, children: [a(X, { onClick: Mt.bind(null, { pages: t }), children: r }), a(nt, { required: n, skipButtonText: o })] })] }, "start-task");
1555
- }, mi = ({ content: e, pages: t, properties: n }) => {
1453
+ return Dt(t), l("div", { className: "ul-task-page", children: [i && l(Ur, { richTextBody: i }), l("div", { className: Ke, children: [l(Y, { onClick: Pt.bind(null, { pages: t }), children: r }), l(Ye, { required: n, skipButtonText: o })] })] }, "start-task");
1454
+ }, ni = ({ content: e, pages: t, properties: n }) => {
1556
1455
  const { buttonText: r, skipButtonText: o } = e;
1557
- Ot(t);
1558
- const i = a(ge, { properties: n, defaultBody: () => a("div", { className: tt, children: [a(X, { className: "ul-complete-task-button", onClick: kt.bind(null, { status: "completed" }), children: r }), a(X, { className: O("ul-button-inactive"), onClick: kt.bind(null, { status: "given.up" }), children: o })] }) });
1559
- return a("div", { className: "ul-task-page", children: [e.taskDetail && a(Ar, { richTextBody: e.taskDetail }), i] }, "complete-task");
1560
- }, gi = ({ content: e, pages: t, required: n }) => {
1561
- const { buttonText: r, skipButtonText: o } = e, [i] = q((l) => [l.tabTitle]), [s, d] = W(!1);
1562
- return a("div", { children: [a("div", { className: Hr, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: Ur, children: i }) })] }), a("div", { className: n ? "" : tt, children: [a(X, { disabled: s, onClick: Mt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(nt, { required: n, skipButtonText: o })] })] });
1563
- }, vi = ({ content: e }) => a("div", { className: O(Or, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), fi = ({ content: e, pages: t, required: n }) => {
1564
- const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = Qe(t[0]) ? t[0] : null;
1565
- return K(() => {
1566
- const l = setInterval(() => {
1567
- d !== null && xt({ currentPage: d, pages: t });
1456
+ Dt(t);
1457
+ const i = l(ce, { properties: n, defaultBody: () => l("div", { className: Ke, children: [l(Y, { className: "ul-complete-task-button", onClick: ft.bind(null, { status: "completed" }), children: r }), l(Y, { className: L("ul-button-inactive"), onClick: ft.bind(null, { status: "given.up" }), children: o })] }) });
1458
+ return l("div", { className: "ul-task-page", children: [e.taskDetail && l(Ur, { richTextBody: e.taskDetail }), i] }, "complete-task");
1459
+ }, ri = ({ content: e, pages: t, required: n }) => {
1460
+ const { buttonText: r, skipButtonText: o } = e, [i] = U((a) => [a.tabTitle]), [s, d] = z(!1);
1461
+ return l("div", { children: [l("div", { className: Or, children: [l("p", { style: { marginTop: "auto" }, children: e.selectTabText }), l("div", { className: "ul-select-tab-container", children: l("p", { className: Mr, children: i }) })] }), l("div", { className: n ? "" : Ke, children: [l(Y, { disabled: s, onClick: Pt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), l(Ye, { required: n, skipButtonText: o })] })] });
1462
+ }, oi = ({ content: e }) => l("div", { className: L(Lr, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), ii = ({ content: e, pages: t, required: n }) => {
1463
+ const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = Fe(t[0]) ? t[0] : null;
1464
+ return F(() => {
1465
+ const a = setInterval(() => {
1466
+ d !== null && vt({ currentPage: d, pages: t });
1568
1467
  }, 1e3);
1569
- return () => clearInterval(l);
1570
- }, [d, t]), d ? a("div", { children: [a("div", { className: Hr, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: Ur, children: o })] }) }), a("div", { className: tt, children: [a(X, { onClick: xt.bind(null, { currentPage: d, pages: t }), children: s }), a(nt, { required: n, skipButtonText: i })] })] }) : null;
1571
- }, _i = ({ stream: e }) => a("video", { autoPlay: !0, className: O("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1468
+ return () => clearInterval(a);
1469
+ }, [d, t]), d ? l("div", { children: [l("div", { className: Or, children: l("p", { className: "ul-av-permission-denied-paragraph", children: [l("span", { className: "ul-av-permission-denied-headline", children: r }), l("span", { className: Mr, children: o })] }) }), l("div", { className: Ke, children: [l(Y, { onClick: vt.bind(null, { currentPage: d, pages: t }), children: s }), l(Ye, { required: n, skipButtonText: i })] })] }) : null;
1470
+ }, si = ({ stream: e }) => l("video", { autoPlay: !0, className: L("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1572
1471
  t && (t.srcObject = e || null);
1573
- } }), bi = ({ content: e, pages: t, required: n }) => {
1574
- const { skipButtonText: r } = e, { avStream: o } = de.getState();
1575
- return Ot(t), a("div", { children: [a(_i, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(X, { onClick: Mt.bind(null, { pages: t }), children: e.buttonText }), a(nt, { bottom: !0, required: n, skipButtonText: r })] })] });
1576
- }, yi = ({ properties: e }) => {
1577
- const { pages: t, required: n } = e, { avStream: r, currentPage: o } = de.getState();
1578
- if (o === void 0)
1579
- return null;
1472
+ } }), ai = ({ content: e, pages: t, required: n }) => {
1473
+ const { skipButtonText: r } = e, { avStream: o } = ie.getState();
1474
+ return Dt(t), l("div", { children: [l(si, { stream: o }), l("div", { className: "ul-vertical-button-container-center", children: [l(Y, { onClick: Pt.bind(null, { pages: t }), children: e.buttonText }), l(Ye, { bottom: !0, required: n, skipButtonText: r })] })] });
1475
+ }, li = ({ properties: e }) => {
1476
+ const { pages: t, required: n } = e, { avStream: r, currentPage: o } = ie.getState();
1477
+ if (o === void 0) return null;
1580
1478
  switch (o == null ? void 0 : o.type) {
1581
1479
  case "av_permission": {
1582
- const i = Mr(r, o);
1583
- return i === yt ? a(vi, { content: o }) : a(i === Nr ? fi : bi, { content: o, pages: t, required: n });
1480
+ const i = Nr(r, o);
1481
+ return i === gt ? l(oi, { content: o }) : l(i === Dr ? ii : ai, { content: o, pages: t, required: n });
1584
1482
  }
1585
1483
  case "screen_permission":
1586
- return a(gi, { content: o, pages: t, required: n });
1484
+ return l(ri, { content: o, pages: t, required: n });
1587
1485
  case "start_task":
1588
- return a(hi, { content: o, pages: t, required: n });
1486
+ return l(ti, { content: o, pages: t, required: n });
1589
1487
  case "complete_task":
1590
- return a(mi, { content: o, pages: t, properties: e });
1488
+ return l(ni, { content: o, pages: t, properties: e });
1591
1489
  default:
1592
1490
  return null;
1593
1491
  }
1594
- }, xi = ({ className: e, properties: t, next: n, questionId: r }) => {
1595
- const o = q(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = de(), { screenPermissionRequested: p } = l, h = de((f) => f.avStream);
1596
- let c = de((f) => f.currentPage);
1597
- c || (c = function({ pages: f, userId: v, responseGroupUid: k, surveyId: _, questionId: T, next: j }) {
1598
- const { updatePage: E } = de.getState(), { eventEmitFn: w, recorderEventEmitter: I } = q.getState(), D = { questionId: T, surveyId: _, visitorId: v, responseGroupUid: k };
1599
- let x = 0;
1600
- I.emit("recorded.task.permission.screen"), w("recorded.task.permission.screen"), I.emit("permission.status", { "permission.status.callback": (y, S, L, C) => {
1601
- const M = f[x], { type: A } = M, H = ["screen"];
1602
- if (Qe(M)) {
1603
- const { permissionDescriptors: B } = M, R = B == null ? void 0 : B.includes("microphone"), $ = B == null ? void 0 : B.includes("camera");
1604
- R && H.push("audio"), $ && H.push("video"), (y != null && y.active && !$ || y != null && y.active && S) && x++;
1492
+ }, di = ({ className: e, properties: t, next: n, questionId: r }) => {
1493
+ const o = U(), { surveyId: i, responseGroupUid: s, userId: d } = o, a = ie(), { screenPermissionRequested: u } = a, h = ie((b) => b.avStream);
1494
+ let c = ie((b) => b.currentPage);
1495
+ c || (c = function({ pages: b, userId: v, responseGroupUid: _, surveyId: f, questionId: T, next: S }) {
1496
+ const { updatePage: w } = ie.getState(), { eventEmitFn: x, recorderEventEmitter: j } = U.getState(), D = { questionId: T, surveyId: f, visitorId: v, responseGroupUid: _ };
1497
+ let y = 0;
1498
+ j.emit("recorded.task.permission.screen"), x("recorded.task.permission.screen"), j.emit("permission.status", { "permission.status.callback": (k, I, N, C) => {
1499
+ const H = b[y], { type: O } = H, B = ["screen"];
1500
+ if (Fe(H)) {
1501
+ const { permissionDescriptors: A } = H, G = A == null ? void 0 : A.includes("microphone"), $ = A == null ? void 0 : A.includes("camera");
1502
+ G && B.push("audio"), $ && B.push("video"), (k != null && k.active && !$ || k != null && k.active && I) && y++;
1605
1503
  }
1606
- _n(f[x]) && L && (x++, I.emit("begin.recording", { "recording.media.types": H, "start.recording.callback": (B) => E({ mediaRecordingUids: B }) })), E({ currentPage: f[x], avStream: y, screenPermissionRequested: L, nextQuestion: j, type: A, passthroughData: D, recordingMediaTypes: H, captureStream: C });
1504
+ fn(b[y]) && N && (y++, j.emit("begin.recording", { "recording.media.types": B, "start.recording.callback": (A) => w({ mediaRecordingUids: A }) })), w({ currentPage: b[y], avStream: k, screenPermissionRequested: N, nextQuestion: S, type: O, passthroughData: D, recordingMediaTypes: B, captureStream: C });
1607
1505
  } });
1608
- const b = f[x];
1609
- return b.type === "av_permission" && xt({ currentPage: b, pages: f }), b;
1610
- }({ questionId: r, surveyId: i, next: (f) => {
1611
- n(f);
1506
+ const E = b[y];
1507
+ return E.type === "av_permission" && vt({ currentPage: E, pages: b }), E;
1508
+ }({ questionId: r, surveyId: i, next: (b) => {
1509
+ n(b);
1612
1510
  }, pages: t.pages, responseGroupUid: s, userId: d }));
1613
- let u = c.headline, m = c.captionText;
1614
- const g = Mr(h, c);
1615
- return _n(c) && p && (u = c.permissionDeniedHeadline, m = c.permissionDeniedCaptionText), Qe(c) && g === Lr && (u = c.permissionGrantedHeadline, m = c.permissionGrantedCaptionText), a("div", { className: O(e, "ul-center-horizontally", "fade-in-transition"), children: [a(ae, { message: u, properties: { captionText: m } }), a(ve, { children: a(yi, { properties: t }) })] });
1616
- }, ki = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, wi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1617
- const { visitorAttributes: s } = q((u) => ({ visitorAttributes: u.visitorAttributes })), d = (u, m = !1) => {
1511
+ let p = c.headline, m = c.captionText;
1512
+ const g = Nr(h, c);
1513
+ return fn(c) && u && (p = c.permissionDeniedHeadline, m = c.permissionDeniedCaptionText), Fe(c) && g === Rr && (p = c.permissionGrantedHeadline, m = c.permissionGrantedCaptionText), l("div", { className: L(e, "ul-center-horizontally", "fade-in-transition"), children: [l(ne, { message: p, properties: { captionText: m } }), l(ue, { children: l(li, { properties: t }) })] });
1514
+ }, ci = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, ui = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1515
+ const { visitorAttributes: s } = U((p) => ({ visitorAttributes: p.visitorAttributes })), d = (p, m = !1) => {
1618
1516
  n({ value: m ? { skipped: !0 } : void 0, questionId: o, type: i });
1619
- }, l = (u) => {
1620
- u.key !== "Enter" && u.key !== " " || n({ value: void 0, questionId: o, type: i });
1621
- }, p = ((u, m = {}) => {
1622
- if (!u)
1623
- return u;
1517
+ }, a = (p) => {
1518
+ p.key !== "Enter" && p.key !== " " || n({ value: void 0, questionId: o, type: i });
1519
+ }, u = ((p, m = {}) => {
1520
+ if (!p) return p;
1624
1521
  try {
1625
- const _ = new URL(u);
1626
- if (_.protocol !== "http:" && _.protocol !== "https:")
1627
- return;
1522
+ const f = new URL(p);
1523
+ if (f.protocol !== "http:" && f.protocol !== "https:") return;
1628
1524
  } catch {
1629
1525
  return;
1630
1526
  }
1631
- let g = u;
1632
- const f = [];
1633
- for (const [_, T] of Object.entries(ki))
1634
- if (g.toLowerCase().includes(_))
1635
- if (m[T]) {
1636
- const j = new RegExp(_, "gi");
1637
- g = g.replace(j, m[T]);
1638
- } else
1639
- f.push(_);
1640
- if (f.length === 0 || !g.includes("?"))
1641
- return g;
1642
- const v = g.slice(0, g.indexOf("?")), k = g.slice(g.indexOf("?") + 1).split("&").map((_) => _.split("=")).filter((_) => !f.includes(_[1]));
1643
- return k.length === 0 ? v : `${v}?${k.map((_) => _.join("=")).join("&")}`;
1527
+ let g = p;
1528
+ const b = [];
1529
+ for (const [f, T] of Object.entries(ci)) if (g.toLowerCase().includes(f)) if (m[T]) {
1530
+ const S = new RegExp(f, "gi");
1531
+ g = g.replace(S, m[T]);
1532
+ } else b.push(f);
1533
+ if (b.length === 0 || !g.includes("?")) return g;
1534
+ const v = g.slice(0, g.indexOf("?")), _ = g.slice(g.indexOf("?") + 1).split("&").map((f) => f.split("=")).filter((f) => !b.includes(f[1]));
1535
+ return _.length === 0 ? v : `${v}?${_.map((f) => f.join("=")).join("&")}`;
1644
1536
  })(r && r.buttonUrl, s);
1645
- return a("div", { className: O(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(ae, { message: t, properties: { questionHtml: r.questionHtml } }), a(ve, { children: (h = r == null ? void 0 : r.richTextBody, c = r == null ? void 0 : r.body, h ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: h }, id: "ul-card__text-url-body-container" }) : c ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (c ? c.split(/\n\s*\n/g) : []).map((u, m) => a("p", { children: u }, m)) }) : null) }), a(ge, { defaultBody: () => a(_e, { children: a("div", { className: "ul-card-button-group", children: [a("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: p, id: "ul-card-text__button", onClick: d, onKeyPress: l, rel: "noreferrer", role: p ? "link" : "button", tabIndex: 0, target: "_blank", children: Ce(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (u) => d(0, !0), children: Lt(r) })] }) }), properties: r })] }, o);
1537
+ return l("div", { className: L(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [l(ne, { message: t, properties: { questionHtml: r.questionHtml } }), l(ue, { children: (h = r == null ? void 0 : r.richTextBody, c = r == null ? void 0 : r.body, h ? l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: h }, id: "ul-card__text-url-body-container" }) : c ? l("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (c ? c.split(/\n\s*\n/g) : []).map((p, m) => l("p", { children: p }, m)) }) : null) }), l(ce, { defaultBody: () => l(ge, { children: l("div", { className: "ul-card-button-group", children: [l("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: u, id: "ul-card-text__button", onClick: d, onKeyPress: a, rel: "noreferrer", role: u ? "link" : "button", tabIndex: 0, target: "_blank", children: ye(r) }), r.required === !1 && l("button", { className: "ul-card-skip__button", onClick: (p) => d(0, !0), children: Tt(r) })] }) }), properties: r })] }, o);
1646
1538
  var h, c;
1647
- }, Ci = ({ className: e, questionId: t }) => {
1648
- const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = q((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
1649
- K(() => {
1539
+ }, pi = ({ className: e, questionId: t }) => {
1540
+ const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = U((a) => ({ border: a.border, destroy: a.destroy, endCard: a.endCard, forceBrandedLogo: a.forceBrandedLogo }));
1541
+ F(() => {
1650
1542
  setTimeout(() => {
1651
- r(Se);
1543
+ r(ke);
1652
1544
  }, i ? 4e3 : 2e3);
1653
1545
  }, [r, i]);
1654
- const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
1655
- return a("div", { className: O(e, "ul-card--thanks", "fade-in-transition"), children: a("div", { children: a("div", { className: "ul-card--thanks-content", children: [a("div", { className: "ul-thanks-check", children: a("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { clipRule: "evenodd", d: "M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z", fill: n, fillRule: "evenodd" }), a("path", { clipRule: "evenodd", d: "M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z", fill: n, fillRule: "evenodd" }), a("path", { d: "M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z", fill: "black", fillOpacity: "0.2" })] }) }), a(ae, { message: d }), s] }) }) }, t);
1656
- }, ke = "https://cdn.sprig.com", N = { document: void 0, videojs: void 0 }, Ut = (e) => e + "-loading-spiner", J = "hidden", yn = ".m3u8", lt = "questionId", dt = "ul-video-recorder-camera-off-button", ct = "ul-recording-in-session", Ei = [{ type: "link", content: `${ke}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${ke}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${ke}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${ke}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${ke}/userleap-web-upchunk-v2.2.2.js` }], Br = [{ type: "link", content: `${ke}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${ke}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1546
+ const s = o && o.subheader ? l("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
1547
+ return l("div", { className: L(e, "ul-card--thanks", "fade-in-transition"), children: l("div", { children: l("div", { className: "ul-card--thanks-content", children: [l("div", { className: "ul-thanks-check", children: l("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [l("path", { clipRule: "evenodd", d: "M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z", fill: n, fillRule: "evenodd" }), l("path", { clipRule: "evenodd", d: "M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z", fill: n, fillRule: "evenodd" }), l("path", { d: "M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z", fill: "black", fillOpacity: "0.2" })] }) }), l(ne, { message: d }), s] }) }) }, t);
1548
+ }, _e = "https://cdn.sprig.com", R = { document: void 0, videojs: void 0 }, Rt = (e) => e + "-loading-spiner", K = "hidden", bn = ".m3u8", rt = "questionId", ot = "ul-video-recorder-camera-off-button", it = "ul-recording-in-session", hi = [{ type: "link", content: `${_e}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${_e}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${_e}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${_e}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${_e}/userleap-web-upchunk-v2.2.2.js` }], Hr = [{ type: "link", content: `${_e}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${_e}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1657
1549
  .video-js .vjs-control {
1658
1550
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
1659
1551
  }
@@ -2310,67 +2202,63 @@ span.ul-button-text {
2310
2202
  .vjs-poster {
2311
2203
  background-size: cover;
2312
2204
  }
2313
- ` }], qr = "-video-player", xn = "-secondary-video-player", kn = "-video-recorder";
2314
- let le, wn;
2315
- const fe = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2316
- const s = N.document.documentElement;
2317
- if (!r || !o)
2318
- return;
2205
+ ` }], Ar = "-video-player", yn = "-secondary-video-player", xn = "-video-recorder";
2206
+ let oe, kn;
2207
+ const me = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2208
+ const s = R.document.documentElement;
2209
+ if (!r || !o) return;
2319
2210
  const d = { event: `SDK - ${e}`, visitorId: r, environmentId: o, metadata: { ...i || {}, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language } };
2320
2211
  (await fetch(`${t}/sdk/1/visitors/${r}/analytics`, { method: "POST", cache: "no-cache", headers: n, body: JSON.stringify(d) })).ok || console.warn("[Sprig] (ERR-444) Failed to track analytics", e);
2321
- }, ue = async (e, t, n, r, o, i) => {
2322
- fe({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2323
- const s = N.document.documentElement, d = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language }, l = { action: t, err: { message: e.message, stack: e.stack }, meta: d, vid: o, envId: i };
2324
- (await fetch(`${n}/sdk/1/errors`, { method: "POST", cache: "no-cache", headers: { ...r, "userleap-platform": "video_recorder", "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(l) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
2325
- }, Vr = (e, t) => {
2326
- if (e.length === 0)
2327
- return t && t();
2328
- Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, l) {
2329
- let p;
2330
- i === "script" ? (p = N.document.createElement("script"), p.src = s) : i === "link" ? (p = N.document.createElement("link"), p.rel = "stylesheet", p.href = s, p.type = "text/css") : (p = N.document.createElement("style"), p.innerHTML = s), p.onload = function() {
2212
+ }, se = async (e, t, n, r, o, i) => {
2213
+ me({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2214
+ const s = R.document.documentElement, d = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language }, a = { action: t, err: { message: e.message, stack: e.stack }, meta: d, vid: o, envId: i };
2215
+ (await fetch(`${n}/sdk/1/errors`, { method: "POST", cache: "no-cache", headers: { ...r, "userleap-platform": "video_recorder", "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(a) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
2216
+ }, Br = (e, t) => {
2217
+ if (e.length === 0) return t && t();
2218
+ Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, a) {
2219
+ let u;
2220
+ i === "script" ? (u = R.document.createElement("script"), u.src = s) : i === "link" ? (u = R.document.createElement("link"), u.rel = "stylesheet", u.href = s, u.type = "text/css") : (u = R.document.createElement("style"), u.innerHTML = s), u.onload = function() {
2331
2221
  d(s);
2332
- }, p.onerror = function() {
2333
- l(s);
2334
- }, p.async = !1, p.id = btoa(s), o.appendChild(p);
2335
- }))(N.document.head, r)), n), [])).then(() => {
2336
- N.videojs = N.document.defaultView.videojs, t && t();
2222
+ }, u.onerror = function() {
2223
+ a(s);
2224
+ }, u.async = !1, u.id = btoa(s), o.appendChild(u);
2225
+ }))(R.document.head, r)), n), [])).then(() => {
2226
+ R.videojs = R.document.defaultView.videojs, t && t();
2337
2227
  }).catch(function(n) {
2338
2228
  console.log(n + " failed to load");
2339
2229
  });
2340
- }, Cn = (e, t, n) => {
2341
- if (t === "start" && (e.style.visibility = "visible"), t === "none")
2342
- e.style.visibility = J;
2343
- else if (t === "success")
2344
- e.style.visibility = J, e.innerHTML = "Upload succeeded!";
2230
+ }, wn = (e, t, n) => {
2231
+ if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility = K;
2232
+ else if (t === "success") e.style.visibility = K, e.innerHTML = "Upload succeeded!";
2345
2233
  else {
2346
2234
  const r = Math.round(parseFloat(n));
2347
2235
  e.innerHTML = `Uploading <span class="ul-upload-progress-label__time">${r}%</span>`, e.style.background = `linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`;
2348
2236
  }
2349
- }, ut = (e, t) => {
2350
- const n = N.videojs(e.id());
2237
+ }, st = (e, t) => {
2238
+ const n = R.videojs(e.id());
2351
2239
  return n == null ? void 0 : n.payload[t];
2352
- }, zr = (e, t) => {
2353
- const n = new (N.videojs.getComponent("Component"))(e);
2240
+ }, qr = (e, t) => {
2241
+ const n = new (R.videojs.getComponent("Component"))(e);
2354
2242
  return n.addClass("ul-buttons-panel"), t.map((r) => {
2355
2243
  n.addChild(r);
2356
- }), Si(n), n;
2357
- }, Si = (e) => {
2244
+ }), mi(n), n;
2245
+ }, mi = (e) => {
2358
2246
  e.children().forEach((t) => {
2359
- if (ie[t.name_]) {
2360
- const n = $e(ie[t.name_], `ul-${ie[t.name_]}`);
2247
+ if (ee[t.name_]) {
2248
+ const n = Ae(ee[t.name_], `ul-${ee[t.name_]}`);
2361
2249
  t.el_.appendChild(n);
2362
2250
  }
2363
2251
  });
2364
- }, $e = (e, t = "") => {
2365
- const n = N.document.createElement("span");
2252
+ }, Ae = (e, t = "") => {
2253
+ const n = R.document.createElement("span");
2366
2254
  return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
2367
- }, $r = (e, t, n, r, o = !1, i) => {
2255
+ }, Vr = (e, t, n, r, o = !1, i) => {
2368
2256
  e.addClass("ul-video-player");
2369
- const s = new (N.videojs.getComponent("Component"))(e);
2370
- s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (N.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
2371
- const d = n && n.src ? Pi(n.src) : null;
2372
- !n || !o && d ? (e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), N.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
2373
- o || !n || d || Ii(e), i == null || i.play();
2257
+ const s = new (R.videojs.getComponent("Component"))(e);
2258
+ s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (R.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
2259
+ const d = n && n.src ? _i(n.src) : null;
2260
+ !n || !o && d ? (e.audioPlayerPlaceholder.hide(), R.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), R.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
2261
+ o || !n || d || vi(e), i == null || i.play();
2374
2262
  }), e.on("pause", () => {
2375
2263
  i == null || i.pause();
2376
2264
  }), e.on("seeked", () => {
@@ -2378,393 +2266,379 @@ const fe = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
2378
2266
  }), e.on("ratechange", () => {
2379
2267
  i == null || i.playbackRate(e.playbackRate());
2380
2268
  }), e.addChild(e.audioPlayerPlaceholder, {}, 1), s.addChild(t), e.addChild(s), r && r(e);
2381
- }, ji = (e, t, n, r, o, i, s, d = !1) => {
2382
- wn = Date.now();
2383
- const l = Je(t, { controls: !1, bigPlayButton: !1, fluid: !1, width: 1280, height: 720, playsinline: !0, plugins: { record: { audio: !0, video: { mandatory: { minWidth: 1280, minHeight: 720 } }, frameWidth: 1280, frameHeight: 720, maxLength: 600, autoMuteDevice: !0 } } });
2384
- if (!l)
2385
- return;
2386
- l.payload = n;
2387
- const { surveyId: p, questionId: h, responseGroupUid: c, visitorId: u, envId: m } = n;
2269
+ }, gi = (e, t, n, r, o, i, s, d = !1) => {
2270
+ kn = Date.now();
2271
+ const a = We(t, { controls: !1, bigPlayButton: !1, fluid: !1, width: 1280, height: 720, playsinline: !0, plugins: { record: { audio: !0, video: { mandatory: { minWidth: 1280, minHeight: 720 } }, frameWidth: 1280, frameHeight: 720, maxLength: 600, autoMuteDevice: !0 } } });
2272
+ if (!a) return;
2273
+ a.payload = n;
2274
+ const { surveyId: u, questionId: h, responseGroupUid: c, visitorId: p, envId: m } = n;
2388
2275
  let g;
2389
- const f = (b) => {
2390
- const y = dt, S = dt + "-audio-only";
2391
- Cn(l.uploadProgressLabel, "none"), le && le.startTime >= wn && le.abort();
2392
- const L = N.document.getElementById("ul-camera-button");
2393
- b ? (l.children()[0].classList.add("vjs-hidden"), T.removeClass(y), T.addClass(S), L.innerHTML = ie.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), g == null || g.getTracks().forEach((C) => {
2276
+ const b = (E) => {
2277
+ const k = ot, I = ot + "-audio-only";
2278
+ wn(a.uploadProgressLabel, "none"), oe && oe.startTime >= kn && oe.abort();
2279
+ const N = R.document.getElementById("ul-camera-button");
2280
+ E ? (a.children()[0].classList.add("vjs-hidden"), T.removeClass(k), T.addClass(I), N.innerHTML = ee.TurnOnCamera, a.audioPlayerPlaceholder.removeClass("vjs-hidden"), g == null || g.getTracks().forEach((C) => {
2394
2281
  C.stop();
2395
2282
  }), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((C) => {
2396
- g = C, C.getVideoTracks().forEach((M) => {
2397
- M.enabled = !1;
2398
- }), l.record().onDeviceReady(C);
2399
- }).catch(l.record().onDeviceError.bind(l.record()))) : (g == null || g.getVideoTracks().forEach((C) => {
2283
+ g = C, C.getVideoTracks().forEach((H) => {
2284
+ H.enabled = !1;
2285
+ }), a.record().onDeviceReady(C);
2286
+ }).catch(a.record().onDeviceError.bind(a.record()))) : (g == null || g.getVideoTracks().forEach((C) => {
2400
2287
  C.enabled = !0;
2401
- }), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), T.removeClass(S), T.addClass(y), L.innerHTML = ie.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
2402
- }, v = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
2403
- v.hasClass(J) || (fe({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: u, envId: m, metadata: { questionId: h, responseGroupUid: c, surveyId: p } }), f(l.cameraOff), o(U.DELETE, {}), T.removeClass(J), v.addClass(J));
2288
+ }), a.children()[0].classList.remove("vjs-hidden"), a.record().getDevice(), T.removeClass(I), T.addClass(k), N.innerHTML = ee.TurnOffCamera, a.audioPlayerPlaceholder.addClass("vjs-hidden"));
2289
+ }, v = new (R.videojs.getComponent("Button"))(a, { clickHandler: () => {
2290
+ v.hasClass(K) || (me({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: p, envId: m, metadata: { questionId: h, responseGroupUid: c, surveyId: u } }), b(a.cameraOff), o(M.DELETE, {}), T.removeClass(K), v.addClass(K));
2404
2291
  } });
2405
- v.addClass("ul-video-recorder-delete-button"), v.el_.appendChild($e(ie.DeleteButton, "ul-delete-button"));
2406
- const k = N.document.getElementById(t), _ = () => {
2407
- k.classList.contains("vjs-fullscreen") && l.cameraOff ? k.style.display = "table" : k.style.display = "flex";
2292
+ v.addClass("ul-video-recorder-delete-button"), v.el_.appendChild(Ae(ee.DeleteButton, "ul-delete-button"));
2293
+ const _ = R.document.getElementById(t), f = () => {
2294
+ _.classList.contains("vjs-fullscreen") && a.cameraOff ? _.style.display = "table" : _.style.display = "flex";
2408
2295
  };
2409
- _();
2410
- const T = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
2411
- l.record().isRecording() || (l.cameraOff = !l.cameraOff, fe({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: h, responseGroupUid: c, surveyId: p, cameraOff: l.cameraOff } }), f(l.cameraOff), !v.hasClass(J) && v.addClass(J), o(U.DELETE, {}), _());
2296
+ f();
2297
+ const T = new (R.videojs.getComponent("Button"))(a, { clickHandler: () => {
2298
+ a.record().isRecording() || (a.cameraOff = !a.cameraOff, me({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: h, responseGroupUid: c, surveyId: u, cameraOff: a.cameraOff } }), b(a.cameraOff), !v.hasClass(K) && v.addClass(K), o(M.DELETE, {}), f());
2412
2299
  } });
2413
- T.addClass(dt), T.el_.appendChild($e(ie.TurnOffCamera, "ul-camera-button"));
2414
- const j = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
2415
- const b = N.document.getElementById("ul-recorder-toggle");
2416
- if (l.record().isRecording())
2417
- l.record().stop(), b && (b.innerHTML = ie.RecordButton), j.removeClass(ct), v.removeClass(J);
2300
+ T.addClass(ot), T.el_.appendChild(Ae(ee.TurnOffCamera, "ul-camera-button"));
2301
+ const S = new (R.videojs.getComponent("Button"))(a, { clickHandler: () => {
2302
+ const E = R.document.getElementById("ul-recorder-toggle");
2303
+ if (a.record().isRecording()) a.record().stop(), E && (E.innerHTML = ee.RecordButton), S.removeClass(it), v.removeClass(K);
2418
2304
  else {
2419
- const y = N.document.getElementById("ul-recording-countdown-screen");
2420
- if (y)
2421
- y.remove(), b && (b.innerHTML = ie.RecordButton), f(l.cameraOff), o(U.DELETE, {}), T.removeClass(J), v.addClass(J), j.removeClass(ct), I.show();
2305
+ const k = R.document.getElementById("ul-recording-countdown-screen");
2306
+ if (k) k.remove(), E && (E.innerHTML = ee.RecordButton), b(a.cameraOff), o(M.DELETE, {}), T.removeClass(K), v.addClass(K), S.removeClass(it), j.show();
2422
2307
  else {
2423
- j.addClass(ct), I.hide(), T.addClass(J), v.addClass(J), b && (b.innerHTML = ie.StopButton);
2424
- const S = N.document.createElement("div");
2425
- S.id = "ul-recording-countdown-screen", k.insertBefore(S, k.children[1]), S.style.height = `${k.offsetHeight}px`, Fr(l, 3);
2308
+ S.addClass(it), j.hide(), T.addClass(K), v.addClass(K), E && (E.innerHTML = ee.StopButton);
2309
+ const I = R.document.createElement("div");
2310
+ I.id = "ul-recording-countdown-screen", _.insertBefore(I, _.children[1]), I.style.height = `${_.offsetHeight}px`, zr(a, 3);
2426
2311
  }
2427
2312
  }
2428
2313
  } });
2429
- j.addClass("ul-video-recorder-toggle-button"), j.el_.appendChild($e(ie.RecordButton, "ul-recorder-toggle"));
2430
- const E = N.document.createElement("p");
2431
- E.style.visibility = "hidden", E.className = "ul-upload-progress-label", e.appendChild(E), l.uploadProgressLabel = E;
2432
- const w = zr(l, [v, T, "PlayToggle", j, "FullscreenToggle"]), I = w.children().find((b) => b.name_ === "FullscreenToggle");
2433
- I.hasClass("vjs-disabled") && I.hide();
2434
- const D = w.children().find((b) => b.name_ === "PlayToggle");
2435
- D.hide(), v.addClass(J), $r(l, w, i, !1, d), l.on("stopRecord", () => {
2436
- j.hide(), D.show(), I.show(), v.removeClass(J);
2437
- }), l.on("deviceReady", () => {
2438
- j.show(), D.hide(), v.addClass(J);
2439
- }), ((b, y, S, L, C) => {
2440
- const { surveyId: M, responseGroupUid: A, visitorId: H, envId: B } = b.payload;
2441
- b.on("deviceError", function() {
2442
- console.warn("device error: ", b.deviceErrorCode), b.deviceErrorCode.message === "Permission denied" ? (b.deviceButton.addClass("permission-denied"), S && S(U.ERROR, { type: U.PERMISSION_DENIED }), fe({ event: "Video Permission Denied", apiBase: y, headers: C, visitorId: H, envId: B, metadata: { questionId: ut(b, lt), responseGroupUid: A, surveyId: M } })) : (S && S(U.ERROR, { type: U.OTHER }), ue(new Error(b.deviceErrorCode.message), "recorderDeviceError", y, C, H, B));
2443
- }), b.on("error", function(R, $) {
2444
- ue($ || b.error(), "recorderError", y, C, H, B);
2445
- }), b.on("startRecord", function(R, $) {
2446
- L(b.uploadProgressLabel, "none"), fe({ event: "Video Record Start", apiBase: y, headers: C, visitorId: H, envId: B, metadata: { questionId: ut(b, lt), responseGroupUid: A, surveyId: M } });
2447
- }), b.on("finishRecord", async function() {
2448
- L(b.uploadProgressLabel, "start", 0);
2449
- const R = ut(b, lt);
2450
- if (!M) {
2451
- const Q = "internal error: missing fields in payload";
2452
- return S && S(U.ERROR, { type: U.OTHER }), ue(new Error(Q), "finishRecord", y, C, H, B), null;
2314
+ S.addClass("ul-video-recorder-toggle-button"), S.el_.appendChild(Ae(ee.RecordButton, "ul-recorder-toggle"));
2315
+ const w = R.document.createElement("p");
2316
+ w.style.visibility = "hidden", w.className = "ul-upload-progress-label", e.appendChild(w), a.uploadProgressLabel = w;
2317
+ const x = qr(a, [v, T, "PlayToggle", S, "FullscreenToggle"]), j = x.children().find((E) => E.name_ === "FullscreenToggle");
2318
+ j.hasClass("vjs-disabled") && j.hide();
2319
+ const D = x.children().find((E) => E.name_ === "PlayToggle");
2320
+ D.hide(), v.addClass(K), Vr(a, x, i, !1, d), a.on("stopRecord", () => {
2321
+ S.hide(), D.show(), j.show(), v.removeClass(K);
2322
+ }), a.on("deviceReady", () => {
2323
+ S.show(), D.hide(), v.addClass(K);
2324
+ }), ((E, k, I, N, C) => {
2325
+ const { surveyId: H, responseGroupUid: O, visitorId: B, envId: A } = E.payload;
2326
+ E.on("deviceError", function() {
2327
+ console.warn("device error: ", E.deviceErrorCode), E.deviceErrorCode.message === "Permission denied" ? (E.deviceButton.addClass("permission-denied"), I && I(M.ERROR, { type: M.PERMISSION_DENIED }), me({ event: "Video Permission Denied", apiBase: k, headers: C, visitorId: B, envId: A, metadata: { questionId: st(E, rt), responseGroupUid: O, surveyId: H } })) : (I && I(M.ERROR, { type: M.OTHER }), se(new Error(E.deviceErrorCode.message), "recorderDeviceError", k, C, B, A));
2328
+ }), E.on("error", function(G, $) {
2329
+ se($ || E.error(), "recorderError", k, C, B, A);
2330
+ }), E.on("startRecord", function(G, $) {
2331
+ N(E.uploadProgressLabel, "none"), me({ event: "Video Record Start", apiBase: k, headers: C, visitorId: B, envId: A, metadata: { questionId: st(E, rt), responseGroupUid: O, surveyId: H } });
2332
+ }), E.on("finishRecord", async function() {
2333
+ N(E.uploadProgressLabel, "start", 0);
2334
+ const G = st(E, rt);
2335
+ if (!H) {
2336
+ const re = "internal error: missing fields in payload";
2337
+ return I && I(M.ERROR, { type: M.OTHER }), se(new Error(re), "finishRecord", k, C, B, A), null;
2453
2338
  }
2454
- b.record().stopDevice();
2455
- const $ = b.cameraOff ? U.MEDIA_TYPE_AUDIO : U.MEDIA_TYPE_VIDEO, Z = mt();
2456
- fe({ event: "Video Record Finish", apiBase: y, headers: C, visitorId: H, envId: B, metadata: { mediaRecordingUid: Z, questionId: R, responseGroupUid: A, surveyId: M, mediaType: $ } });
2457
- const ee = { surveyId: M, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: $, mediaRecordingUid: Z };
2458
- R && (ee.questionId = R), A && (ee.responseGroupUid = A), H && (ee.visitorId = H);
2459
- const V = await (async () => {
2460
- const Q = await fetch(`${y}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(ee) });
2461
- if (Q.ok) {
2462
- const be = await Q.json();
2463
- return S && S(U.UPLOAD_STARTED, { [U.UPLOAD_ID]: be.upload.id, [U.MEDIA_TYPE]: $, [U.MEDIA_RECORDING_UID]: Z }), be.upload.url;
2339
+ E.record().stopDevice();
2340
+ const $ = E.cameraOff ? M.MEDIA_TYPE_AUDIO : M.MEDIA_TYPE_VIDEO, Q = dt();
2341
+ me({ event: "Video Record Finish", apiBase: k, headers: C, visitorId: B, envId: A, metadata: { mediaRecordingUid: Q, questionId: G, responseGroupUid: O, surveyId: H, mediaType: $ } });
2342
+ const pe = { surveyId: H, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: $, mediaRecordingUid: Q };
2343
+ G && (pe.questionId = G), O && (pe.responseGroupUid = O), B && (pe.visitorId = B);
2344
+ const he = await (async () => {
2345
+ const re = await fetch(`${k}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(pe) });
2346
+ if (re.ok) {
2347
+ const Nt = await re.json();
2348
+ return I && I(M.UPLOAD_STARTED, { [M.UPLOAD_ID]: Nt.upload.id, [M.MEDIA_TYPE]: $, [M.MEDIA_RECORDING_UID]: Q }), Nt.upload.url;
2464
2349
  }
2465
- return S && S(U.ERROR, { type: U.OTHER, response: Q }), ue(new Error("failed to get upload response with url"), "finishRecord", y, C, H, B), null;
2350
+ return I && I(M.ERROR, { type: M.OTHER, response: re }), se(new Error("failed to get upload response with url"), "finishRecord", k, C, B, A), null;
2466
2351
  })();
2467
- V && (le = N.document.defaultView.UpChunk.createUpload({ endpoint: V, file: new N.document.defaultView.File([b.recordedData], `recording ${$} ${Date.now()}`), chunkSize: 5120 }), le.startTime = Date.now(), fe({ event: "Video Upload Start", apiBase: y, headers: C, visitorId: H, envId: B, metadata: { mediaRecordingUid: Z, questionId: R, responseGroupUid: A, surveyId: M, mediaType: $, url: V } }), le.on("error", (Q) => {
2468
- L(b.uploadProgressLabel, "none"), S && S(U.UPLOAD_FINISHED, { [U.MEDIA_RECORDING_UID]: Z }), ue(Q, "finishRecord", y, C, H, B);
2469
- }), le.on("progress", (Q) => {
2470
- S && S(U.UPLOAD_PROGRESS, { [U.MEDIA_RECORDING_UID]: Z, [U.UPLOAD_PROGRESS_PCT]: Q.detail }), L(b.uploadProgressLabel, "progress", Q.detail);
2471
- }), le.on("success", () => {
2472
- L(b.uploadProgressLabel, "success"), S && S(U.UPLOAD_FINISHED, { [U.MEDIA_RECORDING_UID]: Z }), fe({ event: "Video Upload Success", apiBase: y, headers: C, visitorId: H, envId: B, metadata: { mediaRecordingUid: Z, questionId: R, responseGroupUid: A, surveyId: M, mediaType: $, url: V, elapsedMs: le.startTime && Date.now() - le.startTime } });
2352
+ he && (oe = R.document.defaultView.UpChunk.createUpload({ endpoint: he, file: new R.document.defaultView.File([E.recordedData], `recording ${$} ${Date.now()}`), chunkSize: 5120 }), oe.startTime = Date.now(), me({ event: "Video Upload Start", apiBase: k, headers: C, visitorId: B, envId: A, metadata: { mediaRecordingUid: Q, questionId: G, responseGroupUid: O, surveyId: H, mediaType: $, url: he } }), oe.on("error", (re) => {
2353
+ N(E.uploadProgressLabel, "none"), I && I(M.UPLOAD_FINISHED, { [M.MEDIA_RECORDING_UID]: Q }), se(re, "finishRecord", k, C, B, A);
2354
+ }), oe.on("progress", (re) => {
2355
+ I && I(M.UPLOAD_PROGRESS, { [M.MEDIA_RECORDING_UID]: Q, [M.UPLOAD_PROGRESS_PCT]: re.detail }), N(E.uploadProgressLabel, "progress", re.detail);
2356
+ }), oe.on("success", () => {
2357
+ N(E.uploadProgressLabel, "success"), I && I(M.UPLOAD_FINISHED, { [M.MEDIA_RECORDING_UID]: Q }), me({ event: "Video Upload Success", apiBase: k, headers: C, visitorId: B, envId: A, metadata: { mediaRecordingUid: Q, questionId: G, responseGroupUid: O, surveyId: H, mediaType: $, url: he, elapsedMs: oe.startTime && Date.now() - oe.startTime } });
2473
2358
  }));
2474
2359
  });
2475
- })(l, r, o, Cn, s);
2476
- const x = [{ name: "microphone" }];
2477
- !l.cameraOff && x.push({ name: "camera" }), Promise.all(x.map((b) => {
2478
- var y;
2479
- return (y = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : y.query(b);
2480
- })).then((b) => {
2481
- b.reduce((y, S) => y & S.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
2482
- }).catch((b) => {
2360
+ })(a, r, o, wn, s);
2361
+ const y = [{ name: "microphone" }];
2362
+ !a.cameraOff && y.push({ name: "camera" }), Promise.all(y.map((E) => {
2363
+ var k;
2364
+ return (k = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : k.query(E);
2365
+ })).then((E) => {
2366
+ E.reduce((k, I) => k & I.state === "granted", !0) && a && (a.deviceButton && a.deviceButton.hide(), a.record().getDevice());
2367
+ }).catch((E) => {
2483
2368
  });
2484
- }, Fr = (e, t = 3) => {
2485
- const n = N.document.getElementById("ul-recording-countdown-screen");
2369
+ }, zr = (e, t = 3) => {
2370
+ const n = R.document.getElementById("ul-recording-countdown-screen");
2486
2371
  n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
2487
- Fr(e, t - 1);
2372
+ zr(e, t - 1);
2488
2373
  }, 1e3));
2489
- }, Wr = (e) => {
2490
- const t = N.document.createElement("div");
2374
+ }, $r = (e) => {
2375
+ const t = R.document.createElement("div");
2491
2376
  return t.className = "ul-video-container", t.appendChild(((n) => {
2492
- const r = N.document.createElement("div");
2493
- return r.className = "ul-video-player-loading", r.id = Ut(n), ["first", "second", "third", "fourth"].map((o) => {
2494
- const i = N.document.createElement("div");
2377
+ const r = R.document.createElement("div");
2378
+ return r.className = "ul-video-player-loading", r.id = Rt(n), ["first", "second", "third", "fourth"].map((o) => {
2379
+ const i = R.document.createElement("div");
2495
2380
  i.className = o, r.appendChild(i);
2496
2381
  }), r;
2497
2382
  })(e)), t;
2498
- }, wt = (e, t) => {
2499
- const n = N.document.createElement("video");
2383
+ }, _t = (e, t) => {
2384
+ const n = R.document.createElement("video");
2500
2385
  n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
2501
- const r = N.document.createElement("p");
2386
+ const r = R.document.createElement("p");
2502
2387
  r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
2503
- const o = N.document.createElement("a");
2388
+ const o = R.document.createElement("a");
2504
2389
  return o.href = "https://videojs.com/html5-video-support/", o.target = "_blank", o.innerHTML = "supports HTML5 video", r.appendChild(o), n.appendChild(r), t.appendChild(n), t;
2505
- }, Ii = (e, t) => {
2506
- e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
2507
- }, Je = (e, t) => N.document.getElementById(e) ? t ? N.videojs(e, t) : N.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), Ti = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
2508
- N.document = i;
2509
- const l = e + qr, p = Wr(l);
2510
- return N.document.addEventListener("securitypolicyviolation", (h) => {
2511
- ue(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2512
- }), Vr(Br, () => {
2513
- N.document.getElementById(Ut(l)).remove(), wt(l, p);
2390
+ }, vi = (e, t) => {
2391
+ e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), R.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
2392
+ }, We = (e, t) => R.document.getElementById(e) ? t ? R.videojs(e, t) : R.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), fi = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
2393
+ R.document = i;
2394
+ const a = e + Ar, u = $r(a);
2395
+ return R.document.addEventListener("securitypolicyviolation", (h) => {
2396
+ se(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2397
+ }), Br(Hr, () => {
2398
+ R.document.getElementById(Rt(a)).remove(), _t(a, u);
2514
2399
  const h = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
2515
2400
  try {
2516
- const c = e + xn;
2517
- wt(c, p);
2518
- const u = Je(l, h), m = Je(c, { muted: !0, ...h });
2519
- if (!u || !m)
2520
- return;
2521
- ((v, k, _) => {
2522
- v.addClass(`ul${xn}`);
2523
- const T = new (N.videojs.getComponent("Component"))(v);
2524
- k && v.src(k), v.addChild(T), _ && _(v);
2525
- })(m, s, d), s || m.addClass(J);
2526
- const g = zr(u, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), f = g.children().find((v) => v.name_ === "FullscreenToggle");
2527
- f.hasClass("vjs-disabled") && f.hide(), $r(u, g, t, n, r, m);
2401
+ const c = e + yn;
2402
+ _t(c, u);
2403
+ const p = We(a, h), m = We(c, { muted: !0, ...h });
2404
+ if (!p || !m) return;
2405
+ ((v, _, f) => {
2406
+ v.addClass(`ul${yn}`);
2407
+ const T = new (R.videojs.getComponent("Component"))(v);
2408
+ _ && v.src(_), v.addChild(T), f && f(v);
2409
+ })(m, s, d), s || m.addClass(K);
2410
+ const g = qr(p, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), b = g.children().find((v) => v.name_ === "FullscreenToggle");
2411
+ b.hasClass("vjs-disabled") && b.hide(), Vr(p, g, t, n, r, m);
2528
2412
  } catch (c) {
2529
- return void ue(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
2413
+ return void se(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
2530
2414
  }
2531
- }), p;
2532
- }, Pi = (e) => {
2533
- if (!e)
2534
- return null;
2415
+ }), u;
2416
+ }, _i = (e) => {
2417
+ if (!e) return null;
2535
2418
  const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
2536
2419
  let n = t ? t[1] : null;
2537
- return n.includes(yn) && (n = n.replace(yn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2538
- }, U = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, ie = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ye = "ul-card-video__player_recorder", En = "ul-video-btn", pt = 0, Sn = 1, Di = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2539
- const { apiURL: s, envId: d, handleUploadUpdate: l, headers: p, responseGroupUid: h, surveyId: c, update: u, viewDocument: m, visitorId: g } = q((y) => ({ apiURL: y.apiURL, envId: y.envId, handleUploadUpdate: y.handleUploadUpdate, headers: y.headers, responseGroupUid: y.responseGroupUid, surveyId: y.surveyId, update: y.update, viewDocument: y.viewDocument, visitorId: y.userId })), [f, v] = W(!1), [k, _] = W(null), [T, j] = W(null), [E, w] = W(pt), I = te(null), D = r && r.videoUrl;
2540
- K(() => {
2541
- const y = I.current, S = new ResizeObserver(() => {
2542
- u();
2420
+ return n.includes(bn) && (n = n.replace(bn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2421
+ }, M = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, ee = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ve = "ul-card-video__player_recorder", Cn = "ul-video-btn", at = 0, En = 1, bi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2422
+ const { apiURL: s, envId: d, handleUploadUpdate: a, headers: u, responseGroupUid: h, surveyId: c, update: p, viewDocument: m, visitorId: g } = U((k) => ({ apiURL: k.apiURL, envId: k.envId, handleUploadUpdate: k.handleUploadUpdate, headers: k.headers, responseGroupUid: k.responseGroupUid, surveyId: k.surveyId, update: k.update, viewDocument: k.viewDocument, visitorId: k.userId })), [b, v] = z(!1), [_, f] = z(null), [T, S] = z(null), [w, x] = z(at), j = J(null), D = r && r.videoUrl;
2423
+ F(() => {
2424
+ const k = j.current, I = new ResizeObserver(() => {
2425
+ p();
2543
2426
  });
2544
- return y && S.observe(y), () => {
2545
- y && S.unobserve(y);
2427
+ return k && I.observe(k), () => {
2428
+ k && I.unobserve(k);
2546
2429
  };
2547
- }, [u]);
2548
- const x = (y, S) => {
2549
- y === U.UPLOAD_STARTED ? (_(S[U.UPLOAD_ID]), j(S[U.MEDIA_RECORDING_UID]), v(!0)) : y === U.DELETE ? (_(null), j(null), v(!1)) : y === U.UPLOAD_PROGRESS ? isNaN(S[U.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: S[U.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: S[U.MEDIA_RECORDING_UID], progressPct: S[U.UPLOAD_PROGRESS_PCT] }) : y === U.UPLOAD_FINISHED && l({ mediaRecordingUid: S[U.MEDIA_RECORDING_UID], isComplete: !0 });
2550
- }, b = (y) => {
2551
- y.preventDefault(), y.stopPropagation(), document.getElementById(ye) && ((S) => {
2552
- const L = S + kn;
2553
- if (N.document.getElementById(L) && N.videojs) {
2430
+ }, [p]);
2431
+ const y = (k, I) => {
2432
+ k === M.UPLOAD_STARTED ? (f(I[M.UPLOAD_ID]), S(I[M.MEDIA_RECORDING_UID]), v(!0)) : k === M.DELETE ? (f(null), S(null), v(!1)) : k === M.UPLOAD_PROGRESS ? isNaN(I[M.UPLOAD_PROGRESS_PCT]) ? a({ mediaRecordingUid: I[M.MEDIA_RECORDING_UID], isComplete: !0 }) : a({ mediaRecordingUid: I[M.MEDIA_RECORDING_UID], progressPct: I[M.UPLOAD_PROGRESS_PCT] }) : k === M.UPLOAD_FINISHED && a({ mediaRecordingUid: I[M.MEDIA_RECORDING_UID], isComplete: !0 });
2433
+ }, E = (k) => {
2434
+ k.preventDefault(), k.stopPropagation(), document.getElementById(ve) && ((I) => {
2435
+ const N = I + xn;
2436
+ if (R.document.getElementById(N) && R.videojs) {
2554
2437
  try {
2555
- if (!N.videojs(L).record().stream)
2556
- return;
2438
+ if (!R.videojs(N).record().stream) return;
2557
2439
  } catch {
2558
2440
  return;
2559
2441
  }
2560
- N.videojs(L).record().stop(), N.videojs(L).record().stopDevice();
2442
+ R.videojs(N).record().stop(), R.videojs(N).record().stopDevice();
2561
2443
  }
2562
- })(ye), k && T ? (l({ mediaRecordingUid: T, isSubmitted: !0 }), n({ value: { mediaRecordingUid: T }, questionId: o, type: i })) : n({ value: null, questionId: o, type: i });
2444
+ })(ve), _ && T ? (a({ mediaRecordingUid: T, isSubmitted: !0 }), n({ value: { mediaRecordingUid: T }, questionId: o, type: i })) : n({ value: null, questionId: o, type: i });
2563
2445
  };
2564
- return a("form", { className: O(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(ae, { message: t, properties: r }), a(ve, { children: [a("div", { id: "ul-question-player-container", ref: I, style: { display: E === pt ? "" : "none" }, children: [a("div", { id: ye, ref: (y) => {
2565
- if (y && y.children.length === 0 && !r.hideRecordedPrompt) {
2566
- const S = Ti(ye, { src: D, type: "application/x-mpegURL" }, void 0, r.mediaType === U.MEDIA_TYPE_AUDIO, s, m);
2567
- y.appendChild(S);
2446
+ return l("form", { className: L(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [l(ne, { message: t, properties: r }), l(ue, { children: [l("div", { id: "ul-question-player-container", ref: j, style: { display: w === at ? "" : "none" }, children: [l("div", { id: ve, ref: (k) => {
2447
+ if (k && k.children.length === 0 && !r.hideRecordedPrompt) {
2448
+ const I = fi(ve, { src: D, type: "application/x-mpegURL" }, void 0, r.mediaType === M.MEDIA_TYPE_AUDIO, s, m);
2449
+ k.appendChild(I);
2568
2450
  }
2569
- } }), a(ge, { defaultBody: () => a("button", { className: `${En} ul-record-response-btn`, onClick: (y) => {
2570
- y.preventDefault(), y.stopPropagation(), document.getElementById(ye) && ((S) => {
2571
- const L = Je(S + qr);
2572
- L == null || L.pause();
2573
- })(ye), w(Sn);
2574
- } }), properties: r })] }), a("div", { style: { display: E === Sn ? "block" : "none" }, children: [a("button", { className: `${En} ul-back-question-btn`, onClick: (y) => {
2575
- y.preventDefault(), y.stopPropagation(), w(pt);
2576
- }, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (y) => {
2577
- if (y && y.children.length === 0) {
2578
- const S = ((L, C = {}, M = "https://api.userleap.com", A, H, B, R = !1, $ = document) => {
2579
- N.document = $;
2580
- const Z = L + kn, ee = Wr(Z);
2581
- return N.document.addEventListener("securitypolicyviolation", (V) => {
2582
- ue(new Error(`Voice & Video feature violates ${V.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", M, B, C.visitorId, C.envId);
2583
- }), Vr(Br.concat(Ei), () => {
2584
- wt(Z, ee), N.document.getElementById(Ut(Z)).remove();
2451
+ } }), l(ce, { defaultBody: () => l("button", { className: `${Cn} ul-record-response-btn`, onClick: (k) => {
2452
+ k.preventDefault(), k.stopPropagation(), document.getElementById(ve) && ((I) => {
2453
+ const N = We(I + Ar);
2454
+ N == null || N.pause();
2455
+ })(ve), x(En);
2456
+ } }), properties: r })] }), l("div", { style: { display: w === En ? "block" : "none" }, children: [l("button", { className: `${Cn} ul-back-question-btn`, onClick: (k) => {
2457
+ k.preventDefault(), k.stopPropagation(), x(at);
2458
+ }, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), l("div", { id: "ul-recorder-player-container", ref: (k) => {
2459
+ if (k && k.children.length === 0) {
2460
+ const I = ((N, C = {}, H = "https://api.userleap.com", O, B, A, G = !1, $ = document) => {
2461
+ R.document = $;
2462
+ const Q = N + xn, pe = $r(Q);
2463
+ return R.document.addEventListener("securitypolicyviolation", (he) => {
2464
+ se(new Error(`Voice & Video feature violates ${he.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", H, A, C.visitorId, C.envId);
2465
+ }), Br(Hr.concat(hi), () => {
2466
+ _t(Q, pe), R.document.getElementById(Rt(Q)).remove();
2585
2467
  try {
2586
- ji(ee, Z, C, M, A, H, B, R);
2587
- } catch (V) {
2588
- return void ue(new Error(`Error when creating video recorder player object ${V}`), "recorderDeviceError", M, B, C.visitorId, C.envId);
2468
+ gi(pe, Q, C, H, O, B, A, G);
2469
+ } catch (he) {
2470
+ return void se(new Error(`Error when creating video recorder player object ${he}`), "recorderDeviceError", H, A, C.visitorId, C.envId);
2589
2471
  }
2590
- }), ee;
2591
- })(ye, { surveyId: c, responseGroupUid: h, questionId: o, visitorId: g, envId: d }, s, x, void 0, { ...p, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === U.MEDIA_TYPE_AUDIO, m);
2592
- y.appendChild(S);
2472
+ }), pe;
2473
+ })(ve, { surveyId: c, responseGroupUid: h, questionId: o, visitorId: g, envId: d }, s, y, void 0, { ...u, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === M.MEDIA_TYPE_AUDIO, m);
2474
+ k.appendChild(I);
2593
2475
  }
2594
- } })] })] }), a(_e, { children: [a(X, { disabled: !f, onClick: b, children: Ce(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: b, style: { display: r.required ? "none" : "block", ...f ? { display: "none" } : {} }, children: Lt(r) })] })] });
2595
- }, Ri = ({ className: e }) => {
2596
- const { uploadProgress: t } = q((i) => ({ uploadProgress: i.uploadProgress }));
2476
+ } })] })] }), l(ge, { children: [l(Y, { disabled: !b, onClick: E, children: ye(r) }), l("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: E, style: { display: r.required ? "none" : "block", ...b ? { display: "none" } : {} }, children: Tt(r) })] })] });
2477
+ }, yi = ({ className: e }) => {
2478
+ const { uploadProgress: t } = U((i) => ({ uploadProgress: i.uploadProgress }));
2597
2479
  let n, r;
2598
2480
  Object.values(t).filter((i) => i.isSubmitted).length > 1 ? (n = "Your responses are processing", r = "Please keep this tab open until your responses are fully processed.") : (n = "Your response is processing", r = "Please keep this tab open until your response is fully processed.");
2599
2481
  const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
2600
- return a("div", { className: O(e, "ul-card--uploading", "fade-in-transition"), children: [a("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: a("div", { className: "ul-loading-spinner", children: [a("div", { className: "first" }), a("div", { className: "second" }), a("div", { className: "third" }), a("div", { className: "fourth" })] }) }), a(ae, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
2601
- }, jn = ({ logoOnly: e = !1, style: t = {} }) => a("svg", { alt: (e ? "Powered by " : "") + "Sprig", width: e ? "35" : "112", height: "15", viewBox: e ? "79 0 31 15" : "0 0 112 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", ...t }, children: [!e && a("path", { d: "M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z", fill: "black", fillOpacity: "0.7" }), a("path", { d: "M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z", fill: "black", fillOpacity: "0.7" })] }), Ni = () => {
2602
- const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: p } = q((k) => ({ border: k.border, cards: k.cards, forceBrandedLogo: k.forceBrandedLogo, headers: k.headers, index: k.index, marketingUrl: k.marketingUrl, showSurveyBrand: k.showSurveyBrand, slugName: k.slugName, surveyId: k.surveyId, viewedCardCount: k.viewedCardCount })), h = te(null), c = t.filter((k) => k.type !== "uploading" && k.type !== "thanks"), u = ((k, _) => {
2482
+ return l("div", { className: L(e, "ul-card--uploading", "fade-in-transition"), children: [l("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: l("div", { className: "ul-loading-spinner", children: [l("div", { className: "first" }), l("div", { className: "second" }), l("div", { className: "third" }), l("div", { className: "fourth" })] }) }), l(ne, { message: `${n} (${o}% complete)` }), l("p", { className: "ul-caption", children: r })] });
2483
+ }, Sn = ({ logoOnly: e = !1, style: t = {} }) => l("svg", { alt: (e ? "Powered by " : "") + "Sprig", width: e ? "35" : "112", height: "15", viewBox: e ? "79 0 31 15" : "0 0 112 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", ...t }, children: [!e && l("path", { d: "M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z", fill: "black", fillOpacity: "0.7" }), l("path", { d: "M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z", fill: "black", fillOpacity: "0.7" }), l("path", { d: "M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z", fill: "black", fillOpacity: "0.7" }), l("path", { d: "M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z", fill: "black", fillOpacity: "0.7" }), l("path", { d: "M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z", fill: "black", fillOpacity: "0.7" }), l("path", { d: "M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z", fill: "black", fillOpacity: "0.7" })] }), xi = () => {
2484
+ const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: a, viewedCardCount: u } = U((_) => ({ border: _.border, cards: _.cards, forceBrandedLogo: _.forceBrandedLogo, headers: _.headers, index: _.index, marketingUrl: _.marketingUrl, showSurveyBrand: _.showSurveyBrand, slugName: _.slugName, surveyId: _.surveyId, viewedCardCount: _.viewedCardCount })), h = J(null), c = t.filter((_) => _.type !== "uploading" && _.type !== "thanks"), p = ((_, f) => {
2603
2485
  const T = /* @__PURE__ */ new Set(["thanks", "uploading"]);
2604
- if (_ >= k.length || _ < 0 || T.has(k[_].type))
2605
- return 0;
2606
- const j = k.filter((w) => !T.has(w.type));
2607
- if (_ === j.length - 1)
2608
- return 1;
2609
- const E = { [j.length - 1]: 1, [-1]: 0 };
2610
- for (let w = j.length - 2; w >= _; w--) {
2611
- const I = j[w], D = Fo(w, I.props.routingOptions);
2486
+ if (f >= _.length || f < 0 || T.has(_[f].type)) return 0;
2487
+ const S = _.filter((x) => !T.has(x.type));
2488
+ if (f === S.length - 1) return 1;
2489
+ const w = { [S.length - 1]: 1, [-1]: 0 };
2490
+ for (let x = S.length - 2; x >= f; x--) {
2491
+ const j = S[x], D = Lo(x, j.props.routingOptions);
2612
2492
  if (D.length === 0) {
2613
- E[w] = E[w + 1] + 1;
2493
+ w[x] = w[x + 1] + 1;
2614
2494
  continue;
2615
2495
  }
2616
- let x = 0, b = Vo(I);
2617
- if (b === null)
2618
- return j.length - 1 - _;
2619
- for (let y = 0; y < D.length && b.length !== 0; y++) {
2620
- const { comparator: S, target: L, value: C } = D[y], M = b.filter((A) => {
2621
- const H = qo({ value: A }, I.type, A), B = wr(A, I.type);
2622
- return !(H && S === "answered" || B && S === "partial" || !H && !B && S === "skipped" || S === "given_up" && $o(A) && A.taskStatus === "given.up" || H && I.type === "open" && (S === "contains" || S === "notcontains") || H && zo(S) && Nt[S](A, C));
2496
+ let y = 0, E = Do(j);
2497
+ if (E === null) return S.length - 1 - f;
2498
+ for (let k = 0; k < D.length && E.length !== 0; k++) {
2499
+ const { comparator: I, target: N, value: C } = D[k], H = E.filter((O) => {
2500
+ const B = Po({ value: O }, j.type, O), A = xr(O, j.type);
2501
+ return !(B && I === "answered" || A && I === "partial" || !B && !A && I === "skipped" || I === "given_up" && No(O) && O.taskStatus === "given.up" || B && j.type === "open" && (I === "contains" || I === "notcontains") || B && Ro(I) && It[I](O, C));
2623
2502
  });
2624
- if (M.length < b.length) {
2625
- const A = parseInt(String(L), 10);
2626
- if (A !== -1 && A <= w || A >= j.length)
2627
- return j.length - 1 - _;
2628
- x = Math.max(E[A] + 1, x);
2503
+ if (H.length < E.length) {
2504
+ const O = parseInt(String(N), 10);
2505
+ if (O !== -1 && O <= x || O >= S.length) return S.length - 1 - f;
2506
+ y = Math.max(w[O] + 1, y);
2629
2507
  }
2630
- b = M;
2508
+ E = H;
2631
2509
  }
2632
- b.length > 0 && (x = Math.max(E[w + 1] + 1, x)), E[w] = x;
2510
+ E.length > 0 && (y = Math.max(w[x + 1] + 1, y)), w[x] = y;
2633
2511
  }
2634
- return E[_];
2635
- })(t, o), m = p + 1, g = m / (m + u), f = `${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${d}&utm_content=${l}${n && "&utm_term=poweredby_pill"}`;
2636
- K(() => {
2512
+ return w[f];
2513
+ })(t, o), m = u + 1, g = m / (m + p), b = `${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${d}&utm_content=${a}${n && "&utm_term=poweredby_pill"}`;
2514
+ F(() => {
2637
2515
  h.current && (h.current.style.width = 100 * g + "%");
2638
2516
  }, [g]);
2639
2517
  const v = t[o].type === "thanks";
2640
- return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: v && n ? a("a", { dir: "ltr", href: f, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(jn, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(In, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }) : a(Y, { children: [c.length > 1 && a("div", { id: "ul-progress-bar-container", children: a("div", { id: "ul-progress-bar-current", ref: h, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a("div", { className: n ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: f, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(jn, { logoOnly: !1 }), n && a(In, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }) : null] }) });
2641
- }, In = ({ style: e }) => a("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), Li = () => {
2642
- const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: p, index: h, minScrollableHeight: c, next: u, previewMode: m, productConfig: g, seen: f, showStripes: v, studyType: k, surveyId: _, update: T, useMobileStyling: j, viewDocument: E } = q((C) => ({ answers: C.answers, border: C.border, cards: C.cards, close: C.close, configureExitOnOverlayClick: C.configureExitOnOverlayClick, destroy: C.destroy, endCard: C.endCard, eventEmitFn: C.eventEmitFn, fontFamily: C.fontFamily, headers: C.headers, index: C.index, previewMode: C.previewMode, productConfig: C.productConfig, minScrollableHeight: C.minScrollableHeight, next: C.next, seen: C.seen, showStripes: C.showStripes, studyType: C.studyType, surveyId: C.surveyId, update: C.update, useMobileStyling: C.useMobileStyling, viewDocument: C.viewDocument })), w = te(null), I = te(!1), D = p["userleap-platform"], { props: x, type: b, name: y } = n[h];
2643
- K(() => {
2644
- w.current && (w.current.classList.contains("ul-app--visible") || w.current.classList.add("ul-app--visible"), !I.current && d && (I.current = !0, d(ne.SurveyAppeared, { name: ne.SurveyAppeared, "survey.id": _ })));
2645
- }, [d, _]), K(() => {
2518
+ return l("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: v && n ? l("a", { dir: "ltr", href: b, rel: "noreferrer", target: "_blank", children: l("div", { className: "thank-you-card-link", children: [l("div", { className: "sprig-box-logo", children: l(Sn, { logoOnly: !0, style: { margin: "auto" } }) }), l("div", { children: l("p", { children: ["Capture insights about your own product", l(jn, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }) : l(Z, { children: [c.length > 1 && l("div", { id: "ul-progress-bar-container", children: l("div", { id: "ul-progress-bar-current", ref: h, style: { border: `1px solid ${e || "#000"}` } }) }), s ? l("div", { className: n ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: l("a", { href: b, rel: "noreferrer", target: "_blank", children: l("div", { style: { display: "flex" }, children: [l(Sn, { logoOnly: !1 }), n && l(jn, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }) : null] }) });
2519
+ }, jn = ({ style: e }) => l("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [l("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), l("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), ki = () => {
2520
+ const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: a, headers: u, index: h, minScrollableHeight: c, next: p, previewMode: m, productConfig: g, seen: b, showStripes: v, studyType: _, surveyId: f, update: T, useMobileStyling: S, viewDocument: w } = U((C) => ({ answers: C.answers, border: C.border, cards: C.cards, close: C.close, configureExitOnOverlayClick: C.configureExitOnOverlayClick, destroy: C.destroy, endCard: C.endCard, eventEmitFn: C.eventEmitFn, fontFamily: C.fontFamily, headers: C.headers, index: C.index, previewMode: C.previewMode, productConfig: C.productConfig, minScrollableHeight: C.minScrollableHeight, next: C.next, seen: C.seen, showStripes: C.showStripes, studyType: C.studyType, surveyId: C.surveyId, update: C.update, useMobileStyling: C.useMobileStyling, viewDocument: C.viewDocument })), x = J(null), j = J(!1), D = u["userleap-platform"], { props: y, type: E, name: k } = n[h];
2521
+ F(() => {
2522
+ if (window.Sprig) return window.Sprig.trackHistory = (C) => U.getState().trackHistory(C), () => {
2523
+ window.Sprig.trackHistory = void 0;
2524
+ };
2525
+ }, []), F(() => {
2526
+ x.current && (x.current.classList.contains("ul-app--visible") || x.current.classList.add("ul-app--visible"), !j.current && d && (j.current = !0, d(X.SurveyAppeared, { name: X.SurveyAppeared, "survey.id": f })));
2527
+ }, [d, f]), F(() => {
2646
2528
  const C = () => {
2647
- E.visibilityState === "visible" && (f(), E.removeEventListener("visibilitychange", C));
2529
+ w.visibilityState === "visible" && (b(), w.removeEventListener("visibilitychange", C));
2648
2530
  };
2649
- return E.addEventListener("visibilitychange", C), C(), () => {
2650
- E.removeEventListener("visibilitychange", C);
2531
+ return w.addEventListener("visibilitychange", C), C(), () => {
2532
+ w.removeEventListener("visibilitychange", C);
2651
2533
  };
2652
- }, [f, E]), K(() => {
2534
+ }, [b, w]), F(() => {
2653
2535
  T();
2654
- }, [h, T]), K(() => {
2536
+ }, [h, T]), F(() => {
2655
2537
  o(() => r());
2656
2538
  }, [r, o]);
2657
- const S = async function(C) {
2658
- u({ data: C, completeSurvey: () => {
2659
- i(Se);
2660
- }, endCard: s }), Jr(E);
2539
+ const I = async function(C) {
2540
+ p({ data: C, completeSurvey: () => {
2541
+ i(ke);
2542
+ }, endCard: s }), Yr(w);
2661
2543
  };
2662
2544
  if (e) {
2663
- for (const C of e)
2664
- if (C.questionId === y) {
2665
- let M;
2666
- if (b === "multiplechoice") {
2667
- const A = x.options.find(({ value: H }) => H === C.value);
2668
- if (!A)
2669
- break;
2670
- M = { [A.id]: A.value };
2671
- } else
2672
- M = C.value;
2673
- S({ value: M, type: b, questionId: C.questionId });
2674
- break;
2675
- }
2545
+ for (const C of e) if (C.questionId === k) {
2546
+ let H;
2547
+ if (E === "multiplechoice") {
2548
+ const O = y.options.find(({ value: B }) => B === C.value);
2549
+ if (!O) break;
2550
+ H = { [O.id]: O.value };
2551
+ } else H = C.value;
2552
+ I({ value: H, type: E, questionId: C.questionId });
2553
+ break;
2554
+ }
2676
2555
  }
2677
- const L = !j && ((g == null ? void 0 : g.framePosition) === "center" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" || ((g == null ? void 0 : g.placement) || "").includes("center"));
2678
- return a("div", { className: O("ul-app", We(p) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Se, onClick: (C) => {
2679
- var B;
2680
- const M = window.sprigAPI, A = C.target;
2681
- if (!M || !A)
2682
- return;
2683
- const H = [A, A.parentElement];
2684
- for (const R of H)
2685
- if (((B = R == null ? void 0 : R.tagName) == null ? void 0 : B.toLowerCase()) === "a") {
2686
- C.preventDefault();
2687
- try {
2688
- const $ = new URL(R.href);
2689
- $.protocol !== "http:" && $.protocol !== "https:" || (M == null || M.openUrl($.toString()));
2690
- } catch ($) {
2691
- console.error($);
2692
- }
2693
- return;
2556
+ const N = !S && ((g == null ? void 0 : g.framePosition) === "center" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" || ((g == null ? void 0 : g.placement) || "").includes("center"));
2557
+ return l("div", { className: L("ul-app", qe(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: ke, onClick: (C) => {
2558
+ var A;
2559
+ const H = window.sprigAPI, O = C.target;
2560
+ if (!H || !O) return;
2561
+ const B = [O, O.parentElement];
2562
+ for (const G of B) if (((A = G == null ? void 0 : G.tagName) == null ? void 0 : A.toLowerCase()) === "a") {
2563
+ C.preventDefault();
2564
+ try {
2565
+ const $ = new URL(G.href);
2566
+ $.protocol !== "http:" && $.protocol !== "https:" || (H == null || H.openUrl($.toString()));
2567
+ } catch ($) {
2568
+ console.error($);
2694
2569
  }
2695
- }, ref: w, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...L ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: O(G("ul-card__container", j, k)), style: { ...k !== "feedbackButton" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(g == null ? void 0 : g.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: a("div", { className: "sprig-container", style: { minHeight: c }, children: [v && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), m && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), a("div", { className: O(Ko("ul-card-main-content", D)), children: (() => {
2696
- const C = { className: "ul-card", next: S, questionId: y, type: b };
2697
- switch (b) {
2570
+ return;
2571
+ }
2572
+ }, ref: x, style: { "--theme": t, ...a ? { fontFamily: a.replace(";", "") } : {}, ...N ? { position: "relative" } : {} }, children: l("div", { className: "ul-app__container", children: l("div", { className: L(W("ul-card__container", S, _)), style: { ..._ !== "feedbackButton" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(g == null ? void 0 : g.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: l("div", { className: "sprig-container", style: { minHeight: c }, children: [v && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "For development purposes only" }) }), m && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), l("div", { className: L(Uo("ul-card-main-content", D)), children: (() => {
2573
+ const C = { className: "ul-card", next: I, questionId: k, type: E };
2574
+ switch (E) {
2698
2575
  case "consentlegal":
2699
- return F(ei, { ...C, ...x, key: y });
2576
+ return V(Vo, { ...C, ...y, key: k });
2700
2577
  case "likert":
2701
- return F(ni, { ...C, ...x, key: y });
2578
+ return V($o, { ...C, ...y, key: k });
2702
2579
  case "matrix":
2703
- return F(si, { ...C, ...x, key: y });
2580
+ return V(Go, { ...C, ...y, key: k });
2704
2581
  case "multiplechoice":
2705
- return F(di, { ...C, ...x, key: y });
2582
+ return V(Qo, { ...C, ...y, key: k });
2706
2583
  case "multipleselect":
2707
- return F(ci, { ...C, ...x, key: y });
2584
+ return V(Jo, { ...C, ...y, key: k });
2708
2585
  case "nps":
2709
- return F(ui, { ...C, key: y, props: x });
2586
+ return V(Xo, { ...C, key: k, props: y });
2710
2587
  case "open":
2711
- return F(pi, { ...C, ...x, key: y });
2588
+ return V(ei, { ...C, ...y, key: k });
2712
2589
  case "recordedtask":
2713
- return F(xi, { ...C, ...x, key: y });
2590
+ return V(di, { ...C, ...y, key: k });
2714
2591
  case "texturlprompt":
2715
- return F(wi, { ...C, ...x, key: y });
2592
+ return V(ui, { ...C, ...y, key: k });
2716
2593
  case "thanks":
2717
- return F(Ci, { ...C, ...x, key: y });
2594
+ return V(pi, { ...C, ...y, key: k });
2718
2595
  case "uploading":
2719
- return F(Ri, { ...C, ...x, key: y });
2596
+ return V(yi, { ...C, ...y, key: k });
2720
2597
  case "videovoice":
2721
- return F(Di, { ...C, ...x, key: y });
2598
+ return V(bi, { ...C, ...y, key: k });
2722
2599
  default:
2723
2600
  return null;
2724
2601
  }
2725
- })() }), a(Ni, {})] }) }) }) });
2726
- }, Zr = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", Tn = (e) => {
2727
- const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: Zr() };
2602
+ })() }), l(xi, {})] }) }) }) });
2603
+ }, Fr = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", In = (e) => {
2604
+ const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: Fr() };
2728
2605
  return new MediaRecorder(e, t);
2729
- }, Pn = (e, t, n) => {
2606
+ }, Tn = (e, t, n) => {
2730
2607
  n[t] = [], e.ondataavailable = function(r) {
2731
2608
  n[t].push(r.data);
2732
2609
  }, e.currentMediaRecordingUid = t, e.start();
2733
2610
  };
2734
- function Dn(e, t, n, r, o, i) {
2611
+ function Pn(e, t, n, r, o, i) {
2735
2612
  if (e && e.state !== "inactive") {
2736
2613
  const { "begin.callback": s } = r, d = e.currentMediaRecordingUid;
2737
- if (!d)
2738
- return;
2739
- s && s(d), e.onstop = () => async function(l, p, h, c, u, m, g) {
2740
- const f = q.getState().viewDocument, { "upload.callback": v, "progress.callback": k } = c, _ = { mediaType: h, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: u, ...c["passthrough.data"] }, T = await (async (I, D) => {
2741
- var b;
2742
- const x = await fetch(D, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(I) });
2743
- if (x.ok) {
2744
- const y = await x.json();
2745
- return (b = y == null ? void 0 : y.upload) == null ? void 0 : b.url;
2614
+ if (!d) return;
2615
+ s && s(d), e.onstop = () => async function(a, u, h, c, p, m, g) {
2616
+ const b = U.getState().viewDocument, { "upload.callback": v, "progress.callback": _ } = c, f = { mediaType: h, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: p, ...c["passthrough.data"] }, T = await (async (j, D) => {
2617
+ var E;
2618
+ const y = await fetch(D, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(j) });
2619
+ if (y.ok) {
2620
+ const k = await y.json();
2621
+ return (E = k == null ? void 0 : k.upload) == null ? void 0 : E.url;
2746
2622
  }
2747
2623
  return null;
2748
- })(_, l);
2749
- if (!T)
2750
- return void (v && v(null, { message: "failed to get upload url" }));
2751
- const j = new Blob(g, { type: Zr() });
2752
- if (!f.defaultView)
2753
- return;
2754
- const E = new f.defaultView.File([j], `recording video ${Date.now()}`), w = m.createUpload({ endpoint: T, file: E, chunkSize: 5120 });
2755
- w.on("error", (I) => {
2756
- v && v(null, I);
2757
- }), w.on("progress", (I) => {
2758
- k && k(u, I);
2759
- }), w.on("success", () => {
2760
- v && v(u, !0);
2624
+ })(f, a);
2625
+ if (!T) return void (v && v(null, { message: "failed to get upload url" }));
2626
+ const S = new Blob(g, { type: Fr() });
2627
+ if (!b.defaultView) return;
2628
+ const w = new b.defaultView.File([S], `recording video ${Date.now()}`), x = m.createUpload({ endpoint: T, file: w, chunkSize: 5120 });
2629
+ x.on("error", (j) => {
2630
+ v && v(null, j);
2631
+ }), x.on("progress", (j) => {
2632
+ _ && _(p, j);
2633
+ }), x.on("success", () => {
2634
+ v && v(p, !0);
2761
2635
  });
2762
2636
  }(t, 0, n, r, d, o, i), e.stop();
2763
2637
  }
2764
2638
  }
2765
- const Mi = { state: { chunks: {} }, stopRecording(e) {
2639
+ const wi = { state: { chunks: {} }, stopRecording(e) {
2766
2640
  const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
2767
- this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Dn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Dn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
2641
+ this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Pn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Pn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
2768
2642
  }, handleCancelledStream(e) {
2769
2643
  const t = e.getVideoTracks(), n = e.getAudioTracks();
2770
2644
  let r = t.length && t[0];
@@ -2808,18 +2682,17 @@ const Mi = { state: { chunks: {} }, stopRecording(e) {
2808
2682
  }, beginRecordingCallback(e) {
2809
2683
  const { "recording.media.types": t, "start.recording.callback": n = () => {
2810
2684
  } } = e;
2811
- if (!t)
2812
- return;
2685
+ if (!t) return;
2813
2686
  const r = [];
2814
2687
  if (t.includes("video") && this.state.avStream) {
2815
- this.state.avRecorder = Tn(this.state.avStream);
2816
- const o = mt();
2817
- Pn(this.state.avRecorder, o, this.state.chunks), r.push(o);
2688
+ this.state.avRecorder = In(this.state.avStream);
2689
+ const o = dt();
2690
+ Tn(this.state.avRecorder, o, this.state.chunks), r.push(o);
2818
2691
  }
2819
2692
  if (t.includes("screen") && this.state.captureStream) {
2820
- this.state.screenRecorder = Tn(this.state.captureStream);
2821
- const o = mt();
2822
- Pn(this.state.screenRecorder, o, this.state.chunks), r.push(o);
2693
+ this.state.screenRecorder = In(this.state.captureStream);
2694
+ const o = dt();
2695
+ Tn(this.state.screenRecorder, o, this.state.chunks), r.push(o);
2823
2696
  }
2824
2697
  r && n && n(r);
2825
2698
  }, async finishTaskCallback(e) {
@@ -2832,15 +2705,15 @@ const Mi = { state: { chunks: {} }, stopRecording(e) {
2832
2705
  const { "permission.status.callback": t } = e, n = this.state.avStream;
2833
2706
  t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
2834
2707
  }, lookAheadAndStopStream(e, t, n, r) {
2835
- const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = q.getState(), d = Cr({ cards: n, index: e, hasEndCard: r, allResponses: s });
2836
- d !== null && n[d].type === "recordedtask" || [o, i].map((l) => {
2837
- l && (l.state === "recording" && l.stop(), l.stream.getTracks().map((p) => {
2838
- p.readyState === "live" && p.stop();
2708
+ const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = U.getState(), d = kr({ cards: n, index: e, hasEndCard: r, allResponses: s });
2709
+ d !== null && n[d].type === "recordedtask" || [o, i].map((a) => {
2710
+ a && (a.state === "recording" && a.stop(), a.stream.getTracks().map((u) => {
2711
+ u.readyState === "live" && u.stop();
2839
2712
  }));
2840
2713
  });
2841
- } }, Fe = Object.create(Mi);
2842
- Object.freeze(Fe);
2843
- const Oi = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
2714
+ } }, Be = Object.create(wi);
2715
+ Object.freeze(Be);
2716
+ const Ci = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
2844
2717
  const o = n.documentElement;
2845
2718
  let i;
2846
2719
  try {
@@ -2849,29 +2722,29 @@ const Oi = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl:
2849
2722
  i = t.location.href;
2850
2723
  }
2851
2724
  return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
2852
- }, Ai = { configure: function(e, t = !0) {
2853
- var k;
2854
- const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: p, viewWindow: h } = e, c = We(e.headers) ? e.frame : p.body, u = e.UpChunk || window.UpChunk, m = Be, g = ((_, T) => {
2855
- const j = [..._], E = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
2856
- return _.some((w) => E.has(w.type)) && j.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), T && j.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), j;
2725
+ }, ji = { configure: function(e, t = !0) {
2726
+ var _;
2727
+ const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: a, viewDocument: u, viewWindow: h } = e, c = qe(e.headers) ? e.frame : u.body, p = e.UpChunk || window.UpChunk, m = Me, g = ((f, T) => {
2728
+ const S = [...f], w = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
2729
+ return f.some((x) => w.has(x.type)) && S.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), T && S.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), S;
2857
2730
  })(e.cards, !!o);
2858
- Fe.configure(m, { cards: g, hasEndCard: !!o, apiURL: r, UpChunk: u }), q.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: g, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Oi({ mode: e.mode, viewWindow: h, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Fe, recorderEventEmitter: m, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
2859
- const { head: f } = p;
2860
- if (At({ document: p, elementId: "sprig-style", styleString: 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-direction:column;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}' }), e.customStyles && At({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
2861
- const _ = p.createElement("link");
2862
- _.rel = "stylesheet", _.href = s, f.appendChild(_);
2731
+ Be.configure(m, { cards: g, hasEndCard: !!o, apiURL: r, UpChunk: p }), U.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: g, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Ci({ mode: e.mode, viewWindow: h, viewDocument: u, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: a, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Be, recorderEventEmitter: m, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
2732
+ const { head: b } = u;
2733
+ if (Mt({ document: u, elementId: "sprig-style", styleString: 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-direction:column;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}' }), e.customStyles && Mt({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
2734
+ const f = u.createElement("link");
2735
+ f.rel = "stylesheet", f.href = s, b.appendChild(f);
2863
2736
  }
2864
- if (!u && e.cards.some((_) => _.type === "recordedtask")) {
2865
- const _ = p.createElement("script");
2866
- _.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", _.onload = () => {
2867
- Fe.setUpChunk(h.UpChunk);
2868
- }, _.onerror = () => {
2737
+ if (!p && e.cards.some((f) => f.type === "recordedtask")) {
2738
+ const f = u.createElement("script");
2739
+ f.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", f.onload = () => {
2740
+ Be.setUpChunk(h.UpChunk);
2741
+ }, f.onerror = () => {
2869
2742
  console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
2870
- }, f.appendChild(_);
2743
+ }, b.appendChild(f);
2871
2744
  }
2872
- const v = i || ((k = d.eventEmitter) == null ? void 0 : k.emit);
2873
- v == null || v("verify.view.version", { "view.version": "2.33.1" }), c && t && Ie(a(Li, {}), c);
2745
+ const v = i || ((_ = d.eventEmitter) == null ? void 0 : _.emit);
2746
+ v == null || v("verify.view.version", { "view.version": "2.33.2" }), c && t && Ce(l(ki, {}), c);
2874
2747
  } };
2875
2748
  export {
2876
- Ai as default
2749
+ ji as default
2877
2750
  };