UNPKG

3.83 kBSource Map (JSON)View Raw
1{"version":3,"file":"application_init.js","sourceRoot":"","sources":["../../../../modules/@angular/core/src/application_init.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,SAAS,EAAC,MAAM,kBAAkB;OAEnC,EAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,MAAM;AAG9D;;;GAGG;AACH,OAAO,IAAM,gBAAgB,CAAC,eAAe,GAAQ,IAAI,WAAW,CAAC,yBAAyB,CAAC,CAAC;AAChG;;;GAGG;AACH;IAGA;;OAEG;IACH,+BAAc,QAAuB;QANrC,iBAoCC;QAlCO,UAAK,GAAG,KAAK,CAAC;QAKlB,IAAM,iBAAiB,GAAmB,EAAE,CAAC;QAC7C,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACb,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzC,IAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjC,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC1B,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,cAAQ,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACtF,EAAE,CAAC,CAAC,iBAAiB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC;IAIH,sBAAI,uCAAI;QAHR;;WAEG;aACH,cAAsB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;;OAAA;IAI1C,sBAAI,8CAAW;QAHf;;WAEG;aACH,cAAkC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;;;OAAA;IACtD,gCAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,oCAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,eAAe,EAAG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAC;KAC7F,EAF6F,CAE7F,CAAC;IACF,4BAAC;AAAD,CAAC,AApCD,IAoCC;AAED;IACC,gBAAgB;IACjB,qBAAqB,CAAC,UAAU,CAAC;IAChC;;;OAGG;IACJ,qBAAqB,CAAC,cAAc,CAAC;IACpC,gBAAgB;IACjB,qBAAqB,CAAC,SAAS,CAAC,YAAY,CAAC;IAC5C,gBAAgB;IACjB,qBAAqB,CAAC,SAAS,CAAC,KAAK,CAAC;AACtC,CAAC","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\nimport {isPromise} from '../src/util/lang';\n\nimport {Inject, Injectable, OpaqueToken, Optional} from './di';\n\n\n/**\n * A function that will be executed when an application is initialized.\n * @experimental\n */\nexport const /** @type {?} */ APP_INITIALIZER: any = new OpaqueToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n * *\n */\nexport class ApplicationInitStatus {\nprivate _donePromise: Promise<any>;\nprivate _done = false;\n/**\n * @param {?} appInits\n */\nconstructor( appInits: (() => any)[]) {\n const asyncInitPromises: Promise<any>[] = [];\n if (appInits) {\n for (let i = 0; i < appInits.length; i++) {\n const initResult = appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n this._donePromise = Promise.all(asyncInitPromises).then(() => { this._done = true; });\n if (asyncInitPromises.length === 0) {\n this._done = true;\n }\n }\n/**\n * @return {?}\n */\nget done(): boolean { return this._done; }\n/**\n * @return {?}\n */\nget donePromise(): Promise<any> { return this._donePromise; }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER, ] }, { type: Optional }, ]},\n];\n}\n\nfunction ApplicationInitStatus_tsickle_Closure_declarations() {\n /** @type {?} */\nApplicationInitStatus.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\nApplicationInitStatus.ctorParameters;\n /** @type {?} */\nApplicationInitStatus.prototype._donePromise;\n /** @type {?} */\nApplicationInitStatus.prototype._done;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file