@sprig-technologies/sprig-bundled 2.46.0 → 2.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{conversational-ui-DR7m5fTX.js → conversational-ui-BZDC1buu.js} +3 -3
- package/dist/{conversational-ui-BFVjhjtp.cjs → conversational-ui-DqQZMJkq.cjs} +1 -1
- package/dist/{getAttributedUrl-IcC63CWO.cjs → getAttributedUrl-BuO50-dW.cjs} +1 -1
- package/dist/{getAttributedUrl-CrSHEuDU.js → getAttributedUrl-BvS4nPJR.js} +2 -2
- package/dist/{index-8IqBkL-J.cjs → index-BCIAxJWJ.cjs} +2 -2
- package/dist/{index-ssZu7abp.js → index-D2UpkOdR.js} +3 -3
- package/dist/{index-nfe0p3os.cjs → index-DiPr4x-u.cjs} +1 -1
- package/dist/{index-B9EDtB3L.js → index-fcbxeQg3.js} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{view-RRtNaAXH.js → view-5-qQQKtl.js} +4 -4
- package/dist/{view-iopAAugx.cjs → view-D8rc4Fhu.cjs} +1 -1
- package/package.json +1 -1
|
@@ -6029,7 +6029,7 @@ const _f = (e) => e._config && e._config.installationMethod ? e._config.installa
|
|
|
6029
6029
|
iu = !0, ou = e;
|
|
6030
6030
|
};
|
|
6031
6031
|
function Ue(e = {}) {
|
|
6032
|
-
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.46.
|
|
6032
|
+
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.46.1", "x-ul-installation-method": _f(e), "sprig-modules": Df(), "x-ul-package-version": "2.46.1" };
|
|
6033
6033
|
if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
|
|
6034
6034
|
const r = JSON.parse(e.mobileHeadersJSON);
|
|
6035
6035
|
Object.assign(t, r);
|
|
@@ -6158,7 +6158,7 @@ const tr = async (e, t, r) => {
|
|
|
6158
6158
|
window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
|
|
6159
6159
|
};
|
|
6160
6160
|
if (_.installationMethod === "web-npm" || _.installationMethod === "web-npm-bundled") {
|
|
6161
|
-
const { default: q } = await import("./view-
|
|
6161
|
+
const { default: q } = await import("./view-5-qQQKtl.js").then((z) => z.C);
|
|
6162
6162
|
q.configure(_), b && window.UserLeap.container && Y();
|
|
6163
6163
|
} else T && (Q.src = `${T}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, b && Q.addEventListener("load", () => {
|
|
6164
6164
|
window.UserLeap.container && Y();
|
|
@@ -6982,7 +6982,7 @@ function cg(e = {}) {
|
|
|
6982
6982
|
var m;
|
|
6983
6983
|
await ze(Ae("1", [it], "metrics"), { body: C, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = ne.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
|
|
6984
6984
|
} }), !c) {
|
|
6985
|
-
const C = u.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.46.
|
|
6985
|
+
const C = u.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.46.1", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
|
|
6986
6986
|
await ((w = ne.replay) == null ? void 0 : w.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: globalThis.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: globalThis.UserLeap._API_URL, alwaysOnConfig: C })), io = u.replaySettings;
|
|
6987
6987
|
}
|
|
6988
6988
|
ag(u), await og(u), globalThis.UserLeap._queue.unpause(), (h = globalThis.SprigLoggerCallback) == null || h.call(globalThis, "SdkReady"), j.emit(B.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), j.emit(B.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId }), j.on(B.VisitorIDUpdated, () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-iopAAugx.cjs"),ee=require("./index-8IqBkL-J.cjs"),v=require("./getAttributedUrl-IcC63CWO.cjs"),Be=({className:n,message:i,next:d,properties:r,questionId:t,type:s})=>{const{useMobileStyling:g,border:y,isLongFormSurvey:c,focusedQuestionId:h}=e.useConfig(m=>({useMobileStyling:m.useMobileStyling,border:m.border,isLongFormSurvey:ee.isLongFormSurvey(m.studyType),focusedQuestionId:m.focusedQuestionId})),[l,b]=e.h(!1),[u,I]=e.h(""),[a,f]=e.h(!1),p=c&&h===t,x=r==null?void 0:r.collectName,C=(r==null?void 0:r.nameLabelText)||"Full Name",q=(r==null?void 0:r.consentText)||"I agree to the stated conditions",L=(r==null?void 0:r.submitButtonText)||"Submit",E=!!u.trim(),M=l&&(!x||E),U=(m,S=!1)=>{m.preventDefault(),m.stopPropagation();let B=null;if(!S){if(!M)return void f(!0);B={submitted:!0},x&&(B.name=u)}d({value:B,questionId:t,type:s},M)};return e.u("div",{className:e.cc(n,c&&!p&&"ul-card--unfocused","ul-card__consent-legal","fade-in-transition"),children:[e.u(v.Header,{isRequired:c&&(r==null?void 0:r.required),message:i,properties:{questionHtml:r.questionHtml}}),r!=null&&r.richTextBody?e.u(v.QuestionBodyWrapper,{children:e.u(v.Html,{className:"ul-rich-text-body",html:r.richTextBody,id:"ul-card__consent-legal-body-container"})}):null,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:y,error:a&&!l,id:"consent",isRadio:!1,isSelected:l,label:q,onUserInputChanged:({selected:m})=>{m!==l&&b(!l)},useMobileStyling:g}),x&&e.u("input",{"aria-label":C,"aria-placeholder":C,className:e.cc(e.getClasses("ul-consent-legal__name-input",g)),"data-gramm":"false",maxLength:250,name:"name",onBlur:m=>{m.currentTarget.style.borderColor=a&&!E?ee.ERROR_BORDER_COLOR:ee.DEFAULT_BORDER_COLOR},onFocus:m=>{m.currentTarget.style.borderColor=a&&!E?ee.ERROR_BORDER_COLOR:y},onInput:m=>{m.preventDefault(),m.stopPropagation(),I(m.currentTarget.value)},placeholder:C,style:a&&!E?{borderColor:ee.ERROR_BORDER_COLOR}:{},tabIndex:0,value:u})]}),e.u("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[e.u(v.Button,{className:M?"":"sprig-button-disabled",onClick:U,children:L}),r.required===!1&&!c&&e.u("button",{className:"ul-card-skip__button",onClick:m=>U(m,!0),children:e.getSkipButtonText(r)})]})]})})]},t)},ae=n=>i=>{i.pointerType!=="touch"&&n()},Me=({activeValue:n,border:i,icon:d,isPressed:r,onSubmit:t,range:s,scaleLabelType:g,selectedValue:y,setSelectedValue:c,setActiveValue:h,setIsPressed:l,useMobileStyling:b,value:u,viewDocument:I})=>{const{isLongFormSurvey:a,enableCspTrustedTypes:f}=e.useConfig(S=>({isLongFormSurvey:ee.isLongFormSurvey(S.studyType),enableCspTrustedTypes:S.enableCspTrustedTypes})),p=`option-${u}`,x=g==="number",C=g==="star",q=g==="smiley",L=x&&u===n||u===y,[E,M]=(()=>{const S=C&&y!==null&&u<=y;return C&&u<=n||q&&u===n||S||u===n||u===y?[i,r||S||u===y?1:.3]:["",1]})(),U=e.F(()=>{const S=y===u,B={borderColor:L&&!b||S?E:"",fillOpacity:L?"":M,zIndex:L?3:"auto",color:S?"#fff":""};return x?{...B,backgroundColor:S?E:""}:{...B,color:C||q||S?E:""}},[L,E,M,y,u,x,C,q,b]),m=e.F(()=>ee.getHtml((({icon:S,scaleLabelType:B,value:P,selectedValue:H})=>{if(B==="smiley"&&P===H){let w=0;return S.replace(/black/g,()=>++w==1?"black":"white")}return S})({icon:d,scaleLabelType:g,value:u,selectedValue:y}),f),[f,d,g,y,u]);return e.u("button",{"aria-label":x?void 0:String(u),className:(()=>{switch(g){case"star":return e.cc(e.getClasses("likert-star",b),e.getClasses(`likert-star-${u}`,b));case"smiley":return e.cc(e.getClasses("likert-smiley",b),e.getClasses(`likert-smiley-${u}`,b));default:return u===s?e.cc(e.getClasses("likert-number",b),e.getClasses(`likert-number-${u}`,b),e.getClasses("likert-last-option",b)):e.cc(e.getClasses("likert-number",b),e.getClasses(`likert-number-${u}`,b))}})(),dangerouslySetInnerHTML:{__html:m},id:p,onClick:S=>{a&&(S.preventDefault(),S.stopPropagation(),c(u)),t()},onKeyDown:S=>{var H,w;const B=I.querySelectorAll(`.likert-${g??"number"}`),P=u-1;S.key==="ArrowRight"?(H=B[P+1])==null||H.focus():S.key==="ArrowLeft"?(w=B[P-1])==null||w.focus():S.key!=="Enter"&&S.key!==" "||(a&&(S.preventDefault(),S.stopPropagation(),c(u)),t())},onPointerCancel:ae(()=>l(!1)),onPointerDown:ae(()=>{l(!0),h(u)}),onPointerEnter:ae(()=>h(u)),onPointerLeave:ae(()=>{h(-1),l(!1)}),onPointerUp:ae(()=>l(!1)),style:U,tabIndex:0})},Re=({className:n,labels:i,message:d,next:r,properties:t,questionId:s,type:g})=>{const{border:y,useMobileStyling:c,viewDocument:h,isLongFormSurvey:l,focusedQuestionId:b}=e.useConfig(P=>({border:P.border,useMobileStyling:P.useMobileStyling,viewDocument:P.viewDocument,isLongFormSurvey:ee.isLongFormSurvey(P.studyType),focusedQuestionId:P.focusedQuestionId})),[u,I]=e.h(-1),[a,f]=e.h(!1),[p,x]=e.h(null);e.p(()=>{I(-1),f(!1),x(null)},[s]);const C=l&&b===s,q=i&&i.left,L=i&&i.right;let E;const{range:M,scaleLabelType:U,ratingIcons:m}=t;M&&(E=Number(M));const S=E||5,B=P=>{var H,w;switch(U){case"star":return(H=m[0])==null?void 0:H.svg;case"smiley":return(w=m[P])==null?void 0:w.svg;default:return String(P+1)}};return e.u("form",{className:e.cc(n,"ul-card--likert","fade-in-transition",l&&!C&&"ul-card--unfocused"),children:[e.u(v.Header,{isRequired:l&&(t==null?void 0:t.required),message:d,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{"aria-label":`Rating (1 - ${S})`,className:"ul-card--likert__numbers",role:"radiogroup",children:[...Array(S)].map((P,H)=>{const w=H+1;return e.u(Me,{activeValue:u,border:y,icon:B(H),isPressed:a,onSubmit:()=>r({value:w,questionId:s,type:g},!0),range:S,scaleLabelType:U,selectedValue:p,setActiveValue:I,setIsPressed:f,setSelectedValue:x,useMobileStyling:c,value:w,viewDocument:h},H)})}),e.u("div",{className:"ul-card--likert__labels",children:[e.u("span",{children:q}),e.u("span",{children:L})]})]}),!t.required&&!l&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-vertical-centered-container",children:e.u(v.Button,{onClick:P=>{P.preventDefault(),P.stopPropagation(),r({value:null,questionId:s,type:g},!0)},children:e.getButtonText(t)})})})]})})]},s)},Pe=({columns:n,onSelect:i,options:d,selectedOptions:r})=>{const t=e._([]),{border:s,useMobileStyling:g,cards:y,index:c}=e.useConfig(a=>({border:a.border,useMobileStyling:a.useMobileStyling,cards:a.cards,index:a.index})),h=d.findIndex(a=>r[a.id]===null),[l,b]=e.h(h),u=e.T((a,f)=>{var C;i(a,f);const p=l+1,x=d[p];if(x&&r[x.id]===null){b(p);const q=y[c];(q==null?void 0:q.groupId)!=null||((C=t.current[p])==null||C.scrollIntoView({block:"nearest",behavior:"smooth"}))}},[i,d,r,l,y,c]),I=e.T((a,f)=>{const p=l===a;return e.u(e.Accordion,{animate:!0,header:f.label,isOpen:p,onClick:()=>{var x;return b(p&&!((x=window.UserLeap)!=null&&x.isMobileSDK)?-1:a)},ref:x=>{x&&(t.current[a]=x)},showHeaderCheck:r[f.id]!==null,children:e.u("div",{style:{paddingTop:"12px"},children:n.map(x=>e.u(v.Option,{allowTextEntry:!1,ariaLabel:`${f.label}-${x.label}`,border:s,error:!1,id:`${f.id}-${x.value}`,isRadio:!0,isSelected:r[f.id]===x.value,label:x.label,onUserInputChanged:()=>u(f.id,x.value),useMobileStyling:g},x.label))})},f.id)},[s,n,l,u,r,g]);return e.u("div",{children:d.map((a,f)=>I(f,a))})},De=({columns:n,onSelect:i,options:d,selectedOptions:r})=>{const{border:t,useMobileStyling:s,isLongFormSurvey:g}=e.useConfig(a=>({border:a.border,useMobileStyling:a.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(a.studyType)})),y=d.length,c=n.length,h=e._(null),[l,b]=e.h(!1),[u,I]=e.h(!1);return e.p(()=>{const a=h.current,f=new ResizeObserver(p=>{window.requestAnimationFrame(()=>{a&&(b(Math.round(p[0].contentRect.width)<a.scrollWidth),I(Math.round(p[0].contentRect.width)<a.scrollWidth))})});return a&&f.observe(a),()=>{a&&f.unobserve(a)}},[]),e.u("div",{className:"ul-card--matrix_question_container",children:[e.u("div",{className:e.cc("ul-card--matrix_container",l&&"ul-matrix-scroll-gradient"),onScroll:()=>{(()=>{const a=h.current;a&&b(a.clientWidth+Math.abs(a.scrollLeft)<a.scrollWidth)})()},ref:h,children:e.u("div",{className:e.cc(g&&"ul-card--matrix_grid_longform","ul-card--matrix_grid"),style:`--numColumns: ${c}; --numRows: ${y+1};`,children:[e.u("div",{})," ",n.map(a=>e.u("div",{className:"ul-matrix-column-label",children:a.label},a.label)),d.map(a=>e.u(e.g,{children:[e.u("div",{"aria-label":a.label,className:"ul-matrix-row-label",children:a.label},a.label),e.u("div",{className:"ul-matrix-row-options",role:"radiogroup",children:n.map((f,p)=>{const x=p===c-1;return e.u("div",{className:e.cc("ul-matrix-option-wrapper",x&&"ul-matrix-last-option"),children:e.u(v.Option,{allowTextEntry:!1,ariaLabel:`${a.label}-${f.label}`,border:t,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${a.id}-${f.value}`,isRadio:!0,isSelected:r[a.id]===f.value,onUserInputChanged:()=>i(a.id,f.value),useMobileStyling:s})},f.value)})})]}))]})}),(l||u)&&e.u("button",{className:u&&!l?"ul-matrix-scroll-arrow left":"ul-matrix-scroll-arrow",onClick:u&&!l?a=>{a.preventDefault();const f=h.current;if(f){const p=getComputedStyle(f).direction==="rtl";f.scrollTo({left:p?f.scrollWidth-f.clientWidth:0,behavior:"smooth"})}}:a=>{a.preventDefault();const f=h.current;if(f){const p=getComputedStyle(f).direction==="rtl";f.scrollTo({left:p?f.clientWidth-f.scrollWidth:f.scrollWidth,behavior:"smooth"})}},children:u&&!l?e.u(Fe,{}):e.u(Qe,{})})]})},Fe=()=>e.u("svg",{fill:"currentColor",height:"32",transform:"matrix(-1,0,0,1,0,0)",version:"1.1",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})}),Qe=()=>e.u("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})}),Ee=({className:n,message:i,next:d,options:r,properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c})=>{const{useMobileStyling:h,isLongFormSurvey:l,focusedQuestionId:b,setFocusedQuestionId:u}=e.useConfig(m=>({useMobileStyling:m.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(m.studyType),focusedQuestionId:m.focusedQuestionId,setFocusedQuestionId:m.setFocusedQuestionId})),I=t.matrixColumn,a=t.required,f=l&&b===s,p=m=>Object.values(m).every(S=>S==null),x=m=>a&&p(m),C=m=>{if(m.preventDefault(),m.stopPropagation(),d({value:L,questionId:s,type:g},!0),c){const S=!p(L);c(S)}},q=r.reduce((m,S)=>(m[S.id]=null,m),{}),[L,E]=e.h(q),M=(m,S)=>{l&&d({value:{...L,[m]:S},questionId:s,type:g},!x({...L,[m]:S})),E(B=>({...B,[m]:S}))},U=t.displayMatrixAsAccordion||h;return e.u("form",{className:e.cc(n,!l&&"ul-card__matrix","fade-in-transition",l&&!f&&"ul-card--unfocused"),id:"text-form",onClick:()=>{f&&u(s)},onSubmit:C,children:[e.u(v.Header,{isRequired:l&&(t==null?void 0:t.required),message:i,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:[e.u(v.QuestionBodyWrapper,{children:[U?e.u(Pe,{columns:I,onSelect:M,options:r,selectedOptions:L}):e.u(De,{columns:I,onSelect:M,options:r,selectedOptions:L}),y&&e.u(v.LongformSubmitButton,{handleSubmit:C,isSubmitDisabled:x(L)})]}),!l&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:x(L),children:e.getButtonText(t)})})})]})]},s)},Ce=({className:n,message:i,onSubmit:d,options:r=[],properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c})=>{const{border:h,useMobileStyling:l,isLongFormSurvey:b,focusedQuestionId:u,setFocusedQuestionId:I}=e.useConfig(k=>({border:k.border,useMobileStyling:k.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(k.studyType),focusedQuestionId:k.focusedQuestionId,setFocusedQuestionId:k.setFocusedQuestionId})),a=b&&u===s,f=r.reduce((k,Q)=>(k[Q.id]={isSelected:!1},k),{}),[p,x]=e.h(f),C=g==="multiplechoice",q=t.required,L=r.find(k=>{var Q;return(Q=k.optionProperties)==null?void 0:Q.noneOfTheAbove}),E=k=>Object.entries(k).some(([Q,V])=>{var re;const J=r.find(o=>`${o.id}`===Q),G=V.userText===void 0||V.userText.trim()==="";return((re=J==null?void 0:J.optionProperties)==null?void 0:re.allowsTextEntry)&&G&&V.isSelected}),M=k=>Object.values(k).filter(Q=>Q.isSelected).length,U=k=>{const{minSelect:Q=0,maxSelect:V=1/0,maxSelectMode:J}=t,G=M(k);switch(J){case e.MaxSelectModes.Maximum:return G<=V;case e.MaxSelectModes.Range:return G===0||G>=Q;default:return!0}},m=t.minSelect&&t.minSelect>0&&t.maxSelectMode===e.MaxSelectModes.Range&&M(p)<t.minSelect&&(q||M(p)>0),S=k=>E(k)||q&&!M(k)||!U(k),B=k=>U(k)&&!E(k)&&M(k)>0,P=Object.entries(p).some(([k,Q])=>{var V,J;return Q.isSelected&&((J=(V=r.find(G=>`${G.id}`===k))==null?void 0:V.optionProperties)==null?void 0:J.allowsTextEntry)}),H=y&&(!C||P),w=k=>{Y(k.id,k.selected,k.userText,k.noneOfTheAbove),k.selected&&b&&!C&&!a&&I(s)},O=k=>{var Q;return(t==null?void 0:t.maxSelectMode)!==e.MaxSelectModes.Unlimited&&M(p)===(t==null?void 0:t.maxSelect)&&!((Q=p[k])!=null&&Q.isSelected)},z=k=>{if(k.preventDefault(),k.stopPropagation(),d(p,!0),c){const Q=B(p);c(Q)}},Y=(k,Q,V,J)=>{const G=Object.assign({},p);if((C||J)&&Q)for(const T of Object.values(G))T.isSelected=!1,delete T.userText;else L&&!J&&p[L.id].isSelected&&(G[L.id].isSelected=!1);G[k]={isSelected:Q,userText:V};const re=C&&Object.entries(G).some(([T,N])=>{var F,D;return N.isSelected&&((D=(F=r.find(j=>`${j.id}`===T))==null?void 0:F.optionProperties)==null?void 0:D.allowsTextEntry)}),o=!S(G);if(b&&(d(G,o),C&&!re&&o&&c)){const T=B(G);c(T)}x(G)};return e.u("form",{className:e.cc(n,"ul-card--multiple","fade-in-transition",b&&!a&&"ul-card--unfocused"),id:"text-form",onClick:g==="multipleselect"?()=>{b&&u!==s&&g==="multipleselect"&&I(s)}:void 0,onSubmit:z,children:[e.u(v.Header,{isRequired:b&&(t==null?void 0:t.required),message:i,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:[t.isDropdown?e.u(v.Select,{disabledOptions:r.filter(k=>O(k.id)),dropdownFooter:m?e.u("div",{className:"ul-card__min-select-counter",style:{marginLeft:"16px"},children:[M(p),"/",t.minSelect]}):void 0,isMultiSelect:!C,multiselectText:t.dropdownMultiselectedText??"choices selected",onChange:k=>{const Q={...p};for(const V of r)k.includes(V)?Q[V.id].isSelected=!0:Q[V.id].isSelected=!1;b&&d(Q,!S(Q)),x(Q)},options:r,placeholderText:t.dropdownPlaceholderText??(C?"Select choice":"Select choice(s)"),value:r.filter(k=>p[k.id].isSelected)}):e.u("div",{className:e.cc(e.getClasses("ul-card__choices",l)),role:C?"radiogroup":"group",children:[r.map(({id:k,label:Q,value:V,optionProperties:J})=>{var T,N;const G=`${k}`,{allowsTextEntry:re,noneOfTheAbove:o}={allowsTextEntry:!1,noneOfTheAbove:!1,...J};return e.u(v.Option,{allowTextEntry:re,border:h,disabled:O(G),error:E(p),id:G,isRadio:C,isSelected:!!((T=p[G])!=null&&T.isSelected),label:Q,noneOfTheAbove:o,onUserInputChanged:w,promptText:(J==null?void 0:J.otherOptionPlaceholder)||"Please specify",text:(N=p[k])==null?void 0:N.userText,useMobileStyling:l,value:V},G)}),!!m&&e.u("div",{className:"ul-card__min-select-counter",children:[M(p),"/",t.minSelect]})]}),H&&e.u(v.LongformSubmitButton,{handleSubmit:z,isSubmitDisabled:S(p)})]}),!b&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:S(p),onClick:z,children:e.getButtonText(t)})})})]})})]},s)},Oe=n=>{const{questionId:i,type:d,next:r,options:t}=n,{setFocusedQuestionId:s}=e.useConfig(g=>({setFocusedQuestionId:g.setFocusedQuestionId}));return e.u(Ce,{...n,onSubmit:(g,y)=>{var I;const c=Object.entries(g).find(([,a])=>a.isSelected)||[void 0,void 0],[h,l]=c,b=t.find(a=>`${a.id}`===h);!((I=b==null?void 0:b.optionProperties)!=null&&I.allowsTextEntry)||l!=null&&l.userText&&l.userText.trim()!==""||s(i);const u=l!=null&&l.userText?{[h]:{userText:l.userText}}:null;r({value:b&&h?{[h]:b.value}:{},secondaryValue:u,questionId:i,type:d},y)}})},Ae=n=>{const{questionId:i,type:d,next:r}=n;return e.u(Ce,{...n,onSubmit:(t,s)=>{const g=Object.entries(t).reduce((c,[h,l])=>(c[h]=l.isSelected,c),{}),y=Object.entries(t).reduce((c,[h,l])=>{if(!l.userText)return c;const b=c||{};return b[h]={userText:l.userText},b},null);r({value:g,secondaryValue:y,questionId:i,type:d},s)}})},He=({className:n,labels:i,message:d,properties:r,next:t,questionId:s,type:g})=>{const[y,c]=e.h(null),{border:h,useMobileStyling:l,viewDocument:b,isLongFormSurvey:u,focusedQuestionId:I}=e.useConfig(x=>({border:x.border,useMobileStyling:x.useMobileStyling,viewDocument:x.viewDocument,isLongFormSurvey:ee.isLongFormSurvey(x.studyType),focusedQuestionId:x.focusedQuestionId})),a=u&&I===s,f=i&&i.left,p=i&&i.right;return e.u("form",{className:e.cc(n,"ul-card--nps","fade-in-transition",u&&!a&&"ul-card--unfocused"),children:[e.u(v.Header,{isRequired:u&&(r==null?void 0:r.required),message:d,properties:r}),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,C)=>e.u("button",{className:e.cc(e.getClasses("nps-number",l),e.getClasses(`nps-number-${C}`,l)),id:`option-${C}`,onClick:q=>{u&&(q.preventDefault(),q.stopPropagation(),c(C)),t({value:C,questionId:s,type:g},!0)},onKeyDown:q=>{var E,M;const L=b.querySelectorAll("button.nps-number");q.key==="ArrowRight"?(E=L[C+1])==null||E.focus():q.key==="ArrowLeft"?(M=L[C-1])==null||M.focus():q.key!=="Enter"&&q.key!==" "||(u&&(q.preventDefault(),q.stopPropagation(),c(C)),t({value:C,questionId:s,type:g},!0))},onPointerDown:q=>{q.currentTarget.style.zIndex="2",q.currentTarget.style.borderColor=h},onPointerLeave:q=>{q.currentTarget.style.zIndex="auto"},style:y===C?{backgroundColor:h,color:"#fff"}:void 0,tabIndex:0,children:C},C))}),e.u("div",{className:"ul-card--nps__labels",children:[e.u("span",{children:f}),e.u("span",{children:p})]})]}),!r.required&&!u&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-vertical-centered-container",children:e.u(v.Button,{onClick:x=>{x.preventDefault(),x.stopPropagation(),t({value:null,questionId:s,type:g},!0)},children:e.getButtonText(r)})})})]})]},s)},$e=n=>{const{className:i,message:d,next:r,properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c}=n,h=g==="aidynamicfollowup"||g==="aidynamicstandalone",l=h?n.loading:void 0,{border:b,useMobileStyling:u,update:I,isLongFormSurvey:a,focusedQuestionId:f,setFocusedQuestionId:p,isPreview:x}=e.useConfig(w=>({border:w.border,useMobileStyling:w.useMobileStyling,update:w.update,isLongFormSurvey:ee.isLongFormSurvey(w.studyType),focusedQuestionId:w.focusedQuestionId,setFocusedQuestionId:w.setFocusedQuestionId,isPreview:w.isPreview})),[C,q]=e.h(""),L=e._(null),E=a&&f===s;e.p(()=>{var w,O;a&&!x&&(E?(w=L.current)==null||w.focus():(O=L.current)==null||O.blur())},[a,E,x]);const M=C.trim(),U=t.required===!0&&!M,m=v.useAutoSize(L,()=>I()),S=w=>{w.preventDefault(),w.stopPropagation();const O=M.length>0,z=!t.required||O;r({value:C,questionId:s,type:g},z),c&&c(O)},B=t&&t.openTextPlaceholder?t.openTextPlaceholder:"";if((l===e.DynamicQuestionLoadingStates.failure||l===void 0)&&h)return e.u(e.g,{});const P=l===e.DynamicQuestionLoadingStates.inFlight,H=P?"Preparing your next question":d;return e.u("form",{className:e.cc(i,"ul-card-text","fade-in-transition",a&&!E&&"ul-card--unfocused"),id:"text-form",onClick:()=>{a&&f!==s&&p(s)},children:[e.u(v.Header,{isRequired:a&&(t==null?void 0:t.required),message:H,properties:t}),e.u(v.MobileEmbedView,{properties:t,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":B,className:e.cc(P&&"ul-card-text__input__loading",e.getClasses("ul-card-text__input",u)),"data-gramm":"false",disabled:P,maxLength:5e3,name:"text",onBlur:w=>{w.currentTarget.style.borderColor=ee.DEFAULT_BORDER_COLOR},onChange:w=>{const{value:O}=w.currentTarget;if(m(),w.preventDefault(),w.stopPropagation(),q(O),a){const z=O.trim().length>0;r({value:O,questionId:s,type:g},z)}},onFocus:w=>{w.currentTarget.style.borderColor=b,p(s)},placeholder:B,ref:L,role:"textbox",tabIndex:0})}),t.footerHtml&&e.u(v.Html,{className:"footer",html:t.footerHtml}),y&&e.u(v.LongformSubmitButton,{handleSubmit:S,isSubmitDisabled:U}),e.u(v.QuestionBodyFooterContainer,{children:!a&&e.u(v.Button,{disabled:U||P,onClick:S,children:e.getButtonText(t)})})]})})})]},s)},ce=1,ke=2,Te=3,le=n=>n.type==="av_permission",ve=n=>n.type==="screen_permission",_e=(n,i)=>n===void 0?ce:n?((d,r)=>!(le(r)?r.permissionDescriptors:[]).includes("camera")||d.getVideoTracks().length>0)(n,i)?Te:ce:ke,ye={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ne=e.create(n=>({...ye,reset:()=>{n(ye)},updatePage:i=>{n(i)}}));function pe({currentPage:n,pages:i}){const{avStream:d,recordingMediaTypes:r,updatePage:t}=ne.getState(),{recorderEventEmitter:s}=e.useConfig.getState();s.emit("av.permission",{"permission.descriptors":n.permissionDescriptors,"stream.ready":(g,y)=>{if(d===g)return;let c=n;if(g&&!n.permissionDescriptors.includes("camera")){const h=i.indexOf(n),l=y!=null&&y.active?h+2:h+1;y!=null&&y.active&&r&&s.emit("begin.recording",{"recording.media.types":r,"start.recording.callback":b=>t({mediaRecordingUids:b})}),c=i[l]}t({currentPage:c,avStream:g})}})}function me({status:n}){const{nextQuestion:i,passthroughData:d,mediaRecordingUids:r,reset:t}=ne.getState(),{recorderEventEmitter:s,handleUploadUpdate:g,index:y}=e.useConfig.getState(),c={value:{taskStatus:n},type:"recordedtask",questionId:(d==null?void 0:d.questionId)||1};d&&s.emit("finish.task",{"begin.callback":h=>{g({mediaRecordingUid:h,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(h,l)=>{g({mediaRecordingUid:h,progressPct:l.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":h=>{h&&g({mediaRecordingUid:h,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":d,"current.index":y,"task.response":c,"task.complete.callback":h=>{c.value.taskDurationMillisecond=h,r&&(c.value.mediaRecordingUids=r),t(),i(c)}})}function ge({pages:n,setIsRequestingPermission:i}){const{recorderEventEmitter:d,eventEmitFn:r}=e.useConfig.getState(),{updatePage:t,currentPage:s,recordingMediaTypes:g,screenPermissionRequested:y}=ne.getState();if(!s)return;const c=n.indexOf(s);switch(s.type){case"av_permission":{const h=y?c+2:c+1;return y&&g&&d.emit("begin.recording",{"recording.media.types":g,"start.recording.callback":l=>{t({mediaRecordingUids:l})}}),void t({currentPage:n[h]})}case"screen_permission":return void d.emit("screen.permission",{"screen.permission.requested":i,"stream.ready.callback":(h,l)=>{const b=l?n[c+1]:s;l&&g&&d.emit("begin.recording",{"recording.media.types":g,"start.recording.callback":u=>{t({captureStream:l,mediaRecordingUids:u})}}),t({currentPage:b,screenPermissionRequested:!0,captureStream:l})}});case"start_task":return r("recorded.task.start"),d.emit("recorded.task.start"),d.emit("start.task"),void t({currentPage:n[c+1],screenPermissionRequested:!0});case"complete_task":return}}const we="ul-permission-graphics-container",Ie="ul-permission-body",Ne=e.cc(we,"ul_recorded-task-inset-spacing"),ue=e.cc("ul-horizontal-button-container","ul-horizontal-button-container-left"),Le=({richTextBody:n})=>e.u(v.Html,{className:"ul-rich-text-body",html:n,id:"ul-task-detail-container"}),de=({required:n,skipButtonText:i,bottom:d=!1})=>n?null:e.u(v.Button,{className:e.cc(d&&"ul-skip-button-below","ul-button-inactive"),onClick:me.bind(null,{status:"abandoned"}),children:i||"Skip"}),he=n=>{const{avStream:i,captureStream:d,recordingMediaTypes:r,updatePage:t}=ne.getState(),s=(r==null?void 0:r.includes("audio"))||(r==null?void 0:r.includes("video"));e.p(()=>{const g=setInterval(()=>{s&&i&&!i.active?t({avStream:null,currentPage:n[0]}):d&&d.active||t({captureStream:void 0,currentPage:n[s?1:0]})},1e3);return()=>clearInterval(g)},[i,d,s,n,r,t])},Ue=({content:n,pages:i,required:d})=>{const{buttonText:r,skipButtonText:t,taskDetail:s}=n;return he(i),e.u("div",{className:"ul-task-page",children:[s&&e.u(Le,{richTextBody:s}),e.u("div",{className:ue,children:[e.u(v.Button,{onClick:ge.bind(null,{pages:i}),children:r}),e.u(de,{required:d,skipButtonText:t})]})]},"start-task")},Ve=({content:n,pages:i,properties:d})=>{const{buttonText:r,skipButtonText:t}=n;return he(i),e.u("div",{className:"ul-task-page",children:[n.taskDetail&&e.u(Le,{richTextBody:n.taskDetail}),e.u(v.MobileEmbedView,{properties:d,children:e.u("div",{className:ue,children:[e.u(v.Button,{className:"ul-complete-task-button",onClick:me.bind(null,{status:"completed"}),children:r}),e.u(v.Button,{className:e.cc("ul-button-inactive"),onClick:me.bind(null,{status:"given.up"}),children:t})]})})]},"complete-task")},We=({content:n,pages:i,required:d})=>{const{buttonText:r,skipButtonText:t}=n,[s]=e.useConfig(c=>[c.tabTitle]),[g,y]=e.h(!1);return e.u("div",{children:[e.u("div",{className:Ne,children:[e.u("p",{style:{marginTop:"auto"},children:n.selectTabText}),e.u("div",{className:"ul-select-tab-container",children:e.u("p",{className:Ie,children:s})})]}),e.u("div",{className:d?"":ue,children:[e.u(v.Button,{disabled:g,onClick:ge.bind(null,{pages:i,setIsRequestingPermission:y}),children:r}),e.u(de,{required:d,skipButtonText:t})]})]})},je=({content:n})=>e.u(v.Html,{className:e.cc(we,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),html:n.svg},"ul-permission-request-graphic"),Ge=({content:n,pages:i,required:d})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:t,skipButtonText:s,tryAgainButtonText:g}=n,y=le(i[0])?i[0]:null;return e.p(()=>{const c=setInterval(()=>{y!==null&&pe({currentPage:y,pages:i})},1e3);return()=>clearInterval(c)},[y,i]),y?e.u("div",{children:[e.u("div",{className:Ne,children:e.u("p",{className:"ul-av-permission-denied-paragraph",children:[e.u("span",{className:"ul-av-permission-denied-headline",children:r}),e.u("span",{className:Ie,children:t})]})}),e.u("div",{className:ue,children:[e.u(v.Button,{onClick:pe.bind(null,{currentPage:y,pages:i}),children:g}),e.u(de,{required:d,skipButtonText:s})]})]}):null},Ze=({stream:n})=>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=n||null)}}),ze=({content:n,pages:i,required:d})=>{const{skipButtonText:r}=n,{avStream:t}=ne.getState();return he(i),e.u("div",{children:[e.u(Ze,{stream:t}),e.u("div",{className:"ul-vertical-button-container-center",children:[e.u(v.Button,{onClick:ge.bind(null,{pages:i}),children:n.buttonText}),e.u(de,{bottom:!0,required:d,skipButtonText:r})]})]})},Ye=({properties:n})=>{const{pages:i,required:d}=n,{avStream:r,currentPage:t}=ne.getState();if(t===void 0)return null;switch(t==null?void 0:t.type){case"av_permission":{const s=_e(r,t);return s===ce?e.u(je,{content:t}):s===ke?e.u(Ge,{content:t,pages:i,required:d}):e.u(ze,{content:t,pages:i,required:d})}case"screen_permission":return e.u(We,{content:t,pages:i,required:d});case"start_task":return e.u(Ue,{content:t,pages:i,required:d});case"complete_task":return e.u(Ve,{content:t,pages:i,properties:n});default:return null}},Ke=({className:n,properties:i,next:d,questionId:r})=>{const t=e.useConfig(),{surveyId:s,responseGroupUid:g,userId:y,update:c}=t,h=ne(),{screenPermissionRequested:l}=h,b=ne(p=>p.avStream);let u=ne(p=>p.currentPage);u||(u=function({pages:p,userId:x,responseGroupUid:C,surveyId:q,questionId:L,next:E}){const{updatePage:M}=ne.getState(),{eventEmitFn:U,recorderEventEmitter:m}=e.useConfig.getState(),S={questionId:L,surveyId:q,visitorId:x,responseGroupUid:C};let B=0;m.emit("recorded.task.permission.screen"),U("recorded.task.permission.screen"),m.emit("permission.status",{"permission.status.callback":(H,w,O,z)=>{const Y=p[B],{type:k}=Y,Q=["screen"];if(le(Y)){const{permissionDescriptors:V}=Y,J=V==null?void 0:V.includes("microphone"),G=V==null?void 0:V.includes("camera");J&&Q.push("audio"),G&&Q.push("video"),(H!=null&&H.active&&!G||H!=null&&H.active&&w)&&B++}ve(p[B])&&O&&(B++,m.emit("begin.recording",{"recording.media.types":Q,"start.recording.callback":V=>M({mediaRecordingUids:V})})),M({currentPage:p[B],avStream:H,screenPermissionRequested:O,nextQuestion:E,type:k,passthroughData:S,recordingMediaTypes:Q,captureStream:z})}});const P=p[B];return P.type==="av_permission"&&pe({currentPage:P,pages:p}),P}({questionId:r,surveyId:s,next:p=>{d(p,!0)},pages:i.pages,responseGroupUid:g,userId:y}));let I=u.headline,a=u.captionText;const f=_e(b,u);return ve(u)&&l&&(I=u.permissionDeniedHeadline,a=u.permissionDeniedCaptionText),le(u)&&f===Te&&(I=u.permissionGrantedHeadline,a=u.permissionGrantedCaptionText),e.p(()=>{c()},[c]),e.u("div",{className:e.cc(n,"ul-center-horizontally","fade-in-transition"),children:[e.u(v.Header,{isRequired:i==null?void 0:i.required,message:I,properties:{captionText:a}}),e.u(v.QuestionBodyWrapper,{children:e.u(Ye,{properties:i})})]})},Xe=({richTextBody:n,plaintextBody:i})=>n?e.u(v.Html,{className:"ul-rich-text-body",html:n,id:"ul-card__text-url-body-container"}):i?e.u("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(i?i.split(/\n\s*\n/g):[]).map((d,r)=>e.u("p",{children:d},r))}):null,Je=({className:n,message:i,next:d,properties:r,questionId:t,type:s})=>{const{visitorAttributes:g,isLongFormSurvey:y}=e.useConfig(b=>({visitorAttributes:b.visitorAttributes,isLongFormSurvey:ee.isLongFormSurvey(b.studyType)})),c=(b,u=!1)=>{d({value:u?{skipped:!0}:void 0,questionId:t,type:s},!0)},h=v.getAttributedUrl(r&&r.buttonUrl,g),l=y&&r.promptActionType===e.PromptActionTypeEnum.NO_BUTTON;return e.u("div",{className:e.cc(n,"ul-card__text-url-prompt","fade-in-transition"),children:[e.u(v.Header,{isRequired:y&&(r==null?void 0:r.required),message:i,properties:{questionHtml:r.questionHtml}}),e.u(v.QuestionBodyWrapper,{children:e.u(Xe,{plaintextBody:r==null?void 0:r.body,richTextBody:r==null?void 0:r.richTextBody})}),e.u(v.MobileEmbedView,{properties:r,children:!l&&e.u(v.QuestionBodyFooterContainer,{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:h,id:"ul-card-text__button",onClick:c,onKeyPress:b=>{b.key!=="Enter"&&b.key!==" "||d({value:void 0,questionId:t,type:s},!0)},rel:"noreferrer",role:h?"link":"button",tabIndex:0,target:"_blank",children:e.getButtonText(r)}),r.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:b=>c(0,!0),children:e.getSkipButtonText(r)})]})})})]},t)},et=({className:n,questionId:i})=>{const{border:d,destroy:r,endCard:t,forceBrandedLogo:s,update:g}=e.useConfig(h=>({border:h.border,destroy:h.destroy,endCard:h.endCard,forceBrandedLogo:h.forceBrandedLogo,update:h.update}));e.p(()=>{setTimeout(()=>{r(ee.APP_ID)},s?4e3:2e3)},[r,s]);const y=t&&t.subheader?e.u("p",{className:"ul-caption",children:t.subheader}):null,c=t&&t.headline?t.headline:"";return e.p(()=>{g()},[g]),e.u("div",{className:e.cc(n,"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:d,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:d,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:c}),y]})})},i)},tt=({className:n})=>{const{uploadProgress:i}=e.useConfig(s=>({uploadProgress:s.uploadProgress}));let d,r;Object.values(i).filter(s=>s.isSubmitted).length>1?(d="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(d="Your response is processing",r="Please keep this tab open until your response is fully processed.");const t=Math.round(Math.min(99,...Object.values(i).filter(s=>s.isSubmitted).map(s=>s.progressPct||0)));return e.u("div",{className:e.cc(n,"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:`${d} (${t}% complete)`}),e.u("p",{className:"ul-caption",children:r})]})},qe=e.F$1(void 0),rt=({value:n,children:i})=>e.u(qe.Provider,{value:n,children:i}),nt=({isRightLabel:n,isLeftLabel:i})=>n?e.MaxDiffChoice.RIGHT:i?e.MaxDiffChoice.LEFT:null,it="Best",st="Worst",ot=({className:n,labels:i,message:d,properties:r,options:t,questionId:s,type:g,next:y})=>{var L,E,M,U;const[c,h]=e.h(t.map((m,S)=>({...m,label:m.label===""?`Item ${S+1}`:m.label,isRightLabel:!1,isLeftLabel:!1}))),l=(()=>{const m=e.q(qe);if(m===void 0)throw new Error("usePreviousResponses must be used within a PreviousResponsesProvider");return m})(),b={padding:"24px",display:"flex",cursor:"pointer",width:"auto"},[u,I]=e.h(!1);e.p(()=>{const m=c.findIndex(Y=>Y.isRightLabel),S=c.findIndex(Y=>Y.isLeftLabel),B=m!==-1&&S!==-1;I(B);const P=!r.required||r.required&&B,H=c.map(Y=>({id:Y.id,option:Y.label,selected:nt(Y)})),w=Math.floor(s),O=Object.keys(l).filter(Y=>Y.startsWith(w.toString())).map(Number).sort((Y,k)=>Y-k).at(-1),z=[];if(typeof O=="number"){const Y=l[O],k=JSON.parse(Y);z.push(...k)}z.push(H),setTimeout(()=>{y({value:z,questionId:s,type:g},P,B),I(!1)},B?500:0)},[c]);const{border:a,useMobileStyling:f,enableCspTrustedTypes:p}=e.useConfig(m=>({border:m.border,useMobileStyling:m.useMobileStyling,enableCspTrustedTypes:m.enableCspTrustedTypes})),x=(m,S)=>()=>{u||h(B=>((P,H,w)=>P.map(O=>O.id===H?{...O,isRightLabel:w===e.MaxDiffChoice.RIGHT,isLeftLabel:w===e.MaxDiffChoice.LEFT}:w===e.MaxDiffChoice.RIGHT&&O.isRightLabel||w===e.MaxDiffChoice.LEFT&&O.isLeftLabel?{...O,isRightLabel:!1,isLeftLabel:!1}:O))(B,m,S))},C=(L=r.ratingIcons)==null?void 0:L[0].svg,q=(E=r.ratingIcons)==null?void 0:E[1].svg;return e.u("form",{className:e.cc(n,"ul-card-maxdiff","fade-in-transition"),children:[e.u(v.Header,{isRequired:r==null?void 0:r.required,message:d,properties:r}),e.u(v.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--maxdiff__question-inner-container",children:[e.u("div",{className:"ul-card-maxdiff__label",children:(i==null?void 0:i.left)||((M=r==null?void 0:r.labels)==null?void 0:M.left)||it}),e.u("div",{children:" "}),e.u("div",{className:"ul-card-maxdiff__label",children:(i==null?void 0:i.right)||((U=r==null?void 0:r.labels)==null?void 0:U.right)||st}),c.map(({id:m,label:S,isLeftLabel:B,isRightLabel:P})=>e.u(e.g,{children:[e.u("div",{className:"ul-card-maxdiff__option-control "+(q?"smiley":""),children:q?e.u(fe,{ariaPressed:B,className:B?"ul-card-maxdiff__option-btn ul-card-maxdiff__option-selected good":"ul-card-maxdiff__option-btn",enableCspTrustedTypes:p,html:q,id:`smiley-good-${m}`,onClick:x(m,e.MaxDiffChoice.LEFT)}):e.u(v.Option,{allowTextEntry:!1,ariaLabel:`bestLabel-${S}`,border:a,choiceStyle:b,error:!1,id:`${m}`,isRadio:!0,isSelected:B,onUserInputChanged:x(m,e.MaxDiffChoice.LEFT),useMobileStyling:f})}),e.u("div",{className:"ul-card-maxdiff__option-label",children:S}),e.u("div",{className:"ul-card-maxdiff__option-control "+(C?"smiley":""),children:C?e.u(fe,{ariaPressed:P,className:P?"ul-card-maxdiff__option-btn ul-card-maxdiff__option-selected bad":"ul-card-maxdiff__option-btn",enableCspTrustedTypes:p,html:C,id:`smiley-bad-${m}`,onClick:x(m,e.MaxDiffChoice.RIGHT)}):e.u(v.Option,{allowTextEntry:!1,ariaLabel:`worstLabel-${S}`,border:a,choiceStyle:b,error:!1,id:`${m}`,isRadio:!0,isSelected:P,onUserInputChanged:x(m,e.MaxDiffChoice.RIGHT),useMobileStyling:f})})]}))]})})]},s)},fe=({enableCspTrustedTypes:n,ariaPressed:i,className:d,html:r,id:t,onClick:s})=>{const g=e.F(()=>ee.getHtml(r,n),[n,r]);return e.u("span",{"aria-pressed":i,className:d,dangerouslySetInnerHTML:{__html:g},id:t,onClick:s,tabIndex:0,type:"button"})},at=({className:n,labels:i,message:d,next:r,properties:t,questionId:s,type:g,onSubmitButtonClick:y,options:c,showIndividualSubmit:h=!1})=>{const l=e._(null),b=e._(0),u=e._(0),I=e._(null),a=e._(!1),f=e._([]),[p,x]=e.h(()=>(t==null?void 0:t.required)===!0),[C,q]=e.h(!1),[L,E]=e.h(()=>c.map(_=>({..._,rank:null}))),M=e.F(()=>Array.from({length:c.length},(_,$)=>$+1),[c.length]),{isLongFormSurvey:U,focusedQuestionId:m,setFocusedQuestionId:S,useMobileStyling:B,isPreview:P,headers:H}=e.useConfig(_=>({useMobileStyling:_.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(_.studyType),focusedQuestionId:_.focusedQuestionId,setFocusedQuestionId:_.setFocusedQuestionId,isPreview:_.isPreview,headers:_.headers})),w=(H==null?void 0:H["userleap-platform"])==="android",O=B&&!P&&!w,z=!O&&!w,Y=U&&m===s,k=_=>{_.preventDefault(),T(L),y&&y(C)},Q=(_,$)=>{E(A=>{const R=parseInt($),W=A.map(Z=>({...Z}));W.some(Z=>Z.rank==null)&&W.forEach((Z,oe)=>Z.rank=oe+1);const te=W.findIndex(Z=>Z.id===_);if(te===-1)return A;const X=W[te].rank;return R<X?W.forEach(Z=>{Z.id!==_&&Z.rank>=R&&Z.rank<X&&(Z.rank=Z.rank+1)}):R>X&&W.forEach(Z=>{Z.id!==_&&Z.rank>X&&Z.rank<=R&&(Z.rank=Z.rank-1)}),W[te].rank=R,W.sort((Z,oe)=>Z.rank-oe.rank),N(W),W})},V=(_,$)=>{for(let A=0;A<f.current.length;A++){const R=f.current[A];if(!R||R===I.current)continue;const W=R.getBoundingClientRect();if(_>=W.left&&_<=W.right&&$>=W.top&&$<=W.bottom)return{element:R,index:A}}return null},J=_=>$=>{if(!O)return;$.preventDefault(),$.stopPropagation(),a.current=!0,l.current=_;const A=$.touches[0];b.current=A.clientY,u.current=A.clientY;const R=$.currentTarget.closest(".ul-card-rank__option");R&&(I.current=R,R.classList.add("is-dragging"))},G=_=>{if(!O||!a.current||l.current===null)return;_.preventDefault(),_.stopPropagation();const $=_.touches[0];u.current=$.clientY;const A=u.current-b.current;I.current&&(I.current.style.transform=`translateY(${A}px)`,I.current.style.zIndex="1000"),f.current.forEach(W=>{W&&W!==I.current&&W.classList.remove("is-drop-target")});const R=V($.clientX,$.clientY);R&&R.element.classList.add("is-drop-target")},re=_=>{if(!O||!a.current||l.current===null)return;_.preventDefault(),_.stopPropagation();const $=_.changedTouches[0],A=V($.clientX,$.clientY);I.current&&(I.current.style.transform="",I.current.style.zIndex="",I.current.classList.remove("is-dragging")),f.current.forEach(R=>{R&&R.classList.remove("is-drop-target")}),A&&A.index!==l.current&&o(l.current,A.index),l.current=null,I.current=null,a.current=!1},o=(_,$)=>{E(A=>{const R=A.map(te=>({...te})),[W]=R.splice(_,1);return R.splice($,0,W),R.forEach((te,X)=>{te.rank=X+1}),N(R),R})},T=_=>{const $={};_.reduce((A,R)=>(A[R.id]=R.rank,A),$),r({value:$,questionId:s,type:g},!0)},N=_=>{x(!1),q(!0),U&&T(_)},{left:F,right:D}=i,j=c.length,K=_=>{_.preventDefault(),_.currentTarget.classList.add("is-drop-target")},ie=_=>{_.currentTarget.classList.remove("is-drop-target")},se=_=>{l.current=null,_.currentTarget.classList.remove("is-dragging")};return e.u("form",{className:e.cc(n,"ul-card-rank","fade-in-transition",U&&!Y&&"ul-card--unfocused"),onClick:U&&!Y?()=>{S(s)}:void 0,onSubmit:k,children:[e.u(v.Header,{isRequired:t==null?void 0:t.required,message:d,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:w?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:L.map(({id:_,label:$,rank:A})=>e.u("li",{className:"ul-card-rank__option",children:[e.u("select",{"aria-label":`Rank for ${$}`,className:e.cc("ul-card-rank__select",A==null&&"ul-card-rank__select--placeholder"),name:`rank[${_}]`,onChange:R=>Q(_,R.currentTarget.value),value:A??"",children:[A==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),M.map(R=>e.u("option",{className:"ul-card-rank__select-option",value:R,children:R},`${R}-${s}`))]}),e.u("span",{children:$})]},_))}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[j," - ",D]})})]}),h&&e.u(v.LongformSubmitButton,{handleSubmit:k,isSubmitDisabled:p})]}),!U&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:p,children:e.getButtonText(t)})})})]}):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:w?void 0:_=>{_.preventDefault(),_.dataTransfer&&(_.dataTransfer.dropEffect="move")},children:L.map(({id:_,label:$,rank:A},R)=>{return e.u("li",{className:"ul-card-rank__option",draggable:!!z||void 0,onDragEnd:z?se:void 0,onDragEnter:z?K:void 0,onDragLeave:z?ie:void 0,onDragStart:z?(te=R,X=>{l.current=te,X.dataTransfer&&(X.dataTransfer.effectAllowed="move",X.dataTransfer.setData("text/plain",String(te)),X.currentTarget.classList.add("is-dragging"))}):void 0,onDrop:z?(W=R,X=>{var oe,be;X.preventDefault(),X.currentTarget.classList.remove("is-drop-target");const Z=l.current;l.current=null,(be=(oe=X.currentTarget.closest(".ul-card-rank__list"))==null?void 0:oe.querySelector(".is-dragging"))==null||be.classList.remove("is-dragging"),Z!=null&&Z!==W&&o(Z,W)}):void 0,ref:X=>f.current[R]=X,children:[e.u("select",{"aria-label":`Rank for ${$}`,className:e.cc("ul-card-rank__select",A==null&&"ul-card-rank__select--placeholder"),name:`rank[${_}]`,onChange:X=>Q(_,X.currentTarget.value),value:A??"",children:[A==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),M.map(X=>e.u("option",{className:"ul-card-rank__select-option",value:X,children:X},`${X}-${s}`))]}),e.u("span",{children:$}),!w&&e.u("button",{"aria-label":`Drag ${$} to reorder`,className:"ul-card-rank__drag-btn",onTouchEnd:O?re:void 0,onTouchMove:O?G:void 0,onTouchStart:O?J(R):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"})})})]},_);var W,te})}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[j," - ",D]})})]}),h&&e.u(v.LongformSubmitButton,{handleSubmit:k,isSubmitDisabled:p})]}),!U&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:p,children:e.getButtonText(t)})})})]})})]},s)},lt=new Set(["aidynamicfollowup","aidynamicstandalone","open","matrix","multipleselect","multiplechoice","rankorder"]),Se=({cardInstance:n,moveToNextQuestion:i,showIndividualSubmit:d,submitQuestion:r,updateCardValues:t,allResponsesArray:s})=>{const{isLongFormSurvey:g,createDynamicFollowupQuestion:y,cards:c,surveyVisitorAttributes:h}=e.useConfig(C=>({isLongFormSurvey:ee.isLongFormSurvey(C.studyType),createDynamicFollowupQuestion:C.createDynamicFollowupQuestion,cards:C.cards,surveyVisitorAttributes:C.surveyVisitorAttributes}));if(!n)return null;const{name:l,type:b,props:u,childId:I}=n,a=d&<.has(b),f=u==null?void 0:u.displayLogic;if(f!=null&&f.length&&!e.someDisplayLogicOptionMatches({displayLogic:f,allResponses:s,cards:c,surveyVisitorAttributes:h??{}}))return null;const p={className:"ul-card",next:(C,q,L=!0)=>r(C,q&&L),questionId:l,type:b,showIndividualSubmit:d,...a?{next:(C,q)=>{t(C.questionId,C,q??!0)},onSubmitButtonClick:(C=!1)=>{I?C?(i(l),y({parentQuestionId:l})):i(I):i(l)}}:{}},x=(()=>{switch(b){case"consentlegal":return e.u(Be,{...p,...u});case"likert":return e.u(Re,{...p,...u});case"matrix":return e.u(Ee,{...p,...u});case"maxdiff":return e.u(ot,{...p,...u});case"multiplechoice":return e.u(Oe,{...p,...u});case"multipleselect":return e.u(Ae,{...p,...u});case"nps":return e.u(He,{...p,...u});case"open":case"aidynamicfollowup":case"aidynamicstandalone":return e.u($e,{...p,type:n.type,...u});case"rankorder":return e.u(at,{...p,...u});case"recordedtask":return e.u(Ke,{...p,...u});case"texturlprompt":return e.u(Je,{...p,...u});case"thanks":return e.u(et,{...p,...u});case"uploading":return e.u(tt,{...p,...u});default:return null}})();return x?g?e.u("div",{className:"ul-card-scroll-wrapper",children:x},l):x:null},ut=({isSubmitDisabled:n=!1,onSubmit:i,buttonText:d})=>{var I;const{cards:r,forceBrandedLogo:t,index:s,marketingUrl:g,showSurveyBrand:y,slugName:c,surveyId:h,useMobileStyling:l}=e.useConfig(a=>({cards:a.cards,forceBrandedLogo:a.forceBrandedLogo,index:a.index,marketingUrl:a.marketingUrl,showSurveyBrand:a.showSurveyBrand,slugName:a.slugName,surveyId:a.surveyId,useMobileStyling:a.useMobileStyling})),b=((I=r[s])==null?void 0:I.type)==="thanks",u=e.buildMarketingUrl({marketingUrl:g,slugName:c,surveyId:h,forceBrandedLogo:t});return e.u("footer",{className:e.cc("long-form-question-footer-container",l&&"long-form-question-footer-container--mobile",b&&"long-form-question-footer-container-center"),children:[b&&t?e.u(e.ThankYouLink,{marketingUrlLink:u}):e.u("div",{className:"long-form-question-footer-container-logo",children:y?e.u(e.SprigBrandLogo,{forceBrandedLogo:t,marketingUrlLink:u}):null}),!b&&e.u("div",{className:e.cc("ul-card__button-wrapper","ul-card-vertical__button-wrapper","long-form-question-footer-container-actions"),children:e.u(v.Button,{className:e.cc("long-form-button",n&&"sprig-button-disabled"),disabled:n,onClick:i,children:e.u("span",{className:"long-form-button-text-container",children:d??e.u(e.Arrow,{stroke:"white"})})})})]})},dt=new Set(["thanks","uploading"]),xe="Questions with Display Logic do not show in side-by-side previews.";exports.PageCard=({cards:n,next:i,previousResponses:d})=>{var re;const r=e._(null),[t,s]=e.h({}),[g,y]=e.h({}),{isLongFormSurvey:c,focusedQuestionId:h,setFocusedQuestionId:l,createDynamicFollowupQuestion:b,allResponses:u,cardIndexByName:I,surveyVisitorAttributes:a,cards:f,createDynamicStandaloneQuestion:p,isPreview:x,update:C}=e.useConfig(o=>({isLongFormSurvey:ee.isLongFormSurvey(o.studyType),focusedQuestionId:o.focusedQuestionId,setFocusedQuestionId:o.setFocusedQuestionId,createDynamicFollowupQuestion:o.createDynamicFollowupQuestion,allResponses:o.allResponses,cardIndexByName:o.cardIndexByName,surveyVisitorAttributes:o.surveyVisitorAttributes,cards:o.cards,createDynamicStandaloneQuestion:o.createDynamicStandaloneQuestion,isPreview:o.isPreview,update:o.update})),q=e.F(()=>({...d,...e.buildReadableResponseMap(n.map(o=>{var T,N;return{...o,value:((T=t[o.name])==null?void 0:T.value)??null,secondaryValue:((N=t[o.name])==null?void 0:N.secondaryValue)??null}}))}),[d,t,n]);v.useSetAllResponsesRaw(q);const L=e.pipeReadableResponsesIntoCards(n,q),E=e.F(()=>e.buildResponsesArrayForDisplayLogic({storeAllResponses:u,cards:n,cardValues:t,cardIndexByName:I}),[u,n,t,I]),M=e.F(()=>{const o=new Set;return n.forEach(T=>{var F;const N=(F=T.props)==null?void 0:F.displayLogic;if(!N||N.length===0)return void o.add(T.name);e.someDisplayLogicOptionMatches({displayLogic:N,allResponses:E,cards:f,surveyVisitorAttributes:a??{}})&&o.add(T.name)}),o},[n,E,a,f]),U=(({isPreview:o,cards:T,displayedCardNames:N})=>{var j;if(!o||N.size>0)return!1;const F=T.filter(K=>!dt.has(K.type));if(F.length!==1)return!1;const D=(j=F[0].props)==null?void 0:j.displayLogic;return!!(D!=null&&D.length)})({isPreview:!!x,cards:n,displayedCardNames:M});e.p(()=>{U&&requestAnimationFrame(()=>{C()})},[U,C]),e.p(()=>{n.some(o=>{if(o.type==="aidynamicstandalone"&&o.props&&M.has(o.name)){if(o.props.loading===e.DynamicQuestionLoadingStates.inFlight)return!0;if(o.props.loading===void 0)return p({questionId:o.name}),!0}return!1})},[n,p,M]);const m=e._(null);e.p(()=>{const o=M,T=m.current;if(T!==null)for(const N of T)o.has(N)||(s(F=>{const D={...F};return delete D[N],D}),y(F=>{const D={...F};return delete D[N],D}));m.current=new Set(o)},[M]);const S=e._(null),B=e._(!1),P=e._(null),H=e.T(o=>{var D,j;B.current=!0;const T=n.findIndex(K=>K.name===o);if(!c||o===null||T===-1)return void(B.current=!1);const N=(D=S.current)==null?void 0:D.querySelectorAll(".ul-card-scroll-wrapper")[T],F=(j=S.current)==null?void 0:j.closest(".ul-card-main-content");if(N&&F){if(N&&F){const K=N.getBoundingClientRect(),ie=F.getBoundingClientRect(),se=K.top-ie.top+F.scrollTop,_=se+K.height/2,$=window.innerHeight-157;let A;K.height>=$?A=se:A=_-F.clientHeight/2;const R=F.clientHeight,W=F.scrollHeight-R,te=Math.max(0,Math.min(A,W));F.scrollTo({top:te,behavior:"smooth"}),setTimeout(()=>{B.current=!1},500)}}else B.current=!1},[c,n]);function w(o,T){return o.filter(N=>M.has(N.name)).map(N=>{const F=T[N.name],D=L.find(j=>j.name===N.name);return{...F,questionText:D?e.getProcessedQuestionText(D):void 0}})}e.p(()=>{h!==null&&n.findIndex(o=>o.name===h)!==-1||l(n[0].name)},[n,h,l]);const O=o=>{if(!c)return;let T=n.findIndex(N=>N.name===o)+1;for(;T<n.length&&!M.has(n[T].name);)T++;T<n.length?l(n[T].name):l(o)};e.p(()=>{c&&h!==null&&(P.current!==h?H(h):P.current=null)},[h,c,H]);const z=e.T(()=>{var ie,se;if(B.current)return;const o=(ie=S.current)==null?void 0:ie.closest(".ul-card-main-content");if(!o)return;const T=(se=S.current)==null?void 0:se.querySelectorAll(".ul-card-scroll-wrapper");if(!T||T.length===0)return;const N=o.getBoundingClientRect(),F=N.top+N.height/2;let D=0,j=1/0;T.forEach((_,$)=>{const A=_.getBoundingClientRect(),R=A.top+A.height/2,W=Math.abs(F-R);W<j&&(j=W,D=$)});const K=n[D];P.current=K.name,l(K.name)},[n,l]);e.p(()=>{var T;if(!c)return;const o=((T=S.current)==null?void 0:T.closest(".ul-card__container"))||null;return o&&o.addEventListener("scroll",z,{passive:!0}),()=>{o&&o.removeEventListener("scroll",z)}},[z,c]);const Y=e.F(()=>n.every(o=>{var T;return!M.has(o.name)||!(!(o!=null&&o.props)||!("properties"in o.props)||((T=o.props.properties)==null?void 0:T.required)!==!1)||g[o.name]}),[g,n,M]),k=async(o,T,N)=>{return y(D=>({...D,[o]:N})),await(F=D=>({...D,[o]:T}),new Promise(D=>{s(j=>{const K=F(j);return D(K),K})}));var F};e.p(()=>{var F;if(!c)return;const o=r.current,T=(F=n==null?void 0:n[0])==null?void 0:F.groupId;r.current=T;const N={};if(n.forEach(D=>{var j,K;e.appCardHasPropertiesWithRequired(D)&&(D.props.properties.required||(N[D.name]={value:((j=t[D.name])==null?void 0:j.value)??null,secondaryValue:((K=t[D.name])==null?void 0:K.secondaryValue)??null,questionId:D.name,type:D.type}))}),o==null||o!==T)s(N),y({});else{s(j=>({...j,...N}));const D=n.reduce((j,K)=>{var ie;return K.type==="aidynamicfollowup"&&((ie=K.props)==null?void 0:ie.loading)===null&&(j[K.name]=!0),j},{});y(j=>({...j,...D}))}},[n,c]);const Q=async(o,T)=>{const N=L.find(F=>F.name===o.questionId);if(c){const F=await k(o.questionId,o,T),D=V(o.type),j=J(o.type);if(D&&(N!=null&&N.groupId&&e.triggerFollowUpQuestionGeneration({displayCard:N,response:o,createDynamicFollowupQuestion:b}),O(o.questionId)),j&&T){const K=w(n,F);i(K)}}else{const F={...o,questionText:N?e.getProcessedQuestionText(N):void 0};e.triggerFollowUpQuestionGeneration({displayCard:N,response:o,createDynamicFollowupQuestion:b}),i([F])}},V=o=>new Set(["nps","likert","multiplechoice"]).has(o),J=o=>new Set(["videovoice","consentlegal","texturlprompt","maxdiff"]).has(o),G=((re=n[0])==null?void 0:re.type)==="thanks";return c?e.u("div",{className:"ul-card-list-container--longform","data-testid":"ui-container",ref:S,children:U?e.u("div",{className:"ul-display-logic-preview-message","data-testid":"display-logic-preview-message",children:xe}):e.u(rt,{value:d,children:[L.map((o,T)=>e.u(Se,{allResponsesArray:E,cardInstance:o,moveToNextQuestion:O,showIndividualSubmit:n.length>1&&T<n.length-1,submitQuestion:Q,updateCardValues:k},(o==null?void 0:o.name)||T)),!G&&e.u(ut,{isSubmitDisabled:!Y,onSubmit:function(){const o=w(n,t);if((L==null?void 0:L.length)===1&&(o==null?void 0:o.length)===1){const T=L[0],N=o[0];e.triggerFollowUpQuestionGeneration({displayCard:T,response:N,createDynamicFollowupQuestion:b})}i(o)}})]})}):e.u(e.g,{children:[e.u("div",{"data-testid":"ui-container",style:{display:"none"}}),U?e.u("div",{className:"ul-display-logic-preview-message","data-testid":"display-logic-preview-message",children:xe}):L.map((o,T)=>e.u(Se,{allResponsesArray:E,cardInstance:o,moveToNextQuestion:O,showIndividualSubmit:!1,submitQuestion:Q,updateCardValues:k},(o==null?void 0:o.name)||T))]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-D8rc4Fhu.cjs"),ee=require("./index-BCIAxJWJ.cjs"),v=require("./getAttributedUrl-BuO50-dW.cjs"),Be=({className:n,message:i,next:d,properties:r,questionId:t,type:s})=>{const{useMobileStyling:g,border:y,isLongFormSurvey:c,focusedQuestionId:h}=e.useConfig(m=>({useMobileStyling:m.useMobileStyling,border:m.border,isLongFormSurvey:ee.isLongFormSurvey(m.studyType),focusedQuestionId:m.focusedQuestionId})),[l,b]=e.h(!1),[u,I]=e.h(""),[a,f]=e.h(!1),p=c&&h===t,x=r==null?void 0:r.collectName,C=(r==null?void 0:r.nameLabelText)||"Full Name",q=(r==null?void 0:r.consentText)||"I agree to the stated conditions",L=(r==null?void 0:r.submitButtonText)||"Submit",E=!!u.trim(),M=l&&(!x||E),U=(m,S=!1)=>{m.preventDefault(),m.stopPropagation();let B=null;if(!S){if(!M)return void f(!0);B={submitted:!0},x&&(B.name=u)}d({value:B,questionId:t,type:s},M)};return e.u("div",{className:e.cc(n,c&&!p&&"ul-card--unfocused","ul-card__consent-legal","fade-in-transition"),children:[e.u(v.Header,{isRequired:c&&(r==null?void 0:r.required),message:i,properties:{questionHtml:r.questionHtml}}),r!=null&&r.richTextBody?e.u(v.QuestionBodyWrapper,{children:e.u(v.Html,{className:"ul-rich-text-body",html:r.richTextBody,id:"ul-card__consent-legal-body-container"})}):null,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:y,error:a&&!l,id:"consent",isRadio:!1,isSelected:l,label:q,onUserInputChanged:({selected:m})=>{m!==l&&b(!l)},useMobileStyling:g}),x&&e.u("input",{"aria-label":C,"aria-placeholder":C,className:e.cc(e.getClasses("ul-consent-legal__name-input",g)),"data-gramm":"false",maxLength:250,name:"name",onBlur:m=>{m.currentTarget.style.borderColor=a&&!E?ee.ERROR_BORDER_COLOR:ee.DEFAULT_BORDER_COLOR},onFocus:m=>{m.currentTarget.style.borderColor=a&&!E?ee.ERROR_BORDER_COLOR:y},onInput:m=>{m.preventDefault(),m.stopPropagation(),I(m.currentTarget.value)},placeholder:C,style:a&&!E?{borderColor:ee.ERROR_BORDER_COLOR}:{},tabIndex:0,value:u})]}),e.u("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[e.u(v.Button,{className:M?"":"sprig-button-disabled",onClick:U,children:L}),r.required===!1&&!c&&e.u("button",{className:"ul-card-skip__button",onClick:m=>U(m,!0),children:e.getSkipButtonText(r)})]})]})})]},t)},ae=n=>i=>{i.pointerType!=="touch"&&n()},Me=({activeValue:n,border:i,icon:d,isPressed:r,onSubmit:t,range:s,scaleLabelType:g,selectedValue:y,setSelectedValue:c,setActiveValue:h,setIsPressed:l,useMobileStyling:b,value:u,viewDocument:I})=>{const{isLongFormSurvey:a,enableCspTrustedTypes:f}=e.useConfig(S=>({isLongFormSurvey:ee.isLongFormSurvey(S.studyType),enableCspTrustedTypes:S.enableCspTrustedTypes})),p=`option-${u}`,x=g==="number",C=g==="star",q=g==="smiley",L=x&&u===n||u===y,[E,M]=(()=>{const S=C&&y!==null&&u<=y;return C&&u<=n||q&&u===n||S||u===n||u===y?[i,r||S||u===y?1:.3]:["",1]})(),U=e.F(()=>{const S=y===u,B={borderColor:L&&!b||S?E:"",fillOpacity:L?"":M,zIndex:L?3:"auto",color:S?"#fff":""};return x?{...B,backgroundColor:S?E:""}:{...B,color:C||q||S?E:""}},[L,E,M,y,u,x,C,q,b]),m=e.F(()=>ee.getHtml((({icon:S,scaleLabelType:B,value:P,selectedValue:H})=>{if(B==="smiley"&&P===H){let w=0;return S.replace(/black/g,()=>++w==1?"black":"white")}return S})({icon:d,scaleLabelType:g,value:u,selectedValue:y}),f),[f,d,g,y,u]);return e.u("button",{"aria-label":x?void 0:String(u),className:(()=>{switch(g){case"star":return e.cc(e.getClasses("likert-star",b),e.getClasses(`likert-star-${u}`,b));case"smiley":return e.cc(e.getClasses("likert-smiley",b),e.getClasses(`likert-smiley-${u}`,b));default:return u===s?e.cc(e.getClasses("likert-number",b),e.getClasses(`likert-number-${u}`,b),e.getClasses("likert-last-option",b)):e.cc(e.getClasses("likert-number",b),e.getClasses(`likert-number-${u}`,b))}})(),dangerouslySetInnerHTML:{__html:m},id:p,onClick:S=>{a&&(S.preventDefault(),S.stopPropagation(),c(u)),t()},onKeyDown:S=>{var H,w;const B=I.querySelectorAll(`.likert-${g??"number"}`),P=u-1;S.key==="ArrowRight"?(H=B[P+1])==null||H.focus():S.key==="ArrowLeft"?(w=B[P-1])==null||w.focus():S.key!=="Enter"&&S.key!==" "||(a&&(S.preventDefault(),S.stopPropagation(),c(u)),t())},onPointerCancel:ae(()=>l(!1)),onPointerDown:ae(()=>{l(!0),h(u)}),onPointerEnter:ae(()=>h(u)),onPointerLeave:ae(()=>{h(-1),l(!1)}),onPointerUp:ae(()=>l(!1)),style:U,tabIndex:0})},Re=({className:n,labels:i,message:d,next:r,properties:t,questionId:s,type:g})=>{const{border:y,useMobileStyling:c,viewDocument:h,isLongFormSurvey:l,focusedQuestionId:b}=e.useConfig(P=>({border:P.border,useMobileStyling:P.useMobileStyling,viewDocument:P.viewDocument,isLongFormSurvey:ee.isLongFormSurvey(P.studyType),focusedQuestionId:P.focusedQuestionId})),[u,I]=e.h(-1),[a,f]=e.h(!1),[p,x]=e.h(null);e.p(()=>{I(-1),f(!1),x(null)},[s]);const C=l&&b===s,q=i&&i.left,L=i&&i.right;let E;const{range:M,scaleLabelType:U,ratingIcons:m}=t;M&&(E=Number(M));const S=E||5,B=P=>{var H,w;switch(U){case"star":return(H=m[0])==null?void 0:H.svg;case"smiley":return(w=m[P])==null?void 0:w.svg;default:return String(P+1)}};return e.u("form",{className:e.cc(n,"ul-card--likert","fade-in-transition",l&&!C&&"ul-card--unfocused"),children:[e.u(v.Header,{isRequired:l&&(t==null?void 0:t.required),message:d,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:[e.u("div",{"aria-label":`Rating (1 - ${S})`,className:"ul-card--likert__numbers",role:"radiogroup",children:[...Array(S)].map((P,H)=>{const w=H+1;return e.u(Me,{activeValue:u,border:y,icon:B(H),isPressed:a,onSubmit:()=>r({value:w,questionId:s,type:g},!0),range:S,scaleLabelType:U,selectedValue:p,setActiveValue:I,setIsPressed:f,setSelectedValue:x,useMobileStyling:c,value:w,viewDocument:h},H)})}),e.u("div",{className:"ul-card--likert__labels",children:[e.u("span",{children:q}),e.u("span",{children:L})]})]}),!t.required&&!l&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-vertical-centered-container",children:e.u(v.Button,{onClick:P=>{P.preventDefault(),P.stopPropagation(),r({value:null,questionId:s,type:g},!0)},children:e.getButtonText(t)})})})]})})]},s)},Pe=({columns:n,onSelect:i,options:d,selectedOptions:r})=>{const t=e._([]),{border:s,useMobileStyling:g,cards:y,index:c}=e.useConfig(a=>({border:a.border,useMobileStyling:a.useMobileStyling,cards:a.cards,index:a.index})),h=d.findIndex(a=>r[a.id]===null),[l,b]=e.h(h),u=e.T((a,f)=>{var C;i(a,f);const p=l+1,x=d[p];if(x&&r[x.id]===null){b(p);const q=y[c];(q==null?void 0:q.groupId)!=null||((C=t.current[p])==null||C.scrollIntoView({block:"nearest",behavior:"smooth"}))}},[i,d,r,l,y,c]),I=e.T((a,f)=>{const p=l===a;return e.u(e.Accordion,{animate:!0,header:f.label,isOpen:p,onClick:()=>{var x;return b(p&&!((x=window.UserLeap)!=null&&x.isMobileSDK)?-1:a)},ref:x=>{x&&(t.current[a]=x)},showHeaderCheck:r[f.id]!==null,children:e.u("div",{style:{paddingTop:"12px"},children:n.map(x=>e.u(v.Option,{allowTextEntry:!1,ariaLabel:`${f.label}-${x.label}`,border:s,error:!1,id:`${f.id}-${x.value}`,isRadio:!0,isSelected:r[f.id]===x.value,label:x.label,onUserInputChanged:()=>u(f.id,x.value),useMobileStyling:g},x.label))})},f.id)},[s,n,l,u,r,g]);return e.u("div",{children:d.map((a,f)=>I(f,a))})},De=({columns:n,onSelect:i,options:d,selectedOptions:r})=>{const{border:t,useMobileStyling:s,isLongFormSurvey:g}=e.useConfig(a=>({border:a.border,useMobileStyling:a.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(a.studyType)})),y=d.length,c=n.length,h=e._(null),[l,b]=e.h(!1),[u,I]=e.h(!1);return e.p(()=>{const a=h.current,f=new ResizeObserver(p=>{window.requestAnimationFrame(()=>{a&&(b(Math.round(p[0].contentRect.width)<a.scrollWidth),I(Math.round(p[0].contentRect.width)<a.scrollWidth))})});return a&&f.observe(a),()=>{a&&f.unobserve(a)}},[]),e.u("div",{className:"ul-card--matrix_question_container",children:[e.u("div",{className:e.cc("ul-card--matrix_container",l&&"ul-matrix-scroll-gradient"),onScroll:()=>{(()=>{const a=h.current;a&&b(a.clientWidth+Math.abs(a.scrollLeft)<a.scrollWidth)})()},ref:h,children:e.u("div",{className:e.cc(g&&"ul-card--matrix_grid_longform","ul-card--matrix_grid"),style:`--numColumns: ${c}; --numRows: ${y+1};`,children:[e.u("div",{})," ",n.map(a=>e.u("div",{className:"ul-matrix-column-label",children:a.label},a.label)),d.map(a=>e.u(e.g,{children:[e.u("div",{"aria-label":a.label,className:"ul-matrix-row-label",children:a.label},a.label),e.u("div",{className:"ul-matrix-row-options",role:"radiogroup",children:n.map((f,p)=>{const x=p===c-1;return e.u("div",{className:e.cc("ul-matrix-option-wrapper",x&&"ul-matrix-last-option"),children:e.u(v.Option,{allowTextEntry:!1,ariaLabel:`${a.label}-${f.label}`,border:t,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${a.id}-${f.value}`,isRadio:!0,isSelected:r[a.id]===f.value,onUserInputChanged:()=>i(a.id,f.value),useMobileStyling:s})},f.value)})})]}))]})}),(l||u)&&e.u("button",{className:u&&!l?"ul-matrix-scroll-arrow left":"ul-matrix-scroll-arrow",onClick:u&&!l?a=>{a.preventDefault();const f=h.current;if(f){const p=getComputedStyle(f).direction==="rtl";f.scrollTo({left:p?f.scrollWidth-f.clientWidth:0,behavior:"smooth"})}}:a=>{a.preventDefault();const f=h.current;if(f){const p=getComputedStyle(f).direction==="rtl";f.scrollTo({left:p?f.clientWidth-f.scrollWidth:f.scrollWidth,behavior:"smooth"})}},children:u&&!l?e.u(Fe,{}):e.u(Qe,{})})]})},Fe=()=>e.u("svg",{fill:"currentColor",height:"32",transform:"matrix(-1,0,0,1,0,0)",version:"1.1",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})}),Qe=()=>e.u("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})}),Ee=({className:n,message:i,next:d,options:r,properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c})=>{const{useMobileStyling:h,isLongFormSurvey:l,focusedQuestionId:b,setFocusedQuestionId:u}=e.useConfig(m=>({useMobileStyling:m.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(m.studyType),focusedQuestionId:m.focusedQuestionId,setFocusedQuestionId:m.setFocusedQuestionId})),I=t.matrixColumn,a=t.required,f=l&&b===s,p=m=>Object.values(m).every(S=>S==null),x=m=>a&&p(m),C=m=>{if(m.preventDefault(),m.stopPropagation(),d({value:L,questionId:s,type:g},!0),c){const S=!p(L);c(S)}},q=r.reduce((m,S)=>(m[S.id]=null,m),{}),[L,E]=e.h(q),M=(m,S)=>{l&&d({value:{...L,[m]:S},questionId:s,type:g},!x({...L,[m]:S})),E(B=>({...B,[m]:S}))},U=t.displayMatrixAsAccordion||h;return e.u("form",{className:e.cc(n,!l&&"ul-card__matrix","fade-in-transition",l&&!f&&"ul-card--unfocused"),id:"text-form",onClick:()=>{f&&u(s)},onSubmit:C,children:[e.u(v.Header,{isRequired:l&&(t==null?void 0:t.required),message:i,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:[e.u(v.QuestionBodyWrapper,{children:[U?e.u(Pe,{columns:I,onSelect:M,options:r,selectedOptions:L}):e.u(De,{columns:I,onSelect:M,options:r,selectedOptions:L}),y&&e.u(v.LongformSubmitButton,{handleSubmit:C,isSubmitDisabled:x(L)})]}),!l&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:x(L),children:e.getButtonText(t)})})})]})]},s)},Ce=({className:n,message:i,onSubmit:d,options:r=[],properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c})=>{const{border:h,useMobileStyling:l,isLongFormSurvey:b,focusedQuestionId:u,setFocusedQuestionId:I}=e.useConfig(k=>({border:k.border,useMobileStyling:k.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(k.studyType),focusedQuestionId:k.focusedQuestionId,setFocusedQuestionId:k.setFocusedQuestionId})),a=b&&u===s,f=r.reduce((k,Q)=>(k[Q.id]={isSelected:!1},k),{}),[p,x]=e.h(f),C=g==="multiplechoice",q=t.required,L=r.find(k=>{var Q;return(Q=k.optionProperties)==null?void 0:Q.noneOfTheAbove}),E=k=>Object.entries(k).some(([Q,V])=>{var re;const J=r.find(o=>`${o.id}`===Q),G=V.userText===void 0||V.userText.trim()==="";return((re=J==null?void 0:J.optionProperties)==null?void 0:re.allowsTextEntry)&&G&&V.isSelected}),M=k=>Object.values(k).filter(Q=>Q.isSelected).length,U=k=>{const{minSelect:Q=0,maxSelect:V=1/0,maxSelectMode:J}=t,G=M(k);switch(J){case e.MaxSelectModes.Maximum:return G<=V;case e.MaxSelectModes.Range:return G===0||G>=Q;default:return!0}},m=t.minSelect&&t.minSelect>0&&t.maxSelectMode===e.MaxSelectModes.Range&&M(p)<t.minSelect&&(q||M(p)>0),S=k=>E(k)||q&&!M(k)||!U(k),B=k=>U(k)&&!E(k)&&M(k)>0,P=Object.entries(p).some(([k,Q])=>{var V,J;return Q.isSelected&&((J=(V=r.find(G=>`${G.id}`===k))==null?void 0:V.optionProperties)==null?void 0:J.allowsTextEntry)}),H=y&&(!C||P),w=k=>{Y(k.id,k.selected,k.userText,k.noneOfTheAbove),k.selected&&b&&!C&&!a&&I(s)},O=k=>{var Q;return(t==null?void 0:t.maxSelectMode)!==e.MaxSelectModes.Unlimited&&M(p)===(t==null?void 0:t.maxSelect)&&!((Q=p[k])!=null&&Q.isSelected)},z=k=>{if(k.preventDefault(),k.stopPropagation(),d(p,!0),c){const Q=B(p);c(Q)}},Y=(k,Q,V,J)=>{const G=Object.assign({},p);if((C||J)&&Q)for(const T of Object.values(G))T.isSelected=!1,delete T.userText;else L&&!J&&p[L.id].isSelected&&(G[L.id].isSelected=!1);G[k]={isSelected:Q,userText:V};const re=C&&Object.entries(G).some(([T,N])=>{var F,D;return N.isSelected&&((D=(F=r.find(j=>`${j.id}`===T))==null?void 0:F.optionProperties)==null?void 0:D.allowsTextEntry)}),o=!S(G);if(b&&(d(G,o),C&&!re&&o&&c)){const T=B(G);c(T)}x(G)};return e.u("form",{className:e.cc(n,"ul-card--multiple","fade-in-transition",b&&!a&&"ul-card--unfocused"),id:"text-form",onClick:g==="multipleselect"?()=>{b&&u!==s&&g==="multipleselect"&&I(s)}:void 0,onSubmit:z,children:[e.u(v.Header,{isRequired:b&&(t==null?void 0:t.required),message:i,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:e.u(e.g,{children:[e.u(v.QuestionBodyWrapper,{children:[t.isDropdown?e.u(v.Select,{disabledOptions:r.filter(k=>O(k.id)),dropdownFooter:m?e.u("div",{className:"ul-card__min-select-counter",style:{marginLeft:"16px"},children:[M(p),"/",t.minSelect]}):void 0,isMultiSelect:!C,multiselectText:t.dropdownMultiselectedText??"choices selected",onChange:k=>{const Q={...p};for(const V of r)k.includes(V)?Q[V.id].isSelected=!0:Q[V.id].isSelected=!1;b&&d(Q,!S(Q)),x(Q)},options:r,placeholderText:t.dropdownPlaceholderText??(C?"Select choice":"Select choice(s)"),value:r.filter(k=>p[k.id].isSelected)}):e.u("div",{className:e.cc(e.getClasses("ul-card__choices",l)),role:C?"radiogroup":"group",children:[r.map(({id:k,label:Q,value:V,optionProperties:J})=>{var T,N;const G=`${k}`,{allowsTextEntry:re,noneOfTheAbove:o}={allowsTextEntry:!1,noneOfTheAbove:!1,...J};return e.u(v.Option,{allowTextEntry:re,border:h,disabled:O(G),error:E(p),id:G,isRadio:C,isSelected:!!((T=p[G])!=null&&T.isSelected),label:Q,noneOfTheAbove:o,onUserInputChanged:w,promptText:(J==null?void 0:J.otherOptionPlaceholder)||"Please specify",text:(N=p[k])==null?void 0:N.userText,useMobileStyling:l,value:V},G)}),!!m&&e.u("div",{className:"ul-card__min-select-counter",children:[M(p),"/",t.minSelect]})]}),H&&e.u(v.LongformSubmitButton,{handleSubmit:z,isSubmitDisabled:S(p)})]}),!b&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:S(p),onClick:z,children:e.getButtonText(t)})})})]})})]},s)},Oe=n=>{const{questionId:i,type:d,next:r,options:t}=n,{setFocusedQuestionId:s}=e.useConfig(g=>({setFocusedQuestionId:g.setFocusedQuestionId}));return e.u(Ce,{...n,onSubmit:(g,y)=>{var I;const c=Object.entries(g).find(([,a])=>a.isSelected)||[void 0,void 0],[h,l]=c,b=t.find(a=>`${a.id}`===h);!((I=b==null?void 0:b.optionProperties)!=null&&I.allowsTextEntry)||l!=null&&l.userText&&l.userText.trim()!==""||s(i);const u=l!=null&&l.userText?{[h]:{userText:l.userText}}:null;r({value:b&&h?{[h]:b.value}:{},secondaryValue:u,questionId:i,type:d},y)}})},Ae=n=>{const{questionId:i,type:d,next:r}=n;return e.u(Ce,{...n,onSubmit:(t,s)=>{const g=Object.entries(t).reduce((c,[h,l])=>(c[h]=l.isSelected,c),{}),y=Object.entries(t).reduce((c,[h,l])=>{if(!l.userText)return c;const b=c||{};return b[h]={userText:l.userText},b},null);r({value:g,secondaryValue:y,questionId:i,type:d},s)}})},He=({className:n,labels:i,message:d,properties:r,next:t,questionId:s,type:g})=>{const[y,c]=e.h(null),{border:h,useMobileStyling:l,viewDocument:b,isLongFormSurvey:u,focusedQuestionId:I}=e.useConfig(x=>({border:x.border,useMobileStyling:x.useMobileStyling,viewDocument:x.viewDocument,isLongFormSurvey:ee.isLongFormSurvey(x.studyType),focusedQuestionId:x.focusedQuestionId})),a=u&&I===s,f=i&&i.left,p=i&&i.right;return e.u("form",{className:e.cc(n,"ul-card--nps","fade-in-transition",u&&!a&&"ul-card--unfocused"),children:[e.u(v.Header,{isRequired:u&&(r==null?void 0:r.required),message:d,properties:r}),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,C)=>e.u("button",{className:e.cc(e.getClasses("nps-number",l),e.getClasses(`nps-number-${C}`,l)),id:`option-${C}`,onClick:q=>{u&&(q.preventDefault(),q.stopPropagation(),c(C)),t({value:C,questionId:s,type:g},!0)},onKeyDown:q=>{var E,M;const L=b.querySelectorAll("button.nps-number");q.key==="ArrowRight"?(E=L[C+1])==null||E.focus():q.key==="ArrowLeft"?(M=L[C-1])==null||M.focus():q.key!=="Enter"&&q.key!==" "||(u&&(q.preventDefault(),q.stopPropagation(),c(C)),t({value:C,questionId:s,type:g},!0))},onPointerDown:q=>{q.currentTarget.style.zIndex="2",q.currentTarget.style.borderColor=h},onPointerLeave:q=>{q.currentTarget.style.zIndex="auto"},style:y===C?{backgroundColor:h,color:"#fff"}:void 0,tabIndex:0,children:C},C))}),e.u("div",{className:"ul-card--nps__labels",children:[e.u("span",{children:f}),e.u("span",{children:p})]})]}),!r.required&&!u&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-vertical-centered-container",children:e.u(v.Button,{onClick:x=>{x.preventDefault(),x.stopPropagation(),t({value:null,questionId:s,type:g},!0)},children:e.getButtonText(r)})})})]})]},s)},$e=n=>{const{className:i,message:d,next:r,properties:t,questionId:s,type:g,showIndividualSubmit:y=!1,onSubmitButtonClick:c}=n,h=g==="aidynamicfollowup"||g==="aidynamicstandalone",l=h?n.loading:void 0,{border:b,useMobileStyling:u,update:I,isLongFormSurvey:a,focusedQuestionId:f,setFocusedQuestionId:p,isPreview:x}=e.useConfig(w=>({border:w.border,useMobileStyling:w.useMobileStyling,update:w.update,isLongFormSurvey:ee.isLongFormSurvey(w.studyType),focusedQuestionId:w.focusedQuestionId,setFocusedQuestionId:w.setFocusedQuestionId,isPreview:w.isPreview})),[C,q]=e.h(""),L=e._(null),E=a&&f===s;e.p(()=>{var w,O;a&&!x&&(E?(w=L.current)==null||w.focus():(O=L.current)==null||O.blur())},[a,E,x]);const M=C.trim(),U=t.required===!0&&!M,m=v.useAutoSize(L,()=>I()),S=w=>{w.preventDefault(),w.stopPropagation();const O=M.length>0,z=!t.required||O;r({value:C,questionId:s,type:g},z),c&&c(O)},B=t&&t.openTextPlaceholder?t.openTextPlaceholder:"";if((l===e.DynamicQuestionLoadingStates.failure||l===void 0)&&h)return e.u(e.g,{});const P=l===e.DynamicQuestionLoadingStates.inFlight,H=P?"Preparing your next question":d;return e.u("form",{className:e.cc(i,"ul-card-text","fade-in-transition",a&&!E&&"ul-card--unfocused"),id:"text-form",onClick:()=>{a&&f!==s&&p(s)},children:[e.u(v.Header,{isRequired:a&&(t==null?void 0:t.required),message:H,properties:t}),e.u(v.MobileEmbedView,{properties:t,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":B,className:e.cc(P&&"ul-card-text__input__loading",e.getClasses("ul-card-text__input",u)),"data-gramm":"false",disabled:P,maxLength:5e3,name:"text",onBlur:w=>{w.currentTarget.style.borderColor=ee.DEFAULT_BORDER_COLOR},onChange:w=>{const{value:O}=w.currentTarget;if(m(),w.preventDefault(),w.stopPropagation(),q(O),a){const z=O.trim().length>0;r({value:O,questionId:s,type:g},z)}},onFocus:w=>{w.currentTarget.style.borderColor=b,p(s)},placeholder:B,ref:L,role:"textbox",tabIndex:0})}),t.footerHtml&&e.u(v.Html,{className:"footer",html:t.footerHtml}),y&&e.u(v.LongformSubmitButton,{handleSubmit:S,isSubmitDisabled:U}),e.u(v.QuestionBodyFooterContainer,{children:!a&&e.u(v.Button,{disabled:U||P,onClick:S,children:e.getButtonText(t)})})]})})})]},s)},ce=1,ke=2,Te=3,le=n=>n.type==="av_permission",ve=n=>n.type==="screen_permission",_e=(n,i)=>n===void 0?ce:n?((d,r)=>!(le(r)?r.permissionDescriptors:[]).includes("camera")||d.getVideoTracks().length>0)(n,i)?Te:ce:ke,ye={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ne=e.create(n=>({...ye,reset:()=>{n(ye)},updatePage:i=>{n(i)}}));function pe({currentPage:n,pages:i}){const{avStream:d,recordingMediaTypes:r,updatePage:t}=ne.getState(),{recorderEventEmitter:s}=e.useConfig.getState();s.emit("av.permission",{"permission.descriptors":n.permissionDescriptors,"stream.ready":(g,y)=>{if(d===g)return;let c=n;if(g&&!n.permissionDescriptors.includes("camera")){const h=i.indexOf(n),l=y!=null&&y.active?h+2:h+1;y!=null&&y.active&&r&&s.emit("begin.recording",{"recording.media.types":r,"start.recording.callback":b=>t({mediaRecordingUids:b})}),c=i[l]}t({currentPage:c,avStream:g})}})}function me({status:n}){const{nextQuestion:i,passthroughData:d,mediaRecordingUids:r,reset:t}=ne.getState(),{recorderEventEmitter:s,handleUploadUpdate:g,index:y}=e.useConfig.getState(),c={value:{taskStatus:n},type:"recordedtask",questionId:(d==null?void 0:d.questionId)||1};d&&s.emit("finish.task",{"begin.callback":h=>{g({mediaRecordingUid:h,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(h,l)=>{g({mediaRecordingUid:h,progressPct:l.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":h=>{h&&g({mediaRecordingUid:h,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":d,"current.index":y,"task.response":c,"task.complete.callback":h=>{c.value.taskDurationMillisecond=h,r&&(c.value.mediaRecordingUids=r),t(),i(c)}})}function ge({pages:n,setIsRequestingPermission:i}){const{recorderEventEmitter:d,eventEmitFn:r}=e.useConfig.getState(),{updatePage:t,currentPage:s,recordingMediaTypes:g,screenPermissionRequested:y}=ne.getState();if(!s)return;const c=n.indexOf(s);switch(s.type){case"av_permission":{const h=y?c+2:c+1;return y&&g&&d.emit("begin.recording",{"recording.media.types":g,"start.recording.callback":l=>{t({mediaRecordingUids:l})}}),void t({currentPage:n[h]})}case"screen_permission":return void d.emit("screen.permission",{"screen.permission.requested":i,"stream.ready.callback":(h,l)=>{const b=l?n[c+1]:s;l&&g&&d.emit("begin.recording",{"recording.media.types":g,"start.recording.callback":u=>{t({captureStream:l,mediaRecordingUids:u})}}),t({currentPage:b,screenPermissionRequested:!0,captureStream:l})}});case"start_task":return r("recorded.task.start"),d.emit("recorded.task.start"),d.emit("start.task"),void t({currentPage:n[c+1],screenPermissionRequested:!0});case"complete_task":return}}const we="ul-permission-graphics-container",Ie="ul-permission-body",Ne=e.cc(we,"ul_recorded-task-inset-spacing"),ue=e.cc("ul-horizontal-button-container","ul-horizontal-button-container-left"),Le=({richTextBody:n})=>e.u(v.Html,{className:"ul-rich-text-body",html:n,id:"ul-task-detail-container"}),de=({required:n,skipButtonText:i,bottom:d=!1})=>n?null:e.u(v.Button,{className:e.cc(d&&"ul-skip-button-below","ul-button-inactive"),onClick:me.bind(null,{status:"abandoned"}),children:i||"Skip"}),he=n=>{const{avStream:i,captureStream:d,recordingMediaTypes:r,updatePage:t}=ne.getState(),s=(r==null?void 0:r.includes("audio"))||(r==null?void 0:r.includes("video"));e.p(()=>{const g=setInterval(()=>{s&&i&&!i.active?t({avStream:null,currentPage:n[0]}):d&&d.active||t({captureStream:void 0,currentPage:n[s?1:0]})},1e3);return()=>clearInterval(g)},[i,d,s,n,r,t])},Ue=({content:n,pages:i,required:d})=>{const{buttonText:r,skipButtonText:t,taskDetail:s}=n;return he(i),e.u("div",{className:"ul-task-page",children:[s&&e.u(Le,{richTextBody:s}),e.u("div",{className:ue,children:[e.u(v.Button,{onClick:ge.bind(null,{pages:i}),children:r}),e.u(de,{required:d,skipButtonText:t})]})]},"start-task")},Ve=({content:n,pages:i,properties:d})=>{const{buttonText:r,skipButtonText:t}=n;return he(i),e.u("div",{className:"ul-task-page",children:[n.taskDetail&&e.u(Le,{richTextBody:n.taskDetail}),e.u(v.MobileEmbedView,{properties:d,children:e.u("div",{className:ue,children:[e.u(v.Button,{className:"ul-complete-task-button",onClick:me.bind(null,{status:"completed"}),children:r}),e.u(v.Button,{className:e.cc("ul-button-inactive"),onClick:me.bind(null,{status:"given.up"}),children:t})]})})]},"complete-task")},We=({content:n,pages:i,required:d})=>{const{buttonText:r,skipButtonText:t}=n,[s]=e.useConfig(c=>[c.tabTitle]),[g,y]=e.h(!1);return e.u("div",{children:[e.u("div",{className:Ne,children:[e.u("p",{style:{marginTop:"auto"},children:n.selectTabText}),e.u("div",{className:"ul-select-tab-container",children:e.u("p",{className:Ie,children:s})})]}),e.u("div",{className:d?"":ue,children:[e.u(v.Button,{disabled:g,onClick:ge.bind(null,{pages:i,setIsRequestingPermission:y}),children:r}),e.u(de,{required:d,skipButtonText:t})]})]})},je=({content:n})=>e.u(v.Html,{className:e.cc(we,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),html:n.svg},"ul-permission-request-graphic"),Ge=({content:n,pages:i,required:d})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:t,skipButtonText:s,tryAgainButtonText:g}=n,y=le(i[0])?i[0]:null;return e.p(()=>{const c=setInterval(()=>{y!==null&&pe({currentPage:y,pages:i})},1e3);return()=>clearInterval(c)},[y,i]),y?e.u("div",{children:[e.u("div",{className:Ne,children:e.u("p",{className:"ul-av-permission-denied-paragraph",children:[e.u("span",{className:"ul-av-permission-denied-headline",children:r}),e.u("span",{className:Ie,children:t})]})}),e.u("div",{className:ue,children:[e.u(v.Button,{onClick:pe.bind(null,{currentPage:y,pages:i}),children:g}),e.u(de,{required:d,skipButtonText:s})]})]}):null},Ze=({stream:n})=>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=n||null)}}),ze=({content:n,pages:i,required:d})=>{const{skipButtonText:r}=n,{avStream:t}=ne.getState();return he(i),e.u("div",{children:[e.u(Ze,{stream:t}),e.u("div",{className:"ul-vertical-button-container-center",children:[e.u(v.Button,{onClick:ge.bind(null,{pages:i}),children:n.buttonText}),e.u(de,{bottom:!0,required:d,skipButtonText:r})]})]})},Ye=({properties:n})=>{const{pages:i,required:d}=n,{avStream:r,currentPage:t}=ne.getState();if(t===void 0)return null;switch(t==null?void 0:t.type){case"av_permission":{const s=_e(r,t);return s===ce?e.u(je,{content:t}):s===ke?e.u(Ge,{content:t,pages:i,required:d}):e.u(ze,{content:t,pages:i,required:d})}case"screen_permission":return e.u(We,{content:t,pages:i,required:d});case"start_task":return e.u(Ue,{content:t,pages:i,required:d});case"complete_task":return e.u(Ve,{content:t,pages:i,properties:n});default:return null}},Ke=({className:n,properties:i,next:d,questionId:r})=>{const t=e.useConfig(),{surveyId:s,responseGroupUid:g,userId:y,update:c}=t,h=ne(),{screenPermissionRequested:l}=h,b=ne(p=>p.avStream);let u=ne(p=>p.currentPage);u||(u=function({pages:p,userId:x,responseGroupUid:C,surveyId:q,questionId:L,next:E}){const{updatePage:M}=ne.getState(),{eventEmitFn:U,recorderEventEmitter:m}=e.useConfig.getState(),S={questionId:L,surveyId:q,visitorId:x,responseGroupUid:C};let B=0;m.emit("recorded.task.permission.screen"),U("recorded.task.permission.screen"),m.emit("permission.status",{"permission.status.callback":(H,w,O,z)=>{const Y=p[B],{type:k}=Y,Q=["screen"];if(le(Y)){const{permissionDescriptors:V}=Y,J=V==null?void 0:V.includes("microphone"),G=V==null?void 0:V.includes("camera");J&&Q.push("audio"),G&&Q.push("video"),(H!=null&&H.active&&!G||H!=null&&H.active&&w)&&B++}ve(p[B])&&O&&(B++,m.emit("begin.recording",{"recording.media.types":Q,"start.recording.callback":V=>M({mediaRecordingUids:V})})),M({currentPage:p[B],avStream:H,screenPermissionRequested:O,nextQuestion:E,type:k,passthroughData:S,recordingMediaTypes:Q,captureStream:z})}});const P=p[B];return P.type==="av_permission"&&pe({currentPage:P,pages:p}),P}({questionId:r,surveyId:s,next:p=>{d(p,!0)},pages:i.pages,responseGroupUid:g,userId:y}));let I=u.headline,a=u.captionText;const f=_e(b,u);return ve(u)&&l&&(I=u.permissionDeniedHeadline,a=u.permissionDeniedCaptionText),le(u)&&f===Te&&(I=u.permissionGrantedHeadline,a=u.permissionGrantedCaptionText),e.p(()=>{c()},[c]),e.u("div",{className:e.cc(n,"ul-center-horizontally","fade-in-transition"),children:[e.u(v.Header,{isRequired:i==null?void 0:i.required,message:I,properties:{captionText:a}}),e.u(v.QuestionBodyWrapper,{children:e.u(Ye,{properties:i})})]})},Xe=({richTextBody:n,plaintextBody:i})=>n?e.u(v.Html,{className:"ul-rich-text-body",html:n,id:"ul-card__text-url-body-container"}):i?e.u("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(i?i.split(/\n\s*\n/g):[]).map((d,r)=>e.u("p",{children:d},r))}):null,Je=({className:n,message:i,next:d,properties:r,questionId:t,type:s})=>{const{visitorAttributes:g,isLongFormSurvey:y}=e.useConfig(b=>({visitorAttributes:b.visitorAttributes,isLongFormSurvey:ee.isLongFormSurvey(b.studyType)})),c=(b,u=!1)=>{d({value:u?{skipped:!0}:void 0,questionId:t,type:s},!0)},h=v.getAttributedUrl(r&&r.buttonUrl,g),l=y&&r.promptActionType===e.PromptActionTypeEnum.NO_BUTTON;return e.u("div",{className:e.cc(n,"ul-card__text-url-prompt","fade-in-transition"),children:[e.u(v.Header,{isRequired:y&&(r==null?void 0:r.required),message:i,properties:{questionHtml:r.questionHtml}}),e.u(v.QuestionBodyWrapper,{children:e.u(Xe,{plaintextBody:r==null?void 0:r.body,richTextBody:r==null?void 0:r.richTextBody})}),e.u(v.MobileEmbedView,{properties:r,children:!l&&e.u(v.QuestionBodyFooterContainer,{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:h,id:"ul-card-text__button",onClick:c,onKeyPress:b=>{b.key!=="Enter"&&b.key!==" "||d({value:void 0,questionId:t,type:s},!0)},rel:"noreferrer",role:h?"link":"button",tabIndex:0,target:"_blank",children:e.getButtonText(r)}),r.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:b=>c(0,!0),children:e.getSkipButtonText(r)})]})})})]},t)},et=({className:n,questionId:i})=>{const{border:d,destroy:r,endCard:t,forceBrandedLogo:s,update:g}=e.useConfig(h=>({border:h.border,destroy:h.destroy,endCard:h.endCard,forceBrandedLogo:h.forceBrandedLogo,update:h.update}));e.p(()=>{setTimeout(()=>{r(ee.APP_ID)},s?4e3:2e3)},[r,s]);const y=t&&t.subheader?e.u("p",{className:"ul-caption",children:t.subheader}):null,c=t&&t.headline?t.headline:"";return e.p(()=>{g()},[g]),e.u("div",{className:e.cc(n,"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:d,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:d,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:c}),y]})})},i)},tt=({className:n})=>{const{uploadProgress:i}=e.useConfig(s=>({uploadProgress:s.uploadProgress}));let d,r;Object.values(i).filter(s=>s.isSubmitted).length>1?(d="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(d="Your response is processing",r="Please keep this tab open until your response is fully processed.");const t=Math.round(Math.min(99,...Object.values(i).filter(s=>s.isSubmitted).map(s=>s.progressPct||0)));return e.u("div",{className:e.cc(n,"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:`${d} (${t}% complete)`}),e.u("p",{className:"ul-caption",children:r})]})},qe=e.F$1(void 0),rt=({value:n,children:i})=>e.u(qe.Provider,{value:n,children:i}),nt=({isRightLabel:n,isLeftLabel:i})=>n?e.MaxDiffChoice.RIGHT:i?e.MaxDiffChoice.LEFT:null,it="Best",st="Worst",ot=({className:n,labels:i,message:d,properties:r,options:t,questionId:s,type:g,next:y})=>{var L,E,M,U;const[c,h]=e.h(t.map((m,S)=>({...m,label:m.label===""?`Item ${S+1}`:m.label,isRightLabel:!1,isLeftLabel:!1}))),l=(()=>{const m=e.q(qe);if(m===void 0)throw new Error("usePreviousResponses must be used within a PreviousResponsesProvider");return m})(),b={padding:"24px",display:"flex",cursor:"pointer",width:"auto"},[u,I]=e.h(!1);e.p(()=>{const m=c.findIndex(Y=>Y.isRightLabel),S=c.findIndex(Y=>Y.isLeftLabel),B=m!==-1&&S!==-1;I(B);const P=!r.required||r.required&&B,H=c.map(Y=>({id:Y.id,option:Y.label,selected:nt(Y)})),w=Math.floor(s),O=Object.keys(l).filter(Y=>Y.startsWith(w.toString())).map(Number).sort((Y,k)=>Y-k).at(-1),z=[];if(typeof O=="number"){const Y=l[O],k=JSON.parse(Y);z.push(...k)}z.push(H),setTimeout(()=>{y({value:z,questionId:s,type:g},P,B),I(!1)},B?500:0)},[c]);const{border:a,useMobileStyling:f,enableCspTrustedTypes:p}=e.useConfig(m=>({border:m.border,useMobileStyling:m.useMobileStyling,enableCspTrustedTypes:m.enableCspTrustedTypes})),x=(m,S)=>()=>{u||h(B=>((P,H,w)=>P.map(O=>O.id===H?{...O,isRightLabel:w===e.MaxDiffChoice.RIGHT,isLeftLabel:w===e.MaxDiffChoice.LEFT}:w===e.MaxDiffChoice.RIGHT&&O.isRightLabel||w===e.MaxDiffChoice.LEFT&&O.isLeftLabel?{...O,isRightLabel:!1,isLeftLabel:!1}:O))(B,m,S))},C=(L=r.ratingIcons)==null?void 0:L[0].svg,q=(E=r.ratingIcons)==null?void 0:E[1].svg;return e.u("form",{className:e.cc(n,"ul-card-maxdiff","fade-in-transition"),children:[e.u(v.Header,{isRequired:r==null?void 0:r.required,message:d,properties:r}),e.u(v.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--maxdiff__question-inner-container",children:[e.u("div",{className:"ul-card-maxdiff__label",children:(i==null?void 0:i.left)||((M=r==null?void 0:r.labels)==null?void 0:M.left)||it}),e.u("div",{children:" "}),e.u("div",{className:"ul-card-maxdiff__label",children:(i==null?void 0:i.right)||((U=r==null?void 0:r.labels)==null?void 0:U.right)||st}),c.map(({id:m,label:S,isLeftLabel:B,isRightLabel:P})=>e.u(e.g,{children:[e.u("div",{className:"ul-card-maxdiff__option-control "+(q?"smiley":""),children:q?e.u(fe,{ariaPressed:B,className:B?"ul-card-maxdiff__option-btn ul-card-maxdiff__option-selected good":"ul-card-maxdiff__option-btn",enableCspTrustedTypes:p,html:q,id:`smiley-good-${m}`,onClick:x(m,e.MaxDiffChoice.LEFT)}):e.u(v.Option,{allowTextEntry:!1,ariaLabel:`bestLabel-${S}`,border:a,choiceStyle:b,error:!1,id:`${m}`,isRadio:!0,isSelected:B,onUserInputChanged:x(m,e.MaxDiffChoice.LEFT),useMobileStyling:f})}),e.u("div",{className:"ul-card-maxdiff__option-label",children:S}),e.u("div",{className:"ul-card-maxdiff__option-control "+(C?"smiley":""),children:C?e.u(fe,{ariaPressed:P,className:P?"ul-card-maxdiff__option-btn ul-card-maxdiff__option-selected bad":"ul-card-maxdiff__option-btn",enableCspTrustedTypes:p,html:C,id:`smiley-bad-${m}`,onClick:x(m,e.MaxDiffChoice.RIGHT)}):e.u(v.Option,{allowTextEntry:!1,ariaLabel:`worstLabel-${S}`,border:a,choiceStyle:b,error:!1,id:`${m}`,isRadio:!0,isSelected:P,onUserInputChanged:x(m,e.MaxDiffChoice.RIGHT),useMobileStyling:f})})]}))]})})]},s)},fe=({enableCspTrustedTypes:n,ariaPressed:i,className:d,html:r,id:t,onClick:s})=>{const g=e.F(()=>ee.getHtml(r,n),[n,r]);return e.u("span",{"aria-pressed":i,className:d,dangerouslySetInnerHTML:{__html:g},id:t,onClick:s,tabIndex:0,type:"button"})},at=({className:n,labels:i,message:d,next:r,properties:t,questionId:s,type:g,onSubmitButtonClick:y,options:c,showIndividualSubmit:h=!1})=>{const l=e._(null),b=e._(0),u=e._(0),I=e._(null),a=e._(!1),f=e._([]),[p,x]=e.h(()=>(t==null?void 0:t.required)===!0),[C,q]=e.h(!1),[L,E]=e.h(()=>c.map(_=>({..._,rank:null}))),M=e.F(()=>Array.from({length:c.length},(_,$)=>$+1),[c.length]),{isLongFormSurvey:U,focusedQuestionId:m,setFocusedQuestionId:S,useMobileStyling:B,isPreview:P,headers:H}=e.useConfig(_=>({useMobileStyling:_.useMobileStyling,isLongFormSurvey:ee.isLongFormSurvey(_.studyType),focusedQuestionId:_.focusedQuestionId,setFocusedQuestionId:_.setFocusedQuestionId,isPreview:_.isPreview,headers:_.headers})),w=(H==null?void 0:H["userleap-platform"])==="android",O=B&&!P&&!w,z=!O&&!w,Y=U&&m===s,k=_=>{_.preventDefault(),T(L),y&&y(C)},Q=(_,$)=>{E(A=>{const R=parseInt($),W=A.map(Z=>({...Z}));W.some(Z=>Z.rank==null)&&W.forEach((Z,oe)=>Z.rank=oe+1);const te=W.findIndex(Z=>Z.id===_);if(te===-1)return A;const X=W[te].rank;return R<X?W.forEach(Z=>{Z.id!==_&&Z.rank>=R&&Z.rank<X&&(Z.rank=Z.rank+1)}):R>X&&W.forEach(Z=>{Z.id!==_&&Z.rank>X&&Z.rank<=R&&(Z.rank=Z.rank-1)}),W[te].rank=R,W.sort((Z,oe)=>Z.rank-oe.rank),N(W),W})},V=(_,$)=>{for(let A=0;A<f.current.length;A++){const R=f.current[A];if(!R||R===I.current)continue;const W=R.getBoundingClientRect();if(_>=W.left&&_<=W.right&&$>=W.top&&$<=W.bottom)return{element:R,index:A}}return null},J=_=>$=>{if(!O)return;$.preventDefault(),$.stopPropagation(),a.current=!0,l.current=_;const A=$.touches[0];b.current=A.clientY,u.current=A.clientY;const R=$.currentTarget.closest(".ul-card-rank__option");R&&(I.current=R,R.classList.add("is-dragging"))},G=_=>{if(!O||!a.current||l.current===null)return;_.preventDefault(),_.stopPropagation();const $=_.touches[0];u.current=$.clientY;const A=u.current-b.current;I.current&&(I.current.style.transform=`translateY(${A}px)`,I.current.style.zIndex="1000"),f.current.forEach(W=>{W&&W!==I.current&&W.classList.remove("is-drop-target")});const R=V($.clientX,$.clientY);R&&R.element.classList.add("is-drop-target")},re=_=>{if(!O||!a.current||l.current===null)return;_.preventDefault(),_.stopPropagation();const $=_.changedTouches[0],A=V($.clientX,$.clientY);I.current&&(I.current.style.transform="",I.current.style.zIndex="",I.current.classList.remove("is-dragging")),f.current.forEach(R=>{R&&R.classList.remove("is-drop-target")}),A&&A.index!==l.current&&o(l.current,A.index),l.current=null,I.current=null,a.current=!1},o=(_,$)=>{E(A=>{const R=A.map(te=>({...te})),[W]=R.splice(_,1);return R.splice($,0,W),R.forEach((te,X)=>{te.rank=X+1}),N(R),R})},T=_=>{const $={};_.reduce((A,R)=>(A[R.id]=R.rank,A),$),r({value:$,questionId:s,type:g},!0)},N=_=>{x(!1),q(!0),U&&T(_)},{left:F,right:D}=i,j=c.length,K=_=>{_.preventDefault(),_.currentTarget.classList.add("is-drop-target")},ie=_=>{_.currentTarget.classList.remove("is-drop-target")},se=_=>{l.current=null,_.currentTarget.classList.remove("is-dragging")};return e.u("form",{className:e.cc(n,"ul-card-rank","fade-in-transition",U&&!Y&&"ul-card--unfocused"),onClick:U&&!Y?()=>{S(s)}:void 0,onSubmit:k,children:[e.u(v.Header,{isRequired:t==null?void 0:t.required,message:d,properties:t}),e.u(v.MobileEmbedView,{properties:t,children:w?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:L.map(({id:_,label:$,rank:A})=>e.u("li",{className:"ul-card-rank__option",children:[e.u("select",{"aria-label":`Rank for ${$}`,className:e.cc("ul-card-rank__select",A==null&&"ul-card-rank__select--placeholder"),name:`rank[${_}]`,onChange:R=>Q(_,R.currentTarget.value),value:A??"",children:[A==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),M.map(R=>e.u("option",{className:"ul-card-rank__select-option",value:R,children:R},`${R}-${s}`))]}),e.u("span",{children:$})]},_))}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[j," - ",D]})})]}),h&&e.u(v.LongformSubmitButton,{handleSubmit:k,isSubmitDisabled:p})]}),!U&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:p,children:e.getButtonText(t)})})})]}):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:w?void 0:_=>{_.preventDefault(),_.dataTransfer&&(_.dataTransfer.dropEffect="move")},children:L.map(({id:_,label:$,rank:A},R)=>{return e.u("li",{className:"ul-card-rank__option",draggable:!!z||void 0,onDragEnd:z?se:void 0,onDragEnter:z?K:void 0,onDragLeave:z?ie:void 0,onDragStart:z?(te=R,X=>{l.current=te,X.dataTransfer&&(X.dataTransfer.effectAllowed="move",X.dataTransfer.setData("text/plain",String(te)),X.currentTarget.classList.add("is-dragging"))}):void 0,onDrop:z?(W=R,X=>{var oe,be;X.preventDefault(),X.currentTarget.classList.remove("is-drop-target");const Z=l.current;l.current=null,(be=(oe=X.currentTarget.closest(".ul-card-rank__list"))==null?void 0:oe.querySelector(".is-dragging"))==null||be.classList.remove("is-dragging"),Z!=null&&Z!==W&&o(Z,W)}):void 0,ref:X=>f.current[R]=X,children:[e.u("select",{"aria-label":`Rank for ${$}`,className:e.cc("ul-card-rank__select",A==null&&"ul-card-rank__select--placeholder"),name:`rank[${_}]`,onChange:X=>Q(_,X.currentTarget.value),value:A??"",children:[A==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),M.map(X=>e.u("option",{className:"ul-card-rank__select-option",value:X,children:X},`${X}-${s}`))]}),e.u("span",{children:$}),!w&&e.u("button",{"aria-label":`Drag ${$} to reorder`,className:"ul-card-rank__drag-btn",onTouchEnd:O?re:void 0,onTouchMove:O?G:void 0,onTouchStart:O?J(R):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"})})})]},_);var W,te})}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[j," - ",D]})})]}),h&&e.u(v.LongformSubmitButton,{handleSubmit:k,isSubmitDisabled:p})]}),!U&&e.u(v.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(v.Button,{disabled:p,children:e.getButtonText(t)})})})]})})]},s)},lt=new Set(["aidynamicfollowup","aidynamicstandalone","open","matrix","multipleselect","multiplechoice","rankorder"]),Se=({cardInstance:n,moveToNextQuestion:i,showIndividualSubmit:d,submitQuestion:r,updateCardValues:t,allResponsesArray:s})=>{const{isLongFormSurvey:g,createDynamicFollowupQuestion:y,cards:c,surveyVisitorAttributes:h}=e.useConfig(C=>({isLongFormSurvey:ee.isLongFormSurvey(C.studyType),createDynamicFollowupQuestion:C.createDynamicFollowupQuestion,cards:C.cards,surveyVisitorAttributes:C.surveyVisitorAttributes}));if(!n)return null;const{name:l,type:b,props:u,childId:I}=n,a=d&<.has(b),f=u==null?void 0:u.displayLogic;if(f!=null&&f.length&&!e.someDisplayLogicOptionMatches({displayLogic:f,allResponses:s,cards:c,surveyVisitorAttributes:h??{}}))return null;const p={className:"ul-card",next:(C,q,L=!0)=>r(C,q&&L),questionId:l,type:b,showIndividualSubmit:d,...a?{next:(C,q)=>{t(C.questionId,C,q??!0)},onSubmitButtonClick:(C=!1)=>{I?C?(i(l),y({parentQuestionId:l})):i(I):i(l)}}:{}},x=(()=>{switch(b){case"consentlegal":return e.u(Be,{...p,...u});case"likert":return e.u(Re,{...p,...u});case"matrix":return e.u(Ee,{...p,...u});case"maxdiff":return e.u(ot,{...p,...u});case"multiplechoice":return e.u(Oe,{...p,...u});case"multipleselect":return e.u(Ae,{...p,...u});case"nps":return e.u(He,{...p,...u});case"open":case"aidynamicfollowup":case"aidynamicstandalone":return e.u($e,{...p,type:n.type,...u});case"rankorder":return e.u(at,{...p,...u});case"recordedtask":return e.u(Ke,{...p,...u});case"texturlprompt":return e.u(Je,{...p,...u});case"thanks":return e.u(et,{...p,...u});case"uploading":return e.u(tt,{...p,...u});default:return null}})();return x?g?e.u("div",{className:"ul-card-scroll-wrapper",children:x},l):x:null},ut=({isSubmitDisabled:n=!1,onSubmit:i,buttonText:d})=>{var I;const{cards:r,forceBrandedLogo:t,index:s,marketingUrl:g,showSurveyBrand:y,slugName:c,surveyId:h,useMobileStyling:l}=e.useConfig(a=>({cards:a.cards,forceBrandedLogo:a.forceBrandedLogo,index:a.index,marketingUrl:a.marketingUrl,showSurveyBrand:a.showSurveyBrand,slugName:a.slugName,surveyId:a.surveyId,useMobileStyling:a.useMobileStyling})),b=((I=r[s])==null?void 0:I.type)==="thanks",u=e.buildMarketingUrl({marketingUrl:g,slugName:c,surveyId:h,forceBrandedLogo:t});return e.u("footer",{className:e.cc("long-form-question-footer-container",l&&"long-form-question-footer-container--mobile",b&&"long-form-question-footer-container-center"),children:[b&&t?e.u(e.ThankYouLink,{marketingUrlLink:u}):e.u("div",{className:"long-form-question-footer-container-logo",children:y?e.u(e.SprigBrandLogo,{forceBrandedLogo:t,marketingUrlLink:u}):null}),!b&&e.u("div",{className:e.cc("ul-card__button-wrapper","ul-card-vertical__button-wrapper","long-form-question-footer-container-actions"),children:e.u(v.Button,{className:e.cc("long-form-button",n&&"sprig-button-disabled"),disabled:n,onClick:i,children:e.u("span",{className:"long-form-button-text-container",children:d??e.u(e.Arrow,{stroke:"white"})})})})]})},dt=new Set(["thanks","uploading"]),xe="Questions with Display Logic do not show in side-by-side previews.";exports.PageCard=({cards:n,next:i,previousResponses:d})=>{var re;const r=e._(null),[t,s]=e.h({}),[g,y]=e.h({}),{isLongFormSurvey:c,focusedQuestionId:h,setFocusedQuestionId:l,createDynamicFollowupQuestion:b,allResponses:u,cardIndexByName:I,surveyVisitorAttributes:a,cards:f,createDynamicStandaloneQuestion:p,isPreview:x,update:C}=e.useConfig(o=>({isLongFormSurvey:ee.isLongFormSurvey(o.studyType),focusedQuestionId:o.focusedQuestionId,setFocusedQuestionId:o.setFocusedQuestionId,createDynamicFollowupQuestion:o.createDynamicFollowupQuestion,allResponses:o.allResponses,cardIndexByName:o.cardIndexByName,surveyVisitorAttributes:o.surveyVisitorAttributes,cards:o.cards,createDynamicStandaloneQuestion:o.createDynamicStandaloneQuestion,isPreview:o.isPreview,update:o.update})),q=e.F(()=>({...d,...e.buildReadableResponseMap(n.map(o=>{var T,N;return{...o,value:((T=t[o.name])==null?void 0:T.value)??null,secondaryValue:((N=t[o.name])==null?void 0:N.secondaryValue)??null}}))}),[d,t,n]);v.useSetAllResponsesRaw(q);const L=e.pipeReadableResponsesIntoCards(n,q),E=e.F(()=>e.buildResponsesArrayForDisplayLogic({storeAllResponses:u,cards:n,cardValues:t,cardIndexByName:I}),[u,n,t,I]),M=e.F(()=>{const o=new Set;return n.forEach(T=>{var F;const N=(F=T.props)==null?void 0:F.displayLogic;if(!N||N.length===0)return void o.add(T.name);e.someDisplayLogicOptionMatches({displayLogic:N,allResponses:E,cards:f,surveyVisitorAttributes:a??{}})&&o.add(T.name)}),o},[n,E,a,f]),U=(({isPreview:o,cards:T,displayedCardNames:N})=>{var j;if(!o||N.size>0)return!1;const F=T.filter(K=>!dt.has(K.type));if(F.length!==1)return!1;const D=(j=F[0].props)==null?void 0:j.displayLogic;return!!(D!=null&&D.length)})({isPreview:!!x,cards:n,displayedCardNames:M});e.p(()=>{U&&requestAnimationFrame(()=>{C()})},[U,C]),e.p(()=>{n.some(o=>{if(o.type==="aidynamicstandalone"&&o.props&&M.has(o.name)){if(o.props.loading===e.DynamicQuestionLoadingStates.inFlight)return!0;if(o.props.loading===void 0)return p({questionId:o.name}),!0}return!1})},[n,p,M]);const m=e._(null);e.p(()=>{const o=M,T=m.current;if(T!==null)for(const N of T)o.has(N)||(s(F=>{const D={...F};return delete D[N],D}),y(F=>{const D={...F};return delete D[N],D}));m.current=new Set(o)},[M]);const S=e._(null),B=e._(!1),P=e._(null),H=e.T(o=>{var D,j;B.current=!0;const T=n.findIndex(K=>K.name===o);if(!c||o===null||T===-1)return void(B.current=!1);const N=(D=S.current)==null?void 0:D.querySelectorAll(".ul-card-scroll-wrapper")[T],F=(j=S.current)==null?void 0:j.closest(".ul-card-main-content");if(N&&F){if(N&&F){const K=N.getBoundingClientRect(),ie=F.getBoundingClientRect(),se=K.top-ie.top+F.scrollTop,_=se+K.height/2,$=window.innerHeight-157;let A;K.height>=$?A=se:A=_-F.clientHeight/2;const R=F.clientHeight,W=F.scrollHeight-R,te=Math.max(0,Math.min(A,W));F.scrollTo({top:te,behavior:"smooth"}),setTimeout(()=>{B.current=!1},500)}}else B.current=!1},[c,n]);function w(o,T){return o.filter(N=>M.has(N.name)).map(N=>{const F=T[N.name],D=L.find(j=>j.name===N.name);return{...F,questionText:D?e.getProcessedQuestionText(D):void 0}})}e.p(()=>{h!==null&&n.findIndex(o=>o.name===h)!==-1||l(n[0].name)},[n,h,l]);const O=o=>{if(!c)return;let T=n.findIndex(N=>N.name===o)+1;for(;T<n.length&&!M.has(n[T].name);)T++;T<n.length?l(n[T].name):l(o)};e.p(()=>{c&&h!==null&&(P.current!==h?H(h):P.current=null)},[h,c,H]);const z=e.T(()=>{var ie,se;if(B.current)return;const o=(ie=S.current)==null?void 0:ie.closest(".ul-card-main-content");if(!o)return;const T=(se=S.current)==null?void 0:se.querySelectorAll(".ul-card-scroll-wrapper");if(!T||T.length===0)return;const N=o.getBoundingClientRect(),F=N.top+N.height/2;let D=0,j=1/0;T.forEach((_,$)=>{const A=_.getBoundingClientRect(),R=A.top+A.height/2,W=Math.abs(F-R);W<j&&(j=W,D=$)});const K=n[D];P.current=K.name,l(K.name)},[n,l]);e.p(()=>{var T;if(!c)return;const o=((T=S.current)==null?void 0:T.closest(".ul-card__container"))||null;return o&&o.addEventListener("scroll",z,{passive:!0}),()=>{o&&o.removeEventListener("scroll",z)}},[z,c]);const Y=e.F(()=>n.every(o=>{var T;return!M.has(o.name)||!(!(o!=null&&o.props)||!("properties"in o.props)||((T=o.props.properties)==null?void 0:T.required)!==!1)||g[o.name]}),[g,n,M]),k=async(o,T,N)=>{return y(D=>({...D,[o]:N})),await(F=D=>({...D,[o]:T}),new Promise(D=>{s(j=>{const K=F(j);return D(K),K})}));var F};e.p(()=>{var F;if(!c)return;const o=r.current,T=(F=n==null?void 0:n[0])==null?void 0:F.groupId;r.current=T;const N={};if(n.forEach(D=>{var j,K;e.appCardHasPropertiesWithRequired(D)&&(D.props.properties.required||(N[D.name]={value:((j=t[D.name])==null?void 0:j.value)??null,secondaryValue:((K=t[D.name])==null?void 0:K.secondaryValue)??null,questionId:D.name,type:D.type}))}),o==null||o!==T)s(N),y({});else{s(j=>({...j,...N}));const D=n.reduce((j,K)=>{var ie;return K.type==="aidynamicfollowup"&&((ie=K.props)==null?void 0:ie.loading)===null&&(j[K.name]=!0),j},{});y(j=>({...j,...D}))}},[n,c]);const Q=async(o,T)=>{const N=L.find(F=>F.name===o.questionId);if(c){const F=await k(o.questionId,o,T),D=V(o.type),j=J(o.type);if(D&&(N!=null&&N.groupId&&e.triggerFollowUpQuestionGeneration({displayCard:N,response:o,createDynamicFollowupQuestion:b}),O(o.questionId)),j&&T){const K=w(n,F);i(K)}}else{const F={...o,questionText:N?e.getProcessedQuestionText(N):void 0};e.triggerFollowUpQuestionGeneration({displayCard:N,response:o,createDynamicFollowupQuestion:b}),i([F])}},V=o=>new Set(["nps","likert","multiplechoice"]).has(o),J=o=>new Set(["videovoice","consentlegal","texturlprompt","maxdiff"]).has(o),G=((re=n[0])==null?void 0:re.type)==="thanks";return c?e.u("div",{className:"ul-card-list-container--longform","data-testid":"ui-container",ref:S,children:U?e.u("div",{className:"ul-display-logic-preview-message","data-testid":"display-logic-preview-message",children:xe}):e.u(rt,{value:d,children:[L.map((o,T)=>e.u(Se,{allResponsesArray:E,cardInstance:o,moveToNextQuestion:O,showIndividualSubmit:n.length>1&&T<n.length-1,submitQuestion:Q,updateCardValues:k},(o==null?void 0:o.name)||T)),!G&&e.u(ut,{isSubmitDisabled:!Y,onSubmit:function(){const o=w(n,t);if((L==null?void 0:L.length)===1&&(o==null?void 0:o.length)===1){const T=L[0],N=o[0];e.triggerFollowUpQuestionGeneration({displayCard:T,response:N,createDynamicFollowupQuestion:b})}i(o)}})]})}):e.u(e.g,{children:[e.u("div",{"data-testid":"ui-container",style:{display:"none"}}),U?e.u("div",{className:"ul-display-logic-preview-message","data-testid":"display-logic-preview-message",children:xe}):L.map((o,T)=>e.u(Se,{allResponsesArray:E,cardInstance:o,moveToNextQuestion:O,showIndividualSubmit:!1,submitQuestion:Q,updateCardValues:k},(o==null?void 0:o.name)||T))]})};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as X, h as re, a as e, c as U, g as je, b as se, F as be, p as te, d as fe, e as ve, _ as ie, T as Ce, A as sr, M as _e, D as Me, f as ir, P as ar, i as lr, q as or, j as ue, s as Ze, k as dr, S as cr, l as ur, m as pr, n as mr, o as gr, r as hr, t as br, v as Le, w as Ae } from "./view-
|
|
2
|
-
import { i as le, E as Pe, h as Ge, j as ze, A as vr } from "./index-
|
|
3
|
-
import { H as oe, Q as ce, a as Ie, M as he, b as ge, O as Se, B as ne, L as Te, S as yr, u as fr, g as xr, c as Sr } from "./getAttributedUrl-
|
|
1
|
+
import { u as X, h as re, a as e, c as U, g as je, b as se, F as be, p as te, d as fe, e as ve, _ as ie, T as Ce, A as sr, M as _e, D as Me, f as ir, P as ar, i as lr, q as or, j as ue, s as Ze, k as dr, S as cr, l as ur, m as pr, n as mr, o as gr, r as hr, t as br, v as Le, w as Ae } from "./view-5-qQQKtl.js";
|
|
2
|
+
import { i as le, E as Pe, h as Ge, j as ze, A as vr } from "./index-D2UpkOdR.js";
|
|
3
|
+
import { H as oe, Q as ce, a as Ie, M as he, b as ge, O as Se, B as ne, L as Te, S as yr, u as fr, g as xr, c as Sr } from "./getAttributedUrl-BvS4nPJR.js";
|
|
4
4
|
const kr = ({ className: n, message: s, next: c, properties: t, questionId: r, type: i }) => {
|
|
5
5
|
const { useMobileStyling: g, border: v, isLongFormSurvey: u, focusedQuestionId: h } = X((m) => ({ useMobileStyling: m.useMobileStyling, border: m.border, isLongFormSurvey: le(m.studyType), focusedQuestionId: m.focusedQuestionId })), [o, b] = re(!1), [d, C] = re(""), [l, y] = re(!1), p = u && h === r, S = t == null ? void 0 : t.collectName, x = (t == null ? void 0 : t.nameLabelText) || "Full Name", N = (t == null ? void 0 : t.consentText) || "I agree to the stated conditions", q = (t == null ? void 0 : t.submitButtonText) || "Submit", B = !!d.trim(), P = o && (!S || B), V = (m, f = !1) => {
|
|
6
6
|
m.preventDefault(), m.stopPropagation();
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BCIAxJWJ.cjs");exports.DismissReason=i.DismissReason,exports.Sprig=i.Sprig,exports.SprigAPI=i.SprigAPI,exports.SprigEvent=i.SprigEvent,exports.sprig=i.sprig;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as pe, A as G, s as Se, D as ln, c as cn, S as P, a as de, b as Oe, C as mt, d as gt, i as Ie, g as un, f as Ge, r as dn, v as _t } from "./index-
|
|
1
|
+
import { e as pe, A as G, s as Se, D as ln, c as cn, S as P, a as de, b as Oe, C as mt, d as gt, i as Ie, g as un, f as Ge, r as dn, v as _t } from "./index-D2UpkOdR.js";
|
|
2
2
|
var he, C, ar, Z, ht, sr, Ke, lr, me = {}, cr = [], pn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Le = Array.isArray;
|
|
3
3
|
function B(e, t) {
|
|
4
4
|
for (var r in t) e[r] = t[r];
|
|
@@ -1531,7 +1531,7 @@ const Io = ({ displayCard: e, response: t, createDynamicFollowupQuestion: r }) =
|
|
|
1531
1531
|
return c = n ? r + 1 : s.findIndex((u) => u.name === o), { totalQuestions: l, fraction: c / (l + 1) };
|
|
1532
1532
|
}, [t, r, o, n]);
|
|
1533
1533
|
return i <= 1 ? null : S("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: S("div", { className: "ul-progress-bar-current", style: { width: 100 * a + "%", border: `1px solid ${e ?? "#000"}` } }) });
|
|
1534
|
-
}, go = Te(async () => ({ default: (await import("./index-
|
|
1534
|
+
}, go = Te(async () => ({ default: (await import("./index-fcbxeQg3.js")).PageCard })), _o = Te(() => import("./conversational-ui-BZDC1buu.js")), ho = () => {
|
|
1535
1535
|
const { answers: e, border: t, cards: r, close: o, configureExitOnOverlayClick: n, destroy: i, endCard: a, eventEmitFn: s, fontFamily: l, headers: c, isConversationalUI: d, experimentFlags: u, index: g, next: p, previewKey: h, productConfig: m, seen: _, showStripes: x, studyType: f, surveyId: k, surveyVisitorAttributes: w, update: y, useMobileStyling: b, viewDocument: v } = W((I) => ({ answers: I.answers, border: I.border, cards: I.cards, close: I.close, configureExitOnOverlayClick: I.configureExitOnOverlayClick, destroy: I.destroy, endCard: I.endCard, eventEmitFn: I.eventEmitFn, fontFamily: I.fontFamily, headers: I.headers, index: I.index, isConversationalUI: I.isConversationalUI, experimentFlags: I.experimentFlags, previewKey: I.previewKey, productConfig: I.productConfig, next: I.next, seen: I.seen, showStripes: I.showStripes, studyType: I.studyType, surveyId: I.surveyId, surveyVisitorAttributes: I.surveyVisitorAttributes, update: I.update, useMobileStyling: I.useMobileStyling, viewDocument: I.viewDocument })), A = Y(null), R = Y(!1), N = Y(!1), L = c["userleap-platform"], T = u == null ? void 0 : u["sdk-new-convo-ui"], { props: E, type: H, name: V } = r[g];
|
|
1536
1536
|
q(() => {
|
|
1537
1537
|
if (window.Sprig) return window.Sprig.trackHistory = (I) => W.getState().trackHistory(I), () => {
|
|
@@ -1740,12 +1740,12 @@ const bo = { configure: function(e, t = !0) {
|
|
|
1740
1740
|
})({ cards: h, hasEndCard: !!n, allResponses: [], surveyVisitorAttributes: e.surveyVisitorAttributes ?? {}, startingQuestionIdx: e.startingQuestionIdx });
|
|
1741
1741
|
W.setState({ experimentFlags: e.experimentFlags ?? {}, addResponseGroupMeta: e.addResponseGroupMeta, apiURL: o, answers: r, avatars: e.avatars, border: e.border, index: x, isConversationalUI: _, cards: h, cardIndexByName: m, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, enableCspTrustedTypes: e.enableCspTrustedTypes, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: s, headers: e.headers, hasViewedEmbed: !1, isPreview: e.previewMode, layout: e.layout, marketingUrl: "https://sprig.com", meta: yo({ mode: e.mode, viewWindow: d, viewDocument: c, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, productConfig: e.productConfig, providerPersona: e.providerPersona ?? void 0, recorder: rt, recorderEventEmitter: p, responseGroupUid: e.responseGroupUid, showProviderPersona: e.showProviderPersona ?? !1, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, startingQuestionIdx: e.startingQuestionIdx, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, surveyVisitorAttributes: e.surveyVisitorAttributes, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: x });
|
|
1742
1742
|
const { head: f } = c;
|
|
1743
|
-
if (Ge({ document: c, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid var(--background-color);box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-display-logic-preview-message{font-size:14px;line-height:20px;padding:24px 20px;text-align:center}.ul-card__container{background:var(--background-color);border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}@media only screen and (max-width: 700px){.long-form-question-footer-container{position:relative}}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px;flex:0 1}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.conversational-ui .long-form-question-footer-container-logo{position:sticky;bottom:32px;margin:16px;width:112px;padding:4px;background-color:#fff;border-radius:24px}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:var(--text-color);text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content;overflow:auto;scrollbar-width:thin;scroll-behavior:smooth}.sprig-border-bottom{border-bottom:1px solid var(--border-color)}.sprig-border-top{border-top:1px solid var(--border-color)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:var(--text-color);display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:var(--text-color-light);text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid var(--border-color)}.choice--desktop{border:1px solid var(--border-color)}.choice{align-items:flex-start;color:var(--text-color);cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:var(--prototype-button-background)}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:var(--thank-you-link-background-hover)}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:var(--background-color);border:1px solid var(--border-color);border-radius:8px;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:8px 12px;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:var(--text-color-light)}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid var(--selection-indicator-color);flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid var(--selection-indicator-color-selected);display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:var(--text-color)}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:var(--text-color);font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:var(--button-subtle-background);display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:var(--text-color-light);stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:var(--text-color)}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:var(--button-secondary-text-color);cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;height:auto;justify-content:center;flex:1 0 auto}.ul-card-list-container--longform:has(.ul-card-scroll-wrapper:nth-child(2)){gap:1rem;padding-block-start:40px;padding-block-end:40px}@media (max-width: 600px){.ul-websurvey-frame-mobile.long-form-survey>.ul-websurvey-sidebar-mobile{padding-top:0}.ul-card-list-container--longform .ul-card-scroll-wrapper:last-child{padding-bottom:80px}.ul-card-list-container--longform:has(.ul-card-scroll-wrapper:nth-child(2)){padding-block-start:80px;padding-block-end:40px}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center;flex:1 0 auto}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid var(--border-color)}.ul-consent-legal__name-input--desktop{border:1px solid var(--border-color)}.ul-consent-legal__name-input{background:var(--prototype-button-background);box-sizing:border-box;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:var(--text-color-light)}.ul-consent-legal__name-input:focus{outline:none;background:var(--background-color)}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:var(--thank-you-link-background-hover)}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:var(--prototype-button-background)}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:var(--thank-you-link-background-hover)}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid var(--selection-border-color)}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid var(--selection-border-color)}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;color:var(--text-color);background-color:var(--selection-background-color);font-size:18px;line-height:54px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active{background-color:var(--selection-background-color-hover);font-weight:500;position:relative;z-index:10}.likert-number--mobile:active{border-color:var(--text-color)}.ul-card--likert__numbers>.likert-number.likert-number--desktop:hover{background-color:var(--selection-background-color-hover);font-weight:500;border-color:var(--text-color);position:relative;z-index:10}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:var(--likert-symbol-color);font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:var(--likert-symbol-color);line-height:24px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:var(--text-color);display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:var(--text-color);padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:var(--matrix-header-background);display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:var(--matrix-header-background);border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid var(--nps-unselected-border)}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid var(--nps-unselected-border)}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;color:var(--text-color);background-color:var(--nps-unselected);font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:var(--selection-background-color-hover);font-weight:500}.ul-card--nps__labels{align-items:center;color:var(--text-color);display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%;text-align:left}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid var(--rank-order-border);border-radius:8px;margin-bottom:4px;background:var(--background-color)}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:var(--text-color);cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:var(--background-color);border-color:var(--text-color);transition:none}.ul-card-rank__option.is-drop-target{background:var(--rank-order-background);border-radius:8px;border-color:var(--rank-order-border-hover)}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400;pointer-events:none}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid var(--rank-order-border);border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:var(--background-color);cursor:pointer;pointer-events:auto;color:var(--text-color)}.ul-card-rank__select.ul-card-rank__select--placeholder{color:var(--text-color-lighter)}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid var(--border-color);max-height:63px}.ul-card-text__input--desktop{border:1px solid var(--border-color);max-height:150px}.ul-card-text__input{background:var(--prototype-button-background);box-sizing:border-box;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:var(--text-color-light)}.ul-card-text__input:focus{outline:none;background:var(--background-color)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--thank-you-link-background-hover)}.ul-card-text__input__loading{background-image:linear-gradient(70deg,#e2e3e1,#f9f9f8,#e2e3e1);background-size:200% 100%;animation:shimmer 2s infinite linear}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:var(--record-task-background);text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:var(--text-color-light)}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:var(--text-color);text-decoration:underline;font-size:12px}.ul-permission-body{color:var(--text-color);margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:var(--background-color);border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:var(--text-color-light);margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:var(--text-color);background-color:var(--background-color)}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:var(--text-color-light)}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);color:#fff;border-radius:3px;border:none;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:var(--button-disabled-background);color:var(--button-disabled-text-color)}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f!important}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:var(--button-disabled-text-color)}.ul-card-skip__button{color:var(--text-color-light);background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid var(--select-border);box-shadow:0 0 0 2px var(--selection-border-color);cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%;color:var(--text-color)}.select-button:hover{background-color:var(--select-background-hover)}.select-button:active{background-color:var(--selection-background-color-hover)}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:var(--text-color-lighter)}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:var(--select-background);border:1px solid var(--select-border);box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-background-hover)}.ul-card--maxdiff__question-inner-container{display:grid;grid-template-columns:1fr 2.5fr 1fr;grid-template-rows:repeat(3,minmax(40px,auto));grid-gap:6px;align-items:center}@media (max-width: 600px){.ul-card-maxdiff__labels-row{column-gap:30%}}.ul-card-maxdiff__label{font-weight:600;text-align:center;margin:auto;flex:1;padding:8px;overflow:auto;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.ul-card-maxdiff__label-spacer{flex:6}.ul-card-maxdiff .ul-question{text-align:center}.ul-question a{color:var(--text-color)}.ul-card-maxdiff__option-row{display:flex;justify-content:space-between;margin-bottom:8px;padding:0 24px}.ul-card-maxdiff__option-label{flex:6;align-self:center;padding:12px;text-align:center;max-width:100%;overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto}.ul-card-maxdiff__option-control.smiley{display:flex;justify-content:center;align-items:center;min-width:86px;flex:1;padding:12px;border-radius:none;border:none;background:none;cursor:pointer}.ul-card-maxdiff__option-control .choice-label-container{justify-content:center}.ul-card-maxdiff p.ul-caption{text-align:center}.ul-card-maxdiff .question-header-button-container{display:flex;justify-content:center}.ul-card-maxdiff__option-selected{border-radius:100px}.ul-card-maxdiff__option-selected.good{background:var(--nps-selected-color-high)}.ul-card-maxdiff__option-selected.bad{background:var(--nps-selected-color-low)}.ul-card-maxdiff__option-btn{width:42px;height:42px;justify-content:center;align-items:center}html{--background-color: #fff;--background-color-darker: #f7f7f7;--text-color: #000;--text-color-light: #8f8f8f;--text-color-lighter: #a8a8a8;--border-color: #e6e6e6;--border-color-heavy: #ebebeb;--button-disabled-background: #f2f2f2;--button-disabled-text-color: #a8a8a8;--sprig-logo-background: #f9c600;--progress-bar-background: rgba(0, 0, 0, .1);--prototype-button-background: rgba(0, 0, 0, .01);--thank-you-link-background: rgba(0, 0, 0, .01);--thank-you-link-background-hover: rgba(0, 0, 0, .03);--selection-border-color: #c2c2c2;--selection-background-color: #f2f2f2;--selection-background-color-hover: #e6e6e6;--selection-indicator-color: #a8a8a8;--selection-indicator-color-selected: #000;--matrix-header-background: #f7f7f7;--nps-unselected: #FCFCFC;--nps-unselected-border: #e6e6e6;--nps-selected-color-low: #f44336;--nps-selected-color-high: #4caf50;--rank-order-background: #f2f2f2;--rank-order-border: #e6e6e6;--rank-order-border-hover: #d9d9d9;--rank-order-number-background: #fff;--record-task-background: #f2f2f2;--record-task-border: #e6e6e6;--record-task-border-hover: #d9d9d9;--record-task-number-background: #fff;--select-border: #e6e6e6;--select-border-hover: #d9d9d9;--select-background: #fff;--select-background-hover: #f2f2f2;--voice-video-background: #f2f2f2;--voice-video-border: #e6e6e6;--voice-video-border-hover: #d9d9d9;--voice-video-icon-color: #a8a8a8;--likert-symbol-color: transparent;--sprig-brand-color: #000000}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none;background-color:var(--background-color);color:var(--text-color)}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:var(--background-color);border-bottom:2px solid var(--border-color-heavy);display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0;padding-bottom:16px}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:var(--thank-you-link-background);border:1px solid var(--border-color);border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:var(--thank-you-link-background-hover)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:var(--sprig-logo-background);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{position:absolute;top:8px;right:8px;cursor:pointer;height:16px;width:16px;z-index:2;color:var(--text-color)}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:var(--progress-bar-background);border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:var(--prototype-button-background);border:1.5px solid var(--border-color);border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}.sprig-logo{color:var(--sprig-brand-color)}.ul-video-btn{color:var(--text-color)}` }), e.customStyles && Ge({ document: c, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && a && parent) {
|
|
1743
|
+
if (Ge({ document: c, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid var(--background-color);box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-display-logic-preview-message{font-size:14px;line-height:20px;padding:24px 20px;text-align:center}.ul-card__container{background:var(--background-color);border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}@media only screen and (max-width: 700px){.long-form-question-footer-container{position:relative}}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px;flex:0 1}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.conversational-ui .long-form-question-footer-container-logo{position:sticky;bottom:32px;margin:16px;width:112px;padding:4px;background-color:#fff;border-radius:24px}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:var(--text-color);text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content;overflow:auto;scrollbar-width:thin;scroll-behavior:smooth}.sprig-border-bottom{border-bottom:1px solid var(--border-color)}.sprig-border-top{border-top:1px solid var(--border-color)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:var(--text-color);display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:var(--text-color-light);text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid var(--border-color)}.choice--desktop{border:1px solid var(--border-color)}.choice{align-items:flex-start;color:var(--text-color);cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:var(--prototype-button-background)}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:var(--thank-you-link-background-hover)}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:var(--background-color);border:1px solid var(--border-color);border-radius:8px;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:8px 12px;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:var(--text-color-light)}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid var(--selection-indicator-color);flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid var(--selection-indicator-color-selected);display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:var(--text-color)}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:var(--text-color);font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:var(--button-subtle-background);display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:var(--text-color-light);stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:var(--text-color)}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:var(--button-secondary-text-color);cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;height:auto;justify-content:center;flex:1 0 auto}.ul-card-list-container--longform:has(.ul-card-scroll-wrapper:nth-child(2)){gap:1rem;padding-block-start:40px;padding-block-end:40px}@media (max-width: 600px){.ul-websurvey-frame-mobile.long-form-survey>.ul-websurvey-sidebar-mobile{padding-top:0}.ul-card-list-container--longform .ul-card-scroll-wrapper:last-child{padding-bottom:80px}.ul-card-list-container--longform:has(.ul-card-scroll-wrapper:nth-child(2)){padding-block-start:80px;padding-block-end:40px}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center;flex:1 0 auto}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid var(--border-color)}.ul-consent-legal__name-input--desktop{border:1px solid var(--border-color)}.ul-consent-legal__name-input{background:var(--prototype-button-background);box-sizing:border-box;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:var(--text-color-light)}.ul-consent-legal__name-input:focus{outline:none;background:var(--background-color)}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:var(--thank-you-link-background-hover)}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:var(--prototype-button-background)}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:var(--thank-you-link-background-hover)}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid var(--selection-border-color)}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid var(--selection-border-color)}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;color:var(--text-color);background-color:var(--selection-background-color);font-size:18px;line-height:54px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active{background-color:var(--selection-background-color-hover);font-weight:500;position:relative;z-index:10}.likert-number--mobile:active{border-color:var(--text-color)}.ul-card--likert__numbers>.likert-number.likert-number--desktop:hover{background-color:var(--selection-background-color-hover);font-weight:500;border-color:var(--text-color);position:relative;z-index:10}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:var(--likert-symbol-color);font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:var(--likert-symbol-color);line-height:24px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:var(--text-color);display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:var(--text-color);padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:var(--matrix-header-background);display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:var(--matrix-header-background);border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid var(--nps-unselected-border)}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid var(--nps-unselected-border)}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;color:var(--text-color);background-color:var(--nps-unselected);font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:var(--selection-background-color-hover);font-weight:500}.ul-card--nps__labels{align-items:center;color:var(--text-color);display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%;text-align:left}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid var(--rank-order-border);border-radius:8px;margin-bottom:4px;background:var(--background-color)}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:var(--text-color);cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:var(--background-color);border-color:var(--text-color);transition:none}.ul-card-rank__option.is-drop-target{background:var(--rank-order-background);border-radius:8px;border-color:var(--rank-order-border-hover)}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400;pointer-events:none}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid var(--rank-order-border);border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:var(--background-color);cursor:pointer;pointer-events:auto;color:var(--text-color)}.ul-card-rank__select.ul-card-rank__select--placeholder{color:var(--text-color-lighter)}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid var(--border-color);max-height:63px}.ul-card-text__input--desktop{border:1px solid var(--border-color);max-height:150px}.ul-card-text__input{background:var(--prototype-button-background);box-sizing:border-box;color:var(--text-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:var(--text-color-light)}.ul-card-text__input:focus{outline:none;background:var(--background-color)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--thank-you-link-background-hover)}.ul-card-text__input__loading{background-image:linear-gradient(70deg,#e2e3e1,#f9f9f8,#e2e3e1);background-size:200% 100%;animation:shimmer 2s infinite linear}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:var(--record-task-background);text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:var(--text-color-light)}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:var(--text-color);text-decoration:underline;font-size:12px}.ul-permission-body{color:var(--text-color);margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:var(--background-color);border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:var(--text-color-light);margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:var(--text-color);background-color:var(--background-color)}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:var(--text-color-light)}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);color:#fff;border-radius:3px;border:none;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:var(--button-disabled-background);color:var(--button-disabled-text-color)}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f!important}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:var(--button-disabled-text-color)}.ul-card-skip__button{color:var(--text-color-light);background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid var(--select-border);box-shadow:0 0 0 2px var(--selection-border-color);cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%;color:var(--text-color)}.select-button:hover{background-color:var(--select-background-hover)}.select-button:active{background-color:var(--selection-background-color-hover)}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:var(--text-color-lighter)}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:var(--select-background);border:1px solid var(--select-border);box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-background-hover)}.ul-card--maxdiff__question-inner-container{display:grid;grid-template-columns:1fr 2.5fr 1fr;grid-template-rows:repeat(3,minmax(40px,auto));grid-gap:6px;align-items:center}@media (max-width: 600px){.ul-card-maxdiff__labels-row{column-gap:30%}}.ul-card-maxdiff__label{font-weight:600;text-align:center;margin:auto;flex:1;padding:8px;overflow:auto;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.ul-card-maxdiff__label-spacer{flex:6}.ul-card-maxdiff .ul-question{text-align:center}.ul-question a{color:var(--text-color)}.ul-card-maxdiff__option-row{display:flex;justify-content:space-between;margin-bottom:8px;padding:0 24px}.ul-card-maxdiff__option-label{flex:6;align-self:center;padding:12px;text-align:center;max-width:100%;overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto}.ul-card-maxdiff__option-control.smiley{display:flex;justify-content:center;align-items:center;min-width:86px;flex:1;padding:12px;border-radius:none;border:none;background:none;cursor:pointer}.ul-card-maxdiff__option-control .choice-label-container{justify-content:center}.ul-card-maxdiff p.ul-caption{text-align:center}.ul-card-maxdiff .question-header-button-container{display:flex;justify-content:center}.ul-card-maxdiff__option-selected{border-radius:100px}.ul-card-maxdiff__option-selected.good{background:var(--nps-selected-color-high)}.ul-card-maxdiff__option-selected.bad{background:var(--nps-selected-color-low)}.ul-card-maxdiff__option-btn{width:42px;height:42px;justify-content:center;align-items:center}html{--background-color: #fff;--background-color-darker: #f7f7f7;--text-color: #000;--text-color-light: #8f8f8f;--text-color-lighter: #a8a8a8;--border-color: #e6e6e6;--border-color-heavy: #ebebeb;--button-disabled-background: #f2f2f2;--button-disabled-text-color: #a8a8a8;--sprig-logo-background: #f9c600;--progress-bar-background: rgba(0, 0, 0, .1);--prototype-button-background: rgba(0, 0, 0, .01);--thank-you-link-background: rgba(0, 0, 0, .01);--thank-you-link-background-hover: rgba(0, 0, 0, .03);--selection-border-color: #c2c2c2;--selection-background-color: #f2f2f2;--selection-background-color-hover: #e6e6e6;--selection-indicator-color: #a8a8a8;--selection-indicator-color-selected: #000;--matrix-header-background: #f7f7f7;--nps-unselected: #fcfcfc;--nps-unselected-border: #e6e6e6;--nps-selected-color-low: #f44336;--nps-selected-color-high: #4caf50;--rank-order-background: #f2f2f2;--rank-order-border: #e6e6e6;--rank-order-border-hover: #d9d9d9;--rank-order-number-background: #fff;--record-task-background: #f2f2f2;--record-task-border: #e6e6e6;--record-task-border-hover: #d9d9d9;--record-task-number-background: #fff;--select-border: #e6e6e6;--select-border-hover: #d9d9d9;--select-background: #fff;--select-background-hover: #f2f2f2;--voice-video-background: #f2f2f2;--voice-video-border: #e6e6e6;--voice-video-border-hover: #d9d9d9;--voice-video-icon-color: #a8a8a8;--likert-symbol-color: transparent;--sprig-brand-color: #000000}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none;color:var(--text-color)}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:var(--background-color);border-bottom:2px solid var(--border-color-heavy);display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0;padding-bottom:16px}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:var(--thank-you-link-background);border:1px solid var(--border-color);border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:var(--thank-you-link-background-hover)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:var(--sprig-logo-background);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{position:absolute;top:8px;right:8px;cursor:pointer;height:16px;width:16px;z-index:2;color:var(--text-color)}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:var(--progress-bar-background);border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:var(--prototype-button-background);border:1.5px solid var(--border-color);border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}.sprig-logo{color:var(--sprig-brand-color)}.ul-video-btn{color:var(--text-color)}` }), e.customStyles && Ge({ document: c, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && a && parent) {
|
|
1744
1744
|
const y = c.createElement("link");
|
|
1745
1745
|
y.rel = "stylesheet", y.href = a, f.appendChild(y);
|
|
1746
1746
|
}
|
|
1747
1747
|
const k = i || ((w = s.eventEmitter) == null ? void 0 : w.emit);
|
|
1748
|
-
k == null || k("verify.view.version", { "view.version": "2.46.
|
|
1748
|
+
k == null || k("verify.view.version", { "view.version": "2.46.1" }), u && t && (Ze && Ee(u), se(S(ho, {}), u), Ze = !0, pe.once(P.SurveyClosed, () => {
|
|
1749
1749
|
Ee(u), Ze = !1;
|
|
1750
1750
|
}));
|
|
1751
1751
|
} }, Eo = Object.freeze(Object.defineProperty({ __proto__: null, default: bo }, Symbol.toStringTag, { value: "Module" }));
|