@pisell/pisellos 0.0.556 → 0.0.558

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 (68) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +3 -0
  3. package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +49 -0
  4. package/dist/model/strategy/adapter/dataVariant/adapter.js +152 -0
  5. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +87 -0
  6. package/dist/model/strategy/adapter/dataVariant/evaluator.js +755 -0
  7. package/dist/model/strategy/adapter/dataVariant/examples.d.ts +39 -0
  8. package/dist/model/strategy/adapter/dataVariant/examples.js +277 -0
  9. package/dist/model/strategy/adapter/dataVariant/index.d.ts +4 -0
  10. package/dist/model/strategy/adapter/dataVariant/index.js +4 -0
  11. package/dist/model/strategy/adapter/dataVariant/type.d.ts +146 -0
  12. package/dist/model/strategy/adapter/dataVariant/type.js +54 -0
  13. package/dist/model/strategy/adapter/index.d.ts +4 -0
  14. package/dist/model/strategy/adapter/index.js +5 -1
  15. package/dist/modules/Order/index.d.ts +1 -1
  16. package/dist/modules/Product/index.d.ts +1 -1
  17. package/dist/modules/ProductList/index.d.ts +2 -1
  18. package/dist/modules/ProductList/index.js +21 -11
  19. package/dist/solution/BookingByStep/index.d.ts +2 -2
  20. package/dist/solution/ScanOrder/index.d.ts +2 -1
  21. package/dist/solution/ScanOrder/index.js +137 -117
  22. package/dist/solution/ScanOrder/utils.d.ts +5 -0
  23. package/dist/solution/ScanOrder/utils.js +55 -23
  24. package/dist/solution/VenueBooking/index.d.ts +22 -3
  25. package/dist/solution/VenueBooking/index.js +259 -166
  26. package/dist/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
  27. package/dist/solution/VenueBooking/utils/dateSummary.js +12 -25
  28. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -6
  29. package/dist/solution/VenueBooking/utils/slotMerge.js +3 -9
  30. package/dist/solution/VenueBooking/utils/smartPricing.d.ts +69 -0
  31. package/dist/solution/VenueBooking/utils/smartPricing.js +233 -0
  32. package/dist/solution/VenueBooking/utils/timeSlot.d.ts +2 -0
  33. package/dist/solution/VenueBooking/utils/timeSlot.js +9 -4
  34. package/lib/index.d.ts +1 -0
  35. package/lib/index.js +3 -0
  36. package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +49 -0
  37. package/lib/model/strategy/adapter/dataVariant/adapter.js +139 -0
  38. package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +87 -0
  39. package/lib/model/strategy/adapter/dataVariant/evaluator.js +564 -0
  40. package/lib/model/strategy/adapter/dataVariant/examples.d.ts +39 -0
  41. package/lib/model/strategy/adapter/dataVariant/examples.js +293 -0
  42. package/lib/model/strategy/adapter/dataVariant/index.d.ts +4 -0
  43. package/lib/model/strategy/adapter/dataVariant/index.js +38 -0
  44. package/lib/model/strategy/adapter/dataVariant/type.d.ts +146 -0
  45. package/lib/model/strategy/adapter/dataVariant/type.js +31 -0
  46. package/lib/model/strategy/adapter/index.d.ts +4 -0
  47. package/lib/model/strategy/adapter/index.js +13 -2
  48. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  49. package/lib/modules/Order/index.d.ts +1 -1
  50. package/lib/modules/Product/index.d.ts +1 -1
  51. package/lib/modules/ProductList/index.d.ts +2 -1
  52. package/lib/modules/ProductList/index.js +45 -40
  53. package/lib/solution/BookingByStep/index.d.ts +2 -2
  54. package/lib/solution/ScanOrder/index.d.ts +2 -1
  55. package/lib/solution/ScanOrder/index.js +29 -18
  56. package/lib/solution/ScanOrder/utils.d.ts +5 -0
  57. package/lib/solution/ScanOrder/utils.js +23 -0
  58. package/lib/solution/VenueBooking/index.d.ts +22 -3
  59. package/lib/solution/VenueBooking/index.js +151 -63
  60. package/lib/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
  61. package/lib/solution/VenueBooking/utils/dateSummary.js +5 -10
  62. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -6
  63. package/lib/solution/VenueBooking/utils/slotMerge.js +3 -4
  64. package/lib/solution/VenueBooking/utils/smartPricing.d.ts +69 -0
  65. package/lib/solution/VenueBooking/utils/smartPricing.js +180 -0
  66. package/lib/solution/VenueBooking/utils/timeSlot.d.ts +2 -0
  67. package/lib/solution/VenueBooking/utils/timeSlot.js +7 -3
  68. package/package.json +1 -1
@@ -32,7 +32,7 @@ import { OrderModule } from "../../modules/Order";
32
32
  import { AccountHooks } from "../../modules/Account/types";
33
33
  import { RegisterAndLoginHooks } from "../RegisterAndLogin/types";
34
34
  import Decimal from 'decimal.js';
35
- import { attachItemRuleLimitsToTopLevelProducts, buildProductKey, buildItemRuleBusinessData, collectLinkProductIdsFromReservationRules, computeResourceIsFull, createEmptySummary, getProductIdentityIndex, getSafeProductNum, hasCustomCapacityProduct, pickFirstCustomCapacityDimensionId, pickFirstCustomCapacityPaxBounds, normalizeEnabledItemRuleIds, normalizeOrderProduct, normalizeItemRuleStrategies, pickFirstDurationMinutesFromProducts, toNonNegativeInt, toPriceString, toBoolean, toPositiveString } from "./utils";
35
+ import { attachItemRuleLimitsToTopLevelProducts, buildProductKey, buildItemRuleBusinessData, collectLinkProductIdsFromReservationRules, computeResourceIsFull, createEmptySummary, findReservationRuleProductByResourceId, getProductIdentityIndex, getSafeProductNum, hasCustomCapacityProduct, pickFirstCustomCapacityDimensionId, pickFirstCustomCapacityPaxBounds, normalizeEnabledItemRuleIds, normalizeOrderProduct, normalizeItemRuleStrategies, pickFirstDurationMinutesFromProducts, toNonNegativeInt, toPriceString, toBoolean, toPositiveString } from "./utils";
36
36
  import { createModule } from "../BookingByStep/types";
37
37
  import { ProductList } from "../../modules/ProductList";
38
38
  import { ScheduleModule } from "../../modules/Schedule";
@@ -852,11 +852,12 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
852
852
  mode: mode
853
853
  });
854
854
  try {
855
+ var _this$otherParams4;
855
856
  if (!this.store.order) throw new Error('order 模块未初始化');
856
857
  var tempOrder = this.store.order.ensureTempOrder();
857
858
  tempOrder.metadata = _objectSpread(_objectSpread({}, tempOrder.metadata || {}), {}, {
858
859
  shop_service_data: _objectSpread(_objectSpread({}, (tempOrder.metadata || {}).shop_service_data || {}), {}, {
859
- service_type: 'dine_in',
860
+ service_type: ((_this$otherParams4 = this.otherParams) === null || _this$otherParams4 === void 0 ? void 0 : _this$otherParams4.businessCode) === 'dine_in' ? 'dine_in' : '',
860
861
  pickup_reference_mode: mode
861
862
  })
862
863
  });
@@ -1339,7 +1340,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
1339
1340
  key: "prepareRetailAvailability",
1340
1341
  value: function () {
1341
1342
  var _prepareRetailAvailability = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
1342
- var _this$store$order4, _this$otherParams4;
1343
+ var _this$store$order4, _this$otherParams5;
1343
1344
  var tempOrder, hasOrderId, resourceId, reason, resourceState, availabilityInfo;
1344
1345
  return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1345
1346
  while (1) switch (_context17.prev = _context17.next) {
@@ -1370,7 +1371,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
1370
1371
  case 15:
1371
1372
  _context17.next = 17;
1372
1373
  return this.setItemRuleRuntimeConfig({
1373
- serviceType: (_this$otherParams4 = this.otherParams) === null || _this$otherParams4 === void 0 ? void 0 : _this$otherParams4.businessCode,
1374
+ serviceType: (_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.businessCode,
1374
1375
  submissionIndex: hasOrderId ? 1 : 0,
1375
1376
  historicalItems: []
1376
1377
  });
@@ -1520,7 +1521,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
1520
1521
  key: "submitScanOrder",
1521
1522
  value: function () {
1522
1523
  var _submitScanOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
1523
- var _this$store$resource, _this$otherParams5, _this$otherParams6, _this$otherParams7, _this$otherParams8, _tempOrder$products, tempOrderForSubmit, resourceTableName, enhancePayload, result, tempOrder;
1524
+ var _this$store$resource, _this$otherParams6, _this$otherParams7, _this$otherParams8, _this$otherParams9, _tempOrder$products, tempOrderForSubmit, resourceTableName, enhancePayload, result, tempOrder;
1524
1525
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1525
1526
  while (1) switch (_context18.prev = _context18.next) {
1526
1527
  case 0:
@@ -1548,10 +1549,10 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
1548
1549
  _context18.next = 14;
1549
1550
  return this.store.order.submitTempOrder({
1550
1551
  cacheId: this.cacheId,
1551
- platform: (_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.platform,
1552
- businessCode: (_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6.businessCode,
1553
- channel: (_this$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7.channel,
1554
- type: (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.type,
1552
+ platform: (_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6.platform,
1553
+ businessCode: (_this$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7.businessCode,
1554
+ channel: (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.channel,
1555
+ type: (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.type,
1555
1556
  enhancePayload: enhancePayload
1556
1557
  });
1557
1558
  case 14:
@@ -2481,14 +2482,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2481
2482
  }, {
2482
2483
  key: "normalizeResourceState",
2483
2484
  value: function normalizeResourceState(detail, resourceSelectType, hasOrderId) {
2484
- var _detail$form_record, _this$otherParams9, _detail$resource_capa, _detail$resource_capa2;
2485
+ var _detail$form_record, _this$otherParams10, _detail$resource_capa, _detail$resource_capa2;
2485
2486
  var currentOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.order_id);
2486
2487
  var lastOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.last_order_id);
2487
2488
  var relationId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_record_id);
2488
2489
  var tableFormId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_id);
2489
2490
  var formRecord = (_detail$form_record = detail === null || detail === void 0 ? void 0 : detail.form_record) !== null && _detail$form_record !== void 0 ? _detail$form_record : null;
2490
2491
  // 是否允许加餐
2491
- var allowSnack = ((_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 || (_this$otherParams9 = _this$otherParams9.dineInConfig) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9['sale.allow_add_items']) || false;
2492
+ var allowSnack = ((_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 || (_this$otherParams10 = _this$otherParams10.dineInConfig) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10['sale.allow_add_items']) || false;
2492
2493
  // 开启同桌验证 - 本期没有这个配置,默认关掉
2493
2494
  var deskmateValid = false;
2494
2495
  var isExclusive = resourceSelectType === 'single';
@@ -2571,7 +2572,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2571
2572
  key: "fetchResourceOccupyDetailsByResourceId",
2572
2573
  value: function () {
2573
2574
  var _fetchResourceOccupyDetailsByResourceId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(resourceId) {
2574
- var _this$otherParams10, _this$otherParams10$g, _response$data$occupy, _response$data;
2575
+ var _this$otherParams11, _this$otherParams11$g, _response$data$occupy, _response$data;
2575
2576
  var formRecordId, shopId, response;
2576
2577
  return _regeneratorRuntime().wrap(function _callee36$(_context36) {
2577
2578
  while (1) switch (_context36.prev = _context36.next) {
@@ -2583,7 +2584,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2583
2584
  }
2584
2585
  throw new Error("[ScanOrder] \u975E\u6CD5\u684C\u53F0 resourceId: ".concat(resourceId));
2585
2586
  case 3:
2586
- shopId = (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 || (_this$otherParams10$g = _this$otherParams10.getStateData) === null || _this$otherParams10$g === void 0 ? void 0 : _this$otherParams10$g.call(_this$otherParams10, 'shop_id');
2587
+ shopId = (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 || (_this$otherParams11$g = _this$otherParams11.getStateData) === null || _this$otherParams11$g === void 0 ? void 0 : _this$otherParams11$g.call(_this$otherParams11, 'shop_id');
2587
2588
  if (shopId) {
2588
2589
  _context36.next = 6;
2589
2590
  break;
@@ -2677,19 +2678,19 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2677
2678
  var hasOrderId,
2678
2679
  normalizedResourceId,
2679
2680
  _this$otherParams$bus,
2680
- _this$otherParams11,
2681
- _this$otherParams$cha,
2682
2681
  _this$otherParams12,
2682
+ _this$otherParams$cha,
2683
2683
  _this$otherParams13,
2684
- _this$otherParams13$g,
2684
+ _this$otherParams14,
2685
+ _this$otherParams14$g,
2685
2686
  _occupyDetails$,
2686
2687
  _occupyDetail$form_re,
2687
2688
  _occupyDetail$form_re2,
2688
- _this$otherParams14,
2689
- _this$store$order6,
2690
- _this$store$order8,
2691
- _this$store$order8$ge,
2692
2689
  _this$otherParams15,
2690
+ _this$store$order6,
2691
+ _this$store$order7,
2692
+ _this$store$order7$ge,
2693
+ _this$otherParams16,
2693
2694
  businessCode,
2694
2695
  channel,
2695
2696
  openDataTarget,
@@ -2713,6 +2714,8 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2713
2714
  scheduleDate,
2714
2715
  scheduleDatetime,
2715
2716
  loaded,
2717
+ matchedRuleProduct,
2718
+ ruleProductsForResource,
2716
2719
  occupancyMinutes,
2717
2720
  paxBounds,
2718
2721
  error,
@@ -2728,10 +2731,6 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2728
2731
  additionalOrderId,
2729
2732
  availabilityInfo,
2730
2733
  isAdditionalOrderMode,
2731
- _this$store$order7,
2732
- _res$data,
2733
- res,
2734
- entryPaxNumber,
2735
2734
  lastOrderInfo,
2736
2735
  historicalItems,
2737
2736
  _args37 = arguments;
@@ -2744,11 +2743,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2744
2743
  resourceId: normalizedResourceId
2745
2744
  });
2746
2745
  _context37.prev = 3;
2747
- businessCode = String((_this$otherParams$bus = (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : '').trim();
2748
- channel = String((_this$otherParams$cha = (_this$otherParams12 = this.otherParams) === null || _this$otherParams12 === void 0 ? void 0 : _this$otherParams12.channel) !== null && _this$otherParams$cha !== void 0 ? _this$otherParams$cha : '').trim();
2746
+ businessCode = String((_this$otherParams$bus = (_this$otherParams12 = this.otherParams) === null || _this$otherParams12 === void 0 ? void 0 : _this$otherParams12.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : '').trim();
2747
+ channel = String((_this$otherParams$cha = (_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13.channel) !== null && _this$otherParams$cha !== void 0 ? _this$otherParams$cha : '').trim();
2749
2748
  openDataTarget = businessCode && channel ? "".concat(businessCode, "+").concat(channel) : 'dine_in+scan_to_order';
2750
2749
  _context37.next = 9;
2751
- return (_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 || (_this$otherParams13$g = _this$otherParams13.getOpenData) === null || _this$otherParams13$g === void 0 ? void 0 : _this$otherParams13$g.call(_this$otherParams13, {
2750
+ return (_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 || (_this$otherParams14$g = _this$otherParams14.getOpenData) === null || _this$otherParams14$g === void 0 ? void 0 : _this$otherParams14$g.call(_this$otherParams14, {
2752
2751
  scope: 'board',
2753
2752
  target: openDataTarget,
2754
2753
  section_code: ['basic', 'fulfillment', 'reservation', 'sale', 'menu', 'availability', 'workflow']
@@ -2863,14 +2862,16 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2863
2862
  case 46:
2864
2863
  loaded = _context37.sent;
2865
2864
  if (Array.isArray(loaded)) {
2866
- this.enabledReservationRuleProducts = loaded;
2867
- occupancyMinutes = pickFirstDurationMinutesFromProducts(loaded);
2865
+ matchedRuleProduct = findReservationRuleProductByResourceId(loaded, normalizedResourceId);
2866
+ ruleProductsForResource = matchedRuleProduct ? [matchedRuleProduct] : [];
2867
+ this.enabledReservationRuleProducts = ruleProductsForResource;
2868
+ occupancyMinutes = pickFirstDurationMinutesFromProducts(ruleProductsForResource);
2868
2869
  if (occupancyMinutes !== undefined) {
2869
2870
  tempOrder.metadata.table_occupancy_duration = occupancyMinutes;
2870
2871
  }
2871
- if (hasCustomCapacityProduct(loaded)) {
2872
+ if (hasCustomCapacityProduct(ruleProductsForResource)) {
2872
2873
  pendingRequestEntryPax = 1;
2873
- paxBounds = pickFirstCustomCapacityPaxBounds(loaded);
2874
+ paxBounds = pickFirstCustomCapacityPaxBounds(ruleProductsForResource);
2874
2875
  if ((paxBounds === null || paxBounds === void 0 ? void 0 : paxBounds.min) !== undefined) pendingRequestPaxMin = paxBounds.min;
2875
2876
  if ((paxBounds === null || paxBounds === void 0 ? void 0 : paxBounds.max) !== undefined) pendingRequestPaxMax = paxBounds.max;
2876
2877
  }
@@ -2960,7 +2961,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2960
2961
  } : {}), this.store.resource.requestPaxMax !== undefined ? {
2961
2962
  requestPaxMax: this.store.resource.requestPaxMax
2962
2963
  } : {});
2963
- tempOrder.relation_id = normalizedResourceId || ((_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14.relation_id);
2964
+ tempOrder.relation_id = normalizedResourceId || ((_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.relation_id);
2964
2965
  tempOrder.table_form_id = resourceState.tableFormId;
2965
2966
  tempOrder.resource_id = normalizedResourceId;
2966
2967
  (_this$store$order6 = this.store.order) === null || _this$store$order6 === void 0 || _this$store$order6.persistTempOrder();
@@ -2977,27 +2978,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
2977
2978
  if (isAdditionalOrderMode) {
2978
2979
  tempOrder.order_id = additionalOrderId;
2979
2980
  }
2980
- if (!tempOrder.order_id) {
2981
- _context37.next = 86;
2982
- break;
2983
- }
2984
- _context37.next = 81;
2985
- return (_this$store$order7 = this.store.order) === null || _this$store$order7 === void 0 ? void 0 : _this$store$order7.getOrderInfoByRemote(tempOrder.order_id);
2986
- case 81:
2987
- res = _context37.sent;
2988
- // 找到下单的时候输入的 entryPaxNumber
2989
- entryPaxNumber = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.bookings) === null || _res$data === void 0 || (_res$data = _res$data.find(function (p) {
2990
- var _p$metadata;
2991
- return (_p$metadata = p.metadata) === null || _p$metadata === void 0 ? void 0 : _p$metadata.collect_pax;
2992
- })) === null || _res$data === void 0 || (_res$data = _res$data.metadata) === null || _res$data === void 0 ? void 0 : _res$data.collect_pax;
2993
- if (!entryPaxNumber) {
2994
- _context37.next = 86;
2995
- break;
2996
- }
2997
- _context37.next = 86;
2998
- return this.setEntryPaxNumber(entryPaxNumber);
2999
- case 86:
3000
- lastOrderInfo = (_this$store$order8 = this.store.order) === null || _this$store$order8 === void 0 || (_this$store$order8$ge = _this$store$order8.getLastOrderInfo) === null || _this$store$order8$ge === void 0 ? void 0 : _this$store$order8$ge.call(_this$store$order8);
2981
+ lastOrderInfo = (_this$store$order7 = this.store.order) === null || _this$store$order7 === void 0 || (_this$store$order7$ge = _this$store$order7.getLastOrderInfo) === null || _this$store$order7$ge === void 0 ? void 0 : _this$store$order7$ge.call(_this$store$order7);
3001
2982
  historicalItems = isAdditionalOrderMode && Array.isArray(lastOrderInfo === null || lastOrderInfo === void 0 ? void 0 : lastOrderInfo.products) ? lastOrderInfo.products.reduce(function (acc, p) {
3002
2983
  if (typeof (p === null || p === void 0 ? void 0 : p.product_id) !== 'number') return acc;
3003
2984
  acc.push(_objectSpread({
@@ -3008,13 +2989,13 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3008
2989
  } : {}));
3009
2990
  return acc;
3010
2991
  }, []) : []; // pax 由 setEntryPaxNumber 负责写入 itemRuleRuntimeConfig.pax
3011
- _context37.next = 90;
2992
+ _context37.next = 82;
3012
2993
  return this.setItemRuleRuntimeConfig({
3013
- serviceType: (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.businessCode,
2994
+ serviceType: (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.businessCode,
3014
2995
  submissionIndex: isAdditionalOrderMode ? 1 : 0,
3015
2996
  historicalItems: historicalItems
3016
2997
  });
3017
- case 90:
2998
+ case 82:
3018
2999
  // operating_hours 超出营业时段 + closed_behavior=show_menu_disabled:
3019
3000
  // 允许浏览商品但 UI 层需拦截“下一步”,这里覆盖最终 mode 并回传错误提示
3020
3001
  if (outsideOperatingHours && closedBehaviorValue === 'show_menu_disabled') {
@@ -3036,31 +3017,70 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3036
3017
  isFull: resourceState.isFull
3037
3018
  });
3038
3019
  return _context37.abrupt("return", availabilityInfo);
3039
- case 95:
3040
- _context37.prev = 95;
3020
+ case 87:
3021
+ _context37.prev = 87;
3041
3022
  _context37.t0 = _context37["catch"](3);
3042
3023
  this.logMethodError('checkResourceAvailable', _context37.t0.message, {
3043
3024
  resourceId: normalizedResourceId
3044
3025
  });
3045
3026
  throw _context37.t0;
3046
- case 99:
3027
+ case 91:
3047
3028
  case "end":
3048
3029
  return _context37.stop();
3049
3030
  }
3050
- }, _callee37, this, [[3, 95]]);
3031
+ }, _callee37, this, [[3, 87]]);
3051
3032
  }));
3052
3033
  function checkResourceAvailable(_x19) {
3053
3034
  return _checkResourceAvailable.apply(this, arguments);
3054
3035
  }
3055
3036
  return checkResourceAvailable;
3037
+ }() // 恢复之前订单的数据,读取 entrypax
3038
+ }, {
3039
+ key: "restorePreviousOrderData",
3040
+ value: function () {
3041
+ var _restorePreviousOrderData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
3042
+ var tempOrder, _this$store$order8, _res$data, res, entryPaxNumber;
3043
+ return _regeneratorRuntime().wrap(function _callee38$(_context38) {
3044
+ while (1) switch (_context38.prev = _context38.next) {
3045
+ case 0:
3046
+ tempOrder = this.ensureTempOrder();
3047
+ if (!tempOrder.order_id) {
3048
+ _context38.next = 9;
3049
+ break;
3050
+ }
3051
+ _context38.next = 4;
3052
+ return (_this$store$order8 = this.store.order) === null || _this$store$order8 === void 0 ? void 0 : _this$store$order8.getOrderInfoByRemote(tempOrder.order_id);
3053
+ case 4:
3054
+ res = _context38.sent;
3055
+ // 找到下单的时候输入的 entryPaxNumber
3056
+ entryPaxNumber = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.bookings) === null || _res$data === void 0 || (_res$data = _res$data.find(function (p) {
3057
+ var _p$metadata;
3058
+ return (_p$metadata = p.metadata) === null || _p$metadata === void 0 ? void 0 : _p$metadata.collect_pax;
3059
+ })) === null || _res$data === void 0 || (_res$data = _res$data.metadata) === null || _res$data === void 0 ? void 0 : _res$data.collect_pax;
3060
+ if (!entryPaxNumber) {
3061
+ _context38.next = 9;
3062
+ break;
3063
+ }
3064
+ _context38.next = 9;
3065
+ return this.setEntryPaxNumber(entryPaxNumber);
3066
+ case 9:
3067
+ case "end":
3068
+ return _context38.stop();
3069
+ }
3070
+ }, _callee38, this);
3071
+ }));
3072
+ function restorePreviousOrderData() {
3073
+ return _restorePreviousOrderData.apply(this, arguments);
3074
+ }
3075
+ return restorePreviousOrderData;
3056
3076
  }() // 如果是加单的情况,提供返回当前订单相关信息的能力
3057
3077
  }, {
3058
3078
  key: "getAdditionalOrderInfo",
3059
3079
  value: function () {
3060
- var _getAdditionalOrderInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
3080
+ var _getAdditionalOrderInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
3061
3081
  var result;
3062
- return _regeneratorRuntime().wrap(function _callee38$(_context38) {
3063
- while (1) switch (_context38.prev = _context38.next) {
3082
+ return _regeneratorRuntime().wrap(function _callee39$(_context39) {
3083
+ while (1) switch (_context39.prev = _context39.next) {
3064
3084
  case 0:
3065
3085
  this.logMethodStart('getAdditionalOrderInfo');
3066
3086
  result = {
@@ -3074,12 +3094,12 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3074
3094
  orderId: result.orderId,
3075
3095
  orderStatus: result.orderStatus
3076
3096
  });
3077
- return _context38.abrupt("return", result);
3097
+ return _context39.abrupt("return", result);
3078
3098
  case 4:
3079
3099
  case "end":
3080
- return _context38.stop();
3100
+ return _context39.stop();
3081
3101
  }
3082
- }, _callee38, this);
3102
+ }, _callee39, this);
3083
3103
  }));
3084
3104
  function getAdditionalOrderInfo() {
3085
3105
  return _getAdditionalOrderInfo.apply(this, arguments);
@@ -3089,25 +3109,25 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3089
3109
  }, {
3090
3110
  key: "getProductList",
3091
3111
  value: function () {
3092
- var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
3093
- var _this$otherParams16;
3112
+ var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
3113
+ var _this$otherParams17;
3094
3114
  var menu_list_ids, res, productList, formattedRes;
3095
- return _regeneratorRuntime().wrap(function _callee39$(_context39) {
3096
- while (1) switch (_context39.prev = _context39.next) {
3115
+ return _regeneratorRuntime().wrap(function _callee40$(_context40) {
3116
+ while (1) switch (_context40.prev = _context40.next) {
3097
3117
  case 0:
3098
3118
  this.logMethodStart('getProductList');
3099
3119
  // 可以直接通过配置里的 menu 读取
3100
- menu_list_ids = ((_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 || (_this$otherParams16 = _this$otherParams16.dineInConfig) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16['menu.associated_menus'].map(function (n) {
3120
+ menu_list_ids = ((_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 || (_this$otherParams17 = _this$otherParams17.dineInConfig) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17['menu.associated_menus'].map(function (n) {
3101
3121
  return Number(n.value);
3102
3122
  })) || [];
3103
- _context39.prev = 2;
3123
+ _context40.prev = 2;
3104
3124
  if (this.store.products) {
3105
- _context39.next = 5;
3125
+ _context40.next = 5;
3106
3126
  break;
3107
3127
  }
3108
3128
  throw new Error('products 模块未初始化');
3109
3129
  case 5:
3110
- _context39.next = 7;
3130
+ _context40.next = 7;
3111
3131
  return this.store.products.loadProducts({
3112
3132
  menu_list_ids: menu_list_ids,
3113
3133
  cacheId: this.cacheId,
@@ -3115,7 +3135,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3115
3135
  schedule_datetime: dayjs().format('YYYY-MM-DD HH:mm:ss')
3116
3136
  });
3117
3137
  case 7:
3118
- res = _context39.sent;
3138
+ res = _context40.sent;
3119
3139
  productList = this.assertProductListLoaded('getProductList', res, {
3120
3140
  menu_list_ids: menu_list_ids,
3121
3141
  cacheId: this.cacheId
@@ -3124,22 +3144,22 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3124
3144
  this.logMethodSuccess('getProductList', {
3125
3145
  menuCount: menu_list_ids.length
3126
3146
  });
3127
- return _context39.abrupt("return", formattedRes);
3147
+ return _context40.abrupt("return", formattedRes);
3128
3148
  case 14:
3129
- _context39.prev = 14;
3130
- _context39.t0 = _context39["catch"](2);
3131
- if (!(_context39.t0 !== null && _context39.t0 !== void 0 && _context39.t0.__scanOrderLogged)) {
3132
- this.logMethodError('getProductList', _context39.t0, {
3149
+ _context40.prev = 14;
3150
+ _context40.t0 = _context40["catch"](2);
3151
+ if (!(_context40.t0 !== null && _context40.t0 !== void 0 && _context40.t0.__scanOrderLogged)) {
3152
+ this.logMethodError('getProductList', _context40.t0, {
3133
3153
  menu_list_ids: menu_list_ids,
3134
3154
  cacheId: this.cacheId
3135
3155
  });
3136
3156
  }
3137
- throw _context39.t0;
3157
+ throw _context40.t0;
3138
3158
  case 18:
3139
3159
  case "end":
3140
- return _context39.stop();
3160
+ return _context40.stop();
3141
3161
  }
3142
- }, _callee39, this, [[2, 14]]);
3162
+ }, _callee40, this, [[2, 14]]);
3143
3163
  }));
3144
3164
  function getProductList() {
3145
3165
  return _getProductList.apply(this, arguments);
@@ -3154,15 +3174,15 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3154
3174
  }, {
3155
3175
  key: "setOtherParams",
3156
3176
  value: function () {
3157
- var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
3177
+ var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
3158
3178
  var _ref9,
3159
3179
  _ref9$cover,
3160
3180
  cover,
3161
- _args40 = arguments;
3162
- return _regeneratorRuntime().wrap(function _callee40$(_context40) {
3163
- while (1) switch (_context40.prev = _context40.next) {
3181
+ _args41 = arguments;
3182
+ return _regeneratorRuntime().wrap(function _callee41$(_context41) {
3183
+ while (1) switch (_context41.prev = _context41.next) {
3164
3184
  case 0:
3165
- _ref9 = _args40.length > 1 && _args40[1] !== undefined ? _args40[1] : {}, _ref9$cover = _ref9.cover, cover = _ref9$cover === void 0 ? false : _ref9$cover;
3185
+ _ref9 = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {}, _ref9$cover = _ref9.cover, cover = _ref9$cover === void 0 ? false : _ref9$cover;
3166
3186
  if (cover) {
3167
3187
  this.otherParams = params;
3168
3188
  } else {
@@ -3170,9 +3190,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3170
3190
  }
3171
3191
  case 2:
3172
3192
  case "end":
3173
- return _context40.stop();
3193
+ return _context41.stop();
3174
3194
  }
3175
- }, _callee40, this);
3195
+ }, _callee41, this);
3176
3196
  }));
3177
3197
  function setOtherParams(_x20) {
3178
3198
  return _setOtherParams.apply(this, arguments);
@@ -3264,10 +3284,10 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3264
3284
  }, {
3265
3285
  key: "setEntryPaxNumber",
3266
3286
  value: function () {
3267
- var _setEntryPaxNumber = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(number) {
3287
+ var _setEntryPaxNumber = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(number) {
3268
3288
  var pax, t;
3269
- return _regeneratorRuntime().wrap(function _callee41$(_context41) {
3270
- while (1) switch (_context41.prev = _context41.next) {
3289
+ return _regeneratorRuntime().wrap(function _callee42$(_context42) {
3290
+ while (1) switch (_context42.prev = _context42.next) {
3271
3291
  case 0:
3272
3292
  pax = normalizeSubmitCollectPaxValue(number);
3273
3293
  this.store.entryPaxNumber = pax;
@@ -3288,16 +3308,16 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3288
3308
  }
3289
3309
  });
3290
3310
  this.itemRulePrefillApplied = false;
3291
- _context41.next = 7;
3311
+ _context42.next = 7;
3292
3312
  return this.refreshItemRuleQuantityLimits();
3293
3313
  case 7:
3294
- _context41.next = 9;
3314
+ _context42.next = 9;
3295
3315
  return this.refreshCartValidationPassed();
3296
3316
  case 9:
3297
3317
  case "end":
3298
- return _context41.stop();
3318
+ return _context42.stop();
3299
3319
  }
3300
- }, _callee41, this);
3320
+ }, _callee42, this);
3301
3321
  }));
3302
3322
  function setEntryPaxNumber(_x21) {
3303
3323
  return _setEntryPaxNumber.apply(this, arguments);
@@ -3312,11 +3332,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3312
3332
  }, {
3313
3333
  key: "syncAdditionalOrderFromResource",
3314
3334
  value: function () {
3315
- var _syncAdditionalOrderFromResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(resourceId) {
3316
- var _ref10, _ref11, _ref12, _this$store$resource2, _this$store$resource3, _occupyDetails$2, _this$store$resource4, _this$otherParams17, _this$store$order9;
3335
+ var _syncAdditionalOrderFromResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(resourceId) {
3336
+ var _ref10, _ref11, _ref12, _this$store$resource2, _this$store$resource3, _occupyDetails$2, _this$store$resource4, _this$otherParams18, _this$store$order9;
3317
3337
  var tempOrder, normalizedResourceId, _result, occupyDetails, occupyDetail, resourceSelectType, allowAddItems, result;
3318
- return _regeneratorRuntime().wrap(function _callee42$(_context42) {
3319
- while (1) switch (_context42.prev = _context42.next) {
3338
+ return _regeneratorRuntime().wrap(function _callee43$(_context43) {
3339
+ while (1) switch (_context43.prev = _context43.next) {
3320
3340
  case 0:
3321
3341
  tempOrder = this.ensureTempOrder();
3322
3342
  normalizedResourceId = String((_ref10 = (_ref11 = (_ref12 = resourceId !== null && resourceId !== void 0 ? resourceId : tempOrder.resource_id) !== null && _ref12 !== void 0 ? _ref12 : (_this$store$resource2 = this.store.resource) === null || _this$store$resource2 === void 0 ? void 0 : _this$store$resource2.relationId) !== null && _ref11 !== void 0 ? _ref11 : (_this$store$resource3 = this.store.resource) === null || _this$store$resource3 === void 0 ? void 0 : _this$store$resource3.relation_id) !== null && _ref10 !== void 0 ? _ref10 : '').trim();
@@ -3324,7 +3344,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3324
3344
  resourceId: normalizedResourceId
3325
3345
  });
3326
3346
  if (normalizedResourceId) {
3327
- _context42.next = 7;
3347
+ _context43.next = 7;
3328
3348
  break;
3329
3349
  }
3330
3350
  _result = {
@@ -3332,18 +3352,18 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3332
3352
  reason: 'missing_resource_id'
3333
3353
  };
3334
3354
  this.logMethodSuccess('syncAdditionalOrderFromResource', _result);
3335
- return _context42.abrupt("return", _result);
3355
+ return _context43.abrupt("return", _result);
3336
3356
  case 7:
3337
- _context42.next = 9;
3357
+ _context43.next = 9;
3338
3358
  return this.fetchResourceOccupyDetailsByResourceId(normalizedResourceId);
3339
3359
  case 9:
3340
- occupyDetails = _context42.sent;
3360
+ occupyDetails = _context43.sent;
3341
3361
  occupyDetail = (_occupyDetails$2 = occupyDetails[0]) !== null && _occupyDetails$2 !== void 0 ? _occupyDetails$2 : null;
3342
3362
  resourceSelectType = ((_this$store$resource4 = this.store.resource) === null || _this$store$resource4 === void 0 ? void 0 : _this$store$resource4.resourceSelectType) || this.resolveResourceSelectType(toPositiveString(occupyDetail === null || occupyDetail === void 0 ? void 0 : occupyDetail.form_id));
3343
- allowAddItems = toBoolean((_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 || (_this$otherParams17 = _this$otherParams17.dineInConfig) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17['sale.allow_add_items']);
3363
+ allowAddItems = toBoolean((_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 || (_this$otherParams18 = _this$otherParams18.dineInConfig) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18['sale.allow_add_items']);
3344
3364
  result = this.resolveAdditionalOrderFromOccupyDetail(occupyDetail, resourceSelectType, allowAddItems);
3345
3365
  if (!(!result.matched || !result.order_id)) {
3346
- _context42.next = 17;
3366
+ _context43.next = 17;
3347
3367
  break;
3348
3368
  }
3349
3369
  this.logMethodSuccess('syncAdditionalOrderFromResource', _objectSpread(_objectSpread({}, result), {}, {
@@ -3351,7 +3371,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3351
3371
  resourceSelectType: resourceSelectType,
3352
3372
  allowAddItems: allowAddItems
3353
3373
  }));
3354
- return _context42.abrupt("return", result);
3374
+ return _context43.abrupt("return", result);
3355
3375
  case 17:
3356
3376
  tempOrder.order_id = result.order_id;
3357
3377
  tempOrder.resource_id = normalizedResourceId;
@@ -3363,12 +3383,12 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3363
3383
  resourceSelectType: resourceSelectType,
3364
3384
  allowAddItems: allowAddItems
3365
3385
  }));
3366
- return _context42.abrupt("return", result);
3386
+ return _context43.abrupt("return", result);
3367
3387
  case 24:
3368
3388
  case "end":
3369
- return _context42.stop();
3389
+ return _context43.stop();
3370
3390
  }
3371
- }, _callee42, this);
3391
+ }, _callee43, this);
3372
3392
  }));
3373
3393
  function syncAdditionalOrderFromResource(_x22) {
3374
3394
  return _syncAdditionalOrderFromResource.apply(this, arguments);
@@ -3398,9 +3418,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3398
3418
  }, {
3399
3419
  key: "checkAllowAddItems",
3400
3420
  value: function checkAllowAddItems() {
3401
- var _this$otherParams18;
3421
+ var _this$otherParams19;
3402
3422
  this.logMethodStart('checkAllowAddItems');
3403
- var dineInConfig = ((_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.dineInConfig) || {};
3423
+ var dineInConfig = ((_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.dineInConfig) || {};
3404
3424
  var result = {
3405
3425
  enabled: toBoolean(dineInConfig['sale.allow_add_items'])
3406
3426
  };
@@ -3413,9 +3433,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3413
3433
  }, {
3414
3434
  key: "getFulfillmentModes",
3415
3435
  value: function getFulfillmentModes() {
3416
- var _this$otherParams19;
3436
+ var _this$otherParams20;
3417
3437
  this.logMethodStart('getFulfillmentModes');
3418
- var dineInConfig = ((_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.dineInConfig) || {};
3438
+ var dineInConfig = ((_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.dineInConfig) || {};
3419
3439
  var result = {
3420
3440
  enablePickup: Boolean(dineInConfig['fulfillment.enable_pickup']),
3421
3441
  enableTableService: Boolean(dineInConfig['fulfillment.enable_table_service'])
@@ -3429,9 +3449,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseModule) {
3429
3449
  }, {
3430
3450
  key: "checkManualPickupRef",
3431
3451
  value: function checkManualPickupRef() {
3432
- var _this$otherParams20;
3452
+ var _this$otherParams21;
3433
3453
  this.logMethodStart('checkManualPickupRef');
3434
- var dineInConfig = ((_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.dineInConfig) || {};
3454
+ var dineInConfig = ((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.dineInConfig) || {};
3435
3455
  var refMode = dineInConfig['fulfillment.fulfillment_ref_mode'];
3436
3456
  var manualInputType = dineInConfig['fulfillment.manual_input_type'];
3437
3457
  var enabled = refMode === 'manual_input';
@@ -134,6 +134,11 @@ export declare function normalizeOrderProduct(product: Partial<ScanOrderOrderPro
134
134
  * 从 reservation.enabled_reservation_rules 中收集 type=link 的商品 id。
135
135
  */
136
136
  export declare function collectLinkProductIdsFromReservationRules(rules: unknown): number[];
137
+ /**
138
+ * 找到第一个归属指定桌台的预约规则商品。
139
+ * 归属判断基于商品资源中的 default_resource / optional_resource。
140
+ */
141
+ export declare function findReservationRuleProductByResourceId(products: ProductData[], resourceId: string | number | null | undefined): ProductData | undefined;
137
142
  /**
138
143
  * 返回列表中第一个带有效 duration.value(分钟)的商品时长。
139
144
  */