@useinsider/guido 2.1.0-beta.3b5e21d → 2.1.0-beta.3d5480e

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 (62) hide show
  1. package/README.md +77 -2
  2. package/dist/@types/config/schemas.js +70 -65
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +73 -62
  5. package/dist/composables/useBlocksConfig.js +26 -16
  6. package/dist/composables/useSave.js +16 -12
  7. package/dist/composables/useStripo.js +61 -57
  8. package/dist/composables/useStripoEventHandler.js +27 -12
  9. package/dist/composables/useSyncModuleExtractor.js +45 -0
  10. package/dist/config/compiler/utils/recommendationCompilerUtils.js +22 -17
  11. package/dist/config/migrator/itemsBlockMigrator.js +101 -97
  12. package/dist/enums/defaults.js +8 -4
  13. package/dist/enums/unsubscribe.js +25 -21
  14. package/dist/extensions/Blocks/Recommendation/block.js +24 -23
  15. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +27 -26
  16. package/dist/extensions/Blocks/Recommendation/constants/layout.js +6 -4
  17. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +12 -10
  18. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +11 -10
  19. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +87 -37
  20. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +138 -117
  21. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
  22. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +25 -30
  23. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +27 -30
  24. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +20 -25
  25. package/dist/extensions/Blocks/Recommendation/templates/utils.js +31 -15
  26. package/dist/extensions/ModulesTabIcons/extension.js +17 -0
  27. package/dist/guido.css +1 -1
  28. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +257 -187
  29. package/dist/services/stripoApi.js +48 -12
  30. package/dist/src/@types/config/schemas.d.ts +9 -1
  31. package/dist/src/@types/events.d.ts +38 -2
  32. package/dist/src/components/Guido.vue.d.ts +2 -2
  33. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  34. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  35. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  36. package/dist/src/composables/useConfig.d.ts +4 -0
  37. package/dist/src/composables/useGuidoActions.d.ts +1 -1
  38. package/dist/src/composables/useSave.d.ts +2 -2
  39. package/dist/src/composables/useStripo.d.ts +2 -2
  40. package/dist/src/composables/useSyncModuleExtractor.d.ts +4 -0
  41. package/dist/src/enums/defaults.d.ts +4 -0
  42. package/dist/src/enums/unsubscribe.d.ts +3 -0
  43. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
  44. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +6 -0
  45. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +4 -0
  46. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +22 -4
  47. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +9 -2
  48. package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
  49. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +1 -1
  50. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +2 -0
  51. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +11 -2
  52. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  53. package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
  54. package/dist/src/mock/api/settings.d.ts +2 -0
  55. package/dist/src/services/stripoApi.d.ts +5 -0
  56. package/dist/src/stores/config.d.ts +36 -0
  57. package/dist/src/stores/editor.d.ts +23 -0
  58. package/dist/src/utils/templatePreparation.d.ts +1 -1
  59. package/dist/static/styles/customEditorStyle.css.js +10 -9
  60. package/dist/stores/editor.js +2 -1
  61. package/dist/utils/templatePreparation.js +1 -1
  62. package/package.json +1 -1
@@ -1,17 +1,21 @@
1
- import { useConfig as l } from "./useConfig.js";
2
- import { useSaveStart as m, useSaveComplete as c } from "./useGuidoActions.js";
3
- import { useTemplatePreparation as d } from "../utils/templatePreparation.js";
4
- import { useHtmlValidator as p } from "./useHtmlValidator.js";
5
- const w = () => {
6
- const i = m(), s = c(), { validateHtml: o } = p(), { callbacks: a } = l();
7
- return { save: async (r = !1) => {
1
+ import { useConfig as d } from "./useConfig.js";
2
+ import { useSaveStart as p, useSaveComplete as f } from "./useGuidoActions.js";
3
+ import { useSyncModuleExtractor as v } from "./useSyncModuleExtractor.js";
4
+ import { useStripoApi as S } from "../services/stripoApi.js";
5
+ import { useTemplatePreparation as x } from "../utils/templatePreparation.js";
6
+ import { useHtmlValidator as V } from "./useHtmlValidator.js";
7
+ const g = () => {
8
+ const o = p(), s = f(), { validateHtml: i } = V(), { callbacks: a } = d(), { extractSyncModuleData: r } = v(), { setSyncModuleUnsubscriptionPages: n } = S();
9
+ return { save: async (l = !1) => {
8
10
  var e;
9
- i();
10
- const { prepareTemplateDetails: n } = d(), t = await n();
11
- if (await o(t.compiledHtml, t.dynamicContentList, !0) && !((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)))
12
- return r || s(t), t;
11
+ o();
12
+ const { prepareTemplateDetails: c } = x(), t = await c();
13
+ if (!await i(t.compiledHtml, t.dynamicContentList, !0) || (e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t))
14
+ return;
15
+ const { unsubscribePayload: m, stripoModules: u } = r(t.rawHtml);
16
+ return await n(m), t.modules = u, l || s(t), t;
13
17
  } };
14
18
  };
15
19
  export {
16
- w as useSave
20
+ g as useSave
17
21
  };
@@ -1,26 +1,26 @@
1
- import { useActionsApi as _ } from "./useActionsApi.js";
2
- import { useBlocksConfig as B } from "./useBlocksConfig.js";
3
- import { useConfig as v } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
5
- import { useStripoEventHandler as F } from "./useStripoEventHandler.js";
6
- import { useToaster as D } from "./useToaster.js";
7
- import { displayConditions as I } from "../enums/displayConditions.js";
8
- import { useStripoApi as M } from "../services/stripoApi.js";
9
- import U from "../static/styles/customEditorStyle.css.js";
10
- import { useEditorStore as P } from "../stores/editor.js";
11
- import { dynamicContentToMergeTags as R } from "../utils/genericUtil.js";
12
- import H from "../package.json.js";
13
- const W = (c) => {
14
- const { features: l, template: y } = v(), { handleError: u } = D(), { getToken: C, getCustomFonts: S } = M(), { handleEvent: E } = F(), { getStripoBlocksConfig: h } = B(), w = async (i, n = []) => {
15
- var m, g, f;
16
- const o = P(), { html: r, css: p } = i, { baseBlocks: s, extensions: t } = await h(), a = ((m = l.value) == null ? void 0 : m.displayConditions) ?? !0, k = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, T = ((f = y.value) == null ? void 0 : f.forceRecreate) ?? !1;
1
+ import { useActionsApi as A } from "./useActionsApi.js";
2
+ import { useBlocksConfig as F } from "./useBlocksConfig.js";
3
+ import { useConfig as D } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as I } from "./useCustomInterfaceAppearance.js";
5
+ import { useStripoEventHandler as U } from "./useStripoEventHandler.js";
6
+ import { useToaster as P } from "./useToaster.js";
7
+ import { displayConditions as R } from "../enums/displayConditions.js";
8
+ import { useStripoApi as H } from "../services/stripoApi.js";
9
+ import O from "../static/styles/customEditorStyle.css.js";
10
+ import { useEditorStore as S } from "../stores/editor.js";
11
+ import { dynamicContentToMergeTags as q } from "../utils/genericUtil.js";
12
+ import x from "../package.json.js";
13
+ const ee = (C, c) => {
14
+ const { features: l, template: E } = D(), { handleError: u } = P(), { getToken: h, getCustomFonts: w, getSyncModulesStatus: b } = H(), { handleEvent: k } = U(), { getStripoBlocksConfig: T } = F(), V = async (i, n = [], r = !1) => {
15
+ var g, f, y;
16
+ const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await T(), p = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, B = ((f = l.value) == null ? void 0 : f.modulesDisabled) ?? !1, v = ((y = E.value) == null ? void 0 : y.forceRecreate) ?? !1;
17
17
  window.UIEditor.initEditor(
18
18
  document.querySelector("#guido-editor"),
19
19
  {
20
- metadata: c,
21
- html: r,
22
- css: p,
23
- forceRecreate: T,
20
+ metadata: C,
21
+ html: m,
22
+ css: a,
23
+ forceRecreate: v,
24
24
  locale: "en",
25
25
  undoButtonSelector: "#guido__undo-button",
26
26
  redoButtonSelector: "#guido__redo-button",
@@ -30,19 +30,20 @@ const W = (c) => {
30
30
  customAppearanceMergetags: !0,
31
31
  customAppearanceMergetagsBorderColor: "#f1f3fe",
32
32
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
33
- customViewStyles: U,
34
- conditionsEnabled: a,
35
- customConditionsEnabled: a,
36
- conditionCategories: I,
33
+ customViewStyles: O,
34
+ conditionsEnabled: p,
35
+ customConditionsEnabled: p,
36
+ conditionCategories: R,
37
37
  enableXSSSecurity: !0,
38
- modulesDisabled: k,
38
+ modulesDisabled: B,
39
+ syncModulesEnabled: r,
39
40
  messageSettingsEnabled: !0,
40
41
  displayGmailAnnotations: !0,
41
42
  displayHiddenPreheader: !1,
42
43
  displayTitle: !1,
43
44
  displayUTM: !1,
44
45
  selectElementAfterDrop: !0,
45
- ...s ? { baseBlocks: s } : {},
46
+ ...o ? { baseBlocks: o } : {},
46
47
  editorFonts: {
47
48
  showDefaultStandardFonts: !0,
48
49
  showDefaultNotStandardFonts: !0,
@@ -50,68 +51,71 @@ const W = (c) => {
50
51
  },
51
52
  mergeTags: [
52
53
  {
53
- entries: R(c.preselectedDynamicContentList)
54
+ entries: q(c.preselectedDynamicContentList)
54
55
  }
55
56
  ],
56
- async onTokenRefreshRequest(e) {
57
+ async onTokenRefreshRequest(t) {
57
58
  try {
58
- const d = await C();
59
- e(d);
60
- } catch (d) {
61
- u(d, "Failed to refresh token");
59
+ const s = await h();
60
+ t(s);
61
+ } catch (s) {
62
+ u(s, "Failed to refresh token");
62
63
  }
63
64
  },
64
65
  onTemplateLoaded() {
65
66
  try {
66
- const { importCss: e } = A(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: V } = _();
67
- e(), d(), V(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
68
- o.hasChanges = !1;
67
+ const { importCss: t } = I(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: M } = A();
68
+ t(), s(), M(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
69
+ e.hasChanges = !1;
69
70
  }, 1e3);
70
- } catch (e) {
71
- u(e, "Failed to load custom interface appearance");
71
+ } catch (t) {
72
+ u(t, "Failed to load custom interface appearance");
72
73
  }
73
74
  },
74
- onCodeEditorVisibilityChanged(e) {
75
- o.isCodeEditorOpen = e;
75
+ onCodeEditorVisibilityChanged(t) {
76
+ e.isCodeEditorOpen = t;
76
77
  },
77
- onEditorVisualModeChanged(e) {
78
- o.editorVisualMode = e.toLowerCase();
78
+ onEditorVisualModeChanged(t) {
79
+ e.editorVisualMode = t.toLowerCase();
79
80
  },
80
- onVersionHistoryVisibilityChanged(e) {
81
- o.isVersionHistoryOpen = e;
81
+ onVersionHistoryVisibilityChanged(t) {
82
+ e.isVersionHistoryOpen = t;
82
83
  },
83
84
  onDataChanged() {
84
- o.hasChanges = !0;
85
+ e.hasChanges = !0;
85
86
  },
86
- onEvent: E,
87
+ onEvent: k,
87
88
  ignoreClickOutsideSelectors: [
88
89
  "#guido-dynamic-content-modal",
89
90
  ".in-on-board-wrapper",
90
91
  ".in-drawer__container"
91
92
  ],
92
- extensions: t
93
+ extensions: d
93
94
  }
94
95
  );
95
- }, b = (i) => new Promise((n, o) => {
96
- var a;
96
+ }, _ = (i) => new Promise((n, r) => {
97
+ var d;
97
98
  if (document.getElementById("UiEditorScript")) {
98
99
  i(), n();
99
100
  return;
100
101
  }
101
- const r = H.guido, s = `https://email-static.useinsider.com/guido/${(a = r == null ? void 0 : r.stripo) == null ? void 0 : a.version}/UIEditor.js`, t = document.createElement("script");
102
- t.id = "UiEditorScript", t.type = "module", t.src = s, t.onload = () => {
102
+ const e = x.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
103
+ o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
103
104
  i(), n();
104
- }, t.onerror = () => {
105
- o(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
106
- }, document.body.appendChild(t);
105
+ }, o.onerror = () => {
106
+ r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
107
+ }, document.body.appendChild(o);
107
108
  });
108
109
  return { initPlugin: async (i) => {
109
- await b(async () => {
110
- const n = await S();
111
- await w(i, n);
110
+ await _(async () => {
111
+ const n = S(), [r, e] = await Promise.all([
112
+ w(),
113
+ b()
114
+ ]);
115
+ n.syncModulesEnabled = e, await V(i, r, e);
112
116
  });
113
117
  } };
114
118
  };
115
119
  export {
116
- W as useStripo
120
+ ee as useStripo
117
121
  };
@@ -1,20 +1,35 @@
1
- import { useOnboardingStore as i } from "../stores/onboarding.js";
2
- const c = () => {
3
- const e = {
4
- block_dropped: ({ blockName: t }) => {
5
- if (t === "BLOCK_TEXT") {
6
- const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
7
- if (o || r)
1
+ import { useStripoApi as i } from "../services/stripoApi.js";
2
+ import { useEditorStore as u } from "../stores/editor.js";
3
+ import { useOnboardingStore as l } from "../stores/onboarding.js";
4
+ import { useUnsubscribeStore as b } from "../stores/unsubscribe.js";
5
+ const v = () => {
6
+ const { updateSyncModule: d, getSyncModule: r } = i(), n = u(), s = b(), a = {
7
+ block_dropped: ({ blockName: e }) => {
8
+ if (e === "BLOCK_TEXT") {
9
+ const o = l(), t = !o.shouldShowOnboarding("textBlockOnboarding"), c = o.isActive("textBlockOnboarding");
10
+ if (t || c)
8
11
  return;
9
- n.start("textBlockOnboarding");
12
+ o.start("textBlockOnboarding");
10
13
  }
14
+ },
15
+ module_saved: async (e) => {
16
+ n.syncModulesEnabled && (console.debug("[module_saved] Saved module data:", e), await d(e));
17
+ },
18
+ module_dropped: async (e) => {
19
+ if (!n.syncModulesEnabled)
20
+ return;
21
+ const { moduleId: o } = e, t = await r(o);
22
+ console.debug("[module_dropped] Sync module data:", t), t.unsubscriptionPreferencePages.length && await s.fetchTemplates();
23
+ },
24
+ module_updated: async (e) => {
25
+ n.syncModulesEnabled && (console.debug("[module_updated] Updated module data:", e), await d(e));
11
26
  }
12
27
  };
13
- return { handleEvent: async (t, n) => {
14
- const o = e[t];
15
- o && await o(n);
28
+ return { handleEvent: async (e, o) => {
29
+ const t = a[e];
30
+ console.debug("Stripo Event: ", e, o), t && await t(o);
16
31
  } };
17
32
  };
18
33
  export {
19
- c as useStripoEventHandler
34
+ v as useStripoEventHandler
20
35
  };
@@ -0,0 +1,45 @@
1
+ import { UNSUBSCRIBE_SYNC_MODULE_TYPES as T } from "../enums/unsubscribe.js";
2
+ import { DATA_ATTRIBUTES as p } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
+ import { useEditorStore as f } from "../stores/editor.js";
4
+ const y = ".esd-synchronizable-module", A = '[esd-extension-block-id="unsubscribe-block"]', _ = "esd-custom-block-id", B = () => {
5
+ const d = f();
6
+ return { extractSyncModuleData: (E) => {
7
+ const S = {
8
+ unsubscribePayload: [],
9
+ stripoModules: []
10
+ };
11
+ if (!d.syncModulesEnabled)
12
+ return S;
13
+ const b = new DOMParser().parseFromString(E, "text/html").querySelectorAll(y), r = [], s = [];
14
+ return b.forEach((o) => {
15
+ const t = o.getAttribute(_);
16
+ if (!t)
17
+ return;
18
+ const n = o.querySelectorAll(A);
19
+ if (n.length === 0) {
20
+ s.push(Number(t));
21
+ return;
22
+ }
23
+ n.forEach((c) => {
24
+ const u = c.getAttribute(p.PAGE_LIST), i = c.getAttribute(p.PAGE_TYPE);
25
+ if (!u || !i)
26
+ return;
27
+ const m = parseInt(i), a = T[m];
28
+ if (!a)
29
+ return;
30
+ const l = u.split(",").map((e) => parseInt(e.trim())).filter((e) => !Number.isNaN(e));
31
+ l.length !== 0 && r.push({
32
+ stripoModuleId: t,
33
+ unsubscriptionPreferencePages: l,
34
+ type: a
35
+ });
36
+ });
37
+ }), {
38
+ unsubscribePayload: r,
39
+ stripoModules: s
40
+ };
41
+ } };
42
+ };
43
+ export {
44
+ B as useSyncModuleExtractor
45
+ };
@@ -1,9 +1,9 @@
1
1
  import { useRecommendation as _ } from "../../../composables/useRecommendation.js";
2
2
  function b(e, u, r, o) {
3
- const s = `{{${e}_${u}_${r}}}`, t = `{{${e}_${u}_currency}}`;
4
- return o === "before" ? `${t} ${s}` : `${s} ${t}`;
3
+ const n = `{{${e}_${u}_${r}}}`, t = `{{${e}_${u}_currency}}`;
4
+ return o === "before" ? `${t} ${n}` : `${n} ${t}`;
5
5
  }
6
- function p(e, u, r, o, s) {
6
+ function p(e, u, r, o, n) {
7
7
  switch (u) {
8
8
  case "productImage": {
9
9
  const t = e.querySelector("img");
@@ -24,7 +24,7 @@ function p(e, u, r, o, s) {
24
24
  const t = e.querySelector("p");
25
25
  if (t) {
26
26
  const c = t.querySelector("strong") || t;
27
- c.textContent = b(r, o, "price", s);
27
+ c.textContent = b(r, o, "price", n);
28
28
  }
29
29
  break;
30
30
  }
@@ -36,7 +36,7 @@ function p(e, u, r, o, s) {
36
36
  r,
37
37
  o,
38
38
  "original_price",
39
- s
39
+ n
40
40
  ), t.setAttribute("product-attr", "discount");
41
41
  }
42
42
  break;
@@ -67,12 +67,12 @@ function p(e, u, r, o, s) {
67
67
  }
68
68
  }
69
69
  function $(e, u, r) {
70
- e.querySelectorAll(".recommendation-product-row").forEach((s, t) => {
71
- s.querySelectorAll("[data-attribute-type]").forEach((n) => {
72
- const i = n.getAttribute("data-attribute-type") || "", a = n.querySelectorAll(".attribute-cell");
70
+ e.querySelectorAll(".recommendation-product-row").forEach((n, t) => {
71
+ n.querySelectorAll("[data-attribute-type]").forEach((s) => {
72
+ const i = s.getAttribute("data-attribute-type") || "", a = s.querySelectorAll(".attribute-cell");
73
73
  a.length > 0 ? a.forEach((l) => {
74
74
  p(l, i, u, t, r);
75
- }) : p(n, i, u, t, r);
75
+ }) : p(s, i, u, t, r);
76
76
  });
77
77
  });
78
78
  }
@@ -80,9 +80,9 @@ function S(e, u, r) {
80
80
  const o = e.querySelectorAll(".recommendation-product-row");
81
81
  if (!o.length)
82
82
  return;
83
- const [s] = o, t = s.querySelector("[data-attribute-type]"), c = t ? t.querySelectorAll(".attribute-cell").length : 1;
84
- o.forEach((n, i) => {
85
- n.querySelectorAll("[data-attribute-type]").forEach((l) => {
83
+ const [n] = o, t = n.querySelector("[data-attribute-type]"), c = t ? t.querySelectorAll(".attribute-cell").length : 1;
84
+ o.forEach((s, i) => {
85
+ s.querySelectorAll("[data-attribute-type]").forEach((l) => {
86
86
  const f = l.getAttribute("data-attribute-type") || "";
87
87
  l.querySelectorAll(".attribute-cell").forEach((y, m) => {
88
88
  const A = i * c + m;
@@ -91,9 +91,14 @@ function S(e, u, r) {
91
91
  });
92
92
  });
93
93
  }
94
- function q(e, u) {
94
+ function q(e, u, r) {
95
+ e.querySelectorAll(".ins-recommendation-product-container").forEach((n) => {
96
+ S(n, u, r);
97
+ });
98
+ }
99
+ function d(e, u) {
95
100
  const r = e.getAttribute("data-layout") || "grid", o = e.getAttribute("currency-alignment") || "after";
96
- r === "list" ? $(e, u, o) : S(e, u, o);
101
+ r === "list" ? $(e, u, o) : q(e, u, o);
97
102
  }
98
103
  function h(e, u) {
99
104
  const r = e.match(/<!DOCTYPE[^>]*>/i);
@@ -104,10 +109,10 @@ function w(e) {
104
109
  const u = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), r = new DOMParser().parseFromString(u, "text/html"), o = r.querySelectorAll(".ins-recommendation-v3-block-v2");
105
110
  if (!o.length)
106
111
  return e;
107
- const { buildCampaignUrl: s } = _();
112
+ const { buildCampaignUrl: n } = _();
108
113
  return o.forEach((c) => {
109
- const n = c.getAttribute("recommendation-id");
110
- n && (s(n), q(c, n));
114
+ const s = c.getAttribute("recommendation-id");
115
+ s && (n(s), d(c, s));
111
116
  }), h(u, r).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
112
117
  }
113
118
  export {