@alipay/ams-checkout 0.0.1725951289-dev.7 → 0.0.1726046231-dev.1

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 (125) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/config/index.d.ts +7 -7
  3. package/esm/config/index.js +8 -8
  4. package/esm/constant/index.d.ts +6 -3
  5. package/esm/constant/index.js +8 -3
  6. package/esm/core/bus/ability/globalData.d.ts +10 -0
  7. package/esm/core/bus/ability/globalData.js +89 -0
  8. package/esm/core/bus/ability/request.d.ts +10 -0
  9. package/esm/core/bus/ability/request.js +151 -0
  10. package/esm/core/bus/interface.d.ts +12 -0
  11. package/esm/core/bus/interface.js +16 -2
  12. package/esm/core/component/address.d.ts +2 -2
  13. package/esm/core/component/appPreloadProcessing.js +2 -0
  14. package/esm/core/component/ckp/index.d.ts +3 -3
  15. package/esm/core/component/ckp/index.js +3 -3
  16. package/esm/core/component/element/components/address.d.ts +17 -0
  17. package/esm/core/component/element/components/address.js +63 -0
  18. package/esm/core/component/element/components/auth.d.ts +17 -0
  19. package/esm/core/component/element/components/auth.js +54 -0
  20. package/esm/core/component/element/components/payment.d.ts +17 -0
  21. package/esm/core/component/element/components/payment.js +67 -0
  22. package/esm/core/component/element/index.d.ts +44 -0
  23. package/esm/core/component/element/index.js +625 -0
  24. package/esm/core/component/element/mock.d.ts +3 -0
  25. package/esm/core/component/element/mock.js +1156 -0
  26. package/esm/core/component/element/type.d.ts +161 -0
  27. package/esm/core/component/element/type.js +26 -0
  28. package/esm/core/component/element/utils.d.ts +13 -0
  29. package/esm/core/component/element/utils.js +6 -0
  30. package/esm/core/component/index.d.ts +5 -5
  31. package/esm/core/component/index.js +20 -16
  32. package/esm/core/drop-in/index.d.ts +2 -2
  33. package/esm/core/drop-in/index.js +2 -2
  34. package/esm/core/instance/index.d.ts +5 -5
  35. package/esm/core/instance/index.js +11 -10
  36. package/esm/foundation/core/index.d.ts +26 -0
  37. package/esm/foundation/core/index.js +301 -0
  38. package/esm/foundation/index.d.ts +71 -0
  39. package/esm/foundation/index.js +42 -0
  40. package/esm/foundation/product-processor/easysafepay/deps.d.ts +15 -0
  41. package/esm/foundation/product-processor/easysafepay/deps.js +9 -0
  42. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  43. package/esm/foundation/product-processor/easysafepay/index.js +536 -0
  44. package/esm/foundation/service/container/index.d.ts +28 -0
  45. package/esm/foundation/service/container/index.js +255 -0
  46. package/esm/foundation/service/container/popup.d.ts +17 -0
  47. package/esm/foundation/service/container/popup.js +103 -0
  48. package/esm/foundation/service/container/utils.d.ts +7 -0
  49. package/esm/foundation/service/container/utils.js +48 -0
  50. package/esm/foundation/service/event-bus/ability/callback.d.ts +9 -0
  51. package/esm/foundation/service/event-bus/ability/callback.js +55 -0
  52. package/esm/foundation/service/event-bus/ability/globalData.d.ts +10 -0
  53. package/esm/foundation/service/event-bus/ability/globalData.js +89 -0
  54. package/esm/foundation/service/event-bus/ability/request.d.ts +10 -0
  55. package/esm/foundation/service/event-bus/ability/request.js +151 -0
  56. package/esm/foundation/service/event-bus/ability/security.d.ts +12 -0
  57. package/esm/foundation/service/event-bus/ability/security.js +151 -0
  58. package/esm/foundation/service/event-bus/ability/tracker.d.ts +9 -0
  59. package/esm/foundation/service/event-bus/ability/tracker.js +80 -0
  60. package/esm/foundation/service/event-bus/busManager.d.ts +127 -0
  61. package/esm/foundation/service/event-bus/busManager.js +398 -0
  62. package/esm/foundation/service/event-bus/index.d.ts +20 -0
  63. package/esm/foundation/service/event-bus/index.js +88 -0
  64. package/esm/foundation/service/event-center.d.ts +75 -0
  65. package/esm/foundation/service/event-center.js +244 -0
  66. package/esm/foundation/service/global-data/index.d.ts +11 -0
  67. package/esm/foundation/service/global-data/index.js +69 -0
  68. package/esm/foundation/service/index.d.ts +19 -0
  69. package/esm/foundation/service/index.js +82 -0
  70. package/esm/foundation/service/log/index.d.ts +43 -0
  71. package/esm/foundation/service/log/index.js +235 -0
  72. package/esm/foundation/service/log/types.d.ts +32 -0
  73. package/esm/foundation/service/log/types.js +1 -0
  74. package/esm/foundation/service/requester/deps.d.ts +17 -0
  75. package/esm/foundation/service/requester/deps.js +11 -0
  76. package/esm/foundation/service/requester/requester.d.ts +22 -0
  77. package/esm/foundation/service/requester/requester.js +211 -0
  78. package/esm/foundation/service/security/index.d.ts +26 -0
  79. package/esm/foundation/service/security/index.js +216 -0
  80. package/esm/{util → foundation/service/security}/security.d.ts +2 -2
  81. package/esm/{util → foundation/service/security}/security.js +3 -3
  82. package/esm/foundation/types/index.d.ts +4 -0
  83. package/esm/foundation/types/index.js +4 -0
  84. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  85. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  86. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  87. package/esm/foundation/utils/payment_context_utils.js +57 -0
  88. package/esm/foundation/utils/redirect_utils.d.ts +6 -0
  89. package/esm/foundation/utils/redirect_utils.js +99 -0
  90. package/esm/foundation/utils/system_events.d.ts +4 -0
  91. package/esm/foundation/utils/system_events.js +71 -0
  92. package/esm/foundation/utils/web_app_url_utils.d.ts +37 -0
  93. package/esm/foundation/utils/web_app_url_utils.js +97 -0
  94. package/esm/index.d.ts +16 -10
  95. package/esm/index.js +70 -59
  96. package/esm/plugin/applepay/component.js +3 -3
  97. package/esm/plugin/applepay/service.d.ts +2 -2
  98. package/esm/plugin/applepay/service.js +2 -2
  99. package/esm/plugin/component/cashierApp.d.ts +7 -5
  100. package/esm/plugin/component/cashierApp.js +16 -8
  101. package/esm/plugin/component/channel.d.ts +3 -4
  102. package/esm/plugin/component/channel.js +1 -37
  103. package/esm/plugin/component/component.inline.style.d.ts +4 -4
  104. package/esm/plugin/component/component.inline.style.js +10 -7
  105. package/esm/plugin/component/component.popup.style.d.ts +15 -6
  106. package/esm/plugin/component/component.popup.style.js +33 -15
  107. package/esm/plugin/component/index.d.ts +7 -7
  108. package/esm/plugin/component/index.js +124 -127
  109. package/esm/plugin/const.js +5 -5
  110. package/esm/plugin/drop-in/index.d.ts +5 -5
  111. package/esm/plugin/drop-in/index.js +7 -7
  112. package/esm/plugin/payment-element/utils.d.ts +1 -1
  113. package/esm/plugin/payment-element/utils.js +2 -1
  114. package/esm/plugin/type.d.ts +4 -4
  115. package/esm/service/element.d.ts +4 -0
  116. package/esm/service/element.js +51 -0
  117. package/esm/service/index.d.ts +1 -0
  118. package/esm/service/index.js +2 -0
  119. package/esm/types/index.d.ts +239 -38
  120. package/esm/types/index.js +102 -59
  121. package/esm/util/createIframeNode.d.ts +2 -2
  122. package/esm/util/createIframeNode.js +3 -3
  123. package/esm/util/index.d.ts +1 -1
  124. package/esm/util/index.js +3 -4
  125. package/package.json +2 -1
@@ -21,14 +21,14 @@ import { v4 as uuid } from 'uuid';
21
21
  import { sdkVersion } from "../../config";
22
22
  import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID, POPUP_LOADTIME_LOG_LIMIT, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../constant";
23
23
  import { queryPaymentInfo, submitPayInfo } from "../../service";
24
- import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, RedirectType, renderDisplayTypeEnum, targetEnum } from "../../types";
24
+ import { ComponentSignEnum, DisplayTypeEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, TargetEnum } from "../../types";
25
25
  import { getType, isJsonString, isPC } from "../../util";
26
26
  import { isLocalMock } from "../../util/mock";
27
27
  import { matchVersion } from "../../util/versionCompare";
28
28
  import { getBackScheme } from "../../util/getBackScheme";
29
29
  import { handlePaymentSessionConfig } from "../payment-element/utils";
30
30
  import { createIframe, createPreloadIframe, getAppDomain, getIframeUrl } from "./cashierApp";
31
- import { getChannelBehavior, handleGooglePay } from "./channel";
31
+ import { getChannelBehavior } from "./channel";
32
32
  import { addInlineLoading, createInlineBaseElement } from "./component.inline.style";
33
33
  import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup, slideInAndOutKeyframes } from "./component.popup.style";
34
34
  import { createModal, destroyModal, insertStyleSheet, removePopupLoading } from "./popupWindow.style";
@@ -54,9 +54,9 @@ var ComponentApp = /*#__PURE__*/function () {
54
54
  _defineProperty(this, "_actionQueryPromise", null);
55
55
  _defineProperty(this, "_actionSubmitPromise", null);
56
56
  _defineProperty(this, "_renderParams", null);
57
- _defineProperty(this, "_componentSign", componentSignEnum.NONE);
57
+ _defineProperty(this, "_componentSign", ComponentSignEnum.NONE);
58
58
  _defineProperty(this, "_appLocationSearch", void 0);
59
- _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
59
+ _defineProperty(this, "_renderDisplayType", DisplayTypeEnum.popup);
60
60
  _defineProperty(this, "_multipleCallbackEvents", void 0);
61
61
  _defineProperty(this, "_isAppWebview", void 0);
62
62
  _defineProperty(this, "_merchantAppointParam", void 0);
@@ -70,7 +70,7 @@ var ComponentApp = /*#__PURE__*/function () {
70
70
  this.createPreloadIframeNode = function () {
71
71
  return Promise.resolve();
72
72
  };
73
- this.platform = isPC() ? platformEnum.desktop : platformEnum.mobile;
73
+ this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
74
74
  this._isRetention = true;
75
75
  this._appLocationSearch = '';
76
76
  this._performanceData.push({
@@ -105,7 +105,7 @@ var ComponentApp = /*#__PURE__*/function () {
105
105
  var paymentSessionMetaData = (_this$_renderParams = this._renderParams) === null || _this$_renderParams === void 0 ? void 0 : _this$_renderParams.paymentSessionMetaData;
106
106
  var paymentSessionConfig = paymentSessionMetaData.paymentSessionConfig;
107
107
  this.AMSSDK.logger.setMedta({
108
- platform: this.platform === platformEnum.desktop ? 'PC' : 'WAP',
108
+ platform: this.platform === PlatformEnum.desktop ? 'PC' : 'WAP',
109
109
  // PC/WAP,
110
110
  sdkVersion: sdkVersion,
111
111
  webAppVersion: this._appVersion,
@@ -142,8 +142,8 @@ var ComponentApp = /*#__PURE__*/function () {
142
142
  var _this$_renderParams4,
143
143
  _this = this;
144
144
  var product = (_this$_renderParams4 = this._renderParams) === null || _this$_renderParams4 === void 0 || (_this$_renderParams4 = _this$_renderParams4.paymentSessionMetaData) === null || _this$_renderParams4 === void 0 || (_this$_renderParams4 = _this$_renderParams4.paymentSessionConfig) === null || _this$_renderParams4 === void 0 ? void 0 : _this$_renderParams4.productScene;
145
- if (componentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
146
- if (componentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
145
+ if (ComponentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
146
+ if (ComponentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
147
147
  this.AMSSDK.logger.logInfo({
148
148
  title: 'sdk_event_security_unneeded_scenarios'
149
149
  }, {
@@ -268,8 +268,10 @@ var ComponentApp = /*#__PURE__*/function () {
268
268
  this._componentSign = componentSign;
269
269
  if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
270
270
  this._renderDisplayType = renderParams.renderDisplayType;
271
+ var appendAliasContainerId = renderParams.appendAliasContainerId ? "-".concat(this._selector) : '';
272
+ var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
273
+ var insertedNode = this._renderDisplayType === DisplayTypeEnum.inline ? "#".concat(inlineId) : this._selector;
271
274
  this._isAppWebview = renderParams.isAppWebview;
272
- var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(COMPONENT_CONTAINER_ID) : this._selector;
273
275
  this.initLoggerMeta();
274
276
  this.initSecurity();
275
277
  this._performanceData.push({
@@ -301,14 +303,14 @@ var ComponentApp = /*#__PURE__*/function () {
301
303
  version: productSceneVersion,
302
304
  product: this.AMSSDK.options.product
303
305
  }).send();
304
- if (componentSignEnum.EASY_PAY_WALLET === this._componentSign) {
305
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
306
+ if (ComponentSignEnum.EASY_PAY_WALLET === this._componentSign) {
307
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
306
308
  // EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
307
309
  this.handleAuthUrlInfo(authUrlInfo);
308
310
  return;
309
311
  }
310
312
  }
311
- if (componentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
313
+ if (ComponentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
312
314
  var _this$_renderParams9, _action$web, _action$wap;
313
315
  var action = ((_this$_renderParams9 = this._renderParams) === null || _this$_renderParams9 === void 0 || (_this$_renderParams9 = _this$_renderParams9.paymentSessionMetaData) === null || _this$_renderParams9 === void 0 ? void 0 : _this$_renderParams9.action) || {};
314
316
  var signType = isPC() ? action === null || action === void 0 || (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 || (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType;
@@ -319,7 +321,7 @@ var ComponentApp = /*#__PURE__*/function () {
319
321
  return;
320
322
  }
321
323
  }
322
- if (componentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
324
+ if (ComponentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
323
325
  if (requireFastSdk === true && productSceneVersion === '1.0') {
324
326
  // REDIRECT,requireFastSdk为true,不需要接口请求
325
327
  this.handleAuthUrlInfo(authUrlInfo);
@@ -334,12 +336,12 @@ var ComponentApp = /*#__PURE__*/function () {
334
336
  this.dispatchToSDK(EVENT.eventCallback.name, {
335
337
  code: eventCodeEnum.SDK_START_OF_LOADING
336
338
  });
337
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
338
- var container = createInlineBaseElement(this._selector);
339
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
340
+ var container = createInlineBaseElement(this._selector, COMPONENT_CONTAINER_ID, inlineId);
339
341
  if (container) this.renderInlineLoading(renderParams, container);
340
342
  insertStyleSheet();
341
343
  }
342
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
344
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
343
345
  var _this$_renderParams10;
344
346
  createBaseElement(this.platform, this.closeBtnFunc.bind(this));
345
347
  createRetentionPopup(this.platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
@@ -382,7 +384,7 @@ var ComponentApp = /*#__PURE__*/function () {
382
384
  key: "setParameterDefaultValues",
383
385
  value: function setParameterDefaultValues(componentSign, renderParams) {
384
386
  var newParams = Object.assign({}, renderParams);
385
- if (componentSign === componentSignEnum.VAULTING_CARD) {
387
+ if (componentSign === ComponentSignEnum.VAULTING_CARD) {
386
388
  var _newParams$notRedirec;
387
389
  newParams.notRedirectAfterComplete = (_newParams$notRedirec = newParams === null || newParams === void 0 ? void 0 : newParams.notRedirectAfterComplete) !== null && _newParams$notRedirec !== void 0 ? _newParams$notRedirec : true;
388
390
  }
@@ -451,8 +453,8 @@ var ComponentApp = /*#__PURE__*/function () {
451
453
  // eslint-disable-next-line no-async-promise-executor
452
454
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
453
455
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
454
- var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
455
- var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams8, _action$web2, _action$wap2, action, signType;
456
+ var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6, _this5$_renderParams7;
457
+ var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams8, _this5$_renderParams9, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _ref9, _ref9$action, _ref9$action2, _ref9$action2$autoDeb, autoDebitWithToken, _this5$_renderParams10, _action$web2, _action$wap2, action, signType;
456
458
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
457
459
  while (1) switch (_context2.prev = _context2.next) {
458
460
  case 0:
@@ -488,11 +490,10 @@ var ComponentApp = /*#__PURE__*/function () {
488
490
  success: true
489
491
  }));
490
492
  case 9:
491
- if (componentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
493
+ if (ComponentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
492
494
  params.paymentSessionConfig = handlePaymentSessionConfig(params.paymentSessionConfig);
493
495
  }
494
- /** 地址组件跳过接口查询 */
495
- if (!(componentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
496
+ if (!(ComponentSignEnum.ELEMENT_PAYMENT === _this5._componentSign && _this5 !== null && _this5 !== void 0 && (_this5$_renderParams6 = _this5._renderParams) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.paymentSessionMetaData) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.connectFactor) !== null && _this5$_renderParams6 !== void 0 && _this5$_renderParams6.enableConnect)) {
496
497
  _context2.next = 12;
497
498
  break;
498
499
  }
@@ -501,22 +502,31 @@ var ComponentApp = /*#__PURE__*/function () {
501
502
  success: true
502
503
  }));
503
504
  case 12:
504
- if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
505
- _context2.next = 24;
505
+ if (!(ComponentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
506
+ _context2.next = 14;
507
+ break;
508
+ }
509
+ return _context2.abrupt("return", resolve({
510
+ message: 'sdk no need to make query request',
511
+ success: true
512
+ }));
513
+ case 14:
514
+ if (!(ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
515
+ _context2.next = 26;
506
516
  break;
507
517
  }
508
518
  if (!enableVaultingApiOptimize) {
509
- _context2.next = 24;
519
+ _context2.next = 26;
510
520
  break;
511
521
  }
512
522
  if (!skipSdkQueryForm) {
513
- _context2.next = 21;
523
+ _context2.next = 23;
514
524
  break;
515
525
  }
516
526
  // 优先判断 skipSdkQueryForm
517
527
  ifSkip = matchVersion(skipSdkQueryForm, _this5._appVersion);
518
528
  if (!ifSkip) {
519
- _context2.next = 19;
529
+ _context2.next = 21;
520
530
  break;
521
531
  }
522
532
  resolve({
@@ -524,12 +534,12 @@ var ComponentApp = /*#__PURE__*/function () {
524
534
  success: true
525
535
  });
526
536
  return _context2.abrupt("return");
527
- case 19:
528
- _context2.next = 24;
529
- break;
530
537
  case 21:
538
+ _context2.next = 26;
539
+ break;
540
+ case 23:
531
541
  if (!skipSdkQuery) {
532
- _context2.next = 24;
542
+ _context2.next = 26;
533
543
  break;
534
544
  }
535
545
  resolve({
@@ -537,10 +547,10 @@ var ComponentApp = /*#__PURE__*/function () {
537
547
  success: true
538
548
  });
539
549
  return _context2.abrupt("return");
540
- case 24:
541
- channelBehavior = getChannelBehavior((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
550
+ case 26:
551
+ channelBehavior = getChannelBehavior((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
542
552
  if (!(channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.usePaymentSessionAsQueryResult)) {
543
- _context2.next = 27;
553
+ _context2.next = 29;
544
554
  break;
545
555
  }
546
556
  return _context2.abrupt("return", resolve({
@@ -548,78 +558,79 @@ var ComponentApp = /*#__PURE__*/function () {
548
558
  amountConfirmRequired: actionData === null || actionData === void 0 ? void 0 : actionData.amountConfirmRequired,
549
559
  success: true
550
560
  }));
551
- case 27:
552
- if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
553
- _context2.next = 33;
561
+ case 29:
562
+ if (!(ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
563
+ _context2.next = 35;
554
564
  break;
555
565
  }
556
566
  params.paymentMethodType = 'CARD';
557
- _context2.next = 31;
567
+ _context2.next = 33;
558
568
  return _this5.getDeviceIdAndLog();
559
- case 31:
569
+ case 33:
560
570
  envInfo.deviceId = _context2.sent;
561
571
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
562
572
  envInfo.extendInfo = {
563
573
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
564
574
  };
565
575
  }
566
- case 33:
567
- if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
568
- _context2.next = 42;
576
+ case 35:
577
+ if (!(ComponentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
578
+ _context2.next = 45;
569
579
  break;
570
580
  }
571
581
  _ref8 = params.paymentSessionConfig || {}, _ref8$productSceneVer = _ref8.productSceneVersion, productSceneVersion = _ref8$productSceneVer === void 0 ? '' : _ref8$productSceneVer, _ref8$productScene = _ref8.productScene, productScene = _ref8$productScene === void 0 ? '' : _ref8$productScene;
572
- if (!((_this5$_renderParams7 = _this5._renderParams) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.paymentSessionMetaData) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.action) !== null && _this5$_renderParams7 !== void 0 && _this5$_renderParams7.skipSdkQuery && enableEasypayApiOptimize)) {
573
- _context2.next = 37;
582
+ _ref9 = ((_this5$_renderParams8 = _this5._renderParams) === null || _this5$_renderParams8 === void 0 ? void 0 : _this5$_renderParams8.paymentSessionMetaData) || {}, _ref9$action = _ref9.action, _ref9$action2 = _ref9$action === void 0 ? {} : _ref9$action, _ref9$action2$autoDeb = _ref9$action2.autoDebitWithToken, autoDebitWithToken = _ref9$action2$autoDeb === void 0 ? false : _ref9$action2$autoDeb;
583
+ if (!((_this5$_renderParams9 = _this5._renderParams) !== null && _this5$_renderParams9 !== void 0 && (_this5$_renderParams9 = _this5$_renderParams9.paymentSessionMetaData) !== null && _this5$_renderParams9 !== void 0 && (_this5$_renderParams9 = _this5$_renderParams9.action) !== null && _this5$_renderParams9 !== void 0 && _this5$_renderParams9.skipSdkQuery && enableEasypayApiOptimize)) {
584
+ _context2.next = 40;
574
585
  break;
575
586
  }
576
587
  return _context2.abrupt("return", resolve({
577
588
  message: 'sdk no need to make query request',
578
589
  success: true
579
590
  }));
580
- case 37:
581
- if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
582
- _context2.next = 39;
591
+ case 40:
592
+ if (!(productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
593
+ _context2.next = 42;
583
594
  break;
584
595
  }
585
596
  return _context2.abrupt("return", resolve({
586
597
  message: 'sdk no need to make query request',
587
598
  success: true
588
599
  }));
589
- case 39:
590
- _context2.next = 41;
600
+ case 42:
601
+ _context2.next = 44;
591
602
  return _this5.getDeviceIdAndLog();
592
- case 41:
603
+ case 44:
593
604
  envInfo.deviceId = _context2.sent;
594
- case 42:
595
- if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
596
- _context2.next = 52;
605
+ case 45:
606
+ if (!(ComponentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
607
+ _context2.next = 55;
597
608
  break;
598
609
  }
599
- action = ((_this5$_renderParams8 = _this5._renderParams) === null || _this5$_renderParams8 === void 0 || (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) === null || _this5$_renderParams8 === void 0 ? void 0 : _this5$_renderParams8.action) || {};
610
+ action = ((_this5$_renderParams10 = _this5._renderParams) === null || _this5$_renderParams10 === void 0 || (_this5$_renderParams10 = _this5$_renderParams10.paymentSessionMetaData) === null || _this5$_renderParams10 === void 0 ? void 0 : _this5$_renderParams10.action) || {};
600
611
  signType = isPC() ? action === null || action === void 0 || (_action$web2 = action.web) === null || _action$web2 === void 0 ? void 0 : _action$web2.signType : action === null || action === void 0 || (_action$wap2 = action.wap) === null || _action$wap2 === void 0 ? void 0 : _action$wap2.signType;
601
612
  if (!(signType === 'SMS')) {
602
- _context2.next = 47;
613
+ _context2.next = 50;
603
614
  break;
604
615
  }
605
616
  return _context2.abrupt("return", resolve({
606
617
  message: 'sdk no need to make query request',
607
618
  success: true
608
619
  }));
609
- case 47:
620
+ case 50:
610
621
  if (!(!signType || signType !== 'REDIRECT')) {
611
- _context2.next = 49;
622
+ _context2.next = 52;
612
623
  break;
613
624
  }
614
625
  return _context2.abrupt("return", resolve({
615
626
  success: false
616
627
  }));
617
- case 49:
618
- _context2.next = 51;
628
+ case 52:
629
+ _context2.next = 54;
619
630
  return _this5.getDeviceIdAndLog();
620
- case 51:
631
+ case 54:
621
632
  envInfo.deviceId = _context2.sent;
622
- case 52:
633
+ case 55:
623
634
  _this5.AMSSDK.logger.logInfo({
624
635
  title: 'sdk_event_sdkQuery'
625
636
  }, {
@@ -642,7 +653,7 @@ var ComponentApp = /*#__PURE__*/function () {
642
653
  responseBody: res
643
654
  }).send();
644
655
  }).catch(function (err) {
645
- if ([componentSignEnum.CASHIER_PAYMENT_CARD, componentSignEnum.VAULTING_CARD, componentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
656
+ if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
646
657
  return resolve({
647
658
  success: false
648
659
  });
@@ -658,7 +669,7 @@ var ComponentApp = /*#__PURE__*/function () {
658
669
  }).send();
659
670
  reject(err);
660
671
  });
661
- case 54:
672
+ case 57:
662
673
  case "end":
663
674
  return _context2.stop();
664
675
  }
@@ -690,13 +701,13 @@ var ComponentApp = /*#__PURE__*/function () {
690
701
  var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
691
702
  // eslint-disable-next-line no-async-promise-executor
692
703
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
693
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
704
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
694
705
  var _channelBehavior$buil, _this6$_renderParams$;
695
- var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, _ref12, _ref12$paymentMethodI, _ref12$paymentMethodI2, _ref12$paymentMethodI3, paymentMethodType, isAppWebview, backScheme, extParams;
706
+ var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, _ref12$action2$autoDe, autoDebitWithToken, _ref13, _ref13$paymentMethodI, _ref13$paymentMethodI2, _ref13$paymentMethodI3, paymentMethodType, isAppWebview, backScheme, extParams;
696
707
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
697
708
  while (1) switch (_context3.prev = _context3.next) {
698
709
  case 0:
699
- if (!(_this6.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS)) {
710
+ if (!(_this6.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS)) {
700
711
  _context3.next = 2;
701
712
  break;
702
713
  }
@@ -710,13 +721,13 @@ var ComponentApp = /*#__PURE__*/function () {
710
721
  // 新逻辑走 channelBehavior判断
711
722
  shouldSkipSubmitPayInSDK = !channelBehavior.submitPayInSdk;
712
723
  } else {
713
- shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || componentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
724
+ shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || ComponentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
714
725
  }
715
- if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
716
- _ref10 = params.paymentSessionConfig || {}, _ref10$productSceneVe = _ref10.productSceneVersion, productSceneVersion = _ref10$productSceneVe === void 0 ? '' : _ref10$productSceneVe, _ref10$productScene = _ref10.productScene, productScene = _ref10$productScene === void 0 ? '' : _ref10$productScene;
717
- _ref11 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref11$action = _ref11.action, _ref11$action2 = _ref11$action === void 0 ? {} : _ref11$action, _ref11$action2$enable = _ref11$action2.enableSignAgreement, enableSignAgreement = _ref11$action2$enable === void 0 ? false : _ref11$action2$enable, _ref11$action2$autoDe = _ref11$action2.autoDebitWithToken, autoDebitWithToken = _ref11$action2$autoDe === void 0 ? false : _ref11$action2$autoDe;
718
- _ref12 = ((_this6$_renderParams3 = _this6._renderParams) === null || _this6$_renderParams3 === void 0 ? void 0 : _this6$_renderParams3.paymentSessionMetaData) || {}, _ref12$paymentMethodI = _ref12.paymentMethodInfoView, _ref12$paymentMethodI2 = _ref12$paymentMethodI === void 0 ? {} : _ref12$paymentMethodI, _ref12$paymentMethodI3 = _ref12$paymentMethodI2.paymentMethodType, paymentMethodType = _ref12$paymentMethodI3 === void 0 ? '' : _ref12$paymentMethodI3;
719
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
726
+ if (ComponentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
727
+ _ref11 = params.paymentSessionConfig || {}, _ref11$productSceneVe = _ref11.productSceneVersion, productSceneVersion = _ref11$productSceneVe === void 0 ? '' : _ref11$productSceneVe, _ref11$productScene = _ref11.productScene, productScene = _ref11$productScene === void 0 ? '' : _ref11$productScene;
728
+ _ref12 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref12$action = _ref12.action, _ref12$action2 = _ref12$action === void 0 ? {} : _ref12$action, _ref12$action2$enable = _ref12$action2.enableSignAgreement, enableSignAgreement = _ref12$action2$enable === void 0 ? false : _ref12$action2$enable, _ref12$action2$autoDe = _ref12$action2.autoDebitWithToken, autoDebitWithToken = _ref12$action2$autoDe === void 0 ? false : _ref12$action2$autoDe;
729
+ _ref13 = ((_this6$_renderParams3 = _this6._renderParams) === null || _this6$_renderParams3 === void 0 ? void 0 : _this6$_renderParams3.paymentSessionMetaData) || {}, _ref13$paymentMethodI = _ref13.paymentMethodInfoView, _ref13$paymentMethodI2 = _ref13$paymentMethodI === void 0 ? {} : _ref13$paymentMethodI, _ref13$paymentMethodI3 = _ref13$paymentMethodI2.paymentMethodType, paymentMethodType = _ref13$paymentMethodI3 === void 0 ? '' : _ref13$paymentMethodI3;
730
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
720
731
  isAppWebview = _this6._isAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
721
732
  params['signAgreement'] = enableSignAgreement;
722
733
  if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
@@ -799,7 +810,7 @@ var ComponentApp = /*#__PURE__*/function () {
799
810
  }, _callee3);
800
811
  }));
801
812
  return function (_x3) {
802
- return _ref9.apply(this, arguments);
813
+ return _ref10.apply(this, arguments);
803
814
  };
804
815
  }());
805
816
  }
@@ -842,7 +853,7 @@ var ComponentApp = /*#__PURE__*/function () {
842
853
  var preloadIframe = createPreloadIframe(componentSign, productSceneVersion);
843
854
  var productScene = componentSign.split(/_(?=[^_]*$)/)[0];
844
855
  var _getIframeUrl = getIframeUrl({
845
- renderDisplayType: renderDisplayTypeEnum.popup,
856
+ renderDisplayType: DisplayTypeEnum.popup,
846
857
  componentSign: componentSign,
847
858
  analytics: {
848
859
  enabled: false
@@ -883,7 +894,7 @@ var ComponentApp = /*#__PURE__*/function () {
883
894
  value: Date.now()
884
895
  });
885
896
  try {
886
- var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4;
897
+ var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4, _renderParams$debugPr, _renderParams$debugPr2;
887
898
  var productSceneVersion = (renderParams === null || renderParams === void 0 || (_renderParams$payment = renderParams.paymentSessionMetaData) === null || _renderParams$payment === void 0 || (_renderParams$payment = _renderParams$payment.paymentSessionConfig) === null || _renderParams$payment === void 0 ? void 0 : _renderParams$payment.productSceneVersion) || '';
888
899
  var productScene = (renderParams === null || renderParams === void 0 || (_renderParams$payment2 = renderParams.paymentSessionMetaData) === null || _renderParams$payment2 === void 0 || (_renderParams$payment2 = _renderParams$payment2.paymentSessionConfig) === null || _renderParams$payment2 === void 0 ? void 0 : _renderParams$payment2.productScene) || '';
889
900
  var extendInfo = (renderParams === null || renderParams === void 0 || (_renderParams$payment3 = renderParams.paymentSessionMetaData) === null || _renderParams$payment3 === void 0 ? void 0 : _renderParams$payment3.extendInfo) || '';
@@ -896,7 +907,8 @@ var ComponentApp = /*#__PURE__*/function () {
896
907
  productScene: productScene,
897
908
  productSceneVersion: productSceneVersion,
898
909
  extendInfo: extendInfo,
899
- mid: mid
910
+ mid: mid,
911
+ localLink: renderParams === null || renderParams === void 0 || (_renderParams$debugPr = renderParams.debugProps) === null || _renderParams$debugPr === void 0 ? void 0 : _renderParams$debugPr.localLink // TODO Connect本地调试link
900
912
  });
901
913
  this.app = createIframe(this.AMSSDK.options.mode, this.platform);
902
914
  var hostSign = ((renderParams === null || renderParams === void 0 ? void 0 : renderParams.sessionData) || '').split('&&')[1] || '';
@@ -912,7 +924,8 @@ var ComponentApp = /*#__PURE__*/function () {
912
924
  locale: this.AMSSDK.options.locale,
913
925
  instanceId: this.AMSSDK._instanceId,
914
926
  hostSign: hostSign,
915
- mid: mid
927
+ mid: mid,
928
+ localLink: renderParams === null || renderParams === void 0 || (_renderParams$debugPr2 = renderParams.debugProps) === null || _renderParams$debugPr2 === void 0 ? void 0 : _renderParams$debugPr2.localLink // TODO Connect本地调试link
916
929
  }),
917
930
  path = _getIframeUrl2.path,
918
931
  locationSearch = _getIframeUrl2.locationSearch;
@@ -947,7 +960,7 @@ var ComponentApp = /*#__PURE__*/function () {
947
960
  var isJson = isJsonString(e.data);
948
961
  if (isJson) {
949
962
  var data = JSON.parse(e.data);
950
- if (data.name !== messageName.APP_TO_SDK && data.name !== messageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
963
+ if (data.name !== MessageName.APP_TO_SDK && data.name !== MessageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
951
964
  this._handleAppMessage(data);
952
965
  } else {
953
966
  console.warn(ERRORMESSAGE.NOT_JSON_FORMAT);
@@ -1154,8 +1167,6 @@ var ComponentApp = /*#__PURE__*/function () {
1154
1167
  }, {
1155
1168
  key: "_handleAppMessage",
1156
1169
  value: function _handleAppMessage(data) {
1157
- var _data$context2,
1158
- _this7 = this;
1159
1170
  var eventKeyMap = Object.keys(EVENT).map(function (key) {
1160
1171
  return EVENT[key].name;
1161
1172
  });
@@ -1280,26 +1291,6 @@ var ComponentApp = /*#__PURE__*/function () {
1280
1291
  title: 'sdk_event_event_callback'
1281
1292
  }).send();
1282
1293
  }
1283
- if ((data === null || data === void 0 || (_data$context2 = data.context) === null || _data$context2 === void 0 ? void 0 : _data$context2.event) === EVENT.getGooglePayToken.name) {
1284
- handleGooglePay(data).then(function (res) {
1285
- _this7.dispatchToApp({
1286
- context: {
1287
- event: 'getGooglePayToken',
1288
- data: _objectSpread({}, res)
1289
- }
1290
- });
1291
- }).catch(function (err) {
1292
- _this7.dispatchToApp({
1293
- context: {
1294
- event: 'getGooglePayToken',
1295
- data: {
1296
- err: err
1297
- }
1298
- }
1299
- });
1300
- });
1301
- return;
1302
- }
1303
1294
 
1304
1295
  // The plug-in communicates with the sdk after processing
1305
1296
  this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
@@ -1319,12 +1310,15 @@ var ComponentApp = /*#__PURE__*/function () {
1319
1310
  }, {
1320
1311
  key: "handleSizeChanged",
1321
1312
  value: function handleSizeChanged(data) {
1322
- var _data$context$data4;
1323
- var cashier = document.getElementById(COMPONENT_CONTAINER_ID);
1324
- if (((_data$context$data4 = data.context.data) === null || _data$context$data4 === void 0 ? void 0 : _data$context$data4.height) <= 1 || data.context.data.height === parseInt(cashier.style.height)) return;
1313
+ var _data$context$data4, _cashier$style;
1314
+ var _selector = this._renderParams.selector;
1315
+ var appendAliasContainerId = this._renderParams.appendAliasContainerId;
1316
+ var selectorId = appendAliasContainerId ? "".concat(COMPONENT_CONTAINER_ID, "-").concat(_selector) : COMPONENT_CONTAINER_ID;
1317
+ var cashier = document.getElementById(selectorId);
1318
+ if (((_data$context$data4 = data.context.data) === null || _data$context$data4 === void 0 ? void 0 : _data$context$data4.height) <= 1 || data.context.data.height === parseInt(cashier === null || cashier === void 0 || (_cashier$style = cashier.style) === null || _cashier$style === void 0 ? void 0 : _cashier$style.height)) return;
1325
1319
  cashier.style.height = "".concat(data.context.data.height, "px");
1326
1320
  this.app.style.opacity = '1';
1327
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
1321
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
1328
1322
  if (this.platform === 'desktop') {
1329
1323
  if (data.context.data.width) cashier.style.width = "".concat(data.context.data.width, "px");
1330
1324
  cashier.classList.add("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform, "-animation"));
@@ -1349,6 +1343,7 @@ var ComponentApp = /*#__PURE__*/function () {
1349
1343
  style.innerHTML = runkeyframes;
1350
1344
  // 将style样式存放到head标签
1351
1345
  document.getElementsByTagName('head')[0].appendChild(style);
1346
+
1352
1347
  // size变动时动画
1353
1348
  setTimeout(function () {
1354
1349
  cashier.style.transition = 'height 0.28s ease-in-out';
@@ -1357,7 +1352,7 @@ var ComponentApp = /*#__PURE__*/function () {
1357
1352
  // 关闭loading,保留蒙层
1358
1353
  this.dismissLoadingFunc();
1359
1354
  }
1360
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
1355
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
1361
1356
  var _document$getElementB3;
1362
1357
  (_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
1363
1358
  this.app.style.height = "".concat(data.context.data.height, "px");
@@ -1388,7 +1383,7 @@ var ComponentApp = /*#__PURE__*/function () {
1388
1383
  var _data$isDestroy,
1389
1384
  _data$isCallApp,
1390
1385
  _data$callAppDetectSu,
1391
- _this8 = this;
1386
+ _this7 = this;
1392
1387
  var fromFastSdk = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1393
1388
  var _data = typeof data === 'string' ? {
1394
1389
  normalUrl: data
@@ -1405,7 +1400,7 @@ var ComponentApp = /*#__PURE__*/function () {
1405
1400
  title: 'sdk_event_call_url_start'
1406
1401
  }, _objectSpread({}, data)).send();
1407
1402
  var successCallback = function successCallback(type, url, durationInSeconds) {
1408
- _this8.dispatchToSDK(EVENT.eventCallback.name, {
1403
+ _this7.dispatchToSDK(EVENT.eventCallback.name, {
1409
1404
  code: eventCodeEnum.SDK_CALL_URL_SUCCESS,
1410
1405
  message: "Successfully opened the app,".concat(type, ": ").concat(url)
1411
1406
  });
@@ -1418,12 +1413,12 @@ var ComponentApp = /*#__PURE__*/function () {
1418
1413
  if (durationInSeconds) {
1419
1414
  extra['durationInSeconds'] = durationInSeconds;
1420
1415
  }
1421
- _this8.AMSSDK.logger.logInfo({
1416
+ _this7.AMSSDK.logger.logInfo({
1422
1417
  title: 'sdk_event_call_url_success'
1423
1418
  }, extra).send();
1424
1419
  };
1425
1420
  var failCallback = function failCallback(type, url, durationInSeconds) {
1426
- _this8.dispatchToSDK(EVENT.eventCallback.name, {
1421
+ _this7.dispatchToSDK(EVENT.eventCallback.name, {
1427
1422
  code: eventCodeEnum.SDK_CALL_URL_ERROR,
1428
1423
  message: "Failed to open app,applinkUrl: ".concat(_data === null || _data === void 0 ? void 0 : _data.applinkUrl, " schemeUrl: ").concat(_data === null || _data === void 0 ? void 0 : _data.schemeUrl, " normalUrl: ").concat(_data === null || _data === void 0 ? void 0 : _data.normalUrl)
1429
1424
  });
@@ -1436,19 +1431,19 @@ var ComponentApp = /*#__PURE__*/function () {
1436
1431
  if (durationInSeconds) {
1437
1432
  extra['durationInSeconds'] = durationInSeconds;
1438
1433
  }
1439
- _this8.AMSSDK.logger.logInfo({
1434
+ _this7.AMSSDK.logger.logInfo({
1440
1435
  title: 'sdk_error_call_url_failed'
1441
1436
  }, extra).send();
1442
1437
  };
1443
1438
 
1444
1439
  // 支持 target: _blank,新开tab页打开
1445
- if (_data.target === targetEnum.BLANK) {
1440
+ if (_data.target === TargetEnum.BLANK) {
1446
1441
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1447
1442
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1448
1443
  window.open(_data.normalUrl);
1449
1444
  return;
1450
1445
  }
1451
- if (_data.target === targetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1446
+ if (_data.target === TargetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1452
1447
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1453
1448
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1454
1449
  window.location.replace(_data.normalUrl);
@@ -1482,14 +1477,14 @@ var ComponentApp = /*#__PURE__*/function () {
1482
1477
  successCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1483
1478
  }).catch(function () {
1484
1479
  if (_data !== null && _data !== void 0 && _data.applinkUrl) failCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1485
- return _this8.AMSSDK._redirect({
1480
+ return _this7.AMSSDK._redirect({
1486
1481
  schemeUrl: _data === null || _data === void 0 ? void 0 : _data.schemeUrl
1487
1482
  });
1488
1483
  }).then(function () {
1489
1484
  successCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1490
1485
  }).catch(function () {
1491
1486
  if (_data !== null && _data !== void 0 && _data.schemeUrl) failCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1492
- return _this8.AMSSDK._redirect({
1487
+ return _this7.AMSSDK._redirect({
1493
1488
  normalUrl: _data === null || _data === void 0 ? void 0 : _data.normalUrl
1494
1489
  });
1495
1490
  }).then(function () {
@@ -1500,9 +1495,9 @@ var ComponentApp = /*#__PURE__*/function () {
1500
1495
  }
1501
1496
  }, {
1502
1497
  key: "handleDeclareInfo",
1503
- value: function handleDeclareInfo(_ref13) {
1504
- var _ref13$closeDialogDat = _ref13.closeDialogData,
1505
- closeDialogData = _ref13$closeDialogDat === void 0 ? {} : _ref13$closeDialogDat;
1498
+ value: function handleDeclareInfo(_ref14) {
1499
+ var _ref14$closeDialogDat = _ref14.closeDialogData,
1500
+ closeDialogData = _ref14$closeDialogDat === void 0 ? {} : _ref14$closeDialogDat;
1506
1501
  _handleDeclareInfo({
1507
1502
  closeDialogData: closeDialogData
1508
1503
  });
@@ -1528,12 +1523,12 @@ var ComponentApp = /*#__PURE__*/function () {
1528
1523
  }, {
1529
1524
  key: "handleAppHeartBeat",
1530
1525
  value: function handleAppHeartBeat() {
1531
- var _this9 = this;
1526
+ var _this8 = this;
1532
1527
  try {
1533
1528
  if (!this._webAppHeartBeatTimeoutFn) {
1534
1529
  this._webAppHeartBeatTimeoutFn = function () {
1535
- if (_this9.isAppAttached()) {
1536
- _this9.AMSSDK.logger.logError({
1530
+ if (_this8.isAppAttached()) {
1531
+ _this8.AMSSDK.logger.logError({
1537
1532
  title: 'sdk_error_appHeartBeatTimeout'
1538
1533
  });
1539
1534
  }
@@ -1547,8 +1542,8 @@ var ComponentApp = /*#__PURE__*/function () {
1547
1542
  window._webAppHeartBeatTimeoutId = setTimeout(this._webAppHeartBeatTimeoutFn, TIMEOUT_WEB_APP_HEART_BEAT);
1548
1543
  }
1549
1544
  setTimeout(function () {
1550
- if (_this9.isAppAttached()) {
1551
- _this9.dispatchToApp({
1545
+ if (_this8.isAppAttached()) {
1546
+ _this8.dispatchToApp({
1552
1547
  context: {
1553
1548
  event: 'sdkHeartBeat',
1554
1549
  data: {}
@@ -1604,7 +1599,7 @@ var ComponentApp = /*#__PURE__*/function () {
1604
1599
  value: function dispatchToApp(payload) {
1605
1600
  var targetElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1606
1601
  var data = Object.assign({}, payload, {
1607
- name: messageName.SDK_TO_APP,
1602
+ name: MessageName.SDK_TO_APP,
1608
1603
  mode: this.AMSSDK.options.mode,
1609
1604
  appId: COMPONENTPLUGINID,
1610
1605
  instanceId: this.AMSSDK._instanceId
@@ -1648,7 +1643,7 @@ var ComponentApp = /*#__PURE__*/function () {
1648
1643
  while (1) switch (_context8.prev = _context8.next) {
1649
1644
  case 0:
1650
1645
  _context8.prev = 0;
1651
- isAddressElement = this.AMSSDK.options.product === productSceneEnum.ELEMENT_ADDRESS;
1646
+ isAddressElement = this.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS;
1652
1647
  if (!((!this._actionQueryPromise || !this._actionSubmitPromise) && !isAddressElement)) {
1653
1648
  _context8.next = 4;
1654
1649
  break;
@@ -1741,7 +1736,7 @@ var ComponentApp = /*#__PURE__*/function () {
1741
1736
  key: "cleanContainer",
1742
1737
  value: function cleanContainer() {
1743
1738
  var _document$getElementB4,
1744
- _this10 = this;
1739
+ _this9 = this;
1745
1740
  var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1746
1741
  (_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1747
1742
  this.hideComponentAnimation();
@@ -1753,7 +1748,7 @@ var ComponentApp = /*#__PURE__*/function () {
1753
1748
  this.app = null;
1754
1749
  if (immediately) this.cleanElement();else {
1755
1750
  setTimeout(function () {
1756
- _this10.cleanElement();
1751
+ _this9.cleanElement();
1757
1752
  }, 300);
1758
1753
  }
1759
1754
  }
@@ -1792,7 +1787,9 @@ var ComponentApp = /*#__PURE__*/function () {
1792
1787
  }, {
1793
1788
  key: "removeRetentionPopup",
1794
1789
  value: function removeRetentionPopup(platform) {
1795
- _removeRetentionPopup(platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
1790
+ _removeRetentionPopup();
1791
+ // TODO check
1792
+ // removeRetentionPopup(platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
1796
1793
  }
1797
1794
  }, {
1798
1795
  key: "showRetentionPopup",