@sprig-technologies/sprig-browser 2.36.1 → 2.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
1
- import { A as Oe, D as Co, a as So, C as tn, i as Eo, E as Io, b as Fe, d as Bt, r as jo, e as nn } from "./core-BVtQnihE.js";
2
- import { e as Ve, h as ot, S as ce, s as jt, D as rn, b as To, t as le, v as Tt, u as Lo } from "./metricsReporter-M_tu1Yrx.js";
3
- var We, M, tr, Le, on, nr, Lt, rr, Qe = {}, or = [], No = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, dt = Array.isArray;
4
- function xe(e, t) {
1
+ import { A as Oe, D as Io, a as jo, C as on, i as To, E as Lo, b as Ve, d as Ft, e as No, r as Do, f as sn } from "./core-5yxtCXox.js";
2
+ import { e as ze, h as st, S as ce, s as Nt, D as an, b as Po, t as le, v as Dt, u as Ro } from "./metricsReporter-B4HDmJo8.js";
3
+ var Ze, R, or, Ne, ln, ir, Pt, sr, We = {}, ar = [], Mo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ut = Array.isArray;
4
+ function ke(e, t) {
5
5
  for (var n in t) e[n] = t[n];
6
6
  return e;
7
7
  }
8
- function ir(e) {
8
+ function lr(e) {
9
9
  var t = e.parentNode;
10
10
  t && t.removeChild(e);
11
11
  }
12
12
  function de(e, t, n) {
13
13
  var r, o, i, s = {};
14
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 ? We.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 ze(e, s, r, o, null);
15
+ if (arguments.length > 2 && (s.children = arguments.length > 3 ? Ze.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 $e(e, s, r, o, null);
17
17
  }
18
- function ze(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 ?? ++tr, __i: -1, __u: 0 };
20
- return o == null && M.vnode != null && M.vnode(i), i;
18
+ function $e(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 ?? ++or, __i: -1, __u: 0 };
20
+ return o == null && R.vnode != null && R.vnode(i), i;
21
21
  }
22
- function sr() {
22
+ function dr() {
23
23
  return { current: null };
24
24
  }
25
- function ee(e) {
25
+ function ne(e) {
26
26
  return e.children;
27
27
  }
28
- function me(e, t) {
28
+ function he(e, t) {
29
29
  this.props = e, this.context = t;
30
30
  }
31
31
  function Ue(e, t) {
@@ -33,47 +33,47 @@ function Ue(e, t) {
33
33
  for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
34
34
  return typeof e.type == "function" ? Ue(e) : null;
35
35
  }
36
- function ar(e) {
36
+ function cr(e) {
37
37
  var t, n;
38
38
  if ((e = e.__) != null && e.__c != null) {
39
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
40
  e.__e = e.__c.base = n.__e;
41
41
  break;
42
42
  }
43
- return ar(e);
43
+ return cr(e);
44
44
  }
45
45
  }
46
- function Nt(e) {
47
- (!e.__d && (e.__d = !0) && Le.push(e) && !it.__r++ || on !== M.debounceRendering) && ((on = M.debounceRendering) || nr)(it);
46
+ function Rt(e) {
47
+ (!e.__d && (e.__d = !0) && Ne.push(e) && !at.__r++ || ln !== R.debounceRendering) && ((ln = R.debounceRendering) || ir)(at);
48
48
  }
49
- function it() {
49
+ function at() {
50
50
  var e, t, n, r, o, i, s, d, l;
51
- for (Le.sort(Lt); e = Le.shift(); ) e.__d && (t = Le.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = xe({}, o)).__v = o.__v + 1, M.vnode && M.vnode(r), qt(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? Ue(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, cr(d, r, l), r.__e != i && ar(r)), Le.length > t && Le.sort(Lt));
52
- it.__r = 0;
53
- }
54
- function lr(e, t, n, r, o, i, s, d, l, u, p) {
55
- var c, m, f, g, _, b = r && r.__k || or, w = t.length;
56
- for (n.__d = l, function(y, I, j) {
57
- var k, E, x, R, L, S = I.length, h = j.length, v = h, C = 0;
58
- for (y.__k = [], k = 0; k < S; k++) (E = y.__k[k] = (E = I[k]) == null || typeof E == "boolean" || typeof E == "function" ? null : typeof E == "string" || typeof E == "number" || typeof E == "bigint" || E.constructor == String ? ze(null, E, null, null, E) : dt(E) ? ze(ee, { children: E }, null, null, null) : E.constructor === void 0 && E.__b > 0 ? ze(E.type, E.props, E.key, E.ref ? E.ref : null, E.__v) : E) != null ? (E.__ = y, E.__b = y.__b + 1, L = Do(E, j, R = k + C, v), E.__i = L, x = null, L !== -1 && (v--, (x = j[L]) && (x.__u |= 131072)), x == null || x.__v === null ? (L == -1 && C--, typeof E.type != "function" && (E.__u |= 65536)) : L !== R && (L === R + 1 ? C++ : L > R ? v > S - R ? C += L - R : C-- : C = L < R && L == R - 1 ? L - R : 0, L !== k + C && (E.__u |= 65536))) : (x = j[k]) && x.key == null && x.__e && (x.__e == y.__d && (y.__d = Ue(x)), Dt(x, x, !1), j[k] = null, v--);
59
- if (v) for (k = 0; k < h; k++) (x = j[k]) != null && !(131072 & x.__u) && (x.__e == y.__d && (y.__d = Ue(x)), Dt(x, x));
60
- }(n, t, b), l = n.__d, c = 0; c < w; c++) (f = n.__k[c]) != null && typeof f != "boolean" && typeof f != "function" && (m = f.__i === -1 ? Qe : b[f.__i] || Qe, f.__i = c, qt(e, f, m, o, i, s, d, l, u, p), g = f.__e, f.ref && m.ref != f.ref && (m.ref && At(m.ref, null, f), p.push(f.ref, f.__c || g, f)), _ == null && g != null && (_ = g), 65536 & f.__u || m.__k === f.__k ? l = dr(f, l, e) : typeof f.type == "function" && f.__d !== void 0 ? l = f.__d : g && (l = g.nextSibling), f.__d = void 0, f.__u &= -196609);
61
- n.__d = l, n.__e = _;
62
- }
63
- function dr(e, t, n) {
51
+ for (Ne.sort(Pt); e = Ne.shift(); ) e.__d && (t = Ne.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = ke({}, o)).__v = o.__v + 1, R.vnode && R.vnode(r), Vt(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? Ue(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, mr(d, r, l), r.__e != i && cr(r)), Ne.length > t && Ne.sort(Pt));
52
+ at.__r = 0;
53
+ }
54
+ function ur(e, t, n, r, o, i, s, d, l, u, p) {
55
+ var c, g, f, m, b, v = r && r.__k || ar, k = t.length;
56
+ for (n.__d = l, function(_, I, j) {
57
+ var w, E, x, P, D, T = I.length, h = j.length, y = h, S = 0;
58
+ for (_.__k = [], w = 0; w < T; w++) (E = _.__k[w] = (E = I[w]) == null || typeof E == "boolean" || typeof E == "function" ? null : typeof E == "string" || typeof E == "number" || typeof E == "bigint" || E.constructor == String ? $e(null, E, null, null, E) : ut(E) ? $e(ne, { children: E }, null, null, null) : E.constructor === void 0 && E.__b > 0 ? $e(E.type, E.props, E.key, E.ref ? E.ref : null, E.__v) : E) != null ? (E.__ = _, E.__b = _.__b + 1, D = Oo(E, j, P = w + S, y), E.__i = D, x = null, D !== -1 && (y--, (x = j[D]) && (x.__u |= 131072)), x == null || x.__v === null ? (D == -1 && S--, typeof E.type != "function" && (E.__u |= 65536)) : D !== P && (D === P + 1 ? S++ : D > P ? y > T - P ? S += D - P : S-- : S = D < P && D == P - 1 ? D - P : 0, D !== w + S && (E.__u |= 65536))) : (x = j[w]) && x.key == null && x.__e && (x.__e == _.__d && (_.__d = Ue(x)), Mt(x, x, !1), j[w] = null, y--);
59
+ if (y) for (w = 0; w < h; w++) (x = j[w]) != null && !(131072 & x.__u) && (x.__e == _.__d && (_.__d = Ue(x)), Mt(x, x));
60
+ }(n, t, v), l = n.__d, c = 0; c < k; c++) (f = n.__k[c]) != null && typeof f != "boolean" && typeof f != "function" && (g = f.__i === -1 ? We : v[f.__i] || We, f.__i = c, Vt(e, f, g, o, i, s, d, l, u, p), m = f.__e, f.ref && g.ref != f.ref && (g.ref && zt(g.ref, null, f), p.push(f.ref, f.__c || m, f)), b == null && m != null && (b = m), 65536 & f.__u || g.__k === f.__k ? l = pr(f, l, e) : typeof f.type == "function" && f.__d !== void 0 ? l = f.__d : m && (l = m.nextSibling), f.__d = void 0, f.__u &= -196609);
61
+ n.__d = l, n.__e = b;
62
+ }
63
+ function pr(e, t, n) {
64
64
  var r, o;
65
65
  if (typeof e.type == "function") {
66
- for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = dr(r[o], t, n));
66
+ for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = pr(r[o], t, n));
67
67
  return t;
68
68
  }
69
69
  return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
70
70
  }
71
- function ke(e, t) {
72
- return t = t || [], e == null || typeof e == "boolean" || (dt(e) ? e.some(function(n) {
73
- ke(n, t);
71
+ function we(e, t) {
72
+ return t = t || [], e == null || typeof e == "boolean" || (ut(e) ? e.some(function(n) {
73
+ we(n, t);
74
74
  }) : t.push(e)), t;
75
75
  }
76
- function Do(e, t, n, r) {
76
+ function Oo(e, t, n, r) {
77
77
  var o = e.key, i = e.type, s = n - 1, d = n + 1, l = t[n];
78
78
  if (l === null || l && o == l.key && i === l.type) return n;
79
79
  if (r > (l == null || 131072 & l.__u ? 0 : 1)) for (; s >= 0 || d < t.length; ) {
@@ -88,17 +88,17 @@ function Do(e, t, n, r) {
88
88
  }
89
89
  return -1;
90
90
  }
91
- function sn(e, t, n) {
92
- t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || No.test(t) ? n : n + "px";
91
+ function dn(e, t, n) {
92
+ t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || Mo.test(t) ? n : n + "px";
93
93
  }
94
- function Je(e, t, n, r, o) {
94
+ function et(e, t, n, r, o) {
95
95
  var i;
96
96
  e: if (t === "style") if (typeof n == "string") e.style.cssText = n;
97
97
  else {
98
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || sn(e.style, t, "");
99
- if (n) for (t in n) r && n[t] === r[t] || sn(e.style, t, n[t]);
98
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || dn(e.style, t, "");
99
+ if (n) for (t in n) r && n[t] === r[t] || dn(e.style, t, n[t]);
100
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 ? ln : an, i)) : e.removeEventListener(t, i ? ln : an, i);
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 ? un : cn, i)) : e.removeEventListener(t, i ? un : cn, i);
102
102
  else {
103
103
  if (o) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
104
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 {
@@ -109,120 +109,120 @@ function Je(e, t, n, r, o) {
109
109
  typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
110
110
  }
111
111
  }
112
- function an(e) {
112
+ function cn(e) {
113
113
  var t = this.l[e.type + !1];
114
114
  if (e.t) {
115
115
  if (e.t <= t.u) return;
116
116
  } else e.t = Date.now();
117
- return t(M.event ? M.event(e) : e);
117
+ return t(R.event ? R.event(e) : e);
118
118
  }
119
- function ln(e) {
120
- return this.l[e.type + !0](M.event ? M.event(e) : e);
119
+ function un(e) {
120
+ return this.l[e.type + !0](R.event ? R.event(e) : e);
121
121
  }
122
- function qt(e, t, n, r, o, i, s, d, l, u) {
123
- var p, c, m, f, g, _, b, w, y, I, j, k, E, x, R, L = t.type;
122
+ function Vt(e, t, n, r, o, i, s, d, l, u) {
123
+ var p, c, g, f, m, b, v, k, _, I, j, w, E, x, P, D = t.type;
124
124
  if (t.constructor !== void 0) return null;
125
- 128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (p = M.__b) && p(t);
126
- e: if (typeof L == "function") try {
127
- if (w = t.props, y = (p = L.contextType) && r[p.__c], I = p ? y ? y.props.value : p.__ : r, n.__c ? b = (c = t.__c = n.__c).__ = c.__E : ("prototype" in L && L.prototype.render ? t.__c = c = new L(w, I) : (t.__c = c = new me(w, I), c.constructor = L, c.render = Ro), y && y.sub(c), c.props = w, c.state || (c.state = {}), c.context = I, c.__n = r, m = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), L.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = xe({}, c.__s)), xe(c.__s, L.getDerivedStateFromProps(w, c.__s))), f = c.props, g = c.state, c.__v = t, m) L.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
125
+ 128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (p = R.__b) && p(t);
126
+ e: if (typeof D == "function") try {
127
+ if (k = t.props, _ = (p = D.contextType) && r[p.__c], I = p ? _ ? _.props.value : p.__ : r, n.__c ? v = (c = t.__c = n.__c).__ = c.__E : ("prototype" in D && D.prototype.render ? t.__c = c = new D(k, I) : (t.__c = c = new he(k, I), c.constructor = D, c.render = Ho), _ && _.sub(c), c.props = k, c.state || (c.state = {}), c.context = I, c.__n = r, g = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), D.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ke({}, c.__s)), ke(c.__s, D.getDerivedStateFromProps(k, c.__s))), f = c.props, m = c.state, c.__v = t, g) D.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
128
128
  else {
129
- if (L.getDerivedStateFromProps == null && w !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(w, I), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(w, c.__s, I) === !1 || t.__v === n.__v)) {
130
- for (t.__v !== n.__v && (c.props = w, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(S) {
131
- S && (S.__ = t);
129
+ if (D.getDerivedStateFromProps == null && k !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(k, I), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(k, c.__s, I) === !1 || t.__v === n.__v)) {
130
+ 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(T) {
131
+ T && (T.__ = t);
132
132
  }), j = 0; j < c._sb.length; j++) c.__h.push(c._sb[j]);
133
133
  c._sb = [], c.__h.length && s.push(c);
134
134
  break e;
135
135
  }
136
- c.componentWillUpdate != null && c.componentWillUpdate(w, c.__s, I), c.componentDidUpdate != null && c.__h.push(function() {
137
- c.componentDidUpdate(f, g, _);
136
+ c.componentWillUpdate != null && c.componentWillUpdate(k, c.__s, I), c.componentDidUpdate != null && c.__h.push(function() {
137
+ c.componentDidUpdate(f, m, b);
138
138
  });
139
139
  }
140
- if (c.context = I, c.props = w, c.__P = e, c.__e = !1, k = M.__r, E = 0, "prototype" in L && L.prototype.render) {
141
- for (c.state = c.__s, c.__d = !1, k && k(t), p = c.render(c.props, c.state, c.context), x = 0; x < c._sb.length; x++) c.__h.push(c._sb[x]);
140
+ if (c.context = I, c.props = k, c.__P = e, c.__e = !1, w = R.__r, E = 0, "prototype" in D && D.prototype.render) {
141
+ for (c.state = c.__s, c.__d = !1, w && w(t), p = c.render(c.props, c.state, c.context), x = 0; x < c._sb.length; x++) c.__h.push(c._sb[x]);
142
142
  c._sb = [];
143
143
  } else do
144
- c.__d = !1, k && k(t), p = c.render(c.props, c.state, c.context), c.state = c.__s;
144
+ c.__d = !1, w && w(t), p = c.render(c.props, c.state, c.context), c.state = c.__s;
145
145
  while (c.__d && ++E < 25);
146
- c.state = c.__s, c.getChildContext != null && (r = xe(xe({}, r), c.getChildContext())), m || c.getSnapshotBeforeUpdate == null || (_ = c.getSnapshotBeforeUpdate(f, g)), lr(e, dt(R = p != null && p.type === ee && p.key == null ? p.props.children : p) ? R : [R], t, n, r, o, i, s, d, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), b && (c.__E = c.__ = null);
147
- } catch (S) {
148
- 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), M.__e(S, t, n);
146
+ c.state = c.__s, c.getChildContext != null && (r = ke(ke({}, r), c.getChildContext())), g || c.getSnapshotBeforeUpdate == null || (b = c.getSnapshotBeforeUpdate(f, m)), ur(e, ut(P = p != null && p.type === ne && p.key == null ? p.props.children : p) ? P : [P], t, n, r, o, i, s, d, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), v && (c.__E = c.__ = null);
147
+ } catch (T) {
148
+ 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), R.__e(T, t, n);
149
149
  }
150
- else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Po(n.__e, t, n, r, o, i, s, l, u);
151
- (p = M.diffed) && p(t);
150
+ else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Uo(n.__e, t, n, r, o, i, s, l, u);
151
+ (p = R.diffed) && p(t);
152
152
  }
153
- function cr(e, t, n) {
153
+ function mr(e, t, n) {
154
154
  t.__d = void 0;
155
- for (var r = 0; r < n.length; r++) At(n[r], n[++r], n[++r]);
156
- M.__c && M.__c(t, e), e.some(function(o) {
155
+ for (var r = 0; r < n.length; r++) zt(n[r], n[++r], n[++r]);
156
+ R.__c && R.__c(t, e), e.some(function(o) {
157
157
  try {
158
158
  e = o.__h, o.__h = [], e.some(function(i) {
159
159
  i.call(o);
160
160
  });
161
161
  } catch (i) {
162
- M.__e(i, o.__v);
162
+ R.__e(i, o.__v);
163
163
  }
164
164
  });
165
165
  }
166
- function Po(e, t, n, r, o, i, s, d, l) {
167
- var u, p, c, m, f, g, _, b = n.props, w = t.props, y = t.type;
168
- if (y === "svg" && (o = !0), i != null) {
169
- for (u = 0; u < i.length; u++) if ((f = i[u]) && "setAttribute" in f == !!y && (y ? f.localName === y : f.nodeType === 3)) {
166
+ function Uo(e, t, n, r, o, i, s, d, l) {
167
+ var u, p, c, g, f, m, b, v = n.props, k = t.props, _ = t.type;
168
+ if (_ === "svg" && (o = !0), i != null) {
169
+ for (u = 0; u < i.length; u++) if ((f = i[u]) && "setAttribute" in f == !!_ && (_ ? f.localName === _ : f.nodeType === 3)) {
170
170
  e = f, i[u] = null;
171
171
  break;
172
172
  }
173
173
  }
174
174
  if (e == null) {
175
- if (y === null) return document.createTextNode(w);
176
- e = o ? document.createElementNS("http://www.w3.org/2000/svg", y) : document.createElement(y, w.is && w), i = null, d = !1;
175
+ if (_ === null) return document.createTextNode(k);
176
+ e = o ? document.createElementNS("http://www.w3.org/2000/svg", _) : document.createElement(_, k.is && k), i = null, d = !1;
177
177
  }
178
- if (y === null) b === w || d && e.data === w || (e.data = w);
178
+ if (_ === null) v === k || d && e.data === k || (e.data = k);
179
179
  else {
180
- if (i = i && We.call(e.childNodes), b = n.props || Qe, !d && i != null) for (b = {}, u = 0; u < e.attributes.length; u++) b[(f = e.attributes[u]).name] = f.value;
181
- for (u in b) f = b[u], u == "children" || (u == "dangerouslySetInnerHTML" ? c = f : u === "key" || u in w || Je(e, u, null, f, o));
182
- for (u in w) f = w[u], u == "children" ? m = f : u == "dangerouslySetInnerHTML" ? p = f : u == "value" ? g = f : u == "checked" ? _ = f : u === "key" || d && typeof f != "function" || b[u] === f || Je(e, u, f, b[u], o);
180
+ if (i = i && Ze.call(e.childNodes), v = n.props || We, !d && i != null) for (v = {}, u = 0; u < e.attributes.length; u++) v[(f = e.attributes[u]).name] = f.value;
181
+ for (u in v) f = v[u], u == "children" || (u == "dangerouslySetInnerHTML" ? c = f : u === "key" || u in k || et(e, u, null, f, o));
182
+ for (u in k) f = k[u], u == "children" ? g = f : u == "dangerouslySetInnerHTML" ? p = f : u == "value" ? m = f : u == "checked" ? b = f : u === "key" || d && typeof f != "function" || v[u] === f || et(e, u, f, v[u], o);
183
183
  if (p) d || c && (p.__html === c.__html || p.__html === e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
184
- else if (c && (e.innerHTML = ""), lr(e, dt(m) ? m : [m], t, n, r, o && y !== "foreignObject", i, s, i ? i[0] : n.__k && Ue(n, 0), d, l), i != null) for (u = i.length; u--; ) i[u] != null && ir(i[u]);
185
- d || (u = "value", g !== void 0 && (g !== e[u] || y === "progress" && !g || y === "option" && g !== b[u]) && Je(e, u, g, b[u], !1), u = "checked", _ !== void 0 && _ !== e[u] && Je(e, u, _, b[u], !1));
184
+ else if (c && (e.innerHTML = ""), ur(e, ut(g) ? g : [g], t, n, r, o && _ !== "foreignObject", i, s, i ? i[0] : n.__k && Ue(n, 0), d, l), i != null) for (u = i.length; u--; ) i[u] != null && lr(i[u]);
185
+ d || (u = "value", m !== void 0 && (m !== e[u] || _ === "progress" && !m || _ === "option" && m !== v[u]) && et(e, u, m, v[u], !1), u = "checked", b !== void 0 && b !== e[u] && et(e, u, b, v[u], !1));
186
186
  }
187
187
  return e;
188
188
  }
189
- function At(e, t, n) {
189
+ function zt(e, t, n) {
190
190
  try {
191
191
  typeof e == "function" ? e(t) : e.current = t;
192
192
  } catch (r) {
193
- M.__e(r, n);
193
+ R.__e(r, n);
194
194
  }
195
195
  }
196
- function Dt(e, t, n) {
196
+ function Mt(e, t, n) {
197
197
  var r, o;
198
- if (M.unmount && M.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || At(r, null, t)), (r = e.__c) != null) {
198
+ if (R.unmount && R.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || zt(r, null, t)), (r = e.__c) != null) {
199
199
  if (r.componentWillUnmount) try {
200
200
  r.componentWillUnmount();
201
201
  } catch (i) {
202
- M.__e(i, t);
202
+ R.__e(i, t);
203
203
  }
204
204
  r.base = r.__P = null, e.__c = void 0;
205
205
  }
206
- if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && Dt(r[o], t, n || typeof e.type != "function");
207
- n || e.__e == null || ir(e.__e), e.__ = e.__e = e.__d = void 0;
206
+ if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && Mt(r[o], t, n || typeof e.type != "function");
207
+ n || e.__e == null || lr(e.__e), e.__ = e.__e = e.__d = void 0;
208
208
  }
209
- function Ro(e, t, n) {
209
+ function Ho(e, t, n) {
210
210
  return this.constructor(e, n);
211
211
  }
212
212
  function He(e, t, n) {
213
213
  var r, o, i, s;
214
- M.__ && M.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], qt(t, e = (!r && n || t).__k = de(ee, null, [e]), o || Qe, Qe, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? We.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), cr(i, e, s);
214
+ R.__ && R.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], Vt(t, e = (!r && n || t).__k = de(ne, null, [e]), o || We, We, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? Ze.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), mr(i, e, s);
215
215
  }
216
- function ur(e, t) {
217
- He(e, t, ur);
216
+ function hr(e, t) {
217
+ He(e, t, hr);
218
218
  }
219
- function Mo(e, t, n) {
220
- var r, o, i, s, d = xe({}, e.props);
219
+ function Bo(e, t, n) {
220
+ var r, o, i, s, d = ke({}, e.props);
221
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 ? We.call(arguments, 2) : n), ze(e.type, d, r || e.key, o || e.ref, null);
222
+ return arguments.length > 2 && (d.children = arguments.length > 3 ? Ze.call(arguments, 2) : n), $e(e.type, d, r || e.key, o || e.ref, null);
223
223
  }
224
- function pr(e, t) {
225
- var n = { __c: t = "__cC" + rr++, __: e, Consumer: function(r, o) {
224
+ function gr(e, t) {
225
+ var n = { __c: t = "__cC" + sr++, __: e, Consumer: function(r, o) {
226
226
  return r.children(o);
227
227
  }, Provider: function(r) {
228
228
  var o, i;
@@ -230,7 +230,7 @@ function pr(e, t) {
230
230
  return i;
231
231
  }, this.shouldComponentUpdate = function(s) {
232
232
  this.props.value !== s.value && o.some(function(d) {
233
- d.__e = !0, Nt(d);
233
+ d.__e = !0, Rt(d);
234
234
  });
235
235
  }, this.sub = function(s) {
236
236
  o.push(s);
@@ -242,87 +242,87 @@ function pr(e, t) {
242
242
  } };
243
243
  return n.Provider.__ = n.Consumer.contextType = n;
244
244
  }
245
- We = or.slice, M = { __e: function(e, t, n, r) {
245
+ Ze = ar.slice, R = { __e: function(e, t, n, r) {
246
246
  for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
247
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
248
  } catch (d) {
249
249
  e = d;
250
250
  }
251
251
  throw e;
252
- } }, tr = 0, me.prototype.setState = function(e, t) {
252
+ } }, or = 0, he.prototype.setState = function(e, t) {
253
253
  var n;
254
- n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = xe({}, this.state), typeof e == "function" && (e = e(xe({}, n), this.props)), e && xe(n, e), e != null && this.__v && (t && this._sb.push(t), Nt(this));
255
- }, me.prototype.forceUpdate = function(e) {
256
- this.__v && (this.__e = !0, e && this.__h.push(e), Nt(this));
257
- }, me.prototype.render = ee, Le = [], nr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Lt = function(e, t) {
254
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ke({}, this.state), typeof e == "function" && (e = e(ke({}, n), this.props)), e && ke(n, e), e != null && this.__v && (t && this._sb.push(t), Rt(this));
255
+ }, he.prototype.forceUpdate = function(e) {
256
+ this.__v && (this.__e = !0, e && this.__h.push(e), Rt(this));
257
+ }, he.prototype.render = ne, Ne = [], ir = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Pt = function(e, t) {
258
258
  return e.__v.__b - t.__v.__b;
259
- }, it.__r = 0, rr = 0;
260
- var Oo = 0;
259
+ }, at.__r = 0, sr = 0;
260
+ var qo = 0;
261
261
  function a(e, t, n, r, o, i) {
262
262
  var s, d, l = {};
263
263
  for (d in t) d == "ref" ? s = t[d] : l[d] = t[d];
264
- var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --Oo, __i: -1, __u: 0, __source: o, __self: i };
264
+ var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --qo, __i: -1, __u: 0, __source: o, __self: i };
265
265
  if (typeof e == "function" && (s = e.defaultProps)) for (d in s) l[d] === void 0 && (l[d] = s[d]);
266
- return M.vnode && M.vnode(u), u;
266
+ return R.vnode && R.vnode(u), u;
267
267
  }
268
- var we, W, ft, dn, Be = 0, mr = [], Xe = [], cn = M.__b, un = M.__r, pn = M.diffed, mn = M.__c, hn = M.unmount;
269
- function Pe(e, t) {
270
- M.__h && M.__h(W, e, Be || t), Be = 0;
271
- var n = W.__H || (W.__H = { __: [], __h: [] });
272
- return e >= n.__.length && n.__.push({ __V: Xe }), n.__[e];
268
+ var Ce, Z, _t, pn, Be = 0, fr = [], tt = [], mn = R.__b, hn = R.__r, gn = R.diffed, fn = R.__c, vn = R.unmount;
269
+ function Re(e, t) {
270
+ R.__h && R.__h(Z, e, Be || t), Be = 0;
271
+ var n = Z.__H || (Z.__H = { __: [], __h: [] });
272
+ return e >= n.__.length && n.__.push({ __V: tt }), n.__[e];
273
273
  }
274
- function z(e) {
275
- return Be = 1, Ft(vr, e);
274
+ function $(e) {
275
+ return Be = 1, $t(yr, e);
276
276
  }
277
- function Ft(e, t, n) {
278
- var r = Pe(we++, 2);
279
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : vr(void 0, t), function(d) {
277
+ function $t(e, t, n) {
278
+ var r = Re(Ce++, 2);
279
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : yr(void 0, t), function(d) {
280
280
  var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, d);
281
281
  l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
282
- }], r.__c = W, !W.u)) {
282
+ }], r.__c = Z, !Z.u)) {
283
283
  var o = function(d, l, u) {
284
284
  if (!r.__c.__H) return !0;
285
- var p = r.__c.__H.__.filter(function(m) {
286
- return m.__c;
285
+ var p = r.__c.__H.__.filter(function(g) {
286
+ return g.__c;
287
287
  });
288
- if (p.every(function(m) {
289
- return !m.__N;
288
+ if (p.every(function(g) {
289
+ return !g.__N;
290
290
  })) return !i || i.call(this, d, l, u);
291
291
  var c = !1;
292
- return p.forEach(function(m) {
293
- if (m.__N) {
294
- var f = m.__[0];
295
- m.__ = m.__N, m.__N = void 0, f !== m.__[0] && (c = !0);
292
+ return p.forEach(function(g) {
293
+ if (g.__N) {
294
+ var f = g.__[0];
295
+ g.__ = g.__N, g.__N = void 0, f !== g.__[0] && (c = !0);
296
296
  }
297
297
  }), !(!c && r.__c.props === d) && (!i || i.call(this, d, l, u));
298
298
  };
299
- W.u = !0;
300
- var i = W.shouldComponentUpdate, s = W.componentWillUpdate;
301
- W.componentWillUpdate = function(d, l, u) {
299
+ Z.u = !0;
300
+ var i = Z.shouldComponentUpdate, s = Z.componentWillUpdate;
301
+ Z.componentWillUpdate = function(d, l, u) {
302
302
  if (this.__e) {
303
303
  var p = i;
304
304
  i = void 0, o(d, l, u), i = p;
305
305
  }
306
306
  s && s.call(this, d, l, u);
307
- }, W.shouldComponentUpdate = o;
307
+ }, Z.shouldComponentUpdate = o;
308
308
  }
309
309
  return r.__N || r.__;
310
310
  }
311
311
  function Y(e, t) {
312
- var n = Pe(we++, 3);
313
- !M.__s && zt(n.__H, t) && (n.__ = e, n.i = t, W.__H.__h.push(n));
312
+ var n = Re(Ce++, 3);
313
+ !R.__s && Wt(n.__H, t) && (n.__ = e, n.i = t, Z.__H.__h.push(n));
314
314
  }
315
- function Ze(e, t) {
316
- var n = Pe(we++, 4);
317
- !M.__s && zt(n.__H, t) && (n.__ = e, n.i = t, W.__h.push(n));
315
+ function Ge(e, t) {
316
+ var n = Re(Ce++, 4);
317
+ !R.__s && Wt(n.__H, t) && (n.__ = e, n.i = t, Z.__h.push(n));
318
318
  }
319
- function J(e) {
320
- return Be = 5, he(function() {
319
+ function ee(e) {
320
+ return Be = 5, ge(function() {
321
321
  return { current: e };
322
322
  }, []);
323
323
  }
324
- function hr(e, t, n) {
325
- Be = 6, Ze(function() {
324
+ function vr(e, t, n) {
325
+ Be = 6, Ge(function() {
326
326
  return typeof e == "function" ? (e(t()), function() {
327
327
  return e(null);
328
328
  }) : e ? (e.current = t(), function() {
@@ -330,171 +330,171 @@ function hr(e, t, n) {
330
330
  }) : void 0;
331
331
  }, n == null ? n : n.concat(e));
332
332
  }
333
- function he(e, t) {
334
- var n = Pe(we++, 7);
335
- return zt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
333
+ function ge(e, t) {
334
+ var n = Re(Ce++, 7);
335
+ return Wt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
336
336
  }
337
- function De(e, t) {
338
- return Be = 8, he(function() {
337
+ function Pe(e, t) {
338
+ return Be = 8, ge(function() {
339
339
  return e;
340
340
  }, t);
341
341
  }
342
- function gr(e) {
343
- var t = W.context[e.__c], n = Pe(we++, 9);
344
- return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(W)), t.props.value) : e.__;
342
+ function br(e) {
343
+ var t = Z.context[e.__c], n = Re(Ce++, 9);
344
+ return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Z)), t.props.value) : e.__;
345
345
  }
346
- function Vt(e, t) {
347
- M.useDebugValue && M.useDebugValue(t ? t(e) : e);
346
+ function Qt(e, t) {
347
+ R.useDebugValue && R.useDebugValue(t ? t(e) : e);
348
348
  }
349
- function fr() {
350
- var e = Pe(we++, 11);
349
+ function _r() {
350
+ var e = Re(Ce++, 11);
351
351
  if (!e.__) {
352
- for (var t = W.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
352
+ for (var t = Z.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
353
353
  var n = t.__m || (t.__m = [0, 0]);
354
354
  e.__ = "P" + n[0] + "-" + n[1]++;
355
355
  }
356
356
  return e.__;
357
357
  }
358
- function Uo() {
359
- for (var e; e = mr.shift(); ) if (e.__P && e.__H) try {
360
- e.__H.__h.forEach(et), e.__H.__h.forEach(Pt), e.__H.__h = [];
358
+ function Ao() {
359
+ for (var e; e = fr.shift(); ) if (e.__P && e.__H) try {
360
+ e.__H.__h.forEach(nt), e.__H.__h.forEach(Ot), e.__H.__h = [];
361
361
  } catch (t) {
362
- e.__H.__h = [], M.__e(t, e.__v);
362
+ e.__H.__h = [], R.__e(t, e.__v);
363
363
  }
364
364
  }
365
- M.__b = function(e) {
366
- W = null, cn && cn(e);
367
- }, M.__r = function(e) {
368
- un && un(e), we = 0;
369
- var t = (W = e.__c).__H;
370
- t && (ft === W ? (t.__h = [], W.__h = [], t.__.forEach(function(n) {
371
- n.__N && (n.__ = n.__N), n.__V = Xe, n.__N = n.i = void 0;
372
- })) : (t.__h.forEach(et), t.__h.forEach(Pt), t.__h = [], we = 0)), ft = W;
373
- }, M.diffed = function(e) {
374
- pn && pn(e);
365
+ R.__b = function(e) {
366
+ Z = null, mn && mn(e);
367
+ }, R.__r = function(e) {
368
+ hn && hn(e), Ce = 0;
369
+ var t = (Z = e.__c).__H;
370
+ t && (_t === Z ? (t.__h = [], Z.__h = [], t.__.forEach(function(n) {
371
+ n.__N && (n.__ = n.__N), n.__V = tt, n.__N = n.i = void 0;
372
+ })) : (t.__h.forEach(nt), t.__h.forEach(Ot), t.__h = [], Ce = 0)), _t = Z;
373
+ }, R.diffed = function(e) {
374
+ gn && gn(e);
375
375
  var t = e.__c;
376
- t && t.__H && (t.__H.__h.length && (mr.push(t) !== 1 && dn === M.requestAnimationFrame || ((dn = M.requestAnimationFrame) || Ho)(Uo)), t.__H.__.forEach(function(n) {
377
- n.i && (n.__H = n.i), n.__V !== Xe && (n.__ = n.__V), n.i = void 0, n.__V = Xe;
378
- })), ft = W = null;
379
- }, M.__c = function(e, t) {
376
+ t && t.__H && (t.__H.__h.length && (fr.push(t) !== 1 && pn === R.requestAnimationFrame || ((pn = R.requestAnimationFrame) || Fo)(Ao)), t.__H.__.forEach(function(n) {
377
+ n.i && (n.__H = n.i), n.__V !== tt && (n.__ = n.__V), n.i = void 0, n.__V = tt;
378
+ })), _t = Z = null;
379
+ }, R.__c = function(e, t) {
380
380
  t.some(function(n) {
381
381
  try {
382
- n.__h.forEach(et), n.__h = n.__h.filter(function(r) {
383
- return !r.__ || Pt(r);
382
+ n.__h.forEach(nt), n.__h = n.__h.filter(function(r) {
383
+ return !r.__ || Ot(r);
384
384
  });
385
385
  } catch (r) {
386
386
  t.some(function(o) {
387
387
  o.__h && (o.__h = []);
388
- }), t = [], M.__e(r, n.__v);
388
+ }), t = [], R.__e(r, n.__v);
389
389
  }
390
- }), mn && mn(e, t);
391
- }, M.unmount = function(e) {
392
- hn && hn(e);
390
+ }), fn && fn(e, t);
391
+ }, R.unmount = function(e) {
392
+ vn && vn(e);
393
393
  var t, n = e.__c;
394
394
  n && n.__H && (n.__H.__.forEach(function(r) {
395
395
  try {
396
- et(r);
396
+ nt(r);
397
397
  } catch (o) {
398
398
  t = o;
399
399
  }
400
- }), n.__H = void 0, t && M.__e(t, n.__v));
400
+ }), n.__H = void 0, t && R.__e(t, n.__v));
401
401
  };
402
- var gn = typeof requestAnimationFrame == "function";
403
- function Ho(e) {
402
+ var bn = typeof requestAnimationFrame == "function";
403
+ function Fo(e) {
404
404
  var t, n = function() {
405
- clearTimeout(r), gn && cancelAnimationFrame(t), setTimeout(e);
405
+ clearTimeout(r), bn && cancelAnimationFrame(t), setTimeout(e);
406
406
  }, r = setTimeout(n, 100);
407
- gn && (t = requestAnimationFrame(n));
407
+ bn && (t = requestAnimationFrame(n));
408
408
  }
409
- function et(e) {
410
- var t = W, n = e.__c;
411
- typeof n == "function" && (e.__c = void 0, n()), W = t;
409
+ function nt(e) {
410
+ var t = Z, n = e.__c;
411
+ typeof n == "function" && (e.__c = void 0, n()), Z = t;
412
412
  }
413
- function Pt(e) {
414
- var t = W;
415
- e.__c = e.__(), W = t;
413
+ function Ot(e) {
414
+ var t = Z;
415
+ e.__c = e.__(), Z = t;
416
416
  }
417
- function zt(e, t) {
417
+ function Wt(e, t) {
418
418
  return !e || e.length !== t.length || t.some(function(n, r) {
419
419
  return n !== e[r];
420
420
  });
421
421
  }
422
- function vr(e, t) {
422
+ function yr(e, t) {
423
423
  return typeof t == "function" ? t(e) : t;
424
424
  }
425
- function br(e, t) {
425
+ function xr(e, t) {
426
426
  for (var n in t) e[n] = t[n];
427
427
  return e;
428
428
  }
429
- function Rt(e, t) {
429
+ function Ut(e, t) {
430
430
  for (var n in e) if (n !== "__source" && !(n in t)) return !0;
431
431
  for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
432
432
  return !1;
433
433
  }
434
- function st(e) {
434
+ function lt(e) {
435
435
  this.props = e;
436
436
  }
437
- function _r(e, t) {
437
+ function kr(e, t) {
438
438
  function n(o) {
439
439
  var i = this.props.ref, s = i == o.ref;
440
- return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : Rt(this.props, o);
440
+ return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : Ut(this.props, o);
441
441
  }
442
442
  function r(o) {
443
443
  return this.shouldComponentUpdate = n, de(e, o);
444
444
  }
445
445
  return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
446
446
  }
447
- (st.prototype = new me()).isPureReactComponent = !0, st.prototype.shouldComponentUpdate = function(e, t) {
448
- return Rt(this.props, e) || Rt(this.state, t);
447
+ (lt.prototype = new he()).isPureReactComponent = !0, lt.prototype.shouldComponentUpdate = function(e, t) {
448
+ return Ut(this.props, e) || Ut(this.state, t);
449
449
  };
450
- var fn = M.__b;
451
- M.__b = function(e) {
452
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), fn && fn(e);
450
+ var _n = R.__b;
451
+ R.__b = function(e) {
452
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), _n && _n(e);
453
453
  };
454
- var Bo = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
455
- function $t(e) {
454
+ var Vo = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
455
+ function Zt(e) {
456
456
  function t(n) {
457
- var r = br({}, n);
457
+ var r = xr({}, n);
458
458
  return delete r.ref, e(r, n.ref || null);
459
459
  }
460
- return t.$$typeof = Bo, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
460
+ return t.$$typeof = Vo, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
461
461
  }
462
- var vn = function(e, t) {
463
- return e == null ? null : ke(ke(e).map(t));
464
- }, yr = { map: vn, forEach: vn, count: function(e) {
465
- return e ? ke(e).length : 0;
462
+ var yn = function(e, t) {
463
+ return e == null ? null : we(we(e).map(t));
464
+ }, wr = { map: yn, forEach: yn, count: function(e) {
465
+ return e ? we(e).length : 0;
466
466
  }, only: function(e) {
467
- var t = ke(e);
467
+ var t = we(e);
468
468
  if (t.length !== 1) throw "Children.only";
469
469
  return t[0];
470
- }, toArray: ke }, qo = M.__e;
471
- M.__e = function(e, t, n, r) {
470
+ }, toArray: we }, zo = R.__e;
471
+ R.__e = function(e, t, n, r) {
472
472
  if (e.then) {
473
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);
474
474
  }
475
- qo(e, t, n, r);
475
+ zo(e, t, n, r);
476
476
  };
477
- var bn = M.unmount;
478
- function xr(e, t, n) {
477
+ var xn = R.unmount;
478
+ function Cr(e, t, n) {
479
479
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
480
480
  typeof r.__c == "function" && r.__c();
481
- }), e.__c.__H = null), (e = br({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
482
- return xr(r, t, n);
481
+ }), e.__c.__H = null), (e = xr({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
482
+ return Cr(r, t, n);
483
483
  })), e;
484
484
  }
485
- function kr(e, t, n) {
485
+ function Sr(e, t, n) {
486
486
  return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
487
- return kr(r, t, n);
487
+ return Sr(r, t, n);
488
488
  }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
489
489
  }
490
- function $e() {
490
+ function Qe() {
491
491
  this.__u = 0, this.t = null, this.__b = null;
492
492
  }
493
- function wr(e) {
493
+ function Er(e) {
494
494
  var t = e.__.__c;
495
495
  return t && t.__a && t.__a(e);
496
496
  }
497
- function Cr(e) {
497
+ function Ir(e) {
498
498
  var t, n, r;
499
499
  function o(i) {
500
500
  if (t || (t = e()).then(function(s) {
@@ -510,13 +510,13 @@ function Cr(e) {
510
510
  function Me() {
511
511
  this.u = null, this.o = null;
512
512
  }
513
- M.unmount = function(e) {
513
+ R.unmount = function(e) {
514
514
  var t = e.__c;
515
- t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), bn && bn(e);
516
- }, ($e.prototype = new me()).__c = function(e, t) {
515
+ t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), xn && xn(e);
516
+ }, (Qe.prototype = new he()).__c = function(e, t) {
517
517
  var n = t.__c, r = this;
518
518
  r.t == null && (r.t = []), r.t.push(n);
519
- var o = wr(r.__v), i = !1, s = function() {
519
+ var o = Er(r.__v), i = !1, s = function() {
520
520
  i || (i = !0, n.__R = null, o ? o(d) : d());
521
521
  };
522
522
  n.__R = s;
@@ -524,39 +524,39 @@ M.unmount = function(e) {
524
524
  if (!--r.__u) {
525
525
  if (r.state.__a) {
526
526
  var l = r.state.__a;
527
- r.__v.__k[0] = kr(l, l.__c.__P, l.__c.__O);
527
+ r.__v.__k[0] = Sr(l, l.__c.__P, l.__c.__O);
528
528
  }
529
529
  var u;
530
530
  for (r.setState({ __a: r.__b = null }); u = r.t.pop(); ) u.forceUpdate();
531
531
  }
532
532
  };
533
533
  r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
534
- }, $e.prototype.componentWillUnmount = function() {
534
+ }, Qe.prototype.componentWillUnmount = function() {
535
535
  this.t = [];
536
- }, $e.prototype.render = function(e, t) {
536
+ }, Qe.prototype.render = function(e, t) {
537
537
  if (this.__b) {
538
538
  if (this.__v.__k) {
539
539
  var n = document.createElement("div"), r = this.__v.__k[0].__c;
540
- this.__v.__k[0] = xr(this.__b, n, r.__O = r.__P);
540
+ this.__v.__k[0] = Cr(this.__b, n, r.__O = r.__P);
541
541
  }
542
542
  this.__b = null;
543
543
  }
544
- var o = t.__a && de(ee, null, e.fallback);
545
- return o && (o.__u &= -33), [de(ee, null, t.__a ? null : e.children), o];
544
+ var o = t.__a && de(ne, null, e.fallback);
545
+ return o && (o.__u &= -33), [de(ne, null, t.__a ? null : e.children), o];
546
546
  };
547
- var _n = function(e, t, n) {
547
+ var kn = function(e, t, n) {
548
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
549
  for (; n.length > 3; ) n.pop()();
550
550
  if (n[1] < n[0]) break;
551
551
  e.u = n = n[2];
552
552
  }
553
553
  };
554
- function Ao(e) {
554
+ function $o(e) {
555
555
  return this.getChildContext = function() {
556
556
  return e.context;
557
557
  }, e.children;
558
558
  }
559
- function Fo(e) {
559
+ function Qo(e) {
560
560
  var t = this, n = e.i;
561
561
  t.componentWillUnmount = function() {
562
562
  He(null, t.l), t.l = null, t.i = null;
@@ -566,137 +566,137 @@ function Fo(e) {
566
566
  this.childNodes.push(r), t.i.appendChild(r);
567
567
  }, removeChild: function(r) {
568
568
  this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
569
- } }), He(de(Ao, { context: t.context }, e.__v), t.l);
569
+ } }), He(de($o, { context: t.context }, e.__v), t.l);
570
570
  }
571
- function Sr(e, t) {
572
- var n = de(Fo, { __v: e, i: t });
571
+ function jr(e, t) {
572
+ var n = de(Qo, { __v: e, i: t });
573
573
  return n.containerInfo = t, n;
574
574
  }
575
- (Me.prototype = new me()).__a = function(e) {
576
- var t = this, n = wr(t.__v), r = t.o.get(e);
575
+ (Me.prototype = new he()).__a = function(e) {
576
+ var t = this, n = Er(t.__v), r = t.o.get(e);
577
577
  return r[0]++, function(o) {
578
578
  var i = function() {
579
- t.props.revealOrder ? (r.push(o), _n(t, e, r)) : o();
579
+ t.props.revealOrder ? (r.push(o), kn(t, e, r)) : o();
580
580
  };
581
581
  n ? n(i) : i();
582
582
  };
583
583
  }, Me.prototype.render = function(e) {
584
584
  this.u = null, this.o = /* @__PURE__ */ new Map();
585
- var t = ke(e.children);
585
+ var t = we(e.children);
586
586
  e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
587
587
  for (var n = t.length; n--; ) this.o.set(t[n], this.u = [1, 0, this.u]);
588
588
  return e.children;
589
589
  }, Me.prototype.componentDidUpdate = Me.prototype.componentDidMount = function() {
590
590
  var e = this;
591
591
  this.o.forEach(function(t, n) {
592
- _n(e, n, t);
592
+ kn(e, n, t);
593
593
  });
594
594
  };
595
- var Er = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Vo = /^(?: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]/, zo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, $o = /[A-Z0-9]/g, Qo = typeof document < "u", Wo = function(e) {
595
+ var Tr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Wo = /^(?: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]/, Zo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Go = /[A-Z0-9]/g, Yo = typeof document < "u", Ko = function(e) {
596
596
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
597
597
  };
598
- function Ir(e, t, n) {
598
+ function Lr(e, t, n) {
599
599
  return t.__k == null && (t.textContent = ""), He(e, t), typeof n == "function" && n(), e ? e.__c : null;
600
600
  }
601
- function jr(e, t, n) {
602
- return ur(e, t), typeof n == "function" && n(), e ? e.__c : null;
601
+ function Nr(e, t, n) {
602
+ return hr(e, t), typeof n == "function" && n(), e ? e.__c : null;
603
603
  }
604
- me.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
605
- Object.defineProperty(me.prototype, e, { configurable: !0, get: function() {
604
+ he.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
605
+ Object.defineProperty(he.prototype, e, { configurable: !0, get: function() {
606
606
  return this["UNSAFE_" + e];
607
607
  }, set: function(t) {
608
608
  Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
609
609
  } });
610
610
  });
611
- var yn = M.event;
612
- function Zo() {
611
+ var wn = R.event;
612
+ function Jo() {
613
613
  }
614
- function Go() {
614
+ function Xo() {
615
615
  return this.cancelBubble;
616
616
  }
617
- function Yo() {
617
+ function ei() {
618
618
  return this.defaultPrevented;
619
619
  }
620
- M.event = function(e) {
621
- return yn && (e = yn(e)), e.persist = Zo, e.isPropagationStopped = Go, e.isDefaultPrevented = Yo, e.nativeEvent = e;
620
+ R.event = function(e) {
621
+ return wn && (e = wn(e)), e.persist = Jo, e.isPropagationStopped = Xo, e.isDefaultPrevented = ei, e.nativeEvent = e;
622
622
  };
623
- var Qt, Ko = { enumerable: !1, configurable: !0, get: function() {
623
+ var Gt, ti = { enumerable: !1, configurable: !0, get: function() {
624
624
  return this.class;
625
- } }, xn = M.vnode;
626
- M.vnode = function(e) {
625
+ } }, Cn = R.vnode;
626
+ R.vnode = function(e) {
627
627
  typeof e.type == "string" && function(t) {
628
628
  var n = t.props, r = t.type, o = {};
629
629
  for (var i in n) {
630
630
  var s = n[i];
631
- if (!(i === "value" && "defaultValue" in n && s == null || Qo && i === "children" && r === "noscript" || i === "class" || i === "className")) {
631
+ if (!(i === "value" && "defaultValue" in n && s == null || Yo && i === "children" && r === "noscript" || i === "class" || i === "className")) {
632
632
  var d = i.toLowerCase();
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" || Wo(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : zo.test(i) ? i = d : r.indexOf("-") === -1 && Vo.test(i) ? i = i.replace($o, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
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" || Ko(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : Zo.test(i) ? i = d : r.indexOf("-") === -1 && Wo.test(i) ? i = i.replace(Go, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
634
634
  }
635
635
  }
636
- r == "select" && o.multiple && Array.isArray(o.value) && (o.value = ke(n.children).forEach(function(l) {
636
+ r == "select" && o.multiple && Array.isArray(o.value) && (o.value = we(n.children).forEach(function(l) {
637
637
  l.props.selected = o.value.indexOf(l.props.value) != -1;
638
- })), r == "select" && o.defaultValue != null && (o.value = ke(n.children).forEach(function(l) {
638
+ })), r == "select" && o.defaultValue != null && (o.value = we(n.children).forEach(function(l) {
639
639
  l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
640
- })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", Ko)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
641
- }(e), e.$$typeof = Er, xn && xn(e);
640
+ })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", ti)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
641
+ }(e), e.$$typeof = Tr, Cn && Cn(e);
642
642
  };
643
- var kn = M.__r;
644
- M.__r = function(e) {
645
- kn && kn(e), Qt = e.__c;
643
+ var Sn = R.__r;
644
+ R.__r = function(e) {
645
+ Sn && Sn(e), Gt = e.__c;
646
646
  };
647
- var wn = M.diffed;
648
- M.diffed = function(e) {
649
- wn && wn(e);
647
+ var En = R.diffed;
648
+ R.diffed = function(e) {
649
+ En && En(e);
650
650
  var t = e.props, n = e.__e;
651
- n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Qt = null;
651
+ n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Gt = null;
652
652
  };
653
- var Tr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
654
- return Qt.__n[e.__c].props.value;
653
+ var Dr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
654
+ return Gt.__n[e.__c].props.value;
655
655
  } } } };
656
- function Lr(e) {
656
+ function Pr(e) {
657
657
  return de.bind(null, e);
658
658
  }
659
- function Ge(e) {
660
- return !!e && e.$$typeof === Er;
659
+ function Ye(e) {
660
+ return !!e && e.$$typeof === Tr;
661
661
  }
662
- function Nr(e) {
663
- return Ge(e) && e.type === ee;
662
+ function Rr(e) {
663
+ return Ye(e) && e.type === ne;
664
664
  }
665
- function Dr(e) {
666
- return Ge(e) ? Mo.apply(null, arguments) : e;
665
+ function Mr(e) {
666
+ return Ye(e) ? Bo.apply(null, arguments) : e;
667
667
  }
668
- function Wt(e) {
668
+ function Yt(e) {
669
669
  return !!e.__k && (He(null, e), !0);
670
670
  }
671
- function Pr(e) {
671
+ function Or(e) {
672
672
  return e && (e.base || e.nodeType === 1 && e) || null;
673
673
  }
674
- var Rr = function(e, t) {
674
+ var Ur = function(e, t) {
675
675
  return e(t);
676
- }, Mr = function(e, t) {
676
+ }, Hr = function(e, t) {
677
677
  return e(t);
678
- }, Or = ee;
679
- function Zt(e) {
678
+ }, Br = ne;
679
+ function Kt(e) {
680
680
  e();
681
681
  }
682
- function Ur(e) {
682
+ function qr(e) {
683
683
  return e;
684
684
  }
685
- function Hr() {
686
- return [!1, Zt];
685
+ function Ar() {
686
+ return [!1, Kt];
687
687
  }
688
- var Br = Ze, qr = Ge;
689
- function Ar(e, t) {
690
- var n = t(), r = z({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
691
- return Ze(function() {
692
- o.__ = n, o.v = t, vt(o) && i({ h: o });
688
+ var Fr = Ge, Vr = Ye;
689
+ function zr(e, t) {
690
+ var n = t(), r = $({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
691
+ return Ge(function() {
692
+ o.__ = n, o.v = t, yt(o) && i({ h: o });
693
693
  }, [e, n, t]), Y(function() {
694
- return vt(o) && i({ h: o }), e(function() {
695
- vt(o) && i({ h: o });
694
+ return yt(o) && i({ h: o }), e(function() {
695
+ yt(o) && i({ h: o });
696
696
  });
697
697
  }, [e]), n;
698
698
  }
699
- function vt(e) {
699
+ function yt(e) {
700
700
  var t, n, r = e.v, o = e.__;
701
701
  try {
702
702
  var i = r();
@@ -705,15 +705,15 @@ function vt(e) {
705
705
  return !0;
706
706
  }
707
707
  }
708
- var Jo = { useState: z, useId: fr, useReducer: Ft, useEffect: Y, useLayoutEffect: Ze, useInsertionEffect: Br, useTransition: Hr, useDeferredValue: Ur, useSyncExternalStore: Ar, startTransition: Zt, useRef: J, useImperativeHandle: hr, useMemo: he, useCallback: De, useContext: gr, useDebugValue: Vt, version: "17.0.2", Children: yr, render: Ir, hydrate: jr, unmountComponentAtNode: Wt, createPortal: Sr, createElement: de, createContext: pr, createFactory: Lr, cloneElement: Dr, createRef: sr, Fragment: ee, isValidElement: Ge, isElement: qr, isFragment: Nr, findDOMNode: Pr, Component: me, PureComponent: st, memo: _r, forwardRef: $t, flushSync: Mr, unstable_batchedUpdates: Rr, StrictMode: Or, Suspense: $e, SuspenseList: Me, lazy: Cr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Tr };
709
- const Xo = Object.freeze(Object.defineProperty({ __proto__: null, Children: yr, Component: me, Fragment: ee, PureComponent: st, StrictMode: Or, Suspense: $e, SuspenseList: Me, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Tr, cloneElement: Dr, createContext: pr, createElement: de, createFactory: Lr, createPortal: Sr, createRef: sr, default: Jo, findDOMNode: Pr, flushSync: Mr, forwardRef: $t, hydrate: jr, isElement: qr, isFragment: Nr, isValidElement: Ge, lazy: Cr, memo: _r, render: Ir, startTransition: Zt, unmountComponentAtNode: Wt, unstable_batchedUpdates: Rr, useCallback: De, useContext: gr, useDebugValue: Vt, useDeferredValue: Ur, useEffect: Y, useErrorBoundary: function(e) {
710
- var t = Pe(we++, 10), n = z();
711
- return t.__ = e, W.componentDidCatch || (W.componentDidCatch = function(r, o) {
708
+ var ni = { useState: $, useId: _r, useReducer: $t, useEffect: Y, useLayoutEffect: Ge, useInsertionEffect: Fr, useTransition: Ar, useDeferredValue: qr, useSyncExternalStore: zr, startTransition: Kt, useRef: ee, useImperativeHandle: vr, useMemo: ge, useCallback: Pe, useContext: br, useDebugValue: Qt, version: "17.0.2", Children: wr, render: Lr, hydrate: Nr, unmountComponentAtNode: Yt, createPortal: jr, createElement: de, createContext: gr, createFactory: Pr, cloneElement: Mr, createRef: dr, Fragment: ne, isValidElement: Ye, isElement: Vr, isFragment: Rr, findDOMNode: Or, Component: he, PureComponent: lt, memo: kr, forwardRef: Zt, flushSync: Hr, unstable_batchedUpdates: Ur, StrictMode: Br, Suspense: Qe, SuspenseList: Me, lazy: Ir, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Dr };
709
+ const ri = Object.freeze(Object.defineProperty({ __proto__: null, Children: wr, Component: he, Fragment: ne, PureComponent: lt, StrictMode: Br, Suspense: Qe, SuspenseList: Me, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Dr, cloneElement: Mr, createContext: gr, createElement: de, createFactory: Pr, createPortal: jr, createRef: dr, default: ni, findDOMNode: Or, flushSync: Hr, forwardRef: Zt, hydrate: Nr, isElement: Vr, isFragment: Rr, isValidElement: Ye, lazy: Ir, memo: kr, render: Lr, startTransition: Kt, unmountComponentAtNode: Yt, unstable_batchedUpdates: Ur, useCallback: Pe, useContext: br, useDebugValue: Qt, useDeferredValue: qr, useEffect: Y, useErrorBoundary: function(e) {
710
+ var t = Re(Ce++, 10), n = $();
711
+ return t.__ = e, Z.componentDidCatch || (Z.componentDidCatch = function(r, o) {
712
712
  t.__ && t.__(r, o), n[1](r);
713
713
  }), [n[0], function() {
714
714
  n[1](void 0);
715
715
  }];
716
- }, useId: fr, useImperativeHandle: hr, useInsertionEffect: Br, useLayoutEffect: Ze, useMemo: he, useReducer: Ft, useRef: J, useState: z, useSyncExternalStore: Ar, useTransition: Hr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), Cn = (e) => {
716
+ }, useId: _r, useImperativeHandle: vr, useInsertionEffect: Fr, useLayoutEffect: Ge, useMemo: ge, useReducer: $t, useRef: ee, useState: $, useSyncExternalStore: zr, useTransition: Ar, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), In = (e) => {
717
717
  let t;
718
718
  const n = /* @__PURE__ */ new Set(), r = (s, d) => {
719
719
  const l = typeof s == "function" ? s(t) : s;
@@ -724,10 +724,10 @@ const Xo = Object.freeze(Object.defineProperty({ __proto__: null, Children: yr,
724
724
  }, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
725
725
  return t = e(r, o, i), i;
726
726
  };
727
- function ei(e) {
727
+ function oi(e) {
728
728
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
729
729
  }
730
- function ti(e) {
730
+ function ii(e) {
731
731
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
732
732
  var t = e.default;
733
733
  if (typeof t == "function") {
@@ -743,14 +743,14 @@ function ti(e) {
743
743
  } });
744
744
  }), n;
745
745
  }
746
- var Sn = { exports: {} }, bt = {};
747
- const Fr = ti(Xo);
748
- var En, In, jn, Tn, Ln = { exports: {} }, _t = {};
749
- function ni() {
750
- return In || (In = 1, Ln.exports = function() {
751
- if (En) return _t;
752
- En = 1;
753
- var e = Fr, t = typeof Object.is == "function" ? Object.is : function(l, u) {
746
+ var jn = { exports: {} }, xt = {};
747
+ const $r = ii(ri);
748
+ var Tn, Ln, Nn, Dn, Pn = { exports: {} }, kt = {};
749
+ function si() {
750
+ return Ln || (Ln = 1, Pn.exports = function() {
751
+ if (Tn) return kt;
752
+ Tn = 1;
753
+ var e = $r, t = typeof Object.is == "function" ? Object.is : function(l, u) {
754
754
  return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
755
755
  }, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
756
756
  function s(l) {
@@ -766,63 +766,63 @@ function ni() {
766
766
  var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(l, u) {
767
767
  return u();
768
768
  } : function(l, u) {
769
- var p = u(), c = n({ inst: { value: p, getSnapshot: u } }), m = c[0].inst, f = c[1];
769
+ var p = u(), c = n({ inst: { value: p, getSnapshot: u } }), g = c[0].inst, f = c[1];
770
770
  return o(function() {
771
- m.value = p, m.getSnapshot = u, s(m) && f({ inst: m });
771
+ g.value = p, g.getSnapshot = u, s(g) && f({ inst: g });
772
772
  }, [l, p, u]), r(function() {
773
- return s(m) && f({ inst: m }), l(function() {
774
- s(m) && f({ inst: m });
773
+ return s(g) && f({ inst: g }), l(function() {
774
+ s(g) && f({ inst: g });
775
775
  });
776
776
  }, [l]), i(p), p;
777
777
  };
778
- return _t.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, _t;
779
- }()), Ln.exports;
778
+ return kt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, kt;
779
+ }()), Pn.exports;
780
780
  }
781
- var ri = (Tn || (Tn = 1, Sn.exports = function() {
782
- if (jn) return bt;
783
- jn = 1;
784
- var e = Fr, t = ni(), n = typeof Object.is == "function" ? Object.is : function(l, u) {
781
+ var ai = (Dn || (Dn = 1, jn.exports = function() {
782
+ if (Nn) return xt;
783
+ Nn = 1;
784
+ var e = $r, t = si(), n = typeof Object.is == "function" ? Object.is : function(l, u) {
785
785
  return l === u && (l !== 0 || 1 / l == 1 / u) || l != l && u != u;
786
786
  }, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, s = e.useMemo, d = e.useDebugValue;
787
- return bt.useSyncExternalStoreWithSelector = function(l, u, p, c, m) {
787
+ return xt.useSyncExternalStoreWithSelector = function(l, u, p, c, g) {
788
788
  var f = o(null);
789
789
  if (f.current === null) {
790
- var g = { hasValue: !1, value: null };
791
- f.current = g;
792
- } else g = f.current;
790
+ var m = { hasValue: !1, value: null };
791
+ f.current = m;
792
+ } else m = f.current;
793
793
  f = s(function() {
794
- function b(k) {
794
+ function v(w) {
795
795
  if (!I) {
796
- if (I = !0, w = k, k = c(k), m !== void 0 && g.hasValue) {
797
- var E = g.value;
798
- if (m(E, k)) return y = E;
796
+ if (I = !0, k = w, w = c(w), g !== void 0 && m.hasValue) {
797
+ var E = m.value;
798
+ if (g(E, w)) return _ = E;
799
799
  }
800
- return y = k;
800
+ return _ = w;
801
801
  }
802
- if (E = y, n(w, k)) return E;
803
- var x = c(k);
804
- return m !== void 0 && m(E, x) ? E : (w = k, y = x);
802
+ if (E = _, n(k, w)) return E;
803
+ var x = c(w);
804
+ return g !== void 0 && g(E, x) ? E : (k = w, _ = x);
805
805
  }
806
- var w, y, I = !1, j = p === void 0 ? null : p;
806
+ var k, _, I = !1, j = p === void 0 ? null : p;
807
807
  return [function() {
808
- return b(u());
808
+ return v(u());
809
809
  }, j === null ? void 0 : function() {
810
- return b(j());
810
+ return v(j());
811
811
  }];
812
- }, [u, p, c, m]);
813
- var _ = r(l, f[0], f[1]);
812
+ }, [u, p, c, g]);
813
+ var b = r(l, f[0], f[1]);
814
814
  return i(function() {
815
- g.hasValue = !0, g.value = _;
816
- }, [_]), d(_), _;
817
- }, bt;
818
- }()), Sn.exports);
819
- const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
820
- const t = typeof e == "function" ? ((r) => r ? Cn(r) : Cn)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
821
- const l = ii(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
822
- return Vt(l), l;
815
+ m.hasValue = !0, m.value = b;
816
+ }, [b]), d(b), b;
817
+ }, xt;
818
+ }()), jn.exports);
819
+ const li = oi(ai), { useSyncExternalStoreWithSelector: di } = li, Rn = (e) => {
820
+ const t = typeof e == "function" ? ((r) => r ? In(r) : In)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
821
+ const l = di(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
822
+ return Qt(l), l;
823
823
  }(t, r, o);
824
824
  return Object.assign(n, t), n;
825
- }, Vr = (e) => e ? Nn(e) : Nn, si = 1, ai = 2, Gt = { eq: (e, t) => e == t, neq(e, t) {
825
+ }, Qr = (e) => e ? Rn(e) : Rn, ci = 1, ui = 2, Jt = { eq: (e, t) => e == t, neq(e, t) {
826
826
  return !this.eq(e, t);
827
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) {
828
828
  if (!Array.isArray(t)) return !1;
@@ -837,7 +837,7 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
837
837
  return n.includes(r);
838
838
  }, notcontains(e, t) {
839
839
  return !this.contains(e, t);
840
- } }, li = (e, t, n) => {
840
+ } }, pi = (e, t, n) => {
841
841
  switch (t) {
842
842
  case "videovoice":
843
843
  return !!(e && e.value);
@@ -860,36 +860,36 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
860
860
  default:
861
861
  return !0;
862
862
  }
863
- }, zr = (e, t) => {
863
+ }, Wr = (e, t) => {
864
864
  if (t === "matrix") {
865
865
  const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
866
866
  return r > 0 && r < n;
867
867
  }
868
868
  return !1;
869
- }, $r = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
869
+ }, Zr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
870
870
  if (t >= e.length || t < 0) return null;
871
871
  const i = e[t];
872
872
  let s = t + 1;
873
873
  const d = i.props.routingOptions || [];
874
874
  for (let p = 0; p < d.length; p++) {
875
- const { group: c, target: m } = d[p];
875
+ const { group: c, target: g } = d[p];
876
876
  if (!(c != null && c.length)) continue;
877
877
  const f = c[0];
878
878
  if (f.questionIndex === void 0 || f.questionIndex > r.length) continue;
879
- let g = Dn({ comparator: f.comparator, response: r[f.questionIndex], type: i.type, value: f.value });
880
- for (let _ = 1; _ < c.length; _ += 2) {
881
- const b = c[_], w = c[_ + 1], y = Dn({ comparator: w.comparator, response: r[w.questionIndex], type: e[w.questionIndex].type, value: w.value });
882
- b === si ? g && (g = y) : b === ai && (g || (g = y));
879
+ let m = Mn({ comparator: f.comparator, response: r[f.questionIndex], type: i.type, value: f.value });
880
+ for (let b = 1; b < c.length; b += 2) {
881
+ const v = c[b], k = c[b + 1], _ = Mn({ comparator: k.comparator, response: r[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
882
+ v === ci ? m && (m = _) : v === ui && (m || (m = _));
883
883
  }
884
- if (g) {
885
- s = m === -1 && n ? e.length - 1 : m;
884
+ if (m) {
885
+ s = g === -1 && n ? e.length - 1 : g;
886
886
  break;
887
887
  }
888
888
  }
889
889
  const l = e.findIndex((p) => p.type === "uploading");
890
890
  let u;
891
891
  return u = l > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= u || s === -1 || s !== null && s > u ? l > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? l : n ? e.length - 1 : null : s === -1 ? null : s;
892
- }, Dn = ({ comparator: e, response: t, type: n, value: r }) => {
892
+ }, Mn = ({ comparator: e, response: t, type: n, value: r }) => {
893
893
  if (e === "answered") switch (n) {
894
894
  case "texturlprompt":
895
895
  return t === void 0;
@@ -915,7 +915,7 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
915
915
  return !1;
916
916
  }
917
917
  if (e === "given_up") return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
918
- if (e === "partial") return n === "matrix" && zr(t, n);
918
+ if (e === "partial") return n === "matrix" && Wr(t, n);
919
919
  if (e === "skipped") switch (n) {
920
920
  case "texturlprompt":
921
921
  return t == null ? void 0 : t.skipped;
@@ -927,20 +927,19 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
927
927
  case "recordedtask":
928
928
  return "taskStatus" in t && t.taskStatus === "abandoned";
929
929
  case "open":
930
+ case "multipleselect":
930
931
  return t === null || (t == null ? void 0 : t.length) === 0;
931
932
  case "multiplechoice":
932
- return t === void 0;
933
- case "multipleselect":
934
- return (t == null ? void 0 : t.length) === 0;
933
+ return t == null;
935
934
  case "matrix":
936
- return Object.values(t).every((o) => o === null);
935
+ return t === null || Object.values(t).every((o) => o === null);
937
936
  case "rankorder":
938
937
  return t === null || Object.values(t).some((o) => o === null);
939
938
  default:
940
939
  return !1;
941
940
  }
942
- return Gt[e](t, r);
943
- }, di = (e) => {
941
+ return Jt[e](t, r);
942
+ }, mi = (e) => {
944
943
  var r, o, i;
945
944
  switch (e.type) {
946
945
  case "multipleselect":
@@ -976,7 +975,7 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
976
975
  return [1];
977
976
  }
978
977
  var t, n;
979
- }, ci = (e) => e in Gt, ui = (e) => typeof e == "object" && e !== null && "taskStatus" in e, pi = (e, t = []) => t.reduce((n, r) => {
978
+ }, hi = (e) => e in Jt, gi = (e) => typeof e == "object" && e !== null && "taskStatus" in e, fi = (e, t = []) => t.reduce((n, r) => {
980
979
  const { group: o, target: i } = r;
981
980
  if (!(o != null && o.length)) return [...n];
982
981
  const s = o.filter((d) => !!Number(d) || typeof d == "object" && d.questionIndex === e).map((d) => {
@@ -984,16 +983,16 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
984
983
  return { comparator: l, target: i, value: u };
985
984
  });
986
985
  return [...n, ...s];
987
- }, []), yt = /* @__PURE__ */ new Set(["thanks", "uploading"]), q = Vr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = Oe) => {
986
+ }, []), wt = /* @__PURE__ */ new Set(["thanks", "uploading"]), F = Qr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = Oe) => {
988
987
  const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: d } = r;
989
- await o(n), xt(r) || s({ event: "closed" }), To.info("SurveyClosing", { surveyId: r.surveyId }), tn.enable(), i({ initiator: rn.Closed, studyType: d });
988
+ await o(n), Ct(r) || s({ event: "closed" }), Po.info("SurveyClosing", { surveyId: r.surveyId }), on.enable(), i({ initiator: an.Closed, studyType: d });
990
989
  }, configureExitOnOverlayClick: () => {
991
990
  }, customMetadata: {}, destroy: async (n) => {
992
991
  const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: d } = t();
993
- r("survey.complete", d), await o(n), tn.enable(), i({ initiator: rn.Complete, studyType: s });
994
- }, endCard: { headline: "" }, envId: "", eventEmitFn: Ve.emit.bind(Ve), fadeout: async (n) => {
992
+ r("survey.complete", d), await o(n), on.enable(), i({ initiator: an.Complete, studyType: s });
993
+ }, endCard: { headline: "" }, envId: "", eventEmitFn: ze.emit.bind(ze), fadeout: async (n) => {
995
994
  const { eventEmitFn: r, headers: o, viewDocument: i } = t();
996
- return ot(o) ? Promise.resolve() : (r(ce.SurveyFadingOut), new Promise((s) => {
995
+ return st(o) ? Promise.resolve() : (r(ce.SurveyFadingOut), new Promise((s) => {
997
996
  const d = i.getElementById(n);
998
997
  d ? (d.addEventListener("transitionend", () => {
999
998
  s();
@@ -1003,33 +1002,33 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1003
1002
  const { cards: r, eventEmitFn: o, index: i } = t();
1004
1003
  o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
1005
1004
  }, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
1006
- var f, g, _;
1007
- const { cards: s, destroy: d, index: l, uploadProgress: u } = t(), p = r || ((f = u[n]) == null ? void 0 : f.isComplete), c = { ...u, [n]: { progressPct: p ? 100 : o || ((g = u[n]) == null ? void 0 : g.progressPct), isComplete: p, isSubmitted: i || ((_ = u[n]) == null ? void 0 : _.isSubmitted) } };
1005
+ var f, m, b;
1006
+ const { cards: s, destroy: d, index: l, uploadProgress: u } = t(), p = r || ((f = u[n]) == null ? void 0 : f.isComplete), c = { ...u, [n]: { progressPct: p ? 100 : o || ((m = u[n]) == null ? void 0 : m.progressPct), isComplete: p, isSubmitted: i || ((b = u[n]) == null ? void 0 : b.isSubmitted) } };
1008
1007
  if (e({ uploadProgress: c }), s[l].type !== "uploading") return;
1009
- const m = Object.entries(u).every(([b, w]) => !w.isSubmitted || w.isComplete || n == b && r);
1010
- if (m && l >= s.length - 1) return d(Oe);
1011
- e({ index: m ? l + 1 : l, uploadingCardViewed: !0 });
1008
+ const g = Object.entries(u).every(([v, k]) => !k.isSubmitted || k.isComplete || n == v && r);
1009
+ if (g && l >= s.length - 1) return d(Oe);
1010
+ e({ index: g ? l + 1 : l, uploadingCardViewed: !0 });
1012
1011
  }, 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) => {
1013
1012
  const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: u, uploadProgress: p, viewedCardCount: c } = t();
1014
1013
  e({ minScrollableHeight: void 0 });
1015
- const m = Array.isArray(n.data) ? n.data : [n.data], f = Date.now(), g = [...o], _ = { response: [], responseGroupUid: d, questionIndex: s };
1016
- let b = null;
1017
- const w = r.slice(0);
1018
- m.forEach((j, k) => {
1019
- const E = g[s + k], { type: x, ...R } = j, L = { ...R, answeredAt: f }, S = L.value;
1020
- ((v) => v && !yt.has(v.type))(E) && (E.value = S, E.secondaryValue = L.secondaryValue || null), _.response.push(L);
1021
- let h = S;
1022
- x !== "multipleselect" && x !== "multiplechoice" || S === null || (h = x === "multiplechoice" ? Object.values(S).find((v) => v !== !1) : S, x === "multipleselect" && (h = g[s + k].props.options.reduce((v, C) => (S[C.id] && v.push(C.value), v), []))), w[s + k] = h, b = $r({ cards: g, index: s + k, hasEndCard: !!n.endCard, uploadProgress: p, allResponses: w });
1023
- }), e({ allResponses: w }), (b === null || yt.has(g[b].type)) && (_.completedAt = f);
1024
- const y = l(_);
1025
- if (b === null) return void n.completeSurvey();
1026
- b && !yt.has(g[b].type) && y.finally(() => {
1027
- u({ event: "seen", index: b });
1014
+ const g = Array.isArray(n.data) ? n.data : [n.data], f = Date.now(), m = [...o], b = { response: [], responseGroupUid: d, questionIndex: s };
1015
+ let v = null;
1016
+ const k = r.slice(0);
1017
+ g.forEach((j, w) => {
1018
+ const E = m[s + w], { type: x, ...P } = j, D = { ...P, answeredAt: f }, T = D.value;
1019
+ ((y) => y && !wt.has(y.type))(E) && (E.value = T, E.secondaryValue = D.secondaryValue || null), b.response.push(D);
1020
+ let h = T;
1021
+ x !== "multipleselect" && x !== "multiplechoice" || T === null || (h = x === "multiplechoice" ? Object.values(T).find((y) => y !== !1) : T, x === "multipleselect" && (h = m[s + w].props.options.reduce((y, S) => (T[S.id] && y.push(S.value), y), []))), k[s + w] = h, v = Zr({ cards: m, index: s + w, hasEndCard: !!n.endCard, uploadProgress: p, allResponses: k });
1022
+ }), e({ allResponses: k }), (v === null || wt.has(m[v].type)) && (b.completedAt = f);
1023
+ const _ = l(b);
1024
+ if (v === null) return void n.completeSurvey();
1025
+ v && !wt.has(m[v].type) && _.finally(() => {
1026
+ u({ event: "seen", index: v });
1028
1027
  });
1029
- const I = g[b];
1030
- g[b] && i && i("survey.question", { qid: I.name, props: I.props }), e({ cards: g, hasViewedEmbed: !1, index: b, viewedCardCount: c + 1 });
1028
+ const I = m[v];
1029
+ m[v] && i && i("survey.question", { qid: I.name, props: I.props }), e({ cards: m, hasViewedEmbed: !1, index: v, viewedCardCount: c + 1 });
1031
1030
  }, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
1032
- }, recorderEventEmitter: Ve, resolveTrackedPromise: () => {
1031
+ }, recorderEventEmitter: ze, resolveTrackedPromise: () => {
1033
1032
  const { removeIframeIfReady: n } = t();
1034
1033
  e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
1035
1034
  }, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
@@ -1043,22 +1042,22 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1043
1042
  return n({ event: "seen", isNew: !0 });
1044
1043
  }, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
1045
1044
  const s = t();
1046
- if (!i || xt(s)) return;
1047
- const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(jt(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
1045
+ if (!i || Ct(s)) return;
1046
+ const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(Nt(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
1048
1047
  l.ok ? o.forEach((u, p) => {
1049
1048
  s.eventEmitFn(ce.QuestionAnswered, { ...u, questionIndex: r ? r + p : void 0, "survey.id": s.surveyId });
1050
- }) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(Pn(s, "submitResponse", l.error)));
1049
+ }) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(On(s, "submitResponse", l.error)));
1051
1050
  }, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
1052
1051
  const i = t();
1053
- if (xt(i)) return;
1052
+ if (Ct(i)) return;
1054
1053
  const { cards: s, index: d } = i;
1055
1054
  let l = r ?? d, u = s[l];
1056
1055
  for (; u; ) {
1057
- const p = { sid: i.surveyId, qid: u.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, c = await i.trackPromise(jt(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { method: "POST", headers: i.headers, body: JSON.stringify(p) }));
1058
- !c.ok && c.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", c.error), await i.trackPromise(Pn(i, "trackHistory", c.error)));
1059
- const m = s[l + 1];
1060
- if (!u.groupId || !(m != null && m.groupId) || m.groupId !== u.groupId) break;
1061
- l++, u = m, o = !1;
1056
+ const p = { sid: i.surveyId, qid: u.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, c = await i.trackPromise(Nt(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { method: "POST", headers: i.headers, body: JSON.stringify(p) }));
1057
+ !c.ok && c.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", c.error), await i.trackPromise(On(i, "trackHistory", c.error)));
1058
+ const g = s[l + 1];
1059
+ if (!u.groupId || !(g != null && g.groupId) || g.groupId !== u.groupId) break;
1060
+ l++, u = g, o = !1;
1062
1061
  }
1063
1062
  }, trackPromise: async (n) => {
1064
1063
  const { resolveTrackedPromise: r } = t();
@@ -1066,64 +1065,64 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1066
1065
  throw r(), o;
1067
1066
  });
1068
1067
  }, unresolvedRequestCount: 0, update: () => {
1069
- const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: u } = t(), p = o["userleap-platform"] === "web", c = ot(o), m = n[r], f = m.type === "matrix" && !(m.props.properties.displayMatrixAsAccordion || d);
1068
+ const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: u } = t(), p = o["userleap-platform"] === "web", c = st(o), g = n[r], f = g.type === "matrix" && !(g.props.properties.displayMatrixAsAccordion || d);
1070
1069
  e({ minScrollableHeight: void 0 }), setTimeout(() => {
1071
- var w, y, I;
1072
- !c && !d && ((w = s == null ? void 0 : s.setWidth) == null || w.call(s, Co));
1073
- const [g, _, b] = So(u, p && !d, c);
1074
- c ? (i(ce.SurveyHeight, { name: ce.SurveyHeight, contentFrameHeight: g, "survey.id": l }), i(ce.SurveyWidth, { name: ce.SurveyWidth, contentFrameWidth: _, "survey.id": l })) : ((y = s.setHeight) == null || y.call(s, g), e({ minScrollableHeight: b }), !d && f && ((I = s.setWidth) == null || I.call(s, _)));
1070
+ var k, _, I;
1071
+ !c && !d && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s, Io));
1072
+ const [m, b, v] = jo(u, p && !d, c);
1073
+ c ? (i(ce.SurveyHeight, { name: ce.SurveyHeight, contentFrameHeight: m, "survey.id": l }), i(ce.SurveyWidth, { name: ce.SurveyWidth, contentFrameWidth: b, "survey.id": l })) : ((_ = s.setHeight) == null || _.call(s, m), e({ minScrollableHeight: v }), !d && f && ((I = s.setWidth) == null || I.call(s, b)));
1075
1074
  }, 100);
1076
- }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), xt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, Pn = async (e, t, n) => {
1075
+ }, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), Ct = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, On = async (e, t, n) => {
1077
1076
  const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, u = l.documentElement, p = { 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: p, vid: o, envId: i };
1078
- (await jt(`${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);
1079
- }, Qr = (e) => de("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, de("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Wr = (e) => de("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, de("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), mi = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Wr, { className: "sprig-check" }) }), Rn = "250ms", hi = $t(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
1080
- const d = J(null), [l, u] = z(0), [p, c] = z("none"), [m, f] = z(!0);
1077
+ (await Nt(`${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);
1078
+ }, Gr = (e) => de("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, de("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Yr = (e) => de("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, de("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), vi = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Yr, { className: "sprig-check" }) }), Un = "250ms", bi = Zt(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
1079
+ const d = ee(null), [l, u] = $(0), [p, c] = $("none"), [g, f] = $(!0);
1081
1080
  return Y(() => {
1082
- var _;
1083
- const g = (_ = d.current) == null ? void 0 : _.getBoundingClientRect();
1084
- u(r && g ? g.height : 0);
1081
+ var b;
1082
+ const m = (b = d.current) == null ? void 0 : b.getBoundingClientRect();
1083
+ u(r && m ? m.height : 0);
1085
1084
  }, [r]), Y(() => {
1086
- !l && r || !m || f(!1), c(e && !m ? `height ${Rn} ease` : "none");
1087
- }, [e, m, 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(mi, { visible: i })] }), a(Qr, { className: "sprig-caret", style: { transitionDuration: e ? Rn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: p, height: l }, children: a("div", { ref: d, children: t }) })] });
1088
- }), Yt = ({ style: e, stroke: t = "black" }) => 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: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), H = (...e) => e.filter(Boolean).join(" "), ne = (e, t, n) => {
1085
+ !l && r || !g || f(!1), c(e && !g ? `height ${Un} ease` : "none");
1086
+ }, [e, g, 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(vi, { visible: i })] }), a(Gr, { className: "sprig-caret", style: { transitionDuration: e ? Un : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: p, height: l }, children: a("div", { ref: d, children: t }) })] });
1087
+ }), Xt = ({ style: e, stroke: t = "black" }) => 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: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), H = (...e) => e.filter(Boolean).join(" "), oe = (e, t, n) => {
1089
1088
  const r = t ? "--mobile" : "--desktop";
1090
1089
  return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
1091
- }, gi = (e, t) => `${e} ${e}__${t}`, oe = (e) => a("button", { ...e, className: H("ul-card-text__button", e.className), id: "ul-card-text__button" }), Zr = () => {
1092
- const { viewDocument: e } = q((r) => ({ viewDocument: r.viewDocument })), [t, n] = z(!1);
1090
+ }, _i = (e, t) => `${e} ${e}__${t}`, ie = (e) => a("button", { ...e, className: H("ul-card-text__button", e.className), id: "ul-card-text__button" }), Kr = () => {
1091
+ const { viewDocument: e } = F((r) => ({ viewDocument: r.viewDocument })), [t, n] = $(!1);
1093
1092
  return Y(() => {
1094
1093
  const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
1095
1094
  window.requestAnimationFrame(() => {
1096
- n(!!(r && Eo(r) && r.scrollHeight > r.offsetHeight));
1095
+ n(!!(r && To(r) && r.scrollHeight > r.offsetHeight));
1097
1096
  });
1098
1097
  });
1099
1098
  return r && o.observe(r), () => {
1100
1099
  r && o.disconnect();
1101
1100
  };
1102
1101
  }, [e]), t;
1103
- }, Mn = ({ 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, fi = () => {
1104
- 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 = he(() => () => t(Oe), [t]);
1102
+ }, Hn = ({ 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, yi = () => {
1103
+ const { cards: e, close: t, endCard: n, headers: r, index: o } = F((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = ge(() => () => t(Oe), [t]);
1105
1104
  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) => {
1106
1105
  d.key === "Enter" && s();
1107
1106
  }, 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" }) }) });
1108
- }, ue = ({ message: e, properties: t }) => {
1109
- const n = J(null), r = t == null ? void 0 : t.captionText, o = Zr();
1110
- return a("div", { className: H("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(Mn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(fi, {})] }), a(Mn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
1111
- }, vi = () => a("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), ct = ({ isSubmitDisabled: e, handleSubmit: t }) => a("div", { className: "ul-card-longform__submit-button-container", children: a(oe, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", a(vi, {})] }) }), On = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), be = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1107
+ }, pe = ({ message: e, properties: t }) => {
1108
+ const n = ee(null), r = t == null ? void 0 : t.captionText, o = Kr();
1109
+ return a("div", { className: H("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(Hn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(yi, {})] }), a(Hn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
1110
+ }, xi = () => a("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), pt = ({ isSubmitDisabled: e, handleSubmit: t }) => a("div", { className: "ul-card-longform__submit-button-container", children: a(ie, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", a(xi, {})] }) }), Bn = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), _e = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
1112
1111
  var c;
1113
- const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = q((m) => ({ handleClickEmbedButton: m.handleClickEmbedButton, hasViewedEmbed: m.hasViewedEmbed, headers: m.headers, useDesktopPrototype: m.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < Io, u = i["userleap-platform"], p = (m, f) => {
1114
- m.preventDefault(), r(f);
1112
+ const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = F((g) => ({ handleClickEmbedButton: g.handleClickEmbedButton, hasViewedEmbed: g.hasViewedEmbed, headers: g.headers, useDesktopPrototype: g.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < Lo, u = i["userleap-platform"], p = (g, f) => {
1113
+ g.preventDefault(), r(f);
1115
1114
  };
1116
1115
  if (!s && l && !o && d && ["email", "link"].includes(u)) {
1117
- if (t === "prototype") return a(On, { handleClick: (m) => {
1118
- p(m, "question.prototype.click");
1116
+ if (t === "prototype") return a(Bn, { handleClick: (g) => {
1117
+ p(g, "question.prototype.click");
1119
1118
  } });
1120
- if (t === "pdf") return a(On, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (m) => {
1121
- p(m, "question.agreement.click");
1119
+ if (t === "pdf") return a(Bn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (g) => {
1120
+ p(g, "question.agreement.click");
1122
1121
  } });
1123
1122
  }
1124
1123
  return e();
1125
- }, Gr = ({ 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(Wr, {}) }), Yr = (e, t) => {
1126
- const n = J(0);
1124
+ }, Jr = ({ isSelected: e, id: t, divId: n, themeColor: r, disabled: o = !1 }) => a("div", { "aria-checked": e, "aria-disabled": o, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: { ...e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, ...o ? { opacity: 0.5 } : {} }, tabIndex: o ? -1 : 0, children: e && a(Yr, {}) }), Xr = (e, t) => {
1125
+ const n = ee(0);
1127
1126
  return () => {
1128
1127
  if (e.current) {
1129
1128
  const r = e.current;
@@ -1132,280 +1131,297 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1132
1131
  n.current !== s && t(), n.current = s, r.style.height = `${s}px`;
1133
1132
  }
1134
1133
  };
1135
- }, ut = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: u, error: p, allowTextEntry: c, noneOfTheAbove: m, promptText: f, onUserInputChanged: g }) => {
1136
- const { styleNonce: _, viewDocument: b } = q((v) => ({ styleNonce: v.styleNonce, viewDocument: v.viewDocument })), [w, y] = z(!1);
1137
- _i(b, t, _);
1138
- const I = ({ isSelected: v, userText: C }) => {
1139
- g && g({ id: d, selected: v, value: i, userText: C, noneOfTheAbove: m });
1140
- }, j = (v) => {
1141
- v.stopPropagation(), I({ isSelected: l || !o, userText: s }), y(!1);
1142
- }, k = () => {
1143
- w || y(!0);
1134
+ }, mt = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: u, error: p, allowTextEntry: c, noneOfTheAbove: g, promptText: f, disabled: m = !1, onUserInputChanged: b }) => {
1135
+ const { styleNonce: v, viewDocument: k } = F((S) => ({ styleNonce: S.styleNonce, viewDocument: S.viewDocument })), [_, I] = $(!1);
1136
+ wi(k, t, v);
1137
+ const j = ({ isSelected: S, userText: N }) => {
1138
+ b && b({ id: d, selected: S, value: i, userText: N, noneOfTheAbove: g });
1139
+ }, w = (S) => {
1140
+ m || (S.stopPropagation(), j({ isSelected: l || !o, userText: s }), I(!1));
1144
1141
  }, E = () => {
1145
- w && y(!1);
1146
- }, x = { onClick: (v) => j(v), onKeyPress: (v) => ((C) => {
1147
- C.key !== "Enter" && C.key !== " " || j(C);
1148
- })(v) };
1149
- "ontouchstart" in b.documentElement ? (x.onTouchStart = E, x.onTouchCancel = E, x.onTouchEnd = E) : (x.onMouseDown = k, x.onMouseLeave = E);
1150
- const R = l ? `radio-${d}` : `checkbox-${d}`, L = o || w ? [tt] : [], S = [...p ? [Kr] : [], ...L], h = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
1151
- return a("div", { className: H(ne("choice", u), ...S), id: `choice-div-${d}`, style: { ...n, ...p ? { borderColor: Fe } : {} }, ...x, children: [a("div", { className: H("choice-label-container"), children: [l ? a("div", { ...h, className: H("select-radio", ...L), id: R, role: "radio", tabIndex: 0 }) : a(Gr, { divId: R, id: d, isSelected: o, themeColor: t }), r && a("label", { className: H(ne("select-label", u)), htmlFor: R, id: `label-${d}`, children: r })] }), c && o && a("div", { className: H("choice-text-entry-container", ...L), children: a(bi, { onTextChange: (v) => I({ isSelected: o, userText: v }), promptText: f || "Please specify", textValue: s, useMobileStyling: u }) })] });
1152
- }, bi = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1153
- const o = J(null), { update: i } = q((d) => ({ update: d.update })), s = Yr(o, () => i());
1142
+ _ || I(!0);
1143
+ }, x = () => {
1144
+ _ && I(!1);
1145
+ }, P = { onClick: (S) => w(S), onKeyPress: (S) => ((N) => {
1146
+ m || N.key !== "Enter" && N.key !== " " || w(N);
1147
+ })(S) };
1148
+ "ontouchstart" in k.documentElement ? (P.onTouchStart = x, P.onTouchCancel = x, P.onTouchEnd = x) : (P.onMouseDown = E, P.onMouseLeave = x);
1149
+ const D = l ? `radio-${d}` : `checkbox-${d}`, T = o || _ ? [rt] : [], h = [...p ? [eo] : [], ...T, ...m ? ["ul-choice-disabled"] : []], y = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
1150
+ return a("div", { className: H(oe("choice", u), ...h), id: `choice-div-${d}`, style: { ...n, ...p ? { borderColor: Ve } : {}, ...m ? { opacity: 0.5, cursor: "not-allowed" } : {} }, ...m ? {} : P, "aria-disabled": m, children: [a("div", { className: H("choice-label-container"), children: [l ? a("div", { ...y, className: H("select-radio", ...T), id: D, role: "radio", tabIndex: 0 }) : a(Jr, { disabled: m, divId: D, id: d, isSelected: o, themeColor: t }), r && a("label", { className: H(oe("select-label", u)), htmlFor: D, id: `label-${d}`, children: r })] }), c && o && a("div", { className: H("choice-text-entry-container", ...T), children: a(ki, { onTextChange: (S) => j({ isSelected: o, userText: S }), promptText: f || "Please specify", textValue: s, useMobileStyling: u }) })] });
1151
+ }, ki = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
1152
+ const o = ee(null), { update: i } = F((d) => ({ update: d.update })), s = Xr(o, () => i());
1154
1153
  return Y(() => (s(), o.current && o.current.focus(), () => {
1155
1154
  i();
1156
- }), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: H(ne("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
1155
+ }), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: H(oe("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
1157
1156
  s(), d.stopPropagation(), n(d.currentTarget.value);
1158
1157
  }, onClick: (d) => {
1159
1158
  d.stopPropagation();
1160
1159
  }, onKeyPress: (d) => {
1161
1160
  d.stopPropagation();
1162
1161
  }, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
1163
- }, Un = "ul-select-style-element", tt = "ul-select-active-dynamic-style", Kr = "ul-select-error-dynamic-style", _i = (e, t, n) => {
1164
- let r = e.getElementById(Un), o = !1;
1165
- r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = Un, n && (r.nonce = n), r.textContent = yi(t), o && e.head.appendChild(r));
1166
- }, yi = (e) => `
1167
- .${tt} {
1162
+ }, qn = "ul-select-style-element", rt = "ul-select-active-dynamic-style", eo = "ul-select-error-dynamic-style", wi = (e, t, n) => {
1163
+ let r = e.getElementById(qn), o = !1;
1164
+ r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = qn, n && (r.nonce = n), r.textContent = Ci(t), o && e.head.appendChild(r));
1165
+ }, Ci = (e) => `
1166
+ .${rt} {
1168
1167
  border-color: ${e};
1169
1168
  }
1170
- .${tt} .select-radio, .${tt}.select-radio {
1169
+ .${rt} .select-radio, .${rt}.select-radio {
1171
1170
  border: 6px solid ${e};
1172
1171
  box-shadow: none;
1173
1172
  }
1174
- .${Kr} {
1175
- border-color: ${Fe};
1173
+ .${eo} {
1174
+ border-color: ${Ve};
1176
1175
  }
1177
- `, _e = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), Ce = ({ children: e }) => {
1178
- const t = Zr();
1176
+ `, ye = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), Se = ({ children: e }) => {
1177
+ const t = Kr();
1179
1178
  return a("div", { className: H("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
1180
- }, Jr = ({ 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" })] }), Xr = ({ forceBrandedLogo: e, marketingUrlLink: t }) => a("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: t, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(Jr, { logoOnly: !1 }), e && a(Yt, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }), eo = ({ marketingUrlLink: e }) => a("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(Jr, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(Yt, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }), Ee = (e) => (e == null ? void 0 : e.buttonText) || "Next", Kt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", to = ({ marketingUrl: e, slugName: t, surveyId: n, forceBrandedLogo: r }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r ? "&utm_term=poweredby_pill" : ""}`, xi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1181
- const { useMobileStyling: s, border: d, isLongFormSurvey: l, focusedQuestionId: u } = q((v) => ({ useMobileStyling: v.useMobileStyling, border: v.border, isLongFormSurvey: le(v.studyType), focusedQuestionId: v.focusedQuestionId })), [p, c] = z(!1), [m, f] = z(""), [g, _] = z(!1), b = l && u === o, w = r == null ? void 0 : r.collectName, y = (r == null ? void 0 : r.nameLabelText) || "Full Name", I = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", j = (r == null ? void 0 : r.submitButtonText) || "Submit", k = !!m.trim(), E = p && (!w || k), x = (v, C = !1) => {
1182
- v.preventDefault(), v.stopPropagation();
1183
- let T = null;
1184
- if (!C) {
1185
- if (!E) return void _(!0);
1186
- T = { submitted: !0 }, w && (T.name = m);
1179
+ }, to = ({ logoOnly: e = !1, style: t = {} }) => a("svg", { alt: (e ? "Powered by " : "") + "Sprig", fill: "none", height: "15", style: { display: "block", ...t }, viewBox: e ? "79 0 31 15" : "0 0 112 15", width: e ? "35" : "112", xmlns: "http://www.w3.org/2000/svg", 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" })] }), no = ({ forceBrandedLogo: e, marketingUrlLink: t }) => a("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: t, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(to, { logoOnly: !1 }), e && a(Xt, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }), ro = ({ marketingUrlLink: e }) => a("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(to, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(Xt, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }), Ie = (e) => (e == null ? void 0 : e.buttonText) || "Next", en = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", oo = ({ marketingUrl: e, slugName: t, surveyId: n, forceBrandedLogo: r }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r ? "&utm_term=poweredby_pill" : ""}`, Si = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1180
+ const { useMobileStyling: s, border: d, isLongFormSurvey: l, focusedQuestionId: u } = F((y) => ({ useMobileStyling: y.useMobileStyling, border: y.border, isLongFormSurvey: le(y.studyType), focusedQuestionId: y.focusedQuestionId })), [p, c] = $(!1), [g, f] = $(""), [m, b] = $(!1), v = l && u === o, k = r == null ? void 0 : r.collectName, _ = (r == null ? void 0 : r.nameLabelText) || "Full Name", I = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", j = (r == null ? void 0 : r.submitButtonText) || "Submit", w = !!g.trim(), E = p && (!k || w), x = (y, S = !1) => {
1181
+ y.preventDefault(), y.stopPropagation();
1182
+ let N = null;
1183
+ if (!S) {
1184
+ if (!E) return void b(!0);
1185
+ N = { submitted: !0 }, k && (N.name = g);
1187
1186
  }
1188
- n({ value: T, questionId: o, type: i }, E);
1189
- }, R = (v) => {
1190
- v.preventDefault(), v.stopPropagation(), f(v.currentTarget.value);
1191
- }, L = (v) => {
1192
- v.currentTarget.style.borderColor = g && !k ? Fe : d;
1193
- }, S = (v) => {
1194
- v.currentTarget.style.borderColor = g && !k ? Fe : Bt;
1195
- }, h = () => a(Ce, { children: [a("div", { className: "sprig-stretch", children: [a(ut, { allowTextEntry: !1, border: d, error: g && !p, id: "consent", isRadio: !1, isSelected: p, label: I, onUserInputChanged: ({ selected: v }) => {
1196
- v !== p && c(!p);
1197
- }, useMobileStyling: s }), w && a("input", { "aria-label": y, "aria-placeholder": y, className: H(ne("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: S, onFocus: L, onInput: R, placeholder: y, style: g && !k ? { borderColor: Fe } : {}, tabIndex: 0, value: m })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(oe, { className: E ? "" : "sprig-button-disabled", onClick: x, children: j }), r.required === !1 && !l && a("button", { className: "ul-card-skip__button", onClick: (v) => x(v, !0), children: Kt(r) })] })] });
1198
- return a("div", { className: H(e, l && !b && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [a(ue, { message: t, properties: { questionHtml: r.questionHtml } }), a(ee, { children: [r != null && r.richTextBody ? a(_e, { 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(be, { properties: r, defaultBody: h, embeddedType: "pdf" })] })] }, o);
1199
- }, ki = ({ icon: e, scaleLabelType: t, value: n, selectedValue: r }) => {
1187
+ n({ value: N, questionId: o, type: i }, E);
1188
+ }, P = (y) => {
1189
+ y.preventDefault(), y.stopPropagation(), f(y.currentTarget.value);
1190
+ }, D = (y) => {
1191
+ y.currentTarget.style.borderColor = m && !w ? Ve : d;
1192
+ }, T = (y) => {
1193
+ y.currentTarget.style.borderColor = m && !w ? Ve : Ft;
1194
+ }, h = () => a(Se, { children: [a("div", { className: "sprig-stretch", children: [a(mt, { allowTextEntry: !1, border: d, error: m && !p, id: "consent", isRadio: !1, isSelected: p, label: I, onUserInputChanged: ({ selected: y }) => {
1195
+ y !== p && c(!p);
1196
+ }, useMobileStyling: s }), k && a("input", { "aria-label": _, "aria-placeholder": _, className: H(oe("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: T, onFocus: D, onInput: P, placeholder: _, style: m && !w ? { borderColor: Ve } : {}, tabIndex: 0, value: g })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(ie, { className: E ? "" : "sprig-button-disabled", onClick: x, children: j }), r.required === !1 && !l && a("button", { className: "ul-card-skip__button", onClick: (y) => x(y, !0), children: en(r) })] })] });
1197
+ return a("div", { className: H(e, l && !v && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [a(pe, { message: t, properties: { questionHtml: r.questionHtml } }), a(ne, { children: [r != null && r.richTextBody ? a(ye, { 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(_e, { properties: r, defaultBody: h, embeddedType: "pdf" })] })] }, o);
1198
+ }, Ei = ({ icon: e, scaleLabelType: t, value: n, selectedValue: r }) => {
1200
1199
  if (t === "smiley" && n === r) {
1201
1200
  let o = 0;
1202
1201
  return e.replace(/black/g, () => ++o == 1 ? "black" : "white");
1203
1202
  }
1204
1203
  return e;
1205
- }, wi = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, selectedValue: d, setSelectedValue: l, setActiveValue: u, setIsPressed: p, useMobileStyling: c, value: m, viewDocument: f }) => {
1206
- const { isLongFormSurvey: g } = q((x) => ({ isLongFormSurvey: le(x.studyType) })), _ = `option-${m}`, b = s === "number", w = s === "star", y = s === "smiley", I = b && m === e || m === d, [j, k] = (() => {
1207
- const x = w && d !== null && m <= d;
1208
- return w && m <= e || y && m === e || x || m === e || m === d ? [t, r || x || m === d ? 1 : 0.3] : ["", 1];
1209
- })(), E = he(() => {
1210
- const x = { borderColor: I ? j : "", fillOpacity: I ? "" : k, zIndex: I ? 3 : "auto", color: d === m ? "#fff" : "" };
1211
- return b ? { ...x, backgroundColor: d === m ? j : "" } : { ...x, color: w || y || d === m ? j : "" };
1212
- }, [I, j, k, d, m, b, w, y]);
1213
- return a("button", { "aria-label": b ? void 0 : String(m), className: (() => {
1204
+ }, Ii = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, selectedValue: d, setSelectedValue: l, setActiveValue: u, setIsPressed: p, useMobileStyling: c, value: g, viewDocument: f }) => {
1205
+ const { isLongFormSurvey: m } = F((x) => ({ isLongFormSurvey: le(x.studyType) })), b = `option-${g}`, v = s === "number", k = s === "star", _ = s === "smiley", I = v && g === e || g === d, [j, w] = (() => {
1206
+ const x = k && d !== null && g <= d;
1207
+ return k && g <= e || _ && g === e || x || g === e || g === d ? [t, r || x || g === d ? 1 : 0.3] : ["", 1];
1208
+ })(), E = ge(() => {
1209
+ const x = { borderColor: I ? j : "", fillOpacity: I ? "" : w, zIndex: I ? 3 : "auto", color: d === g ? "#fff" : "" };
1210
+ return v ? { ...x, backgroundColor: d === g ? j : "" } : { ...x, color: k || _ || d === g ? j : "" };
1211
+ }, [I, j, w, d, g, v, k, _]);
1212
+ return a("button", { "aria-label": v ? void 0 : String(g), className: (() => {
1214
1213
  switch (s) {
1215
1214
  case "star":
1216
- return H(ne("likert-star", c), ne(`likert-star-${m}`, c));
1215
+ return H(oe("likert-star", c), oe(`likert-star-${g}`, c));
1217
1216
  case "smiley":
1218
- return H(ne("likert-smiley", c), ne(`likert-smiley-${m}`, c));
1217
+ return H(oe("likert-smiley", c), oe(`likert-smiley-${g}`, c));
1219
1218
  default:
1220
- return m === i ? H(ne("likert-number", c), ne(`likert-number-${m}`, c), ne("likert-last-option", c)) : H(ne("likert-number", c), ne(`likert-number-${m}`, c));
1219
+ return g === i ? H(oe("likert-number", c), oe(`likert-number-${g}`, c), oe("likert-last-option", c)) : H(oe("likert-number", c), oe(`likert-number-${g}`, c));
1221
1220
  }
1222
- })(), dangerouslySetInnerHTML: { __html: ki({ icon: n, scaleLabelType: s, value: m, selectedValue: d }) }, id: _, onClick: (x) => {
1223
- g && (x.preventDefault(), x.stopPropagation(), l(m)), o();
1221
+ })(), dangerouslySetInnerHTML: { __html: Ei({ icon: n, scaleLabelType: s, value: g, selectedValue: d }) }, id: b, onClick: (x) => {
1222
+ m && (x.preventDefault(), x.stopPropagation(), l(g)), o();
1224
1223
  }, onKeyDown: (x) => {
1225
- var S, h;
1226
- const R = f.querySelectorAll(`.likert-${s ?? "number"}`), L = m - 1;
1227
- x.key === "ArrowRight" ? (S = R[L + 1]) == null || S.focus() : x.key === "ArrowLeft" ? (h = R[L - 1]) == null || h.focus() : x.key !== "Enter" && x.key !== " " || (g && (x.preventDefault(), x.stopPropagation(), l(m)), o());
1228
- }, onPointerDown: () => p(!0), onPointerEnter: () => u(m), onPointerLeave: () => {
1224
+ var T, h;
1225
+ const P = f.querySelectorAll(`.likert-${s ?? "number"}`), D = g - 1;
1226
+ x.key === "ArrowRight" ? (T = P[D + 1]) == null || T.focus() : x.key === "ArrowLeft" ? (h = P[D - 1]) == null || h.focus() : x.key !== "Enter" && x.key !== " " || (m && (x.preventDefault(), x.stopPropagation(), l(g)), o());
1227
+ }, onPointerDown: () => p(!0), onPointerEnter: () => u(g), onPointerLeave: () => {
1229
1228
  u(-1), p(!1);
1230
1229
  }, style: E, tabIndex: 0 });
1231
- }, Ci = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
1232
- const { border: d, useMobileStyling: l, viewDocument: u, isLongFormSurvey: p, focusedQuestionId: c } = q((C) => ({ border: C.border, useMobileStyling: C.useMobileStyling, viewDocument: C.viewDocument, isLongFormSurvey: le(C.studyType), focusedQuestionId: C.focusedQuestionId })), [m, f] = z(-1), [g, _] = z(!1), [b, w] = z(null), y = p && c === i, I = t && t.left, j = t && t.right;
1233
- let k;
1234
- const { range: E, scaleLabelType: x, ratingIcons: R } = o;
1235
- E && (k = Number(E));
1236
- const L = k || 5, S = (C) => {
1237
- var T, D;
1230
+ }, ji = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
1231
+ const { border: d, useMobileStyling: l, viewDocument: u, isLongFormSurvey: p, focusedQuestionId: c } = F((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, viewDocument: S.viewDocument, isLongFormSurvey: le(S.studyType), focusedQuestionId: S.focusedQuestionId })), [g, f] = $(-1), [m, b] = $(!1), [v, k] = $(null), _ = p && c === i, I = t && t.left, j = t && t.right;
1232
+ let w;
1233
+ const { range: E, scaleLabelType: x, ratingIcons: P } = o;
1234
+ E && (w = Number(E));
1235
+ const D = w || 5, T = (S) => {
1236
+ var N, O;
1238
1237
  switch (x) {
1239
1238
  case "star":
1240
- return (T = R[0]) == null ? void 0 : T.svg;
1239
+ return (N = P[0]) == null ? void 0 : N.svg;
1241
1240
  case "smiley":
1242
- return (D = R[C]) == null ? void 0 : D.svg;
1241
+ return (O = P[S]) == null ? void 0 : O.svg;
1243
1242
  default:
1244
- return String(C + 1);
1243
+ return String(S + 1);
1245
1244
  }
1246
- }, h = [...Array(L)].map((C, T) => {
1247
- const D = T + 1;
1248
- return a(wi, { activeValue: m, border: d, icon: S(T), isPressed: g, onSubmit: () => r({ value: D, questionId: i, type: s }, !0), range: L, scaleLabelType: x, selectedValue: b, setActiveValue: f, setIsPressed: _, setSelectedValue: w, useMobileStyling: l, value: D, viewDocument: u }, T);
1249
- }), v = (C) => {
1250
- C.preventDefault(), C.stopPropagation(), r({ value: null, questionId: i, type: s }, !0);
1245
+ }, h = [...Array(D)].map((S, N) => {
1246
+ const O = N + 1;
1247
+ return a(Ii, { activeValue: g, border: d, icon: T(N), isPressed: m, onSubmit: () => r({ value: O, questionId: i, type: s }, !0), range: D, scaleLabelType: x, selectedValue: v, setActiveValue: f, setIsPressed: b, setSelectedValue: k, useMobileStyling: l, value: O, viewDocument: u }, N);
1248
+ }), y = (S) => {
1249
+ S.preventDefault(), S.stopPropagation(), r({ value: null, questionId: i, type: s }, !0);
1251
1250
  };
1252
- return a("form", { className: H(e, "ul-card--likert", "fade-in-transition", p && !y && "ul-card--unfocused"), children: [a(ue, { message: n, properties: o }), a(be, { properties: o, defaultBody: () => a(ee, { children: [a(_e, { children: [a("div", { "aria-label": `Rating (1 - ${L})`, className: "ul-card--likert__numbers", role: "radiogroup", children: h }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: I }), a("span", { children: j })] })] }), !o.required && !p && a(Ce, { children: a("div", { className: "ul-vertical-centered-container", children: a(oe, { onClick: v, children: Ee(o) }) }) })] }) })] }, i);
1253
- }, no = (e) => e && (e.scrollHeight > e.offsetHeight ? e : no(e.parentElement)), Si = (e) => {
1251
+ return a("form", { className: H(e, "ul-card--likert", "fade-in-transition", p && !_ && "ul-card--unfocused"), children: [a(pe, { message: n, properties: o }), a(_e, { properties: o, defaultBody: () => a(ne, { children: [a(ye, { children: [a("div", { "aria-label": `Rating (1 - ${D})`, className: "ul-card--likert__numbers", role: "radiogroup", children: h }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: I }), a("span", { children: j })] })] }), !o.required && !p && a(Se, { children: a("div", { className: "ul-vertical-centered-container", children: a(ie, { onClick: y, children: Ie(o) }) }) })] }) })] }, i);
1252
+ }, io = (e) => e && (e.scrollHeight > e.offsetHeight ? e : io(e.parentElement)), Ti = (e) => {
1254
1253
  if (!e || !((n) => n instanceof HTMLElement)(e)) return 0;
1255
1254
  const t = getComputedStyle(e);
1256
1255
  return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
1257
- }, Ei = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1258
- const o = J([]), { border: i, useMobileStyling: s } = q((m) => ({ border: m.border, useMobileStyling: m.useMobileStyling })), d = n.findIndex((m) => r[m.id] === null), [l, u] = z(d), p = De((m, f) => {
1259
- t(m, f);
1260
- const g = l + 1, _ = n[g];
1261
- if (_ && r[_.id] === null) {
1262
- u(g);
1263
- const b = o.current[l];
1264
- if (b != null && b.firstElementChild) {
1265
- const w = no(b), y = b.firstElementChild, I = Si(b) + y.clientHeight;
1266
- w == null || w.scrollTo(0, b.offsetTop + I);
1256
+ }, Li = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1257
+ const o = ee([]), { border: i, useMobileStyling: s } = F((g) => ({ border: g.border, useMobileStyling: g.useMobileStyling })), d = n.findIndex((g) => r[g.id] === null), [l, u] = $(d), p = Pe((g, f) => {
1258
+ t(g, f);
1259
+ const m = l + 1, b = n[m];
1260
+ if (b && r[b.id] === null) {
1261
+ u(m);
1262
+ const v = o.current[l];
1263
+ if (v != null && v.firstElementChild) {
1264
+ const k = io(v), _ = v.firstElementChild, I = Ti(v) + _.clientHeight;
1265
+ k == null || k.scrollTo(0, v.offsetTop + I);
1267
1266
  }
1268
1267
  }
1269
- }, [t, n, r, l]), c = De((m, f) => {
1270
- const g = l === m;
1271
- return a(hi, { animate: !0, header: f.label, isOpen: g, onClick: () => u(g && !window.UserLeap.isMobileSDK ? -1 : m), ref: (_) => {
1272
- _ && (o.current[m] = _);
1273
- }, showHeaderCheck: r[f.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((_) => a(ut, { allowTextEntry: !1, ariaLabel: `${f.label}-${_.label}`, border: i, error: !1, id: `${f.id}-${_.value}`, isRadio: !0, isSelected: r[f.id] === _.value, label: _.label, onUserInputChanged: () => p(f.id, _.value), useMobileStyling: s }, _.label)) }) }, f.id);
1268
+ }, [t, n, r, l]), c = Pe((g, f) => {
1269
+ const m = l === g;
1270
+ return a(bi, { animate: !0, header: f.label, isOpen: m, onClick: () => u(m && !window.UserLeap.isMobileSDK ? -1 : g), ref: (b) => {
1271
+ b && (o.current[g] = b);
1272
+ }, showHeaderCheck: r[f.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((b) => a(mt, { allowTextEntry: !1, ariaLabel: `${f.label}-${b.label}`, border: i, error: !1, id: `${f.id}-${b.value}`, isRadio: !0, isSelected: r[f.id] === b.value, label: b.label, onUserInputChanged: () => p(f.id, b.value), useMobileStyling: s }, b.label)) }) }, f.id);
1274
1273
  }, [i, e, l, p, r, s]);
1275
- return a("div", { children: n.map((m, f) => c(f, m)) });
1276
- }, Ii = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1277
- const { border: o, useMobileStyling: i, isLongFormSurvey: s } = q((g) => ({ border: g.border, useMobileStyling: g.useMobileStyling, isLongFormSurvey: le(g.studyType) })), d = n.length, l = e.length, u = J(null), [p, c] = z(!1), [m, f] = z(!1);
1274
+ return a("div", { children: n.map((g, f) => c(f, g)) });
1275
+ }, Ni = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
1276
+ const { border: o, useMobileStyling: i, isLongFormSurvey: s } = F((m) => ({ border: m.border, useMobileStyling: m.useMobileStyling, isLongFormSurvey: le(m.studyType) })), d = n.length, l = e.length, u = ee(null), [p, c] = $(!1), [g, f] = $(!1);
1278
1277
  return Y(() => {
1279
- const g = u.current, _ = new ResizeObserver((b) => {
1278
+ const m = u.current, b = new ResizeObserver((v) => {
1280
1279
  window.requestAnimationFrame(() => {
1281
- g && (c(Math.round(b[0].contentRect.width) < g.scrollWidth), f(Math.round(b[0].contentRect.width) < g.scrollWidth));
1280
+ m && (c(Math.round(v[0].contentRect.width) < m.scrollWidth), f(Math.round(v[0].contentRect.width) < m.scrollWidth));
1282
1281
  });
1283
1282
  });
1284
- return g && _.observe(g), () => {
1285
- g && _.unobserve(g);
1283
+ return m && b.observe(m), () => {
1284
+ m && b.unobserve(m);
1286
1285
  };
1287
1286
  }, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: H("ul-card--matrix_container", p && "ul-matrix-scroll-gradient"), onScroll: () => {
1288
1287
  (() => {
1289
- const g = u.current;
1290
- g && c(g.clientWidth + Math.abs(g.scrollLeft) < g.scrollWidth);
1288
+ const m = u.current;
1289
+ m && c(m.clientWidth + Math.abs(m.scrollLeft) < m.scrollWidth);
1291
1290
  })();
1292
- }, ref: u, children: a("div", { className: H(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${l}; --numRows: ${d + 1};`, children: [a("div", {}), " ", e.map((g) => a("div", { className: "ul-matrix-column-label", children: g.label }, g.label)), n.map((g) => a(ee, { children: [a("div", { "aria-label": g.label, className: "ul-matrix-row-label", children: g.label }, g.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((_, b) => a("div", { className: H("ul-matrix-option-wrapper", b === l - 1 && "ul-matrix-last-option"), children: a(ut, { allowTextEntry: !1, ariaLabel: `${g.label}-${_.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${g.id}-${_.value}`, isRadio: !0, isSelected: r[g.id] === _.value, onUserInputChanged: () => t(g.id, _.value), useMobileStyling: i }) }, _.value)) })] }))] }) }), (p || m) && a("button", { className: m && !p ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: m && !p ? (g) => {
1293
- g.preventDefault();
1294
- const _ = u.current;
1295
- if (_) {
1296
- const b = getComputedStyle(_).direction === "rtl";
1297
- _.scrollTo({ left: b ? _.scrollWidth - _.clientWidth : 0, behavior: "smooth" });
1291
+ }, ref: u, children: a("div", { className: H(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${l}; --numRows: ${d + 1};`, children: [a("div", {}), " ", e.map((m) => a("div", { className: "ul-matrix-column-label", children: m.label }, m.label)), n.map((m) => a(ne, { children: [a("div", { "aria-label": m.label, className: "ul-matrix-row-label", children: m.label }, m.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((b, v) => a("div", { className: H("ul-matrix-option-wrapper", v === l - 1 && "ul-matrix-last-option"), children: a(mt, { allowTextEntry: !1, ariaLabel: `${m.label}-${b.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${m.id}-${b.value}`, isRadio: !0, isSelected: r[m.id] === b.value, onUserInputChanged: () => t(m.id, b.value), useMobileStyling: i }) }, b.value)) })] }))] }) }), (p || g) && a("button", { className: g && !p ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: g && !p ? (m) => {
1292
+ m.preventDefault();
1293
+ const b = u.current;
1294
+ if (b) {
1295
+ const v = getComputedStyle(b).direction === "rtl";
1296
+ b.scrollTo({ left: v ? b.scrollWidth - b.clientWidth : 0, behavior: "smooth" });
1298
1297
  }
1299
- } : (g) => {
1300
- g.preventDefault();
1301
- const _ = u.current;
1302
- if (_) {
1303
- const b = getComputedStyle(_).direction === "rtl";
1304
- _.scrollTo({ left: b ? _.clientWidth - _.scrollWidth : _.scrollWidth, behavior: "smooth" });
1298
+ } : (m) => {
1299
+ m.preventDefault();
1300
+ const b = u.current;
1301
+ if (b) {
1302
+ const v = getComputedStyle(b).direction === "rtl";
1303
+ b.scrollTo({ left: v ? b.clientWidth - b.scrollWidth : b.scrollWidth, behavior: "smooth" });
1305
1304
  }
1306
- }, children: a(m && !p ? ji : Ti, {}) })] });
1307
- }, ji = () => a("svg", { fill: "currentColor", height: "32", transform: "matrix(-1,0,0,1,0,0)", version: "1.1", 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" }) }), Ti = () => 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" }) }), Li = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1308
- const { useMobileStyling: u, isLongFormSurvey: p, focusedQuestionId: c, setFocusedQuestionId: m } = q((x) => ({ useMobileStyling: x.useMobileStyling, isLongFormSurvey: le(x.studyType), focusedQuestionId: x.focusedQuestionId, setFocusedQuestionId: x.setFocusedQuestionId })), f = o.matrixColumn, g = o.required, _ = p && c === i, b = (x) => {
1309
- x.preventDefault(), x.stopPropagation(), n({ value: y, questionId: i, type: s }, !0), l && l();
1310
- }, w = r.reduce((x, R) => (x[R.id] = null, x), {}), [y, I] = z(w), j = (x) => g && Object.values(x).every((R) => R == null), k = (x, R) => {
1311
- p && n({ value: { ...y, [x]: R }, questionId: i, type: s }, !j({ ...y, [x]: R })), I((L) => ({ ...L, [x]: R }));
1305
+ }, children: a(g && !p ? Di : Pi, {}) })] });
1306
+ }, Di = () => a("svg", { fill: "currentColor", height: "32", transform: "matrix(-1,0,0,1,0,0)", version: "1.1", 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" }) }), Pi = () => 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" }) }), Ri = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1307
+ const { useMobileStyling: u, isLongFormSurvey: p, focusedQuestionId: c, setFocusedQuestionId: g } = F((x) => ({ useMobileStyling: x.useMobileStyling, isLongFormSurvey: le(x.studyType), focusedQuestionId: x.focusedQuestionId, setFocusedQuestionId: x.setFocusedQuestionId })), f = o.matrixColumn, m = o.required, b = p && c === i, v = (x) => {
1308
+ x.preventDefault(), x.stopPropagation(), n({ value: _, questionId: i, type: s }, !0), l && l();
1309
+ }, k = r.reduce((x, P) => (x[P.id] = null, x), {}), [_, I] = $(k), j = (x) => m && Object.values(x).every((P) => P == null), w = (x, P) => {
1310
+ p && n({ value: { ..._, [x]: P }, questionId: i, type: s }, !j({ ..._, [x]: P })), I((D) => ({ ...D, [x]: P }));
1312
1311
  }, E = o.displayMatrixAsAccordion || u;
1313
- return a("form", { className: H(e, !p && "ul-card__matrix", "fade-in-transition", p && !_ && "ul-card--unfocused"), id: "text-form", onClick: () => {
1314
- _ && m(i);
1315
- }, onSubmit: b, children: [a(ue, { message: t, properties: o }), a(be, { properties: o, defaultBody: () => a(ee, { children: [a(_e, { children: [a(E ? Ei : Ii, { columns: f, onSelect: k, options: r, selectedOptions: y }), d && a(ct, { handleSubmit: b, isSubmitDisabled: j(y) })] }), !p && a(Ce, { children: a("div", { className: "ul-card__button-wrapper", children: a(oe, { disabled: j(y), children: Ee(o) }) }) })] }) })] }, i);
1316
- }, Ni = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
1317
- const { themeColor: o } = q((i) => ({ doc: i.viewDocument, themeColor: i.border }));
1318
- return a("div", { className: "select-list", children: e.map((i) => {
1319
- return a("div", { className: "select-option", onClick: (d) => {
1320
- t(i), d.stopPropagation();
1321
- }, role: "option", children: [r && a(Gr, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
1322
- var s;
1323
- }) });
1324
- }, Di = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
1325
- const [s, d] = z(!1), { viewDocument: l, update: u } = q((m) => ({ viewDocument: m.viewDocument, update: m.update })), p = () => {
1326
- d(!s), u();
1312
+ return a("form", { className: H(e, !p && "ul-card__matrix", "fade-in-transition", p && !b && "ul-card--unfocused"), id: "text-form", onClick: () => {
1313
+ b && g(i);
1314
+ }, onSubmit: v, children: [a(pe, { message: t, properties: o }), a(_e, { properties: o, defaultBody: () => a(ne, { children: [a(ye, { children: [a(E ? Li : Ni, { columns: f, onSelect: w, options: r, selectedOptions: _ }), d && a(pt, { handleSubmit: v, isSubmitDisabled: j(_) })] }), !p && a(Se, { children: a("div", { className: "ul-card__button-wrapper", children: a(ie, { disabled: j(_), children: Ie(o) }) }) })] }) })] }, i);
1315
+ };
1316
+ var so = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(so || {}), Fe = ((e) => (e.Unlimited = "Unlimited", e.Maximum = "Maximum", e.Range = "Range", e))(Fe || {});
1317
+ const Mi = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r, disabledOptions: o, dropdownFooter: i }) => {
1318
+ const { themeColor: s } = F((d) => ({ doc: d.viewDocument, themeColor: d.border }));
1319
+ return a("div", { className: "select-list", children: [e.map((d) => {
1320
+ return a("div", { "aria-disabled": o == null ? void 0 : o.includes(d), className: H("select-option", o != null && o.includes(d) ? "ul-choice-disabled" : ""), onClick: (u) => {
1321
+ o != null && o.includes(d) || (t(d), u.stopPropagation());
1322
+ }, role: "option", style: { ...o != null && o.includes(d) ? { opacity: 0.5, cursor: "not-allowed" } : {} }, children: [r && a(Jr, { divId: (l = d.id, `checkbox-div-${l}`), id: d.id, isSelected: n.includes(d), themeColor: s }), d.label] }, d.id);
1323
+ var l;
1324
+ }), i] });
1325
+ }, Oi = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i, disabledOptions: s = [], dropdownFooter: d }) => {
1326
+ const [l, u] = $(!1), { viewDocument: p, update: c } = F((m) => ({ viewDocument: m.viewDocument, update: m.update })), g = () => {
1327
+ u(!l), c();
1327
1328
  };
1328
1329
  Y(() => {
1329
- var f;
1330
- const m = () => {
1331
- d(!1), u();
1330
+ var b;
1331
+ const m = (v) => {
1332
+ const k = v.target;
1333
+ (k == null ? void 0 : k.closest(".select-option.ul-choice-disabled")) || (u(!1), c());
1332
1334
  };
1333
- l.addEventListener("click", m);
1335
+ p.addEventListener("click", m);
1334
1336
  try {
1335
- (f = window.parent) == null || f.addEventListener("click", m);
1337
+ (b = window.parent) == null || b.addEventListener("click", m);
1336
1338
  } catch {
1337
1339
  window.addEventListener("click", m);
1338
1340
  }
1339
1341
  return () => {
1340
- var g;
1341
- l.removeEventListener("click", m);
1342
+ var v;
1343
+ p.removeEventListener("click", m);
1342
1344
  try {
1343
- (g = window.parent) == null || g.removeEventListener("click", m);
1345
+ (v = window.parent) == null || v.removeEventListener("click", m);
1344
1346
  } catch {
1345
1347
  window.removeEventListener("click", m);
1346
1348
  }
1347
1349
  };
1348
- }, [l, u]);
1349
- const c = i.length === 0 ? ["select-button-placeholder"] : [];
1350
- return a(ee, { children: [a("button", { "aria-label": "choice dropdown button", className: H("select-button", ...c), onClick: (m) => {
1351
- m.stopPropagation(), p();
1352
- }, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Qr, {})] }), s && a(Ni, { options: r, selectedOptions: i, selectItem: (m) => {
1353
- var _;
1354
- const f = i.some((b) => b.id === m.id), g = i.some((b) => {
1355
- var w;
1356
- return (w = b.optionProperties) == null ? void 0 : w.noneOfTheAbove;
1350
+ }, [p, c]);
1351
+ const f = i.length === 0 ? ["select-button-placeholder"] : [];
1352
+ return a(ne, { children: [a("button", { "aria-label": "choice dropdown button", className: H("select-button", ...f), onClick: (m) => {
1353
+ m.stopPropagation(), g();
1354
+ }, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Gr, {})] }), l && a(Mi, { disabledOptions: s, dropdownFooter: d, options: r, selectedOptions: i, selectItem: (m) => {
1355
+ var k;
1356
+ const b = i.some((_) => _.id === m.id), v = i.some((_) => {
1357
+ var I;
1358
+ return (I = _.optionProperties) == null ? void 0 : I.noneOfTheAbove;
1357
1359
  });
1358
- (_ = m.optionProperties) != null && _.noneOfTheAbove && !f ? n([m]) : e ? n(f ? i.filter((b) => b.id !== m.id) : g ? [m] : [...i, m]) : f || n([m]), e || p();
1360
+ (k = m.optionProperties) != null && k.noneOfTheAbove && !b ? n([m]) : e ? n(b ? i.filter((_) => _.id !== m.id) : v ? [m] : [...i, m]) : b || n([m]), e || g();
1359
1361
  }, showCheckbox: e })] });
1360
- }, ro = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1361
- const { border: u, useMobileStyling: p, isLongFormSurvey: c, focusedQuestionId: m, setFocusedQuestionId: f } = q((h) => ({ border: h.border, useMobileStyling: h.useMobileStyling, isLongFormSurvey: le(h.studyType), focusedQuestionId: h.focusedQuestionId, setFocusedQuestionId: h.setFocusedQuestionId })), g = c && m === i, _ = r.reduce((h, v) => (h[v.id] = { isSelected: !1 }, h), {}), [b, w] = z(_), y = s === "multiplechoice", I = o.required, j = r.find((h) => {
1362
- var v;
1363
- return (v = h.optionProperties) == null ? void 0 : v.noneOfTheAbove;
1364
- }), k = (h) => ((v) => Object.entries(v).some(([C, T]) => {
1365
- var P;
1366
- const D = r.find((O) => `${O.id}` === C), N = T.userText === void 0 || T.userText.trim() === "";
1367
- return ((P = D == null ? void 0 : D.optionProperties) == null ? void 0 : P.allowsTextEntry) && N && T.isSelected;
1368
- }))(h) || I && !((v) => Object.values(v).some((C) => C.isSelected))(h), E = Object.entries(b).some(([h, v]) => {
1369
- var C, T;
1370
- return v.isSelected && ((T = (C = r.find((D) => `${D.id}` === h)) == null ? void 0 : C.optionProperties) == null ? void 0 : T.allowsTextEntry);
1371
- }), x = d && (!y || E), R = r.map(({ id: h, label: v, value: C, optionProperties: T }) => {
1372
- var O, V;
1373
- const D = `${h}`, { allowsTextEntry: N, noneOfTheAbove: P } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...T };
1374
- return a(ut, { allowTextEntry: N, border: u, error: !1, id: D, isRadio: y, isSelected: !!((O = b[D]) != null && O.isSelected), label: v, noneOfTheAbove: P, onUserInputChanged: (F) => {
1375
- S(F.id, F.selected, F.userText, F.noneOfTheAbove), F.selected && c && !y && !g && f(i);
1376
- }, promptText: "Please specify", text: (V = b[h]) == null ? void 0 : V.userText, useMobileStyling: p, value: C }, D);
1377
- }), L = (h) => {
1378
- h.preventDefault(), h.stopPropagation(), n(b, !0), l && l();
1379
- }, S = (h, v, C, T) => {
1380
- const D = Object.assign({}, b);
1381
- if ((y || T) && v) for (const O of Object.values(D)) O.isSelected = !1, delete O.userText;
1382
- else j && !T && b[j.id].isSelected && (D[j.id].isSelected = !1);
1383
- D[h] = { isSelected: v, userText: C };
1384
- const N = y && Object.entries(D).some(([O, V]) => {
1385
- var F, Q;
1386
- return V.isSelected && ((Q = (F = r.find((Z) => `${Z.id}` === O)) == null ? void 0 : F.optionProperties) == null ? void 0 : Q.allowsTextEntry);
1387
- }), P = !k(D);
1388
- c && (n(D, P), y && !N && P && l && l()), w(D);
1362
+ }, ao = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s, showIndividualSubmit: d = !1, onSubmitButtonClick: l }) => {
1363
+ const { border: u, useMobileStyling: p, isLongFormSurvey: c, focusedQuestionId: g, setFocusedQuestionId: f } = F((C) => ({ border: C.border, useMobileStyling: C.useMobileStyling, isLongFormSurvey: le(C.studyType), focusedQuestionId: C.focusedQuestionId, setFocusedQuestionId: C.setFocusedQuestionId })), m = c && g === i, b = r.reduce((C, L) => (C[L.id] = { isSelected: !1 }, C), {}), [v, k] = $(b), _ = s === "multiplechoice", I = o.required, j = r.find((C) => {
1364
+ var L;
1365
+ return (L = C.optionProperties) == null ? void 0 : L.noneOfTheAbove;
1366
+ }), w = (C) => Object.entries(C).some(([L, M]) => {
1367
+ var z;
1368
+ const A = r.find((Q) => `${Q.id}` === L), q = M.userText === void 0 || M.userText.trim() === "";
1369
+ return ((z = A == null ? void 0 : A.optionProperties) == null ? void 0 : z.allowsTextEntry) && q && M.isSelected;
1370
+ }), E = (C) => Object.values(C).filter((L) => L.isSelected).length, x = o.minSelect && o.minSelect > 0 && o.maxSelectMode === Fe.Range && E(v) < o.minSelect && (I || E(v) > 0), P = (C) => w(C) || I && !E(C) || !((L) => {
1371
+ const { minSelect: M = 0, maxSelect: A = 1 / 0, maxSelectMode: q } = o, z = E(L);
1372
+ switch (q) {
1373
+ case Fe.Maximum:
1374
+ return z <= A;
1375
+ case Fe.Range:
1376
+ return z === 0 || z >= M;
1377
+ default:
1378
+ return !0;
1379
+ }
1380
+ })(C), D = Object.entries(v).some(([C, L]) => {
1381
+ var M, A;
1382
+ return L.isSelected && ((A = (M = r.find((q) => `${q.id}` === C)) == null ? void 0 : M.optionProperties) == null ? void 0 : A.allowsTextEntry);
1383
+ }), T = d && (!_ || D), h = (C) => {
1384
+ O(C.id, C.selected, C.userText, C.noneOfTheAbove), C.selected && c && !_ && !m && f(i);
1385
+ }, y = (C) => {
1386
+ var L;
1387
+ return (o == null ? void 0 : o.maxSelectMode) !== Fe.Unlimited && E(v) === (o == null ? void 0 : o.maxSelect) && !((L = v[C]) != null && L.isSelected);
1388
+ }, S = r.map(({ id: C, label: L, value: M, optionProperties: A }) => {
1389
+ var J, ue;
1390
+ const q = `${C}`, { allowsTextEntry: z, noneOfTheAbove: Q } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...A };
1391
+ return a(mt, { allowTextEntry: z, border: u, disabled: y(q), error: (K = v, w(K)), id: q, isRadio: _, isSelected: !!((J = v[q]) != null && J.isSelected), label: L, noneOfTheAbove: Q, onUserInputChanged: h, promptText: "Please specify", text: (ue = v[C]) == null ? void 0 : ue.userText, useMobileStyling: p, value: M }, q);
1392
+ var K;
1393
+ }), N = (C) => {
1394
+ C.preventDefault(), C.stopPropagation(), n(v, !0), l && l();
1395
+ }, O = (C, L, M, A) => {
1396
+ const q = Object.assign({}, v);
1397
+ if ((_ || A) && L) for (const K of Object.values(q)) K.isSelected = !1, delete K.userText;
1398
+ else j && !A && v[j.id].isSelected && (q[j.id].isSelected = !1);
1399
+ q[C] = { isSelected: L, userText: M };
1400
+ const z = _ && Object.entries(q).some(([K, J]) => {
1401
+ var ue, Ke;
1402
+ return J.isSelected && ((Ke = (ue = r.find((ft) => `${ft.id}` === K)) == null ? void 0 : ue.optionProperties) == null ? void 0 : Ke.allowsTextEntry);
1403
+ }), Q = !P(q);
1404
+ c && (n(q, Q), _ && !z && Q && l && l()), k(q);
1389
1405
  };
1390
- return a("form", { className: H(e, "ul-card--multiple", "fade-in-transition", c && !g && "ul-card--unfocused"), id: "text-form", onClick: s === "multipleselect" ? () => {
1391
- c && m !== i && s === "multipleselect" && f(i);
1392
- } : void 0, onSubmit: L, children: [a(ue, { message: t, properties: o }), a(be, { properties: o, defaultBody: () => a(ee, { children: [a(_e, { children: [o.isDropdown ? a(Di, { isMultiSelect: !y, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (h) => {
1393
- const v = { ...b };
1394
- for (const C of r) h.includes(C) ? v[C.id].isSelected = !0 : v[C.id].isSelected = !1;
1395
- c && n(v, !k(v)), w(v);
1396
- }, options: r, placeholderText: o.dropdownPlaceholderText ?? (y ? "Select choice" : "Select choice(s)"), value: r.filter((h) => b[h.id].isSelected) }) : a("div", { className: H(ne("ul-card__choices", p)), role: y ? "radiogroup" : "group", children: R }), x && a(ct, { handleSubmit: L, isSubmitDisabled: k(b) })] }), !c && a(Ce, { children: a("div", { className: "ul-card__button-wrapper", children: a(oe, { disabled: k(b), onClick: L, children: Ee(o) }) }) })] }) })] }, i);
1397
- }, Pi = (e) => {
1398
- const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } = q((s) => ({ setFocusedQuestionId: s.setFocusedQuestionId }));
1399
- return a(ro, { ...e, onSubmit: (s, d) => {
1406
+ return a("form", { className: H(e, "ul-card--multiple", "fade-in-transition", c && !m && "ul-card--unfocused"), id: "text-form", onClick: s === "multipleselect" ? () => {
1407
+ c && g !== i && s === "multipleselect" && f(i);
1408
+ } : void 0, onSubmit: N, children: [a(pe, { message: t, properties: o }), a(_e, { properties: o, defaultBody: () => a(ne, { children: [a(ye, { children: [o.isDropdown ? a(Oi, { disabledOptions: r.filter((C) => y(C.id)), dropdownFooter: x ? a("div", { className: "ul-card__min-select-counter", style: { marginLeft: "16px" }, children: [E(v), "/", o.minSelect] }) : void 0, isMultiSelect: !_, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (C) => {
1409
+ const L = { ...v };
1410
+ for (const M of r) C.includes(M) ? L[M.id].isSelected = !0 : L[M.id].isSelected = !1;
1411
+ c && n(L, !P(L)), k(L);
1412
+ }, options: r, placeholderText: o.dropdownPlaceholderText ?? (_ ? "Select choice" : "Select choice(s)"), value: r.filter((C) => v[C.id].isSelected) }) : a("div", { className: H(oe("ul-card__choices", p)), role: _ ? "radiogroup" : "group", children: [S, !!x && a("div", { className: "ul-card__min-select-counter", children: [E(v), "/", o.minSelect] })] }), T && a(pt, { handleSubmit: N, isSubmitDisabled: P(v) })] }), !c && a(Se, { children: a("div", { className: "ul-card__button-wrapper", children: a(ie, { disabled: P(v), onClick: N, children: Ie(o) }) }) })] }) })] }, i);
1413
+ }, Ui = (e) => {
1414
+ const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } = F((s) => ({ setFocusedQuestionId: s.setFocusedQuestionId }));
1415
+ return a(ao, { ...e, onSubmit: (s, d) => {
1400
1416
  var f;
1401
- const l = Object.entries(s).find(([, g]) => g.isSelected) || [void 0, void 0], [u, p] = l, c = o.find((g) => `${g.id}` === u);
1417
+ const l = Object.entries(s).find(([, m]) => m.isSelected) || [void 0, void 0], [u, p] = l, c = o.find((m) => `${m.id}` === u);
1402
1418
  !((f = c == null ? void 0 : c.optionProperties) != null && f.allowsTextEntry) || p != null && p.userText && p.userText.trim() !== "" || i(t);
1403
- const m = p != null && p.userText ? { [u]: { userText: p.userText } } : null;
1404
- r({ value: c && u ? { [u]: c.value } : {}, secondaryValue: m, questionId: t, type: n }, d);
1419
+ const g = p != null && p.userText ? { [u]: { userText: p.userText } } : null;
1420
+ r({ value: c && u ? { [u]: c.value } : {}, secondaryValue: g, questionId: t, type: n }, d);
1405
1421
  } });
1406
- }, Ri = (e) => {
1422
+ }, Hi = (e) => {
1407
1423
  const { questionId: t, type: n, next: r } = e;
1408
- return a(ro, { ...e, onSubmit: (o, i) => {
1424
+ return a(ao, { ...e, onSubmit: (o, i) => {
1409
1425
  const s = Object.entries(o).reduce((l, [u, p]) => (l[u] = p.isSelected, l), {}), d = Object.entries(o).reduce((l, [u, p]) => {
1410
1426
  if (!p.userText) return l;
1411
1427
  const c = l || {};
@@ -1413,178 +1429,178 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1413
1429
  }, null);
1414
1430
  r({ value: s, secondaryValue: d, questionId: t, type: n }, i);
1415
1431
  } });
1416
- }, Mi = ({ className: e, labels: t, message: n, properties: r, next: o, questionId: i, type: s }) => {
1417
- const [d, l] = z(null), { border: u, useMobileStyling: p, viewDocument: c, isLongFormSurvey: m, focusedQuestionId: f } = q((I) => ({ border: I.border, useMobileStyling: I.useMobileStyling, viewDocument: I.viewDocument, isLongFormSurvey: le(I.studyType), focusedQuestionId: I.focusedQuestionId })), g = m && f === i, _ = t && t.left, b = t && t.right, w = [...Array(11)].map((I, j) => a("button", { className: H(ne("nps-number", p), ne(`nps-number-${j}`, p)), id: `option-${j}`, onClick: (k) => {
1418
- m && (k.preventDefault(), k.stopPropagation(), l(j)), o({ value: j, questionId: i, type: s }, !0);
1419
- }, onKeyDown: (k) => {
1420
- var x, R;
1432
+ }, Bi = ({ className: e, labels: t, message: n, properties: r, next: o, questionId: i, type: s }) => {
1433
+ const [d, l] = $(null), { border: u, useMobileStyling: p, viewDocument: c, isLongFormSurvey: g, focusedQuestionId: f } = F((I) => ({ border: I.border, useMobileStyling: I.useMobileStyling, viewDocument: I.viewDocument, isLongFormSurvey: le(I.studyType), focusedQuestionId: I.focusedQuestionId })), m = g && f === i, b = t && t.left, v = t && t.right, k = [...Array(11)].map((I, j) => a("button", { className: H(oe("nps-number", p), oe(`nps-number-${j}`, p)), id: `option-${j}`, onClick: (w) => {
1434
+ g && (w.preventDefault(), w.stopPropagation(), l(j)), o({ value: j, questionId: i, type: s }, !0);
1435
+ }, onKeyDown: (w) => {
1436
+ var x, P;
1421
1437
  const E = c.querySelectorAll("button.nps-number");
1422
- k.key === "ArrowRight" ? (x = E[j + 1]) == null || x.focus() : k.key === "ArrowLeft" ? (R = E[j - 1]) == null || R.focus() : k.key !== "Enter" && k.key !== " " || (m && (k.preventDefault(), k.stopPropagation(), l(j)), o({ value: j, questionId: i, type: s }, !0));
1423
- }, onPointerDown: (k) => {
1424
- k.currentTarget.style.zIndex = "2", k.currentTarget.style.borderColor = u;
1425
- }, onPointerLeave: (k) => {
1426
- k.currentTarget.style.zIndex = "auto", k.currentTarget.style.borderColor = Bt;
1427
- }, style: d === j ? { backgroundColor: u, color: "#fff" } : void 0, tabIndex: 0, children: j }, j)), y = (I) => {
1438
+ w.key === "ArrowRight" ? (x = E[j + 1]) == null || x.focus() : w.key === "ArrowLeft" ? (P = E[j - 1]) == null || P.focus() : w.key !== "Enter" && w.key !== " " || (g && (w.preventDefault(), w.stopPropagation(), l(j)), o({ value: j, questionId: i, type: s }, !0));
1439
+ }, onPointerDown: (w) => {
1440
+ w.currentTarget.style.zIndex = "2", w.currentTarget.style.borderColor = u;
1441
+ }, onPointerLeave: (w) => {
1442
+ w.currentTarget.style.zIndex = "auto", w.currentTarget.style.borderColor = Ft;
1443
+ }, style: d === j ? { backgroundColor: u, color: "#fff" } : void 0, tabIndex: 0, children: j }, j)), _ = (I) => {
1428
1444
  I.preventDefault(), I.stopPropagation(), o({ value: null, questionId: i, type: s }, !0);
1429
1445
  };
1430
- return a("form", { className: H(e, "ul-card--nps", "fade-in-transition", m && !g && "ul-card--unfocused"), children: [a(ue, { message: n, properties: r }), a(be, { properties: r, defaultBody: () => a(ee, { children: [a(_e, { children: [a("div", { className: "ul-card--nps__numbers", children: w }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: _ }), a("span", { children: b })] })] }), !r.required && !m && a(Ce, { children: a("div", { className: "ul-vertical-centered-container", children: a(oe, { onClick: y, children: Ee(r) }) }) })] }) })] }, i);
1431
- }, Oi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i, showIndividualSubmit: s = !1, onSubmitButtonClick: d }) => {
1432
- const { border: l, useMobileStyling: u, update: p, isLongFormSurvey: c, focusedQuestionId: m, setFocusedQuestionId: f, isPreview: g } = q((h) => ({ border: h.border, useMobileStyling: h.useMobileStyling, update: h.update, isLongFormSurvey: le(h.studyType), focusedQuestionId: h.focusedQuestionId, setFocusedQuestionId: h.setFocusedQuestionId, isPreview: h.isPreview })), [_, b] = z(""), w = J(null), y = c && m === o;
1446
+ return a("form", { className: H(e, "ul-card--nps", "fade-in-transition", g && !m && "ul-card--unfocused"), children: [a(pe, { message: n, properties: r }), a(_e, { properties: r, defaultBody: () => a(ne, { children: [a(ye, { children: [a("div", { className: "ul-card--nps__numbers", children: k }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: b }), a("span", { children: v })] })] }), !r.required && !g && a(Se, { children: a("div", { className: "ul-vertical-centered-container", children: a(ie, { onClick: _, children: Ie(r) }) }) })] }) })] }, i);
1447
+ }, qi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i, showIndividualSubmit: s = !1, onSubmitButtonClick: d }) => {
1448
+ const { border: l, useMobileStyling: u, update: p, isLongFormSurvey: c, focusedQuestionId: g, setFocusedQuestionId: f, isPreview: m } = F((h) => ({ border: h.border, useMobileStyling: h.useMobileStyling, update: h.update, isLongFormSurvey: le(h.studyType), focusedQuestionId: h.focusedQuestionId, setFocusedQuestionId: h.setFocusedQuestionId, isPreview: h.isPreview })), [b, v] = $(""), k = ee(null), _ = c && g === o;
1433
1449
  Y(() => {
1434
- var h, v;
1435
- c && !g && (y ? (h = w.current) == null || h.focus() : (v = w.current) == null || v.blur());
1436
- }, [c, y, g]);
1437
- const I = _.trim(), j = r.required === !0 && !I, k = Yr(w, () => p()), E = (h) => {
1438
- const { value: v } = h.currentTarget;
1439
- if (k(), h.preventDefault(), h.stopPropagation(), b(v), c) {
1440
- const C = v.trim().length > 0;
1441
- n({ value: v, questionId: o, type: i }, C);
1450
+ var h, y;
1451
+ c && !m && (_ ? (h = k.current) == null || h.focus() : (y = k.current) == null || y.blur());
1452
+ }, [c, _, m]);
1453
+ const I = b.trim(), j = r.required === !0 && !I, w = Xr(k, () => p()), E = (h) => {
1454
+ const { value: y } = h.currentTarget;
1455
+ if (w(), h.preventDefault(), h.stopPropagation(), v(y), c) {
1456
+ const S = y.trim().length > 0;
1457
+ n({ value: y, questionId: o, type: i }, S);
1442
1458
  }
1443
1459
  }, x = (h) => {
1444
- h.preventDefault(), h.stopPropagation(), n({ value: _, questionId: o, type: i }, I.length > 0), d && d();
1445
- }, R = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", L = (h) => {
1460
+ h.preventDefault(), h.stopPropagation(), n({ value: b, questionId: o, type: i }, I.length > 0), d && d();
1461
+ }, P = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", D = (h) => {
1446
1462
  h.currentTarget.style.borderColor = l, f(o);
1447
- }, S = (h) => {
1448
- h.currentTarget.style.borderColor = Bt;
1463
+ }, T = (h) => {
1464
+ h.currentTarget.style.borderColor = Ft;
1449
1465
  };
1450
- return a("form", { className: H(e, "ul-card-text", "fade-in-transition", c && !y && "ul-card--unfocused"), id: "text-form", onClick: () => {
1451
- c && m !== o && f(o);
1452
- }, children: [a(ue, { message: t, properties: r }), a(be, { defaultBody: () => a("div", { className: "ul-card-text", children: a(_e, { children: [a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": R, className: H(ne("ul-card-text__input", u)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: S, onChange: E, onFocus: L, placeholder: R, ref: w, role: "textbox", tabIndex: 0 }) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } }), s && a(ct, { handleSubmit: x, isSubmitDisabled: j }), a(Ce, { children: !c && a(oe, { disabled: j, onClick: x, children: Ee(r) }) })] }) }), properties: r })] }, o);
1453
- }, Ui = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s, onSubmitButtonClick: d, options: l, showIndividualSubmit: u = !1 }) => {
1454
- const p = J(null), c = J(0), m = J(0), f = J(null), g = J(!1), _ = J([]), [b, w] = z(() => (o == null ? void 0 : o.required) === !0), [y, I] = z(() => l.map((B) => ({ ...B, rank: null }))), j = he(() => Array.from({ length: l.length }, (B, G) => G + 1), [l.length]), { isLongFormSurvey: k, focusedQuestionId: E, setFocusedQuestionId: x, useMobileStyling: R, isPreview: L } = q((B) => ({ useMobileStyling: B.useMobileStyling, isLongFormSurvey: le(B.studyType), focusedQuestionId: B.focusedQuestionId, setFocusedQuestionId: B.setFocusedQuestionId, isPreview: B.isPreview })), S = R && !L, h = k && E === i, v = (B) => {
1455
- B.preventDefault(), V(y), d && d();
1456
- }, C = (B, G) => {
1457
- for (let K = 0; K < _.current.length; K++) {
1458
- const $ = _.current[K];
1459
- if (!$ || $ === f.current) continue;
1460
- const ae = $.getBoundingClientRect();
1461
- if (B >= ae.left && B <= ae.right && G >= ae.top && G <= ae.bottom) return { element: $, index: K };
1466
+ return a("form", { className: H(e, "ul-card-text", "fade-in-transition", c && !_ && "ul-card--unfocused"), id: "text-form", onClick: () => {
1467
+ c && g !== o && f(o);
1468
+ }, children: [a(pe, { message: t, properties: r }), a(_e, { defaultBody: () => a("div", { className: "ul-card-text", children: a(ye, { children: [a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": P, className: H(oe("ul-card-text__input", u)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: E, onFocus: D, placeholder: P, ref: k, role: "textbox", tabIndex: 0 }) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } }), s && a(pt, { handleSubmit: x, isSubmitDisabled: j }), a(Se, { children: !c && a(ie, { disabled: j, onClick: x, children: Ie(r) }) })] }) }), properties: r })] }, o);
1469
+ }, Ai = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s, onSubmitButtonClick: d, options: l, showIndividualSubmit: u = !1 }) => {
1470
+ const p = ee(null), c = ee(0), g = ee(0), f = ee(null), m = ee(!1), b = ee([]), [v, k] = $(() => (o == null ? void 0 : o.required) === !0), [_, I] = $(() => l.map((B) => ({ ...B, rank: null }))), j = ge(() => Array.from({ length: l.length }, (B, G) => G + 1), [l.length]), { isLongFormSurvey: w, focusedQuestionId: E, setFocusedQuestionId: x, useMobileStyling: P, isPreview: D, headers: T } = F((B) => ({ useMobileStyling: B.useMobileStyling, isLongFormSurvey: le(B.studyType), focusedQuestionId: B.focusedQuestionId, setFocusedQuestionId: B.setFocusedQuestionId, isPreview: B.isPreview, headers: B.headers })), h = P && !D, y = No(T) && h, S = w && E === i, N = (B) => {
1471
+ B.preventDefault(), z(_), d && d();
1472
+ }, O = (B, G) => {
1473
+ for (let X = 0; X < b.current.length; X++) {
1474
+ const W = b.current[X];
1475
+ if (!W || W === f.current) continue;
1476
+ const ae = W.getBoundingClientRect();
1477
+ if (B >= ae.left && B <= ae.right && G >= ae.top && G <= ae.bottom) return { element: W, index: X };
1462
1478
  }
1463
1479
  return null;
1464
- }, T = (B) => (G) => {
1465
- if (!S) return;
1466
- G.preventDefault(), G.stopPropagation(), g.current = !0, p.current = B;
1467
- const K = G.touches[0];
1468
- c.current = K.clientY, m.current = K.clientY;
1469
- const $ = G.currentTarget.closest(".ul-card-rank__option");
1470
- $ && (f.current = $, $.classList.add("is-dragging"));
1471
- }, D = (B) => {
1472
- if (!S || !g.current || p.current === null) return;
1480
+ }, C = (B) => (G) => {
1481
+ if (!h) return;
1482
+ G.preventDefault(), G.stopPropagation(), m.current = !0, p.current = B;
1483
+ const X = G.touches[0];
1484
+ c.current = X.clientY, g.current = X.clientY;
1485
+ const W = G.currentTarget.closest(".ul-card-rank__option");
1486
+ W && (f.current = W, W.classList.add("is-dragging"));
1487
+ }, L = (B) => {
1488
+ if (!h || !m.current || p.current === null) return;
1473
1489
  B.preventDefault(), B.stopPropagation();
1474
1490
  const G = B.touches[0];
1475
- m.current = G.clientY;
1476
- const K = m.current - c.current;
1477
- f.current && (f.current.style.transform = `translateY(${K}px)`, f.current.style.zIndex = "1000"), _.current.forEach((ae) => {
1491
+ g.current = G.clientY;
1492
+ const X = g.current - c.current;
1493
+ f.current && (f.current.style.transform = `translateY(${X}px)`, f.current.style.zIndex = "1000"), b.current.forEach((ae) => {
1478
1494
  ae && ae !== f.current && ae.classList.remove("is-drop-target");
1479
1495
  });
1480
- const $ = C(G.clientX, G.clientY);
1481
- $ && $.element.classList.add("is-drop-target");
1482
- }, N = (B) => {
1483
- if (!S || !g.current || p.current === null) return;
1496
+ const W = O(G.clientX, G.clientY);
1497
+ W && W.element.classList.add("is-drop-target");
1498
+ }, M = (B) => {
1499
+ if (!h || !m.current || p.current === null) return;
1484
1500
  B.preventDefault(), B.stopPropagation();
1485
- const G = B.changedTouches[0], K = C(G.clientX, G.clientY);
1486
- f.current && (f.current.style.transform = "", f.current.style.zIndex = "", f.current.classList.remove("is-dragging")), _.current.forEach(($) => {
1487
- $ && $.classList.remove("is-drop-target");
1488
- }), K && K.index !== p.current && P(p.current, K.index), p.current = null, f.current = null, g.current = !1;
1489
- }, P = (B, G) => {
1490
- I((K) => {
1491
- const $ = K.map((Ie) => ({ ...Ie })), [ae] = $.splice(B, 1);
1492
- return $.splice(G, 0, ae), $.forEach((Ie, te) => {
1493
- Ie.rank = te + 1;
1494
- }), F($), $;
1501
+ const G = B.changedTouches[0], X = O(G.clientX, G.clientY);
1502
+ f.current && (f.current.style.transform = "", f.current.style.zIndex = "", f.current.classList.remove("is-dragging")), b.current.forEach((W) => {
1503
+ W && W.classList.remove("is-drop-target");
1504
+ }), X && X.index !== p.current && A(p.current, X.index), p.current = null, f.current = null, m.current = !1;
1505
+ }, A = (B, G) => {
1506
+ I((X) => {
1507
+ const W = X.map((je) => ({ ...je })), [ae] = W.splice(B, 1);
1508
+ return W.splice(G, 0, ae), W.forEach((je, re) => {
1509
+ je.rank = re + 1;
1510
+ }), Q(W), W;
1495
1511
  });
1496
- }, O = (B) => {
1512
+ }, q = (B) => {
1497
1513
  B.preventDefault(), B.dataTransfer && (B.dataTransfer.dropEffect = "move");
1498
- }, V = (B) => {
1514
+ }, z = (B) => {
1499
1515
  const G = {};
1500
- B.reduce((K, $) => (K[$.id] = $.rank, K), G), r({ value: G, questionId: i, type: s }, !0);
1501
- }, F = (B) => {
1502
- w(!1), k && V(B);
1503
- }, { left: Q, right: Z } = t, se = l.length, re = (B) => {
1516
+ B.reduce((X, W) => (X[W.id] = W.rank, X), G), r({ value: G, questionId: i, type: s }, !0);
1517
+ }, Q = (B) => {
1518
+ k(!1), w && z(B);
1519
+ }, { left: K, right: J } = t, ue = l.length, Ke = (B) => {
1504
1520
  B.preventDefault(), B.currentTarget.classList.add("is-drop-target");
1505
- }, Re = (B) => {
1521
+ }, ft = (B) => {
1506
1522
  B.currentTarget.classList.remove("is-drop-target");
1507
- }, wo = (B) => {
1523
+ }, Eo = (B) => {
1508
1524
  p.current = null, B.currentTarget.classList.remove("is-dragging");
1509
1525
  };
1510
- return a("form", { className: H(e, "ul-card-rank", "fade-in-transition", k && !h && "ul-card--unfocused"), onClick: () => {
1511
- k && E !== i && x(i);
1512
- }, onSubmit: v, children: [a(ue, { message: n, properties: o }), a(be, { properties: o, defaultBody: () => a(ee, { children: [a(_e, { children: [a("div", { className: "ul-card--rank__question-inner-container", children: [a("div", { className: "ul-card-rank__labels", children: a("span", { children: ["1 - ", Q] }) }), a("ol", { className: "ul-card-rank__list", onDragOver: O, children: y.map(({ id: B, label: G, rank: K }, $) => {
1513
- return a("li", { className: "ul-card-rank__option", draggable: !S, onDragEnd: S ? void 0 : wo, onDragEnter: S ? void 0 : re, onDragLeave: S ? void 0 : Re, onDragStart: S ? void 0 : (Ie = $, (te) => {
1514
- p.current = Ie, te.dataTransfer && (te.dataTransfer.effectAllowed = "move", te.dataTransfer.setData("text/plain", String(Ie)), te.currentTarget.classList.add("is-dragging"));
1515
- }), onDrop: S ? void 0 : (ae = $, (te) => {
1516
- var Ye, qe;
1517
- te.preventDefault(), te.currentTarget.classList.remove("is-drop-target");
1518
- const je = p.current;
1519
- p.current = null, (qe = (Ye = te.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : Ye.querySelector(".is-dragging")) == null || qe.classList.remove("is-dragging"), je != null && je !== ae && P(je, ae);
1520
- }), ref: (te) => _.current[$] = te, children: [a("select", { "aria-label": `Rank for ${G}`, className: H("ul-card-rank__select", K == null && "ul-card-rank__select--placeholder"), name: `rank[${B}]`, onChange: (te) => ((je, Ye) => {
1526
+ return a("form", { className: H(e, "ul-card-rank", "fade-in-transition", w && !S && "ul-card--unfocused"), onClick: () => {
1527
+ w && E !== i && x(i);
1528
+ }, onSubmit: N, children: [a(pe, { message: n, properties: o }), a(_e, { properties: o, defaultBody: () => a(ne, { children: [a(ye, { children: [a("div", { className: "ul-card--rank__question-inner-container", children: [a("div", { className: "ul-card-rank__labels", children: a("span", { children: ["1 - ", K] }) }), a("ol", { className: "ul-card-rank__list", onDragOver: q, children: _.map(({ id: B, label: G, rank: X }, W) => {
1529
+ return a("li", { className: "ul-card-rank__option", draggable: !h, onDragEnd: h ? void 0 : Eo, onDragEnter: h ? void 0 : Ke, onDragLeave: h ? void 0 : ft, onDragStart: h ? void 0 : (je = W, (re) => {
1530
+ p.current = je, re.dataTransfer && (re.dataTransfer.effectAllowed = "move", re.dataTransfer.setData("text/plain", String(je)), re.currentTarget.classList.add("is-dragging"));
1531
+ }), onDrop: h ? void 0 : (ae = W, (re) => {
1532
+ var Je, qe;
1533
+ re.preventDefault(), re.currentTarget.classList.remove("is-drop-target");
1534
+ const Te = p.current;
1535
+ p.current = null, (qe = (Je = re.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : Je.querySelector(".is-dragging")) == null || qe.classList.remove("is-dragging"), Te != null && Te !== ae && A(Te, ae);
1536
+ }), ref: (re) => b.current[W] = re, children: [a("select", { "aria-label": `Rank for ${G}`, className: H("ul-card-rank__select", X == null && "ul-card-rank__select--placeholder"), name: `rank[${B}]`, onChange: (re) => ((Te, Je) => {
1521
1537
  I((qe) => {
1522
- const Ae = parseInt(Ye), ge = qe.map((X) => ({ ...X }));
1523
- ge.some((X) => X.rank == null) && ge.forEach((X, gt) => X.rank = gt + 1);
1524
- const ht = ge.findIndex((X) => X.id === je);
1525
- if (ht === -1) return qe;
1526
- const Ke = ge[ht].rank;
1527
- return Ae < Ke ? ge.forEach((X) => {
1528
- X.id !== je && X.rank >= Ae && X.rank < Ke && (X.rank = X.rank + 1);
1529
- }) : Ae > Ke && ge.forEach((X) => {
1530
- X.id !== je && X.rank > Ke && X.rank <= Ae && (X.rank = X.rank - 1);
1531
- }), ge[ht].rank = Ae, ge.sort((X, gt) => X.rank - gt.rank), F(ge), ge;
1538
+ const Ae = parseInt(Je), fe = qe.map((te) => ({ ...te }));
1539
+ fe.some((te) => te.rank == null) && fe.forEach((te, bt) => te.rank = bt + 1);
1540
+ const vt = fe.findIndex((te) => te.id === Te);
1541
+ if (vt === -1) return qe;
1542
+ const Xe = fe[vt].rank;
1543
+ return Ae < Xe ? fe.forEach((te) => {
1544
+ te.id !== Te && te.rank >= Ae && te.rank < Xe && (te.rank = te.rank + 1);
1545
+ }) : Ae > Xe && fe.forEach((te) => {
1546
+ te.id !== Te && te.rank > Xe && te.rank <= Ae && (te.rank = te.rank - 1);
1547
+ }), fe[vt].rank = Ae, fe.sort((te, bt) => te.rank - bt.rank), Q(fe), fe;
1532
1548
  });
1533
- })(B, te.currentTarget.value), value: K ?? "", children: [K == null && a("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }), j.map((te) => a("option", { className: "ul-card-rank__select-option", value: te, children: te }, te))] }), a("span", { children: G }), a("button", { "aria-label": `Drag ${G} to reorder`, className: "ul-card-rank__drag-btn", onTouchEnd: S ? N : void 0, onTouchMove: S ? D : void 0, onTouchStart: S ? T($) : void 0, title: "Drag to reorder", type: "button", children: a("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z", fill: "currentColor" }) }) })] }, B);
1534
- var ae, Ie;
1535
- }) }), a("div", { className: "ul-card-rank__labels", children: a("span", { children: [se, " - ", Z] }) })] }), u && a(ct, { handleSubmit: v, isSubmitDisabled: b })] }), !k && a(Ce, { children: a("div", { className: "ul-card__button-wrapper", children: a(oe, { disabled: b, children: Ee(o) }) }) })] }) })] }, i);
1536
- }, Hi = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), Hn = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: n, submitQuestion: r, updateCardValues: o }) => {
1537
- const { isLongFormSurvey: i } = q((m) => ({ isLongFormSurvey: le(m.studyType) }));
1549
+ })(B, re.currentTarget.value), value: X ?? "", children: [X == null && a("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }), j.map((re) => a("option", { className: "ul-card-rank__select-option", value: re, children: re }, re))] }), a("span", { children: G }), y && a("button", { "aria-label": `Drag ${G} to reorder`, className: "ul-card-rank__drag-btn", onTouchEnd: h ? M : void 0, onTouchMove: h ? L : void 0, onTouchStart: h ? C(W) : void 0, title: "Drag to reorder", type: "button", children: a("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z", fill: "currentColor" }) }) })] }, B);
1550
+ var ae, je;
1551
+ }) }), a("div", { className: "ul-card-rank__labels", children: a("span", { children: [ue, " - ", J] }) })] }), u && a(pt, { handleSubmit: N, isSubmitDisabled: v })] }), !w && a(Se, { children: a("div", { className: "ul-card__button-wrapper", children: a(ie, { disabled: v, children: Ie(o) }) }) })] }) })] }, i);
1552
+ }, Fi = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), An = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: n, submitQuestion: r, updateCardValues: o }) => {
1553
+ const { isLongFormSurvey: i } = F((g) => ({ isLongFormSurvey: le(g.studyType) }));
1538
1554
  if (!e) return null;
1539
- const { name: s, type: d, props: l } = e, u = n && Hi.has(d), p = { className: "ul-card", next: (m, f) => r(m, f), questionId: s, type: d, showIndividualSubmit: n, ...u ? { next: (m, f) => {
1540
- o(m.questionId, m, f ?? !0);
1555
+ const { name: s, type: d, props: l } = e, u = n && Fi.has(d), p = { className: "ul-card", next: (g, f) => r(g, f), questionId: s, type: d, showIndividualSubmit: n, ...u ? { next: (g, f) => {
1556
+ o(g.questionId, g, f ?? !0);
1541
1557
  }, onSubmitButtonClick: () => t(s) } : {} }, c = (() => {
1542
1558
  switch (d) {
1543
1559
  case "consentlegal":
1544
- return a(xi, { ...p, ...l });
1560
+ return a(Si, { ...p, ...l });
1545
1561
  case "likert":
1546
- return a(Ci, { ...p, ...l });
1562
+ return a(ji, { ...p, ...l });
1547
1563
  case "matrix":
1548
- return a(Li, { ...p, ...l });
1564
+ return a(Ri, { ...p, ...l });
1549
1565
  case "multiplechoice":
1550
- return a(Pi, { ...p, ...l });
1566
+ return a(Ui, { ...p, ...l });
1551
1567
  case "multipleselect":
1552
- return a(Ri, { ...p, ...l });
1568
+ return a(Hi, { ...p, ...l });
1553
1569
  case "nps":
1554
- return a(Mi, { ...p, ...l });
1570
+ return a(Bi, { ...p, ...l });
1555
1571
  case "open":
1556
- return a(Oi, { ...p, ...l });
1572
+ return a(qi, { ...p, ...l });
1557
1573
  case "rankorder":
1558
- return a(Ui, { ...p, ...l });
1574
+ return a(Ai, { ...p, ...l });
1559
1575
  case "recordedtask":
1560
- return a(Ji, { ...p, ...l });
1576
+ return a(ns, { ...p, ...l });
1561
1577
  case "texturlprompt":
1562
- return a(es, { ...p, ...l });
1578
+ return a(os, { ...p, ...l });
1563
1579
  case "thanks":
1564
- return a(ts, { ...p, ...l });
1580
+ return a(is, { ...p, ...l });
1565
1581
  case "uploading":
1566
- return a(ds, { ...p, ...l });
1582
+ return a(ms, { ...p, ...l });
1567
1583
  case "videovoice":
1568
- return a(ls, { ...p, ...l });
1584
+ return a(ps, { ...p, ...l });
1569
1585
  default:
1570
1586
  return null;
1571
1587
  }
1572
1588
  })();
1573
1589
  return c ? i ? a("div", { className: "ul-card-scroll-wrapper", children: c }, s) : c : null;
1574
- }, Bi = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: n }) => {
1590
+ }, Vi = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: n }) => {
1575
1591
  var f;
1576
- const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: d, slugName: l, surveyId: u, useMobileStyling: p } = q((g) => ({ cards: g.cards, forceBrandedLogo: g.forceBrandedLogo, index: g.index, marketingUrl: g.marketingUrl, showSurveyBrand: g.showSurveyBrand, slugName: g.slugName, surveyId: g.surveyId, useMobileStyling: g.useMobileStyling })), c = ((f = r[i]) == null ? void 0 : f.type) === "thanks", m = to({ marketingUrl: s, slugName: l, surveyId: u, forceBrandedLogo: o });
1577
- return a("footer", { className: H("long-form-question-footer-container", p && "long-form-question-footer-container--mobile", c && "long-form-question-footer-container-center"), children: [c && o ? a(eo, { marketingUrlLink: m }) : a("div", { className: "long-form-question-footer-container-logo", children: d ? a(Xr, { forceBrandedLogo: o, marketingUrlLink: m }) : null }), !c && a("div", { className: H("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: a(oe, { className: H("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: a("span", { className: "long-form-button-text-container", children: n ?? a(Yt, { stroke: "white" }) }) }) })] });
1578
- }, qi = /<piped-value\b([^>]*)>.*?<\/piped-value>/gis, Bn = ["questionHtml", "captionHtml", "footerHtml", "richTextBody"], oo = (e) => !!e.props && typeof e.props == "object" && "properties" in e.props, kt = (e) => !!e.props && typeof e.props == "object" && "options" in e.props && Array.isArray(e.props.options), qn = (e) => ["string", "number"].includes(typeof e), An = (e) => e.length === 0 ? "" : e.length === 1 ? e[0] : e.join(", "), Ai = (e) => {
1592
+ const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: d, slugName: l, surveyId: u, useMobileStyling: p } = F((m) => ({ cards: m.cards, forceBrandedLogo: m.forceBrandedLogo, index: m.index, marketingUrl: m.marketingUrl, showSurveyBrand: m.showSurveyBrand, slugName: m.slugName, surveyId: m.surveyId, useMobileStyling: m.useMobileStyling })), c = ((f = r[i]) == null ? void 0 : f.type) === "thanks", g = oo({ marketingUrl: s, slugName: l, surveyId: u, forceBrandedLogo: o });
1593
+ return a("footer", { className: H("long-form-question-footer-container", p && "long-form-question-footer-container--mobile", c && "long-form-question-footer-container-center"), children: [c && o ? a(ro, { marketingUrlLink: g }) : a("div", { className: "long-form-question-footer-container-logo", children: d ? a(no, { forceBrandedLogo: o, marketingUrlLink: g }) : null }), !c && a("div", { className: H("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: a(ie, { className: H("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: a("span", { className: "long-form-button-text-container", children: n ?? a(Xt, { stroke: "white" }) }) }) })] });
1594
+ }, zi = /<piped-value\b([^>]*)>.*?<\/piped-value>/gis, Fn = ["questionHtml", "captionHtml", "footerHtml", "richTextBody"], lo = (e) => !!e.props && typeof e.props == "object" && "properties" in e.props, St = (e) => !!e.props && typeof e.props == "object" && "options" in e.props && Array.isArray(e.props.options), Vn = (e) => ["string", "number"].includes(typeof e), zn = (e) => e.length === 0 ? "" : e.length === 1 ? e[0] : e.join(", "), $i = (e) => {
1579
1595
  var n, r;
1580
1596
  const t = ((o) => o != null && typeof o == "object" && "value" in o)(e) ? e.value : void 0;
1581
1597
  if (t != null) {
1582
- if (e.type === "multipleselect" && kt(e) && ((o) => !!o && typeof o == "object" && !Array.isArray(o))(t)) {
1598
+ if (e.type === "multipleselect" && St(e) && ((o) => !!o && typeof o == "object" && !Array.isArray(o))(t)) {
1583
1599
  const o = e.secondaryValue ?? null, i = e.props.options.filter((s) => t[String(s.id)] === !0).map((s) => {
1584
1600
  var d;
1585
1601
  return s.label + ((d = o == null ? void 0 : o[String(s.id)]) != null && d.userText ? `: ${o[String(s.id)].userText}` : "");
1586
1602
  });
1587
- return i.length ? An(i) : "No options selected";
1603
+ return i.length ? zn(i) : "No options selected";
1588
1604
  }
1589
1605
  if (e.type === "multiplechoice" && typeof t == "object" && t !== null) {
1590
1606
  const o = e.secondaryValue ?? null, i = Object.keys(t)[0];
@@ -1593,27 +1609,27 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1593
1609
  return (s == null ? void 0 : s.label) + ((n = o == null ? void 0 : o[i]) != null && n.userText ? `: ${(r = o == null ? void 0 : o[i]) == null ? void 0 : r.userText}` : "");
1594
1610
  }
1595
1611
  }
1596
- if (e.type === "matrix" && kt(e) && ((o) => {
1597
- if (!oo(o)) return !1;
1612
+ if (e.type === "matrix" && St(e) && ((o) => {
1613
+ if (!lo(o)) return !1;
1598
1614
  const i = o.props.properties;
1599
1615
  return !!i && typeof i == "object" && "matrixColumn" in i;
1600
1616
  })(e)) {
1601
1617
  const o = e.props.options, i = e.props.properties.matrixColumn, s = [];
1602
1618
  for (const [d, l] of Object.entries(t)) {
1603
- const u = o.find((g) => String(g.id) === d), p = (u == null ? void 0 : u.label) ?? d, c = qn(l) ? String(l) : JSON.stringify(l), m = i.find((g) => g.value === c), f = (m == null ? void 0 : m.label) ?? c;
1619
+ const u = o.find((m) => String(m.id) === d), p = (u == null ? void 0 : u.label) ?? d, c = Vn(l) ? String(l) : JSON.stringify(l), g = i.find((m) => m.value === c), f = (g == null ? void 0 : g.label) ?? c;
1604
1620
  s.push(`${p}: ${f}`);
1605
1621
  }
1606
1622
  return s.join("; ");
1607
1623
  }
1608
- if (e.type === "rankorder" && kt(e)) {
1624
+ if (e.type === "rankorder" && St(e)) {
1609
1625
  const o = e.props.options.reduce((s, d) => (s[String(d.id)] = d.label, s), {}), i = [];
1610
1626
  for (const [s, d] of Object.entries(t)) {
1611
1627
  const l = o[s];
1612
1628
  l && (i[d - 1] = l);
1613
1629
  }
1614
- return An(i);
1630
+ return zn(i);
1615
1631
  }
1616
- if (qn(t)) {
1632
+ if (Vn(t)) {
1617
1633
  const o = String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g, "").trim();
1618
1634
  return o === "" ? void 0 : o;
1619
1635
  }
@@ -1623,15 +1639,15 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1623
1639
  return String(t);
1624
1640
  }
1625
1641
  }
1626
- }, Fn = (e, t) => {
1642
+ }, $n = (e, t) => {
1627
1643
  const n = new RegExp(`${t}="([^"]*)"`, "i").exec(e);
1628
1644
  return (n == null ? void 0 : n[1]) ?? null;
1629
- }, Fi = (e, t) => {
1645
+ }, Qi = (e, t) => {
1630
1646
  if (e == null) return e;
1631
1647
  let n = !1;
1632
- const r = e.replace(qi, (o, i) => {
1648
+ const r = e.replace(zi, (o, i) => {
1633
1649
  n = !0;
1634
- const s = Fn(i, "answer-id"), d = Fn(i, "fallback-text") ?? "", l = s ? Number(s) : Number.NaN;
1650
+ const s = $n(i, "answer-id"), d = $n(i, "fallback-text") ?? "", l = s ? Number(s) : Number.NaN;
1635
1651
  if (Number.isFinite(l) && Object.hasOwn(t, l)) {
1636
1652
  const u = t[l];
1637
1653
  return String(u);
@@ -1639,132 +1655,132 @@ const oi = ei(ri), { useSyncExternalStoreWithSelector: ii } = oi, Nn = (e) => {
1639
1655
  return d;
1640
1656
  });
1641
1657
  return n ? r : e;
1642
- }, io = (e) => {
1658
+ }, co = (e) => {
1643
1659
  const t = {};
1644
1660
  for (const n of e) {
1645
- const r = Ai(n);
1661
+ const r = $i(n);
1646
1662
  r !== void 0 && (t[n.name] = r);
1647
1663
  }
1648
1664
  return t;
1649
- }, Vi = ({ cards: e, next: t, previousResponses: n }) => {
1650
- var S;
1651
- const [r, o] = z({}), [i, s] = z({}), d = he(() => ({ ...n, ...io(e.map((h) => {
1652
- var v, C;
1653
- return { ...h, value: ((v = r[h.name]) == null ? void 0 : v.value) ?? null, secondaryValue: ((C = r[h.name]) == null ? void 0 : C.secondaryValue) ?? null };
1665
+ }, Wi = ({ cards: e, next: t, previousResponses: n }) => {
1666
+ var T;
1667
+ const [r, o] = $({}), [i, s] = $({}), d = ge(() => ({ ...n, ...co(e.map((h) => {
1668
+ var y, S;
1669
+ return { ...h, value: ((y = r[h.name]) == null ? void 0 : y.value) ?? null, secondaryValue: ((S = r[h.name]) == null ? void 0 : S.secondaryValue) ?? null };
1654
1670
  })) }), [n, r, e]), l = (u = d, e.map((h) => {
1655
- if (!oo(h) || h.props.properties === void 0 || h.props.properties === null) return h;
1656
- const v = h.props.properties;
1657
- if (v === null || typeof v != "object" || !Bn.some((D) => D in v)) return h;
1658
- let C = !1;
1659
- const T = {};
1660
- for (const D of Bn) {
1661
- const N = v[D];
1662
- if (N !== void 0) {
1663
- const P = Fi(N, u);
1664
- T[D] = P, P !== N && (C = !0);
1671
+ if (!lo(h) || h.props.properties === void 0 || h.props.properties === null) return h;
1672
+ const y = h.props.properties;
1673
+ if (y === null || typeof y != "object" || !Fn.some((O) => O in y)) return h;
1674
+ let S = !1;
1675
+ const N = {};
1676
+ for (const O of Fn) {
1677
+ const C = y[O];
1678
+ if (C !== void 0) {
1679
+ const L = Qi(C, u);
1680
+ N[O] = L, L !== C && (S = !0);
1665
1681
  }
1666
1682
  }
1667
- return C ? { ...h, props: { ...h.props, properties: { ...v, ...T } } } : h;
1683
+ return S ? { ...h, props: { ...h.props, properties: { ...y, ...N } } } : h;
1668
1684
  }));
1669
1685
  var u;
1670
- const { isLongFormSurvey: p, focusedQuestionId: c, setFocusedQuestionId: m } = q((h) => ({ isLongFormSurvey: le(h.studyType), focusedQuestionId: h.focusedQuestionId, setFocusedQuestionId: h.setFocusedQuestionId })), f = J(null), g = J(!1), _ = J(null), b = De((h) => {
1671
- var D, N;
1672
- g.current = !0;
1673
- const v = e.findIndex((P) => P.name === h);
1674
- if (!p || h === null || v === -1) return void (g.current = !1);
1675
- const C = (D = f.current) == null ? void 0 : D.querySelectorAll(".ul-card-scroll-wrapper")[v], T = (N = f.current) == null ? void 0 : N.closest(".ul-card__container");
1676
- if (C && T) {
1677
- if (C && T) {
1678
- const P = C.getBoundingClientRect(), O = T.getBoundingClientRect(), V = P.top - O.top + T.scrollTop, F = V + P.height / 2, Q = window.innerHeight - 157;
1679
- let Z;
1680
- P.height >= Q ? Z = V : Z = F - T.clientHeight / 2;
1681
- const se = T.clientHeight, re = T.scrollHeight - se, Re = Math.max(0, Math.min(Z, re));
1682
- T.scrollTo({ top: Re, behavior: "smooth" }), setTimeout(() => {
1683
- g.current = !1;
1686
+ const { isLongFormSurvey: p, focusedQuestionId: c, setFocusedQuestionId: g } = F((h) => ({ isLongFormSurvey: le(h.studyType), focusedQuestionId: h.focusedQuestionId, setFocusedQuestionId: h.setFocusedQuestionId })), f = ee(null), m = ee(!1), b = ee(null), v = Pe((h) => {
1687
+ var O, C;
1688
+ m.current = !0;
1689
+ const y = e.findIndex((L) => L.name === h);
1690
+ if (!p || h === null || y === -1) return void (m.current = !1);
1691
+ const S = (O = f.current) == null ? void 0 : O.querySelectorAll(".ul-card-scroll-wrapper")[y], N = (C = f.current) == null ? void 0 : C.closest(".ul-card__container");
1692
+ if (S && N) {
1693
+ if (S && N) {
1694
+ const L = S.getBoundingClientRect(), M = N.getBoundingClientRect(), A = L.top - M.top + N.scrollTop, q = A + L.height / 2, z = window.innerHeight - 157;
1695
+ let Q;
1696
+ L.height >= z ? Q = A : Q = q - N.clientHeight / 2;
1697
+ const K = N.clientHeight, J = N.scrollHeight - K, ue = Math.max(0, Math.min(Q, J));
1698
+ N.scrollTo({ top: ue, behavior: "smooth" }), setTimeout(() => {
1699
+ m.current = !1;
1684
1700
  }, 500);
1685
1701
  }
1686
- } else g.current = !1;
1702
+ } else m.current = !1;
1687
1703
  }, [p, e]);
1688
- function w(h, v) {
1689
- return h.map((C) => v[C.name]);
1704
+ function k(h, y) {
1705
+ return h.map((S) => y[S.name]);
1690
1706
  }
1691
1707
  Y(() => {
1692
- c !== null && e.findIndex((h) => h.name === c) !== -1 || m(e[0].name);
1693
- }, [e, c, m]);
1694
- const y = (h) => {
1708
+ c !== null && e.findIndex((h) => h.name === c) !== -1 || g(e[0].name);
1709
+ }, [e, c, g]);
1710
+ const _ = (h) => {
1695
1711
  if (!p) return;
1696
- const v = e.findIndex((C) => C.name === h) + 1;
1697
- if (v < e.length) {
1698
- const C = e[v].name;
1699
- m(C);
1700
- } else m(h);
1712
+ const y = e.findIndex((S) => S.name === h) + 1;
1713
+ if (y < e.length) {
1714
+ const S = e[y].name;
1715
+ g(S);
1716
+ } else g(h);
1701
1717
  };
1702
1718
  Y(() => {
1703
- p && c !== null && (_.current !== c ? b(c) : _.current = null);
1704
- }, [c, p, b]);
1705
- const I = De(() => {
1706
- var O, V;
1707
- if (g.current) return;
1708
- const h = (O = f.current) == null ? void 0 : O.closest(".ul-card__container");
1719
+ p && c !== null && (b.current !== c ? v(c) : b.current = null);
1720
+ }, [c, p, v]);
1721
+ const I = Pe(() => {
1722
+ var M, A;
1723
+ if (m.current) return;
1724
+ const h = (M = f.current) == null ? void 0 : M.closest(".ul-card__container");
1709
1725
  if (!h) return;
1710
- const v = (V = f.current) == null ? void 0 : V.querySelectorAll(".ul-card-scroll-wrapper");
1711
- if (!v || v.length === 0) return;
1712
- const C = h.getBoundingClientRect(), T = C.top + C.height / 2;
1713
- let D = 0, N = 1 / 0;
1714
- v.forEach((F, Q) => {
1715
- const Z = F.getBoundingClientRect(), se = Z.top + Z.height / 2, re = Math.abs(T - se);
1716
- re < N && (N = re, D = Q);
1726
+ const y = (A = f.current) == null ? void 0 : A.querySelectorAll(".ul-card-scroll-wrapper");
1727
+ if (!y || y.length === 0) return;
1728
+ const S = h.getBoundingClientRect(), N = S.top + S.height / 2;
1729
+ let O = 0, C = 1 / 0;
1730
+ y.forEach((q, z) => {
1731
+ const Q = q.getBoundingClientRect(), K = Q.top + Q.height / 2, J = Math.abs(N - K);
1732
+ J < C && (C = J, O = z);
1717
1733
  });
1718
- const P = e[D];
1719
- _.current = P.name, m(P.name);
1720
- }, [e, m]);
1734
+ const L = e[O];
1735
+ b.current = L.name, g(L.name);
1736
+ }, [e, g]);
1721
1737
  Y(() => {
1722
- var v;
1738
+ var y;
1723
1739
  if (!p) return;
1724
- const h = ((v = f.current) == null ? void 0 : v.closest(".ul-card__container")) || null;
1740
+ const h = ((y = f.current) == null ? void 0 : y.closest(".ul-card__container")) || null;
1725
1741
  return h && h.addEventListener("scroll", I, { passive: !0 }), () => {
1726
1742
  h && h.removeEventListener("scroll", I);
1727
1743
  };
1728
1744
  }, [I, p]);
1729
- const j = he(() => Object.values(i).every((h) => h), [i]), k = async (h, v, C) => {
1730
- return s((D) => ({ ...D, [h]: C })), await (T = (D) => ({ ...D, [h]: v }), new Promise((D) => {
1731
- o((N) => {
1732
- const P = T(N);
1733
- return D(P), P;
1745
+ const j = ge(() => Object.values(i).every((h) => h), [i]), w = async (h, y, S) => {
1746
+ return s((O) => ({ ...O, [h]: S })), await (N = (O) => ({ ...O, [h]: y }), new Promise((O) => {
1747
+ o((C) => {
1748
+ const L = N(C);
1749
+ return O(L), L;
1734
1750
  });
1735
1751
  }));
1736
- var T;
1752
+ var N;
1737
1753
  };
1738
1754
  Y(() => {
1739
1755
  if (!p) return;
1740
1756
  const h = {};
1741
- e.forEach((v) => {
1742
- var T, D;
1743
- const C = v;
1744
- (D = (T = C.props) == null ? void 0 : T.properties) != null && D.required || (h[C.name] = { value: null, questionId: C.name, type: C.type });
1757
+ e.forEach((y) => {
1758
+ var N, O;
1759
+ const S = y;
1760
+ (O = (N = S.props) == null ? void 0 : N.properties) != null && O.required || (h[S.name] = { value: null, questionId: S.name, type: S.type });
1745
1761
  }), o(h), s({});
1746
1762
  }, [e, p]);
1747
- const E = async (h, v) => {
1763
+ const E = async (h, y) => {
1748
1764
  if (p) {
1749
- const C = await k(h.questionId, h, v), T = x(h.type), D = R(h.type);
1750
- if (T && y(h.questionId), D && v) {
1751
- const N = w(e, C);
1752
- t(N);
1765
+ const S = await w(h.questionId, h, y), N = x(h.type), O = P(h.type);
1766
+ if (N && _(h.questionId), O && y) {
1767
+ const C = k(e, S);
1768
+ t(C);
1753
1769
  }
1754
1770
  } else t([h]);
1755
- }, x = (h) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(h), R = (h) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(h), L = ((S = e[0]) == null ? void 0 : S.type) === "thanks";
1756
- return p ? a("div", { className: "ul-card-list-container--longform", ref: f, children: [l.map((h, v) => a(Hn, { cardInstance: h, moveToNextQuestion: y, showIndividualSubmit: p && e.length > 1 && v < e.length - 1, submitQuestion: E, updateCardValues: k }, (h == null ? void 0 : h.name) || v)), !L && a(Bi, { isSubmitDisabled: Object.keys(r).length < e.length || !j, onSubmit: function() {
1757
- const h = w(e, r);
1771
+ }, x = (h) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(h), P = (h) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(h), D = ((T = e[0]) == null ? void 0 : T.type) === "thanks";
1772
+ return p ? a("div", { className: "ul-card-list-container--longform", ref: f, children: [l.map((h, y) => a(An, { cardInstance: h, moveToNextQuestion: _, showIndividualSubmit: p && e.length > 1 && y < e.length - 1, submitQuestion: E, updateCardValues: w }, (h == null ? void 0 : h.name) || y)), !D && a(Vi, { isSubmitDisabled: Object.keys(r).length < e.length || !j, onSubmit: function() {
1773
+ const h = k(e, r);
1758
1774
  t(h);
1759
- } })] }) : a(ee, { children: l.map((h, v) => a(Hn, { cardInstance: h, moveToNextQuestion: y, showIndividualSubmit: p && e.length > 1 && v < e.length - 1, submitQuestion: E, updateCardValues: k }, (h == null ? void 0 : h.name) || v)) });
1760
- }, Mt = 1, so = 2, ao = 3, at = (e) => e.type === "av_permission", Vn = (e) => e.type === "screen_permission", lo = (e, t) => e === void 0 ? Mt : e ? ((n, r) => !(at(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? ao : Mt : so, zn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1761
- }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, ve = Vr((e) => ({ ...zn, reset: () => {
1762
- e(zn);
1775
+ } })] }) : a(ne, { children: l.map((h, y) => a(An, { cardInstance: h, moveToNextQuestion: _, showIndividualSubmit: p && e.length > 1 && y < e.length - 1, submitQuestion: E, updateCardValues: w }, (h == null ? void 0 : h.name) || y)) });
1776
+ }, Ht = 1, uo = 2, po = 3, dt = (e) => e.type === "av_permission", Qn = (e) => e.type === "screen_permission", mo = (e, t) => e === void 0 ? Ht : e ? ((n, r) => !(dt(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? po : Ht : uo, Wn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
1777
+ }, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, be = Qr((e) => ({ ...Wn, reset: () => {
1778
+ e(Wn);
1763
1779
  }, updatePage: (t) => {
1764
1780
  e(t);
1765
1781
  } }));
1766
- function Ot({ currentPage: e, pages: t }) {
1767
- const { avStream: n, recordingMediaTypes: r, updatePage: o } = ve.getState(), { recorderEventEmitter: i } = q.getState();
1782
+ function Bt({ currentPage: e, pages: t }) {
1783
+ const { avStream: n, recordingMediaTypes: r, updatePage: o } = be.getState(), { recorderEventEmitter: i } = F.getState();
1768
1784
  i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, d) => {
1769
1785
  if (n === s) return;
1770
1786
  let l = e;
@@ -1775,8 +1791,8 @@ function Ot({ currentPage: e, pages: t }) {
1775
1791
  o({ currentPage: l, avStream: s });
1776
1792
  } });
1777
1793
  }
1778
- function Ut({ status: e }) {
1779
- const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = ve.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = q.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1794
+ function qt({ status: e }) {
1795
+ const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = be.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = F.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
1780
1796
  n && i.emit("finish.task", { "begin.callback": (u) => {
1781
1797
  s({ mediaRecordingUid: u, isSubmitted: !0, progressPct: 0, isComplete: !1 });
1782
1798
  }, "progress.callback": (u, p) => {
@@ -1787,8 +1803,8 @@ function Ut({ status: e }) {
1787
1803
  l.value.taskDurationMillisecond = u, r && (l.value.mediaRecordingUids = r), o(), t(l);
1788
1804
  } });
1789
1805
  }
1790
- function Jt({ pages: e, setIsRequestingPermission: t }) {
1791
- const { recorderEventEmitter: n, eventEmitFn: r } = q.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = ve.getState();
1806
+ function tn({ pages: e, setIsRequestingPermission: t }) {
1807
+ const { recorderEventEmitter: n, eventEmitFn: r } = F.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = be.getState();
1792
1808
  if (!i) return;
1793
1809
  const l = e.indexOf(i);
1794
1810
  switch (i.type) {
@@ -1801,8 +1817,8 @@ function Jt({ pages: e, setIsRequestingPermission: t }) {
1801
1817
  case "screen_permission":
1802
1818
  return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (u, p) => {
1803
1819
  const c = p ? e[l + 1] : i;
1804
- p && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (m) => {
1805
- o({ captureStream: p, mediaRecordingUids: m });
1820
+ p && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (g) => {
1821
+ o({ captureStream: p, mediaRecordingUids: g });
1806
1822
  } }), o({ currentPage: c, screenPermissionRequested: !0, captureStream: p });
1807
1823
  } });
1808
1824
  case "start_task":
@@ -1811,115 +1827,113 @@ function Jt({ pages: e, setIsRequestingPermission: t }) {
1811
1827
  return;
1812
1828
  }
1813
1829
  }
1814
- const co = "ul-permission-graphics-container", uo = "ul-permission-body", po = H(co, "ul_recorded-task-inset-spacing"), pt = H("ul-horizontal-button-container", "ul-horizontal-button-container-left"), mo = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), mt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(oe, { className: H(n && "ul-skip-button-below", "ul-button-inactive"), onClick: Ut.bind(null, { status: "abandoned" }), children: t || "Skip" }), Xt = (e) => {
1815
- const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = ve.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1830
+ const ho = "ul-permission-graphics-container", go = "ul-permission-body", fo = H(ho, "ul_recorded-task-inset-spacing"), ht = H("ul-horizontal-button-container", "ul-horizontal-button-container-left"), vo = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), gt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(ie, { className: H(n && "ul-skip-button-below", "ul-button-inactive"), onClick: qt.bind(null, { status: "abandoned" }), children: t || "Skip" }), nn = (e) => {
1831
+ const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = be.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
1816
1832
  Y(() => {
1817
1833
  const s = setInterval(() => {
1818
1834
  i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
1819
1835
  }, 1e3);
1820
1836
  return () => clearInterval(s);
1821
1837
  }, [t, n, i, e, r, o]);
1822
- }, zi = ({ content: e, pages: t, required: n }) => {
1838
+ }, Zi = ({ content: e, pages: t, required: n }) => {
1823
1839
  const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
1824
- return Xt(t), a("div", { className: "ul-task-page", children: [i && a(mo, { richTextBody: i }), a("div", { className: pt, children: [a(oe, { onClick: Jt.bind(null, { pages: t }), children: r }), a(mt, { required: n, skipButtonText: o })] })] }, "start-task");
1825
- }, $i = ({ content: e, pages: t, properties: n }) => {
1840
+ return nn(t), a("div", { className: "ul-task-page", children: [i && a(vo, { richTextBody: i }), a("div", { className: ht, children: [a(ie, { onClick: tn.bind(null, { pages: t }), children: r }), a(gt, { required: n, skipButtonText: o })] })] }, "start-task");
1841
+ }, Gi = ({ content: e, pages: t, properties: n }) => {
1826
1842
  const { buttonText: r, skipButtonText: o } = e;
1827
- Xt(t);
1828
- const i = a(be, { properties: n, defaultBody: () => a("div", { className: pt, children: [a(oe, { className: "ul-complete-task-button", onClick: Ut.bind(null, { status: "completed" }), children: r }), a(oe, { className: H("ul-button-inactive"), onClick: Ut.bind(null, { status: "given.up" }), children: o })] }) });
1829
- return a("div", { className: "ul-task-page", children: [e.taskDetail && a(mo, { richTextBody: e.taskDetail }), i] }, "complete-task");
1830
- }, Qi = ({ content: e, pages: t, required: n }) => {
1831
- const { buttonText: r, skipButtonText: o } = e, [i] = q((l) => [l.tabTitle]), [s, d] = z(!1);
1832
- return a("div", { children: [a("div", { className: po, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: uo, children: i }) })] }), a("div", { className: n ? "" : pt, children: [a(oe, { disabled: s, onClick: Jt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(mt, { required: n, skipButtonText: o })] })] });
1833
- }, Wi = ({ content: e }) => a("div", { className: H(co, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), Zi = ({ content: e, pages: t, required: n }) => {
1834
- const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = at(t[0]) ? t[0] : null;
1843
+ nn(t);
1844
+ const i = a(_e, { properties: n, defaultBody: () => a("div", { className: ht, children: [a(ie, { className: "ul-complete-task-button", onClick: qt.bind(null, { status: "completed" }), children: r }), a(ie, { className: H("ul-button-inactive"), onClick: qt.bind(null, { status: "given.up" }), children: o })] }) });
1845
+ return a("div", { className: "ul-task-page", children: [e.taskDetail && a(vo, { richTextBody: e.taskDetail }), i] }, "complete-task");
1846
+ }, Yi = ({ content: e, pages: t, required: n }) => {
1847
+ const { buttonText: r, skipButtonText: o } = e, [i] = F((l) => [l.tabTitle]), [s, d] = $(!1);
1848
+ return a("div", { children: [a("div", { className: fo, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: go, children: i }) })] }), a("div", { className: n ? "" : ht, children: [a(ie, { disabled: s, onClick: tn.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(gt, { required: n, skipButtonText: o })] })] });
1849
+ }, Ki = ({ content: e }) => a("div", { className: H(ho, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), Ji = ({ content: e, pages: t, required: n }) => {
1850
+ const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = dt(t[0]) ? t[0] : null;
1835
1851
  return Y(() => {
1836
1852
  const l = setInterval(() => {
1837
- d !== null && Ot({ currentPage: d, pages: t });
1853
+ d !== null && Bt({ currentPage: d, pages: t });
1838
1854
  }, 1e3);
1839
1855
  return () => clearInterval(l);
1840
- }, [d, t]), d ? a("div", { children: [a("div", { className: po, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: uo, children: o })] }) }), a("div", { className: pt, children: [a(oe, { onClick: Ot.bind(null, { currentPage: d, pages: t }), children: s }), a(mt, { required: n, skipButtonText: i })] })] }) : null;
1841
- }, Gi = ({ stream: e }) => a("video", { autoPlay: !0, className: H("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1856
+ }, [d, t]), d ? a("div", { children: [a("div", { className: fo, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: go, children: o })] }) }), a("div", { className: ht, children: [a(ie, { onClick: Bt.bind(null, { currentPage: d, pages: t }), children: s }), a(gt, { required: n, skipButtonText: i })] })] }) : null;
1857
+ }, Xi = ({ stream: e }) => a("video", { autoPlay: !0, className: H("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
1842
1858
  t && (t.srcObject = e || null);
1843
- } }), Yi = ({ content: e, pages: t, required: n }) => {
1844
- const { skipButtonText: r } = e, { avStream: o } = ve.getState();
1845
- return Xt(t), a("div", { children: [a(Gi, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(oe, { onClick: Jt.bind(null, { pages: t }), children: e.buttonText }), a(mt, { bottom: !0, required: n, skipButtonText: r })] })] });
1846
- }, Ki = ({ properties: e }) => {
1847
- const { pages: t, required: n } = e, { avStream: r, currentPage: o } = ve.getState();
1859
+ } }), es = ({ content: e, pages: t, required: n }) => {
1860
+ const { skipButtonText: r } = e, { avStream: o } = be.getState();
1861
+ return nn(t), a("div", { children: [a(Xi, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(ie, { onClick: tn.bind(null, { pages: t }), children: e.buttonText }), a(gt, { bottom: !0, required: n, skipButtonText: r })] })] });
1862
+ }, ts = ({ properties: e }) => {
1863
+ const { pages: t, required: n } = e, { avStream: r, currentPage: o } = be.getState();
1848
1864
  if (o === void 0) return null;
1849
1865
  switch (o == null ? void 0 : o.type) {
1850
1866
  case "av_permission": {
1851
- const i = lo(r, o);
1852
- return i === Mt ? a(Wi, { content: o }) : a(i === so ? Zi : Yi, { content: o, pages: t, required: n });
1867
+ const i = mo(r, o);
1868
+ return i === Ht ? a(Ki, { content: o }) : a(i === uo ? Ji : es, { content: o, pages: t, required: n });
1853
1869
  }
1854
1870
  case "screen_permission":
1855
- return a(Qi, { content: o, pages: t, required: n });
1871
+ return a(Yi, { content: o, pages: t, required: n });
1856
1872
  case "start_task":
1857
- return a(zi, { content: o, pages: t, required: n });
1873
+ return a(Zi, { content: o, pages: t, required: n });
1858
1874
  case "complete_task":
1859
- return a($i, { content: o, pages: t, properties: e });
1875
+ return a(Gi, { content: o, pages: t, properties: e });
1860
1876
  default:
1861
1877
  return null;
1862
1878
  }
1863
- }, Ji = ({ className: e, properties: t, next: n, questionId: r }) => {
1864
- const o = q(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = ve(), { screenPermissionRequested: u } = l, p = ve((_) => _.avStream);
1865
- let c = ve((_) => _.currentPage);
1866
- c || (c = function({ pages: _, userId: b, responseGroupUid: w, surveyId: y, questionId: I, next: j }) {
1867
- const { updatePage: k } = ve.getState(), { eventEmitFn: E, recorderEventEmitter: x } = q.getState(), R = { questionId: I, surveyId: y, visitorId: b, responseGroupUid: w };
1868
- let L = 0;
1869
- x.emit("recorded.task.permission.screen"), E("recorded.task.permission.screen"), x.emit("permission.status", { "permission.status.callback": (h, v, C, T) => {
1870
- const D = _[L], { type: N } = D, P = ["screen"];
1871
- if (at(D)) {
1872
- const { permissionDescriptors: O } = D, V = O == null ? void 0 : O.includes("microphone"), F = O == null ? void 0 : O.includes("camera");
1873
- V && P.push("audio"), F && P.push("video"), (h != null && h.active && !F || h != null && h.active && v) && L++;
1879
+ }, ns = ({ className: e, properties: t, next: n, questionId: r }) => {
1880
+ const o = F(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = be(), { screenPermissionRequested: u } = l, p = be((b) => b.avStream);
1881
+ let c = be((b) => b.currentPage);
1882
+ c || (c = function({ pages: b, userId: v, responseGroupUid: k, surveyId: _, questionId: I, next: j }) {
1883
+ const { updatePage: w } = be.getState(), { eventEmitFn: E, recorderEventEmitter: x } = F.getState(), P = { questionId: I, surveyId: _, visitorId: v, responseGroupUid: k };
1884
+ let D = 0;
1885
+ x.emit("recorded.task.permission.screen"), E("recorded.task.permission.screen"), x.emit("permission.status", { "permission.status.callback": (h, y, S, N) => {
1886
+ const O = b[D], { type: C } = O, L = ["screen"];
1887
+ if (dt(O)) {
1888
+ const { permissionDescriptors: M } = O, A = M == null ? void 0 : M.includes("microphone"), q = M == null ? void 0 : M.includes("camera");
1889
+ A && L.push("audio"), q && L.push("video"), (h != null && h.active && !q || h != null && h.active && y) && D++;
1874
1890
  }
1875
- Vn(_[L]) && C && (L++, x.emit("begin.recording", { "recording.media.types": P, "start.recording.callback": (O) => k({ mediaRecordingUids: O }) })), k({ currentPage: _[L], avStream: h, screenPermissionRequested: C, nextQuestion: j, type: N, passthroughData: R, recordingMediaTypes: P, captureStream: T });
1891
+ Qn(b[D]) && S && (D++, x.emit("begin.recording", { "recording.media.types": L, "start.recording.callback": (M) => w({ mediaRecordingUids: M }) })), w({ currentPage: b[D], avStream: h, screenPermissionRequested: S, nextQuestion: j, type: C, passthroughData: P, recordingMediaTypes: L, captureStream: N });
1876
1892
  } });
1877
- const S = _[L];
1878
- return S.type === "av_permission" && Ot({ currentPage: S, pages: _ }), S;
1879
- }({ questionId: r, surveyId: i, next: (_) => {
1880
- n(_, !0);
1893
+ const T = b[D];
1894
+ return T.type === "av_permission" && Bt({ currentPage: T, pages: b }), T;
1895
+ }({ questionId: r, surveyId: i, next: (b) => {
1896
+ n(b, !0);
1881
1897
  }, pages: t.pages, responseGroupUid: s, userId: d }));
1882
- let m = c.headline, f = c.captionText;
1883
- const g = lo(p, c);
1884
- return Vn(c) && u && (m = c.permissionDeniedHeadline, f = c.permissionDeniedCaptionText), at(c) && g === ao && (m = c.permissionGrantedHeadline, f = c.permissionGrantedCaptionText), a("div", { className: H(e, "ul-center-horizontally", "fade-in-transition"), children: [a(ue, { message: m, properties: { captionText: f } }), a(_e, { children: a(Ki, { properties: t }) })] });
1885
- };
1886
- var ho = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(ho || {});
1887
- const Xi = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, es = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1888
- const { visitorAttributes: s, isLongFormSurvey: d } = q((g) => ({ visitorAttributes: g.visitorAttributes, isLongFormSurvey: le(g.studyType) })), l = (g, _ = !1) => {
1889
- n({ value: _ ? { skipped: !0 } : void 0, questionId: o, type: i }, !0);
1890
- }, u = (g) => {
1891
- g.key !== "Enter" && g.key !== " " || n({ value: void 0, questionId: o, type: i }, !0);
1892
- }, p = ((g, _ = {}) => {
1893
- if (!g) return g;
1898
+ let g = c.headline, f = c.captionText;
1899
+ const m = mo(p, c);
1900
+ return Qn(c) && u && (g = c.permissionDeniedHeadline, f = c.permissionDeniedCaptionText), dt(c) && m === po && (g = c.permissionGrantedHeadline, f = c.permissionGrantedCaptionText), a("div", { className: H(e, "ul-center-horizontally", "fade-in-transition"), children: [a(pe, { message: g, properties: { captionText: f } }), a(ye, { children: a(ts, { properties: t }) })] });
1901
+ }, rs = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, os = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
1902
+ const { visitorAttributes: s, isLongFormSurvey: d } = F((m) => ({ visitorAttributes: m.visitorAttributes, isLongFormSurvey: le(m.studyType) })), l = (m, b = !1) => {
1903
+ n({ value: b ? { skipped: !0 } : void 0, questionId: o, type: i }, !0);
1904
+ }, u = (m) => {
1905
+ m.key !== "Enter" && m.key !== " " || n({ value: void 0, questionId: o, type: i }, !0);
1906
+ }, p = ((m, b = {}) => {
1907
+ if (!m) return m;
1894
1908
  try {
1895
- /^https?:\/\//i.test(g) || (g = `http://${g}`);
1896
- const j = new URL(g);
1909
+ /^https?:\/\//i.test(m) || (m = `http://${m}`);
1910
+ const j = new URL(m);
1897
1911
  if (!j.protocol || j.protocol !== "http:" && j.protocol !== "https:") return;
1898
1912
  } catch {
1899
1913
  return;
1900
1914
  }
1901
- let b = g;
1902
- const w = [];
1903
- for (const [j, k] of Object.entries(Xi)) if (b.toLowerCase().includes(j)) if (_[k]) {
1915
+ let v = m;
1916
+ const k = [];
1917
+ for (const [j, w] of Object.entries(rs)) if (v.toLowerCase().includes(j)) if (b[w]) {
1904
1918
  const E = new RegExp(j, "gi");
1905
- b = b.replace(E, _[k]);
1906
- } else w.push(j);
1907
- if (w.length === 0 || !b.includes("?")) return b;
1908
- const y = b.slice(0, b.indexOf("?")), I = b.slice(b.indexOf("?") + 1).split("&").map((j) => j.split("=")).filter((j) => !w.includes(j[1]));
1909
- return I.length === 0 ? y : `${y}?${I.map((j) => j.join("=")).join("&")}`;
1910
- })(r && r.buttonUrl, s), c = d && r.promptActionType === ho.NO_BUTTON ? () => a(ee, {}) : () => a(Ce, { 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: l, onKeyPress: u, rel: "noreferrer", role: p ? "link" : "button", tabIndex: 0, target: "_blank", children: Ee(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (g) => l(0, !0), children: Kt(r) })] }) });
1911
- return a("div", { className: H(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(ue, { message: t, properties: { questionHtml: r.questionHtml } }), a(_e, { children: (m = r == null ? void 0 : r.richTextBody, f = r == null ? void 0 : r.body, m ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: m }, id: "ul-card__text-url-body-container" }) : f ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (f ? f.split(/\n\s*\n/g) : []).map((g, _) => a("p", { children: g }, _)) }) : null) }), a(be, { defaultBody: c, properties: r })] }, o);
1912
- var m, f;
1913
- }, ts = ({ className: e, questionId: t }) => {
1914
- const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = q((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
1919
+ v = v.replace(E, b[w]);
1920
+ } else k.push(j);
1921
+ if (k.length === 0 || !v.includes("?")) return v;
1922
+ const _ = v.slice(0, v.indexOf("?")), I = v.slice(v.indexOf("?") + 1).split("&").map((j) => j.split("=")).filter((j) => !k.includes(j[1]));
1923
+ return I.length === 0 ? _ : `${_}?${I.map((j) => j.join("=")).join("&")}`;
1924
+ })(r && r.buttonUrl, s), c = d && r.promptActionType === so.NO_BUTTON ? () => a(ne, {}) : () => a(Se, { 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: l, onKeyPress: u, rel: "noreferrer", role: p ? "link" : "button", tabIndex: 0, target: "_blank", children: Ie(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (m) => l(0, !0), children: en(r) })] }) });
1925
+ return a("div", { className: H(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(pe, { message: t, properties: { questionHtml: r.questionHtml } }), a(ye, { children: (g = r == null ? void 0 : r.richTextBody, f = r == null ? void 0 : r.body, g ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: g }, id: "ul-card__text-url-body-container" }) : f ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (f ? f.split(/\n\s*\n/g) : []).map((m, b) => a("p", { children: m }, b)) }) : null) }), a(_e, { defaultBody: c, properties: r })] }, o);
1926
+ var g, f;
1927
+ }, is = ({ className: e, questionId: t }) => {
1928
+ const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = F((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
1915
1929
  Y(() => {
1916
1930
  setTimeout(() => {
1917
1931
  r(Oe);
1918
1932
  }, i ? 4e3 : 2e3);
1919
1933
  }, [r, i]);
1920
1934
  const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
1921
- return a("div", { className: H(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(ue, { message: d }), s] }) }) }, t);
1922
- }, Ne = "https://cdn.sprig.com", U = { document: void 0, videojs: void 0 }, en = (e) => e + "-loading-spiner", ie = "hidden", $n = ".m3u8", wt = "questionId", Ct = "ul-video-recorder-camera-off-button", St = "ul-recording-in-session", ns = [{ type: "link", content: `${Ne}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${Ne}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${Ne}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${Ne}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${Ne}/userleap-web-upchunk-v2.2.2.js` }], go = [{ type: "link", content: `${Ne}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${Ne}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1935
+ return a("div", { className: H(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(pe, { message: d }), s] }) }) }, t);
1936
+ }, De = "https://cdn.sprig.com", U = { document: void 0, videojs: void 0 }, rn = (e) => e + "-loading-spiner", se = "hidden", Zn = ".m3u8", Et = "questionId", It = "ul-video-recorder-camera-off-button", jt = "ul-recording-in-session", ss = [{ type: "link", content: `${De}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${De}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${De}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${De}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${De}/userleap-web-upchunk-v2.2.2.js` }], bo = [{ type: "link", content: `${De}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${De}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
1923
1937
  .video-js .vjs-control {
1924
1938
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
1925
1939
  }
@@ -2576,18 +2590,18 @@ span.ul-button-text {
2576
2590
  .vjs-poster {
2577
2591
  background-size: cover;
2578
2592
  }
2579
- ` }], fo = "-video-player", Qn = "-secondary-video-player", Wn = "-video-recorder";
2580
- let fe, Zn;
2581
- const Se = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2593
+ ` }], _o = "-video-player", Gn = "-secondary-video-player", Yn = "-video-recorder";
2594
+ let ve, Kn;
2595
+ const Ee = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
2582
2596
  const s = U.document.documentElement;
2583
2597
  if (!r || !o) return;
2584
2598
  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 } };
2585
2599
  (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);
2586
- }, ye = async (e, t, n, r, o, i) => {
2587
- Se({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2600
+ }, xe = async (e, t, n, r, o, i) => {
2601
+ Ee({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
2588
2602
  const s = U.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 };
2589
2603
  (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);
2590
- }, vo = (e, t) => {
2604
+ }, yo = (e, t) => {
2591
2605
  if (e.length === 0) return t && t();
2592
2606
  Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, l) {
2593
2607
  let u;
@@ -2601,38 +2615,38 @@ const Se = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
2601
2615
  }).catch(function(n) {
2602
2616
  console.log(n + " failed to load");
2603
2617
  });
2604
- }, Gn = (e, t, n) => {
2605
- if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility = ie;
2606
- else if (t === "success") e.style.visibility = ie, e.innerHTML = "Upload succeeded!";
2618
+ }, Jn = (e, t, n) => {
2619
+ if (t === "start" && (e.style.visibility = "visible"), t === "none") e.style.visibility = se;
2620
+ else if (t === "success") e.style.visibility = se, e.innerHTML = "Upload succeeded!";
2607
2621
  else {
2608
2622
  const r = Math.round(parseFloat(n));
2609
2623
  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%)`;
2610
2624
  }
2611
- }, Et = (e, t) => {
2625
+ }, Tt = (e, t) => {
2612
2626
  const n = U.videojs(e.id());
2613
2627
  return n == null ? void 0 : n.payload[t];
2614
- }, bo = (e, t) => {
2628
+ }, xo = (e, t) => {
2615
2629
  const n = new (U.videojs.getComponent("Component"))(e);
2616
2630
  return n.addClass("ul-buttons-panel"), t.map((r) => {
2617
2631
  n.addChild(r);
2618
- }), rs(n), n;
2619
- }, rs = (e) => {
2632
+ }), as(n), n;
2633
+ }, as = (e) => {
2620
2634
  e.children().forEach((t) => {
2621
- if (pe[t.name_]) {
2622
- const n = nt(pe[t.name_], `ul-${pe[t.name_]}`);
2635
+ if (me[t.name_]) {
2636
+ const n = ot(me[t.name_], `ul-${me[t.name_]}`);
2623
2637
  t.el_.appendChild(n);
2624
2638
  }
2625
2639
  });
2626
- }, nt = (e, t = "") => {
2640
+ }, ot = (e, t = "") => {
2627
2641
  const n = U.document.createElement("span");
2628
2642
  return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
2629
- }, _o = (e, t, n, r, o = !1, i) => {
2643
+ }, ko = (e, t, n, r, o = !1, i) => {
2630
2644
  e.addClass("ul-video-player");
2631
2645
  const s = new (U.videojs.getComponent("Component"))(e);
2632
2646
  s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (U.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
2633
- const d = n && n.src ? as(n.src) : null;
2647
+ const d = n && n.src ? us(n.src) : null;
2634
2648
  !n || !o && d ? (e.audioPlayerPlaceholder.hide(), U.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), U.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
2635
- o || !n || d || is(e), i == null || i.play();
2649
+ o || !n || d || ds(e), i == null || i.play();
2636
2650
  }), e.on("pause", () => {
2637
2651
  i == null || i.pause();
2638
2652
  }), e.on("seeked", () => {
@@ -2640,259 +2654,259 @@ const Se = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
2640
2654
  }), e.on("ratechange", () => {
2641
2655
  i == null || i.playbackRate(e.playbackRate());
2642
2656
  }), e.addChild(e.audioPlayerPlaceholder, {}, 1), s.addChild(t), e.addChild(s), r && r(e);
2643
- }, os = (e, t, n, r, o, i, s, d = !1) => {
2644
- Zn = Date.now();
2645
- const l = lt(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 } } });
2657
+ }, ls = (e, t, n, r, o, i, s, d = !1) => {
2658
+ Kn = Date.now();
2659
+ const l = ct(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 } } });
2646
2660
  if (!l) return;
2647
2661
  l.payload = n;
2648
- const { surveyId: u, questionId: p, responseGroupUid: c, visitorId: m, envId: f } = n;
2649
- let g;
2650
- const _ = (S) => {
2651
- const h = Ct, v = Ct + "-audio-only";
2652
- Gn(l.uploadProgressLabel, "none"), fe && fe.startTime >= Zn && fe.abort();
2653
- const C = U.document.getElementById("ul-camera-button");
2654
- S ? (l.children()[0].classList.add("vjs-hidden"), I.removeClass(h), I.addClass(v), C.innerHTML = pe.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), g == null || g.getTracks().forEach((T) => {
2655
- T.stop();
2656
- }), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((T) => {
2657
- g = T, T.getVideoTracks().forEach((D) => {
2658
- D.enabled = !1;
2659
- }), l.record().onDeviceReady(T);
2660
- }).catch(l.record().onDeviceError.bind(l.record()))) : (g == null || g.getVideoTracks().forEach((T) => {
2661
- T.enabled = !0;
2662
- }), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), I.removeClass(v), I.addClass(h), C.innerHTML = pe.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
2663
- }, b = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
2664
- b.hasClass(ie) || (Se({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: m, envId: f, metadata: { questionId: p, responseGroupUid: c, surveyId: u } }), _(l.cameraOff), o(A.DELETE, {}), I.removeClass(ie), b.addClass(ie));
2662
+ const { surveyId: u, questionId: p, responseGroupUid: c, visitorId: g, envId: f } = n;
2663
+ let m;
2664
+ const b = (T) => {
2665
+ const h = It, y = It + "-audio-only";
2666
+ Jn(l.uploadProgressLabel, "none"), ve && ve.startTime >= Kn && ve.abort();
2667
+ const S = U.document.getElementById("ul-camera-button");
2668
+ T ? (l.children()[0].classList.add("vjs-hidden"), I.removeClass(h), I.addClass(y), S.innerHTML = me.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), m == null || m.getTracks().forEach((N) => {
2669
+ N.stop();
2670
+ }), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((N) => {
2671
+ m = N, N.getVideoTracks().forEach((O) => {
2672
+ O.enabled = !1;
2673
+ }), l.record().onDeviceReady(N);
2674
+ }).catch(l.record().onDeviceError.bind(l.record()))) : (m == null || m.getVideoTracks().forEach((N) => {
2675
+ N.enabled = !0;
2676
+ }), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), I.removeClass(y), I.addClass(h), S.innerHTML = me.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
2677
+ }, v = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
2678
+ v.hasClass(se) || (Ee({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: g, envId: f, metadata: { questionId: p, responseGroupUid: c, surveyId: u } }), b(l.cameraOff), o(V.DELETE, {}), I.removeClass(se), v.addClass(se));
2665
2679
  } });
2666
- b.addClass("ul-video-recorder-delete-button"), b.el_.appendChild(nt(pe.DeleteButton, "ul-delete-button"));
2667
- const w = U.document.getElementById(t), y = () => {
2668
- w.classList.contains("vjs-fullscreen") && l.cameraOff ? w.style.display = "table" : w.style.display = "flex";
2680
+ v.addClass("ul-video-recorder-delete-button"), v.el_.appendChild(ot(me.DeleteButton, "ul-delete-button"));
2681
+ const k = U.document.getElementById(t), _ = () => {
2682
+ k.classList.contains("vjs-fullscreen") && l.cameraOff ? k.style.display = "table" : k.style.display = "flex";
2669
2683
  };
2670
- y();
2684
+ _();
2671
2685
  const I = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
2672
- l.record().isRecording() || (l.cameraOff = !l.cameraOff, Se({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: p, responseGroupUid: c, surveyId: u, cameraOff: l.cameraOff } }), _(l.cameraOff), !b.hasClass(ie) && b.addClass(ie), o(A.DELETE, {}), y());
2686
+ l.record().isRecording() || (l.cameraOff = !l.cameraOff, Ee({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: p, responseGroupUid: c, surveyId: u, cameraOff: l.cameraOff } }), b(l.cameraOff), !v.hasClass(se) && v.addClass(se), o(V.DELETE, {}), _());
2673
2687
  } });
2674
- I.addClass(Ct), I.el_.appendChild(nt(pe.TurnOffCamera, "ul-camera-button"));
2688
+ I.addClass(It), I.el_.appendChild(ot(me.TurnOffCamera, "ul-camera-button"));
2675
2689
  const j = new (U.videojs.getComponent("Button"))(l, { clickHandler: () => {
2676
- const S = U.document.getElementById("ul-recorder-toggle");
2677
- if (l.record().isRecording()) l.record().stop(), S && (S.innerHTML = pe.RecordButton), j.removeClass(St), b.removeClass(ie);
2690
+ const T = U.document.getElementById("ul-recorder-toggle");
2691
+ if (l.record().isRecording()) l.record().stop(), T && (T.innerHTML = me.RecordButton), j.removeClass(jt), v.removeClass(se);
2678
2692
  else {
2679
2693
  const h = U.document.getElementById("ul-recording-countdown-screen");
2680
- if (h) h.remove(), S && (S.innerHTML = pe.RecordButton), _(l.cameraOff), o(A.DELETE, {}), I.removeClass(ie), b.addClass(ie), j.removeClass(St), x.show();
2694
+ if (h) h.remove(), T && (T.innerHTML = me.RecordButton), b(l.cameraOff), o(V.DELETE, {}), I.removeClass(se), v.addClass(se), j.removeClass(jt), x.show();
2681
2695
  else {
2682
- j.addClass(St), x.hide(), I.addClass(ie), b.addClass(ie), S && (S.innerHTML = pe.StopButton);
2683
- const v = U.document.createElement("div");
2684
- v.id = "ul-recording-countdown-screen", w.insertBefore(v, w.children[1]), v.style.height = `${w.offsetHeight}px`, yo(l, 3);
2696
+ j.addClass(jt), x.hide(), I.addClass(se), v.addClass(se), T && (T.innerHTML = me.StopButton);
2697
+ const y = U.document.createElement("div");
2698
+ y.id = "ul-recording-countdown-screen", k.insertBefore(y, k.children[1]), y.style.height = `${k.offsetHeight}px`, wo(l, 3);
2685
2699
  }
2686
2700
  }
2687
2701
  } });
2688
- j.addClass("ul-video-recorder-toggle-button"), j.el_.appendChild(nt(pe.RecordButton, "ul-recorder-toggle"));
2689
- const k = U.document.createElement("p");
2690
- k.style.visibility = "hidden", k.className = "ul-upload-progress-label", e.appendChild(k), l.uploadProgressLabel = k;
2691
- const E = bo(l, [b, I, "PlayToggle", j, "FullscreenToggle"]), x = E.children().find((S) => S.name_ === "FullscreenToggle");
2702
+ j.addClass("ul-video-recorder-toggle-button"), j.el_.appendChild(ot(me.RecordButton, "ul-recorder-toggle"));
2703
+ const w = U.document.createElement("p");
2704
+ w.style.visibility = "hidden", w.className = "ul-upload-progress-label", e.appendChild(w), l.uploadProgressLabel = w;
2705
+ const E = xo(l, [v, I, "PlayToggle", j, "FullscreenToggle"]), x = E.children().find((T) => T.name_ === "FullscreenToggle");
2692
2706
  x.hasClass("vjs-disabled") && x.hide();
2693
- const R = E.children().find((S) => S.name_ === "PlayToggle");
2694
- R.hide(), b.addClass(ie), _o(l, E, i, !1, d), l.on("stopRecord", () => {
2695
- j.hide(), R.show(), x.show(), b.removeClass(ie);
2707
+ const P = E.children().find((T) => T.name_ === "PlayToggle");
2708
+ P.hide(), v.addClass(se), ko(l, E, i, !1, d), l.on("stopRecord", () => {
2709
+ j.hide(), P.show(), x.show(), v.removeClass(se);
2696
2710
  }), l.on("deviceReady", () => {
2697
- j.show(), R.hide(), b.addClass(ie);
2698
- }), ((S, h, v, C, T) => {
2699
- const { surveyId: D, responseGroupUid: N, visitorId: P, envId: O } = S.payload;
2700
- S.on("deviceError", function() {
2701
- console.warn("device error: ", S.deviceErrorCode), S.deviceErrorCode.message === "Permission denied" ? (S.deviceButton.addClass("permission-denied"), v && v(A.ERROR, { type: A.PERMISSION_DENIED }), Se({ event: "Video Permission Denied", apiBase: h, headers: T, visitorId: P, envId: O, metadata: { questionId: Et(S, wt), responseGroupUid: N, surveyId: D } })) : (v && v(A.ERROR, { type: A.OTHER }), ye(new Error(S.deviceErrorCode.message), "recorderDeviceError", h, T, P, O));
2702
- }), S.on("error", function(V, F) {
2703
- ye(F || S.error(), "recorderError", h, T, P, O);
2704
- }), S.on("startRecord", function(V, F) {
2705
- C(S.uploadProgressLabel, "none"), Se({ event: "Video Record Start", apiBase: h, headers: T, visitorId: P, envId: O, metadata: { questionId: Et(S, wt), responseGroupUid: N, surveyId: D } });
2706
- }), S.on("finishRecord", async function() {
2707
- C(S.uploadProgressLabel, "start", 0);
2708
- const V = Et(S, wt);
2709
- if (!D) {
2710
- const re = "internal error: missing fields in payload";
2711
- return v && v(A.ERROR, { type: A.OTHER }), ye(new Error(re), "finishRecord", h, T, P, O), null;
2711
+ j.show(), P.hide(), v.addClass(se);
2712
+ }), ((T, h, y, S, N) => {
2713
+ const { surveyId: O, responseGroupUid: C, visitorId: L, envId: M } = T.payload;
2714
+ T.on("deviceError", function() {
2715
+ console.warn("device error: ", T.deviceErrorCode), T.deviceErrorCode.message === "Permission denied" ? (T.deviceButton.addClass("permission-denied"), y && y(V.ERROR, { type: V.PERMISSION_DENIED }), Ee({ event: "Video Permission Denied", apiBase: h, headers: N, visitorId: L, envId: M, metadata: { questionId: Tt(T, Et), responseGroupUid: C, surveyId: O } })) : (y && y(V.ERROR, { type: V.OTHER }), xe(new Error(T.deviceErrorCode.message), "recorderDeviceError", h, N, L, M));
2716
+ }), T.on("error", function(A, q) {
2717
+ xe(q || T.error(), "recorderError", h, N, L, M);
2718
+ }), T.on("startRecord", function(A, q) {
2719
+ S(T.uploadProgressLabel, "none"), Ee({ event: "Video Record Start", apiBase: h, headers: N, visitorId: L, envId: M, metadata: { questionId: Tt(T, Et), responseGroupUid: C, surveyId: O } });
2720
+ }), T.on("finishRecord", async function() {
2721
+ S(T.uploadProgressLabel, "start", 0);
2722
+ const A = Tt(T, Et);
2723
+ if (!O) {
2724
+ const J = "internal error: missing fields in payload";
2725
+ return y && y(V.ERROR, { type: V.OTHER }), xe(new Error(J), "finishRecord", h, N, L, M), null;
2712
2726
  }
2713
- S.record().stopDevice();
2714
- const F = S.cameraOff ? A.MEDIA_TYPE_AUDIO : A.MEDIA_TYPE_VIDEO, Q = Tt();
2715
- Se({ event: "Video Record Finish", apiBase: h, headers: T, visitorId: P, envId: O, metadata: { mediaRecordingUid: Q, questionId: V, responseGroupUid: N, surveyId: D, mediaType: F } });
2716
- const Z = { surveyId: D, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: F, mediaRecordingUid: Q };
2717
- V && (Z.questionId = V), N && (Z.responseGroupUid = N), P && (Z.visitorId = P);
2718
- const se = await (async () => {
2719
- const re = await fetch(`${h}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(Z) });
2720
- if (re.ok) {
2721
- const Re = await re.json();
2722
- return v && v(A.UPLOAD_STARTED, { [A.UPLOAD_ID]: Re.upload.id, [A.MEDIA_TYPE]: F, [A.MEDIA_RECORDING_UID]: Q }), Re.upload.url;
2727
+ T.record().stopDevice();
2728
+ const q = T.cameraOff ? V.MEDIA_TYPE_AUDIO : V.MEDIA_TYPE_VIDEO, z = Dt();
2729
+ Ee({ event: "Video Record Finish", apiBase: h, headers: N, visitorId: L, envId: M, metadata: { mediaRecordingUid: z, questionId: A, responseGroupUid: C, surveyId: O, mediaType: q } });
2730
+ const Q = { surveyId: O, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: q, mediaRecordingUid: z };
2731
+ A && (Q.questionId = A), C && (Q.responseGroupUid = C), L && (Q.visitorId = L);
2732
+ const K = await (async () => {
2733
+ const J = await fetch(`${h}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(Q) });
2734
+ if (J.ok) {
2735
+ const ue = await J.json();
2736
+ return y && y(V.UPLOAD_STARTED, { [V.UPLOAD_ID]: ue.upload.id, [V.MEDIA_TYPE]: q, [V.MEDIA_RECORDING_UID]: z }), ue.upload.url;
2723
2737
  }
2724
- return v && v(A.ERROR, { type: A.OTHER, response: re }), ye(new Error("failed to get upload response with url"), "finishRecord", h, T, P, O), null;
2738
+ return y && y(V.ERROR, { type: V.OTHER, response: J }), xe(new Error("failed to get upload response with url"), "finishRecord", h, N, L, M), null;
2725
2739
  })();
2726
- se && (fe = U.document.defaultView.UpChunk.createUpload({ endpoint: se, file: new U.document.defaultView.File([S.recordedData], `recording ${F} ${Date.now()}`), chunkSize: 5120 }), fe.startTime = Date.now(), Se({ event: "Video Upload Start", apiBase: h, headers: T, visitorId: P, envId: O, metadata: { mediaRecordingUid: Q, questionId: V, responseGroupUid: N, surveyId: D, mediaType: F, url: se } }), fe.on("error", (re) => {
2727
- C(S.uploadProgressLabel, "none"), v && v(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: Q }), ye(re, "finishRecord", h, T, P, O);
2728
- }), fe.on("progress", (re) => {
2729
- v && v(A.UPLOAD_PROGRESS, { [A.MEDIA_RECORDING_UID]: Q, [A.UPLOAD_PROGRESS_PCT]: re.detail }), C(S.uploadProgressLabel, "progress", re.detail);
2730
- }), fe.on("success", () => {
2731
- C(S.uploadProgressLabel, "success"), v && v(A.UPLOAD_FINISHED, { [A.MEDIA_RECORDING_UID]: Q }), Se({ event: "Video Upload Success", apiBase: h, headers: T, visitorId: P, envId: O, metadata: { mediaRecordingUid: Q, questionId: V, responseGroupUid: N, surveyId: D, mediaType: F, url: se, elapsedMs: fe.startTime && Date.now() - fe.startTime } });
2740
+ K && (ve = U.document.defaultView.UpChunk.createUpload({ endpoint: K, file: new U.document.defaultView.File([T.recordedData], `recording ${q} ${Date.now()}`), chunkSize: 5120 }), ve.startTime = Date.now(), Ee({ event: "Video Upload Start", apiBase: h, headers: N, visitorId: L, envId: M, metadata: { mediaRecordingUid: z, questionId: A, responseGroupUid: C, surveyId: O, mediaType: q, url: K } }), ve.on("error", (J) => {
2741
+ S(T.uploadProgressLabel, "none"), y && y(V.UPLOAD_FINISHED, { [V.MEDIA_RECORDING_UID]: z }), xe(J, "finishRecord", h, N, L, M);
2742
+ }), ve.on("progress", (J) => {
2743
+ y && y(V.UPLOAD_PROGRESS, { [V.MEDIA_RECORDING_UID]: z, [V.UPLOAD_PROGRESS_PCT]: J.detail }), S(T.uploadProgressLabel, "progress", J.detail);
2744
+ }), ve.on("success", () => {
2745
+ S(T.uploadProgressLabel, "success"), y && y(V.UPLOAD_FINISHED, { [V.MEDIA_RECORDING_UID]: z }), Ee({ event: "Video Upload Success", apiBase: h, headers: N, visitorId: L, envId: M, metadata: { mediaRecordingUid: z, questionId: A, responseGroupUid: C, surveyId: O, mediaType: q, url: K, elapsedMs: ve.startTime && Date.now() - ve.startTime } });
2732
2746
  }));
2733
2747
  });
2734
- })(l, r, o, Gn, s);
2735
- const L = [{ name: "microphone" }];
2736
- !l.cameraOff && L.push({ name: "camera" }), Promise.all(L.map((S) => {
2748
+ })(l, r, o, Jn, s);
2749
+ const D = [{ name: "microphone" }];
2750
+ !l.cameraOff && D.push({ name: "camera" }), Promise.all(D.map((T) => {
2737
2751
  var h;
2738
- return (h = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : h.query(S);
2739
- })).then((S) => {
2740
- S.reduce((h, v) => h & v.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
2741
- }).catch((S) => {
2752
+ return (h = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : h.query(T);
2753
+ })).then((T) => {
2754
+ T.reduce((h, y) => h & y.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
2755
+ }).catch((T) => {
2742
2756
  });
2743
- }, yo = (e, t = 3) => {
2757
+ }, wo = (e, t = 3) => {
2744
2758
  const n = U.document.getElementById("ul-recording-countdown-screen");
2745
2759
  n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
2746
- yo(e, t - 1);
2760
+ wo(e, t - 1);
2747
2761
  }, 1e3));
2748
- }, xo = (e) => {
2762
+ }, Co = (e) => {
2749
2763
  const t = U.document.createElement("div");
2750
2764
  return t.className = "ul-video-container", t.appendChild(((n) => {
2751
2765
  const r = U.document.createElement("div");
2752
- return r.className = "ul-video-player-loading", r.id = en(n), ["first", "second", "third", "fourth"].map((o) => {
2766
+ return r.className = "ul-video-player-loading", r.id = rn(n), ["first", "second", "third", "fourth"].map((o) => {
2753
2767
  const i = U.document.createElement("div");
2754
2768
  i.className = o, r.appendChild(i);
2755
2769
  }), r;
2756
2770
  })(e)), t;
2757
- }, Ht = (e, t) => {
2771
+ }, At = (e, t) => {
2758
2772
  const n = U.document.createElement("video");
2759
2773
  n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
2760
2774
  const r = U.document.createElement("p");
2761
2775
  r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
2762
2776
  const o = U.document.createElement("a");
2763
2777
  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;
2764
- }, is = (e, t) => {
2778
+ }, ds = (e, t) => {
2765
2779
  e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), U.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
2766
- }, lt = (e, t) => U.document.getElementById(e) ? t ? U.videojs(e, t) : U.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), ss = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
2780
+ }, ct = (e, t) => U.document.getElementById(e) ? t ? U.videojs(e, t) : U.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), cs = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
2767
2781
  U.document = i;
2768
- const l = e + fo, u = xo(l);
2782
+ const l = e + _o, u = Co(l);
2769
2783
  return U.document.addEventListener("securitypolicyviolation", (p) => {
2770
- ye(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2771
- }), vo(go, () => {
2772
- U.document.getElementById(en(l)).remove(), Ht(l, u);
2784
+ xe(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
2785
+ }), yo(bo, () => {
2786
+ U.document.getElementById(rn(l)).remove(), At(l, u);
2773
2787
  const p = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
2774
2788
  try {
2775
- const c = e + Qn;
2776
- Ht(c, u);
2777
- const m = lt(l, p), f = lt(c, { muted: !0, ...p });
2778
- if (!m || !f) return;
2779
- ((b, w, y) => {
2780
- b.addClass(`ul${Qn}`);
2781
- const I = new (U.videojs.getComponent("Component"))(b);
2782
- w && b.src(w), b.addChild(I), y && y(b);
2783
- })(f, s, d), s || f.addClass(ie);
2784
- const g = bo(m, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), _ = g.children().find((b) => b.name_ === "FullscreenToggle");
2785
- _.hasClass("vjs-disabled") && _.hide(), _o(m, g, t, n, r, f);
2789
+ const c = e + Gn;
2790
+ At(c, u);
2791
+ const g = ct(l, p), f = ct(c, { muted: !0, ...p });
2792
+ if (!g || !f) return;
2793
+ ((v, k, _) => {
2794
+ v.addClass(`ul${Gn}`);
2795
+ const I = new (U.videojs.getComponent("Component"))(v);
2796
+ k && v.src(k), v.addChild(I), _ && _(v);
2797
+ })(f, s, d), s || f.addClass(se);
2798
+ const m = xo(g, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), b = m.children().find((v) => v.name_ === "FullscreenToggle");
2799
+ b.hasClass("vjs-disabled") && b.hide(), ko(g, m, t, n, r, f);
2786
2800
  } catch (c) {
2787
- return void ye(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
2801
+ return void xe(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
2788
2802
  }
2789
2803
  }), u;
2790
- }, as = (e) => {
2804
+ }, us = (e) => {
2791
2805
  if (!e) return null;
2792
2806
  const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
2793
2807
  let n = t ? t[1] : null;
2794
- return n.includes($n) && (n = n.replace($n, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2795
- }, A = { 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" }, pe = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, Te = "ul-card-video__player_recorder", Yn = "ul-video-btn", It = 0, Kn = 1, ls = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2796
- const { apiURL: s, envId: d, handleUploadUpdate: l, headers: u, responseGroupUid: p, surveyId: c, update: m, viewDocument: f, visitorId: g } = q((h) => ({ apiURL: h.apiURL, envId: h.envId, handleUploadUpdate: h.handleUploadUpdate, headers: h.headers, responseGroupUid: h.responseGroupUid, surveyId: h.surveyId, update: h.update, viewDocument: h.viewDocument, visitorId: h.userId })), [_, b] = z(!1), [w, y] = z(null), [I, j] = z(null), [k, E] = z(It), x = J(null), R = r && r.videoUrl;
2808
+ return n.includes(Zn) && (n = n.replace(Zn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
2809
+ }, V = { 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" }, me = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, Le = "ul-card-video__player_recorder", Xn = "ul-video-btn", Lt = 0, er = 1, ps = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
2810
+ const { apiURL: s, envId: d, handleUploadUpdate: l, headers: u, responseGroupUid: p, surveyId: c, update: g, viewDocument: f, visitorId: m } = F((h) => ({ apiURL: h.apiURL, envId: h.envId, handleUploadUpdate: h.handleUploadUpdate, headers: h.headers, responseGroupUid: h.responseGroupUid, surveyId: h.surveyId, update: h.update, viewDocument: h.viewDocument, visitorId: h.userId })), [b, v] = $(!1), [k, _] = $(null), [I, j] = $(null), [w, E] = $(Lt), x = ee(null), P = r && r.videoUrl;
2797
2811
  Y(() => {
2798
- const h = x.current, v = new ResizeObserver(() => {
2799
- m();
2812
+ const h = x.current, y = new ResizeObserver(() => {
2813
+ g();
2800
2814
  });
2801
- return h && v.observe(h), () => {
2802
- h && v.unobserve(h);
2815
+ return h && y.observe(h), () => {
2816
+ h && y.unobserve(h);
2803
2817
  };
2804
- }, [m]);
2805
- const L = (h, v) => {
2806
- h === A.UPLOAD_STARTED ? (y(v[A.UPLOAD_ID]), j(v[A.MEDIA_RECORDING_UID]), b(!0)) : h === A.DELETE ? (y(null), j(null), b(!1)) : h === A.UPLOAD_PROGRESS ? isNaN(v[A.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: v[A.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: v[A.MEDIA_RECORDING_UID], progressPct: v[A.UPLOAD_PROGRESS_PCT] }) : h === A.UPLOAD_FINISHED && l({ mediaRecordingUid: v[A.MEDIA_RECORDING_UID], isComplete: !0 });
2807
- }, S = (h) => {
2808
- h.preventDefault(), h.stopPropagation(), document.getElementById(Te) && ((v) => {
2809
- const C = v + Wn;
2810
- if (U.document.getElementById(C) && U.videojs) {
2818
+ }, [g]);
2819
+ const D = (h, y) => {
2820
+ h === V.UPLOAD_STARTED ? (_(y[V.UPLOAD_ID]), j(y[V.MEDIA_RECORDING_UID]), v(!0)) : h === V.DELETE ? (_(null), j(null), v(!1)) : h === V.UPLOAD_PROGRESS ? isNaN(y[V.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: y[V.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: y[V.MEDIA_RECORDING_UID], progressPct: y[V.UPLOAD_PROGRESS_PCT] }) : h === V.UPLOAD_FINISHED && l({ mediaRecordingUid: y[V.MEDIA_RECORDING_UID], isComplete: !0 });
2821
+ }, T = (h) => {
2822
+ h.preventDefault(), h.stopPropagation(), document.getElementById(Le) && ((y) => {
2823
+ const S = y + Yn;
2824
+ if (U.document.getElementById(S) && U.videojs) {
2811
2825
  try {
2812
- if (!U.videojs(C).record().stream) return;
2826
+ if (!U.videojs(S).record().stream) return;
2813
2827
  } catch {
2814
2828
  return;
2815
2829
  }
2816
- U.videojs(C).record().stop(), U.videojs(C).record().stopDevice();
2830
+ U.videojs(S).record().stop(), U.videojs(S).record().stopDevice();
2817
2831
  }
2818
- })(Te), w && I ? (l({ mediaRecordingUid: I, isSubmitted: !0 }), n({ value: { mediaRecordingUid: I }, questionId: o, type: i }, !0)) : n({ value: null, questionId: o, type: i }, !0);
2832
+ })(Le), k && I ? (l({ mediaRecordingUid: I, isSubmitted: !0 }), n({ value: { mediaRecordingUid: I }, questionId: o, type: i }, !0)) : n({ value: null, questionId: o, type: i }, !0);
2819
2833
  };
2820
- return a("form", { className: H(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(ue, { message: t, properties: r }), a(_e, { children: [a("div", { id: "ul-question-player-container", ref: x, style: { display: k === It ? "" : "none" }, children: [a("div", { id: Te, ref: (h) => {
2834
+ return a("form", { className: H(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(pe, { message: t, properties: r }), a(ye, { children: [a("div", { id: "ul-question-player-container", ref: x, style: { display: w === Lt ? "" : "none" }, children: [a("div", { id: Le, ref: (h) => {
2821
2835
  if (h && h.children.length === 0 && !r.hideRecordedPrompt) {
2822
- const v = ss(Te, { src: R, type: "application/x-mpegURL" }, void 0, r.mediaType === A.MEDIA_TYPE_AUDIO, s, f);
2823
- h.appendChild(v);
2836
+ const y = cs(Le, { src: P, type: "application/x-mpegURL" }, void 0, r.mediaType === V.MEDIA_TYPE_AUDIO, s, f);
2837
+ h.appendChild(y);
2824
2838
  }
2825
- } }), a(be, { defaultBody: () => a("button", { className: `${Yn} ul-record-response-btn`, onClick: (h) => {
2826
- h.preventDefault(), h.stopPropagation(), document.getElementById(Te) && ((v) => {
2827
- const C = lt(v + fo);
2828
- C == null || C.pause();
2829
- })(Te), E(Kn);
2830
- } }), properties: r })] }), a("div", { style: { display: k === Kn ? "block" : "none" }, children: [a("button", { className: `${Yn} ul-back-question-btn`, onClick: (h) => {
2831
- h.preventDefault(), h.stopPropagation(), E(It);
2839
+ } }), a(_e, { defaultBody: () => a("button", { className: `${Xn} ul-record-response-btn`, onClick: (h) => {
2840
+ h.preventDefault(), h.stopPropagation(), document.getElementById(Le) && ((y) => {
2841
+ const S = ct(y + _o);
2842
+ S == null || S.pause();
2843
+ })(Le), E(er);
2844
+ } }), properties: r })] }), a("div", { style: { display: w === er ? "block" : "none" }, children: [a("button", { className: `${Xn} ul-back-question-btn`, onClick: (h) => {
2845
+ h.preventDefault(), h.stopPropagation(), E(Lt);
2832
2846
  }, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (h) => {
2833
2847
  if (h && h.children.length === 0) {
2834
- const v = ((C, T = {}, D = "https://api.userleap.com", N, P, O, V = !1, F = document) => {
2835
- U.document = F;
2836
- const Q = C + Wn, Z = xo(Q);
2837
- return U.document.addEventListener("securitypolicyviolation", (se) => {
2838
- ye(new Error(`Voice & Video feature violates ${se.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", D, O, T.visitorId, T.envId);
2839
- }), vo(go.concat(ns), () => {
2840
- Ht(Q, Z), U.document.getElementById(en(Q)).remove();
2848
+ const y = ((S, N = {}, O = "https://api.userleap.com", C, L, M, A = !1, q = document) => {
2849
+ U.document = q;
2850
+ const z = S + Yn, Q = Co(z);
2851
+ return U.document.addEventListener("securitypolicyviolation", (K) => {
2852
+ xe(new Error(`Voice & Video feature violates ${K.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", O, M, N.visitorId, N.envId);
2853
+ }), yo(bo.concat(ss), () => {
2854
+ At(z, Q), U.document.getElementById(rn(z)).remove();
2841
2855
  try {
2842
- os(Z, Q, T, D, N, P, O, V);
2843
- } catch (se) {
2844
- return void ye(new Error(`Error when creating video recorder player object ${se}`), "recorderDeviceError", D, O, T.visitorId, T.envId);
2856
+ ls(Q, z, N, O, C, L, M, A);
2857
+ } catch (K) {
2858
+ return void xe(new Error(`Error when creating video recorder player object ${K}`), "recorderDeviceError", O, M, N.visitorId, N.envId);
2845
2859
  }
2846
- }), Z;
2847
- })(Te, { surveyId: c, responseGroupUid: p, questionId: o, visitorId: g, envId: d }, s, L, void 0, { ...u, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === A.MEDIA_TYPE_AUDIO, f);
2848
- h.appendChild(v);
2860
+ }), Q;
2861
+ })(Le, { surveyId: c, responseGroupUid: p, questionId: o, visitorId: m, envId: d }, s, D, void 0, { ...u, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === V.MEDIA_TYPE_AUDIO, f);
2862
+ h.appendChild(y);
2849
2863
  }
2850
- } })] })] }), a(Ce, { children: [a(oe, { disabled: !_, onClick: S, children: Ee(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: S, style: { display: r.required ? "none" : "block", ..._ ? { display: "none" } : {} }, children: Kt(r) })] })] });
2851
- }, ds = ({ className: e }) => {
2852
- const { uploadProgress: t } = q((i) => ({ uploadProgress: i.uploadProgress }));
2864
+ } })] })] }), a(Se, { children: [a(ie, { disabled: !b, onClick: T, children: Ie(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: T, style: { display: r.required ? "none" : "block", ...b ? { display: "none" } : {} }, children: en(r) })] })] });
2865
+ }, ms = ({ className: e }) => {
2866
+ const { uploadProgress: t } = F((i) => ({ uploadProgress: i.uploadProgress }));
2853
2867
  let n, r;
2854
2868
  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.");
2855
2869
  const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
2856
- return a("div", { className: H(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(ue, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
2857
- }, cs = () => {
2858
- var w;
2859
- const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: u } = q((y) => ({ border: y.border, cards: y.cards, forceBrandedLogo: y.forceBrandedLogo, headers: y.headers, index: y.index, marketingUrl: y.marketingUrl, showSurveyBrand: y.showSurveyBrand, slugName: y.slugName, surveyId: y.surveyId, viewedCardCount: y.viewedCardCount })), p = J(null), c = t.filter((y) => y.type !== "uploading" && y.type !== "thanks"), m = ((y, I) => {
2870
+ return a("div", { className: H(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(pe, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
2871
+ }, hs = () => {
2872
+ var k;
2873
+ const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: u } = F((_) => ({ border: _.border, cards: _.cards, forceBrandedLogo: _.forceBrandedLogo, headers: _.headers, index: _.index, marketingUrl: _.marketingUrl, showSurveyBrand: _.showSurveyBrand, slugName: _.slugName, surveyId: _.surveyId, viewedCardCount: _.viewedCardCount })), p = ee(null), c = t.filter((_) => _.type !== "uploading" && _.type !== "thanks"), g = ((_, I) => {
2860
2874
  const j = /* @__PURE__ */ new Set(["thanks", "uploading"]);
2861
- if (I >= y.length || I < 0 || j.has(y[I].type)) return 0;
2862
- const k = y.filter((x) => !j.has(x.type));
2863
- if (I === k.length - 1) return 1;
2864
- const E = { [k.length - 1]: 1, [-1]: 0 };
2865
- for (let x = k.length - 2; x >= I; x--) {
2866
- const R = k[x], L = pi(x, R.props.routingOptions);
2867
- if (L.length === 0) {
2875
+ if (I >= _.length || I < 0 || j.has(_[I].type)) return 0;
2876
+ const w = _.filter((x) => !j.has(x.type));
2877
+ if (I === w.length - 1) return 1;
2878
+ const E = { [w.length - 1]: 1, [-1]: 0 };
2879
+ for (let x = w.length - 2; x >= I; x--) {
2880
+ const P = w[x], D = fi(x, P.props.routingOptions);
2881
+ if (D.length === 0) {
2868
2882
  E[x] = E[x + 1] + 1;
2869
2883
  continue;
2870
2884
  }
2871
- let S = 0, h = di(R);
2872
- if (h === null) return k.length - 1 - I;
2873
- for (let v = 0; v < L.length && h.length !== 0; v++) {
2874
- const { comparator: C, target: T, value: D } = L[v], N = h.filter((P) => {
2875
- const O = li({ value: P }, R.type, P), V = zr(P, R.type);
2876
- return !(O && C === "answered" || V && C === "partial" || !O && !V && C === "skipped" || C === "given_up" && ui(P) && P.taskStatus === "given.up" || O && R.type === "open" && (C === "contains" || C === "notcontains") || O && ci(C) && Gt[C](P, D));
2885
+ let T = 0, h = mi(P);
2886
+ if (h === null) return w.length - 1 - I;
2887
+ for (let y = 0; y < D.length && h.length !== 0; y++) {
2888
+ const { comparator: S, target: N, value: O } = D[y], C = h.filter((L) => {
2889
+ const M = pi({ value: L }, P.type, L), A = Wr(L, P.type);
2890
+ return !(M && S === "answered" || A && S === "partial" || !M && !A && S === "skipped" || S === "given_up" && gi(L) && L.taskStatus === "given.up" || M && P.type === "open" && (S === "contains" || S === "notcontains") || M && hi(S) && Jt[S](L, O));
2877
2891
  });
2878
- if (N.length < h.length) {
2879
- const P = parseInt(String(T), 10);
2880
- if (P !== -1 && P <= x || P >= k.length) return k.length - 1 - I;
2881
- S = Math.max(E[P] + 1, S);
2892
+ if (C.length < h.length) {
2893
+ const L = parseInt(String(N), 10);
2894
+ if (L !== -1 && L <= x || L >= w.length) return w.length - 1 - I;
2895
+ T = Math.max(E[L] + 1, T);
2882
2896
  }
2883
- h = N;
2897
+ h = C;
2884
2898
  }
2885
- h.length > 0 && (S = Math.max(E[x + 1] + 1, S)), E[x] = S;
2899
+ h.length > 0 && (T = Math.max(E[x + 1] + 1, T)), E[x] = T;
2886
2900
  }
2887
2901
  return E[I];
2888
- })(t, o), f = u + 1, g = f / (f + m), _ = to({ marketingUrl: i, slugName: d, surveyId: l, forceBrandedLogo: n });
2902
+ })(t, o), f = u + 1, m = f / (f + g), b = oo({ marketingUrl: i, slugName: d, surveyId: l, forceBrandedLogo: n });
2889
2903
  Y(() => {
2890
- p.current && (p.current.style.width = 100 * g + "%");
2891
- }, [g]);
2892
- const b = ((w = t[o]) == null ? void 0 : w.type) === "thanks";
2893
- return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: b && n ? a(eo, { marketingUrlLink: _ }) : a(ee, { children: [c.length > 1 && a("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: a("div", { className: "ul-progress-bar-current", ref: p, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a(Xr, { forceBrandedLogo: n, marketingUrlLink: _ }) : null] }) });
2894
- }, us = () => {
2895
- const e = q((s) => s.border), t = q((s) => s.cards), n = q((s) => s.index), r = q((s) => s.focusedQuestionId), { totalQuestions: o, fraction: i } = he(() => {
2904
+ p.current && (p.current.style.width = 100 * m + "%");
2905
+ }, [m]);
2906
+ const v = ((k = t[o]) == null ? void 0 : k.type) === "thanks";
2907
+ return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: v && n ? a(ro, { marketingUrlLink: b }) : a(ne, { children: [c.length > 1 && a("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: a("div", { className: "ul-progress-bar-current", ref: p, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a(no, { forceBrandedLogo: n, marketingUrlLink: b }) : null] }) });
2908
+ }, gs = () => {
2909
+ const e = F((s) => s.border), t = F((s) => s.cards), n = F((s) => s.index), r = F((s) => s.focusedQuestionId), { totalQuestions: o, fraction: i } = ge(() => {
2896
2910
  var u;
2897
2911
  const s = t.filter((p) => p.type !== "uploading" && p.type !== "thanks"), d = s.length;
2898
2912
  if (d <= 1) return { totalQuestions: d, fraction: 0 };
@@ -2901,97 +2915,97 @@ const Se = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, me
2901
2915
  return { totalQuestions: d, fraction: (l >= 0 ? l : 0) / d };
2902
2916
  }, [t, n, r]);
2903
2917
  return o <= 1 ? null : a("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: a("div", { className: "ul-progress-bar-current", style: { width: 100 * i + "%", border: `1px solid ${e ?? "#000"}` } }) });
2904
- }, ps = () => {
2905
- const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: u, index: p, minScrollableHeight: c, next: m, previewMode: f, productConfig: g, seen: _, showStripes: b, studyType: w, surveyId: y, update: I, useMobileStyling: j, viewDocument: k } = q((N) => ({ answers: N.answers, border: N.border, cards: N.cards, close: N.close, configureExitOnOverlayClick: N.configureExitOnOverlayClick, destroy: N.destroy, endCard: N.endCard, eventEmitFn: N.eventEmitFn, fontFamily: N.fontFamily, headers: N.headers, index: N.index, previewMode: N.previewMode, productConfig: N.productConfig, minScrollableHeight: N.minScrollableHeight, next: N.next, seen: N.seen, showStripes: N.showStripes, studyType: N.studyType, surveyId: N.surveyId, update: N.update, useMobileStyling: N.useMobileStyling, viewDocument: N.viewDocument })), E = J(null), x = J(!1), R = u["userleap-platform"], { props: L, type: S, name: h } = n[p];
2918
+ }, fs = () => {
2919
+ const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: u, index: p, minScrollableHeight: c, next: g, previewMode: f, productConfig: m, seen: b, showStripes: v, studyType: k, surveyId: _, update: I, useMobileStyling: j, viewDocument: w } = F((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 })), E = ee(null), x = ee(!1), P = u["userleap-platform"], { props: D, type: T, name: h } = n[p];
2906
2920
  Y(() => {
2907
- if (window.Sprig) return window.Sprig.trackHistory = (N) => q.getState().trackHistory(N), () => {
2921
+ if (window.Sprig) return window.Sprig.trackHistory = (C) => F.getState().trackHistory(C), () => {
2908
2922
  window.Sprig.trackHistory = void 0;
2909
2923
  };
2910
2924
  }, []), Y(() => {
2911
- E.current && (E.current.classList.contains("ul-app--visible") || E.current.classList.add("ul-app--visible"), !x.current && d && (x.current = !0, d(ce.SurveyAppeared, { name: ce.SurveyAppeared, "survey.id": y })));
2912
- }, [d, y]), Y(() => {
2913
- const N = () => {
2914
- k.visibilityState === "visible" && (_(), k.removeEventListener("visibilitychange", N));
2925
+ E.current && (E.current.classList.contains("ul-app--visible") || E.current.classList.add("ul-app--visible"), !x.current && d && (x.current = !0, d(ce.SurveyAppeared, { name: ce.SurveyAppeared, "survey.id": _ })));
2926
+ }, [d, _]), Y(() => {
2927
+ const C = () => {
2928
+ w.visibilityState === "visible" && (b(), w.removeEventListener("visibilitychange", C));
2915
2929
  };
2916
- return k.addEventListener("visibilitychange", N), N(), () => {
2917
- k.removeEventListener("visibilitychange", N);
2930
+ return w.addEventListener("visibilitychange", C), C(), () => {
2931
+ w.removeEventListener("visibilitychange", C);
2918
2932
  };
2919
- }, [_, k]), Y(() => {
2933
+ }, [b, w]), Y(() => {
2920
2934
  I();
2921
2935
  }, [p, I]), Y(() => {
2922
2936
  o(() => r());
2923
2937
  }, [r, o]);
2924
- const v = he(() => Lo(n, p), [n, p]), C = io(n), T = De((N) => {
2925
- m({ data: N, completeSurvey: () => i(Oe), endCard: s }), jo(k);
2926
- }, [m, i, s, k]);
2938
+ const y = ge(() => Ro(n, p), [n, p]), S = co(n), N = Pe((C) => {
2939
+ g({ data: C, completeSurvey: () => i(Oe), endCard: s }), Do(w);
2940
+ }, [g, i, s, w]);
2927
2941
  if (e) {
2928
- for (const N of e) if (N.questionId === h) {
2929
- let P;
2930
- if (S === "multiplechoice") {
2931
- const O = L.options.find(({ value: V }) => V === N.value);
2932
- if (!O) break;
2933
- P = { [O.id]: O.value };
2934
- } else P = N.value;
2935
- T({ value: P, type: S, questionId: N.questionId });
2942
+ for (const C of e) if (C.questionId === h) {
2943
+ let L;
2944
+ if (T === "multiplechoice") {
2945
+ const M = D.options.find(({ value: A }) => A === C.value);
2946
+ if (!M) break;
2947
+ L = { [M.id]: M.value };
2948
+ } else L = C.value;
2949
+ N({ value: L, type: T, questionId: C.questionId });
2936
2950
  break;
2937
2951
  }
2938
2952
  }
2939
- const D = !j && ((g == null ? void 0 : g.framePosition) === "center" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" || ((g == null ? void 0 : g.placement) || "").includes("center"));
2940
- return a("div", { className: H("ul-app", ot(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Oe, onClick: (N) => {
2941
- var F;
2942
- const P = window.sprigAPI, O = N.target;
2943
- if (!P || !O) return;
2944
- const V = [O, O.parentElement];
2945
- for (const Q of V) if (((F = Q == null ? void 0 : Q.tagName) == null ? void 0 : F.toLowerCase()) === "a") {
2946
- N.preventDefault();
2953
+ const O = !j && ((m == null ? void 0 : m.framePosition) === "center" || (m == null ? void 0 : m.desktopDisplay) === "center-modal" || ((m == null ? void 0 : m.placement) || "").includes("center"));
2954
+ return a("div", { className: H("ul-app", st(u) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Oe, onClick: (C) => {
2955
+ var q;
2956
+ const L = window.sprigAPI, M = C.target;
2957
+ if (!L || !M) return;
2958
+ const A = [M, M.parentElement];
2959
+ for (const z of A) if (((q = z == null ? void 0 : z.tagName) == null ? void 0 : q.toLowerCase()) === "a") {
2960
+ C.preventDefault();
2947
2961
  try {
2948
- const Z = new URL(Q.href);
2949
- Z.protocol !== "http:" && Z.protocol !== "https:" || (P == null || P.openUrl(Z.toString()));
2950
- } catch (Z) {
2951
- console.error(Z);
2962
+ const Q = new URL(z.href);
2963
+ Q.protocol !== "http:" && Q.protocol !== "https:" || (L == null || L.openUrl(Q.toString()));
2964
+ } catch (Q) {
2965
+ console.error(Q);
2952
2966
  }
2953
2967
  return;
2954
2968
  }
2955
- }, ref: E, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...D ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: H(ne("ul-card__container", j, w)), style: { ...w !== "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: [b && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), f && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), le(w) && a(us, {}), a("div", { className: H(gi("ul-card-main-content", R)), children: a(Vi, { cards: v, next: T, previousResponses: C }) }), !le(w) && a(cs, {})] }) }) }) });
2956
- }, ko = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", Jn = (e) => {
2957
- const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: ko() };
2969
+ }, ref: E, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...O ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: H(oe("ul-card__container", j, k)), style: { ...k !== "feedbackButton" || (m == null ? void 0 : m.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(m == null ? void 0 : m.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" }) }), f && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), le(k) && a(gs, {}), a("div", { className: H(_i("ul-card-main-content", P)), children: a(Wi, { cards: y, next: N, previousResponses: S }) }), !le(k) && a(hs, {})] }) }) }) });
2970
+ }, So = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", tr = (e) => {
2971
+ const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: So() };
2958
2972
  return new MediaRecorder(e, t);
2959
- }, Xn = (e, t, n) => {
2973
+ }, nr = (e, t, n) => {
2960
2974
  n[t] = [], e.ondataavailable = function(r) {
2961
2975
  n[t].push(r.data);
2962
2976
  }, e.currentMediaRecordingUid = t, e.start();
2963
2977
  };
2964
- function er(e, t, n, r, o, i) {
2978
+ function rr(e, t, n, r, o, i) {
2965
2979
  if (e && e.state !== "inactive") {
2966
2980
  const { "begin.callback": s } = r, d = e.currentMediaRecordingUid;
2967
2981
  if (!d) return;
2968
- s && s(d), e.onstop = () => async function(l, u, p, c, m, f, g) {
2969
- const _ = q.getState().viewDocument, { "upload.callback": b, "progress.callback": w } = c, y = { mediaType: p, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: m, ...c["passthrough.data"] }, I = await (async (x, R) => {
2970
- var S;
2971
- const L = await fetch(R, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(x) });
2972
- if (L.ok) {
2973
- const h = await L.json();
2974
- return (S = h == null ? void 0 : h.upload) == null ? void 0 : S.url;
2982
+ s && s(d), e.onstop = () => async function(l, u, p, c, g, f, m) {
2983
+ const b = F.getState().viewDocument, { "upload.callback": v, "progress.callback": k } = c, _ = { mediaType: p, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: g, ...c["passthrough.data"] }, I = await (async (x, P) => {
2984
+ var T;
2985
+ const D = await fetch(P, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(x) });
2986
+ if (D.ok) {
2987
+ const h = await D.json();
2988
+ return (T = h == null ? void 0 : h.upload) == null ? void 0 : T.url;
2975
2989
  }
2976
2990
  return null;
2977
- })(y, l);
2978
- if (!I) return void (b && b(null, { message: "failed to get upload url" }));
2979
- const j = new Blob(g, { type: ko() });
2980
- if (!_.defaultView) return;
2981
- const k = new _.defaultView.File([j], `recording video ${Date.now()}`), E = f.createUpload({ endpoint: I, file: k, chunkSize: 5120 });
2991
+ })(_, l);
2992
+ if (!I) return void (v && v(null, { message: "failed to get upload url" }));
2993
+ const j = new Blob(m, { type: So() });
2994
+ if (!b.defaultView) return;
2995
+ const w = new b.defaultView.File([j], `recording video ${Date.now()}`), E = f.createUpload({ endpoint: I, file: w, chunkSize: 5120 });
2982
2996
  E.on("error", (x) => {
2983
- b && b(null, x);
2997
+ v && v(null, x);
2984
2998
  }), E.on("progress", (x) => {
2985
- w && w(m, x);
2999
+ k && k(g, x);
2986
3000
  }), E.on("success", () => {
2987
- b && b(m, !0);
3001
+ v && v(g, !0);
2988
3002
  });
2989
3003
  }(t, 0, n, r, d, o, i), e.stop();
2990
3004
  }
2991
3005
  }
2992
- const ms = { state: { chunks: {} }, stopRecording(e) {
3006
+ const vs = { state: { chunks: {} }, stopRecording(e) {
2993
3007
  const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
2994
- this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && er(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && er(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
3008
+ this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && rr(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && rr(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
2995
3009
  }, handleCancelledStream(e) {
2996
3010
  const t = e.getVideoTracks(), n = e.getAudioTracks();
2997
3011
  let r = t.length && t[0];
@@ -3038,14 +3052,14 @@ const ms = { state: { chunks: {} }, stopRecording(e) {
3038
3052
  if (!t) return;
3039
3053
  const r = [];
3040
3054
  if (t.includes("video") && this.state.avStream) {
3041
- this.state.avRecorder = Jn(this.state.avStream);
3042
- const o = Tt();
3043
- Xn(this.state.avRecorder, o, this.state.chunks), r.push(o);
3055
+ this.state.avRecorder = tr(this.state.avStream);
3056
+ const o = Dt();
3057
+ nr(this.state.avRecorder, o, this.state.chunks), r.push(o);
3044
3058
  }
3045
3059
  if (t.includes("screen") && this.state.captureStream) {
3046
- this.state.screenRecorder = Jn(this.state.captureStream);
3047
- const o = Tt();
3048
- Xn(this.state.screenRecorder, o, this.state.chunks), r.push(o);
3060
+ this.state.screenRecorder = tr(this.state.captureStream);
3061
+ const o = Dt();
3062
+ nr(this.state.screenRecorder, o, this.state.chunks), r.push(o);
3049
3063
  }
3050
3064
  r && n && n(r);
3051
3065
  }, async finishTaskCallback(e) {
@@ -3058,15 +3072,15 @@ const ms = { state: { chunks: {} }, stopRecording(e) {
3058
3072
  const { "permission.status.callback": t } = e, n = this.state.avStream;
3059
3073
  t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
3060
3074
  }, lookAheadAndStopStream(e, t, n, r) {
3061
- const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = q.getState(), d = $r({ cards: n, index: e, hasEndCard: r, allResponses: s });
3075
+ const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = F.getState(), d = Zr({ cards: n, index: e, hasEndCard: r, allResponses: s });
3062
3076
  d !== null && n[d].type === "recordedtask" || [o, i].map((l) => {
3063
3077
  l && (l.state === "recording" && l.stop(), l.stream.getTracks().map((u) => {
3064
3078
  u.readyState === "live" && u.stop();
3065
3079
  }));
3066
3080
  });
3067
- } }, rt = Object.create(ms);
3068
- Object.freeze(rt);
3069
- const hs = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
3081
+ } }, it = Object.create(vs);
3082
+ Object.freeze(it);
3083
+ const bs = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
3070
3084
  const o = n.documentElement;
3071
3085
  let i;
3072
3086
  try {
@@ -3075,31 +3089,31 @@ const hs = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl:
3075
3089
  i = t.location.href;
3076
3090
  }
3077
3091
  return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
3078
- }, vs = { configure: function(e, t = !0) {
3079
- var w;
3080
- const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: u, viewWindow: p } = e, c = ot(e.headers) ? e.frame : u.body, m = e.UpChunk || window.UpChunk, f = Ve, g = ((y, I) => {
3081
- const j = [...y], k = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
3082
- return y.some((E) => k.has(E.type)) && j.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), I && j.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), j;
3092
+ }, xs = { configure: function(e, t = !0) {
3093
+ var k;
3094
+ const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: u, viewWindow: p } = e, c = st(e.headers) ? e.frame : u.body, g = e.UpChunk || window.UpChunk, f = ze, m = ((_, I) => {
3095
+ const j = [..._], w = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
3096
+ return _.some((E) => w.has(E.type)) && j.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), I && j.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), j;
3083
3097
  })(e.cards, !!o);
3084
- rt.configure(f, { cards: g, hasEndCard: !!o, apiURL: r, UpChunk: m }), 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: hs({ mode: e.mode, viewWindow: p, viewDocument: u, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: rt, recorderEventEmitter: f, 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 });
3085
- const { head: _ } = u;
3086
- if (nn({ 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;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.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}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.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:normal;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}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.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-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.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--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.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-card--matrix_grid_longform{width:100%}.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-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330;transition:none}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400;pointer-events:none}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer;pointer-events:auto}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.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:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#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}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.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 && nn({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
3087
- const y = u.createElement("link");
3088
- y.rel = "stylesheet", y.href = s, _.appendChild(y);
3098
+ it.configure(f, { cards: m, hasEndCard: !!o, apiURL: r, UpChunk: g }), F.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: m, 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: bs({ mode: e.mode, viewWindow: p, viewDocument: u, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: it, recorderEventEmitter: f, 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 });
3099
+ const { head: b } = u;
3100
+ if (sn({ 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;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.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}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.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:normal;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}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.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-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.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--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.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-card--matrix_grid_longform{width:100%}.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-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330;transition:none}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400;pointer-events:none}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer;pointer-events:auto}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.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:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#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}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.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 && sn({ document: u, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
3101
+ const _ = u.createElement("link");
3102
+ _.rel = "stylesheet", _.href = s, b.appendChild(_);
3089
3103
  }
3090
- if (!m && e.cards.some((y) => y.type === "recordedtask")) {
3091
- const y = u.createElement("script");
3092
- y.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", y.onload = () => {
3093
- rt.setUpChunk(p.UpChunk);
3094
- }, y.onerror = () => {
3104
+ if (!g && e.cards.some((_) => _.type === "recordedtask")) {
3105
+ const _ = u.createElement("script");
3106
+ _.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", _.onload = () => {
3107
+ it.setUpChunk(p.UpChunk);
3108
+ }, _.onerror = () => {
3095
3109
  console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
3096
- }, _.appendChild(y);
3110
+ }, b.appendChild(_);
3097
3111
  }
3098
- const b = i || ((w = d.eventEmitter) == null ? void 0 : w.emit);
3099
- b == null || b("verify.view.version", { "view.version": "2.36.1" }), c && t && (He(a(ps, {}), c), Ve.once(ce.SurveyClosed, () => {
3100
- Wt(c);
3112
+ const v = i || ((k = d.eventEmitter) == null ? void 0 : k.emit);
3113
+ v == null || v("verify.view.version", { "view.version": "2.37.1" }), c && t && (He(a(fs, {}), c), ze.once(ce.SurveyClosed, () => {
3114
+ Yt(c);
3101
3115
  }));
3102
3116
  } };
3103
3117
  export {
3104
- vs as default
3118
+ xs as default
3105
3119
  };