@tarojs/taro 2.2.21 → 2.2.22

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/dist/index.esm.js CHANGED
@@ -1,3 +1,21 @@
1
+ function _callSuper(t, o, e) {
2
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
3
+ }
4
+ function _construct(t, e, r) {
5
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
6
+ var o = [null];
7
+ o.push.apply(o, e);
8
+ var p = new (t.bind.apply(t, o))();
9
+ return r && _setPrototypeOf(p, r.prototype), p;
10
+ }
11
+ function _isNativeReflectConstruct() {
12
+ try {
13
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
14
+ } catch (t) {}
15
+ return (_isNativeReflectConstruct = function () {
16
+ return !!t;
17
+ })();
18
+ }
1
19
  function ownKeys(e, r) {
2
20
  var t = Object.keys(e);
3
21
  if (Object.getOwnPropertySymbols) {
@@ -19,6 +37,20 @@ function _objectSpread2(e) {
19
37
  }
20
38
  return e;
21
39
  }
40
+ function _toPrimitive(t, r) {
41
+ if ("object" != typeof t || !t) return t;
42
+ var e = t[Symbol.toPrimitive];
43
+ if (void 0 !== e) {
44
+ var i = e.call(t, r || "default");
45
+ if ("object" != typeof i) return i;
46
+ throw new TypeError("@@toPrimitive must return a primitive value.");
47
+ }
48
+ return ("string" === r ? String : Number)(t);
49
+ }
50
+ function _toPropertyKey(t) {
51
+ var i = _toPrimitive(t, "string");
52
+ return "symbol" == typeof i ? i : String(i);
53
+ }
22
54
  function _typeof(o) {
23
55
  "@babel/helpers - typeof";
24
56
 
@@ -93,32 +125,6 @@ function _setPrototypeOf(o, p) {
93
125
  };
94
126
  return _setPrototypeOf(o, p);
95
127
  }
96
- function _isNativeReflectConstruct() {
97
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
98
- if (Reflect.construct.sham) return false;
99
- if (typeof Proxy === "function") return true;
100
- try {
101
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
102
- return true;
103
- } catch (e) {
104
- return false;
105
- }
106
- }
107
- function _construct(Parent, args, Class) {
108
- if (_isNativeReflectConstruct()) {
109
- _construct = Reflect.construct.bind();
110
- } else {
111
- _construct = function _construct(Parent, args, Class) {
112
- var a = [null];
113
- a.push.apply(a, args);
114
- var Constructor = Function.bind.apply(Parent, a);
115
- var instance = new Constructor();
116
- if (Class) _setPrototypeOf(instance, Class.prototype);
117
- return instance;
118
- };
119
- }
120
- return _construct.apply(null, arguments);
121
- }
122
128
  function _isNativeFunction(fn) {
123
129
  try {
124
130
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
@@ -166,20 +172,6 @@ function _possibleConstructorReturn(self, call) {
166
172
  }
167
173
  return _assertThisInitialized(self);
168
174
  }
169
- function _createSuper(Derived) {
170
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
171
- return function _createSuperInternal() {
172
- var Super = _getPrototypeOf(Derived),
173
- result;
174
- if (hasNativeReflectConstruct) {
175
- var NewTarget = _getPrototypeOf(this).constructor;
176
- result = Reflect.construct(Super, arguments, NewTarget);
177
- } else {
178
- result = Super.apply(this, arguments);
179
- }
180
- return _possibleConstructorReturn(this, result);
181
- };
182
- }
183
175
  function _toConsumableArray(arr) {
184
176
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
185
177
  }
@@ -205,20 +197,6 @@ function _arrayLikeToArray(arr, len) {
205
197
  function _nonIterableSpread() {
206
198
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
207
199
  }
208
- function _toPrimitive(input, hint) {
209
- if (typeof input !== "object" || input === null) return input;
210
- var prim = input[Symbol.toPrimitive];
211
- if (prim !== undefined) {
212
- var res = prim.call(input, hint || "default");
213
- if (typeof res !== "object") return res;
214
- throw new TypeError("@@toPrimitive must return a primitive value.");
215
- }
216
- return (hint === "string" ? String : Number)(input);
217
- }
218
- function _toPropertyKey(arg) {
219
- var key = _toPrimitive(arg, "string");
220
- return typeof key === "symbol" ? key : String(key);
221
- }
222
200
 
223
201
  if (typeof Object.assign !== 'function') {
224
202
  // Must be writable: true, enumerable: false, configurable: true
@@ -1577,7 +1555,6 @@ function detachAllRef(component) {
1577
1555
  }
1578
1556
  var RefsArray = /*#__PURE__*/function (_Array) {
1579
1557
  _inherits(RefsArray, _Array);
1580
- var _super = _createSuper(RefsArray);
1581
1558
  /**
1582
1559
  * @param {Array} initList
1583
1560
  */
@@ -1585,7 +1562,7 @@ var RefsArray = /*#__PURE__*/function (_Array) {
1585
1562
  var _this;
1586
1563
  var initList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1587
1564
  _classCallCheck(this, RefsArray);
1588
- _this = _super.call.apply(_super, [this].concat(_toConsumableArray(initList)));
1565
+ _this = _callSuper(this, RefsArray, _toConsumableArray(initList));
1589
1566
  _this.inited = false;
1590
1567
  return _this;
1591
1568
  }