tslib.es6.js 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  4. this file except in compliance with the License. You may obtain a copy of the
  5. License at http://www.apache.org/licenses/LICENSE-2.0
  6. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  7. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  8. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9. MERCHANTABLITY OR NON-INFRINGEMENT.
  10. See the Apache Version 2.0 License for specific language governing permissions
  11. and limitations under the License.
  12. ***************************************************************************** */
  13. /* global Reflect, Promise */
  14. var extendStatics = function(d, b) {
  15. extendStatics = Object.setPrototypeOf ||
  16. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  17. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  18. return extendStatics(d, b);
  19. };
  20. export function __extends(d, b) {
  21. extendStatics(d, b);
  22. function __() { this.constructor = d; }
  23. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  24. }
  25. export var __assign = function() {
  26. __assign = Object.assign || function __assign(t) {
  27. for (var s, i = 1, n = arguments.length; i < n; i++) {
  28. s = arguments[i];
  29. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  30. }
  31. return t;
  32. }
  33. return __assign.apply(this, arguments);
  34. }
  35. export function __rest(s, e) {
  36. var t = {};
  37. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  38. t[p] = s[p];
  39. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  40. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  41. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  42. t[p[i]] = s[p[i]];
  43. }
  44. return t;
  45. }
  46. export function __decorate(decorators, target, key, desc) {
  47. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  48. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  49. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  50. return c > 3 && r && Object.defineProperty(target, key, r), r;
  51. }
  52. export function __param(paramIndex, decorator) {
  53. return function (target, key) { decorator(target, key, paramIndex); }
  54. }
  55. export function __metadata(metadataKey, metadataValue) {
  56. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  57. }
  58. export function __awaiter(thisArg, _arguments, P, generator) {
  59. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  60. return new (P || (P = Promise))(function (resolve, reject) {
  61. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  62. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  63. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  64. step((generator = generator.apply(thisArg, _arguments || [])).next());
  65. });
  66. }
  67. export function __generator(thisArg, body) {
  68. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  69. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  70. function verb(n) { return function (v) { return step([n, v]); }; }
  71. function step(op) {
  72. if (f) throw new TypeError("Generator is already executing.");
  73. while (_) try {
  74. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  75. if (y = 0, t) op = [op[0] & 2, t.value];
  76. switch (op[0]) {
  77. case 0: case 1: t = op; break;
  78. case 4: _.label++; return { value: op[1], done: false };
  79. case 5: _.label++; y = op[1]; op = [0]; continue;
  80. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  81. default:
  82. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  83. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  84. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  85. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  86. if (t[2]) _.ops.pop();
  87. _.trys.pop(); continue;
  88. }
  89. op = body.call(thisArg, _);
  90. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  91. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  92. }
  93. }
  94. export function __exportStar(m, exports) {
  95. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  96. }
  97. export function __values(o) {
  98. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  99. if (m) return m.call(o);
  100. if (o && typeof o.length === "number") return {
  101. next: function () {
  102. if (o && i >= o.length) o = void 0;
  103. return { value: o && o[i++], done: !o };
  104. }
  105. };
  106. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  107. }
  108. export function __read(o, n) {
  109. var m = typeof Symbol === "function" && o[Symbol.iterator];
  110. if (!m) return o;
  111. var i = m.call(o), r, ar = [], e;
  112. try {
  113. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  114. }
  115. catch (error) { e = { error: error }; }
  116. finally {
  117. try {
  118. if (r && !r.done && (m = i["return"])) m.call(i);
  119. }
  120. finally { if (e) throw e.error; }
  121. }
  122. return ar;
  123. }
  124. export function __spread() {
  125. for (var ar = [], i = 0; i < arguments.length; i++)
  126. ar = ar.concat(__read(arguments[i]));
  127. return ar;
  128. }
  129. export function __spreadArrays() {
  130. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  131. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  132. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  133. r[k] = a[j];
  134. return r;
  135. };
  136. export function __await(v) {
  137. return this instanceof __await ? (this.v = v, this) : new __await(v);
  138. }
  139. export function __asyncGenerator(thisArg, _arguments, generator) {
  140. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  141. var g = generator.apply(thisArg, _arguments || []), i, q = [];
  142. return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
  143. function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
  144. function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
  145. function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
  146. function fulfill(value) { resume("next", value); }
  147. function reject(value) { resume("throw", value); }
  148. function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
  149. }
  150. export function __asyncDelegator(o) {
  151. var i, p;
  152. return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
  153. function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
  154. }
  155. export function __asyncValues(o) {
  156. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  157. var m = o[Symbol.asyncIterator], i;
  158. return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
  159. function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
  160. function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
  161. }
  162. export function __makeTemplateObject(cooked, raw) {
  163. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  164. return cooked;
  165. };
  166. export function __importStar(mod) {
  167. if (mod && mod.__esModule) return mod;
  168. var result = {};
  169. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  170. result.default = mod;
  171. return result;
  172. }
  173. export function __importDefault(mod) {
  174. return (mod && mod.__esModule) ? mod : { default: mod };
  175. }
  176. export function __classPrivateFieldGet(receiver, privateMap) {
  177. if (!privateMap.has(receiver)) {
  178. throw new TypeError("attempted to get private field on non-instance");
  179. }
  180. return privateMap.get(receiver);
  181. }
  182. export function __classPrivateFieldSet(receiver, privateMap, value) {
  183. if (!privateMap.has(receiver)) {
  184. throw new TypeError("attempted to set private field on non-instance");
  185. }
  186. privateMap.set(receiver, value);
  187. return value;
  188. }