@useinsider/guido 3.2.0-beta.e69fb3b → 3.2.0-beta.ecc7c6c

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 (231) hide show
  1. package/dist/@types/config/schemas.js +1 -1
  2. package/dist/@types/config/validator.js +34 -27
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +81 -76
  5. package/dist/components/organisms/base/Toaster.vue2.js +11 -10
  6. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
  8. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +15 -9
  9. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +40 -31
  10. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +20 -19
  11. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +14 -11
  12. package/dist/components/organisms/header/EditorActions.vue.js +12 -11
  13. package/dist/components/organisms/header/EditorActions.vue2.js +22 -18
  14. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -12
  15. package/dist/components/organisms/header/LeftSlot.vue2.js +19 -16
  16. package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -14
  17. package/dist/components/organisms/header/RightSlot.vue2.js +17 -14
  18. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +12 -11
  19. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +26 -24
  20. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -11
  21. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +44 -41
  22. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -11
  23. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -36
  24. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -18
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -27
  26. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -11
  27. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +32 -30
  28. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +12 -11
  29. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
  30. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +9 -8
  31. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -9
  32. package/dist/composables/useActionsApi.js +38 -37
  33. package/dist/composables/useBlocksConfig.js +26 -26
  34. package/dist/composables/useFullStoryBridge.js +9 -8
  35. package/dist/composables/useHtmlCompiler.js +26 -34
  36. package/dist/composables/useHtmlValidator.js +114 -101
  37. package/dist/composables/useHttp.js +30 -30
  38. package/dist/composables/usePartner.js +1 -1
  39. package/dist/composables/useRecommendation.js +15 -14
  40. package/dist/composables/useRibbonOffset.js +15 -15
  41. package/dist/composables/useSave.js +23 -19
  42. package/dist/composables/useStripo.js +48 -53
  43. package/dist/composables/useSyncModuleExtractor.js +29 -31
  44. package/dist/composables/useTimerClone.js +25 -24
  45. package/dist/composables/useTranslations.js +3 -2
  46. package/dist/composables/useValidation.js +8 -7
  47. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  48. package/dist/composables/validators/useLiquidValidator.js +13 -13
  49. package/dist/config/compiler/recommendationCompilerRules.js +27 -27
  50. package/dist/config/compiler/unsubscribeCompilerRules.js +19 -17
  51. package/dist/config/compiler/utils/recommendationCompilerUtils.js +11 -10
  52. package/dist/config/migrator/checkboxMigrator.js +21 -20
  53. package/dist/config/migrator/couponBlockMigrator.js +19 -18
  54. package/dist/config/migrator/itemsBlockMigrator.js +89 -87
  55. package/dist/config/migrator/radioButtonMigrator.js +63 -42
  56. package/dist/config/migrator/recommendationMigrator.js +109 -106
  57. package/dist/config/migrator/unsubscribeMigrator.js +11 -10
  58. package/dist/enums/unsubscribe.js +19 -18
  59. package/dist/extensions/Blocks/Items/block.js +9 -9
  60. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
  61. package/dist/extensions/Blocks/Items/controls/cardComposition.js +97 -89
  62. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
  63. package/dist/extensions/Blocks/Items/controls/name/trimming.js +24 -23
  64. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +14 -13
  65. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +47 -44
  66. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
  67. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
  68. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +40 -38
  69. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
  70. package/dist/extensions/Blocks/Items/controls/settingsControl.js +162 -155
  71. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  72. package/dist/extensions/Blocks/Items/template.js +210 -210
  73. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  74. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
  75. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +133 -128
  76. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
  77. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
  78. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
  79. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +18 -17
  80. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +6 -4
  81. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -82
  82. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
  83. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
  84. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +36 -35
  85. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +135 -134
  86. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
  87. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
  88. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
  89. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
  90. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
  91. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
  92. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
  93. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
  94. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
  95. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
  96. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
  97. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +20 -18
  98. package/dist/extensions/Blocks/Recommendation/extension.js +32 -31
  99. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +16 -8
  100. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +64 -54
  101. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +23 -22
  102. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
  103. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
  104. package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
  105. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -24
  106. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
  107. package/dist/extensions/Blocks/Recommendation/templates/utils.js +47 -45
  108. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +16 -13
  109. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
  110. package/dist/extensions/Blocks/Unsubscribe/control.js +13 -11
  111. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +18 -16
  112. package/dist/extensions/Blocks/common-control.js +26 -25
  113. package/dist/extensions/DynamicContent/dynamic-content.js +58 -53
  114. package/dist/guido.css +1 -1
  115. package/dist/library.js +12 -11
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +234 -233
  117. package/dist/node_modules/lodash-es/_DataView.js +6 -0
  118. package/dist/node_modules/lodash-es/_Promise.js +6 -0
  119. package/dist/node_modules/lodash-es/_Set.js +6 -0
  120. package/dist/node_modules/lodash-es/_SetCache.js +13 -0
  121. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  122. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  123. package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
  124. package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
  125. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +20 -0
  126. package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
  127. package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
  128. package/dist/node_modules/lodash-es/_arraySome.js +9 -0
  129. package/dist/node_modules/lodash-es/_baseEach.js +6 -0
  130. package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
  131. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  132. package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
  133. package/dist/node_modules/lodash-es/_baseGet.js +11 -0
  134. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  135. package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
  136. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  137. package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
  138. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
  139. package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
  140. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  141. package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
  142. package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
  143. package/dist/node_modules/lodash-es/_baseMap.js +11 -0
  144. package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
  145. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  146. package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
  147. package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  148. package/dist/node_modules/lodash-es/_baseRange.js +9 -0
  149. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  150. package/dist/node_modules/lodash-es/_baseToString.js +18 -0
  151. package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
  152. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  153. package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
  154. package/dist/node_modules/lodash-es/_castPath.js +10 -0
  155. package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
  156. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  157. package/dist/node_modules/lodash-es/_createRange.js +11 -0
  158. package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
  159. package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
  160. package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
  161. package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
  162. package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
  163. package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
  164. package/dist/node_modules/lodash-es/_getTag.js +28 -0
  165. package/dist/node_modules/lodash-es/_getValue.js +1 -1
  166. package/dist/node_modules/lodash-es/_hasPath.js +19 -0
  167. package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
  168. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  169. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  170. package/dist/node_modules/lodash-es/_isKey.js +12 -0
  171. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  172. package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
  173. package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
  174. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  175. package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
  176. package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
  177. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  178. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  179. package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
  180. package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
  181. package/dist/node_modules/lodash-es/_setToArray.js +9 -0
  182. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  183. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  184. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  185. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  186. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  187. package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
  188. package/dist/node_modules/lodash-es/_toKey.js +10 -0
  189. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  190. package/dist/node_modules/lodash-es/flatMap.js +8 -0
  191. package/dist/node_modules/lodash-es/get.js +8 -0
  192. package/dist/node_modules/lodash-es/hasIn.js +8 -0
  193. package/dist/node_modules/lodash-es/identity.js +6 -0
  194. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  195. package/dist/node_modules/lodash-es/isArray.js +4 -0
  196. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  197. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  198. package/dist/node_modules/lodash-es/isLength.js +7 -0
  199. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  200. package/dist/node_modules/lodash-es/isSymbol.js +9 -0
  201. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  202. package/dist/node_modules/lodash-es/keys.js +9 -0
  203. package/dist/node_modules/lodash-es/map.js +11 -0
  204. package/dist/node_modules/lodash-es/property.js +10 -0
  205. package/dist/node_modules/lodash-es/range.js +5 -0
  206. package/dist/node_modules/lodash-es/stubArray.js +6 -0
  207. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  208. package/dist/node_modules/lodash-es/toFinite.js +14 -0
  209. package/dist/node_modules/lodash-es/toNumber.js +22 -0
  210. package/dist/node_modules/lodash-es/toString.js +7 -0
  211. package/dist/node_modules/valibot/dist/index.js +126 -122
  212. package/dist/services/recommendationApi.js +17 -14
  213. package/dist/services/templateLibraryApi.js +40 -38
  214. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  215. package/dist/src/composables/useHtmlCompiler.d.ts +2 -1
  216. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  217. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  218. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
  219. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
  220. package/dist/src/stores/dynamic-content.d.ts +3 -3
  221. package/dist/stores/config.js +81 -25
  222. package/dist/stores/dynamic-content.js +11 -6
  223. package/dist/stores/onboarding.js +1 -1
  224. package/dist/stores/preview.js +9 -6
  225. package/dist/stores/unsubscribe.js +4 -1
  226. package/dist/utils/dateUtil.js +10 -7
  227. package/dist/utils/genericUtil.js +13 -10
  228. package/dist/utils/pairProductVariables.js +89 -87
  229. package/package.json +1 -6
  230. package/dist/enums/displayConditions.js +0 -80
  231. package/dist/src/enums/displayConditions.d.ts +0 -2
@@ -1,52 +1,54 @@
1
- var g;
1
+ var v;
2
2
  // @__NO_SIDE_EFFECTS__
3
- function b(n) {
3
+ function E(n) {
4
4
  return {
5
- lang: n?.lang ?? g?.lang,
6
- message: n?.message,
7
- abortEarly: n?.abortEarly ?? g?.abortEarly,
8
- abortPipeEarly: n?.abortPipeEarly ?? g?.abortPipeEarly
5
+ lang: (n == null ? void 0 : n.lang) ?? (v == null ? void 0 : v.lang),
6
+ message: n == null ? void 0 : n.message,
7
+ abortEarly: (n == null ? void 0 : n.abortEarly) ?? (v == null ? void 0 : v.abortEarly),
8
+ abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (v == null ? void 0 : v.abortPipeEarly)
9
9
  };
10
10
  }
11
- var P;
11
+ var g;
12
12
  // @__NO_SIDE_EFFECTS__
13
- function S(n) {
14
- return P?.get(n);
13
+ function D(n) {
14
+ return g == null ? void 0 : g.get(n);
15
15
  }
16
- var _;
16
+ var d;
17
17
  // @__NO_SIDE_EFFECTS__
18
- function D(n) {
19
- return _?.get(n);
18
+ function w(n) {
19
+ return d == null ? void 0 : d.get(n);
20
20
  }
21
- var w;
21
+ var x;
22
22
  // @__NO_SIDE_EFFECTS__
23
23
  function A(n, r) {
24
- return w?.get(n)?.get(r);
24
+ var e;
25
+ return (e = x == null ? void 0 : x.get(n)) == null ? void 0 : e.get(r);
25
26
  }
26
27
  // @__NO_SIDE_EFFECTS__
27
- function k(n) {
28
+ function $(n) {
29
+ var e, t;
28
30
  const r = typeof n;
29
- return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : r;
31
+ return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && ((t = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : t.name)) ?? "null" : r;
30
32
  }
31
- function c(n, r, e, t, s) {
32
- const i = s && "input" in s ? s.input : e.value, u = s?.expected ?? n.expects ?? null, a = s?.received ?? /* @__PURE__ */ k(i), l = {
33
+ function y(n, r, e, t, i) {
34
+ const a = i && "input" in i ? i.input : e.value, s = (i == null ? void 0 : i.expected) ?? n.expects ?? null, l = (i == null ? void 0 : i.received) ?? /* @__PURE__ */ $(a), u = {
33
35
  kind: n.kind,
34
36
  type: n.type,
35
- input: i,
36
- expected: u,
37
- received: a,
38
- message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
37
+ input: a,
38
+ expected: s,
39
+ received: l,
40
+ message: `Invalid ${r}: ${s ? `Expected ${s} but r` : "R"}eceived ${l}`,
39
41
  requirement: n.requirement,
40
- path: s?.path,
41
- issues: s?.issues,
42
+ path: i == null ? void 0 : i.path,
43
+ issues: i == null ? void 0 : i.issues,
42
44
  lang: t.lang,
43
45
  abortEarly: t.abortEarly,
44
46
  abortPipeEarly: t.abortPipeEarly
45
- }, o = n.kind === "schema", p = s?.message ?? n.message ?? /* @__PURE__ */ A(n.reference, l.lang) ?? (o ? /* @__PURE__ */ D(l.lang) : null) ?? t.message ?? /* @__PURE__ */ S(l.lang);
46
- p !== void 0 && (l.message = typeof p == "function" ? (
47
+ }, p = n.kind === "schema", c = (i == null ? void 0 : i.message) ?? n.message ?? /* @__PURE__ */ A(n.reference, u.lang) ?? (p ? /* @__PURE__ */ w(u.lang) : null) ?? t.message ?? /* @__PURE__ */ D(u.lang);
48
+ c !== void 0 && (u.message = typeof c == "function" ? (
47
49
  // @ts-expect-error
48
- p(l)
49
- ) : p), o && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
50
+ c(u)
51
+ ) : c), p && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
50
52
  }
51
53
  // @__NO_SIDE_EFFECTS__
52
54
  function f(n) {
@@ -54,12 +56,12 @@ function f(n) {
54
56
  version: 1,
55
57
  vendor: "valibot",
56
58
  validate(r) {
57
- return n["~run"]({ value: r }, /* @__PURE__ */ b());
59
+ return n["~run"]({ value: r }, /* @__PURE__ */ E());
58
60
  }
59
61
  };
60
62
  }
61
63
  // @__NO_SIDE_EFFECTS__
62
- function E(n, r) {
64
+ function S(n, r) {
63
65
  const e = [...new Set(n)];
64
66
  return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
65
67
  }
@@ -74,7 +76,7 @@ function O(n, r) {
74
76
  requirement: n,
75
77
  message: r,
76
78
  async "~run"(e, t) {
77
- return e.typed && !await this.requirement(e.value) && c(this, "input", e, t), e;
79
+ return e.typed && !await this.requirement(e.value) && y(this, "input", e, t), e;
78
80
  }
79
81
  };
80
82
  }
@@ -89,7 +91,7 @@ function I(n, r) {
89
91
  requirement: n,
90
92
  message: r,
91
93
  "~run"(e, t) {
92
- return e.typed && e.value.length > this.requirement && c(this, "length", e, t, {
94
+ return e.typed && e.value.length > this.requirement && y(this, "length", e, t, {
93
95
  received: `${e.value.length}`
94
96
  }), e;
95
97
  }
@@ -106,7 +108,7 @@ function q(n, r) {
106
108
  requirement: n,
107
109
  message: r,
108
110
  "~run"(e, t) {
109
- return e.typed && e.value.length < this.requirement && c(this, "length", e, t, {
111
+ return e.typed && e.value.length < this.requirement && y(this, "length", e, t, {
110
112
  received: `${e.value.length}`
111
113
  }), e;
112
114
  }
@@ -122,7 +124,7 @@ function M(n) {
122
124
  expects: "!0",
123
125
  message: n,
124
126
  "~run"(r, e) {
125
- return r.typed && r.value.length === 0 && c(this, "length", r, e, {
127
+ return r.typed && r.value.length === 0 && y(this, "length", r, e, {
126
128
  received: "0"
127
129
  }), r;
128
130
  }
@@ -151,7 +153,7 @@ function L(n, r, e) {
151
153
  );
152
154
  }
153
155
  // @__NO_SIDE_EFFECTS__
154
- function $(n, r, e) {
156
+ function _(n, r, e) {
155
157
  return typeof n.default == "function" ? (
156
158
  // @ts-expect-error
157
159
  n.default(r, e)
@@ -174,30 +176,31 @@ function N(n, r) {
174
176
  return /* @__PURE__ */ f(this);
175
177
  },
176
178
  "~run"(e, t) {
177
- const s = e.value;
178
- if (Array.isArray(s)) {
179
+ var a;
180
+ const i = e.value;
181
+ if (Array.isArray(i)) {
179
182
  e.typed = !0, e.value = [];
180
- for (let i = 0; i < s.length; i++) {
181
- const u = s[i], a = this.item["~run"]({ value: u }, t);
182
- if (a.issues) {
183
- const l = {
183
+ for (let s = 0; s < i.length; s++) {
184
+ const l = i[s], u = this.item["~run"]({ value: l }, t);
185
+ if (u.issues) {
186
+ const p = {
184
187
  type: "array",
185
188
  origin: "value",
186
- input: s,
187
- key: i,
188
- value: u
189
+ input: i,
190
+ key: s,
191
+ value: l
189
192
  };
190
- for (const o of a.issues)
191
- o.path ? o.path.unshift(l) : o.path = [l], e.issues?.push(o);
192
- if (e.issues || (e.issues = a.issues), t.abortEarly) {
193
+ for (const c of u.issues)
194
+ c.path ? c.path.unshift(p) : c.path = [p], (a = e.issues) == null || a.push(c);
195
+ if (e.issues || (e.issues = u.issues), t.abortEarly) {
193
196
  e.typed = !1;
194
197
  break;
195
198
  }
196
199
  }
197
- a.typed || (e.typed = !1), e.value.push(a.value);
200
+ u.typed || (e.typed = !1), e.value.push(u.value);
198
201
  }
199
202
  } else
200
- c(this, "type", e, t);
203
+ y(this, "type", e, t);
201
204
  return e;
202
205
  }
203
206
  };
@@ -215,7 +218,7 @@ function C(n) {
215
218
  return /* @__PURE__ */ f(this);
216
219
  },
217
220
  "~run"(r, e) {
218
- return typeof r.value == "boolean" ? r.typed = !0 : c(this, "type", r, e), r;
221
+ return typeof r.value == "boolean" ? r.typed = !0 : y(this, "type", r, e), r;
219
222
  }
220
223
  };
221
224
  }
@@ -233,7 +236,7 @@ function F(n, r) {
233
236
  return /* @__PURE__ */ f(this);
234
237
  },
235
238
  "~run"(e, t) {
236
- return this.check(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
239
+ return this.check(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
237
240
  }
238
241
  };
239
242
  }
@@ -243,7 +246,7 @@ function K(n, r) {
243
246
  kind: "schema",
244
247
  type: "literal",
245
248
  reference: K,
246
- expects: /* @__PURE__ */ k(n),
249
+ expects: /* @__PURE__ */ $(n),
247
250
  async: !1,
248
251
  literal: n,
249
252
  message: r,
@@ -251,7 +254,7 @@ function K(n, r) {
251
254
  return /* @__PURE__ */ f(this);
252
255
  },
253
256
  "~run"(e, t) {
254
- return e.value === this.literal ? e.typed = !0 : c(this, "type", e, t), e;
257
+ return e.value === this.literal ? e.typed = !0 : y(this, "type", e, t), e;
255
258
  }
256
259
  };
257
260
  }
@@ -268,7 +271,7 @@ function R(n) {
268
271
  return /* @__PURE__ */ f(this);
269
272
  },
270
273
  "~run"(r, e) {
271
- return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : c(this, "type", r, e), r;
274
+ return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : y(this, "type", r, e), r;
272
275
  }
273
276
  };
274
277
  }
@@ -286,53 +289,54 @@ function V(n, r) {
286
289
  return /* @__PURE__ */ f(this);
287
290
  },
288
291
  "~run"(e, t) {
289
- const s = e.value;
290
- if (s && typeof s == "object") {
292
+ var a;
293
+ const i = e.value;
294
+ if (i && typeof i == "object") {
291
295
  e.typed = !0, e.value = {};
292
- for (const i in this.entries) {
293
- const u = this.entries[i];
294
- if (i in s || (u.type === "exact_optional" || u.type === "optional" || u.type === "nullish") && // @ts-expect-error
295
- u.default !== void 0) {
296
- const a = i in s ? (
296
+ for (const s in this.entries) {
297
+ const l = this.entries[s];
298
+ if (s in i || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && // @ts-expect-error
299
+ l.default !== void 0) {
300
+ const u = s in i ? (
297
301
  // @ts-expect-error
298
- s[i]
299
- ) : /* @__PURE__ */ $(u), l = u["~run"]({ value: a }, t);
300
- if (l.issues) {
301
- const o = {
302
+ i[s]
303
+ ) : /* @__PURE__ */ _(l), p = l["~run"]({ value: u }, t);
304
+ if (p.issues) {
305
+ const c = {
302
306
  type: "object",
303
307
  origin: "value",
304
- input: s,
305
- key: i,
306
- value: a
308
+ input: i,
309
+ key: s,
310
+ value: u
307
311
  };
308
- for (const p of l.issues)
309
- p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
310
- if (e.issues || (e.issues = l.issues), t.abortEarly) {
312
+ for (const m of p.issues)
313
+ m.path ? m.path.unshift(c) : m.path = [c], (a = e.issues) == null || a.push(m);
314
+ if (e.issues || (e.issues = p.issues), t.abortEarly) {
311
315
  e.typed = !1;
312
316
  break;
313
317
  }
314
318
  }
315
- l.typed || (e.typed = !1), e.value[i] = l.value;
316
- } else if (u.fallback !== void 0)
317
- e.value[i] = /* @__PURE__ */ L(u);
318
- else if (u.type !== "exact_optional" && u.type !== "optional" && u.type !== "nullish" && (c(this, "key", e, t, {
319
+ p.typed || (e.typed = !1), e.value[s] = p.value;
320
+ } else if (l.fallback !== void 0)
321
+ e.value[s] = /* @__PURE__ */ L(l);
322
+ else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (y(this, "key", e, t, {
319
323
  input: void 0,
320
- expected: `"${i}"`,
324
+ expected: `"${s}"`,
321
325
  path: [
322
326
  {
323
327
  type: "object",
324
328
  origin: "key",
325
- input: s,
326
- key: i,
329
+ input: i,
330
+ key: s,
327
331
  // @ts-expect-error
328
- value: s[i]
332
+ value: i[s]
329
333
  }
330
334
  ]
331
335
  }), t.abortEarly))
332
336
  break;
333
337
  }
334
338
  } else
335
- c(this, "type", e, t);
339
+ y(this, "type", e, t);
336
340
  return e;
337
341
  }
338
342
  };
@@ -351,7 +355,7 @@ function z(n, r) {
351
355
  return /* @__PURE__ */ f(this);
352
356
  },
353
357
  "~run"(e, t) {
354
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ $(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
358
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ _(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
355
359
  }
356
360
  };
357
361
  }
@@ -361,7 +365,7 @@ function B(n, r) {
361
365
  kind: "schema",
362
366
  type: "picklist",
363
367
  reference: B,
364
- expects: /* @__PURE__ */ E(n.map(k), "|"),
368
+ expects: /* @__PURE__ */ S(n.map($), "|"),
365
369
  async: !1,
366
370
  options: n,
367
371
  message: r,
@@ -369,7 +373,7 @@ function B(n, r) {
369
373
  return /* @__PURE__ */ f(this);
370
374
  },
371
375
  "~run"(e, t) {
372
- return this.options.includes(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
376
+ return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
373
377
  }
374
378
  };
375
379
  }
@@ -386,7 +390,7 @@ function H(n) {
386
390
  return /* @__PURE__ */ f(this);
387
391
  },
388
392
  "~run"(r, e) {
389
- return typeof r.value == "string" ? r.typed = !0 : c(this, "type", r, e), r;
393
+ return typeof r.value == "string" ? r.typed = !0 : y(this, "type", r, e), r;
390
394
  }
391
395
  };
392
396
  }
@@ -404,58 +408,58 @@ function J(n, r, e) {
404
408
  get "~standard"() {
405
409
  return /* @__PURE__ */ f(this);
406
410
  },
407
- "~run"(t, s) {
408
- const i = t.value;
409
- if (i && typeof i == "object") {
410
- let u, a = 0, l = this.key, o = [];
411
- const p = (j, d) => {
412
- for (const h of j.options) {
411
+ "~run"(t, i) {
412
+ const a = t.value;
413
+ if (a && typeof a == "object") {
414
+ let s, l = 0, u = this.key, p = [];
415
+ const c = (m, j) => {
416
+ for (const h of m.options) {
413
417
  if (h.type === "variant")
414
- p(h, new Set(d).add(h.key));
418
+ c(h, new Set(j).add(h.key));
415
419
  else {
416
- let x = !0, v = 0;
417
- for (const y of d) {
418
- const m = h.entries[y];
419
- if (y in i ? m["~run"](
420
+ let P = !0, b = 0;
421
+ for (const o of j) {
422
+ const k = h.entries[o];
423
+ if (o in a ? k["~run"](
420
424
  // @ts-expect-error
421
- { typed: !1, value: i[y] },
425
+ { typed: !1, value: a[o] },
422
426
  { abortEarly: !0 }
423
- ).issues : m.type !== "exact_optional" && m.type !== "optional" && m.type !== "nullish") {
424
- x = !1, l !== y && (a < v || a === v && y in i && !(l in i)) && (a = v, l = y, o = []), l === y && o.push(
425
- h.entries[y].expects
427
+ ).issues : k.type !== "exact_optional" && k.type !== "optional" && k.type !== "nullish") {
428
+ P = !1, u !== o && (l < b || l === b && o in a && !(u in a)) && (l = b, u = o, p = []), u === o && p.push(
429
+ h.entries[o].expects
426
430
  );
427
431
  break;
428
432
  }
429
- v++;
433
+ b++;
430
434
  }
431
- if (x) {
432
- const y = h["~run"]({ value: i }, s);
433
- (!u || !u.typed && y.typed) && (u = y);
435
+ if (P) {
436
+ const o = h["~run"]({ value: a }, i);
437
+ (!s || !s.typed && o.typed) && (s = o);
434
438
  }
435
439
  }
436
- if (u && !u.issues)
440
+ if (s && !s.issues)
437
441
  break;
438
442
  }
439
443
  };
440
- if (p(this, /* @__PURE__ */ new Set([this.key])), u)
441
- return u;
442
- c(this, "type", t, s, {
444
+ if (c(this, /* @__PURE__ */ new Set([this.key])), s)
445
+ return s;
446
+ y(this, "type", t, i, {
443
447
  // @ts-expect-error
444
- input: i[l],
445
- expected: /* @__PURE__ */ E(o, "|"),
448
+ input: a[u],
449
+ expected: /* @__PURE__ */ S(p, "|"),
446
450
  path: [
447
451
  {
448
452
  type: "object",
449
453
  origin: "value",
450
- input: i,
451
- key: l,
454
+ input: a,
455
+ key: u,
452
456
  // @ts-expect-error
453
- value: i[l]
457
+ value: a[u]
454
458
  }
455
459
  ]
456
460
  });
457
461
  } else
458
- c(this, "type", t, s);
462
+ y(this, "type", t, i);
459
463
  return t;
460
464
  }
461
465
  };
@@ -505,7 +509,7 @@ function T(...n) {
505
509
  }
506
510
  // @__NO_SIDE_EFFECTS__
507
511
  function U(n, r, e) {
508
- const t = n["~run"]({ value: r }, /* @__PURE__ */ b(e));
512
+ const t = n["~run"]({ value: r }, /* @__PURE__ */ E(e));
509
513
  return {
510
514
  typed: t.typed,
511
515
  success: !t.issues,
@@ -517,7 +521,7 @@ function U(n, r, e) {
517
521
  async function W(n, r, e) {
518
522
  const t = await n["~run"](
519
523
  { value: r },
520
- /* @__PURE__ */ b(e)
524
+ /* @__PURE__ */ E(e)
521
525
  );
522
526
  return {
523
527
  typed: t.typed,
@@ -527,19 +531,19 @@ async function W(n, r, e) {
527
531
  };
528
532
  }
529
533
  export {
530
- c as _addIssue,
534
+ y as _addIssue,
531
535
  f as _getStandardProps,
532
- E as _joinExpects,
533
- k as _stringify,
536
+ S as _joinExpects,
537
+ $ as _stringify,
534
538
  N as array,
535
539
  C as boolean,
536
540
  O as checkAsync,
537
541
  F as custom,
538
- $ as getDefault,
542
+ _ as getDefault,
539
543
  L as getFallback,
540
- b as getGlobalConfig,
541
- S as getGlobalMessage,
542
- D as getSchemaMessage,
544
+ E as getGlobalConfig,
545
+ D as getGlobalMessage,
546
+ w as getSchemaMessage,
543
547
  A as getSpecificMessage,
544
548
  K as literal,
545
549
  I as maxLength,
@@ -1,31 +1,34 @@
1
- import { useHttp as n } from "../composables/useHttp.js";
2
- import { QUERY_PARAMS as m, URLS as i } from "../enums/extensions/recommendationBlock.js";
3
- const p = () => {
4
- const { get: o } = n(), { get: c } = n({ headers: {} }), a = "6KcLM9TwheVB1mgK";
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { QUERY_PARAMS as d, URLS as h } from "../enums/extensions/recommendationBlock.js";
3
+ const y = () => {
4
+ const { get: r } = a(), { get: s } = a({ headers: {} }), m = "6KcLM9TwheVB1mgK";
5
5
  return {
6
6
  fetchRecommendationCreateData: async () => {
7
7
  try {
8
- return (await o("/newsletter/recommendations/create-data")).data;
8
+ return (await r("/newsletter/recommendations/create-data")).data;
9
9
  } catch (e) {
10
10
  throw console.error("fetchUserModalState error:", e), e;
11
11
  }
12
12
  },
13
13
  fetchRecommendationFilters: async () => {
14
14
  try {
15
- const { data: e } = await o("/stripo/email-recommendation-attributes");
15
+ const { data: e } = await r("/stripo/email-recommendation-attributes");
16
16
  return e;
17
17
  } catch (e) {
18
18
  throw console.error("fetchRecommendationFilters error:", e), e;
19
19
  }
20
20
  },
21
- fetchRecommendationProducts: async (e, s) => {
21
+ fetchRecommendationProducts: async (e, i) => {
22
+ var n;
22
23
  try {
23
- const t = new URLSearchParams(Object.entries(s));
24
- t.set(m.CLIENT_ID, a);
25
- const r = decodeURIComponent(t.toString());
26
- return console.debug("🏁 Recommendation API Query:", r), (await c(
27
- `${i.RECOMMENDATION_API_URL}/v2/${e}?${r}`
28
- ))?.data?.data ?? [];
24
+ const t = new URLSearchParams(Object.entries(i));
25
+ t.set(d.CLIENT_ID, m);
26
+ const c = decodeURIComponent(t.toString());
27
+ console.debug("🏁 Recommendation API Query:", c);
28
+ const o = await s(
29
+ `${h.RECOMMENDATION_API_URL}/v2/${e}?${c}`
30
+ );
31
+ return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
29
32
  } catch (t) {
30
33
  throw console.error("fetchRecommendationProducts error:", t), t;
31
34
  }
@@ -33,5 +36,5 @@ const p = () => {
33
36
  };
34
37
  };
35
38
  export {
36
- p as useRecommendationApi
39
+ y as useRecommendationApi
37
40
  };