rxjs-rails 2.5.2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +367 -284
  4. data/vendor/assets/javascripts/rx.aggregates.map +1 -1
  5. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  6. data/vendor/assets/javascripts/rx.all.compat.js +2405 -2438
  7. data/vendor/assets/javascripts/rx.all.compat.map +1 -1
  8. data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
  9. data/vendor/assets/javascripts/rx.all.js +2380 -2395
  10. data/vendor/assets/javascripts/rx.all.map +1 -1
  11. data/vendor/assets/javascripts/rx.all.min.js +4 -4
  12. data/vendor/assets/javascripts/rx.async.compat.js +311 -333
  13. data/vendor/assets/javascripts/rx.async.compat.map +1 -1
  14. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.async.js +280 -327
  16. data/vendor/assets/javascripts/rx.async.map +1 -1
  17. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  18. data/vendor/assets/javascripts/rx.backpressure.js +208 -176
  19. data/vendor/assets/javascripts/rx.backpressure.map +1 -1
  20. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.binding.js +44 -27
  22. data/vendor/assets/javascripts/rx.binding.map +1 -1
  23. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  24. data/vendor/assets/javascripts/rx.coincidence.js +220 -453
  25. data/vendor/assets/javascripts/rx.coincidence.map +1 -1
  26. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.compat.js +1366 -1173
  28. data/vendor/assets/javascripts/rx.compat.map +1 -1
  29. data/vendor/assets/javascripts/rx.compat.min.js +3 -2
  30. data/vendor/assets/javascripts/rx.core.binding.js +823 -0
  31. data/vendor/assets/javascripts/rx.core.binding.map +1 -0
  32. data/vendor/assets/javascripts/rx.core.binding.min.js +3 -0
  33. data/vendor/assets/javascripts/rx.core.js +1281 -0
  34. data/vendor/assets/javascripts/rx.core.map +1 -0
  35. data/vendor/assets/javascripts/rx.core.min.js +3 -0
  36. data/vendor/assets/javascripts/rx.core.testing.js +1242 -0
  37. data/vendor/assets/javascripts/rx.core.testing.map +1 -0
  38. data/vendor/assets/javascripts/rx.core.testing.min.js +3 -0
  39. data/vendor/assets/javascripts/rx.experimental.js +85 -123
  40. data/vendor/assets/javascripts/rx.experimental.map +1 -1
  41. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  42. data/vendor/assets/javascripts/rx.joinpatterns.js +48 -37
  43. data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
  44. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  45. data/vendor/assets/javascripts/rx.js +1367 -1174
  46. data/vendor/assets/javascripts/rx.lite.compat.js +1621 -1403
  47. data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
  48. data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -3
  49. data/vendor/assets/javascripts/rx.lite.extras.compat.js +119 -89
  50. data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -1
  51. data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +1 -1
  52. data/vendor/assets/javascripts/rx.lite.extras.js +119 -89
  53. data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
  54. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  55. data/vendor/assets/javascripts/rx.lite.js +1583 -1390
  56. data/vendor/assets/javascripts/rx.lite.map +1 -1
  57. data/vendor/assets/javascripts/rx.lite.min.js +3 -3
  58. data/vendor/assets/javascripts/rx.map +1 -1
  59. data/vendor/assets/javascripts/rx.min.js +3 -2
  60. data/vendor/assets/javascripts/rx.sorting.js +23 -27
  61. data/vendor/assets/javascripts/rx.sorting.map +1 -1
  62. data/vendor/assets/javascripts/rx.sorting.min.js +1 -1
  63. data/vendor/assets/javascripts/rx.testing.js +11 -15
  64. data/vendor/assets/javascripts/rx.testing.map +1 -1
  65. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  66. data/vendor/assets/javascripts/rx.time.js +117 -133
  67. data/vendor/assets/javascripts/rx.time.map +1 -1
  68. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  69. data/vendor/assets/javascripts/rx.virtualtime.js +120 -39
  70. data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
  71. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  72. metadata +12 -3
@@ -1 +1 @@
1
- {"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","tryCatcher","tryCatchTarget","apply","this","arguments","errorObj","tryCatch","fn","TypeError","thrower","IndexedItem","id","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","self","dispose","ToArrayObserver","observer","isStopped","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","flatMap","mergeAll","FilterObserver","predicate","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","EmptyError","elementAtOrDefault","hasDefault","defaultValue","ArgumentOutOfRangeError","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","yieldIndex","shouldRun","toThunk","obj","ctx","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBoundaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","bind","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","isFn","longStackSupport","message","ObjectDisposedError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","checkDisposed","current","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","Scheduler","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","recursiveAction","state1","state2","isAdded","scheduler1","state3","group","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","attachEvent","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","lastException","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","sink","FromObservable","iterable","mapper","FromSink","loopRecursive","pow","charAt","from","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","ofArrayChanges","observe","unobserve","observerFn","changes","ofObjectChanges","NeverObservable","observableNever","never","PairsObservable","pairs","RangeObservable","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","returnValue","ThrowSink","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","catchException","handlerOrSecond","observableCatch","combineLatest","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","InnerObserver","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","MergeAllObservable","MergeAllObserver","mergeObservable","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","takeWhile","FilterObservable","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","searchElement","fromIndex","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","pipe","dest","onDrain","write","emit","_isStdio","end","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","getValue","hasObservers","os","createRemovableDisposable","so","_trim","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","RangeError","lastOnNext","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","AutoDetachObserverPrototype","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GA2DV,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ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,KAAKhC,MAAQA,EACbgC,KAAKkG,UAAW,IAKlBlF,QAAS,WACPhB,KAAKY,YAAa,EAClBZ,KAAKk1B,UAAY,KACjBl1B,KAAK0N,UAAY,KACjB1N,KAAKhC,MAAQ,QAIVujB,GACPjB,IAEEkiB,GAAmB7yB,GAAG6yB,iBAAoB,SAAU1mB,GAGtD,QAASnY,GAAUzC,GACjB,MAAOlB,MAAKzG,WAAWoK,UAAUzC,GAGnC,QAASshC,GAAiBthC,EAAU3H,GAClCyG,KAAKkB,SAAWA,EAChBlB,KAAKzG,WAAaA,EAClBuiB,EAAU3f,KAAK6D,KAAM2D,GAevB,MAxBA2O,IAASkwB,EAAkB1mB,GAY3BrJ,GAAc+vB,EAAiBxlC,UAAWwhB,GAASxhB,WACjDmH,YAAa,WACXnE,KAAKkB,SAASiD,eAEhBJ,QAAS,SAAUzK,GACjB0G,KAAKkB,SAAS6C,QAAQzK,IAExBuK,OAAQ,SAAU7F,GAChBgC,KAAKkB,SAAS2C,OAAO7F,MAIlBwkC,GACPliB,GAKF3Q,IAAG8yB,OAAU,SAAU3mB,GAGrB,QAAS2mB,KACP3mB,EAAU3f,KAAK6D,MAajB,MAhBAsS,IAASmwB,EAAQ3mB,GASjB2mB,EAAOzlC,UAAU80B,MAAQ,WAAc9xB,KAAK6D,QAAO,IAKnD4+B,EAAOzlC,UAAU+0B,OAAS,WAAc/xB,KAAK6D,QAAO,IAE7C4+B,GACP73B,IAEmB,kBAAV83B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE7gC,GAAK6N,GAAKA,GAEV+yB,OAAO,WACL,MAAO/yB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInB7N,GAAK6N,GAAKA,EAIZ,IAAI1U,IAAcC,MAElBiB,KAAK6D"}
1
+ {"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","cloneArray","arr","a","i","len","length","push","tryCatcher","tryCatchTarget","apply","this","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","thrower","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","size","pop","arrayInitialize","count","factory","Array","IndexedItem","id","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","self","dispose","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","observer","parent","observableOf","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","amb","p","c","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","CatchObserver","falseFactory","argumentsToArray","args","emptyArrayFactory","asObservable","toArray","x","notEmpty","InnerObserver","accumulator","hasSeed","seed","hasAccumulation","accumulation","hasValue","isStopped","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isPromise","observableFromPromise","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","plucker","currentProp","extremaBy","keySelector","lastKey","list","comparison","ex","onError","ex1","onNext","onCompleted","firstOnly","EmptyError","findValue","predicate","yieldIndex","shouldRun","toObservable","obj","Observable","isObservable","fromPromise","isGeneratorFunction","isGenerator","spawn","thunkToObservable","arrayToObservable","objectToObservable","from","flatMap","defer","results","observables","next","keys","forkJoin","err","res","throw","name","displayName","createCbObservable","ctx","AsyncSubject","createCbHandler","createNodeObservable","createNodeHandler","ListenDisposable","n","_e","_n","_fn","addEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","elemToString","add","eventHandler","combineLatestSource","subject","resultSelector","values","hasValueAll","every","identity","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBoundaries","windowBoundaries","Subject","d","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","WhileEnumerable","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","normalizeTime","scheduleRecursiveWithAbsoluteAndState","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","sourceSubscription","newValue","objectTypes","function","freeExports","exports","nodeType","freeSelf","freeWindow","window","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","defaultNow","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","isFn","longStackSupport","message","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","left","right","percolate","temp","heapify","first","peek","removeAt","dequeue","enqueue","remove","isArray","isDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","create","disposableEmpty","empty","checkDisposed","current","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","innerAction","state2","scheduleWork","state3","isAdded","group","invokeRecDate","method","dueTime1","invokeRecDateRelative","invokeRecDateAbsolute","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_action","_cancel","_scheduler","start","bind","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","attachEvent","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","state1","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","cb","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","makeSubscribe","oldOnError","_subscribe","forEach","oOrOnNext","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","FlatMapObservable","_wrapResult","i2","Enumerable","ConcatEnumerableObservable","currentItem","currentValue","concat","CatchErrorObservable","lastException","catchErrorWhen","notificationHandler","exceptions","notifier","handled","notificationDisposable","outer","inner","exn","RepeatEnumerable","v","RepeatEnumerator","l","enumerableRepeat","repeat","repeatCount","OfEnumerable","OfEnumerator","enumerableOf","of","observeOn","subscribeOn","FromPromiseObservable","promise","toPromise","promiseCtor","resolve","reject","ToArrayObservable","observableFactory","observableThrow","EmptyObservable","EmptySink","sink","run","EMPTY_OBSERVABLE","FromObservable","iterable","mapper","FromSink","loopRecursive","pow","charAt","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","ofArrayChanges","observe","unobserve","observerFn","changes","ofObjectChanges","NeverObservable","NEVER_OBSERVABLE","observableNever","never","PairsObservable","pairs","RangeObservable","rangeCount","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","just","ThrowSink","using","resourceFactory","resource","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","leftSubscribe","rightSubscribe","acc","_o","handlerOrSecond","observableCatch","combineLatest","filter","j","subscriptions","sad","observableConcat","ConcatObservable","ConcatSink","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","mergeAll","MergeAllObservable","MergeAllObserver","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","innerSubscription","onErrorResumeNext","second","pos","skipUntil","isOpen","SwitchObservable","SwitchObserver","stopped","latest","hasLatest","switchLatest","TakeUntilObservable","takeUntil","withLatestFrom","allValues","zip","queues","queuedValues","zipIterable","bufferWithCount","skip","windowWithCount","dematerialize","DistinctUntilChangedObservable","keyFn","DistinctUntilChangedObserver","hasCurrentKey","currentKey","comparerEquals","distinctUntilChanged","TapObservable","_oN","_oE","_oC","t","tap","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","IgnoreElementsObservable","ignoreElements","retry","retryCount","retryWhen","ScanObservable","scan","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","groupDisposable","handleError","fireNewMapEntry","writer","GroupedObservable","durationGroup","duration","md","element","MapObservable","innerMap","internalMap","select","selectorFn","pluck","selectMany","flatMapObserver","selectManyObserver","flatMapLatest","SkipObservable","skipCount","skipWhile","remaining","takeWhile","FilterObservable","innerPredicate","internalFilter","shouldYield","where","ReduceObservable","reduce","SomeObserver","Boolean","some","IsEmptyObserver","isEmpty","EveryObserver","includes","searchElement","fromIndex","contains","sum","prev","curr","minBy","min","maxBy","AverageObserver","_c","_t","average","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","seenValue","FirstObserver","_obj","last","find","findIndex","toSet","toMap","wrap","createObservable","__generatorFunction__","gen","processGenerator","ret","context","observableToAsync","toAsync","fromCallback","fromNodeCallback","removeEventListener","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","drainQueue","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","pipe","dest","onDrain","write","emit","_isStdio","end","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishLast","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","getValue","hasObservers","os","createRemovableDisposable","so","_trim","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","singleInstance","getObservable","hasObservable","finally","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","previous","hasPrevious","partition","letBind","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","defaultSourceOrScheduler","expand","allSources","finished","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","extend","chain","ChainObservable","head","tail","_values","_keys","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","timer","periodOrScheduler","getTime","delay","debounce","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","RangeError","lastOnNext","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","switchFirst","hasCurrent","flatMapFirst","selectManyFirst","flatMapWithMaxConcurrent","limit","VirtualTimeScheduler","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","__subscribe","innerSubscribe","AutoDetachObserverPrototype","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAkDV,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAI7G,QAASK,KACP,IACE,MAAOC,IAAeC,MAAMC,KAAMC,WAClC,MAAOC,GAEP,MADAC,IAASD,EAAIA,EACNC,IAGX,QAASC,GAASC,GAChB,IAAKC,GAAWD,GAAO,KAAM,IAAIE,WAAU,wBAE3C,OADAT,IAAiBO,EACVR,EAET,QAASW,GAAQN,GACf,KAAMA,GAYR,QAASO,GAAmBC,EAAOC,GAGjC,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,E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,KAAmBD,OAAOC,KACzE3gC,GAAKiO,GAAKA,GAEVyyB,OAAO,WACL,MAAOzyB,OAEAX,IAAeM,GAEpBE,IACDF,GAAWL,QAAUU,IAAIA,GAAKA,GAE/BX,GAAYW,GAAKA,GAInBjO,GAAKiO,GAAKA,EAIZ,IAAI/T,IAAcC,MAElBgB,KAAKtD"}
@@ -1,6 +1,6 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){function b(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function c(a,b){if(Nb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Rb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+Rb+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===Pb&&d>=Qb&&Ce>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(Nb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return Pb=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!yc(a))return b;xc.nonEnumArgs&&a.length&&zc(a)&&(a=Cc.call(a));var c=xc.enumPrototypes&&"function"==typeof a,d=xc.enumErrorProps&&(a===sc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(xc.nonEnumShadows&&a!==tc){var f=a.constructor,g=-1,h=ec;if(a===(f&&f.prototype))var i=a===uc?oc:a===sc?jc:pc.call(a),j=wc[i];for(;++g<h;)e=dc[g],j&&j[e]||!qc.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=pc.call(a),h=pc.call(b);if(g==fc&&(g=mc),h==fc&&(h=mc),g!=h)return!1;switch(g){case hc:case ic:return+a==+b;case lc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case nc:case oc:return a==String(b)}var i=g==gc;if(!i){if(g!=mc||!xc.nodeClass&&(l(a)||l(b)))return!1;var j=!xc.argsObject&&zc(a)?Object:a.constructor,n=!xc.argsObject&&zc(b)?Object:b.constructor;if(!(j==n||qc.call(a,"constructor")&&qc.call(b,"constructor")||Mb(j)&&j instanceof j&&Mb(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return qc.call(f,e)?(p++,q=qc.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return qc.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function o(){try{return Ac.apply(this,arguments)}catch(a){return Gc.e=a,Gc}}function p(a){if(!Mb(a))throw new TypeError("fn must be a function");return Ac=a,o}function q(a){throw a}function r(a,b){this.id=a,this.value=b}function t(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function u(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function v(a){this.observer=a,this.a=[],this.isStopped=!1}function w(){this._s=s}function x(){this._s=s,this._l=s.length,this._i=0}function y(a){this._a=a}function z(a){this._a=a,this._l=D(a),this._i=0}function A(a){return"number"==typeof a&&yb.isFinite(a)}function B(b){var c,d=b[Zb];if(!d&&"string"==typeof b)return c=new w(b),c[Zb]();if(!d&&b.length!==a)return c=new y(b),c[Zb]();if(!d)throw new TypeError("Object is not iterable");return b[Zb]()}function C(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function D(a){var b=+a.length;return isNaN(b)?0:0!==b&&A(b)?(b=C(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ed?Ed:b):b}function E(a,b){this.observer=a,this.parent=b}function F(a,b){return Wc(a)||(a=_c),new Gd(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(a,b){this.observer=a,this.parent=b}function I(a,b){return new we(function(c){var d=new Qc,e=new Rc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}Kb(d)&&(d=xd(d));var g=new Qc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function J(a,b){var c=this;return new we(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function K(){return!1}function L(){return[]}function M(a,b,c){var d=cc(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e}).concatAll()}function N(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function O(a){this.comparer=a,this.set=[]}function P(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function Q(a,b,c){var d=cc(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e}).mergeAll()}function R(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function S(a,b,c){return new we(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function T(a){if(0===a.length)throw new Sb;return a[0]}function U(a,b,c,d){if(0>b)throw new Ub;return new we(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Ub)})},a)}function V(a,b,c){return new we(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Sb)})},a)}function W(a,b,c){return new we(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Sb)})},a)}function X(a,b,c){return new we(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Sb)})},a)}function Y(b,c,d,e){var f=cc(c,d,3);return new we(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function Z(a,b){return Array.isArray(a)?$.call(b,a):cb(a)?de(a.call(b)):db(a)?de(a):bb(a)?_(a):Kb(a)?ab(a):typeof a===be?a:yc(a)||Array.isArray(a)?$.call(b,a):a}function $(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=Z(a,b),typeof a!==be)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void dd.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function _(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function ab(a){return function(b){a.then(function(a){b(null,a)},b)}}function bb(a){return a&&typeof a.subscribe===be}function cb(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function db(a){return a&&typeof a.next===be&&typeof a[ce]===be}function eb(a){a&&dd.schedule(function(){throw a})}function fb(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Mc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function gb(a,b,c){var d=new Jc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(gb(a.item(e),b,c));else a&&d.add(fb(a,b,c));return d}function hb(a,b,c){return new we(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Fb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Jc(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function ib(a,b){return a.groupJoin(this,b,Bd,function(a,b){return b})}function jb(a){var b=this;return new we(function(c){var d=new ze,e=new Jc,f=new Sc(e);return c.onNext(Fc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Kb(a)&&(a=xd(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new ze,c.onNext(Fc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function kb(a){var b=this;return new we(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Kb(b)&&(b=xd(b));var i=new Qc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Eb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new ze,c.onNext(Fc(h,g)),d()}))}var e=new Rc,f=new Jc(e),g=new Sc(f),h=new ze;return c.onNext(Fc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function lb(b,c){return new kd(function(){return new jd(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function mb(a){this.patterns=a}function nb(a,b){this.expression=a,this.selector=b}function ob(a,b,c){var d=a.get(b);if(!d){var e=new ue(b,c);return a.set(b,e),e}return d}function pb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new te;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function qb(a,b){return new we(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function rb(a,b,c){return new we(function(d){var e=a,f=Vc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function sb(a,b){return new we(function(c){return b.scheduleWithRelative(Vc(a),function(){c.onNext(0),c.onCompleted()})})}function tb(a,b,c){return a===b?new we(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):zd(function(){return rb(c.now()+a,b,c)})}function ub(a,b,c){return new we(function(d){var e,f=!1,g=new Rc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Qc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Jc(e,g)},a)}function vb(a,b,c){return zd(function(){return ub(a,b-c.now(),c)})}function wb(a,b){return new we(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Jc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var xb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},yb=xb[typeof window]&&window||this,zb=xb[typeof exports]&&exports&&!exports.nodeType&&exports,Ab=xb[typeof module]&&module&&!module.nodeType&&module,Bb=Ab&&Ab.exports===zb&&zb,Cb=xb[typeof global]&&global;!Cb||Cb.global!==Cb&&Cb.window!==Cb||(yb=Cb);var Db={internals:{},config:{Promise:yb.Promise},helpers:{}},Eb=Db.helpers.noop=function(){},Fb=(Db.helpers.notDefined=function(a){return"undefined"==typeof a},Db.helpers.identity=function(a){return a}),Gb=(Db.helpers.pluck=function(a){return function(b){return b[a]}},Db.helpers.just=function(a){return function(){return a}},Db.helpers.defaultNow=Date.now),Hb=Db.helpers.defaultComparer=function(a,b){return Bc(a,b)},Ib=Db.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Jb=(Db.helpers.defaultKeySerializer=function(a){return a.toString()},Db.helpers.defaultError=function(a){throw a}),Kb=Db.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Lb=(Db.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Db.helpers.not=function(a){return!a}),Mb=Db.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==pc.call(a)}),a}();Db.config.longStackSupport=!1;var Nb=!1;try{throw new Error}catch(Ob){Nb=!!Ob.stack}var Pb,Qb=g(),Rb="From previous event:",Sb=Db.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Sb.prototype=Error.prototype;var Tb=Db.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Tb.prototype=Error.prototype;var Ub=Db.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ub.prototype=Error.prototype;var Vb=Db.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Vb.prototype=Error.prototype;var Wb=Db.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Wb.prototype=Error.prototype;var Xb=Db.helpers.notImplemented=function(){throw new Wb},Yb=Db.helpers.notSupported=function(){throw new Vb},Zb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";yb.Set&&"function"==typeof(new yb.Set)["@@iterator"]&&(Zb="@@iterator");var $b=Db.doneEnumerator={done:!0,value:a},_b=Db.helpers.isIterable=function(b){return b[Zb]!==a},ac=Db.helpers.isArrayLike=function(b){return b&&b.length!==a};Db.helpers.iterator=Zb;var bc,cc=Db.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},dc=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ec=dc.length,fc="[object Arguments]",gc="[object Array]",hc="[object Boolean]",ic="[object Date]",jc="[object Error]",kc="[object Function]",lc="[object Number]",mc="[object Object]",nc="[object RegExp]",oc="[object String]",pc=Object.prototype.toString,qc=Object.prototype.hasOwnProperty,rc=pc.call(arguments)==fc,sc=Error.prototype,tc=Object.prototype,uc=String.prototype,vc=tc.propertyIsEnumerable;try{bc=!(pc.call(document)==mc&&!({toString:0}+""))}catch(Ob){bc=!0}var wc={};wc[gc]=wc[ic]=wc[lc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},wc[hc]=wc[oc]={constructor:!0,toString:!0,valueOf:!0},wc[jc]=wc[kc]=wc[nc]={constructor:!0,toString:!0},wc[mc]={constructor:!0};var xc={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);xc.enumErrorProps=vc.call(sc,"message")||vc.call(sc,"name"),xc.enumPrototypes=vc.call(a,"prototype"),xc.nonEnumArgs=0!=c,xc.nonEnumShadows=!/valueOf/.test(b)}(1);var yc=Db.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},zc=function(a){return a&&"object"==typeof a?pc.call(a)==fc:!1};rc||(zc=function(a){return a&&"object"==typeof a?qc.call(a,"callee"):!1});var Ac,Bc=Db.internals.isEqual=function(a,b){return m(a,b,[],[])},Cc=({}.hasOwnProperty,Array.prototype.slice),Dc=this.inherits=Db.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Ec=Db.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Fc=Db.internals.addRef=function(a,b){return new we(function(c){return new Jc(b.getDisposable(),a.subscribe(c))})},Gc={e:{}};r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Hc=Db.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ic=Hc.prototype;Ic.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ic.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Ic.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Ic.peek=function(){return this.items[0].value},Ic.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Ic.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Ic.enqueue=function(a){var b=this.length++;this.items[b]=new r(Hc.count++,a),this.percolate(b)},Ic.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Hc.count=0;var Jc=Db.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!Oc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},Kc=Jc.prototype;Kc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Kc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Kc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var Lc=Db.Disposable=function(a){this.isDisposed=!1,this.action=a||Eb};Lc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Mc=Lc.create=function(a){return new Lc(a)},Nc=Lc.empty={dispose:Eb},Oc=Lc.isDisposable=function(a){return a&&Mb(a.dispose)},Pc=Lc.checkDisposed=function(a){if(a.isDisposed)throw new Tb},Qc=Db.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Qc.prototype.getDisposable=function(){return this.current},Qc.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Qc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Rc=Db.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Rc.prototype.getDisposable=function(){return this.current},Rc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Rc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Sc=Db.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Nc:new a(this)},b}();t.prototype.dispose=function(){this.scheduler.scheduleWithState(this,u)};var Tc=Db.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Ib,this.disposable=new Qc};Tc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Tc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Tc.prototype.isCancelled=function(){return this.disposable.isDisposed},Tc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Uc=Db.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Nc}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=Gb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Vc=Uc.normalize,Wc=Uc.isScheduler;!function(a){function b(a,b){function c(b){e(b,function(b){var d=!1,e=!1,g=a.scheduleWithState(b,function(a,b){return d?f.remove(g):e=!0,c(b),Nc});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new Jc;return c(d),f}function c(a,b,c){function d(b){f(b,function(b,e){var f=!1,h=!1,i=a[c](b,e,function(a,b){return f?g.remove(i):h=!0,d(b),Nc});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new Jc;return d(e),g}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative([a,d],b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute([a,d],b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Uc.prototype),function(){Uc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Uc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof yb.setInterval)throw new Vb;b=Vc(b);var d=a,e=yb.setInterval(function(){d=c(d)},b);return Mc(function(){yb.clearInterval(e)})}}(Uc.prototype),function(a){a.catchError=a["catch"]=function(a){return new ed(this,a)}}(Uc.prototype);var Xc,Yc,Zc=Db.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Qc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),$c=Uc.immediate=function(){function a(a,b){return b(this,a)}return new Uc(Gb,a,Yb,Yb)}(),_c=Uc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new Tc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new Hc(4),c.enqueue(e);var f=p(a)();if(c=null,f===Gc)return q(f.e)}return e.disposable}var c,d=new Uc(Gb,b,Yb,Yb);return d.scheduleRequired=function(){return!c},d}(),ad=function(){var a,b=Eb;if(yb.setTimeout)a=yb.setTimeout,b=yb.clearTimeout;else{if(!yb.WScript)throw new Vb;a=function(a,b){yb.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),bd=ad.setTimeout,cd=ad.clearTimeout;!function(){function a(b){if(f)bd(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=p(c)();if(Yc(b),f=!1,d===Gc)return q(d.e)}}}function b(){if(!yb.postMessage||yb.importScripts)return!1;var a=!1,b=yb.onmessage;return yb.onmessage=function(){a=!0},yb.postMessage("","*"),yb.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))}var d=1,e={},f=!1;Yc=function(a){delete e[a]};var g=RegExp("^"+String(pc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=Cb&&Bb&&Cb.setImmediate)&&!g.test(h)&&h;if(Mb(h))Xc=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Xc=function(b){var c=d++;return e[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var i="ms.rx.schedule"+Math.random();yb.addEventListener?yb.addEventListener("message",c,!1):yb.attachEvent?yb.attachEvent("onmessage",c):yb.onmessage=c,Xc=function(a){var b=d++;return e[b]=a,yb.postMessage(i+currentId,"*"),b}}else if(yb.MessageChannel){var j=new yb.MessageChannel;j.port1.onmessage=function(b){a(b.data)},Xc=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else Xc="document"in yb&&"onreadystatechange"in yb.document.createElement("script")?function(b){var c=yb.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},yb.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,bd(function(){a(c)},0),c}}();var dd=Uc.timeout=Uc["default"]=function(){function a(a,b){var c=this,d=new Qc,e=Xc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new Jc(d,Mc(function(){Yc(e)}))}function b(a,b,c){var d=this,e=Uc.normalize(b),f=new Qc;if(0===e)return d.scheduleWithState(a,c);var g=bd(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new Jc(f,Mc(function(){cd(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Uc(Gb,a,b,c)}(),ed=function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Dc(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Nc}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Qc;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Uc),fd=Db.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Wc(a)||(a=$c),new we(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),gd=fd.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new fd("N",d,null,a,b,c)}}(),hd=fd.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new fd("E",null,d,a,b,c)}}(),id=fd.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new fd("C",null,null,a,b,c)}}(),jd=Db.internals.Enumerator=function(a){this._next=a};jd.prototype.next=function(){return this._next()},jd.prototype[Zb]=function(){return this};var kd=Db.internals.Enumerable=function(a){this._iterator=a};kd.prototype[Zb]=function(){return this._iterator()},kd.prototype.concat=function(){var a=this;return new we(function(b){var c,d=a[Zb](),e=new Rc,f=$c.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;Kb(h)&&(h=xd(h));var i=new Qc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Jc(e,f,Mc(function(){c=!0}))})},kd.prototype.catchError=function(){var a=this;return new we(function(b){var c,d=a[Zb](),e=new Rc,f=$c.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;Kb(i)&&(i=xd(i));var j=new Qc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Jc(e,f,Mc(function(){c=!0}))})},kd.prototype.catchErrorWhen=function(a){var b=this;return new we(function(c){var d,e,f=new ze,g=new ze,h=a(f),i=h.subscribe(g),j=b[Zb](),k=new Rc,l=$c.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;Kb(i)&&(i=xd(i));var l=new Qc,m=new Qc;k.setDisposable(new Jc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Jc(i,k,l,Mc(function(){d=!0}))})};var ld=kd.repeat=function(a,b){return null==b&&(b=-1),new kd(function(){var c=b;return new jd(function(){return 0===c?$b:(c>0&&c--,{done:!1,value:a})})})},md=kd.of=function(a,b,c){if(b)var d=cc(b,c,3);return new kd(function(){var c=-1;return new jd(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:$b})})},nd=Db.Observer=function(){};nd.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},nd.prototype.asObserver=function(){return new rd(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},nd.prototype.checked=function(){return new sd(this)};var od=nd.create=function(a,b,c){return a||(a=Eb),b||(b=Jb),c||(c=Eb),new rd(a,b,c)};nd.fromNotifier=function(a,b){return new rd(function(c){return a.call(b,gd(c))},function(c){return a.call(b,hd(c))},function(){return a.call(b,id())})},nd.prototype.notifyOn=function(a){return new ud(a,this)},nd.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var pd,qd=Db.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return Dc(b,a),b.prototype.next=Xb,b.prototype.error=Xb,b.prototype.completed=Xb,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(nd),rd=Db.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Dc(b,a),b.prototype.next=function(a){this._onNext(a)
3
- },b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(qd),sd=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Dc(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=p(this._observer.onNext).call(this._observer,a);this._state=0,b===Gc&&q(b.e)},c.onError=function(a){this.checkAccess();var b=p(this._observer.onError).call(this._observer,a);this._state=2,b===Gc&&q(b.e)},c.onCompleted=function(){this.checkAccess();var a=p(this._observer.onCompleted).call(this._observer);this._state=2,a===Gc&&q(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(nd),td=Db.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new Rc}return Dc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(qd),ud=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Dc(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(td),vd=Db.Observable=function(){function a(a){if(Db.config.longStackSupport&&Nb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return pd=a.prototype,pd.subscribe=pd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:od(a,b,c))},pd.subscribeOnNext=function(a,b){return this._subscribe(od("undefined"!=typeof b?function(c){a.call(b,c)}:a))},pd.subscribeOnError=function(a,b){return this._subscribe(od(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},pd.subscribeOnCompleted=function(a,b){return this._subscribe(od(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),wd=Db.ObservableBase=function(a){function b(a){return a&&Mb(a.dispose)?a:Mb(a)?Mc(a):Nc}function c(a,c){var d=c[0],e=c[1],f=p(e.subscribeCore).call(e,d);return f!==Gc||d.fail(Gc.e)?void d.setDisposable(b(f)):q(Gc.e)}function d(a){var b=new xe(a),d=[b,this];return _c.scheduleRequired()?_c.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Dc(e,a),e.prototype.subscribeCore=Xb,e}(vd);pd.observeOn=function(a){var b=this;return new we(function(c){return b.subscribe(new ud(a,c))},b)},pd.subscribeOn=function(a){var b=this;return new we(function(c){var d=new Qc,e=new Rc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new t(a,b.subscribe(c)))})),e},b)};var xd=vd.fromPromise=function(a){return zd(function(){var b=new Db.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};pd.toPromise=function(a){if(a||(a=Db.config.Promise),!a)throw new Vb("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})};var yd=function(a){function b(b){this.source=b,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new v(a))},b}(wd);v.prototype.onNext=function(a){this.isStopped||this.a.push(a)},v.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},v.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},v.prototype.dispose=function(){this.isStopped=!0},v.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},pd.toArray=function(){return new yd(this)},vd.create=vd.createWithDisposable=function(a,b){return new we(a,b)};var zd=vd.defer=function(a){return new we(function(b){var c;try{c=a()}catch(d){return Qd(d).subscribe(b)}return Kb(c)&&(c=xd(c)),c.subscribe(b)})},Ad=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){b.onCompleted()}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,d)},b}(wd),Bd=vd.empty=function(a){return Wc(a)||(a=$c),new Ad(a)},Cd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Dd(a,this);return b.run()},b}(wd),Dd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=B(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Ed=Math.pow(2,53)-1;w.prototype[Zb]=function(){return new x(this._s)},x.prototype[Zb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:$b},y.prototype[Zb]=function(){return new z(this._a)},z.prototype[Zb]=function(){return this},z.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:$b};var Fd=vd.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!Mb(b))throw new Error("mapFn when provided must be a function");if(b)var e=cc(b,c,2);return Wc(d)||(d=_c),new Cd(a,e,d)},Gd=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(wd);E.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var Hd=vd.fromArray=function(a,b){return Wc(b)||(b=_c),new Gd(a,b)};vd.generate=function(a,b,c,d,e){return Wc(e)||(e=_c),new we(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},vd.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Gd(b,_c)},vd.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Gd(c,a)},vd.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new we(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},vd.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new we(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var Id=function(a){function b(){a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(){return Nc},b}(wd),Jd=vd.never=function(){return new Id},Kd=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(wd);G.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},vd.pairs=function(a,b){return b||(b=_c),new Kd(a,b)};var Ld=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Md(a,this);return b.run()},b}(wd),Md=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();vd.range=function(a,b,c){return Wc(c)||(c=_c),new Ld(a,b,c)};var Nd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new H(a,this);return b.run()},b}(wd);H.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},vd.repeat=function(a,b,c){return Wc(c)||(c=_c),new Nd(a,b,c)};var Od=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onNext(c),d.onCompleted()}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],d)},b}(wd),Pd=(vd["return"]=vd.just=vd.returnValue=function(a,b){return Wc(b)||(b=$c),new Od(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.error,this.observer],d)},b}(wd)),Qd=vd["throw"]=vd.throwError=vd.throwException=function(a,b){return Wc(b)||(b=$c),new Pd(a,b)};vd.using=function(a,b){return new we(function(c){var d,e,f=Nc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Jc(Qd(g).subscribe(c),f)}return new Jc(e.subscribe(c),f)})},pd.amb=function(a){var b=this;return new we(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Qc,j=new Qc;return Kb(a)&&(a=xd(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Jc(i,j)})},vd.amb=function(){function a(a,b){return a.amb(b)}var b=Jd(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},pd["catch"]=pd.catchError=pd.catchException=function(a){return"function"==typeof a?I(this,a):Rd([this,a])};var Rd=vd.catchError=vd["catch"]=vd.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return md(a).catchError()};pd.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Sd.apply(this,b)};var Sd=vd.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new we(function(a){function c(b){if(h[b]=!0,i||(i=h.every(Fb))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(Fb)&&a.onCompleted()}function e(b){j[b]=!0,j.every(Fb)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=n(f,g),i=!1,j=n(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new Qc;Kb(f)&&(f=xd(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new Jc(l)},this)};pd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Td.apply(null,a)};var Td=vd.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return md(a).concat()};pd.concatAll=pd.concatObservable=function(){return this.merge(1)};var Ud=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Jc;return b.add(this.source.subscribe(new Vd(a,this.maxConcurrent,b))),b},b}(wd),Vd=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new Qc;this.g.add(c),Kb(a)&&(a=xd(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();pd.merge=function(a){return"number"!=typeof a?Wd(this,a):new Ud(this,a)};var Wd=vd.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Wc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=$c,b=0;d>b;b++)c.push(arguments[b]);else for(a=$c,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},Xd=function(a){function b(b){this.source=b,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Jc,c=new Qc;return b.add(c),c.setDisposable(this.source.subscribe(new Yd(a,b))),b},b}(wd),Yd=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new Qc;this.g.add(c),Kb(a)&&(a=xd(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();pd.mergeAll=pd.mergeObservable=function(){return new Xd(this)};var Zd=Db.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Zd.prototype=Error.prototype,vd.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=F(null,a);return new we(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new Zd(g))}var c=new Jc,e=new Qc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new Qc;c.add(e),Kb(d)&&(d=xd(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})},pd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return $d([this,a])};var $d=vd.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new we(function(b){var c=0,d=new Rc,e=$c.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],Kb(f)&&(f=xd(f)),g=new Qc,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new Jc(d,e)})};pd.skipUntil=function(a){var b=this;return new we(function(c){var d=!1,e=new Jc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));Kb(a)&&(a=xd(a));var f=new Qc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},pd["switch"]=pd.switchLatest=function(){var a=this;return new we(function(b){var c=!1,d=new Rc,e=!1,f=0,g=a.subscribe(function(a){var g=new Qc,h=++f;c=!0,d.setDisposable(g),Kb(a)&&(a=xd(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Jc(g,d)},a)},pd.takeUntil=function(a){var b=this;return new we(function(c){return Kb(a)&&(a=xd(a)),new Jc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Eb))},b)},pd.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new we(function(a){for(var c=function(){return!1},f=b.length,g=n(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new Qc;Kb(d)&&(d=xd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Fb)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new Qc;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new Jc(j)},this)},pd.zip=function(){if(Array.isArray(arguments[0]))return J.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new we(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(Fb)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=n(g,L),i=n(g,K),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new Qc;Kb(e)&&(e=xd(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new Jc(j)},d)},vd.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},vd.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new we(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(Fb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Fb)?void b.onCompleted():void 0}for(var e=a.length,f=n(e,function(){return[]}),g=n(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Qc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Jc(h)})},pd.asObservable=function(){var a=this;return new we(function(b){return a.subscribe(b)},this)},pd.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},pd.dematerialize=function(){var a=this;return new we(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},pd.distinctUntilChanged=function(a,b){var c=this;return b||(b=Hb),new we(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},pd["do"]=pd.tap=pd.doAction=function(a,b,c){var d=this;return new we(function(e){var f=!a||Mb(a)?od(a||Eb,b||Eb,c||Eb):a;return d.subscribe(function(a){try{f.onNext(a)}catch(b){e.onError(b)}e.onNext(a)},function(a){try{f.onError(a)}catch(b){e.onError(b)}e.onError(a)},function(){try{f.onCompleted()}catch(a){e.onError(a)}e.onCompleted()})},this)},pd.doOnNext=pd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},pd.doOnError=pd.tapOnError=function(a,b){return this.tap(Eb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},pd.doOnCompleted=pd.tapOnCompleted=function(a,b){return this.tap(Eb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},pd["finally"]=pd.ensure=function(a){var b=this;return new we(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Mc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},pd.finallyAction=function(a){return this.ensure(a)},pd.ignoreElements=function(){var a=this;return new we(function(b){return a.subscribe(Eb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},pd.materialize=function(){var a=this;return new we(function(b){return a.subscribe(function(a){b.onNext(gd(a))},function(a){b.onNext(hd(a)),b.onCompleted()},function(){b.onNext(id()),b.onCompleted()})},a)},pd.repeat=function(a){return ld(this,a).concat()},pd.retry=function(a){return ld(this,a).catchError()},pd.retryWhen=function(a){return ld(this).catchErrorWhen(a)},pd.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new we(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},pd.skipLast=function(a){if(0>a)throw new Ub;var b=this;return new we(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},pd.startWith=function(){var a,b=0;arguments.length&&Wc(arguments[0])?(a=arguments[0],b=1):a=$c;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return md([Hd(c,a),this]).concat()},pd.takeLast=function(a){if(0>a)throw new Ub;var b=this;return new we(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},pd.takeLastBuffer=function(a){var b=this;return new we(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},pd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Ub;if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Ub;return new we(function(d){function e(){var a=new ze;i.push(a),d.onNext(Fc(a,g))}var f=new Qc,g=new Sc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},pd.selectConcat=pd.concatMap=function(a,b,c){return Mb(a)&&Mb(b)?this.concatMap(function(c,d){var e=a(c,d);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e.map(function(a,e){return b(c,a,d,e)})}):Mb(a)?M(this,a,c):M(this,function(){return a})},pd.concatMapObserver=pd.selectConcatObserver=function(a,b,c,d){var e=this,f=cc(a,d,2),g=cc(b,d,1),h=cc(c,d,0);return new we(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Kb(d)&&(d=xd(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Kb(c)&&(c=xd(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Kb(b)&&(b=xd(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},pd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new we(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},O.prototype.push=function(a){var b=-1===N(this.set,a,this.comparer);return b&&this.set.push(a),b},pd.distinct=function(a,b){var c=this;return b||(b=Hb),new we(function(d){var e=new O(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},pd.groupBy=function(a,b,c){return this.groupByUntil(a,b,Jd,c)},pd.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Fb),d||(d=Hb),new we(function(f){function g(a){return function(b){b.onError(a)}}var h=new qe(0,d),i=new Jc,j=new Sc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new ze,h.set(e,m),l=!0),l){var n=new ye(e,m,j),o=new ye(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Qc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(Eb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j},e)};var _d=function(a){function b(b,c,d){this.source=b,this.selector=cc(c,d,3),a.call(this)}return Dc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a.call(this,d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new P(a,this.selector,this))},b}(wd);P.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.selector).call(this,a,this.i++,this.source);return b===Gc?this.observer.onError(b.e):void this.observer.onNext(b)}},P.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},P.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},P.prototype.dispose=function(){this.isStopped=!0},P.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},pd.map=pd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof _d?this.internalMap(c,b):new _d(this,c,b)},pd.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},pd.selectMany=pd.flatMap=function(a,b,c){return Mb(a)&&Mb(b)?this.flatMap(function(c,d){var e=a(c,d);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Mb(a)?Q(this,a,c):Q(this,function(){return a})},pd.flatMapObserver=pd.selectManyObserver=function(a,b,c,d){var e=this;return new we(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}Kb(c)&&(c=xd(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Kb(c)&&(c=xd(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Kb(a)&&(a=xd(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},pd.selectSwitch=pd.flatMapLatest=pd.switchMap=function(a,b){return this.select(a,b).switchLatest()},pd.skip=function(a){if(0>a)throw new Ub;var b=this;return new we(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},pd.skipWhile=function(a,b){var c=this,d=cc(a,b,3);return new we(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},pd.take=function(a,b){if(0>a)throw new Ub;if(0===a)return Bd(b);var c=this;return new we(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},pd.takeWhile=function(a,b){var c=this,d=cc(a,b,3);return new we(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var ae=function(a){function b(b,c,d){this.source=b,this.predicate=cc(c,d,3),a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new R(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a.call(this,b,c,e)},c)},b}(wd);R.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.predicate).call(this,a,this.i++,this.source);return b===Gc?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},R.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},R.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},R.prototype.dispose=function(){this.isStopped=!0},R.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},pd.filter=pd.where=function(a,b){return this instanceof ae?this.internalFilter(a,b):new ae(this,a,b)},pd.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new we(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);
4
- try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Sb),e.onCompleted()})},d)},pd.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new we(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Sb),e.onCompleted()})},d)},pd.some=function(a,b){var c=this;return a?c.filter(a,b).some():new we(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},pd.any=function(){return this.some.apply(this,arguments)},pd.isEmpty=function(){return this.any().map(Lb)},pd.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Lb)},pd.all=function(){return this.every.apply(this,arguments)},pd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new we(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Nc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},pd.contains=function(a,b){pd.includes(a,b)},pd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},pd.indexOf=function(a,b){var c=this;return new we(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Nc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},pd.sum=function(a,b){return a&&Mb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},pd.minBy=function(a,b){return b||(b=Ib),S(this,a,function(a,c){return-1*b(a,c)})},pd.min=function(a){return this.minBy(Fb,a).map(function(a){return T(a)})},pd.maxBy=function(a,b){return b||(b=Ib),S(this,a,b)},pd.max=function(a){return this.maxBy(Fb,a).map(function(a){return T(a)})},pd.average=function(a,b){return a&&Mb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Sb;return a.sum/a.count})},pd.sequenceEqual=function(a,b){var c=this;return b||(b=Hb),new we(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(ac(a)||_b(a))&&(a=Fd(a)),Kb(a)&&(a=xd(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Jc(i,j)},c)},pd.elementAt=function(a){return U(this,a,!1)},pd.elementAtOrDefault=function(a,b){return U(this,a,!0,b)},pd.single=function(a,b){return a&&Mb(a)?this.where(a,b).single():V(this,!1)},pd.singleOrDefault=function(a,b,c){return a&&Mb(a)?this.filter(a,c).singleOrDefault(null,b):V(this,!0,b)},pd.first=function(a,b){return a?this.where(a,b).first():W(this,!1)},pd.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):W(this,!0,b)},pd.last=function(a,b){return a?this.where(a,b).last():X(this,!1)},pd.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):X(this,!0,b)},pd.find=function(a,b){return Y(this,a,b,!1)},pd.findIndex=function(a,b){return Y(this,a,b,!0)},pd.toSet=function(){if("undefined"==typeof yb.Set)throw new TypeError;var a=this;return new we(function(b){var c=new yb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},pd.toMap=function(a,b){if("undefined"==typeof yb.Map)throw new TypeError;var c=this;return new we(function(d){var e=new yb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var be="function",ce="throw",yc=Db.internals.isObject,de=Db.spawn=function(a){var b=cb(a);return function(c){function d(a,b){dd.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[ce](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=Z(c.value,f),typeof c.value!==be)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){dd.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===be;c=k?h.pop():eb,g=a.apply(this,h)}else c=c||eb;e()}};vd.start=function(a,b,c){return ee(a,b,c)()};var ee=vd.toAsync=function(a,b,c){return Wc(c)||(c=dd),function(){var d=arguments,e=new Ae;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};vd.fromCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new we(function(d){function f(){for(var a=arguments.length,e=new Array(a),f=0;a>f;f++)e[f]=arguments[f];if(c){try{e=c.apply(b,e)}catch(g){return d.onError(g)}d.onNext(e)}else e.length<=1?d.onNext.apply(d,e):d.onNext(e);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},vd.fromNodeCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new we(function(d){function f(a){if(a)return void d.onError(a);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(c){try{f=c.apply(b,f)}catch(h){return d.onError(h)}d.onNext(f)}else f.length<=1?d.onNext.apply(d,f):d.onNext(f);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},Db.config.useNativeEvents=!1,vd.fromEvent=function(a,b,c){return a.addListener?fe(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):Db.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new we(function(d){return gb(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():fe(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var fe=vd.fromEventPattern=function(a,b,c){return new we(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)}var f=a(e);return Mc(function(){b&&b(e,f)})}).publish().refCount()};vd.startAsync=function(a){var b;try{b=a()}catch(c){return Qd(c)}return xd(b)};var ge=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Nc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Nc)});return new Jc(c,d,e)}function c(c,d){this.source=c,this.controller=new ze,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Dc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(vd);pd.pausable=function(a){return new ge(this,a)};var he=function(b){function c(b){var c,d=[],e=hb(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new ze,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Dc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(vd);pd.pausableBuffered=function(a){return new he(this,a)};var ie=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new je(d,e),this.source=c.multicast(this.subject).refCount()}return Dc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(vd),je=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new ze,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Nc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||_c}return Dc(c,a),Ec(c.prototype,nd,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(fd.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(fd.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(fd.createOnNext(a)):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0||this.queue.length>0&&"N"!==this.queue[0].kind;){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return{numberOfItems:a,returnValue:0!==this.queue.length}}return{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=d.numberOfItems;d.returnValue||(b.requestedCount=e,b.requestedDisposable=Mc(function(){b.requestedCount=0}))}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Nc}}),c}(vd);pd.controlled=function(a,b){return a&&Wc(a)&&(b=a,a=!0),null==a&&(a=!0),new ie(this,a,b)};var ke=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return dd.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}Dc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}Dc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;dd.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(qd);return c}(vd);ie.prototype.stopAndWait=function(){return new ke(this)};var le=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return dd.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}Dc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}Dc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;dd.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(qd);return c}(vd);ie.prototype.windowed=function(a){return new le(this,a)},pd.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},pd.multicast=function(a,b){var c=this;return"function"==typeof a?new we(function(d){var e=c.multicast(a());return new Jc(b(e).subscribe(d),e.connect())},c):new pe(c,a)},pd.publish=function(a){return a&&Mb(a)?this.multicast(function(){return new ze},a):this.multicast(new ze)},pd.share=function(){return this.publish().refCount()},pd.publishLast=function(a){return a&&Mb(a)?this.multicast(function(){return new Ae},a):this.multicast(new Ae)},pd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ne(b)},a):this.multicast(new ne(a))},pd.shareValue=function(a){return this.publishValue(a).refCount()},pd.replay=function(a,b,c,d){return a&&Mb(a)?this.multicast(function(){return new oe(b,c,d)},a):this.multicast(new oe(b,c,d))},pd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var me=function(a,b){this.subject=a,this.observer=b};me.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var ne=Db.BehaviorSubject=function(a){function c(a){return Pc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Nc):(this.observers.push(a),a.onNext(this.value),new me(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd,{getValue:function(){if(Pc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Pc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(Pc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(Pc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(vd),oe=Db.ReplaySubject=function(a){function c(a,b){return Mc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new td(this.scheduler,a),d=c(this,b);Pc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||_c,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return Dc(e,a),Ec(e.prototype,nd.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(Pc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Pc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Pc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(vd),pe=Db.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Jc(f.subscribe(c),Mc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Dc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new we(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(vd),qe=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=a)return d;for(e=1|a;e<h[h.length-1];){if(b(e))return e;e+=2}return a}function d(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Ub;a>0&&this._initialize(a),this.comparer=b||Hb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;e<b.length;++e)b[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=b[h],b[h]=g}this.buckets=b,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();pd.join=function(a,b,c,d){var e=this;return new we(function(f){var g=new Jc,h=!1,i=!1,j=0,k=0,l=new qe,m=new qe;return g.add(e.subscribe(function(a){var c=j++,e=new Qc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(Eb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new Qc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(Eb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g},e)},pd.groupJoin=function(a,b,c,d){var e=this;return new we(function(f){function g(a){return function(b){b.onError(a)}}var h=new Jc,i=new Sc(h),j=new qe,k=new qe,l=0,m=0;return h.add(e.subscribe(function(a){var c=new ze,e=l++;j.add(e,c);var m;try{m=d(a,Fc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new Qc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(Eb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new Qc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(Eb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i},e)},pd.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},pd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?jb.call(this,a):"function"==typeof a?kb.call(this,a):ib.call(this,a,b)},pd.pairwise=function(){var a=this;return new we(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},pd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},pd.letBind=pd.let=function(a){return a(this)},vd["if"]=vd.ifThen=function(a,b,c){return zd(function(){return c||(c=Bd()),Kb(b)&&(b=xd(b)),Kb(c)&&(c=xd(c)),"function"==typeof c.now&&(c=Bd(c)),a()?b:c})},vd["for"]=vd.forIn=function(a,b,c){return md(a,b,c).concat()};var re=vd["while"]=vd.whileDo=function(a,b){return Kb(b)&&(b=xd(b)),lb(a,b).concat()};pd.doWhile=function(a){return Td([this,re(a,this)])},vd["case"]=vd.switchCase=function(a,b,c){return zd(function(){Kb(c)&&(c=xd(c)),c||(c=Bd()),"function"==typeof c.now&&(c=Bd(c));var d=b[a()];return Kb(d)&&(d=xd(d)),d||c})},pd.expand=function(a,b){Wc(b)||(b=$c);var c=this;return new we(function(d){var e=[],f=new Rc,g=new Jc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new Qc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},vd.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new we(function(b){var c=a.length;if(0===c)return b.onCompleted(),Nc;for(var d=new Jc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];Kb(j)&&(j=xd(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},pd.forkJoin=function(a,b){var c=this;return new we(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Qc,l=new Qc;return Kb(a)&&(a=xd(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new Jc(k,l)},c)},pd.manySelect=function(a,b){Wc(b)||(b=$c);var c=this;return zd(function(){var d;return c.map(function(a){var b=new se(a);return d&&d.onNext(a),d=b,b}).tap(Eb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var se=function(a){function b(a){var b=this,c=new Jc;return c.add(_c.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Ae}return Dc(c,a),Ec(c.prototype,nd,{onCompleted:function(){this.onNext(vd.empty())},onError:function(a){this.onNext(vd.throwError(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(vd),te=yb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();mb.prototype.and=function(a){return new mb(this.patterns.concat(a))},mb.prototype.thenDo=function(a){return new nb(this,a)},nb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ob(a,this.expression.patterns[f],b.onError.bind(b)));var h=new pb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},pb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},pb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var ue=function(a){function b(b,c){a.call(this),this.source=b,this.onError=c,this.queue=[],this.activePlans=[],this.subscription=new Qc,this.isDisposed=!1}Dc(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.exception);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=Eb,c.completed=Eb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(qd);pd.and=function(a){return new mb([this,a])},pd.thenDo=function(a){return new mb([this]).thenDo(a)},vd.when=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new we(function(b){var c=[],d=new te,e=od(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(){b.onCompleted()});try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Qd(h).subscribe(b)}var i=new Jc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};{var ve=vd.interval=function(a,b){return tb(a,a,Wc(b)?b:dd)};vd.timer=function(b,c,d){var e;return Wc(d)||(d=dd),c!==a&&"number"==typeof c?e=c:Wc(c)&&(d=c),b instanceof Date&&e===a?qb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,rb(b.getTime(),e,d)):e===a?sb(b,d):tb(b,e,d)}}pd.delay=function(a,b){return Wc(b)||(b=dd),a instanceof Date?vb(this,a.getTime(),b):ub(this,a,b)},pd.debounce=pd.throttleWithTimeout=function(a,b){Wc(b)||(b=dd);var c=this;return new we(function(d){var e,f=new Rc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Qc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Jc(i,f)},this)},pd.throttle=function(a,b){return this.debounce(a,b)},pd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Wc(c)||(c=dd),"number"==typeof b?d=b:Wc(b)&&(d=a,c=b),new we(function(b){function f(){var a=new Qc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new ze;k.push(a),b.onNext(Fc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Rc,m=0;return g=new Jc(l),h=new Sc(g),k.push(new ze),b.onNext(Fc(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},pd.windowWithTimeOrCount=function(a,b,c){var d=this;return Wc(c)||(c=dd),new we(function(e){function f(b){var d=new Qc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new ze,e.onNext(Fc(l,i)),f(a)}}))}var g=new Rc,h=new Jc(g),i=new Sc(h),j=0,k=0,l=new ze;return e.onNext(Fc(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new ze,e.onNext(Fc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},pd.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},pd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},pd.timeInterval=function(a){var b=this;return Wc(a)||(a=dd),zd(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},pd.timestamp=function(a){return Wc(a)||(a=dd),this.map(function(b){return{value:b,timestamp:a.now()}})},pd.sample=pd.throttleLatest=function(a,b){return Wc(b)||(b=dd),"number"==typeof a?wb(this,ve(a,b)):wb(this,a)},pd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Qd(new Error(b||"Timeout"))),Wc(c)||(c=dd);
5
- var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Kb(b)&&(b=xd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Qc,j=new Rc,k=!1,l=new Rc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Jc(j,l)},d)},vd.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Wc(f)||(f=dd),new we(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},vd.generateWithRelativeTime=function(a,b,c,d,e,f){return Wc(f)||(f=dd),new we(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},pd.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return Wc(b)||(b=dd),new we(function(e){var f=new Rc;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},pd.delayWithSelector=function(a,b){var c,d,e=this;return Mb(a)?d=a:(c=a,d=b),new we(function(a){function b(){i.setDisposable(e.subscribe(function(b){var c=p(d)(b);if(c===Gc)return a.onError(c.e);var e=new Qc;g.add(e),e.setDisposable(c.subscribe(function(){a.onNext(b),g.remove(e),f()},function(b){a.onError(b)},function(){a.onNext(b),g.remove(e),f()}))},function(b){a.onError(b)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&a.onCompleted()}var g=new Jc,h=!1,i=new Rc;return c?i.setDisposable(c.subscribe(b,function(b){a.onError(b)},b)):b(),new Jc(i,g)},this)},pd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=Jd()),c||(c=Qd(new Error("Timeout")));var d=this;return new we(function(e){function f(a){function b(){return k===d}var d=k,f=new Qc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Rc,i=new Rc,j=new Qc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(Kb(c)?xd(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Jc(h,i)},d)},pd.debounceWithSelector=function(a){var b=this;return new we(function(c){var d,e=!1,f=new Rc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Kb(h)&&(h=xd(h)),e=!0,d=b,g++;var j=g,k=new Qc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new Jc(h,f)},b)},pd.throttleWithSelector=function(a){return this.debounceWithSelector(a)},pd.skipLastWithTime=function(a,b){Wc(b)||(b=dd);var c=this;return new we(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},pd.takeLastWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},pd.takeLastBufferWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},pd.takeWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){return new Jc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},pd.skipWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){var e=!1;return new Jc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},pd.skipUntilWithTime=function(a,b){Wc(b)||(b=dd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(e){var f=!1;return new Jc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},pd.takeUntilWithTime=function(a,b){Wc(b)||(b=dd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(e){return new Jc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},pd.throttleFirst=function(a,b){Wc(b)||(b=dd);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new we(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},pd.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new we(function(d){var e=a(b(d));return c.subscribe(function(a){try{e["@@transducer/step"](d,a)}catch(b){d.onError(b)}},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)},pd.exclusive=function(){var a=this;return new we(function(b){var c=!1,d=!1,e=new Qc,f=new Jc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Kb(a)&&(a=xd(a));var e=new Qc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f},this)},pd.exclusiveMap=function(a,b){var c=this,d=cc(a,b,3);return new we(function(a){var b=0,e=!1,f=!0,g=new Qc,h=new Jc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Qc,h.add(innerSubscription),Kb(c)&&(c=xd(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},Db.VirtualTimeScheduler=function(a){function b(){return this.toDateTimeOffset(this.clock)}function c(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function d(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function f(a,b){return b(),Nc}function g(f,g){this.clock=f,this.comparer=g,this.isEnabled=!1,this.queue=new Hc(1024),a.call(this,b,c,d,e)}Dc(g,a);var h=g.prototype;return h.add=Xb,h.toDateTimeOffset=Xb,h.toRelative=Xb,h.schedulePeriodicWithState=function(a,b,c){var d=new Zc(this,a,b,c);return d.start()},h.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},h.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,f)},h.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},h.stop=function(){this.isEnabled=!1},h.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Ub;if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},h.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Ub;0!==c&&this.advanceTo(b)},h.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Ub;this.clock=b},h.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},h.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,f)},h.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new Tc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},g}(Uc),Db.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Ib;a.call(this,d,e)}Dc(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(Db.VirtualTimeScheduler);var we=Db.AnonymousObservable=function(a){function b(a){return a&&Mb(a.dispose)?a:Mb(a)?Mc(a):Nc}function c(a,c){var d=c[0],e=c[1],f=p(e)(d);return f!==Gc||d.fail(Gc.e)?void d.setDisposable(b(f)):q(Gc.e)}function d(b,d){function e(a){var d=new xe(a),e=[d,b];return _c.scheduleRequired()?_c.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Dc(d,a),d}(vd),xe=function(a){function b(b){a.call(this),this.observer=b,this.m=new Qc}Dc(b,a);var c=b.prototype;return c.next=function(a){var b=p(this.observer.onNext).call(this.observer,a);b===Gc&&(this.dispose(),q(b.e))},c.error=function(a){var b=p(this.observer.onError).call(this.observer,a);this.dispose(),b===Gc&&q(b.e)},c.completed=function(){var a=p(this.observer.onCompleted).call(this.observer);this.dispose(),a===Gc&&q(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(qd),ye=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new we(function(a){return new Jc(e.getDisposable(),d.subscribe(a))}):d}return Dc(c,a),c}(vd),ze=Db.Subject=function(a){function c(a){return Pc(this),this.isStopped?this.hasError?(a.onError(this.error),Nc):(a.onCompleted(),Nc):(this.observers.push(a),new me(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Pc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(Pc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(Pc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Be(a,b)},d}(vd),Ae=Db.AsyncSubject=function(a){function c(a){return Pc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Nc):(this.observers.push(a),new me(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd,{hasObservers:function(){return Pc(this),this.observers.length>0},onCompleted:function(){var a,c;if(Pc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(Pc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){Pc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(vd),Be=Db.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Dc(c,a),Ec(c.prototype,nd.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(vd);Db.Pauser=function(a){function b(){a.call(this)}return Dc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ze),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(yb.Rx=Db,define(function(){return Db})):zb&&Ab?Bb?(Ab.exports=Db).Rx=Db:zb.Rx=Db:yb.Rx=Db;var Ce=g()}).call(this);
2
+ (function(a){function b(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function c(){try{return xb.apply(this,arguments)}catch(a){return Pb.e=a,Pb}}function d(a){if(!Ob(a))throw new TypeError("fn must be a function");return xb=a,c}function e(a){throw a}function f(a,b){if(Qb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Ub)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+Ub+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===Sb&&d>=Tb&&Ye>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(Qb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return Sb=d[0],d[1]}}function k(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function l(a){var b=[];if(!Cc(a))return b;Bc.nonEnumArgs&&a.length&&Dc(a)&&(a=Fc.call(a));var c=Bc.enumPrototypes&&"function"==typeof a,d=Bc.enumErrorProps&&(a===vc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Bc.nonEnumShadows&&a!==wc){var f=a.constructor,g=-1,h=hc;if(a===(f&&f.prototype))var i=a===xc?rc:a===vc?mc:sc.call(a),j=Ac[i];for(;++g<h;)e=gc[g],j&&j[e]||!tc.call(a,e)||b.push(e)}return b}function m(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function n(a,b){return m(a,b,l)}function o(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function p(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=sc.call(a),h=sc.call(b);if(g==ic&&(g=pc),h==ic&&(h=pc),g!=h)return!1;switch(g){case kc:case lc:return+a==+b;case oc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case qc:case rc:return a==String(b)}var i=g==jc;if(!i){if(g!=pc||!Bc.nodeClass&&(o(a)||o(b)))return!1;var j=!Bc.argsObject&&Dc(a)?Object:a.constructor,k=!Bc.argsObject&&Dc(b)?Object:b.constructor;if(!(j==k||tc.call(a,"constructor")&&tc.call(b,"constructor")||Ob(j)&&j instanceof j&&Ob(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var l=c.length;l--;)if(c[l]==a)return d[l]==b;var m=0,q=!0;if(c.push(a),d.push(b),i){if(l=a.length,m=b.length,q=m==l)for(;m--;){var r=b[m];if(!(q=p(a[m],r,c,d)))break}}else n(b,function(b,e,f){return tc.call(f,e)?(m++,q=tc.call(a,e)&&p(a[e],b,c,d)):void 0}),q&&n(a,function(a,b,c){return tc.call(c,b)?q=--m>-1:void 0});return c.pop(),d.pop(),q}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a,b){this.id=a,this.value=b}function s(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(a){this._s=a}function v(a){this._s=a,this._l=a.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&Fb.isFinite(a)}function z(b){var c,d=b[ac];if(!d&&"string"==typeof b)return c=new u(b),c[ac]();if(!d&&b.length!==a)return c=new w(b),c[ac]();if(!d)throw new TypeError("Object is not iterable");return b[ac]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Md?Md:b):b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return Yc(a)||(a=bd),new Od(b,a)}function E(a,b){this.observer=a,this.parent=b}function F(a,b){this.observer=a,this.parent=b}function G(a,b){return a.amb(b)}function H(a,b){return new Se(function(c){var d=new Sc,e=new Tc;return e.setDisposable(d),d.setDisposable(a.subscribe(new $d(c,e,b))),e},a)}function I(){return!1}function J(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function I(){return!1}function I(){return!1}function K(){return[]}function J(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function I(){return!1}function K(){return[]}function J(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function L(a){return function(b){return a.subscribe(b)}}function M(a){return a.toArray()}function N(a){return a.length>0}function O(a,b){this.o=a,this.accumulator=b.accumulator,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.accumulation=null,this.hasValue=!1,this.isStopped=!1}function P(a,b,c){var d=fc(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Nb(e)&&(e=Ed(e)),(dc(e)||cc(e))&&(e=Nd(e)),e}).concatAll()}function Q(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function R(a){this.comparer=a,this.set=[]}function S(b,c){return function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e}}function T(a,b,c){return new Se(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function U(a){if(0===a.length)throw new Vb;return a[0]}function V(b,c,d,e){var f=fc(c,d,3);return new Se(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function W(a){return a?td.isObservable(a)?a:Nb(a)?td.fromPromise(a):_(a)||$(a)?ze.call(this,a):Ob(a)?Z.call(this,a):dc(a)||cc(a)?X.call(this,a):Cc(a)?Y.call(this,a):a:a}function X(a){return td.from(a).flatMap(W).toArray()}function Y(b){function c(b,c){d[c]=a,f.push(b.map(function(a){d[c]=a}))}for(var d=new b.constructor,e=Object.keys(b),f=[],g=0,h=e.length;h>g;g++){var i=e[g],j=W.call(this,b[i]);j&&td.isObservable(j)?c(j,i):d[i]=b[i]}return td.forkJoin.apply(td,f).map(function(){return d})}function Z(a){var b=this;return new Se(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function $(a){return Ob(a.next)&&Ob(a.throw)}function _(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:$(b.prototype):!1}function ab(a,b,c,d){var e=new We;return d.push(bb(e,b,c)),a.apply(b,d),e.asObservable()}function bb(a,b,c){return function(){for(var e=arguments.length,f=new Array(e),g=0;e>g;g++)f[g]=arguments[g];if(Ob(c)){if(f=d(c).apply(b,f),f===Pb)return a.onError(f.e);a.onNext(f)}else a.onNext(f.length<=1?f[0]:f);a.onCompleted()}}function cb(a,b,c,d){var e=new We;return d.push(db(e,b,c)),a.apply(b,d),e.asObservable()}function db(a,b,c){return function(){var e=arguments[0];if(e)return a.onError(e);for(var f=arguments.length,g=[],h=1;f>h;h++)g[h-1]=arguments[h];if(Ob(c)){var g=d(c).apply(b,g);if(g===Pb)return a.onError(g.e);a.onNext(g)}else a.onNext(g.length<=1?g[0]:g);a.onCompleted()}}function eb(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function fb(a,b,c){var d=new Lc,e=Object.prototype.toString.call(a);if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(fb(a.item(f),b,c));else a&&d.add(new eb(a,b,c));return d}function gb(a,b){return function(){var c=arguments[0];return Ob(b)&&(c=d(b).apply(null,arguments),c===Pb)?a.onError(c.e):void a.onNext(c)}}function hb(a,b,c){return new Se(function(e){function f(a,b){if(k[b]=a,h[b]=!0,i||(i=h.every(Ib))){if(g)return e.onError(g);var f=d(c).apply(null,k);if(f===Pb)return e.onError(f.e);e.onNext(f)}j&&k[1]&&e.onCompleted()}var g,h=[!1,!1],i=!1,j=!1,k=new Array(2);return new Lc(a.subscribe(function(a){f(a,0)},function(a){k[1]?e.onError(a):g=a},function(){j=!0,k[1]&&e.onCompleted()}),b.subscribe(function(a){f(a,1)},function(a){e.onError(a)},function(){j=!0,f(!0,1)}))},a)}function M(a){return a.toArray()}function ib(a,b){return a.groupJoin(this,b,Jd,function(a,b){return b})}function jb(a){var b=this;return new Se(function(c){var d=new Ve,e=new Lc,f=new Uc(e);return c.onNext(Ic(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Nb(a)&&(a=Ed(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new Ve,c.onNext(Ic(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function kb(a){var b=this;return new Se(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Nb(b)&&(b=Ed(b));var i=new Sc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Hb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new Ve,c.onNext(Ic(h,g)),d()}))}var e=new Tc,f=new Lc(e),g=new Uc(f),h=new Ve;return c.onNext(Ic(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function lb(a,b){return new Me(a,b)}function mb(a){this.patterns=a}function nb(a,b){this.expression=a,this.selector=b}function ob(a,b,c){var d=a.get(b);if(!d){var e=new Qe(b,c);return a.set(b,e),e}return d}function pb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Pe;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function qb(a,b){return new Se(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function rb(a,b,c){return new Se(function(d){var e=a,f=Xc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function sb(a,b){return new Se(function(c){return b.scheduleWithRelative(Xc(a),function(){c.onNext(0),c.onCompleted()})})}function tb(a,b,c){return a===b?new Se(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Gd(function(){return rb(c.now()+a,b,c)})}function ub(a,b,c){return new Se(function(d){var e,f=!1,g=new Tc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Sc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Lc(e,g)},a)}function vb(a,b,c){return Gd(function(){return ub(a,b-c.now(),c)})}function M(a){return a.toArray()}function M(a){return a.toArray()}function wb(a,b){return new Se(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new Sc;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new Lc(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}var xb,yb={"function":!0,object:!0},zb=yb[typeof exports]&&exports&&!exports.nodeType&&exports,Ab=yb[typeof self]&&self.Object&&self,Bb=yb[typeof window]&&window&&window.Object&&window,Cb=yb[typeof module]&&module&&!module.nodeType&&module,Db=Cb&&Cb.exports===zb&&zb,Eb=zb&&Cb&&"object"==typeof global&&global&&global.Object&&global,Fb=Fb=Eb||Bb!==(this&&this.window)&&Bb||Ab||this,Gb={internals:{},config:{Promise:Fb.Promise},helpers:{}},Hb=Gb.helpers.noop=function(){},Ib=Gb.helpers.identity=function(a){return a},Jb=Gb.helpers.defaultNow=Date.now,Kb=Gb.helpers.defaultComparer=function(a,b){return Ec(a,b)},Lb=Gb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Mb=(Gb.helpers.defaultKeySerializer=function(a){return a.toString()},Gb.helpers.defaultError=function(a){throw a}),Nb=Gb.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},Ob=Gb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==sc.call(a)}),a}(),Pb={e:{}};Gb.config.longStackSupport=!1;var Qb=!1,Rb=d(function(){throw new Error})();Qb=!!Rb.e&&!!Rb.e.stack;var Sb,Tb=j(),Ub="From previous event:",Vb=Gb.EmptyError=function(){this.message="Sequence contains no elements.",this.name="EmptyError",Error.call(this)};Vb.prototype=Error.prototype;var Wb=Gb.ObjectDisposedError=function(){this.message="Object has been disposed",this.name="ObjectDisposedError",Error.call(this)};Wb.prototype=Error.prototype;var Xb=Gb.ArgumentOutOfRangeError=function(){this.message="Argument out of range",this.name="ArgumentOutOfRangeError",Error.call(this)};Xb.prototype=Error.prototype;var Yb=Gb.NotSupportedError=function(a){this.message=a||"This operation is not supported",this.name="NotSupportedError",Error.call(this)};Yb.prototype=Error.prototype;var Zb=Gb.NotImplementedError=function(a){this.message=a||"This operation is not implemented",this.name="NotImplementedError",Error.call(this)};Zb.prototype=Error.prototype;var $b=Gb.helpers.notImplemented=function(){throw new Zb},_b=Gb.helpers.notSupported=function(){throw new Yb},ac="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";Fb.Set&&"function"==typeof(new Fb.Set)["@@iterator"]&&(ac="@@iterator");var bc=Gb.doneEnumerator={done:!0,value:a},cc=Gb.helpers.isIterable=function(b){return b[ac]!==a},dc=Gb.helpers.isArrayLike=function(b){return b&&b.length!==a};Gb.helpers.iterator=ac;var ec,fc=Gb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},gc=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],hc=gc.length,ic="[object Arguments]",jc="[object Array]",kc="[object Boolean]",lc="[object Date]",mc="[object Error]",nc="[object Function]",oc="[object Number]",pc="[object Object]",qc="[object RegExp]",rc="[object String]",sc=Object.prototype.toString,tc=Object.prototype.hasOwnProperty,uc=sc.call(arguments)==ic,vc=Error.prototype,wc=Object.prototype,xc=String.prototype,yc=wc.propertyIsEnumerable;try{ec=!(sc.call(document)==pc&&!({toString:0}+""))}catch(zc){ec=!0}var Ac={};Ac[jc]=Ac[lc]=Ac[oc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Ac[kc]=Ac[rc]={constructor:!0,toString:!0,valueOf:!0},Ac[mc]=Ac[nc]=Ac[qc]={constructor:!0,toString:!0},Ac[pc]={constructor:!0};var Bc={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Bc.enumErrorProps=yc.call(vc,"message")||yc.call(vc,"name"),Bc.enumPrototypes=yc.call(a,"prototype"),Bc.nonEnumArgs=0!=c,Bc.nonEnumShadows=!/valueOf/.test(b)}(1);var Cc=Gb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Dc=function(a){return a&&"object"==typeof a?sc.call(a)==ic:!1};uc||(Dc=function(a){return a&&"object"==typeof a?tc.call(a,"callee"):!1});var Ec=Gb.internals.isEqual=function(a,b){return p(a,b,[],[])},Fc=({}.hasOwnProperty,Array.prototype.slice),Gc=Gb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Hc=Gb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Ic=Gb.internals.addRef=function(a,b){return new Se(function(c){return new Lc(b.getDisposable(),a.subscribe(c))})};r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Jc=Gb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Kc=Jc.prototype;Kc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Kc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Kc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Kc.peek=function(){return this.items[0].value},Kc.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Kc.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Kc.enqueue=function(a){var b=this.length++;this.items[b]=new r(Jc.count++,a),this.percolate(b)},Kc.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Jc.count=0;var Lc=Gb.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!Qc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},Mc=Lc.prototype;Mc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Mc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Mc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var Nc=Gb.Disposable=function(a){this.isDisposed=!1,this.action=a||Hb};Nc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Oc=Nc.create=function(a){return new Nc(a)},Pc=Nc.empty={dispose:Hb},Qc=Nc.isDisposable=function(a){return a&&Ob(a.dispose)},Rc=Nc.checkDisposed=function(a){if(a.isDisposed)throw new Wb},Sc=Gb.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Sc.prototype.getDisposable=function(){return this.current},Sc.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Sc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Tc=Gb.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Tc.prototype.getDisposable=function(){return this.current},Tc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Tc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Uc=Gb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Pc:new a(this)},b}();s.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Vc=Gb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Lb,this.disposable=new Sc};Vc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Vc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Vc.prototype.isCancelled=function(){return this.disposable.isDisposed},Vc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Wc=Gb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Pc}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=Jb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Xc=Wc.normalize,Yc=Wc.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),Pc}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new Lc;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),Pc}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new Lc;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(Wc.prototype),function(){Wc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Wc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof Fb.setInterval)throw new Yb;b=Xc(b);var d=a,e=Fb.setInterval(function(){d=c(d)},b);return Oc(function(){Fb.clearInterval(e)})}}(Wc.prototype),function(a){a.catchError=a["catch"]=function(a){return new gd(this,a)}}(Wc.prototype);var Zc,$c,_c=Gb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Sc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),ad=Wc.immediate=function(){function a(a,b){return b(this,a)}return new Wc(Jb,a,_b,_b)}(),bd=Wc.currentThread=function(){function a(){for(;c.length>0;){var a=c.shift();!a.isCancelled()&&a.invoke()}}function b(b,f){var g=new Vc(this,b,f,this.now());if(c)c.push(g);else{c=[g];var h=d(a)();if(c=null,h===Pb)return e(h.e)}return g.disposable}var c,f=new Wc(Jb,b,_b,_b);return f.scheduleRequired=function(){return!c},f}(),cd=function(){var a,b=Hb;if(Fb.setTimeout)a=Fb.setTimeout,b=Fb.clearTimeout;else{if(!Fb.WScript)throw new Yb;a=function(a,b){Fb.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),dd=cd.setTimeout,ed=cd.clearTimeout;!function(){function a(b){if(h)dd(function(){a(b)},0);else{var c=g[b];if(c){h=!0;var f=d(c)();if($c(b),h=!1,f===Pb)return e(f.e)}}}function b(){if(!Fb.postMessage||Fb.importScripts)return!1;var a=!1,b=Fb.onmessage;return Fb.onmessage=function(){a=!0},Fb.postMessage("","*"),Fb.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,k.length)===k&&a(b.data.substring(k.length))}var f=1,g={},h=!1;$c=function(a){delete g[a]};var i=RegExp("^"+String(sc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),j="function"==typeof(j=Eb&&Db&&Eb.setImmediate)&&!i.test(j)&&j;if(Ob(j))Zc=function(b){var c=f++;return g[c]=b,j(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Zc=function(b){var c=f++;return g[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var k="ms.rx.schedule"+Math.random();Fb.addEventListener?Fb.addEventListener("message",c,!1):Fb.attachEvent?Fb.attachEvent("onmessage",c):Fb.onmessage=c,Zc=function(a){var b=f++;return g[b]=a,Fb.postMessage(k+currentId,"*"),b}}else if(Fb.MessageChannel){var l=new Fb.MessageChannel;l.port1.onmessage=function(b){a(b.data)},Zc=function(a){var b=f++;return g[b]=a,l.port2.postMessage(b),b}}else Zc="document"in Fb&&"onreadystatechange"in Fb.document.createElement("script")?function(b){var c=Fb.document.createElement("script"),d=f++;return g[d]=b,c.onreadystatechange=function(){a(d),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},Fb.document.documentElement.appendChild(c),d}:function(b){var c=f++;return g[c]=b,dd(function(){a(c)},0),c}}();var fd=Wc.timeout=Wc["default"]=function(){function a(a,b){var c=this,d=new Sc,e=Zc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new Lc(d,Oc(function(){$c(e)}))}function b(a,b,c){var d=this,e=Wc.normalize(b),f=new Sc;if(0===e)return d.scheduleWithState(a,c);var g=dd(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new Lc(f,Oc(function(){ed(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Wc(Jb,a,b,c)}(),gd=function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Gc(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Pc}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Sc;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Wc),hd=Gb.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Yc(a)||(a=ad),new Se(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),id=hd.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new hd("N",d,null,a,b,c)}}(),jd=hd.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new hd("E",null,d,a,b,c)}}(),kd=hd.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new hd("C",null,null,a,b,c)}}(),ld=Gb.Observer=function(){};ld.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},ld.prototype.asObserver=function(){var a=this;return new pd(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},ld.prototype.checked=function(){return new qd(this)};var md=ld.create=function(a,b,c){return a||(a=Hb),b||(b=Mb),c||(c=Hb),new pd(a,b,c)};ld.fromNotifier=function(a,b){var c=fc(a,b,1);return new pd(function(a){return c(id(a))},function(a){return c(jd(a))},function(){return c(kd())})},ld.prototype.notifyOn=function(a){return new sd(a,this)},ld.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var nd,od=Gb.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return Gc(b,a),b.prototype.next=$b,b.prototype.error=$b,b.prototype.completed=$b,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(ld),pd=Gb.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Gc(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(od),qd=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Gc(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=d(this._observer.onNext).call(this._observer,a);this._state=0,b===Pb&&e(b.e)},c.onError=function(a){this.checkAccess();var b=d(this._observer.onError).call(this._observer,a);this._state=2,b===Pb&&e(b.e)},c.onCompleted=function(){this.checkAccess();var a=d(this._observer.onCompleted).call(this._observer);this._state=2,a===Pb&&e(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(ld),rd=Gb.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new Tc}return Gc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var f=d(c)();return f===Pb?(a.queue=[],a.hasFaulted=!0,e(f.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(od),sd=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Gc(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(rd),td=Gb.Observable=function(){function a(a,b){return function(c){var d=c.onError;
3
+ return c.onError=function(b){f(b,a),d.call(c,b)},b.call(a,c)}}function b(b){if(Gb.config.longStackSupport&&Qb){var c=d(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return nd=b.prototype,b.isObservable=function(a){return a&&Ob(a.subscribe)},nd.subscribe=nd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:md(a,b,c))},nd.subscribeOnNext=function(a,b){return this._subscribe(md("undefined"!=typeof b?function(c){a.call(b,c)}:a))},nd.subscribeOnError=function(a,b){return this._subscribe(md(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},nd.subscribeOnCompleted=function(a,b){return this._subscribe(md(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),ud=Gb.ObservableBase=function(a){function b(a){return a&&Ob(a.dispose)?a:Ob(a)?Oc(a):Pc}function c(a,c){var f=c[0],g=c[1],h=d(g.subscribeCore).call(g,f);return h!==Pb||f.fail(Pb.e)?void f.setDisposable(b(h)):e(Pb.e)}function f(a){var b=new Te(a),d=[b,this];return bd.scheduleRequired()?bd.scheduleWithState(d,c):c(null,d),b}function g(){a.call(this,f)}return Gc(g,a),g.prototype.subscribeCore=$b,g}(td),vd=function(a){function b(b,c,d,e){this.resultSelector=Gb.helpers.isFunction(d)?d:null,this.selector=Gb.internals.bindCallback(Gb.helpers.isFunction(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.isStopped=!1,this.o=a}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.onNext=function(a){if(!this.isStopped){var b=this.i++,c=d(this.selector)(a,b,this.source);if(c===Pb)return this.o.onError(c.e);Gb.helpers.isPromise(c)&&(c=Gb.Observable.fromPromise(c)),(Gb.helpers.isArrayLike(c)||Gb.helpers.isIterable(c))&&(c=Gb.Observable.from(c)),this.o.onNext(this._wrapResult(c,a,b))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},b}(ud),wd=Gb.internals.Enumerable=function(){},xd=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b,c){this.o=a,this.s=b,this.e=c,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){var b,e=new Tc,f=ad.scheduleRecursiveWithState(this.sources[ac](),function(f,g){if(!b){var h=d(f.next).call(f);if(h===Pb)return a.onError(h.e);if(h.done)return a.onCompleted();var i=h.value;Nb(i)&&(i=Ed(i));var j=new Sc;e.setDisposable(j),j.setDisposable(i.subscribe(new c(a,g,f)))}});return new Lc(e,f,Oc(function(){b=!0}))},c.prototype.onNext=function(a){this.isStopped||this.o.onNext(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.s(this.e))},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);wd.prototype.concat=function(){return new xd(this)};var yd=function(a){function b(b){this.sources=b,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b,c=this.sources[ac](),e=new Tc,f=ad.scheduleRecursiveWithState(null,function(f,g){if(!b){var h=d(c.next).call(c);if(h===Pb)return a.onError(h.e);if(h.done)return null!==f?a.onError(f):a.onCompleted();var i=h.value;Nb(i)&&(i=Ed(i));var j=new Sc;e.setDisposable(j),j.setDisposable(i.subscribe(function(b){a.onNext(b)},g,function(){a.onCompleted()}))}});return new Lc(e,f,Oc(function(){b=!0}))},b}(ud);wd.prototype.catchError=function(){return new yd(this)},wd.prototype.catchErrorWhen=function(a){var b=this;return new Se(function(c){var e,f,g=new Ve,h=new Ve,i=a(g),j=i.subscribe(h),k=b[ac](),l=new Tc,m=ad.scheduleRecursive(function(a){if(!e){var b=d(k.next).call(k);if(b===Pb)return c.onError(b.e);if(b.done)return void(f?c.onError(f):c.onCompleted());var i=b.value;Nb(i)&&(i=Ed(i));var j=new Sc,m=new Sc;l.setDisposable(new Lc(m,j)),j.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(h.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),g.onNext(b)},function(){c.onCompleted()}))}});return new Lc(j,l,m,Oc(function(){e=!0}))})};var zd=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return Gc(b,a),b.prototype[ac]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?bc:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(wd),Ad=wd.repeat=function(a,b){return new zd(a,b)},Bd=function(a){function b(a,b,c){this.s=a,this.fn=b?fc(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return Gc(b,a),b.prototype[ac]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:bc},b}(wd),Cd=wd.of=function(a,b,c){return new Bd(a,b,c)};nd.observeOn=function(a){var b=this;return new Se(function(c){return b.subscribe(new sd(a,c))},b)},nd.subscribeOn=function(a){var b=this;return new Se(function(c){var d=new Sc,e=new Tc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new s(a,b.subscribe(c)))})),e},b)};var Dd=function(a){function b(b){this.p=b,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.p.then(function(b){a.onNext(b),a.onCompleted()},function(b){a.onError(b)}),Pc},b}(ud),Ed=td.fromPromise=function(a){return new Dd(a)};nd.toPromise=function(a){if(a||(a=Gb.config.Promise),!a)throw new Yb("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})};var Fd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=function(a){this.isStopped||this.a.push(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onNext(this.a),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.toArray=function(){return new Fd(this)},td.create=function(a,b){return new Se(a,b)};var Gd=td.defer=function(a){return new Se(function(b){var c;try{c=a()}catch(d){return Zd(d).subscribe(b)}return Nb(c)&&(c=Ed(c)),c.subscribe(b)})},Hd=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),Pc}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){return this.scheduler.scheduleWithState(this.observer,d)},b}(ud),Id=new Hd(ad),Jd=td.empty=function(a){return Yc(a)||(a=ad),a===ad?Id:new Hd(a)},Kd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new Ld(a,this);return b.run()},b}(ud),Ld=function(){function a(a,b){this.o=a,this.parent=b}return a.prototype.run=function(){function a(a,b){var g=d(c.next).call(c);if(g===Pb)return e.onError(g.e);if(g.done)return e.onCompleted();var h=g.value;return Ob(f)&&(h=d(f)(h,a),h===Pb)?e.onError(h.e):(e.onNext(h),void b(a+1))}var b=Object(this.parent.iterable),c=z(b),e=this.o,f=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Md=Math.pow(2,53)-1;u.prototype[ac]=function(){return new v(this._s)},v.prototype[ac]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:bc},w.prototype[ac]=function(){return new x(this._a)},x.prototype[ac]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:bc};var Nd=td.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!Ob(b))throw new Error("mapFn when provided must be a function");if(b)var e=fc(b,c,2);return Yc(d)||(d=bd),new Kd(a,e,d)},Od=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(ud);C.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var Pd=td.fromArray=function(a,b){return Yc(b)||(b=bd),new Od(a,b)};td.generate=function(a,b,c,d,e){return Yc(e)||(e=bd),new Se(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},td.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Od(b,bd)},td.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Od(c,a)},td.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Se(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},td.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Object.observe is not supported on your platform");return new Se(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var Qd=function(a){function b(){a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(){return Pc},b}(ud),Rd=new Qd,Sd=td.never=function(){return Rd},Td=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(ud);E.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},td.pairs=function(a,b){return b||(b=bd),new Td(a,b)};var Ud=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new Vd(a,this);return b.run()},b}(ud),Vd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.rangeCount,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();td.range=function(a,b,c){return Yc(c)||(c=bd),new Ud(a,b,c)};var Wd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new F(a,this);return b.run()},b}(ud);F.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},td.repeat=function(a,b,c){return Yc(c)||(c=bd),new Wd(a,b,c)};var Xd=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b,c){this.observer=a,this.value=b,this.scheduler=c}function d(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),Pc}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.value,this.scheduler);return b.run()},c.prototype.run=function(){var a=[this.value,this.observer];return this.scheduler===ad?d(null,a):this.scheduler.scheduleWithState(a,d)},b}(ud),Yd=(td["return"]=td.just=function(a,b){return Yc(b)||(b=ad),new Xd(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],d)},b}(ud)),Zd=td["throw"]=function(a,b){return Yc(b)||(b=ad),new Yd(a,b)};td.using=function(a,b){return new Se(function(c){var e=Pc,f=d(a)();if(f===Pb)return new Lc(Zd(f.e).subscribe(c),e);f&&(e=f);var g=d(b)(f);return g===Pb?new Lc(Zd(g.e).subscribe(c),e):new Lc(g.subscribe(c),e)})},nd.amb=function(a){var b=this;return new Se(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Sc,j=new Sc;Nb(a)&&(a=Ed(a));var k=md(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=md(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new Lc(i,j)})},td.amb=function(){var a,b=Sd();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=G(b,a[d]);return b};var $d=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return Gc(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=d(this._fn)(a);if(b===Pb)return this._o.onError(b.e);Nb(b)&&(b=Ed(b));var c=new Sc;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(od);nd["catch"]=function(a){return Ob(a)?H(this,a):_d([this,a])};var _d=td["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return Cd(a).catchError()};nd.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),ae.apply(this,b)};var ae=td.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=Ob(b[a-1])?b.pop():J;return Array.isArray(b[0])&&(b=b[0]),new Se(function(a){function c(b){if(g[b]=!0,h||(h=g.every(Ib))){try{var c=d.apply(null,j)}catch(e){return a.onError(e)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(Ib)&&a.onCompleted()}function e(b){i[b]=!0,i.every(Ib)&&a.onCompleted()}for(var f=b.length,g=q(f,I),h=!1,i=q(f,I),j=new Array(f),k=new Array(f),l=0;f>l;l++)!function(d){var f=b[d],g=new Sc;Nb(f)&&(f=Ed(f)),g.setDisposable(f.subscribe(function(a){j[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),k[d]=g}(l);return new Lc(k)},this)};nd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),ce.apply(null,a)};var be=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new Tc,c=this.sources,d=c.length,e=this.o,f=ad.scheduleRecursiveWithState(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];Nb(h)&&(h=Ed(h));var i=new Sc;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new Lc(b,f,Oc(function(){a=!0}))},b}(ud),ce=td.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new be(a)};nd.concatAll=function(){return this.merge(1)};var de=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new Lc;return b.add(this.source.subscribe(new ee(a,this.maxConcurrent,b))),b},b}(ud),ee=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new Sc;this.g.add(c),Nb(a)&&(a=Ed(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();nd.merge=function(a){return"number"!=typeof a?fe(this,a):new de(this,a)};var fe=td.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Yc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=ad,b=0;d>b;b++)c.push(arguments[b]);else for(a=ad,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),D(a,c).mergeAll()},ge=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new Lc,d=new Sc;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype.onNext=function(a){if(!this.isStopped){var b=new Sc;this.g.add(b),Nb(a)&&(a=Ed(a)),b.setDisposable(a.subscribe(new d(this,b)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},d.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(ud);nd.mergeAll=function(){return new ge(this)};var he=Gb.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};he.prototype=Error.prototype,td.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=D(null,a);return new Se(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new he(g))}var c=new Lc,e=new Sc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new Sc;c.add(e),Nb(d)&&(d=Ed(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})},nd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return ie([this,a])};var ie=td.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Se(function(b){var c=0,d=new Tc,e=ad.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],Nb(f)&&(f=Ed(f)),g=new Sc,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new Lc(d,e)})};nd.skipUntil=function(a){var b=this;return new Se(function(c){var d=!1,e=new Lc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));Nb(a)&&(a=Ed(a));var f=new Sc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)};var je=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,this.isStopped=!1}function d(a,b){this.parent=a,this.id=b,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){var b=new Tc,d=this.source.subscribe(new c(a,b));return new Lc(d,b)},c.prototype.onNext=function(a){if(!this.isStopped){var b=new Sc,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),Nb(a)&&(a=Ed(a)),b.setDisposable(a.subscribe(new d(this,c)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.stopped=!0,!this.hasLatest&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&this.parent.o.onError(a))},d.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.isStopped&&this.parent.o.onCompleted()))},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(ud);nd["switch"]=nd.switchLatest=function(){return new je(this)};var ke=function(a){function b(b,c){this.source=b,this.other=Nb(c)?Ed(c):c,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return new Lc(this.source.subscribe(a),this.other.subscribe(new c(a)))},c.prototype.onNext=function(){this.isStopped||this.o.onCompleted()},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){!this.isStopped&&(this.isStopped=!0)},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.takeUntil=function(a){return new ke(this,a)},nd.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=b.pop(),f=this;return Array.isArray(b[0])&&(b=b[0]),new Se(function(a){for(var c=b.length,g=q(c,I),h=!1,i=new Array(c),j=new Array(c+1),k=0;c>k;k++)!function(c){var d=b[c],e=new Sc;Nb(d)&&(d=Ed(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Ib)},function(b){a.onError(b)},Hb)),j[c]=e}(k);var l=new Sc;return l.setDisposable(f.subscribe(function(b){var c=[b].concat(i);if(h){var f=d(e).apply(null,c);return f===Pb?a.onError(f.e):void a.onNext(f)}},function(b){a.onError(b)},function(){a.onCompleted()})),j[c]=l,new Lc(j)},this)},nd.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=Ob(b[a-1])?b.pop():J;Array.isArray(b[0])&&(b=b[0]);var f=this;return b.unshift(f),new Se(function(a){for(var c=b.length,g=q(c,K),h=q(c,I),i=new Array(c),j=0;c>j;j++)!function(c){var j=b[c],k=new Sc;Nb(j)&&(j=Ed(j)),k.setDisposable(j.subscribe(function(b){if(g[c].push(b),g.every(function(a){return a.length>0})){var i=g.map(function(a){return a.shift()}),j=d(e).apply(f,i);if(j===Pb)return a.onError(j.e);a.onNext(j)}else h.filter(function(a,b){return b!==c}).every(Ib)&&a.onCompleted()},function(b){a.onError(b)},function(){h[c]=!0,h.every(Ib)&&a.onCompleted()})),i[c]=k}(j);return new Lc(i)},f)},td.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},nd.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var e=Ob(b[a-1])?b.pop():J,f=this;return b.unshift(f),new Se(function(a){for(var c=b.length,g=q(c,K),h=q(c,I),i=new Array(c),j=0;c>j;j++)!function(c){var j=b[c],k=new Sc;(dc(j)||cc(j))&&(j=Nd(j)),k.setDisposable(j.subscribe(function(b){if(g[c].push(b),g.every(function(a){return a.length>0})){var i=g.map(function(a){return a.shift()}),j=d(e).apply(f,i);if(j===Pb)return a.onError(j.e);a.onNext(j)}else h.filter(function(a,b){return b!==c}).every(Ib)&&a.onCompleted()},function(b){a.onError(b)},function(){h[c]=!0,h.every(Ib)&&a.onCompleted()})),i[c]=k}(j);return new Lc(i)},f)},nd.asObservable=function(){return new Se(L(this),this)},nd.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(M).filter(N)},nd.dematerialize=function(){var a=this;return new Se(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)};var le=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new me(a,this.keyFn,this.comparer))},b}(ud),me=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return Gc(b,a),b.prototype.next=function(a){var b,c=a;return Ob(this.keyFn)&&(c=d(this.keyFn)(a),c===Pb)?this.o.onError(c.e):this.hasCurrentKey&&(b=d(this.comparer)(this.currentKey,c),b===Pb)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(od);nd.distinctUntilChanged=function(a,b){return b||(b=Kb),new le(this,a,b)};var ne=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||Ob(b._oN)?md(b._oN||Hb,b._oE||Hb,b._oC||Hb):b._oN,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.t.onNext).call(this.t,a);b===Pb&&this.o.onError(b.e),this.o.onNext(a)}},c.prototype.onError=function(a){if(!this.isStopped){this.isStopped=!0;var b=d(this.t.onError).call(this.t,a);if(b===Pb)return this.o.onError(b.e);this.o.onError(a)}},c.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=d(this.t.onCompleted).call(this.t);if(a===Pb)return this.o.onError(a.e);this.o.onCompleted()}},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd["do"]=nd.tap=nd.doAction=function(a,b,c){return new ne(this,a,b,c)},nd.doOnNext=nd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},nd.doOnError=nd.tapOnError=function(a,b){return this.tap(Hb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},nd.doOnCompleted=nd.tapOnCompleted=function(a,b){return this.tap(Hb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},nd["finally"]=function(a){var b=this;return new Se(function(c){var f=d(b.subscribe).call(b,c);return f===Pb?(a(),e(f.e)):Oc(function(){var b=d(f.dispose).call(f);a(),b===Pb&&e(b.e)})},this)};var oe=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=Hb,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(ud);nd.ignoreElements=function(){return new oe(this)},nd.materialize=function(){var a=this;return new Se(function(b){return a.subscribe(function(a){b.onNext(id(a))},function(a){b.onNext(jd(a)),b.onCompleted()},function(){b.onNext(kd()),b.onCompleted()})},a)},nd.repeat=function(a){return Ad(this,a).concat()},nd.retry=function(a){return Ad(this,a).catchError()},nd.retryWhen=function(a){return Ad(this).catchErrorWhen(a)};var pe=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new O(a,this))},b}(ud);O.prototype={onNext:function(a){return this.isStopped?void 0:(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.accumulation=d(this.accumulator)(this.accumulation,a):(this.accumulation=this.hasSeed?d(this.accumulator)(this.seed,a):a,this.hasAccumulation=!0),this.accumulation===Pb?this.o.onError(this.accumulation.e):void this.o.onNext(this.accumulation))},onError:function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},onCompleted:function(){this.isStopped||(this.isStopped=!0,!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),this.o.onCompleted())},dispose:function(){this.isStopped=!0},fail:function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)}},nd.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new pe(this,c,b,a)},nd.skipLast=function(a){if(0>a)throw new Xb;var b=this;return new Se(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},nd.startWith=function(){var a,b=0;arguments.length&&Yc(arguments[0])?(a=arguments[0],b=1):a=ad;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Cd([Pd(c,a),this]).concat()},nd.takeLast=function(a){if(0>a)throw new Xb;var b=this;return new Se(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},nd.takeLastBuffer=function(a){var b=this;return new Se(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},nd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Xb;if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Xb;return new Se(function(d){function e(){var a=new Ve;i.push(a),d.onNext(Ic(a,g))}var f=new Sc,g=new Uc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},nd.selectConcat=nd.concatMap=function(a,b,c){return Ob(a)&&Ob(b)?this.concatMap(function(c,d){var e=a(c,d);return Nb(e)&&(e=Ed(e)),(dc(e)||cc(e))&&(e=Nd(e)),e.map(function(a,e){return b(c,a,d,e)
4
+ })}):Ob(a)?P(this,a,c):P(this,function(){return a})},nd.concatMapObserver=nd.selectConcatObserver=function(a,b,c,d){var e=this,f=fc(a,d,2),g=fc(b,d,1),h=fc(c,d,0);return new Se(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Nb(d)&&(d=Ed(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Nb(c)&&(c=Ed(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Nb(b)&&(b=Ed(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},nd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Se(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},R.prototype.push=function(a){var b=-1===Q(this.set,a,this.comparer);return b&&this.set.push(a),b},nd.distinct=function(a,b){var c=this;return b||(b=Kb),new Se(function(d){var e=new R(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)},nd.groupBy=function(a,b){return this.groupByUntil(a,b,Sd)},nd.groupByUntil=function(b,c,e){var f=this;return new Se(function(g){var h=new Pe,i=new Lc,j=new Uc(i),k=function(a){return function(b){b.onError(a)}};return i.add(f.subscribe(function(f){var l=d(b)(f);if(l===Pb)return h.forEach(k(l.e)),g.onError(l.e);var m=!1,n=h.get(l);if(n===a&&(n=new Ve,h.set(l,n),m=!0),m){var o=new Ue(l,n,j),p=new Ue(l,n),q=d(e)(p);if(q===Pb)return h.forEach(k(q.e)),g.onError(q.e);g.onNext(o);var r=new Sc;i.add(r),r.setDisposable(q.take(1).subscribe(Hb,function(a){h.forEach(k(a)),g.onError(a)},function(){h["delete"](l)&&n.onCompleted(),i.remove(r)}))}var s=f;return Ob(c)&&(s=d(c)(f),s===Pb)?(h.forEach(k(s.e)),g.onError(s.e)):void n.onNext(s)},function(a){h.forEach(k(a)),g.onError(a)},function(){h.forEach(function(a){a.onCompleted()}),g.onCompleted()})),j},f)};var qe=function(a){function b(b,c,d){this.source=b,this.selector=fc(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function e(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}return Gc(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new e(a,this.selector,this))},e.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.selector)(a,this.i++,this.source);return b===Pb?this.o.onError(b.e):void this.o.onNext(b)}},e.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.map=nd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof qe?this.internalMap(c,b):new qe(this,c,b)},nd.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(S(b,a))},nd.flatMap=nd.selectMany=function(a,b,c){return new vd(this,a,b,c).mergeAll()},nd.flatMapObserver=nd.selectManyObserver=function(a,b,c,d){var e=this;return new Se(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}Nb(c)&&(c=Ed(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Nb(c)&&(c=Ed(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Nb(a)&&(a=Ed(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},Gb.Observable.prototype.flatMapLatest=function(a,b,c){return new vd(this,a,b,c).switchLatest()};var re=function(a){function b(b,c){this.source=b,this.skipCount=c,a.call(this)}function c(a,b){this.c=b,this.r=b,this.o=a,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.skipCount))},c.prototype.onNext=function(a){this.isStopped||(this.r<=0?this.o.onNext(a):this.r--)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.skip=function(a){if(0>a)throw new Xb;return new re(this,a)},nd.skipWhile=function(a,b){var c=this,d=fc(a,b,3);return new Se(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},nd.take=function(a,b){if(0>a)throw new Xb;if(0===a)return Jd(b);var c=this;return new Se(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0>=d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},nd.takeWhile=function(a,b){var c=this,d=fc(a,b,3);return new Se(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var se=function(a){function b(b,c,d){this.source=b,this.predicate=fc(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function e(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new e(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},e.prototype.onNext=function(a){if(!this.isStopped){var b=d(this.predicate)(a,this.i++,this.source);return b===Pb?this.o.onError(b.e):void(b&&this.o.onNext(a))}},e.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.filter=nd.where=function(a,b){return this instanceof se?this.internalFilter(a,b):new se(this,a,b)};var te=function(a){function b(b,c,d,e){this.source=b,this.acc=c,this.hasSeed=d,this.seed=e,a.call(this)}function c(a,b){this.o=a,this.acc=b.acc,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.result=null,this.hasValue=!1,this.isStopped=!1}return Gc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){this.isStopped||(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.result=d(this.acc)(this.result,a):(this.result=this.hasSeed?d(this.acc)(this.seed,a):a,this.hasAccumulation=!0),this.result===Pb&&this.o.onError(this.result.e))},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.hasValue&&this.o.onNext(this.result),!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),!this.hasValue&&!this.hasSeed&&this.o.onError(new Vb),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(ud);nd.reduce=function(a){var b=!1;if(2===arguments.length){b=!0;var c=arguments[1]}return new te(this,a,b,c)};var ue=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return Gc(b,a),b.prototype.next=function(a){var b=d(this._fn)(a,this._i++,this._s);return b===Pb?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(od);nd.some=function(a,b){var c=this,d=fc(a,b,3);return new Se(function(a){return c.subscribe(new ue(a,d,c))})};var ve=function(a){function b(b){this._o=b,a.call(this)}return Gc(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(od);nd.isEmpty=function(){var a=this;return new Se(function(b){return a.subscribe(new ve(b))},a)};var we=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return Gc(b,a),b.prototype.next=function(a){var b=d(this._fn)(a,this._i++,this._s);return b===Pb?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(od);nd.every=function(a,b){var c=this,d=fc(a,b,3);return new Se(function(a){return c.subscribe(new we(a,d,c))},this)},nd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new Se(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Pc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},nd.contains=function(a,b){nd.includes(a,b)},nd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},nd.indexOf=function(a,b){var c=this;return new Se(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Pc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},nd.sum=function(a,b){return a&&Ob(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},nd.minBy=function(a,b){return b||(b=Lb),T(this,a,function(a,c){return-1*b(a,c)})},nd.min=function(a){return this.minBy(Ib,a).map(function(a){return U(a)})},nd.maxBy=function(a,b){return b||(b=Lb),T(this,a,b)},nd.max=function(a){return this.maxBy(Ib,a).map(function(a){return U(a)})};var xe=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return Gc(b,a),b.prototype.next=function(a){if(this._fn){var b=d(this._fn)(a,this._c++,this._s);if(b===Pb)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new Vb):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(od);nd.average=function(a,b){var c,d=this;return Ob(a)&&(c=fc(a,b,3)),new Se(function(a){return d.subscribe(new xe(a,c,d))},d)},nd.sequenceEqual=function(a,b){var c=this;return b||(b=Kb),new Se(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(dc(a)||cc(a))&&(a=Nd(a)),Nb(a)&&(a=Ed(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Lc(i,j)},c)},nd.elementAt=function(b,c){if(0>b)throw new Xb;var d=this;return new Se(function(e){var f=b;return d.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c===a?e.onError(new Xb):(e.onNext(c),e.onCompleted())})},d)},nd.single=function(a,b){if(Ob(a))return this.filter(a,b).single();var c=this;return new Se(function(a){var b,d=!1;return c.subscribe(function(c){d?a.onError(new Error("Sequence contains more than one element")):(b=c,d=!0)},function(b){a.onError(b)},function(){a.onNext(b),a.onCompleted()})},c)};var ye=function(b){function c(a,c,d){this._o=a,this._obj=c,this._s=d,this._i=0,b.call(this)}return Gc(c,b),c.prototype.next=function(a){if(this._obj.predicate){var b=d(this._obj.predicate)(a,this._i++,this._s);if(b===Pb)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._obj.defaultValue===a?this._o.onError(new Vb):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},c}(od);nd.first=function(){var a={},b=this;if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Ob(a.predicate)){var c=a.predicate;a.predicate=fc(c,a.thisArg,3)}return new Se(function(c){return b.subscribe(new ye(c,a,b))},b)},nd.last=function(){var b={},c=this;if(b="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Ob(b.predicate)){var e=b.predicate;b.predicate=fc(e,b.thisArg,3)}return new Se(function(e){var f,g=!1,h=0;return c.subscribe(function(a){if(b.predicate){var i=d(b.predicate)(a,h++,c);if(i===Pb)return e.onError(i.e);i&&(g=!0,f=a)}else b.predicate||(g=!0,f=a)},function(a){e.onError(a)},function(){g?(e.onNext(f),e.onCompleted()):b.defaultValue===a?e.onError(new Vb):(e.onNext(b.defaultValue),e.onCompleted())})},c)},nd.find=function(a,b){return V(this,a,b,!1)},nd.findIndex=function(a,b){return V(this,a,b,!0)},nd.toSet=function(){if("undefined"==typeof Fb.Set)throw new TypeError;var a=this;return new Se(function(b){var c=new Fb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},nd.toMap=function(a,b){if("undefined"==typeof Fb.Map)throw new TypeError;var c=this;return new Se(function(d){var e=new Fb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)},td.wrap=function(a){function b(){return td.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var ze=td.spawn=function(){for(var a=arguments[0],b=this,c=[],e=1,f=arguments.length;f>e;e++)c.push(arguments[e]);return new Se(function(e){function f(b){var c=d(a.next).call(a,b);return c===Pb?e.onError(c.e):void h(c)}function g(b){var c=d(a.next).call(a,b);return c===Pb?e.onError(c.e):void h(c)}function h(a){if(a.done)return e.onNext(a.value),void e.onCompleted();var c=W.call(b,a.value);td.isObservable(c)?i.add(c.subscribe(f,g)):g(new TypeError("type not supported"))}var i=new Lc;return Ob(a)&&(a=a.apply(b,c)),a&&Ob(a.next)?(f(),i):(e.onNext(a),e.onCompleted())})};td.start=function(a,b,c){return Ae(a,b,c)()};var Ae=td.toAsync=function(a,b,c){return Yc(c)||(c=fd),function(){var d=arguments,e=new We;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};td.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return ab(a,b,c,e)}},td.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return cb(a,b,c,e)}},eb.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},Gb.config.useNativeEvents=!1,td.fromEvent=function(a,b,c){return a.addListener?Be(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):Gb.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Se(function(d){return fb(a,b,gb(d,c))}).publish().refCount():Be(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Be=td.fromEventPattern=function(a,b,c,e){return Yc(e)||(e=ad),new Se(function(e){function f(){var a=arguments[0];return Ob(c)&&(a=d(c).apply(null,arguments),a===Pb)?e.onError(a.e):void e.onNext(a)}var g=a(f);return Oc(function(){Ob(b)&&b(f,g)})}).publish().refCount()};td.startAsync=function(a){var b;try{b=a()}catch(c){return Zd(c)}return Ed(b)};var Ce=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Pc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Pc)});return new Lc(c,d,e)}function c(c,d){this.source=c,this.controller=new Ve,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Gc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(td);nd.pausable=function(a){return new Ce(this,a)};var De=function(b){function c(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=hb(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!=d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f}function d(a,d){this.source=a,this.controller=new Ve,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Gc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(td);nd.pausableBuffered=function(a){return new De(this,a)};var Ee=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new Fe(d,e),this.source=c.multicast(this.subject).refCount()}return Gc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(td),Fe=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new Ve,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||bd}return Gc(c,a),Hc(c.prototype,ld,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(hd.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(hd.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(hd.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,Oc(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),c}(td);nd.controlled=function(a,b){return a&&Yc(a)&&(b=a,a=!0),null==a&&(a=!0),new Ee(this,a,b)};var Ge=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return fd.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}Gc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}Gc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;fd.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(od);return c}(td);Ee.prototype.stopAndWait=function(){return new Ge(this)};var He=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return fd.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}Gc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}Gc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;fd.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(od);return c}(td);Ee.prototype.windowed=function(a){return new He(this,a)},nd.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},nd.multicast=function(a,b){var c=this;return"function"==typeof a?new Se(function(d){var e=c.multicast(a());return new Lc(b(e).subscribe(d),e.connect())},c):new Le(c,a)},nd.publish=function(a){return a&&Ob(a)?this.multicast(function(){return new Ve},a):this.multicast(new Ve)},nd.share=function(){return this.publish().refCount()},nd.publishLast=function(a){return a&&Ob(a)?this.multicast(function(){return new We},a):this.multicast(new We)},nd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Je(b)},a):this.multicast(new Je(a))},nd.shareValue=function(a){return this.publishValue(a).refCount()},nd.replay=function(a,b,c,d){return a&&Ob(a)?this.multicast(function(){return new Ke(b,c,d)},a):this.multicast(new Ke(b,c,d))},nd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Ie=function(a,b){this.subject=a,this.observer=b};Ie.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Je=Gb.BehaviorSubject=function(a){function c(a){return Rc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Pc):(this.observers.push(a),a.onNext(this.value),new Ie(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Gc(d,a),Hc(d.prototype,ld,{getValue:function(){if(Rc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Rc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(Rc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(Rc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(td),Ke=Gb.ReplaySubject=function(a){function c(a,b){return Oc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new rd(this.scheduler,a),d=c(this,b);Rc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||bd,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return Gc(e,a),Hc(e.prototype,ld.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(Rc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Rc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Rc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(td),Le=Gb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Lc(f.subscribe(c),Oc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Gc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Se(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(td);nd.singleInstance=function(){function a(){return d||(d=!0,b=c.finally(function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new Se(function(b){return a().subscribe(b)})},nd.join=function(a,b,c,e){var f=this;return new Se(function(g){var h=new Lc,i=!1,j=!1,k=0,l=0,m=new Pe,n=new Pe,o=function(a){g.onError(a)};return h.add(f.subscribe(function(a){var c=k++,f=new Sc;m.set(c,a),h.add(f);var j=d(b)(a);return j===Pb?g.onError(j.e):(f.setDisposable(j.take(1).subscribe(Hb,o,function(){m["delete"](c)&&0===m.size&&i&&g.onCompleted(),h.remove(f)})),void n.forEach(function(b){var c=d(e)(a,b);return c===Pb?g.onError(c.e):void g.onNext(c)}))},o,function(){i=!0,(j||0===m.size)&&g.onCompleted()})),h.add(a.subscribe(function(a){var b=l++,f=new Sc;n.set(b,a),h.add(f);var i=d(c)(a);return i===Pb?g.onError(i.e):(f.setDisposable(i.take(1).subscribe(Hb,o,function(){n["delete"](b)&&0===n.size&&j&&g.onCompleted(),h.remove(f)})),void m.forEach(function(b){var c=d(e)(b,a);return c===Pb?g.onError(c.e):void g.onNext(c)}))},o,function(){j=!0,(i||0===n.size)&&g.onCompleted()})),h},f)},nd.groupJoin=function(a,b,c,e){var f=this;return new Se(function(g){function h(){}var i=new Lc,j=new Uc(i),k=new Pe,l=new Pe,m=0,n=0,h=function(a){return function(b){b.onError(a)}};return i.add(f.subscribe(function(a){var c=new Ve,f=m++;k.set(f,c);var n=d(e)(a,Ic(c,j));if(n===Pb)return k.forEach(h(n.e)),g.onError(n.e);g.onNext(n),l.forEach(function(a){c.onNext(a)});var o=new Sc;i.add(o);var p=d(b)(a);return p===Pb?(k.forEach(h(p.e)),g.onError(p.e)):void o.setDisposable(p.take(1).subscribe(Hb,function(a){k.forEach(h(a)),g.onError(a)},function(){k["delete"](f)&&c.onCompleted(),i.remove(o)}))},function(a){k.forEach(h(a)),g.onError(a)},function(){g.onCompleted()})),i.add(a.subscribe(function(a){var b=n++;l.set(b,a);var e=new Sc;i.add(e);var f=d(c)(a);return f===Pb?(k.forEach(h(f.e)),g.onError(f.e)):(e.setDisposable(f.take(1).subscribe(Hb,function(a){k.forEach(h(a)),g.onError(a)},function(){l["delete"](b),i.remove(e)})),void k.forEach(function(b){b.onNext(a)}))},function(a){k.forEach(h(a)),g.onError(a)})),j},f)},nd.buffer=function(){return this.window.apply(this,arguments).flatMap(M)},nd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?jb.call(this,a):"function"==typeof a?kb.call(this,a):ib.call(this,a,b)},nd.pairwise=function(){var a=this;return new Se(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},nd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]};var Me=function(a){function b(a,b){this.c=a,this.s=b}return Gc(b,a),b.prototype[ac]=function(){var a=this;return{next:function(){return a.c()?{done:!1,value:a.s}:{done:!0,value:void 0}}}},b}(wd);nd.letBind=nd.let=function(a){return a(this)},td["if"]=function(a,b,c){return Gd(function(){return c||(c=Jd()),Nb(b)&&(b=Ed(b)),Nb(c)&&(c=Ed(c)),"function"==typeof c.now&&(c=Jd(c)),a()?b:c})},td["for"]=td.forIn=function(a,b,c){return Cd(a,b,c).concat()};var Ne=td["while"]=td.whileDo=function(a,b){return Nb(b)&&(b=Ed(b)),lb(a,b).concat()};nd.doWhile=function(a){return ce([this,Ne(a,this)])},td["case"]=function(a,b,c){return Gd(function(){Nb(c)&&(c=Ed(c)),c||(c=Jd()),Yc(c)&&(c=Jd(c));var d=b[a()];return Nb(d)&&(d=Ed(d)),d||c})},nd.expand=function(a,b){Yc(b)||(b=ad);var c=this;return new Se(function(d){var e=[],f=new Tc,g=new Lc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new Sc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},td.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Se(function(b){var c=a.length;if(0===c)return b.onCompleted(),Pc;for(var d=new Lc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];Nb(j)&&(j=Ed(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},nd.forkJoin=function(a,b){var c=this;return new Se(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Sc,l=new Sc;return Nb(a)&&(a=Ed(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new Lc(k,l)},c)},nd.manySelect=nd.extend=function(a,b){Yc(b)||(b=ad);var c=this;return Gd(function(){var d;return c.map(function(a){var b=new Oe(a);return d&&d.onNext(a),d=b,b}).tap(Hb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Oe=function(a){function b(a){var b=this,c=new Lc;return c.add(bd.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new We}return Gc(c,a),Hc(c.prototype,ld,{onCompleted:function(){this.onNext(td.empty())},onError:function(a){this.onNext(td["throw"](a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(td),Pe=Fb.Map||function(){function b(){this.size=0,this._values=[],this._keys=[]}return b.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1===c?a:this._values[c]},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);
5
+ return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},b.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},b}();mb.prototype.and=function(a){return new mb(this.patterns.concat(a))},mb.prototype.thenDo=function(a){return new nb(this,a)},nb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ob(a,this.expression.patterns[f],b.onError.bind(b)));var h=new pb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},pb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},pb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var Qe=function(a){function b(b,c){a.call(this),this.source=b,this.onError=c,this.queue=[],this.activePlans=[],this.subscription=new Sc,this.isDisposed=!1}Gc(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.exception);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=Hb,c.completed=Hb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(od);nd.and=function(a){return new mb([this,a])},nd.thenDo=function(a){return new mb([this]).thenDo(a)},td.when=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new Se(function(b){var c=[],d=new Pe,e=md(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(){b.onCompleted()});try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Zd(h).subscribe(b)}var i=new Lc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};{var Re=td.interval=function(a,b){return tb(a,a,Yc(b)?b:fd)};td.timer=function(b,c,d){var e;return Yc(d)||(d=fd),null!=c&&"number"==typeof c?e=c:Yc(c)&&(d=c),b instanceof Date&&e===a?qb(b.getTime(),d):b instanceof Date&&e!==a?rb(b.getTime(),c,d):e===a?sb(b,d):tb(b,e,d)}}nd.delay=function(a,b){return Yc(b)||(b=fd),a instanceof Date?vb(this,a.getTime(),b):ub(this,a,b)},nd.debounce=function(a,b){Yc(b)||(b=fd);var c=this;return new Se(function(d){var e,f=new Tc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Sc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Lc(i,f)},this)},nd.throttle=function(a,b){return this.debounce(a,b)},nd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Yc(c)||(c=fd),"number"==typeof b?d=b:Yc(b)&&(d=a,c=b),new Se(function(b){function f(){var a=new Sc,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new Ve;k.push(a),b.onNext(Ic(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Tc,m=0;return g=new Lc(l),h=new Uc(g),k.push(new Ve),b.onNext(Ic(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},nd.windowWithTimeOrCount=function(a,b,c){var d=this;return Yc(c)||(c=fd),new Se(function(e){function f(b){var d=new Sc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new Ve,e.onNext(Ic(l,i)),f(a)}}))}var g=new Tc,h=new Lc(g),i=new Uc(h),j=0,k=0,l=new Ve;return e.onNext(Ic(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new Ve,e.onNext(Ic(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},nd.bufferWithTime=function(a,b,c){return this.windowWithTime(a,b,c).flatMap(M)},nd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).flatMap(M)},nd.timeInterval=function(a){var b=this;return Yc(a)||(a=fd),Gd(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},nd.timestamp=function(a){return Yc(a)||(a=fd),this.map(function(b){return{value:b,timestamp:a.now()}})},nd.sample=nd.throttleLatest=function(a,b){return Yc(b)||(b=fd),"number"==typeof a?wb(this,Re(a,b)):wb(this,a)},nd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Zd(new Error(b||"Timeout"))),Yc(c)||(c=fd);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Se(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Nb(b)&&(b=Ed(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Sc,j=new Tc,k=!1,l=new Tc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Lc(j,l)},d)},td.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Yc(f)||(f=fd),new Se(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithAbsoluteAndState(a,f.now(),function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},td.generateWithRelativeTime=function(a,b,c,d,e,f){return Yc(f)||(f=fd),new Se(function(g){var h=!0,i=!1;return f.scheduleRecursiveWithRelativeAndState(a,0,function(a,f){i&&g.onNext(a);try{if(h?h=!1:a=c(a),i=b(a))var j=d(a),k=e(a)}catch(l){return void g.onError(l)}i?f(j,k):g.onCompleted()})})},nd.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return Yc(b)||(b=fd),new Se(function(e){var f=new Tc;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},nd.delayWithSelector=function(a,b){var c,e,f=this;return Ob(a)?e=a:(c=a,e=b),new Se(function(a){function b(){j.setDisposable(f.subscribe(function(b){var c=d(e)(b);if(c===Pb)return a.onError(c.e);var f=new Sc;h.add(f),f.setDisposable(c.subscribe(function(){a.onNext(b),h.remove(f),g()},function(b){a.onError(b)},function(){a.onNext(b),h.remove(f),g()}))},function(b){a.onError(b)},function(){i=!0,j.dispose(),g()}))}function g(){i&&0===h.length&&a.onCompleted()}var h=new Lc,i=!1,j=new Tc;return c?j.setDisposable(c.subscribe(b,function(b){a.onError(b)},b)):b(),new Lc(j,h)},this)},nd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=Sd()),c||(c=Zd(new Error("Timeout")));var d=this;return new Se(function(e){function f(a){function b(){return k===d}var d=k,f=new Sc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Tc,i=new Tc,j=new Sc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(Nb(c)?Ed(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Lc(h,i)},d)},nd.debounceWithSelector=function(a){var b=this;return new Se(function(c){var e,f=!1,g=new Tc,h=0,i=b.subscribe(function(b){var i=d(a)(b);if(i===Pb)return c.onError(i.e);Nb(i)&&(i=Ed(i)),f=!0,e=b,h++;var j=h,k=new Sc;g.setDisposable(k),k.setDisposable(i.subscribe(function(){f&&h===j&&c.onNext(e),f=!1,k.dispose()},function(a){c.onError(a)},function(){f&&h===j&&c.onNext(e),f=!1,k.dispose()}))},function(a){g.dispose(),c.onError(a),f=!1,h++},function(){g.dispose(),f&&c.onNext(e),c.onCompleted(),f=!1,h++});return new Lc(i,g)},b)},nd.skipLastWithTime=function(a,b){Yc(b)||(b=fd);var c=this;return new Se(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},nd.takeLastWithTime=function(a,b){var c=this;return Yc(b)||(b=fd),new Se(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},nd.takeLastBufferWithTime=function(a,b){var c=this;return Yc(b)||(b=fd),new Se(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},nd.takeWithTime=function(a,b){var c=this;return Yc(b)||(b=fd),new Se(function(d){return new Lc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},nd.skipWithTime=function(a,b){var c=this;return Yc(b)||(b=fd),new Se(function(d){var e=!1;return new Lc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},nd.skipUntilWithTime=function(a,b){Yc(b)||(b=fd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Se(function(e){var f=!1;return new Lc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},nd.takeUntilWithTime=function(a,b){Yc(b)||(b=fd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Se(function(e){return new Lc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},nd.throttleFirst=function(a,b){Yc(b)||(b=fd);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Se(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},nd.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Se(function(e){var f=a(b(e));return c.subscribe(function(a){var b=d(f["@@transducer/step"]).call(f,e,a);b===Pb&&e.onError(b.e)},function(a){e.onError(a)},function(){f["@@transducer/result"](e)})},c)},nd.switchFirst=function(){var a=this;return new Se(function(b){var c=!1,d=!1,e=new Sc,f=new Lc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Nb(a)&&(a=Ed(a));var e=new Sc;f.add(e),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},function(a){b.onError(a)},function(){d=!0,!c&&1===f.length&&b.onCompleted()})),f},this)},nd.flatMapFirst=nd.selectManyFirst=function(a,b,c){return new vd(this,a,b,c).switchFirst()},Gb.Observable.prototype.flatMapWithMaxConcurrent=function(a,b,c,d){return new vd(this,b,c,d).merge(a)};Gb.VirtualTimeScheduler=function(a){function b(){return this.toDateTimeOffset(this.clock)}function c(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function d(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function f(a,b){return b(),Pc}function g(f,g){this.clock=f,this.comparer=g,this.isEnabled=!1,this.queue=new Jc(1024),a.call(this,b,c,d,e)}Gc(g,a);var h=g.prototype;return h.add=$b,h.toDateTimeOffset=$b,h.toRelative=$b,h.schedulePeriodicWithState=function(a,b,c){var d=new _c(this,a,b,c);return d.start()},h.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},h.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,f)},h.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},h.stop=function(){this.isEnabled=!1},h.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Xb;if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},h.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Xb;0!==c&&this.advanceTo(b)},h.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Xb;this.clock=b},h.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},h.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,f)},h.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new Vc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},g}(Wc);Gb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Lb;a.call(this,d,e)}Gc(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(Gb.VirtualTimeScheduler);var Se=Gb.AnonymousObservable=function(a){function b(a){return a&&Ob(a.dispose)?a:Ob(a)?Oc(a):Pc}function c(a,c){var f=c[0],g=c[1],h=d(g.__subscribe).call(g,f);return h!==Pb||f.fail(Pb.e)?void f.setDisposable(b(h)):e(Pb.e)}function f(a){var b=new Te(a),d=[b,this];return bd.scheduleRequired()?bd.scheduleWithState(d,c):c(null,d),b}function g(b,c){this.source=c,this.__subscribe=b,a.call(this,f)}return Gc(g,a),g}(td),Te=function(a){function b(b){a.call(this),this.observer=b,this.m=new Sc}Gc(b,a);var c=b.prototype;return c.next=function(a){var b=d(this.observer.onNext).call(this.observer,a);b===Pb&&(this.dispose(),e(b.e))},c.error=function(a){var b=d(this.observer.onError).call(this.observer,a);this.dispose(),b===Pb&&e(b.e)},c.completed=function(){var a=d(this.observer.onCompleted).call(this.observer);this.dispose(),a===Pb&&e(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(od),Ue=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Se(function(a){return new Lc(e.getDisposable(),d.subscribe(a))}):d}return Gc(c,a),c}(td),Ve=Gb.Subject=function(a){function c(a){return Rc(this),this.isStopped?this.hasError?(a.onError(this.error),Pc):(a.onCompleted(),Pc):(this.observers.push(a),new Ie(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Gc(d,a),Hc(d.prototype,ld.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Rc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(Rc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(Rc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Xe(a,b)},d}(td),We=Gb.AsyncSubject=function(a){function c(a){return Rc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Pc):(this.observers.push(a),new Ie(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Gc(d,a),Hc(d.prototype,ld,{hasObservers:function(){return Rc(this),this.observers.length>0},onCompleted:function(){var a,c;if(Rc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(Rc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){Rc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(td),Xe=Gb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Gc(c,a),Hc(c.prototype,ld.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(td);Gb.Pauser=function(a){function b(){a.call(this)}return Gc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(Ve),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Fb.Rx=Gb,define(function(){return Gb})):zb&&Cb?Db?(Cb.exports=Gb).Rx=Gb:zb.Rx=Gb:Fb.Rx=Gb;var Ye=j()}).call(this);
6
6
  //# sourceMappingURL=rx.all.map
@@ -1,36 +1,32 @@
1
1
  // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
- var objectTypes = {
5
- 'boolean': false,
6
- 'function': true,
7
- 'object': true,
8
- 'number': false,
9
- 'string': false,
10
- 'undefined': false
11
- };
12
-
13
- var root = (objectTypes[typeof window] && window) || this,
14
- freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
15
- freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
16
- moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
17
- freeGlobal = objectTypes[typeof global] && global;
18
-
19
- if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
20
- root = freeGlobal;
21
- }
4
+ var objectTypes = {
5
+ 'function': true,
6
+ 'object': true
7
+ };
22
8
 
23
- // Because of build optimizers
24
- if (typeof define === 'function' && define.amd) {
25
- define(['rx.binding', 'exports'], function (Rx, exports) {
26
- root.Rx = factory(root, exports, Rx);
27
- return root.Rx;
28
- });
29
- } else if (typeof module === 'object' && module && module.exports === freeExports) {
30
- module.exports = factory(root, module.exports, require('./rx'));
31
- } else {
32
- root.Rx = factory(root, {}, root.Rx);
33
- }
9
+ var
10
+ freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
11
+ freeSelf = objectTypes[typeof self] && self.Object && self,
12
+ freeWindow = objectTypes[typeof window] && window && window.Object && window,
13
+ freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
14
+ moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
15
+ freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
16
+
17
+ var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
18
+
19
+ // Because of build optimizers
20
+ if (typeof define === 'function' && define.amd) {
21
+ define(['./rx.binding', 'exports'], function (Rx, exports) {
22
+ root.Rx = factory(root, exports, Rx);
23
+ return root.Rx;
24
+ });
25
+ } else if (typeof module === 'object' && module && module.exports === freeExports) {
26
+ module.exports = factory(root, module.exports, require('./rx'));
27
+ } else {
28
+ root.Rx = factory(root, {}, root.Rx);
29
+ }
34
30
  }.call(this, function (root, exp, Rx, undefined) {
35
31
 
36
32
  // Aliases
@@ -45,201 +41,152 @@
45
41
  immediateScheduler = Rx.Scheduler.immediate,
46
42
  timeoutScheduler = Rx.Scheduler['default'],
47
43
  isScheduler = Rx.Scheduler.isScheduler,
48
- slice = Array.prototype.slice;
49
-
50
- var fnString = 'function',
51
- throwString = 'throw',
52
- isObject = Rx.internals.isObject;
53
-
54
- function toThunk(obj, ctx) {
55
- if (Array.isArray(obj)) { return objectToThunk.call(ctx, obj); }
56
- if (isGeneratorFunction(obj)) { return observableSpawn(obj.call(ctx)); }
57
- if (isGenerator(obj)) { return observableSpawn(obj); }
58
- if (isObservable(obj)) { return observableToThunk(obj); }
59
- if (isPromise(obj)) { return promiseToThunk(obj); }
60
- if (typeof obj === fnString) { return obj; }
61
- if (isObject(obj) || Array.isArray(obj)) { return objectToThunk.call(ctx, obj); }
62
-
63
- return obj;
64
- }
65
-
66
- function objectToThunk(obj) {
67
- var ctx = this;
68
-
69
- return function (done) {
70
- var keys = Object.keys(obj),
71
- pending = keys.length,
72
- results = new obj.constructor(),
73
- finished;
74
-
75
- if (!pending) {
76
- timeoutScheduler.schedule(function () { done(null, results); });
77
- return;
78
- }
79
-
80
- for (var i = 0, len = keys.length; i < len; i++) {
81
- run(obj[keys[i]], keys[i]);
82
- }
83
-
84
- function run(fn, key) {
85
- if (finished) { return; }
86
- try {
87
- fn = toThunk(fn, ctx);
88
-
89
- if (typeof fn !== fnString) {
90
- results[key] = fn;
91
- return --pending || done(null, results);
92
- }
93
-
94
- fn.call(ctx, function(err, res) {
95
- if (finished) { return; }
96
-
97
- if (err) {
98
- finished = true;
99
- return done(err);
100
- }
101
-
102
- results[key] = res;
103
- --pending || done(null, results);
104
- });
105
- } catch (e) {
106
- finished = true;
107
- done(e);
108
- }
109
- }
110
- }
111
- }
112
-
113
- function observableToThunk(observable) {
114
- return function (fn) {
115
- var value, hasValue = false;
116
- observable.subscribe(
117
- function (v) {
118
- value = v;
119
- hasValue = true;
120
- },
121
- fn,
122
- function () {
123
- hasValue && fn(null, value);
124
- });
125
- }
126
- }
44
+ isPromise = Rx.helpers.isPromise,
45
+ isFunction = Rx.helpers.isFunction;
127
46
 
128
- function promiseToThunk(promise) {
129
- return function(fn) {
130
- promise.then(function(res) {
131
- fn(null, res);
132
- }, fn);
47
+ var errorObj = {e: {}};
48
+ var tryCatchTarget;
49
+ function tryCatcher() {
50
+ try {
51
+ return tryCatchTarget.apply(this, arguments);
52
+ } catch (e) {
53
+ errorObj.e = e;
54
+ return errorObj;
133
55
  }
134
56
  }
135
-
136
- function isObservable(obj) {
137
- return obj && typeof obj.subscribe === fnString;
57
+ function tryCatch(fn) {
58
+ if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
59
+ tryCatchTarget = fn;
60
+ return tryCatcher;
138
61
  }
139
-
140
- function isGeneratorFunction(obj) {
141
- return obj && obj.constructor && obj.constructor.name === 'GeneratorFunction';
62
+ function thrower(e) {
63
+ throw e;
142
64
  }
143
65
 
144
- function isGenerator(obj) {
145
- return obj && typeof obj.next === fnString && typeof obj[throwString] === fnString;
146
- }
66
+ Observable.wrap = function (fn) {
67
+ createObservable.__generatorFunction__ = fn;
68
+ return createObservable;
147
69
 
148
- /*
149
- * Spawns a generator function which allows for Promises, Observable sequences, Arrays, Objects, Generators and functions.
150
- * @param {Function} The spawning function.
151
- * @returns {Function} a function which has a done continuation.
152
- */
153
- var observableSpawn = Rx.spawn = function (fn) {
154
- var isGenFun = isGeneratorFunction(fn);
70
+ function createObservable() {
71
+ return Observable.spawn.call(this, fn.apply(this, arguments));
72
+ }
73
+ };
155
74
 
156
- return function (done) {
157
- var ctx = this,
158
- gen = fn;
75
+ var spawn = Observable.spawn = function () {
76
+ var gen = arguments[0], self = this, args = [];
77
+ for (var i = 1, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
159
78
 
160
- if (isGenFun) {
161
- for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
162
- var len = args.length,
163
- hasCallback = len && typeof args[len - 1] === fnString;
79
+ return new AnonymousObservable(function (o) {
80
+ var g = new CompositeDisposable();
164
81
 
165
- done = hasCallback ? args.pop() : handleError;
166
- gen = fn.apply(this, args);
167
- } else {
168
- done = done || handleError;
82
+ if (isFunction(gen)) { gen = gen.apply(self, args); }
83
+ if (!gen || !isFunction(gen.next)) {
84
+ o.onNext(gen);
85
+ return o.onCompleted();
169
86
  }
170
87
 
171
- next();
88
+ processGenerator();
172
89
 
173
- function exit(err, res) {
174
- timeoutScheduler.schedule(done.bind(ctx, err, res));
90
+ function processGenerator(res) {
91
+ var ret = tryCatch(gen.next).call(gen, res);
92
+ if (ret === errorObj) { return o.onError(ret.e); }
93
+ next(ret);
175
94
  }
176
95
 
177
- function next(err, res) {
178
- var ret;
96
+ function onError(err) {
97
+ var ret = tryCatch(gen.next).call(gen, err);
98
+ if (ret === errorObj) { return o.onError(ret.e); }
99
+ next(ret);
100
+ }
179
101
 
180
- // multiple args
181
- if (arguments.length > 2) {
182
- for(var res = [], i = 1, len = arguments.length; i < len; i++) { res.push(arguments[i]); }
102
+ function next(ret) {
103
+ if (ret.done) {
104
+ o.onNext(ret.value);
105
+ o.onCompleted();
106
+ return;
183
107
  }
184
-
185
- if (err) {
186
- try {
187
- ret = gen[throwString](err);
188
- } catch (e) {
189
- return exit(e);
190
- }
108
+ var value = toObservable.call(self, ret.value);
109
+ if (Observable.isObservable(value)) {
110
+ g.add(value.subscribe(processGenerator, onError));
111
+ } else {
112
+ onError(new TypeError('type not supported'));
191
113
  }
114
+ }
192
115
 
193
- if (!err) {
194
- try {
195
- ret = gen.next(res);
196
- } catch (e) {
197
- return exit(e);
198
- }
199
- }
116
+ return g;
117
+ });
118
+ }
200
119
 
201
- if (ret.done) {
202
- return exit(null, ret.value);
203
- }
120
+ function toObservable(obj) {
121
+ if (!obj) { return obj; }
122
+ if (Observable.isObservable(obj)) { return obj; }
123
+ if (isPromise(obj)) { return Observable.fromPromise(obj); }
124
+ if (isGeneratorFunction(obj) || isGenerator(obj)) { return spawn.call(this, obj); }
125
+ if (isFunction(obj)) { return thunkToObservable.call(this, obj); }
126
+ if (isArrayLike(obj) || isIterable(obj)) { return arrayToObservable.call(this, obj); }
127
+ if (isObject(obj)) {return objectToObservable.call(this, obj);}
128
+ return obj;
129
+ }
130
+
131
+ function arrayToObservable (obj) {
132
+ return Observable.from(obj)
133
+ .flatMap(toObservable)
134
+ .toArray();
135
+ }
136
+
137
+ function objectToObservable (obj) {
138
+ var results = new obj.constructor(), keys = Object.keys(obj), observables = [];
139
+ for (var i = 0, len = keys.length; i < len; i++) {
140
+ var key = keys[i];
141
+ var observable = toObservable.call(this, obj[key]);
142
+
143
+ if(observable && Observable.isObservable(observable)) {
144
+ defer(observable, key);
145
+ } else {
146
+ results[key] = obj[key];
147
+ }
148
+ }
204
149
 
205
- ret.value = toThunk(ret.value, ctx);
206
-
207
- if (typeof ret.value === fnString) {
208
- var called = false;
209
- try {
210
- ret.value.call(ctx, function() {
211
- if (called) {
212
- return;
213
- }
214
-
215
- called = true;
216
- next.apply(ctx, arguments);
217
- });
218
- } catch (e) {
219
- timeoutScheduler.schedule(function () {
220
- if (called) {
221
- return;
222
- }
223
-
224
- called = true;
225
- next.call(ctx, e);
226
- });
227
- }
228
- return;
229
- }
150
+ return Observable.forkJoin.apply(Observable, observables).map(function() {
151
+ return results;
152
+ });
230
153
 
231
- // Not supported
232
- next(new TypeError('Rx.spawn only supports a function, Promise, Observable, Object or Array.'));
233
- }
234
- }
235
- };
236
154
 
237
- function handleError(err) {
238
- if (!err) { return; }
239
- timeoutScheduler.schedule(function() {
240
- throw err;
241
- });
155
+ function defer (observable, key) {
156
+ results[key] = undefined;
157
+ observables.push(observable.map(function (next) {
158
+ results[key] = next;
159
+ }));
242
160
  }
161
+ }
162
+
163
+ function thunkToObservable(fn) {
164
+ var self = this;
165
+ return new AnonymousObservable(function (o) {
166
+ fn.call(self, function () {
167
+ var err = arguments[0], res = arguments[1];
168
+ if (err) { return o.onError(err); }
169
+ if (arguments.length > 2) {
170
+ var args = [];
171
+ for (var i = 1, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
172
+ res = args;
173
+ }
174
+ o.onNext(res);
175
+ o.onCompleted();
176
+ });
177
+ });
178
+ }
179
+
180
+ function isGenerator(obj) {
181
+ return isFunction (obj.next) && isFunction (obj.throw);
182
+ }
183
+
184
+ function isGeneratorFunction(obj) {
185
+ var ctor = obj.constructor;
186
+ if (!ctor) { return false; }
187
+ if (ctor.name === 'GeneratorFunction' || ctor.displayName === 'GeneratorFunction') { return true; }
188
+ return isGenerator(ctor.prototype);
189
+ }
243
190
 
244
191
  /**
245
192
  * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
@@ -290,94 +237,112 @@
290
237
  };
291
238
  };
292
239
 
293
- /**
294
- * Converts a callback function to an observable sequence.
295
- *
296
- * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence.
297
- * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
298
- * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next.
299
- * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array.
300
- */
301
- Observable.fromCallback = function (func, context, selector) {
302
- return function () {
303
- var len = arguments.length, args = new Array(len)
304
- for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
305
-
306
- return new AnonymousObservable(function (observer) {
307
- function handler() {
308
- var len = arguments.length, results = new Array(len);
309
- for(var i = 0; i < len; i++) { results[i] = arguments[i]; }
310
-
311
- if (selector) {
312
- try {
313
- results = selector.apply(context, results);
314
- } catch (e) {
315
- return observer.onError(e);
316
- }
317
-
318
- observer.onNext(results);
319
- } else {
320
- if (results.length <= 1) {
321
- observer.onNext.apply(observer, results);
322
- } else {
323
- observer.onNext(results);
324
- }
325
- }
240
+ function createCbObservable(fn, ctx, selector, args) {
241
+ var o = new AsyncSubject();
326
242
 
327
- observer.onCompleted();
328
- }
243
+ args.push(createCbHandler(o, ctx, selector));
244
+ fn.apply(ctx, args);
329
245
 
330
- args.push(handler);
331
- func.apply(context, args);
332
- }).publishLast().refCount();
333
- };
246
+ return o.asObservable();
247
+ }
248
+
249
+ function createCbHandler(o, ctx, selector) {
250
+ return function handler () {
251
+ var len = arguments.length, results = new Array(len);
252
+ for(var i = 0; i < len; i++) { results[i] = arguments[i]; }
253
+
254
+ if (isFunction(selector)) {
255
+ results = tryCatch(selector).apply(ctx, results);
256
+ if (results === errorObj) { return o.onError(results.e); }
257
+ o.onNext(results);
258
+ } else {
259
+ if (results.length <= 1) {
260
+ o.onNext(results[0]);
261
+ } else {
262
+ o.onNext(results);
263
+ }
264
+ }
265
+
266
+ o.onCompleted();
267
+ };
268
+ }
269
+
270
+ /**
271
+ * Converts a callback function to an observable sequence.
272
+ *
273
+ * @param {Function} fn Function with a callback as the last parameter to convert to an Observable sequence.
274
+ * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined.
275
+ * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next.
276
+ * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array.
277
+ */
278
+ Observable.fromCallback = function (fn, ctx, selector) {
279
+ return function () {
280
+ typeof ctx === 'undefined' && (ctx = this);
281
+
282
+ var len = arguments.length, args = new Array(len)
283
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
284
+ return createCbObservable(fn, ctx, selector, args);
334
285
  };
286
+ };
335
287
 
336
- /**
337
- * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.
338
- * @param {Function} func The function to call
339
- * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
340
- * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next.
341
- * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array.
342
- */
343
- Observable.fromNodeCallback = function (func, context, selector) {
344
- return function () {
345
- var len = arguments.length, args = new Array(len);
346
- for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
347
-
348
- return new AnonymousObservable(function (observer) {
349
- function handler(err) {
350
- if (err) {
351
- observer.onError(err);
352
- return;
353
- }
288
+ function createNodeObservable(fn, ctx, selector, args) {
289
+ var o = new AsyncSubject();
354
290
 
355
- var len = arguments.length, results = [];
356
- for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; }
357
-
358
- if (selector) {
359
- try {
360
- results = selector.apply(context, results);
361
- } catch (e) {
362
- return observer.onError(e);
363
- }
364
- observer.onNext(results);
365
- } else {
366
- if (results.length <= 1) {
367
- observer.onNext.apply(observer, results);
368
- } else {
369
- observer.onNext(results);
370
- }
371
- }
291
+ args.push(createNodeHandler(o, ctx, selector));
292
+ fn.apply(ctx, args);
372
293
 
373
- observer.onCompleted();
374
- }
294
+ return o.asObservable();
295
+ }
375
296
 
376
- args.push(handler);
377
- func.apply(context, args);
378
- }).publishLast().refCount();
379
- };
297
+ function createNodeHandler(o, ctx, selector) {
298
+ return function handler () {
299
+ var err = arguments[0];
300
+ if (err) { return o.onError(err); }
301
+
302
+ var len = arguments.length, results = [];
303
+ for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; }
304
+
305
+ if (isFunction(selector)) {
306
+ var results = tryCatch(selector).apply(ctx, results);
307
+ if (results === errorObj) { return o.onError(results.e); }
308
+ o.onNext(results);
309
+ } else {
310
+ if (results.length <= 1) {
311
+ o.onNext(results[0]);
312
+ } else {
313
+ o.onNext(results);
314
+ }
315
+ }
316
+
317
+ o.onCompleted();
380
318
  };
319
+ }
320
+
321
+ /**
322
+ * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.
323
+ * @param {Function} fn The function to call
324
+ * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined.
325
+ * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next.
326
+ * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array.
327
+ */
328
+ Observable.fromNodeCallback = function (fn, ctx, selector) {
329
+ return function () {
330
+ typeof ctx === 'undefined' && (ctx = this);
331
+ var len = arguments.length, args = new Array(len);
332
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
333
+ return createNodeObservable(fn, ctx, selector, args);
334
+ };
335
+ };
336
+
337
+ function isNodeList(el) {
338
+ if (window.StaticNodeList) {
339
+ // IE8 Specific
340
+ // instanceof is slower than Object#toString, but Object#toString will not work as intended in IE8
341
+ return (el instanceof window.StaticNodeList || el instanceof window.NodeList);
342
+ } else {
343
+ return (Object.prototype.toString.call(el) == '[object NodeList]')
344
+ }
345
+ }
381
346
 
382
347
  function fixEvent(event) {
383
348
  var stopPropagation = function () {
@@ -432,36 +397,61 @@
432
397
  return event;
433
398
  }
434
399
 
435
- function createListener (element, name, handler) {
436
- // Standards compliant
437
- if (element.addEventListener) {
438
- element.addEventListener(name, handler, false);
439
- return disposableCreate(function () {
440
- element.removeEventListener(name, handler, false);
441
- });
400
+ function ListenDisposable(e, n, fn) {
401
+ this._e = e;
402
+ this._n = n;
403
+ this._fn = fn;
404
+ this._e.addEventListener(this._n, this._fn, false);
405
+ this.isDisposed = false;
406
+ }
407
+ ListenDisposable.prototype.dispose = function () {
408
+ if (!this.isDisposed) {
409
+ this._e.removeEventListener(this._n, this._fn, false);
410
+ this.isDisposed = true;
442
411
  }
443
- if (element.attachEvent) {
444
- // IE Specific
445
- var innerHandler = function (event) {
446
- handler(fixEvent(event));
447
- };
448
- element.attachEvent('on' + name, innerHandler);
449
- return disposableCreate(function () {
450
- element.detachEvent('on' + name, innerHandler);
451
- });
412
+ };
413
+
414
+ function AttachEventDisposable(e, n, fn) {
415
+ this._e = e;
416
+ this._n = 'on' + n;
417
+ this._fn = function (e) { fn(fixEvent(e)); };
418
+ this._e.attachEvent(this._n, this._fn);
419
+ this.isDisposed = false;
420
+ }
421
+ AttachEventDisposable.prototype.dispose = function () {
422
+ if (!this.isDisposed) {
423
+ this._e.detachEvent(this._n, this._fn);
424
+ this.isDisposed = true;
452
425
  }
453
- // Level 1 DOM Events
454
- element['on' + name] = handler;
455
- return disposableCreate(function () {
456
- element['on' + name] = null;
457
- });
426
+ };
427
+ function LevelOneDisposable(e, n, fn) {
428
+ this._e = e;
429
+ this._n = 'on' + n;
430
+ this._e[this._n] = fn;
431
+ this.isDisposed = false;
432
+ }
433
+ LevelOneDisposable.prototype.dispose = function () {
434
+ if (!this.isDisposed) {
435
+ this._e[this._n] = null;
436
+ this.isDisposed = true;
437
+ }
438
+ };
439
+
440
+ function createListener (el, eventName, handler) {
441
+ if (el.addEventListener) {
442
+ return new ListenDisposable(el, eventName, handler)
443
+ }
444
+ if (el.attachEvent) {
445
+ return new AttachEventDisposable(el, eventName, handler);
446
+ }
447
+ return LevelOneDisposable(el, eventName, handler);
458
448
  }
459
449
 
460
450
  function createEventListener (el, eventName, handler) {
461
451
  var disposables = new CompositeDisposable();
462
452
 
463
453
  // Asume NodeList
464
- if (Object.prototype.toString.call(el) === '[object NodeList]') {
454
+ if (isNodeList(el) || Object.prototype.toString.call(el) === '[object HTMLCollection]') {
465
455
  for (var i = 0, len = el.length; i < len; i++) {
466
456
  disposables.add(createEventListener(el.item(i), eventName, handler));
467
457
  }
@@ -479,10 +469,6 @@
479
469
 
480
470
  /**
481
471
  * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList.
482
- *
483
- * @example
484
- * var source = Rx.Observable.fromEvent(element, 'mouseup');
485
- *
486
472
  * @param {Object} element The DOMElement or NodeList to attach a listener.
487
473
  * @param {String} eventName The event name to attach the observable sequence.
488
474
  * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next.
@@ -507,22 +493,17 @@
507
493
  selector);
508
494
  }
509
495
  }
510
- return new AnonymousObservable(function (observer) {
496
+ return new AnonymousObservable(function (o) {
511
497
  return createEventListener(
512
498
  element,
513
499
  eventName,
514
- function handler (e) {
515
- var results = e;
516
-
517
- if (selector) {
518
- try {
519
- results = selector(arguments);
520
- } catch (err) {
521
- return observer.onError(err);
522
- }
500
+ function handler () {
501
+ var results = arguments[0];
502
+ if (isFunction(selector)) {
503
+ results = tryCatch(selector).apply(null, arguments);
504
+ if (results === errorObj) { return o.onError(results.e); }
523
505
  }
524
-
525
- observer.onNext(results);
506
+ o.onNext(results);
526
507
  });
527
508
  }).publish().refCount();
528
509
  };
@@ -532,27 +513,24 @@
532
513
  * @param {Function} addHandler The function to add a handler to the emitter.
533
514
  * @param {Function} [removeHandler] The optional function to remove a handler from an emitter.
534
515
  * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next.
516
+ * @param {Scheduler} [scheduler] A scheduler used to schedule the remove handler.
535
517
  * @returns {Observable} An observable sequence which wraps an event from an event emitter
536
518
  */
537
- var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector) {
538
- return new AnonymousObservable(function (observer) {
539
- function innerHandler (e) {
540
- var result = e;
541
- if (selector) {
542
- try {
543
- result = selector(arguments);
544
- } catch (err) {
545
- return observer.onError(err);
546
- }
519
+ var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector, scheduler) {
520
+ isScheduler(scheduler) || (scheduler = immediateScheduler);
521
+ return new AnonymousObservable(function (o) {
522
+ function innerHandler () {
523
+ var result = arguments[0];
524
+ if (isFunction(selector)) {
525
+ result = tryCatch(selector).apply(null, arguments);
526
+ if (result === errorObj) { return o.onError(result.e); }
547
527
  }
548
- observer.onNext(result);
528
+ o.onNext(result);
549
529
  }
550
530
 
551
531
  var returnValue = addHandler(innerHandler);
552
532
  return disposableCreate(function () {
553
- if (removeHandler) {
554
- removeHandler(innerHandler, returnValue);
555
- }
533
+ isFunction(removeHandler) && removeHandler(innerHandler, returnValue);
556
534
  });
557
535
  }).publish().refCount();
558
536
  };
@@ -572,5 +550,5 @@
572
550
  return observableFromPromise(promise);
573
551
  }
574
552
 
575
- return Rx;
553
+ return Rx;
576
554
  }));