@appcues/web-sdk 7.17.2 → 7.17.3

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.
Files changed (15) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/{index.BgmU7Ys3.js → index.2UbNv10n.js} +1 -1
  3. package/build/{index.DfBmy9bf.js → index.CB8C7s2e.js} +702 -692
  4. package/build/{index.npm.DAyeX4RX.js → index.npm.BMQjHmXS.js} +1 -1
  5. package/build/index.npm.js +1 -1
  6. package/build/{open-builder.BvFjsGSd.js → open-builder.2-hPcUkT.js} +219 -212
  7. package/package.json +1 -1
  8. /package/build/{checklist.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → checklist.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  9. /package/build/{container.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → container.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  10. /package/build/{debugger.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → debugger.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  11. /package/build/{modal-step-legacy-render.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → modal-step-legacy-render.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  12. /package/build/{modal.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → modal.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  13. /package/build/{satisfaction-survey.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → satisfaction-survey.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  14. /package/build/{test-mode.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → test-mode.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
  15. /package/build/{tooltip.43ebd3b611a51702154cfc2bc5282a4363505e1f.css → tooltip.ebcf73e8054b4bbbc37ae0749b569addd92bbd12.css} +0 -0
@@ -6800,48 +6800,55 @@ const Ed = /* @__PURE__ */ Oe(bd), Qa = "data-interaction-style", xd = (t) => t.
6800
6800
  t ? e() : n.dismissExperience();
6801
6801
  };
6802
6802
  ae(Cd, Od);
6803
- const Ad = "@appcues/redirectTo", Nd = ({ url: t = "", openInNewWindow: e = !1 } = {}, { reportError: n, getWindowReference: r }) => {
6803
+ const Ad = "@appcues/redirectTo";
6804
+ function Nd(t, e) {
6805
+ if (/^https?:\/\//i.test(e))
6806
+ return e;
6807
+ try {
6808
+ return new URL(e, t.location.origin).href;
6809
+ } catch {
6810
+ return e;
6811
+ }
6812
+ }
6813
+ const Id = ({ url: t = "", openInNewWindow: e = !1 } = {}, { reportError: n, getWindowReference: r }) => {
6804
6814
  if (!t) {
6805
6815
  n("Can't redirect to undefined URL");
6806
6816
  return;
6807
6817
  }
6808
- r().open(
6809
- t,
6810
- e ? "_blank" : "_self",
6811
- "noopener"
6812
- );
6818
+ const o = r(), i = Nd(o, t);
6819
+ o.open(i, e ? "_blank" : "_self", "noopener");
6813
6820
  };
6814
- ae(Ad, Nd);
6815
- const Id = "@appcues/trackEvent", jd = ({ name: t, properties: e = {} }, { sendCustomEvent: n }) => {
6821
+ ae(Ad, Id);
6822
+ const jd = "@appcues/trackEvent", Pd = ({ name: t, properties: e = {} }, { sendCustomEvent: n }) => {
6816
6823
  n(t, e);
6817
6824
  };
6818
- ae(Id, jd);
6819
- const Pd = "@appcues/triggerFlow", Dd = ({ flowId: t, url: e, prefetch: n = !1 } = {}, { showFlow: r }) => {
6825
+ ae(jd, Pd);
6826
+ const Dd = "@appcues/triggerFlow", Hd = ({ flowId: t, url: e, prefetch: n = !1 } = {}, { showFlow: r }) => {
6820
6827
  r({ flowId: t, url: e, prefetch: n });
6821
6828
  };
6822
- ae(Pd, Dd);
6823
- const Hd = (t) => Object.keys(t).length === 0, Ld = (t) => t === "date.now" ? Date.now() : null, $d = (t) => typeof t == "string" && t.startsWith("{") && t.endsWith("}"), Md = (t) => Object.entries(t).reduce((e, [n, r]) => {
6824
- if ($d(r)) {
6825
- const o = r.slice(1, -1), i = Ld(o);
6829
+ ae(Dd, Hd);
6830
+ const Ld = (t) => Object.keys(t).length === 0, $d = (t) => t === "date.now" ? Date.now() : null, Md = (t) => typeof t == "string" && t.startsWith("{") && t.endsWith("}"), Vd = (t) => Object.entries(t).reduce((e, [n, r]) => {
6831
+ if (Md(r)) {
6832
+ const o = r.slice(1, -1), i = $d(o);
6826
6833
  return { ...e, [n]: i ?? r };
6827
6834
  }
6828
6835
  return { ...e, [n]: r };
6829
- }, {}), Vd = "@appcues/setUserProperties", Fd = (t, { updateUserProfile: e }) => {
6830
- if (!Hd(t)) {
6831
- const n = Md(t);
6836
+ }, {}), Fd = "@appcues/setUserProperties", Wd = (t, { updateUserProfile: e }) => {
6837
+ if (!Ld(t)) {
6838
+ const n = Vd(t);
6832
6839
  e(n);
6833
6840
  }
6834
6841
  };
6835
- ae(Vd, Fd);
6836
- const Wd = "@appcues/toggleActions", zd = ({ actions: t = [], target: e } = {}, n) => {
6842
+ ae(Fd, Wd);
6843
+ const zd = "@appcues/toggleActions", Ud = ({ actions: t = [], target: e } = {}, n) => {
6837
6844
  const r = n.querySelector(e.selector);
6838
6845
  r.length !== 0 && t.forEach((o) => {
6839
6846
  const i = `toggleActions_${o.id}`, a = n.getAction(o.type), [s] = r, c = !s.getAttribute(i);
6840
6847
  a && c && (a(o.config, n), s.setAttribute(i, !0)), c || s.removeAttribute(i);
6841
6848
  });
6842
6849
  };
6843
- ae(Wd, zd);
6844
- const Ud = /([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g, Ci = /^([a-zA-Z]{2,3}|[a-zA-Z]{5,8})(-[a-zA-Z]{4})?(-(?:[a-zA-Z]{2}|\d{3}))?(-(?:[a-zA-Z\d]{5,8}|\d[a-zA-Z\d]{3}))?$/;
6850
+ ae(zd, Ud);
6851
+ const Bd = /([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g, Ci = /^([a-zA-Z]{2,3}|[a-zA-Z]{5,8})(-[a-zA-Z]{4})?(-(?:[a-zA-Z]{2}|\d{3}))?(-(?:[a-zA-Z\d]{5,8}|\d[a-zA-Z\d]{3}))?$/;
6845
6852
  class Re {
6846
6853
  // eslint-disable-line consistent-this
6847
6854
  /**
@@ -6860,7 +6867,7 @@ class Re {
6860
6867
  * @returns {null|undefined|string}
6861
6868
  */
6862
6869
  static _escapeRegExpPattern(e) {
6863
- return typeof e != "string" ? e : e.replace(Ud, "\\$1");
6870
+ return typeof e != "string" ? e : e.replace(Bd, "\\$1");
6864
6871
  }
6865
6872
  /**
6866
6873
  * @param {string|null} [str]
@@ -7210,8 +7217,8 @@ Re._BIDI_RTL_LANGS = [
7210
7217
  "zdj"
7211
7218
  // Comorian, Ngazidja
7212
7219
  ];
7213
- const Bd = "@appcues/content-direction";
7214
- function qd(t) {
7220
+ const qd = "@appcues/content-direction";
7221
+ function Xd(t) {
7215
7222
  try {
7216
7223
  return new Re(t).textInfo;
7217
7224
  } catch {
@@ -7219,26 +7226,26 @@ function qd(t) {
7219
7226
  }
7220
7227
  }
7221
7228
  const Oi = ({ updateRootStyle: t, getTraitConfig: e }) => {
7222
- const n = navigator.languages ? navigator.languages[0] : navigator.language || navigator.userLanguage, { currentLanguage: r = n, forceDirection: o = null } = e(), i = qd(r);
7229
+ const n = navigator.languages ? navigator.languages[0] : navigator.language || navigator.userLanguage, { currentLanguage: r = n, forceDirection: o = null } = e(), i = Xd(r);
7223
7230
  t(
7224
7231
  {
7225
7232
  direction: o ?? i.direction
7226
7233
  },
7227
7234
  { forceUpdate: !0 }
7228
7235
  );
7229
- }, Xd = ({ addHook: t }) => {
7236
+ }, Gd = ({ addHook: t }) => {
7230
7237
  t("step.begin", Oi), t("step.container_change", Oi);
7231
7238
  };
7232
- St(Bd, Xd);
7239
+ St(qd, Gd);
7233
7240
  const os = ["top", "right", "bottom", "left"], Ai = ["start", "end"], Ni = /* @__PURE__ */ os.reduce((t, e) => t.concat(e, e + "-" + Ai[0], e + "-" + Ai[1]), []), Tn = Math.min, ze = Math.max, cr = Math.round, Zt = (t) => ({
7234
7241
  x: t,
7235
7242
  y: t
7236
- }), Gd = {
7243
+ }), Zd = {
7237
7244
  left: "right",
7238
7245
  right: "left",
7239
7246
  bottom: "top",
7240
7247
  top: "bottom"
7241
- }, Zd = {
7248
+ }, Jd = {
7242
7249
  start: "end",
7243
7250
  end: "start"
7244
7251
  };
@@ -7260,26 +7267,26 @@ function is(t) {
7260
7267
  function _o(t) {
7261
7268
  return t === "y" ? "height" : "width";
7262
7269
  }
7263
- const Jd = /* @__PURE__ */ new Set(["top", "bottom"]);
7270
+ const Qd = /* @__PURE__ */ new Set(["top", "bottom"]);
7264
7271
  function wr(t) {
7265
- return Jd.has(en(t)) ? "y" : "x";
7272
+ return Qd.has(en(t)) ? "y" : "x";
7266
7273
  }
7267
7274
  function To(t) {
7268
7275
  return is(wr(t));
7269
7276
  }
7270
- function Qd(t, e, n) {
7277
+ function Kd(t, e, n) {
7271
7278
  n === void 0 && (n = !1);
7272
7279
  const r = re(t), o = To(t), i = _o(o);
7273
7280
  let a = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
7274
7281
  return e.reference[i] > e.floating[i] && (a = Ii(a)), [a, Ii(a)];
7275
7282
  }
7276
- function Kd(t) {
7277
- return t.replace(/start|end/g, (e) => Zd[e]);
7283
+ function Yd(t) {
7284
+ return t.replace(/start|end/g, (e) => Jd[e]);
7278
7285
  }
7279
7286
  function Ii(t) {
7280
- return t.replace(/left|right|bottom|top/g, (e) => Gd[e]);
7287
+ return t.replace(/left|right|bottom|top/g, (e) => Zd[e]);
7281
7288
  }
7282
- function Yd(t) {
7289
+ function tp(t) {
7283
7290
  return {
7284
7291
  top: 0,
7285
7292
  right: 0,
@@ -7289,7 +7296,7 @@ function Yd(t) {
7289
7296
  };
7290
7297
  }
7291
7298
  function as(t) {
7292
- return typeof t != "number" ? Yd(t) : {
7299
+ return typeof t != "number" ? tp(t) : {
7293
7300
  top: t,
7294
7301
  right: t,
7295
7302
  bottom: t,
@@ -7362,7 +7369,7 @@ function ji(t, e, n) {
7362
7369
  }
7363
7370
  return h;
7364
7371
  }
7365
- const tp = async (t, e, n) => {
7372
+ const ep = async (t, e, n) => {
7366
7373
  const {
7367
7374
  placement: r = "bottom",
7368
7375
  strategy: o = "absolute",
@@ -7468,7 +7475,7 @@ async function lr(t, e) {
7468
7475
  right: (k.right - b.right + p.right) / w.x
7469
7476
  };
7470
7477
  }
7471
- const ep = (t) => ({
7478
+ const np = (t) => ({
7472
7479
  name: "arrow",
7473
7480
  options: t,
7474
7481
  async fn(e) {
@@ -7506,10 +7513,10 @@ const ep = (t) => ({
7506
7513
  };
7507
7514
  }
7508
7515
  });
7509
- function np(t, e, n) {
7510
- return (t ? [...n.filter((r) => re(r) === t), ...n.filter((r) => re(r) !== t)] : n.filter((r) => en(r) === r)).filter((r) => t ? re(r) === t || (e ? Kd(r) !== r : !1) : !0);
7516
+ function rp(t, e, n) {
7517
+ return (t ? [...n.filter((r) => re(r) === t), ...n.filter((r) => re(r) !== t)] : n.filter((r) => en(r) === r)).filter((r) => t ? re(r) === t || (e ? Yd(r) !== r : !1) : !0);
7511
7518
  }
7512
- const rp = function(t) {
7519
+ const op = function(t) {
7513
7520
  return t === void 0 && (t = {}), {
7514
7521
  name: "autoPlacement",
7515
7522
  options: t,
@@ -7527,10 +7534,10 @@ const rp = function(t) {
7527
7534
  allowedPlacements: u = Ni,
7528
7535
  autoAlignment: h = !0,
7529
7536
  ...p
7530
- } = tn(t, e), v = l !== void 0 || u === Ni ? np(l || null, h, u) : u, b = await lr(e, p), E = ((n = a.autoPlacement) == null ? void 0 : n.index) || 0, g = v[E];
7537
+ } = tn(t, e), v = l !== void 0 || u === Ni ? rp(l || null, h, u) : u, b = await lr(e, p), E = ((n = a.autoPlacement) == null ? void 0 : n.index) || 0, g = v[E];
7531
7538
  if (g == null)
7532
7539
  return {};
7533
- const w = Qd(g, i, await (c.isRTL == null ? void 0 : c.isRTL(f.floating)));
7540
+ const w = Kd(g, i, await (c.isRTL == null ? void 0 : c.isRTL(f.floating)));
7534
7541
  if (s !== g)
7535
7542
  return {
7536
7543
  reset: {
@@ -7589,7 +7596,7 @@ function Pi(t, e) {
7589
7596
  function Di(t) {
7590
7597
  return os.some((e) => t[e] >= 0);
7591
7598
  }
7592
- const op = function(t) {
7599
+ const ip = function(t) {
7593
7600
  return t === void 0 && (t = {}), {
7594
7601
  name: "hide",
7595
7602
  options: t,
@@ -7630,13 +7637,13 @@ const op = function(t) {
7630
7637
  }
7631
7638
  }
7632
7639
  };
7633
- }, ip = /* @__PURE__ */ new Set(["left", "top"]);
7634
- async function ap(t, e) {
7640
+ }, ap = /* @__PURE__ */ new Set(["left", "top"]);
7641
+ async function sp(t, e) {
7635
7642
  const {
7636
7643
  placement: n,
7637
7644
  platform: r,
7638
7645
  elements: o
7639
- } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = en(n), s = re(n), c = wr(n) === "y", f = ip.has(a) ? -1 : 1, y = i && c ? -1 : 1, l = tn(e, t);
7646
+ } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = en(n), s = re(n), c = wr(n) === "y", f = ap.has(a) ? -1 : 1, y = i && c ? -1 : 1, l = tn(e, t);
7640
7647
  let {
7641
7648
  mainAxis: u,
7642
7649
  crossAxis: h,
@@ -7658,7 +7665,7 @@ async function ap(t, e) {
7658
7665
  y: h * y
7659
7666
  };
7660
7667
  }
7661
- const sp = function(t) {
7668
+ const cp = function(t) {
7662
7669
  return t === void 0 && (t = 0), {
7663
7670
  name: "offset",
7664
7671
  options: t,
@@ -7669,7 +7676,7 @@ const sp = function(t) {
7669
7676
  y: i,
7670
7677
  placement: a,
7671
7678
  middlewareData: s
7672
- } = e, c = await ap(e, t);
7679
+ } = e, c = await sp(e, t);
7673
7680
  return a === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
7674
7681
  x: o + c.x,
7675
7682
  y: i + c.y,
@@ -7680,7 +7687,7 @@ const sp = function(t) {
7680
7687
  };
7681
7688
  }
7682
7689
  };
7683
- }, cp = function(t) {
7690
+ }, up = function(t) {
7684
7691
  return t === void 0 && (t = {}), {
7685
7692
  name: "shift",
7686
7693
  options: t,
@@ -7763,7 +7770,7 @@ function Qt(t) {
7763
7770
  function Hi(t) {
7764
7771
  return !Sr() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof Dt(t).ShadowRoot;
7765
7772
  }
7766
- const up = /* @__PURE__ */ new Set(["inline", "contents"]);
7773
+ const lp = /* @__PURE__ */ new Set(["inline", "contents"]);
7767
7774
  function On(t) {
7768
7775
  const {
7769
7776
  overflow: e,
@@ -7771,15 +7778,15 @@ function On(t) {
7771
7778
  overflowY: r,
7772
7779
  display: o
7773
7780
  } = Xt(t);
7774
- return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !up.has(o);
7781
+ return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !lp.has(o);
7775
7782
  }
7776
- const lp = /* @__PURE__ */ new Set(["table", "td", "th"]);
7777
- function fp(t) {
7778
- return lp.has(nn(t));
7783
+ const fp = /* @__PURE__ */ new Set(["table", "td", "th"]);
7784
+ function dp(t) {
7785
+ return fp.has(nn(t));
7779
7786
  }
7780
- const dp = [":popover-open", ":modal"];
7787
+ const pp = [":popover-open", ":modal"];
7781
7788
  function _r(t) {
7782
- return dp.some((e) => {
7789
+ return pp.some((e) => {
7783
7790
  try {
7784
7791
  return t.matches(e);
7785
7792
  } catch {
@@ -7787,12 +7794,12 @@ function _r(t) {
7787
7794
  }
7788
7795
  });
7789
7796
  }
7790
- const pp = ["transform", "translate", "scale", "rotate", "perspective"], hp = ["transform", "translate", "scale", "rotate", "perspective", "filter"], vp = ["paint", "layout", "strict", "content"];
7797
+ const hp = ["transform", "translate", "scale", "rotate", "perspective"], vp = ["transform", "translate", "scale", "rotate", "perspective", "filter"], gp = ["paint", "layout", "strict", "content"];
7791
7798
  function ko(t) {
7792
7799
  const e = Ro(), n = qt(t) ? Xt(t) : t;
7793
- return pp.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || hp.some((r) => (n.willChange || "").includes(r)) || vp.some((r) => (n.contain || "").includes(r));
7800
+ return hp.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || vp.some((r) => (n.willChange || "").includes(r)) || gp.some((r) => (n.contain || "").includes(r));
7794
7801
  }
7795
- function gp(t) {
7802
+ function yp(t) {
7796
7803
  let e = ye(t);
7797
7804
  for (; Qt(e) && !Ke(e); ) {
7798
7805
  if (ko(e))
@@ -7806,9 +7813,9 @@ function gp(t) {
7806
7813
  function Ro() {
7807
7814
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
7808
7815
  }
7809
- const yp = /* @__PURE__ */ new Set(["html", "body", "#document"]);
7816
+ const mp = /* @__PURE__ */ new Set(["html", "body", "#document"]);
7810
7817
  function Ke(t) {
7811
- return yp.has(nn(t));
7818
+ return mp.has(nn(t));
7812
7819
  }
7813
7820
  function Xt(t) {
7814
7821
  return Dt(t).getComputedStyle(t);
@@ -7879,15 +7886,15 @@ function Ue(t) {
7879
7886
  y: s
7880
7887
  };
7881
7888
  }
7882
- const mp = /* @__PURE__ */ Zt(0);
7889
+ const bp = /* @__PURE__ */ Zt(0);
7883
7890
  function fs(t) {
7884
7891
  const e = Dt(t);
7885
- return !Ro() || !e.visualViewport ? mp : {
7892
+ return !Ro() || !e.visualViewport ? bp : {
7886
7893
  x: e.visualViewport.offsetLeft,
7887
7894
  y: e.visualViewport.offsetTop
7888
7895
  };
7889
7896
  }
7890
- function bp(t, e, n) {
7897
+ function Ep(t, e, n) {
7891
7898
  return e === void 0 && (e = !1), !n || e && n !== Dt(t) ? !1 : e;
7892
7899
  }
7893
7900
  function kn(t, e, n, r) {
@@ -7895,7 +7902,7 @@ function kn(t, e, n, r) {
7895
7902
  const o = t.getBoundingClientRect(), i = ls(t);
7896
7903
  let a = Zt(1);
7897
7904
  e && (r ? qt(r) && (a = Ue(r)) : a = Ue(t));
7898
- const s = bp(i, n, r) ? fs(i) : Zt(0);
7905
+ const s = Ep(i, n, r) ? fs(i) : Zt(0);
7899
7906
  let c = (o.left + s.x) / a.x, f = (o.top + s.y) / a.y, y = o.width / a.x, l = o.height / a.y;
7900
7907
  if (i) {
7901
7908
  const u = Dt(i), h = r && qt(r) ? Dt(r) : r;
@@ -7923,7 +7930,7 @@ function ds(t, e) {
7923
7930
  y: o
7924
7931
  };
7925
7932
  }
7926
- function Ep(t) {
7933
+ function xp(t) {
7927
7934
  let {
7928
7935
  elements: e,
7929
7936
  rect: n,
@@ -7950,10 +7957,10 @@ function Ep(t) {
7950
7957
  y: n.y * f.y - c.scrollTop * f.y + y.y + u.y
7951
7958
  };
7952
7959
  }
7953
- function xp(t) {
7960
+ function wp(t) {
7954
7961
  return Array.from(t.getClientRects());
7955
7962
  }
7956
- function wp(t) {
7963
+ function Sp(t) {
7957
7964
  const e = se(t), n = Tr(t), r = t.ownerDocument.body, o = ze(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), i = ze(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
7958
7965
  let a = -n.scrollLeft + kr(t);
7959
7966
  const s = -n.scrollTop;
@@ -7965,7 +7972,7 @@ function wp(t) {
7965
7972
  };
7966
7973
  }
7967
7974
  const Li = 25;
7968
- function Sp(t, e) {
7975
+ function _p(t, e) {
7969
7976
  const n = Dt(t), r = se(t), o = n.visualViewport;
7970
7977
  let i = r.clientWidth, a = r.clientHeight, s = 0, c = 0;
7971
7978
  if (o) {
@@ -7985,8 +7992,8 @@ function Sp(t, e) {
7985
7992
  y: c
7986
7993
  };
7987
7994
  }
7988
- const _p = /* @__PURE__ */ new Set(["absolute", "fixed"]);
7989
- function Tp(t, e) {
7995
+ const Tp = /* @__PURE__ */ new Set(["absolute", "fixed"]);
7996
+ function kp(t, e) {
7990
7997
  const n = kn(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Qt(t) ? Ue(t) : Zt(1), a = t.clientWidth * i.x, s = t.clientHeight * i.y, c = o * i.x, f = r * i.y;
7991
7998
  return {
7992
7999
  width: a,
@@ -7998,11 +8005,11 @@ function Tp(t, e) {
7998
8005
  function $i(t, e, n) {
7999
8006
  let r;
8000
8007
  if (e === "viewport")
8001
- r = Sp(t, n);
8008
+ r = _p(t, n);
8002
8009
  else if (e === "document")
8003
- r = wp(se(t));
8010
+ r = Sp(se(t));
8004
8011
  else if (qt(e))
8005
- r = Tp(e, n);
8012
+ r = kp(e, n);
8006
8013
  else {
8007
8014
  const o = fs(t);
8008
8015
  r = {
@@ -8018,7 +8025,7 @@ function ps(t, e) {
8018
8025
  const n = ye(t);
8019
8026
  return n === e || !qt(n) || Ke(n) ? !1 : Xt(n).position === "fixed" || ps(n, e);
8020
8027
  }
8021
- function kp(t, e) {
8028
+ function Rp(t, e) {
8022
8029
  const n = e.get(t);
8023
8030
  if (n)
8024
8031
  return n;
@@ -8027,18 +8034,18 @@ function kp(t, e) {
8027
8034
  let a = i ? ye(t) : t;
8028
8035
  for (; qt(a) && !Ke(a); ) {
8029
8036
  const s = Xt(a), c = ko(a);
8030
- !c && s.position === "fixed" && (o = null), (i ? !c && !o : !c && s.position === "static" && o && _p.has(o.position) || On(a) && !c && ps(t, a)) ? r = r.filter((f) => f !== a) : o = s, a = ye(a);
8037
+ !c && s.position === "fixed" && (o = null), (i ? !c && !o : !c && s.position === "static" && o && Tp.has(o.position) || On(a) && !c && ps(t, a)) ? r = r.filter((f) => f !== a) : o = s, a = ye(a);
8031
8038
  }
8032
8039
  return e.set(t, r), r;
8033
8040
  }
8034
- function Rp(t) {
8041
+ function Cp(t) {
8035
8042
  let {
8036
8043
  element: e,
8037
8044
  boundary: n,
8038
8045
  rootBoundary: r,
8039
8046
  strategy: o
8040
8047
  } = t;
8041
- const i = [...n === "clippingAncestors" ? _r(e) ? [] : kp(e, this._c) : [].concat(n), r], a = i[0], s = i.reduce((c, f) => {
8048
+ const i = [...n === "clippingAncestors" ? _r(e) ? [] : Rp(e, this._c) : [].concat(n), r], a = i[0], s = i.reduce((c, f) => {
8042
8049
  const y = $i(e, f, o);
8043
8050
  return c.top = ze(y.top, c.top), c.right = Tn(y.right, c.right), c.bottom = Tn(y.bottom, c.bottom), c.left = ze(y.left, c.left), c;
8044
8051
  }, $i(e, a, o));
@@ -8049,7 +8056,7 @@ function Rp(t) {
8049
8056
  y: s.top
8050
8057
  };
8051
8058
  }
8052
- function Cp(t) {
8059
+ function Op(t) {
8053
8060
  const {
8054
8061
  width: e,
8055
8062
  height: n
@@ -8059,7 +8066,7 @@ function Cp(t) {
8059
8066
  height: n
8060
8067
  };
8061
8068
  }
8062
- function Op(t, e, n) {
8069
+ function Ap(t, e, n) {
8063
8070
  const r = Qt(e), o = se(e), i = n === "fixed", a = kn(t, !0, i, e);
8064
8071
  let s = {
8065
8072
  scrollLeft: 0,
@@ -8108,14 +8115,14 @@ function hs(t, e) {
8108
8115
  return n;
8109
8116
  }
8110
8117
  let r = Mi(t, e);
8111
- for (; r && fp(r) && $r(r); )
8118
+ for (; r && dp(r) && $r(r); )
8112
8119
  r = Mi(r, e);
8113
- return r && Ke(r) && $r(r) && !ko(r) ? n : r || gp(t) || n;
8120
+ return r && Ke(r) && $r(r) && !ko(r) ? n : r || yp(t) || n;
8114
8121
  }
8115
- const Ap = async function(t) {
8122
+ const Np = async function(t) {
8116
8123
  const e = this.getOffsetParent || hs, n = this.getDimensions, r = await n(t.floating);
8117
8124
  return {
8118
- reference: Op(t.reference, await e(t.floating), t.strategy),
8125
+ reference: Ap(t.reference, await e(t.floating), t.strategy),
8119
8126
  floating: {
8120
8127
  x: 0,
8121
8128
  y: 0,
@@ -8124,35 +8131,35 @@ const Ap = async function(t) {
8124
8131
  }
8125
8132
  };
8126
8133
  };
8127
- function Np(t) {
8134
+ function Ip(t) {
8128
8135
  return Xt(t).direction === "rtl";
8129
8136
  }
8130
- const Ip = {
8131
- convertOffsetParentRelativeRectToViewportRelativeRect: Ep,
8137
+ const jp = {
8138
+ convertOffsetParentRelativeRectToViewportRelativeRect: xp,
8132
8139
  getDocumentElement: se,
8133
- getClippingRect: Rp,
8140
+ getClippingRect: Cp,
8134
8141
  getOffsetParent: hs,
8135
- getElementRects: Ap,
8136
- getClientRects: xp,
8137
- getDimensions: Cp,
8142
+ getElementRects: Np,
8143
+ getClientRects: wp,
8144
+ getDimensions: Op,
8138
8145
  getScale: Ue,
8139
8146
  isElement: qt,
8140
- isRTL: Np
8141
- }, jp = sp, Pp = rp, Dp = cp, Hp = op, Lp = ep, $p = (t, e, n) => {
8147
+ isRTL: Ip
8148
+ }, Pp = cp, Dp = op, Hp = up, Lp = ip, $p = np, Mp = (t, e, n) => {
8142
8149
  const r = /* @__PURE__ */ new Map(), o = {
8143
- platform: Ip,
8150
+ platform: jp,
8144
8151
  ...n
8145
8152
  }, i = {
8146
8153
  ...o.platform,
8147
8154
  _c: r
8148
8155
  };
8149
- return tp(t, e, {
8156
+ return ep(t, e, {
8150
8157
  ...o,
8151
8158
  platform: i
8152
8159
  });
8153
8160
  };
8154
8161
  var Mr, Vi;
8155
- function Mp() {
8162
+ function Vp() {
8156
8163
  if (Vi) return Mr;
8157
8164
  Vi = 1;
8158
8165
  var t = "Expected a function", e = NaN, n = "[object Symbol]", r = /^\s+|\s+$/g, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, a = /^0o[0-7]+$/i, s = parseInt, c = typeof Vt == "object" && Vt && Vt.Object === Object && Vt, f = typeof self == "object" && self && self.Object === Object && self, y = c || f || Function("return this")(), l = Object.prototype, u = l.toString, h = Math.max, p = Math.min, v = function() {
@@ -8232,10 +8239,10 @@ function Mp() {
8232
8239
  }
8233
8240
  return Mr = b, Mr;
8234
8241
  }
8235
- var Vp = Mp();
8236
- const vs = /* @__PURE__ */ Oe(Vp);
8242
+ var Fp = Vp();
8243
+ const vs = /* @__PURE__ */ Oe(Fp);
8237
8244
  var Vr, Fi;
8238
- function Fp() {
8245
+ function Wp() {
8239
8246
  if (Fi) return Vr;
8240
8247
  Fi = 1;
8241
8248
  var t = 200, e = "__lodash_hash_undefined__", n = 1 / 0, r = "[object Function]", o = "[object GeneratorFunction]", i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, s = typeof Vt == "object" && Vt && Vt.Object === Object && Vt, c = typeof self == "object" && self && self.Object === Object && self, f = s || c || Function("return this")();
@@ -8467,8 +8474,8 @@ function Fp() {
8467
8474
  }
8468
8475
  return Vr = ln, Vr;
8469
8476
  }
8470
- var Wp = Fp();
8471
- const zp = /* @__PURE__ */ Oe(Wp), gs = 10, Up = 12, Bp = (t, e, n, r) => {
8477
+ var zp = Wp();
8478
+ const Up = /* @__PURE__ */ Oe(zp), gs = 10, Bp = 12, qp = (t, e, n, r) => {
8472
8479
  const { staticSide: o, offset: i, rotation: a, shadowOpacity: s } = {
8473
8480
  top: {
8474
8481
  staticSide: "bottom",
@@ -8510,10 +8517,10 @@ const zp = /* @__PURE__ */ Oe(Wp), gs = 10, Up = 12, Bp = (t, e, n, r) => {
8510
8517
  return e.find(
8511
8518
  ({ config: r, type: o }) => o === "@appcues/overlay" && n === r.rootId
8512
8519
  );
8513
- }, qp = (t, e) => {
8514
- const n = gs + Up / 2;
8520
+ }, Xp = (t, e) => {
8521
+ const n = gs + Bp / 2;
8515
8522
  return e.includes("start") ? t - n : t + n;
8516
- }, Xp = ({
8523
+ }, Gp = ({
8517
8524
  placementUnit: t,
8518
8525
  distance: e,
8519
8526
  skidding: n,
@@ -8559,10 +8566,10 @@ function ys(t, e, n, r, o) {
8559
8566
  }
8560
8567
  return i;
8561
8568
  }
8562
- const Gp = (t, e) => {
8569
+ const Zp = (t, e) => {
8563
8570
  const n = e(), r = n.document, o = n.getComputedStyle(t);
8564
8571
  return ys(t, o, r, n);
8565
- }, Zp = ({
8572
+ }, Jp = ({
8566
8573
  targetEl: t,
8567
8574
  rootStyle: e,
8568
8575
  shouldAutoCalculateZIndex: n,
@@ -8570,11 +8577,11 @@ const Gp = (t, e) => {
8570
8577
  }) => {
8571
8578
  let o = e;
8572
8579
  if (n) {
8573
- const i = Gp(t, r);
8580
+ const i = Zp(t, r);
8574
8581
  o = { ...e, zIndex: i };
8575
8582
  }
8576
8583
  return o;
8577
- }, Jp = () => {
8584
+ }, Qp = () => {
8578
8585
  const t = /* @__PURE__ */ new Map();
8579
8586
  function e(n) {
8580
8587
  n.composedPath().forEach((r) => {
@@ -8597,7 +8604,7 @@ const Gp = (t, e) => {
8597
8604
  i[r] = a, t.set(n, i), i[r].length === 0 && n.removeEventListener(r, e, !0);
8598
8605
  }
8599
8606
  };
8600
- }, { addEventListener: pr, removeEventListener: hr } = Jp(), Qp = () => {
8607
+ }, { addEventListener: pr, removeEventListener: hr } = Qp(), Kp = () => {
8601
8608
  const t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), n = (o) => {
8602
8609
  if (e.has(o)) return;
8603
8610
  const i = setInterval(() => {
@@ -8620,14 +8627,14 @@ const Gp = (t, e) => {
8620
8627
  const a = t.get(i) ?? [];
8621
8628
  return t.set(i, [...a, o]), n(i), () => r(o, i);
8622
8629
  };
8623
- }, Kp = Qp(), Be = (t, e) => {
8630
+ }, Yp = Kp(), Be = (t, e) => {
8624
8631
  if (!e) return t;
8625
8632
  const { order: n, text: r } = e;
8626
8633
  let o = [...t];
8627
8634
  return r && r !== "" && (o = o.filter(
8628
8635
  (i) => i.textContent.replace(/\r\n|\r|\n/g, " ").toLowerCase().trim() === r.toString().toLowerCase().trim()
8629
8636
  )), n != null ? o.length > n ? [o[n]] : [] : o;
8630
- }, Yp = "@appcues/overlay", th = {
8637
+ }, th = "@appcues/overlay", eh = {
8631
8638
  top: "top",
8632
8639
  "top-left": "top-start",
8633
8640
  "top-right": "top-end",
@@ -8641,7 +8648,7 @@ const Gp = (t, e) => {
8641
8648
  "left-bottom": "left-end",
8642
8649
  "left-top": "left-start",
8643
8650
  center: "top-start"
8644
- }, eh = (t) => {
8651
+ }, nh = (t) => {
8645
8652
  let e, n, r, o = [], i, a = () => {
8646
8653
  }, s;
8647
8654
  function c() {
@@ -8657,9 +8664,9 @@ const Gp = (t, e) => {
8657
8664
  return e = l, n = u, r = h, o = [], this;
8658
8665
  },
8659
8666
  start() {
8660
- r && (o = zp([...fr(r)])), o.forEach((l) => {
8667
+ r && (o = Up([...fr(r)])), o.forEach((l) => {
8661
8668
  pr(l, "scroll", f), pr(l, "resize", f);
8662
- }), i = new ResizeObserver(f), i.observe(n), s = e.getBoundingClientRect(), a = Kp(y, 200);
8669
+ }), i = new ResizeObserver(f), i.observe(n), s = e.getBoundingClientRect(), a = Yp(y, 200);
8663
8670
  },
8664
8671
  remove() {
8665
8672
  o.forEach((l) => {
@@ -8667,7 +8674,7 @@ const Gp = (t, e) => {
8667
8674
  }), i?.unobserve(n), a();
8668
8675
  }
8669
8676
  };
8670
- }, nh = ({ addHook: t, registerAction: e }) => {
8677
+ }, rh = ({ addHook: t, registerAction: e }) => {
8671
8678
  let n, r = !1, o = !1, i, a, s, c, f, y, l = !1, u = "absolute", h, p;
8672
8679
  t(
8673
8680
  "step.begin",
@@ -8706,47 +8713,47 @@ const Gp = (t, e) => {
8706
8713
  const { targetEl: Q, rootEl: mt, arrowEl: at } = s();
8707
8714
  if (!r && Q && mt) {
8708
8715
  r = !0;
8709
- const gt = Xp({
8716
+ const gt = Gp({
8710
8717
  placement: P,
8711
8718
  targetEl: Q,
8712
8719
  distance: M,
8713
8720
  skidding: L,
8714
8721
  placementUnit: U
8715
8722
  }), bt = [
8716
- jp(({ placement: Lt }) => ({
8723
+ Pp(({ placement: Lt }) => ({
8717
8724
  ...gt,
8718
- crossAxis: at && /start|end/gm.test(Lt) ? qp(L, Lt) : gt.crossAxis
8725
+ crossAxis: at && /start|end/gm.test(Lt) ? Xp(L, Lt) : gt.crossAxis
8719
8726
  }))
8720
8727
  ];
8721
8728
  P === "auto" && bt.push(
8722
- Dp(),
8723
- Pp({
8729
+ Hp(),
8730
+ Dp({
8724
8731
  crossAxis: !0
8725
8732
  })
8726
- ), at && bt.push(Lp({ element: at, padding: gs })), bt.push(Hp());
8733
+ ), at && bt.push($p({ element: at, padding: gs })), bt.push(Lp());
8727
8734
  const {
8728
8735
  middlewareData: q,
8729
8736
  strategy: V,
8730
8737
  x: Nt,
8731
8738
  y: K,
8732
8739
  placement: lt
8733
- } = await $p(Q, mt, {
8740
+ } = await Mp(Q, mt, {
8734
8741
  middleware: bt,
8735
- placement: th[P] ?? "auto",
8742
+ placement: eh[P] ?? "auto",
8736
8743
  strategy: u
8737
8744
  }), { referenceHidden: Et } = q.hide;
8738
8745
  if (at) {
8739
8746
  const { x: Lt, y: Ft } = q.arrow;
8740
8747
  w(
8741
8748
  O,
8742
- Bp(lt, Lt, Ft)
8749
+ qp(lt, Lt, Ft)
8743
8750
  );
8744
8751
  }
8745
8752
  const Ht = {
8746
8753
  left: `${Nt}px`,
8747
8754
  position: V,
8748
8755
  top: `${K}px`
8749
- }, It = Zp({
8756
+ }, It = Jp({
8750
8757
  targetEl: Q,
8751
8758
  rootStyle: Ht,
8752
8759
  shouldAutoCalculateZIndex: J,
@@ -8757,7 +8764,7 @@ const Gp = (t, e) => {
8757
8764
  };
8758
8765
  h = () => {
8759
8766
  r = !1, ut();
8760
- }, c = eh(h);
8767
+ }, c = nh(h);
8761
8768
  const nt = () => Be(b(C.selector), C.filters);
8762
8769
  n = async () => {
8763
8770
  i && i(), a && a();
@@ -8813,19 +8820,19 @@ const Gp = (t, e) => {
8813
8820
  }
8814
8821
  );
8815
8822
  };
8816
- St(Yp, nh);
8817
- const rh = "@appcues/persistent", oh = ({ addHook: t }) => {
8823
+ St(th, rh);
8824
+ const oh = "@appcues/persistent", ih = ({ addHook: t }) => {
8818
8825
  t("experience.begin", ({ steps: e }) => {
8819
8826
  e.map((n) => n.start());
8820
8827
  });
8821
8828
  };
8822
- St(rh, oh);
8823
- const ih = {
8829
+ St(oh, ih);
8830
+ const ah = {
8824
8831
  left: "beforebegin",
8825
8832
  "inner-left": "afterbegin",
8826
8833
  right: "afterend",
8827
8834
  "inner-right": "beforeend"
8828
- }, ah = "@appcues/inline", sh = ({
8835
+ }, sh = "@appcues/inline", ch = ({
8829
8836
  distanceUnit: t,
8830
8837
  yOffset: e,
8831
8838
  xOffset: n,
@@ -8842,7 +8849,7 @@ const ih = {
8842
8849
  y: `${i * e / 100}px`
8843
8850
  };
8844
8851
  };
8845
- function ch({ addHook: t }) {
8852
+ function uh({ addHook: t }) {
8846
8853
  let e, n, r;
8847
8854
  t(
8848
8855
  "step.begin",
@@ -8877,7 +8884,7 @@ function ch({ addHook: t }) {
8877
8884
  for (; L.firstChild; )
8878
8885
  L.firstChild.remove();
8879
8886
  if (L.insertAdjacentElement(
8880
- ih[u],
8887
+ ah[u],
8881
8888
  U
8882
8889
  ) == null) {
8883
8890
  a(`can't insert inline container on the ${u}`);
@@ -8897,7 +8904,7 @@ function ch({ addHook: t }) {
8897
8904
  const L = {
8898
8905
  display: w,
8899
8906
  verticalAlign: h
8900
- }, { x: U, y: J } = sh({
8907
+ }, { x: U, y: J } = ch({
8901
8908
  distanceUnit: E,
8902
8909
  xOffset: v,
8903
8910
  yOffset: b,
@@ -8938,27 +8945,27 @@ function ch({ addHook: t }) {
8938
8945
  e && e(), n && n();
8939
8946
  });
8940
8947
  }
8941
- St(ah, ch);
8942
- const uh = (t, e, n) => {
8948
+ St(sh, uh);
8949
+ const lh = (t, e, n) => {
8943
8950
  const { height: r, width: o, left: i, top: a } = t.getBoundingClientRect();
8944
8951
  return Math.floor(
8945
8952
  Math.hypot(e - (i + o / 2), n - (a + r / 2)) / 2
8946
8953
  );
8947
- }, lh = (t, e) => {
8954
+ }, fh = (t, e) => {
8948
8955
  const { height: n, width: r } = t.getBoundingClientRect(), o = Math.floor(Math.hypot(n, r) / 4);
8949
8956
  return Math.max(e, 0) + o;
8950
- }, fh = (t) => t.key === "Escape", dh = (t, e) => ![...t.composedPath()].filter((n) => n.nodeType === Node.ELEMENT_NODE).some((n) => n?.contains?.(e) ?? !1), Un = (t, e) => ({
8957
+ }, dh = (t) => t.key === "Escape", ph = (t, e) => ![...t.composedPath()].filter((n) => n.nodeType === Node.ELEMENT_NODE).some((n) => n?.contains?.(e) ?? !1), Un = (t, e) => ({
8951
8958
  remove: () => {
8952
8959
  t.removeEventListener("keydown", e), t.removeEventListener("click", e, !0);
8953
8960
  },
8954
8961
  start: () => {
8955
8962
  t.addEventListener("click", e, !0), t.addEventListener("keydown", e);
8956
8963
  }
8957
- }), Fr = (t, e, n) => e.length === 0 ? (n("Element not found"), !1) : e.length > 1 ? (n(`More than one element found with id: ${t}`), !1) : !0, ph = "@appcues/toggle.style", ms = ({ targetId: t, styles: e = {} }, { updateStyle: n }) => {
8964
+ }), Fr = (t, e, n) => e.length === 0 ? (n("Element not found"), !1) : e.length > 1 ? (n(`More than one element found with id: ${t}`), !1) : !0, hh = "@appcues/toggle.style", ms = ({ targetId: t, styles: e = {} }, { updateStyle: n }) => {
8958
8965
  n(t, e);
8959
8966
  }, Bi = {
8960
- [ph]: ms
8961
- }, hh = ({ addHook: t, registerAction: e }, {
8967
+ [hh]: ms
8968
+ }, vh = ({ addHook: t, registerAction: e }, {
8962
8969
  startHidden: n = !0,
8963
8970
  targetId: r,
8964
8971
  transition: o,
@@ -9016,7 +9023,7 @@ const uh = (t, e, n) => {
9016
9023
  ), i && l.length === 0) {
9017
9024
  const P = k.querySelector(":first-child")[0];
9018
9025
  f = (L) => {
9019
- (fh(L) || dh(L, C[0])) && v({ on: E }, g);
9026
+ (dh(L) || ph(L, C[0])) && v({ on: E }, g);
9020
9027
  };
9021
9028
  const M = h.map((L) => L.contentDocument?.body ? Un(
9022
9029
  L.contentDocument.body,
@@ -9034,9 +9041,9 @@ const uh = (t, e, n) => {
9034
9041
  const M = [...P.composedPath()];
9035
9042
  ["a", "button"].includes(M[0].tagName.toLowerCase()) && v({ on: E }, g);
9036
9043
  }, u = Un(C[0], c), u.start()), a && !y) {
9037
- const P = lh(C[0], a);
9044
+ const P = fh(C[0], a);
9038
9045
  s = vs((M) => {
9039
- uh(
9046
+ lh(
9040
9047
  C[0],
9041
9048
  M.clientX,
9042
9049
  M.clientY
@@ -9060,9 +9067,9 @@ const uh = (t, e, n) => {
9060
9067
  v({ on: E }, g);
9061
9068
  }
9062
9069
  }), e("open", b), e("close", v), e("style", ms);
9063
- }, vh = "@appcues/toggle";
9064
- St(vh, hh);
9065
- const gh = "@appcues/coreEvents", yh = ({ registerAction: t }) => {
9070
+ }, gh = "@appcues/toggle";
9071
+ St(gh, vh);
9072
+ const yh = "@appcues/coreEvents", mh = ({ registerAction: t }) => {
9066
9073
  t("step_seen", (e, { step: n }) => {
9067
9074
  n.seen();
9068
9075
  }), t("extended_event", ({ name: e, ...n }, { step: r }) => {
@@ -9075,8 +9082,8 @@ const gh = "@appcues/coreEvents", yh = ({ registerAction: t }) => {
9075
9082
  n.snoozeExperience();
9076
9083
  });
9077
9084
  };
9078
- St(gh, yh);
9079
- const mh = (t, e = {}, n = () => window) => {
9085
+ St(yh, mh);
9086
+ const bh = (t, e = {}, n = () => window) => {
9080
9087
  let r = e;
9081
9088
  const o = [], i = n().document, a = (s) => {
9082
9089
  const { el: c, callbackFn: f } = s.detail;
@@ -9093,18 +9100,18 @@ const mh = (t, e = {}, n = () => window) => {
9093
9100
  i.removeEventListener(`${t}:connect`, a);
9094
9101
  }
9095
9102
  };
9096
- }, bh = "@appcues/store", Eh = ({ addHook: t, registerAction: e }, { id: n, initialState: r = {} }) => {
9103
+ }, Eh = "@appcues/store", xh = ({ addHook: t, registerAction: e }, { id: n, initialState: r = {} }) => {
9097
9104
  let o;
9098
9105
  t("step.begin", ({ getWindowReference: i }) => {
9099
- o = mh(n, r, i);
9106
+ o = bh(n, r, i);
9100
9107
  }), t("step.end", () => {
9101
9108
  o && o.destroy();
9102
9109
  }), e("setState", ({ stateKey: i }, a, s) => {
9103
9110
  o && o.setState({ [i]: s?.detail });
9104
9111
  });
9105
9112
  };
9106
- St(bh, Eh);
9107
- const xh = {
9113
+ St(Eh, xh);
9114
+ const wh = {
9108
9115
  slide_in_down: [
9109
9116
  {
9110
9117
  transform: "translate3d(0, -100%, 0)",
@@ -9148,15 +9155,15 @@ const xh = {
9148
9155
  transform: "scale3d(1, 1, 1)"
9149
9156
  }
9150
9157
  ]
9151
- }, wh = "@appcues/animate", Sh = 500, _h = "none", Wr = (t, e) => new Promise((n) => {
9158
+ }, Sh = "@appcues/animate", _h = 500, Th = "none", Wr = (t, e) => new Promise((n) => {
9152
9159
  const {
9153
9160
  keyframes: r,
9154
- duration: o = Sh,
9161
+ duration: o = _h,
9155
9162
  iterations: i,
9156
9163
  effect: a,
9157
- fill: s = _h,
9164
+ fill: s = Th,
9158
9165
  easing: c = "linear"
9159
- } = e, f = xh[a] || r, y = {
9166
+ } = e, f = wh[a] || r, y = {
9160
9167
  duration: o,
9161
9168
  iterations: i,
9162
9169
  fill: s,
@@ -9165,7 +9172,7 @@ const xh = {
9165
9172
  if (!f) return;
9166
9173
  const l = t.animate(f, y);
9167
9174
  l?.addEventListener ? l.addEventListener("finish", n, { once: !0 }) : n();
9168
- }), Th = ({ addHook: t, registerAction: e }, n) => {
9175
+ }), kh = ({ addHook: t, registerAction: e }, n) => {
9169
9176
  t("step.postrender", ({ querySelector: r }) => {
9170
9177
  const { target: o } = n;
9171
9178
  if (!o) return;
@@ -9196,12 +9203,12 @@ const xh = {
9196
9203
  }), y || h.setAttribute(s, f.id));
9197
9204
  });
9198
9205
  };
9199
- St(wh, Th);
9206
+ St(Sh, kh);
9200
9207
  const bs = {
9201
9208
  pixels: "px",
9202
9209
  percentage: "%"
9203
9210
  };
9204
- function kh(t, e, n, r) {
9211
+ function Rh(t, e, n, r) {
9205
9212
  const o = bs[n] || "px";
9206
9213
  switch (t) {
9207
9214
  case "left":
@@ -9230,7 +9237,7 @@ function kh(t, e, n, r) {
9230
9237
  };
9231
9238
  }
9232
9239
  }
9233
- function Rh(t, e, n, r) {
9240
+ function Ch(t, e, n, r) {
9234
9241
  const o = bs[n] || "px";
9235
9242
  switch (t) {
9236
9243
  case "top":
@@ -9259,7 +9266,7 @@ function Rh(t, e, n, r) {
9259
9266
  };
9260
9267
  }
9261
9268
  }
9262
- const Ch = "@appcues/floating", Oh = ({ addHook: t }) => {
9269
+ const Oh = "@appcues/floating", Ah = ({ addHook: t }) => {
9263
9270
  t("step.begin", ({ getTraitConfig: e, updateStyle: n, updateRootStyle: r }) => {
9264
9271
  const {
9265
9272
  target: o,
@@ -9272,13 +9279,13 @@ const Ch = "@appcues/floating", Oh = ({ addHook: t }) => {
9272
9279
  unsetOppositeDirection: l = !1,
9273
9280
  applyToRoot: u = !1
9274
9281
  } = e(), h = [
9275
- kh(
9282
+ Rh(
9276
9283
  c,
9277
9284
  a,
9278
9285
  y,
9279
9286
  l
9280
9287
  ),
9281
- Rh(
9288
+ Ch(
9282
9289
  f,
9283
9290
  s,
9284
9291
  y,
@@ -9298,12 +9305,12 @@ const Ch = "@appcues/floating", Oh = ({ addHook: t }) => {
9298
9305
  n(o.selector, p);
9299
9306
  });
9300
9307
  };
9301
- St(Ch, Oh);
9302
- const Ah = "@appcues/dismissible";
9308
+ St(Oh, Ah);
9309
+ const Nh = "@appcues/dismissible";
9303
9310
  function qi(t) {
9304
9311
  return `_experience_dismissed_${t}`;
9305
9312
  }
9306
- const Nh = ({ addHook: t, registerAction: e }, { strategy: n = "permanent" }) => {
9313
+ const Ih = ({ addHook: t, registerAction: e }, { strategy: n = "permanent" }) => {
9307
9314
  function r(o, i) {
9308
9315
  return n === "session" ? i().sessionStorage.getItem(qi(o)) === "1" : !1;
9309
9316
  }
@@ -9320,8 +9327,8 @@ const Nh = ({ addHook: t, registerAction: e }, { strategy: n = "permanent" }) =>
9320
9327
  }
9321
9328
  );
9322
9329
  };
9323
- St(Ah, Nh);
9324
- const Ih = "@appcues/experienceStyle", jh = ({ addHook: t }) => {
9330
+ St(Nh, Ih);
9331
+ const jh = "@appcues/experienceStyle", Ph = ({ addHook: t }) => {
9325
9332
  t("step.begin", ({ updateRootStyle: e, getTraitConfig: n }) => {
9326
9333
  const r = n();
9327
9334
  e(r, { forceUpdate: !0 });
@@ -9333,23 +9340,23 @@ const Ih = "@appcues/experienceStyle", jh = ({ addHook: t }) => {
9333
9340
  e(r, { forceUpdate: !0 });
9334
9341
  });
9335
9342
  };
9336
- St(Ih, jh);
9337
- const Ph = "@appcues/rootStyle", Xi = ({ getTraitConfig: t, updateRootStyle: e }) => {
9343
+ St(jh, Ph);
9344
+ const Dh = "@appcues/rootStyle", Xi = ({ getTraitConfig: t, updateRootStyle: e }) => {
9338
9345
  const { forceUpdate: n = !1, ...r } = t();
9339
9346
  e(r, { forceUpdate: n });
9340
9347
  };
9341
- function Dh({ addHook: t }) {
9348
+ function Hh({ addHook: t }) {
9342
9349
  t("step.begin", Xi), t("step.container_change", Xi);
9343
9350
  }
9344
- St(Ph, Dh);
9345
- var Hh = "appcues:launchpad_close", Lh = "appcues:launchpad_search", $h = "appcues:launchpad_search_error", Mh = "appcues:launchpad_search_response", Co = function(t, e) {
9351
+ St(Dh, Hh);
9352
+ var Lh = "appcues:launchpad_close", $h = "appcues:launchpad_search", Mh = "appcues:launchpad_search_error", Vh = "appcues:launchpad_search_response", Co = function(t, e) {
9346
9353
  return window.addEventListener(t, e), function() {
9347
9354
  return window.removeEventListener(t, e);
9348
9355
  };
9349
- }, Vh = function(t) {
9350
- return Co(Hh, t);
9351
- }, Fh = function(t, e, n) {
9352
- var r = new CustomEvent(Lh, {
9356
+ }, Fh = function(t) {
9357
+ return Co(Lh, t);
9358
+ }, Wh = function(t, e, n) {
9359
+ var r = new CustomEvent($h, {
9353
9360
  detail: {
9354
9361
  integrationId: t,
9355
9362
  query: e,
@@ -9357,15 +9364,15 @@ var Hh = "appcues:launchpad_close", Lh = "appcues:launchpad_search", $h = "appcu
9357
9364
  }
9358
9365
  });
9359
9366
  window.dispatchEvent(r);
9360
- }, Wh = function(t, e) {
9361
- return Co("".concat(Mh, ":").concat(t), e);
9362
9367
  }, zh = function(t, e) {
9363
- return Co("".concat($h, ":").concat(t), e);
9368
+ return Co("".concat(Vh, ":").concat(t), e);
9369
+ }, Uh = function(t, e) {
9370
+ return Co("".concat(Mh, ":").concat(t), e);
9364
9371
  };
9365
- const Uh = "@appcues/sdk-middleware-events", Bh = ({ addHook: t }, { onLaunchpadClose: e }) => {
9372
+ const Bh = "@appcues/sdk-middleware-events", qh = ({ addHook: t }, { onLaunchpadClose: e }) => {
9366
9373
  let n;
9367
9374
  t("step.begin", (r) => {
9368
- n = Vh(() => {
9375
+ n = Fh(() => {
9369
9376
  e.forEach((o) => {
9370
9377
  r.getAction(o.type)?.(o.config, r);
9371
9378
  });
@@ -9374,13 +9381,13 @@ const Uh = "@appcues/sdk-middleware-events", Bh = ({ addHook: t }, { onLaunchpad
9374
9381
  n?.();
9375
9382
  });
9376
9383
  };
9377
- St(Uh, Bh);
9378
- const qh = "@appcues/knowledge-base-integration", Bn = (t, { querySelector: e, reportError: n }) => {
9384
+ St(Bh, qh);
9385
+ const Xh = "@appcues/knowledge-base-integration", Bn = (t, { querySelector: e, reportError: n }) => {
9379
9386
  const r = e(t), o = r.length > 1, i = r.length === 0;
9380
9387
  return o && n(
9381
9388
  "The target element is duplicated, please provide a more specific selector"
9382
9389
  ), i && n("The target element is not found"), r[0];
9383
- }, Xh = ({ addHook: t, registerAction: e }, n) => {
9390
+ }, Gh = ({ addHook: t, registerAction: e }, n) => {
9384
9391
  const { integrationConnected: r = !1 } = n;
9385
9392
  let o, i, a, s, c;
9386
9393
  const f = () => {
@@ -9388,13 +9395,13 @@ const qh = "@appcues/knowledge-base-integration", Bn = (t, { querySelector: e, r
9388
9395
  }, y = (l) => {
9389
9396
  if (!r) return;
9390
9397
  const { integrationId: u } = n, { inputValue: h } = l.detail;
9391
- a.setAttribute("searchTerm", h), a.setAttribute("state", "loading"), o.setAttribute("loading", !0), s && (s.scrollTop = 0), i?.next(), Fh(u, h, c);
9398
+ a.setAttribute("searchTerm", h), a.setAttribute("state", "loading"), o.setAttribute("loading", !0), s && (s.scrollTop = 0), i?.next(), Wh(u, h, c);
9392
9399
  };
9393
9400
  t("step.begin", ({ getExperienceId: l }) => {
9394
- c = l(), Wh(c, (u) => {
9401
+ c = l(), zh(c, (u) => {
9395
9402
  const h = u.detail, p = h.results?.length === 0 ? "empty" : "showing_results";
9396
9403
  a.setAttribute("state", p), a.setAttribute("results", JSON.stringify(h.results)), o.setAttribute("loading", !1);
9397
- }), zh(c, () => {
9404
+ }), Uh(c, () => {
9398
9405
  a.setAttribute("state", "error"), o.setAttribute("loading", !1);
9399
9406
  });
9400
9407
  }), t("step.end", () => {
@@ -9404,8 +9411,8 @@ const qh = "@appcues/knowledge-base-integration", Bn = (t, { querySelector: e, r
9404
9411
  (!i || !o) && (i = Bn(h.selector, u), o = Bn("appcues-search-header", u), a = Bn("appcues-search-results", u), s = Bn("#launchpad-container", u), o?.addEventListener("onSearch", y), o?.addEventListener("onCancel", f));
9405
9412
  });
9406
9413
  };
9407
- St(qh, Xh);
9408
- const Gh = "@appcues/sequential", Zh = ({ addHook: t, registerAction: e }) => {
9414
+ St(Xh, Gh);
9415
+ const Zh = "@appcues/sequential", Jh = ({ addHook: t, registerAction: e }) => {
9409
9416
  let n;
9410
9417
  const r = (a, { steps: s }) => {
9411
9418
  n !== 0 && s[n].stop(() => {
@@ -9431,8 +9438,8 @@ const Gh = "@appcues/sequential", Zh = ({ addHook: t, registerAction: e }) => {
9431
9438
  n = 0, a[n].start();
9432
9439
  }), e("next", o), e("prev", r), e("goTo", i);
9433
9440
  };
9434
- St(Gh, Zh);
9435
- const Jh = ({
9441
+ St(Zh, Jh);
9442
+ const Qh = ({
9436
9443
  getWindowReference: t,
9437
9444
  backdropZIndex: e,
9438
9445
  backdropBlur: n,
@@ -9451,43 +9458,43 @@ const Jh = ({
9451
9458
  background-color: ${r};
9452
9459
  pointer-events: none;
9453
9460
  `, o;
9454
- }, Qh = "@appcues/dialog", Kh = `
9461
+ }, Kh = "@appcues/dialog", Yh = `
9455
9462
  dialog { all: unset; }
9456
9463
  ::backdrop { backdrop-filter: var(--backdrop-blur); background-color: var(--backdrop-color); }
9457
9464
  :-internal-dialog-in-top-layer { all: unset; }
9458
9465
  `;
9459
- function Yh(t) {
9466
+ function tv(t) {
9460
9467
  const { backdropBlur: e, backdropColor: n } = t;
9461
9468
  return {
9462
9469
  ...e && { "--backdrop-blur": e },
9463
9470
  ...n && { "--backdrop-color": n }
9464
9471
  };
9465
9472
  }
9466
- const tv = ({ addHook: t }, e) => {
9473
+ const ev = ({ addHook: t }, e) => {
9467
9474
  const { backdrop: n, variables: r, customBackdrop: o } = e, { dialogZIndex: i, backdropZIndex: a, backdropBlur: s, backdropColor: c } = r || {};
9468
9475
  let f, y, l;
9469
9476
  if (n && !o) {
9470
9477
  const u = ({ getTraitConfig: h, updateRootStyle: p }) => {
9471
9478
  const { variables: v } = h();
9472
- p(Yh(v || {}), {
9479
+ p(tv(v || {}), {
9473
9480
  forceUpdate: !0
9474
9481
  });
9475
9482
  };
9476
9483
  t("step.begin", u), t("step.container_change", u);
9477
9484
  }
9478
9485
  t("step.postrender", ({ step: u, getWindowReference: h }) => {
9479
- [y] = u.querySelector("dialog") ?? [], y && (n && o && (l?.remove(), l = Jh({
9486
+ [y] = u.querySelector("dialog") ?? [], y && (n && o && (l?.remove(), l = Qh({
9480
9487
  getWindowReference: h,
9481
9488
  backdropZIndex: a,
9482
9489
  backdropBlur: s,
9483
9490
  backdropColor: c
9484
- }), l && h().document.body.append(l)), o || (f?.remove(), f = h().document.createElement("style"), f.textContent = Kh, y.prepend(f)), y.style.zIndex = i, y[n && !o ? "showModal" : "show"]());
9491
+ }), l && h().document.body.append(l)), o || (f?.remove(), f = h().document.createElement("style"), f.textContent = Yh, y.prepend(f)), y.style.zIndex = i, y[n && !o ? "showModal" : "show"]());
9485
9492
  }), t("step.end", () => {
9486
9493
  y?.close(), f?.remove(), l?.remove();
9487
9494
  });
9488
9495
  };
9489
- St(Qh, tv);
9490
- const ev = "@appcues/experienceTheme", nv = ({ addHook: t }) => {
9496
+ St(Kh, ev);
9497
+ const nv = "@appcues/experienceTheme", rv = ({ addHook: t }) => {
9491
9498
  let e = null;
9492
9499
  function n({
9493
9500
  getContainer: o,
@@ -9506,8 +9513,8 @@ const ev = "@appcues/experienceTheme", nv = ({ addHook: t }) => {
9506
9513
  }
9507
9514
  t("step.begin", n), t("experience.end", r);
9508
9515
  };
9509
- St(ev, nv);
9510
- const rv = (t) => class extends t.HTMLElement {
9516
+ St(nv, rv);
9517
+ const ov = (t) => class extends t.HTMLElement {
9511
9518
  constructor() {
9512
9519
  super();
9513
9520
  const e = this.ownerDocument || t.document;
@@ -9530,18 +9537,18 @@ const rv = (t) => class extends t.HTMLElement {
9530
9537
  async connectedCallback() {
9531
9538
  this.shadowRoot.append(this.hideContentStyles), this.shadowRoot.append(...this.childNodes), this.getAttribute("themeId") && await ja(this), this.shadowRoot.prepend(this.webComponentStyles), this.hideContentStyles.remove();
9532
9539
  }
9533
- }, zr = /* @__PURE__ */ new WeakMap(), ov = (t = () => window) => {
9540
+ }, zr = /* @__PURE__ */ new WeakMap(), iv = (t = () => window) => {
9534
9541
  const e = t();
9535
9542
  if (zr.has(e))
9536
9543
  return zr.get(e);
9537
9544
  if (!e.customElements.get(Sn)) {
9538
- const r = rv(e);
9545
+ const r = ov(e);
9539
9546
  e.customElements.define(Sn, r);
9540
9547
  }
9541
9548
  const n = e.customElements.whenDefined(Sn);
9542
9549
  return zr.set(e, n), n;
9543
- }, iv = !1;
9544
- function av({
9550
+ }, av = !1;
9551
+ function sv({
9545
9552
  runningExperiences: t = /* @__PURE__ */ new Map(),
9546
9553
  sendEvent: e = () => {
9547
9554
  },
@@ -9583,7 +9590,7 @@ function av({
9583
9590
  registerAction: ae,
9584
9591
  registerTrait: St,
9585
9592
  show: async (v) => {
9586
- ov(c), await c().customElements.whenDefined(Sn);
9593
+ iv(c), await c().customElements.whenDefined(Sn);
9587
9594
  const b = Zn(
9588
9595
  Zn(
9589
9596
  v,
@@ -9605,7 +9612,7 @@ function av({
9605
9612
  )
9606
9613
  )
9607
9614
  ), E = t.get(v.id)?.experienceService ?? pa(ld(b, u), {
9608
- devTools: iv
9615
+ devTools: av
9609
9616
  }).start();
9610
9617
  E.send({
9611
9618
  type: Qo,
@@ -9637,5 +9644,5 @@ function av({
9637
9644
  };
9638
9645
  }
9639
9646
  export {
9640
- av as default
9647
+ sv as default
9641
9648
  };