{ "version": 3, "sources": ["apps/business-center-client/src/app/product/product-access-constants.ts", "apps/business-center-client/src/app/core/app_partner.service.ts", "apps/business-center-client/src/app/core/lmi-categories.ts", "apps/business-center-client/src/app/core/product.ts", "apps/business-center-client/src/app/core/product.service.ts"], "sourcesContent": ["// Constants file containing product IDs of products that should not be displayed in Business Centre\n\nconst INACCESSIBLE_PRODUCTS = {\n gSuiteBasicAppIds: [\n 'MP-6XDHVMQ84K4THNNP2Z7W2GC28VLHRC4Q', // Demo\n 'MP-XBHPSLDBHZ8Q8F57P43DPKL6SPHKHHMS', // Prod\n ],\n gSuiteBusinessAppIds: [\n 'MP-GNWSMJS4BJB4Z8RZWZ8SXW6J4HP32KJ3', // Demo\n 'MP-BJ37LGNT37SDN6LR7D46MPP7CBG82MN6', // Prod\n ],\n googleWorkspaceBusinessPlusAppIds: [\n 'MP-8PS55DCP5DKMDPDHHPWSFPD8XCM44324', // Demo\n 'MP-S2RJ778BSJR7KXFSS775BHCX383CJVSV', // Prod\n ],\n googleWorkspaceEnterpriseEssentialsAppIds: [\n 'MP-35GSNMZC352XWQHN2Q588WVLW62SM27V', // Demo\n 'MP-3C37DKQZ3LFVKBXJC4222KNZQPH6XCW7', // Prod\n ],\n googleWorkspaceEnterpriseStandardAppIds: [\n 'MP-453NG65TC8S72CQ3NTQ4WTS3DWLLXQQH', // Demo\n 'MP-MTFJDXGF8M2FFBNR282Q4SSCLPJJTZ36', // Prod\n ],\n googleWorkspaceEnterprisePlusAppIds: [\n 'MP-VDNQPHCTCMHVMSNW87R8N3NRTS4HC6LV', // Demo\n 'MP-FCZGBZM4ZNSGV26CCKVB6GM4F8T5Q6HG', // Prod\n ],\n gSuiteTransferAppIds: [\n 'MP-7TMH5K8N7KNNRZ5NC4RNNS2JFK64HMNC', // Demo\n 'MP-LMVNT4HKZCXTVDFMVT62Q6VB3ZJGNQC6', // Prod\n ],\n office365Customer: [\n 'MP-GXWJBHH6PQ5HDCDXFQ2ZP4D276JCJLKH', // Demo\n 'MP-MWTXLV4WDG2QCHSF2DR4JRSC4WK32DDG', // Prod\n ],\n};\n\nexport function userNotRequiredProduct(id: string): boolean {\n return [\n 'SM',\n 'RM',\n 'MS',\n 'MP-0DC18874C6CE47ED96822E08934BA3D9',\n 'MP-82BC9CAD4CE441EF84BC1D7865A9939F',\n 'MP-9D51CB3899AC47A681B7D4FEB0608446',\n 'MP-RNK47QZV7CDVZ5J53ZGLV85WBBLKRB74',\n 'MP-AA5151CF1BB840819DBDF85A55E717BF',\n 'MP-3QXRWPFX4BTVGZ3NBPSWPS8L3S7QS66W',\n 'MP-ZZNTMG6LPHF2SMWW7PZ5W52S5WZM67Q6',\n 'MP-8617C62DE46D4358B6A681433145F087',\n 'MP-940E58064E2F476BB1D74E12386729B0',\n 'MP-88A1EB6613BB4384A745902D186867BC',\n 'MP-LD7FL5VFX68FWCP4P8FW6RW37V58PV4B',\n 'MP-EE4EA04E553A4B1780CAF7AAD7BE07CD',\n 'MP-C4974D390A044C28AEC31E421AA662B2',\n 'MP-94072E44D5364872B672D7AB4FC7A7E8',\n ].includes(id.toUpperCase());\n}\n\nexport function isGSuite(productId: string): boolean {\n return (\n INACCESSIBLE_PRODUCTS.gSuiteBasicAppIds.indexOf(productId) >= 0 ||\n INACCESSIBLE_PRODUCTS.gSuiteBusinessAppIds.indexOf(productId) >= 0 ||\n INACCESSIBLE_PRODUCTS.googleWorkspaceBusinessPlusAppIds.indexOf(productId) >= 0 ||\n INACCESSIBLE_PRODUCTS.googleWorkspaceEnterpriseEssentialsAppIds.indexOf(productId) >= 0 ||\n INACCESSIBLE_PRODUCTS.googleWorkspaceEnterpriseStandardAppIds.indexOf(productId) >= 0 ||\n INACCESSIBLE_PRODUCTS.googleWorkspaceEnterprisePlusAppIds.indexOf(productId) >= 0\n );\n}\nexport function isGSuiteTransfer(productId: string): boolean {\n return INACCESSIBLE_PRODUCTS.gSuiteTransferAppIds.indexOf(productId) >= 0;\n}\nexport function isOffice365(productId: string): boolean {\n return INACCESSIBLE_PRODUCTS.office365Customer.indexOf(productId) >= 0;\n}\n\n// only show Rep Man, Social Marketing,\n// (The) Customer Voice,\n// Ad Intel\n// Appointment Scheduling, Live Chat, and Form Builder, (no particular order)\n// Reputation Spy (Brands)\nexport const DIRECT_WEST_VISIBLE_PRODUCTS = [\n 'RM',\n 'SM',\n 'MP-c4974d390a044c28aec31e421aa662b2',\n 'MP-94072e44d5364872b672d7ab4fc7a7e8',\n 'MP-0dc18874c6ce47ed96822e08934ba3d9',\n 'MP-82bc9cad4ce441ef84bc1d7865a9939f',\n 'MP-9d51cb3899ac47a681b7d4feb0608446',\n 'Reputation Spy(RepSpy)',\n];\n", "import { Injectable } from '@angular/core';\nimport {\n App,\n AppKey,\n AppSettings,\n GetMultiAppRequest,\n GetMultiAppResponse,\n ListAppSettingsRequest,\n ListAppSettingsResponse,\n PartnerApiService,\n} from '@galaxy/marketplace-apps';\nimport { Observable } from 'rxjs';\nimport { map, share, shareReplay } from 'rxjs/operators';\nimport { partnerId } from '../../globals';\n\n@Injectable({ providedIn: 'root' })\nexport class AppPartnerService {\n constructor(private partnerApiService: PartnerApiService) {}\n\n public getMulti(appKeys: AppKey[], marketId: string): Observable {\n return this.partnerApiService\n .getMultiApp(\n new GetMultiAppRequest({\n appKeys: appKeys,\n projectionFilter: null,\n partnerId,\n marketId: marketId,\n }),\n )\n .pipe(\n map((resp: GetMultiAppResponse) => {\n return (resp || { apps: [] }).apps || [];\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n }\n\n public listAppSettings(\n partnerId: string,\n marketId: string,\n cursor: string,\n pageSize: number,\n ): Observable {\n if (!pageSize) {\n pageSize = 1000;\n }\n const req = new ListAppSettingsRequest({\n partnerId: partnerId,\n marketId: marketId,\n cursor: cursor,\n pageSize: pageSize,\n });\n return this.partnerApiService.listAppSettings(req).pipe(\n map((resp: ListAppSettingsResponse) => {\n if (resp.hasMore) {\n console.log('Reached page limit');\n }\n return resp ? resp.appSettings : [];\n }),\n share(),\n );\n }\n}\n", "export interface LmiCategory {\n name: string;\n translationKey?: string;\n categoryId: string;\n}\n\nexport const LMI_CATEGORIES: LmiCategory[] = [\n {\n name: 'Listings',\n translationKey: 'COMMON.LMI_CATEGORIES.LISTINGS',\n categoryId: 'listings',\n },\n {\n name: 'Social',\n translationKey: 'COMMON.LMI_CATEGORIES.SOCIAL',\n categoryId: 'social',\n },\n {\n name: 'Reputation',\n translationKey: 'COMMON.LMI_CATEGORIES.REPUTATION',\n categoryId: 'reputation',\n },\n {\n name: 'SEO',\n translationKey: 'COMMON.LMI_CATEGORIES.SEO',\n categoryId: 'seo',\n },\n {\n name: 'Website',\n translationKey: 'COMMON.LMI_CATEGORIES.WEBSITE',\n categoryId: 'website',\n },\n {\n name: 'Advertising',\n translationKey: 'COMMON.LMI_CATEGORIES.ADVERTISING',\n categoryId: 'advertising',\n },\n {\n name: 'Content',\n translationKey: 'COMMON.LMI_CATEGORIES.CONTENT',\n categoryId: 'content_and_experience',\n },\n];\n\nexport const LMI_CATEGORY_MAP = LMI_CATEGORIES.reduce((previous, current) => {\n previous[current.categoryId] = current;\n return previous;\n}, {});\n\nexport const LMI_CATEGORIES_BY_NAME = LMI_CATEGORIES.reduce((previous, current) => {\n previous[current.name] = current;\n return previous;\n}, {});\n\nexport const LMI_CATEGORIES_WITH_REGIONAL_GRADES: string[] = ['listings'];\n\nexport const LMI_CATEGORY_ENUM_MAP = {\n 0: 'NOT_SET',\n 1: 'WEBSITE',\n 2: 'CONTENT_AND_EXPERIENCE',\n 3: 'LISTINGS',\n 4: 'REPUTATION',\n 5: 'SEO',\n 6: 'SOCIAL',\n 7: 'ADVERTISING',\n};\n\nexport const LMI_CATEGORY_TITLE_ENUM_MAP = {\n NOT_SET: 0,\n WEBSITE: 1,\n CONTENT_AND_EXPERIENCE: 2,\n LISTINGS: 3,\n REPUTATION: 4,\n SEO: 5,\n SOCIAL: 6,\n ADVERTISING: 7,\n};\n", "import { Account } from '@vendasta/accounts/legacy';\nimport { FrequentlyAskedQuestionsInterface } from '@vendasta/marketplace-packages';\nimport { App, Edition } from '@galaxy/marketplace-apps';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport { LMI_CATEGORY_ENUM_MAP } from './lmi-categories';\ndayjs.extend(utc);\n\nconst ENTRY_URL_ACCOUNT_GROUP_PLACEHOLDER = '';\n\nfunction lowerToTitleCase(value: string): string {\n // Code taken from https://github.com/gouch/to-title-case to support the proper spec.\n const smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\\.?|via)$/i;\n\n return value\n ? value.replace(/[A-Za-z0-9\\u00C0-\\u00FF]+[^\\s-]*/g, (match, index, title) => {\n if (\n index > 0 &&\n index + match.length !== title.length &&\n match.search(smallWords) > -1 &&\n title.charAt(index - 2) !== ':' &&\n (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') &&\n title.charAt(index - 1).search(/[^\\s-]/) < 0\n ) {\n return match.toLowerCase();\n }\n\n if (match.substr(1).search(/[A-Z]|\\../) > -1) {\n return match;\n }\n\n return match.charAt(0).toUpperCase() + match.substr(1);\n })\n : value;\n}\n\nexport class FAQ {\n question: string;\n answer: string;\n}\n\nexport enum EDITION {\n STANDARD = 0,\n EXPRESS,\n PRO,\n}\n\nexport class File {\n public name: string;\n public icon: string;\n public url: string;\n\n constructor(url: string) {\n this.name = this._extractName(url);\n this.icon = this._determineIcon(url);\n this.url = url;\n }\n\n _extractName(url: string): string {\n return url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));\n }\n\n _determineIcon(url: string): string {\n const ext = url.substring(url.lastIndexOf('.') + 1);\n switch (ext) {\n case 'pdf':\n return 'icon-pdf';\n case 'ppt':\n return 'icon-ppt';\n default:\n return 'icon-docs';\n }\n }\n}\n\nexport class Product {\n productId: string;\n editionId?: string;\n name: string;\n editionName?: string;\n active?: boolean;\n abbreviation: string;\n entryUrl?: string;\n iconColor: string;\n iconUrl: string;\n icon: string;\n isTrial: boolean;\n expired: boolean;\n trialDuration?: number;\n trialEnabled?: boolean;\n trialDaysRemaining?: number;\n hiddenFromDashboard?: boolean;\n\n edition?: EDITION;\n editions?: Edition[];\n\n tagline: string;\n headerImageUrl: string;\n screenshotUrls: string[];\n files: File[];\n lmiCategories: number[];\n pdfUploadUrls: string[];\n\n description: string;\n _description: string;\n\n keySellingPoints: string[];\n _keySellingPoints: string[];\n\n faqs?: FrequentlyAskedQuestionsInterface[];\n _faqs: FrequentlyAskedQuestionsInterface[];\n\n getLmiCategoryNames: () => string[];\n\n endUserMarketingInfo?: {\n description: string;\n keyBenefits: string[];\n faqs: FAQ[];\n };\n\n usesCustomizationForm?: boolean;\n\n restrictions?: any;\n\n static fromV2App(app: App): Product {\n const p = new Product({});\n\n if (app === new App({})) {\n return p;\n }\n\n if (app.activationInformation) {\n p.usesCustomizationForm = app.activationInformation.orderFormEnabled;\n }\n\n if (app.trialConfiguration) {\n p.trialDuration = app.trialConfiguration.trialDuration;\n p.trialEnabled = app.trialConfiguration.trialEnabled;\n }\n\n if (app.sharedMarketingInformation) {\n p.name = app.sharedMarketingInformation.name;\n p.editionName = app.sharedMarketingInformation.editionName;\n p.icon = app.sharedMarketingInformation.iconUrl;\n p.iconUrl = app.sharedMarketingInformation.iconUrl;\n p.tagline = app.sharedMarketingInformation.tagline;\n p.headerImageUrl = app.sharedMarketingInformation.bannerImageUrl;\n }\n\n if (app.endUserMarketingInformation) {\n p.description = app.endUserMarketingInformation.description;\n p.keySellingPoints = app.endUserMarketingInformation.keySellingPoints;\n p.faqs = app.endUserMarketingInformation.faqs;\n p.screenshotUrls = app.endUserMarketingInformation.screenshotUrls;\n p.files = app.endUserMarketingInformation.fileUrls?.map((fu) => new File(fu));\n }\n\n if (app.editionInformation) {\n p.editions = app.editionInformation.editions;\n }\n\n if (app.key) {\n p.productId = app.key.appId;\n p.editionId = app.key.editionId;\n }\n\n if (app.basicIntegration) {\n p.hiddenFromDashboard = app.basicIntegration.hideFromClientDashboard;\n }\n\n if (app.ssoIntegration && app.ssoIntegration.enabled && app.ssoIntegration.entryUrl) {\n p.entryUrl = app.ssoIntegration.entryUrl.replace(\n new RegExp('%3CaccountId%3E', 'g'),\n ENTRY_URL_ACCOUNT_GROUP_PLACEHOLDER,\n );\n } else if (app.basicIntegration && app.basicIntegration.applicationUrl) {\n p.entryUrl = app.basicIntegration.applicationUrl;\n } else if (\n app.key &&\n app.key.appId &&\n app.key.appId.startsWith('CP-') &&\n app.ssoIntegration &&\n app.ssoIntegration.entryUrl\n ) {\n p.entryUrl = app.ssoIntegration.entryUrl.replace(\n new RegExp('%3CaccountId%3E', 'g'),\n ENTRY_URL_ACCOUNT_GROUP_PLACEHOLDER,\n );\n }\n\n return p;\n }\n\n constructor(productData: {\n active?: boolean;\n category?: string;\n created?: string | Date;\n currency?: number;\n description?: string;\n endDate?: string | Date;\n entryUrl?: string;\n expiry?: string;\n faqs?: FrequentlyAskedQuestionsInterface[];\n headerImageUrl?: string;\n iconUrl?: string;\n isArchived?: boolean;\n isTrial?: boolean;\n keySellingPoints?: string[];\n lmiCategories?: number[];\n name?: string;\n origin?: string;\n partnerId?: string;\n pdfUploadUrls?: string[];\n productId?: string;\n editionId?: string;\n screenshotUrls?: string[];\n serviceModel?: number[];\n sessionUrl?: string;\n tagline?: string;\n updated?: string | Date;\n updatedBy?: string;\n usesCustomizationForm?: boolean;\n websiteUrl?: string;\n wholesalePrice?: string;\n trialDaysRemaining?: number;\n trialDuration?: number;\n restrictions?: any;\n hiddenFromClientDashboard?: boolean;\n\n endUserMarketingInfo?: {\n description: string;\n keyBenefits: string[];\n faqs: FAQ[];\n };\n }) {\n this.productId = productData.productId;\n this.name = productData.name;\n this.tagline = productData.tagline;\n this.icon = productData.iconUrl;\n this.iconUrl = productData.iconUrl;\n this.iconColor = Product.getIconColorForName(productData.name);\n this.abbreviation = Product.abbreviation(productData.name);\n this.headerImageUrl = productData.headerImageUrl;\n this.entryUrl = productData.entryUrl;\n this.screenshotUrls = productData.screenshotUrls;\n this.active = productData.active;\n this.files = Product.files(productData);\n this.lmiCategories = productData.lmiCategories || [];\n this.pdfUploadUrls = productData.pdfUploadUrls;\n this.editionId = productData.editionId || '';\n\n this.endUserMarketingInfo = productData.endUserMarketingInfo;\n this._description = productData.description;\n this._keySellingPoints = productData.keySellingPoints;\n this._faqs = productData.faqs;\n this.isTrial = productData.isTrial;\n this.expired = Product.isProductExpired(productData.expiry);\n this.trialDaysRemaining = productData.trialDaysRemaining;\n this.trialDuration = productData.trialDuration;\n this.description = this.endUserMarketingInfo ? this.endUserMarketingInfo.description : this._description;\n\n this.restrictions = productData.restrictions;\n\n this.keySellingPoints = this.endUserMarketingInfo ? this.endUserMarketingInfo.keyBenefits : this._keySellingPoints;\n\n this.faqs = this.endUserMarketingInfo ? this.endUserMarketingInfo.faqs : this._faqs;\n\n this.getLmiCategoryNames = () => {\n return this.lmiCategories\n ? this.lmiCategories.map((lmiCategory) =>\n lowerToTitleCase(Product.convertLmiCategoryEnum(lmiCategory).toLowerCase().replace(/_/g, ' ')),\n )\n : [];\n };\n\n this.usesCustomizationForm = productData.usesCustomizationForm || false;\n }\n\n static convertLmiCategoryEnum(lmiNumber: number): string {\n return LMI_CATEGORY_ENUM_MAP[lmiNumber];\n }\n\n static getRelevantFiles(productData: any): string[] {\n return productData.endUserMarketingInfo ? productData.endUserMarketingInfo.files : productData.pdfUploadUrls;\n }\n\n static files(productData: any): File[] {\n return this.getRelevantFiles(productData) ? this.getRelevantFiles(productData).map((url) => new File(url)) : [];\n }\n\n static abbreviation(productName: string): string {\n const defaultAbbreviation = 'U'; // untitled\n if (productName) {\n // example input \"Partner Central\"\n // example output \"PC\"\n\n // example input \"Partner\"\n // example output \"P\"\n const names = productName.split(' ');\n return names.length > 1 ? names[0][0] + names[1][0] : names[0][0];\n }\n return defaultAbbreviation;\n }\n\n static getIconColorForName(name: string): string {\n // determine an icon color for a product with no icon by using the product name\n const COLOR_CODES = [\n '#EF5350',\n '#42A5F5',\n '#66BB6A',\n '#FFA726',\n '#AB47BC',\n '#FFCA28',\n '#EC407A',\n '#26C6DA',\n '#FF7B57',\n ];\n let nameSum = 0;\n const defaultColor = '#808080';\n if (!name) {\n return defaultColor;\n }\n for (let i = 0; i < name.length; i++) {\n nameSum += name[i].charCodeAt(0);\n }\n\n const index = nameSum % COLOR_CODES.length;\n return COLOR_CODES[index];\n }\n\n static isProductExpired(expiryDate: string): boolean {\n // determines if the expiry date of the product has passed or not,\n // positive difference implies the expiry date has passed\n const now = dayjs().utc();\n const difference = now.diff(expiryDate);\n return difference > 0;\n }\n\n public renderBusinessIdIntoEntryUrl(businessId: string): void {\n if (this.entryUrl) {\n this.entryUrl = this.entryUrl.replace(new RegExp(ENTRY_URL_ACCOUNT_GROUP_PLACEHOLDER, 'g'), businessId);\n }\n }\n\n public isAccountOfProduct(a: Account): boolean {\n return a.accountId === this.productId || a.productId === this.productId || a.appId === this.productId;\n }\n}\n", "import { Injectable } from '@angular/core';\nimport { AppKey } from '@galaxy/marketplace-apps';\nimport { Account, AccountsService } from '@vendasta/accounts/legacy';\nimport { ListAppsAndAddonsActivationsStatusesForBusinessResponseAppsAndAddonsActivationStatusesInterface as AppsAndAddonsActivationStatusesInterface } from '@vendasta/accounts/legacy/_internal/interfaces/api.interface';\nimport { ProductService as MarketplaceProductService } from '@vendasta/marketplace-packages';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { map, shareReplay, skipWhile, switchMap } from 'rxjs/operators';\nimport { environment, partnerId } from '../../globals';\nimport { AccountGroup, AccountGroupService } from '../account-group/';\nimport { AppConfigService } from '../app-config.service';\nimport { DIRECT_WEST_VISIBLE_PRODUCTS, isGSuiteTransfer } from '../product/product-access-constants';\nimport { AppPartnerService } from './app_partner.service';\nimport { EDITION, Product } from './product';\n\ndayjs.extend(utc);\n\nexport const EXPRESS_EDITION_IDS = Object.freeze(['EDITION-38SMW45H', 'EDITION-F7JZ5TV8']);\nexport const PRO_EDITION_IDS = Object.freeze(['EDITION-FGVLLVMN', 'EDITION-GGNG62B5']);\n\n@Injectable({ providedIn: 'root' })\nexport class ProductService {\n readonly expiredTrialAccounts$ = this.accountGroupService.currentAccountGroup$.pipe(\n switchMap((ag) => this.accountsService.list(ag.accountGroupId, partnerId)),\n map((res) => res.accounts || []),\n map((accounts) => accounts.filter((a) => a.trial && a.deactivation)),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n readonly platformApps$ = this.appConfigService.businessAppName$.pipe(\n map((name) => [\n new Product({\n productId: 'VBC',\n name: name,\n iconUrl: `https://vbc-${environment}.appspot.com/static/images/file-upload.png`,\n origin: 'partner_created',\n }),\n ]),\n );\n\n // DEPRECATED. DO NOT USE.\n // Using this results in a very large/slow list products API call.\n readonly marketplaceProducts$ = combineLatest([\n this.accountGroupService.currentAccountGroup$,\n this.accountGroupService.currentAccountGroup$.pipe(\n switchMap((ag) => this.marketplaceProductService.loadAllProducts(partnerId, 500, '', ag.marketId)),\n map((resp) => resp.products.map((product) => new Product(product))),\n ),\n this.accountGroupService.currentAccountGroup$.pipe(\n switchMap((ag) => this.appPartnerService.listAppSettings(partnerId, ag.marketId, '', 500)),\n ),\n ]).pipe(\n map(([ag, allProducts, allAppSettings]) => {\n return allProducts.map((product) => {\n // Update EntryUrl\n if (product.entryUrl) {\n product.entryUrl = product.entryUrl.replace(new RegExp('', 'g'), ag.accountGroupId);\n }\n // Update Branding\n for (const appSetting of allAppSettings) {\n if (appSetting.appId === product.productId) {\n if (appSetting.branding && appSetting.branding.enabled) {\n if (appSetting.branding.name) {\n product.name = appSetting.branding.name;\n }\n if (appSetting.branding.iconUrl) {\n product.icon = appSetting.branding.iconUrl;\n product.iconUrl = appSetting.branding.iconUrl;\n }\n }\n break;\n }\n }\n return product;\n });\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n readonly activeProducts$ = this.accountGroupService.currentAccountGroup$.pipe(\n switchMap((ag) => this.loadActiveProducts(ag.accountGroupId, ag.marketId)),\n shareReplay({ refCount: false, bufferSize: 1 }),\n );\n\n readonly execReportActiveProducts$ = combineLatest([\n this.appConfigService.legacyConfig$,\n this.accountGroupService.currentAccountGroup$,\n ]).pipe(\n switchMap(([config, ag]) => {\n if (config.decoupleProductAndReportAccess) {\n return this.accountsService\n .listAppsAndAddonsActivationStatusesForBusiness(ag.accountGroupId, {\n // 1 is the status for active accounts, so this filter only returns active, not trial accounts\n statuses: [1],\n })\n .pipe(\n map((res: AppsAndAddonsActivationStatusesInterface[]) => {\n if (!res) {\n return [];\n }\n return res.map(\n (activation) =>\n new AppKey({\n appId: activation.appId,\n editionId: activation.editionId,\n }),\n );\n }),\n switchMap((keys) =>\n keys && keys.length > 0 ? this.appPartnerService.getMulti(keys, ag.marketId) : of([]),\n ),\n map((apps) => apps.map(Product.fromV2App).filter((product) => product.hiddenFromDashboard !== true)),\n );\n }\n return this.activeProducts$;\n }),\n shareReplay({ refCount: false, bufferSize: 1 }),\n );\n\n readonly activeAccessibleProducts$ = combineLatest([\n this.accountGroupService.currentAccountGroup$,\n this.activeProducts$,\n ]).pipe(\n map(([accountGroup, products]): Product[] => {\n if (!products) {\n return null;\n }\n return products.filter(\n (product) =>\n // User must have access to the product\n this.hasAccessToProduct(product.productId, accountGroup) &&\n // DirectWest has a specific list of products to display\n !shouldHideProductForDW(product, partnerId),\n );\n }),\n shareReplay({ refCount: false, bufferSize: 1 }),\n );\n\n constructor(\n private accountGroupService: AccountGroupService,\n private accountsService: AccountsService,\n private marketplaceProductService: MarketplaceProductService,\n private appPartnerService: AppPartnerService,\n private appConfigService: AppConfigService,\n ) {}\n\n static modifyProductsBasedOnActivations(\n products: Product[],\n accounts: Account[],\n trialAccounts: Account[],\n accountGroupId: string,\n ): Product[] {\n return (products || []).map((p) => {\n let customEntryUrl;\n\n // Set the edition\n p.edition = EDITION.STANDARD;\n\n if (p && p.productId && accounts && accounts.length > 0) {\n const accountForProduct = accounts.find((a) => p.isAccountOfProduct(a));\n if (accountForProduct) {\n customEntryUrl = accountForProduct.customEntryUrl;\n\n // Check the edition of the product\n if (accountForProduct.editionId) {\n if (EXPRESS_EDITION_IDS.indexOf(accountForProduct.editionId) > -1) {\n p.edition = EDITION.EXPRESS;\n } else if (PRO_EDITION_IDS.indexOf(accountForProduct.editionId) > -1) {\n p.edition = EDITION.PRO;\n }\n }\n }\n }\n\n // Prioritize the activation specific entry url over the sso urls\n if (customEntryUrl) {\n p.entryUrl = customEntryUrl;\n } else {\n p.renderBusinessIdIntoEntryUrl(accountGroupId);\n }\n\n const trialAccount = (trialAccounts || []).find((a) => p.isAccountOfProduct(a));\n if (trialAccount) {\n p.isTrial = true;\n p.trialDaysRemaining = ProductService.getTrialDaysRemaining(trialAccount, p);\n }\n\n p.active = true;\n return p;\n });\n }\n\n static getTrialDaysRemaining(trialAccount: Account, p: Product): number {\n let expiryDate = dayjs(trialAccount.activation).utc();\n expiryDate = expiryDate.add(p.trialDuration + 1, 'days');\n const currentDate = dayjs().utc();\n return Math.max(expiryDate.diff(currentDate, 'days'), 0);\n }\n\n loadActiveProducts(accountGroupId: string, marketId: string): Observable {\n return this.accountsService.list(accountGroupId, partnerId).pipe(\n map((res) => res.accounts || []),\n map((accounts) => accounts.filter((a) => !a.trial || (a.trial && dayjs(a.deactivation) > dayjs()))),\n switchMap((accounts) => {\n const trialAccounts = accounts.filter((a) => a.trial && dayjs(a.deactivation) > dayjs());\n\n const keys = accounts.map((account: Account) => {\n if (account.productId === 'CP') {\n return new AppKey({\n appId: account.accountId,\n editionId: account.editionId,\n });\n }\n\n return new AppKey({\n appId: account.appId || account.productId,\n editionId: account.editionId,\n });\n });\n\n return keys && keys.length > 0\n ? this.appPartnerService.getMulti(keys, marketId).pipe(\n map((apps) => apps.map(Product.fromV2App).filter((product) => product.hiddenFromDashboard !== true)),\n map((products) =>\n ProductService.modifyProductsBasedOnActivations(products, accounts, trialAccounts, accountGroupId),\n ),\n )\n : of([]);\n }),\n );\n }\n\n get activeProductsAndPlatformApps$(): Observable {\n return combineLatest([this.activeProducts$, this.platformApps$]).pipe(\n map(([products, platApps]) => {\n if (products == null || platApps == null) {\n return null;\n }\n return products.concat(platApps);\n }),\n skipWhile((products) => products === null),\n );\n }\n\n activeProductsAndPlatformAppsByAccountGroup$(accountGroupId: string, marketId: string): Observable {\n return combineLatest([this.loadActiveProducts(accountGroupId, marketId), this.platformApps$]).pipe(\n map(([products, platApps]) => {\n if (products == null || platApps == null) {\n return null;\n }\n return products.concat(platApps);\n }),\n skipWhile((products) => products === null),\n );\n }\n\n get newProductIds(): string[] {\n const cookieValue = document.cookie.match('newPurchases=([^;]*);?');\n let purchasedProductIds: string[];\n if (cookieValue && cookieValue.length > 1) {\n purchasedProductIds = cookieValue[1].split(',');\n }\n return purchasedProductIds;\n }\n\n private hasAccessToProduct(productId: string, accountGroup: AccountGroup): boolean {\n if (accountGroup.suspended && productId !== 'MS') {\n return false;\n }\n if (isGSuiteTransfer(productId)) {\n return false;\n }\n return true;\n }\n}\n\nexport function shouldHideProductForDW(product: Product, partnerId: string): boolean {\n // TODO get rid of this when we can\n if (partnerId !== 'DW') {\n return false;\n }\n return !DIRECT_WEST_VISIBLE_PRODUCTS.some((id) => id === product.productId || id === product.name);\n}\n"], "mappings": "gmBAqCM,SAAUA,GAAuBC,EAAU,CAC/C,MAAO,CACL,KACA,KACA,KACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,sCACA,qCAAqC,EACrCC,SAASD,EAAGE,YAAW,CAAE,CAC7B,CAEM,SAAUC,GAASC,EAAiB,CACxC,OACEC,EAAsBC,kBAAkBC,QAAQH,CAAS,GAAK,GAC9DC,EAAsBG,qBAAqBD,QAAQH,CAAS,GAAK,GACjEC,EAAsBI,kCAAkCF,QAAQH,CAAS,GAAK,GAC9EC,EAAsBK,0CAA0CH,QAAQH,CAAS,GAAK,GACtFC,EAAsBM,wCAAwCJ,QAAQH,CAAS,GA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F,EAAc,CAAC,KAAKiB,mBAAmBnC,EAAgBoB,CAAQ,EAAG,KAAKT,aAAa,CAAC,EAAEf,KAC5FK,EAAI,CAAC,CAACqB,EAAU8D,CAAQ,IAClB9D,GAAY,MAAQ8D,GAAY,KAC3B,KAEF9D,EAAS+D,OAAOD,CAAQ,CAChC,EACDE,EAAWhE,GAAaA,IAAa,IAAI,CAAC,CAE9C,CAEA,IAAIkE,eAAa,CACf,IAAMC,EAAcC,SAASC,OAAOC,MAAM,wBAAwB,EAC9DC,EACJ,OAAIJ,GAAeA,EAAY3C,OAAS,IACtC+C,EAAsBJ,EAAY,CAAC,EAAEK,MAAM,GAAG,GAEzCD,CACT,CAEQvC,mBAAmBtF,EAAmBqF,EAA0B,CAItE,MAHIA,EAAAA,EAAa0C,WAAa/H,IAAc,MAGxCgI,EAAiBhI,CAAS,EAIhC,iDA5PWM,GAAc2H,EAAAC,CAAA,EAAAD,EAAAE,CAAA,EAAAF,EAAA3H,CAAA,EAAA2H,EAAAG,CAAA,EAAAH,EAAAI,CAAA,CAAA,CAAA,CAAA,iCAAd/H,EAAcgI,QAAdhI,EAAciI,UAAAC,WADD,MAAM,CAAA,CAAA,SACnBlI,CAAc,GAAA", "names": ["userNotRequiredProduct", "id", "includes", "toUpperCase", "isGSuite", "productId", "INACCESSIBLE_PRODUCTS", "gSuiteBasicAppIds", "indexOf", "gSuiteBusinessAppIds", "googleWorkspaceBusinessPlusAppIds", "googleWorkspaceEnterpriseEssentialsAppIds", "googleWorkspaceEnterpriseStandardAppIds", "googleWorkspaceEnterprisePlusAppIds", "isGSuiteTransfer", "gSuiteTransferAppIds", "isOffice365", "office365Customer", "DIRECT_WEST_VISIBLE_PRODUCTS", "init_product_access_constants", "__esmMin", "AppPartnerService", "init_app_partner_service", "__esmMin", "init_src", "init_operators", "init_globals", "constructor", "partnerApiService", "getMulti", "appKeys", "marketId", "getMultiApp", "GetMultiAppRequest", "projectionFilter", "partnerId", "pipe", "map", "resp", "apps", "shareReplay", "refCount", "bufferSize", "listAppSettings", "cursor", "pageSize", "req", "ListAppSettingsRequest", "hasMore", "console", "log", "appSettings", "share", "\u0275\u0275inject", "PartnerApiService", "factory", "\u0275fac", "providedIn", "LMI_CATEGORIES", "LMI_CATEGORY_MAP", "LMI_CATEGORIES_BY_NAME", "LMI_CATEGORY_ENUM_MAP", "LMI_CATEGORY_TITLE_ENUM_MAP", "init_lmi_categories", "__esmMin", "name", "translationKey", "categoryId", "reduce", "previous", "current", "NOT_SET", "WEBSITE", "CONTENT_AND_EXPERIENCE", "LISTINGS", "REPUTATION", "SEO", "SOCIAL", "ADVERTISING", "lowerToTitleCase", "value", "smallWords", "replace", "match", "index", "title", "length", "search", "charAt", "toLowerCase", "substr", "toUpperCase", "import_dayjs", "import_utc", "ENTRY_URL_ACCOUNT_GROUP_PLACEHOLDER", "EDITION", "File", "Product", "init_product", "__esmMin", "init_src", "init_lmi_categories", "dayjs", "extend", "utc", "constructor", "url", "name", "_extractName", "icon", "_determineIcon", "substring", "lastIndexOf", "fromV2App", "app", "p", "App", "activationInformation", "usesCustomizationForm", "orderFormEnabled", "trialConfiguration", "trialDuration", "trialEnabled", "sharedMarketingInformation", "editionName", "iconUrl", "tagline", "headerImageUrl", "bannerImageUrl", "endUserMarketingInformation", "description", "keySellingPoints", "faqs", "screenshotUrls", "files", "fileUrls", "map", "fu", "editionInformation", "editions", "key", "productId", "appId", "editionId", "basicIntegration", "hiddenFromDashboard", "hideFromClientDashboard", "ssoIntegration", "enabled", "entryUrl", "RegExp", "applicationUrl", "startsWith", "productData", "iconColor", "getIconColorForName", "abbreviation", "active", "lmiCategories", "pdfUploadUrls", "endUserMarketingInfo", "_description", "_keySellingPoints", "_faqs", "isTrial", "expired", "isProductExpired", "expiry", "trialDaysRemaining", "restrictions", "keyBenefits", "getLmiCategoryNames", "lmiCategory", "convertLmiCategoryEnum", "lmiNumber", "LMI_CATEGORY_ENUM_MAP", "getRelevantFiles", "productName", "defaultAbbreviation", "names", "split", "COLOR_CODES", "nameSum", "defaultColor", "i", "charCodeAt", "expiryDate", "diff", "renderBusinessIdIntoEntryUrl", "businessId", "isAccountOfProduct", "a", "accountId", "shouldHideProductForDW", "product", "partnerId", "DIRECT_WEST_VISIBLE_PRODUCTS", "some", "id", "productId", "name", "import_dayjs", "import_utc", "EXPRESS_EDITION_IDS", "PRO_EDITION_IDS", "ProductService", "init_product_service", "__esmMin", "init_src", "init_esm", "init_operators", "init_globals", "init_product_access_constants", "init_product", "dayjs", "extend", "utc", "Object", "freeze", "constructor", "accountGroupService", "accountsService", "marketplaceProductService", "appPartnerService", "appConfigService", "expiredTrialAccounts$", "currentAccountGroup$", "pipe", "switchMap", "ag", "list", "accountGroupId", "map", "res", "accounts", "filter", "a", "trial", "deactivation", "shareReplay", "refCount", "bufferSize", "platformApps$", "businessAppName$", "Product", "iconUrl", "environment", "origin", "marketplaceProducts$", "combineLatest", "loadAllProducts", "marketId", "resp", "products", "listAppSettings", "allProducts", "allAppSettings", "entryUrl", "replace", "RegExp", "appSetting", "appId", "branding", "enabled", "icon", "activeProducts$", "loadActiveProducts", "execReportActiveProducts$", "legacyConfig$", "config", "decoupleProductAndReportAccess", "listAppsAndAddonsActivationStatusesForBusiness", "statuses", "activation", "AppKey", "editionId", "keys", "length", "getMulti", "of", "apps", "fromV2App", "hiddenFromDashboard", "activeAccessibleProducts$", "accountGroup", "hasAccessToProduct", "modifyProductsBasedOnActivations", "trialAccounts", "p", "customEntryUrl", "edition", "EDITION", "STANDARD", "accountForProduct", "find", "isAccountOfProduct", "indexOf", "EXPRESS", "PRO", "renderBusinessIdIntoEntryUrl", "trialAccount", "isTrial", "trialDaysRemaining", "getTrialDaysRemaining", "active", "expiryDate", "add", "trialDuration", "currentDate", "Math", "max", "diff", "account", "accountId", "activeProductsAndPlatformApps$", "platApps", "concat", "skipWhile", "activeProductsAndPlatformAppsByAccountGroup$", "newProductIds", "cookieValue", "document", "cookie", "match", "purchasedProductIds", "split", "suspended", "isGSuiteTransfer", "\u0275\u0275inject", "AccountGroupService", "AccountsService", "AppPartnerService", "AppConfigService", "factory", "\u0275fac", "providedIn"] }