@useinsider/guido 3.2.0-beta.97c35ff → 3.2.0-beta.9966888

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 (148) hide show
  1. package/README.md +117 -1
  2. package/dist/@types/config/schemas.js +153 -95
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +90 -88
  5. package/dist/components/organisms/AutoSaveController.vue.js +17 -0
  6. package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
  7. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  8. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  9. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  10. package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  12. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  13. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  14. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  15. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  16. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  17. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  18. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  19. package/dist/composables/useActionsApi.js +4 -4
  20. package/dist/composables/useAutoSave.js +71 -0
  21. package/dist/composables/useFullStoryBridge.js +14 -0
  22. package/dist/composables/useRecommendation.js +46 -26
  23. package/dist/composables/useRibbonOffset.js +21 -0
  24. package/dist/composables/useSave.js +19 -16
  25. package/dist/composables/useStripo.js +42 -42
  26. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  27. package/dist/config/compiler/recommendationCompilerRules.js +79 -74
  28. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  29. package/dist/config/compiler/utils/recommendationCompilerUtils.js +107 -71
  30. package/dist/config/migrator/index.js +9 -9
  31. package/dist/config/migrator/radioButtonMigrator.js +64 -44
  32. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  33. package/dist/config/migrator/recommendation/extractors.js +27 -0
  34. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  35. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  36. package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
  37. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  38. package/dist/config/migrator/recommendationMigrator.js +74 -290
  39. package/dist/enums/extensions/recommendationBlock.js +43 -96
  40. package/dist/enums/onboarding.js +7 -2
  41. package/dist/enums/unsubscribe.js +36 -30
  42. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  43. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
  44. package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
  45. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  46. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  47. package/dist/extensions/Blocks/Recommendation/block.js +35 -32
  48. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  49. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  50. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  51. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  52. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +27 -26
  53. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  54. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +228 -181
  55. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  56. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  57. package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
  58. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  59. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +123 -79
  60. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +19 -10
  61. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +8 -8
  62. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -15
  63. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  64. package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
  65. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  66. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
  67. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  68. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  69. package/dist/guido.css +1 -1
  70. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
  71. package/dist/node_modules/valibot/dist/index.js +450 -235
  72. package/dist/package.json.js +1 -1
  73. package/dist/services/templateLibraryApi.js +5 -4
  74. package/dist/services/unsubscribeApi.js +6 -6
  75. package/dist/src/@types/config/defaults.d.ts +5 -1
  76. package/dist/src/@types/config/index.d.ts +3 -3
  77. package/dist/src/@types/config/schemas.d.ts +217 -0
  78. package/dist/src/@types/config/types.d.ts +9 -1
  79. package/dist/src/components/Guido.vue.d.ts +1 -1
  80. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
  81. package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
  82. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  83. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  84. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  85. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  86. package/dist/src/composables/useActionsApi.d.ts +1 -1
  87. package/dist/src/composables/useAutoSave.d.ts +3 -0
  88. package/dist/src/composables/useConfig.d.ts +58 -0
  89. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  90. package/dist/src/composables/useRecommendation.d.ts +10 -1
  91. package/dist/src/composables/useRecommendation.test.d.ts +1 -0
  92. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  93. package/dist/src/composables/useSave.d.ts +1 -1
  94. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  95. package/dist/src/config/migrator/index.d.ts +2 -1
  96. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  97. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  98. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  99. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  100. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  101. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  102. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  103. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  104. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  105. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  106. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  107. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  108. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  109. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  110. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  111. package/dist/src/enums/onboarding.d.ts +6 -0
  112. package/dist/src/enums/unsubscribe.d.ts +8 -8
  113. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  114. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  115. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  117. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  118. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  119. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  120. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
  121. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  122. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
  123. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  124. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
  125. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
  126. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  127. package/dist/src/library.d.ts +1 -1
  128. package/dist/src/stores/autosave.d.ts +12 -0
  129. package/dist/src/stores/config.d.ts +522 -0
  130. package/dist/src/stores/editor.d.ts +23 -0
  131. package/dist/src/stores/onboarding.d.ts +4 -0
  132. package/dist/src/utils/htmlEscape.d.ts +5 -0
  133. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  134. package/dist/src/utils/timeUtil.d.ts +8 -0
  135. package/dist/static/styles/components/button.css.js +16 -9
  136. package/dist/static/styles/components/loader.css.js +4 -0
  137. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  138. package/dist/stores/autosave.js +17 -0
  139. package/dist/stores/editor.js +3 -1
  140. package/dist/stores/onboarding.js +4 -0
  141. package/dist/utils/htmlEscape.js +13 -0
  142. package/dist/utils/pairProductVariables.js +89 -88
  143. package/dist/utils/templatePreparation.js +72 -32
  144. package/dist/utils/timeUtil.js +19 -0
  145. package/package.json +7 -3
  146. package/dist/enums/displayConditions.js +0 -84
  147. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  148. package/dist/src/enums/displayConditions.d.ts +0 -6
@@ -2,10 +2,15 @@ const e = [
2
2
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
3
3
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
4
4
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
5
- ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', o = ".in-ribbons-wrapper";
5
+ ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', E = ".in-ribbons-wrapper", o = ".guido__amp-toggle-html", a = ".in-segments-wrapper", O = '[data-testid="guido-header"]', _ = 158, i = 10;
6
6
  export {
7
+ o as AMP_TOGGLE_BUTTON_SELECTOR,
8
+ a as AMP_TOGGLE_WRAPPER_SELECTOR,
7
9
  n as CARD_COMPOSITION_TAB_SELECTOR,
8
- o as RIBBON_SELECTOR,
10
+ O as HEADER_SELECTOR,
11
+ _ as POPOVER_LEFT_OFFSET,
12
+ i as POPOVER_TOP_GAP,
13
+ E as RIBBON_SELECTOR,
9
14
  e as SERVICE_HOVER_SELECTORS,
10
15
  s as SETTINGS_TAB_SELECTOR,
11
16
  t as UI_EDITOR_SELECTOR
@@ -1,29 +1,35 @@
1
- import { useTranslations as e } from "../composables/useTranslations.js";
2
- import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
3
- const _ = {
1
+ import { useTranslations as R } from "../composables/useTranslations.js";
2
+ import { ProductType as s } from "../@types/config/schemas.js";
3
+ import "../@types/config/defaults.js";
4
+ import { getEnvironmentPrefix as S } from "../utils/environmentUtil.js";
5
+ const B = {
4
6
  UNSUBSCRIBE_LINK_TYPE: 1,
5
7
  PREFERENCES_LINK_TYPE: 3
6
- }, I = {
8
+ }, i = {
7
9
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
8
10
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
9
11
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
10
12
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
11
- }, n = R(), t = {
13
+ }, n = S(), C = {
12
14
  UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
13
15
  PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
14
- }, i = "iid", S = "G", B = () => ({
15
- name: e()("onboarding-center.email-subscribers-global-unsub-card-title"),
16
- sendGridId: S
17
- }), C = "/email/unsubscribe-pages", E = {
16
+ }, U = {
17
+ [s.EMAIL]: "email",
18
+ [s.ARCHITECT]: "journey",
19
+ [s.UNSUBSCRIBE_PAGES]: "email"
20
+ }, t = "iid", o = {
21
+ name: "Global Unsubscribe",
22
+ sendGridId: "G"
23
+ }, c = "/email/unsubscribe-pages", E = {
18
24
  GLOBAL_UNSUBSCRIBE: 1,
19
25
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
20
26
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
21
27
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
22
28
  RESUBSCRIBE: 5
23
- }, c = {
29
+ }, u = {
24
30
  [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
25
31
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
26
- }, U = {
32
+ }, T = {
27
33
  [E.GLOBAL_UNSUBSCRIBE]: [
28
34
  E.GLOBAL_UNSUBSCRIBE,
29
35
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -33,31 +39,31 @@ const _ = {
33
39
  E.SUBSCRIPTION_PREFERENCE_CENTER,
34
40
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
35
41
  ]
36
- }, o = () => {
37
- const s = e();
42
+ }, b = () => {
43
+ const e = R();
38
44
  return {
39
- [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
40
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
41
- [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
42
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
43
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
45
+ [E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
46
+ [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
47
+ [E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
48
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
49
+ [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
44
50
  };
45
- }, u = {
51
+ }, P = {
46
52
  default: "{{ins-unsubscribe-link}}",
47
53
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
48
54
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
49
55
  };
50
56
  export {
51
- S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
52
- i as INSIDER_ID,
53
- I as LINK_REGEXES,
54
- _ as LINK_TYPES,
55
- u as MERGE_TAGS,
57
+ o as DEFAULT_UNSUBSCRIBE_GROUP,
58
+ t as INSIDER_ID,
59
+ i as LINK_REGEXES,
60
+ B as LINK_TYPES,
61
+ P as MERGE_TAGS,
56
62
  E as PAGE_TYPES,
57
- U as TYPE_COLLECTIONS,
58
- C as UNSUBSCRIBE_PAGES_LINK,
59
- c as UNSUBSCRIBE_SYNC_MODULE_TYPES,
60
- t as URLS,
61
- B as getDefaultUnsubscribeGroup,
62
- o as getTypeTranslations
63
+ U as PRODUCT_TYPE_URL_SEGMENTS,
64
+ T as TYPE_COLLECTIONS,
65
+ c as UNSUBSCRIBE_PAGES_LINK,
66
+ u as UNSUBSCRIBE_SYNC_MODULE_TYPES,
67
+ C as URLS,
68
+ b as getTypeTranslations
63
69
  };
@@ -1,11 +1,11 @@
1
- var E = Object.defineProperty;
2
- var d = (i, n, e) => n in i ? E(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
- var o = (i, n, e) => d(i, typeof n != "symbol" ? n + "" : n, e);
4
- import { useHttp as l } from "../../../composables/useHttp.js";
5
- import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as h } from "../../../enums/unsubscribe.js";
6
- import { Control as p, UIElementType as r, UEAttr as t, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const b = "ui-elements-checkbox", u = "select", { get: C } = l();
8
- class I extends p {
1
+ var d = Object.defineProperty;
2
+ var l = (r, n, e) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
3
+ var o = (r, n, e) => l(r, typeof n != "symbol" ? n + "" : n, e);
4
+ import { useHttp as L } from "../../../composables/useHttp.js";
5
+ import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
6
+ import { Control as h, UIElementType as i, UEAttr as t, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const m = "ui-elements-checkbox", u = "select", { get: C } = L();
8
+ class S extends h {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -13,13 +13,13 @@ class I extends p {
13
13
  o(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
- return b;
16
+ return m;
17
17
  }
18
18
  _setFormValues() {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const e = this.currentNode.getAttribute("id");
21
21
  if (e) {
22
- const s = e === h ? e : Number(e);
22
+ const s = e === c.sendGridId ? e : Number(e);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
@@ -29,18 +29,18 @@ class I extends p {
29
29
  }
30
30
  _getLabel(e, s = `${Math.random()}`) {
31
31
  return `
32
- <${r.LABEL}
32
+ <${i.LABEL}
33
33
  ${t.LABEL.text}="${e}"
34
34
  ${t.LABEL.name}="${s}">
35
- </${r.LABEL}>
35
+ </${i.LABEL}>
36
36
  `;
37
37
  }
38
38
  _getSelectItem(e, s) {
39
39
  return `
40
- <${r.SELECT_ITEM}
40
+ <${i.SELECT_ITEM}
41
41
  ${t.SELECT_ITEM.text}="${e}"
42
42
  ${t.SELECT_ITEM.value}="${s}">
43
- </${r.SELECT_ITEM}>`;
43
+ </${i.SELECT_ITEM}>`;
44
44
  }
45
45
  _getSelect() {
46
46
  return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
@@ -49,22 +49,22 @@ class I extends p {
49
49
  return `
50
50
  <div class="checkbox-controls-container">
51
51
  <div class="checkbox-select-container container two-columns stretch">
52
- <${r.LABEL}
52
+ <${i.LABEL}
53
53
  ${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
54
54
  ${t.LABEL.name}="${Math.random()}">
55
- </${r.LABEL}>
55
+ </${i.LABEL}>
56
56
 
57
- <${r.SELECTPICKER}
57
+ <${i.SELECTPICKER}
58
58
  ${t.SELECTPICKER.name}="${u}"
59
59
  ${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
60
60
  ${this._getSelect()}
61
- </${r.SELECTPICKER}>
61
+ </${i.SELECTPICKER}>
62
62
  </div>
63
63
  </div>
64
64
  `;
65
65
  }
66
66
  _onSelectChange(e) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new m(`Updated text to ${e}`));
67
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new p(`Updated text to ${e}`));
68
68
  }
69
69
  _listenToFormUpdates() {
70
70
  this.api.onValueChanged(u, (e) => this._onSelectChange(e));
@@ -76,18 +76,18 @@ class I extends p {
76
76
  async onRender() {
77
77
  const e = await C(
78
78
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [L(), ...e.data], c = s.map((a) => ({
79
+ ), s = [c, ...e.data], E = s.map((a) => ({
80
80
  [t.SELECT_ITEM.text]: a.name,
81
81
  [t.SELECT_ITEM.value]: a.sendGridId
82
82
  }));
83
83
  this.unsubList = s, this.api.setUIEAttribute(
84
84
  u,
85
85
  t.SELECTPICKER.items,
86
- c
86
+ E
87
87
  ), this._setFormValues(), this._listenToFormUpdates();
88
88
  }
89
89
  }
90
90
  export {
91
- b as CHECKBOX_CONTROL_BLOCK_ID,
92
- I as CheckboxControl
91
+ m as CHECKBOX_CONTROL_BLOCK_ID,
92
+ S as CheckboxControl
93
93
  };
@@ -1,75 +1,75 @@
1
- import { ModificationDescription as m, UIElementType as _, UEAttr as A } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { CommonControl as h } from "../../../common-control.js";
3
- import { ItemsBlockControlId as L, ItemsBlockId as R } from "../../enums/controlEnums.js";
4
- import { productPairs as T } from "../../enums/productEnums.js";
5
- import { getItemsBlockConfig as I, setItemsBlockConfig as u, escapeReplacement as N } from "../../utils/nodeConfigUtils.js";
6
- const D = L.PRICE_SINGLE_PRICE, l = {
1
+ import { ModificationDescription as S, UIElementType as d, UEAttr as m } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { CommonControl as A } from "../../../common-control.js";
3
+ import { ItemsBlockControlId as T, ItemsBlockId as p } from "../../enums/controlEnums.js";
4
+ import { productPairs as R } from "../../enums/productEnums.js";
5
+ import { getItemsBlockConfig as I, setItemsBlockConfig as N, escapeReplacement as h } from "../../utils/nodeConfigUtils.js";
6
+ const u = T.PRICE_SINGLE_PRICE, l = {
7
7
  SINGLE_PRICE: "singlePrice"
8
8
  };
9
- class y extends h {
9
+ class k extends A {
10
10
  getId() {
11
- return D;
11
+ return u;
12
12
  }
13
13
  getTemplate() {
14
14
  return `
15
- <div class="container ${L.PRICE_SINGLE_PRICE}">
15
+ <div class="container ${T.PRICE_SINGLE_PRICE}">
16
16
  ${this._getSinglePrice()}
17
17
  </div>
18
18
  `;
19
19
  }
20
20
  onRender() {
21
21
  const e = I(this.currentNode);
22
- this.api.updateValues({ [l.SINGLE_PRICE]: (e == null ? void 0 : e.priceSinglePrice) ?? !1 }), this.api.onValueChanged(l.SINGLE_PRICE, (t) => {
23
- this._onSinglePriceChange(t);
22
+ this.api.updateValues({ [l.SINGLE_PRICE]: (e == null ? void 0 : e.priceSinglePrice) ?? !1 }), this.api.onValueChanged(l.SINGLE_PRICE, (i) => {
23
+ this._onSinglePriceChange(i);
24
24
  });
25
25
  }
26
26
  onTemplateNodeUpdated(e) {
27
27
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(() => {
28
- const t = I(this.currentNode);
29
- this.api.updateValues({ [l.SINGLE_PRICE]: (t == null ? void 0 : t.priceSinglePrice) ?? !1 });
28
+ const i = I(this.currentNode);
29
+ this.api.updateValues({ [l.SINGLE_PRICE]: (i == null ? void 0 : i.priceSinglePrice) ?? !1 });
30
30
  });
31
31
  }
32
32
  _onSinglePriceChange(e) {
33
- if (console.debug("Single price changed to: ", e), u(this.currentNode, this.api, { priceSinglePrice: e }), !this.currentNode)
33
+ if (console.debug("Single price changed to: ", e), !this.currentNode)
34
34
  return;
35
- const t = I(this.currentNode), o = (t == null ? void 0 : t.type) ?? "CART_ITEMS", r = (t == null ? void 0 : t.priceFormatted) ?? !1, i = T.PAIRS_FOR_EXTENSION.price[o], c = T.PAIRS_FOR_EXTENSION.originalPrice[o], [P, p] = e ? [
36
- r ? i.DEFAULT_PRICE_FORMATTED : i.DEFAULT_PRICE,
37
- r ? i.DEFAULT_SINGLE_PRICE_FORMATTED : i.DEFAULT_SINGLE_PRICE
35
+ const i = I(this.currentNode), c = (i == null ? void 0 : i.type) ?? "CART_ITEMS", r = (i == null ? void 0 : i.priceFormatted) ?? !1, t = R.PAIRS_FOR_EXTENSION.price[c], n = R.PAIRS_FOR_EXTENSION.originalPrice[c], [E, g] = e ? [
36
+ r ? t.DEFAULT_PRICE_FORMATTED : t.DEFAULT_PRICE,
37
+ r ? t.DEFAULT_SINGLE_PRICE_FORMATTED : t.DEFAULT_SINGLE_PRICE
38
38
  ] : [
39
- r ? i.DEFAULT_SINGLE_PRICE_FORMATTED : i.DEFAULT_SINGLE_PRICE,
40
- r ? i.DEFAULT_PRICE_FORMATTED : i.DEFAULT_PRICE
41
- ], s = r ? c.DEFAULT_PRICE_FORMATTED : c.DEFAULT_PRICE, d = r ? c.DEFAULT_SINGLE_PRICE_FORMATTED : c.DEFAULT_SINGLE_PRICE, [g, C] = e ? [s, d] : [d, s], n = this.currentNode.closest(".items-block"), S = (n == null ? void 0 : n.querySelectorAll(
42
- `[esd-extension-block-id="${R.PRICE}"]`
43
- )) || [], E = this.api.getDocumentModifier();
44
- S.forEach((a) => {
45
- this._updatePriceBlock(E, a, P, p, e);
46
- }), ((n == null ? void 0 : n.querySelectorAll(
47
- `[esd-extension-block-id="${R.ORIGINAL_PRICE}"]`
39
+ r ? t.DEFAULT_SINGLE_PRICE_FORMATTED : t.DEFAULT_SINGLE_PRICE,
40
+ r ? t.DEFAULT_PRICE_FORMATTED : t.DEFAULT_PRICE
41
+ ], P = r ? n.DEFAULT_PRICE_FORMATTED : n.DEFAULT_PRICE, _ = r ? n.DEFAULT_SINGLE_PRICE_FORMATTED : n.DEFAULT_SINGLE_PRICE, [L, C] = e ? [P, _] : [_, P], s = this.api.getDocumentModifier();
42
+ N(this.currentNode, this.api, { priceSinglePrice: e }, s);
43
+ const o = this.currentNode.closest(".items-block");
44
+ ((o == null ? void 0 : o.querySelectorAll(
45
+ `[esd-extension-block-id="${p.PRICE}"]`
48
46
  )) || []).forEach((a) => {
49
- this._updatePriceBlock(E, a, g, C, e);
50
- }), E.apply(new m(
47
+ this._updatePriceBlock(s, a, E, g, e);
48
+ }), ((o == null ? void 0 : o.querySelectorAll(
49
+ `[esd-extension-block-id="${p.ORIGINAL_PRICE}"]`
50
+ )) || []).forEach((a) => {
51
+ this._updatePriceBlock(s, a, L, C, e);
52
+ }), s.apply(new S(
51
53
  `Updated price to ${e ? "single" : "total"} price`
52
54
  ));
53
55
  }
54
- _updatePriceBlock(e, t, o, r, i) {
55
- const c = t.getInnerHTML().trim().replace(o, N(r));
56
- e.modifyHtml(t).setInnerHtml(c), t.querySelectorAll('[product-attr="price"], [product-attr="originalPrice"]').forEach((s) => {
57
- e.modifyHtml(s).setAttribute("data-single_price", i ? "true" : "false");
58
- });
56
+ _updatePriceBlock(e, i, c, r, t) {
57
+ const n = `data-single_price="${t ? "true" : "false"}"`, E = i.getInnerHTML().trim().replace(c, h(r)).replace(/data-single_price=(?:"[^"]*"|'[^']*')/g, n);
58
+ e.modifyHtml(i).setInnerHtml(E);
59
59
  }
60
60
  _getSinglePrice() {
61
61
  return `
62
62
  <div class="display-flex align-items-center justify-content-between">
63
- <${_.LABEL}
64
- ${A.LABEL.text}="${this.api.translate("Show Single Product Price")}"
63
+ <${d.LABEL}
64
+ ${m.LABEL.text}="${this.api.translate("Show Single Product Price")}"
65
65
  >
66
- </${_.LABEL}>
66
+ </${d.LABEL}>
67
67
  ${this._GuToggle(l.SINGLE_PRICE)}
68
68
  </div>
69
69
  `;
70
70
  }
71
71
  }
72
72
  export {
73
- D as CONTROL_BLOCK_ID,
74
- y as PriceSinglePriceControl
73
+ u as CONTROL_BLOCK_ID,
74
+ k as PriceSinglePriceControl
75
75
  };
@@ -1,6 +1,6 @@
1
1
  import _ from "../../../../node_modules/lodash-es/flatMap.js";
2
- import a from "../../../../node_modules/lodash-es/range.js";
3
- const T = '<td align="center" class="ins-product-td items-block items-block-v2">', E = { PAIRS_FOR_EXTENSION: {
2
+ import E from "../../../../node_modules/lodash-es/range.js";
3
+ const T = '<td align="center" class="ins-product-td items-block items-block-v2">', a = { PAIRS_FOR_EXTENSION: {
4
4
  imageSrc: {
5
5
  CART_ITEMS: {
6
6
  ATTR: "ins_apr_img",
@@ -212,10 +212,10 @@ const T = '<td align="center" class="ins-product-td items-block items-block-v2">
212
212
  }
213
213
  } };
214
214
  function m(e, s = 8) {
215
- return a(1, s + 1).map((i) => `${e}_${i}`);
215
+ return E(1, s + 1).map((i) => `${e}_${i}`);
216
216
  }
217
- function t() {
218
- const { PAIRS_FOR_EXTENSION: e } = E, s = [];
217
+ function r() {
218
+ const { PAIRS_FOR_EXTENSION: e } = a, s = [];
219
219
  return s.push(
220
220
  e.imageSrc.CART_ITEMS.ATTR,
221
221
  e.imageSrc.BROWSED_ITEMS.ATTR,
@@ -234,22 +234,34 @@ function t() {
234
234
  ), s.push(
235
235
  e.price.CART_ITEMS.PRICE,
236
236
  e.price.CART_ITEMS.PRICE_FORMATTED,
237
+ e.price.CART_ITEMS.SINGLE_PRICE,
238
+ e.price.CART_ITEMS.SINGLE_PRICE_FORMATTED,
237
239
  e.price.CART_ITEMS.CURRENCY,
238
240
  e.price.BROWSED_ITEMS.PRICE,
239
241
  e.price.BROWSED_ITEMS.PRICE_FORMATTED,
242
+ e.price.BROWSED_ITEMS.SINGLE_PRICE,
243
+ e.price.BROWSED_ITEMS.SINGLE_PRICE_FORMATTED,
240
244
  e.price.BROWSED_ITEMS.CURRENCY,
241
245
  e.price.PURCHASED_ITEMS.PRICE,
242
246
  e.price.PURCHASED_ITEMS.PRICE_FORMATTED,
247
+ e.price.PURCHASED_ITEMS.SINGLE_PRICE,
248
+ e.price.PURCHASED_ITEMS.SINGLE_PRICE_FORMATTED,
243
249
  e.price.PURCHASED_ITEMS.CURRENCY
244
250
  ), s.push(
245
251
  e.originalPrice.CART_ITEMS.PRICE,
246
252
  e.originalPrice.CART_ITEMS.PRICE_FORMATTED,
253
+ e.originalPrice.CART_ITEMS.SINGLE_PRICE,
254
+ e.originalPrice.CART_ITEMS.SINGLE_PRICE_FORMATTED,
247
255
  e.originalPrice.CART_ITEMS.CURRENCY,
248
256
  e.originalPrice.BROWSED_ITEMS.PRICE,
249
257
  e.originalPrice.BROWSED_ITEMS.PRICE_FORMATTED,
258
+ e.originalPrice.BROWSED_ITEMS.SINGLE_PRICE,
259
+ e.originalPrice.BROWSED_ITEMS.SINGLE_PRICE_FORMATTED,
250
260
  e.originalPrice.BROWSED_ITEMS.CURRENCY,
251
261
  e.originalPrice.PURCHASED_ITEMS.PRICE,
252
262
  e.originalPrice.PURCHASED_ITEMS.PRICE_FORMATTED,
263
+ e.originalPrice.PURCHASED_ITEMS.SINGLE_PRICE,
264
+ e.originalPrice.PURCHASED_ITEMS.SINGLE_PRICE_FORMATTED,
253
265
  e.originalPrice.PURCHASED_ITEMS.CURRENCY
254
266
  ), s.push(
255
267
  e.button.CART_ITEMS.HREF,
@@ -262,11 +274,11 @@ function t() {
262
274
  ), s;
263
275
  }
264
276
  const o = _(
265
- t(),
277
+ r(),
266
278
  (e) => m(e)
267
279
  );
268
280
  export {
269
281
  o as itemsBlockDynamicVariables,
270
- E as productPairs,
282
+ a as productPairs,
271
283
  T as templateFirstLine
272
284
  };
@@ -1,11 +1,11 @@
1
- var E = Object.defineProperty;
2
- var d = (r, n, t) => n in r ? E(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var o = (r, n, t) => d(r, typeof n != "symbol" ? n + "" : n, t);
4
- import { useHttp as l } from "../../../composables/useHttp.js";
5
- import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as p } from "../../../enums/unsubscribe.js";
6
- import { Control as h, UIElementType as i, UEAttr as e, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const b = "ui-elements-radio-button", u = "select", { get: $ } = l();
8
- class I extends h {
1
+ var d = Object.defineProperty;
2
+ var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
4
+ import { useHttp as L } from "../../../composables/useHttp.js";
5
+ import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
6
+ import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const m = "ui-elements-radio-button", u = "select", { get: $ } = L();
8
+ class S extends p {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -13,13 +13,13 @@ class I extends h {
13
13
  o(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
- return b;
16
+ return m;
17
17
  }
18
18
  _setFormValues() {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const t = this.currentNode.getAttribute("id");
21
21
  if (t) {
22
- const s = t === p ? t : Number(t);
22
+ const s = t === c.sendGridId ? t : Number(t);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
@@ -64,7 +64,7 @@ class I extends h {
64
64
  `;
65
65
  }
66
66
  _onSelectChange(t) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new m(`Updated text to ${t}`));
67
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
68
68
  }
69
69
  _listenToFormUpdates() {
70
70
  this.api.onValueChanged(u, (t) => this._onSelectChange(t));
@@ -76,18 +76,18 @@ class I extends h {
76
76
  async onRender() {
77
77
  const t = await $(
78
78
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [L(), ...t.data], c = s.map((a) => ({
79
+ ), s = [c, ...t.data], E = s.map((a) => ({
80
80
  [e.SELECT_ITEM.text]: a.name,
81
81
  [e.SELECT_ITEM.value]: a.sendGridId
82
82
  }));
83
83
  this.unsubList = s, this.api.setUIEAttribute(
84
84
  u,
85
85
  e.SELECTPICKER.items,
86
- c
86
+ E
87
87
  ), this._setFormValues(), this._listenToFormUpdates();
88
88
  }
89
89
  }
90
90
  export {
91
- b as CONTROL_BLOCK_ID,
92
- I as RadioButtonControl
91
+ m as CONTROL_BLOCK_ID,
92
+ S as RadioButtonControl
93
93
  };
@@ -119,7 +119,7 @@ const e = {
119
119
  id="radioYes"
120
120
  name="unsubscribe"
121
121
  data-cke-editable="1"
122
- style="margin: 0px; vertical-align: middle;>
122
+ style="margin: 0px; vertical-align: middle;">
123
123
  </td>
124
124
  {-{-YES-}-}
125
125
  </tr>
@@ -1,15 +1,15 @@
1
- var k = Object.defineProperty;
2
- var I = (r, n, t) => n in r ? k(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var u = (r, n, t) => I(r, typeof n != "symbol" ? n + "" : n, t);
4
- import { BlockId as B } from "../../../enums/block.js";
5
- import { getMigrationBannerHtml as _ } from "../../../utils/migrationBannerHtml.js";
1
+ var I = Object.defineProperty;
2
+ var k = (r, n, t) => n in r ? I(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var u = (r, n, t) => k(r, typeof n != "symbol" ? n + "" : n, t);
4
+ import { BlockId as _ } from "../../../enums/block.js";
5
+ import { getMigrationBannerHtml as B } from "../../../utils/migrationBannerHtml.js";
6
6
  import { Block as b, BlockCompositionType as R, ModificationDescription as y } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
7
  import { regenerateMobileProductRows as C } from "./controls/main/utils.js";
8
8
  import { ensureMobileCssRulesExist as g, setMobileLayoutOptOut as d, hasMobileLayoutOptOut as A } from "./controls/mobileLayout/cssRules.js";
9
9
  import { RecommendationConfigService as c } from "./services/configService.js";
10
10
  import { useRecommendationExtensionStore as p } from "./store/recommendation.js";
11
11
  import { getDefaultTemplate as E } from "./templates/grid/template.js";
12
- const f = B.Recommendation, a = "recommendation-block-v2", l = "recommendation-id";
12
+ const f = _.Recommendation, l = "recommendation-block-v2", m = "recommendation-id";
13
13
  let h = !1;
14
14
  class q extends b {
15
15
  constructor() {
@@ -38,7 +38,7 @@ class q extends b {
38
38
  );
39
39
  }
40
40
  getSettingsPanelTitleHtml() {
41
- return _(
41
+ return B(
42
42
  f,
43
43
  this.api.translate("Recommendation Block"),
44
44
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
@@ -66,15 +66,18 @@ class q extends b {
66
66
  * @param node - The newly created block node
67
67
  */
68
68
  onCreated(t) {
69
- const e = this._pendingBlockId ?? this._generateNextId();
70
- this._pendingBlockId = null, this._assignRecommendationId(t, e);
71
- const o = c.initializeConfig(this.api, t, { recommendationId: e }), i = p();
72
- i.setCurrentBlock(e), g(this.api);
73
- const s = this._getBlockElement(t);
74
- s && (d(this.api, s, !0), C({
69
+ const e = this._getRecommendationId(t);
70
+ if (e !== null && e > 0)
71
+ return;
72
+ const i = this._pendingBlockId ?? this._generateNextId();
73
+ this._pendingBlockId = null, this._assignRecommendationId(t, i);
74
+ const o = c.initializeConfig(this.api, t, { recommendationId: i }), s = p();
75
+ s.setCurrentBlock(i), g(this.api);
76
+ const a = this._getBlockElement(t);
77
+ a && (d(this.api, a, !0), C({
75
78
  currentNode: t,
76
79
  documentModifier: this.api.getDocumentModifier()
77
- })), i.patchCurrentBlockConfig({ language: o.language }, { triggerRefetch: !1 });
80
+ })), s.patchCurrentBlockConfig({ language: o.language }, { triggerRefetch: !1 });
78
81
  }
79
82
  /**
80
83
  * Called when the document changes or template is loaded
@@ -97,10 +100,10 @@ class q extends b {
97
100
  c.needsMigration(t) && this._migrateFromLegacy(t);
98
101
  try {
99
102
  h || (g(this.api), h = !0);
100
- const e = c.getConfig(t), o = this._getBlockElement(t);
101
- if (o) {
102
- const i = !e.mobileLayoutEnabled;
103
- A(o) !== i && d(this.api, o, i);
103
+ const e = c.getConfig(t), i = this._getBlockElement(t);
104
+ if (i) {
105
+ const o = !e.mobileLayoutEnabled;
106
+ A(i) !== o && d(this.api, i, o);
104
107
  }
105
108
  } catch {
106
109
  }
@@ -124,10 +127,10 @@ class q extends b {
124
127
  let t = 0;
125
128
  try {
126
129
  const e = this.api.getDocumentRoot();
127
- e && "querySelectorAll" in e && e.querySelectorAll(`.${a}`).forEach((i) => {
128
- if ("getAttribute" in i) {
129
- const s = i.getAttribute(l), m = s ? parseInt(s) : 0;
130
- m > t && (t = m);
130
+ e && "querySelectorAll" in e && e.querySelectorAll(`.${l}`).forEach((o) => {
131
+ if ("getAttribute" in o) {
132
+ const s = o.getAttribute(m), a = s ? parseInt(s) : 0;
133
+ a > t && (t = a);
131
134
  }
132
135
  });
133
136
  } catch {
@@ -141,11 +144,11 @@ class q extends b {
141
144
  * added classes via setAttribute.
142
145
  */
143
146
  _assignRecommendationId(t, e) {
144
- const o = this._getBlockElement(t);
145
- if (!o)
147
+ const i = this._getBlockElement(t);
148
+ if (!i)
146
149
  return;
147
- const i = this.api.getDocumentModifier();
148
- i.modifyHtml(o).setAttribute(l, e.toString()), i.apply(new y(`Assign recommendation ID ${e}`));
150
+ const o = this.api.getDocumentModifier();
151
+ o.modifyHtml(i).setAttribute(m, e.toString()), o.apply(new y(`Assign recommendation ID ${e}`));
149
152
  }
150
153
  /**
151
154
  * Gets the recommendation-id from a block node
@@ -154,11 +157,11 @@ class q extends b {
154
157
  const e = this._getBlockElement(t);
155
158
  if (!e || !("getAttribute" in e))
156
159
  return null;
157
- const o = e.getAttribute(l);
158
- if (!o)
160
+ const i = e.getAttribute(m);
161
+ if (!i)
159
162
  return null;
160
- const i = parseInt(o);
161
- return Number.isNaN(i) ? null : i;
163
+ const o = parseInt(i);
164
+ return Number.isNaN(o) ? null : o;
162
165
  }
163
166
  /**
164
167
  * Gets the block element (the element with BLOCK_CLASS)
@@ -166,10 +169,10 @@ class q extends b {
166
169
  _getBlockElement(t) {
167
170
  if ("getAttribute" in t) {
168
171
  const e = t.getAttribute("class");
169
- if (e && e.includes(a))
172
+ if (e && e.includes(l))
170
173
  return t;
171
174
  }
172
- return "querySelector" in t ? t.querySelector(`.${a}`) ?? null : null;
175
+ return "querySelector" in t ? t.querySelector(`.${l}`) ?? null : null;
173
176
  }
174
177
  /**
175
178
  * Migrate configuration from legacy format