1 |
|
2 | (function webpackUniversalModuleDefinition(root, factory) {
|
3 | if(typeof exports === 'object' && typeof module === 'object')
|
4 | module.exports = factory();
|
5 | else if(typeof define === 'function' && define.amd)
|
6 | define([], factory);
|
7 | else if(typeof exports === 'object')
|
8 | exports["Horizon"] = factory();
|
9 | else
|
10 | root["Horizon"] = factory();
|
11 | })(this, function() {
|
12 | return (function(modules) {
|
13 |
|
14 | var installedModules = {};
|
15 |
|
16 |
|
17 | function __webpack_require__(moduleId) {
|
18 |
|
19 |
|
20 | if(installedModules[moduleId])
|
21 | return installedModules[moduleId].exports;
|
22 |
|
23 |
|
24 | var module = installedModules[moduleId] = {
|
25 | exports: {},
|
26 | id: moduleId,
|
27 | loaded: false
|
28 | };
|
29 |
|
30 |
|
31 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
32 |
|
33 |
|
34 | module.loaded = true;
|
35 |
|
36 |
|
37 | return module.exports;
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 | __webpack_require__.m = modules;
|
43 |
|
44 |
|
45 | __webpack_require__.c = installedModules;
|
46 |
|
47 |
|
48 | __webpack_require__.p = "";
|
49 |
|
50 |
|
51 | return __webpack_require__(0);
|
52 | })
|
53 |
|
54 | ([
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | function(module, exports, __webpack_require__) {
|
60 |
|
61 | 'use strict';
|
62 |
|
63 |
|
64 |
|
65 | __webpack_require__( 1);
|
66 | __webpack_require__( 53);
|
67 | __webpack_require__( 60);
|
68 | __webpack_require__( 63);
|
69 |
|
70 | module.exports = __webpack_require__( 68);
|
71 |
|
72 | },
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | function(module, exports, __webpack_require__) {
|
78 |
|
79 | __webpack_require__( 2);
|
80 | __webpack_require__( 46);
|
81 | module.exports = __webpack_require__( 10).Array.from;
|
82 |
|
83 | },
|
84 |
|
85 |
|
86 |
|
87 |
|
88 | function(module, exports, __webpack_require__) {
|
89 |
|
90 | 'use strict';
|
91 | var $at = __webpack_require__( 3)(true);
|
92 |
|
93 |
|
94 | __webpack_require__( 6)(String, 'String', function(iterated){
|
95 | this._t = String(iterated);
|
96 | this._i = 0;
|
97 |
|
98 | }, function(){
|
99 | var O = this._t
|
100 | , index = this._i
|
101 | , point;
|
102 | if(index >= O.length)return {value: undefined, done: true};
|
103 | point = $at(O, index);
|
104 | this._i += point.length;
|
105 | return {value: point, done: false};
|
106 | });
|
107 |
|
108 | },
|
109 |
|
110 |
|
111 |
|
112 |
|
113 | function(module, exports, __webpack_require__) {
|
114 |
|
115 | var toInteger = __webpack_require__( 4)
|
116 | , defined = __webpack_require__( 5);
|
117 |
|
118 |
|
119 | module.exports = function(TO_STRING){
|
120 | return function(that, pos){
|
121 | var s = String(defined(that))
|
122 | , i = toInteger(pos)
|
123 | , l = s.length
|
124 | , a, b;
|
125 | if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
|
126 | a = s.charCodeAt(i);
|
127 | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
128 | ? TO_STRING ? s.charAt(i) : a
|
129 | : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
130 | };
|
131 | };
|
132 |
|
133 | },
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | function(module, exports) {
|
139 |
|
140 |
|
141 | var ceil = Math.ceil
|
142 | , floor = Math.floor;
|
143 | module.exports = function(it){
|
144 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
145 | };
|
146 |
|
147 | },
|
148 |
|
149 |
|
150 |
|
151 |
|
152 | function(module, exports) {
|
153 |
|
154 |
|
155 | module.exports = function(it){
|
156 | if(it == undefined)throw TypeError("Can't call method on " + it);
|
157 | return it;
|
158 | };
|
159 |
|
160 | },
|
161 |
|
162 |
|
163 |
|
164 |
|
165 | function(module, exports, __webpack_require__) {
|
166 |
|
167 | 'use strict';
|
168 | var LIBRARY = __webpack_require__( 7)
|
169 | , $export = __webpack_require__( 8)
|
170 | , redefine = __webpack_require__( 21)
|
171 | , hide = __webpack_require__( 11)
|
172 | , has = __webpack_require__( 22)
|
173 | , Iterators = __webpack_require__( 26)
|
174 | , $iterCreate = __webpack_require__( 27)
|
175 | , setToStringTag = __webpack_require__( 42)
|
176 | , getPrototypeOf = __webpack_require__( 44)
|
177 | , ITERATOR = __webpack_require__( 43)('iterator')
|
178 | , BUGGY = !([].keys && 'next' in [].keys())
|
179 | , FF_ITERATOR = '@@iterator'
|
180 | , KEYS = 'keys'
|
181 | , VALUES = 'values';
|
182 |
|
183 | var returnThis = function(){ return this; };
|
184 |
|
185 | module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
|
186 | $iterCreate(Constructor, NAME, next);
|
187 | var getMethod = function(kind){
|
188 | if(!BUGGY && kind in proto)return proto[kind];
|
189 | switch(kind){
|
190 | case KEYS: return function keys(){ return new Constructor(this, kind); };
|
191 | case VALUES: return function values(){ return new Constructor(this, kind); };
|
192 | } return function entries(){ return new Constructor(this, kind); };
|
193 | };
|
194 | var TAG = NAME + ' Iterator'
|
195 | , DEF_VALUES = DEFAULT == VALUES
|
196 | , VALUES_BUG = false
|
197 | , proto = Base.prototype
|
198 | , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
199 | , $default = $native || getMethod(DEFAULT)
|
200 | , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
|
201 | , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
|
202 | , methods, key, IteratorPrototype;
|
203 |
|
204 | if($anyNative){
|
205 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
|
206 | if(IteratorPrototype !== Object.prototype){
|
207 |
|
208 | setToStringTag(IteratorPrototype, TAG, true);
|
209 |
|
210 | if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
|
211 | }
|
212 | }
|
213 |
|
214 | if(DEF_VALUES && $native && $native.name !== VALUES){
|
215 | VALUES_BUG = true;
|
216 | $default = function values(){ return $native.call(this); };
|
217 | }
|
218 |
|
219 | if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
|
220 | hide(proto, ITERATOR, $default);
|
221 | }
|
222 |
|
223 | Iterators[NAME] = $default;
|
224 | Iterators[TAG] = returnThis;
|
225 | if(DEFAULT){
|
226 | methods = {
|
227 | values: DEF_VALUES ? $default : getMethod(VALUES),
|
228 | keys: IS_SET ? $default : getMethod(KEYS),
|
229 | entries: $entries
|
230 | };
|
231 | if(FORCED)for(key in methods){
|
232 | if(!(key in proto))redefine(proto, key, methods[key]);
|
233 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
234 | }
|
235 | return methods;
|
236 | };
|
237 |
|
238 | },
|
239 |
|
240 |
|
241 |
|
242 |
|
243 | function(module, exports) {
|
244 |
|
245 | module.exports = false;
|
246 |
|
247 | },
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | function(module, exports, __webpack_require__) {
|
253 |
|
254 | var global = __webpack_require__( 9)
|
255 | , core = __webpack_require__( 10)
|
256 | , hide = __webpack_require__( 11)
|
257 | , redefine = __webpack_require__( 21)
|
258 | , ctx = __webpack_require__( 24)
|
259 | , PROTOTYPE = 'prototype';
|
260 |
|
261 | var $export = function(type, name, source){
|
262 | var IS_FORCED = type & $export.F
|
263 | , IS_GLOBAL = type & $export.G
|
264 | , IS_STATIC = type & $export.S
|
265 | , IS_PROTO = type & $export.P
|
266 | , IS_BIND = type & $export.B
|
267 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
|
268 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
269 | , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
|
270 | , key, own, out, exp;
|
271 | if(IS_GLOBAL)source = name;
|
272 | for(key in source){
|
273 |
|
274 | own = !IS_FORCED && target && target[key] !== undefined;
|
275 |
|
276 | out = (own ? target : source)[key];
|
277 |
|
278 | exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
279 |
|
280 | if(target)redefine(target, key, out, type & $export.U);
|
281 |
|
282 | if(exports[key] != out)hide(exports, key, exp);
|
283 | if(IS_PROTO && expProto[key] != out)expProto[key] = out;
|
284 | }
|
285 | };
|
286 | global.core = core;
|
287 |
|
288 | $export.F = 1;
|
289 | $export.G = 2;
|
290 | $export.S = 4;
|
291 | $export.P = 8;
|
292 | $export.B = 16;
|
293 | $export.W = 32;
|
294 | $export.U = 64;
|
295 | $export.R = 128;
|
296 | module.exports = $export;
|
297 |
|
298 | },
|
299 |
|
300 |
|
301 |
|
302 |
|
303 | function(module, exports) {
|
304 |
|
305 |
|
306 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
307 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
308 | if(typeof __g == 'number')__g = global;
|
309 |
|
310 | },
|
311 |
|
312 |
|
313 |
|
314 |
|
315 | function(module, exports) {
|
316 |
|
317 | var core = module.exports = {version: '2.3.0'};
|
318 | if(typeof __e == 'number')__e = core;
|
319 |
|
320 | },
|
321 |
|
322 |
|
323 |
|
324 |
|
325 | function(module, exports, __webpack_require__) {
|
326 |
|
327 | var dP = __webpack_require__( 12)
|
328 | , createDesc = __webpack_require__( 20);
|
329 | module.exports = __webpack_require__( 16) ? function(object, key, value){
|
330 | return dP.f(object, key, createDesc(1, value));
|
331 | } : function(object, key, value){
|
332 | object[key] = value;
|
333 | return object;
|
334 | };
|
335 |
|
336 | },
|
337 |
|
338 |
|
339 |
|
340 |
|
341 | function(module, exports, __webpack_require__) {
|
342 |
|
343 | var anObject = __webpack_require__( 13)
|
344 | , IE8_DOM_DEFINE = __webpack_require__( 15)
|
345 | , toPrimitive = __webpack_require__( 19)
|
346 | , dP = Object.defineProperty;
|
347 |
|
348 | exports.f = __webpack_require__( 16) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
349 | anObject(O);
|
350 | P = toPrimitive(P, true);
|
351 | anObject(Attributes);
|
352 | if(IE8_DOM_DEFINE)try {
|
353 | return dP(O, P, Attributes);
|
354 | } catch(e){ }
|
355 | if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
356 | if('value' in Attributes)O[P] = Attributes.value;
|
357 | return O;
|
358 | };
|
359 |
|
360 | },
|
361 |
|
362 |
|
363 |
|
364 |
|
365 | function(module, exports, __webpack_require__) {
|
366 |
|
367 | var isObject = __webpack_require__( 14);
|
368 | module.exports = function(it){
|
369 | if(!isObject(it))throw TypeError(it + ' is not an object!');
|
370 | return it;
|
371 | };
|
372 |
|
373 | },
|
374 |
|
375 |
|
376 |
|
377 |
|
378 | function(module, exports) {
|
379 |
|
380 | module.exports = function(it){
|
381 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
382 | };
|
383 |
|
384 | },
|
385 |
|
386 |
|
387 |
|
388 |
|
389 | function(module, exports, __webpack_require__) {
|
390 |
|
391 | module.exports = !__webpack_require__( 16) && !__webpack_require__( 17)(function(){
|
392 | return Object.defineProperty(__webpack_require__( 18)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
393 | });
|
394 |
|
395 | },
|
396 |
|
397 |
|
398 |
|
399 |
|
400 | function(module, exports, __webpack_require__) {
|
401 |
|
402 |
|
403 | module.exports = !__webpack_require__( 17)(function(){
|
404 | return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
405 | });
|
406 |
|
407 | },
|
408 |
|
409 |
|
410 |
|
411 |
|
412 | function(module, exports) {
|
413 |
|
414 | module.exports = function(exec){
|
415 | try {
|
416 | return !!exec();
|
417 | } catch(e){
|
418 | return true;
|
419 | }
|
420 | };
|
421 |
|
422 | },
|
423 |
|
424 |
|
425 |
|
426 |
|
427 | function(module, exports, __webpack_require__) {
|
428 |
|
429 | var isObject = __webpack_require__( 14)
|
430 | , document = __webpack_require__( 9).document
|
431 |
|
432 | , is = isObject(document) && isObject(document.createElement);
|
433 | module.exports = function(it){
|
434 | return is ? document.createElement(it) : {};
|
435 | };
|
436 |
|
437 | },
|
438 |
|
439 |
|
440 |
|
441 |
|
442 | function(module, exports, __webpack_require__) {
|
443 |
|
444 |
|
445 | var isObject = __webpack_require__( 14);
|
446 |
|
447 |
|
448 | module.exports = function(it, S){
|
449 | if(!isObject(it))return it;
|
450 | var fn, val;
|
451 | if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
452 | if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
453 | if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
454 | throw TypeError("Can't convert object to primitive value");
|
455 | };
|
456 |
|
457 | },
|
458 |
|
459 |
|
460 |
|
461 |
|
462 | function(module, exports) {
|
463 |
|
464 | module.exports = function(bitmap, value){
|
465 | return {
|
466 | enumerable : !(bitmap & 1),
|
467 | configurable: !(bitmap & 2),
|
468 | writable : !(bitmap & 4),
|
469 | value : value
|
470 | };
|
471 | };
|
472 |
|
473 | },
|
474 |
|
475 |
|
476 |
|
477 |
|
478 | function(module, exports, __webpack_require__) {
|
479 |
|
480 | var global = __webpack_require__( 9)
|
481 | , hide = __webpack_require__( 11)
|
482 | , has = __webpack_require__( 22)
|
483 | , SRC = __webpack_require__( 23)('src')
|
484 | , TO_STRING = 'toString'
|
485 | , $toString = Function[TO_STRING]
|
486 | , TPL = ('' + $toString).split(TO_STRING);
|
487 |
|
488 | __webpack_require__( 10).inspectSource = function(it){
|
489 | return $toString.call(it);
|
490 | };
|
491 |
|
492 | (module.exports = function(O, key, val, safe){
|
493 | var isFunction = typeof val == 'function';
|
494 | if(isFunction)has(val, 'name') || hide(val, 'name', key);
|
495 | if(O[key] === val)return;
|
496 | if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
|
497 | if(O === global){
|
498 | O[key] = val;
|
499 | } else {
|
500 | if(!safe){
|
501 | delete O[key];
|
502 | hide(O, key, val);
|
503 | } else {
|
504 | if(O[key])O[key] = val;
|
505 | else hide(O, key, val);
|
506 | }
|
507 | }
|
508 |
|
509 | })(Function.prototype, TO_STRING, function toString(){
|
510 | return typeof this == 'function' && this[SRC] || $toString.call(this);
|
511 | });
|
512 |
|
513 | },
|
514 |
|
515 |
|
516 |
|
517 |
|
518 | function(module, exports) {
|
519 |
|
520 | var hasOwnProperty = {}.hasOwnProperty;
|
521 | module.exports = function(it, key){
|
522 | return hasOwnProperty.call(it, key);
|
523 | };
|
524 |
|
525 | },
|
526 |
|
527 |
|
528 |
|
529 |
|
530 | function(module, exports) {
|
531 |
|
532 | var id = 0
|
533 | , px = Math.random();
|
534 | module.exports = function(key){
|
535 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
536 | };
|
537 |
|
538 | },
|
539 |
|
540 |
|
541 |
|
542 |
|
543 | function(module, exports, __webpack_require__) {
|
544 |
|
545 |
|
546 | var aFunction = __webpack_require__( 25);
|
547 | module.exports = function(fn, that, length){
|
548 | aFunction(fn);
|
549 | if(that === undefined)return fn;
|
550 | switch(length){
|
551 | case 1: return function(a){
|
552 | return fn.call(that, a);
|
553 | };
|
554 | case 2: return function(a, b){
|
555 | return fn.call(that, a, b);
|
556 | };
|
557 | case 3: return function(a, b, c){
|
558 | return fn.call(that, a, b, c);
|
559 | };
|
560 | }
|
561 | return function(/* ...args */){
|
562 | return fn.apply(that, arguments);
|
563 | };
|
564 | };
|
565 |
|
566 | },
|
567 |
|
568 |
|
569 |
|
570 |
|
571 | function(module, exports) {
|
572 |
|
573 | module.exports = function(it){
|
574 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
575 | return it;
|
576 | };
|
577 |
|
578 | },
|
579 |
|
580 |
|
581 |
|
582 |
|
583 | function(module, exports) {
|
584 |
|
585 | module.exports = {};
|
586 |
|
587 | },
|
588 |
|
589 |
|
590 |
|
591 |
|
592 | function(module, exports, __webpack_require__) {
|
593 |
|
594 | 'use strict';
|
595 | var create = __webpack_require__( 28)
|
596 | , descriptor = __webpack_require__( 20)
|
597 | , setToStringTag = __webpack_require__( 42)
|
598 | , IteratorPrototype = {};
|
599 |
|
600 |
|
601 | __webpack_require__( 11)(IteratorPrototype, __webpack_require__( 43)('iterator'), function(){ return this; });
|
602 |
|
603 | module.exports = function(Constructor, NAME, next){
|
604 | Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
|
605 | setToStringTag(Constructor, NAME + ' Iterator');
|
606 | };
|
607 |
|
608 | },
|
609 |
|
610 |
|
611 |
|
612 |
|
613 | function(module, exports, __webpack_require__) {
|
614 |
|
615 |
|
616 | var anObject = __webpack_require__( 13)
|
617 | , dPs = __webpack_require__( 29)
|
618 | , enumBugKeys = __webpack_require__( 40)
|
619 | , IE_PROTO = __webpack_require__( 38)('IE_PROTO')
|
620 | , Empty = function(){ }
|
621 | , PROTOTYPE = 'prototype';
|
622 |
|
623 |
|
624 | var createDict = function(){
|
625 |
|
626 | var iframe = __webpack_require__( 18)('iframe')
|
627 | , i = enumBugKeys.length
|
628 | , gt = '>'
|
629 | , iframeDocument;
|
630 | iframe.style.display = 'none';
|
631 | __webpack_require__( 41).appendChild(iframe);
|
632 | iframe.src = 'javascript:';
|
633 |
|
634 |
|
635 | iframeDocument = iframe.contentWindow.document;
|
636 | iframeDocument.open();
|
637 | iframeDocument.write('<script>document.F=Object</script' + gt);
|
638 | iframeDocument.close();
|
639 | createDict = iframeDocument.F;
|
640 | while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
|
641 | return createDict();
|
642 | };
|
643 |
|
644 | module.exports = Object.create || function create(O, Properties){
|
645 | var result;
|
646 | if(O !== null){
|
647 | Empty[PROTOTYPE] = anObject(O);
|
648 | result = new Empty;
|
649 | Empty[PROTOTYPE] = null;
|
650 |
|
651 | result[IE_PROTO] = O;
|
652 | } else result = createDict();
|
653 | return Properties === undefined ? result : dPs(result, Properties);
|
654 | };
|
655 |
|
656 | },
|
657 |
|
658 |
|
659 |
|
660 |
|
661 | function(module, exports, __webpack_require__) {
|
662 |
|
663 | var dP = __webpack_require__( 12)
|
664 | , anObject = __webpack_require__( 13)
|
665 | , getKeys = __webpack_require__( 30);
|
666 |
|
667 | module.exports = __webpack_require__( 16) ? Object.defineProperties : function defineProperties(O, Properties){
|
668 | anObject(O);
|
669 | var keys = getKeys(Properties)
|
670 | , length = keys.length
|
671 | , i = 0
|
672 | , P;
|
673 | while(length > i)dP.f(O, P = keys[i++], Properties[P]);
|
674 | return O;
|
675 | };
|
676 |
|
677 | },
|
678 |
|
679 |
|
680 |
|
681 |
|
682 | function(module, exports, __webpack_require__) {
|
683 |
|
684 |
|
685 | var $keys = __webpack_require__( 31)
|
686 | , enumBugKeys = __webpack_require__( 40);
|
687 |
|
688 | module.exports = Object.keys || function keys(O){
|
689 | return $keys(O, enumBugKeys);
|
690 | };
|
691 |
|
692 | },
|
693 |
|
694 |
|
695 |
|
696 |
|
697 | function(module, exports, __webpack_require__) {
|
698 |
|
699 | var has = __webpack_require__( 22)
|
700 | , toIObject = __webpack_require__( 32)
|
701 | , arrayIndexOf = __webpack_require__( 35)(false)
|
702 | , IE_PROTO = __webpack_require__( 38)('IE_PROTO');
|
703 |
|
704 | module.exports = function(object, names){
|
705 | var O = toIObject(object)
|
706 | , i = 0
|
707 | , result = []
|
708 | , key;
|
709 | for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
710 |
|
711 | while(names.length > i)if(has(O, key = names[i++])){
|
712 | ~arrayIndexOf(result, key) || result.push(key);
|
713 | }
|
714 | return result;
|
715 | };
|
716 |
|
717 | },
|
718 |
|
719 |
|
720 |
|
721 |
|
722 | function(module, exports, __webpack_require__) {
|
723 |
|
724 |
|
725 | var IObject = __webpack_require__( 33)
|
726 | , defined = __webpack_require__( 5);
|
727 | module.exports = function(it){
|
728 | return IObject(defined(it));
|
729 | };
|
730 |
|
731 | },
|
732 |
|
733 |
|
734 |
|
735 |
|
736 | function(module, exports, __webpack_require__) {
|
737 |
|
738 |
|
739 | var cof = __webpack_require__( 34);
|
740 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
741 | return cof(it) == 'String' ? it.split('') : Object(it);
|
742 | };
|
743 |
|
744 | },
|
745 |
|
746 |
|
747 |
|
748 |
|
749 | function(module, exports) {
|
750 |
|
751 | var toString = {}.toString;
|
752 |
|
753 | module.exports = function(it){
|
754 | return toString.call(it).slice(8, -1);
|
755 | };
|
756 |
|
757 | },
|
758 |
|
759 |
|
760 |
|
761 |
|
762 | function(module, exports, __webpack_require__) {
|
763 |
|
764 |
|
765 |
|
766 | var toIObject = __webpack_require__( 32)
|
767 | , toLength = __webpack_require__( 36)
|
768 | , toIndex = __webpack_require__( 37);
|
769 | module.exports = function(IS_INCLUDES){
|
770 | return function($this, el, fromIndex){
|
771 | var O = toIObject($this)
|
772 | , length = toLength(O.length)
|
773 | , index = toIndex(fromIndex, length)
|
774 | , value;
|
775 |
|
776 | if(IS_INCLUDES && el != el)while(length > index){
|
777 | value = O[index++];
|
778 | if(value != value)return true;
|
779 |
|
780 | } else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
781 | if(O[index] === el)return IS_INCLUDES || index || 0;
|
782 | } return !IS_INCLUDES && -1;
|
783 | };
|
784 | };
|
785 |
|
786 | },
|
787 |
|
788 |
|
789 |
|
790 |
|
791 | function(module, exports, __webpack_require__) {
|
792 |
|
793 |
|
794 | var toInteger = __webpack_require__( 4)
|
795 | , min = Math.min;
|
796 | module.exports = function(it){
|
797 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0;
|
798 | };
|
799 |
|
800 | },
|
801 |
|
802 |
|
803 |
|
804 |
|
805 | function(module, exports, __webpack_require__) {
|
806 |
|
807 | var toInteger = __webpack_require__( 4)
|
808 | , max = Math.max
|
809 | , min = Math.min;
|
810 | module.exports = function(index, length){
|
811 | index = toInteger(index);
|
812 | return index < 0 ? max(index + length, 0) : min(index, length);
|
813 | };
|
814 |
|
815 | },
|
816 |
|
817 |
|
818 |
|
819 |
|
820 | function(module, exports, __webpack_require__) {
|
821 |
|
822 | var shared = __webpack_require__( 39)('keys')
|
823 | , uid = __webpack_require__( 23);
|
824 | module.exports = function(key){
|
825 | return shared[key] || (shared[key] = uid(key));
|
826 | };
|
827 |
|
828 | },
|
829 |
|
830 |
|
831 |
|
832 |
|
833 | function(module, exports, __webpack_require__) {
|
834 |
|
835 | var global = __webpack_require__( 9)
|
836 | , SHARED = '__core-js_shared__'
|
837 | , store = global[SHARED] || (global[SHARED] = {});
|
838 | module.exports = function(key){
|
839 | return store[key] || (store[key] = {});
|
840 | };
|
841 |
|
842 | },
|
843 |
|
844 |
|
845 |
|
846 |
|
847 | function(module, exports) {
|
848 |
|
849 |
|
850 | module.exports = (
|
851 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
852 | ).split(',');
|
853 |
|
854 | },
|
855 |
|
856 |
|
857 |
|
858 |
|
859 | function(module, exports, __webpack_require__) {
|
860 |
|
861 | module.exports = __webpack_require__( 9).document && document.documentElement;
|
862 |
|
863 | },
|
864 |
|
865 |
|
866 |
|
867 |
|
868 | function(module, exports, __webpack_require__) {
|
869 |
|
870 | var def = __webpack_require__( 12).f
|
871 | , has = __webpack_require__( 22)
|
872 | , TAG = __webpack_require__( 43)('toStringTag');
|
873 |
|
874 | module.exports = function(it, tag, stat){
|
875 | if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
|
876 | };
|
877 |
|
878 | },
|
879 |
|
880 |
|
881 |
|
882 |
|
883 | function(module, exports, __webpack_require__) {
|
884 |
|
885 | var store = __webpack_require__( 39)('wks')
|
886 | , uid = __webpack_require__( 23)
|
887 | , Symbol = __webpack_require__( 9).Symbol
|
888 | , USE_SYMBOL = typeof Symbol == 'function';
|
889 |
|
890 | var $exports = module.exports = function(name){
|
891 | return store[name] || (store[name] =
|
892 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
893 | };
|
894 |
|
895 | $exports.store = store;
|
896 |
|
897 | },
|
898 |
|
899 |
|
900 |
|
901 |
|
902 | function(module, exports, __webpack_require__) {
|
903 |
|
904 |
|
905 | var has = __webpack_require__( 22)
|
906 | , toObject = __webpack_require__( 45)
|
907 | , IE_PROTO = __webpack_require__( 38)('IE_PROTO')
|
908 | , ObjectProto = Object.prototype;
|
909 |
|
910 | module.exports = Object.getPrototypeOf || function(O){
|
911 | O = toObject(O);
|
912 | if(has(O, IE_PROTO))return O[IE_PROTO];
|
913 | if(typeof O.constructor == 'function' && O instanceof O.constructor){
|
914 | return O.constructor.prototype;
|
915 | } return O instanceof Object ? ObjectProto : null;
|
916 | };
|
917 |
|
918 | },
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | function(module, exports, __webpack_require__) {
|
924 |
|
925 |
|
926 | var defined = __webpack_require__( 5);
|
927 | module.exports = function(it){
|
928 | return Object(defined(it));
|
929 | };
|
930 |
|
931 | },
|
932 |
|
933 |
|
934 |
|
935 |
|
936 | function(module, exports, __webpack_require__) {
|
937 |
|
938 | 'use strict';
|
939 | var ctx = __webpack_require__( 24)
|
940 | , $export = __webpack_require__( 8)
|
941 | , toObject = __webpack_require__( 45)
|
942 | , call = __webpack_require__( 47)
|
943 | , isArrayIter = __webpack_require__( 48)
|
944 | , toLength = __webpack_require__( 36)
|
945 | , createProperty = __webpack_require__( 49)
|
946 | , getIterFn = __webpack_require__( 50);
|
947 |
|
948 | $export($export.S + $export.F * !__webpack_require__( 52)(function(iter){ Array.from(iter); }), 'Array', {
|
949 |
|
950 | from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
|
951 | var O = toObject(arrayLike)
|
952 | , C = typeof this == 'function' ? this : Array
|
953 | , aLen = arguments.length
|
954 | , mapfn = aLen > 1 ? arguments[1] : undefined
|
955 | , mapping = mapfn !== undefined
|
956 | , index = 0
|
957 | , iterFn = getIterFn(O)
|
958 | , length, result, step, iterator;
|
959 | if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
|
960 |
|
961 | if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
|
962 | for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
|
963 | createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
|
964 | }
|
965 | } else {
|
966 | length = toLength(O.length);
|
967 | for(result = new C(length); length > index; index++){
|
968 | createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
|
969 | }
|
970 | }
|
971 | result.length = index;
|
972 | return result;
|
973 | }
|
974 | });
|
975 |
|
976 |
|
977 | },
|
978 |
|
979 |
|
980 |
|
981 |
|
982 | function(module, exports, __webpack_require__) {
|
983 |
|
984 |
|
985 | var anObject = __webpack_require__( 13);
|
986 | module.exports = function(iterator, fn, value, entries){
|
987 | try {
|
988 | return entries ? fn(anObject(value)[0], value[1]) : fn(value);
|
989 |
|
990 | } catch(e){
|
991 | var ret = iterator['return'];
|
992 | if(ret !== undefined)anObject(ret.call(iterator));
|
993 | throw e;
|
994 | }
|
995 | };
|
996 |
|
997 | },
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 | function(module, exports, __webpack_require__) {
|
1003 |
|
1004 |
|
1005 | var Iterators = __webpack_require__( 26)
|
1006 | , ITERATOR = __webpack_require__( 43)('iterator')
|
1007 | , ArrayProto = Array.prototype;
|
1008 |
|
1009 | module.exports = function(it){
|
1010 | return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
1011 | };
|
1012 |
|
1013 | },
|
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 | function(module, exports, __webpack_require__) {
|
1019 |
|
1020 | 'use strict';
|
1021 | var $defineProperty = __webpack_require__( 12)
|
1022 | , createDesc = __webpack_require__( 20);
|
1023 |
|
1024 | module.exports = function(object, index, value){
|
1025 | if(index in object)$defineProperty.f(object, index, createDesc(0, value));
|
1026 | else object[index] = value;
|
1027 | };
|
1028 |
|
1029 | },
|
1030 |
|
1031 |
|
1032 |
|
1033 |
|
1034 | function(module, exports, __webpack_require__) {
|
1035 |
|
1036 | var classof = __webpack_require__( 51)
|
1037 | , ITERATOR = __webpack_require__( 43)('iterator')
|
1038 | , Iterators = __webpack_require__( 26);
|
1039 | module.exports = __webpack_require__( 10).getIteratorMethod = function(it){
|
1040 | if(it != undefined)return it[ITERATOR]
|
1041 | || it['@@iterator']
|
1042 | || Iterators[classof(it)];
|
1043 | };
|
1044 |
|
1045 | },
|
1046 |
|
1047 |
|
1048 |
|
1049 |
|
1050 | function(module, exports, __webpack_require__) {
|
1051 |
|
1052 |
|
1053 | var cof = __webpack_require__( 34)
|
1054 | , TAG = __webpack_require__( 43)('toStringTag')
|
1055 |
|
1056 | , ARG = cof(function(){ return arguments; }()) == 'Arguments';
|
1057 |
|
1058 |
|
1059 | var tryGet = function(it, key){
|
1060 | try {
|
1061 | return it[key];
|
1062 | } catch(e){ }
|
1063 | };
|
1064 |
|
1065 | module.exports = function(it){
|
1066 | var O, T, B;
|
1067 | return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1068 |
|
1069 | : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
1070 |
|
1071 | : ARG ? cof(O)
|
1072 |
|
1073 | : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
1074 | };
|
1075 |
|
1076 | },
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 | function(module, exports, __webpack_require__) {
|
1082 |
|
1083 | var ITERATOR = __webpack_require__( 43)('iterator')
|
1084 | , SAFE_CLOSING = false;
|
1085 |
|
1086 | try {
|
1087 | var riter = [7][ITERATOR]();
|
1088 | riter['return'] = function(){ SAFE_CLOSING = true; };
|
1089 | Array.from(riter, function(){ throw 2; });
|
1090 | } catch(e){ }
|
1091 |
|
1092 | module.exports = function(exec, skipClosing){
|
1093 | if(!skipClosing && !SAFE_CLOSING)return false;
|
1094 | var safe = false;
|
1095 | try {
|
1096 | var arr = [7]
|
1097 | , iter = arr[ITERATOR]();
|
1098 | iter.next = function(){ return {done: safe = true}; };
|
1099 | arr[ITERATOR] = function(){ return iter; };
|
1100 | exec(arr);
|
1101 | } catch(e){ }
|
1102 | return safe;
|
1103 | };
|
1104 |
|
1105 | },
|
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 | function(module, exports, __webpack_require__) {
|
1111 |
|
1112 | __webpack_require__( 54);
|
1113 | module.exports = __webpack_require__( 10).Array.findIndex;
|
1114 |
|
1115 | },
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 | function(module, exports, __webpack_require__) {
|
1121 |
|
1122 | 'use strict';
|
1123 |
|
1124 | var $export = __webpack_require__( 8)
|
1125 | , $find = __webpack_require__( 55)(6)
|
1126 | , KEY = 'findIndex'
|
1127 | , forced = true;
|
1128 |
|
1129 | if(KEY in [])Array(1)[KEY](function(){ forced = false; });
|
1130 | $export($export.P + $export.F * forced, 'Array', {
|
1131 | findIndex: function findIndex(callbackfn/*, that = undefined */){
|
1132 | return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1133 | }
|
1134 | });
|
1135 | __webpack_require__( 59)(KEY);
|
1136 |
|
1137 | },
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 | function(module, exports, __webpack_require__) {
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 |
|
1150 |
|
1151 | var ctx = __webpack_require__( 24)
|
1152 | , IObject = __webpack_require__( 33)
|
1153 | , toObject = __webpack_require__( 45)
|
1154 | , toLength = __webpack_require__( 36)
|
1155 | , asc = __webpack_require__( 56);
|
1156 | module.exports = function(TYPE, $create){
|
1157 | var IS_MAP = TYPE == 1
|
1158 | , IS_FILTER = TYPE == 2
|
1159 | , IS_SOME = TYPE == 3
|
1160 | , IS_EVERY = TYPE == 4
|
1161 | , IS_FIND_INDEX = TYPE == 6
|
1162 | , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
|
1163 | , create = $create || asc;
|
1164 | return function($this, callbackfn, that){
|
1165 | var O = toObject($this)
|
1166 | , self = IObject(O)
|
1167 | , f = ctx(callbackfn, that, 3)
|
1168 | , length = toLength(self.length)
|
1169 | , index = 0
|
1170 | , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
|
1171 | , val, res;
|
1172 | for(;length > index; index++)if(NO_HOLES || index in self){
|
1173 | val = self[index];
|
1174 | res = f(val, index, O);
|
1175 | if(TYPE){
|
1176 | if(IS_MAP)result[index] = res;
|
1177 | else if(res)switch(TYPE){
|
1178 | case 3: return true;
|
1179 | case 5: return val;
|
1180 | case 6: return index;
|
1181 | case 2: result.push(val);
|
1182 | } else if(IS_EVERY)return false;
|
1183 | }
|
1184 | }
|
1185 | return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
|
1186 | };
|
1187 | };
|
1188 |
|
1189 | },
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 | function(module, exports, __webpack_require__) {
|
1195 |
|
1196 |
|
1197 | var speciesConstructor = __webpack_require__( 57);
|
1198 |
|
1199 | module.exports = function(original, length){
|
1200 | return new (speciesConstructor(original))(length);
|
1201 | };
|
1202 |
|
1203 | },
|
1204 |
|
1205 |
|
1206 |
|
1207 |
|
1208 | function(module, exports, __webpack_require__) {
|
1209 |
|
1210 | var isObject = __webpack_require__( 14)
|
1211 | , isArray = __webpack_require__( 58)
|
1212 | , SPECIES = __webpack_require__( 43)('species');
|
1213 |
|
1214 | module.exports = function(original){
|
1215 | var C;
|
1216 | if(isArray(original)){
|
1217 | C = original.constructor;
|
1218 |
|
1219 | if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
|
1220 | if(isObject(C)){
|
1221 | C = C[SPECIES];
|
1222 | if(C === null)C = undefined;
|
1223 | }
|
1224 | } return C === undefined ? Array : C;
|
1225 | };
|
1226 |
|
1227 | },
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 | function(module, exports, __webpack_require__) {
|
1233 |
|
1234 |
|
1235 | var cof = __webpack_require__( 34);
|
1236 | module.exports = Array.isArray || function isArray(arg){
|
1237 | return cof(arg) == 'Array';
|
1238 | };
|
1239 |
|
1240 | },
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 | function(module, exports, __webpack_require__) {
|
1246 |
|
1247 |
|
1248 | var UNSCOPABLES = __webpack_require__( 43)('unscopables')
|
1249 | , ArrayProto = Array.prototype;
|
1250 | if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__( 11)(ArrayProto, UNSCOPABLES, {});
|
1251 | module.exports = function(key){
|
1252 | ArrayProto[UNSCOPABLES][key] = true;
|
1253 | };
|
1254 |
|
1255 | },
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 | function(module, exports, __webpack_require__) {
|
1261 |
|
1262 | __webpack_require__( 61);
|
1263 | module.exports = __webpack_require__( 10).Array.keys;
|
1264 |
|
1265 | },
|
1266 |
|
1267 |
|
1268 |
|
1269 |
|
1270 | function(module, exports, __webpack_require__) {
|
1271 |
|
1272 | 'use strict';
|
1273 | var addToUnscopables = __webpack_require__( 59)
|
1274 | , step = __webpack_require__( 62)
|
1275 | , Iterators = __webpack_require__( 26)
|
1276 | , toIObject = __webpack_require__( 32);
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 | module.exports = __webpack_require__( 6)(Array, 'Array', function(iterated, kind){
|
1283 | this._t = toIObject(iterated);
|
1284 | this._i = 0;
|
1285 | this._k = kind;
|
1286 |
|
1287 | }, function(){
|
1288 | var O = this._t
|
1289 | , kind = this._k
|
1290 | , index = this._i++;
|
1291 | if(!O || index >= O.length){
|
1292 | this._t = undefined;
|
1293 | return step(1);
|
1294 | }
|
1295 | if(kind == 'keys' )return step(0, index);
|
1296 | if(kind == 'values')return step(0, O[index]);
|
1297 | return step(0, [index, O[index]]);
|
1298 | }, 'values');
|
1299 |
|
1300 |
|
1301 | Iterators.Arguments = Iterators.Array;
|
1302 |
|
1303 | addToUnscopables('keys');
|
1304 | addToUnscopables('values');
|
1305 | addToUnscopables('entries');
|
1306 |
|
1307 | },
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 | function(module, exports) {
|
1313 |
|
1314 | module.exports = function(done, value){
|
1315 | return {value: value, done: !!done};
|
1316 | };
|
1317 |
|
1318 | },
|
1319 |
|
1320 |
|
1321 |
|
1322 |
|
1323 | function(module, exports, __webpack_require__) {
|
1324 |
|
1325 | __webpack_require__( 64);
|
1326 | module.exports = __webpack_require__( 10).Object.assign;
|
1327 |
|
1328 | },
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 | function(module, exports, __webpack_require__) {
|
1334 |
|
1335 |
|
1336 | var $export = __webpack_require__( 8);
|
1337 |
|
1338 | $export($export.S + $export.F, 'Object', {assign: __webpack_require__( 65)});
|
1339 |
|
1340 | },
|
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 | function(module, exports, __webpack_require__) {
|
1346 |
|
1347 | 'use strict';
|
1348 |
|
1349 | var getKeys = __webpack_require__( 30)
|
1350 | , gOPS = __webpack_require__( 66)
|
1351 | , pIE = __webpack_require__( 67)
|
1352 | , toObject = __webpack_require__( 45)
|
1353 | , IObject = __webpack_require__( 33)
|
1354 | , $assign = Object.assign;
|
1355 |
|
1356 |
|
1357 | module.exports = !$assign || __webpack_require__( 17)(function(){
|
1358 | var A = {}
|
1359 | , B = {}
|
1360 | , S = Symbol()
|
1361 | , K = 'abcdefghijklmnopqrst';
|
1362 | A[S] = 7;
|
1363 | K.split('').forEach(function(k){ B[k] = k; });
|
1364 | return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
1365 | }) ? function assign(target, source){
|
1366 | var T = toObject(target)
|
1367 | , aLen = arguments.length
|
1368 | , index = 1
|
1369 | , getSymbols = gOPS.f
|
1370 | , isEnum = pIE.f;
|
1371 | while(aLen > index){
|
1372 | var S = IObject(arguments[index++])
|
1373 | , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
|
1374 | , length = keys.length
|
1375 | , j = 0
|
1376 | , key;
|
1377 | while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
|
1378 | } return T;
|
1379 | } : $assign;
|
1380 |
|
1381 | },
|
1382 |
|
1383 |
|
1384 |
|
1385 |
|
1386 | function(module, exports) {
|
1387 |
|
1388 | exports.f = Object.getOwnPropertySymbols;
|
1389 |
|
1390 | },
|
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 | function(module, exports) {
|
1396 |
|
1397 | exports.f = {}.propertyIsEnumerable;
|
1398 |
|
1399 | },
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 | function(module, exports, __webpack_require__) {
|
1405 |
|
1406 | 'use strict';
|
1407 |
|
1408 | var _from = __webpack_require__( 69);
|
1409 |
|
1410 | var _catch2 = __webpack_require__( 98);
|
1411 |
|
1412 | var _concatMap = __webpack_require__( 99);
|
1413 |
|
1414 | var _filter = __webpack_require__( 104);
|
1415 |
|
1416 | var _require = __webpack_require__( 78);
|
1417 |
|
1418 | var Observable = _require.Observable;
|
1419 |
|
1420 | var _require2 = __webpack_require__( 105);
|
1421 |
|
1422 | var Collection = _require2.Collection;
|
1423 |
|
1424 | var HorizonSocket = __webpack_require__( 209);
|
1425 |
|
1426 | var _require3 = __webpack_require__( 217);
|
1427 |
|
1428 | var log = _require3.log;
|
1429 | var logError = _require3.logError;
|
1430 | var enableLogging = _require3.enableLogging;
|
1431 |
|
1432 | var _require4 = __webpack_require__( 218);
|
1433 |
|
1434 | var authEndpoint = _require4.authEndpoint;
|
1435 | var TokenStorage = _require4.TokenStorage;
|
1436 | var clearAuthTokens = _require4.clearAuthTokens;
|
1437 |
|
1438 |
|
1439 | var defaultHost = typeof window !== 'undefined' && window.location && '' + window.location.host || 'localhost:8181';
|
1440 | var defaultSecure = typeof window !== 'undefined' && window.location && window.location.protocol === 'https:' || false;
|
1441 |
|
1442 | function Horizon() {
|
1443 | var _context;
|
1444 |
|
1445 | var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
1446 |
|
1447 | var _ref$host = _ref.host;
|
1448 | var host = _ref$host === undefined ? defaultHost : _ref$host;
|
1449 | var _ref$secure = _ref.secure;
|
1450 | var secure = _ref$secure === undefined ? defaultSecure : _ref$secure;
|
1451 | var _ref$path = _ref.path;
|
1452 | var path = _ref$path === undefined ? 'horizon' : _ref$path;
|
1453 | var _ref$lazyWrites = _ref.lazyWrites;
|
1454 | var lazyWrites = _ref$lazyWrites === undefined ? false : _ref$lazyWrites;
|
1455 | var _ref$authType = _ref.authType;
|
1456 | var authType = _ref$authType === undefined ? 'unauthenticated' : _ref$authType;
|
1457 |
|
1458 |
|
1459 |
|
1460 | var tokenStorage = new TokenStorage(authType);
|
1461 | tokenStorage.setAuthFromQueryParams();
|
1462 |
|
1463 | var socket = new HorizonSocket(host, secure, path, tokenStorage.handshake.bind(tokenStorage));
|
1464 |
|
1465 |
|
1466 |
|
1467 | socket.handshake.subscribe(function (handshake) {
|
1468 | return tokenStorage.set(handshake.token);
|
1469 | });
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 | function horizon(name) {
|
1475 | return new Collection(sendRequest, name, lazyWrites);
|
1476 | }
|
1477 |
|
1478 | horizon.dispose = function () {
|
1479 | socket.complete();
|
1480 | };
|
1481 |
|
1482 |
|
1483 |
|
1484 |
|
1485 |
|
1486 | horizon.connect = function () {
|
1487 | var onError = arguments.length <= 0 || arguments[0] === undefined ? function (err) {
|
1488 | console.error('Received an error: ' + err);
|
1489 | } : arguments[0];
|
1490 |
|
1491 | socket.subscribe(function () {}, onError);
|
1492 | };
|
1493 |
|
1494 |
|
1495 |
|
1496 | horizon.status = subscribeOrObservable(socket.status);
|
1497 |
|
1498 |
|
1499 | horizon.onDisconnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
1500 | return x.type === 'disconnected';
|
1501 | }));
|
1502 |
|
1503 |
|
1504 | horizon.onConnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
1505 | return x.type === 'connected';
|
1506 | }));
|
1507 |
|
1508 |
|
1509 | horizon.onReady = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
1510 | return x.type === 'ready';
|
1511 | }));
|
1512 |
|
1513 |
|
1514 | horizon.onSocketError = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
1515 | return x.type === 'error';
|
1516 | }));
|
1517 |
|
1518 | horizon._authMethods = null;
|
1519 | horizon._horizonPath = path;
|
1520 | horizon.authEndpoint = authEndpoint;
|
1521 | horizon.hasAuthToken = tokenStorage.hasAuthToken.bind(tokenStorage);
|
1522 |
|
1523 | return horizon;
|
1524 |
|
1525 |
|
1526 |
|
1527 | function sendRequest(type, options) {
|
1528 | var _context2;
|
1529 |
|
1530 |
|
1531 | var normalizedType = type === 'removeAll' ? 'remove' : type;
|
1532 | return (_context2 = (_context2 = socket.makeRequest({ type: normalizedType, options: options })
|
1533 | , _concatMap.concatMap).call(_context2, function (resp) {
|
1534 |
|
1535 | if (resp.data) {
|
1536 | return _from.from.call(Observable, resp.data);
|
1537 | } else {
|
1538 |
|
1539 | return _from.from.call(Observable, [{ state: resp.state, type: resp.type }]);
|
1540 | }
|
1541 | }), _catch2._catch).call(_context2, function (e) {
|
1542 | return Observable.create(function (observer) {
|
1543 | observer.error(e);
|
1544 | });
|
1545 | });
|
1546 | }
|
1547 | }
|
1548 |
|
1549 | function subscribeOrObservable(observable) {
|
1550 | return function () {
|
1551 | if (arguments.length > 0) {
|
1552 | return observable.subscribe.apply(observable, arguments);
|
1553 | } else {
|
1554 | return observable;
|
1555 | }
|
1556 | };
|
1557 | }
|
1558 |
|
1559 | Horizon.log = log;
|
1560 | Horizon.logError = logError;
|
1561 | Horizon.enableLogging = enableLogging;
|
1562 | Horizon.Socket = HorizonSocket;
|
1563 | Horizon.clearAuthTokens = clearAuthTokens;
|
1564 |
|
1565 | module.exports = Horizon;
|
1566 |
|
1567 | },
|
1568 |
|
1569 |
|
1570 |
|
1571 |
|
1572 | function(module, exports, __webpack_require__) {
|
1573 |
|
1574 | "use strict";
|
1575 | var FromObservable_1 = __webpack_require__( 70);
|
1576 | exports.from = FromObservable_1.FromObservable.create;
|
1577 |
|
1578 |
|
1579 | },
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 | function(module, exports, __webpack_require__) {
|
1585 |
|
1586 | "use strict";
|
1587 | var __extends = (this && this.__extends) || function (d, b) {
|
1588 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
1589 | function __() { this.constructor = d; }
|
1590 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1591 | };
|
1592 | var isArray_1 = __webpack_require__( 71);
|
1593 | var isFunction_1 = __webpack_require__( 72);
|
1594 | var isPromise_1 = __webpack_require__( 73);
|
1595 | var isScheduler_1 = __webpack_require__( 74);
|
1596 | var PromiseObservable_1 = __webpack_require__( 75);
|
1597 | var IteratorObservable_1 = __webpack_require__( 90);
|
1598 | var ArrayObservable_1 = __webpack_require__( 92);
|
1599 | var ArrayLikeObservable_1 = __webpack_require__( 95);
|
1600 | var iterator_1 = __webpack_require__( 91);
|
1601 | var Observable_1 = __webpack_require__( 78);
|
1602 | var observeOn_1 = __webpack_require__( 96);
|
1603 | var $$observable = __webpack_require__( 88);
|
1604 | var isArrayLike = (function (x) { return x && typeof x.length === 'number'; });
|
1605 | |
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 | var FromObservable = (function (_super) {
|
1611 | __extends(FromObservable, _super);
|
1612 | function FromObservable(ish, scheduler) {
|
1613 | _super.call(this, null);
|
1614 | this.ish = ish;
|
1615 | this.scheduler = scheduler;
|
1616 | }
|
1617 | |
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 | FromObservable.create = function (ish, mapFnOrScheduler, thisArg, lastScheduler) {
|
1673 | var scheduler = null;
|
1674 | var mapFn = null;
|
1675 | if (isFunction_1.isFunction(mapFnOrScheduler)) {
|
1676 | scheduler = lastScheduler || null;
|
1677 | mapFn = mapFnOrScheduler;
|
1678 | }
|
1679 | else if (isScheduler_1.isScheduler(scheduler)) {
|
1680 | scheduler = mapFnOrScheduler;
|
1681 | }
|
1682 | if (ish != null) {
|
1683 | if (typeof ish[$$observable] === 'function') {
|
1684 | if (ish instanceof Observable_1.Observable && !scheduler) {
|
1685 | return ish;
|
1686 | }
|
1687 | return new FromObservable(ish, scheduler);
|
1688 | }
|
1689 | else if (isArray_1.isArray(ish)) {
|
1690 | return new ArrayObservable_1.ArrayObservable(ish, scheduler);
|
1691 | }
|
1692 | else if (isPromise_1.isPromise(ish)) {
|
1693 | return new PromiseObservable_1.PromiseObservable(ish, scheduler);
|
1694 | }
|
1695 | else if (typeof ish[iterator_1.$$iterator] === 'function' || typeof ish === 'string') {
|
1696 | return new IteratorObservable_1.IteratorObservable(ish, null, null, scheduler);
|
1697 | }
|
1698 | else if (isArrayLike(ish)) {
|
1699 | return new ArrayLikeObservable_1.ArrayLikeObservable(ish, mapFn, thisArg, scheduler);
|
1700 | }
|
1701 | }
|
1702 | throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable');
|
1703 | };
|
1704 | FromObservable.prototype._subscribe = function (subscriber) {
|
1705 | var ish = this.ish;
|
1706 | var scheduler = this.scheduler;
|
1707 | if (scheduler == null) {
|
1708 | return ish[$$observable]().subscribe(subscriber);
|
1709 | }
|
1710 | else {
|
1711 | return ish[$$observable]().subscribe(new observeOn_1.ObserveOnSubscriber(subscriber, scheduler, 0));
|
1712 | }
|
1713 | };
|
1714 | return FromObservable;
|
1715 | }(Observable_1.Observable));
|
1716 | exports.FromObservable = FromObservable;
|
1717 |
|
1718 |
|
1719 | },
|
1720 |
|
1721 |
|
1722 |
|
1723 |
|
1724 | function(module, exports) {
|
1725 |
|
1726 | "use strict";
|
1727 | exports.isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
|
1728 |
|
1729 |
|
1730 | },
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 | function(module, exports) {
|
1736 |
|
1737 | "use strict";
|
1738 | function isFunction(x) {
|
1739 | return typeof x === 'function';
|
1740 | }
|
1741 | exports.isFunction = isFunction;
|
1742 |
|
1743 |
|
1744 | },
|
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 | function(module, exports) {
|
1750 |
|
1751 | "use strict";
|
1752 | function isPromise(value) {
|
1753 | return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
|
1754 | }
|
1755 | exports.isPromise = isPromise;
|
1756 |
|
1757 |
|
1758 | },
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 | function(module, exports) {
|
1764 |
|
1765 | "use strict";
|
1766 | function isScheduler(value) {
|
1767 | return value && typeof value.schedule === 'function';
|
1768 | }
|
1769 | exports.isScheduler = isScheduler;
|
1770 |
|
1771 |
|
1772 | },
|
1773 |
|
1774 |
|
1775 |
|
1776 |
|
1777 | function(module, exports, __webpack_require__) {
|
1778 |
|
1779 | "use strict";
|
1780 | var __extends = (this && this.__extends) || function (d, b) {
|
1781 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
1782 | function __() { this.constructor = d; }
|
1783 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1784 | };
|
1785 | var root_1 = __webpack_require__( 76);
|
1786 | var Observable_1 = __webpack_require__( 78);
|
1787 | |
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 | var PromiseObservable = (function (_super) {
|
1793 | __extends(PromiseObservable, _super);
|
1794 | function PromiseObservable(promise, scheduler) {
|
1795 | if (scheduler === void 0) { scheduler = null; }
|
1796 | _super.call(this);
|
1797 | this.promise = promise;
|
1798 | this.scheduler = scheduler;
|
1799 | }
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 | PromiseObservable.create = function (promise, scheduler) {
|
1827 | if (scheduler === void 0) { scheduler = null; }
|
1828 | return new PromiseObservable(promise, scheduler);
|
1829 | };
|
1830 | PromiseObservable.prototype._subscribe = function (subscriber) {
|
1831 | var _this = this;
|
1832 | var promise = this.promise;
|
1833 | var scheduler = this.scheduler;
|
1834 | if (scheduler == null) {
|
1835 | if (this._isScalar) {
|
1836 | if (!subscriber.isUnsubscribed) {
|
1837 | subscriber.next(this.value);
|
1838 | subscriber.complete();
|
1839 | }
|
1840 | }
|
1841 | else {
|
1842 | promise.then(function (value) {
|
1843 | _this.value = value;
|
1844 | _this._isScalar = true;
|
1845 | if (!subscriber.isUnsubscribed) {
|
1846 | subscriber.next(value);
|
1847 | subscriber.complete();
|
1848 | }
|
1849 | }, function (err) {
|
1850 | if (!subscriber.isUnsubscribed) {
|
1851 | subscriber.error(err);
|
1852 | }
|
1853 | })
|
1854 | .then(null, function (err) {
|
1855 |
|
1856 | root_1.root.setTimeout(function () { throw err; });
|
1857 | });
|
1858 | }
|
1859 | }
|
1860 | else {
|
1861 | if (this._isScalar) {
|
1862 | if (!subscriber.isUnsubscribed) {
|
1863 | return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber });
|
1864 | }
|
1865 | }
|
1866 | else {
|
1867 | promise.then(function (value) {
|
1868 | _this.value = value;
|
1869 | _this._isScalar = true;
|
1870 | if (!subscriber.isUnsubscribed) {
|
1871 | subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
|
1872 | }
|
1873 | }, function (err) {
|
1874 | if (!subscriber.isUnsubscribed) {
|
1875 | subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber }));
|
1876 | }
|
1877 | })
|
1878 | .then(null, function (err) {
|
1879 |
|
1880 | root_1.root.setTimeout(function () { throw err; });
|
1881 | });
|
1882 | }
|
1883 | }
|
1884 | };
|
1885 | return PromiseObservable;
|
1886 | }(Observable_1.Observable));
|
1887 | exports.PromiseObservable = PromiseObservable;
|
1888 | function dispatchNext(arg) {
|
1889 | var value = arg.value, subscriber = arg.subscriber;
|
1890 | if (!subscriber.isUnsubscribed) {
|
1891 | subscriber.next(value);
|
1892 | subscriber.complete();
|
1893 | }
|
1894 | }
|
1895 | function dispatchError(arg) {
|
1896 | var err = arg.err, subscriber = arg.subscriber;
|
1897 | if (!subscriber.isUnsubscribed) {
|
1898 | subscriber.error(err);
|
1899 | }
|
1900 | }
|
1901 |
|
1902 |
|
1903 | },
|
1904 |
|
1905 |
|
1906 |
|
1907 |
|
1908 | function(module, exports, __webpack_require__) {
|
1909 |
|
1910 | (function(module, global) {"use strict";
|
1911 | var objectTypes = {
|
1912 | 'boolean': false,
|
1913 | 'function': true,
|
1914 | 'object': true,
|
1915 | 'number': false,
|
1916 | 'string': false,
|
1917 | 'undefined': false
|
1918 | };
|
1919 | exports.root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window);
|
1920 |
|
1921 | var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
|
1922 | var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
|
1923 | var freeGlobal = objectTypes[typeof global] && global;
|
1924 | if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
|
1925 | exports.root = freeGlobal;
|
1926 | }
|
1927 |
|
1928 | }.call(exports, __webpack_require__( 77)(module), (function() { return this; }())))
|
1929 |
|
1930 | },
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 | function(module, exports) {
|
1936 |
|
1937 | module.exports = function(module) {
|
1938 | if(!module.webpackPolyfill) {
|
1939 | module.deprecate = function() {};
|
1940 | module.paths = [];
|
1941 |
|
1942 | module.children = [];
|
1943 | module.webpackPolyfill = 1;
|
1944 | }
|
1945 | return module;
|
1946 | }
|
1947 |
|
1948 |
|
1949 | },
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 | function(module, exports, __webpack_require__) {
|
1955 |
|
1956 | "use strict";
|
1957 | var root_1 = __webpack_require__( 76);
|
1958 | var toSubscriber_1 = __webpack_require__( 79);
|
1959 | var $$observable = __webpack_require__( 88);
|
1960 | |
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 | var Observable = (function () {
|
1967 | |
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 | function Observable(subscribe) {
|
1975 | this._isScalar = false;
|
1976 | if (subscribe) {
|
1977 | this._subscribe = subscribe;
|
1978 | }
|
1979 | }
|
1980 | |
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 | Observable.prototype.lift = function (operator) {
|
1988 | var observable = new Observable();
|
1989 | observable.source = this;
|
1990 | observable.operator = operator;
|
1991 | return observable;
|
1992 | };
|
1993 | |
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 | Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
2005 | var operator = this.operator;
|
2006 | var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);
|
2007 | sink.add(operator ? operator.call(sink, this) : this._subscribe(sink));
|
2008 | if (sink.syncErrorThrowable) {
|
2009 | sink.syncErrorThrowable = false;
|
2010 | if (sink.syncErrorThrown) {
|
2011 | throw sink.syncErrorValue;
|
2012 | }
|
2013 | }
|
2014 | return sink;
|
2015 | };
|
2016 | |
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 |
|
2022 |
|
2023 | Observable.prototype.forEach = function (next, PromiseCtor) {
|
2024 | var _this = this;
|
2025 | if (!PromiseCtor) {
|
2026 | if (root_1.root.Rx && root_1.root.Rx.config && root_1.root.Rx.config.Promise) {
|
2027 | PromiseCtor = root_1.root.Rx.config.Promise;
|
2028 | }
|
2029 | else if (root_1.root.Promise) {
|
2030 | PromiseCtor = root_1.root.Promise;
|
2031 | }
|
2032 | }
|
2033 | if (!PromiseCtor) {
|
2034 | throw new Error('no Promise impl found');
|
2035 | }
|
2036 | return new PromiseCtor(function (resolve, reject) {
|
2037 | var subscription = _this.subscribe(function (value) {
|
2038 | if (subscription) {
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 | try {
|
2044 | next(value);
|
2045 | }
|
2046 | catch (err) {
|
2047 | reject(err);
|
2048 | subscription.unsubscribe();
|
2049 | }
|
2050 | }
|
2051 | else {
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 | next(value);
|
2059 | }
|
2060 | }, reject, resolve);
|
2061 | });
|
2062 | };
|
2063 | Observable.prototype._subscribe = function (subscriber) {
|
2064 | return this.source.subscribe(subscriber);
|
2065 | };
|
2066 | |
2067 |
|
2068 |
|
2069 |
|
2070 |
|
2071 | Observable.prototype[$$observable] = function () {
|
2072 | return this;
|
2073 | };
|
2074 |
|
2075 |
|
2076 | |
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 |
|
2082 |
|
2083 |
|
2084 | Observable.create = function (subscribe) {
|
2085 | return new Observable(subscribe);
|
2086 | };
|
2087 | return Observable;
|
2088 | }());
|
2089 | exports.Observable = Observable;
|
2090 |
|
2091 |
|
2092 | },
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 | function(module, exports, __webpack_require__) {
|
2098 |
|
2099 | "use strict";
|
2100 | var Subscriber_1 = __webpack_require__( 80);
|
2101 | var rxSubscriber_1 = __webpack_require__( 86);
|
2102 | function toSubscriber(nextOrObserver, error, complete) {
|
2103 | if (nextOrObserver && typeof nextOrObserver === 'object') {
|
2104 | if (nextOrObserver instanceof Subscriber_1.Subscriber) {
|
2105 | return nextOrObserver;
|
2106 | }
|
2107 | else if (typeof nextOrObserver[rxSubscriber_1.$$rxSubscriber] === 'function') {
|
2108 | return nextOrObserver[rxSubscriber_1.$$rxSubscriber]();
|
2109 | }
|
2110 | }
|
2111 | return new Subscriber_1.Subscriber(nextOrObserver, error, complete);
|
2112 | }
|
2113 | exports.toSubscriber = toSubscriber;
|
2114 |
|
2115 |
|
2116 | },
|
2117 |
|
2118 |
|
2119 |
|
2120 |
|
2121 | function(module, exports, __webpack_require__) {
|
2122 |
|
2123 | "use strict";
|
2124 | var __extends = (this && this.__extends) || function (d, b) {
|
2125 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2126 | function __() { this.constructor = d; }
|
2127 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2128 | };
|
2129 | var isFunction_1 = __webpack_require__( 72);
|
2130 | var Subscription_1 = __webpack_require__( 81);
|
2131 | var rxSubscriber_1 = __webpack_require__( 86);
|
2132 | var Observer_1 = __webpack_require__( 87);
|
2133 | |
2134 |
|
2135 |
|
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 | var Subscriber = (function (_super) {
|
2144 | __extends(Subscriber, _super);
|
2145 | |
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 | function Subscriber(destinationOrNext, error, complete) {
|
2154 | _super.call(this);
|
2155 | this.syncErrorValue = null;
|
2156 | this.syncErrorThrown = false;
|
2157 | this.syncErrorThrowable = false;
|
2158 | this.isStopped = false;
|
2159 | switch (arguments.length) {
|
2160 | case 0:
|
2161 | this.destination = Observer_1.empty;
|
2162 | break;
|
2163 | case 1:
|
2164 | if (!destinationOrNext) {
|
2165 | this.destination = Observer_1.empty;
|
2166 | break;
|
2167 | }
|
2168 | if (typeof destinationOrNext === 'object') {
|
2169 | if (destinationOrNext instanceof Subscriber) {
|
2170 | this.destination = destinationOrNext;
|
2171 | this.destination.add(this);
|
2172 | }
|
2173 | else {
|
2174 | this.syncErrorThrowable = true;
|
2175 | this.destination = new SafeSubscriber(this, destinationOrNext);
|
2176 | }
|
2177 | break;
|
2178 | }
|
2179 | default:
|
2180 | this.syncErrorThrowable = true;
|
2181 | this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);
|
2182 | break;
|
2183 | }
|
2184 | }
|
2185 | |
2186 |
|
2187 |
|
2188 |
|
2189 |
|
2190 |
|
2191 |
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 | Subscriber.create = function (next, error, complete) {
|
2197 | var subscriber = new Subscriber(next, error, complete);
|
2198 | subscriber.syncErrorThrowable = false;
|
2199 | return subscriber;
|
2200 | };
|
2201 | |
2202 |
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 | Subscriber.prototype.next = function (value) {
|
2209 | if (!this.isStopped) {
|
2210 | this._next(value);
|
2211 | }
|
2212 | };
|
2213 | |
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 |
|
2220 | Subscriber.prototype.error = function (err) {
|
2221 | if (!this.isStopped) {
|
2222 | this.isStopped = true;
|
2223 | this._error(err);
|
2224 | }
|
2225 | };
|
2226 | |
2227 |
|
2228 |
|
2229 |
|
2230 |
|
2231 |
|
2232 | Subscriber.prototype.complete = function () {
|
2233 | if (!this.isStopped) {
|
2234 | this.isStopped = true;
|
2235 | this._complete();
|
2236 | }
|
2237 | };
|
2238 | Subscriber.prototype.unsubscribe = function () {
|
2239 | if (this.isUnsubscribed) {
|
2240 | return;
|
2241 | }
|
2242 | this.isStopped = true;
|
2243 | _super.prototype.unsubscribe.call(this);
|
2244 | };
|
2245 | Subscriber.prototype._next = function (value) {
|
2246 | this.destination.next(value);
|
2247 | };
|
2248 | Subscriber.prototype._error = function (err) {
|
2249 | this.destination.error(err);
|
2250 | this.unsubscribe();
|
2251 | };
|
2252 | Subscriber.prototype._complete = function () {
|
2253 | this.destination.complete();
|
2254 | this.unsubscribe();
|
2255 | };
|
2256 | Subscriber.prototype[rxSubscriber_1.$$rxSubscriber] = function () {
|
2257 | return this;
|
2258 | };
|
2259 | return Subscriber;
|
2260 | }(Subscription_1.Subscription));
|
2261 | exports.Subscriber = Subscriber;
|
2262 | |
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 | var SafeSubscriber = (function (_super) {
|
2268 | __extends(SafeSubscriber, _super);
|
2269 | function SafeSubscriber(_parent, observerOrNext, error, complete) {
|
2270 | _super.call(this);
|
2271 | this._parent = _parent;
|
2272 | var next;
|
2273 | var context = this;
|
2274 | if (isFunction_1.isFunction(observerOrNext)) {
|
2275 | next = observerOrNext;
|
2276 | }
|
2277 | else if (observerOrNext) {
|
2278 | context = observerOrNext;
|
2279 | next = observerOrNext.next;
|
2280 | error = observerOrNext.error;
|
2281 | complete = observerOrNext.complete;
|
2282 | if (isFunction_1.isFunction(context.unsubscribe)) {
|
2283 | this.add(context.unsubscribe.bind(context));
|
2284 | }
|
2285 | context.unsubscribe = this.unsubscribe.bind(this);
|
2286 | }
|
2287 | this._context = context;
|
2288 | this._next = next;
|
2289 | this._error = error;
|
2290 | this._complete = complete;
|
2291 | }
|
2292 | SafeSubscriber.prototype.next = function (value) {
|
2293 | if (!this.isStopped && this._next) {
|
2294 | var _parent = this._parent;
|
2295 | if (!_parent.syncErrorThrowable) {
|
2296 | this.__tryOrUnsub(this._next, value);
|
2297 | }
|
2298 | else if (this.__tryOrSetError(_parent, this._next, value)) {
|
2299 | this.unsubscribe();
|
2300 | }
|
2301 | }
|
2302 | };
|
2303 | SafeSubscriber.prototype.error = function (err) {
|
2304 | if (!this.isStopped) {
|
2305 | var _parent = this._parent;
|
2306 | if (this._error) {
|
2307 | if (!_parent.syncErrorThrowable) {
|
2308 | this.__tryOrUnsub(this._error, err);
|
2309 | this.unsubscribe();
|
2310 | }
|
2311 | else {
|
2312 | this.__tryOrSetError(_parent, this._error, err);
|
2313 | this.unsubscribe();
|
2314 | }
|
2315 | }
|
2316 | else if (!_parent.syncErrorThrowable) {
|
2317 | this.unsubscribe();
|
2318 | throw err;
|
2319 | }
|
2320 | else {
|
2321 | _parent.syncErrorValue = err;
|
2322 | _parent.syncErrorThrown = true;
|
2323 | this.unsubscribe();
|
2324 | }
|
2325 | }
|
2326 | };
|
2327 | SafeSubscriber.prototype.complete = function () {
|
2328 | if (!this.isStopped) {
|
2329 | var _parent = this._parent;
|
2330 | if (this._complete) {
|
2331 | if (!_parent.syncErrorThrowable) {
|
2332 | this.__tryOrUnsub(this._complete);
|
2333 | this.unsubscribe();
|
2334 | }
|
2335 | else {
|
2336 | this.__tryOrSetError(_parent, this._complete);
|
2337 | this.unsubscribe();
|
2338 | }
|
2339 | }
|
2340 | else {
|
2341 | this.unsubscribe();
|
2342 | }
|
2343 | }
|
2344 | };
|
2345 | SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
|
2346 | try {
|
2347 | fn.call(this._context, value);
|
2348 | }
|
2349 | catch (err) {
|
2350 | this.unsubscribe();
|
2351 | throw err;
|
2352 | }
|
2353 | };
|
2354 | SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
|
2355 | try {
|
2356 | fn.call(this._context, value);
|
2357 | }
|
2358 | catch (err) {
|
2359 | parent.syncErrorValue = err;
|
2360 | parent.syncErrorThrown = true;
|
2361 | return true;
|
2362 | }
|
2363 | return false;
|
2364 | };
|
2365 | SafeSubscriber.prototype._unsubscribe = function () {
|
2366 | var _parent = this._parent;
|
2367 | this._context = null;
|
2368 | this._parent = null;
|
2369 | _parent.unsubscribe();
|
2370 | };
|
2371 | return SafeSubscriber;
|
2372 | }(Subscriber));
|
2373 |
|
2374 |
|
2375 | },
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 | function(module, exports, __webpack_require__) {
|
2381 |
|
2382 | "use strict";
|
2383 | var isArray_1 = __webpack_require__( 71);
|
2384 | var isObject_1 = __webpack_require__( 82);
|
2385 | var isFunction_1 = __webpack_require__( 72);
|
2386 | var tryCatch_1 = __webpack_require__( 83);
|
2387 | var errorObject_1 = __webpack_require__( 84);
|
2388 | var UnsubscriptionError_1 = __webpack_require__( 85);
|
2389 | |
2390 |
|
2391 |
|
2392 |
|
2393 |
|
2394 |
|
2395 |
|
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 |
|
2401 | var Subscription = (function () {
|
2402 | |
2403 |
|
2404 |
|
2405 |
|
2406 | function Subscription(unsubscribe) {
|
2407 | |
2408 |
|
2409 |
|
2410 |
|
2411 | this.isUnsubscribed = false;
|
2412 | if (unsubscribe) {
|
2413 | this._unsubscribe = unsubscribe;
|
2414 | }
|
2415 | }
|
2416 | |
2417 |
|
2418 |
|
2419 |
|
2420 |
|
2421 |
|
2422 | Subscription.prototype.unsubscribe = function () {
|
2423 | var hasErrors = false;
|
2424 | var errors;
|
2425 | if (this.isUnsubscribed) {
|
2426 | return;
|
2427 | }
|
2428 | this.isUnsubscribed = true;
|
2429 | var _a = this, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
|
2430 | this._subscriptions = null;
|
2431 | if (isFunction_1.isFunction(_unsubscribe)) {
|
2432 | var trial = tryCatch_1.tryCatch(_unsubscribe).call(this);
|
2433 | if (trial === errorObject_1.errorObject) {
|
2434 | hasErrors = true;
|
2435 | (errors = errors || []).push(errorObject_1.errorObject.e);
|
2436 | }
|
2437 | }
|
2438 | if (isArray_1.isArray(_subscriptions)) {
|
2439 | var index = -1;
|
2440 | var len = _subscriptions.length;
|
2441 | while (++index < len) {
|
2442 | var sub = _subscriptions[index];
|
2443 | if (isObject_1.isObject(sub)) {
|
2444 | var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub);
|
2445 | if (trial === errorObject_1.errorObject) {
|
2446 | hasErrors = true;
|
2447 | errors = errors || [];
|
2448 | var err = errorObject_1.errorObject.e;
|
2449 | if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {
|
2450 | errors = errors.concat(err.errors);
|
2451 | }
|
2452 | else {
|
2453 | errors.push(err);
|
2454 | }
|
2455 | }
|
2456 | }
|
2457 | }
|
2458 | }
|
2459 | if (hasErrors) {
|
2460 | throw new UnsubscriptionError_1.UnsubscriptionError(errors);
|
2461 | }
|
2462 | };
|
2463 | |
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
2469 |
|
2470 |
|
2471 |
|
2472 |
|
2473 |
|
2474 |
|
2475 |
|
2476 |
|
2477 |
|
2478 |
|
2479 |
|
2480 |
|
2481 | Subscription.prototype.add = function (teardown) {
|
2482 | if (!teardown || (teardown === this) || (teardown === Subscription.EMPTY)) {
|
2483 | return;
|
2484 | }
|
2485 | var sub = teardown;
|
2486 | switch (typeof teardown) {
|
2487 | case 'function':
|
2488 | sub = new Subscription(teardown);
|
2489 | case 'object':
|
2490 | if (sub.isUnsubscribed || typeof sub.unsubscribe !== 'function') {
|
2491 | break;
|
2492 | }
|
2493 | else if (this.isUnsubscribed) {
|
2494 | sub.unsubscribe();
|
2495 | }
|
2496 | else {
|
2497 | (this._subscriptions || (this._subscriptions = [])).push(sub);
|
2498 | }
|
2499 | break;
|
2500 | default:
|
2501 | throw new Error('Unrecognized teardown ' + teardown + ' added to Subscription.');
|
2502 | }
|
2503 | return sub;
|
2504 | };
|
2505 | |
2506 |
|
2507 |
|
2508 |
|
2509 |
|
2510 |
|
2511 | Subscription.prototype.remove = function (subscription) {
|
2512 |
|
2513 | if (subscription == null || (subscription === this) || (subscription === Subscription.EMPTY)) {
|
2514 | return;
|
2515 | }
|
2516 | var subscriptions = this._subscriptions;
|
2517 | if (subscriptions) {
|
2518 | var subscriptionIndex = subscriptions.indexOf(subscription);
|
2519 | if (subscriptionIndex !== -1) {
|
2520 | subscriptions.splice(subscriptionIndex, 1);
|
2521 | }
|
2522 | }
|
2523 | };
|
2524 | Subscription.EMPTY = (function (empty) {
|
2525 | empty.isUnsubscribed = true;
|
2526 | return empty;
|
2527 | }(new Subscription()));
|
2528 | return Subscription;
|
2529 | }());
|
2530 | exports.Subscription = Subscription;
|
2531 |
|
2532 |
|
2533 | },
|
2534 |
|
2535 |
|
2536 |
|
2537 |
|
2538 | function(module, exports) {
|
2539 |
|
2540 | "use strict";
|
2541 | function isObject(x) {
|
2542 | return x != null && typeof x === 'object';
|
2543 | }
|
2544 | exports.isObject = isObject;
|
2545 |
|
2546 |
|
2547 | },
|
2548 |
|
2549 |
|
2550 |
|
2551 |
|
2552 | function(module, exports, __webpack_require__) {
|
2553 |
|
2554 | "use strict";
|
2555 | var errorObject_1 = __webpack_require__( 84);
|
2556 | var tryCatchTarget;
|
2557 | function tryCatcher() {
|
2558 | try {
|
2559 | return tryCatchTarget.apply(this, arguments);
|
2560 | }
|
2561 | catch (e) {
|
2562 | errorObject_1.errorObject.e = e;
|
2563 | return errorObject_1.errorObject;
|
2564 | }
|
2565 | }
|
2566 | function tryCatch(fn) {
|
2567 | tryCatchTarget = fn;
|
2568 | return tryCatcher;
|
2569 | }
|
2570 | exports.tryCatch = tryCatch;
|
2571 | ;
|
2572 |
|
2573 |
|
2574 | },
|
2575 |
|
2576 |
|
2577 |
|
2578 |
|
2579 | function(module, exports) {
|
2580 |
|
2581 | "use strict";
|
2582 |
|
2583 | exports.errorObject = { e: {} };
|
2584 |
|
2585 |
|
2586 | },
|
2587 |
|
2588 |
|
2589 |
|
2590 |
|
2591 | function(module, exports) {
|
2592 |
|
2593 | "use strict";
|
2594 | var __extends = (this && this.__extends) || function (d, b) {
|
2595 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2596 | function __() { this.constructor = d; }
|
2597 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2598 | };
|
2599 | |
2600 |
|
2601 |
|
2602 |
|
2603 | var UnsubscriptionError = (function (_super) {
|
2604 | __extends(UnsubscriptionError, _super);
|
2605 | function UnsubscriptionError(errors) {
|
2606 | _super.call(this);
|
2607 | this.errors = errors;
|
2608 | this.name = 'UnsubscriptionError';
|
2609 | this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return ((i + 1) + ") " + err.toString()); }).join('\n') : '';
|
2610 | }
|
2611 | return UnsubscriptionError;
|
2612 | }(Error));
|
2613 | exports.UnsubscriptionError = UnsubscriptionError;
|
2614 |
|
2615 |
|
2616 | },
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 | function(module, exports, __webpack_require__) {
|
2622 |
|
2623 | "use strict";
|
2624 | var root_1 = __webpack_require__( 76);
|
2625 | var Symbol = root_1.root.Symbol;
|
2626 | exports.$$rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ?
|
2627 | Symbol.for('rxSubscriber') : '@@rxSubscriber';
|
2628 |
|
2629 |
|
2630 | },
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 | function(module, exports) {
|
2636 |
|
2637 | "use strict";
|
2638 | exports.empty = {
|
2639 | isUnsubscribed: true,
|
2640 | next: function (value) { },
|
2641 | error: function (err) { throw err; },
|
2642 | complete: function () { }
|
2643 | };
|
2644 |
|
2645 |
|
2646 | },
|
2647 |
|
2648 |
|
2649 |
|
2650 |
|
2651 | function(module, exports, __webpack_require__) {
|
2652 |
|
2653 | (function(global) {
|
2654 | 'use strict';
|
2655 |
|
2656 | module.exports = __webpack_require__( 89)(global || window || this);
|
2657 |
|
2658 | }.call(exports, (function() { return this; }())))
|
2659 |
|
2660 | },
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 | function(module, exports) {
|
2666 |
|
2667 | 'use strict';
|
2668 |
|
2669 | module.exports = function symbolObservablePonyfill(root) {
|
2670 | var result;
|
2671 | var Symbol = root.Symbol;
|
2672 |
|
2673 | if (typeof Symbol === 'function') {
|
2674 | if (Symbol.observable) {
|
2675 | result = Symbol.observable;
|
2676 | } else {
|
2677 | result = Symbol('observable');
|
2678 | Symbol.observable = result;
|
2679 | }
|
2680 | } else {
|
2681 | result = '@@observable';
|
2682 | }
|
2683 |
|
2684 | return result;
|
2685 | };
|
2686 |
|
2687 |
|
2688 | },
|
2689 |
|
2690 |
|
2691 |
|
2692 |
|
2693 | function(module, exports, __webpack_require__) {
|
2694 |
|
2695 | "use strict";
|
2696 | var __extends = (this && this.__extends) || function (d, b) {
|
2697 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2698 | function __() { this.constructor = d; }
|
2699 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2700 | };
|
2701 | var root_1 = __webpack_require__( 76);
|
2702 | var isObject_1 = __webpack_require__( 82);
|
2703 | var tryCatch_1 = __webpack_require__( 83);
|
2704 | var Observable_1 = __webpack_require__( 78);
|
2705 | var isFunction_1 = __webpack_require__( 72);
|
2706 | var iterator_1 = __webpack_require__( 91);
|
2707 | var errorObject_1 = __webpack_require__( 84);
|
2708 | |
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 | var IteratorObservable = (function (_super) {
|
2714 | __extends(IteratorObservable, _super);
|
2715 | function IteratorObservable(iterator, project, thisArg, scheduler) {
|
2716 | _super.call(this);
|
2717 | if (iterator == null) {
|
2718 | throw new Error('iterator cannot be null.');
|
2719 | }
|
2720 | if (isObject_1.isObject(project)) {
|
2721 | this.thisArg = project;
|
2722 | this.scheduler = thisArg;
|
2723 | }
|
2724 | else if (isFunction_1.isFunction(project)) {
|
2725 | this.project = project;
|
2726 | this.thisArg = thisArg;
|
2727 | this.scheduler = scheduler;
|
2728 | }
|
2729 | else if (project != null) {
|
2730 | throw new Error('When provided, `project` must be a function.');
|
2731 | }
|
2732 | this.iterator = getIterator(iterator);
|
2733 | }
|
2734 | IteratorObservable.create = function (iterator, project, thisArg, scheduler) {
|
2735 | return new IteratorObservable(iterator, project, thisArg, scheduler);
|
2736 | };
|
2737 | IteratorObservable.dispatch = function (state) {
|
2738 | var index = state.index, hasError = state.hasError, thisArg = state.thisArg, project = state.project, iterator = state.iterator, subscriber = state.subscriber;
|
2739 | if (hasError) {
|
2740 | subscriber.error(state.error);
|
2741 | return;
|
2742 | }
|
2743 | var result = iterator.next();
|
2744 | if (result.done) {
|
2745 | subscriber.complete();
|
2746 | return;
|
2747 | }
|
2748 | if (project) {
|
2749 | result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index);
|
2750 | if (result === errorObject_1.errorObject) {
|
2751 | state.error = errorObject_1.errorObject.e;
|
2752 | state.hasError = true;
|
2753 | }
|
2754 | else {
|
2755 | subscriber.next(result);
|
2756 | state.index = index + 1;
|
2757 | }
|
2758 | }
|
2759 | else {
|
2760 | subscriber.next(result.value);
|
2761 | state.index = index + 1;
|
2762 | }
|
2763 | if (subscriber.isUnsubscribed) {
|
2764 | return;
|
2765 | }
|
2766 | this.schedule(state);
|
2767 | };
|
2768 | IteratorObservable.prototype._subscribe = function (subscriber) {
|
2769 | var index = 0;
|
2770 | var _a = this, iterator = _a.iterator, project = _a.project, thisArg = _a.thisArg, scheduler = _a.scheduler;
|
2771 | if (scheduler) {
|
2772 | return scheduler.schedule(IteratorObservable.dispatch, 0, {
|
2773 | index: index, thisArg: thisArg, project: project, iterator: iterator, subscriber: subscriber
|
2774 | });
|
2775 | }
|
2776 | else {
|
2777 | do {
|
2778 | var result = iterator.next();
|
2779 | if (result.done) {
|
2780 | subscriber.complete();
|
2781 | break;
|
2782 | }
|
2783 | else if (project) {
|
2784 | result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index++);
|
2785 | if (result === errorObject_1.errorObject) {
|
2786 | subscriber.error(errorObject_1.errorObject.e);
|
2787 | break;
|
2788 | }
|
2789 | subscriber.next(result);
|
2790 | }
|
2791 | else {
|
2792 | subscriber.next(result.value);
|
2793 | }
|
2794 | if (subscriber.isUnsubscribed) {
|
2795 | break;
|
2796 | }
|
2797 | } while (true);
|
2798 | }
|
2799 | };
|
2800 | return IteratorObservable;
|
2801 | }(Observable_1.Observable));
|
2802 | exports.IteratorObservable = IteratorObservable;
|
2803 | var StringIterator = (function () {
|
2804 | function StringIterator(str, idx, len) {
|
2805 | if (idx === void 0) { idx = 0; }
|
2806 | if (len === void 0) { len = str.length; }
|
2807 | this.str = str;
|
2808 | this.idx = idx;
|
2809 | this.len = len;
|
2810 | }
|
2811 | StringIterator.prototype[iterator_1.$$iterator] = function () { return (this); };
|
2812 | StringIterator.prototype.next = function () {
|
2813 | return this.idx < this.len ? {
|
2814 | done: false,
|
2815 | value: this.str.charAt(this.idx++)
|
2816 | } : {
|
2817 | done: true,
|
2818 | value: undefined
|
2819 | };
|
2820 | };
|
2821 | return StringIterator;
|
2822 | }());
|
2823 | var ArrayIterator = (function () {
|
2824 | function ArrayIterator(arr, idx, len) {
|
2825 | if (idx === void 0) { idx = 0; }
|
2826 | if (len === void 0) { len = toLength(arr); }
|
2827 | this.arr = arr;
|
2828 | this.idx = idx;
|
2829 | this.len = len;
|
2830 | }
|
2831 | ArrayIterator.prototype[iterator_1.$$iterator] = function () { return this; };
|
2832 | ArrayIterator.prototype.next = function () {
|
2833 | return this.idx < this.len ? {
|
2834 | done: false,
|
2835 | value: this.arr[this.idx++]
|
2836 | } : {
|
2837 | done: true,
|
2838 | value: undefined
|
2839 | };
|
2840 | };
|
2841 | return ArrayIterator;
|
2842 | }());
|
2843 | function getIterator(obj) {
|
2844 | var i = obj[iterator_1.$$iterator];
|
2845 | if (!i && typeof obj === 'string') {
|
2846 | return new StringIterator(obj);
|
2847 | }
|
2848 | if (!i && obj.length !== undefined) {
|
2849 | return new ArrayIterator(obj);
|
2850 | }
|
2851 | if (!i) {
|
2852 | throw new TypeError('Object is not iterable');
|
2853 | }
|
2854 | return obj[iterator_1.$$iterator]();
|
2855 | }
|
2856 | var maxSafeInteger = Math.pow(2, 53) - 1;
|
2857 | function toLength(o) {
|
2858 | var len = +o.length;
|
2859 | if (isNaN(len)) {
|
2860 | return 0;
|
2861 | }
|
2862 | if (len === 0 || !numberIsFinite(len)) {
|
2863 | return len;
|
2864 | }
|
2865 | len = sign(len) * Math.floor(Math.abs(len));
|
2866 | if (len <= 0) {
|
2867 | return 0;
|
2868 | }
|
2869 | if (len > maxSafeInteger) {
|
2870 | return maxSafeInteger;
|
2871 | }
|
2872 | return len;
|
2873 | }
|
2874 | function numberIsFinite(value) {
|
2875 | return typeof value === 'number' && root_1.root.isFinite(value);
|
2876 | }
|
2877 | function sign(value) {
|
2878 | var valueAsNumber = +value;
|
2879 | if (valueAsNumber === 0) {
|
2880 | return valueAsNumber;
|
2881 | }
|
2882 | if (isNaN(valueAsNumber)) {
|
2883 | return valueAsNumber;
|
2884 | }
|
2885 | return valueAsNumber < 0 ? -1 : 1;
|
2886 | }
|
2887 |
|
2888 |
|
2889 | },
|
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 | function(module, exports, __webpack_require__) {
|
2895 |
|
2896 | "use strict";
|
2897 | var root_1 = __webpack_require__( 76);
|
2898 | var Symbol = root_1.root.Symbol;
|
2899 | if (typeof Symbol === 'function') {
|
2900 | if (Symbol.iterator) {
|
2901 | exports.$$iterator = Symbol.iterator;
|
2902 | }
|
2903 | else if (typeof Symbol.for === 'function') {
|
2904 | exports.$$iterator = Symbol.for('iterator');
|
2905 | }
|
2906 | }
|
2907 | else {
|
2908 | if (root_1.root.Set && typeof new root_1.root.Set()['@@iterator'] === 'function') {
|
2909 |
|
2910 | exports.$$iterator = '@@iterator';
|
2911 | }
|
2912 | else if (root_1.root.Map) {
|
2913 |
|
2914 | var keys = Object.getOwnPropertyNames(root_1.root.Map.prototype);
|
2915 | for (var i = 0; i < keys.length; ++i) {
|
2916 | var key = keys[i];
|
2917 | if (key !== 'entries' && key !== 'size' && root_1.root.Map.prototype[key] === root_1.root.Map.prototype['entries']) {
|
2918 | exports.$$iterator = key;
|
2919 | break;
|
2920 | }
|
2921 | }
|
2922 | }
|
2923 | else {
|
2924 | exports.$$iterator = '@@iterator';
|
2925 | }
|
2926 | }
|
2927 |
|
2928 |
|
2929 | },
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 | function(module, exports, __webpack_require__) {
|
2935 |
|
2936 | "use strict";
|
2937 | var __extends = (this && this.__extends) || function (d, b) {
|
2938 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2939 | function __() { this.constructor = d; }
|
2940 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2941 | };
|
2942 | var Observable_1 = __webpack_require__( 78);
|
2943 | var ScalarObservable_1 = __webpack_require__( 93);
|
2944 | var EmptyObservable_1 = __webpack_require__( 94);
|
2945 | var isScheduler_1 = __webpack_require__( 74);
|
2946 | |
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 | var ArrayObservable = (function (_super) {
|
2952 | __extends(ArrayObservable, _super);
|
2953 | function ArrayObservable(array, scheduler) {
|
2954 | _super.call(this);
|
2955 | this.array = array;
|
2956 | this.scheduler = scheduler;
|
2957 | if (!scheduler && array.length === 1) {
|
2958 | this._isScalar = true;
|
2959 | this.value = array[0];
|
2960 | }
|
2961 | }
|
2962 | ArrayObservable.create = function (array, scheduler) {
|
2963 | return new ArrayObservable(array, scheduler);
|
2964 | };
|
2965 | |
2966 |
|
2967 |
|
2968 |
|
2969 |
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 |
|
2998 |
|
2999 |
|
3000 |
|
3001 | ArrayObservable.of = function () {
|
3002 | var array = [];
|
3003 | for (var _i = 0; _i < arguments.length; _i++) {
|
3004 | array[_i - 0] = arguments[_i];
|
3005 | }
|
3006 | var scheduler = array[array.length - 1];
|
3007 | if (isScheduler_1.isScheduler(scheduler)) {
|
3008 | array.pop();
|
3009 | }
|
3010 | else {
|
3011 | scheduler = null;
|
3012 | }
|
3013 | var len = array.length;
|
3014 | if (len > 1) {
|
3015 | return new ArrayObservable(array, scheduler);
|
3016 | }
|
3017 | else if (len === 1) {
|
3018 | return new ScalarObservable_1.ScalarObservable(array[0], scheduler);
|
3019 | }
|
3020 | else {
|
3021 | return new EmptyObservable_1.EmptyObservable(scheduler);
|
3022 | }
|
3023 | };
|
3024 | ArrayObservable.dispatch = function (state) {
|
3025 | var array = state.array, index = state.index, count = state.count, subscriber = state.subscriber;
|
3026 | if (index >= count) {
|
3027 | subscriber.complete();
|
3028 | return;
|
3029 | }
|
3030 | subscriber.next(array[index]);
|
3031 | if (subscriber.isUnsubscribed) {
|
3032 | return;
|
3033 | }
|
3034 | state.index = index + 1;
|
3035 | this.schedule(state);
|
3036 | };
|
3037 | ArrayObservable.prototype._subscribe = function (subscriber) {
|
3038 | var index = 0;
|
3039 | var array = this.array;
|
3040 | var count = array.length;
|
3041 | var scheduler = this.scheduler;
|
3042 | if (scheduler) {
|
3043 | return scheduler.schedule(ArrayObservable.dispatch, 0, {
|
3044 | array: array, index: index, count: count, subscriber: subscriber
|
3045 | });
|
3046 | }
|
3047 | else {
|
3048 | for (var i = 0; i < count && !subscriber.isUnsubscribed; i++) {
|
3049 | subscriber.next(array[i]);
|
3050 | }
|
3051 | subscriber.complete();
|
3052 | }
|
3053 | };
|
3054 | return ArrayObservable;
|
3055 | }(Observable_1.Observable));
|
3056 | exports.ArrayObservable = ArrayObservable;
|
3057 |
|
3058 |
|
3059 | },
|
3060 |
|
3061 |
|
3062 |
|
3063 |
|
3064 | function(module, exports, __webpack_require__) {
|
3065 |
|
3066 | "use strict";
|
3067 | var __extends = (this && this.__extends) || function (d, b) {
|
3068 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3069 | function __() { this.constructor = d; }
|
3070 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3071 | };
|
3072 | var Observable_1 = __webpack_require__( 78);
|
3073 | |
3074 |
|
3075 |
|
3076 |
|
3077 |
|
3078 | var ScalarObservable = (function (_super) {
|
3079 | __extends(ScalarObservable, _super);
|
3080 | function ScalarObservable(value, scheduler) {
|
3081 | _super.call(this);
|
3082 | this.value = value;
|
3083 | this.scheduler = scheduler;
|
3084 | this._isScalar = true;
|
3085 | }
|
3086 | ScalarObservable.create = function (value, scheduler) {
|
3087 | return new ScalarObservable(value, scheduler);
|
3088 | };
|
3089 | ScalarObservable.dispatch = function (state) {
|
3090 | var done = state.done, value = state.value, subscriber = state.subscriber;
|
3091 | if (done) {
|
3092 | subscriber.complete();
|
3093 | return;
|
3094 | }
|
3095 | subscriber.next(value);
|
3096 | if (subscriber.isUnsubscribed) {
|
3097 | return;
|
3098 | }
|
3099 | state.done = true;
|
3100 | this.schedule(state);
|
3101 | };
|
3102 | ScalarObservable.prototype._subscribe = function (subscriber) {
|
3103 | var value = this.value;
|
3104 | var scheduler = this.scheduler;
|
3105 | if (scheduler) {
|
3106 | return scheduler.schedule(ScalarObservable.dispatch, 0, {
|
3107 | done: false, value: value, subscriber: subscriber
|
3108 | });
|
3109 | }
|
3110 | else {
|
3111 | subscriber.next(value);
|
3112 | if (!subscriber.isUnsubscribed) {
|
3113 | subscriber.complete();
|
3114 | }
|
3115 | }
|
3116 | };
|
3117 | return ScalarObservable;
|
3118 | }(Observable_1.Observable));
|
3119 | exports.ScalarObservable = ScalarObservable;
|
3120 |
|
3121 |
|
3122 | },
|
3123 |
|
3124 |
|
3125 |
|
3126 |
|
3127 | function(module, exports, __webpack_require__) {
|
3128 |
|
3129 | "use strict";
|
3130 | var __extends = (this && this.__extends) || function (d, b) {
|
3131 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3132 | function __() { this.constructor = d; }
|
3133 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3134 | };
|
3135 | var Observable_1 = __webpack_require__( 78);
|
3136 | |
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 | var EmptyObservable = (function (_super) {
|
3142 | __extends(EmptyObservable, _super);
|
3143 | function EmptyObservable(scheduler) {
|
3144 | _super.call(this);
|
3145 | this.scheduler = scheduler;
|
3146 | }
|
3147 | |
3148 |
|
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 |
|
3155 |
|
3156 |
|
3157 |
|
3158 |
|
3159 |
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 |
|
3171 |
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 |
|
3184 | EmptyObservable.create = function (scheduler) {
|
3185 | return new EmptyObservable(scheduler);
|
3186 | };
|
3187 | EmptyObservable.dispatch = function (arg) {
|
3188 | var subscriber = arg.subscriber;
|
3189 | subscriber.complete();
|
3190 | };
|
3191 | EmptyObservable.prototype._subscribe = function (subscriber) {
|
3192 | var scheduler = this.scheduler;
|
3193 | if (scheduler) {
|
3194 | return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });
|
3195 | }
|
3196 | else {
|
3197 | subscriber.complete();
|
3198 | }
|
3199 | };
|
3200 | return EmptyObservable;
|
3201 | }(Observable_1.Observable));
|
3202 | exports.EmptyObservable = EmptyObservable;
|
3203 |
|
3204 |
|
3205 | },
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 | function(module, exports, __webpack_require__) {
|
3211 |
|
3212 | "use strict";
|
3213 | var __extends = (this && this.__extends) || function (d, b) {
|
3214 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3215 | function __() { this.constructor = d; }
|
3216 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3217 | };
|
3218 | var Observable_1 = __webpack_require__( 78);
|
3219 | var ScalarObservable_1 = __webpack_require__( 93);
|
3220 | var EmptyObservable_1 = __webpack_require__( 94);
|
3221 | |
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 | var ArrayLikeObservable = (function (_super) {
|
3227 | __extends(ArrayLikeObservable, _super);
|
3228 | function ArrayLikeObservable(arrayLike, mapFn, thisArg, scheduler) {
|
3229 | _super.call(this);
|
3230 | this.arrayLike = arrayLike;
|
3231 | this.scheduler = scheduler;
|
3232 | if (!mapFn && !scheduler && arrayLike.length === 1) {
|
3233 | this._isScalar = true;
|
3234 | this.value = arrayLike[0];
|
3235 | }
|
3236 | if (mapFn) {
|
3237 | this.mapFn = mapFn.bind(thisArg);
|
3238 | }
|
3239 | }
|
3240 | ArrayLikeObservable.create = function (arrayLike, mapFn, thisArg, scheduler) {
|
3241 | var length = arrayLike.length;
|
3242 | if (length === 0) {
|
3243 | return new EmptyObservable_1.EmptyObservable();
|
3244 | }
|
3245 | else if (length === 1 && !mapFn) {
|
3246 | return new ScalarObservable_1.ScalarObservable(arrayLike[0], scheduler);
|
3247 | }
|
3248 | else {
|
3249 | return new ArrayLikeObservable(arrayLike, mapFn, thisArg, scheduler);
|
3250 | }
|
3251 | };
|
3252 | ArrayLikeObservable.dispatch = function (state) {
|
3253 | var arrayLike = state.arrayLike, index = state.index, length = state.length, mapFn = state.mapFn, subscriber = state.subscriber;
|
3254 | if (subscriber.isUnsubscribed) {
|
3255 | return;
|
3256 | }
|
3257 | if (index >= length) {
|
3258 | subscriber.complete();
|
3259 | return;
|
3260 | }
|
3261 | var result = mapFn ? mapFn(arrayLike[index], index) : arrayLike[index];
|
3262 | subscriber.next(result);
|
3263 | state.index = index + 1;
|
3264 | this.schedule(state);
|
3265 | };
|
3266 | ArrayLikeObservable.prototype._subscribe = function (subscriber) {
|
3267 | var index = 0;
|
3268 | var _a = this, arrayLike = _a.arrayLike, mapFn = _a.mapFn, scheduler = _a.scheduler;
|
3269 | var length = arrayLike.length;
|
3270 | if (scheduler) {
|
3271 | return scheduler.schedule(ArrayLikeObservable.dispatch, 0, {
|
3272 | arrayLike: arrayLike, index: index, length: length, mapFn: mapFn, subscriber: subscriber
|
3273 | });
|
3274 | }
|
3275 | else {
|
3276 | for (var i = 0; i < length && !subscriber.isUnsubscribed; i++) {
|
3277 | var result = mapFn ? mapFn(arrayLike[i], i) : arrayLike[i];
|
3278 | subscriber.next(result);
|
3279 | }
|
3280 | subscriber.complete();
|
3281 | }
|
3282 | };
|
3283 | return ArrayLikeObservable;
|
3284 | }(Observable_1.Observable));
|
3285 | exports.ArrayLikeObservable = ArrayLikeObservable;
|
3286 |
|
3287 |
|
3288 | },
|
3289 |
|
3290 |
|
3291 |
|
3292 |
|
3293 | function(module, exports, __webpack_require__) {
|
3294 |
|
3295 | "use strict";
|
3296 | var __extends = (this && this.__extends) || function (d, b) {
|
3297 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3298 | function __() { this.constructor = d; }
|
3299 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3300 | };
|
3301 | var Subscriber_1 = __webpack_require__( 80);
|
3302 | var Notification_1 = __webpack_require__( 97);
|
3303 | |
3304 |
|
3305 |
|
3306 |
|
3307 |
|
3308 |
|
3309 |
|
3310 |
|
3311 |
|
3312 | function observeOn(scheduler, delay) {
|
3313 | if (delay === void 0) { delay = 0; }
|
3314 | return this.lift(new ObserveOnOperator(scheduler, delay));
|
3315 | }
|
3316 | exports.observeOn = observeOn;
|
3317 | var ObserveOnOperator = (function () {
|
3318 | function ObserveOnOperator(scheduler, delay) {
|
3319 | if (delay === void 0) { delay = 0; }
|
3320 | this.scheduler = scheduler;
|
3321 | this.delay = delay;
|
3322 | }
|
3323 | ObserveOnOperator.prototype.call = function (subscriber, source) {
|
3324 | return source._subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
|
3325 | };
|
3326 | return ObserveOnOperator;
|
3327 | }());
|
3328 | exports.ObserveOnOperator = ObserveOnOperator;
|
3329 | |
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 | var ObserveOnSubscriber = (function (_super) {
|
3335 | __extends(ObserveOnSubscriber, _super);
|
3336 | function ObserveOnSubscriber(destination, scheduler, delay) {
|
3337 | if (delay === void 0) { delay = 0; }
|
3338 | _super.call(this, destination);
|
3339 | this.scheduler = scheduler;
|
3340 | this.delay = delay;
|
3341 | }
|
3342 | ObserveOnSubscriber.dispatch = function (arg) {
|
3343 | var notification = arg.notification, destination = arg.destination;
|
3344 | notification.observe(destination);
|
3345 | };
|
3346 | ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
|
3347 | this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
|
3348 | };
|
3349 | ObserveOnSubscriber.prototype._next = function (value) {
|
3350 | this.scheduleMessage(Notification_1.Notification.createNext(value));
|
3351 | };
|
3352 | ObserveOnSubscriber.prototype._error = function (err) {
|
3353 | this.scheduleMessage(Notification_1.Notification.createError(err));
|
3354 | };
|
3355 | ObserveOnSubscriber.prototype._complete = function () {
|
3356 | this.scheduleMessage(Notification_1.Notification.createComplete());
|
3357 | };
|
3358 | return ObserveOnSubscriber;
|
3359 | }(Subscriber_1.Subscriber));
|
3360 | exports.ObserveOnSubscriber = ObserveOnSubscriber;
|
3361 | var ObserveOnMessage = (function () {
|
3362 | function ObserveOnMessage(notification, destination) {
|
3363 | this.notification = notification;
|
3364 | this.destination = destination;
|
3365 | }
|
3366 | return ObserveOnMessage;
|
3367 | }());
|
3368 | exports.ObserveOnMessage = ObserveOnMessage;
|
3369 |
|
3370 |
|
3371 | },
|
3372 |
|
3373 |
|
3374 |
|
3375 |
|
3376 | function(module, exports, __webpack_require__) {
|
3377 |
|
3378 | "use strict";
|
3379 | var Observable_1 = __webpack_require__( 78);
|
3380 | |
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 |
|
3394 | var Notification = (function () {
|
3395 | function Notification(kind, value, exception) {
|
3396 | this.kind = kind;
|
3397 | this.value = value;
|
3398 | this.exception = exception;
|
3399 | this.hasValue = kind === 'N';
|
3400 | }
|
3401 | |
3402 |
|
3403 |
|
3404 |
|
3405 |
|
3406 | Notification.prototype.observe = function (observer) {
|
3407 | switch (this.kind) {
|
3408 | case 'N':
|
3409 | return observer.next && observer.next(this.value);
|
3410 | case 'E':
|
3411 | return observer.error && observer.error(this.exception);
|
3412 | case 'C':
|
3413 | return observer.complete && observer.complete();
|
3414 | }
|
3415 | };
|
3416 | |
3417 |
|
3418 |
|
3419 |
|
3420 |
|
3421 |
|
3422 |
|
3423 |
|
3424 | Notification.prototype.do = function (next, error, complete) {
|
3425 | var kind = this.kind;
|
3426 | switch (kind) {
|
3427 | case 'N':
|
3428 | return next && next(this.value);
|
3429 | case 'E':
|
3430 | return error && error(this.exception);
|
3431 | case 'C':
|
3432 | return complete && complete();
|
3433 | }
|
3434 | };
|
3435 | |
3436 |
|
3437 |
|
3438 |
|
3439 |
|
3440 |
|
3441 |
|
3442 |
|
3443 |
|
3444 | Notification.prototype.accept = function (nextOrObserver, error, complete) {
|
3445 | if (nextOrObserver && typeof nextOrObserver.next === 'function') {
|
3446 | return this.observe(nextOrObserver);
|
3447 | }
|
3448 | else {
|
3449 | return this.do(nextOrObserver, error, complete);
|
3450 | }
|
3451 | };
|
3452 | |
3453 |
|
3454 |
|
3455 |
|
3456 |
|
3457 | Notification.prototype.toObservable = function () {
|
3458 | var kind = this.kind;
|
3459 | switch (kind) {
|
3460 | case 'N':
|
3461 | return Observable_1.Observable.of(this.value);
|
3462 | case 'E':
|
3463 | return Observable_1.Observable.throw(this.exception);
|
3464 | case 'C':
|
3465 | return Observable_1.Observable.empty();
|
3466 | }
|
3467 | };
|
3468 | |
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 |
|
3474 |
|
3475 | Notification.createNext = function (value) {
|
3476 | if (typeof value !== 'undefined') {
|
3477 | return new Notification('N', value);
|
3478 | }
|
3479 | return this.undefinedValueNotification;
|
3480 | };
|
3481 | |
3482 |
|
3483 |
|
3484 |
|
3485 |
|
3486 |
|
3487 |
|
3488 | Notification.createError = function (err) {
|
3489 | return new Notification('E', undefined, err);
|
3490 | };
|
3491 | |
3492 |
|
3493 |
|
3494 |
|
3495 | Notification.createComplete = function () {
|
3496 | return this.completeNotification;
|
3497 | };
|
3498 | Notification.completeNotification = new Notification('C');
|
3499 | Notification.undefinedValueNotification = new Notification('N', undefined);
|
3500 | return Notification;
|
3501 | }());
|
3502 | exports.Notification = Notification;
|
3503 |
|
3504 |
|
3505 | },
|
3506 |
|
3507 |
|
3508 |
|
3509 |
|
3510 | function(module, exports, __webpack_require__) {
|
3511 |
|
3512 | "use strict";
|
3513 | var __extends = (this && this.__extends) || function (d, b) {
|
3514 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3515 | function __() { this.constructor = d; }
|
3516 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3517 | };
|
3518 | var Subscriber_1 = __webpack_require__( 80);
|
3519 | |
3520 |
|
3521 |
|
3522 |
|
3523 |
|
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 |
|
3529 | function _catch(selector) {
|
3530 | var operator = new CatchOperator(selector);
|
3531 | var caught = this.lift(operator);
|
3532 | return (operator.caught = caught);
|
3533 | }
|
3534 | exports._catch = _catch;
|
3535 | var CatchOperator = (function () {
|
3536 | function CatchOperator(selector) {
|
3537 | this.selector = selector;
|
3538 | }
|
3539 | CatchOperator.prototype.call = function (subscriber, source) {
|
3540 | return source._subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
|
3541 | };
|
3542 | return CatchOperator;
|
3543 | }());
|
3544 | |
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 | var CatchSubscriber = (function (_super) {
|
3550 | __extends(CatchSubscriber, _super);
|
3551 | function CatchSubscriber(destination, selector, caught) {
|
3552 | _super.call(this, destination);
|
3553 | this.selector = selector;
|
3554 | this.caught = caught;
|
3555 | }
|
3556 |
|
3557 |
|
3558 | CatchSubscriber.prototype.error = function (err) {
|
3559 | if (!this.isStopped) {
|
3560 | var result = void 0;
|
3561 | try {
|
3562 | result = this.selector(err, this.caught);
|
3563 | }
|
3564 | catch (err) {
|
3565 | this.destination.error(err);
|
3566 | return;
|
3567 | }
|
3568 | this._innerSub(result);
|
3569 | }
|
3570 | };
|
3571 | CatchSubscriber.prototype._innerSub = function (result) {
|
3572 | this.unsubscribe();
|
3573 | this.destination.remove(this);
|
3574 | result.subscribe(this.destination);
|
3575 | };
|
3576 | return CatchSubscriber;
|
3577 | }(Subscriber_1.Subscriber));
|
3578 |
|
3579 |
|
3580 | },
|
3581 |
|
3582 |
|
3583 |
|
3584 |
|
3585 | function(module, exports, __webpack_require__) {
|
3586 |
|
3587 | "use strict";
|
3588 | var mergeMap_1 = __webpack_require__( 100);
|
3589 | |
3590 |
|
3591 |
|
3592 |
|
3593 |
|
3594 |
|
3595 |
|
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 |
|
3610 |
|
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 |
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 |
|
3639 |
|
3640 |
|
3641 |
|
3642 |
|
3643 |
|
3644 |
|
3645 | function concatMap(project, resultSelector) {
|
3646 | return this.lift(new mergeMap_1.MergeMapOperator(project, resultSelector, 1));
|
3647 | }
|
3648 | exports.concatMap = concatMap;
|
3649 |
|
3650 |
|
3651 | },
|
3652 |
|
3653 |
|
3654 |
|
3655 |
|
3656 | function(module, exports, __webpack_require__) {
|
3657 |
|
3658 | "use strict";
|
3659 | var __extends = (this && this.__extends) || function (d, b) {
|
3660 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3661 | function __() { this.constructor = d; }
|
3662 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3663 | };
|
3664 | var subscribeToResult_1 = __webpack_require__( 101);
|
3665 | var OuterSubscriber_1 = __webpack_require__( 103);
|
3666 | |
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 |
|
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 |
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 |
|
3703 |
|
3704 |
|
3705 |
|
3706 |
|
3707 |
|
3708 |
|
3709 |
|
3710 |
|
3711 |
|
3712 |
|
3713 |
|
3714 |
|
3715 | function mergeMap(project, resultSelector, concurrent) {
|
3716 | if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
|
3717 | if (typeof resultSelector === 'number') {
|
3718 | concurrent = resultSelector;
|
3719 | resultSelector = null;
|
3720 | }
|
3721 | return this.lift(new MergeMapOperator(project, resultSelector, concurrent));
|
3722 | }
|
3723 | exports.mergeMap = mergeMap;
|
3724 | var MergeMapOperator = (function () {
|
3725 | function MergeMapOperator(project, resultSelector, concurrent) {
|
3726 | if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
|
3727 | this.project = project;
|
3728 | this.resultSelector = resultSelector;
|
3729 | this.concurrent = concurrent;
|
3730 | }
|
3731 | MergeMapOperator.prototype.call = function (observer, source) {
|
3732 | return source._subscribe(new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent));
|
3733 | };
|
3734 | return MergeMapOperator;
|
3735 | }());
|
3736 | exports.MergeMapOperator = MergeMapOperator;
|
3737 | |
3738 |
|
3739 |
|
3740 |
|
3741 |
|
3742 | var MergeMapSubscriber = (function (_super) {
|
3743 | __extends(MergeMapSubscriber, _super);
|
3744 | function MergeMapSubscriber(destination, project, resultSelector, concurrent) {
|
3745 | if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
|
3746 | _super.call(this, destination);
|
3747 | this.project = project;
|
3748 | this.resultSelector = resultSelector;
|
3749 | this.concurrent = concurrent;
|
3750 | this.hasCompleted = false;
|
3751 | this.buffer = [];
|
3752 | this.active = 0;
|
3753 | this.index = 0;
|
3754 | }
|
3755 | MergeMapSubscriber.prototype._next = function (value) {
|
3756 | if (this.active < this.concurrent) {
|
3757 | this._tryNext(value);
|
3758 | }
|
3759 | else {
|
3760 | this.buffer.push(value);
|
3761 | }
|
3762 | };
|
3763 | MergeMapSubscriber.prototype._tryNext = function (value) {
|
3764 | var result;
|
3765 | var index = this.index++;
|
3766 | try {
|
3767 | result = this.project(value, index);
|
3768 | }
|
3769 | catch (err) {
|
3770 | this.destination.error(err);
|
3771 | return;
|
3772 | }
|
3773 | this.active++;
|
3774 | this._innerSub(result, value, index);
|
3775 | };
|
3776 | MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
|
3777 | this.add(subscribeToResult_1.subscribeToResult(this, ish, value, index));
|
3778 | };
|
3779 | MergeMapSubscriber.prototype._complete = function () {
|
3780 | this.hasCompleted = true;
|
3781 | if (this.active === 0 && this.buffer.length === 0) {
|
3782 | this.destination.complete();
|
3783 | }
|
3784 | };
|
3785 | MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
3786 | if (this.resultSelector) {
|
3787 | this._notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
3788 | }
|
3789 | else {
|
3790 | this.destination.next(innerValue);
|
3791 | }
|
3792 | };
|
3793 | MergeMapSubscriber.prototype._notifyResultSelector = function (outerValue, innerValue, outerIndex, innerIndex) {
|
3794 | var result;
|
3795 | try {
|
3796 | result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
3797 | }
|
3798 | catch (err) {
|
3799 | this.destination.error(err);
|
3800 | return;
|
3801 | }
|
3802 | this.destination.next(result);
|
3803 | };
|
3804 | MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
|
3805 | var buffer = this.buffer;
|
3806 | this.remove(innerSub);
|
3807 | this.active--;
|
3808 | if (buffer.length > 0) {
|
3809 | this._next(buffer.shift());
|
3810 | }
|
3811 | else if (this.active === 0 && this.hasCompleted) {
|
3812 | this.destination.complete();
|
3813 | }
|
3814 | };
|
3815 | return MergeMapSubscriber;
|
3816 | }(OuterSubscriber_1.OuterSubscriber));
|
3817 | exports.MergeMapSubscriber = MergeMapSubscriber;
|
3818 |
|
3819 |
|
3820 | },
|
3821 |
|
3822 |
|
3823 |
|
3824 |
|
3825 | function(module, exports, __webpack_require__) {
|
3826 |
|
3827 | "use strict";
|
3828 | var root_1 = __webpack_require__( 76);
|
3829 | var isArray_1 = __webpack_require__( 71);
|
3830 | var isPromise_1 = __webpack_require__( 73);
|
3831 | var Observable_1 = __webpack_require__( 78);
|
3832 | var iterator_1 = __webpack_require__( 91);
|
3833 | var InnerSubscriber_1 = __webpack_require__( 102);
|
3834 | var $$observable = __webpack_require__( 88);
|
3835 | function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
|
3836 | var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex);
|
3837 | if (destination.isUnsubscribed) {
|
3838 | return;
|
3839 | }
|
3840 | if (result instanceof Observable_1.Observable) {
|
3841 | if (result._isScalar) {
|
3842 | destination.next(result.value);
|
3843 | destination.complete();
|
3844 | return;
|
3845 | }
|
3846 | else {
|
3847 | return result.subscribe(destination);
|
3848 | }
|
3849 | }
|
3850 | if (isArray_1.isArray(result)) {
|
3851 | for (var i = 0, len = result.length; i < len && !destination.isUnsubscribed; i++) {
|
3852 | destination.next(result[i]);
|
3853 | }
|
3854 | if (!destination.isUnsubscribed) {
|
3855 | destination.complete();
|
3856 | }
|
3857 | }
|
3858 | else if (isPromise_1.isPromise(result)) {
|
3859 | result.then(function (value) {
|
3860 | if (!destination.isUnsubscribed) {
|
3861 | destination.next(value);
|
3862 | destination.complete();
|
3863 | }
|
3864 | }, function (err) { return destination.error(err); })
|
3865 | .then(null, function (err) {
|
3866 |
|
3867 | root_1.root.setTimeout(function () { throw err; });
|
3868 | });
|
3869 | return destination;
|
3870 | }
|
3871 | else if (typeof result[iterator_1.$$iterator] === 'function') {
|
3872 | for (var _i = 0, _a = result; _i < _a.length; _i++) {
|
3873 | var item = _a[_i];
|
3874 | destination.next(item);
|
3875 | if (destination.isUnsubscribed) {
|
3876 | break;
|
3877 | }
|
3878 | }
|
3879 | if (!destination.isUnsubscribed) {
|
3880 | destination.complete();
|
3881 | }
|
3882 | }
|
3883 | else if (typeof result[$$observable] === 'function') {
|
3884 | var obs = result[$$observable]();
|
3885 | if (typeof obs.subscribe !== 'function') {
|
3886 | destination.error('invalid observable');
|
3887 | }
|
3888 | else {
|
3889 | return obs.subscribe(new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex));
|
3890 | }
|
3891 | }
|
3892 | else {
|
3893 | destination.error(new TypeError('unknown type returned'));
|
3894 | }
|
3895 | }
|
3896 | exports.subscribeToResult = subscribeToResult;
|
3897 |
|
3898 |
|
3899 | },
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 | function(module, exports, __webpack_require__) {
|
3905 |
|
3906 | "use strict";
|
3907 | var __extends = (this && this.__extends) || function (d, b) {
|
3908 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3909 | function __() { this.constructor = d; }
|
3910 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3911 | };
|
3912 | var Subscriber_1 = __webpack_require__( 80);
|
3913 | |
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 | var InnerSubscriber = (function (_super) {
|
3919 | __extends(InnerSubscriber, _super);
|
3920 | function InnerSubscriber(parent, outerValue, outerIndex) {
|
3921 | _super.call(this);
|
3922 | this.parent = parent;
|
3923 | this.outerValue = outerValue;
|
3924 | this.outerIndex = outerIndex;
|
3925 | this.index = 0;
|
3926 | }
|
3927 | InnerSubscriber.prototype._next = function (value) {
|
3928 | this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
|
3929 | };
|
3930 | InnerSubscriber.prototype._error = function (error) {
|
3931 | this.parent.notifyError(error, this);
|
3932 | this.unsubscribe();
|
3933 | };
|
3934 | InnerSubscriber.prototype._complete = function () {
|
3935 | this.parent.notifyComplete(this);
|
3936 | this.unsubscribe();
|
3937 | };
|
3938 | return InnerSubscriber;
|
3939 | }(Subscriber_1.Subscriber));
|
3940 | exports.InnerSubscriber = InnerSubscriber;
|
3941 |
|
3942 |
|
3943 | },
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 | function(module, exports, __webpack_require__) {
|
3949 |
|
3950 | "use strict";
|
3951 | var __extends = (this && this.__extends) || function (d, b) {
|
3952 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3953 | function __() { this.constructor = d; }
|
3954 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3955 | };
|
3956 | var Subscriber_1 = __webpack_require__( 80);
|
3957 | |
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 | var OuterSubscriber = (function (_super) {
|
3963 | __extends(OuterSubscriber, _super);
|
3964 | function OuterSubscriber() {
|
3965 | _super.apply(this, arguments);
|
3966 | }
|
3967 | OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
3968 | this.destination.next(innerValue);
|
3969 | };
|
3970 | OuterSubscriber.prototype.notifyError = function (error, innerSub) {
|
3971 | this.destination.error(error);
|
3972 | };
|
3973 | OuterSubscriber.prototype.notifyComplete = function (innerSub) {
|
3974 | this.destination.complete();
|
3975 | };
|
3976 | return OuterSubscriber;
|
3977 | }(Subscriber_1.Subscriber));
|
3978 | exports.OuterSubscriber = OuterSubscriber;
|
3979 |
|
3980 |
|
3981 | },
|
3982 |
|
3983 |
|
3984 |
|
3985 |
|
3986 | function(module, exports, __webpack_require__) {
|
3987 |
|
3988 | "use strict";
|
3989 | var __extends = (this && this.__extends) || function (d, b) {
|
3990 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3991 | function __() { this.constructor = d; }
|
3992 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
3993 | };
|
3994 | var Subscriber_1 = __webpack_require__( 80);
|
3995 | |
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 |
|
4020 |
|
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 |
|
4030 |
|
4031 |
|
4032 |
|
4033 |
|
4034 |
|
4035 | function filter(predicate, thisArg) {
|
4036 | return this.lift(new FilterOperator(predicate, thisArg));
|
4037 | }
|
4038 | exports.filter = filter;
|
4039 | var FilterOperator = (function () {
|
4040 | function FilterOperator(predicate, thisArg) {
|
4041 | this.predicate = predicate;
|
4042 | this.thisArg = thisArg;
|
4043 | }
|
4044 | FilterOperator.prototype.call = function (subscriber, source) {
|
4045 | return source._subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
|
4046 | };
|
4047 | return FilterOperator;
|
4048 | }());
|
4049 | |
4050 |
|
4051 |
|
4052 |
|
4053 |
|
4054 | var FilterSubscriber = (function (_super) {
|
4055 | __extends(FilterSubscriber, _super);
|
4056 | function FilterSubscriber(destination, predicate, thisArg) {
|
4057 | _super.call(this, destination);
|
4058 | this.predicate = predicate;
|
4059 | this.thisArg = thisArg;
|
4060 | this.count = 0;
|
4061 | this.predicate = predicate;
|
4062 | }
|
4063 |
|
4064 |
|
4065 | FilterSubscriber.prototype._next = function (value) {
|
4066 | var result;
|
4067 | try {
|
4068 | result = this.predicate.call(this.thisArg, value, this.count++);
|
4069 | }
|
4070 | catch (err) {
|
4071 | this.destination.error(err);
|
4072 | return;
|
4073 | }
|
4074 | if (result) {
|
4075 | this.destination.next(value);
|
4076 | }
|
4077 | };
|
4078 | return FilterSubscriber;
|
4079 | }(Subscriber_1.Subscriber));
|
4080 |
|
4081 |
|
4082 | },
|
4083 |
|
4084 |
|
4085 |
|
4086 |
|
4087 | function(module, exports, __webpack_require__) {
|
4088 |
|
4089 | 'use strict';
|
4090 |
|
4091 | var _possibleConstructorReturn2 = __webpack_require__( 106);
|
4092 |
|
4093 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
4094 |
|
4095 | var _inherits2 = __webpack_require__( 175);
|
4096 |
|
4097 | var _inherits3 = _interopRequireDefault(_inherits2);
|
4098 |
|
4099 | var _typeof2 = __webpack_require__( 107);
|
4100 |
|
4101 | var _typeof3 = _interopRequireDefault(_typeof2);
|
4102 |
|
4103 | var _classCallCheck2 = __webpack_require__( 183);
|
4104 |
|
4105 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
4106 |
|
4107 | var _Observable = __webpack_require__( 78);
|
4108 |
|
4109 | var _empty = __webpack_require__( 184);
|
4110 |
|
4111 | var _publishReplay = __webpack_require__( 185);
|
4112 |
|
4113 | var _scan = __webpack_require__( 197);
|
4114 |
|
4115 | var _filter = __webpack_require__( 104);
|
4116 |
|
4117 | var _map = __webpack_require__( 198);
|
4118 |
|
4119 | var _snakeCase = __webpack_require__( 199);
|
4120 |
|
4121 | var _snakeCase2 = _interopRequireDefault(_snakeCase);
|
4122 |
|
4123 | var _checkArgs = __webpack_require__( 205);
|
4124 |
|
4125 | var _checkArgs2 = _interopRequireDefault(_checkArgs);
|
4126 |
|
4127 | var _validIndexValue = __webpack_require__( 207);
|
4128 |
|
4129 | var _validIndexValue2 = _interopRequireDefault(_validIndexValue);
|
4130 |
|
4131 | var _serialization = __webpack_require__( 208);
|
4132 |
|
4133 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4134 |
|
4135 | |
4136 |
|
4137 |
|
4138 |
|
4139 |
|
4140 |
|
4141 |
|
4142 |
|
4143 | function checkIfLegalToChain(key) {
|
4144 | if (this._legalMethods.indexOf(key) === -1) {
|
4145 | throw new Error(key + ' cannot be called on the current query');
|
4146 | }
|
4147 | if ((0, _snakeCase2.default)(key) in this._query) {
|
4148 | throw new Error(key + ' has already been called on this query');
|
4149 | }
|
4150 | }
|
4151 |
|
4152 |
|
4153 |
|
4154 | var TermBase = function () {
|
4155 | function TermBase(sendRequest, query, legalMethods) {
|
4156 | (0, _classCallCheck3.default)(this, TermBase);
|
4157 |
|
4158 | this._sendRequest = sendRequest;
|
4159 | this._query = query;
|
4160 | this._legalMethods = legalMethods;
|
4161 | }
|
4162 |
|
4163 |
|
4164 |
|
4165 |
|
4166 |
|
4167 |
|
4168 |
|
4169 | TermBase.prototype.watch = function watch() {
|
4170 | var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
4171 |
|
4172 | var _ref$rawChanges = _ref.rawChanges;
|
4173 | var rawChanges = _ref$rawChanges === undefined ? false : _ref$rawChanges;
|
4174 |
|
4175 | var raw = this._sendRequest('subscribe', this._query);
|
4176 | if (rawChanges) {
|
4177 | return raw;
|
4178 | } else {
|
4179 | return makePresentable(raw, this._query);
|
4180 | }
|
4181 | };
|
4182 |
|
4183 |
|
4184 |
|
4185 |
|
4186 |
|
4187 | TermBase.prototype.fetch = function fetch() {
|
4188 | return this._sendRequest('query', this._query);
|
4189 | };
|
4190 |
|
4191 | TermBase.prototype.findAll = function findAll() {
|
4192 | for (var _len = arguments.length, fieldValues = Array(_len), _key = 0; _key < _len; _key++) {
|
4193 | fieldValues[_key] = arguments[_key];
|
4194 | }
|
4195 |
|
4196 | checkIfLegalToChain.call(this, 'findAll');
|
4197 | (0, _checkArgs2.default)('findAll', arguments, { maxArgs: 100 });
|
4198 | return new FindAll(this._sendRequest, this._query, fieldValues);
|
4199 | };
|
4200 |
|
4201 | TermBase.prototype.find = function find(idOrObject) {
|
4202 | checkIfLegalToChain.call(this, 'find');
|
4203 | (0, _checkArgs2.default)('find', arguments);
|
4204 | return new Find(this._sendRequest, this._query, idOrObject);
|
4205 | };
|
4206 |
|
4207 | TermBase.prototype.order = function order(fields) {
|
4208 | var direction = arguments.length <= 1 || arguments[1] === undefined ? 'ascending' : arguments[1];
|
4209 |
|
4210 | checkIfLegalToChain.call(this, 'order');
|
4211 | (0, _checkArgs2.default)('order', arguments, { minArgs: 1, maxArgs: 2 });
|
4212 | return new Order(this._sendRequest, this._query, fields, direction);
|
4213 | };
|
4214 |
|
4215 | TermBase.prototype.above = function above(aboveSpec) {
|
4216 | var bound = arguments.length <= 1 || arguments[1] === undefined ? 'closed' : arguments[1];
|
4217 |
|
4218 | checkIfLegalToChain.call(this, 'above');
|
4219 | (0, _checkArgs2.default)('above', arguments, { minArgs: 1, maxArgs: 2 });
|
4220 | return new Above(this._sendRequest, this._query, aboveSpec, bound);
|
4221 | };
|
4222 |
|
4223 | TermBase.prototype.below = function below(belowSpec) {
|
4224 | var bound = arguments.length <= 1 || arguments[1] === undefined ? 'open' : arguments[1];
|
4225 |
|
4226 | checkIfLegalToChain.call(this, 'below');
|
4227 | (0, _checkArgs2.default)('below', arguments, { minArgs: 1, maxArgs: 2 });
|
4228 | return new Below(this._sendRequest, this._query, belowSpec, bound);
|
4229 | };
|
4230 |
|
4231 | TermBase.prototype.limit = function limit(size) {
|
4232 | checkIfLegalToChain.call(this, 'limit');
|
4233 | (0, _checkArgs2.default)('limit', arguments);
|
4234 | return new Limit(this._sendRequest, this._query, size);
|
4235 | };
|
4236 |
|
4237 | return TermBase;
|
4238 | }();
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 | function makePresentable(observable, query) {
|
4248 |
|
4249 | var pointQuery = Boolean(query.find);
|
4250 |
|
4251 | if (pointQuery) {
|
4252 | var _ret = function () {
|
4253 | var _context;
|
4254 |
|
4255 | var hasEmitted = false;
|
4256 | var seedVal = null;
|
4257 |
|
4258 | return {
|
4259 | v: (_context = _filter.filter.call(observable, function (change) {
|
4260 | return !hasEmitted || change.type !== 'state';
|
4261 | }), _scan.scan).call(_context, function (previous, change) {
|
4262 | hasEmitted = true;
|
4263 | if (change.state === 'synced') {
|
4264 | return previous;
|
4265 | } else {
|
4266 | return change.new_val;
|
4267 | }
|
4268 | }, seedVal)
|
4269 | };
|
4270 | }();
|
4271 |
|
4272 | if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
|
4273 | } else {
|
4274 | var _context2;
|
4275 |
|
4276 | var _seedVal = { emitted: false, val: [] };
|
4277 | return (_context2 = (_context2 = _scan.scan.call(observable, function (state, change) {
|
4278 | if (change.state === 'synced') {
|
4279 | state.emitted = true;
|
4280 | }
|
4281 | state.val = applyChange(state.val.slice(), change);
|
4282 | return state;
|
4283 | }, _seedVal), _filter.filter).call(_context2, function (state) {
|
4284 | return state.emitted;
|
4285 | }), _map.map).call(_context2, function (x) {
|
4286 | return x.val;
|
4287 | });
|
4288 | }
|
4289 | }
|
4290 |
|
4291 | function applyChange(arr, change) {
|
4292 | switch (change.type) {
|
4293 | case 'remove':
|
4294 | case 'uninitial':
|
4295 | {
|
4296 |
|
4297 | if (change.old_offset != null) {
|
4298 | arr.splice(change.old_offset, 1);
|
4299 | } else {
|
4300 | var index = arr.findIndex(function (x) {
|
4301 | return x.id === change.old_val.id;
|
4302 | });
|
4303 | arr.splice(index, 1);
|
4304 | }
|
4305 | break;
|
4306 | }
|
4307 | case 'add':
|
4308 | case 'initial':
|
4309 | {
|
4310 |
|
4311 | if (change.new_offset != null) {
|
4312 |
|
4313 | arr.splice(change.new_offset, 0, change.new_val);
|
4314 | } else {
|
4315 |
|
4316 | arr.push(change.new_val);
|
4317 | }
|
4318 | break;
|
4319 | }
|
4320 | case 'change':
|
4321 | {
|
4322 |
|
4323 | if (change.old_offset != null) {
|
4324 |
|
4325 | arr.splice(change.old_offset, 1);
|
4326 | }
|
4327 | if (change.new_offset != null) {
|
4328 |
|
4329 | arr.splice(change.new_offset, 0, change.new_val);
|
4330 | } else {
|
4331 |
|
4332 |
|
4333 | var _index = arr.findIndex(function (x) {
|
4334 | return x.id === change.old_val.id;
|
4335 | });
|
4336 | arr[_index] = change.new_val;
|
4337 | }
|
4338 | break;
|
4339 | }
|
4340 | case 'state':
|
4341 | {
|
4342 |
|
4343 |
|
4344 | break;
|
4345 | }
|
4346 | default:
|
4347 | throw new Error('unrecognized \'type\' field from server ' + JSON.stringify(change));
|
4348 | }
|
4349 | return arr;
|
4350 | }
|
4351 |
|
4352 | |
4353 |
|
4354 |
|
4355 | function writeOp(name, args, documents) {
|
4356 | (0, _checkArgs2.default)(name, args);
|
4357 | var wrappedDocs = documents;
|
4358 | if (!Array.isArray(documents)) {
|
4359 |
|
4360 | wrappedDocs = [documents];
|
4361 | } else if (documents.length === 0) {
|
4362 |
|
4363 | return _empty.empty.call(_Observable.Observable);
|
4364 | }
|
4365 | var options = Object.assign({}, this._query, { data: (0, _serialization.serialize)(wrappedDocs) });
|
4366 | var observable = this._sendRequest(name, options);
|
4367 | if (!this._lazyWrites) {
|
4368 | var _context3;
|
4369 |
|
4370 |
|
4371 |
|
4372 | observable = (_context3 = observable, _publishReplay.publishReplay).call(_context3).refCount();
|
4373 | observable.subscribe();
|
4374 | }
|
4375 | return observable;
|
4376 | }
|
4377 |
|
4378 | var Collection = function (_TermBase) {
|
4379 | (0, _inherits3.default)(Collection, _TermBase);
|
4380 |
|
4381 | function Collection(sendRequest, collectionName, lazyWrites) {
|
4382 | (0, _classCallCheck3.default)(this, Collection);
|
4383 |
|
4384 | var query = { collection: collectionName };
|
4385 | var legalMethods = ['find', 'findAll', 'justInitial', 'order', 'above', 'below', 'limit'];
|
4386 |
|
4387 | var _this = (0, _possibleConstructorReturn3.default)(this, _TermBase.call(this, sendRequest, query, legalMethods));
|
4388 |
|
4389 | _this._lazyWrites = lazyWrites;
|
4390 | return _this;
|
4391 | }
|
4392 |
|
4393 | Collection.prototype.store = function store(documents) {
|
4394 | return writeOp.call(this, 'store', arguments, documents);
|
4395 | };
|
4396 |
|
4397 | Collection.prototype.upsert = function upsert(documents) {
|
4398 | return writeOp.call(this, 'upsert', arguments, documents);
|
4399 | };
|
4400 |
|
4401 | Collection.prototype.insert = function insert(documents) {
|
4402 | return writeOp.call(this, 'insert', arguments, documents);
|
4403 | };
|
4404 |
|
4405 | Collection.prototype.replace = function replace(documents) {
|
4406 | return writeOp.call(this, 'replace', arguments, documents);
|
4407 | };
|
4408 |
|
4409 | Collection.prototype.update = function update(documents) {
|
4410 | return writeOp.call(this, 'update', arguments, documents);
|
4411 | };
|
4412 |
|
4413 | Collection.prototype.remove = function remove(documentOrId) {
|
4414 | var wrapped = (0, _validIndexValue2.default)(documentOrId) ? { id: documentOrId } : documentOrId;
|
4415 | return writeOp.call(this, 'remove', arguments, wrapped);
|
4416 | };
|
4417 |
|
4418 | Collection.prototype.removeAll = function removeAll(documentsOrIds) {
|
4419 | if (!Array.isArray(documentsOrIds)) {
|
4420 | throw new Error('removeAll takes an array as an argument');
|
4421 | }
|
4422 | var wrapped = documentsOrIds.map(function (item) {
|
4423 | if ((0, _validIndexValue2.default)(item)) {
|
4424 | return { id: item };
|
4425 | } else {
|
4426 | return item;
|
4427 | }
|
4428 | });
|
4429 | return writeOp.call(this, 'removeAll', arguments, wrapped);
|
4430 | };
|
4431 |
|
4432 | return Collection;
|
4433 | }(TermBase);
|
4434 |
|
4435 | var Find = function (_TermBase2) {
|
4436 | (0, _inherits3.default)(Find, _TermBase2);
|
4437 |
|
4438 | function Find(sendRequest, previousQuery, idOrObject) {
|
4439 | (0, _classCallCheck3.default)(this, Find);
|
4440 |
|
4441 | var findObject = (0, _validIndexValue2.default)(idOrObject) ? { id: idOrObject } : idOrObject;
|
4442 | var query = Object.assign({}, previousQuery, { find: findObject });
|
4443 | return (0, _possibleConstructorReturn3.default)(this, _TermBase2.call(this, sendRequest, query, []));
|
4444 | }
|
4445 |
|
4446 | return Find;
|
4447 | }(TermBase);
|
4448 |
|
4449 | var FindAll = function (_TermBase3) {
|
4450 | (0, _inherits3.default)(FindAll, _TermBase3);
|
4451 |
|
4452 | function FindAll(sendRequest, previousQuery, fieldValues) {
|
4453 | (0, _classCallCheck3.default)(this, FindAll);
|
4454 |
|
4455 | var wrappedFields = fieldValues.map(function (item) {
|
4456 | return (0, _validIndexValue2.default)(item) ? { id: item } : item;
|
4457 | });
|
4458 | var options = { find_all: wrappedFields };
|
4459 | var findAllQuery = Object.assign({}, previousQuery, options);
|
4460 | var legalMethods = void 0;
|
4461 | if (wrappedFields.length === 1) {
|
4462 | legalMethods = ['order', 'above', 'below', 'limit'];
|
4463 | } else {
|
4464 |
|
4465 | legalMethods = [];
|
4466 | }
|
4467 | return (0, _possibleConstructorReturn3.default)(this, _TermBase3.call(this, sendRequest, findAllQuery, legalMethods));
|
4468 | }
|
4469 |
|
4470 | return FindAll;
|
4471 | }(TermBase);
|
4472 |
|
4473 | var Above = function (_TermBase4) {
|
4474 | (0, _inherits3.default)(Above, _TermBase4);
|
4475 |
|
4476 | function Above(sendRequest, previousQuery, aboveSpec, bound) {
|
4477 | (0, _classCallCheck3.default)(this, Above);
|
4478 |
|
4479 | var option = { above: [aboveSpec, bound] };
|
4480 | var query = Object.assign({}, previousQuery, option);
|
4481 | var legalMethods = ['findAll', 'order', 'below', 'limit'];
|
4482 | return (0, _possibleConstructorReturn3.default)(this, _TermBase4.call(this, sendRequest, query, legalMethods));
|
4483 | }
|
4484 |
|
4485 | return Above;
|
4486 | }(TermBase);
|
4487 |
|
4488 | var Below = function (_TermBase5) {
|
4489 | (0, _inherits3.default)(Below, _TermBase5);
|
4490 |
|
4491 | function Below(sendRequest, previousQuery, belowSpec, bound) {
|
4492 | (0, _classCallCheck3.default)(this, Below);
|
4493 |
|
4494 | var options = { below: [belowSpec, bound] };
|
4495 | var query = Object.assign({}, previousQuery, options);
|
4496 | var legalMethods = ['findAll', 'order', 'above', 'limit'];
|
4497 | return (0, _possibleConstructorReturn3.default)(this, _TermBase5.call(this, sendRequest, query, legalMethods));
|
4498 | }
|
4499 |
|
4500 | return Below;
|
4501 | }(TermBase);
|
4502 |
|
4503 | var Order = function (_TermBase6) {
|
4504 | (0, _inherits3.default)(Order, _TermBase6);
|
4505 |
|
4506 | function Order(sendRequest, previousQuery, fields, direction) {
|
4507 | (0, _classCallCheck3.default)(this, Order);
|
4508 |
|
4509 | var wrappedFields = Array.isArray(fields) ? fields : [fields];
|
4510 | var options = { order: [wrappedFields, direction] };
|
4511 | var query = Object.assign({}, previousQuery, options);
|
4512 | var legalMethods = ['findAll', 'above', 'below', 'limit'];
|
4513 | return (0, _possibleConstructorReturn3.default)(this, _TermBase6.call(this, sendRequest, query, legalMethods));
|
4514 | }
|
4515 |
|
4516 | return Order;
|
4517 | }(TermBase);
|
4518 |
|
4519 | var Limit = function (_TermBase7) {
|
4520 | (0, _inherits3.default)(Limit, _TermBase7);
|
4521 |
|
4522 | function Limit(sendRequest, previousQuery, size) {
|
4523 | (0, _classCallCheck3.default)(this, Limit);
|
4524 |
|
4525 | var query = Object.assign({}, previousQuery, { limit: size });
|
4526 |
|
4527 | return (0, _possibleConstructorReturn3.default)(this, _TermBase7.call(this, sendRequest, query, []));
|
4528 | }
|
4529 |
|
4530 | return Limit;
|
4531 | }(TermBase);
|
4532 |
|
4533 | module.exports = {
|
4534 | TermBase: TermBase,
|
4535 | Collection: Collection,
|
4536 | FindAll: FindAll,
|
4537 | Find: Find,
|
4538 | Above: Above,
|
4539 | Below: Below,
|
4540 | Order: Order,
|
4541 | Limit: Limit
|
4542 | };
|
4543 |
|
4544 | },
|
4545 |
|
4546 |
|
4547 |
|
4548 |
|
4549 | function(module, exports, __webpack_require__) {
|
4550 |
|
4551 | "use strict";
|
4552 |
|
4553 | exports.__esModule = true;
|
4554 |
|
4555 | var _typeof2 = __webpack_require__( 107);
|
4556 |
|
4557 | var _typeof3 = _interopRequireDefault(_typeof2);
|
4558 |
|
4559 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4560 |
|
4561 | exports.default = function (self, call) {
|
4562 | if (!self) {
|
4563 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
4564 | }
|
4565 |
|
4566 | return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
|
4567 | };
|
4568 |
|
4569 | },
|
4570 |
|
4571 |
|
4572 |
|
4573 |
|
4574 | function(module, exports, __webpack_require__) {
|
4575 |
|
4576 | "use strict";
|
4577 |
|
4578 | exports.__esModule = true;
|
4579 |
|
4580 | var _iterator = __webpack_require__( 108);
|
4581 |
|
4582 | var _iterator2 = _interopRequireDefault(_iterator);
|
4583 |
|
4584 | var _symbol = __webpack_require__( 159);
|
4585 |
|
4586 | var _symbol2 = _interopRequireDefault(_symbol);
|
4587 |
|
4588 | var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj; };
|
4589 |
|
4590 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4591 |
|
4592 | exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
4593 | return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
4594 | } : function (obj) {
|
4595 | return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
4596 | };
|
4597 |
|
4598 | },
|
4599 |
|
4600 |
|
4601 |
|
4602 |
|
4603 | function(module, exports, __webpack_require__) {
|
4604 |
|
4605 | module.exports = { "default": __webpack_require__( 109), __esModule: true };
|
4606 |
|
4607 | },
|
4608 |
|
4609 |
|
4610 |
|
4611 |
|
4612 | function(module, exports, __webpack_require__) {
|
4613 |
|
4614 | __webpack_require__( 110);
|
4615 | __webpack_require__( 154);
|
4616 | module.exports = __webpack_require__( 158).f('iterator');
|
4617 |
|
4618 | },
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 | function(module, exports, __webpack_require__) {
|
4624 |
|
4625 | 'use strict';
|
4626 | var $at = __webpack_require__( 111)(true);
|
4627 |
|
4628 |
|
4629 | __webpack_require__( 114)(String, 'String', function(iterated){
|
4630 | this._t = String(iterated);
|
4631 | this._i = 0;
|
4632 |
|
4633 | }, function(){
|
4634 | var O = this._t
|
4635 | , index = this._i
|
4636 | , point;
|
4637 | if(index >= O.length)return {value: undefined, done: true};
|
4638 | point = $at(O, index);
|
4639 | this._i += point.length;
|
4640 | return {value: point, done: false};
|
4641 | });
|
4642 |
|
4643 | },
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 | function(module, exports, __webpack_require__) {
|
4649 |
|
4650 | var toInteger = __webpack_require__( 112)
|
4651 | , defined = __webpack_require__( 113);
|
4652 |
|
4653 |
|
4654 | module.exports = function(TO_STRING){
|
4655 | return function(that, pos){
|
4656 | var s = String(defined(that))
|
4657 | , i = toInteger(pos)
|
4658 | , l = s.length
|
4659 | , a, b;
|
4660 | if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
|
4661 | a = s.charCodeAt(i);
|
4662 | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
4663 | ? TO_STRING ? s.charAt(i) : a
|
4664 | : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
4665 | };
|
4666 | };
|
4667 |
|
4668 | },
|
4669 |
|
4670 |
|
4671 |
|
4672 |
|
4673 | function(module, exports) {
|
4674 |
|
4675 |
|
4676 | var ceil = Math.ceil
|
4677 | , floor = Math.floor;
|
4678 | module.exports = function(it){
|
4679 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
4680 | };
|
4681 |
|
4682 | },
|
4683 |
|
4684 |
|
4685 |
|
4686 |
|
4687 | function(module, exports) {
|
4688 |
|
4689 |
|
4690 | module.exports = function(it){
|
4691 | if(it == undefined)throw TypeError("Can't call method on " + it);
|
4692 | return it;
|
4693 | };
|
4694 |
|
4695 | },
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 | function(module, exports, __webpack_require__) {
|
4701 |
|
4702 | 'use strict';
|
4703 | var LIBRARY = __webpack_require__( 115)
|
4704 | , $export = __webpack_require__( 116)
|
4705 | , redefine = __webpack_require__( 131)
|
4706 | , hide = __webpack_require__( 121)
|
4707 | , has = __webpack_require__( 132)
|
4708 | , Iterators = __webpack_require__( 133)
|
4709 | , $iterCreate = __webpack_require__( 134)
|
4710 | , setToStringTag = __webpack_require__( 150)
|
4711 | , getPrototypeOf = __webpack_require__( 152)
|
4712 | , ITERATOR = __webpack_require__( 151)('iterator')
|
4713 | , BUGGY = !([].keys && 'next' in [].keys())
|
4714 | , FF_ITERATOR = '@@iterator'
|
4715 | , KEYS = 'keys'
|
4716 | , VALUES = 'values';
|
4717 |
|
4718 | var returnThis = function(){ return this; };
|
4719 |
|
4720 | module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
|
4721 | $iterCreate(Constructor, NAME, next);
|
4722 | var getMethod = function(kind){
|
4723 | if(!BUGGY && kind in proto)return proto[kind];
|
4724 | switch(kind){
|
4725 | case KEYS: return function keys(){ return new Constructor(this, kind); };
|
4726 | case VALUES: return function values(){ return new Constructor(this, kind); };
|
4727 | } return function entries(){ return new Constructor(this, kind); };
|
4728 | };
|
4729 | var TAG = NAME + ' Iterator'
|
4730 | , DEF_VALUES = DEFAULT == VALUES
|
4731 | , VALUES_BUG = false
|
4732 | , proto = Base.prototype
|
4733 | , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
4734 | , $default = $native || getMethod(DEFAULT)
|
4735 | , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
|
4736 | , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
|
4737 | , methods, key, IteratorPrototype;
|
4738 |
|
4739 | if($anyNative){
|
4740 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
|
4741 | if(IteratorPrototype !== Object.prototype){
|
4742 |
|
4743 | setToStringTag(IteratorPrototype, TAG, true);
|
4744 |
|
4745 | if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
|
4746 | }
|
4747 | }
|
4748 |
|
4749 | if(DEF_VALUES && $native && $native.name !== VALUES){
|
4750 | VALUES_BUG = true;
|
4751 | $default = function values(){ return $native.call(this); };
|
4752 | }
|
4753 |
|
4754 | if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
|
4755 | hide(proto, ITERATOR, $default);
|
4756 | }
|
4757 |
|
4758 | Iterators[NAME] = $default;
|
4759 | Iterators[TAG] = returnThis;
|
4760 | if(DEFAULT){
|
4761 | methods = {
|
4762 | values: DEF_VALUES ? $default : getMethod(VALUES),
|
4763 | keys: IS_SET ? $default : getMethod(KEYS),
|
4764 | entries: $entries
|
4765 | };
|
4766 | if(FORCED)for(key in methods){
|
4767 | if(!(key in proto))redefine(proto, key, methods[key]);
|
4768 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
4769 | }
|
4770 | return methods;
|
4771 | };
|
4772 |
|
4773 | },
|
4774 |
|
4775 |
|
4776 |
|
4777 |
|
4778 | function(module, exports) {
|
4779 |
|
4780 | module.exports = true;
|
4781 |
|
4782 | },
|
4783 |
|
4784 |
|
4785 |
|
4786 |
|
4787 | function(module, exports, __webpack_require__) {
|
4788 |
|
4789 | var global = __webpack_require__( 117)
|
4790 | , core = __webpack_require__( 118)
|
4791 | , ctx = __webpack_require__( 119)
|
4792 | , hide = __webpack_require__( 121)
|
4793 | , PROTOTYPE = 'prototype';
|
4794 |
|
4795 | var $export = function(type, name, source){
|
4796 | var IS_FORCED = type & $export.F
|
4797 | , IS_GLOBAL = type & $export.G
|
4798 | , IS_STATIC = type & $export.S
|
4799 | , IS_PROTO = type & $export.P
|
4800 | , IS_BIND = type & $export.B
|
4801 | , IS_WRAP = type & $export.W
|
4802 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
4803 | , expProto = exports[PROTOTYPE]
|
4804 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
4805 | , key, own, out;
|
4806 | if(IS_GLOBAL)source = name;
|
4807 | for(key in source){
|
4808 |
|
4809 | own = !IS_FORCED && target && target[key] !== undefined;
|
4810 | if(own && key in exports)continue;
|
4811 |
|
4812 | out = own ? target[key] : source[key];
|
4813 |
|
4814 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
4815 |
|
4816 | : IS_BIND && own ? ctx(out, global)
|
4817 |
|
4818 | : IS_WRAP && target[key] == out ? (function(C){
|
4819 | var F = function(a, b, c){
|
4820 | if(this instanceof C){
|
4821 | switch(arguments.length){
|
4822 | case 0: return new C;
|
4823 | case 1: return new C(a);
|
4824 | case 2: return new C(a, b);
|
4825 | } return new C(a, b, c);
|
4826 | } return C.apply(this, arguments);
|
4827 | };
|
4828 | F[PROTOTYPE] = C[PROTOTYPE];
|
4829 | return F;
|
4830 |
|
4831 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
4832 |
|
4833 | if(IS_PROTO){
|
4834 | (exports.virtual || (exports.virtual = {}))[key] = out;
|
4835 |
|
4836 | if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
|
4837 | }
|
4838 | }
|
4839 | };
|
4840 |
|
4841 | $export.F = 1;
|
4842 | $export.G = 2;
|
4843 | $export.S = 4;
|
4844 | $export.P = 8;
|
4845 | $export.B = 16;
|
4846 | $export.W = 32;
|
4847 | $export.U = 64;
|
4848 | $export.R = 128;
|
4849 | module.exports = $export;
|
4850 |
|
4851 | },
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 | function(module, exports) {
|
4857 |
|
4858 |
|
4859 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
4860 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
4861 | if(typeof __g == 'number')__g = global;
|
4862 |
|
4863 | },
|
4864 |
|
4865 |
|
4866 |
|
4867 |
|
4868 | function(module, exports) {
|
4869 |
|
4870 | var core = module.exports = {version: '2.3.0'};
|
4871 | if(typeof __e == 'number')__e = core;
|
4872 |
|
4873 | },
|
4874 |
|
4875 |
|
4876 |
|
4877 |
|
4878 | function(module, exports, __webpack_require__) {
|
4879 |
|
4880 |
|
4881 | var aFunction = __webpack_require__( 120);
|
4882 | module.exports = function(fn, that, length){
|
4883 | aFunction(fn);
|
4884 | if(that === undefined)return fn;
|
4885 | switch(length){
|
4886 | case 1: return function(a){
|
4887 | return fn.call(that, a);
|
4888 | };
|
4889 | case 2: return function(a, b){
|
4890 | return fn.call(that, a, b);
|
4891 | };
|
4892 | case 3: return function(a, b, c){
|
4893 | return fn.call(that, a, b, c);
|
4894 | };
|
4895 | }
|
4896 | return function(/* ...args */){
|
4897 | return fn.apply(that, arguments);
|
4898 | };
|
4899 | };
|
4900 |
|
4901 | },
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 | function(module, exports) {
|
4907 |
|
4908 | module.exports = function(it){
|
4909 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
4910 | return it;
|
4911 | };
|
4912 |
|
4913 | },
|
4914 |
|
4915 |
|
4916 |
|
4917 |
|
4918 | function(module, exports, __webpack_require__) {
|
4919 |
|
4920 | var dP = __webpack_require__( 122)
|
4921 | , createDesc = __webpack_require__( 130);
|
4922 | module.exports = __webpack_require__( 126) ? function(object, key, value){
|
4923 | return dP.f(object, key, createDesc(1, value));
|
4924 | } : function(object, key, value){
|
4925 | object[key] = value;
|
4926 | return object;
|
4927 | };
|
4928 |
|
4929 | },
|
4930 |
|
4931 |
|
4932 |
|
4933 |
|
4934 | function(module, exports, __webpack_require__) {
|
4935 |
|
4936 | var anObject = __webpack_require__( 123)
|
4937 | , IE8_DOM_DEFINE = __webpack_require__( 125)
|
4938 | , toPrimitive = __webpack_require__( 129)
|
4939 | , dP = Object.defineProperty;
|
4940 |
|
4941 | exports.f = __webpack_require__( 126) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
4942 | anObject(O);
|
4943 | P = toPrimitive(P, true);
|
4944 | anObject(Attributes);
|
4945 | if(IE8_DOM_DEFINE)try {
|
4946 | return dP(O, P, Attributes);
|
4947 | } catch(e){ }
|
4948 | if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
4949 | if('value' in Attributes)O[P] = Attributes.value;
|
4950 | return O;
|
4951 | };
|
4952 |
|
4953 | },
|
4954 |
|
4955 |
|
4956 |
|
4957 |
|
4958 | function(module, exports, __webpack_require__) {
|
4959 |
|
4960 | var isObject = __webpack_require__( 124);
|
4961 | module.exports = function(it){
|
4962 | if(!isObject(it))throw TypeError(it + ' is not an object!');
|
4963 | return it;
|
4964 | };
|
4965 |
|
4966 | },
|
4967 |
|
4968 |
|
4969 |
|
4970 |
|
4971 | function(module, exports) {
|
4972 |
|
4973 | module.exports = function(it){
|
4974 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
4975 | };
|
4976 |
|
4977 | },
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 | function(module, exports, __webpack_require__) {
|
4983 |
|
4984 | module.exports = !__webpack_require__( 126) && !__webpack_require__( 127)(function(){
|
4985 | return Object.defineProperty(__webpack_require__( 128)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
4986 | });
|
4987 |
|
4988 | },
|
4989 |
|
4990 |
|
4991 |
|
4992 |
|
4993 | function(module, exports, __webpack_require__) {
|
4994 |
|
4995 |
|
4996 | module.exports = !__webpack_require__( 127)(function(){
|
4997 | return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
4998 | });
|
4999 |
|
5000 | },
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 | function(module, exports) {
|
5006 |
|
5007 | module.exports = function(exec){
|
5008 | try {
|
5009 | return !!exec();
|
5010 | } catch(e){
|
5011 | return true;
|
5012 | }
|
5013 | };
|
5014 |
|
5015 | },
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 | function(module, exports, __webpack_require__) {
|
5021 |
|
5022 | var isObject = __webpack_require__( 124)
|
5023 | , document = __webpack_require__( 117).document
|
5024 |
|
5025 | , is = isObject(document) && isObject(document.createElement);
|
5026 | module.exports = function(it){
|
5027 | return is ? document.createElement(it) : {};
|
5028 | };
|
5029 |
|
5030 | },
|
5031 |
|
5032 |
|
5033 |
|
5034 |
|
5035 | function(module, exports, __webpack_require__) {
|
5036 |
|
5037 |
|
5038 | var isObject = __webpack_require__( 124);
|
5039 |
|
5040 |
|
5041 | module.exports = function(it, S){
|
5042 | if(!isObject(it))return it;
|
5043 | var fn, val;
|
5044 | if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
5045 | if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
5046 | if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
5047 | throw TypeError("Can't convert object to primitive value");
|
5048 | };
|
5049 |
|
5050 | },
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 | function(module, exports) {
|
5056 |
|
5057 | module.exports = function(bitmap, value){
|
5058 | return {
|
5059 | enumerable : !(bitmap & 1),
|
5060 | configurable: !(bitmap & 2),
|
5061 | writable : !(bitmap & 4),
|
5062 | value : value
|
5063 | };
|
5064 | };
|
5065 |
|
5066 | },
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 | function(module, exports, __webpack_require__) {
|
5072 |
|
5073 | module.exports = __webpack_require__( 121);
|
5074 |
|
5075 | },
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 | function(module, exports) {
|
5081 |
|
5082 | var hasOwnProperty = {}.hasOwnProperty;
|
5083 | module.exports = function(it, key){
|
5084 | return hasOwnProperty.call(it, key);
|
5085 | };
|
5086 |
|
5087 | },
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 | function(module, exports) {
|
5093 |
|
5094 | module.exports = {};
|
5095 |
|
5096 | },
|
5097 |
|
5098 |
|
5099 |
|
5100 |
|
5101 | function(module, exports, __webpack_require__) {
|
5102 |
|
5103 | 'use strict';
|
5104 | var create = __webpack_require__( 135)
|
5105 | , descriptor = __webpack_require__( 130)
|
5106 | , setToStringTag = __webpack_require__( 150)
|
5107 | , IteratorPrototype = {};
|
5108 |
|
5109 |
|
5110 | __webpack_require__( 121)(IteratorPrototype, __webpack_require__( 151)('iterator'), function(){ return this; });
|
5111 |
|
5112 | module.exports = function(Constructor, NAME, next){
|
5113 | Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
|
5114 | setToStringTag(Constructor, NAME + ' Iterator');
|
5115 | };
|
5116 |
|
5117 | },
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 | function(module, exports, __webpack_require__) {
|
5123 |
|
5124 |
|
5125 | var anObject = __webpack_require__( 123)
|
5126 | , dPs = __webpack_require__( 136)
|
5127 | , enumBugKeys = __webpack_require__( 148)
|
5128 | , IE_PROTO = __webpack_require__( 145)('IE_PROTO')
|
5129 | , Empty = function(){ }
|
5130 | , PROTOTYPE = 'prototype';
|
5131 |
|
5132 |
|
5133 | var createDict = function(){
|
5134 |
|
5135 | var iframe = __webpack_require__( 128)('iframe')
|
5136 | , i = enumBugKeys.length
|
5137 | , gt = '>'
|
5138 | , iframeDocument;
|
5139 | iframe.style.display = 'none';
|
5140 | __webpack_require__( 149).appendChild(iframe);
|
5141 | iframe.src = 'javascript:';
|
5142 |
|
5143 |
|
5144 | iframeDocument = iframe.contentWindow.document;
|
5145 | iframeDocument.open();
|
5146 | iframeDocument.write('<script>document.F=Object</script' + gt);
|
5147 | iframeDocument.close();
|
5148 | createDict = iframeDocument.F;
|
5149 | while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
|
5150 | return createDict();
|
5151 | };
|
5152 |
|
5153 | module.exports = Object.create || function create(O, Properties){
|
5154 | var result;
|
5155 | if(O !== null){
|
5156 | Empty[PROTOTYPE] = anObject(O);
|
5157 | result = new Empty;
|
5158 | Empty[PROTOTYPE] = null;
|
5159 |
|
5160 | result[IE_PROTO] = O;
|
5161 | } else result = createDict();
|
5162 | return Properties === undefined ? result : dPs(result, Properties);
|
5163 | };
|
5164 |
|
5165 | },
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 | function(module, exports, __webpack_require__) {
|
5171 |
|
5172 | var dP = __webpack_require__( 122)
|
5173 | , anObject = __webpack_require__( 123)
|
5174 | , getKeys = __webpack_require__( 137);
|
5175 |
|
5176 | module.exports = __webpack_require__( 126) ? Object.defineProperties : function defineProperties(O, Properties){
|
5177 | anObject(O);
|
5178 | var keys = getKeys(Properties)
|
5179 | , length = keys.length
|
5180 | , i = 0
|
5181 | , P;
|
5182 | while(length > i)dP.f(O, P = keys[i++], Properties[P]);
|
5183 | return O;
|
5184 | };
|
5185 |
|
5186 | },
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 | function(module, exports, __webpack_require__) {
|
5192 |
|
5193 |
|
5194 | var $keys = __webpack_require__( 138)
|
5195 | , enumBugKeys = __webpack_require__( 148);
|
5196 |
|
5197 | module.exports = Object.keys || function keys(O){
|
5198 | return $keys(O, enumBugKeys);
|
5199 | };
|
5200 |
|
5201 | },
|
5202 |
|
5203 |
|
5204 |
|
5205 |
|
5206 | function(module, exports, __webpack_require__) {
|
5207 |
|
5208 | var has = __webpack_require__( 132)
|
5209 | , toIObject = __webpack_require__( 139)
|
5210 | , arrayIndexOf = __webpack_require__( 142)(false)
|
5211 | , IE_PROTO = __webpack_require__( 145)('IE_PROTO');
|
5212 |
|
5213 | module.exports = function(object, names){
|
5214 | var O = toIObject(object)
|
5215 | , i = 0
|
5216 | , result = []
|
5217 | , key;
|
5218 | for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
5219 |
|
5220 | while(names.length > i)if(has(O, key = names[i++])){
|
5221 | ~arrayIndexOf(result, key) || result.push(key);
|
5222 | }
|
5223 | return result;
|
5224 | };
|
5225 |
|
5226 | },
|
5227 |
|
5228 |
|
5229 |
|
5230 |
|
5231 | function(module, exports, __webpack_require__) {
|
5232 |
|
5233 |
|
5234 | var IObject = __webpack_require__( 140)
|
5235 | , defined = __webpack_require__( 113);
|
5236 | module.exports = function(it){
|
5237 | return IObject(defined(it));
|
5238 | };
|
5239 |
|
5240 | },
|
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 | function(module, exports, __webpack_require__) {
|
5246 |
|
5247 |
|
5248 | var cof = __webpack_require__( 141);
|
5249 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
5250 | return cof(it) == 'String' ? it.split('') : Object(it);
|
5251 | };
|
5252 |
|
5253 | },
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 | function(module, exports) {
|
5259 |
|
5260 | var toString = {}.toString;
|
5261 |
|
5262 | module.exports = function(it){
|
5263 | return toString.call(it).slice(8, -1);
|
5264 | };
|
5265 |
|
5266 | },
|
5267 |
|
5268 |
|
5269 |
|
5270 |
|
5271 | function(module, exports, __webpack_require__) {
|
5272 |
|
5273 |
|
5274 |
|
5275 | var toIObject = __webpack_require__( 139)
|
5276 | , toLength = __webpack_require__( 143)
|
5277 | , toIndex = __webpack_require__( 144);
|
5278 | module.exports = function(IS_INCLUDES){
|
5279 | return function($this, el, fromIndex){
|
5280 | var O = toIObject($this)
|
5281 | , length = toLength(O.length)
|
5282 | , index = toIndex(fromIndex, length)
|
5283 | , value;
|
5284 |
|
5285 | if(IS_INCLUDES && el != el)while(length > index){
|
5286 | value = O[index++];
|
5287 | if(value != value)return true;
|
5288 |
|
5289 | } else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
5290 | if(O[index] === el)return IS_INCLUDES || index || 0;
|
5291 | } return !IS_INCLUDES && -1;
|
5292 | };
|
5293 | };
|
5294 |
|
5295 | },
|
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 | function(module, exports, __webpack_require__) {
|
5301 |
|
5302 |
|
5303 | var toInteger = __webpack_require__( 112)
|
5304 | , min = Math.min;
|
5305 | module.exports = function(it){
|
5306 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0;
|
5307 | };
|
5308 |
|
5309 | },
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 | function(module, exports, __webpack_require__) {
|
5315 |
|
5316 | var toInteger = __webpack_require__( 112)
|
5317 | , max = Math.max
|
5318 | , min = Math.min;
|
5319 | module.exports = function(index, length){
|
5320 | index = toInteger(index);
|
5321 | return index < 0 ? max(index + length, 0) : min(index, length);
|
5322 | };
|
5323 |
|
5324 | },
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 | function(module, exports, __webpack_require__) {
|
5330 |
|
5331 | var shared = __webpack_require__( 146)('keys')
|
5332 | , uid = __webpack_require__( 147);
|
5333 | module.exports = function(key){
|
5334 | return shared[key] || (shared[key] = uid(key));
|
5335 | };
|
5336 |
|
5337 | },
|
5338 |
|
5339 |
|
5340 |
|
5341 |
|
5342 | function(module, exports, __webpack_require__) {
|
5343 |
|
5344 | var global = __webpack_require__( 117)
|
5345 | , SHARED = '__core-js_shared__'
|
5346 | , store = global[SHARED] || (global[SHARED] = {});
|
5347 | module.exports = function(key){
|
5348 | return store[key] || (store[key] = {});
|
5349 | };
|
5350 |
|
5351 | },
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 | function(module, exports) {
|
5357 |
|
5358 | var id = 0
|
5359 | , px = Math.random();
|
5360 | module.exports = function(key){
|
5361 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
5362 | };
|
5363 |
|
5364 | },
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 | function(module, exports) {
|
5370 |
|
5371 |
|
5372 | module.exports = (
|
5373 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
5374 | ).split(',');
|
5375 |
|
5376 | },
|
5377 |
|
5378 |
|
5379 |
|
5380 |
|
5381 | function(module, exports, __webpack_require__) {
|
5382 |
|
5383 | module.exports = __webpack_require__( 117).document && document.documentElement;
|
5384 |
|
5385 | },
|
5386 |
|
5387 |
|
5388 |
|
5389 |
|
5390 | function(module, exports, __webpack_require__) {
|
5391 |
|
5392 | var def = __webpack_require__( 122).f
|
5393 | , has = __webpack_require__( 132)
|
5394 | , TAG = __webpack_require__( 151)('toStringTag');
|
5395 |
|
5396 | module.exports = function(it, tag, stat){
|
5397 | if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
|
5398 | };
|
5399 |
|
5400 | },
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 | function(module, exports, __webpack_require__) {
|
5406 |
|
5407 | var store = __webpack_require__( 146)('wks')
|
5408 | , uid = __webpack_require__( 147)
|
5409 | , Symbol = __webpack_require__( 117).Symbol
|
5410 | , USE_SYMBOL = typeof Symbol == 'function';
|
5411 |
|
5412 | var $exports = module.exports = function(name){
|
5413 | return store[name] || (store[name] =
|
5414 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
5415 | };
|
5416 |
|
5417 | $exports.store = store;
|
5418 |
|
5419 | },
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 | function(module, exports, __webpack_require__) {
|
5425 |
|
5426 |
|
5427 | var has = __webpack_require__( 132)
|
5428 | , toObject = __webpack_require__( 153)
|
5429 | , IE_PROTO = __webpack_require__( 145)('IE_PROTO')
|
5430 | , ObjectProto = Object.prototype;
|
5431 |
|
5432 | module.exports = Object.getPrototypeOf || function(O){
|
5433 | O = toObject(O);
|
5434 | if(has(O, IE_PROTO))return O[IE_PROTO];
|
5435 | if(typeof O.constructor == 'function' && O instanceof O.constructor){
|
5436 | return O.constructor.prototype;
|
5437 | } return O instanceof Object ? ObjectProto : null;
|
5438 | };
|
5439 |
|
5440 | },
|
5441 |
|
5442 |
|
5443 |
|
5444 |
|
5445 | function(module, exports, __webpack_require__) {
|
5446 |
|
5447 |
|
5448 | var defined = __webpack_require__( 113);
|
5449 | module.exports = function(it){
|
5450 | return Object(defined(it));
|
5451 | };
|
5452 |
|
5453 | },
|
5454 |
|
5455 |
|
5456 |
|
5457 |
|
5458 | function(module, exports, __webpack_require__) {
|
5459 |
|
5460 | __webpack_require__( 155);
|
5461 | var global = __webpack_require__( 117)
|
5462 | , hide = __webpack_require__( 121)
|
5463 | , Iterators = __webpack_require__( 133)
|
5464 | , TO_STRING_TAG = __webpack_require__( 151)('toStringTag');
|
5465 |
|
5466 | for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
|
5467 | var NAME = collections[i]
|
5468 | , Collection = global[NAME]
|
5469 | , proto = Collection && Collection.prototype;
|
5470 | if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
|
5471 | Iterators[NAME] = Iterators.Array;
|
5472 | }
|
5473 |
|
5474 | },
|
5475 |
|
5476 |
|
5477 |
|
5478 |
|
5479 | function(module, exports, __webpack_require__) {
|
5480 |
|
5481 | 'use strict';
|
5482 | var addToUnscopables = __webpack_require__( 156)
|
5483 | , step = __webpack_require__( 157)
|
5484 | , Iterators = __webpack_require__( 133)
|
5485 | , toIObject = __webpack_require__( 139);
|
5486 |
|
5487 |
|
5488 |
|
5489 |
|
5490 |
|
5491 | module.exports = __webpack_require__( 114)(Array, 'Array', function(iterated, kind){
|
5492 | this._t = toIObject(iterated);
|
5493 | this._i = 0;
|
5494 | this._k = kind;
|
5495 |
|
5496 | }, function(){
|
5497 | var O = this._t
|
5498 | , kind = this._k
|
5499 | , index = this._i++;
|
5500 | if(!O || index >= O.length){
|
5501 | this._t = undefined;
|
5502 | return step(1);
|
5503 | }
|
5504 | if(kind == 'keys' )return step(0, index);
|
5505 | if(kind == 'values')return step(0, O[index]);
|
5506 | return step(0, [index, O[index]]);
|
5507 | }, 'values');
|
5508 |
|
5509 |
|
5510 | Iterators.Arguments = Iterators.Array;
|
5511 |
|
5512 | addToUnscopables('keys');
|
5513 | addToUnscopables('values');
|
5514 | addToUnscopables('entries');
|
5515 |
|
5516 | },
|
5517 |
|
5518 |
|
5519 |
|
5520 |
|
5521 | function(module, exports) {
|
5522 |
|
5523 | module.exports = function(){ };
|
5524 |
|
5525 | },
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 | function(module, exports) {
|
5531 |
|
5532 | module.exports = function(done, value){
|
5533 | return {value: value, done: !!done};
|
5534 | };
|
5535 |
|
5536 | },
|
5537 |
|
5538 |
|
5539 |
|
5540 |
|
5541 | function(module, exports, __webpack_require__) {
|
5542 |
|
5543 | exports.f = __webpack_require__( 151);
|
5544 |
|
5545 | },
|
5546 |
|
5547 |
|
5548 |
|
5549 |
|
5550 | function(module, exports, __webpack_require__) {
|
5551 |
|
5552 | module.exports = { "default": __webpack_require__( 160), __esModule: true };
|
5553 |
|
5554 | },
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 | function(module, exports, __webpack_require__) {
|
5560 |
|
5561 | __webpack_require__( 161);
|
5562 | __webpack_require__( 172);
|
5563 | __webpack_require__( 173);
|
5564 | __webpack_require__( 174);
|
5565 | module.exports = __webpack_require__( 118).Symbol;
|
5566 |
|
5567 | },
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 | function(module, exports, __webpack_require__) {
|
5573 |
|
5574 | 'use strict';
|
5575 |
|
5576 | var global = __webpack_require__( 117)
|
5577 | , has = __webpack_require__( 132)
|
5578 | , DESCRIPTORS = __webpack_require__( 126)
|
5579 | , $export = __webpack_require__( 116)
|
5580 | , redefine = __webpack_require__( 131)
|
5581 | , META = __webpack_require__( 162).KEY
|
5582 | , $fails = __webpack_require__( 127)
|
5583 | , shared = __webpack_require__( 146)
|
5584 | , setToStringTag = __webpack_require__( 150)
|
5585 | , uid = __webpack_require__( 147)
|
5586 | , wks = __webpack_require__( 151)
|
5587 | , wksExt = __webpack_require__( 158)
|
5588 | , wksDefine = __webpack_require__( 163)
|
5589 | , keyOf = __webpack_require__( 164)
|
5590 | , enumKeys = __webpack_require__( 165)
|
5591 | , isArray = __webpack_require__( 168)
|
5592 | , anObject = __webpack_require__( 123)
|
5593 | , toIObject = __webpack_require__( 139)
|
5594 | , toPrimitive = __webpack_require__( 129)
|
5595 | , createDesc = __webpack_require__( 130)
|
5596 | , _create = __webpack_require__( 135)
|
5597 | , gOPNExt = __webpack_require__( 169)
|
5598 | , $GOPD = __webpack_require__( 171)
|
5599 | , $DP = __webpack_require__( 122)
|
5600 | , $keys = __webpack_require__( 137)
|
5601 | , gOPD = $GOPD.f
|
5602 | , dP = $DP.f
|
5603 | , gOPN = gOPNExt.f
|
5604 | , $Symbol = global.Symbol
|
5605 | , $JSON = global.JSON
|
5606 | , _stringify = $JSON && $JSON.stringify
|
5607 | , PROTOTYPE = 'prototype'
|
5608 | , HIDDEN = wks('_hidden')
|
5609 | , TO_PRIMITIVE = wks('toPrimitive')
|
5610 | , isEnum = {}.propertyIsEnumerable
|
5611 | , SymbolRegistry = shared('symbol-registry')
|
5612 | , AllSymbols = shared('symbols')
|
5613 | , ObjectProto = Object[PROTOTYPE]
|
5614 | , USE_NATIVE = typeof $Symbol == 'function'
|
5615 | , QObject = global.QObject;
|
5616 |
|
5617 | var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
5618 |
|
5619 |
|
5620 | var setSymbolDesc = DESCRIPTORS && $fails(function(){
|
5621 | return _create(dP({}, 'a', {
|
5622 | get: function(){ return dP(this, 'a', {value: 7}).a; }
|
5623 | })).a != 7;
|
5624 | }) ? function(it, key, D){
|
5625 | var protoDesc = gOPD(ObjectProto, key);
|
5626 | if(protoDesc)delete ObjectProto[key];
|
5627 | dP(it, key, D);
|
5628 | if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
|
5629 | } : dP;
|
5630 |
|
5631 | var wrap = function(tag){
|
5632 | var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
5633 | sym._k = tag;
|
5634 | return sym;
|
5635 | };
|
5636 |
|
5637 | var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
|
5638 | return typeof it == 'symbol';
|
5639 | } : function(it){
|
5640 | return it instanceof $Symbol;
|
5641 | };
|
5642 |
|
5643 | var $defineProperty = function defineProperty(it, key, D){
|
5644 | anObject(it);
|
5645 | key = toPrimitive(key, true);
|
5646 | anObject(D);
|
5647 | if(has(AllSymbols, key)){
|
5648 | if(!D.enumerable){
|
5649 | if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
|
5650 | it[HIDDEN][key] = true;
|
5651 | } else {
|
5652 | if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
|
5653 | D = _create(D, {enumerable: createDesc(0, false)});
|
5654 | } return setSymbolDesc(it, key, D);
|
5655 | } return dP(it, key, D);
|
5656 | };
|
5657 | var $defineProperties = function defineProperties(it, P){
|
5658 | anObject(it);
|
5659 | var keys = enumKeys(P = toIObject(P))
|
5660 | , i = 0
|
5661 | , l = keys.length
|
5662 | , key;
|
5663 | while(l > i)$defineProperty(it, key = keys[i++], P[key]);
|
5664 | return it;
|
5665 | };
|
5666 | var $create = function create(it, P){
|
5667 | return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
5668 | };
|
5669 | var $propertyIsEnumerable = function propertyIsEnumerable(key){
|
5670 | var E = isEnum.call(this, key = toPrimitive(key, true));
|
5671 | return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
5672 | };
|
5673 | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
|
5674 | var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
|
5675 | if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
|
5676 | return D;
|
5677 | };
|
5678 | var $getOwnPropertyNames = function getOwnPropertyNames(it){
|
5679 | var names = gOPN(toIObject(it))
|
5680 | , result = []
|
5681 | , i = 0
|
5682 | , key;
|
5683 | while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
|
5684 | return result;
|
5685 | };
|
5686 | var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
|
5687 | var names = gOPN(toIObject(it))
|
5688 | , result = []
|
5689 | , i = 0
|
5690 | , key;
|
5691 | while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
|
5692 | return result;
|
5693 | };
|
5694 |
|
5695 |
|
5696 | if(!USE_NATIVE){
|
5697 | $Symbol = function Symbol(){
|
5698 | if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
|
5699 | var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
5700 | DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
|
5701 | configurable: true,
|
5702 | set: function(value){
|
5703 | if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
5704 | setSymbolDesc(this, tag, createDesc(1, value));
|
5705 | }
|
5706 | });
|
5707 | return wrap(tag);
|
5708 | };
|
5709 | redefine($Symbol[PROTOTYPE], 'toString', function toString(){
|
5710 | return this._k;
|
5711 | });
|
5712 |
|
5713 | $GOPD.f = $getOwnPropertyDescriptor;
|
5714 | $DP.f = $defineProperty;
|
5715 | __webpack_require__( 170).f = gOPNExt.f = $getOwnPropertyNames;
|
5716 | __webpack_require__( 167).f = $propertyIsEnumerable;
|
5717 | __webpack_require__( 166).f = $getOwnPropertySymbols;
|
5718 |
|
5719 | if(DESCRIPTORS && !__webpack_require__( 115)){
|
5720 | redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
5721 | }
|
5722 |
|
5723 | wksExt.f = function(name){
|
5724 | return wrap(wks(name));
|
5725 | }
|
5726 | }
|
5727 |
|
5728 | $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
|
5729 |
|
5730 | for(var symbols = (
|
5731 |
|
5732 | 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
5733 | ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
|
5734 |
|
5735 | for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
|
5736 |
|
5737 | $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
5738 |
|
5739 | 'for': function(key){
|
5740 | return has(SymbolRegistry, key += '')
|
5741 | ? SymbolRegistry[key]
|
5742 | : SymbolRegistry[key] = $Symbol(key);
|
5743 | },
|
5744 |
|
5745 | keyFor: function keyFor(key){
|
5746 | if(isSymbol(key))return keyOf(SymbolRegistry, key);
|
5747 | throw TypeError(key + ' is not a symbol!');
|
5748 | },
|
5749 | useSetter: function(){ setter = true; },
|
5750 | useSimple: function(){ setter = false; }
|
5751 | });
|
5752 |
|
5753 | $export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
5754 |
|
5755 | create: $create,
|
5756 |
|
5757 | defineProperty: $defineProperty,
|
5758 |
|
5759 | defineProperties: $defineProperties,
|
5760 |
|
5761 | getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
5762 |
|
5763 | getOwnPropertyNames: $getOwnPropertyNames,
|
5764 |
|
5765 | getOwnPropertySymbols: $getOwnPropertySymbols
|
5766 | });
|
5767 |
|
5768 |
|
5769 | $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
|
5770 | var S = $Symbol();
|
5771 |
|
5772 |
|
5773 |
|
5774 | return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
|
5775 | })), 'JSON', {
|
5776 | stringify: function stringify(it){
|
5777 | if(it === undefined || isSymbol(it))return;
|
5778 | var args = [it]
|
5779 | , i = 1
|
5780 | , replacer, $replacer;
|
5781 | while(arguments.length > i)args.push(arguments[i++]);
|
5782 | replacer = args[1];
|
5783 | if(typeof replacer == 'function')$replacer = replacer;
|
5784 | if($replacer || !isArray(replacer))replacer = function(key, value){
|
5785 | if($replacer)value = $replacer.call(this, key, value);
|
5786 | if(!isSymbol(value))return value;
|
5787 | };
|
5788 | args[1] = replacer;
|
5789 | return _stringify.apply($JSON, args);
|
5790 | }
|
5791 | });
|
5792 |
|
5793 |
|
5794 | $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__( 121)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
5795 |
|
5796 | setToStringTag($Symbol, 'Symbol');
|
5797 |
|
5798 | setToStringTag(Math, 'Math', true);
|
5799 |
|
5800 | setToStringTag(global.JSON, 'JSON', true);
|
5801 |
|
5802 | },
|
5803 |
|
5804 |
|
5805 |
|
5806 |
|
5807 | function(module, exports, __webpack_require__) {
|
5808 |
|
5809 | var META = __webpack_require__( 147)('meta')
|
5810 | , isObject = __webpack_require__( 124)
|
5811 | , has = __webpack_require__( 132)
|
5812 | , setDesc = __webpack_require__( 122).f
|
5813 | , id = 0;
|
5814 | var isExtensible = Object.isExtensible || function(){
|
5815 | return true;
|
5816 | };
|
5817 | var FREEZE = !__webpack_require__( 127)(function(){
|
5818 | return isExtensible(Object.preventExtensions({}));
|
5819 | });
|
5820 | var setMeta = function(it){
|
5821 | setDesc(it, META, {value: {
|
5822 | i: 'O' + ++id,
|
5823 | w: {}
|
5824 | }});
|
5825 | };
|
5826 | var fastKey = function(it, create){
|
5827 |
|
5828 | if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
5829 | if(!has(it, META)){
|
5830 |
|
5831 | if(!isExtensible(it))return 'F';
|
5832 |
|
5833 | if(!create)return 'E';
|
5834 |
|
5835 | setMeta(it);
|
5836 |
|
5837 | } return it[META].i;
|
5838 | };
|
5839 | var getWeak = function(it, create){
|
5840 | if(!has(it, META)){
|
5841 |
|
5842 | if(!isExtensible(it))return true;
|
5843 |
|
5844 | if(!create)return false;
|
5845 |
|
5846 | setMeta(it);
|
5847 |
|
5848 | } return it[META].w;
|
5849 | };
|
5850 |
|
5851 | var onFreeze = function(it){
|
5852 | if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
|
5853 | return it;
|
5854 | };
|
5855 | var meta = module.exports = {
|
5856 | KEY: META,
|
5857 | NEED: false,
|
5858 | fastKey: fastKey,
|
5859 | getWeak: getWeak,
|
5860 | onFreeze: onFreeze
|
5861 | };
|
5862 |
|
5863 | },
|
5864 |
|
5865 |
|
5866 |
|
5867 |
|
5868 | function(module, exports, __webpack_require__) {
|
5869 |
|
5870 | var global = __webpack_require__( 117)
|
5871 | , core = __webpack_require__( 118)
|
5872 | , LIBRARY = __webpack_require__( 115)
|
5873 | , wksExt = __webpack_require__( 158)
|
5874 | , defineProperty = __webpack_require__( 122).f;
|
5875 | module.exports = function(name){
|
5876 | var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
5877 | if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
|
5878 | };
|
5879 |
|
5880 | },
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 | function(module, exports, __webpack_require__) {
|
5886 |
|
5887 | var getKeys = __webpack_require__( 137)
|
5888 | , toIObject = __webpack_require__( 139);
|
5889 | module.exports = function(object, el){
|
5890 | var O = toIObject(object)
|
5891 | , keys = getKeys(O)
|
5892 | , length = keys.length
|
5893 | , index = 0
|
5894 | , key;
|
5895 | while(length > index)if(O[key = keys[index++]] === el)return key;
|
5896 | };
|
5897 |
|
5898 | },
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 | function(module, exports, __webpack_require__) {
|
5904 |
|
5905 |
|
5906 | var getKeys = __webpack_require__( 137)
|
5907 | , gOPS = __webpack_require__( 166)
|
5908 | , pIE = __webpack_require__( 167);
|
5909 | module.exports = function(it){
|
5910 | var result = getKeys(it)
|
5911 | , getSymbols = gOPS.f;
|
5912 | if(getSymbols){
|
5913 | var symbols = getSymbols(it)
|
5914 | , isEnum = pIE.f
|
5915 | , i = 0
|
5916 | , key;
|
5917 | while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
|
5918 | } return result;
|
5919 | };
|
5920 |
|
5921 | },
|
5922 |
|
5923 |
|
5924 |
|
5925 |
|
5926 | function(module, exports) {
|
5927 |
|
5928 | exports.f = Object.getOwnPropertySymbols;
|
5929 |
|
5930 | },
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 | function(module, exports) {
|
5936 |
|
5937 | exports.f = {}.propertyIsEnumerable;
|
5938 |
|
5939 | },
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 | function(module, exports, __webpack_require__) {
|
5945 |
|
5946 |
|
5947 | var cof = __webpack_require__( 141);
|
5948 | module.exports = Array.isArray || function isArray(arg){
|
5949 | return cof(arg) == 'Array';
|
5950 | };
|
5951 |
|
5952 | },
|
5953 |
|
5954 |
|
5955 |
|
5956 |
|
5957 | function(module, exports, __webpack_require__) {
|
5958 |
|
5959 |
|
5960 | var toIObject = __webpack_require__( 139)
|
5961 | , gOPN = __webpack_require__( 170).f
|
5962 | , toString = {}.toString;
|
5963 |
|
5964 | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
5965 | ? Object.getOwnPropertyNames(window) : [];
|
5966 |
|
5967 | var getWindowNames = function(it){
|
5968 | try {
|
5969 | return gOPN(it);
|
5970 | } catch(e){
|
5971 | return windowNames.slice();
|
5972 | }
|
5973 | };
|
5974 |
|
5975 | module.exports.f = function getOwnPropertyNames(it){
|
5976 | return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
5977 | };
|
5978 |
|
5979 |
|
5980 | },
|
5981 |
|
5982 |
|
5983 |
|
5984 |
|
5985 | function(module, exports, __webpack_require__) {
|
5986 |
|
5987 |
|
5988 | var $keys = __webpack_require__( 138)
|
5989 | , hiddenKeys = __webpack_require__( 148).concat('length', 'prototype');
|
5990 |
|
5991 | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
|
5992 | return $keys(O, hiddenKeys);
|
5993 | };
|
5994 |
|
5995 | },
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 | function(module, exports, __webpack_require__) {
|
6001 |
|
6002 | var pIE = __webpack_require__( 167)
|
6003 | , createDesc = __webpack_require__( 130)
|
6004 | , toIObject = __webpack_require__( 139)
|
6005 | , toPrimitive = __webpack_require__( 129)
|
6006 | , has = __webpack_require__( 132)
|
6007 | , IE8_DOM_DEFINE = __webpack_require__( 125)
|
6008 | , gOPD = Object.getOwnPropertyDescriptor;
|
6009 |
|
6010 | exports.f = __webpack_require__( 126) ? gOPD : function getOwnPropertyDescriptor(O, P){
|
6011 | O = toIObject(O);
|
6012 | P = toPrimitive(P, true);
|
6013 | if(IE8_DOM_DEFINE)try {
|
6014 | return gOPD(O, P);
|
6015 | } catch(e){ }
|
6016 | if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
|
6017 | };
|
6018 |
|
6019 | },
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 | function(module, exports) {
|
6025 |
|
6026 |
|
6027 |
|
6028 | },
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 | function(module, exports, __webpack_require__) {
|
6034 |
|
6035 | __webpack_require__( 163)('asyncIterator');
|
6036 |
|
6037 | },
|
6038 |
|
6039 |
|
6040 |
|
6041 |
|
6042 | function(module, exports, __webpack_require__) {
|
6043 |
|
6044 | __webpack_require__( 163)('observable');
|
6045 |
|
6046 | },
|
6047 |
|
6048 |
|
6049 |
|
6050 |
|
6051 | function(module, exports, __webpack_require__) {
|
6052 |
|
6053 | "use strict";
|
6054 |
|
6055 | exports.__esModule = true;
|
6056 |
|
6057 | var _setPrototypeOf = __webpack_require__( 176);
|
6058 |
|
6059 | var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
6060 |
|
6061 | var _create = __webpack_require__( 180);
|
6062 |
|
6063 | var _create2 = _interopRequireDefault(_create);
|
6064 |
|
6065 | var _typeof2 = __webpack_require__( 107);
|
6066 |
|
6067 | var _typeof3 = _interopRequireDefault(_typeof2);
|
6068 |
|
6069 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6070 |
|
6071 | exports.default = function (subClass, superClass) {
|
6072 | if (typeof superClass !== "function" && superClass !== null) {
|
6073 | throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
|
6074 | }
|
6075 |
|
6076 | subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
|
6077 | constructor: {
|
6078 | value: subClass,
|
6079 | enumerable: false,
|
6080 | writable: true,
|
6081 | configurable: true
|
6082 | }
|
6083 | });
|
6084 | if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
|
6085 | };
|
6086 |
|
6087 | },
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 | function(module, exports, __webpack_require__) {
|
6093 |
|
6094 | module.exports = { "default": __webpack_require__( 177), __esModule: true };
|
6095 |
|
6096 | },
|
6097 |
|
6098 |
|
6099 |
|
6100 |
|
6101 | function(module, exports, __webpack_require__) {
|
6102 |
|
6103 | __webpack_require__( 178);
|
6104 | module.exports = __webpack_require__( 118).Object.setPrototypeOf;
|
6105 |
|
6106 | },
|
6107 |
|
6108 |
|
6109 |
|
6110 |
|
6111 | function(module, exports, __webpack_require__) {
|
6112 |
|
6113 |
|
6114 | var $export = __webpack_require__( 116);
|
6115 | $export($export.S, 'Object', {setPrototypeOf: __webpack_require__( 179).set});
|
6116 |
|
6117 | },
|
6118 |
|
6119 |
|
6120 |
|
6121 |
|
6122 | function(module, exports, __webpack_require__) {
|
6123 |
|
6124 |
|
6125 |
|
6126 | var isObject = __webpack_require__( 124)
|
6127 | , anObject = __webpack_require__( 123);
|
6128 | var check = function(O, proto){
|
6129 | anObject(O);
|
6130 | if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
|
6131 | };
|
6132 | module.exports = {
|
6133 | set: Object.setPrototypeOf || ('__proto__' in {} ?
|
6134 | function(test, buggy, set){
|
6135 | try {
|
6136 | set = __webpack_require__(/*! ./_ctx */ 119)(Function.call, __webpack_require__(/*! ./_object-gopd */ 171).f(Object.prototype, '__proto__').set, 2);
|
6137 | set(test, []);
|
6138 | buggy = !(test instanceof Array);
|
6139 | } catch(e){ buggy = true; }
|
6140 | return function setPrototypeOf(O, proto){
|
6141 | check(O, proto);
|
6142 | if(buggy)O.__proto__ = proto;
|
6143 | else set(O, proto);
|
6144 | return O;
|
6145 | };
|
6146 | }({}, false) : undefined),
|
6147 | check: check
|
6148 | };
|
6149 |
|
6150 | },
|
6151 |
|
6152 |
|
6153 |
|
6154 |
|
6155 | function(module, exports, __webpack_require__) {
|
6156 |
|
6157 | module.exports = { "default": __webpack_require__( 181), __esModule: true };
|
6158 |
|
6159 | },
|
6160 |
|
6161 |
|
6162 |
|
6163 |
|
6164 | function(module, exports, __webpack_require__) {
|
6165 |
|
6166 | __webpack_require__( 182);
|
6167 | var $Object = __webpack_require__( 118).Object;
|
6168 | module.exports = function create(P, D){
|
6169 | return $Object.create(P, D);
|
6170 | };
|
6171 |
|
6172 | },
|
6173 |
|
6174 |
|
6175 |
|
6176 |
|
6177 | function(module, exports, __webpack_require__) {
|
6178 |
|
6179 | var $export = __webpack_require__( 116)
|
6180 |
|
6181 | $export($export.S, 'Object', {create: __webpack_require__( 135)});
|
6182 |
|
6183 | },
|
6184 |
|
6185 |
|
6186 |
|
6187 |
|
6188 | function(module, exports) {
|
6189 |
|
6190 | "use strict";
|
6191 |
|
6192 | exports.__esModule = true;
|
6193 |
|
6194 | exports.default = function (instance, Constructor) {
|
6195 | if (!(instance instanceof Constructor)) {
|
6196 | throw new TypeError("Cannot call a class as a function");
|
6197 | }
|
6198 | };
|
6199 |
|
6200 | },
|
6201 |
|
6202 |
|
6203 |
|
6204 |
|
6205 | function(module, exports, __webpack_require__) {
|
6206 |
|
6207 | "use strict";
|
6208 | var EmptyObservable_1 = __webpack_require__( 94);
|
6209 | exports.empty = EmptyObservable_1.EmptyObservable.create;
|
6210 |
|
6211 |
|
6212 | },
|
6213 |
|
6214 |
|
6215 |
|
6216 |
|
6217 | function(module, exports, __webpack_require__) {
|
6218 |
|
6219 | "use strict";
|
6220 | var ReplaySubject_1 = __webpack_require__( 186);
|
6221 | var multicast_1 = __webpack_require__( 195);
|
6222 | |
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 | function publishReplay(bufferSize, windowTime, scheduler) {
|
6231 | if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
|
6232 | if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
|
6233 | return multicast_1.multicast.call(this, new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler));
|
6234 | }
|
6235 | exports.publishReplay = publishReplay;
|
6236 |
|
6237 |
|
6238 | },
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 | function(module, exports, __webpack_require__) {
|
6244 |
|
6245 | "use strict";
|
6246 | var __extends = (this && this.__extends) || function (d, b) {
|
6247 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6248 | function __() { this.constructor = d; }
|
6249 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6250 | };
|
6251 | var Subject_1 = __webpack_require__( 187);
|
6252 | var queue_1 = __webpack_require__( 191);
|
6253 | var observeOn_1 = __webpack_require__( 96);
|
6254 | |
6255 |
|
6256 |
|
6257 | var ReplaySubject = (function (_super) {
|
6258 | __extends(ReplaySubject, _super);
|
6259 | function ReplaySubject(bufferSize, windowTime, scheduler) {
|
6260 | if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
|
6261 | if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
|
6262 | _super.call(this);
|
6263 | this.events = [];
|
6264 | this.scheduler = scheduler;
|
6265 | this.bufferSize = bufferSize < 1 ? 1 : bufferSize;
|
6266 | this._windowTime = windowTime < 1 ? 1 : windowTime;
|
6267 | }
|
6268 | ReplaySubject.prototype._next = function (value) {
|
6269 | var now = this._getNow();
|
6270 | this.events.push(new ReplayEvent(now, value));
|
6271 | this._trimBufferThenGetEvents(now);
|
6272 | _super.prototype._next.call(this, value);
|
6273 | };
|
6274 | ReplaySubject.prototype._subscribe = function (subscriber) {
|
6275 | var events = this._trimBufferThenGetEvents(this._getNow());
|
6276 | var scheduler = this.scheduler;
|
6277 | if (scheduler) {
|
6278 | subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler));
|
6279 | }
|
6280 | var index = -1;
|
6281 | var len = events.length;
|
6282 | while (++index < len && !subscriber.isUnsubscribed) {
|
6283 | subscriber.next(events[index].value);
|
6284 | }
|
6285 | return _super.prototype._subscribe.call(this, subscriber);
|
6286 | };
|
6287 | ReplaySubject.prototype._getNow = function () {
|
6288 | return (this.scheduler || queue_1.queue).now();
|
6289 | };
|
6290 | ReplaySubject.prototype._trimBufferThenGetEvents = function (now) {
|
6291 | var bufferSize = this.bufferSize;
|
6292 | var _windowTime = this._windowTime;
|
6293 | var events = this.events;
|
6294 | var eventsCount = events.length;
|
6295 | var spliceCount = 0;
|
6296 |
|
6297 |
|
6298 |
|
6299 | while (spliceCount < eventsCount) {
|
6300 | if ((now - events[spliceCount].time) < _windowTime) {
|
6301 | break;
|
6302 | }
|
6303 | spliceCount += 1;
|
6304 | }
|
6305 | if (eventsCount > bufferSize) {
|
6306 | spliceCount = Math.max(spliceCount, eventsCount - bufferSize);
|
6307 | }
|
6308 | if (spliceCount > 0) {
|
6309 | events.splice(0, spliceCount);
|
6310 | }
|
6311 | return events;
|
6312 | };
|
6313 | return ReplaySubject;
|
6314 | }(Subject_1.Subject));
|
6315 | exports.ReplaySubject = ReplaySubject;
|
6316 | var ReplayEvent = (function () {
|
6317 | function ReplayEvent(time, value) {
|
6318 | this.time = time;
|
6319 | this.value = value;
|
6320 | }
|
6321 | return ReplayEvent;
|
6322 | }());
|
6323 |
|
6324 |
|
6325 | },
|
6326 |
|
6327 |
|
6328 |
|
6329 |
|
6330 | function(module, exports, __webpack_require__) {
|
6331 |
|
6332 | "use strict";
|
6333 | var __extends = (this && this.__extends) || function (d, b) {
|
6334 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6335 | function __() { this.constructor = d; }
|
6336 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6337 | };
|
6338 | var Observable_1 = __webpack_require__( 78);
|
6339 | var Subscriber_1 = __webpack_require__( 80);
|
6340 | var Subscription_1 = __webpack_require__( 81);
|
6341 | var SubjectSubscription_1 = __webpack_require__( 188);
|
6342 | var rxSubscriber_1 = __webpack_require__( 86);
|
6343 | var throwError_1 = __webpack_require__( 189);
|
6344 | var ObjectUnsubscribedError_1 = __webpack_require__( 190);
|
6345 | |
6346 |
|
6347 |
|
6348 | var Subject = (function (_super) {
|
6349 | __extends(Subject, _super);
|
6350 | function Subject(destination, source) {
|
6351 | _super.call(this);
|
6352 | this.destination = destination;
|
6353 | this.source = source;
|
6354 | this.observers = [];
|
6355 | this.isUnsubscribed = false;
|
6356 | this.isStopped = false;
|
6357 | this.hasErrored = false;
|
6358 | this.dispatching = false;
|
6359 | this.hasCompleted = false;
|
6360 | this.source = source;
|
6361 | }
|
6362 | Subject.prototype.lift = function (operator) {
|
6363 | var subject = new Subject(this.destination || this, this);
|
6364 | subject.operator = operator;
|
6365 | return subject;
|
6366 | };
|
6367 | Subject.prototype.add = function (subscription) {
|
6368 | return Subscription_1.Subscription.prototype.add.call(this, subscription);
|
6369 | };
|
6370 | Subject.prototype.remove = function (subscription) {
|
6371 | Subscription_1.Subscription.prototype.remove.call(this, subscription);
|
6372 | };
|
6373 | Subject.prototype.unsubscribe = function () {
|
6374 | Subscription_1.Subscription.prototype.unsubscribe.call(this);
|
6375 | };
|
6376 | Subject.prototype._subscribe = function (subscriber) {
|
6377 | if (this.source) {
|
6378 | return this.source.subscribe(subscriber);
|
6379 | }
|
6380 | else {
|
6381 | if (subscriber.isUnsubscribed) {
|
6382 | return;
|
6383 | }
|
6384 | else if (this.hasErrored) {
|
6385 | return subscriber.error(this.errorValue);
|
6386 | }
|
6387 | else if (this.hasCompleted) {
|
6388 | return subscriber.complete();
|
6389 | }
|
6390 | this.throwIfUnsubscribed();
|
6391 | var subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);
|
6392 | this.observers.push(subscriber);
|
6393 | return subscription;
|
6394 | }
|
6395 | };
|
6396 | Subject.prototype._unsubscribe = function () {
|
6397 | this.source = null;
|
6398 | this.isStopped = true;
|
6399 | this.observers = null;
|
6400 | this.destination = null;
|
6401 | };
|
6402 | Subject.prototype.next = function (value) {
|
6403 | this.throwIfUnsubscribed();
|
6404 | if (this.isStopped) {
|
6405 | return;
|
6406 | }
|
6407 | this.dispatching = true;
|
6408 | this._next(value);
|
6409 | this.dispatching = false;
|
6410 | if (this.hasErrored) {
|
6411 | this._error(this.errorValue);
|
6412 | }
|
6413 | else if (this.hasCompleted) {
|
6414 | this._complete();
|
6415 | }
|
6416 | };
|
6417 | Subject.prototype.error = function (err) {
|
6418 | this.throwIfUnsubscribed();
|
6419 | if (this.isStopped) {
|
6420 | return;
|
6421 | }
|
6422 | this.isStopped = true;
|
6423 | this.hasErrored = true;
|
6424 | this.errorValue = err;
|
6425 | if (this.dispatching) {
|
6426 | return;
|
6427 | }
|
6428 | this._error(err);
|
6429 | };
|
6430 | Subject.prototype.complete = function () {
|
6431 | this.throwIfUnsubscribed();
|
6432 | if (this.isStopped) {
|
6433 | return;
|
6434 | }
|
6435 | this.isStopped = true;
|
6436 | this.hasCompleted = true;
|
6437 | if (this.dispatching) {
|
6438 | return;
|
6439 | }
|
6440 | this._complete();
|
6441 | };
|
6442 | Subject.prototype.asObservable = function () {
|
6443 | var observable = new SubjectObservable(this);
|
6444 | return observable;
|
6445 | };
|
6446 | Subject.prototype._next = function (value) {
|
6447 | if (this.destination) {
|
6448 | this.destination.next(value);
|
6449 | }
|
6450 | else {
|
6451 | this._finalNext(value);
|
6452 | }
|
6453 | };
|
6454 | Subject.prototype._finalNext = function (value) {
|
6455 | var index = -1;
|
6456 | var observers = this.observers.slice(0);
|
6457 | var len = observers.length;
|
6458 | while (++index < len) {
|
6459 | observers[index].next(value);
|
6460 | }
|
6461 | };
|
6462 | Subject.prototype._error = function (err) {
|
6463 | if (this.destination) {
|
6464 | this.destination.error(err);
|
6465 | }
|
6466 | else {
|
6467 | this._finalError(err);
|
6468 | }
|
6469 | };
|
6470 | Subject.prototype._finalError = function (err) {
|
6471 | var index = -1;
|
6472 | var observers = this.observers;
|
6473 |
|
6474 |
|
6475 | this.observers = null;
|
6476 | this.isUnsubscribed = true;
|
6477 | if (observers) {
|
6478 | var len = observers.length;
|
6479 | while (++index < len) {
|
6480 | observers[index].error(err);
|
6481 | }
|
6482 | }
|
6483 | this.isUnsubscribed = false;
|
6484 | this.unsubscribe();
|
6485 | };
|
6486 | Subject.prototype._complete = function () {
|
6487 | if (this.destination) {
|
6488 | this.destination.complete();
|
6489 | }
|
6490 | else {
|
6491 | this._finalComplete();
|
6492 | }
|
6493 | };
|
6494 | Subject.prototype._finalComplete = function () {
|
6495 | var index = -1;
|
6496 | var observers = this.observers;
|
6497 |
|
6498 |
|
6499 | this.observers = null;
|
6500 | this.isUnsubscribed = true;
|
6501 | if (observers) {
|
6502 | var len = observers.length;
|
6503 | while (++index < len) {
|
6504 | observers[index].complete();
|
6505 | }
|
6506 | }
|
6507 | this.isUnsubscribed = false;
|
6508 | this.unsubscribe();
|
6509 | };
|
6510 | Subject.prototype.throwIfUnsubscribed = function () {
|
6511 | if (this.isUnsubscribed) {
|
6512 | throwError_1.throwError(new ObjectUnsubscribedError_1.ObjectUnsubscribedError());
|
6513 | }
|
6514 | };
|
6515 | Subject.prototype[rxSubscriber_1.$$rxSubscriber] = function () {
|
6516 | return new Subscriber_1.Subscriber(this);
|
6517 | };
|
6518 | Subject.create = function (destination, source) {
|
6519 | return new Subject(destination, source);
|
6520 | };
|
6521 | return Subject;
|
6522 | }(Observable_1.Observable));
|
6523 | exports.Subject = Subject;
|
6524 | |
6525 |
|
6526 |
|
6527 |
|
6528 |
|
6529 | var SubjectObservable = (function (_super) {
|
6530 | __extends(SubjectObservable, _super);
|
6531 | function SubjectObservable(source) {
|
6532 | _super.call(this);
|
6533 | this.source = source;
|
6534 | }
|
6535 | return SubjectObservable;
|
6536 | }(Observable_1.Observable));
|
6537 |
|
6538 |
|
6539 | },
|
6540 |
|
6541 |
|
6542 |
|
6543 |
|
6544 | function(module, exports, __webpack_require__) {
|
6545 |
|
6546 | "use strict";
|
6547 | var __extends = (this && this.__extends) || function (d, b) {
|
6548 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6549 | function __() { this.constructor = d; }
|
6550 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6551 | };
|
6552 | var Subscription_1 = __webpack_require__( 81);
|
6553 | |
6554 |
|
6555 |
|
6556 |
|
6557 |
|
6558 | var SubjectSubscription = (function (_super) {
|
6559 | __extends(SubjectSubscription, _super);
|
6560 | function SubjectSubscription(subject, observer) {
|
6561 | _super.call(this);
|
6562 | this.subject = subject;
|
6563 | this.observer = observer;
|
6564 | this.isUnsubscribed = false;
|
6565 | }
|
6566 | SubjectSubscription.prototype.unsubscribe = function () {
|
6567 | if (this.isUnsubscribed) {
|
6568 | return;
|
6569 | }
|
6570 | this.isUnsubscribed = true;
|
6571 | var subject = this.subject;
|
6572 | var observers = subject.observers;
|
6573 | this.subject = null;
|
6574 | if (!observers || observers.length === 0 || subject.isUnsubscribed) {
|
6575 | return;
|
6576 | }
|
6577 | var subscriberIndex = observers.indexOf(this.observer);
|
6578 | if (subscriberIndex !== -1) {
|
6579 | observers.splice(subscriberIndex, 1);
|
6580 | }
|
6581 | };
|
6582 | return SubjectSubscription;
|
6583 | }(Subscription_1.Subscription));
|
6584 | exports.SubjectSubscription = SubjectSubscription;
|
6585 |
|
6586 |
|
6587 | },
|
6588 |
|
6589 |
|
6590 |
|
6591 |
|
6592 | function(module, exports) {
|
6593 |
|
6594 | "use strict";
|
6595 | function throwError(e) { throw e; }
|
6596 | exports.throwError = throwError;
|
6597 |
|
6598 |
|
6599 | },
|
6600 |
|
6601 |
|
6602 |
|
6603 |
|
6604 | function(module, exports) {
|
6605 |
|
6606 | "use strict";
|
6607 | var __extends = (this && this.__extends) || function (d, b) {
|
6608 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6609 | function __() { this.constructor = d; }
|
6610 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6611 | };
|
6612 | |
6613 |
|
6614 |
|
6615 |
|
6616 |
|
6617 |
|
6618 |
|
6619 |
|
6620 |
|
6621 | var ObjectUnsubscribedError = (function (_super) {
|
6622 | __extends(ObjectUnsubscribedError, _super);
|
6623 | function ObjectUnsubscribedError() {
|
6624 | _super.call(this, 'object unsubscribed');
|
6625 | this.name = 'ObjectUnsubscribedError';
|
6626 | }
|
6627 | return ObjectUnsubscribedError;
|
6628 | }(Error));
|
6629 | exports.ObjectUnsubscribedError = ObjectUnsubscribedError;
|
6630 |
|
6631 |
|
6632 | },
|
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 | function(module, exports, __webpack_require__) {
|
6638 |
|
6639 | "use strict";
|
6640 | var QueueScheduler_1 = __webpack_require__( 192);
|
6641 | exports.queue = new QueueScheduler_1.QueueScheduler();
|
6642 |
|
6643 |
|
6644 | },
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 | function(module, exports, __webpack_require__) {
|
6650 |
|
6651 | "use strict";
|
6652 | var QueueAction_1 = __webpack_require__( 193);
|
6653 | var FutureAction_1 = __webpack_require__( 194);
|
6654 | var QueueScheduler = (function () {
|
6655 | function QueueScheduler() {
|
6656 | this.active = false;
|
6657 | this.actions = [];
|
6658 | this.scheduledId = null;
|
6659 | }
|
6660 | QueueScheduler.prototype.now = function () {
|
6661 | return Date.now();
|
6662 | };
|
6663 | QueueScheduler.prototype.flush = function () {
|
6664 | if (this.active || this.scheduledId) {
|
6665 | return;
|
6666 | }
|
6667 | this.active = true;
|
6668 | var actions = this.actions;
|
6669 |
|
6670 | for (var action = null; action = actions.shift();) {
|
6671 | action.execute();
|
6672 | if (action.error) {
|
6673 | this.active = false;
|
6674 | throw action.error;
|
6675 | }
|
6676 | }
|
6677 | this.active = false;
|
6678 | };
|
6679 | QueueScheduler.prototype.schedule = function (work, delay, state) {
|
6680 | if (delay === void 0) { delay = 0; }
|
6681 | return (delay <= 0) ?
|
6682 | this.scheduleNow(work, state) :
|
6683 | this.scheduleLater(work, delay, state);
|
6684 | };
|
6685 | QueueScheduler.prototype.scheduleNow = function (work, state) {
|
6686 | return new QueueAction_1.QueueAction(this, work).schedule(state);
|
6687 | };
|
6688 | QueueScheduler.prototype.scheduleLater = function (work, delay, state) {
|
6689 | return new FutureAction_1.FutureAction(this, work).schedule(state, delay);
|
6690 | };
|
6691 | return QueueScheduler;
|
6692 | }());
|
6693 | exports.QueueScheduler = QueueScheduler;
|
6694 |
|
6695 |
|
6696 | },
|
6697 |
|
6698 |
|
6699 |
|
6700 |
|
6701 | function(module, exports, __webpack_require__) {
|
6702 |
|
6703 | "use strict";
|
6704 | var __extends = (this && this.__extends) || function (d, b) {
|
6705 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6706 | function __() { this.constructor = d; }
|
6707 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6708 | };
|
6709 | var FutureAction_1 = __webpack_require__( 194);
|
6710 | |
6711 |
|
6712 |
|
6713 |
|
6714 |
|
6715 | var QueueAction = (function (_super) {
|
6716 | __extends(QueueAction, _super);
|
6717 | function QueueAction() {
|
6718 | _super.apply(this, arguments);
|
6719 | }
|
6720 | QueueAction.prototype._schedule = function (state, delay) {
|
6721 | if (delay === void 0) { delay = 0; }
|
6722 | if (delay > 0) {
|
6723 | return _super.prototype._schedule.call(this, state, delay);
|
6724 | }
|
6725 | this.delay = delay;
|
6726 | this.state = state;
|
6727 | var scheduler = this.scheduler;
|
6728 | scheduler.actions.push(this);
|
6729 | scheduler.flush();
|
6730 | return this;
|
6731 | };
|
6732 | return QueueAction;
|
6733 | }(FutureAction_1.FutureAction));
|
6734 | exports.QueueAction = QueueAction;
|
6735 |
|
6736 |
|
6737 | },
|
6738 |
|
6739 |
|
6740 |
|
6741 |
|
6742 | function(module, exports, __webpack_require__) {
|
6743 |
|
6744 | "use strict";
|
6745 | var __extends = (this && this.__extends) || function (d, b) {
|
6746 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6747 | function __() { this.constructor = d; }
|
6748 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6749 | };
|
6750 | var root_1 = __webpack_require__( 76);
|
6751 | var Subscription_1 = __webpack_require__( 81);
|
6752 | |
6753 |
|
6754 |
|
6755 |
|
6756 |
|
6757 | var FutureAction = (function (_super) {
|
6758 | __extends(FutureAction, _super);
|
6759 | function FutureAction(scheduler, work) {
|
6760 | _super.call(this);
|
6761 | this.scheduler = scheduler;
|
6762 | this.work = work;
|
6763 | this.pending = false;
|
6764 | }
|
6765 | FutureAction.prototype.execute = function () {
|
6766 | if (this.isUnsubscribed) {
|
6767 | this.error = new Error('executing a cancelled action');
|
6768 | }
|
6769 | else {
|
6770 | try {
|
6771 | this.work(this.state);
|
6772 | }
|
6773 | catch (e) {
|
6774 | this.unsubscribe();
|
6775 | this.error = e;
|
6776 | }
|
6777 | }
|
6778 | };
|
6779 | FutureAction.prototype.schedule = function (state, delay) {
|
6780 | if (delay === void 0) { delay = 0; }
|
6781 | if (this.isUnsubscribed) {
|
6782 | return this;
|
6783 | }
|
6784 | return this._schedule(state, delay);
|
6785 | };
|
6786 | FutureAction.prototype._schedule = function (state, delay) {
|
6787 | var _this = this;
|
6788 | if (delay === void 0) { delay = 0; }
|
6789 |
|
6790 | this.state = state;
|
6791 |
|
6792 |
|
6793 | this.pending = true;
|
6794 | var id = this.id;
|
6795 |
|
6796 |
|
6797 | if (id != null && this.delay === delay) {
|
6798 | return this;
|
6799 | }
|
6800 | this.delay = delay;
|
6801 |
|
6802 |
|
6803 |
|
6804 | if (id != null) {
|
6805 | this.id = null;
|
6806 | root_1.root.clearInterval(id);
|
6807 | }
|
6808 |
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 |
|
6817 |
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 |
|
6823 |
|
6824 |
|
6825 |
|
6826 |
|
6827 |
|
6828 |
|
6829 |
|
6830 |
|
6831 |
|
6832 | this.id = root_1.root.setInterval(function () {
|
6833 | _this.pending = false;
|
6834 | var _a = _this, id = _a.id, scheduler = _a.scheduler;
|
6835 | scheduler.actions.push(_this);
|
6836 | scheduler.flush();
|
6837 |
|
6838 |
|
6839 |
|
6840 |
|
6841 |
|
6842 |
|
6843 |
|
6844 |
|
6845 |
|
6846 |
|
6847 |
|
6848 |
|
6849 |
|
6850 |
|
6851 |
|
6852 | if (_this.pending === false && id != null) {
|
6853 | _this.id = null;
|
6854 | root_1.root.clearInterval(id);
|
6855 | }
|
6856 | }, delay);
|
6857 | return this;
|
6858 | };
|
6859 | FutureAction.prototype._unsubscribe = function () {
|
6860 | this.pending = false;
|
6861 | var _a = this, id = _a.id, scheduler = _a.scheduler;
|
6862 | var actions = scheduler.actions;
|
6863 | var index = actions.indexOf(this);
|
6864 | if (id != null) {
|
6865 | this.id = null;
|
6866 | root_1.root.clearInterval(id);
|
6867 | }
|
6868 | if (index !== -1) {
|
6869 | actions.splice(index, 1);
|
6870 | }
|
6871 | this.work = null;
|
6872 | this.state = null;
|
6873 | this.scheduler = null;
|
6874 | };
|
6875 | return FutureAction;
|
6876 | }(Subscription_1.Subscription));
|
6877 | exports.FutureAction = FutureAction;
|
6878 |
|
6879 |
|
6880 | },
|
6881 |
|
6882 |
|
6883 |
|
6884 |
|
6885 | function(module, exports, __webpack_require__) {
|
6886 |
|
6887 | "use strict";
|
6888 | var ConnectableObservable_1 = __webpack_require__( 196);
|
6889 | |
6890 |
|
6891 |
|
6892 |
|
6893 |
|
6894 |
|
6895 |
|
6896 |
|
6897 |
|
6898 |
|
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 |
|
6904 |
|
6905 | function multicast(subjectOrSubjectFactory) {
|
6906 | var subjectFactory;
|
6907 | if (typeof subjectOrSubjectFactory === 'function') {
|
6908 | subjectFactory = subjectOrSubjectFactory;
|
6909 | }
|
6910 | else {
|
6911 | subjectFactory = function subjectFactory() {
|
6912 | return subjectOrSubjectFactory;
|
6913 | };
|
6914 | }
|
6915 | return new ConnectableObservable_1.ConnectableObservable(this, subjectFactory);
|
6916 | }
|
6917 | exports.multicast = multicast;
|
6918 |
|
6919 |
|
6920 | },
|
6921 |
|
6922 |
|
6923 |
|
6924 |
|
6925 | function(module, exports, __webpack_require__) {
|
6926 |
|
6927 | "use strict";
|
6928 | var __extends = (this && this.__extends) || function (d, b) {
|
6929 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
6930 | function __() { this.constructor = d; }
|
6931 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6932 | };
|
6933 | var Observable_1 = __webpack_require__( 78);
|
6934 | var Subscriber_1 = __webpack_require__( 80);
|
6935 | var Subscription_1 = __webpack_require__( 81);
|
6936 | |
6937 |
|
6938 |
|
6939 | var ConnectableObservable = (function (_super) {
|
6940 | __extends(ConnectableObservable, _super);
|
6941 | function ConnectableObservable(source, subjectFactory) {
|
6942 | _super.call(this);
|
6943 | this.source = source;
|
6944 | this.subjectFactory = subjectFactory;
|
6945 | }
|
6946 | ConnectableObservable.prototype._subscribe = function (subscriber) {
|
6947 | return this.getSubject().subscribe(subscriber);
|
6948 | };
|
6949 | ConnectableObservable.prototype.getSubject = function () {
|
6950 | var subject = this.subject;
|
6951 | if (subject && !subject.isUnsubscribed) {
|
6952 | return subject;
|
6953 | }
|
6954 | return (this.subject = this.subjectFactory());
|
6955 | };
|
6956 | ConnectableObservable.prototype.connect = function () {
|
6957 | var source = this.source;
|
6958 | var subscription = this.subscription;
|
6959 | if (subscription && !subscription.isUnsubscribed) {
|
6960 | return subscription;
|
6961 | }
|
6962 | subscription = source.subscribe(this.getSubject());
|
6963 | subscription.add(new ConnectableSubscription(this));
|
6964 | return (this.subscription = subscription);
|
6965 | };
|
6966 | ConnectableObservable.prototype.refCount = function () {
|
6967 | return new RefCountObservable(this);
|
6968 | };
|
6969 | |
6970 |
|
6971 |
|
6972 |
|
6973 | ConnectableObservable.prototype._closeSubscription = function () {
|
6974 | this.subject = null;
|
6975 | this.subscription = null;
|
6976 | };
|
6977 | return ConnectableObservable;
|
6978 | }(Observable_1.Observable));
|
6979 | exports.ConnectableObservable = ConnectableObservable;
|
6980 | |
6981 |
|
6982 |
|
6983 |
|
6984 |
|
6985 | var ConnectableSubscription = (function (_super) {
|
6986 | __extends(ConnectableSubscription, _super);
|
6987 | function ConnectableSubscription(connectable) {
|
6988 | _super.call(this);
|
6989 | this.connectable = connectable;
|
6990 | }
|
6991 | ConnectableSubscription.prototype._unsubscribe = function () {
|
6992 | var connectable = this.connectable;
|
6993 | connectable._closeSubscription();
|
6994 | this.connectable = null;
|
6995 | };
|
6996 | return ConnectableSubscription;
|
6997 | }(Subscription_1.Subscription));
|
6998 | |
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 | var RefCountObservable = (function (_super) {
|
7004 | __extends(RefCountObservable, _super);
|
7005 | function RefCountObservable(connectable, refCount) {
|
7006 | if (refCount === void 0) { refCount = 0; }
|
7007 | _super.call(this);
|
7008 | this.connectable = connectable;
|
7009 | this.refCount = refCount;
|
7010 | }
|
7011 | RefCountObservable.prototype._subscribe = function (subscriber) {
|
7012 | var connectable = this.connectable;
|
7013 | var refCountSubscriber = new RefCountSubscriber(subscriber, this);
|
7014 | var subscription = connectable.subscribe(refCountSubscriber);
|
7015 | if (!subscription.isUnsubscribed && ++this.refCount === 1) {
|
7016 | refCountSubscriber.connection = this.connection = connectable.connect();
|
7017 | }
|
7018 | return subscription;
|
7019 | };
|
7020 | return RefCountObservable;
|
7021 | }(Observable_1.Observable));
|
7022 | |
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 | var RefCountSubscriber = (function (_super) {
|
7028 | __extends(RefCountSubscriber, _super);
|
7029 | function RefCountSubscriber(destination, refCountObservable) {
|
7030 | _super.call(this, null);
|
7031 | this.destination = destination;
|
7032 | this.refCountObservable = refCountObservable;
|
7033 | this.connection = refCountObservable.connection;
|
7034 | destination.add(this);
|
7035 | }
|
7036 | RefCountSubscriber.prototype._next = function (value) {
|
7037 | this.destination.next(value);
|
7038 | };
|
7039 | RefCountSubscriber.prototype._error = function (err) {
|
7040 | this._resetConnectable();
|
7041 | this.destination.error(err);
|
7042 | };
|
7043 | RefCountSubscriber.prototype._complete = function () {
|
7044 | this._resetConnectable();
|
7045 | this.destination.complete();
|
7046 | };
|
7047 | RefCountSubscriber.prototype._resetConnectable = function () {
|
7048 | var observable = this.refCountObservable;
|
7049 | var obsConnection = observable.connection;
|
7050 | var subConnection = this.connection;
|
7051 | if (subConnection && subConnection === obsConnection) {
|
7052 | observable.refCount = 0;
|
7053 | obsConnection.unsubscribe();
|
7054 | observable.connection = null;
|
7055 | this.unsubscribe();
|
7056 | }
|
7057 | };
|
7058 | RefCountSubscriber.prototype._unsubscribe = function () {
|
7059 | var observable = this.refCountObservable;
|
7060 | if (observable.refCount === 0) {
|
7061 | return;
|
7062 | }
|
7063 | if (--observable.refCount === 0) {
|
7064 | var obsConnection = observable.connection;
|
7065 | var subConnection = this.connection;
|
7066 | if (subConnection && subConnection === obsConnection) {
|
7067 | obsConnection.unsubscribe();
|
7068 | observable.connection = null;
|
7069 | }
|
7070 | }
|
7071 | };
|
7072 | return RefCountSubscriber;
|
7073 | }(Subscriber_1.Subscriber));
|
7074 |
|
7075 |
|
7076 | },
|
7077 |
|
7078 |
|
7079 |
|
7080 |
|
7081 | function(module, exports, __webpack_require__) {
|
7082 |
|
7083 | "use strict";
|
7084 | var __extends = (this && this.__extends) || function (d, b) {
|
7085 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
7086 | function __() { this.constructor = d; }
|
7087 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
7088 | };
|
7089 | var Subscriber_1 = __webpack_require__( 80);
|
7090 | |
7091 |
|
7092 |
|
7093 |
|
7094 |
|
7095 |
|
7096 |
|
7097 |
|
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 |
|
7108 |
|
7109 |
|
7110 |
|
7111 |
|
7112 |
|
7113 |
|
7114 |
|
7115 |
|
7116 |
|
7117 |
|
7118 |
|
7119 |
|
7120 |
|
7121 |
|
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 | function scan(accumulator, seed) {
|
7128 | return this.lift(new ScanOperator(accumulator, seed));
|
7129 | }
|
7130 | exports.scan = scan;
|
7131 | var ScanOperator = (function () {
|
7132 | function ScanOperator(accumulator, seed) {
|
7133 | this.accumulator = accumulator;
|
7134 | this.seed = seed;
|
7135 | }
|
7136 | ScanOperator.prototype.call = function (subscriber, source) {
|
7137 | return source._subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed));
|
7138 | };
|
7139 | return ScanOperator;
|
7140 | }());
|
7141 | |
7142 |
|
7143 |
|
7144 |
|
7145 |
|
7146 | var ScanSubscriber = (function (_super) {
|
7147 | __extends(ScanSubscriber, _super);
|
7148 | function ScanSubscriber(destination, accumulator, seed) {
|
7149 | _super.call(this, destination);
|
7150 | this.accumulator = accumulator;
|
7151 | this.index = 0;
|
7152 | this.accumulatorSet = false;
|
7153 | this.seed = seed;
|
7154 | this.accumulatorSet = typeof seed !== 'undefined';
|
7155 | }
|
7156 | Object.defineProperty(ScanSubscriber.prototype, "seed", {
|
7157 | get: function () {
|
7158 | return this._seed;
|
7159 | },
|
7160 | set: function (value) {
|
7161 | this.accumulatorSet = true;
|
7162 | this._seed = value;
|
7163 | },
|
7164 | enumerable: true,
|
7165 | configurable: true
|
7166 | });
|
7167 | ScanSubscriber.prototype._next = function (value) {
|
7168 | if (!this.accumulatorSet) {
|
7169 | this.seed = value;
|
7170 | this.destination.next(value);
|
7171 | }
|
7172 | else {
|
7173 | return this._tryNext(value);
|
7174 | }
|
7175 | };
|
7176 | ScanSubscriber.prototype._tryNext = function (value) {
|
7177 | var index = this.index++;
|
7178 | var result;
|
7179 | try {
|
7180 | result = this.accumulator(this.seed, value, index);
|
7181 | }
|
7182 | catch (err) {
|
7183 | this.destination.error(err);
|
7184 | }
|
7185 | this.seed = result;
|
7186 | this.destination.next(result);
|
7187 | };
|
7188 | return ScanSubscriber;
|
7189 | }(Subscriber_1.Subscriber));
|
7190 |
|
7191 |
|
7192 | },
|
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 | function(module, exports, __webpack_require__) {
|
7198 |
|
7199 | "use strict";
|
7200 | var __extends = (this && this.__extends) || function (d, b) {
|
7201 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
7202 | function __() { this.constructor = d; }
|
7203 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
7204 | };
|
7205 | var Subscriber_1 = __webpack_require__( 80);
|
7206 | |
7207 |
|
7208 |
|
7209 |
|
7210 |
|
7211 |
|
7212 |
|
7213 |
|
7214 |
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 |
|
7222 |
|
7223 |
|
7224 |
|
7225 |
|
7226 |
|
7227 |
|
7228 |
|
7229 |
|
7230 |
|
7231 |
|
7232 |
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 | function map(project, thisArg) {
|
7240 | if (typeof project !== 'function') {
|
7241 | throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
|
7242 | }
|
7243 | return this.lift(new MapOperator(project, thisArg));
|
7244 | }
|
7245 | exports.map = map;
|
7246 | var MapOperator = (function () {
|
7247 | function MapOperator(project, thisArg) {
|
7248 | this.project = project;
|
7249 | this.thisArg = thisArg;
|
7250 | }
|
7251 | MapOperator.prototype.call = function (subscriber, source) {
|
7252 | return source._subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
|
7253 | };
|
7254 | return MapOperator;
|
7255 | }());
|
7256 | |
7257 |
|
7258 |
|
7259 |
|
7260 |
|
7261 | var MapSubscriber = (function (_super) {
|
7262 | __extends(MapSubscriber, _super);
|
7263 | function MapSubscriber(destination, project, thisArg) {
|
7264 | _super.call(this, destination);
|
7265 | this.project = project;
|
7266 | this.count = 0;
|
7267 | this.thisArg = thisArg || this;
|
7268 | }
|
7269 |
|
7270 |
|
7271 | MapSubscriber.prototype._next = function (value) {
|
7272 | var result;
|
7273 | try {
|
7274 | result = this.project.call(this.thisArg, value, this.count++);
|
7275 | }
|
7276 | catch (err) {
|
7277 | this.destination.error(err);
|
7278 | return;
|
7279 | }
|
7280 | this.destination.next(result);
|
7281 | };
|
7282 | return MapSubscriber;
|
7283 | }(Subscriber_1.Subscriber));
|
7284 |
|
7285 |
|
7286 | },
|
7287 |
|
7288 |
|
7289 |
|
7290 |
|
7291 | function(module, exports, __webpack_require__) {
|
7292 |
|
7293 | var sentenceCase = __webpack_require__( 200)
|
7294 |
|
7295 | |
7296 |
|
7297 |
|
7298 |
|
7299 |
|
7300 |
|
7301 |
|
7302 | module.exports = function (str, locale) {
|
7303 | return sentenceCase(str, locale, '_')
|
7304 | }
|
7305 |
|
7306 |
|
7307 | },
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 | function(module, exports, __webpack_require__) {
|
7313 |
|
7314 | var lowerCase = __webpack_require__( 201)
|
7315 |
|
7316 | var NON_WORD_REGEXP = __webpack_require__( 202)
|
7317 | var CAMEL_CASE_REGEXP = __webpack_require__( 203)
|
7318 | var TRAILING_DIGIT_REGEXP = __webpack_require__( 204)
|
7319 |
|
7320 | |
7321 |
|
7322 |
|
7323 |
|
7324 |
|
7325 |
|
7326 |
|
7327 |
|
7328 | module.exports = function (str, locale, replacement) {
|
7329 | if (str == null) {
|
7330 | return ''
|
7331 | }
|
7332 |
|
7333 | replacement = replacement || ' '
|
7334 |
|
7335 | function replace (match, index, string) {
|
7336 | if (index === 0 || index === (string.length - match.length)) {
|
7337 | return ''
|
7338 | }
|
7339 |
|
7340 | return replacement
|
7341 | }
|
7342 |
|
7343 | str = String(str)
|
7344 |
|
7345 | .replace(CAMEL_CASE_REGEXP, '$1 $2')
|
7346 |
|
7347 | .replace(TRAILING_DIGIT_REGEXP, '$1 $2')
|
7348 |
|
7349 | .replace(NON_WORD_REGEXP, replace)
|
7350 |
|
7351 |
|
7352 | return lowerCase(str, locale)
|
7353 | }
|
7354 |
|
7355 |
|
7356 | },
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 | function(module, exports) {
|
7362 |
|
7363 | |
7364 |
|
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 | var LANGUAGES = {
|
7371 | tr: {
|
7372 | regexp: /\u0130|\u0049|\u0049\u0307/g,
|
7373 | map: {
|
7374 | '\u0130': '\u0069',
|
7375 | '\u0049': '\u0131',
|
7376 | '\u0049\u0307': '\u0069'
|
7377 | }
|
7378 | },
|
7379 | az: {
|
7380 | regexp: /[\u0130]/g,
|
7381 | map: {
|
7382 | '\u0130': '\u0069',
|
7383 | '\u0049': '\u0131',
|
7384 | '\u0049\u0307': '\u0069'
|
7385 | }
|
7386 | },
|
7387 | lt: {
|
7388 | regexp: /[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,
|
7389 | map: {
|
7390 | '\u0049': '\u0069\u0307',
|
7391 | '\u004A': '\u006A\u0307',
|
7392 | '\u012E': '\u012F\u0307',
|
7393 | '\u00CC': '\u0069\u0307\u0300',
|
7394 | '\u00CD': '\u0069\u0307\u0301',
|
7395 | '\u0128': '\u0069\u0307\u0303'
|
7396 | }
|
7397 | }
|
7398 | }
|
7399 |
|
7400 | |
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 | module.exports = function (str, locale) {
|
7407 | var lang = LANGUAGES[locale]
|
7408 |
|
7409 | str = str == null ? '' : String(str)
|
7410 |
|
7411 | if (lang) {
|
7412 | str = str.replace(lang.regexp, function (m) { return lang.map[m] })
|
7413 | }
|
7414 |
|
7415 | return str.toLowerCase()
|
7416 | }
|
7417 |
|
7418 |
|
7419 | },
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 | function(module, exports) {
|
7425 |
|
7426 | module.exports = /[^\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g
|
7427 |
|
7428 |
|
7429 | },
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 | function(module, exports) {
|
7435 |
|
7436 | module.exports = /([\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])([\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g
|
7437 |
|
7438 |
|
7439 | },
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 | function(module, exports) {
|
7445 |
|
7446 | module.exports = /([\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([^\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g
|
7447 |
|
7448 |
|
7449 | },
|
7450 |
|
7451 |
|
7452 |
|
7453 |
|
7454 | function(module, exports, __webpack_require__) {
|
7455 |
|
7456 | 'use strict';
|
7457 |
|
7458 | exports.__esModule = true;
|
7459 | exports.default = checkArgs;
|
7460 |
|
7461 | var _ordinal = __webpack_require__( 206);
|
7462 |
|
7463 | var _ordinal2 = _interopRequireDefault(_ordinal);
|
7464 |
|
7465 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7466 |
|
7467 |
|
7468 | function checkArgs(name, args) {
|
7469 | var _ref = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
7470 |
|
7471 | var _ref$nullable = _ref.nullable;
|
7472 | var nullable = _ref$nullable === undefined ? false : _ref$nullable;
|
7473 | var _ref$minArgs = _ref.minArgs;
|
7474 | var minArgs = _ref$minArgs === undefined ? 1 : _ref$minArgs;
|
7475 | var _ref$maxArgs = _ref.maxArgs;
|
7476 | var maxArgs = _ref$maxArgs === undefined ? 1 : _ref$maxArgs;
|
7477 |
|
7478 | if (minArgs === maxArgs && args.length !== minArgs) {
|
7479 | var plural = minArgs === 1 ? '' : 's';
|
7480 | throw new Error(name + ' must receive exactly ' + minArgs + ' argument' + plural);
|
7481 | }
|
7482 | if (args.length < minArgs) {
|
7483 | var plural1 = minArgs === 1 ? '' : 's';
|
7484 | throw new Error(name + ' must receive at least ' + minArgs + ' argument' + plural1 + '.');
|
7485 | }
|
7486 | if (args.length > maxArgs) {
|
7487 | var plural2 = maxArgs === 1 ? '' : 's';
|
7488 | throw new Error(name + ' accepts at most ' + maxArgs + ' argument' + plural2 + '.');
|
7489 | }
|
7490 | for (var i = 0; i < args.length; i++) {
|
7491 | if (!nullable && args[i] === null) {
|
7492 | var ordinality = maxArgs !== 1 ? ' ' + (0, _ordinal2.default)(i + 1) : '';
|
7493 | throw new Error('The' + ordinality + ' argument to ' + name + ' must be non-null');
|
7494 | }
|
7495 | if (args[i] === undefined) {
|
7496 | throw new Error('The ' + (0, _ordinal2.default)(i + 1) + ' argument to ' + name + ' must be defined');
|
7497 | }
|
7498 | }
|
7499 | }
|
7500 |
|
7501 | },
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 | function(module, exports) {
|
7507 |
|
7508 | "use strict";
|
7509 |
|
7510 | exports.__esModule = true;
|
7511 | exports.default = ordinal;
|
7512 | function ordinal(x) {
|
7513 | if ([11, 12, 13].indexOf(x) !== -1) {
|
7514 | return x + "th";
|
7515 | } else if (x % 10 === 1) {
|
7516 | return x + "st";
|
7517 | } else if (x % 10 === 2) {
|
7518 | return x + "nd";
|
7519 | } else if (x % 10 === 3) {
|
7520 | return x + "rd";
|
7521 | }
|
7522 | return x + "th";
|
7523 | }
|
7524 |
|
7525 | },
|
7526 |
|
7527 |
|
7528 |
|
7529 |
|
7530 | function(module, exports, __webpack_require__) {
|
7531 |
|
7532 | 'use strict';
|
7533 |
|
7534 | exports.__esModule = true;
|
7535 |
|
7536 | var _typeof2 = __webpack_require__( 107);
|
7537 |
|
7538 | var _typeof3 = _interopRequireDefault(_typeof2);
|
7539 |
|
7540 | exports.default = validIndexValue;
|
7541 |
|
7542 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7543 |
|
7544 |
|
7545 |
|
7546 | function validIndexValue(val) {
|
7547 | if (val === null) {
|
7548 | return false;
|
7549 | }
|
7550 | if (['boolean', 'number', 'string'].indexOf(typeof val === 'undefined' ? 'undefined' : (0, _typeof3.default)(val)) !== -1) {
|
7551 | return true;
|
7552 | }
|
7553 | if (Array.isArray(val)) {
|
7554 | var _ret = function () {
|
7555 | var containsBad = false;
|
7556 | val.forEach(function (v) {
|
7557 | containsBad = containsBad || validIndexValue(v);
|
7558 | });
|
7559 | return {
|
7560 | v: containsBad
|
7561 | };
|
7562 | }();
|
7563 |
|
7564 | if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
|
7565 | }
|
7566 | return false;
|
7567 | }
|
7568 |
|
7569 | },
|
7570 |
|
7571 |
|
7572 |
|
7573 |
|
7574 | function(module, exports, __webpack_require__) {
|
7575 |
|
7576 | 'use strict';
|
7577 |
|
7578 | exports.__esModule = true;
|
7579 |
|
7580 | var _typeof2 = __webpack_require__( 107);
|
7581 |
|
7582 | var _typeof3 = _interopRequireDefault(_typeof2);
|
7583 |
|
7584 | exports.deserialize = deserialize;
|
7585 | exports.serialize = serialize;
|
7586 |
|
7587 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7588 |
|
7589 | var PRIMITIVES = ['string', 'number', 'boolean', 'function', 'symbol'];
|
7590 |
|
7591 | function modifyObject(doc) {
|
7592 | Object.keys(doc).forEach(function (key) {
|
7593 | doc[key] = deserialize(doc[key]);
|
7594 | });
|
7595 | return doc;
|
7596 | }
|
7597 |
|
7598 | function deserialize(value) {
|
7599 | if (value == null) {
|
7600 | return value;
|
7601 | } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
|
7602 | return value;
|
7603 | } else if (Array.isArray(value)) {
|
7604 | return value.map(deserialize);
|
7605 | } else if (value.$reql_type$ === 'TIME') {
|
7606 | var date = new Date();
|
7607 | date.setTime(value.epoch_time * 1000);
|
7608 | return date;
|
7609 | } else {
|
7610 | return modifyObject(value);
|
7611 | }
|
7612 | }
|
7613 |
|
7614 | function jsonifyObject(doc) {
|
7615 | Object.keys(doc).forEach(function (key) {
|
7616 | doc[key] = serialize(doc[key]);
|
7617 | });
|
7618 | return doc;
|
7619 | }
|
7620 |
|
7621 | function serialize(value) {
|
7622 | if (value == null) {
|
7623 | return value;
|
7624 | } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
|
7625 | return value;
|
7626 | } else if (Array.isArray(value)) {
|
7627 | return value.map(serialize);
|
7628 | } else if (value instanceof Date) {
|
7629 | return {
|
7630 | $reql_type$: 'TIME',
|
7631 | epoch_time: value.getTime() / 1000,
|
7632 |
|
7633 | timezone: 'Z'
|
7634 | };
|
7635 | } else {
|
7636 | return jsonifyObject(value);
|
7637 | }
|
7638 | }
|
7639 |
|
7640 | },
|
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 | function(module, exports, __webpack_require__) {
|
7646 |
|
7647 | 'use strict';
|
7648 |
|
7649 | var _classCallCheck2 = __webpack_require__( 183);
|
7650 |
|
7651 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
7652 |
|
7653 | var _possibleConstructorReturn2 = __webpack_require__( 106);
|
7654 |
|
7655 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
7656 |
|
7657 | var _inherits2 = __webpack_require__( 175);
|
7658 |
|
7659 | var _inherits3 = _interopRequireDefault(_inherits2);
|
7660 |
|
7661 | var _AsyncSubject = __webpack_require__( 210);
|
7662 |
|
7663 | var _BehaviorSubject = __webpack_require__( 211);
|
7664 |
|
7665 | var _Subject2 = __webpack_require__( 187);
|
7666 |
|
7667 | var _Observable = __webpack_require__( 78);
|
7668 |
|
7669 | var _merge = __webpack_require__( 212);
|
7670 |
|
7671 | var _filter = __webpack_require__( 104);
|
7672 |
|
7673 | var _share = __webpack_require__( 215);
|
7674 |
|
7675 | var _shim = __webpack_require__( 216);
|
7676 |
|
7677 | var _serialization = __webpack_require__( 208);
|
7678 |
|
7679 | var _logging = __webpack_require__( 217);
|
7680 |
|
7681 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7682 |
|
7683 | var PROTOCOL_VERSION = 'rethinkdb-horizon-v0';
|
7684 |
|
7685 |
|
7686 | var STATUS_UNCONNECTED = { type: 'unconnected' };
|
7687 |
|
7688 | var STATUS_CONNECTED = { type: 'connected' };
|
7689 |
|
7690 | var STATUS_READY = { type: 'ready' };
|
7691 |
|
7692 | var STATUS_ERROR = { type: 'error' };
|
7693 |
|
7694 | var STATUS_DISCONNECTED = { type: 'disconnected' };
|
7695 |
|
7696 | var ProtocolError = function (_Error) {
|
7697 | (0, _inherits3.default)(ProtocolError, _Error);
|
7698 |
|
7699 | function ProtocolError(msg, errorCode) {
|
7700 | (0, _classCallCheck3.default)(this, ProtocolError);
|
7701 |
|
7702 | var _this = (0, _possibleConstructorReturn3.default)(this, _Error.call(this, msg));
|
7703 |
|
7704 | _this.errorCode = errorCode;
|
7705 | return _this;
|
7706 | }
|
7707 |
|
7708 | ProtocolError.prototype.toString = function toString() {
|
7709 | return this.message + ' (Code: ' + this.errorCode + ')';
|
7710 | };
|
7711 |
|
7712 | return ProtocolError;
|
7713 | }(Error);
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 |
|
7719 |
|
7720 |
|
7721 |
|
7722 |
|
7723 |
|
7724 | var HorizonSocket = function (_Subject) {
|
7725 | (0, _inherits3.default)(HorizonSocket, _Subject);
|
7726 |
|
7727 | function HorizonSocket(host, secure, path, handshaker) {
|
7728 | var _context;
|
7729 |
|
7730 | (0, _classCallCheck3.default)(this, HorizonSocket);
|
7731 |
|
7732 | var hostString = 'ws' + (secure ? 's' : '') + '://' + host + '/' + path;
|
7733 | var msgBuffer = [];
|
7734 | var ws = void 0,
|
7735 | handshakeDisp = void 0;
|
7736 |
|
7737 |
|
7738 | var handshake = new _AsyncSubject.AsyncSubject();
|
7739 | var statusSubject = new _BehaviorSubject.BehaviorSubject(STATUS_UNCONNECTED);
|
7740 |
|
7741 | var isOpen = function isOpen() {
|
7742 | return Boolean(ws) && ws.readyState === _shim.WebSocket.OPEN;
|
7743 | };
|
7744 |
|
7745 |
|
7746 | function wsSend(msg) {
|
7747 | var stringMsg = JSON.stringify((0, _serialization.serialize)(msg));
|
7748 | ws.send(stringMsg);
|
7749 | }
|
7750 |
|
7751 |
|
7752 |
|
7753 | var socketObservable = (_context = _Observable.Observable.create(function (subscriber) {
|
7754 | ws = new _shim.WebSocket(hostString, PROTOCOL_VERSION);
|
7755 | ws.onerror = function () {
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 | statusSubject.next(STATUS_ERROR);
|
7761 | var errMsg = 'Websocket ' + hostString + ' experienced an error';
|
7762 | subscriber.error(new Error(errMsg));
|
7763 | };
|
7764 | ws.onopen = function () {
|
7765 |
|
7766 | statusSubject.next(STATUS_CONNECTED);
|
7767 | handshakeDisp = _this2.makeRequest(handshaker()).subscribe(function (x) {
|
7768 | handshake.next(x);
|
7769 | handshake.complete();
|
7770 |
|
7771 | handshake.next(STATUS_READY);
|
7772 | }, function (err) {
|
7773 | return handshake.error(err);
|
7774 | }, function () {
|
7775 | return handshake.complete();
|
7776 | });
|
7777 |
|
7778 | while (msgBuffer.length > 0) {
|
7779 | var msg = msgBuffer.shift();
|
7780 | (0, _logging.log)('Sending buffered:', msg);
|
7781 | wsSend(msg);
|
7782 | }
|
7783 | };
|
7784 | ws.onmessage = function (event) {
|
7785 | var deserialized = (0, _serialization.deserialize)(JSON.parse(event.data));
|
7786 | (0, _logging.log)('Received', deserialized);
|
7787 | subscriber.next(deserialized);
|
7788 | };
|
7789 | ws.onclose = function (e) {
|
7790 |
|
7791 |
|
7792 |
|
7793 | statusSubject.next(STATUS_DISCONNECTED);
|
7794 | if (e.code !== 1000 || !e.wasClean) {
|
7795 | subscriber.error(new Error('Socket closed unexpectedly with code: ' + e.code));
|
7796 | } else {
|
7797 | subscriber.complete();
|
7798 | }
|
7799 | };
|
7800 | return function () {
|
7801 | if (handshakeDisp) {
|
7802 | handshakeDisp.unsubscribe();
|
7803 | }
|
7804 |
|
7805 | closeSocket(1000, '');
|
7806 | };
|
7807 | }), _share.share).call(_context);
|
7808 |
|
7809 |
|
7810 |
|
7811 |
|
7812 |
|
7813 |
|
7814 | var socketSubscriber = {
|
7815 | next: function next(messageToSend) {
|
7816 |
|
7817 |
|
7818 | if (isOpen()) {
|
7819 | (0, _logging.log)('Sending', messageToSend);
|
7820 | wsSend(messageToSend);
|
7821 | } else {
|
7822 | (0, _logging.log)('Buffering', messageToSend);
|
7823 | msgBuffer.push(messageToSend);
|
7824 | }
|
7825 | },
|
7826 | error: function error(_error) {
|
7827 |
|
7828 |
|
7829 | if (!_error.code) {
|
7830 | throw new Error('no code specified. Be sure to pass ' + '{ code: ###, reason: "" } to error()');
|
7831 | }
|
7832 | closeSocket(_error.code, _error.reason);
|
7833 | },
|
7834 | complete: function complete() {
|
7835 |
|
7836 |
|
7837 | closeSocket(1000, '');
|
7838 | }
|
7839 | };
|
7840 |
|
7841 | function closeSocket(code, reason) {
|
7842 | statusSubject.next(STATUS_DISCONNECTED);
|
7843 | if (!code) {
|
7844 | ws.close();
|
7845 | } else {
|
7846 | ws.close(code, reason);
|
7847 | }
|
7848 | ws.onopen = undefined;
|
7849 | ws.onclose = undefined;
|
7850 | ws.onmessage = undefined;
|
7851 | }
|
7852 |
|
7853 |
|
7854 |
|
7855 |
|
7856 |
|
7857 | var _this2 = (0, _possibleConstructorReturn3.default)(this, _Subject.call(this, socketSubscriber, socketObservable));
|
7858 |
|
7859 | var subscriptions = new _Subject2.Subject();
|
7860 |
|
7861 |
|
7862 |
|
7863 | var unsubscriptions = new _Subject2.Subject();
|
7864 | var outgoing = _merge.merge.call(_Observable.Observable, subscriptions, unsubscriptions);
|
7865 |
|
7866 | var activeRequests = 0;
|
7867 |
|
7868 | var requestCounter = 0;
|
7869 |
|
7870 | var subDisp = null;
|
7871 |
|
7872 | _this2.handshake = handshake;
|
7873 |
|
7874 |
|
7875 | _this2.status = statusSubject;
|
7876 |
|
7877 | var incrementActive = function incrementActive() {
|
7878 | if (++activeRequests === 1) {
|
7879 |
|
7880 |
|
7881 |
|
7882 |
|
7883 | subDisp = outgoing.subscribe(_this2);
|
7884 | }
|
7885 | };
|
7886 |
|
7887 |
|
7888 |
|
7889 | var decrementActive = function decrementActive() {
|
7890 | if (--activeRequests === 0) {
|
7891 | subDisp.unsubscribe();
|
7892 | }
|
7893 | };
|
7894 |
|
7895 |
|
7896 | _this2.makeRequest = function (rawRequest) {
|
7897 | return _Observable.Observable.create(function (reqSubscriber) {
|
7898 |
|
7899 | var request_id = requestCounter++;
|
7900 |
|
7901 |
|
7902 | rawRequest.request_id = request_id;
|
7903 | var unsubscribeRequest = void 0;
|
7904 | if (rawRequest.type === 'subscribe') {
|
7905 | unsubscribeRequest = { request_id: request_id, type: 'end_subscription' };
|
7906 | }
|
7907 |
|
7908 |
|
7909 | incrementActive();
|
7910 |
|
7911 |
|
7912 | subscriptions.next(rawRequest);
|
7913 |
|
7914 |
|
7915 | var unsubscribeFilter = _filter.filter.call(_this2, function (x) {
|
7916 | return x.request_id === request_id;
|
7917 | }).subscribe(function (resp) {
|
7918 |
|
7919 | if (resp.error !== undefined) {
|
7920 | reqSubscriber.error(new ProtocolError(resp.error, resp.error_code));
|
7921 | } else if (resp.data !== undefined || resp.token !== undefined) {
|
7922 | try {
|
7923 | reqSubscriber.next(resp);
|
7924 | } catch (e) {}
|
7925 | }
|
7926 | if (resp.state === 'synced') {
|
7927 |
|
7928 | reqSubscriber.next({
|
7929 | type: 'state',
|
7930 | state: 'synced'
|
7931 | });
|
7932 | } else if (resp.state === 'complete') {
|
7933 | reqSubscriber.complete();
|
7934 | }
|
7935 | }, function (err) {
|
7936 | return reqSubscriber.error(err);
|
7937 | }, function () {
|
7938 | return reqSubscriber.complete();
|
7939 | });
|
7940 | return function () {
|
7941 |
|
7942 | if (unsubscribeRequest) {
|
7943 | unsubscriptions.next(unsubscribeRequest);
|
7944 | }
|
7945 | decrementActive();
|
7946 | unsubscribeFilter.unsubscribe();
|
7947 | };
|
7948 | });
|
7949 | };
|
7950 | return _this2;
|
7951 | }
|
7952 |
|
7953 | return HorizonSocket;
|
7954 | }(_Subject2.Subject);
|
7955 |
|
7956 | module.exports = HorizonSocket;
|
7957 |
|
7958 | },
|
7959 |
|
7960 |
|
7961 |
|
7962 |
|
7963 | function(module, exports, __webpack_require__) {
|
7964 |
|
7965 | "use strict";
|
7966 | var __extends = (this && this.__extends) || function (d, b) {
|
7967 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
7968 | function __() { this.constructor = d; }
|
7969 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
7970 | };
|
7971 | var Subject_1 = __webpack_require__( 187);
|
7972 | |
7973 |
|
7974 |
|
7975 | var AsyncSubject = (function (_super) {
|
7976 | __extends(AsyncSubject, _super);
|
7977 | function AsyncSubject() {
|
7978 | _super.apply(this, arguments);
|
7979 | this.value = null;
|
7980 | this.hasNext = false;
|
7981 | }
|
7982 | AsyncSubject.prototype._subscribe = function (subscriber) {
|
7983 | if (this.hasCompleted && this.hasNext) {
|
7984 | subscriber.next(this.value);
|
7985 | }
|
7986 | return _super.prototype._subscribe.call(this, subscriber);
|
7987 | };
|
7988 | AsyncSubject.prototype._next = function (value) {
|
7989 | this.value = value;
|
7990 | this.hasNext = true;
|
7991 | };
|
7992 | AsyncSubject.prototype._complete = function () {
|
7993 | var index = -1;
|
7994 | var observers = this.observers;
|
7995 | var len = observers.length;
|
7996 |
|
7997 |
|
7998 | this.isUnsubscribed = true;
|
7999 | if (this.hasNext) {
|
8000 | while (++index < len) {
|
8001 | var o = observers[index];
|
8002 | o.next(this.value);
|
8003 | o.complete();
|
8004 | }
|
8005 | }
|
8006 | else {
|
8007 | while (++index < len) {
|
8008 | observers[index].complete();
|
8009 | }
|
8010 | }
|
8011 | this.isUnsubscribed = false;
|
8012 | this.unsubscribe();
|
8013 | };
|
8014 | return AsyncSubject;
|
8015 | }(Subject_1.Subject));
|
8016 | exports.AsyncSubject = AsyncSubject;
|
8017 |
|
8018 |
|
8019 | },
|
8020 |
|
8021 |
|
8022 |
|
8023 |
|
8024 | function(module, exports, __webpack_require__) {
|
8025 |
|
8026 | "use strict";
|
8027 | var __extends = (this && this.__extends) || function (d, b) {
|
8028 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
8029 | function __() { this.constructor = d; }
|
8030 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
8031 | };
|
8032 | var Subject_1 = __webpack_require__( 187);
|
8033 | var throwError_1 = __webpack_require__( 189);
|
8034 | var ObjectUnsubscribedError_1 = __webpack_require__( 190);
|
8035 | |
8036 |
|
8037 |
|
8038 | var BehaviorSubject = (function (_super) {
|
8039 | __extends(BehaviorSubject, _super);
|
8040 | function BehaviorSubject(_value) {
|
8041 | _super.call(this);
|
8042 | this._value = _value;
|
8043 | }
|
8044 | BehaviorSubject.prototype.getValue = function () {
|
8045 | if (this.hasErrored) {
|
8046 | throwError_1.throwError(this.errorValue);
|
8047 | }
|
8048 | else if (this.isUnsubscribed) {
|
8049 | throwError_1.throwError(new ObjectUnsubscribedError_1.ObjectUnsubscribedError());
|
8050 | }
|
8051 | else {
|
8052 | return this._value;
|
8053 | }
|
8054 | };
|
8055 | Object.defineProperty(BehaviorSubject.prototype, "value", {
|
8056 | get: function () {
|
8057 | return this.getValue();
|
8058 | },
|
8059 | enumerable: true,
|
8060 | configurable: true
|
8061 | });
|
8062 | BehaviorSubject.prototype._subscribe = function (subscriber) {
|
8063 | var subscription = _super.prototype._subscribe.call(this, subscriber);
|
8064 | if (subscription && !subscription.isUnsubscribed) {
|
8065 | subscriber.next(this._value);
|
8066 | }
|
8067 | return subscription;
|
8068 | };
|
8069 | BehaviorSubject.prototype._next = function (value) {
|
8070 | _super.prototype._next.call(this, this._value = value);
|
8071 | };
|
8072 | BehaviorSubject.prototype._error = function (err) {
|
8073 | this.hasErrored = true;
|
8074 | _super.prototype._error.call(this, this.errorValue = err);
|
8075 | };
|
8076 | return BehaviorSubject;
|
8077 | }(Subject_1.Subject));
|
8078 | exports.BehaviorSubject = BehaviorSubject;
|
8079 |
|
8080 |
|
8081 | },
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 | function(module, exports, __webpack_require__) {
|
8087 |
|
8088 | "use strict";
|
8089 | var merge_1 = __webpack_require__( 213);
|
8090 | exports.merge = merge_1.mergeStatic;
|
8091 |
|
8092 |
|
8093 | },
|
8094 |
|
8095 |
|
8096 |
|
8097 |
|
8098 | function(module, exports, __webpack_require__) {
|
8099 |
|
8100 | "use strict";
|
8101 | var ArrayObservable_1 = __webpack_require__( 92);
|
8102 | var mergeAll_1 = __webpack_require__( 214);
|
8103 | var isScheduler_1 = __webpack_require__( 74);
|
8104 | |
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 |
|
8114 |
|
8115 |
|
8116 |
|
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 |
|
8132 |
|
8133 |
|
8134 |
|
8135 |
|
8136 |
|
8137 |
|
8138 |
|
8139 |
|
8140 |
|
8141 |
|
8142 |
|
8143 |
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 |
|
8150 | function merge() {
|
8151 | var observables = [];
|
8152 | for (var _i = 0; _i < arguments.length; _i++) {
|
8153 | observables[_i - 0] = arguments[_i];
|
8154 | }
|
8155 | observables.unshift(this);
|
8156 | return mergeStatic.apply(this, observables);
|
8157 | }
|
8158 | exports.merge = merge;
|
8159 |
|
8160 | |
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 |
|
8166 |
|
8167 |
|
8168 |
|
8169 |
|
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 |
|
8175 |
|
8176 |
|
8177 |
|
8178 |
|
8179 |
|
8180 |
|
8181 |
|
8182 |
|
8183 |
|
8184 |
|
8185 |
|
8186 |
|
8187 |
|
8188 |
|
8189 |
|
8190 |
|
8191 |
|
8192 |
|
8193 |
|
8194 |
|
8195 |
|
8196 |
|
8197 |
|
8198 |
|
8199 |
|
8200 |
|
8201 |
|
8202 |
|
8203 |
|
8204 |
|
8205 |
|
8206 | function mergeStatic() {
|
8207 | var observables = [];
|
8208 | for (var _i = 0; _i < arguments.length; _i++) {
|
8209 | observables[_i - 0] = arguments[_i];
|
8210 | }
|
8211 | var concurrent = Number.POSITIVE_INFINITY;
|
8212 | var scheduler = null;
|
8213 | var last = observables[observables.length - 1];
|
8214 | if (isScheduler_1.isScheduler(last)) {
|
8215 | scheduler = observables.pop();
|
8216 | if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
|
8217 | concurrent = observables.pop();
|
8218 | }
|
8219 | }
|
8220 | else if (typeof last === 'number') {
|
8221 | concurrent = observables.pop();
|
8222 | }
|
8223 | if (observables.length === 1) {
|
8224 | return observables[0];
|
8225 | }
|
8226 | return new ArrayObservable_1.ArrayObservable(observables, scheduler).lift(new mergeAll_1.MergeAllOperator(concurrent));
|
8227 | }
|
8228 | exports.mergeStatic = mergeStatic;
|
8229 |
|
8230 |
|
8231 | },
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 | function(module, exports, __webpack_require__) {
|
8237 |
|
8238 | "use strict";
|
8239 | var __extends = (this && this.__extends) || function (d, b) {
|
8240 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
8241 | function __() { this.constructor = d; }
|
8242 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
8243 | };
|
8244 | var OuterSubscriber_1 = __webpack_require__( 103);
|
8245 | var subscribeToResult_1 = __webpack_require__( 101);
|
8246 | |
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 |
|
8259 |
|
8260 |
|
8261 |
|
8262 |
|
8263 |
|
8264 |
|
8265 |
|
8266 |
|
8267 |
|
8268 |
|
8269 |
|
8270 |
|
8271 |
|
8272 |
|
8273 |
|
8274 |
|
8275 |
|
8276 |
|
8277 |
|
8278 |
|
8279 |
|
8280 |
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 | function mergeAll(concurrent) {
|
8291 | if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
|
8292 | return this.lift(new MergeAllOperator(concurrent));
|
8293 | }
|
8294 | exports.mergeAll = mergeAll;
|
8295 | var MergeAllOperator = (function () {
|
8296 | function MergeAllOperator(concurrent) {
|
8297 | this.concurrent = concurrent;
|
8298 | }
|
8299 | MergeAllOperator.prototype.call = function (observer, source) {
|
8300 | return source._subscribe(new MergeAllSubscriber(observer, this.concurrent));
|
8301 | };
|
8302 | return MergeAllOperator;
|
8303 | }());
|
8304 | exports.MergeAllOperator = MergeAllOperator;
|
8305 | |
8306 |
|
8307 |
|
8308 |
|
8309 |
|
8310 | var MergeAllSubscriber = (function (_super) {
|
8311 | __extends(MergeAllSubscriber, _super);
|
8312 | function MergeAllSubscriber(destination, concurrent) {
|
8313 | _super.call(this, destination);
|
8314 | this.concurrent = concurrent;
|
8315 | this.hasCompleted = false;
|
8316 | this.buffer = [];
|
8317 | this.active = 0;
|
8318 | }
|
8319 | MergeAllSubscriber.prototype._next = function (observable) {
|
8320 | if (this.active < this.concurrent) {
|
8321 | this.active++;
|
8322 | this.add(subscribeToResult_1.subscribeToResult(this, observable));
|
8323 | }
|
8324 | else {
|
8325 | this.buffer.push(observable);
|
8326 | }
|
8327 | };
|
8328 | MergeAllSubscriber.prototype._complete = function () {
|
8329 | this.hasCompleted = true;
|
8330 | if (this.active === 0 && this.buffer.length === 0) {
|
8331 | this.destination.complete();
|
8332 | }
|
8333 | };
|
8334 | MergeAllSubscriber.prototype.notifyComplete = function (innerSub) {
|
8335 | var buffer = this.buffer;
|
8336 | this.remove(innerSub);
|
8337 | this.active--;
|
8338 | if (buffer.length > 0) {
|
8339 | this._next(buffer.shift());
|
8340 | }
|
8341 | else if (this.active === 0 && this.hasCompleted) {
|
8342 | this.destination.complete();
|
8343 | }
|
8344 | };
|
8345 | return MergeAllSubscriber;
|
8346 | }(OuterSubscriber_1.OuterSubscriber));
|
8347 | exports.MergeAllSubscriber = MergeAllSubscriber;
|
8348 |
|
8349 |
|
8350 | },
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 | function(module, exports, __webpack_require__) {
|
8356 |
|
8357 | "use strict";
|
8358 | var multicast_1 = __webpack_require__( 195);
|
8359 | var Subject_1 = __webpack_require__( 187);
|
8360 | function shareSubjectFactory() {
|
8361 | return new Subject_1.Subject();
|
8362 | }
|
8363 | |
8364 |
|
8365 |
|
8366 |
|
8367 |
|
8368 |
|
8369 |
|
8370 |
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 | function share() {
|
8376 | return multicast_1.multicast.call(this, shareSubjectFactory).refCount();
|
8377 | }
|
8378 | exports.share = share;
|
8379 | ;
|
8380 |
|
8381 |
|
8382 | },
|
8383 |
|
8384 |
|
8385 |
|
8386 |
|
8387 | function(module, exports) {
|
8388 |
|
8389 | "use strict";
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 | if (typeof WebSocket !== 'undefined') {
|
8395 | module.exports.WebSocket = WebSocket;
|
8396 | } else {
|
8397 | module.exports.WebSocket = function () {
|
8398 | console.error("Tried to use WebSocket but it isn't defined or polyfilled");
|
8399 | };
|
8400 | }
|
8401 |
|
8402 | },
|
8403 |
|
8404 |
|
8405 |
|
8406 |
|
8407 | function(module, exports) {
|
8408 |
|
8409 | "use strict";
|
8410 |
|
8411 |
|
8412 |
|
8413 | var debug = false;
|
8414 |
|
8415 | module.exports = {
|
8416 | log: function log() {
|
8417 | var _console;
|
8418 |
|
8419 | return debug ? (_console = console).log.apply(_console, arguments) : undefined;
|
8420 | },
|
8421 | logError: function logError() {
|
8422 | var _console2;
|
8423 |
|
8424 | return debug ? (_console2 = console).error.apply(_console2, arguments) : undefined;
|
8425 | },
|
8426 | enableLogging: function enableLogging() {
|
8427 | var deb = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
8428 | debug = deb;
|
8429 | }
|
8430 | };
|
8431 |
|
8432 | },
|
8433 |
|
8434 |
|
8435 |
|
8436 |
|
8437 | function(module, exports, __webpack_require__) {
|
8438 |
|
8439 | 'use strict';
|
8440 |
|
8441 | exports.__esModule = true;
|
8442 | exports.TokenStorage = undefined;
|
8443 |
|
8444 | var _typeof2 = __webpack_require__( 107);
|
8445 |
|
8446 | var _typeof3 = _interopRequireDefault(_typeof2);
|
8447 |
|
8448 | var _classCallCheck2 = __webpack_require__( 183);
|
8449 |
|
8450 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
8451 |
|
8452 | exports.authEndpoint = authEndpoint;
|
8453 | exports.clearAuthTokens = clearAuthTokens;
|
8454 |
|
8455 | var _queryParse = __webpack_require__( 219);
|
8456 |
|
8457 | var _queryParse2 = _interopRequireDefault(_queryParse);
|
8458 |
|
8459 | var _Observable = __webpack_require__( 78);
|
8460 |
|
8461 | var _map = __webpack_require__( 198);
|
8462 |
|
8463 | var _fetch = __webpack_require__( 220);
|
8464 |
|
8465 | var _fetch2 = _interopRequireDefault(_fetch);
|
8466 |
|
8467 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8468 |
|
8469 | var HORIZON_JWT = 'horizon-jwt';
|
8470 |
|
8471 |
|
8472 | function authEndpoint(name) {
|
8473 | var _this = this;
|
8474 |
|
8475 | var endpointForName = function endpointForName(methods) {
|
8476 | if (methods.hasOwnProperty(name)) {
|
8477 | return methods[name];
|
8478 | } else {
|
8479 | throw new Error('Unconfigured auth type: ' + name);
|
8480 | }
|
8481 | };
|
8482 | if (!this._authMethods) {
|
8483 | var _context;
|
8484 |
|
8485 | console.log('No auth methods, have to fetch');
|
8486 | return (_context = (0, _fetch2.default)(this._horizonPath + '/auth_methods').do(function (authMethods) {
|
8487 | _this._authMethods = authMethods;
|
8488 | }), _map.map).call(_context, endpointForName);
|
8489 | } else {
|
8490 | var _context2;
|
8491 |
|
8492 | return (_context2 = _Observable.Observable.of(this._authMethods), _map.map).call(_context2, endpointForName);
|
8493 | }
|
8494 | }
|
8495 |
|
8496 |
|
8497 |
|
8498 | var FakeStorage = function () {
|
8499 | function FakeStorage() {
|
8500 | (0, _classCallCheck3.default)(this, FakeStorage);
|
8501 | this._storage = new Map();
|
8502 | }
|
8503 |
|
8504 | FakeStorage.prototype.setItem = function setItem(a, b) {
|
8505 | return this._storage.set(a, b);
|
8506 | };
|
8507 |
|
8508 | FakeStorage.prototype.getItem = function getItem(a) {
|
8509 | return this._storage.get(a);
|
8510 | };
|
8511 |
|
8512 | FakeStorage.prototype.removeItem = function removeItem(a) {
|
8513 | return this._storage.delete(a);
|
8514 | };
|
8515 |
|
8516 | return FakeStorage;
|
8517 | }();
|
8518 |
|
8519 | function getStorage() {
|
8520 | try {
|
8521 | if ((typeof window === 'undefined' ? 'undefined' : (0, _typeof3.default)(window)) !== 'object' || window.localStorage === undefined) {
|
8522 | return new FakeStorage();
|
8523 | }
|
8524 | window.localStorage.setItem('$$fake', 1);
|
8525 | window.localStorage.removeItem('$$fake');
|
8526 | return window.localStorage;
|
8527 | } catch (error) {
|
8528 | if (window.sessionStorage === undefined) {
|
8529 | return new FakeStorage();
|
8530 | } else {
|
8531 | return window.sessionStorage;
|
8532 | }
|
8533 | }
|
8534 | }
|
8535 |
|
8536 | var TokenStorage = exports.TokenStorage = function () {
|
8537 | function TokenStorage() {
|
8538 | var authType = arguments.length <= 0 || arguments[0] === undefined ? 'unauthenticated' : arguments[0];
|
8539 | (0, _classCallCheck3.default)(this, TokenStorage);
|
8540 |
|
8541 | this._storage = getStorage();
|
8542 | this._authType = authType;
|
8543 | }
|
8544 |
|
8545 | TokenStorage.prototype.set = function set(jwt) {
|
8546 | return this._storage.setItem(HORIZON_JWT, jwt);
|
8547 | };
|
8548 |
|
8549 | TokenStorage.prototype.get = function get() {
|
8550 | return this._storage.getItem(HORIZON_JWT);
|
8551 | };
|
8552 |
|
8553 | TokenStorage.prototype.remove = function remove() {
|
8554 | return this._storage.removeItem(HORIZON_JWT);
|
8555 | };
|
8556 |
|
8557 | TokenStorage.prototype.setAuthFromQueryParams = function setAuthFromQueryParams() {
|
8558 | var parsed = (0, _queryParse2.default)(window.location.search);
|
8559 | if (parsed.horizon_auth != null) {
|
8560 | this.set(parsed.horizon_auth);
|
8561 | }
|
8562 | };
|
8563 |
|
8564 |
|
8565 |
|
8566 |
|
8567 | TokenStorage.prototype.handshake = function handshake() {
|
8568 |
|
8569 |
|
8570 | var token = this.get();
|
8571 | if (token != null) {
|
8572 | return { method: 'token', token: token };
|
8573 | } else if (this._authType === 'token') {
|
8574 | throw new Error('Attempting to authenticate with a token, but no token is present');
|
8575 | } else {
|
8576 | return { method: this._authType };
|
8577 | }
|
8578 | };
|
8579 |
|
8580 |
|
8581 |
|
8582 |
|
8583 | TokenStorage.prototype.hasAuthToken = function hasAuthToken() {
|
8584 | return Boolean(this.get());
|
8585 | };
|
8586 |
|
8587 | return TokenStorage;
|
8588 | }();
|
8589 |
|
8590 | function clearAuthTokens() {
|
8591 | return getStorage().removeItem(HORIZON_JWT);
|
8592 | }
|
8593 |
|
8594 | },
|
8595 |
|
8596 |
|
8597 |
|
8598 |
|
8599 | function(module, exports) {
|
8600 |
|
8601 | 'use strict';
|
8602 |
|
8603 | exports.__esModule = true;
|
8604 |
|
8605 | exports.default = function (str) {
|
8606 | if (typeof str !== 'string') {
|
8607 | return {};
|
8608 | }
|
8609 |
|
8610 | var str2 = str.trim().replace(/^(\?|#|&)/, '');
|
8611 |
|
8612 | if (!str2) {
|
8613 | return {};
|
8614 | }
|
8615 |
|
8616 | return str2.split('&').reduce(function (ret, param) {
|
8617 | var parts = param.replace(/\+/g, ' ').split('=');
|
8618 |
|
8619 |
|
8620 | var key = parts.shift();
|
8621 | var val = parts.length > 0 ? parts.join('=') : undefined;
|
8622 |
|
8623 | var key2 = decodeURIComponent(key);
|
8624 |
|
8625 |
|
8626 |
|
8627 | var val2 = val === undefined ? null : decodeURIComponent(val);
|
8628 |
|
8629 | if (!ret.hasOwnProperty(key2)) {
|
8630 | ret[key2] = val2;
|
8631 | } else if (Array.isArray(ret[key2])) {
|
8632 | ret[key2].push(val2);
|
8633 | } else {
|
8634 | ret[key2] = [ret[key2], val2];
|
8635 | }
|
8636 |
|
8637 | return ret;
|
8638 | }, {});
|
8639 | };
|
8640 |
|
8641 | },
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 | function(module, exports, __webpack_require__) {
|
8647 |
|
8648 | 'use strict';
|
8649 |
|
8650 | exports.__esModule = true;
|
8651 | exports.default = fetchJSON;
|
8652 |
|
8653 | var _Observable = __webpack_require__( 78);
|
8654 |
|
8655 | var _fromPromise = __webpack_require__( 221);
|
8656 |
|
8657 | var _map = __webpack_require__( 198);
|
8658 |
|
8659 | var _isomorphicFetch = __webpack_require__( 222);
|
8660 |
|
8661 | var _isomorphicFetch2 = _interopRequireDefault(_isomorphicFetch);
|
8662 |
|
8663 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8664 |
|
8665 | function fetchJSON(url) {
|
8666 | var _context;
|
8667 |
|
8668 | return (_context = _fromPromise.fromPromise.call(_Observable.Observable, (0, _isomorphicFetch2.default)(url)), _map.map).call(_context, function (response) {
|
8669 | return response.json();
|
8670 | });
|
8671 | }
|
8672 |
|
8673 | },
|
8674 |
|
8675 |
|
8676 |
|
8677 |
|
8678 | function(module, exports, __webpack_require__) {
|
8679 |
|
8680 | "use strict";
|
8681 | var PromiseObservable_1 = __webpack_require__( 75);
|
8682 | exports.fromPromise = PromiseObservable_1.PromiseObservable.create;
|
8683 |
|
8684 |
|
8685 | },
|
8686 |
|
8687 |
|
8688 |
|
8689 |
|
8690 | function(module, exports, __webpack_require__) {
|
8691 |
|
8692 |
|
8693 |
|
8694 |
|
8695 |
|
8696 | __webpack_require__( 223);
|
8697 | module.exports = self.fetch.bind(self);
|
8698 |
|
8699 |
|
8700 | },
|
8701 |
|
8702 |
|
8703 |
|
8704 |
|
8705 | function(module, exports) {
|
8706 |
|
8707 | (function(self) {
|
8708 | 'use strict';
|
8709 |
|
8710 | if (self.fetch) {
|
8711 | return
|
8712 | }
|
8713 |
|
8714 | var support = {
|
8715 | searchParams: 'URLSearchParams' in self,
|
8716 | iterable: 'Symbol' in self && 'iterator' in Symbol,
|
8717 | blob: 'FileReader' in self && 'Blob' in self && (function() {
|
8718 | try {
|
8719 | new Blob()
|
8720 | return true
|
8721 | } catch(e) {
|
8722 | return false
|
8723 | }
|
8724 | })(),
|
8725 | formData: 'FormData' in self,
|
8726 | arrayBuffer: 'ArrayBuffer' in self
|
8727 | }
|
8728 |
|
8729 | function normalizeName(name) {
|
8730 | if (typeof name !== 'string') {
|
8731 | name = String(name)
|
8732 | }
|
8733 | if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
8734 | throw new TypeError('Invalid character in header field name')
|
8735 | }
|
8736 | return name.toLowerCase()
|
8737 | }
|
8738 |
|
8739 | function normalizeValue(value) {
|
8740 | if (typeof value !== 'string') {
|
8741 | value = String(value)
|
8742 | }
|
8743 | return value
|
8744 | }
|
8745 |
|
8746 |
|
8747 | function iteratorFor(items) {
|
8748 | var iterator = {
|
8749 | next: function() {
|
8750 | var value = items.shift()
|
8751 | return {done: value === undefined, value: value}
|
8752 | }
|
8753 | }
|
8754 |
|
8755 | if (support.iterable) {
|
8756 | iterator[Symbol.iterator] = function() {
|
8757 | return iterator
|
8758 | }
|
8759 | }
|
8760 |
|
8761 | return iterator
|
8762 | }
|
8763 |
|
8764 | function Headers(headers) {
|
8765 | this.map = {}
|
8766 |
|
8767 | if (headers instanceof Headers) {
|
8768 | headers.forEach(function(value, name) {
|
8769 | this.append(name, value)
|
8770 | }, this)
|
8771 |
|
8772 | } else if (headers) {
|
8773 | Object.getOwnPropertyNames(headers).forEach(function(name) {
|
8774 | this.append(name, headers[name])
|
8775 | }, this)
|
8776 | }
|
8777 | }
|
8778 |
|
8779 | Headers.prototype.append = function(name, value) {
|
8780 | name = normalizeName(name)
|
8781 | value = normalizeValue(value)
|
8782 | var list = this.map[name]
|
8783 | if (!list) {
|
8784 | list = []
|
8785 | this.map[name] = list
|
8786 | }
|
8787 | list.push(value)
|
8788 | }
|
8789 |
|
8790 | Headers.prototype['delete'] = function(name) {
|
8791 | delete this.map[normalizeName(name)]
|
8792 | }
|
8793 |
|
8794 | Headers.prototype.get = function(name) {
|
8795 | var values = this.map[normalizeName(name)]
|
8796 | return values ? values[0] : null
|
8797 | }
|
8798 |
|
8799 | Headers.prototype.getAll = function(name) {
|
8800 | return this.map[normalizeName(name)] || []
|
8801 | }
|
8802 |
|
8803 | Headers.prototype.has = function(name) {
|
8804 | return this.map.hasOwnProperty(normalizeName(name))
|
8805 | }
|
8806 |
|
8807 | Headers.prototype.set = function(name, value) {
|
8808 | this.map[normalizeName(name)] = [normalizeValue(value)]
|
8809 | }
|
8810 |
|
8811 | Headers.prototype.forEach = function(callback, thisArg) {
|
8812 | Object.getOwnPropertyNames(this.map).forEach(function(name) {
|
8813 | this.map[name].forEach(function(value) {
|
8814 | callback.call(thisArg, value, name, this)
|
8815 | }, this)
|
8816 | }, this)
|
8817 | }
|
8818 |
|
8819 | Headers.prototype.keys = function() {
|
8820 | var items = []
|
8821 | this.forEach(function(value, name) { items.push(name) })
|
8822 | return iteratorFor(items)
|
8823 | }
|
8824 |
|
8825 | Headers.prototype.values = function() {
|
8826 | var items = []
|
8827 | this.forEach(function(value) { items.push(value) })
|
8828 | return iteratorFor(items)
|
8829 | }
|
8830 |
|
8831 | Headers.prototype.entries = function() {
|
8832 | var items = []
|
8833 | this.forEach(function(value, name) { items.push([name, value]) })
|
8834 | return iteratorFor(items)
|
8835 | }
|
8836 |
|
8837 | if (support.iterable) {
|
8838 | Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
8839 | }
|
8840 |
|
8841 | function consumed(body) {
|
8842 | if (body.bodyUsed) {
|
8843 | return Promise.reject(new TypeError('Already read'))
|
8844 | }
|
8845 | body.bodyUsed = true
|
8846 | }
|
8847 |
|
8848 | function fileReaderReady(reader) {
|
8849 | return new Promise(function(resolve, reject) {
|
8850 | reader.onload = function() {
|
8851 | resolve(reader.result)
|
8852 | }
|
8853 | reader.onerror = function() {
|
8854 | reject(reader.error)
|
8855 | }
|
8856 | })
|
8857 | }
|
8858 |
|
8859 | function readBlobAsArrayBuffer(blob) {
|
8860 | var reader = new FileReader()
|
8861 | reader.readAsArrayBuffer(blob)
|
8862 | return fileReaderReady(reader)
|
8863 | }
|
8864 |
|
8865 | function readBlobAsText(blob) {
|
8866 | var reader = new FileReader()
|
8867 | reader.readAsText(blob)
|
8868 | return fileReaderReady(reader)
|
8869 | }
|
8870 |
|
8871 | function Body() {
|
8872 | this.bodyUsed = false
|
8873 |
|
8874 | this._initBody = function(body) {
|
8875 | this._bodyInit = body
|
8876 | if (typeof body === 'string') {
|
8877 | this._bodyText = body
|
8878 | } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
8879 | this._bodyBlob = body
|
8880 | } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
8881 | this._bodyFormData = body
|
8882 | } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
8883 | this._bodyText = body.toString()
|
8884 | } else if (!body) {
|
8885 | this._bodyText = ''
|
8886 | } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
|
8887 |
|
8888 |
|
8889 | } else {
|
8890 | throw new Error('unsupported BodyInit type')
|
8891 | }
|
8892 |
|
8893 | if (!this.headers.get('content-type')) {
|
8894 | if (typeof body === 'string') {
|
8895 | this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
8896 | } else if (this._bodyBlob && this._bodyBlob.type) {
|
8897 | this.headers.set('content-type', this._bodyBlob.type)
|
8898 | } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
8899 | this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
8900 | }
|
8901 | }
|
8902 | }
|
8903 |
|
8904 | if (support.blob) {
|
8905 | this.blob = function() {
|
8906 | var rejected = consumed(this)
|
8907 | if (rejected) {
|
8908 | return rejected
|
8909 | }
|
8910 |
|
8911 | if (this._bodyBlob) {
|
8912 | return Promise.resolve(this._bodyBlob)
|
8913 | } else if (this._bodyFormData) {
|
8914 | throw new Error('could not read FormData body as blob')
|
8915 | } else {
|
8916 | return Promise.resolve(new Blob([this._bodyText]))
|
8917 | }
|
8918 | }
|
8919 |
|
8920 | this.arrayBuffer = function() {
|
8921 | return this.blob().then(readBlobAsArrayBuffer)
|
8922 | }
|
8923 |
|
8924 | this.text = function() {
|
8925 | var rejected = consumed(this)
|
8926 | if (rejected) {
|
8927 | return rejected
|
8928 | }
|
8929 |
|
8930 | if (this._bodyBlob) {
|
8931 | return readBlobAsText(this._bodyBlob)
|
8932 | } else if (this._bodyFormData) {
|
8933 | throw new Error('could not read FormData body as text')
|
8934 | } else {
|
8935 | return Promise.resolve(this._bodyText)
|
8936 | }
|
8937 | }
|
8938 | } else {
|
8939 | this.text = function() {
|
8940 | var rejected = consumed(this)
|
8941 | return rejected ? rejected : Promise.resolve(this._bodyText)
|
8942 | }
|
8943 | }
|
8944 |
|
8945 | if (support.formData) {
|
8946 | this.formData = function() {
|
8947 | return this.text().then(decode)
|
8948 | }
|
8949 | }
|
8950 |
|
8951 | this.json = function() {
|
8952 | return this.text().then(JSON.parse)
|
8953 | }
|
8954 |
|
8955 | return this
|
8956 | }
|
8957 |
|
8958 |
|
8959 | var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
8960 |
|
8961 | function normalizeMethod(method) {
|
8962 | var upcased = method.toUpperCase()
|
8963 | return (methods.indexOf(upcased) > -1) ? upcased : method
|
8964 | }
|
8965 |
|
8966 | function Request(input, options) {
|
8967 | options = options || {}
|
8968 | var body = options.body
|
8969 | if (Request.prototype.isPrototypeOf(input)) {
|
8970 | if (input.bodyUsed) {
|
8971 | throw new TypeError('Already read')
|
8972 | }
|
8973 | this.url = input.url
|
8974 | this.credentials = input.credentials
|
8975 | if (!options.headers) {
|
8976 | this.headers = new Headers(input.headers)
|
8977 | }
|
8978 | this.method = input.method
|
8979 | this.mode = input.mode
|
8980 | if (!body) {
|
8981 | body = input._bodyInit
|
8982 | input.bodyUsed = true
|
8983 | }
|
8984 | } else {
|
8985 | this.url = input
|
8986 | }
|
8987 |
|
8988 | this.credentials = options.credentials || this.credentials || 'omit'
|
8989 | if (options.headers || !this.headers) {
|
8990 | this.headers = new Headers(options.headers)
|
8991 | }
|
8992 | this.method = normalizeMethod(options.method || this.method || 'GET')
|
8993 | this.mode = options.mode || this.mode || null
|
8994 | this.referrer = null
|
8995 |
|
8996 | if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
8997 | throw new TypeError('Body not allowed for GET or HEAD requests')
|
8998 | }
|
8999 | this._initBody(body)
|
9000 | }
|
9001 |
|
9002 | Request.prototype.clone = function() {
|
9003 | return new Request(this)
|
9004 | }
|
9005 |
|
9006 | function decode(body) {
|
9007 | var form = new FormData()
|
9008 | body.trim().split('&').forEach(function(bytes) {
|
9009 | if (bytes) {
|
9010 | var split = bytes.split('=')
|
9011 | var name = split.shift().replace(/\+/g, ' ')
|
9012 | var value = split.join('=').replace(/\+/g, ' ')
|
9013 | form.append(decodeURIComponent(name), decodeURIComponent(value))
|
9014 | }
|
9015 | })
|
9016 | return form
|
9017 | }
|
9018 |
|
9019 | function headers(xhr) {
|
9020 | var head = new Headers()
|
9021 | var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
|
9022 | pairs.forEach(function(header) {
|
9023 | var split = header.trim().split(':')
|
9024 | var key = split.shift().trim()
|
9025 | var value = split.join(':').trim()
|
9026 | head.append(key, value)
|
9027 | })
|
9028 | return head
|
9029 | }
|
9030 |
|
9031 | Body.call(Request.prototype)
|
9032 |
|
9033 | function Response(bodyInit, options) {
|
9034 | if (!options) {
|
9035 | options = {}
|
9036 | }
|
9037 |
|
9038 | this.type = 'default'
|
9039 | this.status = options.status
|
9040 | this.ok = this.status >= 200 && this.status < 300
|
9041 | this.statusText = options.statusText
|
9042 | this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
|
9043 | this.url = options.url || ''
|
9044 | this._initBody(bodyInit)
|
9045 | }
|
9046 |
|
9047 | Body.call(Response.prototype)
|
9048 |
|
9049 | Response.prototype.clone = function() {
|
9050 | return new Response(this._bodyInit, {
|
9051 | status: this.status,
|
9052 | statusText: this.statusText,
|
9053 | headers: new Headers(this.headers),
|
9054 | url: this.url
|
9055 | })
|
9056 | }
|
9057 |
|
9058 | Response.error = function() {
|
9059 | var response = new Response(null, {status: 0, statusText: ''})
|
9060 | response.type = 'error'
|
9061 | return response
|
9062 | }
|
9063 |
|
9064 | var redirectStatuses = [301, 302, 303, 307, 308]
|
9065 |
|
9066 | Response.redirect = function(url, status) {
|
9067 | if (redirectStatuses.indexOf(status) === -1) {
|
9068 | throw new RangeError('Invalid status code')
|
9069 | }
|
9070 |
|
9071 | return new Response(null, {status: status, headers: {location: url}})
|
9072 | }
|
9073 |
|
9074 | self.Headers = Headers
|
9075 | self.Request = Request
|
9076 | self.Response = Response
|
9077 |
|
9078 | self.fetch = function(input, init) {
|
9079 | return new Promise(function(resolve, reject) {
|
9080 | var request
|
9081 | if (Request.prototype.isPrototypeOf(input) && !init) {
|
9082 | request = input
|
9083 | } else {
|
9084 | request = new Request(input, init)
|
9085 | }
|
9086 |
|
9087 | var xhr = new XMLHttpRequest()
|
9088 |
|
9089 | function responseURL() {
|
9090 | if ('responseURL' in xhr) {
|
9091 | return xhr.responseURL
|
9092 | }
|
9093 |
|
9094 |
|
9095 | if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
|
9096 | return xhr.getResponseHeader('X-Request-URL')
|
9097 | }
|
9098 |
|
9099 | return
|
9100 | }
|
9101 |
|
9102 | xhr.onload = function() {
|
9103 | var options = {
|
9104 | status: xhr.status,
|
9105 | statusText: xhr.statusText,
|
9106 | headers: headers(xhr),
|
9107 | url: responseURL()
|
9108 | }
|
9109 | var body = 'response' in xhr ? xhr.response : xhr.responseText
|
9110 | resolve(new Response(body, options))
|
9111 | }
|
9112 |
|
9113 | xhr.onerror = function() {
|
9114 | reject(new TypeError('Network request failed'))
|
9115 | }
|
9116 |
|
9117 | xhr.ontimeout = function() {
|
9118 | reject(new TypeError('Network request failed'))
|
9119 | }
|
9120 |
|
9121 | xhr.open(request.method, request.url, true)
|
9122 |
|
9123 | if (request.credentials === 'include') {
|
9124 | xhr.withCredentials = true
|
9125 | }
|
9126 |
|
9127 | if ('responseType' in xhr && support.blob) {
|
9128 | xhr.responseType = 'blob'
|
9129 | }
|
9130 |
|
9131 | request.headers.forEach(function(value, name) {
|
9132 | xhr.setRequestHeader(name, value)
|
9133 | })
|
9134 |
|
9135 | xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
|
9136 | })
|
9137 | }
|
9138 | self.fetch.polyfill = true
|
9139 | })(typeof self !== 'undefined' ? self : this);
|
9140 |
|
9141 |
|
9142 | }
|
9143 | ])
|
9144 | });
|
9145 | ;
|
9146 |
|
\ | No newline at end of file |