source: imaps-frontend/node_modules/tslib/tslib.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 20.4 KB
RevLine 
[d565449]1/******************************************************************************
2Copyright (c) Microsoft Corporation.
3
4Permission to use, copy, modify, and/or distribute this software for any
5purpose with or without fee is hereby granted.
6
7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13PERFORMANCE OF THIS SOFTWARE.
14***************************************************************************** */
15/* global global, define, Symbol, Reflect, Promise, SuppressedError */
16var __extends;
17var __assign;
18var __rest;
19var __decorate;
20var __param;
21var __esDecorate;
22var __runInitializers;
23var __propKey;
24var __setFunctionName;
25var __metadata;
26var __awaiter;
27var __generator;
28var __exportStar;
29var __values;
30var __read;
31var __spread;
32var __spreadArrays;
33var __spreadArray;
34var __await;
35var __asyncGenerator;
36var __asyncDelegator;
37var __asyncValues;
38var __makeTemplateObject;
39var __importStar;
40var __importDefault;
41var __classPrivateFieldGet;
42var __classPrivateFieldSet;
43var __classPrivateFieldIn;
44var __createBinding;
45var __addDisposableResource;
46var __disposeResources;
47(function (factory) {
48 var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
49 if (typeof define === "function" && define.amd) {
50 define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
51 }
52 else if (typeof module === "object" && typeof module.exports === "object") {
53 factory(createExporter(root, createExporter(module.exports)));
54 }
55 else {
56 factory(createExporter(root));
57 }
58 function createExporter(exports, previous) {
59 if (exports !== root) {
60 if (typeof Object.create === "function") {
61 Object.defineProperty(exports, "__esModule", { value: true });
62 }
63 else {
64 exports.__esModule = true;
65 }
66 }
67 return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
68 }
69})
70(function (exporter) {
71 var extendStatics = Object.setPrototypeOf ||
72 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
73 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
74
75 __extends = function (d, b) {
76 if (typeof b !== "function" && b !== null)
77 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
78 extendStatics(d, b);
79 function __() { this.constructor = d; }
80 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
81 };
82
83 __assign = Object.assign || function (t) {
84 for (var s, i = 1, n = arguments.length; i < n; i++) {
85 s = arguments[i];
86 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
87 }
88 return t;
89 };
90
91 __rest = function (s, e) {
92 var t = {};
93 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
94 t[p] = s[p];
95 if (s != null && typeof Object.getOwnPropertySymbols === "function")
96 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
97 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
98 t[p[i]] = s[p[i]];
99 }
100 return t;
101 };
102
103 __decorate = function (decorators, target, key, desc) {
104 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
105 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
106 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;
107 return c > 3 && r && Object.defineProperty(target, key, r), r;
108 };
109
110 __param = function (paramIndex, decorator) {
111 return function (target, key) { decorator(target, key, paramIndex); }
112 };
113
114 __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
115 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
116 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
117 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
118 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
119 var _, done = false;
120 for (var i = decorators.length - 1; i >= 0; i--) {
121 var context = {};
122 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
123 for (var p in contextIn.access) context.access[p] = contextIn.access[p];
124 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
125 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
126 if (kind === "accessor") {
127 if (result === void 0) continue;
128 if (result === null || typeof result !== "object") throw new TypeError("Object expected");
129 if (_ = accept(result.get)) descriptor.get = _;
130 if (_ = accept(result.set)) descriptor.set = _;
131 if (_ = accept(result.init)) initializers.unshift(_);
132 }
133 else if (_ = accept(result)) {
134 if (kind === "field") initializers.unshift(_);
135 else descriptor[key] = _;
136 }
137 }
138 if (target) Object.defineProperty(target, contextIn.name, descriptor);
139 done = true;
140 };
141
142 __runInitializers = function (thisArg, initializers, value) {
143 var useValue = arguments.length > 2;
144 for (var i = 0; i < initializers.length; i++) {
145 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
146 }
147 return useValue ? value : void 0;
148 };
149
150 __propKey = function (x) {
151 return typeof x === "symbol" ? x : "".concat(x);
152 };
153
154 __setFunctionName = function (f, name, prefix) {
155 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
156 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
157 };
158
159 __metadata = function (metadataKey, metadataValue) {
160 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
161 };
162
163 __awaiter = function (thisArg, _arguments, P, generator) {
164 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
165 return new (P || (P = Promise))(function (resolve, reject) {
166 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
167 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
168 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
169 step((generator = generator.apply(thisArg, _arguments || [])).next());
170 });
171 };
172
173 __generator = function (thisArg, body) {
174 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
175 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
176 function verb(n) { return function (v) { return step([n, v]); }; }
177 function step(op) {
178 if (f) throw new TypeError("Generator is already executing.");
179 while (g && (g = 0, op[0] && (_ = 0)), _) try {
180 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;
181 if (y = 0, t) op = [op[0] & 2, t.value];
182 switch (op[0]) {
183 case 0: case 1: t = op; break;
184 case 4: _.label++; return { value: op[1], done: false };
185 case 5: _.label++; y = op[1]; op = [0]; continue;
186 case 7: op = _.ops.pop(); _.trys.pop(); continue;
187 default:
188 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
189 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
190 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
191 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
192 if (t[2]) _.ops.pop();
193 _.trys.pop(); continue;
194 }
195 op = body.call(thisArg, _);
196 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
197 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
198 }
199 };
200
201 __exportStar = function(m, o) {
202 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
203 };
204
205 __createBinding = Object.create ? (function(o, m, k, k2) {
206 if (k2 === undefined) k2 = k;
207 var desc = Object.getOwnPropertyDescriptor(m, k);
208 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
209 desc = { enumerable: true, get: function() { return m[k]; } };
210 }
211 Object.defineProperty(o, k2, desc);
212 }) : (function(o, m, k, k2) {
213 if (k2 === undefined) k2 = k;
214 o[k2] = m[k];
215 });
216
217 __values = function (o) {
218 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
219 if (m) return m.call(o);
220 if (o && typeof o.length === "number") return {
221 next: function () {
222 if (o && i >= o.length) o = void 0;
223 return { value: o && o[i++], done: !o };
224 }
225 };
226 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
227 };
228
229 __read = function (o, n) {
230 var m = typeof Symbol === "function" && o[Symbol.iterator];
231 if (!m) return o;
232 var i = m.call(o), r, ar = [], e;
233 try {
234 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
235 }
236 catch (error) { e = { error: error }; }
237 finally {
238 try {
239 if (r && !r.done && (m = i["return"])) m.call(i);
240 }
241 finally { if (e) throw e.error; }
242 }
243 return ar;
244 };
245
246 /** @deprecated */
247 __spread = function () {
248 for (var ar = [], i = 0; i < arguments.length; i++)
249 ar = ar.concat(__read(arguments[i]));
250 return ar;
251 };
252
253 /** @deprecated */
254 __spreadArrays = function () {
255 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
256 for (var r = Array(s), k = 0, i = 0; i < il; i++)
257 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
258 r[k] = a[j];
259 return r;
260 };
261
262 __spreadArray = function (to, from, pack) {
263 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
264 if (ar || !(i in from)) {
265 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
266 ar[i] = from[i];
267 }
268 }
269 return to.concat(ar || Array.prototype.slice.call(from));
270 };
271
272 __await = function (v) {
273 return this instanceof __await ? (this.v = v, this) : new __await(v);
274 };
275
276 __asyncGenerator = function (thisArg, _arguments, generator) {
277 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
278 var g = generator.apply(thisArg, _arguments || []), i, q = [];
279 return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
280 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
281 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
282 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
283 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
284 function fulfill(value) { resume("next", value); }
285 function reject(value) { resume("throw", value); }
286 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
287 };
288
289 __asyncDelegator = function (o) {
290 var i, p;
291 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
292 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
293 };
294
295 __asyncValues = function (o) {
296 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
297 var m = o[Symbol.asyncIterator], i;
298 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);
299 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); }); }; }
300 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
301 };
302
303 __makeTemplateObject = function (cooked, raw) {
304 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
305 return cooked;
306 };
307
308 var __setModuleDefault = Object.create ? (function(o, v) {
309 Object.defineProperty(o, "default", { enumerable: true, value: v });
310 }) : function(o, v) {
311 o["default"] = v;
312 };
313
314 __importStar = function (mod) {
315 if (mod && mod.__esModule) return mod;
316 var result = {};
317 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
318 __setModuleDefault(result, mod);
319 return result;
320 };
321
322 __importDefault = function (mod) {
323 return (mod && mod.__esModule) ? mod : { "default": mod };
324 };
325
326 __classPrivateFieldGet = function (receiver, state, kind, f) {
327 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
328 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
329 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
330 };
331
332 __classPrivateFieldSet = function (receiver, state, value, kind, f) {
333 if (kind === "m") throw new TypeError("Private method is not writable");
334 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
335 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
336 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
337 };
338
339 __classPrivateFieldIn = function (state, receiver) {
340 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
341 return typeof state === "function" ? receiver === state : state.has(receiver);
342 };
343
344 __addDisposableResource = function (env, value, async) {
345 if (value !== null && value !== void 0) {
346 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
347 var dispose, inner;
348 if (async) {
349 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
350 dispose = value[Symbol.asyncDispose];
351 }
352 if (dispose === void 0) {
353 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
354 dispose = value[Symbol.dispose];
355 if (async) inner = dispose;
356 }
357 if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
358 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
359 env.stack.push({ value: value, dispose: dispose, async: async });
360 }
361 else if (async) {
362 env.stack.push({ async: true });
363 }
364 return value;
365 };
366
367 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
368 var e = new Error(message);
369 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
370 };
371
372 __disposeResources = function (env) {
373 function fail(e) {
374 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
375 env.hasError = true;
376 }
377 function next() {
378 while (env.stack.length) {
379 var rec = env.stack.pop();
380 try {
381 var result = rec.dispose && rec.dispose.call(rec.value);
382 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
383 }
384 catch (e) {
385 fail(e);
386 }
387 }
388 if (env.hasError) throw env.error;
389 }
390 return next();
391 };
392
393 exporter("__extends", __extends);
394 exporter("__assign", __assign);
395 exporter("__rest", __rest);
396 exporter("__decorate", __decorate);
397 exporter("__param", __param);
398 exporter("__esDecorate", __esDecorate);
399 exporter("__runInitializers", __runInitializers);
400 exporter("__propKey", __propKey);
401 exporter("__setFunctionName", __setFunctionName);
402 exporter("__metadata", __metadata);
403 exporter("__awaiter", __awaiter);
404 exporter("__generator", __generator);
405 exporter("__exportStar", __exportStar);
406 exporter("__createBinding", __createBinding);
407 exporter("__values", __values);
408 exporter("__read", __read);
409 exporter("__spread", __spread);
410 exporter("__spreadArrays", __spreadArrays);
411 exporter("__spreadArray", __spreadArray);
412 exporter("__await", __await);
413 exporter("__asyncGenerator", __asyncGenerator);
414 exporter("__asyncDelegator", __asyncDelegator);
415 exporter("__asyncValues", __asyncValues);
416 exporter("__makeTemplateObject", __makeTemplateObject);
417 exporter("__importStar", __importStar);
418 exporter("__importDefault", __importDefault);
419 exporter("__classPrivateFieldGet", __classPrivateFieldGet);
420 exporter("__classPrivateFieldSet", __classPrivateFieldSet);
421 exporter("__classPrivateFieldIn", __classPrivateFieldIn);
422 exporter("__addDisposableResource", __addDisposableResource);
423 exporter("__disposeResources", __disposeResources);
424});
Note: See TracBrowser for help on using the repository browser.