jskit_rails 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,2447 @@
1
+ (function(global) {
2
+ 'use strict';
3
+ if (global.$traceurRuntime) {
4
+ return;
5
+ }
6
+ var $Object = Object;
7
+ var $TypeError = TypeError;
8
+ var $create = $Object.create;
9
+ var $defineProperties = $Object.defineProperties;
10
+ var $defineProperty = $Object.defineProperty;
11
+ var $freeze = $Object.freeze;
12
+ var $getOwnPropertyDescriptor = $Object.getOwnPropertyDescriptor;
13
+ var $getOwnPropertyNames = $Object.getOwnPropertyNames;
14
+ var $keys = $Object.keys;
15
+ var $hasOwnProperty = $Object.prototype.hasOwnProperty;
16
+ var $toString = $Object.prototype.toString;
17
+ var $preventExtensions = Object.preventExtensions;
18
+ var $seal = Object.seal;
19
+ var $isExtensible = Object.isExtensible;
20
+ function nonEnum(value) {
21
+ return {
22
+ configurable: true,
23
+ enumerable: false,
24
+ value: value,
25
+ writable: true
26
+ };
27
+ }
28
+ var types = {
29
+ void: function voidType() {},
30
+ any: function any() {},
31
+ string: function string() {},
32
+ number: function number() {},
33
+ boolean: function boolean() {}
34
+ };
35
+ var method = nonEnum;
36
+ var counter = 0;
37
+ function newUniqueString() {
38
+ return '__$' + Math.floor(Math.random() * 1e9) + '$' + ++counter + '$__';
39
+ }
40
+ var symbolInternalProperty = newUniqueString();
41
+ var symbolDescriptionProperty = newUniqueString();
42
+ var symbolDataProperty = newUniqueString();
43
+ var symbolValues = $create(null);
44
+ var privateNames = $create(null);
45
+ function isPrivateName(s) {
46
+ return privateNames[s];
47
+ }
48
+ function createPrivateName() {
49
+ var s = newUniqueString();
50
+ privateNames[s] = true;
51
+ return s;
52
+ }
53
+ function isShimSymbol(symbol) {
54
+ return typeof symbol === 'object' && symbol instanceof SymbolValue;
55
+ }
56
+ function typeOf(v) {
57
+ if (isShimSymbol(v))
58
+ return 'symbol';
59
+ return typeof v;
60
+ }
61
+ function Symbol(description) {
62
+ var value = new SymbolValue(description);
63
+ if (!(this instanceof Symbol))
64
+ return value;
65
+ throw new TypeError('Symbol cannot be new\'ed');
66
+ }
67
+ $defineProperty(Symbol.prototype, 'constructor', nonEnum(Symbol));
68
+ $defineProperty(Symbol.prototype, 'toString', method(function() {
69
+ var symbolValue = this[symbolDataProperty];
70
+ if (!getOption('symbols'))
71
+ return symbolValue[symbolInternalProperty];
72
+ if (!symbolValue)
73
+ throw TypeError('Conversion from symbol to string');
74
+ var desc = symbolValue[symbolDescriptionProperty];
75
+ if (desc === undefined)
76
+ desc = '';
77
+ return 'Symbol(' + desc + ')';
78
+ }));
79
+ $defineProperty(Symbol.prototype, 'valueOf', method(function() {
80
+ var symbolValue = this[symbolDataProperty];
81
+ if (!symbolValue)
82
+ throw TypeError('Conversion from symbol to string');
83
+ if (!getOption('symbols'))
84
+ return symbolValue[symbolInternalProperty];
85
+ return symbolValue;
86
+ }));
87
+ function SymbolValue(description) {
88
+ var key = newUniqueString();
89
+ $defineProperty(this, symbolDataProperty, {value: this});
90
+ $defineProperty(this, symbolInternalProperty, {value: key});
91
+ $defineProperty(this, symbolDescriptionProperty, {value: description});
92
+ freeze(this);
93
+ symbolValues[key] = this;
94
+ }
95
+ $defineProperty(SymbolValue.prototype, 'constructor', nonEnum(Symbol));
96
+ $defineProperty(SymbolValue.prototype, 'toString', {
97
+ value: Symbol.prototype.toString,
98
+ enumerable: false
99
+ });
100
+ $defineProperty(SymbolValue.prototype, 'valueOf', {
101
+ value: Symbol.prototype.valueOf,
102
+ enumerable: false
103
+ });
104
+ var hashProperty = createPrivateName();
105
+ var hashPropertyDescriptor = {value: undefined};
106
+ var hashObjectProperties = {
107
+ hash: {value: undefined},
108
+ self: {value: undefined}
109
+ };
110
+ var hashCounter = 0;
111
+ function getOwnHashObject(object) {
112
+ var hashObject = object[hashProperty];
113
+ if (hashObject && hashObject.self === object)
114
+ return hashObject;
115
+ if ($isExtensible(object)) {
116
+ hashObjectProperties.hash.value = hashCounter++;
117
+ hashObjectProperties.self.value = object;
118
+ hashPropertyDescriptor.value = $create(null, hashObjectProperties);
119
+ $defineProperty(object, hashProperty, hashPropertyDescriptor);
120
+ return hashPropertyDescriptor.value;
121
+ }
122
+ return undefined;
123
+ }
124
+ function freeze(object) {
125
+ getOwnHashObject(object);
126
+ return $freeze.apply(this, arguments);
127
+ }
128
+ function preventExtensions(object) {
129
+ getOwnHashObject(object);
130
+ return $preventExtensions.apply(this, arguments);
131
+ }
132
+ function seal(object) {
133
+ getOwnHashObject(object);
134
+ return $seal.apply(this, arguments);
135
+ }
136
+ freeze(SymbolValue.prototype);
137
+ function isSymbolString(s) {
138
+ return symbolValues[s] || privateNames[s];
139
+ }
140
+ function toProperty(name) {
141
+ if (isShimSymbol(name))
142
+ return name[symbolInternalProperty];
143
+ return name;
144
+ }
145
+ function removeSymbolKeys(array) {
146
+ var rv = [];
147
+ for (var i = 0; i < array.length; i++) {
148
+ if (!isSymbolString(array[i])) {
149
+ rv.push(array[i]);
150
+ }
151
+ }
152
+ return rv;
153
+ }
154
+ function getOwnPropertyNames(object) {
155
+ return removeSymbolKeys($getOwnPropertyNames(object));
156
+ }
157
+ function keys(object) {
158
+ return removeSymbolKeys($keys(object));
159
+ }
160
+ function getOwnPropertySymbols(object) {
161
+ var rv = [];
162
+ var names = $getOwnPropertyNames(object);
163
+ for (var i = 0; i < names.length; i++) {
164
+ var symbol = symbolValues[names[i]];
165
+ if (symbol) {
166
+ rv.push(symbol);
167
+ }
168
+ }
169
+ return rv;
170
+ }
171
+ function getOwnPropertyDescriptor(object, name) {
172
+ return $getOwnPropertyDescriptor(object, toProperty(name));
173
+ }
174
+ function hasOwnProperty(name) {
175
+ return $hasOwnProperty.call(this, toProperty(name));
176
+ }
177
+ function getOption(name) {
178
+ return global.traceur && global.traceur.options[name];
179
+ }
180
+ function defineProperty(object, name, descriptor) {
181
+ if (isShimSymbol(name)) {
182
+ name = name[symbolInternalProperty];
183
+ }
184
+ $defineProperty(object, name, descriptor);
185
+ return object;
186
+ }
187
+ function polyfillObject(Object) {
188
+ $defineProperty(Object, 'defineProperty', {value: defineProperty});
189
+ $defineProperty(Object, 'getOwnPropertyNames', {value: getOwnPropertyNames});
190
+ $defineProperty(Object, 'getOwnPropertyDescriptor', {value: getOwnPropertyDescriptor});
191
+ $defineProperty(Object.prototype, 'hasOwnProperty', {value: hasOwnProperty});
192
+ $defineProperty(Object, 'freeze', {value: freeze});
193
+ $defineProperty(Object, 'preventExtensions', {value: preventExtensions});
194
+ $defineProperty(Object, 'seal', {value: seal});
195
+ $defineProperty(Object, 'keys', {value: keys});
196
+ }
197
+ function exportStar(object) {
198
+ for (var i = 1; i < arguments.length; i++) {
199
+ var names = $getOwnPropertyNames(arguments[i]);
200
+ for (var j = 0; j < names.length; j++) {
201
+ var name = names[j];
202
+ if (isSymbolString(name))
203
+ continue;
204
+ (function(mod, name) {
205
+ $defineProperty(object, name, {
206
+ get: function() {
207
+ return mod[name];
208
+ },
209
+ enumerable: true
210
+ });
211
+ })(arguments[i], names[j]);
212
+ }
213
+ }
214
+ return object;
215
+ }
216
+ function isObject(x) {
217
+ return x != null && (typeof x === 'object' || typeof x === 'function');
218
+ }
219
+ function toObject(x) {
220
+ if (x == null)
221
+ throw $TypeError();
222
+ return $Object(x);
223
+ }
224
+ function checkObjectCoercible(argument) {
225
+ if (argument == null) {
226
+ throw new TypeError('Value cannot be converted to an Object');
227
+ }
228
+ return argument;
229
+ }
230
+ function polyfillSymbol(global, Symbol) {
231
+ if (!global.Symbol) {
232
+ global.Symbol = Symbol;
233
+ Object.getOwnPropertySymbols = getOwnPropertySymbols;
234
+ }
235
+ if (!global.Symbol.iterator) {
236
+ global.Symbol.iterator = Symbol('Symbol.iterator');
237
+ }
238
+ }
239
+ function setupGlobals(global) {
240
+ polyfillSymbol(global, Symbol);
241
+ global.Reflect = global.Reflect || {};
242
+ global.Reflect.global = global.Reflect.global || global;
243
+ polyfillObject(global.Object);
244
+ }
245
+ setupGlobals(global);
246
+ global.$traceurRuntime = {
247
+ checkObjectCoercible: checkObjectCoercible,
248
+ createPrivateName: createPrivateName,
249
+ defineProperties: $defineProperties,
250
+ defineProperty: $defineProperty,
251
+ exportStar: exportStar,
252
+ getOwnHashObject: getOwnHashObject,
253
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
254
+ getOwnPropertyNames: $getOwnPropertyNames,
255
+ isObject: isObject,
256
+ isPrivateName: isPrivateName,
257
+ isSymbolString: isSymbolString,
258
+ keys: $keys,
259
+ setupGlobals: setupGlobals,
260
+ toObject: toObject,
261
+ toProperty: toProperty,
262
+ type: types,
263
+ typeof: typeOf
264
+ };
265
+ })(typeof global !== 'undefined' ? global : this);
266
+ (function() {
267
+ 'use strict';
268
+ function spread() {
269
+ var rv = [],
270
+ j = 0,
271
+ iterResult;
272
+ for (var i = 0; i < arguments.length; i++) {
273
+ var valueToSpread = $traceurRuntime.checkObjectCoercible(arguments[i]);
274
+ if (typeof valueToSpread[$traceurRuntime.toProperty(Symbol.iterator)] !== 'function') {
275
+ throw new TypeError('Cannot spread non-iterable object.');
276
+ }
277
+ var iter = valueToSpread[$traceurRuntime.toProperty(Symbol.iterator)]();
278
+ while (!(iterResult = iter.next()).done) {
279
+ rv[j++] = iterResult.value;
280
+ }
281
+ }
282
+ return rv;
283
+ }
284
+ $traceurRuntime.spread = spread;
285
+ })();
286
+ (function() {
287
+ 'use strict';
288
+ var $Object = Object;
289
+ var $TypeError = TypeError;
290
+ var $create = $Object.create;
291
+ var $defineProperties = $traceurRuntime.defineProperties;
292
+ var $defineProperty = $traceurRuntime.defineProperty;
293
+ var $getOwnPropertyDescriptor = $traceurRuntime.getOwnPropertyDescriptor;
294
+ var $getOwnPropertyNames = $traceurRuntime.getOwnPropertyNames;
295
+ var $getPrototypeOf = Object.getPrototypeOf;
296
+ var $__0 = Object,
297
+ getOwnPropertyNames = $__0.getOwnPropertyNames,
298
+ getOwnPropertySymbols = $__0.getOwnPropertySymbols;
299
+ function superDescriptor(homeObject, name) {
300
+ var proto = $getPrototypeOf(homeObject);
301
+ do {
302
+ var result = $getOwnPropertyDescriptor(proto, name);
303
+ if (result)
304
+ return result;
305
+ proto = $getPrototypeOf(proto);
306
+ } while (proto);
307
+ return undefined;
308
+ }
309
+ function superCall(self, homeObject, name, args) {
310
+ return superGet(self, homeObject, name).apply(self, args);
311
+ }
312
+ function superGet(self, homeObject, name) {
313
+ var descriptor = superDescriptor(homeObject, name);
314
+ if (descriptor) {
315
+ if (!descriptor.get)
316
+ return descriptor.value;
317
+ return descriptor.get.call(self);
318
+ }
319
+ return undefined;
320
+ }
321
+ function superSet(self, homeObject, name, value) {
322
+ var descriptor = superDescriptor(homeObject, name);
323
+ if (descriptor && descriptor.set) {
324
+ descriptor.set.call(self, value);
325
+ return value;
326
+ }
327
+ throw $TypeError(("super has no setter '" + name + "'."));
328
+ }
329
+ function getDescriptors(object) {
330
+ var descriptors = {};
331
+ var names = getOwnPropertyNames(object);
332
+ for (var i = 0; i < names.length; i++) {
333
+ var name = names[i];
334
+ descriptors[name] = $getOwnPropertyDescriptor(object, name);
335
+ }
336
+ var symbols = getOwnPropertySymbols(object);
337
+ for (var i = 0; i < symbols.length; i++) {
338
+ var symbol = symbols[i];
339
+ descriptors[$traceurRuntime.toProperty(symbol)] = $getOwnPropertyDescriptor(object, $traceurRuntime.toProperty(symbol));
340
+ }
341
+ return descriptors;
342
+ }
343
+ function createClass(ctor, object, staticObject, superClass) {
344
+ $defineProperty(object, 'constructor', {
345
+ value: ctor,
346
+ configurable: true,
347
+ enumerable: false,
348
+ writable: true
349
+ });
350
+ if (arguments.length > 3) {
351
+ if (typeof superClass === 'function')
352
+ ctor.__proto__ = superClass;
353
+ ctor.prototype = $create(getProtoParent(superClass), getDescriptors(object));
354
+ } else {
355
+ ctor.prototype = object;
356
+ }
357
+ $defineProperty(ctor, 'prototype', {
358
+ configurable: false,
359
+ writable: false
360
+ });
361
+ return $defineProperties(ctor, getDescriptors(staticObject));
362
+ }
363
+ function getProtoParent(superClass) {
364
+ if (typeof superClass === 'function') {
365
+ var prototype = superClass.prototype;
366
+ if ($Object(prototype) === prototype || prototype === null)
367
+ return superClass.prototype;
368
+ throw new $TypeError('super prototype must be an Object or null');
369
+ }
370
+ if (superClass === null)
371
+ return null;
372
+ throw new $TypeError(("Super expression must either be null or a function, not " + typeof superClass + "."));
373
+ }
374
+ function defaultSuperCall(self, homeObject, args) {
375
+ if ($getPrototypeOf(homeObject) !== null)
376
+ superCall(self, homeObject, 'constructor', args);
377
+ }
378
+ $traceurRuntime.createClass = createClass;
379
+ $traceurRuntime.defaultSuperCall = defaultSuperCall;
380
+ $traceurRuntime.superCall = superCall;
381
+ $traceurRuntime.superGet = superGet;
382
+ $traceurRuntime.superSet = superSet;
383
+ })();
384
+ (function() {
385
+ 'use strict';
386
+ var createPrivateName = $traceurRuntime.createPrivateName;
387
+ var $defineProperties = $traceurRuntime.defineProperties;
388
+ var $defineProperty = $traceurRuntime.defineProperty;
389
+ var $create = Object.create;
390
+ var $TypeError = TypeError;
391
+ function nonEnum(value) {
392
+ return {
393
+ configurable: true,
394
+ enumerable: false,
395
+ value: value,
396
+ writable: true
397
+ };
398
+ }
399
+ var ST_NEWBORN = 0;
400
+ var ST_EXECUTING = 1;
401
+ var ST_SUSPENDED = 2;
402
+ var ST_CLOSED = 3;
403
+ var END_STATE = -2;
404
+ var RETHROW_STATE = -3;
405
+ function getInternalError(state) {
406
+ return new Error('Traceur compiler bug: invalid state in state machine: ' + state);
407
+ }
408
+ function GeneratorContext() {
409
+ this.state = 0;
410
+ this.GState = ST_NEWBORN;
411
+ this.storedException = undefined;
412
+ this.finallyFallThrough = undefined;
413
+ this.sent_ = undefined;
414
+ this.returnValue = undefined;
415
+ this.tryStack_ = [];
416
+ }
417
+ GeneratorContext.prototype = {
418
+ pushTry: function(catchState, finallyState) {
419
+ if (finallyState !== null) {
420
+ var finallyFallThrough = null;
421
+ for (var i = this.tryStack_.length - 1; i >= 0; i--) {
422
+ if (this.tryStack_[i].catch !== undefined) {
423
+ finallyFallThrough = this.tryStack_[i].catch;
424
+ break;
425
+ }
426
+ }
427
+ if (finallyFallThrough === null)
428
+ finallyFallThrough = RETHROW_STATE;
429
+ this.tryStack_.push({
430
+ finally: finallyState,
431
+ finallyFallThrough: finallyFallThrough
432
+ });
433
+ }
434
+ if (catchState !== null) {
435
+ this.tryStack_.push({catch: catchState});
436
+ }
437
+ },
438
+ popTry: function() {
439
+ this.tryStack_.pop();
440
+ },
441
+ get sent() {
442
+ this.maybeThrow();
443
+ return this.sent_;
444
+ },
445
+ set sent(v) {
446
+ this.sent_ = v;
447
+ },
448
+ get sentIgnoreThrow() {
449
+ return this.sent_;
450
+ },
451
+ maybeThrow: function() {
452
+ if (this.action === 'throw') {
453
+ this.action = 'next';
454
+ throw this.sent_;
455
+ }
456
+ },
457
+ end: function() {
458
+ switch (this.state) {
459
+ case END_STATE:
460
+ return this;
461
+ case RETHROW_STATE:
462
+ throw this.storedException;
463
+ default:
464
+ throw getInternalError(this.state);
465
+ }
466
+ },
467
+ handleException: function(ex) {
468
+ this.GState = ST_CLOSED;
469
+ this.state = END_STATE;
470
+ throw ex;
471
+ }
472
+ };
473
+ function nextOrThrow(ctx, moveNext, action, x) {
474
+ switch (ctx.GState) {
475
+ case ST_EXECUTING:
476
+ throw new Error(("\"" + action + "\" on executing generator"));
477
+ case ST_CLOSED:
478
+ if (action == 'next') {
479
+ return {
480
+ value: undefined,
481
+ done: true
482
+ };
483
+ }
484
+ throw x;
485
+ case ST_NEWBORN:
486
+ if (action === 'throw') {
487
+ ctx.GState = ST_CLOSED;
488
+ throw x;
489
+ }
490
+ if (x !== undefined)
491
+ throw $TypeError('Sent value to newborn generator');
492
+ case ST_SUSPENDED:
493
+ ctx.GState = ST_EXECUTING;
494
+ ctx.action = action;
495
+ ctx.sent = x;
496
+ var value = moveNext(ctx);
497
+ var done = value === ctx;
498
+ if (done)
499
+ value = ctx.returnValue;
500
+ ctx.GState = done ? ST_CLOSED : ST_SUSPENDED;
501
+ return {
502
+ value: value,
503
+ done: done
504
+ };
505
+ }
506
+ }
507
+ var ctxName = createPrivateName();
508
+ var moveNextName = createPrivateName();
509
+ function GeneratorFunction() {}
510
+ function GeneratorFunctionPrototype() {}
511
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
512
+ $defineProperty(GeneratorFunctionPrototype, 'constructor', nonEnum(GeneratorFunction));
513
+ GeneratorFunctionPrototype.prototype = {
514
+ constructor: GeneratorFunctionPrototype,
515
+ next: function(v) {
516
+ return nextOrThrow(this[ctxName], this[moveNextName], 'next', v);
517
+ },
518
+ throw: function(v) {
519
+ return nextOrThrow(this[ctxName], this[moveNextName], 'throw', v);
520
+ }
521
+ };
522
+ $defineProperties(GeneratorFunctionPrototype.prototype, {
523
+ constructor: {enumerable: false},
524
+ next: {enumerable: false},
525
+ throw: {enumerable: false}
526
+ });
527
+ Object.defineProperty(GeneratorFunctionPrototype.prototype, Symbol.iterator, nonEnum(function() {
528
+ return this;
529
+ }));
530
+ function createGeneratorInstance(innerFunction, functionObject, self) {
531
+ var moveNext = getMoveNext(innerFunction, self);
532
+ var ctx = new GeneratorContext();
533
+ var object = $create(functionObject.prototype);
534
+ object[ctxName] = ctx;
535
+ object[moveNextName] = moveNext;
536
+ return object;
537
+ }
538
+ function initGeneratorFunction(functionObject) {
539
+ functionObject.prototype = $create(GeneratorFunctionPrototype.prototype);
540
+ functionObject.__proto__ = GeneratorFunctionPrototype;
541
+ return functionObject;
542
+ }
543
+ function AsyncFunctionContext() {
544
+ GeneratorContext.call(this);
545
+ this.err = undefined;
546
+ var ctx = this;
547
+ ctx.result = new Promise(function(resolve, reject) {
548
+ ctx.resolve = resolve;
549
+ ctx.reject = reject;
550
+ });
551
+ }
552
+ AsyncFunctionContext.prototype = $create(GeneratorContext.prototype);
553
+ AsyncFunctionContext.prototype.end = function() {
554
+ switch (this.state) {
555
+ case END_STATE:
556
+ this.resolve(this.returnValue);
557
+ break;
558
+ case RETHROW_STATE:
559
+ this.reject(this.storedException);
560
+ break;
561
+ default:
562
+ this.reject(getInternalError(this.state));
563
+ }
564
+ };
565
+ AsyncFunctionContext.prototype.handleException = function() {
566
+ this.state = RETHROW_STATE;
567
+ };
568
+ function asyncWrap(innerFunction, self) {
569
+ var moveNext = getMoveNext(innerFunction, self);
570
+ var ctx = new AsyncFunctionContext();
571
+ ctx.createCallback = function(newState) {
572
+ return function(value) {
573
+ ctx.state = newState;
574
+ ctx.value = value;
575
+ moveNext(ctx);
576
+ };
577
+ };
578
+ ctx.errback = function(err) {
579
+ handleCatch(ctx, err);
580
+ moveNext(ctx);
581
+ };
582
+ moveNext(ctx);
583
+ return ctx.result;
584
+ }
585
+ function getMoveNext(innerFunction, self) {
586
+ return function(ctx) {
587
+ while (true) {
588
+ try {
589
+ return innerFunction.call(self, ctx);
590
+ } catch (ex) {
591
+ handleCatch(ctx, ex);
592
+ }
593
+ }
594
+ };
595
+ }
596
+ function handleCatch(ctx, ex) {
597
+ ctx.storedException = ex;
598
+ var last = ctx.tryStack_[ctx.tryStack_.length - 1];
599
+ if (!last) {
600
+ ctx.handleException(ex);
601
+ return;
602
+ }
603
+ ctx.state = last.catch !== undefined ? last.catch : last.finally;
604
+ if (last.finallyFallThrough !== undefined)
605
+ ctx.finallyFallThrough = last.finallyFallThrough;
606
+ }
607
+ $traceurRuntime.asyncWrap = asyncWrap;
608
+ $traceurRuntime.initGeneratorFunction = initGeneratorFunction;
609
+ $traceurRuntime.createGeneratorInstance = createGeneratorInstance;
610
+ })();
611
+ (function() {
612
+ function buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
613
+ var out = [];
614
+ if (opt_scheme) {
615
+ out.push(opt_scheme, ':');
616
+ }
617
+ if (opt_domain) {
618
+ out.push('//');
619
+ if (opt_userInfo) {
620
+ out.push(opt_userInfo, '@');
621
+ }
622
+ out.push(opt_domain);
623
+ if (opt_port) {
624
+ out.push(':', opt_port);
625
+ }
626
+ }
627
+ if (opt_path) {
628
+ out.push(opt_path);
629
+ }
630
+ if (opt_queryData) {
631
+ out.push('?', opt_queryData);
632
+ }
633
+ if (opt_fragment) {
634
+ out.push('#', opt_fragment);
635
+ }
636
+ return out.join('');
637
+ }
638
+ ;
639
+ var splitRe = new RegExp('^' + '(?:' + '([^:/?#.]+)' + ':)?' + '(?://' + '(?:([^/?#]*)@)?' + '([\\w\\d\\-\\u0100-\\uffff.%]*)' + '(?::([0-9]+))?' + ')?' + '([^?#]+)?' + '(?:\\?([^#]*))?' + '(?:#(.*))?' + '$');
640
+ var ComponentIndex = {
641
+ SCHEME: 1,
642
+ USER_INFO: 2,
643
+ DOMAIN: 3,
644
+ PORT: 4,
645
+ PATH: 5,
646
+ QUERY_DATA: 6,
647
+ FRAGMENT: 7
648
+ };
649
+ function split(uri) {
650
+ return (uri.match(splitRe));
651
+ }
652
+ function removeDotSegments(path) {
653
+ if (path === '/')
654
+ return '/';
655
+ var leadingSlash = path[0] === '/' ? '/' : '';
656
+ var trailingSlash = path.slice(-1) === '/' ? '/' : '';
657
+ var segments = path.split('/');
658
+ var out = [];
659
+ var up = 0;
660
+ for (var pos = 0; pos < segments.length; pos++) {
661
+ var segment = segments[pos];
662
+ switch (segment) {
663
+ case '':
664
+ case '.':
665
+ break;
666
+ case '..':
667
+ if (out.length)
668
+ out.pop();
669
+ else
670
+ up++;
671
+ break;
672
+ default:
673
+ out.push(segment);
674
+ }
675
+ }
676
+ if (!leadingSlash) {
677
+ while (up-- > 0) {
678
+ out.unshift('..');
679
+ }
680
+ if (out.length === 0)
681
+ out.push('.');
682
+ }
683
+ return leadingSlash + out.join('/') + trailingSlash;
684
+ }
685
+ function joinAndCanonicalizePath(parts) {
686
+ var path = parts[ComponentIndex.PATH] || '';
687
+ path = removeDotSegments(path);
688
+ parts[ComponentIndex.PATH] = path;
689
+ return buildFromEncodedParts(parts[ComponentIndex.SCHEME], parts[ComponentIndex.USER_INFO], parts[ComponentIndex.DOMAIN], parts[ComponentIndex.PORT], parts[ComponentIndex.PATH], parts[ComponentIndex.QUERY_DATA], parts[ComponentIndex.FRAGMENT]);
690
+ }
691
+ function canonicalizeUrl(url) {
692
+ var parts = split(url);
693
+ return joinAndCanonicalizePath(parts);
694
+ }
695
+ function resolveUrl(base, url) {
696
+ var parts = split(url);
697
+ var baseParts = split(base);
698
+ if (parts[ComponentIndex.SCHEME]) {
699
+ return joinAndCanonicalizePath(parts);
700
+ } else {
701
+ parts[ComponentIndex.SCHEME] = baseParts[ComponentIndex.SCHEME];
702
+ }
703
+ for (var i = ComponentIndex.SCHEME; i <= ComponentIndex.PORT; i++) {
704
+ if (!parts[i]) {
705
+ parts[i] = baseParts[i];
706
+ }
707
+ }
708
+ if (parts[ComponentIndex.PATH][0] == '/') {
709
+ return joinAndCanonicalizePath(parts);
710
+ }
711
+ var path = baseParts[ComponentIndex.PATH];
712
+ var index = path.lastIndexOf('/');
713
+ path = path.slice(0, index + 1) + parts[ComponentIndex.PATH];
714
+ parts[ComponentIndex.PATH] = path;
715
+ return joinAndCanonicalizePath(parts);
716
+ }
717
+ function isAbsolute(name) {
718
+ if (!name)
719
+ return false;
720
+ if (name[0] === '/')
721
+ return true;
722
+ var parts = split(name);
723
+ if (parts[ComponentIndex.SCHEME])
724
+ return true;
725
+ return false;
726
+ }
727
+ $traceurRuntime.canonicalizeUrl = canonicalizeUrl;
728
+ $traceurRuntime.isAbsolute = isAbsolute;
729
+ $traceurRuntime.removeDotSegments = removeDotSegments;
730
+ $traceurRuntime.resolveUrl = resolveUrl;
731
+ })();
732
+ (function(global) {
733
+ 'use strict';
734
+ var $__2 = $traceurRuntime,
735
+ canonicalizeUrl = $__2.canonicalizeUrl,
736
+ resolveUrl = $__2.resolveUrl,
737
+ isAbsolute = $__2.isAbsolute;
738
+ var moduleInstantiators = Object.create(null);
739
+ var baseURL;
740
+ if (global.location && global.location.href)
741
+ baseURL = resolveUrl(global.location.href, './');
742
+ else
743
+ baseURL = '';
744
+ var UncoatedModuleEntry = function UncoatedModuleEntry(url, uncoatedModule) {
745
+ this.url = url;
746
+ this.value_ = uncoatedModule;
747
+ };
748
+ ($traceurRuntime.createClass)(UncoatedModuleEntry, {}, {});
749
+ var ModuleEvaluationError = function ModuleEvaluationError(erroneousModuleName, cause) {
750
+ this.message = this.constructor.name + ': ' + this.stripCause(cause) + ' in ' + erroneousModuleName;
751
+ if (!(cause instanceof $ModuleEvaluationError) && cause.stack)
752
+ this.stack = this.stripStack(cause.stack);
753
+ else
754
+ this.stack = '';
755
+ };
756
+ var $ModuleEvaluationError = ModuleEvaluationError;
757
+ ($traceurRuntime.createClass)(ModuleEvaluationError, {
758
+ stripError: function(message) {
759
+ return message.replace(/.*Error:/, this.constructor.name + ':');
760
+ },
761
+ stripCause: function(cause) {
762
+ if (!cause)
763
+ return '';
764
+ if (!cause.message)
765
+ return cause + '';
766
+ return this.stripError(cause.message);
767
+ },
768
+ loadedBy: function(moduleName) {
769
+ this.stack += '\n loaded by ' + moduleName;
770
+ },
771
+ stripStack: function(causeStack) {
772
+ var stack = [];
773
+ causeStack.split('\n').some((function(frame) {
774
+ if (/UncoatedModuleInstantiator/.test(frame))
775
+ return true;
776
+ stack.push(frame);
777
+ }));
778
+ stack[0] = this.stripError(stack[0]);
779
+ return stack.join('\n');
780
+ }
781
+ }, {}, Error);
782
+ var UncoatedModuleInstantiator = function UncoatedModuleInstantiator(url, func) {
783
+ $traceurRuntime.superCall(this, $UncoatedModuleInstantiator.prototype, "constructor", [url, null]);
784
+ this.func = func;
785
+ };
786
+ var $UncoatedModuleInstantiator = UncoatedModuleInstantiator;
787
+ ($traceurRuntime.createClass)(UncoatedModuleInstantiator, {getUncoatedModule: function() {
788
+ if (this.value_)
789
+ return this.value_;
790
+ try {
791
+ return this.value_ = this.func.call(global);
792
+ } catch (ex) {
793
+ if (ex instanceof ModuleEvaluationError) {
794
+ ex.loadedBy(this.url);
795
+ throw ex;
796
+ }
797
+ throw new ModuleEvaluationError(this.url, ex);
798
+ }
799
+ }}, {}, UncoatedModuleEntry);
800
+ function getUncoatedModuleInstantiator(name) {
801
+ if (!name)
802
+ return;
803
+ var url = ModuleStore.normalize(name);
804
+ return moduleInstantiators[url];
805
+ }
806
+ ;
807
+ var moduleInstances = Object.create(null);
808
+ var liveModuleSentinel = {};
809
+ function Module(uncoatedModule) {
810
+ var isLive = arguments[1];
811
+ var coatedModule = Object.create(null);
812
+ Object.getOwnPropertyNames(uncoatedModule).forEach((function(name) {
813
+ var getter,
814
+ value;
815
+ if (isLive === liveModuleSentinel) {
816
+ var descr = Object.getOwnPropertyDescriptor(uncoatedModule, name);
817
+ if (descr.get)
818
+ getter = descr.get;
819
+ }
820
+ if (!getter) {
821
+ value = uncoatedModule[name];
822
+ getter = function() {
823
+ return value;
824
+ };
825
+ }
826
+ Object.defineProperty(coatedModule, name, {
827
+ get: getter,
828
+ enumerable: true
829
+ });
830
+ }));
831
+ Object.preventExtensions(coatedModule);
832
+ return coatedModule;
833
+ }
834
+ var ModuleStore = {
835
+ normalize: function(name, refererName, refererAddress) {
836
+ if (typeof name !== "string")
837
+ throw new TypeError("module name must be a string, not " + typeof name);
838
+ if (isAbsolute(name))
839
+ return canonicalizeUrl(name);
840
+ if (/[^\.]\/\.\.\//.test(name)) {
841
+ throw new Error('module name embeds /../: ' + name);
842
+ }
843
+ if (name[0] === '.' && refererName)
844
+ return resolveUrl(refererName, name);
845
+ return canonicalizeUrl(name);
846
+ },
847
+ get: function(normalizedName) {
848
+ var m = getUncoatedModuleInstantiator(normalizedName);
849
+ if (!m)
850
+ return undefined;
851
+ var moduleInstance = moduleInstances[m.url];
852
+ if (moduleInstance)
853
+ return moduleInstance;
854
+ moduleInstance = Module(m.getUncoatedModule(), liveModuleSentinel);
855
+ return moduleInstances[m.url] = moduleInstance;
856
+ },
857
+ set: function(normalizedName, module) {
858
+ normalizedName = String(normalizedName);
859
+ moduleInstantiators[normalizedName] = new UncoatedModuleInstantiator(normalizedName, (function() {
860
+ return module;
861
+ }));
862
+ moduleInstances[normalizedName] = module;
863
+ },
864
+ get baseURL() {
865
+ return baseURL;
866
+ },
867
+ set baseURL(v) {
868
+ baseURL = String(v);
869
+ },
870
+ registerModule: function(name, func) {
871
+ var normalizedName = ModuleStore.normalize(name);
872
+ if (moduleInstantiators[normalizedName])
873
+ throw new Error('duplicate module named ' + normalizedName);
874
+ moduleInstantiators[normalizedName] = new UncoatedModuleInstantiator(normalizedName, func);
875
+ },
876
+ bundleStore: Object.create(null),
877
+ register: function(name, deps, func) {
878
+ if (!deps || !deps.length && !func.length) {
879
+ this.registerModule(name, func);
880
+ } else {
881
+ this.bundleStore[name] = {
882
+ deps: deps,
883
+ execute: function() {
884
+ var $__0 = arguments;
885
+ var depMap = {};
886
+ deps.forEach((function(dep, index) {
887
+ return depMap[dep] = $__0[index];
888
+ }));
889
+ var registryEntry = func.call(this, depMap);
890
+ registryEntry.execute.call(this);
891
+ return registryEntry.exports;
892
+ }
893
+ };
894
+ }
895
+ },
896
+ getAnonymousModule: function(func) {
897
+ return new Module(func.call(global), liveModuleSentinel);
898
+ },
899
+ getForTesting: function(name) {
900
+ var $__0 = this;
901
+ if (!this.testingPrefix_) {
902
+ Object.keys(moduleInstances).some((function(key) {
903
+ var m = /(traceur@[^\/]*\/)/.exec(key);
904
+ if (m) {
905
+ $__0.testingPrefix_ = m[1];
906
+ return true;
907
+ }
908
+ }));
909
+ }
910
+ return this.get(this.testingPrefix_ + name);
911
+ }
912
+ };
913
+ ModuleStore.set('@traceur/src/runtime/ModuleStore', new Module({ModuleStore: ModuleStore}));
914
+ var setupGlobals = $traceurRuntime.setupGlobals;
915
+ $traceurRuntime.setupGlobals = function(global) {
916
+ setupGlobals(global);
917
+ };
918
+ $traceurRuntime.ModuleStore = ModuleStore;
919
+ global.System = {
920
+ register: ModuleStore.register.bind(ModuleStore),
921
+ get: ModuleStore.get,
922
+ set: ModuleStore.set,
923
+ normalize: ModuleStore.normalize
924
+ };
925
+ $traceurRuntime.getModuleImpl = function(name) {
926
+ var instantiator = getUncoatedModuleInstantiator(name);
927
+ return instantiator && instantiator.getUncoatedModule();
928
+ };
929
+ })(typeof global !== 'undefined' ? global : this);
930
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/utils", [], function() {
931
+ "use strict";
932
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/utils";
933
+ var $ceil = Math.ceil;
934
+ var $floor = Math.floor;
935
+ var $isFinite = isFinite;
936
+ var $isNaN = isNaN;
937
+ var $pow = Math.pow;
938
+ var $min = Math.min;
939
+ var toObject = $traceurRuntime.toObject;
940
+ function toUint32(x) {
941
+ return x >>> 0;
942
+ }
943
+ function isObject(x) {
944
+ return x && (typeof x === 'object' || typeof x === 'function');
945
+ }
946
+ function isCallable(x) {
947
+ return typeof x === 'function';
948
+ }
949
+ function isNumber(x) {
950
+ return typeof x === 'number';
951
+ }
952
+ function toInteger(x) {
953
+ x = +x;
954
+ if ($isNaN(x))
955
+ return 0;
956
+ if (x === 0 || !$isFinite(x))
957
+ return x;
958
+ return x > 0 ? $floor(x) : $ceil(x);
959
+ }
960
+ var MAX_SAFE_LENGTH = $pow(2, 53) - 1;
961
+ function toLength(x) {
962
+ var len = toInteger(x);
963
+ return len < 0 ? 0 : $min(len, MAX_SAFE_LENGTH);
964
+ }
965
+ function checkIterable(x) {
966
+ return !isObject(x) ? undefined : x[Symbol.iterator];
967
+ }
968
+ function isConstructor(x) {
969
+ return isCallable(x);
970
+ }
971
+ function createIteratorResultObject(value, done) {
972
+ return {
973
+ value: value,
974
+ done: done
975
+ };
976
+ }
977
+ function maybeDefine(object, name, descr) {
978
+ if (!(name in object)) {
979
+ Object.defineProperty(object, name, descr);
980
+ }
981
+ }
982
+ function maybeDefineMethod(object, name, value) {
983
+ maybeDefine(object, name, {
984
+ value: value,
985
+ configurable: true,
986
+ enumerable: false,
987
+ writable: true
988
+ });
989
+ }
990
+ function maybeDefineConst(object, name, value) {
991
+ maybeDefine(object, name, {
992
+ value: value,
993
+ configurable: false,
994
+ enumerable: false,
995
+ writable: false
996
+ });
997
+ }
998
+ function maybeAddFunctions(object, functions) {
999
+ for (var i = 0; i < functions.length; i += 2) {
1000
+ var name = functions[i];
1001
+ var value = functions[i + 1];
1002
+ maybeDefineMethod(object, name, value);
1003
+ }
1004
+ }
1005
+ function maybeAddConsts(object, consts) {
1006
+ for (var i = 0; i < consts.length; i += 2) {
1007
+ var name = consts[i];
1008
+ var value = consts[i + 1];
1009
+ maybeDefineConst(object, name, value);
1010
+ }
1011
+ }
1012
+ function maybeAddIterator(object, func, Symbol) {
1013
+ if (!Symbol || !Symbol.iterator || object[Symbol.iterator])
1014
+ return;
1015
+ if (object['@@iterator'])
1016
+ func = object['@@iterator'];
1017
+ Object.defineProperty(object, Symbol.iterator, {
1018
+ value: func,
1019
+ configurable: true,
1020
+ enumerable: false,
1021
+ writable: true
1022
+ });
1023
+ }
1024
+ var polyfills = [];
1025
+ function registerPolyfill(func) {
1026
+ polyfills.push(func);
1027
+ }
1028
+ function polyfillAll(global) {
1029
+ polyfills.forEach((function(f) {
1030
+ return f(global);
1031
+ }));
1032
+ }
1033
+ return {
1034
+ get toObject() {
1035
+ return toObject;
1036
+ },
1037
+ get toUint32() {
1038
+ return toUint32;
1039
+ },
1040
+ get isObject() {
1041
+ return isObject;
1042
+ },
1043
+ get isCallable() {
1044
+ return isCallable;
1045
+ },
1046
+ get isNumber() {
1047
+ return isNumber;
1048
+ },
1049
+ get toInteger() {
1050
+ return toInteger;
1051
+ },
1052
+ get toLength() {
1053
+ return toLength;
1054
+ },
1055
+ get checkIterable() {
1056
+ return checkIterable;
1057
+ },
1058
+ get isConstructor() {
1059
+ return isConstructor;
1060
+ },
1061
+ get createIteratorResultObject() {
1062
+ return createIteratorResultObject;
1063
+ },
1064
+ get maybeDefine() {
1065
+ return maybeDefine;
1066
+ },
1067
+ get maybeDefineMethod() {
1068
+ return maybeDefineMethod;
1069
+ },
1070
+ get maybeDefineConst() {
1071
+ return maybeDefineConst;
1072
+ },
1073
+ get maybeAddFunctions() {
1074
+ return maybeAddFunctions;
1075
+ },
1076
+ get maybeAddConsts() {
1077
+ return maybeAddConsts;
1078
+ },
1079
+ get maybeAddIterator() {
1080
+ return maybeAddIterator;
1081
+ },
1082
+ get registerPolyfill() {
1083
+ return registerPolyfill;
1084
+ },
1085
+ get polyfillAll() {
1086
+ return polyfillAll;
1087
+ }
1088
+ };
1089
+ });
1090
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Map", [], function() {
1091
+ "use strict";
1092
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Map";
1093
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
1094
+ isObject = $__0.isObject,
1095
+ maybeAddIterator = $__0.maybeAddIterator,
1096
+ registerPolyfill = $__0.registerPolyfill;
1097
+ var getOwnHashObject = $traceurRuntime.getOwnHashObject;
1098
+ var $hasOwnProperty = Object.prototype.hasOwnProperty;
1099
+ var deletedSentinel = {};
1100
+ function lookupIndex(map, key) {
1101
+ if (isObject(key)) {
1102
+ var hashObject = getOwnHashObject(key);
1103
+ return hashObject && map.objectIndex_[hashObject.hash];
1104
+ }
1105
+ if (typeof key === 'string')
1106
+ return map.stringIndex_[key];
1107
+ return map.primitiveIndex_[key];
1108
+ }
1109
+ function initMap(map) {
1110
+ map.entries_ = [];
1111
+ map.objectIndex_ = Object.create(null);
1112
+ map.stringIndex_ = Object.create(null);
1113
+ map.primitiveIndex_ = Object.create(null);
1114
+ map.deletedCount_ = 0;
1115
+ }
1116
+ var Map = function Map() {
1117
+ var iterable = arguments[0];
1118
+ if (!isObject(this))
1119
+ throw new TypeError('Map called on incompatible type');
1120
+ if ($hasOwnProperty.call(this, 'entries_')) {
1121
+ throw new TypeError('Map can not be reentrantly initialised');
1122
+ }
1123
+ initMap(this);
1124
+ if (iterable !== null && iterable !== undefined) {
1125
+ for (var $__2 = iterable[Symbol.iterator](),
1126
+ $__3; !($__3 = $__2.next()).done; ) {
1127
+ var $__4 = $__3.value,
1128
+ key = $__4[0],
1129
+ value = $__4[1];
1130
+ {
1131
+ this.set(key, value);
1132
+ }
1133
+ }
1134
+ }
1135
+ };
1136
+ ($traceurRuntime.createClass)(Map, {
1137
+ get size() {
1138
+ return this.entries_.length / 2 - this.deletedCount_;
1139
+ },
1140
+ get: function(key) {
1141
+ var index = lookupIndex(this, key);
1142
+ if (index !== undefined)
1143
+ return this.entries_[index + 1];
1144
+ },
1145
+ set: function(key, value) {
1146
+ var objectMode = isObject(key);
1147
+ var stringMode = typeof key === 'string';
1148
+ var index = lookupIndex(this, key);
1149
+ if (index !== undefined) {
1150
+ this.entries_[index + 1] = value;
1151
+ } else {
1152
+ index = this.entries_.length;
1153
+ this.entries_[index] = key;
1154
+ this.entries_[index + 1] = value;
1155
+ if (objectMode) {
1156
+ var hashObject = getOwnHashObject(key);
1157
+ var hash = hashObject.hash;
1158
+ this.objectIndex_[hash] = index;
1159
+ } else if (stringMode) {
1160
+ this.stringIndex_[key] = index;
1161
+ } else {
1162
+ this.primitiveIndex_[key] = index;
1163
+ }
1164
+ }
1165
+ return this;
1166
+ },
1167
+ has: function(key) {
1168
+ return lookupIndex(this, key) !== undefined;
1169
+ },
1170
+ delete: function(key) {
1171
+ var objectMode = isObject(key);
1172
+ var stringMode = typeof key === 'string';
1173
+ var index;
1174
+ var hash;
1175
+ if (objectMode) {
1176
+ var hashObject = getOwnHashObject(key);
1177
+ if (hashObject) {
1178
+ index = this.objectIndex_[hash = hashObject.hash];
1179
+ delete this.objectIndex_[hash];
1180
+ }
1181
+ } else if (stringMode) {
1182
+ index = this.stringIndex_[key];
1183
+ delete this.stringIndex_[key];
1184
+ } else {
1185
+ index = this.primitiveIndex_[key];
1186
+ delete this.primitiveIndex_[key];
1187
+ }
1188
+ if (index !== undefined) {
1189
+ this.entries_[index] = deletedSentinel;
1190
+ this.entries_[index + 1] = undefined;
1191
+ this.deletedCount_++;
1192
+ return true;
1193
+ }
1194
+ return false;
1195
+ },
1196
+ clear: function() {
1197
+ initMap(this);
1198
+ },
1199
+ forEach: function(callbackFn) {
1200
+ var thisArg = arguments[1];
1201
+ for (var i = 0; i < this.entries_.length; i += 2) {
1202
+ var key = this.entries_[i];
1203
+ var value = this.entries_[i + 1];
1204
+ if (key === deletedSentinel)
1205
+ continue;
1206
+ callbackFn.call(thisArg, value, key, this);
1207
+ }
1208
+ },
1209
+ entries: $traceurRuntime.initGeneratorFunction(function $__5() {
1210
+ var i,
1211
+ key,
1212
+ value;
1213
+ return $traceurRuntime.createGeneratorInstance(function($ctx) {
1214
+ while (true)
1215
+ switch ($ctx.state) {
1216
+ case 0:
1217
+ i = 0;
1218
+ $ctx.state = 12;
1219
+ break;
1220
+ case 12:
1221
+ $ctx.state = (i < this.entries_.length) ? 8 : -2;
1222
+ break;
1223
+ case 4:
1224
+ i += 2;
1225
+ $ctx.state = 12;
1226
+ break;
1227
+ case 8:
1228
+ key = this.entries_[i];
1229
+ value = this.entries_[i + 1];
1230
+ $ctx.state = 9;
1231
+ break;
1232
+ case 9:
1233
+ $ctx.state = (key === deletedSentinel) ? 4 : 6;
1234
+ break;
1235
+ case 6:
1236
+ $ctx.state = 2;
1237
+ return [key, value];
1238
+ case 2:
1239
+ $ctx.maybeThrow();
1240
+ $ctx.state = 4;
1241
+ break;
1242
+ default:
1243
+ return $ctx.end();
1244
+ }
1245
+ }, $__5, this);
1246
+ }),
1247
+ keys: $traceurRuntime.initGeneratorFunction(function $__6() {
1248
+ var i,
1249
+ key,
1250
+ value;
1251
+ return $traceurRuntime.createGeneratorInstance(function($ctx) {
1252
+ while (true)
1253
+ switch ($ctx.state) {
1254
+ case 0:
1255
+ i = 0;
1256
+ $ctx.state = 12;
1257
+ break;
1258
+ case 12:
1259
+ $ctx.state = (i < this.entries_.length) ? 8 : -2;
1260
+ break;
1261
+ case 4:
1262
+ i += 2;
1263
+ $ctx.state = 12;
1264
+ break;
1265
+ case 8:
1266
+ key = this.entries_[i];
1267
+ value = this.entries_[i + 1];
1268
+ $ctx.state = 9;
1269
+ break;
1270
+ case 9:
1271
+ $ctx.state = (key === deletedSentinel) ? 4 : 6;
1272
+ break;
1273
+ case 6:
1274
+ $ctx.state = 2;
1275
+ return key;
1276
+ case 2:
1277
+ $ctx.maybeThrow();
1278
+ $ctx.state = 4;
1279
+ break;
1280
+ default:
1281
+ return $ctx.end();
1282
+ }
1283
+ }, $__6, this);
1284
+ }),
1285
+ values: $traceurRuntime.initGeneratorFunction(function $__7() {
1286
+ var i,
1287
+ key,
1288
+ value;
1289
+ return $traceurRuntime.createGeneratorInstance(function($ctx) {
1290
+ while (true)
1291
+ switch ($ctx.state) {
1292
+ case 0:
1293
+ i = 0;
1294
+ $ctx.state = 12;
1295
+ break;
1296
+ case 12:
1297
+ $ctx.state = (i < this.entries_.length) ? 8 : -2;
1298
+ break;
1299
+ case 4:
1300
+ i += 2;
1301
+ $ctx.state = 12;
1302
+ break;
1303
+ case 8:
1304
+ key = this.entries_[i];
1305
+ value = this.entries_[i + 1];
1306
+ $ctx.state = 9;
1307
+ break;
1308
+ case 9:
1309
+ $ctx.state = (key === deletedSentinel) ? 4 : 6;
1310
+ break;
1311
+ case 6:
1312
+ $ctx.state = 2;
1313
+ return value;
1314
+ case 2:
1315
+ $ctx.maybeThrow();
1316
+ $ctx.state = 4;
1317
+ break;
1318
+ default:
1319
+ return $ctx.end();
1320
+ }
1321
+ }, $__7, this);
1322
+ })
1323
+ }, {});
1324
+ Object.defineProperty(Map.prototype, Symbol.iterator, {
1325
+ configurable: true,
1326
+ writable: true,
1327
+ value: Map.prototype.entries
1328
+ });
1329
+ function polyfillMap(global) {
1330
+ var $__4 = global,
1331
+ Object = $__4.Object,
1332
+ Symbol = $__4.Symbol;
1333
+ if (!global.Map)
1334
+ global.Map = Map;
1335
+ var mapPrototype = global.Map.prototype;
1336
+ if (mapPrototype.entries === undefined)
1337
+ global.Map = Map;
1338
+ if (mapPrototype.entries) {
1339
+ maybeAddIterator(mapPrototype, mapPrototype.entries, Symbol);
1340
+ maybeAddIterator(Object.getPrototypeOf(new global.Map().entries()), function() {
1341
+ return this;
1342
+ }, Symbol);
1343
+ }
1344
+ }
1345
+ registerPolyfill(polyfillMap);
1346
+ return {
1347
+ get Map() {
1348
+ return Map;
1349
+ },
1350
+ get polyfillMap() {
1351
+ return polyfillMap;
1352
+ }
1353
+ };
1354
+ });
1355
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Map" + '');
1356
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Set", [], function() {
1357
+ "use strict";
1358
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Set";
1359
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
1360
+ isObject = $__0.isObject,
1361
+ maybeAddIterator = $__0.maybeAddIterator,
1362
+ registerPolyfill = $__0.registerPolyfill;
1363
+ var Map = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Map").Map;
1364
+ var getOwnHashObject = $traceurRuntime.getOwnHashObject;
1365
+ var $hasOwnProperty = Object.prototype.hasOwnProperty;
1366
+ function initSet(set) {
1367
+ set.map_ = new Map();
1368
+ }
1369
+ var Set = function Set() {
1370
+ var iterable = arguments[0];
1371
+ if (!isObject(this))
1372
+ throw new TypeError('Set called on incompatible type');
1373
+ if ($hasOwnProperty.call(this, 'map_')) {
1374
+ throw new TypeError('Set can not be reentrantly initialised');
1375
+ }
1376
+ initSet(this);
1377
+ if (iterable !== null && iterable !== undefined) {
1378
+ for (var $__4 = iterable[Symbol.iterator](),
1379
+ $__5; !($__5 = $__4.next()).done; ) {
1380
+ var item = $__5.value;
1381
+ {
1382
+ this.add(item);
1383
+ }
1384
+ }
1385
+ }
1386
+ };
1387
+ ($traceurRuntime.createClass)(Set, {
1388
+ get size() {
1389
+ return this.map_.size;
1390
+ },
1391
+ has: function(key) {
1392
+ return this.map_.has(key);
1393
+ },
1394
+ add: function(key) {
1395
+ this.map_.set(key, key);
1396
+ return this;
1397
+ },
1398
+ delete: function(key) {
1399
+ return this.map_.delete(key);
1400
+ },
1401
+ clear: function() {
1402
+ return this.map_.clear();
1403
+ },
1404
+ forEach: function(callbackFn) {
1405
+ var thisArg = arguments[1];
1406
+ var $__2 = this;
1407
+ return this.map_.forEach((function(value, key) {
1408
+ callbackFn.call(thisArg, key, key, $__2);
1409
+ }));
1410
+ },
1411
+ values: $traceurRuntime.initGeneratorFunction(function $__7() {
1412
+ var $__8,
1413
+ $__9;
1414
+ return $traceurRuntime.createGeneratorInstance(function($ctx) {
1415
+ while (true)
1416
+ switch ($ctx.state) {
1417
+ case 0:
1418
+ $__8 = this.map_.keys()[Symbol.iterator]();
1419
+ $ctx.sent = void 0;
1420
+ $ctx.action = 'next';
1421
+ $ctx.state = 12;
1422
+ break;
1423
+ case 12:
1424
+ $__9 = $__8[$ctx.action]($ctx.sentIgnoreThrow);
1425
+ $ctx.state = 9;
1426
+ break;
1427
+ case 9:
1428
+ $ctx.state = ($__9.done) ? 3 : 2;
1429
+ break;
1430
+ case 3:
1431
+ $ctx.sent = $__9.value;
1432
+ $ctx.state = -2;
1433
+ break;
1434
+ case 2:
1435
+ $ctx.state = 12;
1436
+ return $__9.value;
1437
+ default:
1438
+ return $ctx.end();
1439
+ }
1440
+ }, $__7, this);
1441
+ }),
1442
+ entries: $traceurRuntime.initGeneratorFunction(function $__10() {
1443
+ var $__11,
1444
+ $__12;
1445
+ return $traceurRuntime.createGeneratorInstance(function($ctx) {
1446
+ while (true)
1447
+ switch ($ctx.state) {
1448
+ case 0:
1449
+ $__11 = this.map_.entries()[Symbol.iterator]();
1450
+ $ctx.sent = void 0;
1451
+ $ctx.action = 'next';
1452
+ $ctx.state = 12;
1453
+ break;
1454
+ case 12:
1455
+ $__12 = $__11[$ctx.action]($ctx.sentIgnoreThrow);
1456
+ $ctx.state = 9;
1457
+ break;
1458
+ case 9:
1459
+ $ctx.state = ($__12.done) ? 3 : 2;
1460
+ break;
1461
+ case 3:
1462
+ $ctx.sent = $__12.value;
1463
+ $ctx.state = -2;
1464
+ break;
1465
+ case 2:
1466
+ $ctx.state = 12;
1467
+ return $__12.value;
1468
+ default:
1469
+ return $ctx.end();
1470
+ }
1471
+ }, $__10, this);
1472
+ })
1473
+ }, {});
1474
+ Object.defineProperty(Set.prototype, Symbol.iterator, {
1475
+ configurable: true,
1476
+ writable: true,
1477
+ value: Set.prototype.values
1478
+ });
1479
+ Object.defineProperty(Set.prototype, 'keys', {
1480
+ configurable: true,
1481
+ writable: true,
1482
+ value: Set.prototype.values
1483
+ });
1484
+ function polyfillSet(global) {
1485
+ var $__6 = global,
1486
+ Object = $__6.Object,
1487
+ Symbol = $__6.Symbol;
1488
+ if (!global.Set)
1489
+ global.Set = Set;
1490
+ var setPrototype = global.Set.prototype;
1491
+ if (setPrototype.values) {
1492
+ maybeAddIterator(setPrototype, setPrototype.values, Symbol);
1493
+ maybeAddIterator(Object.getPrototypeOf(new global.Set().values()), function() {
1494
+ return this;
1495
+ }, Symbol);
1496
+ }
1497
+ }
1498
+ registerPolyfill(polyfillSet);
1499
+ return {
1500
+ get Set() {
1501
+ return Set;
1502
+ },
1503
+ get polyfillSet() {
1504
+ return polyfillSet;
1505
+ }
1506
+ };
1507
+ });
1508
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Set" + '');
1509
+ System.register("traceur-runtime@0.0.67/node_modules/rsvp/lib/rsvp/asap", [], function() {
1510
+ "use strict";
1511
+ var __moduleName = "traceur-runtime@0.0.67/node_modules/rsvp/lib/rsvp/asap";
1512
+ var len = 0;
1513
+ function asap(callback, arg) {
1514
+ queue[len] = callback;
1515
+ queue[len + 1] = arg;
1516
+ len += 2;
1517
+ if (len === 2) {
1518
+ scheduleFlush();
1519
+ }
1520
+ }
1521
+ var $__default = asap;
1522
+ var browserGlobal = (typeof window !== 'undefined') ? window : {};
1523
+ var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
1524
+ var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
1525
+ function useNextTick() {
1526
+ return function() {
1527
+ process.nextTick(flush);
1528
+ };
1529
+ }
1530
+ function useMutationObserver() {
1531
+ var iterations = 0;
1532
+ var observer = new BrowserMutationObserver(flush);
1533
+ var node = document.createTextNode('');
1534
+ observer.observe(node, {characterData: true});
1535
+ return function() {
1536
+ node.data = (iterations = ++iterations % 2);
1537
+ };
1538
+ }
1539
+ function useMessageChannel() {
1540
+ var channel = new MessageChannel();
1541
+ channel.port1.onmessage = flush;
1542
+ return function() {
1543
+ channel.port2.postMessage(0);
1544
+ };
1545
+ }
1546
+ function useSetTimeout() {
1547
+ return function() {
1548
+ setTimeout(flush, 1);
1549
+ };
1550
+ }
1551
+ var queue = new Array(1000);
1552
+ function flush() {
1553
+ for (var i = 0; i < len; i += 2) {
1554
+ var callback = queue[i];
1555
+ var arg = queue[i + 1];
1556
+ callback(arg);
1557
+ queue[i] = undefined;
1558
+ queue[i + 1] = undefined;
1559
+ }
1560
+ len = 0;
1561
+ }
1562
+ var scheduleFlush;
1563
+ if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
1564
+ scheduleFlush = useNextTick();
1565
+ } else if (BrowserMutationObserver) {
1566
+ scheduleFlush = useMutationObserver();
1567
+ } else if (isWorker) {
1568
+ scheduleFlush = useMessageChannel();
1569
+ } else {
1570
+ scheduleFlush = useSetTimeout();
1571
+ }
1572
+ return {get default() {
1573
+ return $__default;
1574
+ }};
1575
+ });
1576
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Promise", [], function() {
1577
+ "use strict";
1578
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Promise";
1579
+ var async = System.get("traceur-runtime@0.0.67/node_modules/rsvp/lib/rsvp/asap").default;
1580
+ var registerPolyfill = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils").registerPolyfill;
1581
+ var promiseRaw = {};
1582
+ function isPromise(x) {
1583
+ return x && typeof x === 'object' && x.status_ !== undefined;
1584
+ }
1585
+ function idResolveHandler(x) {
1586
+ return x;
1587
+ }
1588
+ function idRejectHandler(x) {
1589
+ throw x;
1590
+ }
1591
+ function chain(promise) {
1592
+ var onResolve = arguments[1] !== (void 0) ? arguments[1] : idResolveHandler;
1593
+ var onReject = arguments[2] !== (void 0) ? arguments[2] : idRejectHandler;
1594
+ var deferred = getDeferred(promise.constructor);
1595
+ switch (promise.status_) {
1596
+ case undefined:
1597
+ throw TypeError;
1598
+ case 0:
1599
+ promise.onResolve_.push(onResolve, deferred);
1600
+ promise.onReject_.push(onReject, deferred);
1601
+ break;
1602
+ case +1:
1603
+ promiseEnqueue(promise.value_, [onResolve, deferred]);
1604
+ break;
1605
+ case -1:
1606
+ promiseEnqueue(promise.value_, [onReject, deferred]);
1607
+ break;
1608
+ }
1609
+ return deferred.promise;
1610
+ }
1611
+ function getDeferred(C) {
1612
+ if (this === $Promise) {
1613
+ var promise = promiseInit(new $Promise(promiseRaw));
1614
+ return {
1615
+ promise: promise,
1616
+ resolve: (function(x) {
1617
+ promiseResolve(promise, x);
1618
+ }),
1619
+ reject: (function(r) {
1620
+ promiseReject(promise, r);
1621
+ })
1622
+ };
1623
+ } else {
1624
+ var result = {};
1625
+ result.promise = new C((function(resolve, reject) {
1626
+ result.resolve = resolve;
1627
+ result.reject = reject;
1628
+ }));
1629
+ return result;
1630
+ }
1631
+ }
1632
+ function promiseSet(promise, status, value, onResolve, onReject) {
1633
+ promise.status_ = status;
1634
+ promise.value_ = value;
1635
+ promise.onResolve_ = onResolve;
1636
+ promise.onReject_ = onReject;
1637
+ return promise;
1638
+ }
1639
+ function promiseInit(promise) {
1640
+ return promiseSet(promise, 0, undefined, [], []);
1641
+ }
1642
+ var Promise = function Promise(resolver) {
1643
+ if (resolver === promiseRaw)
1644
+ return;
1645
+ if (typeof resolver !== 'function')
1646
+ throw new TypeError;
1647
+ var promise = promiseInit(this);
1648
+ try {
1649
+ resolver((function(x) {
1650
+ promiseResolve(promise, x);
1651
+ }), (function(r) {
1652
+ promiseReject(promise, r);
1653
+ }));
1654
+ } catch (e) {
1655
+ promiseReject(promise, e);
1656
+ }
1657
+ };
1658
+ ($traceurRuntime.createClass)(Promise, {
1659
+ catch: function(onReject) {
1660
+ return this.then(undefined, onReject);
1661
+ },
1662
+ then: function(onResolve, onReject) {
1663
+ if (typeof onResolve !== 'function')
1664
+ onResolve = idResolveHandler;
1665
+ if (typeof onReject !== 'function')
1666
+ onReject = idRejectHandler;
1667
+ var that = this;
1668
+ var constructor = this.constructor;
1669
+ return chain(this, function(x) {
1670
+ x = promiseCoerce(constructor, x);
1671
+ return x === that ? onReject(new TypeError) : isPromise(x) ? x.then(onResolve, onReject) : onResolve(x);
1672
+ }, onReject);
1673
+ }
1674
+ }, {
1675
+ resolve: function(x) {
1676
+ if (this === $Promise) {
1677
+ if (isPromise(x)) {
1678
+ return x;
1679
+ }
1680
+ return promiseSet(new $Promise(promiseRaw), +1, x);
1681
+ } else {
1682
+ return new this(function(resolve, reject) {
1683
+ resolve(x);
1684
+ });
1685
+ }
1686
+ },
1687
+ reject: function(r) {
1688
+ if (this === $Promise) {
1689
+ return promiseSet(new $Promise(promiseRaw), -1, r);
1690
+ } else {
1691
+ return new this((function(resolve, reject) {
1692
+ reject(r);
1693
+ }));
1694
+ }
1695
+ },
1696
+ all: function(values) {
1697
+ var deferred = getDeferred(this);
1698
+ var resolutions = [];
1699
+ try {
1700
+ var count = values.length;
1701
+ if (count === 0) {
1702
+ deferred.resolve(resolutions);
1703
+ } else {
1704
+ for (var i = 0; i < values.length; i++) {
1705
+ this.resolve(values[i]).then(function(i, x) {
1706
+ resolutions[i] = x;
1707
+ if (--count === 0)
1708
+ deferred.resolve(resolutions);
1709
+ }.bind(undefined, i), (function(r) {
1710
+ deferred.reject(r);
1711
+ }));
1712
+ }
1713
+ }
1714
+ } catch (e) {
1715
+ deferred.reject(e);
1716
+ }
1717
+ return deferred.promise;
1718
+ },
1719
+ race: function(values) {
1720
+ var deferred = getDeferred(this);
1721
+ try {
1722
+ for (var i = 0; i < values.length; i++) {
1723
+ this.resolve(values[i]).then((function(x) {
1724
+ deferred.resolve(x);
1725
+ }), (function(r) {
1726
+ deferred.reject(r);
1727
+ }));
1728
+ }
1729
+ } catch (e) {
1730
+ deferred.reject(e);
1731
+ }
1732
+ return deferred.promise;
1733
+ }
1734
+ });
1735
+ var $Promise = Promise;
1736
+ var $PromiseReject = $Promise.reject;
1737
+ function promiseResolve(promise, x) {
1738
+ promiseDone(promise, +1, x, promise.onResolve_);
1739
+ }
1740
+ function promiseReject(promise, r) {
1741
+ promiseDone(promise, -1, r, promise.onReject_);
1742
+ }
1743
+ function promiseDone(promise, status, value, reactions) {
1744
+ if (promise.status_ !== 0)
1745
+ return;
1746
+ promiseEnqueue(value, reactions);
1747
+ promiseSet(promise, status, value);
1748
+ }
1749
+ function promiseEnqueue(value, tasks) {
1750
+ async((function() {
1751
+ for (var i = 0; i < tasks.length; i += 2) {
1752
+ promiseHandle(value, tasks[i], tasks[i + 1]);
1753
+ }
1754
+ }));
1755
+ }
1756
+ function promiseHandle(value, handler, deferred) {
1757
+ try {
1758
+ var result = handler(value);
1759
+ if (result === deferred.promise)
1760
+ throw new TypeError;
1761
+ else if (isPromise(result))
1762
+ chain(result, deferred.resolve, deferred.reject);
1763
+ else
1764
+ deferred.resolve(result);
1765
+ } catch (e) {
1766
+ try {
1767
+ deferred.reject(e);
1768
+ } catch (e) {}
1769
+ }
1770
+ }
1771
+ var thenableSymbol = '@@thenable';
1772
+ function isObject(x) {
1773
+ return x && (typeof x === 'object' || typeof x === 'function');
1774
+ }
1775
+ function promiseCoerce(constructor, x) {
1776
+ if (!isPromise(x) && isObject(x)) {
1777
+ var then;
1778
+ try {
1779
+ then = x.then;
1780
+ } catch (r) {
1781
+ var promise = $PromiseReject.call(constructor, r);
1782
+ x[thenableSymbol] = promise;
1783
+ return promise;
1784
+ }
1785
+ if (typeof then === 'function') {
1786
+ var p = x[thenableSymbol];
1787
+ if (p) {
1788
+ return p;
1789
+ } else {
1790
+ var deferred = getDeferred(constructor);
1791
+ x[thenableSymbol] = deferred.promise;
1792
+ try {
1793
+ then.call(x, deferred.resolve, deferred.reject);
1794
+ } catch (r) {
1795
+ deferred.reject(r);
1796
+ }
1797
+ return deferred.promise;
1798
+ }
1799
+ }
1800
+ }
1801
+ return x;
1802
+ }
1803
+ function polyfillPromise(global) {
1804
+ if (!global.Promise)
1805
+ global.Promise = Promise;
1806
+ }
1807
+ registerPolyfill(polyfillPromise);
1808
+ return {
1809
+ get Promise() {
1810
+ return Promise;
1811
+ },
1812
+ get polyfillPromise() {
1813
+ return polyfillPromise;
1814
+ }
1815
+ };
1816
+ });
1817
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Promise" + '');
1818
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/StringIterator", [], function() {
1819
+ "use strict";
1820
+ var $__2;
1821
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/StringIterator";
1822
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
1823
+ createIteratorResultObject = $__0.createIteratorResultObject,
1824
+ isObject = $__0.isObject;
1825
+ var toProperty = $traceurRuntime.toProperty;
1826
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1827
+ var iteratedString = Symbol('iteratedString');
1828
+ var stringIteratorNextIndex = Symbol('stringIteratorNextIndex');
1829
+ var StringIterator = function StringIterator() {};
1830
+ ($traceurRuntime.createClass)(StringIterator, ($__2 = {}, Object.defineProperty($__2, "next", {
1831
+ value: function() {
1832
+ var o = this;
1833
+ if (!isObject(o) || !hasOwnProperty.call(o, iteratedString)) {
1834
+ throw new TypeError('this must be a StringIterator object');
1835
+ }
1836
+ var s = o[toProperty(iteratedString)];
1837
+ if (s === undefined) {
1838
+ return createIteratorResultObject(undefined, true);
1839
+ }
1840
+ var position = o[toProperty(stringIteratorNextIndex)];
1841
+ var len = s.length;
1842
+ if (position >= len) {
1843
+ o[toProperty(iteratedString)] = undefined;
1844
+ return createIteratorResultObject(undefined, true);
1845
+ }
1846
+ var first = s.charCodeAt(position);
1847
+ var resultString;
1848
+ if (first < 0xD800 || first > 0xDBFF || position + 1 === len) {
1849
+ resultString = String.fromCharCode(first);
1850
+ } else {
1851
+ var second = s.charCodeAt(position + 1);
1852
+ if (second < 0xDC00 || second > 0xDFFF) {
1853
+ resultString = String.fromCharCode(first);
1854
+ } else {
1855
+ resultString = String.fromCharCode(first) + String.fromCharCode(second);
1856
+ }
1857
+ }
1858
+ o[toProperty(stringIteratorNextIndex)] = position + resultString.length;
1859
+ return createIteratorResultObject(resultString, false);
1860
+ },
1861
+ configurable: true,
1862
+ enumerable: true,
1863
+ writable: true
1864
+ }), Object.defineProperty($__2, Symbol.iterator, {
1865
+ value: function() {
1866
+ return this;
1867
+ },
1868
+ configurable: true,
1869
+ enumerable: true,
1870
+ writable: true
1871
+ }), $__2), {});
1872
+ function createStringIterator(string) {
1873
+ var s = String(string);
1874
+ var iterator = Object.create(StringIterator.prototype);
1875
+ iterator[toProperty(iteratedString)] = s;
1876
+ iterator[toProperty(stringIteratorNextIndex)] = 0;
1877
+ return iterator;
1878
+ }
1879
+ return {get createStringIterator() {
1880
+ return createStringIterator;
1881
+ }};
1882
+ });
1883
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/String", [], function() {
1884
+ "use strict";
1885
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/String";
1886
+ var createStringIterator = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/StringIterator").createStringIterator;
1887
+ var $__1 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
1888
+ maybeAddFunctions = $__1.maybeAddFunctions,
1889
+ maybeAddIterator = $__1.maybeAddIterator,
1890
+ registerPolyfill = $__1.registerPolyfill;
1891
+ var $toString = Object.prototype.toString;
1892
+ var $indexOf = String.prototype.indexOf;
1893
+ var $lastIndexOf = String.prototype.lastIndexOf;
1894
+ function startsWith(search) {
1895
+ var string = String(this);
1896
+ if (this == null || $toString.call(search) == '[object RegExp]') {
1897
+ throw TypeError();
1898
+ }
1899
+ var stringLength = string.length;
1900
+ var searchString = String(search);
1901
+ var searchLength = searchString.length;
1902
+ var position = arguments.length > 1 ? arguments[1] : undefined;
1903
+ var pos = position ? Number(position) : 0;
1904
+ if (isNaN(pos)) {
1905
+ pos = 0;
1906
+ }
1907
+ var start = Math.min(Math.max(pos, 0), stringLength);
1908
+ return $indexOf.call(string, searchString, pos) == start;
1909
+ }
1910
+ function endsWith(search) {
1911
+ var string = String(this);
1912
+ if (this == null || $toString.call(search) == '[object RegExp]') {
1913
+ throw TypeError();
1914
+ }
1915
+ var stringLength = string.length;
1916
+ var searchString = String(search);
1917
+ var searchLength = searchString.length;
1918
+ var pos = stringLength;
1919
+ if (arguments.length > 1) {
1920
+ var position = arguments[1];
1921
+ if (position !== undefined) {
1922
+ pos = position ? Number(position) : 0;
1923
+ if (isNaN(pos)) {
1924
+ pos = 0;
1925
+ }
1926
+ }
1927
+ }
1928
+ var end = Math.min(Math.max(pos, 0), stringLength);
1929
+ var start = end - searchLength;
1930
+ if (start < 0) {
1931
+ return false;
1932
+ }
1933
+ return $lastIndexOf.call(string, searchString, start) == start;
1934
+ }
1935
+ function contains(search) {
1936
+ if (this == null) {
1937
+ throw TypeError();
1938
+ }
1939
+ var string = String(this);
1940
+ var stringLength = string.length;
1941
+ var searchString = String(search);
1942
+ var searchLength = searchString.length;
1943
+ var position = arguments.length > 1 ? arguments[1] : undefined;
1944
+ var pos = position ? Number(position) : 0;
1945
+ if (isNaN(pos)) {
1946
+ pos = 0;
1947
+ }
1948
+ var start = Math.min(Math.max(pos, 0), stringLength);
1949
+ return $indexOf.call(string, searchString, pos) != -1;
1950
+ }
1951
+ function repeat(count) {
1952
+ if (this == null) {
1953
+ throw TypeError();
1954
+ }
1955
+ var string = String(this);
1956
+ var n = count ? Number(count) : 0;
1957
+ if (isNaN(n)) {
1958
+ n = 0;
1959
+ }
1960
+ if (n < 0 || n == Infinity) {
1961
+ throw RangeError();
1962
+ }
1963
+ if (n == 0) {
1964
+ return '';
1965
+ }
1966
+ var result = '';
1967
+ while (n--) {
1968
+ result += string;
1969
+ }
1970
+ return result;
1971
+ }
1972
+ function codePointAt(position) {
1973
+ if (this == null) {
1974
+ throw TypeError();
1975
+ }
1976
+ var string = String(this);
1977
+ var size = string.length;
1978
+ var index = position ? Number(position) : 0;
1979
+ if (isNaN(index)) {
1980
+ index = 0;
1981
+ }
1982
+ if (index < 0 || index >= size) {
1983
+ return undefined;
1984
+ }
1985
+ var first = string.charCodeAt(index);
1986
+ var second;
1987
+ if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {
1988
+ second = string.charCodeAt(index + 1);
1989
+ if (second >= 0xDC00 && second <= 0xDFFF) {
1990
+ return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
1991
+ }
1992
+ }
1993
+ return first;
1994
+ }
1995
+ function raw(callsite) {
1996
+ var raw = callsite.raw;
1997
+ var len = raw.length >>> 0;
1998
+ if (len === 0)
1999
+ return '';
2000
+ var s = '';
2001
+ var i = 0;
2002
+ while (true) {
2003
+ s += raw[i];
2004
+ if (i + 1 === len)
2005
+ return s;
2006
+ s += arguments[++i];
2007
+ }
2008
+ }
2009
+ function fromCodePoint() {
2010
+ var codeUnits = [];
2011
+ var floor = Math.floor;
2012
+ var highSurrogate;
2013
+ var lowSurrogate;
2014
+ var index = -1;
2015
+ var length = arguments.length;
2016
+ if (!length) {
2017
+ return '';
2018
+ }
2019
+ while (++index < length) {
2020
+ var codePoint = Number(arguments[index]);
2021
+ if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || floor(codePoint) != codePoint) {
2022
+ throw RangeError('Invalid code point: ' + codePoint);
2023
+ }
2024
+ if (codePoint <= 0xFFFF) {
2025
+ codeUnits.push(codePoint);
2026
+ } else {
2027
+ codePoint -= 0x10000;
2028
+ highSurrogate = (codePoint >> 10) + 0xD800;
2029
+ lowSurrogate = (codePoint % 0x400) + 0xDC00;
2030
+ codeUnits.push(highSurrogate, lowSurrogate);
2031
+ }
2032
+ }
2033
+ return String.fromCharCode.apply(null, codeUnits);
2034
+ }
2035
+ function stringPrototypeIterator() {
2036
+ var o = $traceurRuntime.checkObjectCoercible(this);
2037
+ var s = String(o);
2038
+ return createStringIterator(s);
2039
+ }
2040
+ function polyfillString(global) {
2041
+ var String = global.String;
2042
+ maybeAddFunctions(String.prototype, ['codePointAt', codePointAt, 'contains', contains, 'endsWith', endsWith, 'startsWith', startsWith, 'repeat', repeat]);
2043
+ maybeAddFunctions(String, ['fromCodePoint', fromCodePoint, 'raw', raw]);
2044
+ maybeAddIterator(String.prototype, stringPrototypeIterator, Symbol);
2045
+ }
2046
+ registerPolyfill(polyfillString);
2047
+ return {
2048
+ get startsWith() {
2049
+ return startsWith;
2050
+ },
2051
+ get endsWith() {
2052
+ return endsWith;
2053
+ },
2054
+ get contains() {
2055
+ return contains;
2056
+ },
2057
+ get repeat() {
2058
+ return repeat;
2059
+ },
2060
+ get codePointAt() {
2061
+ return codePointAt;
2062
+ },
2063
+ get raw() {
2064
+ return raw;
2065
+ },
2066
+ get fromCodePoint() {
2067
+ return fromCodePoint;
2068
+ },
2069
+ get stringPrototypeIterator() {
2070
+ return stringPrototypeIterator;
2071
+ },
2072
+ get polyfillString() {
2073
+ return polyfillString;
2074
+ }
2075
+ };
2076
+ });
2077
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/String" + '');
2078
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/ArrayIterator", [], function() {
2079
+ "use strict";
2080
+ var $__2;
2081
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/ArrayIterator";
2082
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
2083
+ toObject = $__0.toObject,
2084
+ toUint32 = $__0.toUint32,
2085
+ createIteratorResultObject = $__0.createIteratorResultObject;
2086
+ var ARRAY_ITERATOR_KIND_KEYS = 1;
2087
+ var ARRAY_ITERATOR_KIND_VALUES = 2;
2088
+ var ARRAY_ITERATOR_KIND_ENTRIES = 3;
2089
+ var ArrayIterator = function ArrayIterator() {};
2090
+ ($traceurRuntime.createClass)(ArrayIterator, ($__2 = {}, Object.defineProperty($__2, "next", {
2091
+ value: function() {
2092
+ var iterator = toObject(this);
2093
+ var array = iterator.iteratorObject_;
2094
+ if (!array) {
2095
+ throw new TypeError('Object is not an ArrayIterator');
2096
+ }
2097
+ var index = iterator.arrayIteratorNextIndex_;
2098
+ var itemKind = iterator.arrayIterationKind_;
2099
+ var length = toUint32(array.length);
2100
+ if (index >= length) {
2101
+ iterator.arrayIteratorNextIndex_ = Infinity;
2102
+ return createIteratorResultObject(undefined, true);
2103
+ }
2104
+ iterator.arrayIteratorNextIndex_ = index + 1;
2105
+ if (itemKind == ARRAY_ITERATOR_KIND_VALUES)
2106
+ return createIteratorResultObject(array[index], false);
2107
+ if (itemKind == ARRAY_ITERATOR_KIND_ENTRIES)
2108
+ return createIteratorResultObject([index, array[index]], false);
2109
+ return createIteratorResultObject(index, false);
2110
+ },
2111
+ configurable: true,
2112
+ enumerable: true,
2113
+ writable: true
2114
+ }), Object.defineProperty($__2, Symbol.iterator, {
2115
+ value: function() {
2116
+ return this;
2117
+ },
2118
+ configurable: true,
2119
+ enumerable: true,
2120
+ writable: true
2121
+ }), $__2), {});
2122
+ function createArrayIterator(array, kind) {
2123
+ var object = toObject(array);
2124
+ var iterator = new ArrayIterator;
2125
+ iterator.iteratorObject_ = object;
2126
+ iterator.arrayIteratorNextIndex_ = 0;
2127
+ iterator.arrayIterationKind_ = kind;
2128
+ return iterator;
2129
+ }
2130
+ function entries() {
2131
+ return createArrayIterator(this, ARRAY_ITERATOR_KIND_ENTRIES);
2132
+ }
2133
+ function keys() {
2134
+ return createArrayIterator(this, ARRAY_ITERATOR_KIND_KEYS);
2135
+ }
2136
+ function values() {
2137
+ return createArrayIterator(this, ARRAY_ITERATOR_KIND_VALUES);
2138
+ }
2139
+ return {
2140
+ get entries() {
2141
+ return entries;
2142
+ },
2143
+ get keys() {
2144
+ return keys;
2145
+ },
2146
+ get values() {
2147
+ return values;
2148
+ }
2149
+ };
2150
+ });
2151
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Array", [], function() {
2152
+ "use strict";
2153
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Array";
2154
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/ArrayIterator"),
2155
+ entries = $__0.entries,
2156
+ keys = $__0.keys,
2157
+ values = $__0.values;
2158
+ var $__1 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
2159
+ checkIterable = $__1.checkIterable,
2160
+ isCallable = $__1.isCallable,
2161
+ isConstructor = $__1.isConstructor,
2162
+ maybeAddFunctions = $__1.maybeAddFunctions,
2163
+ maybeAddIterator = $__1.maybeAddIterator,
2164
+ registerPolyfill = $__1.registerPolyfill,
2165
+ toInteger = $__1.toInteger,
2166
+ toLength = $__1.toLength,
2167
+ toObject = $__1.toObject;
2168
+ function from(arrLike) {
2169
+ var mapFn = arguments[1];
2170
+ var thisArg = arguments[2];
2171
+ var C = this;
2172
+ var items = toObject(arrLike);
2173
+ var mapping = mapFn !== undefined;
2174
+ var k = 0;
2175
+ var arr,
2176
+ len;
2177
+ if (mapping && !isCallable(mapFn)) {
2178
+ throw TypeError();
2179
+ }
2180
+ if (checkIterable(items)) {
2181
+ arr = isConstructor(C) ? new C() : [];
2182
+ for (var $__2 = items[Symbol.iterator](),
2183
+ $__3; !($__3 = $__2.next()).done; ) {
2184
+ var item = $__3.value;
2185
+ {
2186
+ if (mapping) {
2187
+ arr[k] = mapFn.call(thisArg, item, k);
2188
+ } else {
2189
+ arr[k] = item;
2190
+ }
2191
+ k++;
2192
+ }
2193
+ }
2194
+ arr.length = k;
2195
+ return arr;
2196
+ }
2197
+ len = toLength(items.length);
2198
+ arr = isConstructor(C) ? new C(len) : new Array(len);
2199
+ for (; k < len; k++) {
2200
+ if (mapping) {
2201
+ arr[k] = typeof thisArg === 'undefined' ? mapFn(items[k], k) : mapFn.call(thisArg, items[k], k);
2202
+ } else {
2203
+ arr[k] = items[k];
2204
+ }
2205
+ }
2206
+ arr.length = len;
2207
+ return arr;
2208
+ }
2209
+ function of() {
2210
+ for (var items = [],
2211
+ $__4 = 0; $__4 < arguments.length; $__4++)
2212
+ items[$__4] = arguments[$__4];
2213
+ var C = this;
2214
+ var len = items.length;
2215
+ var arr = isConstructor(C) ? new C(len) : new Array(len);
2216
+ for (var k = 0; k < len; k++) {
2217
+ arr[k] = items[k];
2218
+ }
2219
+ arr.length = len;
2220
+ return arr;
2221
+ }
2222
+ function fill(value) {
2223
+ var start = arguments[1] !== (void 0) ? arguments[1] : 0;
2224
+ var end = arguments[2];
2225
+ var object = toObject(this);
2226
+ var len = toLength(object.length);
2227
+ var fillStart = toInteger(start);
2228
+ var fillEnd = end !== undefined ? toInteger(end) : len;
2229
+ fillStart = fillStart < 0 ? Math.max(len + fillStart, 0) : Math.min(fillStart, len);
2230
+ fillEnd = fillEnd < 0 ? Math.max(len + fillEnd, 0) : Math.min(fillEnd, len);
2231
+ while (fillStart < fillEnd) {
2232
+ object[fillStart] = value;
2233
+ fillStart++;
2234
+ }
2235
+ return object;
2236
+ }
2237
+ function find(predicate) {
2238
+ var thisArg = arguments[1];
2239
+ return findHelper(this, predicate, thisArg);
2240
+ }
2241
+ function findIndex(predicate) {
2242
+ var thisArg = arguments[1];
2243
+ return findHelper(this, predicate, thisArg, true);
2244
+ }
2245
+ function findHelper(self, predicate) {
2246
+ var thisArg = arguments[2];
2247
+ var returnIndex = arguments[3] !== (void 0) ? arguments[3] : false;
2248
+ var object = toObject(self);
2249
+ var len = toLength(object.length);
2250
+ if (!isCallable(predicate)) {
2251
+ throw TypeError();
2252
+ }
2253
+ for (var i = 0; i < len; i++) {
2254
+ var value = object[i];
2255
+ if (predicate.call(thisArg, value, i, object)) {
2256
+ return returnIndex ? i : value;
2257
+ }
2258
+ }
2259
+ return returnIndex ? -1 : undefined;
2260
+ }
2261
+ function polyfillArray(global) {
2262
+ var $__5 = global,
2263
+ Array = $__5.Array,
2264
+ Object = $__5.Object,
2265
+ Symbol = $__5.Symbol;
2266
+ maybeAddFunctions(Array.prototype, ['entries', entries, 'keys', keys, 'values', values, 'fill', fill, 'find', find, 'findIndex', findIndex]);
2267
+ maybeAddFunctions(Array, ['from', from, 'of', of]);
2268
+ maybeAddIterator(Array.prototype, values, Symbol);
2269
+ maybeAddIterator(Object.getPrototypeOf([].values()), function() {
2270
+ return this;
2271
+ }, Symbol);
2272
+ }
2273
+ registerPolyfill(polyfillArray);
2274
+ return {
2275
+ get from() {
2276
+ return from;
2277
+ },
2278
+ get of() {
2279
+ return of;
2280
+ },
2281
+ get fill() {
2282
+ return fill;
2283
+ },
2284
+ get find() {
2285
+ return find;
2286
+ },
2287
+ get findIndex() {
2288
+ return findIndex;
2289
+ },
2290
+ get polyfillArray() {
2291
+ return polyfillArray;
2292
+ }
2293
+ };
2294
+ });
2295
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Array" + '');
2296
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Object", [], function() {
2297
+ "use strict";
2298
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Object";
2299
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
2300
+ maybeAddFunctions = $__0.maybeAddFunctions,
2301
+ registerPolyfill = $__0.registerPolyfill;
2302
+ var $__1 = $traceurRuntime,
2303
+ defineProperty = $__1.defineProperty,
2304
+ getOwnPropertyDescriptor = $__1.getOwnPropertyDescriptor,
2305
+ getOwnPropertyNames = $__1.getOwnPropertyNames,
2306
+ isPrivateName = $__1.isPrivateName,
2307
+ keys = $__1.keys;
2308
+ function is(left, right) {
2309
+ if (left === right)
2310
+ return left !== 0 || 1 / left === 1 / right;
2311
+ return left !== left && right !== right;
2312
+ }
2313
+ function assign(target) {
2314
+ for (var i = 1; i < arguments.length; i++) {
2315
+ var source = arguments[i];
2316
+ var props = keys(source);
2317
+ var p,
2318
+ length = props.length;
2319
+ for (p = 0; p < length; p++) {
2320
+ var name = props[p];
2321
+ if (isPrivateName(name))
2322
+ continue;
2323
+ target[name] = source[name];
2324
+ }
2325
+ }
2326
+ return target;
2327
+ }
2328
+ function mixin(target, source) {
2329
+ var props = getOwnPropertyNames(source);
2330
+ var p,
2331
+ descriptor,
2332
+ length = props.length;
2333
+ for (p = 0; p < length; p++) {
2334
+ var name = props[p];
2335
+ if (isPrivateName(name))
2336
+ continue;
2337
+ descriptor = getOwnPropertyDescriptor(source, props[p]);
2338
+ defineProperty(target, props[p], descriptor);
2339
+ }
2340
+ return target;
2341
+ }
2342
+ function polyfillObject(global) {
2343
+ var Object = global.Object;
2344
+ maybeAddFunctions(Object, ['assign', assign, 'is', is, 'mixin', mixin]);
2345
+ }
2346
+ registerPolyfill(polyfillObject);
2347
+ return {
2348
+ get is() {
2349
+ return is;
2350
+ },
2351
+ get assign() {
2352
+ return assign;
2353
+ },
2354
+ get mixin() {
2355
+ return mixin;
2356
+ },
2357
+ get polyfillObject() {
2358
+ return polyfillObject;
2359
+ }
2360
+ };
2361
+ });
2362
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Object" + '');
2363
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/Number", [], function() {
2364
+ "use strict";
2365
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/Number";
2366
+ var $__0 = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils"),
2367
+ isNumber = $__0.isNumber,
2368
+ maybeAddConsts = $__0.maybeAddConsts,
2369
+ maybeAddFunctions = $__0.maybeAddFunctions,
2370
+ registerPolyfill = $__0.registerPolyfill,
2371
+ toInteger = $__0.toInteger;
2372
+ var $abs = Math.abs;
2373
+ var $isFinite = isFinite;
2374
+ var $isNaN = isNaN;
2375
+ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
2376
+ var MIN_SAFE_INTEGER = -Math.pow(2, 53) + 1;
2377
+ var EPSILON = Math.pow(2, -52);
2378
+ function NumberIsFinite(number) {
2379
+ return isNumber(number) && $isFinite(number);
2380
+ }
2381
+ ;
2382
+ function isInteger(number) {
2383
+ return NumberIsFinite(number) && toInteger(number) === number;
2384
+ }
2385
+ function NumberIsNaN(number) {
2386
+ return isNumber(number) && $isNaN(number);
2387
+ }
2388
+ ;
2389
+ function isSafeInteger(number) {
2390
+ if (NumberIsFinite(number)) {
2391
+ var integral = toInteger(number);
2392
+ if (integral === number)
2393
+ return $abs(integral) <= MAX_SAFE_INTEGER;
2394
+ }
2395
+ return false;
2396
+ }
2397
+ function polyfillNumber(global) {
2398
+ var Number = global.Number;
2399
+ maybeAddConsts(Number, ['MAX_SAFE_INTEGER', MAX_SAFE_INTEGER, 'MIN_SAFE_INTEGER', MIN_SAFE_INTEGER, 'EPSILON', EPSILON]);
2400
+ maybeAddFunctions(Number, ['isFinite', NumberIsFinite, 'isInteger', isInteger, 'isNaN', NumberIsNaN, 'isSafeInteger', isSafeInteger]);
2401
+ }
2402
+ registerPolyfill(polyfillNumber);
2403
+ return {
2404
+ get MAX_SAFE_INTEGER() {
2405
+ return MAX_SAFE_INTEGER;
2406
+ },
2407
+ get MIN_SAFE_INTEGER() {
2408
+ return MIN_SAFE_INTEGER;
2409
+ },
2410
+ get EPSILON() {
2411
+ return EPSILON;
2412
+ },
2413
+ get isFinite() {
2414
+ return NumberIsFinite;
2415
+ },
2416
+ get isInteger() {
2417
+ return isInteger;
2418
+ },
2419
+ get isNaN() {
2420
+ return NumberIsNaN;
2421
+ },
2422
+ get isSafeInteger() {
2423
+ return isSafeInteger;
2424
+ },
2425
+ get polyfillNumber() {
2426
+ return polyfillNumber;
2427
+ }
2428
+ };
2429
+ });
2430
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/Number" + '');
2431
+ System.register("traceur-runtime@0.0.67/src/runtime/polyfills/polyfills", [], function() {
2432
+ "use strict";
2433
+ var __moduleName = "traceur-runtime@0.0.67/src/runtime/polyfills/polyfills";
2434
+ var polyfillAll = System.get("traceur-runtime@0.0.67/src/runtime/polyfills/utils").polyfillAll;
2435
+ polyfillAll(this);
2436
+ var setupGlobals = $traceurRuntime.setupGlobals;
2437
+ $traceurRuntime.setupGlobals = function(global) {
2438
+ setupGlobals(global);
2439
+ polyfillAll(global);
2440
+ };
2441
+ return {};
2442
+ });
2443
+ System.get("traceur-runtime@0.0.67/src/runtime/polyfills/polyfills" + '');
2444
+
1
2445
  (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
2446
  (function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname){
3
2447
  /**
@@ -8590,5 +11034,5 @@ var Application = ($__application__ = require("./application"), $__application__
8590
11034
  return new Application;
8591
11035
  }};
8592
11036
 
8593
- }).call(this,require("oMfpAn"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_51cb3cf6.js","/")
11037
+ }).call(this,require("oMfpAn"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_6f71f192.js","/")
8594
11038
  },{"./application":8,"buffer":3,"oMfpAn":6}]},{},[11])