@sprig-technologies/sprig-browser 2.30.2 → 2.30.4

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,4 +1,4 @@
1
- import{C as It,A as he,a as On,D as Un,E as Hn,b as xe,d as Ze,r as An,o as Bn}from"./core-BzwoEbTD.js";import{i as Ge,D as Tt,f as De,j as Pe,S as oe,s as Ke,u as Vn,v as Ye}from"./metricsReporter-B6Yx0G8b.js";var ke,C,Dt,ae,Pt,Rt,Qe,Nt,we={},Lt=[],qn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function J(e,t){for(var r in t)e[r]=t[r];return e}function Mt(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,r){var n,o,i,l={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?ke.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return Ce(e,l,n,o,null)}function Ce(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Dt,__i:-1,__u:0};return o==null&&C.vnode!=null&&C.vnode(i),i}function Ot(){return{current:null}}function z(e){return e.children}function W(e,t){this.props=e,this.context=t}function ve(e,t){if(t==null)return e.__?ve(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ve(e):null}function Ut(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ut(e)}}function Je(e){(!e.__d&&(e.__d=!0)&&ae.push(e)&&!Ne.__r++||Pt!==C.debounceRendering)&&((Pt=C.debounceRendering)||Rt)(Ne)}function Ne(){var e,t,r,n,o,i,l,s,a;for(ae.sort(Qe);e=ae.shift();)e.__d&&(t=ae.length,n=void 0,i=(o=(r=e).__v).__e,s=[],a=[],(l=r.__P)&&((n=J({},o)).__v=o.__v+1,C.vnode&&C.vnode(n),Xe(l,n,o,r.__n,l.ownerSVGElement!==void 0,32&o.__u?[i]:null,s,i??ve(o),!!(32&o.__u),a),n.__.__k[n.__i]=n,$t(s,n,a),n.__e!=i&&Ut(n)),ae.length>t&&ae.sort(Qe));Ne.__r=0}function Ht(e,t,r,n,o,i,l,s,a,u,p){var d,h,m,v,f,_=n&&n.__k||Lt,b=t.length;for(r.__d=a,$n(r,t,_),a=r.__d,d=0;d<b;d++)(m=r.__k[d])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?we:_[m.__i]||we,m.__i=d,Xe(e,m,h,o,i,l,s,a,u,p),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&et(h.ref,null,m),p.push(m.ref,m.__c||v,m)),f==null&&v!=null&&(f=v),65536&m.__u||h.__k===m.__k?a=At(m,a,e):typeof m.type=="function"&&m.__d!==void 0?a=m.__d:v&&(a=v.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=a,r.__e=f}function $n(e,t,r){var n,o,i,l,s,a=t.length,u=r.length,p=u,d=0;for(e.__k=[],n=0;n<a;n++)(o=e.__k[n]=(o=t[n])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ce(null,o,null,null,o):Re(o)?Ce(z,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ce(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,s=zn(o,r,l=n+d,p),o.__i=s,i=null,s!==-1&&(p--,(i=r[s])&&(i.__u|=131072)),i==null||i.__v===null?(s==-1&&d--,typeof o.type!="function"&&(o.__u|=65536)):s!==l&&(s===l+1?d++:s>l?p>a-l?d+=s-l:d--:d=s<l&&s==l-1?s-l:0,s!==n+d&&(o.__u|=65536))):(i=r[n])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i,!1),r[n]=null,p--);if(p)for(n=0;n<u;n++)(i=r[n])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function At(e,t,r){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=At(n[o],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function X(e,t){return t=t||[],e==null||typeof e=="boolean"||(Re(e)?e.some(function(r){X(r,t)}):t.push(e)),t}function zn(e,t,r,n){var o=e.key,i=e.type,l=r-1,s=r+1,a=t[r];if(a===null||a&&o==a.key&&i===a.type)return r;if(n>(a!=null&&!(131072&a.__u)?1:0))for(;l>=0||s<t.length;){if(l>=0){if((a=t[l])&&!(131072&a.__u)&&o==a.key&&i===a.type)return l;l--}if(s<t.length){if((a=t[s])&&!(131072&a.__u)&&o==a.key&&i===a.type)return s;s++}}return-1}function Bt(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||qn.test(t)?r:r+"px"}function Le(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Bt(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Bt(e.style,t,r[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]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,i?qt:Vt,i)):e.removeEventListener(t,i?qt:Vt,i);else{if(o)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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Vt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(C.event?C.event(e):e)}function qt(e){return this.l[e.type+!0](C.event?C.event(e):e)}function Xe(e,t,r,n,o,i,l,s,a,u){var p,d,h,m,v,f,_,b,k,x,w,E,j,P,S,g=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(a=!!(32&r.__u),i=[s=t.__e=r.__e]),(p=C.__b)&&p(t);e:if(typeof g=="function")try{if(b=t.props,k=(p=g.contextType)&&n[p.__c],x=p?k?k.props.value:p.__:n,r.__c?_=(d=t.__c=r.__c).__=d.__E:("prototype"in g&&g.prototype.render?t.__c=d=new g(b,x):(t.__c=d=new W(b,x),d.constructor=g,d.render=Wn),k&&k.sub(d),d.props=b,d.state||(d.state={}),d.context=x,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),g.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=J({},d.__s)),J(d.__s,g.getDerivedStateFromProps(b,d.__s))),m=d.props,v=d.state,d.__v=t,h)g.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(b,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(b,d.__s,x)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=b,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(y){y&&(y.__=t)}),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&l.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(b,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,v,f)})}if(d.context=x,d.props=b,d.__P=e,d.__e=!1,E=C.__r,j=0,"prototype"in g&&g.prototype.render){for(d.state=d.__s,d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),P=0;P<d._sb.length;P++)d.__h.push(d._sb[P]);d._sb=[]}else do d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++j<25);d.state=d.__s,d.getChildContext!=null&&(n=J(J({},n),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(f=d.getSnapshotBeforeUpdate(m,v)),Ht(e,Re(S=p!=null&&p.type===z&&p.key==null?p.props.children:p)?S:[S],t,r,n,o,i,l,s,a,u),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),_&&(d.__E=d.__=null)}catch(y){t.__v=null,a||i!=null?(t.__e=s,t.__u|=a?160:32,i[i.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),C.__e(y,t,r)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Fn(r.__e,t,r,n,o,i,l,a,u);(p=C.diffed)&&p(t)}function $t(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)et(r[n],r[++n],r[++n]);C.__c&&C.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){C.__e(i,o.__v)}})}function Fn(e,t,r,n,o,i,l,s,a){var u,p,d,h,m,v,f,_=r.props,b=t.props,k=t.type;if(k==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!k&&(k?m.localName===k:m.nodeType===3)){e=m,i[u]=null;break}}if(e==null){if(k===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,b.is&&b),i=null,s=!1}if(k===null)_===b||s&&e.data===b||(e.data=b);else{if(i=i&&ke.call(e.childNodes),_=r.props||we,!s&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=m:u==="key"||u in b||Le(e,u,null,m,o));for(u in b)m=b[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?v=m:u=="checked"?f=m:u==="key"||s&&typeof m!="function"||_[u]===m||Le(e,u,m,_[u],o);if(p)s||d&&(p.__html===d.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ht(e,Re(h)?h:[h],t,r,n,o&&k!=="foreignObject",i,l,i?i[0]:r.__k&&ve(r,0),s,a),i!=null)for(u=i.length;u--;)i[u]!=null&&Mt(i[u]);s||(u="value",v!==void 0&&(v!==e[u]||k==="progress"&&!v||k==="option"&&v!==_[u])&&Le(e,u,v,_[u],!1),u="checked",f!==void 0&&f!==e[u]&&Le(e,u,f,_[u],!1))}return e}function et(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){C.__e(n,r)}}function tt(e,t,r){var n,o;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||et(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&tt(n[o],t,r||typeof e.type!="function");r||e.__e==null||Mt(e.__e),e.__=e.__e=e.__d=void 0}function Wn(e,t,r){return this.constructor(e,r)}function fe(e,t,r){var n,o,i,l;C.__&&C.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],l=[],Xe(t,e=(!n&&r||t).__k=U(z,null,[e]),o||we,we,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?ke.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,l),$t(i,e,l)}function zt(e,t){fe(e,t,zt)}function Zn(e,t,r){var n,o,i,l,s=J({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&l!==void 0?l[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?ke.call(arguments,2):r),Ce(e.type,s,n||e.key,o||e.ref,null)}function Ft(e,t){var r={__c:t="__cC"+Nt++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&o.some(function(s){s.__e=!0,Je(s)})},this.sub=function(l){o.push(l);var s=l.componentWillUnmount;l.componentWillUnmount=function(){o.splice(o.indexOf(l),1),s&&s.call(l)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ke=Lt.slice,C={__e:function(e,t,r,n){for(var o,i,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),l=o.__d),l)return o.__E=o}catch(s){e=s}throw e}},Dt=0,W.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},r),this.props)),e&&J(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},W.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},W.prototype.render=z,ae=[],Rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qe=function(e,t){return e.__v.__b-t.__v.__b},Ne.__r=0,Nt=0;var ee,O,rt,Wt,ge=0,Zt=[],Me=[],Gt=C.__b,Kt=C.__r,Yt=C.diffed,Qt=C.__c,Jt=C.unmount;function se(e,t){C.__h&&C.__h(O,e,ge||t),ge=0;var r=O.__H||(O.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Me}),r.__[e]}function A(e){return ge=1,nt(nr,e)}function nt(e,t,r){var n=se(ee++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):nr(void 0,t),function(s){var a=n.__N?n.__N[0]:n.__[0],u=n.t(a,s);a!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=O,!O.u)){var o=function(s,a,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,s,a,u);var d=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!i||i.call(this,s,a,u))};O.u=!0;var i=O.shouldComponentUpdate,l=O.componentWillUpdate;O.componentWillUpdate=function(s,a,u){if(this.__e){var p=i;i=void 0,o(s,a,u),i=p}l&&l.call(this,s,a,u)},O.shouldComponentUpdate=o}return n.__N||n.__}function q(e,t){var r=se(ee++,3);!C.__s&&at(r.__H,t)&&(r.__=e,r.i=t,O.__H.__h.push(r))}function Ee(e,t){var r=se(ee++,4);!C.__s&&at(r.__H,t)&&(r.__=e,r.i=t,O.__h.push(r))}function K(e){return ge=5,Se(function(){return{current:e}},[])}function Xt(e,t,r){ge=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function Se(e,t){var r=se(ee++,7);return at(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ot(e,t){return ge=8,Se(function(){return e},t)}function er(e){var t=O.context[e.__c],r=se(ee++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(O)),t.props.value):e.__}function it(e,t){C.useDebugValue&&C.useDebugValue(t?t(e):e)}function Gn(e){var t=se(ee++,10),r=A();return t.__=e,O.componentDidCatch||(O.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function tr(){var e=se(ee++,11);if(!e.__){for(var t=O.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Kn(){for(var e;e=Zt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Oe),e.__H.__h.forEach(lt),e.__H.__h=[]}catch(t){e.__H.__h=[],C.__e(t,e.__v)}}C.__b=function(e){O=null,Gt&&Gt(e)},C.__r=function(e){Kt&&Kt(e),ee=0;var t=(O=e.__c).__H;t&&(rt===O?(t.__h=[],O.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Me,r.__N=r.i=void 0})):(t.__h.forEach(Oe),t.__h.forEach(lt),t.__h=[],ee=0)),rt=O},C.diffed=function(e){Yt&&Yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Zt.push(t)!==1&&Wt===C.requestAnimationFrame||((Wt=C.requestAnimationFrame)||Yn)(Kn)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Me&&(r.__=r.__V),r.i=void 0,r.__V=Me})),rt=O=null},C.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Oe),r.__h=r.__h.filter(function(n){return!n.__||lt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],C.__e(n,r.__v)}}),Qt&&Qt(e,t)},C.unmount=function(e){Jt&&Jt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Oe(n)}catch(o){t=o}}),r.__H=void 0,t&&C.__e(t,r.__v))};var rr=typeof requestAnimationFrame=="function";function Yn(e){var t,r=function(){clearTimeout(n),rr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);rr&&(t=requestAnimationFrame(r))}function Oe(e){var t=O,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),O=t}function lt(e){var t=O;e.__c=e.__(),O=t}function at(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function nr(e,t){return typeof t=="function"?t(e):t}function or(e,t){for(var r in t)e[r]=t[r];return e}function st(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Ue(e){this.props=e}function ir(e,t){function r(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!l:st(this.props,o)}function n(o){return this.shouldComponentUpdate=r,U(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Ue.prototype=new W).isPureReactComponent=!0,Ue.prototype.shouldComponentUpdate=function(e,t){return st(this.props,e)||st(this.state,t)};var lr=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),lr&&lr(e)};var Qn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ar(e){function t(r){var n=or({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Qn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var sr=function(e,t){return e==null?null:X(X(e).map(t))},dr={map:sr,forEach:sr,count:function(e){return e?X(e).length:0},only:function(e){var t=X(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:X},Jn=C.__e;C.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Jn(e,t,r,n)};var cr=C.unmount;function ur(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=or({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ur(n,t,r)})),e}function pr(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return pr(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function je(){this.__u=0,this.t=null,this.__b=null}function mr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,r,n;function o(i){if(t||(t=e()).then(function(l){r=l.default||l},function(l){n=l}),n)throw n;if(!r)throw t;return U(r,i)}return o.displayName="Lazy",o.__f=!0,o}function _e(){this.u=null,this.o=null}C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),cr&&cr(e)},(je.prototype=new W).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=mr(n.__v),i=!1,l=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=l;var s=function(){if(!--n.__u){if(n.state.__a){var a=n.state.__a;n.__v.__k[0]=pr(a,a.__c.__P,a.__c.__O)}var u;for(n.setState({__a:n.__b=null});u=n.t.pop();)u.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(l,l)},je.prototype.componentWillUnmount=function(){this.t=[]},je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ur(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&U(z,null,e.fallback);return o&&(o.__u&=-33),[U(z,null,t.__a?null:e.children),o]};var vr=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Xn(e){return this.getChildContext=function(){return e.context},e.children}function eo(e){var t=this,r=e.i;t.componentWillUnmount=function(){fe(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),fe(U(Xn,{context:t.context},e.__v),t.l)}function fr(e,t){var r=U(eo,{__v:e,i:t});return r.containerInfo=t,r}(_e.prototype=new W).__a=function(e){var t=this,r=mr(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),vr(t,e,n)):o()};r?r(i):i()}},_e.prototype.render=function(e){this.u=null,this.o=new Map;var t=X(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},_e.prototype.componentDidUpdate=_e.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){vr(e,r,t)})};var gr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,to=/^(?: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]/,ro=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,no=/[A-Z0-9]/g,oo=typeof document<"u",io=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,r){return t.__k==null&&(t.textContent=""),fe(e,t),typeof r=="function"&&r(),e?e.__c:null}function br(e,t,r){return zt(e,t),typeof r=="function"&&r(),e?e.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(W.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var yr=C.event;function lo(){}function ao(){return this.cancelBubble}function so(){return this.defaultPrevented}C.event=function(e){return yr&&(e=yr(e)),e.persist=lo,e.isPropagationStopped=ao,e.isDefaultPrevented=so,e.nativeEvent=e};var dt,co={enumerable:!1,configurable:!0,get:function(){return this.class}},xr=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var l=r[i];if(!(i==="value"&&"defaultValue"in r&&l==null||oo&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&l===!0?l="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||io(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":ro.test(i)?i=s:n.indexOf("-")===-1&&to.test(i)?i=i.replace(no,"-$&").toLowerCase():l===null&&(l=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=l}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=X(r.children).forEach(function(a){a.props.selected=o.value.indexOf(a.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=X(r.children).forEach(function(a){a.props.selected=o.multiple?o.defaultValue.indexOf(a.props.value)!=-1:o.defaultValue==a.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",co)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=gr,xr&&xr(e)};var kr=C.__r;C.__r=function(e){kr&&kr(e),dt=e.__c};var wr=C.diffed;C.diffed=function(e){wr&&wr(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),dt=null};var Cr={ReactCurrentDispatcher:{current:{readContext:function(e){return dt.__n[e.__c].props.value}}}},uo="17.0.2";function Er(e){return U.bind(null,e)}function Ie(e){return!!e&&e.$$typeof===gr}function Sr(e){return Ie(e)&&e.type===z}function jr(e){return Ie(e)?Zn.apply(null,arguments):e}function Ir(e){return!!e.__k&&(fe(null,e),!0)}function Tr(e){return e&&(e.base||e.nodeType===1&&e)||null}var Dr=function(e,t){return e(t)},Pr=function(e,t){return e(t)},Rr=z;function ct(e){e()}function Nr(e){return e}function Lr(){return[!1,ct]}var Mr=Ee,Or=Ie;function Ur(e,t){var r=t(),n=A({h:{__:r,v:t}}),o=n[0].h,i=n[1];return Ee(function(){o.__=r,o.v=t,ut(o)&&i({h:o})},[e,r,t]),q(function(){return ut(o)&&i({h:o}),e(function(){ut(o)&&i({h:o})})},[e]),r}function ut(e){var t,r,n=e.v,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var po={useState:A,useId:tr,useReducer:nt,useEffect:q,useLayoutEffect:Ee,useInsertionEffect:Mr,useTransition:Lr,useDeferredValue:Nr,useSyncExternalStore:Ur,startTransition:ct,useRef:K,useImperativeHandle:Xt,useMemo:Se,useCallback:ot,useContext:er,useDebugValue:it,version:"17.0.2",Children:dr,render:_r,hydrate:br,unmountComponentAtNode:Ir,createPortal:fr,createElement:U,createContext:Ft,createFactory:Er,cloneElement:jr,createRef:Ot,Fragment:z,isValidElement:Ie,isElement:Or,isFragment:Sr,findDOMNode:Tr,Component:W,PureComponent:Ue,memo:ir,forwardRef:ar,flushSync:Pr,unstable_batchedUpdates:Dr,StrictMode:Rr,Suspense:je,SuspenseList:_e,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Cr};const mo=Object.freeze(Object.defineProperty({__proto__:null,Children:dr,Component:W,Fragment:z,PureComponent:Ue,StrictMode:Rr,Suspense:je,SuspenseList:_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Cr,cloneElement:jr,createContext:Ft,createElement:U,createFactory:Er,createPortal:fr,createRef:Ot,default:po,findDOMNode:Tr,flushSync:Pr,forwardRef:ar,hydrate:br,isElement:Or,isFragment:Sr,isValidElement:Ie,lazy:hr,memo:ir,render:_r,startTransition:ct,unmountComponentAtNode:Ir,unstable_batchedUpdates:Dr,useCallback:ot,useContext:er,useDebugValue:it,useDeferredValue:Nr,useEffect:q,useErrorBoundary:Gn,useId:tr,useImperativeHandle:Xt,useInsertionEffect:Mr,useLayoutEffect:Ee,useMemo:Se,useReducer:nt,useRef:K,useState:A,useSyncExternalStore:Ur,useTransition:Lr,version:uo},Symbol.toStringTag,{value:"Module"})),Hr=e=>{let t;const r=new Set,n=(l,s)=>{const a=typeof l=="function"?l(t):l;if(!Object.is(a,t)){const u=t;t=s??typeof a!="object"?a:Object.assign({},t,a),r.forEach(p=>p(t,u))}},o=()=>t,i={setState:n,getState:o,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>r.clear()};return t=e(n,o,i),i},ho=e=>e?Hr(e):Hr;function vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Ar={exports:{}},Br={};const Vr=fo(mo);var qr={exports:{}},$r={};/**
1
+ import{C as It,A as he,a as On,D as Un,E as Hn,b as xe,d as Ze,r as An,o as Bn}from"./core-IYeRexvz.js";import{i as Ge,D as Tt,f as De,j as Pe,S as oe,s as Ke,u as Vn,v as Ye}from"./metricsReporter-ChJRb1ed.js";var ke,C,Dt,ae,Pt,Rt,Qe,Nt,we={},Lt=[],qn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function J(e,t){for(var r in t)e[r]=t[r];return e}function Mt(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,r){var n,o,i,l={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?ke.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return Ce(e,l,n,o,null)}function Ce(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Dt,__i:-1,__u:0};return o==null&&C.vnode!=null&&C.vnode(i),i}function Ot(){return{current:null}}function z(e){return e.children}function W(e,t){this.props=e,this.context=t}function ve(e,t){if(t==null)return e.__?ve(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ve(e):null}function Ut(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ut(e)}}function Je(e){(!e.__d&&(e.__d=!0)&&ae.push(e)&&!Ne.__r++||Pt!==C.debounceRendering)&&((Pt=C.debounceRendering)||Rt)(Ne)}function Ne(){var e,t,r,n,o,i,l,s,a;for(ae.sort(Qe);e=ae.shift();)e.__d&&(t=ae.length,n=void 0,i=(o=(r=e).__v).__e,s=[],a=[],(l=r.__P)&&((n=J({},o)).__v=o.__v+1,C.vnode&&C.vnode(n),Xe(l,n,o,r.__n,l.ownerSVGElement!==void 0,32&o.__u?[i]:null,s,i??ve(o),!!(32&o.__u),a),n.__.__k[n.__i]=n,$t(s,n,a),n.__e!=i&&Ut(n)),ae.length>t&&ae.sort(Qe));Ne.__r=0}function Ht(e,t,r,n,o,i,l,s,a,u,p){var d,h,m,v,f,_=n&&n.__k||Lt,b=t.length;for(r.__d=a,$n(r,t,_),a=r.__d,d=0;d<b;d++)(m=r.__k[d])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?we:_[m.__i]||we,m.__i=d,Xe(e,m,h,o,i,l,s,a,u,p),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&et(h.ref,null,m),p.push(m.ref,m.__c||v,m)),f==null&&v!=null&&(f=v),65536&m.__u||h.__k===m.__k?a=At(m,a,e):typeof m.type=="function"&&m.__d!==void 0?a=m.__d:v&&(a=v.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=a,r.__e=f}function $n(e,t,r){var n,o,i,l,s,a=t.length,u=r.length,p=u,d=0;for(e.__k=[],n=0;n<a;n++)(o=e.__k[n]=(o=t[n])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ce(null,o,null,null,o):Re(o)?Ce(z,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ce(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,s=zn(o,r,l=n+d,p),o.__i=s,i=null,s!==-1&&(p--,(i=r[s])&&(i.__u|=131072)),i==null||i.__v===null?(s==-1&&d--,typeof o.type!="function"&&(o.__u|=65536)):s!==l&&(s===l+1?d++:s>l?p>a-l?d+=s-l:d--:d=s<l&&s==l-1?s-l:0,s!==n+d&&(o.__u|=65536))):(i=r[n])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i,!1),r[n]=null,p--);if(p)for(n=0;n<u;n++)(i=r[n])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function At(e,t,r){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=At(n[o],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function X(e,t){return t=t||[],e==null||typeof e=="boolean"||(Re(e)?e.some(function(r){X(r,t)}):t.push(e)),t}function zn(e,t,r,n){var o=e.key,i=e.type,l=r-1,s=r+1,a=t[r];if(a===null||a&&o==a.key&&i===a.type)return r;if(n>(a!=null&&!(131072&a.__u)?1:0))for(;l>=0||s<t.length;){if(l>=0){if((a=t[l])&&!(131072&a.__u)&&o==a.key&&i===a.type)return l;l--}if(s<t.length){if((a=t[s])&&!(131072&a.__u)&&o==a.key&&i===a.type)return s;s++}}return-1}function Bt(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||qn.test(t)?r:r+"px"}function Le(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Bt(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Bt(e.style,t,r[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]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,i?qt:Vt,i)):e.removeEventListener(t,i?qt:Vt,i);else{if(o)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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Vt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(C.event?C.event(e):e)}function qt(e){return this.l[e.type+!0](C.event?C.event(e):e)}function Xe(e,t,r,n,o,i,l,s,a,u){var p,d,h,m,v,f,_,b,k,x,w,E,j,P,S,g=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(a=!!(32&r.__u),i=[s=t.__e=r.__e]),(p=C.__b)&&p(t);e:if(typeof g=="function")try{if(b=t.props,k=(p=g.contextType)&&n[p.__c],x=p?k?k.props.value:p.__:n,r.__c?_=(d=t.__c=r.__c).__=d.__E:("prototype"in g&&g.prototype.render?t.__c=d=new g(b,x):(t.__c=d=new W(b,x),d.constructor=g,d.render=Wn),k&&k.sub(d),d.props=b,d.state||(d.state={}),d.context=x,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),g.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=J({},d.__s)),J(d.__s,g.getDerivedStateFromProps(b,d.__s))),m=d.props,v=d.state,d.__v=t,h)g.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g.getDerivedStateFromProps==null&&b!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(b,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(b,d.__s,x)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=b,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(y){y&&(y.__=t)}),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&l.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(b,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,v,f)})}if(d.context=x,d.props=b,d.__P=e,d.__e=!1,E=C.__r,j=0,"prototype"in g&&g.prototype.render){for(d.state=d.__s,d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),P=0;P<d._sb.length;P++)d.__h.push(d._sb[P]);d._sb=[]}else do d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++j<25);d.state=d.__s,d.getChildContext!=null&&(n=J(J({},n),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(f=d.getSnapshotBeforeUpdate(m,v)),Ht(e,Re(S=p!=null&&p.type===z&&p.key==null?p.props.children:p)?S:[S],t,r,n,o,i,l,s,a,u),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),_&&(d.__E=d.__=null)}catch(y){t.__v=null,a||i!=null?(t.__e=s,t.__u|=a?160:32,i[i.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),C.__e(y,t,r)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Fn(r.__e,t,r,n,o,i,l,a,u);(p=C.diffed)&&p(t)}function $t(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)et(r[n],r[++n],r[++n]);C.__c&&C.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){C.__e(i,o.__v)}})}function Fn(e,t,r,n,o,i,l,s,a){var u,p,d,h,m,v,f,_=r.props,b=t.props,k=t.type;if(k==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!k&&(k?m.localName===k:m.nodeType===3)){e=m,i[u]=null;break}}if(e==null){if(k===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,b.is&&b),i=null,s=!1}if(k===null)_===b||s&&e.data===b||(e.data=b);else{if(i=i&&ke.call(e.childNodes),_=r.props||we,!s&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=m:u==="key"||u in b||Le(e,u,null,m,o));for(u in b)m=b[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?v=m:u=="checked"?f=m:u==="key"||s&&typeof m!="function"||_[u]===m||Le(e,u,m,_[u],o);if(p)s||d&&(p.__html===d.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ht(e,Re(h)?h:[h],t,r,n,o&&k!=="foreignObject",i,l,i?i[0]:r.__k&&ve(r,0),s,a),i!=null)for(u=i.length;u--;)i[u]!=null&&Mt(i[u]);s||(u="value",v!==void 0&&(v!==e[u]||k==="progress"&&!v||k==="option"&&v!==_[u])&&Le(e,u,v,_[u],!1),u="checked",f!==void 0&&f!==e[u]&&Le(e,u,f,_[u],!1))}return e}function et(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){C.__e(n,r)}}function tt(e,t,r){var n,o;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||et(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&tt(n[o],t,r||typeof e.type!="function");r||e.__e==null||Mt(e.__e),e.__=e.__e=e.__d=void 0}function Wn(e,t,r){return this.constructor(e,r)}function fe(e,t,r){var n,o,i,l;C.__&&C.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],l=[],Xe(t,e=(!n&&r||t).__k=U(z,null,[e]),o||we,we,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?ke.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,l),$t(i,e,l)}function zt(e,t){fe(e,t,zt)}function Zn(e,t,r){var n,o,i,l,s=J({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&l!==void 0?l[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?ke.call(arguments,2):r),Ce(e.type,s,n||e.key,o||e.ref,null)}function Ft(e,t){var r={__c:t="__cC"+Nt++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&o.some(function(s){s.__e=!0,Je(s)})},this.sub=function(l){o.push(l);var s=l.componentWillUnmount;l.componentWillUnmount=function(){o.splice(o.indexOf(l),1),s&&s.call(l)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ke=Lt.slice,C={__e:function(e,t,r,n){for(var o,i,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),l=o.__d),l)return o.__E=o}catch(s){e=s}throw e}},Dt=0,W.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},r),this.props)),e&&J(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},W.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},W.prototype.render=z,ae=[],Rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qe=function(e,t){return e.__v.__b-t.__v.__b},Ne.__r=0,Nt=0;var ee,O,rt,Wt,ge=0,Zt=[],Me=[],Gt=C.__b,Kt=C.__r,Yt=C.diffed,Qt=C.__c,Jt=C.unmount;function se(e,t){C.__h&&C.__h(O,e,ge||t),ge=0;var r=O.__H||(O.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Me}),r.__[e]}function A(e){return ge=1,nt(nr,e)}function nt(e,t,r){var n=se(ee++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):nr(void 0,t),function(s){var a=n.__N?n.__N[0]:n.__[0],u=n.t(a,s);a!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=O,!O.u)){var o=function(s,a,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,s,a,u);var d=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!i||i.call(this,s,a,u))};O.u=!0;var i=O.shouldComponentUpdate,l=O.componentWillUpdate;O.componentWillUpdate=function(s,a,u){if(this.__e){var p=i;i=void 0,o(s,a,u),i=p}l&&l.call(this,s,a,u)},O.shouldComponentUpdate=o}return n.__N||n.__}function q(e,t){var r=se(ee++,3);!C.__s&&at(r.__H,t)&&(r.__=e,r.i=t,O.__H.__h.push(r))}function Ee(e,t){var r=se(ee++,4);!C.__s&&at(r.__H,t)&&(r.__=e,r.i=t,O.__h.push(r))}function K(e){return ge=5,Se(function(){return{current:e}},[])}function Xt(e,t,r){ge=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function Se(e,t){var r=se(ee++,7);return at(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ot(e,t){return ge=8,Se(function(){return e},t)}function er(e){var t=O.context[e.__c],r=se(ee++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(O)),t.props.value):e.__}function it(e,t){C.useDebugValue&&C.useDebugValue(t?t(e):e)}function Gn(e){var t=se(ee++,10),r=A();return t.__=e,O.componentDidCatch||(O.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function tr(){var e=se(ee++,11);if(!e.__){for(var t=O.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Kn(){for(var e;e=Zt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Oe),e.__H.__h.forEach(lt),e.__H.__h=[]}catch(t){e.__H.__h=[],C.__e(t,e.__v)}}C.__b=function(e){O=null,Gt&&Gt(e)},C.__r=function(e){Kt&&Kt(e),ee=0;var t=(O=e.__c).__H;t&&(rt===O?(t.__h=[],O.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Me,r.__N=r.i=void 0})):(t.__h.forEach(Oe),t.__h.forEach(lt),t.__h=[],ee=0)),rt=O},C.diffed=function(e){Yt&&Yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Zt.push(t)!==1&&Wt===C.requestAnimationFrame||((Wt=C.requestAnimationFrame)||Yn)(Kn)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Me&&(r.__=r.__V),r.i=void 0,r.__V=Me})),rt=O=null},C.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Oe),r.__h=r.__h.filter(function(n){return!n.__||lt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],C.__e(n,r.__v)}}),Qt&&Qt(e,t)},C.unmount=function(e){Jt&&Jt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Oe(n)}catch(o){t=o}}),r.__H=void 0,t&&C.__e(t,r.__v))};var rr=typeof requestAnimationFrame=="function";function Yn(e){var t,r=function(){clearTimeout(n),rr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);rr&&(t=requestAnimationFrame(r))}function Oe(e){var t=O,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),O=t}function lt(e){var t=O;e.__c=e.__(),O=t}function at(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function nr(e,t){return typeof t=="function"?t(e):t}function or(e,t){for(var r in t)e[r]=t[r];return e}function st(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Ue(e){this.props=e}function ir(e,t){function r(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!l:st(this.props,o)}function n(o){return this.shouldComponentUpdate=r,U(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Ue.prototype=new W).isPureReactComponent=!0,Ue.prototype.shouldComponentUpdate=function(e,t){return st(this.props,e)||st(this.state,t)};var lr=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),lr&&lr(e)};var Qn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ar(e){function t(r){var n=or({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Qn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var sr=function(e,t){return e==null?null:X(X(e).map(t))},dr={map:sr,forEach:sr,count:function(e){return e?X(e).length:0},only:function(e){var t=X(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:X},Jn=C.__e;C.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Jn(e,t,r,n)};var cr=C.unmount;function ur(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=or({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ur(n,t,r)})),e}function pr(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return pr(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function je(){this.__u=0,this.t=null,this.__b=null}function mr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,r,n;function o(i){if(t||(t=e()).then(function(l){r=l.default||l},function(l){n=l}),n)throw n;if(!r)throw t;return U(r,i)}return o.displayName="Lazy",o.__f=!0,o}function _e(){this.u=null,this.o=null}C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),cr&&cr(e)},(je.prototype=new W).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=mr(n.__v),i=!1,l=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=l;var s=function(){if(!--n.__u){if(n.state.__a){var a=n.state.__a;n.__v.__k[0]=pr(a,a.__c.__P,a.__c.__O)}var u;for(n.setState({__a:n.__b=null});u=n.t.pop();)u.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(l,l)},je.prototype.componentWillUnmount=function(){this.t=[]},je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ur(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&U(z,null,e.fallback);return o&&(o.__u&=-33),[U(z,null,t.__a?null:e.children),o]};var vr=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Xn(e){return this.getChildContext=function(){return e.context},e.children}function eo(e){var t=this,r=e.i;t.componentWillUnmount=function(){fe(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),fe(U(Xn,{context:t.context},e.__v),t.l)}function fr(e,t){var r=U(eo,{__v:e,i:t});return r.containerInfo=t,r}(_e.prototype=new W).__a=function(e){var t=this,r=mr(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),vr(t,e,n)):o()};r?r(i):i()}},_e.prototype.render=function(e){this.u=null,this.o=new Map;var t=X(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},_e.prototype.componentDidUpdate=_e.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){vr(e,r,t)})};var gr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,to=/^(?: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]/,ro=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,no=/[A-Z0-9]/g,oo=typeof document<"u",io=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,r){return t.__k==null&&(t.textContent=""),fe(e,t),typeof r=="function"&&r(),e?e.__c:null}function br(e,t,r){return zt(e,t),typeof r=="function"&&r(),e?e.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(W.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var yr=C.event;function lo(){}function ao(){return this.cancelBubble}function so(){return this.defaultPrevented}C.event=function(e){return yr&&(e=yr(e)),e.persist=lo,e.isPropagationStopped=ao,e.isDefaultPrevented=so,e.nativeEvent=e};var dt,co={enumerable:!1,configurable:!0,get:function(){return this.class}},xr=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var l=r[i];if(!(i==="value"&&"defaultValue"in r&&l==null||oo&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&l===!0?l="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||io(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":ro.test(i)?i=s:n.indexOf("-")===-1&&to.test(i)?i=i.replace(no,"-$&").toLowerCase():l===null&&(l=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=l}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=X(r.children).forEach(function(a){a.props.selected=o.value.indexOf(a.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=X(r.children).forEach(function(a){a.props.selected=o.multiple?o.defaultValue.indexOf(a.props.value)!=-1:o.defaultValue==a.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",co)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=gr,xr&&xr(e)};var kr=C.__r;C.__r=function(e){kr&&kr(e),dt=e.__c};var wr=C.diffed;C.diffed=function(e){wr&&wr(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),dt=null};var Cr={ReactCurrentDispatcher:{current:{readContext:function(e){return dt.__n[e.__c].props.value}}}},uo="17.0.2";function Er(e){return U.bind(null,e)}function Ie(e){return!!e&&e.$$typeof===gr}function Sr(e){return Ie(e)&&e.type===z}function jr(e){return Ie(e)?Zn.apply(null,arguments):e}function Ir(e){return!!e.__k&&(fe(null,e),!0)}function Tr(e){return e&&(e.base||e.nodeType===1&&e)||null}var Dr=function(e,t){return e(t)},Pr=function(e,t){return e(t)},Rr=z;function ct(e){e()}function Nr(e){return e}function Lr(){return[!1,ct]}var Mr=Ee,Or=Ie;function Ur(e,t){var r=t(),n=A({h:{__:r,v:t}}),o=n[0].h,i=n[1];return Ee(function(){o.__=r,o.v=t,ut(o)&&i({h:o})},[e,r,t]),q(function(){return ut(o)&&i({h:o}),e(function(){ut(o)&&i({h:o})})},[e]),r}function ut(e){var t,r,n=e.v,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var po={useState:A,useId:tr,useReducer:nt,useEffect:q,useLayoutEffect:Ee,useInsertionEffect:Mr,useTransition:Lr,useDeferredValue:Nr,useSyncExternalStore:Ur,startTransition:ct,useRef:K,useImperativeHandle:Xt,useMemo:Se,useCallback:ot,useContext:er,useDebugValue:it,version:"17.0.2",Children:dr,render:_r,hydrate:br,unmountComponentAtNode:Ir,createPortal:fr,createElement:U,createContext:Ft,createFactory:Er,cloneElement:jr,createRef:Ot,Fragment:z,isValidElement:Ie,isElement:Or,isFragment:Sr,findDOMNode:Tr,Component:W,PureComponent:Ue,memo:ir,forwardRef:ar,flushSync:Pr,unstable_batchedUpdates:Dr,StrictMode:Rr,Suspense:je,SuspenseList:_e,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Cr};const mo=Object.freeze(Object.defineProperty({__proto__:null,Children:dr,Component:W,Fragment:z,PureComponent:Ue,StrictMode:Rr,Suspense:je,SuspenseList:_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Cr,cloneElement:jr,createContext:Ft,createElement:U,createFactory:Er,createPortal:fr,createRef:Ot,default:po,findDOMNode:Tr,flushSync:Pr,forwardRef:ar,hydrate:br,isElement:Or,isFragment:Sr,isValidElement:Ie,lazy:hr,memo:ir,render:_r,startTransition:ct,unmountComponentAtNode:Ir,unstable_batchedUpdates:Dr,useCallback:ot,useContext:er,useDebugValue:it,useDeferredValue:Nr,useEffect:q,useErrorBoundary:Gn,useId:tr,useImperativeHandle:Xt,useInsertionEffect:Mr,useLayoutEffect:Ee,useMemo:Se,useReducer:nt,useRef:K,useState:A,useSyncExternalStore:Ur,useTransition:Lr,version:uo},Symbol.toStringTag,{value:"Module"})),Hr=e=>{let t;const r=new Set,n=(l,s)=>{const a=typeof l=="function"?l(t):l;if(!Object.is(a,t)){const u=t;t=s??typeof a!="object"?a:Object.assign({},t,a),r.forEach(p=>p(t,u))}},o=()=>t,i={setState:n,getState:o,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>r.clear()};return t=e(n,o,i),i},ho=e=>e?Hr(e):Hr;function vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Ar={exports:{}},Br={};const Vr=fo(mo);var qr={exports:{}},$r={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.min.js
4
4
  *
@@ -682,4 +682,4 @@ span.ul-button-text {
682
682
  .vjs-poster {
683
683
  background-size: cover;
684
684
  }
685
- `,Ii=e=>{const t=D.document.createElement("div");return t.className="ul-video-player-loading",t.id=kt(e),["first","second","third","fourth"].map(r=>{const n=D.document.createElement("div");n.className=r,t.appendChild(n)}),t},kt=e=>e+"-loading-spiner",V="hidden",mn=".m3u8",wt="questionId",Ct="ul-video-recorder-camera-off-button",Et="ul-recording-in-session",Ti=[{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`}],hn=[{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:ji}],vn="-video-player",fn="-secondary-video-player",gn="-video-recorder";let Q,_n;const ie=async({event:e,apiBase:t,headers:r,visitorId:n,envId:o,metadata:i})=>{const l=D.document.documentElement;if(!n||!o)return;const s={event:`SDK - ${e}`,visitorId:n,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${n}/analytics`,{method:"POST",cache:"no-cache",headers:r,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},re=async(e,t,r,n,o,i)=>{ie({event:`Video Error ${t}`,apiBase:r,headers:n,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const l=D.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:navigator.language},a={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:o,envId:i};(await fetch(`${r}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...n,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Di=(e,{type:t,content:r})=>new Promise(function(n,o){let i;t==="script"?(i=D.document.createElement("script"),i.src=r):t==="link"?(i=D.document.createElement("link"),i.rel="stylesheet",i.href=r,i.type="text/css"):(i=D.document.createElement("style"),i.innerHTML=r),i.onload=function(){n(r)},i.onerror=function(){o(r)},i.async=!1,i.id=btoa(r),e.appendChild(i)}),bn=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((r,n)=>(r.push(Di(D.document.head,n)),r),[])).then(()=>{D.videojs=D.document.defaultView.videojs,t&&t()}).catch(function(r){console.log(r+" failed to load")})},yn=(e,t,r)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=V;else if(t==="success")e.style.visibility=V,e.innerHTML="Upload succeeded!";else{const n=Math.round(parseFloat(r));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${n}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${n}%, #FCFCFD ${n}%, #FCFCFD 100%)`}},St=(e,t)=>{const r=D.videojs(e.id());return r?.payload[t]},Pi=(e,t,r,n,o)=>{const{surveyId:i,responseGroupUid:l,visitorId:s,envId:a}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),r&&r(L.ERROR,{type:L.PERMISSION_DENIED}),ie({event:"Video Permission Denied",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{questionId:St(e,wt),responseGroupUid:l,surveyId:i}})):(r&&r(L.ERROR,{type:L.OTHER}),re(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,o,s,a))}),e.on("error",function(u,p){re(p||e.error(),"recorderError",t,o,s,a)}),e.on("startRecord",function(u,p){n(e.uploadProgressLabel,"none"),ie({event:"Video Record Start",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{questionId:St(e,wt),responseGroupUid:l,surveyId:i}})}),e.on("finishRecord",async function(){n(e.uploadProgressLabel,"start",0);const u=St(e,wt);if(!i){const v="internal error: missing fields in payload";return r&&r(L.ERROR,{type:L.OTHER}),re(new Error(v),"finishRecord",t,o,s,a),null}e.record().stopDevice();const p=e.cameraOff?L.MEDIA_TYPE_AUDIO:L.MEDIA_TYPE_VIDEO,d=Ye();ie({event:"Video Record Finish",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:p,mediaRecordingUid:d};u&&(h.questionId=u),l&&(h.responseGroupUid=l),s&&(h.visitorId=s);const m=await(async()=>{const v=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(v.ok){const f=await v.json();return r&&r(L.UPLOAD_STARTED,{[L.UPLOAD_ID]:f.upload.id,[L.MEDIA_TYPE]:p,[L.MEDIA_RECORDING_UID]:d}),f.upload.url}else return r&&r(L.ERROR,{type:L.OTHER,response:v}),re(new Error("failed to get upload response with url"),"finishRecord",t,o,s,a),null})();m&&(Q=D.document.defaultView.UpChunk.createUpload({endpoint:m,file:new D.document.defaultView.File([e.recordedData],`recording ${p} ${Date.now()}`),chunkSize:5120}),Q.startTime=Date.now(),ie({event:"Video Upload Start",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p,url:m}}),Q.on("error",v=>{n(e.uploadProgressLabel,"none"),r&&r(L.UPLOAD_FINISHED,{[L.MEDIA_RECORDING_UID]:d}),re(v,"finishRecord",t,o,s,a)}),Q.on("progress",v=>{r&&r(L.UPLOAD_PROGRESS,{[L.MEDIA_RECORDING_UID]:d,[L.UPLOAD_PROGRESS_PCT]:v.detail}),n(e.uploadProgressLabel,"progress",v.detail)}),Q.on("success",()=>{n(e.uploadProgressLabel,"success"),r&&r(L.UPLOAD_FINISHED,{[L.MEDIA_RECORDING_UID]:d}),ie({event:"Video Upload Success",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p,url:m,elapsedMs:Q.startTime&&Date.now()-Q.startTime}})}))})},xn=(e,t)=>{const r=new(D.videojs.getComponent("Component"))(e);return r.addClass("ul-buttons-panel"),t.map(n=>{r.addChild(n)}),Ri(r),r},Ri=e=>{e.children().forEach(t=>{if(G[t.name_]){const r=$e(G[t.name_],`ul-${G[t.name_]}`);t.el_.appendChild(r)}})},$e=(e,t="")=>{const r=D.document.createElement("span");return r.className="ul-button-text",r.innerHTML=e,r.id=t,r},kn=(e,t,r,n,o=!1,i)=>{e.addClass("ul-video-player");const l=new(D.videojs.getComponent("Component"))(e);l.addClass("ul-control-panel"),e.progressBar=l.addChild("ProgressControl"),r&&e.src(r),e.audioPlayerPlaceholder=new(D.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=r&&r.src?Bi(r.src):null;r&&(o||!s)?(e.children()[0].classList.add("vjs-hidden"),D.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),D.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!o&&r&&!s&&Mi(e),i?.play()}),e.on("pause",()=>{i?.pause()}),e.on("seeked",()=>{i?.currentTime(e.currentTime())}),e.on("ratechange",()=>{i?.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),l.addChild(t),e.addChild(l),n&&n(e)},Ni=(e,t,r)=>{e.addClass(`ul${fn}`);const n=new(D.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(n),r&&r(e)},Li=(e,t,r,n,o,i,l,s=!1)=>{_n=Date.now();const a=ze(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(!a)return;a.payload=r;const{surveyId:u,questionId:p,responseGroupUid:d,visitorId:h,envId:m}=r;let v;const f=y=>{const R=Ct,T=Ct+"-audio-only";yn(a.uploadProgressLabel,"none"),Q&&Q.startTime>=_n&&Q.abort();const M=D.document.getElementById("ul-camera-button");y?(a.children()[0].classList.add("vjs-hidden"),x.removeClass(R),x.addClass(T),M.innerHTML=G.TurnOnCamera,a.audioPlayerPlaceholder.removeClass("vjs-hidden"),v?.getTracks().forEach($=>{$.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then($=>{v=$,$.getVideoTracks().forEach(ne=>{ne.enabled=!1}),a.record().onDeviceReady($)}).catch(a.record().onDeviceError.bind(a.record()))):(v?.getVideoTracks().forEach($=>{$.enabled=!0}),a.children()[0].classList.remove("vjs-hidden"),a.record().getDevice(),x.removeClass(T),x.addClass(R),M.innerHTML=G.TurnOffCamera,a.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{_.hasClass(V)||(ie({event:"Video Delete Button Clicked",apiBase:n,headers:l,visitorId:h,envId:m,metadata:{questionId:p,responseGroupUid:d,surveyId:u}}),f(a.cameraOff),o(L.DELETE,{}),x.removeClass(V),_.addClass(V))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild($e(G.DeleteButton,"ul-delete-button"));const b=D.document.getElementById(t),k=()=>{b.classList.contains("vjs-fullscreen")&&a.cameraOff?b.style.display="table":b.style.display="flex"};k();const x=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{a.record().isRecording()||(a.cameraOff=!a.cameraOff,ie({event:"Video Camera Button Clicked",apiBase:n,headers:l,visitorId:r.visitorId,envId:r.envId,metadata:{questionId:p,responseGroupUid:d,surveyId:u,cameraOff:a.cameraOff}}),f(a.cameraOff),!_.hasClass(V)&&_.addClass(V),o(L.DELETE,{}),k())}});x.addClass(Ct),x.el_.appendChild($e(G.TurnOffCamera,"ul-camera-button"));const w=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{const y=D.document.getElementById("ul-recorder-toggle");if(a.record().isRecording())a.record().stop(),y&&(y.innerHTML=G.RecordButton),w.removeClass(Et),_.removeClass(V);else{const R=D.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),y&&(y.innerHTML=G.RecordButton),f(a.cameraOff),o(L.DELETE,{}),x.removeClass(V),_.addClass(V),w.removeClass(Et),P.show();else{w.addClass(Et),P.hide(),x.addClass(V),_.addClass(V),y&&(y.innerHTML=G.StopButton);const T=D.document.createElement("div");T.id="ul-recording-countdown-screen",b.insertBefore(T,b.children[1]),T.style.height=`${b.offsetHeight}px`,wn(a,3)}}}});w.addClass("ul-video-recorder-toggle-button"),w.el_.appendChild($e(G.RecordButton,"ul-recorder-toggle"));const E=D.document.createElement("p");E.style.visibility="hidden",E.className="ul-upload-progress-label",e.appendChild(E),a.uploadProgressLabel=E;const j=xn(a,[_,x,"PlayToggle",w,"FullscreenToggle"]),P=j.children().find(y=>y.name_==="FullscreenToggle");P.hasClass("vjs-disabled")&&P.hide();const S=j.children().find(y=>y.name_==="PlayToggle");S.hide(),_.addClass(V),kn(a,j,i,!1,s),a.on("stopRecord",()=>{w.hide(),S.show(),P.show(),_.removeClass(V)}),a.on("deviceReady",()=>{w.show(),S.hide(),_.addClass(V)}),Pi(a,n,o,yn,l);const g=[{name:"microphone"}];!a.cameraOff&&g.push({name:"camera"}),Promise.all(g.map(y=>{var R;return(R=navigator?.permissions)==null?void 0:R.query(y)})).then(y=>{y.reduce((R,T)=>R&T.state==="granted",!0)&&a&&(a.deviceButton&&a.deviceButton.hide(),a.record().getDevice())}).catch(y=>{})},wn=(e,t=3)=>{const r=D.document.getElementById("ul-recording-countdown-screen");r&&t===0?(r.remove(),e.record().start()):r&&(r.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{wn(e,t-1)},1e3))},Cn=e=>{const t=D.document.createElement("div");return t.className="ul-video-container",t.appendChild(Ii(e)),t},jt=(e,t)=>{const r=D.document.createElement("video");r.id=e,r.className="video-js vjs-default-skin ul-video-player-video";const n=D.document.createElement("p");n.className="vjs-no-js",n.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=D.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",n.appendChild(o),r.appendChild(n),t.appendChild(r),t},Mi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),D.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},ze=(e,t)=>D.document.getElementById(e)?t?D.videojs(e,t):D.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Oi=(e,t,r,n=!1,o="https://api.sprig.com",i=document,l=null,s=null)=>{D.document=i;const a=e+vn,u=Cn(a);return D.document.addEventListener("securitypolicyviolation",p=>{re(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),bn(hn,()=>{D.document.getElementById(kt(a)).remove(),jt(a,u);const p={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+fn;jt(d,u);const h=ze(a,p),m=ze(d,{muted:!0,...p});if(!h||!m)return;Ni(m,l,s),l||m.addClass(V);const v=xn(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=v.children().find(_=>_.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),kn(h,v,t,r,n,m)}catch(d){re(new Error(`Error when creating video player object ${d}`),"playerDeviceError",o,{});return}}),u},Ui=(e,t={},r="https://api.userleap.com",n,o,i,l=!1,s=document)=>{D.document=s;const a=e+gn,u=Cn(a);return D.document.addEventListener("securitypolicyviolation",p=>{re(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",r,i,t.visitorId,t.envId)}),bn(hn.concat(Ti),()=>{jt(a,u),D.document.getElementById(kt(a)).remove();try{Li(u,a,t,r,n,o,i,l)}catch(p){re(new Error(`Error when creating video recorder player object ${p}`),"recorderDeviceError",r,i,t.visitorId,t.envId);return}}),u},Hi=e=>{const t=e+gn;if(D.document.getElementById(t)&&D.videojs){try{if(!D.videojs(t).record().stream)return}catch{return}D.videojs(t).record().stop(),D.videojs(t).record().stopDevice()}},Ai=e=>{const t=ze(e+vn);t?.pause()},Bi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let r=t?t[1]:null;return r.includes(mn)&&(r=r.replace(mn,"")),r?`https://image.mux.com/${r}/thumbnail.jpg?time=0`:null},L={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"},G={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},pe="ul-card-video__player_recorder",Vi="ul-card-video__skip_button",qi="ul-video-interview-form",En="ul-video-btn",Te={Question:0,Answer:1},$i=({className:e,message:t,next:r,properties:n,questionId:o,type:i})=>{const{apiURL:l,envId:s,handleUploadUpdate:a,headers:u,responseGroupUid:p,surveyId:d,viewDocument:h,visitorId:m}=H(T=>({apiURL:T.apiURL,envId:T.envId,handleUploadUpdate:T.handleUploadUpdate,headers:T.headers,responseGroupUid:T.responseGroupUid,surveyId:T.surveyId,viewDocument:T.viewDocument,visitorId:T.userId})),[v,f]=A(!1),[_,b]=A(null),[k,x]=A(null),[w,E]=A(Te.Question),j=n&&n.videoUrl,P=(T,M)=>{T===L.UPLOAD_STARTED?(b(M[L.UPLOAD_ID]),x(M[L.MEDIA_RECORDING_UID]),f(!0)):T===L.DELETE?(b(null),x(null),f(!1)):T===L.UPLOAD_PROGRESS?isNaN(M[L.UPLOAD_PROGRESS_PCT])?a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],isComplete:!0}):a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],progressPct:M[L.UPLOAD_PROGRESS_PCT]}):T===L.UPLOAD_FINISHED&&a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],isComplete:!0})},S=T=>{if(T&&T.children.length===0&&!n.hideRecordedPrompt){const M=Oi(pe,{src:j,type:"application/x-mpegURL"},void 0,n.mediaType===L.MEDIA_TYPE_AUDIO,l,h);T.appendChild(M)}},g=T=>{if(T&&T.children.length===0){const M=Ui(pe,{surveyId:d,responseGroupUid:p,questionId:o,visitorId:m,envId:s},l,P,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},n.mediaType===L.MEDIA_TYPE_AUDIO,h);T.appendChild(M)}},y=T=>{T.preventDefault(),T.stopPropagation(),document.getElementById(pe)&&Hi(pe),_&&k?(a({mediaRecordingUid:k,isSubmitted:!0}),r({value:{mediaRecordingUid:k},questionId:o,type:i})):r({value:null,questionId:o,type:i})},R=()=>c(te,{defaultBody:()=>c("button",{className:`${En} ul-record-response-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),document.getElementById(pe)&&Ai(pe),E(Te.Answer)}}),properties:n});return c("form",{className:N(e,"ul-card--video","fade-in-transition"),id:qi,children:[c(Z,{message:t,properties:n}),c("div",{id:"ul-card-voice__video",children:[c("div",{children:[c("div",{id:"ul-question-player-container",style:{display:w===Te.Question?"":"none"},children:[c("div",{id:pe,ref:S}),R()]}),c("div",{style:{display:w===Te.Answer?"block":"none"},children:[c("button",{className:`${En} ul-back-question-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),E(Te.Question)},style:{display:n.hideRecordedPrompt?"none":"block"}}),c("div",{id:"ul-recorder-player-container",ref:g})]})]}),c(F,{disabled:!v,onClick:y,children:de(n)}),c("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:Vi,onClick:y,style:{display:n.required?"none":"block",...v?{display:"none"}:{}},children:gt(n)})]})]})},zi=({className:e})=>{const{uploadProgress:t}=H(i=>({uploadProgress:i.uploadProgress}));let r,n;Object.values(t).filter(i=>i.isSubmitted).length>1?(r="Your responses are processing",n="Please keep this tab open until your responses are fully processed."):(r="Your response is processing",n="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return c("div",{className:N(e,"ul-card--uploading","fade-in-transition"),children:[c("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:c("div",{className:"ul-loading-spinner",children:[c("div",{className:"first"}),c("div",{className:"second"}),c("div",{className:"third"}),c("div",{className:"fourth"})]})}),c(Z,{message:`${r} (${o}% complete)`}),c("p",{className:"ul-caption",children:n})]})},Sn=({logoOnly:e=!1,style:t={}})=>c("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&&c("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"}),c("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"}),c("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"}),c("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"}),c("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"}),c("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"})]}),Fi=()=>{const{border:e,cards:t,forceBrandedLogo:r,headers:n,index:o,marketingUrl:i,showSurveyBrand:l,slugName:s,surveyId:a,viewedCardCount:u}=H(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=K(null),d=t.filter(x=>x.type!=="uploading"&&x.type!=="thanks"),h=Wo(t,o),m=u+1,v=m/(m+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${a}${r&&"&utm_term=poweredby_pill"}`;q(()=>{p.current&&(p.current.style.width=`${v*100}%`)},[v]);const _=()=>c(z,{children:[d.length>1&&c("div",{id:"ul-progress-bar-container",children:c("div",{id:"ul-progress-bar-current",ref:p,style:{border:`1px solid ${e||"#000"}`}})}),l?c("div",{className:r?"yellow-footer-logo":"",style:{marginTop:"4px"},children:c("a",{href:f,rel:"noreferrer",target:"_blank",children:c("div",{style:{display:"flex"},children:[c(Sn,{logoOnly:!1}),r&&c(jn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),b=()=>c("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:c("div",{className:"thank-you-card-link",children:[c("div",{className:"sprig-box-logo",children:c(Sn,{logoOnly:!0,style:{margin:"auto"}})}),c("div",{children:c("p",{children:["Capture insights about your own product",c(jn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),k=t[o].type==="thanks";return c("footer",{className:`ul-footer ${n["userleap-platform"]==="link"?"ul-footer__link":""}`,style:l?{}:{marginBottom:"10px"},children:k&&r?b():_()})},jn=({style:e})=>c("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),c("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Wi=()=>{const{answers:e,border:t,cards:r,close:n,configureExitOnOverlayClick:o,destroy:i,endCard:l,eventEmitFn:s,fontFamily:a,headers:u,index:p,next:d,previewMode:h,productConfig:m,seen:v,showStripes:f,studyType:_,surveyId:b,update:k,useMobileStyling:x,viewDocument:w}=H(I=>({answers:I.answers,border:I.border,cards:I.cards,close:I.close,configureExitOnOverlayClick:I.configureExitOnOverlayClick,destroy:I.destroy,endCard:I.endCard,eventEmitFn:I.eventEmitFn,fontFamily:I.fontFamily,headers:I.headers,index:I.index,previewMode:I.previewMode,productConfig:I.productConfig,next:I.next,seen:I.seen,showStripes:I.showStripes,studyType:I.studyType,surveyId:I.surveyId,update:I.update,useMobileStyling:I.useMobileStyling,viewDocument:I.viewDocument})),E=K(null),j=K(!1),P=u["userleap-platform"],{props:S,type:g,name:y}=r[p],R=r.length;q(()=>{E.current&&(E.current.classList.contains("ul-app--visible")||E.current.classList.add("ul-app--visible"),!j.current&&s&&(j.current=!0,s(oe.SurveyAppeared,{name:oe.SurveyAppeared,"survey.id":b})))},[s,b]),q(()=>{const I=()=>{w.visibilityState==="visible"&&(v(),w.removeEventListener("visibilitychange",I))};return w.addEventListener("visibilitychange",I),I(),()=>{w.removeEventListener("visibilitychange",I)}},[v,w]),q(()=>{k()},[p,k]),q(()=>{o(()=>n())},[n,o]);const T=Se(()=>()=>n(he),[n]),M=I=>{I.key==="Enter"&&T()},$=async function(I){d({data:I,completeSurvey:()=>{i(he)},endCard:l}),An(w)};if(e){for(const I of e)if(I.questionId===y){let me;if(g==="multiplechoice"){const le=S.options.find(({value:ye})=>ye===I.value);if(!le)break;me={[le.id]:le.value}}else me=I.value;$({value:me,type:g,questionId:I.questionId});break}}const ne=()=>["email","link"].includes(u["userleap-platform"])?!1:!l||p+1!==R,Rn=()=>{const I={className:"ul-card",next:$,questionId:y,type:g};switch(g){case"consentlegal":return U(ti,{...I,...S,key:y});case"likert":return U(ni,{...I,...S,key:y});case"matrix":return U(oi,{...I,...S,key:y});case"multiplechoice":return U(si,{...I,...S,key:y});case"multipleselect":return U(di,{...I,...S,key:y});case"nps":return U(ci,{...I,key:y,props:S});case"open":return U(ui,{...I,...S,key:y});case"recordedtask":return U(ki,{...I,...S,key:y});case"texturlprompt":return U(Ei,{...I,...S,key:y});case"thanks":return U(Si,{...I,...S,key:y});case"uploading":return U(zi,{...I,...S,key:y});case"videovoice":return U($i,{...I,...S,key:y});default:return null}},Nn=I=>{var me;const le=window.sprigAPI,ye=I.target;if(!le||!ye)return;const Mn=[ye,ye.parentElement];for(const We of Mn)if(((me=We?.tagName)==null?void 0:me.toLowerCase())==="a"){I.preventDefault(),le?.openUrl(We.href);return}},Ln=!x&&(m?.framePosition==="center"||m?.desktopDisplay==="center-modal"||(m?.placement||"").includes("center"));return c("div",{className:N("ul-app",Pe(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:he,onClick:Nn,ref:E,style:{"--theme":t,...a?{fontFamily:a.replace(";","")}:{},...Ln?{position:"relative"}:{}},children:c("div",{className:"ul-app__container",children:c("div",{className:N(B("ul-card__container",x,_)),style:{..._!=="feedbackButton"||m?.desktopDisplay==="center-modal"?{borderColor:t}:{},...m?.desktopDisplay==="slider"?{margin:"0px"}:{}},children:[ne()&&c("div",{className:N(B("close-container",x)),children:c("div",{"aria-label":"Close button",className:"close-btn",onClick:T,onKeyPress:M,role:"button",tabIndex:0,children:c("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:c("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&&c("div",{className:"ul-header__container",dir:"ltr",children:c("div",{className:"ul-header",children:"For development purposes only"})}),h&&c("div",{className:"ul-header__container",dir:"ltr",children:c("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),c("div",{className:N(Go("ul-card-main-content",P)),children:Rn()}),c(Fi,{})]})})})},Zi='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}.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}',Gi=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const o=await n.json();return(r=o?.upload)==null?void 0:r.url}else return null},In=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Tn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:In()};return new MediaRecorder(e,t)},Dn=(e,t,r)=>{r[t]=[],e.ondataavailable=function(n){r[t].push(n.data)},e.currentMediaRecordingUid=t,e.start()};function Pn(e,t,r,n,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":l}=n,s=e.currentMediaRecordingUid;if(!s)return;l&&l(s),e.onstop=()=>Ki(t,e,r,n,s,o,i),e.stop()}}async function Ki(e,t,r,n,o,i,l){const s=H.getState().viewDocument,{"upload.callback":a,"progress.callback":u}=n,p={mediaType:r,updatedAt:new Date().toISOString(),mediaRecordingUid:o,...n["passthrough.data"]},d=await Gi(p,e);if(!d){a&&a(null,{message:"failed to get upload url"});return}const h=new Blob(l,{type:In()});if(!s.defaultView)return;const m=new s.defaultView.File([h],`recording video ${Date.now()}`),v=i.createUpload({endpoint:d,file:m,chunkSize:5120});v.on("error",f=>{a&&a(null,f)}),v.on("progress",f=>{u&&u(o,f)}),v.on("success",()=>{a&&a(o,!0)})}const Yi={chunks:{}},Qi={state:{...Yi},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:r,screenRecorder:n,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&o&&(r!=null&&r.currentMediaRecordingUid&&Pn(r,t,i,e,o,this.state.chunks[r?.currentMediaRecordingUid]),n!=null&&n.currentMediaRecordingUid&&Pn(n,t,"screen",e,o,this.state.chunks[n?.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),r=e.getAudioTracks();let n=t.length&&t[0];n=n||r.length&&r[0],n&&n.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.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 r=>{this.avPermissionCallback(r)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async r=>{this.screenPermissionCallback(r)}),e.on("finish.task",async r=>{this.finishTaskCallback(r)})},async avPermissionCallback(e){var t,r,n;const{"stream.ready":o,"permission.descriptors":i}=e;try{(t=this.state.avStream)!=null&&t.active&&(this.state.avStream.getTracks().map(l=>l.readyState==="live"&&l.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:i.includes("camera"),audio:!0}),((n=this.state.captureStream)==null?void 0:n.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(l){console.warn("Error: failed to get permissions: "+l),o&&o(null,null);return}o&&o(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":r}=e;t?.(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(n){t?.(!1),console.warn("Error: failed to get permissions: "+n),r&&r(null,null);return}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),r&&r(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":r=()=>{}}=e;if(!t)return;const n=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=Tn(this.state.avStream);const o=Ye();Dn(this.state.avRecorder,o,this.state.chunks),n.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=Tn(this.state.captureStream);const o=Ye();Dn(this.state.screenRecorder,o,this.state.chunks),n.push(o)}n&&r&&r(n)},async finishTaskCallback(e){const{"current.index":t,"task.response":r,"task.complete.callback":n}=e;await this.stopRecording(e),n&&n(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,r,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var t;const{["permission.status.callback"]:r}=e,n=this.state.avStream;r&&r(n,n?n?.getVideoTracks().length>0:!1,!!((t=this.state.captureStream)!=null&&t.active),this.state.captureStream)},lookAheadAndStopStream(e,t,r,n){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:l}=H.getState(),s=Kr({cards:r,index:e,hasEndCard:n,allResponses:l});s!==null&&r[s].type==="recordedtask"||[o,i].map(a=>{a&&(a.state==="recording"&&a.stop(),a.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},Fe=Object.create(Qi);Object.freeze(Fe);const Ji=(e,t)=>{const r=[...e],n=new Set(["videovoice","recordedtask"]);return e.some(o=>n.has(o.type))&&r.push({name:-2,props:{routingOptions:[]},type:"uploading"}),t&&r.push({name:-1,props:{routingOptions:[]},type:"thanks"}),r},Xi=({mode:e=null,viewWindow:t,viewDocument:r,trackPageViewUrl:n})=>{const o=r.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:o.clientWidth,ch:o.clientHeight,p:n??i,l:t.navigator.language}};function el(e,t=!0){var r;const{answers:n,apiURL:o,endCard:i,eventEmitFn:l,fontFamilyURL:s,frame:a,previewKey:u,viewDocument:p,viewWindow:d}=e,h=Pe(e.headers)?e.frame:p.body,m=e.UpChunk||window.UpChunk,v=De,f=Ji(e.cards,!!i);Fe.configure(v,{cards:f,hasEndCard:!!i,apiURL:o,UpChunk:m}),H.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:f,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:l,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:a,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Xi({mode:e.mode,viewWindow:d,viewDocument:p,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:u,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Fe,recorderEventEmitter:v,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:_}=p,b=p.createElement("style");if(b.id="sprig-style",b.textContent=Zi,b.nonce=e.styleNonce,_.appendChild(b),e.fontFamily&&s&&parent){const w=p.createElement("link");w.rel="stylesheet",w.href=s,_.appendChild(w)}if(e.customStyles&&Bn(p,e.customStyles,e.styleNonce),!m)if(e.installationMethod!=="web-npm"){const w=p.createElement("script");w.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",w.onload=()=>{Fe.setUpChunk(d.UpChunk)},w.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(w)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const k="2.30.2",x=l||((r=a.eventEmitter)==null?void 0:r.emit);x?.("verify.view.version",{"view.version":k}),h&&t&&fe(c(Wi,{}),h)}const tl={configure:el};export{tl as default};
685
+ `,Ii=e=>{const t=D.document.createElement("div");return t.className="ul-video-player-loading",t.id=kt(e),["first","second","third","fourth"].map(r=>{const n=D.document.createElement("div");n.className=r,t.appendChild(n)}),t},kt=e=>e+"-loading-spiner",V="hidden",mn=".m3u8",wt="questionId",Ct="ul-video-recorder-camera-off-button",Et="ul-recording-in-session",Ti=[{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`}],hn=[{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:ji}],vn="-video-player",fn="-secondary-video-player",gn="-video-recorder";let Q,_n;const ie=async({event:e,apiBase:t,headers:r,visitorId:n,envId:o,metadata:i})=>{const l=D.document.documentElement;if(!n||!o)return;const s={event:`SDK - ${e}`,visitorId:n,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${n}/analytics`,{method:"POST",cache:"no-cache",headers:r,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},re=async(e,t,r,n,o,i)=>{ie({event:`Video Error ${t}`,apiBase:r,headers:n,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const l=D.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:navigator.language},a={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:o,envId:i};(await fetch(`${r}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...n,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Di=(e,{type:t,content:r})=>new Promise(function(n,o){let i;t==="script"?(i=D.document.createElement("script"),i.src=r):t==="link"?(i=D.document.createElement("link"),i.rel="stylesheet",i.href=r,i.type="text/css"):(i=D.document.createElement("style"),i.innerHTML=r),i.onload=function(){n(r)},i.onerror=function(){o(r)},i.async=!1,i.id=btoa(r),e.appendChild(i)}),bn=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((r,n)=>(r.push(Di(D.document.head,n)),r),[])).then(()=>{D.videojs=D.document.defaultView.videojs,t&&t()}).catch(function(r){console.log(r+" failed to load")})},yn=(e,t,r)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=V;else if(t==="success")e.style.visibility=V,e.innerHTML="Upload succeeded!";else{const n=Math.round(parseFloat(r));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${n}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${n}%, #FCFCFD ${n}%, #FCFCFD 100%)`}},St=(e,t)=>{const r=D.videojs(e.id());return r?.payload[t]},Pi=(e,t,r,n,o)=>{const{surveyId:i,responseGroupUid:l,visitorId:s,envId:a}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),r&&r(L.ERROR,{type:L.PERMISSION_DENIED}),ie({event:"Video Permission Denied",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{questionId:St(e,wt),responseGroupUid:l,surveyId:i}})):(r&&r(L.ERROR,{type:L.OTHER}),re(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,o,s,a))}),e.on("error",function(u,p){re(p||e.error(),"recorderError",t,o,s,a)}),e.on("startRecord",function(u,p){n(e.uploadProgressLabel,"none"),ie({event:"Video Record Start",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{questionId:St(e,wt),responseGroupUid:l,surveyId:i}})}),e.on("finishRecord",async function(){n(e.uploadProgressLabel,"start",0);const u=St(e,wt);if(!i){const v="internal error: missing fields in payload";return r&&r(L.ERROR,{type:L.OTHER}),re(new Error(v),"finishRecord",t,o,s,a),null}e.record().stopDevice();const p=e.cameraOff?L.MEDIA_TYPE_AUDIO:L.MEDIA_TYPE_VIDEO,d=Ye();ie({event:"Video Record Finish",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:p,mediaRecordingUid:d};u&&(h.questionId=u),l&&(h.responseGroupUid=l),s&&(h.visitorId=s);const m=await(async()=>{const v=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(v.ok){const f=await v.json();return r&&r(L.UPLOAD_STARTED,{[L.UPLOAD_ID]:f.upload.id,[L.MEDIA_TYPE]:p,[L.MEDIA_RECORDING_UID]:d}),f.upload.url}else return r&&r(L.ERROR,{type:L.OTHER,response:v}),re(new Error("failed to get upload response with url"),"finishRecord",t,o,s,a),null})();m&&(Q=D.document.defaultView.UpChunk.createUpload({endpoint:m,file:new D.document.defaultView.File([e.recordedData],`recording ${p} ${Date.now()}`),chunkSize:5120}),Q.startTime=Date.now(),ie({event:"Video Upload Start",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p,url:m}}),Q.on("error",v=>{n(e.uploadProgressLabel,"none"),r&&r(L.UPLOAD_FINISHED,{[L.MEDIA_RECORDING_UID]:d}),re(v,"finishRecord",t,o,s,a)}),Q.on("progress",v=>{r&&r(L.UPLOAD_PROGRESS,{[L.MEDIA_RECORDING_UID]:d,[L.UPLOAD_PROGRESS_PCT]:v.detail}),n(e.uploadProgressLabel,"progress",v.detail)}),Q.on("success",()=>{n(e.uploadProgressLabel,"success"),r&&r(L.UPLOAD_FINISHED,{[L.MEDIA_RECORDING_UID]:d}),ie({event:"Video Upload Success",apiBase:t,headers:o,visitorId:s,envId:a,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:l,surveyId:i,mediaType:p,url:m,elapsedMs:Q.startTime&&Date.now()-Q.startTime}})}))})},xn=(e,t)=>{const r=new(D.videojs.getComponent("Component"))(e);return r.addClass("ul-buttons-panel"),t.map(n=>{r.addChild(n)}),Ri(r),r},Ri=e=>{e.children().forEach(t=>{if(G[t.name_]){const r=$e(G[t.name_],`ul-${G[t.name_]}`);t.el_.appendChild(r)}})},$e=(e,t="")=>{const r=D.document.createElement("span");return r.className="ul-button-text",r.innerHTML=e,r.id=t,r},kn=(e,t,r,n,o=!1,i)=>{e.addClass("ul-video-player");const l=new(D.videojs.getComponent("Component"))(e);l.addClass("ul-control-panel"),e.progressBar=l.addChild("ProgressControl"),r&&e.src(r),e.audioPlayerPlaceholder=new(D.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=r&&r.src?Bi(r.src):null;r&&(o||!s)?(e.children()[0].classList.add("vjs-hidden"),D.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),D.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!o&&r&&!s&&Mi(e),i?.play()}),e.on("pause",()=>{i?.pause()}),e.on("seeked",()=>{i?.currentTime(e.currentTime())}),e.on("ratechange",()=>{i?.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),l.addChild(t),e.addChild(l),n&&n(e)},Ni=(e,t,r)=>{e.addClass(`ul${fn}`);const n=new(D.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(n),r&&r(e)},Li=(e,t,r,n,o,i,l,s=!1)=>{_n=Date.now();const a=ze(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(!a)return;a.payload=r;const{surveyId:u,questionId:p,responseGroupUid:d,visitorId:h,envId:m}=r;let v;const f=y=>{const R=Ct,T=Ct+"-audio-only";yn(a.uploadProgressLabel,"none"),Q&&Q.startTime>=_n&&Q.abort();const M=D.document.getElementById("ul-camera-button");y?(a.children()[0].classList.add("vjs-hidden"),x.removeClass(R),x.addClass(T),M.innerHTML=G.TurnOnCamera,a.audioPlayerPlaceholder.removeClass("vjs-hidden"),v?.getTracks().forEach($=>{$.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then($=>{v=$,$.getVideoTracks().forEach(ne=>{ne.enabled=!1}),a.record().onDeviceReady($)}).catch(a.record().onDeviceError.bind(a.record()))):(v?.getVideoTracks().forEach($=>{$.enabled=!0}),a.children()[0].classList.remove("vjs-hidden"),a.record().getDevice(),x.removeClass(T),x.addClass(R),M.innerHTML=G.TurnOffCamera,a.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{_.hasClass(V)||(ie({event:"Video Delete Button Clicked",apiBase:n,headers:l,visitorId:h,envId:m,metadata:{questionId:p,responseGroupUid:d,surveyId:u}}),f(a.cameraOff),o(L.DELETE,{}),x.removeClass(V),_.addClass(V))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild($e(G.DeleteButton,"ul-delete-button"));const b=D.document.getElementById(t),k=()=>{b.classList.contains("vjs-fullscreen")&&a.cameraOff?b.style.display="table":b.style.display="flex"};k();const x=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{a.record().isRecording()||(a.cameraOff=!a.cameraOff,ie({event:"Video Camera Button Clicked",apiBase:n,headers:l,visitorId:r.visitorId,envId:r.envId,metadata:{questionId:p,responseGroupUid:d,surveyId:u,cameraOff:a.cameraOff}}),f(a.cameraOff),!_.hasClass(V)&&_.addClass(V),o(L.DELETE,{}),k())}});x.addClass(Ct),x.el_.appendChild($e(G.TurnOffCamera,"ul-camera-button"));const w=new(D.videojs.getComponent("Button"))(a,{clickHandler:()=>{const y=D.document.getElementById("ul-recorder-toggle");if(a.record().isRecording())a.record().stop(),y&&(y.innerHTML=G.RecordButton),w.removeClass(Et),_.removeClass(V);else{const R=D.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),y&&(y.innerHTML=G.RecordButton),f(a.cameraOff),o(L.DELETE,{}),x.removeClass(V),_.addClass(V),w.removeClass(Et),P.show();else{w.addClass(Et),P.hide(),x.addClass(V),_.addClass(V),y&&(y.innerHTML=G.StopButton);const T=D.document.createElement("div");T.id="ul-recording-countdown-screen",b.insertBefore(T,b.children[1]),T.style.height=`${b.offsetHeight}px`,wn(a,3)}}}});w.addClass("ul-video-recorder-toggle-button"),w.el_.appendChild($e(G.RecordButton,"ul-recorder-toggle"));const E=D.document.createElement("p");E.style.visibility="hidden",E.className="ul-upload-progress-label",e.appendChild(E),a.uploadProgressLabel=E;const j=xn(a,[_,x,"PlayToggle",w,"FullscreenToggle"]),P=j.children().find(y=>y.name_==="FullscreenToggle");P.hasClass("vjs-disabled")&&P.hide();const S=j.children().find(y=>y.name_==="PlayToggle");S.hide(),_.addClass(V),kn(a,j,i,!1,s),a.on("stopRecord",()=>{w.hide(),S.show(),P.show(),_.removeClass(V)}),a.on("deviceReady",()=>{w.show(),S.hide(),_.addClass(V)}),Pi(a,n,o,yn,l);const g=[{name:"microphone"}];!a.cameraOff&&g.push({name:"camera"}),Promise.all(g.map(y=>{var R;return(R=navigator?.permissions)==null?void 0:R.query(y)})).then(y=>{y.reduce((R,T)=>R&T.state==="granted",!0)&&a&&(a.deviceButton&&a.deviceButton.hide(),a.record().getDevice())}).catch(y=>{})},wn=(e,t=3)=>{const r=D.document.getElementById("ul-recording-countdown-screen");r&&t===0?(r.remove(),e.record().start()):r&&(r.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{wn(e,t-1)},1e3))},Cn=e=>{const t=D.document.createElement("div");return t.className="ul-video-container",t.appendChild(Ii(e)),t},jt=(e,t)=>{const r=D.document.createElement("video");r.id=e,r.className="video-js vjs-default-skin ul-video-player-video";const n=D.document.createElement("p");n.className="vjs-no-js",n.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=D.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",n.appendChild(o),r.appendChild(n),t.appendChild(r),t},Mi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),D.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},ze=(e,t)=>D.document.getElementById(e)?t?D.videojs(e,t):D.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Oi=(e,t,r,n=!1,o="https://api.sprig.com",i=document,l=null,s=null)=>{D.document=i;const a=e+vn,u=Cn(a);return D.document.addEventListener("securitypolicyviolation",p=>{re(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),bn(hn,()=>{D.document.getElementById(kt(a)).remove(),jt(a,u);const p={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+fn;jt(d,u);const h=ze(a,p),m=ze(d,{muted:!0,...p});if(!h||!m)return;Ni(m,l,s),l||m.addClass(V);const v=xn(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=v.children().find(_=>_.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),kn(h,v,t,r,n,m)}catch(d){re(new Error(`Error when creating video player object ${d}`),"playerDeviceError",o,{});return}}),u},Ui=(e,t={},r="https://api.userleap.com",n,o,i,l=!1,s=document)=>{D.document=s;const a=e+gn,u=Cn(a);return D.document.addEventListener("securitypolicyviolation",p=>{re(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",r,i,t.visitorId,t.envId)}),bn(hn.concat(Ti),()=>{jt(a,u),D.document.getElementById(kt(a)).remove();try{Li(u,a,t,r,n,o,i,l)}catch(p){re(new Error(`Error when creating video recorder player object ${p}`),"recorderDeviceError",r,i,t.visitorId,t.envId);return}}),u},Hi=e=>{const t=e+gn;if(D.document.getElementById(t)&&D.videojs){try{if(!D.videojs(t).record().stream)return}catch{return}D.videojs(t).record().stop(),D.videojs(t).record().stopDevice()}},Ai=e=>{const t=ze(e+vn);t?.pause()},Bi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let r=t?t[1]:null;return r.includes(mn)&&(r=r.replace(mn,"")),r?`https://image.mux.com/${r}/thumbnail.jpg?time=0`:null},L={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"},G={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},pe="ul-card-video__player_recorder",Vi="ul-card-video__skip_button",qi="ul-video-interview-form",En="ul-video-btn",Te={Question:0,Answer:1},$i=({className:e,message:t,next:r,properties:n,questionId:o,type:i})=>{const{apiURL:l,envId:s,handleUploadUpdate:a,headers:u,responseGroupUid:p,surveyId:d,viewDocument:h,visitorId:m}=H(T=>({apiURL:T.apiURL,envId:T.envId,handleUploadUpdate:T.handleUploadUpdate,headers:T.headers,responseGroupUid:T.responseGroupUid,surveyId:T.surveyId,viewDocument:T.viewDocument,visitorId:T.userId})),[v,f]=A(!1),[_,b]=A(null),[k,x]=A(null),[w,E]=A(Te.Question),j=n&&n.videoUrl,P=(T,M)=>{T===L.UPLOAD_STARTED?(b(M[L.UPLOAD_ID]),x(M[L.MEDIA_RECORDING_UID]),f(!0)):T===L.DELETE?(b(null),x(null),f(!1)):T===L.UPLOAD_PROGRESS?isNaN(M[L.UPLOAD_PROGRESS_PCT])?a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],isComplete:!0}):a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],progressPct:M[L.UPLOAD_PROGRESS_PCT]}):T===L.UPLOAD_FINISHED&&a({mediaRecordingUid:M[L.MEDIA_RECORDING_UID],isComplete:!0})},S=T=>{if(T&&T.children.length===0&&!n.hideRecordedPrompt){const M=Oi(pe,{src:j,type:"application/x-mpegURL"},void 0,n.mediaType===L.MEDIA_TYPE_AUDIO,l,h);T.appendChild(M)}},g=T=>{if(T&&T.children.length===0){const M=Ui(pe,{surveyId:d,responseGroupUid:p,questionId:o,visitorId:m,envId:s},l,P,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},n.mediaType===L.MEDIA_TYPE_AUDIO,h);T.appendChild(M)}},y=T=>{T.preventDefault(),T.stopPropagation(),document.getElementById(pe)&&Hi(pe),_&&k?(a({mediaRecordingUid:k,isSubmitted:!0}),r({value:{mediaRecordingUid:k},questionId:o,type:i})):r({value:null,questionId:o,type:i})},R=()=>c(te,{defaultBody:()=>c("button",{className:`${En} ul-record-response-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),document.getElementById(pe)&&Ai(pe),E(Te.Answer)}}),properties:n});return c("form",{className:N(e,"ul-card--video","fade-in-transition"),id:qi,children:[c(Z,{message:t,properties:n}),c("div",{id:"ul-card-voice__video",children:[c("div",{children:[c("div",{id:"ul-question-player-container",style:{display:w===Te.Question?"":"none"},children:[c("div",{id:pe,ref:S}),R()]}),c("div",{style:{display:w===Te.Answer?"block":"none"},children:[c("button",{className:`${En} ul-back-question-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),E(Te.Question)},style:{display:n.hideRecordedPrompt?"none":"block"}}),c("div",{id:"ul-recorder-player-container",ref:g})]})]}),c(F,{disabled:!v,onClick:y,children:de(n)}),c("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:Vi,onClick:y,style:{display:n.required?"none":"block",...v?{display:"none"}:{}},children:gt(n)})]})]})},zi=({className:e})=>{const{uploadProgress:t}=H(i=>({uploadProgress:i.uploadProgress}));let r,n;Object.values(t).filter(i=>i.isSubmitted).length>1?(r="Your responses are processing",n="Please keep this tab open until your responses are fully processed."):(r="Your response is processing",n="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return c("div",{className:N(e,"ul-card--uploading","fade-in-transition"),children:[c("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:c("div",{className:"ul-loading-spinner",children:[c("div",{className:"first"}),c("div",{className:"second"}),c("div",{className:"third"}),c("div",{className:"fourth"})]})}),c(Z,{message:`${r} (${o}% complete)`}),c("p",{className:"ul-caption",children:n})]})},Sn=({logoOnly:e=!1,style:t={}})=>c("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&&c("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"}),c("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"}),c("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"}),c("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"}),c("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"}),c("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"})]}),Fi=()=>{const{border:e,cards:t,forceBrandedLogo:r,headers:n,index:o,marketingUrl:i,showSurveyBrand:l,slugName:s,surveyId:a,viewedCardCount:u}=H(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=K(null),d=t.filter(x=>x.type!=="uploading"&&x.type!=="thanks"),h=Wo(t,o),m=u+1,v=m/(m+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${a}${r&&"&utm_term=poweredby_pill"}`;q(()=>{p.current&&(p.current.style.width=`${v*100}%`)},[v]);const _=()=>c(z,{children:[d.length>1&&c("div",{id:"ul-progress-bar-container",children:c("div",{id:"ul-progress-bar-current",ref:p,style:{border:`1px solid ${e||"#000"}`}})}),l?c("div",{className:r?"yellow-footer-logo":"",style:{marginTop:"4px"},children:c("a",{href:f,rel:"noreferrer",target:"_blank",children:c("div",{style:{display:"flex"},children:[c(Sn,{logoOnly:!1}),r&&c(jn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),b=()=>c("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:c("div",{className:"thank-you-card-link",children:[c("div",{className:"sprig-box-logo",children:c(Sn,{logoOnly:!0,style:{margin:"auto"}})}),c("div",{children:c("p",{children:["Capture insights about your own product",c(jn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),k=t[o].type==="thanks";return c("footer",{className:`ul-footer ${n["userleap-platform"]==="link"?"ul-footer__link":""}`,style:l?{}:{marginBottom:"10px"},children:k&&r?b():_()})},jn=({style:e})=>c("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),c("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Wi=()=>{const{answers:e,border:t,cards:r,close:n,configureExitOnOverlayClick:o,destroy:i,endCard:l,eventEmitFn:s,fontFamily:a,headers:u,index:p,next:d,previewMode:h,productConfig:m,seen:v,showStripes:f,studyType:_,surveyId:b,update:k,useMobileStyling:x,viewDocument:w}=H(I=>({answers:I.answers,border:I.border,cards:I.cards,close:I.close,configureExitOnOverlayClick:I.configureExitOnOverlayClick,destroy:I.destroy,endCard:I.endCard,eventEmitFn:I.eventEmitFn,fontFamily:I.fontFamily,headers:I.headers,index:I.index,previewMode:I.previewMode,productConfig:I.productConfig,next:I.next,seen:I.seen,showStripes:I.showStripes,studyType:I.studyType,surveyId:I.surveyId,update:I.update,useMobileStyling:I.useMobileStyling,viewDocument:I.viewDocument})),E=K(null),j=K(!1),P=u["userleap-platform"],{props:S,type:g,name:y}=r[p],R=r.length;q(()=>{E.current&&(E.current.classList.contains("ul-app--visible")||E.current.classList.add("ul-app--visible"),!j.current&&s&&(j.current=!0,s(oe.SurveyAppeared,{name:oe.SurveyAppeared,"survey.id":b})))},[s,b]),q(()=>{const I=()=>{w.visibilityState==="visible"&&(v(),w.removeEventListener("visibilitychange",I))};return w.addEventListener("visibilitychange",I),I(),()=>{w.removeEventListener("visibilitychange",I)}},[v,w]),q(()=>{k()},[p,k]),q(()=>{o(()=>n())},[n,o]);const T=Se(()=>()=>n(he),[n]),M=I=>{I.key==="Enter"&&T()},$=async function(I){d({data:I,completeSurvey:()=>{i(he)},endCard:l}),An(w)};if(e){for(const I of e)if(I.questionId===y){let me;if(g==="multiplechoice"){const le=S.options.find(({value:ye})=>ye===I.value);if(!le)break;me={[le.id]:le.value}}else me=I.value;$({value:me,type:g,questionId:I.questionId});break}}const ne=()=>["email","link"].includes(u["userleap-platform"])?!1:!l||p+1!==R,Rn=()=>{const I={className:"ul-card",next:$,questionId:y,type:g};switch(g){case"consentlegal":return U(ti,{...I,...S,key:y});case"likert":return U(ni,{...I,...S,key:y});case"matrix":return U(oi,{...I,...S,key:y});case"multiplechoice":return U(si,{...I,...S,key:y});case"multipleselect":return U(di,{...I,...S,key:y});case"nps":return U(ci,{...I,key:y,props:S});case"open":return U(ui,{...I,...S,key:y});case"recordedtask":return U(ki,{...I,...S,key:y});case"texturlprompt":return U(Ei,{...I,...S,key:y});case"thanks":return U(Si,{...I,...S,key:y});case"uploading":return U(zi,{...I,...S,key:y});case"videovoice":return U($i,{...I,...S,key:y});default:return null}},Nn=I=>{var me;const le=window.sprigAPI,ye=I.target;if(!le||!ye)return;const Mn=[ye,ye.parentElement];for(const We of Mn)if(((me=We?.tagName)==null?void 0:me.toLowerCase())==="a"){I.preventDefault(),le?.openUrl(We.href);return}},Ln=!x&&(m?.framePosition==="center"||m?.desktopDisplay==="center-modal"||(m?.placement||"").includes("center"));return c("div",{className:N("ul-app",Pe(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:he,onClick:Nn,ref:E,style:{"--theme":t,...a?{fontFamily:a.replace(";","")}:{},...Ln?{position:"relative"}:{}},children:c("div",{className:"ul-app__container",children:c("div",{className:N(B("ul-card__container",x,_)),style:{..._!=="feedbackButton"||m?.desktopDisplay==="center-modal"?{borderColor:t}:{},...m?.desktopDisplay==="slider"?{margin:"0px"}:{}},children:[ne()&&c("div",{className:N(B("close-container",x)),children:c("div",{"aria-label":"Close button",className:"close-btn",onClick:T,onKeyPress:M,role:"button",tabIndex:0,children:c("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:c("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&&c("div",{className:"ul-header__container",dir:"ltr",children:c("div",{className:"ul-header",children:"For development purposes only"})}),h&&c("div",{className:"ul-header__container",dir:"ltr",children:c("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),c("div",{className:N(Go("ul-card-main-content",P)),children:Rn()}),c(Fi,{})]})})})},Zi='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}.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}',Gi=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const o=await n.json();return(r=o?.upload)==null?void 0:r.url}else return null},In=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Tn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:In()};return new MediaRecorder(e,t)},Dn=(e,t,r)=>{r[t]=[],e.ondataavailable=function(n){r[t].push(n.data)},e.currentMediaRecordingUid=t,e.start()};function Pn(e,t,r,n,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":l}=n,s=e.currentMediaRecordingUid;if(!s)return;l&&l(s),e.onstop=()=>Ki(t,e,r,n,s,o,i),e.stop()}}async function Ki(e,t,r,n,o,i,l){const s=H.getState().viewDocument,{"upload.callback":a,"progress.callback":u}=n,p={mediaType:r,updatedAt:new Date().toISOString(),mediaRecordingUid:o,...n["passthrough.data"]},d=await Gi(p,e);if(!d){a&&a(null,{message:"failed to get upload url"});return}const h=new Blob(l,{type:In()});if(!s.defaultView)return;const m=new s.defaultView.File([h],`recording video ${Date.now()}`),v=i.createUpload({endpoint:d,file:m,chunkSize:5120});v.on("error",f=>{a&&a(null,f)}),v.on("progress",f=>{u&&u(o,f)}),v.on("success",()=>{a&&a(o,!0)})}const Yi={chunks:{}},Qi={state:{...Yi},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:r,screenRecorder:n,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&o&&(r!=null&&r.currentMediaRecordingUid&&Pn(r,t,i,e,o,this.state.chunks[r?.currentMediaRecordingUid]),n!=null&&n.currentMediaRecordingUid&&Pn(n,t,"screen",e,o,this.state.chunks[n?.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),r=e.getAudioTracks();let n=t.length&&t[0];n=n||r.length&&r[0],n&&n.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.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 r=>{this.avPermissionCallback(r)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async r=>{this.screenPermissionCallback(r)}),e.on("finish.task",async r=>{this.finishTaskCallback(r)})},async avPermissionCallback(e){var t,r,n;const{"stream.ready":o,"permission.descriptors":i}=e;try{(t=this.state.avStream)!=null&&t.active&&(this.state.avStream.getTracks().map(l=>l.readyState==="live"&&l.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:i.includes("camera"),audio:!0}),((n=this.state.captureStream)==null?void 0:n.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(l){console.warn("Error: failed to get permissions: "+l),o&&o(null,null);return}o&&o(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":r}=e;t?.(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(n){t?.(!1),console.warn("Error: failed to get permissions: "+n),r&&r(null,null);return}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),r&&r(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":r=()=>{}}=e;if(!t)return;const n=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=Tn(this.state.avStream);const o=Ye();Dn(this.state.avRecorder,o,this.state.chunks),n.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=Tn(this.state.captureStream);const o=Ye();Dn(this.state.screenRecorder,o,this.state.chunks),n.push(o)}n&&r&&r(n)},async finishTaskCallback(e){const{"current.index":t,"task.response":r,"task.complete.callback":n}=e;await this.stopRecording(e),n&&n(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,r,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var t;const{["permission.status.callback"]:r}=e,n=this.state.avStream;r&&r(n,n?n?.getVideoTracks().length>0:!1,!!((t=this.state.captureStream)!=null&&t.active),this.state.captureStream)},lookAheadAndStopStream(e,t,r,n){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:l}=H.getState(),s=Kr({cards:r,index:e,hasEndCard:n,allResponses:l});s!==null&&r[s].type==="recordedtask"||[o,i].map(a=>{a&&(a.state==="recording"&&a.stop(),a.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},Fe=Object.create(Qi);Object.freeze(Fe);const Ji=(e,t)=>{const r=[...e],n=new Set(["videovoice","recordedtask"]);return e.some(o=>n.has(o.type))&&r.push({name:-2,props:{routingOptions:[]},type:"uploading"}),t&&r.push({name:-1,props:{routingOptions:[]},type:"thanks"}),r},Xi=({mode:e=null,viewWindow:t,viewDocument:r,trackPageViewUrl:n})=>{const o=r.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:o.clientWidth,ch:o.clientHeight,p:n??i,l:t.navigator.language}};function el(e,t=!0){var r;const{answers:n,apiURL:o,endCard:i,eventEmitFn:l,fontFamilyURL:s,frame:a,previewKey:u,viewDocument:p,viewWindow:d}=e,h=Pe(e.headers)?e.frame:p.body,m=e.UpChunk||window.UpChunk,v=De,f=Ji(e.cards,!!i);Fe.configure(v,{cards:f,hasEndCard:!!i,apiURL:o,UpChunk:m}),H.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:f,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:l,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:a,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Xi({mode:e.mode,viewWindow:d,viewDocument:p,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:u,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Fe,recorderEventEmitter:v,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:_}=p,b=p.createElement("style");if(b.id="sprig-style",b.textContent=Zi,b.nonce=e.styleNonce,_.appendChild(b),e.fontFamily&&s&&parent){const w=p.createElement("link");w.rel="stylesheet",w.href=s,_.appendChild(w)}if(e.customStyles&&Bn(p,e.customStyles,e.styleNonce),!m)if(e.installationMethod!=="web-npm"){const w=p.createElement("script");w.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",w.onload=()=>{Fe.setUpChunk(d.UpChunk)},w.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(w)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const k="2.30.4",x=l||((r=a.eventEmitter)==null?void 0:r.emit);x?.("verify.view.version",{"view.version":k}),h&&t&&fe(c(Wi,{}),h)}const tl={configure:el};export{tl as default};
package/package.json CHANGED
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "homepage": "https://docs.sprig.com/docs/web-javascript",
48
48
  "license": "See LICENSE file",
49
- "version": "2.30.2"
49
+ "version": "2.30.4"
50
50
  }
@@ -1,12 +0,0 @@
1
- "use strict";var $e=Object.defineProperty;var qe=(t,r,n)=>r in t?$e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n;var F=(t,r,n)=>(qe(t,typeof r!="symbol"?r+"":r,n),n);const i=require("./metricsReporter-BIT_adF4.cjs"),Ge='.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}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}',Ee="360px",Ke="ul-app",Je="#e6e6e6",Qe="#bd282a",Ye=500,Xe=1030,Ue=()=>{try{return window.parent.Intercom}catch{return null}},Ze=()=>{const t=Ue();t&&(t.ul_wasVisible&&t("update",{hide_default_launcher:!1}),delete t.ul_wasVisible)},et=()=>{const t=Ue();t&&(t.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),t.ul_wasVisible&&t("update",{hide_default_launcher:!0}))},tt=Object.freeze(Object.defineProperty({__proto__:null,disable:et,enable:Ze},Symbol.toStringTag,{value:"Module"})),ve=[tt];class Ie{static disable(){ve.forEach(r=>r.disable())}static enable(){ve.forEach(r=>r.enable())}}const he="ul-view-sdk-script",rt=["ios","android"],O="visitors",x="environments";async function R(t,r){var o,a,l;const{shouldDropOnRateLimit:n,...s}=r;s.headers=Object.assign(i.getHttpHeaders(window.UserLeap),s.headers);const e=await i.sprigFetch(t,{...s,shouldDropOnRateLimit:n});if(e.ok){const d=(o=e.headers)==null?void 0:o.get("Authorization"),p=d?d.split(" "):void 0,c=p&&p.length===2?p[1]:void 0,u=(a=e.headers)==null?void 0:a.get("x-ul-visitor-id");c&&u&&(u!==window.UserLeap.visitorId||window.UserLeap.token!==c)&&(U("token",c),U("vid",u),i.eventEmitter.emit(i.SprigEvent.VisitorIDUpdated,{visitorId:u}),window.UserLeap.token=c,window.UserLeap.visitorId=u)}return(l=e.json)!=null&&l.logMessage&&console.warn(`[Sprig] ${e.json.logMessage}`),e}function U(t,r){const n=i.localStorageHelper.getItem("userleap.ids");let s={};if(n)try{s=JSON.parse(n)}catch(o){o instanceof Error&&(o.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",o)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",o)}let e=s[window.UserLeap.envId];e?e[t]=r:e={[t]:r},s[window.UserLeap.envId]=e;try{i.localStorageHelper.setItem("userleap.ids",JSON.stringify(s))}catch(o){o instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${o.message}`)}}function se(){return window.previewMode?"0":window.UserLeap.visitorId??""}function I(t,r,n){const s=[window.UserLeap._API_URL,"sdk",t];return r&&r.forEach(e=>{s.push(e),e===x?s.push(window.UserLeap.envId):e===O&&s.push(se())}),n&&s.push(n),s.join("/")}const N=async(t,r)=>{var fe,me,ye;const{context:n,forceBrandedLogo:s,endCard:e,isFeedback:o=!1,heatmap:a,locale:l,previewMode:d,productConfig:p,questions:c,responseGroupUid:u,surveyId:w,uuid:m,vid:g,sessionReplay:y,studyType:A}=t,b=i.getHttpHeaders(window.UserLeap),S=de(b),L=ae(b);if(i.info(`Attempting to display survey: ${w}`),y)if(i.info("Survey has replay attached"),S)i.eventEmitter.emit(i.SprigEvent.ReplayCapture,{responseGroupUid:u,hasQuestions:!!(c!=null&&c.length),surveyId:w,uploadId:y.uploadId,replayType:y.replayDurationType??"before",seconds:y.replayDurationSeconds,generateVideoUploadUrlPayload:{mediaRecordingUid:i.v4(),mediaType:"screen",questionId:1,responseGroupUid:u,surveyId:w,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0}});else{if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};i.modules.replay.scheduleOrCaptureReplay({responseGroupId:u,surveyId:w,visitorId:g,replayParams:y,completeUploadHeaders:b,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:c.length===0})}if(a){if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};const{eventId:h,replayParams:Y,responseGroupUid:je,surveyId:ze}=a;await i.modules.replay.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:300,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests,teardownAfter:!0}),i.modules.replay.scheduleCapture({apiUrl:window.UserLeap._API_URL,completeUploadHeaders:b,eventId:h,isHeatmap:!0,replayParams:Y,responseGroupId:je,surveyId:ze,triggerTimestamp:Date.now(),visitorId:g})}if(g==null||!(c!=null&&c.length))return i.info(`Not displaying survey: vid: ${g} / questions: ${c}`),{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){i.info("Already displaying a survey");const h="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(h),{success:!1,message:h,surveyState:"no survey"}}if(g!==window.UserLeap.visitorId&&m!==window.UserLeap.visitorId&&!window.previewMode){const h="Attempted to display survey to a different visitor";return i.info(h),window.UserLeap.reportError("DisplaySurvey",new Error(h)),{success:!1,message:h,surveyState:"no survey"}}i.info(`Showing survey: ${w}`),(fe=i.modules.replay)==null||fe.RecordSurveyShown({id:w,userAgent:window.navigator.userAgent}),Ie.disable(),i.eventEmitter.emit(i.SprigEvent.SurveyWillPresent,{name:i.SprigEvent.SurveyWillPresent,"survey.id":w});let D,k=document.createElement("div"),E,v,M;const ue=h=>{const{"view.version":Y}=h;Y!==b["x-ul-sdk-version"]&&Re(),i.eventEmitter.removeListener("verify.view.version",ue)};i.eventEmitter.on("verify.view.version",ue),window.UserLeap.useMobileStyling=L,i.shouldDirectEmbed(b)?(D="ul-direct-embeded-frame",E=document.head,v=window,M=!1,S&&(ke(o),k.id=D,window.UserLeap.container.appendChild(k),_e(),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":w}))):{frameId:D,contentWinDocHead:E,contentWindow:v,hasOverlay:M,iframe:k}=at({productConfig:p,useMobileStyling:L,surveyId:w,isFeedback:o}),window.UserLeap.frameId=D;const Be=h=>{i.eventEmitter.once(i.SprigEvent.CloseSurveyOnOverlayClick,h)},C={apiURL:window.UserLeap._API_URL,cards:c,configureExitOnOverlayClick:Be,context:n,endCard:e,envId:window.UserLeap.envId,eventEmitFn:i.eventEmitter.emit.bind(i.eventEmitter),fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,forceBrandedLogo:s,frame:k,headers:b,locale:l,mobileSDKVersion:window.UserLeap.mobileSDKVersion,previewKey:i.localStorageHelper.getItem("sprig.previewKey"),previewMode:d,productConfig:{framePosition:p==null?void 0:p.framePosition,desktopDisplay:p==null?void 0:p.desktopDisplay,placement:p==null?void 0:p.placement},responseGroupUid:u,startingQuestionIdx:(me=window.UserLeap.config)==null?void 0:me.startingQuestionIdx,studyType:A,styleNonce:window.UserLeap.styleNonce,surveyId:w,tabTitle:document.title,trackPageViewUrl:r,ulEvents:i.EVENTS,upchunkLibraryURL:window.UserLeap.upchunkLibraryURL,useMobileStyling:L,userId:m,viewDocument:v==null?void 0:v.document,viewWindow:v,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},...window.UserLeap._config};(ye=window.UserLeap._config)!=null&&ye.startingQuestionIdx&&(window.UserLeap._config={...window.UserLeap._config,startingQuestionIdx:null});const Ne=(o?window.UserLeap.feedbackCustomStyles:window.UserLeap.customStyles)??p.customStyles;C.customStyles=Ne,v&&(v.__cfg=C);function We(){const h=document.createElement("script");return window.UserLeap.nonce&&h.setAttribute("nonce",window.UserLeap.nonce),h.id=he,h}const J=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:C.path,we=document.getElementById(he);we&&we.remove();const Q=We(),ge=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(C.installationMethod==="web-npm"||C.installationMethod==="web-npm-bundled"){const{default:h}=await Promise.resolve().then(()=>require("./view-4ILgM5Tw.cjs"));h.configure(C),M&&window.UserLeap.container&&ge()}else J&&(Q.src=J,M&&Q.addEventListener("load",()=>{window.UserLeap.container&&ge()}),v==null||v.addEventListener("error",h=>{h.target instanceof HTMLScriptElement&&h.target.src===J&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));return E==null||E.appendChild(Q),{success:!0,surveyState:"ready",surveyId:w,responseGroupUid:u}};function ae(t){var n;if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const r=((n=window.UserLeap.windowDimensions)==null?void 0:n.width)??document.body.clientWidth;return de(t)||r>10&&r<Ye}function de(t){return rt.includes(t["userleap-platform"])}const le="ul-frame";window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig);window.UserLeap||(window.UserLeap=window.Sprig);window.Sprig||(window.Sprig=window.UserLeap);const it="rgba(255,255,255, 0.95)",nt="rgba(0,0,0,0.9)",X="0px",ke=(t,r)=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className=`ul-container ${t&&"ul-container-feedback"}`;const n=Oe();r&&n&&!window.UserLeap.useMobileStyling?n.appendChild(window.UserLeap.container):document.body.appendChild(window.UserLeap.container)},Re=(t,r)=>{var s;lt();const n=window.UserLeap.container;if(n)try{(s=n.parentNode)==null||s.removeChild(n),window.UserLeap.container=null,U("trackStartUrl",null),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"dismissed"}),i.eventEmitter.emit(i.SprigEvent.SurveyClosed,{name:i.SprigEvent.SurveyClosed,initiator:t,studyType:r})}catch(e){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} `+n),e instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",e)}},_e=()=>{i.eventEmitter.once(i.SprigEvent.SurveyWillClose,({initiator:t,studyType:r})=>{i.eventEmitter.removeAllListeners(i.SprigEvent.CloseSurveyOnOverlayClick),Re(t,r)})},ot=(t,r)=>{const s={...{position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646}},e=r?t.overlayStyleMobile:t.overlayStyle;s["background-color"]=e==="light"?it:nt,r||(s.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,s)},st=(t,r,n,s)=>{var c,u;const e={position:"fixed",bottom:"0px",right:X,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out",maxWidth:"100%"},o=Object.assign({},r,window.UserLeap),{desktopDisplay:a}=r||{},l=a==="center-modal";l&&(o.framePosition="center");let d,p=!1;if(n)(c=window.UserLeap.windowDimensions)!=null&&c.width?e.width=`${window.UserLeap.windowDimensions.width}px`:e.width="100%",(u=window.UserLeap.windowDimensions)!=null&&u.height?e.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?e.maxHeight=window.UserLeap.maxHeight:e.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(o.overlayStyleMobile)&&(p=!0);else{e.width=Ee,e.maxHeight=window.UserLeap.maxHeight||"66vh";const w=()=>{p=!0,d={margin:"auto",position:"static"}};if(s)l?w():d={position:"relative",height:"300px"};else switch(o.framePosition){case"bottomLeft":d={left:X};break;case"topLeft":d={left:X,top:0};break;case"topRight":d={top:0};break;case"center":w();break}}return p&&ot(o,n),Object.assign(t.style,e,d),p},at=({productConfig:t,useMobileStyling:r,surveyId:n,isFeedback:s})=>{var w,m;const e=le,o=s&&t.desktopDisplay==="slider";ke(s,o),dt();const a=document.createElement("iframe");a.id=e,a.setAttribute("title","Sprig User Feedback Dialog");const l=st(a,t,r,s);_e();let d=!1;a.setHeight=g=>{(parseInt(a.style.height)!=g||!d)&&(d=!0,a.style.height=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyHeight,{name:i.SprigEvent.SurveyHeight,contentFrameHeight:g}))};let p=!1;a.setWidth=g=>{(parseInt(a.style.width)!=g||!p)&&(p=!0,a.style.width=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyWidth,{name:i.SprigEvent.SurveyWidth,contentFrameWidth:g}))},(w=window.UserLeap.container)==null||w.appendChild(a),t&&(r?t.exitOnOverlayClickMobile:t.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{i.eventEmitter.emit(i.SprigEvent.CloseSurveyOnOverlayClick)}),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":n});const c=(m=a.contentWindow)==null?void 0:m.document;if(c&&(c.open("text/html","replace"),c.write("<!doctype html><head></head><body></body></html>"),c.close(),!r)){const g=c.body;g.style.display="flex",g.style.alignItems="center"}const u=c==null?void 0:c.head;return{frameId:e,contentWinDocHead:u,contentWindow:a.contentWindow,hasOverlay:l,iframe:a}},Ae={[i.SprigEvent.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},dt=()=>{Object.entries(Ae).forEach(([t,r])=>{i.eventEmitter.on(t,r)})},lt=()=>{Object.entries(Ae).forEach(([t,r])=>{i.eventEmitter.off(t,r)})},ct=1,Se=t=>t instanceof HTMLElement||t instanceof SVGElement,$=(t,r,n)=>{const s="ul-custom-style",e=t.getElementById(s);if(e){e.textContent=r;return}const o=t.createElement("style");n&&(o.nonce=n),o.textContent=r,o.id=s,t.head.appendChild(o)},De=t=>{const r=t.querySelector(".ul-card__container");let n=600,s=360;if(r){n=r.scrollHeight;const e=getComputedStyle(r),o=parseFloat(e.marginTop)+parseFloat(e.marginBottom),a=parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),l=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom);n+=o+a+l;const d=r.querySelector(".ul-card--matrix_grid");s=d?d.scrollWidth:r.scrollWidth;const p=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),c=parseFloat(e.marginLeft)+parseFloat(e.marginRight),u=parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth);s+=c+u+p}return[n+ct,s]},pt=t=>{const r=t.querySelector(".ul-card__container");r&&(r.scrollTop=0)},Oe=()=>f,H=()=>document.getElementById("sprig-feedback-container"),ce=()=>document.getElementById("sprig-feedback-loading-animation"),ut=()=>{if(ce())return;const t=document.createElement("div");return t.className="ul-loading-spinner-container",t.id="sprig-feedback-loading-animation",t.role="progressbar",t.setAttribute("aria-live","polite"),t.setAttribute("aria-busy","true"),t.setAttribute("aria-label","Processing..."),t.innerHTML=`
2
- <div class="ul-loading-spinner">
3
- <div class="first"></div>
4
- <div class="second"></div>
5
- <div class="third"></div>
6
- <div class="fourth"></div>
7
- </div>
8
- `,t},xe=()=>!!document.getElementById(le);let Le=!1,f=null,_=null,pe=!1,W=null,T=null;const wt=["bottom-left","bottom-right","center-left","center-right"],gt=t=>{if(H()||!wt.includes(t))return;const[r,n]=t.split("-"),s=document.createElement("div");s.id="sprig-feedback-container",s.classList.add(`sprig-feedback-container-${n}`,`sprig-feedback-container-${r}`),document.body.appendChild(s)},K=()=>{var r;const t=window.UserLeap.container;return((r=t==null?void 0:t.parentElement)==null?void 0:r.id)==="sprig-feedback-loading-container"},Te=()=>document.getElementById("sprig-feedback-error-container"),Pe=()=>{if(!f)return 0;const t=f==null?void 0:f.clientWidth,r=window.getComputedStyle(f),n=parseInt(r.borderRightWidth||"0"),s=parseInt(r.borderLeftWidth||"0");return t+n+s},q=t=>{const r=H();r&&(T!=null&&T.endsWith("right")?r.style.right=`${t}px`:T!=null&&T.endsWith("left")&&(r.style.left=`${t}px`))},Z=()=>{if(f&&(K()||Te())){i.eventEmitter.off(i.SprigEvent.SurveyAppeared,B),te();const t=Pe();return q(-t),!0}return!1},B=()=>{if(!f||!_)return;const t=ce();t&&t.remove(),f.style.height="auto",f.style.width="auto",_.disabled=!1,pe=!1},te=()=>{if(!f)return;if(!ce()){const r=ut();r&&(f.style.height="300px",f.style.width="360px",f.appendChild(r))}},be=()=>{!f||!_||(q(0),_.disabled=!0,pe=!0)},ft=async t=>{const r=await R(I("1",[O],"startFeedbackStudy"),{body:JSON.stringify({surveyUuid:t}),method:"POST"});return r.ok?r.json:null},Ce=async(t,r,n)=>{const{buttonTheme:s,customStyles:e,eventId:o,placement:a,desktopDisplay:l,feedbackLabel:d,surveyUuid:p,surveyId:c}=t;window.UserLeap.feedbackCustomStyles=void 0;let u=H();if(u){if(!r&&o===W)return;u.remove(),i.eventEmitter.off(i.EVENTS.SURVEY_FADING_OUT,Z)}if(W=o,!document.getElementById("sprig-feedback-style")){const{head:S}=document,L=document.createElement("style");L.id="sprig-feedback-style",L.textContent=Ge,L.nonce=window.UserLeap.styleNonce,S.appendChild(L)}$(document,e??"",window.UserLeap.styleNonce),Le=l==="center-modal",T=a;const[m,g]=a.split("-");gt(a),u=H(),_=document.createElement("button");const y=document.createElement("div");y.className="sprig-feedback-button-label",y.innerText=d,_.appendChild(y),_.id="sprig-feedback-button",_.classList.add(`sprig-feedback-button-${g}`,`sprig-feedback-button-${m}`,`sprig-feedback-button-${s}`,"fade-in-transition"),i.eventEmitter.on(i.EVENTS.SURVEY_FADING_OUT,Z),_.addEventListener("click",async()=>{const S=document.getElementById("sprig-feedback-error-container");if(xe()||Te()){if(Z()){i.eventEmitter.emit(i.SprigEvent.SurveyWillClose,{name:i.SprigEvent.SurveyWillClose,initiator:i.DismissReason.FeedbackClosed,studyType:"feedbackButton"});const E=H();S&&E&&(E.remove(),W=null,f=null)}return}const L=i.getHttpHeaders(window.UserLeap);if(!ae(L)&&!pe&&be(),r){f&&f.classList.add("sprig-feedback-loading-container-previews"),await N(r),B();return}const k=await ft(p);if(k)i.eventEmitter.once(i.SprigEvent.SurveyAppeared,B),N({...k,studyType:"feedbackButton"},n);else if(f){const E=yt();f.appendChild(E),B(),f.style.height="300px",f.style.width="360px"}}),u==null||u.appendChild(_),i.eventEmitter.emit(i.SprigEvent.FeedbackButtonLoaded,{name:i.SprigEvent.FeedbackButtonLoaded,"survey.id":c});const{useMobileStyling:A,_config:{border:b}}=window.UserLeap;if(!Le&&!A){const S=document.createElement("div");S.id="sprig-feedback-loading-container",S.className=`sprig-feedback-loading-container sprig-feedback-loading-container-${g}`,S.style.setProperty("--feedback-border",b),f=S,te(),u==null||u.appendChild(S);const L=Pe();q(-L)}else q(0);window.UserLeap._config.isOnQuestionsTab&&r&&!K()&&f&&(be(),te(),f&&f.classList.add("sprig-feedback-loading-container-previews"),N(r),B())},mt=()=>{if(K())return;const t=H();if(!t)return;i.checkUrlStillMatching(W)||(t.remove(),W=null,f=null)},yt=()=>{const t=document.createElement("div");t.id="sprig-feedback-error-container",t.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
9
- <circle cx="20" cy="20" r="14.5" stroke="#B0B5B7" stroke-width="3"/>
10
- <path d="M20 12L20 21.6" stroke="#B0B5B7" stroke-width="3" stroke-linecap="round"/>
11
- <circle cx="19.9984" cy="27.6" r="1.6" fill="#B0B5B7"/>
12
- </svg>`;const r=document.createElement("h3");return r.className="sprig-feedback-error-text",r.innerText="There was an error while loading the survey",t.appendChild(r),t},vt="!launch_darkly_";class ht{constructor(){F(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(r){try{return!r||typeof r!="object"||Array.isArray(r)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(r).forEach(n=>this._ldData[`${vt}${n}`]=(r[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const re=new ht;Object.freeze(re);const St="!optimizely_experiments_";class Lt{constructor(){F(this,"_optimizelyData",{})}setOptimizelyExperiment(r,n=!0){if(!r||typeof r!="object")return!1;const{experiments:s}=r;try{return n&&Object.keys(this._optimizelyData).map(e=>{delete this._optimizelyData[e]}),s&&s.map(e=>{const{id:o,variation:a}=e,l=this.transformExperimentId(o);a&&typeof a=="string"&&(this._optimizelyData[l]=a)}),!0}catch(e){return e instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",e),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(r){return this._optimizelyData[this.transformExperimentId(r)]}transformExperimentId(r){return St+r}getAndSetWebOptimizelyExperiments(){var r;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(r=window.optimizely.get("state"))==null?void 0:r.getExperimentStates({isActive:!0});if(n){const s=Object.keys(n).map(e=>{var o,a;return(o=n[e].variation)!=null&&o.name?{id:e,variation:(a=n[e].variation)==null?void 0:a.name}:{id:e,variation:"Original"}});return this.setOptimizelyExperiment({experiments:s},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const z=new Lt;Object.freeze(z);class bt{constructor(r,n){F(this,"paused");F(this,"queue");F(this,"ul");this.ul=r,this.paused=!1,this.queue=[],this.flush(n)}flush(r){const n=r.length;if(n)for(let s=0;s<n;s++)this.push(r[s])}isPaused(){return this.paused}pause(){this.paused=!0}unpause(){this.paused=!1;const r=this.queue.slice();this.empty(),this.flush(r)}push(r){if(this.paused)this.queue.push(r);else if(r instanceof Function)r();else{const n=Array.prototype.slice.call(r,1),s=r[0],e=this.ul[s];e instanceof Function?e.apply(this.ul,n):s&&console.warn("[Sprig] (ERR-100) No valid UserLeap action called",s)}}perform(r){if(this.paused){let n=()=>{};const s=new Promise(function(e){n=function(){e(r())}});return this.queue.push(n),s}else return r()}empty(){this.queue.length=0}}const ie=(t,r)=>{const n=performance.now();document.hidden?setTimeout(()=>ie(t,r),t):setTimeout(()=>{const s=performance.now()-n;r.report(s/1e3),setTimeout(()=>ie(t,r),t)},0)},Et=(t=1e3)=>{const r=i.registerMetric("sdk_event_queue_latency_seconds");ie(t,r)},Ut=({webMetricsEnabled:t,reportingIntervalSeconds:r,thresholds:n,postMetrics:s})=>{i.registerThresholds(n,(e,o)=>{var a,l;if((a=i.modules.replay)!=null&&a.isReplayRecording()){const d=`Value: ${e} on ${o.metric} violated threshold of ${o.type} ${o.value}`;(l=i.modules.replay)==null||l.disableRecording("Threshold violated",new Error(d),{reportError:!1}),i.disableThresholdChecking()}}),i.initPerformanceReporting({reportingIntervalSeconds:r,postMetrics:s}),t&&Et()},It={test:"test"},kt=["popState","pushState","replaceState"],V="!email",ne="pageUrl";function Rt(t,r){const{pageUrlEvents:n,interactiveEvents:s,dismissOnPageChange:e}=window.UserLeap._config;if(!e)return!0;const o=[];n&&n.length&&o.push(...n),s&&s.length&&o.push(...s);const a=t&&o.find(l=>l.id===t);return a?i.checkUrlMatch(a,window.location.href):r===window.location.href}function j(t){var l;const{pageUrlEvents:r,interactiveEvents:n,dismissOnPageChange:s,platform:e}=window.UserLeap._config;if(e&&e!=="web")return;const o=P("trackStartUrl"),a=o?String(o):null;r&&Ve(window.location.href),n&&(He(),_t()),Oe()&&mt(),i.sessionStorageHelper.getItem("sprig.isCapturingHeatmap")&&((l=i.modules.replay)==null||l.checkPendingHeatmapsUrl()),!K()&&s&&a&&a!==window.location.href&&t&&kt.includes(t.type)&&window.UserLeap("dismissActiveSurvey",i.DismissReason.PageChange)}const Fe={capture:!0},_t=()=>{const r=window.UserLeap._config.interactiveEvents.filter(s=>i.checkUrlMatch(s,window.location.href)).map(s=>{const{name:e,properties:o}=s,{selector:a,innerText:l}=o;return a?d=>{if(Se(d.target))try{d.target.closest(a)&&window.UserLeap("track",e)}catch{}return!1}:d=>(Se(d.target)&&d.target.innerText===l&&window.UserLeap("track",e),!1)}),n=s=>r.forEach(e=>e(s));window.UserLeap._config.interactiveEventsHandler=n,window.addEventListener("click",n,Fe)},He=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,Fe),delete window.UserLeap._config.interactiveEventsHandler};function At(){["hashchange","popstate"].forEach(t=>window.addEventListener(t,j,!0))}function Dt(){["hashchange","popstate"].forEach(t=>window.removeEventListener(t,j,!0)),window.UserLeap._config.interactiveEvents&&He()}function Ot(t){const r=new URL(I("1",[x],"questions"));return Object.entries(t||{}).forEach(([n,s])=>{s&&r.searchParams.append(n,String(s))}),r.toString()}function P(t){const r=i.localStorageHelper.getItem("userleap.ids");if(r)try{const s=JSON.parse(r)[window.UserLeap.envId];return s&&s[t]||null}catch(n){n instanceof Error&&(n.stack=r,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function Me(){window.previewMode||(window.UserLeap.visitorId=i.v4(),i.info(`Generating new vid: ${window.UserLeap.visitorId}`),U("vid",window.UserLeap.visitorId),i.eventEmitter.emit(i.SprigEvent.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function Ve(t,r,n,s){var w,m,g;if(t.endsWith("mock_snippet.html"))return;i.info(`Tracking page view: ${t}`);const e=window.UserLeap._config.pageUrlEvents;let o=!1;if(e&&e.length)for(let y=0;y<e.length&&(o=i.checkUrlMatch(e[y],t),!o);y++);if(!o)return;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig trackPageView",t);const a=10,l=1;let d=[];const p={viewedAt:Date.now(),location:t},c={url:t};s&&(c.trackPageView=!0);const u=i.localStorageHelper.getItem("userleap.pageviews");try{if(d=u?JSON.parse(u):[],Array.isArray(d)||(d=[]),d.length>0){const y=d[d.length-1],A=(Date.now()-y.viewedAt)/1e3;if(y.location!=t&&A>l){const b=(w=document==null?void 0:document.querySelector('meta[name="description"]'))==null?void 0:w.getAttribute("content");(m=i.modules.replay)==null||m.RecordPageView({...b&&{description:b},url:t,referrer:document.referrer,pageTitle:document.title})}(y.location!=t&&A>l||A>a)&&(window.UserLeap._queue.push(["track",ne,r,c,n]),d.push(p))}else window.UserLeap._queue.push(["track",ne,r,c,n]),d.push(p),(g=i.modules.replay)==null||g.RecordPageView({url:t});d.length>5&&d.splice(0,d.length-5),i.localStorageHelper.setItem("userleap.pageviews",JSON.stringify(d))}catch(y){y instanceof Error&&window.UserLeap.reportError("trackPageView",y,{pageViewsStorage:u}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function xt(){const t="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in t&&(t.pushState=(r=>function(...s){const e=r.apply(this,s),o=new Event("pushState");return window.dispatchEvent(o),j(o),e})(t.pushState)),"replaceState"in t&&(t.replaceState=(r=>function(...s){const e=r.apply(this,s),o=new Event("replaceState");return window.dispatchEvent(o),j(o),e})(t.replaceState)),At()}async function ee(t,r){const n=se();t&&!r&&(window.UserLeap._config.mode=It.test);const s=i.getHttpHeaders(window.UserLeap),e=ae(s),o=await R(Ot({desktopDisplay:window.UserLeap._config.desktopDisplay,isMobile:e,previewLanguage:window.UserLeap._config.previewLanguage,surveyid:t==null?void 0:t.surveyId,surveytemplateid:t==null?void 0:t.surveyTemplateId,vid:n}),{shouldDropOnRateLimit:!0});if(!o.ok)return o.reportError&&o.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",o.error),window.UserLeap.reportError("getQuestions",o.error)),{success:!1,surveyState:"no survey"};if(o.json.delay&&await i.delay(o.json.delay),o.json.isFeedback){const{feedbackLabel:a,productConfig:l,surveyUuid:d,feedbackCustomStyles:p}=o.json,{buttonTheme:c,placement:u,desktopDisplay:w}=l,m={customStyles:p,buttonTheme:c,desktopDisplay:w,eventId:0,feedbackLabel:a,placement:u,surveyUuid:d,surveyId:t==null?void 0:t.surveyId};Ce(m,o.json)}else return N(o.json)}function Tt(t){let r=t.length;for(;r;){const n=Math.floor(Math.random()*r);r-=1;const s=t[r];t[r]=t[n],t[n]=s}}function Pt(t){if(!t)return;window.UserLeap._config=t,t.mute&&window.UserLeap._queue.pause();const{interactiveEvents:r,pageUrlEvents:n,dismissOnPageChange:s}=t;r&&Tt(r),(r||n||s)&&(xt(),j())}async function Ct(t,r){var s,e;let n=!0;return r&&((s=t==null?void 0:t.json)!=null&&s.surveyId)&&(window.UserLeap.delayingSurvey=!0,n=await r(t.json.surveyId),window.UserLeap.delayingSurvey=!1,!n)?!1:((e=t==null?void 0:t.json)!=null&&e.delay&&(window.UserLeap.delayingSurvey=!0,await i.delay(t.json.delay),window.UserLeap.delayingSurvey=!1),n)}const Ft=function(t){if(!window.UserLeap)return;const r=async(e={})=>{var S,L,D,k,E;const{userId:o,anonymousId:a,metadata:l={},properties:d,showSurveyCallback:p}=e;let{eventName:c}=e;if(window.UserLeap.debugMode&&c!==ne&&console.info("[DEBUG] Sprig track",e),t.mode==="test")return;const u=i.localStorageHelper.getItem("sprig.previewKey")??void 0;if(t.requireUserIdForTracking&&!window.UserLeap.userId&&!o){const v="[Sprig] - Skipping tracking without userId";return console.warn(v),{success:!1,message:v,surveyState:"no survey"}}if(!c||c.trim().length===0){c=c?String(c):"";const v="[Sprig] - Invalid event name "+c;return console.warn(v),{success:!1,message:v,surveyState:"no survey"}}const w=window.location.href;if(l.url||(l.url=w),U("trackStartUrl",w),(L=(S=window.UserLeap)==null?void 0:S._config)!=null&&L.optimizelyEnabled){const v=i.getHttpHeaders(window.UserLeap);de(v)||z.getAndSetWebOptimizelyExperiments(),l.optimizelyExperiments=Object.assign({},z.getAllOptimizelyExperiments())}(k=(D=window.UserLeap)==null?void 0:D._config)!=null&&k.launchDarklyEnabled&&(l.launchDarklyFlags=re.getAllLaunchDarklyVariations()),o&&(window.UserLeap.userId=o),a&&(window.UserLeap.partnerAnonymousId=a),d&&(l.eventProperties=d),(E=i.modules.replay)==null||E.RecordEvent({name:c,url:l.url}),i.info(`Tracking event: ${c}`);const m=window.UserLeap.delayingSurvey||xe()?await R(I("1",[O],"events/batch"),{body:JSON.stringify({events:[{event:c,metadata:l}],previewKey:u}),method:"POST",shouldDropOnRateLimit:!0}):await R(I("1",[O],"events"),{body:JSON.stringify({event:c,metadata:l,previewKey:u}),method:"POST",shouldDropOnRateLimit:!0});if(!m.ok){const v="[Sprig] (ERR-421) Failed to track event";return m.reportError&&(console.warn(v,m.error),m.error&&window.UserLeap.reportError("track",m.error)),{success:!1,message:v,error:m.error,surveyState:"no survey"}}o&&U("uid",o),a&&U("aid",a);const g=m.json;g.invalidPreviewKey&&i.localStorageHelper.removeItem("sprig.previewKey");const y=l.trackPageView?l.url:void 0;return!!(g!=null&&g.feedbackButton)&&Ce(g.feedbackButton,void 0,y),await Ct(m,p)?Rt(g.eventId,w)?N(g,y):{success:!1,message:"Study should not be displayed after page navigation",surveyState:"no survey"}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:"no survey"}},n=(e,o)=>{var l;const a=(l=e==null?void 0:e.querySelector(`[id="${le}"]`))==null?void 0:l.contentDocument;a&&$(a,o)},s={async displaySurvey(e){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",i.DismissReason.Override),ee({surveyId:e},!0)},_previewSurvey(e){window.UserLeap("dismissActiveSurvey",i.DismissReason.Override),ee({surveyTemplateId:e},!1)},_reviewSurvey(e){window.UserLeap("dismissActiveSurvey",i.DismissReason.Override),ee({surveyId:e},!1)},previewSurvey(e){s._previewSurvey(e)},reviewSurvey(e){s._reviewSurvey(e)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(e=i.DismissReason.API){i.eventEmitter.emit(i.SprigEvent.SurveyWillClose,{name:i.SprigEvent.SurveyWillClose,initiator:e})},async setAttribute(e,o){if(!e||!o&&o!==0&&o!==!1){const a="[Sprig] - Disregarding empty attribute / value provided";return console.warn(a),{success:!1,message:a}}return this.setAttributes({[e]:o})},async setAttributes(e){if(e==null||Object.keys(e).length===0){const o="[Sprig] - Disregarding empty attributes provided";return console.warn(o),{success:!1,message:o}}return this.identifyAndSetAttributes({attributes:e})},async identifyAndSetAttributes(e){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",e),t.mode==="test")return;if(e===null||typeof e!="object"||!(e.userId||e.anonymousId||e.attributes)){const c="[Sprig] - Disregarding empty payload provided";return console.warn(c),{success:!1,message:c}}const{userId:o,anonymousId:a,attributes:l}=e;if(t.requireUserIdForTracking&&!window.UserLeap.userId&&!o){const c="[Sprig] - Skipping tracking without userId";return console.warn(c),{success:!1,message:c}}if(!l&&(!o||window.UserLeap.userId===o)&&(!a||window.UserLeap.partnerAnonymousId===a))return{success:!0};const d={};o&&(d.userId=window.UserLeap.userId=o),a&&(d.partnerAnonymousId=window.UserLeap.partnerAnonymousId=a);let p;return l?(l.email&&!Object.prototype.hasOwnProperty.call(l,V)&&(l[V]=l.email,delete l.email),i.info(`Setting attributes: ${JSON.stringify(l)}`),p=await R(I("1",[x,O],"attributes"),{body:JSON.stringify(l),method:"PUT"}),!p.ok&&p.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",p.error),p.error&&window.UserLeap.reportError("identifyAndSetAttributes",p.error))):p=await R(I("1",[x,O]),{body:JSON.stringify(d),method:"PUT"}),l&&l[V]&&(window.UserLeap.email=l[V]),p.ok&&(o&&U("uid",o),a&&U("aid",a)),{success:!!p.ok}},async removeAttributes(e){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",e),t.mode==="test")return;if(e==null||e.length===0){const a="[Sprig] - Disregarding empty attributes provided";return console.warn(a),{success:!1,message:a}}if(t.requireUserIdForTracking&&!window.UserLeap.userId){const a="[Sprig] - Skipping tracking without userId";return console.warn(a),{success:!1,message:a}}const o=await R(I("1",[x,O],"attributes"),{body:JSON.stringify({delete:e}),method:"DELETE"});return!o.ok&&o.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",o.error),o.error&&window.UserLeap.reportError("removeAttributes",o.error)),{success:!!o.ok}},async addSurveyListener(e){i.eventEmitter.on(i.SprigEvent.SurveyLifeCycle,e)},async removeSurveyListener(e){i.eventEmitter.removeListener(i.SprigEvent.SurveyLifeCycle,e)},async addListener(e,o){i.eventEmitter.on(e,o)},async removeListener(e,o){i.eventEmitter.removeListener(e,o)},async removeAllListeners(){i.eventEmitter.removeAllListeners()},setPreviewKey(e){!e||typeof e!="string"||i.localStorageHelper.isStorageAvailable&&e&&i.localStorageHelper.setItem("sprig.previewKey",e)},async setUserId(e){var l;if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",e),e==null){const d=`[Sprig] - Invalid userId ${e}`;return console.warn(d),{success:!1,message:d}}if(t.mode==="test"||e===window.UserLeap.userId)return;window.UserLeap.userId=e;const o=window.UserLeap.visitorId,a=await R(I("1",[x,O]),{body:JSON.stringify({userId:e}),method:"PUT"});if(!a.ok){a.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",a.error),a.error&&window.UserLeap.reportError("setUserId",a.error));return}o!==window.UserLeap.visitorId&&((l=i.modules.replay)==null||l.clearUserReplayData()),U("uid",e)},async setPartnerAnonymousId(e){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",e),e==null){const o=`[Sprig] - Invalid partnerAnonymousId ${e}`;return console.warn(o),{success:!1,message:o}}return window.UserLeap.partnerAnonymousId=e,U("aid",e),{success:!0}},async track(e,o,a={},l=void 0){return r({eventName:e,properties:o,metadata:a,showSurveyCallback:l})},async identifyAndTrack(e){return await r(e)},trackPageView(e,o=void 0,a=void 0,l=!0){Ve(e,o,a,l)},applyFeedbackStyles({button:e="",view:o=""}){window.UserLeap.feedbackCustomStyles=o,document.getElementById("sprig-feedback-style")&&$(document,e,window.UserLeap.styleNonce),n(document.querySelector(".ul-container-feedback"),o)},applyStyles(e){window.UserLeap.customStyles=e,n(window.UserLeap.container,e)},setWindowDimensions(e,o){var p,c;const a=typeof e=="string"?parseInt(e,10):e,l=typeof o=="string"?parseInt(o,10):o;if(!isNaN(a)&&!isNaN(l)&&(window.UserLeap.windowDimensions={width:a,height:l}),!window.UserLeap.frameId)return;const d=document.getElementById(window.UserLeap.frameId);d&&(window.UserLeap.useMobileStyling&&((p=window.UserLeap.windowDimensions)!=null&&p.width&&(d.style.width=`${window.UserLeap.windowDimensions.width}px`),(c=window.UserLeap.windowDimensions)!=null&&c.height&&(d.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),d.contentDocument&&(d.style.height=String(De(d.contentDocument)[0])+"px")),i.eventEmitter.emit(i.SprigEvent.SurveyDimensions,{name:i.SprigEvent.SurveyDimensions,contentFrameWidth:d.clientWidth,contentFrameHeight:d.clientHeight}))},logoutUser(){var e;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),i.info(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,i.localStorageHelper.removeItem("userleap.ids"),i.localStorageHelper.removeItem("userleap.pageviews"),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),Me(),(e=i.modules.replay)==null||e.clearUserReplayData(),window.UserLeap._queue.unpause()},teardown(){Dt(),window.UserLeap("dismissActiveSurvey",i.DismissReason.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(e,o=!0){var a,l;if(!((l=(a=window.UserLeap)==null?void 0:a._config)!=null&&l.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const d=typeof e=="string"?JSON.parse(e):e;z.setOptimizelyExperiment(d,o)}catch(d){console.warn("[Sprig] Error with integrating Optimizely data"),d instanceof Error&&window.UserLeap.reportError("integrateOptimizely",d)}},integrateOptimizelyClient(e){var a,l;if(!((l=(a=window.UserLeap)==null?void 0:a._config)!=null&&l.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const o=({experiment:d,variation:p})=>{const c={experiments:[{id:d.id,variation:p.key}]};window.UserLeap("integrateOptimizely",c,!1)};e.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event",o)},importLaunchDarklyData(e){var o,a;if(!((a=(o=window.UserLeap)==null?void 0:o._config)!=null&&a.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}re.setLDFlagsVariations(e)},setVisitorAttribute(e,o){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),s.setAttribute(e,o)},async setEmail(e){return s.setAttribute(V,e)},async setVisitorEmail(e){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),s.setEmail(e)},async _generateVideoUploadUrl(e){return Bt(e)},_reportMetric(e,o){i.reportAndRegister(e,o)},async _completeSessionReplay({surveyId:e,responseGroupUuid:o,eventDigest:a}){var l;return i.modules.replay?(l=i.modules.replay)==null?void 0:l._completeSessionReplay({surveyId:e,responseGroupUuid:o,eventDigest:a,headers:i.getHttpHeaders(window.UserLeap)}):(window.UserLeap.reportError("_completeSessionReplay",new Error("Replay module not registered")),!1)}};Object.assign(window.UserLeap,s)};async function Ht(t){const r=i.getHttpHeaders(window.UserLeap);document.addEventListener("securitypolicyviolation",i.cspViolationHandler);const n=await i.sprigFetch(I("1",[x],"config"),{headers:r}),s="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===s?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",i.cspViolationHandler),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),i.killNetworkRequests("Disabled: failed to fetch configuration"),t;const e=n.json;return e!=null&&e.disabled?(i.killNetworkRequests(`Disabled: ${e.disabled}`),{disabled:e.disabled}):Object.assign({},e,t)}const Mt=t=>typeof t=="object"&&t&&"inner"in t&&!!t.inner&&typeof t.inner=="object";async function Vt(t,r,n={}){var u,w;const s=window.__cfg&&window.__cfg.mode,e=se(),o=window.UserLeap.envId,a=window.document.documentElement,l=Mt(r)?{inner:{message:(u=r.inner)==null?void 0:u.message,stack:(w=r.inner)==null?void 0:w.stack}}:{},d={mode:s,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:window.navigator.language,...n,...l},p={action:t,err:{message:r.message,stack:r.stack},meta:d,vid:e,envId:o},c=await R(I("1",null,"errors"),{method:"POST",headers:{"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(p),shouldDropOnRateLimit:!0});if(!c.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",r);else{const{presignedUrl:m}=c.json;i.uploadLogfile(m)}}async function Bt(t){var n;if(!t)return;const r=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const s=await fetch(r,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok){const e=await s.json();return(n=e==null?void 0:e.upload)==null?void 0:n.url}else return null}catch(s){console.warn("[Sprig] Error with generating video upload url"),s instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",s)}}function Nt(t={}){const r=new URLSearchParams(window.location.search).get("sprigPreviewKey")??"";window.UserLeap.UPDATES=i.EVENTS,window.UserLeap("setPreviewKey",r);async function n(){var l;if(window.UserLeap.loaded)return;if(i.info("Loading sprig on page load"),window.UserLeap.reportError=Vt,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},t,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const d in window.UserLeap._config)window.UserLeap[d]=window.UserLeap._config[d];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const s=window.UserLeap.sampleRate;if(s){let d=P("sampled");if(d===null&&(d=Math.random()<s,U("sampled",d)),!d)return}else P("sampled")!==null&&U("sampled",null);window.UserLeap._API_URL||(window.UserLeap._API_URL="https://api.sprig.com");const e=[...window.UserLeap._queue];window.UserLeap._queue=new bt(window.UserLeap,[]),window.UserLeap._queue.pause();for(let d=0;d<e.length;d++)window.UserLeap._queue.push(e[d]);const o=P("token");o?(window.UserLeap.token=o,window.UserLeap.visitorId=P("vid"),window.UserLeap.userId=P("uid"),window.UserLeap.partnerAnonymousId=P("aid")):(i.localStorageHelper.removeItem("userleap.ids"),Me());const a=await Ht(t);Ut({webMetricsEnabled:a.metricsReportingEnabled,reportingIntervalSeconds:a.metricsReportingEnabled||a.mobileMetricsReportingEnabled?a.metricsReportingIntervalSeconds:0,thresholds:a.metricThresholds,postMetrics:async d=>{var p;await R(I("1",[x],"metrics"),{body:d,method:"POST",headers:{"x-ul-replay-enabled":`${!!((p=i.modules.replay)!=null&&p.isReplayRecording())}`},shouldDropOnRateLimit:!0})}}),(l=i.modules.replay)==null||l.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:a.maxReplayDurationSeconds,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests??2,replaySettings:a.replaySettings}),i.configureLogger(a.logBufferLimit,a.logLevel),Ft(a),await Pt(a),window.UserLeap._queue.unpause(),i.eventEmitter.emit(i.SprigEvent.SDKReady,{mobileMetricsReportingEnabled:!!a.mobileMetricsReportingEnabled,metricsReportingInterval:a.metricsReportingIntervalSeconds||0,metricsThresholds:a.metricThresholds||[],maxMobileReplayDurationSeconds:a.maxMobileReplayDurationSeconds,mobileReplaySettings:a.mobileReplaySettings}),i.eventEmitter.emit(i.SprigEvent.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}document.readyState==="complete"?n():window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",()=>{n()},!1)}class G{constructor(){this.UPDATES=i.EVENTS}displaySurvey(r){window.Sprig("displaySurvey",r)}mute(){window.Sprig("mute")}unmute(){window.Sprig("unmute")}dismissActiveSurvey(){window.Sprig("dismissActiveSurvey")}setAttribute(r,n){window.Sprig("setAttribute",r,n)}setAttributes(r){window.Sprig("setAttributes",r)}identifyAndSetAttributes(r){window.Sprig("identifyAndSetAttributes",r)}removeAttributes(r){window.Sprig("removeAttributes",r)}addListener(r,n){window.Sprig("addListener",r,n)}removeListener(r,n){window.Sprig("removeListener",r,n)}removeAllListeners(){window.Sprig("removeAllListeners")}setEmail(r){window.Sprig("setAttribute","!email",r)}setUserId(r){window.Sprig("setUserId",r)}setPartnerAnonymousId(r){window.Sprig("setPartnerAnonymousId",r)}track(r,n={},s={}){window.Sprig("track",r,n,s)}identifyAndTrack(r){window.Sprig("identifyAndTrack",r)}trackPageView(r,n,s){window.Sprig("trackPageView",r,n,s)}applyStyles(r){window.Sprig("applyStyles",r)}setWindowDimensions(r,n){window.Sprig("setWindowDimensions",r,n)}logoutUser(){window.Sprig("logoutUser")}teardown(){window.Sprig("teardown")}}const oe={configure:t=>{if(!t.envId&&!t.environmentId)throw new Error("Initialization Error: Sprig configure requires an environmentId");if(t.envId||(t.envId=t.environmentId??""),t.installationMethod="web-npm",window.Sprig)return window.Sprig;window.Sprig=function(){window.Sprig._queue.push(arguments)},Object.getOwnPropertyNames(G.prototype).map(n=>{n!=="constructor"&&(window.Sprig[n]=G.prototype[n])});const r=window.Sprig;return r.appId=t.envId,r._queue=[],window.UserLeap=r,Nt(t),window.Sprig}},Wt={sprig:oe,SprigAPI:G,configure:oe.configure};exports.APP_ID=Ke;exports.ConflictingWidgets=Ie;exports.DEFAULT_BORDER_COLOR=Je;exports.DEFAULT_WIDTH=Ee;exports.EMBED_MOBILE_MAX_WIDTH=Xe;exports.ERROR_BORDER_COLOR=Qe;exports.SprigAPI=G;exports.calculateFrameDimensions=De;exports.core=Wt;exports.overrideStyles=$;exports.resetScrollPosition=pt;exports.sprig=oe;