{"version":3,"file":"upgrade.es5.js","sources":["../../../../packages/upgrade/src/dynamic/upgrade_adapter.ts","../../../../packages/upgrade/public_api.ts","../../../../packages/upgrade/src/dynamic/upgrade_ng1_adapter.ts","../../../../packages/upgrade/src/common/upgrade_helper.ts","../../../../packages/upgrade/src/common/downgrade_injectable.ts","../../../../packages/upgrade/src/common/downgrade_component.ts","../../../../packages/upgrade/src/common/downgrade_component_adapter.ts","../../../../packages/upgrade/src/common/util.ts","../../../../packages/upgrade/src/common/component_info.ts","../../../../packages/upgrade/src/common/constants.ts","../../../../packages/upgrade/src/common/angular1.ts","../../../../packages/upgrade/src/common/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Compiler, CompilerOptions, Directive, Injector, NgModule, NgModuleRef, NgZone, Provider, Testability, Type} from '@angular/core';\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\n\nimport * as angular from '../common/angular1';\nimport {$$TESTABILITY, $COMPILE, $INJECTOR, $ROOT_SCOPE, COMPILER_KEY, INJECTOR_KEY, NG_ZONE_KEY} from '../common/constants';\nimport {downgradeComponent} from '../common/downgrade_component';\nimport {downgradeInjectable} from '../common/downgrade_injectable';\nimport {Deferred, controllerKey, onError} from '../common/util';\n\nimport {UpgradeNg1ComponentAdapterBuilder} from './upgrade_ng1_adapter';\n\nlet /** @type {?} */ upgradeCount: number = 0;\n/**\n * Use `UpgradeAdapter` to allow AngularJS and Angular to coexist in a single application.\n * \n * The `UpgradeAdapter` allows:\n * 1. creation of Angular component from AngularJS component directive\n * (See [UpgradeAdapter#upgradeNg1Component()])\n * 2. creation of AngularJS directive from Angular component.\n * (See [UpgradeAdapter#downgradeNg2Component()])\n * 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks\n * coexisting in a single application.\n * \n * ## Mental Model\n * \n * When reasoning about how a hybrid application works it is useful to have a mental model which\n * describes what is happening and explains what is happening at the lowest level.\n * \n * 1. There are two independent frameworks running in a single application, each framework treats\n * the other as a black box.\n * 2. Each DOM element on the page is owned exactly by one framework. Whichever framework\n * instantiated the element is the owner. Each framework only updates/interacts with its own\n * DOM elements and ignores others.\n * 3. AngularJS directives always execute inside AngularJS framework codebase regardless of\n * where they are instantiated.\n * 4. Angular components always execute inside Angular framework codebase regardless of\n * where they are instantiated.\n * 5. An AngularJS component can be upgraded to an Angular component. This creates an\n * Angular directive, which bootstraps the AngularJS component directive in that location.\n * 6. An Angular component can be downgraded to an AngularJS component directive. This creates\n * an AngularJS directive, which bootstraps the Angular component in that location.\n * 7. Whenever an adapter component is instantiated the host element is owned by the framework\n * doing the instantiation. The other framework then instantiates and owns the view for that\n * component. This implies that component bindings will always follow the semantics of the\n * instantiation framework. The syntax is always that of Angular syntax.\n * 8. AngularJS is always bootstrapped first and owns the bottom most view.\n * 9. The new application is running in Angular zone, and therefore it no longer needs calls to\n * `$apply()`.\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module), myCompilerOptions);\n * const module = angular.module('myExample', []);\n * module.directive('ng2Comp', adapter.downgradeNg2Component(Ng2Component));\n * \n * module.directive('ng1Hello', function() {\n * return {\n * scope: { title: '=' },\n * template: 'ng1[Hello {{title}}!]()'\n * };\n * });\n * \n * \n * \\@Component({ \n * selector: 'ng2-comp',\n * inputs: ['name'],\n * template: 'ng2[transclude]()',\n * directives:\n * })\n * class Ng2Component {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2Component, adapter.upgradeNg1Component('ng1Hello')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * \n * document.body.innerHTML = 'project';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\n * \"ng2[ng1[Hello World!](transclude)](project)\");\n * });\n * \n * ```\n * \n * \\@stable\n */\nexport class UpgradeAdapter {\nprivate idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`;\nprivate downgradedComponents: Type[] = [];\n/**\n * An internal map of ng1 components which need to up upgraded to ng2.\n * \n * We can't upgrade until injector is instantiated and we can retrieve the component metadata.\n * For this reason we keep a list of components to upgrade until ng1 injector is bootstrapped.\n * \n * \\@internal\n */\nprivate ng1ComponentsToBeUpgraded: {[name: string]: UpgradeNg1ComponentAdapterBuilder} = {};\nprivate upgradedProviders: Provider[] = [];\nprivate ngZone: NgZone;\nprivate ng1Module: angular.IModule;\nprivate moduleRef: NgModuleRef|null = null;\nprivate ng2BootstrapDeferred: Deferred;\n/**\n * @param {?} ng2AppModule\n * @param {?=} compilerOptions\n */\nconstructor(private ng2AppModule: Type,\nprivate compilerOptions?: CompilerOptions) {\n if (!ng2AppModule) {\n throw new Error(\n 'UpgradeAdapter cannot be instantiated without an NgModule of the Angular app.');\n }\n }\n/**\n * Allows Angular Component to be used from AngularJS.\n * \n * Use `downgradeNg2Component` to create an AngularJS Directive Definition Factory from\n * Angular Component. The adapter will bootstrap Angular component from within the\n * AngularJS template.\n * \n * ## Mental Model\n * \n * 1. The component is instantiated by being listed in AngularJS template. This means that the\n * host element is controlled by AngularJS, but the component's view will be controlled by\n * Angular.\n * 2. Even thought the component is instantiated in AngularJS, it will be using Angular\n * syntax. This has to be done, this way because we must follow Angular components do not\n * declare how the attributes should be interpreted.\n * 3. `ng-model` is controlled by AngularJS and communicates with the downgraded Angular component\n * by way of the `ControlValueAccessor` interface from \\@angular/forms. Only components that\n * implement this interface are eligible.\n * \n * ## Supported Features\n * \n * - Bindings:\n * - Attribute: ``\n * - Interpolation: ``\n * - Expression: ``\n * - Event: ``\n * - ng-model: ``\n * - Content projection: yes\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module));\n * const module = angular.module('myExample', []);\n * module.directive('greet', adapter.downgradeNg2Component(Greeter));\n * \n * \\@Component({ \n * selector: 'greet',\n * template: '{{salutation}} {{name}}! - '\n * })\n * class Greeter {\n * \\@Input() salutation: string;\n * \\@Input() name: string;\n * }\n * \n * \\@NgModule({ \n * declarations: [Greeter],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML =\n * 'ng1 template: text';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng1 template: Hello world! - text\");\n * });\n * ```\n * @param {?} component\n * @return {?}\n */\ndowngradeNg2Component(component: Type): Function {\n this.downgradedComponents.push(component);\n\n return downgradeComponent({component});\n }\n/**\n * Allows AngularJS Component to be used from Angular.\n * \n * Use `upgradeNg1Component` to create an Angular component from AngularJS Component\n * directive. The adapter will bootstrap AngularJS component from within the Angular\n * template.\n * \n * ## Mental Model\n * \n * 1. The component is instantiated by being listed in Angular template. This means that the\n * host element is controlled by Angular, but the component's view will be controlled by\n * AngularJS.\n * \n * ## Supported Features\n * \n * - Bindings:\n * - Attribute: ``\n * - Interpolation: ``\n * - Expression: ``\n * - Event: ``\n * - Transclusion: yes\n * - Only some of the features of\n * [Directive Definition Object](https://docs.angularjs.org/api/ng/service/$compile) are\n * supported:\n * - `compile`: not supported because the host element is owned by Angular, which does\n * not allow modifying DOM structure during compilation.\n * - `controller`: supported. (NOTE: injection of `$attrs` and `$transclude` is not supported.)\n * - `controllerAs`: supported.\n * - `bindToController`: supported.\n * - `link`: supported. (NOTE: only pre-link function is supported.)\n * - `name`: supported.\n * - `priority`: ignored.\n * - `replace`: not supported.\n * - `require`: supported.\n * - `restrict`: must be set to 'E'.\n * - `scope`: supported.\n * - `template`: supported.\n * - `templateUrl`: supported.\n * - `terminal`: ignored.\n * - `transclude`: supported.\n * \n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(forwardRef(() => MyNg2Module));\n * const module = angular.module('myExample', []);\n * \n * module.directive('greet', function() {\n * return {\n * scope: {salutation: '=', name: '=' },\n * template: '{{salutation}} {{name}}! - '\n * };\n * });\n * \n * module.directive('ng2', adapter.downgradeNg2Component(Ng2Component));\n * \n * \\@Component({ \n * selector: 'ng2',\n * template: 'ng2 template: text'\n * })\n * class Ng2Component {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2Component, adapter.upgradeNg1Component('greet')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML = '';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\"ng2 template: Hello world! - text\");\n * });\n * ```\n * @param {?} name\n * @return {?}\n */\nupgradeNg1Component(name: string): Type {\n if (( /** @type {?} */((this.ng1ComponentsToBeUpgraded))).hasOwnProperty(name)) {\n return this.ng1ComponentsToBeUpgraded[name].type;\n } else {\n return (this.ng1ComponentsToBeUpgraded[name] = new UpgradeNg1ComponentAdapterBuilder(name))\n .type;\n }\n }\n/**\n * Registers the adapter's AngularJS upgrade module for unit testing in AngularJS.\n * Use this instead of `angular.mock.module()` to load the upgrade module into\n * the AngularJS testing injector.\n * \n * ### Example\n * \n * ```\n * const upgradeAdapter = new UpgradeAdapter(MyNg2Module);\n * \n * // configure the adapter with upgrade/downgrade components and services\n * upgradeAdapter.downgradeNg2Component(MyComponent);\n * \n * let upgradeAdapterRef: UpgradeAdapterRef;\n * let $compile, $rootScope;\n * \n * // We must register the adapter before any calls to `inject()`\n * beforeEach(() => {\n * upgradeAdapterRef = upgradeAdapter.registerForNg1Tests(['heroApp']);\n * });\n * \n * beforeEach(inject((_$compile_, _$rootScope_) => {\n * $compile = _$compile_;\n * $rootScope = _$rootScope_;\n * }));\n * \n * it(\"says hello\", (done) => {\n * upgradeAdapterRef.ready(() => {\n * const element = $compile(\"\")($rootScope);\n * $rootScope.$apply();\n * expect(element.html()).toContain(\"Hello World\");\n * done();\n * })\n * });\n * \n * ```\n * \n * @param {?=} modules any AngularJS modules that the upgrade module should depend upon\n * @return {?} an {\\@link UpgradeAdapterRef}, which lets you register a `ready()` callback to\n * run assertions once the Angular components are ready to test through AngularJS.\n */\nregisterForNg1Tests(modules?: string[]): UpgradeAdapterRef {\n const /** @type {?} */ windowNgMock = ( /** @type {?} */((window as any)))['angular'].mock;\n if (!windowNgMock || !windowNgMock.module) {\n throw new Error('Failed to find \\'angular.mock.module\\'.');\n }\n this.declareNg1Module(modules);\n windowNgMock.module(this.ng1Module.name);\n const /** @type {?} */ upgrade = new UpgradeAdapterRef();\n this.ng2BootstrapDeferred.promise.then(\n (ng1Injector) => { ( /** @type {?} */((upgrade)))._bootstrapDone(this.moduleRef, ng1Injector); }, onError);\n return upgrade;\n }\n/**\n * Bootstrap a hybrid AngularJS / Angular application.\n * \n * This `bootstrap` method is a direct replacement (takes same arguments) for AngularJS\n * [`bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method. Unlike\n * AngularJS, this bootstrap is asynchronous.\n * \n * ### Example\n * \n * ```\n * const adapter = new UpgradeAdapter(MyNg2Module);\n * const module = angular.module('myExample', []);\n * module.directive('ng2', adapter.downgradeNg2Component(Ng2));\n * \n * module.directive('ng1', function() {\n * return {\n * scope: { title: '=' },\n * template: 'ng1[Hello {{title}}!]()'\n * };\n * });\n * \n * \n * \\@Component({ \n * selector: 'ng2',\n * inputs: ['name'],\n * template: 'ng2[transclude]()'\n * })\n * class Ng2 {\n * }\n * \n * \\@NgModule({ \n * declarations: [Ng2, adapter.upgradeNg1Component('ng1')],\n * imports: [BrowserModule]\n * })\n * class MyNg2Module {}\n * \n * document.body.innerHTML = 'project';\n * \n * adapter.bootstrap(document.body, ['myExample']).ready(function() {\n * expect(document.body.textContent).toEqual(\n * \"ng2[ng1[Hello World!](transclude)](project)\");\n * });\n * ```\n * @param {?} element\n * @param {?=} modules\n * @param {?=} config\n * @return {?}\n */\nbootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig):\n UpgradeAdapterRef {\n this.declareNg1Module(modules);\n\n const /** @type {?} */ upgrade = new UpgradeAdapterRef();\n\n // Make sure resumeBootstrap() only exists if the current bootstrap is deferred\n const /** @type {?} */ windowAngular = ( /** @type {?} */((window as any)) /** TODO #???? */)['angular'];\n windowAngular.resumeBootstrap = undefined;\n\n this.ngZone.run(() => { angular.bootstrap(element, [this.ng1Module.name], /** @type {?} */(( config))); });\n const /** @type {?} */ ng1BootstrapPromise = new Promise((resolve) => {\n if (windowAngular.resumeBootstrap) {\n const /** @type {?} */ originalResumeBootstrap: () => void = windowAngular.resumeBootstrap;\n windowAngular.resumeBootstrap = function() {\n windowAngular.resumeBootstrap = originalResumeBootstrap;\n windowAngular.resumeBootstrap.apply(this, arguments);\n resolve();\n };\n } else {\n resolve();\n }\n });\n\n Promise.all([this.ng2BootstrapDeferred.promise, ng1BootstrapPromise]).then(([ng1Injector]) => { /** @type {?} */((\n angular.element(element).data))(controllerKey(INJECTOR_KEY), /** @type {?} */(( this.moduleRef)).injector); /** @type {?} */((\n this.moduleRef)).injector.get(NgZone).run(\n () => { ( /** @type {?} */((upgrade)))._bootstrapDone(this.moduleRef, ng1Injector); });\n }, onError);\n return upgrade;\n }\n/**\n * Allows AngularJS service to be accessible from Angular.\n * \n * \n * ### Example\n * \n * ```\n * class Login { ... }\n * class Server { ... }\n * \n * \\@Injectable() \n * class Example {\n * constructor(\\@Inject('server') server, login: Login) {\n * ...\n * }\n * }\n * \n * const module = angular.module('myExample', []);\n * module.service('server', Server);\n * module.service('login', Login);\n * \n * const adapter = new UpgradeAdapter(MyNg2Module);\n * adapter.upgradeNg1Provider('server');\n * adapter.upgradeNg1Provider('login', {asToken: Login});\n * \n * adapter.bootstrap(document.body, ['myExample']).ready((ref) => {\n * const example: Example = ref.ng2Injector.get(Example);\n * });\n * \n * ```\n * @param {?} name\n * @param {?=} options\n * @return {?}\n */\nupgradeNg1Provider(name: string, options?: {asToken: any}) {\n const /** @type {?} */ token = options && options.asToken || name;\n this.upgradedProviders.push({\n provide: token,\n useFactory: ($injector: angular.IInjectorService) => $injector.get(name),\n deps: [$INJECTOR]\n });\n }\n/**\n * Allows Angular service to be accessible from AngularJS.\n * \n * \n * ### Example\n * \n * ```\n * class Example {\n * }\n * \n * const adapter = new UpgradeAdapter(MyNg2Module);\n * \n * const module = angular.module('myExample', []);\n * module.factory('example', adapter.downgradeNg2Provider(Example));\n * \n * adapter.bootstrap(document.body, ['myExample']).ready((ref) => {\n * const example: Example = ref.ng1Injector.get('example');\n * });\n * \n * ```\n * @param {?} token\n * @return {?}\n */\ndowngradeNg2Provider(token: any): Function { return downgradeInjectable(token); }\n/**\n * Declare the AngularJS upgrade module for this adapter without bootstrapping the whole\n * hybrid application.\n * \n * This method is automatically called by `bootstrap()` and `registerForNg1Tests()`.\n * \n * @param {?=} modules The AngularJS modules that this upgrade module should depend upon.\n * @return {?} The AngularJS upgrade module that is declared by this method\n * \n * ### Example\n * \n * ```\n * const upgradeAdapter = new UpgradeAdapter(MyNg2Module);\n * upgradeAdapter.declareNg1Module(['heroApp']);\n * ```\n */\nprivate declareNg1Module(modules: string[] = []): angular.IModule {\n const /** @type {?} */ delayApplyExps: Function[] = [];\n let /** @type {?} */ original$applyFn: Function;\n let /** @type {?} */ rootScopePrototype: any;\n let /** @type {?} */ rootScope: angular.IRootScopeService;\n const /** @type {?} */ upgradeAdapter = this;\n const /** @type {?} */ ng1Module = this.ng1Module = angular.module(this.idPrefix, modules);\n const /** @type {?} */ platformRef = platformBrowserDynamic();\n\n this.ngZone = new NgZone({enableLongStackTrace: Zone.hasOwnProperty('longStackTraceZoneSpec')});\n this.ng2BootstrapDeferred = new Deferred();\n ng1Module.factory(INJECTOR_KEY, () => /** @type {?} */(( this.moduleRef)).injector.get(Injector))\n .constant(NG_ZONE_KEY, this.ngZone)\n .factory(COMPILER_KEY, () => /** @type {?} */(( this.moduleRef)).injector.get(Compiler))\n .config([\n '$provide', '$injector',\n (provide: angular.IProvideService, ng1Injector: angular.IInjectorService) => {\n provide.decorator($ROOT_SCOPE, [\n '$delegate',\n function(rootScopeDelegate: angular.IRootScopeService) {\n // Capture the root apply so that we can delay first call to $apply until we\n // bootstrap Angular and then we replay and restore the $apply.\n rootScopePrototype = rootScopeDelegate.constructor.prototype;\n if (rootScopePrototype.hasOwnProperty('$apply')) {\n original$applyFn = rootScopePrototype.$apply;\n rootScopePrototype.$apply = (exp: any) => delayApplyExps.push(exp);\n } else {\n throw new Error('Failed to find \\'$apply\\' on \\'$rootScope\\'!');\n }\n return rootScope = rootScopeDelegate;\n }\n ]);\n if (ng1Injector.has($$TESTABILITY)) {\n provide.decorator($$TESTABILITY, [\n '$delegate',\n function(testabilityDelegate: angular.ITestabilityService) {\n const /** @type {?} */ originalWhenStable: Function = testabilityDelegate.whenStable;\n // Cannot use arrow function below because we need the context\n const /** @type {?} */ newWhenStable = function(callback: Function) {\n originalWhenStable.call(this, function() {\n const /** @type {?} */ ng2Testability: Testability = /** @type {?} */((\n upgradeAdapter.moduleRef)).injector.get(Testability);\n if (ng2Testability.isStable()) {\n callback.apply(this, arguments);\n } else {\n ng2Testability.whenStable(newWhenStable.bind(this, callback));\n }\n });\n };\n\n testabilityDelegate.whenStable = newWhenStable;\n return testabilityDelegate;\n }\n ]);\n }\n }\n ]);\n\n ng1Module.run([\n '$injector', '$rootScope',\n (ng1Injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => {\n UpgradeNg1ComponentAdapterBuilder.resolve(this.ng1ComponentsToBeUpgraded, ng1Injector)\n .then(() => {\n // At this point we have ng1 injector and we have prepared\n // ng1 components to be upgraded, we now can bootstrap ng2.\n const /** @type {?} */ DynamicNgUpgradeModule =\n NgModule({\n providers: [\n {provide: $INJECTOR, useFactory: () => ng1Injector},\n {provide: $COMPILE, useFactory: () => ng1Injector.get($COMPILE)},\n this.upgradedProviders\n ],\n imports: [this.ng2AppModule],\n entryComponents: this.downgradedComponents\n }).Class({\n constructor: function DynamicNgUpgradeModule() {},\n ngDoBootstrap: function() {}\n });\n ( /** @type {?} */((platformRef as any)))\n ._bootstrapModuleWithZone(\n DynamicNgUpgradeModule, this.compilerOptions, this.ngZone)\n .then((ref: NgModuleRef) => {\n this.moduleRef = ref;\n this.ngZone.run(() => {\n if (rootScopePrototype) {\n rootScopePrototype.$apply = original$applyFn; // restore original $apply\n while (delayApplyExps.length) {\n rootScope.$apply(delayApplyExps.shift());\n }\n rootScopePrototype = null;\n }\n });\n })\n .then(() => this.ng2BootstrapDeferred.resolve(ng1Injector), onError)\n .then(() => {\n let /** @type {?} */ subscription =\n this.ngZone.onMicrotaskEmpty.subscribe({next: () => rootScope.$digest()});\n rootScope.$on('$destroy', () => { subscription.unsubscribe(); });\n });\n })\n .catch((e) => this.ng2BootstrapDeferred.reject(e));\n }\n ]);\n\n return ng1Module;\n }\n}\n\nfunction UpgradeAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeAdapter.prototype.idPrefix;\n/** @type {?} */\nUpgradeAdapter.prototype.downgradedComponents;\n/**\n * An internal map of ng1 components which need to up upgraded to ng2.\n * \n * We can't upgrade until injector is instantiated and we can retrieve the component metadata.\n * For this reason we keep a list of components to upgrade until ng1 injector is bootstrapped.\n * \n * \\@internal\n * @type {?}\n */\nUpgradeAdapter.prototype.ng1ComponentsToBeUpgraded;\n/** @type {?} */\nUpgradeAdapter.prototype.upgradedProviders;\n/** @type {?} */\nUpgradeAdapter.prototype.ngZone;\n/** @type {?} */\nUpgradeAdapter.prototype.ng1Module;\n/** @type {?} */\nUpgradeAdapter.prototype.moduleRef;\n/** @type {?} */\nUpgradeAdapter.prototype.ng2BootstrapDeferred;\n/** @type {?} */\nUpgradeAdapter.prototype.ng2AppModule;\n/** @type {?} */\nUpgradeAdapter.prototype.compilerOptions;\n}\n\n/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of AngularJS's $compile.\n */\nclass ParentInjectorPromise {\nprivate injector: Injector;\nprivate callbacks: ((injector: Injector) => any)[] = [];\n/**\n * @param {?} element\n */\nconstructor(private element: angular.IAugmentedJQuery) {\n // store the promise on the element\n element.data !(controllerKey(INJECTOR_KEY), this);\n }\n/**\n * @param {?} callback\n * @return {?}\n */\nthen(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n/**\n * @param {?} injector\n * @return {?}\n */\nresolve(injector: Injector) {\n this.injector = injector; /** @type {?} */((\n\n // reset the element data to point to the real injector\n this.element.data))(controllerKey(INJECTOR_KEY), injector);\n\n // clean out the element to prevent memory leaks\n this.element = /** @type {?} */(( null));\n\n // run all the queued callbacks\n this.callbacks.forEach((callback) => callback(injector));\n this.callbacks.length = 0;\n }\n}\n\nfunction ParentInjectorPromise_tsickle_Closure_declarations() {\n/** @type {?} */\nParentInjectorPromise.prototype.injector;\n/** @type {?} */\nParentInjectorPromise.prototype.callbacks;\n/** @type {?} */\nParentInjectorPromise.prototype.element;\n}\n\n/**\n * Use `UpgradeAdapterRef` to control a hybrid AngularJS / Angular application.\n * \n * \\@stable\n */\nexport class UpgradeAdapterRef {\nprivate _readyFn: ((upgradeAdapterRef?: UpgradeAdapterRef) => void)|null = null;\npublic ng1RootScope: angular.IRootScopeService = /** @type {?} */(( null));\npublic ng1Injector: angular.IInjectorService = /** @type {?} */(( null));\npublic ng2ModuleRef: NgModuleRef = /** @type {?} */(( null));\npublic ng2Injector: Injector = /** @type {?} */(( null));\n/**\n * @param {?} ngModuleRef\n * @param {?} ng1Injector\n * @return {?}\n */\nprivate _bootstrapDone(ngModuleRef: NgModuleRef, ng1Injector: angular.IInjectorService) {\n this.ng2ModuleRef = ngModuleRef;\n this.ng2Injector = ngModuleRef.injector;\n this.ng1Injector = ng1Injector;\n this.ng1RootScope = ng1Injector.get($ROOT_SCOPE);\n this._readyFn && this._readyFn(this);\n }\n/**\n * Register a callback function which is notified upon successful hybrid AngularJS / Angular\n * application has been bootstrapped.\n * \n * The `ready` callback function is invoked inside the Angular zone, therefore it does not\n * require a call to `$apply()`.\n * @param {?} fn\n * @return {?}\n */\npublic ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void) { this._readyFn = fn; }\n/**\n * Dispose of running hybrid AngularJS / Angular application.\n * @return {?}\n */\npublic dispose() { /** @type {?} */((\n this.ng1Injector)).get($ROOT_SCOPE).$destroy(); /** @type {?} */((\n this.ng2ModuleRef)).destroy();\n }\n}\n\nfunction UpgradeAdapterRef_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeAdapterRef.prototype._readyFn;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng1RootScope;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng1Injector;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng2ModuleRef;\n/** @type {?} */\nUpgradeAdapterRef.prototype.ng2Injector;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the upgrade/dynamic package, allowing\n * Angular 1 and Angular 2+ to run side by side in the same application.\n */\nexport {VERSION} from './src/common/version';\nexport {UpgradeAdapter, UpgradeAdapterRef} from './src/dynamic/upgrade_adapter';\n\n// This file only re-exports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, DoCheck, ElementRef, EventEmitter, Inject, Injector, OnChanges, OnInit, SimpleChange, SimpleChanges, Type} from '@angular/core';\n\nimport * as angular from '../common/angular1';\nimport {$SCOPE} from '../common/constants';\nimport {IBindingDestination, IControllerInstance, UpgradeHelper} from '../common/upgrade_helper';\nimport {isFunction, strictEquals} from '../common/util';\n\n\nconst /** @type {?} */ CAMEL_CASE = /([A-Z])/g;\nconst /** @type {?} */ INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nconst /** @type {?} */ NOT_SUPPORTED: any = 'NOT_SUPPORTED';\nexport class UpgradeNg1ComponentAdapterBuilder {\n type: Type;\n inputs: string[] = [];\n inputsRename: string[] = [];\n outputs: string[] = [];\n outputsRename: string[] = [];\n propertyOutputs: string[] = [];\n checkProperties: string[] = [];\n propertyMap: {[name: string]: string} = {};\n directive: angular.IDirective|null = null;\n template: string;\n/**\n * @param {?} name\n */\nconstructor(public name: string) {\n const selector =\n name.replace(CAMEL_CASE, (all: string, next: string) => '-' + next.toLowerCase());\n const self = this;\n\n this.type =\n Directive({selector: selector, inputs: this.inputsRename, outputs: this.outputsRename})\n .Class({\n constructor: [\n new Inject($SCOPE), Injector, ElementRef,\n function(scope: angular.IScope, injector: Injector, elementRef: ElementRef) {\n const helper = new UpgradeHelper(injector, name, elementRef, this.directive);\n return new UpgradeNg1ComponentAdapter(\n helper, scope, self.template, self.inputs, self.outputs, self.propertyOutputs,\n self.checkProperties, self.propertyMap);\n }\n ],\n ngOnInit: function() { /* needs to be here for ng2 to properly detect it */ },\n ngOnChanges: function() { /* needs to be here for ng2 to properly detect it */ },\n ngDoCheck: function() { /* needs to be here for ng2 to properly detect it */ },\n ngOnDestroy: function() { /* needs to be here for ng2 to properly detect it */ },\n });\n }\n/**\n * @return {?}\n */\nextractBindings() {\n const /** @type {?} */ btcIsObject = typeof /** @type {?} */(( this.directive)).bindToController === 'object';\n if (btcIsObject && Object.keys( /** @type {?} */((this.directive)).scope).length) {\n throw new Error(\n `Binding definitions on scope and controller at the same time are not supported.`);\n }\n\n const /** @type {?} */ context = (btcIsObject) ? /** @type {?} */(( this.directive)).bindToController : /** @type {?} */(( this.directive)).scope;\n\n if (typeof context == 'object') {\n Object.keys(context).forEach(propName => {\n const /** @type {?} */ definition = context[propName];\n const /** @type {?} */ bindingType = definition.charAt(0);\n const /** @type {?} */ bindingOptions = definition.charAt(1);\n const /** @type {?} */ attrName = definition.substring(bindingOptions === '?' ? 2 : 1) || propName;\n\n // QUESTION: What about `=*`? Ignore? Throw? Support?\n\n const /** @type {?} */ inputName = `input_${attrName}`;\n const /** @type {?} */ inputNameRename = `${inputName}: ${attrName}`;\n const /** @type {?} */ outputName = `output_${attrName}`;\n const /** @type {?} */ outputNameRename = `${outputName}: ${attrName}`;\n const /** @type {?} */ outputNameRenameChange = `${outputNameRename}Change`;\n\n switch (bindingType) {\n case '@':\n case '<':\n this.inputs.push(inputName);\n this.inputsRename.push(inputNameRename);\n this.propertyMap[inputName] = propName;\n break;\n case '=':\n this.inputs.push(inputName);\n this.inputsRename.push(inputNameRename);\n this.propertyMap[inputName] = propName;\n\n this.outputs.push(outputName);\n this.outputsRename.push(outputNameRenameChange);\n this.propertyMap[outputName] = propName;\n\n this.checkProperties.push(propName);\n this.propertyOutputs.push(outputName);\n break;\n case '&':\n this.outputs.push(outputName);\n this.outputsRename.push(outputNameRename);\n this.propertyMap[outputName] = propName;\n break;\n default:\n let /** @type {?} */ json = JSON.stringify(context);\n throw new Error(\n `Unexpected mapping '${bindingType}' in '${json}' in '${this.name}' directive.`);\n }\n });\n }\n }\n/**\n * Upgrade ng1 components into Angular.\n * @param {?} exportedComponents\n * @param {?} $injector\n * @return {?}\n */\nstatic resolve(\n exportedComponents: {[name: string]: UpgradeNg1ComponentAdapterBuilder},\n $injector: angular.IInjectorService): Promise {\n const /** @type {?} */ promises = Object.keys(exportedComponents).map(name => {\n const /** @type {?} */ exportedComponent = exportedComponents[name];\n exportedComponent.directive = UpgradeHelper.getDirective($injector, name);\n exportedComponent.extractBindings();\n\n return Promise\n .resolve(UpgradeHelper.getTemplate($injector, exportedComponent.directive, true))\n .then(template => exportedComponent.template = template);\n });\n\n return Promise.all(promises);\n }\n}\n\nfunction UpgradeNg1ComponentAdapterBuilder_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.type;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.inputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.inputsRename;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.outputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.outputsRename;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.propertyOutputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.checkProperties;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.propertyMap;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.directive;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.template;\n/** @type {?} */\nUpgradeNg1ComponentAdapterBuilder.prototype.name;\n}\n\nclass UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck {\nprivate controllerInstance: IControllerInstance|null = null;\n destinationObj: IBindingDestination|null = null;\n checkLastValues: any[] = [];\nprivate directive: angular.IDirective;\n element: Element;\n $element: any = null;\n componentScope: angular.IScope;\n/**\n * @param {?} helper\n * @param {?} scope\n * @param {?} template\n * @param {?} inputs\n * @param {?} outputs\n * @param {?} propOuts\n * @param {?} checkProperties\n * @param {?} propertyMap\n */\nconstructor(\nprivate helper: UpgradeHelper, scope: angular.IScope,\nprivate template: string,\nprivate inputs: string[],\nprivate outputs: string[],\nprivate propOuts: string[],\nprivate checkProperties: string[],\nprivate propertyMap: {[key: string]: string}) {\n this.directive = helper.directive;\n this.element = helper.element;\n this.$element = helper.$element;\n this.componentScope = scope.$new(!!this.directive.scope);\n\n const controllerType = this.directive.controller;\n\n if (this.directive.bindToController && controllerType) {\n this.controllerInstance = this.helper.buildController(controllerType, this.componentScope);\n this.destinationObj = this.controllerInstance;\n } else {\n this.destinationObj = this.componentScope;\n }\n\n for (let i = 0; i < inputs.length; i++) {\n (this as any)[inputs[i]] = null;\n }\n for (let j = 0; j < outputs.length; j++) {\n const emitter = (this as any)[outputs[j]] = new EventEmitter();\n this.setComponentProperty(\n outputs[j], (emitter => (value: any) => emitter.emit(value))(emitter));\n }\n for (let k = 0; k < propOuts.length; k++) {\n this.checkLastValues.push(INITIAL_VALUE);\n }\n }\n/**\n * @return {?}\n */\nngOnInit() {\n // Collect contents, insert and compile template\n const /** @type {?} */ attachChildNodes: angular.ILinkFn|undefined = this.helper.prepareTransclusion();\n const /** @type {?} */ linkFn = this.helper.compileTemplate(this.template);\n\n // Instantiate controller (if not already done so)\n const /** @type {?} */ controllerType = this.directive.controller;\n const /** @type {?} */ bindToController = this.directive.bindToController;\n if (controllerType && !bindToController) {\n this.controllerInstance = this.helper.buildController(controllerType, this.componentScope);\n }\n\n // Require other controllers\n const /** @type {?} */ requiredControllers =\n this.helper.resolveAndBindRequiredControllers(this.controllerInstance);\n\n // Hook: $onInit\n if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {\n this.controllerInstance.$onInit();\n }\n\n // Linking\n const /** @type {?} */ link = this.directive.link;\n const /** @type {?} */ preLink = (typeof link == 'object') && ( /** @type {?} */((link as angular.IDirectivePrePost))).pre;\n const /** @type {?} */ postLink = (typeof link == 'object') ? ( /** @type {?} */((link as angular.IDirectivePrePost))).post : link;\n const /** @type {?} */ attrs: angular.IAttributes = NOT_SUPPORTED;\n const /** @type {?} */ transcludeFn: angular.ITranscludeFunction = NOT_SUPPORTED;\n if (preLink) {\n preLink(this.componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n linkFn(this.componentScope, /** @type {?} */(( null)), {parentBoundTranscludeFn: attachChildNodes});\n\n if (postLink) {\n postLink(this.componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n // Hook: $postLink\n if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {\n this.controllerInstance.$postLink();\n }\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges) {\n const /** @type {?} */ ng1Changes: any = {};\n Object.keys(changes).forEach(name => {\n const /** @type {?} */ change: SimpleChange = changes[name];\n this.setComponentProperty(name, change.currentValue);\n ng1Changes[this.propertyMap[name]] = change;\n });\n\n if (isFunction( /** @type {?} */((this.destinationObj)).$onChanges)) { /** @type {?} */(( /** @type {?} */((\n this.destinationObj)).$onChanges))(ng1Changes);\n }\n }\n/**\n * @return {?}\n */\nngDoCheck() {\n const /** @type {?} */ destinationObj = this.destinationObj;\n const /** @type {?} */ lastValues = this.checkLastValues;\n const /** @type {?} */ checkProperties = this.checkProperties;\n const /** @type {?} */ propOuts = this.propOuts;\n checkProperties.forEach((propName, i) => {\n const /** @type {?} */ value = /** @type {?} */(( destinationObj))[propName];\n const /** @type {?} */ last = lastValues[i];\n if (!strictEquals(last, value)) {\n const /** @type {?} */ eventEmitter: EventEmitter = ( /** @type {?} */((this as any)))[propOuts[i]];\n eventEmitter.emit(lastValues[i] = value);\n }\n });\n\n if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {\n this.controllerInstance.$doCheck();\n }\n }\n/**\n * @return {?}\n */\nngOnDestroy() {\n if (this.controllerInstance && isFunction(this.controllerInstance.$onDestroy)) {\n this.controllerInstance.$onDestroy();\n }\n }\n/**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\nsetComponentProperty(name: string, value: any) { /** @type {?} */((\n this.destinationObj))[this.propertyMap[name]] = value;\n }\n}\n\nfunction UpgradeNg1ComponentAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.controllerInstance;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.destinationObj;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.checkLastValues;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.directive;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.element;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.$element;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.componentScope;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.helper;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.template;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.inputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.outputs;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.propOuts;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.checkProperties;\n/** @type {?} */\nUpgradeNg1ComponentAdapter.prototype.propertyMap;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ElementRef, Injector, SimpleChanges} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {$COMPILE, $CONTROLLER, $HTTP_BACKEND, $INJECTOR, $TEMPLATE_CACHE} from './constants';\nimport {controllerKey, directiveNormalize, isFunction} from './util';\n\n\n// Constants\nconst /** @type {?} */ REQUIRE_PREFIX_RE = /^(\\^\\^?)?(\\?)?(\\^\\^?)?/;\n\n// Interfaces\nexport interface IBindingDestination {\n [key: string]: any;\n $onChanges?: (changes: SimpleChanges) => void;\n}\n\nexport interface IControllerInstance extends IBindingDestination {\n $doCheck?: () => void;\n $onDestroy?: () => void;\n $onInit?: () => void;\n $postLink?: () => void;\n}\nexport class UpgradeHelper {\npublic readonly $injector: angular.IInjectorService;\npublic readonly element: Element;\npublic readonly $element: angular.IAugmentedJQuery;\npublic readonly directive: angular.IDirective;\nprivate readonly $compile: angular.ICompileService;\nprivate readonly $controller: angular.IControllerService;\n/**\n * @param {?} injector\n * @param {?} name\n * @param {?} elementRef\n * @param {?=} directive\n */\nconstructor(\nprivate injector: Injector,\nprivate name: string, elementRef: ElementRef,\n directive?: angular.IDirective) {\n this.$injector = injector.get($INJECTOR);\n this.$compile = this.$injector.get($COMPILE);\n this.$controller = this.$injector.get($CONTROLLER);\n\n this.element = elementRef.nativeElement;\n this.$element = angular.element(this.element);\n\n this.directive = directive || UpgradeHelper.getDirective(this.$injector, name);\n }\n/**\n * @param {?} $injector\n * @param {?} name\n * @return {?}\n */\nstatic getDirective($injector: angular.IInjectorService, name: string): angular.IDirective {\n const /** @type {?} */ directives: angular.IDirective[] = $injector.get(name + 'Directive');\n if (directives.length > 1) {\n throw new Error(`Only support single directive definition for: ${name}`);\n }\n\n const /** @type {?} */ directive = directives[0];\n\n // AngularJS will transform `link: xyz` to `compile: () => xyz`. So we can only tell there was a\n // user-defined `compile` if there is no `link`. In other cases, we will just ignore `compile`.\n if (directive.compile && !directive.link) notSupported(name, 'compile');\n if (directive.replace) notSupported(name, 'replace');\n if (directive.terminal) notSupported(name, 'terminal');\n\n return directive;\n }\n/**\n * @param {?} $injector\n * @param {?} directive\n * @param {?=} fetchRemoteTemplate\n * @return {?}\n */\nstatic getTemplate(\n $injector: angular.IInjectorService, directive: angular.IDirective,\n fetchRemoteTemplate = false): string|Promise {\n if (directive.template !== undefined) {\n return getOrCall(directive.template);\n } else if (directive.templateUrl) {\n const /** @type {?} */ $templateCache = /** @type {?} */(( $injector.get($TEMPLATE_CACHE) as angular.ITemplateCacheService));\n const /** @type {?} */ url = getOrCall(directive.templateUrl);\n const /** @type {?} */ template = $templateCache.get(url);\n\n if (template !== undefined) {\n return template;\n } else if (!fetchRemoteTemplate) {\n throw new Error('loading directive templates asynchronously is not supported');\n }\n\n return new Promise((resolve, reject) => {\n const /** @type {?} */ $httpBackend = /** @type {?} */(( $injector.get($HTTP_BACKEND) as angular.IHttpBackendService));\n $httpBackend('GET', url, null, (status: number, response: string) => {\n if (status === 200) {\n resolve($templateCache.put(url, response));\n } else {\n reject(`GET component template from '${url}' returned '${status}: ${response}'`);\n }\n });\n });\n } else {\n throw new Error(`Directive '${directive.name}' is not a component, it is missing template.`);\n }\n }\n/**\n * @param {?} controllerType\n * @param {?} $scope\n * @return {?}\n */\nbuildController(controllerType: angular.IController, $scope: angular.IScope) {\n // TODO: Document that we do not pre-assign bindings on the controller instance.\n // Quoted properties below so that this code can be optimized with Closure Compiler.\n const /** @type {?} */ locals = {'$scope': $scope, '$element': this.$element};\n const /** @type {?} */ controller = this.$controller(controllerType, locals, null, this.directive.controllerAs); /** @type {?} */((\n\n this.$element.data))(controllerKey( /** @type {?} */((this.directive.name))), controller);\n\n return controller;\n }\n/**\n * @param {?=} template\n * @return {?}\n */\ncompileTemplate(template?: string): angular.ILinkFn {\n if (template === undefined) {\n template = /** @type {?} */(( UpgradeHelper.getTemplate(this.$injector, this.directive) as string));\n }\n\n return this.compileHtml(template);\n }\n/**\n * @return {?}\n */\nprepareTransclusion(): angular.ILinkFn|undefined {\n const /** @type {?} */ transclude = this.directive.transclude;\n const /** @type {?} */ contentChildNodes = this.extractChildNodes();\n let /** @type {?} */ $template = contentChildNodes;\n let /** @type {?} */ attachChildrenFn: angular.ILinkFn|undefined = (scope, cloneAttach) => /** @type {?} */((\n cloneAttach))($template, scope);\n\n if (transclude) {\n const /** @type {?} */ slots = Object.create(null);\n\n if (typeof transclude === 'object') {\n $template = [];\n\n const /** @type {?} */ slotMap = Object.create(null);\n const /** @type {?} */ filledSlots = Object.create(null);\n\n // Parse the element selectors.\n Object.keys(transclude).forEach(slotName => {\n let /** @type {?} */ selector = transclude[slotName];\n const /** @type {?} */ optional = selector.charAt(0) === '?';\n selector = optional ? selector.substring(1) : selector;\n\n slotMap[selector] = slotName;\n slots[slotName] = null; // `null`: Defined but not yet filled.\n filledSlots[slotName] = optional; // Consider optional slots as filled.\n });\n\n // Add the matching elements into their slot.\n contentChildNodes.forEach(node => {\n const /** @type {?} */ slotName = slotMap[directiveNormalize(node.nodeName.toLowerCase())];\n if (slotName) {\n filledSlots[slotName] = true;\n slots[slotName] = slots[slotName] || [];\n slots[slotName].push(node);\n } else {\n $template.push(node);\n }\n });\n\n // Check for required slots that were not filled.\n Object.keys(filledSlots).forEach(slotName => {\n if (!filledSlots[slotName]) {\n throw new Error(`Required transclusion slot '${slotName}' on directive: ${this.name}`);\n }\n });\n\n Object.keys(slots).filter(slotName => slots[slotName]).forEach(slotName => {\n const /** @type {?} */ nodes = slots[slotName];\n slots[slotName] = (scope: angular.IScope, cloneAttach: angular.ICloneAttachFunction) => /** @type {?} */((\n cloneAttach))(nodes, scope);\n });\n }\n\n // Attach `$$slots` to default slot transclude fn.\n attachChildrenFn.$$slots = slots;\n\n // AngularJS v1.6+ ignores empty or whitespace-only transcluded text nodes. But Angular\n // removes all text content after the first interpolation and updates it later, after\n // evaluating the expressions. This would result in AngularJS failing to recognize text\n // nodes that start with an interpolation as transcluded content and use the fallback\n // content instead.\n // To avoid this issue, we add a\n // [zero-width non-joiner character](https://en.wikipedia.org/wiki/Zero-width_non-joiner)\n // to empty text nodes (which can only be a result of Angular removing their initial content).\n // NOTE: Transcluded text content that starts with whitespace followed by an interpolation\n // will still fail to be detected by AngularJS v1.6+\n $template.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE && !node.nodeValue) {\n node.nodeValue = '\\u200C';\n }\n });\n }\n\n return attachChildrenFn;\n }\n/**\n * @param {?} controllerInstance\n * @return {?}\n */\nresolveAndBindRequiredControllers(controllerInstance: IControllerInstance|null) {\n const /** @type {?} */ directiveRequire = this.getDirectiveRequire();\n const /** @type {?} */ requiredControllers = this.resolveRequire(directiveRequire);\n\n if (controllerInstance && this.directive.bindToController && isMap(directiveRequire)) {\n const /** @type {?} */ requiredControllersMap = /** @type {?} */(( requiredControllers as{[key: string]: IControllerInstance}));\n Object.keys(requiredControllersMap).forEach(key => {\n controllerInstance[key] = requiredControllersMap[key];\n });\n }\n\n return requiredControllers;\n }\n/**\n * @param {?} html\n * @return {?}\n */\nprivate compileHtml(html: string): angular.ILinkFn {\n this.element.innerHTML = html;\n return this.$compile(this.element.childNodes);\n }\n/**\n * @return {?}\n */\nprivate extractChildNodes(): Node[] {\n const /** @type {?} */ childNodes: Node[] = [];\n let /** @type {?} */ childNode: Node|null;\n\n while (childNode = this.element.firstChild) {\n this.element.removeChild(childNode);\n childNodes.push(childNode);\n }\n\n return childNodes;\n }\n/**\n * @return {?}\n */\nprivate getDirectiveRequire(): angular.DirectiveRequireProperty {\n const /** @type {?} */ require = this.directive.require || /** @type {?} */(( (this.directive.controller && this.directive.name)));\n\n if (isMap(require)) {\n Object.keys(require).forEach(key => {\n const /** @type {?} */ value = require[key];\n const /** @type {?} */ match = /** @type {?} */(( value.match(REQUIRE_PREFIX_RE)));\n const /** @type {?} */ name = value.substring(match[0].length);\n\n if (!name) {\n require[key] = match[0] + key;\n }\n });\n }\n\n return require;\n }\n/**\n * @param {?} require\n * @param {?=} controllerInstance\n * @return {?}\n */\nprivate resolveRequire(require: angular.DirectiveRequireProperty, controllerInstance?: any):\n angular.SingleOrListOrMap|null {\n if (!require) {\n return null;\n } else if (Array.isArray(require)) {\n return require.map(req => this.resolveRequire(req));\n } else if (typeof require === 'object') {\n const /** @type {?} */ value: {[key: string]: IControllerInstance} = {};\n Object.keys(require).forEach(key => value[key] = /** @type {?} */(( this.resolveRequire(require[key]))));\n return value;\n } else if (typeof require === 'string') {\n const /** @type {?} */ match = /** @type {?} */(( require.match(REQUIRE_PREFIX_RE)));\n const /** @type {?} */ inheritType = match[1] || match[3];\n\n const /** @type {?} */ name = require.substring(match[0].length);\n const /** @type {?} */ isOptional = !!match[2];\n const /** @type {?} */ searchParents = !!inheritType;\n const /** @type {?} */ startOnParent = inheritType === '^^';\n\n const /** @type {?} */ ctrlKey = controllerKey(name);\n const /** @type {?} */ elem = startOnParent ? /** @type {?} */(( this.$element.parent))() : this.$element;\n const /** @type {?} */ value = searchParents ? /** @type {?} */(( elem.inheritedData))(ctrlKey) : /** @type {?} */(( elem.data))(ctrlKey);\n\n if (!value && !isOptional) {\n throw new Error(\n `Unable to find required '${require}' in upgraded directive '${this.name}'.`);\n }\n\n return value;\n } else {\n throw new Error(\n `Unrecognized 'require' syntax on upgraded directive '${this.name}': ${require}`);\n }\n }\n}\n\nfunction UpgradeHelper_tsickle_Closure_declarations() {\n/** @type {?} */\nUpgradeHelper.prototype.$injector;\n/** @type {?} */\nUpgradeHelper.prototype.element;\n/** @type {?} */\nUpgradeHelper.prototype.$element;\n/** @type {?} */\nUpgradeHelper.prototype.directive;\n/** @type {?} */\nUpgradeHelper.prototype.$compile;\n/** @type {?} */\nUpgradeHelper.prototype.$controller;\n/** @type {?} */\nUpgradeHelper.prototype.injector;\n/** @type {?} */\nUpgradeHelper.prototype.name;\n}\n\n/**\n * @template T\n * @param {?} property\n * @return {?}\n */\nfunction getOrCall(property: T | Function): T {\n return isFunction(property) ? property() : property;\n}\n/**\n * @template T\n * @param {?} value\n * @return {?}\n */\nfunction isMap(value: angular.SingleOrListOrMap): value is {[key: string]: T} {\n return value && !Array.isArray(value) && typeof value === 'object';\n}\n/**\n * @param {?} name\n * @param {?} feature\n * @return {?}\n */\nfunction notSupported(name: string, feature: string) {\n throw new Error(`Upgraded directive '${name}' contains unsupported feature: '${feature}'.`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Injector} from '@angular/core';\nimport {INJECTOR_KEY} from './constants';\n/**\n * \\@whatItDoes \n * \n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n * \n * Allow an Angular service to be accessible from AngularJS.\n * \n * \\@howToUse \n * \n * First ensure that the service to be downgraded is provided in an {\\@link NgModule}\n * that will be part of the upgrade application. For example, let's assume we have\n * defined `HeroesService`\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes-service\"}\n * \n * and that we have included this in our upgrade app {\\@link NgModule}\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-module\"}\n * \n * Now we can register the `downgradeInjectable` factory function for the service\n * on an AngularJS module.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"downgrade-ng2-heroes-service\"}\n * \n * Inside an AngularJS component's controller we can get hold of the\n * downgraded service via the name we gave when downgrading.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"example-app\"}\n * \n * \\@description \n * \n * Takes a `token` that identifies a service provided from Angular.\n * \n * Returns a [factory function](https://docs.angularjs.org/guide/di) that can be\n * used to register the service on an AngularJS module.\n * \n * The factory function provides access to the Angular service that\n * is identified by the `token` parameter.\n * \n * \\@experimental\n * @param {?} token\n * @return {?}\n */\nexport function downgradeInjectable(token: any): Function {\n const /** @type {?} */ factory = function(i: Injector) { return i.get(token); };\n ( /** @type {?} */((factory as any)))['$inject'] = [INJECTOR_KEY];\n\n return factory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ComponentFactory, ComponentFactoryResolver, Injector, Type} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {$COMPILE, $INJECTOR, $PARSE, INJECTOR_KEY, REQUIRE_INJECTOR, REQUIRE_NG_MODEL} from './constants';\nimport {DowngradeComponentAdapter} from './downgrade_component_adapter';\nimport {controllerKey, getComponentName} from './util';\n/**\n * \\@whatItDoes \n * \n * *Part of the [upgrade/static](api?query=upgrade%2Fstatic)\n * library for hybrid upgrade apps that support AoT compilation*\n * \n * Allows an Angular component to be used from AngularJS.\n * \n * \\@howToUse \n * \n * Let's assume that you have an Angular component called `ng2Heroes` that needs\n * to be made available in AngularJS templates.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes\"}\n * \n * We must create an AngularJS [directive](https://docs.angularjs.org/guide/directive)\n * that will make this Angular component available inside AngularJS templates.\n * The `downgradeComponent()` function returns a factory function that we\n * can use to define the AngularJS directive that wraps the \"downgraded\" component.\n * \n * {\\@example upgrade/static/ts/module.ts region=\"ng2-heroes-wrapper\"}\n * \n * \\@description \n * \n * A helper function that returns a factory function to be used for registering an\n * AngularJS wrapper directive for \"downgrading\" an Angular component.\n * \n * The parameter contains information about the Component that is being downgraded:\n * \n * * `component: Type`: The type of the Component that will be downgraded\n * \n * \\@experimental\n * @param {?} info\n * @return {?}\n */\nexport function downgradeComponent(info: {\n component: Type;\n /** @deprecated since v4. This parameter is no longer used */\n inputs?: string[];\n /** @deprecated since v4. This parameter is no longer used */\n outputs?: string[];\n /** @deprecated since v4. This parameter is no longer used */\n selectors?: string[];\n}): any /* angular.IInjectable */ {\n const /** @type {?} */ directiveFactory:\n angular.IAnnotatedFunction = function(\n $compile: angular.ICompileService,\n $injector: angular.IInjectorService,\n $parse: angular.IParseService): angular.IDirective {\n\n return {\n restrict: 'E',\n terminal: true,\n require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],\n link: (scope: angular.IScope, element: angular.IAugmentedJQuery, attrs: angular.IAttributes,\n required: any[]) => {\n // We might have to compile the contents asynchronously, because this might have been\n // triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have\n // been compiled.\n\n const /** @type {?} */ parentInjector: Injector|ParentInjectorPromise =\n required[0] || $injector.get(INJECTOR_KEY);\n const /** @type {?} */ ngModel: angular.INgModelController = required[1];\n\n const /** @type {?} */ downgradeFn = (injector: Injector) => {\n const /** @type {?} */ componentFactoryResolver: ComponentFactoryResolver =\n injector.get(ComponentFactoryResolver);\n const /** @type {?} */ componentFactory: ComponentFactory = /** @type {?} */((\n componentFactoryResolver.resolveComponentFactory(info.component)));\n\n if (!componentFactory) {\n throw new Error('Expecting ComponentFactory for: ' + getComponentName(info.component));\n }\n\n const /** @type {?} */ injectorPromise = new ParentInjectorPromise(element);\n const /** @type {?} */ facade = new DowngradeComponentAdapter(\n element, attrs, scope, ngModel, injector, $injector, $compile, $parse,\n componentFactory);\n\n const /** @type {?} */ projectableNodes = facade.compileContents();\n facade.createComponent(projectableNodes);\n facade.setupInputs();\n facade.setupOutputs();\n facade.registerCleanup();\n\n injectorPromise.resolve(facade.getInjector());\n };\n\n if (parentInjector instanceof ParentInjectorPromise) {\n parentInjector.then(downgradeFn);\n } else {\n downgradeFn(parentInjector);\n }\n }\n };\n };\n\n // bracket-notation because of closure - see #14441\n directiveFactory['$inject'] = [$COMPILE, $INJECTOR, $PARSE];\n return directiveFactory;\n}\n/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of Angular 1's $compile.\n */\nclass ParentInjectorPromise {\nprivate injector: Injector;\nprivate injectorKey: string = controllerKey(INJECTOR_KEY);\nprivate callbacks: ((injector: Injector) => any)[] = [];\n/**\n * @param {?} element\n */\nconstructor(private element: angular.IAugmentedJQuery) {\n // Store the promise on the element.\n element.data !(this.injectorKey, this);\n }\n/**\n * @param {?} callback\n * @return {?}\n */\nthen(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n/**\n * @param {?} injector\n * @return {?}\n */\nresolve(injector: Injector) {\n this.injector = injector; /** @type {?} */((\n\n // Store the real injector on the element.\n this.element.data))(this.injectorKey, injector);\n\n // Release the element to prevent memory leaks.\n this.element = /** @type {?} */(( null));\n\n // Run the queued callbacks.\n this.callbacks.forEach(callback => callback(injector));\n this.callbacks.length = 0;\n }\n}\n\nfunction ParentInjectorPromise_tsickle_Closure_declarations() {\n/** @type {?} */\nParentInjectorPromise.prototype.injector;\n/** @type {?} */\nParentInjectorPromise.prototype.injectorKey;\n/** @type {?} */\nParentInjectorPromise.prototype.callbacks;\n/** @type {?} */\nParentInjectorPromise.prototype.element;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ChangeDetectorRef, ComponentFactory, ComponentRef, EventEmitter, Injector, OnChanges, ReflectiveInjector, SimpleChange, SimpleChanges, Type} from '@angular/core';\n\nimport * as angular from './angular1';\nimport {PropertyBinding} from './component_info';\nimport {$SCOPE} from './constants';\nimport {getAttributesAsArray, getComponentName, hookupNgModel, strictEquals} from './util';\n\nconst /** @type {?} */ INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\nexport class DowngradeComponentAdapter {\nprivate inputChangeCount: number = 0;\nprivate inputChanges: SimpleChanges|null = null;\nprivate componentScope: angular.IScope;\nprivate componentRef: ComponentRef|null = null;\nprivate component: any = null;\nprivate changeDetector: ChangeDetectorRef|null = null;\n/**\n * @param {?} element\n * @param {?} attrs\n * @param {?} scope\n * @param {?} ngModel\n * @param {?} parentInjector\n * @param {?} $injector\n * @param {?} $compile\n * @param {?} $parse\n * @param {?} componentFactory\n */\nconstructor(\nprivate element: angular.IAugmentedJQuery,\nprivate attrs: angular.IAttributes,\nprivate scope: angular.IScope,\nprivate ngModel: angular.INgModelController,\nprivate parentInjector: Injector,\nprivate $injector: angular.IInjectorService,\nprivate $compile: angular.ICompileService,\nprivate $parse: angular.IParseService,\nprivate componentFactory: ComponentFactory) {\n this.componentScope = scope.$new();\n }\n/**\n * @return {?}\n */\ncompileContents(): Node[][] {\n const /** @type {?} */ compiledProjectableNodes: Node[][] = [];\n const /** @type {?} */ projectableNodes: Node[][] = this.groupProjectableNodes();\n const /** @type {?} */ linkFns = projectableNodes.map(nodes => this.$compile(nodes)); /** @type {?} */((\n\n this.element.empty))();\n\n linkFns.forEach(linkFn => {\n linkFn(this.scope, (clone: Node[]) => {\n compiledProjectableNodes.push(clone); /** @type {?} */((\n this.element.append))(clone);\n });\n });\n\n return compiledProjectableNodes;\n }\n/**\n * @param {?} projectableNodes\n * @return {?}\n */\ncreateComponent(projectableNodes: Node[][]) {\n const /** @type {?} */ childInjector = ReflectiveInjector.resolveAndCreate(\n [{provide: $SCOPE, useValue: this.componentScope}], this.parentInjector);\n\n this.componentRef =\n this.componentFactory.create(childInjector, projectableNodes, this.element[0]);\n this.changeDetector = this.componentRef.changeDetectorRef;\n this.component = this.componentRef.instance;\n\n hookupNgModel(this.ngModel, this.component);\n }\n/**\n * @return {?}\n */\nsetupInputs(): void {\n const /** @type {?} */ attrs = this.attrs;\n const /** @type {?} */ inputs = this.componentFactory.inputs || [];\n for (let /** @type {?} */ i = 0; i < inputs.length; i++) {\n const /** @type {?} */ input = new PropertyBinding(inputs[i].propName, inputs[i].templateName);\n let /** @type {?} */ expr: string|null = null;\n\n if (attrs.hasOwnProperty(input.attr)) {\n const /** @type {?} */ observeFn = (prop => {\n let /** @type {?} */ prevValue = INITIAL_VALUE;\n return (currValue: any) => {\n // Initially, both `$observe()` and `$watch()` will call this function.\n if (!strictEquals(prevValue, currValue)) {\n if (prevValue === INITIAL_VALUE) {\n prevValue = currValue;\n }\n\n this.updateInput(prop, prevValue, currValue);\n prevValue = currValue;\n }\n };\n })(input.prop);\n attrs.$observe(input.attr, observeFn);\n\n // Use `$watch()` (in addition to `$observe()`) in order to initialize the input in time\n // for `ngOnChanges()`. This is necessary if we are already in a `$digest`, which means that\n // `ngOnChanges()` (which is called by a watcher) will run before the `$observe()` callback.\n let /** @type {?} */ unwatch: Function|null = this.componentScope.$watch(() => { /** @type {?} */((\n unwatch))();\n unwatch = null;\n observeFn(attrs[input.attr]);\n });\n\n } else if (attrs.hasOwnProperty(input.bindAttr)) {\n expr = attrs[input.bindAttr];\n } else if (attrs.hasOwnProperty(input.bracketAttr)) {\n expr = attrs[input.bracketAttr];\n } else if (attrs.hasOwnProperty(input.bindonAttr)) {\n expr = attrs[input.bindonAttr];\n } else if (attrs.hasOwnProperty(input.bracketParenAttr)) {\n expr = attrs[input.bracketParenAttr];\n }\n if (expr != null) {\n const /** @type {?} */ watchFn =\n (prop => (currValue: any, prevValue: any) =>\n this.updateInput(prop, prevValue, currValue))(input.prop);\n this.componentScope.$watch(expr, watchFn);\n }\n }\n\n const /** @type {?} */ prototype = this.componentFactory.componentType.prototype;\n if (prototype && ( /** @type {?} */((prototype))).ngOnChanges) {\n // Detect: OnChanges interface\n this.inputChanges = {};\n this.componentScope.$watch(() => this.inputChangeCount, () => {\n const /** @type {?} */ inputChanges = this.inputChanges;\n this.inputChanges = {};\n ( /** @type {?} */((this.component))).ngOnChanges( /** @type {?} */((inputChanges)));\n });\n }\n this.componentScope.$watch(() => this.changeDetector && this.changeDetector.detectChanges());\n }\n/**\n * @return {?}\n */\nsetupOutputs() {\n const /** @type {?} */ attrs = this.attrs;\n const /** @type {?} */ outputs = this.componentFactory.outputs || [];\n for (let /** @type {?} */ j = 0; j < outputs.length; j++) {\n const /** @type {?} */ output = new PropertyBinding(outputs[j].propName, outputs[j].templateName);\n let /** @type {?} */ expr: string|null = null;\n let /** @type {?} */ assignExpr = false;\n\n const /** @type {?} */ bindonAttr = output.bindonAttr.substring(0, output.bindonAttr.length - 6);\n const /** @type {?} */ bracketParenAttr =\n `[(${output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8)})]`;\n\n if (attrs.hasOwnProperty(output.onAttr)) {\n expr = attrs[output.onAttr];\n } else if (attrs.hasOwnProperty(output.parenAttr)) {\n expr = attrs[output.parenAttr];\n } else if (attrs.hasOwnProperty(bindonAttr)) {\n expr = attrs[bindonAttr];\n assignExpr = true;\n } else if (attrs.hasOwnProperty(bracketParenAttr)) {\n expr = attrs[bracketParenAttr];\n assignExpr = true;\n }\n\n if (expr != null && assignExpr != null) {\n const /** @type {?} */ getter = this.$parse(expr);\n const /** @type {?} */ setter = getter.assign;\n if (assignExpr && !setter) {\n throw new Error(`Expression '${expr}' is not assignable!`);\n }\n const /** @type {?} */ emitter = /** @type {?} */(( this.component[output.prop] as EventEmitter));\n if (emitter) {\n emitter.subscribe({\n next: assignExpr ? (v: any) => /** @type {?} */(( setter))(this.scope, v) :\n (v: any) => getter(this.scope, {'$event': v})\n });\n } else {\n throw new Error(\n `Missing emitter '${output.prop}' on component '${getComponentName(this.componentFactory.componentType)}'!`);\n }\n }\n }\n }\n/**\n * @return {?}\n */\nregisterCleanup() { /** @type {?} */((\n this.element.bind))('$destroy', () => {\n this.componentScope.$destroy(); /** @type {?} */((\n this.componentRef)).destroy();\n });\n }\n/**\n * @return {?}\n */\ngetInjector(): Injector { return /** @type {?} */(( this.componentRef)) && /** @type {?} */(( this.componentRef)).injector; }\n/**\n * @param {?} prop\n * @param {?} prevValue\n * @param {?} currValue\n * @return {?}\n */\nprivate updateInput(prop: string, prevValue: any, currValue: any) {\n if (this.inputChanges) {\n this.inputChangeCount++;\n this.inputChanges[prop] = new SimpleChange(prevValue, currValue, prevValue === currValue);\n }\n\n this.component[prop] = currValue;\n }\n/**\n * @return {?}\n */\ngroupProjectableNodes() {\n let /** @type {?} */ ngContentSelectors = this.componentFactory.ngContentSelectors;\n return groupNodesBySelector(ngContentSelectors, /** @type {?} */(( this.element.contents))());\n }\n}\n\nfunction DowngradeComponentAdapter_tsickle_Closure_declarations() {\n/** @type {?} */\nDowngradeComponentAdapter.prototype.inputChangeCount;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.inputChanges;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentScope;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentRef;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.component;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.changeDetector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.element;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.attrs;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.scope;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.ngModel;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.parentInjector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$injector;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$compile;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.$parse;\n/** @type {?} */\nDowngradeComponentAdapter.prototype.componentFactory;\n}\n\n/**\n * Group a set of DOM nodes into `ngContent` groups, based on the given content selectors.\n * @param {?} ngContentSelectors\n * @param {?} nodes\n * @return {?}\n */\nexport function groupNodesBySelector(ngContentSelectors: string[], nodes: Node[]): Node[][] {\n const /** @type {?} */ projectableNodes: Node[][] = [];\n let /** @type {?} */ wildcardNgContentIndex: number;\n\n for (let /** @type {?} */ i = 0, /** @type {?} */ ii = ngContentSelectors.length; i < ii; ++i) {\n projectableNodes[i] = [];\n }\n\n for (let /** @type {?} */ j = 0, /** @type {?} */ jj = nodes.length; j < jj; ++j) {\n const /** @type {?} */ node = nodes[j];\n const /** @type {?} */ ngContentIndex = findMatchingNgContentIndex(node, ngContentSelectors);\n if (ngContentIndex != null) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n\n return projectableNodes;\n}\n/**\n * @param {?} element\n * @param {?} ngContentSelectors\n * @return {?}\n */\nfunction findMatchingNgContentIndex(element: any, ngContentSelectors: string[]): number|null {\n const /** @type {?} */ ngContentIndices: number[] = [];\n let /** @type {?} */ wildcardNgContentIndex: number = -1;\n for (let /** @type {?} */ i = 0; i < ngContentSelectors.length; i++) {\n const /** @type {?} */ selector = ngContentSelectors[i];\n if (selector === '*') {\n wildcardNgContentIndex = i;\n } else {\n if (matchesSelector(element, selector)) {\n ngContentIndices.push(i);\n }\n }\n }\n ngContentIndices.sort();\n\n if (wildcardNgContentIndex !== -1) {\n ngContentIndices.push(wildcardNgContentIndex);\n }\n return ngContentIndices.length ? ngContentIndices[0] : null;\n}\n\nlet /** @type {?} */ _matches: (this: any, selector: string) => boolean;\n/**\n * @param {?} el\n * @param {?} selector\n * @return {?}\n */\nfunction matchesSelector(el: any, selector: string): boolean {\n if (!_matches) {\n const /** @type {?} */ elProto = /** @type {?} */(( Element.prototype));\n _matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector ||\n elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector;\n }\n return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Type} from '@angular/core';\nimport * as angular from './angular1';\n\nconst /** @type {?} */ DIRECTIVE_PREFIX_REGEXP = /^(?:x|data)[:\\-_]/i;\nconst /** @type {?} */ DIRECTIVE_SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\n/**\n * @param {?} e\n * @return {?}\n */\nexport function onError(e: any) {\n // TODO: (misko): We seem to not have a stack trace here!\n if (console.error) {\n console.error(e, e.stack);\n } else {\n // tslint:disable-next-line:no-console\n console.log(e, e.stack);\n }\n throw e;\n}\n/**\n * @param {?} name\n * @return {?}\n */\nexport function controllerKey(name: string): string {\n return '$' + name + 'Controller';\n}\n/**\n * @param {?} name\n * @return {?}\n */\nexport function directiveNormalize(name: string): string {\n return name.replace(DIRECTIVE_PREFIX_REGEXP, '')\n .replace(DIRECTIVE_SPECIAL_CHARS_REGEXP, (_, letter) => letter.toUpperCase());\n}\n/**\n * @param {?} node\n * @return {?}\n */\nexport function getAttributesAsArray(node: Node): [string, string][] {\n const /** @type {?} */ attributes = node.attributes;\n let /** @type {?} */ asArray: [string, string][] = /** @type {?} */(( undefined));\n if (attributes) {\n let /** @type {?} */ attrLen = attributes.length;\n asArray = new Array(attrLen);\n for (let /** @type {?} */ i = 0; i < attrLen; i++) {\n asArray[i] = [attributes[i].nodeName, /** @type {?} */(( attributes[i].nodeValue))];\n }\n }\n return asArray || [];\n}\n/**\n * @param {?} component\n * @return {?}\n */\nexport function getComponentName(component: Type): string {\n // Return the name of the component or the first line of its stringified version.\n return ( /** @type {?} */((component as any))).overriddenName || component.name || component.toString().split('\\n')[0];\n}\n/**\n * @param {?} value\n * @return {?}\n */\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function';\n}\nexport class Deferred {\n promise: Promise;\n resolve: (value?: R|PromiseLike) => void;\n reject: (error?: any) => void;\nconstructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\nfunction Deferred_tsickle_Closure_declarations() {\n/** @type {?} */\nDeferred.prototype.promise;\n/** @type {?} */\nDeferred.prototype.resolve;\n/** @type {?} */\nDeferred.prototype.reject;\n}\n\n/**\n * @param {?} component\n * @return {?} Whether the passed-in component implements the subset of the\n * `ControlValueAccessor` interface needed for AngularJS `ng-model`\n * compatibility.\n */\nfunction supportsNgModel(component: any) {\n return typeof component.writeValue === 'function' &&\n typeof component.registerOnChange === 'function';\n}\n/**\n * Glue the AngularJS `NgModelController` (if it exists) to the component\n * (if it implements the needed subset of the `ControlValueAccessor` interface).\n * @param {?} ngModel\n * @param {?} component\n * @return {?}\n */\nexport function hookupNgModel(ngModel: angular.INgModelController, component: any) {\n if (ngModel && supportsNgModel(component)) {\n ngModel.$render = () => { component.writeValue(ngModel.$viewValue); };\n component.registerOnChange(ngModel.$setViewValue.bind(ngModel));\n }\n}\n/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n * @param {?} val1\n * @param {?} val2\n * @return {?}\n */\nexport function strictEquals(val1: any, val2: any): boolean {\n return val1 === val2 || (val1 !== val1 && val2 !== val2);\n}\n","\n/**\n * A `PropertyBinding` represents a mapping between a property name\n * and an attribute name. It is parsed from a string of the form\n * `\"prop: attr\"`; or simply `\"propAndAttr\" where the property\n * and attribute have the same identifier.\n */\nexport class PropertyBinding {\n bracketAttr: string;\n bracketParenAttr: string;\n parenAttr: string;\n onAttr: string;\n bindAttr: string;\n bindonAttr: string;\n/**\n * @param {?} prop\n * @param {?} attr\n */\nconstructor(public prop: string,\npublic attr: string) { this.parseBinding(); }\n/**\n * @return {?}\n */\nprivate parseBinding() {\n this.bracketAttr = `[${this.attr}]`;\n this.parenAttr = `(${this.attr})`;\n this.bracketParenAttr = `[(${this.attr})]`;\n const /** @type {?} */ capitalAttr = this.attr.charAt(0).toUpperCase() + this.attr.substr(1);\n this.onAttr = `on${capitalAttr}`;\n this.bindAttr = `bind${capitalAttr}`;\n this.bindonAttr = `bindon${capitalAttr}`;\n }\n}\n\nfunction PropertyBinding_tsickle_Closure_declarations() {\n/** @type {?} */\nPropertyBinding.prototype.bracketAttr;\n/** @type {?} */\nPropertyBinding.prototype.bracketParenAttr;\n/** @type {?} */\nPropertyBinding.prototype.parenAttr;\n/** @type {?} */\nPropertyBinding.prototype.onAttr;\n/** @type {?} */\nPropertyBinding.prototype.bindAttr;\n/** @type {?} */\nPropertyBinding.prototype.bindonAttr;\n/** @type {?} */\nPropertyBinding.prototype.prop;\n/** @type {?} */\nPropertyBinding.prototype.attr;\n}\n\n","\n/**\n * @license \n * Copyright Google Inc. All Rights Reserved.\n * \n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport const $COMPILE = '$compile';\nexport const /** @type {?} */ $CONTROLLER = '$controller';\nexport const /** @type {?} */ $DELEGATE = '$delegate';\nexport const /** @type {?} */ $HTTP_BACKEND = '$httpBackend';\nexport const /** @type {?} */ $INJECTOR = '$injector';\nexport const /** @type {?} */ $INTERVAL = '$interval';\nexport const /** @type {?} */ $PARSE = '$parse';\nexport const /** @type {?} */ $PROVIDE = '$provide';\nexport const /** @type {?} */ $ROOT_SCOPE = '$rootScope';\nexport const /** @type {?} */ $SCOPE = '$scope';\nexport const /** @type {?} */ $TEMPLATE_CACHE = '$templateCache';\nexport const /** @type {?} */ $TEMPLATE_REQUEST = '$templateRequest';\n\nexport const /** @type {?} */ $$TESTABILITY = '$$testability';\n\nexport const /** @type {?} */ COMPILER_KEY = '$$angularCompiler';\nexport const /** @type {?} */ GROUP_PROJECTABLE_NODES_KEY = '$$angularGroupProjectableNodes';\nexport const /** @type {?} */ INJECTOR_KEY = '$$angularInjector';\nexport const /** @type {?} */ NG_ZONE_KEY = '$$angularNgZone';\n\nexport const /** @type {?} */ REQUIRE_INJECTOR = '?^^' + INJECTOR_KEY;\nexport const /** @type {?} */ REQUIRE_NG_MODEL = '?ngModel';\n\nexport const /** @type {?} */ UPGRADE_MODULE_NAME = '$$UpgradeModule';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport type Ng1Token = string;\n\nexport type Ng1Expression = string | Function;\n\nexport interface IAnnotatedFunction extends Function { $inject?: Ng1Token[]; }\n\nexport type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction;\n\nexport type SingleOrListOrMap = T | T[] | {[key: string]: T};\n\nexport interface IModule {\n name: string;\n requires: (string|IInjectable)[];\n config(fn: IInjectable): IModule;\n directive(selector: string, factory: IInjectable): IModule;\n component(selector: string, component: IComponent): IModule;\n controller(name: string, type: IInjectable): IModule;\n factory(key: Ng1Token, factoryFn: IInjectable): IModule;\n value(key: Ng1Token, value: any): IModule;\n constant(token: Ng1Token, value: any): IModule;\n run(a: IInjectable): IModule;\n}\nexport interface ICompileService {\n (element: Element|NodeList|Node[]|string, transclude?: Function): ILinkFn;\n}\nexport interface ILinkFn {\n (scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ILinkFnOptions): IAugmentedJQuery;\n $$slots?: {[slotName: string]: ILinkFn};\n}\nexport interface ILinkFnOptions {\n parentBoundTranscludeFn?: Function;\n transcludeControllers?: {[key: string]: any};\n futureParentElement?: Node;\n}\nexport interface IRootScopeService {\n $new(isolate?: boolean): IScope;\n $id: string;\n $parent: IScope;\n $root: IScope;\n $watch(exp: Ng1Expression, fn?: (a1?: any, a2?: any) => void): Function;\n $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;\n $destroy(): any;\n $apply(exp?: Ng1Expression): any;\n $digest(): any;\n $evalAsync(exp: Ng1Expression, locals?: any): void;\n $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;\n $$childTail: IScope;\n $$childHead: IScope;\n $$nextSibling: IScope;\n [key: string]: any;\n}\nexport interface IScope extends IRootScopeService {}\n\nexport interface IAngularBootstrapConfig { strictDi?: boolean; }\nexport interface IDirective {\n compile?: IDirectiveCompileFn;\n controller?: IController;\n controllerAs?: string;\n bindToController?: boolean|{[key: string]: string};\n link?: IDirectiveLinkFn|IDirectivePrePost;\n name?: string;\n priority?: number;\n replace?: boolean;\n require?: DirectiveRequireProperty;\n restrict?: string;\n scope?: boolean|{[key: string]: string};\n template?: string|Function;\n templateUrl?: string|Function;\n templateNamespace?: string;\n terminal?: boolean;\n transclude?: DirectiveTranscludeProperty;\n}\nexport type DirectiveRequireProperty = SingleOrListOrMap;\nexport type DirectiveTranscludeProperty = boolean | 'element' | {[key: string]: string};\nexport interface IDirectiveCompileFn {\n (templateElement: IAugmentedJQuery, templateAttributes: IAttributes,\n transclude: ITranscludeFunction): IDirectivePrePost;\n}\nexport interface IDirectivePrePost {\n pre?: IDirectiveLinkFn;\n post?: IDirectiveLinkFn;\n}\nexport interface IDirectiveLinkFn {\n (scope: IScope, instanceElement: IAugmentedJQuery, instanceAttributes: IAttributes,\n controller: any, transclude: ITranscludeFunction): void;\n}\nexport interface IComponent {\n bindings?: {[key: string]: string};\n controller?: string|IInjectable;\n controllerAs?: string;\n require?: DirectiveRequireProperty;\n template?: string|Function;\n templateUrl?: string|Function;\n transclude?: DirectiveTranscludeProperty;\n}\nexport interface IAttributes {\n $observe(attr: string, fn: (v: string) => void): void;\n [key: string]: any;\n}\nexport interface ITranscludeFunction {\n // If the scope is provided, then the cloneAttachFn must be as well.\n (scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;\n // If one argument is provided, then it's assumed to be the cloneAttachFn.\n (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;\n}\nexport interface ICloneAttachFunction {\n // Let's hint but not force cloneAttachFn's signature\n (clonedElement?: IAugmentedJQuery, scope?: IScope): any;\n}\nexport type IAugmentedJQuery = Node[] & {\n bind?: (name: string, fn: () => void) => void;\n data?: (name: string, value?: any) => any;\n text?: () => string;\n inheritedData?: (name: string, value?: any) => any;\n contents?: () => IAugmentedJQuery;\n parent?: () => IAugmentedJQuery;\n empty?: () => void;\n append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;\n controller?: (name: string) => any;\n isolateScope?: () => IScope;\n injector?: () => IInjectorService;\n};\nexport interface IProvider { $get: IInjectable; }\nexport interface IProvideService {\n provider(token: Ng1Token, provider: IProvider): IProvider;\n factory(token: Ng1Token, factory: IInjectable): IProvider;\n service(token: Ng1Token, type: IInjectable): IProvider;\n value(token: Ng1Token, value: any): IProvider;\n constant(token: Ng1Token, value: any): void;\n decorator(token: Ng1Token, factory: IInjectable): void;\n}\nexport interface IParseService { (expression: string): ICompiledExpression; }\nexport interface ICompiledExpression {\n (context: any, locals: any): any;\n assign?: (context: any, value: any) => any;\n}\nexport interface IHttpBackendService {\n (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number,\n withCredentials?: boolean): void;\n}\nexport interface ICacheObject {\n put(key: string, value?: T): T;\n get(key: string): any;\n}\nexport interface ITemplateCacheService extends ICacheObject {}\nexport interface ITemplateRequestService {\n (template: string|any /* TrustedResourceUrl */, ignoreRequestError?: boolean): Promise;\n totalPendingRequests: number;\n}\nexport type IController = string | IInjectable;\nexport interface IControllerService {\n (controllerConstructor: IController, locals?: any, later?: any, ident?: any): any;\n (controllerName: string, locals?: any): any;\n}\n\nexport interface IInjectorService {\n get(key: string): any;\n has(key: string): boolean;\n}\n\nexport interface IIntervalService {\n (func: Function, delay: number, count?: number, invokeApply?: boolean,\n ...args: any[]): Promise;\n cancel(promise: Promise): boolean;\n}\n\nexport interface ITestabilityService {\n findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];\n findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];\n getLocation(): string;\n setLocation(url: string): void;\n whenStable(callback: Function): void;\n}\n\nexport interface INgModelController {\n $render(): void;\n $isEmpty(value: any): boolean;\n $setValidity(validationErrorKey: string, isValid: boolean): void;\n $setPristine(): void;\n $setDirty(): void;\n $setUntouched(): void;\n $setTouched(): void;\n $rollbackViewValue(): void;\n $validate(): void;\n $commitViewValue(): void;\n $setViewValue(value: any, trigger: string): void;\n\n $viewValue: any;\n $modelValue: any;\n $parsers: Function[];\n $formatters: Function[];\n $validators: {[key: string]: Function};\n $asyncValidators: {[key: string]: Function};\n $viewChangeListeners: Function[];\n $error: Object;\n $pending: Object;\n $untouched: boolean;\n $touched: boolean;\n $pristine: boolean;\n $dirty: boolean;\n $valid: boolean;\n $invalid: boolean;\n $name: string;\n}\n/**\n * @return {?}\n */\nfunction noNg() {\n throw new Error('AngularJS v1.x is not loaded!');\n}\n\n\nlet /** @type {?} */ angular: {\n bootstrap: (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>\n IInjectorService,\n module: (prefix: string, dependencies?: string[]) => IModule,\n element: (e: Element | string) => IAugmentedJQuery,\n version: {major: number},\n resumeBootstrap: () => void,\n getTestability: (e: Element) => ITestabilityService\n} = /** @type {?} */(( {\n bootstrap: noNg,\n module: noNg,\n element: noNg,\n version: noNg,\n resumeBootstrap: noNg,\n getTestability: noNg\n}));\n\ntry {\n if (window.hasOwnProperty('angular')) {\n angular = ( /** @type {?} */((window))).angular;\n }\n} catch ( /** @type {?} */e) {\n // ignore in CJS mode.\n}\n/**\n * Resets the AngularJS library.\n * \n * Used when angularjs is loaded lazily, and not available on `window`.\n * \n * \\@stable\n * @param {?} ng\n * @return {?}\n */\nexport function setAngularLib(ng: any): void {\n angular = ng;\n}\n/**\n * Returns the current version of the AngularJS library.\n * \n * \\@stable\n * @return {?}\n */\nexport function getAngularLib(): any {\n return angular;\n}\n\nexport const /** @type {?} */ bootstrap =\n (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>\n angular.bootstrap(e, modules, config);\n\nexport const /** @type {?} */ module = (prefix: string, dependencies?: string[]) =>\n angular.module(prefix, dependencies);\n\nexport const /** @type {?} */ element = (e: Element | string) => angular.element(e);\n\nexport const /** @type {?} */ resumeBootstrap = () => angular.resumeBootstrap();\n\nexport const /** @type {?} */ getTestability = (e: Element) => angular.getTestability(e);\n\nexport const /** @type {?} */ version = angular.version;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\n\nimport {Version} from '@angular/core';\n/**\n * \\@stable\n */\nexport const VERSION = new Version('4.4.6');\n"],"names":["angular.element"],"mappings":";;;;;;;;;;;;;;AWeA;;;;;ADfA;;;;;;;;;;GAwNA;AACA;;GAYA;AACA;IACE,MAAF,IAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;AACA,CAAA;AACA,IAAE,OAAF,GAAA,CAAA;IACE,SAAF,EAAA,IAAA;IACA,MAAA,EAAA,IAAA;IAAI,OAEJ,EAAA,IAAA;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