{ "version": 3, "sources": ["src/app/application/window.provider.ts"], "sourcesContent": ["/**\n * this is the Angular 6 way of getting access to the window.\n *\n * Admittedly, I do not understand shit of this!\n *\n * However since we use \"window\" to change the location and\n * we to be able to mock it so that it does not actually navigate\n * in code when called we need to \"inject\" window into the application.\n *\n */\nimport {FactoryProvider, InjectionToken} from '@angular/core'\n\n/**\n * Defines and exports an injection token that replaces the browser\n * window object.\n */\nexport const WINDOW = new InjectionToken('window')\n\n/**\n * The provider\n */\nconst windowProvider: FactoryProvider = {\n provide: WINDOW,\n useFactory: () => window\n}\n\n/**\n * The exported provider(s). We only have one. This is \"provided\"\n * in app.component.\n */\nexport const WINDOW_PROVIDERS = [\n windowProvider\n]\n"], "mappings": ";;;;;AAgBO,IAAM,SAAS,IAAI,eAAuB,QAAQ;AAKzD,IAAM,iBAAkC;EACtC,SAAS;EACT,YAAY,MAAM;;AAOb,IAAM,mBAAmB;EAC9B;;", "names": [] }