@sprig-technologies/sprig-bundled 2.40.3 → 2.40.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-IVflCEcd.cjs"),W=require("./index-B0SmBCWR.cjs"),E=require("./getAttributedUrl-C_nBQU9-.cjs"),re="https://cdn.sprig.com",_={document:void 0,videojs:void 0},xe=n=>n+"-loading-spiner",Z="hidden",je=".m3u8",ve="questionId",me="ul-video-recorder-camera-off-button",ge="ul-recording-in-session",Ye=[{type:"link",content:`${re}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${re}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${re}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${re}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${re}/userleap-web-upchunk-v2.2.2.js`}],Me=[{type:"link",content:`${re}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${re}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:`/* progress control styles */
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-qSJv2aM9.cjs"),W=require("./index-m2P75rlk.cjs"),E=require("./getAttributedUrl-DrWRiV-q.cjs"),re="https://cdn.sprig.com",_={document:void 0,videojs:void 0},xe=n=>n+"-loading-spiner",Z="hidden",je=".m3u8",ve="questionId",me="ul-video-recorder-camera-off-button",ge="ul-recording-in-session",Ye=[{type:"link",content:`${re}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${re}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${re}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${re}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${re}/userleap-web-upchunk-v2.2.2.js`}],Me=[{type:"link",content:`${re}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${re}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:`/* progress control styles */
2
2
  .video-js .vjs-control {
3
3
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
4
4
  }
@@ -1,6 +1,6 @@
1
- import { u as z, a as e, h as G, c as A, g as K, b as re, d as Me, p as ue, F as fe, _ as se, T as be, A as yn, e as Be, f as Cn, i as xn, j as kn, w as en, k as wn } from "./view-CwyS6VJ8.js";
2
- import { v as En, E as Ie, h as qe, A as Ue, j as jn, i as nn } from "./index-B-1ZVEfz.js";
3
- import { B as oe, M as ie, Q as le, O as Oe, a as de, b as Ce, S as In, L as Tn, u as _n, H as ye, c as Ae, g as Dn, P as Sn } from "./getAttributedUrl-B28r1ayG.js";
1
+ import { u as z, a as e, h as G, c as A, g as K, b as re, d as Me, p as ue, F as fe, _ as se, T as be, A as yn, e as Be, f as Cn, i as xn, j as kn, w as en, k as wn } from "./view-DBZAWIZk.js";
2
+ import { v as En, E as Ie, h as qe, A as Ue, j as jn, i as nn } from "./index-BOM0UM95.js";
3
+ import { B as oe, M as ie, Q as le, O as Oe, a as de, b as Ce, S as In, L as Tn, u as _n, H as ye, c as Ae, g as Dn, P as Sn } from "./getAttributedUrl-JvKOyftG.js";
4
4
  const pe = "https://cdn.sprig.com", I = { document: void 0, videojs: void 0 }, He = (n) => n + "-loading-spiner", W = "hidden", ze = ".m3u8", Te = "questionId", _e = "ul-video-recorder-camera-off-button", De = "ul-recording-in-session", Pn = [{ type: "link", content: `${pe}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${pe}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${pe}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${pe}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${pe}/userleap-web-upchunk-v2.2.2.js` }], tn = [{ type: "link", content: `${pe}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${pe}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
5
5
  .video-js .vjs-control {
6
6
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./view-IVflCEcd.cjs"),k=require("./index-B0SmBCWR.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...i})=>{const{enableCspTrustedTypes:r}=e.useConfig(n=>({enableCspTrustedTypes:n.enableCspTrustedTypes})),o=e.F(()=>k.getHtml(t,r),[r,t]);return e.u("div",{...i,dangerouslySetInnerHTML:{__html:o}})},L=()=>{const{viewDocument:t}=e.useConfig(o=>({viewDocument:o.viewDocument})),[i,r]=e.h(!1);return e.p(()=>{const o=t.querySelector(".sprig-question-body"),n=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{r(!!(o&&k.isHTMLElement(o)&&o.scrollHeight>o.offsetHeight))})});return o&&n.observe(o),()=>{o&&n.disconnect()}},[t]),i},R=({plainText:t,richText:i,id:r,className:o,isHeader:n,showAsterisk:c})=>i?e.u(q,{className:o,html:i,id:r}):t?n?e.u("h1",{className:o,id:r,children:[t,c&&"*"]}):e.u("p",{className:o,id:r,children:t}):null,j=()=>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"})}),M=(t,i)=>{const r=e._(0);return()=>{if(t.current){const o=t.current;o.style.height="1px";const n=o.scrollHeight+(o.offsetHeight-o.clientHeight),c=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),s=n<=c?n:c;r.current!==s&&requestAnimationFrame(()=>{i()}),r.current=s,o.style.height=`${s}px`}}},U=({buttonText:t="View Prototype",handleClick:i})=>e.u("button",{className:"prototype-button",onClick:i,children:t},"prototype-btn"),P=({isSelected:t,id:i,divId:r,themeColor:o,disabled:n=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":n,"aria-labelledby":`label-${i}`,className:"select-checkbox",id:r,role:"checkbox",style:{...t?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},...n?{opacity:.5}:{}},tabIndex:n?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:i,onTextChange:r,useMobileStyling:o})=>{const n=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),s=M(n,()=>c());return e.p(()=>(s(),n.current&&n.current.focus(),()=>{c()}),[]),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:l=>{s(),l.stopPropagation(),r(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:n,role:"textbox",rows:1,value:i})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,i,r)=>{let o=t.getElementById($),n=!1;o||(o=t.createElement("style"),n=!0),o.tagName.toLowerCase()==="style"&&(o.id=$,r&&(o.nonce=r),o.textContent=X(i),n&&t.head.appendChild(o))},X=t=>`
1
+ "use strict";const e=require("./view-qSJv2aM9.cjs"),k=require("./index-m2P75rlk.cjs"),_=t=>e.u("button",{...t,className:e.cc("ul-card-text__button",t.className),id:"ul-card-text__button"}),q=({html:t,...i})=>{const{enableCspTrustedTypes:r}=e.useConfig(n=>({enableCspTrustedTypes:n.enableCspTrustedTypes})),o=e.F(()=>k.getHtml(t,r),[r,t]);return e.u("div",{...i,dangerouslySetInnerHTML:{__html:o}})},L=()=>{const{viewDocument:t}=e.useConfig(o=>({viewDocument:o.viewDocument})),[i,r]=e.h(!1);return e.p(()=>{const o=t.querySelector(".sprig-question-body"),n=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{r(!!(o&&k.isHTMLElement(o)&&o.scrollHeight>o.offsetHeight))})});return o&&n.observe(o),()=>{o&&n.disconnect()}},[t]),i},R=({plainText:t,richText:i,id:r,className:o,isHeader:n,showAsterisk:c})=>i?e.u(q,{className:o,html:i,id:r}):t?n?e.u("h1",{className:o,id:r,children:[t,c&&"*"]}):e.u("p",{className:o,id:r,children:t}):null,j=()=>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"})}),M=(t,i)=>{const r=e._(0);return()=>{if(t.current){const o=t.current;o.style.height="1px";const n=o.scrollHeight+(o.offsetHeight-o.clientHeight),c=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),s=n<=c?n:c;r.current!==s&&requestAnimationFrame(()=>{i()}),r.current=s,o.style.height=`${s}px`}}},U=({buttonText:t="View Prototype",handleClick:i})=>e.u("button",{className:"prototype-button",onClick:i,children:t},"prototype-btn"),P=({isSelected:t,id:i,divId:r,themeColor:o,disabled:n=!1})=>e.u("div",{"aria-checked":t,"aria-disabled":n,"aria-labelledby":`label-${i}`,className:"select-checkbox",id:r,role:"checkbox",style:{...t?{backgroundColor:o,borderColor:o,boxShadow:"none"}:{},...n?{opacity:.5}:{}},tabIndex:n?-1:0,children:t&&e.u(e.SvgCheckmark,{})}),W=({promptText:t,textValue:i,onTextChange:r,useMobileStyling:o})=>{const n=e._(null),{update:c}=e.useConfig(l=>({update:l.update})),s=M(n,()=>c());return e.p(()=>(s(),n.current&&n.current.focus(),()=>{c()}),[]),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:l=>{s(),l.stopPropagation(),r(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:t,ref:n,role:"textbox",rows:1,value:i})},$="ul-select-style-element",O="ul-select-active-dynamic-style",A="ul-select-error-dynamic-style",K=(t,i,r)=>{let o=t.getElementById($),n=!1;o||(o=t.createElement("style"),n=!0),o.tagName.toLowerCase()==="style"&&(o.id=$,r&&(o.nonce=r),o.textContent=X(i),n&&t.head.appendChild(o))},X=t=>`
2
2
  .${O} {
3
3
  border-color: ${t};
4
4
  }
@@ -1,5 +1,5 @@
1
- import { a as s, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, r as X, g as $, y as Z, s as Q } from "./view-CwyS6VJ8.js";
2
- import { j as G, k as J, l as Y, m as ee, E as M } from "./index-B-1ZVEfz.js";
1
+ import { a as s, c as y, u as C, F as W, h as U, p as O, _ as P, e as H, r as X, g as $, y as Z, s as Q } from "./view-DBZAWIZk.js";
2
+ import { j as G, k as J, l as Y, m as ee, E as M } from "./index-BOM0UM95.js";
3
3
  const te = (e) => s("button", { ...e, className: y("ul-card-text__button", e.className), id: "ul-card-text__button" }), oe = ({ html: e, ...i }) => {
4
4
  const { enableCspTrustedTypes: r } = C((o) => ({ enableCspTrustedTypes: o.enableCspTrustedTypes })), t = W(() => G(e, r), [r, e]);
5
5
  return s("div", { ...i, dangerouslySetInnerHTML: { __html: t } });
@@ -6029,7 +6029,7 @@ const Tf = (e) => e._config && e._config.installationMethod ? e._config.installa
6029
6029
  ru = !0, nu = e;
6030
6030
  };
6031
6031
  function Te(e = {}) {
6032
- const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.40.3", "x-ul-installation-method": Tf(e), "sprig-modules": Mf(), "x-ul-package-version": "2.40.3" };
6032
+ const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.40.4", "x-ul-installation-method": Tf(e), "sprig-modules": Mf(), "x-ul-package-version": "2.40.4" };
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 (w.installationMethod === "web-npm" || w.installationMethod === "web-npm-bundled") {
6161
- const { default: V } = await import("./view-CwyS6VJ8.js").then((ge) => ge.v);
6161
+ const { default: V } = await import("./view-DBZAWIZk.js").then((ge) => ge.v);
6162
6162
  V.configure(w), S && window.UserLeap.container && O();
6163
6163
  } else U && (j.src = `${U}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, S && j.addEventListener("load", () => {
6164
6164
  window.UserLeap.container && O();
@@ -6979,7 +6979,7 @@ function og(e = {}) {
6979
6979
  var m;
6980
6980
  await ze(Me("1", [ot], "metrics"), { body: I, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = re.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
6981
6981
  } }), !c) {
6982
- const I = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.40.3", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
6982
+ const I = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.40.4", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
6983
6983
  await ((v = re.replay) == null ? void 0 : v.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: I })), so = u.replaySettings;
6984
6984
  }
6985
6985
  sg(u), await ng(u), window.UserLeap._queue.unpause(), (p = window.SprigLoggerCallback) == null || p.call(window, "SdkReady"), z.emit(B.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), z.emit(B.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), z.on(B.VisitorIDUpdated, () => {
@@ -1,6 +1,6 @@
1
- import { u as j, h as Z, a as e, c as B, g as K, d as Qe, F as pe, e as ge, b as ce, _ as J, T as Se, A as Xe, p as ee, f as Je, l as er, q as rr, M as ae, m as tr, n as nr, S as ir, o as sr, i as ar, j as lr, k as Me } from "./view-CwyS6VJ8.js";
2
- import { i as re, E as _e, h as we, j as Ee, A as or } from "./index-B-1ZVEfz.js";
3
- import { c as te, a as ie, H as ve, M as de, Q as oe, O as me, B as z, L as be, b as ye, S as dr, u as cr, g as ur, P as pr } from "./getAttributedUrl-B28r1ayG.js";
1
+ import { u as j, h as Z, a as e, c as B, g as K, d as Qe, F as pe, e as ge, b as ce, _ as J, T as Se, A as Xe, p as ee, f as Je, l as er, q as rr, M as ae, m as tr, n as nr, S as ir, o as sr, i as ar, j as lr, k as Me } from "./view-DBZAWIZk.js";
2
+ import { i as re, E as _e, h as we, j as Ee, A as or } from "./index-BOM0UM95.js";
3
+ import { c as te, a as ie, H as ve, M as de, Q as oe, O as me, B as z, L as be, b as ye, S as dr, u as cr, g as ur, P as pr } from "./getAttributedUrl-JvKOyftG.js";
4
4
  const mr = ({ className: t, message: i, next: o, properties: r, questionId: n, type: l }) => {
5
5
  const { useMobileStyling: h, border: b, isLongFormSurvey: d, focusedQuestionId: g } = j((u) => ({ useMobileStyling: u.useMobileStyling, border: u.border, isLongFormSurvey: re(u.studyType), focusedQuestionId: u.focusedQuestionId })), [a, m] = Z(!1), [s, x] = Z(""), [p, S] = Z(!1), v = d && g === n, w = r == null ? void 0 : r.collectName, T = (r == null ? void 0 : r.nameLabelText) || "Full Name", q = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", F = (r == null ? void 0 : r.submitButtonText) || "Submit", M = !!s.trim(), R = a && (!w || M), P = (u, I = !1) => {
6
6
  u.preventDefault(), u.stopPropagation();