@polyv/product-sdk 1.2.0-rc-20250724.2 → 1.4.0-rc-20250904.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.
package/index.es.js CHANGED
@@ -1,7 +1,167 @@
1
- var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
1
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2
+ function hasOwnProp(r, n) {
3
+ return hasOwnProperty.call(r, n);
4
+ }
5
+ function assignProps(r) {
6
+ if (null == r) throw new TypeError("Cannot convert undefined or null to object");
7
+ for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
8
+ var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
9
+ if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
10
+ }
11
+ return r;
12
+ }
13
+ function _typeof$8(o) {
14
+ "@babel/helpers - typeof";
15
+ return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
16
+ return typeof o2;
17
+ } : function(o2) {
18
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
19
+ }, _typeof$8(o);
20
+ }
21
+ function addToResult(n, o, e, t) {
22
+ if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
23
+ if ("function" == typeof t.encode) {
24
+ o = t.encode(o);
25
+ e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$8(e)) ? t.encode(String(e)) : "";
26
+ }
27
+ n.push(o + "=" + e);
28
+ }
29
+ }
30
+ function handleMultiValues(n, o, e, t) {
31
+ e.forEach(function(e2) {
32
+ addToResult(n, o, e2, t);
33
+ });
34
+ }
35
+ function stringify(n, o) {
36
+ var e = assignProps({
37
+ encode: encodeURIComponent
38
+ }, o), t = [];
39
+ var i, r;
40
+ for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
41
+ return t.join("&");
42
+ }
43
+ function splitURL(e) {
44
+ var t = {
45
+ leftContext: ""
46
+ };
47
+ var n = e.indexOf("#");
48
+ return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
49
+ }
50
+ function joinURL(e) {
51
+ var t = e.leftContext;
52
+ return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
53
+ }
54
+ function concat(i, r, t) {
55
+ if (i = String(i), null == r) return i;
56
+ if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
57
+ var n = splitURL(i);
58
+ var e = n.search || "";
59
+ return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
60
+ }
61
+ function boolToYN(o) {
62
+ if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
63
+ return o ? "Y" : "N";
64
+ }
65
+ function ynToBool(o, n) {
66
+ var e = String(o).toUpperCase();
67
+ if ("Y" !== e && "N" !== e) {
68
+ if (null == n) throw new Error('The value argument must be "Y" or "N"');
69
+ e = String(n).toUpperCase();
70
+ }
71
+ return "Y" === e;
72
+ }
73
+ function _typeof$7(o) {
74
+ "@babel/helpers - typeof";
75
+ return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
76
+ return typeof o2;
77
+ } : function(o2) {
78
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
79
+ }, _typeof$7(o);
80
+ }
81
+ function _classCallCheck$a(a, n) {
82
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
83
+ }
84
+ function _defineProperties$5(e, r) {
85
+ for (var t = 0; t < r.length; t++) {
86
+ var o = r[t];
87
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
88
+ }
89
+ }
90
+ function _createClass$a(e, r, t) {
91
+ return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
92
+ }
93
+ function _toPropertyKey$7(t) {
94
+ var i = _toPrimitive$7(t, "string");
95
+ return "symbol" == _typeof$7(i) ? i : i + "";
96
+ }
97
+ function _toPrimitive$7(t, r) {
98
+ if ("object" != _typeof$7(t) || !t) return t;
99
+ var e = t[Symbol.toPrimitive];
100
+ if (void 0 !== e) {
101
+ var i = e.call(t, r);
102
+ if ("object" != _typeof$7(i)) return i;
103
+ throw new TypeError("@@toPrimitive must return a primitive value.");
104
+ }
105
+ return String(t);
106
+ }
107
+ var EventEmitter = /* @__PURE__ */ (function() {
108
+ function EventEmitter2() {
109
+ _classCallCheck$a(this, EventEmitter2);
110
+ this.__eventStore = {};
111
+ }
112
+ return _createClass$a(EventEmitter2, [{
113
+ key: "__addOnEvent",
114
+ value: function __addOnEvent(t, e, n, o) {
115
+ if (!e || !n) return;
116
+ var r = this.__eventStore[e];
117
+ r || (r = []), r.push({
118
+ type: t,
119
+ handler: n,
120
+ callbackHandler: n.bind(o)
121
+ }), this.__eventStore[e] = r;
122
+ }
123
+ }, {
124
+ key: "on",
125
+ value: function on(t, e) {
126
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
127
+ this.__addOnEvent("normal", t, e, n);
128
+ }
129
+ }, {
130
+ key: "once",
131
+ value: function once(t, e) {
132
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
133
+ this.__addOnEvent("once", t, e, n);
134
+ }
135
+ }, {
136
+ key: "off",
137
+ value: function off(t, e) {
138
+ var n = this.__eventStore[t];
139
+ n && (n = n.filter(function(t2) {
140
+ return t2.handler !== e;
141
+ }), this.__eventStore[t] = n);
142
+ }
143
+ }, {
144
+ key: "emit",
145
+ value: function emit(t, e, n) {
146
+ var _this = this;
147
+ var o = this.__eventStore[t];
148
+ o && o.forEach(function(o2) {
149
+ var r = o2.type, _ = o2.handler, s = o2.callbackHandler;
150
+ "function" == typeof s && s(e, n), "once" === r && _this.off(t, _);
151
+ });
152
+ }
153
+ }, {
154
+ key: "destroy",
155
+ value: function destroy() {
156
+ this.__eventStore = {};
157
+ }
158
+ }]);
159
+ })();
160
+ var PolyvApiUrl = /* @__PURE__ */ (function(PolyvApiUrl2) {
2
161
  PolyvApiUrl2["GetProductTagList"] = "/live/v4/watch/channel/product/tag/list";
3
162
  PolyvApiUrl2["GetProductListByShowId"] = "/live/v3/sdk/watch/interactive/product/list-by-showId";
4
163
  PolyvApiUrl2["GetProductListByTag"] = "/live/v4/watch/channel/product/list";
164
+ PolyvApiUrl2["GetProductListByLaunch"] = "/live/v4/channel/product/list";
5
165
  PolyvApiUrl2["GetProductDataById"] = "/live/v3/sdk/watch/interactive/product/get-by-product-id";
6
166
  PolyvApiUrl2["GetOrderList"] = "/live/v4/watch/channel/viewer/product/order/list";
7
167
  PolyvApiUrl2["GetOrderDetail"] = "/live/v4/watch/channel/viewer/product/order/get-detail";
@@ -15,20 +175,115 @@ var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
15
175
  PolyvApiUrl2["AddAddress"] = "/live/v4/watch/channel/viewer/address/save";
16
176
  PolyvApiUrl2["UpdateAddress"] = "/live/v4/watch/channel/viewer/address/update";
17
177
  PolyvApiUrl2["DeleteAddress"] = "/live/v4/watch/channel/viewer/address/delete";
178
+ PolyvApiUrl2["StartProductExplain"] = "/live/v4/channel/product/product-explain/start-now";
179
+ PolyvApiUrl2["EndProductExplain"] = "/live/v4/channel/product/product-explain/end-now";
180
+ PolyvApiUrl2["RestartProductExplain"] = "/live/v4/channel/product/product-explain/restart-now";
181
+ PolyvApiUrl2["DeleteProductExplain"] = "/live/v4/channel/product/product-explain/delete";
182
+ PolyvApiUrl2["GetCurrentProductExplain"] = "/live/v4/channel/product/product-explain/get-current-product-id";
183
+ PolyvApiUrl2["OpenProductPrice"] = "/live/v4/channel/product/open-price";
184
+ PolyvApiUrl2["HideProductPrice"] = "/live/v4/channel/product/un-open-price";
185
+ PolyvApiUrl2["ProductPushRule"] = "/live/v4/channel/product/push/rule";
186
+ PolyvApiUrl2["PushProduct"] = "/live/v4/channel/product/push/push";
187
+ PolyvApiUrl2["CancelPushProduct"] = "/live/v4/channel/product/push/cancel-push";
188
+ PolyvApiUrl2["BatchDeleteProduct"] = "/live/v4/channel/product/delete-batch";
189
+ PolyvApiUrl2["BatchShelfProduct"] = "/live/v4/channel/product/shelf-batch";
18
190
  return PolyvApiUrl2;
19
- }({});
20
- function boolToYN(o) {
21
- if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
22
- return o ? "Y" : "N";
23
- }
24
- function ynToBool(o, n) {
25
- var e = String(o).toUpperCase();
26
- if ("Y" !== e && "N" !== e) {
27
- if (null == n) throw new Error('The value argument must be "Y" or "N"');
28
- e = String(n).toUpperCase();
29
- }
30
- return "Y" === e;
31
- }
191
+ })({});
192
+ var ProductPushRule = /* @__PURE__ */ (function(ProductPushRule2) {
193
+ ProductPushRule2["BigCard"] = "bigCard";
194
+ ProductPushRule2["SmallCard"] = "smallCard";
195
+ return ProductPushRule2;
196
+ })({});
197
+ var ProductEvents = /* @__PURE__ */ (function(ProductEvents2) {
198
+ ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
199
+ ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
200
+ ProductEvents2["AddProduct"] = "AddProduct";
201
+ ProductEvents2["DeleteProduct"] = "DeleteProduct";
202
+ ProductEvents2["ChangeProduct"] = "ChangeProduct";
203
+ ProductEvents2["MoveProduct"] = "MoveProduct";
204
+ ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
205
+ ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
206
+ ProductEvents2["PushProduct"] = "PushProduct";
207
+ ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
208
+ ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
209
+ ProductEvents2["RefreshProductList"] = "RefreshProductList";
210
+ ProductEvents2["ProductClick"] = "ProductClick";
211
+ ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
212
+ return ProductEvents2;
213
+ })({});
214
+ var ProductType = /* @__PURE__ */ (function(ProductType2) {
215
+ ProductType2["Normal"] = "normal";
216
+ ProductType2["Finance"] = "finance";
217
+ ProductType2["Position"] = "position";
218
+ return ProductType2;
219
+ })({});
220
+ var ProductLinkType = /* @__PURE__ */ (function(ProductLinkType2) {
221
+ ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
222
+ ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
223
+ ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
224
+ return ProductLinkType2;
225
+ })({});
226
+ var ProductLinkJumpWay = /* @__PURE__ */ (function(ProductLinkJumpWay2) {
227
+ ProductLinkJumpWay2["PopUp"] = "POP_UP";
228
+ ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
229
+ ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
230
+ return ProductLinkJumpWay2;
231
+ })({});
232
+ var ProductStatus = /* @__PURE__ */ (function(ProductStatus2) {
233
+ ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
234
+ ProductStatus2[ProductStatus2["OffSale"] = 2] = "OffSale";
235
+ return ProductStatus2;
236
+ })({});
237
+ var ProductMediaType = /* @__PURE__ */ (function(ProductMediaType2) {
238
+ ProductMediaType2["Image"] = "image";
239
+ ProductMediaType2["MaterialVideo"] = "material-video";
240
+ return ProductMediaType2;
241
+ })({});
242
+ var ProductExplainStatus = /* @__PURE__ */ (function(ProductExplainStatus2) {
243
+ ProductExplainStatus2["NotExplained"] = "notExplained";
244
+ ProductExplainStatus2["Explaining"] = "explaining";
245
+ ProductExplainStatus2["Explained"] = "explained";
246
+ return ProductExplainStatus2;
247
+ })({});
248
+ var ProductExplainType = /* @__PURE__ */ (function(ProductExplainType2) {
249
+ ProductExplainType2["Live"] = "live";
250
+ ProductExplainType2["Playback"] = "recordFile";
251
+ return ProductExplainType2;
252
+ })({});
253
+ var ProductExplainOperation = /* @__PURE__ */ (function(ProductExplainOperation2) {
254
+ ProductExplainOperation2["Start"] = "start";
255
+ ProductExplainOperation2["End"] = "end";
256
+ ProductExplainOperation2["Restart"] = "restart";
257
+ return ProductExplainOperation2;
258
+ })({});
259
+ var ProductBuyType = /* @__PURE__ */ (function(ProductBuyType2) {
260
+ ProductBuyType2["DirectBuy"] = "inner";
261
+ ProductBuyType2["Link"] = "link";
262
+ return ProductBuyType2;
263
+ })({});
264
+ var ProductPriceType = /* @__PURE__ */ (function(ProductPriceType2) {
265
+ ProductPriceType2["Amount"] = "AMOUNT";
266
+ ProductPriceType2["Custom"] = "CUSTOM";
267
+ return ProductPriceType2;
268
+ })({});
269
+ var ProductDeliveryType = /* @__PURE__ */ (function(ProductDeliveryType2) {
270
+ ProductDeliveryType2["Express"] = "express";
271
+ ProductDeliveryType2["Virtual"] = "virtual";
272
+ return ProductDeliveryType2;
273
+ })({});
274
+ var ProductServiceType = /* @__PURE__ */ (function(ProductServiceType2) {
275
+ ProductServiceType2["WxWorkCode"] = "wxWorkCode";
276
+ ProductServiceType2["Custom"] = "custom";
277
+ return ProductServiceType2;
278
+ })({});
279
+ var AuthType = /* @__PURE__ */ (function(AuthType2) {
280
+ AuthType2["None"] = "none";
281
+ AuthType2["Custom"] = "custom";
282
+ AuthType2["External"] = "external";
283
+ AuthType2["Direct"] = "direct";
284
+ AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
285
+ return AuthType2;
286
+ })({});
32
287
  function canMatchKeywords(e, t) {
33
288
  e = e.toLowerCase();
34
289
  var n = /[/\s;_-]/, s = /[/\s;_-]/;
@@ -69,36 +324,36 @@ var osRules = [{
69
324
  name: "android",
70
325
  regExp: /\bAdr\s([\d.]+)(?:\b|_)/
71
326
  }];
72
- function _typeof$8(o) {
327
+ function _typeof$6(o) {
73
328
  "@babel/helpers - typeof";
74
- return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
329
+ return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
75
330
  return typeof o2;
76
331
  } : function(o2) {
77
332
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
78
- }, _typeof$8(o);
333
+ }, _typeof$6(o);
79
334
  }
80
- function _classCallCheck$a(a, n) {
335
+ function _classCallCheck$9(a, n) {
81
336
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
82
337
  }
83
- function _defineProperties$5(e, r) {
338
+ function _defineProperties$4(e, r) {
84
339
  for (var t = 0; t < r.length; t++) {
85
340
  var o = r[t];
86
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
341
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$6(o.key), o);
87
342
  }
88
343
  }
89
- function _createClass$a(e, r, t) {
90
- return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
344
+ function _createClass$9(e, r, t) {
345
+ return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
91
346
  }
92
- function _toPropertyKey$7(t) {
93
- var i = _toPrimitive$7(t, "string");
94
- return "symbol" == _typeof$8(i) ? i : i + "";
347
+ function _toPropertyKey$6(t) {
348
+ var i = _toPrimitive$6(t, "string");
349
+ return "symbol" == _typeof$6(i) ? i : i + "";
95
350
  }
96
- function _toPrimitive$7(t, r) {
97
- if ("object" != _typeof$8(t) || !t) return t;
351
+ function _toPrimitive$6(t, r) {
352
+ if ("object" != _typeof$6(t) || !t) return t;
98
353
  var e = t[Symbol.toPrimitive];
99
354
  if (void 0 !== e) {
100
355
  var i = e.call(t, r);
101
- if ("object" != _typeof$8(i)) return i;
356
+ if ("object" != _typeof$6(i)) return i;
102
357
  throw new TypeError("@@toPrimitive must return a primitive value.");
103
358
  }
104
359
  return String(t);
@@ -111,12 +366,12 @@ function compareVersions(r, e) {
111
366
  }
112
367
  return n.length - s.length;
113
368
  }
114
- var Version = /* @__PURE__ */ function() {
369
+ var Version = /* @__PURE__ */ (function() {
115
370
  function Version2(r) {
116
- _classCallCheck$a(this, Version2);
371
+ _classCallCheck$9(this, Version2);
117
372
  this._ver = (r || "").replace(/_/g, ".").replace(/\.+$/, ""), Object.freeze(this);
118
373
  }
119
- return _createClass$a(Version2, [{
374
+ return _createClass$9(Version2, [{
120
375
  key: "_compare",
121
376
  value: function _compare(r, e) {
122
377
  if (!this._ver || !r) return false;
@@ -156,11 +411,11 @@ var Version = /* @__PURE__ */ function() {
156
411
  return this._ver;
157
412
  }
158
413
  }]);
159
- }();
160
- function _createClass$9(e, r, t) {
414
+ })();
415
+ function _createClass$8(e, r, t) {
161
416
  return Object.defineProperty(e, "prototype", { writable: false }), e;
162
417
  }
163
- function _classCallCheck$9(a, n) {
418
+ function _classCallCheck$8(a, n) {
164
419
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
165
420
  }
166
421
  var propMap$3 = {
@@ -184,8 +439,8 @@ function platformToOS(s) {
184
439
  return "windows";
185
440
  }
186
441
  }
187
- var OSInfo = /* @__PURE__ */ _createClass$9(function OSInfo2(s, o) {
188
- _classCallCheck$9(this, OSInfo2);
442
+ var OSInfo = /* @__PURE__ */ _createClass$8(function OSInfo2(s, o) {
443
+ _classCallCheck$8(this, OSInfo2);
189
444
  var i;
190
445
  var e;
191
446
  if (this.isIOS = false, this.isAndroid = false, this.isHarmonyOS = false, this.isOpenHarmony = false, this.isWindows = false, this.isMacOS = false, null == o ? void 0 : o.platform) {
@@ -317,10 +572,10 @@ var androidRules = [{
317
572
  name: "vivo",
318
573
  modelRegExp: /^V[12]\d{3}[A-Z]{0,2}$/
319
574
  }];
320
- function _createClass$8(e, r, t) {
575
+ function _createClass$7(e, r, t) {
321
576
  return Object.defineProperty(e, "prototype", { writable: false }), e;
322
577
  }
323
- function _classCallCheck$8(a, n) {
578
+ function _classCallCheck$7(a, n) {
324
579
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
325
580
  }
326
581
  var propMap$2 = {
@@ -334,8 +589,8 @@ var propMap$2 = {
334
589
  oneplus: "isOnePlus",
335
590
  samsung: "isSamsung"
336
591
  };
337
- var BrandInfo = /* @__PURE__ */ _createClass$8(function BrandInfo2(i, s) {
338
- _classCallCheck$8(this, BrandInfo2);
592
+ var BrandInfo = /* @__PURE__ */ _createClass$7(function BrandInfo2(i, s) {
593
+ _classCallCheck$7(this, BrandInfo2);
339
594
  var e;
340
595
  if (this.isHuawei = false, this.isMi = false, this.isOppo = false, this.isVivo = false, this.isOnePlus = false, this.isSamsung = false, this.isIPod = false, this.isIPhone = false, this.isIPad = false, this.isMac = false, this.isApple = false, s.isIOS ? (e = appleRules, this.isApple = true) : s.isMacOS ? (this.isMac = true, this.isApple = true) : (s.isAndroid || s.isOpenHarmony) && (e = androidRules), e) {
341
596
  var o = execRules(i, e);
@@ -365,10 +620,10 @@ var browserRules = [{
365
620
  name: "opera-presto",
366
621
  regExp: /\bOpera\/([\d.]+)/
367
622
  }];
368
- function _createClass$7(e, r, t) {
623
+ function _createClass$6(e, r, t) {
369
624
  return Object.defineProperty(e, "prototype", { writable: false }), e;
370
625
  }
371
- function _classCallCheck$7(a, n) {
626
+ function _classCallCheck$6(a, n) {
372
627
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
373
628
  }
374
629
  var propMap$1 = {
@@ -379,8 +634,8 @@ var propMap$1 = {
379
634
  firefox: "isFirefox",
380
635
  "opera-presto": "isPrestoOpera"
381
636
  };
382
- var BrowserInfo = /* @__PURE__ */ _createClass$7(function BrowserInfo2(e) {
383
- _classCallCheck$7(this, BrowserInfo2);
637
+ var BrowserInfo = /* @__PURE__ */ _createClass$6(function BrowserInfo2(e) {
638
+ _classCallCheck$6(this, BrowserInfo2);
384
639
  this.isChrome = false, this.isSafari = false, this.isEdge = false, this.isIE = false, this.isFirefox = false, this.isPrestoOpera = false;
385
640
  var s = execRules(e, browserRules);
386
641
  s ? (this[propMap$1[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), Object.freeze(this);
@@ -441,10 +696,10 @@ var clientRules = [{
441
696
  regExp: /\bbaiduboxpad\b/i
442
697
  }];
443
698
  clientRules = clientRules.concat(browserRules);
444
- function _createClass$6(e, r, t) {
699
+ function _createClass$5(e, r, t) {
445
700
  return Object.defineProperty(e, "prototype", { writable: false }), e;
446
701
  }
447
- function _classCallCheck$6(a, n) {
702
+ function _classCallCheck$5(a, n) {
448
703
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
449
704
  }
450
705
  var propMap = {
@@ -468,196 +723,69 @@ var propMap = {
468
723
  ie: "isIE",
469
724
  firefox: "isFirefox"
470
725
  };
471
- var ClientInfo = /* @__PURE__ */ _createClass$6(function ClientInfo2(i) {
472
- _classCallCheck$6(this, ClientInfo2);
726
+ var ClientInfo = /* @__PURE__ */ _createClass$5(function ClientInfo2(i) {
727
+ _classCallCheck$5(this, ClientInfo2);
473
728
  this.isWxWork = false, this.isWx = false, this.isWxMiniProgram = false, this.isDing = false, this.isQQ = false, this.isWeibo = false, this.isEdge = false, this.isOpera = false, this.isQQBrowser = false, this.isUCBrowser = false, this.isQuark = false, this.isMaxthon = false, this.isTheWorld = false, this.isBaiduBrowser = false, this.isBaiduApp = false, this.isChrome = false, this.isSafari = false, this.isIE = false, this.isFirefox = false;
474
729
  var s = execRules(i, clientRules);
475
730
  s ? (this[propMap[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), this.isWxMiniProgram = (this.isWx || this.isWxWork) && /\bMiniProgramEnv\b/.test(i), Object.freeze(this);
476
731
  });
477
- function _createClass$5(e, r, t) {
732
+ function _createClass$4(e, r, t) {
478
733
  return Object.defineProperty(e, "prototype", { writable: false }), e;
479
734
  }
480
- function _classCallCheck$5(a, n) {
735
+ function _classCallCheck$4(a, n) {
481
736
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
482
737
  }
483
- var UAInfo = /* @__PURE__ */ _createClass$5(function UAInfo2(t, i) {
484
- _classCallCheck$5(this, UAInfo2);
738
+ var UAInfo = /* @__PURE__ */ _createClass$4(function UAInfo2(t, i) {
739
+ _classCallCheck$4(this, UAInfo2);
485
740
  this.os = Object.freeze(new OSInfo(t, i)), this.brand = Object.freeze(new BrandInfo(t, this.os)), this.browser = Object.freeze(new BrowserInfo(t)), this.client = Object.freeze(new ClientInfo(t)), this.isTablet = this.brand.isIPad || /\bTablet\b/i.test(t) || this.os.isAndroid && !/\bMobile\b/i.test(t), this.os.isIOS || this.os.isAndroid || this.isTablet ? this.isPortable = true : /\(X11[;)]/i.test(t) || /\b(Windows\sNT|Macintosh)\b/.test(t) ? this.isPortable = false : this.isPortable = /mobile|android/i.test(t), Object.freeze(this);
486
741
  });
487
742
  var currentUAInfo;
488
743
  function getCurrentUAInfo() {
489
744
  return currentUAInfo || (currentUAInfo = Object.freeze("undefined" != typeof window ? new UAInfo(window.navigator.userAgent, window.navigator) : new UAInfo(""))), currentUAInfo;
490
745
  }
491
- var hasOwnProperty = Object.prototype.hasOwnProperty;
492
- function hasOwnProp(r, n) {
493
- return hasOwnProperty.call(r, n);
494
- }
495
- function assignProps(r) {
496
- if (null == r) throw new TypeError("Cannot convert undefined or null to object");
497
- for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
498
- var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
499
- if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
500
- }
501
- return r;
502
- }
503
- function _typeof$7(o) {
504
- "@babel/helpers - typeof";
505
- return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
506
- return typeof o2;
507
- } : function(o2) {
508
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
509
- }, _typeof$7(o);
510
- }
511
- function addToResult(n, o, e, t) {
512
- if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
513
- if ("function" == typeof t.encode) {
514
- o = t.encode(o);
515
- e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$7(e)) ? t.encode(String(e)) : "";
516
- }
517
- n.push(o + "=" + e);
518
- }
519
- }
520
- function handleMultiValues(n, o, e, t) {
521
- e.forEach(function(e2) {
522
- addToResult(n, o, e2, t);
523
- });
524
- }
525
- function stringify(n, o) {
526
- var e = assignProps({
527
- encode: encodeURIComponent
528
- }, o), t = [];
529
- var i, r;
530
- for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
531
- return t.join("&");
532
- }
533
- function splitURL(e) {
534
- var t = {
535
- leftContext: ""
536
- };
537
- var n = e.indexOf("#");
538
- return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
539
- }
540
- function joinURL(e) {
541
- var t = e.leftContext;
542
- return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
543
- }
544
- function concat(i, r, t) {
545
- if (i = String(i), null == r) return i;
546
- if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
547
- var n = splitURL(i);
548
- var e = n.search || "";
549
- return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
550
- }
551
746
  (function(i, n, o, t) {
552
747
  return new (o || (o = Promise))(function(e, a) {
553
748
  function r(i2) {
554
749
  try {
555
- k(t.next(i2));
750
+ d(t.next(i2));
556
751
  } catch (i3) {
557
752
  a(i3);
558
753
  }
559
754
  }
560
755
  function l(i2) {
561
756
  try {
562
- k(t["throw"](i2));
757
+ d(t["throw"](i2));
563
758
  } catch (i3) {
564
759
  a(i3);
565
760
  }
566
761
  }
567
- function k(i2) {
762
+ function d(i2) {
568
763
  var n2;
569
764
  i2.done ? e(i2.value) : (n2 = i2.value, n2 instanceof o ? n2 : new o(function(i3) {
570
765
  i3(n2);
571
766
  })).then(r, l);
572
767
  }
573
- k((t = t.apply(i, n || [])).next());
768
+ d((t = t.apply(i, n || [])).next());
574
769
  });
575
770
  });
576
771
  var uaInfo = getCurrentUAInfo();
577
772
  uaInfo.os.isAndroid;
578
773
  uaInfo.os.isIOS;
579
774
  var LinkType;
580
- !function(i) {
775
+ !(function(i) {
581
776
  i[i.Normal = 10] = "Normal", i[i.MultiPlatform = 11] = "MultiPlatform", i[i.Native = 12] = "Native";
582
- }(LinkType || (LinkType = {}));
777
+ })(LinkType || (LinkType = {}));
583
778
  var LinkJumpWay;
584
- !function(i) {
779
+ !(function(i) {
585
780
  i.PopUp = "POP_UP", i.NewWindow = "NEW_WINDOW", i.CurrentWindow = "CURRENT_WINDOW";
586
- }(LinkJumpWay || (LinkJumpWay = {}));
587
- var ProductType = /* @__PURE__ */ function(ProductType2) {
588
- ProductType2["Normal"] = "normal";
589
- ProductType2["Finance"] = "finance";
590
- ProductType2["Position"] = "position";
591
- return ProductType2;
592
- }({});
593
- var ProductLinkType = /* @__PURE__ */ function(ProductLinkType2) {
594
- ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
595
- ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
596
- ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
597
- return ProductLinkType2;
598
- }({});
599
- var ProductLinkJumpWay = /* @__PURE__ */ function(ProductLinkJumpWay2) {
600
- ProductLinkJumpWay2["PopUp"] = "POP_UP";
601
- ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
602
- ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
603
- return ProductLinkJumpWay2;
604
- }({});
605
- var ProductStatus = /* @__PURE__ */ function(ProductStatus2) {
606
- ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
607
- ProductStatus2[ProductStatus2["OffSale"] = 0] = "OffSale";
608
- return ProductStatus2;
609
- }({});
610
- var ProductMediaType = /* @__PURE__ */ function(ProductMediaType2) {
611
- ProductMediaType2["Image"] = "image";
612
- ProductMediaType2["MaterialVideo"] = "material-video";
613
- return ProductMediaType2;
614
- }({});
615
- var ProductExplainStatus = /* @__PURE__ */ function(ProductExplainStatus2) {
616
- ProductExplainStatus2["NotExplained"] = "notExplained";
617
- ProductExplainStatus2["Explaining"] = "explaining";
618
- ProductExplainStatus2["Explained"] = "explained";
619
- return ProductExplainStatus2;
620
- }({});
621
- var ProductExplainType = /* @__PURE__ */ function(ProductExplainType2) {
622
- ProductExplainType2["Live"] = "live";
623
- ProductExplainType2["Playback"] = "recordFile";
624
- return ProductExplainType2;
625
- }({});
626
- var ProductBuyType = /* @__PURE__ */ function(ProductBuyType2) {
627
- ProductBuyType2["DirectBuy"] = "inner";
628
- ProductBuyType2["Link"] = "link";
629
- return ProductBuyType2;
630
- }({});
631
- var ProductPriceType = /* @__PURE__ */ function(ProductPriceType2) {
632
- ProductPriceType2["Amount"] = "AMOUNT";
633
- ProductPriceType2["Custom"] = "CUSTOM";
634
- return ProductPriceType2;
635
- }({});
636
- var ProductDeliveryType = /* @__PURE__ */ function(ProductDeliveryType2) {
637
- ProductDeliveryType2["Express"] = "express";
638
- ProductDeliveryType2["Virtual"] = "virtual";
639
- return ProductDeliveryType2;
640
- }({});
641
- var ProductServiceType = /* @__PURE__ */ function(ProductServiceType2) {
642
- ProductServiceType2["WxWorkCode"] = "wxWorkCode";
643
- ProductServiceType2["Custom"] = "custom";
644
- return ProductServiceType2;
645
- }({});
646
- var AuthType = /* @__PURE__ */ function(AuthType2) {
647
- AuthType2["None"] = "none";
648
- AuthType2["Custom"] = "custom";
649
- AuthType2["External"] = "external";
650
- AuthType2["Direct"] = "direct";
651
- AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
652
- return AuthType2;
653
- }({});
654
- function _typeof$6(o) {
781
+ })(LinkJumpWay || (LinkJumpWay = {}));
782
+ function _typeof$5(o) {
655
783
  "@babel/helpers - typeof";
656
- return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
784
+ return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
657
785
  return typeof o2;
658
786
  } : function(o2) {
659
787
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
660
- }, _typeof$6(o);
788
+ }, _typeof$5(o);
661
789
  }
662
790
  function ownKeys$4(e, r) {
663
791
  var t = Object.keys(e);
@@ -681,18 +809,18 @@ function _objectSpread$4(e) {
681
809
  return e;
682
810
  }
683
811
  function _defineProperty$5(e, r, t) {
684
- return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
812
+ return (r = _toPropertyKey$5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
685
813
  }
686
- function _toPropertyKey$6(t) {
687
- var i = _toPrimitive$6(t, "string");
688
- return "symbol" == _typeof$6(i) ? i : i + "";
814
+ function _toPropertyKey$5(t) {
815
+ var i = _toPrimitive$5(t, "string");
816
+ return "symbol" == _typeof$5(i) ? i : i + "";
689
817
  }
690
- function _toPrimitive$6(t, r) {
691
- if ("object" != _typeof$6(t) || !t) return t;
818
+ function _toPrimitive$5(t, r) {
819
+ if ("object" != _typeof$5(t) || !t) return t;
692
820
  var e = t[Symbol.toPrimitive];
693
821
  if (void 0 !== e) {
694
822
  var i = e.call(t, r);
695
- if ("object" != _typeof$6(i)) return i;
823
+ if ("object" != _typeof$5(i)) return i;
696
824
  throw new TypeError("@@toPrimitive must return a primitive value.");
697
825
  }
698
826
  return ("string" === r ? String : Number)(t);
@@ -713,6 +841,7 @@ function parseFeature(features) {
713
841
  return list;
714
842
  }
715
843
  function filterInternalData(internalData) {
844
+ var _internalData$showId;
716
845
  var basicData = {
717
846
  productId: internalData.productId,
718
847
  cover: internalData.cover,
@@ -723,11 +852,12 @@ function filterInternalData(internalData) {
723
852
  description: internalData.productDesc,
724
853
  detail: internalData.productDetail,
725
854
  status: internalData.status,
726
- displayNumber: internalData.showId,
855
+ displayNumber: (_internalData$showId = internalData.showId) !== null && _internalData$showId !== void 0 ? _internalData$showId : internalData.rank,
727
856
  buttonText: internalData.btnShow,
728
857
  featureTags: parseFeature(internalData.features),
729
858
  pushRule: internalData.productPushRule,
730
859
  pushLogId: internalData.logId,
860
+ rank: internalData.rank,
731
861
  originalData: internalData
732
862
  };
733
863
  var linkData = {
@@ -803,138 +933,29 @@ function filterInternalData(internalData) {
803
933
  "yield": internalData["yield"]
804
934
  });
805
935
  break;
806
- }
807
- case ProductType.Position: {
808
- basicData.description = "";
809
- basicData.detail = internalData.productDesc;
810
- var treatment = "";
811
- try {
812
- var params = JSON.parse(internalData.params);
813
- treatment = params.treatment;
814
- } catch (e) {
815
- console.error(e);
816
- }
817
- productData = _objectSpread$4(_objectSpread$4(_objectSpread$4(_objectSpread$4({}, basicData), linkData), explainData), {}, {
818
- productType: ProductType.Position,
819
- treatment
820
- });
821
- break;
822
- }
823
- }
824
- if (!productData) {
825
- throw new Error("generate data fail");
826
- }
827
- return productData;
828
- }
829
- function _typeof$5(o) {
830
- "@babel/helpers - typeof";
831
- return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
832
- return typeof o2;
833
- } : function(o2) {
834
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
835
- }, _typeof$5(o);
836
- }
837
- function _classCallCheck$4(a, n) {
838
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
839
- }
840
- function _defineProperties$4(e, r) {
841
- for (var t = 0; t < r.length; t++) {
842
- var o = r[t];
843
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$5(o.key), o);
844
- }
845
- }
846
- function _createClass$4(e, r, t) {
847
- return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
848
- }
849
- function _toPropertyKey$5(t) {
850
- var i = _toPrimitive$5(t, "string");
851
- return "symbol" == _typeof$5(i) ? i : i + "";
852
- }
853
- function _toPrimitive$5(t, r) {
854
- if ("object" != _typeof$5(t) || !t) return t;
855
- var e = t[Symbol.toPrimitive];
856
- if (void 0 !== e) {
857
- var i = e.call(t, r);
858
- if ("object" != _typeof$5(i)) return i;
859
- throw new TypeError("@@toPrimitive must return a primitive value.");
860
- }
861
- return String(t);
862
- }
863
- var EventEmitter = /* @__PURE__ */ function() {
864
- function EventEmitter2() {
865
- _classCallCheck$4(this, EventEmitter2);
866
- this.__eventStore = {};
867
- }
868
- return _createClass$4(EventEmitter2, [{
869
- key: "__addOnEvent",
870
- value: function __addOnEvent(t, e, n, o) {
871
- if (!e || !n) return;
872
- var r = this.__eventStore[e];
873
- r || (r = []), r.push({
874
- type: t,
875
- handler: n,
876
- callbackHandler: n.bind(o)
877
- }), this.__eventStore[e] = r;
878
- }
879
- }, {
880
- key: "on",
881
- value: function on(t, e) {
882
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
883
- this.__addOnEvent("normal", t, e, n);
884
- }
885
- }, {
886
- key: "once",
887
- value: function once(t, e) {
888
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
889
- this.__addOnEvent("once", t, e, n);
890
- }
891
- }, {
892
- key: "off",
893
- value: function off(t, e) {
894
- var n = this.__eventStore[t];
895
- n && (n = n.filter(function(t2) {
896
- return t2.handler !== e;
897
- }), this.__eventStore[t] = n);
898
- }
899
- }, {
900
- key: "emit",
901
- value: function emit(t, e) {
902
- var _this = this;
903
- var n = this.__eventStore[t];
904
- n && n.forEach(function(n2) {
905
- var o = n2.type, r = n2.handler, _ = n2.callbackHandler;
906
- "function" == typeof _ && _(e), "once" === o && _this.off(t, r);
907
- });
908
- }
909
- }, {
910
- key: "destroy",
911
- value: function destroy() {
912
- this.__eventStore = {};
913
- }
914
- }]);
915
- }();
916
- var ProductPushRule = /* @__PURE__ */ function(ProductPushRule2) {
917
- ProductPushRule2["BigCard"] = "bigCard";
918
- ProductPushRule2["SmallCard"] = "smallCard";
919
- return ProductPushRule2;
920
- }({});
921
- var ProductEvents = /* @__PURE__ */ function(ProductEvents2) {
922
- ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
923
- ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
924
- ProductEvents2["AddProduct"] = "AddProduct";
925
- ProductEvents2["DeleteProduct"] = "DeleteProduct";
926
- ProductEvents2["ChangeProduct"] = "ChangeProduct";
927
- ProductEvents2["MoveProduct"] = "MoveProduct";
928
- ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
929
- ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
930
- ProductEvents2["PushProduct"] = "PushProduct";
931
- ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
932
- ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
933
- ProductEvents2["RefreshProductList"] = "RefreshProductList";
934
- ProductEvents2["ProductClick"] = "ProductClick";
935
- ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
936
- return ProductEvents2;
937
- }({});
936
+ }
937
+ case ProductType.Position: {
938
+ basicData.description = "";
939
+ basicData.detail = internalData.productDesc;
940
+ var treatment = "";
941
+ try {
942
+ var params = JSON.parse(internalData.params);
943
+ treatment = params.treatment;
944
+ } catch (e) {
945
+ console.error(e);
946
+ }
947
+ productData = _objectSpread$4(_objectSpread$4(_objectSpread$4(_objectSpread$4({}, basicData), linkData), explainData), {}, {
948
+ productType: ProductType.Position,
949
+ treatment
950
+ });
951
+ break;
952
+ }
953
+ }
954
+ if (!productData) {
955
+ throw new Error("generate data fail");
956
+ }
957
+ return productData;
958
+ }
938
959
  function _typeof$4(o) {
939
960
  "@babel/helpers - typeof";
940
961
  return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -969,7 +990,7 @@ function _regenerator$3() {
969
990
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
970
991
  function i(r2, n2, o2, i2) {
971
992
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
972
- return _regeneratorDefine2$3(u2, "_invoke", function(r3, n3, o3) {
993
+ return _regeneratorDefine2$3(u2, "_invoke", (function(r3, n3, o3) {
973
994
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
974
995
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
975
996
  } };
@@ -1002,7 +1023,7 @@ function _regenerator$3() {
1002
1023
  }
1003
1024
  return { value: t, done: y };
1004
1025
  };
1005
- }(r2, o2, i2), true), u2;
1026
+ })(r2, o2, i2), true), u2;
1006
1027
  }
1007
1028
  var a = {};
1008
1029
  function Generator() {
@@ -1034,15 +1055,12 @@ function _regeneratorDefine2$3(e, r, n, t) {
1034
1055
  i = 0;
1035
1056
  }
1036
1057
  _regeneratorDefine2$3 = function _regeneratorDefine(e2, r2, n2, t2) {
1037
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
1038
- else {
1039
- var o = function o2(r3, n3) {
1040
- _regeneratorDefine2$3(e2, r3, function(e3) {
1041
- return this._invoke(r3, n3, e3);
1042
- });
1043
- };
1044
- o("next", 0), o("throw", 1), o("return", 2);
1058
+ function o(r3, n3) {
1059
+ _regeneratorDefine2$3(e2, r3, function(e3) {
1060
+ return this._invoke(r3, n3, e3);
1061
+ });
1045
1062
  }
1063
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
1046
1064
  }, _regeneratorDefine2$3(e, r, n, t);
1047
1065
  }
1048
1066
  function asyncGeneratorStep$3(n, t, e, r, o, a, c) {
@@ -1098,8 +1116,8 @@ function _toPrimitive$4(t, r) {
1098
1116
  return String(t);
1099
1117
  }
1100
1118
  var appName = "product";
1101
- var Product = /* @__PURE__ */ function() {
1102
- function Product2(iarCore, config) {
1119
+ var Product = /* @__PURE__ */ (function() {
1120
+ function Product2(interactionCore, config) {
1103
1121
  var _this = this;
1104
1122
  _classCallCheck$3(this, Product2);
1105
1123
  _defineProperty$4(this, "ProductType", ProductType);
@@ -1230,12 +1248,12 @@ var Product = /* @__PURE__ */ function() {
1230
1248
  times: socketData.times
1231
1249
  });
1232
1250
  });
1233
- this.iarCore = iarCore;
1251
+ this.interactionCore = interactionCore;
1234
1252
  this.config = config;
1235
- iarCore.addSocketHandles(appName, {
1253
+ interactionCore.addSocketHandles(appName, {
1236
1254
  PRODUCT_MESSAGE: this.__handleProductMessage
1237
1255
  });
1238
- iarCore.addSocketHandles(appName, {
1256
+ interactionCore.addSocketHandles(appName, {
1239
1257
  REFRESH_PRODUCT_LIST: this.__handleRefreshProductList,
1240
1258
  PRODUCT_CLICK: this.__handleProductClickEvent,
1241
1259
  PRODUCT_CLICK_TIMES: this.__handleProductClickTimes
@@ -1258,7 +1276,7 @@ var Product = /* @__PURE__ */ function() {
1258
1276
  */
1259
1277
  }, {
1260
1278
  key: "getProductTagList",
1261
- value: function() {
1279
+ value: (function() {
1262
1280
  var _getProductTagList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee() {
1263
1281
  var _params$pageNumber, _params$pageSize;
1264
1282
  var params, pageNumber, pageSize, _args = arguments;
@@ -1268,7 +1286,7 @@ var Product = /* @__PURE__ */ function() {
1268
1286
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
1269
1287
  pageNumber = (_params$pageNumber = params.pageNumber) !== null && _params$pageNumber !== void 0 ? _params$pageNumber : 1;
1270
1288
  pageSize = (_params$pageSize = params.pageSize) !== null && _params$pageSize !== void 0 ? _params$pageSize : 10;
1271
- return _context.a(2, this.iarCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1289
+ return _context.a(2, this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1272
1290
  pageNumber,
1273
1291
  pageSize
1274
1292
  }));
@@ -1279,10 +1297,10 @@ var Product = /* @__PURE__ */ function() {
1279
1297
  return _getProductTagList.apply(this, arguments);
1280
1298
  }
1281
1299
  return getProductTagList;
1282
- }()
1300
+ })()
1283
1301
  }, {
1284
1302
  key: "getProductList",
1285
- value: function() {
1303
+ value: (function() {
1286
1304
  var _getProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee2() {
1287
1305
  var params, _params$count, count, productList, toppingProduct, total, _params$page, page, data, _data, _args2 = arguments;
1288
1306
  return _regenerator$3().w(function(_context2) {
@@ -1298,7 +1316,7 @@ var Product = /* @__PURE__ */ function() {
1298
1316
  }
1299
1317
  _params$page = params.page, page = _params$page === void 0 ? 1 : _params$page;
1300
1318
  _context2.n = 1;
1301
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1319
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1302
1320
  keyword: params.keyword,
1303
1321
  tagId: params.tagId,
1304
1322
  pageNumber: page,
@@ -1312,7 +1330,7 @@ var Product = /* @__PURE__ */ function() {
1312
1330
  break;
1313
1331
  case 2:
1314
1332
  _context2.n = 3;
1315
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1333
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1316
1334
  count,
1317
1335
  showId: params.displayNumber
1318
1336
  }, {
@@ -1338,71 +1356,109 @@ var Product = /* @__PURE__ */ function() {
1338
1356
  return _getProductList.apply(this, arguments);
1339
1357
  }
1340
1358
  return getProductList;
1341
- }()
1359
+ })()
1342
1360
  }, {
1343
- key: "getProductData",
1344
- value: function() {
1345
- var _getProductData = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee3(productId) {
1346
- var _productData$detail;
1347
- var data, productData, res;
1361
+ key: "getLaunchProductList",
1362
+ value: (function() {
1363
+ var _getLaunchProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee3(params) {
1364
+ var _params$pageNumber2, pageNumber, _params$pageSize2, pageSize, status, keyword, data;
1348
1365
  return _regenerator$3().w(function(_context3) {
1349
1366
  while (1) switch (_context3.n) {
1350
1367
  case 0:
1368
+ _params$pageNumber2 = params.pageNumber, pageNumber = _params$pageNumber2 === void 0 ? 1 : _params$pageNumber2, _params$pageSize2 = params.pageSize, pageSize = _params$pageSize2 === void 0 ? 10 : _params$pageSize2, status = params.status, keyword = params.keyword;
1351
1369
  _context3.n = 1;
1352
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1370
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByLaunch, {
1371
+ pageNumber,
1372
+ pageSize,
1373
+ status,
1374
+ keyword
1375
+ });
1376
+ case 1:
1377
+ data = _context3.v;
1378
+ return _context3.a(2, {
1379
+ pageNumber: data.pageNumber,
1380
+ pageSize: data.pageSize,
1381
+ totalItems: data.totalItems,
1382
+ totalPages: data.totalPages,
1383
+ contents: data.contents.map(function(data2) {
1384
+ return filterInternalData(data2);
1385
+ }),
1386
+ upCount: data.ext.upCount,
1387
+ downCount: data.ext.downCount
1388
+ });
1389
+ }
1390
+ }, _callee3, this);
1391
+ }));
1392
+ function getLaunchProductList(_x) {
1393
+ return _getLaunchProductList.apply(this, arguments);
1394
+ }
1395
+ return getLaunchProductList;
1396
+ })()
1397
+ }, {
1398
+ key: "getProductData",
1399
+ value: (function() {
1400
+ var _getProductData = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee4(productId) {
1401
+ var _productData$detail;
1402
+ var data, productData, res;
1403
+ return _regenerator$3().w(function(_context4) {
1404
+ while (1) switch (_context4.n) {
1405
+ case 0:
1406
+ _context4.n = 1;
1407
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1353
1408
  productId
1354
1409
  }, {
1355
1410
  useAESDecrypt: true
1356
1411
  });
1357
1412
  case 1:
1358
- data = _context3.v;
1413
+ data = _context4.v;
1359
1414
  productData = filterInternalData(data);
1360
1415
  if (!((_productData$detail = productData.detail) !== null && _productData$detail !== void 0 && _productData$detail.endsWith(".json"))) {
1361
- _context3.n = 3;
1416
+ _context4.n = 3;
1362
1417
  break;
1363
1418
  }
1364
- _context3.n = 2;
1365
- return this.iarCore.otherApi.get(productData.detail, {});
1419
+ _context4.n = 2;
1420
+ return this.interactionCore.otherApi.get(productData.detail, {});
1366
1421
  case 2:
1367
- res = _context3.v;
1422
+ res = _context4.v;
1368
1423
  productData.detail = res.productDetail;
1369
1424
  case 3:
1370
- return _context3.a(2, productData);
1425
+ return _context4.a(2, productData);
1371
1426
  }
1372
- }, _callee3, this);
1427
+ }, _callee4, this);
1373
1428
  }));
1374
- function getProductData(_x) {
1429
+ function getProductData(_x2) {
1375
1430
  return _getProductData.apply(this, arguments);
1376
1431
  }
1377
1432
  return getProductData;
1378
- }()
1433
+ })()
1379
1434
  }, {
1380
1435
  key: "sendProductClickEvent",
1381
- value: function() {
1382
- var _sendProductClickEvent = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee4(params) {
1436
+ value: (function() {
1437
+ var _sendProductClickEvent = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee5(params) {
1438
+ var _this$config, _this$config$getProdu;
1383
1439
  var userInfo, channelInfo, productConfig;
1384
- return _regenerator$3().w(function(_context4) {
1385
- while (1) switch (_context4.n) {
1440
+ return _regenerator$3().w(function(_context5) {
1441
+ while (1) switch (_context5.n) {
1386
1442
  case 0:
1387
- _context4.n = 1;
1388
- return this.iarCore.getUserInfo();
1443
+ _context5.n = 1;
1444
+ return this.interactionCore.getUserInfo();
1389
1445
  case 1:
1390
- userInfo = _context4.v;
1391
- _context4.n = 2;
1392
- return this.iarCore.getChannelInfo();
1446
+ userInfo = _context5.v;
1447
+ _context5.n = 2;
1448
+ return this.interactionCore.getChannelInfo();
1393
1449
  case 2:
1394
- channelInfo = _context4.v;
1395
- _context4.n = 3;
1396
- return this.config.getProductConfig();
1450
+ channelInfo = _context5.v;
1451
+ _context5.n = 3;
1452
+ return (_this$config = this.config) === null || _this$config === void 0 || (_this$config$getProdu = _this$config.getProductConfig) === null || _this$config$getProdu === void 0 ? void 0 : _this$config$getProdu.call(_this$config);
1397
1453
  case 3:
1398
- productConfig = _context4.v;
1399
- if (!(!productConfig.productHotEffectEnabled && !productConfig.productLinkJumpTipEnabled)) {
1400
- _context4.n = 4;
1454
+ productConfig = _context5.v;
1455
+ if (!(!(productConfig !== null && productConfig !== void 0 && productConfig.productHotEffectEnabled) && !(productConfig !== null && productConfig !== void 0 && productConfig.productLinkJumpTipEnabled))) {
1456
+ _context5.n = 4;
1401
1457
  break;
1402
1458
  }
1403
- return _context4.a(2);
1459
+ return _context5.a(2);
1404
1460
  case 4:
1405
- this.iarCore.emitSocket({
1461
+ this.interactionCore.emitSocket({
1406
1462
  EVENT: "PRODUCT_CLICK",
1407
1463
  data: {
1408
1464
  productId: params.productId,
@@ -1413,15 +1469,15 @@ var Product = /* @__PURE__ */ function() {
1413
1469
  roomId: channelInfo.channelId
1414
1470
  }, "product");
1415
1471
  case 5:
1416
- return _context4.a(2);
1472
+ return _context5.a(2);
1417
1473
  }
1418
- }, _callee4, this);
1474
+ }, _callee5, this);
1419
1475
  }));
1420
- function sendProductClickEvent(_x2) {
1476
+ function sendProductClickEvent(_x3) {
1421
1477
  return _sendProductClickEvent.apply(this, arguments);
1422
1478
  }
1423
1479
  return sendProductClickEvent;
1424
- }()
1480
+ })()
1425
1481
  }, {
1426
1482
  key: "closeProductPush",
1427
1483
  value: function closeProductPush() {
@@ -1439,131 +1495,132 @@ var Product = /* @__PURE__ */ function() {
1439
1495
  */
1440
1496
  }, {
1441
1497
  key: "getProductExplainEnabled",
1442
- value: function() {
1443
- var _getProductExplainEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee5() {
1444
- var _productConfig$produc;
1498
+ value: (function() {
1499
+ var _getProductExplainEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee6() {
1500
+ var _this$config2, _this$config2$getProd, _productConfig$produc;
1445
1501
  var productConfig;
1446
- return _regenerator$3().w(function(_context5) {
1447
- while (1) switch (_context5.n) {
1502
+ return _regenerator$3().w(function(_context6) {
1503
+ while (1) switch (_context6.n) {
1448
1504
  case 0:
1449
- _context5.n = 1;
1450
- return this.config.getProductConfig();
1505
+ _context6.n = 1;
1506
+ return (_this$config2 = this.config) === null || _this$config2 === void 0 || (_this$config2$getProd = _this$config2.getProductConfig) === null || _this$config2$getProd === void 0 ? void 0 : _this$config2$getProd.call(_this$config2);
1451
1507
  case 1:
1452
- productConfig = _context5.v;
1453
- return _context5.a(2, (_productConfig$produc = productConfig === null || productConfig === void 0 ? void 0 : productConfig.productExplainEnabled) !== null && _productConfig$produc !== void 0 ? _productConfig$produc : false);
1508
+ productConfig = _context6.v;
1509
+ return _context6.a(2, (_productConfig$produc = productConfig === null || productConfig === void 0 ? void 0 : productConfig.productExplainEnabled) !== null && _productConfig$produc !== void 0 ? _productConfig$produc : false);
1454
1510
  }
1455
- }, _callee5, this);
1511
+ }, _callee6, this);
1456
1512
  }));
1457
1513
  function getProductExplainEnabled() {
1458
1514
  return _getProductExplainEnabled.apply(this, arguments);
1459
1515
  }
1460
1516
  return getProductExplainEnabled;
1461
- }()
1517
+ })()
1462
1518
  }, {
1463
1519
  key: "generateProductExplainPageUrl",
1464
- value: function() {
1465
- var _generateProductExplainPageUrl = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee6(params) {
1520
+ value: (function() {
1521
+ var _generateProductExplainPageUrl = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee7(params) {
1466
1522
  var domainInfo, channelInfo, queryParams;
1467
- return _regenerator$3().w(function(_context6) {
1468
- while (1) switch (_context6.n) {
1523
+ return _regenerator$3().w(function(_context7) {
1524
+ while (1) switch (_context7.n) {
1469
1525
  case 0:
1470
- domainInfo = this.iarCore.getDomainInfo();
1471
- _context6.n = 1;
1472
- return this.iarCore.getChannelInfo();
1526
+ domainInfo = this.interactionCore.getDomainInfo();
1527
+ _context7.n = 1;
1528
+ return this.interactionCore.getChannelInfo();
1473
1529
  case 1:
1474
- channelInfo = _context6.v;
1530
+ channelInfo = _context7.v;
1475
1531
  queryParams = _objectSpread$3({
1476
1532
  channelId: channelInfo.channelId
1477
1533
  }, params || {});
1478
- return _context6.a(2, concat("".concat(domainInfo.watchPageDomain, "/landing/product/explain"), queryParams));
1534
+ return _context7.a(2, concat("".concat(domainInfo.watchPageDomain, "/landing/product/explain"), queryParams));
1479
1535
  }
1480
- }, _callee6, this);
1536
+ }, _callee7, this);
1481
1537
  }));
1482
- function generateProductExplainPageUrl(_x3) {
1538
+ function generateProductExplainPageUrl(_x4) {
1483
1539
  return _generateProductExplainPageUrl.apply(this, arguments);
1484
1540
  }
1485
1541
  return generateProductExplainPageUrl;
1486
- }()
1542
+ })()
1487
1543
  }, {
1488
1544
  key: "getOutLinkProductRedirectEnabled",
1489
- value: function() {
1490
- var _getOutLinkProductRedirectEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee7() {
1491
- var _productConfig$outLin;
1545
+ value: (function() {
1546
+ var _getOutLinkProductRedirectEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee8() {
1547
+ var _this$config3, _this$config3$getProd, _productConfig$outLin;
1492
1548
  var productConfig;
1493
- return _regenerator$3().w(function(_context7) {
1494
- while (1) switch (_context7.n) {
1549
+ return _regenerator$3().w(function(_context8) {
1550
+ while (1) switch (_context8.n) {
1495
1551
  case 0:
1496
- _context7.n = 1;
1497
- return this.config.getProductConfig();
1552
+ _context8.n = 1;
1553
+ return (_this$config3 = this.config) === null || _this$config3 === void 0 || (_this$config3$getProd = _this$config3.getProductConfig) === null || _this$config3$getProd === void 0 ? void 0 : _this$config3$getProd.call(_this$config3);
1498
1554
  case 1:
1499
- productConfig = _context7.v;
1500
- return _context7.a(2, (_productConfig$outLin = productConfig === null || productConfig === void 0 ? void 0 : productConfig.outLinkProductRedirectEnabled) !== null && _productConfig$outLin !== void 0 ? _productConfig$outLin : false);
1555
+ productConfig = _context8.v;
1556
+ return _context8.a(2, (_productConfig$outLin = productConfig === null || productConfig === void 0 ? void 0 : productConfig.outLinkProductRedirectEnabled) !== null && _productConfig$outLin !== void 0 ? _productConfig$outLin : false);
1501
1557
  }
1502
- }, _callee7, this);
1558
+ }, _callee8, this);
1503
1559
  }));
1504
1560
  function getOutLinkProductRedirectEnabled() {
1505
1561
  return _getOutLinkProductRedirectEnabled.apply(this, arguments);
1506
1562
  }
1507
1563
  return getOutLinkProductRedirectEnabled;
1508
- }()
1564
+ })()
1509
1565
  }, {
1510
1566
  key: "getProductPayOrderEnabled",
1511
- value: function() {
1512
- var _getProductPayOrderEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee8() {
1567
+ value: (function() {
1568
+ var _getProductPayOrderEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee9() {
1569
+ var _this$config4, _this$config4$getProd, _productConfig$produc2;
1513
1570
  var productConfig;
1514
- return _regenerator$3().w(function(_context8) {
1515
- while (1) switch (_context8.n) {
1571
+ return _regenerator$3().w(function(_context9) {
1572
+ while (1) switch (_context9.n) {
1516
1573
  case 0:
1517
- _context8.n = 1;
1518
- return this.config.getProductConfig();
1574
+ _context9.n = 1;
1575
+ return (_this$config4 = this.config) === null || _this$config4 === void 0 || (_this$config4$getProd = _this$config4.getProductConfig) === null || _this$config4$getProd === void 0 ? void 0 : _this$config4$getProd.call(_this$config4);
1519
1576
  case 1:
1520
- productConfig = _context8.v;
1577
+ productConfig = _context9.v;
1521
1578
  if (productConfig) {
1522
- _context8.n = 2;
1579
+ _context9.n = 2;
1523
1580
  break;
1524
1581
  }
1525
- return _context8.a(2, false);
1582
+ return _context9.a(2, false);
1526
1583
  case 2:
1527
- return _context8.a(2, productConfig.productPayOrderEnabled);
1584
+ return _context9.a(2, (_productConfig$produc2 = productConfig.productPayOrderEnabled) !== null && _productConfig$produc2 !== void 0 ? _productConfig$produc2 : false);
1528
1585
  }
1529
- }, _callee8, this);
1586
+ }, _callee9, this);
1530
1587
  }));
1531
1588
  function getProductPayOrderEnabled() {
1532
1589
  return _getProductPayOrderEnabled.apply(this, arguments);
1533
1590
  }
1534
1591
  return getProductPayOrderEnabled;
1535
- }()
1592
+ })()
1536
1593
  }, {
1537
1594
  key: "getProductHotSaleConfig",
1538
- value: function() {
1539
- var _getProductHotSaleConfig = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee9() {
1540
- var _productConfig$produc2;
1595
+ value: (function() {
1596
+ var _getProductHotSaleConfig = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee0() {
1597
+ var _this$config5, _this$config5$getProd, _productConfig$produc3;
1541
1598
  var productConfig;
1542
- return _regenerator$3().w(function(_context9) {
1543
- while (1) switch (_context9.n) {
1599
+ return _regenerator$3().w(function(_context0) {
1600
+ while (1) switch (_context0.n) {
1544
1601
  case 0:
1545
- _context9.n = 1;
1546
- return this.config.getProductConfig();
1602
+ _context0.n = 1;
1603
+ return (_this$config5 = this.config) === null || _this$config5 === void 0 || (_this$config5$getProd = _this$config5.getProductConfig) === null || _this$config5$getProd === void 0 ? void 0 : _this$config5$getProd.call(_this$config5);
1547
1604
  case 1:
1548
- productConfig = _context9.v;
1605
+ productConfig = _context0.v;
1549
1606
  if (productConfig) {
1550
- _context9.n = 2;
1607
+ _context0.n = 2;
1551
1608
  break;
1552
1609
  }
1553
- return _context9.a(2);
1610
+ return _context0.a(2);
1554
1611
  case 2:
1555
- return _context9.a(2, {
1556
- productHotEffectEnabled: (_productConfig$produc2 = productConfig.productHotEffectEnabled) !== null && _productConfig$produc2 !== void 0 ? _productConfig$produc2 : false,
1612
+ return _context0.a(2, {
1613
+ productHotEffectEnabled: (_productConfig$produc3 = productConfig.productHotEffectEnabled) !== null && _productConfig$produc3 !== void 0 ? _productConfig$produc3 : false,
1557
1614
  productHotEffectTips: productConfig.productHotEffectTips
1558
1615
  });
1559
1616
  }
1560
- }, _callee9, this);
1617
+ }, _callee0, this);
1561
1618
  }));
1562
1619
  function getProductHotSaleConfig() {
1563
1620
  return _getProductHotSaleConfig.apply(this, arguments);
1564
1621
  }
1565
1622
  return getProductHotSaleConfig;
1566
- }()
1623
+ })()
1567
1624
  }, {
1568
1625
  key: "getCurrentPushingProductId",
1569
1626
  value: function getCurrentPushingProductId() {
@@ -1571,6 +1628,7 @@ var Product = /* @__PURE__ */ function() {
1571
1628
  }
1572
1629
  /**
1573
1630
  * 获取当前推送中的商品数据
1631
+ * @param productId 可选,指定商品ID,如果不提供则获取当前配置中的推送商品
1574
1632
  * @example
1575
1633
  * ```js
1576
1634
  * const productData = await productTarget.getCurrentPushingProduct();
@@ -1579,102 +1637,398 @@ var Product = /* @__PURE__ */ function() {
1579
1637
  */
1580
1638
  }, {
1581
1639
  key: "getCurrentPushingProduct",
1582
- value: function() {
1583
- var _getCurrentPushingProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee0(productId) {
1640
+ value: (function() {
1641
+ var _getCurrentPushingProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee1(productId) {
1642
+ var _this$config6, _this$config6$getProd;
1584
1643
  var productConfig, pid, pushRule, _productConfig$channe, _productConfig$channe2, result;
1585
- return _regenerator$3().w(function(_context0) {
1586
- while (1) switch (_context0.n) {
1644
+ return _regenerator$3().w(function(_context1) {
1645
+ while (1) switch (_context1.n) {
1587
1646
  case 0:
1588
- _context0.n = 1;
1589
- return this.config.getProductConfig();
1647
+ _context1.n = 1;
1648
+ return (_this$config6 = this.config) === null || _this$config6 === void 0 || (_this$config6$getProd = _this$config6.getProductConfig) === null || _this$config6$getProd === void 0 ? void 0 : _this$config6$getProd.call(_this$config6);
1590
1649
  case 1:
1591
- productConfig = _context0.v;
1650
+ productConfig = _context1.v;
1592
1651
  if (this.__isPushingProduct) {
1593
1652
  pid = this.__currentPushingProductId;
1594
1653
  pushRule = this.__currentPushingProductPushRule;
1595
1654
  } else {
1596
- pid = productId !== null && productId !== void 0 ? productId : (_productConfig$channe = productConfig.channelProductPushingStatusVO) === null || _productConfig$channe === void 0 ? void 0 : _productConfig$channe.productId;
1597
- pushRule = (_productConfig$channe2 = productConfig.channelProductPushingStatusVO) === null || _productConfig$channe2 === void 0 ? void 0 : _productConfig$channe2.pushRule;
1655
+ pid = productId !== null && productId !== void 0 ? productId : productConfig === null || productConfig === void 0 || (_productConfig$channe = productConfig.channelProductPushingStatusVO) === null || _productConfig$channe === void 0 ? void 0 : _productConfig$channe.productId;
1656
+ pushRule = productConfig === null || productConfig === void 0 || (_productConfig$channe2 = productConfig.channelProductPushingStatusVO) === null || _productConfig$channe2 === void 0 ? void 0 : _productConfig$channe2.pushRule;
1598
1657
  }
1599
1658
  if (pid) {
1600
- _context0.n = 2;
1659
+ _context1.n = 2;
1601
1660
  break;
1602
1661
  }
1603
- return _context0.a(2);
1662
+ return _context1.a(2);
1604
1663
  case 2:
1605
- _context0.n = 3;
1664
+ _context1.n = 3;
1606
1665
  return this.getProductData(pid);
1607
1666
  case 3:
1608
- result = _context0.v;
1609
- return _context0.a(2, _objectSpread$3(_objectSpread$3({}, result), {}, {
1667
+ result = _context1.v;
1668
+ return _context1.a(2, _objectSpread$3(_objectSpread$3({}, result), {}, {
1610
1669
  pushRule
1611
1670
  }));
1612
1671
  }
1613
- }, _callee0, this);
1672
+ }, _callee1, this);
1614
1673
  }));
1615
- function getCurrentPushingProduct(_x4) {
1674
+ function getCurrentPushingProduct(_x5) {
1616
1675
  return _getCurrentPushingProduct.apply(this, arguments);
1617
1676
  }
1618
1677
  return getCurrentPushingProduct;
1619
- }()
1678
+ })()
1679
+ }, {
1680
+ key: "_explainProduct",
1681
+ value: (function() {
1682
+ var _explainProduct2 = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee10(productId, recordType) {
1683
+ var channelInfo, data, apiPath, _t;
1684
+ return _regenerator$3().w(function(_context10) {
1685
+ while (1) switch (_context10.n) {
1686
+ case 0:
1687
+ _context10.n = 1;
1688
+ return this.interactionCore.getChannelInfo();
1689
+ case 1:
1690
+ channelInfo = _context10.v;
1691
+ data = {
1692
+ sessionId: channelInfo.sessionId,
1693
+ productId
1694
+ };
1695
+ _t = recordType;
1696
+ _context10.n = _t === ProductExplainOperation.Start ? 2 : _t === ProductExplainOperation.Restart ? 3 : 4;
1697
+ break;
1698
+ case 2:
1699
+ apiPath = PolyvApiUrl.StartProductExplain;
1700
+ return _context10.a(3, 5);
1701
+ case 3:
1702
+ apiPath = PolyvApiUrl.RestartProductExplain;
1703
+ return _context10.a(3, 5);
1704
+ case 4:
1705
+ apiPath = PolyvApiUrl.EndProductExplain;
1706
+ data.recordType = recordType;
1707
+ return _context10.a(3, 5);
1708
+ case 5:
1709
+ return _context10.a(2, this.interactionCore.polyvApi.post(apiPath, {
1710
+ data
1711
+ }));
1712
+ }
1713
+ }, _callee10, this);
1714
+ }));
1715
+ function _explainProduct(_x6, _x7) {
1716
+ return _explainProduct2.apply(this, arguments);
1717
+ }
1718
+ return _explainProduct;
1719
+ })()
1720
+ /**
1721
+ * 开始商品讲解
1722
+ * @param productId 商品 id
1723
+ * @example
1724
+ * ```js
1725
+ * await productTarget.startExplain(123);
1726
+ * ```
1727
+ */
1728
+ }, {
1729
+ key: "startExplain",
1730
+ value: function startExplain(productId) {
1731
+ return this._explainProduct(productId, ProductExplainOperation.Start);
1732
+ }
1733
+ /**
1734
+ * 重新开始商品讲解
1735
+ * @param productId 商品 id
1736
+ * @example
1737
+ * ```js
1738
+ * await productTarget.restartExplain(123);
1739
+ * ```
1740
+ */
1741
+ }, {
1742
+ key: "restartExplain",
1743
+ value: function restartExplain(productId) {
1744
+ return this._explainProduct(productId, ProductExplainOperation.Restart);
1745
+ }
1746
+ /**
1747
+ * 结束商品讲解
1748
+ * @param productId 商品 id
1749
+ * @example
1750
+ * ```js
1751
+ * await productTarget.endExplain(123);
1752
+ * ```
1753
+ */
1754
+ }, {
1755
+ key: "endExplain",
1756
+ value: function endExplain(productId) {
1757
+ return this._explainProduct(productId, ProductExplainOperation.End);
1758
+ }
1759
+ /**
1760
+ * 删除商品讲解
1761
+ * @param productId 商品 id
1762
+ * @example
1763
+ * ```js
1764
+ * await productTarget.deleteExplain(123);
1765
+ * ```
1766
+ */
1767
+ }, {
1768
+ key: "deleteExplain",
1769
+ value: (function() {
1770
+ var _deleteExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee11(productId) {
1771
+ return _regenerator$3().w(function(_context11) {
1772
+ while (1) switch (_context11.n) {
1773
+ case 0:
1774
+ return _context11.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteProductExplain, {
1775
+ data: {
1776
+ productId
1777
+ }
1778
+ }));
1779
+ }
1780
+ }, _callee11, this);
1781
+ }));
1782
+ function deleteExplain(_x8) {
1783
+ return _deleteExplain.apply(this, arguments);
1784
+ }
1785
+ return deleteExplain;
1786
+ })()
1787
+ }, {
1788
+ key: "getCurrentProductExplain",
1789
+ value: (function() {
1790
+ var _getCurrentProductExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee12() {
1791
+ var explainingId;
1792
+ return _regenerator$3().w(function(_context12) {
1793
+ while (1) switch (_context12.n) {
1794
+ case 0:
1795
+ _context12.n = 1;
1796
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetCurrentProductExplain, {});
1797
+ case 1:
1798
+ explainingId = _context12.v;
1799
+ return _context12.a(2, explainingId);
1800
+ }
1801
+ }, _callee12, this);
1802
+ }));
1803
+ function getCurrentProductExplain() {
1804
+ return _getCurrentProductExplain.apply(this, arguments);
1805
+ }
1806
+ return getCurrentProductExplain;
1807
+ })()
1808
+ }, {
1809
+ key: "openProductPrice",
1810
+ value: (function() {
1811
+ var _openProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee13(productId) {
1812
+ return _regenerator$3().w(function(_context13) {
1813
+ while (1) switch (_context13.n) {
1814
+ case 0:
1815
+ return _context13.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.OpenProductPrice, {
1816
+ productId
1817
+ }));
1818
+ }
1819
+ }, _callee13, this);
1820
+ }));
1821
+ function openProductPrice(_x9) {
1822
+ return _openProductPrice.apply(this, arguments);
1823
+ }
1824
+ return openProductPrice;
1825
+ })()
1826
+ }, {
1827
+ key: "hideProductPrice",
1828
+ value: (function() {
1829
+ var _hideProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee14(productId) {
1830
+ return _regenerator$3().w(function(_context14) {
1831
+ while (1) switch (_context14.n) {
1832
+ case 0:
1833
+ return _context14.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.HideProductPrice, {
1834
+ productId
1835
+ }));
1836
+ }
1837
+ }, _callee14, this);
1838
+ }));
1839
+ function hideProductPrice(_x0) {
1840
+ return _hideProductPrice.apply(this, arguments);
1841
+ }
1842
+ return hideProductPrice;
1843
+ })()
1844
+ }, {
1845
+ key: "getProductSetting",
1846
+ value: (function() {
1847
+ var _getProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee15() {
1848
+ var data;
1849
+ return _regenerator$3().w(function(_context15) {
1850
+ while (1) switch (_context15.n) {
1851
+ case 0:
1852
+ _context15.n = 1;
1853
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.ProductPushRule, {});
1854
+ case 1:
1855
+ data = _context15.v;
1856
+ return _context15.a(2, {
1857
+ pushingProduct: data.channelProductPushingStatusVO,
1858
+ productPushRule: data.productPushRule,
1859
+ productExplainEnabled: ynToBool(data.productExplainEnabled, "N"),
1860
+ productExplainingAutoPushAndSticky: ynToBool(data.productExplainingAutoPushAndSticky, "N")
1861
+ });
1862
+ }
1863
+ }, _callee15, this);
1864
+ }));
1865
+ function getProductSetting() {
1866
+ return _getProductSetting.apply(this, arguments);
1867
+ }
1868
+ return getProductSetting;
1869
+ })()
1870
+ }, {
1871
+ key: "pushProduct",
1872
+ value: (function() {
1873
+ var _pushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee16(productId, rule) {
1874
+ return _regenerator$3().w(function(_context16) {
1875
+ while (1) switch (_context16.n) {
1876
+ case 0:
1877
+ return _context16.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.PushProduct, {
1878
+ productId,
1879
+ productPushRule: rule || ProductPushRule.SmallCard
1880
+ }));
1881
+ }
1882
+ }, _callee16, this);
1883
+ }));
1884
+ function pushProduct(_x1, _x10) {
1885
+ return _pushProduct.apply(this, arguments);
1886
+ }
1887
+ return pushProduct;
1888
+ })()
1889
+ }, {
1890
+ key: "cancelPushProduct",
1891
+ value: (function() {
1892
+ var _cancelPushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee17(productId) {
1893
+ return _regenerator$3().w(function(_context17) {
1894
+ while (1) switch (_context17.n) {
1895
+ case 0:
1896
+ return _context17.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.CancelPushProduct, {
1897
+ productId
1898
+ }));
1899
+ }
1900
+ }, _callee17, this);
1901
+ }));
1902
+ function cancelPushProduct(_x11) {
1903
+ return _cancelPushProduct.apply(this, arguments);
1904
+ }
1905
+ return cancelPushProduct;
1906
+ })()
1907
+ }, {
1908
+ key: "batchDeleteProduct",
1909
+ value: (function() {
1910
+ var _batchDeleteProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee18(productIds) {
1911
+ return _regenerator$3().w(function(_context18) {
1912
+ while (1) switch (_context18.n) {
1913
+ case 0:
1914
+ return _context18.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchDeleteProduct, {
1915
+ productIds
1916
+ }));
1917
+ }
1918
+ }, _callee18, this);
1919
+ }));
1920
+ function batchDeleteProduct(_x12) {
1921
+ return _batchDeleteProduct.apply(this, arguments);
1922
+ }
1923
+ return batchDeleteProduct;
1924
+ })()
1925
+ }, {
1926
+ key: "batchOnShelfProduct",
1927
+ value: (function() {
1928
+ var _batchOnShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee19(productIds) {
1929
+ return _regenerator$3().w(function(_context19) {
1930
+ while (1) switch (_context19.n) {
1931
+ case 0:
1932
+ return _context19.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1933
+ productIds,
1934
+ status: ProductStatus.OnSale
1935
+ }));
1936
+ }
1937
+ }, _callee19, this);
1938
+ }));
1939
+ function batchOnShelfProduct(_x13) {
1940
+ return _batchOnShelfProduct.apply(this, arguments);
1941
+ }
1942
+ return batchOnShelfProduct;
1943
+ })()
1944
+ }, {
1945
+ key: "batchOffShelfProduct",
1946
+ value: (function() {
1947
+ var _batchOffShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee20(productIds) {
1948
+ return _regenerator$3().w(function(_context20) {
1949
+ while (1) switch (_context20.n) {
1950
+ case 0:
1951
+ return _context20.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1952
+ productIds,
1953
+ status: ProductStatus.OffSale
1954
+ }));
1955
+ }
1956
+ }, _callee20, this);
1957
+ }));
1958
+ function batchOffShelfProduct(_x14) {
1959
+ return _batchOffShelfProduct.apply(this, arguments);
1960
+ }
1961
+ return batchOffShelfProduct;
1962
+ })()
1620
1963
  }, {
1621
1964
  key: "getSupportToDirectBuy",
1622
- value: function() {
1623
- var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee1() {
1624
- var userInfo, authType, notSupportAuthTypes;
1625
- return _regenerator$3().w(function(_context1) {
1626
- while (1) switch (_context1.n) {
1965
+ value: (function() {
1966
+ var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee21() {
1967
+ var _this$config7, _this$config7$getProd;
1968
+ var userInfo, productConfig, authType, notSupportAuthTypes;
1969
+ return _regenerator$3().w(function(_context21) {
1970
+ while (1) switch (_context21.n) {
1627
1971
  case 0:
1628
- _context1.n = 1;
1972
+ _context21.n = 1;
1629
1973
  return this.getProductPayOrderEnabled();
1630
1974
  case 1:
1631
- if (_context1.v) {
1632
- _context1.n = 2;
1975
+ if (_context21.v) {
1976
+ _context21.n = 2;
1633
1977
  break;
1634
1978
  }
1635
- return _context1.a(2, false);
1979
+ return _context21.a(2, false);
1636
1980
  case 2:
1637
- _context1.n = 3;
1638
- return this.iarCore.getUserInfo();
1981
+ _context21.n = 3;
1982
+ return this.interactionCore.getUserInfo();
1639
1983
  case 3:
1640
- userInfo = _context1.v;
1984
+ userInfo = _context21.v;
1641
1985
  if (userInfo.unionId) {
1642
- _context1.n = 4;
1986
+ _context21.n = 4;
1643
1987
  break;
1644
1988
  }
1645
- return _context1.a(2, false);
1989
+ return _context21.a(2, false);
1646
1990
  case 4:
1991
+ _context21.n = 5;
1992
+ return (_this$config7 = this.config) === null || _this$config7 === void 0 || (_this$config7$getProd = _this$config7.getProductConfig) === null || _this$config7$getProd === void 0 ? void 0 : _this$config7$getProd.call(_this$config7);
1993
+ case 5:
1994
+ productConfig = _context21.v;
1995
+ if (productConfig !== null && productConfig !== void 0 && productConfig.directBuyEnabled) {
1996
+ _context21.n = 6;
1997
+ break;
1998
+ }
1999
+ return _context21.a(2, false);
2000
+ case 6:
1647
2001
  authType = userInfo.authType;
1648
2002
  if (!(!authType || authType === AuthType.None)) {
1649
- _context1.n = 5;
2003
+ _context21.n = 7;
1650
2004
  break;
1651
2005
  }
1652
- return _context1.a(2, true);
1653
- case 5:
2006
+ return _context21.a(2, true);
2007
+ case 7:
1654
2008
  notSupportAuthTypes = [AuthType.Custom, AuthType.External, AuthType.Direct, AuthType.EnterpriseWeChat];
1655
2009
  if (!notSupportAuthTypes.includes(authType)) {
1656
- _context1.n = 6;
2010
+ _context21.n = 8;
1657
2011
  break;
1658
2012
  }
1659
- return _context1.a(2, false);
1660
- case 6:
1661
- return _context1.a(2, true);
2013
+ return _context21.a(2, false);
2014
+ case 8:
2015
+ return _context21.a(2, true);
1662
2016
  }
1663
- }, _callee1, this);
2017
+ }, _callee21, this);
1664
2018
  }));
1665
2019
  function getSupportToDirectBuy() {
1666
2020
  return _getSupportToDirectBuy.apply(this, arguments);
1667
2021
  }
1668
2022
  return getSupportToDirectBuy;
1669
- }()
2023
+ })()
1670
2024
  }]);
1671
- }();
1672
- var PaymentProvider = /* @__PURE__ */ function(PaymentProvider2) {
2025
+ })();
2026
+ var PaymentProvider = /* @__PURE__ */ (function(PaymentProvider2) {
1673
2027
  PaymentProvider2["Wechat"] = "WECHAT";
1674
2028
  PaymentProvider2["Alipay"] = "ALIPAY";
1675
2029
  return PaymentProvider2;
1676
- }({});
1677
- var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
2030
+ })({});
2031
+ var OrderStatus = /* @__PURE__ */ (function(OrderStatus2) {
1678
2032
  OrderStatus2["WaitPay"] = "wait_pay";
1679
2033
  OrderStatus2["WaitDelivery"] = "wait_delivery";
1680
2034
  OrderStatus2["Delivering"] = "delivering";
@@ -1683,27 +2037,27 @@ var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
1683
2037
  OrderStatus2["Refunding"] = "refunding";
1684
2038
  OrderStatus2["Refunded"] = "refunded";
1685
2039
  return OrderStatus2;
1686
- }({});
1687
- var PayStatus = /* @__PURE__ */ function(PayStatus2) {
2040
+ })({});
2041
+ var PayStatus = /* @__PURE__ */ (function(PayStatus2) {
1688
2042
  PayStatus2["WaitPay"] = "wait_pay";
1689
2043
  PayStatus2["Payed"] = "payed";
1690
2044
  PayStatus2["Free"] = "free";
1691
2045
  return PayStatus2;
1692
- }({});
1693
- var RefundStatus = /* @__PURE__ */ function(RefundStatus2) {
2046
+ })({});
2047
+ var RefundStatus = /* @__PURE__ */ (function(RefundStatus2) {
1694
2048
  RefundStatus2["Success"] = "SUCCESS";
1695
2049
  RefundStatus2["Fail"] = "FAIL";
1696
2050
  RefundStatus2["Processing"] = "PROCESSING";
1697
2051
  return RefundStatus2;
1698
- }({});
1699
- var CreateOrderFailReason = /* @__PURE__ */ function(CreateOrderFailReason2) {
2052
+ })({});
2053
+ var CreateOrderFailReason = /* @__PURE__ */ (function(CreateOrderFailReason2) {
1700
2054
  CreateOrderFailReason2["Unknown"] = "unknown";
1701
2055
  return CreateOrderFailReason2;
1702
- }({});
1703
- var OrderRefundFailReason = /* @__PURE__ */ function(OrderRefundFailReason2) {
2056
+ })({});
2057
+ var OrderRefundFailReason = /* @__PURE__ */ (function(OrderRefundFailReason2) {
1704
2058
  OrderRefundFailReason2["Unknown"] = "unknown";
1705
2059
  return OrderRefundFailReason2;
1706
- }({});
2060
+ })({});
1707
2061
  function _typeof$3(o) {
1708
2062
  "@babel/helpers - typeof";
1709
2063
  return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -1921,7 +2275,7 @@ function _regenerator$2() {
1921
2275
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
1922
2276
  function i(r2, n2, o2, i2) {
1923
2277
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
1924
- return _regeneratorDefine2$2(u2, "_invoke", function(r3, n3, o3) {
2278
+ return _regeneratorDefine2$2(u2, "_invoke", (function(r3, n3, o3) {
1925
2279
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
1926
2280
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
1927
2281
  } };
@@ -1954,7 +2308,7 @@ function _regenerator$2() {
1954
2308
  }
1955
2309
  return { value: t, done: y };
1956
2310
  };
1957
- }(r2, o2, i2), true), u2;
2311
+ })(r2, o2, i2), true), u2;
1958
2312
  }
1959
2313
  var a = {};
1960
2314
  function Generator() {
@@ -1986,15 +2340,12 @@ function _regeneratorDefine2$2(e, r, n, t) {
1986
2340
  i = 0;
1987
2341
  }
1988
2342
  _regeneratorDefine2$2 = function _regeneratorDefine(e2, r2, n2, t2) {
1989
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
1990
- else {
1991
- var o = function o2(r3, n3) {
1992
- _regeneratorDefine2$2(e2, r3, function(e3) {
1993
- return this._invoke(r3, n3, e3);
1994
- });
1995
- };
1996
- o("next", 0), o("throw", 1), o("return", 2);
2343
+ function o(r3, n3) {
2344
+ _regeneratorDefine2$2(e2, r3, function(e3) {
2345
+ return this._invoke(r3, n3, e3);
2346
+ });
1997
2347
  }
2348
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
1998
2349
  }, _regeneratorDefine2$2(e, r, n, t);
1999
2350
  }
2000
2351
  function asyncGeneratorStep$2(n, t, e, r, o, a, c) {
@@ -2049,8 +2400,8 @@ function _toPrimitive$2(t, r) {
2049
2400
  }
2050
2401
  return String(t);
2051
2402
  }
2052
- var Order = /* @__PURE__ */ function() {
2053
- function Order2(iarCore, config) {
2403
+ var Order = /* @__PURE__ */ (function() {
2404
+ function Order2(interactionCore, config) {
2054
2405
  _classCallCheck$2(this, Order2);
2055
2406
  _defineProperty$2(this, "OrderStatus", OrderStatus);
2056
2407
  _defineProperty$2(this, "PayStatus", PayStatus);
@@ -2061,12 +2412,12 @@ var Order = /* @__PURE__ */ function() {
2061
2412
  _defineProperty$2(this, "RefundStatus", RefundStatus);
2062
2413
  _defineProperty$2(this, "CreateOrderFailReason", CreateOrderFailReason);
2063
2414
  _defineProperty$2(this, "OrderRefundFailReason", OrderRefundFailReason);
2064
- this.iarCore = iarCore;
2415
+ this.interactionCore = interactionCore;
2065
2416
  this.config = config;
2066
2417
  }
2067
2418
  return _createClass$2(Order2, [{
2068
2419
  key: "getOrderList",
2069
- value: function() {
2420
+ value: (function() {
2070
2421
  var _getOrderList = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee() {
2071
2422
  var params, _params$pageNumber, pageNumber, _params$pageSize, pageSize, orderStatus, res, _args = arguments;
2072
2423
  return _regenerator$2().w(function(_context) {
@@ -2075,7 +2426,7 @@ var Order = /* @__PURE__ */ function() {
2075
2426
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2076
2427
  _params$pageNumber = params.pageNumber, pageNumber = _params$pageNumber === void 0 ? 1 : _params$pageNumber, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 10 : _params$pageSize, orderStatus = params.orderStatus;
2077
2428
  _context.n = 1;
2078
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2429
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2079
2430
  pageNumber,
2080
2431
  pageSize,
2081
2432
  orderStatus
@@ -2096,17 +2447,17 @@ var Order = /* @__PURE__ */ function() {
2096
2447
  return _getOrderList.apply(this, arguments);
2097
2448
  }
2098
2449
  return getOrderList;
2099
- }()
2450
+ })()
2100
2451
  }, {
2101
2452
  key: "getOrderDetail",
2102
- value: function() {
2453
+ value: (function() {
2103
2454
  var _getOrderDetail = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee2(params) {
2104
2455
  var internalDetail;
2105
2456
  return _regenerator$2().w(function(_context2) {
2106
2457
  while (1) switch (_context2.n) {
2107
2458
  case 0:
2108
2459
  _context2.n = 1;
2109
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2460
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2110
2461
  orderNo: params.orderNo,
2111
2462
  syncPayStatus: boolToYN(params.syncPayStatus)
2112
2463
  });
@@ -2120,18 +2471,18 @@ var Order = /* @__PURE__ */ function() {
2120
2471
  return _getOrderDetail.apply(this, arguments);
2121
2472
  }
2122
2473
  return getOrderDetail;
2123
- }()
2474
+ })()
2124
2475
  }, {
2125
2476
  key: "createOrder",
2126
- value: function() {
2477
+ value: (function() {
2127
2478
  var _createOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee3(params) {
2128
2479
  var res, _t;
2129
2480
  return _regenerator$2().w(function(_context3) {
2130
- while (1) switch (_context3.n) {
2481
+ while (1) switch (_context3.p = _context3.n) {
2131
2482
  case 0:
2132
2483
  _context3.p = 0;
2133
2484
  _context3.n = 1;
2134
- return this.iarCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2485
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2135
2486
  case 1:
2136
2487
  res = _context3.v;
2137
2488
  return _context3.a(2, _objectSpread$1({
@@ -2152,15 +2503,15 @@ var Order = /* @__PURE__ */ function() {
2152
2503
  return _createOrder.apply(this, arguments);
2153
2504
  }
2154
2505
  return createOrder;
2155
- }()
2506
+ })()
2156
2507
  }, {
2157
2508
  key: "confirmOrder",
2158
- value: function() {
2509
+ value: (function() {
2159
2510
  var _confirmOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee4(orderNo) {
2160
2511
  return _regenerator$2().w(function(_context4) {
2161
2512
  while (1) switch (_context4.n) {
2162
2513
  case 0:
2163
- return _context4.a(2, this.iarCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2514
+ return _context4.a(2, this.interactionCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2164
2515
  orderNo
2165
2516
  }), {}));
2166
2517
  }
@@ -2170,18 +2521,18 @@ var Order = /* @__PURE__ */ function() {
2170
2521
  return _confirmOrder.apply(this, arguments);
2171
2522
  }
2172
2523
  return confirmOrder;
2173
- }()
2524
+ })()
2174
2525
  }, {
2175
2526
  key: "applyOrderRefund",
2176
- value: function() {
2527
+ value: (function() {
2177
2528
  var _applyOrderRefund = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee5(orderNo) {
2178
2529
  var res, _t2;
2179
2530
  return _regenerator$2().w(function(_context5) {
2180
- while (1) switch (_context5.n) {
2531
+ while (1) switch (_context5.p = _context5.n) {
2181
2532
  case 0:
2182
2533
  _context5.p = 0;
2183
2534
  _context5.n = 1;
2184
- return this.iarCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2535
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2185
2536
  orderNo
2186
2537
  });
2187
2538
  case 1:
@@ -2204,9 +2555,9 @@ var Order = /* @__PURE__ */ function() {
2204
2555
  return _applyOrderRefund.apply(this, arguments);
2205
2556
  }
2206
2557
  return applyOrderRefund;
2207
- }()
2558
+ })()
2208
2559
  }]);
2209
- }();
2560
+ })();
2210
2561
  function mapInternalAddressToAddressData(data) {
2211
2562
  if (!data) {
2212
2563
  return {
@@ -2238,7 +2589,7 @@ function _regenerator$1() {
2238
2589
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2239
2590
  function i(r2, n2, o2, i2) {
2240
2591
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2241
- return _regeneratorDefine2$1(u2, "_invoke", function(r3, n3, o3) {
2592
+ return _regeneratorDefine2$1(u2, "_invoke", (function(r3, n3, o3) {
2242
2593
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2243
2594
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2244
2595
  } };
@@ -2271,7 +2622,7 @@ function _regenerator$1() {
2271
2622
  }
2272
2623
  return { value: t, done: y };
2273
2624
  };
2274
- }(r2, o2, i2), true), u2;
2625
+ })(r2, o2, i2), true), u2;
2275
2626
  }
2276
2627
  var a = {};
2277
2628
  function Generator() {
@@ -2303,15 +2654,12 @@ function _regeneratorDefine2$1(e, r, n, t) {
2303
2654
  i = 0;
2304
2655
  }
2305
2656
  _regeneratorDefine2$1 = function _regeneratorDefine(e2, r2, n2, t2) {
2306
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2307
- else {
2308
- var o = function o2(r3, n3) {
2309
- _regeneratorDefine2$1(e2, r3, function(e3) {
2310
- return this._invoke(r3, n3, e3);
2311
- });
2312
- };
2313
- o("next", 0), o("throw", 1), o("return", 2);
2657
+ function o(r3, n3) {
2658
+ _regeneratorDefine2$1(e2, r3, function(e3) {
2659
+ return this._invoke(r3, n3, e3);
2660
+ });
2314
2661
  }
2662
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2315
2663
  }, _regeneratorDefine2$1(e, r, n, t);
2316
2664
  }
2317
2665
  function ownKeys(e, r) {
@@ -2387,15 +2735,15 @@ function _toPrimitive$1(t, r) {
2387
2735
  }
2388
2736
  return String(t);
2389
2737
  }
2390
- var Address = /* @__PURE__ */ function() {
2391
- function Address2(iarCore, config) {
2738
+ var Address = /* @__PURE__ */ (function() {
2739
+ function Address2(interactionCore, config) {
2392
2740
  _classCallCheck$1(this, Address2);
2393
- this.iarCore = iarCore;
2741
+ this.interactionCore = interactionCore;
2394
2742
  this.config = config;
2395
2743
  }
2396
2744
  return _createClass$1(Address2, [{
2397
2745
  key: "getAddressList",
2398
- value: function() {
2746
+ value: (function() {
2399
2747
  var _getAddressList = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee() {
2400
2748
  var options, _options$pageNumber, pageNumber, _options$pageSize, pageSize, res, _args = arguments;
2401
2749
  return _regenerator$1().w(function(_context) {
@@ -2404,7 +2752,7 @@ var Address = /* @__PURE__ */ function() {
2404
2752
  options = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2405
2753
  _options$pageNumber = options.pageNumber, pageNumber = _options$pageNumber === void 0 ? 1 : _options$pageNumber, _options$pageSize = options.pageSize, pageSize = _options$pageSize === void 0 ? 10 : _options$pageSize;
2406
2754
  _context.n = 1;
2407
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
2755
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
2408
2756
  pageNumber,
2409
2757
  pageSize
2410
2758
  });
@@ -2420,17 +2768,17 @@ var Address = /* @__PURE__ */ function() {
2420
2768
  return _getAddressList.apply(this, arguments);
2421
2769
  }
2422
2770
  return getAddressList;
2423
- }()
2771
+ })()
2424
2772
  }, {
2425
2773
  key: "getDefaultAddress",
2426
- value: function() {
2774
+ value: (function() {
2427
2775
  var _getDefaultAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee2() {
2428
2776
  var res;
2429
2777
  return _regenerator$1().w(function(_context2) {
2430
2778
  while (1) switch (_context2.n) {
2431
2779
  case 0:
2432
2780
  _context2.n = 1;
2433
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
2781
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
2434
2782
  case 1:
2435
2783
  res = _context2.v;
2436
2784
  return _context2.a(2, mapInternalAddressToAddressData(res));
@@ -2441,17 +2789,17 @@ var Address = /* @__PURE__ */ function() {
2441
2789
  return _getDefaultAddress.apply(this, arguments);
2442
2790
  }
2443
2791
  return getDefaultAddress;
2444
- }()
2792
+ })()
2445
2793
  }, {
2446
2794
  key: "addAddress",
2447
- value: function() {
2795
+ value: (function() {
2448
2796
  var _addAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee3(params) {
2449
2797
  var res;
2450
2798
  return _regenerator$1().w(function(_context3) {
2451
2799
  while (1) switch (_context3.n) {
2452
2800
  case 0:
2453
2801
  _context3.n = 1;
2454
- return this.iarCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
2802
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
2455
2803
  case 1:
2456
2804
  res = _context3.v;
2457
2805
  return _context3.a(2, mapInternalAddressToAddressData(res));
@@ -2462,16 +2810,16 @@ var Address = /* @__PURE__ */ function() {
2462
2810
  return _addAddress.apply(this, arguments);
2463
2811
  }
2464
2812
  return addAddress;
2465
- }()
2813
+ })()
2466
2814
  }, {
2467
2815
  key: "updateAddress",
2468
- value: function() {
2816
+ value: (function() {
2469
2817
  var _updateAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee4(params) {
2470
2818
  return _regenerator$1().w(function(_context4) {
2471
2819
  while (1) switch (_context4.n) {
2472
2820
  case 0:
2473
2821
  _context4.n = 1;
2474
- return this.iarCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
2822
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
2475
2823
  case 1:
2476
2824
  return _context4.a(2, _context4.v);
2477
2825
  }
@@ -2481,16 +2829,16 @@ var Address = /* @__PURE__ */ function() {
2481
2829
  return _updateAddress.apply(this, arguments);
2482
2830
  }
2483
2831
  return updateAddress;
2484
- }()
2832
+ })()
2485
2833
  }, {
2486
2834
  key: "deleteAddress",
2487
- value: function() {
2835
+ value: (function() {
2488
2836
  var _deleteAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee5(id) {
2489
2837
  return _regenerator$1().w(function(_context5) {
2490
2838
  while (1) switch (_context5.n) {
2491
2839
  case 0:
2492
2840
  _context5.n = 1;
2493
- return this.iarCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
2841
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
2494
2842
  id
2495
2843
  });
2496
2844
  case 1:
@@ -2502,9 +2850,9 @@ var Address = /* @__PURE__ */ function() {
2502
2850
  return _deleteAddress.apply(this, arguments);
2503
2851
  }
2504
2852
  return deleteAddress;
2505
- }()
2853
+ })()
2506
2854
  }]);
2507
- }();
2855
+ })();
2508
2856
  function _typeof(o) {
2509
2857
  "@babel/helpers - typeof";
2510
2858
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -2518,7 +2866,7 @@ function _regenerator() {
2518
2866
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2519
2867
  function i(r2, n2, o2, i2) {
2520
2868
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2521
- return _regeneratorDefine2(u2, "_invoke", function(r3, n3, o3) {
2869
+ return _regeneratorDefine2(u2, "_invoke", (function(r3, n3, o3) {
2522
2870
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2523
2871
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2524
2872
  } };
@@ -2551,7 +2899,7 @@ function _regenerator() {
2551
2899
  }
2552
2900
  return { value: t, done: y };
2553
2901
  };
2554
- }(r2, o2, i2), true), u2;
2902
+ })(r2, o2, i2), true), u2;
2555
2903
  }
2556
2904
  var a = {};
2557
2905
  function Generator() {
@@ -2583,15 +2931,12 @@ function _regeneratorDefine2(e, r, n, t) {
2583
2931
  i = 0;
2584
2932
  }
2585
2933
  _regeneratorDefine2 = function _regeneratorDefine(e2, r2, n2, t2) {
2586
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2587
- else {
2588
- var o = function o2(r3, n3) {
2589
- _regeneratorDefine2(e2, r3, function(e3) {
2590
- return this._invoke(r3, n3, e3);
2591
- });
2592
- };
2593
- o("next", 0), o("throw", 1), o("return", 2);
2934
+ function o(r3, n3) {
2935
+ _regeneratorDefine2(e2, r3, function(e3) {
2936
+ return this._invoke(r3, n3, e3);
2937
+ });
2594
2938
  }
2939
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2595
2940
  }, _regeneratorDefine2(e, r, n, t);
2596
2941
  }
2597
2942
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
@@ -2646,23 +2991,23 @@ function _toPrimitive(t, r) {
2646
2991
  }
2647
2992
  return String(t);
2648
2993
  }
2649
- var Payment = /* @__PURE__ */ function() {
2650
- function Payment2(iarCore, config) {
2994
+ var Payment = /* @__PURE__ */ (function() {
2995
+ function Payment2(interactionCore, config) {
2651
2996
  _classCallCheck(this, Payment2);
2652
2997
  _defineProperty(this, "PaymentProvider", PaymentProvider);
2653
- this.iarCore = iarCore;
2998
+ this.interactionCore = interactionCore;
2654
2999
  this.config = config;
2655
3000
  }
2656
3001
  return _createClass(Payment2, [{
2657
3002
  key: "getPayOrderParams",
2658
- value: function() {
3003
+ value: (function() {
2659
3004
  var _getPayOrderParams = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee(options) {
2660
3005
  var res;
2661
3006
  return _regenerator().w(function(_context) {
2662
3007
  while (1) switch (_context.n) {
2663
3008
  case 0:
2664
3009
  _context.n = 1;
2665
- return this.iarCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
3010
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
2666
3011
  case 1:
2667
3012
  res = _context.v;
2668
3013
  return _context.a(2, mapInternalCreateOrderResponse(res));
@@ -2673,7 +3018,7 @@ var Payment = /* @__PURE__ */ function() {
2673
3018
  return _getPayOrderParams.apply(this, arguments);
2674
3019
  }
2675
3020
  return getPayOrderParams;
2676
- }()
3021
+ })()
2677
3022
  }, {
2678
3023
  key: "getPayProviders",
2679
3024
  value: (
@@ -2685,7 +3030,7 @@ var Payment = /* @__PURE__ */ function() {
2685
3030
  * console.log('支付方式', data);
2686
3031
  * ```
2687
3032
  */
2688
- function() {
3033
+ (function() {
2689
3034
  var _getPayProviders = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2() {
2690
3035
  var _this = this;
2691
3036
  var fetchPromise;
@@ -2698,7 +3043,7 @@ var Payment = /* @__PURE__ */ function() {
2698
3043
  }
2699
3044
  return _context2.a(2, this.__payProviderCache);
2700
3045
  case 1:
2701
- fetchPromise = this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
3046
+ fetchPromise = this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
2702
3047
  _this.__payProviderCache = void 0;
2703
3048
  throw error;
2704
3049
  });
@@ -2714,16 +3059,16 @@ var Payment = /* @__PURE__ */ function() {
2714
3059
  return _getPayProviders.apply(this, arguments);
2715
3060
  }
2716
3061
  return getPayProviders;
2717
- }()
3062
+ })()
2718
3063
  )
2719
3064
  }]);
2720
- }();
3065
+ })();
2721
3066
  ;
2722
3067
  console.log(
2723
3068
  "%c@polyv/product-sdk",
2724
3069
  "background:#67C23A;padding: 2px 6px;border-radius: 3px;color: #fff",
2725
- "[version: 1.2.0-rc-20250724.2]",
2726
- "[buildTime: 2025-07-24 03:56:56]"
3070
+ "[version: 1.4.0-rc-20250904.1]",
3071
+ "[buildTime: 2025-09-04 03:22:26]"
2727
3072
  );
2728
3073
  export {
2729
3074
  Address,
@@ -2739,6 +3084,7 @@ export {
2739
3084
  ProductBuyType,
2740
3085
  ProductDeliveryType,
2741
3086
  ProductEvents,
3087
+ ProductExplainOperation,
2742
3088
  ProductExplainStatus,
2743
3089
  ProductExplainType,
2744
3090
  ProductLinkJumpWay,