{"version":3,"file":"upgrade-static.umd.js","sources":["../../../../packages/upgrade/static/public_api.ts","../../../../packages/upgrade/static/src/static/upgrade_module.ts","../../../../packages/upgrade/static/src/static/angular1_providers.ts","../../../../packages/upgrade/static/src/static/upgrade_component.ts","../../../../packages/upgrade/static/src/common/upgrade_helper.ts","../../../../packages/upgrade/static/src/common/version.ts","../../../../packages/upgrade/static/src/common/downgrade_injectable.ts","../../../../packages/upgrade/static/src/common/downgrade_component.ts","../../../../packages/upgrade/static/src/common/downgrade_component_adapter.ts","../../../../packages/upgrade/static/src/common/util.ts","../../../../packages/upgrade/static/src/common/component_info.ts","../../../../packages/upgrade/static/src/common/constants.ts","../../../../packages/upgrade/static/src/common/angular1.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/**\n * @module\n * @description\n * Entry point for all public APIs of the upgrade/static package, allowing\n * Angular 1 and Angular 2+ to run side by side in the same application.\n */\nexport {getAngularLib, setAngularLib} from './src/common/angular1';\nexport {downgradeComponent} from './src/common/downgrade_component';\nexport {downgradeInjectable} from './src/common/downgrade_injectable';\nexport {VERSION} from './src/common/version';\nexport {UpgradeComponent} from './src/static/upgrade_component';\nexport {UpgradeModule} from './src/static/upgrade_module';\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\nimport {Injector, NgModule, NgZone, Testability, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '@angular/core';\n\nimport * as angular from '../common/angular1';\nimport {$$TESTABILITY, $DELEGATE, $INJECTOR, $INTERVAL, $PROVIDE, INJECTOR_KEY, UPGRADE_MODULE_NAME} from '../common/constants';\nimport {controllerKey} from '../common/util';\n\nimport {angular1Providers, setTempInjectorRef} from './angular1_providers';\n\n\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 AngularJS and Angular components to be used together inside a hybrid upgrade\n * application, which supports AoT compilation.\n *\n * Specifically, the classes and functions in the `upgrade/static` module allow the following:\n * 1. Creation of an Angular directive that wraps and exposes an AngularJS component so\n * that it can be used in an Angular template. See {@link UpgradeComponent}.\n * 2. Creation of an AngularJS directive that wraps and exposes an Angular component so\n * that it can be used in an AngularJS template. See {@link downgradeComponent}.\n * 3. Creation of an Angular root injector provider that wraps and exposes an AngularJS\n * service so that it can be injected into an Angular context. See\n * {@link UpgradeModule#upgrading-an-angular-1-service Upgrading an AngularJS service} below.\n * 4. Creation of an AngularJS service that wraps and exposes an Angular injectable\n * so that it can be injected into an AngularJS context. See {@link downgradeInjectable}.\n * 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks\n * coexisting in a single application. See the\n * {@link UpgradeModule#example example} below.\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 the AngularJS framework codebase regardless of\n * where they are instantiated.\n * 4. Angular components always execute inside the Angular framework codebase regardless of\n * where they are instantiated.\n * 5. An AngularJS component can be \"upgraded\"\" to an Angular component. This is achieved by\n * defining an Angular directive, which bootstraps the AngularJS component at its location\n * in the DOM. See {@link UpgradeComponent}.\n * 6. An Angular component can be \"downgraded\"\" to an AngularJS component. This is achieved by\n * defining an AngularJS directive, which bootstraps the Angular component at its location\n * in the DOM. See {@link downgradeComponent}.\n * 7. Whenever an \"upgraded\"/\"downgraded\" component is instantiated the host element is owned by\n * the framework doing the instantiation. The other framework then instantiates and owns the\n * view for that component.\n * a. This implies that the component bindings will always follow the semantics of the\n * instantiation framework.\n * b. The DOM attributes are parsed by the framework that owns the current template. So\n * attributes\n * in AngularJS templates must use kebab-case, while AngularJS templates must use camelCase.\n * c. However the template binding syntax will always use the Angular style, e.g. square\n * brackets (`[...]`) for property binding.\n * 8. AngularJS is always bootstrapped first and owns the root component.\n * 9. The new application is running in an Angular zone, and therefore it no longer needs calls\n * to\n * `$apply()`.\n *\n * @howToUse\n *\n * `import {UpgradeModule} from '@angular/upgrade/static';`\n *\n * ## Example\n * Import the {@link UpgradeModule} into your top level {@link NgModule Angular `NgModule`}.\n *\n * {@example upgrade/static/ts/module.ts region='ng2-module'}\n *\n * Then bootstrap the hybrid upgrade app's module, get hold of the {@link UpgradeModule} instance\n * and use it to bootstrap the top level [AngularJS\n * module](https://docs.angularjs.org/api/ng/type/angular.Module).\n *\n * {@example upgrade/static/ts/module.ts region='bootstrap'}\n *\n * {@a upgrading-an-angular-1-service}\n *\n * ## Upgrading an AngularJS service\n *\n * There is no specific API for upgrading an AngularJS service. Instead you should just follow the\n * following recipe:\n *\n * Let's say you have an AngularJS service:\n *\n * {@example upgrade/static/ts/module.ts region=\"ng1-title-case-service\"}\n *\n * Then you should define an Angular provider to be included in your {@link NgModule} `providers`\n * property.\n *\n * {@example upgrade/static/ts/module.ts region=\"upgrade-ng1-service\"}\n *\n * Then you can use the \"upgraded\" AngularJS service by injecting it into an Angular component\n * or service.\n *\n * {@example upgrade/static/ts/module.ts region=\"use-ng1-upgraded-service\"}\n *\n * @description\n *\n * This class is an `NgModule`, which you import to provide AngularJS core services,\n * and has an instance method used to bootstrap the hybrid upgrade application.\n *\n * ## Core AngularJS services\n * Importing this {@link NgModule} will add providers for the core\n * [AngularJS services](https://docs.angularjs.org/api/ng/service) to the root injector.\n *\n * ## Bootstrap\n * The runtime instance of this class contains a {@link UpgradeModule#bootstrap `bootstrap()`}\n * method, which you use to bootstrap the top level AngularJS module onto an element in the\n * DOM for the hybrid upgrade app.\n *\n * It also contains properties to access the {@link UpgradeModule#injector root injector}, the\n * bootstrap {@link NgZone} and the\n * [AngularJS $injector](https://docs.angularjs.org/api/auto/service/$injector).\n *\n * @experimental\n */\n\nexport class UpgradeModule {\n /**\n * The AngularJS `$injector` for the upgrade application.\n */\n public $injector: any /*angular.IInjectorService*/;\n /** The Angular Injector **/\n public injector: Injector;\n\n constructor(\n /** The root {@link Injector} for the upgrade application. */\n injector: Injector,\n /** The bootstrap zone for the upgrade application */\n public ngZone: NgZone) {\n this.injector = new NgAdapterInjector(injector);\n }\n\n /**\n * Bootstrap an AngularJS application from this NgModule\n * @param element the element on which to bootstrap the AngularJS application\n * @param [modules] the AngularJS modules to bootstrap for this application\n * @param [config] optional extra AngularJS bootstrap configuration\n */\n bootstrap(\n element: Element, modules: string[] = [], config?: any /*angular.IAngularBootstrapConfig*/) {\n const INIT_MODULE_NAME = UPGRADE_MODULE_NAME + '.init';\n\n // Create an ng1 module to bootstrap\n const initModule =\n angular\n .module(INIT_MODULE_NAME, [])\n\n .value(INJECTOR_KEY, this.injector)\n\n .config([\n $PROVIDE, $INJECTOR,\n ($provide: angular.IProvideService, $injector: angular.IInjectorService) => {\n if ($injector.has($$TESTABILITY)) {\n $provide.decorator($$TESTABILITY, [\n $DELEGATE,\n (testabilityDelegate: angular.ITestabilityService) => {\n const originalWhenStable: Function = testabilityDelegate.whenStable;\n const injector = this.injector;\n // Cannot use arrow function below because we need the context\n const newWhenStable = function(callback: Function) {\n originalWhenStable.call(testabilityDelegate, function() {\n const ng2Testability: Testability = injector.get(Testability);\n if (ng2Testability.isStable()) {\n callback();\n } else {\n ng2Testability.whenStable(\n newWhenStable.bind(testabilityDelegate, callback));\n }\n });\n };\n\n testabilityDelegate.whenStable = newWhenStable;\n return testabilityDelegate;\n }\n ]);\n }\n\n if ($injector.has($INTERVAL)) {\n $provide.decorator($INTERVAL, [\n $DELEGATE,\n (intervalDelegate: angular.IIntervalService) => {\n // Wrap the $interval service so that setInterval is called outside NgZone,\n // but the callback is still invoked within it. This is so that $interval\n // won't block stability, which preserves the behavior from AngularJS.\n let wrappedInterval =\n (fn: Function, delay: number, count?: number, invokeApply?: boolean,\n ...pass: any[]) => {\n return this.ngZone.runOutsideAngular(() => {\n return intervalDelegate((...args: any[]) => {\n // Run callback in the next VM turn - $interval calls\n // $rootScope.$apply, and running the callback in NgZone will\n // cause a '$digest already in progress' error if it's in the\n // same vm turn.\n setTimeout(() => { this.ngZone.run(() => fn(...args)); });\n }, delay, count, invokeApply, ...pass);\n });\n };\n\n (wrappedInterval as any)['cancel'] = intervalDelegate.cancel;\n return wrappedInterval;\n }\n ]);\n }\n }\n ])\n\n .run([\n $INJECTOR,\n ($injector: angular.IInjectorService) => {\n this.$injector = $injector;\n\n // Initialize the ng1 $injector provider\n setTempInjectorRef($injector);\n this.injector.get($INJECTOR);\n\n // Put the injector on the DOM, so that it can be \"required\"\n angular.element(element).data !(controllerKey(INJECTOR_KEY), this.injector);\n\n // Wire up the ng1 rootScope to run a digest cycle whenever the zone settles\n // We need to do this in the next tick so that we don't prevent the bootup\n // stabilizing\n setTimeout(() => {\n const $rootScope = $injector.get('$rootScope');\n const subscription =\n this.ngZone.onMicrotaskEmpty.subscribe(() => $rootScope.$digest());\n $rootScope.$on('$destroy', () => { subscription.unsubscribe(); });\n }, 0);\n }\n ]);\n\n const upgradeModule = angular.module(UPGRADE_MODULE_NAME, [INIT_MODULE_NAME].concat(modules));\n\n // Make sure resumeBootstrap() only exists if the current bootstrap is deferred\n const windowAngular = (window as any)['angular'];\n windowAngular.resumeBootstrap = undefined;\n\n // Bootstrap the AngularJS application inside our zone\n this.ngZone.run(() => { angular.bootstrap(element, [upgradeModule.name], config); });\n\n // Patch resumeBootstrap() to run inside the ngZone\n if (windowAngular.resumeBootstrap) {\n const originalResumeBootstrap: () => void = windowAngular.resumeBootstrap;\n const ngZone = this.ngZone;\n windowAngular.resumeBootstrap = function() {\n let args = arguments;\n windowAngular.resumeBootstrap = originalResumeBootstrap;\n ngZone.run(() => { windowAngular.resumeBootstrap.apply(this, args); });\n };\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{providers: [angular1Providers]}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Injector, },\n{type: NgZone, },\n];\n}\n\nclass NgAdapterInjector implements Injector {\n constructor(private modInjector: Injector) {}\n\n // When Angular locate a service in the component injector tree, the not found value is set to\n // `NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR`. In such a case we should not walk up to the module\n // injector.\n // AngularJS only supports a single tree and should always check the module injector.\n get(token: any, notFoundValue?: any): any {\n if (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n return notFoundValue;\n }\n\n return this.modInjector.get(token, notFoundValue);\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\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\nimport * as angular from '../common/angular1';\n\n// We have to do a little dance to get the ng1 injector into the module injector.\n// We store the ng1 injector so that the provider in the module injector can access it\n// Then we \"get\" the ng1 injector from the module injector, which triggers the provider to read\n// the stored injector and release the reference to it.\nlet tempInjectorRef: angular.IInjectorService|null;\nexport function setTempInjectorRef(injector: angular.IInjectorService) {\n tempInjectorRef = injector;\n}\nexport function injectorFactory() {\n if (!tempInjectorRef) {\n throw new Error('Trying to get the AngularJS injector before it being set.');\n }\n\n const injector: angular.IInjectorService|null = tempInjectorRef;\n tempInjectorRef = null; // clear the value to prevent memory leaks\n return injector;\n}\n\nexport function rootScopeFactory(i: angular.IInjectorService) {\n return i.get('$rootScope');\n}\n\nexport function compileFactory(i: angular.IInjectorService) {\n return i.get('$compile');\n}\n\nexport function parseFactory(i: angular.IInjectorService) {\n return i.get('$parse');\n}\n\nexport const angular1Providers = [\n // We must use exported named functions for the ng2 factories to keep the compiler happy:\n // > Metadata collected contains an error that will be reported at runtime:\n // > Function calls are not supported.\n // > Consider replacing the function or lambda with a reference to an exported function\n {provide: '$injector', useFactory: injectorFactory},\n {provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector']},\n {provide: '$compile', useFactory: compileFactory, deps: ['$injector']},\n {provide: '$parse', useFactory: parseFactory, deps: ['$injector']}\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\nimport {DoCheck, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges, ɵlooseIdentical as looseIdentical} from '@angular/core';\nimport * as angular from '../common/angular1';\nimport {$SCOPE} from '../common/constants';\nimport {IBindingDestination, IControllerInstance, UpgradeHelper} from '../common/upgrade_helper';\nimport {isFunction} from '../common/util';\n\nconst NOT_SUPPORTED: any = 'NOT_SUPPORTED';\nconst INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\n\nclass Bindings {\n twoWayBoundProperties: string[] = [];\n twoWayBoundLastValues: any[] = [];\n\n expressionBoundProperties: string[] = [];\n\n propertyToOutputMap: {[propName: string]: string} = {};\n}\n\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 AngularJS component to be used from Angular.\n *\n * @howToUse\n *\n * Let's assume that you have an AngularJS component called `ng1Hero` that needs\n * to be made available in Angular templates.\n *\n * {@example upgrade/static/ts/module.ts region=\"ng1-hero\"}\n *\n * We must create a {@link Directive} that will make this AngularJS component\n * available inside Angular templates.\n *\n * {@example upgrade/static/ts/module.ts region=\"ng1-hero-wrapper\"}\n *\n * In this example you can see that we must derive from the {@link UpgradeComponent}\n * base class but also provide an {@link Directive `@Directive`} decorator. This is\n * because the AoT compiler requires that this information is statically available at\n * compile time.\n *\n * Note that we must do the following:\n * * specify the directive's selector (`ng1-hero`)\n * * specify all inputs and outputs that the AngularJS component expects\n * * derive from `UpgradeComponent`\n * * call the base class from the constructor, passing\n * * the AngularJS name of the component (`ng1Hero`)\n * * the {@link ElementRef} and {@link Injector} for the component wrapper\n *\n * @description\n *\n * A helper class that should be used as a base class for creating Angular directives\n * that wrap AngularJS components that need to be \"upgraded\".\n *\n * @experimental\n */\nexport class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {\n private helper: UpgradeHelper;\n\n private $injector: angular.IInjectorService;\n\n private element: Element;\n private $element: angular.IAugmentedJQuery;\n private $componentScope: angular.IScope;\n\n private directive: angular.IDirective;\n private bindings: Bindings;\n\n private controllerInstance: IControllerInstance;\n private bindingDestination: IBindingDestination;\n\n // We will be instantiating the controller in the `ngOnInit` hook, when the first `ngOnChanges`\n // will have been already triggered. We store the `SimpleChanges` and \"play them back\" later.\n private pendingChanges: SimpleChanges|null;\n\n private unregisterDoCheckWatcher: Function;\n\n /**\n * Create a new `UpgradeComponent` instance. You should not normally need to do this.\n * Instead you should derive a new class from this one and call the super constructor\n * from the base class.\n *\n * {@example upgrade/static/ts/module.ts region=\"ng1-hero-wrapper\" }\n *\n * * The `name` parameter should be the name of the AngularJS directive.\n * * The `elementRef` and `injector` parameters should be acquired from Angular by dependency\n * injection into the base class constructor.\n *\n * Note that we must manually implement lifecycle hooks that call through to the super class.\n * This is because, at the moment, the AoT compiler is not able to tell that the\n * `UpgradeComponent`\n * already implements them and so does not wire up calls to them at runtime.\n */\n constructor(private name: string, private elementRef: ElementRef, private injector: Injector) {\n this.helper = new UpgradeHelper(injector, name, elementRef);\n\n this.$injector = this.helper.$injector;\n\n this.element = this.helper.element;\n this.$element = this.helper.$element;\n\n this.directive = this.helper.directive;\n this.bindings = this.initializeBindings(this.directive);\n\n // We ask for the AngularJS scope from the Angular injector, since\n // we will put the new component scope onto the new injector for each component\n const $parentScope = injector.get($SCOPE);\n // QUESTION 1: Should we create an isolated scope if the scope is only true?\n // QUESTION 2: Should we make the scope accessible through `$element.scope()/isolateScope()`?\n this.$componentScope = $parentScope.$new(!!this.directive.scope);\n\n this.initializeOutputs();\n }\n\n ngOnInit() {\n // Collect contents, insert and compile template\n const attachChildNodes: angular.ILinkFn|undefined = this.helper.prepareTransclusion();\n const linkFn = this.helper.compileTemplate();\n\n // Instantiate controller\n const controllerType = this.directive.controller;\n const bindToController = this.directive.bindToController;\n if (controllerType) {\n this.controllerInstance = this.helper.buildController(controllerType, this.$componentScope);\n } else if (bindToController) {\n throw new Error(\n `Upgraded directive '${this.directive.name}' specifies 'bindToController' but no controller.`);\n }\n\n // Set up outputs\n this.bindingDestination = bindToController ? this.controllerInstance : this.$componentScope;\n this.bindOutputs();\n\n // Require other controllers\n const requiredControllers =\n this.helper.resolveAndBindRequiredControllers(this.controllerInstance);\n\n // Hook: $onChanges\n if (this.pendingChanges) {\n this.forwardChanges(this.pendingChanges);\n this.pendingChanges = null;\n }\n\n // Hook: $onInit\n if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {\n this.controllerInstance.$onInit();\n }\n\n // Hook: $doCheck\n if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {\n const callDoCheck = () => this.controllerInstance.$doCheck !();\n\n this.unregisterDoCheckWatcher = this.$componentScope.$parent.$watch(callDoCheck);\n callDoCheck();\n }\n\n // Linking\n const link = this.directive.link;\n const preLink = (typeof link == 'object') && (link as angular.IDirectivePrePost).pre;\n const postLink = (typeof link == 'object') ? (link as angular.IDirectivePrePost).post : link;\n const attrs: angular.IAttributes = NOT_SUPPORTED;\n const transcludeFn: angular.ITranscludeFunction = NOT_SUPPORTED;\n if (preLink) {\n preLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);\n }\n\n linkFn(this.$componentScope, 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 ngOnChanges(changes: SimpleChanges) {\n if (!this.bindingDestination) {\n this.pendingChanges = changes;\n } else {\n this.forwardChanges(changes);\n }\n }\n\n ngDoCheck() {\n const twoWayBoundProperties = this.bindings.twoWayBoundProperties;\n const twoWayBoundLastValues = this.bindings.twoWayBoundLastValues;\n const propertyToOutputMap = this.bindings.propertyToOutputMap;\n\n twoWayBoundProperties.forEach((propName, idx) => {\n const newValue = this.bindingDestination[propName];\n const oldValue = twoWayBoundLastValues[idx];\n\n if (!looseIdentical(newValue, oldValue)) {\n const outputName = propertyToOutputMap[propName];\n const eventEmitter: EventEmitter = (this as any)[outputName];\n\n eventEmitter.emit(newValue);\n twoWayBoundLastValues[idx] = newValue;\n }\n });\n }\n\n ngOnDestroy() {\n if (isFunction(this.unregisterDoCheckWatcher)) {\n this.unregisterDoCheckWatcher();\n }\n if (this.controllerInstance && isFunction(this.controllerInstance.$onDestroy)) {\n this.controllerInstance.$onDestroy();\n }\n this.$componentScope.$destroy();\n }\n\n private initializeBindings(directive: angular.IDirective) {\n const btcIsObject = typeof directive.bindToController === 'object';\n if (btcIsObject && Object.keys(directive.scope).length) {\n throw new Error(\n `Binding definitions on scope and controller at the same time is not supported.`);\n }\n\n const context = (btcIsObject) ? directive.bindToController : directive.scope;\n const bindings = new Bindings();\n\n if (typeof context == 'object') {\n Object.keys(context).forEach(propName => {\n const definition = context[propName];\n const bindingType = definition.charAt(0);\n\n // QUESTION: What about `=*`? Ignore? Throw? Support?\n\n switch (bindingType) {\n case '@':\n case '<':\n // We don't need to do anything special. They will be defined as inputs on the\n // upgraded component facade and the change propagation will be handled by\n // `ngOnChanges()`.\n break;\n case '=':\n bindings.twoWayBoundProperties.push(propName);\n bindings.twoWayBoundLastValues.push(INITIAL_VALUE);\n bindings.propertyToOutputMap[propName] = propName + 'Change';\n break;\n case '&':\n bindings.expressionBoundProperties.push(propName);\n bindings.propertyToOutputMap[propName] = propName;\n break;\n default:\n let json = JSON.stringify(context);\n throw new Error(\n `Unexpected mapping '${bindingType}' in '${json}' in '${this.name}' directive.`);\n }\n });\n }\n\n return bindings;\n }\n\n private initializeOutputs() {\n // Initialize the outputs for `=` and `&` bindings\n this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties)\n .forEach(propName => {\n const outputName = this.bindings.propertyToOutputMap[propName];\n (this as any)[outputName] = new EventEmitter();\n });\n }\n\n private bindOutputs() {\n // Bind `&` bindings to the corresponding outputs\n this.bindings.expressionBoundProperties.forEach(propName => {\n const outputName = this.bindings.propertyToOutputMap[propName];\n const emitter = (this as any)[outputName];\n\n this.bindingDestination[propName] = (value: any) => emitter.emit(value);\n });\n }\n\n private forwardChanges(changes: SimpleChanges) {\n // Forward input changes to `bindingDestination`\n Object.keys(changes).forEach(\n propName => this.bindingDestination[propName] = changes[propName].currentValue);\n\n if (isFunction(this.bindingDestination.$onChanges)) {\n this.bindingDestination.$onChanges(changes);\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 */\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 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}\n\n// Classes\nexport class UpgradeHelper {\n public readonly $injector: angular.IInjectorService;\n public readonly element: Element;\n public readonly $element: angular.IAugmentedJQuery;\n public readonly directive: angular.IDirective;\n\n private readonly $compile: angular.ICompileService;\n private readonly $controller: angular.IControllerService;\n\n constructor(\n private injector: Injector, private 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 static getDirective($injector: angular.IInjectorService, name: string): angular.IDirective {\n const 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 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 static 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 $templateCache = $injector.get($TEMPLATE_CACHE) as angular.ITemplateCacheService;\n const url = getOrCall(directive.templateUrl);\n const 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 $httpBackend = $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 buildController(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 locals = {'$scope': $scope, '$element': this.$element};\n const controller = this.$controller(controllerType, locals, null, this.directive.controllerAs);\n\n this.$element.data !(controllerKey(this.directive.name !), controller);\n\n return controller;\n }\n\n compileTemplate(template?: string): angular.ILinkFn {\n if (template === undefined) {\n template = UpgradeHelper.getTemplate(this.$injector, this.directive) as string;\n }\n\n return this.compileHtml(template);\n }\n\n prepareTransclusion(): angular.ILinkFn|undefined {\n const transclude = this.directive.transclude;\n const contentChildNodes = this.extractChildNodes();\n let $template = contentChildNodes;\n let attachChildrenFn: angular.ILinkFn|undefined = (scope, cloneAttach) =>\n cloneAttach !($template, scope);\n\n if (transclude) {\n const slots = Object.create(null);\n\n if (typeof transclude === 'object') {\n $template = [];\n\n const slotMap = Object.create(null);\n const filledSlots = Object.create(null);\n\n // Parse the element selectors.\n Object.keys(transclude).forEach(slotName => {\n let selector = transclude[slotName];\n const 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 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 nodes = slots[slotName];\n slots[slotName] = (scope: angular.IScope, cloneAttach: angular.ICloneAttachFunction) =>\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 resolveAndBindRequiredControllers(controllerInstance: IControllerInstance|null) {\n const directiveRequire = this.getDirectiveRequire();\n const requiredControllers = this.resolveRequire(directiveRequire);\n\n if (controllerInstance && this.directive.bindToController && isMap(directiveRequire)) {\n const requiredControllersMap = 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 private compileHtml(html: string): angular.ILinkFn {\n this.element.innerHTML = html;\n return this.$compile(this.element.childNodes);\n }\n\n private extractChildNodes(): Node[] {\n const childNodes: Node[] = [];\n let 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 private getDirectiveRequire(): angular.DirectiveRequireProperty {\n const require = this.directive.require || (this.directive.controller && this.directive.name) !;\n\n if (isMap(require)) {\n Object.keys(require).forEach(key => {\n const value = require[key];\n const match = value.match(REQUIRE_PREFIX_RE) !;\n const 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 private 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 value: {[key: string]: IControllerInstance} = {};\n Object.keys(require).forEach(key => value[key] = this.resolveRequire(require[key]) !);\n return value;\n } else if (typeof require === 'string') {\n const match = require.match(REQUIRE_PREFIX_RE) !;\n const inheritType = match[1] || match[3];\n\n const name = require.substring(match[0].length);\n const isOptional = !!match[2];\n const searchParents = !!inheritType;\n const startOnParent = inheritType === '^^';\n\n const ctrlKey = controllerKey(name);\n const elem = startOnParent ? this.$element.parent !() : this.$element;\n const value = searchParents ? elem.inheritedData !(ctrlKey) : 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 getOrCall(property: T | Function): T {\n return isFunction(property) ? property() : property;\n}\n\n// NOTE: Only works for `typeof T !== 'object'`.\nfunction isMap(value: angular.SingleOrListOrMap): value is {[key: string]: T} {\n return value && !Array.isArray(value) && typeof value === 'object';\n}\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/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n/**\n * @stable\n */\nexport const VERSION = new Version('4.4.6');\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\nimport {Injector} from '@angular/core';\nimport {INJECTOR_KEY} from './constants';\n\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 */\nexport function downgradeInjectable(token: any): Function {\n const factory = function(i: Injector) { return i.get(token); };\n (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\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/**\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 */\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 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 parentInjector: Injector|ParentInjectorPromise =\n required[0] || $injector.get(INJECTOR_KEY);\n const ngModel: angular.INgModelController = required[1];\n\n const downgradeFn = (injector: Injector) => {\n const componentFactoryResolver: ComponentFactoryResolver =\n injector.get(ComponentFactoryResolver);\n const componentFactory: ComponentFactory =\n componentFactoryResolver.resolveComponentFactory(info.component) !;\n\n if (!componentFactory) {\n throw new Error('Expecting ComponentFactory for: ' + getComponentName(info.component));\n }\n\n const injectorPromise = new ParentInjectorPromise(element);\n const facade = new DowngradeComponentAdapter(\n element, attrs, scope, ngModel, injector, $injector, $compile, $parse,\n componentFactory);\n\n const 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/**\n * Synchronous promise-like object to wrap parent injectors,\n * to preserve the synchronous nature of Angular 1's $compile.\n */\nclass ParentInjectorPromise {\n private injector: Injector;\n private injectorKey: string = controllerKey(INJECTOR_KEY);\n private callbacks: ((injector: Injector) => any)[] = [];\n\n constructor(private element: angular.IAugmentedJQuery) {\n // Store the promise on the element.\n element.data !(this.injectorKey, this);\n }\n\n then(callback: (injector: Injector) => any) {\n if (this.injector) {\n callback(this.injector);\n } else {\n this.callbacks.push(callback);\n }\n }\n\n resolve(injector: Injector) {\n this.injector = injector;\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 = null !;\n\n // Run the queued callbacks.\n this.callbacks.forEach(callback => callback(injector));\n this.callbacks.length = 0;\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\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 INITIAL_VALUE = {\n __UNINITIALIZED__: true\n};\n\nexport class DowngradeComponentAdapter {\n private inputChangeCount: number = 0;\n private inputChanges: SimpleChanges|null = null;\n private componentScope: angular.IScope;\n private componentRef: ComponentRef|null = null;\n private component: any = null;\n private changeDetector: ChangeDetectorRef|null = null;\n\n constructor(\n private element: angular.IAugmentedJQuery, private attrs: angular.IAttributes,\n private scope: angular.IScope, private ngModel: angular.INgModelController,\n private parentInjector: Injector, private $injector: angular.IInjectorService,\n private $compile: angular.ICompileService, private $parse: angular.IParseService,\n private componentFactory: ComponentFactory) {\n this.componentScope = scope.$new();\n }\n\n compileContents(): Node[][] {\n const compiledProjectableNodes: Node[][] = [];\n const projectableNodes: Node[][] = this.groupProjectableNodes();\n const linkFns = projectableNodes.map(nodes => this.$compile(nodes));\n\n this.element.empty !();\n\n linkFns.forEach(linkFn => {\n linkFn(this.scope, (clone: Node[]) => {\n compiledProjectableNodes.push(clone);\n this.element.append !(clone);\n });\n });\n\n return compiledProjectableNodes;\n }\n\n createComponent(projectableNodes: Node[][]) {\n const 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 setupInputs(): void {\n const attrs = this.attrs;\n const inputs = this.componentFactory.inputs || [];\n for (let i = 0; i < inputs.length; i++) {\n const input = new PropertyBinding(inputs[i].propName, inputs[i].templateName);\n let expr: string|null = null;\n\n if (attrs.hasOwnProperty(input.attr)) {\n const observeFn = (prop => {\n let 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 unwatch: Function|null = this.componentScope.$watch(() => {\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 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 prototype = this.componentFactory.componentType.prototype;\n if (prototype && (prototype).ngOnChanges) {\n // Detect: OnChanges interface\n this.inputChanges = {};\n this.componentScope.$watch(() => this.inputChangeCount, () => {\n const inputChanges = this.inputChanges;\n this.inputChanges = {};\n (this.component).ngOnChanges(inputChanges !);\n });\n }\n this.componentScope.$watch(() => this.changeDetector && this.changeDetector.detectChanges());\n }\n\n setupOutputs() {\n const attrs = this.attrs;\n const outputs = this.componentFactory.outputs || [];\n for (let j = 0; j < outputs.length; j++) {\n const output = new PropertyBinding(outputs[j].propName, outputs[j].templateName);\n let expr: string|null = null;\n let assignExpr = false;\n\n const bindonAttr = output.bindonAttr.substring(0, output.bindonAttr.length - 6);\n const 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 getter = this.$parse(expr);\n const setter = getter.assign;\n if (assignExpr && !setter) {\n throw new Error(`Expression '${expr}' is not assignable!`);\n }\n const emitter = this.component[output.prop] as EventEmitter;\n if (emitter) {\n emitter.subscribe({\n next: assignExpr ? (v: any) => 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 registerCleanup() {\n this.element.bind !('$destroy', () => {\n this.componentScope.$destroy();\n this.componentRef !.destroy();\n });\n }\n\n getInjector(): Injector { return this.componentRef ! && this.componentRef !.injector; }\n\n private 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 groupProjectableNodes() {\n let ngContentSelectors = this.componentFactory.ngContentSelectors;\n return groupNodesBySelector(ngContentSelectors, this.element.contents !());\n }\n}\n\n/**\n * Group a set of DOM nodes into `ngContent` groups, based on the given content selectors.\n */\nexport function groupNodesBySelector(ngContentSelectors: string[], nodes: Node[]): Node[][] {\n const projectableNodes: Node[][] = [];\n let wildcardNgContentIndex: number;\n\n for (let i = 0, ii = ngContentSelectors.length; i < ii; ++i) {\n projectableNodes[i] = [];\n }\n\n for (let j = 0, jj = nodes.length; j < jj; ++j) {\n const node = nodes[j];\n const ngContentIndex = findMatchingNgContentIndex(node, ngContentSelectors);\n if (ngContentIndex != null) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n\n return projectableNodes;\n}\n\nfunction findMatchingNgContentIndex(element: any, ngContentSelectors: string[]): number|null {\n const ngContentIndices: number[] = [];\n let wildcardNgContentIndex: number = -1;\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const 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 _matches: (this: any, selector: string) => boolean;\n\nfunction matchesSelector(el: any, selector: string): boolean {\n if (!_matches) {\n const elProto = 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\nimport {Type} from '@angular/core';\nimport * as angular from './angular1';\n\nconst DIRECTIVE_PREFIX_REGEXP = /^(?:x|data)[:\\-_]/i;\nconst DIRECTIVE_SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\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\nexport function controllerKey(name: string): string {\n return '$' + name + 'Controller';\n}\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\nexport function getAttributesAsArray(node: Node): [string, string][] {\n const attributes = node.attributes;\n let asArray: [string, string][] = undefined !;\n if (attributes) {\n let attrLen = attributes.length;\n asArray = new Array(attrLen);\n for (let i = 0; i < attrLen; i++) {\n asArray[i] = [attributes[i].nodeName, attributes[i].nodeValue !];\n }\n }\n return asArray || [];\n}\n\nexport function getComponentName(component: Type): string {\n // Return the name of the component or the first line of its stringified version.\n return (component as any).overriddenName || component.name || component.toString().split('\\n')[0];\n}\n\nexport function isFunction(value: any): value is Function {\n return typeof value === 'function';\n}\n\nexport class Deferred {\n promise: Promise;\n resolve: (value?: R|PromiseLike) => void;\n reject: (error?: any) => void;\n\n constructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\n/**\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/**\n * Glue the AngularJS `NgModelController` (if it exists) to the component\n * (if it implements the needed subset of the `ControlValueAccessor` interface).\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/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n */\nexport function strictEquals(val1: any, val2: any): boolean {\n return val1 === val2 || (val1 !== val1 && val2 !== val2);\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 * 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 constructor(public prop: string, public attr: string) { this.parseBinding(); }\n\n private parseBinding() {\n this.bracketAttr = `[${this.attr}]`;\n this.parenAttr = `(${this.attr})`;\n this.bracketParenAttr = `[(${this.attr})]`;\n const 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","/**\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 const $COMPILE = '$compile';\nexport const $CONTROLLER = '$controller';\nexport const $DELEGATE = '$delegate';\nexport const $HTTP_BACKEND = '$httpBackend';\nexport const $INJECTOR = '$injector';\nexport const $INTERVAL = '$interval';\nexport const $PARSE = '$parse';\nexport const $PROVIDE = '$provide';\nexport const $ROOT_SCOPE = '$rootScope';\nexport const $SCOPE = '$scope';\nexport const $TEMPLATE_CACHE = '$templateCache';\nexport const $TEMPLATE_REQUEST = '$templateRequest';\n\nexport const $$TESTABILITY = '$$testability';\n\nexport const COMPILER_KEY = '$$angularCompiler';\nexport const GROUP_PROJECTABLE_NODES_KEY = '$$angularGroupProjectableNodes';\nexport const INJECTOR_KEY = '$$angularInjector';\nexport const NG_ZONE_KEY = '$$angularNgZone';\n\nexport const REQUIRE_INJECTOR = '?^^' + INJECTOR_KEY;\nexport const REQUIRE_NG_MODEL = '?ngModel';\n\nexport const 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\nfunction noNg() {\n throw new Error('AngularJS v1.x is not loaded!');\n}\n\n\nlet 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} = {\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 = (window).angular;\n }\n} catch (e) {\n // ignore in CJS mode.\n}\n\n/**\n * Resets the AngularJS library.\n *\n * Used when angularjs is loaded lazily, and not available on `window`.\n *\n * @stable\n */\nexport function setAngularLib(ng: any): void {\n angular = ng;\n}\n\n/**\n * Returns the current version of the AngularJS library.\n *\n * @stable\n */\nexport function getAngularLib(): any {\n return angular;\n}\n\nexport const bootstrap =\n (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) =>\n angular.bootstrap(e, modules, config);\n\nexport const module = (prefix: string, dependencies?: string[]) =>\n angular.module(prefix, dependencies);\n\nexport const element = (e: Element | string) => angular.element(e);\n\nexport const resumeBootstrap = () => angular.resumeBootstrap();\n\nexport const getTestability = (e: Element) => angular.getTestability(e);\n\nexport const version = angular.version;\n"],"names":["ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","NgZone","Injector","NgModule","angular.element","Testability","ɵlooseIdentical","ComponentFactoryResolver","SimpleChange","ReflectiveInjector","module"],"mappings":";;;;;;;;;;;;;;;;;;AYoOA,SAAA,IAAA,GAAA;IACE,MAAF,IAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACA;AACA,IAAE,OAAF,GAAA;IACE,SAAF,EAAA,IAAA;IACA,MAAA,EAAA,IAAA;IAEI,OAAJ,EAAA,IAAA;IACE,OAAF,EAAA,IAAA;IACA,eAAA,EAAA,IAA4B;IAC5B,cAAA,EAAA,IAAA;CACC,CAAD;AAAE,IAAF;;QAEA,OAAA,GAAA,MAAA,CAAA,OAAA,CAAA;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAA,aAAA,GAAA;IAEaU,OAAb,OAAA,CAAA;CACA;AAAA,IAAA,SAAA,GAAA,UAAA,CAAA,EAAA,OAAA,EAAA,MAAA,EAAA;IAEa,OAAO,OAApB,CAAA,SAAA,CAAgD,CAAhD,EAAA,OAAA,EAAA,MAAA,CAAA,CAAA;;AD9QA,IAAA,QAAA,GAAA,UAAA,MAAA,EAAA,YAAA,EAAA;;;;;;;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