@wix/bex-utils 2.131.0 → 2.133.0

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 (34) hide show
  1. package/@wix/bex-bundled-mini-essentials/dist/cjs/bex-bundled-mini-essentials.js +1305 -276
  2. package/@wix/bex-bundled-mini-essentials/dist/cjs/bex-bundled-mini-essentials.js.map +1 -1
  3. package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/http-client/testkit/client.js +218 -116
  4. package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/http-client/testkit/client.js.map +1 -1
  5. package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/testkit/index.d.ts +7 -8
  6. package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/testkit/index.js +1255 -263
  7. package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/testkit/index.js.map +1 -1
  8. package/@wix/bex-bundled-mini-essentials/dist/esm/bex-bundled-mini-essentials.mjs +1298 -325
  9. package/@wix/bex-bundled-mini-essentials/dist/esm/bex-bundled-mini-essentials.mjs.map +1 -1
  10. package/@wix/bex-bundled-mini-essentials/dist/esm/common-errors_hi-P2YUYYLM.mjs +34 -0
  11. package/@wix/bex-bundled-mini-essentials/dist/esm/common-errors_hi-P2YUYYLM.mjs.map +1 -0
  12. package/@wix/bex-bundled-mini-essentials/dist/esm/{exports/testkit/common-errors_ja-73RRUZ7T.mjs → common-errors_ja-MS5PSRSC.mjs} +2 -2
  13. package/@wix/bex-bundled-mini-essentials/dist/esm/{common-errors_ja-OOUHZN3G.mjs.map → common-errors_ja-MS5PSRSC.mjs.map} +1 -1
  14. package/@wix/bex-bundled-mini-essentials/dist/esm/{common-errors_uk-TGSY773Q.mjs → common-errors_uk-G7XUMV2H.mjs} +2 -2
  15. package/@wix/bex-bundled-mini-essentials/dist/esm/{common-errors_uk-TGSY773Q.mjs.map → common-errors_uk-G7XUMV2H.mjs.map} +1 -1
  16. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/http-client/testkit/client.mjs +37 -8
  17. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/http-client/testkit/client.mjs.map +1 -1
  18. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/common-errors_hi-EY6JYIPV.mjs +34 -0
  19. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/common-errors_hi-EY6JYIPV.mjs.map +1 -0
  20. package/@wix/bex-bundled-mini-essentials/dist/esm/{common-errors_ja-OOUHZN3G.mjs → exports/testkit/common-errors_ja-J6VU7MQY.mjs} +2 -2
  21. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/{common-errors_ja-73RRUZ7T.mjs.map → common-errors_ja-J6VU7MQY.mjs.map} +1 -1
  22. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/{common-errors_uk-5VEGIENP.mjs → common-errors_uk-T2LUNSSB.mjs} +2 -2
  23. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/{common-errors_uk-5VEGIENP.mjs.map → common-errors_uk-T2LUNSSB.mjs.map} +1 -1
  24. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/index.d.mts +7 -8
  25. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/index.mjs +1161 -230
  26. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/index.mjs.map +1 -1
  27. package/@wix/bex-bundled-mini-essentials/dist/tsconfig.tsbuildinfo +1 -1
  28. package/@wix/bex-bundled-mini-essentials/package.json +12 -3
  29. package/package.json +3 -3
  30. package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +0 -359
  31. package/@wix/bex-bundled-mini-essentials/dist/esm/common-errors_hi-UKK4LODD.mjs +0 -34
  32. package/@wix/bex-bundled-mini-essentials/dist/esm/common-errors_hi-UKK4LODD.mjs.map +0 -1
  33. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/common-errors_hi-X2D2EJ6Z.mjs +0 -34
  34. package/@wix/bex-bundled-mini-essentials/dist/esm/exports/testkit/common-errors_hi-X2D2EJ6Z.mjs.map +0 -1
@@ -33,6 +33,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/ambassador-sdk.js
37
+ var require_ambassador_sdk = __commonJS({
38
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/ambassador-sdk.js"(exports2) {
39
+ "use strict";
40
+ Object.defineProperty(exports2, "__esModule", { value: true });
41
+ exports2.asAmbassadorModules = exports2.asAmbassadorModule = void 0;
42
+ var asAmbassadorModule = (module3) => module3;
43
+ exports2.asAmbassadorModule = asAmbassadorModule;
44
+ var asAmbassadorModules = (modules) => modules;
45
+ exports2.asAmbassadorModules = asAmbassadorModules;
46
+ }
47
+ });
48
+
36
49
  // ../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/constants.js
37
50
  var require_constants = __commonJS({
38
51
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/constants.js"(exports2) {
@@ -382,6 +395,16 @@ var init_linguist = __esm({
382
395
  }
383
396
  });
384
397
 
398
+ // ../../node_modules/@wix/headers/dist/esm/headers/currency.js
399
+ function currencyHeader(currency) {
400
+ return { "x-wix-currency": currency };
401
+ }
402
+ var init_currency = __esm({
403
+ "../../node_modules/@wix/headers/dist/esm/headers/currency.js"() {
404
+ "use strict";
405
+ }
406
+ });
407
+
385
408
  // ../../node_modules/@wix/headers/dist/esm/errors.js
386
409
  var WixHeadersValidationError;
387
410
  var init_errors = __esm({
@@ -430,7 +453,8 @@ function createHeaders(opts = {}) {
430
453
  linguistHeader({
431
454
  signedInstance: opts.signedInstance,
432
455
  ...opts.multilingualOptions
433
- })
456
+ }),
457
+ currencyHeader(opts.currency)
434
458
  ];
435
459
  if (opts.csrf) {
436
460
  headers.push(csrf());
@@ -454,6 +478,7 @@ var init_esm = __esm({
454
478
  init_artifact_id();
455
479
  init_common_config();
456
480
  init_linguist();
481
+ init_currency();
457
482
  init_assert();
458
483
  }
459
484
  });
@@ -463,25 +488,24 @@ var require_env_util = __commonJS({
463
488
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/env-util.js"(exports2) {
464
489
  "use strict";
465
490
  Object.defineProperty(exports2, "__esModule", { value: true });
466
- exports2.isProduction = exports2.isNode = exports2.isWebWorker = exports2.isBrowser = void 0;
491
+ exports2.isBrowser = isBrowser;
492
+ exports2.isWebWorker = isWebWorker;
493
+ exports2.isNode = isNode2;
494
+ exports2.isProduction = isProduction;
467
495
  function isBrowser() {
468
496
  return typeof window !== "undefined";
469
497
  }
470
- exports2.isBrowser = isBrowser;
471
498
  function isWebWorker() {
472
499
  var _a;
473
500
  return typeof self === "object" && ((_a = self === null || self === void 0 ? void 0 : self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope";
474
501
  }
475
- exports2.isWebWorker = isWebWorker;
476
502
  function isNode2() {
477
503
  var _a;
478
504
  return typeof process !== "undefined" && ((_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) != null;
479
505
  }
480
- exports2.isNode = isNode2;
481
506
  function isProduction() {
482
507
  return process.env.NODE_ENV === "production";
483
508
  }
484
- exports2.isProduction = isProduction;
485
509
  }
486
510
  });
487
511
 
@@ -490,7 +514,18 @@ var require_utils = __commonJS({
490
514
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/utils.js"(exports2) {
491
515
  "use strict";
492
516
  Object.defineProperty(exports2, "__esModule", { value: true });
493
- exports2.toSearchQueryParams = exports2.shouldAllowUnmocked = exports2.isHttpMockServerEnabled = exports2.getGlobalConfig = exports2.changeHost = exports2.extractHost = exports2.extractProtocol = exports2.resolveProtocol = exports2.resolveHost = exports2.extractProp = exports2.silent = exports2.isAbsoluteUrl = void 0;
517
+ exports2.isAbsoluteUrl = isAbsoluteUrl;
518
+ exports2.silent = silent;
519
+ exports2.extractProp = extractProp;
520
+ exports2.resolveHost = resolveHost;
521
+ exports2.resolveProtocol = resolveProtocol;
522
+ exports2.extractProtocol = extractProtocol;
523
+ exports2.extractHost = extractHost;
524
+ exports2.changeHost = changeHost;
525
+ exports2.getGlobalConfig = getGlobalConfig;
526
+ exports2.isHttpMockServerEnabled = isHttpMockServerEnabled;
527
+ exports2.shouldAllowUnmocked = shouldAllowUnmocked;
528
+ exports2.toSearchQueryParams = toSearchQueryParams;
494
529
  var constants_1 = require_constants();
495
530
  var env_util_1 = require_env_util();
496
531
  function isAbsoluteUrl(url) {
@@ -499,18 +534,15 @@ var require_utils = __commonJS({
499
534
  }
500
535
  return /(^https?:)|(^\/\/)/.test(url);
501
536
  }
502
- exports2.isAbsoluteUrl = isAbsoluteUrl;
503
537
  async function silent(fn) {
504
538
  try {
505
539
  await fn();
506
540
  } catch (_a) {
507
541
  }
508
542
  }
509
- exports2.silent = silent;
510
543
  function extractProp(data, path) {
511
544
  return path.split(".").filter((prop) => prop).reduce((result, prop) => result[prop], data);
512
545
  }
513
- exports2.extractProp = extractProp;
514
546
  function resolveHost(opts) {
515
547
  if (opts.baseURL) {
516
548
  return extractHost(opts.baseURL);
@@ -522,7 +554,6 @@ var require_utils = __commonJS({
522
554
  return "";
523
555
  }
524
556
  }
525
- exports2.resolveHost = resolveHost;
526
557
  function resolveProtocol(opts) {
527
558
  if (opts.baseURL) {
528
559
  return extractProtocol(opts.baseURL);
@@ -534,7 +565,6 @@ var require_utils = __commonJS({
534
565
  return "";
535
566
  }
536
567
  }
537
- exports2.resolveProtocol = resolveProtocol;
538
568
  function extractProtocol(url) {
539
569
  try {
540
570
  const asUrl = new URL(url);
@@ -544,7 +574,6 @@ var require_utils = __commonJS({
544
574
  return hostAndProtocol.protocol;
545
575
  }
546
576
  }
547
- exports2.extractProtocol = extractProtocol;
548
577
  function extractHost(url) {
549
578
  let asUrl;
550
579
  try {
@@ -559,7 +588,6 @@ var require_utils = __commonJS({
559
588
  return hostAndProtocol.host;
560
589
  }
561
590
  }
562
- exports2.extractHost = extractHost;
563
591
  function extractHostAndProtocolUsingRegExp(url) {
564
592
  const regExp = new RegExp("^(.*:)//([A-Za-z0-9-.]+)(:[0-9]+)?(.*)$");
565
593
  try {
@@ -581,7 +609,6 @@ var require_utils = __commonJS({
581
609
  }
582
610
  return url.toString();
583
611
  }
584
- exports2.changeHost = changeHost;
585
612
  function getGlobalConfig() {
586
613
  const defaultConfig = { httpMockServer: { enabled: false } };
587
614
  let globalConfig;
@@ -599,21 +626,17 @@ var require_utils = __commonJS({
599
626
  }
600
627
  return globalConfig || defaultConfig;
601
628
  }
602
- exports2.getGlobalConfig = getGlobalConfig;
603
629
  function isHttpMockServerEnabled() {
604
630
  const globalConfig = getGlobalConfig();
605
631
  return globalConfig.httpMockServer.enabled;
606
632
  }
607
- exports2.isHttpMockServerEnabled = isHttpMockServerEnabled;
608
633
  function shouldAllowUnmocked() {
609
634
  const globalConfig = getGlobalConfig();
610
635
  return globalConfig.httpMockServer.allowUnmocked;
611
636
  }
612
- exports2.shouldAllowUnmocked = shouldAllowUnmocked;
613
637
  function toSearchQueryParams(params) {
614
638
  return Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).flat().join("&");
615
639
  }
616
- exports2.toSearchQueryParams = toSearchQueryParams;
617
640
  }
618
641
  });
619
642
 
@@ -635,7 +658,9 @@ var require_headers = __commonJS({
635
658
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/headers.js"(exports2) {
636
659
  "use strict";
637
660
  Object.defineProperty(exports2, "__esModule", { value: true });
638
- exports2.isWixDomain = exports2.composeHeaders = exports2.requestIdOrEmptyString = void 0;
661
+ exports2.composeHeaders = void 0;
662
+ exports2.requestIdOrEmptyString = requestIdOrEmptyString;
663
+ exports2.isWixDomain = isWixDomain;
639
664
  var tslib_1 = require("tslib");
640
665
  var headers_1 = (init_esm(), __toCommonJS(esm_exports));
641
666
  var utils_1 = require_utils();
@@ -644,7 +669,6 @@ var require_headers = __commonJS({
644
669
  var _a;
645
670
  return ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a["x-wix-request-id"]) || "";
646
671
  }
647
- exports2.requestIdOrEmptyString = requestIdOrEmptyString;
648
672
  var composeHeaders = ({ url, disableWixHeaders, includeWixHeaders, wixHeadersOpts }) => {
649
673
  const shouldAssignWixHeaders = includeWixHeaders || !disableWixHeaders && isWixDomain(url);
650
674
  return shouldAssignWixHeaders ? (0, headers_1.createHeaders)(wixHeadersOpts) : {};
@@ -659,7 +683,6 @@ var require_headers = __commonJS({
659
683
  const isWhitelisted = whitelist_json_1.default.find((wixHost) => host.endsWith(`.${wixHost}`));
660
684
  return !!isWhitelisted;
661
685
  }
662
- exports2.isWixDomain = isWixDomain;
663
686
  }
664
687
  });
665
688
 
@@ -668,7 +691,8 @@ var require_error = __commonJS({
668
691
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/error.js"(exports2) {
669
692
  "use strict";
670
693
  Object.defineProperty(exports2, "__esModule", { value: true });
671
- exports2.createHttpError = exports2.HttpError = exports2.axiosErrorFields = void 0;
694
+ exports2.HttpError = exports2.axiosErrorFields = void 0;
695
+ exports2.createHttpError = createHttpError;
672
696
  var headers_1 = require_headers();
673
697
  exports2.axiosErrorFields = [
674
698
  "code",
@@ -699,13 +723,12 @@ var require_error = __commonJS({
699
723
  function createHttpError(...args) {
700
724
  return new HttpError(...args);
701
725
  }
702
- exports2.createHttpError = createHttpError;
703
726
  }
704
727
  });
705
728
 
706
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/bind.js
729
+ // ../../node_modules/axios/lib/helpers/bind.js
707
730
  var require_bind = __commonJS({
708
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/bind.js"(exports2, module2) {
731
+ "../../node_modules/axios/lib/helpers/bind.js"(exports2, module2) {
709
732
  "use strict";
710
733
  module2.exports = function bind(fn, thisArg) {
711
734
  return function wrap() {
@@ -719,9 +742,9 @@ var require_bind = __commonJS({
719
742
  }
720
743
  });
721
744
 
722
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/utils.js
745
+ // ../../node_modules/axios/lib/utils.js
723
746
  var require_utils2 = __commonJS({
724
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/utils.js"(exports2, module2) {
747
+ "../../node_modules/axios/lib/utils.js"(exports2, module2) {
725
748
  "use strict";
726
749
  var bind = require_bind();
727
750
  var toString = Object.prototype.toString;
@@ -872,9 +895,9 @@ var require_utils2 = __commonJS({
872
895
  }
873
896
  });
874
897
 
875
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/enhanceError.js
898
+ // ../../node_modules/axios/lib/core/enhanceError.js
876
899
  var require_enhanceError = __commonJS({
877
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/enhanceError.js"(exports2, module2) {
900
+ "../../node_modules/axios/lib/core/enhanceError.js"(exports2, module2) {
878
901
  "use strict";
879
902
  module2.exports = function enhanceError(error, config, code, request, response) {
880
903
  error.config = config;
@@ -907,9 +930,9 @@ var require_enhanceError = __commonJS({
907
930
  }
908
931
  });
909
932
 
910
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/createError.js
933
+ // ../../node_modules/axios/lib/core/createError.js
911
934
  var require_createError = __commonJS({
912
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/createError.js"(exports2, module2) {
935
+ "../../node_modules/axios/lib/core/createError.js"(exports2, module2) {
913
936
  "use strict";
914
937
  var enhanceError = require_enhanceError();
915
938
  module2.exports = function createError(message, config, code, request, response) {
@@ -919,9 +942,9 @@ var require_createError = __commonJS({
919
942
  }
920
943
  });
921
944
 
922
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/settle.js
945
+ // ../../node_modules/axios/lib/core/settle.js
923
946
  var require_settle = __commonJS({
924
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/settle.js"(exports2, module2) {
947
+ "../../node_modules/axios/lib/core/settle.js"(exports2, module2) {
925
948
  "use strict";
926
949
  var createError = require_createError();
927
950
  module2.exports = function settle(resolve, reject, response) {
@@ -941,9 +964,9 @@ var require_settle = __commonJS({
941
964
  }
942
965
  });
943
966
 
944
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isAbsoluteURL.js
967
+ // ../../node_modules/axios/lib/helpers/isAbsoluteURL.js
945
968
  var require_isAbsoluteURL = __commonJS({
946
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports2, module2) {
969
+ "../../node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports2, module2) {
947
970
  "use strict";
948
971
  module2.exports = function isAbsoluteURL(url) {
949
972
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
@@ -951,9 +974,9 @@ var require_isAbsoluteURL = __commonJS({
951
974
  }
952
975
  });
953
976
 
954
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/combineURLs.js
977
+ // ../../node_modules/axios/lib/helpers/combineURLs.js
955
978
  var require_combineURLs = __commonJS({
956
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/combineURLs.js"(exports2, module2) {
979
+ "../../node_modules/axios/lib/helpers/combineURLs.js"(exports2, module2) {
957
980
  "use strict";
958
981
  module2.exports = function combineURLs(baseURL, relativeURL) {
959
982
  return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
@@ -961,9 +984,9 @@ var require_combineURLs = __commonJS({
961
984
  }
962
985
  });
963
986
 
964
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/buildFullPath.js
987
+ // ../../node_modules/axios/lib/core/buildFullPath.js
965
988
  var require_buildFullPath = __commonJS({
966
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/buildFullPath.js"(exports2, module2) {
989
+ "../../node_modules/axios/lib/core/buildFullPath.js"(exports2, module2) {
967
990
  "use strict";
968
991
  var isAbsoluteURL = require_isAbsoluteURL();
969
992
  var combineURLs = require_combineURLs();
@@ -976,9 +999,9 @@ var require_buildFullPath = __commonJS({
976
999
  }
977
1000
  });
978
1001
 
979
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/buildURL.js
1002
+ // ../../node_modules/axios/lib/helpers/buildURL.js
980
1003
  var require_buildURL = __commonJS({
981
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/buildURL.js"(exports2, module2) {
1004
+ "../../node_modules/axios/lib/helpers/buildURL.js"(exports2, module2) {
982
1005
  "use strict";
983
1006
  var utils = require_utils2();
984
1007
  function encode(val) {
@@ -1827,12 +1850,25 @@ var require_follow_redirects = __commonJS({
1827
1850
  var Writable = require("stream").Writable;
1828
1851
  var assert = require("assert");
1829
1852
  var debug = require_debug();
1853
+ (function detectUnsupportedEnvironment() {
1854
+ var looksLikeNode = typeof process !== "undefined";
1855
+ var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
1856
+ var looksLikeV8 = isFunction(Error.captureStackTrace);
1857
+ if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
1858
+ console.warn("The follow-redirects package should be excluded from browser builds.");
1859
+ }
1860
+ })();
1830
1861
  var useNativeURL = false;
1831
1862
  try {
1832
- assert(new URL2());
1863
+ assert(new URL2(""));
1833
1864
  } catch (error) {
1834
1865
  useNativeURL = error.code === "ERR_INVALID_URL";
1835
1866
  }
1867
+ var sensitiveHeaders = [
1868
+ "Authorization",
1869
+ "Proxy-Authorization",
1870
+ "Cookie"
1871
+ ];
1836
1872
  var preservedUrlFields = [
1837
1873
  "auth",
1838
1874
  "host",
@@ -1897,6 +1933,7 @@ var require_follow_redirects = __commonJS({
1897
1933
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
1898
1934
  }
1899
1935
  };
1936
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
1900
1937
  this._performRequest();
1901
1938
  }
1902
1939
  RedirectableRequest.prototype = Object.create(Writable.prototype);
@@ -2034,6 +2071,9 @@ var require_follow_redirects = __commonJS({
2034
2071
  if (!options.headers) {
2035
2072
  options.headers = {};
2036
2073
  }
2074
+ if (!isArray3(options.sensitiveHeaders)) {
2075
+ options.sensitiveHeaders = [];
2076
+ }
2037
2077
  if (options.host) {
2038
2078
  if (!options.hostname) {
2039
2079
  options.hostname = options.host;
@@ -2139,7 +2179,7 @@ var require_follow_redirects = __commonJS({
2139
2179
  this._isRedirect = true;
2140
2180
  spreadUrlObject(redirectUrl, this._options);
2141
2181
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
2142
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
2182
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
2143
2183
  }
2144
2184
  if (isFunction(beforeRedirect)) {
2145
2185
  var responseDetails = {
@@ -2256,7 +2296,9 @@ var require_follow_redirects = __commonJS({
2256
2296
  }
2257
2297
  function createErrorType(code, message, baseClass) {
2258
2298
  function CustomError(properties) {
2259
- Error.captureStackTrace(this, this.constructor);
2299
+ if (isFunction(Error.captureStackTrace)) {
2300
+ Error.captureStackTrace(this, this.constructor);
2301
+ }
2260
2302
  Object.assign(this, properties || {});
2261
2303
  this.code = code;
2262
2304
  this.message = this.cause ? message + ": " + this.cause.message : message;
@@ -2286,6 +2328,9 @@ var require_follow_redirects = __commonJS({
2286
2328
  var dot = subdomain.length - domain.length - 1;
2287
2329
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
2288
2330
  }
2331
+ function isArray3(value) {
2332
+ return value instanceof Array;
2333
+ }
2289
2334
  function isString(value) {
2290
2335
  return typeof value === "string" || value instanceof String;
2291
2336
  }
@@ -2298,14 +2343,17 @@ var require_follow_redirects = __commonJS({
2298
2343
  function isURL(value) {
2299
2344
  return URL2 && value instanceof URL2;
2300
2345
  }
2346
+ function escapeRegex(regex) {
2347
+ return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
2348
+ }
2301
2349
  module2.exports = wrap({ http, https });
2302
2350
  module2.exports.wrap = wrap;
2303
2351
  }
2304
2352
  });
2305
2353
 
2306
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/package.json
2354
+ // ../../node_modules/axios/package.json
2307
2355
  var require_package = __commonJS({
2308
- "../../node_modules/@wix/fe-essentials/node_modules/axios/package.json"(exports2, module2) {
2356
+ "../../node_modules/axios/package.json"(exports2, module2) {
2309
2357
  module2.exports = {
2310
2358
  name: "axios",
2311
2359
  version: "0.21.4",
@@ -2393,9 +2441,9 @@ var require_package = __commonJS({
2393
2441
  }
2394
2442
  });
2395
2443
 
2396
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/adapters/http.js
2444
+ // ../../node_modules/axios/lib/adapters/http.js
2397
2445
  var require_http = __commonJS({
2398
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/adapters/http.js"(exports2, module2) {
2446
+ "../../node_modules/axios/lib/adapters/http.js"(exports2, module2) {
2399
2447
  "use strict";
2400
2448
  var utils = require_utils2();
2401
2449
  var settle = require_settle();
@@ -3009,9 +3057,9 @@ var require_dist2 = __commonJS({
3009
3057
  }
3010
3058
  });
3011
3059
 
3012
- // ../../node_modules/@wix/fe-essentials/node_modules/https-proxy-agent/dist/parse-proxy-response.js
3060
+ // ../../node_modules/https-proxy-agent/dist/parse-proxy-response.js
3013
3061
  var require_parse_proxy_response = __commonJS({
3014
- "../../node_modules/@wix/fe-essentials/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) {
3062
+ "../../node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) {
3015
3063
  "use strict";
3016
3064
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
3017
3065
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -3105,9 +3153,9 @@ var require_parse_proxy_response = __commonJS({
3105
3153
  }
3106
3154
  });
3107
3155
 
3108
- // ../../node_modules/@wix/fe-essentials/node_modules/https-proxy-agent/dist/index.js
3156
+ // ../../node_modules/https-proxy-agent/dist/index.js
3109
3157
  var require_dist3 = __commonJS({
3110
- "../../node_modules/@wix/fe-essentials/node_modules/https-proxy-agent/dist/index.js"(exports2) {
3158
+ "../../node_modules/https-proxy-agent/dist/index.js"(exports2) {
3111
3159
  "use strict";
3112
3160
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3113
3161
  if (k2 === void 0) k2 = k;
@@ -3255,9 +3303,9 @@ var require_dist3 = __commonJS({
3255
3303
  }
3256
3304
  });
3257
3305
 
3258
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/InterceptorManager.js
3306
+ // ../../node_modules/axios/lib/core/InterceptorManager.js
3259
3307
  var require_InterceptorManager = __commonJS({
3260
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/InterceptorManager.js"(exports2, module2) {
3308
+ "../../node_modules/axios/lib/core/InterceptorManager.js"(exports2, module2) {
3261
3309
  "use strict";
3262
3310
  var utils = require_utils2();
3263
3311
  function InterceptorManager() {
@@ -3288,9 +3336,9 @@ var require_InterceptorManager = __commonJS({
3288
3336
  }
3289
3337
  });
3290
3338
 
3291
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/normalizeHeaderName.js
3339
+ // ../../node_modules/axios/lib/helpers/normalizeHeaderName.js
3292
3340
  var require_normalizeHeaderName = __commonJS({
3293
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports2, module2) {
3341
+ "../../node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports2, module2) {
3294
3342
  "use strict";
3295
3343
  var utils = require_utils2();
3296
3344
  module2.exports = function normalizeHeaderName(headers, normalizedName) {
@@ -3304,9 +3352,9 @@ var require_normalizeHeaderName = __commonJS({
3304
3352
  }
3305
3353
  });
3306
3354
 
3307
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/cookies.js
3355
+ // ../../node_modules/axios/lib/helpers/cookies.js
3308
3356
  var require_cookies = __commonJS({
3309
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/cookies.js"(exports2, module2) {
3357
+ "../../node_modules/axios/lib/helpers/cookies.js"(exports2, module2) {
3310
3358
  "use strict";
3311
3359
  var utils = require_utils2();
3312
3360
  module2.exports = utils.isStandardBrowserEnv() ? (
@@ -3356,9 +3404,9 @@ var require_cookies = __commonJS({
3356
3404
  }
3357
3405
  });
3358
3406
 
3359
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/parseHeaders.js
3407
+ // ../../node_modules/axios/lib/helpers/parseHeaders.js
3360
3408
  var require_parseHeaders = __commonJS({
3361
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/parseHeaders.js"(exports2, module2) {
3409
+ "../../node_modules/axios/lib/helpers/parseHeaders.js"(exports2, module2) {
3362
3410
  "use strict";
3363
3411
  var utils = require_utils2();
3364
3412
  var ignoreDuplicateOf = [
@@ -3408,9 +3456,9 @@ var require_parseHeaders = __commonJS({
3408
3456
  }
3409
3457
  });
3410
3458
 
3411
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isURLSameOrigin.js
3459
+ // ../../node_modules/axios/lib/helpers/isURLSameOrigin.js
3412
3460
  var require_isURLSameOrigin = __commonJS({
3413
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports2, module2) {
3461
+ "../../node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports2, module2) {
3414
3462
  "use strict";
3415
3463
  var utils = require_utils2();
3416
3464
  module2.exports = utils.isStandardBrowserEnv() ? (
@@ -3455,9 +3503,9 @@ var require_isURLSameOrigin = __commonJS({
3455
3503
  }
3456
3504
  });
3457
3505
 
3458
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/adapters/xhr.js
3506
+ // ../../node_modules/axios/lib/adapters/xhr.js
3459
3507
  var require_xhr = __commonJS({
3460
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/adapters/xhr.js"(exports2, module2) {
3508
+ "../../node_modules/axios/lib/adapters/xhr.js"(exports2, module2) {
3461
3509
  "use strict";
3462
3510
  var utils = require_utils2();
3463
3511
  var settle = require_settle();
@@ -3584,9 +3632,9 @@ var require_xhr = __commonJS({
3584
3632
  }
3585
3633
  });
3586
3634
 
3587
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/defaults.js
3635
+ // ../../node_modules/axios/lib/defaults.js
3588
3636
  var require_defaults = __commonJS({
3589
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/defaults.js"(exports2, module2) {
3637
+ "../../node_modules/axios/lib/defaults.js"(exports2, module2) {
3590
3638
  "use strict";
3591
3639
  var utils = require_utils2();
3592
3640
  var normalizeHeaderName = require_normalizeHeaderName();
@@ -3694,9 +3742,9 @@ var require_defaults = __commonJS({
3694
3742
  }
3695
3743
  });
3696
3744
 
3697
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/transformData.js
3745
+ // ../../node_modules/axios/lib/core/transformData.js
3698
3746
  var require_transformData = __commonJS({
3699
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/transformData.js"(exports2, module2) {
3747
+ "../../node_modules/axios/lib/core/transformData.js"(exports2, module2) {
3700
3748
  "use strict";
3701
3749
  var utils = require_utils2();
3702
3750
  var defaults2 = require_defaults();
@@ -3710,9 +3758,9 @@ var require_transformData = __commonJS({
3710
3758
  }
3711
3759
  });
3712
3760
 
3713
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/isCancel.js
3761
+ // ../../node_modules/axios/lib/cancel/isCancel.js
3714
3762
  var require_isCancel = __commonJS({
3715
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/isCancel.js"(exports2, module2) {
3763
+ "../../node_modules/axios/lib/cancel/isCancel.js"(exports2, module2) {
3716
3764
  "use strict";
3717
3765
  module2.exports = function isCancel(value) {
3718
3766
  return !!(value && value.__CANCEL__);
@@ -3720,9 +3768,9 @@ var require_isCancel = __commonJS({
3720
3768
  }
3721
3769
  });
3722
3770
 
3723
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/dispatchRequest.js
3771
+ // ../../node_modules/axios/lib/core/dispatchRequest.js
3724
3772
  var require_dispatchRequest = __commonJS({
3725
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/dispatchRequest.js"(exports2, module2) {
3773
+ "../../node_modules/axios/lib/core/dispatchRequest.js"(exports2, module2) {
3726
3774
  "use strict";
3727
3775
  var utils = require_utils2();
3728
3776
  var transformData = require_transformData();
@@ -3781,9 +3829,9 @@ var require_dispatchRequest = __commonJS({
3781
3829
  }
3782
3830
  });
3783
3831
 
3784
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/mergeConfig.js
3832
+ // ../../node_modules/axios/lib/core/mergeConfig.js
3785
3833
  var require_mergeConfig = __commonJS({
3786
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/mergeConfig.js"(exports2, module2) {
3834
+ "../../node_modules/axios/lib/core/mergeConfig.js"(exports2, module2) {
3787
3835
  "use strict";
3788
3836
  var utils = require_utils2();
3789
3837
  module2.exports = function mergeConfig(config1, config2) {
@@ -3864,9 +3912,9 @@ var require_mergeConfig = __commonJS({
3864
3912
  }
3865
3913
  });
3866
3914
 
3867
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/validator.js
3915
+ // ../../node_modules/axios/lib/helpers/validator.js
3868
3916
  var require_validator = __commonJS({
3869
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/validator.js"(exports2, module2) {
3917
+ "../../node_modules/axios/lib/helpers/validator.js"(exports2, module2) {
3870
3918
  "use strict";
3871
3919
  var pkg = require_package();
3872
3920
  var validators = {};
@@ -3940,9 +3988,9 @@ var require_validator = __commonJS({
3940
3988
  }
3941
3989
  });
3942
3990
 
3943
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/Axios.js
3991
+ // ../../node_modules/axios/lib/core/Axios.js
3944
3992
  var require_Axios = __commonJS({
3945
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/core/Axios.js"(exports2, module2) {
3993
+ "../../node_modules/axios/lib/core/Axios.js"(exports2, module2) {
3946
3994
  "use strict";
3947
3995
  var utils = require_utils2();
3948
3996
  var buildURL = require_buildURL();
@@ -4052,9 +4100,9 @@ var require_Axios = __commonJS({
4052
4100
  }
4053
4101
  });
4054
4102
 
4055
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/Cancel.js
4103
+ // ../../node_modules/axios/lib/cancel/Cancel.js
4056
4104
  var require_Cancel = __commonJS({
4057
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/Cancel.js"(exports2, module2) {
4105
+ "../../node_modules/axios/lib/cancel/Cancel.js"(exports2, module2) {
4058
4106
  "use strict";
4059
4107
  function Cancel(message) {
4060
4108
  this.message = message;
@@ -4067,9 +4115,9 @@ var require_Cancel = __commonJS({
4067
4115
  }
4068
4116
  });
4069
4117
 
4070
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/CancelToken.js
4118
+ // ../../node_modules/axios/lib/cancel/CancelToken.js
4071
4119
  var require_CancelToken = __commonJS({
4072
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/cancel/CancelToken.js"(exports2, module2) {
4120
+ "../../node_modules/axios/lib/cancel/CancelToken.js"(exports2, module2) {
4073
4121
  "use strict";
4074
4122
  var Cancel = require_Cancel();
4075
4123
  function CancelToken(executor) {
@@ -4108,9 +4156,9 @@ var require_CancelToken = __commonJS({
4108
4156
  }
4109
4157
  });
4110
4158
 
4111
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/spread.js
4159
+ // ../../node_modules/axios/lib/helpers/spread.js
4112
4160
  var require_spread = __commonJS({
4113
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/spread.js"(exports2, module2) {
4161
+ "../../node_modules/axios/lib/helpers/spread.js"(exports2, module2) {
4114
4162
  "use strict";
4115
4163
  module2.exports = function spread(callback) {
4116
4164
  return function wrap(arr2) {
@@ -4120,9 +4168,9 @@ var require_spread = __commonJS({
4120
4168
  }
4121
4169
  });
4122
4170
 
4123
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isAxiosError.js
4171
+ // ../../node_modules/axios/lib/helpers/isAxiosError.js
4124
4172
  var require_isAxiosError = __commonJS({
4125
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/helpers/isAxiosError.js"(exports2, module2) {
4173
+ "../../node_modules/axios/lib/helpers/isAxiosError.js"(exports2, module2) {
4126
4174
  "use strict";
4127
4175
  module2.exports = function isAxiosError2(payload) {
4128
4176
  return typeof payload === "object" && payload.isAxiosError === true;
@@ -4130,9 +4178,9 @@ var require_isAxiosError = __commonJS({
4130
4178
  }
4131
4179
  });
4132
4180
 
4133
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/lib/axios.js
4181
+ // ../../node_modules/axios/lib/axios.js
4134
4182
  var require_axios = __commonJS({
4135
- "../../node_modules/@wix/fe-essentials/node_modules/axios/lib/axios.js"(exports2, module2) {
4183
+ "../../node_modules/axios/lib/axios.js"(exports2, module2) {
4136
4184
  "use strict";
4137
4185
  var utils = require_utils2();
4138
4186
  var bind = require_bind();
@@ -4164,9 +4212,9 @@ var require_axios = __commonJS({
4164
4212
  }
4165
4213
  });
4166
4214
 
4167
- // ../../node_modules/@wix/fe-essentials/node_modules/axios/index.js
4215
+ // ../../node_modules/axios/index.js
4168
4216
  var require_axios2 = __commonJS({
4169
- "../../node_modules/@wix/fe-essentials/node_modules/axios/index.js"(exports2, module2) {
4217
+ "../../node_modules/axios/index.js"(exports2, module2) {
4170
4218
  "use strict";
4171
4219
  module2.exports = require_axios();
4172
4220
  }
@@ -4281,7 +4329,8 @@ var require_http_client = __commonJS({
4281
4329
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/http-client.js"(exports2) {
4282
4330
  "use strict";
4283
4331
  Object.defineProperty(exports2, "__esModule", { value: true });
4284
- exports2.createHttpClient = exports2.HttpClient = void 0;
4332
+ exports2.HttpClient = void 0;
4333
+ exports2.createHttpClient = createHttpClient2;
4285
4334
  var tslib_1 = require("tslib");
4286
4335
  var axios_1 = tslib_1.__importDefault(require_axios2());
4287
4336
  var xhr_1 = tslib_1.__importDefault(require_xhr());
@@ -4292,6 +4341,9 @@ var require_http_client = __commonJS({
4292
4341
  var options_1 = require_options();
4293
4342
  var utils_1 = require_utils();
4294
4343
  var HttpClient = class {
4344
+ static isHttpError(payload) {
4345
+ return !!(payload === null || payload === void 0 ? void 0 : payload.isWixHttpError);
4346
+ }
4295
4347
  constructor(opts = {}) {
4296
4348
  this.opts = opts;
4297
4349
  this.opts = defaultClientOptions(this.opts);
@@ -4300,9 +4352,6 @@ var require_http_client = __commonJS({
4300
4352
  sanitizerPocEnabled: checkSanitizerPocEnabled()
4301
4353
  };
4302
4354
  }
4303
- static isHttpError(payload) {
4304
- return !!(payload === null || payload === void 0 ? void 0 : payload.isWixHttpError);
4305
- }
4306
4355
  setErrorHandler(errorHandler) {
4307
4356
  this.opts.errorHandler = errorHandler;
4308
4357
  }
@@ -4377,6 +4426,7 @@ var require_http_client = __commonJS({
4377
4426
  return axios_1.default.isCancel;
4378
4427
  }
4379
4428
  getHeaders(requestOptions, signedInstance, urlObject) {
4429
+ var _a, _b;
4380
4430
  if (typeof this.opts.createHeaders === "function") {
4381
4431
  return this.getCustomHeaders(requestOptions, signedInstance, urlObject);
4382
4432
  }
@@ -4384,7 +4434,8 @@ var require_http_client = __commonJS({
4384
4434
  signedInstance,
4385
4435
  artifactId: this.opts.artifactId,
4386
4436
  csrf: false,
4387
- multilingualOptions: this.opts.multilingualOptions
4437
+ multilingualOptions: this.opts.multilingualOptions,
4438
+ currency: (_b = (_a = this.opts).getCurrency) === null || _b === void 0 ? void 0 : _b.call(_a)
4388
4439
  };
4389
4440
  return (0, options_1.buildAllHeaders)(requestOptions, wixHeadersOpts, (0, utils_1.getGlobalConfig)(), urlObject);
4390
4441
  }
@@ -4506,7 +4557,6 @@ var require_http_client = __commonJS({
4506
4557
  function createHttpClient2(...args) {
4507
4558
  return new HttpClient(...args);
4508
4559
  }
4509
- exports2.createHttpClient = createHttpClient2;
4510
4560
  }
4511
4561
  });
4512
4562
 
@@ -4515,7 +4565,8 @@ var require_http_client_node = __commonJS({
4515
4565
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/http-client-node.js"(exports2) {
4516
4566
  "use strict";
4517
4567
  Object.defineProperty(exports2, "__esModule", { value: true });
4518
- exports2.HttpClient = exports2.createHttpClient = void 0;
4568
+ exports2.HttpClient = void 0;
4569
+ exports2.createHttpClient = createHttpClientNode;
4519
4570
  var tslib_1 = require("tslib");
4520
4571
  var http_1 = tslib_1.__importDefault(require_http());
4521
4572
  var http_proxy_agent_1 = require_dist2();
@@ -4535,7 +4586,7 @@ var require_http_client_node = __commonJS({
4535
4586
  * will retry in 1 second.
4536
4587
  */
4537
4588
  reportProxyMetric(injectedMeasured, proxyOptions, triesCount = 1) {
4538
- const gaugeName = !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpsAgent) ? "NoProxy" : "Proxy";
4589
+ const gaugeName = !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpsAgent) && !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpAgent) ? "NoProxy" : "Proxy";
4539
4590
  const gauge = initHttpClientInfoGauge(gaugeName, injectedMeasured);
4540
4591
  if (gauge) {
4541
4592
  gauge(1);
@@ -4550,18 +4601,36 @@ var require_http_client_node = __commonJS({
4550
4601
  function createHttpClientNode(...args) {
4551
4602
  return new HttpClientNode(...args);
4552
4603
  }
4553
- exports2.createHttpClient = createHttpClientNode;
4554
4604
  function resolveProxyOptions(disableSquidProxy) {
4605
+ if (disableSquidProxy) {
4606
+ return {};
4607
+ }
4555
4608
  const proxyUrlAsString = process.env.WIX_HTTP_CLIENT_PROXY_URL;
4556
- if (!(proxyUrlAsString === null || proxyUrlAsString === void 0 ? void 0 : proxyUrlAsString.length) || disableSquidProxy) {
4609
+ if (proxyUrlAsString === null || proxyUrlAsString === void 0 ? void 0 : proxyUrlAsString.length) {
4610
+ const fullProxyUrl = resolveProxyUrl(proxyUrlAsString);
4611
+ return {
4612
+ // please see axios issue - https://github.com/axios/axios/issues/925#issuecomment-359982190
4613
+ httpsAgent: new https_proxy_agent_1.HttpsProxyAgent(fullProxyUrl),
4614
+ httpAgent: new http_proxy_agent_1.HttpProxyAgent(fullProxyUrl)
4615
+ };
4616
+ }
4617
+ return resolveStandardProxyOptions();
4618
+ }
4619
+ function resolveStandardProxyOptions() {
4620
+ var _a, _b, _c;
4621
+ const httpProxy = (_a = process.env.HTTP_PROXY) !== null && _a !== void 0 ? _a : process.env.http_proxy;
4622
+ const httpsProxy = (_c = (_b = process.env.HTTPS_PROXY) !== null && _b !== void 0 ? _b : process.env.https_proxy) !== null && _c !== void 0 ? _c : httpProxy;
4623
+ if (!httpsProxy && !httpProxy) {
4557
4624
  return {};
4558
4625
  }
4559
- const fullProxyUrl = resolveProxyUrl(proxyUrlAsString);
4560
- return {
4561
- // please see axios issue - https://github.com/axios/axios/issues/925#issuecomment-359982190
4562
- httpsAgent: new https_proxy_agent_1.HttpsProxyAgent(fullProxyUrl),
4563
- httpAgent: new http_proxy_agent_1.HttpProxyAgent(fullProxyUrl)
4564
- };
4626
+ const options = { proxy: false };
4627
+ if (httpsProxy) {
4628
+ options.httpsAgent = new https_proxy_agent_1.HttpsProxyAgent(httpsProxy);
4629
+ }
4630
+ if (httpProxy) {
4631
+ options.httpAgent = new http_proxy_agent_1.HttpProxyAgent(httpProxy);
4632
+ }
4633
+ return options;
4565
4634
  }
4566
4635
  function resolveProxyUrl(proxyUrl) {
4567
4636
  if (proxyUrl.startsWith("http")) {
@@ -4600,8 +4669,15 @@ var require_index_node = __commonJS({
4600
4669
  "../../node_modules/@wix/fe-essentials/node_modules/@wix/http-client/dist/src/index-node.js"(exports2) {
4601
4670
  "use strict";
4602
4671
  Object.defineProperty(exports2, "__esModule", { value: true });
4603
- exports2.HttpClient = exports2.createHttpClient = exports2.HttpError = exports2.createHttpError = exports2.ORIGINAL_URL_HEADER = exports2.ORIGINAL_PROTOCOL_HEADER = exports2.ORIGINAL_HOST_HEADER = void 0;
4672
+ exports2.HttpClient = exports2.createHttpClient = exports2.HttpError = exports2.createHttpError = exports2.ORIGINAL_URL_HEADER = exports2.ORIGINAL_PROTOCOL_HEADER = exports2.ORIGINAL_HOST_HEADER = exports2.asAmbassadorModules = exports2.asAmbassadorModule = void 0;
4604
4673
  var tslib_1 = require("tslib");
4674
+ var ambassador_sdk_1 = require_ambassador_sdk();
4675
+ Object.defineProperty(exports2, "asAmbassadorModule", { enumerable: true, get: function() {
4676
+ return ambassador_sdk_1.asAmbassadorModule;
4677
+ } });
4678
+ Object.defineProperty(exports2, "asAmbassadorModules", { enumerable: true, get: function() {
4679
+ return ambassador_sdk_1.asAmbassadorModules;
4680
+ } });
4605
4681
  var constants_1 = require_constants();
4606
4682
  Object.defineProperty(exports2, "ORIGINAL_HOST_HEADER", { enumerable: true, get: function() {
4607
4683
  return constants_1.ORIGINAL_HOST_HEADER;
@@ -5096,31 +5172,31 @@ var require_common_errors_he = __commonJS({
5096
5172
  var require_common_errors_hi = __commonJS({
5097
5173
  "../../node_modules/@wix/error-handler/dist/esm/assets/locale/common-errors/common-errors_hi.json"(exports2, module2) {
5098
5174
  module2.exports = {
5099
- "errorHandler.common-error.permission-denied.site": "You don't have permission to do this. Contact the site owner.",
5100
- "errorHandler.uncommon-error.NotImplemented": "Unfortunately, this action isn\u2019t available.",
5101
- "errorHandler.common-error.conflict": "This was recently updated somewhere else. Refresh the page to get the latest version.",
5102
- "errorHandler.common-error.permission-denied.app": "You don't have permission to perform this action. Contact the app owner.",
5103
- "errorHandler.common-error.permission-denied.workspace": "You don't have permission to perform this action. Contact the workspace owner.",
5104
- "errorHandler.common-error.CheckStatus.cta": "Check Status Page",
5105
- "errorHandler.common-error.refresh.cta": "Refresh",
5106
- "errorHandler.common-error.noConnection": "Looks like you're offline. Check your connection and try again.",
5107
- "errorHandler.common-error.resource-exhausted": "This action couldn't be completed due to a technical issue. Wait a minute and try again. ",
5108
- "errorHandler.common-error.unauthenticated.cta": "Log In",
5109
- "errorHandler.common-error.goBack.cta": "Go Back",
5110
- "errorHandler.common-error.not-found": "It looks like this item doesn't exist anymore.",
5111
- "errorHandler.common-error.captchaRequired.verify.cta": "Verify",
5112
- "errorHandler.common-error.tryAgain.cta": "Try Again",
5113
- "errorHandler.requestID.tooltip.cta": "Copy ID",
5114
- "errorHandler.common-error.permission-denied": "You don't have permission to perform this action. Request access from the owner.",
5115
- "errorHandler.requestID.tooltip.description": "If the issue continues, contact Customer Care and share this Request ID with them so they can investigate.",
5116
- "errorHandler.common-error.technicalIssue-unmappedError": "This action wasn't completed due to a technical issue. Try again or refresh.",
5117
- "errorHandler.common-error.unauthenticated": "Your session has expired. Refresh the page to log in again.",
5118
- "errorHandler.common-error.networkError": "There was an issue connecting to your network. Check your connection and try again.",
5119
- "errorHandler.common-error.technicalIssue": "This action wasn't completed due to a technical issue.",
5120
- "errorHandler.common-error.captchaRequired": "To continue, verify you are human.",
5121
- "errorHandler.common-error.technicalIssue.generic": "This action wasn't completed due to a technical issue. Try again.",
5122
- "errorHandler.common-error.validationBasic": "Some fields have invalid or missing information.",
5123
- "errorHandler.requestID.tooltip.cta.copied-success": "Copied!"
5175
+ "errorHandler.common-error.permission-denied.site": "\u0906\u092A\u0915\u0947 \u092A\u093E\u0938 \u0910\u0938\u093E \u0915\u0930\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092E\u0924\u093F \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0938\u093E\u0907\u091F \u0915\u0947 \u092E\u093E\u0932\u093F\u0915 \u0938\u0947 \u090F\u0915\u094D\u0938\u0947\u0938 \u0915\u093E \u0905\u0928\u0941\u0930\u094B\u0927 \u0915\u0930\u0947\u0902\u0964",
5176
+ "errorHandler.uncommon-error.NotImplemented": "\u092F\u0939 \u090F\u0915\u094D\u0936\u0928 \u0905\u092D\u0940 \u0909\u092A\u0932\u092C\u094D\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964",
5177
+ "errorHandler.common-error.conflict": "\u092F\u0939 \u092A\u0943\u0937\u094D\u0920 \u0915\u0939\u0940\u0902 \u0914\u0930 \u0905\u092A\u0921\u0947\u091F \u0939\u094B \u091C\u093E\u0928\u0947 \u0915\u0947 \u0915\u093E\u0930\u0923 \u0906\u092A \u092C\u0926\u0932\u093E\u0935\u094B\u0902 \u0915\u094B \u0938\u0947\u0935 \u0928\u0939\u0940\u0902 \u0915\u0930 \u0938\u0915\u0924\u0947\u0964 \u0905\u092A\u0928\u0947 \u092A\u0930\u093F\u0935\u0930\u094D\u0924\u0928\u094B\u0902 \u0915\u094B \u0928\u094B\u091F \u0915\u0930\u0947\u0902, \u092B\u093F\u0930 \u0930\u093F\u092B\u094D\u0930\u0947\u0936 \u0915\u0930\u0947\u0902 \u0914\u0930 \u092B\u093F\u0930 \u0938\u0947 \u0938\u0902\u092A\u093E\u0926\u093F\u0924 \u0915\u0930\u0928\u0947 \u0915\u093E \u092A\u094D\u0930\u092F\u093E\u0938 \u0915\u0930\u0947\u0902\u0964",
5178
+ "errorHandler.common-error.permission-denied.app": "\u0906\u092A\u0915\u0947 \u092A\u093E\u0938 \u092F\u0939 \u0915\u093E\u0930\u094D\u092F\u0935\u093E\u0908 \u0915\u094B \u0915\u0930\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092E\u0924\u093F \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0910\u092A \u092E\u093E\u0932\u093F\u0915 \u0938\u0947 \u090F\u0915\u094D\u0938\u0947\u0938 \u0915\u093E \u0905\u0928\u0941\u0930\u094B\u0927 \u0915\u0930\u0947\u0902\u0964",
5179
+ "errorHandler.common-error.permission-denied.workspace": "\u0906\u092A\u0915\u0947 \u092A\u093E\u0938 \u092F\u0939 \u0915\u093E\u0930\u094D\u092F\u0935\u093E\u0908 \u0915\u094B \u0915\u0930\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092E\u0924\u093F \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0935\u0930\u094D\u0915\u0938\u094D\u092A\u0947\u0938 \u092E\u093E\u0932\u093F\u0915 \u0938\u0947 \u090F\u0915\u094D\u0938\u0947\u0938 \u0915\u093E \u0905\u0928\u0941\u0930\u094B\u0927 \u0915\u0930\u0947\u0902\u0964",
5180
+ "errorHandler.common-error.CheckStatus.cta": "\u0938\u094D\u0925\u093F\u0924\u093F \u092A\u0943\u0937\u094D\u0920 \u091C\u093E\u0902\u091A\u0947\u0902",
5181
+ "errorHandler.common-error.refresh.cta": "\u0930\u0940\u095E\u094D\u0930\u0947\u0936 \u0915\u0930\u0947\u0902",
5182
+ "errorHandler.common-error.noConnection": "\u0910\u0938\u093E \u0932\u0917\u0924\u093E \u0939\u0948 \u0915\u093F \u0906\u092A \u0911\u092B\u093C\u0932\u093E\u0907\u0928 \u0939\u0948\u0902\u0964 \u0906\u092A\u0915\u0947 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u091C\u093E\u0902\u091A \u0915\u0930 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902\u0964",
5183
+ "errorHandler.common-error.resource-exhausted": "\u092C\u0939\u0941\u0924 \u091C\u093C\u094D\u092F\u093E\u0926\u093E \u090F\u0915\u094D\u0936\u0928 \u092C\u0939\u0941\u0924 \u0924\u0947\u091C\u093C\u0940 \u0938\u0947 \u0915\u093F\u090F \u0917\u090F\u0964 \u090F\u0915 \u092E\u093F\u0928\u091F \u0930\u0941\u0915\u0947\u0902 \u0914\u0930 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902\u0964",
5184
+ "errorHandler.common-error.unauthenticated.cta": "\u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902",
5185
+ "errorHandler.common-error.goBack.cta": "\u0935\u093E\u092A\u0938 \u091C\u093E\u090F\u0902",
5186
+ "errorHandler.common-error.not-found": "\u0910\u0938\u093E \u0932\u0917\u0924\u093E \u0939\u0948 \u0915\u093F \u092F\u0939 \u0905\u092C \u092E\u094C\u091C\u0942\u0926 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964",
5187
+ "errorHandler.common-error.captchaRequired.verify.cta": "\u0938\u0924\u094D\u092F\u093E\u092A\u093F\u0924 \u0915\u0930\u0947\u0902",
5188
+ "errorHandler.common-error.tryAgain.cta": "\u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902",
5189
+ "errorHandler.requestID.tooltip.cta": "\u0906\u0908\u0921\u0940 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",
5190
+ "errorHandler.common-error.permission-denied": "\u0906\u092A\u0915\u0947 \u092A\u093E\u0938 \u0906\u0935\u0936\u094D\u092F\u0915 \u0905\u0928\u0941\u092E\u0924\u093F\u092F\u093E\u0901 \u0928\u0939\u0940\u0902 \u0939\u0948\u0902\u0964 \u092E\u093E\u0932\u093F\u0915 \u0938\u0947 \u092A\u0939\u0941\u0901\u091A \u0915\u093E \u0905\u0928\u0941\u0930\u094B\u0927 \u0915\u0930\u0947\u0902\u0964",
5191
+ "errorHandler.requestID.tooltip.description": "\u092F\u0926\u093F \u0906\u092A \u0907\u0938 \u0924\u094D\u0930\u0941\u091F\u093F \u0915\u0940 \u0930\u093F\u092A\u094B\u0930\u094D\u091F \u0917\u094D\u0930\u093E\u0939\u0915 \u0938\u0947\u0935\u093E \u0915\u094B \u0915\u0930\u0924\u0947 \u0939\u0948\u0902, \u0924\u094B \u0907\u0938 \u0905\u0928\u0941\u0930\u094B\u0927 \u0906\u0908\u0921\u0940 \u0915\u094B \u0938\u093E\u091D\u093E \u0915\u0930\u0947\u0902 \u0924\u093E\u0915\u093F \u0935\u0947 \u091C\u093E\u0902\u091A \u0915\u0930 \u0938\u0915\u0947\u0902\u0964",
5192
+ "errorHandler.common-error.technicalIssue-unmappedError": "\u0939\u092E\u093E\u0930\u0947 \u092F\u0939\u093E\u0901 \u0915\u094B\u0908 \u0924\u0915\u0928\u0940\u0915\u0940 \u0916\u0930\u093E\u092C\u0940 \u0925\u0940\u0964 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902 \u092F\u093E \u0930\u0940\u092B\u093C\u094D\u0930\u0947\u0936 \u0915\u0930\u0947\u0902\u0964",
5193
+ "errorHandler.common-error.unauthenticated": "\u0906\u092A \u0932\u0949\u0917 \u0906\u0909\u091F \u0939\u094B \u0917\u090F \u0939\u0948\u0902\u0964 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0915\u0947 \u091C\u093E\u0930\u0940 \u0930\u0916\u0947\u0902\u0964",
5194
+ "errorHandler.common-error.networkError": "\u0906\u092A\u0915\u0947 \u0928\u0947\u091F\u0935\u0930\u094D\u0915 \u0938\u0947 \u0915\u0928\u0947\u0915\u094D\u091F \u0939\u094B\u0928\u0947 \u092E\u0947\u0902 \u0938\u092E\u0938\u094D\u092F\u093E \u0925\u0940\u0964 \u0906\u092A\u0915\u0947 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u091C\u093E\u0902\u091A \u0915\u0930 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902\u0964",
5195
+ "errorHandler.common-error.technicalIssue": "\u0939\u092E\u093E\u0930\u0947 \u092F\u0939\u093E\u0901 \u0915\u094B\u0908 \u0924\u0915\u0928\u0940\u0915\u0940 \u0916\u0930\u093E\u092C\u0940 \u0925\u0940\u0964 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902 \u092F\u093E \u0930\u0940\u092B\u093C\u094D\u0930\u0947\u0936 \u0915\u0930\u0947\u0902\u0964",
5196
+ "errorHandler.common-error.captchaRequired": "\u091C\u093E\u0930\u0940 \u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F, \u0915\u0943\u092A\u092F\u093E \u0938\u0924\u094D\u092F\u093E\u092A\u093F\u0924 \u0915\u0930\u0947\u0902 \u0915\u093F \u0906\u092A \u090F\u0915 \u0907\u0902\u0938\u093E\u0928 \u0939\u0948\u0902\u0964",
5197
+ "errorHandler.common-error.technicalIssue.generic": "\u0939\u092E\u093E\u0930\u0947 \u092F\u0939\u093E\u0901 \u0915\u094B\u0908 \u0924\u0915\u0928\u0940\u0915\u0940 \u0916\u0930\u093E\u092C\u0940 \u0925\u0940\u0964 \u092B\u093F\u0930 \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902 \u092F\u093E \u0930\u0940\u092B\u093C\u094D\u0930\u0947\u0936 \u0915\u0930\u0947\u0902\u0964",
5198
+ "errorHandler.common-error.validationBasic": "\u0915\u0941\u091B \u092B\u093C\u0940\u0932\u094D\u0921 \u092E\u0947\u0902 \u0905\u092E\u093E\u0928\u094D\u092F \u092F\u093E \u0917\u093E\u092F\u092C \u091C\u093E\u0928\u0915\u093E\u0930\u0940 \u0939\u0948\u0964",
5199
+ "errorHandler.requestID.tooltip.cta.copied-success": "\u0915\u0949\u092A\u0940 \u0915\u0930 \u0932\u093F\u092F\u093E!"
5124
5200
  };
5125
5201
  }
5126
5202
  });
@@ -5284,7 +5360,7 @@ var require_common_errors_ja = __commonJS({
5284
5360
  "errorHandler.common-error.technicalIssue": "\u5F0A\u793E\u5074\u3067\u6280\u8853\u7684\u306A\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u304A\u624B\u6570\u3067\u3059\u304C\u3001\u518D\u5EA6\u304A\u8A66\u3057\u306B\u306A\u308B\u304B\u30DA\u30FC\u30B8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
5285
5361
  "errorHandler.common-error.captchaRequired": "\u7D9A\u884C\u3059\u308B\u306B\u306F\u3001\u3042\u306A\u305F\u304C\u4EBA\u9593\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
5286
5362
  "errorHandler.common-error.technicalIssue.generic": "\u5F0A\u793E\u5074\u3067\u6280\u8853\u7684\u306A\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u304A\u624B\u6570\u3067\u3059\u304C\u3001\u518D\u5EA6\u304A\u8A66\u3057\u306B\u306A\u308B\u304B\u30DA\u30FC\u30B8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
5287
- "errorHandler.common-error.validationBasic": "\u4E00\u90E8\u306E\u9805\u76EE\u306B\u306F\u3001\u60C5\u5831\u304C\u7121\u52B9\u307E\u305F\u306F\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002",
5363
+ "errorHandler.common-error.validationBasic": "\u9805\u76EE\u304C\u7121\u52B9\u307E\u305F\u306F\u60C5\u5831\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002",
5288
5364
  "errorHandler.requestID.tooltip.cta.copied-success": "\u30B3\u30D4\u30FC\u6E08\u307F"
5289
5365
  };
5290
5366
  }
@@ -5838,7 +5914,7 @@ var require_common_errors_uk = __commonJS({
5838
5914
  "errorHandler.common-error.tryAgain.cta": "\u0421\u043F\u0440\u043E\u0431\u0443\u0432\u0430\u0442\u0438 \u0437\u043D\u043E\u0432\u0443",
5839
5915
  "errorHandler.requestID.tooltip.cta": "\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0456\u0434\u0435\u043D\u0442\u0438\u0444\u0456\u043A\u0430\u0442\u043E\u0440",
5840
5916
  "errorHandler.common-error.permission-denied": "\u0423 \u0432\u0430\u0441 \u043D\u0435\u043C\u0430\u0454 \u043F\u043E\u0442\u0440\u0456\u0431\u043D\u0438\u0445 \u0434\u043E\u0437\u0432\u043E\u043B\u0456\u0432. \u041F\u043E\u043F\u0440\u043E\u0441\u0456\u0442\u044C \u0432\u043B\u0430\u0441\u043D\u0438\u043A\u0430 \u043D\u0430\u0434\u0430\u0442\u0438 \u0432\u0430\u043C \u0434\u043E\u0441\u0442\u0443\u043F.",
5841
- "errorHandler.requestID.tooltip.description": "If the issue continues, contact Customer Care and share this Request ID with them so they can investigate.",
5917
+ "errorHandler.requestID.tooltip.description": "\u042F\u043A\u0449\u043E \u0432\u0438 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u044F\u0454\u0442\u0435 \u043F\u0440\u043E \u0446\u044E \u043F\u043E\u043C\u0438\u043B\u043A\u0443 \u0421\u043B\u0443\u0436\u0431\u0456 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u043A\u0438, \u043D\u0430\u0434\u0430\u0439\u0442\u0435 \u0457\u043C \u0446\u0435\u0439 \u0456\u0434\u0435\u043D\u0442\u0438\u0444\u0456\u043A\u0430\u0442\u043E\u0440 \u0437\u0430\u043F\u0438\u0442\u0443, \u0449\u043E\u0431 \u0432\u043E\u043D\u0438 \u043C\u043E\u0433\u043B\u0438 \u0434\u043E\u0441\u043B\u0456\u0434\u0438\u0442\u0438 \u043F\u043E\u043C\u0438\u043B\u043A\u0443.",
5842
5918
  "errorHandler.common-error.technicalIssue-unmappedError": "\u0423 \u043D\u0430\u0441 \u0432\u0438\u043D\u0438\u043A\u043B\u0430 \u0442\u0435\u0445\u043D\u0456\u0447\u043D\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430. \u0421\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0437\u043D\u043E\u0432\u0443 \u0430\u0431\u043E \u043E\u043D\u043E\u0432\u0456\u0442\u044C.",
5843
5919
  "errorHandler.common-error.unauthenticated": "\u0412\u0438 \u0432\u0438\u0439\u0448\u043B\u0438 \u0437 \u0430\u043A\u0430\u0443\u043D\u0442\u0430. \u0423\u0432\u0456\u0439\u0434\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u0440\u043E\u0434\u043E\u0432\u0436\u0438\u0442\u0438.",
5844
5920
  "errorHandler.common-error.networkError": "\u0412\u0438\u043D\u0438\u043A\u043B\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430 \u0437 \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044F\u043C \u0434\u043E \u0432\u0430\u0448\u043E\u0457 \u043C\u0435\u0440\u0435\u0436\u0456. \u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044F \u0434\u043E \u0456\u043D\u0442\u0435\u0440\u043D\u0435\u0442\u0443 \u0442\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u0456\u0442\u044C \u0441\u043F\u0440\u043E\u0431\u0443.",
@@ -7303,6 +7379,7 @@ var require_browser2 = __commonJS({
7303
7379
  "use strict";
7304
7380
  Object.defineProperty(exports2, "__esModule", { value: true });
7305
7381
  exports2.readCookie = exports2.sendBeacon = exports2.getWindowSize = exports2.getDesktopSize = exports2.now = void 0;
7382
+ var utils_1 = require_utils3();
7306
7383
  function now2() {
7307
7384
  return typeof performance !== "undefined" && performance && performance.now ? performance.now() : -1;
7308
7385
  }
@@ -7339,7 +7416,7 @@ var require_browser2 = __commonJS({
7339
7416
  }
7340
7417
  exports2.sendBeacon = sendBeacon2;
7341
7418
  function readCookie2(cookieName) {
7342
- if (typeof document === "undefined") {
7419
+ if ((0, utils_1.isDataProtocol)() || typeof document === "undefined") {
7343
7420
  return null;
7344
7421
  }
7345
7422
  if (window.__ENABLE_COOKIE_READ_OPTIMIZATION__ && window.__BI_cookie_cache && window.__BI_cookie_cache[cookieName] !== void 0) {
@@ -7375,8 +7452,8 @@ var require_constants2 = __commonJS({
7375
7452
  "../../node_modules/@wix/web-bi-logger/dist/src/constants.js"(exports2) {
7376
7453
  "use strict";
7377
7454
  Object.defineProperty(exports2, "__esModule", { value: true });
7378
- exports2.DefaultCommonConfig = exports2.BrandToHostMap = exports2.HeadlessHost = exports2.DefaultBrand = exports2.EventContextMap = exports2.BackofficeDomains = exports2.LoggerVersion = void 0;
7379
- exports2.LoggerVersion = "2.0.985|C";
7455
+ exports2.DefaultCommonConfig = exports2.BrandToDomainMap = exports2.BrandToHostMap = exports2.HeadlessHost = exports2.DefaultScreenResolution = exports2.DefaultBrand = exports2.EventContextMap = exports2.BackofficeDomains = exports2.LoggerVersion = void 0;
7456
+ exports2.LoggerVersion = "2.0.987|C";
7380
7457
  exports2.BackofficeDomains = [".wix.com", ".editorx.com"];
7381
7458
  var EventContextMap;
7382
7459
  (function(EventContextMap2) {
@@ -7387,16 +7464,22 @@ var require_constants2 = __commonJS({
7387
7464
  EventContextMap2["siteMemberId"] = "_siteMemberId";
7388
7465
  EventContextMap2["brandId"] = "_brandId";
7389
7466
  EventContextMap2["siteBranchId"] = "_siteBranchId";
7467
+ EventContextMap2["screenResolution"] = "_sr";
7390
7468
  EventContextMap2["ms"] = "_ms";
7391
7469
  EventContextMap2["lv"] = "_lv";
7392
7470
  EventContextMap2["isHeadless"] = "_isHeadless";
7393
7471
  EventContextMap2["hostingPlatform"] = "_hostingPlatform";
7394
7472
  })(EventContextMap = exports2.EventContextMap || (exports2.EventContextMap = {}));
7395
7473
  exports2.DefaultBrand = "wix";
7474
+ exports2.DefaultScreenResolution = "0x0";
7396
7475
  exports2.HeadlessHost = "VIEWER_HEADLESS";
7397
7476
  exports2.BrandToHostMap = {
7398
7477
  wix: "wix",
7399
- editorx: "editorx"
7478
+ editorx: "editorx",
7479
+ base44: "base44"
7480
+ };
7481
+ exports2.BrandToDomainMap = {
7482
+ base44: /\.base44\.com$/
7400
7483
  };
7401
7484
  exports2.DefaultCommonConfig = {
7402
7485
  brand: exports2.DefaultBrand
@@ -7409,7 +7492,7 @@ var require_env = __commonJS({
7409
7492
  "../../node_modules/@wix/web-bi-logger/dist/src/lib/env.js"(exports2) {
7410
7493
  "use strict";
7411
7494
  Object.defineProperty(exports2, "__esModule", { value: true });
7412
- exports2.getGlobal = exports2.getWindowIfTop = exports2.isBackoffice = exports2.isWebWorker = exports2.getHost = exports2.setHost = void 0;
7495
+ exports2.getGlobal = exports2.getWindowIfTop = exports2.isBackoffice = exports2.isWebWorker = exports2.getBrandByDomain = exports2.getHost = exports2.setHost = void 0;
7413
7496
  var constants_1 = require_constants2();
7414
7497
  var host;
7415
7498
  var hostByDomain;
@@ -7430,7 +7513,7 @@ var require_env = __commonJS({
7430
7513
  if (!window2.location || !window2.location.hostname) {
7431
7514
  return null;
7432
7515
  }
7433
- var _a = window2.location.hostname.match(/\.(wix|editorx)\.com$/) || [], domain = _a[1];
7516
+ var _a = window2.location.hostname.match(/\.(wix|editorx|base44)\.com$/) || [], domain = _a[1];
7434
7517
  return domain || null;
7435
7518
  }, null);
7436
7519
  }
@@ -7438,6 +7521,17 @@ var require_env = __commonJS({
7438
7521
  return "frog.".concat(hostByDomainOrBrand, ".com");
7439
7522
  }
7440
7523
  exports2.getHost = getHost;
7524
+ function getBrandByDomain() {
7525
+ return getGlobal2(function(global2) {
7526
+ if (!global2.location || !global2.location.hostname) {
7527
+ return null;
7528
+ }
7529
+ return Object.keys(constants_1.BrandToDomainMap).find(function(brand) {
7530
+ return constants_1.BrandToDomainMap[brand].test(global2.location.hostname);
7531
+ }) || null;
7532
+ }, null);
7533
+ }
7534
+ exports2.getBrandByDomain = getBrandByDomain;
7441
7535
  function isWebWorker() {
7442
7536
  return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
7443
7537
  }
@@ -7480,7 +7574,7 @@ var require_utils3 = __commonJS({
7480
7574
  "../../node_modules/@wix/web-bi-logger/dist/src/lib/utils.js"(exports2) {
7481
7575
  "use strict";
7482
7576
  Object.defineProperty(exports2, "__esModule", { value: true });
7483
- exports2.guid = exports2.buildBiUrl = exports2.getCookies = void 0;
7577
+ exports2.guid = exports2.isDataProtocol = exports2.buildBiUrl = exports2.getCookies = void 0;
7484
7578
  var browser_1 = require_browser2();
7485
7579
  var env_1 = require_env();
7486
7580
  var cacheKillerCounter = 0;
@@ -7511,9 +7605,17 @@ var require_utils3 = __commonJS({
7511
7605
  var pairs = context.useBatch ? [] : Object.keys(params).map(function(key) {
7512
7606
  return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(params[key]));
7513
7607
  }, []);
7514
- return ["//".concat(host, "/").concat(endpoint)].concat(pairs.length ? pairs.join("&") : []).join("?");
7608
+ var url = ["//".concat(host, "/").concat(endpoint)].concat(pairs.length ? pairs.join("&") : []).join("?");
7609
+ if (url.startsWith("//") && isDataProtocol()) {
7610
+ url = "https:" + url;
7611
+ }
7612
+ return url;
7515
7613
  }
7516
7614
  exports2.buildBiUrl = buildBiUrl;
7615
+ function isDataProtocol() {
7616
+ return typeof window !== "undefined" && (window === null || window === void 0 ? void 0 : window.location.protocol) === "data:";
7617
+ }
7618
+ exports2.isDataProtocol = isDataProtocol;
7517
7619
  function guid() {
7518
7620
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
7519
7621
  var r = Math.random() * 16 | 0;
@@ -7644,8 +7746,8 @@ var require_transport = __commonJS({
7644
7746
  var require_publishers = __commonJS({
7645
7747
  "../../node_modules/@wix/web-bi-logger/dist/src/lib/publishers.js"(exports2) {
7646
7748
  "use strict";
7647
- var __assign3 = exports2 && exports2.__assign || function() {
7648
- __assign3 = Object.assign || function(t) {
7749
+ var __assign4 = exports2 && exports2.__assign || function() {
7750
+ __assign4 = Object.assign || function(t) {
7649
7751
  for (var s, i = 1, n = arguments.length; i < n; i++) {
7650
7752
  s = arguments[i];
7651
7753
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -7653,7 +7755,7 @@ var require_publishers = __commonJS({
7653
7755
  }
7654
7756
  return t;
7655
7757
  };
7656
- return __assign3.apply(this, arguments);
7758
+ return __assign4.apply(this, arguments);
7657
7759
  };
7658
7760
  var __rest = exports2 && exports2.__rest || function(s, e) {
7659
7761
  var t = {};
@@ -7787,7 +7889,7 @@ var require_publishers = __commonJS({
7787
7889
  };
7788
7890
  params.e = params.e.map(function(e) {
7789
7891
  var context = e.context, event = __rest(e, ["context"]);
7790
- var res = __assign3(__assign3({}, event), { f: __assign3(__assign3({}, event.f), { _rp: getEndpoint_1(context) }) });
7892
+ var res = __assign4(__assign4({}, event), { f: __assign4(__assign4({}, event.f), { _rp: getEndpoint_1(context) }) });
7791
7893
  return res;
7792
7894
  });
7793
7895
  }
@@ -7812,19 +7914,22 @@ var require_common_config = __commonJS({
7812
7914
  return g.Wix && g.Wix.Utils && g.Wix.Utils.commonConfig || g.commonConfig;
7813
7915
  });
7814
7916
  };
7815
- var getCommonConfigValue = function(key, commonConfig2) {
7917
+ var getCommonConfigValue = function(key, commonConfig2, defaultValue) {
7816
7918
  if (commonConfig2 === void 0) {
7817
7919
  commonConfig2 = resolveCommonConfig();
7818
7920
  }
7921
+ if (defaultValue === void 0) {
7922
+ defaultValue = constants_1.DefaultCommonConfig[key];
7923
+ }
7819
7924
  commonConfig2 = commonConfig2 && typeof commonConfig2.getAll === "function" ? commonConfig2.getAll() : commonConfig2;
7820
7925
  if (!commonConfig2 || typeof commonConfig2[key] === "undefined") {
7821
- return constants_1.DefaultCommonConfig[key];
7926
+ return defaultValue;
7822
7927
  }
7823
7928
  return commonConfig2[key];
7824
7929
  };
7825
7930
  exports2.getCommonConfigValue = getCommonConfigValue;
7826
7931
  var getBrand = function(commonConfigGetter) {
7827
- return (0, exports2.getCommonConfigValue)("brand", commonConfigGetter());
7932
+ return (0, exports2.getCommonConfigValue)("brand", commonConfigGetter(), (0, env_1.getBrandByDomain)() || constants_1.DefaultBrand);
7828
7933
  };
7829
7934
  exports2.getBrand = getBrand;
7830
7935
  var getBranchId = function(commonConfigGetter) {
@@ -7847,6 +7952,7 @@ var require_event_defaults = __commonJS({
7847
7952
  var constants_1 = require_constants2();
7848
7953
  var browser_1 = require_browser2();
7849
7954
  var common_config_1 = require_common_config();
7955
+ var env_1 = require_env();
7850
7956
  var utils_1 = require_utils3();
7851
7957
  var transformDefaults = function(context) {
7852
7958
  return Object.keys(context).reduce(function(res, key) {
@@ -7876,6 +7982,9 @@ var require_event_defaults = __commonJS({
7876
7982
  siteBranchId: function() {
7877
7983
  return (0, common_config_1.getBranchId)(commonConfigGetter);
7878
7984
  },
7985
+ screenResolution: function() {
7986
+ return resolveScreenResolution();
7987
+ },
7879
7988
  ms: function() {
7880
7989
  return Math.round((0, browser_1.now)());
7881
7990
  },
@@ -7892,6 +8001,11 @@ var require_event_defaults = __commonJS({
7892
8001
  var resolveIsHeadless = function(commonConfigGetter) {
7893
8002
  return (0, common_config_1.getWixHost)(commonConfigGetter) === constants_1.HeadlessHost || void 0;
7894
8003
  };
8004
+ var resolveScreenResolution = function() {
8005
+ return (0, env_1.getWindowIfTop)(function(window2) {
8006
+ return (0, browser_1.getDesktopSize)(window2);
8007
+ }) || constants_1.DefaultScreenResolution;
8008
+ };
7895
8009
  }
7896
8010
  });
7897
8011
 
@@ -7899,8 +8013,8 @@ var require_event_defaults = __commonJS({
7899
8013
  var require_logger = __commonJS({
7900
8014
  "../../node_modules/@wix/web-bi-logger/dist/src/logger.js"(exports2) {
7901
8015
  "use strict";
7902
- var __assign3 = exports2 && exports2.__assign || function() {
7903
- __assign3 = Object.assign || function(t) {
8016
+ var __assign4 = exports2 && exports2.__assign || function() {
8017
+ __assign4 = Object.assign || function(t) {
7904
8018
  for (var s, i = 1, n = arguments.length; i < n; i++) {
7905
8019
  s = arguments[i];
7906
8020
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -7908,7 +8022,7 @@ var require_logger = __commonJS({
7908
8022
  }
7909
8023
  return t;
7910
8024
  };
7911
- return __assign3.apply(this, arguments);
8025
+ return __assign4.apply(this, arguments);
7912
8026
  };
7913
8027
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
7914
8028
  if (k2 === void 0) k2 = k;
@@ -7984,7 +8098,7 @@ var require_logger = __commonJS({
7984
8098
  this.initialized = true;
7985
8099
  this.updateDefaults((0, event_defaults_1.getCommonDefaults)(this.commonConfigGetter, Factory2.consentPolicyAccessor));
7986
8100
  this.withUserContext((0, event_defaults_1.getUserDefaults)());
7987
- var options = __assign3(__assign3({}, this.options), { host: this.options.host || function() {
8101
+ var options = __assign4(__assign4({}, this.options), { host: this.options.host || function() {
7988
8102
  return (0, env_1.getHost)((0, common_config_1.getBrand)(_this.commonConfigGetter));
7989
8103
  } });
7990
8104
  var publisher = (0, publishers_1.getPublisher)(options, this.publishFunctions);
@@ -8059,7 +8173,7 @@ var require_logger = __commonJS({
8059
8173
  options = {};
8060
8174
  }
8061
8175
  var _a = this.options, endpoint = _a.endpoint, useBatch = _a.useBatch;
8062
- var logger = this.initFactory().logger(__assign3({ endpoint, useBatch }, options));
8176
+ var logger = this.initFactory().logger(__assign4({ endpoint, useBatch }, options));
8063
8177
  return logger;
8064
8178
  };
8065
8179
  return Factory2;
@@ -8079,91 +8193,328 @@ var require_logger = __commonJS({
8079
8193
  }
8080
8194
  });
8081
8195
 
8082
- // ../../node_modules/@wix/web-bi-logger/dist/src/lib/navigator.js
8083
- var require_navigator = __commonJS({
8084
- "../../node_modules/@wix/web-bi-logger/dist/src/lib/navigator.js"(exports2) {
8196
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/browser.js
8197
+ var require_browser3 = __commonJS({
8198
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/browser.js"(exports2) {
8085
8199
  "use strict";
8086
8200
  Object.defineProperty(exports2, "__esModule", { value: true });
8087
- exports2.listen = void 0;
8088
- var env_1 = require_env();
8089
- function hook(obj, fnName, cbHook) {
8090
- if (!obj || !obj[fnName]) {
8091
- return;
8092
- }
8093
- var original = obj[fnName];
8094
- obj[fnName] = function() {
8095
- cbHook.apply(null, arguments);
8096
- return original.apply(obj, arguments);
8097
- };
8201
+ exports2.readCookie = exports2.sendBeacon = exports2.getWindowSize = exports2.getDesktopSize = exports2.now = void 0;
8202
+ var utils_1 = require_utils4();
8203
+ function now2() {
8204
+ return typeof performance !== "undefined" && performance && performance.now ? performance.now() : -1;
8098
8205
  }
8099
- function onLoad(cb) {
8100
- setTimeout(function() {
8101
- return (0, env_1.getWindowIfTop)(function(window2) {
8102
- return cb(window2.location.href);
8103
- });
8104
- });
8206
+ exports2.now = now2;
8207
+ function getDesktopSize(window2) {
8208
+ var width = window2.screen && window2.screen.width || 0;
8209
+ var height = window2.screen && window2.screen.height || 0;
8210
+ return "".concat(width, "x").concat(height);
8105
8211
  }
8106
- function onPushState(cb) {
8107
- (0, env_1.getWindowIfTop)(function(_a) {
8108
- var history = _a.history;
8109
- return ["pushState", "replaceState"].forEach(function(fnName) {
8110
- hook(history, fnName, function(_, __, url) {
8111
- return cb(url);
8112
- });
8113
- });
8114
- });
8212
+ exports2.getDesktopSize = getDesktopSize;
8213
+ function getWindowSize(window2) {
8214
+ var width = 0;
8215
+ var height = 0;
8216
+ if (window2.innerWidth) {
8217
+ width = window2.innerWidth;
8218
+ height = window2.innerHeight;
8219
+ } else if (window2.document) {
8220
+ if (window2.document.documentElement && window2.document.documentElement.clientWidth) {
8221
+ width = window2.document.documentElement.clientWidth;
8222
+ height = window2.document.documentElement.clientHeight;
8223
+ } else if (window2.document.body && window2.document.body.clientWidth) {
8224
+ width = window2.document.body.clientWidth;
8225
+ height = window2.document.body.clientHeight;
8226
+ }
8227
+ }
8228
+ return "".concat(width, "x").concat(height);
8115
8229
  }
8116
- function onPopState(cb) {
8117
- (0, env_1.getWindowIfTop)(function(window2) {
8118
- return window2.addEventListener("popstate", function() {
8119
- return cb(window2.location.href);
8120
- });
8121
- });
8230
+ exports2.getWindowSize = getWindowSize;
8231
+ function sendBeacon2(url, data) {
8232
+ if (typeof navigator === "undefined" || !navigator || !navigator.sendBeacon) {
8233
+ return false;
8234
+ }
8235
+ return navigator.sendBeacon(url, data);
8122
8236
  }
8123
- function listen(cb) {
8124
- (0, env_1.getWindowIfTop)(function(window2) {
8125
- var fromUrl = window2.document.referrer;
8126
- [onLoad, onPushState, onPopState].forEach(function(event) {
8127
- return event(function(toUrl) {
8128
- cb(fromUrl, toUrl);
8129
- fromUrl = toUrl;
8130
- });
8131
- });
8132
- });
8237
+ exports2.sendBeacon = sendBeacon2;
8238
+ function readCookie2(cookieName) {
8239
+ if ((0, utils_1.isDataProtocol)() || typeof document === "undefined") {
8240
+ return null;
8241
+ }
8242
+ if (window.__ENABLE_COOKIE_READ_OPTIMIZATION__ && window.__BI_cookie_cache && window.__BI_cookie_cache[cookieName] !== void 0) {
8243
+ return window.__BI_cookie_cache[cookieName];
8244
+ }
8245
+ var cookies = document.cookie.split(";");
8246
+ for (var _i = 0, cookies_1 = cookies; _i < cookies_1.length; _i++) {
8247
+ var cookie = cookies_1[_i];
8248
+ var pair = cookie.split("=");
8249
+ var name_1 = pair[0];
8250
+ var value = pair[1];
8251
+ while (name_1[0] === " ") {
8252
+ name_1 = name_1.substr(1);
8253
+ }
8254
+ if (name_1 === cookieName) {
8255
+ if (window.__ENABLE_COOKIE_READ_OPTIMIZATION__) {
8256
+ if (!window.__BI_cookie_cache) {
8257
+ window.__BI_cookie_cache = {};
8258
+ }
8259
+ window.__BI_cookie_cache[cookieName] = value;
8260
+ }
8261
+ return value;
8262
+ }
8263
+ }
8264
+ return "";
8133
8265
  }
8134
- exports2.listen = listen;
8266
+ exports2.readCookie = readCookie2;
8135
8267
  }
8136
8268
  });
8137
8269
 
8138
- // ../../node_modules/@wix/web-bi-logger/dist/src/lib/tracker.js
8139
- var require_tracker = __commonJS({
8140
- "../../node_modules/@wix/web-bi-logger/dist/src/lib/tracker.js"(exports2) {
8270
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/constants.js
8271
+ var require_constants3 = __commonJS({
8272
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/constants.js"(exports2) {
8141
8273
  "use strict";
8142
8274
  Object.defineProperty(exports2, "__esModule", { value: true });
8143
- exports2.track = void 0;
8144
- var utils_1 = require_utils3();
8145
- var navigator_1 = require_navigator();
8146
- var env_1 = require_env();
8147
- var browser_1 = require_browser2();
8148
- var IS_TRACKING = "__isTrackingPageViews__";
8149
- var ENDPOINT = "p";
8150
- var SOURCE = 19;
8151
- var EVID = 3;
8152
- function shouldTrack(force) {
8153
- return force || !(0, env_1.isWebWorker)() && (0, env_1.isBackoffice)() && (0, env_1.getWindowIfTop)(function(window2) {
8154
- return !window2[IS_TRACKING];
8155
- });
8156
- }
8157
- function setIsTracking() {
8158
- return (0, env_1.getWindowIfTop)(function(window2) {
8159
- return window2[IS_TRACKING] = true;
8160
- });
8161
- }
8162
- function getLogger(loggerFactory) {
8163
- return loggerFactory({ endpoint: ENDPOINT }).updateDefaults({ src: SOURCE, evid: EVID, vsi: (0, utils_1.guid)() }).logger();
8164
- }
8165
- function trackBrowsingSession(loggerFactory) {
8166
- var logger = getLogger(loggerFactory);
8275
+ exports2.DefaultCommonConfig = exports2.BrandToHostMap = exports2.HeadlessHost = exports2.DefaultBrand = exports2.EventContextMap = exports2.BackofficeDomains = exports2.LoggerVersion = void 0;
8276
+ exports2.LoggerVersion = "2.0.985|C";
8277
+ exports2.BackofficeDomains = [".wix.com", ".editorx.com"];
8278
+ var EventContextMap;
8279
+ (function(EventContextMap2) {
8280
+ EventContextMap2["msid"] = "_msid";
8281
+ EventContextMap2["clientId"] = "_client_id";
8282
+ EventContextMap2["uuid"] = "_uuid";
8283
+ EventContextMap2["visitorId"] = "_visitorId";
8284
+ EventContextMap2["siteMemberId"] = "_siteMemberId";
8285
+ EventContextMap2["brandId"] = "_brandId";
8286
+ EventContextMap2["siteBranchId"] = "_siteBranchId";
8287
+ EventContextMap2["ms"] = "_ms";
8288
+ EventContextMap2["lv"] = "_lv";
8289
+ EventContextMap2["isHeadless"] = "_isHeadless";
8290
+ EventContextMap2["hostingPlatform"] = "_hostingPlatform";
8291
+ })(EventContextMap = exports2.EventContextMap || (exports2.EventContextMap = {}));
8292
+ exports2.DefaultBrand = "wix";
8293
+ exports2.HeadlessHost = "VIEWER_HEADLESS";
8294
+ exports2.BrandToHostMap = {
8295
+ wix: "wix",
8296
+ editorx: "editorx"
8297
+ };
8298
+ exports2.DefaultCommonConfig = {
8299
+ brand: exports2.DefaultBrand
8300
+ };
8301
+ }
8302
+ });
8303
+
8304
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/env.js
8305
+ var require_env2 = __commonJS({
8306
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/env.js"(exports2) {
8307
+ "use strict";
8308
+ Object.defineProperty(exports2, "__esModule", { value: true });
8309
+ exports2.getGlobal = exports2.getWindowIfTop = exports2.isBackoffice = exports2.isWebWorker = exports2.getHost = exports2.setHost = void 0;
8310
+ var constants_1 = require_constants3();
8311
+ var host;
8312
+ var hostByDomain;
8313
+ function setHost(_host) {
8314
+ host = _host;
8315
+ }
8316
+ exports2.setHost = setHost;
8317
+ function getHost(brand) {
8318
+ if (brand === void 0) {
8319
+ brand = constants_1.DefaultBrand;
8320
+ }
8321
+ if (host) {
8322
+ return host;
8323
+ }
8324
+ var hostByDomainOrBrand = "";
8325
+ if (typeof hostByDomain === "undefined") {
8326
+ hostByDomain = getGlobal2(function(window2) {
8327
+ if (!window2.location || !window2.location.hostname) {
8328
+ return null;
8329
+ }
8330
+ var _a = window2.location.hostname.match(/\.(wix|editorx)\.com$/) || [], domain = _a[1];
8331
+ return domain || null;
8332
+ }, null);
8333
+ }
8334
+ hostByDomainOrBrand = hostByDomain || constants_1.BrandToHostMap[brand] || constants_1.BrandToHostMap[constants_1.DefaultBrand];
8335
+ return "frog.".concat(hostByDomainOrBrand, ".com");
8336
+ }
8337
+ exports2.getHost = getHost;
8338
+ function isWebWorker() {
8339
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
8340
+ }
8341
+ exports2.isWebWorker = isWebWorker;
8342
+ function isBackoffice() {
8343
+ return getWindowIfTop(function(_a) {
8344
+ var document2 = _a.document;
8345
+ return constants_1.BackofficeDomains.some(function(domain) {
8346
+ return document2.location.host.indexOf(domain) !== -1;
8347
+ });
8348
+ });
8349
+ }
8350
+ exports2.isBackoffice = isBackoffice;
8351
+ function getWindowIfTop(cb) {
8352
+ if (typeof window !== "undefined" && window) {
8353
+ try {
8354
+ return window.top === window.self ? cb ? cb(window) : window : null;
8355
+ } catch (e) {
8356
+ return null;
8357
+ }
8358
+ }
8359
+ return null;
8360
+ }
8361
+ exports2.getWindowIfTop = getWindowIfTop;
8362
+ function getGlobal2(cb, defaultValue) {
8363
+ if (defaultValue === void 0) {
8364
+ defaultValue = null;
8365
+ }
8366
+ if (typeof self !== "undefined" && self) {
8367
+ return cb(self) || defaultValue;
8368
+ }
8369
+ return defaultValue;
8370
+ }
8371
+ exports2.getGlobal = getGlobal2;
8372
+ }
8373
+ });
8374
+
8375
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/utils.js
8376
+ var require_utils4 = __commonJS({
8377
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/utils.js"(exports2) {
8378
+ "use strict";
8379
+ Object.defineProperty(exports2, "__esModule", { value: true });
8380
+ exports2.guid = exports2.isDataProtocol = exports2.buildBiUrl = exports2.getCookies = void 0;
8381
+ var browser_1 = require_browser3();
8382
+ var env_1 = require_env2();
8383
+ var cacheKillerCounter = 0;
8384
+ function getCookies(params) {
8385
+ return Object.keys(params).reduce(function(res, param) {
8386
+ var _a = typeof params[param] === "string" ? { name: params[param] } : params[param], name = _a.name, _b = _a.transform, transform = _b === void 0 ? function(x) {
8387
+ return x;
8388
+ } : _b;
8389
+ var value = transform((0, browser_1.readCookie)(name));
8390
+ if (value) {
8391
+ res[param] = value;
8392
+ }
8393
+ return res;
8394
+ }, {});
8395
+ }
8396
+ exports2.getCookies = getCookies;
8397
+ function buildBiUrl(_a, params, context) {
8398
+ var _b = _a.host, host = _b === void 0 ? "" : _b, _c = _a.endpoint, endpoint = _c === void 0 ? "" : _c;
8399
+ if (context === void 0) {
8400
+ context = {};
8401
+ }
8402
+ host = typeof host === "function" ? host() : host;
8403
+ host = host || (0, env_1.getHost)();
8404
+ endpoint = context.endpoint || endpoint;
8405
+ if (!context.useBatch) {
8406
+ params._ = "" + (/* @__PURE__ */ new Date()).getTime() + cacheKillerCounter++;
8407
+ }
8408
+ var pairs = context.useBatch ? [] : Object.keys(params).map(function(key) {
8409
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(params[key]));
8410
+ }, []);
8411
+ var url = ["//".concat(host, "/").concat(endpoint)].concat(pairs.length ? pairs.join("&") : []).join("?");
8412
+ if (url.startsWith("//") && isDataProtocol()) {
8413
+ url = "https:" + url;
8414
+ }
8415
+ return url;
8416
+ }
8417
+ exports2.buildBiUrl = buildBiUrl;
8418
+ function isDataProtocol() {
8419
+ return typeof window !== "undefined" && (window === null || window === void 0 ? void 0 : window.location.protocol) === "data:";
8420
+ }
8421
+ exports2.isDataProtocol = isDataProtocol;
8422
+ function guid() {
8423
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
8424
+ var r = Math.random() * 16 | 0;
8425
+ var v = c === "x" ? r : r & 3 | 8;
8426
+ return v.toString(16);
8427
+ });
8428
+ }
8429
+ exports2.guid = guid;
8430
+ }
8431
+ });
8432
+
8433
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/navigator.js
8434
+ var require_navigator = __commonJS({
8435
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/navigator.js"(exports2) {
8436
+ "use strict";
8437
+ Object.defineProperty(exports2, "__esModule", { value: true });
8438
+ exports2.listen = void 0;
8439
+ var env_1 = require_env2();
8440
+ function hook(obj, fnName, cbHook) {
8441
+ if (!obj || !obj[fnName]) {
8442
+ return;
8443
+ }
8444
+ var original = obj[fnName];
8445
+ obj[fnName] = function() {
8446
+ cbHook.apply(null, arguments);
8447
+ return original.apply(obj, arguments);
8448
+ };
8449
+ }
8450
+ function onLoad(cb) {
8451
+ setTimeout(function() {
8452
+ return (0, env_1.getWindowIfTop)(function(window2) {
8453
+ return cb(window2.location.href);
8454
+ });
8455
+ });
8456
+ }
8457
+ function onPushState(cb) {
8458
+ (0, env_1.getWindowIfTop)(function(_a) {
8459
+ var history = _a.history;
8460
+ return ["pushState", "replaceState"].forEach(function(fnName) {
8461
+ hook(history, fnName, function(_, __, url) {
8462
+ return cb(url);
8463
+ });
8464
+ });
8465
+ });
8466
+ }
8467
+ function onPopState(cb) {
8468
+ (0, env_1.getWindowIfTop)(function(window2) {
8469
+ return window2.addEventListener("popstate", function() {
8470
+ return cb(window2.location.href);
8471
+ });
8472
+ });
8473
+ }
8474
+ function listen(cb) {
8475
+ (0, env_1.getWindowIfTop)(function(window2) {
8476
+ var fromUrl = window2.document.referrer;
8477
+ [onLoad, onPushState, onPopState].forEach(function(event) {
8478
+ return event(function(toUrl) {
8479
+ cb(fromUrl, toUrl);
8480
+ fromUrl = toUrl;
8481
+ });
8482
+ });
8483
+ });
8484
+ }
8485
+ exports2.listen = listen;
8486
+ }
8487
+ });
8488
+
8489
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/tracker.js
8490
+ var require_tracker = __commonJS({
8491
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/tracker.js"(exports2) {
8492
+ "use strict";
8493
+ Object.defineProperty(exports2, "__esModule", { value: true });
8494
+ exports2.track = void 0;
8495
+ var utils_1 = require_utils4();
8496
+ var navigator_1 = require_navigator();
8497
+ var env_1 = require_env2();
8498
+ var browser_1 = require_browser3();
8499
+ var IS_TRACKING = "__isTrackingPageViews__";
8500
+ var ENDPOINT = "p";
8501
+ var SOURCE = 19;
8502
+ var EVID = 3;
8503
+ function shouldTrack(force) {
8504
+ return force || !(0, env_1.isWebWorker)() && (0, env_1.isBackoffice)() && (0, env_1.getWindowIfTop)(function(window2) {
8505
+ return !window2[IS_TRACKING];
8506
+ });
8507
+ }
8508
+ function setIsTracking() {
8509
+ return (0, env_1.getWindowIfTop)(function(window2) {
8510
+ return window2[IS_TRACKING] = true;
8511
+ });
8512
+ }
8513
+ function getLogger(loggerFactory) {
8514
+ return loggerFactory({ endpoint: ENDPOINT }).updateDefaults({ src: SOURCE, evid: EVID, vsi: (0, utils_1.guid)() }).logger();
8515
+ }
8516
+ function trackBrowsingSession(loggerFactory) {
8517
+ var logger = getLogger(loggerFactory);
8167
8518
  var firstInSession = 1;
8168
8519
  (0, navigator_1.listen)(function(fromUrl, toUrl) {
8169
8520
  var _a = (0, env_1.getWindowIfTop)(function(window2) {
@@ -8175,23 +8526,659 @@ var require_tracker = __commonJS({
8175
8526
  logger.log({ from: fromUrl, to: toUrl, fis: firstInSession, sr, wr });
8176
8527
  firstInSession = 0;
8177
8528
  });
8178
- }
8179
- function track(loggerFactory, options) {
8180
- if (options === void 0) {
8181
- options = { force: false };
8529
+ }
8530
+ function track(loggerFactory, options) {
8531
+ if (options === void 0) {
8532
+ options = { force: false };
8533
+ }
8534
+ if (shouldTrack(options.force)) {
8535
+ setIsTracking();
8536
+ trackBrowsingSession(loggerFactory);
8537
+ }
8538
+ }
8539
+ exports2.track = track;
8540
+ }
8541
+ });
8542
+
8543
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/errors.js
8544
+ var require_errors2 = __commonJS({
8545
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/errors.js"(exports2) {
8546
+ "use strict";
8547
+ var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ function() {
8548
+ var extendStatics = function(d, b) {
8549
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
8550
+ d2.__proto__ = b2;
8551
+ } || function(d2, b2) {
8552
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
8553
+ };
8554
+ return extendStatics(d, b);
8555
+ };
8556
+ return function(d, b) {
8557
+ if (typeof b !== "function" && b !== null)
8558
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
8559
+ extendStatics(d, b);
8560
+ function __() {
8561
+ this.constructor = d;
8562
+ }
8563
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8564
+ };
8565
+ }();
8566
+ Object.defineProperty(exports2, "__esModule", { value: true });
8567
+ exports2.APINotSupportedError = exports2.AssertionError = void 0;
8568
+ var AssertionError = (
8569
+ /** @class */
8570
+ function(_super) {
8571
+ __extends2(AssertionError2, _super);
8572
+ function AssertionError2(message) {
8573
+ var _this = _super.call(this, message) || this;
8574
+ _this.name = _this.constructor.name;
8575
+ return _this;
8576
+ }
8577
+ return AssertionError2;
8578
+ }(Error)
8579
+ );
8580
+ exports2.AssertionError = AssertionError;
8581
+ var APINotSupportedError = (
8582
+ /** @class */
8583
+ function(_super) {
8584
+ __extends2(APINotSupportedError2, _super);
8585
+ function APINotSupportedError2(message) {
8586
+ var _this = _super.call(this, message) || this;
8587
+ _this.name = _this.constructor.name;
8588
+ return _this;
8589
+ }
8590
+ return APINotSupportedError2;
8591
+ }(Error)
8592
+ );
8593
+ exports2.APINotSupportedError = APINotSupportedError;
8594
+ }
8595
+ });
8596
+
8597
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/assert.js
8598
+ var require_assert3 = __commonJS({
8599
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/assert.js"(exports2) {
8600
+ "use strict";
8601
+ Object.defineProperty(exports2, "__esModule", { value: true });
8602
+ exports2.ok = exports2.object = exports2.defined = void 0;
8603
+ var errors_1 = require_errors2();
8604
+ var defined = function(target, message) {
8605
+ if (target === void 0) {
8606
+ throw new errors_1.AssertionError(message);
8607
+ }
8608
+ };
8609
+ exports2.defined = defined;
8610
+ var object = function(target, message) {
8611
+ if (target !== void 0 && (typeof target !== "object" || Array.isArray(target) || target === null)) {
8612
+ throw new errors_1.AssertionError(message);
8613
+ }
8614
+ };
8615
+ exports2.object = object;
8616
+ var ok = function(target, message) {
8617
+ if (!target) {
8618
+ throw new errors_1.AssertionError(message);
8619
+ }
8620
+ };
8621
+ exports2.ok = ok;
8622
+ }
8623
+ });
8624
+
8625
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/types.js
8626
+ var require_types3 = __commonJS({
8627
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/types.js"(exports2) {
8628
+ "use strict";
8629
+ Object.defineProperty(exports2, "__esModule", { value: true });
8630
+ exports2.Errors = exports2.EventCategories = exports2.PublishMethods = void 0;
8631
+ var PublishMethods;
8632
+ (function(PublishMethods2) {
8633
+ PublishMethods2["Auto"] = "auto";
8634
+ PublishMethods2["PostMessage"] = "postMessage";
8635
+ PublishMethods2["Fetch"] = "fetch";
8636
+ })(PublishMethods = exports2.PublishMethods || (exports2.PublishMethods = {}));
8637
+ var EventCategories;
8638
+ (function(EventCategories2) {
8639
+ EventCategories2["Essential"] = "essential";
8640
+ EventCategories2["Functional"] = "functional";
8641
+ EventCategories2["Analytics"] = "analytics";
8642
+ })(EventCategories = exports2.EventCategories || (exports2.EventCategories = {}));
8643
+ var Errors;
8644
+ (function(Errors2) {
8645
+ Errors2[Errors2["Unsupported"] = 0] = "Unsupported";
8646
+ })(Errors = exports2.Errors || (exports2.Errors = {}));
8647
+ }
8648
+ });
8649
+
8650
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/transport.js
8651
+ var require_transport2 = __commonJS({
8652
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/transport.js"(exports2) {
8653
+ "use strict";
8654
+ Object.defineProperty(exports2, "__esModule", { value: true });
8655
+ exports2.postMessageTransport = exports2.xhrTransport = exports2.fetchTransport = exports2.pixelTransport = exports2.beaconTransport = void 0;
8656
+ var browser_1 = require_browser3();
8657
+ var errors_1 = require_errors2();
8658
+ function beaconTransport(url, params, sendInBody) {
8659
+ if (sendInBody === void 0) {
8660
+ sendInBody = false;
8661
+ }
8662
+ return new Promise(function(resolve, reject) {
8663
+ return (0, browser_1.sendBeacon)(url, sendInBody ? JSON.stringify(params) : void 0) ? resolve() : reject(new Error("Transport Error: Cannot send bi using beacon"));
8664
+ });
8665
+ }
8666
+ exports2.beaconTransport = beaconTransport;
8667
+ function pixelTransport(url, image) {
8668
+ return new Promise(function(resolve, reject) {
8669
+ var biImage = image || new window.Image(0, 0);
8670
+ biImage.onload = function() {
8671
+ return resolve();
8672
+ };
8673
+ biImage.onerror = function() {
8674
+ return reject(new Error("Transport Error: Cannot send bi using pixel"));
8675
+ };
8676
+ biImage.src = url;
8677
+ });
8678
+ }
8679
+ exports2.pixelTransport = pixelTransport;
8680
+ function fetchTransport(url, params, method, fetchFunction) {
8681
+ if (method === void 0) {
8682
+ method = "GET";
8683
+ }
8684
+ if (typeof fetchFunction === "undefined") {
8685
+ if (typeof fetch === "undefined") {
8686
+ return Promise.reject(new errors_1.APINotSupportedError("fetch"));
8687
+ }
8688
+ fetchFunction = fetch;
8689
+ }
8690
+ var options = {
8691
+ method,
8692
+ credentials: "include"
8693
+ };
8694
+ if (method === "POST") {
8695
+ options.body = JSON.stringify(params);
8696
+ } else {
8697
+ options.keepalive = true;
8698
+ }
8699
+ return fetchFunction(url, options).then(function(response) {
8700
+ if (!response.ok) {
8701
+ throw Error("Transport Error: Cannot send bi using fetch. Status: ".concat(response.status));
8702
+ }
8703
+ });
8704
+ }
8705
+ exports2.fetchTransport = fetchTransport;
8706
+ function xhrTransport(url, params, method) {
8707
+ if (method === void 0) {
8708
+ method = "GET";
8709
+ }
8710
+ return new Promise(function(resolve, reject) {
8711
+ var xhr = new XMLHttpRequest();
8712
+ xhr.open(method, "".concat(location.protocol).concat(url));
8713
+ xhr.onload = resolve;
8714
+ xhr.onerror = function() {
8715
+ reject(new Error("Transport Error: Cannot send bi using xhr."));
8716
+ };
8717
+ xhr.withCredentials = true;
8718
+ if (method === "POST") {
8719
+ xhr.send(JSON.stringify(params));
8720
+ } else {
8721
+ xhr.send();
8722
+ }
8723
+ });
8724
+ }
8725
+ exports2.xhrTransport = xhrTransport;
8726
+ function postMessageTransport(message, postMessage) {
8727
+ if (postMessage === void 0) {
8728
+ postMessage = self.postMessage;
8729
+ }
8730
+ var messageArgs = [message];
8731
+ if (typeof WorkerGlobalScope === "undefined") {
8732
+ messageArgs.push("*");
8733
+ }
8734
+ return postMessage.apply(self, messageArgs);
8735
+ }
8736
+ exports2.postMessageTransport = postMessageTransport;
8737
+ }
8738
+ });
8739
+
8740
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/publishers.js
8741
+ var require_publishers2 = __commonJS({
8742
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/publishers.js"(exports2) {
8743
+ "use strict";
8744
+ var __assign4 = exports2 && exports2.__assign || function() {
8745
+ __assign4 = Object.assign || function(t) {
8746
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8747
+ s = arguments[i];
8748
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8749
+ t[p] = s[p];
8750
+ }
8751
+ return t;
8752
+ };
8753
+ return __assign4.apply(this, arguments);
8754
+ };
8755
+ var __rest = exports2 && exports2.__rest || function(s, e) {
8756
+ var t = {};
8757
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
8758
+ t[p] = s[p];
8759
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
8760
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8761
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8762
+ t[p[i]] = s[p[i]];
8763
+ }
8764
+ return t;
8765
+ };
8766
+ Object.defineProperty(exports2, "__esModule", { value: true });
8767
+ exports2.getTransformers = exports2.getPublisher = exports2.postMessagePublisher = exports2.xhrPublisher = exports2.fetchPublisher = exports2.beaconPublisher = exports2.imagePublisher = exports2.resolvePublisher = void 0;
8768
+ var utils_1 = require_utils4();
8769
+ var env_1 = require_env2();
8770
+ var errors_1 = require_errors2();
8771
+ var types_1 = require_types3();
8772
+ var transport_1 = require_transport2();
8773
+ var getHttpMethod = function(context) {
8774
+ return context.useBatch ? "POST" : "GET";
8775
+ };
8776
+ var resolvePublisher = function(options, publishFunctions) {
8777
+ var publisherFactory;
8778
+ var publishFunction;
8779
+ if (options.publishMethod === types_1.PublishMethods.PostMessage) {
8780
+ publisherFactory = postMessagePublisher;
8781
+ publishFunction = publishFunctions && publishFunctions[types_1.PublishMethods.PostMessage];
8782
+ } else if (options.publishMethod === types_1.PublishMethods.Fetch) {
8783
+ publisherFactory = fetchPublisher;
8784
+ publishFunction = publishFunctions && publishFunctions[types_1.PublishMethods.Fetch];
8785
+ } else if ((0, env_1.isWebWorker)()) {
8786
+ publisherFactory = fetchPublisher;
8787
+ } else {
8788
+ publisherFactory = beaconPublisher;
8789
+ }
8790
+ return publisherFactory(options, publishFunction);
8791
+ };
8792
+ exports2.resolvePublisher = resolvePublisher;
8793
+ function imagePublisher(options) {
8794
+ if (options === void 0) {
8795
+ options = {};
8796
+ }
8797
+ return function image(params, context) {
8798
+ if (context === void 0) {
8799
+ context = {};
8800
+ }
8801
+ if (context.useBatch) {
8802
+ throw new errors_1.APINotSupportedError("Can't use image publisher to send batched events.");
8803
+ }
8804
+ var url = (0, utils_1.buildBiUrl)(options, params, context);
8805
+ return (0, transport_1.pixelTransport)(url, context.image);
8806
+ };
8807
+ }
8808
+ exports2.imagePublisher = imagePublisher;
8809
+ function beaconPublisher(options) {
8810
+ if (options === void 0) {
8811
+ options = {};
8812
+ }
8813
+ return function beacon(params, context) {
8814
+ if (context === void 0) {
8815
+ context = {};
8816
+ }
8817
+ var url = (0, utils_1.buildBiUrl)(options, params, context);
8818
+ return (0, transport_1.beaconTransport)(url, params, !!context.useBatch).catch(function() {
8819
+ var method = getHttpMethod(context);
8820
+ return context.useBatch ? (0, transport_1.fetchTransport)(url, params, method).catch(function(error) {
8821
+ return error instanceof errors_1.APINotSupportedError ? (0, transport_1.xhrTransport)(url, params, method) : Promise.reject(error);
8822
+ }) : (0, transport_1.pixelTransport)(url, context.image);
8823
+ });
8824
+ };
8825
+ }
8826
+ exports2.beaconPublisher = beaconPublisher;
8827
+ function fetchPublisher(options, fetchFunction) {
8828
+ if (options === void 0) {
8829
+ options = {};
8830
+ }
8831
+ return function fetch2(params, context) {
8832
+ if (context === void 0) {
8833
+ context = {};
8834
+ }
8835
+ var url = (0, utils_1.buildBiUrl)(options, params, context);
8836
+ var method = getHttpMethod(context);
8837
+ return (0, transport_1.fetchTransport)(url, params, method, fetchFunction).catch(function(error) {
8838
+ return error instanceof errors_1.APINotSupportedError ? (0, transport_1.xhrTransport)(url, params, method) : Promise.reject(error);
8839
+ });
8840
+ };
8841
+ }
8842
+ exports2.fetchPublisher = fetchPublisher;
8843
+ function xhrPublisher(options) {
8844
+ if (options === void 0) {
8845
+ options = {};
8846
+ }
8847
+ return function xhr(params, context) {
8848
+ if (context === void 0) {
8849
+ context = {};
8850
+ }
8851
+ var url = (0, utils_1.buildBiUrl)(options, params, context);
8852
+ var method = getHttpMethod(context);
8853
+ return (0, transport_1.xhrTransport)(url, params, method);
8854
+ };
8855
+ }
8856
+ exports2.xhrPublisher = xhrPublisher;
8857
+ function postMessagePublisher(options, publishFunction) {
8858
+ if (options === void 0) {
8859
+ options = {};
8860
+ }
8861
+ return function postMessage(params) {
8862
+ return (0, transport_1.postMessageTransport)(params, publishFunction);
8863
+ };
8864
+ }
8865
+ exports2.postMessagePublisher = postMessagePublisher;
8866
+ function getPublisher(options, publishFunctions) {
8867
+ return (0, exports2.resolvePublisher)(options, publishFunctions);
8868
+ }
8869
+ exports2.getPublisher = getPublisher;
8870
+ var getTransformers = function(factoryOptions, transformer) {
8871
+ var _eventTransformer, _payloadTransformer;
8872
+ if (transformer) {
8873
+ if (typeof transformer !== "function" && transformer.postMessage && factoryOptions.publishMethod === types_1.PublishMethods.PostMessage) {
8874
+ _payloadTransformer = transformer.postMessage;
8875
+ } else if (typeof transformer === "function") {
8876
+ _eventTransformer = transformer;
8877
+ }
8878
+ }
8879
+ var eventTransformer = _eventTransformer;
8880
+ var payloadTransformer = function(params, publisherContext) {
8881
+ if (publisherContext.useBatch) {
8882
+ var getEndpoint_1 = function(context) {
8883
+ return (context === null || context === void 0 ? void 0 : context.endpoint) || publisherContext.endpoint || factoryOptions.endpoint;
8884
+ };
8885
+ params.e = params.e.map(function(e) {
8886
+ var context = e.context, event = __rest(e, ["context"]);
8887
+ var res = __assign4(__assign4({}, event), { f: __assign4(__assign4({}, event.f), { _rp: getEndpoint_1(context) }) });
8888
+ return res;
8889
+ });
8890
+ }
8891
+ return _payloadTransformer ? _payloadTransformer(params) : params;
8892
+ };
8893
+ return { eventTransformer, payloadTransformer };
8894
+ };
8895
+ exports2.getTransformers = getTransformers;
8896
+ }
8897
+ });
8898
+
8899
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/common-config.js
8900
+ var require_common_config2 = __commonJS({
8901
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/common-config.js"(exports2) {
8902
+ "use strict";
8903
+ Object.defineProperty(exports2, "__esModule", { value: true });
8904
+ exports2.getWixHost = exports2.getBranchId = exports2.getBrand = exports2.getCommonConfigValue = void 0;
8905
+ var env_1 = require_env2();
8906
+ var constants_1 = require_constants3();
8907
+ var resolveCommonConfig = function() {
8908
+ return (0, env_1.getGlobal)(function(g) {
8909
+ return g.Wix && g.Wix.Utils && g.Wix.Utils.commonConfig || g.commonConfig;
8910
+ });
8911
+ };
8912
+ var getCommonConfigValue = function(key, commonConfig2) {
8913
+ if (commonConfig2 === void 0) {
8914
+ commonConfig2 = resolveCommonConfig();
8915
+ }
8916
+ commonConfig2 = commonConfig2 && typeof commonConfig2.getAll === "function" ? commonConfig2.getAll() : commonConfig2;
8917
+ if (!commonConfig2 || typeof commonConfig2[key] === "undefined") {
8918
+ return constants_1.DefaultCommonConfig[key];
8919
+ }
8920
+ return commonConfig2[key];
8921
+ };
8922
+ exports2.getCommonConfigValue = getCommonConfigValue;
8923
+ var getBrand = function(commonConfigGetter) {
8924
+ return (0, exports2.getCommonConfigValue)("brand", commonConfigGetter());
8925
+ };
8926
+ exports2.getBrand = getBrand;
8927
+ var getBranchId = function(commonConfigGetter) {
8928
+ return (0, exports2.getCommonConfigValue)("branchId", commonConfigGetter());
8929
+ };
8930
+ exports2.getBranchId = getBranchId;
8931
+ var getWixHost = function(commonConfigGetter) {
8932
+ return (0, exports2.getCommonConfigValue)("host", commonConfigGetter());
8933
+ };
8934
+ exports2.getWixHost = getWixHost;
8935
+ }
8936
+ });
8937
+
8938
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/event-defaults.js
8939
+ var require_event_defaults2 = __commonJS({
8940
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/lib/event-defaults.js"(exports2) {
8941
+ "use strict";
8942
+ Object.defineProperty(exports2, "__esModule", { value: true });
8943
+ exports2.getCommonDefaults = exports2.getUserDefaults = exports2.transformDefaults = void 0;
8944
+ var constants_1 = require_constants3();
8945
+ var browser_1 = require_browser3();
8946
+ var common_config_1 = require_common_config2();
8947
+ var utils_1 = require_utils4();
8948
+ var transformDefaults = function(context) {
8949
+ return Object.keys(context).reduce(function(res, key) {
8950
+ var mappedKey = constants_1.EventContextMap[key] || key;
8951
+ res[mappedKey] = context[key];
8952
+ return res;
8953
+ }, {});
8954
+ };
8955
+ exports2.transformDefaults = transformDefaults;
8956
+ var getUserDefaults = function() {
8957
+ return (0, utils_1.getCookies)({
8958
+ clientId: "_wixCIDX",
8959
+ uuid: {
8960
+ name: "_wixUIDX",
8961
+ transform: function(value) {
8962
+ return typeof value === "string" && value.split("|")[1];
8963
+ }
8964
+ }
8965
+ });
8966
+ };
8967
+ exports2.getUserDefaults = getUserDefaults;
8968
+ var getCommonDefaults = function(commonConfigGetter, consentPolicyGetter) {
8969
+ return (0, exports2.transformDefaults)({
8970
+ brandId: function() {
8971
+ return (0, common_config_1.getBrand)(commonConfigGetter);
8972
+ },
8973
+ siteBranchId: function() {
8974
+ return (0, common_config_1.getBranchId)(commonConfigGetter);
8975
+ },
8976
+ ms: function() {
8977
+ return Math.round((0, browser_1.now)());
8978
+ },
8979
+ isHeadless: function() {
8980
+ return resolveIsHeadless(commonConfigGetter);
8981
+ },
8982
+ hostingPlatform: function() {
8983
+ return (0, common_config_1.getWixHost)(commonConfigGetter);
8984
+ },
8985
+ lv: constants_1.LoggerVersion
8986
+ });
8987
+ };
8988
+ exports2.getCommonDefaults = getCommonDefaults;
8989
+ var resolveIsHeadless = function(commonConfigGetter) {
8990
+ return (0, common_config_1.getWixHost)(commonConfigGetter) === constants_1.HeadlessHost || void 0;
8991
+ };
8992
+ }
8993
+ });
8994
+
8995
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/logger.js
8996
+ var require_logger2 = __commonJS({
8997
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/logger.js"(exports2) {
8998
+ "use strict";
8999
+ var __assign4 = exports2 && exports2.__assign || function() {
9000
+ __assign4 = Object.assign || function(t) {
9001
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9002
+ s = arguments[i];
9003
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
9004
+ t[p] = s[p];
9005
+ }
9006
+ return t;
9007
+ };
9008
+ return __assign4.apply(this, arguments);
9009
+ };
9010
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
9011
+ if (k2 === void 0) k2 = k;
9012
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9013
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9014
+ desc = { enumerable: true, get: function() {
9015
+ return m[k];
9016
+ } };
8182
9017
  }
8183
- if (shouldTrack(options.force)) {
8184
- setIsTracking();
8185
- trackBrowsingSession(loggerFactory);
9018
+ Object.defineProperty(o, k2, desc);
9019
+ } : function(o, m, k, k2) {
9020
+ if (k2 === void 0) k2 = k;
9021
+ o[k2] = m[k];
9022
+ });
9023
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
9024
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
9025
+ } : function(o, v) {
9026
+ o["default"] = v;
9027
+ });
9028
+ var __importStar = exports2 && exports2.__importStar || function(mod) {
9029
+ if (mod && mod.__esModule) return mod;
9030
+ var result = {};
9031
+ if (mod != null) {
9032
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8186
9033
  }
8187
- }
8188
- exports2.track = track;
9034
+ __setModuleDefault(result, mod);
9035
+ return result;
9036
+ };
9037
+ Object.defineProperty(exports2, "__esModule", { value: true });
9038
+ exports2.BiLoggerClientFactory = exports2.createBatchQueue = exports2.manager = exports2.factory = exports2.Factory = exports2.setHost = exports2.EventCategories = exports2.PublishMethods = void 0;
9039
+ var wix_bi_logger_client_1 = require_dist4();
9040
+ var consent_policy_client_accessor_1 = (init_src(), __toCommonJS(src_exports));
9041
+ var assert = __importStar(require_assert3());
9042
+ var publishers_1 = require_publishers2();
9043
+ var common_config_1 = require_common_config2();
9044
+ var env_1 = require_env2();
9045
+ var types_1 = require_types3();
9046
+ var event_defaults_1 = require_event_defaults2();
9047
+ var types_2 = require_types3();
9048
+ Object.defineProperty(exports2, "PublishMethods", { enumerable: true, get: function() {
9049
+ return types_2.PublishMethods;
9050
+ } });
9051
+ Object.defineProperty(exports2, "EventCategories", { enumerable: true, get: function() {
9052
+ return types_2.EventCategories;
9053
+ } });
9054
+ var env_2 = require_env2();
9055
+ Object.defineProperty(exports2, "setHost", { enumerable: true, get: function() {
9056
+ return env_2.setHost;
9057
+ } });
9058
+ var Factory = (
9059
+ /** @class */
9060
+ function() {
9061
+ function Factory2(options) {
9062
+ if (options === void 0) {
9063
+ options = {};
9064
+ }
9065
+ this.options = options;
9066
+ this.commonConfigGetter = function() {
9067
+ return void 0;
9068
+ };
9069
+ this.initialized = false;
9070
+ assert.ok(!options.publishMethod || Object.keys(types_1.PublishMethods).map(function(key) {
9071
+ return types_1.PublishMethods[key];
9072
+ }).indexOf(options.publishMethod) !== -1, 'Unsupported publish method "'.concat(options.publishMethod, '"'));
9073
+ Factory2.consentPolicyAccessor = Factory2.consentPolicyAccessor || new consent_policy_client_accessor_1.ConsentPolicyAccessor();
9074
+ this.loggerClientFactory = (0, wix_bi_logger_client_1.factory)();
9075
+ }
9076
+ Factory2.prototype.initFactory = function() {
9077
+ var _this = this;
9078
+ if (this.initialized) {
9079
+ return this.loggerClientFactory;
9080
+ }
9081
+ this.initialized = true;
9082
+ this.updateDefaults((0, event_defaults_1.getCommonDefaults)(this.commonConfigGetter, Factory2.consentPolicyAccessor));
9083
+ this.withUserContext((0, event_defaults_1.getUserDefaults)());
9084
+ var options = __assign4(__assign4({}, this.options), { host: this.options.host || function() {
9085
+ return (0, env_1.getHost)((0, common_config_1.getBrand)(_this.commonConfigGetter));
9086
+ } });
9087
+ var publisher = (0, publishers_1.getPublisher)(options, this.publishFunctions);
9088
+ var _a = (0, publishers_1.getTransformers)(options, this.transformer), eventTransformer = _a.eventTransformer, payloadTransformer = _a.payloadTransformer;
9089
+ var baseFactory = this.loggerClientFactory.addPublisher(publisher).withConsentPolicyGetter(function() {
9090
+ return Factory2.consentPolicyAccessor.getCurrentConsentPolicy();
9091
+ });
9092
+ if (eventTransformer) {
9093
+ baseFactory.withEventTransformer(eventTransformer);
9094
+ }
9095
+ if (payloadTransformer) {
9096
+ baseFactory.withPayloadTransformer(payloadTransformer);
9097
+ }
9098
+ return baseFactory;
9099
+ };
9100
+ Factory2.prototype.withTransformer = function(transformer) {
9101
+ assert.defined(transformer, "Transformer must be provided");
9102
+ assert.ok(typeof transformer === "function" || transformer && typeof transformer[types_1.PublishMethods.PostMessage] === "function", "Valid transformer must be provided");
9103
+ this.transformer = transformer;
9104
+ return this;
9105
+ };
9106
+ Factory2.prototype.withPublishFunction = function(publishFunctions) {
9107
+ assert.defined(publishFunctions, "Publish functions object must be provided");
9108
+ assert.ok(this.options.publishMethod && this.options.publishMethod !== types_1.PublishMethods.Auto, "Publish function can be used only when using a custom publish method");
9109
+ assert.ok(publishFunctions && typeof publishFunctions[this.options.publishMethod] === "function", "Valid publish function must be provided");
9110
+ this.publishFunctions = publishFunctions;
9111
+ return this;
9112
+ };
9113
+ Factory2.prototype.withUserContext = function(context) {
9114
+ assert.defined(context, "User context object must be provided");
9115
+ this.updateDefaults((0, event_defaults_1.transformDefaults)(context));
9116
+ return this;
9117
+ };
9118
+ Factory2.prototype.withUoUContext = function(context) {
9119
+ assert.defined(context, "UoU context object must be provided");
9120
+ this.updateDefaults((0, event_defaults_1.transformDefaults)(context));
9121
+ return this;
9122
+ };
9123
+ Factory2.prototype.withNonEssentialContext = function(context) {
9124
+ assert.defined(context, "Non-essential context object must be provided");
9125
+ this.loggerClientFactory.updateNonEssentialDefaults((0, event_defaults_1.transformDefaults)(context));
9126
+ return this;
9127
+ };
9128
+ Factory2.prototype.withCommonConfigGetter = function(commonConfigGetter) {
9129
+ assert.defined(commonConfigGetter, "Common config getter must be provided");
9130
+ assert.ok(typeof commonConfigGetter === "function", "Common config getter must be a function");
9131
+ this.commonConfigGetter = commonConfigGetter;
9132
+ return this;
9133
+ };
9134
+ Factory2.prototype.updateDefaults = function(params) {
9135
+ this.loggerClientFactory.updateDefaults(params);
9136
+ return this;
9137
+ };
9138
+ Factory2.prototype.setMuted = function(isMuted) {
9139
+ this.loggerClientFactory.setMuted(isMuted);
9140
+ return this;
9141
+ };
9142
+ Factory2.prototype.setEvents = function(events) {
9143
+ this.loggerClientFactory.setEvents(events);
9144
+ return this;
9145
+ };
9146
+ Factory2.prototype.setGlobalBatchQueue = function(batchQueue) {
9147
+ this.loggerClientFactory.setGlobalBatchQueue(batchQueue);
9148
+ return this;
9149
+ };
9150
+ Factory2.prototype.onError = function(handler) {
9151
+ this.loggerClientFactory.setPublisherFailHandler(handler);
9152
+ return this;
9153
+ };
9154
+ Factory2.prototype.logger = function(options) {
9155
+ if (options === void 0) {
9156
+ options = {};
9157
+ }
9158
+ var _a = this.options, endpoint = _a.endpoint, useBatch = _a.useBatch;
9159
+ var logger = this.initFactory().logger(__assign4({ endpoint, useBatch }, options));
9160
+ return logger;
9161
+ };
9162
+ return Factory2;
9163
+ }()
9164
+ );
9165
+ exports2.Factory = Factory;
9166
+ var factory2 = function(options) {
9167
+ if (options === void 0) {
9168
+ options = {};
9169
+ }
9170
+ return new Factory(options);
9171
+ };
9172
+ exports2.factory = factory2;
9173
+ exports2.manager = wix_bi_logger_client_1.manager;
9174
+ exports2.createBatchQueue = wix_bi_logger_client_1.createBatchQueue;
9175
+ exports2.BiLoggerClientFactory = wix_bi_logger_client_1.BiLoggerFactory;
8189
9176
  }
8190
9177
  });
8191
9178
 
8192
- // ../../node_modules/@wix/web-bi-logger/dist/src/tracking-logger.js
9179
+ // ../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/tracking-logger.js
8193
9180
  var require_tracking_logger = __commonJS({
8194
- "../../node_modules/@wix/web-bi-logger/dist/src/tracking-logger.js"(exports2) {
9181
+ "../../node_modules/@wix/fe-essentials/node_modules/@wix/web-bi-logger/dist/src/tracking-logger.js"(exports2) {
8195
9182
  "use strict";
8196
9183
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
8197
9184
  if (k2 === void 0) k2 = k;
@@ -8224,7 +9211,7 @@ var require_tracking_logger = __commonJS({
8224
9211
  exports2.BiLoggerClientFactory = exports2.EventCategories = exports2.createBatchQueue = exports2.manager = exports2.setHost = exports2.factory = void 0;
8225
9212
  var wix_bi_logger_client_1 = require_dist4();
8226
9213
  var tracker = __importStar(require_tracker());
8227
- var logger = __importStar(require_logger());
9214
+ var logger = __importStar(require_logger2());
8228
9215
  var factory2 = function(options) {
8229
9216
  if (options === void 0) {
8230
9217
  options = {};
@@ -9351,7 +10338,7 @@ function reportErrorResolutionBi(errorHandler, params) {
9351
10338
  }));
9352
10339
  }
9353
10340
 
9354
- // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm-node/stringify.js
10341
+ // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm/stringify.js
9355
10342
  var byteToHex = [];
9356
10343
  for (let i = 0; i < 256; ++i) {
9357
10344
  byteToHex.push((i + 256).toString(16).slice(1));
@@ -9360,35 +10347,39 @@ function unsafeStringify(arr2, offset = 0) {
9360
10347
  return (byteToHex[arr2[offset + 0]] + byteToHex[arr2[offset + 1]] + byteToHex[arr2[offset + 2]] + byteToHex[arr2[offset + 3]] + "-" + byteToHex[arr2[offset + 4]] + byteToHex[arr2[offset + 5]] + "-" + byteToHex[arr2[offset + 6]] + byteToHex[arr2[offset + 7]] + "-" + byteToHex[arr2[offset + 8]] + byteToHex[arr2[offset + 9]] + "-" + byteToHex[arr2[offset + 10]] + byteToHex[arr2[offset + 11]] + byteToHex[arr2[offset + 12]] + byteToHex[arr2[offset + 13]] + byteToHex[arr2[offset + 14]] + byteToHex[arr2[offset + 15]]).toLowerCase();
9361
10348
  }
9362
10349
 
9363
- // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm-node/rng.js
9364
- var import_node_crypto = __toESM(require("crypto"));
10350
+ // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm/rng.js
10351
+ var import_crypto = require("crypto");
9365
10352
  var rnds8Pool = new Uint8Array(256);
9366
10353
  var poolPtr = rnds8Pool.length;
9367
10354
  function rng() {
9368
10355
  if (poolPtr > rnds8Pool.length - 16) {
9369
- import_node_crypto.default.randomFillSync(rnds8Pool);
10356
+ (0, import_crypto.randomFillSync)(rnds8Pool);
9370
10357
  poolPtr = 0;
9371
10358
  }
9372
10359
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
9373
10360
  }
9374
10361
 
9375
- // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm-node/native.js
9376
- var import_node_crypto2 = __toESM(require("crypto"));
9377
- var native_default = {
9378
- randomUUID: import_node_crypto2.default.randomUUID
9379
- };
10362
+ // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm/native.js
10363
+ var import_crypto2 = require("crypto");
10364
+ var native_default = { randomUUID: import_crypto2.randomUUID };
9380
10365
 
9381
- // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm-node/v4.js
10366
+ // ../../node_modules/@wix/error-handler/node_modules/uuid/dist/esm/v4.js
9382
10367
  function v4(options, buf, offset) {
9383
10368
  if (native_default.randomUUID && !buf && !options) {
9384
10369
  return native_default.randomUUID();
9385
10370
  }
9386
10371
  options = options || {};
9387
- const rnds = options.random || (options.rng || rng)();
10372
+ const rnds = options.random ?? options.rng?.() ?? rng();
10373
+ if (rnds.length < 16) {
10374
+ throw new Error("Random bytes length must be >= 16");
10375
+ }
9388
10376
  rnds[6] = rnds[6] & 15 | 64;
9389
10377
  rnds[8] = rnds[8] & 63 | 128;
9390
10378
  if (buf) {
9391
10379
  offset = offset || 0;
10380
+ if (offset < 0 || offset + 16 > buf.length) {
10381
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
10382
+ }
9392
10383
  for (let i = 0; i < 16; ++i) {
9393
10384
  buf[offset + i] = rnds[i];
9394
10385
  }
@@ -9855,11 +10846,11 @@ var ErrorHandler = class {
9855
10846
  };
9856
10847
 
9857
10848
  // ../../node_modules/@wix/wix-experiments/dist/es/src/experiments.js
9858
- var import_tslib3 = require("tslib");
10849
+ var import_tslib4 = require("tslib");
9859
10850
 
9860
10851
  // ../../node_modules/@wix/wix-experiments/dist/es/src/base-url.js
9861
10852
  function baseUrl(isNewApi, maybeBaseUrl) {
9862
- var maybeTestkitUrl = process.env.NODE_ENV === "test" && isNewApi && "http://localhost:5700";
10853
+ var maybeTestkitUrl = process.env.NODE_ENV === "test" && isNewApi && process.env.EXPERIMENTS_TESTKIT_URL;
9863
10854
  return maybeBaseUrl || maybeTestkitUrl || "";
9864
10855
  }
9865
10856
 
@@ -9924,19 +10915,19 @@ var isNonEmptyString = function(value) {
9924
10915
  };
9925
10916
  var buildForSiteOwnerQuery = function(forSiteOwner) {
9926
10917
  if (isNonEmptyString(forSiteOwner.loggedInUserId) && isNonEmptyString(forSiteOwner.siteOwnerId)) {
9927
- return "&" + ("requestContext.forSiteOwner.loggedInUserId=" + forSiteOwner.loggedInUserId + "&") + ("requestContext.forSiteOwner.siteOwnerId=" + forSiteOwner.siteOwnerId);
10918
+ return "&" + "requestContext.forSiteOwner.loggedInUserId=".concat(forSiteOwner.loggedInUserId, "&") + "requestContext.forSiteOwner.siteOwnerId=".concat(forSiteOwner.siteOwnerId);
9928
10919
  }
9929
10920
  return "";
9930
10921
  };
9931
10922
  var buildForSiteVisitorsQuery = function(forSiteVisitors) {
9932
10923
  if (isNonEmptyString(forSiteVisitors.visitorId) && isNonEmptyString(forSiteVisitors.siteOwnerId)) {
9933
- return "&" + ("requestContext.forSiteVisitors.visitorId=" + forSiteVisitors.visitorId + "&") + ("requestContext.forSiteVisitors.siteOwnerId=" + forSiteVisitors.siteOwnerId);
10924
+ return "&" + "requestContext.forSiteVisitors.visitorId=".concat(forSiteVisitors.visitorId, "&") + "requestContext.forSiteVisitors.siteOwnerId=".concat(forSiteVisitors.siteOwnerId);
9934
10925
  }
9935
10926
  return "";
9936
10927
  };
9937
10928
  var buildOverrideCriteriaQuery = function(overrideCriteria) {
9938
10929
  if (isNonEmptyString(overrideCriteria.entityId)) {
9939
- return "&requestContext.overrideCriteria.entityId=" + overrideCriteria.entityId;
10930
+ return "&requestContext.overrideCriteria.entityId=".concat(overrideCriteria.entityId);
9940
10931
  }
9941
10932
  return "";
9942
10933
  };
@@ -9996,7 +10987,7 @@ var getAllInScopePath = function(scope, useNewApi) {
9996
10987
  if (useNewApi === void 0) {
9997
10988
  useNewApi = false;
9998
10989
  }
9999
- var urlApi = useNewApi ? petriUrlMap.new.conductAllInScope + "?scope=" + encodeURIComponent(scope) : petriUrlMap.old.conductAllInScope + "?scope=" + encodeURIComponent(scope);
10990
+ var urlApi = useNewApi ? "".concat(petriUrlMap.new.conductAllInScope, "?scope=").concat(encodeURIComponent(scope)) : "".concat(petriUrlMap.old.conductAllInScope, "?scope=").concat(encodeURIComponent(scope));
10000
10991
  return urlApi;
10001
10992
  };
10002
10993
  function isValidScopeUrl(url, useNewApi) {
@@ -10012,11 +11003,11 @@ var getExperimentPath = function(key, fallback, useNewApi) {
10012
11003
  if (useNewApi === void 0) {
10013
11004
  useNewApi = false;
10014
11005
  }
10015
- var urlApi = useNewApi ? petriUrlMap.new.conductExperiment + "?key=" + encodeURIComponent(key) + "&fallbackValue=" + encodeURIComponent(fallback) : petriUrlMap.old.conductExperiment + "?key=" + encodeURIComponent(key) + "&fallback=" + encodeURIComponent(fallback);
11006
+ var urlApi = useNewApi ? "".concat(petriUrlMap.new.conductExperiment, "?key=").concat(encodeURIComponent(key), "&fallbackValue=").concat(encodeURIComponent(fallback)) : "".concat(petriUrlMap.old.conductExperiment, "?key=").concat(encodeURIComponent(key), "&fallback=").concat(encodeURIComponent(fallback));
10016
11007
  return urlApi;
10017
11008
  };
10018
11009
  function isUrlOfExperiment(url, specName, useNewApi) {
10019
- var pattern = "" + getExperimentPath(specName, "", useNewApi);
11010
+ var pattern = "".concat(getExperimentPath(specName, "", useNewApi));
10020
11011
  return url.includes(pattern);
10021
11012
  }
10022
11013
 
@@ -10116,21 +11107,29 @@ function getCacheInstance() {
10116
11107
  }
10117
11108
 
10118
11109
  // ../../node_modules/@wix/wix-experiments/dist/es/src/http-request.js
10119
- function httpRequest(url) {
11110
+ var import_tslib3 = require("tslib");
11111
+ init_esm();
11112
+ function httpRequest(url, signedInstance) {
10120
11113
  return new Promise(function(resolve, reject) {
11114
+ var headers = createHeaders({ signedInstance: signedInstance || "" });
10121
11115
  var xhr = new XMLHttpRequest();
10122
11116
  xhr.open("GET", url, true);
11117
+ Object.keys(headers).forEach(function(key) {
11118
+ return xhr.setRequestHeader(key, headers[key]);
11119
+ });
10123
11120
  xhr.responseType = "text";
10124
11121
  xhr.withCredentials = true;
10125
11122
  xhr.onload = function() {
10126
11123
  if (xhr.status >= 200 && xhr.status < 400) {
10127
11124
  resolve(xhr.responseText);
10128
11125
  } else {
10129
- reject(new Error("Failed to load " + url + ", status " + xhr.status));
11126
+ reject(new Error("Failed to load ".concat(url, ", status ").concat(xhr.status)));
10130
11127
  }
10131
11128
  };
10132
11129
  xhr.onerror = function() {
10133
- return reject(new Error("Failed to load " + url));
11130
+ var _a;
11131
+ var loggableHeaders = "authorization" in headers ? (0, import_tslib3.__assign)((0, import_tslib3.__assign)({}, headers), { authorization: "<redacted>" }) : headers;
11132
+ reject(new Error("Failed to make a network call. Origin url: '".concat((_a = self === null || self === void 0 ? void 0 : self.location) === null || _a === void 0 ? void 0 : _a.origin, "', path: '").concat(url, "', headers: '").concat(JSON.stringify(loggableHeaders), "'")));
10134
11133
  };
10135
11134
  xhr.send();
10136
11135
  });
@@ -10148,7 +11147,8 @@ var ReadOnlyExperiments = (
10148
11147
  return this.experiments[key];
10149
11148
  };
10150
11149
  ReadOnlyExperiments2.prototype.enabled = function(key) {
10151
- return this.get(key) === "true";
11150
+ var value = this.experiments[key];
11151
+ return value === "true" || value === true || value === "B";
10152
11152
  };
10153
11153
  ReadOnlyExperiments2.prototype.pending = function() {
10154
11154
  return false;
@@ -10169,7 +11169,7 @@ var noop = function() {
10169
11169
  var Experiments = (
10170
11170
  /** @class */
10171
11171
  function(_super) {
10172
- (0, import_tslib3.__extends)(Experiments2, _super);
11172
+ (0, import_tslib4.__extends)(Experiments2, _super);
10173
11173
  function Experiments2(obj) {
10174
11174
  if (obj === void 0) {
10175
11175
  obj = {};
@@ -10181,6 +11181,7 @@ var Experiments = (
10181
11181
  _this.loaders = /* @__PURE__ */ new Map();
10182
11182
  _this.baseUrl = baseUrl(_this.useNewApi, obj.baseUrl);
10183
11183
  _this.requestContext = obj.requestContext || getGlobalRequestContext(globalDefaults);
11184
+ _this.signedInstance = obj.signedInstance;
10184
11185
  _this.onError = obj.onError || noop;
10185
11186
  if (obj.scope) {
10186
11187
  _this.load(obj.scope);
@@ -10191,7 +11192,7 @@ var Experiments = (
10191
11192
  return _this;
10192
11193
  }
10193
11194
  Experiments2.prototype.add = function(obj) {
10194
- this.experiments = (0, import_tslib3.__assign)((0, import_tslib3.__assign)({}, this.experiments), obj);
11195
+ this.experiments = (0, import_tslib4.__assign)((0, import_tslib4.__assign)({}, this.experiments), obj);
10195
11196
  };
10196
11197
  Experiments2.prototype._addLoader = function(url, promise) {
10197
11198
  var _this = this;
@@ -10215,18 +11216,18 @@ var Experiments = (
10215
11216
  if (existingRequest !== void 0) {
10216
11217
  return existingRequest;
10217
11218
  }
10218
- var requestPromise = httpRequest(url);
10219
- getCacheInstance().addUrlRequest(url, requestPromise);
10220
- return requestPromise.catch(function(error) {
11219
+ var requestPromise = httpRequest(url, this.signedInstance).catch(function(error) {
10221
11220
  _this.onError(error);
10222
11221
  return fallback;
10223
11222
  });
11223
+ getCacheInstance().addUrlRequest(url, requestPromise);
11224
+ return requestPromise;
10224
11225
  };
10225
11226
  Experiments2.prototype.load = function(scope) {
10226
11227
  var _this = this;
10227
11228
  var scopeConductionPath = getAllInScopePath(scope, this.useNewApi);
10228
11229
  var requestContextQuery = this.useNewApi ? getRequestContextQuery(this.requestContext) : "";
10229
- var url = "" + this.baseUrl + scopeConductionPath + requestContextQuery;
11230
+ var url = "".concat(this.baseUrl).concat(scopeConductionPath).concat(requestContextQuery);
10230
11231
  var result = this._getUrlWithFallback(url, "{}").then(function(response) {
10231
11232
  return tryParse(response);
10232
11233
  }).then(function(response) {
@@ -10245,7 +11246,7 @@ var Experiments = (
10245
11246
  }
10246
11247
  var experimentsPath = getExperimentPath(spec, fallbackValue, this.useNewApi);
10247
11248
  var requestContextQuery = this.useNewApi ? getRequestContextQuery(this.requestContext) : "";
10248
- var url = "" + this.baseUrl + experimentsPath + requestContextQuery;
11249
+ var url = "".concat(this.baseUrl).concat(experimentsPath).concat(requestContextQuery);
10249
11250
  var result = this._getUrlWithFallback(url, fallbackValue !== null && fallbackValue !== void 0 ? fallbackValue : "").then(function(response) {
10250
11251
  return _this._addConductResult(spec, response);
10251
11252
  });
@@ -12879,6 +13880,14 @@ var streetNameFirstCountries = [
12879
13880
  "BR"
12880
13881
  // Brazil
12881
13882
  ];
13883
+ var apartmentNumberFirstCountries = [
13884
+ "CA"
13885
+ // Canada
13886
+ ];
13887
+ var apartmentNumberAfterStreetNameCountries = [
13888
+ "US"
13889
+ // United States
13890
+ ];
12882
13891
  var convertStreetAddressToAddressLine = ({ name, number, apt }, countryCode) => {
12883
13892
  if (!name && !number) {
12884
13893
  return "";
@@ -12886,12 +13895,24 @@ var convertStreetAddressToAddressLine = ({ name, number, apt }, countryCode) =>
12886
13895
  if (!name || !number) {
12887
13896
  return name || number;
12888
13897
  }
12889
- const formattedNumber = apt ? `${number}-${apt}` : number;
13898
+ if (apt && apartmentNumberAfterStreetNameCountries.includes(countryCode)) {
13899
+ return `${number} ${name} ${apt}`.trim();
13900
+ }
13901
+ const formattedNumber = formatStreetApartmentNumber({ number, apt }, countryCode);
12890
13902
  if (streetNameFirstCountries.includes(countryCode)) {
12891
13903
  return `${name} ${formattedNumber}`.trim();
12892
13904
  }
12893
13905
  return `${formattedNumber} ${name}`.trim();
12894
13906
  };
13907
+ var formatStreetApartmentNumber = ({ number, apt = "" }, countryCode) => {
13908
+ if (number && apt) {
13909
+ return apartmentNumberFirstCountries.includes(countryCode) ? `${apt}-${number}` : `${number}-${apt}`;
13910
+ }
13911
+ if (number) {
13912
+ return number;
13913
+ }
13914
+ return apt;
13915
+ };
12895
13916
  var convertWixAdressToGoogleAddress = (address, addressContactDetails) => {
12896
13917
  const addressLines = [];
12897
13918
  const addressLine2 = address.addressLine2 ?? address.addressLine_2 ?? void 0;
@@ -12955,7 +13976,13 @@ var parseGoogleTemplate = (template) => {
12955
13976
  }
12956
13977
  return parts;
12957
13978
  };
12958
- var trimGoogleTemplate = (address, tokens) => {
13979
+ var trimGoogleTemplate = (address, tokens, { appendAdministrativeArea = true } = {}) => {
13980
+ const isFieldPresent = (field) => {
13981
+ if (field === "administrativeArea" && !appendAdministrativeArea) {
13982
+ return false;
13983
+ }
13984
+ return hasFieldToken(address, field);
13985
+ };
12959
13986
  const parts = [];
12960
13987
  let i = 0;
12961
13988
  while (i < tokens.length) {
@@ -12964,12 +13991,12 @@ var trimGoogleTemplate = (address, tokens) => {
12964
13991
  parts.push(token);
12965
13992
  } else if (isAddressFieldToken(token)) {
12966
13993
  const tokenName = getTokenName(token);
12967
- if (hasFieldToken(address, tokenName)) {
13994
+ if (isFieldPresent(tokenName)) {
12968
13995
  parts.push(token);
12969
13996
  }
12970
13997
  } else {
12971
13998
  const notFollowingRemovedField = i === 0 || !isAddressFieldToken(tokens[i - 1]) || parts.length > 0 && isAddressFieldToken(parts[parts.length - 1]);
12972
- const notPrecedingEmptyField = i === token.length - 1 || token[i + 1] === "%n" || hasFieldToken(address, getTokenName(tokens[i + 1]));
13999
+ const notPrecedingEmptyField = i === token.length - 1 || token[i + 1] === "%n" || isFieldPresent(getTokenName(tokens[i + 1]));
12973
14000
  if (notFollowingRemovedField && notPrecedingEmptyField) {
12974
14001
  parts.push(token);
12975
14002
  }
@@ -13021,11 +14048,13 @@ var applyTemplate = (address, tokens, options) => {
13021
14048
  };
13022
14049
 
13023
14050
  // ../../node_modules/@wix/l10n/dist/esm/address/formatter.js
13024
- var formatAddress = ({ address, addressContactDetails }, { appendCountry = true } = {}) => {
14051
+ var formatAddress = ({ address, addressContactDetails }, { appendCountry = true, appendAdministrativeArea = true } = {}) => {
13025
14052
  const googleAddressFormat = convertWixAdressToGoogleAddress(address, addressContactDetails);
13026
14053
  const template = getGoogleTemplate(address.country);
13027
14054
  const tokens = parseGoogleTemplate(template);
13028
- const trimmedTemplate = trimGoogleTemplate(googleAddressFormat, tokens);
14055
+ const trimmedTemplate = trimGoogleTemplate(googleAddressFormat, tokens, {
14056
+ appendAdministrativeArea
14057
+ });
13029
14058
  return applyTemplate(googleAddressFormat, trimmedTemplate, {
13030
14059
  appendCountry
13031
14060
  });