@sprig-technologies/sprig-bundled 2.46.1 → 2.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +0,0 @@
1
- const t = 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:var(--sprig-button-disabled-bg);color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f}.ul-card-skip__button{border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:var(--chat-close-hover-bg)}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:var(--chat-msg-no-response)}.chat-card .choice{margin-bottom:0;background-color:var(--chat-choice-bg);padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-left-bg)}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:var(--text-color);font-size:14px;font-weight:400;word-wrap:break-word}.chat-persona-label{margin-top:-4px;text-align:left;color:var(--chat-end-text);font-size:14px;font-weight:400;line-height:140%}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:var(--chat-end-text);font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:var(--chat-footer)}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--chat-answered-overlay-bg);pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:var(--consent-sprig-stretch-bg)}.sprig-stretch input{background-color:var(--consent-input-bg)}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent;justify-content:space-evenly}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:var(--text-color);text-align:center;word-break:break-word;font-size:.95rem}.likert-number,.likert-smiley,.likert-star{aspect-ratio:1 / 1;min-height:24px;max-height:54px;box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number,.likert-smiley,.likert-star){max-width:100%;padding:0 .5rem;display:flex;flex-direction:column}.chat-bubble.chat-bubble-right:has(.likert-number,.likert-smiley,.likert-star){width:100%}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:var(--text-color);border:2px solid var(--nps-number-border)}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:var(--text-color)}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:var(--text-color)}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:var(--select-button-bg);border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:var(--select-button-hover)}.select-button:active{background-color:var(--select-button-bg)}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:var(--select-list-bg);border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-checkbox-hover-bg)}.chat-card .select-checkbox{border:1px solid var(--select-checkbox-border);background-color:var(--select-checkbox-bg)}.chat-card .select-radio{box-shadow:unset;border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-bg)}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-active-bg);box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px;background-color:var(--text-card-input-bg)}.ul-card-text__input{background-color:var(--text-card-input-bg);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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%;border-color:var(--text-card-border)}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.ul-card-text__input::placeholder{color:#6c6c6e80;background-color:var(--text-card-input-bg)}.ul-card-text__input:focus{outline:none;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--text-card-input-bg)}@media (max-width: 768px){.ul-card-text__input{font-size:16px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}html{--root-bg: #e8e7e6;--root-input-bg: #ffffff;--root-input-border: #e8e7e6;--root-input-border-dark: #333;--chat-close-hover-bg: rgba(255, 255, 255, .5);--chat-msg-no-response: #666;--chat-right-bg: var(--root-bg);--chat-left-bg: #F7F6F5;--chat-end-text: #999;--chat-footer: #000000;--chat-answered-overlay-bg: rgba(255, 255, 255, .3);--chat-choice-bg: unset;--consent-sprig-stretch-bg: var(--root-bg);--consent-input-bg: var(--root-bg);--text-card-input-bg: var(--root-input-bg);--text-card-border: var(--root-input-border);--select-checkbox-bg: #fff;--select-checkbox-hover-bg: var(--root-input-bg);--select-checkbox-border: var(--root-input-border-dark);--select-radio-bg: var(--root-input-bg);--select-radio-active-bg: #000;--select-radio-active-border-bg: var(--root-bg);--select-list-bg: #fff;--select-button-bg: #fff;--select-button-hover: #f2f2f2;--select-option-bg: #fff;--select-multiselect-checkbox-label-bg: var(--root-bg);--nps-number-border: var(--root-input-border);--nps-unselected: #fff;--sprig-button-disabled-bg: rgba(0, 0, 0, .1)}';
2
- export {
3
- t as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:var(--sprig-button-disabled-bg);color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f}.ul-card-skip__button{border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:var(--chat-close-hover-bg)}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:var(--chat-msg-no-response)}.chat-card .choice{margin-bottom:0;background-color:var(--chat-choice-bg);padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container img{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-left-bg)}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:var(--text-color);font-size:14px;font-weight:400;word-wrap:break-word}.chat-persona-label{margin-top:-4px;text-align:left;color:var(--chat-end-text);font-size:14px;font-weight:400;line-height:140%}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:var(--chat-end-text);font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:var(--chat-footer)}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--chat-answered-overlay-bg);pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:var(--consent-sprig-stretch-bg)}.sprig-stretch input{background-color:var(--consent-input-bg)}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent;justify-content:space-evenly}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:24px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:var(--text-color);text-align:center;word-break:break-word;font-size:.95rem}.likert-number,.likert-smiley,.likert-star{aspect-ratio:1 / 1;min-height:24px;max-height:54px;box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number,.likert-smiley,.likert-star){max-width:100%;padding:0 .5rem;display:flex;flex-direction:column}.chat-bubble.chat-bubble-right:has(.likert-number,.likert-smiley,.likert-star){width:100%}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .nps-number{color:var(--text-color);border:2px solid var(--nps-number-border)}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:var(--text-color)}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:var(--text-color)}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:var(--select-button-bg);border-radius:8px;border:1px solid #E8E7E6;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:var(--select-button-hover)}.select-button:active{background-color:var(--select-button-bg)}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:var(--select-list-bg);border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-checkbox-hover-bg)}.chat-card .select-checkbox{border:1px solid var(--select-checkbox-border);background-color:var(--select-checkbox-bg)}.chat-card .select-radio{box-shadow:unset;border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-bg)}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-active-bg);box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px;background-color:var(--text-card-input-bg)}.ul-card-text__input{background-color:var(--text-card-input-bg);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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%;border-color:var(--text-card-border)}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.ul-card-text__input::placeholder{color:#6c6c6e80;background-color:var(--text-card-input-bg)}.ul-card-text__input:focus{outline:none;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--text-card-input-bg)}@media (max-width: 768px){.ul-card-text__input{font-size:16px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}html{--root-bg: #e8e7e6;--root-input-bg: #ffffff;--root-input-border: #e8e7e6;--root-input-border-dark: #333;--chat-close-hover-bg: rgba(255, 255, 255, .5);--chat-msg-no-response: #666;--chat-right-bg: var(--root-bg);--chat-left-bg: #F7F6F5;--chat-end-text: #999;--chat-footer: #000000;--chat-answered-overlay-bg: rgba(255, 255, 255, .3);--chat-choice-bg: unset;--consent-sprig-stretch-bg: var(--root-bg);--consent-input-bg: var(--root-bg);--text-card-input-bg: var(--root-input-bg);--text-card-border: var(--root-input-border);--select-checkbox-bg: #fff;--select-checkbox-hover-bg: var(--root-input-bg);--select-checkbox-border: var(--root-input-border-dark);--select-radio-bg: var(--root-input-bg);--select-radio-active-bg: #000;--select-radio-active-border-bg: var(--root-bg);--select-list-bg: #fff;--select-button-bg: #fff;--select-button-hover: #f2f2f2;--select-option-bg: #fff;--select-multiselect-checkbox-label-bg: var(--root-bg);--nps-number-border: var(--root-input-border);--nps-unselected: #fff;--sprig-button-disabled-bg: rgba(0, 0, 0, .1)}';
@@ -1,12 +0,0 @@
1
- "use strict";const e=require("./view-D8rc4Fhu.cjs"),T=require("./index-BCIAxJWJ.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),A=({html:t,...n})=>{const{enableCspTrustedTypes:l}=e.useConfig(i=>({enableCspTrustedTypes:i.enableCspTrustedTypes})),o=e.F(()=>T.getHtml(t,l),[l,t]);return e.u("div",{...n,dangerouslySetInnerHTML:{__html:o}})},I=()=>{const{viewDocument:t}=e.useConfig(o=>({viewDocument:o.viewDocument})),[n,l]=e.h(!1);return e.p(()=>{const o=t.querySelector(".sprig-question-body"),i=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{l(!!(o&&T.isHTMLElement(o)&&o.scrollHeight>o.offsetHeight))})});return o&&i.observe(o),()=>{o&&i.disconnect()}},[t]),n},L=({plainText:t,richText:n,id:l,className:o,isHeader:i,showAsterisk:s})=>n?e.u(A,{className:o,html:n,id:l}):t?i?e.u("h1",{className:o,id:l,children:[t,s&&"*"]}):e.u("p",{className:o,id:l,children:t}):null,M=()=>e.u("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),$=({buttonText:t="View Prototype",handleClick:n})=>e.u("button",{className:"prototype-button",onClick:n,children:t},"prototype-btn"),P=({isSelected:t,id:n,divId:l,themeColor:o,disabled:i=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":i,"aria-labelledby":`label-${n}`,className:"select-checkbox",id:l,role:"checkbox",style:{...t?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},...i?{opacity:.5}:{}},tabIndex:i?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),V=({promptText:t,textValue:n,onTextChange:l,useMobileStyling:o})=>{const i=e._(null);return e.p(()=>{i.current&&i.current.focus()},[]),e.u("textarea",{"aria-label":t,"aria-multiline":"true","aria-placeholder":t,className:e.cc(e.getClasses("choice-text-input",o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:s=>{s.stopPropagation(),l(s.currentTarget.value)},onClick:s=>{s.stopPropagation()},onKeyPress:s=>{s.stopPropagation()},placeholder:t,ref:i,role:"textbox",rows:1,value:n})},q="ul-select-style-element",R="ul-select-active-dynamic-style",H="ul-select-error-dynamic-style",j=(t,n,l)=>{let o=t.getElementById(q),i=!1;o||(o=t.createElement("style"),i=!0),o.tagName.toLowerCase()==="style"&&(o.id=q,l&&(o.nonce=l),o.textContent=z(n),i&&t.head.appendChild(o))},z=t=>`
2
- .${R} {
3
- border-color: ${t};
4
- }
5
- .${R} .select-radio, .${R}.select-radio {
6
- border: 6px solid ${t};
7
- box-shadow: none;
8
- }
9
- .${H} {
10
- border-color: ${T.ERROR_BORDER_COLOR};
11
- }
12
- `,W=({options:t,selectItem:n,selectedOptions:l,showCheckbox:o,disabledOptions:i,dropdownFooter:s,panelRef:c})=>{const{themeColor:h}=e.useConfig(r=>({doc:r.viewDocument,themeColor:r.border}));return e.u("div",{className:"select-list",ref:c,children:[t.map(r=>{return e.u("div",{"aria-disabled":i==null?void 0:i.includes(r),className:e.cc("select-option",i!=null&&i.includes(r)?"ul-choice-disabled":""),onClick:d=>{i!=null&&i.includes(r)||(n(r),d.stopPropagation())},role:"option",style:{...i!=null&&i.includes(r)?{opacity:.5,cursor:"not-allowed"}:{}},children:[o&&e.u(P,{divId:(p=r.id,`checkbox-div-${p}`),id:r.id,isSelected:l.includes(r),themeColor:h}),r.label]},r.id);var p}),s]})},K={"{{user_id}}":"externalUserId","{{email}}":"email"};exports.Button=_,exports.Header=({message:t,properties:n,isRequired:l})=>{const o=e._(null),i=n==null?void 0:n.captionText,s=I();return e.u("div",{className:e.cc("question-header-container","sprig-header-container",s?"sprig-border-bottom":null),ref:o,children:[e.u("div",{className:"question-header-button-container",children:e.u(L,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:t,richText:n==null?void 0:n.questionHtml,showAsterisk:l})}),e.u(L,{className:"ul-caption",id:"ul-caption",plainText:i,richText:n==null?void 0:n.captionHtml})]})},exports.Html=A,exports.LongformSubmitButton=({isSubmitDisabled:t,handleSubmit:n})=>e.u("div",{className:"ul-card-longform__submit-button-container",children:e.u(_,{className:"ul-card-longform__submit-button",disabled:t,onClick:n,children:["OK ",e.u(M,{})]})}),exports.MobileEmbedView=({embeddedType:t="prototype",properties:n,children:l})=>{var y;const{handleClickEmbedButton:o,hasViewedEmbed:i,headers:s,useDesktopPrototype:c}=e.useConfig(u=>({handleClickEmbedButton:u.handleClickEmbedButton,hasViewedEmbed:u.hasViewedEmbed,headers:u.headers,useDesktopPrototype:u.useDesktopPrototype})),h=(n==null?void 0:n.conceptUrl)||((y=n==null?void 0:n.consentDocument)==null?void 0:y.url),r=window.innerWidth<T.EMBED_MOBILE_MAX_WIDTH,p=s["userleap-platform"],d=(u,C)=>{u.preventDefault(),o(C)};if((()=>{const{update:u,index:C,isConversationalUI:g,viewDocument:f}=e.useConfig(({update:b,index:m,isConversationalUI:v,viewDocument:x})=>({update:b,index:m,isConversationalUI:v,viewDocument:x})),a=T.debounce(u,100);e.p(()=>{if(g)return;const b=new ResizeObserver(a),m=f.querySelector(".ul-card__container");return m&&b.observe(m,{box:"border-box"}),()=>{b.disconnect()}},[a,u,C,g,f])})(),!c&&r&&!i&&h&&["email","link"].includes(p)){if(t==="prototype")return e.u($,{handleClick:u=>{d(u,"question.prototype.click")}});if(t==="pdf")return e.u($,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:u=>{d(u,"question.agreement.click")}})}return e.u(e.g,{children:l})},exports.Option=({ariaLabel:t,border:n,choiceStyle:l={},label:o,isSelected:i,value:s,text:c,id:h,isRadio:r,useMobileStyling:p,error:d,allowTextEntry:y,noneOfTheAbove:u,promptText:C,disabled:g=!1,onUserInputChanged:f})=>{const{styleNonce:a,viewDocument:b}=e.useConfig(w=>({styleNonce:w.styleNonce,viewDocument:w.viewDocument})),[m,v]=e.h(!1);j(b,n,a);const x=({isSelected:w,userText:E})=>{f&&f({id:h,selected:w,value:s,userText:E,noneOfTheAbove:u})},N=w=>{g||(w.stopPropagation(),x({isSelected:r||!i,userText:c}),v(!1))},F=()=>{m||v(!0)},O=()=>{m&&v(!1)},k={onClick:w=>N(w),onKeyPress:w=>(E=>{g||E.key!=="Enter"&&E.key!==" "||N(E)})(w)};"ontouchstart"in b.documentElement?(k.onTouchStart=O,k.onTouchCancel=O,k.onTouchEnd=O):(k.onMouseDown=F,k.onMouseLeave=O);const D=r?`radio-${h}`:`checkbox-${h}`,S=i||m?[R]:[],U=[...d?[H]:[],...S,...g?["ul-choice-disabled"]:[]],B=o?{"aria-labelledby":`label-${h}`}:{"aria-label":t};return e.u("div",{className:e.cc(e.getClasses("choice",p),...U),id:`choice-div-${h}`,style:{...l,...d?{borderColor:T.ERROR_BORDER_COLOR}:{},...g?{opacity:.5,cursor:"not-allowed"}:{}},...g?{}:k,"aria-disabled":g,children:[e.u("div",{className:e.cc("choice-label-container"),children:[r?e.u("div",{...B,className:e.cc("select-radio",...S),id:D,role:"radio",tabIndex:0}):e.u(P,{disabled:g,divId:D,id:h,isSelected:i,themeColor:n}),o&&e.u("label",{className:e.cc(e.getClasses("select-label",p)),htmlFor:D,id:`label-${h}`,children:o})]}),y&&i&&e.u("div",{className:e.cc("choice-text-entry-container",...S),children:e.u(V,{onTextChange:w=>x({isSelected:i,userText:w}),promptText:C||"Please specify",textValue:c,useMobileStyling:p})})]})},exports.QuestionBodyFooterContainer=({children:t})=>{const n=I(),{isConversationalUI:l}=e.useConfig(o=>({isConversationalUI:o.isConversationalUI}));return e.u("div",{className:e.cc("sprig-question-footer-container",n&&!l?"sprig-border-top":null),children:t})},exports.QuestionBodyWrapper=({children:t})=>e.u("div",{className:"sprig-question-body",children:t}),exports.Select=({isMultiSelect:t=!1,multiselectText:n="choices selected",onChange:l,options:o,placeholderText:i,value:s,disabledOptions:c=[],dropdownFooter:h})=>{const[r,p]=e.h(!1),d=e._(null),{viewDocument:y,update:u,isConversationalUI:C}=e.useConfig(a=>({viewDocument:a.viewDocument,update:a.update,isConversationalUI:a.isConversationalUI})),g=()=>{p(!r)};e.y(()=>{C||u()},[r,C,u]),e.y(()=>{r&&d.current&&d.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[r]),e.p(()=>{var b;const a=m=>{const v=m.target;(v==null?void 0:v.closest(".select-option.ul-choice-disabled"))||p(!1)};y.addEventListener("click",a);try{(b=window.parent)==null||b.addEventListener("click",a)}catch{window.addEventListener("click",a)}return()=>{var m;y.removeEventListener("click",a);try{(m=window.parent)==null||m.removeEventListener("click",a)}catch{window.removeEventListener("click",a)}}},[y]);const f=s.length===0?["select-button-placeholder"]:[];return e.u(e.g,{children:[e.u("button",{"aria-label":"choice dropdown button",className:e.cc("select-button",...f),onClick:a=>{a.stopPropagation(),g()},type:"button",children:[e.u("span",{children:s.length===0?i:s.length===1?s[0].label:`${s.length} ${n}`}),e.u(e.SvgCaret,{})]}),r&&e.u(W,{disabledOptions:c,dropdownFooter:h,options:o,panelRef:d,selectedOptions:s,selectItem:a=>{var v;const b=s.some(x=>x.id===a.id),m=s.some(x=>{var N;return(N=x.optionProperties)==null?void 0:N.noneOfTheAbove});(v=a.optionProperties)!=null&&v.noneOfTheAbove&&!b?l([a]):t?l(b?s.filter(x=>x.id!==a.id):m?[a]:[...s,a]):b||l([a]),t||g()},showCheckbox:t})]})},exports.getAttributedUrl=(t=void 0,n={})=>{if(!t)return t;const l=["http:","https:","itms-apps:","market:"],o=(c=>/^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\//.test(c)?c:`http://${c}`)(t);if(!o)return;try{const c=new URL(o);if(!c.protocol||!l.includes(c.protocol))return}catch{return}const i=[],s=((c,h,r)=>{let p=c;for(const[d,y]of Object.entries(K))if(p.toLowerCase().includes(d))if(h[y]){const u=new RegExp(d,"gi");p=p.replace(u,h[y])}else r.push(d);return p})(o,n,i);return i.length===0?s:((c,h)=>{if(!c.includes("?"))return c;const r=c.slice(0,c.indexOf("?")),p=c.slice(c.indexOf("?")+1).split("&").map(d=>d.split("=")).filter(d=>!h.includes(d[1]));return p.length===0?r:`${r}?${p.map(d=>d.join("=")).join("&")}`})(s,i)},exports.useAutoSize=(t,n)=>{const l=e._(0);return()=>{if(t.current){const o=t.current;o.style.height="1px";const i=o.scrollHeight+(o.offsetHeight-o.clientHeight),s=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),c=i<=s?i:s;l.current!==c&&requestAnimationFrame(()=>{n()}),l.current=c,o.style.height=`${c}px`}}},exports.useSetAllResponsesRaw=t=>{const n=e._(),{setAllResponsesRaw:l}=e.useConfig(o=>({setAllResponsesRaw:o.setAllResponsesRaw}));e.p(()=>{const o=n.current;(!o||Object.keys(t).length!==Object.keys(o).length||Object.keys(t).some(i=>t[i]!==o[i]))&&(l(t),n.current=t)},[t,l])};
@@ -1,193 +0,0 @@
1
- import { a as s, c as C, u as k, F as Z, h as R, p as E, _ as S, d as H, y as Q, b as q, z as _, B as G } from "./view-5-qQQKtl.js";
2
- import { j as J, k as X, l as Y, m as ee, E as j } from "./index-D2UpkOdR.js";
3
- const te = (e) => s("button", { ...e, className: C("ul-card-text__button", e.className), id: "ul-card-text__button" }), oe = ({ html: e, ...o }) => {
4
- const { enableCspTrustedTypes: i } = k((n) => ({ enableCspTrustedTypes: n.enableCspTrustedTypes })), t = Z(() => J(e, i), [i, e]);
5
- return s("div", { ...o, dangerouslySetInnerHTML: { __html: t } });
6
- }, M = () => {
7
- const { viewDocument: e } = k((t) => ({ viewDocument: t.viewDocument })), [o, i] = R(!1);
8
- return E(() => {
9
- const t = e.querySelector(".sprig-question-body"), n = new ResizeObserver(() => {
10
- window.requestAnimationFrame(() => {
11
- i(!!(t && X(t) && t.scrollHeight > t.offsetHeight));
12
- });
13
- });
14
- return t && n.observe(t), () => {
15
- t && n.disconnect();
16
- };
17
- }, [e]), o;
18
- }, A = ({ plainText: e, richText: o, id: i, className: t, isHeader: n, showAsterisk: r }) => o ? s(oe, { className: t, html: o, id: i }) : e ? n ? s("h1", { className: t, id: i, children: [e, r && "*"] }) : s("p", { className: t, id: i, children: e }) : null, ue = ({ message: e, properties: o, isRequired: i }) => {
19
- const t = S(null), n = o == null ? void 0 : o.captionText, r = M();
20
- return s("div", { className: C("question-header-container", "sprig-header-container", r ? "sprig-border-bottom" : null), ref: t, children: [s("div", { className: "question-header-button-container", children: s(A, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: o == null ? void 0 : o.questionHtml, showAsterisk: i }) }), s(A, { className: "ul-caption", id: "ul-caption", plainText: n, richText: o == null ? void 0 : o.captionHtml })] });
21
- }, ne = () => s("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: s("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), pe = ({ isSubmitDisabled: e, handleSubmit: o }) => s("div", { className: "ul-card-longform__submit-button-container", children: s(te, { className: "ul-card-longform__submit-button", disabled: e, onClick: o, children: ["OK ", s(ne, {})] }) }), he = (e, o) => {
22
- const i = S(0);
23
- return () => {
24
- if (e.current) {
25
- const t = e.current;
26
- t.style.height = "1px";
27
- const n = t.scrollHeight + (t.offsetHeight - t.clientHeight), r = parseInt(window.getComputedStyle(t).getPropertyValue("max-height")), a = n <= r ? n : r;
28
- i.current !== a && requestAnimationFrame(() => {
29
- o();
30
- }), i.current = a, t.style.height = `${a}px`;
31
- }
32
- };
33
- }, be = (e) => {
34
- const o = S(), { setAllResponsesRaw: i } = k((t) => ({ setAllResponsesRaw: t.setAllResponsesRaw }));
35
- E(() => {
36
- const t = o.current;
37
- (!t || Object.keys(e).length !== Object.keys(t).length || Object.keys(e).some((n) => e[n] !== t[n])) && (i(e), o.current = e);
38
- }, [e, i]);
39
- }, F = ({ buttonText: e = "View Prototype", handleClick: o }) => s("button", { className: "prototype-button", onClick: o, children: e }, "prototype-btn"), me = ({ embeddedType: e = "prototype", properties: o, children: i }) => {
40
- var y;
41
- const { handleClickEmbedButton: t, hasViewedEmbed: n, headers: r, useDesktopPrototype: a } = k((u) => ({ handleClickEmbedButton: u.handleClickEmbedButton, hasViewedEmbed: u.hasViewedEmbed, headers: u.headers, useDesktopPrototype: u.useDesktopPrototype })), h = (o == null ? void 0 : o.conceptUrl) || ((y = o == null ? void 0 : o.consentDocument) == null ? void 0 : y.url), l = window.innerWidth < ee, p = r["userleap-platform"], d = (u, f) => {
42
- u.preventDefault(), t(f);
43
- };
44
- if ((() => {
45
- const { update: u, index: f, isConversationalUI: v, viewDocument: T } = k(({ update: m, index: b, isConversationalUI: w, viewDocument: g }) => ({ update: m, index: b, isConversationalUI: w, viewDocument: g })), c = Y(u, 100);
46
- E(() => {
47
- if (v) return;
48
- const m = new ResizeObserver(c), b = T.querySelector(".ul-card__container");
49
- return b && m.observe(b, { box: "border-box" }), () => {
50
- m.disconnect();
51
- };
52
- }, [c, u, f, v, T]);
53
- })(), !a && l && !n && h && ["email", "link"].includes(p)) {
54
- if (e === "prototype") return s(F, { handleClick: (u) => {
55
- d(u, "question.prototype.click");
56
- } });
57
- if (e === "pdf") return s(F, { buttonText: (o == null ? void 0 : o.viewDocumentText) || "View Document", handleClick: (u) => {
58
- d(u, "question.agreement.click");
59
- } });
60
- }
61
- return s(H, { children: i });
62
- }, V = ({ isSelected: e, id: o, divId: i, themeColor: t, disabled: n = !1 }) => s("div", { "aria-checked": e, "aria-disabled": n, "aria-labelledby": `label-${o}`, className: "select-checkbox", id: i, role: "checkbox", style: { ...e ? { backgroundColor: t, borderColor: t, boxShadow: "none" } : {}, ...n ? { opacity: 0.5 } : {} }, tabIndex: n ? -1 : 0, children: e && s(Q, {}) }), ve = ({ ariaLabel: e, border: o, choiceStyle: i = {}, label: t, isSelected: n, value: r, text: a, id: h, isRadio: l, useMobileStyling: p, error: d, allowTextEntry: y, noneOfTheAbove: u, promptText: f, disabled: v = !1, onUserInputChanged: T }) => {
63
- const { styleNonce: c, viewDocument: m } = k((x) => ({ styleNonce: x.styleNonce, viewDocument: x.viewDocument })), [b, w] = R(!1);
64
- ie(m, o, c);
65
- const g = ({ isSelected: x, userText: I }) => {
66
- T && T({ id: h, selected: x, value: r, userText: I, noneOfTheAbove: u });
67
- }, D = (x) => {
68
- v || (x.stopPropagation(), g({ isSelected: l || !n, userText: a }), w(!1));
69
- }, z = () => {
70
- b || w(!0);
71
- }, O = () => {
72
- b && w(!1);
73
- }, N = { onClick: (x) => D(x), onKeyPress: (x) => ((I) => {
74
- v || I.key !== "Enter" && I.key !== " " || D(I);
75
- })(x) };
76
- "ontouchstart" in m.documentElement ? (N.onTouchStart = O, N.onTouchCancel = O, N.onTouchEnd = O) : (N.onMouseDown = z, N.onMouseLeave = O);
77
- const L = l ? `radio-${h}` : `checkbox-${h}`, P = n || b ? [$] : [], K = [...d ? [B] : [], ...P, ...v ? ["ul-choice-disabled"] : []], W = t ? { "aria-labelledby": `label-${h}` } : { "aria-label": e };
78
- return s("div", { className: C(q("choice", p), ...K), id: `choice-div-${h}`, style: { ...i, ...d ? { borderColor: j } : {}, ...v ? { opacity: 0.5, cursor: "not-allowed" } : {} }, ...v ? {} : N, "aria-disabled": v, children: [s("div", { className: C("choice-label-container"), children: [l ? s("div", { ...W, className: C("select-radio", ...P), id: L, role: "radio", tabIndex: 0 }) : s(V, { disabled: v, divId: L, id: h, isSelected: n, themeColor: o }), t && s("label", { className: C(q("select-label", p)), htmlFor: L, id: `label-${h}`, children: t })] }), y && n && s("div", { className: C("choice-text-entry-container", ...P), children: s(se, { onTextChange: (x) => g({ isSelected: n, userText: x }), promptText: f || "Please specify", textValue: a, useMobileStyling: p }) })] });
79
- }, se = ({ promptText: e, textValue: o, onTextChange: i, useMobileStyling: t }) => {
80
- const n = S(null);
81
- return E(() => {
82
- n.current && n.current.focus();
83
- }, []), s("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: C(q("choice-text-input", t)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (r) => {
84
- r.stopPropagation(), i(r.currentTarget.value);
85
- }, onClick: (r) => {
86
- r.stopPropagation();
87
- }, onKeyPress: (r) => {
88
- r.stopPropagation();
89
- }, placeholder: e, ref: n, role: "textbox", rows: 1, value: o });
90
- }, U = "ul-select-style-element", $ = "ul-select-active-dynamic-style", B = "ul-select-error-dynamic-style", ie = (e, o, i) => {
91
- let t = e.getElementById(U), n = !1;
92
- t || (t = e.createElement("style"), n = !0), t.tagName.toLowerCase() === "style" && (t.id = U, i && (t.nonce = i), t.textContent = re(o), n && e.head.appendChild(t));
93
- }, re = (e) => `
94
- .${$} {
95
- border-color: ${e};
96
- }
97
- .${$} .select-radio, .${$}.select-radio {
98
- border: 6px solid ${e};
99
- box-shadow: none;
100
- }
101
- .${B} {
102
- border-color: ${j};
103
- }
104
- `, we = ({ children: e }) => s("div", { className: "sprig-question-body", children: e }), xe = ({ children: e }) => {
105
- const o = M(), { isConversationalUI: i } = k((t) => ({ isConversationalUI: t.isConversationalUI }));
106
- return s("div", { className: C("sprig-question-footer-container", o && !i ? "sprig-border-top" : null), children: e });
107
- }, le = ({ options: e, selectItem: o, selectedOptions: i, showCheckbox: t, disabledOptions: n, dropdownFooter: r, panelRef: a }) => {
108
- const { themeColor: h } = k((l) => ({ doc: l.viewDocument, themeColor: l.border }));
109
- return s("div", { className: "select-list", ref: a, children: [e.map((l) => {
110
- return s("div", { "aria-disabled": n == null ? void 0 : n.includes(l), className: C("select-option", n != null && n.includes(l) ? "ul-choice-disabled" : ""), onClick: (d) => {
111
- n != null && n.includes(l) || (o(l), d.stopPropagation());
112
- }, role: "option", style: { ...n != null && n.includes(l) ? { opacity: 0.5, cursor: "not-allowed" } : {} }, children: [t && s(V, { divId: (p = l.id, `checkbox-div-${p}`), id: l.id, isSelected: i.includes(l), themeColor: h }), l.label] }, l.id);
113
- var p;
114
- }), r] });
115
- }, ye = ({ isMultiSelect: e = !1, multiselectText: o = "choices selected", onChange: i, options: t, placeholderText: n, value: r, disabledOptions: a = [], dropdownFooter: h }) => {
116
- const [l, p] = R(!1), d = S(null), { viewDocument: y, update: u, isConversationalUI: f } = k((c) => ({ viewDocument: c.viewDocument, update: c.update, isConversationalUI: c.isConversationalUI })), v = () => {
117
- p(!l);
118
- };
119
- _(() => {
120
- f || u();
121
- }, [l, f, u]), _(() => {
122
- l && d.current && d.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
123
- }, [l]), E(() => {
124
- var m;
125
- const c = (b) => {
126
- const w = b.target;
127
- (w == null ? void 0 : w.closest(".select-option.ul-choice-disabled")) || p(!1);
128
- };
129
- y.addEventListener("click", c);
130
- try {
131
- (m = window.parent) == null || m.addEventListener("click", c);
132
- } catch {
133
- window.addEventListener("click", c);
134
- }
135
- return () => {
136
- var b;
137
- y.removeEventListener("click", c);
138
- try {
139
- (b = window.parent) == null || b.removeEventListener("click", c);
140
- } catch {
141
- window.removeEventListener("click", c);
142
- }
143
- };
144
- }, [y]);
145
- const T = r.length === 0 ? ["select-button-placeholder"] : [];
146
- return s(H, { children: [s("button", { "aria-label": "choice dropdown button", className: C("select-button", ...T), onClick: (c) => {
147
- c.stopPropagation(), v();
148
- }, type: "button", children: [s("span", { children: r.length === 0 ? n : r.length === 1 ? r[0].label : `${r.length} ${o}` }), s(G, {})] }), l && s(le, { disabledOptions: a, dropdownFooter: h, options: t, panelRef: d, selectedOptions: r, selectItem: (c) => {
149
- var w;
150
- const m = r.some((g) => g.id === c.id), b = r.some((g) => {
151
- var D;
152
- return (D = g.optionProperties) == null ? void 0 : D.noneOfTheAbove;
153
- });
154
- (w = c.optionProperties) != null && w.noneOfTheAbove && !m ? i([c]) : e ? i(m ? r.filter((g) => g.id !== c.id) : b ? [c] : [...r, c]) : m || i([c]), e || v();
155
- }, showCheckbox: e })] });
156
- }, ae = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, ge = (e = void 0, o = {}) => {
157
- if (!e) return e;
158
- const i = ["http:", "https:", "itms-apps:", "market:"], t = ((a) => /^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\//.test(a) ? a : `http://${a}`)(e);
159
- if (!t) return;
160
- try {
161
- const a = new URL(t);
162
- if (!a.protocol || !i.includes(a.protocol)) return;
163
- } catch {
164
- return;
165
- }
166
- const n = [], r = ((a, h, l) => {
167
- let p = a;
168
- for (const [d, y] of Object.entries(ae)) if (p.toLowerCase().includes(d)) if (h[y]) {
169
- const u = new RegExp(d, "gi");
170
- p = p.replace(u, h[y]);
171
- } else l.push(d);
172
- return p;
173
- })(t, o, n);
174
- return n.length === 0 ? r : ((a, h) => {
175
- if (!a.includes("?")) return a;
176
- const l = a.slice(0, a.indexOf("?")), p = a.slice(a.indexOf("?") + 1).split("&").map((d) => d.split("=")).filter((d) => !h.includes(d[1]));
177
- return p.length === 0 ? l : `${l}?${p.map((d) => d.join("=")).join("&")}`;
178
- })(r, n);
179
- };
180
- export {
181
- te as B,
182
- ue as H,
183
- pe as L,
184
- me as M,
185
- ve as O,
186
- we as Q,
187
- ye as S,
188
- oe as a,
189
- xe as b,
190
- be as c,
191
- ge as g,
192
- he as u
193
- };