undefined
if no selection could be made.\r\n */\r\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\r\n if (contentTypes.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const type = contentTypes.find(x => this.isJsonMime(x));\r\n if (type === undefined) {\r\n return contentTypes[0];\r\n }\r\n return type;\r\n }\r\n\r\n /**\r\n * Select the correct accept content-type to use for a request.\r\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\r\n * If no content type is found return the first found type if the contentTypes is not empty\r\n * @param {string[]} accepts - the array of content types that are available for selection.\r\n * @returns {string} the selected content-type or undefined
if no selection could be made.\r\n */\r\n public selectHeaderAccept(accepts: string[]): string | undefined {\r\n if (accepts.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const type = accepts.find(x => this.isJsonMime(x));\r\n if (type === undefined) {\r\n return accepts[0];\r\n }\r\n return type;\r\n }\r\n\r\n /**\r\n * Check if the given MIME is a JSON MIME.\r\n * JSON MIME examples:\r\n * application/json\r\n * application/json; charset=UTF8\r\n * APPLICATION/JSON\r\n * application/vnd.company+json\r\n * @param {string} mime - MIME (Multipurpose Internet Mail Extensions)\r\n * @return {boolean} True if the given MIME is JSON, false otherwise.\r\n */\r\n public isJsonMime(mime: string): boolean {\r\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\r\n return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\r\n }\r\n}\r\n","import { CalendarTranslatorService } from './../services/calendar-translator.service';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { LOGGER, LogLevelEnum } from '@app/services/logger.service';\r\nimport { ConfigService } from '@app/services/config.service';\r\nimport { AppConfig } from '@app/models/app-config.model';\r\nimport { of } from 'rxjs';\r\nimport { AuthenticationService } from '@app/services/authentication.service';\r\nimport { Session } from '@app/app.session';\r\nimport { Router } from '@angular/router';\r\n\r\n@Injectable()\r\nexport class CoreInitializer {\r\n constructor(\r\n private injector: Injector,\r\n private calendarTranslatorService: CalendarTranslatorService,\r\n public session: Session\r\n ) {\r\n }\r\n\r\n public init(): Promise{{orderDetail.orderDeliveryAddress1}}
\\r\\n{{orderDetail.orderDeliveryAddress2}}
\\r\\n{{orderDetail.orderDeliveryPostCode}} {{orderDetail.orderDeliveryLocality}}
\\r\\n{{orderDetail.orderDeliveryCountry}}
\\r\\n{{orderDetail.siteDeliveryAddress1}}
\\r\\n{{orderDetail.siteDeliveryAddress2}}
\\r\\n{{orderDetail.siteDeliveryPostCode}} {{orderDetail.siteDeliveryLocality}}
\\r\\n{{orderDetail.siteDeliveryCountry}}
\\r\\n