{"version":3,"file":"rx.lite.extras.min.js","sources":["rx.lite.extras.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","tryCatcher","tryCatchTarget","apply","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","thrower","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","dispose","amb","p","c","toArray","x","notEmpty","length","arrayIndexOfComparer","array","item","comparer","i","len","HashSet","set","Observable","observableProto","prototype","observableNever","never","observableThrow","AnonymousObservable","AnonymousObserver","notificationCreateOnNext","Notification","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","create","Subject","internals","helpers","ScheduledObserver","SerialDisposable","SingleAssignmentDisposable","CompositeDisposable","RefCountDisposable","disposableEmpty","Disposable","empty","immediateScheduler","Scheduler","immediate","addRef","defaultKeySerializer","isPromise","identity","inherits","bindCallback","isScheduler","noop","observableFromPromise","fromPromise","ArgumentOutOfRangeError","scheduleWithState","CheckedObserver","__super__","observer","_observer","_state","CheckedObserverPrototype","onNext","value","checkAccess","res","onError","err","onCompleted","Error","ObserveOnObserver","cancel","_cancel","next","ensureActive","error","completed","checked","notifyOn","fromNotifier","handler","thisArg","handlerFunc","toNotifier","n","accept","asObserver","source","observeOn","subscribe","subscribeOn","m","d","setDisposable","schedule","generate","initialState","condition","iterate","resultSelector","currentThreadScheduler","o","first","scheduleRecursiveWithState","state","hasResult","result","using","resourceFactory","observableFactory","resource","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","leftSubscribe","left","rightSubscribe","right","items","acc","Array","isArray","onErrorResumeNext","second","sources","push","pos","subscription","cancelable","scheduleRecursive","current","bind","bufferWithCount","count","skip","windowWithCount","flatMap","filter","Math","abs","Infinity","createWindow","q","refCountDisposable","shift","takeLastBuffer","defaultIfEmpty","defaultValue","found","retValue","distinct","keySelector","defaultComparer","hashSet","key","singleInstance","getObservable","hasObservable","observable","publish","refCount"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,YAAY,EACZC,QAAU,GAIVC,EAAcH,QAAmBI,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAWN,QAAmBO,QAASA,KAAKC,QAAUD,KACtDE,EAAaT,QAAmBU,UAAWA,QAAUA,OAAOF,QAAUE,OACtEC,EAAaX,QAAmBY,UAAWA,SAAWA,OAAOP,UAAYO,OAEzEC,GADgBF,GAAcA,EAAWP,UAAYD,GAAeA,EACvDA,GAAeQ,GAA+B,gBAAVG,SAAsBA,QAAUA,OAAON,QAAUM,QAEhGC,EAAOA,EAAOF,GAAgBJ,KAAgBO,MAAQA,KAAKN,SAAYD,GAAeH,GAAYU,IAGhF,mBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,WAAY,SAAUE,EAAIf,GAChC,MAAOL,GAAQgB,EAAMX,EAASe,KAEL,gBAAXP,SAAuBA,QAAUA,OAAOR,UAAYD,EACpES,OAAOR,QAAUL,EAAQgB,EAAMH,OAAOR,QAASgB,QAAQ,YAEvDL,EAAKI,GAAKpB,EAAQgB,KAAUA,EAAKI,MAEnCE,KAAKL,KAAM,SAAUD,EAAMO,EAAKH,EAAII,GAsCpC,QAASC,KACP,IACE,MAAOC,GAAeC,MAAMV,KAAMW,WAClC,MAAOC,GAEP,MADAC,GAASD,EAAIA,EACNC,GAGX,QAASC,GAASC,GAChB,IAAKC,EAAWD,GAAO,KAAM,IAAIE,WAAU,wBAE3C,OADAR,GAAiBM,EACVP,EAET,QAASU,GAAQN,GACf,KAAMA,GAGR,QAASO,GAAoBC,EAAWC,GACtCrB,KAAKoB,UAAYA,EACjBpB,KAAKqB,WAAaA,EAClBrB,KAAKsB,YAAa,EAGpB,QAASC,GAAaC,EAAGjC,GAClBA,EAAK+B,aACR/B,EAAK+B,YAAa,EAClB/B,EAAK8B,WAAWI,WA6SpB,QAASC,GAAIC,EAAGC,GAAK,M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