@ikas/storefront 0.0.158 → 0.0.159

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 (31) hide show
  1. package/build/__generated__/global-types.d.ts +44 -0
  2. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +9 -1
  3. package/build/api/country/__generated__/listCountry.d.ts +1 -0
  4. package/build/api/country/index.d.ts +1 -1
  5. package/build/api/customer/__generated__/customerLogin.d.ts +2 -1
  6. package/build/api/customer/__generated__/getLastViewedProducts.d.ts +15 -0
  7. package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +11 -0
  8. package/build/api/customer/index.d.ts +13 -1
  9. package/build/components/checkout/components/address-form/index.d.ts +3 -0
  10. package/build/components/checkout/components/address-form/model.d.ts +9 -0
  11. package/build/components/checkout/components/form-item/model.d.ts +7 -0
  12. package/build/components/checkout/model.d.ts +1 -0
  13. package/build/index.es.js +1615 -663
  14. package/build/index.js +1615 -662
  15. package/build/models/data/category/index.d.ts +5 -0
  16. package/build/models/data/checkout/index.d.ts +3 -0
  17. package/build/models/data/order/line-item/index.d.ts +1 -0
  18. package/build/models/data/payment-gateway/index.d.ts +25 -2
  19. package/build/models/data/product/attribute-value/index.d.ts +4 -0
  20. package/build/models/theme/component/prop/index.d.ts +5 -1
  21. package/build/models/theme/custom-data/index.d.ts +10 -0
  22. package/build/models/theme/page/component/prop-value/attribute-list.d.ts +7 -0
  23. package/build/models/ui/product-list/index.d.ts +8 -5
  24. package/build/store/base.d.ts +0 -1
  25. package/build/store/customer.d.ts +19 -6
  26. package/build/utils/helper.d.ts +1 -0
  27. package/build/utils/providers/page-data.d.ts +7 -1
  28. package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
  29. package/build/utils/providers/prop-value/boolean.d.ts +1 -1
  30. package/build/utils/providers/prop-value/custom.d.ts +4 -0
  31. package/package.json +1 -1
package/build/index.es.js CHANGED
@@ -11061,6 +11061,8 @@ var IkasCategoryPath = /** @class */ (function () {
11061
11061
  }());
11062
11062
  var IkasFilterCategory = /** @class */ (function () {
11063
11063
  function IkasFilterCategory(data) {
11064
+ // Extra
11065
+ this._isSelected = false;
11064
11066
  this.id = data.id || "";
11065
11067
  this.name = data.name || "";
11066
11068
  this.slug = data.slug || "";
@@ -11068,8 +11070,16 @@ var IkasFilterCategory = /** @class */ (function () {
11068
11070
  data.resultCount !== undefined && data.resultCount !== null
11069
11071
  ? data.resultCount
11070
11072
  : null;
11073
+ this._isSelected = data.isSelected || false;
11071
11074
  makeAutoObservable(this);
11072
11075
  }
11076
+ Object.defineProperty(IkasFilterCategory.prototype, "isSelected", {
11077
+ get: function () {
11078
+ return this._isSelected;
11079
+ },
11080
+ enumerable: false,
11081
+ configurable: true
11082
+ });
11073
11083
  Object.defineProperty(IkasFilterCategory.prototype, "href", {
11074
11084
  get: function () {
11075
11085
  if (!this.slug)
@@ -11079,6 +11089,9 @@ var IkasFilterCategory = /** @class */ (function () {
11079
11089
  enumerable: false,
11080
11090
  configurable: true
11081
11091
  });
11092
+ IkasFilterCategory.prototype.toJSON = function () {
11093
+ return __assign(__assign({}, this), { isSelected: this._isSelected });
11094
+ };
11082
11095
  return IkasFilterCategory;
11083
11096
  }());
11084
11097
 
@@ -11171,7 +11184,7 @@ var IkasOrderAddress = /** @class */ (function () {
11171
11184
  });
11172
11185
  Object.defineProperty(IkasOrderAddress.prototype, "validationResult", {
11173
11186
  get: function () {
11174
- var _a, _b, _c, _d, _e;
11187
+ var _a, _b, _c, _d;
11175
11188
  var isValidPhone = !!this.phone &&
11176
11189
  this.phone.length >= 10 &&
11177
11190
  validatePhoneNumber(this.phone);
@@ -11192,10 +11205,7 @@ var IkasOrderAddress = /** @class */ (function () {
11192
11205
  ? isValidPhone
11193
11206
  : true,
11194
11207
  identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
11195
- IkasCheckoutRequirementEnum.MANDATORY ||
11196
- (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.identityNumberRequirement) ===
11197
- IkasCheckoutRequirementEnum.OPTIONAL &&
11198
- this.phone)
11208
+ IkasCheckoutRequirementEnum.MANDATORY
11199
11209
  ? !!this.identityNumber
11200
11210
  : true,
11201
11211
  };
@@ -11326,9 +11336,18 @@ var IkasOrderLineItem = /** @class */ (function () {
11326
11336
  this.status = data.status || OrderLineItemStatusEnum.FULFILLED;
11327
11337
  makeAutoObservable(this);
11328
11338
  }
11339
+ Object.defineProperty(IkasOrderLineItem.prototype, "priceWithQuantity", {
11340
+ get: function () {
11341
+ return this.price * this.quantity;
11342
+ },
11343
+ enumerable: false,
11344
+ configurable: true
11345
+ });
11329
11346
  Object.defineProperty(IkasOrderLineItem.prototype, "finalPriceWithQuantity", {
11330
11347
  get: function () {
11331
- return this.finalPrice * this.quantity;
11348
+ return ((this.discountPrice !== undefined && this.discountPrice !== null
11349
+ ? this.discountPrice
11350
+ : this.price) * this.quantity);
11332
11351
  },
11333
11352
  enumerable: false,
11334
11353
  configurable: true
@@ -11336,7 +11355,7 @@ var IkasOrderLineItem = /** @class */ (function () {
11336
11355
  Object.defineProperty(IkasOrderLineItem.prototype, "tax", {
11337
11356
  get: function () {
11338
11357
  var taxValue = this.taxValue || 0;
11339
- return (this.finalPriceWithQuantity / (100 + taxValue)) * taxValue;
11358
+ return ((this.finalPrice * this.quantity) / (100 + taxValue)) * taxValue;
11340
11359
  },
11341
11360
  enumerable: false,
11342
11361
  configurable: true
@@ -11414,6 +11433,81 @@ var IkasCart = /** @class */ (function () {
11414
11433
  return IkasCart;
11415
11434
  }());
11416
11435
 
11436
+ var IkasPaymentGateway = /** @class */ (function () {
11437
+ function IkasPaymentGateway(data) {
11438
+ var _a;
11439
+ this.paymentMethods = data.paymentMethods || [];
11440
+ this.paymentMethodType =
11441
+ data.paymentMethodType || IkasPaymentMethodType.OTHER;
11442
+ this.id = data.id || null;
11443
+ this.name = data.name || "";
11444
+ this.testMode = data.testMode || null;
11445
+ this.description = data.description || null;
11446
+ this.additionalPrices =
11447
+ ((_a = data.additionalPrices) === null || _a === void 0 ? void 0 : _a.map(function (ap) { return new IkasPaymentGatewayAdditionalPrice(ap); })) || null;
11448
+ makeAutoObservable(this);
11449
+ }
11450
+ IkasPaymentGateway.prototype.getCalculatedAdditionalPrices = function (totalFinalPrice, shippingLines) {
11451
+ var _this = this;
11452
+ if (this.additionalPrices) {
11453
+ var shippingPrice = (shippingLines === null || shippingLines === void 0 ? void 0 : shippingLines.reduce(function (sum, item) { return sum + item.price; }, 0)) || 0;
11454
+ totalFinalPrice -= shippingPrice;
11455
+ return this.additionalPrices.map(function (additionalPrice) {
11456
+ var amount = 0;
11457
+ if (additionalPrice.amountType ===
11458
+ IkasPaymentGatewayAdditionalPriceAmountType.RATIO) {
11459
+ amount = ((totalFinalPrice || 0) * additionalPrice.amount) / 100;
11460
+ }
11461
+ else {
11462
+ amount = additionalPrice.amount;
11463
+ }
11464
+ if (additionalPrice.type ===
11465
+ IkasPaymentMethodAdditionalPriceType.DECREMENT)
11466
+ totalFinalPrice -= amount;
11467
+ else
11468
+ totalFinalPrice += amount;
11469
+ return {
11470
+ name: additionalPrice.name || _this.name,
11471
+ amount: amount,
11472
+ type: additionalPrice.type,
11473
+ };
11474
+ });
11475
+ }
11476
+ };
11477
+ return IkasPaymentGateway;
11478
+ }());
11479
+ var IkasPaymentGatewayAdditionalPrice = /** @class */ (function () {
11480
+ function IkasPaymentGatewayAdditionalPrice(data) {
11481
+ this.amount = data.amount || 0;
11482
+ this.amountType =
11483
+ data.amountType || IkasPaymentGatewayAdditionalPriceAmountType.AMOUNT;
11484
+ this.name = data.name || "";
11485
+ this.type = data.type || IkasPaymentMethodAdditionalPriceType.INCREMENT;
11486
+ makeAutoObservable(this);
11487
+ }
11488
+ return IkasPaymentGatewayAdditionalPrice;
11489
+ }());
11490
+ var IkasPaymentMethodType;
11491
+ (function (IkasPaymentMethodType) {
11492
+ IkasPaymentMethodType["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
11493
+ IkasPaymentMethodType["CASH"] = "CASH";
11494
+ IkasPaymentMethodType["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
11495
+ IkasPaymentMethodType["CREDIT_CARD"] = "CREDIT_CARD";
11496
+ IkasPaymentMethodType["GIFT_CARD"] = "GIFT_CARD";
11497
+ IkasPaymentMethodType["MONEY_ORDER"] = "MONEY_ORDER";
11498
+ IkasPaymentMethodType["OTHER"] = "OTHER";
11499
+ })(IkasPaymentMethodType || (IkasPaymentMethodType = {}));
11500
+ var IkasPaymentMethodAdditionalPriceType;
11501
+ (function (IkasPaymentMethodAdditionalPriceType) {
11502
+ IkasPaymentMethodAdditionalPriceType["DECREMENT"] = "DECREMENT";
11503
+ IkasPaymentMethodAdditionalPriceType["INCREMENT"] = "INCREMENT";
11504
+ })(IkasPaymentMethodAdditionalPriceType || (IkasPaymentMethodAdditionalPriceType = {}));
11505
+ var IkasPaymentGatewayAdditionalPriceAmountType;
11506
+ (function (IkasPaymentGatewayAdditionalPriceAmountType) {
11507
+ IkasPaymentGatewayAdditionalPriceAmountType["AMOUNT"] = "AMOUNT";
11508
+ IkasPaymentGatewayAdditionalPriceAmountType["RATIO"] = "RATIO";
11509
+ })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
11510
+
11417
11511
  var IkasCheckout = /** @class */ (function () {
11418
11512
  function IkasCheckout(data) {
11419
11513
  if (data === void 0) { data = {}; }
@@ -11441,6 +11535,7 @@ var IkasCheckout = /** @class */ (function () {
11441
11535
  this.note = null;
11442
11536
  // Extra
11443
11537
  this.appliedCouponCode = null;
11538
+ this.selectedPaymentGateway = null;
11444
11539
  this.id = data.id;
11445
11540
  this.createdAt = data.createdAt;
11446
11541
  this.updatedAt = data.updatedAt;
@@ -11512,6 +11607,22 @@ var IkasCheckout = /** @class */ (function () {
11512
11607
  enumerable: false,
11513
11608
  configurable: true
11514
11609
  });
11610
+ Object.defineProperty(IkasCheckout.prototype, "$totalFinalPrice", {
11611
+ get: function () {
11612
+ var _a;
11613
+ var calculatedAdditionalPrices = (_a = this.selectedPaymentGateway) === null || _a === void 0 ? void 0 : _a.getCalculatedAdditionalPrices(this.totalFinalPrice || 0, this.shippingLines || null);
11614
+ var total = this.totalFinalPrice || 0;
11615
+ calculatedAdditionalPrices === null || calculatedAdditionalPrices === void 0 ? void 0 : calculatedAdditionalPrices.forEach(function (additionalPrice) {
11616
+ if (additionalPrice.type === IkasPaymentMethodAdditionalPriceType.DECREMENT)
11617
+ total -= additionalPrice.amount;
11618
+ else
11619
+ total += additionalPrice.amount;
11620
+ });
11621
+ return total;
11622
+ },
11623
+ enumerable: false,
11624
+ configurable: true
11625
+ });
11515
11626
  return IkasCheckout;
11516
11627
  }());
11517
11628
  var IkasShippingMethod;
@@ -16147,17 +16258,6 @@ var sortBy = _baseRest(function(collection, iteratees) {
16147
16258
 
16148
16259
  var sortBy_1 = sortBy;
16149
16260
 
16150
- var IkasPaymentMethodType;
16151
- (function (IkasPaymentMethodType) {
16152
- IkasPaymentMethodType["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
16153
- IkasPaymentMethodType["CASH"] = "CASH";
16154
- IkasPaymentMethodType["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
16155
- IkasPaymentMethodType["CREDIT_CARD"] = "CREDIT_CARD";
16156
- IkasPaymentMethodType["GIFT_CARD"] = "GIFT_CARD";
16157
- IkasPaymentMethodType["MONEY_ORDER"] = "MONEY_ORDER";
16158
- IkasPaymentMethodType["OTHER"] = "OTHER";
16159
- })(IkasPaymentMethodType || (IkasPaymentMethodType = {}));
16160
-
16161
16261
  var CreditCardData = /** @class */ (function () {
16162
16262
  function CreditCardData(data) {
16163
16263
  var _this = this;
@@ -16801,6 +16901,7 @@ var CheckoutViewModel = /** @class */ (function () {
16801
16901
  if (paymentGateway.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD) {
16802
16902
  _this.cardData = new CreditCardData();
16803
16903
  }
16904
+ _this.checkout.selectedPaymentGateway = paymentGateway;
16804
16905
  _this.installmentInfo = undefined;
16805
16906
  };
16806
16907
  this.setInstallmentCount = function (count) {
@@ -16921,6 +17022,13 @@ var CheckoutViewModel = /** @class */ (function () {
16921
17022
  enumerable: false,
16922
17023
  configurable: true
16923
17024
  });
17025
+ Object.defineProperty(CheckoutViewModel.prototype, "finalPrice", {
17026
+ get: function () {
17027
+ return this.installmentPrice || this.checkout.$totalFinalPrice;
17028
+ },
17029
+ enumerable: false,
17030
+ configurable: true
17031
+ });
16924
17032
  Object.defineProperty(CheckoutViewModel.prototype, "canProceedToShipping", {
16925
17033
  // VALIDATIONS
16926
17034
  get: function () {
@@ -17463,11 +17571,260 @@ var AnalyticsBody = function () {
17463
17571
  } }))));
17464
17572
  };
17465
17573
 
17574
+ /**
17575
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
17576
+ * support for iteratee shorthands.
17577
+ *
17578
+ * @private
17579
+ * @param {Array} array The array to inspect.
17580
+ * @param {Function} predicate The function invoked per iteration.
17581
+ * @param {number} fromIndex The index to search from.
17582
+ * @param {boolean} [fromRight] Specify iterating from right to left.
17583
+ * @returns {number} Returns the index of the matched value, else `-1`.
17584
+ */
17585
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
17586
+ var length = array.length,
17587
+ index = fromIndex + (fromRight ? 1 : -1);
17588
+
17589
+ while ((fromRight ? index-- : ++index < length)) {
17590
+ if (predicate(array[index], index, array)) {
17591
+ return index;
17592
+ }
17593
+ }
17594
+ return -1;
17595
+ }
17596
+
17597
+ var _baseFindIndex = baseFindIndex;
17598
+
17599
+ /**
17600
+ * The base implementation of `_.isNaN` without support for number objects.
17601
+ *
17602
+ * @private
17603
+ * @param {*} value The value to check.
17604
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
17605
+ */
17606
+ function baseIsNaN(value) {
17607
+ return value !== value;
17608
+ }
17609
+
17610
+ var _baseIsNaN = baseIsNaN;
17611
+
17612
+ /**
17613
+ * A specialized version of `_.indexOf` which performs strict equality
17614
+ * comparisons of values, i.e. `===`.
17615
+ *
17616
+ * @private
17617
+ * @param {Array} array The array to inspect.
17618
+ * @param {*} value The value to search for.
17619
+ * @param {number} fromIndex The index to search from.
17620
+ * @returns {number} Returns the index of the matched value, else `-1`.
17621
+ */
17622
+ function strictIndexOf(array, value, fromIndex) {
17623
+ var index = fromIndex - 1,
17624
+ length = array.length;
17625
+
17626
+ while (++index < length) {
17627
+ if (array[index] === value) {
17628
+ return index;
17629
+ }
17630
+ }
17631
+ return -1;
17632
+ }
17633
+
17634
+ var _strictIndexOf = strictIndexOf;
17635
+
17636
+ /**
17637
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
17638
+ *
17639
+ * @private
17640
+ * @param {Array} array The array to inspect.
17641
+ * @param {*} value The value to search for.
17642
+ * @param {number} fromIndex The index to search from.
17643
+ * @returns {number} Returns the index of the matched value, else `-1`.
17644
+ */
17645
+ function baseIndexOf(array, value, fromIndex) {
17646
+ return value === value
17647
+ ? _strictIndexOf(array, value, fromIndex)
17648
+ : _baseFindIndex(array, _baseIsNaN, fromIndex);
17649
+ }
17650
+
17651
+ var _baseIndexOf = baseIndexOf;
17652
+
17653
+ /**
17654
+ * A specialized version of `_.includes` for arrays without support for
17655
+ * specifying an index to search from.
17656
+ *
17657
+ * @private
17658
+ * @param {Array} [array] The array to inspect.
17659
+ * @param {*} target The value to search for.
17660
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
17661
+ */
17662
+ function arrayIncludes(array, value) {
17663
+ var length = array == null ? 0 : array.length;
17664
+ return !!length && _baseIndexOf(array, value, 0) > -1;
17665
+ }
17666
+
17667
+ var _arrayIncludes = arrayIncludes;
17668
+
17669
+ /**
17670
+ * This function is like `arrayIncludes` except that it accepts a comparator.
17671
+ *
17672
+ * @private
17673
+ * @param {Array} [array] The array to inspect.
17674
+ * @param {*} target The value to search for.
17675
+ * @param {Function} comparator The comparator invoked per element.
17676
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
17677
+ */
17678
+ function arrayIncludesWith(array, value, comparator) {
17679
+ var index = -1,
17680
+ length = array == null ? 0 : array.length;
17681
+
17682
+ while (++index < length) {
17683
+ if (comparator(value, array[index])) {
17684
+ return true;
17685
+ }
17686
+ }
17687
+ return false;
17688
+ }
17689
+
17690
+ var _arrayIncludesWith = arrayIncludesWith;
17691
+
17692
+ /**
17693
+ * This method returns `undefined`.
17694
+ *
17695
+ * @static
17696
+ * @memberOf _
17697
+ * @since 2.3.0
17698
+ * @category Util
17699
+ * @example
17700
+ *
17701
+ * _.times(2, _.noop);
17702
+ * // => [undefined, undefined]
17703
+ */
17704
+ function noop() {
17705
+ // No operation performed.
17706
+ }
17707
+
17708
+ var noop_1 = noop;
17709
+
17710
+ /** Used as references for various `Number` constants. */
17711
+ var INFINITY$2 = 1 / 0;
17712
+
17713
+ /**
17714
+ * Creates a set object of `values`.
17715
+ *
17716
+ * @private
17717
+ * @param {Array} values The values to add to the set.
17718
+ * @returns {Object} Returns the new set.
17719
+ */
17720
+ var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
17721
+ return new _Set(values);
17722
+ };
17723
+
17724
+ var _createSet = createSet;
17725
+
17726
+ /** Used as the size to enable large array optimizations. */
17727
+ var LARGE_ARRAY_SIZE$1 = 200;
17728
+
17729
+ /**
17730
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
17731
+ *
17732
+ * @private
17733
+ * @param {Array} array The array to inspect.
17734
+ * @param {Function} [iteratee] The iteratee invoked per element.
17735
+ * @param {Function} [comparator] The comparator invoked per element.
17736
+ * @returns {Array} Returns the new duplicate free array.
17737
+ */
17738
+ function baseUniq(array, iteratee, comparator) {
17739
+ var index = -1,
17740
+ includes = _arrayIncludes,
17741
+ length = array.length,
17742
+ isCommon = true,
17743
+ result = [],
17744
+ seen = result;
17745
+
17746
+ if (comparator) {
17747
+ isCommon = false;
17748
+ includes = _arrayIncludesWith;
17749
+ }
17750
+ else if (length >= LARGE_ARRAY_SIZE$1) {
17751
+ var set = iteratee ? null : _createSet(array);
17752
+ if (set) {
17753
+ return _setToArray(set);
17754
+ }
17755
+ isCommon = false;
17756
+ includes = _cacheHas;
17757
+ seen = new _SetCache;
17758
+ }
17759
+ else {
17760
+ seen = iteratee ? [] : result;
17761
+ }
17762
+ outer:
17763
+ while (++index < length) {
17764
+ var value = array[index],
17765
+ computed = iteratee ? iteratee(value) : value;
17766
+
17767
+ value = (comparator || value !== 0) ? value : 0;
17768
+ if (isCommon && computed === computed) {
17769
+ var seenIndex = seen.length;
17770
+ while (seenIndex--) {
17771
+ if (seen[seenIndex] === computed) {
17772
+ continue outer;
17773
+ }
17774
+ }
17775
+ if (iteratee) {
17776
+ seen.push(computed);
17777
+ }
17778
+ result.push(value);
17779
+ }
17780
+ else if (!includes(seen, computed, comparator)) {
17781
+ if (seen !== result) {
17782
+ seen.push(computed);
17783
+ }
17784
+ result.push(value);
17785
+ }
17786
+ }
17787
+ return result;
17788
+ }
17789
+
17790
+ var _baseUniq = baseUniq;
17791
+
17792
+ /**
17793
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
17794
+ * invoked for each element in `array` to generate the criterion by which
17795
+ * uniqueness is computed. The order of result values is determined by the
17796
+ * order they occur in the array. The iteratee is invoked with one argument:
17797
+ * (value).
17798
+ *
17799
+ * @static
17800
+ * @memberOf _
17801
+ * @since 4.0.0
17802
+ * @category Array
17803
+ * @param {Array} array The array to inspect.
17804
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17805
+ * @returns {Array} Returns the new duplicate free array.
17806
+ * @example
17807
+ *
17808
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
17809
+ * // => [2.1, 1.2]
17810
+ *
17811
+ * // The `_.property` iteratee shorthand.
17812
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
17813
+ * // => [{ 'x': 1 }, { 'x': 2 }]
17814
+ */
17815
+ function uniqBy(array, iteratee) {
17816
+ return (array && array.length) ? _baseUniq(array, _baseIteratee(iteratee)) : [];
17817
+ }
17818
+
17819
+ var uniqBy_1 = uniqBy;
17820
+
17466
17821
  var isServer$3 = typeof localStorage === "undefined";
17467
17822
  var LS_TOKEN_KEY = "customerToken";
17468
17823
  var LS_TOKEN_EXPIRY = "customerTokenExpiry";
17469
17824
  var LS_CUSTOMER_KEY = "customer";
17470
17825
  var LS_CUSTOMER_SUB_KEY = "customerEmailSubscription";
17826
+ var LS_LAST_VIEWED_PRODUCTS_KEY = "lastViewedProducts";
17827
+ var LS_CUSTOMER_CONSENT = "customerConsent";
17471
17828
  var IkasCustomerStore = /** @class */ (function () {
17472
17829
  function IkasCustomerStore(baseStore) {
17473
17830
  var _this = this;
@@ -17477,6 +17834,8 @@ var IkasCustomerStore = /** @class */ (function () {
17477
17834
  this.baseStore = null;
17478
17835
  this._initialized = false;
17479
17836
  this._visitorSubscribedEmail = false;
17837
+ this._lastViewedProducts = [];
17838
+ this._customerConsentGranted = false;
17480
17839
  this.login = function (email, password) { return __awaiter(_this, void 0, void 0, function () {
17481
17840
  var response, cart;
17482
17841
  var _a;
@@ -17496,7 +17855,9 @@ var IkasCustomerStore = /** @class */ (function () {
17496
17855
  case 2:
17497
17856
  _b.sent();
17498
17857
  _b.label = 3;
17499
- case 3: return [2 /*return*/, true];
17858
+ case 3:
17859
+ this.saveLocalLastViewedProducts();
17860
+ return [2 /*return*/, true];
17500
17861
  case 4: return [2 /*return*/, false];
17501
17862
  }
17502
17863
  });
@@ -17511,6 +17872,7 @@ var IkasCustomerStore = /** @class */ (function () {
17511
17872
  if (response) {
17512
17873
  this.setToken(response.token, response.tokenExpiry);
17513
17874
  this.setCustomer(response.customer);
17875
+ this.saveLocalLastViewedProducts();
17514
17876
  return [2 /*return*/, true];
17515
17877
  }
17516
17878
  return [2 /*return*/, false];
@@ -17726,6 +18088,9 @@ var IkasCustomerStore = /** @class */ (function () {
17726
18088
  }
17727
18089
  });
17728
18090
  }); };
18091
+ this.onCustomerConsentGrant = function () {
18092
+ _this.saveCustomerConsent();
18093
+ };
17729
18094
  this.baseStore = baseStore;
17730
18095
  this.init();
17731
18096
  makeAutoObservable(this);
@@ -17748,6 +18113,13 @@ var IkasCustomerStore = /** @class */ (function () {
17748
18113
  enumerable: false,
17749
18114
  configurable: true
17750
18115
  });
18116
+ Object.defineProperty(IkasCustomerStore.prototype, "customerConsentGranted", {
18117
+ get: function () {
18118
+ return this._customerConsentGranted;
18119
+ },
18120
+ enumerable: false,
18121
+ configurable: true
18122
+ });
17751
18123
  IkasCustomerStore.prototype.init = function () {
17752
18124
  return __awaiter(this, void 0, void 0, function () {
17753
18125
  return __generator(this, function (_a) {
@@ -17755,6 +18127,8 @@ var IkasCustomerStore = /** @class */ (function () {
17755
18127
  case 0:
17756
18128
  this.loadToken();
17757
18129
  this.loadCustomer();
18130
+ this.loadLastViewedProducts();
18131
+ this.loadCustomerConsent();
17758
18132
  return [4 /*yield*/, this.refreshToken()];
17759
18133
  case 1:
17760
18134
  _a.sent();
@@ -17825,35 +18199,158 @@ var IkasCustomerStore = /** @class */ (function () {
17825
18199
  }
17826
18200
  catch (err) { }
17827
18201
  };
17828
- IkasCustomerStore.prototype.setToken = function (token, tokenExpiry) {
18202
+ IkasCustomerStore.prototype.getLastViewedProducts = function () {
18203
+ return __awaiter(this, void 0, void 0, function () {
18204
+ var _a;
18205
+ return __generator(this, function (_b) {
18206
+ switch (_b.label) {
18207
+ case 0:
18208
+ if (!this.customer) return [3 /*break*/, 2];
18209
+ _a = this;
18210
+ return [4 /*yield*/, IkasCustomerAPI.getLastViewedProducts(this.customer.id)];
18211
+ case 1:
18212
+ _a._lastViewedProducts = _b.sent();
18213
+ return [3 /*break*/, 3];
18214
+ case 2:
18215
+ this.loadLastViewedProducts();
18216
+ _b.label = 3;
18217
+ case 3: return [2 /*return*/, this._lastViewedProducts];
18218
+ }
18219
+ });
18220
+ });
18221
+ };
18222
+ IkasCustomerStore.prototype.saveLastViewedProducts = function () {
17829
18223
  if (isServer$3)
17830
18224
  return;
17831
- this.token = token;
17832
- this.tokenExpiry = tokenExpiry;
17833
- localStorage.setItem(LS_TOKEN_KEY, token);
17834
- localStorage.setItem(LS_TOKEN_EXPIRY, tokenExpiry + "");
17835
- apollo.setCustomerToken(token);
18225
+ window.localStorage.setItem(LS_LAST_VIEWED_PRODUCTS_KEY, JSON.stringify(this._lastViewedProducts));
17836
18226
  };
17837
- IkasCustomerStore.prototype.loadToken = function () {
18227
+ IkasCustomerStore.prototype.loadLastViewedProducts = function () {
17838
18228
  if (isServer$3)
17839
18229
  return;
17840
- var token = localStorage.getItem(LS_TOKEN_KEY);
17841
- var tokenExpiry = localStorage.getItem(LS_TOKEN_EXPIRY);
17842
- if (token && tokenExpiry) {
17843
- this.setToken(token, parseInt(tokenExpiry));
18230
+ try {
18231
+ var lvpStr = window.localStorage.getItem(LS_LAST_VIEWED_PRODUCTS_KEY);
18232
+ if (lvpStr) {
18233
+ this._lastViewedProducts = JSON.parse(lvpStr);
18234
+ this._lastViewedProducts = this._lastViewedProducts.reverse();
18235
+ this._lastViewedProducts = uniqBy_1(this._lastViewedProducts, "variantId");
18236
+ }
17844
18237
  }
18238
+ catch (err) { }
17845
18239
  };
17846
- IkasCustomerStore.prototype.clearLocalData = function () {
17847
- localStorage.removeItem(LS_TOKEN_KEY);
17848
- localStorage.removeItem(LS_TOKEN_EXPIRY);
17849
- localStorage.removeItem(LS_CUSTOMER_KEY);
17850
- this.customer = undefined;
17851
- this.token = undefined;
17852
- this.tokenExpiry = undefined;
18240
+ IkasCustomerStore.prototype.removeLastViewedProducts = function () {
18241
+ if (isServer$3)
18242
+ return;
18243
+ window.localStorage.removeItem(LS_LAST_VIEWED_PRODUCTS_KEY);
17853
18244
  };
17854
- return IkasCustomerStore;
17855
- }());
17856
-
18245
+ IkasCustomerStore.prototype.onProductView = function (productId, variantId) {
18246
+ return __awaiter(this, void 0, void 0, function () {
18247
+ var isSuccess;
18248
+ return __generator(this, function (_a) {
18249
+ switch (_a.label) {
18250
+ case 0:
18251
+ if (!this.customer) return [3 /*break*/, 2];
18252
+ return [4 /*yield*/, IkasCustomerAPI.saveLastViewedProducts({
18253
+ customerId: this.customer.id,
18254
+ products: [
18255
+ {
18256
+ productId: productId,
18257
+ variantId: variantId,
18258
+ },
18259
+ ],
18260
+ })];
18261
+ case 1:
18262
+ isSuccess = _a.sent();
18263
+ if (isSuccess)
18264
+ this._lastViewedProducts.push({ productId: productId, variantId: variantId });
18265
+ return [3 /*break*/, 3];
18266
+ case 2:
18267
+ this._lastViewedProducts.push({ productId: productId, variantId: variantId });
18268
+ this._lastViewedProducts = this._lastViewedProducts.slice(0, 20);
18269
+ this._lastViewedProducts = uniqBy_1(this._lastViewedProducts, "variantId");
18270
+ this.saveLastViewedProducts();
18271
+ _a.label = 3;
18272
+ case 3: return [2 /*return*/];
18273
+ }
18274
+ });
18275
+ });
18276
+ };
18277
+ IkasCustomerStore.prototype.saveLocalLastViewedProducts = function () {
18278
+ return __awaiter(this, void 0, void 0, function () {
18279
+ var isSuccess;
18280
+ return __generator(this, function (_a) {
18281
+ switch (_a.label) {
18282
+ case 0:
18283
+ if (isServer$3)
18284
+ return [2 /*return*/];
18285
+ _a.label = 1;
18286
+ case 1:
18287
+ _a.trys.push([1, 4, , 5]);
18288
+ this.loadLastViewedProducts();
18289
+ if (!this._lastViewedProducts.length) return [3 /*break*/, 3];
18290
+ return [4 /*yield*/, IkasCustomerAPI.saveLastViewedProducts({
18291
+ customerId: this.customer.id,
18292
+ products: this._lastViewedProducts,
18293
+ })];
18294
+ case 2:
18295
+ isSuccess = _a.sent();
18296
+ if (isSuccess) {
18297
+ this.removeLastViewedProducts();
18298
+ }
18299
+ _a.label = 3;
18300
+ case 3: return [3 /*break*/, 5];
18301
+ case 4:
18302
+ _a.sent();
18303
+ return [3 /*break*/, 5];
18304
+ case 5: return [2 /*return*/];
18305
+ }
18306
+ });
18307
+ });
18308
+ };
18309
+ IkasCustomerStore.prototype.saveCustomerConsent = function () {
18310
+ if (isServer$3)
18311
+ return;
18312
+ this._customerConsentGranted = true;
18313
+ window.localStorage.setItem(LS_CUSTOMER_CONSENT, "true");
18314
+ };
18315
+ IkasCustomerStore.prototype.loadCustomerConsent = function () {
18316
+ if (isServer$3)
18317
+ return;
18318
+ this._customerConsentGranted = !!window.localStorage.getItem(LS_CUSTOMER_CONSENT);
18319
+ };
18320
+ IkasCustomerStore.prototype.removeCustomerConsent = function () {
18321
+ if (isServer$3)
18322
+ return;
18323
+ window.localStorage.removeItem(LS_CUSTOMER_CONSENT);
18324
+ };
18325
+ IkasCustomerStore.prototype.setToken = function (token, tokenExpiry) {
18326
+ if (isServer$3)
18327
+ return;
18328
+ this.token = token;
18329
+ this.tokenExpiry = tokenExpiry;
18330
+ localStorage.setItem(LS_TOKEN_KEY, token);
18331
+ localStorage.setItem(LS_TOKEN_EXPIRY, tokenExpiry + "");
18332
+ apollo.setCustomerToken(token);
18333
+ };
18334
+ IkasCustomerStore.prototype.loadToken = function () {
18335
+ if (isServer$3)
18336
+ return;
18337
+ var token = localStorage.getItem(LS_TOKEN_KEY);
18338
+ var tokenExpiry = localStorage.getItem(LS_TOKEN_EXPIRY);
18339
+ if (token && tokenExpiry) {
18340
+ this.setToken(token, parseInt(tokenExpiry));
18341
+ }
18342
+ };
18343
+ IkasCustomerStore.prototype.clearLocalData = function () {
18344
+ localStorage.removeItem(LS_TOKEN_KEY);
18345
+ localStorage.removeItem(LS_TOKEN_EXPIRY);
18346
+ localStorage.removeItem(LS_CUSTOMER_KEY);
18347
+ this.customer = undefined;
18348
+ this.token = undefined;
18349
+ this.tokenExpiry = undefined;
18350
+ };
18351
+ return IkasCustomerStore;
18352
+ }());
18353
+
17857
18354
  var IkasOrder = /** @class */ (function () {
17858
18355
  function IkasOrder(data) {
17859
18356
  var _this = this;
@@ -18740,6 +19237,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
18740
19237
  this.type = data.type || IkasThemeComponentPropType.TEXT;
18741
19238
  this.isRequired = data.isRequired || false;
18742
19239
  this.customDataId = data.customDataId || null;
19240
+ this.attributeTypes = data.attributeTypes || null;
18743
19241
  makeAutoObservable(this);
18744
19242
  }
18745
19243
  return IkasThemeComponentProp;
@@ -18756,6 +19254,7 @@ var IkasThemeComponentPropType;
18756
19254
  IkasThemeComponentPropType["PRODUCT_DETAIL"] = "PRODUCT_DETAIL";
18757
19255
  IkasThemeComponentPropType["PRODUCT_LIST"] = "PRODUCT_LIST";
18758
19256
  IkasThemeComponentPropType["PRODUCT_ATTRIBUTE"] = "PRODUCT_ATTRIBUTE";
19257
+ IkasThemeComponentPropType["PRODUCT_ATTRIBUTE_LIST"] = "PRODUCT_ATTRIBUTE_LIST";
18759
19258
  IkasThemeComponentPropType["BRAND"] = "BRAND";
18760
19259
  IkasThemeComponentPropType["BRAND_LIST"] = "BRAND_LIST";
18761
19260
  IkasThemeComponentPropType["CATEGORY"] = "CATEGORY";
@@ -18769,6 +19268,7 @@ var IkasThemeComponentPropType;
18769
19268
  IkasThemeComponentPropType["OBJECT"] = "OBJECT";
18770
19269
  IkasThemeComponentPropType["STATIC_LIST"] = "STATIC_LIST";
18771
19270
  IkasThemeComponentPropType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
19271
+ IkasThemeComponentPropType["ENUM"] = "ENUM";
18772
19272
  })(IkasThemeComponentPropType || (IkasThemeComponentPropType = {}));
18773
19273
 
18774
19274
  var IkasThemeComponent = /** @class */ (function () {
@@ -18790,6 +19290,8 @@ var IkasThemeCustomData = /** @class */ (function () {
18790
19290
  function IkasThemeCustomData(data) {
18791
19291
  var _this = this;
18792
19292
  if (data === void 0) { data = {}; }
19293
+ var _a;
19294
+ this.customDataId = null;
18793
19295
  this.id = data.id || "";
18794
19296
  this.name = data.name || null;
18795
19297
  this.type = data.type || IkasThemeComponentPropType.TEXT;
@@ -18797,6 +19299,10 @@ var IkasThemeCustomData = /** @class */ (function () {
18797
19299
  this.key = data.key || null;
18798
19300
  this.parent = data.parent || null;
18799
19301
  this.itemCount = data.itemCount || null;
19302
+ this.attributeTypes = data.attributeTypes || null;
19303
+ this.enumOptions =
19304
+ ((_a = data.enumOptions) === null || _a === void 0 ? void 0 : _a.map(function (eo) { return new IkasThemeEnumOption(eo); })) || null;
19305
+ this.customDataId = data.customDataId || null;
18800
19306
  this.isRoot = data.isRoot || false;
18801
19307
  this.nestedData = data.nestedData
18802
19308
  ? data.nestedData.map(function (nd) {
@@ -18813,6 +19319,16 @@ var IkasThemeCustomData = /** @class */ (function () {
18813
19319
  return obj;
18814
19320
  };
18815
19321
  return IkasThemeCustomData;
19322
+ }());
19323
+ var IkasThemeEnumOption = /** @class */ (function () {
19324
+ function IkasThemeEnumOption(data) {
19325
+ if (data === void 0) { data = {}; }
19326
+ this.id = data.id || "";
19327
+ this.displayName = data.displayName || "";
19328
+ this.value = data.value || "";
19329
+ makeAutoObservable(this);
19330
+ }
19331
+ return IkasThemeEnumOption;
18816
19332
  }());
18817
19333
 
18818
19334
  var IkasThemePageComponent = /** @class */ (function () {
@@ -20062,6 +20578,8 @@ var IkasProductDetail = /** @class */ (function () {
20062
20578
  var newUrl = "/" + metaData.slug + "-" + this.selectedVariantValues
20063
20579
  .map(function (vv) { return vv.slug; })
20064
20580
  .join("-");
20581
+ if (newUrl === window.location.pathname)
20582
+ return;
20065
20583
  var isShallow = process.env.NODE_ENV !== "production";
20066
20584
  (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace(newUrl, undefined, {
20067
20585
  shallow: isShallow,
@@ -20936,6 +21454,15 @@ var CustomerAccountStatusesEnum;
20936
21454
  CustomerAccountStatusesEnum["DISABLED_ACCOUNT"] = "DISABLED_ACCOUNT";
20937
21455
  CustomerAccountStatusesEnum["INVITED_TO_CREATE_ACCOUNT"] = "INVITED_TO_CREATE_ACCOUNT";
20938
21456
  })(CustomerAccountStatusesEnum || (CustomerAccountStatusesEnum = {}));
21457
+ /**
21458
+ * Customer Email Subscription Statuses
21459
+ */
21460
+ var CustomerEmailSubscriptionStatusesEnum;
21461
+ (function (CustomerEmailSubscriptionStatusesEnum) {
21462
+ CustomerEmailSubscriptionStatusesEnum["NOT_SUBSCRIBED"] = "NOT_SUBSCRIBED";
21463
+ CustomerEmailSubscriptionStatusesEnum["PENDING_CONFIRMATION"] = "PENDING_CONFIRMATION";
21464
+ CustomerEmailSubscriptionStatusesEnum["SUBSCRIBED"] = "SUBSCRIBED";
21465
+ })(CustomerEmailSubscriptionStatusesEnum || (CustomerEmailSubscriptionStatusesEnum = {}));
20939
21466
  /**
20940
21467
  * Url Slug Target Type Enum Codes
20941
21468
  */
@@ -21015,6 +21542,22 @@ var OrderStatusEnum;
21015
21542
  OrderStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
21016
21543
  OrderStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
21017
21544
  })(OrderStatusEnum || (OrderStatusEnum = {}));
21545
+ /**
21546
+ * Payment Gateway Additional Price Type Enum
21547
+ */
21548
+ var PaymentGatewayAdditionalPriceTypeEnum;
21549
+ (function (PaymentGatewayAdditionalPriceTypeEnum) {
21550
+ PaymentGatewayAdditionalPriceTypeEnum["DECREMENT"] = "DECREMENT";
21551
+ PaymentGatewayAdditionalPriceTypeEnum["INCREMENT"] = "INCREMENT";
21552
+ })(PaymentGatewayAdditionalPriceTypeEnum || (PaymentGatewayAdditionalPriceTypeEnum = {}));
21553
+ /**
21554
+ * Payment Gateway Transaction Fee Type Enum
21555
+ */
21556
+ var PaymentGatewayTransactionFeeTypeEnum;
21557
+ (function (PaymentGatewayTransactionFeeTypeEnum) {
21558
+ PaymentGatewayTransactionFeeTypeEnum["AMOUNT"] = "AMOUNT";
21559
+ PaymentGatewayTransactionFeeTypeEnum["RATIO"] = "RATIO";
21560
+ })(PaymentGatewayTransactionFeeTypeEnum || (PaymentGatewayTransactionFeeTypeEnum = {}));
21018
21561
  /**
21019
21562
  * Payment Method Enum
21020
21563
  */
@@ -21087,6 +21630,12 @@ var ProductFilterTypeEnum;
21087
21630
  ProductFilterTypeEnum["TAG"] = "TAG";
21088
21631
  ProductFilterTypeEnum["VARIANT_TYPE"] = "VARIANT_TYPE";
21089
21632
  })(ProductFilterTypeEnum || (ProductFilterTypeEnum = {}));
21633
+ var ProductSearchShowStockOptionEnum;
21634
+ (function (ProductSearchShowStockOptionEnum) {
21635
+ ProductSearchShowStockOptionEnum["HIDE_OUT_OF_STOCK"] = "HIDE_OUT_OF_STOCK";
21636
+ ProductSearchShowStockOptionEnum["SHOW_ALL"] = "SHOW_ALL";
21637
+ ProductSearchShowStockOptionEnum["SHOW_OUT_OF_STOCK_AT_END"] = "SHOW_OUT_OF_STOCK_AT_END";
21638
+ })(ProductSearchShowStockOptionEnum || (ProductSearchShowStockOptionEnum = {}));
21090
21639
  /**
21091
21640
  * Shipping Method Enum
21092
21641
  */
@@ -21189,6 +21738,7 @@ var IkasProductList = /** @class */ (function () {
21189
21738
  var _this = this;
21190
21739
  this.filters = null;
21191
21740
  this._filterCategories = null;
21741
+ this._infiniteScrollPage = null;
21192
21742
  this._initialized = false;
21193
21743
  this._minPage = null;
21194
21744
  this._filterBrandId = null;
@@ -21199,12 +21749,12 @@ var IkasProductList = /** @class */ (function () {
21199
21749
  this.router = null;
21200
21750
  this.applyFilters = function () { return __awaiter(_this, void 0, void 0, function () {
21201
21751
  var resultsSet;
21202
- var _a, _b;
21203
- return __generator(this, function (_c) {
21204
- switch (_c.label) {
21752
+ var _a;
21753
+ return __generator(this, function (_b) {
21754
+ switch (_b.label) {
21205
21755
  case 0: return [4 /*yield*/, this.getInitial()];
21206
21756
  case 1:
21207
- resultsSet = _c.sent();
21757
+ resultsSet = _b.sent();
21208
21758
  if (![
21209
21759
  IkasThemePageType.CATEGORY,
21210
21760
  IkasThemePageType.BRAND,
@@ -21212,39 +21762,31 @@ var IkasProductList = /** @class */ (function () {
21212
21762
  ].includes(this._pageType))
21213
21763
  return [2 /*return*/];
21214
21764
  // Change url params
21215
- if (resultsSet && this.isBrowser()) {
21216
- if (this.isFiltered) {
21217
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (this.filterQueryParams ? "?" + this.filterQueryParams : ""), undefined, { shallow: true });
21218
- }
21219
- else {
21220
- (_b = this.router) === null || _b === void 0 ? void 0 : _b.replace("" + location.pathname, undefined, {
21221
- shallow: true,
21222
- });
21223
- }
21765
+ if (resultsSet && this.isBrowser() && !this.isSearch) {
21766
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (this.filterQueryParams ? "?" + this.filterQueryParams : ""), undefined, { shallow: true });
21224
21767
  }
21225
21768
  return [2 /*return*/];
21226
21769
  }
21227
21770
  });
21228
21771
  }); };
21229
21772
  this.getInitial = function (queryParams, isInfiteScrollReturn) { return __awaiter(_this, void 0, void 0, function () {
21230
- var fetchRequestTime, page, limit, response_1, data, err_1;
21231
- var _a;
21232
- return __generator(this, function (_b) {
21233
- switch (_b.label) {
21773
+ var fetchRequestTime, page, limit, productIdList, lastViewedProducts, response_1, data, idList, err_1;
21774
+ return __generator(this, function (_a) {
21775
+ switch (_a.label) {
21234
21776
  case 0:
21235
21777
  this._isLoading = true;
21236
21778
  fetchRequestTime = Date.now();
21237
21779
  this._fetchRequestTime = fetchRequestTime;
21238
- _b.label = 1;
21780
+ _a.label = 1;
21239
21781
  case 1:
21240
- _b.trys.push([1, 5, 6, 7]);
21782
+ _a.trys.push([1, 12, 13, 14]);
21241
21783
  page = isInfiteScrollReturn ? this._page : 1;
21242
21784
  limit = this._limit;
21243
21785
  if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
21244
21786
  return [4 /*yield*/, this.getFilters()];
21245
21787
  case 2:
21246
- _b.sent();
21247
- _b.label = 3;
21788
+ _a.sent();
21789
+ _a.label = 3;
21248
21790
  case 3:
21249
21791
  this.applyQueryParamFilters(queryParams);
21250
21792
  if (this.isSearch && !this.hasAppliedfilter) {
@@ -21255,27 +21797,48 @@ var IkasProductList = /** @class */ (function () {
21255
21797
  this._initialized = true;
21256
21798
  return [2 /*return*/, true];
21257
21799
  }
21258
- if (this.isStatic) {
21259
- page = undefined;
21260
- limit = undefined;
21261
- }
21262
- else if (this.isDiscounted) {
21263
- page = 1;
21264
- limit = 10;
21265
- }
21266
- else if (this.isRecommended) {
21267
- page = 1;
21268
- limit = 10;
21269
- }
21270
- return [4 /*yield*/, this.searchProducts(page || 1, limit || 10)];
21800
+ productIdList = void 0;
21801
+ if (!this.isStatic) return [3 /*break*/, 4];
21802
+ page = undefined;
21803
+ limit = undefined;
21804
+ return [3 /*break*/, 10];
21271
21805
  case 4:
21272
- response_1 = _b.sent();
21806
+ if (!this.isDiscounted) return [3 /*break*/, 5];
21807
+ page = 1;
21808
+ limit = 10;
21809
+ return [3 /*break*/, 10];
21810
+ case 5:
21811
+ if (!this.isRecommended) return [3 /*break*/, 6];
21812
+ page = 1;
21813
+ limit = 10;
21814
+ return [3 /*break*/, 10];
21815
+ case 6:
21816
+ if (!this.isLastViewed) return [3 /*break*/, 10];
21817
+ if (!this.isBrowser()) return [3 /*break*/, 9];
21818
+ return [4 /*yield*/, this.waitForCustomerStoreInit()];
21819
+ case 7:
21820
+ _a.sent();
21821
+ return [4 /*yield*/, IkasStorefrontConfig.store.customerStore.getLastViewedProducts()];
21822
+ case 8:
21823
+ lastViewedProducts = _a.sent();
21824
+ if (lastViewedProducts && lastViewedProducts.length) {
21825
+ productIdList = lastViewedProducts.map(function (p) { return p.productId; });
21826
+ }
21827
+ return [3 /*break*/, 10];
21828
+ case 9: return [2 /*return*/];
21829
+ case 10: return [4 /*yield*/, this.searchProducts(page || 1, limit || 10, productIdList)];
21830
+ case 11:
21831
+ response_1 = _a.sent();
21273
21832
  if (!response_1 || this._fetchRequestTime !== fetchRequestTime)
21274
21833
  return [2 /*return*/];
21275
21834
  data = [];
21276
- if (this.isStatic) {
21835
+ if (this.isStatic || this.isLastViewed) {
21836
+ idList = this.isStatic
21837
+ ? this._productListPropValue.productIds
21838
+ : //@ts-ignore
21839
+ IkasStorefrontConfig.store.customerStore._lastViewedProducts;
21277
21840
  data =
21278
- ((_a = this._productListPropValue.productIds) === null || _a === void 0 ? void 0 : _a.map(function (pID) {
21841
+ (idList === null || idList === void 0 ? void 0 : idList.map(function (pID) {
21279
21842
  var product = response_1.data.find(function (p) { return p.id === pID.productId; });
21280
21843
  var variant = product === null || product === void 0 ? void 0 : product.variants.find(function (v) { return v.id === pID.variantId; });
21281
21844
  if (product && variant)
@@ -21293,16 +21856,18 @@ var IkasProductList = /** @class */ (function () {
21293
21856
  this._initialized = true;
21294
21857
  this._page = page || 1;
21295
21858
  this._minPage = this.page;
21859
+ if (!isInfiteScrollReturn)
21860
+ this._infiniteScrollPage = null;
21296
21861
  return [2 /*return*/, true];
21297
- case 5:
21298
- err_1 = _b.sent();
21862
+ case 12:
21863
+ err_1 = _a.sent();
21299
21864
  console.log(err_1);
21300
- return [3 /*break*/, 7];
21301
- case 6:
21865
+ return [3 /*break*/, 14];
21866
+ case 13:
21302
21867
  if (fetchRequestTime === this._fetchRequestTime)
21303
21868
  this._isLoading = false;
21304
21869
  return [7 /*endfinally*/];
21305
- case 7: return [2 /*return*/];
21870
+ case 14: return [2 /*return*/];
21306
21871
  }
21307
21872
  });
21308
21873
  }); };
@@ -21314,6 +21879,7 @@ var IkasProductList = /** @class */ (function () {
21314
21879
  if (this.isStatic ||
21315
21880
  this.isDiscounted ||
21316
21881
  this.isRecommended ||
21882
+ this.isLastViewed ||
21317
21883
  this._isLoading ||
21318
21884
  !this.hasPrev)
21319
21885
  return [2 /*return*/];
@@ -21353,6 +21919,7 @@ var IkasProductList = /** @class */ (function () {
21353
21919
  if (this.isStatic ||
21354
21920
  this.isDiscounted ||
21355
21921
  this.isRecommended ||
21922
+ this.isLastViewed ||
21356
21923
  this._isLoading ||
21357
21924
  !this.hasNext)
21358
21925
  return [2 /*return*/];
@@ -21391,7 +21958,8 @@ var IkasProductList = /** @class */ (function () {
21391
21958
  if (this._isLoading ||
21392
21959
  this.isStatic ||
21393
21960
  this.isDiscounted ||
21394
- this.isRecommended)
21961
+ this.isRecommended ||
21962
+ this.isLastViewed)
21395
21963
  return [2 /*return*/];
21396
21964
  this._isLoading = true;
21397
21965
  _a.label = 1;
@@ -21421,6 +21989,13 @@ var IkasProductList = /** @class */ (function () {
21421
21989
  }
21422
21990
  });
21423
21991
  }); };
21992
+ this.setVisibleInfiniteScrollPage = function (page) {
21993
+ var _a;
21994
+ if (_this._infiniteScrollPage === page)
21995
+ return;
21996
+ _this._infiniteScrollPage = page;
21997
+ (_a = _this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (_this.filterQueryParams ? "?" + _this.filterQueryParams : ""), undefined, { shallow: true });
21998
+ };
21424
21999
  this.searchDebouncer = debounce_1(function () {
21425
22000
  _this.applyFilters();
21426
22001
  }, 100);
@@ -21461,7 +22036,7 @@ var IkasProductList = /** @class */ (function () {
21461
22036
  this.router = router;
21462
22037
  makeAutoObservable(this);
21463
22038
  if (this.isBrowser()) {
21464
- this.checkRestoreInfiniteScroll();
22039
+ this.restoreInfiniteScrollPage();
21465
22040
  if (location.search &&
21466
22041
  (this.isFilterable || this._type === IkasProductListType.SEARCH)) {
21467
22042
  var queryParams = this.getQueryParams();
@@ -21470,6 +22045,9 @@ var IkasProductList = /** @class */ (function () {
21470
22045
  else if (this._page > 1) {
21471
22046
  this.getInitial(undefined, true);
21472
22047
  }
22048
+ else if (this.isLastViewed) {
22049
+ this.getInitial();
22050
+ }
21473
22051
  }
21474
22052
  }
21475
22053
  Object.defineProperty(IkasProductList.prototype, "sort", {
@@ -21552,11 +22130,11 @@ var IkasProductList = /** @class */ (function () {
21552
22130
  });
21553
22131
  Object.defineProperty(IkasProductList.prototype, "isFiltered", {
21554
22132
  get: function () {
21555
- var _a;
22133
+ var _a, _b;
21556
22134
  return (((_a = this.filters) === null || _a === void 0 ? void 0 : _a.some(function (f) { return !!f.valueList.length; })) ||
21557
22135
  !!this._searchKeyword ||
21558
22136
  (this._pageType !== IkasThemePageType.CATEGORY &&
21559
- !!this._filterCategoryId));
22137
+ (!!this._filterCategoryId || ((_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.some(function (fc) { return fc.isSelected; })))));
21560
22138
  },
21561
22139
  enumerable: false,
21562
22140
  configurable: true
@@ -21582,6 +22160,13 @@ var IkasProductList = /** @class */ (function () {
21582
22160
  enumerable: false,
21583
22161
  configurable: true
21584
22162
  });
22163
+ Object.defineProperty(IkasProductList.prototype, "isLastViewed", {
22164
+ get: function () {
22165
+ return this._type === IkasProductListType.LAST_VIEWED;
22166
+ },
22167
+ enumerable: false,
22168
+ configurable: true
22169
+ });
21585
22170
  Object.defineProperty(IkasProductList.prototype, "isSearch", {
21586
22171
  get: function () {
21587
22172
  return this._type === IkasProductListType.SEARCH;
@@ -21620,18 +22205,27 @@ var IkasProductList = /** @class */ (function () {
21620
22205
  Object.defineProperty(IkasProductList.prototype, "filterQueryParams", {
21621
22206
  get: function () {
21622
22207
  var _this = this;
21623
- var _a, _b, _c;
22208
+ var _a, _b, _c, _d;
21624
22209
  var queryParams = {};
21625
22210
  (_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (f) {
21626
- queryParams[f.key] = f.keyList;
22211
+ if (f.keyList.length)
22212
+ queryParams[f.key] = f.keyList;
21627
22213
  });
21628
22214
  if (this._searchKeyword)
21629
22215
  queryParams.s = this._searchKeyword;
21630
- if (this._pageType !== IkasThemePageType.CATEGORY &&
21631
- this._filterCategoryId) {
21632
- var slug = (_c = (_b = this.filterCategories) === null || _b === void 0 ? void 0 : _b.find(function (fc) { return fc.id === _this._filterCategoryId; })) === null || _c === void 0 ? void 0 : _c.slug;
21633
- if (slug)
21634
- queryParams.c = slug;
22216
+ if (this._infiniteScrollPage)
22217
+ queryParams.page = this._infiniteScrollPage;
22218
+ if (this._pageType !== IkasThemePageType.CATEGORY) {
22219
+ var selectedCategories = (_b = this.filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; });
22220
+ var hasSelectedCategory = !!(selectedCategories === null || selectedCategories === void 0 ? void 0 : selectedCategories.length);
22221
+ if (hasSelectedCategory) {
22222
+ queryParams.c = selectedCategories === null || selectedCategories === void 0 ? void 0 : selectedCategories.map(function (sc) { return sc.slug; });
22223
+ }
22224
+ else if (this._filterCategoryId) {
22225
+ var slug = (_d = (_c = this.filterCategories) === null || _c === void 0 ? void 0 : _c.find(function (fc) { return fc.id === _this._filterCategoryId; })) === null || _d === void 0 ? void 0 : _d.slug;
22226
+ if (slug)
22227
+ queryParams.c = slug;
22228
+ }
21635
22229
  }
21636
22230
  return queryString.stringify(queryParams, { arrayFormat: "comma" });
21637
22231
  },
@@ -21696,12 +22290,12 @@ var IkasProductList = /** @class */ (function () {
21696
22290
  type: type,
21697
22291
  };
21698
22292
  };
21699
- IkasProductList.prototype.searchProducts = function (page, limit) {
21700
- var _a, _b;
22293
+ IkasProductList.prototype.searchProducts = function (page, limit, productIdList) {
22294
+ var _a, _b, _c;
21701
22295
  return __awaiter(this, void 0, void 0, function () {
21702
- var filterList;
21703
- return __generator(this, function (_c) {
21704
- switch (_c.label) {
22296
+ var filterList, selectedCategoryIds;
22297
+ return __generator(this, function (_d) {
22298
+ switch (_d.label) {
21705
22299
  case 0:
21706
22300
  filterList = [];
21707
22301
  if (this._filterBrandId) {
@@ -21720,40 +22314,51 @@ var IkasProductList = /** @class */ (function () {
21720
22314
  }));
21721
22315
  }
21722
22316
  });
22317
+ selectedCategoryIds = (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; }).map(function (fc) { return fc.id; });
21723
22318
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
21724
22319
  page: page,
21725
22320
  perPage: limit,
21726
22321
  productIdList: this.isStatic
21727
- ? (_b = this._productListPropValue.productIds) === null || _b === void 0 ? void 0 : _b.map(function (p) { return p.productId; }) : undefined,
22322
+ ? (_c = this._productListPropValue.productIds) === null || _c === void 0 ? void 0 : _c.map(function (p) { return p.productId; }) : productIdList,
21728
22323
  filterList: filterList,
21729
22324
  brandId: this._pageType === IkasThemePageType.BRAND &&
21730
22325
  this._type !== IkasProductListType.SEARCH
21731
22326
  ? this._filterBrandId
21732
22327
  : undefined,
21733
- categoryIdList: this._filterCategoryId
21734
- ? [this._filterCategoryId]
21735
- : undefined,
22328
+ categoryIdList: selectedCategoryIds && selectedCategoryIds.length
22329
+ ? selectedCategoryIds
22330
+ : this._filterCategoryId
22331
+ ? [this._filterCategoryId]
22332
+ : undefined,
21736
22333
  priceListId: IkasStorefrontConfig.priceListId,
21737
22334
  salesChannelId: IkasStorefrontConfig.salesChannelId,
21738
22335
  query: this._searchKeyword,
21739
22336
  order: [this.getSortParams()],
21740
22337
  })];
21741
- case 1: return [2 /*return*/, _c.sent()];
22338
+ case 1: return [2 /*return*/, _d.sent()];
21742
22339
  }
21743
22340
  });
21744
22341
  });
21745
22342
  };
21746
22343
  IkasProductList.prototype.getFilters = function () {
22344
+ var _a;
21747
22345
  return __awaiter(this, void 0, void 0, function () {
21748
- var getFiltersResponse;
22346
+ var getFiltersResponse, filterCategory;
21749
22347
  var _this = this;
21750
- return __generator(this, function (_a) {
21751
- switch (_a.label) {
22348
+ return __generator(this, function (_b) {
22349
+ switch (_b.label) {
21752
22350
  case 0: return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData(this._filterCategoryId ? this._filterCategoryId : undefined)];
21753
22351
  case 1:
21754
- getFiltersResponse = _a.sent();
22352
+ getFiltersResponse = _b.sent();
21755
22353
  this.filters = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.filters.map(function (f) { return new IkasProductFilter(f, _this); });
21756
22354
  this._filterCategories = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.categories;
22355
+ if (this.pageType !== IkasThemePageType.CATEGORY &&
22356
+ this._filterCategoryId) {
22357
+ filterCategory = (_a = this._filterCategories) === null || _a === void 0 ? void 0 : _a.find(function (fc) { return fc.id === _this._filterCategoryId; });
22358
+ //@ts-ignore
22359
+ if (filterCategory)
22360
+ filterCategory._isSelected = true;
22361
+ }
21757
22362
  if (this.filters)
21758
22363
  this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
21759
22364
  return [2 /*return*/];
@@ -21776,12 +22381,13 @@ var IkasProductList = /** @class */ (function () {
21776
22381
  if (querySearch)
21777
22382
  this._searchKeyword = querySearch;
21778
22383
  if (this._pageType !== IkasThemePageType.CATEGORY) {
21779
- var queryCategory_1 = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("c");
21780
- if (queryCategory_1) {
21781
- var filterCategory = (_a = this.filterCategories) === null || _a === void 0 ? void 0 : _a.find(function (fc) { return fc.slug === queryCategory_1; });
21782
- if (filterCategory) {
21783
- this._filterCategoryId = filterCategory.id;
21784
- }
22384
+ var queryCategory = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("c");
22385
+ var categorySlugs_1 = queryCategory === null || queryCategory === void 0 ? void 0 : queryCategory.split(",");
22386
+ if (categorySlugs_1 && categorySlugs_1.length) {
22387
+ (_a = this.filterCategories) === null || _a === void 0 ? void 0 : _a.forEach(function (fc) {
22388
+ //@ts-ignore
22389
+ fc._isSelected = categorySlugs_1.some(function (slug) { return slug === fc.slug; });
22390
+ });
21785
22391
  }
21786
22392
  }
21787
22393
  }
@@ -21827,11 +22433,13 @@ var IkasProductList = /** @class */ (function () {
21827
22433
  }
21828
22434
  };
21829
22435
  IkasProductList.prototype.clearFilters = function () {
21830
- var _a;
22436
+ var _a, _b;
21831
22437
  (_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (filter) { return filter.clear(); });
21832
22438
  this._searchKeyword = "";
21833
22439
  if (this._pageType !== IkasThemePageType.CATEGORY) {
21834
22440
  this._filterCategoryId = undefined;
22441
+ //@ts-ignore
22442
+ (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.forEach(function (fc) { return (fc._isSelected = false); });
21835
22443
  }
21836
22444
  this.applyFilters();
21837
22445
  };
@@ -21850,32 +22458,32 @@ var IkasProductList = /** @class */ (function () {
21850
22458
  });
21851
22459
  };
21852
22460
  IkasProductList.prototype.onFilterCategoryClick = function (filterCategory, disableRoute) {
21853
- var _a;
22461
+ var _a, _b;
21854
22462
  if (disableRoute === void 0) { disableRoute = false; }
21855
22463
  return __awaiter(this, void 0, void 0, function () {
21856
- return __generator(this, function (_b) {
21857
- switch (_b.label) {
22464
+ return __generator(this, function (_c) {
22465
+ switch (_c.label) {
21858
22466
  case 0:
21859
22467
  if (!disableRoute) return [3 /*break*/, 2];
21860
- this._filterCategoryId = filterCategory.id;
22468
+ (_a = this._filterCategories) === null || _a === void 0 ? void 0 : _a.forEach(function (fc) {
22469
+ if (fc.id === filterCategory.id) {
22470
+ //@ts-ignore
22471
+ fc._isSelected = !fc.isSelected;
22472
+ }
22473
+ });
21861
22474
  return [4 /*yield*/, this.applyFilters()];
21862
22475
  case 1:
21863
- _b.sent();
22476
+ _c.sent();
21864
22477
  return [3 /*break*/, 3];
21865
22478
  case 2:
21866
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href +
22479
+ (_b = this.router) === null || _b === void 0 ? void 0 : _b.push(filterCategory.href +
21867
22480
  (this.filterQueryParams ? "?" + this.filterQueryParams : ""));
21868
- _b.label = 3;
22481
+ _c.label = 3;
21869
22482
  case 3: return [2 /*return*/];
21870
22483
  }
21871
22484
  });
21872
22485
  });
21873
22486
  };
21874
- IkasProductList.prototype.setVisibleInfiniteScrollPage = function (page) {
21875
- //@ts-ignore
21876
- var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
21877
- infiniteScrollPages[this._productListPropValue.id] = page;
21878
- };
21879
22487
  IkasProductList.prototype.toJSON = function () {
21880
22488
  return {
21881
22489
  data: this.data,
@@ -21896,22 +22504,17 @@ var IkasProductList = /** @class */ (function () {
21896
22504
  productListPropValue: this._productListPropValue,
21897
22505
  };
21898
22506
  };
21899
- IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
21900
- //@ts-ignore
21901
- var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
21902
- var page = infiniteScrollPages[this._productListPropValue.id];
21903
- if (page) {
21904
- if (this.hasForwardRoute()) {
22507
+ IkasProductList.prototype.restoreInfiniteScrollPage = function () {
22508
+ var queryParams = this.getQueryParams();
22509
+ var pageStr = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("page");
22510
+ if (pageStr) {
22511
+ var page = parseInt(pageStr);
22512
+ if (!isNaN(page)) {
21905
22513
  this._page = page;
21906
- }
21907
- else {
21908
- delete infiniteScrollPages[this._productListPropValue.id];
22514
+ this._infiniteScrollPage = page;
21909
22515
  }
21910
22516
  }
21911
22517
  };
21912
- IkasProductList.prototype.hasForwardRoute = function () {
21913
- return this.isBrowser() && !!window.history.forward;
21914
- };
21915
22518
  IkasProductList.prototype.getQueryParams = function () {
21916
22519
  if (!this.isBrowser())
21917
22520
  return;
@@ -21920,6 +22523,16 @@ var IkasProductList = /** @class */ (function () {
21920
22523
  IkasProductList.prototype.isBrowser = function () {
21921
22524
  return typeof window !== "undefined";
21922
22525
  };
22526
+ IkasProductList.prototype.waitForCustomerStoreInit = function () {
22527
+ return new Promise(function (resolve) {
22528
+ var interval = setInterval(function () {
22529
+ if (IkasStorefrontConfig.store.customerStore.initialized) {
22530
+ clearInterval(interval);
22531
+ resolve(null);
22532
+ }
22533
+ }, 1000);
22534
+ });
22535
+ };
21923
22536
  return IkasProductList;
21924
22537
  }());
21925
22538
  var IkasProductListType;
@@ -21930,6 +22543,7 @@ var IkasProductListType;
21930
22543
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
21931
22544
  IkasProductListType["CATEGORY"] = "CATEGORY";
21932
22545
  IkasProductListType["SEARCH"] = "SEARCH";
22546
+ IkasProductListType["LAST_VIEWED"] = "LAST_VIEWED";
21933
22547
  })(IkasProductListType || (IkasProductListType = {}));
21934
22548
  var IkasProductListSortType;
21935
22549
  (function (IkasProductListSortType) {
@@ -24120,74 +24734,99 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
24120
24734
  IkasLinkPropValueProvider.prototype.getNavigationLink = function (linkPropValue) {
24121
24735
  var _a, _b;
24122
24736
  return __awaiter(this, void 0, void 0, function () {
24123
- var navigationLink, themePage, metaDataList, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
24737
+ var navigationLink, themePage, metaDataList, metaDataList, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
24124
24738
  var _this = this;
24125
24739
  return __generator(this, function (_d) {
24126
24740
  switch (_d.label) {
24127
24741
  case 0:
24128
- if (!(linkPropValue.linkType === IkasLinkType.PAGE)) return [3 /*break*/, 12];
24742
+ if (!(linkPropValue.linkType === IkasLinkType.PAGE)) return [3 /*break*/, 18];
24129
24743
  if (!(linkPropValue.pageType === IkasThemePageType.INDEX)) return [3 /*break*/, 1];
24130
24744
  navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
24131
- return [3 /*break*/, 11];
24745
+ return [3 /*break*/, 17];
24132
24746
  case 1:
24133
24747
  if (!(linkPropValue.pageType === IkasThemePageType.ACCOUNT)) return [3 /*break*/, 2];
24134
24748
  navigationLink = new IkasNavigationLink("/account/info", linkPropValue.label || "", []);
24135
- return [3 /*break*/, 11];
24749
+ return [3 /*break*/, 17];
24136
24750
  case 2:
24137
24751
  if (!(linkPropValue.pageType === IkasThemePageType.ADDRESSES)) return [3 /*break*/, 3];
24138
24752
  navigationLink = new IkasNavigationLink("/account/addresses", linkPropValue.label || "", []);
24139
- return [3 /*break*/, 11];
24753
+ return [3 /*break*/, 17];
24140
24754
  case 3:
24141
24755
  if (!(linkPropValue.pageType === IkasThemePageType.ORDERS)) return [3 /*break*/, 4];
24142
24756
  navigationLink = new IkasNavigationLink("/account/orders", linkPropValue.label || "", []);
24143
- return [3 /*break*/, 11];
24757
+ return [3 /*break*/, 17];
24144
24758
  case 4:
24145
- if (!(linkPropValue.pageType === IkasThemePageType.LOGIN)) return [3 /*break*/, 5];
24146
- navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
24147
- return [3 /*break*/, 11];
24759
+ if (!(linkPropValue.pageType === IkasThemePageType.FAVORITE_PRODUCTS)) return [3 /*break*/, 5];
24760
+ navigationLink = new IkasNavigationLink("/account/favorite-products", linkPropValue.label || "", []);
24761
+ return [3 /*break*/, 17];
24148
24762
  case 5:
24149
- if (!(linkPropValue.pageType === IkasThemePageType.REGISTER)) return [3 /*break*/, 6];
24150
- navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
24151
- return [3 /*break*/, 11];
24763
+ if (!(linkPropValue.pageType === IkasThemePageType.LOGIN)) return [3 /*break*/, 6];
24764
+ navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
24765
+ return [3 /*break*/, 17];
24152
24766
  case 6:
24153
- if (!(linkPropValue.pageType === IkasThemePageType.FORGOT_PASSWORD)) return [3 /*break*/, 7];
24154
- navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
24155
- return [3 /*break*/, 11];
24767
+ if (!(linkPropValue.pageType === IkasThemePageType.REGISTER)) return [3 /*break*/, 7];
24768
+ navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
24769
+ return [3 /*break*/, 17];
24156
24770
  case 7:
24157
- if (!(linkPropValue.pageType === IkasThemePageType.RECOVER_PASSWORD)) return [3 /*break*/, 8];
24158
- navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
24159
- return [3 /*break*/, 11];
24771
+ if (!(linkPropValue.pageType === IkasThemePageType.FORGOT_PASSWORD)) return [3 /*break*/, 8];
24772
+ navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
24773
+ return [3 /*break*/, 17];
24160
24774
  case 8:
24161
- if (!(linkPropValue.pageType === IkasThemePageType.CUSTOM)) return [3 /*break*/, 9];
24775
+ if (!(linkPropValue.pageType === IkasThemePageType.RECOVER_PASSWORD)) return [3 /*break*/, 9];
24776
+ navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
24777
+ return [3 /*break*/, 17];
24778
+ case 9:
24779
+ if (!(linkPropValue.pageType === IkasThemePageType.BLOG_INDEX)) return [3 /*break*/, 10];
24780
+ navigationLink = new IkasNavigationLink("/blog", linkPropValue.label || "", []);
24781
+ return [3 /*break*/, 17];
24782
+ case 10:
24783
+ if (!(linkPropValue.pageType === IkasThemePageType.CART)) return [3 /*break*/, 11];
24784
+ navigationLink = new IkasNavigationLink("/cart", linkPropValue.label || "", []);
24785
+ return [3 /*break*/, 17];
24786
+ case 11:
24787
+ if (!(linkPropValue.pageType === IkasThemePageType.SEARCH)) return [3 /*break*/, 12];
24788
+ navigationLink = new IkasNavigationLink("/search", linkPropValue.label || "", []);
24789
+ return [3 /*break*/, 17];
24790
+ case 12:
24791
+ if (!(linkPropValue.pageType === IkasThemePageType.CUSTOM)) return [3 /*break*/, 13];
24162
24792
  themePage = this.theme.pages.find(function (p) { return p.id === linkPropValue.pageId; });
24163
24793
  if (themePage) {
24164
24794
  navigationLink = new IkasNavigationLink("/pages/" + themePage.slug, linkPropValue.label || "", []);
24165
24795
  }
24166
- return [3 /*break*/, 11];
24167
- case 9:
24796
+ return [3 /*break*/, 17];
24797
+ case 13:
24168
24798
  if (![
24169
24799
  IkasThemePageType.PRODUCT,
24170
24800
  IkasThemePageType.BRAND,
24171
24801
  IkasThemePageType.CATEGORY,
24172
- ].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
24802
+ ].includes(linkPropValue.pageType)) return [3 /*break*/, 15];
24173
24803
  return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
24174
- case 10:
24804
+ case 14:
24175
24805
  metaDataList = _d.sent();
24176
24806
  if (metaDataList.length) {
24177
24807
  navigationLink = new IkasNavigationLink("/" + metaDataList[0].slug, linkPropValue.label || "", []);
24178
24808
  }
24179
- _d.label = 11;
24180
- case 11: return [3 /*break*/, 13];
24181
- case 12:
24809
+ return [3 /*break*/, 17];
24810
+ case 15:
24811
+ if (![IkasThemePageType.BLOG, IkasThemePageType.BLOG_CATEGORY].includes(linkPropValue.pageType)) return [3 /*break*/, 17];
24812
+ return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(undefined, linkPropValue.itemId || undefined)];
24813
+ case 16:
24814
+ metaDataList = _d.sent();
24815
+ if (metaDataList.length) {
24816
+ navigationLink = new IkasNavigationLink("/blog/" + metaDataList[0].slug, linkPropValue.label || "", []);
24817
+ }
24818
+ _d.label = 17;
24819
+ case 17: return [3 /*break*/, 19];
24820
+ case 18:
24182
24821
  if (linkPropValue.linkType === IkasLinkType.EXTERNAL) {
24183
24822
  navigationLink = new IkasNavigationLink(linkPropValue.externalLink || "", linkPropValue.label || "", [], true);
24184
24823
  }
24185
- _d.label = 13;
24186
- case 13:
24187
- if (!navigationLink) return [3 /*break*/, 15];
24824
+ _d.label = 19;
24825
+ case 19:
24826
+ if (!navigationLink) return [3 /*break*/, 21];
24188
24827
  _c = navigationLink;
24189
24828
  return [4 /*yield*/, Promise.all(linkPropValue.subLinks.map(function (sl) { return _this.getNavigationLink(sl); }))];
24190
- case 14:
24829
+ case 20:
24191
24830
  _c.subLinks = _d.sent();
24192
24831
  // ADD HASH LINK
24193
24832
  if (linkPropValue.pageComponentId && linkPropValue.pageId) {
@@ -24204,7 +24843,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
24204
24843
  }
24205
24844
  }
24206
24845
  return [2 /*return*/, navigationLink];
24207
- case 15: return [2 /*return*/, new IkasNavigationLink("", "", [])];
24846
+ case 21: return [2 /*return*/, new IkasNavigationLink("", "", [])];
24208
24847
  }
24209
24848
  });
24210
24849
  });
@@ -24270,13 +24909,13 @@ var IkasColorPropValueProvider = /** @class */ (function () {
24270
24909
  }());
24271
24910
 
24272
24911
  var IkasBooleanPropValueProvider = /** @class */ (function () {
24273
- function IkasBooleanPropValueProvider(textPropValue) {
24274
- this.bool = textPropValue;
24912
+ function IkasBooleanPropValueProvider(boolPropValue) {
24913
+ this.bool = boolPropValue;
24275
24914
  }
24276
24915
  IkasBooleanPropValueProvider.prototype.getValue = function () {
24277
24916
  return __awaiter(this, void 0, void 0, function () {
24278
24917
  return __generator(this, function (_a) {
24279
- return [2 /*return*/, this.bool];
24918
+ return [2 /*return*/, this.bool || false];
24280
24919
  });
24281
24920
  });
24282
24921
  };
@@ -24447,130 +25086,276 @@ var IkasBlogListPropValueProvider = /** @class */ (function () {
24447
25086
  return IkasBlogListPropValueProvider;
24448
25087
  }());
24449
25088
 
24450
- var IkasCustomPropValueProvider = /** @class */ (function () {
24451
- function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
24452
- this.value = value;
24453
- this.customData = customData;
24454
- this.theme = theme;
24455
- this.pageType = pageType;
24456
- this.pageDataProvider = pageDataProvider;
25089
+ var IkasAttributePropValueProvider = /** @class */ (function () {
25090
+ function IkasAttributePropValueProvider(prop, pageSpecificData) {
25091
+ this.attributePropValue = prop;
24457
25092
  this.pageSpecificData = pageSpecificData;
24458
- this.pageParams = pageParams;
24459
25093
  }
24460
- IkasCustomPropValueProvider.prototype.getValue = function () {
25094
+ IkasAttributePropValueProvider.prototype.getValue = function () {
25095
+ var _a;
24461
25096
  return __awaiter(this, void 0, void 0, function () {
24462
- var customDataValue, _a;
25097
+ var productDetail, productSearchResponse, productList, product, variant;
25098
+ var _this = this;
24463
25099
  return __generator(this, function (_b) {
24464
25100
  switch (_b.label) {
24465
25101
  case 0:
24466
- if (this.value === undefined || this.value === null)
24467
- return [2 /*return*/];
24468
- _b.label = 1;
24469
- case 1:
24470
- _b.trys.push([1, 40, , 41]);
24471
- _a = this.customData.type;
24472
- switch (_a) {
24473
- case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
24474
- case IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 4];
24475
- case IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 6];
24476
- case IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 8];
24477
- case IkasThemeComponentPropType.BRAND: return [3 /*break*/, 10];
24478
- case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
24479
- case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 14];
24480
- case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 16];
24481
- case IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 18];
24482
- case IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 20];
24483
- case IkasThemeComponentPropType.LINK: return [3 /*break*/, 22];
24484
- case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 22];
24485
- case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 24];
24486
- case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 26];
24487
- case IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 28];
24488
- case IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 30];
24489
- case IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 30];
24490
- case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 32];
24491
- case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 32];
24492
- case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 34];
24493
- case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 36];
24494
- }
24495
- return [3 /*break*/, 38];
25102
+ if (!this.attributePropValue.attributeId ||
25103
+ (this.attributePropValue.usePageData && !this.pageSpecificData) ||
25104
+ (!this.attributePropValue.usePageData &&
25105
+ !this.attributePropValue.variantId)) {
25106
+ return [2 /*return*/, []];
25107
+ }
25108
+ if (!((_a = this.attributePropValue) === null || _a === void 0 ? void 0 : _a.usePageData)) return [3 /*break*/, 1];
25109
+ productDetail = this.pageSpecificData;
25110
+ return [3 /*break*/, 3];
25111
+ case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25112
+ productIdList: [this.attributePropValue.productId],
25113
+ priceListId: IkasStorefrontConfig.priceListId,
25114
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
25115
+ })];
25116
+ case 2:
25117
+ productSearchResponse = _b.sent();
25118
+ if (productSearchResponse) {
25119
+ productList = productSearchResponse.data;
25120
+ if (productList.length) {
25121
+ product = productList[0];
25122
+ if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25123
+ variant = product.variants.find(function (v) { return v.id === _this.attributePropValue.variantId; });
25124
+ if (variant) {
25125
+ productDetail = new IkasProductDetail(product, variant.variantValues);
25126
+ }
25127
+ }
25128
+ else {
25129
+ productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25130
+ }
25131
+ }
25132
+ }
25133
+ _b.label = 3;
25134
+ case 3:
25135
+ if (!productDetail)
25136
+ return [2 /*return*/, []];
25137
+ return [2 /*return*/, productDetail.product.hasVariant
25138
+ ? productDetail.selectedVariant.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })
25139
+ : productDetail.product.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })];
25140
+ }
25141
+ });
25142
+ });
25143
+ };
25144
+ return IkasAttributePropValueProvider;
25145
+ }());
25146
+
25147
+ var IkasAttributeListPropValueProvider = /** @class */ (function () {
25148
+ function IkasAttributeListPropValueProvider(prop, pageSpecificData) {
25149
+ this.attributeListPropValue = prop;
25150
+ this.pageSpecificData = pageSpecificData;
25151
+ }
25152
+ IkasAttributeListPropValueProvider.prototype.getValue = function () {
25153
+ var _a, _b;
25154
+ return __awaiter(this, void 0, void 0, function () {
25155
+ var productDetail, productSearchResponse, productList, product, variant, groupedValues;
25156
+ var _this = this;
25157
+ return __generator(this, function (_c) {
25158
+ switch (_c.label) {
25159
+ case 0:
25160
+ if (!((_a = this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.length) ||
25161
+ (this.attributeListPropValue.usePageData && !this.pageSpecificData) ||
25162
+ (!this.attributeListPropValue.usePageData &&
25163
+ !this.attributeListPropValue.variantId)) {
25164
+ return [2 /*return*/, []];
25165
+ }
25166
+ if (!((_b = this.attributeListPropValue) === null || _b === void 0 ? void 0 : _b.usePageData)) return [3 /*break*/, 1];
25167
+ productDetail = this.pageSpecificData;
25168
+ return [3 /*break*/, 3];
25169
+ case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25170
+ productIdList: [this.attributeListPropValue.productId],
25171
+ priceListId: IkasStorefrontConfig.priceListId,
25172
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
25173
+ })];
25174
+ case 2:
25175
+ productSearchResponse = _c.sent();
25176
+ if (productSearchResponse) {
25177
+ productList = productSearchResponse.data;
25178
+ if (productList.length) {
25179
+ product = productList[0];
25180
+ if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25181
+ variant = product.variants.find(function (v) { return v.id === _this.attributeListPropValue.variantId; });
25182
+ if (variant) {
25183
+ productDetail = new IkasProductDetail(product, variant.variantValues);
25184
+ }
25185
+ }
25186
+ else {
25187
+ productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25188
+ }
25189
+ }
25190
+ }
25191
+ _c.label = 3;
25192
+ case 3:
25193
+ if (!productDetail)
25194
+ return [2 /*return*/, []];
25195
+ groupedValues = productDetail.product.hasVariant
25196
+ ? groupBy_1(productDetail.selectedVariant.attributes.filter(function (a) { var _a; return (_a = _this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.includes(a.productAttributeId || ""); }), "productAttributeId")
25197
+ : groupBy_1(productDetail.product.attributes.filter(function (a) { var _a; return (_a = _this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.includes(a.productAttributeId || ""); }), "productAttributeId");
25198
+ return [2 /*return*/, this.attributeListPropValue.attributeIds
25199
+ .map(function (attributeId) {
25200
+ var values = groupedValues[attributeId];
25201
+ if ((values === null || values === void 0 ? void 0 : values.length) && values[0].productAttribute)
25202
+ return {
25203
+ attribute: values[0].productAttribute,
25204
+ values: values,
25205
+ };
25206
+ })
25207
+ .filter(function (v) { return !!v; })];
25208
+ }
25209
+ });
25210
+ });
25211
+ };
25212
+ return IkasAttributeListPropValueProvider;
25213
+ }());
25214
+
25215
+ var IkasCustomPropValueProvider = /** @class */ (function () {
25216
+ function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
25217
+ this.value = value;
25218
+ this.customData = customData;
25219
+ this.theme = theme;
25220
+ this.pageType = pageType;
25221
+ this.pageDataProvider = pageDataProvider;
25222
+ this.pageSpecificData = pageSpecificData;
25223
+ this.pageParams = pageParams;
25224
+ }
25225
+ IkasCustomPropValueProvider.prototype.getValue = function () {
25226
+ return __awaiter(this, void 0, void 0, function () {
25227
+ var customDataValue, _a;
25228
+ return __generator(this, function (_b) {
25229
+ switch (_b.label) {
25230
+ case 0:
25231
+ if (this.value === undefined || this.value === null)
25232
+ return [2 /*return*/];
25233
+ _b.label = 1;
25234
+ case 1:
25235
+ _b.trys.push([1, 48, , 49]);
25236
+ _a = this.customData.type;
25237
+ switch (_a) {
25238
+ case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
25239
+ case IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 4];
25240
+ case IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 6];
25241
+ case IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 8];
25242
+ case IkasThemeComponentPropType.BRAND: return [3 /*break*/, 10];
25243
+ case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
25244
+ case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 14];
25245
+ case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 16];
25246
+ case IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 18];
25247
+ case IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 20];
25248
+ case IkasThemeComponentPropType.LINK: return [3 /*break*/, 22];
25249
+ case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 22];
25250
+ case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 24];
25251
+ case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 26];
25252
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE: return [3 /*break*/, 28];
25253
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST: return [3 /*break*/, 30];
25254
+ case IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
25255
+ case IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
25256
+ case IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 34];
25257
+ case IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
25258
+ case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
25259
+ case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
25260
+ case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
25261
+ case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
25262
+ case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
25263
+ }
25264
+ return [3 /*break*/, 46];
24496
25265
  case 2: return [4 /*yield*/, this.getTextValue()];
24497
25266
  case 3:
24498
25267
  customDataValue = _b.sent();
24499
- return [3 /*break*/, 39];
25268
+ return [3 /*break*/, 47];
24500
25269
  case 4: return [4 /*yield*/, this.getRichTextPropValue()];
24501
25270
  case 5:
24502
25271
  customDataValue = _b.sent();
24503
- return [3 /*break*/, 39];
25272
+ return [3 /*break*/, 47];
24504
25273
  case 6: return [4 /*yield*/, this.getBooleanValue()];
24505
25274
  case 7:
24506
25275
  customDataValue = _b.sent();
24507
- return [3 /*break*/, 39];
25276
+ return [3 /*break*/, 47];
24508
25277
  case 8: return [4 /*yield*/, this.getBrandListPropValue()];
24509
25278
  case 9:
24510
25279
  customDataValue = _b.sent();
24511
- return [3 /*break*/, 39];
25280
+ return [3 /*break*/, 47];
24512
25281
  case 10: return [4 /*yield*/, this.getBrandPropValue()];
24513
25282
  case 11:
24514
25283
  customDataValue = _b.sent();
24515
- return [3 /*break*/, 39];
25284
+ return [3 /*break*/, 47];
24516
25285
  case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
24517
25286
  case 13:
24518
25287
  customDataValue = _b.sent();
24519
- return [3 /*break*/, 39];
25288
+ return [3 /*break*/, 47];
24520
25289
  case 14: return [4 /*yield*/, this.getCategoryPropValue()];
24521
25290
  case 15:
24522
25291
  customDataValue = _b.sent();
24523
- return [3 /*break*/, 39];
25292
+ return [3 /*break*/, 47];
24524
25293
  case 16: return [4 /*yield*/, this.getColorPropValue()];
24525
25294
  case 17:
24526
25295
  customDataValue = _b.sent();
24527
- return [3 /*break*/, 39];
25296
+ return [3 /*break*/, 47];
24528
25297
  case 18: return [4 /*yield*/, this.getImageListPropValue()];
24529
25298
  case 19:
24530
25299
  customDataValue = _b.sent();
24531
- return [3 /*break*/, 39];
25300
+ return [3 /*break*/, 47];
24532
25301
  case 20: return [4 /*yield*/, this.getImagePropValue()];
24533
25302
  case 21:
24534
25303
  customDataValue = _b.sent();
24535
- return [3 /*break*/, 39];
25304
+ return [3 /*break*/, 47];
24536
25305
  case 22: return [4 /*yield*/, this.getLinkPropValue()];
24537
25306
  case 23:
24538
25307
  customDataValue = _b.sent();
24539
- return [3 /*break*/, 39];
25308
+ return [3 /*break*/, 47];
24540
25309
  case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
24541
25310
  case 25:
24542
25311
  customDataValue = _b.sent();
24543
- return [3 /*break*/, 39];
25312
+ return [3 /*break*/, 47];
24544
25313
  case 26: return [4 /*yield*/, this.getProductListPropValue()];
24545
25314
  case 27:
24546
25315
  customDataValue = _b.sent();
24547
- return [3 /*break*/, 39];
24548
- case 28: return [4 /*yield*/, this.getObjectValue()];
25316
+ return [3 /*break*/, 47];
25317
+ case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
24549
25318
  case 29:
24550
25319
  customDataValue = _b.sent();
24551
- return [3 /*break*/, 39];
24552
- case 30: return [4 /*yield*/, this.getArrayValue()];
25320
+ return [3 /*break*/, 47];
25321
+ case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
24553
25322
  case 31:
24554
25323
  customDataValue = _b.sent();
24555
- return [3 /*break*/, 39];
24556
- case 32: return [4 /*yield*/, this.getComponentListValue()];
25324
+ return [3 /*break*/, 47];
25325
+ case 32: return [4 /*yield*/, this.getObjectValue()];
24557
25326
  case 33:
24558
25327
  customDataValue = _b.sent();
24559
- return [3 /*break*/, 39];
24560
- case 34: return [4 /*yield*/, this.getBlogValue()];
25328
+ return [3 /*break*/, 47];
25329
+ case 34: return [4 /*yield*/, this.getArrayValue()];
24561
25330
  case 35:
24562
25331
  customDataValue = _b.sent();
24563
- return [3 /*break*/, 39];
24564
- case 36: return [4 /*yield*/, this.getBlogListValue()];
25332
+ return [3 /*break*/, 47];
25333
+ case 36: return [4 /*yield*/, this.getEnumValue()];
24565
25334
  case 37:
24566
25335
  customDataValue = _b.sent();
24567
- return [3 /*break*/, 39];
24568
- case 38: return [3 /*break*/, 39];
24569
- case 39: return [3 /*break*/, 41];
24570
- case 40:
25336
+ return [3 /*break*/, 47];
25337
+ case 38: return [4 /*yield*/, this.getCustomDataValue()];
25338
+ case 39:
25339
+ customDataValue = _b.sent();
25340
+ return [3 /*break*/, 47];
25341
+ case 40: return [4 /*yield*/, this.getComponentListValue()];
25342
+ case 41:
25343
+ customDataValue = _b.sent();
25344
+ return [3 /*break*/, 47];
25345
+ case 42: return [4 /*yield*/, this.getBlogValue()];
25346
+ case 43:
25347
+ customDataValue = _b.sent();
25348
+ return [3 /*break*/, 47];
25349
+ case 44: return [4 /*yield*/, this.getBlogListValue()];
25350
+ case 45:
25351
+ customDataValue = _b.sent();
25352
+ return [3 /*break*/, 47];
25353
+ case 46: return [3 /*break*/, 47];
25354
+ case 47: return [3 /*break*/, 49];
25355
+ case 48:
24571
25356
  _b.sent();
24572
25357
  return [2 /*return*/];
24573
- case 41:
25358
+ case 49:
24574
25359
  if (this.customData.isRequired &&
24575
25360
  ((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
24576
25361
  return [2 /*return*/];
@@ -24795,6 +25580,42 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
24795
25580
  });
24796
25581
  });
24797
25582
  };
25583
+ IkasCustomPropValueProvider.prototype.getProductAttributePropValue = function () {
25584
+ return __awaiter(this, void 0, void 0, function () {
25585
+ var provider, value;
25586
+ return __generator(this, function (_a) {
25587
+ switch (_a.label) {
25588
+ case 0:
25589
+ provider = new IkasAttributePropValueProvider(this.value, this.pageSpecificData);
25590
+ return [4 /*yield*/, provider.getValue()];
25591
+ case 1:
25592
+ value = _a.sent();
25593
+ return [2 /*return*/, {
25594
+ value: value,
25595
+ customData: this.customData,
25596
+ }];
25597
+ }
25598
+ });
25599
+ });
25600
+ };
25601
+ IkasCustomPropValueProvider.prototype.getProductAttributeListPropValue = function () {
25602
+ return __awaiter(this, void 0, void 0, function () {
25603
+ var provider, value;
25604
+ return __generator(this, function (_a) {
25605
+ switch (_a.label) {
25606
+ case 0:
25607
+ provider = new IkasAttributeListPropValueProvider(this.value, this.pageSpecificData);
25608
+ return [4 /*yield*/, provider.getValue()];
25609
+ case 1:
25610
+ value = _a.sent();
25611
+ return [2 /*return*/, {
25612
+ value: value,
25613
+ customData: this.customData,
25614
+ }];
25615
+ }
25616
+ });
25617
+ });
25618
+ };
24798
25619
  IkasCustomPropValueProvider.prototype.getTextValue = function () {
24799
25620
  return __awaiter(this, void 0, void 0, function () {
24800
25621
  var provider, value;
@@ -24891,6 +25712,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
24891
25712
  });
24892
25713
  });
24893
25714
  };
25715
+ IkasCustomPropValueProvider.prototype.getEnumValue = function () {
25716
+ return __awaiter(this, void 0, void 0, function () {
25717
+ return __generator(this, function (_a) {
25718
+ return [2 /*return*/, {
25719
+ value: this.value,
25720
+ customData: this.customData,
25721
+ }];
25722
+ });
25723
+ });
25724
+ };
25725
+ IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
25726
+ return __awaiter(this, void 0, void 0, function () {
25727
+ var selectedCustomData, nestedProvider;
25728
+ var _this = this;
25729
+ return __generator(this, function (_a) {
25730
+ switch (_a.label) {
25731
+ case 0:
25732
+ selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
25733
+ if (!selectedCustomData)
25734
+ return [2 /*return*/, {
25735
+ value: null,
25736
+ customData: this.customData,
25737
+ }];
25738
+ nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
25739
+ return [4 /*yield*/, nestedProvider.getValue()];
25740
+ case 1: return [2 /*return*/, _a.sent()];
25741
+ }
25742
+ });
25743
+ });
25744
+ };
24894
25745
  IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
24895
25746
  return __awaiter(this, void 0, void 0, function () {
24896
25747
  var pageComponents;
@@ -24978,7 +25829,23 @@ var pascalCase = function (str) {
24978
25829
  var decodeBase64 = function (base64) {
24979
25830
  var buffer = Buffer.from(base64, "base64");
24980
25831
  return buffer.toString("ascii");
24981
- };
25832
+ };
25833
+ function stringSorter(atitle, btitle) {
25834
+ var alphabet = "0123456789AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpQqRrSsŞşTtUuÜüVvWwXxYyZz";
25835
+ var _atitle = atitle || "";
25836
+ var _btitle = btitle || "";
25837
+ if (_atitle.length === 0 || _btitle.length === 0) {
25838
+ return _atitle.length - _btitle.length;
25839
+ }
25840
+ for (var i = 0; i < _atitle.length && i < _btitle.length; i++) {
25841
+ var ai = alphabet.indexOf(_atitle[i].toUpperCase());
25842
+ var bi = alphabet.indexOf(_btitle[i].toUpperCase());
25843
+ if (ai !== bi) {
25844
+ return ai - bi;
25845
+ }
25846
+ }
25847
+ return 0;
25848
+ }
24982
25849
 
24983
25850
  var ThemeComponent = observer(function (_a) {
24984
25851
  var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
@@ -25212,6 +26079,37 @@ function createCategoryBreadcrumbSchema(pageSpecificDataStr) {
25212
26079
  catch (_a) { }
25213
26080
  }
25214
26081
 
26082
+ function styleInject(css, ref) {
26083
+ if ( ref === void 0 ) ref = {};
26084
+ var insertAt = ref.insertAt;
26085
+
26086
+ if (!css || typeof document === 'undefined') { return; }
26087
+
26088
+ var head = document.head || document.getElementsByTagName('head')[0];
26089
+ var style = document.createElement('style');
26090
+ style.type = 'text/css';
26091
+
26092
+ if (insertAt === 'top') {
26093
+ if (head.firstChild) {
26094
+ head.insertBefore(style, head.firstChild);
26095
+ } else {
26096
+ head.appendChild(style);
26097
+ }
26098
+ } else {
26099
+ head.appendChild(style);
26100
+ }
26101
+
26102
+ if (style.styleSheet) {
26103
+ style.styleSheet.cssText = css;
26104
+ } else {
26105
+ style.appendChild(document.createTextNode(css));
26106
+ }
26107
+ }
26108
+
26109
+ var css_248z = ".style-module_IkasPage__ATOib {\n position: relative;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n visibility: hidden; }\n .style-module_IkasPage__ATOib.style-module_Visible__gfjnC {\n visibility: visible; }\n";
26110
+ var styles = {"IkasPage":"style-module_IkasPage__ATOib","Visible":"style-module_Visible__gfjnC"};
26111
+ styleInject(css_248z);
26112
+
25215
26113
  var IkasPage = observer(function (_a) {
25216
26114
  var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
25217
26115
  var store = IkasStorefrontConfig.store;
@@ -25231,12 +26129,11 @@ var IkasPage = observer(function (_a) {
25231
26129
  var headerComponentPropValue = propValues.find(function (pv) { return pv.component.isHeader; });
25232
26130
  var footerComponentPropValue = propValues.find(function (pv) { return pv.component.isFooter; });
25233
26131
  var others = propValues.filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; }) || [];
25234
- var _pageStyle = __assign(__assign({}, pageStyle), { visibility: mounted ? "visible" : "hidden" });
25235
26132
  if (!page)
25236
26133
  return null;
25237
26134
  return (createElement(Fragment, null,
25238
26135
  createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
25239
- createElement("div", { style: _pageStyle },
26136
+ createElement("div", { className: [styles.IkasPage, mounted ? styles.Visible : ""].join(" ") },
25240
26137
  createElement("div", null,
25241
26138
  headerComponentPropValue &&
25242
26139
  renderComponent(headerComponentPropValue, settings, -1),
@@ -25248,74 +26145,8 @@ var IkasPage = observer(function (_a) {
25248
26145
  });
25249
26146
  var renderComponent = function (pageComponentPropValue, settings, index) {
25250
26147
  return (createElement(ThemeComponent, { key: pageComponentPropValue.pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, settings: settings }));
25251
- };
25252
- var pageStyle = {
25253
- position: "relative",
25254
- minHeight: "100vh",
25255
- width: "100vw",
25256
- display: "flex",
25257
- flexDirection: "column",
25258
- justifyContent: "space-between",
25259
26148
  };
25260
26149
 
25261
- var IkasAttributePropValueProvider = /** @class */ (function () {
25262
- function IkasAttributePropValueProvider(prop, pageSpecificData) {
25263
- this.attributePropValue = prop;
25264
- this.pageSpecificData = pageSpecificData;
25265
- }
25266
- IkasAttributePropValueProvider.prototype.getValue = function () {
25267
- var _a;
25268
- return __awaiter(this, void 0, void 0, function () {
25269
- var productDetail, productSearchResponse, productList, product, variant;
25270
- var _this = this;
25271
- return __generator(this, function (_b) {
25272
- switch (_b.label) {
25273
- case 0:
25274
- if (!this.attributePropValue.attributeId ||
25275
- (this.attributePropValue.usePageData && !this.pageSpecificData) ||
25276
- (!this.attributePropValue.usePageData &&
25277
- !this.attributePropValue.variantId)) {
25278
- return [2 /*return*/, []];
25279
- }
25280
- if (!((_a = this.attributePropValue) === null || _a === void 0 ? void 0 : _a.usePageData)) return [3 /*break*/, 1];
25281
- productDetail = this.pageSpecificData;
25282
- return [3 /*break*/, 3];
25283
- case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25284
- productIdList: [this.attributePropValue.productId],
25285
- priceListId: IkasStorefrontConfig.priceListId,
25286
- salesChannelId: IkasStorefrontConfig.salesChannelId,
25287
- })];
25288
- case 2:
25289
- productSearchResponse = _b.sent();
25290
- if (productSearchResponse) {
25291
- productList = productSearchResponse.data;
25292
- if (productList.length) {
25293
- product = productList[0];
25294
- if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25295
- variant = product.variants.find(function (v) { return v.id === _this.attributePropValue.variantId; });
25296
- if (variant) {
25297
- productDetail = new IkasProductDetail(product, variant.variantValues);
25298
- }
25299
- }
25300
- else {
25301
- productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25302
- }
25303
- }
25304
- }
25305
- _b.label = 3;
25306
- case 3:
25307
- if (!productDetail)
25308
- return [2 /*return*/, []];
25309
- return [2 /*return*/, productDetail.product.hasVariant
25310
- ? productDetail.selectedVariant.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })
25311
- : productDetail.product.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })];
25312
- }
25313
- });
25314
- });
25315
- };
25316
- return IkasAttributePropValueProvider;
25317
- }());
25318
-
25319
26150
  var IkasPageDataProvider = /** @class */ (function () {
25320
26151
  function IkasPageDataProvider(theme, pageParams, pageType) {
25321
26152
  this.pageType = null;
@@ -25705,79 +26536,83 @@ var IkasPageDataProvider = /** @class */ (function () {
25705
26536
  case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 8];
25706
26537
  case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 9];
25707
26538
  case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE: return [3 /*break*/, 10];
25708
- case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 11];
25709
- case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
25710
- case IkasThemeComponentPropType.LINK: return [3 /*break*/, 13];
25711
- case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 13];
25712
- case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 14];
25713
- case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 15];
25714
- case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 16];
25715
- case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 16];
25716
- case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 18];
25717
- case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 19];
26539
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST: return [3 /*break*/, 11];
26540
+ case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 12];
26541
+ case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 13];
26542
+ case IkasThemeComponentPropType.LINK: return [3 /*break*/, 14];
26543
+ case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 14];
26544
+ case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 15];
26545
+ case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 16];
26546
+ case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 17];
26547
+ case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 17];
26548
+ case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 19];
26549
+ case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 20];
25718
26550
  }
25719
- return [3 /*break*/, 20];
26551
+ return [3 /*break*/, 21];
25720
26552
  case 1:
25721
26553
  propValueProvider = new IkasTextPropValueProvider(propValue);
25722
- return [3 /*break*/, 21];
26554
+ return [3 /*break*/, 22];
25723
26555
  case 2:
25724
26556
  propValueProvider = new IkasRichTextPropValueProvider(propValue);
25725
- return [3 /*break*/, 21];
26557
+ return [3 /*break*/, 22];
25726
26558
  case 3:
25727
26559
  propValueProvider = new IkasBooleanPropValueProvider(propValue);
25728
- return [3 /*break*/, 21];
26560
+ return [3 /*break*/, 22];
25729
26561
  case 4:
25730
26562
  propValueProvider = new IkasImagePropValueProvider(propValue);
25731
- return [3 /*break*/, 21];
26563
+ return [3 /*break*/, 22];
25732
26564
  case 5:
25733
26565
  propValueProvider = new IkasImageListPropValueProvider(propValue);
25734
- return [3 /*break*/, 21];
26566
+ return [3 /*break*/, 22];
25735
26567
  case 6:
25736
26568
  propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
25737
- return [3 /*break*/, 21];
26569
+ return [3 /*break*/, 22];
25738
26570
  case 7:
25739
26571
  propValueProvider = new IkasBrandListPropValueProvider(propValue);
25740
- return [3 /*break*/, 21];
26572
+ return [3 /*break*/, 22];
25741
26573
  case 8:
25742
26574
  propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25743
- return [3 /*break*/, 21];
26575
+ return [3 /*break*/, 22];
25744
26576
  case 9:
25745
26577
  propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
25746
- return [3 /*break*/, 21];
26578
+ return [3 /*break*/, 22];
25747
26579
  case 10:
25748
26580
  propValueProvider = new IkasAttributePropValueProvider(propValue, this.pageSpecificData);
25749
- return [3 /*break*/, 21];
26581
+ return [3 /*break*/, 22];
25750
26582
  case 11:
25751
- propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
25752
- return [3 /*break*/, 21];
26583
+ propValueProvider = new IkasAttributeListPropValueProvider(propValue, this.pageSpecificData);
26584
+ return [3 /*break*/, 22];
25753
26585
  case 12:
25754
- propValueProvider = new IkasCategoryListPropValueProvider(propValue);
25755
- return [3 /*break*/, 21];
26586
+ propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
26587
+ return [3 /*break*/, 22];
25756
26588
  case 13:
25757
- propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
25758
- return [3 /*break*/, 21];
26589
+ propValueProvider = new IkasCategoryListPropValueProvider(propValue);
26590
+ return [3 /*break*/, 22];
25759
26591
  case 14:
25760
- propValueProvider = new IkasColorPropValueProvider(propValue);
25761
- return [3 /*break*/, 21];
26592
+ propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
26593
+ return [3 /*break*/, 22];
25762
26594
  case 15:
26595
+ propValueProvider = new IkasColorPropValueProvider(propValue);
26596
+ return [3 /*break*/, 22];
26597
+ case 16:
25763
26598
  customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
25764
26599
  if (!customData)
25765
26600
  return [2 /*return*/];
25766
26601
  propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
25767
- return [3 /*break*/, 21];
25768
- case 16:
26602
+ return [3 /*break*/, 22];
26603
+ case 17:
25769
26604
  pageComponents = propValue;
25770
26605
  return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
25771
- case 17: return [2 /*return*/, _b.sent()];
25772
- case 18:
25773
- propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
25774
- return [3 /*break*/, 21];
26606
+ case 18: return [2 /*return*/, _b.sent()];
25775
26607
  case 19:
26608
+ propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
26609
+ return [3 /*break*/, 22];
26610
+ case 20:
25776
26611
  propValueProvider = new IkasBlogListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25777
- return [3 /*break*/, 21];
25778
- case 20: return [3 /*break*/, 21];
25779
- case 21: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
25780
- case 22: return [2 /*return*/, _b.sent()];
26612
+ return [3 /*break*/, 22];
26613
+ case 21: return [3 /*break*/, 22];
26614
+ case 22: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
26615
+ case 23: return [2 /*return*/, _b.sent()];
25781
26616
  }
25782
26617
  });
25783
26618
  });
@@ -25832,6 +26667,9 @@ var IkasPageDataProvider = /** @class */ (function () {
25832
26667
  case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE:
25833
26668
  IkasPageDataProvider.initAttributePropValue(prop, propValue, pageComponentPropValue);
25834
26669
  break;
26670
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST:
26671
+ IkasPageDataProvider.initAttributeListPropValue(prop, propValue, pageComponentPropValue);
26672
+ break;
25835
26673
  case IkasThemeComponentPropType.LINK:
25836
26674
  case IkasThemeComponentPropType.LIST_OF_LINK:
25837
26675
  IkasPageDataProvider.initLinkPropValue(prop, propValue, pageComponentPropValue);
@@ -25913,6 +26751,17 @@ var IkasPageDataProvider = /** @class */ (function () {
25913
26751
  ? propValue.map(function (p) { return new IkasProductAttributeValue(p); })
25914
26752
  : [];
25915
26753
  };
26754
+ IkasPageDataProvider.initAttributeListPropValue = function (prop, propValue, pageComponentPropValue) {
26755
+ pageComponentPropValue.propValues[prop.name] = IkasPageDataProvider._initAttributeListPropValue(propValue);
26756
+ };
26757
+ IkasPageDataProvider._initAttributeListPropValue = function (propValue) {
26758
+ return propValue
26759
+ ? propValue.map(function (p) { return ({
26760
+ attribute: new IkasProductAttribute(p.attribute),
26761
+ values: p.values.map(function (v) { return new IkasProductAttributeValue(v); }),
26762
+ }); })
26763
+ : [];
26764
+ };
25916
26765
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
25917
26766
  pageComponentPropValue.propValues[prop.name] = this._initLinkPropValue(propValue);
25918
26767
  };
@@ -25978,7 +26827,11 @@ var IkasPageDataProvider = /** @class */ (function () {
25978
26827
  for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
25979
26828
  var nestedCustomData = _a[_i];
25980
26829
  var value = propValue[nestedCustomData.key];
25981
- objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, settings, isBrowser);
26830
+ var selectedCustomData = void 0;
26831
+ if (nestedCustomData.customDataId) {
26832
+ selectedCustomData = value.customData;
26833
+ }
26834
+ objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
25982
26835
  }
25983
26836
  return objectValue;
25984
26837
  case IkasThemeComponentPropType.DYNAMIC_LIST:
@@ -25989,7 +26842,11 @@ var IkasPageDataProvider = /** @class */ (function () {
25989
26842
  var listValue_1 = [];
25990
26843
  var nestedCustomData_1 = customData.nestedData[0];
25991
26844
  propValue.forEach(function (itemValue) {
25992
- listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, settings, isBrowser));
26845
+ var selectedCustomData;
26846
+ if (nestedCustomData_1.customDataId) {
26847
+ selectedCustomData = itemValue.customData;
26848
+ }
26849
+ listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
25993
26850
  });
25994
26851
  return listValue_1;
25995
26852
  }
@@ -26957,7 +27814,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26957
27814
  return __generator(this, function (_b) {
26958
27815
  switch (_b.label) {
26959
27816
  case 0:
26960
- QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "])));
27817
+ QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n additionalPrices {\n amount\n amountType\n name\n type\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n additionalPrices {\n amount\n amountType\n name\n type\n }\n }\n }\n "])));
26961
27818
  _b.label = 1;
26962
27819
  case 1:
26963
27820
  _b.trys.push([1, 3, , 4]);
@@ -26975,7 +27832,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26975
27832
  console.log(errors);
26976
27833
  }
26977
27834
  if (data)
26978
- return [2 /*return*/, data.listPaymentGateway];
27835
+ return [2 /*return*/, data.listPaymentGateway.map(function (pg) { return new IkasPaymentGateway(pg); })];
26979
27836
  return [3 /*break*/, 4];
26980
27837
  case 3:
26981
27838
  err_5 = _b.sent();
@@ -27151,20 +28008,23 @@ var templateObject_1$5;
27151
28008
  var IkasCountryAPI = /** @class */ (function () {
27152
28009
  function IkasCountryAPI() {
27153
28010
  }
27154
- IkasCountryAPI.listCountries = function (iso2List) {
28011
+ IkasCountryAPI.listCountries = function (iso2List, idList) {
27155
28012
  return __awaiter(this, void 0, void 0, function () {
27156
28013
  var QUERY, _a, data, errors, err_1;
27157
28014
  return __generator(this, function (_b) {
27158
28015
  switch (_b.label) {
27159
28016
  case 0:
27160
- QUERY = src(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "], ["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "])));
28017
+ QUERY = src(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query listCountry($iso2: StringFilterInput, $id: StringFilterInput) {\n listCountry(iso2: $iso2, id: $id) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "], ["\n query listCountry($iso2: StringFilterInput, $id: StringFilterInput) {\n listCountry(iso2: $iso2, id: $id) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "])));
27161
28018
  _b.label = 1;
27162
28019
  case 1:
27163
28020
  _b.trys.push([1, 3, , 4]);
27164
- return [4 /*yield*/, apollo.getClient().query({
28021
+ return [4 /*yield*/, apollo
28022
+ .getClient()
28023
+ .query({
27165
28024
  query: QUERY,
27166
28025
  variables: {
27167
28026
  iso2: iso2List ? { in: iso2List } : undefined,
28027
+ id: idList ? { in: idList } : undefined,
27168
28028
  },
27169
28029
  })];
27170
28030
  case 2:
@@ -27686,9 +28546,73 @@ var IkasCustomerAPI = /** @class */ (function () {
27686
28546
  });
27687
28547
  });
27688
28548
  };
28549
+ IkasCustomerAPI.getLastViewedProducts = function (customerId) {
28550
+ return __awaiter(this, void 0, void 0, function () {
28551
+ var QUERY, _a, data, errors, error_2;
28552
+ return __generator(this, function (_b) {
28553
+ switch (_b.label) {
28554
+ case 0:
28555
+ QUERY = src(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "], ["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "])));
28556
+ _b.label = 1;
28557
+ case 1:
28558
+ _b.trys.push([1, 3, , 4]);
28559
+ return [4 /*yield*/, apollo
28560
+ .getClient()
28561
+ .query({
28562
+ query: QUERY,
28563
+ variables: {
28564
+ customerId: customerId,
28565
+ },
28566
+ })];
28567
+ case 2:
28568
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
28569
+ if (errors && errors.length)
28570
+ return [2 /*return*/, []];
28571
+ return [2 /*return*/, data.getLastViewedProducts.products];
28572
+ case 3:
28573
+ error_2 = _b.sent();
28574
+ console.log(error_2);
28575
+ return [2 /*return*/, []];
28576
+ case 4: return [2 /*return*/];
28577
+ }
28578
+ });
28579
+ });
28580
+ };
28581
+ IkasCustomerAPI.saveLastViewedProducts = function (input) {
28582
+ return __awaiter(this, void 0, void 0, function () {
28583
+ var MUTATION, errors, err_12;
28584
+ return __generator(this, function (_a) {
28585
+ switch (_a.label) {
28586
+ case 0:
28587
+ MUTATION = src(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "], ["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "])));
28588
+ _a.label = 1;
28589
+ case 1:
28590
+ _a.trys.push([1, 3, , 4]);
28591
+ return [4 /*yield*/, apollo
28592
+ .getClient()
28593
+ .mutate({
28594
+ mutation: MUTATION,
28595
+ variables: {
28596
+ input: input,
28597
+ },
28598
+ })];
28599
+ case 2:
28600
+ errors = (_a.sent()).errors;
28601
+ if (errors && errors.length)
28602
+ return [2 /*return*/, false];
28603
+ return [3 /*break*/, 4];
28604
+ case 3:
28605
+ err_12 = _a.sent();
28606
+ console.log(err_12);
28607
+ return [2 /*return*/, false];
28608
+ case 4: return [2 /*return*/, true];
28609
+ }
28610
+ });
28611
+ });
28612
+ };
27689
28613
  return IkasCustomerAPI;
27690
28614
  }());
27691
- var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
28615
+ var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
27692
28616
 
27693
28617
  var IkasDistrictAPI = /** @class */ (function () {
27694
28618
  function IkasDistrictAPI() {
@@ -28356,36 +29280,9 @@ var IkasVariantTypeAPI = /** @class */ (function () {
28356
29280
  }());
28357
29281
  var templateObject_1$g;
28358
29282
 
28359
- function styleInject(css, ref) {
28360
- if ( ref === void 0 ) ref = {};
28361
- var insertAt = ref.insertAt;
28362
-
28363
- if (!css || typeof document === 'undefined') { return; }
28364
-
28365
- var head = document.head || document.getElementsByTagName('head')[0];
28366
- var style = document.createElement('style');
28367
- style.type = 'text/css';
28368
-
28369
- if (insertAt === 'top') {
28370
- if (head.firstChild) {
28371
- head.insertBefore(style, head.firstChild);
28372
- } else {
28373
- head.appendChild(style);
28374
- }
28375
- } else {
28376
- head.appendChild(style);
28377
- }
28378
-
28379
- if (style.styleSheet) {
28380
- style.styleSheet.cssText = css;
28381
- } else {
28382
- style.appendChild(document.createTextNode(css));
28383
- }
28384
- }
28385
-
28386
- var css_248z = ".style-module_FormSectionTitle__2LxF2 {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0 {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0.style-module_WithSubTitle__36X7i {\n line-height: auto;\n padding-bottom: 0; }\n\n.style-module_SubTitle__2UOsH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.style-module_Grid__1eODF {\n display: grid;\n grid-gap: 0.7em; }\n .style-module_Grid__1eODF.style-module_Grid2__1HTRV {\n grid-template-columns: repeat(2, 1fr); }\n .style-module_Grid__1eODF.style-module_Grid3__uN7io {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .style-module_Grid__1eODF {\n grid-template-columns: 1fr !important; } }\n\n.style-module_FormContainer__2IVCZ {\n padding: 0 0.7em; }\n\n.style-module_mtFormRow__2YwG- {\n margin-top: 0.7em; }\n\n.style-module_mt1__1OQuA {\n margin-top: 1em; }\n\n.style-module_mt2__Yumkn {\n margin-top: 2em; }\n\n@keyframes style-module_fadeInFromRight__L_PAx {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n\n.style-module_FormItem__1o0fc {\n width: 100%; }\n .style-module_FormItemWrapper__2NOxU {\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ {\n position: relative;\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabel__2Tx0b {\n color: #737373;\n position: absolute;\n top: 0;\n left: 0.7em;\n width: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n transition: transform .1s;\n transform: translateY(70%);\n font-size: 0.85em; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabelTop__1nOBq {\n transform: translateY(6px);\n font-size: 0.7em; }\n .style-module_FormItemInputWrapper__2eOdJ input,\n .style-module_FormItemInputWrapper__2eOdJ select,\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n border: 1px solid #d9d9d9;\n background-color: white;\n color: #333333;\n background-clip: padding-box;\n border-radius: 6px;\n display: block;\n width: 100%;\n height: 3em;\n padding: 0.5em;\n outline: none;\n transition: padding .1s, border-color .5s, box-shadow .5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none; }\n .style-module_FormItemInputWrapper__2eOdJ input:focus,\n .style-module_FormItemInputWrapper__2eOdJ select:focus,\n .style-module_FormItemInputWrapper__2eOdJ textarea:focus {\n box-shadow: 0 0 0 1px #111111;\n border-color: #111111; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Bottom__3s4pZ {\n padding-top: 1.2em;\n padding-bottom: 0.2em; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Error__nif12 {\n box-shadow: 0 0 0 1px #ff6d6d;\n border-color: #ff6d6d; }\n .style-module_FormItemInputWrapper__2eOdJ input::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ select::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ textarea::-ms-expand {\n display: none; }\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n min-height: 120px; }\n .style-module_FormItemInputWrapper__2eOdJ .style-module_ArrowContainer__27ejm {\n position: absolute;\n right: 1px;\n padding-right: 0.5em;\n top: 1px;\n height: calc(100% - 2px);\n display: flex;\n align-items: center;\n color: #737373;\n background-color: white;\n z-index: 2;\n border-radius: 6px; }\n .style-module_FormItem__1o0fc .style-module_ErrorMsg__3How6 {\n color: #ff6d6d;\n font-size: 0.8em;\n margin: 0.5em 0.25em;\n animation-name: style-module_fadeInFromRight__L_PAx;\n animation-duration: .3s; }\n";
28387
- var styles = {"FormSectionTitle":"style-module_FormSectionTitle__2LxF2","Title":"style-module_Title__2PxW0","WithSubTitle":"style-module_WithSubTitle__36X7i","SubTitle":"style-module_SubTitle__2UOsH","Grid":"style-module_Grid__1eODF","Grid2":"style-module_Grid2__1HTRV","Grid3":"style-module_Grid3__uN7io","FormContainer":"style-module_FormContainer__2IVCZ","mtFormRow":"style-module_mtFormRow__2YwG-","mt1":"style-module_mt1__1OQuA","mt2":"style-module_mt2__Yumkn","FormItem":"style-module_FormItem__1o0fc","FormItemWrapper":"style-module_FormItemWrapper__2NOxU","FormItemInputWrapper":"style-module_FormItemInputWrapper__2eOdJ","FieldLabel":"style-module_FieldLabel__2Tx0b","FieldLabelTop":"style-module_FieldLabelTop__1nOBq","Bottom":"style-module_Bottom__3s4pZ","Error":"style-module_Error__nif12","ArrowContainer":"style-module_ArrowContainer__27ejm","ErrorMsg":"style-module_ErrorMsg__3How6","fadeInFromRight":"style-module_fadeInFromRight__L_PAx"};
28388
- styleInject(css_248z);
29283
+ var css_248z$1 = ".style-module_FormSectionTitle__2LxF2 {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0 {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0.style-module_WithSubTitle__36X7i {\n line-height: auto;\n padding-bottom: 0; }\n\n.style-module_SubTitle__2UOsH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.style-module_Grid__1eODF {\n display: grid;\n grid-gap: 0.7em; }\n .style-module_Grid__1eODF.style-module_Grid2__1HTRV {\n grid-template-columns: repeat(2, 1fr); }\n .style-module_Grid__1eODF.style-module_Grid3__uN7io {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .style-module_Grid__1eODF {\n grid-template-columns: 1fr !important; } }\n\n.style-module_FormContainer__2IVCZ {\n padding: 0 0.7em; }\n\n.style-module_mtFormRow__2YwG- {\n margin-top: 0.7em; }\n\n.style-module_mt1__1OQuA {\n margin-top: 1em; }\n\n.style-module_mt2__Yumkn {\n margin-top: 2em; }\n\n@keyframes style-module_fadeInFromRight__L_PAx {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n\n.style-module_FormItem__1o0fc {\n width: 100%; }\n .style-module_FormItemWrapper__2NOxU {\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ {\n position: relative;\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabel__2Tx0b {\n color: #737373;\n position: absolute;\n top: 0;\n left: 0.7em;\n width: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n transition: transform .1s;\n transform: translateY(70%);\n font-size: 0.85em; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabelTop__1nOBq {\n transform: translateY(6px);\n font-size: 0.7em; }\n .style-module_FormItemInputWrapper__2eOdJ input,\n .style-module_FormItemInputWrapper__2eOdJ select,\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n border: 1px solid #d9d9d9;\n background-color: white;\n color: #333333;\n background-clip: padding-box;\n border-radius: 6px;\n display: block;\n width: 100%;\n height: 3em;\n padding: 0.5em;\n outline: none;\n transition: padding .1s, border-color .5s, box-shadow .5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none; }\n .style-module_FormItemInputWrapper__2eOdJ input:focus,\n .style-module_FormItemInputWrapper__2eOdJ select:focus,\n .style-module_FormItemInputWrapper__2eOdJ textarea:focus {\n box-shadow: 0 0 0 1px #111111;\n border-color: #111111; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Bottom__3s4pZ {\n padding-top: 1.2em;\n padding-bottom: 0.2em; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Error__nif12 {\n box-shadow: 0 0 0 1px #ff6d6d;\n border-color: #ff6d6d; }\n .style-module_FormItemInputWrapper__2eOdJ input::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ select::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ textarea::-ms-expand {\n display: none; }\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n min-height: 120px; }\n .style-module_FormItemInputWrapper__2eOdJ .style-module_ArrowContainer__27ejm {\n position: absolute;\n right: 1px;\n padding-right: 0.5em;\n top: 1px;\n height: calc(100% - 2px);\n display: flex;\n align-items: center;\n color: #737373;\n background-color: white;\n z-index: 2;\n border-radius: 6px; }\n .style-module_FormItem__1o0fc .style-module_ErrorMsg__3How6 {\n color: #ff6d6d;\n font-size: 0.8em;\n margin: 0.5em 0.25em;\n animation-name: style-module_fadeInFromRight__L_PAx;\n animation-duration: .3s; }\n";
29284
+ var styles$1 = {"FormSectionTitle":"style-module_FormSectionTitle__2LxF2","Title":"style-module_Title__2PxW0","WithSubTitle":"style-module_WithSubTitle__36X7i","SubTitle":"style-module_SubTitle__2UOsH","Grid":"style-module_Grid__1eODF","Grid2":"style-module_Grid2__1HTRV","Grid3":"style-module_Grid3__uN7io","FormContainer":"style-module_FormContainer__2IVCZ","mtFormRow":"style-module_mtFormRow__2YwG-","mt1":"style-module_mt1__1OQuA","mt2":"style-module_mt2__Yumkn","FormItem":"style-module_FormItem__1o0fc","FormItemWrapper":"style-module_FormItemWrapper__2NOxU","FormItemInputWrapper":"style-module_FormItemInputWrapper__2eOdJ","FieldLabel":"style-module_FieldLabel__2Tx0b","FieldLabelTop":"style-module_FieldLabelTop__1nOBq","Bottom":"style-module_Bottom__3s4pZ","Error":"style-module_Error__nif12","ArrowContainer":"style-module_ArrowContainer__27ejm","ErrorMsg":"style-module_ErrorMsg__3How6","fadeInFromRight":"style-module_fadeInFromRight__L_PAx"};
29285
+ styleInject(css_248z$1);
28389
29286
 
28390
29287
  var FormItemViewModel = /** @class */ (function () {
28391
29288
  function FormItemViewModel(props) {
@@ -28400,6 +29297,7 @@ var FormItemViewModel = /** @class */ (function () {
28400
29297
  _this.onChange(e.target.value);
28401
29298
  };
28402
29299
  this.type = props.type;
29300
+ this.inputType = props.inputType;
28403
29301
  this.options = props.options;
28404
29302
  this.label = props.label;
28405
29303
  this.value = props.value;
@@ -28410,7 +29308,7 @@ var FormItemViewModel = /** @class */ (function () {
28410
29308
  }
28411
29309
  Object.defineProperty(FormItemViewModel.prototype, "formItemStyle", {
28412
29310
  get: function () {
28413
- var s = [styles.FormItem];
29311
+ var s = [styles$1.FormItem];
28414
29312
  return s.join(" ");
28415
29313
  },
28416
29314
  enumerable: false,
@@ -28419,10 +29317,10 @@ var FormItemViewModel = /** @class */ (function () {
28419
29317
  Object.defineProperty(FormItemViewModel.prototype, "labelStyle", {
28420
29318
  get: function () {
28421
29319
  if (this.value) {
28422
- return [styles.FieldLabel, styles.FieldLabelTop].join(" ");
29320
+ return [styles$1.FieldLabel, styles$1.FieldLabelTop].join(" ");
28423
29321
  }
28424
29322
  else {
28425
- return [styles.FieldLabel].join(" ");
29323
+ return [styles$1.FieldLabel].join(" ");
28426
29324
  }
28427
29325
  },
28428
29326
  enumerable: false,
@@ -28432,10 +29330,10 @@ var FormItemViewModel = /** @class */ (function () {
28432
29330
  get: function () {
28433
29331
  var classes = [];
28434
29332
  if (this.value) {
28435
- classes.push(styles.Bottom);
29333
+ classes.push(styles$1.Bottom);
28436
29334
  }
28437
29335
  if (this.hasError) {
28438
- classes.push(styles.Error);
29336
+ classes.push(styles$1.Error);
28439
29337
  }
28440
29338
  return classes.join(" ");
28441
29339
  },
@@ -28450,7 +29348,13 @@ var FormItemType;
28450
29348
  FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
28451
29349
  FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
28452
29350
  FormItemType[FormItemType["TEL"] = 3] = "TEL";
28453
- })(FormItemType || (FormItemType = {}));
29351
+ })(FormItemType || (FormItemType = {}));
29352
+ var FormItemInputType;
29353
+ (function (FormItemInputType) {
29354
+ FormItemInputType["NUMERIC"] = "numeric";
29355
+ FormItemInputType["TEL"] = "tel";
29356
+ FormItemInputType["EMAIL"] = "email";
29357
+ })(FormItemInputType || (FormItemInputType = {}));
28454
29358
 
28455
29359
  var SVGCaretDown = function (_a) {
28456
29360
  var className = _a.className;
@@ -28466,6 +29370,11 @@ var FormItem = observer(function (props) {
28466
29370
  vm.type = props.type;
28467
29371
  });
28468
29372
  }, [props.type]);
29373
+ useEffect(function () {
29374
+ runInAction(function () {
29375
+ vm.inputType = props.inputType;
29376
+ });
29377
+ }, [props.inputType]);
28469
29378
  useEffect(function () {
28470
29379
  runInAction(function () {
28471
29380
  vm.value = props.value;
@@ -28497,18 +29406,18 @@ var FormItem = observer(function (props) {
28497
29406
  });
28498
29407
  }, [props.onChange]);
28499
29408
  return (createElement("div", { className: vm.formItemStyle },
28500
- createElement("div", { className: styles.FormItemWrapper },
28501
- createElement("div", { className: styles.FormItemInputWrapper },
29409
+ createElement("div", { className: styles$1.FormItemWrapper },
29410
+ createElement("div", { className: styles$1.FormItemInputWrapper },
28502
29411
  createElement("label", { className: vm.labelStyle }, vm.label),
28503
29412
  vm.type === FormItemType.TEXT && (createElement(Input, { vm: vm, autocomplete: props.autocomplete })),
28504
29413
  vm.type === FormItemType.TEL && (createElement(Input, { vm: vm, type: "tel", autocomplete: props.autocomplete })),
28505
29414
  vm.type === FormItemType.TEXT_AREA && createElement(TextArea, { vm: vm }),
28506
29415
  vm.type === FormItemType.SELECT && (createElement(Select, { vm: vm, autocomplete: props.autocomplete }))),
28507
- !!vm.hasError && (createElement("div", { className: styles.ErrorMsg }, vm.errorText || "")))));
29416
+ !!vm.hasError && (createElement("div", { className: styles$1.ErrorMsg }, vm.errorText || "")))));
28508
29417
  });
28509
29418
  var Input = observer(function (_a) {
28510
29419
  var vm = _a.vm, autocomplete = _a.autocomplete, type = _a.type;
28511
- return (createElement("input", { type: type || "text", autoComplete: autocomplete, className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
29420
+ return (createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
28512
29421
  });
28513
29422
  var TextArea = observer(function (_a) {
28514
29423
  var vm = _a.vm;
@@ -28521,7 +29430,7 @@ var Select = observer(function (_a) {
28521
29430
  createElement("select", { className: vm.inputStyle, autoComplete: autocomplete, onChange: vm.onSelectChange },
28522
29431
  !vm.value && createElement("option", { selected: true, disabled: true, key: -1 }), (_b = vm.options) === null || _b === void 0 ? void 0 :
28523
29432
  _b.map(function (o, index) { return (createElement("option", { key: index + o.value, value: o.value, selected: vm.value === o.value }, o.label)); })),
28524
- createElement("div", { className: styles.ArrowContainer },
29433
+ createElement("div", { className: styles$1.ArrowContainer },
28525
29434
  createElement(SVGCaretDown, null))));
28526
29435
  });
28527
29436
 
@@ -28531,26 +29440,26 @@ var SVGCheck = function (_a) {
28531
29440
  createElement("path", { fill: "currentColor", d: "M12.6 8.1l-3.7-3.8 1-1.1 2.7 2.7 5.5-5.4 1 1z" })));
28532
29441
  };
28533
29442
 
28534
- var css_248z$1 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabelError__FmdxF {\n color: #ff6d6d; }\n";
28535
- var styles$1 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC","CheckboxLabelError":"style-module_CheckboxLabelError__FmdxF"};
28536
- styleInject(css_248z$1);
29443
+ var css_248z$2 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none;\n align-items: center; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabelError__FmdxF {\n color: #ff6d6d; }\n";
29444
+ var styles$2 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC","CheckboxLabelError":"style-module_CheckboxLabelError__FmdxF"};
29445
+ styleInject(css_248z$2);
28537
29446
 
28538
29447
  var Checkbox = observer(function (_a) {
28539
29448
  var value = _a.value, label = _a.label, hasError = _a.hasError, onChange = _a.onChange;
28540
29449
  var _onChange = function () {
28541
29450
  onChange(!value);
28542
29451
  };
28543
- var checkboxBorderClasses = [styles$1.CheckboxBorder];
28544
- var labelClasses = [styles$1.CheckboxLabel];
28545
- var tickClasses = [styles$1.CheckboxTick];
29452
+ var checkboxBorderClasses = [styles$2.CheckboxBorder];
29453
+ var labelClasses = [styles$2.CheckboxLabel];
29454
+ var tickClasses = [styles$2.CheckboxTick];
28546
29455
  if (value) {
28547
- checkboxBorderClasses.push(styles$1.Checked);
28548
- tickClasses.push(styles$1.Visible);
29456
+ checkboxBorderClasses.push(styles$2.Checked);
29457
+ tickClasses.push(styles$2.Visible);
28549
29458
  }
28550
29459
  if (hasError)
28551
- labelClasses.push(styles$1.CheckboxLabelError);
28552
- return (createElement("div", { className: styles$1.CheckboxWrapper, onClick: _onChange },
28553
- createElement("div", { className: styles$1.CheckboxContainer },
29460
+ labelClasses.push(styles$2.CheckboxLabelError);
29461
+ return (createElement("div", { className: styles$2.CheckboxWrapper, onClick: _onChange },
29462
+ createElement("div", { className: styles$2.CheckboxContainer },
28554
29463
  createElement("div", { className: checkboxBorderClasses.join(" ") }),
28555
29464
  createElement("div", { className: tickClasses.join(" ") },
28556
29465
  createElement(SVGCheck, null))),
@@ -28566,6 +29475,7 @@ var AddressFormViewModel = /** @class */ (function () {
28566
29475
  this.cities = [];
28567
29476
  this.districts = [];
28568
29477
  this.allowedCountryIds = null;
29478
+ this.isCorporate = false;
28569
29479
  this.fillDropdownOptions = function () { return __awaiter(_this, void 0, void 0, function () {
28570
29480
  return __generator(this, function (_a) {
28571
29481
  switch (_a.label) {
@@ -28586,24 +29496,25 @@ var AddressFormViewModel = /** @class */ (function () {
28586
29496
  });
28587
29497
  }); };
28588
29498
  this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
28589
- var countries;
28590
- var _this = this;
28591
- return __generator(this, function (_a) {
28592
- switch (_a.label) {
29499
+ var countries, currentRouting_1;
29500
+ var _a, _b;
29501
+ return __generator(this, function (_c) {
29502
+ switch (_c.label) {
28593
29503
  case 0:
28594
- _a.trys.push([0, 2, , 3]);
28595
- return [4 /*yield*/, IkasCountryAPI.listCountries()];
29504
+ _c.trys.push([0, 2, , 3]);
29505
+ return [4 /*yield*/, IkasCountryAPI.listCountries(undefined, ((_a = this.allowedCountryIds) === null || _a === void 0 ? void 0 : _a.length) ? this.allowedCountryIds : undefined)];
28596
29506
  case 1:
28597
- countries = _a.sent();
28598
- if (this.allowedCountryIds) {
28599
- countries = countries.filter(function (c) { var _a; return (_a = _this.allowedCountryIds) === null || _a === void 0 ? void 0 : _a.includes(c.id); });
29507
+ countries = _c.sent();
29508
+ currentRouting_1 = IkasStorefrontConfig.routings.find(function (r) { return r.id === IkasStorefrontConfig.storefrontRoutingId; });
29509
+ if ((_b = currentRouting_1 === null || currentRouting_1 === void 0 ? void 0 : currentRouting_1.countryCodes) === null || _b === void 0 ? void 0 : _b.length) {
29510
+ countries = countries.filter(function (c) { var _a; return c.iso2 && ((_a = currentRouting_1.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2)); });
28600
29511
  }
28601
29512
  this.countries = countries;
28602
29513
  if (this.countries.length === 1 && !this.country)
28603
29514
  this.onCountryChange(this.countries[0].id);
28604
29515
  return [3 /*break*/, 3];
28605
29516
  case 2:
28606
- _a.sent();
29517
+ _c.sent();
28607
29518
  return [3 /*break*/, 3];
28608
29519
  case 3: return [2 /*return*/];
28609
29520
  }
@@ -28784,6 +29695,24 @@ var AddressFormViewModel = /** @class */ (function () {
28784
29695
  name: value,
28785
29696
  };
28786
29697
  };
29698
+ this.onCorporateChange = function (value) {
29699
+ _this.isCorporate = value;
29700
+ if (!value) {
29701
+ _this.address.company = null;
29702
+ _this.address.taxNumber = null;
29703
+ _this.address.taxOffice = null;
29704
+ }
29705
+ };
29706
+ this.onCompanyChange = function (value) {
29707
+ _this.address.company = value;
29708
+ };
29709
+ this.onTaxNumberChange = function (value) {
29710
+ _this.address.taxNumber = value;
29711
+ };
29712
+ this.onTaxOfficeChange = function (value) {
29713
+ _this.address.taxOffice = value;
29714
+ };
29715
+ this.vm = data.vm;
28787
29716
  this.address = data.address;
28788
29717
  this.customer = data.customer;
28789
29718
  this.allowedCountryIds = data.allowedCountryIds;
@@ -28850,11 +29779,7 @@ var AddressFormViewModel = /** @class */ (function () {
28850
29779
  Object.defineProperty(AddressFormViewModel.prototype, "countryOptions", {
28851
29780
  get: function () {
28852
29781
  var list = this.countries.map(this.modelToOption);
28853
- list.sort(function (a, b) {
28854
- return a.label.toLocaleLowerCase("tr-TR") > b.label.toLocaleLowerCase("tr-TR")
28855
- ? 1
28856
- : -1;
28857
- });
29782
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
28858
29783
  return list;
28859
29784
  },
28860
29785
  enumerable: false,
@@ -28862,14 +29787,18 @@ var AddressFormViewModel = /** @class */ (function () {
28862
29787
  });
28863
29788
  Object.defineProperty(AddressFormViewModel.prototype, "stateOptions", {
28864
29789
  get: function () {
28865
- return this.states.map(this.modelToOption);
29790
+ var list = this.states.map(this.modelToOption);
29791
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
29792
+ return list;
28866
29793
  },
28867
29794
  enumerable: false,
28868
29795
  configurable: true
28869
29796
  });
28870
29797
  Object.defineProperty(AddressFormViewModel.prototype, "cityOptions", {
28871
29798
  get: function () {
28872
- return this.cities.map(this.modelToOption);
29799
+ var list = this.cities.map(this.modelToOption);
29800
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
29801
+ return list;
28873
29802
  },
28874
29803
  enumerable: false,
28875
29804
  configurable: true
@@ -28877,11 +29806,7 @@ var AddressFormViewModel = /** @class */ (function () {
28877
29806
  Object.defineProperty(AddressFormViewModel.prototype, "districtOptions", {
28878
29807
  get: function () {
28879
29808
  var list = this.districts.map(this.modelToOption);
28880
- list.sort(function (a, b) {
28881
- return a.label.toLocaleLowerCase("tr-TR") > b.label.toLocaleLowerCase("tr-TR")
28882
- ? 1
28883
- : -1;
28884
- });
29809
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
28885
29810
  return list;
28886
29811
  },
28887
29812
  enumerable: false,
@@ -28898,18 +29823,20 @@ var AddressFormViewModel = /** @class */ (function () {
28898
29823
  return AddressFormViewModel;
28899
29824
  }());
28900
29825
 
28901
- var css_248z$2 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt.common-module_WithSubTitle__1VHWv {\n line-height: auto;\n padding-bottom: 0; }\n\n.common-module_SubTitle__1H4kH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.common-module_Grid__2CuvH {\n display: grid;\n grid-gap: 0.7em; }\n .common-module_Grid__2CuvH.common-module_Grid2__9CCag {\n grid-template-columns: repeat(2, 1fr); }\n .common-module_Grid__2CuvH.common-module_Grid3__3p0jJ {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .common-module_Grid__2CuvH {\n grid-template-columns: 1fr !important; } }\n\n.common-module_FormContainer__2I_Lj {\n padding: 0 0.7em; }\n\n.common-module_mtFormRow__2tsDn {\n margin-top: 0.7em; }\n\n.common-module_mt1__3tpC1 {\n margin-top: 1em; }\n\n.common-module_mt2__2bl5q {\n margin-top: 2em; }\n\n@keyframes common-module_fadeInFromRight__3RYk5 {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n";
29826
+ var css_248z$3 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt.common-module_WithSubTitle__1VHWv {\n line-height: auto;\n padding-bottom: 0; }\n\n.common-module_SubTitle__1H4kH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.common-module_Grid__2CuvH {\n display: grid;\n grid-gap: 0.7em; }\n .common-module_Grid__2CuvH.common-module_Grid2__9CCag {\n grid-template-columns: repeat(2, 1fr); }\n .common-module_Grid__2CuvH.common-module_Grid3__3p0jJ {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .common-module_Grid__2CuvH {\n grid-template-columns: 1fr !important; } }\n\n.common-module_FormContainer__2I_Lj {\n padding: 0 0.7em; }\n\n.common-module_mtFormRow__2tsDn {\n margin-top: 0.7em; }\n\n.common-module_mt1__3tpC1 {\n margin-top: 1em; }\n\n.common-module_mt2__2bl5q {\n margin-top: 2em; }\n\n@keyframes common-module_fadeInFromRight__3RYk5 {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n";
28902
29827
  var commonStyles = {"FormSectionTitle":"common-module_FormSectionTitle___Mykh","Title":"common-module_Title__3JTHt","WithSubTitle":"common-module_WithSubTitle__1VHWv","SubTitle":"common-module_SubTitle__1H4kH","Grid":"common-module_Grid__2CuvH","Grid2":"common-module_Grid2__9CCag","Grid3":"common-module_Grid3__3p0jJ","FormContainer":"common-module_FormContainer__2I_Lj","mtFormRow":"common-module_mtFormRow__2tsDn","mt1":"common-module_mt1__3tpC1","mt2":"common-module_mt2__2bl5q","fadeInFromRight":"common-module_fadeInFromRight__3RYk5"};
28903
- styleInject(css_248z$2);
28904
-
28905
- var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: 1.5em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28906
- var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
28907
29828
  styleInject(css_248z$3);
28908
29829
 
29830
+ var css_248z$4 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: 1.5em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
29831
+ var styles$3 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
29832
+ styleInject(css_248z$4);
29833
+
28909
29834
  var AddressForm$1 = observer(function (_a) {
28910
- var _b, _c, _d, _e, _f;
28911
- var isErrorsVisible = _a.isErrorsVisible, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "validationResult"]);
28912
- var vm = useState(function () { return new AddressFormViewModel(props); })[0];
29835
+ var _b, _c, _d, _e, _f, _g, _h;
29836
+ var isErrorsVisible = _a.isErrorsVisible, isBilling = _a.isBilling, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "isBilling", "validationResult"]);
29837
+ var vm = useState(function () {
29838
+ return new AddressFormViewModel(__assign({}, props));
29839
+ })[0];
28913
29840
  useEffect(function () {
28914
29841
  Object.entries(props).forEach(function (entry) {
28915
29842
  return runInAction(function () {
@@ -28923,7 +29850,7 @@ var AddressForm$1 = observer(function (_a) {
28923
29850
  createElement(FormItem, { type: FormItemType.TEXT, label: "Soyad", autocomplete: "family-name", value: vm.lastName || "", onChange: vm.onLastNameChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.lastName), errorText: "Soyad girin" }),
28924
29851
  createElement("div", null),
28925
29852
  " "),
28926
- createElement("div", { className: styles$2.RowPB },
29853
+ createElement("div", { className: styles$3.RowPB },
28927
29854
  createElement(FormItem, { type: FormItemType.TEXT, label: "Adres", autocomplete: "address-line1", value: vm.address.addressLine1 || "", onChange: vm.onAddressLine1Change, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.addressLine1), errorText: "Adres girin" })),
28928
29855
  createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
28929
29856
  createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-line2", label: "Apartman, daire, vb.", value: vm.address.addressLine2 || "", onChange: vm.onAddressLine2Change }),
@@ -28933,43 +29860,49 @@ var AddressForm$1 = observer(function (_a) {
28933
29860
  createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
28934
29861
  createElement(FormItem, { type: FormItemType.SELECT, label: "\u00DClke", autocomplete: "country-name", value: ((_b = vm.country) === null || _b === void 0 ? void 0 : _b.id) || "", onChange: vm.onCountryChange, options: vm.countryOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.country), errorText: "Ülke seçin" }),
28935
29862
  vm.hasState && (createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
28936
- createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
28937
- vm.districtOptions.length ? (createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
29863
+ createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", autocomplete: "off", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
29864
+ vm.districtOptions.length ? (createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", autocomplete: "off", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-level3", label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
28938
29865
  !!vm.address.checkoutSettings &&
28939
29866
  vm.address.checkoutSettings.phoneRequirement !==
28940
- IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
29867
+ IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.TEL, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
28941
29868
  !!vm.address.checkoutSettings &&
28942
29869
  vm.address.checkoutSettings.identityNumberRequirement !==
28943
- IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" })))));
29870
+ IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" }))),
29871
+ !!isBilling && (createElement("div", { style: { marginTop: "12px" } },
29872
+ createElement(Checkbox, { value: vm.isCorporate, label: "Kurumsal fatura", onChange: vm.onCorporateChange }))),
29873
+ !!vm.isCorporate && (createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" "), style: { marginTop: "12px" } },
29874
+ createElement(FormItem, { type: FormItemType.TEXT, label: "\u015Eirket \u00DCnvan\u0131", value: vm.address.company || "", onChange: vm.onCompanyChange }),
29875
+ createElement(FormItem, { type: FormItemType.TEXT, label: "Vergi Numaras\u0131", value: ((_g = vm.address) === null || _g === void 0 ? void 0 : _g.taxNumber) || "", onChange: vm.onTaxNumberChange }),
29876
+ createElement(FormItem, { type: FormItemType.TEXT, label: "Vergi Dairesi", value: ((_h = vm.address) === null || _h === void 0 ? void 0 : _h.taxOffice) || "", onChange: vm.onTaxOfficeChange })))));
28944
29877
  });
28945
29878
 
28946
- var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28947
- var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28948
- styleInject(css_248z$4);
29879
+ var css_248z$5 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
29880
+ var styles$4 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
29881
+ styleInject(css_248z$5);
28949
29882
 
28950
29883
  var Button = observer(function (_a) {
28951
29884
  var text = _a.text, style = _a.style, onClick = _a.onClick, size = _a.size, isLoading = _a.isLoading, isDisabled = _a.isDisabled;
28952
29885
  return (createElement("button", { style: style, type: "button", className: [
28953
- styles$3.Button,
28954
- styles$3.Dark,
28955
- size === "medium" ? styles$3.Medium : styles$3.Large,
28956
- isDisabled ? styles$3.Disabled : "",
28957
- styles$3.FullWidthMobile,
28958
- ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (createElement("div", { className: styles$3.loader })) : (createElement("span", null, text))));
29886
+ styles$4.Button,
29887
+ styles$4.Dark,
29888
+ size === "medium" ? styles$4.Medium : styles$4.Large,
29889
+ isDisabled ? styles$4.Disabled : "",
29890
+ styles$4.FullWidthMobile,
29891
+ ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (createElement("div", { className: styles$4.loader })) : (createElement("span", null, text))));
28959
29892
  });
28960
29893
 
28961
- var css_248z$5 = ".style-module_BackButtonContainer__263Fp {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__263Fp a {\n line-height: 0.9em; }\n\n.style-module_Actions__EdBBN {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__EdBBN {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__EdBBN a {\n margin-top: 1em; } }\n";
28962
- var styles$4 = {"BackButtonContainer":"style-module_BackButtonContainer__263Fp","Actions":"style-module_Actions__EdBBN"};
28963
- styleInject(css_248z$5);
28964
-
28965
- var css_248z$6 = ".style-module_TextButton__XicpL {\n display: inline-flex;\n align-items: center;\n font-size: 0.8em;\n cursor: pointer;\n user-select: none; }\n .style-module_TextButton__XicpL .style-module_Icon__1W8cY {\n height: 24px;\n margin-right: 0.1em; }\n";
28966
- var styles$5 = {"TextButton":"style-module_TextButton__XicpL","Icon":"style-module_Icon__1W8cY"};
29894
+ var css_248z$6 = ".style-module_BackButtonContainer__263Fp {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__263Fp a {\n line-height: 0.9em; }\n\n.style-module_Actions__EdBBN {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__EdBBN {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__EdBBN a {\n margin-top: 1em; } }\n";
29895
+ var styles$5 = {"BackButtonContainer":"style-module_BackButtonContainer__263Fp","Actions":"style-module_Actions__EdBBN"};
28967
29896
  styleInject(css_248z$6);
28968
29897
 
29898
+ var css_248z$7 = ".style-module_TextButton__XicpL {\n display: inline-flex;\n align-items: center;\n font-size: 0.8em;\n cursor: pointer;\n user-select: none; }\n .style-module_TextButton__XicpL .style-module_Icon__1W8cY {\n height: 24px;\n margin-right: 0.1em; }\n";
29899
+ var styles$6 = {"TextButton":"style-module_TextButton__XicpL","Icon":"style-module_Icon__1W8cY"};
29900
+ styleInject(css_248z$7);
29901
+
28969
29902
  var TextButton = observer(function (_a) {
28970
29903
  var text = _a.text, leftIcon = _a.leftIcon;
28971
- return (createElement("div", { className: styles$5.TextButton },
28972
- !!leftIcon && createElement("div", { className: styles$5.Icon }, leftIcon),
29904
+ return (createElement("div", { className: styles$6.TextButton },
29905
+ !!leftIcon && createElement("div", { className: styles$6.Icon }, leftIcon),
28973
29906
  createElement("span", null, text)));
28974
29907
  });
28975
29908
 
@@ -28983,15 +29916,15 @@ var SVGArrowLeft = function (_a) {
28983
29916
  var StepActionButtons = observer(function (_a) {
28984
29917
  var mainBtnText = _a.mainBtnText, mainBtnOnClick = _a.mainBtnOnClick, backBtnText = _a.backBtnText, backBtnOnClick = _a.backBtnOnClick, isLoading = _a.isLoading;
28985
29918
  var MainButton = observer(function () { return (createElement(Button, { text: mainBtnText, isLoading: isLoading, onClick: mainBtnOnClick })); });
28986
- return (createElement("div", { className: [styles$4.Actions, commonStyles.mt1].join(" ") },
28987
- createElement("div", { className: styles$4.BackButtonContainer }, !!backBtnText && (createElement("a", { onClick: backBtnOnClick },
29919
+ return (createElement("div", { className: [styles$5.Actions, commonStyles.mt1].join(" ") },
29920
+ createElement("div", { className: styles$5.BackButtonContainer }, !!backBtnText && (createElement("a", { onClick: backBtnOnClick },
28988
29921
  createElement(TextButton, { text: backBtnText, leftIcon: createElement(SVGArrowLeft, null) })))),
28989
29922
  createElement(MainButton, null)));
28990
29923
  });
28991
29924
 
28992
- var css_248z$7 = ".style-module_LoginText__3cWRW {\n font-size: 0.8em;\n padding-bottom: 0.7em;\n text-align: right; }\n\n.style-module_LoginBtn__1BIyI {\n margin-left: 0.2em;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500; }\n\n.style-module_CustomerInfo__3py5O {\n display: flex;\n align-items: center; }\n .style-module_CustomerInfo__3py5O .style-module_ProfilePic__2fNqg {\n width: 50px;\n height: 50px;\n border-radius: 6px;\n background-color: #737373;\n margin-right: 1em; }\n .style-module_CustomerInfo__3py5O .style-module_CustonerText__1sYEW {\n font-size: 0.9em; }\n .style-module_CustomerInfo__3py5O .style-module_Logout__1bzMp {\n font-weight: 500;\n font-size: 0.8em;\n user-select: none;\n cursor: pointer; }\n";
28993
- var styles$6 = {"LoginText":"style-module_LoginText__3cWRW","LoginBtn":"style-module_LoginBtn__1BIyI","CustomerInfo":"style-module_CustomerInfo__3py5O","ProfilePic":"style-module_ProfilePic__2fNqg","CustonerText":"style-module_CustonerText__1sYEW","Logout":"style-module_Logout__1bzMp"};
28994
- styleInject(css_248z$7);
29925
+ var css_248z$8 = ".style-module_LoginText__3cWRW {\n font-size: 0.8em;\n padding-bottom: 0.7em;\n text-align: right; }\n\n.style-module_LoginBtn__1BIyI {\n margin-left: 0.2em;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500; }\n\n.style-module_CustomerInfo__3py5O {\n display: flex;\n align-items: center; }\n .style-module_CustomerInfo__3py5O .style-module_ProfilePic__2fNqg {\n width: 50px;\n height: 50px;\n border-radius: 6px;\n background-color: #737373;\n margin-right: 1em; }\n .style-module_CustomerInfo__3py5O .style-module_CustonerText__1sYEW {\n font-size: 0.9em; }\n .style-module_CustomerInfo__3py5O .style-module_Logout__1bzMp {\n font-weight: 500;\n font-size: 0.8em;\n user-select: none;\n cursor: pointer; }\n";
29926
+ var styles$7 = {"LoginText":"style-module_LoginText__3cWRW","LoginBtn":"style-module_LoginBtn__1BIyI","CustomerInfo":"style-module_CustomerInfo__3py5O","ProfilePic":"style-module_ProfilePic__2fNqg","CustonerText":"style-module_CustonerText__1sYEW","Logout":"style-module_Logout__1bzMp"};
29927
+ styleInject(css_248z$8);
28995
29928
 
28996
29929
  var CheckoutStepInfo = observer(function (_a) {
28997
29930
  var _b, _c;
@@ -29017,20 +29950,20 @@ var CheckoutStepInfo = observer(function (_a) {
29017
29950
  return (createElement("div", { className: commonStyles.FormContainer },
29018
29951
  createElement("div", { className: commonStyles.FormSectionTitle },
29019
29952
  createElement("div", { className: commonStyles.Title }, "\u0130leti\u015Fim Bilgileri"),
29020
- !vm.checkout.hasCustomer && (createElement("div", { className: styles$6.LoginText },
29953
+ !vm.checkout.hasCustomer && (createElement("div", { className: styles$7.LoginText },
29021
29954
  createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
29022
29955
  createElement(Link, { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
29023
- createElement("a", { className: styles$6.LoginBtn }, "Oturum A\u00E7"))))),
29024
- !vm.checkout.hasCustomer ? (createElement(FormItem, { type: FormItemType.TEXT, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (createElement("div", { className: styles$6.CustomerInfo },
29956
+ createElement("a", { className: styles$7.LoginBtn }, "Oturum A\u00E7"))))),
29957
+ !vm.checkout.hasCustomer ? (createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.EMAIL, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (createElement("div", { className: styles$7.CustomerInfo },
29025
29958
  createElement("div", null,
29026
- createElement("div", { className: styles$6.CustonerText }, vm.checkout.customerText),
29027
- createElement("div", { className: styles$6.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
29959
+ createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
29960
+ createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
29028
29961
  createElement("div", { className: commonStyles.FormSectionTitle },
29029
29962
  createElement("div", { className: commonStyles.Title }, "Kargo Adresi")),
29030
29963
  !!vm.customerStore.customer &&
29031
- !!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$2.RowPB },
29964
+ !!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$3.RowPB },
29032
29965
  createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
29033
- createElement(AddressForm$1, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
29966
+ createElement(AddressForm$1, { vm: vm, address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
29034
29967
  ? undefined
29035
29968
  : vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds || undefined, validationResult: vm.checkout.shippingAddress.validationResult }),
29036
29969
  !!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (createElement("div", { style: { marginTop: "12px" } },
@@ -29040,51 +29973,51 @@ var CheckoutStepInfo = observer(function (_a) {
29040
29973
  createElement(StepActionButtons, { mainBtnText: "Kargo ile devam et", mainBtnOnClick: proceed, backBtnText: "Alışverişe dön", backBtnOnClick: vm.onBackToShoppingClick, isLoading: vm.isStepLoading })));
29041
29974
  });
29042
29975
 
29043
- var css_248z$8 = ".style-module_InfoBox__2ejTN {\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n padding: 0.4em 1em;\n font-size: 0.8em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 {\n display: flex;\n padding: 0.8em 0;\n width: 100%; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: flex;\n flex: 1 1 auto;\n align-items: center; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n color: #737373;\n flex: 0 0 auto;\n width: 5em;\n padding-right: 1em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Text__3UHTQ {\n flex: 1 1 auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: block; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n width: auto; } }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_Action__2MjM2 {\n flex: 0 0 auto;\n padding-left: 1em;\n user-select: none;\n cursor: pointer; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5.style-module_BorderTop__1RCLf {\n border-top: 1px solid #d9d9d9; }\n";
29044
- var styles$7 = {"InfoBox":"style-module_InfoBox__2ejTN","InfoRow":"style-module_InfoRow__3PsC5","TitleAndText":"style-module_TitleAndText__1Or7p","Title":"style-module_Title__1UpwW","Text":"style-module_Text__3UHTQ","Action":"style-module_Action__2MjM2","BorderTop":"style-module_BorderTop__1RCLf"};
29045
- styleInject(css_248z$8);
29976
+ var css_248z$9 = ".style-module_InfoBox__2ejTN {\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n padding: 0.4em 1em;\n font-size: 0.8em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 {\n display: flex;\n padding: 0.8em 0;\n width: 100%; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: flex;\n flex: 1 1 auto;\n align-items: center; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n color: #737373;\n flex: 0 0 auto;\n width: 5em;\n padding-right: 1em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Text__3UHTQ {\n flex: 1 1 auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: block; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n width: auto; } }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_Action__2MjM2 {\n flex: 0 0 auto;\n padding-left: 1em;\n user-select: none;\n cursor: pointer; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5.style-module_BorderTop__1RCLf {\n border-top: 1px solid #d9d9d9; }\n";
29977
+ var styles$8 = {"InfoBox":"style-module_InfoBox__2ejTN","InfoRow":"style-module_InfoRow__3PsC5","TitleAndText":"style-module_TitleAndText__1Or7p","Title":"style-module_Title__1UpwW","Text":"style-module_Text__3UHTQ","Action":"style-module_Action__2MjM2","BorderTop":"style-module_BorderTop__1RCLf"};
29978
+ styleInject(css_248z$9);
29046
29979
 
29047
29980
  var InfoBox = observer(function (_a) {
29048
29981
  var _b, _c;
29049
29982
  var vm = _a.vm, showShipping = _a.showShipping;
29050
- return (createElement("div", { className: styles$7.InfoBox },
29051
- createElement("div", { className: styles$7.InfoRow },
29052
- createElement("div", { className: styles$7.TitleAndText },
29053
- createElement("div", { className: styles$7.Title }, "\u0130leti\u015Fim"),
29054
- createElement("div", { className: styles$7.Text }, ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "")),
29055
- createElement("div", { className: styles$7.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29056
- createElement("div", { className: [styles$7.InfoRow, styles$7.BorderTop].join(" ") },
29057
- createElement("div", { className: styles$7.TitleAndText },
29058
- createElement("div", { className: styles$7.Title }, "Kargo Adresi"),
29059
- createElement("div", { className: styles$7.Text }, (_c = vm.checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.addressText)),
29060
- createElement("div", { className: styles$7.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29061
- showShipping && (createElement("div", { className: [styles$7.InfoRow, styles$7.BorderTop].join(" ") },
29062
- createElement("div", { className: styles$7.TitleAndText },
29063
- createElement("div", { className: styles$7.Title }, "Y\u00F6ntem"),
29064
- createElement("div", { className: styles$7.Text }, vm.checkout.shippingLines && !!vm.checkout.shippingLines.length
29983
+ return (createElement("div", { className: styles$8.InfoBox },
29984
+ createElement("div", { className: styles$8.InfoRow },
29985
+ createElement("div", { className: styles$8.TitleAndText },
29986
+ createElement("div", { className: styles$8.Title }, "\u0130leti\u015Fim"),
29987
+ createElement("div", { className: styles$8.Text }, ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "")),
29988
+ createElement("div", { className: styles$8.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29989
+ createElement("div", { className: [styles$8.InfoRow, styles$8.BorderTop].join(" ") },
29990
+ createElement("div", { className: styles$8.TitleAndText },
29991
+ createElement("div", { className: styles$8.Title }, "Kargo Adresi"),
29992
+ createElement("div", { className: styles$8.Text }, (_c = vm.checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.addressText)),
29993
+ createElement("div", { className: styles$8.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29994
+ showShipping && (createElement("div", { className: [styles$8.InfoRow, styles$8.BorderTop].join(" ") },
29995
+ createElement("div", { className: styles$8.TitleAndText },
29996
+ createElement("div", { className: styles$8.Title }, "Y\u00F6ntem"),
29997
+ createElement("div", { className: styles$8.Text }, vm.checkout.shippingLines && !!vm.checkout.shippingLines.length
29065
29998
  ? vm.checkout.shippingLines[0].title
29066
29999
  : "Standart Kargo"))))));
29067
30000
  });
29068
30001
 
29069
- var css_248z$9 = ".style-module_Toggle__xQUYz {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n border: 1px solid #d9d9d9;\n transition: all .2s ease-in-out; }\n .style-module_Toggle__xQUYz.style-module_Checked__2kb9S {\n border: 8px solid #111111; }\n";
29070
- var styles$8 = {"Toggle":"style-module_Toggle__xQUYz","Checked":"style-module_Checked__2kb9S"};
29071
- styleInject(css_248z$9);
30002
+ var css_248z$a = ".style-module_Toggle__xQUYz {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n border: 1px solid #d9d9d9;\n transition: all .2s ease-in-out; }\n .style-module_Toggle__xQUYz.style-module_Checked__2kb9S {\n border: 8px solid #111111; }\n";
30003
+ var styles$9 = {"Toggle":"style-module_Toggle__xQUYz","Checked":"style-module_Checked__2kb9S"};
30004
+ styleInject(css_248z$a);
29072
30005
 
29073
30006
  var Toggle = observer(function (_a) {
29074
30007
  var value = _a.value, onChange = _a.onChange;
29075
30008
  var _onChange = function () {
29076
30009
  onChange && onChange(!value);
29077
30010
  };
29078
- var classes = [styles$8.Toggle];
30011
+ var classes = [styles$9.Toggle];
29079
30012
  if (value) {
29080
- classes.push(styles$8.Checked);
30013
+ classes.push(styles$9.Checked);
29081
30014
  }
29082
30015
  return createElement("div", { className: classes.join(" "), onClick: _onChange });
29083
30016
  });
29084
30017
 
29085
- var css_248z$a = ".style-module_BackButtonContainer__2bAOw {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__2bAOw a {\n line-height: 0.9em; }\n\n.style-module_Actions__3fU7l {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__3fU7l {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__3fU7l a {\n margin-top: 1em; } }\n\n.style-module_StepShipping__3nOPT {\n margin-top: 1em; }\n\n.style-module_InfoBox__kyrCZ {\n border: 1px solid #d9d9d9;\n border-radius: 6px; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV {\n display: flex;\n padding: 1em;\n width: 100%;\n align-items: center; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingTitle__3db0q {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingPrice__KaEps {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_BorderTop__2d5TO {\n border-top: 1px solid #d9d9d9; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_Clickable__AkuRd {\n user-select: none;\n cursor: pointer; }\n";
29086
- var styles$9 = {"BackButtonContainer":"style-module_BackButtonContainer__2bAOw","Actions":"style-module_Actions__3fU7l","StepShipping":"style-module_StepShipping__3nOPT","InfoBox":"style-module_InfoBox__kyrCZ","InfoRow":"style-module_InfoRow__3RoAV","ShippingTitle":"style-module_ShippingTitle__3db0q","ShippingPrice":"style-module_ShippingPrice__KaEps","BorderTop":"style-module_BorderTop__2d5TO","Clickable":"style-module_Clickable__AkuRd"};
29087
- styleInject(css_248z$a);
30018
+ var css_248z$b = ".style-module_BackButtonContainer__2bAOw {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__2bAOw a {\n line-height: 0.9em; }\n\n.style-module_Actions__3fU7l {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__3fU7l {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__3fU7l a {\n margin-top: 1em; } }\n\n.style-module_StepShipping__3nOPT {\n margin-top: 1em; }\n\n.style-module_InfoBox__kyrCZ {\n border: 1px solid #d9d9d9;\n border-radius: 6px; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV {\n display: flex;\n padding: 1em;\n width: 100%;\n align-items: center; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingTitle__3db0q {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingPrice__KaEps {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_BorderTop__2d5TO {\n border-top: 1px solid #d9d9d9; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_Clickable__AkuRd {\n user-select: none;\n cursor: pointer; }\n";
30019
+ var styles$a = {"BackButtonContainer":"style-module_BackButtonContainer__2bAOw","Actions":"style-module_Actions__3fU7l","StepShipping":"style-module_StepShipping__3nOPT","InfoBox":"style-module_InfoBox__kyrCZ","InfoRow":"style-module_InfoRow__3RoAV","ShippingTitle":"style-module_ShippingTitle__3db0q","ShippingPrice":"style-module_ShippingPrice__KaEps","BorderTop":"style-module_BorderTop__2d5TO","Clickable":"style-module_Clickable__AkuRd"};
30020
+ styleInject(css_248z$b);
29088
30021
 
29089
30022
  var CheckoutStepShipping = observer(function (_a) {
29090
30023
  var vm = _a.vm;
@@ -29106,42 +30039,42 @@ var CheckoutStepShipping = observer(function (_a) {
29106
30039
  }
29107
30040
  });
29108
30041
  }); };
29109
- return (createElement("div", { className: [styles$9.StepShipping, commonStyles.FormContainer].join(" ") },
30042
+ return (createElement("div", { className: [styles$a.StepShipping, commonStyles.FormContainer].join(" ") },
29110
30043
  createElement(InfoBox, { vm: vm, showShipping: false }),
29111
30044
  createElement("div", { className: commonStyles.FormSectionTitle },
29112
30045
  createElement("div", { className: commonStyles.Title }, "Kargo Y\u00F6ntemi")),
29113
- createElement("div", { className: styles$9.InfoBox }, vm.checkout.availableShippingMethods.map(function (asm, index) { return (createElement("div", { className: [
29114
- styles$9.InfoRow,
29115
- styles$9.Clickable,
29116
- index > 0 ? styles$9.BorderTop : "",
30046
+ createElement("div", { className: styles$a.InfoBox }, vm.checkout.availableShippingMethods.map(function (asm, index) { return (createElement("div", { className: [
30047
+ styles$a.InfoRow,
30048
+ styles$a.Clickable,
30049
+ index > 0 ? styles$a.BorderTop : "",
29117
30050
  ].join(" "), key: asm.shippingSettingsId + asm.shippingZoneRateId, onClick: function () { return vm.onShippingMethodChange(asm); } },
29118
30051
  createElement(Toggle, { value: vm.checkout.shippingSettingsId === asm.shippingSettingsId &&
29119
30052
  vm.checkout.shippingZoneRateId === asm.shippingZoneRateId }),
29120
- createElement("div", { className: styles$9.ShippingTitle }, asm.rateName),
29121
- createElement("div", { className: styles$9.ShippingPrice }, asm.price === 0
30053
+ createElement("div", { className: styles$a.ShippingTitle }, asm.rateName),
30054
+ createElement("div", { className: styles$a.ShippingPrice }, asm.price === 0
29122
30055
  ? "Ücretsiz"
29123
30056
  : formatMoney(asm.price, vm.checkout.cart.currencyCode)))); })),
29124
30057
  createElement(StepActionButtons, { mainBtnText: "Ödeme ile devam et", mainBtnOnClick: proceed, backBtnText: "Bilgilere Geri Dön", backBtnOnClick: vm.onBackToInfoClick, isLoading: vm.isStepLoading })));
29125
30058
  });
29126
30059
 
29127
- var css_248z$b = ".style-module_ExpandableList__20vYy {\n width: 100%;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n overflow: hidden; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN {\n display: flex;\n flex-wrap: wrap;\n padding: 1em;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px solid #d9d9d9;\n cursor: pointer;\n overflow: hidden;\n user-select: none; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_LeftContainer__tkYOm {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_RightContainer__dtzrC {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN.style-module_HiddenBorderTop__EHL4B {\n border-top: none; }\n .style-module_ExpandableList__20vYy .style-module_ExpandContainer__3fGdr {\n width: 100%;\n padding: 1em;\n background-color: #FAFAFA;\n border-top: 1px solid #d9d9d9; }\n";
29128
- var styles$a = {"ExpandableList":"style-module_ExpandableList__20vYy","Row":"style-module_Row__2yFvN","LeftContainer":"style-module_LeftContainer__tkYOm","RightContainer":"style-module_RightContainer__dtzrC","HiddenBorderTop":"style-module_HiddenBorderTop__EHL4B","ExpandContainer":"style-module_ExpandContainer__3fGdr"};
29129
- styleInject(css_248z$b);
30060
+ var css_248z$c = ".style-module_ExpandableList__20vYy {\n width: 100%;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n overflow: hidden; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN {\n display: flex;\n flex-wrap: wrap;\n padding: 1em;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px solid #d9d9d9;\n cursor: pointer;\n overflow: hidden;\n user-select: none; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_LeftContainer__tkYOm {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_RightContainer__dtzrC {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN.style-module_HiddenBorderTop__EHL4B {\n border-top: none; }\n .style-module_ExpandableList__20vYy .style-module_ExpandContainer__3fGdr {\n width: 100%;\n padding: 1em;\n background-color: #FAFAFA;\n border-top: 1px solid #d9d9d9; }\n";
30061
+ var styles$b = {"ExpandableList":"style-module_ExpandableList__20vYy","Row":"style-module_Row__2yFvN","LeftContainer":"style-module_LeftContainer__tkYOm","RightContainer":"style-module_RightContainer__dtzrC","HiddenBorderTop":"style-module_HiddenBorderTop__EHL4B","ExpandContainer":"style-module_ExpandContainer__3fGdr"};
30062
+ styleInject(css_248z$c);
29130
30063
 
29131
30064
  var ExpandableList = observer(function (_a) {
29132
30065
  var options = _a.options, selectedIndex = _a.selectedIndex, onRowSelect = _a.onRowSelect;
29133
30066
  var getRowClasses = function (index) {
29134
- var classes = [styles$a.Row];
30067
+ var classes = [styles$b.Row];
29135
30068
  if (index === 0)
29136
- classes.push(styles$a.HiddenBorderTop);
30069
+ classes.push(styles$b.HiddenBorderTop);
29137
30070
  return classes.join(" ");
29138
30071
  };
29139
- return (createElement("div", { className: styles$a.ExpandableList }, options.map(function (o, index) { return (createElement("div", { key: index },
30072
+ return (createElement("div", { className: styles$b.ExpandableList }, options.map(function (o, index) { return (createElement("div", { key: index },
29140
30073
  createElement("div", { className: getRowClasses(index), onClick: function () { return onRowSelect(index); } },
29141
30074
  createElement(Toggle, { value: selectedIndex === index }),
29142
- createElement("div", { className: styles$a.LeftContainer }, o.leftContent),
29143
- !!o.rightContent && (createElement("div", { className: styles$a.RightContainer }, o.rightContent))),
29144
- selectedIndex === index && !!o.expandContent && (createElement("div", { className: styles$a.ExpandContainer }, o.expandContent)))); })));
30075
+ createElement("div", { className: styles$b.LeftContainer }, o.leftContent),
30076
+ !!o.rightContent && (createElement("div", { className: styles$b.RightContainer }, o.rightContent))),
30077
+ selectedIndex === index && !!o.expandContent && (createElement("div", { className: styles$b.ExpandContainer }, o.expandContent)))); })));
29145
30078
  });
29146
30079
 
29147
30080
  var CreditCardForm = observer(function (_a) {
@@ -29153,41 +30086,41 @@ var CreditCardForm = observer(function (_a) {
29153
30086
  cardData.threeDSecure = value;
29154
30087
  });
29155
30088
  return (createElement("div", null,
29156
- createElement("div", { className: styles$2.RowPB },
29157
- createElement(FormItem, { autocomplete: "cc-number", type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
29158
- createElement("div", { className: styles$2.RowPB },
30089
+ createElement("div", { className: styles$3.RowPB },
30090
+ createElement(FormItem, { autocomplete: "cc-number", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
30091
+ createElement("div", { className: styles$3.RowPB },
29159
30092
  createElement(FormItem, { autocomplete: "cc-name", type: FormItemType.TEXT, label: "Karttaki ad", value: cardData.cardHolderName, onChange: vm.onCardHolderNameChange, errorText: "Ad soyad girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardHolderName })),
29160
30093
  createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
29161
- createElement(FormItem, { autocomplete: "cc-exp", type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
29162
- createElement(FormItem, { autocomplete: "cc-csc", type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
30094
+ createElement(FormItem, { autocomplete: "cc-exp", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
30095
+ createElement(FormItem, { autocomplete: "cc-csc", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
29163
30096
  createElement("div", { style: { marginTop: "0.4em" } },
29164
30097
  createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
29165
30098
  });
29166
30099
 
29167
- var css_248z$c = ".style-module_PaymentLogoContainer__224HZ {\n margin-left: 10px;\n font-size: 0.7em; }\n .style-module_PaymentLogoContainer__224HZ img {\n height: 20px; }\n";
29168
- var styles$b = {"PaymentLogoContainer":"style-module_PaymentLogoContainer__224HZ"};
29169
- styleInject(css_248z$c);
29170
-
29171
- var css_248z$d = ".style-module_Installments__aM2lS {\n background: white; }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH {\n display: flex;\n flex-direction: column;\n min-height: 42px;\n justify-content: center; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentCount__22FOH {\n font-size: 0.9em; } }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentPrice__1cJHw {\n font-size: 0.78em;\n color: #545454; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Right__38yQx {\n font-size: 0.9em; } }\n";
29172
- var styles$c = {"Installments":"style-module_Installments__aM2lS","Left":"style-module_Left__b5nmH","InstallmentCount":"style-module_InstallmentCount__22FOH","InstallmentPrice":"style-module_InstallmentPrice__1cJHw","Right":"style-module_Right__38yQx"};
30100
+ var css_248z$d = ".style-module_PaymentLogoContainer__224HZ {\n margin-left: 10px;\n font-size: 0.7em; }\n .style-module_PaymentLogoContainer__224HZ img {\n height: 20px; }\n";
30101
+ var styles$c = {"PaymentLogoContainer":"style-module_PaymentLogoContainer__224HZ"};
29173
30102
  styleInject(css_248z$d);
29174
30103
 
30104
+ var css_248z$e = ".style-module_Installments__aM2lS {\n background: white; }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH {\n display: flex;\n flex-direction: column;\n min-height: 42px;\n justify-content: center; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentCount__22FOH {\n font-size: 0.9em; } }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentPrice__1cJHw {\n font-size: 0.78em;\n color: #545454; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Right__38yQx {\n font-size: 0.9em; } }\n";
30105
+ var styles$d = {"Installments":"style-module_Installments__aM2lS","Left":"style-module_Left__b5nmH","InstallmentCount":"style-module_InstallmentCount__22FOH","InstallmentPrice":"style-module_InstallmentPrice__1cJHw","Right":"style-module_Right__38yQx"};
30106
+ styleInject(css_248z$e);
30107
+
29175
30108
  var Installments = observer(function (_a) {
29176
30109
  var _b;
29177
30110
  var vm = _a.vm;
29178
30111
  var expandableListOptionsInstallment = ((_b = vm.installmentInfo) === null || _b === void 0 ? void 0 : _b.installmentPrices.map(function (i) { return ({
29179
- leftContent: (createElement("div", { className: styles$c.Left },
29180
- createElement("div", { className: styles$c.InstallmentCount }, i.installmentCount === 1
30112
+ leftContent: (createElement("div", { className: styles$d.Left },
30113
+ createElement("div", { className: styles$d.InstallmentCount }, i.installmentCount === 1
29181
30114
  ? "Tek Çekim"
29182
30115
  : i.installmentCount + " Taksit"),
29183
- i.installmentCount > 1 && (createElement("div", { className: styles$c.InstallmentPrice }, "Aylık " +
30116
+ i.installmentCount > 1 && (createElement("div", { className: styles$d.InstallmentPrice }, "Aylık " +
29184
30117
  formatMoney(i.installmentPrice, vm.checkout.cart.currencyCode))))),
29185
- rightContent: (createElement("div", { className: styles$c.Right }, formatMoney(i.totalPrice, vm.checkout.cart.currencyCode))),
30118
+ rightContent: (createElement("div", { className: styles$d.Right }, formatMoney(i.totalPrice, vm.checkout.cart.currencyCode))),
29186
30119
  }); })) || [];
29187
30120
  return (createElement(Fragment, null,
29188
30121
  createElement("div", { className: commonStyles.FormSectionTitle },
29189
30122
  createElement("div", { className: [commonStyles.Title].join(" ") }, "Taksit Se\u00E7enekleri")),
29190
- createElement("div", { className: styles$c.Installments },
30123
+ createElement("div", { className: styles$d.Installments },
29191
30124
  createElement(ExpandableList, { options: expandableListOptionsInstallment, selectedIndex: vm.selectedInstallmentIndex, onRowSelect: function (index) {
29192
30125
  var _a;
29193
30126
  return vm.setInstallmentCount((_a = vm.installmentInfo) === null || _a === void 0 ? void 0 : _a.installmentPrices[index].installmentCount);
@@ -29210,8 +30143,8 @@ var PaymentGateways = observer(function (_a) {
29210
30143
  createElement(CreditCardForm, { vm: vm }),
29211
30144
  vm.installmentInfo && createElement(Installments, { vm: vm }))) : pg.description ? (createElement("div", null, pg.description)) : undefined,
29212
30145
  rightContent: (createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
29213
- return pm.logoUrl ? (createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
29214
- createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
30146
+ return pm.logoUrl ? (createElement("div", { className: styles$c.PaymentLogoContainer, key: index },
30147
+ createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$c.PaymentLogoContainer, key: index }));
29215
30148
  }))),
29216
30149
  }); });
29217
30150
  return (createElement(Fragment, null,
@@ -29243,9 +30176,9 @@ var BillingAddress = observer(function (_a) {
29243
30176
  leftContent: createElement("div", null, "Farkl\u0131 bir fatura adresi kullan"),
29244
30177
  expandContent: (createElement(Fragment, null,
29245
30178
  !!vm.customerStore.customer &&
29246
- !!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$2.RowPB },
30179
+ !!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$3.RowPB },
29247
30180
  createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
29248
- createElement(AddressForm$1, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
30181
+ createElement(AddressForm$1, { vm: vm, address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult, isBilling: true }))),
29249
30182
  },
29250
30183
  ]; });
29251
30184
  return (createElement(Fragment, null,
@@ -29255,9 +30188,9 @@ var BillingAddress = observer(function (_a) {
29255
30188
  createElement(ExpandableList, { options: expandableListOptionsBilling.get(), selectedIndex: selectedBillingRowIndex, onRowSelect: onSelectedBillingRowIndexChange })));
29256
30189
  });
29257
30190
 
29258
- var css_248z$e = ".style-module_StepPayment__3STxe {\n margin-top: 1em; }\n .style-module_StepPayment__3STxe .style-module_TermsLabelSpan__35xVC {\n text-decoration: underline; }\n";
29259
- var styles$d = {"StepPayment":"style-module_StepPayment__3STxe","TermsLabelSpan":"style-module_TermsLabelSpan__35xVC"};
29260
- styleInject(css_248z$e);
30191
+ var css_248z$f = ".style-module_StepPayment__3STxe {\n margin-top: 1em; }\n .style-module_StepPayment__3STxe .style-module_TermsLabelSpan__35xVC {\n text-decoration: underline; }\n";
30192
+ var styles$e = {"StepPayment":"style-module_StepPayment__3STxe","TermsLabelSpan":"style-module_TermsLabelSpan__35xVC"};
30193
+ styleInject(css_248z$f);
29261
30194
 
29262
30195
  var CheckoutStepPayment = observer(function (_a) {
29263
30196
  var vm = _a.vm;
@@ -29266,7 +30199,7 @@ var CheckoutStepPayment = observer(function (_a) {
29266
30199
  vm.policyModalTitle = "Mesafeli Satış Sözleşmesi";
29267
30200
  vm.policyModalText = vm.termsOfService;
29268
30201
  };
29269
- return (createElement("div", { className: [styles$d.StepPayment, commonStyles.FormContainer].join(" ") },
30202
+ return (createElement("div", { className: [styles$e.StepPayment, commonStyles.FormContainer].join(" ") },
29270
30203
  createElement(InfoBox, { vm: vm, showShipping: true }),
29271
30204
  createElement(PaymentGateways, { vm: vm }),
29272
30205
  createElement(BillingAddress, { vm: vm }),
@@ -29276,34 +30209,34 @@ var CheckoutStepPayment = observer(function (_a) {
29276
30209
  createElement(FormItem, { type: FormItemType.TEXT_AREA, label: "", value: vm.checkout.note || "", onChange: vm.onCheckoutNoteChange }))),
29277
30210
  vm.checkoutSettings.showTermsAndConditionsCheckbox && (createElement("div", { style: { marginTop: "12px" } },
29278
30211
  createElement(Checkbox, { value: vm.isTermsAndConditionsChecked, hasError: vm.isErrorsVisible && !vm.isTermsAndConditionsChecked, label: createElement(Fragment, null,
29279
- createElement("span", { className: styles$d.TermsLabelSpan, onClick: onShowTermsClick }, "Mesafeli sat\u0131\u015F s\u00F6zle\u015Fmesini"),
30212
+ createElement("span", { className: styles$e.TermsLabelSpan, onClick: onShowTermsClick }, "Mesafeli sat\u0131\u015F s\u00F6zle\u015Fmesini"),
29280
30213
  " ",
29281
30214
  "okudum ve onayl\u0131yorum"), onChange: vm.onTermsAndConditionsCheckedChange }))),
29282
30215
  createElement(StepActionButtons, { mainBtnText: "Şimdi öde", mainBtnOnClick: vm.performPayment, backBtnText: "Kargoya Geri Dön", backBtnOnClick: vm.onBackToShippingClick, isLoading: vm.isStepLoading })));
29283
30216
  });
29284
30217
 
29285
- var css_248z$f = ".style-module_CheckoutItem__2JjSt {\n display: flex;\n width: 100%;\n padding: 2em 0; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG {\n flex: 0 0 auto;\n width: 64px;\n height: 64px;\n position: relative;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Image__w2Q_P {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n border: 1px solid #d9d9d9; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Quantity__2lxki {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #737373;\n color: white;\n user-select: none;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2;\n font-size: 0.7em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX {\n flex: 1 1 auto;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 0.8em;\n font-weight: 500;\n color: #111111; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.8em;\n color: #737373; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n flex: 0 0 auto;\n font-size: 0.8em;\n height: 64px;\n display: flex;\n align-items: center; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.9em; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n font-size: 0.9em; } }\n";
29286
- var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Quantity":"style-module_Quantity__2lxki","Info":"style-module_Info__vt8mX","Name":"style-module_Name__nPgw1","VariantName":"style-module_VariantName__317OV","Price":"style-module_Price__1Vw31"};
29287
- styleInject(css_248z$f);
30218
+ var css_248z$g = ".style-module_CheckoutItem__2JjSt {\n display: flex;\n width: 100%;\n padding: 2em 0; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG {\n flex: 0 0 auto;\n width: 64px;\n height: 64px;\n position: relative;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Image__w2Q_P {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n border: 1px solid #d9d9d9; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Quantity__2lxki {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #737373;\n color: white;\n user-select: none;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2;\n font-size: 0.7em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX {\n flex: 1 1 auto;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 0.8em;\n font-weight: 500;\n color: #111111; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.8em;\n color: #737373; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n flex: 0 0 auto;\n font-size: 0.8em;\n height: 64px;\n display: flex;\n align-items: center; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.9em; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n font-size: 0.9em; } }\n";
30219
+ var styles$f = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Quantity":"style-module_Quantity__2lxki","Info":"style-module_Info__vt8mX","Name":"style-module_Name__nPgw1","VariantName":"style-module_VariantName__317OV","Price":"style-module_Price__1Vw31"};
30220
+ styleInject(css_248z$g);
29288
30221
 
29289
30222
  var CartItem = observer(function (_a) {
29290
30223
  var _b;
29291
30224
  var currencyCode = _a.currencyCode, cartItem = _a.cartItem;
29292
- return (createElement("div", { className: styles$e.CheckoutItem },
29293
- createElement("div", { className: styles$e.ImageContainer },
29294
- createElement("img", { className: styles$e.Image, src: (_b = cartItem.variant.mainImage) === null || _b === void 0 ? void 0 : _b.thumbnailSrc }),
29295
- createElement("div", { className: styles$e.Quantity }, cartItem.quantity)),
29296
- createElement("div", { className: styles$e.Info },
29297
- createElement("div", { className: styles$e.Name }, cartItem.variant.name),
29298
- createElement("div", { className: styles$e.VariantName }, cartItem.variant.variantValues
30225
+ return (createElement("div", { className: styles$f.CheckoutItem },
30226
+ createElement("div", { className: styles$f.ImageContainer },
30227
+ createElement("img", { className: styles$f.Image, src: (_b = cartItem.variant.mainImage) === null || _b === void 0 ? void 0 : _b.thumbnailSrc }),
30228
+ createElement("div", { className: styles$f.Quantity }, cartItem.quantity)),
30229
+ createElement("div", { className: styles$f.Info },
30230
+ createElement("div", { className: styles$f.Name }, cartItem.variant.name),
30231
+ createElement("div", { className: styles$f.VariantName }, cartItem.variant.variantValues
29299
30232
  .map(function (vv) { return vv.variantValueName; })
29300
30233
  .join(", "))),
29301
- createElement("div", { className: styles$e.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
30234
+ createElement("div", { className: styles$f.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
29302
30235
  });
29303
30236
 
29304
- var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
29305
- var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
29306
- styleInject(css_248z$g);
30237
+ var css_248z$h = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
30238
+ var styles$g = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
30239
+ styleInject(css_248z$h);
29307
30240
 
29308
30241
  var SVGArrowDown = function (_a) {
29309
30242
  var className = _a.className;
@@ -29334,13 +30267,13 @@ var SVGCross = function (_a) {
29334
30267
  };
29335
30268
 
29336
30269
  var CartSummary = observer(function (_a) {
29337
- var _b;
30270
+ var _b, _c;
29338
30271
  var vm = _a.vm, allowExpand = _a.allowExpand;
29339
30272
  var cart = vm.cart;
29340
30273
  var checkout = vm.checkout;
29341
- var _c = useState(!allowExpand), isExpanded = _c[0], setExpanded = _c[1];
29342
- var _d = useState(0), detailsHeight = _d[0], setDetailsHeight = _d[1];
29343
- var _e = useState(null), detailsContainer = _e[0], setDetailsContainer = _e[1];
30274
+ var _d = useState(!allowExpand), isExpanded = _d[0], setExpanded = _d[1];
30275
+ var _e = useState(0), detailsHeight = _e[0], setDetailsHeight = _e[1];
30276
+ var _f = useState(null), detailsContainer = _f[0], setDetailsContainer = _f[1];
29344
30277
  useEffect(function () {
29345
30278
  if (!allowExpand)
29346
30279
  return;
@@ -29356,13 +30289,13 @@ var CartSummary = observer(function (_a) {
29356
30289
  ? "Sipariş özetini gizle"
29357
30290
  : "Sipariş özetini göster";
29358
30291
  var cartSummaryClasses = [
29359
- styles$f.CartSummary,
29360
- isExpanded ? styles$f.Visible : "",
29361
- allowExpand ? styles$f.AllowExpand : "",
30292
+ styles$g.CartSummary,
30293
+ isExpanded ? styles$g.Visible : "",
30294
+ allowExpand ? styles$g.AllowExpand : "",
29362
30295
  ].join(" ");
29363
30296
  var expandHeaderClasses = [
29364
- styles$f.ExpandHeader,
29365
- isExpanded ? styles$f.Expanded : "",
30297
+ styles$g.ExpandHeader,
30298
+ isExpanded ? styles$g.Expanded : "",
29366
30299
  ].join(" ");
29367
30300
  var detailsContainerStyle = allowExpand
29368
30301
  ? {
@@ -29370,53 +30303,57 @@ var CartSummary = observer(function (_a) {
29370
30303
  }
29371
30304
  : {};
29372
30305
  var arrowDownClasses = [
29373
- styles$f.ArrowDown,
29374
- isExpanded ? styles$f.Rotated : "",
30306
+ styles$g.ArrowDown,
30307
+ isExpanded ? styles$g.Rotated : "",
29375
30308
  ].join(" ");
29376
30309
  if (!cart)
29377
30310
  return null;
29378
30311
  return (createElement("div", { className: cartSummaryClasses },
29379
30312
  !!allowExpand && (createElement("div", { className: expandHeaderClasses, onClick: function () { return setExpanded(!isExpanded); } },
29380
- createElement("div", { className: styles$f.Left },
30313
+ createElement("div", { className: styles$g.Left },
29381
30314
  createElement(SVGShoppingBag, null),
29382
- createElement("span", { className: styles$f.Label }, expandHeaderLabel),
30315
+ createElement("span", { className: styles$g.Label }, expandHeaderLabel),
29383
30316
  createElement("div", { className: arrowDownClasses },
29384
30317
  createElement(SVGArrowDown, null))),
29385
- createElement("div", { className: styles$f.Price }, formatMoney(vm.installmentPrice ||
29386
- vm.checkout.totalFinalPrice ||
29387
- cart.totalPrice, cart.currencyCode)))),
29388
- createElement("div", { className: styles$f.DetailsContainer, style: detailsContainerStyle },
29389
- createElement("div", { className: styles$f.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
30318
+ createElement("div", { className: styles$g.Price }, formatMoney(vm.finalPrice, cart.currencyCode)))),
30319
+ createElement("div", { className: styles$g.DetailsContainer, style: detailsContainerStyle },
30320
+ createElement("div", { className: styles$g.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
29390
30321
  cart.items.map(function (item, index) { return (createElement("div", { key: index },
29391
30322
  createElement(CartItem, { cartItem: item, currencyCode: cart.currencyCode }),
29392
- createElement("div", { className: styles$f.Divider }))); }),
30323
+ createElement("div", { className: styles$g.Divider }))); }),
29393
30324
  createElement(Coupon, { vm: vm }),
29394
- createElement("div", { className: styles$f.SubTotalInfo },
29395
- createElement("div", { className: styles$f.InfoRow },
29396
- createElement("div", { className: styles$f.Label }, "Alt Toplam"),
29397
- createElement("div", { className: styles$f.Value }, formatMoney(cart.totalPrice, cart.currencyCode))),
29398
- !!((_b = checkout.shippingLines) === null || _b === void 0 ? void 0 : _b.length) && (createElement("div", { className: styles$f.InfoRow },
29399
- createElement("div", { className: styles$f.Label }, "Kargo"),
29400
- createElement("div", { className: styles$f.Value }, checkout.shippingTotal
30325
+ createElement("div", { className: styles$g.SubTotalInfo },
30326
+ createElement("div", { className: styles$g.InfoRow },
30327
+ createElement("div", { className: styles$g.Label }, "Alt Toplam"),
30328
+ createElement("div", { className: styles$g.Value }, formatMoney(cart.totalPrice, cart.currencyCode))),
30329
+ !!((_b = checkout.shippingLines) === null || _b === void 0 ? void 0 : _b.length) && (createElement("div", { className: styles$g.InfoRow },
30330
+ createElement("div", { className: styles$g.Label }, "Kargo"),
30331
+ createElement("div", { className: styles$g.Value }, checkout.shippingTotal
29401
30332
  ? formatMoney(checkout.shippingTotal, cart.currencyCode)
29402
30333
  : "Ücretsiz"))),
29403
- !!vm.installmentExtraPrice && (createElement("div", { className: styles$f.InfoRow },
29404
- createElement("div", { className: styles$f.Label }, "Vade Fark\u0131"),
29405
- createElement("div", { className: styles$f.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
29406
- sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (createElement("div", { className: styles$f.InfoRow, key: index },
29407
- createElement("div", { className: styles$f.Label }, adjustment.name),
29408
- createElement("div", { className: styles$f.Value },
30334
+ !!vm.installmentExtraPrice && (createElement("div", { className: styles$g.InfoRow },
30335
+ createElement("div", { className: styles$g.Label }, "Vade Fark\u0131"),
30336
+ createElement("div", { className: styles$g.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
30337
+ sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (createElement("div", { className: styles$g.InfoRow, key: index },
30338
+ createElement("div", { className: styles$g.Label }, adjustment.name),
30339
+ createElement("div", { className: styles$g.Value },
30340
+ createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
30341
+ " ",
30342
+ createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); }),
30343
+ (((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
30344
+ .filter(function (adjustment) { return adjustment.amount !== 0; })
30345
+ .map(function (adjustment, index) { return (createElement("div", { className: styles$g.InfoRow, key: index },
30346
+ createElement("div", { className: styles$g.Label }, adjustment.name),
30347
+ createElement("div", { className: styles$g.Value },
29409
30348
  createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
29410
30349
  " ",
29411
30350
  createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); })),
29412
- createElement("div", { className: styles$f.TotalContainer },
29413
- createElement("div", { className: styles$f.TitleContainer },
29414
- createElement("div", { className: styles$f.Title }, "Toplam"),
29415
- !!(cart === null || cart === void 0 ? void 0 : cart.totalTax) && (createElement("div", { className: styles$f.Tax }, formatMoney(cart.totalTax, cart.currencyCode) +
30351
+ createElement("div", { className: styles$g.TotalContainer },
30352
+ createElement("div", { className: styles$g.TitleContainer },
30353
+ createElement("div", { className: styles$g.Title }, "Toplam"),
30354
+ !!(cart === null || cart === void 0 ? void 0 : cart.totalTax) && (createElement("div", { className: styles$g.Tax }, formatMoney(cart.totalTax, cart.currencyCode) +
29416
30355
  " vergi dahil"))),
29417
- createElement("div", { className: styles$f.TotalPrice }, formatMoney(vm.installmentPrice ||
29418
- vm.checkout.totalFinalPrice ||
29419
- cart.totalPrice, cart.currencyCode)))))));
30356
+ createElement("div", { className: styles$g.TotalPrice }, formatMoney(vm.finalPrice, cart.currencyCode)))))));
29420
30357
  });
29421
30358
  var Coupon = observer(function (_a) {
29422
30359
  var vm = _a.vm;
@@ -29453,34 +30390,34 @@ var Coupon = observer(function (_a) {
29453
30390
  }); };
29454
30391
  if (vm.step === CheckoutStep.SUCCESS)
29455
30392
  return null;
29456
- return (createElement("div", { className: styles$f.CouponContainer },
29457
- createElement("div", { className: styles$f.Coupon },
30393
+ return (createElement("div", { className: styles$g.CouponContainer },
30394
+ createElement("div", { className: styles$g.Coupon },
29458
30395
  createElement(FormItem, { type: FormItemType.TEXT, label: "Hediye kartı veya indirim kodu", value: couponCode, onChange: function (value) { return setCouponCode(value); } }),
29459
30396
  createElement(Button, { text: "Uygula", onClick: onCouponApply, isDisabled: !couponCode, isLoading: isLoadingCoupon, size: "medium", style: { marginLeft: "0.5em", maxWidth: "80px" } })),
29460
- !!vm.checkout.appliedCouponCode && (createElement("div", { className: styles$f.AppliedCoupon },
30397
+ !!vm.checkout.appliedCouponCode && (createElement("div", { className: styles$g.AppliedCoupon },
29461
30398
  createElement(SVGTag, null),
29462
- createElement("div", { className: styles$f.AppliedCouponCode }, vm.checkout.appliedCouponCode),
29463
- createElement("div", { className: styles$f.Cross, onClick: onClearCouponCode },
30399
+ createElement("div", { className: styles$g.AppliedCouponCode }, vm.checkout.appliedCouponCode),
30400
+ createElement("div", { className: styles$g.Cross, onClick: onClearCouponCode },
29464
30401
  createElement(SVGCross, null))))));
29465
30402
  });
29466
30403
 
29467
- var css_248z$h = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
29468
- var styles$g = {"Breadcrumbs":"style-module_Breadcrumbs__1jIPZ","Breadcrumb":"style-module_Breadcrumb__2qdy3","icon":"style-module_icon__3Rq6w","Active":"style-module_Active__3KwX8"};
29469
- styleInject(css_248z$h);
30404
+ var css_248z$i = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
30405
+ var styles$h = {"Breadcrumbs":"style-module_Breadcrumbs__1jIPZ","Breadcrumb":"style-module_Breadcrumb__2qdy3","icon":"style-module_icon__3Rq6w","Active":"style-module_Active__3KwX8"};
30406
+ styleInject(css_248z$i);
29470
30407
 
29471
30408
  var Breadcrumbs = observer(function (_a) {
29472
30409
  var vm = _a.vm;
29473
- var infoClasses = [styles$g.Breadcrumb];
29474
- var shippingClasses = [styles$g.Breadcrumb];
29475
- var paymentClasses = [styles$g.Breadcrumb];
30410
+ var infoClasses = [styles$h.Breadcrumb];
30411
+ var shippingClasses = [styles$h.Breadcrumb];
30412
+ var paymentClasses = [styles$h.Breadcrumb];
29476
30413
  if (vm.step === CheckoutStep.INFO) {
29477
- infoClasses.push(styles$g.Active);
30414
+ infoClasses.push(styles$h.Active);
29478
30415
  }
29479
30416
  if (vm.step === CheckoutStep.SHIPPING) {
29480
- shippingClasses.push(styles$g.Active);
30417
+ shippingClasses.push(styles$h.Active);
29481
30418
  }
29482
30419
  if (vm.step === CheckoutStep.PAYMENT) {
29483
- paymentClasses.push(styles$g.Active);
30420
+ paymentClasses.push(styles$h.Active);
29484
30421
  }
29485
30422
  var onShippingClick = function () {
29486
30423
  try {
@@ -29491,18 +30428,18 @@ var Breadcrumbs = observer(function (_a) {
29491
30428
  }
29492
30429
  catch (err) { }
29493
30430
  };
29494
- return (createElement("div", { className: styles$g.Breadcrumbs },
29495
- createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onGoToCartClick },
30431
+ return (createElement("div", { className: styles$h.Breadcrumbs },
30432
+ createElement("div", { className: styles$h.Breadcrumb, onClick: vm.onGoToCartClick },
29496
30433
  createElement("span", null, "Sepet"),
29497
- createElement("span", { className: styles$g.icon },
30434
+ createElement("span", { className: styles$h.icon },
29498
30435
  createElement(SVGArrowLeft, null))),
29499
30436
  createElement("div", { className: infoClasses.join(" "), onClick: vm.onBackToInfoClick },
29500
30437
  createElement("span", null, "Bilgi"),
29501
- createElement("span", { className: styles$g.icon },
30438
+ createElement("span", { className: styles$h.icon },
29502
30439
  createElement(SVGArrowLeft, null))),
29503
30440
  createElement("div", { className: shippingClasses.join(" "), onClick: onShippingClick },
29504
30441
  createElement("span", null, "Kargo"),
29505
- createElement("span", { className: styles$g.icon },
30442
+ createElement("span", { className: styles$h.icon },
29506
30443
  createElement(SVGArrowLeft, null))),
29507
30444
  createElement("div", { className: paymentClasses.join(" "), onClick: vm.onProceedToPaymentClick },
29508
30445
  createElement("span", null, "\u00D6deme"))));
@@ -29515,9 +30452,9 @@ var SVGHamburger = function (_a) {
29515
30452
  createElement("path", { fill: "currentColor", d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" })));
29516
30453
  };
29517
30454
 
29518
- var css_248z$i = ".style-module_ErrorContainer__3sK_- {\n width: calc(100% - 1.4em);\n padding: 1em;\n margin: 0 0.7em;\n background-color: rgba(255, 109, 109, 0.2);\n border-radius: 6px;\n margin-bottom: 1em;\n color: #ff6d6d;\n padding-bottom: 0;\n margin-top: 0.7em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 1em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb .style-module_Close__12wrg {\n padding: 0.2em 0;\n cursor: pointer; }\n .style-module_ErrorContainer__3sK_- .style-module_Body__3XZo- {\n width: 100%;\n padding: 1em 0;\n border-top: 1px solid rgba(255, 109, 109, 0.4); }\n";
29519
- var styles$h = {"ErrorContainer":"style-module_ErrorContainer__3sK_-","Header":"style-module_Header__SyLrb","Close":"style-module_Close__12wrg","Body":"style-module_Body__3XZo-"};
29520
- styleInject(css_248z$i);
30455
+ var css_248z$j = ".style-module_ErrorContainer__3sK_- {\n width: calc(100% - 1.4em);\n padding: 1em;\n margin: 0 0.7em;\n background-color: rgba(255, 109, 109, 0.2);\n border-radius: 6px;\n margin-bottom: 1em;\n color: #ff6d6d;\n padding-bottom: 0;\n margin-top: 0.7em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 1em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb .style-module_Close__12wrg {\n padding: 0.2em 0;\n cursor: pointer; }\n .style-module_ErrorContainer__3sK_- .style-module_Body__3XZo- {\n width: 100%;\n padding: 1em 0;\n border-top: 1px solid rgba(255, 109, 109, 0.4); }\n";
30456
+ var styles$i = {"ErrorContainer":"style-module_ErrorContainer__3sK_-","Header":"style-module_Header__SyLrb","Close":"style-module_Close__12wrg","Body":"style-module_Body__3XZo-"};
30457
+ styleInject(css_248z$j);
29521
30458
 
29522
30459
  var ErrorContainer = observer(function (_a) {
29523
30460
  var children = _a.children, onClose = _a.onClose;
@@ -29526,24 +30463,24 @@ var ErrorContainer = observer(function (_a) {
29526
30463
  if (elem)
29527
30464
  elem.scrollTop = 0;
29528
30465
  });
29529
- return (createElement("div", { id: "checkoutError", className: styles$h.ErrorContainer },
29530
- createElement("div", { className: styles$h.Header },
30466
+ return (createElement("div", { id: "checkoutError", className: styles$i.ErrorContainer },
30467
+ createElement("div", { className: styles$i.Header },
29531
30468
  createElement("span", null, "Hata!"),
29532
- createElement("div", { className: styles$h.Close, onClick: onClose },
30469
+ createElement("div", { className: styles$i.Close, onClick: onClose },
29533
30470
  createElement(SVGHamburger, null))),
29534
- !!children && createElement("div", { className: styles$h.Body }, children)));
30471
+ !!children && createElement("div", { className: styles$i.Body }, children)));
29535
30472
  });
29536
30473
 
29537
- var css_248z$j = ".style-module_Product__2LsSV {\n padding-bottom: 1em; }\n .style-module_Product__2LsSV .style-module_Stock__1xKk6 {\n font-size: 0.9em; }\n";
29538
- var styles$i = {"Product":"style-module_Product__2LsSV","Stock":"style-module_Stock__1xKk6"};
29539
- styleInject(css_248z$j);
30474
+ var css_248z$k = ".style-module_Product__2LsSV {\n padding-bottom: 1em; }\n .style-module_Product__2LsSV .style-module_Stock__1xKk6 {\n font-size: 0.9em; }\n";
30475
+ var styles$j = {"Product":"style-module_Product__2LsSV","Stock":"style-module_Stock__1xKk6"};
30476
+ styleInject(css_248z$k);
29540
30477
 
29541
30478
  var StockError = observer(function (_a) {
29542
30479
  var error = _a.error, onClose = _a.onClose;
29543
30480
  var data = error.data;
29544
30481
  return (createElement(ErrorContainer, { onClose: onClose },
29545
30482
  createElement("div", null, "Sat\u0131n almak istedi\u011Finiz baz\u0131 \u00FCr\u00FCnlerin stok say\u0131s\u0131 yetersizdir."),
29546
- createElement("div", { style: { marginTop: "1em" } }, data.map(function (d, index) { return (createElement("div", { className: styles$i.Product, key: index },
30483
+ createElement("div", { style: { marginTop: "1em" } }, data.map(function (d, index) { return (createElement("div", { className: styles$j.Product, key: index },
29547
30484
  createElement("div", null, d.variant.name))); }))));
29548
30485
  });
29549
30486
 
@@ -29803,9 +30740,9 @@ var IkasCartStore = /** @class */ (function () {
29803
30740
  return IkasCartStore;
29804
30741
  }());
29805
30742
 
29806
- var css_248z$k = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
29807
- var styles$j = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
29808
- styleInject(css_248z$k);
30743
+ var css_248z$l = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
30744
+ var styles$k = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
30745
+ styleInject(css_248z$l);
29809
30746
 
29810
30747
  var StepSuccess = observer(function (_a) {
29811
30748
  var _b, _c, _d;
@@ -29818,28 +30755,28 @@ var StepSuccess = observer(function (_a) {
29818
30755
  var customerName = (((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.firstName) || "") +
29819
30756
  " " +
29820
30757
  (((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.lastName) || "");
29821
- return (createElement("div", { className: [styles$j.StepSuccess, commonStyles.FormContainer].join(" ") },
29822
- createElement("div", { className: styles$j.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
29823
- createElement("div", { className: styles$j.SuccessSubTitle },
30758
+ return (createElement("div", { className: [styles$k.StepSuccess, commonStyles.FormContainer].join(" ") },
30759
+ createElement("div", { className: styles$k.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
30760
+ createElement("div", { className: styles$k.SuccessSubTitle },
29824
30761
  "Sevgili ",
29825
30762
  customerName,
29826
30763
  ", sipari\u015Finiz bize ula\u015Fm\u0131\u015Ft\u0131r. Sipari\u015Finiz kargoya verildi\u011Finde sizi e-posta ile bilgilendirece\u011Fiz."),
29827
- createElement("div", { className: styles$j.InfoGrid },
30764
+ createElement("div", { className: styles$k.InfoGrid },
29828
30765
  createElement("div", null,
29829
- createElement("div", { className: styles$j.InfoTitle }, "Sipari\u015F No / Tarih"),
29830
- createElement("div", { className: styles$j.InfoText }, "#" + (vm.checkout.orderNumber || "")),
29831
- createElement("div", { className: styles$j.InfoText }, vm.checkout.dateStr)),
30766
+ createElement("div", { className: styles$k.InfoTitle }, "Sipari\u015F No / Tarih"),
30767
+ createElement("div", { className: styles$k.InfoText }, "#" + (vm.checkout.orderNumber || "")),
30768
+ createElement("div", { className: styles$k.InfoText }, vm.checkout.dateStr)),
29832
30769
  createElement("div", null,
29833
- createElement("div", { className: styles$j.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
29834
- createElement("div", { className: styles$j.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
29835
- createElement("div", { className: styles$j.InfoText }, customerName))),
29836
- createElement("div", { className: styles$j.Actions },
30770
+ createElement("div", { className: styles$k.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
30771
+ createElement("div", { className: styles$k.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
30772
+ createElement("div", { className: styles$k.InfoText }, customerName))),
30773
+ createElement("div", { className: styles$k.Actions },
29837
30774
  createElement(Button, { text: "Alışverişe Dön", onClick: vm.onBackToShoppingClick }))));
29838
30775
  });
29839
30776
 
29840
- var css_248z$l = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
29841
- var styles$k = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
29842
- styleInject(css_248z$l);
30777
+ var css_248z$m = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
30778
+ var styles$l = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
30779
+ styleInject(css_248z$m);
29843
30780
 
29844
30781
  var PolicyModal = observer(function (_a) {
29845
30782
  var title = _a.title, onClose = _a.onClose, modalContent = _a.modalContent;
@@ -29854,13 +30791,13 @@ var PolicyModal = observer(function (_a) {
29854
30791
  document.removeEventListener("keydown", escFunction, false);
29855
30792
  };
29856
30793
  }, []);
29857
- return (createElement("div", { className: styles$k.PolicyModal, onClick: onClose },
29858
- createElement("div", { className: styles$k.Modal, onClick: function (e) { return e.stopPropagation(); } },
29859
- createElement("div", { className: styles$k.ModalHeader },
30794
+ return (createElement("div", { className: styles$l.PolicyModal, onClick: onClose },
30795
+ createElement("div", { className: styles$l.Modal, onClick: function (e) { return e.stopPropagation(); } },
30796
+ createElement("div", { className: styles$l.ModalHeader },
29860
30797
  createElement("div", null, title),
29861
- createElement("div", { className: styles$k.CloseButton, onClick: onClose },
30798
+ createElement("div", { className: styles$l.CloseButton, onClick: onClose },
29862
30799
  createElement(SVGHamburger, null))),
29863
- createElement("div", { className: styles$k.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
30800
+ createElement("div", { className: styles$l.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
29864
30801
  });
29865
30802
 
29866
30803
  var CustomerLoginRequiredError = observer(function (_a) {
@@ -29918,11 +30855,11 @@ var IkasCheckoutPage = observer(function (_a) {
29918
30855
  };
29919
30856
  var onPrivacyPolicyClick = function () {
29920
30857
  vm.policyModalTitle = "Gizlilik Politikası";
29921
- vm.policyModalText = vm.returnPolicy;
30858
+ vm.policyModalText = vm.privacyPolicy;
29922
30859
  };
29923
30860
  var onTermsOfServiceClick = function () {
29924
30861
  vm.policyModalTitle = "Hizmet Şartları";
29925
- vm.policyModalText = vm.returnPolicy;
30862
+ vm.policyModalText = vm.termsOfService;
29926
30863
  };
29927
30864
  var onErrorClose = function () {
29928
30865
  vm.error = undefined;
@@ -29964,25 +30901,25 @@ var IkasCheckoutPage = observer(function (_a) {
29964
30901
  return null;
29965
30902
  return (createElement(Fragment, null,
29966
30903
  createElement(IkasPageHead, { pageTitle: (((_b = vm.merchantSettings) === null || _b === void 0 ? void 0 : _b.merchantName) || "") + " - Güvenli Ödeme", description: "Güvenli ödeme" }),
29967
- createElement("div", { id: "Checkout", className: styles$2.CheckoutPage },
29968
- createElement("div", { className: styles$2.Left },
29969
- createElement("div", { className: styles$2.LeftContent },
30904
+ createElement("div", { id: "Checkout", className: styles$3.CheckoutPage },
30905
+ createElement("div", { className: styles$3.Left },
30906
+ createElement("div", { className: styles$3.LeftContent },
29970
30907
  createElement("div", null,
29971
- createElement("div", { className: styles$2.Header },
29972
- createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (createElement("div", { className: styles$2.Logo },
30908
+ createElement("div", { className: styles$3.Header },
30909
+ createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (createElement("div", { className: styles$3.Logo },
29973
30910
  createElement(Image, { layout: "fill", image: vm.merchantSettings.logo, sizes: "64px" }))) : (((_d = vm.merchantSettings) === null || _d === void 0 ? void 0 : _d.merchantName) || ""))),
29974
30911
  vm.step !== CheckoutStep.SUCCESS && createElement(Breadcrumbs, { vm: vm }),
29975
30912
  !!vm.error && renderError(),
29976
- createElement("div", { className: styles$2.MobileCartSummary },
30913
+ createElement("div", { className: styles$3.MobileCartSummary },
29977
30914
  createElement(CartSummary, { vm: vm, allowExpand: true })),
29978
30915
  step,
29979
- createElement("div", { className: styles$2.Space })),
29980
- createElement("div", { className: styles$2.Footer },
29981
- createElement("div", { className: styles$2.FooterItem, onClick: onReturnPolicyClick }, "Para iade politikas\u0131"),
29982
- createElement("div", { className: styles$2.FooterItem, onClick: onPrivacyPolicyClick }, "Gizlilik politikas\u0131"),
29983
- createElement("div", { className: styles$2.FooterItem, onClick: onTermsOfServiceClick }, "Hizmet \u015Fartlar\u0131")))),
29984
- createElement("div", { className: styles$2.Right },
29985
- createElement("div", { className: styles$2.RightContent },
30916
+ createElement("div", { className: styles$3.Space })),
30917
+ createElement("div", { className: styles$3.Footer },
30918
+ createElement("div", { className: styles$3.FooterItem, onClick: onReturnPolicyClick }, "Para iade politikas\u0131"),
30919
+ createElement("div", { className: styles$3.FooterItem, onClick: onPrivacyPolicyClick }, "Gizlilik politikas\u0131"),
30920
+ createElement("div", { className: styles$3.FooterItem, onClick: onTermsOfServiceClick }, "Hizmet \u015Fartlar\u0131")))),
30921
+ createElement("div", { className: styles$3.Right },
30922
+ createElement("div", { className: styles$3.RightContent },
29986
30923
  createElement(CartSummary, { vm: vm }))),
29987
30924
  !!vm.policyModalText && (createElement(PolicyModal, { title: vm.policyModalTitle, modalContent: vm.policyModalText, onClose: onPolicyModalClose })))));
29988
30925
  });
@@ -30003,7 +30940,7 @@ var style = {
30003
30940
  backgroundColor: "rgba(255, 0, 0, 0.5)",
30004
30941
  };
30005
30942
 
30006
- var PACKAGE_VERSION = "0.0.139";
30943
+ var PACKAGE_VERSION = "0.0.158";
30007
30944
  var PageViewModel = /** @class */ (function () {
30008
30945
  function PageViewModel(router) {
30009
30946
  var _this = this;
@@ -30465,13 +31402,13 @@ var IkasPageEditor = observer(function () {
30465
31402
  });
30466
31403
  return (createElement(Fragment, null,
30467
31404
  !!vm.page && (createElement(IkasPageHead, { pageTitle: vm.page.pageTitle, description: vm.page.description })),
30468
- createElement("div", { style: pageStyle$1 },
31405
+ createElement("div", { style: pageStyle },
30469
31406
  createElement("div", null,
30470
31407
  !!headerPageComponent && (createElement(ThemeEditorComponent, { key: headerPageComponent.id, vm: vm, pageComponent: headerPageComponent })), others === null || others === void 0 ? void 0 :
30471
31408
  others.map(function (pageComponent) { return (createElement(ThemeEditorComponent, { key: pageComponent.id, vm: vm, pageComponent: pageComponent })); })),
30472
31409
  !!footerPageComponent && (createElement(ThemeEditorComponent, { key: footerPageComponent.id, vm: vm, pageComponent: footerPageComponent })))));
30473
31410
  });
30474
- var pageStyle$1 = {
31411
+ var pageStyle = {
30475
31412
  minHeight: "100vh",
30476
31413
  width: "100vw",
30477
31414
  display: "flex",
@@ -30894,6 +31831,20 @@ var Page$1 = function (_a) {
30894
31831
  useEffect(function () {
30895
31832
  setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
30896
31833
  }, [isBrowser, propValuesStr]);
31834
+ // If the user clicks a link for the same page, we need this logic to re-render the page
31835
+ useEffect(function () {
31836
+ router.events.on("routeChangeComplete", handleRouteChange);
31837
+ return function () {
31838
+ router.events.off("routeChangeComplete", handleRouteChange);
31839
+ };
31840
+ }, []);
31841
+ var handleRouteChange = function (url, options) {
31842
+ var shallow = options.shallow;
31843
+ if (!shallow &&
31844
+ [IkasThemePageType.CATEGORY, IkasThemePageType.BRAND].includes(page.type)) {
31845
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
31846
+ }
31847
+ };
30897
31848
  return (createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
30898
31849
  };
30899
31850
  var index$1 = observer(Page$1);
@@ -30941,6 +31892,8 @@ function handleAnalytics(page, pageSpecificDataStr) {
30941
31892
  var productDetailParsed = JSON.parse(pageSpecificDataStr);
30942
31893
  var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
30943
31894
  Analytics.productView(productDetail);
31895
+ // @ts-ignore
31896
+ IkasStorefrontConfig.store.customerStore.onProductView(productDetail.product.id, productDetail.selectedVariant.id);
30944
31897
  }
30945
31898
  if (page.type === IkasThemePageType.CATEGORY) {
30946
31899
  var category = JSON.parse(pageSpecificDataStr);
@@ -31542,7 +32495,6 @@ var IkasBaseStore = /** @class */ (function () {
31542
32495
  this.showLocaleOptions = false;
31543
32496
  this.localeChecked = false;
31544
32497
  this.settingsSet = false;
31545
- this.infiniteScrollPages = {}; // key is productListPropValueId
31546
32498
  this.customerStore = new IkasCustomerStore(this);
31547
32499
  this.cartStore = new IkasCartStore(this);
31548
32500
  makeObservable(this, {
@@ -31642,4 +32594,4 @@ var IkasBaseStore = /** @class */ (function () {
31642
32594
  return IkasBaseStore;
31643
32595
  }());
31644
32596
 
31645
- export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
32597
+ export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringSorter, stringToSlug, validatePhoneNumber };