@sprig-technologies/sprig-browser 2.43.0 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-5xam8eBF.cjs"),v=require("./videoPlayer-B4YqaVpY.cjs"),j=require("./core-CgFFOhiH.cjs"),me=require("./metricsReporter-BGIzo9eh.cjs"),_e=({properties:t,surveyVideoUrl:i,questionId:r})=>{const n=`ul-card-video__question_player-q${r}`,{apiURL:s,viewDocument:a}=e.useConfig(l=>({apiURL:l.apiURL,viewDocument:l.viewDocument}));return e.u("div",{id:n,ref:l=>{if(l&&l.children.length===0&&!t.properties.hideRecordedPrompt){const d=v.videoPlayer(n,{src:i,type:"application/x-mpegURL"},void 0,t.properties.mediaType===v.RECORDER.MEDIA_TYPE_AUDIO,s,a);l.appendChild(d)}}})},z=({isDisabled:t,onClick:i,children:r})=>e.u(v.Button,{className:"ul-card__button-checkmark",disabled:t,onClick:i,type:"button",children:[e.u("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#ffffff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),r||"Ok"]}),Re=({className:t,next:i,properties:r,questionId:n,type:s})=>{const{useMobileStyling:a,border:l}=e.useConfig(R=>({useMobileStyling:R.useMobileStyling,border:R.border})),[d,c]=e.h(!1),[y,f]=e.h(""),[o,g]=e.h(!1),x=r==null?void 0:r.collectName,k=(r==null?void 0:r.nameLabelText)||"Full Name",h=(r==null?void 0:r.consentText)||"I agree to the stated conditions",T=(r==null?void 0:r.submitButtonText)||"Submit",N=!!y.trim(),B=d&&(!x||N),M=(R,A=!1)=>{R.preventDefault(),R.stopPropagation();let O=null;if(!A){if(!B)return void g(!0);O={submitted:!0},x&&(O.name=y)}i({value:O,questionId:n,type:s},!!A||B)};return e.u("div",{className:e.cc(t,"ul-card__consent-legal","fade-in-transition"),children:e.u(v.MobileEmbedView,{embeddedType:"pdf",properties:r,children:e.u(v.QuestionBodyFooterContainer,{children:[e.u("div",{className:"sprig-stretch",children:[e.u(v.Option,{allowTextEntry:!1,border:l,error:o&&!d,id:"consent",isRadio:!1,isSelected:d,label:h,onUserInputChanged:({selected:R})=>{R!==d&&c(!d)},useMobileStyling:a}),x&&e.u("input",{"aria-label":k,"aria-placeholder":k,className:e.cc(e.getClasses("ul-consent-legal__name-input",a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:R=>{R.currentTarget.style.borderColor=o&&!N?j.ERROR_BORDER_COLOR:j.DEFAULT_BORDER_COLOR},onFocus:R=>{R.currentTarget.style.borderColor=o&&!N?j.ERROR_BORDER_COLOR:l},onInput:R=>{R.preventDefault(),R.stopPropagation(),f(R.currentTarget.value)},placeholder:k,style:o&&!N?{borderColor:j.ERROR_BORDER_COLOR}:{},tabIndex:0,value:y})]}),e.u("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[e.u(z,{isDisabled:!B,onClick:R=>M(new SubmitEvent(R.type)),children:e.getButtonText({buttonText:T})}),r.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:R=>M(new SubmitEvent(R.type),!0),children:e.getSkipButtonText(r)})]})]})})},n)},Ne=()=>{const{destroy:t,forceBrandedLogo:i}=e.useConfig(r=>({destroy:r.destroy,forceBrandedLogo:r.forceBrandedLogo}));return e.p(()=>{setTimeout(()=>{t(j.APP_ID)},i?4e3:2e3)},[t,i]),e.u("div",{className:"end-of-survey-text",children:"End of survey"})},De=({activeValue:t,border:i,icon:r,enableCspTrustedTypes:n,isPressed:s,range:a,scaleLabelType:l,selectedValue:d,setSelectedValue:c,setActiveValue:y,setIsPressed:f,useMobileStyling:o,value:g,viewDocument:x})=>{const k=`option-${g}`,h=l==="number",T=l==="star",N=l==="smiley",B=h&&g===t||g===d,[M,R]=(()=>{const u=T&&d!==null&&g<=d;return T&&g<=t||N&&g===t||u||g===t||g===d?[i,s||u||g===d?1:.3]:["",1]})(),A=e.F(()=>{const u={borderColor:B?M:"",fillOpacity:B?"":R,zIndex:B?3:"auto",color:d===g?"#fff":""};return h?{...u,backgroundColor:d===g?M:""}:{...u,color:T||N||d===g?M:""}},[B,M,R,d,g,h,T,N]),O=e.F(()=>j.getHtml((({icon:u,scaleLabelType:p,value:C,selectedValue:m})=>{if(p==="smiley"&&C===m){let b=0;return u.replace(/black/g,()=>++b==1?"black":"white")}return u})({icon:r,scaleLabelType:l,value:g,selectedValue:d}),n),[n,r,l,d,g]);return e.u("button",{"aria-label":h?void 0:String(g),className:(()=>{switch(l){case"star":return e.cc(e.getClasses("likert-star",o),e.getClasses(`likert-star-${g}`,o));case"smiley":return e.cc(e.getClasses("likert-smiley",o),e.getClasses(`likert-smiley-${g}`,o));default:return g===a?e.cc(e.getClasses("likert-number",o),e.getClasses(`likert-number-${g}`,o),e.getClasses("likert-last-option",o)):e.cc(e.getClasses("likert-number",o),e.getClasses(`likert-number-${g}`,o))}})(),dangerouslySetInnerHTML:{__html:O},id:k,onClick:u=>{u.preventDefault(),u.stopPropagation(),c(g)},onKeyDown:u=>{var m,b;const p=x.querySelectorAll(`.likert-${l??"number"}`),C=g-1;u.key==="ArrowRight"?(m=p[C+1])==null||m.focus():u.key==="ArrowLeft"?(b=p[C-1])==null||b.focus():u.key!=="Enter"&&u.key!==" "||(u.preventDefault(),u.stopPropagation(),c(g))},onPointerDown:()=>f(!0),onPointerEnter:()=>y(g),onPointerLeave:()=>{y(-1),f(!1)},style:A,tabIndex:0})},Ie=({className:t,labels:i,next:r,properties:n,questionId:s,type:a})=>{const{border:l,useMobileStyling:d,viewDocument:c,enableCspTrustedTypes:y}=e.useConfig(p=>({border:p.border,useMobileStyling:p.useMobileStyling,viewDocument:p.viewDocument,enableCspTrustedTypes:p.enableCspTrustedTypes})),[f,o]=e.h(-1),[g,x]=e.h(!1),[k,h]=e.h(null),T=i&&i.left,N=i&&i.right;let B;const{range:M,scaleLabelType:R,ratingIcons:A}=n;M&&(B=Number(M));const O=B||5,u=p=>{var C,m;switch(R){case"star":return(C=A[0])==null?void 0:C.svg;case"smiley":return(m=A[p])==null?void 0:m.svg;default:return String(p+1)}};return e.u("form",{className:e.cc(t,"ul-card--likert","fade-in-transition"),children:e.u(v.MobileEmbedView,{properties:n,children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{"aria-label":`Rating (1 - ${O})`,className:"ul-card--likert__numbers",role:"radiogroup",children:[...Array(O)].map((p,C)=>{const m=C+1;return e.u(De,{activeValue:f,border:l,enableCspTrustedTypes:y,icon:u(C),isPressed:g,range:O,scaleLabelType:R,selectedValue:k,setActiveValue:o,setIsPressed:x,setSelectedValue:h,useMobileStyling:d,value:m,viewDocument:c},C)})}),e.u("div",{className:"ul-card--likert__labels",children:[e.u("span",{children:T}),e.u("span",{children:N})]})]}),e.u(v.QuestionBodyFooterContainer,{children:e.u(z,{isDisabled:k===null&&n.required,onClick:()=>r({value:k,questionId:s,type:a},!0),children:e.getButtonText(n)})})]})},s)},we=({columns:t,onSelect:i,options:r,selectedOptions:n})=>{const s=e._([]),{border:a,useMobileStyling:l}=e.useConfig(g=>({border:g.border,useMobileStyling:g.useMobileStyling})),d=r.findIndex(g=>n[g.id]===null),[c,y]=e.h(d),f=e.T((g,x)=>{i(g,x);const k=c+1,h=r[k];h&&n[h.id]===null&&y(k)},[i,r,n,c]),o=e.T((g,x)=>{const k=c===g;return e.u(e.Accordion,{animate:!0,header:x.label,isOpen:k,onClick:()=>{var h;return y(k&&!((h=window.UserLeap)!=null&&h.isMobileSDK)?-1:g)},ref:h=>{h&&(s.current[g]=h)},showHeaderCheck:n[x.id]!==null,children:e.u("div",{style:{paddingTop:"12px"},children:t.map(h=>e.u(v.Option,{allowTextEntry:!1,ariaLabel:`${x.label}-${h.label}`,border:a,error:!1,id:`${x.id}-${h.value}`,isRadio:!0,isSelected:n[x.id]===h.value,label:h.label,onUserInputChanged:()=>f(x.id,h.value),useMobileStyling:l},h.label))})},x.id)},[a,t,c,f,n,l]);return e.u("div",{children:r.map((g,x)=>o(x,g))})},Ee=({className:t,next:i,options:r,properties:n,questionId:s,type:a,onSubmitButtonClick:l})=>{const d=n.matrixColumn,c=n.required,y=k=>{k.preventDefault(),k.stopPropagation(),i({value:o,questionId:s,type:a},!0),l&&l()},f=r.reduce((k,h)=>(k[h.id]=null,k),{}),[o,g]=e.h(f);return e.u("form",{className:e.cc(t,"ul-card__matrix","fade-in-transition"),id:"text-form",onSubmit:y,children:e.u(v.MobileEmbedView,{properties:n,children:[e.u(v.QuestionBodyWrapper,{children:e.u(we,{columns:d,onSelect:(k,h)=>{g(T=>({...T,[k]:h}))},options:r,selectedOptions:o})}),e.u(v.QuestionBodyFooterContainer,{children:e.u(z,{isDisabled:(x=o,c&&Object.values(x).every(k=>k==null)),onClick:()=>y(new SubmitEvent("submit")),children:e.getButtonText(n)})})]})},s);var x},ge=({className:t,onSubmit:i,options:r=[],properties:n,questionId:s,type:a,showIndividualSubmit:l=!1,onSubmitButtonClick:d})=>{const{border:c,useMobileStyling:y}=e.useConfig(m=>({border:m.border,useMobileStyling:m.useMobileStyling})),f=r.reduce((m,b)=>(m[b.id]={isSelected:!1},m),{}),[o,g]=e.h(f),x=a==="multiplechoice",k=n.required,h=r.find(m=>{var b;return(b=m.optionProperties)==null?void 0:b.noneOfTheAbove}),T=m=>Object.entries(m).some(([b,D])=>{var Q;const I=r.find($=>`${$.id}`===b),P=D.userText===void 0||D.userText.trim()==="";return((Q=I==null?void 0:I.optionProperties)==null?void 0:Q.allowsTextEntry)&&P&&D.isSelected}),N=m=>Object.values(m).filter(b=>b.isSelected).length,B=n.minSelect&&n.minSelect>0&&n.maxSelectMode===e.MaxSelectModes.Range&&N(o)<n.minSelect&&(k||N(o)>0),M=m=>T(m)||k&&!N(m)||!(b=>{const{minSelect:D=0,maxSelect:I=1/0,maxSelectMode:P}=n,Q=N(b);switch(P){case e.MaxSelectModes.Maximum:return Q<=I;case e.MaxSelectModes.Range:return Q===0||Q>=D;default:return!0}})(m),R=Object.entries(o).some(([m,b])=>{var D,I;return b.isSelected&&((I=(D=r.find(P=>`${P.id}`===m))==null?void 0:D.optionProperties)==null?void 0:I.allowsTextEntry)}),A=l&&(!x||R),O=m=>{C(m.id,m.selected,m.userText,m.noneOfTheAbove)},u=m=>{var b;return(n==null?void 0:n.maxSelectMode)!==e.MaxSelectModes.Unlimited&&N(o)===(n==null?void 0:n.maxSelect)&&!((b=o[m])!=null&&b.isSelected)},p=()=>{i(o,!0),d&&d()},C=(m,b,D,I)=>{const P=Object.assign({},o);if((x||I)&&b)for(const Q of Object.values(P))Q.isSelected=!1,delete Q.userText;else h&&!I&&o[h.id].isSelected&&(P[h.id].isSelected=!1);P[m]={isSelected:b,userText:D},g(P)};return e.u("form",{className:e.cc(t,"ul-card--multiple","fade-in-transition"),id:"text-form",onSubmit:p,children:e.u(v.MobileEmbedView,{properties:n,children:[e.u(v.QuestionBodyWrapper,{children:[n.isDropdown?e.u(v.Select,{disabledOptions:r.filter(m=>u(m.id)),dropdownFooter:B?e.u("div",{className:"ul-card__min-select-counter",style:{marginLeft:"16px"},children:[N(o),"/",n.minSelect]}):void 0,isMultiSelect:!x,multiselectText:n.dropdownMultiselectedText??"choices selected",onChange:m=>{const b={...o};for(const D of r)m.includes(D)?b[D.id].isSelected=!0:b[D.id].isSelected=!1;g(b)},options:r,placeholderText:n.dropdownPlaceholderText??(x?"Select choice":"Select choice(s)"),value:r.filter(m=>o[m.id].isSelected)}):e.u("div",{className:e.cc(e.getClasses("ul-card__choices",y)),role:x?"radiogroup":"group",children:[r.map(({id:m,label:b,value:D,optionProperties:I})=>{var H,G;const P=`${m}`,{allowsTextEntry:Q,noneOfTheAbove:$}={allowsTextEntry:!1,noneOfTheAbove:!1,...I};return e.u(v.Option,{allowTextEntry:Q,border:c,disabled:u(P),error:(F=o,T(F)),id:P,isRadio:x,isSelected:!!((H=o[P])!=null&&H.isSelected),label:b,noneOfTheAbove:$,onUserInputChanged:O,promptText:(I==null?void 0:I.otherOptionPlaceholder)||"Please specify",text:(G=o[m])==null?void 0:G.userText,useMobileStyling:y,value:D},P);var F}),!!B&&e.u("div",{className:"ul-card__min-select-counter",children:[N(o),"/",n.minSelect]})]}),A&&e.u(v.LongformSubmitButton,{handleSubmit:p,isSubmitDisabled:M(o)})]}),e.u(v.QuestionBodyFooterContainer,{children:e.u(z,{isDisabled:M(o),onClick:p,children:e.getButtonText(n)})})]})},s)},Be=t=>{const{questionId:i,type:r,next:n,options:s}=t;return e.u(ge,{...t,onSubmit:(a,l)=>{const d=Object.entries(a).find(([,g])=>g.isSelected)||[void 0,void 0],[c,y]=d,f=s.find(g=>`${g.id}`===c),o=y!=null&&y.userText?{[c]:{userText:y.userText}}:null;n({value:f&&c?{[c]:f.value}:{},secondaryValue:o,questionId:i,type:r},l)}})},Pe=t=>{const{questionId:i,type:r,next:n}=t;return e.u(ge,{...t,onSubmit:(s,a)=>{const l=Object.entries(s).reduce((c,[y,f])=>(c[y]=f.isSelected,c),{}),d=Object.entries(s).reduce((c,[y,f])=>{if(!f.userText)return c;const o=c||{};return o[y]={userText:f.userText},o},null);n({value:l,secondaryValue:d,questionId:i,type:r},a)}})},qe=({className:t,labels:i,properties:r,next:n,questionId:s,type:a})=>{const[l,d]=e.h(null),{border:c,useMobileStyling:y,viewDocument:f}=e.useConfig(x=>({border:x.border,useMobileStyling:x.useMobileStyling,viewDocument:x.viewDocument})),o=i&&i.left,g=i&&i.right;return e.u("form",{className:e.cc(t,"ul-card--nps","fade-in-transition"),children:e.u(v.MobileEmbedView,{properties:r,children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{className:"ul-card--nps__numbers",children:[...Array(11)].map((x,k)=>e.u("button",{className:e.cc(e.getClasses("nps-number",y),e.getClasses(`nps-number-${k}`,y)),id:`option-${k}`,onClick:h=>{h.preventDefault(),h.stopPropagation(),d(k)},onKeyDown:h=>{var N,B;const T=f.querySelectorAll("button.nps-number");h.key==="ArrowRight"?(N=T[k+1])==null||N.focus():h.key==="ArrowLeft"?(B=T[k-1])==null||B.focus():h.key!=="Enter"&&h.key!==" "||(h.preventDefault(),h.stopPropagation(),d(k))},onPointerDown:h=>{h.currentTarget.style.zIndex="2",h.currentTarget.style.borderColor=c},onPointerLeave:h=>{h.currentTarget.style.zIndex="auto",h.currentTarget.style.borderColor=j.DEFAULT_BORDER_COLOR},style:l===k?{backgroundColor:c,color:"#fff"}:void 0,tabIndex:0,children:k},k))}),e.u("div",{className:"ul-card--nps__labels",children:[e.u("span",{children:o}),e.u("span",{children:g})]})]}),e.u(v.QuestionBodyFooterContainer,{children:e.u(z,{isDisabled:l===null&&r.required,onClick:()=>n({value:l,questionId:s,type:a},!0),children:e.getButtonText(r)})})]})},s)},Le=({className:t,next:i,properties:r,questionId:n,type:s,onSubmitButtonClick:a})=>{const{border:l,useMobileStyling:d,update:c}=e.useConfig(T=>({border:T.border,useMobileStyling:T.useMobileStyling,update:T.update})),[y,f]=e.h(""),o=e._(null),g=y.trim(),x=r.required===!0&&!g,k=v.useAutoSize(o,()=>c()),h=r&&r.openTextPlaceholder?r.openTextPlaceholder:"";return e.u("form",{className:e.cc(t,"ul-card-text","fade-in-transition"),id:"text-form",children:e.u(v.MobileEmbedView,{properties:r,children:e.u("div",{className:"ul-card-text",children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{className:"ul-card-text__container",children:e.u("textarea",{"aria-describedby":"ul-caption","aria-labelledby":"ul-question","aria-multiline":"true","aria-placeholder":h,className:e.cc(e.getClasses("ul-card-text__input",d)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:T=>{T.currentTarget.style.borderColor=j.DEFAULT_BORDER_COLOR},onChange:T=>{const{value:N}=T.currentTarget;k(),T.preventDefault(),T.stopPropagation(),f(N)},onFocus:T=>{T.currentTarget.style.borderColor=l},placeholder:h,ref:o,role:"textbox",tabIndex:0})}),r.footerHtml&&e.u(v.Html,{className:"footer",html:r.footerHtml})]}),e.u(v.QuestionBodyFooterContainer,{children:e.u(z,{isDisabled:x,onClick:T=>{T.preventDefault(),T.stopPropagation();const N=r.required!==!0||g.length>0;i({value:y,questionId:n,type:s},N),a&&a()},children:e.getButtonText(r)})})]})})},n)},Me=({className:t,labels:i,next:r,properties:n,questionId:s,type:a,onSubmitButtonClick:l,options:d})=>{const c=e._(null),y=e._(0),f=e._(0),o=e._(null),g=e._(!1),x=e._([]),[k,h]=e.h(()=>(n==null?void 0:n.required)===!0),[T,N]=e.h(()=>d.map(S=>({...S,rank:null}))),B=e.F(()=>Array.from({length:d.length},(S,w)=>w+1),[d.length]),{useMobileStyling:M,isPreview:R,headers:A}=e.useConfig(S=>({useMobileStyling:S.useMobileStyling,isPreview:S.isPreview,headers:S.headers})),O=(A==null?void 0:A["userleap-platform"])==="android",u=M&&!R&&!O,p=!u&&!O,C=(S,w)=>{N(E=>{const _=parseInt(w),L=E.map(q=>({...q}));L.some(q=>q.rank==null)&&L.forEach((q,W)=>q.rank=W+1);const V=L.findIndex(q=>q.id===S);if(V===-1)return E;const U=L[V].rank;return _<U?L.forEach(q=>{q.id!==S&&q.rank>=_&&q.rank<U&&(q.rank=q.rank+1)}):_>U&&L.forEach(q=>{q.id!==S&&q.rank>U&&q.rank<=_&&(q.rank=q.rank-1)}),L[V].rank=_,L.sort((q,W)=>q.rank-W.rank),$(),L})},m=(S,w)=>{for(let E=0;E<x.current.length;E++){const _=x.current[E];if(!_||_===o.current)continue;const L=_.getBoundingClientRect();if(S>=L.left&&S<=L.right&&w>=L.top&&w<=L.bottom)return{element:_,index:E}}return null},b=S=>w=>{if(!u)return;w.preventDefault(),w.stopPropagation(),g.current=!0,c.current=S;const E=w.touches[0];y.current=E.clientY,f.current=E.clientY;const _=w.currentTarget.closest(".ul-card-rank__option");_&&(o.current=_,_.classList.add("is-dragging"))},D=S=>{if(!u||!g.current||c.current===null)return;S.preventDefault(),S.stopPropagation();const w=S.touches[0];f.current=w.clientY;const E=f.current-y.current;o.current&&(o.current.style.transform=`translateY(${E}px)`,o.current.style.zIndex="1000"),x.current.forEach(L=>{L&&L!==o.current&&L.classList.remove("is-drop-target")});const _=m(w.clientX,w.clientY);_&&_.element.classList.add("is-drop-target")},I=S=>{if(!u||!g.current||c.current===null)return;S.preventDefault(),S.stopPropagation();const w=S.changedTouches[0],E=m(w.clientX,w.clientY);o.current&&(o.current.style.transform="",o.current.style.zIndex="",o.current.classList.remove("is-dragging")),x.current.forEach(_=>{_&&_.classList.remove("is-drop-target")}),E&&E.index!==c.current&&P(c.current,E.index),c.current=null,o.current=null,g.current=!1},P=(S,w)=>{N(E=>{const _=E.map(V=>({...V})),[L]=_.splice(S,1);return _.splice(w,0,L),_.forEach((V,U)=>{V.rank=U+1}),$(),_})},Q=S=>{const w={};S.reduce((E,_)=>(E[_.id]=_.rank,E),w),r({value:w,questionId:s,type:a},!0)},$=()=>{h(!1)},{left:F,right:H}=i,G=d.length,X=S=>{S.preventDefault(),S.currentTarget.classList.add("is-drop-target")},Se=S=>{S.currentTarget.classList.remove("is-drop-target")},Te=S=>{c.current=null,S.currentTarget.classList.remove("is-dragging")};return e.u("form",{className:e.cc(t,"ul-card-rank","fade-in-transition"),onSubmit:S=>{S.preventDefault(),Q(T),l&&l()},children:e.u(v.MobileEmbedView,{properties:n,children:O?e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--rank__question-inner-container",children:[e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:["1 - ",F]})}),e.u("ol",{className:"ul-card-rank__list",children:T.map(({id:S,label:w,rank:E})=>e.u("li",{className:"ul-card-rank__option",children:[e.u("select",{"aria-label":`Rank for ${w}`,className:e.cc("ul-card-rank__select",E==null&&"ul-card-rank__select--placeholder"),name:`rank[${S}]`,onChange:_=>C(S,_.currentTarget.value),value:E??"",children:[E==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),B.map(_=>e.u("option",{className:"ul-card-rank__select-option",value:_,children:_},`${_}-${s}`))]}),e.u("span",{children:w})]},S))}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[G," - ",H]})})]})}),e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:k,children:e.getButtonText(n)})})})]}):e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--rank__question-inner-container",children:[e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:["1 - ",F]})}),e.u("ol",{className:"ul-card-rank__list",onDragOver:O?void 0:S=>{S.preventDefault(),S.dataTransfer&&(S.dataTransfer.dropEffect="move")},children:T.map(({id:S,label:w,rank:E},_)=>{return e.u("li",{className:"ul-card-rank__option",draggable:!!p||void 0,onDragEnd:p?Te:void 0,onDragEnter:p?X:void 0,onDragLeave:p?Se:void 0,onDragStart:p?(V=_,U=>{c.current=V,U.dataTransfer&&(U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",String(V)),U.currentTarget.classList.add("is-dragging"))}):void 0,onDrop:p?(L=_,U=>{var W,le;U.preventDefault(),U.currentTarget.classList.remove("is-drop-target");const q=c.current;c.current=null,(le=(W=U.currentTarget.closest(".ul-card-rank__list"))==null?void 0:W.querySelector(".is-dragging"))==null||le.classList.remove("is-dragging"),q!=null&&q!==L&&P(q,L)}):void 0,ref:U=>x.current[_]=U,children:[e.u("select",{"aria-label":`Rank for ${w}`,className:e.cc("ul-card-rank__select",E==null&&"ul-card-rank__select--placeholder"),name:`rank[${S}]`,onChange:U=>C(S,U.currentTarget.value),value:E??"",children:[E==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),B.map(U=>e.u("option",{className:"ul-card-rank__select-option",value:U,children:U},U))]}),e.u("span",{children:w}),!O&&e.u("button",{"aria-label":`Drag ${w} to reorder`,className:"ul-card-rank__drag-btn",onTouchEnd:u?I:void 0,onTouchMove:u?D:void 0,onTouchStart:u?b(_):void 0,title:"Drag to reorder",type:"button",children:e.u("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z",fill:"currentColor"})})})]},S);var L,V})}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[G," - ",H]})})]})}),e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:k,children:e.getButtonText(n)})})})]})})},s)},ne=1,he=2,ve=3,J=t=>t.type==="av_permission",ue=t=>t.type==="screen_permission",be=(t,i)=>t===void 0?ne:t?((r,n)=>!(J(n)?n.permissionDescriptors:[]).includes("camera")||r.getVideoTracks().length>0)(t,i)?ve:ne:he,ce={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Z=e.create(t=>({...ce,reset:()=>{t(ce)},updatePage:i=>{t(i)}}));function ie({currentPage:t,pages:i}){const{avStream:r,recordingMediaTypes:n,updatePage:s}=Z.getState(),{recorderEventEmitter:a}=e.useConfig.getState();a.emit("av.permission",{"permission.descriptors":t.permissionDescriptors,"stream.ready":(l,d)=>{if(r===l)return;let c=t;if(l&&!t.permissionDescriptors.includes("camera")){const y=i.indexOf(t),f=d!=null&&d.active?y+2:y+1;d!=null&&d.active&&n&&a.emit("begin.recording",{"recording.media.types":n,"start.recording.callback":o=>s({mediaRecordingUids:o})}),c=i[f]}s({currentPage:c,avStream:l})}})}function se({status:t}){const{nextQuestion:i,passthroughData:r,mediaRecordingUids:n,reset:s}=Z.getState(),{recorderEventEmitter:a,handleUploadUpdate:l,index:d}=e.useConfig.getState(),c={value:{taskStatus:t},type:"recordedtask",questionId:(r==null?void 0:r.questionId)||1};r&&a.emit("finish.task",{"begin.callback":y=>{l({mediaRecordingUid:y,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(y,f)=>{l({mediaRecordingUid:y,progressPct:f.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":y=>{y&&l({mediaRecordingUid:y,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":r,"current.index":d,"task.response":c,"task.complete.callback":y=>{c.value.taskDurationMillisecond=y,n&&(c.value.mediaRecordingUids=n),s(),i(c)}})}function ae({pages:t,setIsRequestingPermission:i}){const{recorderEventEmitter:r,eventEmitFn:n}=e.useConfig.getState(),{updatePage:s,currentPage:a,recordingMediaTypes:l,screenPermissionRequested:d}=Z.getState();if(!a)return;const c=t.indexOf(a);switch(a.type){case"av_permission":{const y=d?c+2:c+1;return d&&l&&r.emit("begin.recording",{"recording.media.types":l,"start.recording.callback":f=>{s({mediaRecordingUids:f})}}),void s({currentPage:t[y]})}case"screen_permission":return void r.emit("screen.permission",{"screen.permission.requested":i,"stream.ready.callback":(y,f)=>{const o=f?t[c+1]:a;f&&l&&r.emit("begin.recording",{"recording.media.types":l,"start.recording.callback":g=>{s({captureStream:f,mediaRecordingUids:g})}}),s({currentPage:o,screenPermissionRequested:!0,captureStream:f})}});case"start_task":return n("recorded.task.start"),r.emit("recorded.task.start"),r.emit("start.task"),void s({currentPage:t[c+1],screenPermissionRequested:!0});case"complete_task":return}}const ye="ul-permission-graphics-container",fe="ul-permission-body",Ce=e.cc(ye,"ul_recorded-task-inset-spacing"),ee=e.cc("ul-horizontal-button-container","ul-horizontal-button-container-left"),ke=({richTextBody:t})=>e.u(v.Html,{className:"ul-rich-text-body",html:t,id:"ul-task-detail-container"}),te=({required:t,skipButtonText:i,bottom:r=!1})=>t?null:e.u(v.Button,{className:e.cc(r&&"ul-skip-button-below","ul-button-inactive"),onClick:se.bind(null,{status:"abandoned"}),children:i||"Skip"}),oe=t=>{const{avStream:i,captureStream:r,recordingMediaTypes:n,updatePage:s}=Z.getState(),a=(n==null?void 0:n.includes("audio"))||(n==null?void 0:n.includes("video"));e.p(()=>{const l=setInterval(()=>{a&&i&&!i.active?s({avStream:null,currentPage:t[0]}):r&&r.active||s({captureStream:void 0,currentPage:t[a?1:0]})},1e3);return()=>clearInterval(l)},[i,r,a,t,n,s])},Oe=({content:t,pages:i,required:r})=>{const{buttonText:n,skipButtonText:s,taskDetail:a}=t;return oe(i),e.u("div",{className:"ul-task-page",children:[a&&e.u(ke,{richTextBody:a}),e.u("div",{className:ee,children:[e.u(v.Button,{onClick:ae.bind(null,{pages:i}),children:n}),e.u(te,{required:r,skipButtonText:s})]})]},"start-task")},Ue=({content:t,pages:i,properties:r})=>{const{buttonText:n,skipButtonText:s}=t;return oe(i),e.u("div",{className:"ul-task-page",children:[t.taskDetail&&e.u(ke,{richTextBody:t.taskDetail}),e.u(v.MobileEmbedView,{properties:r,children:e.u("div",{className:ee,children:[e.u(v.Button,{className:"ul-complete-task-button",onClick:se.bind(null,{status:"completed"}),children:n}),e.u(v.Button,{className:e.cc("ul-button-inactive"),onClick:se.bind(null,{status:"given.up"}),children:s})]})})]},"complete-task")},Ae=({content:t,pages:i,required:r})=>{const{buttonText:n,skipButtonText:s}=t,[a]=e.useConfig(c=>[c.tabTitle]),[l,d]=e.h(!1);return e.u("div",{children:[e.u("div",{className:Ce,children:[e.u("p",{style:{marginTop:"auto"},children:t.selectTabText}),e.u("div",{className:"ul-select-tab-container",children:e.u("p",{className:fe,children:a})})]}),e.u("div",{className:r?"":ee,children:[e.u(v.Button,{disabled:l,onClick:ae.bind(null,{pages:i,setIsRequestingPermission:d}),children:n}),e.u(te,{required:r,skipButtonText:s})]})]})},Qe=({content:t})=>e.u(v.Html,{className:e.cc(ye,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),html:t.svg},"ul-permission-request-graphic"),$e=({content:t,pages:i,required:r})=>{const{permissionDeniedHeadline:n,permissionDeniedBody:s,skipButtonText:a,tryAgainButtonText:l}=t,d=J(i[0])?i[0]:null;return e.p(()=>{const c=setInterval(()=>{d!==null&&ie({currentPage:d,pages:i})},1e3);return()=>clearInterval(c)},[d,i]),d?e.u("div",{children:[e.u("div",{className:Ce,children:e.u("p",{className:"ul-av-permission-denied-paragraph",children:[e.u("span",{className:"ul-av-permission-denied-headline",children:n}),e.u("span",{className:fe,children:s})]})}),e.u("div",{className:ee,children:[e.u(v.Button,{onClick:ie.bind(null,{currentPage:d,pages:i}),children:l}),e.u(te,{required:r,skipButtonText:a})]})]}):null},Fe=({stream:t})=>e.u("video",{autoPlay:!0,className:e.cc("ul_recorded-task-inset-spacing"),id:"ul-record-task-video-preview",muted:!0,ref:i=>{i&&(i.srcObject=t||null)}}),He=({content:t,pages:i,required:r})=>{const{skipButtonText:n}=t,{avStream:s}=Z.getState();return oe(i),e.u("div",{children:[e.u(Fe,{stream:s}),e.u("div",{className:"ul-vertical-button-container-center",children:[e.u(v.Button,{onClick:ae.bind(null,{pages:i}),children:t.buttonText}),e.u(te,{bottom:!0,required:r,skipButtonText:n})]})]})},Ve=({properties:t})=>{const{pages:i,required:r}=t,{avStream:n,currentPage:s}=Z.getState();if(s===void 0)return null;switch(s==null?void 0:s.type){case"av_permission":{const a=be(n,s);return a===ne?e.u(Qe,{content:s}):a===he?e.u($e,{content:s,pages:i,required:r}):e.u(He,{content:s,pages:i,required:r})}case"screen_permission":return e.u(Ae,{content:s,pages:i,required:r});case"start_task":return e.u(Oe,{content:s,pages:i,required:r});case"complete_task":return e.u(Ue,{content:s,pages:i,properties:t});default:return null}},Ge=({className:t,properties:i,next:r,questionId:n})=>{const s=e.useConfig(),{surveyId:a,responseGroupUid:l,userId:d}=s,c=Z(),{screenPermissionRequested:y}=c,f=Z(h=>h.avStream);let o=Z(h=>h.currentPage);o||(o=function({pages:h,userId:T,responseGroupUid:N,surveyId:B,questionId:M,next:R}){const{updatePage:A}=Z.getState(),{eventEmitFn:O,recorderEventEmitter:u}=e.useConfig.getState(),p={questionId:M,surveyId:B,visitorId:T,responseGroupUid:N};let C=0;u.emit("recorded.task.permission.screen"),O("recorded.task.permission.screen"),u.emit("permission.status",{"permission.status.callback":(b,D,I,P)=>{const Q=h[C],{type:$}=Q,F=["screen"];if(J(Q)){const{permissionDescriptors:H}=Q,G=H==null?void 0:H.includes("microphone"),X=H==null?void 0:H.includes("camera");G&&F.push("audio"),X&&F.push("video"),(b!=null&&b.active&&!X||b!=null&&b.active&&D)&&C++}ue(h[C])&&I&&(C++,u.emit("begin.recording",{"recording.media.types":F,"start.recording.callback":H=>A({mediaRecordingUids:H})})),A({currentPage:h[C],avStream:b,screenPermissionRequested:I,nextQuestion:R,type:$,passthroughData:p,recordingMediaTypes:F,captureStream:P})}});const m=h[C];return m.type==="av_permission"&&ie({currentPage:m,pages:h}),m}({questionId:n,surveyId:a,next:h=>{r(h,!0)},pages:i.pages,responseGroupUid:l,userId:d}));let g=o.headline,x=o.captionText;const k=be(f,o);return ue(o)&&y&&(g=o.permissionDeniedHeadline,x=o.permissionDeniedCaptionText),J(o)&&k===ve&&(g=o.permissionGrantedHeadline,x=o.permissionGrantedCaptionText),e.u("div",{className:e.cc(t,"ul-center-horizontally","fade-in-transition"),children:[e.u(v.Header,{isRequired:i==null?void 0:i.required,message:g,properties:{captionText:x}}),e.u(v.QuestionBodyWrapper,{children:e.u(Ve,{properties:i})})]})},je=({className:t,next:i,properties:r,questionId:n,type:s})=>{const{visitorAttributes:a,isLongFormSurvey:l}=e.useConfig(f=>({visitorAttributes:f.visitorAttributes,isLongFormSurvey:me.isLongFormSurvey(f.studyType)})),d=(f,o=!1)=>{i({value:o?{skipped:!0}:void 0,questionId:n,type:s},!0)},c=v.getAttributedUrl(r&&r.buttonUrl,a),y=l&&r.promptActionType===e.PromptActionTypeEnum.NO_BUTTON;return e.u("div",{className:e.cc(t,"ul-card__text-url-prompt","fade-in-transition"),children:e.u(v.MobileEmbedView,{properties:r,children:!y&&e.u("div",{children:e.u("div",{className:"ul-card-button-group",children:[e.u("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:c,id:"ul-card-text__button",onClick:d,onKeyPress:f=>{f.key!=="Enter"&&f.key!==" "||i({value:void 0,questionId:n,type:s},!0)},rel:"noreferrer",role:c?"link":"button",tabIndex:0,target:"_blank",children:e.getButtonText(r)}),r.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:f=>d(0,!0),children:e.getSkipButtonText(r)})]})})})},n)},Ze=({className:t,questionId:i})=>{const{border:r,destroy:n,endCard:s,forceBrandedLogo:a}=e.useConfig(c=>({border:c.border,destroy:c.destroy,endCard:c.endCard,forceBrandedLogo:c.forceBrandedLogo}));e.p(()=>{setTimeout(()=>{n(j.APP_ID)},a?4e3:2e3)},[n,a]);const l=s&&s.subheader?e.u("p",{className:"ul-caption",children:s.subheader}):null,d=s&&s.headline?s.headline:"";return e.u("div",{className:e.cc(t,"ul-card--thanks","fade-in-transition"),children:e.u("div",{children:e.u("div",{className:"ul-card--thanks-content",children:[e.u("div",{className:"ul-thanks-check",children:e.u("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[e.u("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:r,fillRule:"evenodd"}),e.u("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:r,fillRule:"evenodd"}),e.u("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),e.u(v.Header,{message:d}),l]})})},i)},ze=()=>e.u("div",{className:"thinking-dots-container",children:e.u("div",{className:"thinking-dot"})}),We=({className:t})=>{const{uploadProgress:i}=e.useConfig(a=>({uploadProgress:a.uploadProgress}));let r,n;Object.values(i).filter(a=>a.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 s=Math.round(Math.min(99,...Object.values(i).filter(a=>a.isSubmitted).map(a=>a.progressPct||0)));return e.u("div",{className:e.cc(t,"ul-card--uploading","fade-in-transition"),children:[e.u("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:e.u("div",{className:"ul-loading-spinner",children:[e.u("div",{className:"first"}),e.u("div",{className:"second"}),e.u("div",{className:"third"}),e.u("div",{className:"fourth"})]})}),e.u(v.Header,{message:`${r} (${s}% complete)`}),e.u("p",{className:"ul-caption",children:n})]})},de=0,pe=1,Ye=({className:t,next:i,properties:r,questionId:n,type:s})=>{const a=`ul-card-video__player_recorder-q${n}`,{apiURL:l,envId:d,handleUploadUpdate:c,headers:y,responseGroupUid:f,surveyId:o,viewDocument:g,visitorId:x}=e.useConfig(p=>({apiURL:p.apiURL,envId:p.envId,handleUploadUpdate:p.handleUploadUpdate,headers:p.headers,responseGroupUid:p.responseGroupUid,surveyId:p.surveyId,viewDocument:p.viewDocument,visitorId:p.userId})),[k,h]=e.h(!1),[T,N]=e.h(null),[B,M]=e.h(null),[R,A]=e.h(de),O=(p,C)=>{p===v.RECORDER.UPLOAD_STARTED?(N(C[v.RECORDER.UPLOAD_ID]),M(C[v.RECORDER.MEDIA_RECORDING_UID]),h(!0)):p===v.RECORDER.DELETE?(N(null),M(null),h(!1)):p===v.RECORDER.UPLOAD_PROGRESS?isNaN(C[v.RECORDER.UPLOAD_PROGRESS_PCT])?c({mediaRecordingUid:C[v.RECORDER.MEDIA_RECORDING_UID],isComplete:!0}):c({mediaRecordingUid:C[v.RECORDER.MEDIA_RECORDING_UID],progressPct:C[v.RECORDER.UPLOAD_PROGRESS_PCT]}):p===v.RECORDER.UPLOAD_FINISHED&&c({mediaRecordingUid:C[v.RECORDER.MEDIA_RECORDING_UID],isComplete:!0})},u=p=>{p.preventDefault(),p.stopPropagation(),document.getElementById(a)&&v.stopRecording(a),T&&B?(c({mediaRecordingUid:B,isSubmitted:!0}),i({value:{mediaRecordingUid:B},questionId:n,type:s},!0)):i({value:null,questionId:n,type:s},!0)};return e.u("form",{className:e.cc(t,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{id:"ul-question-player-container",style:{display:R===de?"":"none"},children:e.u(v.MobileEmbedView,{properties:r,children:e.u("button",{className:"ul-video-btn ul-record-response-btn",onClick:p=>{p.preventDefault(),p.stopPropagation(),document.getElementById(a)&&v.pauseQuestionPlayer(a),A(pe)}})})}),e.u("div",{style:{display:R===pe?"block":"none"},children:e.u("div",{id:"ul-recorder-player-container",ref:p=>{if(p&&p.children.length===0){const C=v.videoRecorderPlayer(a,{surveyId:o,responseGroupUid:f,questionId:n,visitorId:x,envId:d},l,O,void 0,{...y,"x-ul-video-recorder-origin":"sdk"},r.mediaType===v.RECORDER.MEDIA_TYPE_AUDIO,g);p.appendChild(C)}}})})]}),e.u(v.QuestionBodyFooterContainer,{children:[e.u(z,{isDisabled:!!r.required&&!k,onClick:u,children:e.getButtonText(r)}),e.u("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:u,style:{...r.required?{display:"none"}:{},...k?{display:"none"}:{}},children:e.getSkipButtonText(r)})]})]})},K=t=>t.type==="aidynamicfollowup"||t.type==="aidynamicstandalone",re=t=>{var i;return K(t)&&((i=t.props)==null?void 0:i.loading)===e.DynamicQuestionLoadingStates.inFlight},xe=t=>t.type==="thanks"||t.type==="uploading",Ke=({card:t,avatars:i,isThinking:r,isCurrentQuestion:n,currentQuestionBubbleRef:s})=>{const a=(l=>"properties"in l.props&&l.props.properties&&"questionHtml"in l.props.properties&&l.props.properties.questionHtml?{content:l.props.properties.questionHtml,isHtml:!0}:"message"in l.props?{content:l.props.message,isHtml:!1}:{content:"Question",isHtml:!1})(t);return e.u(Y,{avatars:i,isLeft:!0,message:{id:`question-${t.name}`,type:"question",content:a.content},ref:n?s:null,children:r?e.u(ze,{}):e.u(e.g,{children:[a.isHtml?e.u(v.Html,{className:"chat-message-text",html:a.content}):e.u("div",{className:"chat-message-text",children:a.content}),t.type==="videovoice"&&e.u(_e,{properties:t.props,questionId:t.name,surveyVideoUrl:t.props.properties.videoUrl})]})})},Xe=({card:t,avatars:i})=>{const r=(n=>{if(!("properties"in n.props)||!n.props.properties||typeof n.props.properties!="object")return null;const s=n.props.properties,a=[{key:"captionHtml",isHtml:!0},{key:"captionText",isHtml:!1},{key:"richTextBody",isHtml:!0},{key:"body",isHtml:!1}];for(const{key:l,isHtml:d}of a){const c=s[l];if(typeof c!="string")continue;const y=c.trim();if(y){if(d&&!y.replaceAll(/<[^>]*>/g,"").trim())continue;return{content:y,isHtml:d}}}return null})(t);return r?e.u(Y,{avatars:i,hideAvatar:!0,isLeft:!0,message:{id:`caption-${t.name}`,type:"question",content:r.content},children:r.isHtml?e.u(v.Html,{className:"chat-message-text",html:r.content}):e.u("div",{className:"chat-message-text",children:r.content})}):null},Je=({card:t,userResponse:i,avatars:r})=>{const n=((s,a)=>{if(s.type==="open"&&a&&typeof a=="object"&&"value"in a)return a.value})(t,i);return e.u("div",{className:"chat-bubble-container chat-right",children:[e.u("div",{className:"chat-bubble chat-bubble-right chat-bubble-text-only",children:e.u("div",{className:"chat-message-text",children:n||e.u("div",{className:"chat-message-no-response",children:"No response"})})}),e.u("img",{alt:"User Avatar",className:"chat-avatar chat-avatar-right",srcSet:`${r.respondentAvatar["1x"]} 1x, ${r.respondentAvatar["2x"]} 2x`})]})},et=({card:t,avatars:i,isCurrentQuestion:r,currentQuestionBubbleRef:n})=>{const{endCard:s}=e.useConfig(a=>({endCard:a.endCard}));return e.u(e.g,{children:[e.u(Y,{avatars:i,isLeft:!0,message:{id:`thanks-${t.name}`,type:"question",content:(s==null?void 0:s.headline)??"Great! Thank you for your participation."},ref:r?n:null}),(s==null?void 0:s.subheader)&&e.u(Y,{avatars:i,hideAvatar:!0,isLeft:!0,message:{id:`caption-${t.name}`,type:"question",content:s.subheader}}),e.u(Ne,{})]})},tt=({card:t,cardIndex:i,index:r,avatars:n,cardResponses:s,questionThinkingStates:a,startingQuestionIdx:l,currentQuestionBubbleRef:d,handleCardResponse:c})=>{const y=i===r,f=i<r,o=xe(t);if(o)return e.u(et,{avatars:n,card:t,currentQuestionBubbleRef:d,isCurrentQuestion:y});const g=`${t.name}`,x=s.get(g),k=t.type==="open",h=a.get(g);if(t.type==="aidynamicfollowup"&&(t.props.loading===e.DynamicQuestionLoadingStates.failure||t.props.loading===void 0)||t.type==="aidynamicstandalone"&&t.props.loading===e.DynamicQuestionLoadingStates.failure)return e.u(e.g,{});const T=(i>(l??0)||K(t))&&t.type!=="thanks"&&t.type!=="uploading"&&(h===!0||h===void 0);return e.u(e.wn.Fragment,{children:[e.u(Ke,{avatars:n,card:t,currentQuestionBubbleRef:d,isCurrentQuestion:y,isThinking:T}),!T&&e.u(Xe,{avatars:n,card:t}),f&&k?e.u(Je,{avatars:n,card:t,userResponse:x}):(!f||!k)&&!T&&e.u(Y,{avatars:n,isLeft:!1,message:{id:`card-${t.name}`,type:"card",content:""},children:e.u("div",{className:"chat-card-container",children:e.u(nt,{card:t,className:o?"chat-thanks-card":"chat-card",isAnswered:f,next:y?c:()=>{}})})})]},`question-card-${t.name}`)},Y=e.wn.forwardRef(({message:t,isLeft:i=!1,children:r,avatars:n,hideAvatar:s=!1},a)=>{const l=i?"chat-bubble-left":"chat-bubble-right";return e.u("div",{className:`chat-bubble-container ${i?"chat-left":"chat-right"}${i&&s?" chat-no-avatar":""}`,ref:a,children:[i&&!s&&e.u("img",{alt:"AI Avatar",className:"chat-avatar chat-avatar-left",srcSet:`${n.agentAvatar["1x"]} 1x, ${n.agentAvatar["2x"]} 2x`}),e.u("div",{className:`chat-bubble ${l}`,children:r||e.u("div",{className:"chat-message-text",children:t.content})}),!i&&!s&&e.u("img",{alt:"User Avatar",className:"chat-avatar chat-avatar-right",srcSet:`${n.respondentAvatar["1x"]} 1x, ${n.respondentAvatar["2x"]} 2x`})]})});Y.displayName="ChatBubble";const rt=()=>{const t=e.useConfig(r=>r.close),i=e.F(()=>()=>t(j.APP_ID),[t]);return e.u("div",{"aria-label":"Close button",className:"conversational-close-btn",onClick:i,onKeyPress:r=>{r.key==="Enter"&&i()},role:"button",tabIndex:0,children:e.u("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})},nt=({card:t,next:i,className:r="",isAnswered:n=!1})=>{const s={className:n?`${r} answered-card`:r,next:n?()=>{}:i,questionId:t.name,type:t.type,isAnswered:n};switch(t.type){case"consentlegal":return e.u(Re,{...s,...t.props});case"likert":return e.u(Ie,{...s,...t.props});case"matrix":return e.u(Ee,{...s,...t.props});case"multiplechoice":return e.u(Be,{...s,...t.props});case"multipleselect":return e.u(Pe,{...s,...t.props});case"nps":return e.u(qe,{...s,...t.props});case"aidynamicstandalone":case"aidynamicfollowup":case"open":return e.u(Le,{...s,type:t.type,...t.props});case"rankorder":return e.u(Me,{...s,...t.props});case"recordedtask":return e.u(Ge,{...s,...t.props});case"texturlprompt":return e.u(je,{...s,...t.props});case"thanks":return e.u(Ze,{...s,...t.props});case"uploading":return e.u(We,{...s,...t.props});case"videovoice":return e.u(Ye,{...s,...t.props});default:return null}};exports.default=({cards:t,next:i,previousResponses:r})=>{const{cardResponses:n,setCardResponse:s}=(()=>{const[u,p]=e.h(new Map);return{cardResponses:u,setCardResponse:e.T((C,m)=>{p(b=>new Map(b).set(C,m))},[])}})(),{index:a,isLongFormSurvey:l,avatars:d,showSurveyBrand:c,forceBrandedLogo:y,marketingUrlLink:f,startingQuestionIdx:o,viewDocument:g,createDynamicFollowupQuestion:x,update:k}=e.useConfig(u=>({index:u.index,isLongFormSurvey:me.isLongFormSurvey(u.studyType),avatars:u.avatars,forceBrandedLogo:u.forceBrandedLogo,startingQuestionIdx:u.startingQuestionIdx,showSurveyBrand:u.showSurveyBrand,marketingUrlLink:e.buildMarketingUrl({marketingUrl:u.marketingUrl,slugName:u.slugName,surveyId:u.surveyId,forceBrandedLogo:u.forceBrandedLogo}),viewDocument:u.viewDocument,createDynamicFollowupQuestion:u.createDynamicFollowupQuestion,update:u.update})),{currentQuestionBubbleRef:h,scrollToCurrentQuestion:T}=(({viewDocument:u})=>{const p=e._(null),C=e.T(()=>{const m=u.querySelector(".ul-card-main-content");if(p.current&&m&&m instanceof HTMLElement){const b=p.current.offsetTop-m.offsetTop-16;m.scrollTo({top:Math.max(0,b),behavior:"smooth"})}},[]);return{currentQuestionBubbleRef:p,scrollToCurrentQuestion:C}})({viewDocument:g}),N=((u,p,C)=>{const[m,b]=e.h(new Map);return e.p(()=>{if(u.length>0&&p<u.length){const D=u[p],I=`${D.name}`,P=$=>{if(p>0){const F=u[p-1];if(K(F)){const H=`${F.name}`,G=re(F);if($.get(H)!==G)return new Map($).set(H,G)}}return $};if((p<=(C??0)||xe(D))&&(D==null?void 0:D.type)!=="aidynamicstandalone")return b($=>P(new Map($).set(I,!1)));b($=>{const F=!K(D)||re(D);return P(new Map($).set(I,F))});const Q=setTimeout(()=>{b($=>{const F=!!K(D)&&re(D);return P(new Map($).set(I,F))})},1e3);return()=>clearTimeout(Q)}},[p,u,C]),m})(t,a,o);((u,p)=>{const{createDynamicStandaloneQuestion:C}=e.useConfig(D=>({createDynamicStandaloneQuestion:D.createDynamicStandaloneQuestion})),m=u[p],b=(m==null?void 0:m.type)==="aidynamicstandalone"&&m.props.loading===void 0?m.name:null;e.p(()=>{b!==null&&C({questionId:b})},[b,C])})(t,a);const B=((u,p)=>{const[C,m]=e.h(()=>new Set([u]));return e.p(()=>{m(b=>new Set(b).add(u))},[u]),e.p(()=>{const b=p??0;b>0&&m(D=>{const I=new Set(D);for(let P=0;P<=b;P++)I.add(P);return I})},[p]),C})(a,o),M=e.F(()=>({...r,...e.buildReadableResponseMap(t.map((u,p)=>{var C,m;return{...u,value:p<a?((C=n.get(`${u.name}`))==null?void 0:C.value)??null:null,secondaryValue:p<a?((m=n.get(`${u.name}`))==null?void 0:m.secondaryValue)??null:null}}))}),[r,n,t,a]);v.useSetAllResponsesRaw(M);const R=e.pipeReadableResponsesIntoCards(t,M);e.p(()=>{requestAnimationFrame(()=>{T()}),k()},[a,T,N,k]);const A=e.T((u,p)=>{if(!p)return;const C=R[a];if(!C)return;const m=`${C.name}`;s(m,u);const b={...u,questionText:e.getProcessedQuestionText(C)};if(C.childId&&(b==null?void 0:b.value)!=null){const D=e.buildReadableResponseMap([C].map(I=>({...I,value:(b==null?void 0:b.value)??null,secondaryValue:(b==null?void 0:b.secondaryValue)??null})));x({parentQuestionId:C.name,parentResponseConfig:D})}i([b])},[R,a,i,s]),O=R.map((u,p)=>({card:u,cardIndex:p})).filter(({cardIndex:u})=>B.has(u));return e.u("div",{className:"conversational-ui ul-conversational-ui","data-testid":"ui-container",children:[!l&&e.u(rt,{}),e.u("div",{className:"chat-container",children:e.u("div",{className:"chat-messages",children:O.map(({card:u,cardIndex:p})=>e.u(tt,{avatars:d,card:u,cardIndex:p,cardResponses:n,currentQuestionBubbleRef:h,handleCardResponse:A,index:a,questionThinkingStates:N,startingQuestionIdx:o},`question-card-${u.name}`))})}),l&&e.u("div",{className:"long-form-question-footer-container-logo",children:c&&e.u(e.SprigBrandLogo,{forceBrandedLogo:y,marketingUrlLink:f})})]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff;color:#5d696f}.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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:16px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:#ffffff80}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:#666}.chat-card .choice{margin-bottom:0;background-color:unset;padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#f7f6f5}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:#141312;font-size:14px;font-weight:400;word-wrap:break-word}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:#999;font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:#000000b3}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ffffff4d;pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:#e8e7e6}.sprig-stretch input{background-color:#fff}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:#2f2e2c;text-align:center;word-break:break-word;font-size:.95rem}.likert-number{height:8vw;width:8vw;min-height:32px;max-width:54px;max-height:54px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number){max-width:100%;padding:0 .5rem}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:#2f2e2c}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:#2f2e2c}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:#2f2e2c}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:#fff;border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}.chat-card .select-checkbox{border:1px solid #323232;background-color:#fff}.chat-card .select-radio{box-shadow:unset;border:1px solid #323232;background-color:#f3f3f3}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid #323232;background-color:#000;box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.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:#fff;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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.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:#fff}@media (max-width: 768px){.ul-card-text__input{font-size:14px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}';
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff;color:#5d696f}.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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:#ffffff80}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:#666}.chat-card .choice{margin-bottom:0;background-color:unset;padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#f7f6f5}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:#141312;font-size:14px;font-weight:400;word-wrap:break-word}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:#999;font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:#000000b3}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ffffff4d;pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:#e8e7e6}.sprig-stretch input{background-color:#fff}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:#2f2e2c;text-align:center;word-break:break-word;font-size:.95rem}.likert-number{height:8vw;width:8vw;min-height:32px;max-width:54px;max-height:54px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number){max-width:100%;padding:0 .5rem}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:#2f2e2c}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:#2f2e2c}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:#2f2e2c}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:#fff;border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}.chat-card .select-checkbox{border:1px solid #323232;background-color:#fff}.chat-card .select-radio{box-shadow:unset;border:1px solid #323232;background-color:#f3f3f3}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid #323232;background-color:#000;box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.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:#fff;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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.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:#fff}@media (max-width: 768px){.ul-card-text__input{font-size:14px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}';
@@ -1,4 +1,4 @@
1
- const t = 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff;color:#5d696f}.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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:16px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:#ffffff80}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:#666}.chat-card .choice{margin-bottom:0;background-color:unset;padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#f7f6f5}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:#141312;font-size:14px;font-weight:400;word-wrap:break-word}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:#999;font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:#000000b3}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ffffff4d;pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:#e8e7e6}.sprig-stretch input{background-color:#fff}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:#2f2e2c;text-align:center;word-break:break-word;font-size:.95rem}.likert-number{height:8vw;width:8vw;min-height:32px;max-width:54px;max-height:54px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number){max-width:100%;padding:0 .5rem}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:#2f2e2c}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:#2f2e2c}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:#2f2e2c}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:#fff;border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}.chat-card .select-checkbox{border:1px solid #323232;background-color:#fff}.chat-card .select-radio{box-shadow:unset;border:1px solid #323232;background-color:#f3f3f3}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid #323232;background-color:#000;box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.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:#fff;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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.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:#fff}@media (max-width: 768px){.ul-card-text__input{font-size:14px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}';
1
+ const t = 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff;color:#5d696f}.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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:#ffffff80}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:#666}.chat-card .choice{margin-bottom:0;background-color:unset;padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#f7f6f5}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:#333;background:#e8e7e6}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:#141312;font-size:14px;font-weight:400;word-wrap:break-word}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:#999;font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:#000000b3}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ffffff4d;pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:#e8e7e6}.sprig-stretch input{background-color:#fff}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:#2f2e2c;text-align:center;word-break:break-word;font-size:.95rem}.likert-number{height:8vw;width:8vw;min-height:32px;max-width:54px;max-height:54px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number){max-width:100%;padding:0 .5rem}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:#2f2e2c}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:#2f2e2c}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:#2f2e2c}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:#fff;border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}.chat-card .select-checkbox{border:1px solid #323232;background-color:#fff}.chat-card .select-radio{box-shadow:unset;border:1px solid #323232;background-color:#f3f3f3}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid #323232;background-color:#000;box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.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:#fff;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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.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:#fff}@media (max-width: 768px){.ul-card-text__input{font-size:14px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}';
2
2
  export {
3
3
  t as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  var Ot = Object.defineProperty;
2
2
  var Ct = (r, e, i) => e in r ? Ot(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i;
3
- var N = (r, e, i) => Ct(r, typeof e != "symbol" ? e + "" : e, i);
4
- import { l as H, g as O, s as dt, e as g, S as u, v as ct, m as S, b as P, h as pt, E as ae, a as Q, D as C, c as Pt, r as G, i as Mt, j as jt, k as Ft, n as Ke, o as Je, d as qt, p as ut, q as gt } from "./metricsReporter-DDWVWGid.js";
3
+ var z = (r, e, i) => Ct(r, typeof e != "symbol" ? e + "" : e, i);
4
+ import { l as H, g as O, s as dt, e as g, S as u, v as ct, m as S, b as P, h as pt, E as ae, a as Q, D as C, c as Pt, r as G, i as Mt, j as jt, k as Ft, n as Ke, o as Je, d as qt, p as ut, q as gt } from "./metricsReporter-Bg5aC8mO.js";
5
5
  const gr = 360, hr = "ul-app", yr = "#e6e6e6", br = "#bd282a", mr = 1030, Qe = () => {
6
6
  try {
7
7
  return window.parent.Intercom;
@@ -54,7 +54,7 @@ function x(r, e, i) {
54
54
  }), i && a.push(i), a.join("/");
55
55
  }
56
56
  const te = async (r, e, i) => {
57
- var ze, Ne, Be, $e;
57
+ var Ne, ze, Be, $e;
58
58
  const { context: a, delay: t, avatars: s, experimentFlags: n, forceBrandedLogo: o, endCard: l, isFeedback: c = !1, heatmap: d, locale: p, layout: m, previewMode: f, productConfig: h, questions: b, responseGroupUid: v, surveyId: y, uuid: I, vid: L, sessionReplay: k, studyType: V, surveyVisitorAttributes: T } = r, E = O(window.UserLeap), M = oe(E), K = we(E);
59
59
  if (k) if (M) g.emit(u.ReplayCapture, { responseGroupUid: v, hasQuestions: !!(b != null && b.length), surveyId: y, uploadId: k.uploadId, replayType: k.replayDurationType ?? "before", seconds: k.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: ct(), mediaType: "screen", questionId: 1, responseGroupUid: v, surveyId: y, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
60
60
  else {
@@ -63,10 +63,10 @@ const te = async (r, e, i) => {
63
63
  }
64
64
  if (d) {
65
65
  if (!S.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
66
- const { eventId: U, replayParams: z, responseGroupUid: Se, surveyId: Te } = d;
66
+ const { eventId: U, replayParams: N, responseGroupUid: Se, surveyId: Te } = d;
67
67
  await S.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: i }), S.replay.tryReplayAction(() => {
68
68
  var Ge;
69
- return (Ge = S.replay) == null ? void 0 : Ge.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: E, eventId: U, isHeatmap: !0, replayParams: z, responseGroupId: Se, surveyId: Te, triggerTimestamp: Date.now(), visitorId: L });
69
+ return (Ge = S.replay) == null ? void 0 : Ge.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: E, eventId: U, isHeatmap: !0, replayParams: N, responseGroupId: Se, surveyId: Te, triggerTimestamp: Date.now(), visitorId: L });
70
70
  }, "Error in scheduling/capturing replay");
71
71
  }
72
72
  if (L == null || !(b != null && b.length)) return P.info("CannotDisplaySurvey", { vid: L }), { success: !1, message: "[Sprig] no survey found", surveyState: window.UserLeap.container ? "previous survey ready" : "no survey" };
@@ -79,16 +79,16 @@ const te = async (r, e, i) => {
79
79
  const U = "Attempted to display survey to a different visitor";
80
80
  return window.UserLeap.reportError("DisplaySurvey", new Error(U)), { success: !1, message: U, surveyState: "no survey" };
81
81
  }
82
- P.info("ShowingSurvey", { surveyId: y }), (ze = S.replay) == null || ze.RecordSurveyShown({ id: y, userAgent: window.navigator.userAgent }), Ht.disable(), g.emit(u.SurveyWillPresent, { name: u.SurveyWillPresent, "survey.id": y, layout: m });
82
+ P.info("ShowingSurvey", { surveyId: y }), (Ne = S.replay) == null || Ne.RecordSurveyShown({ id: y, userAgent: window.navigator.userAgent }), Ht.disable(), g.emit(u.SurveyWillPresent, { name: u.SurveyWillPresent, "survey.id": y, layout: m });
83
83
  let W, X, R, ne, le = document.createElement("div");
84
84
  const qe = (U) => {
85
- const { "view.version": z } = U;
86
- z !== E["x-ul-sdk-version"] && yt(), g.removeListener("verify.view.version", qe);
85
+ const { "view.version": N } = U;
86
+ N !== E["x-ul-sdk-version"] && yt(), g.removeListener("verify.view.version", qe);
87
87
  };
88
88
  g.on("verify.view.version", qe), window.UserLeap.useMobileStyling = K, pt(E) ? (W = "ul-direct-embeded-frame", X = document.head, R = window, ne = !1, (() => {
89
- const U = O(window.UserLeap), z = oe(U), Se = window.UserLeap.forceDirectEmbed, Te = U["userleap-platform"] === "web";
90
- return z || Se && Te;
91
- })() && (ht(y, c), le.id = W, window.UserLeap.container.appendChild(le), bt(), g.emit(u.SurveyLifeCycle, { state: "presented" }), g.emit(u.SurveyPresented, { name: u.SurveyPresented, "survey.id": y }))) : { frameId: W, contentWinDocHead: X, contentWindow: R, hasOverlay: ne, iframe: le } = Nt({ productConfig: h, useMobileStyling: K, surveyId: y, isFeedback: c, enableCspTrustedTypes: (Ne = window.UserLeap._config) == null ? void 0 : Ne.enableCspTrustedTypes }), window.UserLeap.frameId = W;
89
+ const U = O(window.UserLeap), N = oe(U), Se = window.UserLeap.forceDirectEmbed, Te = U["userleap-platform"] === "web";
90
+ return N || Se && Te;
91
+ })() && (ht(y, c), le.id = W, window.UserLeap.container.appendChild(le), bt(), g.emit(u.SurveyLifeCycle, { state: "presented" }), g.emit(u.SurveyPresented, { name: u.SurveyPresented, "survey.id": y }))) : { frameId: W, contentWinDocHead: X, contentWindow: R, hasOverlay: ne, iframe: le } = zt({ productConfig: h, useMobileStyling: K, surveyId: y, isFeedback: c, enableCspTrustedTypes: (ze = window.UserLeap._config) == null ? void 0 : ze.enableCspTrustedTypes }), window.UserLeap.frameId = W;
92
92
  const J = { apiURL: window.UserLeap._API_URL, avatars: s, cards: b, configureExitOnOverlayClick: (U) => {
93
93
  g.once(u.CloseSurveyOnOverlayClick, U);
94
94
  }, context: a, endCard: l, envId: window.UserLeap.envId, eventEmitFn: g.emit.bind(g), experimentFlags: n, fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: o, frame: le, headers: E, layout: m, locale: p, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: Q.getItem("sprig.previewKey"), previewMode: f || !!window.previewMode, productConfig: { framePosition: h == null ? void 0 : h.framePosition, desktopDisplay: h == null ? void 0 : h.desktopDisplay, placement: h == null ? void 0 : h.placement }, responseGroupUid: v, startingQuestionIdx: (Be = window.UserLeap.config) == null ? void 0 : Be.startingQuestionIdx, studyType: V, styleNonce: window.UserLeap.styleNonce, surveyId: y, tabTitle: document.title, trackPageViewUrl: e, ulEvents: ae, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: K, userId: I, viewDocument: R == null ? void 0 : R.document, viewWindow: R, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, surveyVisitorAttributes: T || {}, ...window.UserLeap._config };
@@ -104,7 +104,7 @@ const te = async (r, e, i) => {
104
104
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
105
105
  };
106
106
  if (J.installationMethod === "web-npm" || J.installationMethod === "web-npm-bundled") {
107
- const { default: U } = await import("./view-Ctyh240J.js").then((z) => z.z);
107
+ const { default: U } = await import("./view-MpYHLeMt.js").then((N) => N.B);
108
108
  U.configure(J), ne && window.UserLeap.container && Ve();
109
109
  } else Le && (Ue.src = `${Le}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, ne && Ue.addEventListener("load", () => {
110
110
  window.UserLeap.container && Ve();
@@ -159,7 +159,7 @@ const Ie = "0px", ht = (r, e, i) => {
159
159
  g.once(u.SurveyWillClose, ({ initiator: r, studyType: e }) => {
160
160
  g.removeAllListeners(u.CloseSurveyOnOverlayClick), yt(r, e);
161
161
  });
162
- }, zt = (r, e, i, a) => {
162
+ }, Nt = (r, e, i, a) => {
163
163
  var d, p;
164
164
  const t = { position: "fixed", bottom: "0px", right: Ie, 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, globalThis.UserLeap), { desktopDisplay: n } = e || {}, o = n === "center-modal";
165
165
  let l;
@@ -190,13 +190,13 @@ const Ie = "0px", ht = (r, e, i) => {
190
190
  const h = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, b = f ? m.overlayStyleMobile : m.overlayStyle;
191
191
  h["background-color"] = b === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", f || (h.margin = "auto"), globalThis.UserLeap.container && Object.assign(globalThis.UserLeap.container.style, h);
192
192
  })(s, i), Object.assign(r.style, t, l), c;
193
- }, Nt = ({ productConfig: r, useMobileStyling: e, surveyId: i, isFeedback: a, enableCspTrustedTypes: t }) => {
193
+ }, zt = ({ productConfig: r, useMobileStyling: e, surveyId: i, isFeedback: a, enableCspTrustedTypes: t }) => {
194
194
  var f, h;
195
195
  const s = Me, n = a && r.desktopDisplay === "slider";
196
196
  ht(i, a, n), Bt();
197
197
  const o = document.createElement("iframe");
198
198
  o.id = s, o.setAttribute("title", "Sprig User Feedback Dialog");
199
- const l = zt(o, r, e, a);
199
+ const l = Nt(o, r, e, a);
200
200
  bt();
201
201
  let c = !1;
202
202
  o.setHeight = (b) => {
@@ -357,7 +357,7 @@ const Kt = ["bottom-left", "bottom-right", "center-left", "center-right"], ue =
357
357
  return e.className = "sprig-feedback-error-text", e.innerText = "There was an error while loading the survey", r.appendChild(e), r;
358
358
  }, De = new class {
359
359
  constructor() {
360
- N(this, "_ldData", {});
360
+ z(this, "_ldData", {});
361
361
  }
362
362
  getAllLaunchDarklyVariations() {
363
363
  return this._ldData;
@@ -375,7 +375,7 @@ const Kt = ["bottom-left", "bottom-right", "center-left", "center-right"], ue =
375
375
  Object.freeze(De);
376
376
  const ce = new class {
377
377
  constructor() {
378
- N(this, "_optimizelyData", {});
378
+ z(this, "_optimizelyData", {});
379
379
  }
380
380
  setOptimizelyExperiment(r, e = !0) {
381
381
  if (!r || typeof r != "object") return !1;
@@ -423,9 +423,9 @@ const ce = new class {
423
423
  Object.freeze(ce);
424
424
  class Qt {
425
425
  constructor(e, i) {
426
- N(this, "paused");
427
- N(this, "queue");
428
- N(this, "ul");
426
+ z(this, "paused");
427
+ z(this, "queue");
428
+ z(this, "ul");
429
429
  this.ul = e, this.paused = !1, this.queue = [], this.flush(i);
430
430
  }
431
431
  flush(e) {
@@ -864,7 +864,7 @@ function dr(r = {}) {
864
864
  var y;
865
865
  await D(x("1", [q], "metrics"), { body: v, method: "POST", headers: { "x-ul-replay-enabled": `${!!((y = S.replay) != null && y.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
866
866
  } }), !c) {
867
- const v = d.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: d.alwaysOnReplay.surveyId, responseGroupUuid: d.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.43.0", maxDurationSeconds: d.alwaysOnReplay.maxDurationSeconds } : void 0;
867
+ const v = d.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: d.alwaysOnReplay.surveyId, responseGroupUuid: d.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.44.0", maxDurationSeconds: d.alwaysOnReplay.maxDurationSeconds } : void 0;
868
868
  await ((h = S.replay) == null ? void 0 : h.initializeReplay({ maxReplayDurationSeconds: d.maxReplayDurationSeconds, maxInflightRequests: globalThis.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: d.replaySettings, apiUrl: globalThis.UserLeap._API_URL, alwaysOnConfig: v })), Fe = d.replaySettings;
869
869
  }
870
870
  nr(d), await or(d), globalThis.UserLeap._queue.unpause(), (b = globalThis.SprigLoggerCallback) == null || b.call(globalThis, "SdkReady"), g.emit(u.SDKReady, { mobileMetricsReportingEnabled: !!d.mobileMetricsReportingEnabled, metricsReportingInterval: d.metricsReportingIntervalSeconds || 0, metricsThresholds: d.metricThresholds || [], maxMobileReplayDurationSeconds: d.maxMobileReplayDurationSeconds, mobileReplaySettings: d.mobileReplaySettings }), g.emit(u.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId }), g.on(u.VisitorIDUpdated, () => {
@@ -877,7 +877,7 @@ function dr(r = {}) {
877
877
  }
878
878
  class ve {
879
879
  constructor() {
880
- N(this, "UPDATES", ae);
880
+ z(this, "UPDATES", ae);
881
881
  }
882
882
  displaySurvey(e) {
883
883
  var i;