PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END
19120
function switchMap(project, resultSelector) {
    if (typeof resultSelector === 'function') {
        return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
    }
    return function (source) { return source.lift(new SwitchMapOperator(project)); };
}
1225294
function bundleCompilers(compilers, opts) {
    if (!opts) { opts = {}; }

    var transforms = [].concat(opts.pipeTo || []);
    var s = stream.PassThrough({ objectMode: !!opts.objectMode });

    Rx.Node.writeToStream(
        compilers.flatMap(function (res) {
            var bundle = res.compiler.bundle(R.omit(["objectMode", "pipeTo"], opts));

            return Rx.Node.fromStream(
                R.reduce(function (b, t) {
                    return b.pipe(t(res.name, res.compiler));
                }, bundle, transforms)
            );
        }),
        s
    );

    return s;
}
81322
def fromimportreg(cls, bundle, import_reg):
        # type: (Bundle, ImportRegistration) -> RemoteServiceAdminEvent
        
        exc = import_reg.get_exception()
        if exc:
            return RemoteServiceAdminEvent(
                RemoteServiceAdminEvent.IMPORT_ERROR,
                bundle,
                import_reg.get_import_container_id(),
                import_reg.get_remoteservice_id(),
                None,
                None,
                exc,
                import_reg.get_description(),
            )

        return RemoteServiceAdminEvent(
            RemoteServiceAdminEvent.IMPORT_REGISTRATION,
            bundle,
            import_reg.get_import_container_id(),
            import_reg.get_remoteservice_id(),
            import_reg.get_import_reference(),
            None,
            None,
            import_reg.get_description(),
        )
69424
function defer(observableFactory) {
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        var input;
        try {
            input = observableFactory();
        }
        catch (err) {
            subscriber.error(err);
            return undefined;
        }
        var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
        return source.subscribe(subscriber);
    });
}
800602
function scalar(value) {
    var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        subscriber.next(value);
        subscriber.complete();
    });
    result._isScalar = true;
    result.value = value;
    return result;
}
261890
function main() {
    var program = require('commander')
    program.usage('FILE.d.ts... [options]')
    program.commandHelp = function() { return "  Convert *.d.ts files to TypeScript Declaration Core\n" }
    program.option('--pretty', 'Print pretty JSON, for human inspection')
        .option('--silent', 'Print nothing')
        .option('--lib', "Include TypeScript\'s lib.d.ts file")
    program.parse(process.argv)

    if (program.args.length < 1) {
        program.help()
    }

    var inputs = program.args.map(function(file) {
        return {
            file: file,
            text: fs.readFileSync(file, 'utf8')
        }
    })
    if (program.lib) {
        inputs.unshift({
            file: ">lib.d.ts",
            text: fs.readFileSync(__dirname + '/lib/lib.d.ts', 'utf8')
        })
    }
    var json = convert(inputs)
    if (program.silent)
        {}
    else if (program.pretty)
        console.log(util.inspect(json, {depth:null}))
    else
        console.log(JSON.stringify(json))
}
595407
function multicast(subjectOrSubjectFactory, selector) {
    return function multicastOperatorFunction(source) {
        var subjectFactory;
        if (typeof subjectOrSubjectFactory === 'function') {
            subjectFactory = subjectOrSubjectFactory;
        }
        else {
            subjectFactory = function subjectFactory() {
                return subjectOrSubjectFactory;
            };
        }
        if (typeof selector === 'function') {
            return source.lift(new MulticastOperator(subjectFactory, selector));
        }
        var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
        connectable.source = source;
        connectable.subjectFactory = subjectFactory;
        return connectable;
    };
}
529237
def map(self, mapper: Callable[[Any], Any]) -> 'Observable':
        
        """
        source = self
        return Observable(lambda on_next: source.subscribe(compose(on_next, mapper)))
166793
function (obj, resolve, reject) {
        // if promise like
        if (obj && typeof obj.then === 'function') {
            return Promise.resolve(obj).then(resolve).catch(reject);
        }
        // if observable
        if (obj && typeof obj.subscribe === 'function') {
            var obs_1 = obj;
            return new SafeSubscription(function (sub) { return obs_1.subscribe({
                next: function () {
                    if (sub.subscribed) {
                        sub.unsubscribe();
                        resolve(obj);
                    }
                },
                error: function (error) {
                    if (sub.subscribed) {
                        sub.unsubscribe();
                        reject(error);
                    }
                },
                complete: function () {
                    if (sub.subscribed) {
                        sub.unsubscribe();
                        resolve(obj);
                    }
                }
            }); });
        }
        // else just resolve
        try {
            return resolve(obj);
        }
        catch (error) {
            return reject(error);
        }
    }
1154357
function observableToPromise(observable) {
  if (!isObservable(observable)) {
    return observable;
  }
  return new Promise((resolve, reject) => {
    const subscription = observable.subscribe(
      v => {
        resolve(v);
        subscription.unsubscribe();
      },
      reject,
      () => {
        reject(new Error('no value resolved'));
      },
    );
  });
}
736631
function createImportTargets(importTargets, targetName, targetDirectory) {
  const importMap = {};
  for (const x in importTargets) {
    importMap['rxjs/' + x] = ('rxjs-compat/' + targetName + importTargets[x]).replace(/\.js$/, '');
  }

  const outputData =
`
"use strict"

var path = require('path');
var dir = path.resolve(__dirname);

module.exports = function() {
  return ${JSON.stringify(importMap, null, 4)};
}
`

  fs.outputFileSync(targetDirectory + 'path-mapping.js', outputData);
}
572569
function subscribe(observable, observer, options) {
	if (typeof observable !== 'object' || !observable)
		throw new TypeError('observable argument must be an Object');
	if (typeof observable.on !== 'function')
		throw new TypeError('observable.on must be a Function');
	if (typeof observer !== 'object' || !observer)
		throw new TypeError('observer argument must be an Object');

	const { masterHandler, messageTypes, queueName } = options;
	if (masterHandler && typeof masterHandler !== 'function')
		throw new TypeError('masterHandler parameter, when provided, must be a Function');
	if (queueName && typeof observable.queue !== 'function')
		throw new TypeError('observable.queue, when queueName is specified, must be a Function');

	const subscribeTo = messageTypes
		|| observer.handles
		|| Object.getPrototypeOf(observer).constructor.handles;
	if (!Array.isArray(subscribeTo))
		throw new TypeError('either options.messageTypes, observer.handles or ObserverType.handles is required');

	unique(subscribeTo).forEach(messageType => {
		const handler = masterHandler || getHandler(observer, messageType);
		if (!handler)
			throw new Error(`'${messageType}' handler is not defined or not a function`);

		if (queueName)
			observable.queue(queueName).on(messageType, handler.bind(observer));
		else
			observable.on(messageType, handler.bind(observer));
	});
}
1157216
function createTranspiler ({ mappers = {}, initialScopeData } = {}) {
  const config = {
    scope: createScope(initialScopeData),
    mappers
  };

  return (config.decoratedTranspile = transpile.bind(null, config));
}
577771
public void subscribe(Observable<M> observable, final boolean pullToRefresh) {

    if (isViewAttached()) {
      getView().showLoading(pullToRefresh);
    }

    unsubscribe();

    subscriber = new Subscriber<M>() {
      private boolean ptr = pullToRefresh;

      @Override public void onCompleted() {
        BaseRxLcePresenter.this.onCompleted();
      }

      @Override public void onError(Throwable e) {
        BaseRxLcePresenter.this.onError(e, ptr);
      }

      @Override public void onNext(M m) {
        BaseRxLcePresenter.this.onNext(m);
      }
    };

    observable.subscribeOn(Schedulers.io())
        .observeOn(AndroidSchedulers.mainThread())
        .subscribe(subscriber);
  }
699599
function () {
            return __WEBPACK_IMPORTED_MODULE_4_rxjs_Observable__["Observable"].merge.apply(__WEBPACK_IMPORTED_MODULE_4_rxjs_Observable__["Observable"], this.autocomplete.options.map(function (option) { return option.onSelectionChange; }));
        }
45205
function fromPromise(input, scheduler) {
    if (!scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__["subscribeToPromise"])(input));
    }
    else {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
            sub.add(scheduler.schedule(function () {
                return input.then(function (value) {
                    sub.add(scheduler.schedule(function () {
                        subscriber.next(value);
                        sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
                    }));
                }, function (err) {
                    sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
                });
            }));
            return sub;
        });
    }
}
692980
function collectTargetObservablesAndContext(templateObject) {
  var targets = [];
  var contexts = [];

  /**
   *
   * ```
   *   // context index sample (`x` == Observable)
   *   {
   *     foo: x, // => ['foo']
   *     bar: {
   *       foo: x, // => ['bar', 'foo']
   *       bar: [_, _, x]  // => ['bar', 'bar', 2]
   *     },
   *     baz: [_, x, _], // => ['baz', 1]
   *     qux: {
   *       foo: {
   *         foo: x // => ['qux', 'foo', 'foo']
   *       }
   *     }
   *   }
   * ```
   *
   * @param {Array<*>|Object<*>} list
   * @param {Array<Array<number|string>>} parentContext like [0, 3, 2...]
   */
  function walker(list, parentContext) {

    if (Array.isArray(list)) {
      list.forEach(evaluator);
    } else {
      Object.keys(list).forEach(function(key) {
        evaluator(list[key], key);
      });
    }

    function evaluator(value, key) {
      var context = parentContext.slice();
      context.push(key);

      // maybe isObservable
      if (value != null && value.subscribe != null && value.publish != null) {
        targets.push(value);
        contexts.push(context);

        // isArray || isObject
      } else if (Array.isArray(value) || (!!value && typeof value === 'object')) {
        walker(value, context);
      }
    }
  }

  walker(templateObject, []);

  return {
    targets  : targets,
    contexts : contexts
  };
}