@alipay/ams-checkout 0.0.1726734012-dev.0 → 0.0.1726734012-dev.10

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 (145) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/component/channel.d.ts +19 -0
  3. package/esm/component/channel.js +87 -0
  4. package/esm/component/component.inline.style.d.ts +10 -0
  5. package/esm/component/component.inline.style.js +121 -0
  6. package/esm/component/component.popup.style.d.ts +25 -0
  7. package/esm/component/component.popup.style.js +203 -0
  8. package/esm/component/popupWindow.style.d.ts +11 -0
  9. package/esm/component/popupWindow.style.js +121 -0
  10. package/esm/config/index.d.ts +11 -0
  11. package/esm/config/index.js +20 -1
  12. package/esm/constant/index.d.ts +25 -0
  13. package/esm/constant/index.js +28 -0
  14. package/esm/core/bus/index.d.ts +3 -3
  15. package/esm/core/bus/index.js +14 -14
  16. package/esm/core/component/address.d.ts +8 -0
  17. package/esm/core/component/address.js +72 -0
  18. package/esm/core/component/appPreloadProcessing.js +2 -2
  19. package/esm/core/component/ckp/index.js +12 -8
  20. package/esm/core/component/element/components/address.d.ts +19 -0
  21. package/esm/core/component/element/components/address.js +68 -0
  22. package/esm/core/component/element/components/auth.d.ts +17 -0
  23. package/esm/core/component/element/components/auth.js +60 -0
  24. package/esm/core/component/element/components/payment.d.ts +19 -0
  25. package/esm/core/component/element/components/payment.js +74 -0
  26. package/esm/core/component/element/index.d.ts +47 -0
  27. package/esm/core/component/element/index.js +817 -0
  28. package/esm/core/component/element/mock.d.ts +4 -0
  29. package/esm/core/component/element/mock.js +491 -0
  30. package/esm/core/component/element/type.d.ts +191 -0
  31. package/esm/core/component/element/type.js +36 -0
  32. package/esm/core/component/element/utils.d.ts +13 -0
  33. package/esm/core/component/element/utils.js +6 -0
  34. package/esm/core/component/index.d.ts +14 -7
  35. package/esm/core/component/index.js +137 -78
  36. package/esm/core/drop-in/index.js +2 -2
  37. package/esm/core/instance/index.d.ts +2 -1
  38. package/esm/core/instance/index.js +27 -12
  39. package/esm/foundation/core/index.d.ts +28 -0
  40. package/esm/foundation/core/index.js +396 -0
  41. package/esm/foundation/index.d.ts +75 -0
  42. package/esm/foundation/index.js +42 -0
  43. package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
  44. package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
  45. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  46. package/esm/foundation/product-processor/easysafepay/index.js +464 -0
  47. package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
  48. package/esm/foundation/service/api-bus/ability/callback.js +55 -0
  49. package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
  50. package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
  51. package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
  52. package/esm/foundation/service/api-bus/ability/request.js +151 -0
  53. package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
  54. package/esm/foundation/service/api-bus/ability/security.js +161 -0
  55. package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
  56. package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
  57. package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
  58. package/esm/foundation/service/api-bus/busManager.js +398 -0
  59. package/esm/foundation/service/api-bus/index.d.ts +20 -0
  60. package/esm/foundation/service/api-bus/index.js +88 -0
  61. package/esm/foundation/service/api-bus/interface.d.ts +48 -0
  62. package/esm/foundation/service/api-bus/interface.js +54 -0
  63. package/esm/foundation/service/container/index.d.ts +32 -0
  64. package/esm/foundation/service/container/index.js +332 -0
  65. package/esm/foundation/service/container/popup.d.ts +17 -0
  66. package/esm/foundation/service/container/popup.js +103 -0
  67. package/esm/foundation/service/container/utils.d.ts +7 -0
  68. package/esm/foundation/service/container/utils.js +48 -0
  69. package/esm/foundation/service/event-center.d.ts +82 -0
  70. package/esm/foundation/service/event-center.js +274 -0
  71. package/esm/foundation/service/global-data/index.d.ts +11 -0
  72. package/esm/foundation/service/global-data/index.js +68 -0
  73. package/esm/foundation/service/index.d.ts +19 -0
  74. package/esm/foundation/service/index.js +82 -0
  75. package/esm/foundation/service/log/index.d.ts +43 -0
  76. package/esm/foundation/service/log/index.js +250 -0
  77. package/esm/foundation/service/log/keys.d.ts +13 -0
  78. package/esm/foundation/service/log/keys.js +103 -0
  79. package/esm/foundation/service/log/processor.d.ts +9 -0
  80. package/esm/foundation/service/log/processor.js +148 -0
  81. package/esm/foundation/service/log/types.d.ts +32 -0
  82. package/esm/foundation/service/log/types.js +1 -0
  83. package/esm/foundation/service/requester/deps.d.ts +17 -0
  84. package/esm/foundation/service/requester/deps.js +11 -0
  85. package/esm/foundation/service/requester/requester.d.ts +22 -0
  86. package/esm/foundation/service/requester/requester.js +217 -0
  87. package/esm/foundation/service/security/index.d.ts +28 -0
  88. package/esm/foundation/service/security/index.js +284 -0
  89. package/esm/foundation/service/security/security.d.ts +33 -0
  90. package/esm/foundation/service/security/security.js +182 -0
  91. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  92. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  93. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  94. package/esm/foundation/utils/payment_context_utils.js +57 -0
  95. package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
  96. package/esm/foundation/utils/payment_product_utils.js +38 -0
  97. package/esm/foundation/utils/redirect_utils.d.ts +11 -0
  98. package/esm/foundation/utils/redirect_utils.js +262 -0
  99. package/esm/foundation/utils/system_events.d.ts +4 -0
  100. package/esm/foundation/utils/system_events.js +66 -0
  101. package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
  102. package/esm/foundation/utils/web_app_url_utils.js +112 -0
  103. package/esm/index.d.ts +21 -12
  104. package/esm/index.js +116 -56
  105. package/esm/plugin/applepay/component.js +13 -11
  106. package/esm/plugin/applepay/index.js +10 -6
  107. package/esm/plugin/applepay/service.d.ts +2 -2
  108. package/esm/plugin/applepay/service.js +26 -18
  109. package/esm/plugin/component/cashierApp.d.ts +10 -8
  110. package/esm/plugin/component/cashierApp.js +48 -11
  111. package/esm/plugin/component/channel.d.ts +4 -3
  112. package/esm/plugin/component/channel.js +39 -2
  113. package/esm/plugin/component/component.inline.style.d.ts +9 -10
  114. package/esm/plugin/component/component.inline.style.js +93 -10
  115. package/esm/plugin/component/component.popup.style.d.ts +15 -6
  116. package/esm/plugin/component/component.popup.style.js +30 -7
  117. package/esm/plugin/component/index.d.ts +14 -8
  118. package/esm/plugin/component/index.js +384 -187
  119. package/esm/plugin/component/popupWindow.style.d.ts +5 -2
  120. package/esm/plugin/component/popupWindow.style.js +70 -14
  121. package/esm/plugin/const.js +5 -5
  122. package/esm/plugin/drop-in/index.d.ts +5 -5
  123. package/esm/plugin/drop-in/index.js +7 -7
  124. package/esm/plugin/payment-element/utils.d.ts +2 -0
  125. package/esm/plugin/payment-element/utils.js +6 -0
  126. package/esm/plugin/paypal/index.js +2 -1
  127. package/esm/plugin/type.d.ts +4 -3
  128. package/esm/service/element.d.ts +4 -0
  129. package/esm/service/element.js +51 -0
  130. package/esm/service/index.d.ts +1 -0
  131. package/esm/service/index.js +6 -2
  132. package/esm/types/index.d.ts +339 -40
  133. package/esm/types/index.js +119 -55
  134. package/esm/util/createIframeNode.d.ts +2 -2
  135. package/esm/util/createIframeNode.js +3 -3
  136. package/esm/util/getBackScheme.d.ts +5 -0
  137. package/esm/util/getBackScheme.js +133 -0
  138. package/esm/util/index.js +4 -8
  139. package/esm/util/logger.d.ts +3 -3
  140. package/esm/util/logger.js +49 -13
  141. package/esm/util/security.d.ts +3 -2
  142. package/esm/util/security.js +2 -2
  143. package/esm/util/spm-map.d.ts +172 -0
  144. package/esm/util/spm-map.js +172 -0
  145. package/package.json +3 -1
@@ -19,20 +19,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
19
19
  /* eslint-disable @typescript-eslint/no-explicit-any */
20
20
  import { v4 as uuid } from 'uuid';
21
21
  import { sdkVersion } from "../../config";
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";
22
+ import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_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, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, DisplayTypeEnum, 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
+ import { getBackScheme } from "../../util/getBackScheme";
29
+ import { handlePaymentSessionConfig } from "../payment-element/utils";
28
30
  import { createIframe, createPreloadIframe, getAppDomain, getIframeUrl } from "./cashierApp";
29
- import { getChannelBehavior } from "./channel";
31
+ import { getChannelBehavior, handleGooglePay } from "./channel";
30
32
  import { addInlineLoading, createInlineBaseElement } from "./component.inline.style";
31
- import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup } from "./component.popup.style";
32
- import { createModal, destroyModal, insertStyleSheet } from "./popupWindow.style";
33
+ import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup, slideInAndOutKeyframes } from "./component.popup.style";
34
+ import { createModal, destroyModal, insertStyleSheet, removePopupLoading } from "./popupWindow.style";
33
35
  window.changingPageHeight = window.innerHeight;
34
36
  var ComponentApp = /*#__PURE__*/function () {
35
- function ComponentApp() {
37
+ function ComponentApp(componentOption) {
36
38
  _classCallCheck(this, ComponentApp);
37
39
  _defineProperty(this, "app", void 0);
38
40
  _defineProperty(this, "AMSSDK", void 0);
@@ -52,13 +54,14 @@ var ComponentApp = /*#__PURE__*/function () {
52
54
  _defineProperty(this, "_actionQueryPromise", null);
53
55
  _defineProperty(this, "_actionSubmitPromise", null);
54
56
  _defineProperty(this, "_renderParams", null);
55
- _defineProperty(this, "_componentSign", componentSignEnum.NONE);
57
+ _defineProperty(this, "_componentSign", ComponentSignEnum.NONE);
56
58
  _defineProperty(this, "_appLocationSearch", void 0);
57
- _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
59
+ _defineProperty(this, "_renderDisplayType", DisplayTypeEnum.popup);
58
60
  _defineProperty(this, "_multipleCallbackEvents", void 0);
61
+ _defineProperty(this, "_isAppWebview", void 0);
59
62
  _defineProperty(this, "_merchantAppointParam", void 0);
60
63
  _defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
61
- this._appVersion = '1.20.2';
64
+ this._appVersion = componentOption.appVersion;
62
65
  this._isInitComponent = false;
63
66
  this._selector = "#".concat(COMPONENT_SECTION_ID);
64
67
  this.createIframeNode = function () {
@@ -67,7 +70,7 @@ var ComponentApp = /*#__PURE__*/function () {
67
70
  this.createPreloadIframeNode = function () {
68
71
  return Promise.resolve();
69
72
  };
70
- this.platform = isPC() ? platformEnum.desktop : platformEnum.mobile;
73
+ this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
71
74
  this._isRetention = true;
72
75
  this._appLocationSearch = '';
73
76
  this._performanceData.push({
@@ -102,12 +105,12 @@ var ComponentApp = /*#__PURE__*/function () {
102
105
  var paymentSessionMetaData = (_this$_renderParams = this._renderParams) === null || _this$_renderParams === void 0 ? void 0 : _this$_renderParams.paymentSessionMetaData;
103
106
  var paymentSessionConfig = paymentSessionMetaData.paymentSessionConfig;
104
107
  this.AMSSDK.logger.setMedta({
105
- platform: this.platform === platformEnum.desktop ? 'PC' : 'WAP',
108
+ platform: this.platform === PlatformEnum.desktop ? 'PC' : 'WAP',
106
109
  // PC/WAP,
107
110
  sdkVersion: sdkVersion,
108
111
  webAppVersion: this._appVersion,
109
112
  instanceId: this.AMSSDK._instanceId,
110
- storageId: this.AMSSDK._storageId,
113
+ deviceId: this.AMSSDK._storageId,
111
114
  // the better way to use md5 paymentSesionID
112
115
  renderDisplayType: paymentSessionMetaData === null || paymentSessionMetaData === void 0 ? void 0 : paymentSessionMetaData.renderDisplayType,
113
116
  merchantId: paymentSessionMetaData === null || paymentSessionMetaData === void 0 ? void 0 : paymentSessionMetaData.clientId,
@@ -139,12 +142,12 @@ var ComponentApp = /*#__PURE__*/function () {
139
142
  var _this$_renderParams4,
140
143
  _this = this;
141
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;
142
- if (componentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
143
- if (componentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
145
+ if (ComponentSignEnum.CASHIER_PAYMENT_APM === this._componentSign) return;
146
+ if (ComponentSignEnum.CASHIER_PAYMENT_BANK === this._componentSign) {
144
147
  this.AMSSDK.logger.logInfo({
145
148
  title: 'sdk_event_security_unneeded_scenarios'
146
149
  }, {
147
- product: product
150
+ productScene: product
148
151
  });
149
152
  }
150
153
  var securitySDK = this.AMSSDK._getSecuritySDKByProductScene({
@@ -177,15 +180,13 @@ var ComponentApp = /*#__PURE__*/function () {
177
180
  this.AMSSDK.logger.logInfo({
178
181
  title: 'sdk_event_securitySdkGetTokenSuccess'
179
182
  }, {
180
- deviceId: deviceId,
181
- time: time
183
+ eventMessage: time
182
184
  }).send();
183
185
  } else {
184
186
  this.AMSSDK.logger.logInfo({
185
187
  title: 'sdk_error_securitySdkGetTokenFailed'
186
188
  }, {
187
- deviceId: deviceId,
188
- time: time
189
+ eventMessage: time
189
190
  }).send();
190
191
  }
191
192
  }
@@ -249,6 +250,12 @@ var ComponentApp = /*#__PURE__*/function () {
249
250
  key: "appendIframeNodes",
250
251
  value: function appendIframeNodes(componentSign, renderParams) {
251
252
  var _renderParams,
253
+ _renderParams2,
254
+ _this$_selector,
255
+ _this$_selector$index,
256
+ _this$_selector2,
257
+ _this$_selector2$slic,
258
+ _renderParams3,
252
259
  _this$_renderParams5,
253
260
  _this$_renderParams6,
254
261
  _this$_renderParams7,
@@ -259,13 +266,19 @@ var ComponentApp = /*#__PURE__*/function () {
259
266
  return Promise.reject(ERRORMESSAGE.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);
260
267
  }
261
268
  renderParams = this.setParameterDefaultValues(componentSign, renderParams);
269
+ this._merchantAppointParam = renderParams.merchantAppointParam;
262
270
  this._isInitComponent = true;
263
271
  this._renderParams = renderParams;
264
272
  this._componentSign = componentSign;
265
273
  if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
266
- this._renderDisplayType = renderParams.renderDisplayType;
267
- this._merchantAppointParam = renderParams.merchantAppointParam;
268
- var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(COMPONENT_CONTAINER_ID) : this._selector;
274
+ this._renderDisplayType = (_renderParams2 = renderParams) === null || _renderParams2 === void 0 ? void 0 : _renderParams2.renderDisplayType;
275
+ // connect element模式会存在加载多个sdk,appendAliasContainerId为true来判断,给容器inlineId添加标识,id中不能存在#需在这里提前过滤一下
276
+ var _selector = (this === null || this === void 0 || (_this$_selector = this._selector) === null || _this$_selector === void 0 || (_this$_selector$index = _this$_selector.indexOf) === null || _this$_selector$index === void 0 ? void 0 : _this$_selector$index.call(_this$_selector, '#')) === -1 ? this === null || this === void 0 ? void 0 : this._selector : this === null || this === void 0 || (_this$_selector2 = this._selector) === null || _this$_selector2 === void 0 || (_this$_selector2$slic = _this$_selector2.slice) === null || _this$_selector2$slic === void 0 ? void 0 : _this$_selector2$slic.call(_this$_selector2, 1);
277
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
278
+ var appendAliasContainerId = (_renderParams3 = renderParams) !== null && _renderParams3 !== void 0 && _renderParams3.appendAliasContainerId ? "-".concat(_selector) : '';
279
+ var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
280
+ var insertedNode = (this === null || this === void 0 ? void 0 : this._renderDisplayType) === DisplayTypeEnum.inline ? "#".concat(inlineId) : this === null || this === void 0 ? void 0 : this._selector;
281
+ this._isAppWebview = renderParams.isAppWebview;
269
282
  this.initLoggerMeta();
270
283
  this.initSecurity();
271
284
  this._performanceData.push({
@@ -294,17 +307,16 @@ var ComponentApp = /*#__PURE__*/function () {
294
307
  this.AMSSDK.logger.logInfo({
295
308
  title: 'sdk_event_createComponent'
296
309
  }, {
297
- version: productSceneVersion,
298
- product: this.AMSSDK.options.product
310
+ productScene: this.AMSSDK.options.product
299
311
  }).send();
300
- if (componentSignEnum.EASY_PAY_WALLET === this._componentSign) {
301
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
312
+ if (ComponentSignEnum.EASY_PAY_WALLET === this._componentSign) {
313
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
302
314
  // EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
303
315
  this.handleAuthUrlInfo(authUrlInfo);
304
316
  return;
305
317
  }
306
318
  }
307
- if (componentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
319
+ if (ComponentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
308
320
  var _this$_renderParams9, _action$web, _action$wap;
309
321
  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) || {};
310
322
  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;
@@ -315,7 +327,7 @@ var ComponentApp = /*#__PURE__*/function () {
315
327
  return;
316
328
  }
317
329
  }
318
- if (componentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
330
+ if (ComponentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
319
331
  if (requireFastSdk === true && productSceneVersion === '1.0') {
320
332
  // REDIRECT,requireFastSdk为true,不需要接口请求
321
333
  this.handleAuthUrlInfo(authUrlInfo);
@@ -330,12 +342,12 @@ var ComponentApp = /*#__PURE__*/function () {
330
342
  this.dispatchToSDK(EVENT.eventCallback.name, {
331
343
  code: eventCodeEnum.SDK_START_OF_LOADING
332
344
  });
333
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
334
- var container = createInlineBaseElement(this._selector);
345
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
346
+ var container = createInlineBaseElement(this._selector, COMPONENT_CONTAINER_ID, inlineId);
335
347
  if (container) this.renderInlineLoading(renderParams, container);
336
348
  insertStyleSheet();
337
349
  }
338
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
350
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
339
351
  var _this$_renderParams10;
340
352
  createBaseElement(this.platform, this.closeBtnFunc.bind(this));
341
353
  createRetentionPopup(this.platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
@@ -344,9 +356,11 @@ var ComponentApp = /*#__PURE__*/function () {
344
356
  if (channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.allowClickOutsideClose) {
345
357
  onClickOutside = this.closeBtnFunc.bind(this);
346
358
  }
359
+ var closeBtnFunc = this.closeBtnFunc.bind(this);
347
360
  createMockup({
348
361
  platform: this.platform,
349
- onClickOutside: onClickOutside
362
+ onClickOutside: onClickOutside,
363
+ closeBtnFunc: closeBtnFunc
350
364
  });
351
365
  this.renderPopupLoading(renderParams);
352
366
  }
@@ -367,10 +381,10 @@ var ComponentApp = /*#__PURE__*/function () {
367
381
  value: function appendPreloadIframeNodes(componentSign, productSceneVersion) {
368
382
  var virtualPreloadIframe = this.createPreloadApp(componentSign, productSceneVersion);
369
383
  this.createPreloadIframeNode(virtualPreloadIframe);
384
+ console.log('web-preloadsdk appendPreloadIframeNodes', virtualPreloadIframe);
370
385
  this.AMSSDK.logger.logInfo({
371
386
  title: 'performance_optimization_preload'
372
387
  }, {
373
- componentSign: componentSign,
374
388
  productSceneVersion: productSceneVersion
375
389
  });
376
390
  }
@@ -378,7 +392,7 @@ var ComponentApp = /*#__PURE__*/function () {
378
392
  key: "setParameterDefaultValues",
379
393
  value: function setParameterDefaultValues(componentSign, renderParams) {
380
394
  var newParams = Object.assign({}, renderParams);
381
- if (componentSign === componentSignEnum.VAULTING_CARD) {
395
+ if (componentSign === ComponentSignEnum.VAULTING_CARD) {
382
396
  var _newParams$notRedirec;
383
397
  newParams.notRedirectAfterComplete = (_newParams$notRedirec = newParams === null || newParams === void 0 ? void 0 : newParams.notRedirectAfterComplete) !== null && _newParams$notRedirec !== void 0 ? _newParams$notRedirec : true;
384
398
  }
@@ -387,10 +401,22 @@ var ComponentApp = /*#__PURE__*/function () {
387
401
  }, {
388
402
  key: "renderInlineLoading",
389
403
  value: function renderInlineLoading(renderParams, selector) {
390
- var _renderParams$appeara;
404
+ var _renderParams$appeara, _this$_renderParams11;
391
405
  var showLoading = renderParams === null || renderParams === void 0 || (_renderParams$appeara = renderParams.appearance) === null || _renderParams$appeara === void 0 ? void 0 : _renderParams$appeara.showLoading;
392
406
  showLoading = typeof showLoading === 'boolean' ? showLoading : true;
393
- if (showLoading) addInlineLoading(selector, this.platform);
407
+ var extendInfo = renderParams.paymentSessionMetaData.extendInfo;
408
+ var isExpressCheckout = false;
409
+ try {
410
+ // expressCheckout可能出现string(false) JSON.parse再转一次
411
+ isExpressCheckout = JSON.parse(JSON.parse(extendInfo).expressCheckout);
412
+ } catch (error) {
413
+ // 遇到JSON解析错误,默认false
414
+ }
415
+ if (showLoading) addInlineLoading(selector, this.platform, {
416
+ componentSign: this._componentSign,
417
+ type: (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.appearance) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.layout) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.type,
418
+ isExpressCheckout: isExpressCheckout
419
+ });
394
420
  }
395
421
  }, {
396
422
  key: "renderPopupLoading",
@@ -427,9 +453,7 @@ var ComponentApp = /*#__PURE__*/function () {
427
453
  }, {
428
454
  key: "createActionQueryPromise",
429
455
  value: function createActionQueryPromise() {
430
- var _this$_renderParams11,
431
- _this5 = this;
432
- var paymentMethodType = (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentSessionMetaData) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentMethodInfoView) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.paymentMethodType;
456
+ var _this5 = this;
433
457
  this._performanceData.push({
434
458
  key: 'sdk_action_query_start',
435
459
  value: Date.now()
@@ -437,8 +461,8 @@ var ComponentApp = /*#__PURE__*/function () {
437
461
  // eslint-disable-next-line no-async-promise-executor
438
462
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
439
463
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
440
- var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
441
- var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _ref9, _ref9$action, _ref9$action2, _ref9$action2$autoDeb, autoDebitWithToken, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
464
+ var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6, _this5$_renderParams7;
465
+ var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
442
466
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
443
467
  while (1) switch (_context2.prev = _context2.next) {
444
468
  case 0:
@@ -474,22 +498,43 @@ var ComponentApp = /*#__PURE__*/function () {
474
498
  success: true
475
499
  }));
476
500
  case 9:
477
- if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
478
- _context2.next = 21;
501
+ if (ComponentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
502
+ params.paymentSessionConfig = handlePaymentSessionConfig(params.paymentSessionConfig);
503
+ }
504
+ 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)) {
505
+ _context2.next = 12;
506
+ break;
507
+ }
508
+ return _context2.abrupt("return", resolve({
509
+ message: 'sdk no need to make query request',
510
+ success: true
511
+ }));
512
+ case 12:
513
+ if (!(ComponentSignEnum.ELEMENT_ADDRESS === _this5._componentSign)) {
514
+ _context2.next = 14;
515
+ break;
516
+ }
517
+ return _context2.abrupt("return", resolve({
518
+ message: 'sdk no need to make query request',
519
+ success: true
520
+ }));
521
+ case 14:
522
+ if (!(ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
523
+ _context2.next = 26;
479
524
  break;
480
525
  }
481
526
  if (!enableVaultingApiOptimize) {
482
- _context2.next = 21;
527
+ _context2.next = 26;
483
528
  break;
484
529
  }
485
530
  if (!skipSdkQueryForm) {
486
- _context2.next = 18;
531
+ _context2.next = 23;
487
532
  break;
488
533
  }
489
534
  // 优先判断 skipSdkQueryForm
490
535
  ifSkip = matchVersion(skipSdkQueryForm, _this5._appVersion);
491
536
  if (!ifSkip) {
492
- _context2.next = 16;
537
+ _context2.next = 21;
493
538
  break;
494
539
  }
495
540
  resolve({
@@ -497,12 +542,12 @@ var ComponentApp = /*#__PURE__*/function () {
497
542
  success: true
498
543
  });
499
544
  return _context2.abrupt("return");
500
- case 16:
501
- _context2.next = 21;
545
+ case 21:
546
+ _context2.next = 26;
502
547
  break;
503
- case 18:
548
+ case 23:
504
549
  if (!skipSdkQuery) {
505
- _context2.next = 21;
550
+ _context2.next = 26;
506
551
  break;
507
552
  }
508
553
  resolve({
@@ -510,10 +555,10 @@ var ComponentApp = /*#__PURE__*/function () {
510
555
  success: true
511
556
  });
512
557
  return _context2.abrupt("return");
513
- case 21:
514
- channelBehavior = getChannelBehavior((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
558
+ case 26:
559
+ channelBehavior = getChannelBehavior((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
515
560
  if (!(channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.usePaymentSessionAsQueryResult)) {
516
- _context2.next = 24;
561
+ _context2.next = 29;
517
562
  break;
518
563
  }
519
564
  return _context2.abrupt("return", resolve({
@@ -521,84 +566,82 @@ var ComponentApp = /*#__PURE__*/function () {
521
566
  amountConfirmRequired: actionData === null || actionData === void 0 ? void 0 : actionData.amountConfirmRequired,
522
567
  success: true
523
568
  }));
524
- case 24:
525
- if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
526
- _context2.next = 30;
569
+ case 29:
570
+ if (!(ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || ComponentSignEnum.VAULTING_CARD === _this5._componentSign)) {
571
+ _context2.next = 35;
527
572
  break;
528
573
  }
529
574
  params.paymentMethodType = 'CARD';
530
- _context2.next = 28;
575
+ _context2.next = 33;
531
576
  return _this5.getDeviceIdAndLog();
532
- case 28:
577
+ case 33:
533
578
  envInfo.deviceId = _context2.sent;
534
579
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
535
580
  envInfo.extendInfo = {
536
581
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
537
582
  };
538
583
  }
539
- case 30:
540
- if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
541
- _context2.next = 40;
584
+ case 35:
585
+ if (!(ComponentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
586
+ _context2.next = 44;
542
587
  break;
543
588
  }
544
589
  _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;
545
- _ref9 = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.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;
546
590
  if (!((_this5$_renderParams8 = _this5._renderParams) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.action) !== null && _this5$_renderParams8 !== void 0 && _this5$_renderParams8.skipSdkQuery && enableEasypayApiOptimize)) {
547
- _context2.next = 35;
591
+ _context2.next = 39;
548
592
  break;
549
593
  }
550
594
  return _context2.abrupt("return", resolve({
551
595
  message: 'sdk no need to make query request',
552
596
  success: true
553
597
  }));
554
- case 35:
555
- if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
556
- _context2.next = 37;
598
+ case 39:
599
+ if (!(productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
600
+ _context2.next = 41;
557
601
  break;
558
602
  }
559
603
  return _context2.abrupt("return", resolve({
560
604
  message: 'sdk no need to make query request',
561
605
  success: true
562
606
  }));
563
- case 37:
564
- _context2.next = 39;
607
+ case 41:
608
+ _context2.next = 43;
565
609
  return _this5.getDeviceIdAndLog();
566
- case 39:
610
+ case 43:
567
611
  envInfo.deviceId = _context2.sent;
568
- case 40:
569
- if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
570
- _context2.next = 50;
612
+ case 44:
613
+ if (!(ComponentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
614
+ _context2.next = 54;
571
615
  break;
572
616
  }
573
617
  action = ((_this5$_renderParams9 = _this5._renderParams) === null || _this5$_renderParams9 === void 0 || (_this5$_renderParams9 = _this5$_renderParams9.paymentSessionMetaData) === null || _this5$_renderParams9 === void 0 ? void 0 : _this5$_renderParams9.action) || {};
574
618
  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;
575
619
  if (!(signType === 'SMS')) {
576
- _context2.next = 45;
620
+ _context2.next = 49;
577
621
  break;
578
622
  }
579
623
  return _context2.abrupt("return", resolve({
580
624
  message: 'sdk no need to make query request',
581
625
  success: true
582
626
  }));
583
- case 45:
627
+ case 49:
584
628
  if (!(!signType || signType !== 'REDIRECT')) {
585
- _context2.next = 47;
629
+ _context2.next = 51;
586
630
  break;
587
631
  }
588
632
  return _context2.abrupt("return", resolve({
589
633
  success: false
590
634
  }));
591
- case 47:
592
- _context2.next = 49;
635
+ case 51:
636
+ _context2.next = 53;
593
637
  return _this5.getDeviceIdAndLog();
594
- case 49:
638
+ case 53:
595
639
  envInfo.deviceId = _context2.sent;
596
- case 50:
640
+ case 54:
597
641
  _this5.AMSSDK.logger.logInfo({
598
642
  title: 'sdk_event_sdkQuery'
599
643
  }, {
600
- paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
601
- requestBody: params
644
+ paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
602
645
  }).send();
603
646
  queryPaymentInfo(params, {
604
647
  env: _this5.AMSSDK.options.env.environment,
@@ -612,11 +655,10 @@ var ComponentApp = /*#__PURE__*/function () {
612
655
  _this5.AMSSDK.logger.logInfo({
613
656
  title: 'sdk_event_sdkQueryEnd'
614
657
  }, {
615
- paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
616
- responseBody: res
658
+ paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
617
659
  }).send();
618
660
  }).catch(function (err) {
619
- if ([componentSignEnum.CASHIER_PAYMENT_CARD, componentSignEnum.VAULTING_CARD, componentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
661
+ if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
620
662
  return resolve({
621
663
  success: false
622
664
  });
@@ -628,11 +670,11 @@ var ComponentApp = /*#__PURE__*/function () {
628
670
  title: 'sdk_event_sdkQuery_failed'
629
671
  }, {
630
672
  paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
631
- errorReason: err
673
+ errorMessage: err
632
674
  }).send();
633
675
  reject(err);
634
676
  });
635
- case 52:
677
+ case 56:
636
678
  case "end":
637
679
  return _context2.stop();
638
680
  }
@@ -664,43 +706,58 @@ var ComponentApp = /*#__PURE__*/function () {
664
706
  var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
665
707
  // eslint-disable-next-line no-async-promise-executor
666
708
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
667
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
709
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
668
710
  var _channelBehavior$buil, _this6$_renderParams$;
669
- var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, _ref12$action2$autoDe, autoDebitWithToken, extParams;
711
+ 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;
670
712
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
671
713
  while (1) switch (_context3.prev = _context3.next) {
672
714
  case 0:
715
+ if (!(_this6.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS)) {
716
+ _context3.next = 2;
717
+ break;
718
+ }
719
+ return _context3.abrupt("return", resolve({
720
+ message: 'sdk no need to make submitPay request',
721
+ success: true
722
+ }));
723
+ case 2:
673
724
  shouldSkipSubmitPayInSDK = false;
674
725
  if (channelBehavior) {
675
726
  // 新逻辑走 channelBehavior判断
676
727
  shouldSkipSubmitPayInSDK = !channelBehavior.submitPayInSdk;
677
728
  } else {
678
- 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;
729
+ 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;
679
730
  }
680
- if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
681
- _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;
682
- _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;
683
- if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
684
- ///EasyPay 2.0 首次传signAgreement字段
731
+ if (ComponentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
732
+ _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;
733
+ _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;
734
+ _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;
735
+ if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
736
+ isAppWebview = _this6._isAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
685
737
  params['signAgreement'] = enableSignAgreement;
738
+ if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
739
+ backScheme = getBackScheme(undefined, _this6.AMSSDK.logger);
740
+ if (backScheme && backScheme !== 'https') {
741
+ params['h5FromApp'] = encodeURIComponent(backScheme);
742
+ }
743
+ }
686
744
  }
687
745
  }
688
746
  // 带上标记告知WebCheckOut SDK已发送submitpay请求
689
747
  _this6._allowSubmitPayCallAhead = !shouldSkipSubmitPayInSDK;
690
748
  if (!shouldSkipSubmitPayInSDK) {
691
- _context3.next = 6;
749
+ _context3.next = 8;
692
750
  break;
693
751
  }
694
752
  return _context3.abrupt("return", resolve({
695
753
  message: 'sdk no need to make submitPay request',
696
754
  success: true
697
755
  }));
698
- case 6:
756
+ case 8:
699
757
  _this6.AMSSDK.logger.logInfo({
700
758
  title: 'sdk_event_submitPay'
701
759
  }, {
702
- paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
703
- requestBody: params
760
+ paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
704
761
  }).send();
705
762
  extParams = (channelBehavior === null || channelBehavior === void 0 || (_channelBehavior$buil = channelBehavior.buildSubmitPayExtParams) === null || _channelBehavior$buil === void 0 ? void 0 : _channelBehavior$buil.call(channelBehavior, {
706
763
  instanceId: _this6.AMSSDK._instanceId,
@@ -714,9 +771,9 @@ var ComponentApp = /*#__PURE__*/function () {
714
771
  _context3.t0 = submitPayInfo;
715
772
  _context3.t1 = params;
716
773
  _context3.t2 = _this6.AMSSDK.options.env.environment;
717
- _context3.next = 14;
774
+ _context3.next = 16;
718
775
  return _this6.getDeviceIdAndLog();
719
- case 14:
776
+ case 16:
720
777
  _context3.t3 = _context3.sent;
721
778
  _context3.t4 = {
722
779
  deviceId: _context3.t3
@@ -735,29 +792,27 @@ var ComponentApp = /*#__PURE__*/function () {
735
792
  _this6.AMSSDK.logger.logInfo({
736
793
  title: 'sdk_event_submitPayEnd'
737
794
  }, {
738
- paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
739
- responseBody: res
795
+ paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
740
796
  }).send();
741
797
  resolve(res);
742
798
  }).catch(function (err) {
743
799
  _this6.AMSSDK.logger.logError({
744
800
  title: 'sdk_event_submitPay_failed'
745
801
  }, {
746
- paymentSessionConfig: JSON.stringify(params.paymentSessionConfig),
747
- responseBody: err
802
+ paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
748
803
  }).send();
749
804
  resolve({
750
805
  success: false
751
806
  });
752
807
  });
753
- case 19:
808
+ case 21:
754
809
  case "end":
755
810
  return _context3.stop();
756
811
  }
757
812
  }, _callee3);
758
813
  }));
759
814
  return function (_x3) {
760
- return _ref10.apply(this, arguments);
815
+ return _ref9.apply(this, arguments);
761
816
  };
762
817
  }());
763
818
  }
@@ -798,19 +853,17 @@ var ComponentApp = /*#__PURE__*/function () {
798
853
  value: function createPreloadApp(componentSign) {
799
854
  var productSceneVersion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1.0';
800
855
  var preloadIframe = createPreloadIframe(componentSign, productSceneVersion);
856
+ var productScene = componentSign.split(/_(?=[^_]*$)/)[0];
801
857
  var _getIframeUrl = getIframeUrl({
802
- renderDisplayType: renderDisplayTypeEnum.popup,
858
+ renderDisplayType: DisplayTypeEnum.popup,
803
859
  componentSign: componentSign,
804
860
  analytics: {
805
861
  enabled: false
806
862
  },
807
- productScene: componentSign,
863
+ productScene: productScene,
808
864
  productSceneVersion: productSceneVersion,
809
865
  environment: this.AMSSDK.options.env.environment,
810
- // TODO 确定一下这个参数是干啥的
811
866
  appVersion: this._appVersion,
812
- extendInfo: '',
813
- locale: '',
814
867
  instanceId: '',
815
868
  isPreload: 'true',
816
869
  mid: ''
@@ -822,8 +875,7 @@ var ComponentApp = /*#__PURE__*/function () {
822
875
  this.AMSSDK.logger.logError({
823
876
  title: 'performance_optimization_preload_path_error'
824
877
  }, {
825
- path: path,
826
- locationSearch: locationSearch
878
+ eventMessage: path
827
879
  });
828
880
  }
829
881
  return preloadIframe;
@@ -843,7 +895,7 @@ var ComponentApp = /*#__PURE__*/function () {
843
895
  value: Date.now()
844
896
  });
845
897
  try {
846
- var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4;
898
+ var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4, _renderParams$element, _renderParams$element2;
847
899
  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) || '';
848
900
  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) || '';
849
901
  var extendInfo = (renderParams === null || renderParams === void 0 || (_renderParams$payment3 = renderParams.paymentSessionMetaData) === null || _renderParams$payment3 === void 0 ? void 0 : _renderParams$payment3.extendInfo) || '';
@@ -856,7 +908,8 @@ var ComponentApp = /*#__PURE__*/function () {
856
908
  productScene: productScene,
857
909
  productSceneVersion: productSceneVersion,
858
910
  extendInfo: extendInfo,
859
- mid: mid
911
+ mid: mid,
912
+ elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element = renderParams.elementProps) === null || _renderParams$element === void 0 ? void 0 : _renderParams$element.elementLink // TODO Connect本地调试link
860
913
  });
861
914
  this.app = createIframe(this.AMSSDK.options.mode, this.platform);
862
915
  var hostSign = ((renderParams === null || renderParams === void 0 ? void 0 : renderParams.sessionData) || '').split('&&')[1] || '';
@@ -872,7 +925,8 @@ var ComponentApp = /*#__PURE__*/function () {
872
925
  locale: this.AMSSDK.options.locale,
873
926
  instanceId: this.AMSSDK._instanceId,
874
927
  hostSign: hostSign,
875
- mid: mid
928
+ mid: mid,
929
+ elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element2 = renderParams.elementProps) === null || _renderParams$element2 === void 0 ? void 0 : _renderParams$element2.elementLink // TODO Connect本地调试link
876
930
  }),
877
931
  path = _getIframeUrl2.path,
878
932
  locationSearch = _getIframeUrl2.locationSearch;
@@ -907,7 +961,7 @@ var ComponentApp = /*#__PURE__*/function () {
907
961
  var isJson = isJsonString(e.data);
908
962
  if (isJson) {
909
963
  var data = JSON.parse(e.data);
910
- if (data.name !== messageName.APP_TO_SDK && data.name !== messageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
964
+ if (data.name !== MessageName.APP_TO_SDK && data.name !== MessageName.APP_TO_APP || data.instanceId !== this.AMSSDK._instanceId) return;
911
965
  this._handleAppMessage(data);
912
966
  } else {
913
967
  console.warn(ERRORMESSAGE.NOT_JSON_FORMAT);
@@ -934,7 +988,7 @@ var ComponentApp = /*#__PURE__*/function () {
934
988
  key: "createDialog",
935
989
  value: function () {
936
990
  var _createDialog = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
937
- var pageUrl, isLoad, timeout, logTimeout;
991
+ var pageUrl, _data$device, isLoad, timeout, logTimeout;
938
992
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
939
993
  while (1) switch (_context4.prev = _context4.next) {
940
994
  case 0:
@@ -944,8 +998,8 @@ var ComponentApp = /*#__PURE__*/function () {
944
998
  _context4.next = 5;
945
999
  return createModal({
946
1000
  widthPadding: data === null || data === void 0 ? void 0 : data.widthPadding,
947
- heightPadding: data === null || data === void 0 ? void 0 : data.heightPadding,
948
- device: this.platform,
1001
+ device: (_data$device = data === null || data === void 0 ? void 0 : data.device) !== null && _data$device !== void 0 ? _data$device : this.platform,
1002
+ loadingConfig: data === null || data === void 0 ? void 0 : data.loadingConfig,
949
1003
  url: pageUrl
950
1004
  });
951
1005
  case 5:
@@ -964,6 +1018,7 @@ var ComponentApp = /*#__PURE__*/function () {
964
1018
  }, POPUP_LOADTIME_LOG_LIMIT);
965
1019
  this.popupApp.onload = function () {
966
1020
  isLoad = true;
1021
+ removePopupLoading();
967
1022
  clearTimeout(timeout);
968
1023
  clearTimeout(logTimeout);
969
1024
  };
@@ -975,7 +1030,7 @@ var ComponentApp = /*#__PURE__*/function () {
975
1030
  this.AMSSDK.logger.logError({
976
1031
  title: (_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.title) || 'sdk_error_create_pop_up'
977
1032
  }, {
978
- message: _context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message,
1033
+ errorMessage: _context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message,
979
1034
  url: pageUrl
980
1035
  });
981
1036
  this.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT);
@@ -1113,6 +1168,8 @@ var ComponentApp = /*#__PURE__*/function () {
1113
1168
  }, {
1114
1169
  key: "_handleAppMessage",
1115
1170
  value: function _handleAppMessage(data) {
1171
+ var _data$context2,
1172
+ _this7 = this;
1116
1173
  var eventKeyMap = Object.keys(EVENT).map(function (key) {
1117
1174
  return EVENT[key].name;
1118
1175
  });
@@ -1196,6 +1253,10 @@ var ComponentApp = /*#__PURE__*/function () {
1196
1253
  this.handleCloseBtnShow(true);
1197
1254
  return;
1198
1255
  }
1256
+ if (data.context.event === EVENT.setMaskCloseButton.name) {
1257
+ this.handleMaskCloseBtnShow(data.context.data);
1258
+ return;
1259
+ }
1199
1260
  if (data.context.event === EVENT.setAllowRetention.name) {
1200
1261
  if (data.context.data === true) this._isRetention = true;
1201
1262
  if (data.context.data === false) this._isRetention = false;
@@ -1237,9 +1298,57 @@ var ComponentApp = /*#__PURE__*/function () {
1237
1298
  title: 'sdk_event_event_callback'
1238
1299
  }).send();
1239
1300
  }
1301
+ if ((data === null || data === void 0 || (_data$context2 = data.context) === null || _data$context2 === void 0 ? void 0 : _data$context2.event) === EVENT.getGooglePayToken.name) {
1302
+ handleGooglePay(data).then(function (res) {
1303
+ _this7.dispatchToApp({
1304
+ context: {
1305
+ event: 'getGooglePayToken',
1306
+ data: _objectSpread({}, res)
1307
+ }
1308
+ });
1309
+ }).catch(function (err) {
1310
+ _this7.dispatchToApp({
1311
+ context: {
1312
+ event: 'getGooglePayToken',
1313
+ data: {
1314
+ err: err
1315
+ }
1316
+ }
1317
+ });
1318
+ });
1319
+ return;
1320
+ }
1240
1321
 
1241
- // The plug-in communicates with the sdk after processing
1242
- this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
1322
+ // log event before sending the callback
1323
+ this.logEventCallback(data, "sdk_event_event_callback");
1324
+ try {
1325
+ // The plug-in communicates with the sdk after processing
1326
+ this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
1327
+ // log event after sending the callback
1328
+ this.logEventCallback(data, "sdk_event_afterEventCallback");
1329
+ } catch (e) {
1330
+ console.error(e);
1331
+ }
1332
+ }
1333
+ }, {
1334
+ key: "logEventCallback",
1335
+ value: function logEventCallback(data, title) {
1336
+ if (data.context.event === EVENT.eventCallback.name) {
1337
+ var _data$context4;
1338
+ var callbackData = "";
1339
+ try {
1340
+ var _data$context3;
1341
+ callbackData = JSON.stringify((data === null || data === void 0 || (_data$context3 = data.context) === null || _data$context3 === void 0 ? void 0 : _data$context3.data) || "");
1342
+ } catch (e) {
1343
+ console.error(e);
1344
+ }
1345
+ this.AMSSDK.logger.logInfo({
1346
+ title: title
1347
+ }, {
1348
+ callbackData: callbackData,
1349
+ callbackId: (data === null || data === void 0 || (_data$context4 = data.context) === null || _data$context4 === void 0 ? void 0 : _data$context4.eventCallbackId) || ""
1350
+ }).send();
1351
+ }
1243
1352
  }
1244
1353
  }, {
1245
1354
  key: "dismissLoadingFunc",
@@ -1253,15 +1362,34 @@ var ComponentApp = /*#__PURE__*/function () {
1253
1362
  }
1254
1363
  (_document$getElementB2 = document.getElementById(LOADING_ID)) === null || _document$getElementB2 === void 0 || _document$getElementB2.remove();
1255
1364
  }
1365
+ }, {
1366
+ key: "updateMaskCloseBtn",
1367
+ value: function updateMaskCloseBtn(data) {
1368
+ var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
1369
+ if (maskCloseBtn) {
1370
+ if (this.platform === 'desktop') {
1371
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
1372
+ var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
1373
+ maskCloseBtn.style.top = "".concat((windowHeight - data.height) / 2 - 42, "px");
1374
+ maskCloseBtn.style.right = "".concat((windowWidth - data.width) / 2 + 18, "px");
1375
+ } else {
1376
+ maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
1377
+ }
1378
+ }
1379
+ }
1256
1380
  }, {
1257
1381
  key: "handleSizeChanged",
1258
1382
  value: function handleSizeChanged(data) {
1259
- var _data$context$data4;
1260
- var cashier = document.getElementById(COMPONENT_CONTAINER_ID);
1261
- 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;
1383
+ var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _data$context$data4, _cashier$style;
1384
+ var _selector = (this === null || this === void 0 || (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 || (_this$_renderParams15 = _this$_renderParams15.selector) === null || _this$_renderParams15 === void 0 || (_this$_renderParams16 = _this$_renderParams15.indexOf) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.call(_this$_renderParams15, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.selector : this === null || this === void 0 || (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 || (_this$_renderParams18 = _this$_renderParams18.selector) === null || _this$_renderParams18 === void 0 || (_this$_renderParams19 = _this$_renderParams18.slice) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.call(_this$_renderParams18, 1);
1385
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
1386
+ var appendAliasContainerId = this === null || this === void 0 || (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.appendAliasContainerId;
1387
+ var selectorId = appendAliasContainerId ? "".concat(COMPONENT_CONTAINER_ID, "-").concat(_selector) : COMPONENT_CONTAINER_ID;
1388
+ var cashier = document.getElementById(selectorId);
1389
+ 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;
1262
1390
  cashier.style.height = "".concat(data.context.data.height, "px");
1263
1391
  this.app.style.opacity = '1';
1264
- if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
1392
+ if (this._renderDisplayType === DisplayTypeEnum.popup) {
1265
1393
  if (this.platform === 'desktop') {
1266
1394
  if (data.context.data.width) cashier.style.width = "".concat(data.context.data.width, "px");
1267
1395
  cashier.classList.add("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform, "-animation"));
@@ -1275,9 +1403,8 @@ var ComponentApp = /*#__PURE__*/function () {
1275
1403
 
1276
1404
  // 此style用于弹窗出现和高度变化时动画,动画不同,属性不同
1277
1405
  this.app.style.height = parseInt(this.app.style.height) > 0 ? '100%' : "".concat(data.context.data.height, "px");
1278
-
1279
1406
  // 弹出和弹入动画
1280
- var runkeyframes = "@keyframes ".concat(COMPONENT_CONTAINER_ID, "-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(data.context.data.height, "px;\n }\n }\n @keyframes ").concat(COMPONENT_CONTAINER_ID, "-slide-out {\n 0% {\n height: ").concat(data.context.data.height, "px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }");
1407
+ var runkeyframes = slideInAndOutKeyframes(COMPONENT_CONTAINER_ID, data.context.data.height);
1281
1408
  // 创建style标签
1282
1409
  var style = document.createElement('style');
1283
1410
  style.id = animationStyleId;
@@ -1287,7 +1414,6 @@ var ComponentApp = /*#__PURE__*/function () {
1287
1414
  style.innerHTML = runkeyframes;
1288
1415
  // 将style样式存放到head标签
1289
1416
  document.getElementsByTagName('head')[0].appendChild(style);
1290
-
1291
1417
  // size变动时动画
1292
1418
  setTimeout(function () {
1293
1419
  cashier.style.transition = 'height 0.28s ease-in-out';
@@ -1295,8 +1421,10 @@ var ComponentApp = /*#__PURE__*/function () {
1295
1421
  }
1296
1422
  // 关闭loading,保留蒙层
1297
1423
  this.dismissLoadingFunc();
1424
+ // 更新弹窗关闭按钮位置
1425
+ this.updateMaskCloseBtn(data.context.data);
1298
1426
  }
1299
- if (this._renderDisplayType === renderDisplayTypeEnum.inline) {
1427
+ if (this._renderDisplayType === DisplayTypeEnum.inline) {
1300
1428
  var _document$getElementB3;
1301
1429
  (_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
1302
1430
  this.app.style.height = "".concat(data.context.data.height, "px");
@@ -1325,7 +1453,12 @@ var ComponentApp = /*#__PURE__*/function () {
1325
1453
  key: "handleRedirect",
1326
1454
  value: function handleRedirect(data) {
1327
1455
  var _data$isDestroy,
1328
- _this7 = this;
1456
+ _data$isCallApp,
1457
+ _data$callAppDetectSu,
1458
+ _data$isDestroy2,
1459
+ _data$isCallApp2,
1460
+ _data$callAppDetectSu2,
1461
+ _this8 = this;
1329
1462
  var fromFastSdk = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1330
1463
  var _data = typeof data === 'string' ? {
1331
1464
  normalUrl: data
@@ -1334,48 +1467,69 @@ var ComponentApp = /*#__PURE__*/function () {
1334
1467
  schemeUrl: (data === null || data === void 0 ? void 0 : data.schemeUrl) || '',
1335
1468
  normalUrl: (data === null || data === void 0 ? void 0 : data.normalUrl) || '',
1336
1469
  target: data === null || data === void 0 ? void 0 : data.target,
1337
- isDestroy: (_data$isDestroy = data === null || data === void 0 ? void 0 : data.isDestroy) !== null && _data$isDestroy !== void 0 ? _data$isDestroy : true
1470
+ isDestroy: (_data$isDestroy = data === null || data === void 0 ? void 0 : data.isDestroy) !== null && _data$isDestroy !== void 0 ? _data$isDestroy : true,
1471
+ isCallApp: (_data$isCallApp = data === null || data === void 0 ? void 0 : data.isCallApp) !== null && _data$isCallApp !== void 0 ? _data$isCallApp : false,
1472
+ callAppDetectSuccessDelay: (_data$callAppDetectSu = data === null || data === void 0 ? void 0 : data.callAppDetectSuccessDelay) !== null && _data$callAppDetectSu !== void 0 ? _data$callAppDetectSu : 2000
1338
1473
  });
1474
+ var logParams = {
1475
+ applinkUrl: (data === null || data === void 0 ? void 0 : data.applinkUrl) || '',
1476
+ schemeUrl: (data === null || data === void 0 ? void 0 : data.schemeUrl) || '',
1477
+ normalUrl: (data === null || data === void 0 ? void 0 : data.normalUrl) || '',
1478
+ target: data === null || data === void 0 ? void 0 : data.target,
1479
+ isDestroy: (_data$isDestroy2 = data === null || data === void 0 ? void 0 : data.isDestroy) !== null && _data$isDestroy2 !== void 0 ? _data$isDestroy2 : true,
1480
+ isCallApp: (_data$isCallApp2 = data === null || data === void 0 ? void 0 : data.isCallApp) !== null && _data$isCallApp2 !== void 0 ? _data$isCallApp2 : false,
1481
+ callAppDetectSuccessDelay: (_data$callAppDetectSu2 = data === null || data === void 0 ? void 0 : data.callAppDetectSuccessDelay) !== null && _data$callAppDetectSu2 !== void 0 ? _data$callAppDetectSu2 : 2000
1482
+ };
1339
1483
  this.AMSSDK.logger.logInfo({
1340
1484
  title: 'sdk_event_call_url_start'
1341
- }, _objectSpread({}, data)).send();
1342
- var successCallback = function successCallback(type, url) {
1343
- _this7.dispatchToSDK(EVENT.eventCallback.name, {
1485
+ }, {
1486
+ redirectInfo: JSON.stringify(logParams)
1487
+ }).send();
1488
+ var successCallback = function successCallback(type, url, durationInSeconds) {
1489
+ _this8.dispatchToSDK(EVENT.eventCallback.name, {
1344
1490
  code: eventCodeEnum.SDK_CALL_URL_SUCCESS,
1345
1491
  message: "Successfully opened the app,".concat(type, ": ").concat(url)
1346
1492
  });
1347
- _this7.AMSSDK.logger.logInfo({
1348
- title: 'sdk_event_call_url_success'
1349
- }, {
1493
+ var extra = {
1350
1494
  redirectInfo: JSON.stringify(_data),
1351
1495
  openType: type,
1352
1496
  url: url,
1353
1497
  fromFastSdk: fromFastSdk
1354
- }).send();
1498
+ };
1499
+ if (durationInSeconds) {
1500
+ extra['durationInSeconds'] = durationInSeconds;
1501
+ }
1502
+ _this8.AMSSDK.logger.logInfo({
1503
+ title: 'sdk_event_call_url_success'
1504
+ }, extra).send();
1355
1505
  };
1356
- var failCallback = function failCallback(type, url) {
1357
- _this7.dispatchToSDK(EVENT.eventCallback.name, {
1506
+ var failCallback = function failCallback(type, url, durationInSeconds) {
1507
+ _this8.dispatchToSDK(EVENT.eventCallback.name, {
1358
1508
  code: eventCodeEnum.SDK_CALL_URL_ERROR,
1359
1509
  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)
1360
1510
  });
1361
- _this7.AMSSDK.logger.logInfo({
1362
- title: 'sdk_error_call_url_failed'
1363
- }, {
1511
+ var extra = {
1364
1512
  redirectInfo: JSON.stringify(_data),
1365
1513
  openType: type,
1366
1514
  url: url,
1367
1515
  fromFastSdk: fromFastSdk
1368
- }).send();
1516
+ };
1517
+ if (durationInSeconds) {
1518
+ extra['durationInSeconds'] = durationInSeconds;
1519
+ }
1520
+ _this8.AMSSDK.logger.logInfo({
1521
+ title: 'sdk_error_call_url_failed'
1522
+ }, extra).send();
1369
1523
  };
1370
1524
 
1371
1525
  // 支持 target: _blank,新开tab页打开
1372
- if (_data.target === targetEnum.BLANK) {
1526
+ if (_data.target === TargetEnum.BLANK) {
1373
1527
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1374
1528
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1375
1529
  window.open(_data.normalUrl);
1376
1530
  return;
1377
1531
  }
1378
- if (_data.target === targetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1532
+ if (_data.target === TargetEnum.REPLACE && !(_data !== null && _data !== void 0 && _data.applinkUrl) && !(_data !== null && _data !== void 0 && _data.schemeUrl)) {
1379
1533
  if (!_data.normalUrl) return failCallback(RedirectType.NormalUrl, '');
1380
1534
  successCallback(RedirectType.NormalUrl, _data.normalUrl);
1381
1535
  window.location.replace(_data.normalUrl);
@@ -1383,20 +1537,40 @@ var ComponentApp = /*#__PURE__*/function () {
1383
1537
  }
1384
1538
  // 销毁iframe和全局loading
1385
1539
  if (_data !== null && _data !== void 0 && _data.isDestroy) this.cleanContainer();
1540
+ // 唤端
1541
+ if (_data !== null && _data !== void 0 && _data.isCallApp && _data !== null && _data !== void 0 && _data.schemeUrl) {
1542
+ var startCallAppTime = new Date();
1543
+ var detectSuccessDelay = typeof (data === null || data === void 0 ? void 0 : data.callAppDetectSuccessDelay) === 'number' ? data.callAppDetectSuccessDelay : 5000;
1544
+ this.AMSSDK._redirect({
1545
+ schemeUrl: _data === null || _data === void 0 ? void 0 : _data.schemeUrl,
1546
+ callAppJudgeTime: detectSuccessDelay
1547
+ }).then(function () {
1548
+ var endCallAppTime = new Date();
1549
+ var durationInMilliseconds = endCallAppTime.getTime() - startCallAppTime.getTime();
1550
+ var durationInSeconds = durationInMilliseconds / 1000;
1551
+ successCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl, durationInSeconds);
1552
+ }).catch(function () {
1553
+ var endCallAppTime = new Date();
1554
+ var durationInMilliseconds = endCallAppTime.getTime() - startCallAppTime.getTime();
1555
+ var durationInSeconds = durationInMilliseconds / 1000;
1556
+ failCallback(RedirectType.SchemeUrl, _data.schemeUrl, durationInSeconds);
1557
+ });
1558
+ return;
1559
+ }
1386
1560
  this.AMSSDK._redirect({
1387
1561
  applinkUrl: _data === null || _data === void 0 ? void 0 : _data.applinkUrl
1388
1562
  }).then(function () {
1389
1563
  successCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1390
1564
  }).catch(function () {
1391
1565
  if (_data !== null && _data !== void 0 && _data.applinkUrl) failCallback(RedirectType.ApplinkUrl, _data === null || _data === void 0 ? void 0 : _data.applinkUrl);
1392
- return _this7.AMSSDK._redirect({
1566
+ return _this8.AMSSDK._redirect({
1393
1567
  schemeUrl: _data === null || _data === void 0 ? void 0 : _data.schemeUrl
1394
1568
  });
1395
1569
  }).then(function () {
1396
1570
  successCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1397
1571
  }).catch(function () {
1398
1572
  if (_data !== null && _data !== void 0 && _data.schemeUrl) failCallback(RedirectType.SchemeUrl, _data === null || _data === void 0 ? void 0 : _data.schemeUrl);
1399
- return _this7.AMSSDK._redirect({
1573
+ return _this8.AMSSDK._redirect({
1400
1574
  normalUrl: _data === null || _data === void 0 ? void 0 : _data.normalUrl
1401
1575
  });
1402
1576
  }).then(function () {
@@ -1435,12 +1609,12 @@ var ComponentApp = /*#__PURE__*/function () {
1435
1609
  }, {
1436
1610
  key: "handleAppHeartBeat",
1437
1611
  value: function handleAppHeartBeat() {
1438
- var _this8 = this;
1612
+ var _this9 = this;
1439
1613
  try {
1440
1614
  if (!this._webAppHeartBeatTimeoutFn) {
1441
1615
  this._webAppHeartBeatTimeoutFn = function () {
1442
- if (_this8.isAppAttached()) {
1443
- _this8.AMSSDK.logger.logError({
1616
+ if (_this9.isAppAttached()) {
1617
+ _this9.AMSSDK.logger.logError({
1444
1618
  title: 'sdk_error_appHeartBeatTimeout'
1445
1619
  });
1446
1620
  }
@@ -1454,8 +1628,8 @@ var ComponentApp = /*#__PURE__*/function () {
1454
1628
  window._webAppHeartBeatTimeoutId = setTimeout(this._webAppHeartBeatTimeoutFn, TIMEOUT_WEB_APP_HEART_BEAT);
1455
1629
  }
1456
1630
  setTimeout(function () {
1457
- if (_this8.isAppAttached()) {
1458
- _this8.dispatchToApp({
1631
+ if (_this9.isAppAttached()) {
1632
+ _this9.dispatchToApp({
1459
1633
  context: {
1460
1634
  event: 'sdkHeartBeat',
1461
1635
  data: {}
@@ -1492,6 +1666,16 @@ var ComponentApp = /*#__PURE__*/function () {
1492
1666
  closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_BLOCK_ID, "-hidden"));
1493
1667
  }
1494
1668
  }
1669
+ }, {
1670
+ key: "handleMaskCloseBtnShow",
1671
+ value: function handleMaskCloseBtnShow(data) {
1672
+ var closeBlock = document.getElementById(COMPONENT_CLOSE_MASK_BLOCK_ID);
1673
+ if ((data === null || data === void 0 ? void 0 : data.status) === 'show') {
1674
+ closeBlock === null || closeBlock === void 0 || closeBlock.classList.remove("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
1675
+ } else {
1676
+ closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID, "-hidden"));
1677
+ }
1678
+ }
1495
1679
 
1496
1680
  /**
1497
1681
  * @description Send message to SDK
@@ -1511,7 +1695,7 @@ var ComponentApp = /*#__PURE__*/function () {
1511
1695
  value: function dispatchToApp(payload) {
1512
1696
  var targetElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1513
1697
  var data = Object.assign({}, payload, {
1514
- name: messageName.SDK_TO_APP,
1698
+ name: MessageName.SDK_TO_APP,
1515
1699
  mode: this.AMSSDK.options.mode,
1516
1700
  appId: COMPONENTPLUGINID,
1517
1701
  instanceId: this.AMSSDK._instanceId
@@ -1550,24 +1734,25 @@ var ComponentApp = /*#__PURE__*/function () {
1550
1734
  key: "sendRenderEvent",
1551
1735
  value: (function () {
1552
1736
  var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1553
- var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _this$AMSSDK$logger, _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$AMSSDK, _this$_renderParams24, res, submitRes;
1737
+ var _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$_renderParams24, _this$_renderParams25, _this$_renderParams26, _this$_renderParams27, _this$_renderParams28, _this$_renderParams29, _this$AMSSDK$logger, _this$_renderParams30, _this$_renderParams31, _this$_renderParams32, _this$AMSSDK, _this$_renderParams33, isAddressElement, res, submitRes;
1554
1738
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1555
1739
  while (1) switch (_context8.prev = _context8.next) {
1556
1740
  case 0:
1557
1741
  _context8.prev = 0;
1558
- if (!(!this._actionQueryPromise || !this._actionSubmitPromise)) {
1559
- _context8.next = 3;
1742
+ isAddressElement = this.AMSSDK.options.product === ProductSceneEnum.ELEMENT_ADDRESS;
1743
+ if (!((!this._actionQueryPromise || !this._actionSubmitPromise) && !isAddressElement)) {
1744
+ _context8.next = 4;
1560
1745
  break;
1561
1746
  }
1562
1747
  return _context8.abrupt("return");
1563
- case 3:
1564
- _context8.next = 5;
1748
+ case 4:
1749
+ _context8.next = 6;
1565
1750
  return this._actionQueryPromise;
1566
- case 5:
1751
+ case 6:
1567
1752
  res = _context8.sent;
1568
- _context8.next = 8;
1753
+ _context8.next = 9;
1569
1754
  return this._actionSubmitPromise;
1570
- case 8:
1755
+ case 9:
1571
1756
  submitRes = _context8.sent;
1572
1757
  this._performanceData.push({
1573
1758
  key: 'sdk_render_component',
@@ -1579,29 +1764,34 @@ var ComponentApp = /*#__PURE__*/function () {
1579
1764
  data: {
1580
1765
  queryResult: res,
1581
1766
  submitResult: submitRes,
1582
- sessionResult: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.paymentSessionMetaData,
1583
- paymentSessionData: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.sessionData,
1767
+ sessionResult: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionMetaData,
1768
+ paymentSessionData: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.sessionData,
1584
1769
  heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
1585
- renderDisplayType: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.renderDisplayType,
1586
- appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
1587
- notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
1770
+ renderDisplayType: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.renderDisplayType,
1771
+ appearance: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.appearance,
1772
+ notRedirectAfterComplete: ((_this$_renderParams25 = this._renderParams) === null || _this$_renderParams25 === void 0 ? void 0 : _this$_renderParams25.notRedirectAfterComplete) === true,
1773
+ isAppWebview: this._isAppWebview,
1588
1774
  merchantAppointParam: this._merchantAppointParam,
1589
1775
  allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
1776
+ /** 地址组件集成的参数 */
1777
+ configParams: (_this$_renderParams26 = this._renderParams) === null || _this$_renderParams26 === void 0 ? void 0 : _this$_renderParams26.configParams,
1778
+ prefillValue: (_this$_renderParams27 = this._renderParams) === null || _this$_renderParams27 === void 0 ? void 0 : _this$_renderParams27.prefillValue,
1779
+ componentSession: (_this$_renderParams28 = this._renderParams) === null || _this$_renderParams28 === void 0 ? void 0 : _this$_renderParams28.componentSession,
1590
1780
  envInfo: {
1591
1781
  screenHeight: screen.height,
1592
1782
  screenWidth: screen.width
1593
1783
  },
1594
1784
  logMetaData: _objectSpread(_objectSpread({
1595
- trackId: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.sessionData,
1785
+ trackId: (_this$_renderParams29 = this._renderParams) === null || _this$_renderParams29 === void 0 ? void 0 : _this$_renderParams29.sessionData,
1596
1786
  platform: this.platform,
1597
1787
  firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
1598
- }, ((_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 || (_this$_renderParams21 = _this$_renderParams21.paymentSessionMetaData) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionConfig) || {}), {}, {
1599
- renderDisplayType: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.renderDisplayType,
1788
+ }, ((_this$_renderParams30 = this._renderParams) === null || _this$_renderParams30 === void 0 || (_this$_renderParams30 = _this$_renderParams30.paymentSessionMetaData) === null || _this$_renderParams30 === void 0 ? void 0 : _this$_renderParams30.paymentSessionConfig) || {}), {}, {
1789
+ renderDisplayType: (_this$_renderParams31 = this._renderParams) === null || _this$_renderParams31 === void 0 ? void 0 : _this$_renderParams31.renderDisplayType,
1600
1790
  sdkVersion: this._appVersion,
1601
- merchantId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.clientId,
1791
+ merchantId: (_this$_renderParams32 = this._renderParams) === null || _this$_renderParams32 === void 0 || (_this$_renderParams32 = _this$_renderParams32.paymentSessionMetaData) === null || _this$_renderParams32 === void 0 ? void 0 : _this$_renderParams32.clientId,
1602
1792
  instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
1603
1793
  performanceData: this._performanceData,
1604
- paymentMethodType: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentMethodInfoView) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentMethodType
1794
+ paymentMethodType: (_this$_renderParams33 = this._renderParams) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentSessionMetaData) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentMethodInfoView) === null || _this$_renderParams33 === void 0 ? void 0 : _this$_renderParams33.paymentMethodType
1605
1795
  })
1606
1796
  }
1607
1797
  }
@@ -1618,16 +1808,16 @@ var ComponentApp = /*#__PURE__*/function () {
1618
1808
  }
1619
1809
  });
1620
1810
  // eslint-disable-next-line no-empty
1621
- _context8.next = 17;
1811
+ _context8.next = 18;
1622
1812
  break;
1623
- case 15:
1624
- _context8.prev = 15;
1813
+ case 16:
1814
+ _context8.prev = 16;
1625
1815
  _context8.t0 = _context8["catch"](0);
1626
- case 17:
1816
+ case 18:
1627
1817
  case "end":
1628
1818
  return _context8.stop();
1629
1819
  }
1630
- }, _callee8, this, [[0, 15]]);
1820
+ }, _callee8, this, [[0, 16]]);
1631
1821
  }));
1632
1822
  function sendRenderEvent() {
1633
1823
  return _sendRenderEvent.apply(this, arguments);
@@ -1642,9 +1832,11 @@ var ComponentApp = /*#__PURE__*/function () {
1642
1832
  key: "cleanContainer",
1643
1833
  value: function cleanContainer() {
1644
1834
  var _document$getElementB4,
1645
- _this9 = this;
1835
+ _document$getElementB5,
1836
+ _this10 = this;
1646
1837
  var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1647
- (_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1838
+ (_document$getElementB4 = document.getElementById(COMPONENT_CLOSE_MASK_BLOCK_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
1839
+ (_document$getElementB5 = document.getElementById(LOADING_ID)) === null || _document$getElementB5 === void 0 || _document$getElementB5.remove();
1648
1840
  this.hideComponentAnimation();
1649
1841
  var mockup = document.getElementById(MOCKUP_ID);
1650
1842
  mockup === null || mockup === void 0 || mockup.classList.add("".concat(MOCKUP_ID, "-hidden"));
@@ -1654,21 +1846,26 @@ var ComponentApp = /*#__PURE__*/function () {
1654
1846
  this.app = null;
1655
1847
  if (immediately) this.cleanElement();else {
1656
1848
  setTimeout(function () {
1657
- _this9.cleanElement();
1849
+ _this10.cleanElement();
1658
1850
  }, 300);
1659
1851
  }
1660
1852
  }
1661
1853
  }, {
1662
1854
  key: "hideComponentAnimation",
1663
1855
  value: function hideComponentAnimation() {
1664
- var container = document.getElementById(COMPONENT_CONTAINER_ID);
1665
- if (this.app) this.app.style.height = container.style.height;
1856
+ var _this$_renderParams34, _this$_renderParams35, _this$_renderParams36, _this$_renderParams37, _this$_renderParams38, _this$_renderParams39, _container$style;
1857
+ // 修改需当前文件搜索,这段注释appendAliasContainerId
1858
+ var _selector = (this === null || this === void 0 || (_this$_renderParams34 = this._renderParams) === null || _this$_renderParams34 === void 0 || (_this$_renderParams34 = _this$_renderParams34.selector) === null || _this$_renderParams34 === void 0 || (_this$_renderParams35 = _this$_renderParams34.indexOf) === null || _this$_renderParams35 === void 0 ? void 0 : _this$_renderParams35.call(_this$_renderParams34, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams36 = this._renderParams) === null || _this$_renderParams36 === void 0 ? void 0 : _this$_renderParams36.selector : this === null || this === void 0 || (_this$_renderParams37 = this._renderParams) === null || _this$_renderParams37 === void 0 || (_this$_renderParams37 = _this$_renderParams37.selector) === null || _this$_renderParams37 === void 0 || (_this$_renderParams38 = _this$_renderParams37.slice) === null || _this$_renderParams38 === void 0 ? void 0 : _this$_renderParams38.call(_this$_renderParams37, 1);
1859
+ var appendAliasContainerId = this !== null && this !== void 0 && (_this$_renderParams39 = this._renderParams) !== null && _this$_renderParams39 !== void 0 && _this$_renderParams39.appendAliasContainerId ? "-".concat(_selector) : '';
1860
+ var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
1861
+ var container = document.getElementById(inlineId);
1862
+ if (this.app && container) this.app.style.height = container === null || container === void 0 || (_container$style = container.style) === null || _container$style === void 0 ? void 0 : _container$style.height;
1666
1863
  if (container) {
1667
1864
  // size变化动画取消
1668
1865
  container.style.transition = '';
1669
- container === null || container === void 0 || container.classList.remove("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform));
1670
- container === null || container === void 0 || container.classList.remove("".concat(COMPONENT_CONTAINER_ID, "-").concat(this.platform, "-animation"));
1671
- container === null || container === void 0 || container.classList.add("".concat(COMPONENT_CONTAINER_ID, "-hidden-").concat(this.platform));
1866
+ container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform));
1867
+ container === null || container === void 0 || container.classList.remove("".concat(inlineId, "-").concat(this.platform, "-animation"));
1868
+ container === null || container === void 0 || container.classList.add("".concat(inlineId, "-hidden-").concat(this.platform));
1672
1869
  }
1673
1870
  }
1674
1871
  }, {