@sprig-technologies/sprig-browser 2.30.3 → 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.
- package/dist/core-IYeRexvz.js +12 -0
- package/dist/core-pJaEAG0Z.cjs +12 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/metricsReporter-ChJRb1ed.js +2 -0
- package/dist/metricsReporter-DwcQeyB8.cjs +2 -0
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/dist/{view-Jfb4S82A.cjs → view-C-j1BBYA.cjs} +2 -2
- package/dist/{view-CJBVxA0k.js → view-CVyjVx3W.js} +2 -2
- package/package.json +1 -1
- package/dist/core-ChUnpqXT.js +0 -12
- package/dist/core-DL58LekA.cjs +0 -12
- package/dist/metricsReporter-DNUikwDb.js +0 -2
- package/dist/metricsReporter-dYIN7Y-U.cjs +0 -2
|
@@ -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-ChUnpqXT.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-DNUikwDb.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.3",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
package/dist/core-ChUnpqXT.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var it=Object.defineProperty,ot=(t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B=(t,e,n)=>(ot(t,typeof e!="symbol"?e+"":e,n),n);import{h as F,s as Ee,f as w,S as g,l as k,i as x,v as xe,m as U,j as st,E as N,D as j,c as at,r as dt,k as lt,n as ct,o as pt,p as ut,q as _e,t as Ae,u as wt,a as gt,x as de,b as yt,y as Re}from"./metricsReporter-DNUikwDb.js";const mt='.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}',De="360px",vt="ul-app",ft="#e6e6e6",ht="#bd282a",bt=500,Lt=1030,Oe=()=>{try{return window.parent.Intercom}catch{return null}},Ut=()=>{const t=Oe();t&&(t.ul_wasVisible&&t("update",{hide_default_launcher:!1}),delete t.ul_wasVisible)},St=()=>{const t=Oe();t&&(t.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),t.ul_wasVisible&&t("update",{hide_default_launcher:!0}))},It=Object.freeze(Object.defineProperty({__proto__:null,disable:St,enable:Ut},Symbol.toStringTag,{value:"Module"})),Pe=[It];class Ce{static disable(){Pe.forEach(e=>e.disable())}static enable(){Pe.forEach(e=>e.enable())}}const Te="ul-view-sdk-script",kt=["ios","android"],C="visitors",T="environments";async function D(t,e){var n,o,r;const{shouldDropOnRateLimit:i,...a}=e;a.headers=Object.assign(F(window.UserLeap),a.headers);const s=await Ee(t,{...a,shouldDropOnRateLimit:i});if(s.ok){const d=(n=s.headers)==null?void 0:n.get("Authorization"),p=d?d.split(" "):void 0,l=p&&p.length===2?p[1]:void 0,c=(o=s.headers)==null?void 0:o.get("x-ul-visitor-id");l&&c&&(c!==window.UserLeap.visitorId||window.UserLeap.token!==l)&&(E("token",l),E("vid",c),w.emit(g.VisitorIDUpdated,{visitorId:c}),window.UserLeap.token=l,window.UserLeap.visitorId=c)}return(r=s.json)!=null&&r.logMessage&&console.warn(`[Sprig] ${s.json.logMessage}`),s}function E(t,e){const n=k.getItem("userleap.ids");let o={};if(n)try{o=JSON.parse(n)}catch(i){i instanceof Error&&(i.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",i)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",i)}let r=o[window.UserLeap.envId];r?r[t]=e:r={[t]:e},o[window.UserLeap.envId]=r;try{k.setItem("userleap.ids",JSON.stringify(o))}catch(i){i instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${i.message}`)}}function le(){return window.previewMode?"0":window.UserLeap.visitorId??""}function R(t,e,n){const o=[window.UserLeap._API_URL,"sdk",t];return e&&e.forEach(r=>{o.push(r),r===T?o.push(window.UserLeap.envId):r===C&&o.push(le())}),n&&o.push(n),o.join("/")}const W=async(t,e)=>{var n,o,r;const{context:i,forceBrandedLogo:a,endCard:s,isFeedback:d=!1,heatmap:p,locale:l,previewMode:c,productConfig:u,questions:f,responseGroupUid:m,surveyId:y,uuid:_,vid:b,sessionReplay:h,studyType:A}=t,S=F(window.UserLeap),I=pe(S),ie=ce(S);if(x(`Attempting to display survey: ${y}`),h)if(x("Survey has replay attached"),I)w.emit(g.ReplayCapture,{responseGroupUid:m,hasQuestions:!!(f!=null&&f.length),surveyId:y,uploadId:h.uploadId,replayType:h.replayDurationType??"before",seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:{mediaRecordingUid:xe(),mediaType:"screen",questionId:1,responseGroupUid:m,surveyId:y,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0}});else{if(!U.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};U.replay.scheduleOrCaptureReplay({responseGroupId:m,surveyId:y,visitorId:b,replayParams:h,completeUploadHeaders:S,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:f.length===0})}if(p){if(!U.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};const{eventId:L,replayParams:ae,responseGroupUid:rt,surveyId:nt}=p;await U.replay.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:300,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests,teardownAfter:!0}),U.replay.scheduleCapture({apiUrl:window.UserLeap._API_URL,completeUploadHeaders:S,eventId:L,isHeatmap:!0,replayParams:ae,responseGroupId:rt,surveyId:nt,triggerTimestamp:Date.now(),visitorId:b})}if(b==null||!(f!=null&&f.length))return x(`Not displaying survey: vid: ${b} / questions: ${f}`),{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){x("Already displaying a survey");const L="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(L),{success:!1,message:L,surveyState:"no survey"}}if(b!==window.UserLeap.visitorId&&_!==window.UserLeap.visitorId&&!window.previewMode){const L="Attempted to display survey to a different visitor";return x(L),window.UserLeap.reportError("DisplaySurvey",new Error(L)),{success:!1,message:L,surveyState:"no survey"}}x(`Showing survey: ${y}`),(n=U.replay)==null||n.RecordSurveyShown({id:y,userAgent:window.navigator.userAgent}),Ce.disable(),w.emit(g.SurveyWillPresent,{name:g.SurveyWillPresent,"survey.id":y});let K,Q=document.createElement("div"),Y,P,X;const Se=L=>{const{"view.version":ae}=L;ae!==S["x-ul-sdk-version"]&&je(),w.removeListener("verify.view.version",Se)};w.on("verify.view.version",Se),window.UserLeap.useMobileStyling=ie,st(S)?(K="ul-direct-embeded-frame",Y=document.head,P=window,X=!1,I&&(Fe(d),Q.id=K,window.UserLeap.container.appendChild(Q),Me(),w.emit(g.SurveyLifeCycle,{state:"presented"}),w.emit(g.SurveyPresented,{name:g.SurveyPresented,"survey.id":y}))):{frameId:K,contentWinDocHead:Y,contentWindow:P,hasOverlay:X,iframe:Q}=Rt({productConfig:u,useMobileStyling:ie,surveyId:y,isFeedback:d}),window.UserLeap.frameId=K;const Ze=L=>{w.once(g.CloseSurveyOnOverlayClick,L)},q={apiURL:window.UserLeap._API_URL,cards:f,configureExitOnOverlayClick:Ze,context:i,endCard:s,envId:window.UserLeap.envId,eventEmitFn:w.emit.bind(w),fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,forceBrandedLogo:a,frame:Q,headers:S,locale:l,mobileSDKVersion:window.UserLeap.mobileSDKVersion,previewKey:k.getItem("sprig.previewKey"),previewMode:c,productConfig:{framePosition:u?.framePosition,desktopDisplay:u?.desktopDisplay,placement:u?.placement},responseGroupUid:m,startingQuestionIdx:(o=window.UserLeap.config)==null?void 0:o.startingQuestionIdx,studyType:A,styleNonce:window.UserLeap.styleNonce,surveyId:y,tabTitle:document.title,trackPageViewUrl:e,ulEvents:N,upchunkLibraryURL:window.UserLeap.upchunkLibraryURL,useMobileStyling:ie,userId:_,viewDocument:P?.document,viewWindow:P,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},...window.UserLeap._config};(r=window.UserLeap._config)!=null&&r.startingQuestionIdx&&(window.UserLeap._config={...window.UserLeap._config,startingQuestionIdx:null});const et=(d?window.UserLeap.feedbackCustomStyles:window.UserLeap.customStyles)??u.customStyles;q.customStyles=et,P&&(P.__cfg=q);function tt(){const L=document.createElement("script");return window.UserLeap.nonce&&L.setAttribute("nonce",window.UserLeap.nonce),L.id=Te,L}const oe=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:q.path,Ie=document.getElementById(Te);Ie&&Ie.remove();const se=tt(),ke=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(q.installationMethod==="web-npm"||q.installationMethod==="web-npm-bundled"){const{default:L}=await import("./view-CJBVxA0k.js");L.configure(q),X&&window.UserLeap.container&&ke()}else oe&&(se.src=oe,X&&se.addEventListener("load",()=>{window.UserLeap.container&&ke()}),P?.addEventListener("error",L=>{L.target instanceof HTMLScriptElement&&L.target.src===oe&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));return Y?.appendChild(se),{success:!0,surveyState:"ready",surveyId:y,responseGroupUid:m}};function ce(t){var e;if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const n=((e=window.UserLeap.windowDimensions)==null?void 0:e.width)??document.body.clientWidth;return pe(t)||n>10&&n<bt}function pe(t){return kt.includes(t["userleap-platform"])}const ue="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 Et="rgba(255,255,255, 0.95)",xt="rgba(0,0,0,0.9)",we="0px",Fe=(t,e)=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className=`ul-container ${t&&"ul-container-feedback"}`;const n=Ne();e&&n&&!window.UserLeap.useMobileStyling?n.appendChild(window.UserLeap.container):document.body.appendChild(window.UserLeap.container)},je=(t,e)=>{var n;Ot();const o=window.UserLeap.container;if(o)try{(n=o.parentNode)==null||n.removeChild(o),window.UserLeap.container=null,E("trackStartUrl",null),w.emit(g.SurveyLifeCycle,{state:"dismissed"}),w.emit(g.SurveyClosed,{name:g.SurveyClosed,initiator:t,studyType:e})}catch(r){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} `+o),r instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",r)}},Me=()=>{w.once(g.SurveyWillClose,({initiator:t,studyType:e})=>{w.removeAllListeners(g.CloseSurveyOnOverlayClick),je(t,e)})},_t=(t,e)=>{const n={position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646},o=e?t.overlayStyleMobile:t.overlayStyle;n["background-color"]=o==="light"?Et:xt,e||(n.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,n)},At=(t,e,n,o)=>{var r,i;const a={position:"fixed",bottom:"0px",right:we,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%"},s=Object.assign({},e,window.UserLeap),{desktopDisplay:d}=e||{},p=d==="center-modal";p&&(s.framePosition="center");let l,c=!1;if(n)(r=window.UserLeap.windowDimensions)!=null&&r.width?a.width=`${window.UserLeap.windowDimensions.width}px`:a.width="100%",(i=window.UserLeap.windowDimensions)!=null&&i.height?a.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?a.maxHeight=window.UserLeap.maxHeight:a.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(s.overlayStyleMobile)&&(c=!0);else{a.width=De,a.maxHeight=window.UserLeap.maxHeight||"66vh";const u=()=>{c=!0,l={margin:"auto",position:"static"}};if(o)p?u():l={position:"relative",height:"300px"};else switch(s.framePosition){case"bottomLeft":l={left:we};break;case"topLeft":l={left:we,top:0};break;case"topRight":l={top:0};break;case"center":u();break}}return c&&_t(s,n),Object.assign(t.style,a,l),c},Rt=({productConfig:t,useMobileStyling:e,surveyId:n,isFeedback:o})=>{var r,i;const a=ue,s=o&&t.desktopDisplay==="slider";Fe(o,s),Dt();const d=document.createElement("iframe");d.id=a,d.setAttribute("title","Sprig User Feedback Dialog");const p=At(d,t,e,o);Me();let l=!1;d.setHeight=m=>{(parseInt(d.style.height)!=m||!l)&&(l=!0,d.style.height=`${m}px`,w.emit(g.SurveyHeight,{name:g.SurveyHeight,contentFrameHeight:m}))};let c=!1;d.setWidth=m=>{(parseInt(d.style.width)!=m||!c)&&(c=!0,d.style.width=`${m}px`,w.emit(g.SurveyWidth,{name:g.SurveyWidth,contentFrameWidth:m}))},(r=window.UserLeap.container)==null||r.appendChild(d),t&&(e?t.exitOnOverlayClickMobile:t.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{w.emit(g.CloseSurveyOnOverlayClick)}),w.emit(g.SurveyLifeCycle,{state:"presented"}),w.emit(g.SurveyPresented,{name:g.SurveyPresented,"survey.id":n});const u=(i=d.contentWindow)==null?void 0:i.document;if(u&&(u.open("text/html","replace"),u.write("<!doctype html><head></head><body></body></html>"),u.close(),!e)){const m=u.body;m.style.display="flex",m.style.alignItems="center"}const f=u?.head;return{frameId:a,contentWinDocHead:f,contentWindow:d.contentWindow,hasOverlay:p,iframe:d}},qe={[g.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},Dt=()=>{Object.entries(qe).forEach(([t,e])=>{w.on(t,e)})},Ot=()=>{Object.entries(qe).forEach(([t,e])=>{w.off(t,e)})},Pt=1,ze=t=>t instanceof HTMLElement||t instanceof SVGElement,Z=(t,e,n)=>{const o="ul-custom-style",r=t.getElementById(o);if(r){r.textContent=e;return}const i=t.createElement("style");n&&(i.nonce=n),i.textContent=e,i.id=o,t.head.appendChild(i)},Be=t=>{const e=t.querySelector(".ul-card__container");let n=600,o=360;if(e){n=e.scrollHeight;const r=getComputedStyle(e),i=parseFloat(r.marginTop)+parseFloat(r.marginBottom),a=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);n+=i+a+s;const d=e.querySelector(".ul-card--matrix_grid");o=d?d.scrollWidth:e.scrollWidth;const p=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),l=parseFloat(r.marginLeft)+parseFloat(r.marginRight),c=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth);o+=l+c+p}return[n+Pt,o]},Ct=t=>{const e=t.querySelector(".ul-card__container");e&&(e.scrollTop=0)},Ne=()=>v,z=()=>document.getElementById("sprig-feedback-container"),ge=()=>document.getElementById("sprig-feedback-loading-animation"),Tt=()=>{if(ge())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},We=()=>!!document.getElementById(ue);let $e=!1,v=null,O=null,ye=!1,$=null,V=null;const Ft=["bottom-left","bottom-right","center-left","center-right"],jt=t=>{if(z()||!Ft.includes(t))return;const[e,n]=t.split("-"),o=document.createElement("div");o.id="sprig-feedback-container",o.classList.add(`sprig-feedback-container-${n}`,`sprig-feedback-container-${e}`),document.body.appendChild(o)},ee=()=>{var t;const e=window.UserLeap.container;return((t=e?.parentElement)==null?void 0:t.id)==="sprig-feedback-loading-container"},Ve=()=>document.getElementById("sprig-feedback-error-container"),He=()=>{if(!v)return 0;const t=v?.clientWidth,e=window.getComputedStyle(v),n=parseInt(e.borderRightWidth||"0"),o=parseInt(e.borderLeftWidth||"0");return t+n+o},te=t=>{const e=z();e&&(V!=null&&V.endsWith("right")?e.style.right=`${t}px`:V!=null&&V.endsWith("left")&&(e.style.left=`${t}px`))},me=()=>{if(v&&(ee()||Ve())){w.off(g.SurveyAppeared,H),ve();const t=He();return te(-t),!0}return!1},H=()=>{if(!v||!O)return;const t=ge();t&&t.remove(),v.style.height="auto",v.style.width="auto",O.disabled=!1,ye=!1},ve=()=>{if(v&&!ge()){const t=Tt();t&&(v.style.height="300px",v.style.width="360px",v.appendChild(t))}},Ge=()=>{!v||!O||(te(0),O.disabled=!0,ye=!0)},Mt=async t=>{const e=await D(R("1",[C],"startFeedbackStudy"),{body:JSON.stringify({surveyUuid:t}),method:"POST"});return e.ok?e.json:null},Je=async(t,e,n)=>{const{buttonTheme:o,customStyles:r,eventId:i,placement:a,desktopDisplay:s,feedbackLabel:d,surveyUuid:p,surveyId:l}=t;window.UserLeap.feedbackCustomStyles=void 0;let c=z();if(c){if(!e&&i===$)return;c.remove(),w.off(N.SURVEY_FADING_OUT,me)}if($=i,!document.getElementById("sprig-feedback-style")){const{head:b}=document,h=document.createElement("style");h.id="sprig-feedback-style",h.textContent=mt,h.nonce=window.UserLeap.styleNonce,b.appendChild(h)}Z(document,r??"",window.UserLeap.styleNonce),$e=s==="center-modal",V=a;const[u,f]=a.split("-");jt(a),c=z(),O=document.createElement("button");const m=document.createElement("div");m.className="sprig-feedback-button-label",m.innerText=d,O.appendChild(m),O.id="sprig-feedback-button",O.classList.add(`sprig-feedback-button-${f}`,`sprig-feedback-button-${u}`,`sprig-feedback-button-${o}`,"fade-in-transition"),w.on(N.SURVEY_FADING_OUT,me),O.addEventListener("click",async()=>{const b=document.getElementById("sprig-feedback-error-container");if(We()||Ve()){if(me()){w.emit(g.SurveyWillClose,{name:g.SurveyWillClose,initiator:j.FeedbackClosed,studyType:"feedbackButton"});const S=z();b&&S&&(S.remove(),$=null,v=null)}return}const h=F(window.UserLeap);if(!ce(h)&&!ye&&Ge(),e){v&&v.classList.add("sprig-feedback-loading-container-previews"),await W(e),H();return}const A=await Mt(p);if(A)w.once(g.SurveyAppeared,H),W({...A,studyType:"feedbackButton"},n);else if(v){const S=zt();v.appendChild(S),H(),v.style.height="300px",v.style.width="360px"}}),c?.appendChild(O),w.emit(g.FeedbackButtonLoaded,{name:g.FeedbackButtonLoaded,"survey.id":l});const{useMobileStyling:y,_config:{border:_}}=window.UserLeap;if(!$e&&!y){const b=document.createElement("div");b.id="sprig-feedback-loading-container",b.className=`sprig-feedback-loading-container sprig-feedback-loading-container-${f}`,b.style.setProperty("--feedback-border",_),v=b,ve(),c?.appendChild(b);const h=He();te(-h)}else te(0);window.UserLeap._config.isOnQuestionsTab&&e&&!ee()&&v&&(Ge(),ve(),v&&v.classList.add("sprig-feedback-loading-container-previews"),W(e),H())},qt=()=>{if(ee())return;const t=z();t&&(at($)||(t.remove(),$=null,v=null))},zt=()=>{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 e=document.createElement("h3");return e.className="sprig-feedback-error-text",e.innerText="There was an error while loading the survey",t.appendChild(e),t},Bt="!launch_darkly_";class Nt{constructor(){B(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(e){try{return!e||typeof e!="object"||Array.isArray(e)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(e).forEach(n=>this._ldData[`${Bt}${n}`]=(e[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 fe=new Nt;Object.freeze(fe);const Wt="!optimizely_experiments_";class $t{constructor(){B(this,"_optimizelyData",{})}setOptimizelyExperiment(e,n=!0){if(!e||typeof e!="object")return!1;const{experiments:o}=e;try{return n&&Object.keys(this._optimizelyData).map(r=>{delete this._optimizelyData[r]}),o&&o.map(r=>{const{id:i,variation:a}=r,s=this.transformExperimentId(i);a&&typeof a=="string"&&(this._optimizelyData[s]=a)}),!0}catch(r){return r instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",r),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(e){return this._optimizelyData[this.transformExperimentId(e)]}transformExperimentId(e){return Wt+e}getAndSetWebOptimizelyExperiments(){var e;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(e=window.optimizely.get("state"))==null?void 0:e.getExperimentStates({isActive:!0});if(n){const o=Object.keys(n).map(r=>{var i,a;return(i=n[r].variation)!=null&&i.name?{id:r,variation:(a=n[r].variation)==null?void 0:a.name}:{id:r,variation:"Original"}});return this.setOptimizelyExperiment({experiments:o},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const re=new $t;Object.freeze(re);class Vt{constructor(e,n){B(this,"paused"),B(this,"queue"),B(this,"ul"),this.ul=e,this.paused=!1,this.queue=[],this.flush(n)}flush(e){const n=e.length;if(n)for(let o=0;o<n;o++)this.push(e[o])}isPaused(){return this.paused}pause(){this.paused=!0}unpause(){this.paused=!1;const e=this.queue.slice();this.empty(),this.flush(e)}push(e){if(this.paused)this.queue.push(e);else if(e instanceof Function)e();else{const n=Array.prototype.slice.call(e,1),o=e[0],r=this.ul[o];r instanceof Function?r.apply(this.ul,n):o&&console.warn("[Sprig] (ERR-100) No valid UserLeap action called",o)}}perform(e){if(this.paused){let n=()=>{};const o=new Promise(function(r){n=function(){r(e())}});return this.queue.push(n),o}else return e()}empty(){this.queue.length=0}}const he=(t,e)=>{const n=performance.now();document.hidden?setTimeout(()=>he(t,e),t):setTimeout(()=>{const o=performance.now()-n;e.report(o/1e3),setTimeout(()=>he(t,e),t)},0)},Ht=(t=1e3)=>{const e=dt("sdk_event_queue_latency_seconds");he(t,e)},Gt=({webMetricsEnabled:t,reportingIntervalSeconds:e,thresholds:n,postMetrics:o})=>{lt(n,(r,i)=>{var a,s;if((a=U.replay)!=null&&a.isReplayRecording()){const d=`Value: ${r} on ${i.metric} violated threshold of ${i.type} ${i.value}`;(s=U.replay)==null||s.disableRecording("Threshold violated",new Error(d),{reportError:!1}),pt()}}),ct({reportingIntervalSeconds:e,postMetrics:o}),t&&Ht()},Jt={test:"test"},Kt=["popState","pushState","replaceState"],G="!email",be="pageUrl";function Qt(t,e){const{pageUrlEvents:n,interactiveEvents:o,dismissOnPageChange:r}=window.UserLeap._config;if(!r)return!0;const i=[];n&&n.length&&i.push(...n),o&&o.length&&i.push(...o);const a=t&&i.find(s=>s.id===t);return a?de(a,window.location.href):e===window.location.href}function J(t){var e;const{pageUrlEvents:n,interactiveEvents:o,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!=="web")return;const a=M("trackStartUrl"),s=a?String(a):null;n&&Xe(window.location.href),o&&(Qe(),Yt()),Ne()&&qt(),gt.getItem("sprig.isCapturingHeatmap")&&((e=U.replay)==null||e.checkPendingHeatmapsUrl()),!ee()&&r&&s&&s!==window.location.href&&t&&Kt.includes(t.type)&&window.UserLeap("dismissActiveSurvey",j.PageChange)}const Ke={capture:!0},Yt=()=>{const t=window.UserLeap._config.interactiveEvents.filter(n=>de(n,window.location.href)).map(n=>{const{name:o,properties:r}=n,{selector:i,innerText:a}=r;return i?s=>{if(ze(s.target))try{s.target.closest(i)&&window.UserLeap("track",o)}catch{}return!1}:s=>(ze(s.target)&&s.target.innerText===a&&window.UserLeap("track",o),!1)}),e=n=>t.forEach(o=>o(n));window.UserLeap._config.interactiveEventsHandler=e,window.addEventListener("click",e,Ke)},Qe=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,Ke),delete window.UserLeap._config.interactiveEventsHandler};function Xt(){["hashchange","popstate"].forEach(t=>window.addEventListener(t,J,!0))}function Zt(){["hashchange","popstate"].forEach(t=>window.removeEventListener(t,J,!0)),window.UserLeap._config.interactiveEvents&&Qe()}function er(t){const e=new URL(R("1",[T],"questions"));return Object.entries(t||{}).forEach(([n,o])=>{o&&e.searchParams.append(n,String(o))}),e.toString()}function M(t){const e=k.getItem("userleap.ids");if(e)try{const n=JSON.parse(e)[window.UserLeap.envId];return n&&n[t]||null}catch(n){n instanceof Error&&(n.stack=e,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function Ye(){window.previewMode||(window.UserLeap.visitorId=xe(),x(`Generating new vid: ${window.UserLeap.visitorId}`),E("vid",window.UserLeap.visitorId),w.emit(g.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function Xe(t,e,n,o){var r,i,a;if(t.endsWith("mock_snippet.html"))return;x(`Tracking page view: ${t}`);const s=window.UserLeap._config.pageUrlEvents;let d=!1;if(s&&s.length)for(let y=0;y<s.length&&(d=de(s[y],t),!d);y++);if(!d)return;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig trackPageView",t);const p=10,l=1;let c=[];const u={viewedAt:Date.now(),location:t},f={url:t};o&&(f.trackPageView=!0);const m=k.getItem("userleap.pageviews");try{if(c=m?JSON.parse(m):[],Array.isArray(c)||(c=[]),c.length>0){const y=c[c.length-1],_=(Date.now()-y.viewedAt)/1e3;if(y.location!=t&&_>l){const b=(r=document?.querySelector('meta[name="description"]'))==null?void 0:r.getAttribute("content");(i=U.replay)==null||i.RecordPageView({...b&&{description:b},url:t,referrer:document.referrer,pageTitle:document.title})}(y.location!=t&&_>l||_>p)&&(window.UserLeap._queue.push(["track",be,e,f,n]),c.push(u))}else window.UserLeap._queue.push(["track",be,e,f,n]),c.push(u),(a=U.replay)==null||a.RecordPageView({url:t});c.length>5&&c.splice(0,c.length-5),k.setItem("userleap.pageviews",JSON.stringify(c))}catch(y){y instanceof Error&&window.UserLeap.reportError("trackPageView",y,{pageViewsStorage:m}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function tr(){const t="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in t&&(t.pushState=(e=>function(...n){const o=e.apply(this,n),r=new Event("pushState");return window.dispatchEvent(r),J(r),o})(t.pushState)),"replaceState"in t&&(t.replaceState=(e=>function(...n){const o=e.apply(this,n),r=new Event("replaceState");return window.dispatchEvent(r),J(r),o})(t.replaceState)),Xt()}async function Le(t,e){const n=le();t&&!e&&(window.UserLeap._config.mode=Jt.test);const o=F(window.UserLeap),r=ce(o),i=await D(er({desktopDisplay:window.UserLeap._config.desktopDisplay,isMobile:r,previewLanguage:window.UserLeap._config.previewLanguage,surveyid:t?.surveyId,surveytemplateid:t?.surveyTemplateId,vid:n}),{shouldDropOnRateLimit:!0});if(!i.ok)return i.reportError&&i.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",i.error),window.UserLeap.reportError("getQuestions",i.error)),{success:!1,surveyState:"no survey"};if(i.json.delay&&await Re(i.json.delay),i.json.isFeedback){const{feedbackLabel:a,productConfig:s,surveyUuid:d,feedbackCustomStyles:p}=i.json,{buttonTheme:l,placement:c,desktopDisplay:u}=s,f={customStyles:p,buttonTheme:l,desktopDisplay:u,eventId:0,feedbackLabel:a,placement:c,surveyUuid:d,surveyId:t?.surveyId};Je(f,i.json)}else return W(i.json)}function rr(t){let e=t.length;for(;e;){const n=Math.floor(Math.random()*e);e-=1;const o=t[e];t[e]=t[n],t[n]=o}}function nr(t){if(!t)return;window.UserLeap._config=t,t.mute&&window.UserLeap._queue.pause();const{interactiveEvents:e,pageUrlEvents:n,dismissOnPageChange:o}=t;e&&rr(e),(e||n||o)&&(tr(),J())}async function ir(t,e){var n,o;let r=!0;return e&&(n=t?.json)!=null&&n.surveyId&&(window.UserLeap.delayingSurvey=!0,r=await e(t.json.surveyId),window.UserLeap.delayingSurvey=!1,!r)?!1:((o=t?.json)!=null&&o.delay&&(window.UserLeap.delayingSurvey=!0,await Re(t.json.delay),window.UserLeap.delayingSurvey=!1),r)}const or=function(t){if(!window.UserLeap)return;const e=async(r={})=>{var i,a,s,d,p;const{userId:l,anonymousId:c,metadata:u={},properties:f,showSurveyCallback:m}=r;let{eventName:y}=r;if(window.UserLeap.debugMode&&y!==be&&console.info("[DEBUG] Sprig track",r),t.mode==="test")return;const _=k.getItem("sprig.previewKey")??void 0;if(t.requireUserIdForTracking&&!window.UserLeap.userId&&!l){const I="[Sprig] - Skipping tracking without userId";return console.warn(I),{success:!1,message:I,surveyState:"no survey"}}if(!y||y.trim().length===0){y=y?String(y):"";const I="[Sprig] - Invalid event name "+y;return console.warn(I),{success:!1,message:I,surveyState:"no survey"}}const b=window.location.href;if(u.url||(u.url=b),E("trackStartUrl",b),(a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.optimizelyEnabled){const I=F(window.UserLeap);pe(I)||re.getAndSetWebOptimizelyExperiments(),u.optimizelyExperiments=Object.assign({},re.getAllOptimizelyExperiments())}(d=(s=window.UserLeap)==null?void 0:s._config)!=null&&d.launchDarklyEnabled&&(u.launchDarklyFlags=fe.getAllLaunchDarklyVariations()),l&&(window.UserLeap.userId=l),c&&(window.UserLeap.partnerAnonymousId=c),f&&(u.eventProperties=f),(p=U.replay)==null||p.RecordEvent({name:y,url:u.url}),x(`Tracking event: ${y}`);const h=window.UserLeap.delayingSurvey||We()?await D(R("1",[C],"events/batch"),{body:JSON.stringify({events:[{event:y,metadata:u}],previewKey:_}),method:"POST",shouldDropOnRateLimit:!0}):await D(R("1",[C],"events"),{body:JSON.stringify({event:y,metadata:u,previewKey:_}),method:"POST",shouldDropOnRateLimit:!0});if(!h.ok){const I="[Sprig] (ERR-421) Failed to track event";return h.reportError&&(console.warn(I,h.error),h.error&&window.UserLeap.reportError("track",h.error)),{success:!1,message:I,error:h.error,surveyState:"no survey"}}l&&E("uid",l),c&&E("aid",c);const A=h.json;A.invalidPreviewKey&&k.removeItem("sprig.previewKey");const S=u.trackPageView?u.url:void 0;return A!=null&&A.feedbackButton&&Je(A.feedbackButton,void 0,S),await ir(h,m)?Qt(A.eventId,b)?W(A,S):{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=(r,i)=>{var a;const s=(a=r?.querySelector(`[id="${ue}"]`))==null?void 0:a.contentDocument;s&&Z(s,i)},o={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",j.Override),Le({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",j.Override),Le({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",j.Override),Le({surveyId:r},!1)},previewSurvey(r){o._previewSurvey(r)},reviewSurvey(r){o._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=j.API){w.emit(g.SurveyWillClose,{name:g.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0&&i!==!1){const a="[Sprig] - Disregarding empty attribute / value provided";return console.warn(a),{success:!1,message:a}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),t.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const l="[Sprig] - Disregarding empty payload provided";return console.warn(l),{success:!1,message:l}}const{userId:i,anonymousId:a,attributes:s}=r;if(t.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const l="[Sprig] - Skipping tracking without userId";return console.warn(l),{success:!1,message:l}}if(!s&&(!i||window.UserLeap.userId===i)&&(!a||window.UserLeap.partnerAnonymousId===a))return{success:!0};const d={};i&&(d.userId=window.UserLeap.userId=i),a&&(d.partnerAnonymousId=window.UserLeap.partnerAnonymousId=a);let p;return s?(s.email&&!Object.prototype.hasOwnProperty.call(s,G)&&(s[G]=s.email,delete s.email),x(`Setting attributes: ${JSON.stringify(s)}`),p=await D(R("1",[T,C],"attributes"),{body:JSON.stringify(s),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 D(R("1",[T,C]),{body:JSON.stringify(d),method:"PUT"}),s&&s[G]&&(window.UserLeap.email=s[G]),p.ok&&(i&&E("uid",i),a&&E("aid",a)),{success:!!p.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),t.mode==="test")return;if(r==null||r.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 i=await D(R("1",[T,C],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){w.on(g.SurveyLifeCycle,r)},async removeSurveyListener(r){w.removeListener(g.SurveyLifeCycle,r)},async addListener(r,i){w.on(r,i)},async removeListener(r,i){w.removeListener(r,i)},async removeAllListeners(){w.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||k.isStorageAvailable&&r&&k.setItem("sprig.previewKey",r)},async setUserId(r){var i;if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const d=`[Sprig] - Invalid userId ${r}`;return console.warn(d),{success:!1,message:d}}if(t.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const a=window.UserLeap.visitorId,s=await D(R("1",[T,C]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!s.ok){s.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",s.error),s.error&&window.UserLeap.reportError("setUserId",s.error));return}a!==window.UserLeap.visitorId&&((i=U.replay)==null||i.clearUserReplayData()),E("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,E("aid",r),{success:!0}},async track(r,i,a={},s=void 0){return e({eventName:r,properties:i,metadata:a,showSurveyCallback:s})},async identifyAndTrack(r){return await e(r)},trackPageView(r,i=void 0,a=void 0,s=!0){Xe(r,i,a,s)},applyFeedbackStyles({button:r="",view:i=""}){window.UserLeap.feedbackCustomStyles=i,document.getElementById("sprig-feedback-style")&&Z(document,r,window.UserLeap.styleNonce),n(document.querySelector(".ul-container-feedback"),i)},applyStyles(r){window.UserLeap.customStyles=r,n(window.UserLeap.container,r)},setWindowDimensions(r,i){var a,s;const d=typeof r=="string"?parseInt(r,10):r,p=typeof i=="string"?parseInt(i,10):i;if(!isNaN(d)&&!isNaN(p)&&(window.UserLeap.windowDimensions={width:d,height:p}),!window.UserLeap.frameId)return;const l=document.getElementById(window.UserLeap.frameId);l&&(window.UserLeap.useMobileStyling&&((a=window.UserLeap.windowDimensions)!=null&&a.width&&(l.style.width=`${window.UserLeap.windowDimensions.width}px`),(s=window.UserLeap.windowDimensions)!=null&&s.height&&(l.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),l.contentDocument&&(l.style.height=String(Be(l.contentDocument)[0])+"px")),w.emit(g.SurveyDimensions,{name:g.SurveyDimensions,contentFrameWidth:l.clientWidth,contentFrameHeight:l.clientHeight}))},logoutUser(){var r;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),x(`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,k.removeItem("userleap.ids"),k.removeItem("userleap.pageviews"),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),Ye(),(r=U.replay)==null||r.clearUserReplayData(),window.UserLeap._queue.unpause()},teardown(){Zt(),window.UserLeap("dismissActiveSurvey",j.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var a,s;if(!((s=(a=window.UserLeap)==null?void 0:a._config)!=null&&s.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const d=typeof r=="string"?JSON.parse(r):r;re.setOptimizelyExperiment(d,i)}catch(d){console.warn("[Sprig] Error with integrating Optimizely data"),d instanceof Error&&window.UserLeap.reportError("integrateOptimizely",d)}},integrateOptimizelyClient(r){var i,a;if(!((a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const s=({experiment:d,variation:p})=>{const l={experiments:[{id:d.id,variation:p.key}]};window.UserLeap("integrateOptimizely",l,!1)};r.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event",s)},importLaunchDarklyData(r){var i,a;if(!((a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}fe.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),o.setAttribute(r,i)},async setEmail(r){return o.setAttribute(G,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),o.setEmail(r)},async _generateVideoUploadUrl(r){return lr(r)},_reportMetric(r,i){yt(r,i)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:a}){var s;return U.replay?(s=U.replay)==null?void 0:s._completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:a,headers:F(window.UserLeap)}):(window.UserLeap.reportError("_completeSessionReplay",new Error("Replay module not registered")),!1)}};Object.assign(window.UserLeap,o)};async function sr(t){const e=F(window.UserLeap);document.addEventListener("securitypolicyviolation",_e);const n=await Ee(R("1",[T],"config"),{headers:e}),o="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===o?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",_e),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),Ae("Disabled: failed to fetch configuration"),t;const r=n.json;return r!=null&&r.disabled?(Ae(`Disabled: ${r.disabled}`),{disabled:r.disabled}):Object.assign({},r,t)}const ar=t=>typeof t=="object"&&t&&"inner"in t&&!!t.inner&&typeof t.inner=="object";async function dr(t,e,n={}){var o,r;const i=window.__cfg&&window.__cfg.mode,a=le(),s=window.UserLeap.envId,d=window.document.documentElement,p=ar(e)?{inner:{message:(o=e.inner)==null?void 0:o.message,stack:(r=e.inner)==null?void 0:r.stack}}:{},l={mode:i,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:d.clientWidth,clientHeight:d.clientHeight,location:window.location.href,language:window.navigator.language,...n,...p},c={action:t,err:{message:e.message,stack:e.stack},meta:l,vid:a,envId:s},u=await D(R("1",null,"errors"),{method:"POST",headers:{"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(c),shouldDropOnRateLimit:!0});if(!u.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",e);else{const{presignedUrl:f}=u.json;wt(f)}}async function lr(t){var e;if(!t)return;const n=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const o=await fetch(n,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(o.ok){const r=await o.json();return(e=r?.upload)==null?void 0:e.url}else return null}catch(o){console.warn("[Sprig] Error with generating video upload url"),o instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",o)}}function cr(t={}){const e=new URLSearchParams(window.location.search).get("sprigPreviewKey")??"";window.UserLeap.UPDATES=N,window.UserLeap("setPreviewKey",e);async function n(){var o;if(window.UserLeap.loaded)return;if(x("Loading sprig on page load"),window.UserLeap.reportError=dr,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 r=window.UserLeap.sampleRate;if(r){let d=M("sampled");if(d===null&&(d=Math.random()<r,E("sampled",d)),!d)return}else M("sampled")!==null&&E("sampled",null);window.UserLeap._API_URL||(window.UserLeap._API_URL="https://api.sprig.com");const i=[...window.UserLeap._queue];window.UserLeap._queue=new Vt(window.UserLeap,[]),window.UserLeap._queue.pause();for(let d=0;d<i.length;d++)window.UserLeap._queue.push(i[d]);const a=M("token");a?(window.UserLeap.token=a,window.UserLeap.visitorId=M("vid"),window.UserLeap.userId=M("uid"),window.UserLeap.partnerAnonymousId=M("aid")):(k.removeItem("userleap.ids"),Ye());const s=await sr(t);Gt({webMetricsEnabled:s.metricsReportingEnabled,reportingIntervalSeconds:s.metricsReportingEnabled||s.mobileMetricsReportingEnabled?s.metricsReportingIntervalSeconds:0,thresholds:s.metricThresholds,postMetrics:async d=>{var p;await D(R("1",[T],"metrics"),{body:d,method:"POST",headers:{"x-ul-replay-enabled":`${!!((p=U.replay)!=null&&p.isReplayRecording())}`},shouldDropOnRateLimit:!0})}}),(o=U.replay)==null||o.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:s.maxReplayDurationSeconds,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests??2,replaySettings:s.replaySettings}),ut(s.logBufferLimit,s.logLevel),or(s),await nr(s),window.UserLeap._queue.unpause(),w.emit(g.SDKReady,{mobileMetricsReportingEnabled:!!s.mobileMetricsReportingEnabled,metricsReportingInterval:s.metricsReportingIntervalSeconds||0,metricsThresholds:s.metricThresholds||[],maxMobileReplayDurationSeconds:s.maxMobileReplayDurationSeconds,mobileReplaySettings:s.mobileReplaySettings}),w.emit(g.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}document.readyState==="complete"?n():window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",()=>{n()},!1)}class ne{constructor(){this.UPDATES=N}displaySurvey(e){window.Sprig("displaySurvey",e)}mute(){window.Sprig("mute")}unmute(){window.Sprig("unmute")}dismissActiveSurvey(){window.Sprig("dismissActiveSurvey")}setAttribute(e,n){window.Sprig("setAttribute",e,n)}setAttributes(e){window.Sprig("setAttributes",e)}identifyAndSetAttributes(e){window.Sprig("identifyAndSetAttributes",e)}removeAttributes(e){window.Sprig("removeAttributes",e)}addListener(e,n){window.Sprig("addListener",e,n)}removeListener(e,n){window.Sprig("removeListener",e,n)}removeAllListeners(){window.Sprig("removeAllListeners")}setEmail(e){window.Sprig("setAttribute","!email",e)}setUserId(e){window.Sprig("setUserId",e)}setPartnerAnonymousId(e){window.Sprig("setPartnerAnonymousId",e)}track(e,n={},o={}){window.Sprig("track",e,n,o)}identifyAndTrack(e){window.Sprig("identifyAndTrack",e)}trackPageView(e,n,o){window.Sprig("trackPageView",e,n,o)}applyStyles(e){window.Sprig("applyStyles",e)}setWindowDimensions(e,n){window.Sprig("setWindowDimensions",e,n)}logoutUser(){window.Sprig("logoutUser")}teardown(){window.Sprig("teardown")}}const Ue={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(ne.prototype).map(n=>{n!=="constructor"&&(window.Sprig[n]=ne.prototype[n])});const e=window.Sprig;return e.appId=t.envId,e._queue=[],window.UserLeap=e,cr(t),window.Sprig}},pr={sprig:Ue,SprigAPI:ne,configure:Ue.configure};export{vt as A,Ce as C,De as D,Lt as E,ne as S,Be as a,ht as b,pr as c,ft as d,Z as o,Ct as r,Ue as s};
|