@swell/apps-sdk 1.0.182 → 1.0.183

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.
package/dist/index.cjs CHANGED
@@ -6405,11 +6405,11 @@ function getRandomId() {
6405
6405
  }
6406
6406
 
6407
6407
  // src/menus.ts
6408
- var import_lodash_es14 = require("lodash-es");
6408
+ var import_lodash_es15 = require("lodash-es");
6409
6409
 
6410
6410
  // src/theme.ts
6411
6411
  var import_json56 = __toESM(require("json5"), 1);
6412
- var import_lodash_es13 = require("lodash-es");
6412
+ var import_lodash_es14 = require("lodash-es");
6413
6413
 
6414
6414
  // src/compatibility/shopify.ts
6415
6415
  var import_lodash_es7 = require("lodash-es");
@@ -12799,7 +12799,7 @@ function ShopifyCart(instance, cart) {
12799
12799
  );
12800
12800
  }),
12801
12801
  items_subtotal_price: defer(() => instance.toShopifyPrice(cart.sub_total)),
12802
- note: defer(() => cart.comments),
12802
+ note: deferWith(cart, (cart2) => cart2.comments),
12803
12803
  original_total_price: deferWith(
12804
12804
  cart,
12805
12805
  (cart2) => instance.toShopifyPrice(cart2.sub_total)
@@ -13884,15 +13884,10 @@ var CollectionsDrop = class extends import_liquidjs10.Drop {
13884
13884
  switch (typeof key) {
13885
13885
  case "string": {
13886
13886
  if (key === "all") {
13887
- let resource = this.#map.get(key);
13888
- if (resource === void 0) {
13889
- resource = ShopifyCollection(
13890
- this.#instance,
13891
- new AllCategoryResource(this.#instance)
13892
- );
13893
- this.#map.set(key, resource);
13894
- }
13895
- return resource;
13887
+ return this.getAllCollection();
13888
+ }
13889
+ if (key === "size") {
13890
+ return this.getAllCollectionsSize();
13896
13891
  }
13897
13892
  return this.getCollection(key);
13898
13893
  }
@@ -13922,6 +13917,21 @@ var CollectionsDrop = class extends import_liquidjs10.Drop {
13922
13917
  }
13923
13918
  return resource;
13924
13919
  }
13920
+ getAllCollection() {
13921
+ let resource = this.#map.get("all");
13922
+ if (resource === void 0) {
13923
+ resource = ShopifyCollection(
13924
+ this.#instance,
13925
+ new AllCategoryResource(this.#instance)
13926
+ );
13927
+ this.#map.set("all", resource);
13928
+ }
13929
+ return resource;
13930
+ }
13931
+ getAllCollectionsSize() {
13932
+ const count = this.#instance.theme.globals.shop?.collections_count;
13933
+ return count || 0;
13934
+ }
13925
13935
  };
13926
13936
  var Collections = class extends SwellStorefrontCollection {
13927
13937
  #drop;
@@ -15691,7 +15701,7 @@ var tags = {
15691
15701
  };
15692
15702
  function bindTags(liquidSwell) {
15693
15703
  Object.entries(tags).forEach(
15694
- ([tag, bind66]) => liquidSwell.registerTag(tag, bind66(liquidSwell))
15704
+ ([tag, bind67]) => liquidSwell.registerTag(tag, bind67(liquidSwell))
15695
15705
  );
15696
15706
  }
15697
15707
 
@@ -15959,8 +15969,22 @@ function bind37(_liquidSwell) {
15959
15969
  };
15960
15970
  }
15961
15971
 
15962
- // src/liquid/filters/font_face.ts
15972
+ // src/liquid/filters/escape.ts
15973
+ var import_lodash_es11 = require("lodash-es");
15963
15974
  function bind38(_liquidSwell) {
15975
+ return function escapeTag(input) {
15976
+ if (!input?.startsWith) {
15977
+ return input;
15978
+ }
15979
+ if (input.startsWith("<img") || input.startsWith("<video")) {
15980
+ return input;
15981
+ }
15982
+ return (0, import_lodash_es11.escape)(input);
15983
+ };
15984
+ }
15985
+
15986
+ // src/liquid/filters/font_face.ts
15987
+ function bind39(_liquidSwell) {
15964
15988
  return (fontSetting, ...params) => {
15965
15989
  if (!fontSetting) {
15966
15990
  return null;
@@ -15972,14 +15996,14 @@ function bind38(_liquidSwell) {
15972
15996
  }
15973
15997
 
15974
15998
  // src/liquid/filters/font_modify.ts
15975
- function bind39(_liquidSwell) {
15999
+ function bind40(_liquidSwell) {
15976
16000
  return (fontSetting, prop, value) => {
15977
16001
  return ThemeFont.clone(fontSetting).modify(prop, value);
15978
16002
  };
15979
16003
  }
15980
16004
 
15981
16005
  // src/liquid/filters/font_url.ts
15982
- function bind40(_liquidSwell) {
16006
+ function bind41(_liquidSwell) {
15983
16007
  return (fontSetting) => {
15984
16008
  return ThemeFont.get(fontSetting).url();
15985
16009
  };
@@ -16028,15 +16052,15 @@ var format_address_default = {
16028
16052
  };
16029
16053
 
16030
16054
  // src/liquid/filters/handleize.ts
16031
- var import_lodash_es11 = require("lodash-es");
16032
- function bind41(_liquidSwell) {
16055
+ var import_lodash_es12 = require("lodash-es");
16056
+ function bind42(_liquidSwell) {
16033
16057
  return function filterHandleize(handle) {
16034
- return (0, import_lodash_es11.kebabCase)(handle);
16058
+ return (0, import_lodash_es12.kebabCase)(handle);
16035
16059
  };
16036
16060
  }
16037
16061
 
16038
16062
  // src/liquid/filters/image_tag.ts
16039
- function bind42(_liquidSwell) {
16063
+ function bind43(_liquidSwell) {
16040
16064
  return function filterImageTag(imageUrl, ...params) {
16041
16065
  imageUrl = String(imageUrl || "");
16042
16066
  let {
@@ -16200,7 +16224,7 @@ var filterDefinition = {
16200
16224
  var image_url_default = filterDefinition;
16201
16225
 
16202
16226
  // src/liquid/filters/inline_asset_content.ts
16203
- function bind43(liquidSwell) {
16227
+ function bind44(liquidSwell) {
16204
16228
  return async (assetPath) => {
16205
16229
  const config = await liquidSwell.theme.getThemeConfig(
16206
16230
  `theme/assets/${assetPath}`
@@ -16210,14 +16234,14 @@ function bind43(liquidSwell) {
16210
16234
  }
16211
16235
 
16212
16236
  // src/liquid/filters/json.ts
16213
- function bind44(_liquidSwell) {
16237
+ function bind45(_liquidSwell) {
16214
16238
  return async function filterJson(input, space = 0) {
16215
16239
  return jsonStringifyAsync(input, space);
16216
16240
  };
16217
16241
  }
16218
16242
 
16219
16243
  // src/liquid/filters/json_pretty.ts
16220
- function bind45(_liquidSwell) {
16244
+ function bind46(_liquidSwell) {
16221
16245
  return async function filterJsonPretty(input, space = 2) {
16222
16246
  const output = await jsonStringifyAsync(input, space);
16223
16247
  return `<pre>${output}</pre>`;
@@ -16227,7 +16251,7 @@ function bind45(_liquidSwell) {
16227
16251
  // src/liquid/filters/locale_flag.ts
16228
16252
  var import_country_flag_icons = require("country-flag-icons");
16229
16253
  var flags = __toESM(require("country-flag-icons/string/1x1"), 1);
16230
- function bind46(_liquidSwell) {
16254
+ function bind47(_liquidSwell) {
16231
16255
  return (localeCode) => {
16232
16256
  if (typeof localeCode !== "string") {
16233
16257
  return flags.US;
@@ -16238,7 +16262,7 @@ function bind46(_liquidSwell) {
16238
16262
  }
16239
16263
 
16240
16264
  // src/liquid/filters/minus.ts
16241
- function bind47(_liquidSwell) {
16265
+ function bind48(_liquidSwell) {
16242
16266
  return (first, second) => {
16243
16267
  const firstValue = isNumber(first) ? first : 0;
16244
16268
  const secondValue = isNumber(second) ? second : 0;
@@ -16247,7 +16271,7 @@ function bind47(_liquidSwell) {
16247
16271
  }
16248
16272
 
16249
16273
  // src/liquid/filters/money.ts
16250
- function bind48(liquidSwell) {
16274
+ function bind49(liquidSwell) {
16251
16275
  return function filterMoney(value) {
16252
16276
  const amount = getMoneyAmount(liquidSwell, value);
16253
16277
  return liquidSwell.renderCurrency(amount);
@@ -16264,7 +16288,7 @@ function getMoneyAmount(liquidSwell, value) {
16264
16288
  }
16265
16289
 
16266
16290
  // src/liquid/filters/money_with_currency.ts
16267
- function bind49(liquidSwell) {
16291
+ function bind50(liquidSwell) {
16268
16292
  return function filterMoneyWithCurrency(value) {
16269
16293
  const { currency } = liquidSwell.theme.swell.getStorefrontLocalization();
16270
16294
  const amount = getMoneyAmount(liquidSwell, value);
@@ -16273,7 +16297,7 @@ function bind49(liquidSwell) {
16273
16297
  }
16274
16298
 
16275
16299
  // src/liquid/filters/money_without_currency.ts
16276
- function bind50(liquidSwell) {
16300
+ function bind51(liquidSwell) {
16277
16301
  return function filterMoneyWithoutCurrency(value) {
16278
16302
  const amount = getMoneyAmount(liquidSwell, value);
16279
16303
  return liquidSwell.renderCurrency(amount).replace(/[^0-9.,]/g, "");
@@ -16281,7 +16305,7 @@ function bind50(liquidSwell) {
16281
16305
  }
16282
16306
 
16283
16307
  // src/liquid/filters/money_without_trailing_zeros.ts
16284
- function bind51(liquidSwell) {
16308
+ function bind52(liquidSwell) {
16285
16309
  return function filterMoneyWithoutTrailingZeros(value) {
16286
16310
  const amount = getMoneyAmount(liquidSwell, value);
16287
16311
  return liquidSwell.renderCurrency(amount).split(".")[0].split(",")[0];
@@ -16289,21 +16313,21 @@ function bind51(liquidSwell) {
16289
16313
  }
16290
16314
 
16291
16315
  // src/liquid/filters/script_tag.ts
16292
- function bind52(_liquidSwell) {
16316
+ function bind53(_liquidSwell) {
16293
16317
  return function filterScriptTag(assetUrl) {
16294
16318
  return `<script src="${assetUrl}" type="text/javascript"></script>`;
16295
16319
  };
16296
16320
  }
16297
16321
 
16298
16322
  // src/liquid/filters/stylesheet_tag.ts
16299
- function bind53(_liquidSwell) {
16323
+ function bind54(_liquidSwell) {
16300
16324
  return function filterStyleSheetTag(assetUrl) {
16301
16325
  return `<link href="${assetUrl}" rel="stylesheet" type="text/css" media="all" />`;
16302
16326
  };
16303
16327
  }
16304
16328
 
16305
16329
  // src/liquid/filters/time_tag.ts
16306
- function bind54(_liquidSwell) {
16330
+ function bind55(_liquidSwell) {
16307
16331
  const dateFilter = bind33(_liquidSwell);
16308
16332
  return (dateValue, ...params) => {
16309
16333
  const date = ensureDate(dateValue);
@@ -16314,7 +16338,7 @@ function bind54(_liquidSwell) {
16314
16338
  }
16315
16339
 
16316
16340
  // src/liquid/filters/translate.ts
16317
- function bind55(liquidSwell) {
16341
+ function bind56(liquidSwell) {
16318
16342
  return async function filterTranslate(key, params) {
16319
16343
  const props = params && paramsToProps(params);
16320
16344
  const str = await liquidSwell.renderTranslation(key, props);
@@ -16323,7 +16347,7 @@ function bind55(liquidSwell) {
16323
16347
  }
16324
16348
 
16325
16349
  // src/liquid/filters/where.ts
16326
- function bind56(_liquidSwell) {
16350
+ function bind57(_liquidSwell) {
16327
16351
  return function* filterWhere(arr, property, expected) {
16328
16352
  const results = [];
16329
16353
  const list = yield resolveEnumerable(arr);
@@ -16377,7 +16401,7 @@ function getSizesFromParam(param) {
16377
16401
  height: height ? Number(height) : void 0
16378
16402
  };
16379
16403
  }
16380
- function bind57(liquidSwell) {
16404
+ function bind58(liquidSwell) {
16381
16405
  return async function filterAssetImgUrl(assetPath, size = "small") {
16382
16406
  const imageUrl = await liquidSwell.getAssetUrl(assetPath).then((url) => url || "");
16383
16407
  const sizes = getSizesFromParam(size);
@@ -16393,14 +16417,14 @@ function bind57(liquidSwell) {
16393
16417
  }
16394
16418
 
16395
16419
  // src/liquid/filters/shopify/hex_to_rgba.ts
16396
- function bind58(_liquidSwell) {
16420
+ function bind59(_liquidSwell) {
16397
16421
  return (color, alpha) => {
16398
16422
  return ThemeColor.get(color).rgba(alpha || 1);
16399
16423
  };
16400
16424
  }
16401
16425
 
16402
16426
  // src/liquid/filters/shopify/img_url.ts
16403
- function bind59(liquidSwell) {
16427
+ function bind60(liquidSwell) {
16404
16428
  return async function filterImgUrl(input, ...params) {
16405
16429
  const url = await getImageUrlFromInput(input, liquidSwell);
16406
16430
  if (typeof url !== "string" || url === "") {
@@ -16438,14 +16462,14 @@ var item_count_for_variant_default = {
16438
16462
  };
16439
16463
 
16440
16464
  // src/liquid/filters/shopify/payment_button.ts
16441
- function bind60(_liquidSwell) {
16465
+ function bind61(_liquidSwell) {
16442
16466
  return (form) => {
16443
16467
  return `<button style="display: block; visibility: hidden;"></button>`;
16444
16468
  };
16445
16469
  }
16446
16470
 
16447
16471
  // src/liquid/filters/shopify/payment_terms.ts
16448
- function bind61(_liquidSwell) {
16472
+ function bind62(_liquidSwell) {
16449
16473
  return (form) => {
16450
16474
  return null;
16451
16475
  };
@@ -16547,7 +16571,7 @@ var svgs = {
16547
16571
  var placeholder_svgs_default = svgs;
16548
16572
 
16549
16573
  // src/liquid/filters/shopify/placeholder_svg_tag.ts
16550
- function bind62(_liquidSwell) {
16574
+ function bind63(_liquidSwell) {
16551
16575
  return function filterPlaceholderSvgTag(name, className) {
16552
16576
  const svg = placeholder_svgs_default[name];
16553
16577
  if (typeof svg === "object" && svg !== null) {
@@ -16558,7 +16582,7 @@ function bind62(_liquidSwell) {
16558
16582
  }
16559
16583
 
16560
16584
  // src/liquid/filters/shopify/shopify_asset_url.ts
16561
- function bind63(_liquidSwell) {
16585
+ function bind64(_liquidSwell) {
16562
16586
  return function filterShopifyAssetUrl(input) {
16563
16587
  if (typeof input === "string") {
16564
16588
  switch (input) {
@@ -16583,7 +16607,7 @@ function bind63(_liquidSwell) {
16583
16607
  }
16584
16608
 
16585
16609
  // src/liquid/filters/shopify/structured_data.ts
16586
- function bind64(_liquidSwell) {
16610
+ function bind65(_liquidSwell) {
16587
16611
  return async function filterStructuredData(input) {
16588
16612
  let value = input;
16589
16613
  if (value instanceof StorefrontResource) {
@@ -16661,7 +16685,7 @@ function convertToSchemaOrgProductGroup(product) {
16661
16685
  }
16662
16686
 
16663
16687
  // src/liquid/filters/inline_editable.ts
16664
- function bind65(_liquidSwell) {
16688
+ function bind66(_liquidSwell) {
16665
16689
  return (value, key) => {
16666
16690
  if (typeof value === "object" && "value" in value) {
16667
16691
  value = value.value;
@@ -16692,43 +16716,44 @@ var filters = {
16692
16716
  default_errors: bind35,
16693
16717
  divided_by: bind36,
16694
16718
  embedded_content: bind37,
16695
- font_face: bind38,
16696
- font_modify: bind39,
16697
- font_url: bind40,
16719
+ escape: bind38,
16720
+ font_face: bind39,
16721
+ font_modify: bind40,
16722
+ font_url: bind41,
16698
16723
  format_address: format_address_default,
16699
- handle: bind41,
16724
+ handle: bind42,
16700
16725
  // alias
16701
- handleize: bind41,
16702
- image_tag: bind42,
16726
+ handleize: bind42,
16727
+ image_tag: bind43,
16703
16728
  image_url: image_url_default,
16704
- inline_asset_content: bind43,
16705
- json: bind44,
16706
- json_pretty: bind45,
16707
- locale_flag: bind46,
16708
- minus: bind47,
16709
- money: bind48,
16710
- money_with_currency: bind49,
16711
- money_without_currency: bind50,
16712
- money_without_trailing_zeros: bind51,
16713
- script_tag: bind52,
16714
- stylesheet_tag: bind53,
16715
- time_tag: bind54,
16716
- translate: bind55,
16717
- t: bind55,
16729
+ inline_asset_content: bind44,
16730
+ json: bind45,
16731
+ json_pretty: bind46,
16732
+ locale_flag: bind47,
16733
+ minus: bind48,
16734
+ money: bind49,
16735
+ money_with_currency: bind50,
16736
+ money_without_currency: bind51,
16737
+ money_without_trailing_zeros: bind52,
16738
+ script_tag: bind53,
16739
+ stylesheet_tag: bind54,
16740
+ time_tag: bind55,
16741
+ translate: bind56,
16742
+ t: bind56,
16718
16743
  // alias
16719
- where: bind56,
16744
+ where: bind57,
16720
16745
  // Shopify compatibility only
16721
- asset_img_url: bind57,
16722
- hex_to_rgba: bind58,
16723
- img_url: bind59,
16746
+ asset_img_url: bind58,
16747
+ hex_to_rgba: bind59,
16748
+ img_url: bind60,
16724
16749
  item_count_for_variant: item_count_for_variant_default,
16725
- payment_button: bind60,
16726
- payment_terms: bind61,
16727
- placeholder_svg_tag: bind62,
16728
- shopify_asset_url: bind63,
16729
- structured_data: bind64,
16750
+ payment_button: bind61,
16751
+ payment_terms: bind62,
16752
+ placeholder_svg_tag: bind63,
16753
+ shopify_asset_url: bind64,
16754
+ structured_data: bind65,
16730
16755
  // Swell only
16731
- inline_editable: bind65
16756
+ inline_editable: bind66
16732
16757
  };
16733
16758
  function bindFilters(liquidSwell) {
16734
16759
  for (const [tag, handler] of Object.entries(filters)) {
@@ -16742,8 +16767,8 @@ function bindFilters(liquidSwell) {
16742
16767
  }
16743
16768
  }
16744
16769
  }
16745
- function bindWithResolvedProps(liquidSwell, bind66, resolve = []) {
16746
- const handler = bind66(liquidSwell);
16770
+ function bindWithResolvedProps(liquidSwell, bind67, resolve = []) {
16771
+ const handler = bind67(liquidSwell);
16747
16772
  if (!Array.isArray(resolve)) {
16748
16773
  return handler;
16749
16774
  }
@@ -17445,7 +17470,7 @@ var ThemeLoader = class _ThemeLoader {
17445
17470
  };
17446
17471
 
17447
17472
  // src/globals.ts
17448
- var import_lodash_es12 = require("lodash-es");
17473
+ var import_lodash_es13 = require("lodash-es");
17449
17474
 
17450
17475
  // src/compatibility/drops/robots-rule.ts
17451
17476
  var import_liquidjs35 = require("liquidjs");
@@ -17545,7 +17570,7 @@ function getAllCountryOptionTags(geoSettings) {
17545
17570
  }).filter(Boolean).join("\n");
17546
17571
  }
17547
17572
  function getRobotsGlobals(canonicalUrl) {
17548
- const sitemapUrl = `${(0, import_lodash_es12.trimEnd)(canonicalUrl, "/")}/sitemap.xml`;
17573
+ const sitemapUrl = `${(0, import_lodash_es13.trimEnd)(canonicalUrl, "/")}/sitemap.xml`;
17549
17574
  const defaultRules = [
17550
17575
  { directive: "Disallow", value: "/admin" },
17551
17576
  { directive: "Disallow", value: "/cart" },
@@ -18040,7 +18065,7 @@ var SwellTheme3 = class {
18040
18065
  return languageConfig;
18041
18066
  }
18042
18067
  const localeShortCode = locale.split("-")[0];
18043
- return (0, import_lodash_es13.reduce)(
18068
+ return (0, import_lodash_es14.reduce)(
18044
18069
  languageConfig,
18045
18070
  (acc, value, key) => {
18046
18071
  if (isObject2(value)) {
@@ -18064,15 +18089,15 @@ var SwellTheme3 = class {
18064
18089
  const translationEnd = translationParts.pop();
18065
18090
  const translationPath = translationParts.join(".");
18066
18091
  const translationConfigGlobal = this.globals.language;
18067
- acc[key] = (0, import_lodash_es13.get)(
18092
+ acc[key] = (0, import_lodash_es14.get)(
18068
18093
  translationConfigGlobal,
18069
18094
  `${translationPath}.$locale.${locale}.${translationEnd}`
18070
- ) || (0, import_lodash_es13.get)(
18095
+ ) || (0, import_lodash_es14.get)(
18071
18096
  translationConfigGlobal,
18072
18097
  `${translationPath}.$locale.${localeShortCode}.${translationEnd}`
18073
- ) || (0, import_lodash_es13.get)(translationConfigGlobal, translationKey) || value;
18098
+ ) || (0, import_lodash_es14.get)(translationConfigGlobal, translationKey) || value;
18074
18099
  } else {
18075
- acc[key] = (0, import_lodash_es13.get)(languageConfig, `$locale.${locale}.${key}`) || (0, import_lodash_es13.get)(languageConfig, `$locale.${localeShortCode}.${key}`) || value;
18100
+ acc[key] = (0, import_lodash_es14.get)(languageConfig, `$locale.${locale}.${key}`) || (0, import_lodash_es14.get)(languageConfig, `$locale.${localeShortCode}.${key}`) || value;
18076
18101
  }
18077
18102
  }
18078
18103
  return acc;
@@ -18908,8 +18933,8 @@ ${this.shopifyCompatibility.getContentForHeader()}`;
18908
18933
  const keyParts = key?.split(".") || [];
18909
18934
  const keyName = keyParts.pop() || "";
18910
18935
  const keyPath = keyParts.join(".");
18911
- const langObject = (0, import_lodash_es13.get)(langConfig, keyPath);
18912
- let localeValue = (0, import_lodash_es13.get)(langObject?.[localeCode], keyName) || (0, import_lodash_es13.get)(langObject?.[localeCode.split("-")[0]], keyName) || langObject?.[keyName];
18936
+ const langObject = (0, import_lodash_es14.get)(langConfig, keyPath);
18937
+ let localeValue = (0, import_lodash_es14.get)(langObject?.[localeCode], keyName) || (0, import_lodash_es14.get)(langObject?.[localeCode.split("-")[0]], keyName) || langObject?.[keyName];
18913
18938
  if (data?.count !== void 0 && localeValue?.one) {
18914
18939
  localeValue = data.count === 1 ? localeValue.one : localeValue.other;
18915
18940
  }
@@ -18989,7 +19014,7 @@ function fillDefaultThemeSettings(themeSettings, editorSchemaSettings) {
18989
19014
  }
18990
19015
  }
18991
19016
  function resolveThemeSettings(theme, themeSettings, editorSchemaSettings) {
18992
- const settings = (0, import_lodash_es13.cloneDeep)(themeSettings);
19017
+ const settings = (0, import_lodash_es14.cloneDeep)(themeSettings);
18993
19018
  if (settings.$locale) {
18994
19019
  const { locale } = theme.swell.getStorefrontLocalization();
18995
19020
  const localeConfig = settings.$locale[locale] || {};
@@ -18999,16 +19024,16 @@ function resolveThemeSettings(theme, themeSettings, editorSchemaSettings) {
18999
19024
  }
19000
19025
  }
19001
19026
  }
19002
- (0, import_lodash_es13.each)(settings, (value, key) => {
19027
+ (0, import_lodash_es14.each)(settings, (value, key) => {
19003
19028
  const setting = (editorSchemaSettings && findEditorSetting(editorSchemaSettings, key)) ?? null;
19004
19029
  if (isObject2(value) && !(value instanceof StorefrontResource)) {
19005
19030
  switch (setting?.type) {
19006
19031
  case "color_scheme_group": {
19007
- (0, import_lodash_es13.each)(value, (scheme, schemeId) => {
19032
+ (0, import_lodash_es14.each)(value, (scheme, schemeId) => {
19008
19033
  if (isObject2(scheme) && typeof scheme.settings === "object" && scheme.settings) {
19009
19034
  const settings2 = scheme.settings;
19010
- (0, import_lodash_es13.each)(settings2, (colorValue, colorId) => {
19011
- const fieldDef = (0, import_lodash_es13.find)(setting.fields, { id: colorId });
19035
+ (0, import_lodash_es14.each)(settings2, (colorValue, colorId) => {
19036
+ const fieldDef = (0, import_lodash_es14.find)(setting.fields, { id: colorId });
19012
19037
  if (fieldDef?.type === "color" && colorValue) {
19013
19038
  scheme.id = schemeId;
19014
19039
  settings2[colorId] = new ThemeColor(colorValue);
@@ -19059,7 +19084,7 @@ function resolveThemeSettings(theme, themeSettings, editorSchemaSettings) {
19059
19084
  }
19060
19085
  function findThemeSettingsByType(type, themeSettings, editorSchemaSettings) {
19061
19086
  const foundSettings = [];
19062
- (0, import_lodash_es13.each)(themeSettings, (value, key) => {
19087
+ (0, import_lodash_es14.each)(themeSettings, (value, key) => {
19063
19088
  if (isObject2(value) && !(value instanceof ThemeFont) && !(value instanceof StorefrontResource)) {
19064
19089
  foundSettings.push(
19065
19090
  ...findThemeSettingsByType(type, value, editorSchemaSettings)
@@ -19233,7 +19258,7 @@ function isChildItemActive(items) {
19233
19258
  }
19234
19259
  function getMenuItemValueId(value) {
19235
19260
  const fallback = typeof value === "string" ? value : "";
19236
- const slug = (0, import_lodash_es14.get)(value, "id", (0, import_lodash_es14.get)(value, "slug", fallback)) || "";
19261
+ const slug = (0, import_lodash_es15.get)(value, "id", (0, import_lodash_es15.get)(value, "slug", fallback)) || "";
19237
19262
  return slug;
19238
19263
  }
19239
19264
  async function getMenuItemUrlAndResource(theme, menuItem) {