@useinsider/guido 3.21.1-beta.f5fb7ac → 3.21.2-beta.1cc8327

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 (35) hide show
  1. package/README.md +0 -9
  2. package/dist/@types/config/schemas.js +33 -35
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +96 -100
  5. package/dist/composables/useActionsApi.js +22 -21
  6. package/dist/composables/useFullStoryBridge.js +10 -9
  7. package/dist/composables/useModuleRepair.js +23 -32
  8. package/dist/config/compiler/utils/recommendationCompilerUtils.js +55 -53
  9. package/dist/config/migrator/fullStoryScriptMigrator.js +5 -0
  10. package/dist/config/migrator/index.js +10 -10
  11. package/dist/enums/academy.js +1 -2
  12. package/dist/extensions/Blocks/Recommendation/block.js +52 -37
  13. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +76 -16
  14. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +16 -15
  15. package/dist/guido.css +1 -1
  16. package/dist/src/@types/config/schemas.d.ts +0 -4
  17. package/dist/src/composables/useConfig.d.ts +0 -2
  18. package/dist/src/composables/useModuleRepair.d.ts +11 -2
  19. package/dist/src/config/migrator/fullStoryScriptMigrator.d.ts +1 -0
  20. package/dist/src/enums/academy.d.ts +0 -1
  21. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +2 -0
  22. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +31 -17
  23. package/dist/src/stores/config.d.ts +0 -20
  24. package/dist/src/stores/editor.d.ts +0 -25
  25. package/dist/src/utils/fullStoryScripts.d.ts +6 -0
  26. package/dist/stores/editor.js +14 -15
  27. package/dist/utils/fullStoryScripts.js +8 -0
  28. package/package.json +1 -1
  29. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +0 -17
  30. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +0 -30
  31. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +0 -16
  32. package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +0 -2
  33. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +0 -1
  34. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +0 -10
  35. package/dist/utils/legacyUnsubscribeConversion.js +0 -49
@@ -1,7 +1,8 @@
1
- import { filterAmpErrors as y } from "../utils/ampErrorFilter.js";
2
- import { getEditorApi as s } from "../utils/stripoEditorApi.js";
1
+ import { filterAmpErrors as v } from "../utils/ampErrorFilter.js";
2
+ import { stripFullStoryScripts as h } from "../utils/fullStoryScripts.js";
3
+ import { getEditorApi as r } from "../utils/stripoEditorApi.js";
3
4
  import { useToaster as D } from "./useToaster.js";
4
- const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
5
+ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((C, p) => {
5
6
  const f = setTimeout(
6
7
  () => p(new Error(`${n} did not report completion within ${l}ms`)),
7
8
  l
@@ -13,8 +14,8 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
13
14
  } catch (t) {
14
15
  d(t);
15
16
  }
16
- }), P = () => {
17
- const { handleError: n } = D(), l = (t = {}) => r(
17
+ }), _ = () => {
18
+ const { handleError: n } = D(), l = (t = {}) => m(
18
19
  "compileEmail",
19
20
  T,
20
21
  (e, i) => {
@@ -38,38 +39,38 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
38
39
  resetDataSavedFlag: !1,
39
40
  disableLineHeightsReplace: !0
40
41
  }, ...t }, u = {
41
- callback: (m, g, w, S, v) => {
42
- m ? i(m) : e({
42
+ callback: (s, g, w, S, y) => {
43
+ s ? i(s) : e({
43
44
  html: g,
44
45
  ampHtml: w,
45
- ampErrors: y(S ?? []),
46
- displayConditions: v
46
+ ampErrors: v(S ?? []),
47
+ displayConditions: y
47
48
  });
48
49
  },
49
50
  ...o
50
51
  };
51
- s().actionsApi.compileEmail(u);
52
+ r().actionsApi.compileEmail(u);
52
53
  }
53
54
  );
54
55
  return {
55
56
  getCompiledEmail: l,
56
- getTemplateData: () => r(
57
+ getTemplateData: () => m(
57
58
  "getTemplateData",
58
59
  T,
59
60
  (t) => {
60
- const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds: m }) => t({
61
- html: i,
61
+ const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds: s }) => t({
62
+ html: h(i),
62
63
  css: a,
63
64
  width: o,
64
65
  height: E,
65
66
  utmParams: u,
66
- syncModulesIds: m
67
+ syncModulesIds: s
67
68
  });
68
- s().actionsApi.getTemplateData(e);
69
+ r().actionsApi.getTemplateData(e);
69
70
  }
70
71
  ),
71
72
  activateCustomViewStyles: (t = !0) => {
72
- s().actionsApi.activateCustomViewStyles(t);
73
+ r().actionsApi.activateCustomViewStyles(t);
73
74
  },
74
75
  getPreviewData: async (t) => {
75
76
  try {
@@ -109,16 +110,16 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
109
110
  }
110
111
  }),
111
112
  updateHtmlAndCss: (t, e) => {
112
- const { actionsApi: i } = s();
113
- return r("updateHtmlAndCss", h, (a) => {
113
+ const { actionsApi: i } = r();
114
+ return m("updateHtmlAndCss", H, (a) => {
114
115
  i.updateHtmlAndCss(t, e, () => a());
115
116
  });
116
117
  },
117
- editorSave: () => r(
118
+ editorSave: () => m(
118
119
  "save",
119
120
  T,
120
121
  (t) => {
121
- s().actionsApi.save((e) => {
122
+ r().actionsApi.save((e) => {
122
123
  if (e) {
123
124
  n(e, "Failed to save template"), t(!1);
124
125
  return;
@@ -130,5 +131,5 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
130
131
  };
131
132
  };
132
133
  export {
133
- P as useActionsApi
134
+ _ as useActionsApi
134
135
  };
@@ -1,14 +1,15 @@
1
- const c = "https://email-static.useinsider.com/guido/guido-fs.js", u = () => ({ injectFullStory: () => {
2
- var n;
3
- const s = window;
4
- if (typeof s._fs_org != "string" || !s._fs_org)
1
+ import { FULLSTORY_BRIDGE_SCRIPT_URL as s } from "../utils/fullStoryScripts.js";
2
+ const l = () => ({ injectFullStory: () => {
3
+ var c;
4
+ const n = window;
5
+ if (typeof n._fs_org != "string" || !n._fs_org)
5
6
  return;
6
- const r = document.querySelector("ui-editor"), o = (n = r == null ? void 0 : r.shadowRoot) == null ? void 0 : n.querySelector("iframe"), e = o == null ? void 0 : o.contentDocument;
7
- if (!e || e.querySelector('script[data-fullstory-bridge="true"]'))
7
+ const e = document.querySelector("ui-editor"), o = (c = e == null ? void 0 : e.shadowRoot) == null ? void 0 : c.querySelector("iframe"), r = o == null ? void 0 : o.contentDocument;
8
+ if (!r || r.querySelector('script[data-fullstory-bridge="true"]'))
8
9
  return;
9
- const t = e.createElement("script");
10
- t.src = c, t.async = !0, t.crossOrigin = "anonymous", t.dataset.fullstoryBridge = "true", e.head.appendChild(t);
10
+ const t = r.createElement("script");
11
+ t.src = s, t.async = !0, t.crossOrigin = "anonymous", t.dataset.fullstoryBridge = "true", r.head.appendChild(t);
11
12
  } });
12
13
  export {
13
- u as useFullStoryBridge
14
+ l as useFullStoryBridge
14
15
  };
@@ -1,42 +1,33 @@
1
- import { useConfig as f } from "./useConfig.js";
2
- import { useToaster as d } from "./useToaster.js";
3
- import { useTranslations as C } from "./useTranslations.js";
4
- import { ToasterTypeOptions as h } from "../enums/toaster.js";
5
- import { useEditorStore as T } from "../stores/editor.js";
6
- import { buildDynamicContentLookup as v, convertModuleDynamicContent as D } from "../utils/dynamicContentConverter.js";
7
- import { flattenDynamicContentList as L } from "../utils/genericUtil.js";
1
+ import { useConfig as C } from "./useConfig.js";
2
+ import { useToaster as T } from "./useToaster.js";
3
+ import { useTranslations as g } from "./useTranslations.js";
4
+ import { ToasterTypeOptions as D } from "../enums/toaster.js";
5
+ import { buildDynamicContentLookup as f, convertModuleDynamicContent as h } from "../utils/dynamicContentConverter.js";
6
+ import { flattenDynamicContentList as O } from "../utils/genericUtil.js";
8
7
  import { repairItemsCurrencyAttributes as M } from "../utils/itemsCurrencyRepair.js";
9
- import { convertLegacyUnsubscribeInModuleHtml as O } from "../utils/legacyUnsubscribeConversion.js";
10
- const E = "dynamic-content.unresolved-attributes-on-drop", Y = () => {
11
- const { template: p, isFeatureEnabled: s } = f(), { showToaster: y } = d(), b = C();
12
- return { handleModuleAdd: (t, r) => {
13
- var c, l, u;
8
+ const N = "dynamic-content.unresolved-attributes-on-drop", R = () => {
9
+ const { template: p, isFeatureEnabled: m } = C(), { showToaster: a } = T(), y = g();
10
+ return { handleModuleAdd: (e, o) => {
11
+ var s, l, u;
14
12
  try {
15
- if ((t == null ? void 0 : t.action) !== "ADD" && (t == null ? void 0 : t.action) !== "COPY")
13
+ if ((e == null ? void 0 : e.action) !== "ADD" && (e == null ? void 0 : e.action) !== "COPY")
16
14
  return;
17
- const e = (c = r == null ? void 0 : r.getTargetNode) == null ? void 0 : c.call(r), n = (l = e == null ? void 0 : e.getOuterHTML) == null ? void 0 : l.call(e);
18
- if (!e || typeof n != "string")
15
+ const t = (s = o == null ? void 0 : o.getTargetNode) == null ? void 0 : s.call(o), r = (l = t == null ? void 0 : t.getOuterHTML) == null ? void 0 : l.call(t);
16
+ if (!t || typeof r != "string")
19
17
  return;
20
- let o = M(n), i = !1;
21
- s("legacyUnsubscribeConversion") && ({ html: o, converted: i } = O(o));
22
- const a = v(L((u = p.value) == null ? void 0 : u.dynamicContentList));
23
- let m = [];
24
- if (a.size > 0 && ({ html: o, unresolved: m } = D(o, a, s("liquidSyntax"))), o !== n && r.modifyHtml(e).replaceWith(o), i)
25
- try {
26
- T().isLegacyUnsubscribeModalRequested = !0;
27
- } catch (g) {
28
- console.error("Failed to request the legacy unsubscribe modal:", g);
29
- }
30
- m.length > 0 && y({
31
- type: h.Warning,
32
- message: b(E)
18
+ let n = M(r);
19
+ const c = f(O((u = p.value) == null ? void 0 : u.dynamicContentList));
20
+ let i = [];
21
+ c.size > 0 && ({ html: n, unresolved: i } = h(n, c, m("liquidSyntax"))), n !== r && o.modifyHtml(t).replaceWith(n), i.length > 0 && a({
22
+ type: D.Warning,
23
+ message: y(N)
33
24
  });
34
- } catch (e) {
35
- console.error("Failed to repair module on add:", e);
25
+ } catch (t) {
26
+ console.error("Failed to repair module on add:", t);
36
27
  }
37
28
  } };
38
29
  };
39
30
  export {
40
- E as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
41
- Y as useModuleRepair
31
+ N as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
32
+ R as useModuleRepair
42
33
  };
@@ -7,13 +7,13 @@ function L(t, r, e, o, c = "") {
7
7
  const i = `{{${c}${t}_${r}_${e}}}`, n = `{{${c}${t}_${r}_currency}}`;
8
8
  return o === "before" ? `${n} ${i}` : `${i} ${n}`;
9
9
  }
10
- function _(t) {
10
+ function A(t) {
11
11
  let r = t;
12
12
  for (; r.children.length === 1; )
13
13
  [r] = r.children;
14
14
  return r;
15
15
  }
16
- function A(t, r, e, o, c, i) {
16
+ function y(t, r, e, o, c, i) {
17
17
  switch (r) {
18
18
  case "productImage": {
19
19
  const n = t.querySelector("img");
@@ -24,7 +24,7 @@ function A(t, r, e, o, c, i) {
24
24
  }
25
25
  case "productName": {
26
26
  const n = t.querySelector("p");
27
- n && (_(n).textContent = `{{${i}${e}_${o}_name}}`);
27
+ n && (A(n).textContent = `{{${i}${e}_${o}_name}}`);
28
28
  break;
29
29
  }
30
30
  // Inline mode ("Move to next line" OFF) merges BOTH prices into one row
@@ -32,16 +32,16 @@ function A(t, r, e, o, c, i) {
32
32
  // substitute by cell content, not by the row's anchor (SD-145161).
33
33
  case "productPrice":
34
34
  case "productOldPrice": {
35
- const n = (l, d) => {
36
- l && (_(l).textContent = L(
35
+ const n = (a, l) => {
36
+ a && (A(a).textContent = L(
37
37
  e,
38
38
  o,
39
- d,
39
+ l,
40
40
  c,
41
41
  i
42
42
  ));
43
- }, s = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !s && !a ? t.querySelector("p") : null;
44
- n(s ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
43
+ }, s = t.querySelector(".product-price p"), d = t.querySelector(".product-old-price p"), u = !s && !d ? t.querySelector("p") : null;
44
+ n(s ?? (r === "productPrice" ? u : null), "price"), n(d ?? (r === "productOldPrice" ? u : null), "original_price");
45
45
  break;
46
46
  }
47
47
  case "productButton": {
@@ -70,8 +70,8 @@ function A(t, r, e, o, c, i) {
70
70
  default: {
71
71
  const n = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
72
72
  if (n) {
73
- const s = n.getAttribute("product-attr"), a = n.querySelector("p");
74
- a && (_(a).textContent = `{{${i}${e}_${o}_${s}}}`);
73
+ const s = n.getAttribute("product-attr"), d = n.querySelector("p");
74
+ d && (A(d).textContent = `{{${i}${e}_${o}_${s}}}`);
75
75
  }
76
76
  break;
77
77
  }
@@ -88,54 +88,54 @@ function b(t, r, e, o) {
88
88
  function R(t, r, e) {
89
89
  return b(t, r, 0, e);
90
90
  }
91
- function D(t, r, e, o) {
91
+ function w(t, r, e, o) {
92
92
  if (!t.innerHTML.includes("{{"))
93
93
  return;
94
94
  const { open: c, close: i } = b(t.ownerDocument, r, e, o);
95
95
  t.insertBefore(c, t.firstChild), t.appendChild(i);
96
96
  }
97
- function w(t, r, e, o) {
97
+ function D(t, r, e, o) {
98
98
  var n, s;
99
99
  if (!t.innerHTML.includes("{{"))
100
100
  return;
101
101
  const { open: c, close: i } = b(t.ownerDocument, r, e, o);
102
102
  (n = t.parentNode) == null || n.insertBefore(c, t), (s = t.parentNode) == null || s.insertBefore(i, t.nextSibling);
103
103
  }
104
- function W(t, r, e, o) {
104
+ function v(t, r, e, o) {
105
105
  t.querySelectorAll(".recommendation-product-row").forEach((i, n) => {
106
- i.querySelectorAll("[data-attribute-type]").forEach((a) => {
107
- const u = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
108
- l.length > 0 ? l.forEach((d) => {
109
- A(d, u, r, n, e, o);
110
- }) : A(a, u, r, n, e, o);
111
- }), w(i, r, n, o);
106
+ i.querySelectorAll("[data-attribute-type]").forEach((d) => {
107
+ const u = d.getAttribute("data-attribute-type") || "", a = d.querySelectorAll(".attribute-cell");
108
+ a.length > 0 ? a.forEach((l) => {
109
+ y(l, u, r, n, e, o);
110
+ }) : y(d, u, r, n, e, o);
111
+ }), D(i, r, n, o);
112
112
  });
113
113
  }
114
- function v(t, r, e, o) {
114
+ function H(t, r, e, o) {
115
115
  const c = t.querySelectorAll(".recommendation-product-row");
116
116
  if (!c.length)
117
117
  return;
118
118
  const [i] = c, n = i.querySelector("[data-attribute-type]"), s = n ? n.querySelectorAll(".attribute-cell").length : 1;
119
- c.forEach((a, u) => {
120
- a.querySelectorAll("[data-attribute-type]").forEach((d) => {
121
- const p = d.getAttribute("data-attribute-type") || "";
122
- d.querySelectorAll(".attribute-cell").forEach((f, m) => {
123
- const h = u * s + m;
124
- A(f, p, r, h, e, o), D(f, r, h, o);
119
+ c.forEach((d, u) => {
120
+ d.querySelectorAll("[data-attribute-type]").forEach((l) => {
121
+ const p = l.getAttribute("data-attribute-type") || "";
122
+ l.querySelectorAll(".attribute-cell").forEach((f, h) => {
123
+ const S = u * s + h;
124
+ y(f, p, r, S, e, o), w(f, r, S, o);
125
125
  });
126
126
  });
127
127
  });
128
128
  }
129
- function H(t, r, e, o) {
129
+ function W(t, r, e, o) {
130
130
  t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
131
- v(i, r, e, o);
131
+ H(i, r, e, o);
132
132
  });
133
133
  }
134
134
  function F(t, r, e) {
135
135
  const o = t.getAttribute("data-layout") || "grid", c = t.getAttribute("currency-alignment") || "after";
136
- o === "list" ? W(t, r, c, e) : H(t, r, c, e);
136
+ o === "list" ? v(t, r, c, e) : W(t, r, c, e);
137
137
  }
138
- function y(t, r, e) {
138
+ function _(t, r, e) {
139
139
  const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), c = t.match(o);
140
140
  return c ? parseInt(c[1]) : e;
141
141
  }
@@ -150,7 +150,7 @@ function C(t) {
150
150
  const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
151
151
  return e && $(e[1]) ? e[1] : null;
152
152
  }
153
- function G(t, r) {
153
+ function x(t, r) {
154
154
  let e = t.parentElement;
155
155
  for (; e && e !== r; ) {
156
156
  if (e.tagName === "TD" && C(e))
@@ -159,35 +159,37 @@ function G(t, r) {
159
159
  }
160
160
  return null;
161
161
  }
162
- function V(t) {
163
- const r = t.getAttribute("style") || "", e = y(r, "width", 600), o = y(r, "padding", 0) * 2, c = Math.max(0, e - o);
162
+ function G(t) {
163
+ const r = t.getAttribute("style") || "", e = _(r, "width", 600), o = _(r, "padding", 0) * 2, c = Math.max(0, e - o);
164
164
  c !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
165
165
  if (i.hasAttribute("width"))
166
166
  return;
167
- const n = G(i, t);
167
+ const n = x(i, t);
168
168
  if (!n)
169
169
  return;
170
- const s = C(n), a = y(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), l = Math.max(1, u - a);
171
- i.setAttribute("width", String(l));
172
- const d = i.getAttribute("style") || "";
173
- if (!/\bwidth\s*:\s*\d/i.test(d)) {
174
- const p = d && !d.trim().endsWith(";") ? "; " : "";
175
- i.setAttribute("style", `${d}${p}width: ${l}px`);
170
+ const s = C(n), d = _(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), a = Math.max(1, u - d), l = i.getAttribute("style") || "", p = /(?:^|[;\s])max-height\s*:\s*(\d+(?:\.\d+)?)px/i.exec(l);
171
+ if (p) {
172
+ i.setAttribute("width", String(Math.max(1, Math.min(a, Math.floor(parseFloat(p[1])))))), i.removeAttribute("height");
173
+ return;
174
+ }
175
+ if (i.setAttribute("width", String(a)), !/\bwidth\s*:\s*\d/i.test(l)) {
176
+ const m = l && !l.trim().endsWith(";") ? "; " : "";
177
+ i.setAttribute("style", `${l}${m}width: ${a}px`);
176
178
  }
177
179
  });
178
180
  }
179
- const E = "MSO_MOBILE_HIDE_START", U = "MSO_MOBILE_HIDE_END";
180
- function X(t, r) {
181
+ const E = "MSO_MOBILE_HIDE_START", V = "MSO_MOBILE_HIDE_END";
182
+ function U(t, r) {
181
183
  t.querySelectorAll(q).forEach((e) => {
182
184
  var i, n;
183
185
  const o = e.querySelector(M);
184
186
  if (!o || o.children.length === 0)
185
187
  return;
186
188
  const c = e.previousSibling;
187
- (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(U), e.nextSibling));
189
+ (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(V), e.nextSibling));
188
190
  });
189
191
  }
190
- function j(t, r) {
192
+ function X(t, r) {
191
193
  const e = t.match(/<!DOCTYPE[^>]*>/i);
192
194
  return (e ? `${e[0]}
193
195
  ` : "") + r.documentElement.outerHTML;
@@ -200,17 +202,17 @@ function Q(t) {
200
202
  i.recommendationCampaignUrls = {};
201
203
  const { isFeatureEnabled: n } = g(), s = n("liquidSyntax") ? "reco_" : "";
202
204
  return o.forEach((u) => {
203
- var d, p, S, f;
204
- const l = u.getAttribute("recommendation-id");
205
- if (l) {
206
- if ((d = u.parentNode) == null || d.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((m) => m.remove()), c(l), X(u, e), !T(u)) {
207
- F(u, l, s);
208
- const { open: m, close: h } = R(e, l, s);
209
- (S = u.parentNode) == null || S.insertBefore(m, u), (f = u.parentNode) == null || f.insertBefore(h, u.nextSibling);
205
+ var l, p, m, f;
206
+ const a = u.getAttribute("recommendation-id");
207
+ if (a) {
208
+ if ((l = u.parentNode) == null || l.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((h) => h.remove()), c(a), U(u, e), !T(u)) {
209
+ F(u, a, s);
210
+ const { open: h, close: S } = R(e, a, s);
211
+ (m = u.parentNode) == null || m.insertBefore(h, u), (f = u.parentNode) == null || f.insertBefore(S, u.nextSibling);
210
212
  }
211
- V(u);
213
+ G(u);
212
214
  }
213
- }), j(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
215
+ }), X(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
214
216
  }
215
217
  export {
216
218
  L as formatPriceVariable,
@@ -0,0 +1,5 @@
1
+ import { stripFullStoryScripts as t } from "../../utils/fullStoryScripts.js";
2
+ const i = (r) => t(r);
3
+ export {
4
+ i as migrateFullStoryScripts
5
+ };
@@ -1,18 +1,18 @@
1
1
  import { migrateCheckbox as i } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as e } from "./couponBlockMigrator.js";
3
- import { migrateItemsBlock as a } from "./itemsBlockMigrator.js";
4
- import { migrateLegacyUnsubscribeText as n } from "./legacyUnsubscribeTextMigrator.js";
3
+ import { migrateFullStoryScripts as a } from "./fullStoryScriptMigrator.js";
4
+ import { migrateItemsBlock as n } from "./itemsBlockMigrator.js";
5
5
  import { migrateProductNameLink as c } from "./productNameLinkMigrator.js";
6
6
  import { migrateRadioButton as g } from "./radioButtonMigrator.js";
7
- import { migrateRecommendation as f } from "./recommendationMigrator.js";
8
- import { migrateRecommendationPartnerScope as p } from "./recommendationPartnerMigrator.js";
9
- import { migrateRecommendationTitle as s } from "./recommendationTitleMigrator.js";
10
- import { migrateSocialIcons as d } from "./socialIconMigrator.js";
11
- import { migrateUnsubscribe as l } from "./unsubscribeMigrator.js";
12
- const T = async (o, t = {}, r) => {
7
+ import { migrateRecommendation as p } from "./recommendationMigrator.js";
8
+ import { migrateRecommendationPartnerScope as f } from "./recommendationPartnerMigrator.js";
9
+ import { migrateRecommendationTitle as l } from "./recommendationTitleMigrator.js";
10
+ import { migrateSocialIcons as s } from "./socialIconMigrator.js";
11
+ import { migrateUnsubscribe as d } from "./unsubscribeMigrator.js";
12
+ const h = async (o, t = {}, r) => {
13
13
  let m = o;
14
- return m = i(m), m = g(m), m = n(m), m = await l(m), m = e(m), m = f(m, t), r && (m = p(m, r)), m = s(m), m = a(m), m = c(m), m = d(m), m;
14
+ return m = i(m), m = g(m), m = await d(m), m = e(m), m = p(m, t), r && (m = f(m, r)), m = l(m), m = n(m), m = c(m), m = s(m), m = a(m), m;
15
15
  };
16
16
  export {
17
- T as migrate
17
+ h as migrate
18
18
  };
@@ -2,8 +2,7 @@ const e = "https://academy.insiderone.com", o = {
2
2
  EMAIL_EDITOR: `${e}/docs/email-drag-and-drop-editor`,
3
3
  GLOBAL_UNSUBSCRIBE: `${e}/docs/global-unsubscribe-preference-center`,
4
4
  AMP_FOR_EMAILS: `${e}/docs/amp-for-emails`,
5
- EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`,
6
- LEGACY_UNSUBSCRIBE_MODULE: `${e}/docs/new-editor-add-unsubscribe-pages-into-emails`
5
+ EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`
7
6
  };
8
7
  export {
9
8
  o as ACADEMY_LINKS