@sprig-technologies/sprig-browser 2.32.0 → 2.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,685 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./core-JazVRZuc.cjs"),$=require("./metricsReporter-ikJ_RTTQ.cjs");var Se,k,dn,de,wt,un,tt,pn,we={},hn=[],Do=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$e=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function mn(e){var t=e.parentNode;t&&t.removeChild(e)}function H(e,t,n){var o,r,i,s={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ke(e,s,o,r,null)}function ke(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++dn,__i:-1,__u:0};return r==null&&k.vnode!=null&&k.vnode(i),i}function fn(){return{current:null}}function W(e){return e.children}function Q(e,t){this.props=e,this.context=t}function ge(e,t){if(t==null)return e.__?ge(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ge(e):null}function gn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return gn(e)}}function nt(e){(!e.__d&&(e.__d=!0)&&de.push(e)&&!Me.__r++||wt!==k.debounceRendering)&&((wt=k.debounceRendering)||un)(Me)}function Me(){var e,t,n,o,r,i,s,a,d;for(de.sort(tt);e=de.shift();)e.__d&&(t=de.length,o=void 0,i=(r=(n=e).__v).__e,a=[],d=[],(s=n.__P)&&((o=ne({},r)).__v=r.__v+1,k.vnode&&k.vnode(o),dt(s,o,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[i]:null,a,i??ge(r),!!(32&r.__u),d),o.__.__k[o.__i]=o,bn(a,o,d),o.__e!=i&&gn(o)),de.length>t&&de.sort(tt));Me.__r=0}function vn(e,t,n,o,r,i,s,a,d,c,p){var l,h,m,g,f,_=o&&o.__k||hn,v=t.length;for(n.__d=d,Oo(n,t,_),d=n.__d,l=0;l<v;l++)(m=n.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?we:_[m.__i]||we,m.__i=l,dt(e,m,h,r,i,s,a,d,c,p),g=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&ut(h.ref,null,m),p.push(m.ref,m.__c||g,m)),f==null&&g!=null&&(f=g),65536&m.__u||h.__k===m.__k?d=_n(m,d,e):typeof m.type=="function"&&m.__d!==void 0?d=m.__d:g&&(d=g.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=d,n.__e=f}function Oo(e,t,n){var o,r,i,s,a,d=t.length,c=n.length,p=c,l=0;for(e.__k=[],o=0;o<d;o++)(r=e.__k[o]=(r=t[o])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?ke(null,r,null,null,r):$e(r)?ke(W,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?ke(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,a=Lo(r,n,s=o+l,p),r.__i=a,i=null,a!==-1&&(p--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?l++:a>s?p>d-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==o+l&&(r.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ge(i)),ot(i,i,!1),n[o]=null,p--);if(p)for(o=0;o<c;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ge(i)),ot(i,i))}function _n(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=_n(o[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function oe(e,t){return t=t||[],e==null||typeof e=="boolean"||($e(e)?e.some(function(n){oe(n,t)}):t.push(e)),t}function Lo(e,t,n,o){var r=e.key,i=e.type,s=n-1,a=n+1,d=t[n];if(d===null||d&&r==d.key&&i===d.type)return n;if(o>(d!=null&&!(131072&d.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((d=t[s])&&!(131072&d.__u)&&r==d.key&&i===d.type)return s;s--}if(a<t.length){if((d=t[a])&&!(131072&d.__u)&&r==d.key&&i===d.type)return a;a++}}return-1}function Et(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Do.test(t)?n:n+"px"}function Pe(e,t,n,o,r){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Et(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||Et(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?Tt:St,i)):e.removeEventListener(t,i?Tt:St,i);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function St(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(k.event?k.event(e):e)}function Tt(e){return this.l[e.type+!0](k.event?k.event(e):e)}function dt(e,t,n,o,r,i,s,a,d,c){var p,l,h,m,g,f,_,v,b,x,E,C,S,I,w,y=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[a=t.__e=n.__e]),(p=k.__b)&&p(t);e:if(typeof y=="function")try{if(v=t.props,b=(p=y.contextType)&&o[p.__c],x=p?b?b.props.value:p.__:o,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in y&&y.prototype.render?t.__c=l=new y(v,x):(t.__c=l=new Q(v,x),l.constructor=y,l.render=Mo),b&&b.sub(l),l.props=v,l.state||(l.state={}),l.context=x,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),y.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ne({},l.__s)),ne(l.__s,y.getDerivedStateFromProps(v,l.__s))),m=l.props,g=l.state,l.__v=t,h)y.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y.getDerivedStateFromProps==null&&v!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(v,x),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(v,l.__s,x)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=v,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(j){j&&(j.__=t)}),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(v,l.__s,x),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,g,f)})}if(l.context=x,l.props=v,l.__P=e,l.__e=!1,C=k.__r,S=0,"prototype"in y&&y.prototype.render){for(l.state=l.__s,l.__d=!1,C&&C(t),p=l.render(l.props,l.state,l.context),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);l._sb=[]}else do l.__d=!1,C&&C(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++S<25);l.state=l.__s,l.getChildContext!=null&&(o=ne(ne({},o),l.getChildContext())),h||l.getSnapshotBeforeUpdate==null||(f=l.getSnapshotBeforeUpdate(m,g)),vn(e,$e(w=p!=null&&p.type===W&&p.key==null?p.props.children:p)?w:[w],t,n,o,r,i,s,a,d,c),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(j){t.__v=null,d||i!=null?(t.__e=a,t.__u|=d?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),k.__e(j,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=No(n.__e,t,n,o,r,i,s,d,c);(p=k.diffed)&&p(t)}function bn(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)ut(n[o],n[++o],n[++o]);k.__c&&k.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){k.__e(i,r.__v)}})}function No(e,t,n,o,r,i,s,a,d){var c,p,l,h,m,g,f,_=n.props,v=t.props,b=t.type;if(b==="svg"&&(r=!0),i!=null){for(c=0;c<i.length;c++)if((m=i[c])&&"setAttribute"in m==!!b&&(b?m.localName===b:m.nodeType===3)){e=m,i[c]=null;break}}if(e==null){if(b===null)return document.createTextNode(v);e=r?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,v.is&&v),i=null,a=!1}if(b===null)_===v||a&&e.data===v||(e.data=v);else{if(i=i&&Se.call(e.childNodes),_=n.props||we,!a&&i!=null)for(_={},c=0;c<e.attributes.length;c++)_[(m=e.attributes[c]).name]=m.value;for(c in _)m=_[c],c=="children"||(c=="dangerouslySetInnerHTML"?l=m:c==="key"||c in v||Pe(e,c,null,m,r));for(c in v)m=v[c],c=="children"?h=m:c=="dangerouslySetInnerHTML"?p=m:c=="value"?g=m:c=="checked"?f=m:c==="key"||a&&typeof m!="function"||_[c]===m||Pe(e,c,m,_[c],r);if(p)a||l&&(p.__html===l.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(l&&(e.innerHTML=""),vn(e,$e(h)?h:[h],t,n,o,r&&b!=="foreignObject",i,s,i?i[0]:n.__k&&ge(n,0),a,d),i!=null)for(c=i.length;c--;)i[c]!=null&&mn(i[c]);a||(c="value",g!==void 0&&(g!==e[c]||b==="progress"&&!g||b==="option"&&g!==_[c])&&Pe(e,c,g,_[c],!1),c="checked",f!==void 0&&f!==e[c]&&Pe(e,c,f,_[c],!1))}return e}function ut(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){k.__e(o,n)}}function ot(e,t,n){var o,r;if(k.unmount&&k.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||ut(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){k.__e(i,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&ot(o[r],t,n||typeof e.type!="function");n||e.__e==null||mn(e.__e),e.__=e.__e=e.__d=void 0}function Mo(e,t,n){return this.constructor(e,n)}function ve(e,t,n){var o,r,i,s;k.__&&k.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],dt(t,e=(!o&&n||t).__k=H(W,null,[e]),r||we,we,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?Se.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),bn(i,e,s)}function xn(e,t){ve(e,t,xn)}function Ao(e,t,n){var o,r,i,s,a=ne({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?o=t[i]:i=="ref"?r=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Se.call(arguments,2):n),ke(e.type,a,o||e.key,r||e.ref,null)}function yn(e,t){var n={__c:t="__cC"+pn++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&r.some(function(a){a.__e=!0,nt(a)})},this.sub=function(s){r.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){r.splice(r.indexOf(s),1),a&&a.call(s)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n}Se=hn.slice,k={__e:function(e,t,n,o){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},dn=0,Q.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof e=="function"&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),nt(this))},Q.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),nt(this))},Q.prototype.render=W,de=[],un=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt=function(e,t){return e.__v.__b-t.__v.__b},Me.__r=0,pn=0;var re,A,Ze,jt,_e=0,kn=[],Ie=[],Rt=k.__b,Pt=k.__r,It=k.diffed,Dt=k.__c,Ot=k.unmount;function he(e,t){k.__h&&k.__h(A,e,_e||t),_e=0;var n=A.__H||(A.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ie}),n.__[e]}function U(e){return _e=1,pt(Sn,e)}function pt(e,t,n){var o=he(re++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Sn(void 0,t),function(a){var d=o.__N?o.__N[0]:o.__[0],c=o.t(d,a);d!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=A,!A.u)){var r=function(a,d,c){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,a,d,c);var l=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&o.__c.props===a)&&(!i||i.call(this,a,d,c))};A.u=!0;var i=A.shouldComponentUpdate,s=A.componentWillUpdate;A.componentWillUpdate=function(a,d,c){if(this.__e){var p=i;i=void 0,r(a,d,c),i=p}s&&s.call(this,a,d,c)},A.shouldComponentUpdate=r}return o.__N||o.__}function z(e,t){var n=he(re++,3);!k.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,A.__H.__h.push(n))}function Te(e,t){var n=he(re++,4);!k.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,A.__h.push(n))}function Y(e){return _e=5,xe(function(){return{current:e}},[])}function Cn(e,t,n){_e=6,Te(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function xe(e,t){var n=he(re++,7);return mt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ee(e,t){return _e=8,xe(function(){return e},t)}function wn(e){var t=A.context[e.__c],n=he(re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(A)),t.props.value):e.__}function ht(e,t){k.useDebugValue&&k.useDebugValue(t?t(e):e)}function Ho(e){var t=he(re++,10),n=U();return t.__=e,A.componentDidCatch||(A.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function En(){var e=he(re++,11);if(!e.__){for(var t=A.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function $o(){for(var e;e=kn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(De),e.__H.__h.forEach(rt),e.__H.__h=[]}catch(t){e.__H.__h=[],k.__e(t,e.__v)}}k.__b=function(e){A=null,Rt&&Rt(e)},k.__r=function(e){Pt&&Pt(e),re=0;var t=(A=e.__c).__H;t&&(Ze===A?(t.__h=[],A.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ie,n.__N=n.i=void 0})):(t.__h.forEach(De),t.__h.forEach(rt),t.__h=[],re=0)),Ze=A},k.diffed=function(e){It&&It(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(kn.push(t)!==1&&jt===k.requestAnimationFrame||((jt=k.requestAnimationFrame)||Uo)($o)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ie&&(n.__=n.__V),n.i=void 0,n.__V=Ie})),Ze=A=null},k.__c=function(e,t){t.some(function(n){try{n.__h.forEach(De),n.__h=n.__h.filter(function(o){return!o.__||rt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],k.__e(o,n.__v)}}),Dt&&Dt(e,t)},k.unmount=function(e){Ot&&Ot(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{De(o)}catch(r){t=r}}),n.__H=void 0,t&&k.__e(t,n.__v))};var Lt=typeof requestAnimationFrame=="function";function Uo(e){var t,n=function(){clearTimeout(o),Lt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Lt&&(t=requestAnimationFrame(n))}function De(e){var t=A,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),A=t}function rt(e){var t=A;e.__c=e.__(),A=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Sn(e,t){return typeof t=="function"?t(e):t}function Tn(e,t){for(var n in t)e[n]=t[n];return e}function it(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ae(e){this.props=e}function jn(e,t){function n(r){var i=this.props.ref,s=i==r.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!s:it(this.props,r)}function o(r){return this.shouldComponentUpdate=n,H(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Ae.prototype=new Q).isPureReactComponent=!0,Ae.prototype.shouldComponentUpdate=function(e,t){return it(this.props,e)||it(this.state,t)};var Nt=k.__b;k.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Bo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ft(e){function t(n){var o=Tn({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Bo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Mt=function(e,t){return e==null?null:oe(oe(e).map(t))},Rn={map:Mt,forEach:Mt,count:function(e){return e?oe(e).length:0},only:function(e){var t=oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:oe},Vo=k.__e;k.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}Vo(e,t,n,o)};var At=k.unmount;function Pn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=Tn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Pn(o,t,n)})),e}function In(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return In(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ce(){this.__u=0,this.t=null,this.__b=null}function Dn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function On(e){var t,n,o;function r(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){o=s}),o)throw o;if(!n)throw t;return H(n,i)}return r.displayName="Lazy",r.__f=!0,r}function fe(){this.u=null,this.o=null}k.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),At&&At(e)},(Ce.prototype=new Q).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=Dn(o.__v),i=!1,s=function(){i||(i=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=In(d,d.__c.__P,d.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},Ce.prototype.componentWillUnmount=function(){this.t=[]},Ce.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Pn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&H(W,null,e.fallback);return r&&(r.__u&=-33),[H(W,null,t.__a?null:e.children),r]};var Ht=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Fo(e){return this.getChildContext=function(){return e.context},e.children}function zo(e){var t=this,n=e.i;t.componentWillUnmount=function(){ve(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),ve(H(Fo,{context:t.context},e.__v),t.l)}function Ln(e,t){var n=H(zo,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new Q).__a=function(e){var t=this,n=Dn(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),Ht(t,e,o)):r()};n?n(i):i()}},fe.prototype.render=function(e){this.u=null,this.o=new Map;var t=oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ht(e,n,t)})};var Nn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qo=/^(?: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]/,Wo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Zo=/[A-Z0-9]/g,Go=typeof document<"u",Yo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Mn(e,t,n){return t.__k==null&&(t.textContent=""),ve(e,t),typeof n=="function"&&n(),e?e.__c:null}function An(e,t,n){return xn(e,t),typeof n=="function"&&n(),e?e.__c:null}Q.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Q.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=k.event;function Ko(){}function Qo(){return this.cancelBubble}function Jo(){return this.defaultPrevented}k.event=function(e){return $t&&(e=$t(e)),e.persist=Ko,e.isPropagationStopped=Qo,e.isDefaultPrevented=Jo,e.nativeEvent=e};var gt,Xo={enumerable:!1,configurable:!0,get:function(){return this.class}},Ut=k.vnode;k.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Go&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||o!=="input"&&o!=="textarea"||Yo(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Wo.test(i)?i=a:o.indexOf("-")===-1&&qo.test(i)?i=i.replace(Zo,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&r[i=a]&&(i="oninputCapture"),r[i]=s}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.value.indexOf(d.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.multiple?r.defaultValue.indexOf(d.props.value)!=-1:r.defaultValue==d.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Xo)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=Nn,Ut&&Ut(e)};var Bt=k.__r;k.__r=function(e){Bt&&Bt(e),gt=e.__c};var Vt=k.diffed;k.diffed=function(e){Vt&&Vt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),gt=null};var Hn={ReactCurrentDispatcher:{current:{readContext:function(e){return gt.__n[e.__c].props.value}}}},er="17.0.2";function $n(e){return H.bind(null,e)}function je(e){return!!e&&e.$$typeof===Nn}function Un(e){return je(e)&&e.type===W}function Bn(e){return je(e)?Ao.apply(null,arguments):e}function Vn(e){return!!e.__k&&(ve(null,e),!0)}function Fn(e){return e&&(e.base||e.nodeType===1&&e)||null}var zn=function(e,t){return e(t)},qn=function(e,t){return e(t)},Wn=W;function vt(e){e()}function Zn(e){return e}function Gn(){return[!1,vt]}var Yn=Te,Kn=je;function Qn(e,t){var n=t(),o=U({h:{__:n,v:t}}),r=o[0].h,i=o[1];return Te(function(){r.__=n,r.v=t,Ge(r)&&i({h:r})},[e,n,t]),z(function(){return Ge(r)&&i({h:r}),e(function(){Ge(r)&&i({h:r})})},[e]),n}function Ge(e){var t,n,o=e.v,r=e.__;try{var i=o();return!((t=r)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var tr={useState:U,useId:En,useReducer:pt,useEffect:z,useLayoutEffect:Te,useInsertionEffect:Yn,useTransition:Gn,useDeferredValue:Zn,useSyncExternalStore:Qn,startTransition:vt,useRef:Y,useImperativeHandle:Cn,useMemo:xe,useCallback:Ee,useContext:wn,useDebugValue:ht,version:"17.0.2",Children:Rn,render:Mn,hydrate:An,unmountComponentAtNode:Vn,createPortal:Ln,createElement:H,createContext:yn,createFactory:$n,cloneElement:Bn,createRef:fn,Fragment:W,isValidElement:je,isElement:Kn,isFragment:Un,findDOMNode:Fn,Component:Q,PureComponent:Ae,memo:jn,forwardRef:ft,flushSync:qn,unstable_batchedUpdates:zn,StrictMode:Wn,Suspense:Ce,SuspenseList:fe,lazy:On,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Hn};const nr=Object.freeze(Object.defineProperty({__proto__:null,Children:Rn,Component:Q,Fragment:W,PureComponent:Ae,StrictMode:Wn,Suspense:Ce,SuspenseList:fe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Hn,cloneElement:Bn,createContext:yn,createElement:H,createFactory:$n,createPortal:Ln,createRef:fn,default:tr,findDOMNode:Fn,flushSync:qn,forwardRef:ft,hydrate:An,isElement:Kn,isFragment:Un,isValidElement:je,lazy:On,memo:jn,render:Mn,startTransition:vt,unmountComponentAtNode:Vn,unstable_batchedUpdates:zn,useCallback:Ee,useContext:wn,useDebugValue:ht,useDeferredValue:Zn,useEffect:z,useErrorBoundary:Ho,useId:En,useImperativeHandle:Cn,useInsertionEffect:Yn,useLayoutEffect:Te,useMemo:xe,useReducer:pt,useRef:Y,useState:U,useSyncExternalStore:Qn,useTransition:Gn,version:er},Symbol.toStringTag,{value:"Module"})),Ft=e=>{let t;const n=new Set,o=(d,c)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const l=t;t=c??typeof p!="object"?p:Object.assign({},t,p),n.forEach(h=>h(t,l))}},r=()=>t,a={setState:o,getState:r,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>n.clear()};return t=e(o,r,a),a},or=e=>e?Ft(e):Ft;function rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ir(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var Jn={exports:{}},Xn={};const eo=ir(nr);var to={exports:{}},no={};/**
2
- * @license React
3
- * use-sync-external-store-shim.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var be=eo;function sr(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lr=typeof Object.is=="function"?Object.is:sr,ar=be.useState,cr=be.useEffect,dr=be.useLayoutEffect,ur=be.useDebugValue;function pr(e,t){var n=t(),o=ar({inst:{value:n,getSnapshot:t}}),r=o[0].inst,i=o[1];return dr(function(){r.value=n,r.getSnapshot=t,Ye(r)&&i({inst:r})},[e,n,t]),cr(function(){return Ye(r)&&i({inst:r}),e(function(){Ye(r)&&i({inst:r})})},[e]),ur(n),n}function Ye(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch{return!0}}function hr(e,t){return t()}var mr=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?hr:pr;no.useSyncExternalStore=be.useSyncExternalStore!==void 0?be.useSyncExternalStore:mr;to.exports=no;var fr=to.exports;/**
10
- * @license React
11
- * use-sync-external-store-shim/with-selector.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ue=eo,gr=fr;function vr(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _r=typeof Object.is=="function"?Object.is:vr,br=gr.useSyncExternalStore,xr=Ue.useRef,yr=Ue.useEffect,kr=Ue.useMemo,Cr=Ue.useDebugValue;Xn.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var i=xr(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=kr(function(){function d(m){if(!c){if(c=!0,p=m,m=o(m),r!==void 0&&s.hasValue){var g=s.value;if(r(g,m))return l=g}return l=m}if(g=l,_r(p,m))return g;var f=o(m);return r!==void 0&&r(g,f)?g:(p=m,l=f)}var c=!1,p,l,h=n===void 0?null:n;return[function(){return d(t())},h===null?void 0:function(){return d(h())}]},[t,n,o,r]);var a=br(e,i[0],i[1]);return yr(function(){s.hasValue=!0,s.value=a},[a]),Cr(a),a};Jn.exports=Xn;var wr=Jn.exports;const Er=rr(wr),{useSyncExternalStoreWithSelector:Sr}=Er;function Tr(e,t=e.getState,n){const o=Sr(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ht(o),o}const zt=e=>{const t=typeof e=="function"?or(e):e,n=(o,r)=>Tr(t,o,r);return Object.assign(n,t),n},oo=e=>e?zt(e):zt,qt={And:1,Or:2},Wt=1,_t={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return e<t},lte(e,t){return e<=t},list_exact(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:e.slice().sort().join(",")===t.slice().sort().join(",")},list_all(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:!t.some(n=>e.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.some(r=>o.has(r))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.every(r=>!o.has(r))},contains(e,t){const n=e.toLowerCase(),o=t.toLowerCase();return n.includes(o)},notcontains(e,t){return!this.contains(e,t)}},jr=(e,t,n)=>{switch(t){case"videovoice":return!!(e&&e.value);case"open":return!!n;case"multipleselect":return!!(n&&Object.keys(n).length);case"recordedtask":return(n==null?void 0:n.taskStatus)==="completed";case"texturlprompt":return!e.value;case"consentlegal":return n!==null;case"multiplechoice":return n!==void 0;case"matrix":return!!(n&&Object.values(n).every(o=>o!==null));case"nps":return n!==null;case"likert":return n!==null;default:return!0}},ro=(e,t)=>{if(t==="matrix"){const n=Object.keys(e).length,o=Object.values(e).filter(r=>r!==null).length;return o>0&&o<n}return!1},io=({cards:e,index:t,hasEndCard:n,allResponses:o,uploadProgress:r={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const a=i.props.routingOptions||[];for(let p=0;p<a.length;p++){const{group:l,target:h}=a[p];if(!(l!=null&&l.length))continue;const m=l[0];if(m.questionIndex===void 0||m.questionIndex>o.length)continue;let g=Zt({comparator:m.comparator,response:o[m.questionIndex],type:i.type,value:m.value});for(let f=1;f<l.length;f+=2){const _=l[f],v=l[f+1],b=Zt({comparator:v.comparator,response:o[v.questionIndex],type:e[v.questionIndex].type,value:v.value});_===qt.And?g&&(g=b):_===qt.Or&&(g||(g=b))}if(g){s=h===-1&&n?e.length-1:h;break}}const d=e.findIndex(p=>p.type==="uploading");let c;return d>0?c=n?e.length-3:e.length-2:c=e.length-1,t>=c||s===-1||s!==null&&s>c?d>0&&Object.values(r).some(l=>l.isSubmitted&&!l.isComplete)?d:n?e.length-1:null:s===-1?null:s},Zt=({comparator:e,response:t,type:n,value:o})=>{if(e==="answered")switch(n){case"texturlprompt":return t===void 0;case"consentlegal":return t&&t.submitted===!0;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="completed";case"likert":return Number.isInteger(t);case"matrix":return Object.values(t).every(r=>r!==null);case"multiplechoice":case"multipleselect":return Object.keys(t).length>0;case"nps":return Number.isInteger(t);case"open":return t&&t.length>0;case"videovoice":return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e==="given_up")return n==="recordedtask"?"taskStatus"in t&&t.taskStatus==="given.up":!0;if(e==="partial")return n==="matrix"?ro(t,n):!1;if(e==="skipped")switch(n){case"texturlprompt":return t==null?void 0:t.skipped;case"consentlegal":return t===null;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="abandoned";case"likert":return t===null;case"open":return(t==null?void 0:t.length)===0;case"multiplechoice":return t===void 0;case"multipleselect":return(t==null?void 0:t.length)===0;case"matrix":return Object.values(t).every(r=>r===null);case"nps":return t===null;case"videovoice":return t===null;default:return!1}return _t[e](t,o)},Rr=13,Pr=(e,t)=>e.reduce((n,o)=>n.concat(n.map(r=>[...r,o])),[[]]).filter(n=>t||n.length>0),Ir=e=>{var t,n,o;switch(e.type){case"multipleselect":return!e||!e.props||!e.props.options?null:e.props.options.length>Rr?e.props.options.map(r=>[r.value]):Pr(e.props.options.map(r=>r.value),!e.props.properties.required);case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case"matrix":{if(!((t=e==null?void 0:e.props)!=null&&t.options))return null;const r=e.props.properties.matrixColumn,i=e.props.options,s=i.reduce((p,l)=>(p[l.id]=null,p),{}),a={...s,[i[0].id]:r[0].value},d=i.reduce((p,l)=>(p[l.id]=r[0].value,p),{}),c=[a,d];return e.props.properties.required||c.push(s),c}case"likert":{const r=Number((o=(n=e.props)==null?void 0:n.properties)==null?void 0:o.range)||5;return[...Array.from(Array(r).keys()).map(s=>s+1),...e.props.properties.required?[]:[null]]}case"nps":return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case"videovoice":case"open":return["1",...e.props.properties.required?[]:[""]];case"recordedtask":{const r=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||r.push({taskStatus:"abandoned"}),r}case"texturlprompt":return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case"consentlegal":return[Wt,...e.props.properties.required?[]:[null]];default:return[Wt]}},Dr=e=>e in _t,Or=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Lr=(e,t=[])=>t.reduce((n,o)=>{const{group:r,target:i}=o;if(!(r!=null&&r.length))return[...n];const s=r.filter(a=>Number(a)?!0:typeof a=="object"?a.questionIndex===e:!1).map(a=>{const{comparator:d,value:c}=a;return{comparator:d,target:i,value:c}});return[...n,...s]},[]),Nr=(e,t)=>{const n=new Set(["thanks","uploading"]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const o=e.filter(i=>!n.has(i.type));if(t===o.length-1)return 1;const r={[o.length-1]:1,[-1]:0};for(let i=o.length-2;i>=t;i--){const s=o[i],a=Lr(i,s.props.routingOptions);if(a.length===0){r[i]=r[i+1]+1;continue}let d=0,c=Ir(s);if(c===null)return o.length-1-t;for(let p=0;p<a.length&&c.length!==0;p++){const{comparator:l,target:h,value:m}=a[p],g=c.filter(f=>{const _=jr({value:f},s.type,f),v=ro(f,s.type);return!(_&&l==="answered"||v&&l==="partial"||!_&&!v&&l==="skipped"||l==="given_up"&&Or(f)&&f.taskStatus==="given.up"||_&&s.type==="open"&&(l==="contains"||l==="notcontains")||_&&Dr(l)&&_t[l](f,m))});if(g.length<c.length){const f=parseInt(String(h),10);if(f!==-1&&f<=i||f>=o.length)return o.length-1-t;d=Math.max(r[f]+1,d)}c=g}c.length>0&&(d=Math.max(r[i+1]+1,d)),r[i]=d}return r[t]},st=new Set(["thanks","uploading"]),Mr=e=>!st.has(e.type),M=oo()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=B.APP_ID)=>{const o=t(),{fadeout:r,remove:i,trackHistory:s,studyType:a}=o;await r(n),Ke(o)||s({event:"closed"}),$.breadcrumbsLogger.info("SurveyClosing",{surveyId:o.surveyId}),B.ConflictingWidgets.enable(),i({initiator:$.DismissReason.Closed,studyType:a})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:o,fadeout:r,remove:i,studyType:s,surveyId:a}=t();o("survey.complete",a),await r(n),B.ConflictingWidgets.enable(),i({initiator:$.DismissReason.Complete,studyType:s})},endCard:{headline:""},envId:"",eventEmitFn:$.eventEmitter.emit.bind($.eventEmitter),fadeout:async n=>{const{eventEmitFn:o,headers:r,viewDocument:i}=t();return $.shouldDirectEmbed(r)?Promise.resolve():(o($.SprigEvent.SurveyFadingOut),new Promise(s=>{const a=i.getElementById(n);a?(a.addEventListener("transitionend",()=>{s()}),a.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:o,eventEmitFn:r,index:i}=t();r(n,{qid:o[i].name,props:o[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:o,progressPct:r,isSubmitted:i})=>{var m,g,f;const{cards:s,destroy:a,index:d,uploadProgress:c}=t(),p=o||((m=c[n])==null?void 0:m.isComplete),l={...c,[n]:{progressPct:p?100:r||((g=c[n])==null?void 0:g.progressPct),isComplete:p,isSubmitted:i||((f=c[n])==null?void 0:f.isSubmitted)}};if(e({uploadProgress:l}),s[d].type!=="uploading")return;const h=Object.entries(c).every(([_,v])=>!v.isSubmitted||v.isComplete||n==_&&o);if(h&&d>=s.length-1)return a(B.APP_ID);e({index:h?d+1:d,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":"web","x-ul-environment-id":"","x-ul-installation-method":"web-snippet","x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:o,cards:r,eventEmitFn:i,index:s,responseGroupUid:a,submit:d,trackHistory:c,uploadProgress:p,viewedCardCount:l}=t(),h=Date.now(),m=[...r],g=m[s],{type:f}=n.data,_={...n.data},v=_.value;Mr(g)&&(g.value=v),_.answeredAt=h,delete _.type;const b={response:_,responseGroupUid:a,questionIndex:s};let x=f==="multiplechoice"?Object.values(v).find(w=>w!==!1):v;f==="multipleselect"&&(x=m[s].props.options.reduce((w,y)=>(v[y.id]&&w.push(y.value),w),[]));const E=o.slice(0);E[s]=x,e({allResponses:E});const C=io({cards:m,index:s,hasEndCard:!!n.endCard,uploadProgress:p,allResponses:E});if(C===null){b.completedAt=h,d(b),n.completeSurvey();return}else st.has(m[C].type)&&(b.completedAt=h);const S=d(b);st.has(m[C].type)||S.finally(()=>{c({event:"seen",index:C})});const I=m[C];m[C]&&i&&i("survey.question",{qid:I.name,props:I.props}),e({cards:m,hasViewedEmbed:!1,index:C,viewedCardCount:l+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:$.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(o=>({unresolvedRequestCount:o.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n,studyType:o})=>{const{removeIframeIfReady:r}=t();e({pendingRemoveIframeReason:n,studyType:o}),r()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:o,unresolvedRequestCount:r,studyType:i,surveyId:s}=t();o&&r===0&&(n($.SprigEvent.SurveyWillClose,{name:$.SprigEvent.SurveyWillClose,initiator:o,studyType:i,"survey.id":s}),e({pendingRemoveIframeReason:null,studyType:i}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:o,response:r,responseGroupUid:i})=>{const s=t();if(!i||Ke(s))return;const a={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[r],completedAt:n,previewKey:s.previewKey},d=await s.trackPromise($.sprigFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(a),headers:s.headers,method:"POST"}));if(!d.ok){d.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",d.error),await s.trackPromise(Gt(s,"submitResponse",d.error)));return}s.eventEmitFn($.SprigEvent.QuestionAnswered,{...r,questionIndex:o})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:o,isNew:r=!1})=>{const i=t();if(Ke(i))return;const{cards:s,index:a}=i,d=o!==void 0?s[o]:s[a],c={sid:i.surveyId,qid:d.name,action:n,vid:i.userId,eid:i.envId,isNew:r,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},p=await i.trackPromise($.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(c),headers:i.headers,method:"POST"}));!p.ok&&p.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",p.error),await i.trackPromise(Gt(i,"trackHistory",p.error)))},trackPromise:async n=>{const{resolveTrackedPromise:o}=t();return e(r=>({unresolvedRequestCount:r.unresolvedRequestCount+1})),n.then(r=>(o(),r)).catch(r=>{throw o(),r})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:o,headers:r,eventEmitFn:i,frame:s,useMobileStyling:a,surveyId:d,viewDocument:c}=t(),p=n[o],l=p.type==="matrix"&&!(p.props.properties.displayMatrixAsAccordion||a);setTimeout(()=>{var g,f;const[h,m]=B.calculateFrameDimensions(c);$.shouldDirectEmbed(r)?i($.SprigEvent.SurveyHeight,{name:$.SprigEvent.SurveyHeight,contentFrameHeight:h,"survey.id":d}):((g=s.setHeight)==null||g.call(s,h),a||(f=s.setWidth)==null||f.call(s,l?m:parseInt(B.DEFAULT_WIDTH)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),Ke=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,Gt=async(e,t,n)=>{const{mode:o,userId:r,envId:i,apiURL:s,headers:a,viewDocument:d}=e,c=d.documentElement,p={mode:o,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:c.clientWidth,clientHeight:c.clientHeight,location:window.location.href,language:window.navigator.language},l={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:p,vid:r,envId:i};(await $.sprigFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},so=e=>H("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},H("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),lo=e=>H("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},H("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2}));var Ar=0;function u(e,t,n,o,r,i){var s,a,d={};for(a in t)a=="ref"?s=t[a]:d[a]=t[a];var c={type:e,props:d,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ar,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)d[a]===void 0&&(d[a]=s[a]);return k.vnode&&k.vnode(c),c}const Hr=({visible:e})=>u("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:u(lo,{className:"sprig-check"})}),Yt="250ms",$r=ft(({animate:e,children:t,header:n,isOpen:o,onClick:r,showHeaderCheck:i},s)=>{const a=Y(null),[d,c]=U(0);z(()=>{var h;const l=(h=a.current)==null?void 0:h.getBoundingClientRect();c(o&&l?l.height:0)},[o]);const p=xe(()=>({transition:e?`height ${Yt} ease`:"none",height:d}),[d,e]);return u("div",{className:"sprig-accordion",ref:s,children:[u("button",{className:"sprig-accordion-header-container",onClick:r,type:"button",children:[u("div",{className:"sprig-header-label-container",children:[u("span",{className:"sprig-header-label",children:n}),u(Hr,{visible:i})]}),u(so,{className:"sprig-caret",style:{transitionDuration:e?Yt:"0",transform:o?"rotate(-180deg)":"none"}})]}),u("div",{className:"sprig-accordion-body",style:p,children:u("div",{ref:a,children:t})})]})}),L=(...e)=>e.filter(Boolean).join(" "),V=(e,t,n)=>{const o=t?"--mobile":"--desktop",r=n?`${o}_${n}`:"";return`${e+o} ${e+r} ${e}`},Ur=(e,t)=>`${e} ${e}__${t}`,Z=e=>u("button",{...e,className:L("ul-card-text__button",e.className),id:"ul-card-text__button"}),Kt=({plainText:e,richText:t,id:n,className:o,isHeader:r})=>t?u("div",{className:o,dangerouslySetInnerHTML:{__html:t},id:n}):e?r?u("h1",{className:o,id:n,children:e}):u("p",{className:o,id:n,children:e}):null,J=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return u("div",{className:"question-header-container",children:[u(Kt,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),u(Kt,{className:"ul-caption",id:"ul-caption",plainText:n,richText:t==null?void 0:t.captionHtml})]})},Qt=({buttonText:e="View Prototype",handleClick:t})=>u("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),ie=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var l;const{handleClickEmbedButton:o,hasViewedEmbed:r,headers:i,useDesktopPrototype:s}=M(h=>({handleClickEmbedButton:h.handleClickEmbedButton,hasViewedEmbed:h.hasViewedEmbed,headers:h.headers,useDesktopPrototype:h.useDesktopPrototype})),a=(n==null?void 0:n.conceptUrl)||((l=n==null?void 0:n.consentDocument)==null?void 0:l.url),d=window.innerWidth<B.EMBED_MOBILE_MAX_WIDTH,c=i["userleap-platform"],p=(h,m)=>{h.preventDefault(),o(m)};if(!s&&d&&!r&&a&&["email","link"].includes(c)){if(t==="prototype")return u(Qt,{handleClick:h=>{p(h,"question.prototype.click")}});if(t==="pdf")return u(Qt,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:h=>{p(h,"question.agreement.click")}})}return e()},ao=({isSelected:e,id:t,divId:n,themeColor:o})=>u("div",{"aria-checked":e,"aria-labelledby":`label-${t}`,className:"select-checkbox",id:n,role:"checkbox",style:e?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},tabIndex:0,children:e&&u(lo,{})}),co=(e,t)=>{const n=Y(0),o=()=>{if(e.current){const r=e.current;r.style.height="1px";const i=r.scrollHeight,s=r.offsetHeight-r.clientHeight,a=i+s,d=parseInt(window.getComputedStyle(r).getPropertyValue("max-height")),c=a<=d?a:d;n.current!==c&&t(),n.current=c,r.style.height=`${c}px`}};return z(o,[]),o},Be=({ariaLabel:e,border:t,choiceStyle:n={},label:o,isSelected:r,value:i,text:s,id:a,isRadio:d,useMobileStyling:c,error:p,allowTextEntry:l,noneOfTheAbove:h,promptText:m,onUserInputChanged:g})=>{const{styleNonce:f,viewDocument:_}=M(D=>({styleNonce:D.styleNonce,viewDocument:D.viewDocument})),[v,b]=U(!1);Fr(_,t,f);const x=({isSelected:D,userText:G})=>{g&&g({id:a,selected:D,value:i,userText:G,noneOfTheAbove:h})},E=D=>{D.stopPropagation(),x({isSelected:d||!r,userText:s}),b(!1)},C=()=>{v||b(!0)},S=()=>{v&&b(!1)},I=D=>{(D.key==="Enter"||D.key===" ")&&E(D)},w={onClick:D=>E(D),onKeyPress:D=>I(D)};"ontouchstart"in _.documentElement?(w.onTouchStart=S,w.onTouchCancel=S,w.onTouchEnd=S):(w.onMouseDown=C,w.onMouseLeave=S);const y=d?`radio-${a}`:`checkbox-${a}`,j=r||v?[Oe]:[],O=[...p?[uo]:[],...j],P=o?{"aria-labelledby":`label-${a}`}:{"aria-label":e};return u("div",{className:L(V("choice",c),...O),id:`choice-div-${a}`,style:{...n,...p?{borderColor:B.ERROR_BORDER_COLOR}:{}},...w,children:[u("div",{className:L("choice-label-container"),children:[d?u("div",{...P,className:L("select-radio",...j),id:y,role:"radio",tabIndex:0}):u(ao,{divId:y,id:a,isSelected:r,themeColor:t}),o&&u("label",{className:L(V("select-label",c)),htmlFor:y,id:`label-${a}`,children:o})]}),l&&r&&u("div",{className:L("choice-text-entry-container",...j),children:u(Br,{onTextChange:D=>x({isSelected:r,userText:D}),promptText:m||"Please specify",textValue:s,useMobileStyling:c})})]})},Br=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:o})=>{const r=Y(null),{update:i}=M(a=>({update:a.update})),s=co(r,()=>i());return z(()=>{r.current&&r.current.focus()},[]),u("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:L(V("choice-text-input",o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:a=>{s(),a.stopPropagation(),n(a.currentTarget.value)},onClick:a=>{a.stopPropagation()},onKeyPress:a=>{a.stopPropagation()},placeholder:e,ref:r,role:"textbox",rows:1,value:t})},Jt="ul-select-style-element",Oe="ul-select-active-dynamic-style",uo="ul-select-error-dynamic-style",Vr=e=>e.tagName.toLowerCase()==="style",Fr=(e,t,n)=>{let o=e.getElementById(Jt),r=!1;o||(o=e.createElement("style"),r=!0),Vr(o)&&(o.id=Jt,n&&(o.nonce=n),o.textContent=zr(t),r&&e.head.appendChild(o))},zr=e=>`
18
- .${Oe} {
19
- border-color: ${e};
20
- }
21
- .${Oe} .select-radio, .${Oe}.select-radio {
22
- border: 6px solid ${e};
23
- box-shadow: none;
24
- }
25
- .${uo} {
26
- border-color: ${B.ERROR_BORDER_COLOR};
27
- }
28
- `,me=e=>(e==null?void 0:e.buttonText)||"Next",bt=e=>(e==null?void 0:e.skipButtonText)||"Skip",qr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{useMobileStyling:s,border:a}=M(y=>({useMobileStyling:y.useMobileStyling,border:y.border})),[d,c]=U(!1),[p,l]=U(""),[h,m]=U(!1),g=o==null?void 0:o.collectName,f=(o==null?void 0:o.nameLabelText)||"Full Name",_=(o==null?void 0:o.consentText)||"I agree to the stated conditions",v=(o==null?void 0:o.submitButtonText)||"Submit",b=!!p.trim(),x=d&&(!g||b),E=(y,j=!1)=>{y.preventDefault(),y.stopPropagation();let O=null;if(!j){if(!x){m(!0);return}O={submitted:!0},g&&(O.name=p)}n({value:O,questionId:r,type:i})},C=y=>{y.preventDefault(),y.stopPropagation(),l(y.currentTarget.value)},S=y=>{y.currentTarget.style.borderColor=h&&!b?B.ERROR_BORDER_COLOR:a},I=y=>{y.currentTarget.style.borderColor=h&&!b?B.ERROR_BORDER_COLOR:B.DEFAULT_BORDER_COLOR},w=()=>u("div",{children:[u(Be,{allowTextEntry:!1,border:a,error:h&&!d,id:"consent",isRadio:!1,isSelected:d,label:_,onUserInputChanged:({selected:y})=>{y!==d&&c(!d)},useMobileStyling:s}),g&&u("input",{"aria-label":f,"aria-placeholder":f,className:L(V("ul-consent-legal__name-input",s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:I,onFocus:S,onInput:C,placeholder:f,style:h&&!b?{borderColor:B.ERROR_BORDER_COLOR}:{},tabIndex:0,value:p}),u("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[u(Z,{className:x?"":"sprig-button-disabled",onClick:E,children:v}),o.required===!1&&u("button",{className:"ul-card-skip__button",onClick:y=>E(y,!0),children:bt(o)})]})]});return u("div",{className:L(e,"ul-card__consent-legal","fade-in-transition"),children:[u(J,{message:t}),u("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:o!=null&&o.richTextBody?{__html:o.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),u(ie,{properties:o,defaultBody:w,embeddedType:"pdf"})]},r)},Wr=({activeValue:e,border:t,icon:n,isPressed:o,onSubmit:r,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:d,useMobileStyling:c,value:p,viewDocument:l})=>{const h=`option-${p}`,m=s==="number",g=s==="star",f=m&&p===e,[_,v]=p<=e&&g||p===e?o?[t,1]:[t,.3]:["",1],b=()=>{switch(s){case"star":return L(V("likert-star",c),V(`likert-star-${p}`,c));case"smiley":return L(V("likert-smiley",c),V(`likert-smiley-${p}`,c));default:return p===i?L(V("likert-number",c),V(`likert-number-${p}`,c),V("likert-last-option",c)):L(V("likert-number",c),V(`likert-number-${p}`,c))}},x=()=>{a(-1),d(!1)};return u("button",{"aria-label":m?void 0:String(p),className:b(),dangerouslySetInnerHTML:{__html:n},id:h,onClick:()=>r(),onKeyDown:E=>{var I,w;const C=l.querySelectorAll(`.likert-${s??"number"}`),S=p-1;E.key==="ArrowRight"?(I=C[S+1])==null||I.focus():E.key==="ArrowLeft"?(w=C[S-1])==null||w.focus():(E.key==="Enter"||E.key===" ")&&r()},onPointerDown:()=>d(!0),onPointerEnter:()=>a(p),onPointerLeave:x,style:{color:m?"":_,borderColor:f?_:"",fillOpacity:f?"":v,zIndex:f?3:"auto"},tabIndex:0})},Zr=({className:e,labels:t,message:n,next:o,properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d,viewDocument:c}=M(y=>({border:y.border,useMobileStyling:y.useMobileStyling,viewDocument:y.viewDocument})),[p,l]=U(-1),[h,m]=U(!1),g=t&&t.left,f=t&&t.right;let _;const{range:v,scaleLabelType:b,ratingIcons:x}=r;v&&(_=Number(v));const E=_||5,C=y=>{var j,O;switch(b){case"star":return(j=x[0])==null?void 0:j.svg;case"smiley":return(O=x[y])==null?void 0:O.svg;default:return String(y+1)}},S=[...Array(E)].map((y,j)=>{const O=j+1;return u(Wr,{activeValue:p,border:a,icon:C(j),isPressed:h,onSubmit:()=>o({value:O,questionId:i,type:s}),range:E,scaleLabelType:b,setActiveValue:l,setIsPressed:m,useMobileStyling:d,value:O,viewDocument:c},j)}),I=y=>{y.preventDefault(),y.stopPropagation(),o({value:null,questionId:i,type:s})},w=()=>u(W,{children:[u("div",{"aria-label":`Rating (1 - ${E})`,className:"ul-card--likert__numbers",role:"radiogroup",children:S}),u("div",{className:"ul-card--likert__labels",children:[u("span",{children:g}),u("span",{children:f})]}),!r.required&&u("div",{className:"ul-vertical-centered-container",children:u(Z,{onClick:I,children:me(r)})})]});return u("form",{className:L(e,"ul-card--likert","fade-in-transition"),children:[u(J,{message:n,properties:r}),u(ie,{properties:r,defaultBody:w})]},i)},po=e=>!e||e.scrollHeight>e.offsetHeight?e:po(e.parentElement),Gr=e=>e instanceof HTMLElement,Yr=e=>{if(!e||!Gr(e))return 0;const t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth);return n+o},Kr=({columns:e,onSelect:t,options:n,selectedOptions:o})=>{const r=Y([]),{border:i,useMobileStyling:s}=M(h=>({border:h.border,useMobileStyling:h.useMobileStyling})),a=n.findIndex(h=>o[h.id]===null),[d,c]=U(a),p=Ee((h,m)=>{t(h,m);const g=d+1,f=n[g];if(f&&o[f.id]===null){c(g);const _=r.current[d];if(_!=null&&_.firstElementChild){const v=po(_),b=_.firstElementChild,x=Yr(_)+b.clientHeight;v==null||v.scrollTo(0,_.offsetTop+x)}}},[t,n,o,d]),l=Ee((h,m)=>{const g=d===h;return u($r,{animate:!0,header:m.label,isOpen:g,onClick:()=>c(g&&!window.UserLeap.isMobileSDK?-1:h),ref:f=>{f&&(r.current[h]=f)},showHeaderCheck:o[m.id]!==null,children:u("div",{style:{paddingTop:"12px"},children:e.map(f=>u(Be,{allowTextEntry:!1,ariaLabel:`${m.label}-${f.label}`,border:i,error:!1,id:`${m.id}-${f.value}`,isRadio:!0,isSelected:o[m.id]===f.value,label:f.label,onUserInputChanged:()=>p(m.id,f.value),useMobileStyling:s},f.label))})},m.id)},[i,e,d,p,o,s]);return u("div",{children:n.map((h,m)=>l(m,h))})},Qr=({columns:e,onSelect:t,options:n,selectedOptions:o})=>{const{border:r,useMobileStyling:i}=M(h=>({border:h.border,useMobileStyling:h.useMobileStyling})),s=n.length,a=e.length,d=Y(null),[c,p]=U(!1),l=()=>{const h=d.current;h&&p(h.clientWidth+Math.abs(h.scrollLeft)<h.scrollWidth)};return z(()=>{const h=d.current,m=new ResizeObserver(g=>{window.requestAnimationFrame(()=>{h&&p(Math.round(g[0].contentRect.width)<h.scrollWidth)})});return h&&m.observe(h),()=>{h&&m.unobserve(h)}},[]),u("div",{className:"ul-card--matrix_question_container",children:[u("div",{className:L("ul-card--matrix_container",c&&"ul-matrix-scroll-gradient"),onScroll:()=>{l()},ref:d,children:u("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${a}; --numRows: ${s+1}`,children:[u("div",{})," ",e.map(h=>u("div",{className:"ul-matrix-column-label",children:h.label},h.label)),n.map(h=>u(W,{children:[u("div",{"aria-label":h.label,className:"ul-matrix-row-label",children:h.label},h.label),u("div",{className:"ul-matrix-row-options",role:"radiogroup",children:e.map((m,g)=>{const f=g===a-1;return u("div",{className:L("ul-matrix-option-wrapper",f&&"ul-matrix-last-option"),children:u(Be,{allowTextEntry:!1,ariaLabel:`${h.label}-${m.label}`,border:r,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${h.id}-${m.value}`,isRadio:!0,isSelected:o[h.id]===m.value,onUserInputChanged:()=>t(h.id,m.value),useMobileStyling:i})},m.value)})})]}))]})}),c&&u("button",{className:"ul-matrix-scroll-arrow",onClick:h=>{h.preventDefault();const m=d.current;if(m){const g=getComputedStyle(m).direction==="rtl";m.scrollLeft=g?m.clientWidth-m.scrollWidth:m.scrollWidth}},children:u("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})})})]})},Jr=({className:e,message:t,next:n,options:o,properties:r,questionId:i,type:s})=>{const{useMobileStyling:a}=M(b=>({useMobileStyling:b.useMobileStyling})),d=r.matrixColumn,c=r.required,p=b=>{b.preventDefault(),b.stopPropagation(),n({value:h,questionId:i,type:s})},l=o.reduce((b,x)=>(b[x.id]=null,b),{}),[h,m]=U(l),g=(b,x)=>{m(E=>({...E,[b]:x}))},f=c&&Object.values(h).every(b=>b==null),_=r.displayMatrixAsAccordion||a,v=()=>u("div",{className:"ul-card--matrix_question_container",children:[_?u(Kr,{columns:d,onSelect:g,options:o,selectedOptions:h}):u(Qr,{columns:d,onSelect:g,options:o,selectedOptions:h}),u("div",{className:"ul-card__button-wrapper",children:u(Z,{disabled:f,children:me(r)})})]});return u("form",{className:L(e,"fade-in-transition","ul-card__matrix"),id:"text-form",onSubmit:p,children:[u(J,{message:t,properties:r}),u(ie,{properties:r,defaultBody:v})]},i)},Xr=({options:e,selectItem:t,selectedOptions:n,showCheckbox:o})=>{const[r,i]=U("0px"),s=Y(!1),{themeColor:a,doc:d}=M(l=>({doc:l.viewDocument,themeColor:l.border})),c=Ee(l=>{if(s.current)return;const h=d.documentElement.clientHeight,m=30,g=(l==null?void 0:l.getBoundingClientRect().height)??0,f=h-m;let _=g;const v=(l==null?void 0:l.getBoundingClientRect().bottom)??0;v>f&&(_-=v-f),i(`-${_}px`),s.current=!0},[d.documentElement.clientHeight]),p=l=>`checkbox-div-${l}`;return u("div",{className:"select-list",ref:c,style:{marginBottom:r},children:e.map(l=>u("div",{className:"select-option",onClick:h=>{t(l),h.stopPropagation()},role:"option",children:[o&&u(ao,{divId:p(l.id),id:l.id,isSelected:n.includes(l),themeColor:a}),l.label]},l.id))})},ei=({isMultiSelect:e=!1,multiselectText:t="choices selected",onChange:n,options:o,placeholderText:r,value:i})=>{const[s,a]=U(!1),{viewDocument:d,update:c}=M(g=>({viewDocument:g.viewDocument,update:g.update})),p=()=>i.length===0?r:i.length===1?i[0].label:`${i.length} ${t}`,l=()=>{a(!s),c()};z(()=>{var f;const g=()=>{a(!1),c()};return d.addEventListener("click",g),(f=window.parent)==null||f.addEventListener("click",g),()=>{var _;(_=window.parent)==null||_.removeEventListener("click",g),d.removeEventListener("click",g)}},[d,c]);const h=g=>{var v;const f=i.some(b=>b.id===g.id),_=i.some(b=>{var x;return(x=b.optionProperties)==null?void 0:x.noneOfTheAbove});(v=g.optionProperties)!=null&&v.noneOfTheAbove&&!f?n([g]):e?n(f?i.filter(b=>b.id!==g.id):_?[g]:[...i,g]):f||n([g]),e||l()},m=i.length===0?["select-button-placeholder"]:[];return u(W,{children:[u("button",{"aria-label":"choice dropdown button",className:L("select-button",...m),onClick:g=>{g.stopPropagation(),l()},type:"button",children:[u("span",{children:p()}),u(so,{})]}),s&&u(Xr,{options:o,selectedOptions:i,selectItem:h,showCheckbox:e})]})},ho=({className:e,message:t,onSubmit:n,options:o=[],properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=M(S=>({border:S.border,useMobileStyling:S.useMobileStyling})),c=o.reduce((S,I)=>(S[I.id]={isSelected:!1},S),{}),[p,l]=U(c),h=s==="multiplechoice",m=r.required,g=o.find(S=>{var I;return(I=S.optionProperties)==null?void 0:I.noneOfTheAbove}),f=Object.entries(p).some(([S,I])=>{var j;const w=o.find(O=>`${O.id}`===S),y=I.userText===void 0||I.userText.trim()==="";return((j=w==null?void 0:w.optionProperties)==null?void 0:j.allowsTextEntry)&&y&&I.isSelected}),_=Object.values(p).some(S=>S.isSelected),v=f||m&&!_,b=o.map(({id:S,label:I,value:w,optionProperties:y})=>{var D,G;const j=`${S}`,{allowsTextEntry:O,noneOfTheAbove:P}={allowsTextEntry:!1,noneOfTheAbove:!1,...y};return u(Be,{allowTextEntry:O,border:a,error:!1,id:j,isRadio:h,isSelected:!!((D=p[j])!=null&&D.isSelected),label:I,noneOfTheAbove:P,onUserInputChanged:q=>E(q.id,q.selected,q.userText,q.noneOfTheAbove),promptText:"Please specify",text:(G=p[S])==null?void 0:G.userText,useMobileStyling:d,value:w},j)}),x=S=>{S.preventDefault(),S.stopPropagation(),n(p)},E=(S,I,w,y)=>{const j=Object.assign({},p);if((h||y)&&I)for(const O of Object.values(j))O.isSelected=!1,delete O.userText;else g&&!y&&p[g.id].isSelected&&(j[g.id].isSelected=!1);j[S]={isSelected:I,userText:w},l(j)},C=()=>u("div",{children:[r.isDropdown?u(ei,{isMultiSelect:!h,multiselectText:r.dropdownMultiselectedText??"choices selected",onChange:S=>{const I={...p};for(const w of o)S.includes(w)?I[w.id].isSelected=!0:I[w.id].isSelected=!1;l(I)},options:o,placeholderText:r.dropdownPlaceholderText??(h?"Select choice":"Select choice(s)"),value:o.filter(S=>p[S.id].isSelected)}):u("div",{className:L(V("ul-card__choices",d)),role:h?"radiogroup":"group",children:b}),u("div",{className:"ul-card__button-wrapper",children:u(Z,{disabled:v,onClick:x,children:me(r)})})]});return u("form",{className:L(e,"ul-card--multiple","fade-in-transition"),id:"text-form",onSubmit:x,children:[u(J,{message:t,properties:r}),u(ie,{properties:r,defaultBody:C})]},i)},ti=e=>{const{questionId:t,type:n,next:o,options:r}=e;return u(ho,{...e,onSubmit:s=>{const a=Object.entries(s).find(([,h])=>h.isSelected)||[void 0,void 0],[d,c]=a,p=r.find(h=>`${h.id}`===d),l=c!=null&&c.userText?{[d]:{userText:c.userText}}:null;o({value:p&&d?{[d]:p.value}:{},secondaryValue:l,questionId:t,type:n})}})},ni=e=>{const{questionId:t,type:n,next:o}=e;return u(ho,{...e,onSubmit:i=>{const s={},a=Object.entries(i).reduce((c,[p,l])=>(c[p]=l.isSelected,c),s),d=Object.entries(i).reduce((c,[p,l])=>{if(!l.userText)return c;const h=c||{};return h[p]={userText:l.userText},h},null);o({value:a,secondaryValue:d,questionId:t,type:n})}})},oi=({className:e,props:{labels:t,message:n,properties:o},next:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d,viewDocument:c}=M(f=>({border:f.border,useMobileStyling:f.useMobileStyling,viewDocument:f.viewDocument})),p=t&&t.left,l=t&&t.right,h=[...Array(11)].map((f,_)=>u("button",{className:L(V("nps-number",d),V(`nps-number-${_}`,d)),id:`option-${_}`,onClick:()=>r({value:_,questionId:i,type:s}),onKeyDown:v=>{var x,E;const b=c.querySelectorAll("button.nps-number");v.key==="ArrowRight"?(x=b[_+1])==null||x.focus():v.key==="ArrowLeft"?(E=b[_-1])==null||E.focus():(v.key==="Enter"||v.key===" ")&&r({value:_,questionId:i,type:s})},onPointerDown:v=>{v.currentTarget.style.zIndex="2",v.currentTarget.style.borderColor=a},onPointerLeave:v=>{v.currentTarget.style.zIndex="auto",v.currentTarget.style.borderColor=B.DEFAULT_BORDER_COLOR},tabIndex:0,children:_},_)),m=f=>{f.preventDefault(),f.stopPropagation(),r({value:null,questionId:i,type:s})},g=()=>u("div",{children:[u("div",{className:"ul-card--nps__numbers",children:h}),u("div",{className:"ul-card--nps__labels",children:[u("span",{children:p}),u("span",{children:l})]}),!o.required&&u("div",{className:"ul-vertical-centered-container",children:u(Z,{onClick:m,children:me(o)})})]});return u("form",{className:L(e,"ul-card--nps","fade-in-transition"),children:[u(J,{message:n,properties:o}),u(ie,{properties:o,defaultBody:g})]},i)},ri=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{border:s,useMobileStyling:a,update:d}=M(C=>({border:C.border,useMobileStyling:C.useMobileStyling,update:C.update})),[c,p]=U(""),l=Y(null),h=c.trim(),m=o.required===!0&&!h,g=co(l,()=>d()),f=C=>{g(),C.preventDefault(),C.stopPropagation(),p(C.currentTarget.value)},_=C=>{C.preventDefault(),C.stopPropagation(),n({value:c,questionId:r,type:i})},v=o&&o.openTextPlaceholder?o.openTextPlaceholder:"",b=C=>{C.currentTarget.style.borderColor=s},x=C=>{C.currentTarget.style.borderColor=B.DEFAULT_BORDER_COLOR},E=()=>u("div",{className:"ul-card-text",children:[u("div",{className:"ul-card-text__container",children:u("textarea",{"aria-labelledby":"ul-question","aria-describedby":"ul-caption","aria-multiline":"true","aria-placeholder":v,className:L(V("ul-card-text__input",a)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:x,onChange:f,onFocus:b,placeholder:v,ref:l,role:"textbox",tabIndex:0})}),u(Z,{disabled:m,onClick:_,style:{backgroundColor:m?"":s},children:me(o)}),o.footerHtml&&u("div",{className:"footer",dangerouslySetInnerHTML:{__html:o.footerHtml}})]});return u("form",{className:L(e,"ul-card--text","fade-in-transition"),id:"text-form",children:[u(J,{message:t,properties:o}),u(ie,{defaultBody:E,properties:o})]},r)},pe={RequestNeeded:1,TryAgain:2,Ready:3},Ve=e=>e.type==="av_permission",mo=e=>e.type==="screen_permission",ii=(e,t)=>!(Ve(t)?t.permissionDescriptors:[]).includes("camera")||e.getVideoTracks().length>0,fo=(e,t)=>{if(e===void 0)return pe.RequestNeeded;if(e){if(!ii(e,t))return pe.RequestNeeded}else return pe.TryAgain;return pe.Ready},Xt={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ee=oo(e=>({...Xt,reset:()=>{e(Xt)},updatePage:t=>{e(t)}}));function lt({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),{recorderEventEmitter:i}=M.getState();i.emit("av.permission",{"permission.descriptors":e.permissionDescriptors,"stream.ready":(s,a)=>{if(n===s)return;let d=e;if(s&&!e.permissionDescriptors.includes("camera")){const c=t.indexOf(e),p=a!=null&&a.active?c+2:c+1;a!=null&&a.active&&o&&i.emit("begin.recording",{"recording.media.types":o,"start.recording.callback":l=>r({mediaRecordingUids:l})}),d=t[p]}r({currentPage:d,avStream:s})}})}function si({pages:e,userId:t,responseGroupUid:n,surveyId:o,questionId:r,next:i}){const{updatePage:s}=ee.getState(),{eventEmitFn:a,recorderEventEmitter:d}=M.getState(),c={questionId:r,surveyId:o,visitorId:t,responseGroupUid:n};let p=0;d.emit("recorded.task.permission.screen"),a("recorded.task.permission.screen"),d.emit("permission.status",{"permission.status.callback":(h,m,g,f)=>{const _=e[p],{type:v}=_,b=["screen"];if(Ve(_)){const{permissionDescriptors:x}=_,E=x==null?void 0:x.includes("microphone"),C=x==null?void 0:x.includes("camera");E&&b.push("audio"),C&&b.push("video");const S=(h==null?void 0:h.active)&&!C,I=(h==null?void 0:h.active)&&m;(S||I)&&p++}mo(e[p])&&g&&(p++,d.emit("begin.recording",{"recording.media.types":b,"start.recording.callback":x=>s({mediaRecordingUids:x})})),s({currentPage:e[p],avStream:h,screenPermissionRequested:g,nextQuestion:i,type:v,passthroughData:c,recordingMediaTypes:b,captureStream:f})}});const l=e[p];return l.type==="av_permission"&&lt({currentPage:l,pages:e}),l}function at({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:o,reset:r}=ee.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=M.getState(),d={value:{taskStatus:e},type:"recordedtask",questionId:(n==null?void 0:n.questionId)||1};n&&i.emit("finish.task",{"begin.callback":c=>{s({mediaRecordingUid:c,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(c,p)=>{s({mediaRecordingUid:c,progressPct:p.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":c=>{c&&s({mediaRecordingUid:c,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":n,"current.index":a,"task.response":d,"task.complete.callback":c=>{d.value.taskDurationMillisecond=c,o&&(d.value.mediaRecordingUids=o),r(),t(d)}})}function xt({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:o}=M.getState(),{updatePage:r,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=ee.getState();if(!i)return;const d=e.indexOf(i);switch(i.type){case"av_permission":{const c=a?d+2:d+1;a&&s&&n.emit("begin.recording",{"recording.media.types":s,"start.recording.callback":p=>{r({mediaRecordingUids:p})}}),r({currentPage:e[c]});return}case"screen_permission":n.emit("screen.permission",{"screen.permission.requested":t,"stream.ready.callback":(c,p)=>{const l=p?e[d+1]:i;p&&s&&n.emit("begin.recording",{"recording.media.types":s,"start.recording.callback":h=>{r({captureStream:p,mediaRecordingUids:h})}}),r({currentPage:l,screenPermissionRequested:!0,captureStream:p})}});return;case"start_task":o("recorded.task.start"),n.emit("recorded.task.start"),n.emit("start.task"),r({currentPage:e[d+1],screenPermissionRequested:!0});return;case"complete_task":return}}const go="ul-permission-graphics-container",vo="ul-permission-body",_o=L(go,"ul_recorded-task-inset-spacing"),Fe=L("ul-horizontal-button-container","ul-horizontal-button-container-left"),bo=({richTextBody:e})=>u("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),ze=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:u(Z,{className:L(n&&"ul-skip-button-below","ul-button-inactive"),onClick:at.bind(null,{status:"abandoned"}),children:t||"Skip"}),yt=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),i=(o==null?void 0:o.includes("audio"))||(o==null?void 0:o.includes("video"));z(()=>{const s=setInterval(()=>{i&&t&&!t.active?r({avStream:null,currentPage:e[0]}):(!n||!n.active)&&r({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(s)},[t,n,i,e,o,r])},li=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r,taskDetail:i}=e;return yt(t),u("div",{className:"ul-task-page",children:[i&&u(bo,{richTextBody:i}),u("div",{className:Fe,children:[u(Z,{onClick:xt.bind(null,{pages:t}),children:o}),u(ze,{required:n,skipButtonText:r})]})]},"start-task")},ai=({content:e,pages:t,properties:n})=>{const{buttonText:o,skipButtonText:r}=e;yt(t);const s=u(ie,{properties:n,defaultBody:()=>u("div",{className:Fe,children:[u(Z,{className:"ul-complete-task-button",onClick:at.bind(null,{status:"completed"}),children:o}),u(Z,{className:L("ul-button-inactive"),onClick:at.bind(null,{status:"given.up"}),children:r})]})});return u("div",{className:"ul-task-page",children:[e.taskDetail&&u(bo,{richTextBody:e.taskDetail}),s]},"complete-task")},ci=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r}=e,[i]=M(d=>[d.tabTitle]),[s,a]=U(!1);return u("div",{children:[u("div",{className:_o,children:[u("p",{style:{marginTop:"auto"},children:e.selectTabText}),u("div",{className:"ul-select-tab-container",children:u("p",{className:vo,children:i})})]}),u("div",{className:n?"":Fe,children:[u(Z,{disabled:s,onClick:xt.bind(null,{pages:t,setIsRequestingPermission:a}),children:o}),u(ze,{required:n,skipButtonText:r})]})]})},di=({content:e})=>u("div",{className:L(go,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),ui=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:o,permissionDeniedBody:r,skipButtonText:i,tryAgainButtonText:s}=e,a=Ve(t[0])?t[0]:null;return z(()=>{const d=setInterval(()=>{a!==null&&lt({currentPage:a,pages:t})},1e3);return()=>clearInterval(d)},[a,t]),a?u("div",{children:[u("div",{className:_o,children:u("p",{className:"ul-av-permission-denied-paragraph",children:[u("span",{className:"ul-av-permission-denied-headline",children:o}),u("span",{className:vo,children:r})]})}),u("div",{className:Fe,children:[u(Z,{onClick:lt.bind(null,{currentPage:a,pages:t}),children:s}),u(ze,{required:n,skipButtonText:i})]})]}):null},pi=({stream:e})=>u("video",{autoPlay:!0,className:L("ul_recorded-task-inset-spacing"),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),hi=({content:e,pages:t,required:n})=>{const{skipButtonText:o}=e,{avStream:r}=ee.getState();return yt(t),u("div",{children:[u(pi,{stream:r}),u("div",{className:"ul-vertical-button-container-center",children:[u(Z,{onClick:xt.bind(null,{pages:t}),children:e.buttonText}),u(ze,{bottom:!0,required:n,skipButtonText:o})]})]})},mi=({properties:e})=>{const{pages:t,required:n}=e,{avStream:o,currentPage:r}=ee.getState();if(r===void 0)return null;switch(r==null?void 0:r.type){case"av_permission":{const i=fo(o,r);return i===pe.RequestNeeded?u(di,{content:r}):i===pe.TryAgain?u(ui,{content:r,pages:t,required:n}):u(hi,{content:r,pages:t,required:n})}case"screen_permission":return u(ci,{content:r,pages:t,required:n});case"start_task":return u(li,{content:r,pages:t,required:n});case"complete_task":return u(ai,{content:r,pages:t,properties:e});default:return null}},fi=({className:e,properties:t,next:n,questionId:o})=>{const r=M(),{surveyId:i,responseGroupUid:s,userId:a}=r,d=ee(),{screenPermissionRequested:c}=d,p=ee(f=>f.avStream);let l=ee(f=>f.currentPage);l||(l=si({questionId:o,surveyId:i,next:f=>{n(f)},pages:t.pages,responseGroupUid:s,userId:a}));let h=l.headline,m=l.captionText;const g=fo(p,l);return mo(l)&&c&&(h=l.permissionDeniedHeadline,m=l.permissionDeniedCaptionText),Ve(l)&&g===pe.Ready&&(h=l.permissionGrantedHeadline,m=l.permissionGrantedCaptionText),u("div",{className:L(e,"ul-center-horizontally","fade-in-transition"),children:[u(J,{message:h,properties:{captionText:m}}),u(mi,{properties:t})]})},gi={"{{user_id}}":"externalUserId","{{email}}":"email"},vi=(e=void 0,t={})=>{if(!e)return e;let n=e;const o=[];for(const[d,c]of Object.entries(gi))if(n.toLowerCase().includes(d))if(t[c]){const p=new RegExp(d,"gi");n=n.replace(p,t[c])}else o.push(d);if(o.length===0||!n.includes("?"))return n;const r=n.slice(0,n.indexOf("?")),s=n.slice(n.indexOf("?")+1).split("&").map(d=>d.split("=")).filter(d=>!o.includes(d[1]));if(s.length===0)return r;const a=s.map(d=>d.join("=")).join("&");return`${r}?${a}`},_i=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{visitorAttributes:s}=M(l=>({visitorAttributes:l.visitorAttributes})),a=(l,h=!1)=>{n({value:h?{skipped:!0}:void 0,questionId:r,type:i})},d=l=>{(l.key==="Enter"||l.key===" ")&&n({value:void 0,questionId:r,type:i})},c=()=>{const l=vi(o&&o.buttonUrl,s);return u("div",{className:"ul-card-button-group",children:[u("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:l,id:"ul-card-text__button",onClick:a,onKeyPress:d,rel:"noreferrer",role:l?"link":"button",tabIndex:0,target:"_blank",children:me(o)}),o.required===!1&&u("button",{className:"ul-card-skip__button",onClick:h=>a(h,!0),children:bt(o)})]})},p=(l,h)=>l?u("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:l},id:"ul-card__text-url-body-container"}):u("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(h?h.split(/\n\s*\n/g):[]).map((m,g)=>u("p",{children:m},g))});return u("div",{className:L(e,"ul-card__text-url-prompt","fade-in-transition"),children:[u(J,{message:t}),p(o==null?void 0:o.richTextBody,o==null?void 0:o.body),u(ie,{defaultBody:c,properties:o})]},r)},bi=({className:e,questionId:t})=>{const{border:n,destroy:o,endCard:r,forceBrandedLogo:i}=M(d=>({border:d.border,destroy:d.destroy,endCard:d.endCard,forceBrandedLogo:d.forceBrandedLogo}));z(()=>{setTimeout(()=>{o(B.APP_ID)},i?4e3:2e3)},[o,i]);const s=r&&r.subheader?u("p",{className:"ul-caption",children:r.subheader}):null,a=r&&r.headline?r.headline:"";return u("div",{className:L(e,"ul-card--thanks","fade-in-transition"),children:u("div",{children:u("div",{className:"ul-card--thanks-content",children:[u("div",{className:"ul-thanks-check",children:u("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),u("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),u("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),u(J,{message:a}),s]})})},t)},ue="https://cdn.sprig.com",R={document:void 0,videojs:void 0},xi=`/* progress control styles */
29
- .video-js .vjs-control {
30
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
31
- }
32
-
33
- .video-js .vjs-progress-control .vjs-progress-holder {
34
- margin: 0 0px;
35
- }
36
-
37
- .video-js .vjs-progress-control {
38
- position: absolute;
39
- height: 3px;
40
- width: 100%;
41
- }
42
- /* position and align the buttons and button texts */
43
- .ul-control-panel {
44
- bottom: 0;
45
- width: 100%;
46
- flex-direction: column;
47
- background-color: white;
48
- height: fit-content;
49
- z-index: 2;
50
- }
51
-
52
- .ul-buttons-panel {
53
- color: black;
54
- display: flex;
55
- gap: 20px;
56
- height: 50px;
57
- justify-content: center;
58
- margin: 10px;
59
- padding: 2px 14px 0;
60
- }
61
-
62
- .video-js .vjs-volume-panel {
63
- height: 30px;
64
- width: 40px;
65
- }
66
-
67
- .ul-inactive {
68
- opacity: 0.3;
69
- cursor: default;
70
- pointer-events: none;
71
- }
72
-
73
- /* buttons */
74
- .ul-buttons-panel > .vjs-button {
75
- background-color: rgba(0, 0, 0, 0.05);
76
- border-radius: 50%;
77
- display: flex;
78
- height: 3em;
79
- justify-content: center;
80
- width: 3em;
81
- }
82
-
83
- .vjs-button>.vjs-icon-placeholder:before {
84
- align-items: center;
85
- display: flex;
86
- font-size: unset;
87
- line-height: 0.5;
88
- justify-content: center;
89
- }
90
-
91
- span.ul-button-text {
92
- align-self: flex-end;
93
- position: relative;
94
- top: 14px;
95
- }
96
-
97
- #ul-camera-button {
98
- white-space: nowrap;
99
- }
100
-
101
- .video-js .vjs-volume-control.vjs-volume-horizontal {
102
- background-color: #fff;
103
- z-index: 1;
104
- }
105
-
106
- .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
107
- background-color: black;
108
- }
109
-
110
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
111
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
112
- .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
113
- width: 40px;
114
- }
115
-
116
- .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
117
- .video-js .vjs-volume-panel .vjs-volume-control:active,
118
- .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
119
- .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
120
- .video-js .vjs-volume-panel:active .vjs-volume-control,
121
- .video-js .vjs-volume-panel:focus .vjs-volume-control {
122
- visibility: visible;
123
- left: 40px;
124
- position: absolute;
125
- transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
126
- }
127
-
128
- /* play button customization */
129
- .video-js .vjs-play-control {
130
- color: black;
131
- }
132
-
133
- .video-js .vjs-play-control .vjs-icon-placeholder:before {
134
- content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
135
- }
136
-
137
- /* position and style the current timer */
138
- .ul-time-panel {
139
- position: absolute;
140
- bottom: 80px;
141
- left: 10px;
142
- height: 22px;
143
- color: black;
144
- border: 1px solid #e0e0eb;
145
- border-radius: 23px;
146
- background-color: white;
147
- width: fit-content;
148
- }
149
-
150
- .video-js .vjs-current-time,
151
- .vjs-no-flex .vjs-current-time {
152
- display: flex;
153
- align-items: center;
154
- text-align: center;
155
- }
156
-
157
- /* remove the dot progress indicator */
158
- .video-js .vjs-play-progress:before,
159
- .video-js .vjs-volume-level:before,
160
- .vjs-icon-circle:before,
161
- .vjs-seek-to-live-control .vjs-icon-placeholder:before {
162
- content: none;
163
- }
164
-
165
- .video-js .vjs-mute-control .vjs-icon-placeholder:before {
166
- content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E");
167
- }
168
-
169
- .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
170
- content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
171
- }
172
-
173
- .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
174
- content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A");
175
- }
176
-
177
- .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
178
- content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A");
179
- }
180
-
181
- .video-js .vjs-volume-control:hover .vjs-mouse-display {
182
- display: none !important;
183
- }
184
-
185
- .video-js .vjs-play-progress {
186
- background-color: black;
187
- }
188
-
189
- /* position video player inside the container */
190
- .video-js .vjs-tech {
191
- position: static;
192
- }
193
-
194
- .video-js .vjs-time-tooltip {
195
- padding: 0.25em 0.75em;
196
- align-items: center;
197
- color: #333;
198
- background: #FCFCFD;
199
- border-radius: 99px;
200
- text-align: center;
201
- border: 1px solid #E0E0EB;
202
- display: flex;
203
- align-items: center;
204
- justify-content: center;
205
- top: -25px;
206
- font-size: 12px !important;
207
- width: 50px !important;
208
- }
209
-
210
- .video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
211
- visibility: hidden !important;
212
- }
213
-
214
- .video-js .vjs-progress-control .vjs-mouse-display {
215
- z-index: 2;
216
- }
217
-
218
- .ul-video-player {
219
- width: 100%;
220
- display: flex;
221
- flex-direction: column;
222
- height: auto;
223
- border: 1px solid #E6E6E6;
224
- background-color: white;
225
- box-sizing: border-box;
226
- border-radius: 4px;
227
- background-clip: border-box;
228
- overflow: hidden;
229
- }
230
-
231
- .video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
232
- border: none;
233
- }
234
-
235
- #video-response-player-secondary-video-player {
236
- max-width: 200px;
237
- margin-right: 20px;
238
- background-color: transparent;
239
- }
240
-
241
- #ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
242
- display: table;
243
- }
244
-
245
- .video-js div.vjs-progress-control {
246
- margin-top: -3px;
247
- }
248
-
249
- .video-js .vjs-progress-control .vjs-slider {
250
- background-color: #B2BBBD;
251
- }
252
-
253
- .vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
254
- position:relative;
255
- }
256
-
257
- .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
258
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
259
- }
260
-
261
- .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
262
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
263
- }
264
-
265
- .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
266
- content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
267
- }
268
-
269
- .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
270
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A");
271
- padding: 2px;
272
- }
273
-
274
- .vjs-error-display {
275
- display: none;
276
- }
277
-
278
- .ul-video-player-video {
279
- position: relative;
280
- top: 0;
281
- left: 0;
282
- width: 100%;
283
- }
284
-
285
- .ul-video-container {
286
- width: 100%;
287
- height: auto;
288
- left: 0px;
289
- top: 0px;
290
-
291
- background-color: transparent;
292
- border-radius: 4px;
293
-
294
- align-items: start;
295
- display: flex;
296
- flex-direction: column;
297
-
298
- /* Inside Auto Layout */
299
-
300
- flex: none;
301
- order: 0;
302
- flex-grow: 0;
303
- margin: 10px 0px;
304
- position: relative;
305
- }
306
-
307
- .vjs-record button.vjs-device-button.vjs-control {
308
- background: rgba(255, 255, 255, 96);
309
- width: 100%;
310
- height: 100%;
311
- left: 0;
312
- top: 0;
313
- margin: 0;
314
- border-radius: 0;
315
- line-height: 0.6;
316
- padding: 10px;
317
- display: flex;
318
- align-items: center;
319
- flex-direction: column;
320
- justify-content: center;
321
- z-index: 3;
322
- }
323
-
324
- .vjs-record .vjs-device-button.vjs-control:before {
325
- font-size: 14px !important;
326
- color: #333;
327
- content: "Your browser needs to access your camera and microphone for video recording";
328
- line-height: 135%;
329
- }
330
-
331
- .vjs-record .vjs-device-button.vjs-control.permission-denied:before {
332
- font-size: 16px !important;
333
- color: #262136;
334
- content: "Unable to access your camera and microphone";
335
- }
336
-
337
- .vjs-record .vjs-device-button.vjs-control:after {
338
- display: inline-block;
339
- background: #F0F0F5;
340
- font-size: 13px;
341
- border-radius: 4px;
342
- content: "Request Permissions";
343
- padding: 1em 2em;
344
- color: #333;
345
- margin-top: 20px;
346
- }
347
-
348
- .vjs-record .vjs-device-button.vjs-control.permission-denied:after {
349
- display: inline-block;
350
- background: white;
351
- font-size: 13px;
352
- content: "Please go to your browser settings and update permissions to enable recording";
353
- padding: 1em;
354
- color: #4B575D;
355
- margin: 5px;
356
- line-height: 135%;
357
- text-align: center;
358
- }
359
-
360
- .vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button {
361
- cursor: pointer;
362
- }
363
-
364
- .ul-video-recorder-delete-button .vjs-icon-placeholder:before {
365
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
366
- }
367
-
368
- .ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
369
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E");
370
- }
371
-
372
- .ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
373
- content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A");
374
- }
375
-
376
- .ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
377
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
378
- }
379
-
380
- .ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
381
- content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E");
382
- transform: scale(0.75);
383
- }
384
-
385
- .ul-upload-progress-label {
386
- padding: 0.15em 0.75em;
387
- align-items: center;
388
- font-size: 12px;
389
- color: #333;
390
- background: #FCFCFD;
391
- border-radius: 99px;
392
- text-align: center;
393
- border: 1px solid #E0E0EB;
394
- display: flex;
395
- align-items: center;
396
- justify-content: center;
397
- position: absolute;
398
- bottom: 75px;
399
- left: calc(50% - 65px);
400
- width: 130px;
401
- z-index: 5;
402
- }
403
-
404
- .ul-upload-progress-label__time {
405
- display: inline-flex;
406
- margin-left: 0.8em;
407
- align-items: center;
408
- }
409
-
410
- .ul-upload-progress-label__time:before {
411
- content: "";
412
- display: inline-flex;
413
- width: 1px;
414
- height: 12px;
415
- background-color: #E0E0EB;
416
- margin-right: 0.8em;
417
- }
418
-
419
- @keyframes grow {
420
- 0% {
421
- transform: scale(1);
422
- background-color: #EEECFC;
423
- }
424
- 50% {
425
- transform: scale(1.2);
426
- background-color: #E1DFF4;
427
- }
428
- 100% {
429
- transform: scale(1);
430
- background-color: #EEECFC;
431
- }
432
- }
433
-
434
- .ul-audio-recorder-placeholder:before {
435
- width: 80px;
436
- height: 80px;
437
- border-radius: 120px;
438
- background-color: #EEECFC;
439
- content: "";
440
- position: absolute;
441
- left: calc(50% - 40px);
442
- top: calc(50% - 40px);
443
- animation: 6s infinite grow;
444
- transform-origin: 50% 60%;
445
- }
446
-
447
- .ul-audio-recorder-placeholder:after {
448
- content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
449
- position: absolute;
450
- left: 50%;
451
- top: 50%;
452
- transform: translate(-50%, -50%);
453
- transform: translate(-50%, -50%) scale(0.6);
454
- }
455
-
456
- .ul-audio-recorder-placeholder {
457
- min-height: 150px;
458
- width: 100%;
459
- background-color: #fcfcfd;
460
- display: block;
461
- position: relative;
462
- }
463
-
464
- .vjs-fullscreen .ul-audio-recorder-placeholder {
465
- vertical-align: middle;
466
- display: table-cell;
467
- }
468
-
469
- .vjs-fullscreen .ul-control-panel {
470
- height: 80px;
471
- position: absolute;
472
- bottom: 0;
473
- left: 0;
474
- width: 100%;
475
- max-width: 100%;
476
- background-color: #F8F8F8;
477
- }
478
-
479
- .vjs-playback-rate .vjs-playback-rate-value {
480
- align-items: center;
481
- display: flex;
482
- font-size: 12px;
483
- justify-content: center;
484
- }
485
-
486
- .vjs-playback-rate .vjs-menu {
487
- left: -5px;
488
- bottom: 3px;
489
- }
490
-
491
- .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
492
- background-color: white;
493
- border: 1px solid rgba(0, 0, 0, 0.1);
494
- box-sizing: border-box;
495
- border-radius: 4px;
496
- }
497
-
498
- .vjs-menu li {
499
- font-size: 12px;
500
- padding: 5px 0;
501
- }
502
-
503
- .vjs-menu li.vjs-selected {
504
- color: lightgray;
505
- }
506
-
507
- .vjs-menu li.vjs-menu-item:hover {
508
- background-color: rgba(0, 0, 0, 0.05);
509
- }
510
-
511
- .vjs-fullscreen .ul-buttons-panel {
512
- top: calc(50% - 30px);
513
- position: relative;
514
- }
515
-
516
- .vjs-fullscreen .vjs-record-indicator.vjs-control {
517
- bottom: 90px !important;
518
- }
519
-
520
- .vjs-record.video-js div.vjs-control.vjs-record-indicator {
521
- padding: 0.3em 0.75em 0.15em 15px;
522
- align-items: center;
523
- font-size: 12px;
524
- color: #333;
525
- background: #FCFCFD;
526
- border-radius: 99px;
527
- text-align: center;
528
- border: 1px solid #E0E0EB;
529
- display: flex;
530
- justify-content: center;
531
- align-items: center;
532
- position: absolute;
533
- bottom: 75px;
534
- top: auto;
535
- left: calc(50% - 21px);
536
- width: 43px;
537
- height: 16px;
538
- z-index: 4;
539
- }
540
-
541
- .vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
542
- content: "";
543
- background-color: #EB5757;
544
- width: 6px;
545
- height: 6px;
546
- border-radius: 8px;
547
- animation: none;
548
- top: 4px;
549
- left: 5px;
550
- }
551
-
552
- .vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
553
- position: relative;
554
- font-size: 9px;
555
- animation: none;
556
- opacity: 1;
557
- color: #333;
558
- top: auto;
559
- left: auto;
560
- }
561
-
562
- .ul-video-player-loading {
563
- display: inline-block;
564
- position: relative;
565
- width: 6rem;
566
- height: 6rem;
567
-
568
- }
569
- .ul-video-player-loading div {
570
- box-sizing: border-box;
571
- position: absolute;
572
- display: block;
573
- width: 80%;
574
- height: 80%;
575
- margin: 5px;
576
- border: 5px solid #666;
577
- border-radius: 50%;
578
- animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
579
- border-color: #666 transparent transparent transparent;
580
- }
581
-
582
- .first {
583
- animation-delay: -0.45s;
584
- }
585
- .second {
586
- animation-delay: -0.3s;
587
- }
588
- .third {
589
- animation-delay: -0.15s;
590
- }
591
-
592
- @keyframes lds-ring {
593
- 0% {
594
- transform: rotate(0deg);
595
- }
596
- 100% {
597
- transform: rotate(360deg);
598
- }
599
- }
600
-
601
- .ul-video-btn {
602
- width: 100%;
603
- border: 1px solid #E6E6E6;
604
- border-radius: 4px;
605
- background-color: rgba(0, 0, 0, 0.02);
606
- padding: 8px;
607
- font-weight: 500;
608
- font-size: 15px;
609
- }
610
-
611
- .ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
612
- margin: 0 5px;
613
- vertical-align: middle;
614
- }
615
-
616
- .ul-record-response-btn:before {
617
- content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
618
- display: inline-block;
619
- transform: translate(0px, 2px);
620
- }
621
-
622
- .ul-record-response-btn:after {
623
- content: 'Record your Response';
624
- }
625
-
626
- .ul-back-question-btn:before {
627
- content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
628
- display: inline-block;
629
- transform: scale(0.85) translate(0, 1px);
630
- -moz-transform: scale(0.85) translate(0, 2px);
631
- }
632
-
633
- .ul-back-question-btn:after {
634
- content: 'Back to Question';
635
- }
636
-
637
- .hidden {
638
- display: none !important;
639
- opacity: 0;
640
- visibility: hidden;
641
- }
642
-
643
- .visible {
644
- visibility: visible;
645
- opacity: 1;
646
- animation: fade 0.3s;
647
- }
648
-
649
- @keyframes fade {
650
- 0% {
651
- opacity: 0;
652
- }
653
-
654
- 100% {
655
- opacity: 1;
656
- }
657
- }
658
-
659
- #ul-recording-countdown-screen {
660
- width: 100%;
661
- height: 100%;
662
- color: black;
663
- background-color: rgba(255, 255, 255, 0.8);
664
- position: absolute;
665
- text-align: center;
666
- font-size: 15px;
667
- z-index: 1;
668
- display: table;
669
- }
670
-
671
- .ul-countdown-text {
672
- vertical-align: middle;
673
- display: table-cell;
674
- transform: translate(0, -25px);
675
- }
676
-
677
- .vjs-fullscreen > #ul-recording-countdown-screen {
678
- font-size: 25px;
679
- transform: unset;
680
- }
681
-
682
- .vjs-poster {
683
- background-size: cover;
684
- }
685
- `,yi=e=>{const t=R.document.createElement("div");return t.className="ul-video-player-loading",t.id=kt(e),["first","second","third","fourth"].map(n=>{const o=R.document.createElement("div");o.className=n,t.appendChild(o)}),t},kt=e=>e+"-loading-spiner",F="hidden",en=".m3u8",Qe="questionId",Je="ul-video-recorder-camera-off-button",Xe="ul-recording-in-session",ki=[{type:"link",content:`${ue}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${ue}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${ue}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${ue}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${ue}/userleap-web-upchunk-v2.2.2.js`}],xo=[{type:"link",content:`${ue}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${ue}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:xi}],yo="-video-player",ko="-secondary-video-player",Co="-video-recorder";let X,tn;const le=async({event:e,apiBase:t,headers:n,visitorId:o,envId:r,metadata:i})=>{const s=R.document.documentElement;if(!o||!r)return;const a={event:`SDK - ${e}`,visitorId:o,environmentId:r,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${o}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},te=async(e,t,n,o,r,i)=>{le({event:`Video Error ${t}`,apiBase:n,headers:o,visitorId:r,envId:i,metadata:{errorMessage:e.message}});const s=R.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},d={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:r,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...o,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Ci=(e,{type:t,content:n})=>new Promise(function(o,r){let i;t==="script"?(i=R.document.createElement("script"),i.src=n):t==="link"?(i=R.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=R.document.createElement("style"),i.innerHTML=n),i.onload=function(){o(n)},i.onerror=function(){r(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)}),wo=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,o)=>(n.push(Ci(R.document.head,o)),n),[])).then(()=>{R.videojs=R.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},nn=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=F;else if(t==="success")e.style.visibility=F,e.innerHTML="Upload succeeded!";else{const o=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${o}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${o}%, #FCFCFD ${o}%, #FCFCFD 100%)`}},et=(e,t)=>{const n=R.videojs(e.id());return n==null?void 0:n.payload[t]},wi=(e,t,n,o,r)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:d}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(N.ERROR,{type:N.PERMISSION_DENIED}),le({event:"Video Permission Denied",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:et(e,Qe),responseGroupUid:s,surveyId:i}})):(n&&n(N.ERROR,{type:N.OTHER}),te(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,r,a,d))}),e.on("error",function(c,p){te(p||e.error(),"recorderError",t,r,a,d)}),e.on("startRecord",function(c,p){o(e.uploadProgressLabel,"none"),le({event:"Video Record Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:et(e,Qe),responseGroupUid:s,surveyId:i}})}),e.on("finishRecord",async function(){o(e.uploadProgressLabel,"start",0);const c=et(e,Qe);if(!i){const f="internal error: missing fields in payload";return n&&n(N.ERROR,{type:N.OTHER}),te(new Error(f),"finishRecord",t,r,a,d),null}e.record().stopDevice();const p=e.cameraOff?N.MEDIA_TYPE_AUDIO:N.MEDIA_TYPE_VIDEO,l=$.v4();le({event:"Video Record Finish",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:p,mediaRecordingUid:l};c&&(h.questionId=c),s&&(h.responseGroupUid=s),a&&(h.visitorId=a);const g=await(async()=>{const f=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(f.ok){const _=await f.json();return n&&n(N.UPLOAD_STARTED,{[N.UPLOAD_ID]:_.upload.id,[N.MEDIA_TYPE]:p,[N.MEDIA_RECORDING_UID]:l}),_.upload.url}else return n&&n(N.ERROR,{type:N.OTHER,response:f}),te(new Error("failed to get upload response with url"),"finishRecord",t,r,a,d),null})();g&&(X=R.document.defaultView.UpChunk.createUpload({endpoint:g,file:new R.document.defaultView.File([e.recordedData],`recording ${p} ${Date.now()}`),chunkSize:5120}),X.startTime=Date.now(),le({event:"Video Upload Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:g}}),X.on("error",f=>{o(e.uploadProgressLabel,"none"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),te(f,"finishRecord",t,r,a,d)}),X.on("progress",f=>{n&&n(N.UPLOAD_PROGRESS,{[N.MEDIA_RECORDING_UID]:l,[N.UPLOAD_PROGRESS_PCT]:f.detail}),o(e.uploadProgressLabel,"progress",f.detail)}),X.on("success",()=>{o(e.uploadProgressLabel,"success"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),le({event:"Video Upload Success",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:g,elapsedMs:X.startTime&&Date.now()-X.startTime}})}))})},Eo=(e,t)=>{const n=new(R.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(o=>{n.addChild(o)}),Ei(n),n},Ei=e=>{e.children().forEach(t=>{if(K[t.name_]){const n=Le(K[t.name_],`ul-${K[t.name_]}`);t.el_.appendChild(n)}})},Le=(e,t="")=>{const n=R.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},So=(e,t,n,o,r=!1,i)=>{e.addClass("ul-video-player");const s=new(R.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(R.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Oi(n.src):null;n&&(r||!a)?(e.children()[0].classList.add("vjs-hidden"),R.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),R.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!r&&n&&!a&&ji(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),o&&o(e)},Si=(e,t,n)=>{e.addClass(`ul${ko}`);const o=new(R.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(o),n&&n(e)},Ti=(e,t,n,o,r,i,s,a=!1)=>{tn=Date.now();const c=He(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!c)return;c.payload=n;const{surveyId:p,questionId:l,responseGroupUid:h,visitorId:m,envId:g}=n;let f;const _=O=>{const P=Je,D=Je+"-audio-only";nn(c.uploadProgressLabel,"none"),X&&X.startTime>=tn&&X.abort();const G=R.document.getElementById("ul-camera-button");O?(c.children()[0].classList.add("vjs-hidden"),E.removeClass(P),E.addClass(D),G.innerHTML=K.TurnOnCamera,c.audioPlayerPlaceholder.removeClass("vjs-hidden"),f==null||f.getTracks().forEach(q=>{q.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(q=>{f=q,q.getVideoTracks().forEach(qe=>{qe.enabled=!1}),c.record().onDeviceReady(q)}).catch(c.record().onDeviceError.bind(c.record()))):(f==null||f.getVideoTracks().forEach(q=>{q.enabled=!0}),c.children()[0].classList.remove("vjs-hidden"),c.record().getDevice(),E.removeClass(D),E.addClass(P),G.innerHTML=K.TurnOffCamera,c.audioPlayerPlaceholder.addClass("vjs-hidden"))},v=new(R.videojs.getComponent("Button"))(c,{clickHandler:()=>{v.hasClass(F)||(le({event:"Video Delete Button Clicked",apiBase:o,headers:s,visitorId:m,envId:g,metadata:{questionId:l,responseGroupUid:h,surveyId:p}}),_(c.cameraOff),r(N.DELETE,{}),E.removeClass(F),v.addClass(F))}});v.addClass("ul-video-recorder-delete-button"),v.el_.appendChild(Le(K.DeleteButton,"ul-delete-button"));const b=R.document.getElementById(t),x=()=>{b.classList.contains("vjs-fullscreen")&&c.cameraOff?b.style.display="table":b.style.display="flex"};x();const E=new(R.videojs.getComponent("Button"))(c,{clickHandler:()=>{c.record().isRecording()||(c.cameraOff=!c.cameraOff,le({event:"Video Camera Button Clicked",apiBase:o,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:l,responseGroupUid:h,surveyId:p,cameraOff:c.cameraOff}}),_(c.cameraOff),!v.hasClass(F)&&v.addClass(F),r(N.DELETE,{}),x())}});E.addClass(Je),E.el_.appendChild(Le(K.TurnOffCamera,"ul-camera-button"));const C=new(R.videojs.getComponent("Button"))(c,{clickHandler:()=>{const O=R.document.getElementById("ul-recorder-toggle");if(c.record().isRecording())c.record().stop(),O&&(O.innerHTML=K.RecordButton),C.removeClass(Xe),v.removeClass(F);else{const P=R.document.getElementById("ul-recording-countdown-screen");if(P)P.remove(),O&&(O.innerHTML=K.RecordButton),_(c.cameraOff),r(N.DELETE,{}),E.removeClass(F),v.addClass(F),C.removeClass(Xe),w.show();else{C.addClass(Xe),w.hide(),E.addClass(F),v.addClass(F),O&&(O.innerHTML=K.StopButton);const D=R.document.createElement("div");D.id="ul-recording-countdown-screen",b.insertBefore(D,b.children[1]),D.style.height=`${b.offsetHeight}px`,To(c,3)}}}});C.addClass("ul-video-recorder-toggle-button"),C.el_.appendChild(Le(K.RecordButton,"ul-recorder-toggle"));const S=R.document.createElement("p");S.style.visibility="hidden",S.className="ul-upload-progress-label",e.appendChild(S),c.uploadProgressLabel=S;const I=Eo(c,[v,E,"PlayToggle",C,"FullscreenToggle"]),w=I.children().find(O=>O.name_==="FullscreenToggle");w.hasClass("vjs-disabled")&&w.hide();const y=I.children().find(O=>O.name_==="PlayToggle");y.hide(),v.addClass(F),So(c,I,i,!1,a),c.on("stopRecord",()=>{C.hide(),y.show(),w.show(),v.removeClass(F)}),c.on("deviceReady",()=>{C.show(),y.hide(),v.addClass(F)}),wi(c,o,r,nn,s);const j=[{name:"microphone"}];!c.cameraOff&&j.push({name:"camera"}),Promise.all(j.map(O=>{var P;return(P=navigator==null?void 0:navigator.permissions)==null?void 0:P.query(O)})).then(O=>{O.reduce((D,G)=>D&G.state==="granted",!0)&&c&&(c.deviceButton&&c.deviceButton.hide(),c.record().getDevice())}).catch(O=>{})},To=(e,t=3)=>{const n=R.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{To(e,t-1)},1e3))},jo=e=>{const t=R.document.createElement("div");return t.className="ul-video-container",t.appendChild(yi(e)),t},ct=(e,t)=>{const n=R.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const o=R.document.createElement("p");o.className="vjs-no-js",o.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const r=R.document.createElement("a");return r.href="https://videojs.com/html5-video-support/",r.target="_blank",r.innerHTML="supports HTML5 video",o.appendChild(r),n.appendChild(o),t.appendChild(n),t},ji=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),R.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},He=(e,t)=>R.document.getElementById(e)?t?R.videojs(e,t):R.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Ri=(e,t,n,o=!1,r="https://api.sprig.com",i=document,s=null,a=null)=>{R.document=i;const d=e+yo,c=jo(d);return R.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",r,{})}),wo(xo,()=>{R.document.getElementById(kt(d)).remove(),ct(d,c);const p={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const l=e+ko;ct(l,c);const h=He(d,p),m=He(l,{muted:!0,...p});if(!h||!m)return;Si(m,s,a),s||m.addClass(F);const g=Eo(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=g.children().find(_=>_.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),So(h,g,t,n,o,m)}catch(l){te(new Error(`Error when creating video player object ${l}`),"playerDeviceError",r,{});return}}),c},Pi=(e,t={},n="https://api.userleap.com",o,r,i,s=!1,a=document)=>{R.document=a;const d=e+Co,c=jo(d);return R.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),wo(xo.concat(ki),()=>{ct(d,c),R.document.getElementById(kt(d)).remove();try{Ti(c,d,t,n,o,r,i,s)}catch(p){te(new Error(`Error when creating video recorder player object ${p}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),c},Ii=e=>{const t=e+Co;if(R.document.getElementById(t)&&R.videojs){try{if(!R.videojs(t).record().stream)return}catch{return}R.videojs(t).record().stop(),R.videojs(t).record().stopDevice()}},Di=e=>{const t=He(e+yo);t==null||t.pause()},Oi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(en)&&(n=n.replace(en,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},N={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},K={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},ce="ul-card-video__player_recorder",Li="ul-card-video__skip_button",Ni="ul-video-interview-form",on="ul-video-btn",ye={Question:0,Answer:1},Mi=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:d,headers:c,responseGroupUid:p,surveyId:l,viewDocument:h,visitorId:m}=M(P=>({apiURL:P.apiURL,envId:P.envId,handleUploadUpdate:P.handleUploadUpdate,headers:P.headers,responseGroupUid:P.responseGroupUid,surveyId:P.surveyId,viewDocument:P.viewDocument,visitorId:P.userId})),[g,f]=U(!1),[_,v]=U(null),[b,x]=U(null),[E,C]=U(ye.Question),S=o&&o.videoUrl,I=(P,D)=>{P===N.UPLOAD_STARTED?(v(D[N.UPLOAD_ID]),x(D[N.MEDIA_RECORDING_UID]),f(!0)):P===N.DELETE?(v(null),x(null),f(!1)):P===N.UPLOAD_PROGRESS?isNaN(D[N.UPLOAD_PROGRESS_PCT])?d({mediaRecordingUid:D[N.MEDIA_RECORDING_UID],isComplete:!0}):d({mediaRecordingUid:D[N.MEDIA_RECORDING_UID],progressPct:D[N.UPLOAD_PROGRESS_PCT]}):P===N.UPLOAD_FINISHED&&d({mediaRecordingUid:D[N.MEDIA_RECORDING_UID],isComplete:!0})},w=P=>{if(P&&P.children.length===0&&!o.hideRecordedPrompt){const D=Ri(ce,{src:S,type:"application/x-mpegURL"},void 0,o.mediaType===N.MEDIA_TYPE_AUDIO,s,h);P.appendChild(D)}},y=P=>{if(P&&P.children.length===0){const D=Pi(ce,{surveyId:l,responseGroupUid:p,questionId:r,visitorId:m,envId:a},s,I,void 0,{...c,"x-ul-video-recorder-origin":"sdk"},o.mediaType===N.MEDIA_TYPE_AUDIO,h);P.appendChild(D)}},j=P=>{P.preventDefault(),P.stopPropagation(),document.getElementById(ce)&&Ii(ce),_&&b?(d({mediaRecordingUid:b,isSubmitted:!0}),n({value:{mediaRecordingUid:b},questionId:r,type:i})):n({value:null,questionId:r,type:i})},O=()=>u(ie,{defaultBody:()=>u("button",{className:`${on} ul-record-response-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),document.getElementById(ce)&&Di(ce),C(ye.Answer)}}),properties:o});return u("form",{className:L(e,"ul-card--video","fade-in-transition"),id:Ni,children:[u(J,{message:t,properties:o}),u("div",{id:"ul-card-voice__video",children:[u("div",{children:[u("div",{id:"ul-question-player-container",style:{display:E===ye.Question?"":"none"},children:[u("div",{id:ce,ref:w}),O()]}),u("div",{style:{display:E===ye.Answer?"block":"none"},children:[u("button",{className:`${on} ul-back-question-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),C(ye.Question)},style:{display:o.hideRecordedPrompt?"none":"block"}}),u("div",{id:"ul-recorder-player-container",ref:y})]})]}),u(Z,{disabled:!g,onClick:j,children:me(o)}),u("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:Li,onClick:j,style:{display:o.required?"none":"block",...g?{display:"none"}:{}},children:bt(o)})]})]})},Ai=({className:e})=>{const{uploadProgress:t}=M(i=>({uploadProgress:i.uploadProgress}));let n,o;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",o="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",o="Please keep this tab open until your response is fully processed.");const r=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return u("div",{className:L(e,"ul-card--uploading","fade-in-transition"),children:[u("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:u("div",{className:"ul-loading-spinner",children:[u("div",{className:"first"}),u("div",{className:"second"}),u("div",{className:"third"}),u("div",{className:"fourth"})]})}),u(J,{message:`${n} (${r}% complete)`}),u("p",{className:"ul-caption",children:o})]})},rn=({logoOnly:e=!1,style:t={}})=>u("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&u("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),Hi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:o,index:r,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:d,viewedCardCount:c}=M(x=>({border:x.border,cards:x.cards,forceBrandedLogo:x.forceBrandedLogo,headers:x.headers,index:x.index,marketingUrl:x.marketingUrl,showSurveyBrand:x.showSurveyBrand,slugName:x.slugName,surveyId:x.surveyId,viewedCardCount:x.viewedCardCount})),p=Y(null),l=t.filter(x=>x.type!=="uploading"&&x.type!=="thanks"),h=Nr(t,r),m=c+1,g=m/(m+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${d}${n&&"&utm_term=poweredby_pill"}`;z(()=>{p.current&&(p.current.style.width=`${g*100}%`)},[g]);const _=()=>u(W,{children:[l.length>1&&u("div",{id:"ul-progress-bar-container",children:u("div",{id:"ul-progress-bar-current",ref:p,style:{border:`1px solid ${e||"#000"}`}})}),s?u("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:u("a",{href:f,rel:"noreferrer",target:"_blank",children:u("div",{style:{display:"flex"},children:[u(rn,{logoOnly:!1}),n&&u(sn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),v=()=>u("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:u("div",{className:"thank-you-card-link",children:[u("div",{className:"sprig-box-logo",children:u(rn,{logoOnly:!0,style:{margin:"auto"}})}),u("div",{children:u("p",{children:["Capture insights about your own product",u(sn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),b=t[r].type==="thanks";return u("footer",{className:`ul-footer ${o["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:b&&n?v():_()})},sn=({style:e})=>u("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),u("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),$i=()=>{const{answers:e,border:t,cards:n,close:o,configureExitOnOverlayClick:r,destroy:i,endCard:s,eventEmitFn:a,fontFamily:d,headers:c,index:p,next:l,previewMode:h,productConfig:m,seen:g,showStripes:f,studyType:_,surveyId:v,update:b,useMobileStyling:x,viewDocument:E}=M(T=>({answers:T.answers,border:T.border,cards:T.cards,close:T.close,configureExitOnOverlayClick:T.configureExitOnOverlayClick,destroy:T.destroy,endCard:T.endCard,eventEmitFn:T.eventEmitFn,fontFamily:T.fontFamily,headers:T.headers,index:T.index,previewMode:T.previewMode,productConfig:T.productConfig,next:T.next,seen:T.seen,showStripes:T.showStripes,studyType:T.studyType,surveyId:T.surveyId,update:T.update,useMobileStyling:T.useMobileStyling,viewDocument:T.viewDocument})),C=Y(null),S=Y(!1),I=c["userleap-platform"],{props:w,type:y,name:j}=n[p],O=n.length;z(()=>{C.current&&(C.current.classList.contains("ul-app--visible")||C.current.classList.add("ul-app--visible"),!S.current&&a&&(S.current=!0,a($.SprigEvent.SurveyAppeared,{name:$.SprigEvent.SurveyAppeared,"survey.id":v})))},[a,v]),z(()=>{const T=()=>{E.visibilityState==="visible"&&(g(),E.removeEventListener("visibilitychange",T))};return E.addEventListener("visibilitychange",T),T(),()=>{E.removeEventListener("visibilitychange",T)}},[g,E]),z(()=>{b()},[p,b]),z(()=>{r(()=>o())},[o,r]);const P=xe(()=>()=>o(B.APP_ID),[o]),D=T=>{T.key==="Enter"&&P()},G=async function(T){l({data:T,completeSurvey:()=>{i(B.APP_ID)},endCard:s}),B.resetScrollPosition(E)};if(e){for(const T of e)if(T.questionId===j){let se;if(y==="multiplechoice"){const ae=w.options.find(({value:We})=>We===T.value);if(!ae)break;se={[ae.id]:ae.value}}else se=T.value;G({value:se,type:y,questionId:T.questionId});break}}const q=()=>["email","link"].includes(c["userleap-platform"])?!1:!s||p+1!==O,qe=()=>{const T={className:"ul-card",next:G,questionId:j,type:y};switch(y){case"consentlegal":return H(qr,{...T,...w,key:j});case"likert":return H(Zr,{...T,...w,key:j});case"matrix":return H(Jr,{...T,...w,key:j});case"multiplechoice":return H(ti,{...T,...w,key:j});case"multipleselect":return H(ni,{...T,...w,key:j});case"nps":return H(oi,{...T,key:j,props:w});case"open":return H(ri,{...T,...w,key:j});case"recordedtask":return H(fi,{...T,...w,key:j});case"texturlprompt":return H(_i,{...T,...w,key:j});case"thanks":return H(bi,{...T,...w,key:j});case"uploading":return H(Ai,{...T,...w,key:j});case"videovoice":return H(Mi,{...T,...w,key:j});default:return null}},Po=T=>{var Ct;const se=window.sprigAPI,ae=T.target;if(!se||!ae)return;const We=[ae,ae.parentElement];for(const Re of We)if(((Ct=Re==null?void 0:Re.tagName)==null?void 0:Ct.toLowerCase())==="a"){T.preventDefault(),se==null||se.openUrl(Re.href);return}},Io=!x&&((m==null?void 0:m.framePosition)==="center"||(m==null?void 0:m.desktopDisplay)==="center-modal"||((m==null?void 0:m.placement)||"").includes("center"));return u("div",{className:L("ul-app",$.shouldDirectEmbed(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:B.APP_ID,onClick:Po,ref:C,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{},...Io?{position:"relative"}:{}},children:u("div",{className:"ul-app__container",children:u("div",{className:L(V("ul-card__container",x,_)),style:{..._!=="feedbackButton"||(m==null?void 0:m.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(m==null?void 0:m.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[q()&&u("div",{className:L(V("close-container",x)),children:u("div",{"aria-label":"Close button",className:"close-btn",onClick:P,onKeyPress:D,role:"button",tabIndex:0,children:u("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"For development purposes only"})}),h&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),u("div",{className:L(Ur("ul-card-main-content",I)),children:qe()}),u(Hi,{})]})})})},Ui='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;margin:auto;text-align:start;min-width:200px}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{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}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;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}.question-header-container{margin-bottom:15px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:8px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{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;max-width:-webkit-fill-available}#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:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;max-height:190px;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#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}',Bi=async(e,t)=>{var o;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const r=await n.json();return(o=r==null?void 0:r.upload)==null?void 0:o.url}else return null},Ro=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",ln=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Ro()};return new MediaRecorder(e,t)},an=(e,t,n)=>{n[t]=[],e.ondataavailable=function(o){n[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function cn(e,t,n,o,r,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=o,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>Vi(t,e,n,o,a,r,i),e.stop()}}async function Vi(e,t,n,o,r,i,s){const a=M.getState().viewDocument,{"upload.callback":d,"progress.callback":c}=o,p={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:r,...o["passthrough.data"]},l=await Bi(p,e);if(!l){d&&d(null,{message:"failed to get upload url"});return}const h=new Blob(s,{type:Ro()});if(!a.defaultView)return;const m=new a.defaultView.File([h],`recording video ${Date.now()}`),g=i.createUpload({endpoint:l,file:m,chunkSize:5120});g.on("error",f=>{d&&d(null,f)}),g.on("progress",f=>{c&&c(r,f)}),g.on("success",()=>{d&&d(r,!0)})}const Fi={chunks:{}},zi={state:{...Fi},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:o,UpChunk:r}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&r&&(n!=null&&n.currentMediaRecordingUid&&cn(n,t,i,e,r,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&cn(o,t,"screen",e,r,this.state.chunks[o==null?void 0:o.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let o=t.length&&t[0];o=o||n.length&&n[0],o&&o.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(r=>{r&&(r.state==="recording"&&r.stop(),r.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var o,r,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(o=this.state.avStream)!=null&&o.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((r=this.state.captureStream)==null?void 0:r.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((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)}catch(s){console.warn("Error: failed to get permissions: "+s),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(o){t==null||t(!1),console.warn("Error: failed to get permissions: "+o),n&&n(null,null);return}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)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const o=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=ln(this.state.avStream);const r=$.v4();an(this.state.avRecorder,r,this.state.chunks),o.push(r)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=ln(this.state.captureStream);const r=$.v4();an(this.state.screenRecorder,r,this.state.chunks),o.push(r)}o&&n&&n(o)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":o}=e;await this.stopRecording(e),o&&o(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var o;const{["permission.status.callback"]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((o=this.state.captureStream)!=null&&o.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,o){const{avRecorder:r,screenRecorder:i}=this.state,{allResponses:s}=M.getState(),a=io({cards:n,index:e,hasEndCard:o,allResponses:s});a!==null&&n[a].type==="recordedtask"||[r,i].map(d=>{d&&(d.state==="recording"&&d.stop(),d.stream.getTracks().map(c=>{c.readyState==="live"&&c.stop()}))})}},Ne=Object.create(zi);Object.freeze(Ne);const qi=(e,t)=>{const n=[...e],o=new Set(["videovoice","recordedtask"]);return e.some(r=>o.has(r.type))&&n.push({name:-2,props:{routingOptions:[]},type:"uploading"}),t&&n.push({name:-1,props:{routingOptions:[]},type:"thanks"}),n},Wi=({mode:e=null,viewWindow:t,viewDocument:n,trackPageViewUrl:o})=>{const r=n.documentElement;let i;try{i=t.parent.location.href}catch{i=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:o??i,l:t.navigator.language}};function Zi(e,t=!0){var b;const{answers:n,apiURL:o,endCard:r,eventEmitFn:i,fontFamilyURL:s,frame:a,previewKey:d,viewDocument:c,viewWindow:p}=e,l=$.shouldDirectEmbed(e.headers)?e.frame:c.body,h=e.UpChunk||window.UpChunk,m=$.eventEmitter,g=qi(e.cards,!!r);Ne.configure(m,{cards:g,hasEndCard:!!r,apiURL:o,UpChunk:h}),M.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:g,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:a,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Wi({mode:e.mode,viewWindow:p,viewDocument:c,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:d,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Ne,recorderEventEmitter:m,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{head:f}=c;if(B.setSurveyStyles({document:c,elementId:"sprig-style",styleString:Ui}),e.customStyles&&B.setSurveyStyles({document:c,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&s&&parent){const x=c.createElement("link");x.rel="stylesheet",x.href=s,f.appendChild(x)}if(!h)if(e.installationMethod!=="web-npm"){const x=c.createElement("script");x.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{Ne.setUpChunk(p.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},f.appendChild(x)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const _="2.32.0",v=i||((b=a.eventEmitter)==null?void 0:b.emit);v==null||v("verify.view.version",{"view.version":_}),l&&t&&ve(u($i,{}),l)}const Gi={configure:Zi};exports.default=Gi;