@sprig-technologies/sprig-bundled 1.1.0 → 1.1.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.
@@ -0,0 +1,3959 @@
1
+ import { g as dr, a as pr, C as b, b as G, T as z, c as bt, D as vt, A as fe, I as ee, e as Re, s as Me, S as re, d as ve, P as Ge, f as fr, R as _r, u as Qe, h as hr, i as mr, j as w, E as gr, k as V, l as ye, m as it, n as de, o as br, p as q, q as ke, r as H, t as L, M as Q, v as vr, w as yr, x as xr, y as yt, z as Cr } from "./index-BuamjNZy.js";
2
+ var we, x, Xt, ce, xt, en, Ke, tn, Se = {}, nn = [], kr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ue = Array.isArray;
3
+ function J(e, t) {
4
+ for (var n in t)
5
+ e[n] = t[n];
6
+ return e;
7
+ }
8
+ function rn(e) {
9
+ var t = e.parentNode;
10
+ t && t.removeChild(e);
11
+ }
12
+ function U(e, t, n) {
13
+ var r, o, i, a = {};
14
+ for (i in t)
15
+ i == "key" ? r = t[i] : i == "ref" ? o = t[i] : a[i] = t[i];
16
+ if (arguments.length > 2 && (a.children = arguments.length > 3 ? we.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
17
+ for (i in e.defaultProps)
18
+ a[i] === void 0 && (a[i] = e.defaultProps[i]);
19
+ return xe(e, a, r, o, null);
20
+ }
21
+ function xe(e, t, n, r, o) {
22
+ 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 ?? ++Xt, __i: -1, __u: 0 };
23
+ return o == null && x.vnode != null && x.vnode(i), i;
24
+ }
25
+ function on() {
26
+ return { current: null };
27
+ }
28
+ function D(e) {
29
+ return e.children;
30
+ }
31
+ function W(e, t) {
32
+ this.props = e, this.context = t;
33
+ }
34
+ function _e(e, t) {
35
+ if (t == null)
36
+ return e.__ ? _e(e.__, e.__i + 1) : null;
37
+ for (var n; t < e.__k.length; t++)
38
+ if ((n = e.__k[t]) != null && n.__e != null)
39
+ return n.__e;
40
+ return typeof e.type == "function" ? _e(e) : null;
41
+ }
42
+ function an(e) {
43
+ var t, n;
44
+ if ((e = e.__) != null && e.__c != null) {
45
+ for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
46
+ if ((n = e.__k[t]) != null && n.__e != null) {
47
+ e.__e = e.__c.base = n.__e;
48
+ break;
49
+ }
50
+ return an(e);
51
+ }
52
+ }
53
+ function Ye(e) {
54
+ (!e.__d && (e.__d = !0) && ce.push(e) && !$e.__r++ || xt !== x.debounceRendering) && ((xt = x.debounceRendering) || en)($e);
55
+ }
56
+ function $e() {
57
+ var e, t, n, r, o, i, a, l, c;
58
+ for (ce.sort(Ke); e = ce.shift(); )
59
+ e.__d && (t = ce.length, r = void 0, i = (o = (n = e).__v).__e, l = [], c = [], (a = n.__P) && ((r = J({}, o)).__v = o.__v + 1, x.vnode && x.vnode(r), at(a, r, o, n.__n, a.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, l, i ?? _e(o), !!(32 & o.__u), c), r.__.__k[r.__i] = r, cn(l, r, c), r.__e != i && an(r)), ce.length > t && ce.sort(Ke));
60
+ $e.__r = 0;
61
+ }
62
+ function sn(e, t, n, r, o, i, a, l, c, d, p) {
63
+ var s, _, f, g, m, y = r && r.__k || nn, v = t.length;
64
+ for (n.__d = c, Sr(n, t, y), c = n.__d, s = 0; s < v; s++)
65
+ (f = n.__k[s]) != null && typeof f != "boolean" && typeof f != "function" && (_ = f.__i === -1 ? Se : y[f.__i] || Se, f.__i = s, at(e, f, _, o, i, a, l, c, d, p), g = f.__e, f.ref && _.ref != f.ref && (_.ref && st(_.ref, null, f), p.push(f.ref, f.__c || g, f)), m == null && g != null && (m = g), 65536 & f.__u || _.__k === f.__k ? c = ln(f, c, e) : typeof f.type == "function" && f.__d !== void 0 ? c = f.__d : g && (c = g.nextSibling), f.__d = void 0, f.__u &= -196609);
66
+ n.__d = c, n.__e = m;
67
+ }
68
+ function Sr(e, t, n) {
69
+ var r, o, i, a, l, c = t.length, d = n.length, p = d, s = 0;
70
+ for (e.__k = [], r = 0; r < c; r++)
71
+ (o = e.__k[r] = (o = t[r]) == null || typeof o == "boolean" || typeof o == "function" ? null : typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? xe(null, o, null, null, o) : Ue(o) ? xe(D, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? xe(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o) != null ? (o.__ = e, o.__b = e.__b + 1, l = wr(o, n, a = r + s, p), o.__i = l, i = null, l !== -1 && (p--, (i = n[l]) && (i.__u |= 131072)), i == null || i.__v === null ? (l == -1 && s--, typeof o.type != "function" && (o.__u |= 65536)) : l !== a && (l === a + 1 ? s++ : l > a ? p > c - a ? s += l - a : s-- : s = l < a && l == a - 1 ? l - a : 0, l !== r + s && (o.__u |= 65536))) : (i = n[r]) && i.key == null && i.__e && (i.__e == e.__d && (e.__d = _e(i)), Je(i, i, !1), n[r] = null, p--);
72
+ if (p)
73
+ for (r = 0; r < d; r++)
74
+ (i = n[r]) != null && !(131072 & i.__u) && (i.__e == e.__d && (e.__d = _e(i)), Je(i, i));
75
+ }
76
+ function ln(e, t, n) {
77
+ var r, o;
78
+ if (typeof e.type == "function") {
79
+ for (r = e.__k, o = 0; r && o < r.length; o++)
80
+ r[o] && (r[o].__ = e, t = ln(r[o], t, n));
81
+ return t;
82
+ }
83
+ return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
84
+ }
85
+ function X(e, t) {
86
+ return t = t || [], e == null || typeof e == "boolean" || (Ue(e) ? e.some(function(n) {
87
+ X(n, t);
88
+ }) : t.push(e)), t;
89
+ }
90
+ function wr(e, t, n, r) {
91
+ var o = e.key, i = e.type, a = n - 1, l = n + 1, c = t[n];
92
+ if (c === null || c && o == c.key && i === c.type)
93
+ return n;
94
+ if (r > (c != null && !(131072 & c.__u) ? 1 : 0))
95
+ for (; a >= 0 || l < t.length; ) {
96
+ if (a >= 0) {
97
+ if ((c = t[a]) && !(131072 & c.__u) && o == c.key && i === c.type)
98
+ return a;
99
+ a--;
100
+ }
101
+ if (l < t.length) {
102
+ if ((c = t[l]) && !(131072 & c.__u) && o == c.key && i === c.type)
103
+ return l;
104
+ l++;
105
+ }
106
+ }
107
+ return -1;
108
+ }
109
+ function Ct(e, t, n) {
110
+ t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || kr.test(t) ? n : n + "px";
111
+ }
112
+ function Ne(e, t, n, r, o) {
113
+ var i;
114
+ e:
115
+ if (t === "style")
116
+ if (typeof n == "string")
117
+ e.style.cssText = n;
118
+ else {
119
+ if (typeof r == "string" && (e.style.cssText = r = ""), r)
120
+ for (t in r)
121
+ n && t in n || Ct(e.style, t, "");
122
+ if (n)
123
+ for (t in n)
124
+ r && n[t] === r[t] || Ct(e.style, t, n[t]);
125
+ }
126
+ else if (t[0] === "o" && t[1] === "n")
127
+ i = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? St : kt, i)) : e.removeEventListener(t, i ? St : kt, i);
128
+ else {
129
+ if (o)
130
+ t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
131
+ else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e)
132
+ try {
133
+ e[t] = n ?? "";
134
+ break e;
135
+ } catch {
136
+ }
137
+ typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
138
+ }
139
+ }
140
+ function kt(e) {
141
+ var t = this.l[e.type + !1];
142
+ if (e.t) {
143
+ if (e.t <= t.u)
144
+ return;
145
+ } else
146
+ e.t = Date.now();
147
+ return t(x.event ? x.event(e) : e);
148
+ }
149
+ function St(e) {
150
+ return this.l[e.type + !0](x.event ? x.event(e) : e);
151
+ }
152
+ function at(e, t, n, r, o, i, a, l, c, d) {
153
+ var p, s, _, f, g, m, y, v, C, S, E, h, T, I, N, k = t.type;
154
+ if (t.constructor !== void 0)
155
+ return null;
156
+ 128 & n.__u && (c = !!(32 & n.__u), i = [l = t.__e = n.__e]), (p = x.__b) && p(t);
157
+ e:
158
+ if (typeof k == "function")
159
+ try {
160
+ if (v = t.props, C = (p = k.contextType) && r[p.__c], S = p ? C ? C.props.value : p.__ : r, n.__c ? y = (s = t.__c = n.__c).__ = s.__E : ("prototype" in k && k.prototype.render ? t.__c = s = new k(v, S) : (t.__c = s = new W(v, S), s.constructor = k, s.render = Pr), C && C.sub(s), s.props = v, s.state || (s.state = {}), s.context = S, s.__n = r, _ = s.__d = !0, s.__h = [], s._sb = []), s.__s == null && (s.__s = s.state), k.getDerivedStateFromProps != null && (s.__s == s.state && (s.__s = J({}, s.__s)), J(s.__s, k.getDerivedStateFromProps(v, s.__s))), f = s.props, g = s.state, s.__v = t, _)
161
+ k.getDerivedStateFromProps == null && s.componentWillMount != null && s.componentWillMount(), s.componentDidMount != null && s.__h.push(s.componentDidMount);
162
+ else {
163
+ if (k.getDerivedStateFromProps == null && v !== f && s.componentWillReceiveProps != null && s.componentWillReceiveProps(v, S), !s.__e && (s.shouldComponentUpdate != null && s.shouldComponentUpdate(v, s.__s, S) === !1 || t.__v === n.__v)) {
164
+ for (t.__v !== n.__v && (s.props = v, s.state = s.__s, s.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function($) {
165
+ $ && ($.__ = t);
166
+ }), E = 0; E < s._sb.length; E++)
167
+ s.__h.push(s._sb[E]);
168
+ s._sb = [], s.__h.length && a.push(s);
169
+ break e;
170
+ }
171
+ s.componentWillUpdate != null && s.componentWillUpdate(v, s.__s, S), s.componentDidUpdate != null && s.__h.push(function() {
172
+ s.componentDidUpdate(f, g, m);
173
+ });
174
+ }
175
+ if (s.context = S, s.props = v, s.__P = e, s.__e = !1, h = x.__r, T = 0, "prototype" in k && k.prototype.render) {
176
+ for (s.state = s.__s, s.__d = !1, h && h(t), p = s.render(s.props, s.state, s.context), I = 0; I < s._sb.length; I++)
177
+ s.__h.push(s._sb[I]);
178
+ s._sb = [];
179
+ } else
180
+ do
181
+ s.__d = !1, h && h(t), p = s.render(s.props, s.state, s.context), s.state = s.__s;
182
+ while (s.__d && ++T < 25);
183
+ s.state = s.__s, s.getChildContext != null && (r = J(J({}, r), s.getChildContext())), _ || s.getSnapshotBeforeUpdate == null || (m = s.getSnapshotBeforeUpdate(f, g)), sn(e, Ue(N = p != null && p.type === D && p.key == null ? p.props.children : p) ? N : [N], t, n, r, o, i, a, l, c, d), s.base = t.__e, t.__u &= -161, s.__h.length && a.push(s), y && (s.__E = s.__ = null);
184
+ } catch ($) {
185
+ t.__v = null, c || i != null ? (t.__e = l, t.__u |= c ? 160 : 32, i[i.indexOf(l)] = null) : (t.__e = n.__e, t.__k = n.__k), x.__e($, t, n);
186
+ }
187
+ else
188
+ i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Tr(n.__e, t, n, r, o, i, a, c, d);
189
+ (p = x.diffed) && p(t);
190
+ }
191
+ function cn(e, t, n) {
192
+ t.__d = void 0;
193
+ for (var r = 0; r < n.length; r++)
194
+ st(n[r], n[++r], n[++r]);
195
+ x.__c && x.__c(t, e), e.some(function(o) {
196
+ try {
197
+ e = o.__h, o.__h = [], e.some(function(i) {
198
+ i.call(o);
199
+ });
200
+ } catch (i) {
201
+ x.__e(i, o.__v);
202
+ }
203
+ });
204
+ }
205
+ function Tr(e, t, n, r, o, i, a, l, c) {
206
+ var d, p, s, _, f, g, m, y = n.props, v = t.props, C = t.type;
207
+ if (C === "svg" && (o = !0), i != null) {
208
+ for (d = 0; d < i.length; d++)
209
+ if ((f = i[d]) && "setAttribute" in f == !!C && (C ? f.localName === C : f.nodeType === 3)) {
210
+ e = f, i[d] = null;
211
+ break;
212
+ }
213
+ }
214
+ if (e == null) {
215
+ if (C === null)
216
+ return document.createTextNode(v);
217
+ e = o ? document.createElementNS("http://www.w3.org/2000/svg", C) : document.createElement(C, v.is && v), i = null, l = !1;
218
+ }
219
+ if (C === null)
220
+ y === v || l && e.data === v || (e.data = v);
221
+ else {
222
+ if (i = i && we.call(e.childNodes), y = n.props || Se, !l && i != null)
223
+ for (y = {}, d = 0; d < e.attributes.length; d++)
224
+ y[(f = e.attributes[d]).name] = f.value;
225
+ for (d in y)
226
+ f = y[d], d == "children" || (d == "dangerouslySetInnerHTML" ? s = f : d === "key" || d in v || Ne(e, d, null, f, o));
227
+ for (d in v)
228
+ f = v[d], d == "children" ? _ = f : d == "dangerouslySetInnerHTML" ? p = f : d == "value" ? g = f : d == "checked" ? m = f : d === "key" || l && typeof f != "function" || y[d] === f || Ne(e, d, f, y[d], o);
229
+ if (p)
230
+ l || s && (p.__html === s.__html || p.__html === e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
231
+ else if (s && (e.innerHTML = ""), sn(e, Ue(_) ? _ : [_], t, n, r, o && C !== "foreignObject", i, a, i ? i[0] : n.__k && _e(n, 0), l, c), i != null)
232
+ for (d = i.length; d--; )
233
+ i[d] != null && rn(i[d]);
234
+ l || (d = "value", g !== void 0 && (g !== e[d] || C === "progress" && !g || C === "option" && g !== y[d]) && Ne(e, d, g, y[d], !1), d = "checked", m !== void 0 && m !== e[d] && Ne(e, d, m, y[d], !1));
235
+ }
236
+ return e;
237
+ }
238
+ function st(e, t, n) {
239
+ try {
240
+ typeof e == "function" ? e(t) : e.current = t;
241
+ } catch (r) {
242
+ x.__e(r, n);
243
+ }
244
+ }
245
+ function Je(e, t, n) {
246
+ var r, o;
247
+ if (x.unmount && x.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || st(r, null, t)), (r = e.__c) != null) {
248
+ if (r.componentWillUnmount)
249
+ try {
250
+ r.componentWillUnmount();
251
+ } catch (i) {
252
+ x.__e(i, t);
253
+ }
254
+ r.base = r.__P = null, e.__c = void 0;
255
+ }
256
+ if (r = e.__k)
257
+ for (o = 0; o < r.length; o++)
258
+ r[o] && Je(r[o], t, n || typeof e.type != "function");
259
+ n || e.__e == null || rn(e.__e), e.__ = e.__e = e.__d = void 0;
260
+ }
261
+ function Pr(e, t, n) {
262
+ return this.constructor(e, n);
263
+ }
264
+ function he(e, t, n) {
265
+ var r, o, i, a;
266
+ x.__ && x.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], a = [], at(t, e = (!r && n || t).__k = U(D, null, [e]), o || Se, Se, 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, a), cn(i, e, a);
267
+ }
268
+ function un(e, t) {
269
+ he(e, t, un);
270
+ }
271
+ function Er(e, t, n) {
272
+ var r, o, i, a, l = J({}, e.props);
273
+ for (i in e.type && e.type.defaultProps && (a = e.type.defaultProps), t)
274
+ i == "key" ? r = t[i] : i == "ref" ? o = t[i] : l[i] = t[i] === void 0 && a !== void 0 ? a[i] : t[i];
275
+ return arguments.length > 2 && (l.children = arguments.length > 3 ? we.call(arguments, 2) : n), xe(e.type, l, r || e.key, o || e.ref, null);
276
+ }
277
+ function dn(e, t) {
278
+ var n = { __c: t = "__cC" + tn++, __: e, Consumer: function(r, o) {
279
+ return r.children(o);
280
+ }, Provider: function(r) {
281
+ var o, i;
282
+ return this.getChildContext || (o = [], (i = {})[t] = this, this.getChildContext = function() {
283
+ return i;
284
+ }, this.shouldComponentUpdate = function(a) {
285
+ this.props.value !== a.value && o.some(function(l) {
286
+ l.__e = !0, Ye(l);
287
+ });
288
+ }, this.sub = function(a) {
289
+ o.push(a);
290
+ var l = a.componentWillUnmount;
291
+ a.componentWillUnmount = function() {
292
+ o.splice(o.indexOf(a), 1), l && l.call(a);
293
+ };
294
+ }), r.children;
295
+ } };
296
+ return n.Provider.__ = n.Consumer.contextType = n;
297
+ }
298
+ we = nn.slice, x = { __e: function(e, t, n, r) {
299
+ for (var o, i, a; t = t.__; )
300
+ if ((o = t.__c) && !o.__)
301
+ try {
302
+ if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), a = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), a = o.__d), a)
303
+ return o.__E = o;
304
+ } catch (l) {
305
+ e = l;
306
+ }
307
+ throw e;
308
+ } }, Xt = 0, W.prototype.setState = function(e, t) {
309
+ var n;
310
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = J({}, this.state), typeof e == "function" && (e = e(J({}, n), this.props)), e && J(n, e), e != null && this.__v && (t && this._sb.push(t), Ye(this));
311
+ }, W.prototype.forceUpdate = function(e) {
312
+ this.__v && (this.__e = !0, e && this.__h.push(e), Ye(this));
313
+ }, W.prototype.render = D, ce = [], en = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ke = function(e, t) {
314
+ return e.__v.__b - t.__v.__b;
315
+ }, $e.__r = 0, tn = 0;
316
+ function pn(e) {
317
+ var t, n, r = "";
318
+ if (typeof e == "string" || typeof e == "number")
319
+ r += e;
320
+ else if (typeof e == "object")
321
+ if (Array.isArray(e))
322
+ for (t = 0; t < e.length; t++)
323
+ e[t] && (n = pn(e[t])) && (r && (r += " "), r += n);
324
+ else
325
+ for (t in e)
326
+ e[t] && (r && (r += " "), r += t);
327
+ return r;
328
+ }
329
+ function R() {
330
+ for (var e, t, n = 0, r = ""; n < arguments.length; )
331
+ (e = arguments[n++]) && (t = pn(e)) && (r && (r += " "), r += t);
332
+ return r;
333
+ }
334
+ var te, A, qe, wt, me = 0, fn = [], Ie = [], Tt = x.__b, Pt = x.__r, Et = x.diffed, Nt = x.__c, Rt = x.unmount;
335
+ function ue(e, t) {
336
+ x.__h && x.__h(A, e, me || t), me = 0;
337
+ var n = A.__H || (A.__H = { __: [], __h: [] });
338
+ return e >= n.__.length && n.__.push({ __V: Ie }), n.__[e];
339
+ }
340
+ function B(e) {
341
+ return me = 1, lt(bn, e);
342
+ }
343
+ function lt(e, t, n) {
344
+ var r = ue(te++, 2);
345
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : bn(void 0, t), function(l) {
346
+ var c = r.__N ? r.__N[0] : r.__[0], d = r.t(c, l);
347
+ c !== d && (r.__N = [d, r.__[1]], r.__c.setState({}));
348
+ }], r.__c = A, !A.u)) {
349
+ var o = function(l, c, d) {
350
+ if (!r.__c.__H)
351
+ return !0;
352
+ var p = r.__c.__H.__.filter(function(_) {
353
+ return _.__c;
354
+ });
355
+ if (p.every(function(_) {
356
+ return !_.__N;
357
+ }))
358
+ return !i || i.call(this, l, c, d);
359
+ var s = !1;
360
+ return p.forEach(function(_) {
361
+ if (_.__N) {
362
+ var f = _.__[0];
363
+ _.__ = _.__N, _.__N = void 0, f !== _.__[0] && (s = !0);
364
+ }
365
+ }), !(!s && r.__c.props === l) && (!i || i.call(this, l, c, d));
366
+ };
367
+ A.u = !0;
368
+ var i = A.shouldComponentUpdate, a = A.componentWillUpdate;
369
+ A.componentWillUpdate = function(l, c, d) {
370
+ if (this.__e) {
371
+ var p = i;
372
+ i = void 0, o(l, c, d), i = p;
373
+ }
374
+ a && a.call(this, l, c, d);
375
+ }, A.shouldComponentUpdate = o;
376
+ }
377
+ return r.__N || r.__;
378
+ }
379
+ function F(e, t) {
380
+ var n = ue(te++, 3);
381
+ !x.__s && ut(n.__H, t) && (n.__ = e, n.i = t, A.__H.__h.push(n));
382
+ }
383
+ function Te(e, t) {
384
+ var n = ue(te++, 4);
385
+ !x.__s && ut(n.__H, t) && (n.__ = e, n.i = t, A.__h.push(n));
386
+ }
387
+ function ie(e) {
388
+ return me = 5, Ve(function() {
389
+ return { current: e };
390
+ }, []);
391
+ }
392
+ function _n(e, t, n) {
393
+ me = 6, Te(function() {
394
+ return typeof e == "function" ? (e(t()), function() {
395
+ return e(null);
396
+ }) : e ? (e.current = t(), function() {
397
+ return e.current = null;
398
+ }) : void 0;
399
+ }, n == null ? n : n.concat(e));
400
+ }
401
+ function Ve(e, t) {
402
+ var n = ue(te++, 7);
403
+ return ut(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
404
+ }
405
+ function hn(e, t) {
406
+ return me = 8, Ve(function() {
407
+ return e;
408
+ }, t);
409
+ }
410
+ function mn(e) {
411
+ var t = A.context[e.__c], n = ue(te++, 9);
412
+ return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(A)), t.props.value) : e.__;
413
+ }
414
+ function ct(e, t) {
415
+ x.useDebugValue && x.useDebugValue(t ? t(e) : e);
416
+ }
417
+ function Nr(e) {
418
+ var t = ue(te++, 10), n = B();
419
+ return t.__ = e, A.componentDidCatch || (A.componentDidCatch = function(r, o) {
420
+ t.__ && t.__(r, o), n[1](r);
421
+ }), [n[0], function() {
422
+ n[1](void 0);
423
+ }];
424
+ }
425
+ function gn() {
426
+ var e = ue(te++, 11);
427
+ if (!e.__) {
428
+ for (var t = A.__v; t !== null && !t.__m && t.__ !== null; )
429
+ t = t.__;
430
+ var n = t.__m || (t.__m = [0, 0]);
431
+ e.__ = "P" + n[0] + "-" + n[1]++;
432
+ }
433
+ return e.__;
434
+ }
435
+ function Rr() {
436
+ for (var e; e = fn.shift(); )
437
+ if (e.__P && e.__H)
438
+ try {
439
+ e.__H.__h.forEach(Le), e.__H.__h.forEach(Xe), e.__H.__h = [];
440
+ } catch (t) {
441
+ e.__H.__h = [], x.__e(t, e.__v);
442
+ }
443
+ }
444
+ x.__b = function(e) {
445
+ A = null, Tt && Tt(e);
446
+ }, x.__r = function(e) {
447
+ Pt && Pt(e), te = 0;
448
+ var t = (A = e.__c).__H;
449
+ t && (qe === A ? (t.__h = [], A.__h = [], t.__.forEach(function(n) {
450
+ n.__N && (n.__ = n.__N), n.__V = Ie, n.__N = n.i = void 0;
451
+ })) : (t.__h.forEach(Le), t.__h.forEach(Xe), t.__h = [], te = 0)), qe = A;
452
+ }, x.diffed = function(e) {
453
+ Et && Et(e);
454
+ var t = e.__c;
455
+ t && t.__H && (t.__H.__h.length && (fn.push(t) !== 1 && wt === x.requestAnimationFrame || ((wt = x.requestAnimationFrame) || Ir)(Rr)), t.__H.__.forEach(function(n) {
456
+ n.i && (n.__H = n.i), n.__V !== Ie && (n.__ = n.__V), n.i = void 0, n.__V = Ie;
457
+ })), qe = A = null;
458
+ }, x.__c = function(e, t) {
459
+ t.some(function(n) {
460
+ try {
461
+ n.__h.forEach(Le), n.__h = n.__h.filter(function(r) {
462
+ return !r.__ || Xe(r);
463
+ });
464
+ } catch (r) {
465
+ t.some(function(o) {
466
+ o.__h && (o.__h = []);
467
+ }), t = [], x.__e(r, n.__v);
468
+ }
469
+ }), Nt && Nt(e, t);
470
+ }, x.unmount = function(e) {
471
+ Rt && Rt(e);
472
+ var t, n = e.__c;
473
+ n && n.__H && (n.__H.__.forEach(function(r) {
474
+ try {
475
+ Le(r);
476
+ } catch (o) {
477
+ t = o;
478
+ }
479
+ }), n.__H = void 0, t && x.__e(t, n.__v));
480
+ };
481
+ var It = typeof requestAnimationFrame == "function";
482
+ function Ir(e) {
483
+ var t, n = function() {
484
+ clearTimeout(r), It && cancelAnimationFrame(t), setTimeout(e);
485
+ }, r = setTimeout(n, 100);
486
+ It && (t = requestAnimationFrame(n));
487
+ }
488
+ function Le(e) {
489
+ var t = A, n = e.__c;
490
+ typeof n == "function" && (e.__c = void 0, n()), A = t;
491
+ }
492
+ function Xe(e) {
493
+ var t = A;
494
+ e.__c = e.__(), A = t;
495
+ }
496
+ function ut(e, t) {
497
+ return !e || e.length !== t.length || t.some(function(n, r) {
498
+ return n !== e[r];
499
+ });
500
+ }
501
+ function bn(e, t) {
502
+ return typeof t == "function" ? t(e) : t;
503
+ }
504
+ function vn(e, t) {
505
+ for (var n in t)
506
+ e[n] = t[n];
507
+ return e;
508
+ }
509
+ function et(e, t) {
510
+ for (var n in e)
511
+ if (n !== "__source" && !(n in t))
512
+ return !0;
513
+ for (var r in t)
514
+ if (r !== "__source" && e[r] !== t[r])
515
+ return !0;
516
+ return !1;
517
+ }
518
+ function Oe(e) {
519
+ this.props = e;
520
+ }
521
+ function yn(e, t) {
522
+ function n(o) {
523
+ var i = this.props.ref, a = i == o.ref;
524
+ return !a && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !a : et(this.props, o);
525
+ }
526
+ function r(o) {
527
+ return this.shouldComponentUpdate = n, U(e, o);
528
+ }
529
+ return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
530
+ }
531
+ (Oe.prototype = new W()).isPureReactComponent = !0, Oe.prototype.shouldComponentUpdate = function(e, t) {
532
+ return et(this.props, e) || et(this.state, t);
533
+ };
534
+ var Lt = x.__b;
535
+ x.__b = function(e) {
536
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Lt && Lt(e);
537
+ };
538
+ var Lr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
539
+ function xn(e) {
540
+ function t(n) {
541
+ var r = vn({}, n);
542
+ return delete r.ref, e(r, n.ref || null);
543
+ }
544
+ return t.$$typeof = Lr, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
545
+ }
546
+ var At = function(e, t) {
547
+ return e == null ? null : X(X(e).map(t));
548
+ }, Cn = { map: At, forEach: At, count: function(e) {
549
+ return e ? X(e).length : 0;
550
+ }, only: function(e) {
551
+ var t = X(e);
552
+ if (t.length !== 1)
553
+ throw "Children.only";
554
+ return t[0];
555
+ }, toArray: X }, Ar = x.__e;
556
+ x.__e = function(e, t, n, r) {
557
+ if (e.then) {
558
+ for (var o, i = t; i = i.__; )
559
+ if ((o = i.__c) && o.__c)
560
+ return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
561
+ }
562
+ Ar(e, t, n, r);
563
+ };
564
+ var Mt = x.unmount;
565
+ function kn(e, t, n) {
566
+ return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
567
+ typeof r.__c == "function" && r.__c();
568
+ }), e.__c.__H = null), (e = vn({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
569
+ return kn(r, t, n);
570
+ })), e;
571
+ }
572
+ function Sn(e, t, n) {
573
+ return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
574
+ return Sn(r, t, n);
575
+ }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
576
+ }
577
+ function Ce() {
578
+ this.__u = 0, this.t = null, this.__b = null;
579
+ }
580
+ function wn(e) {
581
+ var t = e.__.__c;
582
+ return t && t.__a && t.__a(e);
583
+ }
584
+ function Tn(e) {
585
+ var t, n, r;
586
+ function o(i) {
587
+ if (t || (t = e()).then(function(a) {
588
+ n = a.default || a;
589
+ }, function(a) {
590
+ r = a;
591
+ }), r)
592
+ throw r;
593
+ if (!n)
594
+ throw t;
595
+ return U(n, i);
596
+ }
597
+ return o.displayName = "Lazy", o.__f = !0, o;
598
+ }
599
+ function pe() {
600
+ this.u = null, this.o = null;
601
+ }
602
+ x.unmount = function(e) {
603
+ var t = e.__c;
604
+ t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Mt && Mt(e);
605
+ }, (Ce.prototype = new W()).__c = function(e, t) {
606
+ var n = t.__c, r = this;
607
+ r.t == null && (r.t = []), r.t.push(n);
608
+ var o = wn(r.__v), i = !1, a = function() {
609
+ i || (i = !0, n.__R = null, o ? o(l) : l());
610
+ };
611
+ n.__R = a;
612
+ var l = function() {
613
+ if (!--r.__u) {
614
+ if (r.state.__a) {
615
+ var c = r.state.__a;
616
+ r.__v.__k[0] = Sn(c, c.__c.__P, c.__c.__O);
617
+ }
618
+ var d;
619
+ for (r.setState({ __a: r.__b = null }); d = r.t.pop(); )
620
+ d.forceUpdate();
621
+ }
622
+ };
623
+ r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(a, a);
624
+ }, Ce.prototype.componentWillUnmount = function() {
625
+ this.t = [];
626
+ }, Ce.prototype.render = function(e, t) {
627
+ if (this.__b) {
628
+ if (this.__v.__k) {
629
+ var n = document.createElement("div"), r = this.__v.__k[0].__c;
630
+ this.__v.__k[0] = kn(this.__b, n, r.__O = r.__P);
631
+ }
632
+ this.__b = null;
633
+ }
634
+ var o = t.__a && U(D, null, e.fallback);
635
+ return o && (o.__u &= -33), [U(D, null, t.__a ? null : e.children), o];
636
+ };
637
+ var $t = function(e, t, n) {
638
+ if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
639
+ for (n = e.u; n; ) {
640
+ for (; n.length > 3; )
641
+ n.pop()();
642
+ if (n[1] < n[0])
643
+ break;
644
+ e.u = n = n[2];
645
+ }
646
+ };
647
+ function Mr(e) {
648
+ return this.getChildContext = function() {
649
+ return e.context;
650
+ }, e.children;
651
+ }
652
+ function $r(e) {
653
+ var t = this, n = e.i;
654
+ t.componentWillUnmount = function() {
655
+ he(null, t.l), t.l = null, t.i = null;
656
+ }, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
657
+ this.childNodes.push(r), t.i.appendChild(r);
658
+ }, insertBefore: function(r, o) {
659
+ this.childNodes.push(r), t.i.appendChild(r);
660
+ }, removeChild: function(r) {
661
+ this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
662
+ } }), he(U(Mr, { context: t.context }, e.__v), t.l);
663
+ }
664
+ function Pn(e, t) {
665
+ var n = U($r, { __v: e, i: t });
666
+ return n.containerInfo = t, n;
667
+ }
668
+ (pe.prototype = new W()).__a = function(e) {
669
+ var t = this, n = wn(t.__v), r = t.o.get(e);
670
+ return r[0]++, function(o) {
671
+ var i = function() {
672
+ t.props.revealOrder ? (r.push(o), $t(t, e, r)) : o();
673
+ };
674
+ n ? n(i) : i();
675
+ };
676
+ }, pe.prototype.render = function(e) {
677
+ this.u = null, this.o = /* @__PURE__ */ new Map();
678
+ var t = X(e.children);
679
+ e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
680
+ for (var n = t.length; n--; )
681
+ this.o.set(t[n], this.u = [1, 0, this.u]);
682
+ return e.children;
683
+ }, pe.prototype.componentDidUpdate = pe.prototype.componentDidMount = function() {
684
+ var e = this;
685
+ this.o.forEach(function(t, n) {
686
+ $t(e, n, t);
687
+ });
688
+ };
689
+ var En = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Or = /^(?: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]/, Ur = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Vr = /[A-Z0-9]/g, Hr = typeof document < "u", Br = function(e) {
690
+ return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
691
+ };
692
+ function Nn(e, t, n) {
693
+ return t.__k == null && (t.textContent = ""), he(e, t), typeof n == "function" && n(), e ? e.__c : null;
694
+ }
695
+ function Rn(e, t, n) {
696
+ return un(e, t), typeof n == "function" && n(), e ? e.__c : null;
697
+ }
698
+ W.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
699
+ Object.defineProperty(W.prototype, e, { configurable: !0, get: function() {
700
+ return this["UNSAFE_" + e];
701
+ }, set: function(t) {
702
+ Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
703
+ } });
704
+ });
705
+ var Ot = x.event;
706
+ function Dr() {
707
+ }
708
+ function jr() {
709
+ return this.cancelBubble;
710
+ }
711
+ function Fr() {
712
+ return this.defaultPrevented;
713
+ }
714
+ x.event = function(e) {
715
+ return Ot && (e = Ot(e)), e.persist = Dr, e.isPropagationStopped = jr, e.isDefaultPrevented = Fr, e.nativeEvent = e;
716
+ };
717
+ var dt, qr = { enumerable: !1, configurable: !0, get: function() {
718
+ return this.class;
719
+ } }, Ut = x.vnode;
720
+ x.vnode = function(e) {
721
+ typeof e.type == "string" && function(t) {
722
+ var n = t.props, r = t.type, o = {};
723
+ for (var i in n) {
724
+ var a = n[i];
725
+ if (!(i === "value" && "defaultValue" in n && a == null || Hr && i === "children" && r === "noscript" || i === "class" || i === "className")) {
726
+ var l = i.toLowerCase();
727
+ i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : l === "ondoubleclick" ? i = "ondblclick" : l !== "onchange" || r !== "input" && r !== "textarea" || Br(n.type) ? l === "onfocus" ? i = "onfocusin" : l === "onblur" ? i = "onfocusout" : Ur.test(i) ? i = l : r.indexOf("-") === -1 && Or.test(i) ? i = i.replace(Vr, "-$&").toLowerCase() : a === null && (a = void 0) : l = i = "oninput", l === "oninput" && o[i = l] && (i = "oninputCapture"), o[i] = a;
728
+ }
729
+ }
730
+ r == "select" && o.multiple && Array.isArray(o.value) && (o.value = X(n.children).forEach(function(c) {
731
+ c.props.selected = o.value.indexOf(c.props.value) != -1;
732
+ })), r == "select" && o.defaultValue != null && (o.value = X(n.children).forEach(function(c) {
733
+ c.props.selected = o.multiple ? o.defaultValue.indexOf(c.props.value) != -1 : o.defaultValue == c.props.value;
734
+ })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", qr)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
735
+ }(e), e.$$typeof = En, Ut && Ut(e);
736
+ };
737
+ var Vt = x.__r;
738
+ x.__r = function(e) {
739
+ Vt && Vt(e), dt = e.__c;
740
+ };
741
+ var Ht = x.diffed;
742
+ x.diffed = function(e) {
743
+ Ht && Ht(e);
744
+ var t = e.props, n = e.__e;
745
+ n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), dt = null;
746
+ };
747
+ var In = { ReactCurrentDispatcher: { current: { readContext: function(e) {
748
+ return dt.__n[e.__c].props.value;
749
+ } } } }, zr = "17.0.2";
750
+ function Ln(e) {
751
+ return U.bind(null, e);
752
+ }
753
+ function Pe(e) {
754
+ return !!e && e.$$typeof === En;
755
+ }
756
+ function An(e) {
757
+ return Pe(e) && e.type === D;
758
+ }
759
+ function Mn(e) {
760
+ return Pe(e) ? Er.apply(null, arguments) : e;
761
+ }
762
+ function $n(e) {
763
+ return !!e.__k && (he(null, e), !0);
764
+ }
765
+ function On(e) {
766
+ return e && (e.base || e.nodeType === 1 && e) || null;
767
+ }
768
+ var Un = function(e, t) {
769
+ return e(t);
770
+ }, Vn = function(e, t) {
771
+ return e(t);
772
+ }, Hn = D;
773
+ function pt(e) {
774
+ e();
775
+ }
776
+ function Bn(e) {
777
+ return e;
778
+ }
779
+ function Dn() {
780
+ return [!1, pt];
781
+ }
782
+ var jn = Te, Fn = Pe;
783
+ function qn(e, t) {
784
+ var n = t(), r = B({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
785
+ return Te(function() {
786
+ o.__ = n, o.v = t, ze(o) && i({ h: o });
787
+ }, [e, n, t]), F(function() {
788
+ return ze(o) && i({ h: o }), e(function() {
789
+ ze(o) && i({ h: o });
790
+ });
791
+ }, [e]), n;
792
+ }
793
+ function ze(e) {
794
+ var t, n, r = e.v, o = e.__;
795
+ try {
796
+ var i = r();
797
+ return !((t = o) === (n = i) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
798
+ } catch {
799
+ return !0;
800
+ }
801
+ }
802
+ var Wr = { useState: B, useId: gn, useReducer: lt, useEffect: F, useLayoutEffect: Te, useInsertionEffect: jn, useTransition: Dn, useDeferredValue: Bn, useSyncExternalStore: qn, startTransition: pt, useRef: ie, useImperativeHandle: _n, useMemo: Ve, useCallback: hn, useContext: mn, useDebugValue: ct, version: "17.0.2", Children: Cn, render: Nn, hydrate: Rn, unmountComponentAtNode: $n, createPortal: Pn, createElement: U, createContext: dn, createFactory: Ln, cloneElement: Mn, createRef: on, Fragment: D, isValidElement: Pe, isElement: Fn, isFragment: An, findDOMNode: On, Component: W, PureComponent: Oe, memo: yn, forwardRef: xn, flushSync: Vn, unstable_batchedUpdates: Un, StrictMode: Hn, Suspense: Ce, SuspenseList: pe, lazy: Tn, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: In };
803
+ const Zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
804
+ __proto__: null,
805
+ Children: Cn,
806
+ Component: W,
807
+ Fragment: D,
808
+ PureComponent: Oe,
809
+ StrictMode: Hn,
810
+ Suspense: Ce,
811
+ SuspenseList: pe,
812
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: In,
813
+ cloneElement: Mn,
814
+ createContext: dn,
815
+ createElement: U,
816
+ createFactory: Ln,
817
+ createPortal: Pn,
818
+ createRef: on,
819
+ default: Wr,
820
+ findDOMNode: On,
821
+ flushSync: Vn,
822
+ forwardRef: xn,
823
+ hydrate: Rn,
824
+ isElement: Fn,
825
+ isFragment: An,
826
+ isValidElement: Pe,
827
+ lazy: Tn,
828
+ memo: yn,
829
+ render: Nn,
830
+ startTransition: pt,
831
+ unmountComponentAtNode: $n,
832
+ unstable_batchedUpdates: Un,
833
+ useCallback: hn,
834
+ useContext: mn,
835
+ useDebugValue: ct,
836
+ useDeferredValue: Bn,
837
+ useEffect: F,
838
+ useErrorBoundary: Nr,
839
+ useId: gn,
840
+ useImperativeHandle: _n,
841
+ useInsertionEffect: jn,
842
+ useLayoutEffect: Te,
843
+ useMemo: Ve,
844
+ useReducer: lt,
845
+ useRef: ie,
846
+ useState: B,
847
+ useSyncExternalStore: qn,
848
+ useTransition: Dn,
849
+ version: zr
850
+ }, Symbol.toStringTag, { value: "Module" })), Bt = (e) => {
851
+ let t;
852
+ const n = /* @__PURE__ */ new Set(), r = (c, d) => {
853
+ const p = typeof c == "function" ? c(t) : c;
854
+ if (!Object.is(p, t)) {
855
+ const s = t;
856
+ t = d ?? typeof p != "object" ? p : Object.assign({}, t, p), n.forEach((_) => _(t, s));
857
+ }
858
+ }, o = () => t, l = { setState: r, getState: o, subscribe: (c) => (n.add(c), () => n.delete(c)), destroy: () => n.clear() };
859
+ return t = e(r, o, l), l;
860
+ }, Gr = (e) => e ? Bt(e) : Bt;
861
+ var zn = { exports: {} }, Wn = {};
862
+ const Zn = /* @__PURE__ */ dr(Zr);
863
+ var Gn = { exports: {} }, Qn = {};
864
+ /**
865
+ * @license React
866
+ * use-sync-external-store-shim.production.min.js
867
+ *
868
+ * Copyright (c) Facebook, Inc. and its affiliates.
869
+ *
870
+ * This source code is licensed under the MIT license found in the
871
+ * LICENSE file in the root directory of this source tree.
872
+ */
873
+ var ge = Zn;
874
+ function Qr(e, t) {
875
+ return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
876
+ }
877
+ var Kr = typeof Object.is == "function" ? Object.is : Qr, Yr = ge.useState, Jr = ge.useEffect, Xr = ge.useLayoutEffect, eo = ge.useDebugValue;
878
+ function to(e, t) {
879
+ var n = t(), r = Yr({ inst: { value: n, getSnapshot: t } }), o = r[0].inst, i = r[1];
880
+ return Xr(function() {
881
+ o.value = n, o.getSnapshot = t, We(o) && i({ inst: o });
882
+ }, [e, n, t]), Jr(function() {
883
+ return We(o) && i({ inst: o }), e(function() {
884
+ We(o) && i({ inst: o });
885
+ });
886
+ }, [e]), eo(n), n;
887
+ }
888
+ function We(e) {
889
+ var t = e.getSnapshot;
890
+ e = e.value;
891
+ try {
892
+ var n = t();
893
+ return !Kr(e, n);
894
+ } catch {
895
+ return !0;
896
+ }
897
+ }
898
+ function no(e, t) {
899
+ return t();
900
+ }
901
+ var ro = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? no : to;
902
+ Qn.useSyncExternalStore = ge.useSyncExternalStore !== void 0 ? ge.useSyncExternalStore : ro;
903
+ Gn.exports = Qn;
904
+ var oo = Gn.exports;
905
+ /**
906
+ * @license React
907
+ * use-sync-external-store-shim/with-selector.production.min.js
908
+ *
909
+ * Copyright (c) Facebook, Inc. and its affiliates.
910
+ *
911
+ * This source code is licensed under the MIT license found in the
912
+ * LICENSE file in the root directory of this source tree.
913
+ */
914
+ var He = Zn, io = oo;
915
+ function ao(e, t) {
916
+ return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
917
+ }
918
+ var so = typeof Object.is == "function" ? Object.is : ao, lo = io.useSyncExternalStore, co = He.useRef, uo = He.useEffect, po = He.useMemo, fo = He.useDebugValue;
919
+ Wn.useSyncExternalStoreWithSelector = function(e, t, n, r, o) {
920
+ var i = co(null);
921
+ if (i.current === null) {
922
+ var a = { hasValue: !1, value: null };
923
+ i.current = a;
924
+ } else
925
+ a = i.current;
926
+ i = po(function() {
927
+ function c(f) {
928
+ if (!d) {
929
+ if (d = !0, p = f, f = r(f), o !== void 0 && a.hasValue) {
930
+ var g = a.value;
931
+ if (o(g, f))
932
+ return s = g;
933
+ }
934
+ return s = f;
935
+ }
936
+ if (g = s, so(p, f))
937
+ return g;
938
+ var m = r(f);
939
+ return o !== void 0 && o(g, m) ? g : (p = f, s = m);
940
+ }
941
+ var d = !1, p, s, _ = n === void 0 ? null : n;
942
+ return [function() {
943
+ return c(t());
944
+ }, _ === null ? void 0 : function() {
945
+ return c(_());
946
+ }];
947
+ }, [t, n, r, o]);
948
+ var l = lo(e, i[0], i[1]);
949
+ return uo(function() {
950
+ a.hasValue = !0, a.value = l;
951
+ }, [l]), fo(l), l;
952
+ };
953
+ zn.exports = Wn;
954
+ var _o = zn.exports;
955
+ const ho = /* @__PURE__ */ pr(_o), { useSyncExternalStoreWithSelector: mo } = ho;
956
+ function go(e, t = e.getState, n) {
957
+ const r = mo(
958
+ e.subscribe,
959
+ e.getState,
960
+ e.getServerState || e.getState,
961
+ t,
962
+ n
963
+ );
964
+ return ct(r), r;
965
+ }
966
+ const Dt = (e) => {
967
+ const t = typeof e == "function" ? Gr(e) : e, n = (r, o) => go(t, r, o);
968
+ return Object.assign(n, t), n;
969
+ }, Kn = (e) => e ? Dt(e) : Dt;
970
+ var tt = /* @__PURE__ */ ((e) => (e[e.And = 1] = "And", e[e.Or = 2] = "Or", e))(tt || {});
971
+ const jt = 1, ft = {
972
+ eq(e, t) {
973
+ return e == t;
974
+ },
975
+ neq(e, t) {
976
+ return !this.eq(e, t);
977
+ },
978
+ gt(e, t) {
979
+ return e > t;
980
+ },
981
+ gte(e, t) {
982
+ return e >= t;
983
+ },
984
+ lt(e, t) {
985
+ return e < t;
986
+ },
987
+ lte(e, t) {
988
+ return e <= t;
989
+ },
990
+ // multiselect comparators
991
+ list_exact(e, t) {
992
+ return !Array.isArray(e) || !Array.isArray(t) ? !1 : e.slice().sort().join(",") === t.slice().sort().join(",");
993
+ },
994
+ /**
995
+ * a contains b
996
+ */
997
+ list_all(e, t) {
998
+ return !Array.isArray(e) || !Array.isArray(t) ? !1 : !t.some((n) => e.indexOf(n) === -1);
999
+ },
1000
+ /**
1001
+ * a has at least one value from b
1002
+ */
1003
+ list_alo(e, t) {
1004
+ if (!Array.isArray(t))
1005
+ return !1;
1006
+ const n = Array.isArray(e) ? e : [e], r = new Set(n);
1007
+ return t.some((o) => r.has(o));
1008
+ },
1009
+ /**
1010
+ * a is not included in b
1011
+ */
1012
+ list_dni(e, t) {
1013
+ if (!Array.isArray(t))
1014
+ return !1;
1015
+ const n = Array.isArray(e) ? e : [e], r = new Set(n);
1016
+ return t.every((o) => !r.has(o));
1017
+ },
1018
+ /**
1019
+ * a contains b
1020
+ */
1021
+ contains(e, t) {
1022
+ const n = e.toLowerCase(), r = t.toLowerCase();
1023
+ return n.includes(r);
1024
+ },
1025
+ /**
1026
+ * a not contains b
1027
+ */
1028
+ notcontains(e, t) {
1029
+ return !this.contains(e, t);
1030
+ }
1031
+ }, bo = (e, t, n) => {
1032
+ switch (t) {
1033
+ case b.VideoVoice:
1034
+ return !!(e && e.value);
1035
+ case b.Open:
1036
+ return !!n;
1037
+ case b.MultipleSelect:
1038
+ return !!(n && Object.keys(n).length);
1039
+ case b.RecordedTask:
1040
+ return (n == null ? void 0 : n.taskStatus) === z.Completed;
1041
+ case b.TextUrlPrompt:
1042
+ return !e.value;
1043
+ case b.ConsentLegal:
1044
+ return n !== null;
1045
+ case b.MultipleChoice:
1046
+ return n !== void 0;
1047
+ case b.Matrix:
1048
+ return !!(n && Object.values(n).every((r) => r !== null));
1049
+ case b.NPS:
1050
+ return n !== null;
1051
+ case b.Likert:
1052
+ return n !== null;
1053
+ default:
1054
+ return !0;
1055
+ }
1056
+ }, Yn = (e, t) => {
1057
+ if (t === b.Matrix) {
1058
+ const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
1059
+ return r > 0 && r < n;
1060
+ }
1061
+ return !1;
1062
+ }, Jn = ({
1063
+ cards: e,
1064
+ index: t,
1065
+ hasEndCard: n,
1066
+ allResponses: r,
1067
+ uploadProgress: o = {}
1068
+ }) => {
1069
+ if (t >= e.length || t < 0)
1070
+ return null;
1071
+ const i = e[t];
1072
+ let a = t + 1;
1073
+ const l = i.props.routingOptions || [];
1074
+ for (let p = 0; p < l.length; p++) {
1075
+ const {
1076
+ group: s,
1077
+ target: _
1078
+ } = l[p];
1079
+ if (!(s != null && s.length))
1080
+ continue;
1081
+ const f = s[0];
1082
+ if (f.questionIndex === void 0 || f.questionIndex > r.length)
1083
+ continue;
1084
+ let g = Ft({
1085
+ comparator: f.comparator,
1086
+ // @ts-expect-error - unknown response type
1087
+ response: r[f.questionIndex],
1088
+ // @ts-expect-error - expected card type
1089
+ type: i.type,
1090
+ value: f.value
1091
+ });
1092
+ for (let m = 1; m < s.length; m += 2) {
1093
+ const y = s[m], v = s[m + 1], C = Ft({
1094
+ comparator: v.comparator,
1095
+ // @ts-expect-error - unknown response type
1096
+ response: r[v.questionIndex],
1097
+ // @ts-expect-error - expected card type
1098
+ type: e[v.questionIndex].type,
1099
+ value: v.value
1100
+ });
1101
+ y === tt.And ? g && (g = C) : y === tt.Or && (g || (g = C));
1102
+ }
1103
+ if (g) {
1104
+ a = _ === -1 && n ? e.length - 1 : _;
1105
+ break;
1106
+ }
1107
+ }
1108
+ const c = e.findIndex((p) => p.type === b.Uploading);
1109
+ let d;
1110
+ return c > 0 ? d = n ? e.length - 3 : e.length - 2 : d = e.length - 1, t >= d || a === -1 || a !== null && a > d ? c > 0 && Object.values(o).some((s) => s.isSubmitted && !s.isComplete) ? c : n ? e.length - 1 : null : a === -1 ? null : a;
1111
+ }, Ft = ({
1112
+ comparator: e,
1113
+ response: t,
1114
+ type: n,
1115
+ value: r
1116
+ }) => {
1117
+ if (e === G.Answered)
1118
+ switch (n) {
1119
+ case b.TextUrlPrompt:
1120
+ return t === void 0;
1121
+ case b.ConsentLegal:
1122
+ return t && t.submitted === !0;
1123
+ case b.RecordedTask:
1124
+ return "taskStatus" in t && t.taskStatus === z.Completed;
1125
+ case b.Likert:
1126
+ return Number.isInteger(t);
1127
+ case b.Open:
1128
+ return t && t.length > 0;
1129
+ case b.MultipleChoice:
1130
+ case b.MultipleSelect:
1131
+ return Object.keys(t).length > 0;
1132
+ case b.Matrix:
1133
+ return Object.values(t).every((o) => o !== null);
1134
+ case b.NPS:
1135
+ return Number.isInteger(t);
1136
+ case b.VideoVoice:
1137
+ return !!(t != null && t.mediaRecordingUid);
1138
+ default:
1139
+ return !1;
1140
+ }
1141
+ if (e === G.GivenUp)
1142
+ return n === b.RecordedTask ? "taskStatus" in t && t.taskStatus === z.GivenUp : !0;
1143
+ if (e === G.Partial)
1144
+ return n === b.Matrix ? Yn(t, n) : !1;
1145
+ if (e === G.Skipped)
1146
+ switch (n) {
1147
+ case b.TextUrlPrompt:
1148
+ return t == null ? void 0 : t.skipped;
1149
+ case b.ConsentLegal:
1150
+ return t === null;
1151
+ case b.RecordedTask:
1152
+ return "taskStatus" in t && t.taskStatus === z.Abandoned;
1153
+ case b.Likert:
1154
+ return t === null;
1155
+ case b.Open:
1156
+ return (t == null ? void 0 : t.length) === 0;
1157
+ case b.MultipleChoice:
1158
+ return t === void 0;
1159
+ case b.MultipleSelect:
1160
+ return (t == null ? void 0 : t.length) === 0;
1161
+ case b.Matrix:
1162
+ return Object.values(t).every((o) => o === null);
1163
+ case b.NPS:
1164
+ return t === null;
1165
+ case b.VideoVoice:
1166
+ return t === null;
1167
+ default:
1168
+ return !1;
1169
+ }
1170
+ return ft[e](t, r);
1171
+ }, vo = 13, yo = (e, t) => e.reduce((n, r) => n.concat(n.map((o) => [...o, r])), [[]]).filter((n) => t || n.length > 0), xo = (e) => {
1172
+ var t, n, r;
1173
+ switch (e.type) {
1174
+ case b.MultipleSelect:
1175
+ return !e || !e.props || !e.props.options ? null : e.props.options.length > vo ? e.props.options.map((o) => [o.value]) : yo(e.props.options.map((o) => o.value), !e.props.properties.required);
1176
+ case b.MultipleChoice: {
1177
+ if (!e || !e.props || !e.props.options)
1178
+ return null;
1179
+ const o = e.props.options.map((i) => i.value);
1180
+ return e.props.properties.required || o.push(void 0), o;
1181
+ }
1182
+ case b.Matrix: {
1183
+ if (!((t = e == null ? void 0 : e.props) != null && t.options))
1184
+ return null;
1185
+ const o = e.props.properties.matrixColumn, i = e.props.options, a = i.reduce((p, s) => (p[s.id] = null, p), {}), l = {
1186
+ ...a,
1187
+ [i[0].id]: o[0].value
1188
+ }, c = i.reduce((p, s) => (p[s.id] = o[0].value, p), {}), d = [l, c];
1189
+ return e.props.properties.required || d.push(a), d;
1190
+ }
1191
+ case b.Likert: {
1192
+ const o = Number((r = (n = e.props) == null ? void 0 : n.properties) == null ? void 0 : r.range) || 5;
1193
+ return [...Array.from(Array(o).keys()).map((a) => a + 1), ...e.props.properties.required ? [] : [null]];
1194
+ }
1195
+ case b.NPS:
1196
+ return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
1197
+ case b.VideoVoice:
1198
+ case b.Open:
1199
+ return ["1", ...e.props.properties.required ? [] : [""]];
1200
+ case b.RecordedTask:
1201
+ return [{
1202
+ taskStatus: z.Completed
1203
+ }, {
1204
+ taskStatus: z.GivenUp
1205
+ }, ...e.props.properties.required ? [] : [{
1206
+ taskStatus: z.Abandoned
1207
+ }]];
1208
+ case b.TextUrlPrompt:
1209
+ return [void 0, ...e.props.properties.required ? [] : [{
1210
+ skipped: !0
1211
+ }]];
1212
+ case b.ConsentLegal:
1213
+ return [jt, ...e.props.properties.required ? [] : [null]];
1214
+ default:
1215
+ return [jt];
1216
+ }
1217
+ }, Co = (e) => e in ft, ko = (e) => typeof e == "object" && e !== null && "taskStatus" in e, So = (e, t = []) => t.reduce((n, r) => {
1218
+ const {
1219
+ group: o,
1220
+ target: i
1221
+ } = r;
1222
+ if (!(o != null && o.length))
1223
+ return [...n];
1224
+ const a = o.filter((l) => Number(l) ? !0 : typeof l == "object" ? l.questionIndex === e : !1).map((l) => {
1225
+ const {
1226
+ comparator: c,
1227
+ value: d
1228
+ } = l;
1229
+ return {
1230
+ comparator: c,
1231
+ target: i,
1232
+ value: d
1233
+ };
1234
+ });
1235
+ return [...n, ...a];
1236
+ }, []), wo = (e, t) => {
1237
+ const n = /* @__PURE__ */ new Set([b.Thanks, b.Uploading]);
1238
+ if (t >= e.length || t < 0 || n.has(e[t].type))
1239
+ return 0;
1240
+ const r = e.filter((i) => !n.has(i.type));
1241
+ if (t === r.length - 1)
1242
+ return 1;
1243
+ const o = {
1244
+ [r.length - 1]: 1,
1245
+ [-1]: 0
1246
+ };
1247
+ for (let i = r.length - 2; i >= t; i--) {
1248
+ const a = r[i], l = So(i, a.props.routingOptions);
1249
+ if (l.length === 0) {
1250
+ o[i] = o[i + 1] + 1;
1251
+ continue;
1252
+ }
1253
+ let c = 0, d = xo(a);
1254
+ if (d === null)
1255
+ return r.length - 1 - t;
1256
+ for (let p = 0; p < l.length && d.length !== 0; p++) {
1257
+ const {
1258
+ comparator: s,
1259
+ target: _,
1260
+ value: f
1261
+ } = l[p], g = d.filter((m) => {
1262
+ const y = bo({
1263
+ value: m
1264
+ }, a.type, m), v = Yn(m, a.type);
1265
+ return !(y && s === G.Answered || v && s === G.Partial || !y && !v && s === G.Skipped || s === G.GivenUp && ko(m) && m.taskStatus === z.GivenUp || y && a.type === b.Open && (s === G.Contains || s === G.DoesNotContain) || y && Co(s) && ft[s](m, f));
1266
+ });
1267
+ if (g.length < d.length) {
1268
+ const m = parseInt(String(_), 10);
1269
+ if (m !== -1 && m <= i || m >= r.length)
1270
+ return r.length - 1 - t;
1271
+ c = Math.max(o[m] + 1, c);
1272
+ }
1273
+ d = g;
1274
+ }
1275
+ d.length > 0 && (c = Math.max(o[i + 1] + 1, c)), o[i] = c;
1276
+ }
1277
+ return o[t];
1278
+ }, To = (e) => !(e.type === b.Thanks || e.type === b.Uploading), M = Kn()((e, t) => ({
1279
+ allResponses: [],
1280
+ answers: void 0,
1281
+ apiURL: "",
1282
+ border: "#000000",
1283
+ cards: [],
1284
+ close: async (n = fe) => {
1285
+ const r = t(), {
1286
+ fadeout: o,
1287
+ remove: i,
1288
+ trackHistory: a
1289
+ } = r;
1290
+ await o(n), Ze(r) || a({
1291
+ event: "closed"
1292
+ }), bt.enable(), i({
1293
+ initiator: vt.Closed
1294
+ });
1295
+ },
1296
+ configureExitOnOverlayClick: () => {
1297
+ },
1298
+ customMetadata: {},
1299
+ destroy: async (n) => {
1300
+ const {
1301
+ eventEmitFn: r,
1302
+ fadeout: o,
1303
+ remove: i
1304
+ } = t();
1305
+ r(ee.SurveyComplete), await o(n), bt.enable(), i({
1306
+ initiator: vt.Complete
1307
+ });
1308
+ },
1309
+ endCard: {
1310
+ headline: ""
1311
+ },
1312
+ envId: "",
1313
+ eventEmitFn: Re.emit.bind(Re),
1314
+ fadeout: async (n) => {
1315
+ const {
1316
+ eventEmitFn: r,
1317
+ headers: o,
1318
+ viewDocument: i
1319
+ } = t();
1320
+ return Me(o) ? Promise.resolve() : (r(re.SurveyFadingOut), new Promise((a) => {
1321
+ const l = i.getElementById(n);
1322
+ l ? (l.addEventListener("transitionend", () => {
1323
+ a();
1324
+ }), l.classList.remove("ul-app--visible")) : a();
1325
+ }));
1326
+ },
1327
+ forceBrandedLogo: !1,
1328
+ frame: document.createElement("iframe"),
1329
+ handleClickEmbedButton: (n) => {
1330
+ const {
1331
+ cards: r,
1332
+ eventEmitFn: o,
1333
+ index: i
1334
+ } = t();
1335
+ o(n, {
1336
+ [ve.QuestionId]: r[i].name,
1337
+ [ve.Props]: r[i].props
1338
+ // Only return the upcoming card
1339
+ }), e(() => ({
1340
+ hasViewedEmbed: !0
1341
+ }));
1342
+ },
1343
+ handleUploadUpdate: ({
1344
+ mediaRecordingUid: n,
1345
+ isComplete: r,
1346
+ progressPct: o,
1347
+ isSubmitted: i
1348
+ }) => {
1349
+ var f, g, m;
1350
+ const {
1351
+ cards: a,
1352
+ destroy: l,
1353
+ index: c,
1354
+ uploadProgress: d
1355
+ } = t(), p = r || ((f = d[n]) == null ? void 0 : f.isComplete), s = {
1356
+ ...d,
1357
+ [n]: {
1358
+ progressPct: p ? 100 : o || ((g = d[n]) == null ? void 0 : g.progressPct),
1359
+ isComplete: p,
1360
+ isSubmitted: i || ((m = d[n]) == null ? void 0 : m.isSubmitted)
1361
+ }
1362
+ };
1363
+ if (e({
1364
+ uploadProgress: s
1365
+ }), a[c].type !== b.Uploading)
1366
+ return;
1367
+ const _ = Object.entries(d).every(([y, v]) => !v.isSubmitted || v.isComplete || n == y && r);
1368
+ if (_ && c >= a.length - 1)
1369
+ return l(fe);
1370
+ e({
1371
+ index: _ ? c + 1 : c,
1372
+ uploadingCardViewed: !0
1373
+ });
1374
+ },
1375
+ hasViewedEmbed: !1,
1376
+ headers: {
1377
+ Authorization: "",
1378
+ "Content-Type": "",
1379
+ "userleap-platform": Ge.Web,
1380
+ "x-ul-environment-id": "",
1381
+ "x-ul-installation-method": fr.Snippet,
1382
+ "x-ul-sdk-version": "",
1383
+ "x-ul-visitor-id": ""
1384
+ },
1385
+ index: 0,
1386
+ isPreview: !1,
1387
+ marketingUrl: "https://sprig.com",
1388
+ meta: {
1389
+ ch: 0,
1390
+ cw: 0,
1391
+ l: "",
1392
+ mode: null,
1393
+ p: "",
1394
+ sh: 0,
1395
+ sw: 0
1396
+ },
1397
+ mode: void 0,
1398
+ next: (n) => {
1399
+ const {
1400
+ allResponses: r,
1401
+ cards: o,
1402
+ eventEmitFn: i,
1403
+ index: a,
1404
+ responseGroupUid: l,
1405
+ submit: c,
1406
+ trackHistory: d,
1407
+ uploadProgress: p,
1408
+ viewedCardCount: s
1409
+ } = t(), _ = Date.now(), f = [...o], g = f[a], {
1410
+ type: m
1411
+ } = n.data, y = {
1412
+ ...n.data
1413
+ }, v = y.value;
1414
+ To(g) && (g.value = v), y.answeredAt = _, delete y.type;
1415
+ const C = {
1416
+ response: y,
1417
+ responseGroupUid: l,
1418
+ questionIndex: a
1419
+ };
1420
+ let S = m === b.MultipleChoice ? Object.values(v).find((N) => N !== !1) : v;
1421
+ m === b.MultipleSelect && (S = f[a].props.options.reduce((N, k) => (v[k.id] && N.push(k.value), N), []));
1422
+ const E = r.slice(0);
1423
+ E[a] = S, e({
1424
+ allResponses: E
1425
+ });
1426
+ const h = Jn({
1427
+ cards: f,
1428
+ index: a,
1429
+ hasEndCard: !!n.endCard,
1430
+ uploadProgress: p,
1431
+ allResponses: E
1432
+ });
1433
+ if (h === null) {
1434
+ C.completedAt = _, c(C), n.completeSurvey();
1435
+ return;
1436
+ } else
1437
+ [b.Thanks, b.Uploading].includes(f[h].type) && (C.completedAt = _);
1438
+ const T = c(C);
1439
+ [b.Thanks, b.Uploading].includes(f[h].type) || T.finally(() => {
1440
+ d({
1441
+ event: "seen",
1442
+ index: h
1443
+ });
1444
+ });
1445
+ const I = f[h];
1446
+ f[h] && i && i(ee.CurrentQuestion, {
1447
+ [ve.QuestionId]: I.name,
1448
+ [ve.Props]: I.props
1449
+ // Only return the upcoming card
1450
+ }), e({
1451
+ cards: f,
1452
+ hasViewedEmbed: !1,
1453
+ index: h,
1454
+ viewedCardCount: s + 1
1455
+ });
1456
+ },
1457
+ pendingRemoveIframeReason: null,
1458
+ previewKey: null,
1459
+ recorder: () => {
1460
+ },
1461
+ recorderEventEmitter: Re,
1462
+ resolveTrackedPromise: () => {
1463
+ const {
1464
+ removeIframeIfReady: n
1465
+ } = t();
1466
+ e((r) => ({
1467
+ unresolvedRequestCount: r.unresolvedRequestCount - 1
1468
+ })), n();
1469
+ },
1470
+ responseGroupUid: "",
1471
+ remove: ({
1472
+ initiator: n
1473
+ }) => {
1474
+ const {
1475
+ removeIframeIfReady: r
1476
+ } = t();
1477
+ e({
1478
+ pendingRemoveIframeReason: n
1479
+ }), r();
1480
+ },
1481
+ removeIframeIfReady: () => {
1482
+ const {
1483
+ eventEmitFn: n,
1484
+ pendingRemoveIframeReason: r,
1485
+ unresolvedRequestCount: o
1486
+ } = t();
1487
+ r && o === 0 && (n(re.SurveyWillClose, {
1488
+ name: re.SurveyWillClose,
1489
+ initiator: r
1490
+ }), e({
1491
+ pendingRemoveIframeReason: null
1492
+ }));
1493
+ },
1494
+ seen: async () => {
1495
+ const {
1496
+ trackHistory: n
1497
+ } = t();
1498
+ return n({
1499
+ event: "seen",
1500
+ isNew: !0
1501
+ });
1502
+ },
1503
+ slugName: null,
1504
+ showStripes: !1,
1505
+ showSurveyBrand: !1,
1506
+ styleNonce: "",
1507
+ submit: async ({
1508
+ completedAt: n,
1509
+ questionIndex: r,
1510
+ response: o,
1511
+ responseGroupUid: i
1512
+ }) => {
1513
+ const a = t();
1514
+ if (!i || Ze(a))
1515
+ return;
1516
+ const l = {
1517
+ responseGroupUid: i,
1518
+ meta: a.meta,
1519
+ customMetadata: a.customMetadata,
1520
+ responses: [o],
1521
+ completedAt: n,
1522
+ previewKey: a.previewKey
1523
+ };
1524
+ n && _r({
1525
+ id: a.surveyId
1526
+ });
1527
+ const c = await a.trackPromise(Qe(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`, {
1528
+ body: JSON.stringify(l),
1529
+ headers: a.headers,
1530
+ method: "POST"
1531
+ }));
1532
+ if (!c.ok) {
1533
+ c.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", c.error), await a.trackPromise(qt(a, "submitResponse", c.error)));
1534
+ return;
1535
+ }
1536
+ a.eventEmitFn(re.QuestionAnswered, {
1537
+ ...o,
1538
+ questionIndex: r
1539
+ });
1540
+ },
1541
+ surveyId: 0,
1542
+ tabTitle: "",
1543
+ trackHistory: async ({
1544
+ event: n,
1545
+ index: r,
1546
+ isNew: o = !1
1547
+ }) => {
1548
+ const i = t();
1549
+ if (Ze(i))
1550
+ return;
1551
+ const {
1552
+ cards: a,
1553
+ index: l
1554
+ } = i, c = r !== void 0 ? a[r] : a[l], d = {
1555
+ sid: i.surveyId,
1556
+ qid: c.name,
1557
+ action: n,
1558
+ vid: i.userId,
1559
+ eid: i.envId,
1560
+ isNew: o,
1561
+ responseGroupUid: i.responseGroupUid,
1562
+ previewKey: i.previewKey
1563
+ }, p = await i.trackPromise(Qe(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, {
1564
+ body: JSON.stringify(d),
1565
+ headers: i.headers,
1566
+ method: "POST"
1567
+ }));
1568
+ !p.ok && p.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", p.error), await i.trackPromise(qt(i, "trackHistory", p.error)));
1569
+ },
1570
+ trackPromise: async (n) => {
1571
+ let {
1572
+ resolveTrackedPromise: r
1573
+ } = t();
1574
+ return e((o) => ({
1575
+ unresolvedRequestCount: o.unresolvedRequestCount + 1
1576
+ })), n.then((o) => (r(), o)).catch((o) => {
1577
+ throw r(), o;
1578
+ });
1579
+ },
1580
+ unresolvedRequestCount: 0,
1581
+ update: () => {
1582
+ const {
1583
+ cards: n,
1584
+ index: r,
1585
+ headers: o,
1586
+ eventEmitFn: i,
1587
+ frame: a,
1588
+ viewDocument: l
1589
+ } = t(), d = n[r].type === b.Matrix;
1590
+ setTimeout(() => {
1591
+ var _, f;
1592
+ const [p, s] = hr(l);
1593
+ Me(o) ? i(re.SurveyHeight, {
1594
+ name: re.SurveyHeight,
1595
+ contentFrameHeight: p
1596
+ }) : ((_ = a.setHeight) == null || _.call(a, p), (f = a.setWidth) == null || f.call(a, d ? s : parseInt(mr)));
1597
+ }, 100);
1598
+ },
1599
+ uploadingCardViewed: !1,
1600
+ uploadProgress: {},
1601
+ useDesktopPrototype: void 0,
1602
+ useMobileStyling: !1,
1603
+ userId: "",
1604
+ viewDocument: window.document,
1605
+ viewedCardCount: 0
1606
+ })), Ze = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview, qt = async (e, t, n) => {
1607
+ const {
1608
+ mode: r,
1609
+ userId: o,
1610
+ envId: i,
1611
+ apiURL: a,
1612
+ headers: l,
1613
+ viewDocument: c
1614
+ } = e, d = c.documentElement, p = {
1615
+ mode: r,
1616
+ screenWidth: window.screen.width,
1617
+ screenHeight: window.screen.height,
1618
+ clientWidth: d.clientWidth,
1619
+ clientHeight: d.clientHeight,
1620
+ location: window.location.href,
1621
+ language: window.navigator.language
1622
+ }, s = {
1623
+ action: t,
1624
+ err: {
1625
+ message: n == null ? void 0 : n.message,
1626
+ stack: n == null ? void 0 : n.stack
1627
+ },
1628
+ meta: p,
1629
+ vid: o,
1630
+ envId: i
1631
+ };
1632
+ (await Qe(`${a}/sdk/1/errors`, {
1633
+ method: "POST",
1634
+ headers: Object.assign({
1635
+ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`)
1636
+ }, l),
1637
+ body: JSON.stringify(s)
1638
+ })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
1639
+ };
1640
+ var Po = 0;
1641
+ function u(e, t, n, r, o, i) {
1642
+ var a, l, c = {};
1643
+ for (l in t)
1644
+ l == "ref" ? a = t[l] : c[l] = t[l];
1645
+ var d = { type: e, props: c, key: n, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --Po, __i: -1, __u: 0, __source: o, __self: i };
1646
+ if (typeof e == "function" && (a = e.defaultProps))
1647
+ for (l in a)
1648
+ c[l] === void 0 && (c[l] = a[l]);
1649
+ return x.vnode && x.vnode(d), d;
1650
+ }
1651
+ const j = (e) => u("button", {
1652
+ ...e,
1653
+ className: R("ul-card-text__button", e.className),
1654
+ id: "ul-card-text__button"
1655
+ }), Y = ({
1656
+ message: e,
1657
+ properties: t
1658
+ }) => {
1659
+ const n = t == null ? void 0 : t.captionText;
1660
+ return u(D, {
1661
+ children: [e && u("h1", {
1662
+ className: w.QuestionHeader,
1663
+ id: w.QuestionHeader,
1664
+ ...n ? {} : {
1665
+ style: {
1666
+ marginBottom: "15px"
1667
+ }
1668
+ },
1669
+ children: e
1670
+ }), n && u("p", {
1671
+ className: w.Caption,
1672
+ id: w.Caption,
1673
+ children: n
1674
+ })]
1675
+ });
1676
+ }, zt = ({
1677
+ buttonText: e = "View Prototype",
1678
+ handleClick: t
1679
+ }) => u("button", {
1680
+ className: "prototype-button",
1681
+ onClick: t,
1682
+ children: e
1683
+ }, "prototype-btn"), ae = ({
1684
+ defaultBody: e,
1685
+ embeddedType: t = "prototype",
1686
+ properties: n
1687
+ }) => {
1688
+ var s;
1689
+ const {
1690
+ handleClickEmbedButton: r,
1691
+ hasViewedEmbed: o,
1692
+ headers: i,
1693
+ useDesktopPrototype: a
1694
+ } = M((_) => ({
1695
+ handleClickEmbedButton: _.handleClickEmbedButton,
1696
+ hasViewedEmbed: _.hasViewedEmbed,
1697
+ headers: _.headers,
1698
+ useDesktopPrototype: _.useDesktopPrototype
1699
+ })), l = (n == null ? void 0 : n.conceptUrl) || ((s = n == null ? void 0 : n.consentDocument) == null ? void 0 : s.url), c = window.innerWidth < gr, d = i["userleap-platform"], p = (_, f) => {
1700
+ _.preventDefault(), r(f);
1701
+ };
1702
+ if (!a && c && !o && l && ["email", "link"].includes(d)) {
1703
+ if (t === "prototype")
1704
+ return u(zt, {
1705
+ handleClick: (_) => {
1706
+ p(_, ee.ViewPrototypeClick);
1707
+ }
1708
+ });
1709
+ if (t === "pdf")
1710
+ return u(zt, {
1711
+ buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document",
1712
+ handleClick: (_) => {
1713
+ p(_, ee.ViewAgreementClick);
1714
+ }
1715
+ });
1716
+ }
1717
+ return e();
1718
+ }, Xn = (e, t) => {
1719
+ const n = ie(0), r = () => {
1720
+ if (e.current) {
1721
+ const o = e.current;
1722
+ o.style.height = "1px";
1723
+ const i = o.scrollHeight, a = o.offsetHeight - o.clientHeight, l = i + a, c = parseInt(window.getComputedStyle(o).getPropertyValue("max-height")), d = l <= c ? l : c;
1724
+ n.current !== d && t(), n.current = d, o.style.height = `${d}px`;
1725
+ }
1726
+ };
1727
+ return F(r, []), r;
1728
+ }, _t = ({
1729
+ ariaLabel: e,
1730
+ border: t,
1731
+ choiceStyle: n = {},
1732
+ label: r,
1733
+ isSelected: o,
1734
+ value: i,
1735
+ text: a,
1736
+ id: l,
1737
+ isRadio: c,
1738
+ useMobileStyling: d,
1739
+ error: p,
1740
+ allowTextEntry: s,
1741
+ promptText: _,
1742
+ onUserInputChanged: f
1743
+ }) => {
1744
+ const {
1745
+ styleNonce: g,
1746
+ viewDocument: m
1747
+ } = M((O) => ({
1748
+ styleNonce: O.styleNonce,
1749
+ viewDocument: O.viewDocument
1750
+ })), [y, v] = B(!1);
1751
+ Ro(m, t, g);
1752
+ const C = ({
1753
+ isSelected: O,
1754
+ userText: se
1755
+ }) => {
1756
+ f && f({
1757
+ id: l || "",
1758
+ selected: O,
1759
+ value: i,
1760
+ userText: se
1761
+ });
1762
+ }, S = (O) => {
1763
+ O.stopPropagation(), C({
1764
+ isSelected: c || !o,
1765
+ userText: a
1766
+ }), v(!1);
1767
+ }, E = () => {
1768
+ y || v(!0);
1769
+ }, h = () => {
1770
+ y && v(!1);
1771
+ }, T = (O) => {
1772
+ (O.key === "Enter" || O.key === " ") && S(O);
1773
+ }, I = {
1774
+ onClick: (O) => S(O),
1775
+ onKeyPress: (O) => T(O)
1776
+ };
1777
+ "ontouchstart" in m.documentElement ? (I.onTouchStart = h, I.onTouchCancel = h, I.onTouchEnd = h) : (I.onMouseDown = E, I.onMouseLeave = h);
1778
+ const N = c ? `radio-${l}` : `checkbox-${l}`, k = o || y ? [Ae] : [], $ = [...p ? [er] : [], ...k], Z = r ? {
1779
+ "aria-labelledby": `label-${l}`
1780
+ } : {
1781
+ "aria-label": e
1782
+ };
1783
+ return u("div", {
1784
+ className: R([...V(w.Choice, d), ...$]),
1785
+ id: `choice-div-${l}`,
1786
+ style: {
1787
+ ...n,
1788
+ ...p ? {
1789
+ borderColor: ye
1790
+ } : {}
1791
+ },
1792
+ ...I,
1793
+ children: [u("div", {
1794
+ className: R([w.ChoiceLabelContainer]),
1795
+ children: [c ? u("div", {
1796
+ ...Z,
1797
+ className: R([w.ChoiceRadio, ...k]),
1798
+ id: N,
1799
+ role: "radio",
1800
+ tabIndex: 0
1801
+ }) : u("div", {
1802
+ "aria-checked": o,
1803
+ "aria-labelledby": `label-${l}`,
1804
+ className: w.ChoiceCheckbox,
1805
+ id: N,
1806
+ role: "checkbox",
1807
+ style: o ? {
1808
+ backgroundColor: t,
1809
+ borderColor: t,
1810
+ boxShadow: "none"
1811
+ } : {},
1812
+ tabIndex: 0,
1813
+ children: o && u("svg", {
1814
+ fill: "none",
1815
+ height: "10",
1816
+ viewBox: "0 0 10 10",
1817
+ width: "10",
1818
+ xmlns: "http://www.w3.org/2000/svg",
1819
+ children: u("path", {
1820
+ d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",
1821
+ stroke: "white",
1822
+ strokeLinecap: "round",
1823
+ strokeWidth: "2"
1824
+ })
1825
+ })
1826
+ }), r && u("label", {
1827
+ className: R(V(w.ChoiceLabel, d)),
1828
+ htmlFor: N,
1829
+ id: `label-${l}`,
1830
+ children: r
1831
+ })]
1832
+ }), s && o && u("div", {
1833
+ className: R([w.ChoiceTextEntryContainer, ...k]),
1834
+ children: u(Eo, {
1835
+ onTextChange: (O) => C({
1836
+ isSelected: o,
1837
+ userText: O
1838
+ }),
1839
+ promptText: _ || "Please specify",
1840
+ textValue: a,
1841
+ useMobileStyling: d
1842
+ })
1843
+ })]
1844
+ });
1845
+ }, Eo = ({
1846
+ promptText: e,
1847
+ textValue: t,
1848
+ onTextChange: n,
1849
+ useMobileStyling: r
1850
+ }) => {
1851
+ const o = ie(null), {
1852
+ update: i
1853
+ } = M((l) => ({
1854
+ update: l.update
1855
+ })), a = Xn(o, () => i());
1856
+ return F(() => {
1857
+ o.current && o.current.focus();
1858
+ }, []), u("textarea", {
1859
+ "aria-label": e,
1860
+ "aria-multiline": "true",
1861
+ "aria-placeholder": e,
1862
+ className: R(V(w.ChoiceTextInput, r)),
1863
+ "data-gramm": "false",
1864
+ maxLength: 5e3,
1865
+ name: "text",
1866
+ onChange: (l) => {
1867
+ a(), l.stopPropagation(), n(l.currentTarget.value);
1868
+ },
1869
+ onClick: (l) => {
1870
+ l.stopPropagation();
1871
+ },
1872
+ onKeyPress: (l) => {
1873
+ l.stopPropagation();
1874
+ },
1875
+ placeholder: e,
1876
+ ref: o,
1877
+ role: "textbox",
1878
+ rows: 1,
1879
+ value: t
1880
+ });
1881
+ }, Wt = "ul-select-style-element", Ae = "ul-select-active-dynamic-style", er = "ul-select-error-dynamic-style", No = (e) => e.tagName.toLowerCase() === "style", Ro = (e, t, n) => {
1882
+ let r = e.getElementById(Wt), o = !1;
1883
+ r || (r = e.createElement("style"), o = !0), No(r) && (r.id = Wt, n && (r.nonce = n), r.textContent = Io(t), o && e.head.appendChild(r));
1884
+ }, Io = (e) => `
1885
+ .${Ae} {
1886
+ border-color: ${e};
1887
+ }
1888
+ .${Ae} .${w.ChoiceRadio}, .${Ae}.${w.ChoiceRadio} {
1889
+ border: 6px solid ${e};
1890
+ box-shadow: none;
1891
+ }
1892
+ .${er} {
1893
+ border-color: ${ye};
1894
+ }
1895
+ `, be = (e) => (e == null ? void 0 : e.buttonText) || "Next", tr = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", Lo = ({
1896
+ className: e,
1897
+ message: t,
1898
+ next: n,
1899
+ properties: r,
1900
+ questionId: o,
1901
+ type: i
1902
+ }) => {
1903
+ const {
1904
+ useMobileStyling: a,
1905
+ border: l
1906
+ } = M((k) => ({
1907
+ useMobileStyling: k.useMobileStyling,
1908
+ border: k.border
1909
+ })), [c, d] = B(!1), [p, s] = B(""), [_, f] = B(!1), g = r == null ? void 0 : r.collectName, m = (r == null ? void 0 : r.nameLabelText) || "Full Name", y = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", v = (r == null ? void 0 : r.submitButtonText) || "Submit", C = !!p.trim(), S = c && (!g || C), E = (k, $ = !1) => {
1910
+ k.preventDefault(), k.stopPropagation();
1911
+ let Z = null;
1912
+ if (!$) {
1913
+ if (!S) {
1914
+ f(!0);
1915
+ return;
1916
+ }
1917
+ Z = {
1918
+ submitted: !0
1919
+ }, g && (Z.name = p);
1920
+ }
1921
+ n({
1922
+ value: Z,
1923
+ questionId: o,
1924
+ type: i
1925
+ });
1926
+ }, h = (k) => {
1927
+ k.preventDefault(), k.stopPropagation(), s(k.currentTarget.value);
1928
+ }, T = (k) => {
1929
+ k.currentTarget.style.borderColor = _ && !C ? ye : l;
1930
+ }, I = (k) => {
1931
+ k.currentTarget.style.borderColor = _ && !C ? ye : it;
1932
+ }, N = () => u("div", {
1933
+ children: [u(_t, {
1934
+ allowTextEntry: !1,
1935
+ border: l,
1936
+ error: _ && !c,
1937
+ isRadio: !1,
1938
+ isSelected: c,
1939
+ label: y,
1940
+ onUserInputChanged: ({
1941
+ selected: k
1942
+ }) => {
1943
+ k !== c && d(!c);
1944
+ },
1945
+ useMobileStyling: a
1946
+ }), g && u("input", {
1947
+ "aria-label": m,
1948
+ "aria-placeholder": m,
1949
+ className: R(V(w.ConsentLegalNameInput, a)),
1950
+ "data-gramm": "false",
1951
+ maxLength: 250,
1952
+ name: "name",
1953
+ onBlur: I,
1954
+ onFocus: T,
1955
+ onInput: h,
1956
+ placeholder: m,
1957
+ style: _ && !C ? {
1958
+ borderColor: ye
1959
+ } : {},
1960
+ tabIndex: 0,
1961
+ value: p
1962
+ }), u("div", {
1963
+ className: "ul-card__button-wrapper ul-card-vertical__button-wrapper",
1964
+ children: [u(j, {
1965
+ className: S ? "" : w.ButtonDisabled,
1966
+ onClick: E,
1967
+ children: v
1968
+ }), r.required === !1 && u("button", {
1969
+ className: w.SkipButton,
1970
+ onClick: (k) => E(k, !0),
1971
+ children: tr(r)
1972
+ })]
1973
+ })]
1974
+ });
1975
+ return u("div", {
1976
+ className: R([e, "ul-card__consent-legal", w.FadeInTransition]),
1977
+ children: [u(Y, {
1978
+ message: t
1979
+ }), u("div", {
1980
+ className: "ul-rich-text-body",
1981
+ dangerouslySetInnerHTML: r != null && r.richTextBody ? {
1982
+ __html: r.richTextBody
1983
+ } : void 0,
1984
+ id: "ul-card__consent-legal-body-container"
1985
+ }), u(ae, {
1986
+ properties: r,
1987
+ defaultBody: N,
1988
+ embeddedType: "pdf"
1989
+ })]
1990
+ }, o);
1991
+ }, Ao = ({
1992
+ activeValue: e,
1993
+ border: t,
1994
+ icon: n,
1995
+ isPressed: r,
1996
+ onSubmit: o,
1997
+ range: i,
1998
+ scaleLabelType: a,
1999
+ setActiveValue: l,
2000
+ setIsPressed: c,
2001
+ useMobileStyling: d,
2002
+ value: p
2003
+ }) => {
2004
+ const s = `option-${p}`, _ = a === de.Number, f = a === de.Star, g = _ && p === e, [m, y] = p <= e && f || p === e ? r ? [t, 1] : [t, 0.3] : ["", 1], v = () => {
2005
+ switch (a) {
2006
+ case de.Star:
2007
+ return R([...V(w.LikertStar, d), ...V(`${w.LikertStar}-${p}`, d)]);
2008
+ case de.Smiley:
2009
+ return R([...V(w.LikertSmiley, d), ...V(`${w.LikertSmiley}-${p}`, d)]);
2010
+ default:
2011
+ return R(p === i ? [...V(w.LikertNumber, d), ...V(`${w.LikertNumber}-${p}`, d), ...V("likert-last-option", d)] : [...V(w.LikertNumber, d), ...V(`${w.LikertNumber}-${p}`, d)]);
2012
+ }
2013
+ }, C = () => {
2014
+ l(-1), c(!1);
2015
+ };
2016
+ return u("div", {
2017
+ "aria-label": _ ? void 0 : String(p),
2018
+ className: v(),
2019
+ dangerouslySetInnerHTML: {
2020
+ __html: n
2021
+ },
2022
+ id: s,
2023
+ onClick: () => o(),
2024
+ onPointerDown: () => c(!0),
2025
+ onPointerEnter: () => l(p),
2026
+ onPointerLeave: C,
2027
+ role: "radio",
2028
+ style: {
2029
+ color: _ ? "" : m,
2030
+ borderColor: g ? m : "",
2031
+ fillOpacity: g ? "" : y,
2032
+ zIndex: g ? 3 : "auto"
2033
+ },
2034
+ tabIndex: 0
2035
+ });
2036
+ }, Mo = ({
2037
+ className: e,
2038
+ labels: t,
2039
+ message: n,
2040
+ next: r,
2041
+ properties: o,
2042
+ questionId: i,
2043
+ type: a
2044
+ }) => {
2045
+ const {
2046
+ border: l,
2047
+ useMobileStyling: c
2048
+ } = M((N) => ({
2049
+ border: N.border,
2050
+ useMobileStyling: N.useMobileStyling
2051
+ })), [d, p] = B(-1), [s, _] = B(!1), f = t && t.left, g = t && t.right;
2052
+ let m;
2053
+ const {
2054
+ range: y,
2055
+ scaleLabelType: v,
2056
+ ratingIcons: C
2057
+ } = o;
2058
+ y && (m = Number(y));
2059
+ const S = m || 5, E = (N) => {
2060
+ var k, $;
2061
+ switch (v) {
2062
+ case de.Star:
2063
+ return (k = C[0]) == null ? void 0 : k.svg;
2064
+ case de.Smiley:
2065
+ return ($ = C[N]) == null ? void 0 : $.svg;
2066
+ default:
2067
+ return String(N + 1);
2068
+ }
2069
+ }, h = [...Array(S)].map((N, k) => {
2070
+ const $ = k + 1;
2071
+ return u(Ao, {
2072
+ activeValue: d,
2073
+ border: l,
2074
+ icon: E(k),
2075
+ isPressed: s,
2076
+ onSubmit: () => r({
2077
+ value: $,
2078
+ questionId: i,
2079
+ type: a
2080
+ }),
2081
+ range: S,
2082
+ scaleLabelType: v,
2083
+ setActiveValue: p,
2084
+ setIsPressed: _,
2085
+ useMobileStyling: c,
2086
+ value: $
2087
+ }, k);
2088
+ }), T = (N) => {
2089
+ N.preventDefault(), N.stopPropagation(), r({
2090
+ value: null,
2091
+ questionId: i,
2092
+ type: a
2093
+ });
2094
+ }, I = () => u(D, {
2095
+ children: [u("div", {
2096
+ "aria-label": `Rating (1 - ${S})`,
2097
+ className: "ul-card--likert__numbers",
2098
+ role: "radiogroup",
2099
+ children: h
2100
+ }), u("div", {
2101
+ className: "ul-card--likert__labels",
2102
+ children: [u("span", {
2103
+ children: f
2104
+ }), u("span", {
2105
+ children: g
2106
+ })]
2107
+ }), !o.required && u("div", {
2108
+ className: "ul-vertical-centered-container",
2109
+ children: u(j, {
2110
+ onClick: T,
2111
+ children: be(o)
2112
+ })
2113
+ })]
2114
+ });
2115
+ return u("form", {
2116
+ className: R([e, "ul-card--likert", w.FadeInTransition]),
2117
+ children: [u(Y, {
2118
+ message: n,
2119
+ properties: o
2120
+ }), u(ae, {
2121
+ properties: o,
2122
+ defaultBody: I
2123
+ })]
2124
+ }, i);
2125
+ }, $o = ({
2126
+ className: e,
2127
+ message: t,
2128
+ next: n,
2129
+ options: r,
2130
+ properties: o,
2131
+ questionId: i,
2132
+ type: a
2133
+ }) => {
2134
+ const {
2135
+ border: l,
2136
+ useMobileStyling: c
2137
+ } = M((h) => ({
2138
+ border: h.border,
2139
+ useMobileStyling: h.useMobileStyling
2140
+ })), d = o.matrixColumn, p = r.length, s = d.length, _ = o.required, f = (h) => {
2141
+ h.preventDefault(), h.stopPropagation(), n({
2142
+ value: m,
2143
+ questionId: i,
2144
+ type: a
2145
+ });
2146
+ }, g = r.reduce((h, T) => (h[T.id] = null, h), {}), [m, y] = B(g), v = (h, T) => {
2147
+ y((I) => ({
2148
+ ...I,
2149
+ [h]: T
2150
+ }));
2151
+ }, C = _ && Object.values(m).every((h) => h == null), S = r.map((h) => u(D, {
2152
+ children: [u("div", {
2153
+ "aria-label": h.label,
2154
+ className: "ul-matrix-row-label",
2155
+ children: h.label
2156
+ }, h.label), u("div", {
2157
+ className: "ul-matrix-row-options",
2158
+ role: "radiogroup",
2159
+ children: d.map((T, I) => {
2160
+ const N = I === s - 1;
2161
+ return u("div", {
2162
+ className: R("ul-matrix-option-wrapper", N && "ul-matrix-last-option"),
2163
+ children: u(_t, {
2164
+ allowTextEntry: !1,
2165
+ ariaLabel: `${h.label}-${T.label}`,
2166
+ border: l,
2167
+ choiceStyle: {
2168
+ background: "transparent",
2169
+ border: "none",
2170
+ marginBottom: "0",
2171
+ padding: "0"
2172
+ },
2173
+ error: !1,
2174
+ id: `${h.id}-${T.value}`,
2175
+ isRadio: !0,
2176
+ isSelected: m[h.id] === T.value,
2177
+ onUserInputChanged: () => v(h.id, T.value),
2178
+ useMobileStyling: c
2179
+ })
2180
+ }, T.value);
2181
+ })
2182
+ })]
2183
+ })), E = () => u("div", {
2184
+ children: [u("div", {
2185
+ className: "ul-card--matrix_container",
2186
+ style: `--maxWidth: ${br() - 74}px`,
2187
+ children: u("div", {
2188
+ className: "ul-card--matrix_grid",
2189
+ style: `--numColumns: ${s}; --numRows: ${p + 1}`,
2190
+ children: [u("div", {}), " ", d.map((h) => u("div", {
2191
+ className: "ul-matrix-column-label",
2192
+ children: h.label
2193
+ }, h.label)), S]
2194
+ })
2195
+ }), u("div", {
2196
+ className: "ul-card__button-wrapper",
2197
+ children: u(j, {
2198
+ disabled: C,
2199
+ children: be(o)
2200
+ })
2201
+ })]
2202
+ });
2203
+ return u("form", {
2204
+ className: R([e, w.FadeInTransition]),
2205
+ id: "text-form",
2206
+ onSubmit: f,
2207
+ children: [u(Y, {
2208
+ message: t,
2209
+ properties: o
2210
+ }), u(ae, {
2211
+ properties: o,
2212
+ defaultBody: E
2213
+ })]
2214
+ }, i);
2215
+ }, nr = ({
2216
+ className: e,
2217
+ message: t,
2218
+ onSubmit: n,
2219
+ options: r = [],
2220
+ properties: o,
2221
+ questionId: i,
2222
+ type: a
2223
+ }) => {
2224
+ const {
2225
+ border: l,
2226
+ useMobileStyling: c
2227
+ } = M((h) => ({
2228
+ border: h.border,
2229
+ useMobileStyling: h.useMobileStyling
2230
+ })), d = r.reduce((h, T) => (h[T.id] = {
2231
+ isSelected: !1
2232
+ }, h), {}), [p, s] = B(d), _ = a === b.MultipleChoice, f = o.required, g = Object.entries(p).some(([h, T]) => {
2233
+ var k;
2234
+ const I = r.find(($) => `${$.id}` === h), N = T.userText === void 0 || T.userText.trim() === "";
2235
+ return ((k = I == null ? void 0 : I.optionProperties) == null ? void 0 : k.allowsTextEntry) && N && T.isSelected;
2236
+ }), m = Object.values(p).some((h) => h.isSelected), y = g || f && !m, v = r.map(({
2237
+ id: h,
2238
+ label: T,
2239
+ value: I,
2240
+ optionProperties: N
2241
+ }) => {
2242
+ var Z, O;
2243
+ const k = `${h}`, {
2244
+ allowsTextEntry: $
2245
+ } = N || {
2246
+ allowsTextEntry: !1
2247
+ };
2248
+ return u(_t, {
2249
+ allowTextEntry: $,
2250
+ border: l,
2251
+ error: !1,
2252
+ id: k,
2253
+ isRadio: _,
2254
+ isSelected: !!((Z = p[k]) != null && Z.isSelected),
2255
+ label: T,
2256
+ onUserInputChanged: (se) => S(se.id, se.selected, se.userText),
2257
+ promptText: "Please specify",
2258
+ text: (O = p[h]) == null ? void 0 : O.userText,
2259
+ useMobileStyling: c,
2260
+ value: I
2261
+ }, k);
2262
+ }), C = (h) => {
2263
+ h.preventDefault(), h.stopPropagation(), n(p);
2264
+ }, S = (h, T, I) => {
2265
+ const N = Object.assign({}, p);
2266
+ if (_ && T)
2267
+ for (const k of Object.values(N))
2268
+ k.isSelected = !1, delete k.userText;
2269
+ N[h] = {
2270
+ isSelected: T,
2271
+ userText: I
2272
+ }, s(N);
2273
+ }, E = () => u("div", {
2274
+ children: [u("div", {
2275
+ className: R(V(w.ChoiceGroup, c)),
2276
+ role: _ ? "radiogroup" : "group",
2277
+ children: v
2278
+ }), u("div", {
2279
+ className: "ul-card__button-wrapper",
2280
+ children: u(j, {
2281
+ disabled: y,
2282
+ onClick: C,
2283
+ children: be(o)
2284
+ })
2285
+ })]
2286
+ });
2287
+ return u("form", {
2288
+ className: R([e, "ul-card--multiple", w.FadeInTransition]),
2289
+ id: "text-form",
2290
+ onSubmit: C,
2291
+ children: [u(Y, {
2292
+ message: t,
2293
+ properties: o
2294
+ }), u(ae, {
2295
+ properties: o,
2296
+ defaultBody: E
2297
+ })]
2298
+ }, i);
2299
+ }, Oo = (e) => {
2300
+ const {
2301
+ questionId: t,
2302
+ type: n,
2303
+ next: r,
2304
+ options: o
2305
+ } = e;
2306
+ return u(nr, {
2307
+ ...e,
2308
+ onSubmit: (a) => {
2309
+ const l = Object.entries(a).find(([, _]) => _.isSelected) || [void 0, void 0], [c, d] = l, p = o.find((_) => `${_.id}` === c), s = d != null && d.userText ? {
2310
+ [c]: {
2311
+ userText: d.userText
2312
+ }
2313
+ } : null;
2314
+ r({
2315
+ value: p && c ? {
2316
+ [c]: p.value
2317
+ } : {},
2318
+ secondaryValue: s,
2319
+ questionId: t,
2320
+ type: n
2321
+ });
2322
+ }
2323
+ });
2324
+ }, Uo = (e) => {
2325
+ const {
2326
+ questionId: t,
2327
+ type: n,
2328
+ next: r
2329
+ } = e;
2330
+ return u(nr, {
2331
+ ...e,
2332
+ onSubmit: (i) => {
2333
+ const a = {}, l = Object.entries(i).reduce((d, [p, s]) => (d[p] = s.isSelected, d), a), c = Object.entries(i).reduce((d, [p, s]) => {
2334
+ if (!s.userText)
2335
+ return d;
2336
+ const _ = d || {};
2337
+ return _[p] = {
2338
+ userText: s.userText
2339
+ }, _;
2340
+ }, null);
2341
+ r({
2342
+ value: l,
2343
+ secondaryValue: c,
2344
+ questionId: t,
2345
+ type: n
2346
+ });
2347
+ }
2348
+ });
2349
+ }, Vo = ({
2350
+ className: e,
2351
+ props: {
2352
+ labels: t,
2353
+ message: n,
2354
+ properties: r
2355
+ },
2356
+ next: o,
2357
+ questionId: i,
2358
+ type: a
2359
+ }) => {
2360
+ const {
2361
+ border: l,
2362
+ useMobileStyling: c
2363
+ } = M((g) => ({
2364
+ border: g.border,
2365
+ useMobileStyling: g.useMobileStyling
2366
+ })), d = t && t.left, p = t && t.right, s = [...Array(11)].map((g, m) => u("div", {
2367
+ className: R([...V(w.NPSNumber, c), ...V(`${w.NPSNumber}-${m}`, c)]),
2368
+ id: `option-${m}`,
2369
+ onClick: () => o({
2370
+ value: m,
2371
+ questionId: i,
2372
+ type: a
2373
+ }),
2374
+ onKeyPress: (y) => {
2375
+ y.preventDefault(), (y.key === "Enter" || y.key === " ") && o({
2376
+ value: m,
2377
+ questionId: i,
2378
+ type: a
2379
+ });
2380
+ },
2381
+ onPointerDown: (y) => {
2382
+ y.currentTarget.style.zIndex = "2", y.currentTarget.style.borderColor = l;
2383
+ },
2384
+ onPointerLeave: (y) => {
2385
+ y.currentTarget.style.zIndex = "auto", y.currentTarget.style.borderColor = it;
2386
+ },
2387
+ role: "radio",
2388
+ tabIndex: 0,
2389
+ children: m
2390
+ }, m)), _ = (g) => {
2391
+ g.preventDefault(), g.stopPropagation(), o({
2392
+ value: null,
2393
+ questionId: i,
2394
+ type: a
2395
+ });
2396
+ }, f = () => u("div", {
2397
+ children: [u("div", {
2398
+ className: "ul-card--nps__numbers",
2399
+ children: s
2400
+ }), u("div", {
2401
+ className: "ul-card--nps__labels",
2402
+ children: [u("span", {
2403
+ children: d
2404
+ }), u("span", {
2405
+ children: p
2406
+ })]
2407
+ }), !r.required && u("div", {
2408
+ className: "ul-vertical-centered-container",
2409
+ children: u(j, {
2410
+ onClick: _,
2411
+ children: be(r)
2412
+ })
2413
+ })]
2414
+ });
2415
+ return u("form", {
2416
+ className: R([e, "ul-card--nps", w.FadeInTransition]),
2417
+ children: [u(Y, {
2418
+ message: n,
2419
+ properties: r
2420
+ }), u(ae, {
2421
+ properties: r,
2422
+ defaultBody: f
2423
+ })]
2424
+ }, i);
2425
+ }, Ho = ({
2426
+ className: e,
2427
+ message: t,
2428
+ next: n,
2429
+ properties: r,
2430
+ questionId: o,
2431
+ type: i
2432
+ }) => {
2433
+ const {
2434
+ border: a,
2435
+ useMobileStyling: l,
2436
+ update: c
2437
+ } = M((h) => ({
2438
+ border: h.border,
2439
+ useMobileStyling: h.useMobileStyling,
2440
+ update: h.update
2441
+ })), [d, p] = B(""), s = ie(null), _ = d.trim(), f = r.required === !0 && !_, g = Xn(s, () => c()), m = (h) => {
2442
+ g(), h.preventDefault(), h.stopPropagation(), p(h.currentTarget.value);
2443
+ }, y = (h) => {
2444
+ h.preventDefault(), h.stopPropagation(), n({
2445
+ value: d,
2446
+ questionId: o,
2447
+ type: i
2448
+ });
2449
+ }, v = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", C = (h) => {
2450
+ h.currentTarget.style.borderColor = a;
2451
+ }, S = (h) => {
2452
+ h.currentTarget.style.borderColor = it;
2453
+ }, E = () => u("div", {
2454
+ className: "ul-card-text",
2455
+ children: [u("div", {
2456
+ className: "ul-card-text__container",
2457
+ children: u("textarea", {
2458
+ "aria-label": v,
2459
+ "aria-labelledby": w.QuestionHeader,
2460
+ "aria-multiline": "true",
2461
+ "aria-placeholder": v,
2462
+ className: R(V(w.OpenTextInput, l)),
2463
+ "data-gramm": "false",
2464
+ maxLength: 5e3,
2465
+ name: "text",
2466
+ onBlur: S,
2467
+ onChange: m,
2468
+ onFocus: C,
2469
+ placeholder: v,
2470
+ ref: s,
2471
+ role: "textbox",
2472
+ tabIndex: 0
2473
+ })
2474
+ }), u(j, {
2475
+ disabled: f,
2476
+ onClick: y,
2477
+ style: {
2478
+ backgroundColor: f ? "" : a
2479
+ },
2480
+ children: be(r)
2481
+ })]
2482
+ });
2483
+ return u("form", {
2484
+ className: R([e, "ul-card--text", w.FadeInTransition]),
2485
+ id: "text-form",
2486
+ children: [u(Y, {
2487
+ message: t,
2488
+ properties: r
2489
+ }), u(ae, {
2490
+ defaultBody: E,
2491
+ properties: r
2492
+ })]
2493
+ }, o);
2494
+ };
2495
+ var oe = /* @__PURE__ */ ((e) => (e[e.RequestNeeded = 1] = "RequestNeeded", e[e.TryAgain = 2] = "TryAgain", e[e.Ready = 3] = "Ready", e))(oe || {});
2496
+ const Be = (e) => e.type === q.AvPermission, rr = (e) => e.type === q.ScreenPermission, Bo = (e, t) => !(Be(t) ? t.permissionDescriptors : []).includes(ke.Camera) || e.getVideoTracks().length > 0, or = (e, t) => {
2497
+ if (e === void 0)
2498
+ return oe.RequestNeeded;
2499
+ if (e) {
2500
+ if (!Bo(e, t))
2501
+ return oe.RequestNeeded;
2502
+ } else
2503
+ return oe.TryAgain;
2504
+ return oe.Ready;
2505
+ }, Zt = {
2506
+ avStream: null,
2507
+ currentPage: null,
2508
+ mediaRecordingUids: null,
2509
+ nextQuestion: () => {
2510
+ },
2511
+ passthroughData: void 0,
2512
+ recordingMediaTypes: void 0,
2513
+ screenPermissionRequested: !1,
2514
+ type: void 0
2515
+ }, K = Kn((e) => ({
2516
+ ...Zt,
2517
+ reset: () => {
2518
+ e(Zt);
2519
+ },
2520
+ updatePage: (t) => {
2521
+ e(t);
2522
+ }
2523
+ }));
2524
+ function nt({
2525
+ currentPage: e,
2526
+ pages: t
2527
+ }) {
2528
+ const {
2529
+ avStream: n,
2530
+ recordingMediaTypes: r,
2531
+ updatePage: o
2532
+ } = K.getState(), {
2533
+ recorderEventEmitter: i
2534
+ } = M.getState();
2535
+ i.emit(H.AvPermission, {
2536
+ [L.PermissionDescriptors]: e.permissionDescriptors,
2537
+ [L.StreamReadyCallback]: (a, l) => {
2538
+ if (n === a)
2539
+ return;
2540
+ let c = e;
2541
+ if (a && !e.permissionDescriptors.includes(ke.Camera)) {
2542
+ const d = t.indexOf(e), p = l != null && l.active ? d + 2 : d + 1;
2543
+ l != null && l.active && r && i.emit(H.BeginRecording, {
2544
+ [L.RecordingMediaTypes]: r,
2545
+ [L.StartRecordingCallback]: (s) => o({
2546
+ mediaRecordingUids: s
2547
+ })
2548
+ }), c = t[p];
2549
+ }
2550
+ o({
2551
+ currentPage: c,
2552
+ avStream: a
2553
+ });
2554
+ }
2555
+ });
2556
+ }
2557
+ function Do({
2558
+ pages: e,
2559
+ userId: t,
2560
+ responseGroupUid: n,
2561
+ surveyId: r,
2562
+ questionId: o,
2563
+ next: i
2564
+ }) {
2565
+ const {
2566
+ updatePage: a
2567
+ } = K.getState(), {
2568
+ eventEmitFn: l,
2569
+ recorderEventEmitter: c
2570
+ } = M.getState(), d = {
2571
+ questionId: o,
2572
+ surveyId: r,
2573
+ visitorId: t,
2574
+ responseGroupUid: n
2575
+ };
2576
+ let p = 0;
2577
+ c.emit(ee.RecordedTaskPermissionScreen), l(ee.RecordedTaskPermissionScreen), c.emit(H.PermissionStatus, {
2578
+ [L.PermissionStatusCallback]: (_, f, g, m) => {
2579
+ const y = e[p], {
2580
+ type: v
2581
+ } = y, C = [Q.Screen];
2582
+ if (Be(y)) {
2583
+ const {
2584
+ permissionDescriptors: S
2585
+ } = y, E = S == null ? void 0 : S.includes(ke.Microphone), h = S == null ? void 0 : S.includes(ke.Camera);
2586
+ E && C.push(Q.Audio), h && C.push(Q.Video);
2587
+ const T = (_ == null ? void 0 : _.active) && !h, I = (_ == null ? void 0 : _.active) && f;
2588
+ (T || I) && p++;
2589
+ }
2590
+ rr(e[p]) && g && (p++, c.emit(H.BeginRecording, {
2591
+ [L.RecordingMediaTypes]: C,
2592
+ [L.StartRecordingCallback]: (S) => a({
2593
+ mediaRecordingUids: S
2594
+ })
2595
+ })), a({
2596
+ currentPage: e[p],
2597
+ avStream: _,
2598
+ screenPermissionRequested: g,
2599
+ nextQuestion: i,
2600
+ type: v,
2601
+ passthroughData: d,
2602
+ recordingMediaTypes: C,
2603
+ captureStream: m
2604
+ });
2605
+ }
2606
+ });
2607
+ const s = e[p];
2608
+ return s.type === q.AvPermission && nt({
2609
+ currentPage: s,
2610
+ pages: e
2611
+ }), s;
2612
+ }
2613
+ function rt({
2614
+ status: e
2615
+ }) {
2616
+ const {
2617
+ nextQuestion: t,
2618
+ passthroughData: n,
2619
+ mediaRecordingUids: r,
2620
+ reset: o
2621
+ } = K.getState(), {
2622
+ recorderEventEmitter: i,
2623
+ handleUploadUpdate: a,
2624
+ index: l
2625
+ } = M.getState(), c = {
2626
+ value: {
2627
+ taskStatus: e
2628
+ },
2629
+ type: b.RecordedTask,
2630
+ questionId: (n == null ? void 0 : n.questionId) || 1
2631
+ };
2632
+ n && i.emit(H.FinishTask, {
2633
+ [L.BeginCallback]: (d) => {
2634
+ a({
2635
+ mediaRecordingUid: d,
2636
+ isSubmitted: !0,
2637
+ progressPct: 0,
2638
+ isComplete: !1
2639
+ });
2640
+ },
2641
+ [L.ProgressCallback]: (d, p) => {
2642
+ a({
2643
+ mediaRecordingUid: d,
2644
+ progressPct: p.detail,
2645
+ isSubmitted: !1,
2646
+ isComplete: !1
2647
+ });
2648
+ },
2649
+ [L.UploadCallback]: (d) => {
2650
+ d && a({
2651
+ mediaRecordingUid: d,
2652
+ isComplete: !0,
2653
+ isSubmitted: !0,
2654
+ progressPct: 100
2655
+ });
2656
+ },
2657
+ [L.PassthroughData]: n,
2658
+ [L.CurrentIndex]: l,
2659
+ [L.TaskResponse]: c,
2660
+ [L.TaskCompleteCallback]: (d) => {
2661
+ c.value.taskDurationMillisecond = d, r && (c.value.mediaRecordingUids = r), o(), t(c);
2662
+ }
2663
+ });
2664
+ }
2665
+ function ht({
2666
+ pages: e,
2667
+ setIsRequestingPermission: t
2668
+ }) {
2669
+ const {
2670
+ recorderEventEmitter: n,
2671
+ eventEmitFn: r
2672
+ } = M.getState(), {
2673
+ updatePage: o,
2674
+ currentPage: i,
2675
+ recordingMediaTypes: a,
2676
+ screenPermissionRequested: l
2677
+ } = K.getState();
2678
+ if (!i)
2679
+ return;
2680
+ const c = e.indexOf(i);
2681
+ switch (i.type) {
2682
+ case q.AvPermission: {
2683
+ const d = l ? c + 2 : c + 1;
2684
+ l && a && n.emit(H.BeginRecording, {
2685
+ [L.RecordingMediaTypes]: a,
2686
+ [L.StartRecordingCallback]: (p) => {
2687
+ o({
2688
+ mediaRecordingUids: p
2689
+ });
2690
+ }
2691
+ }), o({
2692
+ currentPage: e[d]
2693
+ });
2694
+ return;
2695
+ }
2696
+ case q.ScreenPermission:
2697
+ n.emit(H.ScreenPermission, {
2698
+ [L.ScreenPermissionRequested]: t,
2699
+ [L.StreamReadyCallback]: (d, p) => {
2700
+ const s = p ? e[c + 1] : i;
2701
+ p && a && n.emit(H.BeginRecording, {
2702
+ [L.RecordingMediaTypes]: a,
2703
+ [L.StartRecordingCallback]: (_) => {
2704
+ o({
2705
+ captureStream: p,
2706
+ mediaRecordingUids: _
2707
+ });
2708
+ }
2709
+ }), o({
2710
+ currentPage: s,
2711
+ screenPermissionRequested: !0,
2712
+ captureStream: p
2713
+ });
2714
+ }
2715
+ });
2716
+ return;
2717
+ case q.StartTask:
2718
+ r(ee.RecordedTaskStart), n.emit(ee.RecordedTaskStart), n.emit(H.StartTask), o({
2719
+ currentPage: e[c + 1],
2720
+ screenPermissionRequested: !0
2721
+ });
2722
+ return;
2723
+ case q.CompleteTask:
2724
+ return;
2725
+ }
2726
+ }
2727
+ const ir = "ul-permission-graphics-container", ar = "ul-permission-body", sr = R([ir, "ul_recorded-task-inset-spacing"]), De = R(["ul-horizontal-button-container", "ul-horizontal-button-container-left"]), lr = ({
2728
+ richTextBody: e
2729
+ }) => u("div", {
2730
+ className: "ul-rich-text-body",
2731
+ dangerouslySetInnerHTML: {
2732
+ __html: e
2733
+ },
2734
+ id: "ul-task-detail-container"
2735
+ }), je = ({
2736
+ required: e,
2737
+ skipButtonText: t,
2738
+ bottom: n = !1
2739
+ }) => e ? null : u(j, {
2740
+ className: R([n && "ul-skip-button-below", w.InactiveButton]),
2741
+ onClick: rt.bind(null, {
2742
+ status: z.Abandoned
2743
+ }),
2744
+ children: t || "Skip"
2745
+ }), mt = (e) => {
2746
+ const {
2747
+ avStream: t,
2748
+ captureStream: n,
2749
+ recordingMediaTypes: r,
2750
+ updatePage: o
2751
+ } = K.getState(), i = (r == null ? void 0 : r.includes(Q.Audio)) || (r == null ? void 0 : r.includes(Q.Video));
2752
+ F(() => {
2753
+ const a = setInterval(() => {
2754
+ i && t && !t.active ? o({
2755
+ avStream: null,
2756
+ currentPage: e[0]
2757
+ }) : (!n || !n.active) && o({
2758
+ captureStream: void 0,
2759
+ currentPage: e[i ? 1 : 0]
2760
+ });
2761
+ }, 1e3);
2762
+ return () => clearInterval(a);
2763
+ }, [t, n, i, e, r, o]);
2764
+ }, jo = ({
2765
+ content: e,
2766
+ pages: t,
2767
+ required: n
2768
+ }) => {
2769
+ const {
2770
+ buttonText: r,
2771
+ skipButtonText: o,
2772
+ taskDetail: i
2773
+ } = e;
2774
+ return mt(t), u("div", {
2775
+ className: "ul-task-page",
2776
+ children: [u(lr, {
2777
+ richTextBody: i
2778
+ }), u("div", {
2779
+ className: De,
2780
+ children: [u(j, {
2781
+ onClick: ht.bind(null, {
2782
+ pages: t
2783
+ }),
2784
+ children: r
2785
+ }), u(je, {
2786
+ required: n,
2787
+ skipButtonText: o
2788
+ })]
2789
+ })]
2790
+ }, "start-task");
2791
+ }, Fo = ({
2792
+ content: e,
2793
+ pages: t,
2794
+ properties: n
2795
+ }) => {
2796
+ const {
2797
+ buttonText: r,
2798
+ skipButtonText: o
2799
+ } = e;
2800
+ mt(t);
2801
+ const a = u(ae, {
2802
+ properties: n,
2803
+ defaultBody: () => u("div", {
2804
+ className: De,
2805
+ children: [u(j, {
2806
+ className: "ul-complete-task-button",
2807
+ onClick: rt.bind(null, {
2808
+ status: z.Completed
2809
+ }),
2810
+ children: r
2811
+ }), u(j, {
2812
+ className: R([w.InactiveButton]),
2813
+ onClick: rt.bind(null, {
2814
+ status: z.GivenUp
2815
+ }),
2816
+ children: o
2817
+ })]
2818
+ })
2819
+ });
2820
+ return u("div", {
2821
+ className: "ul-task-page",
2822
+ children: [u(lr, {
2823
+ richTextBody: e.taskDetail
2824
+ }), a]
2825
+ }, "complete-task");
2826
+ }, qo = ({
2827
+ content: e,
2828
+ pages: t,
2829
+ required: n
2830
+ }) => {
2831
+ const {
2832
+ buttonText: r,
2833
+ skipButtonText: o
2834
+ } = e, [i] = M((c) => [c.tabTitle]), [a, l] = B(!1);
2835
+ return u("div", {
2836
+ children: [u("div", {
2837
+ className: sr,
2838
+ children: [u("p", {
2839
+ style: {
2840
+ marginTop: "auto"
2841
+ },
2842
+ children: e.selectTabText
2843
+ }), u("div", {
2844
+ className: "ul-select-tab-container",
2845
+ children: u("p", {
2846
+ className: ar,
2847
+ children: i
2848
+ })
2849
+ })]
2850
+ }), u("div", {
2851
+ className: n ? "" : De,
2852
+ children: [u(j, {
2853
+ disabled: a,
2854
+ onClick: ht.bind(null, {
2855
+ pages: t,
2856
+ setIsRequestingPermission: l
2857
+ }),
2858
+ children: r
2859
+ }), u(je, {
2860
+ required: n,
2861
+ skipButtonText: o
2862
+ })]
2863
+ })]
2864
+ });
2865
+ }, zo = ({
2866
+ content: e
2867
+ }) => u("div", {
2868
+ className: R([ir, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"]),
2869
+ dangerouslySetInnerHTML: {
2870
+ __html: e.svg
2871
+ }
2872
+ }, "ul-permission-request-graphic"), Wo = ({
2873
+ content: e,
2874
+ pages: t,
2875
+ required: n
2876
+ }) => {
2877
+ const {
2878
+ permissionDeniedHeadline: r,
2879
+ permissionDeniedBody: o,
2880
+ skipButtonText: i,
2881
+ tryAgainButtonText: a
2882
+ } = e, l = Be(t[0]) ? t[0] : null;
2883
+ return F(() => {
2884
+ const c = setInterval(() => {
2885
+ l !== null && nt({
2886
+ currentPage: l,
2887
+ pages: t
2888
+ });
2889
+ }, 1e3);
2890
+ return () => clearInterval(c);
2891
+ }, [l, t]), l ? u("div", {
2892
+ children: [u("div", {
2893
+ className: sr,
2894
+ children: u("p", {
2895
+ className: "ul-av-permission-denied-paragraph",
2896
+ children: [u("span", {
2897
+ className: "ul-av-permission-denied-headline",
2898
+ children: r
2899
+ }), u("span", {
2900
+ className: ar,
2901
+ children: o
2902
+ })]
2903
+ })
2904
+ }), u("div", {
2905
+ className: De,
2906
+ children: [u(j, {
2907
+ onClick: nt.bind(null, {
2908
+ currentPage: l,
2909
+ pages: t
2910
+ }),
2911
+ children: a
2912
+ }), u(je, {
2913
+ required: n,
2914
+ skipButtonText: i
2915
+ })]
2916
+ })]
2917
+ }) : null;
2918
+ }, Zo = ({
2919
+ stream: e
2920
+ }) => u("video", {
2921
+ autoPlay: !0,
2922
+ className: R(["ul_recorded-task-inset-spacing"]),
2923
+ id: "ul-record-task-video-preview",
2924
+ muted: !0,
2925
+ ref: (t) => {
2926
+ t && (t.srcObject = e || null);
2927
+ }
2928
+ }), Go = ({
2929
+ content: e,
2930
+ pages: t,
2931
+ required: n
2932
+ }) => {
2933
+ const {
2934
+ skipButtonText: r
2935
+ } = e, {
2936
+ avStream: o
2937
+ } = K.getState();
2938
+ return mt(t), u("div", {
2939
+ children: [u(Zo, {
2940
+ stream: o
2941
+ }), u("div", {
2942
+ className: "ul-vertical-button-container-center",
2943
+ children: [u(j, {
2944
+ onClick: ht.bind(null, {
2945
+ pages: t
2946
+ }),
2947
+ children: e.buttonText
2948
+ }), u(je, {
2949
+ bottom: !0,
2950
+ required: n,
2951
+ skipButtonText: r
2952
+ })]
2953
+ })]
2954
+ });
2955
+ }, Qo = ({
2956
+ properties: e
2957
+ }) => {
2958
+ const {
2959
+ pages: t,
2960
+ required: n
2961
+ } = e, {
2962
+ avStream: r,
2963
+ currentPage: o
2964
+ } = K.getState();
2965
+ if (o === void 0)
2966
+ return null;
2967
+ switch (o == null ? void 0 : o.type) {
2968
+ case q.AvPermission: {
2969
+ const i = or(r, o);
2970
+ return i === oe.RequestNeeded ? u(zo, {
2971
+ content: o
2972
+ }) : i === oe.TryAgain ? u(Wo, {
2973
+ content: o,
2974
+ pages: t,
2975
+ required: n
2976
+ }) : u(Go, {
2977
+ content: o,
2978
+ pages: t,
2979
+ required: n
2980
+ });
2981
+ }
2982
+ case q.ScreenPermission:
2983
+ return u(qo, {
2984
+ content: o,
2985
+ pages: t,
2986
+ required: n
2987
+ });
2988
+ case q.StartTask:
2989
+ return u(jo, {
2990
+ content: o,
2991
+ pages: t,
2992
+ required: n
2993
+ });
2994
+ case q.CompleteTask:
2995
+ return u(Fo, {
2996
+ content: o,
2997
+ pages: t,
2998
+ properties: e
2999
+ });
3000
+ default:
3001
+ return null;
3002
+ }
3003
+ }, Ko = ({
3004
+ className: e,
3005
+ properties: t,
3006
+ next: n,
3007
+ questionId: r
3008
+ }) => {
3009
+ const o = M(), {
3010
+ surveyId: i,
3011
+ responseGroupUid: a,
3012
+ userId: l
3013
+ } = o, c = K(), {
3014
+ screenPermissionRequested: d
3015
+ } = c, p = K((m) => m.avStream);
3016
+ let s = K((m) => m.currentPage);
3017
+ s || (s = Do({
3018
+ questionId: r,
3019
+ surveyId: i,
3020
+ next: (m) => {
3021
+ n(m);
3022
+ },
3023
+ pages: t.pages,
3024
+ responseGroupUid: a,
3025
+ userId: l
3026
+ }));
3027
+ let _ = s.headline, f = s.captionText;
3028
+ const g = or(p, s);
3029
+ return rr(s) && d && (_ = s.permissionDeniedHeadline, f = s.permissionDeniedCaptionText), Be(s) && g === oe.Ready && (_ = s.permissionGrantedHeadline, f = s.permissionGrantedCaptionText), u("div", {
3030
+ className: R([e, "ul-center-horizontally", w.FadeInTransition]),
3031
+ children: [u(Y, {
3032
+ message: _,
3033
+ properties: {
3034
+ captionText: f
3035
+ }
3036
+ }), u(Qo, {
3037
+ properties: t
3038
+ })]
3039
+ });
3040
+ }, Yo = {
3041
+ "{{user_id}}": "externalUserId",
3042
+ "{{email}}": "email"
3043
+ }, Jo = (e = void 0, t = {}) => {
3044
+ if (!e)
3045
+ return e;
3046
+ let n = e;
3047
+ const r = [];
3048
+ for (const [c, d] of Object.entries(Yo))
3049
+ if (n.toLowerCase().includes(c))
3050
+ if (t[d]) {
3051
+ const p = new RegExp(c, "gi");
3052
+ n = n.replace(p, t[d]);
3053
+ } else
3054
+ r.push(c);
3055
+ if (r.length === 0 || !n.includes("?"))
3056
+ return n;
3057
+ const o = n.slice(0, n.indexOf("?")), a = n.slice(n.indexOf("?") + 1).split("&").map((c) => c.split("=")).filter((c) => !r.includes(c[1]));
3058
+ if (a.length === 0)
3059
+ return o;
3060
+ const l = a.map((c) => c.join("=")).join("&");
3061
+ return `${o}?${l}`;
3062
+ }, Xo = ({
3063
+ className: e,
3064
+ message: t,
3065
+ next: n,
3066
+ properties: r,
3067
+ questionId: o,
3068
+ type: i
3069
+ }) => {
3070
+ const {
3071
+ visitorAttributes: a
3072
+ } = M((s) => ({
3073
+ visitorAttributes: s.visitorAttributes
3074
+ })), l = (s, _ = !1) => {
3075
+ n({
3076
+ value: _ ? {
3077
+ skipped: !0
3078
+ } : void 0,
3079
+ questionId: o,
3080
+ type: i
3081
+ });
3082
+ }, c = (s) => {
3083
+ (s.key === "Enter" || s.key === " ") && n({
3084
+ value: void 0,
3085
+ questionId: o,
3086
+ type: i
3087
+ });
3088
+ }, d = () => {
3089
+ const s = Jo(r && r.buttonUrl, a);
3090
+ return u("div", {
3091
+ className: "ul-card-button-group",
3092
+ children: [u("a", {
3093
+ className: "ul-card-text__button ul-card__text-url-prompt-button",
3094
+ href: s,
3095
+ id: "ul-card-text__button",
3096
+ onClick: l,
3097
+ onKeyPress: c,
3098
+ rel: "noreferrer",
3099
+ role: s ? "link" : "button",
3100
+ tabIndex: 0,
3101
+ target: "_blank",
3102
+ children: be(r)
3103
+ }), r.required === !1 && u("button", {
3104
+ className: w.SkipButton,
3105
+ onClick: (_) => l(_, !0),
3106
+ children: tr(r)
3107
+ })]
3108
+ });
3109
+ }, p = (s, _) => s ? u("div", {
3110
+ className: "ul-rich-text-body",
3111
+ dangerouslySetInnerHTML: {
3112
+ __html: s
3113
+ },
3114
+ id: "ul-card__text-url-body-container"
3115
+ }) : u("div", {
3116
+ className: "ul-rich-text-body",
3117
+ id: "ul-card__text-url-body-container",
3118
+ children: (_ ? _.split(/\n\s*\n/g) : []).map((f, g) => u("p", {
3119
+ children: f
3120
+ }, g))
3121
+ });
3122
+ return u("div", {
3123
+ className: R([e, "ul-card__text-url-prompt", w.FadeInTransition]),
3124
+ children: [u(Y, {
3125
+ message: t
3126
+ }), p(r == null ? void 0 : r.richTextBody, r == null ? void 0 : r.body), u(ae, {
3127
+ defaultBody: d,
3128
+ properties: r
3129
+ })]
3130
+ }, o);
3131
+ }, ei = ({
3132
+ className: e,
3133
+ questionId: t
3134
+ }) => {
3135
+ const {
3136
+ border: n,
3137
+ destroy: r,
3138
+ endCard: o,
3139
+ forceBrandedLogo: i
3140
+ } = M((c) => ({
3141
+ border: c.border,
3142
+ destroy: c.destroy,
3143
+ endCard: c.endCard,
3144
+ forceBrandedLogo: c.forceBrandedLogo
3145
+ }));
3146
+ F(() => {
3147
+ setTimeout(() => {
3148
+ r(fe);
3149
+ }, i ? 4e3 : 2e3);
3150
+ }, [r, i]);
3151
+ const a = o && o.subheader ? u("p", {
3152
+ className: w.Caption,
3153
+ children: o.subheader
3154
+ }) : null, l = o && o.headline ? o.headline : "";
3155
+ return u("div", {
3156
+ className: R([e, "ul-card--thanks", w.FadeInTransition]),
3157
+ children: u("div", {
3158
+ children: u("div", {
3159
+ className: "ul-card--thanks-content",
3160
+ children: [u("div", {
3161
+ className: "ul-thanks-check",
3162
+ children: u("svg", {
3163
+ "aria-labelledby": "title",
3164
+ fill: "none",
3165
+ height: "99",
3166
+ viewBox: "0 0 81 99",
3167
+ width: "81",
3168
+ xmlns: "http://www.w3.org/2000/svg",
3169
+ children: [u("path", {
3170
+ clipRule: "evenodd",
3171
+ 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",
3172
+ fill: n,
3173
+ fillRule: "evenodd"
3174
+ }), u("path", {
3175
+ clipRule: "evenodd",
3176
+ 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",
3177
+ fill: n,
3178
+ fillRule: "evenodd"
3179
+ }), u("path", {
3180
+ 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",
3181
+ fill: "black",
3182
+ fillOpacity: "0.2"
3183
+ })]
3184
+ })
3185
+ }), u(Y, {
3186
+ message: l
3187
+ }), a]
3188
+ })
3189
+ })
3190
+ }, t);
3191
+ }, ti = ({
3192
+ className: e
3193
+ }) => {
3194
+ const {
3195
+ uploadProgress: t
3196
+ } = M((i) => ({
3197
+ uploadProgress: i.uploadProgress
3198
+ }));
3199
+ let n, r;
3200
+ 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.");
3201
+ const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
3202
+ return u("div", {
3203
+ className: R([e, "ul-card--uploading", w.FadeInTransition]),
3204
+ children: [u("div", {
3205
+ "aria-busy": "true",
3206
+ "aria-label": "Processing...",
3207
+ "aria-live": "polite",
3208
+ className: w.LoadingSpinnerContainer,
3209
+ role: "progressbar",
3210
+ children: u("div", {
3211
+ className: w.LoadingSpinner,
3212
+ children: [u("div", {
3213
+ className: w.LoadingSpinnerFirst
3214
+ }), u("div", {
3215
+ className: w.LoadingSpinnerSecond
3216
+ }), u("div", {
3217
+ className: w.LoadingSpinnerThird
3218
+ }), u("div", {
3219
+ className: w.LoadingSpinnerFourth
3220
+ })]
3221
+ })
3222
+ }), u(Y, {
3223
+ message: `${n} (${o}% complete)`
3224
+ }), u("p", {
3225
+ className: w.Caption,
3226
+ children: r
3227
+ })]
3228
+ });
3229
+ }, Gt = ({
3230
+ logoOnly: e = !1,
3231
+ style: t = {}
3232
+ }) => u("svg", {
3233
+ alt: `${e ? "Powered by " : ""}Sprig`,
3234
+ width: e ? "35" : "112",
3235
+ height: "15",
3236
+ viewBox: e ? "79 0 31 15" : "0 0 112 15",
3237
+ fill: "none",
3238
+ xmlns: "http://www.w3.org/2000/svg",
3239
+ style: {
3240
+ display: "block",
3241
+ ...t
3242
+ },
3243
+ children: [!e && u("path", {
3244
+ 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",
3245
+ fill: "black",
3246
+ fillOpacity: "0.7"
3247
+ }), u("path", {
3248
+ 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",
3249
+ fill: "black",
3250
+ fillOpacity: "0.7"
3251
+ }), u("path", {
3252
+ 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",
3253
+ fill: "black",
3254
+ fillOpacity: "0.7"
3255
+ }), u("path", {
3256
+ 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",
3257
+ fill: "black",
3258
+ fillOpacity: "0.7"
3259
+ }), u("path", {
3260
+ 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",
3261
+ fill: "black",
3262
+ fillOpacity: "0.7"
3263
+ }), u("path", {
3264
+ 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",
3265
+ fill: "black",
3266
+ fillOpacity: "0.7"
3267
+ })]
3268
+ }), ni = () => {
3269
+ const {
3270
+ border: e,
3271
+ cards: t,
3272
+ forceBrandedLogo: n,
3273
+ headers: r,
3274
+ index: o,
3275
+ marketingUrl: i,
3276
+ showSurveyBrand: a,
3277
+ slugName: l,
3278
+ surveyId: c,
3279
+ viewedCardCount: d
3280
+ } = M((S) => ({
3281
+ border: S.border,
3282
+ cards: S.cards,
3283
+ forceBrandedLogo: S.forceBrandedLogo,
3284
+ headers: S.headers,
3285
+ index: S.index,
3286
+ marketingUrl: S.marketingUrl,
3287
+ showSurveyBrand: S.showSurveyBrand,
3288
+ slugName: S.slugName,
3289
+ surveyId: S.surveyId,
3290
+ viewedCardCount: S.viewedCardCount
3291
+ })), p = ie(null), s = t.filter((S) => S.type !== b.Uploading && S.type !== b.Thanks), _ = wo(t, o), f = d + 1, g = f / (f + _), m = `${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${l}&utm_content=${c}${n && "&utm_term=poweredby_pill"}`;
3292
+ F(() => {
3293
+ p.current && (p.current.style.width = `${g * 100}%`);
3294
+ }, [g]);
3295
+ const y = () => u(D, {
3296
+ children: [s.length > 1 && u("div", {
3297
+ id: "ul-progress-bar-container",
3298
+ children: u("div", {
3299
+ id: "ul-progress-bar-current",
3300
+ ref: p,
3301
+ style: {
3302
+ border: `1px solid ${e || "#000"}`
3303
+ }
3304
+ })
3305
+ }), a ? u("div", {
3306
+ className: n ? "yellow-footer-logo" : "",
3307
+ style: {
3308
+ marginTop: "4px"
3309
+ },
3310
+ children: u("a", {
3311
+ href: m,
3312
+ rel: "noreferrer",
3313
+ target: "_blank",
3314
+ children: u("div", {
3315
+ style: {
3316
+ display: "flex"
3317
+ },
3318
+ children: [u(Gt, {
3319
+ logoOnly: !1
3320
+ }), n && u(Qt, {
3321
+ style: {
3322
+ display: "block",
3323
+ margin: "auto 0 auto 4px",
3324
+ transform: "rotateY(0deg) rotate(-45deg)"
3325
+ }
3326
+ })]
3327
+ })
3328
+ })
3329
+ }) : null]
3330
+ }), v = () => u("a", {
3331
+ dir: "ltr",
3332
+ href: m,
3333
+ rel: "noreferrer",
3334
+ target: "_blank",
3335
+ children: u("div", {
3336
+ className: "thank-you-card-link",
3337
+ children: [u("div", {
3338
+ className: "sprig-box-logo",
3339
+ children: u(Gt, {
3340
+ logoOnly: !0,
3341
+ style: {
3342
+ margin: "auto"
3343
+ }
3344
+ })
3345
+ }), u("div", {
3346
+ children: u("p", {
3347
+ children: ["Capture insights about your own product", u(Qt, {
3348
+ style: {
3349
+ display: "inline-flex",
3350
+ marginInlineStart: "4px",
3351
+ verticalAlign: "middle"
3352
+ }
3353
+ })]
3354
+ })
3355
+ })]
3356
+ })
3357
+ }), C = t[o].type === b.Thanks;
3358
+ return u("footer", {
3359
+ className: `ul-footer ${r["userleap-platform"] === "link" ? "ul-footer__link" : ""}`,
3360
+ style: a ? {} : {
3361
+ marginBottom: "10px"
3362
+ },
3363
+ children: C && n ? v() : y()
3364
+ });
3365
+ }, Qt = ({
3366
+ style: e
3367
+ }) => u("svg", {
3368
+ fill: "none",
3369
+ height: "10",
3370
+ style: e,
3371
+ viewBox: "0 0 12 10",
3372
+ width: "12",
3373
+ xmlns: "http://www.w3.org/2000/svg",
3374
+ children: [u("path", {
3375
+ d: "M1.47839 5.2085L10.9384 5.2085",
3376
+ stroke: "black",
3377
+ strokeLinecap: "round",
3378
+ strokeLinejoin: "round",
3379
+ strokeWidth: "1.35"
3380
+ }), u("path", {
3381
+ d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",
3382
+ stroke: "black",
3383
+ strokeLinecap: "round",
3384
+ strokeLinejoin: "round",
3385
+ strokeWidth: "1.35"
3386
+ })]
3387
+ }), ri = () => {
3388
+ const {
3389
+ answers: e,
3390
+ border: t,
3391
+ cards: n,
3392
+ close: r,
3393
+ configureExitOnOverlayClick: o,
3394
+ destroy: i,
3395
+ endCard: a,
3396
+ eventEmitFn: l,
3397
+ fontFamily: c,
3398
+ headers: d,
3399
+ index: p,
3400
+ next: s,
3401
+ showStripes: _,
3402
+ surveyId: f,
3403
+ update: g,
3404
+ useMobileStyling: m,
3405
+ viewDocument: y
3406
+ } = M((P) => ({
3407
+ answers: P.answers,
3408
+ border: P.border,
3409
+ cards: P.cards,
3410
+ close: P.close,
3411
+ configureExitOnOverlayClick: P.configureExitOnOverlayClick,
3412
+ destroy: P.destroy,
3413
+ endCard: P.endCard,
3414
+ eventEmitFn: P.eventEmitFn,
3415
+ fontFamily: P.fontFamily,
3416
+ headers: P.headers,
3417
+ index: P.index,
3418
+ next: P.next,
3419
+ showStripes: P.showStripes,
3420
+ surveyId: P.surveyId,
3421
+ update: P.update,
3422
+ useMobileStyling: P.useMobileStyling,
3423
+ viewDocument: P.viewDocument
3424
+ })), v = ie(null), C = ie(!1), S = d["userleap-platform"], {
3425
+ props: E,
3426
+ type: h,
3427
+ name: T
3428
+ } = n[p], I = n.length;
3429
+ F(() => {
3430
+ v.current && (v.current.classList.contains("ul-app--visible") || v.current.classList.add("ul-app--visible"), !C.current && l && (C.current = !0, l(re.SurveyAppeared, {
3431
+ name: re.SurveyAppeared,
3432
+ [yr.SurveyId]: f
3433
+ })));
3434
+ }, [l, f]), F(() => {
3435
+ g();
3436
+ }, [p, g]), F(() => {
3437
+ o(() => r());
3438
+ }, [r, o]);
3439
+ const N = () => r(fe), k = (P) => {
3440
+ P.key === "Enter" && N();
3441
+ }, $ = async function(P) {
3442
+ s({
3443
+ data: P,
3444
+ completeSurvey: () => {
3445
+ i(fe);
3446
+ },
3447
+ endCard: a
3448
+ }), xr(y);
3449
+ };
3450
+ if (e) {
3451
+ for (const P of e)
3452
+ if (P.questionId === T) {
3453
+ let ne;
3454
+ if (h === b.MultipleChoice) {
3455
+ const le = E.options.find(({
3456
+ value: Fe
3457
+ }) => Fe === P.value);
3458
+ if (!le)
3459
+ break;
3460
+ ne = {
3461
+ [le.id]: le.value
3462
+ };
3463
+ } else
3464
+ ne = P.value;
3465
+ $({
3466
+ value: ne,
3467
+ type: h,
3468
+ questionId: P.questionId
3469
+ });
3470
+ break;
3471
+ }
3472
+ }
3473
+ const Z = () => [Ge.Email, Ge.Link].includes(d["userleap-platform"]) ? !1 : !a || p + 1 !== I, O = () => m ? {
3474
+ borderColor: t
3475
+ } : {
3476
+ borderColor: t,
3477
+ margin: "15px"
3478
+ }, se = () => {
3479
+ const P = {
3480
+ className: "ul-card",
3481
+ next: $,
3482
+ questionId: T,
3483
+ type: h
3484
+ };
3485
+ switch (h) {
3486
+ case b.ConsentLegal:
3487
+ return U(Lo, {
3488
+ ...P,
3489
+ ...E,
3490
+ key: T
3491
+ });
3492
+ case b.Likert:
3493
+ return U(Mo, {
3494
+ ...P,
3495
+ ...E,
3496
+ key: T
3497
+ });
3498
+ case b.Matrix:
3499
+ return U($o, {
3500
+ ...P,
3501
+ ...E,
3502
+ key: T
3503
+ });
3504
+ case b.MultipleChoice:
3505
+ return U(Oo, {
3506
+ ...P,
3507
+ ...E,
3508
+ key: T
3509
+ });
3510
+ case b.MultipleSelect:
3511
+ return U(Uo, {
3512
+ ...P,
3513
+ ...E,
3514
+ key: T
3515
+ });
3516
+ case b.NPS:
3517
+ return U(Vo, {
3518
+ ...P,
3519
+ key: T,
3520
+ props: E
3521
+ });
3522
+ case b.Open:
3523
+ return U(Ho, {
3524
+ ...P,
3525
+ ...E,
3526
+ key: T
3527
+ });
3528
+ case b.RecordedTask:
3529
+ return U(Ko, {
3530
+ ...P,
3531
+ ...E,
3532
+ key: T
3533
+ });
3534
+ case b.TextUrlPrompt:
3535
+ return U(Xo, {
3536
+ ...P,
3537
+ ...E,
3538
+ key: T
3539
+ });
3540
+ case b.Thanks:
3541
+ return U(ei, {
3542
+ ...P,
3543
+ ...E,
3544
+ key: T
3545
+ });
3546
+ case b.Uploading:
3547
+ return U(ti, {
3548
+ ...P,
3549
+ ...E,
3550
+ key: T
3551
+ });
3552
+ case b.VideoVoice:
3553
+ return null;
3554
+ default:
3555
+ return null;
3556
+ }
3557
+ }, ur = (P) => {
3558
+ var gt;
3559
+ const ne = window.sprigAPI, le = P.target;
3560
+ if (!ne || !le)
3561
+ return;
3562
+ const Fe = [le, le.parentElement];
3563
+ for (const Ee of Fe)
3564
+ if (((gt = Ee == null ? void 0 : Ee.tagName) == null ? void 0 : gt.toLowerCase()) === "a") {
3565
+ P.preventDefault(), ne == null || ne.openUrl(Ee.href);
3566
+ return;
3567
+ }
3568
+ };
3569
+ return u("div", {
3570
+ className: R("ul-app", Me(d) ? "ul-app--visible" : "ul-app--overlay"),
3571
+ dir: "auto",
3572
+ id: fe,
3573
+ onClick: ur,
3574
+ ref: v,
3575
+ style: {
3576
+ "--theme": t,
3577
+ ...c ? {
3578
+ fontFamily: c.replace(";", "")
3579
+ } : {}
3580
+ },
3581
+ children: u("div", {
3582
+ className: "ul-app__container",
3583
+ children: u("div", {
3584
+ className: R(V(w.CardContainer, m)),
3585
+ style: O(),
3586
+ children: [Z() && u("div", {
3587
+ className: R(V(w.CloseContainer, m)),
3588
+ children: u("div", {
3589
+ "aria-label": "Close button",
3590
+ className: w.CloseButton,
3591
+ onClick: N,
3592
+ onKeyPress: k,
3593
+ role: "button",
3594
+ tabIndex: 0,
3595
+ children: u("svg", {
3596
+ fill: "none",
3597
+ height: "18px",
3598
+ viewBox: "0 0 13 13",
3599
+ width: "18px",
3600
+ xmlns: "http://www.w3.org/2000/svg",
3601
+ children: u("path", {
3602
+ 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",
3603
+ fill: "#262136"
3604
+ })
3605
+ })
3606
+ })
3607
+ }), _ && u("div", {
3608
+ className: "ul-header__container",
3609
+ dir: "ltr",
3610
+ children: u("div", {
3611
+ className: "ul-header",
3612
+ children: "For development purposes only"
3613
+ })
3614
+ }), u("div", {
3615
+ className: R(vr(w.CardMainContent, S)),
3616
+ children: se()
3617
+ }), u(ni, {})]
3618
+ })
3619
+ })
3620
+ });
3621
+ }, oi = '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-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.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;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word;min-width:min-content}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content: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{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.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}.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)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.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}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[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}.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}.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}.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}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(93px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;max-width:var(--maxWidth);overflow:auto}.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}.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}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:30px;justify-content:center}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}#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;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.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%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}', ii = async (e, t) => {
3622
+ var r;
3623
+ const n = await fetch(t, {
3624
+ method: "POST",
3625
+ cache: "no-cache",
3626
+ headers: {
3627
+ "Content-Type": "application/json"
3628
+ },
3629
+ body: JSON.stringify(e)
3630
+ });
3631
+ if (n.ok) {
3632
+ const o = await n.json();
3633
+ return (r = o == null ? void 0 : o.upload) == null ? void 0 : r.url;
3634
+ } else
3635
+ return null;
3636
+ }, cr = () => MediaRecorder.isTypeSupported(
3637
+ "video/webm"
3638
+ /* Webm */
3639
+ ) ? "video/webm" : "video/mp4", Kt = (e) => {
3640
+ const t = {
3641
+ audioBitsPerSecond: 128e3,
3642
+ //standard setting based on documentation's example
3643
+ videoBitsPerSecond: 25e5,
3644
+ mimeType: cr()
3645
+ };
3646
+ return new MediaRecorder(e, t);
3647
+ }, Yt = (e, t, n) => {
3648
+ n[t] = [], e.ondataavailable = function(r) {
3649
+ n[t].push(r.data);
3650
+ }, e.currentMediaRecordingUid = t, e.start();
3651
+ };
3652
+ function Jt(e, t, n, r, o, i) {
3653
+ if (e && e.state !== "inactive") {
3654
+ const {
3655
+ [L.BeginCallback]: a
3656
+ } = r, l = e.currentMediaRecordingUid;
3657
+ if (!l)
3658
+ return;
3659
+ a && a(l), e.onstop = () => ai(t, e, n, r, l, o, i), e.stop();
3660
+ }
3661
+ }
3662
+ async function ai(e, t, n, r, o, i, a) {
3663
+ const l = M.getState().viewDocument, {
3664
+ [L.UploadCallback]: c,
3665
+ [L.ProgressCallback]: d
3666
+ } = r, p = {
3667
+ mediaType: n,
3668
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
3669
+ mediaRecordingUid: o,
3670
+ ...r[L.PassthroughData]
3671
+ }, s = await ii(p, e);
3672
+ if (!s) {
3673
+ c && c(null, {
3674
+ message: "failed to get upload url"
3675
+ });
3676
+ return;
3677
+ }
3678
+ const _ = new Blob(a, {
3679
+ type: cr()
3680
+ });
3681
+ if (!l.defaultView)
3682
+ return;
3683
+ const f = new l.defaultView.File([_], `recording video ${Date.now()}`), g = i.createUpload({
3684
+ // endpoint computed from backend separately and hacked together
3685
+ endpoint: s,
3686
+ file: f,
3687
+ chunkSize: 5120
3688
+ // Uploads the file in ~5mb chunks
3689
+ });
3690
+ g.on("error", (m) => {
3691
+ c && c(null, m);
3692
+ }), g.on("progress", (m) => {
3693
+ d && d(o, m);
3694
+ }), g.on("success", () => {
3695
+ c && c(o, !0);
3696
+ });
3697
+ }
3698
+ const si = {
3699
+ chunks: {}
3700
+ }, li = {
3701
+ state: {
3702
+ ...si
3703
+ },
3704
+ stopRecording(e) {
3705
+ const {
3706
+ uploadApiEndpoint: t,
3707
+ avRecorder: n,
3708
+ screenRecorder: r,
3709
+ UpChunk: o
3710
+ } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? Q.Video : Q.Audio;
3711
+ this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Jt(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Jt(r, t, Q.Screen, e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
3712
+ },
3713
+ handleCancelledStream(e) {
3714
+ const t = e.getVideoTracks(), n = e.getAudioTracks();
3715
+ let r = t.length && t[0];
3716
+ r = r || n.length && n[0], r && r.addEventListener("ended", () => {
3717
+ [this.state.avRecorder, this.state.screenRecorder].map((o) => {
3718
+ o && (o.state === "recording" && o.stop(), o.stream.getTracks().map((i) => {
3719
+ i.readyState === "live" && i.stop();
3720
+ }));
3721
+ }), Object.assign(this.state, {
3722
+ avStream: null,
3723
+ captureStream: null,
3724
+ avRecorder: null,
3725
+ screenRecorder: null
3726
+ });
3727
+ });
3728
+ },
3729
+ taskDurationMillisecond() {
3730
+ return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
3731
+ },
3732
+ setUpChunk(e) {
3733
+ this.state.UpChunk = e;
3734
+ },
3735
+ configure(e, t) {
3736
+ Object.assign(this.state, t), this.state.uploadApiEndpoint = `${t.apiURL}/2/environments/integrations/upload`, this.state.chunks = {}, e.on(H.PermissionStatus, this.permissionStatusCallback.bind(this)), e.on(H.AvPermission, async (n) => {
3737
+ this.avPermissionCallback(n);
3738
+ }), e.on(H.BeginRecording, this.beginRecordingCallback.bind(this)), e.on(H.StartTask, this.startTaskCallback.bind(this)), e.on(H.ScreenPermission, async (n) => {
3739
+ this.screenPermissionCallback(n);
3740
+ }), e.on(H.FinishTask, async (n) => {
3741
+ this.finishTaskCallback(n);
3742
+ });
3743
+ },
3744
+ async avPermissionCallback(e) {
3745
+ var r, o, i;
3746
+ const {
3747
+ [L.StreamReadyCallback]: t,
3748
+ [L.PermissionDescriptors]: n
3749
+ } = e;
3750
+ try {
3751
+ (r = this.state.avStream) != null && r.active && (this.state.avStream.getTracks().map((a) => a.readyState === "live" && a.stop()), ((o = this.state.captureStream) == null ? void 0 : o.getAudioTracks().length) === 1 && this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])), this.state.avStream = await navigator.mediaDevices.getUserMedia({
3752
+ video: n.includes(ke.Camera),
3753
+ audio: !0
3754
+ }), ((i = this.state.captureStream) == null ? void 0 : i.getAudioTracks().length) === 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.avStream);
3755
+ } catch (a) {
3756
+ console.warn("Error: failed to get permissions: " + a), t && t(null, null);
3757
+ return;
3758
+ }
3759
+ t && t(this.state.avStream, this.state.captureStream);
3760
+ },
3761
+ async screenPermissionCallback(e) {
3762
+ const {
3763
+ [L.ScreenPermissionRequested]: t,
3764
+ [L.StreamReadyCallback]: n
3765
+ } = e;
3766
+ t == null || t(!0);
3767
+ try {
3768
+ this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({
3769
+ video: !0,
3770
+ cursor: "always",
3771
+ displaySurface: "browser",
3772
+ preferCurrentTab: !0
3773
+ });
3774
+ } catch (r) {
3775
+ t == null || t(!1), console.warn("Error: failed to get permissions: " + r), n && n(null, null);
3776
+ return;
3777
+ }
3778
+ t == null || t(!1), this.state.avStream && this.state.avStream.getAudioTracks().length > 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.captureStream), n && n(this.state.avStream || null, this.state.captureStream);
3779
+ },
3780
+ beginRecordingCallback(e) {
3781
+ const {
3782
+ [L.RecordingMediaTypes]: t,
3783
+ [L.StartRecordingCallback]: n
3784
+ } = e;
3785
+ if (!t)
3786
+ return;
3787
+ const r = [];
3788
+ if (t.includes(Q.Video) && this.state.avStream) {
3789
+ this.state.avRecorder = Kt(this.state.avStream);
3790
+ const o = yt();
3791
+ Yt(this.state.avRecorder, o, this.state.chunks), r.push(o);
3792
+ }
3793
+ if (t.includes(Q.Screen) && this.state.captureStream) {
3794
+ this.state.screenRecorder = Kt(this.state.captureStream);
3795
+ const o = yt();
3796
+ Yt(this.state.screenRecorder, o, this.state.chunks), r.push(o);
3797
+ }
3798
+ r && n && n(r);
3799
+ },
3800
+ async finishTaskCallback(e) {
3801
+ const {
3802
+ [L.CurrentIndex]: t,
3803
+ [L.TaskResponse]: n,
3804
+ [L.TaskCompleteCallback]: r
3805
+ } = e;
3806
+ await this.stopRecording(e), r && r(this.taskDurationMillisecond()), this.state.cards && this.state.hasEndCard !== void 0 && this.lookAheadAndStopStream(t, n, this.state.cards, this.state.hasEndCard);
3807
+ },
3808
+ startTaskCallback() {
3809
+ this.state.startTime = /* @__PURE__ */ new Date();
3810
+ },
3811
+ permissionStatusCallback(e) {
3812
+ var r;
3813
+ const {
3814
+ [L.PermissionStatusCallback]: t
3815
+ } = e, n = this.state.avStream;
3816
+ t && t(n, n ? (n == null ? void 0 : n.getVideoTracks().length) > 0 : !1, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
3817
+ },
3818
+ lookAheadAndStopStream(e, t, n, r) {
3819
+ const {
3820
+ avRecorder: o,
3821
+ screenRecorder: i
3822
+ } = this.state, {
3823
+ allResponses: a
3824
+ } = M.getState(), l = Jn({
3825
+ cards: n,
3826
+ index: e,
3827
+ hasEndCard: r,
3828
+ allResponses: a
3829
+ });
3830
+ l !== null && n[l].type === b.RecordedTask || [o, i].map((c) => {
3831
+ c && (c.state === "recording" && c.stop(), c.stream.getTracks().map((d) => {
3832
+ d.readyState === "live" && d.stop();
3833
+ }));
3834
+ });
3835
+ }
3836
+ }, ot = Object.create(li);
3837
+ Object.freeze(ot);
3838
+ const ci = (e, t) => {
3839
+ const n = [...e], r = /* @__PURE__ */ new Set([b.VideoVoice, b.RecordedTask]);
3840
+ return e.some((o) => r.has(o.type)) && n.push({
3841
+ name: -2,
3842
+ props: {
3843
+ routingOptions: []
3844
+ },
3845
+ type: b.Uploading
3846
+ }), t && n.push({
3847
+ name: -1,
3848
+ props: {
3849
+ routingOptions: []
3850
+ },
3851
+ type: b.Thanks
3852
+ }), n;
3853
+ }, ui = ({
3854
+ mode: e = null,
3855
+ viewWindow: t,
3856
+ viewDocument: n
3857
+ }) => {
3858
+ const r = n.documentElement;
3859
+ let o;
3860
+ try {
3861
+ o = t.parent.location.href;
3862
+ } catch {
3863
+ o = t.location.href;
3864
+ }
3865
+ return {
3866
+ mode: e,
3867
+ sw: t.screen.width,
3868
+ sh: t.screen.height,
3869
+ cw: r.clientWidth,
3870
+ ch: r.clientHeight,
3871
+ p: o,
3872
+ l: t.navigator.language
3873
+ };
3874
+ };
3875
+ function di(e, t = !0) {
3876
+ var h;
3877
+ const {
3878
+ answers: n,
3879
+ apiURL: r,
3880
+ customStyles: o,
3881
+ endCard: i,
3882
+ eventEmitFn: a,
3883
+ fontFamilyURL: l,
3884
+ frame: c,
3885
+ previewKey: d,
3886
+ viewDocument: p,
3887
+ viewWindow: s
3888
+ } = e, _ = Me(e.headers) ? e.frame : p.body, f = e.UpChunk || window.UpChunk, g = Re, m = ci(e.cards, !!i);
3889
+ ot.configure(g, {
3890
+ cards: m,
3891
+ hasEndCard: !!i,
3892
+ apiURL: r,
3893
+ UpChunk: f
3894
+ }), M.setState({
3895
+ apiURL: r,
3896
+ answers: n,
3897
+ border: e.border,
3898
+ index: e.startingQuestionIdx || 0,
3899
+ cards: m,
3900
+ configureExitOnOverlayClick: e.configureExitOnOverlayClick,
3901
+ customMetadata: e.customMetadata,
3902
+ endCard: e.endCard,
3903
+ envId: e.envId,
3904
+ eventEmitFn: a,
3905
+ fontFamily: e.fontFamily,
3906
+ forceBrandedLogo: e.forceBrandedLogo,
3907
+ frame: c,
3908
+ headers: e.headers,
3909
+ hasViewedEmbed: !1,
3910
+ isPreview: e.isPreview,
3911
+ marketingUrl: "https://sprig.com",
3912
+ meta: ui({
3913
+ mode: e.mode,
3914
+ viewWindow: s,
3915
+ viewDocument: p
3916
+ }),
3917
+ mode: e.mode,
3918
+ previewKey: d,
3919
+ recorder: ot,
3920
+ recorderEventEmitter: g,
3921
+ responseGroupUid: e.responseGroupUid,
3922
+ showStripes: e.showStripes,
3923
+ showSurveyBrand: e.showSurveyBrand,
3924
+ slugName: e.slugName,
3925
+ styleNonce: e.styleNonce,
3926
+ surveyId: e.surveyId,
3927
+ tabTitle: e.tabTitle,
3928
+ uploadingCardViewed: !1,
3929
+ uploadProgress: {},
3930
+ useMobileStyling: e.useMobileStyling,
3931
+ useDesktopPrototype: e.useDesktopPrototype,
3932
+ userId: e.userId,
3933
+ viewDocument: e.viewDocument,
3934
+ visitorAttributes: e.visitorAttributes,
3935
+ viewedCardCount: e.startingQuestionIdx || 0
3936
+ });
3937
+ const {
3938
+ seen: y
3939
+ } = M.getState();
3940
+ y();
3941
+ const {
3942
+ head: v
3943
+ } = p, C = p.createElement("style");
3944
+ if (C.id = "sprig-style", C.textContent = oi, C.nonce = e.styleNonce, v.appendChild(C), e.fontFamily && l && parent) {
3945
+ const T = p.createElement("link");
3946
+ T.rel = "stylesheet", T.href = l, v.appendChild(T);
3947
+ }
3948
+ e.customStyles && Cr(p, o, e.styleNonce);
3949
+ const S = "2.25.1", E = a || ((h = c.eventEmitter) == null ? void 0 : h.emit);
3950
+ E == null || E(ee.VerifyViewVersion, {
3951
+ [ve.ViewVersion]: S
3952
+ }), _ && t && he(u(ri, {}), _);
3953
+ }
3954
+ const fi = {
3955
+ configure: di
3956
+ };
3957
+ export {
3958
+ fi as default
3959
+ };