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AIa,KAAcd,EAAO,CAC5BC,IACI2B,EAAS5B,EAAMc,GACzB7B,EAAWA,EAAW,QAAoB,OAASD,EAAa4C,GAAU,GAAK5C,GAAc,OACzF,CACF,CACD,EAAExlD,KAAKllC,MAER2qF,GAAsB,OAAuB,EAAEzlD,KAAKllC,KAAK,YAAa6qF,EAAgBA,EAAgBhC,QAAyB,qBAAVA,QAAsBA,aAAQnrF,GAAoBitF,CAAS","sources":["../../../../campaign-legacy/packages/crud-ad/schemaMapper.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adEditor.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/maxLengthExtension.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/textAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/DisclaimerPopUpView.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/panel.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/container.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/container.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/textAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/mobileDecorator.js","../../../../campaign-legacy/packages/crud-ad/longAdTitle.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/longAdTitleDecorator.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/textAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/upgradedUrl.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/upgradedUrl.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/textAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/appInstallAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/appInstallAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/dynamicSearchAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/dynamicSearchAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/dynamicSearchAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/adCustomizersPicker.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/adCustomizersCountdownEditor.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/feedsEditor.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/adCustomizersHelpers.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/dynamicSearchAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/productAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/productAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/expandedTextAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/expandedTextAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/expandedTextAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/responsiveSearchAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsPreview/responsiveTextAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsPreview/responsiveTextAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsStrength/responsiveSearchAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/responsiveSearchAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/ResponsiveSearchAdEditor.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/xandrVideoAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/xandrDisplayAd.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/displayPlusDisplayAd.js","../../../../campaign-legacy/packages/crud-ad/components/display-plus-native-form.js","../../../../campaign-legacy/packages/crud-ad/components/display-plus-native.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/displayPlusNativeAd.js","../../../../campaign-legacy/packages/crud-ad/lengthExceededErrorCodes.js","../../../../campaign-legacy/packages/crud-ad/view/adEditor.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adGroupAdsEditor.js","../../../../campaign-legacy/packages/crud-ad/view/adGroupAdsEditor.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/ResponsiveAd.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/positionExtension.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/responsiveListField.js","../../../../campaign-legacy/packages/crud-ad/view/adsEditor/responsiveListField.js","../../../../campaign-legacy/packages/crud-ad/view/adsPanel.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/create.js","../../../../campaign-legacy/packages/crud-ad/view/create.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/dynamicTextExtension.js","../../../../campaign-legacy/packages/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension.js","../../../../campaign-legacy/packages/crud-adgroup/share/instrumentKeywordAdGroup.js","../../../../campaign-legacy/packages/crud-adgroup/view/landingPage.js","../../../../campaign-legacy/packages/crud-adgroup/view/create-keyword-adgroup-decorator.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/create.js","../../../../campaign-legacy/packages/crud-adgroup/view/create.js","../../../../campaign-legacy/packages/crud-adgroup/share/errorExtractor.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/keywordPlanner.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/keywordPlannerAdvanced.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/keywordPlannerCreateOptions.js","../../../../campaign-legacy/packages/crud-adgroup/share/getSearchRange.js","../../../../campaign-legacy/packages/crud-adgroup/view/keywordPlannerAdvanced.js","../../../../campaign-legacy/packages/crud-adgroup/keywordPlannerSort.js","../../../../campaign-legacy/packages/crud-adgroup/view/keywordPlanner.js","../../../../campaign-legacy/packages/crud-adgroup/view/update-autotarget-adgroup-decorator.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/mixed-mode-create.js","../../../../campaign-legacy/packages/crud-adgroup/view/mixed-mode-create.js","../../../../campaign-legacy/packages/crud-adgroup/view/create-autotarget-adgroup-decorator.js","../../../../campaign-legacy/packages/crud-adgroup/view/update-keyword-adgroup-decorator.js","../../../../campaign-legacy/packages/crud-adgroup/viewmodel/update.js","../../../../campaign-legacy/packages/crud-adgroup/view/update.js","../../../../campaign-legacy/packages/crud-campaign/viewmodel/copy-campaign-settings.js","../../../../campaign-legacy/packages/crud-campaign/view/copy-campaign-settings.js","../../../../campaign-legacy/packages/crud-campaign/viewmodel/create.js","../../../../campaign-legacy/packages/crud-campaign/view/create.js","../../../../campaign-legacy/packages/crud-keywords/viewmodel/keyword.js","../../../../campaign-legacy/packages/crud-keywords/viewmodel/parser.js","../../../../campaign-legacy/packages/crud-keywords/view/create.js","../../../../campaign-legacy/packages/crud-keywords/viewmodel/section-wrapper.js","../../../../campaign-legacy/packages/crud-keywords/view/section-wrapper.js","../../../../campaign-legacy/packages/dsa-settings/viewmodel/dsa-settings.js","../../../../campaign-legacy/packages/dsa-settings/view/dsa-settings.js","../../../../campaign-legacy/packages/editorial-appeal/view/inline.js","../../../../campaign-legacy/packages/editorial-appeal/view/bulk.js","../../../../campaign-legacy/packages/editorial-appeal/view/single.js","../../../../campaign-legacy/packages/editorial-appeal/aggregator.js","../../../../campaign-legacy/packages/editorial-appeal/utilities.js","../../../../campaign-legacy/packages/editorial-appeal/viewmodel/editor.js","../../../../campaign-legacy/packages/editorial-appeal/view/editor.js","../../../../campaign-legacy/packages/editorial-appeal/view/inline-error.js","../../../../campaign-legacy/packages/crud-ad/template/adEditor.pug","../../../../campaign-legacy/packages/crud-ad/template/adGroupAdsEditor.pug","../../../../campaign-legacy/packages/crud-ad/template/adList.pug","../../../../campaign-legacy/packages/crud-ad/template/adPreview.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/adCustomizersCountdownDatePicker.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/adCustomizersCountdownEditor.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/adCustomizersPicker.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/appInstallAd.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/descriptions.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/dynamicSearchAd.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/editorTemplateWithAdCustomizer.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/expandedTextAd.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/headlines.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/popoverTemplate.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/responsiveSearchAd.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/responsiveSearchAdHeadlineDescriptionOnly.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/textAd.pug","../../../../campaign-legacy/packages/crud-ad/template/adsEditor/upgradedUrl.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/AdPreviewBody.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/DisclaimerPopUpView.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/container.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/mobile.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/native.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/sidebar.pug","../../../../campaign-legacy/packages/crud-ad/template/adsPreview/top.pug","../../../../campaign-legacy/packages/crud-ad/template/create.pug","../../../../campaign-legacy/packages/crud-ad/template/improveMMAAdEditor.pug","../../../../campaign-legacy/packages/crud-adgroup/template/create.pug","../../../../campaign-legacy/packages/crud-adgroup/template/keywordPlanner.pug","../../../../campaign-legacy/packages/crud-adgroup/template/keywordPlannerAdgroupNameColumnTemplate.pug","../../../../campaign-legacy/packages/crud-adgroup/template/keywordPlannerAdgroupSeeMoreColumnTemplate.pug","../../../../campaign-legacy/packages/crud-adgroup/template/keywordPlannerAdvanced.pug","../../../../campaign-legacy/packages/crud-adgroup/template/landingPage.pug","../../../../campaign-legacy/packages/crud-adgroup/template/learn-more.pug","../../../../campaign-legacy/packages/crud-adgroup/template/mixed-mode-create.pug","../../../../campaign-legacy/packages/crud-adgroup/template/update.pug","../../../../campaign-legacy/packages/crud-campaign/template/copy-campaign-settings.pug","../../../../campaign-legacy/packages/crud-campaign/template/create.pug","../../../../campaign-legacy/packages/crud-keywords/template/create.pug","../../../../campaign-legacy/packages/crud-keywords/template/section-wrapper.pug","../../../../campaign-legacy/packages/dsa-settings/template/dsa-settings.pug","../../../../campaign-legacy/packages/editorial-appeal/template/bulk.pug","../../../../campaign-legacy/packages/editorial-appeal/template/button-panel.pug","../../../../campaign-legacy/packages/editorial-appeal/template/cancel-button.pug","../../../../campaign-legacy/packages/editorial-appeal/template/editor.pug","../../../../campaign-legacy/packages/editorial-appeal/template/inline-error.pug","../../../../campaign-legacy/packages/editorial-appeal/template/inline-form.pug","../../../../campaign-legacy/packages/editorial-appeal/template/not-appealable.pug","../../../../campaign-legacy/packages/editorial-appeal/template/reasons.pug"],"sourcesContent":["import _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nexport const Text = _.constant([\r\n 'Text', 'Title', 'DisplayUrl', 'DestinationUrl', 'DevicePreference', 'FinalUrls', 'MobileFinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix', 'NativePreference',\r\n]);\r\n\r\nexport const AppInstall = _.constant([\r\n 'AppPlatform', 'AppStoreId', 'Title', 'Text', 'FinalUrls', 'DevicePreference', 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix', 'DestinationUrl', 'AltText', 'MediaUrl', 'DeviceType',\r\n]);\r\n\r\nexport const DynamicSearch = _.constant([\r\n 'Text', 'TextPart2', 'Path1', 'Path2', 'DevicePreference', 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix',\r\n]);\r\n\r\nexport const Product = _.constant([\r\n 'PromotionalText',\r\n]);\r\n\r\nconst expandedTextFields = ['TitlePart1', 'TitlePart2', 'Text', 'Path1', 'Path2', 'FinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix', 'MobileFinalUrls', 'NativePreference'];\r\n\r\nif (permissions.IsVanityUrlEnabled) {\r\n expandedTextFields.push('DisplayUrl');\r\n}\r\n\r\nif (permissions.IsExpandedTextAdV2Enabled) {\r\n expandedTextFields.push('TitlePart3', 'TextPart2');\r\n}\r\n\r\nexport const ExpandedText = _.constant(expandedTextFields);\r\n\r\nconst responsiveSearchFields = [\r\n 'Path1',\r\n 'Path2',\r\n 'Headlines',\r\n 'Descriptions',\r\n 'FinalUrls',\r\n 'TrackingUrlTemplate',\r\n 'UrlCustomParameters',\r\n 'FinalUrlSuffix',\r\n 'MobileFinalUrls',\r\n 'NativePreference',\r\n];\r\n\r\nif (permissions.IsVanityUrlEnabled) {\r\n responsiveSearchFields.push('DisplayUrl');\r\n}\r\n\r\nexport const ResponsiveSearch = _.constant(responsiveSearchFields);\r\n\r\nconst responsiveFields = [\r\n 'Headline',\r\n 'Headlines',\r\n 'LongHeadline',\r\n 'LongHeadlines',\r\n 'Text',\r\n 'Descriptions',\r\n 'BusinessName',\r\n 'Images',\r\n 'FinalUrls',\r\n 'FinalUrlSuffix',\r\n 'TrackingUrlTemplate',\r\n 'UrlCustomParameters',\r\n 'MobileFinalUrls',\r\n 'CallToAction',\r\n 'CallToActionLanguage',\r\n];\r\n\r\nexport const Responsive = _.constant(responsiveFields);\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { Ad } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport { types as campaignTypes } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { isAudienceNativeAdsCampaign, isAudienceCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { AdFormat } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst adGroupTypeEnum = {\r\n SearchStandard: 'SearchStandard',\r\n SearchDynamic: 'SearchDynamic',\r\n};\r\n\r\nconst adTypeEnum = {\r\n text: 'Text',\r\n dynamicSearch: 'DynamicSearch',\r\n appInstall: 'AppInstall',\r\n product: 'Product',\r\n expandedText: 'ExpandedText',\r\n responsive: 'Responsive',\r\n responsiveSearch: 'ResponsiveSearch',\r\n};\r\n\r\nconst defaultAdType = _.object(\r\n [\r\n campaignTypes.search,\r\n campaignTypes.shopping,\r\n campaignTypes.audience,\r\n campaignTypes.hotel,\r\n ],\r\n [\r\n ({\r\n isRSAAsDefaultTypeEnabled,\r\n }) => {\r\n if (config.get('CampaignObjective') === 'AppInstalls') {\r\n return adTypeEnum.appInstall;\r\n }\r\n\r\n if (isRSAAsDefaultTypeEnabled) {\r\n return adTypeEnum.responsiveSearch;\r\n }\r\n\r\n return adTypeEnum.expandedText;\r\n },\r\n _.constant(adTypeEnum.product),\r\n _.constant(adTypeEnum.responsive),\r\n _.constant(null),\r\n ],\r\n);\r\n\r\nconst campaignAdTypesMapping = _.object(\r\n [\r\n campaignTypes.search,\r\n campaignTypes.shopping,\r\n campaignTypes.audience,\r\n campaignTypes.hotel,\r\n ],\r\n [\r\n ({\r\n appInstallAdsAllowed,\r\n isSTADisabled,\r\n isRSAAsDefaultTypeEnabled,\r\n isForVNext,\r\n }) => {\r\n\r\n let base = [];\r\n\r\n if (!isSTADisabled) {\r\n base.push(adTypeEnum.text);\r\n }\r\n\r\n if (appInstallAdsAllowed) {\r\n base.push(adTypeEnum.appInstall);\r\n }\r\n\r\n if (isForVNext && pageContext.Permissions.IsMultiMediaAdsEnabled &&\r\n !pageContext.Permissions.IsAdultAdsEnabled &&\r\n (!pageContext.Permissions.IsDomesticSimplifiedChineseEnabled || (pageContext.Permissions.IsDomesticSimplifiedChineseEnabled && pageContext.Permissions.dynamic.MMAForCN))\r\n ) {\r\n // Under a search campaign, responsive ad represents multimedia ad\r\n base.push(adTypeEnum.responsive);\r\n }\r\n\r\n if (pageContext.Permissions.IsWhiteListEXTAEnabled) {\r\n base = _.union([adTypeEnum.expandedText], base);\r\n }\r\n if (isRSAAsDefaultTypeEnabled) {\r\n base.unshift(adTypeEnum.responsiveSearch);\r\n } else {\r\n base.push(adTypeEnum.responsiveSearch);\r\n }\r\n\r\n return base;\r\n },\r\n _.constant([adTypeEnum.product]),\r\n _.constant([adTypeEnum.responsive]),\r\n _.constant([]),\r\n ],\r\n);\r\n\r\nconst permissions = config.get('Permissions');\r\nconst { IsResponsiveAdForSSCEnabled } = permissions;\r\nconst campaignSubTypeAdTypesMapping = _.object(\r\n [\r\n 'ShoppingSmartAds',\r\n ],\r\n [\r\n _.constant(IsResponsiveAdForSSCEnabled ? [adTypeEnum.product, adTypeEnum.responsive] : [adTypeEnum.product]),\r\n ],\r\n);\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n model = null,\r\n campaignId = null,\r\n adGroupId = null,\r\n adGroupType = null,\r\n campaignType = null,\r\n campaignSubType = null,\r\n isFeedBasedCampaign = null,\r\n showInline = false,\r\n appInstallAdsAllowed = false,\r\n campaignDomain = '',\r\n isDynamicDescriptionEnabled = false,\r\n isMigratingToEXTA = false,\r\n isSTADisabled = false,\r\n isRSAAsDefaultTypeEnabled = false,\r\n isResponsiveAdEnabled = false,\r\n isMMAInDSAEnabled = false,\r\n isForVNext = false,\r\n adsCountMap = {},\r\n isAdgroupCreation = false,\r\n selectedAdFormat = undefined,\r\n } = {}) {\r\n this.model = model;\r\n this.showInline = showInline;\r\n this.appInstallAdsAllowed = appInstallAdsAllowed;\r\n this.isMigratingToEXTA = isMigratingToEXTA;\r\n this.isSTADisabled = isSTADisabled;\r\n this.isRSAAsDefaultTypeEnabled = isRSAAsDefaultTypeEnabled;\r\n this.isResponsiveAdEnabled = isResponsiveAdEnabled;\r\n this.isMMAInDSAEnabled = isMMAInDSAEnabled;\r\n this.isForVNext = isForVNext;\r\n this.isAdgroupCreation = isAdgroupCreation;\r\n this.campaignType = campaignType;\r\n this.campaignSubType = campaignSubType;\r\n this.selectedAdFormat = ko.observable(selectedAdFormat);\r\n\r\n if (!this.isResponsiveAdEnabled && campaignAdTypesMapping[campaignTypes.audience]) {\r\n delete campaignAdTypesMapping[campaignTypes.audience];\r\n }\r\n\r\n this.scope = ko.observable({\r\n campaignId,\r\n adGroupId,\r\n adGroupType,\r\n campaignType,\r\n campaignSubType,\r\n campaignDomain,\r\n isDynamicDescriptionEnabled,\r\n isFeedBasedCampaign,\r\n adsCountMap,\r\n scenario: 'ads-create',\r\n });\r\n\r\n if (!this.showInline) {\r\n this.hasWebsiteImageOptedInObservable = ko.observable(true);\r\n }\r\n\r\n this.type = ko.computed(() => {\r\n let type = null;\r\n\r\n if (_.isEmpty(model)) {\r\n if (this.scope().campaignType) {\r\n type = defaultAdType[this.scope().campaignType]({\r\n isRSAAsDefaultTypeEnabled: this.isRSAAsDefaultTypeEnabled,\r\n });\r\n } else if (isRSAAsDefaultTypeEnabled) {\r\n type = adTypeEnum.responsiveSearch;\r\n } else {\r\n type = adTypeEnum.expandedText;\r\n }\r\n } else {\r\n type = model.Type;\r\n if (isMigratingToEXTA && model.Type === adTypeEnum.text) {\r\n type = adTypeEnum.expandedText;\r\n }\r\n }\r\n\r\n return type;\r\n });\r\n\r\n koSchema.properties(this, Ad, ['Type'], {\r\n Type: this.type,\r\n });\r\n\r\n this.adGroupType = ko.computed(() => {\r\n return this.scope().adGroupType || adGroupType;\r\n });\r\n\r\n this.availableAdTypes = this.getAvailableAdTypes();\r\n\r\n this.adTypesRegisterForLanguageChange = _.intersection(this.availableAdTypes, [adTypeEnum.text, adTypeEnum.expandedText]);\r\n\r\n this.adTypeOptions = ko.computed(() => {\r\n let adTypes = [];\r\n\r\n if (!_.isEmpty(this.model)) {\r\n adTypes = this.getTypesFromExistingModel(this.model);\r\n } else if (this.isSmartShoppingCampaign()) {\r\n adTypes = campaignSubTypeAdTypesMapping.ShoppingSmartAds();\r\n } else if (this.scope().campaignType) {\r\n adTypes = campaignAdTypesMapping[this.scope().campaignType]({\r\n appInstallAdsAllowed: this.appInstallAdsAllowed,\r\n isSTADisabled: this.isSTADisabled,\r\n isRSAAsDefaultTypeEnabled: this.isRSAAsDefaultTypeEnabled,\r\n isForVNext: this.isForVNext,\r\n });\r\n }\r\n\r\n if (this.isSmartShoppingCampaign() && this.scope().adsCountMap) {\r\n // filter ad type which already exists under SSC ad group\r\n adTypes = _.filter(adTypes, (adType) => !this.scope().adsCountMap[this.scope().adGroupId] || !this.scope().adsCountMap[this.scope().adGroupId][`${adType}`]);\r\n }\r\n\r\n if (this.isDynamicAdGroupAdCreation()) {\r\n adTypes = this.getDynamicSearchAdTypes();\r\n }\r\n\r\n return _.map(adTypes, (adType) => {\r\n return {\r\n Name: adType === adTypeEnum.responsive && this.scope().campaignType === 1 ?\r\n i18n.get('AdTypeOption_Multimedia') : i18n.get(`AdType_${adType}Ad`),\r\n Value: adType,\r\n };\r\n });\r\n });\r\n\r\n this.showAdType = ko.computed(() => {\r\n return _.size(this.adTypeOptions()) > 1;\r\n });\r\n\r\n this.showAdTypeWithErrors = ko.computed(() => {\r\n return this.showAdType() || (!showInline && this.errors().length > 0);\r\n });\r\n\r\n this.errors.isAppealable = ko.observable(false);\r\n this.disableAdType = ko.observable(!_.isEmpty(model));\r\n\r\n this.showMigrationAlertForEXTA = ko.computed(() => {\r\n return isMigratingToEXTA && (this.Type() === adTypeEnum.expandedText);\r\n });\r\n this.showMigrationAlertForSTA = ko.computed(() => {\r\n return isMigratingToEXTA && (this.Type() === adTypeEnum.text);\r\n });\r\n this.showSTAEndWarning = ko.computed(() => {\r\n return !isMigratingToEXTA && (this.Type() === adTypeEnum.text && showInline);\r\n });\r\n\r\n this.isDisplayPlusNativeEdit = ko.observable(\r\n this.campaignType && this.campaignSubType && this.scope().adGroupId ?\r\n isAudienceCampaign(this.campaignType) && isAudienceNativeAdsCampaign(this.campaignSubType) && permissions.dynamic && permissions.dynamic.DisplayPlusEdit :\r\n false);\r\n\r\n if (this.isDisplayPlusNativeEdit()) {\r\n setClarityTag({\r\n IsDisplayPlusAudienceNative: true,\r\n CampaignSubType: this.campaignSubType,\r\n });\r\n }\r\n\r\n this.containerClass = ko.computed(() => {\r\n return this.isDisplayPlusNativeEdit() ? 'display-plus-ad-editor-form__container' : 'ad-editor-form__container';\r\n });\r\n\r\n this.hideFooter = ko.computed(() => {\r\n return this.selectedAdFormat() === AdFormat.Display || this.selectedAdFormat() === AdFormat.Video;\r\n });\r\n\r\n this.showAdFormatOptions = ko.computed(() => {\r\n return permissions.dynamic && permissions.dynamic.DisplayPlusEdit && permissions.dynamic.MultiAdFormat && isAudienceNativeAdsCampaign(this.scope().campaignSubType || this.campaignSubType);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n isDynamicAdGroupAdCreation() {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n return isDSAMixedModeCampaignEnabled &&\r\n this.scope().campaignType === campaignTypes.search &&\r\n this.adGroupType() === adGroupTypeEnum.SearchDynamic;\r\n }\r\n\r\n getDynamicSearchAdTypes() {\r\n let base = [adTypeEnum.dynamicSearch];\r\n\r\n if (this.isMMAInDSAEnabled && !this.isAdgroupCreation) {\r\n base.push(adTypeEnum.responsive);\r\n }\r\n return base;\r\n }\r\n\r\n getAvailableAdTypes() {\r\n if (!_.isEmpty(this.model)) {\r\n return this.getTypesFromExistingModel(this.model);\r\n }\r\n\r\n let adTypes = [];\r\n\r\n if (this.isDynamicAdGroupAdCreation()) {\r\n return this.getDynamicSearchAdTypes();\r\n }\r\n\r\n if (this.showInline) {\r\n _.each(campaignAdTypesMapping, (value) => {\r\n adTypes = _.union(adTypes, value({\r\n appInstallAdsAllowed: this.appInstallAdsAllowed,\r\n isSTADisabled: this.isSTADisabled,\r\n isForVNext: this.isForVNext,\r\n }));\r\n });\r\n\r\n _.each(campaignSubTypeAdTypesMapping, (value) => {\r\n adTypes = _.union(adTypes, value());\r\n });\r\n\r\n // when the adgroup type is not selected, need to add DSA to ad types\r\n if (this.adGroupType() !== adGroupTypeEnum.SearchStandard) {\r\n adTypes = _.union(adTypes, this.getDynamicSearchAdTypes());\r\n }\r\n\r\n return adTypes;\r\n }\r\n\r\n return campaignAdTypesMapping[this.scope().campaignType || campaignTypes.search]({\r\n appInstallAdsAllowed: this.appInstallAdsAllowed,\r\n isForVNext: this.isForVNext,\r\n });\r\n }\r\n\r\n getTypesFromExistingModel(model) {\r\n return (this.isMigratingToEXTA ? [adTypeEnum.expandedText] : []).concat(model.Type);\r\n }\r\n\r\n isSmartShoppingCampaign() {\r\n const checkCampaignSubType = this.scope().campaignSubType === 'ShoppingSmartAds' || this.scope().campaignSubType === 12;\r\n\r\n return pageContext.Permissions.IsSmartShoppingCampaignEnabled && checkCampaignSubType;\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\n\r\nexport default function extend(schema, viewModel, isTraditionalChinese, keys) {\r\n viewModel.isTraditionalChinese = ko.observable(isTraditionalChinese);\r\n\r\n ko.computed(() => {\r\n _.each(keys, (key) => {\r\n let maxLength = viewModel.isTraditionalChinese() ? schema.properties[key].traditionalChineseMaxLength : schema.properties[key].maxLength;\r\n\r\n viewModel[key].maxLength(maxLength);\r\n });\r\n });\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { TextAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport dynamicTextExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicTextExtension';\r\nimport maxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/maxLengthExtension';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nfunction applyFieldRules(opt2fields, options, original) {\r\n let base = original;\r\n\r\n _.each(opt2fields, (value, key) => {\r\n if (options[key]) {\r\n base = _.union(base, value.include || []);\r\n base = _.difference(base, value.exclude || []);\r\n }\r\n });\r\n\r\n return base;\r\n}\r\n\r\nfunction getFields(options) {\r\n const base = ['Text', 'Title', 'DisplayUrl', 'DevicePreference', 'FinalUrls',\r\n 'TrackingUrlTemplate', 'UrlCustomParameters', 'MobileFinalUrls'];\r\n\r\n const opt2fields = {\r\n isNativeAdsEnabled: {\r\n include: ['NativePreference'],\r\n },\r\n };\r\n\r\n return applyFieldRules(opt2fields, options, base);\r\n}\r\n\r\nexport default class {\r\n constructor({\r\n model = null,\r\n isNativeAdsEnabled = false,\r\n isTraditionalChinese = false,\r\n } = {}) {\r\n this.model = model;\r\n this.isNativeAdsEnabled = isNativeAdsEnabled;\r\n\r\n this.upgradedUrlFields = ['FinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'MobileFinalUrls'];\r\n\r\n koSchema.properties(this, TextAd, getFields({ isNativeAdsEnabled }), _.defaults(model,\r\n isNativeAdsEnabled ? { NativePreference: 'NativePreference' } : {}));\r\n\r\n dynamicTextExtension.extend(this, ['Title', 'Text']);\r\n\r\n this.isFinal = ko.observable(true);\r\n this.url = ko.observable('');\r\n this.mobileUrl = ko.observable('');\r\n\r\n maxLengthExtension(TextAd, this, isTraditionalChinese, ['Title', 'Text']);\r\n }\r\n\r\n initPreviewTab() {\r\n this.showNativeAdPreview = ko.computed(() => {\r\n if (this.isNativeAdsEnabled) {\r\n return this.NativePreference.isNativePreference();\r\n }\r\n\r\n return false;\r\n });\r\n\r\n let defaultPreviewType = 'top';\r\n\r\n if (_.isObject(this.model)) {\r\n if (this.showNativeAdPreview()) {\r\n defaultPreviewType = 'native';\r\n } else if (this.DevicePreference.isMobile()) {\r\n defaultPreviewType = 'mobile';\r\n }\r\n }\r\n\r\n return defaultPreviewType;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport template from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/DisclaimerPopUpView.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport class DisclaimerPopUpView extends Backbone.View {\r\n initialize({\r\n viewModel,\r\n } = {}) {\r\n this.viewModel = viewModel;\r\n }\r\n render() {\r\n this.$el.html(template({ i18n }));\r\n\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport { result } from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { DisclaimerPopUpView } from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/DisclaimerPopUpView';\r\n\r\nconst {\r\n IsDisclaimerAdsEnabled,\r\n} = config.get('Permissions') || {};\r\n\r\nexport default class Panel extends Backbone.View {\r\n initialize({\r\n template,\r\n viewModel,\r\n i18n,\r\n adType = '',\r\n } = {}) {\r\n this.template = template;\r\n this.viewModel = viewModel;\r\n this.i18n = i18n;\r\n this.adType = adType;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .disclaimer-popup-link': 'displayPopupClicked',\r\n 'click .disclaimer-popup-close': 'closePopupClicked',\r\n };\r\n }\r\n\r\n displayPopupClicked() {\r\n if (IsDisclaimerAdsEnabled && !result(this.viewModel, 'IsDisclaimerPopupHintVisible')) {\r\n this.viewModel.IsDisclaimerPopupHintVisible(true); //eslint-disable-line\r\n }\r\n }\r\n\r\n closePopupClicked() {\r\n if (IsDisclaimerAdsEnabled && result(this.viewModel, 'IsDisclaimerPopupHintVisible')) {\r\n this.viewModel.IsDisclaimerPopupHintVisible(false); //eslint-disable-line\r\n }\r\n }\r\n\r\n render() {\r\n let showDisclaimer = false;\r\n\r\n if (IsDisclaimerAdsEnabled && result(this.viewModel, 'ShowDisclaimer')) {\r\n showDisclaimer = true;\r\n }\r\n\r\n this.$el.html(this.template({\r\n i18n: this.i18n,\r\n showDisclaimer,\r\n adType: this.adType,\r\n }));\r\n\r\n let disclaimer = new DisclaimerPopUpView({viewModel: this.viewModel});\r\n\r\n this.$('.disclaimer-placeholder').empty().append(disclaimer.render().$el);\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\n\r\nexport default class {\r\n constructor({\r\n tabs = [],\r\n } = {}) {\r\n this.selectedPanel = ko.observable();\r\n this.tabGroups = _.map(tabs, (tab) => {\r\n return _.map(tab, ({ title }, name) => {\r\n if (!this.selectedPanel()) {\r\n this.selectedPanel(name);\r\n }\r\n\r\n return {\r\n name,\r\n title,\r\n };\r\n });\r\n });\r\n }\r\n\r\n isTabGroupVisible(tabGroup) {\r\n return _.find(tabGroup, {\r\n name: this.selectedPanel(),\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/container.pug';\r\nimport Panel from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/panel';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/container';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst {\r\n IsDisclaimerAdsEnabled,\r\n} = config.get('Permissions') || {};\r\n\r\nexport default class AdsPreviewContainer extends Backbone.View {\r\n initialize({\r\n tabs = [],\r\n } = {}) {\r\n this.viewModel = new ViewModel({\r\n tabs,\r\n });\r\n\r\n this.tabGroups = _.map(tabs, (tab) => {\r\n return _.mapObject(tab, (subTab) => {\r\n return subTab.title;\r\n });\r\n });\r\n\r\n if (IsDisclaimerAdsEnabled) {\r\n this.tab = tabs[0];\r\n }\r\n\r\n this.panels = _.mapObject(_.extend.apply(this, tabs),\r\n (tab) => {\r\n return new Panel({\r\n template: tab.template,\r\n viewModel: tab.viewModel,\r\n title: tab.title,\r\n i18n: tab.i18n || i18n,\r\n adType: tab.adType,\r\n });\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click a.preview-tab': 'switchTab',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n i18n,\r\n tabGroups: this.tabGroups,\r\n panels: this.panels,\r\n uuid,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n _.each(this.panels, (panel, name) => {\r\n this.$(`.preview-${name}`).empty().append(panel.render().el);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n switchTab(target) {\r\n const selected = target.currentTarget.dataset.target;\r\n\r\n this.viewModel.selectedPanel(selected);\r\n\r\n if (IsDisclaimerAdsEnabled) {\r\n if (this.tab[selected].viewModel.IsDisclaimerPopupHintVisible) {\r\n this.tab[selected].viewModel.IsDisclaimerPopupHintVisible(false);//eslint-disable-line\r\n }\r\n }\r\n }\r\n\r\n selectedPanel(panel) {\r\n this.viewModel.selectedPanel(panel);\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor(adViewModel = {}) {\r\n this.Text = adViewModel.Text;\r\n this.Title = adViewModel.Title;\r\n this.DisplayUrl = adViewModel.DisplayUrl;\r\n\r\n this.DestinationUrl = ko.computed(() => {\r\n return adViewModel.url();\r\n });\r\n\r\n this.adViewModel = adViewModel;\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor(previewModel = {}) {\r\n const adViewModel = previewModel.adViewModel;\r\n\r\n this.Text = previewModel.Text;\r\n this.Title = previewModel.Title;\r\n this.DisplayUrl = previewModel.DisplayUrl;\r\n\r\n this.DestinationUrl = ko.computed(() => {\r\n let useFinalUrl = adViewModel.DevicePreference.isMobile() || !adViewModel.isFinal();\r\n\r\n return useFinalUrl ? adViewModel.url() : adViewModel.mobileUrl();\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { TextAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\n\r\nconst displayUrlSeparator = ' | ';\r\nconst descriptionSeparator = ' - ';\r\nconst tokenisersWithSpaces = ['2e', '3f', '21'];\r\nconst tokenisersWithNoSpaces = [];\r\n\r\nconst longAdTitleDetails = _.pick(TextAd.properties.Title, 'AdTitleWithDescriptionMaxLimit', 'AdTitleWithDisplayUrlMaxLimit');\r\n\r\n/*\r\n\r\n input : displayUrl = https://www.bing.com\r\n title = Hotel\r\n details = {\r\n 'AdTitleWithDisplayUrlMaxLimit' : 62,\r\n }\r\n output : Hotel | bing.com\r\n\r\n\r\n input : displayUrl = https://www.bing.com/search1/search2\r\n title = Hotel\r\n details = {\r\n 'AdTitleWithDisplayUrlMaxLimit' : 62,\r\n }\r\n output : Hotel | bing.com\r\n\r\n*/\r\nfunction generateTitleUsingDisplayUrl (displayUrl, title, details) {\r\n if (_.isEmpty(displayUrl.trim())) {\r\n return title;\r\n }\r\n\r\n let displayUrlInTitle = displayUrl.replace(/(http(s)*|ftp):\\/\\//i, '');\r\n\r\n const firstSlashIndex = displayUrlInTitle.indexOf('/');\r\n\r\n if (firstSlashIndex !== -1) {\r\n displayUrlInTitle = displayUrlInTitle.substring(0, firstSlashIndex);\r\n }\r\n\r\n if (displayUrlInTitle.substring(0, 4) === 'www.') {\r\n displayUrlInTitle = displayUrlInTitle.substring(4);\r\n }\r\n\r\n if (title && title.indexOf(displayUrlInTitle) > -1) {\r\n return title;\r\n }\r\n\r\n const newTitle = title + displayUrlSeparator + displayUrlInTitle;\r\n\r\n if (details && newTitle.length > details.AdTitleWithDisplayUrlMaxLimit) {\r\n return title;\r\n }\r\n\r\n return newTitle;\r\n}\r\n\r\n/*\r\n\r\n @input : description = This is a great hotel. I like it.\r\n title = Hotel\r\n details = {\r\n 'AdTitleWithDescriptionMaxLimit' : 62\r\n }\r\n @output: description = I like it.\r\n title = Hotel - This is a great hotel.\r\n isLongAdTitle = true\r\n\r\n\r\n @input : description = This is a great hotel.\r\n title = Hotel\r\n details = {\r\n 'AdTitleWithDescriptionMaxLimit' : 62\r\n }\r\n @output: description = This is a great hotel.\r\n title = Hotel\r\n isLongAdTitle = false\r\n\r\n*/\r\nfunction generateTitleUsingDescription(description, title, details) {\r\n let isLongAdTitle = false;\r\n let resultDescription = description;\r\n let resultTitle = title;\r\n\r\n if (!_.isEmpty(details)) {\r\n const maxLimit = details.AdTitleWithDescriptionMaxLimit;\r\n const originalLength = description.length;\r\n const inputChars = description.split('');\r\n const startPosition = originalLength - 1;\r\n\r\n for (let i = startPosition; i > 0; i--) {\r\n const character = description.charCodeAt(i).toString(16);\r\n\r\n if (_.contains(tokenisersWithNoSpaces, character) || (_.contains(tokenisersWithSpaces, character) && (i === startPosition || inputChars[i + 1] === ' '))) {\r\n const extendedTitle = description.substring(0, i + 1);\r\n const newTitle = title + descriptionSeparator + extendedTitle;\r\n\r\n if (newTitle.length < maxLimit) {\r\n resultDescription = description.substring(i + 1);\r\n resultTitle = newTitle;\r\n isLongAdTitle = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {\r\n title: resultTitle,\r\n description: resultDescription,\r\n isLongAdTitle,\r\n };\r\n}\r\n\r\nexport default {\r\n generate(description, displayUrl, title) {\r\n const results = generateTitleUsingDescription(description, title, longAdTitleDetails);\r\n\r\n if (results.isLongAdTitle) {\r\n return {\r\n title: results.title,\r\n description: results.description,\r\n };\r\n } else {\r\n return {\r\n title: generateTitleUsingDisplayUrl(displayUrl, title, longAdTitleDetails),\r\n description,\r\n };\r\n }\r\n },\r\n};\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport longAdTitle from '@bingads-webui-campaign-legacy/crud-ad/longAdTitle';\r\n\r\nexport default class ViewModel {\r\n constructor(previewModel = {}) {\r\n this.previewTitleAndText = ko.computed(() => {\r\n return longAdTitle.generate(previewModel.Text(), previewModel.DisplayUrl(), previewModel.Title());\r\n });\r\n\r\n //mainline title\r\n this.Title = ko.computed(() => {\r\n return this.previewTitleAndText().title;\r\n });\r\n\r\n //mainline text\r\n this.Text = ko.computed(() => {\r\n return this.previewTitleAndText().description;\r\n });\r\n\r\n this.DisplayUrl = previewModel.DisplayUrl;\r\n this.DestinationUrl = previewModel.DestinationUrl;\r\n\r\n this.adViewModel = previewModel.adViewModel;\r\n }\r\n}\r\n","import PreviewContainer from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/container';\r\nimport topTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/top.pug';\r\nimport sidebarTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/sidebar.pug';\r\nimport mobileTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/mobile.pug';\r\nimport nativeTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/native.pug';\r\nimport PreviewViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/textAd';\r\nimport MobileDecorator from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/mobileDecorator';\r\nimport LongAdTitleDecorator from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/longAdTitleDecorator';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default {\r\n buildPreview(viewModel) {\r\n return new PreviewContainer({\r\n contentClass: '.Text .preview-container',\r\n tabs: [{\r\n top: {\r\n template: topTemplate,\r\n viewModel: new LongAdTitleDecorator(new PreviewViewModel(viewModel)),\r\n title: i18n.get('Ad_TopView'),\r\n },\r\n sidebar: {\r\n template: sidebarTemplate,\r\n viewModel: new PreviewViewModel(viewModel),\r\n title: i18n.get('Ad_SideView'),\r\n },\r\n mobile: {\r\n template: mobileTemplate,\r\n viewModel: new MobileDecorator(new LongAdTitleDecorator(new PreviewViewModel(viewModel))),\r\n title: i18n.get('Ad_MobileView'),\r\n },\r\n }, {\r\n native: {\r\n template: nativeTemplate,\r\n viewModel: new PreviewViewModel(viewModel),\r\n title: i18n.get('Ad_NativeView'),\r\n },\r\n }],\r\n });\r\n },\r\n};\r\n","export default class ViewModel {\r\n constructor() {\r\n this.upgradedUrlFields = ['FinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'MobileFinalUrls'];\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/upgradedUrl';\r\nimport template from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/upgradedUrl.pug';\r\nimport UpgradedUrl from '@bingads-webui-component-legacy/upgraded-url/view/index';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n placeholders = {},\r\n adViewModel,\r\n showOnlyFinalUrl = false,\r\n api = null,\r\n editMode = false,\r\n urlOptionsEnabled = false,\r\n defaultLandingPageUrl = '',\r\n placeholderEnabled = true,\r\n ariaPrefix = '',\r\n } = {}) {\r\n this.adViewModel = adViewModel;\r\n this.placeholders = placeholders;\r\n this.showOnlyFinalUrl = showOnlyFinalUrl;\r\n this.api = api;\r\n this.editMode = editMode;\r\n this.urlOptionsEnabled = urlOptionsEnabled;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n this.placeholderEnabled = placeholderEnabled;\r\n this.ariaPrefix = ariaPrefix;\r\n\r\n this.viewModel = new ViewModel();\r\n }\r\n\r\n render() {\r\n this.$el.empty().append(template({}));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n let defaultOptions = {\r\n urlOptionsEnabled: this.urlOptionsEnabled,\r\n isMobilePreferred: _.isFunction(this.adViewModel.DevicePreference) ? this.adViewModel.DevicePreference.isMobile() : false,\r\n entityType: 'Ad',\r\n placeholderEnabled: this.placeholderEnabled,\r\n placeholders: this.placeholders,\r\n showOnlyFinalUrl: this.showOnlyFinalUrl,\r\n landingPageUrlRequired: true,\r\n highLightModeInError: true,\r\n };\r\n\r\n if (_.isObject(this.model)) {\r\n let isFinalUrl = _.isArray(this.model.FinalUrls) && !_.isEmpty(this.model.FinalUrls),\r\n url = isFinalUrl ? this.model.FinalUrls[0] : this.model.DestinationUrl,\r\n mobileUrl = _.isArray(this.model.MobileFinalUrls) && !_.isEmpty(this.model.MobileFinalUrls) ? this.model.MobileFinalUrls[0] : undefined;\r\n\r\n this.upgradedUrlView = new UpgradedUrl(_.extend(defaultOptions, {\r\n url,\r\n isFinal: isFinalUrl,\r\n finalMobileUrl: mobileUrl,\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n customParameters: _.isEmpty(this.model.UrlCustomParameters) ? undefined : _.clone(this.model.UrlCustomParameters), // eslint-disable-line\r\n editMode: true,\r\n ariaPrefix: this.ariaPrefix,\r\n }));\r\n\r\n this.adViewModel.isFinal(isFinalUrl);\r\n this.adViewModel.url(url);\r\n this.adViewModel.mobileUrl(mobileUrl);\r\n } else {\r\n this.upgradedUrlView = new UpgradedUrl(_.defaults(defaultOptions, {\r\n url: this.defaultLandingPageUrl,\r\n ariaPrefix: this.ariaPrefix,\r\n }));\r\n }\r\n\r\n this.$('.upgraded-url__container').empty().append(this.upgradedUrlView.render().el);\r\n this.upgradedUrlView.on('finalUrlChanged', this.urlInputChanged, this);\r\n this.upgradedUrlView.on('mobileUrlChanged', this.mobileUrlChanged, this);\r\n this.upgradedUrlView.on('finalUrlSelected', () => {\r\n this.adViewModel.isFinal(true);\r\n });\r\n this.upgradedUrlView.on('destinationUrlSelected', () => {\r\n this.adViewModel.isFinal(false);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n validate() {\r\n return this.upgradedUrlView.isValid();\r\n }\r\n\r\n urlInputChanged() {\r\n let url = this.upgradedUrlView.getValues().finalUrl.url;\r\n\r\n this.adViewModel.url(url);\r\n }\r\n\r\n mobileUrlChanged() {\r\n let url = this.upgradedUrlView.getValues().mobileUrl;\r\n\r\n this.adViewModel.mobileUrl(url);\r\n }\r\n\r\n devicePreferenceChanged(event) {\r\n this.upgradedUrlView.devicePreferenceChanged(event);\r\n }\r\n\r\n toObject() {\r\n let arrayEmptyValue = this.api === 'odata' ? [] : null;\r\n let stringEmptyValue = this.api === 'odata' ? '' : null;\r\n\r\n let uulModel = this.upgradedUrlView.toObject();\r\n\r\n if (this.editMode) {\r\n if (!this.adViewModel.isFinal() && !_.isEmpty(this.model.FinalUrls)) {\r\n // if update to use destinationUrl, then reset final url fields\r\n uulModel.FinalUrls = arrayEmptyValue;\r\n uulModel.MobileFinalUrls = arrayEmptyValue;\r\n uulModel.TrackingUrlTemplate = stringEmptyValue;\r\n uulModel.UrlCustomParameters = arrayEmptyValue;\r\n } else if (this.adViewModel.isFinal() && !_.isEmpty(this.model.DestinationUrl)) {\r\n //if update to use final url, then reset destination url field\r\n uulModel.DestinationUrl = stringEmptyValue;\r\n } else if (!this.adViewModel.isFinal()) {\r\n // if still destinationUrl\r\n if (_.isEmpty(uulModel.DestinationUrl)) {\r\n uulModel.DestinationUrl = stringEmptyValue;\r\n }\r\n } else if (this.adViewModel.isFinal()) {\r\n // if still finalUrl\r\n if (_.isEmpty(uulModel.FinalUrls)) {\r\n uulModel.FinalUrls = arrayEmptyValue;\r\n }\r\n if (_.isEmpty(uulModel.MobileFinalUrls)) {\r\n uulModel.MobileFinalUrls = arrayEmptyValue;\r\n }\r\n if (_.isEmpty(uulModel.TrackingUrlTemplate)) {\r\n uulModel.TrackingUrlTemplate = stringEmptyValue;\r\n }\r\n if (_.isEmpty(uulModel.UrlCustomParameters)) {\r\n uulModel.UrlCustomParameters = arrayEmptyValue;\r\n }\r\n }\r\n }\r\n\r\n return uulModel;\r\n }\r\n\r\n handleApiErrors() {\r\n let errorObject = _.object(this.viewModel.upgradedUrlFields, _.map(this.viewModel.upgradedUrlFields, (key) => {\r\n return _.isFunction(this.adViewModel[key].errors) ? this.adViewModel[key].errors() : [];\r\n }));\r\n\r\n this.upgradedUrlView.handleApiErrors(errorObject);\r\n }\r\n\r\n clearApiErrors() {\r\n this.upgradedUrlView.clearApiErrors();\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/textAd';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/textAd.pug';\r\nimport previewBuilder from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/textAd';\r\nimport UpgradedUrl from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/upgradedUrl';\r\nimport { isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst placeholders = {\r\n Text: i18n.get('Ad_Placeholder_Text'),\r\n Title: i18n.get('Ad_Placeholder_Title'),\r\n DisplayUrl: i18n.get('Ad_Placeholder_DisplayUrl'),\r\n DestinationUrl: i18n.get('Ad_Placeholder_DestinationUrl'),\r\n};\r\n\r\nexport default class TextAdEditor extends Backbone.View {\r\n initialize({\r\n showAdType = false,\r\n isNativeAdsEnabled = false,\r\n model = null,\r\n showInline = false,\r\n editMode = false,\r\n isTraditionalChinese = false,\r\n defaultLandingPageUrl = '',\r\n } = {}) {\r\n this.showAdType = showAdType;\r\n this.isNativeAdsEnabled = isNativeAdsEnabled;\r\n this.model = model;\r\n this.showInline = showInline;\r\n this.editMode = editMode;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n\r\n this.viewModel = new ViewModel({\r\n model,\r\n isNativeAdsEnabled,\r\n isTraditionalChinese,\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .prefer-native-format': 'preferNativeAdFormat',\r\n 'click .prefer-mobile-device': 'devicePreferenceChanged',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(editorTemplate({\r\n i18n,\r\n uuid,\r\n isNativeAdsEnabled: this.isNativeAdsEnabled,\r\n placeholders,\r\n showAdType: this.showAdType,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.upgradedUrlView = new UpgradedUrl({\r\n model: this.model,\r\n adViewModel: this.viewModel,\r\n api: this.showInline ? 'odata' : 'bulk',\r\n editMode: this.editMode,\r\n urlOptionsEnabled: this.showInline,\r\n defaultLandingPageUrl: this.defaultLandingPageUrl,\r\n ariaPrefix: 'textAd',\r\n });\r\n\r\n this.$('.upgraded-url').empty().append(this.upgradedUrlView.render().el);\r\n\r\n this.previewContainer = previewBuilder.buildPreview(this.viewModel);\r\n this.$('.preview-container').empty().append(this.previewContainer.render().el);\r\n this.previewContainer.selectedPanel(this.viewModel.initPreviewTab());\r\n\r\n return this;\r\n }\r\n\r\n resetEditMode(mode) {\r\n this.upgradedUrlView.editMode = mode;\r\n }\r\n\r\n preferNativeAdFormat() {\r\n let type = 'top';\r\n\r\n if (this.viewModel.showNativeAdPreview()) {\r\n type = 'native';\r\n } else if (this.viewModel.DevicePreference.isMobile()) {\r\n type = 'mobile';\r\n }\r\n\r\n this.previewContainer.selectedPanel(type);\r\n }\r\n\r\n devicePreferenceChanged(event) {\r\n if (!this.viewModel.showNativeAdPreview()) {\r\n if (this.viewModel.DevicePreference.isMobile()) {\r\n this.previewContainer.selectedPanel('mobile');\r\n } else {\r\n this.previewContainer.selectedPanel('top');\r\n }\r\n }\r\n\r\n this.upgradedUrlView.devicePreferenceChanged(event);\r\n }\r\n\r\n validate() {\r\n const upgradedUrlValid = this.upgradedUrlView.validate();\r\n\r\n return this.viewModel.validate() && upgradedUrlValid;\r\n }\r\n\r\n toObject() {\r\n const model = this.viewModel.toObject();\r\n\r\n return _.extend(_.omit(model, this.viewModel.upgradedUrlFields), this.upgradedUrlView.toObject());\r\n }\r\n\r\n handleApiErrors(errors) {\r\n _.each(errors, (error) => {\r\n if (_.result(error, 'property') === 'DestinationUrl') {\r\n error.property = 'FinalUrls';\r\n }\r\n });\r\n this.viewModel.errors.add(errors);\r\n\r\n if (!_.isEmpty(errors)) {\r\n this.upgradedUrlView.handleApiErrors();\r\n }\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n this.upgradedUrlView.clearApiErrors();\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { AppInstallAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport * as schemaMapper from '@bingads-webui-campaign-legacy/crud-ad/schemaMapper';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst appPlatformKeys = {\r\n 'Android': i18n.get('AppInstall_Platform_Android'),\r\n 'iOS': i18n.get('AppInstall_Platform_iOS'),\r\n 'Windows Phone': i18n.get('AppInstall_Platform_WinPhone'),\r\n 'Windows': i18n.get('AppInstall_Platform_Windows'),\r\n};\r\n\r\nconst previewTabItems = {\r\n Mobile: 'MobileView',\r\n Tablet: 'TabletView',\r\n};\r\n\r\nexport default class {\r\n constructor({\r\n model = null,\r\n appLookupDisabled = false,\r\n developerName = '',\r\n defaultLandingPageUrl = '',\r\n activityLogger,\r\n } = {}) {\r\n this.tabItems = previewTabItems;\r\n this.upgradedUrlFields = _.compact(['FinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix']);\r\n this.schemaFields = schemaMapper.AppInstall(); // eslint-disable-line\r\n this.activityLogger = activityLogger;\r\n\r\n const customValidations = {\r\n AppStoreId: {\r\n isValid: (value) => {\r\n if (ko.unwrap(this.AppPlatform) === 'iOS' && value) {\r\n return (/^\\d+$/i).test(value);\r\n }\r\n\r\n return true;\r\n },\r\n message: i18n.get('AppInstall_Validation_Digit_Only'),\r\n },\r\n };\r\n\r\n this.fields = _.difference(this.schemaFields, ['DestinationUrl']);\r\n\r\n koSchema.properties(this, AppInstallAd, this.fields, _.defaults(model || {}, { DestinationUrl: defaultLandingPageUrl }), customValidations);\r\n\r\n const appPlatformsEnum = AppInstallAd.properties.AppPlatform.enum;\r\n\r\n this.appPlatforms = _.map(appPlatformsEnum, (key) => {\r\n return {\r\n Name: appPlatformKeys[key],\r\n Value: key,\r\n };\r\n });\r\n\r\n this.editMode = ko.observable(!_.isEmpty(model));\r\n this.appLookupDisabled = ko.observable(appLookupDisabled);\r\n this.developerName = ko.observable(developerName);\r\n this.appSelected = ko.observable(this.editMode());\r\n this.previewType = ko.observable(this.tabItems.Mobile);\r\n\r\n this.manualApp = ko.computed(() => {\r\n return this.AppStoreId() && !(this.AltText() || this.MediaUrl()); // eslint-disable-line\r\n });\r\n\r\n this.appIdPlaceholderText = ko.computed(() => {\r\n return this.manualApp() ? this.AppStoreId() : i18n.get('AppLookup_SearchBoxPlaceHolderTerm'); // eslint-disable-line\r\n });\r\n\r\n this.appIdName = ko.computed(() => {\r\n if(this.AppPlatform() === 'Android') { // eslint-disable-line\r\n return i18n.get('AppInstall_Package_Name');\r\n }\r\n\r\n return i18n.get('AppInstall_App_Id');\r\n });\r\n\r\n this.appStoreIdPlaceholderText = ko.computed(() => {\r\n if(this.AppPlatform() === 'Android') { // eslint-disable-line\r\n return i18n.get('AppInstallAd_Placeholder_PackageName_Android');\r\n } else if (this.AppPlatform() === 'iOS') { // eslint-disable-line\r\n return i18n.get('AppInstallAd_Placeholder_PackageName_iOS');\r\n }\r\n\r\n return i18n.get('AppInstallAd_Placeholder_PackageName_Windows');\r\n });\r\n\r\n this.adTitlePreview = ko.computed(() => {\r\n return !_.isEmpty(this.Title()) ? this.Title() : i18n.get('AppInstall_Title'); // eslint-disable-line\r\n });\r\n\r\n this.appStorePreview = ko.computed(() => {\r\n var appStoreName = this.AppPlatform() && this.AppStoreId() ? i18n.get('AppInstall_AppStore_' + this.AppPlatform().replace(' ', '_')) : ''; // eslint-disable-line\r\n return appStoreName ? i18n.get('AppInstall_Preview_AppStore_New', { name: appStoreName }) : i18n.get('Ad_Preview_Default');\r\n });\r\n\r\n this.adTextPreview = ko.computed(() => {\r\n return !_.isEmpty(this.Text())? this.Text() : i18n.get('AppInstall_Text'); // eslint-disable-line\r\n });\r\n\r\n this.previewUrl = ko.computed(() => {\r\n return _.first(this.FinalUrls()); // eslint-disable-line\r\n });\r\n\r\n _.each(this.fields, (field) => {\r\n // log once per field.\r\n const logChange = _.once(() => {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'app install ad editor');\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n });\r\n });\r\n }\r\n\r\n previewTabSelected(type) {\r\n return this.previewType() === type ? 'ui-tabs-selected' : 'preview-tabs-unselected';\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/appInstallAd';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/appInstallAd.pug';\r\nimport popoverTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/popoverTemplate.pug';\r\nimport AppLookupView from '@bingads-webui-campaign-legacy/adextension-shared/view/appLookup';\r\nimport { isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport popoverExtender from '@bingads-webui-component-legacy/extension/bootstrap/popover';\r\nimport UpgradedUrl from '@bingads-webui-component-legacy/upgraded-url/view/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { focusLockInstanceDecorator } from '@bingads-webui/focus-lock-decorator';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst placeholders = {\r\n Text: i18n.get('Ad_Placeholder_Text'),\r\n Title: i18n.get('Ad_Placeholder_Title'),\r\n FinalUrls: i18n.get('Ad_Placeholder_FinalUrls'),\r\n TrackingUrlTemplate: i18n.get('Ad_Placeholder_TrackingUrlTemplate'),\r\n};\r\n\r\nexport default class AppInstallAdEditor extends Backbone.View {\r\n initialize({\r\n model = null,\r\n appLookupDisabled = false,\r\n developerName = '',\r\n defaultLandingPageUrl = '',\r\n isForVNext = false,\r\n activityLogger,\r\n } = {}) {\r\n this.isForVNext = isForVNext;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n this.activityLogger = activityLogger;\r\n\r\n this.viewModel = new ViewModel({\r\n model,\r\n appLookupDisabled,\r\n developerName,\r\n defaultLandingPageUrl,\r\n activityLogger,\r\n });\r\n\r\n this.appeal = false;\r\n this.applookupRendered = false;\r\n this.applookupView = null;\r\n this.focusLockAppLookupPopupEditor = null;\r\n this.applookupLoggingInformation = '';\r\n this.on('created', this.handleCreated);\r\n this.on('cancel', this.handleCancel);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click a.preview-tab': 'switchPreviewTab',\r\n 'click .changeapp': 'changeApp',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n i18n,\r\n placeholders,\r\n tabItems: this.viewModel.tabItems,\r\n isForVNext: this.isForVNext,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n const isFinal = true; //!!this.upgradedUrl,\r\n const url = isFinal ? _.first(_.result(this.model, 'FinalUrls')) : _.result(this.model, 'DestinationUrl');\r\n const customParameters = _.result(this.model, 'UrlCustomParameters');\r\n\r\n this.upgradedUrlView = new UpgradedUrl({\r\n url: url || this.defaultLandingPageUrl,\r\n isFinal,\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(customParameters) ? undefined : _.clone(customParameters), // eslint-disable-line\r\n urlOptionsEnabled: true,\r\n showUurlTestTool: true,\r\n isMobilePreferred: true,\r\n entityType: 'Ad',\r\n isHorizontal: true,\r\n editMode: true,\r\n placeholderEnabled: true,\r\n popupHelpKeyAdLandingPage: 'pop_BA_AppInstall_LandingPage',\r\n popupHelpKeyAdTrackTemplate: 'pop_BA_AppInstall_TrackingTemplate',\r\n popupHelpKeyAdParameters: 'pop_BA_AppInstall_CustomParam',\r\n ariaPrefix: 'appInstallAd',\r\n isForVNext: this.isForVNext,\r\n activityLogger: this.activityLogger,\r\n });\r\n\r\n this.upgradedUrlView.on('finalUrlChanged', this.urlInputChanged, this);\r\n this.$('.app-upgraded-url').append(this.upgradedUrlView.render().el);\r\n\r\n this.upgradedUrlView.on('testUurl', (fn, originalView) => {\r\n this.trigger('testUurl', fn, originalView);\r\n });\r\n\r\n //START - remove when down stream systems are ready for DURL\r\n const uurlControl = this.$('.final-url');\r\n\r\n uurlControl.find('.radio:last').hide();\r\n uurlControl.find('.radio:first label').text(i18n.get('AppInstall_FinalUrl'));\r\n uurlControl.find('.radio:first label').css('cursor', 'default');\r\n uurlControl.find('.radio:first').css('padding-left', '0px');\r\n uurlControl.closest('.form-group').css('margin-bottom', '0px');\r\n //END\r\n\r\n return this;\r\n }\r\n\r\n resetEditMode() {\r\n this.viewModel.editMode(false);\r\n }\r\n\r\n changeApp() {\r\n if (this.viewModel.editMode()) {\r\n return;\r\n }\r\n\r\n this.showPopover();\r\n }\r\n\r\n showPopover() {\r\n const $popoverContainer = this.$el.find('.dropdownContainer:not(.fixed)');\r\n let flag = false;\r\n let tempEl = null;\r\n\r\n $popoverContainer\r\n .popover({\r\n container: $popoverContainer,\r\n trigger: 'manual',\r\n placement: 'bottom',\r\n html: true,\r\n template: popoverTemplate({ appSelected: this.viewModel.appSelected }),\r\n content: () => {\r\n if (flag === false) {\r\n this.applookupView = new AppLookupView({\r\n appPlatform: this.viewModel.AppPlatform() // eslint-disable-line\r\n });\r\n this.applookupView.render();\r\n flag = true;\r\n this.applookupRendered = true;\r\n const FocusLockAppLookupPopupEditor = focusLockInstanceDecorator(this.applookupView, {\r\n onExit: () => this.removePopover(),\r\n focusFirstItemOnMount: true,\r\n }, {\r\n managed: true,\r\n });\r\n\r\n this.focusLockAppLookupPopupEditor = new FocusLockAppLookupPopupEditor();\r\n tempEl = this.focusLockAppLookupPopupEditor.render().el;\r\n }\r\n\r\n return tempEl;\r\n },\r\n });\r\n\r\n popoverExtender.decorate($popoverContainer,\r\n this.excludeCb,\r\n _.bind(this.clickCb, this),\r\n _.bind(this.hiddenCb, this, null));\r\n\r\n $popoverContainer.popover('show');\r\n this.applookupView.open();\r\n this.applookupView.on('AppSelected', (data) => {\r\n this.setSelectedApp(data);\r\n this.removePopover();\r\n });\r\n }\r\n\r\n removePopover() {\r\n if (this.applookupView) {\r\n const $popoverContainer = this.$el.find('.dropdownContainer:not(.fixed)');\r\n\r\n $popoverContainer.popover('destroy');\r\n this.applookupView.clearApp();\r\n this.applookupView.remove();\r\n this.focusLockAppLookupPopupEditor.remove();\r\n this.applookupView = null;\r\n this.focusLockAppLookupPopupEditor = null;\r\n }\r\n }\r\n\r\n excludeCb($container, e) {\r\n const $target = $(e.target);\r\n\r\n const clikedInsideControl = $target.hasClass('dropDownSelect') ||\r\n $target.parents().hasClass('dropDownSelect') ||\r\n $.contains($container.children('.popover')[0], e.target) ||\r\n $container.children('.popover').find(e.target).length > 0 ||\r\n $target.hasClass('applookup') ||\r\n $target.parents().hasClass('applookup');\r\n\r\n const offset = 1;\r\n const newTop = $('.appinfo-table').height() + offset;\r\n\r\n $('.applookup-selected-popover .popover').css('top', `${newTop}px`);\r\n\r\n return Boolean(clikedInsideControl);\r\n }\r\n\r\n clickCb() {\r\n this.removePopover();\r\n }\r\n\r\n hiddenCb() {\r\n _.noop();\r\n }\r\n\r\n setSelectedApp(data) {\r\n // TODO: [zhbliu] give koSchema ability to bulk update model\r\n this.viewModel.AppPlatform(data.AppPlatform); // eslint-disable-line\r\n this.viewModel.AppStoreId(data.AppStoreId); // eslint-disable-line\r\n this.viewModel.AltText(data.AppTitle); // eslint-disable-line\r\n this.viewModel.MediaUrl(data.IconUrl); // eslint-disable-line\r\n this.viewModel.DeviceType(data.DeviceType); // eslint-disable-line\r\n\r\n this.viewModel.developerName(data.DeveloperName);\r\n this.viewModel.appSelected(true);\r\n\r\n this.upgradedUrlView.urlEditor.ko_model.fullUrl(data.AppUrl);\r\n\r\n this.applookupLoggingInformation = data.ApplookupLoggingInformation;\r\n }\r\n\r\n switchPreviewTab(target) {\r\n const previewType = target.currentTarget.dataset.target;\r\n\r\n this.viewModel.previewType(previewType);\r\n }\r\n\r\n toObject() {\r\n const model = this.viewModel.toObject();\r\n\r\n return _.extend(_.omit(model, this.viewModel.upgradedUrlFields), this.upgradedUrlView.toObject());\r\n }\r\n\r\n urlInputChanged() {\r\n const url = this.upgradedUrlView.urlEditor.ko_model.fullUrl();\r\n\r\n this.viewModel.FinalUrls(!_.isEmpty(url) ? [url] : []); // eslint-disable-line\r\n }\r\n\r\n validateViewModel() {\r\n const isValid = this.viewModel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.viewModel.fields, (field) => {\r\n if (!this.viewModel[field].isValid()) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field invalid: ${field}`, 'app install ad editor');\r\n }\r\n }\r\n });\r\n }\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n const isValid = _.reduce([\r\n this.upgradedUrlView.isValid(),\r\n this.validateViewModel(),\r\n ], (prev, next) => {\r\n return prev && next;\r\n }, true);\r\n\r\n const errorMessages = [];\r\n\r\n if (!this.upgradedUrlView.getValues().finalUrl.url) {\r\n errorMessages.push(i18n.get('Ad_AppInstall_FinalUrl_Required_Validation'));\r\n }\r\n\r\n this.upgradedUrlView.ko_model.landingPageUrlErrorMessages(errorMessages);\r\n\r\n return isValid;\r\n }\r\n\r\n handleApiErrors(errors) {\r\n this.viewModel.errors.add(errors);\r\n\r\n if (!_.isEmpty(errors)) {\r\n const errorObject = _.object(this.viewModel.upgradedUrlFields, _.map(this.viewModel.upgradedUrlFields, (key) => {\r\n return this.viewModel[key].errors();\r\n }));\r\n\r\n this.upgradedUrlView.handleApiErrors(errorObject);\r\n }\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n this.upgradedUrlView.clearApiErrors();\r\n }\r\n\r\n handleCreated() {\r\n this.logAppLookupInformation('AppInstallAd/Save');\r\n }\r\n\r\n handleCancel() {\r\n this.logAppLookupInformation('AppInstallAd/Cancel');\r\n }\r\n\r\n logAppLookupInformation(actionName) {\r\n if (actionName && this.applookupLoggingInformation) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, actionName, this.applookupLoggingInformation);\r\n }\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { DynamicSearchAd, DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport dynamicTextExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicTextExtension';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport getDomain from '@bingads-webui-campaign-legacy/crud-ad/service/getDomain';\r\nimport maxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/maxLengthExtension';\r\nimport parsedTextMaxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n model = null,\r\n useUpgradedUrl = false,\r\n isTraditionalChinese = false,\r\n scope = null,\r\n activityLogger,\r\n } = {}) {\r\n this.upgradedUrlFields = _.compact(['TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix']);\r\n this.activityLogger = activityLogger;\r\n this.fields = [\r\n 'Text',\r\n 'TextPart2',\r\n 'Path1',\r\n 'Path2',\r\n ...useUpgradedUrl ? this.upgradedUrlFields : [],\r\n ];\r\n this.scope = scope;\r\n\r\n const customValidation = {\r\n Path2: {\r\n isValid: (value) => {\r\n return _.isEmpty(value) || !_.isEmpty(_.result(this, 'Path1'));\r\n },\r\n message: i18n.get('ExpandedTextAd_Path1RequiredWhenUsingPath2'),\r\n },\r\n };\r\n\r\n koSchema.properties(this, DynamicSearchAd, this.fields, model, customValidation);\r\n\r\n this.domain = ko.computed(() => {\r\n let domain = _.result(model, 'DisplayUrl') || scope().campaignDomain;\r\n\r\n return getDomain(domain || '');\r\n });\r\n\r\n this.protocol = ko.computed(() => {\r\n const uri = new URI(_.result(model, 'DisplayUrl') || '');\r\n\r\n return uri.protocol() || 'https';\r\n });\r\n\r\n this.isDynamicDescriptionEnabled = ko.computed(() => {\r\n return _.result(permissions.dynamic, 'DSADynamicDescriptionPhase1', false) && scope().isDynamicDescriptionEnabled;\r\n });\r\n\r\n this.isAllowDisclaimer = ko.computed(() => {\r\n return scope().isDynamicDescriptionEnabled;\r\n });\r\n this.disclaimerInfo = ko.observable({});\r\n this.scope.subscribe((data) => {\r\n if (data.campaignId ) {\r\n this.computeDisclaimerAsync(data.campaignId);\r\n }\r\n });\r\n\r\n this.extensionsSharedRepos = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n afterChangeComitted: _.noop,\r\n });\r\n\r\n let disclaimerCampaignId = 0;\r\n\r\n if (Number(scope().campaignId) > 0) {\r\n disclaimerCampaignId = Number(scope().campaignId);\r\n } else if (pageContext.CurrentCampaign && Number(pageContext.CurrentCampaign.Id) > 0) {\r\n disclaimerCampaignId = Number(pageContext.CurrentCampaign.Id);\r\n }\r\n\r\n if (disclaimerCampaignId > 0 ) {\r\n this.computeDisclaimerAsync(disclaimerCampaignId);\r\n }\r\n\r\n this.showDisclaimer = ko.computed(() => {\r\n if (this.disclaimerInfo().Id) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n this.adDisclaimerHint = ko.computed(() => {\r\n if (this.disclaimerInfo().Id ) {\r\n if (this.disclaimerInfo().DisclaimerLayout === 'AdditionalLine') {\r\n return i18n.getString('Disclaimer_Ad_AdditionalLine_Hint');\r\n } else if (this.disclaimerInfo().DisclaimerLayout === 'Popup') {\r\n return i18n.getString('Disclaimer_Ad_Popup_Hint');\r\n }\r\n }\r\n\r\n return '';\r\n });\r\n\r\n this.Path1.subscribe(() => {\r\n this.Path2.validate();\r\n });\r\n\r\n const lengthExtensionProperties = ['Text', 'TextPart2'];\r\n\r\n dynamicTextExtension.extend(this, lengthExtensionProperties);\r\n\r\n maxLengthExtension(DynamicSearchAd, this, isTraditionalChinese, lengthExtensionProperties);\r\n\r\n if (permissions.IsIffCountdownForDSAEnabled) {\r\n const fieldsThatUseAdCustomizers = [\r\n 'Text',\r\n 'TextPart2',\r\n 'Path1',\r\n 'Path2',\r\n ];\r\n\r\n parsedTextMaxLengthExtension.extend(this, fieldsThatUseAdCustomizers, 'DynamicSearchAd');\r\n }\r\n\r\n _.each(this.fields, (field) => {\r\n // log once per field.\r\n const logChange = _.once(() => {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'dynamic search ad editor');\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n });\r\n });\r\n }\r\n\r\n computeDisclaimerAsync(disclaimerCampaignId) {\r\n let params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n jsDataCampaign.Campaign.find(disclaimerCampaignId, params)\r\n .then((data) => {\r\n const hasDisclaimer = _.result(_.find(data.CampaignSettings, (setting) => {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n }),\r\n 'DisclaimerAdsEnabled');\r\n\r\n if (hasDisclaimer) {\r\n const scope = Object.create({\r\n campaignId: disclaimerCampaignId,\r\n });\r\n\r\n this.extensionsSharedRepos.association.findAll({\r\n where: scope,\r\n }).then((disclaimerdata) => {\r\n\r\n if (disclaimerdata && disclaimerdata.length > 0) {\r\n this.disclaimerInfo(disclaimerdata[0]);\r\n }\r\n });\r\n }\r\n });\r\n // TODO : catch and finally\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { evaluateAdCustomizers as newEvaluateAdCustomizers } from '@bingads-webui-campaign/ad-customizers';\r\nimport { evaluateAdCustomizers as legacyEvaluateAdCustomizers } from '@bingads-webui-campaign-legacy/crud-ad/service/adCustomizersUtils';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { i18nDummy } from '@bingads-webui-campaign-legacy/crud-ad/service/utils/i18n-dummy-vnext';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst i18nAdCustomizers = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nconst {\r\n IsNewAdsAdCustomizerEditorEnabled,\r\n IsIfFunctionMilestone1Enabled,\r\n} = permissions;\r\n\r\nconst withNewAdCustomizerEditor = IsNewAdsAdCustomizerEditorEnabled ||\r\n IsIfFunctionMilestone1Enabled;\r\n\r\nconst evaluateAdCustomizers = (text) => {\r\n if (withNewAdCustomizerEditor) {\r\n return newEvaluateAdCustomizers({\r\n text,\r\n deps: {\r\n config,\r\n i18n: i18nAdCustomizers,\r\n countdownI18nDummy: i18nDummy,\r\n instrumentation,\r\n jsDataCampaign,\r\n edmCampaign,\r\n },\r\n adType: 'DynamicSearchAd',\r\n });\r\n }\r\n return legacyEvaluateAdCustomizers(text);\r\n};\r\n\r\nconst combineText = (textPart1, textPart2) => {\r\n if (!textPart1 && !textPart2) {\r\n return '';\r\n } else if (_.isEmpty(textPart2)) {\r\n return textPart1;\r\n } else if (_.isEmpty(textPart1)) {\r\n return textPart2;\r\n }\r\n\r\n // If text1 does not end with any of separators [. ? !], use a period and space between text1 and text2 while stitching.\r\n // If text1 ends with one of those separators, use only a space.\r\n if ('.?!'.indexOf(textPart1.slice(-1)) > -1) {\r\n return `${textPart1} ${textPart2}`;\r\n } else {\r\n return `${textPart1}. ${textPart2}`;\r\n }\r\n};\r\n\r\nexport default class {\r\n constructor(adViewModel, placeholders) {\r\n // this.Text = ko.computed(() => {\r\n // return adViewModel.Text() || placeholders.Text;\r\n // });\r\n const self = this;\r\n const fields = ['Text', 'TextPart2'];\r\n\r\n _.each(fields, (fieldName) => {\r\n self.createField(`Parsed${fieldName}`, adViewModel[fieldName]);\r\n });\r\n\r\n this.Text = ko.computed(() => {\r\n const textPart1 = self.ParsedText();\r\n\r\n // All space is not allowed\r\n const textPart2 = self.ParsedTextPart2() !== null && self.ParsedTextPart2().trim() === '' ? '' : self.ParsedTextPart2();\r\n\r\n if (_.isEmpty(textPart1) && _.isEmpty(textPart2)) {\r\n return placeholders.Text;\r\n }\r\n return combineText(textPart1, textPart2);\r\n });\r\n\r\n this.Title = ko.observable(`{${i18n.get('Ad_DSA_Title')}}`);\r\n\r\n let combinedUrl = ko.computed(() => {\r\n let result = adViewModel.domain();\r\n\r\n let addPath = (path) => {\r\n if (!_.isEmpty(path)) {\r\n result += `/${path}`;\r\n }\r\n };\r\n\r\n addPath(adViewModel.Path1());\r\n addPath(adViewModel.Path2());\r\n\r\n return result;\r\n });\r\n\r\n this.DisplayUrl = combinedUrl;\r\n this.DestinationUrl = ko.computed(() => {\r\n let protocol = adViewModel.protocol();\r\n let uri = new URI(combinedUrl());\r\n\r\n return uri.protocol(protocol).toString();\r\n });\r\n this.DisclaimerLineText = ko.computed(() => {\r\n return adViewModel.disclaimerInfo().LineText || '';\r\n });\r\n\r\n this.ShowDisclaimer = ko.computed(() => {\r\n return true;\r\n });\r\n\r\n this.IsDisclaimerPopupHintVisible = ko.observable(false);\r\n\r\n this.DisclaimerFinalUrl = ko.computed(() => {\r\n if (self.ShowDisclaimer() && _.size(adViewModel.disclaimerInfo().FinalUrls)) {\r\n return adViewModel.disclaimerInfo().FinalUrls[0];\r\n }\r\n\r\n return '';\r\n });\r\n\r\n this.IsAdditionalLineLayout = ko.computed(() => {\r\n if (self.ShowDisclaimer() && adViewModel.disclaimerInfo().DisclaimerLayout === 'AdditionalLine') {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n this.IsPopupLayout = ko.computed(() => {\r\n if (self.ShowDisclaimer() && adViewModel.disclaimerInfo().DisclaimerLayout === 'Popup') {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n this.DisclaimerPopHint = ko.computed(() => {\r\n if (self.ShowDisclaimer() && adViewModel.disclaimerInfo().DisclaimerLayout === 'Popup') {\r\n return adViewModel.disclaimerInfo().Title;\r\n }\r\n\r\n return '';\r\n });\r\n\r\n this.DisclaimerPopupText = ko.computed(() => {\r\n if (self.ShowDisclaimer() && adViewModel.disclaimerInfo().DisclaimerLayout === 'Popup') {\r\n return adViewModel.disclaimerInfo().PopupText;\r\n }\r\n\r\n return '';\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Adds a property to this that holds parsed value of passed dependency\r\n * @param {string} fieldName - new property's name\r\n * @param {Object} dependency - observable that contains the raw value to be parsed for preview\r\n * @returns {undefined}\r\n */\r\n createField(fieldName, dependency) {\r\n const self = this;\r\n\r\n this[fieldName] = ko.observable('');\r\n evaluateAdCustomizers(dependency()).then((value) => {\r\n self[fieldName](value);\r\n });\r\n\r\n // We cannot directly use computedObservables because evaluateAdCustomizers is async\r\n dependency.subscribe(() => {\r\n evaluateAdCustomizers(dependency()).then((value) => {\r\n self[fieldName](value);\r\n });\r\n });\r\n }\r\n}\r\n","import PreviewContainer from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/container';\r\nimport topTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/top.pug';\r\nimport sidebarTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/sidebar.pug';\r\nimport mobileTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/mobile.pug';\r\nimport PreviewViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/dynamicSearchAd';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default function buildPreview(adViewModel, placeholders) {\r\n let viewModel = new PreviewViewModel(adViewModel, placeholders);\r\n let adType = 'DynamicSearchAd';\r\n\r\n return new PreviewContainer({\r\n tabs: [{\r\n top: {\r\n template: topTemplate,\r\n viewModel,\r\n title: i18n.get('Ad_TopView'),\r\n adType,\r\n },\r\n sidebar: {\r\n template: sidebarTemplate,\r\n viewModel,\r\n title: i18n.get('Ad_SideView'),\r\n adType,\r\n },\r\n mobile: {\r\n template: mobileTemplate,\r\n viewModel,\r\n title: i18n.get('Ad_MobileView'),\r\n adType,\r\n },\r\n }],\r\n });\r\n}\r\n","import Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport adCustomizersPickerTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/adCustomizersPicker.pug';\r\n\r\nclass AdCustomizersPicker extends Backbone.View {\r\n initialize({\r\n target,\r\n options}) {\r\n\r\n this.target = target;\r\n this.items = ko.observableArray();\r\n this.populate(options);\r\n\r\n return this;\r\n }\r\n\r\n render() {\r\n let $target = $(this.target);\r\n let position = $target.offset();\r\n\r\n position.top = position.top + $target.outerHeight();\r\n\r\n this.$el.html(adCustomizersPickerTemplate({\r\n items: this.items,\r\n position,\r\n }));\r\n\r\n // Clicking on elements having this class won't hide currently visible helper\r\n this.$el.addClass('ac-helper-area open');\r\n\r\n ko.applyBindings({ items: this.items }, this.el);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Populates the picker\r\n * @param {object} options - contains item models and text replacement properties\r\n * @returns {undefined}\r\n */\r\n populate(options) {\r\n let target = this.target;\r\n\r\n // Clicking on a picker item will replace a portion of the text in the attached text field\r\n _.each(options.items, (item) => {\r\n item.action = () => {\r\n let beginning = target.value.substring(0, options.startIndex);\r\n let end = target.value.substring(options.endIndex);\r\n\r\n options.updateAction(beginning + item.insert + end);\r\n let cursorPosition = beginning.length + item.cursorPosition;\r\n\r\n target.setSelectionRange(cursorPosition, cursorPosition);\r\n target.isSelectedByUser = true;\r\n // focus itself will trigger the selection event\r\n target.focus();\r\n //target.click();\r\n\r\n hide(); // eslint-disable-line no-use-before-define\r\n };\r\n });\r\n\r\n this.items(options.items);\r\n this.activateItemAt(undefined);\r\n }\r\n\r\n /**\r\n * Highlights item at given index\r\n * @param {integer} index - item index\r\n * @returns {undefined}\r\n */\r\n activateItemAt(index) {\r\n if (this.activeItemIndex !== undefined) {\r\n this.$el.find(`li:eq(${this.activeItemIndex})`).removeClass('active');\r\n }\r\n\r\n this.activeItemIndex = index;\r\n\r\n if (this.activeItemIndex !== undefined) {\r\n this.$el.find(`li:eq(${this.activeItemIndex})`).addClass('active');\r\n }\r\n }\r\n\r\n /**\r\n * Highlights the item above currently highlighted one. If none highlighted or first item is highlighted, highlights the last item.\r\n * @returns {undefined}\r\n */\r\n activatePrevItem() {\r\n if (this.activeItemIndex === undefined) {\r\n this.activateItemAt(this.items().length - 1);\r\n } else {\r\n this.activateItemAt((this.items().length + this.activeItemIndex - 1) % this.items().length);\r\n }\r\n }\r\n\r\n /**\r\n * Highlights the item below currently highlighted one. If none highlighted or last item is highlighted, highlights the first item.\r\n * @returns {undefined}\r\n */\r\n activateNextItem() {\r\n if (this.activeItemIndex === undefined) {\r\n this.activateItemAt(0);\r\n } else {\r\n this.activateItemAt((this.activeItemIndex + 1) % this.items().length);\r\n }\r\n }\r\n\r\n /**\r\n * Executes action for currently selected item.\r\n * @returns {undefined}\r\n */\r\n pickActiveItem() {\r\n if (this.activeItemIndex !== undefined) {\r\n this.items()[this.activeItemIndex].action();\r\n }\r\n }\r\n}\r\n\r\n/*\r\n * Picker instance (used by hide() and show() to update, register/deregister events and change visibility)\r\n */\r\nlet picker = null;\r\n\r\n/**\r\n * Hides picker when user clicks outside of ad customizer helper areas\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction clickedAway(event) {\r\n let target = $(event.target);\r\n\r\n if (target.closest('.ac-helper-area').length === 0) {\r\n hide(); // eslint-disable-line no-use-before-define\r\n }\r\n}\r\n\r\n/**\r\n * Handles key down events.\r\n * Either prevents default event from happening to keep current cursor position\r\n * or hides the picker.\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction keydown(event) {\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n case 'ArrowUp':\r\n case 'Enter':\r\n event.preventDefault();\r\n break;\r\n case 'Escape':\r\n hide(); // eslint-disable-line no-use-before-define\r\n break;\r\n default:\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Handles key down events.\r\n * Either updates picker selection or executes selected item's action.\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction keyup(event) {\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n event.preventDefault();\r\n event.data.picker.activateNextItem();\r\n break;\r\n case 'ArrowUp':\r\n event.preventDefault();\r\n event.data.picker.activatePrevItem();\r\n break;\r\n case 'Enter':\r\n event.preventDefault();\r\n event.data.picker.pickActiveItem();\r\n break;\r\n default:\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Hides picker and deregisters key and click events.\r\n * @returns {undefined}\r\n */\r\nexport function hide() {\r\n if (picker) {\r\n $(picker.target).off('keyup', keyup);\r\n $(picker.target).off('keydown', keydown);\r\n $(window).off('click', clickedAway);\r\n picker.remove();\r\n picker = null;\r\n }\r\n}\r\n\r\n/**\r\n * Shows picker and registers for events.\r\n * @param {object} target - element the picker will be attached to.\r\n * @param {object} options - picker item models and cursor position info\r\n * @param {string} key - name of the key that triggered this call\r\n * @returns {undefined}\r\n */\r\nexport function show(target, options, key) {\r\n // Update instead of re-render if target hasn't changed\r\n if (picker && picker.target === target) {\r\n // Ignore if keys are used to navigate picker items or select an item\r\n if (key === undefined || _.indexOf(['ArrowDown', 'ArrowUp', 'Enter'], key) === -1) {\r\n picker.populate(options);\r\n }\r\n return;\r\n }\r\n\r\n hide();\r\n\r\n picker = new AdCustomizersPicker({ target, options });\r\n $('body').append(picker.render().el);\r\n $(window).on('click', clickedAway);\r\n $(target).on('keydown', keydown);\r\n $(target).on('keyup', { picker }, keyup);\r\n}\r\n\r\n/**\r\n * Checks whether ad customizer picker is visible\r\n * @returns {bool} true if visible\r\n */\r\nexport function isVisible() {\r\n return picker !== null;\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/adCustomizersCountdownEditor.pug';\r\nimport editorTemplateWithAdCustomizer from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/editorTemplateWithAdCustomizer.pug';\r\nimport { getSupportedLanguages, getLanguageCode } from '@bingads-webui-campaign/ad-customizers';\r\nimport Backbone from 'backbone';\r\nimport SimpleForm from '@bingads-webui-component-legacy/form/view/simple-form';\r\nimport kendo from '@bingads-webui/kendo/kendo.datepicker';\r\nimport datePickerTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/adCustomizersCountdownDatePicker.pug';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\nconst i18nAdCustomizers = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\n/**\r\n * Date picker view that is specialized for countdown editor\r\n */\r\nclass DatePicker extends Backbone.View {\r\n initialize( {observable} ) {\r\n this.observable = observable;\r\n }\r\n\r\n render() {\r\n this.$el.html(datePickerTemplate());\r\n let parameters = {\r\n culture: config.get('culture') || 'en-US',\r\n format: 'yyyy/MM/dd',\r\n min: new Date(),\r\n animation: false,\r\n footer: false,\r\n value: this.observable(),\r\n };\r\n\r\n let elementDatePicker = this.$('#countdowndatepicker');\r\n\r\n elementDatePicker.kendoDatePicker(parameters);\r\n\r\n let datePicker = elementDatePicker.data('kendoDatePicker');\r\n\r\n elementDatePicker.click(() => {\r\n datePicker.open();\r\n });\r\n\r\n datePicker.bind('change', () => {\r\n let value = kendo.toString(datePicker.value(), parameters.format);\r\n\r\n this.observable(value);\r\n });\r\n\r\n elementDatePicker.addClass('form-control');\r\n\r\n return this;\r\n }\r\n}\r\n\r\n/**\r\n * Countdown editor form schema\r\n */\r\nconst schema = {\r\n name: 'Countdown',\r\n type: 'object',\r\n properties: {\r\n date: {\r\n type: 'string',\r\n pattern: '^[0-9]{4}/([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|[1-2][0-9]|3[0-1])$',\r\n },\r\n time: {\r\n type: 'string',\r\n pattern: '^(?:((?:[0-1][0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9]))|)$',\r\n },\r\n days: {\r\n type: 'integer',\r\n minimum: 1,\r\n maximum: 999,\r\n },\r\n isGlobal: {\r\n type: 'boolean',\r\n },\r\n language: {\r\n type: 'string',\r\n enum: getSupportedLanguages(i18nAdCustomizers, config),\r\n },\r\n },\r\n required: ['date', 'days', 'language'],\r\n};\r\n\r\n/**\r\n * Countdown editor form fields\r\n */\r\nconst fields = [\r\n {\r\n property: 'date',\r\n placeholder: 'yyyy/MM/dd',\r\n label: i18n.getString('CountdownEditor_CountdownEnds_Label'),\r\n control: DatePicker,\r\n validators: {\r\n pattern: {\r\n message: i18n.getString('CountdownEditor_CountdownEnds_PatternValidationMessage'),\r\n },\r\n required: {\r\n message: i18n.getString('CountdownEditor_CountdownEnds_RequiredValidationMessage'),\r\n },\r\n },\r\n },\r\n {\r\n property: 'time',\r\n placeholder: 'HH:mm:ss',\r\n label: i18n.getString('CountdownEditor_CountdownEndsTime_Label'),\r\n showLabel: false,\r\n validators: {\r\n pattern: {\r\n message: i18n.getString('CountdownEditor_CountdownEndsTime_PatternValidationMessage'),\r\n },\r\n },\r\n },\r\n {\r\n property: 'days',\r\n label: i18n.getString('CountdownEditor_CountdownStarts_Label'),\r\n validators: {\r\n type: {\r\n message: i18n.getString('CountdownEditor_CountdownStarts_TypeValidationMessage'),\r\n },\r\n range: {\r\n message: i18n.getString('CountdownEditor_CountdownStarts_RangeValidationMessage'),\r\n },\r\n required: {\r\n message: i18n.getString('CountdownEditor_CountdownStarts_RequiredValidationMessage'),\r\n },\r\n },\r\n },\r\n {\r\n property: 'isGlobal',\r\n control: 'radios',\r\n valueMessages: {\r\n true: `${i18n.getString('CountdownEditor_AccountTimeZone_Label')} ${timeZoneMapper.getTimeZoneText(config.get('AccountTimeZone'))}`,\r\n false: i18n.getString('CountdownEditor_AdViewersTimeZone_Label'),\r\n },\r\n label: i18n.getString('CountdownEditor_TimeZone_Label'),\r\n },\r\n {\r\n property: 'language',\r\n label: i18n.getString('CountdownEditor_Language_Label'),\r\n },\r\n];\r\n\r\n/**\r\n * Wraps template function to use localization and syntax info\r\n * @param {function} template - editor template function\r\n * @param {string} syntax - text for header of the editor where we display valid syntax\r\n * @returns {function} template function\r\n */\r\nfunction prepareTemplate(template, syntax) {\r\n return _.wrap(template, (func, params) => func(_.defaults(params, {i18n, syntax})));\r\n}\r\n\r\n/**\r\n * Creates a string that contains a countdown definition\r\n * @param {string} prefix - text to be concatenated in front of countdown definition (optional)\r\n * @param {string} type - countdown type\r\n * @param {string} date - countdown end date (optional, defaults to 'yyyy/MM/dd')\r\n * @param {string} time - countdown end time (optional, defaults to 'HH:mm:ss')\r\n * @param {string} language - countdown language\r\n * @param {string} days - duration of countdown in days\r\n * @param {string} suffix - text to be concatenated at the end of countdown definition (optional)\r\n * @returns {string} formatted string\r\n */\r\nfunction formatCountdown(prefix, type, date, time, language, days, suffix) {\r\n let ret = '{prefix}{={type}(\"{date} {time}\", \"{language}\", {days})}{suffix}';\r\n\r\n ret = ret.replace('{prefix}', prefix ? prefix : '');\r\n ret = ret.replace('{type}', type);\r\n ret = ret.replace('{date}', date ? date : 'yyyy/MM/dd');\r\n ret = ret.replace('{time}', time ? time : 'HH:mm:ss');\r\n ret = ret.replace('{language}', language);\r\n ret = ret.replace('{days}', days);\r\n ret = ret.replace('{suffix}', suffix ? suffix : '');\r\n\r\n return ret;\r\n}\r\n\r\n/**\r\n * Countdown editor view\r\n */\r\nclass CountdownEditor extends Backbone.View {\r\n initialize({\r\n target,\r\n options}) {\r\n\r\n this.target = target;\r\n\r\n const model = {\r\n date: options.date,\r\n time: options.time,\r\n days: options.days,\r\n isGlobal: options.type === 'global_countdown',\r\n language: options.language.displayName,\r\n };\r\n\r\n this.includeAdCustomizerFeed = options.includeAdCustomizerFeed;\r\n\r\n this.syntax = formatCountdown(\r\n `${i18n.getString('AdCustomizers_Editor_Syntax_Prefix_Label')} `,\r\n options.type,\r\n null,\r\n null,\r\n i18n.getString('CountdownEditor_Syntax_Language_Label'),\r\n i18n.getString('CountdownEditor_Syntax_DaysBefore_Label'),\r\n null);\r\n\r\n if (!this.includeAdCustomizerFeed) {\r\n this.form = new SimpleForm({\r\n schema,\r\n fields,\r\n model,\r\n template: prepareTemplate(editorTemplate, this.syntax),\r\n saveButtonText: i18n.getString('AdCustomizers_Editor_Set_Button'),\r\n });\r\n\r\n this.form.on('save', (newModel) => {\r\n let prefix = target.value.substring(0, options.startIndex);\r\n let suffix = target.value.substring(options.endIndex);\r\n\r\n let newValue = formatCountdown(\r\n prefix,\r\n newModel.isGlobal ? 'global_countdown' : 'countdown',\r\n newModel.date,\r\n newModel.time.length === 0 ? '00:00:00' : newModel.time,\r\n getLanguageCode(newModel.language, i18nAdCustomizers, config),\r\n newModel.days,\r\n suffix);\r\n\r\n let cursorPosition = newValue.length - suffix.length;\r\n\r\n options.updateAction(newValue);\r\n target.setSelectionRange(cursorPosition, cursorPosition);\r\n target.focus();\r\n\r\n hide(); // eslint-disable-line no-use-before-define\r\n });\r\n\r\n this.form.on('cancel', () => hide()); // eslint-disable-line no-use-before-define\r\n }\r\n this.$el.attr('role', 'dialog');\r\n\r\n return this;\r\n }\r\n\r\n render() {\r\n let $target = $(this.target);\r\n let position = $target.offset();\r\n\r\n position.top = position.top + $target.outerHeight();\r\n\r\n this.$el.css({\r\n position: 'absolute',\r\n visibility: 'visible',\r\n left: position.left,\r\n top: position.top,\r\n });\r\n\r\n if (this.includeAdCustomizerFeed) {\r\n this.$el.html(editorTemplateWithAdCustomizer({syntax: this.syntax, i18n}));\r\n } else {\r\n this.$el.append(this.form.render().el);\r\n }\r\n\r\n // Clicking on elements having 'ac-helper-area' class won't hide currently visible helper\r\n this.$el.addClass('ac-helper-area adCustomizersEditor');\r\n\r\n return this;\r\n }\r\n}\r\n\r\n/*\r\n * Editor instance (used by hide() and show() to update, register/deregister events and change visibility)\r\n */\r\nlet editor = null;\r\n\r\n/**\r\n * Hides countdown editor when user clicks outside of ad customizer helper areas and date picker areas\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction clickedAway(event) {\r\n let target = $(event.target);\r\n\r\n if (target.closest('.ac-helper-area').length === 0 &&\r\n target.closest('#countdowndatepicker_dateview').length === 0 &&\r\n target.closest('.k-calendar-container').length === 0 &&\r\n target.closest('.k-content').length === 0) {\r\n hide(); // eslint-disable-line no-use-before-define\r\n }\r\n}\r\n\r\n/**\r\n * Handles key down events.\r\n * Hides editor when user hits escape.\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction keydown(event) {\r\n switch (event.key) {\r\n case 'Escape':\r\n hide(); // eslint-disable-line no-use-before-define\r\n break;\r\n default:\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Hides countdown editor and deregisters clickaway event.\r\n * @returns {undefined}\r\n */\r\nexport function hide() {\r\n if (editor) {\r\n $(editor.target).off('keydown', keydown);\r\n $(window).off('click', clickedAway);\r\n editor.remove();\r\n editor = null;\r\n }\r\n}\r\n\r\n/**\r\n * Shows countdown editor and registers to global click events.\r\n * @param {object} target - element the editor will be attached to.\r\n * @param {object} options - editor model and cursor position info.\r\n * @returns {undefined}\r\n */\r\nexport function show(target, options) {\r\n hide();\r\n\r\n editor = new CountdownEditor({ target, options });\r\n $('body').append(editor.render().el);\r\n $(window).on('click', clickedAway);\r\n $(target).on('keydown', keydown);\r\n}\r\n\r\n/**\r\n * Checks whether countdown editor is visible\r\n * @returns {bool} true if visible\r\n */\r\nexport function isVisible() {\r\n return editor !== null;\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { withLastPromise } from '@bingads-webui-universal/primitive-utilities';\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { FeedAndAttributeSelectorView } from '@bingads-webui-campaign-react/feed-and-attribute-selector';\r\nimport { queryFeedsByName, cloneFeed, pickerCountdownInsert, keysForCountDown } from '../../service/utils/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\n// todo: merge the picker logic with feedsEditor here\r\n\r\nconst COUNTDOWN_ID = -1;\r\n\r\n/**\r\n * Feeds editor view\r\n */\r\nclass FeedsEditorView extends Backbone.View {\r\n initialize({\r\n target,\r\n options,\r\n remainingCountCallBack }) {\r\n\r\n this.target = target;\r\n this.showSyntax = true;\r\n this.remainingCountCallBack = remainingCountCallBack;\r\n this.fetchDataAndShow = withLastPromise({\r\n promiseFactory: queryFeedsByName,\r\n finish: (result) => {\r\n this.feeds = result;\r\n\r\n this.render();\r\n },\r\n });\r\n this.onSelectionUpdated(options);\r\n }\r\n\r\n onSelectionUpdated(options, remainingCountCallBack) {\r\n if (remainingCountCallBack) {\r\n this.remainingCountCallBack = remainingCountCallBack;\r\n }\r\n\r\n this.options = options || {};\r\n const { feed, attribute, feeds, specificFeedName, defaultText, isItemSelected, specificAttributeName } = options;\r\n\r\n if (this.specificFeedName === specificFeedName &&\r\n this.specificAttributeName === specificAttributeName &&\r\n this.selectedFeedName === feed &&\r\n this.selectedAttributeName === attribute &&\r\n this.defaultText === defaultText ) {\r\n return;\r\n }\r\n\r\n // whether user has specified feed name\r\n this.specificFeedName = specificFeedName;\r\n this.specificAttributeName = specificAttributeName;\r\n\r\n this.defaultText = defaultText;\r\n this.isItemSelected = isItemSelected;\r\n this.selectedFeedName = feed;\r\n this.selectedAttributeName = attribute;\r\n\r\n this.feeds = feeds || [];\r\n\r\n if (_.isEmpty(this.feeds)) {\r\n this.fetchDataAndShowToken = this.fetchDataAndShow(feed, this.el);\r\n } else {\r\n this.render();\r\n }\r\n }\r\n\r\n formatAdCustomizerFeed(prefix, suffix) {\r\n const escapeFeedName = (value) => {\r\n return value ? value.replace(/\\./g, '\\\\.') : '';\r\n };\r\n const escapeAttrbuteName = (value) => {\r\n return value ? value.replace(/:/g, '\\\\:') : '';\r\n };\r\n\r\n const selectedAttributeNamePart = this.selectedAttributeName ? `.${escapeAttrbuteName(this.selectedAttributeName)}` : '';\r\n const defaultTextSelectedPart = this.defaultText && this.defaultText.length > 0 ? `:${this.defaultText.trim()}` : '';\r\n\r\n return `${prefix}{=${escapeFeedName(this.selectedFeedName)}${selectedAttributeNamePart}${defaultTextSelectedPart}}${suffix}`;\r\n }\r\n\r\n getSelectedFeed() {\r\n let feed = null;\r\n\r\n if (this.specificFeedName) {\r\n const feedName = this.selectedFeedName.toLowerCase();\r\n\r\n if (!_.isEmpty(this.feeds) && !_.isEmpty(feedName)) {\r\n // filter feeds by name\r\n const feeds = _.filter(this.feeds, (fe) => {\r\n return fe.Name.toLowerCase() === feedName;\r\n });\r\n\r\n if (!_.isEmpty(feeds)) {\r\n // generate a new feed, without interfering original data\r\n feed = cloneFeed(feeds[0]);\r\n }\r\n // update the feed attribute names based on user input\r\n // and make selectedAttribute name null when nothing matched\r\n if (feed && this.selectedAttributeName) {\r\n const attributeName = this.selectedAttributeName.toLowerCase();\r\n\r\n feed.AttributeNames = _.filter(feed.AttributeNames, (attribute) => {\r\n return attribute.toLowerCase().indexOf(attributeName) === 0;\r\n });\r\n\r\n if (!this.specificAttributeName &&\r\n ((_.isEmpty(feed.AttributeNames) ||\r\n feed.AttributeNames.length > 1 ||\r\n feed.AttributeNames[0].toLowerCase() !== attributeName))\r\n ) {\r\n this.selectedAttributeName = '';\r\n }\r\n }\r\n }\r\n }\r\n return feed;\r\n }\r\n\r\n updateTargetOnUserSelectionUpdate(userSelection, event) {\r\n let prefix = this.target.value.substring(0, this.options.startIndex);\r\n let endPart = this.target.value.substring(this.options.startIndex);\r\n let endPos = endPart.indexOf('}');\r\n let suffix = endPos > 0 ? endPart.substring(endPos + 1) : '';\r\n let newValue = '';\r\n let cursorPosition = 2;\r\n\r\n // when user select countdown\r\n if (userSelection.Id === COUNTDOWN_ID) {\r\n newValue = `${prefix}${pickerCountdownInsert}${suffix}`;\r\n cursorPosition = this.options.startIndex + 2;\r\n } else {\r\n const { selectedFeedName, selectedAttributeName, defaultText } = userSelection;\r\n\r\n this.selectedFeedName = selectedFeedName;\r\n this.selectedAttributeName = selectedAttributeName;\r\n this.defaultText = defaultText;\r\n\r\n newValue = this.formatAdCustomizerFeed(prefix, suffix);\r\n cursorPosition = newValue.length - suffix.length;\r\n }\r\n\r\n this.options.updateAction(newValue);\r\n this.target.setSelectionRange(cursorPosition, cursorPosition);\r\n\r\n // when user select countdown, update target value, trigger ('click')\r\n //\r\n if (userSelection.Id === COUNTDOWN_ID) {\r\n // eslint-disable-next-line no-use-before-define\r\n hide();\r\n this.target.focus();\r\n $(this.target).trigger('click');\r\n\r\n // so that other events for the feedsEditor will be stopped (such as clickAway)\r\n event.stopPropagation();\r\n return false;\r\n }\r\n\r\n this.specificFeedName = true;\r\n\r\n // when there is no syntax perviously, we need to redraw the editor\r\n if (!this.showSyntax) {\r\n this.showSyntax = true;\r\n this.render();\r\n return true;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n onFeedAttributeSelected(userSelection, event) {\r\n if (this.updateTargetOnUserSelectionUpdate(userSelection, event)) {\r\n this.target.focus();\r\n hide(); // eslint-disable-line no-use-before-define\r\n }\r\n }\r\n\r\n getFeedsToRender() {\r\n const shouldIncludeCountDownRule = !this.isItemSelected &&\r\n (!this.selectedFeedName || _.any(keysForCountDown, (ck) => {\r\n // after {=\r\n return ck.substring(2).indexOf(this.selectedFeedName.toLowerCase()) === 0;\r\n }));\r\n\r\n if (shouldIncludeCountDownRule) {\r\n this.feeds.unshift({\r\n Name: i18n.getString('Picker_Countdown_Label'),\r\n Description: i18n.getString('Picker_Countdown_Description'),\r\n Id: COUNTDOWN_ID,\r\n });\r\n }\r\n\r\n this.showSyntax = !shouldIncludeCountDownRule;\r\n\r\n return this.feeds;\r\n }\r\n\r\n render() {\r\n let $target = $(this.target);\r\n let position = $target.offset();\r\n\r\n position.top = position.top + $target.outerHeight();\r\n\r\n this.$el.css({\r\n position: 'absolute',\r\n visibility: 'visible',\r\n left: position.left,\r\n top: position.top,\r\n });\r\n\r\n // Clicking on elements having 'ac-helper-area' class won't hide currently visible helper\r\n this.$el.addClass('ac-helper-area adCustomizersEditor feeds-editor');\r\n const options = {\r\n feeds: this.getFeedsToRender(),\r\n selectedFeed: this.getSelectedFeed(),\r\n defaultText: this.defaultText,\r\n selectedAttribute: this.selectedAttributeName,\r\n showSyntax: this.showSyntax,\r\n onUserActionCompleted: (result, event) => {\r\n this.onFeedAttributeSelected(result, event);\r\n },\r\n onUserSelectionUpdated: (result, event) => {\r\n this.updateTargetOnUserSelectionUpdate(result, event);\r\n },\r\n i18n,\r\n };\r\n\r\n // total max length for default\r\n if (this.remainingCountCallBack) {\r\n options.maxLength = this.remainingCountCallBack() +\r\n (this.defaultText ? this.defaultText.length : 1);\r\n }\r\n\r\n ReactDOM.render(React.createElement(FeedAndAttributeSelectorView, options), this.el);\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.fetchDataAndShowToken) {\r\n this.fetchDataAndShowToken.cancel();\r\n this.fetchDataAndShowToken = null;\r\n }\r\n\r\n return super.remove();\r\n }\r\n}\r\n\r\n/*\r\n * Editor instance (used by hide() and show() to update, register/deregister events and change visibility)\r\n */\r\nlet editor = null;\r\n\r\nfunction clickedAway(event) {\r\n let target = $(event.target);\r\n\r\n if (target.closest('.ac-helper-area').length === 0 &&\r\n target.closest('.feed-and-attribute-selector').length === 0 &&\r\n target.closest('.feed-selector').length === 0 &&\r\n target.closest('.feed-attribute-selector').length === 0) {\r\n hide(); // eslint-disable-line no-use-before-define\r\n }\r\n}\r\n\r\n/**\r\n * Checks whether feeds editor is visible\r\n * @returns {bool} true if visible\r\n */\r\nexport function isVisible() {\r\n return editor !== null;\r\n}\r\n\r\n/**\r\n * Handles key down events.\r\n * Hides editor when user hits escape.\r\n * @param {object} event - click event\r\n * @returns {undefined}\r\n */\r\nfunction keydown(event) {\r\n switch (event.key) {\r\n case 'Escape':\r\n hide(); // eslint-disable-line no-use-before-define\r\n break;\r\n default:\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Hides feeds editor and deregisters clickaway event.\r\n * @returns {undefined}\r\n */\r\nexport function hide() {\r\n if (editor) {\r\n $(editor.target).off('keydown', keydown);\r\n $(window).off('click', clickedAway);\r\n editor.remove();\r\n editor = null;\r\n }\r\n}\r\n\r\n/**\r\n * Shows feeds editor and registers to global click events.\r\n * @param {object} target - element the editor will be attached to.\r\n * @param {object} options - editor model and cursor position info.\r\n * @param {function} remainingCountCallBack - callback function used to get the remainingcount\r\n * @returns {undefined}\r\n\r\n */\r\nexport function show(target, options, remainingCountCallBack) {\r\n // if already showing editor, update it\r\n if (isVisible()) {\r\n editor.onSelectionUpdated(options, remainingCountCallBack);\r\n return;\r\n }\r\n hide();\r\n\r\n editor = new FeedsEditorView({ target, options, remainingCountCallBack });\r\n\r\n $('body').append(editor.render().el);\r\n $(window).on('click', clickedAway);\r\n $(target).on('keydown', keydown);\r\n}\r\n","import _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { attachAdCustomizersHelpers as newAttachAdCustomizersHelpers } from '@bingads-webui-campaign/ad-customizers';\r\n\r\nimport { i18nDummy } from '@bingads-webui-campaign-legacy/crud-ad/service/utils/i18n-dummy-vnext';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { getHelperProperties } from '@bingads-webui-campaign-legacy/crud-ad/service/adCustomizersUtils';\r\nimport { show as showAdCustomizersPicker, hide as hideAdCustomizersPicker, isVisible as isAdCustomizersPickerVisible } from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/adCustomizersPicker';\r\nimport { show as showCountdownEditor, hide as hideCountdownEditor, isVisible as isCountdownEditorVisible } from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/adCustomizersCountdownEditor';\r\nimport { show as showFeedEditor, hide as hideFeedEditor, isVisible as isFeedEditorVisible } from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/feedsEditor';\r\nimport { showKeywordEditor, hideKeywordEditor, isKeywordEditorVisible } from '@bingads-webui-campaign/adcustomizers';\r\nimport { ADCUSTOMIZER_HELPER_PROPERTY_NAME, PICKER_HELPER_PROPERTY_NAME, KEYWORD_HELPER_PROPERTY_NAME, COUNTDOWN_HELPER_PROPERTY_NAME } from '@bingads-webui-campaign-legacy/crud-ad/service/utils/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\n\r\nconst i18nAdCustomizers = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\nconst dynamicAttachAdCustomizersHelpers = ({ container, element, updateAction, remainingCountCallBack, adType, field, perfMarker }) =>\r\n newAttachAdCustomizersHelpers({\r\n container,\r\n element,\r\n updateAction,\r\n remainingCountCallBack,\r\n deps: {\r\n i18n: i18nAdCustomizers,\r\n countdownI18nDummy: i18nDummy,\r\n config,\r\n instrumentation,\r\n edmCampaign,\r\n jsDataCampaign,\r\n perfMarker,\r\n },\r\n adType,\r\n field,\r\n });\r\n/**\r\n * Logs message\r\n * @param {string} helper - helper associated with this log\r\n * @param {string} message - message to log\r\n * @returns {undefined}\r\n */\r\n\r\nfunction log(helper, message) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, helper, message);\r\n}\r\n\r\nfunction hidePickers(selectedPropertyType) {\r\n const hideFunctionMap = {\r\n [PICKER_HELPER_PROPERTY_NAME]: hideAdCustomizersPicker,\r\n [ADCUSTOMIZER_HELPER_PROPERTY_NAME]: hideFeedEditor,\r\n [COUNTDOWN_HELPER_PROPERTY_NAME]: hideCountdownEditor,\r\n [KEYWORD_HELPER_PROPERTY_NAME]: hideKeywordEditor,\r\n };\r\n\r\n const functinsToUse = _.omit(hideFunctionMap, selectedPropertyType);\r\n\r\n _.each(functinsToUse, (hideFunc) => {\r\n hideFunc();\r\n });\r\n}\r\n\r\n/**\r\n * Registers for click, focus, input and keyup events of given element to show appropriate ad customizer helpers\r\n * @param {object} element - element the helpers will be attaching to\r\n * @param {function} updateAction - callback function used to update the field helpers are attaching to\r\n * @param {function} remainingCountCallBack - callback function used to get the remainingcount\r\n * @returns {undefined}\r\n */\r\nexport function attachAdCustomizersHelpers(element, updateAction, remainingCountCallBack) {\r\n\r\n let isItemSelected = false;\r\n\r\n // Clicking on elements having this class won't hide currently visible helper\r\n element.addClass('ac-helper-area');\r\n\r\n // keyup is to catch typing, pasting with Ctrl+V, tab navigation, and cursor movement.\r\n // click is to catch all click events (including focus by clicking)\r\n // input is to catch paste with right click\r\n // focus is to catch programmatic focus\r\n element.on('input keyup focus click', (event) => {\r\n isItemSelected = event.target.isSelectedByUser;\r\n event.target.isSelectedByUser = false;\r\n // Ignore if any text is selected, we are only interested in the cursor\r\n if (event.target.selectionStart !== event.target.selectionEnd) {\r\n return;\r\n }\r\n\r\n // Ignore escape key up since it shouldn't prompt any helper\r\n if (event.type === 'keyup' && event.key === 'Escape') {\r\n return;\r\n }\r\n\r\n getHelperProperties(event.target.value, event.target.selectionEnd, isItemSelected).then((helperProperties) => {\r\n const selectdPropertyType = helperProperties == null ? '' : helperProperties.type;\r\n\r\n // hide the non-selected pickers\r\n hidePickers(selectdPropertyType);\r\n\r\n // updateaction when selectedPropertyType is not empty\r\n if (selectdPropertyType) {\r\n helperProperties.options.updateAction = _.wrap(updateAction, (func, param) => {\r\n log('AdCustomizersPicker', `${selectdPropertyType} item selected. Updating field value from \"${event.target.value}\" to \"${param}\"`);\r\n func(param);\r\n });\r\n }\r\n\r\n switch (selectdPropertyType) {\r\n case ADCUSTOMIZER_HELPER_PROPERTY_NAME:\r\n if (!isFeedEditorVisible()) {\r\n log('AdCustomizersPicker', `Showing feed for value: \"${event.target.value}\" and cursor position: ${event.target.selectionEnd}`);\r\n }\r\n showFeedEditor(event.target, helperProperties.options, remainingCountCallBack);\r\n break;\r\n\r\n case PICKER_HELPER_PROPERTY_NAME:\r\n if (!isAdCustomizersPickerVisible()) {\r\n log('AdCustomizersPicker', `Showing picker for value: \"${event.target.value}\" and cursor position: ${event.target.selectionEnd}`);\r\n }\r\n showAdCustomizersPicker(event.target, helperProperties.options, event.type === 'keyup' ? event.key : undefined);\r\n break;\r\n\r\n case COUNTDOWN_HELPER_PROPERTY_NAME:\r\n if (!isCountdownEditorVisible()) {\r\n log('AdCustomizersCountdownEditor', `Showing countdown editor for value: \"${event.target.value}\" and cursor position: ${event.target.selectionEnd}`);\r\n }\r\n showCountdownEditor(event.target, helperProperties.options);\r\n break;\r\n\r\n case KEYWORD_HELPER_PROPERTY_NAME:\r\n if (!isKeywordEditorVisible()) {\r\n log('AdCustomizersKeywordEditor', `Showing keyword editor for value: \"${event.target.value}\" and cursor position: ${event.target.selectionEnd}`);\r\n }\r\n showKeywordEditor(event.target, helperProperties.options, i18nAdCustomizers);\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n });\r\n}\r\n\r\nexport const enableAdCustomizersHelpers = (view, customizableFields, nameAttrs, adType, container) => {\r\n _.each(customizableFields, (field) => {\r\n const property = view.viewModel[field];\r\n const element = view.$(`.form-control[name=\"${nameAttrs[field]}\"]`);\r\n\r\n dynamicAttachAdCustomizersHelpers(_.extend({\r\n element,\r\n updateAction: (text) => property(text),\r\n remainingCountCallBack: () => property.remaining(),\r\n adType,\r\n field,\r\n perfMarker: view.perfMarker,\r\n }, view.isForVNext ? { container: container ? container : view.$('> .ac-container') } : {}));\r\n });\r\n};\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicSearchAd';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/dynamicSearchAd.pug';\r\nimport buildPreview from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/dynamicSearchAd';\r\nimport { isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport UrlOptions from '@bingads-webui-component-legacy/upgraded-url/view/advancedSettingsUrlOptions';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport { enableAdCustomizersHelpers } from './adCustomizersHelpers';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nconst nameAttrs = {\r\n 'Text': 'Ad.ExpandedTextAd.AdDescription',\r\n 'TextPart2': 'Ad.ExpandedTextAd.AdDescription2',\r\n 'Path1': 'Ad.ExpandedTextAd.Path1',\r\n 'Path2': 'Ad.ExpandedTextAd.Path2',\r\n};\r\n\r\nconst fieldsWithLabel = ['Path1', 'Path2'];\r\nconst labels = _.object(fieldsWithLabel, _.map(fieldsWithLabel, (field) => {\r\n return i18n.get(`DynamicSearchAd_Label_${field}`);\r\n}));\r\n\r\nexport default class DynamicSearchAdEditor extends Backbone.View {\r\n initialize({\r\n model = null,\r\n isForVNext = false,\r\n showAdType = false,\r\n isTraditionalChinese = false,\r\n scope = null,\r\n activityLogger,\r\n } = {}) {\r\n this.showAdType = showAdType;\r\n this.isForVNext = isForVNext;\r\n this.useUpgradedUrl = true;\r\n this.activityLogger = activityLogger;\r\n this.viewModel = new ViewModel({\r\n model,\r\n useUpgradedUrl: this.useUpgradedUrl,\r\n isTraditionalChinese,\r\n scope,\r\n activityLogger,\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(editorTemplate({\r\n i18n,\r\n uuid,\r\n useUpgradedUrl: this.useUpgradedUrl,\r\n labels,\r\n placeholders: {},\r\n showAdType: this.showAdType,\r\n nameAttrs,\r\n allowDisclaimerAds: true,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n if (this.useUpgradedUrl) {\r\n if (_.isObject(this.model)) {\r\n this.urlOptions = new UrlOptions({\r\n editMode: true,\r\n smallContainer: true,\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(this.model.UrlCustomParameters) ? undefined : _.clone(this.model.UrlCustomParameters), // eslint-disable-line\r\n entityType: 'Ad',\r\n activityLogger: this.activityLogger,\r\n }).render();\r\n } else {\r\n this.urlOptions = new UrlOptions({\r\n smallContainer: true,\r\n entityType: 'Ad',\r\n activityLogger: this.activityLogger,\r\n }).render();\r\n }\r\n this.$el.find('.advanced-options').html(this.urlOptions.$el);\r\n }\r\n\r\n this.previewContainer = buildPreview(this.viewModel, {});\r\n this.$('.preview-container').empty().append(this.previewContainer.render().el);\r\n\r\n this.enableAdCustomizersHelpersForDSA();\r\n return this;\r\n }\r\n\r\n validateViewModel() {\r\n const isValid = this.viewModel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.viewModel.fields, (field) => {\r\n if (!this.viewModel[field].isValid()) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field invalid: ${field}`, 'dynamic search ad editor');\r\n }\r\n }\r\n });\r\n }\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n return this.validateViewModel() && (!this.useUpgradedUrl || this.urlOptions.isValid());\r\n }\r\n\r\n toObject() {\r\n const model = this.viewModel.toObject();\r\n\r\n if (!this.useUpgradedUrl) {\r\n return model;\r\n }\r\n\r\n return _.extend(_.omit(model, this.viewModel.upgradedUrlFields), {\r\n TrackingUrlTemplate: this.urlOptions.getTrackingTemplate(),\r\n UrlCustomParameters: this.urlOptions.getUrlCustomParameters(true),\r\n FinalUrlSuffix: this.urlOptions.getFinalUrlSuffix(),\r\n });\r\n }\r\n\r\n handleApiErrors(errors) {\r\n this.viewModel.errors.add(errors);\r\n\r\n if (this.useUpgradedUrl) {\r\n let errorObject = _.object(this.viewModel.upgradedUrlFields, _.map(this.viewModel.upgradedUrlFields, (key) => {\r\n return _.result(this.viewModel[key], 'errors', []);\r\n }));\r\n\r\n this.urlOptions.handleApiErrors(errorObject);\r\n }\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n if (this.useUpgradedUrl) {\r\n this.urlOptions.clearApiErrors();\r\n }\r\n }\r\n\r\n enableAdCustomizersHelpersForDSA() {\r\n const customizableFields = [\r\n 'Text',\r\n ...permissions.IsExpandedDsaPhase2Enabled ? ['TextPart2'] : [], 'Path1', 'Path2'];\r\n\r\n enableAdCustomizersHelpers(this, customizableFields, nameAttrs, 'DynamicSearchAd');\r\n }\r\n}\r\n","import { ProductAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport KoSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nexport default class ViewModel {\r\n constructor({ model = null }) {\r\n KoSchema.properties(this, ProductAd, [], model);\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/productAd';\r\nimport { getODataErrors, isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n\r\n this.viewModel = new ViewModel(this.options);\r\n }\r\n\r\n render() {\r\n ko.applyBindings(this.viewModel, this.el);\r\n }\r\n\r\n validate() {\r\n return true;\r\n }\r\n\r\n toObject() {\r\n return {};\r\n }\r\n\r\n handleApiErrors(response) {\r\n this.viewModel.errors.add(_.isEmpty(response) ? undefined : getODataErrors(response.errors));\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { ExpandedTextAd, DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport dynamicTextExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicTextExtension';\r\nimport KoSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport parsedTextMaxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension';\r\nimport { getFinalUrlDomain } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\nconst {\r\n IsDisclaimerAdsEnabled,\r\n} = permissions;\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n model = null,\r\n isNativeAdsEnabled = false,\r\n isVanityUrlEnabled = false,\r\n IsExpandedTextAdV2Enabled = false,\r\n placeholders = {},\r\n scope = null,\r\n activityLogger,\r\n perfMarker,\r\n } = {}) {\r\n // Babel would understand the intent and do this behind the curtain but it is better not to rely on it.\r\n const self = this;\r\n\r\n this.model = model;\r\n this.placeholders = placeholders; // preview uses this\r\n this.IsExpandedTextAdV2Enabled = IsExpandedTextAdV2Enabled;\r\n this.scope = scope;\r\n this.activityLogger = activityLogger;\r\n this.perfMarker = perfMarker;\r\n\r\n const lengthCheckFields = ['TitlePart1', 'TitlePart2', 'Text', 'Path1', 'Path2'];\r\n\r\n this.fields = _.compact(['TitlePart1', 'TitlePart2', 'Text', 'Path1', 'Path2', 'FinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'MobileFinalUrls', 'FinalUrlSuffix']);\r\n\r\n if (this.IsExpandedTextAdV2Enabled) {\r\n lengthCheckFields.push('TitlePart3', 'TextPart2');\r\n this.fields.push('TitlePart3', 'TextPart2');\r\n }\r\n\r\n if (isNativeAdsEnabled) {\r\n this.fields.push('NativePreference');\r\n }\r\n\r\n this.isVanityUrlEnabled = isVanityUrlEnabled;\r\n if (isVanityUrlEnabled) {\r\n this.fields.push('DisplayUrl');\r\n }\r\n\r\n KoSchema.properties(this, ExpandedTextAd, this.fields, _.defaults(model, {\r\n FinalUrls: [],\r\n }, isNativeAdsEnabled ? {\r\n NativePreference: 'NativePreference',\r\n } : {}));\r\n\r\n dynamicTextExtension.extend(this, lengthCheckFields);\r\n\r\n parsedTextMaxLengthExtension.extend(this, lengthCheckFields);\r\n\r\n this.showNativeAdPreview = ko.computed(() => {\r\n if (isNativeAdsEnabled) {\r\n return self.NativePreference.isNativePreference();\r\n }\r\n\r\n return false;\r\n }, this);\r\n\r\n if (!isVanityUrlEnabled) {\r\n this.DisplayUrl = ko.computed(() => {\r\n return getFinalUrlDomain(_.first(self.FinalUrls()));\r\n });\r\n }\r\n\r\n if (IsDisclaimerAdsEnabled) {\r\n this.disclaimerInfo = ko.observable({});\r\n\r\n this.extensionsSharedRepos = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n afterChangeComitted: _.noop,\r\n });\r\n\r\n let disclaimerCampaignId = 0;\r\n\r\n if (Number(this.scope().campaignId) > 0) {\r\n disclaimerCampaignId = Number(this.scope().campaignId);\r\n } else if (pageContext.CurrentCampaign && Number(pageContext.CurrentCampaign.Id) > 0) {\r\n disclaimerCampaignId = Number(pageContext.CurrentCampaign.Id);\r\n }\r\n\r\n if (disclaimerCampaignId > 0) {\r\n this.computeDisclaimerAsync(disclaimerCampaignId);\r\n }\r\n\r\n this.scope.subscribe((data) => {\r\n if (data.campaignId) {\r\n this.computeDisclaimerAsync(data.campaignId);\r\n }\r\n });\r\n\r\n this.showDisclaimer = ko.computed(() => {\r\n if (this.disclaimerInfo().Id) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n this.adDisclaimerHint = ko.computed(() => {\r\n if (this.disclaimerInfo().Id) {\r\n if (this.disclaimerInfo().DisclaimerLayout === 'AdditionalLine') {\r\n return i18n.getString('Disclaimer_Ad_AdditionalLine_Hint');\r\n } else if (this.disclaimerInfo().DisclaimerLayout === 'Popup') {\r\n return i18n.getString('Disclaimer_Ad_Popup_Hint');\r\n }\r\n }\r\n\r\n return '';\r\n });\r\n }\r\n\r\n this.errorMessage = ko.computed(() => {\r\n if (_.isEmpty(_.result(self.Path1(), 'trim')) && !_.isEmpty(self.Path2())) {\r\n return i18n.get('ExpandedTextAd_Path1RequiredWhenUsingPath2');\r\n }\r\n\r\n return '';\r\n });\r\n\r\n _.each(this.fields, (field) => {\r\n // log once per field.\r\n const logChange = _.once(() => {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'expanded text ad editor');\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n }, this);\r\n });\r\n }\r\n\r\n computeDisclaimerAsync(disclaimerCampaignId) {\r\n let params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n jsDataCampaign.Campaign.find(disclaimerCampaignId, params)\r\n .then((data) => {\r\n const hasDisclaimer = _.result(_.find(data.CampaignSettings, (setting) => {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n }),\r\n 'DisclaimerAdsEnabled');\r\n\r\n if (hasDisclaimer) {\r\n const scope = Object.create({\r\n campaignId: disclaimerCampaignId,\r\n });\r\n\r\n this.extensionsSharedRepos.association.findAll({\r\n where: scope,\r\n }).then((disclaimerdata) => {\r\n\r\n if (disclaimerdata && disclaimerdata.length > 0) {\r\n this.disclaimerInfo(disclaimerdata[0]);\r\n }\r\n });\r\n }\r\n });\r\n // TODO : catch and finally\r\n }\r\n\r\n initPreviewTab() {\r\n let defaultPreviewType = 'top';\r\n\r\n if (this.showNativeAdPreview()) {\r\n defaultPreviewType = 'native';\r\n }\r\n\r\n return defaultPreviewType;\r\n }\r\n}\r\n","import PreviewContainer from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/container';\r\nimport topTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/top.pug';\r\nimport sidebarTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/sidebar.pug';\r\nimport mobileTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/mobile.pug';\r\nimport nativeTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/native.pug';\r\nimport PreviewViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/expandedTextAd';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default function buildPreview (viewModel) {\r\n let previewViewModel = new PreviewViewModel(viewModel);\r\n\r\n return new PreviewContainer({\r\n contentClass: '.Text .preview-container',\r\n tabs: [{\r\n top: {\r\n template: topTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_TopView'),\r\n },\r\n sidebar: {\r\n template: sidebarTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_SideView'),\r\n },\r\n mobile: {\r\n template: mobileTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_MobileView'),\r\n },\r\n }, {\r\n native: {\r\n template: nativeTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_NativeView'),\r\n },\r\n }],\r\n });\r\n}\r\n","/*eslint new-cap:0 */\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/expandedTextAd';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/expandedTextAd.pug';\r\nimport { isCampaignEditorialError, isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport CampaignEditorialError from '@bingads-webui-component-legacy/api-errors-campaign/editorial-error';\r\nimport buildPreview from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/expandedTextAd';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport UrlEditor from '@bingads-webui-component-legacy/url-input/view/url-input';\r\nimport UrlOptions from '@bingads-webui-component-legacy/upgraded-url/view/urlOptionsV2';\r\nimport legacyInstru from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { enableAdCustomizersHelpers } from './adCustomizersHelpers';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nconst fieldsWithPlaceHolder = ['TitlePart1', 'TitlePart2', 'TitlePart3', 'Text', 'Path1', 'Path2', 'FinalUrls', 'MobileFinalUrls']\r\n .concat(permissions.IsVanityUrlEnabled ? ['DisplayUrl'] : []);\r\nconst placeholders = _.object(fieldsWithPlaceHolder, _.map(fieldsWithPlaceHolder, (field) => {\r\n return i18n.get(`ExpandedTextAd_Placeholder_${field}`);\r\n}));\r\nconst fieldsWithLabel = ['Path1', 'Path2'];\r\nconst labels = _.object(fieldsWithLabel, _.map(fieldsWithLabel, (field) => {\r\n return i18n.get(`ExpandedTextAd_Label_${field}`);\r\n}));\r\nconst {\r\n IsExpandedTextAdV2Enabled,\r\n IsDisclaimerAdsEnabled,\r\n IsEXTAMigrationNotificationEnabled,\r\n} = permissions;\r\n\r\n\r\n/*For initial stage, MT converts the expanded text ad to standard text ad and passes it to editorial.\r\n So editorial will still return adtitle instead of titlepart1/titlepart2 as it doesn't know anything about EXTA.\r\n Once editorial is on boarded, will remove following mapping,\r\n*/\r\nconst fieldMapping = {\r\n 'Title': 'TitlePart1',\r\n 'DisplayUrl': 'Path1',\r\n 'DestinationUrl': 'FinalUrls',\r\n};\r\n\r\nconst nameAttrs = {\r\n 'TitlePart1': 'Ad.ExpandedTextAd.TitlePart1',\r\n 'TitlePart2': 'Ad.ExpandedTextAd.TitlePart2',\r\n 'TitlePart3': 'Ad.ExpandedTextAd.TitlePart3',\r\n 'Text': 'Ad.ExpandedTextAd.AdDescription',\r\n 'TextPart2': 'Ad.ExpandedTextAd.AdDescription2',\r\n 'Path1': 'Ad.ExpandedTextAd.Path1',\r\n 'Path2': 'Ad.ExpandedTextAd.Path2',\r\n 'NativePreference': 'Ad.ExpandedTextAd.IsNativeNetworkPreferred',\r\n};\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n showInline = false,\r\n editMode = false,\r\n model = null,\r\n isForVNext = false,\r\n isNativeAdsEnabled = permissions.IsNativeAdsAllowed,\r\n isVanityUrlEnabled = permissions.IsVanityUrlEnabled,\r\n isTraditionalChinese = false,\r\n defaultLandingPageUrl = '',\r\n activityLogger,\r\n scope = null,\r\n perfMarker,\r\n } = {}) {\r\n this.isForVNext = isForVNext;\r\n this.showInline = showInline;\r\n this.editMode = editMode;\r\n this.isNativeAdsEnabled = isNativeAdsEnabled;\r\n this.isVanityUrlEnabled = isVanityUrlEnabled;\r\n this.isNativeAdsRebrandingEnabled = permissions.IsNativeAdsRebrandingEnabled;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n this.activityLogger = activityLogger;\r\n if (perfMarker) {\r\n this.perfMarker = perfMarker.createChild('Load_Audience_List');\r\n }\r\n this.viewModel = new ViewModel({\r\n model,\r\n isNativeAdsEnabled,\r\n isVanityUrlEnabled,\r\n isTraditionalChinese,\r\n placeholders,\r\n defaultLandingPageUrl,\r\n IsExpandedTextAdV2Enabled,\r\n scope,\r\n activityLogger,\r\n perfMarker: this.perfMarker,\r\n });\r\n\r\n this.finalUrlEditor = new UrlEditor({\r\n url: _.first(_.result(this.model, 'FinalUrls')),\r\n ariaLabelledby: 'extaFinalUrlLabel',\r\n ariaId: 'extaFinalUrl',\r\n required: true,\r\n });\r\n this.mobileUrlEditor = new UrlEditor({\r\n url: _.first(_.result(this.model, 'MobileFinalUrls')),\r\n ariaLabelledby: 'extaMobileUrlLabel',\r\n ariaId: 'extaMobileUrl',\r\n });\r\n\r\n this.finalUrlEditor.on('urlChanged', (url) => {\r\n this.viewModel.FinalUrls(url ? [url] : []);\r\n });\r\n this.mobileUrlEditor.on('urlChanged', (url) => {\r\n this.viewModel.MobileFinalUrls(url ? [url] : []);\r\n });\r\n\r\n this.viewModel.FinalUrls.errors.subscribe((value) => {\r\n this.finalUrlEditor.hasErrors(!_.isEmpty(value));\r\n });\r\n\r\n this.viewModel.MobileFinalUrls.errors.subscribe((value) => {\r\n this.mobileUrlEditor.hasErrors(!_.isEmpty(value));\r\n });\r\n\r\n this.urlOptions = new UrlOptions({\r\n isForVNext,\r\n placeholderEnabled: true,\r\n showUurlTestTool: true,\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(_.result(this.model, 'UrlCustomParameters')) ? undefined : _.clone(this.model.UrlCustomParameters),\r\n activityLogger,\r\n });\r\n\r\n this.urlOptions.on('testUurl', (fn, originalView) => {\r\n this.trigger('testUurl', fn, originalView);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .prefer-native-format': 'preferNativeAdFormat',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(editorTemplate({\r\n i18n,\r\n uuid,\r\n isNativeAdsEnabled: this.isNativeAdsEnabled,\r\n isVanityUrlEnabled: this.isVanityUrlEnabled,\r\n isNativeAdsRebrandingEnabled: this.isNativeAdsRebrandingEnabled,\r\n nameAttrs,\r\n labels,\r\n placeholders: {},\r\n domainWatermark: placeholders.FinalUrls,\r\n IsExpandedTextAdV2Enabled,\r\n IsDisclaimerAdsEnabled,\r\n IsEXTAMigrationNotificationEnabled,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.$('.final-url').empty().append(this.finalUrlEditor.render().el);\r\n this.$('.mobile-url').empty().append(this.mobileUrlEditor.render().el);\r\n this.$('.ext-ad-url-options').empty().append(this.urlOptions.render().el);\r\n\r\n this.$('.final-url input.url-field').attr('name', 'FinalUrls');\r\n this.$('.mobile-url input.url-field').attr('name', 'MobileFinalUrls');\r\n\r\n this.previewContainer = buildPreview(this.viewModel);\r\n this.$('.preview-container').empty().append(this.previewContainer.render().el);\r\n this.previewContainer.selectedPanel(this.viewModel.initPreviewTab());\r\n\r\n this.enableAdCustomizersHelpersForEXTA();\r\n return this;\r\n }\r\n\r\n preferNativeAdFormat() {\r\n this.previewContainer.selectedPanel(this.viewModel.showNativeAdPreview() ? 'native' : 'top');\r\n }\r\n\r\n validateViewModel() {\r\n const isValid = this.viewModel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.viewModel.fields, (field) => {\r\n if (!this.viewModel[field].isValid()) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field invalid: ${field}`, 'expanded text ad editor');\r\n }\r\n }\r\n });\r\n }\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n return _.reduce([\r\n this.validateViewModel(),\r\n _.isEmpty(this.viewModel.errorMessage()),\r\n this.urlOptions ? this.urlOptions.isValid() : true,\r\n ], (prev, next) => {\r\n return prev && next;\r\n }, true);\r\n }\r\n\r\n resetEditMode(mode) {\r\n this.editMode = mode;\r\n }\r\n\r\n toObject() {\r\n const params = _.omit(_.extend(this.viewModel.toObject(), this.urlOptions ? this.urlOptions.toObject() : {}),\r\n this.isVanityUrlEnabled ? [] : ['DisplayUrl']);\r\n\r\n const api = this.showInline ? 'odata' : 'bulk';\r\n const arrayEmptyValue = api === 'odata' ? [] : null;\r\n const stringEmptyValue = api === 'odata' ? '' : null;\r\n\r\n /* 1.Replace all line breaks with spaces 2. Remove whitespace from both sides */\r\n const regex = /(?:\\r\\n|\\r|\\n)/g;\r\n\r\n params.Text = params.Text.replace(regex, ' ').trim();\r\n if (IsExpandedTextAdV2Enabled && params.TextPart2) {\r\n params.TextPart2 = params.TextPart2.replace(regex, ' ').trim();\r\n }\r\n\r\n if (params.TextPart2 === undefined || params.TextPart2 === null) {\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO,\r\n 'crud-ad/view/adEditor',\r\n `IsExpandedTextAdV2Enabled: ${IsExpandedTextAdV2Enabled},\r\n TextPart2: ${this.viewModel.TextPart2 ? this.viewModel.TextPart2() : 'Not in viewModel'},\r\n model: ${this.model ? this.model.TextPart2 : 'model is not set'}`);\r\n }\r\n\r\n //bulk API needs use 'delete_vlaue' to indicate deleting a value, in jsdata bulk adapter, we will replace null with 'delete_value' to remove value\r\n if (this.editMode) {\r\n const nullableArrayFields = [\r\n 'FinalUrls',\r\n 'MobileFinalUrls',\r\n 'UrlCustomParameters',\r\n ];\r\n\r\n const nullableStringFields = _.compact([\r\n 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix',\r\n 'Path1',\r\n 'Path2',\r\n ]);\r\n\r\n _.each(nullableArrayFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = arrayEmptyValue;\r\n }\r\n });\r\n\r\n _.each(nullableStringFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = stringEmptyValue;\r\n }\r\n });\r\n }\r\n\r\n return params;\r\n }\r\n\r\n handleApiErrors(errors) {\r\n const title1 = this.viewModel.TitlePart1();\r\n const title2 = this.viewModel.TitlePart2();\r\n const title3 = IsExpandedTextAdV2Enabled ? this.viewModel.TitlePart3() : '';\r\n\r\n const parsedErrors = _.reduce(errors, (memo, error) => {\r\n if (_.has(error, 'property') && isCampaignEditorialError(error)) {\r\n const disapproved = _.result(error, 'disapprovedText', '');\r\n\r\n if (error.property === 'Title') {\r\n let isTitle1HaveErrors = title1.indexOf(disapproved) > -1;\r\n let isTitle2HaveErrors = title2.indexOf(disapproved) > -1;\r\n const { message, property, code, disapprovedText, isAppealable } = error;\r\n\r\n if (IsExpandedTextAdV2Enabled && title3) {\r\n let isTitle3HaveErrors = title3.indexOf(disapproved) > -1;\r\n\r\n if (!isTitle1HaveErrors && !isTitle2HaveErrors && !isTitle3HaveErrors) {\r\n if (`${title1} ${title2}`.indexOf(disapproved) > -1) {\r\n // error in (title1 + title2)\r\n isTitle1HaveErrors = true;\r\n isTitle2HaveErrors = true;\r\n } else if (`${title2} ${title3}`.indexOf(disapproved) > -1) {\r\n // error in (title2 + title3)\r\n isTitle2HaveErrors = true;\r\n isTitle3HaveErrors = true;\r\n } else {\r\n // If (title1 + title2 + title3) contain disapproved text, show errors on all fields.\r\n isTitle1HaveErrors = true;\r\n isTitle2HaveErrors = true;\r\n isTitle3HaveErrors = true;\r\n }\r\n }\r\n\r\n const returnError = [...memo];\r\n\r\n if (isTitle1HaveErrors) {\r\n returnError.push(_.extend(error, { property: 'TitlePart1' }));\r\n }\r\n\r\n if (isTitle2HaveErrors) {\r\n returnError.push(_.extend(new CampaignEditorialError(message, property, code, disapprovedText, isAppealable), { property: 'TitlePart2' }));\r\n }\r\n\r\n if (isTitle3HaveErrors) {\r\n returnError.push(_.extend(new CampaignEditorialError(message, property, code, disapprovedText, isAppealable), { property: 'TitlePart3' }));\r\n }\r\n return returnError;\r\n } else if ((isTitle1HaveErrors && isTitle2HaveErrors) || (!isTitle1HaveErrors && !isTitle2HaveErrors)) {\r\n // Both title1 and title2 contain disapprovedText, or (title1 + title2) contain disapprovedText, show errors\r\n // on both fields\r\n return [...memo, _.extend(error, {\r\n property: 'TitlePart1',\r\n }), _.extend(new CampaignEditorialError(message, property, code, disapprovedText, isAppealable), {\r\n property: 'TitlePart2',\r\n })];\r\n } else {\r\n return [...memo, _.extend(error, {\r\n property: isTitle2HaveErrors ? 'TitlePart2' : 'TitlePart1',\r\n })];\r\n }\r\n } else if (error.property === 'Text' && IsExpandedTextAdV2Enabled) {\r\n const text1 = this.viewModel.Text();\r\n const text2 = this.viewModel.TextPart2();\r\n\r\n if (text2) {\r\n let isText1HaveErrors = text1.indexOf(disapproved) > -1;\r\n let isText2HaveErrors = text2.indexOf(disapproved) > -1;\r\n\r\n if (!isText1HaveErrors && !isText2HaveErrors) {\r\n // if (text1 + text2 contain disapproved text), show errors on all fields.\r\n isText1HaveErrors = true;\r\n isText2HaveErrors = true;\r\n }\r\n\r\n if (isText2HaveErrors) {\r\n if (isText1HaveErrors) {\r\n const { message, property, code, disapprovedText, isAppealable } = error;\r\n\r\n // If (text1 + text2) contain disapproved text, show errors on all fields.\r\n return [...memo, error, _.extend(new CampaignEditorialError(message, property, code, disapprovedText, isAppealable), { property: 'TextPart2' })];\r\n } else {\r\n // only have error in text2.\r\n error.property = 'TextPart2';\r\n }\r\n }\r\n }\r\n }\r\n\r\n // This mapping is for editorial errors. Once editorial is on boarded, will remove following mapping. See bug 576573.\r\n error.property = fieldMapping[error.property] || error.property;\r\n return [...memo, error];\r\n }\r\n return [...memo, error];\r\n }, []);\r\n\r\n this.viewModel.errors.add(parsedErrors);\r\n const errorFields = _.compact(['TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix']);\r\n let errorObject = _.object(errorFields, _.map(errorFields, (key) => {\r\n return this.viewModel[key].errors();\r\n }));\r\n\r\n this.urlOptions.handleApiErrors(errorObject);\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n this.urlOptions.clearApiErrors();\r\n }\r\n\r\n /**\r\n * Registers ad customizers helpers to listen for key/mouse events on a number of form fields to pop themselves up when applicable\r\n * @returns {undefined}\r\n */\r\n enableAdCustomizersHelpersForEXTA() {\r\n const customizableFields = ['TitlePart1', 'TitlePart2', 'Path1', 'Path2', 'Text'];\r\n\r\n if (IsExpandedTextAdV2Enabled) {\r\n customizableFields.push('TitlePart3', 'TextPart2');\r\n }\r\n enableAdCustomizersHelpers(this, customizableFields, nameAttrs, 'ExpandedTextAd');\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { ResponsiveSearchAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport dynamicTextExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicTextExtension';\r\nimport KoSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport parsedTextMaxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension';\r\nimport { getFinalUrlDomain } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n model = null,\r\n isNativeAdsEnabled = false,\r\n isVanityUrlEnabled = false,\r\n IsExpandedTextAdV2Enabled = false,\r\n placeholders = {},\r\n scope = null,\r\n activityLogger,\r\n } = {}) {\r\n // Babel would understand the intent and do this behind the curtain but it is better not to rely on it.\r\n const self = this;\r\n\r\n this.model = model;\r\n this.placeholders = placeholders; // preview uses this\r\n this.IsExpandedTextAdV2Enabled = IsExpandedTextAdV2Enabled;\r\n this.scope = scope;\r\n this.activityLogger = activityLogger;\r\n\r\n const lengthCheckFields = [\r\n 'Path1',\r\n 'Path2',\r\n ];\r\n\r\n this.fields = _.compact([\r\n 'Path1',\r\n 'Path2',\r\n 'FinalUrls',\r\n 'TrackingUrlTemplate',\r\n 'UrlCustomParameters',\r\n 'FinalUrlSuffix',\r\n 'MobileFinalUrls',\r\n ]);\r\n\r\n if (isNativeAdsEnabled) {\r\n this.fields.push('NativePreference');\r\n }\r\n\r\n this.isVanityUrlEnabled = isVanityUrlEnabled;\r\n if (isVanityUrlEnabled) {\r\n this.fields.push('DisplayUrl');\r\n }\r\n\r\n KoSchema.properties(this, ResponsiveSearchAd, this.fields, _.defaults(model, {\r\n FinalUrls: [],\r\n }));\r\n\r\n dynamicTextExtension.extend(this, lengthCheckFields);\r\n parsedTextMaxLengthExtension.extend(this, lengthCheckFields, 'ResponsiveSearchAd');\r\n\r\n this.showNativeAdPreview = ko.computed(() => {\r\n if (isNativeAdsEnabled) {\r\n return self.NativePreference.isNativePreference();\r\n }\r\n\r\n return false;\r\n }, this);\r\n\r\n if (!isVanityUrlEnabled) {\r\n this.DisplayUrl = ko.computed(() => {\r\n return getFinalUrlDomain(_.first(self.FinalUrls()));\r\n });\r\n }\r\n\r\n this.errorMessage = ko.computed(() => {\r\n if (_.isEmpty(_.result(self.Path1(), 'trim')) && !_.isEmpty(self.Path2())) {\r\n return i18n.get('ExpandedTextAd_Path1RequiredWhenUsingPath2');\r\n }\r\n\r\n return '';\r\n });\r\n\r\n _.each(this.fields, (field) => {\r\n const logChange = _.once(() => {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive search ad editor');\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n }, this);\r\n });\r\n }\r\n\r\n initPreviewTab() {\r\n let defaultPreviewType = 'top';\r\n\r\n if (this.showNativeAdPreview()) {\r\n defaultPreviewType = 'native';\r\n }\r\n\r\n return defaultPreviewType;\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport {\r\n getTitlePreview,\r\n getDescPreview,\r\n combineDescriptions,\r\n} from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { evaluateAdCustomizers as newEvaluateAdCustomizers } from '@bingads-webui-campaign/ad-customizers';\r\nimport { evaluateAdCustomizers as legacyEvaluateAdCustomizers } from '@bingads-webui-campaign-legacy/crud-ad/service/adCustomizersUtils';\r\nimport { getExpandedTextAdDisplayUrl } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { i18nDummy } from '@bingads-webui-campaign-legacy/crud-ad/service/utils/i18n-dummy-vnext';\r\n\r\nconst i18nAdCustomizers = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\nconst {\r\n IsNewAdsAdCustomizerEditorEnabled,\r\n IsIfFunctionMilestone1Enabled,\r\n} = config.get('Permissions') || {};\r\n\r\nconst withNewAdCustomizerEditor = IsNewAdsAdCustomizerEditorEnabled ||\r\n IsIfFunctionMilestone1Enabled;\r\n\r\nconst evaluateAdCustomizers = (text, fieldName) => {\r\n if (withNewAdCustomizerEditor) {\r\n return newEvaluateAdCustomizers({\r\n text,\r\n field: fieldName,\r\n deps: {\r\n config,\r\n i18n: i18nAdCustomizers,\r\n countdownI18nDummy: i18nDummy,\r\n instrumentation,\r\n jsDataCampaign,\r\n edmCampaign,\r\n },\r\n adType: 'ResponsiveSearchAd',\r\n });\r\n }\r\n return legacyEvaluateAdCustomizers(text);\r\n};\r\n\r\n\r\nfunction getFormattedField(fields, model) {\r\n return _.chain(fields)\r\n .filter((field) => !_.isEmpty(_.result(model[`Parsed${field}`](), 'trim')))\r\n .map((field) => ({\r\n Text: model[`Parsed${field}`]().trim(),\r\n PinnedField: model[`Parsed${field}Position`](),\r\n }))\r\n .value();\r\n}\r\nexport default class ViewModel {\r\n constructor(adViewModel = {}) {\r\n const headlineFields = config.get('headlineFields');\r\n const descriptionFields = config.get('descriptionFields');\r\n const self = this;\r\n const fields = [\r\n 'Path1',\r\n 'Path2',\r\n ...headlineFields,\r\n ...descriptionFields,\r\n ..._.map(headlineFields, (i) => `${i}Position`),\r\n ..._.map(descriptionFields, (i) => `${i}Position`),\r\n ];\r\n\r\n this.placeHolders = adViewModel.placeholders;\r\n\r\n _.each(fields, (fieldName) => {\r\n self.createField(`Parsed${fieldName}`, adViewModel[fieldName]);\r\n });\r\n\r\n this.Text = ko.computed(() => {\r\n const descriptions = getFormattedField(descriptionFields, self);\r\n const descriptionText = getDescPreview(descriptions);\r\n\r\n return _.isEmpty(descriptionText) ? combineDescriptions(self.placeHolders.Description1, self.placeHolders.Description2) : descriptionText;\r\n });\r\n\r\n this.Title = ko.computed(() => {\r\n const headlines = getFormattedField(headlineFields, self);\r\n const headlinesText = getTitlePreview(headlines);\r\n\r\n return _.isEmpty(headlinesText) ? [\r\n self.placeHolders.Headline1,\r\n self.placeHolders.Headline2,\r\n self.placeHolders.Headline3,\r\n ].join(' | ') : headlinesText;\r\n });\r\n\r\n this.DisplayUrl = ko.computed(() => {\r\n return getExpandedTextAdDisplayUrl(_.first(adViewModel.FinalUrls()), adViewModel.DisplayUrl(), self.ParsedPath1(), self.ParsedPath2(), true);\r\n });\r\n\r\n this.DestinationUrl = ko.computed(() => {\r\n return adViewModel.FinalUrls();\r\n });\r\n }\r\n\r\n /**\r\n * Adds a property to this that holds parsed value of passed dependency\r\n * @param {string} fieldName - new property's name\r\n * @param {Object} dependency - observable that contains the raw value to be parsed for preview\r\n * @returns {undefined}\r\n */\r\n createField(fieldName, dependency) {\r\n const self = this;\r\n\r\n this[fieldName] = ko.observable(dependency());\r\n evaluateAdCustomizers(dependency(), fieldName).then((value) => {\r\n self[fieldName](value);\r\n });\r\n\r\n // We cannot directly use computedObservables because evaluateAdCustomizers is async\r\n dependency.subscribe(() => {\r\n evaluateAdCustomizers(dependency(), fieldName).then((value) => {\r\n self[fieldName](value);\r\n });\r\n });\r\n }\r\n}\r\n","import PreviewContainer from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/container';\r\nimport topTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/top.pug';\r\nimport sidebarTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/sidebar.pug';\r\nimport mobileTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/mobile.pug';\r\nimport nativeTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsPreview/native.pug';\r\nimport PreviewViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/responsiveTextAd';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default function buildPreview (viewModel) {\r\n let previewViewModel = new PreviewViewModel(viewModel);\r\n\r\n return new PreviewContainer({\r\n contentClass: '.Text .preview-container',\r\n tabs: [{\r\n top: {\r\n template: topTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_TopView'),\r\n },\r\n sidebar: {\r\n template: sidebarTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_SideView'),\r\n },\r\n mobile: {\r\n template: mobileTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_MobileView'),\r\n },\r\n }, {\r\n native: {\r\n template: nativeTemplate,\r\n viewModel: previewViewModel,\r\n title: i18n.get('Ad_NativeView'),\r\n },\r\n }],\r\n });\r\n}\r\n\r\n","import edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { ResponsiveSearchAdStrengthView } from '@bingads-webui-campaign/responsive-search-ad-strength';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/responsive-search-ad');\r\n\r\nexport default function buildAdStrength(adId, viewModel, isForVNext = false, inlineSuggestionsEnabled = false) {\r\n return new ResponsiveSearchAdStrengthView({\r\n adId,\r\n edm,\r\n i18n,\r\n jsdata,\r\n viewModel,\r\n isForVNext,\r\n inlineSuggestionsEnabled,\r\n appState,\r\n token: pageContext.Token,\r\n odataPath: pageContext.BingAdsAdInsightWebApiUri,\r\n });\r\n}\r\n","/* eslint new-cap:0 */\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport {\r\n attachAIGenAssetContextualAttribute,\r\n} from '@bingads-webui-campaign/responsive-search-ad-strength';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/responsiveSearchAd';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/responsiveSearchAd.pug';\r\nimport editorHeadlineDescriptionOnlyTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/responsiveSearchAdHeadlineDescriptionOnly.pug';\r\nimport { isCampaignEditorialError, isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport buildPreview from '@bingads-webui-campaign-legacy/crud-ad/view/adsPreview/responsiveTextAd';\r\nimport buildAdStrength from '@bingads-webui-campaign-legacy/crud-ad/view/adsStrength/responsiveSearchAd';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport UrlEditor from '@bingads-webui-component-legacy/url-input/view/url-input';\r\nimport UrlOptions from '@bingads-webui-component-legacy/upgraded-url/view/urlOptionsV2';\r\nimport { HeadlinesView, DescriptionsView } from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/responsiveListField';\r\nimport { enableAdCustomizersHelpers } from './adCustomizersHelpers';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\nconst fieldsWithPlaceHolder = [\r\n 'Path1',\r\n 'Path2',\r\n 'FinalUrls',\r\n 'MobileFinalUrls',\r\n 'Headline1',\r\n 'Headline2',\r\n 'Headline3',\r\n 'Description1',\r\n 'Description2',\r\n].concat(permissions.IsVanityUrlEnabled ? ['DisplayUrl'] : []);\r\nconst placeholders = _.object(fieldsWithPlaceHolder, _.map(fieldsWithPlaceHolder, (field) => {\r\n return i18n.get(`ResponsiveSearchAd_Placeholder_${field}`);\r\n}));\r\nconst fieldsWithLabel = ['Path1', 'Path2'];\r\nconst labels = _.object(fieldsWithLabel, _.map(fieldsWithLabel, (field) => {\r\n return i18n.get(`ResponsiveSearchAd_Label_${field}`);\r\n}));\r\nconst {\r\n IsExpandedTextAdV2Enabled,\r\n} = permissions;\r\n\r\n/*For initial stage, MT converts the expanded text ad to standard text ad and passes it to editorial.\r\n So editorial will still return adtitle instead of titlepart1/titlepart2 as it doesn't know anything about EXTA.\r\n Once editorial is on boarded, will remove following mapping,\r\n*/\r\n\r\n// [TODO] need update\r\nconst fieldMapping = {\r\n 'DisplayUrl': 'Path1',\r\n 'DestinationUrl': 'FinalUrls',\r\n};\r\n\r\nconst nameAttrs = {\r\n 'Headline0': 'Headline0',\r\n 'Headline1': 'Headline1',\r\n 'Headline2': 'Headline2',\r\n 'Headline3': 'Headline3',\r\n 'Headline4': 'Headline4',\r\n 'Headline5': 'Headline5',\r\n 'Headline6': 'Headline6',\r\n 'Headline7': 'Headline7',\r\n 'Headline8': 'Headline8',\r\n 'Headline9': 'Headline9',\r\n 'Headline10': 'Headline10',\r\n 'Headline11': 'Headline11',\r\n 'Headline12': 'Headline12',\r\n 'Headline13': 'Headline13',\r\n 'Headline14': 'Headline14',\r\n 'Description0': 'Description0',\r\n 'Description1': 'Description1',\r\n 'Description2': 'Description2',\r\n 'Description3': 'Description3',\r\n 'Path1': 'Ad.ExpandedTextAd.Path1',\r\n 'Path2': 'Ad.ExpandedTextAd.Path2',\r\n};\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n showInline = false,\r\n editMode = false,\r\n model = null,\r\n // isNativeAdsEnabled = permissions.IsNativeAdsAllowed,\r\n isVanityUrlEnabled = permissions.IsVanityUrlEnabled,\r\n isTraditionalChinese = false,\r\n defaultLandingPageUrl = '',\r\n isForVNext = false,\r\n inlineSuggestionsEnabled = false,\r\n showLightbulb = false,\r\n scope = null,\r\n activityLogger,\r\n isImproveRSA = false,\r\n accountId = null,\r\n } = {}) {\r\n this.isForVNext = isForVNext;\r\n this.showInline = showInline;\r\n this.editMode = editMode;\r\n this.isNativeAdsEnabled = false; // TODO: enable when MT supports native ads for RSA\r\n this.isVanityUrlEnabled = isVanityUrlEnabled;\r\n this.isNativeAdsRebrandingEnabled = permissions.IsNativeAdsRebrandingEnabled;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n this.inlineSuggestionsEnabled = inlineSuggestionsEnabled;\r\n this.showLightbulb = showLightbulb;\r\n this.activityLogger = activityLogger;\r\n this.isImproveRSA = isImproveRSA;\r\n\r\n this.viewModel = new ViewModel({\r\n model,\r\n isNativeAdsEnabled: this.isNativeAdsEnabled,\r\n isVanityUrlEnabled,\r\n isTraditionalChinese,\r\n placeholders,\r\n defaultLandingPageUrl,\r\n IsExpandedTextAdV2Enabled,\r\n scope,\r\n activityLogger,\r\n });\r\n\r\n this.finalUrlEditor = new UrlEditor({\r\n url: _.first(_.result(this.model, 'FinalUrls')),\r\n ariaLabelledby: 'rsaFinalUrlLabel',\r\n ariaId: 'rsaFinalUrl',\r\n required: true,\r\n });\r\n this.mobileUrlEditor = new UrlEditor({\r\n url: _.first(_.result(this.model, 'MobileFinalUrls')),\r\n ariaLabelledby: 'rsaMobileUrlLabel',\r\n ariaId: 'rsaMobileUrl',\r\n });\r\n\r\n this.finalUrlEditor.on('urlChanged', (url) => {\r\n this.viewModel.FinalUrls(url ? [url] : []);\r\n });\r\n this.mobileUrlEditor.on('urlChanged', (url) => {\r\n this.viewModel.MobileFinalUrls(url ? [url] : []);\r\n });\r\n\r\n this.viewModel.FinalUrls.errors.subscribe((value) => {\r\n this.finalUrlEditor.hasErrors(!_.isEmpty(value));\r\n });\r\n\r\n this.viewModel.MobileFinalUrls.errors.subscribe((value) => {\r\n this.mobileUrlEditor.hasErrors(!_.isEmpty(value));\r\n });\r\n\r\n this.headlinesView = new HeadlinesView({ model: this.model ? this.model.Headlines : null, isForVNext, activityLogger, showLightbulb });\r\n this.descriptionsView = new DescriptionsView({ model: this.model ? this.model.Descriptions : null, isForVNext, activityLogger, showLightbulb });\r\n\r\n this.urlOptions = new UrlOptions({\r\n placeholderEnabled: true,\r\n showUurlTestTool: true,\r\n isForVNext,\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(_.result(this.model, 'UrlCustomParameters')) ? undefined : _.clone(this.model.UrlCustomParameters),\r\n activityLogger,\r\n });\r\n\r\n this.urlOptions.on('testUurl', (fn, originalView) => {\r\n this.trigger('testUurl', fn, originalView);\r\n });\r\n\r\n this.previewContainer = buildPreview(_.extend({}, this.viewModel, this.headlinesView.viewModel, this.descriptionsView.viewModel));\r\n this.adStrengthContainer = buildAdStrength(this.editMode && this.viewModel.model ? this.viewModel.model.Id : undefined,\r\n _.extend({}, this.viewModel, this.headlinesView.viewModel, this.descriptionsView.viewModel, {accountId}),\r\n isForVNext, inlineSuggestionsEnabled);\r\n\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .prefer-native-format': 'preferNativeAdFormat',\r\n };\r\n }\r\n\r\n render() {\r\n if (this.isImproveRSA === false) {\r\n this.$el.html(editorTemplate({\r\n i18n,\r\n uuid,\r\n isNativeAdsEnabled: this.isNativeAdsEnabled,\r\n isVanityUrlEnabled: this.isVanityUrlEnabled,\r\n isNativeAdsRebrandingEnabled: this.isNativeAdsRebrandingEnabled,\r\n nameAttrs,\r\n labels,\r\n placeholders: {},\r\n domainWatermark: placeholders.FinalUrls,\r\n }));\r\n } else {\r\n this.$el.html(editorHeadlineDescriptionOnlyTemplate({\r\n i18n,\r\n }));\r\n }\r\n\r\n // [TODO] delete this debug line\r\n window.rv = this.viewModel;\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.$('.final-url').empty().append(this.finalUrlEditor.render().el);\r\n this.$('.mobile-url').empty().append(this.mobileUrlEditor.render().el);\r\n this.$('.headlines-container').empty().append(this.headlinesView.render().el);\r\n this.$('.descriptions-container').empty().append(this.descriptionsView.render().el);\r\n this.$('.ext-ad-url-options').empty().append(this.urlOptions.render().el);\r\n\r\n this.$('.final-url input.url-field').attr('name', 'FinalUrls');\r\n this.$('.mobile-url input.url-field').attr('name', 'MobileFinalUrls');\r\n\r\n this.$('.preview-container').empty().append(this.previewContainer.render().el);\r\n this.previewContainer.selectedPanel(this.viewModel.initPreviewTab());\r\n\r\n this.$('.ad-strength-container').empty().append(this.adStrengthContainer.el);\r\n\r\n\r\n if (this.showLightbulb) {\r\n this.enableAIGenAssetContextualAttribute();\r\n }\r\n\r\n this.enableAdCustomizersHelpersForRSA();\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.urlOptions) {\r\n this.urlOptions.remove();\r\n }\r\n this.finalUrlEditor.remove();\r\n this.mobileUrlEditor.remove();\r\n this.headlinesView.remove();\r\n this.descriptionsView.remove();\r\n this.previewContainer.remove();\r\n this.adStrengthContainer.remove();\r\n super.remove();\r\n }\r\n\r\n preferNativeAdFormat() {\r\n this.previewContainer.selectedPanel(this.viewModel.showNativeAdPreview() ? 'native' : 'top');\r\n }\r\n\r\n validateViewModel() {\r\n const isValid = this.viewModel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.viewModel.fields, (field) => {\r\n if (!this.viewModel[field].isValid()) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field invalid: ${field}`, 'responsive search ad editor');\r\n }\r\n }\r\n });\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n return _.reduce([\r\n this.validateViewModel(),\r\n this.headlinesView.validate(),\r\n this.descriptionsView.validate(),\r\n _.isEmpty(this.viewModel.errorMessage()),\r\n this.urlOptions ? this.urlOptions.isValid() : true,\r\n ], (prev, next) => {\r\n return prev && next;\r\n }, true);\r\n }\r\n\r\n resetEditMode(mode) {\r\n this.editMode = mode;\r\n }\r\n\r\n toObject() {\r\n let params = _.omit(\r\n _.extend(this.viewModel.toObject(), this.urlOptions ? this.urlOptions.toObject() : {}),\r\n this.isVanityUrlEnabled ? [] : ['DisplayUrl'],\r\n );\r\n\r\n params.Headlines = this.headlinesView.toObject();\r\n params.Descriptions = this.descriptionsView.toObject();\r\n\r\n const api = this.showInline ? 'odata' : 'bulk';\r\n const arrayEmptyValue = api === 'odata' ? [] : null;\r\n const stringEmptyValue = api === 'odata' ? '' : null;\r\n\r\n //bulk API needs use 'delete_vlaue' to indicate deleting a value, in jsdata bulk adapter, we will replace null with 'delete_value' to remove value\r\n if (this.editMode) {\r\n const nullableArrayFields = [\r\n 'FinalUrls',\r\n 'MobileFinalUrls',\r\n 'UrlCustomParameters',\r\n ];\r\n\r\n const nullableStringFields = _.compact([\r\n 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix',\r\n 'Path1',\r\n 'Path2',\r\n ]);\r\n\r\n _.each(nullableArrayFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = arrayEmptyValue;\r\n }\r\n });\r\n\r\n _.each(nullableStringFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = stringEmptyValue;\r\n }\r\n });\r\n }\r\n\r\n return params;\r\n }\r\n\r\n // [TODO] need update\r\n handleApiErrors(errors) {\r\n const parsedErrors = _.reduce(errors, (memo, error) => {\r\n if (_.has(error, 'property') && isCampaignEditorialError(error)) {\r\n // This mapping is for editorial errors. Once editorial is on boarded, will remove following mapping. See bug 576573.\r\n error.property = fieldMapping[error.property] || error.property;\r\n return [...memo, error];\r\n }\r\n return [...memo, error];\r\n }, []);\r\n\r\n this.viewModel.errors.add(parsedErrors);\r\n this.headlinesView.viewModel.errors.add(parsedErrors);\r\n this.descriptionsView.viewModel.errors.add(parsedErrors);\r\n if (this.headlinesView.viewModel.errors().length === 0 || this.descriptionsView.viewModel.errors().length === 0) {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n }\r\n const errorFields = _.compact(['TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix']);\r\n let errorObject = _.object(errorFields, _.map(errorFields, (key) => {\r\n return this.viewModel[key].errors();\r\n }));\r\n\r\n this.urlOptions.handleApiErrors(errorObject);\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n this.urlOptions.clearApiErrors();\r\n }\r\n\r\n /**\r\n * Registers AI generated asset contextual attribute popup to listen for key/mouse events\r\n * @returns {undefined}\r\n */\r\n enableAIGenAssetContextualAttribute() {\r\n let self = this;\r\n\r\n _.each(_.range(15), (i) => {\r\n const element = self.$(`.iconba.iconba-Lightbulb.Headline${i}-AIGeneratedAsset`);\r\n\r\n attachAIGenAssetContextualAttribute(_.extend({\r\n element,\r\n i18n,\r\n isAIGeneratedAsset: !this.isImproveRSA,\r\n }));\r\n });\r\n\r\n _.each(_.range(4), (i) => {\r\n const element = self.$(`.iconba.iconba-Lightbulb.Description${i}-AIGeneratedAsset`);\r\n\r\n attachAIGenAssetContextualAttribute(_.extend({\r\n element,\r\n i18n,\r\n isAIGeneratedAsset: !this.isImproveRSA,\r\n }));\r\n });\r\n }\r\n\r\n /**\r\n * Registers ad customizers helpers to listen for key/mouse events on a number of form fields to pop themselves up when applicable\r\n * @returns {undefined}\r\n */\r\n enableAdCustomizersHelpersForRSA() {\r\n const customizableHeadlineFields = ['Headline0', 'Headline1', 'Headline2', 'Headline3', 'Headline4', 'Headline5', 'Headline6', 'Headline7', 'Headline8', 'Headline9', 'Headline10', 'Headline11', 'Headline12', 'Headline13', 'Headline14'];\r\n const customizableDescriptionFields = ['Description0', 'Description1', 'Description2', 'Description3'];\r\n const customizableFields = ['Path1', 'Path2'];\r\n\r\n enableAdCustomizersHelpers(this.headlinesView, customizableHeadlineFields, nameAttrs, 'ResponsiveSearchAd', this.$('> .ac-container'));\r\n enableAdCustomizersHelpers(this.descriptionsView, customizableDescriptionFields, nameAttrs, 'ResponsiveSearchAd', this.$('> .ac-container'));\r\n enableAdCustomizersHelpers(this, customizableFields, nameAttrs, 'ResponsiveSearchAd');\r\n }\r\n}\r\n","/* eslint-disable no-invalid-this */\r\n/* eslint-disable no-unused-vars */\r\n/* global _TL_ */\r\nimport Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport dataModelUtil from '@bingads-webui-campaign-legacy/adextension-image/util/dataModelConvert';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { isCampaignEditorialError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport { Repository } from '@bingads-webui-campaign-legacy/adextension-image/service/repository';\r\nimport { ResponsiveSearchAdEditor, formatRSAObject } from '@bingads-webui-campaign-react/responsive-search-ad-editor';\r\nimport { AdStrengthRepository } from '@bingads-webui-campaign-react/responsive-search-ad-suggestion';\r\nimport { ImageExtensionsPane } from '@bingads-webui-campaign-react/image-extensions-pane';\r\nimport { instrumentationScenarios } from '@bingads-webui-campaign/ad-creator-tools-instrumentation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { PreferenceService } from '@bingads-webui/preference-service';\r\nimport { getTabbableNodes } from '@bingads-webui-react/focus-lock';\r\n\r\n// [TODO] need update\r\nconst fieldMapping = {\r\n 'DisplayUrl': 'Path1',\r\n 'DestinationUrl': 'FinalUrls',\r\n};\r\n\r\nconst inlineErrorFields = [\r\n 'Headlines',\r\n 'Descriptions',\r\n 'FinalUrls',\r\n 'DisplayUrl',\r\n 'Path1',\r\n 'Path2',\r\n 'MobileFinalUrls',\r\n 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix',\r\n 'UrlCustomParameters',\r\n 'Headline0',\r\n 'Headline1',\r\n 'Headline2',\r\n 'Headline3',\r\n 'Headline4',\r\n 'Headline5',\r\n 'Headline6',\r\n 'Headline7',\r\n 'Headline8',\r\n 'Headline9',\r\n 'Headline10',\r\n 'Headline11',\r\n 'Headline12',\r\n 'Headline13',\r\n 'Headline14',\r\n 'Description0',\r\n 'Description1',\r\n 'Description2',\r\n 'Description3',\r\n];\r\n\r\nexport default class View extends Backbone.View {\r\n /**\r\n * Initialize ad editor to create ad.\r\n *\r\n * @param {Object} options - options with data to initialize the editor.\r\n *\r\n * @param {Object} options.model - Backbone.Model with the model information of an existing ad,\r\n * used get the data to edit existing ad.\r\n *\r\n * @param {function} options.scope - gets the scope, used to get the campaign and adgroup ids.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n initialize({\r\n scope,\r\n editMode = false,\r\n model = {},\r\n showInline = false,\r\n instrumentation,\r\n perfMarker,\r\n timeZone,\r\n permissions,\r\n serverContext,\r\n logActivity = _.noop,\r\n activityLogger,\r\n externalCachedImageExtensionChanges,\r\n onCachedImageExtensionChanged,\r\n showImgExtWithoutAdGroupID = false,\r\n preferenceService,\r\n }) {\r\n this.preferenceService = preferenceService;\r\n this.ad = { data: cloneDeep(model) || {} };\r\n this.editMode = editMode;\r\n this.showInitialErrors = !_.isEmpty(model);\r\n this.showInline = showInline;\r\n this.cachedAd = {};\r\n this.apiErrors = [];\r\n this.viewModel = {\r\n errors: () => this.apiErrors,\r\n };\r\n this.showImgExtWithoutAdGroupID = !!permissions.dynamic.RSAImageExtInAdGroupCreation && showImgExtWithoutAdGroupID;\r\n this.adStrengthRepository = new AdStrengthRepository({ edm, jsdata });\r\n\r\n this.instrumentation = instrumentation;\r\n this.onCachedImageExtensionChanged = onCachedImageExtensionChanged;\r\n\r\n if (perfMarker) {\r\n this.perfMarker = perfMarker.createChild('ResponsiveSearchAdEditor', { autoEnd: true });\r\n }\r\n\r\n this.timeZone = timeZone;\r\n this.permissions = permissions;\r\n this.logActivity = logActivity;\r\n this.scope = scope;\r\n this.returnSuggestionIds = [];\r\n this.applySuggestionIds = [];\r\n this.viewSuggestionIds = [];\r\n this.logAppliedSuggestionsFunc = _.noop;\r\n this.assetLibraryEventHandler = {};\r\n this.clickViewIdeas = [];\r\n this.serverContext = serverContext;\r\n this.extensionsSharedRepos = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n afterChangeComitted: _.noop,\r\n });\r\n this.scope.subscribe(() => {\r\n if (this.scope().adGroupId != null) {\r\n this.render();\r\n }\r\n }, this);\r\n this.activityLogger = activityLogger;\r\n\r\n this.enableRSAExpansion =\r\n !!permissions.dynamic.RSAImageExtInAdGroupCreation ||\r\n !!permissions.dynamic.RSAImageExtInCampaignCreation ||\r\n this.showInline;\r\n\r\n this.cid = config.get('CurrentAccount') ? config.get('CurrentAccount').AdvertiserCustomerID : config.get('advertiserCustomerID');\r\n this.aid = _.result(config.get('CurrentAccount'), 'Id');\r\n this.adContext = {\r\n advertiserCustomerId: this.cid,\r\n accountId: this.aid,\r\n };\r\n\r\n if (this.enableRSAExpansion) {\r\n this.imageExtRepository = new Repository({\r\n schema: window.globalLegacySchema.get('ImageAdExtension'),\r\n afterChangeComitted: () => {\r\n summaryDataContextManager.updateContext(['AdGroupAdExtensionsGrid']);\r\n },\r\n });\r\n this.imageExtRepository.association.createRequestFactory('adgroup');\r\n // AddImage component is using both new i18n and old i18n resource data, so need to merge.\r\n this.legacyI18n = mergeI18n(\r\n window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/audience-campaign'),\r\n this.options.newI18n,\r\n );\r\n\r\n this.theme = config.get('theme');\r\n\r\n this.oDataConfig = {\r\n odataRootUrl: config.get('CampaignAzureDomain'),\r\n odataPath: config.get('odata.url') + config.get('odata.path'),\r\n odataToken: config.get('odata.token'),\r\n };\r\n\r\n this.cachedImageExtensionChanges = externalCachedImageExtensionChanges ? externalCachedImageExtensionChanges : {\r\n current: [],\r\n added: [],\r\n removed: [],\r\n updated: [],\r\n };\r\n\r\n this.maxImageExtensionsPerAdGroup = config.get('Feature').AdExtension.MaxSelectedImagesPerAdGroupOrCampaignForV2;\r\n this.dateFormat = _.get(pageContext, ['CurrentUser', 'CultureDateTimeFormat', 'ShortDatePattern']);\r\n this.timeZone = _.get(pageContext, ['CurrentAccount', 'TimeZone']);\r\n }\r\n }\r\n\r\n updateSuggestionMeasurement({\r\n returnSuggestionIds,\r\n applySuggestionIds,\r\n viewSuggestionIds,\r\n clickViewIdeas,\r\n }) {\r\n if (returnSuggestionIds && returnSuggestionIds.length > 0) {\r\n this.returnSuggestionIds = _.uniq(this.returnSuggestionIds.concat(returnSuggestionIds));\r\n }\r\n if (applySuggestionIds && applySuggestionIds.length > 0) {\r\n this.applySuggestionIds = _.uniq(this.applySuggestionIds.concat(applySuggestionIds));\r\n }\r\n if (viewSuggestionIds && viewSuggestionIds.length > 0) {\r\n this.viewSuggestionIds = _.uniq(this.viewSuggestionIds.concat(viewSuggestionIds));\r\n }\r\n if (clickViewIdeas && clickViewIdeas.length > 0) {\r\n this.clickViewIdeas = _.uniq(this.clickViewIdeas.concat(clickViewIdeas));\r\n }\r\n }\r\n\r\n saveLogAppliedSuggestionsFunc(func) {\r\n this.logAppliedSuggestionsFunc = func;\r\n }\r\n\r\n saveAssetLibraryEventHandler(eventHandler) {\r\n this.assetLibraryEventHandler = eventHandler;\r\n }\r\n\r\n fetchAdStrengthV2(ad, campaignId, adGroupId) {\r\n return this.adStrengthRepository.fetchAdStrengthV2(ad, campaignId, adGroupId);\r\n }\r\n\r\n fetchDisclaimerInfo() {\r\n if (this.scope().campaignId != null && this.scope().adGroupId !== null && this.permissions.IsDisclaimerForRSAEnabled) {\r\n let params = {\r\n queryParameters: {\r\n entitySet: edm.currentAccount.Campaigns,\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n return jsdata.Campaign.find(this.scope().campaignId, params)\r\n .then((data) => {\r\n const hasDisclaimer = _.result(_.find(data.CampaignSettings, (setting) => {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n }), 'DisclaimerAdsEnabled');\r\n\r\n if (hasDisclaimer) {\r\n const scope = Object.create({\r\n campaignId: this.scope().campaignId,\r\n });\r\n\r\n return this.extensionsSharedRepos.association.findAll({\r\n where: scope,\r\n }).then((disclaimerdata) => {\r\n if (disclaimerdata && disclaimerdata.length > 0) {\r\n return {\r\n hasDisclaimer: true,\r\n disclaimerData: disclaimerdata[0],\r\n };\r\n }\r\n return { hasDisclaimer: false };\r\n });\r\n }\r\n return { hasDisclaimer: false };\r\n });\r\n // TODO : catch and finally\r\n }\r\n return Promise.resolve({ hasDisclaimer: false });\r\n }\r\n\r\n focusErrorFocusableElement(targetError) {\r\n const panel = targetError.closest('.collapse-panel');\r\n\r\n if (!panel) {\r\n return;\r\n }\r\n\r\n const focusableElements = getTabbableNodes(panel);\r\n\r\n if (focusableElements && focusableElements.length > 0) {\r\n focusableElements[0].focus();\r\n }\r\n }\r\n\r\n validate() {\r\n this.showInitialErrors = true;\r\n if (!_.isEmpty(this.cachedAd.data) && !this.cachedAd.incomplete && _.filter(this.cachedAd.errorFields, (errorField) => _.includes(inlineErrorFields, errorField)).length === 0) {\r\n return true;\r\n }\r\n\r\n // this.render({ onFirstErrorHandler: this.focusErrorFocusableElement });\r\n this.render();\r\n\r\n this.logActivity(JSON.stringify(this.cachedAd.errors), 'responsive search ad editor');\r\n return false;\r\n }\r\n\r\n resetEditMode(mode) {\r\n this.editMode = mode;\r\n this.showInitialErrors = this.editMode;\r\n }\r\n\r\n toObject() {\r\n const params = _.omit(formatRSAObject(this.cachedAd.data), this.permissions.IsVanityUrlEnabled ? [] : ['DisplayUrl']);\r\n const api = this.showInline ? 'odata' : 'bulk';\r\n const arrayEmptyValue = api === 'odata' ? [] : null;\r\n const stringEmptyValue = api === 'odata' ? '' : null;\r\n\r\n // bulk API needs use 'delete_vlaue' to indicate deleting a value, in jsdata bulk adapter, we will replace null with 'delete_value' to remove value\r\n if (this.editMode) {\r\n const nullableArrayFields = [\r\n 'FinalUrls',\r\n 'MobileFinalUrls',\r\n 'UrlCustomParameters',\r\n ];\r\n\r\n const nullableStringFields = _.compact([\r\n 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix',\r\n 'Path1',\r\n 'Path2',\r\n ]);\r\n\r\n _.each(nullableArrayFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = arrayEmptyValue;\r\n }\r\n });\r\n\r\n _.each(nullableStringFields, (prop) => {\r\n if (_.isEmpty(params[prop])) {\r\n params[prop] = stringEmptyValue;\r\n }\r\n });\r\n }\r\n\r\n return params;\r\n }\r\n\r\n // [TODO] need update\r\n handleApiErrors(errors) {\r\n const parsedErrors = _.map(errors, (error) => {\r\n if (_.has(error, 'property') && isCampaignEditorialError(error)) {\r\n // This mapping is for editorial errors. Once editorial is on boarded, will remove following mapping. See bug 576573.\r\n error.property = fieldMapping[error.property] || error.property;\r\n }\r\n return _.extend(error, {\r\n Property: error.property,\r\n Message: error.message,\r\n Code: error.code,\r\n });\r\n });\r\n\r\n this.apiErrors.push(...parsedErrors);\r\n this.render();\r\n }\r\n\r\n clearApiErrors() {\r\n this.apiErrors = [];\r\n }\r\n\r\n onChanged(ad) {\r\n this.cachedAd = ad;\r\n }\r\n\r\n triggerTestUurl() {\r\n return (fn, originalView) => this.trigger('testUurl', fn, originalView);\r\n }\r\n\r\n // Forcing the view to re-render with isSaving set to true and then false\r\n triggerSaving() {\r\n this.isSaving = true;\r\n this.render();\r\n this.isSaving = false;\r\n this.render();\r\n }\r\n\r\n triggerCanceling() {\r\n this.isCanceling = true;\r\n this.render();\r\n this.isCanceling = false;\r\n this.render();\r\n }\r\n\r\n /**\r\n * Render the view.\r\n * @return {View} This object.\r\n */\r\n render({ onFirstErrorHandler } = { onFirstErrorHandler: _.noop}) {\r\n // campaign id, ad group id will be changed when using campaign/adgroup selector\r\n this.adContext = {\r\n ...this.adContext,\r\n adGroupId: this.scope().adGroupId,\r\n campaignId: this.scope().campaignId,\r\n };\r\n\r\n ReactDOM.render(\r\n // eslint-disable-next-line no-extra-parens\r\n (\r\n \r\n \r\n \r\n \r\n {\r\n this.setPreviewImageCallback = cb;\r\n }}\r\n activityLogger={this.activityLogger}\r\n perfMarker={this.perfMarker}\r\n scope={this.scope()}\r\n serverContext={this.serverContext}\r\n editMode={this.editMode}\r\n isSaving={this.isSaving}\r\n isCanceling={this.isCanceling}\r\n onFirstErrorHandler={onFirstErrorHandler}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n ),\r\n this.el,\r\n );\r\n\r\n return this;\r\n }\r\n\r\n onPreviewImageChanged = (imageUrl) => {\r\n if (this.setPreviewImageCallback) {\r\n this.setPreviewImageCallback(imageUrl);\r\n }\r\n };\r\n\r\n onImageExtensionChanged = (changes) => {\r\n if (this.showImgExtWithoutAdGroupID && this.onCachedImageExtensionChanged) {\r\n this.onCachedImageExtensionChanged(changes);\r\n }\r\n this.cachedImageExtensionChanges = changes;\r\n };\r\n\r\n logImageExtensionUpdates({\r\n scope = {},\r\n adId,\r\n currentItems,\r\n createdExtModels,\r\n removedExtModels,\r\n updatedExtModels,\r\n }) {\r\n const createdImageExtensionsIds = _.pluck(createdExtModels, 'Id');\r\n const removedImageExtensionsIds = _.pluck(removedExtModels, 'Id');\r\n const updatedImageExtensionsIds = _.filter(updatedExtModels, (ext) => ext.Id);\r\n let msgsArr = [\r\n `SavedAdId:${adId}`,\r\n `AdGroupId:${scope.adGroupId}`,\r\n ];\r\n\r\n let hasDisabledImages = false;\r\n const usedImagesSources = {};\r\n let previousExistingImgExtsCount = 0;\r\n\r\n for (let i = 0; i < _.size(currentItems); i += 1) {\r\n const item = currentItems[i];\r\n\r\n if (item.Id) {\r\n previousExistingImgExtsCount += 1;\r\n } else if (item.disabled) {\r\n hasDisabledImages = true;\r\n } else {\r\n usedImagesSources[item.source] = true;\r\n }\r\n }\r\n\r\n msgsArr.push(\r\n ...[\r\n `ExistingImgExtsCount:${previousExistingImgExtsCount + _.size(removedImageExtensionsIds)}`,\r\n `CreatedImgExtsIds:${createdImageExtensionsIds.join('-')}`,\r\n `RemovedImgExtsIds:${removedImageExtensionsIds.join('-')}`,\r\n `UpdatedImgExtsIds:${updatedImageExtensionsIds.join('-')}`,\r\n ],\r\n );\r\n\r\n _.each(usedImagesSources, (val, key) => {\r\n msgsArr.push(`UsedImageFrom${key}`);\r\n });\r\n\r\n msgsArr = _.compact(msgsArr.concat([\r\n hasDisabledImages && 'UsedImageFromDisabled',\r\n ]));\r\n\r\n this.logActivity(`${msgsArr.join(';')};`);\r\n }\r\n\r\n saveImageExtensionsToServer({ adId, perfMarker }) {\r\n const { newI18n } = this.options;\r\n\r\n this.logActivity('Check image extensions');\r\n\r\n const defaultParams = {\r\n where: {\r\n adGroupId: this.scope().adGroupId,\r\n adGroupName: this.scope().adGroupName,\r\n campaignId: this.scope().campaignId,\r\n campaignName: this.scope().campaignName,\r\n },\r\n };\r\n\r\n if (_.isEmpty(this.cachedImageExtensionChanges.added) &&\r\n _.isEmpty(this.cachedImageExtensionChanges.removed) && _.isEmpty(this.cachedImageExtensionChanges.updated)) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n const saveImgsExtPerfMarker = perfMarker.createChild('Process_ImageExtensions_Success');\r\n\r\n saveImgsExtPerfMarker.willInit();\r\n\r\n const createImageExtensionsPromise = _.map(this.cachedImageExtensionChanges.added, (ext) => {\r\n return this.imageExtRepository.extension.create(ext);\r\n });\r\n\r\n return Promise.all(createImageExtensionsPromise)\r\n .then((newExtensions) => {\r\n const newExtIds = _.pluck(newExtensions, 'Id');\r\n\r\n _.each(this.cachedImageExtensionChanges.added, (item, index) => {\r\n item.Id = newExtIds[index];\r\n });\r\n\r\n let deletePromise = Promise.resolve(true);\r\n\r\n if (!_.isEmpty(this.cachedImageExtensionChanges.removed)) {\r\n deletePromise =\r\n this.imageExtRepository.association.destroyAll({\r\n where: {\r\n id: { in: _.pluck(this.cachedImageExtensionChanges.removed, 'Id') },\r\n ...defaultParams.where,\r\n },\r\n });\r\n }\r\n\r\n return deletePromise\r\n .then(() => {\r\n const params = {\r\n where: {\r\n id: { in: newExtIds },\r\n ...defaultParams.where,\r\n },\r\n };\r\n const updatePromise = _.map(this.cachedImageExtensionChanges.updated, (ext) => {\r\n return this.imageExtRepository.extension.update(ext);\r\n });\r\n\r\n return Promise.all(updatePromise).then(() => {\r\n return this.imageExtRepository.association.updateAll(null, params);\r\n });\r\n });\r\n })\r\n .then(() => {\r\n this.logActivity('Updated image extension successfully');\r\n saveImgsExtPerfMarker.done();\r\n })\r\n .catch((err) => {\r\n // do nothing, so that this is non-blocking\r\n this.logActivity(`Updated image extension with failures, err: ${JSON.stringify(err)}`);\r\n\r\n const pageName = `${newI18n.getString(_TL_('Ads & extensions'))}`;\r\n\r\n notificationApi.showWarning(newI18n.getString(\r\n _TL_('There were errors when processing your image extension updates. To ensure that all changes are up to date or to manually create a new image extension, review your image extensions in the {{page}} page.'),\r\n {\r\n page: pageName,\r\n }));\r\n })\r\n .finally(() => {\r\n this.logImageExtensionUpdates({\r\n adId,\r\n currentItems: this.cachedImageExtensionChanges.current,\r\n createdExtModels: this.cachedImageExtensionChanges.added,\r\n removedExtModels: this.cachedImageExtensionChanges.removed,\r\n updatedExtModels: this.cachedImageExtensionChanges.updated,\r\n scope: defaultParams.where,\r\n });\r\n });\r\n }\r\n\r\n renderImageExtension(extraInfo) {\r\n if (this.adContext.adGroupId || this.showImgExtWithoutAdGroupID) {\r\n const imagePathFromConfig = config.get('imagePath');\r\n\r\n return this.enableRSAExpansion && ;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","/* eslint-disable no-unused-vars */\r\n/* global _TL_ */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { AdEditor } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { getVerifiedTrackingSettings } from '@bingads-webui-campaign-react/xandr-display-ads-campaign-shared-components';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { newVideoFromGridObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { isXandrServing } from '@bingads-webui-campaign-react/constants';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n scope,\r\n editMode = false,\r\n model = {},\r\n showInline = false,\r\n instrumentation,\r\n perfMarker,\r\n timeZone,\r\n permissions,\r\n logActivity = _.noop,\r\n activityLogger,\r\n campaignId,\r\n adGroupId,\r\n serverContext,\r\n preferenceService,\r\n biddingStrategyType = '', // bidding scheme from the page when users select the exact campaign or adgroup\r\n triggerCancel,\r\n triggerClose,\r\n handleSave,\r\n isMultiAdFormatAd,\r\n loadClipchampPlayer,\r\n }) {\r\n this.scope = scope;\r\n this.editMode = editMode;\r\n this.showInline = showInline;\r\n this.perfMarker = perfMarker;\r\n this.instrumentation = instrumentation;\r\n this.model = model;\r\n this.apiErrors = [];\r\n this.campaignId = campaignId || this.scope().campaignId;\r\n this.adGroupId = adGroupId || this.scope().adGroupId;\r\n this.activityLogger = activityLogger;\r\n this.resetFields = false;\r\n this.permissions = permissions;\r\n this.serverErrors = null;\r\n this.serverContext = serverContext;\r\n this.allowedVideoTypes = ['VideoMedia16X9'];\r\n this.preferenceService = preferenceService;\r\n this.savedAdVideo = (model && model.Videos && this.getVideoAdModel(model.Videos)) || null;\r\n this.verifiedTrackingSetting = this.editMode ? getVerifiedTrackingSettings(model) : {};\r\n this.triggerCancel = triggerCancel;\r\n this.triggerClose = triggerClose;\r\n this.handleSave = handleSave;\r\n this.scenario = 'Edit-VideoAds';\r\n this.biddingScheme = this.getBiddingScheme({ model, editMode, directBiddingStrategyType: biddingStrategyType });\r\n this.campaignSettings = this.getCampaignSettings({ model, editMode });\r\n this.campaignSubType = this.getCampaignSubType({ model, editMode });\r\n this.isXandrServingCampaign = isXandrServing(\r\n this.campaignSubType,\r\n this.campaignSettings);\r\n this.savedAdModel = {\r\n isValid: true,\r\n isDirty: false,\r\n data: [{\r\n isDirty: false,\r\n isValid: true,\r\n data: {\r\n FinalUrls: this.editMode ? model && model.FinalUrls : [],\r\n TrackingUrlTemplate: this.editMode ? model && model.TrackingUrlTemplate : '',\r\n FinalUrlSuffix: this.editMode ? model && model.FinalUrlSuffix : '',\r\n UrlCustomParameters: this.editMode ? model && model.UrlCustomParameters : {},\r\n ImpressionTrackingUrls: this.editMode ? model && model.ImpressionTrackingUrls : [],\r\n video: this.editMode ? newVideoFromGridObject(this.savedAdVideo) : null,\r\n ...this.verifiedTrackingSetting,\r\n },\r\n uid: Math.random(),\r\n Id: this.editMode ? model.Id : null,\r\n }],\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.isMultiAdFormatAd = isMultiAdFormatAd;\r\n this.loadClipchampPlayer = loadClipchampPlayer;\r\n\r\n this.scenario = 'Edit-BrandAwarnessVideoAds'// eslint-disable-line\r\n\r\n this.updatedAdModel = this.savedAdModel;\r\n\r\n this.oDataConfig = {\r\n odataRootUrl: config.get('CampaignAzureDomain'),\r\n odataPath: config.get('odata.url') + config.get('odata.path'),\r\n odataToken: config.get('odata.token'),\r\n oDataToken: config.get('odata.token'),\r\n oDataPath: config.get('odata.url') + config.get('odata.path'),\r\n };\r\n\r\n this.theme = config.get('theme');\r\n this.aid = _.result(config.get('CurrentAccount'), 'Id');\r\n this.cid = _.result(config.get('CurrentCustomer'), 'Id');\r\n }\r\n\r\n getBiddingScheme({ model, editMode, directBiddingStrategyType = '' }) {\r\n if (editMode) {\r\n return _.get(model, 'BiddingScheme');\r\n }\r\n\r\n // ad panel is from ad page with exact campaign or campaign with adgroup\r\n if (!_.isEmpty(directBiddingStrategyType)) {\r\n return { Type: directBiddingStrategyType };\r\n }\r\n\r\n const biddingStrategyType = _.get(this.scope(), 'biddingStrategyType');\r\n\r\n return _.isString(biddingStrategyType) && !_.isEmpty(biddingStrategyType) ? { Type: biddingStrategyType } : {};\r\n }\r\n\r\n getCampaignSubType({ model, editMode }) {\r\n if (editMode) {\r\n return _.get(model, ['Campaign', 'CampaignSubType'], '');\r\n }\r\n\r\n const campaignSubType = _.get(this.scope(), 'campaignSubType');\r\n\r\n if (_.isEmpty(campaignSubType)) {\r\n return '';\r\n }\r\n\r\n return campaignSubType;\r\n }\r\n\r\n getCampaignSettings({ model, editMode }) {\r\n if (editMode) {\r\n return _.get(model, ['Campaign', 'CampaignSettings'], []);\r\n }\r\n\r\n const campaignSettings = _.get(this.scope(), 'campaignSettings');\r\n\r\n if (_.isEmpty(campaignSettings)) {\r\n return [];\r\n }\r\n\r\n return campaignSettings;\r\n }\r\n\r\n getVideoAdModel(videos) {\r\n if (!videos) {\r\n return null;\r\n }\r\n\r\n const parsedVideos = _.filter(videos, (video) => {\r\n return this.allowedVideoTypes.includes(video.Asset.SubType);\r\n });\r\n\r\n return parsedVideos.length > 0 ? parsedVideos[0].Asset : null;\r\n }\r\n\r\n onAdsValidation(result) {\r\n this.savedAdModel = { ...result };\r\n this.render();\r\n }\r\n\r\n validate() {\r\n return this.savedAdModel.isValid;\r\n }\r\n\r\n toObject() {\r\n const params = { Videos: this.savedAdModel.data[0].data.video, FinalUrls: this.savedAdModel.data[0].data.FinalUrls };\r\n\r\n return params;\r\n }\r\n\r\n clearApiErrors() {\r\n this.apiErrors = [];\r\n }\r\n\r\n clearFields() {\r\n this.editMode = false;\r\n this.model = {};\r\n this.resetFields = !this.resetFields;\r\n this.savedAdModel = {\r\n isValid: true,\r\n isDirty: false,\r\n data: [{\r\n isDirty: false,\r\n isValid: true,\r\n data: {\r\n FinalUrls: [],\r\n video: null,\r\n },\r\n Id: null,\r\n }],\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.render();\r\n }\r\n\r\n onSave(result) {\r\n this.triggerClose();\r\n return this.handleSave(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n }\r\n\r\n onSaveAndCreateAnother(result) {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n this.clearFields();\r\n\r\n this.render();\r\n return this.handleSave(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n\r\n cancel() {\r\n this.triggerCancel();\r\n this.triggerClose();\r\n }\r\n\r\n render() {\r\n const scenarioName = 'XandrVideoAdsAdEditing';\r\n const activityName = 'Ad';\r\n\r\n ReactDOM.render(\r\n // eslint-disable-next-line no-extra-parens\r\n (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n this.el,\r\n );\r\n\r\n return this;\r\n\r\n }\r\n}\r\n","/* global _TL_ */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { saveAds } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { AdEditor, imagePlacementsToImage, getVerifiedTrackingSettings } from '@bingads-webui-campaign-react/xandr-display-ads-campaign-shared-components';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ImageRepository } from '@bingads-webui-campaign-react/image-experience';\r\nimport { constants, newImageFromMTObject } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { getAutoCroppedImages } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n scope,\r\n editMode = false,\r\n model = {},\r\n showInline = false,\r\n instrumentation,\r\n perfMarker,\r\n permissions,\r\n activityLogger,\r\n campaignId,\r\n adGroupId,\r\n serverContext,\r\n preferenceService,\r\n }) {\r\n this.aid = _.get(serverContext, ['CurrentAccount', 'Id']);\r\n this.cid = _.get(serverContext, ['CurrentCustomer', 'Id']);\r\n this.advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n this.scope = scope;\r\n this.editMode = editMode;\r\n this.showInline = showInline;\r\n this.perfMarker = perfMarker;\r\n this.instrumentation = instrumentation;\r\n this.model = model;\r\n this.apiErrors = [];\r\n this.campaignId = campaignId || this.scope().campaignId;\r\n this.adGroupId = adGroupId || this.scope().adGroupId;\r\n this.activityLogger = activityLogger;\r\n this.resetFields = false;\r\n this.permissions = permissions;\r\n this.serverErrors = null;\r\n this.serverContext = serverContext;\r\n this.preferenceService = preferenceService;\r\n this.verifiedTrackingSetting = this.editMode ? getVerifiedTrackingSettings(model) : {};\r\n this.savedAdModel = {\r\n isValid: true,\r\n isDirty: false,\r\n data: [{\r\n isDirty: false,\r\n isValid: true,\r\n data: {\r\n TrackingUrlTemplate: model && model.TrackingUrlTemplate,\r\n FinalUrlSuffix: model && model.FinalUrlSuffix,\r\n UrlCustomParameters: model && model.UrlCustomParameters,\r\n ImpressionTrackingUrls: this.editMode ? model && model.ImpressionTrackingUrls : [],\r\n FinalUrls: this.editMode ? model && model.FinalUrls : [],\r\n image: null,\r\n ...this.verifiedTrackingSetting,\r\n },\r\n uid: Math.random(),\r\n Id: this.editMode ? model.Id : null,\r\n }],\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.scenario = 'Edit-DisplayAds';\r\n\r\n this.oDataConfig = {\r\n odataRootUrl: config.get('CampaignAzureDomain'),\r\n odataPath: config.get('odata.url') + config.get('odata.path'),\r\n odataToken: config.get('odata.token'),\r\n oDataToken: config.get('odata.token'),\r\n oDataPath: config.get('odata.url') + config.get('odata.path'),\r\n };\r\n\r\n this.imageRepository = new ImageRepository(this.advertiserCustomerId, this.aid, this.oDataConfig);\r\n if (model && model.Images && model.Images.length > 0) {\r\n const imageAsset = model.Images[0].Asset;\r\n\r\n this.isLoading = true;\r\n\r\n this.imagePromise = this.imageRepository.getImageByIdAsync(imageAsset.IdString)\r\n .then((imgObjMT) => {\r\n const imageObject = newImageFromMTObject(imgObjMT, constants.imageSources.Existing);\r\n const croppedImagePlacements = getAutoCroppedImages({\r\n originalImageToCrop: imageObject,\r\n isMultimediaAd: false,\r\n isMultimediaAdinMSANEnabled: false,\r\n imageOption: constants.defaultImageOption,\r\n aspectRatioOption: constants.defaultAspectRatioOption,\r\n isDisplayAds: true,\r\n });\r\n const imageData = imagePlacementsToImage({crops: croppedImagePlacements,\r\n selected: {\r\n TargetWidth: imageAsset.TargetWidth,\r\n TargetHeight: imageAsset.TargetHeight,\r\n CropWidth: imageAsset.CropWidth,\r\n CropHeight: imageAsset.CropHeight,\r\n CropX: imageAsset.CropX,\r\n CropY: imageAsset.CropY,\r\n }});\r\n\r\n this.savedAdModel.data[0].data = {...this.savedAdModel.data[0].data, ...imageData.data};\r\n this.isLoading = false;\r\n this.render();\r\n });\r\n }\r\n }\r\n\r\n onAdsValidation(result) {\r\n this.savedAdModel = { ...result };\r\n this.render();\r\n }\r\n\r\n validate() {\r\n return this.savedAdModel.isValid;\r\n }\r\n\r\n toObject() {\r\n const params = { Images: this.savedAdModel.data[0].data.image, FinalUrls: this.savedAdModel.data[0].data.FinalUrls };\r\n\r\n return params;\r\n }\r\n\r\n clearApiErrors() {\r\n this.apiErrors = [];\r\n }\r\n\r\n saveAdAsync(updateGrid) {\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return saveAds({\r\n ads: this.savedAdModel,\r\n campaign: { Id: this.campaignId },\r\n adGroup: { Id: this.adGroupId },\r\n activity: this.activityLogger,\r\n }, { scenario: this.scenario, i18n: this.options.newI18n, activityLogger: this.activityLogger }).then((result) => {\r\n if (result && result.ads && result.ads.data) {\r\n return updateGrid(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n }\r\n return result.ads.data[0];\r\n }).catch((result) => {\r\n this.serverErrors = result.serverErrors;\r\n this.render();\r\n });\r\n }\r\n\r\n clearFields() {\r\n this.editMode = false;\r\n this.model = {};\r\n this.resetFields = !this.resetFields;\r\n this.savedAdModel = {\r\n isValid: true,\r\n isDirty: false,\r\n data: [{\r\n isDirty: false,\r\n isValid: true,\r\n data: {\r\n FinalUrls: [],\r\n image: null,\r\n },\r\n Id: null,\r\n }],\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.render();\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n\r\n saveAndCreateAnotherAsync(updateGrid) {\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return saveAds({\r\n ads: this.savedAdModel,\r\n campaign: { Id: this.campaignId },\r\n adGroup: { Id: this.adGroupId },\r\n }, { scenario: this.scenario, i18n: this.options.newI18n, activityLogger: this.activityLogger })\r\n .then((result) => {\r\n if (result && result.ads && result.ads.data) {\r\n this.clearFields();\r\n this.render();\r\n return updateGrid(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n }\r\n return result.ads.data[0];\r\n }).catch((result) => {\r\n this.serverErrors = result.serverErrors;\r\n this.render();\r\n });\r\n }\r\n\r\n render() {\r\n const scenarioName = 'XandrDisplayAdsAdEditing';\r\n const activityName = 'Ad';\r\n\r\n ReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { this.isLoading ?\r\n
:\r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ,\r\n this.el,\r\n );\r\n\r\n return this;\r\n\r\n }\r\n}\r\n","/* global _TL_ */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { EditDisplayAdWizard, getVerifiedTrackingSettings } from '@bingads-webui-campaign-react/xandr-display-ads-campaign-shared-components';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n scope,\r\n editMode = false,\r\n model = {},\r\n showInline = false,\r\n instrumentation,\r\n perfMarker,\r\n permissions,\r\n activityLogger,\r\n campaignId,\r\n adGroupId,\r\n serverContext,\r\n preferenceService,\r\n triggerCancel,\r\n triggerClose,\r\n handleSave,\r\n isMultiAdFormatAd,\r\n }) {\r\n this.aid = _.get(serverContext, ['CurrentAccount', 'Id']);\r\n this.cid = _.get(serverContext, ['CurrentCustomer', 'Id']);\r\n this.advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n this.scope = scope;\r\n this.editMode = editMode;\r\n this.showInline = showInline;\r\n this.perfMarker = perfMarker;\r\n this.instrumentation = instrumentation;\r\n this.model = model;\r\n this.apiErrors = [];\r\n this.campaignId = campaignId;\r\n this.adGroupId = adGroupId;\r\n this.activityLogger = activityLogger;\r\n this.resetFields = false;\r\n this.permissions = permissions;\r\n this.serverErrors = null;\r\n this.serverContext = serverContext;\r\n this.preferenceService = preferenceService;\r\n this.verifiedTrackingSetting = this.editMode ? getVerifiedTrackingSettings(model) : {};\r\n this.triggerCancel = triggerCancel;\r\n this.triggerClose = triggerClose;\r\n this.handleSave = handleSave;\r\n this.scenario = 'Edit-DisplayAds';\r\n this.isMultiAdFormatAd = isMultiAdFormatAd;\r\n\r\n this.parentRemove = super.remove;\r\n\r\n this.render();\r\n }\r\n\r\n onSave(result) {\r\n return this.handleSave(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n }\r\n\r\n onSaveAndCreateAnother(result) {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n this.model = null;\r\n\r\n this.render();\r\n return this.handleSave(result.ads.data[0], result.ads.data[0].Id, 'Responsive');\r\n\r\n }\r\n\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n\r\n cancel() {\r\n this.triggerCancel();\r\n this.triggerClose();\r\n }\r\n\r\n render() {\r\n const scenarioName = 'XandrDisplayAdsAdEditing';\r\n const activityName = 'Ad';\r\n\r\n ReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n this.el,\r\n );\r\n\r\n return this;\r\n\r\n }\r\n}\r\n","import React, { useMemo, useCallback, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { DisplayPlusNativeAds } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\n\r\nconst DisplayPlusNativeFormInternal = (props) => {\r\n const {\r\n data,\r\n onDataChange,\r\n perfMarker,\r\n biddingScheme,\r\n instrumentation,\r\n scope,\r\n isSaving,\r\n isCanceling,\r\n errors,\r\n setAds,\r\n supportImageFitting,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n\r\n const didServerReturnErrors = useMemo(() => errors && _.isArray(errors) && errors.length > 0, [errors]);\r\n\r\n const onValidate = useCallback((result) => {\r\n const dataPatch = {\r\n ...data,\r\n ...result.data,\r\n isValid: result.isValid,\r\n };\r\n\r\n onDataChange(dataPatch);\r\n setAds(dataPatch);\r\n }, [data, onDataChange, setAds, data]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const DisplayPlusNativeForm = withRecommendationContext(DisplayPlusNativeFormInternal);\r\n","import React, { useState, useEffect} from 'react';\r\nimport _ from 'underscore';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { convertFromAdModel, getMultiImagesFromMTAssetsAsync } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport { DisplayPlusNativeForm } from './display-plus-native-form';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nconst getCampaignBiddingScheme = (cid, aid, campaignId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .get({\r\n select: ['BiddingScheme'],\r\n })\r\n .toPromise();\r\n\r\nconst modelToViewModel = (ad, campaignId, adGroupId) => {\r\n const Id = _.get(ad, ['Id'], '');\r\n\r\n const Campaign = {\r\n Id: campaignId,\r\n };\r\n\r\n const AdGroup = {\r\n Id: adGroupId,\r\n };\r\n\r\n return {\r\n ...convertFromAdModel(ad, false),\r\n Campaign,\r\n AdGroup,\r\n Id: Id.toString(),\r\n };\r\n};\r\n\r\nexport const DisplayPlusNative = (props) => {\r\n const {\r\n data: mtData,\r\n isCleaning,\r\n onCleaningComplete,\r\n campaignId,\r\n adGroupId,\r\n cid,\r\n aid,\r\n permissions,\r\n supportImageFitting,\r\n } = props;\r\n\r\n\r\n const [data, setData] = useState(mtData && mtData.Id ? modelToViewModel(mtData, campaignId, adGroupId) : mtData);\r\n const [biddingScheme, setBiddingScheme] = useState(null);\r\n\r\n const isBoostCampaign = permissions.dynamic.DisplayPlusAmplify && permissions.IsAmplifyEnabled;\r\n\r\n useEffect(() => {\r\n if (data && data.Images && _.isArray(data.Images)) {\r\n const isLegacyResponsiveAd = data && data.LegacyResponsiveAd;\r\n const fetchImagesPromise = getMultiImagesFromMTAssetsAsync(\r\n odata,\r\n `/Customers(${cid})/Accounts(${aid})/`,\r\n data.Images,\r\n true, // isAdCreatorEnabled,\r\n true, // isImproveMMA,\r\n !isBoostCampaign, // isMMAV2Enabled,\r\n isBoostCampaign, // isBoostPortraitImageEnabled,\r\n false, // isBoost200x100ImageEnabled\r\n false, // isBoostNewAspectRatioSupportEnabled\r\n supportImageFitting && !isBoostCampaign && !isLegacyResponsiveAd, // isImageFittingEnabled\r\n );\r\n\r\n fetchImagesPromise.then((images) => {\r\n _.each(images, (image) => {\r\n _.each(image, (i) => {\r\n if (i.Id) {\r\n i.idString = i.Id.toString();\r\n }\r\n });\r\n });\r\n\r\n setData((prevData) => ({\r\n ...prevData,\r\n Images: {\r\n ImageList: images,\r\n },\r\n }));\r\n });\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (isCleaning) {\r\n setData({\r\n isValid: false,\r\n isDirty: false,\r\n currentPageIndex: 1,\r\n });\r\n\r\n onCleaningComplete();\r\n }\r\n }, [isCleaning]);\r\n\r\n useEffect(() => {\r\n if (cid && aid && campaignId && !biddingScheme) {\r\n getCampaignBiddingScheme(cid, aid, campaignId)\r\n .then((campaign) => {\r\n setBiddingScheme(campaign.BiddingScheme.Type);\r\n });\r\n }\r\n }, [cid, aid, campaignId]);\r\n\r\n return (\r\n <>\r\n {!isCleaning &&\r\n \r\n }\r\n \r\n );\r\n};\r\n","/* global _TL_ */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Promise from 'bluebird';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { saveAds, saveAdsWithMetadata } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { getVerifiedTrackingSettings } from '@bingads-webui-campaign-react/xandr-display-ads-campaign-shared-components';\r\nimport { getODataConfig } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ImageOData } from '@bingads-webui-campaign/image-odata';\r\nimport { DisplayPlusNative } from '../../components';\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n scope,\r\n editMode = false,\r\n model = {},\r\n showInline = false,\r\n instrumentation,\r\n perfMarker,\r\n permissions,\r\n activityLogger,\r\n campaignId,\r\n adGroupId,\r\n serverContext,\r\n preferenceService,\r\n }) {\r\n this.aid = _.get(serverContext, ['CurrentAccount', 'Id']);\r\n this.cid = _.get(serverContext, ['CurrentCustomer', 'Id']);\r\n this.advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n this.scope = scope;\r\n this.editMode = editMode;\r\n this.showInline = showInline;\r\n this.perfMarker = perfMarker;\r\n this.instrumentation = instrumentation;\r\n this.model = model;\r\n this.apiErrors = [];\r\n this.campaignId = campaignId;\r\n this.adGroupId = adGroupId;\r\n this.activityLogger = activityLogger;\r\n this.resetFields = false;\r\n this.permissions = permissions;\r\n this.serverErrors = null;\r\n this.serverContext = serverContext;\r\n this.preferenceService = preferenceService;\r\n this.verifiedTrackingSetting = this.editMode ? getVerifiedTrackingSettings(model) : {};\r\n this.model = {\r\n ...this.model,\r\n ...this.verifiedTrackingSetting,\r\n };\r\n this.isLoading = false;\r\n this.isSaving = false;\r\n this.isCanceling = false;\r\n this.saveFailed = false;\r\n this.isCleaning = false;\r\n\r\n this.oDataConfig = getODataConfig(serverContext);\r\n\r\n this.imageOdata = new ImageOData(this.cid, this.aid, this.oDataConfig);\r\n\r\n this.scenario = 'Edit-DisplayPlusNativeAds';\r\n\r\n this.savedAdModel = {\r\n ...this.translateHotspots(this.model),\r\n isValid: true,\r\n isDirty: false,\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.isVideoAsAnAssetEnabled = this.permissions && this.permissions.dynamic.VideoAsAnAsset && !this.permissions.IsAmplifyEnabled;\r\n this.isImageFittingEnabled = _.result(permissions.dynamic, 'ImageFittingMVP', false) &&\r\n !_.result(permissions.dynamic, 'ImageFittingExlcudeMAE', true) &&\r\n _.result(permissions.dynamic, 'ImageFittingUnifiedImageROI', false);\r\n }\r\n\r\n translateHotspots(model) {\r\n if (model && model.HotSpots) {\r\n const hotspots = model.HotSpots.map((hotspot) => ({\r\n glyph: hotspot.Asset.Glyph,\r\n actionText: hotspot.Asset.ActionText,\r\n assetSource: hotspot.Asset.AssetSource,\r\n id: hotspot.Asset.Id,\r\n desc: hotspot.Asset.Description,\r\n placement: hotspot.Asset.Placement,\r\n title: hotspot.Asset.Title,\r\n uri: hotspot.Asset.Uri,\r\n }));\r\n\r\n return {\r\n ...model,\r\n hotspots,\r\n };\r\n }\r\n\r\n return {\r\n ...model,\r\n };\r\n }\r\n\r\n onAdsValidation(result) {\r\n this.savedAdModel = { ...result };\r\n this.render();\r\n }\r\n\r\n validate() {\r\n return this.savedAdModel.isValid;\r\n }\r\n\r\n toObject() {\r\n return this.savedAdModel;\r\n }\r\n\r\n clearApiErrors() {\r\n this.apiErrors = [];\r\n }\r\n\r\n clearFields() {\r\n this.editMode = false;\r\n this.model = {};\r\n this.resetFields = !this.resetFields;\r\n this.savedAdModel = {\r\n isValid: false,\r\n isDirty: false,\r\n data: {\r\n data: [],\r\n },\r\n currentPageIndex: 1,\r\n };\r\n\r\n this.serverErrors = null;\r\n\r\n this.isCleaning = true;\r\n this.render();\r\n }\r\n\r\n onCleaningComplete() {\r\n this.isCleaning = false;\r\n this.render();\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n\r\n setSavingState() {\r\n this.isSaving = true;\r\n this.saveFailed = false;\r\n this.render();\r\n }\r\n\r\n buildSaveAdsPayload() {\r\n return {\r\n ads: { data: this.savedAdModel },\r\n oldAdsModel: { data: this.savedAdModel },\r\n campaign: { Id: this.scope().adGroupId },\r\n adGroup: { Id: this.scope().adGroupId },\r\n activity: this.activityLogger,\r\n imageOdata: this.imageOdata,\r\n permissions: this.permissions,\r\n };\r\n }\r\n\r\n onSaveAdsSuccess(updateGrid) {\r\n return (result) => {\r\n if (result && result.ads && result.ads.data) {\r\n this.clearFields();\r\n return updateGrid(result.ads.data, result.ads.data.Id, 'Responsive');\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n onSaveAdsFailed(result) {\r\n this.serverErrors = result.serverErrors || result;\r\n this.saveFailed = true;\r\n }\r\n\r\n onSaveAdsFinally() {\r\n this.isSaving = false;\r\n this.render();\r\n }\r\n\r\n saveAdAction(updateGrid) {\r\n const saveAdsAction = this.isVideoAsAnAssetEnabled ? saveAdsWithMetadata : saveAds;\r\n\r\n const saveAdsPayload = this.buildSaveAdsPayload();\r\n\r\n return saveAdsAction(saveAdsPayload, { scenario: this.scenario, i18n: this.options.newI18n, serverContext: this.serverContext, activityLogger: this.activityLogger }, { isImageFittingEnabled: this.isImageFittingEnabled })\r\n .then(this.onSaveAdsSuccess(updateGrid))\r\n .catch(this.onSaveAdsFailed.bind(this))\r\n .finally(this.onSaveAdsFinally.bind(this));\r\n }\r\n\r\n saveAdAsync(updateGrid) {\r\n if (!this.validate()) {\r\n return Promise.resolve();\r\n }\r\n\r\n this.setSavingState();\r\n return this.saveAdAction(updateGrid);\r\n }\r\n\r\n saveAndCreateAnotherAsync(updateGrid) {\r\n if (!this.validate()) {\r\n return Promise.resolve();\r\n }\r\n\r\n this.setSavingState();\r\n return this.saveAdAction(updateGrid);\r\n }\r\n\r\n render() {\r\n const scenarioName = 'DisplayPlusNativeAdsAdEditing';\r\n const activityName = 'Ad';\r\n\r\n ReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.isLoading ?\r\n
:\r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ,\r\n this.el,\r\n );\r\n\r\n return this;\r\n\r\n }\r\n}\r\n","export const lengthExceededErrorCodes = [\r\n //OData Error Codes\r\n 'EditorialTooMuchAdTextInTitle',\r\n 'EditorialTooMuchAdTextInText',\r\n 'EditorialTooMuchAdTextInDisplayUrl',\r\n 'EditorialTooMuchAdTextInDestinationUrl',\r\n 'EditorialDefaultAdTooMuchAdTextInText',\r\n 'EditorialTooMuchAdTextInTextAcrossAllAssociations',\r\n 'EditorialTooMuchAdTextInTitleAcrossAllAssociations',\r\n 'EditorialTooMuchAdTextInDisplayUrlAcrossAllAssociations',\r\n\r\n //Bulk Error Codes\r\n 'CampaignServiceTooMuchAdTextInTitle',\r\n 'CampaignServiceTooMuchAdTextInText',\r\n 'CampaignServiceTooMuchAdTextInDisplayUrl',\r\n 'CampaignServiceTooMuchAdTextInDestinationUrl',\r\n 'CampaignServiceDefaultAdTooMuchTextInText',\r\n 'CampaignServiceTooMuchTextInTextAcrossAllAssociations',\r\n 'CampaignServiceTooMuchTextInTitleAcrossAllAssociations',\r\n 'CampaignServiceTooMuchTextInDisplayUrlAcrossAllAssociations',\r\n];\r\n","import Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adEditor';\r\nimport editorTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adEditor.pug';\r\nimport improveMMAAdEditor from '@bingads-webui-campaign-legacy/crud-ad/template/improveMMAAdEditor.pug';\r\nimport TextAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/textAd';\r\nimport AppInstallAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/appInstallAd';\r\nimport DynamicSearchAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/dynamicSearchAd';\r\nimport ProductAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/productAd';\r\nimport ExpandedTextAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/expandedTextAd';\r\nimport ResponsiveAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/ResponsiveAd';\r\nimport ResponsiveSearchAdView from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/responsiveSearchAd';\r\nimport ResponsiveSearchAdEditor from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/ResponsiveSearchAdEditor';\r\nimport XandrVideoAd from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/xandrVideoAd';\r\nimport XandrDisplayAd from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/xandrDisplayAd';\r\nimport DisplayPlusDisplayAd from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/displayPlusDisplayAd';\r\nimport DisplayPlusNativeAd from '@bingads-webui-campaign-legacy/crud-ad/view/adsEditor/displayPlusNativeAd';\r\nimport * as schemaMapper from '@bingads-webui-campaign-legacy/crud-ad/schemaMapper';\r\nimport { lengthExceededErrorCodes } from '@bingads-webui-campaign-legacy/crud-ad/lengthExceededErrorCodes';\r\nimport { getAppealableErrors, getODataErrors, getBulkApiErrors } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport EditorialAppealView from '@bingads-webui-component-legacy/editorial-appeal/view/index';\r\nimport legacyInstru from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { getPath1AndPath2 } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { testUurl, uurlLevels } from '@bingads-webui-component-legacy/upgraded-url/service/testUurl';\r\nimport { getUtcTime } from '@bingads-webui-universal/primitive-utilities';\r\nimport { AdFormatOption, AdFormat } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { isXandrDisplayAdsCampaign, isXandrVideoAdsCampaign, isAudienceNativeAdsCampaign, isAudienceCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nconst adTypeMapper = {\r\n Text: TextAdView,\r\n AppInstall: AppInstallAdView,\r\n DynamicSearch: DynamicSearchAdView,\r\n Product: ProductAdView,\r\n ExpandedText: ExpandedTextAdView,\r\n Responsive: ResponsiveAdView,\r\n};\r\n\r\nconst adTypeSchema = {\r\n Text: 'TextAd',\r\n AppInstall: 'AppInstallAd',\r\n DynamicSearch: 'DynamicSearchAd',\r\n Product: 'ProductAd',\r\n ExpandedText: 'ExpandedTextAd',\r\n ResponsiveSearch: 'ResponsiveSearchAd',\r\n Responsive: 'ResponsiveAd',\r\n};\r\n\r\nconst adTypeEnum = {\r\n text: 'Text',\r\n dynamicSearch: 'DynamicSearch',\r\n appInstall: 'AppInstall',\r\n product: 'Product',\r\n expandedText: 'ExpandedText',\r\n responsive: 'Responsive',\r\n responsiveSearch: 'ResponsiveSearch',\r\n};\r\n\r\nexport default class AdEditor extends Backbone.View {\r\n initialize({\r\n newI18n,\r\n model = null,\r\n externalCachedImageExtensionChanges = null,\r\n onCachedImageExtensionChanged,\r\n accountId = null,\r\n campaignId = null,\r\n adGroupId = null,\r\n adGroupType = null,\r\n campaignType = null,\r\n campaignSubType = null,\r\n biddingStrategyType = '',\r\n isFeedBasedCampaign = null,\r\n isSaveToServer = true, // whether or not saving the ad to server when user clicks save button\r\n showInline = false, // is current ad editor shown under ads tab, true means showing under ads tab and use OData API, false will use Bulk Upload API\r\n showSaveAndCreateAnother = true, // whether show button for save and create another ad\r\n appInstallAdsAllowed = permissions.IsUserAppInstallAdsAllowed,\r\n isNativeAdsEnabled = permissions.IsNativeAdsAllowed,\r\n isVanityUrlEnabled = permissions.IsVanityUrlEnabled,\r\n isSTADisabled = permissions.IsSTADisabled,\r\n isRSAAsDefaultTypeEnabled = permissions.IsRSAAsDefaultType,\r\n isResponsiveAdEnabled = permissions.IsAIMCampaignEnabled,\r\n isMultiMediaAdsEnabled = permissions.IsMultiMediaAdsEnabled,\r\n isMMAInDSAEnabled = permissions.IsMMAInDSAEnabled,\r\n isTraditionalChinese = false, // is current adgroup with traditional chinese\r\n appLookupDisabled = false,\r\n developerName = '',\r\n campaignDomain = '',\r\n isDynamicDescriptionEnabled = false,\r\n defaultLandingPageUrl = '',\r\n firstTextAdModel = {},\r\n firstExpandedTextAdModel = {},\r\n firstResponsiveSearchAdModel = {},\r\n perfMarker = null,\r\n isForVNext = false,\r\n inlineSuggestionsEnabled = false,\r\n showLightbulb = false,\r\n isRecommendation = false,\r\n adsCountMap = {},\r\n activityLogger,\r\n isImpressionTrackingUrlsEnabled = permissions.IsImpressionTrackingUrlsEnabled,\r\n isOpenCreatePanel = false, // whether the editor is opened from the link in delivery status column\r\n hasWebsiteImageOptedInObservable, // pass to responsive-ad-editor to update enable/disable ad button state for showInline scenario\r\n isAdgroupCreation = false,\r\n isImproveRSA = false,\r\n isImproveMMA = false,\r\n serverContext = {},\r\n preferenceService,\r\n loadClipchampPlayer,\r\n } = {}) {\r\n if (perfMarker) {\r\n this.perfMarker = perfMarker;\r\n this.perfMarkerRender = perfMarker.createChild('Ad_Editor_Show');\r\n this.perfMarkerRender.willInit();\r\n }\r\n this.isSaveToServer = isSaveToServer;\r\n this.newI18n = newI18n;\r\n this.showInline = showInline;\r\n this.campaignType = campaignType;\r\n this.campaignSubType = campaignSubType;\r\n this.showSaveAndCreateAnother = showSaveAndCreateAnother;\r\n this.editMode = !_.isEmpty(this.model) && (showInline || this.model.isSaved); //edit ad which was already saved to server\r\n this.activityLogger = activityLogger;\r\n this.isMigratingToEXTA = !_.isEmpty(this.model) && showInline && this.model.Type === adTypeEnum.text; // show migration UI only in ads tab\r\n this.isSTADisabled = isSTADisabled;\r\n this.isRSAAsDefaultTypeEnabled = isRSAAsDefaultTypeEnabled;\r\n this.isMultiMediaAdsEnabled = isMultiMediaAdsEnabled;\r\n this.isOpenCreatePanel = isOpenCreatePanel;\r\n this.isImproveMMA = isImproveMMA;\r\n this.serverContext = serverContext;\r\n this.isDisplayPlusNativeEdit = permissions.dynamic.DisplayPlusEdit && this.isAudienceNativeCampaign(this.campaignType, this.campaignSubType);\r\n this.isMultiAdFormatEnabled = permissions.dynamic && permissions.dynamic.MultiAdFormat && this.isDisplayPlusNativeEdit && !permissions.IsAmplifyEnabled;\r\n\r\n if (permissions.dynamic && permissions.dynamic.EnableNewResponsiveSearchAdEditor && !isRecommendation) {\r\n adTypeMapper.ResponsiveSearch = ResponsiveSearchAdEditor;\r\n } else {\r\n adTypeMapper.ResponsiveSearch = ResponsiveSearchAdView;\r\n }\r\n\r\n if (permissions.dynamic.XandrVideoCampaigns && isXandrVideoAdsCampaign(this.campaignSubType)) {\r\n adTypeMapper.Responsive = XandrVideoAd;\r\n this.isXandrVideoAd = true;\r\n } else if (permissions.dynamic.XandrDisplayAdsCampaigns && isXandrDisplayAdsCampaign(this.campaignSubType)) {\r\n if (permissions.dynamic.DisplayPlusCopilotAssetGeneration) {\r\n adTypeMapper.Responsive = DisplayPlusDisplayAd;\r\n } else {\r\n adTypeMapper.Responsive = XandrDisplayAd;\r\n }\r\n } else if (this.isDisplayPlusNativeEdit) {\r\n setClarityTag({\r\n IsDisplayPlusAudienceNative: true,\r\n CampaignSubType: this.campaignSubType,\r\n });\r\n\r\n adTypeMapper.Responsive = DisplayPlusNativeAd;\r\n\r\n if (this.isMultiAdFormatEnabled && this.isDisplayAdUnderNativeCampaign(model)) {\r\n adTypeMapper.Responsive = DisplayPlusDisplayAd;\r\n } else if (this.isMultiAdFormatEnabled && this.isVideoAdUnderNativeCampaign(model)) {\r\n adTypeMapper.Responsive = XandrVideoAd;\r\n }\r\n } else {\r\n adTypeMapper.Responsive = ResponsiveAdView;\r\n }\r\n\r\n let defaultSelectedAdFormat = AdFormat.Native;\r\n\r\n if (this.isMultiAdFormatEnabled && this.isMultiAdFormatDisplayAd) {\r\n defaultSelectedAdFormat = AdFormat.Display;\r\n } else if (this.isMultiAdFormatEnabled && this.isMultiAdFormatVideoAd) {\r\n defaultSelectedAdFormat = AdFormat.Video;\r\n }\r\n\r\n this.viewModel = new ViewModel({\r\n model,\r\n campaignId,\r\n adGroupId,\r\n adGroupType,\r\n campaignType,\r\n campaignSubType,\r\n showInline,\r\n appInstallAdsAllowed,\r\n campaignDomain,\r\n isDynamicDescriptionEnabled,\r\n isFeedBasedCampaign,\r\n isMigratingToEXTA: this.isMigratingToEXTA,\r\n isSTADisabled,\r\n isRSAAsDefaultTypeEnabled,\r\n isResponsiveAdEnabled,\r\n isMMAInDSAEnabled,\r\n isForVNext,\r\n adsCountMap,\r\n perfMarker,\r\n isAdgroupCreation,\r\n selectedAdFormat: defaultSelectedAdFormat,\r\n });\r\n\r\n if (showInline) {\r\n this.hasWebsiteImageOptedInObservable = hasWebsiteImageOptedInObservable;\r\n } else {\r\n this.hasWebsiteImageOptedInObservable = this.viewModel.hasWebsiteImageOptedInObservable;\r\n }\r\n\r\n let scenario = instrumentation[`ad${this.editMode ? 'Edit' : 'Creation'}${this.viewModel.Type()}`].create();// eslint-disable-line\r\n\r\n this.activity = scenario[`ad${this.editMode ? 'Edit' : 'Creation'}`].create();\r\n this.activity.start();\r\n\r\n this.applyActivity = instrumentation.inContextRepairRecommendation.create().applyDeliveryStatus.create();\r\n this.adTypeViews = {};\r\n\r\n this.firstModelMap = {};\r\n this.firstModelMap[adTypeEnum.text] = firstTextAdModel;\r\n this.firstModelMap[adTypeEnum.expandedText] = firstExpandedTextAdModel;\r\n this.firstModelMap[adTypeEnum.responsiveSearch] = firstResponsiveSearchAdModel;\r\n\r\n _.each(this.viewModel.availableAdTypes, (type) => {\r\n let fillModel = model;\r\n\r\n if (this.isMigratingToEXTA && type === adTypeEnum.expandedText) {\r\n fillModel = this.mapSTAToEXTA(this.model);\r\n } else if (_.contains([\r\n adTypeEnum.text,\r\n adTypeEnum.expandedText,\r\n adTypeEnum.responsiveSearch,\r\n ], type) && _.isEmpty(this.model) && showInline) {\r\n fillModel = this.firstModelMap[type];\r\n\r\n // Clean NativePreference flag for RSA\r\n if (adTypeEnum.responsiveSearch === type) {\r\n fillModel = _.omit(fillModel, 'NativePreference');\r\n }\r\n }\r\n\r\n this.adViewOption = {\r\n campaignId,\r\n adGroupId,\r\n biddingStrategyType,\r\n permissions,\r\n perfMarker,\r\n timeZone: config.get('AccountTimeZone'),\r\n instrumentation,\r\n newI18n,\r\n editMode: this.editMode,\r\n isNativeAdsEnabled,\r\n isVanityUrlEnabled,\r\n showInline,\r\n model: fillModel,\r\n appLookupDisabled,\r\n developerName,\r\n isTraditionalChinese,\r\n scope: this.viewModel.scope,\r\n defaultLandingPageUrl,\r\n isForVNext,\r\n inlineSuggestionsEnabled,\r\n showLightbulb,\r\n activityLogger: this.activityLogger || this.activity,\r\n isMobileUrlEnabled: campaignSubType !== 'ShoppingSmartAds' && campaignSubType !== 12,\r\n isImpressionTrackingUrlsEnabled,\r\n isVideo: campaignSubType === 'AudienceVideoAds' || isXandrVideoAdsCampaign(campaignSubType),\r\n isMultimediaAd: type === adTypeEnum.responsive && (campaignType === 'Default' || campaignType === 1),\r\n isPlaceholderMMA: type === adTypeEnum.responsive && this.viewModel.isDynamicAdGroupAdCreation(),\r\n hasWebsiteImageOptedInObservable: this.hasWebsiteImageOptedInObservable,\r\n isRecommendation,\r\n campaignDomain,\r\n logActivity: this.logActivity.bind(this),\r\n edm: edmCampaign,\r\n externalCachedImageExtensionChanges,\r\n onCachedImageExtensionChanged,\r\n showImgExtWithoutAdGroupID: this.isSaveToServer === false && isAdgroupCreation === true && adGroupType === 'SearchStandard',\r\n jsdata,\r\n isImproveRSA,\r\n accountId,\r\n isImproveMMA,\r\n serverContext,\r\n preferenceService,\r\n triggerCancel: this.cancel.bind(this),\r\n triggerClose: this.triggerClose.bind(this),\r\n handleSave: this.handleSave.bind(this),\r\n isMultiAdFormatAd: this.isMultiAdFormatEnabled && (this.isDisplayAdUnderNativeCampaign(model) || this.isVideoAdUnderNativeCampaign(model)),\r\n loadClipchampPlayer,\r\n };\r\n\r\n this.adTypeViews[type] = new adTypeMapper[type](this.adViewOption);\r\n\r\n const testUurlAdTypes = [adTypeEnum.expandedText, adTypeEnum.responsiveSearch, adTypeEnum.appInstall];\r\n\r\n if (_.contains(testUurlAdTypes, type)) {\r\n this.adTypeViews[type].on('testUurl', (fn, originalView) => {\r\n if (!this.validate(this._type)) {\r\n fn.call(originalView, null); // to stop the loading spinner\r\n return;\r\n }\r\n\r\n originalView.isInline = false;\r\n originalView.level = uurlLevels.Ad;\r\n const params = this.adTypeViews[type].toObject();\r\n const context = {\r\n customerId: _.result(config.get('CurrentCustomer'), 'Id'),\r\n userId: _.result(config.get('CurrentUser'), 'Id'),\r\n accountId: _.result(config.get('CurrentAccount'), 'Id'),\r\n campaignId: _.result(config.get('CurrentCampaign'), 'Id') || this.viewModel.scope().campaignId || 0,\r\n adGroupId: _.result(config.get('CurrentAdGroup'), 'Id') || this.viewModel.scope().adGroupId || 0,\r\n entityId: this.model && this.model.Id && _.isNumber(this.model.Id) ? this.model.Id : '',\r\n };\r\n const options = {\r\n apiInLog: 'adEditor/uurlTest',\r\n };\r\n\r\n testUurl(fn, originalView, params, context, options);\r\n });\r\n }\r\n });\r\n\r\n this.prevScope = {};\r\n\r\n this.viewModel.scope.subscribe((scope) => {\r\n this.prevScope = scope;\r\n }, this, 'beforeChange');\r\n\r\n this.viewModel.scope.subscribe((scope) => {\r\n this.isDisplayPlusNativeEdit = permissions.dynamic.DisplayPlusEdit && this.isAudienceNativeCampaign(scope.campaignType, scope.campaignSubType) && !permissions.IsAmplifyEnabled;\r\n this.isMultiAdFormatEnabled = permissions.dynamic && permissions.dynamic.MultiAdFormat && this.isDisplayPlusNativeEdit && !permissions.IsAmplifyEnabled;\r\n\r\n if (this.isDisplayPlusNativeEdit) {\r\n setClarityTag({\r\n IsDisplayPlusAudienceNative: true,\r\n CampaignSubType: scope.campaignSubType,\r\n });\r\n }\r\n\r\n const adFormat = this.viewModel.selectedAdFormat();\r\n\r\n _.each(this.viewModel.adTypesRegisterForLanguageChange, (adType) => {\r\n const viewModel = this.adTypeViews[adType].viewModel;\r\n\r\n if (viewModel.isTraditionalChinese) {\r\n viewModel.isTraditionalChinese(scope.isTraditionalChinese);\r\n }\r\n });\r\n\r\n if (this.viewModel.scope().adGroupId) {\r\n if (this._type === 'Responsive' && this.prevScope.campaignType !== scope.campaignType) {\r\n this.logActivity(`campaign type changed from ${this.prevScope.campaignType} to ${scope.campaignType}`);\r\n this.refreshResponsiveAdEditor(scope, adFormat);\r\n }\r\n\r\n if (this._type === 'Responsive' && this.prevScope.adGroupType !== scope.adGroupType) {\r\n this.refreshResponsiveAdEditor(scope, adFormat);\r\n }\r\n\r\n this.logActivity('ad editor rendered');\r\n }\r\n }, this);\r\n\r\n this.viewModel.Type.subscribe((type) => {\r\n this.trigger('type', type);\r\n const scope = this.viewModel.scope();\r\n const adFormat = this.viewModel.selectedAdFormat();\r\n\r\n if (type === 'Responsive' && campaignSubType !== 12 && campaignSubType !== 'ShoppingSmartAds') {\r\n this.refreshResponsiveAdEditor(scope, adFormat);\r\n }\r\n scenario = instrumentation[`ad${this.editMode ? 'Edit' : 'Creation'}${type}`].create();\r\n\r\n this.activity = scenario[`ad${this.editMode ? 'Edit' : 'Creation'}`].create();\r\n this.activity.start();\r\n this.logActivity(`ad type change: ${type}`);\r\n if (type === 'Responsive') {\r\n setClarityTag({ NewSearchMMAEditor: 'true' });\r\n }\r\n }, this);\r\n\r\n this.viewModel.selectedAdFormat.subscribe((adFormat) => {\r\n const scope = this.viewModel.scope();\r\n\r\n this.refreshResponsiveAdEditor(scope, adFormat);\r\n }, this);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .appEditor-save-container .save': 'save',\r\n 'click .appEditor-save-container .cancel': 'cancel',\r\n 'click .save-create-another': 'saveAndCreateAnother',\r\n 'click .switchBackToSTA': 'switchBackToSTA',\r\n 'click .switchBackToEXTA': 'switchBackToEXTA',\r\n };\r\n }\r\n\r\n isRSANewCopilotScenario() {\r\n return this._type === adTypeEnum.responsiveSearch &&\r\n this.adViewOption.inlineSuggestionsEnabled;\r\n }\r\n\r\n isAudienceNativeCampaign(campaignType, campaignSubType) {\r\n return isAudienceCampaign(campaignType) && isAudienceNativeAdsCampaign(campaignSubType);\r\n }\r\n\r\n isDisplayAdUnderNativeCampaign(model) {\r\n this.isMultiAdFormatDisplayAd = isAudienceNativeAdsCampaign(this.campaignSubType) && model && model.AdSubType === 'Display';\r\n return this.isMultiAdFormatDisplayAd;\r\n }\r\n\r\n isVideoAdUnderNativeCampaign(model) {\r\n this.isMultiAdFormatVideoAd = isAudienceNativeAdsCampaign(this.campaignSubType) && model && model.AdSubType === 'Video';\r\n return this.isMultiAdFormatVideoAd;\r\n }\r\n\r\n logActivity(message, api = 'ad editor') {\r\n api = `${this.activity.value} | ${this.viewModel.Type()} | campaignType: ${this.viewModel.scope().campaignType} | adGroupType: ${this.viewModel.scope().adGroupType} | ${api}`; // eslint-disable-line no-param-reassign, new-cap\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(message, api);\r\n } else {\r\n legacyInstru.logMessage(\r\n [constants.LOGCATEGORY.SUBSTRATE],\r\n constants.LOGLEVEL.INFO,\r\n api,\r\n message,\r\n );\r\n }\r\n }\r\n\r\n onAdFormatChange(adFormat) {\r\n this.viewModel.selectedAdFormat(adFormat);\r\n }\r\n\r\n logCopilotRSAAssetSuggestionAdoption() {\r\n const data = this.adTypeViews.ResponsiveSearch;\r\n const cachedAd = data ? data.cachedAd : null;\r\n const cachedAdExtension = data ? data.cachedImageExtensionChanges : null;\r\n\r\n if (cachedAd && cachedAd.data) {\r\n const headlines = cachedAd.data.Headlines || [];\r\n const descriptions = cachedAd.data.Descriptions || [];\r\n const entityId = this.model ? this.model.Id : this.lastClientModelId;\r\n const currentAdExtension = (cachedAdExtension && cachedAdExtension.current) || [];\r\n const suggestedAdExtensions = _.filter(currentAdExtension, (ext) => ext.source === 'CopilotRecommendation');\r\n\r\n data.logAppliedSuggestionsFunc({\r\n headlines: headlines.map((t) => t.Asset.Text),\r\n descriptions: descriptions.map((t) => t.Asset.Text),\r\n entityId,\r\n suggestedAdExtensions,\r\n });\r\n }\r\n }\r\n\r\n logRSAAssetSuggestionAdoption() {\r\n let data = null;\r\n\r\n if (permissions.dynamic && permissions.dynamic.EnableNewResponsiveSearchAdEditor) {\r\n data = this.adTypeViews.ResponsiveSearch;\r\n } else if (this.model === null || !this.adTypeViews.ResponsiveSearch.adStrengthContainer) {\r\n return;\r\n } else {\r\n data = this.adTypeViews.ResponsiveSearch.adStrengthContainer.options.viewModel;\r\n }\r\n\r\n const message = JSON.stringify({\r\n Scenario: this.activity.value,\r\n TimeStamp: getUtcTime(),\r\n AcceptInfo: {\r\n ReturnSuggestionIds: data.returnSuggestionIds,\r\n ViewSuggestionIds: data.viewSuggestionIds,\r\n ApplySuggestionIds: data.applySuggestionIds,\r\n ClickViewIdeas: data.clickViewIdeas,\r\n },\r\n AdId: this.model.Id,\r\n Channel: 'bingadsweb[incontextrecommendation]',\r\n Feature: 'RSA_V2',\r\n Action: 'Accept',\r\n UserId: _.result(config.get('CurrentUser'), 'Id'),\r\n });\r\n\r\n this.logActivity(JSON.stringify(this.model), 'ad editor model when save rsa with suggestion');\r\n this.logActivity(message, 'rsa asset suggestion adoption');\r\n }\r\n\r\n logDeliveryStatusRecommendationAdoption() {\r\n const mes = { CampaignId: this.viewModel.scope().campaignId, AdGroupId: this.viewModel.scope().adGroupId, DeliveryStatusType: 'NoEligibleAds' };\r\n\r\n this.applyActivity.trace(JSON.stringify(mes));\r\n }\r\n\r\n refreshResponsiveAdEditor(scope, selectedAdFormat) {\r\n const originalResponsiveAdEditorView = this.adTypeViews.Responsive;\r\n const newOption = _.extend({}, this.adViewOption, {\r\n isMobileUrlEnabled: scope.campaignSubType !== 'ShoppingSmartAds' && scope.campaignSubType !== 12,\r\n isVideo: scope.campaignSubType === 'AudienceVideoAds' || isXandrVideoAdsCampaign(scope.campaignSubType),\r\n isMultimediaAd: scope.campaignType === 'Default' || scope.campaignType === 1,\r\n isPlaceholderMMA: this.viewModel.isDynamicAdGroupAdCreation(),\r\n hasWebsiteImageOptedInObservable: this.hasWebsiteImageOptedInObservable,\r\n campaignDomain: scope.campaignDomain,\r\n biddingStrategyType: scope.biddingStrategyType,\r\n jsdata,\r\n isMultiAdFormatAd: this.isMultiAdFormatEnabled, // Check sub type function,\r\n });\r\n\r\n originalResponsiveAdEditorView.remove();\r\n\r\n this.adTypeViews.Responsive = new ResponsiveAdView(newOption);\r\n\r\n if (isXandrVideoAdsCampaign(scope.campaignSubType)) {\r\n this.adTypeViews.Responsive = new XandrVideoAd(newOption);\r\n }\r\n\r\n if (isXandrDisplayAdsCampaign(scope.campaignSubType)) {\r\n if (permissions.dynamic.DisplayPlusCopilotAssetGeneration) {\r\n this.adTypeViews.Responsive = new DisplayPlusDisplayAd(newOption);\r\n } else {\r\n this.adTypeViews.Responsive = new XandrDisplayAd(newOption);\r\n }\r\n }\r\n\r\n if (permissions.dynamic.DisplayPlusEdit && this.isAudienceNativeCampaign(scope.campaignType, scope.campaignSubType)) {\r\n setClarityTag({\r\n IsDisplayPlusAudienceNative: true,\r\n CampaignSubType: scope.campaignSubType,\r\n });\r\n\r\n this.adTypeViews.Responsive = new DisplayPlusNativeAd(newOption);\r\n\r\n if (this.isMultiAdFormatEnabled && selectedAdFormat === AdFormat.Display) {\r\n this.adTypeViews.Responsive = new DisplayPlusDisplayAd(newOption);\r\n } else if (this.isMultiAdFormatEnabled && selectedAdFormat === AdFormat.Video) {\r\n this.adTypeViews.Responsive = new XandrVideoAd(newOption);\r\n }\r\n }\r\n\r\n this.$('[data-type=Responsive]').empty().prepend(this.adTypeViews.Responsive.render().el);\r\n\r\n this.renderAdFormatOption();\r\n }\r\n\r\n render() {\r\n if (this.perfMarkerRender) {\r\n this.perfMarkerRender.willRender();\r\n }\r\n if (this.isImproveMMA) {\r\n this.$el.html(improveMMAAdEditor({\r\n i18n,\r\n i18nGlobal,\r\n permissions,\r\n showInline: this.showInline,\r\n editMode: !_.isEmpty(this.model),\r\n isMigratingToEXTA: this.isMigratingToEXTA,\r\n adTypeEnum,\r\n isSTADisabled: this.isSTADisabled,\r\n showSaveAndCreateAnother: this.showSaveAndCreateAnother,\r\n isDisplayPlusNativeEdit: this.isDisplayPlusNativeEdit,\r\n isDisplayPlusDisplayAd: permissions.dynamic.DisplayPlusCopilotAssetGeneration && isXandrDisplayAdsCampaign(this.campaignSubType),\r\n }));\r\n } else {\r\n this.$el.html(editorTemplate({\r\n i18n,\r\n i18nGlobal,\r\n permissions,\r\n showInline: this.showInline,\r\n editMode: !_.isEmpty(this.model),\r\n isMigratingToEXTA: this.isMigratingToEXTA,\r\n adTypeEnum,\r\n isSTADisabled: this.isSTADisabled,\r\n showSaveAndCreateAnother: this.showSaveAndCreateAnother,\r\n isDisplayPlusNativeEdit: this.isDisplayPlusNativeEdit,\r\n isDisplayPlusDisplayAd: permissions.dynamic.DisplayPlusCopilotAssetGeneration && isXandrDisplayAdsCampaign(this.campaignSubType),\r\n isXandrVideoAd: this.isXandrVideoAd,\r\n isMultiAdFormatDisplayAd: this.isMultiAdFormatDisplayAd,\r\n isMultiAdFormatVideoAd: this.isMultiAdFormatVideoAd,\r\n }));\r\n }\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n _.each(this.adTypeViews, (subView, key) => {\r\n subView.render();\r\n this.$(`[data-type=${key}]`).prepend(subView.el);\r\n });\r\n\r\n this.editorialAppeal = new EditorialAppealView();\r\n this.$('.editorial-appeal-panel').append(this.editorialAppeal.render().el);\r\n\r\n if (!_.isEmpty(this.model) && !this.model.hasError && !this.isMigratingToEXTA) {\r\n // In adgroup creation page, when changing from single byte market to double byte market, need do validation in case exceeding max length\r\n // In Sta to Exta Migration UI (which is only under ads tab), shouldn't do validate before user click save\r\n this.validate(this._type);\r\n }\r\n\r\n this.setErrorsIfExist();\r\n\r\n this.on('saving', () => {\r\n if (this.isRSANewCopilotScenario()) {\r\n this.adTypeViews[this._type].triggerSaving();\r\n }\r\n });\r\n\r\n this.on('canceling', () => {\r\n if (this.isRSANewCopilotScenario()) {\r\n this.adTypeViews[this._type].triggerCanceling();\r\n }\r\n });\r\n\r\n this.on('cancel', () => {\r\n if (this.isMigratingToEXTA) {\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'crud-ad/view/adEditor', 'extaMigration-cancel');\r\n }\r\n this.adTypeViews[this._type].trigger('cancel');\r\n // Trigger survey in ads page when RSA editor is cancelled\r\n if (this._type === adTypeEnum.responsiveSearch && window.survey && window.survey.surveyManager) {\r\n window.survey.surveyManager.trigger({ checkIfSurveyIsOpen: true });\r\n }\r\n });\r\n\r\n if (this.perfMarkerRender) {\r\n this.perfMarkerRender.done();\r\n }\r\n\r\n if (this.viewModel.scope().adGroupId != null) {\r\n this.logActivity('ad editor rendered');\r\n }\r\n\r\n this.renderAdFormatOption();\r\n\r\n return this;\r\n }\r\n\r\n renderAdFormatOption() {\r\n if (this.isMultiAdFormatEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.el.querySelector('.ad-format-option-container'),\r\n );\r\n }\r\n }\r\n\r\n remove() {\r\n if (!this.closingAfterSave) {\r\n this.logActivity('ad editor dismissed');\r\n }\r\n this.editorialAppeal.remove();\r\n _.each(this.adTypeViews, (subView) => {\r\n subView.remove();\r\n });\r\n super.remove();\r\n }\r\n\r\n setErrorsIfExist() {\r\n if (!_.isEmpty(this.model) && this.model.hasError) {\r\n this.handleApiErrors(this.model.errors);\r\n }\r\n }\r\n\r\n save() {\r\n this.logActivity('ad editor click save');\r\n this.trigger('saving');\r\n\r\n if (this.perfMarker) {\r\n this.perfMarkerSave = this.perfMarker.createChild('Create_Ad_Save');\r\n this.perfMarkerSave.willInit();\r\n }\r\n let saveAdPromise = null;\r\n\r\n // Special case for Responsive ad, since we are consuming existing component for ad creation. Which does not match the structure of the existing views.\r\n if (this._type === 'Responsive') {\r\n const adEditorView = this.adTypeViews[this._type];\r\n\r\n saveAdPromise = this.isSaveToServer ?\r\n adEditorView.saveAdAsync((data, adId, type) => this.handleSave(data, adId, type)) :\r\n adEditorView.saveToClient((data, adId, type) => this.handleSave(data, adId, type));\r\n } else {\r\n saveAdPromise = Promise.resolve(this.isSaveToServer ? this.saveToServer() : this.saveToClient());\r\n }\r\n\r\n saveAdPromise.then((success = false) => {\r\n if (success) {\r\n this.closingAfterSave = true;\r\n this.trigger('close');\r\n if (this.perfMarkerSave) {\r\n this.perfMarkerSave.done();\r\n }\r\n if (this._type === adTypeEnum.responsiveSearch && this.adViewOption.inlineSuggestionsEnabled) {\r\n this.logCopilotRSAAssetSuggestionAdoption();\r\n if (this.isSaveToServer) {\r\n this.logRSAAssetSuggestionAdoption();\r\n }\r\n }\r\n this.logActivity('ad editor save success');\r\n\r\n if (this.isOpenCreatePanel) {\r\n this.logDeliveryStatusRecommendationAdoption();\r\n }\r\n\r\n } else {\r\n const $errors = this.$el.closest('.panel-body-ad').find('[role=alert]:visible').not('[aria-hidden=true]');\r\n\r\n if ($errors.exists()) {\r\n $errors[0].scrollIntoView({ block: 'center' });\r\n }\r\n this.logActivity('ad editor save failed');\r\n }\r\n // Trigger survey in ads page when RSA editor is saved\r\n if (this._type === adTypeEnum.responsiveSearch && window.survey && window.survey.surveyManager) {\r\n window.survey.surveyManager.trigger();\r\n }\r\n });\r\n }\r\n\r\n saveAndCreateAnother() {\r\n this.logActivity('ad editor click save and create another');\r\n this.trigger('saving');\r\n\r\n // Special case for Responsive ad, since we are consuming existing component for ad creation. Which does not match the structure of the existing views.\r\n if (this._type === 'Responsive') {\r\n const adEditorView = this.adTypeViews[this._type];\r\n const saveAndCreateAnotherFunc = this.isSaveToServer ? 'saveAndCreateAnotherAsync' : 'saveToClientAndCreateAnother';\r\n\r\n adEditorView[saveAndCreateAnotherFunc]((data, adId, type) => {\r\n this.handleSave(data, adId, type);\r\n if (this.isOpenCreatePanel) {\r\n this.logDeliveryStatusRecommendationAdoption();\r\n }\r\n this.resetViewToCreateAnother();\r\n });\r\n\r\n return;\r\n }\r\n\r\n Promise.resolve(this.isSaveToServer ? this.saveToServer() : this.saveToClient())\r\n .then((success = false) => {\r\n if (success) {\r\n if (this._type === adTypeEnum.responsiveSearch && this.adViewOption.inlineSuggestionsEnabled) {\r\n this.logCopilotRSAAssetSuggestionAdoption();\r\n if (this.isSaveToServer) {\r\n this.logRSAAssetSuggestionAdoption();\r\n }\r\n }\r\n if (this.isOpenCreatePanel) {\r\n this.logDeliveryStatusRecommendationAdoption();\r\n }\r\n this.resetViewToCreateAnother();\r\n }\r\n });\r\n }\r\n\r\n resetViewToCreateAnother() {\r\n //this prop is used in save function to indicate edit mode\r\n this.editMode = false;\r\n //shouldn't assign empty object to model, hasChange function needs it.\r\n this.model = _.omit(this.model, 'Id');\r\n this.model.isSaved = false;\r\n //hide appeal panel\r\n this.viewModel.errors.isAppealable(false);\r\n //reset editMode in subview\r\n _.each(this.adTypeViews, (subView) => {\r\n if (_.isFunction(subView.resetEditMode)) {\r\n subView.resetEditMode(false);\r\n }\r\n });\r\n\r\n this.logActivity('ad editor save and create another successful');\r\n this.closingAfterSave = false;\r\n }\r\n\r\n switchBackToSTA() {\r\n this.viewModel.Type(adTypeEnum.text); // eslint-disable-line\r\n }\r\n\r\n switchBackToEXTA() {\r\n this.viewModel.Type(adTypeEnum.expandedText); // eslint-disable-line\r\n }\r\n\r\n validate(type) {\r\n // Responsive uses an existing componenet which already takes care of the validation before saving\r\n let isValid = type === 'Responsive' ? true : this.adTypeViews[type].validate();\r\n\r\n if (this.viewModel.errors.isAppealable()) {\r\n isValid = this.editorialAppeal.validate() && isValid;\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n saveToServer() {\r\n const type = this._type;\r\n\r\n if (!this.validate(type)) {\r\n this.logActivity('Validated ad failed and will not save this ad to server');\r\n return false;\r\n }\r\n\r\n this.clearApiErrors();\r\n\r\n const params = this.adTypeViews[type].toObject();\r\n const campaignId = Number(this.viewModel.scope().campaignId);\r\n const adGroupId = Number(this.viewModel.scope().adGroupId);\r\n\r\n // Path1, Path2, TextPart2 and TitlePart3 allow space, but doesn't allow ONLY space\r\n if (params.Path1 && params.Path1.trim() === '') {\r\n params.Path1 = '';\r\n }\r\n if (params.Path2 && params.Path2.trim() === '') {\r\n params.Path2 = '';\r\n }\r\n if (params.TextPart2 && params.TextPart2.trim() === '') {\r\n params.TextPart2 = '';\r\n }\r\n if (params.TitlePart3 && params.TitlePart3.trim() === '') {\r\n params.TitlePart3 = '';\r\n }\r\n\r\n const scope = this.showInline ? {\r\n entitySet: edmCampaign.currentAccount.Campaigns.$withKey(campaignId).AdGroups.$withKey(adGroupId).Ads,\r\n cacheResponse: false,\r\n scenario: 'ads-grid',\r\n } : { adapter: 'bulk', cacheResponse: false };\r\n\r\n _.extend(params, {\r\n Campaign: { Id: campaignId },\r\n AdGroup: { Id: adGroupId },\r\n Type: type,\r\n });\r\n\r\n // Create New if it's migrating to EXTA from STA\r\n if (this.editMode && !(this.isMigratingToEXTA && type === adTypeEnum.expandedText)) {\r\n params.Id = this.model.Id;\r\n }\r\n\r\n if (this.viewModel.errors.isAppealable() && this.editorialAppeal.ko_model.provideJustification()) {\r\n _.extend(params, this.editorialAppeal.toObject());\r\n }\r\n\r\n //In new campaign creation, if user didn't make any change, show alert message.\r\n if (!this.hasChange(params, type) && !this.showInline) {\r\n this.viewModel.errors([i18n.get('Ad_Edit_NoChange_AlertMessage')]);\r\n return false;\r\n }\r\n\r\n let cachedSavedresult;\r\n\r\n return jsdata[adTypeSchema[type]]\r\n .create(params, scope)\r\n .then(({ value, Id }) => {\r\n this.logActivity(JSON.stringify({\r\n value,\r\n Id,\r\n showInline: this.showInline,\r\n }), 'save ad to server succeeded with suggestion');\r\n\r\n let adId = this.showInline ? value : Id;\r\n\r\n // MT could return adId as 0, in case of this situaion, we don't update viewmodel adId\r\n if (adId === 0) {\r\n adId = this.model.Id;\r\n }\r\n\r\n return this.handleSave(params, adId, type);\r\n })\r\n .catch(({ entity: { Id } = {}, errors } = {}) => {\r\n if (this._type === adTypeEnum.responsiveSearch && this.adViewOption.inlineSuggestionsEnabled) {\r\n this.logActivity(JSON.stringify({\r\n Id,\r\n showInline: this.showInline,\r\n }), 'save ad to server failed with suggestion');\r\n }\r\n\r\n if ((_.isEmpty(this.model) || !this.model.isSaved) && Id) {\r\n //if the errors are editorial appealable errors, bulk API will return Id back, we'll consider the ad is saved successfully\r\n return this.handleSave(params, Id, type);\r\n }\r\n\r\n _.chain(errors).map((error) => error.Error || error.Code).uniq().each((error) => {\r\n this.logActivity(error, 'ad creation api error');\r\n });\r\n\r\n return this.handleApiErrors(this.showInline ? getODataErrors(errors, permissions) : getBulkApiErrors(errors, undefined, permissions));\r\n })\r\n .then((success = false) => {\r\n cachedSavedresult = success;\r\n\r\n // saveImageExtensionsToServer is non-blocking, but we need to ensure that promise is fulfilled before closing editor\r\n if (success && this.adTypeViews[type].enableRSAExpansion) {\r\n return this.adTypeViews[type].saveImageExtensionsToServer({\r\n adId: this.model.Id,\r\n perfMarker: this.perfMarkerSave,\r\n });\r\n }\r\n\r\n return true;\r\n })\r\n .then(() => {\r\n return cachedSavedresult;\r\n })\r\n .finally(withUiBlock(this.$el));\r\n }\r\n\r\n handleSave(data, adId, type) {\r\n const logging = `${type}Ad${this.showInline ? ' under ads tab' : ''}`;\r\n\r\n const params = _.pick(data, _.negate(_.isNull));\r\n\r\n params.Id = adId;\r\n params.isSaved = this.isSaveToServer;\r\n\r\n if (_.isEmpty(this.model) || !this.model.Id || (this.isMigratingToEXTA && this.model.Id !== adId)) {\r\n // create a new ad, trigger 'created' event\r\n this.trigger('created', params);\r\n this.adTypeViews[type].trigger('created');\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `create${logging}`, 1);\r\n this.logActivity(1, `createAd: ${type}`);\r\n } else if (this.model.isSaved) {\r\n // update the ad\r\n this.trigger('updated', params);\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `update${logging}`, 1);\r\n this.logActivity(1, `updateAd: ${type}`);\r\n } else {\r\n // create the copied ad, trigger 'updated' event\r\n this.trigger('updated', params);\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `create${logging}`, 1);\r\n this.logActivity(1, `createAd: ${type}`);\r\n }\r\n\r\n if (this.isMigratingToEXTA) {\r\n let message = this.model.Id === adId ? 'staEdited' : 'extaCreated';\r\n\r\n legacyInstru.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'crud-ad/view/adEditor', `extaMigration-${message}`);\r\n }\r\n\r\n this.model = params;\r\n\r\n this.activity.stop();\r\n return true;\r\n }\r\n\r\n prepareErrorMessage(errors) {\r\n const type = this._type;\r\n\r\n _.each(errors, (err) => {\r\n if (_.has(err, 'property') && _.has(this.adTypeViews[type].viewModel, err.property) && _.contains(lengthExceededErrorCodes, err.code)) {\r\n const length = this.adTypeViews[type].viewModel[err.property].maxLength();\r\n\r\n if (err.message && (err.message.indexOf('{1}') > -1)) {\r\n err.message = err.message.replace('{1}', length);\r\n }\r\n }\r\n });\r\n }\r\n\r\n saveToClient() {\r\n const type = this._type;\r\n\r\n if (!this.adTypeViews[type].validate()) {\r\n return false;\r\n }\r\n\r\n const model = this.adTypeViews[type].toObject();\r\n\r\n model.Type = this._type;\r\n\r\n if (_.isEmpty(this.model) || !this.model.Id) {\r\n model.Id = uuid.v4();\r\n this.trigger('created', model);\r\n this.adTypeViews[type].trigger('created');\r\n } else {\r\n model.isSaved = this.model.isSaved;\r\n model.Id = this.model.Id;\r\n this.trigger('updated', model);\r\n }\r\n\r\n this.lastClientModelId = model.Id;\r\n\r\n return true;\r\n }\r\n\r\n hasChange(params, type) {\r\n let current = _.pick(params, schemaMapper[type]());\r\n let original = _.pick(this.model, schemaMapper[type]());\r\n\r\n current = _.pick(current, _.negate(_.isEmpty));\r\n original = _.pick(original, _.negate(_.isEmpty));\r\n\r\n return !_.isEqual(_.omit(current, 'Id'), _.omit(original, 'Id'));\r\n }\r\n\r\n handleApiErrors(errors) {\r\n const type = this._type;\r\n\r\n this.prepareErrorMessage(errors);\r\n\r\n if (type !== 'Responsive') {\r\n // MMA will handle in its view\r\n this.adTypeViews[type].handleApiErrors(errors);\r\n this.viewModel.errors(this.adTypeViews[type].viewModel.errors());\r\n }\r\n\r\n const appealableErrors = getAppealableErrors(errors);\r\n\r\n this.viewModel.errors.isAppealable(appealableErrors.isAppealable);\r\n if (this.viewModel.errors.isAppealable()) {\r\n this.editorialAppeal.setRejectedInfos(appealableErrors);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n clearApiErrors() {\r\n const type = this._type;\r\n\r\n this.adTypeViews[type].clearApiErrors();\r\n\r\n this.viewModel.errors([]);\r\n }\r\n\r\n cancel() {\r\n this.trigger('canceling');\r\n this.trigger('cancel');\r\n }\r\n\r\n triggerClose() {\r\n this.trigger('close');\r\n }\r\n\r\n get _type() {\r\n return this.viewModel.Type(); // eslint-disable-line\r\n }\r\n\r\n mapSTAToEXTA(model) {\r\n const paths = getPath1AndPath2(model.DisplayUrl);\r\n\r\n return {\r\n DisplayUrl: '',\r\n FinalUrls: _.isEmpty(model.FinalUrls) ? [(/^https?:\\/\\//i).test(model.DestinationUrl) ? model.DestinationUrl : `https://${model.DestinationUrl}`] : model.FinalUrls,\r\n MobileFinalUrls: model.MobileFinalUrls,\r\n NativePreference: model.NativePreference,\r\n Path1: paths.path1,\r\n Path2: paths.path2,\r\n Text: model.Text,\r\n TitlePart1: model.Title,\r\n TitlePart2: '',\r\n TrackingUrlTemplate: model.TrackingUrlTemplate,\r\n Type: adTypeEnum.expandedText,\r\n UrlCustomParameters: model.UrlCustomParameters,\r\n };\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport * as schemaMapper from '@bingads-webui-campaign-legacy/crud-ad/schemaMapper';\r\nimport { MMAAssetConfigs } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst MAX_HEADLINES = MMAAssetConfigs.MAX_HEADLINES;\r\nconst MAX_LONGHEADLINES = MMAAssetConfigs.MAX_LONGHEADLINES;\r\nconst MAX_DESCRIPTIONS = MMAAssetConfigs.MAX_DESCRIPTIONS;\r\n\r\nexport default class {\r\n constructor({\r\n idField = 'Id',\r\n maxAdsCount = 50,\r\n adGroupId = '',\r\n adGroups = [],\r\n isMixedModeCampaignCreation = false,\r\n } = {}) {\r\n this.idField = idField;\r\n this.maxAdsCount = maxAdsCount;\r\n this.adGroupId = adGroupId;\r\n this.isMixedModeCampaignCreation = isMixedModeCampaignCreation;\r\n\r\n this.adGroup = ko.observable();\r\n this.externalCachedImageExtensionChanges = ko.observable();\r\n this.firstTwoKeywords = ko.observableArray([]);\r\n this.allAdGroupsInfo = ko.observableArray([]);\r\n this.hasMultiAdgroups = ko.computed(() => {\r\n return this.allAdGroupsInfo().length > 1;\r\n });\r\n\r\n this.defaultAds = _.constant([\r\n { action: 'create' },\r\n { action: 'dash' },\r\n ]);\r\n\r\n this.ads = _.clone(this.defaultAds());\r\n\r\n this.deletedAdIds = [];\r\n\r\n this.alertMessage = ko.observable();\r\n this.duplicateAlertMessage = ko.observable();\r\n\r\n this.refresh(adGroups);\r\n }\r\n\r\n getAds() {\r\n return this.ads.slice(0, -2);\r\n }\r\n\r\n //when back to adgroup step, then go next to this step, need to refresh adgroup name and keywords list\r\n refresh(adGroups) {\r\n const adGroup = _.find(adGroups, { [this.idField]: this.adGroupId });\r\n let allAdGroups = adGroups;\r\n\r\n this.adGroup(adGroup);\r\n // for mixed mode campaign creation\r\n // only ad groups of the same type should be displayed in the \"copy to ad group\" menu\r\n if (this.isMixedModeCampaignCreation) {\r\n allAdGroups = _.filter(adGroups, (adg) => adg.AdGroupType === adGroup.AdGroupType);\r\n }\r\n\r\n this.allAdGroupsInfo(_.map(allAdGroups, ({ Name, [this.idField]: id }) => {\r\n return {\r\n Name,\r\n [this.idField]: id,\r\n };\r\n }));\r\n\r\n this._generateKeywordInfo();\r\n\r\n if (!this.isEmpty()) {\r\n this.slb.refreshSource();\r\n }\r\n }\r\n\r\n _generateKeywordInfo() {\r\n const Two = 2;\r\n const keywords = _.pluck(this.adGroup().Keywords, 'Text');\r\n\r\n this.firstTwoKeywords(_.first(keywords, Two));\r\n\r\n if (_.size(this.adGroup().Keywords) > Two) {\r\n this.firstTwoKeywords.push(i18n.get('Ad_MoreKeywords', {\r\n length: this.adGroup().Keywords.length - Two,\r\n }));\r\n }\r\n }\r\n\r\n isEmpty() {\r\n return this.ads.length === this.defaultAds().length;\r\n }\r\n\r\n totalCounts() {\r\n return this.ads.length - this.defaultAds().length;\r\n }\r\n\r\n isFull() {\r\n return this.ads.length === this.defaultAds().length + this.maxAdsCount;\r\n }\r\n\r\n _pushAdToArray(ad) {\r\n this.ads.splice(this.ads.length - 2, 0, ad);\r\n }\r\n\r\n onDelete(ad) {\r\n const index = _.findIndex(this.ads, {\r\n [this.idField]: ad[this.idField],\r\n });\r\n\r\n this.ads.splice(index, 1);\r\n this.slb.refreshSource();\r\n\r\n if (ad.isSaved) {\r\n // this ad had been saved to MT server.\r\n this.deletedAdIds.push({ Id: ad[this.idField], Type: ad.Type });\r\n }\r\n\r\n if (this.isEmpty()) {\r\n this.externalCachedImageExtensionChanges(null);\r\n }\r\n\r\n //clear reach maxLength alert message\r\n this.alertMessage('');\r\n\r\n this.refreshDuplicateMessage();\r\n }\r\n\r\n refreshDuplicateMessage() {\r\n const hasDuplicate = _.some(this.ads, (entity) => {\r\n return entity.isDuplicated;\r\n });\r\n\r\n this.duplicateAlertMessage(hasDuplicate ?\r\n i18n.get('AdGroup_Validation_DuplicateAds_AlertMessage') : '');\r\n }\r\n\r\n updateMMAfields(ad) {\r\n if (!_.isEmpty(ad.Headlines) && typeof ad.Headlines === 'string') {\r\n ad.Headlines = JSON.parse(ad.Headlines);\r\n ad.Headline = _.first(ad.Headlines).Text;\r\n _.each(ad.Headlines, (val, key) => {\r\n ad[`Headline${key}`] = val.Text;\r\n });\r\n for (let i = ad.Headlines.length; i < MAX_HEADLINES; i++) {\r\n delete ad[`Headline${i}`];\r\n }\r\n }\r\n if (!_.isEmpty(ad.LongHeadlines) && typeof ad.LongHeadlines === 'string') {\r\n ad.LongHeadlines = JSON.parse(ad.LongHeadlines);\r\n ad.LongHeadline = _.first(ad.LongHeadlines).Text;\r\n _.each(ad.LongHeadlines, (val, key) => {\r\n ad[`LongHeadline${key}`] = val.Text;\r\n });\r\n for (let i = ad.LongHeadlines.length; i < MAX_LONGHEADLINES; i++) {\r\n delete ad[`LongHeadline${i}`];\r\n }\r\n }\r\n if (!_.isEmpty(ad.Descriptions) && typeof ad.Descriptions === 'string') {\r\n ad.Descriptions = JSON.parse(ad.Descriptions);\r\n ad.Text = _.first(ad.Descriptions).Text;\r\n _.each(ad.Descriptions, (val, key) => {\r\n ad[`Description${key}`] = val.Text;\r\n });\r\n for (let i = ad.Descriptions.length; i < MAX_DESCRIPTIONS; i++) {\r\n delete ad[`Description${i}`];\r\n }\r\n }\r\n }\r\n\r\n syncTheExtension(changes) {\r\n this.externalCachedImageExtensionChanges(changes);\r\n }\r\n\r\n onUpdate(newAd, originalAd) {\r\n this.updateMMAfields(newAd);\r\n const index = _.findIndex(this.ads, {\r\n [this.idField]: originalAd[this.idField],\r\n });\r\n\r\n if (!originalAd.isSaved && this.checkIfExist(newAd)) {\r\n this.ads.splice(index, 1);\r\n } else {\r\n this.ads[index] = newAd;\r\n }\r\n\r\n this.slb.refreshSource();\r\n\r\n this.refreshDuplicateMessage();\r\n }\r\n\r\n onCreate(ad) {\r\n this.updateMMAfields(ad);\r\n if (this.checkIfExist(ad)) {\r\n return;\r\n }\r\n\r\n this._pushAdToArray(ad);\r\n this.slb.refreshSource();\r\n\r\n //clear empty adgroup alert message\r\n this.alertMessage('');\r\n }\r\n\r\n onCopy(ad) {\r\n const copiedAd = _.clone(ad);\r\n\r\n copiedAd.isDuplicated = false;\r\n copiedAd[this.idField] = uuid.v4();\r\n copiedAd.isSaved = false;\r\n\r\n this._pushAdToArray(copiedAd);\r\n this.slb.refreshSource();\r\n }\r\n\r\n checkIfExist(ad) {\r\n const savedAdsIds = _.pluck(_.where(this.ads, { isSaved: true } ), 'Id');\r\n\r\n return _.contains(savedAdsIds, ad.Id);\r\n }\r\n\r\n changes() {\r\n return {\r\n addedAds: _.chain(this.ads)\r\n .filter((ad) => {\r\n return !ad.isSaved && ad.Type;\r\n })\r\n .map((ad) => {\r\n ad.AdGroup = { Id: this.adGroupId };\r\n return ad;\r\n })\r\n .value(),\r\n removedAdIds: _.map(this.deletedAdIds, (deleted) => {\r\n return _.defaults(deleted, { AdGroup: { Id: this.adGroupId } });\r\n }),\r\n };\r\n }\r\n\r\n hasDuplicateAds() {\r\n //TODO [lizho] refacter to be more efficient. The ads array can't be sorted firstly, otherwise the panel will be different.\r\n _.each(this.ads, (ad) => {\r\n ad.isDuplicated = false;\r\n });\r\n\r\n let hasDuplicate = false;\r\n\r\n for (let index = 0; index < this.totalCounts(); index++) {\r\n if (this.ads[index].isDuplicated) {\r\n continue; // eslint-disable-line\r\n }\r\n\r\n const sourceAd = _.pick(this.ads[index], schemaMapper[this.ads[index].Type]());\r\n\r\n for (let j = index + 1; j < this.totalCounts(); j++) {\r\n if (_.isEqual(sourceAd, _.pick(this.ads[j], schemaMapper[this.ads[j].Type]()))) {\r\n this.ads[j].isDuplicated = true;\r\n hasDuplicate = true;\r\n }\r\n }\r\n }\r\n\r\n this.slb.refreshSource();\r\n this.refreshDuplicateMessage();\r\n\r\n return hasDuplicate;\r\n }\r\n\r\n getCachedImageExtensionChanges() {\r\n return this.externalCachedImageExtensionChanges();\r\n }\r\n\r\n findAd(id) {\r\n return _.find(this.ads, { [this.idField]: id });\r\n }\r\n}\r\n","/* eslint-disable no-undef */\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adGroupAdsEditor';\r\nimport EditorView from '@bingads-webui-campaign-legacy/crud-ad/view/adEditor';\r\nimport createTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adGroupAdsEditor.pug';\r\nimport adListTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adList.pug';\r\nimport adPreviewTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adPreview.pug';\r\nimport {combineText } from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsPreview/expandedTextAd';\r\nimport SingleListBox from '@bingads-webui-component-legacy/single-list-box/view/singleListBox';\r\nimport dialogDecorator from '@bingads-webui-component-legacy/dialog/dialogDecorator';\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\nimport getDomain from '@bingads-webui-campaign-legacy/crud-ad/service/getDomain';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport {types as campaignTypes} from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport { getExpandedTextAdDisplayUrl, getDynamicSearchAdDisplayUrl } from '@bingads-webui-campaign-legacy/crud-ad/service/displayUrl';\r\nimport { getTitlePreview, getDescPreview } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { panelDecorator } from '@bingads-webui-campaign-react/panel-decorator';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst EditorForm = dialogDecorator.decorate(EditorView, {\r\n position: 'center',\r\n maxWidth: 2000,\r\n popupFront: '.navbar-fixed-top',\r\n});\r\n\r\nconst EditorPanel = panelDecorator(EditorView, {\r\n panelClassName: 'ad-editor-panel',\r\n i18n,\r\n panelReadyAriaLabel: i18n.getString('Ad editor side panel opened'),\r\n});\r\n\r\nconst DefaultPageSize = 9;\r\nconst DefaultMaxAdsCount = 50;\r\n\r\nexport default class AdGroupAdsEditor extends Backbone.View {\r\n initialize({\r\n adGroups = [{Id: '', Name: '', Keywords: []}],\r\n adGroupId = '',\r\n Campaign: { Id: campaignId = '', DomainName: campaignDomain = '', DynamicDescriptionEnabled: isDynamicDescriptionEnabled = false } = {},\r\n idField = 'Id',\r\n pageSize = DefaultPageSize,\r\n maxAdsCount = DefaultMaxAdsCount,\r\n showAdGroupInfo = true,\r\n isSaveToServer = true,\r\n Language: language = null,\r\n Languages: languages = [],\r\n campaignType = 'search',\r\n defaultLandingPageUrl = '',\r\n usePanel = false,\r\n isForVNext = false,\r\n activityLogger,\r\n adGroupType = null,\r\n isMixedModeCampaignCreation = false,\r\n newI18n,\r\n perfMarker,\r\n serverContext,\r\n } = {}) {\r\n this.showAdGroupInfo = showAdGroupInfo;\r\n this.adGroupId = adGroupId;\r\n this.adGroup = _.find(adGroups, (adg) => String(adg.Id) === String(adGroupId)) || {};\r\n this.idField = idField;\r\n this.maxAdsCount = maxAdsCount;\r\n this.campaignId = campaignId;\r\n this.isSaveToServer = isSaveToServer;\r\n this.language = language;\r\n this.languages = languages || [];\r\n this.pageSize = pageSize;\r\n this.campaignType = campaignType;\r\n this.defaultLandingPageUrl = defaultLandingPageUrl;\r\n this.campaignDomain = _.result(_.first(_.result(pageContext.CurrentCampaign, 'CampaignSettings')), 'DomainName', campaignDomain);\r\n this.isDynamicDescriptionEnabled = _.result(_.first(_.result(pageContext.CurrentCampaign, 'CampaignSettings')), 'DynamicDescriptionEnabled', isDynamicDescriptionEnabled);\r\n this.isVanityUrlEnabled = pageContext.Permissions.IsVanityUrlEnabled;\r\n this.usePanel = usePanel;\r\n this.activityLogger = activityLogger;\r\n this.isForVNext = isForVNext;\r\n this.adGroupType = adGroupType;\r\n this.inlineSuggestionsEnabled = pageContext.Permissions.IsRSASuggestionCMUIEnabled;\r\n this.newI18n = newI18n;\r\n this.adEditorListContainer = '.ad-editor-list-group';\r\n this.perfMarker = perfMarker;\r\n this.serverContext = serverContext;\r\n\r\n const map = {\r\n copy: this._copyAd,\r\n edit: this._editAd,\r\n remove: this._deleteAd,\r\n copyToSome: this._copyAdToSomeAdGroups,\r\n copyToOthers: this._copyAdToAllOtherAdGroups,\r\n };\r\n\r\n this.itemActions = _.reduce(map, (memo, value, key) => {\r\n memo[key] = {\r\n callback: _.bind(value, this),\r\n };\r\n\r\n return memo;\r\n }, {}, this);\r\n\r\n this.viewModel = new ViewModel({\r\n idField,\r\n maxAdsCount,\r\n adGroupId,\r\n adGroups,\r\n isMixedModeCampaignCreation,\r\n });\r\n\r\n this.on('update:domainName', (DomainName) => {\r\n this.campaignDomain = DomainName;\r\n });\r\n this.on('update:dynamicDescriptionEnabled', (dynamicDescriptionEnabled) => {\r\n this.isDynamicDescriptionEnabled = dynamicDescriptionEnabled;\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .create-ad': '_createAd',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(createTemplate({\r\n i18: i18n,\r\n showAdGroupInfo: this.showAdGroupInfo,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this._initializeListView();\r\n\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.editor) {\r\n this.editor.remove();\r\n delete this.editor;\r\n }\r\n super.remove();\r\n }\r\n\r\n getAds() {\r\n return this.viewModel.getAds();\r\n }\r\n\r\n logActivity(message) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(message, 'ad group ads editor');\r\n }\r\n }\r\n\r\n _getData() {\r\n return (options, cb) => {\r\n cb(null, {\r\n items: this.viewModel.ads,\r\n total: this.viewModel.ads.length,\r\n });\r\n };\r\n }\r\n\r\n _processItem(item/*, id*/) {\r\n if (item.action) {\r\n item.isFirst = this.viewModel.isEmpty();\r\n } else {\r\n const type = _.result(item, 'Type');\r\n\r\n item.adGroups = this.viewModel.allAdGroupsInfo();\r\n if (type === 'ExpandedText') {\r\n item.title = `${item.TitlePart1} | ${item.TitlePart2}`;\r\n\r\n if (item.TitlePart3) {\r\n item.title = `${item.title} | ${item.TitlePart3}`;\r\n }\r\n\r\n item.displayUrl = getExpandedTextAdDisplayUrl(_.first(item.FinalUrls), item.DisplayUrl, item.Path1, item.Path2);\r\n if (item.TextPart2) {\r\n item.text = combineText(item.Text, item.TextPart2);\r\n } else {\r\n item.text = item.Text;\r\n }\r\n } else if (type === 'ResponsiveSearch') {\r\n item.text = getDescPreview(_.map(item.Descriptions, (i) => ({\r\n Text: i.Asset.Text,\r\n PinnedField: i.PinnedField,\r\n })));\r\n item.title = getTitlePreview(_.map(item.Headlines, (i) => ({\r\n Text: i.Asset.Text,\r\n PinnedField: i.PinnedField,\r\n })));\r\n item.displayUrl = getExpandedTextAdDisplayUrl(_.first(item.FinalUrls), item.DisplayUrl, item.Path1, item.Path2);\r\n } else if (type === 'DynamicSearch') {\r\n item.displayUrl = getDynamicSearchAdDisplayUrl(getDomain(this.campaignDomain), item.Path1, item.Path2);\r\n if (item.TextPart2) {\r\n item.text = combineText(item.Text, item.TextPart2);\r\n } else {\r\n item.text = item.Text;\r\n }\r\n }\r\n }\r\n\r\n item.hasMultiAdgroups = this.viewModel.hasMultiAdgroups();\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n\r\n return item;\r\n }\r\n\r\n _initializeListView() {\r\n this.viewModel.slb = new SingleListBox({\r\n el: this.$el.find('.ads-creative'),\r\n itemActions: this.itemActions,\r\n processItem: _.bind(this._processItem, this),\r\n data: {\r\n sourceItems: _.bind(this._getData(), this),\r\n useCallbackForFetchOnly: true,\r\n itemIdField: this.idField,\r\n pageSize: this.pageSize,\r\n },\r\n templates: {\r\n layoutTemplate: adListTemplate({ i18n }),\r\n itemLayoutTemplate: adPreviewTemplate({\r\n i18n,\r\n isForVNext: this.isForVNext,\r\n adGroupId: this.adGroupId,\r\n }),\r\n listContainerSelector: this.adEditorListContainer,\r\n },\r\n }).render();\r\n\r\n // The following code to is used to fix accessibility on ad panel.\r\n _.defer(() => {\r\n $(this.adEditorListContainer).attr('role', 'list');\r\n $(this.adEditorListContainer).on('focus', () => {\r\n $(this.adEditorListContainer).removeAttr('aria-activedescendant tabindex');\r\n });\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n });\r\n }\r\n\r\n copyAdFromOtherAdGroup(ad) {\r\n this._copyAd(ad);\r\n }\r\n\r\n isEmpty() {\r\n const empty = this.viewModel.isEmpty();\r\n\r\n this.viewModel.alertMessage(empty ? i18n.get('AdGroup_Validation_NoCreatedAd') : '');\r\n return empty;\r\n }\r\n\r\n changes() {\r\n return this.viewModel.changes();\r\n }\r\n\r\n _copyAdToAllOtherAdGroups(ad) {\r\n this.logActivity('click copy ad to all other ad groups');\r\n this.trigger('copyToOthers', {\r\n ad,\r\n sourceId: this.adGroupId,\r\n });\r\n\r\n this.trigger('ads:changed');\r\n }\r\n\r\n _copyAdToSomeAdGroups(ad) {\r\n this.logActivity('click copy ad to some ad groups');\r\n const targetAdGroupIds = this.$(`.copyToSome[data-id=${ad[this.idField]}] input:checked`).map(function () {\r\n return this.dataset.adgroupid; //eslint-disable-line\r\n }).get();\r\n\r\n if (_.isEmpty(targetAdGroupIds)) {\r\n popup.alert(i18n.get('AdGroup_Validation_NoOneSelected'));\r\n } else {\r\n this.trigger('copyToSome', {\r\n targetAdGroupIds,\r\n ad,\r\n });\r\n\r\n this.trigger('ads:changed');\r\n }\r\n }\r\n\r\n _deleteAd(ad) {\r\n this.logActivity('remove ad clicked');\r\n if (popup.confirm(i18n.get('Ad_Delete_Warning'))) {\r\n this.viewModel.onDelete(ad);\r\n\r\n this.trigger('ads:changed');\r\n this.logActivity('ad removed');\r\n\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n if (window.App.views.alertCenter) {\r\n window.App.views.alertCenter.showConfirmation(this.newI18n.getString(_TL_('Ad removed successfully.')));\r\n }\r\n }\r\n }\r\n\r\n _createAd() {\r\n if (!this._hasMaxAds()) {\r\n this._editAd(null);\r\n }\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n }\r\n\r\n _hasMaxAds() {\r\n if (this.viewModel.isFull()) {\r\n this.viewModel.alertMessage(i18n.get('AdGroup_Validation_MaxCreatedAds', {\r\n name: _.property('Name')(this.viewModel.adGroup()),\r\n count: this.maxAdsCount,\r\n }));\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n _copyAd(ad) {\r\n const focusId = $(document.activeElement).parents('.adEditor-listitem').attr('data-id');\r\n\r\n this.logActivity('copy ad clicked');\r\n if (!this._hasMaxAds()) {\r\n this.viewModel.onCopy(ad);\r\n\r\n this.trigger('ads:changed');\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n\r\n if (window.App.views.alertCenter) {\r\n window.App.views.alertCenter.showConfirmation(this.newI18n.getString(_TL_('Ad copied successfully.')));\r\n if (focusId) { // Focus on the copy button after the copy action\r\n $(`.adEditor-listitem[data-id=${focusId}]`).find('.itemAction-copy').trigger('focus');\r\n }\r\n }\r\n }\r\n }\r\n\r\n _onClose() {\r\n if (this.editor) {\r\n this.editor.remove();\r\n delete this.editor;\r\n }\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n }\r\n\r\n _handleCreatedAd(ext) {\r\n this.viewModel.onCreate(ext);\r\n this.trigger('ads:changed');\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n }\r\n\r\n _handleUpdatedAd(ext, ad) {\r\n this.viewModel.onUpdate(ext, ad);\r\n this.trigger('ads:changed');\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n }\r\n\r\n _editAd(ad) {\r\n if (_.isEmpty(ad)) {\r\n this.logActivity('create ad clicked');\r\n } else {\r\n this.logActivity('edit ad clicked');\r\n }\r\n\r\n if (this.editor) {\r\n this.editor.remove();\r\n }\r\n\r\n const campaignType = _.result(pageContext.CurrentCampaign, 'CampaignType') || campaignTypes[this.campaignType];\r\n\r\n if (this.usePanel) {\r\n this.editor = new EditorPanel({\r\n newI18n: this.newI18n,\r\n model: _.isEmpty(ad) ? ad : this.viewModel.findAd(ad.Id),\r\n externalCachedImageExtensionChanges: this.viewModel.getCachedImageExtensionChanges(),\r\n onCachedImageExtensionChanged: this.viewModel.syncTheExtension.bind(this.viewModel),\r\n campaignId: Number(this.campaignId),\r\n adGroupId: Number(this.adGroupId),\r\n adGroupType: this.adGroupType || this.adGroup.AdGroupType,\r\n campaignType,\r\n isForVNext: this.isForVNext,\r\n title: i18n.get(ad ? 'Ad_EditAd' : 'Ad_CreateAd'),\r\n isSaveToServer: this.isSaveToServer,\r\n isTraditionalChinese: this.language === 'TraditionalChinese' || _.contains(this.languages, 'All') || _.contains(this.languages, 'TraditionalChinese'),\r\n inlineSuggestionsEnabled: this.inlineSuggestionsEnabled,\r\n defaultLandingPageUrl: this.defaultLandingPageUrl,\r\n campaignDomain: this.campaignDomain,\r\n isDynamicDescriptionEnabled: this.isDynamicDescriptionEnabled,\r\n activityLogger: this.activityLogger,\r\n eventsToActions: [{\r\n event: 'cancel close',\r\n action: this._onClose.bind(this),\r\n }, {\r\n event: 'created',\r\n action: (ext) => this._handleCreatedAd(ext),\r\n }, {\r\n event: 'updated',\r\n action: (ext) => this._handleUpdatedAd(ext, ad),\r\n }],\r\n onClose: this._onClose.bind(this),\r\n isAdgroupCreation: true,\r\n perfMarker: this.perfMarker,\r\n serverContext: this.serverContext,\r\n }).render();\r\n } else {\r\n this.editor = new EditorForm({\r\n newI18n: this.newI18n,\r\n model: _.isEmpty(ad) ? ad : this.viewModel.findAd(ad.Id),\r\n campaignId: Number(this.campaignId),\r\n adGroupId: Number(this.adGroupId),\r\n adGroupType: this.adGroupType || this.adGroup.AdGroupType,\r\n campaignType,\r\n isForVNext: this.isForVNext,\r\n title: i18n.get(ad ? 'Ad_EditAd' : 'Ad_CreateAd'),\r\n isSaveToServer: this.isSaveToServer,\r\n isTraditionalChinese: this.language === 'TraditionalChinese' || _.contains(this.languages, 'All') || _.contains(this.languages, 'TraditionalChinese'),\r\n inlineSuggestionsEnabled: this.inlineSuggestionsEnabled,\r\n defaultLandingPageUrl: this.defaultLandingPageUrl,\r\n campaignDomain: this.campaignDomain,\r\n activityLogger: this.activityLogger,\r\n isAdgroupCreation: true,\r\n perfMarker: this.perfMarker,\r\n }).render();\r\n\r\n this.editor.on('created', (ext) => this._handleCreatedAd(ext));\r\n\r\n this.editor.on('updated', (ext) => this._handleUpdatedAd(ext, ad));\r\n\r\n this.editor.on('cancel close', this._onClose.bind(this));\r\n }\r\n this.updateAttributeForListItem(this.adEditorListContainer);\r\n }\r\n\r\n clearAlertMessages() {\r\n this.viewModel.alertMessage('');\r\n this.viewModel.duplicateAlertMessage('');\r\n }\r\n\r\n updateAttributeForListItem(listContainer) {\r\n $(listContainer).removeAttr('aria-activedescendant');\r\n let items = $(listContainer).children();\r\n\r\n _.each(items, (item) => {\r\n $(item).attr('role', 'listitem');\r\n $(item).removeAttr('aria-selected');\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { schema } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport { PerfMarkerFactory } from '@bingads-webui/performance-marker';\r\nimport parsedTextMaxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension';\r\nimport { loadResponsiveAdEditorAsync } from '@bingads-webui-campaign-legacy/audience-campaign/responsive-ad-editor-loader';\r\n\r\nexport default class View extends Backbone.View {\r\n /**\r\n * Initialize ad editor to create ad.\r\n *\r\n * @param {Object} options - options with data to initialize the editor.\r\n *\r\n * @param {Object} options.model - Backbone.Model with the model information of an existing ad,\r\n * used get the data to edit existing ad.\r\n *\r\n * @param {function} options.scope - gets the scope, used to get the campaign and adgroup ids.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n initialize(options = {}) {\r\n instrumentation.addScenario(schema);\r\n const logScenario = options.model ? instrumentation.aimAdEdit.create() : instrumentation.aimAdCreation.create();\r\n\r\n const initializeOptions = {\r\n logScenario,\r\n isGridDisplay: true,\r\n viewContext: {\r\n currentAdGroup: {\r\n get Id() {\r\n return options.scope().adGroupId;\r\n },\r\n },\r\n currentCampaign: {\r\n Id: options.scope().campaignId,\r\n CampaignType: options.scope().campaignType,\r\n CampaignSubType: options.scope().campaignSubType,\r\n },\r\n },\r\n isForVNext: options.isForVNext,\r\n isMultimediaAd: options.isMultimediaAd || false,\r\n isPlaceholderMMA: options.isPlaceholderMMA || false,\r\n isVideo: options.isVideo,\r\n isMobileUrlEnabled: options.isMobileUrlEnabled,\r\n isImpressionTrackingUrlsEnabled: options.isImpressionTrackingUrlsEnabled,\r\n newI18n: options.newI18n,\r\n serverContext: options.serverContext,\r\n pageContext,\r\n hasWebsiteImageOptedInObservable: options.hasWebsiteImageOptedInObservable,\r\n parsedTextMaxLengthExtension,\r\n isRecommendation: options.isRecommendation,\r\n campaignDomain: options.campaignDomain,\r\n edm: options.edm,\r\n jsdata: options.jsdata,\r\n isImproveMMA: options.isImproveMMA,\r\n biddingScheme: { Type: options.biddingStrategyType },\r\n };\r\n\r\n if (options.model) {\r\n initializeOptions.isUpdate = true;\r\n initializeOptions.ad = options.model;\r\n }\r\n\r\n if (options.perfMarker) {\r\n initializeOptions.perfMarker = options.perfMarker.createChild('CrudAudienceAdNew', { autoEnd: true });\r\n } else {\r\n initializeOptions.perfMarker = PerfMarkerFactory.createMarker('CrudAudienceAdNew', { autoEnd: true });\r\n }\r\n\r\n this.loadAdEditorPromise = loadResponsiveAdEditorAsync().then((ResponsiveAdEditor) => {\r\n this.audienceAd = new ResponsiveAdEditor(initializeOptions);\r\n });\r\n }\r\n\r\n remove() {\r\n if (this.audienceAd) {\r\n this.audienceAd.remove();\r\n }\r\n super.remove();\r\n }\r\n\r\n /**\r\n * Render the view.\r\n * @return {View} This object.\r\n */\r\n render() {\r\n this.loadAdEditorPromise.then(() => {\r\n this.$el.html(this.audienceAd.render().el);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Saves ad.\r\n *\r\n * @param {function} updateGrid - function to be called in order to update the grid once the ad has been saved.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n saveAdAsync(updateGrid) {\r\n return this.loadAdEditorPromise.then(() => {\r\n return this.audienceAd.saveAdAsync().then((data) => {\r\n if (data) {\r\n return updateGrid(data, data.Id, 'Responsive');\r\n }\r\n return data;\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Saves ad and open up a new editor to create another.\r\n *\r\n * @param {function} updateGrid - function to be called in order to update the grid once the ad has been saved.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n saveAndCreateAnotherAsync(updateGrid) {\r\n return this.loadAdEditorPromise.then(() => {\r\n return this.audienceAd.saveAdAsync().then((data) => {\r\n if (data) {\r\n this.audienceAd.onCreateAnother();\r\n return updateGrid(data, data.Id, 'Responsive');\r\n }\r\n return data;\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Saves ad to client.\r\n *\r\n * @param {function} updateGrid - function to be called in order to update the grid once the ad has been saved.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n saveToClient(updateGrid) {\r\n return this.loadAdEditorPromise.then(() => {\r\n return this.audienceAd.saveToClient().then((data) => {\r\n if (data) {\r\n if (!data.Id) {\r\n data.Id = uuid.v4();\r\n }\r\n return updateGrid(data, data.Id, 'Responsive');\r\n }\r\n return data;\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Saves ad to client and open up a new editor to create another.\r\n *\r\n * @param {function} updateGrid - function to be called in order to update the grid once the ad has been saved.\r\n *\r\n * @return {Promise} - Promise of save request.\r\n */\r\n saveToClientAndCreateAnother(updateGrid) {\r\n return this.loadAdEditorPromise.then(() => {\r\n return this.audienceAd.saveToClient().then((data) => {\r\n if (data) {\r\n this.audienceAd.onCreateAnother();\r\n if (!data.Id) {\r\n data.Id = uuid.v4();\r\n }\r\n return updateGrid(data, data.Id, 'Responsive');\r\n }\r\n return data;\r\n });\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nlet headlinePositionMenu = [\r\n { text: i18n.get('Ad_Headline_PinToPosition_0'), value: 'None' },\r\n { text: i18n.get('Ad_Headline_PinToPosition_1'), value: 'Headline1' },\r\n { text: i18n.get('Ad_Headline_PinToPosition_2'), value: 'Headline2' },\r\n { text: i18n.get('Ad_Headline_PinToPosition_3'), value: 'Headline3' },\r\n];\r\n\r\nlet descriptionPositionMenu = [\r\n { text: i18n.get('Ad_Description_PinToPosition_0'), value: 'None' },\r\n { text: i18n.get('Ad_Description_PinToPosition_1'), value: 'Description1' },\r\n { text: i18n.get('Ad_Description_PinToPosition_2'), value: 'Description2' },\r\n];\r\n\r\nexport default {\r\n extendHeadlines(viewModel) {\r\n const headlineFields = config.get('headlineFields');\r\n\r\n _.each(headlineFields, (field) => {\r\n const property = viewModel[field];\r\n\r\n property.selectPosition = (data) => {\r\n viewModel[`${field}Position`](data.value);\r\n };\r\n property.positionMenu = headlinePositionMenu;\r\n });\r\n },\r\n\r\n extendDescriptions(viewModel) {\r\n const descriptionFields = config.get('descriptionFields');\r\n\r\n _.each(descriptionFields, (field) => {\r\n const property = viewModel[field];\r\n\r\n property.selectPosition = (data) => {\r\n viewModel[`${field}Position`](data.value);\r\n };\r\n property.positionMenu = descriptionPositionMenu;\r\n });\r\n },\r\n};\r\n","import $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { ResponsiveSearchAd } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport dynamicTextExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/dynamicTextExtension';\r\nimport positionExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/positionExtension';\r\nimport KoSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport parsedTextMaxLengthExtension from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/parsedTextMaxLengthExtension';\r\nimport { getPreviewList } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst i18nErrors = window.globalLegacyI18n.get('component/i18n/loader!component/api-errors-campaign');\r\n\r\nconst headlinePositionFields = ['Headline1', 'Headline2', 'Headline3', 'None'];\r\nconst descriptionPositionFields = ['Description1', 'Description2', 'None'];\r\n\r\nconst headlineErrorMap = {\r\n lessMinRequire: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdsHeadlinesLessThanMinRequired'),\r\n duplicate: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdsDuplicateHeadlines'),\r\n lessPosition: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdNotEnoughHeadlinesForPositions'),\r\n};\r\n\r\nconst descriptionErrorMap = {\r\n lessMinRequire: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdsDescriptionsLessThanMinRequired'),\r\n duplicate: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdsDescriptionsDuplication'),\r\n lessPosition: i18nErrors.get('Error_Campaign_API_ResponsiveSearchAdNotEnoughDescriptionsForPositions'),\r\n};\r\n\r\n// Doesn't validate when init the view.\r\n// When user's input pass the validation or submit the view, do validation.\r\nfunction validate(model, miniRequire, fields, positionFields, errorMap) {\r\n let error;\r\n const list = _.chain(fields)\r\n .filter((field) => !_.isEmpty(model[field]().trim()))\r\n .map((field) => ({\r\n Text: model[field]().trim(),\r\n PinnedField: model[`${field}Position`](),\r\n })).value();\r\n\r\n if (_.size(list) < miniRequire) {\r\n error = errorMap.lessMinRequire;\r\n } else if (_.size(_.uniq(list, 'Text')) < _.size(list)) {\r\n error = errorMap.duplicate;\r\n } else if (_.size(getPreviewList(list, positionFields)) < miniRequire) {\r\n error = errorMap.lessPosition;\r\n }\r\n if (_.isEmpty(error)) {\r\n model.needValication(true);\r\n }\r\n return model.needValication() ? error : '';\r\n}\r\n\r\nexport class HeadlinesViewModel {\r\n constructor({\r\n defaultCount,\r\n maxCount,\r\n model = null,\r\n miniRequire,\r\n isForVNext = false,\r\n activityLogger,\r\n } = {}) {\r\n const headlineFields = config.get('headlineFields');\r\n\r\n this.activityLogger = activityLogger;\r\n this.model = model;\r\n this.positionFieldMap = (key) => _.result({ 'None': isForVNext ? i18n.get('Ad_Pin') : '', 'Headline1': '1', 'Headline2': '2', 'Headline3': '3' }, key);\r\n _.each(headlineFields, (key) => {\r\n ResponsiveSearchAd.properties[key] = _.clone(ResponsiveSearchAd.properties.Headline);\r\n });\r\n KoSchema.properties(this, ResponsiveSearchAd, headlineFields);\r\n dynamicTextExtension.extend(this, headlineFields);\r\n parsedTextMaxLengthExtension.extend(this, headlineFields, 'ResponsiveSearchAd');\r\n positionExtension.extendHeadlines(this);\r\n\r\n const initHeadlines = _.result(this, 'model');\r\n\r\n _.each(headlineFields, (field, index) => {\r\n this[`${field}Position`] = ko.observable(\r\n _.chain(initHeadlines).result(index).result('PinnedField', 'None').value()\r\n );\r\n this[`${field}IsAIGeneratedAsset`] = ko.observable(\r\n _.chain(initHeadlines).result(index).result('IsAlgoGeneratedAsset', false).value()\r\n );\r\n const fieldText = _.chain(initHeadlines).result(index).result('Asset').result('Text', '').value();\r\n\r\n this[field](_.isNull(fieldText) ? '' : fieldText);\r\n const logChange = _.once(() => {\r\n // Clean up AI-generated asset light bulb when content is changed.\r\n const aiGeneratedAssetContainer = $(`.${field}-AIGeneratedAsset`);\r\n\r\n if (!_.isEmpty(aiGeneratedAssetContainer) && aiGeneratedAssetContainer.length > 0) {\r\n _.first(aiGeneratedAssetContainer).style.display = 'none';\r\n }\r\n\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive search ad editor');\r\n } else {\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.SUBSTRATE],\r\n constants.LOGLEVEL.INFO,\r\n 'responsive search ad editor',\r\n `ad field change: ${field}`\r\n );\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n }, this);\r\n });\r\n\r\n this.showHeadlineCount = ko.observable(Math.max(defaultCount, _.size(initHeadlines)));\r\n this.maxCount = maxCount;\r\n\r\n this.needValication = ko.observable(false);\r\n this.errorMessage = ko.computed(() => {\r\n return validate(this, miniRequire, headlineFields, headlinePositionFields, headlineErrorMap);\r\n });\r\n }\r\n}\r\n\r\nexport class DescriptionsViewModel {\r\n constructor({\r\n model = null,\r\n defaultCount,\r\n maxCount,\r\n miniRequire,\r\n isForVNext = false,\r\n activityLogger,\r\n } = {}) {\r\n const descriptionFields = config.get('descriptionFields');\r\n\r\n this.activityLogger = activityLogger;\r\n this.model = model;\r\n this.positionFieldMap = (key) => _.result({ 'None': isForVNext ? i18n.get('Ad_Pin') : '', 'Description1': '1', 'Description2': '2' }, key);\r\n _.each(descriptionFields, (key) => {\r\n ResponsiveSearchAd.properties[key] = _.clone(ResponsiveSearchAd.properties.Description);\r\n });\r\n\r\n KoSchema.properties(this, ResponsiveSearchAd, descriptionFields);\r\n dynamicTextExtension.extend(this, descriptionFields);\r\n parsedTextMaxLengthExtension.extend(this, descriptionFields, 'ResponsiveSearchAd');\r\n positionExtension.extendDescriptions(this);\r\n\r\n const initDescriptions = _.result(this, 'model');\r\n\r\n _.each(descriptionFields, (field, index) => {\r\n this[`${field}Position`] = ko.observable(\r\n _.chain(initDescriptions).result(index).result('PinnedField', 'None').value()\r\n );\r\n this[`${field}IsAIGeneratedAsset`] = ko.observable(\r\n _.chain(initDescriptions).result(index).result('IsAlgoGeneratedAsset', false).value()\r\n );\r\n const fieldText = _.chain(initDescriptions).result(index).result('Asset').result('Text', '').value();\r\n\r\n this[field](_.isNull(fieldText) ? '' : fieldText);\r\n const logChange = _.once(() => {\r\n // Clean up AI-generated asset light bulb when content is changed.\r\n const aiGeneratedAssetContainer = $(`.${field}-AIGeneratedAsset`);\r\n\r\n if (!_.isEmpty(aiGeneratedAssetContainer) && aiGeneratedAssetContainer.length > 0) {\r\n _.first(aiGeneratedAssetContainer).style.display = 'none';\r\n }\r\n\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive search ad editor');\r\n } else {\r\n instrumentation.logMessage(\r\n [constants.LOGCATEGORY.SUBSTRATE],\r\n constants.LOGLEVEL.INFO,\r\n 'responsive search ad editor',\r\n `ad field change: ${field}`\r\n );\r\n }\r\n });\r\n\r\n this[field].subscribe(() => {\r\n logChange();\r\n }, this);\r\n });\r\n\r\n this.showDescriptionCount = ko.observable(Math.max(defaultCount, _.size(initDescriptions)));\r\n this.maxCount = maxCount;\r\n\r\n this.needValication = ko.observable(false);\r\n this.errorMessage = ko.computed(() => {\r\n return validate(this, miniRequire, descriptionFields, descriptionPositionFields, descriptionErrorMap);\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { HeadlinesViewModel, DescriptionsViewModel } from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/adsEditor/responsiveListField';\r\nimport headlinesTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/headlines.pug';\r\nimport desciptionsTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/adsEditor/descriptions.pug';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nclass RSAListView extends Backbone.View {\r\n validateViewModel() {\r\n const isValid = this.viewModel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.fields, (field) => {\r\n if (!this.viewModel[field].isValid()) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`ad field invalid: ${field}`, 'responsive search ad editor');\r\n }\r\n }\r\n });\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n this.viewModel.needValication(true);\r\n return _.reduce([\r\n this.validateViewModel(),\r\n _.isEmpty(this.viewModel.errorMessage()),\r\n ], (prev, next) => {\r\n return prev && next;\r\n }, true);\r\n }\r\n\r\n toObject() {\r\n const params = this.viewModel.toObject();\r\n const fieldsValue = _.chain(this.fields)\r\n .filter((field) => !_.isEmpty(params[field].trim()))\r\n .map((field) => ({\r\n 'Asset': {\r\n '@odata.type': '#Model.TextAsset',\r\n 'AssetType': 'Text',\r\n 'Name': null,\r\n 'Text': params[field].trim(),\r\n },\r\n 'PinnedField': this.viewModel[`${field}Position`](),\r\n 'IsAIGeneratedAsset': this.viewModel[`${field}IsAIGeneratedAsset`](),\r\n })).value();\r\n\r\n return fieldsValue;\r\n }\r\n\r\n // [TODO] Will update the parameters base on the interface\r\n toBulkEditObject() {\r\n let fieldsValue = _.chain(this.fields)\r\n .filter((field) => !_.isEmpty(this.viewModel[field]().trim()))\r\n .map((field) => ({\r\n 'Text': this.viewModel[field]().trim(),\r\n 'PinnedField': this.viewModel[`${field}Position`](),\r\n })).value();\r\n\r\n fieldsValue = _.map(fieldsValue, (value) => {\r\n return JSON.stringify(value);\r\n });\r\n\r\n return fieldsValue;\r\n }\r\n}\r\n\r\nexport class HeadlinesView extends RSAListView {\r\n initialize({\r\n model = null,\r\n defaultCount = 5,\r\n maxCount = 15,\r\n miniRequire = 3,\r\n isForVNext = false,\r\n activityLogger,\r\n showLightbulb = false,\r\n isMMA = false,\r\n } = {}) {\r\n this.isForVNext = isForVNext;\r\n this.fields = _.map(_.range(maxCount), (i) => `Headline${i}`);\r\n config.set('headlineFields', this.fields);\r\n this.template = headlinesTemplate;\r\n this.activityLogger = activityLogger;\r\n this.viewModel = new HeadlinesViewModel({ model, maxCount, defaultCount, miniRequire, isForVNext, activityLogger });\r\n this.showLightbulb = showLightbulb;\r\n this.isMMA = isMMA;\r\n this.maxCount = maxCount;\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .ad-rsa-add-headline': 'addHeadline',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(this.template({\r\n i18n,\r\n uuid,\r\n fields: this.fields,\r\n showLightbulb: this.showLightbulb,\r\n isMMA: this.isMMA,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n return this;\r\n }\r\n\r\n addHeadline() {\r\n if (this.viewModel.showHeadlineCount() < this.maxCount) {\r\n this.viewModel.showHeadlineCount(this.viewModel.showHeadlineCount() + 1);\r\n }\r\n }\r\n}\r\n\r\nexport class DescriptionsView extends RSAListView {\r\n initialize({\r\n model = null,\r\n defaultCount = 2,\r\n maxCount = 4,\r\n miniRequire = 2,\r\n isForVNext = false,\r\n activityLogger,\r\n showLightbulb = false,\r\n isMMA = false,\r\n } = {}) {\r\n this.isForVNext = isForVNext;\r\n this.fields = _.map(_.range(maxCount), (i) => `Description${i}`);\r\n config.set('descriptionFields', this.fields);\r\n this.template = desciptionsTemplate;\r\n this.activityLogger = activityLogger;\r\n this.viewModel = new DescriptionsViewModel({ model, maxCount, defaultCount, miniRequire, isForVNext, activityLogger });\r\n this.showLightbulb = showLightbulb;\r\n this.isMMA = isMMA;\r\n this.maxCount = maxCount;\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .ad-rsa-add-description': 'addDescription',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(this.template({\r\n i18n,\r\n uuid,\r\n fields: this.fields,\r\n showLightbulb: this.showLightbulb,\r\n isMMA: this.isMMA,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n return this;\r\n }\r\n\r\n addDescription() {\r\n if (this.viewModel.showDescriptionCount() < this.maxCount) {\r\n this.viewModel.showDescriptionCount(this.viewModel.showDescriptionCount() + 1);\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport AdsCreateView from '@bingads-webui-campaign-legacy/crud-ad/view/adGroupAdsEditor';\r\nimport * as schemaMapper from '@bingads-webui-campaign-legacy/crud-ad/schemaMapper';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst availableAdTypes = [\r\n 'Text',\r\n 'AppInstall',\r\n 'DynamicSearch',\r\n 'ExpandedText',\r\n 'ResponsiveSearch',\r\n 'Responsive',\r\n];\r\n\r\nexport default class View extends AdsCreateView {\r\n initialize(options = {}) {\r\n super.initialize({\r\n showAdGroupInfo: false,\r\n isSaveToServer: false,\r\n usePanel: options.usePanel,\r\n isForVNext: options.isForVNext,\r\n Campaign: options.Campaign,\r\n activityLogger: options.activityLogger,\r\n adGroupType: options.adGroupType,\r\n newI18n: options.newI18n,\r\n perfMarker: options.perfMarker,\r\n serverContext: options.serverContext,\r\n });\r\n\r\n this.allAppealableErrors = false;\r\n }\r\n\r\n logActivity(message) {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(message, 'ads panel');\r\n }\r\n }\r\n\r\n validate() {\r\n this.clearAlertMessages();\r\n\r\n let hasAds = !this.isEmpty();\r\n let hasUniqAds = !this.viewModel.hasDuplicateAds();\r\n\r\n if (!hasAds) {\r\n this.logActivity('invalid: has no ads');\r\n }\r\n\r\n if (!hasUniqAds) {\r\n this.logActivity('invalid: has duplicate ads');\r\n }\r\n\r\n return hasAds && hasUniqAds;\r\n }\r\n\r\n handleAdsError(response) {\r\n let allAds = this.viewModel.getAds();\r\n\r\n this._clearAdsErrors(allAds);\r\n\r\n _.each(availableAdTypes, (type) => {\r\n let ads = _.where(allAds, { Type: type });\r\n\r\n _.each(response[`${type}Ads`], (entity, index) => {\r\n if (_.isFinite(entity.Id) && !ads[index].isSaved) {\r\n ads[index].Id = entity.Id;\r\n ads[index].isSaved = true;\r\n } else if (!_.isEmpty(entity.errors)) {\r\n ads[index].hasError = true;\r\n ads[index].errors = entity.errors;\r\n }\r\n }, this);\r\n });\r\n\r\n this.viewModel.slb.refreshSource();\r\n\r\n if (this._hasApiErrors(allAds)) {\r\n this.viewModel.alertMessage(i18n.get('CreateAdGroup_AdsApiError_FixErrorNote'));\r\n this.allAppealableErrors = false;\r\n } else {\r\n this.viewModel.alertMessage('');\r\n this.allAppealableErrors = true;\r\n }\r\n }\r\n\r\n getDeletedItems(adgroupId) {\r\n return _.map(this.viewModel.deletedAdIds, (ad) => {\r\n return _.defaults(ad, {\r\n resourceName: 'Ad',\r\n parentId: adgroupId,\r\n });\r\n });\r\n }\r\n\r\n updateLanguage(language) {\r\n this.language = language;\r\n }\r\n\r\n emptyDeletedItems() {\r\n this.viewModel.deletedAdIds = [];\r\n }\r\n\r\n getValues(adGroupName, campaignName, adgroupId) {\r\n let ads = this.viewModel.getAds();\r\n let models = {};\r\n\r\n _.each(availableAdTypes, (type) => {\r\n models[`${type}Ads`] = _.map(_.where(ads, { Type: type }), (ad) => {\r\n const formatedAd = this._formatAd(ad, { AdGroupName: adGroupName, CampaignName: campaignName });\r\n\r\n if (adgroupId) {\r\n formatedAd.AdGroup = { Id: adgroupId };\r\n }\r\n\r\n return formatedAd;\r\n });\r\n });\r\n\r\n return models;\r\n }\r\n\r\n getCachedImageExtensionChanges() {\r\n return this.viewModel.getCachedImageExtensionChanges();\r\n }\r\n\r\n _formatAd(ad, base) {\r\n let fields = ad.isSaved ? _.union(schemaMapper[ad.Type](), ['Id']) : schemaMapper[ad.Type]();\r\n\r\n return _.extend(_.pick(ad, fields), base);\r\n }\r\n\r\n _hasApiErrors(allAds) {\r\n return _.some(allAds, (ad) => {\r\n return ad.hasError;\r\n });\r\n }\r\n\r\n _clearAdsErrors(ads) {\r\n _.each(ads, (ad) => {\r\n ad.hasError = false;\r\n ad.errors = [];\r\n });\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport { adGroupTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/adGroupTypeEnum';\r\n\r\nexport default class {\r\n constructor({\r\n availableExtensions = [],\r\n adExtensionsDynamicFeatures,\r\n adExtensionsStaticFeatures,\r\n } = {}) {\r\n koSchema.properties(this);\r\n\r\n this.adGroups = ko.observableArray([]);\r\n\r\n this.adExtensionDynamicFeatures = {};\r\n this.adExtensionStaticFeatures = {};\r\n _.each(availableExtensions, (type) => {\r\n this[type] = ko.observableArray([]);\r\n if (adExtensionsDynamicFeatures) {\r\n // Resolving dynamic features here in view-model,\r\n // so the template and Knockout bindings don't have to\r\n this.adExtensionDynamicFeatures[type] = adExtensionsDynamicFeatures(type);\r\n }\r\n if (adExtensionsStaticFeatures) {\r\n // Resolving static features here in view-model,\r\n // so the template and Knockout bindings don't have to\r\n this.adExtensionStaticFeatures[type] = adExtensionsStaticFeatures[type];\r\n }\r\n }, this);\r\n\r\n this.dynamicAdGroups = ko.computed(() => {\r\n return _.filter(this.adGroups(), (adGroup) => adGroup.AdGroupType === adGroupTypeEnum.SearchDynamic);\r\n });\r\n this.standardAdGroups = ko.computed(() => {\r\n return _.filter(this.adGroups(), (adGroup) => adGroup.AdGroupType === adGroupTypeEnum.SearchStandard);\r\n });\r\n\r\n this.isDynamicSectionExpanded = ko.observable(true);\r\n this.isStandardSectionExpanded = ko.observable(true);\r\n\r\n this.isAdExtensionExpanded = ko.observable(true);\r\n\r\n this.hasChanges = ko.observable(false);\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-ad/viewmodel/create';\r\nimport AdGroupAdsEditor from '@bingads-webui-campaign-legacy/crud-ad/view/adGroupAdsEditor';\r\nimport createTemplate from '@bingads-webui-campaign-legacy/crud-ad/template/create.pug';\r\nimport appAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-app/view/associationsEditor';\r\nimport locationAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-location/view/associationsEditor';\r\nimport sitelinkAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-sitelink/view/associationsEditor';\r\nimport callAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-call/view/associationsEditor';\r\nimport calloutAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-callout/view/associationsEditor';\r\nimport reviewAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-review/view/associationsEditor';\r\nimport structuredsnippetAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-structuredsnippet/view/associationsEditor';\r\nimport priceAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-price/view/associationsEditor';\r\nimport promotionAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-promotion/view/associationsEditor';\r\nimport filterLinkAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-filter-link/view/associationsEditor';\r\nimport flyerAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-flyer/view/associationsEditor';\r\nimport actionlinkAssociationsEditor from '@bingads-webui-campaign-legacy/adextension-actionlink/view/associationsEditor';\r\nimport { universalItemTemplate as actionUniversalItemTemplate } from '@bingads-webui-campaign-legacy/adextension-actionlink/template';\r\nimport * as schemaMapper from '@bingads-webui-campaign-legacy/crud-ad/schemaMapper';\r\nimport { getODataErrors, getBulkApiErrors, isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport toggleDecorator from '@bingads-webui-component-legacy/dialog/toggleDecorator';\r\nimport { appendLearnMoreLink } from '@bingads-webui-component-legacy/help/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as scrollUtil from '@bingads-webui-component-legacy/extension/scrollTo';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { adGroupTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/adGroupTypeEnum';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst availableAdTypes = ['Text', 'AppInstall', 'DynamicSearch', 'ExpandedText', 'ResponsiveSearch'];\r\n\r\nfunction splitAds(change, action) {\r\n return _.chain(change)\r\n .pluck(action)\r\n .flatten()\r\n .groupBy('Type')\r\n .value();\r\n}\r\n\r\nfunction changes(viewList, adGroups) {\r\n const change = _.map(adGroups, (adGroup) => {\r\n return viewList[adGroup.Id].changes();\r\n });\r\n\r\n const added = splitAds(change, 'addedAds');\r\n const removed = splitAds(change, 'removedAdIds');\r\n\r\n return {\r\n added,\r\n removed,\r\n empty: _.isEmpty(_.flatten(_.values(added))) && _.isEmpty(_.flatten(_.values(removed))),\r\n };\r\n}\r\n\r\nconst editorViewMapper = {\r\n App: appAssociationsEditor,\r\n Call: callAssociationsEditor,\r\n Callout: calloutAssociationsEditor,\r\n Location: locationAssociationsEditor,\r\n Review: reviewAssociationsEditor,\r\n SiteLink: sitelinkAssociationsEditor,\r\n StructuredSnippet: structuredsnippetAssociationsEditor,\r\n Price: priceAssociationsEditor,\r\n Promotion: promotionAssociationsEditor,\r\n FilterLink: filterLinkAssociationsEditor,\r\n Flyer: flyerAssociationsEditor,\r\n Action: actionlinkAssociationsEditor,\r\n};\r\n\r\nconst permissions = config.get('Permissions') || {};\r\n\r\nexport default class CreateView extends Backbone.View {\r\n initialize({\r\n context = null,\r\n Campaign: campaign = null,\r\n campaignType = 'search',\r\n perfMarker = null,\r\n usePanel = false,\r\n isForVNext = false,\r\n newI18n,\r\n adExtensionsDynamicFeatures,\r\n activityLogger,\r\n serverContext,\r\n }) {\r\n this.context = context;\r\n this.campaign = campaign;\r\n this.campaignType = campaignType;\r\n this.perfMarker = perfMarker;\r\n this.usePanel = usePanel;\r\n this.isForVNext = isForVNext;\r\n this.newI18n = newI18n;\r\n this.activityLogger = activityLogger;\r\n this.serverContext = serverContext;\r\n\r\n if (this.perfMarker) {\r\n this.showAdAndExtensionMarker = this.perfMarker.createChild('Show_Ad_And_Extension', {\r\n autoEnd: true,\r\n });\r\n this.showAdAndExtensionMarker.willInit();\r\n }\r\n\r\n // order is required\r\n this.availableExtensions = _.chain([\r\n ['Action', permissions.IsActionLinkExtensionAllowed],\r\n ['Price', permissions.IsPriceExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['Location', permissions.IsLocationExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['App', permissions.IsAppExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['SiteLink', permissions.IsSiteLinkExtensionsAllowed],\r\n ['Call', permissions.IsCallExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['Callout', permissions.IsCalloutExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['Review', permissions.IsReviewExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['StructuredSnippet', permissions.IsStructuredSnippetExtensionAllowed && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ['Promotion', this.isForVNext && permissions.IsPromotionAdExtensionEnabled],\r\n ['FilterLink', this.isForVNext && permissions.IsFilterLinkAdExtensionEnabled],\r\n ['Flyer', this.isForVNext && permissions.IsFlyerAdExtensionEnabled && !permissions.IsDomesticSimplifiedChineseEnabled],\r\n ]).filter(([, allowed]) => allowed).map(([name]) => name).value();\r\n\r\n const adExtensionsStaticFeatures = {\r\n Action: {\r\n universalItemTemplate: actionUniversalItemTemplate,\r\n },\r\n };\r\n\r\n this.viewModel = new ViewModel({\r\n availableExtensions: this.availableExtensions,\r\n adExtensionsDynamicFeatures,\r\n adExtensionsStaticFeatures,\r\n });\r\n\r\n this.viewList = {};\r\n this.objective = config.get('CampaignObjective');\r\n this.suggestedExtensions = [];\r\n this.openedExtEditor = [];\r\n\r\n this.excuteObjective('initialize');\r\n }\r\n\r\n excuteObjective(method) {\r\n _\r\n .chain(this.objectiveActions)\r\n .result(this.objective)\r\n .result(method);\r\n\r\n return _.result(this.objectiveActions.All, method);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .create-extension': 'createExtension',\r\n 'click .edit-extension': 'editExtension',\r\n 'show.bs.collapse': 'toggleExpander',\r\n 'hide.bs.collapse': 'toggleExpander',\r\n };\r\n }\r\n\r\n logActivities(message, api = 'ad creation') {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(message, api);\r\n }\r\n }\r\n\r\n get objectiveActions() {\r\n return {\r\n 'WebsiteVisits': {\r\n initialize: () => {\r\n this.suggestedExtensions = ['SiteLink', 'Action', 'Callout', 'Promotion'];\r\n this.otherExtensions = ['Price', 'StructuredSnippet', 'FilterLink', 'Review', 'Call', 'Location', 'Flyer'];\r\n },\r\n },\r\n 'LocationVisits': {\r\n initialize: () => {\r\n this.suggestedExtensions = ['Location', 'Call', 'Action', 'Promotion'];\r\n this.otherExtensions = ['Review', 'Callout', 'StructuredSnippet', 'FilterLink', 'Price', 'SiteLink', 'Flyer'];\r\n },\r\n },\r\n 'WebsiteConversions': {\r\n initialize: () => {\r\n this.suggestedExtensions = ['Action', 'Price', 'Promotion', 'SiteLink'];\r\n this.otherExtensions = ['Callout', 'StructuredSnippet', 'FilterLink', 'Review', 'Location', 'Call', 'Flyer'];\r\n },\r\n },\r\n 'PhoneCalls': {\r\n initialize: () => {\r\n this.suggestedExtensions = ['Call', 'Callout', 'Review', 'SiteLink'];\r\n this.otherExtensions = ['StructuredSnippet', 'FilterLink', 'Price', 'Promotion', 'Action', 'Flyer'];\r\n },\r\n },\r\n 'AppInstalls': {\r\n initialize: () => {\r\n this.suggestedExtensions = ['App', 'Review'];\r\n this.otherExtensions = _.difference(this.availableExtensions, this.suggestedExtensions);\r\n },\r\n },\r\n 'All': {\r\n initialize: () => {\r\n // keep order of suggested and \"other\" extensions\r\n this.suggestedExtensions = _.intersection(this.suggestedExtensions, this.availableExtensions);\r\n this.otherExtensions = _.intersection(this.otherExtensions, this.availableExtensions);\r\n },\r\n willShow: () => {\r\n _.each(this.suggestedExtensions, (ext) => {\r\n this.openExtensionPanel(ext);\r\n });\r\n },\r\n },\r\n };\r\n }\r\n\r\n toggleExpander(evt) {\r\n const { target } = evt;\r\n const { id } = target;\r\n\r\n if (id === 'dynamicAdGroupAdEditorSection') {\r\n this.viewModel.isDynamicSectionExpanded(!this.viewModel.isDynamicSectionExpanded());\r\n } else if (id === 'standardAdGroupAdEditorSection') {\r\n this.viewModel.isStandardSectionExpanded(!this.viewModel.isStandardSectionExpanded());\r\n } else {\r\n this.viewModel.isAdExtensionExpanded(!this.viewModel.isAdExtensionExpanded());\r\n }\r\n }\r\n\r\n willShow() {\r\n\r\n window.scrollTo(0, 0);\r\n\r\n this.campaign = this.context.get('Campaign');\r\n this.defaultLandingPageUrl = this.context.get('LandingPageUrl') || '';\r\n this.viewModel.hasChanges(false);\r\n\r\n const dynamicDescriptionEnabled = !_.isEmpty(this.campaign) && this.campaign.DynamicDescriptionEnabled;\r\n\r\n if (_.isUndefined(this.dynamicDescriptionEnabled) && !_.isUndefined(dynamicDescriptionEnabled)) {\r\n // campaign has dsa settings, initialize the value of dynamicDescriptionEnabled\r\n this.dynamicDescriptionEnabled = dynamicDescriptionEnabled;\r\n } else if (dynamicDescriptionEnabled !== this.dynamicDescriptionEnabled) {\r\n // dynamic description changed, trigger the update to existing ad views\r\n _.each(this.viewList, (view) => {\r\n view.trigger('update:dynamicDescriptionEnabled', dynamicDescriptionEnabled);\r\n });\r\n this.dynamicDescriptionEnabled = dynamicDescriptionEnabled;\r\n }\r\n\r\n if (!_.isEmpty(this.campaign)) {\r\n const adGroups = this.context.get('AdGroups');\r\n\r\n this.excuteObjective('willShow');\r\n\r\n\r\n if (!_.isEmpty(adGroups)) {\r\n const originalIds = _.pluck(this.viewModel.adGroups(), 'Id');\r\n const newIds = _.pluck(adGroups, 'Id');\r\n\r\n const added = _.difference(newIds, originalIds);\r\n const removed = _.difference(originalIds, newIds);\r\n\r\n _.each(adGroups, (adgroup) => {\r\n if (_.contains(added, adgroup.Id)) {\r\n //add the adgroup which was created in previous step\r\n this.viewModel.adGroups.push(adgroup);\r\n } else if (!_.contains(removed, adgroup.Id)) {\r\n //refresh the adgroup which exist (keywords, name)\r\n this.viewList[adgroup.Id].viewModel.refresh(adGroups);\r\n }\r\n });\r\n\r\n if (!_.isEmpty(added)) {\r\n this.initializeAdGroupEditorView(added);\r\n }\r\n\r\n if (!_.isEmpty(removed)) {\r\n //remove the removed adgroups' backbone and view instance\r\n _.each(removed, (id) => {\r\n const removedAdGroup = _.findWhere(this.viewModel.adGroups(), { Id: id });\r\n\r\n this.viewModel.adGroups.remove(removedAdGroup);\r\n this.viewList[id].remove();\r\n delete this.viewList[id];\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n hasChanges() {\r\n return this.viewModel.hasChanges();\r\n }\r\n\r\n isMixedModeCampaignCreation() {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n return isDSAMixedModeCampaignEnabled && this.campaignType === 'search';\r\n }\r\n\r\n initializeAdGroupEditorView(adGroups) {\r\n _.each(adGroups, (id) => {\r\n this.viewList[id] = new AdGroupAdsEditor({\r\n newI18n: this.newI18n,\r\n adGroups: this.viewModel.adGroups(),\r\n adGroupId: id,\r\n Campaign: this.campaign,\r\n el: this.$el.find(`.adgroup-creative[data-id=${id}]`).find('.adgroup-ads-creative'),\r\n Language: this.campaign.Language,\r\n Languages: this.campaign.Languages,\r\n campaignType: this.campaignType,\r\n defaultLandingPageUrl: this.defaultLandingPageUrl,\r\n usePanel: this.usePanel,\r\n activityLogger: this.activityLogger,\r\n isForVNext: this.isForVNext,\r\n isMixedModeCampaignCreation: this.isMixedModeCampaignCreation(),\r\n perfMarker: this.perfMarker,\r\n serverContext: this.serverContext,\r\n }).render();\r\n\r\n this.viewList[id].on('copyToOthers', ({ sourceId, ad }) => {\r\n let adgroupsToPaste = this.viewModel.adGroups();\r\n const fromAdGroup = _.find(adgroupsToPaste, (adg) => adg.Id === sourceId);\r\n\r\n if (this.isMixedModeCampaignCreation()) {\r\n const dynamicAdGroups = this.viewModel.dynamicAdGroups();\r\n const standardAdGroups = this.viewModel.standardAdGroups();\r\n const { AdGroupType } = fromAdGroup;\r\n\r\n if (AdGroupType === adGroupTypeEnum.SearchStandard) {\r\n adgroupsToPaste = standardAdGroups;\r\n } else {\r\n adgroupsToPaste = dynamicAdGroups;\r\n }\r\n }\r\n\r\n _.each(adgroupsToPaste, (adgroup) => {\r\n const { Id } = adgroup;\r\n\r\n if (Id !== sourceId) {\r\n this.viewList[Id].copyAdFromOtherAdGroup(ad);\r\n }\r\n });\r\n });\r\n\r\n this.viewList[id].on('copyToSome', ({ ad, targetAdGroupIds }) => {\r\n _.each(targetAdGroupIds, (adGroupId) => {\r\n this.viewList[adGroupId].copyAdFromOtherAdGroup(ad);\r\n });\r\n });\r\n\r\n this.viewList[id].on('ads:changed', () => {\r\n this.viewModel.hasChanges(true);\r\n });\r\n });\r\n }\r\n\r\n render() {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n this.$el.html(createTemplate({\r\n appendLearnMoreLink,\r\n i18n,\r\n objective: this.objective,\r\n suggestedExtensions: this.suggestedExtensions,\r\n otherExtensions: this.otherExtensions,\r\n adExtensionDynamicFeatures: this.viewModel.adExtensionDynamicFeatures,\r\n adExtensionStaticFeatures: this.viewModel.adExtensionStaticFeatures,\r\n isDSAMixedModeCampaignEnabled,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.initializeAdGroupEditorView(_.pluck(this.viewModel.adGroups(), 'Id'));\r\n\r\n return this;\r\n }\r\n\r\n validate() {\r\n //check if there is any empty adgroups\r\n return _.chain(this.viewList)\r\n .map((view) => {\r\n view.clearAlertMessages();\r\n const hasAds = !view.isEmpty();\r\n const hasUniqAds = !view.viewModel.hasDuplicateAds();\r\n\r\n if (!hasAds) {\r\n this.logActivities('invalid: has no ads');\r\n }\r\n if (!hasUniqAds && this.activityLogger) {\r\n this.logActivities('invalid: has duplicate ads');\r\n }\r\n\r\n return hasAds && hasUniqAds;\r\n })\r\n .every()\r\n .value();\r\n }\r\n\r\n shouldCancel() {\r\n return this.save();\r\n }\r\n\r\n shouldNext() {\r\n return this.save();\r\n }\r\n\r\n shouldBack() {\r\n return true;\r\n }\r\n\r\n errorElements() {\r\n return this.$('.adgroup-ads__container .error, .adgroup-ads__container .alert-danger').filter(':visible');\r\n }\r\n\r\n save() {\r\n if (!this.validate()) {\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n const $dynamicAdGroupSection = this.$('#dynamicAdGroupAdEditorSection');\r\n const $standardAdGroupSection = this.$('#standardAdGroupAdEditorSection');\r\n\r\n if ($dynamicAdGroupSection) {\r\n $dynamicAdGroupSection.collapse('show');\r\n }\r\n if ($standardAdGroupSection) {\r\n $standardAdGroupSection.collapse('show');\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n if (this.perfMarker) {\r\n this.saveAdAndExtensionMarker = this.perfMarker.createChild('Save_Ad_And_Extension');\r\n this.saveAdAndExtensionMarker.willInit();\r\n }\r\n\r\n this.viewModel.errors.clear(isCampaignApiError);\r\n\r\n const results = changes.call(this, this.viewList, this.viewModel.adGroups());\r\n\r\n if (results.empty) {\r\n return true;\r\n } else {\r\n const adsToCreate = {\r\n Id: this.campaign.Id,\r\n Name: this.campaign.Name,\r\n };\r\n\r\n _.each(results.added, (value, key) => {\r\n adsToCreate[`${key}Ads`] = _.map(value, (ad) => {\r\n return _.pick(ad, schemaMapper[key](), 'AdGroup');\r\n });\r\n });\r\n\r\n return Promise.join(\r\n _.each(_.flatten(_.values(results.removed)), ({ Id, AdGroup: { Id: adGroupId } }) => {\r\n jsdata.Ad.destroy(Id, { adapter: 'bulk', parentId: adGroupId });\r\n }),\r\n ).then(() => {\r\n _.each(results.removed, (value, key) => {\r\n const count = _.size(value);\r\n\r\n if (count > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `delete${key}Ad`, count);\r\n }\r\n });\r\n\r\n return jsdata.Campaign.update(this.campaign.Id, adsToCreate, { adapter: 'bulk', cacheResponse: false })\r\n .then((response) => {\r\n return this.handleSave(response, results.added);\r\n })\r\n .catch((response) => {\r\n _.chain(response.errors).map((error) => error.Error).uniq().each((error) => {\r\n this.logActivities(error, 'ad creation api error');\r\n });\r\n\r\n if (response.errors && !response.entity) {\r\n //Ajax error [400] - RowCountExceeded\r\n this.viewModel.errors.add(getODataErrors(response.errors));\r\n return false;\r\n }\r\n\r\n const requestResult = this.handleSave(response.entity, results.added);\r\n\r\n if (!requestResult) {\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n }\r\n return requestResult;\r\n });\r\n })\r\n .catch(({ errors }) => {\r\n this.viewModel.errors.add(getBulkApiErrors(errors));\r\n\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n\r\n _.chain(errors).map((error) => error.Error).uniq().each((error) => {\r\n this.logActivities(error, 'ad creation api error');\r\n });\r\n\r\n return false;\r\n })\r\n .finally(withUiBlock());\r\n }\r\n }\r\n\r\n handleSave(response, original) {\r\n let count = 0;\r\n\r\n _.each(availableAdTypes, (type) => {\r\n _.each(original[type], (ad, index) => {\r\n ad.Id = Number(response[`${type}Ads`][index].Id);\r\n ad.isSaved = true;\r\n });\r\n\r\n count = _.size(response[`${type}Ads`]);\r\n\r\n if (count > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `create${type}Ad`, count);\r\n this.logActivities(count, `createAd: ${type}`);\r\n }\r\n });\r\n\r\n _.each(this.viewList, (view) => {\r\n //refresh main panel\r\n view.viewModel.slb.refreshSource();\r\n // empty the array of deletedAdIds\r\n view.viewModel.deletedAdIds = [];\r\n });\r\n\r\n if (this.saveAdAndExtensionMarker) {\r\n this.saveAdAndExtensionMarker.done();\r\n }\r\n return true;\r\n }\r\n\r\n editExtension(target) {\r\n const type = target.currentTarget.dataset.target;\r\n\r\n this.logActivities(`edit extension button clicked: ${type}`);\r\n this.openExtensionPanel(type, true);\r\n }\r\n\r\n createExtension(target) {\r\n const type = target.currentTarget.dataset.target;\r\n\r\n this.logActivities(`add extension button clicked: ${type}`);\r\n this.openExtensionPanel(type);\r\n }\r\n\r\n openExtensionPanel(type, isEdit = false) {\r\n if ((!_.contains(this.openedExtEditor, type) && _.result(this.viewModel, type).length === 0) || isEdit) {\r\n this.openedExtEditor.push(type);\r\n\r\n const EditorCtor = toggleDecorator.decorate(\r\n editorViewMapper[type],\r\n {\r\n getToggleEl: () => this.$(`.associations__container[data-type=${type}] .create-extension, .associations__container[data-type=${type}] .campaign-adextension-list`),\r\n containerCss: 'panel',\r\n },\r\n );\r\n\r\n const editor = new EditorCtor({\r\n campaignId: this.campaign.Id,\r\n campaignName: this.campaign.Name,\r\n entityType: 'campaign',\r\n hasSubTitle: true,\r\n showErrorsInline: true,\r\n popupFront: '.navbar-fixed-top',\r\n perfMarker: this.showAdAndExtensionMarker,\r\n usePanel: this.usePanel,\r\n isForVNext: this.isForVNext,\r\n vnextContext: {\r\n dynamicFeatures: this.viewModel.adExtensionDynamicFeatures[type],\r\n },\r\n activityLogger: this.activityLogger,\r\n }).render();\r\n\r\n editor.on('save', (ext) => {\r\n this.viewModel[type](ext);\r\n editor.remove();\r\n this.openedExtEditor = _.without(this.openedExtEditor, type);\r\n });\r\n\r\n editor.on('cancel', () => {\r\n editor.remove();\r\n this.openedExtEditor = _.without(this.openedExtEditor, type);\r\n });\r\n\r\n editor.on('extensions:changed', () => {\r\n this.viewModel.hasChanges(true);\r\n });\r\n }\r\n }\r\n\r\n remove() {\r\n _.each(this.viewList, (view) => {\r\n view.remove();\r\n });\r\n super.remove();\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nlet dynamicTextMenu = [\r\n { text: i18n.get('Ad_DynamicMenuParam1'), value: '{param1}' },\r\n { text: i18n.get('Ad_DynamicMenuParam2'), value: '{param2}' },\r\n { text: i18n.get('Ad_DynamicMenuParam3'), value: '{param3}' },\r\n];\r\n\r\nexport default {\r\n extend(viewModel, propertyNames) {\r\n _.each(propertyNames, (name) => {\r\n const property = viewModel[name];\r\n\r\n property.appendDynamicText = (data) => {\r\n const originalValue = property();\r\n\r\n property(originalValue + data.value);\r\n };\r\n\r\n property.dynamicTextMenu = dynamicTextMenu;\r\n });\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport { getCharCountExcludingAdCustomizers as newGetCharCountExcludingAdCustomizers } from '@bingads-webui-campaign/ad-customizers';\r\nimport { getCharCountExcludingAdCustomizers as legacyGetCharCountExcludingAdCustomizers } from '@bingads-webui-campaign-legacy/crud-ad/service/adCustomizersUtils';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { i18nDummy } from '@bingads-webui-campaign-legacy/crud-ad/service/utils/i18n-dummy-vnext';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nconst i18nAdCustomizers = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ad-customizers');\r\n\r\nconst {\r\n IsNewAdsAdCustomizerEditorEnabled,\r\n IsIfFunctionMilestone1Enabled,\r\n} = config.get('Permissions') || {};\r\n\r\nconst withNewAdCustomizerEditor = IsNewAdsAdCustomizerEditorEnabled ||\r\n IsIfFunctionMilestone1Enabled;\r\n\r\nconst getCharCountExcludingAdCustomizers = (value, name, adType = 'ExpandedTextAd', perfMarker) => {\r\n if (withNewAdCustomizerEditor) {\r\n return newGetCharCountExcludingAdCustomizers({\r\n text: value,\r\n field: name,\r\n deps: {\r\n i18n: i18nAdCustomizers,\r\n countdownI18nDummy: i18nDummy,\r\n config,\r\n instrumentation,\r\n edmCampaign,\r\n jsDataCampaign,\r\n perfMarker,\r\n },\r\n adType,\r\n });\r\n }\r\n\r\n return legacyGetCharCountExcludingAdCustomizers(value);\r\n};\r\n\r\nexport default {\r\n extend(viewModel, propertyNames, adType = 'ExpandedTextAd') {\r\n const inputLimit = 4000;\r\n const perfMarker = viewModel.perfMarker;\r\n\r\n _.each(propertyNames, (name) => {\r\n const property = viewModel[name];\r\n\r\n // We need to force trigger a change notification to get property.strRemaining to be re-evaluated\r\n // using above override instead of the one from 'component\\ko-schema-string\\js\\extension'\r\n if (typeof property === 'function') {\r\n // We don't use cjkRemaining for this form. So it's ok to only override this.\r\n property.remaining = ko.computed(() => {\r\n return property.maxLength() - getCharCountExcludingAdCustomizers(property(), name, adType, perfMarker);\r\n });\r\n property(property());\r\n } else {\r\n property.countCharCountExcludingAdCustomizers = () => {\r\n return getCharCountExcludingAdCustomizers(property.entity.get(name), name, adType, perfMarker);\r\n };\r\n }\r\n\r\n const lengthValidator = _.result(property.validators, 'maxLength') ||\r\n _.result(viewModel, ['model', 'validator', 'fieldValidators', name, 'validators', 'maxLength']);\r\n\r\n if (lengthValidator) {\r\n lengthValidator.isValid = (value) => {\r\n if (!value && lengthValidator.nullable) {\r\n return true;\r\n }\r\n\r\n if (_.isNull(value) || _.isUndefined(value)) {\r\n return false;\r\n }\r\n\r\n if (value.length > inputLimit) {\r\n return false;\r\n }\r\n\r\n return getCharCountExcludingAdCustomizers(value, name, adType, perfMarker) <= property.maxLength();\r\n };\r\n\r\n lengthValidator.message = function () {\r\n return i18n.get(`Ad_Validation_${name}LengthExceeded_New`, {\r\n count: property.maxLength(),\r\n });\r\n };\r\n\r\n lengthValidator.blockInput = false;\r\n lengthValidator.process = null;\r\n }\r\n });\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\n\r\nexport function instrument(operation, data) {\r\n switch (operation) {\r\n case 'create': {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createAdgroup', '1');\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createKeyword', _.size(data.Keywords));\r\n break;\r\n }\r\n case 'update': {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'updateAdgroup', '1');\r\n const deletedKeywordsCount = _.size(_.where(data.Keywords, {Status: 'Deleted'}));\r\n const createdKeywordsCount = _.size(data.Keywords) - deletedKeywordsCount;\r\n\r\n if (deletedKeywordsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'deleteKeyword', deletedKeywordsCount);\r\n }\r\n if (createdKeywordsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createKeyword', createdKeywordsCount);\r\n }\r\n break;\r\n }\r\n case 'delete': {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'deleteAdgroup', '1');\r\n break;\r\n }\r\n case 'save': {\r\n const deletedKeywordsCount = _.size(_.where(data.Keywords, {Status: 'Deleted'}));\r\n const createdKeywordsCount = _.size(data.Keywords) - deletedKeywordsCount;\r\n\r\n if (deletedKeywordsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'deleteKeyword', deletedKeywordsCount);\r\n }\r\n if (createdKeywordsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createKeyword', createdKeywordsCount);\r\n }\r\n break;\r\n }\r\n default:\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport landingPage from '@bingads-webui-campaign-legacy/crud-adgroup/template/landingPage.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n\r\n this.viewmodel = {\r\n url: ko.observable(''),\r\n isNotReady: ko.observable(false),\r\n };\r\n\r\n this.viewmodel.url.subscribe(this.urlEntered.bind(this));\r\n this.viewmodel.isNotReady.subscribe(() => {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal('website not ready clicked');\r\n }\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'keyup input.form-control': 'checkForEnter',\r\n };\r\n }\r\n\r\n urlEntered() {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal('url change');\r\n }\r\n this.trigger('urlEntered', this.viewmodel.url());\r\n }\r\n\r\n render() {\r\n this.$el.html(\r\n landingPage({\r\n i18n,\r\n isForVNext: this.options.isForVNext,\r\n })\r\n );\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n return this;\r\n }\r\n\r\n checkForEnter(e) {\r\n if (e.keyCode === 13) {\r\n this.trigger('urlEntered', this.viewmodel.url());\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport 'backbone';\r\nimport KeywordPlannerView from '@bingads-webui-campaign-legacy/crud-adgroup/view/keywordPlanner';\r\nimport LandingPageView from '@bingads-webui-campaign-legacy/crud-adgroup/view/landingPage';\r\n\r\nexport function decorate(view) {\r\n return view.extend({\r\n initialize(options = {}) {\r\n this.options = options;\r\n _.bind(view.prototype.initialize, this, options)();\r\n this.keywordPlannerView = new KeywordPlannerView({\r\n scenario: 'campaign creation',\r\n isCampaignCreation: true,\r\n usePanel: options && options.usePanel,\r\n activityLogger: options && options.activityLogger,\r\n });\r\n this.keywordPlannerTimeout = 500;\r\n this.keywordPlannerView.on({\r\n 'addAdgroup': (data) => {\r\n this.addSuggestion(data);\r\n },\r\n });\r\n\r\n this.landingPageView = new LandingPageView({\r\n activityLogger: options && options.activityLogger,\r\n isForVNext: options && options.isForVNext,\r\n });\r\n this.landingPageView.on({\r\n 'urlEntered': (url) => {\r\n this.keywordPlannerView.onSearch({url});\r\n this.options.context.set({'LandingPageUrl': url});\r\n },\r\n });\r\n },\r\n\r\n willShow(shouldNotCreateDefaultEditor, shouldNotRenderWhenThereIsNoAdGroup) {\r\n _.bind(view.prototype.willShow, this)(shouldNotCreateDefaultEditor, shouldNotRenderWhenThereIsNoAdGroup);\r\n\r\n if (_.isObject(this.campaign)) {\r\n this.checkKeywordPlannerSupport();\r\n }\r\n\r\n const showLandingPage = this.ko_model.isKeywordPlannerEnabled() && !this.keywordPlannerView.viewmodel.allLocationsUnsupported();\r\n\r\n this.updateLandingPageStatus(showLandingPage);\r\n },\r\n\r\n render(shouldNotCreateDefaultEditor = false) {\r\n _.bind(view.prototype.render, this)();\r\n if (!_.isUndefined(this.campaign)) {\r\n this.ko_model.adGroups.subscribe((valueArray) => {\r\n this.keywordPlannerView.updateAdgroupsList(_.map(valueArray, (value) => {\r\n return {\r\n 'id': value.ko_model.Id(),//eslint-disable-line\r\n 'name': value.ko_model.Name,\r\n 'index': value.ko_model.options.index,\r\n };\r\n }));\r\n });\r\n this.landingPageView.render();\r\n this.$('.landing-page-container').append(this.landingPageView.el);\r\n\r\n if (!shouldNotCreateDefaultEditor) {\r\n this.create();\r\n }\r\n\r\n this.keywordPlannerView.render();\r\n this.$('.keyword-planner-container').append(this.keywordPlannerView.el);\r\n }\r\n return this;\r\n },\r\n\r\n updateLandingPageStatus(show) {\r\n this.ko_model.showLandingPage(show);\r\n },\r\n\r\n checkKeywordPlannerSupport() {\r\n const isLanguagesSupported = KeywordPlannerView.isLanguageSupported(this.campaign.Languages);\r\n\r\n this.ko_model.isKeywordPlannerEnabled(isLanguagesSupported);\r\n this.keywordPlannerView.setLanguages(this.campaign.Languages);\r\n\r\n if (this.ko_model.isKeywordPlannerEnabled()) {\r\n this.keywordPlannerView.setLocationTargetingByCampaign();\r\n }\r\n },\r\n\r\n create() {\r\n _.bind(view.prototype.create, this)();\r\n\r\n const updateView = _.last(this.ko_model.adGroups());\r\n\r\n updateView.on({\r\n 'delete': () => {\r\n setTimeout(this.moveKeywordPlanner.bind(this), this.keywordPlannerTimeout);\r\n },\r\n 'seedKeywordsEntered': (seedKeywords) => {\r\n if (_.isArray(seedKeywords) && seedKeywords.length > 0) {\r\n this.keywordPlannerView.onSearch({\r\n keywords: seedKeywords,\r\n });\r\n }\r\n },\r\n 'selectThisAdGroup': (adGroup) => {\r\n if (_.isNull(this.selectedAdGroup) || this.selectedAdGroup.options.index !== adGroup.options.index) {\r\n this.moveKeywordPlanner();\r\n }\r\n },\r\n });\r\n },\r\n\r\n moveKeywordPlanner() {\r\n const keywordPlannerTop = _.isNull(this.selectedAdGroup) ? 0 : this.selectedAdGroup.$el.position().top;\r\n\r\n this.ko_model.keywordPlannerTopValue(keywordPlannerTop);\r\n },\r\n\r\n changeSelectedAdGroup(newSelected) {\r\n _.bind(view.prototype.changeSelectedAdGroup, this, newSelected)();\r\n setTimeout(this.moveKeywordPlanner.bind(this), this.keywordPlannerTimeout);\r\n },\r\n\r\n addSuggestion(data) {\r\n const name = this.ko_model.getUniqueName(data.data.Name);\r\n const keywords = _.pluck(data.data.Suggestions, 'Keyword');\r\n\r\n switch (data.mode) {\r\n case 'AddToAllAdGroups': {\r\n const targets = this.ko_model.adGroups();\r\n\r\n _.each(targets, (target) => {\r\n target.addSuggestion(keywords, undefined, undefined, data.sourceReqId);\r\n });\r\n this.save(true);\r\n break;\r\n }\r\n\r\n case 'AddToSelectedAdGroups': {\r\n if (_.isArray(data.selectedAdgroups) && data.selectedAdgroups.length > 0) {\r\n const targets = _.pluck(data.selectedAdgroups, 'index');\r\n\r\n _.each(this.ko_model.adGroups(), (adGroup) => {\r\n if (_.contains(targets, adGroup.ko_model.options.index)) {\r\n adGroup.addSuggestion(keywords, undefined, undefined, data.sourceReqId);\r\n }\r\n });\r\n this.save(true);\r\n }\r\n break;\r\n }\r\n\r\n default: {\r\n const suggestedAvgCpc = _.result(data.data && data.data.AggregateMetric, 'AverageCPC');\r\n\r\n if (_.isObject(this.selectedAdGroup) && this.selectedAdGroup.subView.isEmpty()) {\r\n this.selectedAdGroup.addSuggestion(keywords, name, suggestedAvgCpc, data.sourceReqId);\r\n return;\r\n }\r\n this.create();\r\n this.selectedAdGroup.addSuggestion(keywords, name, suggestedAvgCpc, data.sourceReqId);\r\n\r\n break;\r\n }\r\n }\r\n },\r\n });\r\n}\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ko_schema from '@bingads-webui-component-legacy/ko-schema/index';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar viewModel = function (options) {\r\n var self = this;\r\n self.options = options || ({});\r\n ko_schema.properties(self);\r\n self.adGroups = ko.observableArray([]);\r\n self.numCreated = 0;\r\n self.maxAdGroups = _.isFinite(options.maxAdGroups) ? options.maxAdGroups : 100;\r\n self.isValid = ko.observable(true);\r\n self.isKeywordPlannerEnabled = ko.observable(false);\r\n self.isMixedModeCampaignCreation = options.isMixedModeCampaignCreation;\r\n self.isForVNext = options.isForVNext;\r\n self.hasChanges = ko.observable(false);\r\n self.hasMaxAdGroups = ko.computed(function () {\r\n return self.adGroups().length >= self.maxAdGroups;\r\n });\r\n self.showAdGroupLimitError = ko.computed(function () {\r\n return self.hasMaxAdGroups() && self.maxAdGroups > 1;\r\n });\r\n self.isDuplicateName = function (name, index) {\r\n var isDuplicate = false;\r\n if (_.size(name.trim()) > 0) {\r\n _.each(self.adGroups(), function (adGroup) {\r\n var comparisonName = adGroup.ko_model.Name().toLowerCase();\r\n if (_.isString(comparisonName) && comparisonName === name.toLowerCase() && adGroup.options.index !== index) {\r\n isDuplicate = true;\r\n }\r\n });\r\n }\r\n return isDuplicate;\r\n };\r\n self.checkDuplicates = function () {\r\n _.each(self.adGroups(), function (adGroup) {\r\n var isDuplicated = self.isDuplicateName(adGroup.ko_model.Name(), adGroup.options.index);\r\n adGroup.ko_model.isNameDuplicate(isDuplicated);\r\n });\r\n };\r\n self.getUniqueName = function (name) {\r\n var uniqueName = name;\r\n var index = 1;\r\n while (self.isDuplicateName(uniqueName, -1) && index <= self.maxAdGroups) {\r\n index++;\r\n uniqueName = name + ' ' + index;\r\n }\r\n return uniqueName;\r\n };\r\n self.removeAdGroup = function (toRemove) {\r\n self.adGroups.remove(toRemove);\r\n };\r\n self.addAdGroup = function (toAdd) {\r\n self.adGroups.push(toAdd);\r\n };\r\n self.showLandingPage = ko.observable(true);\r\n self.keywordPlannerTopValue = ko.observable();\r\n self.keywordPlannerTopValuePixel = ko.computed(function () {\r\n var offset;\r\n if (self.isMixedModeCampaignCreation && self.isForVNext) {\r\n offset = 160;\r\n } else if (self.showLandingPage()) {\r\n offset = 100;\r\n } else {\r\n offset = 25;\r\n }\r\n return self.keywordPlannerTopValue() + offset + 'px';\r\n });\r\n self.isWaitingForSaveResponse = ko.computed(function () {\r\n return _.every(self.adGroups(), function (adGroup) {\r\n return !adGroup.ko_model.isWaitingForSaveResponse();\r\n });\r\n });\r\n self.hasOneAdGroup = ko.computed(function () {\r\n return _.size(self.adGroups()) <= 1;\r\n });\r\n};\r\nexport default viewModel;\r\n\r\n","/* eslint-disable */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport bootstrap from 'bootstrap';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-adgroup/template/create.pug';\r\nimport CreateViewModel from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/create';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as scrollUtil from '@bingads-webui-component-legacy/extension/scrollTo';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport * as errorExtractor from '@bingads-webui-campaign-legacy/crud-adgroup/share/errorExtractor';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar View = Backbone.View.extend({\r\n events: {\r\n 'click .btn-create-adgroup': 'createAndRefocus'\r\n },\r\n initialize: function (options) {\r\n var self = this;\r\n self.options = _.defaults({}, options, {\r\n maxAdGroups: 100,\r\n isOptional: false,\r\n checkAdGroupNameDuplicates: null\r\n });\r\n self.adapter = {\r\n adapter: self.options.adapter || 'bulk'\r\n };\r\n self.ko_model = new CreateViewModel({\r\n maxAdGroups: this.options.maxAdGroups,\r\n campaignType: this.options.campaignType,\r\n isMixedModeCampaignCreation: options.isMixedModeCampaignCreation,\r\n isForVNext: options.isForVNext\r\n });\r\n self.existError = false;\r\n this.updateViews = [];\r\n },\r\n willShow: function (shouldNotCreateDefaultEditor, shouldNotRenderWhenThereIsNoAdGroup) {\r\n window.scrollTo(0, 0);\r\n var self = this;\r\n if (self.options.context instanceof Backbone.Model) {\r\n self.campaign = self.options.context.get('Campaign');\r\n if (self.ko_model.adGroups().length === 0 && !shouldNotRenderWhenThereIsNoAdGroup) {\r\n self.render(shouldNotCreateDefaultEditor);\r\n } else {\r\n _.each(self.ko_model.adGroups(), function (adGroup) {\r\n adGroup.updateCampaign();\r\n });\r\n _.invoke(self.ko_model.adGroups(), 'updateOnVisible');\r\n }\r\n }\r\n self.ko_model.hasChanges(false);\r\n },\r\n hasChanges: function () {\r\n return this.ko_model.hasChanges();\r\n },\r\n shouldNext: function () {\r\n return this.save(true);\r\n },\r\n shouldBack: function () {\r\n if (this.validate()) {\r\n this.save(false);\r\n }\r\n return true;\r\n },\r\n shouldCancel: function () {\r\n return this.save(true);\r\n },\r\n getUpdates: function (shouldValidate) {\r\n var self = this;\r\n var updates = {\r\n Id: self.campaign.Id,\r\n AdGroups: []\r\n };\r\n if (shouldValidate) {\r\n if (!self.validate()) {\r\n return false;\r\n }\r\n self.existError = false;\r\n }\r\n _.each(self.ko_model.adGroups(), function (adGroup, index) {\r\n var changes = adGroup.getChanges();\r\n if (!_.isNull(changes)) {\r\n changes.AdScheduleUseSearcherTimeZone = false;\r\n updates.AdGroups.push(changes);\r\n }\r\n });\r\n return updates;\r\n },\r\n errorElements: function () {\r\n return this.$('.adgroups-keywords__container .error, .adgroups-keywords__container .alert-danger').filter(':visible');\r\n },\r\n showErrorElements: function () {\r\n this.selectedAdGroup = null;\r\n _.each(this.ko_model.adGroups(), function (adGroup) {\r\n if (!adGroup.ko_model.isOpen()) {\r\n adGroup.collapse('show');\r\n }\r\n });\r\n setTimeout((function () {\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n }).bind(this), 500);\r\n },\r\n save: function (shouldValidate) {\r\n var self = this;\r\n var updates = self.getUpdates(shouldValidate);\r\n var saveAdGroupKeywordMarker = null;\r\n if (updates === false) {\r\n self.showErrorElements();\r\n return false;\r\n }\r\n if (_.size(updates.AdGroups) === 0) {\r\n if (self.existError) {\r\n return false;\r\n }\r\n self.updateContext();\r\n return true;\r\n }\r\n if (this.options && this.options.perfMarker) {\r\n saveAdGroupKeywordMarker = this.options.perfMarker.createChild('Save_AdGroup_Keyword');\r\n saveAdGroupKeywordMarker.willInit();\r\n }\r\n var updatedAdgroupsCount = _.size(_.filter(updates.AdGroups, function (ag) {\r\n return _.has(ag, 'Id');\r\n }));\r\n var createdAdgroupsCount = _.size(updates.AdGroups) - updatedAdgroupsCount;\r\n var adgroupType = _.result(_.first(updates.AdGroups), 'AdGroupType');\r\n self.existError = false;\r\n return jsdata.Campaign.update(self.campaign.Id, updates, self.adapter).then(function (data) {\r\n if (updatedAdgroupsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `updateAdgroup | type: ${adgroupType}`, updatedAdgroupsCount);\r\n }\r\n if (createdAdgroupsCount > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, `createAdgroup | type: ${adgroupType}`, createdAdgroupsCount);\r\n }\r\n _.each(data.AdGroups, function (adGroup) {\r\n var toUpdate = _.find(self.ko_model.adGroups(), function (adGroupView) {\r\n return adGroupView.ko_model.options.index === parseInt(adGroup['Client Id']);\r\n }, self);\r\n if (toUpdate) {\r\n toUpdate.updateViewModels(adGroup);\r\n }\r\n if (self.options.instrumentation) {\r\n self.options.instrumentation.instrument('save', adGroup);\r\n }\r\n });\r\n self.updateContext(createdAdgroupsCount, updatedAdgroupsCount, adgroupType);\r\n if (saveAdGroupKeywordMarker) {\r\n saveAdGroupKeywordMarker.done();\r\n }\r\n return true;\r\n }).catch(function (errors) {\r\n self.existError = true;\r\n if (self.options.activityLogger && errors && errors.errors) {\r\n _.chain(errors.errors).map(function (error) {\r\n return error.Error;\r\n }).uniq().each(function (error) {\r\n self.options.activityLogger.signal(error, 'adgroup creation api error');\r\n });\r\n }\r\n if (!_.isObject(errors) || !_.isObject(errors.entity)) {\r\n self.showErrorElements();\r\n if (errors && errors.errors) {\r\n self.ko_model.errors.add(i18nErrors.getODataErrors(errors.errors));\r\n }\r\n return false;\r\n }\r\n var hasErrors = _.map(errors.entity.AdGroups, function (adGroup) {\r\n var errorList = _.where(errors.errors, {\r\n 'Client Id': adGroup['Client Id']\r\n });\r\n var subEntity = self.options.isAutoTargetCampaign ? 'DsaTargets' : 'Keywords';\r\n var canEdit = self.options.isAutoTargetCampaign;\r\n errorExtractor.extract(adGroup, errors, errorList, subEntity, canEdit);\r\n var toUpdate = _.find(self.ko_model.adGroups(), function (adGroupView) {\r\n return adGroupView.ko_model.options.index === parseInt(adGroup['Client Id']);\r\n });\r\n if (toUpdate) {\r\n if (_.isEmpty(errorList)) {\r\n toUpdate.updateViewModels(adGroup);\r\n } else {\r\n toUpdate.updateViewModelsOnError({\r\n entity: adGroup,\r\n errors: errorList\r\n }, subEntity);\r\n }\r\n }\r\n return !_.isEmpty(errorList);\r\n });\r\n if (_.some(hasErrors)) {\r\n self.showErrorElements();\r\n return false;\r\n } else {\r\n self.updateContext(createdAdgroupsCount, updatedAdgroupsCount, adgroupType);\r\n self.existError = false;\r\n return true;\r\n }\r\n }).finally(withUiBlock());\r\n },\r\n validate: function () {\r\n var isValid = _.chain(this.ko_model.adGroups()).map(function (adGroup) {\r\n return adGroup.validate();\r\n }).every().value();\r\n this.ko_model.isValid(isValid);\r\n return isValid;\r\n },\r\n updateContext: function (createdAdgroupsCount, updatedAdgroupsCount, adgroupType) {\r\n if (this.options.activityLogger && createdAdgroupsCount > 0) {\r\n this.options.activityLogger.signal(createdAdgroupsCount, `create adgroup | type: ${adgroupType}`);\r\n }\r\n if (this.options.activityLogger && updatedAdgroupsCount > 0) {\r\n this.options.activityLogger.signal(updatedAdgroupsCount, `update adgroup | type: ${adgroupType}`);\r\n }\r\n var contextAdGroups = [];\r\n _.each(this.ko_model.adGroups(), function (adGroup, index) {\r\n contextAdGroups.push(adGroup.getContextObject());\r\n });\r\n this.options.context.set({\r\n 'AdGroups': contextAdGroups\r\n });\r\n },\r\n render: function () {\r\n if (!_.isUndefined(this.campaign)) {\r\n this.$el.html(tmpl({\r\n isAutoTargetCampaign: this.options.isAutoTargetCampaign,\r\n i18n: i18n,\r\n maxAdGroupsError: i18n.get('AdGroup_Message_MaxAdGroups').replace('{0}', this.ko_model.maxAdGroups)\r\n }));\r\n ko.applyBindings(this.ko_model, this.el);\r\n this.$('.ad-group-list-container')[0].addEventListener('change', (function () {\r\n this.ko_model.hasChanges(true);\r\n }).bind(this), false);\r\n }\r\n return this;\r\n },\r\n create: function () {\r\n var self = this;\r\n if (self.ko_model.hasMaxAdGroups()) {\r\n return;\r\n }\r\n self.ko_model.numCreated++;\r\n var updateView = new self.options.UpdateView(_.extend({}, self.options, {\r\n index: self.ko_model.numCreated,\r\n context: self.options.context,\r\n adapter: self.options.adapter,\r\n showErrorsInline: true,\r\n instrumentation: self.options.instrumentation,\r\n defaultBid: self.options.defaultBid,\r\n activityLogger: self.options.activityLogger,\r\n isForVNext: self.options.isForVNext,\r\n hideHeader: self.options.hideHeader\r\n })).render();\r\n this.updateViews.push(updateView);\r\n self.ko_model.addAdGroup(updateView);\r\n self.trigger('createAdGroupEditorView', updateView);\r\n if (_.size(self.ko_model.adGroups()) <= 1) {\r\n if (!self.options.isOptional) {\r\n updateView.ko_model.isOnlyAdGroup(true);\r\n }\r\n } else if (_.size(self.ko_model.adGroups()) >= 2) {\r\n self.ko_model.adGroups()[0].ko_model.isOnlyAdGroup(false);\r\n }\r\n if (_.isObject(self.selectedAdGroup) && self.selectedAdGroup.ko_model.isOpen()) {\r\n self.selectedAdGroup.validate();\r\n }\r\n self.changeSelectedAdGroup(updateView);\r\n var isDuplicated = self.ko_model.isDuplicateName(updateView.ko_model.Name(), updateView.options.index);\r\n updateView.ko_model.isNameDuplicate(isDuplicated);\r\n var logNameChange = _.once(function () {\r\n if (self.options.activityLogger) {\r\n self.options.activityLogger.signal('adgroup name change');\r\n }\r\n });\r\n updateView.on({\r\n 'show': function (newSelected, e) {\r\n self.changeSelectedAdGroup(newSelected);\r\n },\r\n 'delete': function (deletedAdGroup) {\r\n self.updateViews = self.updateViews.filter(function (view) {\r\n return view !== updateView;\r\n });\r\n if (self.options.activityLogger) {\r\n self.options.activityLogger.signal('remove adgroup clicked');\r\n }\r\n self.ko_model.hasChanges(true);\r\n self.ko_model.removeAdGroup(deletedAdGroup);\r\n if (self.lastDeleted && self.lastDeleted.$('.deletedConfirmation')) {\r\n self.lastDeleted.$el.hide();\r\n }\r\n self.lastDeleted = deletedAdGroup;\r\n if (_.isEqual(self.selectedAdGroup, deletedAdGroup)) {\r\n self.selectedAdGroup = null;\r\n }\r\n if (!self.options.checkAdGroupNameDuplicates) {\r\n self.ko_model.checkDuplicates();\r\n } else {\r\n self.options.checkAdGroupNameDuplicates();\r\n }\r\n if (_.size(self.ko_model.adGroups()) === 1) {\r\n var onlyAdGroup = self.ko_model.adGroups()[0];\r\n if (!self.options.isOptional) {\r\n onlyAdGroup.ko_model.isOnlyAdGroup(true);\r\n if (!onlyAdGroup.ko_model.isOpen()) {\r\n onlyAdGroup.collapse('show');\r\n }\r\n }\r\n }\r\n },\r\n 'nameChanged': function (adGroup) {\r\n logNameChange();\r\n if (!self.options.checkAdGroupNameDuplicates) {\r\n var isDuplicated = self.ko_model.isDuplicateName(adGroup.ko_model.Name(), adGroup.options.index);\r\n adGroup.ko_model.isNameDuplicate(isDuplicated);\r\n self.ko_model.checkDuplicates();\r\n } else {\r\n self.options.checkAdGroupNameDuplicates();\r\n }\r\n },\r\n 'selectThisAdGroup': function (adGroup) {\r\n if (_.isNull(self.selectedAdGroup) || self.selectedAdGroup.options.index !== adGroup.options.index) {\r\n self.changeSelectedAdGroup(adGroup);\r\n }\r\n }\r\n });\r\n self.$('.ad-group-list').append(updateView.el);\r\n self.ko_model.hasChanges(true);\r\n },\r\n createAndRefocus: function () {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal('add new adgroup clicked');\r\n }\r\n this.create();\r\n _.last(this.$('.adgroup-name')).focus();\r\n },\r\n changeSelectedAdGroup: function (newSelected) {\r\n if (_.isObject(this.selectedAdGroup) && this.selectedAdGroup.ko_model.isOpen() && !this.selectedAdGroup.ko_model.isOnlyAdGroup()) {\r\n this.selectedAdGroup.collapse('hide');\r\n }\r\n this.selectedAdGroup = newSelected;\r\n }\r\n});\r\nexport default View;\r\n\r\n","import _ from 'underscore';\r\n\r\nexport function extract(adGroup, errors, errorList, subEntity, canEdit) {\r\n if (_.isArray(adGroup[subEntity])) {\r\n _.each(adGroup[subEntity], (item) => {\r\n if (item['Client Id'] && (canEdit || (!canEdit && !item.Id))) {\r\n const errorsOfThisItem = _.where(errors.errors, { 'Client Id': item['Client Id'] });\r\n\r\n Array.prototype.push.apply(errorList, errorsOfThisItem);\r\n }\r\n });\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default function ViewModel(options) {\r\n this.options = options || {};\r\n this.gridData = ko.observableArray([]);\r\n this.adgroups = [];\r\n\r\n this.locations = ko.observableArray([]);\r\n this.tire2Locations = ko.observableArray([]);\r\n this.languages = ko.observableArray([]);\r\n this.numLocationsTargeted = ko.observable(0);\r\n this.countryLocationInfo = ko.observable([]);\r\n\r\n\r\n this.noSuggestionNote = ko.observable(false);\r\n\r\n this.allLocationsUnsupported = ko.computed(() => {\r\n return this.locations().length === 0 && this.numLocationsTargeted() > 0;\r\n });\r\n\r\n this.onlytire2LocationSupported = ko.computed(() => {\r\n return this.tire2Locations().length === this.locations().length;\r\n });\r\n this.excludedLocationsWarning = ko.computed(() => {\r\n if (this.locations().length !== this.numLocationsTargeted()) {\r\n if (this.allLocationsUnsupported()) {\r\n return i18n.get('KeywordPlanner_NoSuggestions_Warning');\r\n }\r\n\r\n if (this.gridData().length > 0) {\r\n return i18n.get('KeywordPlanner_UnsupportedLocations_Warning')\r\n .replace('{0}', this.locations().length)\r\n .replace('{1}', this.numLocationsTargeted());\r\n }\r\n }\r\n\r\n return false;\r\n });\r\n\r\n this.selectMultiIdeasText = ko.observable('');\r\n\r\n this.recentUserActionPrompt = ko.observable('');\r\n\r\n this.isKeywordPlannerVisible = ko.computed(() => {\r\n return this.gridData().length > 0;\r\n });\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default function ViewModel(options = {}) {\r\n this.suggestedAdgroup = options.SuggestedAdGroup;\r\n this.gridData = options.SuggestedAdGroup.Suggestions;\r\n this.adgroups = ko.observableArray(options.AdGroups);\r\n}\r\n","export const AddToNewAdGroup = 'AddToNewAdGroup';\r\nexport const AddToAllAdGroups = 'AddToAllAdGroups';\r\nexport const AddToSelectedAdGroups = 'AddToSelectedAdGroups';\r\n","const options = {\r\n compact: 'short',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n};\r\n\r\nexport function getSearchRange(value) {\r\n const base = Math.pow(10, Math.floor(Math.log10(value)));\r\n\r\n return {\r\n ceil: base * 10,\r\n floor: base < 10 ? 0 : base,\r\n };\r\n}\r\n\r\nexport function getSearchRangeString(value, i18n) {\r\n const range = getSearchRange(value);\r\n\r\n if (range.ceil === 0) {\r\n return '-';\r\n }\r\n return `${i18n.formatDecimal(range.floor, options)} - ${i18n.formatDecimal(range.ceil, options)}`;\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/keywordPlannerAdvanced';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-adgroup/template/keywordPlannerAdvanced.pug';\r\nimport * as keywordPlannerCreateOptions from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/keywordPlannerCreateOptions';\r\nimport pgrid from '@bingads-webui-component-legacy/github/modules/projection-grid/module/projection-grid';\r\nimport { bingadsGridColumn } from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport popup from '@bingads-webui-component-legacy/dialog/popup';\r\nimport { getSearchRangeString } from '../share/getSearchRange';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n\r\n if (!_.isUndefined(options.AdGroups)) {\r\n let unnameCounter = 0;\r\n\r\n options.AdGroups = _.map(options.AdGroups, (ag) => {\r\n const isUnnamed = ag.name() === '';\r\n\r\n return _.extend({}, ag, {\r\n checked: ko.observable(false),\r\n isUnnamed,\r\n defaultName: ko.observable(isUnnamed ? `${i18n.get('KeywordPlanner_NoNameAdgroup_DefaultName')} ${++unnameCounter}` : ''),\r\n });\r\n });\r\n }\r\n\r\n this.viewmodel = new ViewModel(options);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .apply-to-adgroups': 'applyToAdgroups',\r\n 'click .add-to-new-adgroup': 'addToNewAdgroup',\r\n 'click .add-to-all-adgroups': 'addToAllAdgroups',\r\n 'click .add-to-some-adgroups': 'addToSomeAdgroups',\r\n 'click .cancel-panel': 'cancelPanel',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n i18n,\r\n }));\r\n\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n this.grid = pgrid.factory({ vnext: true })\r\n .create({\r\n tableClasses: ['table', 'table-hover', 'grid', 'grid-table'],\r\n dataSource: {\r\n type: 'memory',\r\n data: this.viewmodel.gridData,\r\n },\r\n rows: {\r\n bodyRows: [{\r\n type: 'data-rows',\r\n classes: ['table__row--keyword-planner'],\r\n }],\r\n },\r\n columns: this.getColumns(),\r\n selection: {\r\n enabled: true,\r\n a11y: {\r\n selectAllLabel: i18n.getString('KeywordPlanner_GridColumn_SelectAll'),\r\n },\r\n },\r\n });\r\n\r\n this.grid.gridView.render();\r\n this.$('.grid-container').append(this.grid.gridView.el);\r\n return this;\r\n }\r\n\r\n getColumns() {\r\n return _.map([\r\n {\r\n name: 'name',\r\n title: i18n.getString('KeywordPlanner_GridColumn_Suggestions'),\r\n type: 'string',\r\n sortable: true,\r\n property: (item) => item.Keyword,\r\n },\r\n {\r\n name: 'searchCount',\r\n title: i18n.getString('KeywordPlanner_GridColumn_MonthlySearches'),\r\n helpId: 'pop_BA_CampaignCreate_Keywords_MonthlySearches',\r\n type: 'string',\r\n sortable: true,\r\n headClasses: ['text-right'],\r\n bodyClasses: ['text-right'],\r\n property: (item) => getSearchRangeString(item.AggregateMetric.AverageSearchVolume, i18n.realI18n),\r\n },\r\n {\r\n name: 'averageCPC',\r\n title: i18n.getString('KeywordPlanner_GridColumn_AverageCPC'),\r\n helpId: 'pop_BA_CampaignCreate_Keywords_AvgCPC',\r\n type: 'number',\r\n sortable: true,\r\n headClasses: ['text-right'],\r\n bodyClasses: ['text-right'],\r\n property: (item) => item.AggregateMetric.AverageCPC,\r\n },\r\n {\r\n name: 'competition',\r\n title: i18n.getString('KeywordPlanner_GridColumn_Competition'),\r\n helpId: 'pop_BA_CampaignCreate_Keywords_Competition',\r\n type: 'string',\r\n sortable: true,\r\n headClasses: ['text-right'],\r\n bodyClasses: ['text-right'],\r\n property: (item) => i18n.get(`CompetitionLevel_${item.AggregateMetric.CompetitionLevel}`),\r\n },\r\n ], bingadsGridColumn);\r\n }\r\n\r\n get selectedKeywords() {\r\n const checkedRowIds = _.pluck(this.grid.gridView.selectedItems(), 'Keyword');\r\n const checkedKeywords = [];\r\n\r\n _.each(checkedRowIds, (id) => {\r\n checkedKeywords.push(_.find(this.viewmodel.gridData, (kw) => {\r\n return kw.Keyword === id;\r\n }));\r\n });\r\n\r\n return checkedKeywords;\r\n }\r\n\r\n applyToAdgroups(event) {\r\n if (this.selectedKeywords.length === 0) {\r\n this.noRowSelected(event);\r\n }\r\n }\r\n\r\n addToNewAdgroup() {\r\n this.viewmodel.suggestedAdgroup.Suggestions = this.selectedKeywords;\r\n this.trigger('addAdgroup', {\r\n sourceReqId: this.options.sourceReqId,\r\n data: this.viewmodel.suggestedAdgroup,\r\n mode: keywordPlannerCreateOptions.AddToNewAdGroup,\r\n });\r\n }\r\n\r\n addToAllAdgroups() {\r\n this.viewmodel.suggestedAdgroup.Suggestions = this.selectedKeywords;\r\n this.trigger('addAdgroup', {\r\n sourceReqId: this.options.sourceReqId,\r\n data: this.viewmodel.suggestedAdgroup,\r\n mode: keywordPlannerCreateOptions.AddToAllAdGroups,\r\n });\r\n }\r\n\r\n addToSomeAdgroups(event) {\r\n this.viewmodel.suggestedAdgroup.Suggestions = this.selectedKeywords;\r\n let selectedAdgroups = _.filter(this.viewmodel.adgroups(), (ag) => {\r\n return ag.checked() === true;\r\n });\r\n\r\n if (selectedAdgroups.length === 0) {\r\n this.noRowSelected(event);\r\n return;\r\n }\r\n this.trigger('addAdgroup', {\r\n sourceReqId: this.options.sourceReqId,\r\n data: this.viewmodel.suggestedAdgroup,\r\n mode: keywordPlannerCreateOptions.AddToSelectedAdGroups,\r\n selectedAdgroups: _.map(selectedAdgroups, (ag) => {\r\n return _.omit(ag, ['checked', 'isUnnamed', 'defaultName']);\r\n }),\r\n });\r\n }\r\n\r\n cancelPanel() {\r\n this.trigger('cancel');\r\n }\r\n\r\n noRowSelected(event) {\r\n event.stopPropagation();\r\n popup.alert(i18n.get('Grid_RowSelectionRequired'));\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nfunction getCompareFunction(prop) {\r\n if (prop === 'Name' || prop === 'Keyword') {\r\n return function compare(a, b) {\r\n let aProp = a[prop],\r\n bProp = b[prop];\r\n\r\n if (aProp > bProp) {\r\n return 1;\r\n } else if (aProp < bProp) {\r\n return -1;\r\n }\r\n return 0;\r\n };\r\n } else {\r\n return function compare(a, b) {\r\n let aProp = a.AggregateMetric[prop],\r\n bProp = b.AggregateMetric[prop];\r\n\r\n if (aProp > bProp) {\r\n return 1;\r\n } else if (aProp < bProp) {\r\n return -1;\r\n }\r\n return 0;\r\n };\r\n }\r\n}\r\n\r\nexport function keywordPlannerSortFunc(args) {\r\n let input = args.input,\r\n direction = args.direction,\r\n prop = args.prop;\r\n\r\n _.each(input, (ag) => {\r\n if (!_.isUndefined(ag.Suggestions) && !_.isNull(ag.Suggestions) && _.isArray(ag.Suggestions)) {\r\n ag.Suggestions = _.sortByOrder(ag.Suggestions, getCompareFunction(prop), direction);\r\n }\r\n });\r\n input = _.sortByOrder(input, getCompareFunction(prop), direction);\r\n\r\n return input;\r\n}\r\n","/*eslint camelcase:0 */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport Grid from '@bingads-webui-component-legacy/grid/index';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-adgroup/template/keywordPlanner.pug';\r\nimport keywordPlannerAdgroupNameColumnTemplate from '@bingads-webui-campaign-legacy/crud-adgroup/template/keywordPlannerAdgroupNameColumnTemplate.pug';\r\nimport keywordPlannerAdgroupSeeMoreColumnTemplate from '@bingads-webui-campaign-legacy/crud-adgroup/template/keywordPlannerAdgroupSeeMoreColumnTemplate.pug';\r\nimport SourceProjection from '@bingads-webui-component-legacy/grid/projection/sink';\r\nimport PropertyTemplateProjection from '@bingads-webui-component-legacy/grid/projection/property-template';\r\nimport MemorySortProjection from '@bingads-webui-component-legacy/grid/projection/memory-sort';\r\nimport MemoryPageProjection from '@bingads-webui-component-legacy/grid/projection/memory-page';\r\nimport MapProjection from '@bingads-webui-component-legacy/grid/projection/map';\r\nimport PageProjection from '@bingads-webui-component-legacy/grid/projection/page';\r\nimport TableLayout from '@bingads-webui-component-legacy/grid/layout/table';\r\nimport tableTmplJade from '@bingads-webui-component-legacy/grid/layout/template/table.alt.pug';\r\nimport Pagination from '@bingads-webui-component-legacy/pagination/index';\r\nimport PaginationTmpl from '@bingads-webui-component-legacy/pagination/layout/simple.pug';\r\nimport Searchbox from '@bingads-webui-component-legacy/searchbox/view/searchbox';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/keywordPlanner';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport KeywordPlannerAdvancedView from '@bingads-webui-campaign-legacy/crud-adgroup/view/keywordPlannerAdvanced';\r\nimport dialogDecorator from '@bingads-webui-component-legacy/dialog/dialogDecorator';\r\nimport * as keywordPlannerCreateOptions from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/keywordPlannerCreateOptions';\r\nimport decimalFormatter from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport PaginationConnector from '@bingads-webui-component-legacy/connectors/grid.pagination';\r\nimport { keywordPlannerSortFunc } from '@bingads-webui-campaign-legacy/crud-adgroup/keywordPlannerSort';\r\nimport * as locationFilters from '@bingads-webui-campaign-legacy/location-targets/util/filters';\r\nimport { keywordPlannerSupportedCountries, keywordPlannerSupportedLanguages, isSelectedLanguagesOnlyTire2ForKeywordPlanner, getKeywordPlannerSupportedLanguagesByLocationIds, getKeywordPlannerSupportedLocationIdsByLangauges } from '@bingads-webui-campaign-legacy/location-targets/util/constants';\r\nimport * as languageBundle from '@bingads-webui-campaign-legacy/location-targets/util/languageBundle';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport learnMoreTemplate from '@bingads-webui-campaign-legacy/crud-adgroup/template/learn-more.pug';\r\nimport { panelDecorator } from '@bingads-webui-campaign-react/panel-decorator';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport { getSearchRangeString } from '../share/getSearchRange';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nconst languagesAllNumber = 1000;\r\nconst popupIds = {\r\n GetKeywordIdeas: 'pop_BA_CampaignCreate_Keywords_GetKeywordIdeas',\r\n MonthlySearches: 'pop_BA_CampaignCreate_Keywords_MonthlySearches',\r\n AvgCPC: 'pop_BA_CampaignCreate_Keywords_AvgCPC',\r\n Competition: 'pop_BA_CampaignCreate_Keywords_Competition',\r\n GetAdGroupIdeas: 'pop_BA_CampaignCreate_Keywords_GetAdGroupIdeas',\r\n};\r\nconst keywordLikePrefix = 'Keyword Like: ';\r\n\r\nexport default class View extends Backbone.View {\r\n get events() {\r\n return {\r\n 'click .keyword-planner-search-button': this.onSearch.bind(this),\r\n 'click a.select-all-on-page': 'addKeywordsInPage',\r\n };\r\n }\r\n\r\n initialize(options = {}) {\r\n this.options = options;\r\n this.currentSourceReqId = '';\r\n this.popupIds = _.defaults({}, this.options.popupIds, popupIds);\r\n this.viewmodel = new ViewModel();\r\n this.pageSize = this.options.mode === 'keywordsOnly' ? 9 : 5;\r\n this.usePanel = options && options.usePanel;\r\n\r\n this.searchboxKeywords = new Searchbox({ defaultText: i18n.get('KeywordPlanner_SearchPlaceholderKeywords'), searchButtonAriaLabel: i18n.get('KeywordPlanner_SearchKeywordsButton') });\r\n this.searchboxKeywords.on('search', (value) => {\r\n this.onSearch({ keywords: value });\r\n });\r\n\r\n this.searchboxUrl = new Searchbox({ defaultText: i18n.get('KeywordPlanner_SearchPlaceholderUrl'), searchButtonAriaLabel: i18n.get('KeywordPlanner_SearchWebsiteURLButton') });\r\n this.searchboxUrl.on('search', (value) => {\r\n this.onSearch({ url: value });\r\n });\r\n\r\n if (this.usePanel) {\r\n this.AdvancedView = panelDecorator(KeywordPlannerAdvancedView, {\r\n i18n,\r\n panelReadyAriaLabel: i18n.getString('Keyword planner side panel opened'),\r\n });\r\n } else {\r\n this.AdvancedView = dialogDecorator.decorate(KeywordPlannerAdvancedView, { position: 'center', maxWidth: 2000, popupFront: '.navbar-fixed-top' });\r\n }\r\n }\r\n\r\n static get odataLimits() {\r\n return {\r\n url: 2000,\r\n location: 100,\r\n keywordLength: 100,\r\n };\r\n }\r\n\r\n static get keywordPlannerSupportedLanguagesIdValueMap() {\r\n return _.invert(keywordPlannerSupportedLanguages);\r\n }\r\n\r\n static isLanguageSupported(language) {\r\n const languagesToCheck = _.isArray(language) ? language : [language];\r\n\r\n if (_.contains(languagesToCheck, 'All') || _.contains(languagesToCheck, languagesAllNumber)) {\r\n return true;\r\n }\r\n\r\n return _.any(languagesToCheck, (lang) => {\r\n if (_.isNumber(lang)) {\r\n return _.contains(_.values(keywordPlannerSupportedLanguages), lang);\r\n }\r\n\r\n return _.contains(_.keys(keywordPlannerSupportedLanguages), lang);\r\n });\r\n }\r\n\r\n /* input: languages, an array of language selected by user\r\n only accept strings here\r\n it will remove the unsupported language, only set the supported ones to viewmodel (used in parameter)\r\n */\r\n setLanguages(languages) {\r\n this.originalLanguages = languages; // for AdInsight log\r\n if (_.contains(languages, 'All') || _.contains(languages, languagesAllNumber)) {\r\n this.viewmodel.languages(_.keys(keywordPlannerSupportedLanguages));\r\n } else {\r\n // convert numbers to string\r\n const languages2Use = _.chain(languages)\r\n .map((lang) => {\r\n if (_.isNumber(lang)) {\r\n return View.keywordPlannerSupportedLanguagesIdValueMap[lang]; // undefined if not supported\r\n } else {\r\n return lang;\r\n }\r\n }).compact().value();\r\n\r\n this.viewmodel.languages(_.intersection(languages2Use, _.keys(keywordPlannerSupportedLanguages)));\r\n }\r\n }\r\n\r\n getLanguagesSupportedByLocations(useTireTwoMarkets = false) {\r\n const locationSupportedLanguages =\r\n getKeywordPlannerSupportedLanguagesByLocationIds(this.viewmodel.locations(), useTireTwoMarkets);\r\n\r\n return _.intersection(this.viewmodel.languages(), locationSupportedLanguages);\r\n }\r\n\r\n onlyTire2LangaugesSelected(crossCheckWithTargets = false) {\r\n const languagesCanUse = crossCheckWithTargets ?\r\n this.getLanguagesSupportedByLocations(true) :\r\n this.viewmodel.languages();\r\n\r\n return !_.isEmpty(languagesCanUse) && isSelectedLanguagesOnlyTire2ForKeywordPlanner(languagesCanUse);\r\n }\r\n\r\n /* input: targets, an array of RadiusCriterion and LocationCriterion objects.\r\n output: an array of the LocationIds that are within the supported countries & will be used for targeting\r\n */\r\n setLocationTargeting(includedTargets) {\r\n this.viewmodel.locations([]);\r\n this.viewmodel.numLocationsTargeted(0);\r\n this.viewmodel.countryLocationInfo([]);\r\n\r\n if (_.isArray(includedTargets) && !_.isEmpty(includedTargets)) {\r\n let locationTargets = _.filter(includedTargets, (criterion) => {\r\n return criterion.Type === 'Location' || criterion.Type === 'Radius';\r\n });\r\n const supportedCountries = _.values(keywordPlannerSupportedCountries);\r\n const supportedCountryCodes = _.pluck(supportedCountries, 'Code');\r\n const supportedTire2CountryCodes = _.pluck(_.select(supportedCountries,\r\n (country) => {\r\n return !country.SupportKeywordSearch;\r\n }), 'Code');\r\n const countryLocationInfo = [];\r\n\r\n _.each(locationTargets, (target) => {\r\n if (target.Type === 'Location') {\r\n const countryCode = target.CountryCode;\r\n\r\n if (_.contains(supportedCountryCodes, countryCode)) {\r\n const locationId = target.LocationType === 'PostalCode' ?\r\n languageBundle.getPublisherCountryByCode(countryCode).LocationId :\r\n target.LocationId;\r\n\r\n if (!_.contains(this.viewmodel.locations(), locationId)) {\r\n this.viewmodel.locations.push(locationId);\r\n countryLocationInfo.push({\r\n locationId,\r\n countryLocationId: languageBundle.getPublisherCountryByCode(countryCode).LocationId,\r\n });\r\n }\r\n\r\n if (_.contains(supportedTire2CountryCodes, countryCode) &&\r\n !_.contains(this.viewmodel.tire2Locations(), locationId)) {\r\n this.viewmodel.tire2Locations.push(locationId);\r\n }\r\n }\r\n }\r\n });\r\n\r\n this.viewmodel.countryLocationInfo(countryLocationInfo);\r\n this.viewmodel.numLocationsTargeted(_.size(includedTargets));\r\n } else if (this.onlyTire2LangaugesSelected()) {\r\n const tire2SupportedCountryIds = getKeywordPlannerSupportedLocationIdsByLangauges(this.viewmodel.languages());\r\n\r\n this.viewmodel.tire2Locations(tire2SupportedCountryIds);\r\n this.viewmodel.locations(tire2SupportedCountryIds);\r\n this.viewmodel.numLocationsTargeted(_.size(tire2SupportedCountryIds));\r\n const countryLocationInfo = [];\r\n\r\n _.each(tire2SupportedCountryIds, (Id) => {\r\n countryLocationInfo.push({\r\n locationId: Id,\r\n countryLocationId: Id,\r\n });\r\n });\r\n this.viewmodel.countryLocationInfo(countryLocationInfo);\r\n } else {\r\n const supportedCountryIds = getKeywordPlannerSupportedLocationIdsByLangauges(this.viewmodel.languages());\r\n const countryLocationInfo = [];\r\n\r\n this.viewmodel.locations(supportedCountryIds);\r\n this.viewmodel.numLocationsTargeted(_.size(supportedCountryIds));\r\n _.each(supportedCountryIds, (Id) => {\r\n countryLocationInfo.push({\r\n locationId: Id,\r\n countryLocationId: Id,\r\n });\r\n });\r\n this.viewmodel.countryLocationInfo(countryLocationInfo);\r\n }\r\n\r\n this._updateStatusByLocations();\r\n\r\n return this.viewmodel.locations();\r\n }\r\n\r\n setLocationTargetingByCampaign() {\r\n const locationsObj = locationFilters.getSupportedLocationIds(jsdata.Intermediate.getAll('CampaignCriterion'), true);\r\n\r\n this.viewmodel.locations(locationsObj.items);\r\n this.viewmodel.numLocationsTargeted(locationsObj.totalCount);\r\n this.viewmodel.countryLocationInfo(locationsObj.countryLocationInfo);\r\n\r\n this._updateStatusByLocations();\r\n }\r\n\r\n _updateStatusByLocations() {\r\n // if no tire-1 langauge supported, then see tire 2\r\n if (this.viewmodel.allLocationsUnsupported()) {\r\n this.searchboxUrl.disable();\r\n this.searchboxKeywords.disable();\r\n } else if (this.onlyTire2LangaugesSelected(true)) {\r\n this.searchboxUrl.enable();\r\n this.searchboxKeywords.disable();\r\n } else {\r\n // if any of tire 1 language/location supported, show both\r\n this.searchboxUrl.enable();\r\n this.searchboxKeywords.enable();\r\n }\r\n }\r\n\r\n _updateSelectMultiIdeasText() {\r\n this.viewmodel.selectMultiIdeasText(i18n.get('KeywordPlanner_Select_All_In_Page', {\r\n count: Math.min(this.viewmodel.gridData().length - (this.paginationView.ko_model.page_number() * this.paginationView.ko_model.page_size()), this.paginationView.ko_model.page_size()),\r\n }));\r\n }\r\n\r\n updatePagination(resetPageNumber) {\r\n if (!_.isUndefined(resetPageNumber)) {\r\n this.paginationView.ko_model.page_number(0);\r\n }\r\n this.paginationView.ko_model.item_count(this.viewmodel.gridData().length);\r\n\r\n const pageCount = Math.ceil(this.viewmodel.gridData().length / this.paginationView.ko_model.page_size());\r\n\r\n if (pageCount > 0 && pageCount <= this.paginationView.ko_model.page_number()) {\r\n this.grid.projection.set('page.number', pageCount - 1);\r\n this.paginationView.ko_model.page_number(pageCount - 1);\r\n }\r\n\r\n this._updateSelectMultiIdeasText();\r\n }\r\n\r\n get uri() {\r\n return 'Customers(:advertisercustomer_id)/Accounts(:account_id)/Default.AdGroupSuggestions?$expand=Suggestions';\r\n }\r\n\r\n requestData(value) {\r\n let req = {\r\n 'criteria': [],\r\n };\r\n\r\n let hasOnlyKeyword = true;\r\n\r\n if (value.url) {\r\n hasOnlyKeyword = false;\r\n // KeywordPlanner has a url length limit\r\n // This url is solely for keyword suggestion purpose and\r\n // not saved or used by other feature\r\n let requestUrl = value.url.substr(0, View.odataLimits.url);\r\n\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.UrlSuggestionCriterion',\r\n 'Url': requestUrl,\r\n });\r\n }\r\n\r\n if (value.keywords) {\r\n let keywordsArray = _.isArray(value.keywords) ? value.keywords : [value.keywords];\r\n\r\n _.each(keywordsArray, (keyword) => {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.SeedKeywordSuggestionCriterion',\r\n 'Keyword': keyword.substr(0, View.odataLimits.keywordLength),\r\n });\r\n });\r\n }\r\n\r\n let languagesToUse = getKeywordPlannerSupportedLanguagesByLocationIds(_.pluck(this.viewmodel.countryLocationInfo(), 'countryLocationId'), !hasOnlyKeyword);\r\n // add parameter when keyword planner support more than one language in multi-language pilot\r\n\r\n if (!_.isEmpty(this.viewmodel.languages())) {\r\n\r\n // keyword only mode only support one langue for now, will update this after they fix the bug\r\n if (hasOnlyKeyword && languagesToUse.length > 1) {\r\n languagesToUse = [_.first(languagesToUse)];\r\n } else if (!hasOnlyKeyword && languagesToUse.length > 3) {\r\n // url only support 3 for now, will udpate this after they fix the bug\r\n languagesToUse = _.first(languagesToUse, 3);\r\n }\r\n _.each(languagesToUse, (language) => {\r\n if (language) {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.LanguageSuggestionCriterion',\r\n 'Language': language,\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (_.isArray(this.viewmodel.locations())) {\r\n // KeywordPlanner OData has a location count limit\r\n const languageSupportedLoations = _.isEmpty(languagesToUse) ?\r\n this.viewmodel.locations() :\r\n getKeywordPlannerSupportedLocationIdsByLangauges(languagesToUse, !hasOnlyKeyword);\r\n\r\n const locationIdsSupportedByLanguage = _.compact(_.map(this.viewmodel.countryLocationInfo(), (item) => {\r\n if (_.contains(languageSupportedLoations, item.countryLocationId)) {\r\n return item.locationId;\r\n }\r\n return 0;\r\n }));\r\n\r\n let requestLocations = _.first(\r\n locationIdsSupportedByLanguage,\r\n View.odataLimits.location);\r\n\r\n _.each(requestLocations, (locationId) => {\r\n if (locationId) {\r\n req.criteria.push({\r\n '@odata.type': '#Model.Suggestions.LocationSuggestionCriterion',\r\n 'LocationId': locationId,\r\n });\r\n }\r\n });\r\n }\r\n\r\n\r\n return req;\r\n }\r\n\r\n getPropTempl() {\r\n if (this.options.mode === 'keywordsOnly') {\r\n return new PropertyTemplateProjection({\r\n 'property.template': {\r\n name(local) {\r\n if (local.model.$metadata.type === 'keyword') {\r\n return keywordPlannerAdgroupNameColumnTemplate({ value: local.model[local.property] });\r\n }\r\n return null;\r\n },\r\n },\r\n });\r\n } else {\r\n return new PropertyTemplateProjection({\r\n 'property.template': {\r\n name(local) {\r\n if (local.model.$metadata.type === 'adgroup') {\r\n return keywordPlannerAdgroupNameColumnTemplate({ value: local.model[local.property] });\r\n } if (local.model.$metadata.type === 'see-more') {\r\n // the template is added for fixing a11y bug.\r\n return keywordPlannerAdgroupSeeMoreColumnTemplate({ value: local.model[local.property] });\r\n } else {\r\n return local.model[local.property];\r\n }\r\n },\r\n },\r\n });\r\n }\r\n }\r\n\r\n getMap() {\r\n if (this.options.mode === 'keywordsOnly') {\r\n return new MapProjection({\r\n map(item) {\r\n return {\r\n name: item.Keyword,\r\n searchCount: getSearchRangeString(item.AggregateMetric.AverageSearchVolume, i18n.realI18n),\r\n averageCPC: decimalFormatter.fromFloatToString(item.AggregateMetric.AverageCPC, 2),\r\n competition: i18n.get(`CompetitionLevel_${item.AggregateMetric.CompetitionLevel}`),\r\n '$metadata': {\r\n 'attr': { 'class': 'table__row--keyword-planner table__row--keywords-only' },\r\n 'type': 'keyword',\r\n },\r\n };\r\n },\r\n });\r\n } else {\r\n return new MapProjection({\r\n map(item) {\r\n let ret = [];\r\n\r\n let adgroupItem = {\r\n name: item.DisplayName,\r\n searchCount: getSearchRangeString(item.AggregateMetric.AverageSearchVolume, i18n.realI18n),\r\n averageCPC: decimalFormatter.fromFloatToString(item.AggregateMetric.AverageCPC, 2),\r\n competition: i18n.get(`CompetitionLevel_${item.AggregateMetric.CompetitionLevel}`),\r\n '$metadata': {\r\n 'attr': { 'class': 'table__row--keyword-planner table__row--adgroup' },\r\n 'type': 'adgroup',\r\n },\r\n };\r\n\r\n ret.push(adgroupItem);\r\n\r\n let numRowsToShow = Math.min(2, item.Suggestions.length);\r\n\r\n for (let i = 0; i < numRowsToShow; i++) {\r\n let kwd = item.Suggestions[i];\r\n\r\n ret.push({\r\n name: kwd.Keyword,\r\n searchCount: getSearchRangeString(kwd.AggregateMetric.AverageSearchVolume, i18n.realI18n),\r\n averageCPC: decimalFormatter.fromFloatToString(kwd.AggregateMetric.AverageCPC, 2),\r\n competition: i18n.get(`CompetitionLevel_${kwd.AggregateMetric.CompetitionLevel}`),\r\n '$metadata': {\r\n 'attr': { 'class': 'table__row--keyword-planner table__row--indent' },\r\n 'type': 'keyword',\r\n '$parent': adgroupItem,\r\n },\r\n });\r\n }\r\n\r\n if (item.Suggestions.length > 2) {\r\n ret.push({\r\n name: i18n.get('KeywordSuggestion_AddMore_Keywords').replace('{0}', item.Suggestions.length - 2),\r\n searchCount: '',\r\n averageCPC: '',\r\n competition: '',\r\n '$metadata': {\r\n 'attr': {\r\n 'class': 'table__row--keyword-planner table__row--indent table__row--see-more',\r\n 'role': 'presentation',\r\n },\r\n 'type': 'see-more',\r\n 'adgroupName': item.Name,\r\n '$parent': adgroupItem,\r\n },\r\n });\r\n }\r\n\r\n return ret;\r\n },\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n i18n,\r\n title: this.options.isCampaignCreation ? i18n.get('KeywordPlanner_Campaign_Creation_Title') : i18n.get('KeywordPlanner_Title'),\r\n helpId: this.options.isCampaignCreation ? popupIds.GetAdGroupIdeas : popupIds.GetKeywordIdeas,\r\n showSelectAllOnPage: !this.options.isCampaignCreation,\r\n }));\r\n\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n this.searchboxKeywords.render();\r\n this.$('.searchbox.keywords').append(this.searchboxKeywords.$el);\r\n\r\n this.searchboxUrl.render();\r\n this.$('.searchbox.url').append(this.searchboxUrl.$el);\r\n\r\n this.paginationView = new Pagination({\r\n el: this.$('.pagination_host'),\r\n template: PaginationTmpl,\r\n page_size: this.pageSize,\r\n }).render();\r\n\r\n let sourceData = new SourceProjection({ seed: this.viewmodel.gridData() });\r\n let proptmpl = this.getPropTempl();\r\n\r\n let suggestionPropName = this.options.mode === 'keywordsOnly' ? 'Keyword' : 'Name';\r\n\r\n let sortableCols = {\r\n searchCount(input, direction) {\r\n return keywordPlannerSortFunc({ input, direction, prop: 'AverageSearchVolume' });\r\n },\r\n averageCPC(input, direction) {\r\n return keywordPlannerSortFunc({ input, direction, prop: 'AverageCPC' });\r\n },\r\n competition(input, direction) {\r\n return keywordPlannerSortFunc({ input, direction, prop: 'CompetitionLevel' });\r\n },\r\n name(input, direction) {\r\n return keywordPlannerSortFunc({ input, direction, prop: suggestionPropName });\r\n },\r\n };\r\n\r\n let memorySort = new MemorySortProjection({\r\n 'column.sortable': sortableCols,\r\n });\r\n\r\n let memoryPage = new MemoryPageProjection({});\r\n let map = this.getMap();\r\n\r\n let page = new PageProjection({\r\n 'page.size': this.pageSize,\r\n 'page.number': 0,\r\n });\r\n\r\n let src = sourceData.pipe(memorySort).pipe(memoryPage).pipe(map).pipe(page).pipe(proptmpl);\r\n\r\n this.grid = new Grid({\r\n el: this.$('.grid'),\r\n projection: src,\r\n layout: TableLayout.partial({\r\n '$metadata': {\r\n class: ['table--no-border'],\r\n },\r\n template: tableTmplJade,\r\n columns: {\r\n 'name': {\r\n '$metadata': {\r\n 'attr.head': { 'width': '34%', 'aria-label': i18n.getString('KeywordPlanner_GridColumn_Suggestions')},\r\n },\r\n '$text': i18n.getString('KeywordPlanner_GridColumn_Suggestions'),\r\n sortable: true,\r\n },\r\n 'searchCount': {\r\n '$metadata': {\r\n 'attr.body': { 'class': ['text-right'] },\r\n 'attr.head': { 'class': ['text-right'], 'width': '25%', 'aria-label': i18n.getString('KeywordPlanner_GridColumn_MonthlySearches') },\r\n },\r\n '$text': i18n.getString('KeywordPlanner_GridColumn_MonthlySearches'),\r\n sortable: true,\r\n popupTopicId: this.popupIds.MonthlySearches,\r\n },\r\n 'averageCPC': {\r\n '$metadata': {\r\n 'attr.body': { 'class': ['text-right'] },\r\n 'attr.head': { 'class': ['text-right'], 'aria-label': i18n.getString('KeywordPlanner_GridColumn_AverageCPC') },\r\n },\r\n '$text': i18n.getString('KeywordPlanner_GridColumn_AverageCPC'),\r\n sortable: true,\r\n popupTopicId: this.popupIds.AvgCPC,\r\n },\r\n 'competition': {\r\n '$metadata': {\r\n 'attr.body': { 'class': ['text-right'] },\r\n 'attr.head': { 'class': ['text-right'], 'aria-label': i18n.getString('KeywordPlanner_GridColumn_Competition')/*, 'width': '25%'*/ },\r\n },\r\n '$text': i18n.getString('KeywordPlanner_GridColumn_Competition'),\r\n sortable: true,\r\n popupTopicId: this.popupIds.Competition,\r\n },\r\n },\r\n }),\r\n });\r\n\r\n this.grid.on('layout:click:cell', this.gridClicked.bind(this));\r\n\r\n this.grid.render({ fetch: true });\r\n\r\n new PaginationConnector(this.grid, this.paginationView).connect();\r\n\r\n this.paginationView.on('click:next click:previous', this._updateSelectMultiIdeasText.bind(this));\r\n\r\n return this;\r\n }\r\n\r\n emptySearchTeams() {\r\n this.searchboxKeywords.ko_model.value('');\r\n this.searchboxUrl.ko_model.value('');\r\n }\r\n\r\n onSearch(value) {\r\n if (this.viewmodel.allLocationsUnsupported()) {\r\n return;\r\n }\r\n\r\n if (value && value.keywords) {\r\n this.searchboxKeywords.ko_model.value(value.keywords);\r\n }\r\n\r\n if (value && value.url) {\r\n this.searchboxUrl.ko_model.value(value.url);\r\n }\r\n\r\n const keywords = this.searchboxKeywords.ko_model.value();\r\n const url = this.searchboxUrl.ko_model.value();\r\n\r\n if (!keywords && !url) {\r\n return;\r\n }\r\n\r\n const requestData = this.requestData({ keywords, url });\r\n\r\n if (_.isEmpty(requestData.criteria)) {\r\n return;\r\n }\r\n\r\n odata.post(this.uri, {\r\n path: 'AdInsight/V2/',\r\n data: requestData,\r\n customHeader: {\r\n name: 'scenario',\r\n value: this.options.scenario,\r\n },\r\n }, (dummy, response, textStatus, xhr) => {\r\n this.currentSourceReqId = (xhr && xhr.getResponseHeader('x-ms-requestid')) || '';\r\n })\r\n .then((res) => {\r\n if (this.options.mode === 'keywordsOnly') {\r\n let data = _.pluck(res.value, 'Suggestions');\r\n\r\n data = _.union.apply(this, data);\r\n this.viewmodel.gridData(data);\r\n this.showNoSuggestionsMessage(data);\r\n } else {\r\n // update ad group name as required\r\n _.each(res.value, (item) => {\r\n item.AdgroupName = item.Name.replace(keywordLikePrefix, '');\r\n item.DisplayName = `${item.AdgroupName} ${i18n.get('KeywordPlanner_AdGroupSuffix')}`;\r\n });\r\n this.viewmodel.gridData(res.value);\r\n this.showNoSuggestionsMessage(res.value);\r\n }\r\n\r\n this.grid.projection.set({\r\n 'orderby': [{ 'searchCount': -1 }],\r\n 'page.number': 0,\r\n });\r\n\r\n this.updatePagination(true);\r\n this.refreshGridSource(this.viewmodel.gridData());\r\n\r\n // Language log for AdInsight\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'keywordplanner/selectedlanaguage', {\r\n requestId: this.currentSourceReqId,\r\n userSelectedLanguages: this.originalLanguages,\r\n });\r\n })\r\n .finally(withUiBlock(this.$el.parent()));\r\n }\r\n\r\n showNoSuggestionsMessage(suggestions) {\r\n if (suggestions.length === 0) {\r\n this.viewmodel.noSuggestionNote(i18n.get('KeywordPlanner_NoSuggestionsReturned_Note_Html', {\r\n learnMoreLink: learnMoreTemplate({\r\n i18n,\r\n helpId: '56794',\r\n }),\r\n }));\r\n } else {\r\n this.viewmodel.noSuggestionNote(false);\r\n }\r\n }\r\n\r\n refreshGridSource(source) {\r\n this.grid.projection.set({\r\n 'seed': source,\r\n });\r\n }\r\n\r\n onClose() {\r\n if (this.editor) {\r\n this.editor.remove();\r\n delete this.editor;\r\n }\r\n }\r\n\r\n logInteraction(message) {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal(message, 'keyword planner');\r\n }\r\n }\r\n\r\n addAddGroup(args) {\r\n this.trigger('addAdgroup', args);\r\n this.logInteraction('add ad group');\r\n }\r\n\r\n handleAddGroup(args) {\r\n this.editor.remove();\r\n this.addAddGroup(args);\r\n this.removeAdgroupFromSource(args.data.Name);\r\n }\r\n\r\n gridClicked(e, data) {\r\n let name = data.model.name.valueOf();\r\n\r\n if (_.isUndefined(data.model.$metadata)) {\r\n return;\r\n }\r\n\r\n if (data.model.$metadata.type === 'see-more' && data.column.property === 'name') {\r\n let adgroupName = data.model.$metadata.adgroupName;\r\n let adgroups = this.viewmodel.gridData();\r\n let adgroup = _.find(adgroups, (ag) => {\r\n return ag.Name === adgroupName;\r\n });\r\n\r\n if (this.usePanel) {\r\n this.editor = new this.AdvancedView({\r\n SuggestedAdGroup: adgroup,\r\n AdGroups: this.viewmodel.adgroups,\r\n sourceReqId: this.currentSourceReqId,\r\n title: `${i18n.get('KeywordPlanner_AdvancedPopup_Title')} ${adgroup.AdgroupName}`,\r\n eventsToActions: [{\r\n event: 'cancel',\r\n action: this.onClose.bind(this),\r\n }, {\r\n event: 'addAdgroup',\r\n action: (args) => this.handleAddGroup(args),\r\n }],\r\n onClose: this.onClose.bind(this),\r\n }).render();\r\n } else {\r\n this.editor = new this.AdvancedView({\r\n SuggestedAdGroup: adgroup,\r\n AdGroups: this.viewmodel.adgroups,\r\n sourceReqId: this.currentSourceReqId,\r\n title: `${i18n.get('KeywordPlanner_AdvancedPopup_Title')} ${adgroup.AdgroupName}`,\r\n }).render();\r\n this.editor.on('addAdgroup', (args) => this.handleAddGroup(args));\r\n this.editor.on('cancel', this.onClose.bind(this));\r\n }\r\n } else if (data.model.$metadata.type === 'adgroup') {\r\n let adgroup = _.find(this.viewmodel.gridData(), (ag) => {\r\n return ag.DisplayName === name;\r\n });\r\n\r\n this.addAddGroup({\r\n sourceReqId: this.currentSourceReqId, // for AdInsight log purpose\r\n data: _.extend({}, adgroup, { Name: adgroup.AdgroupName }),\r\n mode: keywordPlannerCreateOptions.AddToNewAdGroup,\r\n });\r\n this.viewmodel.recentUserActionPrompt(i18n.get('KeywordPlanner_LiveRegion_Text', { name }));\r\n this.removeAdgroupFromSource(adgroup.Name);\r\n } else if (this.options.mode === 'keywordsOnly' && data.model.$metadata.type === 'keyword') {\r\n this.trigger(\r\n 'addKeyword',\r\n name,\r\n this.currentSourceReqId, // for AdInsight log purpose\r\n );\r\n this.logInteraction('add a keyword');\r\n\r\n this.viewmodel.gridData(_.filter(this.viewmodel.gridData(), (kw) => {\r\n return kw.Keyword !== name;\r\n }));\r\n this.viewmodel.recentUserActionPrompt(i18n.get('KeywordPlanner_LiveRegion_Text', { name }));\r\n this.updatePagination();\r\n this.refreshGridSource(this.viewmodel.gridData());\r\n }\r\n }\r\n\r\n addKeywordsInPage() {\r\n const data = this.viewmodel.gridData();\r\n const start = this.paginationView.ko_model.page_number() * this.paginationView.ko_model.page_size();\r\n const end = start + this.paginationView.ko_model.page_size();\r\n const newData = data.slice(0, start).concat(data.slice(end));\r\n\r\n _.each(data.slice(start, end), (kw) => this.trigger('addKeyword', kw.Keyword, this.currentSourceReqId));\r\n\r\n this.logInteraction('add keywords in page');\r\n\r\n this.viewmodel.gridData(newData);\r\n this.updatePagination();\r\n this.refreshGridSource(this.viewmodel.gridData());\r\n }\r\n\r\n removeAdgroupFromSource(adgroupName) {\r\n this.viewmodel.gridData(_.filter(this.viewmodel.gridData(), (ag) => {\r\n return ag.Name !== adgroupName;\r\n }));\r\n this.updatePagination();\r\n this.refreshGridSource(this.viewmodel.gridData());\r\n }\r\n\r\n updateAdgroupsList(adgroupArray) {\r\n this.viewmodel.adgroups = adgroupArray;\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\n\r\nimport _ from 'underscore';\r\nimport 'backbone';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport AutoTargetView from '@bingads-webui-campaign-legacy/auto-targets/view/create/index';\r\nimport { adGroupTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/adGroupTypeEnum';\r\n\r\nconst isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\nexport function decorate(view) {\r\n return view.extend({\r\n initialize(options = {}) {\r\n _.bind(view.prototype.initialize, this, options)();\r\n this.subView = new AutoTargetView(_.extend(options, {\r\n showHeader: !options.hideHeader,\r\n defaultBid: options.defaultBid,\r\n setting: { // TODO [ericwa]: will add other campaign setting like target source in setting\r\n DomainName: options.context.get('Campaign').DomainName,\r\n Language: options.context.get('Campaign').DomainLanguage,\r\n Source: options.context.get('Campaign').TargetingSource,\r\n },\r\n isForVNext: options.isForVNext,\r\n }));\r\n this.changes = [];\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n this.ko_model.AdGroupType(adGroupTypeEnum.SearchDynamic);\r\n }\r\n\r\n this.on('updateAutoTargetEditorSetting', (setting) => {\r\n this.setAutoTargetsViewSetting(setting);\r\n });\r\n },\r\n\r\n setAutoTargetsViewSetting (setting) {\r\n this.subView.trigger('update:setting', setting, true);\r\n },\r\n\r\n getChanges() {\r\n if (this.hasChanges || this.subView.hasChanges()) {\r\n const serializedAdGroup = this.ko_model.toObject();\r\n const adGroupId = _.isNaN(serializedAdGroup.Id) || serializedAdGroup.Id < 1 ? null : serializedAdGroup.Id;\r\n\r\n const autoTargets = this.subView.getChanges();\r\n\r\n _.each(autoTargets, (target) => {\r\n if (serializedAdGroup.Id > 0) {\r\n target.AdGroup = {\r\n Id: adGroupId,\r\n };\r\n } else {\r\n target.AdGroupName = serializedAdGroup.Name;\r\n target.CampaignName = serializedAdGroup.CampaignName;\r\n }\r\n });\r\n\r\n serializedAdGroup.DsaTargets = autoTargets;\r\n serializedAdGroup['Client Id'] = `${this.ko_model.options.index}`;\r\n\r\n if (_.isNull(adGroupId)) {\r\n const keys = ['Client Id', 'Name', 'Campaign', 'Language', 'DsaTargets', 'PricingModel', 'Medium'];\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n keys.push('AdGroupType');\r\n }\r\n\r\n return _.pick(serializedAdGroup, keys);\r\n } else {\r\n return _.pick(serializedAdGroup, 'Client Id', 'Id', 'Name', 'Campaign', 'DsaTargets');\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n getContextObject() {\r\n const adGroupsStored = this.options && this.options.context && this.options.context.get('AdGroups');\r\n const currentId = this.ko_model.Id();\r\n\r\n let object = {\r\n Id: currentId,//eslint-disable-line\r\n Name: this.ko_model.Name(),//eslint-disable-line\r\n };\r\n\r\n if (adGroupsStored) {\r\n object.Bid = _.chain(adGroupsStored).where({Id: currentId}).first().result('Bid').value();\r\n }\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n object.AdGroupType = adGroupTypeEnum.SearchDynamic;\r\n }\r\n\r\n return object;\r\n },\r\n\r\n updateViewModels(data) {\r\n _.bind(view.prototype.updateViewModels, this, data)();\r\n this.subView.updateViewModels(data.DsaTargets);\r\n },\r\n\r\n updateViewModelsOnError(response) {\r\n _.bind(view.prototype.updateViewModelsOnError, this, response, 'DsaTargets')();\r\n\r\n if (_.isEmpty(response.entity.errors)) {\r\n this.subView.updateViewModels(response.entity.DsaTargets);\r\n }\r\n },\r\n\r\n updateOnVisible() {\r\n const adGroupBid = _.result(this.getContextObject(), 'Bid', this.options.defaultBid);\r\n\r\n this.subView.trigger('update:bid', adGroupBid);\r\n this.subView.trigger('update:setting', {\r\n DomainName: this.options.context.get('Campaign').DomainName,\r\n Language: this.options.context.get('Campaign').DomainLanguage,\r\n Source: this.options.context.get('Campaign').TargetingSource,\r\n }, true);\r\n },\r\n });\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor() {\r\n this.isDynamicAdGroupSectionExpanded = ko.observable(true);\r\n this.isStandardAdGroupSectionExpanded = ko.observable(true);\r\n this.hasDSASettings = ko.observable(false);\r\n this.hasDisclaimerSettings = ko.observable(false);\r\n this.isDomesticSimplifiedChineseEnabled = ko.observable(false);\r\n this.errors = ko.observable([]);\r\n this.allowDisclaimer = ko.observable(false);\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-adgroup/template/mixed-mode-create.pug';\r\nimport AdGroupView from '@bingads-webui-campaign-legacy/crud-adgroup/view/create';\r\nimport AdGroupUpdateView from '@bingads-webui-campaign-legacy/crud-adgroup/view/update';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as keywordAdGroupCreateDecorator from '@bingads-webui-campaign-legacy/crud-adgroup/view/create-keyword-adgroup-decorator';\r\nimport * as keywordAdGroupUpdateDecorator from '@bingads-webui-campaign-legacy/crud-adgroup/view/update-keyword-adgroup-decorator';\r\nimport * as autoTargetAdGroupCreateDecorator from '@bingads-webui-campaign-legacy/crud-adgroup/view/create-autotarget-adgroup-decorator';\r\nimport * as autoTargetAdGroupUpdateDecorator from '@bingads-webui-campaign-legacy/crud-adgroup/view/update-autotarget-adgroup-decorator';\r\nimport DSASettingsView from '@bingads-webui-campaign-legacy/dsa-settings/view/dsa-settings';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/mixed-mode-create';\r\nimport * as scrollUtil from '@bingads-webui-component-legacy/extension/scrollTo';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport { adGroupTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/adGroupTypeEnum';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class MixedModeAdGroupCreate extends Backbone.View {\r\n initialize(options) {\r\n this.options = options;\r\n if (this.options && this.options.perfMarker) {\r\n this.showAdGroupKeywordMarker = this.options.perfMarker.createChild('Show_AdGroup_Keyword');\r\n this.showAdGroupKeywordMarker.willInit();\r\n }\r\n\r\n this.viewModel = new ViewModel();\r\n this.initializeAutoTargetAdGroupCreateView();\r\n this.initializeKeywordAdGroupCreateView();\r\n this.initializeDSASettings();\r\n this.modified = false;\r\n this.mounted = false;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'show.bs.collapse': 'onToggleSection',\r\n 'hide.bs.collapse': 'onToggleSection',\r\n };\r\n }\r\n\r\n checkAdGroupNameDuplicates(adGroup) {\r\n const adGroupName = adGroup.ko_model.Name(); // eslint-disable-line\r\n const adGroupType = adGroup.ko_model.AdGroupType(); // eslint-disable-line\r\n const dynamicAdGroupSectionViewModel = this.autoTargetAdGroupCreateView.ko_model;\r\n const standardAdGroupSectionViewModel = this.keywordAdGroupCreateView.ko_model;\r\n const dynamicAdGroups = dynamicAdGroupSectionViewModel.adGroups();\r\n const standardAdGroups = standardAdGroupSectionViewModel.adGroups();\r\n\r\n let isDuplicate = false;\r\n\r\n _.chain(dynamicAdGroups.concat(standardAdGroups))\r\n .filter((adg) => adg !== adGroup)\r\n .each((adg) => {\r\n const name = adg.ko_model.Name().toLowerCase(); // eslint-disable-line\r\n\r\n if (_.isString(name) && name === adGroupName.toLowerCase() && adGroupName !== '') {\r\n isDuplicate = true;\r\n }\r\n });\r\n\r\n return isDuplicate;\r\n }\r\n\r\n checkAllAdGroupNameDuplicate() {\r\n const dynamicAdGroupSectionViewModel = this.autoTargetAdGroupCreateView.ko_model;\r\n const standardAdGroupSectionViewModel = this.keywordAdGroupCreateView.ko_model;\r\n const dynamicAdGroups = dynamicAdGroupSectionViewModel.adGroups();\r\n const standardAdGroups = standardAdGroupSectionViewModel.adGroups();\r\n const $dynamicAdGroupSection = this.$('#dynamicAdGroupSection');\r\n const $standardAdGroupSection = this.$('#standardAdGroupSection');\r\n\r\n _.each(dynamicAdGroups.concat(standardAdGroups), (adg) => {\r\n const isDuplicate = this.checkAdGroupNameDuplicates(adg);\r\n\r\n adg.ko_model.isNameDuplicate(isDuplicate);\r\n\r\n if (isDuplicate) {\r\n if (adg.ko_model.AdGroupType() === adGroupTypeEnum.SearchStandard) { // eslint-disable-line\r\n $standardAdGroupSection.collapse('show');\r\n this.removeStandardAdGroupSectionAriaExpandedAttribute();\r\n } else {\r\n $dynamicAdGroupSection.collapse('show');\r\n }\r\n }\r\n });\r\n }\r\n\r\n hasDSASettingsInCampaignSettings() {\r\n const campaign = this.options.context.get('Campaign');\r\n const hasDSASettings = campaign && campaign.DomainName != null;\r\n\r\n return hasDSASettings;\r\n }\r\n\r\n hasDisclaimerSettings() {\r\n const disclaimerSettings = this.options.context.get('Draft.Disclaimer');\r\n\r\n return !_.isEmpty(disclaimerSettings);\r\n }\r\n\r\n willShow() {\r\n this.autoTargetAdGroupCreateView.willShow(!this.hasDSASettingsInCampaignSettings(), this.mounted);\r\n this.keywordAdGroupCreateView.willShow(this.hasDSASettingsInCampaignSettings(), this.mounted);\r\n this.adjustSectionOrder();\r\n this.toggleDSASettings();\r\n this.mounted = true;\r\n\r\n if (this.showAdGroupKeywordMarker) {\r\n this.showAdGroupKeywordMarker.done();\r\n }\r\n }\r\n\r\n saveTargetingSource(id) {\r\n const retPromise = id && this.dsaSettingsView && this.dsaSettingsView.targetingSource ?\r\n this.dsaSettingsView.targetingSource.save(id) : Promise.resolve();\r\n\r\n return retPromise.then((result) => {\r\n if (_.result(pageContext.CurrentCampaign, 'Id') === id) {\r\n if (_.size(pageContext.CurrentCampaign.CampaignSettings) > 0 && this.targetingSource) {\r\n pageContext.CurrentCampaign.CampaignSettings[0].Source = this.targetingSource.koModel.source();\r\n }\r\n }\r\n return result;\r\n });\r\n }\r\n\r\n scrollToDSAError() {\r\n scrollUtil.scrollAndCenter(this.$('.dsa-settings-container .error'));\r\n }\r\n\r\n saveDSASettings() {\r\n if (!this.dsaSettingsView.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n if (!this.modified) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n const { context } = this.options;\r\n const campaignContext = context.get('Campaign');\r\n const campaignParams = context.get('CampaignParams');\r\n const params = _.extend({}, campaignParams, this.dsaSettingsView.getValues());\r\n\r\n return jsdata.Campaign\r\n .create(params, { adapter: 'bulk', cacheResponse: false })\r\n .then(() => {\r\n const newCampaignContext = _.extend({}, campaignContext, this.dsaSettingsView.getValues(true));\r\n\r\n context.set(_.extend({}, context, {\r\n Campaign: newCampaignContext,\r\n CampaignParams: params,\r\n }));\r\n this.dsaSettingsView.setValues({\r\n disabled: true,\r\n });\r\n this.saveTargetingSource(context.get('Campaign').Id);\r\n this.modified = false;\r\n return true;\r\n })\r\n .catch((response) => {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n const campaignErrors = _.filter(response.errors, (error) => {\r\n return error.Type === 'Campaign Error';\r\n });\r\n\r\n if (campaignErrors.length) {\r\n const errors = i18nErrors.getBulkApiErrors(campaignErrors);\r\n\r\n this.dsaSettingsView.handleApiErrors(errors);\r\n this.scrollToDSAError();\r\n }\r\n\r\n const { updateViews } = this.autoTargetAdGroupCreateView;\r\n\r\n // no ad group will be created if dsa settings is not set correctly\r\n // we need to mark all editors with \"hasChange = true\" so that when user clicks \"save & next\"\r\n // UI will submit all unsaved adgroups\r\n updateViews.forEach((view) => {\r\n view.hasChanges = true;\r\n });\r\n }\r\n return false;\r\n })\r\n .finally(withUiBlock());\r\n }\r\n\r\n initializeAutoTargetAdGroupCreateView() {\r\n const AutoTargetAdGroupCreateView = autoTargetAdGroupCreateDecorator.decorate(AdGroupView);\r\n const AutoTargetAdGroupUpdateView = autoTargetAdGroupUpdateDecorator.decorate(AdGroupUpdateView);\r\n\r\n this.autoTargetAdGroupCreateView = new AutoTargetAdGroupCreateView(_.extend({}, this.options, {\r\n UpdateView: AutoTargetAdGroupUpdateView,\r\n submitDSASettings: () => {\r\n if (this.viewModel.hasDSASettings()) {\r\n return this.saveDSASettings();\r\n }\r\n return Promise.resolve(true);\r\n },\r\n validateDSASettings: () => {\r\n if (this.viewModel.hasDSASettings()) {\r\n if (!this.dsaSettingsView.validate()) {\r\n this.scrollToDSAError();\r\n return false;\r\n }\r\n return true;\r\n }\r\n return true;\r\n },\r\n isOptional: true,\r\n checkAdGroupNameDuplicates: this.checkAllAdGroupNameDuplicate.bind(this),\r\n isAutoTargetCampaign: true,\r\n }));\r\n\r\n this.autoTargetAdGroupCreateView.on('createAdGroupEditorView', (view) => {\r\n const hasDSASettings = this.hasDSASettingsInCampaignSettings();\r\n\r\n const dsaSettings = hasDSASettings ? {\r\n DomainName: this.options.context.get('Campaign').DomainName,\r\n Language: this.options.context.get('Campaign').DomainLanguage,\r\n Source: this.options.context.get('Campaign').TargetingSource,\r\n } : this.dsaSettingsView.getValues();\r\n\r\n view.setAutoTargetsViewSetting({\r\n Language: dsaSettings.LanguageCode,\r\n DomainName: dsaSettings.DomainName,\r\n Source: dsaSettings.Source,\r\n });\r\n });\r\n }\r\n\r\n initializeKeywordAdGroupCreateView() {\r\n const KeywordAdGroupCreateView = keywordAdGroupCreateDecorator.decorate(AdGroupView);\r\n const KeywordAdGroupUpdateView = keywordAdGroupUpdateDecorator.decorate(AdGroupUpdateView);\r\n\r\n this.keywordAdGroupCreateView = new KeywordAdGroupCreateView(_.extend({}, this.options, {\r\n UpdateView: KeywordAdGroupUpdateView,\r\n isOptional: true,\r\n checkAdGroupNameDuplicates: this.checkAllAdGroupNameDuplicate.bind(this),\r\n isMixedModeCampaignCreation: true,\r\n }));\r\n }\r\n\r\n updateSubViewDSASettings() {\r\n const dsaSettings = this.dsaSettingsView.getValues();\r\n\r\n if (this.autoTargetAdGroupCreateView) {\r\n this.autoTargetAdGroupCreateView.trigger('updateAutoTargetEditorSetting', {\r\n Language: dsaSettings.LanguageCode,\r\n DomainName: dsaSettings.DomainName,\r\n Source: dsaSettings.Source,\r\n });\r\n }\r\n }\r\n\r\n initializeDSASettings() {\r\n this.dsaSettingsView = new DSASettingsView();\r\n\r\n this.dsaSettingsView.on('change', () => {\r\n this.updateSubViewDSASettings();\r\n this.modified = true;\r\n });\r\n }\r\n\r\n toggleDSASettings() {\r\n this.viewModel.hasDSASettings(!this.hasDSASettingsInCampaignSettings());\r\n }\r\n\r\n adjustSectionOrder() {\r\n if (!this.mounted) {\r\n const hasDSASettings = this.hasDSASettingsInCampaignSettings();\r\n const $sectionRoot = this.$('.mixed-mode-adgroup-create');\r\n const $dynamicAdGroupSection = this.$('#dynamicAdGroupSection');\r\n const $standardAdGroupSection = this.$('#standardAdGroupSection');\r\n const $standardAdGroupSectionContainer = this.$('.standard-adgroup-creation-section-container');\r\n const $dynamicAdGroupSectionContainer = this.$('.dynamic-adgroup-creation-section-container');\r\n\r\n if (hasDSASettings) {\r\n // put standard ad group section to the end\r\n $sectionRoot.append($standardAdGroupSectionContainer);\r\n $dynamicAdGroupSection.collapse('show');\r\n $standardAdGroupSection.collapse('hide');\r\n this.removeStandardAdGroupSectionAriaExpandedAttribute();\r\n this.viewModel.isDynamicAdGroupSectionExpanded(true);\r\n this.viewModel.isStandardAdGroupSectionExpanded(false);\r\n } else {\r\n // put dynamic ad group section to the end\r\n $sectionRoot.append($dynamicAdGroupSectionContainer);\r\n $standardAdGroupSection.collapse('show');\r\n this.removeStandardAdGroupSectionAriaExpandedAttribute();\r\n $dynamicAdGroupSection.collapse('hide');\r\n this.viewModel.isStandardAdGroupSectionExpanded(true);\r\n this.viewModel.isDynamicAdGroupSectionExpanded(false);\r\n }\r\n }\r\n\r\n const hasDisclaimerSettings = this.hasDisclaimerSettings();\r\n\r\n this.viewModel.hasDisclaimerSettings(hasDisclaimerSettings);\r\n this.viewModel.isDomesticSimplifiedChineseEnabled(pageContext.Permissions && pageContext.Permissions.IsDomesticSimplifiedChineseEnabled);\r\n this.viewModel.allowDisclaimer(true);\r\n }\r\n\r\n onToggleSection(evt) {\r\n const { target } = evt;\r\n const { id } = target;\r\n\r\n if (id === 'dynamicAdGroupSection') {\r\n this.viewModel.isDynamicAdGroupSectionExpanded(!this.viewModel.isDynamicAdGroupSectionExpanded());\r\n } else if (id === 'standardAdGroupSection') {\r\n this.viewModel.isStandardAdGroupSectionExpanded(!this.viewModel.isStandardAdGroupSectionExpanded());\r\n }\r\n\r\n this.removeStandardAdGroupSectionAriaExpandedAttribute();\r\n }\r\n\r\n render() {\r\n this.$el.empty().append(tmpl({\r\n i18n,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.$('#dynamicAdGroupSection .dynamic-ad-group-create-view-container').empty().append(this.autoTargetAdGroupCreateView.render().$el);\r\n this.$('#standardAdGroupSection .standard-ad-group-create-view-container').empty().append(this.keywordAdGroupCreateView.render().$el);\r\n this.$('#dynamicAdGroupSection .dsa-settings-container').empty().append(this.dsaSettingsView.render().$el);\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.dsaSettingsView) {\r\n this.dsaSettingsView.remove();\r\n }\r\n\r\n if (this.autoTargetAdGroupCreateView) {\r\n this.autoTargetAdGroupCreateView.remove();\r\n }\r\n\r\n if (this.keywordAdGroupCreateView) {\r\n this.keywordAdGroupCreateView.remove();\r\n }\r\n\r\n super.remove();\r\n }\r\n\r\n updateContext() {\r\n const standardAdGroups = this.keywordAdGroupCreateView.ko_model.adGroups();\r\n const dynamicAdGroups = this.autoTargetAdGroupCreateView.ko_model.adGroups();\r\n\r\n const contextAdGroups = _.map(standardAdGroups.concat(dynamicAdGroups), (adGroup) => {\r\n return adGroup.getContextObject();\r\n });\r\n\r\n this.options.context.set({ 'AdGroups': contextAdGroups });\r\n }\r\n\r\n validateIfThereIsAtLeast1AdGroup() {\r\n this.viewModel.errors([]);\r\n const standardAdGroups = this.keywordAdGroupCreateView.ko_model.adGroups();\r\n const dynamicAdGroups = this.autoTargetAdGroupCreateView.ko_model.adGroups();\r\n\r\n if (standardAdGroups.length === 0 && dynamicAdGroups.length === 0) {\r\n this.viewModel.errors([i18n.getString('MixedMode_AdGroupCreation_Warning_At_Least_1_AdGroup')]);\r\n scrollUtil.scrollAndCenter(this.$('ul.alert.alert-danger'));\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n removeStandardAdGroupSectionAriaExpandedAttribute() {\r\n // We are using Bootstrap v3 collapse to show/hide the sections, and it is adding the incorrect aria-expanded attribute to non interactive elements.\r\n // So we need to manually remove it.\r\n setTimeout(() => {\r\n this.$('#standardAdGroupSection').removeAttr('aria-expanded');\r\n });\r\n }\r\n\r\n shouldNext() {\r\n if (this.validateIfThereIsAtLeast1AdGroup()) {\r\n return Promise.all([\r\n this.keywordAdGroupCreateView.save(true),\r\n this.autoTargetAdGroupCreateView.save(true),\r\n ])\r\n .then(([keywordAdGroupCreationResult, dynamicAdGroupCreationResult]) => {\r\n const $dynamicAdGroupSection = this.$('#dynamicAdGroupSection');\r\n const $standardAdGroupSection = this.$('#standardAdGroupSection');\r\n\r\n if (!keywordAdGroupCreationResult) {\r\n $standardAdGroupSection.collapse('show');\r\n this.removeStandardAdGroupSectionAriaExpandedAttribute();\r\n }\r\n\r\n if (!dynamicAdGroupCreationResult) {\r\n $dynamicAdGroupSection.collapse('show');\r\n }\r\n\r\n return keywordAdGroupCreationResult && dynamicAdGroupCreationResult;\r\n })\r\n .then((result) => {\r\n if (result) {\r\n this.updateContext();\r\n }\r\n return result;\r\n });\r\n }\r\n\r\n return Promise.resolve(false);\r\n }\r\n\r\n shouldCancel() {\r\n if (this.validateIfThereIsAtLeast1AdGroup()) {\r\n return Promise.all([\r\n this.keywordAdGroupCreateView.shouldCancel(),\r\n this.autoTargetAdGroupCreateView.shouldCancel(),\r\n ]).then(([standardAdGroupCreateResult, dynamicAdGroupCreateResult]) => {\r\n return standardAdGroupCreateResult && dynamicAdGroupCreateResult;\r\n });\r\n }\r\n return Promise.resolve(false);\r\n }\r\n}\r\n","import 'backbone';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nexport function decorate(view) {\r\n return view.extend({\r\n initialize(...args) {\r\n view.prototype.initialize(...args);\r\n this.on('updateAutoTargetEditorSetting', (setting) => {\r\n this.updateViews.forEach((updateView) => {\r\n updateView.trigger('updateAutoTargetEditorSetting', setting);\r\n });\r\n });\r\n },\r\n\r\n render(shouldNotCreateDefaultEditor = false) {\r\n _.bind(view.prototype.render, this)();\r\n if (!_.isUndefined(this.campaign) && !shouldNotCreateDefaultEditor) {\r\n this.create();\r\n }\r\n return this;\r\n },\r\n\r\n createAndRefocus(shouldValidate) {\r\n const isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n const originalCreateAndRefocus = _.bind(view.prototype.createAndRefocus, this);\r\n\r\n if (isDSAMixedModeCampaignEnabled && this.options.submitDSASettings) {\r\n return this.options.submitDSASettings()\r\n .then((result) => {\r\n if (result) {\r\n originalCreateAndRefocus(shouldValidate);\r\n }\r\n });\r\n }\r\n\r\n return originalCreateAndRefocus(shouldValidate);\r\n },\r\n });\r\n}\r\n","/*eslint new-cap:0 */\r\n\r\nimport _ from 'underscore';\r\nimport 'backbone';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport KeywordsView from '@bingads-webui-campaign-legacy/crud-keywords/view/create';\r\nimport { adGroupTypeEnum } from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/adGroupTypeEnum';\r\n\r\nconst isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n\r\nexport function decorate(view) {\r\n return view.extend({\r\n initialize(options = {}) {\r\n const self = this;\r\n\r\n _.bind(view.prototype.initialize, this, options)();\r\n self.subView = new KeywordsView(self.options);\r\n self.subView.on({\r\n 'seedKeywordsEntered': (seedKeywords) => {\r\n if (_.isArray(seedKeywords) && seedKeywords.length > 0) {\r\n self.trigger('seedKeywordsEntered', seedKeywords);\r\n }\r\n },\r\n 'keywords:selected': () => {\r\n if (_.isFunction(self.selectThisAdGroup)) {\r\n self.selectThisAdGroup();\r\n }\r\n },\r\n });\r\n\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n this.ko_model.AdGroupType(adGroupTypeEnum.SearchStandard);\r\n }\r\n },\r\n\r\n addSuggestion(addedKeywords, name, suggestedAvgCpc, sourceReqId) {\r\n // Use the suggested ad group's name, unless the user already renamed this ad group\r\n if (_.isString(name)) {\r\n if (_.isEmpty(this.ko_model.Name())) {//eslint-disable-line\r\n this.ko_model.Name(name);//eslint-disable-line\r\n this.ko_model.suggestedAvgCpc(suggestedAvgCpc);\r\n\r\n this.hasChanges = true;\r\n }\r\n }\r\n\r\n this.subView.addSuggestion(addedKeywords, sourceReqId);\r\n },\r\n\r\n getChanges() {\r\n if (this.hasChanges || this.subView.hasChanges) {\r\n const serializedAdGroup = this.ko_model.toObject();\r\n const adGroupId = _.isNaN(serializedAdGroup.Id) || serializedAdGroup.Id < 1 ? null : serializedAdGroup.Id;\r\n\r\n const keywords = this.subView.getChangedKeywords({\r\n Id: adGroupId,\r\n Name: this.ko_model.Name(),//eslint-disable-line\r\n });\r\n\r\n serializedAdGroup.Keywords = keywords;\r\n serializedAdGroup['Client Id'] = `${this.ko_model.options.index}`;\r\n\r\n if (_.isNull(adGroupId)) {\r\n const keys = ['Client Id', 'Name', 'Campaign', 'Language', 'Keywords', 'PricingModel', 'Medium'];\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n keys.push('AdGroupType');\r\n }\r\n\r\n return _.pick(serializedAdGroup, keys);\r\n } else {\r\n const result = _.pick(serializedAdGroup, ['Client Id', 'Id', 'Name', 'Campaign', 'Keywords']);\r\n\r\n if (result.Keywords.length === 0) {\r\n if (this.hasChanges) {\r\n delete result.Keywords;\r\n } else {\r\n this.subView.hasChanges = false;\r\n return null;\r\n }\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n getContextObject() {\r\n const adGroupsStored = this.options && this.options.context && this.options.context.get('AdGroups');\r\n const currentId = this.ko_model.Id();\r\n const currentAdGroup = _.chain(adGroupsStored).where({ Id: currentId }).first().value();\r\n\r\n let object = {\r\n Id: currentId,\r\n Name: this.ko_model.Name(),\r\n Keywords: this.subView.getContextObjects(),\r\n suggestedAvgCpc: this.ko_model.suggestedAvgCpc(),\r\n };\r\n\r\n if (currentAdGroup) {\r\n object.Bid = _.result(currentAdGroup, 'Bid');\r\n }\r\n\r\n if (isDSAMixedModeCampaignEnabled) {\r\n object.AdGroupType = adGroupTypeEnum.SearchStandard;\r\n }\r\n\r\n return object;\r\n },\r\n\r\n updateViewModels(data) {\r\n // BackFill adgroup's Id since it is saved\r\n _.bind(view.prototype.updateViewModels, this, data)();\r\n _.each(data.Keywords, (keyword) => {\r\n keyword.AdGroup = { Id: data.Id };\r\n keyword.Campaign = { Id: data.Campaign.Id };\r\n });\r\n\r\n if (data.Keywords) {\r\n //BackFill keywords' Ids\r\n const keywordObjects = this.subView.updateViewModels({\r\n keywords: data.Keywords,\r\n campaignId: data.Campaign.Id,\r\n adGroupId: data.Id,\r\n });\r\n\r\n this.ko_model.Keywords(keywordObjects);//eslint-disable-line\r\n }\r\n },\r\n\r\n updateViewModelsOnError(response) {\r\n if (response && response.errors && !response.entity) {\r\n //Ajax error [400] - RowCountExceeded\r\n view.prototype.showErrors(response.errors);\r\n return;\r\n }\r\n\r\n // BackFill adgroup's Id if it was saved, or show adgroup's errors if it was failed\r\n _.bind(view.prototype.updateViewModelsOnError, this, response, 'Keywords')();\r\n\r\n if (_.isEmpty(response.entity.errors)) {\r\n // If adgroup was saved, then some keywords may be failed to be saved\r\n const entity = response.entity;\r\n\r\n // If we tried to make keyword changes, we need to check if any succeeded and update the keyword viewmodels. Otherwise, we're done.\r\n if (entity.Keywords && entity.Keywords.length > 0) {\r\n _.each(entity.Keywords, (keyword) => {\r\n keyword.AdGroup = { Id: entity.Id };\r\n keyword.Campaign = { Id: entity.Campaign.Id };\r\n });\r\n\r\n //the second param indicates whether or not check if the keyword is saved (according to Id)\r\n const keywordObjects = this.subView.updateViewModels({\r\n keywords: entity.Keywords,\r\n hasErrors: true,\r\n });\r\n\r\n this.ko_model.Keywords(keywordObjects);//eslint-disable-line\r\n }\r\n } else {\r\n this.subView.clearErrors();\r\n }\r\n },\r\n });\r\n}\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ko_schema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar s$AdGroup = window.globalLegacySchema.get('AdGroup');\r\nvar viewModel = function (options) {\r\n var self = this;\r\n self.options = options || ({});\r\n self.properties = _.keys(s$AdGroup.properties);\r\n ko_schema.properties(self, s$AdGroup, self.properties);\r\n var campaign = self.options.context.get('Campaign');\r\n self.isOpen = ko.observable(true);\r\n self.isOnlyAdGroup = ko.observable(false);\r\n self.Name('');\r\n self.Campaign({\r\n Id: campaign.Id\r\n });\r\n self.CampaignName(campaign.Name);\r\n self.Language(campaign.Language);\r\n self.StartDate(campaign.StartDate);\r\n self.EndDate(campaign.EndDate);\r\n self.isWaitingForSaveResponse = ko.observable(false);\r\n self.isNameDuplicate = ko.observable(false);\r\n self.shouldValidateName = ko.observable(false);\r\n self.isDeleted = ko.observable(false);\r\n self.suggestedAvgCpc = ko.observable();\r\n self.deletedConfirmationMessage = ko.computed(function () {\r\n if (self.isDeleted()) {\r\n return i18n.get('AdGroup_Message_DeletedConfirmation') + ' ' + self.Name();\r\n }\r\n return '';\r\n });\r\n self.removeButtonLabel = ko.computed(function () {\r\n return i18n.get('AdGroup_Label_RemoveButton') + ' ' + self.Name();\r\n });\r\n};\r\nexport default viewModel;\r\n\r\n","/* eslint-disable */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport $ from 'jquery';\r\nimport promise from 'bluebird';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-adgroup/viewmodel/update';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-adgroup/template/update.pug';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar View = Backbone.View.extend({\r\n events: {\r\n 'click .glyphicon.glyphicon-remove': 'delete',\r\n 'show.bs.collapse': 'show',\r\n 'hide.bs.collapse': 'hide',\r\n 'click .adgroup-name': 'selectThisAdGroup'\r\n },\r\n className: 'row',\r\n initialize: function (options) {\r\n var self = this;\r\n self.options = options || ({});\r\n self.adapter = {\r\n adapter: self.options.adapter || 'bulk'\r\n };\r\n self.ko_model = new ViewModel(self.options);\r\n self.hasChanges = true;\r\n self.ko_model.Name.subscribe(function () {\r\n self.hasChanges = true;\r\n self.ko_model.shouldValidateName(true);\r\n self.trigger('nameChanged', self);\r\n });\r\n self.deletedConfirmationTimeout = 3000;\r\n },\r\n selectThisAdGroup: function () {\r\n this.trigger('selectThisAdGroup', this);\r\n },\r\n show: function (e) {\r\n this.ko_model.isOpen(true);\r\n this.trigger('show', this, e);\r\n },\r\n hide: function (e) {\r\n if (!this.validate() || this.ko_model.isOnlyAdGroup()) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n this.save();\r\n this.ko_model.isOpen(false);\r\n return true;\r\n },\r\n collapse: function (operation) {\r\n this.$('.ad-group-collapsible').collapse(operation);\r\n },\r\n render: function () {\r\n this.$el.html(tmpl({\r\n i18n: i18n,\r\n uuid: uuid\r\n }));\r\n ko.applyBindings(this.ko_model, this.el);\r\n this.subView.render();\r\n this.$('.ad-group-collapsible').append(this.subView.el);\r\n return this;\r\n },\r\n create: function (newAdGroup) {\r\n var self = this;\r\n self.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n self.ko_model.isWaitingForSaveResponse(true);\r\n var blocker = withUiBlock();\r\n return jsdata.AdGroup.create(newAdGroup, self.adapter).then(function (data) {\r\n if (!_.isEmpty(data.Id)) {\r\n self.updateViewModels(data);\r\n if (self.options.instrumentation) {\r\n self.options.instrumentation.instrument('create', data);\r\n }\r\n if (self.options.activityLogger) {\r\n self.options.activityLogger.signal('1', `create adgroup | type: ${_.result(newAdGroup, 'AdGroupType')}`);\r\n }\r\n }\r\n }).catch(function (errors) {\r\n self.updateViewModelsOnError(errors);\r\n }).finally(function () {\r\n blocker();\r\n self.ko_model.isWaitingForSaveResponse(false);\r\n });\r\n },\r\n showErrors: function (errors) {\r\n self.ko_model.errors.add(i18nErrors.getODataErrors(errors));\r\n },\r\n update: function (adGroupToUpdate) {\r\n var self = this;\r\n self.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n self.ko_model.isWaitingForSaveResponse(true);\r\n return jsdata.AdGroup.update(self.ko_model.Id(), adGroupToUpdate, self.adapter).then(function (data) {\r\n self.updateViewModels(data);\r\n if (self.options.instrumentation) {\r\n self.options.instrumentation.instrument('update', data);\r\n }\r\n if (self.options.activityLogger) {\r\n self.options.activityLogger.signal('1', `update adgroup | type: ${_.result(adGroupToUpdate, 'AdGroupType')}`);\r\n }\r\n }).catch(function (errors) {\r\n self.updateViewModelsOnError(errors);\r\n }).finally(function () {\r\n self.ko_model.isWaitingForSaveResponse(false);\r\n });\r\n },\r\n delete: function () {\r\n var self = this;\r\n self.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n self.ko_model.isWaitingForSaveResponse(true);\r\n if (_.isNaN(self.ko_model.Id()) || self.ko_model.Id() < 1) {\r\n self.confirmDelete(self);\r\n return promise.resolve({\r\n 'success': true\r\n });\r\n } else {\r\n self.ko_model.isWaitingForSaveResponse(true);\r\n var deleteParams = _.extend(self.adapter, {\r\n parentId: self.ko_model.Campaign().Id\r\n });\r\n var blocker = withUiBlock(this.$el);\r\n return jsdata.AdGroup.destroy(self.ko_model.Id(), deleteParams).then(function (data) {\r\n self.confirmDelete(self);\r\n if (self.options.instrumentation) {\r\n self.options.instrumentation.instrument('delete', data);\r\n }\r\n if (self.options.activityLogger) {\r\n self.options.activityLogger.signal('1', 'delete adgroup');\r\n }\r\n }).catch(function (response) {\r\n self.ko_model.errors.add(i18nErrors.getBulkApiErrors(response.errors));\r\n }).finally(function () {\r\n self.ko_model.isWaitingForSaveResponse(false);\r\n blocker();\r\n });\r\n }\r\n },\r\n confirmDelete: function (self) {\r\n self.trigger('delete', self);\r\n self.ko_model.isDeleted(true);\r\n setTimeout(self.remove.bind(self), self.deletedConfirmationTimeout);\r\n },\r\n save: function () {\r\n if (!this.validate()) {\r\n return promise.resolve({\r\n isValid: false,\r\n success: true\r\n });\r\n }\r\n var changes = this.getChanges();\r\n if (!_.isNull(changes)) {\r\n if (_.isNaN(this.ko_model.Id()) || this.ko_model.Id() < 1) {\r\n return this.create(changes);\r\n } else {\r\n return this.update(changes);\r\n }\r\n }\r\n return promise.resolve({\r\n isValid: true,\r\n success: true\r\n });\r\n },\r\n updateCampaign: function () {\r\n var editableFields = ['StartDate', 'EndDate'];\r\n var contextCampaign = this.options.context.get('Campaign');\r\n _.each(editableFields, function (field) {\r\n if (this.ko_model[field]() !== contextCampaign[field]) {\r\n this.ko_model[field](contextCampaign[field]);\r\n this.hasChanges = true;\r\n }\r\n }, this);\r\n },\r\n validateViewModel: function () {\r\n var isValid = this.ko_model.validate();\r\n if (!isValid) {\r\n _.each(this.ko_model.properties, function (field) {\r\n if (!this.ko_model[field].isValid()) {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal('ad group field invalid: ' + field, 'create ad group');\r\n }\r\n }\r\n }, this);\r\n }\r\n return isValid;\r\n },\r\n validate: function () {\r\n var viewHasChanges = this.hasChanges;\r\n this.ko_model.shouldValidateName(true);\r\n var hasDuplicateNames = this.ko_model.isNameDuplicate();\r\n if (hasDuplicateNames && this.options.activityLogger) {\r\n this.options.activityLogger.signal('ad group field invalid: has duplicate names', 'create ad group');\r\n }\r\n var isValid = this.validateViewModel() && !hasDuplicateNames;\r\n isValid = this.subView.validate() && isValid;\r\n this.hasChanges = viewHasChanges;\r\n return isValid;\r\n },\r\n updateViewModels: function (data) {\r\n this.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n if (_.isNaN(this.ko_model.Id()) || this.ko_model.Id() < 1) {\r\n this.ko_model.Id(Number(data.Id));\r\n }\r\n this.hasChanges = false;\r\n },\r\n updateViewModelsOnError: function (response, subEntity) {\r\n this.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n i18nErrors.getPartial(response, [subEntity]);\r\n if (this.options.activityLogger && response && response.errors) {\r\n _.chain(response.errors).map(function (error) {\r\n return error.Error;\r\n }).uniq().each(function (error) {\r\n this.options.activityLogger.signal(error, 'adgroup creation api error');\r\n }, this);\r\n }\r\n if (!_.isEmpty(response.entity.errors)) {\r\n this.ko_model.errors.add(response.entity.errors);\r\n } else {\r\n this.hasChanges = false;\r\n }\r\n if (_.isUndefined(response.entity.Id)) {\r\n return;\r\n }\r\n if (_.isNaN(this.ko_model.Id()) || this.ko_model.Id() < 1) {\r\n this.ko_model.Id(Number(response.entity.Id));\r\n }\r\n }\r\n});\r\nexport default View;\r\n\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n scenario,\r\n activityLogger,\r\n } = {}) {\r\n this.selectedCampaigns = ko.observable();\r\n this.selectedAdgroups = ko.observable();\r\n\r\n this.copySetting = ko.observable(false);\r\n this.hide = ko.observable(false);\r\n\r\n this.copySetting.subscribe((value) => {\r\n if (activityLogger) {\r\n activityLogger.signal(`copy campaign settings value change: ${value}`, scenario);\r\n }\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-campaign/viewmodel/copy-campaign-settings';\r\nimport template from '@bingads-webui-campaign-legacy/crud-campaign/template/copy-campaign-settings.pug';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { getODataErrors } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as criterionLoader from '@bingads-webui-campaign-legacy/base-targets/util/criterionLoader';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport CampaignSelectorProxy from '@bingads-webui-campaign-legacy/crud-campaign/view/campaign-selector-proxy';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class View extends Backbone.View {\r\n initialize({\r\n scenario = 'copy-campaign-setttings',\r\n activityLogger,\r\n } = {}) {\r\n this.viewModel = new ViewModel({ scenario, activityLogger });\r\n this.scenario = scenario;\r\n this.activityLogger = activityLogger;\r\n this.campaignSelectorProxy = new CampaignSelectorProxy({\r\n onEventTrigger: (key, selectedItem) => {\r\n this.onCampaignSelectorEventTrigger(key, selectedItem);\r\n },\r\n });\r\n this.campaignSelector = this.campaignSelectorProxy.getCampaignSelectorView();\r\n }\r\n\r\n onCampaignSelectorEventTrigger(key, selectedItem) {\r\n if (_.isEqual(key, 'selected-campaign') && _.has(selectedItem, 'Id')) {\r\n this.loadCampaignAndTargets(selectedItem.Id);\r\n }\r\n }\r\n\r\n render() {\r\n this.$el.empty().append(template({ i18n }));\r\n this.$('.copy-settings').empty().append(this.campaignSelector.render().$el);\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n return this;\r\n }\r\n\r\n loadCampaignAndTargets(id) {\r\n const params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n expand: ['Budget'],\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n const disclaimerRepository = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n skipExtensionCache: true,\r\n });\r\n\r\n Promise.join(\r\n jsdata.Campaign.find(id, params),\r\n criterionLoader.load(id, '', ['LocationCriterion', 'RadiusCriterion', 'LocationIntentCriterion']),\r\n disclaimerRepository.association.findAll({\r\n where: {\r\n campaignId: id,\r\n },\r\n })\r\n ).then((result) => {\r\n this.trigger('copy.campaign', result);\r\n if (this.activityLogger) {\r\n this.activityLogger.signal('select campaign to copy campaign settings', this.scenario);\r\n }\r\n })\r\n .catch(({ errors }) => {\r\n this.trigger('copy.errors', getODataErrors(errors));\r\n if (this.activityLogger) {\r\n _.each(errors, (error) => {\r\n if (error && error.Code) {\r\n this.activityLogger.signal(`copy campaign settings error ${error.Code}`, this.scenario);\r\n }\r\n });\r\n }\r\n })\r\n .finally(withUiBlock());\r\n }\r\n\r\n hide() {\r\n this.viewModel.hide(true);\r\n }\r\n}\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport * as schemas from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport ko_schema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport * as campaignType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar viewModel = function (options) {\r\n this.shouldShowCashbackSettings = options.shouldShowCashbackSettings;\r\n this.shouldShowSponsoredCampaignCashbackOptIn = options.shouldShowSponsoredCampaignCashbackOptIn;\r\n this.isSponsoredCampaignCashbackOptedIn = ko.observable(options.isSponsoredCampaignCashbackOptedIn);\r\n this.isSponsoredCampaignCashbackOptInReadonly = options.isSponsoredCampaignCashbackOptInReadonly;\r\n this.isExperiment = options.isExperiment || (function () {\r\n return false;\r\n });\r\n this.isDisclaimerAdsEnabled = options.isDisclaimerAdsEnabled || (function () {\r\n return false;\r\n });\r\n this.isMixedDSACampaignRecommendation = options.isMixedDSACampaignRecommendation;\r\n this.isMixedDSACampaignCreate = ko.computed((function () {\r\n var currentCampaignType = campaignType.default();\r\n var isDSAMixedModeCampaignEnabled = _.result(config.get('Permissions'), 'IsDSAMixedModeCampaignEnabled', false);\r\n var isDisclaimerAllow = true;\r\n return (currentCampaignType === 'search' || options.campaignType === 'search') && isDSAMixedModeCampaignEnabled && !this.isExperiment() && (isDisclaimerAllow || !this.isDisclaimerAdsEnabled());\r\n }).bind(this));\r\n this.isAudienceCampaignCreate = ko.computed(function () {\r\n var currentCampaignType = campaignType.default();\r\n if (_.isString(currentCampaignType) && currentCampaignType !== 'audience') {\r\n return false;\r\n }\r\n return currentCampaignType === 'audience' || options.campaignType === 'audience';\r\n });\r\n this.campaignProps = ['Name', 'TimeZone'];\r\n ko_schema.properties(this, schemas.Campaign, this.campaignProps, _.defaults(options, {\r\n TimeZone: options.TimeZone || timeZoneMapper.getAccountTimeZone()\r\n }));\r\n if (options.scenario === 'signup-creation-workflow') {\r\n this.Name(i18n.getString('Campaigns_SearchCampaign') + ' 1');\r\n }\r\n this.Id = ko.observable(options.Id);\r\n this.languageError = ko.observable('');\r\n this.timeZoneText = i18n.get('TimeZone_' + this.TimeZone()).replace(/\\{0\\}\\s*\\{1\\}\\s*/, '');\r\n this.isAfterSave = ko.computed((function () {\r\n return !_.isUndefined(this.Id());\r\n }).bind(this));\r\n this.showTimeZoneText = ko.computed(function () {\r\n return options.scenario === 'campaign-settings';\r\n });\r\n this.hasChanges = ko.observable(false);\r\n this.enableMixedModeDSASettings = ko.observable(true);\r\n this.isMixedModeDSASettingsChecked = ko.observable(false);\r\n this.hasRsaAutoAssets = ko.observable(false);\r\n this.isRsaAutoAssetsSettingChecked = ko.observable(false);\r\n this.theme = config.get('theme');\r\n this.hasBroadOnlySetting = ko.observable(false);\r\n this.isBroadOnlySettingChecked = ko.observable(false);\r\n this.selectedBrandLists = ko.observableArray([]);\r\n this.deletedBrandListIds = ko.observableArray([]);\r\n this.addedBrandListIds = ko.observableArray([]);\r\n this.savedBrandListIds = ko.observableArray([]);\r\n this.showVanityUrlSettings = ko.observable(false);\r\n this.vanityUrlSettings = ko.observable({\r\n DisplayUrlMode: 'ManufacturerWebsiteUrl',\r\n WebsiteDescription: 'Unspecified'\r\n });\r\n this.campaignGoalText = _.result(_.find(options.CampaignSettings, i => _.has(i, 'CampaignObjectiveSettingType')), 'CampaignObjectiveSettingType');\r\n this.showCampaignGoal = ko.computed((function () {\r\n var isAmplifyEnabled = _.result(config.get('Permissions'), 'IsAmplifyEnabled', false);\r\n return !_.isEmpty(this.campaignGoalText) && isAmplifyEnabled;\r\n }).bind(this));\r\n};\r\nviewModel.prototype.getValues = function () {\r\n var context = {\r\n Name: this.Name(),\r\n TimeZone: this.TimeZone()\r\n };\r\n return context;\r\n};\r\nexport default viewModel;\r\n\r\n","/* eslint-disable */\r\nimport Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport summaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-campaign/viewmodel/create';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-campaign/template/create.pug';\r\nimport Budget from '@bingads-webui-campaign-legacy/budget/view/budget';\r\nimport * as _LocationTargetsView from '@bingads-webui-campaign-legacy/location-targets/view/locationTargets';\r\nimport * as _CashbackSettings from '@bingads-webui-campaign/cashback-settings';\r\nimport * as personalizedOfferUtils from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as _edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport * as scrollUtil from '@bingads-webui-component-legacy/extension/scrollTo';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport * as _Language from '@bingads-webui-component-legacy/language-selector/view/index';\r\nimport * as defaultLanguage from '@bingads-webui-component-legacy/language-selector/util/defaultLanguage';\r\nimport * as _AppEventDelegator from '@bingads-webui-component-legacy/app-event-delegator/index';\r\nimport * as _MultiLanguage from '@bingads-webui-campaign/multi-language-selector';\r\nimport * as _AdsCampaignDisclaimers from '@bingads-webui-campaign-react/ads-campaign-disclaimers';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport * as _SharedBudgetView from '@bingads-webui-campaign-legacy/shared-budget/view/shared-budget-switch-editor';\r\nimport * as _CopySettings from '@bingads-webui-campaign-legacy/crud-campaign/view/copy-campaign-settings';\r\nimport * as _BiddingStrategyView from '@bingads-webui-campaign-legacy/bidding-strategy/view/setting';\r\nimport * as campaignType from '@bingads-webui-campaign-legacy/adgroup-create-advanced/util/campaignType';\r\nimport * as _ExperimentBudgetAlert from '@bingads-webui-campaign-legacy/experiments-tab/experiment-budget-alert-loader';\r\nimport * as schemas from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport * as _SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport BiddingStrategyType from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport * as _DSASettingsView from '@bingads-webui-campaign-legacy/dsa-settings/view/dsa-settings';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport * as _AudienceCampaignShared from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport * as _LoadMap from '@bingads-webui-campaign-legacy/dashboard-page/service/load-map';\r\nimport * as _physicalIntentOptions from '@bingads-webui-campaign-legacy/location-targets/viewmodel/physicalIntentOptions';\r\nimport * as _AudienceCampaignCrud from '@bingads-webui-campaign/crud-audience-campaign';\r\nimport * as SponsoredCampaignShared from '@bingads-webui-campaign/sponsored-campaign-shared';\r\nimport * as _BrandListsComponents from '@bingads-webui-campaign-react/brand-lists-components';\r\nimport * as _VanityUrlOption from '@bingads-webui-campaign-react/vanity-url-option';\r\nimport * as _preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar newI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\nvar s$AdGroup = schemas.AdGroup;\r\nvar s$CampaignCriterion = schemas.CampaignCriterion;\r\nvar s$DisclaimerAdExtension = schemas.DisclaimerAdExtension;\r\nvar AppEventDelegator = _AppEventDelegator.default;\r\nvar edm = _edm.default;\r\nvar Language = _Language.default;\r\nvar LocationTargetsView = _LocationTargetsView.default;\r\nvar CopySettings = _CopySettings.default;\r\nvar BiddingStrategyView = _BiddingStrategyView.default;\r\nvar SharedBudgetView = _SharedBudgetView.default;\r\nvar MultiLanguage = _MultiLanguage.MultiLanguageSelector;\r\nvar AdsCampaignDisclaimers = _AdsCampaignDisclaimers.AdsCampaignDisclaimers;\r\nvar ExperimentBudgetAlert = _ExperimentBudgetAlert.ExperimentBudgetAlert;\r\nvar SharedRepository = _SharedRepository.default;\r\nvar DSASettingsView = _DSASettingsView.default;\r\nvar CashbackSettingsView = _CashbackSettings.CashbackSettings;\r\nvar loadMap = _LoadMap.loadMap;\r\nvar ImpressionTrackingView = _AudienceCampaignShared.ImpressionTrackingUrlOptions;\r\nvar {isSponsoredCampaignCashbackOptInAvailable} = SponsoredCampaignShared;\r\nvar BroadOnlySetting = _BrandListsComponents.WrappedBroadOnlySetting;\r\nvar defaultPopupIds = {\r\n 'CampaignName': 'pop_BA_CampaignCreate_Settings_CampaignName',\r\n 'Language': 'pop_BA_CampaignCreate_Settings_AdLanguage',\r\n 'MultiLanguage': 'pop_BA_CampaignCreate_Settings_LanguageTargeting',\r\n TargetingSource: 'pop_BA_DSA_TargetingSource',\r\n Budget: 'pop_BA_CampaignCreate_Budget_SharedBudget'\r\n};\r\nvar physicalIntentOptions = _physicalIntentOptions.default;\r\nvar VanityUrlOption = _VanityUrlOption.VanityUrlOption;\r\nvar preferencesService = _preferencesService.default || _preferencesService;\r\nvar View = Backbone.View.extend({\r\n initialize: function (options) {\r\n this.options = _.defaults({}, options, {\r\n scenario: 'creation-workflow',\r\n showLanguage: true,\r\n Languages: [],\r\n showInitialUiBlocker: true,\r\n hideBidStrategy: false,\r\n deps: {},\r\n IsAdsGlobalizationPhase1Enabled: pageContext.Permissions.IsAdsGlobalizationPhase1Enabled,\r\n IsAdsGlobalizationPhase2Enabled: pageContext.Permissions.IsAdsGlobalizationPhase2Enabled,\r\n IsAdsGlobalizationPhase6Enabled: pageContext.Permissions.IsAdsGlobalizationPhase6Enabled,\r\n IsAdsGlobalizationPhase2JapanEnabled: pageContext.Permissions.IsAdsGlobalizationPhase2JapanEnabled,\r\n IsAdsGlobalizationPhase9Enabled: pageContext.Permissions.IsAdsGlobalizationPhase9Enabled,\r\n IsAdsGlobalizationPhase9VIEnabled: pageContext.Permissions.IsAdsGlobalizationPhase9VIEnabled\r\n });\r\n if (this.options && this.options.perfMarker) {\r\n this.showCampaignSettingMarker = this.options.perfMarker.createChild('Show_Campaign_Setting', {\r\n autoEnd: true\r\n });\r\n this.showCampaignSettingMarker.willInit();\r\n }\r\n if (this.options && this.options.activityLogger) {\r\n this.logActivity('display campaign settings step');\r\n }\r\n this.popupIds = _.defaults({}, this.options.popupIds, defaultPopupIds);\r\n this.shouldShowCashbackSettings = personalizedOfferUtils.isPersonalizedOfferAvailable(pageContext.Permissions, this.options.campaignType, this.options.campaignSubType);\r\n const shouldShowSponsoredCampaignCashbackOptIn = isSponsoredCampaignCashbackOptInAvailable(pageContext.Permissions, this.options.campaignType, this.options.campaignSubType, this.options.isMSStoreAdsGAWorkflow);\r\n this.isAudienceCampaign = this.options.campaignType === 'Audience';\r\n this.isAudienceVideoAdsCampaign = this.options.campaignSubType === 'AudienceVideoAds';\r\n this.isEnabledForVerifiedImpressionTracking = this.isAudienceCampaign && this.isAudienceVideoAdsCampaign && pageContext.Permissions.IsEnabledForVerifiedImpressionTrackingAtCampaignLevel;\r\n this.isSignUpPage = this.options.scenario === 'signup-creation-workflow';\r\n this.isWindowsStoreAdsEnabled = this.options.isMSStoreAdsGAWorkflow;\r\n this.isWindowsStoreAdsManualCPAEnabled = Boolean(_.result(pageContext.Permissions.dynamic, 'WindowsStoreAdsManualCPA', false));\r\n this.isSupportMaxConversionsForSscEnabled = Boolean(_.result(pageContext.Permissions.dynamic, 'SupportMaxConversionsForSsc', false));\r\n this.eventDelegator = _.result(this.options.deps, 'eventDelegator', new AppEventDelegator());\r\n this.ko_model = new ViewModel(_.extend({}, this.options, {\r\n isExperiment: this.isExperiment,\r\n isDisclaimerAdsEnabled: this.isDisclaimerAdsEnabled.bind(this),\r\n shouldShowCashbackSettings: this.shouldShowCashbackSettings,\r\n shouldShowSponsoredCampaignCashbackOptIn\r\n }));\r\n this.ko_model.isSponsoredCampaignCashbackOptedIn.subscribe(value => this.trigger('change:isSponsoredCampaignCashbackOptedIn', value));\r\n this.isVideo = this.options.CampaignSubType === 'AudienceVideoAds';\r\n this.autoTargetingSettings = _.find(this.options.CampaignSettings, setting => setting['@odata.type'] === '#Model.PredictiveTargetingSetting') || ({});\r\n if (this.options.scenario === 'campaign-settings') {\r\n if (_.contains(['search'], campaignType.default())) {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'Campaign',\r\n biddingStrategyType: this.options.BiddingScheme.Type,\r\n bidStrategyName: this.options.BidStrategyName,\r\n maxCpc: this.options.BiddingScheme.MaxCpc ? this.options.BiddingScheme.MaxCpc.Amount : null,\r\n targetCpa: this.options.BiddingScheme.TargetCpa,\r\n targetRoas: this.options.BiddingScheme.TargetRoas,\r\n targetAdPosition: this.options.BiddingScheme.TargetAdPosition,\r\n targetImpressionShare: this.options.BiddingScheme.TargetImpressionShare,\r\n campaignType: campaignType.default(),\r\n activityLogger: this.options.activityLogger,\r\n i18nNewDesign: this.options.deps.i18nNewDesign,\r\n shouldSupportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n autoTargetingEnabled: this.autoTargetingSettings.PredictiveTargetingEnabled || false,\r\n ccJsData: this.options.ccJsData,\r\n isBroadMatchOnlyCampaign: this.ko_model.isBroadOnlySettingChecked()\r\n });\r\n } else if (_.contains(['shopping'], campaignType.default())) {\r\n this.biddingStrategyView = new BiddingStrategyView(_.extend({\r\n entityType: 'Campaign',\r\n biddingStrategyType: this.options.BiddingScheme.Type,\r\n bidStrategyName: this.options.BidStrategyName,\r\n maxCpc: this.options.BiddingScheme.MaxCpc ? this.options.BiddingScheme.MaxCpc.Amount : null,\r\n targetCpa: this.options.BiddingScheme.TargetCpa,\r\n targetRoas: this.options.BiddingScheme.TargetRoas,\r\n costPerSale: this.options.BiddingScheme.TargetCostPerSale,\r\n validateWithBudget: true,\r\n campaignType: 'shopping',\r\n isAfterSave: this.ko_model.isAfterSave(),\r\n activityLogger: this.options.activityLogger,\r\n i18nNewDesign: this.options.deps.i18nNewDesign,\r\n shouldSupportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n shouldShowSponsoredCampaignCashback: shouldShowSponsoredCampaignCashbackOptIn,\r\n isSponsoredCampaignCashbackOptedIn: this.options.isSponsoredCampaignCashbackOptedIn,\r\n isMSStoreAdsGAWorkflow: this.options.isMSStoreAdsGAWorkflow,\r\n popupIds: {\r\n BidStrategy: this.popupIds.BidStrategy\r\n },\r\n ccJsData: this.options.ccJsData\r\n }, pageContext.Permissions.IsManualBiddingDeprecationEnabled ? {\r\n campaignSubType: this.options.CampaignSubType\r\n } : {}));\r\n } else if (_.contains(['audience'], campaignType.default())) {\r\n if (pageContext.Permissions.IsManualCpmEnabled || pageContext.Permissions.IsAudienceCampaignAutoBiddingV2Enabled) {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'Campaign',\r\n biddingStrategyType: this.options.BiddingScheme.Type,\r\n bidStrategyName: this.options.BidStrategyName,\r\n campaignSubType: this.options.CampaignSubType,\r\n campaignType: campaignType.default(),\r\n maxCpc: this.options.BiddingScheme.MaxCpc ? this.options.BiddingScheme.MaxCpc.Amount : null,\r\n targetCpa: this.options.BiddingScheme.TargetCpa,\r\n activityLogger: this.options.activityLogger,\r\n i18nNewDesign: this.options.deps.i18nNewDesign,\r\n shouldSupportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n ccJsData: this.options.ccJsData\r\n });\r\n }\r\n if (this.isEnabledForVerifiedImpressionTracking) {\r\n var initialIASImpressionTrackingUrlValue = '';\r\n if (_.isArray(this.options.CampaignSettings) && this.options.CampaignSettings.length > 0 && _.isArray(this.options.CampaignSettings[0].VerifiedTrackingSettings) && this.options.CampaignSettings[0].VerifiedTrackingSettings.length > 0 && _.isArray(this.options.CampaignSettings[0].VerifiedTrackingSettings[0].VerifiedTrackingData) && this.options.CampaignSettings[0].VerifiedTrackingSettings[0].VerifiedTrackingData.length > 0) {\r\n initialIASImpressionTrackingUrlValue = this.options.CampaignSettings[0].VerifiedTrackingSettings[0].VerifiedTrackingData[0].Data.Values;\r\n }\r\n const showIASOption = false;\r\n if (showIASOption) {\r\n this.ImpressionTrackingView = new ImpressionTrackingView({\r\n i18n: i18n,\r\n isEnabledForVerifiedImpressionTrackingAtCampaignLevel: this.isEnabledForVerifiedImpressionTracking,\r\n initialIASImpressionTrackingUrlValue: initialIASImpressionTrackingUrlValue,\r\n isImpressionTrackingUrlSectionVisible: false\r\n });\r\n }\r\n var _this = this;\r\n this.ImpressionTrackingView && this.ImpressionTrackingView.on('IASInputChange', function (value) {\r\n if (value === null || _.isString(value) && value.length === 0) {\r\n _this.IASTrackingInfo = 'delete_value';\r\n return;\r\n }\r\n _this.IASTrackingInfo = value;\r\n });\r\n }\r\n }\r\n } else if (this.options.scenario === 'shopping-creation-workflow') {\r\n this.biddingStrategyView = new BiddingStrategyView(_.extend({\r\n entityType: 'Campaign',\r\n isInitialize: true,\r\n isCreation: true,\r\n isAfterSave: this.ko_model.isAfterSave(),\r\n campaignType: 'shopping',\r\n validateWithBudget: true,\r\n campaignSubType: this.options.campaignSubType,\r\n activityLogger: this.options.activityLogger,\r\n i18nNewDesign: this.options.deps.i18nNewDesign,\r\n shouldSupportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n shouldShowSponsoredCampaignCashback: shouldShowSponsoredCampaignCashbackOptIn,\r\n isMSStoreAdsGAWorkflow: this.options.isMSStoreAdsGAWorkflow,\r\n popupIds: {\r\n BidStrategy: this.popupIds.BidStrategy\r\n },\r\n ccJsData: this.options.ccJsData\r\n }, this.options.hideBidStrategy ? {} : {\r\n biddingStrategyType: BiddingStrategyType.enhancedCPC\r\n }));\r\n } else if (this.options.scenario === 'smart-shopping-campaign-creation-workflow') {\r\n var BiddingScheme = this.options.BiddingScheme || ({});\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'Campaign',\r\n maxCpc: BiddingScheme.MaxCpc ? BiddingScheme.MaxCpc.Amount : null,\r\n targetCpa: BiddingScheme.TargetCpa,\r\n targetRoas: BiddingScheme.TargetRoas,\r\n isInitialize: true,\r\n isCreation: true,\r\n campaignType: 'shopping',\r\n campaignSubType: 'ShoppingSmartAds',\r\n biddingStrategyType: this.isSupportMaxConversionsForSscEnabled ? BiddingScheme.Type : BiddingStrategyType.maxConversionValue,\r\n activityLogger: this.options.activityLogger,\r\n shouldSupportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n isAfterSave: this.ko_model.isAfterSave(),\r\n ccJsData: this.options.ccJsData\r\n });\r\n }\r\n if (!this.isSignUpPage && this.options.scenario !== 'creation-workflow') {\r\n this.initBudgetView(this.options.Budget);\r\n }\r\n this.initDSASettingsView();\r\n this.initCashbackSettings();\r\n this.initRSASettingsView();\r\n this.initBroadOnlyView();\r\n if (this.isMultipleLanguageEnabledIncampaign()) {\r\n this.initMultiLangaugeSelector();\r\n } else {\r\n this.language = new Language(_.pick(this.options, 'i18nStrings', 'enableAdsGlobalizationPhase1'));\r\n }\r\n ko.computed(function () {\r\n if (!this.isMultipleLanguageEnabledIncampaign) {\r\n this.language.koModel.disabled(this.ko_model.isAfterSave());\r\n }\r\n if (this.dsaSettingsView) {\r\n this.dsaSettingsView.setValues({\r\n campaignId: this.ko_model.Id()\r\n });\r\n }\r\n }, this);\r\n if (this.isCreationScenario() && !this.isSignUpPage && this.options.scenario !== 'smart-shopping-campaign-creation-workflow') {\r\n this.copySettings = new CopySettings({\r\n scenario: this.options.scenario,\r\n activityLogger: this.options.activityLogger\r\n });\r\n this.copySettings.on('copy.campaign', this.copyFromCampaign.bind(this));\r\n this.copySettings.on('copy.errors', (function (errors) {\r\n ko.observableArray.fn.push.apply(this.ko_model.errors, errors);\r\n }).bind(this));\r\n }\r\n if (this.hasDisclaimer()) {\r\n this.disclaimerRepository = new SharedRepository({\r\n schema: s$DisclaimerAdExtension,\r\n skipExtensionCache: true\r\n });\r\n this.disclaimer = React.createRef();\r\n this.disclaimerProps = {\r\n ref: this.disclaimer,\r\n i18n: newI18n,\r\n campaignId: 0,\r\n DisclaimerAdsEnabled: true,\r\n AllowDisclaimerEnabled: true,\r\n schema: s$DisclaimerAdExtension,\r\n repository: this.disclaimerRepository,\r\n permissions: pageContext.Permissions,\r\n resetSelectedDisclaimer: (function () {\r\n delete this.disclaimerProps.selectedDisclaimer;\r\n this.renderDisclaimerUI();\r\n }).bind(this),\r\n usePanel: options && options.usePanel\r\n };\r\n }\r\n if (this.hasBroadOnlySetting()) {\r\n this.preferencesService = preferencesService;\r\n this.preferencesService.initialize();\r\n }\r\n },\r\n inCampaignEditing: function () {\r\n return this.options.Id > 0;\r\n },\r\n isExperiment: function () {\r\n return _.result(pageContext.CurrentCampaign, 'ExperimentId') > 0;\r\n },\r\n isMultipleLanguageEnabledIncampaign: function () {\r\n return this.options.showLanguage && !_.contains(['shopping'], campaignType.default());\r\n },\r\n hasDisclaimer: function () {\r\n const searchCondition = pageContext.Permissions.IsDisclaimerAdsEnabled && (this.options.scenario === 'creation-workflow' && this.options.campaignType === 'search' || this.options.scenario === 'campaign-settings' && campaignType.default() === 'search' && !this.isExperiment());\r\n const audienceCondition = pageContext.Permissions.IsDisclaimerAdsEnabled && pageContext.Permissions.IsMSANDisclaimerEnabled && (this.options.scenario === 'creation-workflow' && this.options.campaignType === 'Audience' && this.options.campaignSubType === 'AudienceStatic' || this.options.scenario === 'campaign-settings' && this.options.campaignType === 'Audience' && this.options.campaignSubType === 'AudienceStatic');\r\n return searchCondition || audienceCondition;\r\n },\r\n hasRsaAutoAssets: function () {\r\n return this.options.scenario === 'creation-workflow' && this.options.campaignType === 'search' || this.options.scenario === 'campaign-settings' && campaignType.default() === 'search';\r\n },\r\n hasBroadOnlySetting: function () {\r\n return Boolean(_.result(pageContext.Permissions.dynamic, 'BroadOnly', false)) && !Boolean(_.result(pageContext.Permissions.dynamic, 'PredictiveMatching', false)) && (this.options.scenario === 'creation-workflow' && this.options.campaignType === 'search' || this.options.scenario === 'campaign-settings' && campaignType.default() === 'search');\r\n },\r\n showVanityUrlSettings: function () {\r\n return pageContext.Permissions.IsVanityUrlEnabled && pageContext.Permissions.dynamic.VanityUrlWebsiteDescription && (this.options.scenario === 'creation-workflow' && this.options.campaignType === 'search');\r\n },\r\n getAssociatedDisclaimer: function (campaignId) {\r\n return campaignId ? this.disclaimerRepository.association.findAll({\r\n where: {\r\n campaignId: campaignId\r\n }\r\n }).then(function (disclaimerdata) {\r\n if (disclaimerdata && disclaimerdata.length > 0) {\r\n return disclaimerdata[0];\r\n } else {\r\n return null;\r\n }\r\n }) : Promise.resolve(null);\r\n },\r\n renderDisclaimerUI: function () {\r\n ReactDOM.render(React.createElement(AdsCampaignDisclaimers, this.disclaimerProps), this.$('.disclaimer__container')[0]);\r\n },\r\n toggleDisclaimerUI: function (disabled) {\r\n if (this.disclaimerProps != null) {\r\n this.disclaimerProps = _.extend({}, this.disclaimerProps, {\r\n DisclaimerAdsEnabled: disabled ? false : undefined,\r\n isDisclaimerCheckboxDisabled: disabled\r\n });\r\n this.renderDisclaimerUI();\r\n }\r\n },\r\n isDisclaimerAdsEnabled: function () {\r\n return _.isObject(this.options.context) && _.result(this.options.context.get('Draft.Disclaimer'), 'DisclaimerAdsEnabled', false) || _.result(_.find(this.options.CampaignSettings, function (setting) {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n }), 'DisclaimerAdsEnabled', false);\r\n },\r\n initDisclaimerUI: function () {\r\n if (this.hasDisclaimer()) {\r\n this.disclaimerProps.campaignId = this.ko_model.Id() || 0;\r\n this.disclaimerProps.DisclaimerAdsEnabled = this.isDisclaimerAdsEnabled();\r\n this.disclaimerProps.isNativeAd = this.options.campaignType === 'Audience' && this.options.campaignSubType === 'AudienceStatic';\r\n this.disclaimerProps.onDisclaimerCheckboxChange = (function (disclaimerAdsEnabled) {\r\n this.disclaimerProps.DisclaimerAdsEnabled = disclaimerAdsEnabled;\r\n this.dsaSettingsView && this.dsaSettingsView.setValues({\r\n disclaimerAdsEnabled: disclaimerAdsEnabled\r\n });\r\n this.logActivity(`disclaimer changed: ${disclaimerAdsEnabled ? 'enabled' : 'disabled'}`);\r\n }).bind(this);\r\n this.getAssociatedDisclaimer(this.disclaimerProps.campaignId).then((function (data) {\r\n if (data) {\r\n this.disclaimerProps.selectedDisclaimer = data;\r\n }\r\n this.renderDisclaimerUI();\r\n }).bind(this));\r\n } else {\r\n this.$('.disclaimer__container').empty();\r\n }\r\n },\r\n initAutoAssetsUI: function () {\r\n if (this.hasRsaAutoAssets()) {\r\n this.ko_model.hasRsaAutoAssets(true);\r\n this.ko_model.isRsaAutoAssetsSettingChecked.subscribe((function (checked) {\r\n this.logActivity(`RSA auto assets setting changed: ${checked ? 'enabled' : 'disabled'}`);\r\n }).bind(this));\r\n }\r\n },\r\n initBroadOnlyUI: function () {\r\n if (this.hasBroadOnlySetting()) {\r\n this.ko_model.hasBroadOnlySetting(true);\r\n this.renderBroadOnlySetting();\r\n if (this.biddingStrategyView) {\r\n this.ko_model.isBroadOnlySettingChecked.subscribe((function (checked) {\r\n this.logActivity('broad only setting changed: ' + checked);\r\n this.biddingStrategyView.viewModel.isBroadMatchOnlyCampaign(checked);\r\n }).bind(this));\r\n }\r\n }\r\n },\r\n renderBroadOnlySetting: function () {\r\n ReactDOM.unmountComponentAtNode(this.$('.broad-only-setting').get(0));\r\n const props = {\r\n theme: this.ko_model.theme,\r\n i18n: this.options.deps.i18nNewDesign,\r\n serverContext: this.options.serverContext,\r\n scope: this.options.scope,\r\n permissions: pageContext.Permissions,\r\n preferenceService: this.preferencesService,\r\n campaignId: pageContext.CurrentCampaign && pageContext.CurrentCampaign.Id,\r\n isBroadMatchOnly: this.ko_model.isBroadOnlySettingChecked(),\r\n setIsBroadMatchOnly: value => this.ko_model.isBroadOnlySettingChecked(value),\r\n onBrandListsChange: (selectedBrandLists, [deletedBrandListIds, addedBrandListIds]) => {\r\n this.ko_model.selectedBrandLists(selectedBrandLists);\r\n this.ko_model.deletedBrandListIds(deletedBrandListIds);\r\n this.ko_model.addedBrandListIds(addedBrandListIds);\r\n },\r\n cid: pageContext.CurrentAccount.AdvertiserCustomerID,\r\n aid: pageContext.CurrentAccount.Id\r\n };\r\n ReactDOM.render(React.createElement(BroadOnlySetting, props, null), this.$('.broad-only-setting')[0]);\r\n },\r\n initVanityUrlSettings: function () {\r\n if (this.showVanityUrlSettings()) {\r\n this.ko_model.showVanityUrlSettings(true);\r\n this.renderVanityUrlSettings();\r\n }\r\n },\r\n renderVanityUrlSettings: function () {\r\n ReactDOM.unmountComponentAtNode(this.$('.vanity-url-option').get(0));\r\n const props = {\r\n i18n: this.options.deps.i18nNewDesign,\r\n vanityUrlSettings: this.ko_model.vanityUrlSettings(),\r\n onChange: settings => this.ko_model.vanityUrlSettings(settings)\r\n };\r\n ReactDOM.render(React.createElement(VanityUrlOption, props, null), this.$('.vanity-url-option').get(0));\r\n },\r\n setBidStrategyForPersonalizedOffersV2: function (enabled) {\r\n personalizedOfferUtils.setBidStrategyForPersonalizedOffers.bind(this)(enabled);\r\n },\r\n initCashbackSettings: function () {\r\n if (this.shouldShowCashbackSettings) {\r\n var cashBackSettings = _.result(this.options, 'CampaignCashback') || ({});\r\n this.cashbackSettingsView = new CashbackSettingsView({\r\n PersonalizedOffersEnabled: cashBackSettings.PersonalizedOffersEnabled,\r\n CashbackMonthlyBudget: cashBackSettings.MonthlyBudget,\r\n CashbackPercent: cashBackSettings.Percent,\r\n CashbackScope: cashBackSettings.Scope,\r\n CouponsEnabled: cashBackSettings.CouponsEnabled,\r\n isCashbackScopeReadonly: this.options.campaignType !== 'shopping',\r\n deps: {\r\n i18n: i18n,\r\n pageContext: pageContext,\r\n decimal: decimal\r\n },\r\n showCoupon: this.options.campaignType === 'shopping' && this.options.isNotAudienceCampaign,\r\n isCreationScenario: this.isCreationScenario(),\r\n isReadOnly: personalizedOfferUtils.shouldPersonalizedOffersReadOnly(this.ko_model.isAfterSave(), this.biddingStrategyView)\r\n });\r\n personalizedOfferUtils.setupCommonCashbackObserver(this);\r\n if (pageContext.Permissions.IsCostPerSaleEnabled && this.biddingStrategyView && this.options.campaignType === 'shopping') {\r\n this.ko_model.isAfterSave.subscribe(isAfterSave => {\r\n this.biddingStrategyView.viewModel.isAfterSave(isAfterSave);\r\n if (this.cashbackSettingsView) {\r\n this.cashbackSettingsView.viewModel.isReadOnly(personalizedOfferUtils.shouldPersonalizedOffersReadOnly(isAfterSave, this.biddingStrategyView));\r\n }\r\n if (this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked() && isAfterSave) {\r\n this.setBidStrategyForPersonalizedOffersV2(true);\r\n }\r\n });\r\n }\r\n }\r\n },\r\n setupBudgetValidationForCostPerSale: function () {\r\n if (this.budget && this.biddingStrategyView) {\r\n this.budget.viewModel.isCPSSelected(this.biddingStrategyView.viewModel.selectedBidStrategy() === BiddingStrategyType.costPerSale);\r\n this.budget.viewModel.sharedBudgetIsNotAllowedWarning(i18n.getString('CPS_NotAllowedSharedBudget') || 'Shared budget is not allowed if CPS is selected');\r\n this.biddingStrategyView.viewModel.selectedBidStrategy.subscribe(strategy => {\r\n this.budget.viewModel.isCPSSelected(strategy === BiddingStrategyType.costPerSale);\r\n this.budget.viewModel.sharedBudgetIsNotAllowedWarning(i18n.getString('CPS_NotAllowedSharedBudget') || 'Shared budget is not allowed if CPS is selected');\r\n });\r\n this.biddingStrategyView.viewModel.budgetAmount = this.budget.budgetView.ko_model.Amount();\r\n this.budget.budgetView.ko_model.Amount.subscribe(amount => {\r\n this.biddingStrategyView.viewModel.budgetAmount = amount;\r\n });\r\n }\r\n },\r\n validateMultipleLanguage: function () {\r\n var isValidate = true;\r\n if (this.inCampaignEditing()) {\r\n isValidate = _.isEmpty(this.options.Languages) || !_.isEmpty(this.language.getSelectedLanguages());\r\n } else {\r\n isValidate = !_.isEmpty(this.language.getSelectedLanguages());\r\n }\r\n this.updateLanguageErrorMessage(isValidate);\r\n return isValidate;\r\n },\r\n updateLanguageErrorMessage: function (isValidate) {\r\n if (isValidate) {\r\n this.ko_model.languageError('');\r\n } else {\r\n this.ko_model.languageError(i18n.getString('Campaign_Validation_LanguageSelectionRequired'));\r\n }\r\n },\r\n logActivity: function (message, api) {\r\n api = api || this.options.scenario;\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal(message, api);\r\n }\r\n },\r\n initMultiLangaugeSelector: function () {\r\n var languageOptions = {\r\n languages: _.sortBy(_.without(s$AdGroup.properties.Language.enum, 'None')),\r\n inEditMode: true,\r\n selectedLanguages: [defaultLanguage.get()],\r\n i18n: i18n\r\n };\r\n if (!pageContext.Permissions.IsSimplifiedChineseLanguageEnabledInMultipleLanguage) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'SimplifiedChinese');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase1Enabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Greek', 'Polish', 'Bulgarian', 'Croatian', 'Czech', 'Estonian', 'Hungarian', 'Latvian', 'Lithuanian', 'Maltese', 'Romanian', 'Slovak', 'Slovenian');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase2Enabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Turkish', 'Serbian', 'Bosnian', 'Albanian', 'Macedonian', 'Icelandic');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase6Enabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Hebrew', 'Arabic', 'Russian');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase2JapanEnabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Japanese');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase9Enabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Hindi', 'Malay', 'Thai', 'Indonesian', 'Tagalog');\r\n }\r\n if (!pageContext.Permissions.IsAdsGlobalizationPhase9VIEnabled) {\r\n languageOptions.languages = _.without(languageOptions.languages, 'Vietnamese');\r\n }\r\n if (pageContext.Permissions.IsDomesticSimplifiedChineseEnabled) {\r\n languageOptions.languages = ['SimplifiedChinese'];\r\n }\r\n if (this.inCampaignEditing()) {\r\n languageOptions.selectedLanguages = this.options.Languages || [];\r\n }\r\n languageOptions.activityLogger = this.options.activityLogger;\r\n languageOptions.scenario = this.options.scenario;\r\n this.language = new MultiLanguage(languageOptions);\r\n this.language.on('selectedLanguages:changed', function () {\r\n this.validateMultipleLanguage();\r\n }, this);\r\n },\r\n instantiateLocationTargetsView: function () {\r\n const isWindowsStoreAd = this.options.campaignSubType == 'ShoppingSponsoredProductAd' && this.isWindowsStoreAdsEnabled;\r\n var options = {\r\n scenario: this.options.scenario,\r\n campaignId: Number(this.options.Id),\r\n hideAudience: this.ko_model.isAudienceCampaignCreate(),\r\n popupIds: this.popupIds,\r\n campaign: this.options,\r\n showInitialUiBlocker: this.options.showInitialUiBlocker,\r\n activityLogger: this.options.activityLogger,\r\n deps: {\r\n eventDelegator: this.eventDelegator\r\n },\r\n physicalIntent: isWindowsStoreAd ? physicalIntentOptions.PeopleIn : undefined,\r\n isForVNext: this.options.isForVNext,\r\n supportCashbackSettings: personalizedOfferUtils.shouldSupportCashbackSettings(this.options, pageContext.Permissions),\r\n showPhysicalIntentView: !isWindowsStoreAd\r\n };\r\n if (!this.isMultipleLanguageEnabledIncampaign()) {\r\n options.campaignLanguage = this.language.koModel.language();\r\n } else {\r\n options.languageSelector = this.language;\r\n }\r\n this.locationTargetsView = new LocationTargetsView(options);\r\n },\r\n willShow: function () {\r\n window.scrollTo(0, 0);\r\n var context = this.options.context.get('Campaign');\r\n if (!_.isEmpty(context)) {\r\n this.ko_model.Id(context.Id);\r\n }\r\n var budgetDraft = this.options.context.get('Draft.Budget');\r\n this.initBudgetView(_.isEmpty(budgetDraft) ? this.options.Budget : budgetDraft);\r\n if (this.budget) {\r\n this.$('.budget').empty().append(this.budget.render().$el);\r\n this.setupBudgetValidationForCostPerSale();\r\n }\r\n if (!_.isEmpty(budgetDraft)) {\r\n this.budget && this.budget.update(budgetDraft);\r\n }\r\n this.initDisclaimerUI();\r\n this.ko_model.hasChanges(false);\r\n var hasDSASettings = context && context.DomainName;\r\n if (hasDSASettings && this.dsaSettingsView) {\r\n this.ko_model.enableMixedModeDSASettings(false);\r\n this.ko_model.isMixedModeDSASettingsChecked(true);\r\n this.dsaSettingsView.setValues({\r\n disabled: true,\r\n DomainLanguage: _.result(context, 'Language'),\r\n DomainName: _.result(context, 'DomainName'),\r\n Source: _.result(context, 'Source'),\r\n campaignId: context.Id,\r\n targetingSourceCampaignId: context.Id,\r\n dynamicDescriptionEnabled: _.result(context, 'DynamicDescriptionEnabled', false)\r\n });\r\n }\r\n },\r\n isNotAudienceCampaign: function () {\r\n return _.contains(['campaign-settings', 'shopping-creation-workflow'], this.options.scenario) && campaignType.default() !== 'audience';\r\n },\r\n greyOutBudgetIfExperiment: function () {\r\n if (this.options.scenario !== 'campaign-settings') {\r\n return;\r\n }\r\n if (_.result(pageContext.CurrentCampaign, 'ExperimentId')) {\r\n this.$('.budget input').attr('disabled', true);\r\n this.experimentBudgetAlert = new ExperimentBudgetAlert({\r\n experimentId: pageContext.CurrentCampaign.ExperimentId\r\n });\r\n this.$('.budget-alert').html(this.experimentBudgetAlert.el);\r\n } else if (pageContext.Permissions.IsExperimentsEnabled && campaignType.default() === 'search') {\r\n jsdata.Experiment.findAll({\r\n query: {\r\n $select: 'Id',\r\n $filter: '(Status eq Enum.ExperimentStatus\\'Active\\' or Status eq Enum.ExperimentStatus\\'Scheduled\\')',\r\n $top: 1,\r\n $count: true\r\n }\r\n }, {\r\n entitySet: edm.currentCampaign.Experiments\r\n }).then((function (response) {\r\n if (response.totalCount) {\r\n this.experimentBudgetAlert = new ExperimentBudgetAlert({\r\n campaignId: pageContext.CurrentCampaign.Id\r\n });\r\n this.$('.budget-alert').html(this.experimentBudgetAlert.el);\r\n }\r\n }).bind(this));\r\n }\r\n },\r\n initDSASettingsView: function () {\r\n if (this.ko_model.isMixedDSACampaignCreate() || this.ko_model.isMixedDSACampaignRecommendation) {\r\n var dsaSettings = _.find(this.options.CampaignSettings, setting => setting['@odata.type'] === '#Model.DynamicSearchAdsSetting') || _.first(this.options.CampaignSettings);\r\n var hasDSASettings = dsaSettings ? !!dsaSettings.DomainName : false;\r\n var defaultDSADomainName = localStorage.get('DSACampaignDefaultWebsite') || '';\r\n this.dsaSettingsView = new DSASettingsView({\r\n DomainLanguage: _.result(dsaSettings, 'Language', 'English'),\r\n DomainName: _.result(dsaSettings, 'DomainName', defaultDSADomainName),\r\n Source: _.result(dsaSettings, 'Source', 'SystemIndex'),\r\n campaignId: this.ko_model.Id(),\r\n logActivity: this.logActivity.bind(this),\r\n popupIds: this.popupIds,\r\n disabled: !this.ko_model.isMixedDSACampaignRecommendation && hasDSASettings,\r\n isCampaignSettingsScenario: this.options.scenario === 'campaign-settings',\r\n dynamicDescriptionEnabled: hasDSASettings ? _.result(dsaSettings, 'DynamicDescriptionEnabled', false) : true,\r\n isMixedDSACampaignRecommendation: this.ko_model.isMixedDSACampaignRecommendation\r\n });\r\n this.ko_model.enableMixedModeDSASettings(!hasDSASettings);\r\n this.ko_model.isMixedModeDSASettingsChecked(hasDSASettings);\r\n this.ko_model.isMixedModeDSASettingsChecked.subscribe((function (checked) {\r\n this.logActivity(`DSA settings changed: ${checked ? 'enabled' : 'disabled'}`);\r\n }).bind(this));\r\n }\r\n },\r\n initRSASettingsView: function () {\r\n if (this.hasRsaAutoAssets()) {\r\n this.rsaSettings = _.find(this.options.CampaignSettings, setting => setting['@odata.type'] === '#Model.ResponsiveSearchAdsSetting');\r\n var isRsaAutoAssetsSettingChecked = this.rsaSettings ? !!this.rsaSettings.AutoGeneratedAssetsEnabled : false;\r\n this.ko_model.isRsaAutoAssetsSettingChecked(isRsaAutoAssetsSettingChecked);\r\n }\r\n },\r\n initBroadOnlyView: function () {\r\n if (this.hasBroadOnlySetting()) {\r\n const isBroadMatchOnlyCampaign = _.result(this.options, 'IsBroadMatchOnlyCampaign', false);\r\n this.isBroadMatchOnlyCampaign = isBroadMatchOnlyCampaign;\r\n this.ko_model.isBroadOnlySettingChecked(isBroadMatchOnlyCampaign);\r\n if (this.biddingStrategyView) {\r\n this.biddingStrategyView.viewModel.isBroadMatchOnlyCampaign(isBroadMatchOnlyCampaign);\r\n }\r\n }\r\n },\r\n render: function () {\r\n this.$el.html(tmpl({\r\n i18n: i18n,\r\n isSignUpPage: this.isSignUpPage,\r\n showLanguage: this.options.showLanguage,\r\n isOppotunityCampaignLevel: this.options.isOppotunityCampaignLevel,\r\n IsCampaignMultipleLanguageEnabled: this.isMultipleLanguageEnabledIncampaign(),\r\n isExperiment: this.isExperiment(),\r\n popupIds: this.popupIds,\r\n IsDomesticSimplifiedChineseEnabled: this.options.IsDomesticSimplifiedChineseEnabled\r\n }));\r\n ko.applyBindings(this.ko_model, this.el);\r\n if (this.budget) {\r\n this.$('.budget').empty().append(this.budget.render().$el);\r\n this.setupBudgetValidationForCostPerSale();\r\n }\r\n if (this.dsaSettingsView) {\r\n if (this.ko_model.isMixedDSACampaignCreate()) {\r\n this.$('.dsa-settings-container').empty().append(this.dsaSettingsView.render().$el);\r\n } else {\r\n this.$('.dsa-container').empty().append(this.dsaSettingsView.render().$el);\r\n }\r\n }\r\n if (this.cashbackSettingsView) {\r\n this.$('.cashback-settings-container').empty().append(this.cashbackSettingsView.render().$el);\r\n }\r\n if (this.ImpressionTrackingView) {\r\n this.$('.audienceSettings__container').empty().append(this.ImpressionTrackingView.render().$el);\r\n }\r\n this.greyOutBudgetIfExperiment();\r\n this.$('.language-setting').empty().html(this.language.render().el);\r\n if (this.biddingStrategyView && !this.options.hideBidStrategy) {\r\n this.$('.bidding-strategy__container').empty().html(this.biddingStrategyView.render().el);\r\n }\r\n if (this.options.scenario !== 'smart-shopping-campaign-creation-workflow') {\r\n this.locationTargetsPromise = jsdata.Intermediate.refresh('CampaignCriterion', []).then((function () {\r\n this.instantiateLocationTargetsView();\r\n if (!this.isNotAudienceCampaign()) {\r\n this.$('.location-targets').empty().append(this.locationTargetsView.render().$el);\r\n }\r\n }).bind(this));\r\n }\r\n if (this.copySettings) {\r\n this.$('.copy-campaign-settings').empty().append(this.copySettings.render().$el);\r\n }\r\n this.$('.campaign-settings__container')[0].addEventListener('change', (function () {\r\n this.ko_model.hasChanges(true);\r\n }).bind(this), false);\r\n jsdata.Intermediate.subscribe('CampaignCriterion', (function () {\r\n this.ko_model.hasChanges(true);\r\n }).bind(this));\r\n this.initDisclaimerUI();\r\n this.initAutoAssetsUI();\r\n this.initBroadOnlyUI();\r\n this.initVanityUrlSettings();\r\n this.trigger('didMount');\r\n return this;\r\n },\r\n hasChanges: function () {\r\n return this.ko_model.hasChanges();\r\n },\r\n copyFromCampaign: function (source) {\r\n if (!_.isArray(source)) {\r\n return;\r\n }\r\n const isWindowsStoreAd = this.options.campaignSubType == 'ShoppingSponsoredProductAd' && this.isWindowsStoreAdsEnabled;\r\n if (!_.isEmpty(source[0])) {\r\n var campaign = source[0];\r\n if ((campaign.Budget.Type === 'DailyStandard' || campaign.Budget.Type === 'DailyAccelerated' || campaign.Budget.Id > 0) && !(campaign.Budget.Id > 0 && isWindowsStoreAd)) {\r\n this.budget && this.budget.update(campaign.Budget);\r\n }\r\n this.BiddingScheme = campaign.BiddingScheme;\r\n this.trigger('copy.campaign', campaign);\r\n if (this.ko_model.isMixedDSACampaignCreate()) {\r\n var dsaSettings = _.find(campaign.CampaignSettings, setting => setting['@odata.type'] === '#Model.DynamicSearchAdsSetting');\r\n var domainName = _.result(dsaSettings, 'DomainName', null);\r\n var domainLanguage = _.result(dsaSettings, 'Language', null);\r\n var dsaSource = _.result(dsaSettings, 'Source', null);\r\n var dynamicDescriptionEnabled = _.result(dsaSettings, 'DynamicDescriptionEnabled', false);\r\n if (this.dsaSettingsView && (this.ko_model.isMixedDSACampaignCreate() && this.ko_model.enableMixedModeDSASettings())) {\r\n if (domainName) {\r\n this.ko_model.isMixedModeDSASettingsChecked(true);\r\n this.dsaSettingsView.setValues({\r\n DomainName: domainName,\r\n DomainLanguage: domainLanguage,\r\n Source: dsaSource,\r\n dynamicDescriptionEnabled,\r\n targetingSourceCampaignId: campaign.Id\r\n });\r\n } else {\r\n this.ko_model.isMixedModeDSASettingsChecked(false);\r\n }\r\n }\r\n }\r\n if (this.hasRsaAutoAssets()) {\r\n var rsaSettings = _.find(campaign.CampaignSettings, setting => setting['@odata.type'] === '#Model.ResponsiveSearchAdsSetting');\r\n var isRsaAutoAssetsSettingChecked = _.result(rsaSettings, 'AutoGeneratedAssetsEnabled', false);\r\n this.ko_model.isRsaAutoAssetsSettingChecked(isRsaAutoAssetsSettingChecked);\r\n }\r\n if (this.hasBroadOnlySetting()) {\r\n var isBroadMatchOnlyCampaign = _.result(campaign, 'IsBroadMatchOnlyCampaign', false);\r\n this.ko_model.isBroadOnlySettingChecked(isBroadMatchOnlyCampaign);\r\n }\r\n if (this.isMultipleLanguageEnabledIncampaign() && !_.isEmpty(campaign.Languages)) {\r\n this.language.koModel.selectedLanguages(campaign.Languages);\r\n }\r\n if (this.hasDisclaimer()) {\r\n this.disclaimerProps.DisclaimerAdsEnabled = _.result(_.find(campaign.CampaignSettings, function (setting) {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n }), 'DisclaimerAdsEnabled', false);\r\n }\r\n if (this.cashbackSettingsView) {\r\n var CashbackPercent = _.chain(campaign).result('CampaignCashback').result('Percent').value();\r\n var CashbackScope = _.chain(campaign).result('CampaignCashback').result('Scope').value();\r\n var CashbackMonthlyBudget = _.chain(campaign).result('CampaignCashback').result('MonthlyBudget').value();\r\n var PersonalizedOffersEnabled = _.chain(campaign).result('CampaignCashback').result('PersonalizedOffersEnabled').value();\r\n var CouponsEnabled = _.chain(campaign).result('CampaignCashback').result('CouponsEnabled').value();\r\n this.cashbackSettingsView.setValues({\r\n PersonalizedOffersEnabled: PersonalizedOffersEnabled,\r\n CashbackPercent: CashbackPercent,\r\n CashbackScope: CashbackScope,\r\n CashbackMonthlyBudget: CashbackMonthlyBudget,\r\n CouponsEnabled: CouponsEnabled\r\n });\r\n }\r\n var isPromotionsForBrands = _.chain(campaign).result('CampaignCashback').result('IsPromotionsForBrands').value();\r\n this.ko_model.isSponsoredCampaignCashbackOptedIn(isPromotionsForBrands === true);\r\n }\r\n if (!_.isEmpty(source[1]) && _.isArray(source[1]) && !isWindowsStoreAd) {\r\n var criterions = source[1];\r\n criterions = _.map(criterions, function (criterion) {\r\n return _.omit(criterion, 'Id', 'Campaign');\r\n });\r\n this.locationTargetsView.setLocationData(criterions, 'campaign', true, true);\r\n }\r\n if (this.hasDisclaimer() && !_.isEmpty(source[2]) && _.isArray(source[2]) && source[2].length > 0) {\r\n this.disclaimerProps.selectedDisclaimer = source[2][0];\r\n }\r\n if (this.hasDisclaimer()) {\r\n this.renderDisclaimerUI();\r\n }\r\n },\r\n isCreationScenario: function () {\r\n return this.options.scenario === 'creation-workflow' || this.options.scenario === 'shopping-creation-workflow';\r\n },\r\n validateViewModel: function () {\r\n var isValid = this.ko_model.validate();\r\n if (!isValid) {\r\n _.each(this.ko_model.campaignProps, function (field) {\r\n if (!this.ko_model[field].isValid()) {\r\n this.logActivity('campaign field invalid: ' + field);\r\n }\r\n }, this);\r\n }\r\n return isValid;\r\n },\r\n isDSASettingsAvailable: function () {\r\n return this.dsaSettingsView && (this.ko_model.isMixedDSACampaignRecommendation || this.ko_model.isMixedDSACampaignCreate() && this.ko_model.isMixedModeDSASettingsChecked());\r\n },\r\n validate: function () {\r\n return _.reduce([this.validateViewModel(), this.isDSASettingsAvailable() ? this.dsaSettingsView.validate() : true, this.budget && !this.options.isOppotunityCampaignLevel ? this.budget.validate() : true, this.locationTargetsView && !this.options.isOppotunityCampaignLevel ? this.locationTargetsView.validate() : true, this.biddingStrategyView ? this.biddingStrategyView.validate() : true, this.isMultipleLanguageEnabledIncampaign() ? this.validateMultipleLanguage() : true, this.disclaimer ? this.disclaimer.current.validate() : true, this.cashbackSettingsView ? this.cashbackSettingsView.validate() : true, this.validateVerifiedImpressionTracking()], function (prev, next) {\r\n return prev && next;\r\n }, true);\r\n },\r\n shouldCancel: function () {\r\n return this.save();\r\n },\r\n shouldNext: function () {\r\n return this.save();\r\n },\r\n getPropertyValidationErrors: function () {\r\n var model = this.ko_model;\r\n var campaignProps = model.campaignProps;\r\n var propErrors = {};\r\n campaignProps.forEach(function (prop) {\r\n var errorsOfPropery = model[prop] && model[prop].errors ? model[prop].errors() : [];\r\n propErrors[prop] = errorsOfPropery;\r\n });\r\n if (this.budget && !this.budget.validate()) {\r\n propErrors = _.defaults({}, propErrors, {\r\n budget: ['Budget invalid']\r\n });\r\n }\r\n if (this.biddingStrategyView && !this.biddingStrategyView.validate()) {\r\n propErrors = _.defaults({}, propErrors, this.biddingStrategyView.getErrorMessages());\r\n }\r\n return propErrors;\r\n },\r\n getAllLocations: function () {\r\n if (!this.locationTargetsView) return null;\r\n var modelInfo = this.ko_model.toObject();\r\n var allLocationTargets = this.locationTargetsView.getValues({}, {\r\n keepAllLocations: true,\r\n populateParentField: true,\r\n removeNegativeId: true,\r\n campaignId: this.ko_model.Id() || modelInfo.Id,\r\n campaignName: modelInfo.Name\r\n });\r\n return allLocationTargets.locations.concat(allLocationTargets.intent || []);\r\n },\r\n getData: function () {\r\n if (this.ImpressionTrackingView) {\r\n this.ImpressionTrackingView.IASInputChange();\r\n }\r\n if (!this.validate()) {\r\n return false;\r\n }\r\n this.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n var params = this.ko_model.toObject();\r\n var dsaSettings = this.isDSASettingsAvailable() ? this.dsaSettingsView.getValues() : {};\r\n params = _.extend(params, dsaSettings);\r\n if (this.hasRsaAutoAssets()) {\r\n const originAutoGeneratedAsset = _.result(this.rsaSettings, 'AutoGeneratedAssetsEnabled', false);\r\n const isAutoGeneratedAssetsChanged = this.options.scenario === 'creation-workflow' || this.ko_model.isRsaAutoAssetsSettingChecked() !== originAutoGeneratedAsset && this.options.scenario === 'campaign-settings';\r\n var rsaAutoGeneratedAssetsSettings = isAutoGeneratedAssetsChanged ? {\r\n AutoGeneratedAssetsEnabled: this.ko_model.isRsaAutoAssetsSettingChecked()\r\n } : {};\r\n params = _.extend({}, params, rsaAutoGeneratedAssetsSettings);\r\n }\r\n if (this.hasBroadOnlySetting()) {\r\n const isBroadMatchOnlyCampaign = this.ko_model.isBroadOnlySettingChecked();\r\n const originBroadOnly = this.isBroadMatchOnlyCampaign;\r\n const isBroadMatchOnlyCampaignChanged = this.options.scenario === 'creation-workflow' || isBroadMatchOnlyCampaign !== originBroadOnly && this.options.scenario === 'campaign-settings';\r\n const broadOnlySetting = isBroadMatchOnlyCampaignChanged ? {\r\n IsBroadMatchOnlyCampaign: isBroadMatchOnlyCampaign\r\n } : {};\r\n if (isBroadMatchOnlyCampaign) {\r\n const associations = [], campaignId = pageContext.CurrentCampaign && pageContext.CurrentCampaign.Id, campaignName = params.Name;\r\n const savedBrandListIds = this.ko_model.savedBrandListIds();\r\n this.ko_model.addedBrandListIds().forEach(id => {\r\n if (!savedBrandListIds.filter(v => v.Status === 'Active').map(v => v.id).includes(id)) {\r\n associations.push({\r\n SharedEntityId: id,\r\n EntityId: campaignId,\r\n CampaignName: campaignName,\r\n Status: 'Active'\r\n });\r\n }\r\n });\r\n this.ko_model.deletedBrandListIds().forEach(id => {\r\n if (!savedBrandListIds.filter(v => v.Status === 'Deleted').map(v => v.id).includes(id)) {\r\n associations.push({\r\n SharedEntityId: id,\r\n EntityId: campaignId,\r\n CampaignName: campaignName,\r\n Status: 'Deleted'\r\n });\r\n }\r\n });\r\n broadOnlySetting.BrandListsAssociations = associations;\r\n }\r\n params = _.extend({}, params, broadOnlySetting);\r\n }\r\n if (this.budget) {\r\n params.Budget = this.budget.getValues(params);\r\n }\r\n if (this.ko_model.Id()) {\r\n params.Id = this.ko_model.Id();\r\n }\r\n if (this.options.scenario === 'campaign-settings' || this.options.scenario === 'smart-shopping-campaign-creation-workflow') {\r\n params = _.omit(params, 'TimeZone', 'Language');\r\n if (this.biddingStrategyView) {\r\n const biddingSchema = this.biddingStrategyView.getValues();\r\n params.BiddingScheme = biddingSchema;\r\n const autoTargetingDefault = this.autoTargetingSettings.PredictiveTargetingEnabled || false;\r\n if (pageContext.Permissions.dynamic.RSABidStrategyAutoTargeting && !pageContext.Permissions.dynamic.PredictiveMatching && campaignType.default() === 'search' && !!biddingSchema.AutoTargetingEnabled !== autoTargetingDefault) {\r\n params.AutoTargetingEnabled = biddingSchema.AutoTargetingEnabled || false;\r\n }\r\n }\r\n } else if (this.options.scenario === 'creation-workflow') {\r\n params.AdScheduleUseSearcherTimeZone = false;\r\n }\r\n if (this.isMultipleLanguageEnabledIncampaign()) {\r\n params.Languages = this.language.getSelectedLanguages();\r\n }\r\n if (this.targetingSource) {\r\n params.Source = this.ko_model.TargetingSourceSetting().Source;\r\n }\r\n if (this.locationTargetsView) {\r\n var targets = this.locationTargetsView.getValues({}, {\r\n populateParentField: true,\r\n removeNegativeId: true,\r\n campaignId: params.Id,\r\n campaignName: params.Name\r\n });\r\n params.CampaignCriterions = campaignType.default() !== 'audience' ? targets.deletedLocations.concat(targets.locations).concat(targets.intent) : targets.deletedLocations.concat(targets.locations);\r\n params.CampaignCriterions = _.map(params.CampaignCriterions, function (criterion) {\r\n return _.pick(criterion, _.keys(s$CampaignCriterion.properties));\r\n });\r\n }\r\n if (this.disclaimer) {\r\n var disclaimerSettings = this.disclaimer.current.getValues(params.Name);\r\n const disclaimerDefaultSettings = _.find(this.options.CampaignSettings, function (setting) {\r\n return setting['@odata.type'] === '#Model.DisclaimerSetting';\r\n });\r\n const createScenario = this.options.scenario === 'creation-workflow';\r\n if (createScenario) {\r\n _.defaults(params, disclaimerSettings);\r\n if (this.disclaimerProps.selectedDisclaimer) {\r\n params.DisclaimerAdsEnabled = !!this.disclaimerProps.DisclaimerAdsEnabled;\r\n }\r\n } else {\r\n const originalDisclaimerSetting = _.result(disclaimerDefaultSettings, 'DisclaimerAdsEnabled', false);\r\n const selectedDisclaimerId = _.result(this.disclaimer.current.state.selectedDisclaimer, 'Id', null);\r\n const originalDisclaimerId = _.result(this.disclaimerProps.selectedDisclaimer, 'Id', null);\r\n const isSelectedDisclaimerChanged = disclaimerSettings.DisclaimerAdsEnabled && selectedDisclaimerId && originalDisclaimerId !== selectedDisclaimerId;\r\n if (originalDisclaimerSetting !== disclaimerSettings.DisclaimerAdsEnabled || isSelectedDisclaimerChanged) {\r\n _.defaults(params, disclaimerSettings);\r\n params.DisclaimerAdsEnabled = !!this.disclaimerProps.DisclaimerAdsEnabled;\r\n }\r\n }\r\n if (disclaimerSettings.AdExtensionAssociations && disclaimerSettings.AdExtensionAssociations.length > 0) {\r\n this.ko_model.hasChanges(true);\r\n }\r\n }\r\n if (this.cashbackSettingsView) {\r\n params = _.extend(params, this.cashbackSettingsView.getValues());\r\n if ((pageContext.Permissions.IsPersonalizedOffersV2Enabled || pageContext.Permissions.IsPersonalizedOffersV3Enabled) && !this.biddingStrategyView && this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked()) {\r\n params.BiddingScheme = {\r\n Type: personalizedOfferUtils.getBidStrategyByCampaignTypeWhenPersonalizedOffersEnabled({\r\n campaignType: this.options.campaignType,\r\n i18n: i18n\r\n }).targetBidStrategy\r\n };\r\n }\r\n }\r\n if (this.ImpressionTrackingView) {\r\n params = _.extend(params, {\r\n VerifiedTrackingData: this.IASTrackingInfo\r\n });\r\n }\r\n if (this.showVanityUrlSettings()) {\r\n params = _.extend(params, this.ko_model.vanityUrlSettings());\r\n }\r\n return params;\r\n },\r\n getLocationRecommendationsStatus: function () {\r\n if (this.locationTargetsView) {\r\n return this.locationTargetsView.getLocationRecommendationsStatus();\r\n }\r\n return {};\r\n },\r\n handleCampaignResponse: function (data, hasLocationErrors, params) {\r\n this.ko_model.Id(data.Id);\r\n this.setContext(data.Id, params);\r\n var targetToCountMapping = {};\r\n _.each(data.CampaignCriterions, function (criterion) {\r\n if (criterion.CriterionType !== 'LocationIntentCriterion' && criterion.Id > 0) {\r\n var targetKey = (criterion.Status === 'Active' ? 'create' : 'delete') + criterion.SelectionStatus + criterion.CriterionType + 'Targets';\r\n var count = targetToCountMapping[targetKey];\r\n targetToCountMapping[targetKey] = (_.isUndefined(count) ? 0 : count) + 1;\r\n }\r\n });\r\n for (var target in targetToCountMapping) {\r\n var count = targetToCountMapping[target];\r\n if (count > 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, target, count);\r\n }\r\n }\r\n if (this.copySettings) {\r\n this.copySettings.hide();\r\n }\r\n if (this.locationTargetsView) {\r\n if (!hasLocationErrors) {\r\n this.locationTargetsView.clearAllErrors();\r\n }\r\n this.locationTargetsView.setCampaignId(data.Id);\r\n var updateLocation = this.locationTargetsView.refreshLocationData().then((function () {\r\n this.locationTargetsView.clearDeletedLocationsList();\r\n return true;\r\n }).bind(this));\r\n }\r\n var updateTargetingSource = this.saveTargetingSource(data.Id);\r\n return Promise.all([updateLocation, updateTargetingSource]).then((function () {\r\n if (this.saveCampaignMarker) {\r\n this.saveCampaignMarker.done();\r\n }\r\n return _.constant(true);\r\n }).bind(this));\r\n },\r\n errorElements: function () {\r\n return this.$('.campaign-settings__container .error, .campaign-settings__container .alert-danger').filter(':visible');\r\n },\r\n validationErrorNode: function () {\r\n return document.querySelector('.validation-error');\r\n },\r\n saveTargetingSource: function (id) {\r\n var retPromise = id && this.dsaSettingsView && this.dsaSettingsView.targetingSource ? this.dsaSettingsView.targetingSource.save(id) : Promise.resolve();\r\n return retPromise.then((function (result) {\r\n if (_.result(pageContext.CurrentCampaign, 'Id') === id) {\r\n var dsaSettings = _.find(pageContext.CurrentCampaign.CampaignSettings, setting => setting['@odata.type'] === '#Model.DynamicSearchAdsSetting');\r\n if (dsaSettings && this.targetingSource) {\r\n dsaSettings.Source = this.targetingSource.koModel.source();\r\n }\r\n }\r\n return result;\r\n }).bind(this));\r\n },\r\n validateVerifiedImpressionTracking: function () {\r\n if (this.isEnabledForVerifiedImpressionTracking) {\r\n if (this.IASTrackingInfo === 'error') {\r\n this.ImpressionTrackingView && this.ImpressionTrackingView.setErrors([i18n.getString('IASImpressionTracking_Invalid')], 'VerifiedImpressionTracking_IAS');\r\n return false;\r\n }\r\n return true;\r\n }\r\n return true;\r\n },\r\n setSavedBrandLists: function (brandListError = {}) {\r\n const savedBrandLists = [];\r\n const shouldFilterErrorCodes = ['CampaignServiceSharedEntityAssociationDoesNotExist', 'CampaignServiceSharedListIdInvalid', 'CampaignServiceFutureFeatureCode'];\r\n this.ko_model.addedBrandListIds().forEach(id => {\r\n if (!brandListError[id] || shouldFilterErrorCodes.includes(brandListError[id])) {\r\n savedBrandLists.push({\r\n id,\r\n Status: 'Active'\r\n });\r\n }\r\n });\r\n this.ko_model.deletedBrandListIds().forEach(id => {\r\n if (!brandListError[id] || shouldFilterErrorCodes.includes(brandListError[id])) {\r\n savedBrandLists.push({\r\n id,\r\n Status: 'Deleted'\r\n });\r\n }\r\n });\r\n this.ko_model.savedBrandListIds(savedBrandLists);\r\n },\r\n save: function () {\r\n var params = this.getData();\r\n if (!params) {\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n const node = this.validationErrorNode();\r\n if (node) {\r\n node.focus();\r\n }\r\n return false;\r\n }\r\n if (this.options && this.options.perfMarker) {\r\n this.saveCampaignMarker = this.options.perfMarker.createChild('Save_Campaign');\r\n this.saveCampaignMarker.willInit();\r\n }\r\n return jsdata.Campaign.create(params, {\r\n adapter: 'bulk',\r\n cacheResponse: false\r\n }).then((function (data) {\r\n if (_.isFinite(data.Id)) {\r\n var isCreate = this.isCreationScenario() && !this.ko_model.isAfterSave();\r\n var message = isCreate ? 'createCampaign' : 'updateCampaign';\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, isCreate ? 'createCampaign' : 'updateCampaign', '1');\r\n this.logActivity(message);\r\n personalizedOfferUtils.logCampaignPersonalizedOffers(this.shouldShowCashbackSettings, this.logActivity.bind(this), data, `${message}.`);\r\n summaryDataContextManager.getContext('/campaign/NewCampaign/Create?');\r\n this.eventDelegator && this.eventDelegator.trigger('campaignReload');\r\n this.setSavedBrandLists();\r\n return this.handleCampaignResponse(data, false, params);\r\n } else {\r\n this.handleApiErrors();\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n return false;\r\n }\r\n }).bind(this)).catch((function (response) {\r\n if (response && response.entity) {\r\n var errorsByEntity = {};\r\n var hasErrors = response && !_.isUndefined(response.errors);\r\n var hasLocationErrors = false;\r\n var hasEntityCreated = response && response.entity && !_.isUndefined(response.entity.Id);\r\n if (hasErrors) {\r\n errorsByEntity = this.separateErrors(response.errors);\r\n hasLocationErrors = errorsByEntity.location.length > 0;\r\n }\r\n if (hasEntityCreated) {\r\n this.handleCampaignResponse(response.entity, hasLocationErrors);\r\n }\r\n if (hasErrors) {\r\n if (errorsByEntity.campaign.length) {\r\n this.getAndHandleApiErrors(errorsByEntity.campaign);\r\n } else {\r\n this.locationTargetsView.handleApiErrors(errorsByEntity.location);\r\n }\r\n if (errorsByEntity.brandlist.length) {\r\n this.getAndHandleApiErrors(errorsByEntity.brandlist);\r\n const errMap = errorsByEntity.brandlist.reduce((acc, err) => {\r\n acc[err.Id] = acc[err.Error];\r\n return acc;\r\n }, {});\r\n this.setSavedBrandLists(errMap);\r\n }\r\n } else {\r\n this.handleApiErrors();\r\n }\r\n } else {\r\n this.ko_model.errors.add(response ? i18nErrors.getODataErrors(response.errors) : undefined);\r\n }\r\n this.scrollToErrors();\r\n return false;\r\n }).bind(this)).finally(withUiBlock());\r\n },\r\n setContext: function (campaignId, params) {\r\n var contextCampaign = this.ko_model.getValues();\r\n var dsaSettings = this.isDSASettingsAvailable() ? this.dsaSettingsView.getValues(true) : {};\r\n _.extend(contextCampaign, {\r\n Id: campaignId\r\n }, dsaSettings);\r\n if (_.isUndefined(contextCampaign.Language)) {\r\n if (!this.isMultipleLanguageEnabledIncampaign()) {\r\n _.extend(contextCampaign, {\r\n Language: this.language.koModel.language()\r\n });\r\n }\r\n }\r\n if (this.isMultipleLanguageEnabledIncampaign()) {\r\n _.extend(contextCampaign, {\r\n Languages: this.language.getSelectedLanguages()\r\n });\r\n }\r\n if (this.budget) {\r\n contextCampaign.Budget = this.budget.getValues(contextCampaign);\r\n }\r\n if (this.BiddingScheme) {\r\n contextCampaign.BiddingScheme = this.BiddingScheme;\r\n }\r\n if (_.isObject(this.options.context)) {\r\n var context = {\r\n Campaign: contextCampaign,\r\n CampaignParams: params\r\n };\r\n if (this.budget) {\r\n context['Draft.Budget'] = _.extend({}, contextCampaign.Budget);\r\n }\r\n if (this.disclaimer) {\r\n context['Draft.Disclaimer'] = _.pick(this.disclaimer.current.getValues(contextCampaign.Name), 'DisclaimerAdsEnabled');\r\n } else {\r\n delete context['Draft.Disclaimer'];\r\n }\r\n this.options.context.set(context);\r\n }\r\n if (this.cashbackSettingsView) {\r\n var cashbackSettings = this.cashbackSettingsView.getValues();\r\n contextCampaign['CampaignCashback'] = {\r\n Percent: cashbackSettings.CashbackPercent === -1 ? null : cashbackSettings.CashbackPercent,\r\n MonthlyBudget: cashbackSettings.CashbackMonthlyBudget,\r\n Scope: cashbackSettings.CashbackScope,\r\n PersonalizedOffersEnabled: cashbackSettings.PersonalizedOffersEnabled,\r\n CouponsEnabled: cashbackSettings.CouponsEnabled\r\n };\r\n }\r\n },\r\n separateErrors: function (errors) {\r\n const errMap = {\r\n campaign: [],\r\n location: [],\r\n brandlist: []\r\n };\r\n errors.forEach(err => {\r\n if (err.Type === 'Campaign Error') {\r\n errMap.campaign.push(err);\r\n return;\r\n }\r\n if (err.Type === 'Campaign Brand List Association Error') {\r\n errMap.brandlist.push(err);\r\n return;\r\n }\r\n errMap.location.push(err);\r\n });\r\n return errMap;\r\n },\r\n handleApiErrors: function (errors) {\r\n if (this.dsaSettingsView) {\r\n const domainNameError = _.filter(errors, function (err) {\r\n return err.property === 'DomainName';\r\n });\r\n errors = _.filter(errors, function (err) {\r\n return err.property !== 'DomainName';\r\n });\r\n this.dsaSettingsView.handleApiErrors(domainNameError);\r\n }\r\n this.ko_model.errors.add(errors);\r\n if (this.ko_model.isAfterSave()) {\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.setCampaignId(this.ko_model.Id());\r\n this.locationTargetsView.handleApiErrorsForCampaignLevel().then((function () {\r\n this.locationTargetsView.clearDeletedLocationsList();\r\n }).bind(this));\r\n }\r\n }\r\n },\r\n getBulkApiErrors: function (errors) {\r\n return i18nErrors.getBulkApiErrors(errors);\r\n },\r\n getAndHandleApiErrors: function (errors) {\r\n this.handleApiErrors(this.getBulkApiErrors(errors));\r\n _.chain(errors).map(function (error) {\r\n return error.Error;\r\n }).uniq().each(function (error) {\r\n this.logActivity(error, 'campaign creation api errors');\r\n }, this);\r\n },\r\n scrollToErrors: function () {\r\n scrollUtil.scrollAndCenter(this.errorElements());\r\n },\r\n clearApiErrors: function () {\r\n this.ko_model.errors.clear(i18nErrors.isCampaignApiError);\r\n },\r\n remove: function () {\r\n if (this.locationTargetsView) {\r\n this.locationTargetsView.remove();\r\n }\r\n if (this.targetingSource) {\r\n this.targetingSource.remove();\r\n }\r\n if (this.experimentBudgetAlert) {\r\n this.experimentBudgetAlert.remove();\r\n }\r\n if (this.disclaimer) {\r\n ReactDOM.unmountComponentAtNode(this.$('.disclaimer__container').get(0));\r\n this.disclaimer = null;\r\n }\r\n if (this.showVanityUrlSettings()) {\r\n ReactDOM.unmountComponentAtNode(this.$('.vanity-url-option').get(0));\r\n }\r\n Backbone.View.prototype.remove.apply(this, arguments);\r\n },\r\n disableLanguage: function () {\r\n if (!this.isMultipleLanguageEnabledIncampaign()) {\r\n this.language.koModel.disabled(true);\r\n }\r\n },\r\n events: {\r\n 'change input.name': 'campaignNameChange'\r\n },\r\n campaignNameChange: function () {\r\n this.logActivity('crud campaign campaign name change.');\r\n },\r\n initBudgetView: function (model) {\r\n var budgetFactory = SharedBudgetView.newFactory(Budget);\r\n var BCCBudgetImprovementEnabled = pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.BCCBudgetImprovementEnabled;\r\n var showBudgetMinRecommend = BCCBudgetImprovementEnabled && (this.options.scenario === 'campaign-settings' || this.options.scenario === 'smart-shopping-campaign-creation-workflow' && this.options.Budget);\r\n var minimumBudget = model && model.Amount ? model.Amount * 0.5 : undefined;\r\n var currencySymbol = this.options.deps && this.options.deps.i18nNewDesign ? this.options.deps.i18nNewDesign.getCurrencySymbol(pageContext.AccountCurrencyCode) : pageContext.AccountCurrencyCode;\r\n this.budget = budgetFactory({\r\n model: model,\r\n accountCurrencyCode: pageContext.AccountCurrencyCode,\r\n showBudgetMinRecommend,\r\n minimumBudget,\r\n currencySymbol,\r\n showInitialUiBlocker: this.options.showInitialUiBlocker,\r\n perfMarker: this.showCampaignSettingMarker,\r\n noApplyBudgetFromSharedLibrary: this.options.scenario === 'smart-shopping-campaign-creation-workflow' || this.options.campaignSubType == 'ShoppingSponsoredProductAd' && this.isWindowsStoreAdsEnabled,\r\n hideDailyBudgetOptions: this.options.campaignSubType == 'ShoppingSponsoredProductAd' && this.isWindowsStoreAdsEnabled && this.isWindowsStoreAdsManualCPAEnabled,\r\n activityLogger: this.options.activityLogger\r\n });\r\n },\r\n updateBidStrategy: function (isCoOpCampaign) {\r\n if (this.biddingStrategyView) {\r\n if (!isCoOpCampaign && this.cashbackSettingsView && this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked()) {\r\n this.setBidStrategyForPersonalizedOffersV2({\r\n enabled: true\r\n });\r\n return;\r\n }\r\n this.biddingStrategyView.updateBidStrategy(isCoOpCampaign);\r\n }\r\n }\r\n});\r\nexport default View;\r\n\r\n","/*eslint new-cap:0 */\r\n/*eslint no-useless-escape:0 */\r\nimport _ from 'underscore';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nconst s$Keyword = window.globalLegacySchema.get('Keyword');\r\n\r\nexport const parseKeyword = (text) => {\r\n let matchType = '';\r\n let keyword = text;\r\n\r\n if (/^\".*\"$/.test(text)) {\r\n keyword = text.replace(/\\\"/g, '');\r\n matchType = 'Phrase';\r\n } else if (/^\\[.*\\]$/.test(text)) {\r\n keyword = text.replace(/(\\[|\\])/g, '');\r\n matchType = 'Exact';\r\n } else {\r\n matchType = 'Broad';\r\n }\r\n\r\n return {\r\n Text: keyword,\r\n MatchType: matchType,\r\n };\r\n};\r\n\r\nexport class ViewModel {\r\n constructor(options = {}) {\r\n this.properties = _.keys(s$Keyword.properties);\r\n\r\n koSchema.properties(this, s$Keyword, this.properties);\r\n\r\n if (_.isEmpty(options.properties)) {\r\n const parsedKeyword = parseKeyword(options.text);\r\n\r\n this.Text(parsedKeyword.Text);\r\n this.MatchType(parsedKeyword.MatchType);\r\n\r\n this.AdGroup({ Id: options.adGroup.Id });\r\n this.AdGroupName(options.adGroup.Name);\r\n\r\n const campaign = options.context ? options.context.get('Campaign') : { };\r\n\r\n this.Campaign({ 'Id': campaign.Id });\r\n this.CampaignName(campaign.Name);\r\n } else {\r\n _.each(options.properties, (value, key) => {\r\n if (_.indexOf(this.properties, key) !== -1) {\r\n this[key](value);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport ko_schema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar maxKeywordLength = 100;\r\nvar viewModel = function (isNegativeKeyword, isBmmBlockEnabled = false) {\r\n var self = this;\r\n self.parserSchema = {\r\n properties: {\r\n keywordsTextareaVal: {\r\n type: 'string'\r\n }\r\n }\r\n };\r\n self.isNegativeKeyword = isNegativeKeyword;\r\n self.isBmmBlockEnabled = isBmmBlockEnabled;\r\n self.isAfterFirstInteraction = ko.observable(false);\r\n self.showBmmWarningAlert = ko.observable(false);\r\n self.showMutableKeywordMatchTypAlert = ko.observable(false);\r\n self.showBmmBlockAlert = ko.observable(false);\r\n self.maxKeywords = 1000;\r\n self.numSeedKeywords = 3;\r\n self.seedKeywordTimeout = 2000;\r\n self.seedKeywords = ko.observable();\r\n self.parsedKeywords = ko.observable([]);\r\n self.uniqueParsedKeywords = ko.observable([]);\r\n self.parseKeywords = function (data, e) {\r\n self.isAfterFirstInteraction(true);\r\n var newKeywords = self.peekKeywords();\r\n self.parsedKeywords(newKeywords);\r\n if (_.size(newKeywords) > 0) {\r\n self.uniqueParsedKeywords(_.unique(newKeywords, false, function (keyword) {\r\n return keyword.toLowerCase();\r\n }));\r\n } else {\r\n self.uniqueParsedKeywords([]);\r\n }\r\n self.validate();\r\n return true;\r\n };\r\n self.peekKeywords = function () {\r\n var newKeywords = self.keywordsTextareaVal();\r\n if (!_.isString(newKeywords) || _.isEmpty(newKeywords) || _.isEmpty(newKeywords.replace(/[,\\s]+/, ''))) {\r\n return [];\r\n }\r\n var splitChar = ',';\r\n newKeywords = newKeywords.replace(/((^[,\\s]+)|([,\\s]+$))/g, '');\r\n if (self.isNegativeKeyword) {\r\n newKeywords = newKeywords.replace(',', '%2C');\r\n } else if (newKeywords.indexOf(',') >= 0) {\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createKeyword/parser', 'User has comma in keywords input. Input: ' + newKeywords);\r\n }\r\n newKeywords = newKeywords.replace(/([,\\s]*[\\n\\r\\,]+[,\\s]*)/g, splitChar);\r\n newKeywords = newKeywords.replace(/[\\t ]+(?=\\]|\\)|\\\")/g, '');\r\n newKeywords = newKeywords.replace(/(\\[|\\(|\\\")[\\t ]+/g, '$1');\r\n newKeywords = newKeywords.replace(/\\s+/g, ' ');\r\n var keywords = newKeywords.split(splitChar);\r\n if (self.isNegativeKeyword) {\r\n keywords = _.map(keywords, function (keyword) {\r\n return keyword.replace('%2C', ',');\r\n });\r\n }\r\n return keywords;\r\n };\r\n self.isBmmExist = function (keywords) {\r\n const target = keywords.find(keyword => {\r\n const wordsArr = keyword.split(' ');\r\n return wordsArr.find(words => (/^\\++[^\\+]/i).test(words));\r\n });\r\n return target !== undefined;\r\n };\r\n self.isKeywordsValid = _.partial(function (parser) {\r\n var keywords = parser.parsedKeywords();\r\n if (parser.isAfterFirstInteraction() && !keywords.length > 0) {\r\n this.message = i18n.get('Keyword_Message_NoKeywords');\r\n return false;\r\n }\r\n if (keywords.length > parser.maxKeywords) {\r\n this.message = i18n.get('Keyword_Message_MaxKeywords').replace('{0}', parser.maxKeywords);\r\n return false;\r\n }\r\n this.message = [];\r\n _.each(keywords, function (keyword) {\r\n var text = keyword;\r\n if ((/^\".*\"$/).test(text)) {\r\n text = text.replace(/\\\"/g, '');\r\n } else if ((/^\\[.*\\]$/).test(text)) {\r\n text = text.replace(/(\\[|\\])/g, '');\r\n } else if ((/^\\(.*\\)$/).test(text)) {\r\n text = text.replace(/\\(|\\)/g, '');\r\n }\r\n if (_.size(text) > maxKeywordLength) {\r\n this.message.push(i18n.getString('Keywords_And_Errors_seperator', _.escape(text.substring(0, 100) + '...'), i18n.getString('Keywords_Validation_KeywordTextLengthExceeded', maxKeywordLength)));\r\n }\r\n }, this);\r\n if (_.isArray(this.message) && _.size(this.message) > 0) {\r\n return false;\r\n }\r\n if (!self.isNegativeKeyword && self.isBmmBlockEnabled && self.isBmmExist(keywords)) {\r\n this.message.push(i18n.getString('Keywords_And_Errors_BroadMatchError'));\r\n return false;\r\n }\r\n return true;\r\n }, self);\r\n ko_schema.properties(self, self.parserSchema, ['keywordsTextareaVal'], {}, {\r\n 'keywordsTextareaVal': {\r\n isValid: self.isKeywordsValid,\r\n message: i18n.get('AdGroup_Message_DuplicateKeywords')\r\n }\r\n });\r\n self.reset = function () {\r\n self.keywordsTextareaVal('');\r\n self.parsedKeywords([]);\r\n self.uniqueParsedKeywords([]);\r\n self.seedKeywords(null);\r\n self.isAfterFirstInteraction(false);\r\n self.isKeywordsValid(true);\r\n self.showBmmWarningAlert(false);\r\n self.showMutableKeywordMatchTypAlert(false);\r\n self.showBmmBlockAlert(false);\r\n };\r\n};\r\nexport default viewModel;\r\n\r\n","/* eslint-disable */\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as help from '@bingads-webui-component-legacy/help/index';\r\nimport tmpl from '@bingads-webui-campaign-legacy/crud-keywords/template/create.pug';\r\nimport * as _KeywordViewModel from '@bingads-webui-campaign-legacy/crud-keywords/viewmodel/keyword';\r\nimport parserViewModel from '@bingads-webui-campaign-legacy/crud-keywords/viewmodel/parser';\r\nimport uuid from '@bingads-webui-component-legacy/uuid/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\nvar s$TextAd = window.globalLegacySchema.get('TextAd');\r\nvar notEnoughText = '20000';\r\nvar tooMuchText = '20001';\r\nvar defaultPopupIds = {\r\n 'EnterKeywords': 'pop_BA_CampaignCreate_Keywords_EnterKeywords'\r\n};\r\nvar defaultScenario = 'create keyword';\r\nvar KeywordViewModel = _KeywordViewModel.ViewModel;\r\nvar parseKeyword = _KeywordViewModel.parseKeyword;\r\nvar View = Backbone.View.extend({\r\n events: {\r\n 'keyup textarea.form-control': 'getSeedKeywords',\r\n 'paste textarea.form-control': 'getSeedKeywords',\r\n 'change textarea.form-control': 'keywordsChanged',\r\n 'click .keyword-textarea': 'selectThisAdGroup',\r\n 'focusout textarea.keyword-textarea.form-control': 'outTextArea'\r\n },\r\n initialize: function (options) {\r\n var self = this;\r\n self.options = _.defaults({}, options, {\r\n scenario: defaultScenario\r\n });\r\n self.isNegativeKeyword = options.isNegativeKeyword;\r\n self.popupIds = _.defaults({}, self.options.popupIds, defaultPopupIds);\r\n self.isBmmBlockEnabled = pageContext.DynamicPermissions && pageContext.DynamicPermissions.KeywordBmmSignupP2 || pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.KeywordBmmPhase2;\r\n self.isBmmWarningEnabled = self.isBmmBlockEnabled ? false : pageContext.DynamicPermissions && pageContext.DynamicPermissions.KeywordBmmAlert || pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.KeywordBmmWarning;\r\n self.isMutableKeywordMatchTypeEnabled = self.isBmmBlockEnabled || self.isBmmWarningEnabled ? false : pageContext.Permissions && pageContext.Permissions.dynamic && pageContext.Permissions.dynamic.BMMBehaviorUpdate;\r\n self.keywords = ko.observable({});\r\n self.parser = new parserViewModel(options.isNegativeKeyword, self.isBmmBlockEnabled);\r\n self.hasChanges = true;\r\n self.parser.keywordsTextareaVal.subscribe(function (value) {\r\n self.hasChanges = true;\r\n });\r\n self.keywordSuggestionsAdded = [];\r\n },\r\n render: function () {\r\n this.$el.html(tmpl({\r\n appendLearnMoreLink: help.appendLearnMoreLink,\r\n i18n: i18n,\r\n uuid: uuid,\r\n popupIds: this.popupIds,\r\n isNegativeKeyword: this.isNegativeKeyword,\r\n isForVNext: this.options.isForVNext\r\n }));\r\n ko.applyBindings(this.parser, this.el);\r\n return this;\r\n },\r\n getKeys: function () {\r\n return _.keys(this.keywords());\r\n },\r\n getKeywords: function () {\r\n return _.values(this.keywords());\r\n },\r\n isEmpty: function () {\r\n return _.size(this.parser.keywordsTextareaVal()) === 0;\r\n },\r\n isBmmExist: function () {\r\n var keywords = this.parser.peekKeywords();\r\n return this.parser.isBmmExist(keywords);\r\n },\r\n isBmmWarning: function () {\r\n return this.isBmmWarningEnabled && this.isBmmExist();\r\n },\r\n isMutableKeywordMatchTypeWarning: function () {\r\n return this.isMutableKeywordMatchTypeEnabled && this.isBmmExist();\r\n },\r\n isBmmBlock: function () {\r\n return this.isBmmBlockEnabled && this.isBmmExist();\r\n },\r\n logInteraction: function (message) {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal(message, this.options.scenario);\r\n }\r\n },\r\n validate: function () {\r\n this.parser.isAfterFirstInteraction(true);\r\n var isValid = this.parser.validate();\r\n if (!isValid) {\r\n this.logInteraction('keyword is not valid');\r\n }\r\n return isValid;\r\n },\r\n selectThisAdGroup: function () {\r\n this.trigger('keywords:selected');\r\n },\r\n getSeedKeywords: function (e) {\r\n this.parser.showBmmWarningAlert(this.isBmmWarning());\r\n this.parser.showBmmBlockAlert(this.isBmmBlock());\r\n this.parser.showMutableKeywordMatchTypAlert(this.isMutableKeywordMatchTypeWarning());\r\n var self = this;\r\n if (_.size(self.parser.seedKeywords()) >= self.parser.numSeedKeywords) {\r\n return;\r\n }\r\n this.trigger('keywords:updated');\r\n if (e.keyCode === 13 || e.keyCode === 188 || e.type === 'paste') {\r\n if (!self.parser.seedKeywords()) {\r\n self.parser.seedKeywords([]);\r\n setTimeout(function () {\r\n if (_.size(self.parser.seedKeywords()) > 0) {\r\n self.trigger('seedKeywordsEntered', self.parser.seedKeywords());\r\n }\r\n }, self.parser.seedKeywordTimeout);\r\n }\r\n setTimeout(function () {\r\n var keywords = self.parser.peekKeywords();\r\n if (keywords.length > 0) {\r\n var endIndex = Math.min(keywords.length, self.parser.numSeedKeywords);\r\n self.parser.seedKeywords(keywords.slice(0, endIndex));\r\n }\r\n }, 5);\r\n }\r\n self.parser.parseKeywords();\r\n },\r\n keywordsChanged: function () {\r\n this.logInteraction('keywords change');\r\n },\r\n outTextArea: function (e) {\r\n this.parser.parseKeywords();\r\n this.trigger('keywords:outTextArea');\r\n },\r\n addSuggestion: function (addedKeywords, sourceReqId) {\r\n var newKeywords = _.difference(addedKeywords, this.parser.parsedKeywords());\r\n if (newKeywords.length === 0) {\r\n return;\r\n }\r\n this.keywordSuggestionsAdded = this.keywordSuggestionsAdded.concat(_.map(newKeywords, function (newKeyword) {\r\n return {\r\n keyword: newKeyword,\r\n sourceReqId: sourceReqId\r\n };\r\n }));\r\n var textareaValue = this.parser.keywordsTextareaVal();\r\n textareaValue = textareaValue.replace(/([,\\s]+$)/g, '');\r\n var added = newKeywords.join('\\n');\r\n if (_.size(textareaValue) === 0) {\r\n textareaValue = added;\r\n } else {\r\n textareaValue = textareaValue + '\\n' + added;\r\n }\r\n this.parser.keywordsTextareaVal(textareaValue);\r\n this.parser.isAfterFirstInteraction(true);\r\n this.parser.parseKeywords();\r\n this.hasChanges = true;\r\n this.trigger('keywords:addSuggestion');\r\n },\r\n getContextObjects: function () {\r\n return _.map(this.getKeywords(), function (keyword, index) {\r\n return {\r\n Id: keyword.Id(),\r\n Text: keyword.Text(),\r\n MatchType: keyword.MatchType()\r\n };\r\n });\r\n },\r\n getKeyFromKeyword: function (keyword) {\r\n switch (keyword.MatchType) {\r\n case 'Broad':\r\n return keyword.Text;\r\n case 'Phrase':\r\n return '\"' + keyword.Text + '\"';\r\n case 'Exact':\r\n return '[' + keyword.Text + ']';\r\n }\r\n return null;\r\n },\r\n getChangedKeywords: function (adGroup) {\r\n if (!this.hasChanges) {\r\n return [];\r\n }\r\n var oldKeywords = this.getKeys();\r\n var newKeywords = this.parser.uniqueParsedKeywords();\r\n var changedKeywords = _.union(this.serializeToCreate(_.difference(newKeywords, oldKeywords), adGroup), this.serializeToDelete(_.difference(oldKeywords, newKeywords)));\r\n return changedKeywords;\r\n },\r\n getCurKeywords: function () {\r\n var newKeywords = this.parser.uniqueParsedKeywords();\r\n return _.map(newKeywords, function (keyword) {\r\n return parseKeyword(keyword);\r\n });\r\n },\r\n serializeToCreate: function (toCreate, adGroup) {\r\n var self = this;\r\n var serializedKeywords = [];\r\n if (toCreate.length > 0) {\r\n var options = _.extend({}, self.options, {\r\n 'adGroup': adGroup\r\n });\r\n _.each(toCreate, function (keyword, index) {\r\n options.text = keyword;\r\n var serializedKeyword = new KeywordViewModel(options).toObject();\r\n serializedKeywords[index] = _.isNaN(adGroup.Id) || adGroup.Id < 1 ? _.pick(serializedKeyword, 'Text', 'MatchType', 'AdGroupName', 'CampaignName', 'Bid') : _.pick(serializedKeyword, 'Text', 'MatchType', 'AdGroup', 'Bid');\r\n });\r\n }\r\n return serializedKeywords;\r\n },\r\n serializeToDelete: function (toDelete) {\r\n var serializedKeywords = [];\r\n if (toDelete.length > 0) {\r\n var self = this;\r\n _.each(toDelete, function (keyword, index) {\r\n var serializedKeyword = self.keywords()[keyword].toObject();\r\n serializedKeyword.Status = 'Deleted';\r\n serializedKeywords[index] = _.pick(serializedKeyword, 'Id', 'AdGroup', 'Status', 'Text', 'MatchType');\r\n });\r\n }\r\n return serializedKeywords;\r\n },\r\n getNameAndLengthForProperty: function (property) {\r\n return {\r\n name: i18n.get('ColumnName_' + property),\r\n length: s$TextAd.properties[property].maxLength\r\n };\r\n },\r\n addErrors: function (errors) {\r\n self.parser.errors.add(i18nErrors.getODataErrors(errors));\r\n },\r\n escapeHtml: function (text) {\r\n return text.replace(//g, '>');\r\n },\r\n handleApiErrors: function (keywords) {\r\n var self = this;\r\n var errors = [];\r\n _.each(keywords, function (keyword) {\r\n _.each(keyword.errors, function (err) {\r\n var errorFromAd = _.contains(['Title', 'Text', 'DestinationUrl'], err.property);\r\n if (errorFromAd && err.code === tooMuchText && err.message.indexOf('{0}') > -1 && err.message.indexOf('{1}') > -1) {\r\n var pairs = self.getNameAndLengthForProperty(err.property);\r\n err.message = err.message.replace('{0}', pairs.name).replace('{1}', pairs.length);\r\n }\r\n if (errorFromAd && err.code === notEnoughText && err.message.indexOf('{0}') > -1) {\r\n err.message = err.message.replace('{0}', self.getNameAndLengthForProperty(err.property).name);\r\n }\r\n err.message = i18n.getString('Keywords_And_Errors_seperator', self.escapeHtml(self.getKeyFromKeyword(keyword)), err.message);\r\n errors.push(err);\r\n });\r\n });\r\n self.parser.errors.add(errors);\r\n },\r\n clearErrors: function () {\r\n this.parser.errors.clear(i18nErrors.isCampaignApiError);\r\n },\r\n updateViewModels: function (input) {\r\n var keywords = input.keywords;\r\n var campaignId = input.campaignId;\r\n var adGroupId = input.adGroupId;\r\n var hasErrors = input.hasErrors;\r\n this.clearErrors();\r\n var successfulKeywords = [];\r\n var keywordsWithErrors = [];\r\n if (hasErrors) {\r\n _.each(keywords, function (keyword) {\r\n if (keyword.errors && !keyword.Id) {\r\n keywordsWithErrors.push(keyword);\r\n } else {\r\n successfulKeywords.push(keyword);\r\n }\r\n });\r\n } else {\r\n successfulKeywords = keywords;\r\n }\r\n if (!_.isEmpty(keywordsWithErrors)) {\r\n this.handleApiErrors(keywordsWithErrors);\r\n }\r\n if (successfulKeywords.length === keywords.length) {\r\n this.hasChanges = false;\r\n }\r\n var newlyCreatedKeywords = [];\r\n _.each(successfulKeywords, (function (keyword) {\r\n var key = this.getKeyFromKeyword(keyword);\r\n if (keyword.Status === 'Deleted') {\r\n delete this.keywords()[key];\r\n } else {\r\n this.keywords()[key] = new KeywordViewModel({\r\n properties: keyword\r\n });\r\n newlyCreatedKeywords.push(keyword.Text);\r\n }\r\n }).bind(this));\r\n var numberOfCreatedKeywords = _.size(newlyCreatedKeywords);\r\n if (numberOfCreatedKeywords > 0) {\r\n var keywordsImportedFromPlanner = _.filter(this.keywordSuggestionsAdded, function (suggestedKeyword) {\r\n return _.indexOf(newlyCreatedKeywords, suggestedKeyword.keyword) !== -1;\r\n });\r\n instrumentation.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'createKeyword/updateViewModels', JSON.stringify({\r\n keywordsCreated: numberOfCreatedKeywords,\r\n campaignId: campaignId,\r\n adGroupId: adGroupId,\r\n suggestionsUsed: _.size(keywordsImportedFromPlanner),\r\n detailedSuggestionsUsed: _.chain(keywordsImportedFromPlanner).groupBy(function (keyword) {\r\n return keyword.sourceReqId;\r\n }).mapObject(function (reqGroup) {\r\n return _.pluck(reqGroup, 'keyword');\r\n }).value()\r\n }));\r\n this.keywordSuggestionsAdded = [];\r\n }\r\n return this.getContextObjects();\r\n }\r\n});\r\nexport default View;\r\n\r\n","import ko from 'knockout';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nconst s$AdGroup = window.globalLegacySchema.get('AdGroup');\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n Name = '',\r\n } = {}) {\r\n this.fields = ['Name', 'Language'];\r\n koSchema.properties(this, s$AdGroup, this.fields, { Name });\r\n this.showKeywordPlanner = ko.observable(false);\r\n }\r\n}\r\n","/*eslint new-cap:0 */\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport Backbone from 'backbone';\r\nimport template from '@bingads-webui-campaign-legacy/crud-keywords/template/section-wrapper.pug';\r\nimport CreateView from '@bingads-webui-campaign-legacy/crud-keywords/view/create';\r\nimport KeywordPlannerView from '@bingads-webui-campaign-legacy/crud-adgroup/view/keywordPlanner';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/crud-keywords/viewmodel/section-wrapper';\r\nimport { isCampaignApiError } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as LocationTargetTypes from '@bingads-webui-campaign-legacy/location-targets/util/locationTargetTypes';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/campaign-creation-advanced');\r\n\r\nexport default class View extends Backbone.View {\r\n initialize(options = {}) {\r\n this.options = options;\r\n this.showOnlyKeywords = this.options.showOnlyKeywords || false;\r\n this.popupIds = _.defaults({}, this.options.popupIds, {\r\n 'AdGroupName': 'pop_BA_CampaignCreate_Keywords_AdGroupName',\r\n });\r\n this.isSignUp = this.options.scenario === 'signup';\r\n\r\n this.viewmodel = new ViewModel({\r\n Name: this.isSignUp ? `${i18n.getString('Entity_Adgroup')} 1` : '',\r\n });\r\n this.createView = new CreateView(options);\r\n this.keywordPlannerView = new KeywordPlannerView({\r\n mode: 'keywordsOnly',\r\n scenario: options.scenario,\r\n popupIds: this.options.popupIds,\r\n activityLogger: options.activityLogger,\r\n });\r\n\r\n this.keywordPlannerView.on({\r\n 'addKeyword': (newKeyword, sourceReqId) => {\r\n this.createView.addSuggestion([newKeyword], sourceReqId);\r\n },\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n i18n,\r\n isSignUp: this.isSignUp,\r\n showOnlyKeywords: this.showOnlyKeywords,\r\n popupIds: this.popupIds,\r\n }));\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n this.createView.render();\r\n this.$('.parser').append(this.createView.el);\r\n this.createView.parser.isAfterFirstInteraction(false);\r\n this.keywordPlannerView.render();\r\n this.$('.keyword-planner-container').append(this.keywordPlannerView.el);\r\n\r\n this.createView.on('keywords:updated', () => {\r\n this.trigger('keywords:updated');\r\n });\r\n\r\n this.createView.on('keywords:outTextArea', () => {\r\n this.trigger('keywords:outTextArea');\r\n });\r\n\r\n this.createView.on('keywords:addSuggestion', () => {\r\n this.trigger('keywords:addSuggestion');\r\n });\r\n\r\n this.createView.on('seedKeywordsEntered', (seedKeywords) => {\r\n if (_.isArray(seedKeywords) && _.size(seedKeywords) > 0 && this.createView.parser.isKeywordsValid()) {\r\n this.keywordPlannerView.onSearch({\r\n keywords: seedKeywords,\r\n });\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n logActivity(message) {\r\n if (this.options.activityLogger) {\r\n this.options.activityLogger.signal(message, this.options.scenario);\r\n }\r\n }\r\n\r\n onLanguageLocationChanged(showKeywordPlanner, locations, language) {\r\n this.viewmodel.showKeywordPlanner(showKeywordPlanner);\r\n\r\n const includedLocations = _.filter(locations, (location) => location.SelectionStatus === LocationTargetTypes.Included);\r\n const includedCriterions = _.map(includedLocations, (location) => location.Criterion.LocationCriterion || location.Criterion.RadiusCriterion);\r\n\r\n if (language) {\r\n this.keywordPlannerView.setLanguages(_.isArray(language) ? language : [language]);\r\n }\r\n this.keywordPlannerView.setLocationTargeting(includedCriterions);\r\n\r\n // only trigger keyword planner search when we need it (when it shows)\r\n if (showKeywordPlanner) {\r\n this.keywordPlannerView.onSearch();\r\n }\r\n }\r\n\r\n onAdsUrlUpdated(url) {\r\n this.keywordPlannerView.onSearch({url});\r\n }\r\n\r\n clearApiErrors() {\r\n this.viewmodel.errors.clear(isCampaignApiError);\r\n this.createView.clearErrors();\r\n }\r\n\r\n validateViewModel() {\r\n if (this.showOnlyKeywords) {\r\n return true;\r\n }\r\n\r\n const isValid = this.viewmodel.validate();\r\n\r\n if (!isValid) {\r\n _.each(this.viewmodel.fields, (field) => {\r\n if (!this.viewmodel[field].isValid()) {\r\n this.logActivity(`ad group field invalid: ${field}`);\r\n }\r\n });\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n validate() {\r\n return _.every([\r\n this.createView.validate(),\r\n this.validateViewModel(),\r\n ]);\r\n }\r\n\r\n updateViewModels({keywords, campaignId, adGroupId, hasErrors}) {\r\n return this.createView.updateViewModels({keywords, campaignId, adGroupId, hasErrors});\r\n }\r\n\r\n hasChanges() {\r\n return this.createView.hasChanges;\r\n }\r\n\r\n getValues(adGroupName, campaignName, adGroupId) {\r\n const keywords = this.createView.getChangedKeywords({\r\n Id: adGroupId || 0,\r\n Name: adGroupName,\r\n });\r\n\r\n return {\r\n Keywords: _.map(keywords, (keyword) => {\r\n return _.defaults({}, keyword, { CampaignName: campaignName } );\r\n }),\r\n };\r\n }\r\n\r\n getCurKeywords() {\r\n return this.createView.getCurKeywords();\r\n }\r\n\r\n getAdGroup(adGroupId) {\r\n const adgroup = {\r\n Name: this.viewmodel.Name(),\r\n Medium: 'Search',\r\n PricingModel: 'CPC',\r\n };\r\n\r\n if (adGroupId) {\r\n adgroup.Id = adGroupId;\r\n }\r\n\r\n return adgroup;\r\n }\r\n\r\n adGroupNameChange() {\r\n this.logActivity('crud keywords adgroup name change.');\r\n }\r\n\r\n get events() {\r\n return {\r\n 'change input.name': 'adGroupNameChange',\r\n };\r\n }\r\n}\r\n","/* eslint-disable new-cap */\r\n/* eslint-disable camelcase */\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport schemas from '@bingads-webui-campaign/campaign-ui-schemas';\r\n// import i18n from '$/i18n!campaignui/campaign-creation-advanced';\r\nimport ko_schema from '@bingads-webui-component-legacy/ko-schema/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n campaignId = null,\r\n DomainName = '',\r\n DomainLanguage = '',\r\n Source = '',\r\n disabled = false,\r\n dynamicDescriptionEnabled = true,\r\n isMixedDSACampaignRecommendation = false,\r\n }) {\r\n\r\n const permissions = config.get('Permissions');\r\n\r\n this.isTargetingSourceEnabled = ko.computed(() => {\r\n return _.result(permissions, 'IsDynamicSearchAdsPageFeedEnabled');\r\n }, this);\r\n\r\n this.isDynamicDescriptionPhase1Enabled = ko.computed(() => {\r\n return _.result(permissions.dynamic, 'DSADynamicDescriptionPhase1') && !isMixedDSACampaignRecommendation;\r\n }, this);\r\n\r\n this.TargetingSourceSetting = ko.observable();\r\n\r\n this.DomainName = ko.observable(DomainName);\r\n this.LanguageCode = ko.observable(DomainLanguage);\r\n\r\n if (this.isTargetingSourceEnabled()) {\r\n this.TargetingSourceSetting({ // eslint-disable-line\r\n Source: Source || 'SystemIndex',\r\n });\r\n }\r\n\r\n this.Id = ko.observable(campaignId);\r\n\r\n this.disabled = ko.observable(disabled);\r\n\r\n if (this.isDynamicDescriptionPhase1Enabled()) {\r\n this.isDynamicDescriptionChecked = ko.observable(dynamicDescriptionEnabled);\r\n }\r\n\r\n this.campaignProps = ['DomainName', 'LanguageCode', 'Source'];\r\n ko_schema.properties(this, schemas.Campaign, this.campaignProps, {\r\n Source,\r\n DomainName,\r\n LanguageCode: DomainLanguage,\r\n });\r\n }\r\n}\r\n","/* eslint-disable new-cap */\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/dsa-settings/viewmodel/dsa-settings';\r\nimport Language from '@bingads-webui-component-legacy/language-selector/view/index';\r\nimport TargetingSourceView from '@bingads-webui-campaign-legacy/auto-targets/view/pagefeed/targeting-source';\r\nimport tmpl from '@bingads-webui-campaign-legacy/dsa-settings/template/dsa-settings.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\nconst isDomesticSimplifiedChineseEnabled = _.result(config.get('permissions'), 'IsDomesticSimplifiedChineseEnabled');\r\nconst defaultLanguage = isDomesticSimplifiedChineseEnabled ? 'SimplifiedChinese' : 'English';\r\n\r\nexport default class DSASettings extends Backbone.View {\r\n initialize({\r\n campaignId = null,\r\n DomainName = '',\r\n DomainLanguage = defaultLanguage,\r\n Source = 'SystemIndex',\r\n logActivity = _.noop,\r\n popupIds = {\r\n CampaignName: 'pop_BA_CampaignCreate_Settings_CampaignName',\r\n Language: 'pop_BA_CampaignCreate_Settings_AdLanguage',\r\n MultiLanguage: 'pop_BA_CampaignCreate_Settings_LanguageTargeting',\r\n TargetingSource: 'pop_BA_DSA_TargetingSource',\r\n },\r\n disabled = false,\r\n dynamicDescriptionEnabled = true,\r\n isMixedDSACampaignRecommendation = false,\r\n } = {}) {\r\n this.popupIds = popupIds;\r\n this.viewModel = new ViewModel({\r\n campaignId,\r\n DomainName,\r\n DomainLanguage,\r\n Source,\r\n disabled,\r\n dynamicDescriptionEnabled,\r\n isMixedDSACampaignRecommendation,\r\n });\r\n this.logActivity = logActivity;\r\n this.campaignId = campaignId;\r\n\r\n this.viewModel.DomainName.subscribe(() => {\r\n this.trigger('change');\r\n });\r\n this.viewModel.LanguageCode.subscribe(() => {\r\n this.trigger('change');\r\n });\r\n this.viewModel.TargetingSourceSetting.subscribe(() => {\r\n this.trigger('change');\r\n });\r\n if (this.viewModel.isDynamicDescriptionPhase1Enabled()) {\r\n this.viewModel.isDynamicDescriptionChecked.subscribe(() => {\r\n this.trigger('change');\r\n });\r\n }\r\n }\r\n\r\n get events() {\r\n return {\r\n 'blur .dsa-domainname-input': 'onDomainNameChange',\r\n };\r\n }\r\n\r\n onDomainNameChange() {\r\n this.trigger('change.domainName', this.viewModel.DomainName());\r\n }\r\n\r\n onLanguageChange() {\r\n this.trigger('change.language', this.viewModel.LanguageCode());\r\n }\r\n\r\n handleApiErrors(errors) {\r\n this.viewModel.errors.add(errors);\r\n }\r\n\r\n setValues({\r\n DomainName,\r\n DomainLanguage,\r\n Source,\r\n campaignId,\r\n targetingSourceCampaignId,\r\n disabled,\r\n dynamicDescriptionEnabled,\r\n }) {\r\n if (campaignId != null) {\r\n this.viewModel.Id(campaignId);\r\n }\r\n\r\n if (disabled != null) {\r\n this.viewModel.disabled(disabled);\r\n if (this.webSiteLanguage) {\r\n this.webSiteLanguage.koModel.disabled(disabled);\r\n }\r\n }\r\n\r\n if (DomainName != null) {\r\n this.viewModel.DomainName(DomainName);\r\n }\r\n\r\n if (DomainLanguage != null) {\r\n this.viewModel.LanguageCode(DomainLanguage);\r\n if (this.webSiteLanguage) {\r\n this.webSiteLanguage.trigger('language:set', this.viewModel.LanguageCode());\r\n }\r\n }\r\n\r\n if (Source != null) {\r\n this.viewModel.TargetingSourceSetting({\r\n Source,\r\n });\r\n if (this.targetingSource) {\r\n this.targetingSource.trigger('set', {\r\n source: Source,\r\n campaignId: targetingSourceCampaignId,\r\n });\r\n }\r\n\r\n if (this.viewModel.isDynamicDescriptionPhase1Enabled()) {\r\n this.viewModel.isDynamicDescriptionChecked(dynamicDescriptionEnabled);\r\n }\r\n }\r\n }\r\n\r\n initWebSiteLanguage() {\r\n const DSAEnableInFrenchGerman = _.result(config.get('permissions'), 'IsDynamicSearchAdsV1EnabledInFRAndDE');\r\n const IsEnabledForDSAInCHandNLandITandESandSE = _.result(config.get('permissions'), 'IsEnabledForDSAInCHandNLandITandESandSE');\r\n const DSAEnabledInPLandPTandTRandGR = _.result(config.get('permissions'), 'IsDSAEnabledInPLandPTandTRandGR');\r\n const DSAEnabledInDKandFIandNO = _.result(config.get('permissions'), 'IsDSAEnabledInDKandFIandNO');\r\n const DSAEUPhase2 = _.result(config.get('permissions'), 'dynamic', {}).DSAEUPhase2;\r\n const DSAEnabledInJapanese = _.result(config.get('permissions'), 'IsDynamicSearchAdsGlobalizationJapanEnabled');\r\n const IsAdsGlobalizationPhase6Enabled = _.result(config.get('permissions'), 'IsAdsGlobalizationPhase6Enabled');\r\n const IsSimplifiedChineseLanguageEnabledInMultipleLanguage = _.result(config.get('permissions'), 'IsSimplifiedChineseLanguageEnabledInMultipleLanguage');\r\n const IsDomesticSimplifiedChineseEnabled = _.result(config.get('permissions'), 'IsDomesticSimplifiedChineseEnabled');\r\n const IsAdsGlobalizationPhase9DSAEnabled = _.result(config.get('permissions'), 'dynamic', {}).AdsGlobalizationPhase9DSA;\r\n const IsAdsGlobalizationPhase9Enabled = _.result(config.get('permissions'), 'IsAdsGlobalizationPhase9Enabled');\r\n const IsAdsGlobalizationPhase9VIEnabled = _.result(config.get('permissions'), 'IsAdsGlobalizationPhase9VIEnabled');\r\n const isDSASupportMultipleLanguages = DSAEnableInFrenchGerman ||\r\n IsEnabledForDSAInCHandNLandITandESandSE ||\r\n DSAEnabledInPLandPTandTRandGR ||\r\n DSAEnabledInDKandFIandNO ||\r\n DSAEUPhase2 ||\r\n DSAEnabledInJapanese ||\r\n IsAdsGlobalizationPhase6Enabled ||\r\n IsSimplifiedChineseLanguageEnabledInMultipleLanguage ||\r\n IsAdsGlobalizationPhase9Enabled ||\r\n IsAdsGlobalizationPhase9DSAEnabled ||\r\n IsAdsGlobalizationPhase9VIEnabled;\r\n\r\n if (isDSASupportMultipleLanguages) {\r\n let languages = ['English'];\r\n\r\n if (DSAEnableInFrenchGerman) {\r\n languages = languages.concat(['French', 'German']);\r\n }\r\n\r\n if (IsEnabledForDSAInCHandNLandITandESandSE) {\r\n languages = languages.concat(['Spanish', 'Italian', 'Dutch', 'Swedish']);\r\n }\r\n\r\n if (DSAEnabledInPLandPTandTRandGR) {\r\n // Now only PL is supported for now, will add others later\r\n languages = languages.concat([\r\n 'Polish',\r\n 'Portuguese',\r\n 'Czech',\r\n 'Romanian',\r\n 'Hungarian',\r\n 'Greek',\r\n 'Slovak',\r\n 'Bulgarian',\r\n 'Croatian',\r\n 'Lithuanian',\r\n 'Slovenian',\r\n 'Estonian',\r\n 'Latvian',\r\n 'Maltese',\r\n ]);\r\n }\r\n\r\n if (DSAEnabledInDKandFIandNO) {\r\n languages = languages.concat(['Danish', 'Finnish', 'Norwegian']);\r\n }\r\n\r\n if (DSAEUPhase2) {\r\n languages = languages.concat(['Turkish', 'Serbian', 'Bosnian', 'Albanian', 'Macedonian', 'Icelandic']);\r\n }\r\n\r\n if (DSAEnabledInJapanese) {\r\n languages = languages.concat(['Japanese']);\r\n }\r\n\r\n if (IsSimplifiedChineseLanguageEnabledInMultipleLanguage) {\r\n languages = languages.concat(['SimplifiedChinese']);\r\n }\r\n\r\n if (IsAdsGlobalizationPhase6Enabled) {\r\n languages = languages.concat(['Hebrew', 'Arabic', 'Russian', 'TraditionalChinese']);\r\n }\r\n\r\n if (IsAdsGlobalizationPhase9DSAEnabled) {\r\n languages = languages.concat(['Hindi', 'Malay', 'Thai', 'Indonesian', 'Tagalog']);\r\n }\r\n\r\n if (IsAdsGlobalizationPhase9VIEnabled) {\r\n languages = languages.concat(['Vietnamese']);\r\n }\r\n\r\n if (IsDomesticSimplifiedChineseEnabled) {\r\n languages = ['SimplifiedChinese'];\r\n }\r\n\r\n this.webSiteLanguage = new Language({\r\n i18nStrings: {\r\n Description: '',\r\n SaveWarning: '',\r\n },\r\n language: this.viewModel.LanguageCode(),\r\n languages,\r\n IsAdsGlobalizationPhase1Enabled: _.result(config.get('permissions'), 'IsAdsGlobalizationPhase1Enabled'),\r\n IsAdsGlobalizationPhase2Enabled: _.result(config.get('permissions'), 'IsAdsGlobalizationPhase2Enabled'),\r\n IsAdsGlobalizationPhase6Enabled,\r\n IsAdsGlobalizationPhase2JapanEnabled: _.result(config.get('permissions'), 'IsAdsGlobalizationPhase2JapanEnabled'),\r\n enableSimplifiedChinese: IsSimplifiedChineseLanguageEnabledInMultipleLanguage || IsDomesticSimplifiedChineseEnabled,\r\n IsAdsGlobalizationPhase9Enabled,\r\n IsAdsGlobalizationPhase9DSAEnabled,\r\n IsAdsGlobalizationPhase9VIEnabled,\r\n // TO DO\r\n });\r\n this.webSiteLanguage.on('language:changed', (language) => {\r\n this.viewModel.LanguageCode(language);\r\n this.logActivity('website language changed');\r\n this.onLanguageChange();\r\n }, this);\r\n }\r\n }\r\n\r\n initTargetSource() {\r\n if (this.targetingSource) {\r\n this.targetingSource.remove();\r\n this.targetingSource = null;\r\n }\r\n\r\n if (this.viewModel.isTargetingSourceEnabled()) {\r\n this.targetingSource = new TargetingSourceView({\r\n source: this.viewModel.TargetingSourceSetting().Source,\r\n campaignId: this.campaignId,\r\n activityLogger: this.options.activityLogger,\r\n });\r\n this.targetingSource.on('update', (value) => {\r\n this.viewModel.TargetingSourceSetting({\r\n Source: value.source,\r\n });\r\n }, this);\r\n }\r\n }\r\n\r\n validate() {\r\n const isTargetingSourceValid = this.targetingSource ? this.targetingSource.validate() : true;\r\n\r\n return this.viewModel.validate() && isTargetingSourceValid;\r\n }\r\n\r\n render() {\r\n this.$el.html(tmpl({\r\n i18n,\r\n popupIds: this.popupIds,\r\n isDomesticSimplifiedChineseEnabled,\r\n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.initWebSiteLanguage();\r\n this.initTargetSource();\r\n\r\n const DSAEnableInFrenchGerman = _.result(config.get('permissions'), 'IsDynamicSearchAdsV1EnabledInFRAndDE');\r\n const IsEnabledForDSAInCHandNLandITandESandSE = _.result(config.get('permissions'), 'IsEnabledForDSAInCHandNLandITandESandSE');\r\n const DSAEnabledInPLandPTandTRandGR = _.result(config.get('permissions'), 'IsDSAEnabledInPLandPTandTRandGR');\r\n const DSAEnabledInDKandFIandNO = _.result(config.get('permissions'), 'IsDSAEnabledInDKandFIandNO');\r\n const DSAEnabledInJapanese = _.result(config.get('permissions'), 'IsDynamicSearchAdsGlobalizationJapanEnabled');\r\n const IsSimplifiedChineseLanguageEnabledInMultipleLanguage = _.result(config.get('permissions'), 'IsSimplifiedChineseLanguageEnabledInMultipleLanguage');\r\n\r\n const isDSASupportMultipleLanguages = DSAEnableInFrenchGerman || IsEnabledForDSAInCHandNLandITandESandSE || DSAEnabledInPLandPTandTRandGR || DSAEnabledInDKandFIandNO || DSAEnabledInJapanese || IsSimplifiedChineseLanguageEnabledInMultipleLanguage;\r\n\r\n if (this.campaignId != null && this.options.isCampaignSettingsScenario && this.options.DomainName) {\r\n const lang = i18n.getString(`Language_${this.viewModel.LanguageCode()}`) || this.viewModel.LanguageCode();\r\n\r\n this.$('.website-language-setting').empty().append(lang);\r\n } else if (isDSASupportMultipleLanguages) {\r\n this.$('.website-language-setting').empty().append(this.webSiteLanguage.render().el);\r\n } // if not in editing and not enable DSA in French and German, it will show English by default\r\n\r\n if (this.viewModel.isTargetingSourceEnabled()) {\r\n this.$('.dsa-targeting-source').empty().append(this.targetingSource.render().el);\r\n }\r\n return this;\r\n }\r\n\r\n getValues(trimDomainName = false) {\r\n if (!trimDomainName) {\r\n return _.extend({}, this.viewModel.toObject(),\r\n this.viewModel.isTargetingSourceEnabled() ? { Source: this.viewModel.TargetingSourceSetting().Source } : {},\r\n this.viewModel.isDynamicDescriptionPhase1Enabled() ? { DynamicDescriptionEnabled: this.viewModel.isDynamicDescriptionChecked()} : {});\r\n }\r\n\r\n const context = {};\r\n\r\n // strip off http(s) and www.\r\n const domainName = this.viewModel.DomainName();\r\n let processedDomainName = domainName.trim().toLowerCase();\r\n\r\n processedDomainName = processedDomainName.replace(new RegExp('^http(s)?://'), '');\r\n processedDomainName = processedDomainName.replace(new RegExp('^w{3}.'), '');\r\n this.viewModel.DomainName(processedDomainName);\r\n context.DomainName = this.viewModel.DomainName();\r\n context.Language = this.viewModel.LanguageCode();\r\n context.DomainLanguage = this.viewModel.LanguageCode();\r\n if (this.viewModel.isTargetingSourceEnabled()) {\r\n context.TargetingSource = this.viewModel.TargetingSourceSetting().Source;\r\n context.Source = this.viewModel.TargetingSourceSetting().Source;\r\n }\r\n\r\n if (this.viewModel.isDynamicDescriptionPhase1Enabled()) {\r\n context.DynamicDescriptionEnabled = this.viewModel.isDynamicDescriptionChecked();\r\n }\r\n\r\n return context;\r\n }\r\n\r\n remove() {\r\n if (this.webSiteLanguage) {\r\n this.webSiteLanguage.remove();\r\n }\r\n\r\n if (this.targetingSource) {\r\n this.targetingSource.remove();\r\n }\r\n\r\n super.remove();\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport * as utilities from '@bingads-webui-campaign-legacy/editorial-appeal/utilities';\r\nimport EditorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/editor';\r\nimport InlineErrorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/inline-error';\r\n\r\nconst legacy$ = $;\r\n\r\nexport default class InlineAppealView extends Backbone.View {\r\n initialize({\r\n grid,\r\n rowId,\r\n controller,\r\n submit,\r\n appealTitle,\r\n disableAppealBtn,\r\n permissions,\r\n }) {\r\n this.grid = grid;\r\n this.rowId = rowId;\r\n this.appealTitle = appealTitle;\r\n this.controller = controller;\r\n this.submit = submit;\r\n this.disableAppealBtn = disableAppealBtn;\r\n this.permissions = permissions;\r\n }\r\n\r\n render() {\r\n utilities.getAppealRejections(\r\n this.controller,\r\n 'GetAppealRejections',\r\n [this.rowId],\r\n {\r\n grid: this.grid,\r\n success: this.onInlineAppealSuccess.bind(this),\r\n error: () => {\r\n this.grid.expandRowDetail(this.rowId, null, true, false);\r\n },\r\n jsonError: () => {\r\n const inlineErrorView = new InlineErrorView({\r\n rowId: this.rowId,\r\n callback: () => {\r\n this.cancelInlineAppeal(this.grid, this.rowId);\r\n },\r\n }).render();\r\n\r\n this.grid.expandRowDetail(this.rowId, inlineErrorView.$el, true, true);\r\n },\r\n permissions: this.permissions,\r\n }\r\n );\r\n\r\n return this;\r\n }\r\n\r\n onInlineAppealSuccess({ appealIds, appealData: [firstAppealData = {}] }) {\r\n if (firstAppealData.IsAppealable) {\r\n this.editor = new EditorView({\r\n appealData: firstAppealData,\r\n controlId: `inlineAppeal_${this.rowId}`,\r\n callback: this.callBackForInlineAppeal.bind(this),\r\n appealTitle: this.appealTitle,\r\n hideAppealCheckBox: true,\r\n });\r\n\r\n this.editor.render();\r\n\r\n this.editor.toInline(appealIds, this.rowId, this.disableAppealBtn, {\r\n appeal: () => {\r\n this.createInlineAppeal(appealIds);\r\n },\r\n cancel: () => {\r\n this.grid.expandRowDetail(this.rowId, null, true, false);\r\n this.grid.cancelInlineUpdates();\r\n },\r\n });\r\n\r\n this.trigger('success');\r\n }\r\n }\r\n\r\n createInlineAppeal(appealIds) {\r\n if (this.editor && legacy$(`#inlineAppealForm_${this.rowId}`).valid()) {\r\n let params = utilities.ids2params(appealIds);\r\n\r\n const appealJson = this.editor.getAppealData();\r\n\r\n if (appealJson) {\r\n params += `&EditorialAppeal.Appeal=${appealJson.Appeal}&EditorialAppeal.EntityType=${appealJson.EntityType}&EditorialAppeal.Justification=${appealJson.Justification}`;\r\n }\r\n\r\n this.grid.bulkAction(\r\n utilities.getInlineBulkAppealUrl(this.controller, this.submit),\r\n params,\r\n null,\r\n this.onCreateAppealSuccess.bind(this),\r\n { grid: this.grid, rowId: this.rowId }\r\n );\r\n }\r\n }\r\n\r\n onCreateAppealSuccess(data, { grid, rowId }) {\r\n if (data) {\r\n this.cancelInlineAppeal(grid, rowId);\r\n }\r\n }\r\n\r\n cancelInlineAppeal(grid, rowId) {\r\n grid.expandRowDetail(rowId, null, true, false);\r\n grid.cancelInlineUpdates();\r\n this.trigger('cancel');\r\n }\r\n\r\n callBackForInlineAppeal(appealHtml) {\r\n this.grid.expandRowDetail(this.rowId, appealHtml, true, true);\r\n this.editor.setElement($(`#EditorialAppeal_Full_${this.editor._elementId}`).parent());\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { edmCampaign as edm } from '@bingads-webui/edm-campaign';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport withUiBlock from '@bingads-webui-component-legacy/uiblocker/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport { getODataErrors } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as utilities from '@bingads-webui-campaign-legacy/editorial-appeal/utilities';\r\nimport EditorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/editor';\r\nimport InlineErrorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/inline-error';\r\nimport template from '@bingads-webui-campaign-legacy/editorial-appeal/template/bulk.pug';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport gridHelper from '@bingads-webui-static-legacy/shared/view/gridHelper';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport campaignCacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\n\r\nconst legacy$ = $;\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/editorial-appeal');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst s$AdGroup = window.globalLegacySchema.get('AdGroup');\r\n\r\nconst MaxEntityInOneAdGroup = _.chain(['Ads', 'Keywords']).map((entity) => {\r\n return s$AdGroup.properties[entity].maxItems;\r\n}).max().value();\r\n\r\nconst formatDate = (date) => dateUtil.format(date, 'M/d/yyyy');\r\nconst alertHelper = new AlertHelper({ i18nGlobal });\r\n\r\nexport default class BulkAppealView extends Backbone.View {\r\n initialize({\r\n grid,\r\n controller,\r\n submit,\r\n appealTitle,\r\n infoMsg,\r\n permissions,\r\n adGroupLevelType = null,\r\n isForVNext = false,\r\n requestExceptionFromPopup = false,\r\n instrumentation = null,\r\n scope,\r\n }) {\r\n this.grid = grid;\r\n this.controller = controller;\r\n this.submit = submit;\r\n this.appealTitle = appealTitle;\r\n this.infoMsg = infoMsg;\r\n this.adGroupLevelType = adGroupLevelType;\r\n this.isForVNext = isForVNext;\r\n this.requestExceptionFromPopup = requestExceptionFromPopup;\r\n\r\n this.editor = null;\r\n this.inlineErrorView = null;\r\n this.permissions = permissions;\r\n this.instrumentation = instrumentation;\r\n this.scope = scope;\r\n }\r\n\r\n fetchIdsForCrossPageSelectionForNewGrid() {\r\n // clone a query so that original query won't be impact\r\n const currentQueryFilter = this.grid.filterService ? this.grid.filterService.getCombinedFilter().clone() : {};\r\n const currentQuery = _.result(currentQueryFilter, 'query');\r\n let deliveryStatusToQuery = ['Enum.DeliveryStatus\\'EditorialRejected\\'', 'Enum.DeliveryStatus\\'EditorialApprovedLimited\\''];\r\n const daterange = state.get('$daterange');\r\n let queryToUse = {};\r\n\r\n if (currentQuery && !_.isEmpty(currentQuery)) {\r\n const currentDeliveryStatusQueryValue = _.chain(currentQuery)\r\n .result('DeliveryStatus')\r\n .result('$in')\r\n .value();\r\n\r\n if (!_.isEmpty(currentDeliveryStatusQueryValue)) {\r\n // to keep current filter, then in delivery status\r\n // we only need to get the ones that both in deliveryStatusToQuery, and current ones\r\n deliveryStatusToQuery = _.intersection(deliveryStatusToQuery, currentDeliveryStatusQueryValue);\r\n\r\n // if there are no intersection (means user want entity in delivery status without those two)\r\n // while we need entity in those two, it's empty result\r\n if (_.isEmpty(deliveryStatusToQuery)) {\r\n return Promise.resolve([]);\r\n }\r\n }\r\n\r\n _.extendOwn(queryToUse, currentQuery);\r\n }\r\n queryToUse.DeliveryStatus = {\r\n $in: deliveryStatusToQuery,\r\n };\r\n\r\n currentQueryFilter.query = queryToUse;\r\n\r\n const jsdataEntity = this.controller.toLowerCase() === 'ads' ? jsdata.Ad : jsdata.Keyword;\r\n\r\n return jsdataEntity.findAll({\r\n where: currentQueryFilter.odataV4(), // provide a translated string here\r\n query: {\r\n $top: 5000,\r\n $expand: 'AdGroup($select=Id)',\r\n startdate: formatDate(daterange.start),\r\n enddate: formatDate(daterange.end),\r\n },\r\n })\r\n .finally(withUiBlock())\r\n .then((items) => {\r\n return _.map(items || [], (item) => {\r\n return {\r\n EntityId: item.Id,\r\n ParentId: item.AdGroup.Id,\r\n };\r\n });\r\n });\r\n }\r\n\r\n fetchIdsForCrossPageSelectionForEditorialGrid(adGroupLevelType) {\r\n const daterange = state.get('$daterange');\r\n const { cid, aid, campaignId, adId, adGroupId } = this.scope && this.scope.values;\r\n // eslint-disable-next-line no-useless-escape\r\n const queryString = `(${adGroupLevelType ? 'Asset/' : ''}EditorialStatus eq Enum.EditorialStatus\\'Rejected\\' or ${adGroupLevelType ? 'Asset/' : ''}EditorialStatus eq Enum.EditorialStatus\\'ApprovedLimited\\')`;\r\n\r\n const edmCommon = edm.Customers.$withKey(cid).Accounts.$withKey(aid).Campaigns.$withKey(campaignId).AdGroups.$withKey(adGroupId);\r\n const edmEntity = adGroupLevelType ? edmCommon.AssetsWithBIData['Default.GridData'] : edmCommon.Ads.$withKey(adId)['Default.GetAssetLinks'];\r\n\r\n return edmEntity.$makeCall({\r\n query: {\r\n top: 5000,\r\n filter: { where: queryString },\r\n },\r\n payload: {\r\n gridDataParameters: {\r\n DateRange: {\r\n StartDate: dateUtil.format(daterange.start, 'yyyy-MM-dd'),\r\n EndDate: dateUtil.format(daterange.end, 'yyyy-MM-dd'),\r\n },\r\n },\r\n },\r\n })\r\n .toPromise()\r\n .finally(withUiBlock())\r\n .then((items) => {\r\n return _.map(items.value || [], (item) => {\r\n return {\r\n EntityId: item.Asset.Id,\r\n EntityType: item.Asset.AssetType,\r\n };\r\n });\r\n });\r\n }\r\n\r\n render() {\r\n this.$el.html(template({ i18n }));\r\n this.hide(false);\r\n $(window).scrollTop(this.$('.editor').scrollTop());\r\n\r\n if (this.controller === 'Asset') {\r\n this.fetchIdsForCrossPageSelectionForEditorialGrid(this.adGroupLevelType).then((Entities) => {\r\n return this.getAppealRejections({ ids: Entities });\r\n });\r\n return this;\r\n }\r\n\r\n const selectedRowIds = gridHelper.getSelectedRowIds(this.grid);\r\n\r\n // adgroup level appeal in menu only exists under ad group level ads/keyword grid\r\n if (this.adGroupLevelType) {\r\n const daterange = state.get('$daterange');\r\n\r\n // from popup, there should be only one row selected\r\n const rowId = _.first(selectedRowIds);\r\n\r\n jsdata[this.adGroupLevelType].findAll({\r\n where: {\r\n DeliveryStatus: {\r\n $in: ['Enum.DeliveryStatus\\'EditorialRejected\\'', 'Enum.DeliveryStatus\\'EditorialApprovedLimited\\''],\r\n },\r\n },\r\n limit: MaxEntityInOneAdGroup,\r\n query: {\r\n startdate: formatDate(daterange.start),\r\n enddate: formatDate(daterange.end),\r\n },\r\n entitySet: this.getEntitySet(rowId).toJSON(),\r\n })\r\n .finally(withUiBlock())\r\n .then(_.partial(_.pluck, _, 'Id'))\r\n .then((ids) => {\r\n return this.getAppealRejections({ids, adgroupId: this.getAdGroupId(rowId)});\r\n });\r\n } else if (this.grid.gridView && gridHelper.allPageSelected(this.grid)) {\r\n this.fetchIdsForCrossPageSelectionForNewGrid()\r\n .then((adgroupEntityIds) => {\r\n return this.getAppealRejections({ adgroupEntityIds });\r\n });\r\n } else {\r\n const data = _.filter(selectedRowIds, (id) => {\r\n if ( this.requestExceptionFromPopup ) {\r\n return true;\r\n } else {\r\n return this.isAppealableStatus(id);\r\n }\r\n });\r\n\r\n this.getAppealRejections({ids: data});\r\n }\r\n\r\n return this;\r\n }\r\n\r\n getAppealRejections({\r\n ids,\r\n adgroupId,\r\n adgroupEntityIds = []}) {\r\n // no ids found which do need to request exception\r\n if ((!ids || ids.length === 0) &&\r\n (!adgroupEntityIds || (adgroupEntityIds.length === 0)) &&\r\n this.grid.gridView) {\r\n // eslint-disable-next-line no-alert\r\n window.alert(i18n.getString('RequestException_No_RelatedRowsSelected'));\r\n\r\n // new grid bulk edit will need sometime to set up, so that hide will be caught\r\n window.setTimeout(() => {\r\n this.hide();\r\n }, 5);\r\n return;\r\n }\r\n\r\n utilities.getAppealRejections(\r\n this.controller,\r\n 'GetBulkAppealRejections',\r\n ids,\r\n {\r\n adgroupEntityIds,\r\n grid: this.grid,\r\n adgroupId,\r\n success: this.onFetchBulkAppealRejections.bind(this),\r\n jsonError: () => {\r\n if (!this.inlineErrorView) {\r\n this.inlineErrorView = new InlineErrorView({ rowId: 'bulk', useKwCss: true }).render();\r\n this.$('.editor').append(this.inlineErrorView.$el);\r\n }\r\n\r\n this.inlineErrorView.removeCancel();\r\n\r\n this.$('.appeal').hide();\r\n this.$('.cancel').unbind('click').click(() => {\r\n this.hide();\r\n });\r\n this.$('form.bulk-appeal').show();\r\n $('#bulkCancelButton').focus();\r\n },\r\n permissions: this.permissions,\r\n scope: this.scope,\r\n },\r\n );\r\n }\r\n\r\n static getInlineBulkAppealUrl(controller, action) {\r\n return utilities.getInlineBulkAppealUrl(controller, action);\r\n }\r\n\r\n isAppealableStatus(rowId) {\r\n const colValue = gridHelper.getColumnValue(this.grid, rowId, 'DeliveryStatus');\r\n\r\n return utilities.isAppealableStatus(colValue);\r\n }\r\n\r\n getEntitySet(rowId) {\r\n return edmCampaign\r\n .currentAccount\r\n // we cannot get Ads by Account.AdGroups().Ads(), this is a OData Server bug\r\n .Campaigns\r\n .$withKey(Number(this.getCampaignId(rowId)))\r\n .AdGroups\r\n .$withKey(Number(this.getAdGroupId(rowId)))[`${this.adGroupLevelType}s`];\r\n }\r\n\r\n getCampaignId(rowId) {\r\n // Campaign & AdGroup level Keyword Grid has no column CampaignId\r\n if (this.grid.gridView) {\r\n const currentRow = this.grid.gridView.itemWithKey(rowId);\r\n\r\n return currentRow.Campaign && currentRow.Campaign.Id ? currentRow.Campaign.Id : state.get('campaign_id');\r\n }\r\n return gridHelper.getColumnValue(this.grid, rowId, 'CampaignId') || state.get('campaign_id');\r\n }\r\n\r\n getAdGroupId(rowId) {\r\n if (this.grid.gridView) {\r\n const currentRow = this.grid.gridView.itemWithKey(rowId);\r\n\r\n return currentRow.AdGroup ? currentRow.AdGroup.Id : state.get('adgroup_id');\r\n }\r\n // AdGroup level Keyword Grid has no column AdGroupId\r\n return gridHelper.getColumnValue(this.grid, rowId, 'AdGroupId') || state.get('adgroup_id');\r\n }\r\n\r\n hide(showToolbar = true) {\r\n if (this.editor) {\r\n this.editor.remove();\r\n this.editor = null;\r\n }\r\n\r\n this.reset();\r\n\r\n if (showToolbar) {\r\n if (this.grid.gridView) {\r\n this.trigger('hide');\r\n } else {\r\n legacy$('body').trigger('showToolbar');\r\n }\r\n }\r\n }\r\n\r\n hideForm() {\r\n this.$('form.bulk-appeal').hide();\r\n }\r\n\r\n reset() {\r\n this.hideForm();\r\n\r\n if (!this.isForVNext) {\r\n const legacy$Form = legacy$(this.$('form.bulk-appeal'));\r\n\r\n if (legacy$Form.length > 0) {\r\n legacy$Form.validate().resetForm();\r\n }\r\n }\r\n }\r\n\r\n disableButtons() {\r\n this.$('.appeal, .cancel').attr('disabled', 'disabled');\r\n }\r\n\r\n onAppeal = _.debounce((appealIds, adgroupId, Entities) => {\r\n let isValid;\r\n\r\n if (this.isForVNext) {\r\n isValid = this.editor && this.editor.viewModel.validate();\r\n } else {\r\n isValid = this.editor && legacy$(this.$('form.bulk-appeal')).valid();\r\n }\r\n\r\n if (isValid) {\r\n const activity = this.instrumentation && this.instrumentation.editorial && this.instrumentation.editorial.create().submitRequestException.create();\r\n\r\n if (activity && activity.trace) {\r\n activity.trace(`submit appeal: adgroupId: ${adgroupId}, appealIds: ${JSON.stringify(appealIds)}`);\r\n }\r\n\r\n const appealJson = this.editor.getAppealData();\r\n\r\n if (this.grid.gridView) {\r\n utilities.requestExceptionOdata(this.grid, this.controller, adgroupId, appealIds, appealJson, Entities, () => {\r\n this.onBulkCreateAppealSuccess({}, { grid: this.grid });\r\n }, (response) => {\r\n const errorMessages = _.pluck(getODataErrors(response.errors), 'message');\r\n\r\n if (!_.isEmpty(errorMessages)) {\r\n alertHelper.showAlert(errorMessages.join(';\\n'));\r\n }\r\n }, withUiBlock());\r\n } else {\r\n let params = utilities.ids2params(appealIds);\r\n\r\n if (appealJson) {\r\n params += `&EditorialAppeal.Appeal=${appealJson.Appeal}&EditorialAppeal.EntityType=${appealJson.EntityType}&EditorialAppeal.Justification=${appealJson.Justification}`;\r\n }\r\n\r\n this.grid.bulkAction(\r\n utilities.getInlineBulkAppealUrl(this.controller, this.submit),\r\n params,\r\n null,\r\n this.onBulkCreateAppealSuccess.bind(this),\r\n { grid: this.grid },\r\n );\r\n }\r\n }\r\n }, 500, true);\r\n\r\n onFetchBulkAppealRejections({ appealIds = [], appealData: [firstAppealData = {}], Entities = {}}, adgroupId) {\r\n if (firstAppealData.IsAppealable) {\r\n this.$('form.bulk-appeal').show();\r\n\r\n this.editor = new EditorView({\r\n appealData: firstAppealData,\r\n controlId: 'bulkAppeal',\r\n appealTitle: this.appealTitle,\r\n infoMsg: this.infoMsg,\r\n hideAppealCheckBox: true,\r\n el: this.$('.editor')[0],\r\n isForVNext: this.isForVNext,\r\n }).render();\r\n\r\n if (!this.isForVNext) {\r\n legacy$(this.$('form.bulk-appeal')).validate(this.editor.getValidateParams());\r\n }\r\n\r\n this.$('.cancel').unbind('click').click(() => {\r\n this.hide();\r\n });\r\n\r\n this.editor.toBulk(appealIds);\r\n\r\n if (_.isEmpty(appealIds)) {\r\n this.$('.appeal').removeClass('button-highlighted').hide();\r\n this.$('.cancel').addClass('button-highlighted');\r\n } else {\r\n this.$('.appeal').addClass('button-highlighted').show();\r\n this.$('.cancel').removeClass('button-highlighted');\r\n }\r\n\r\n this.$('.appeal').unbind('click').click(_.partial(this.onAppeal, appealIds, adgroupId, Entities));\r\n }\r\n }\r\n\r\n onBulkCreateAppealSuccess({ Errors }, { grid }) {\r\n if (!Errors) {\r\n this.hide();\r\n // update context to trigger force refresh\r\n\r\n const controller = this.controller.toLowerCase();\r\n\r\n if (controller === 'extension') {\r\n const { type } = this.scope || {};\r\n\r\n if (type === 'disclaimer') {\r\n dataContextManager.updateContext(['CampaignsGrid', 'AdGrid']);\r\n } else {\r\n dataContextManager.updateContext(['AccountAdExtensionsGrid', 'CampaignAdExtensionsGrid', 'AdGroupAdExtensionsGrid']);\r\n }\r\n } else if (controller === 'asset') {\r\n campaignCacheManager.invalidate('AssetLink');\r\n campaignCacheManager.invalidate('AssetWithBIData');\r\n } else {\r\n const contextToUpdate = controller === 'ads' ? ['AdGrid'] : ['KeywordGrid'];\r\n\r\n dataContextManager.updateContext(contextToUpdate);\r\n }\r\n\r\n if (grid && controller !== 'asset') {\r\n gridHelper.deselectAll(grid);\r\n }\r\n if (grid.gridView) {\r\n gridHelper.refresh(grid);\r\n }\r\n }\r\n }\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport { getODataErrors } from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport EditorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/editor';\r\nimport InlineErrorView from '@bingads-webui-campaign-legacy/editorial-appeal/view/inline-error';\r\nimport template from '@bingads-webui-campaign-legacy/editorial-appeal/template/bulk.pug';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport {processRejectReasonsFromOdata} from '../utilities';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/editorial-appeal');\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\n\r\nconst alertHelper = new AlertHelper({ i18nGlobal });\r\n\r\nexport default class SingleAppealView extends Backbone.View {\r\n initialize({\r\n id,\r\n parentId,\r\n grid,\r\n controller,\r\n submit,\r\n appealTitle,\r\n infoMsg,\r\n permissions,\r\n }) {\r\n this.id = id;\r\n this.parentId = parentId;\r\n this.grid = grid;\r\n this.controller = controller;\r\n this.submit = submit;\r\n this.appealTitle = appealTitle;\r\n this.infoMsg = infoMsg;\r\n\r\n this.editor = null;\r\n this.inlineErrorView = null;\r\n this.permissions = permissions;\r\n }\r\n\r\n render() {\r\n this.$el.html(template({ i18n }));\r\n this.hide(false);\r\n $(window).scrollTop(this.$('.editor').scrollTop());\r\n this.getAppealRejections();\r\n return this;\r\n }\r\n\r\n getAppealRejections() {\r\n const url = 'Advertiser/Customers()/Accounts()/Ads/Default.EditorialReasons';\r\n\r\n odata.post(url, {\r\n EntityIdsParentIds: [{ EntityId: this.id, ParentId: this.parentId }],\r\n }).then((data) => {\r\n if (data && !data.Errors) {\r\n const processedData = processRejectReasonsFromOdata(data, this.controller, this.permissions);\r\n\r\n this.onFetchBulkAppealRejections(processedData);\r\n } else {\r\n if (!this.inlineErrorView) {\r\n this.inlineErrorView = new InlineErrorView({ rowId: 'bulk', useKwCss: true }).render();\r\n this.$('.editor').append(this.inlineErrorView.$el);\r\n }\r\n\r\n this.inlineErrorView.removeCancel();\r\n\r\n this.$('.appeal').hide();\r\n this.$('.cancel').unbind('click').click(() => {\r\n this.hide();\r\n });\r\n this.$('form.bulk-appeal').show();\r\n $('#bulkCancelButton').focus();\r\n }\r\n })\r\n .catch(() => {\r\n if (!this.inlineErrorView) {\r\n this.inlineErrorView = new InlineErrorView({ rowId: 'bulk', useKwCss: true }).render();\r\n this.$('.editor').append(this.inlineErrorView.$el);\r\n }\r\n\r\n this.inlineErrorView.removeCancel();\r\n\r\n this.$('.appeal').hide();\r\n this.$('.cancel').unbind('click').click(() => {\r\n this.hide();\r\n });\r\n this.$('form.bulk-appeal').show();\r\n $('#bulkCancelButton').focus();\r\n });\r\n }\r\n\r\n hide(showToolbar = true) {\r\n if (this.editor) {\r\n this.editor.remove();\r\n this.editor = null;\r\n }\r\n\r\n this.$('form.bulk-appeal').hide();\r\n\r\n if (showToolbar) {\r\n this.grid.grid.toolbar.gridToolbarGroup.showAllToolbars();\r\n }\r\n }\r\n\r\n disableButtons() {\r\n this.$('.appeal, .cancel').attr('disabled', 'disabled');\r\n }\r\n\r\n onAppeal = _.debounce((appealIds) => {\r\n const isValid = this.editor && this.editor.viewModel.validate();\r\n\r\n if (isValid) {\r\n const appealJson = this.editor.getAppealData();\r\n const odataUrl = 'Advertiser/Customers()/Accounts()/Ads/Default.CreateAppeals';\r\n\r\n odata.post(odataUrl, {\r\n 'EntityIds': appealIds,\r\n JustificationText: appealJson.Justification,\r\n }).then(() => {\r\n this.hide();\r\n dataContextManager.updateContext(['AdGrid']);\r\n this.grid.grid.showAdStrength.refreshAdItem();\r\n this.grid.view.refresh(true);\r\n })\r\n .catch((response) => {\r\n const errorMessages = _.pluck(getODataErrors(response.errors), 'message');\r\n\r\n if (!_.isEmpty(errorMessages)) {\r\n alertHelper.showAlert(errorMessages.join(';\\n'));\r\n }\r\n });\r\n }\r\n });\r\n\r\n\r\n onFetchBulkAppealRejections({ appealIds = [], appealData: [firstAppealData = {}]}) {\r\n if (firstAppealData.IsAppealable) {\r\n this.$('form.bulk-appeal').show();\r\n\r\n this.editor = new EditorView({\r\n appealData: firstAppealData,\r\n controlId: 'bulkAppeal',\r\n appealTitle: this.appealTitle,\r\n infoMsg: this.infoMsg,\r\n hideAppealCheckBox: true,\r\n el: this.$('.editor')[0],\r\n isForVNext: true,\r\n }).render();\r\n\r\n this.$('.cancel').unbind('click').click(() => {\r\n this.hide();\r\n });\r\n\r\n this.editor.toBulk(appealIds);\r\n\r\n if (_.isEmpty(appealIds)) {\r\n this.$('.appeal').removeClass('button-highlighted').hide();\r\n this.$('.cancel').addClass('button-highlighted');\r\n } else {\r\n this.$('.appeal').addClass('button-highlighted').show();\r\n this.$('.cancel').removeClass('button-highlighted');\r\n }\r\n\r\n this.$('.appeal').unbind('click').click(_.partial(this.onAppeal, appealIds));\r\n }\r\n }\r\n\r\n\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport InlineAppealView from '@bingads-webui-campaign-legacy/editorial-appeal/view/inline';\r\nimport BulkAppealEditor from '@bingads-webui-campaign-legacy/editorial-appeal/view/bulk';\r\nimport SingleAppealView from '@bingads-webui-campaign-legacy/editorial-appeal/view/single';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nfunction menuIsDisabled(grid, menu) {\r\n return grid.gridView ?\r\n $(`#${menu}`).is(':disabled') :\r\n grid.getMenu(menu).is(':disabled');\r\n}\r\n\r\nfunction hideinlineEditors(ids, grid) {\r\n if (grid) {\r\n _.each(ids, (id) => {\r\n if (grid.getExpandedRowDetail(id).is(':visible')) {\r\n grid.expandRowDetail(id, null, true);\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default class AppealAggregator {\r\n constructor({\r\n grid,\r\n controller,\r\n submit,\r\n menuToFollow,\r\n permissions,\r\n requestExceptionFromPopup = false,\r\n instrumentation = null,\r\n disableAppealBtn = false,\r\n }) {\r\n this.grid = grid;\r\n this.controller = controller;\r\n this.submit = submit;\r\n this.menuToFollow = menuToFollow;\r\n this.requestExceptionFromPopup = requestExceptionFromPopup;\r\n\r\n this.inlineEditors = {};\r\n this.bulkEditor = null;\r\n this.permissions = permissions;\r\n this.instrumentation = instrumentation;\r\n this.disableAppealBtn = disableAppealBtn;\r\n }\r\n\r\n openInlineEditor(rowId, appealTitle) {\r\n hideinlineEditors(_.chain(this.inlineEditors).keys().without(rowId).value(), this.grid);\r\n\r\n if (this.bulkEditor) {\r\n this.bulkEditor.hideForm();\r\n }\r\n\r\n if (this.grid.hasExpandedRowDetail(rowId)) {\r\n this.grid.expandRowDetail(rowId, null, true, false);\r\n this.grid.cancelInlineUpdates();\r\n\r\n return;\r\n }\r\n\r\n const inlineEditor = new InlineAppealView({\r\n grid: this.grid,\r\n rowId,\r\n controller: this.controller,\r\n submit: this.submit,\r\n appealTitle,\r\n disableAppealBtn: menuIsDisabled(this.grid, this.menuToFollow),\r\n permissions: this.permissions,\r\n }).render();\r\n\r\n inlineEditor.on('success', () => {\r\n this.inlineEditors[rowId] = inlineEditor;\r\n });\r\n\r\n inlineEditor.on('cancel', () => {\r\n delete this.inlineEditors[rowId];\r\n });\r\n }\r\n\r\n openBulkEditor(appealTitle, el, adGroupLevelType, render = false, infoMsg, scope) {\r\n setClarityTag({ openBulkAppealEditor: 'true' });\r\n\r\n this.bulkEditor = new BulkAppealEditor({\r\n grid: this.grid,\r\n controller: this.controller,\r\n submit: this.submit,\r\n appealTitle,\r\n infoMsg,\r\n el,\r\n adGroupLevelType,\r\n isForVNext: true,\r\n requestExceptionFromPopup: this.requestExceptionFromPopup,\r\n permissions: this.permissions,\r\n instrumentation: this.instrumentation,\r\n scope,\r\n });\r\n\r\n if (render || !this.grid.gridView) {\r\n this.bulkEditor.render();\r\n }\r\n\r\n if (this.disableAppealBtn || menuIsDisabled(this.grid, this.menuToFollow)) {\r\n this.bulkEditor.disableButtons();\r\n }\r\n\r\n hideinlineEditors(_.keys(this.inlineEditors), this.grid);\r\n }\r\n\r\n openSingleEditor(id, parentId, appealTitle, infoMsg) {\r\n this.singleEditor = new SingleAppealView({\r\n id,\r\n parentId,\r\n grid: this.grid,\r\n controller: this.controller,\r\n submit: this.submit,\r\n appealTitle,\r\n infoMsg,\r\n permissions: this.permissions,\r\n });\r\n\r\n if ($(`#${this.menuToFollow}`).is(':disabled')) {\r\n this.singleEditor.disableButtons();\r\n }\r\n\r\n hideinlineEditors(_.keys(this.inlineEditors), this.grid);\r\n }\r\n\r\n resetBulkEditor() {\r\n if (this.bulkEditor) {\r\n this.bulkEditor.reset();\r\n }\r\n }\r\n\r\n removeBulkEditor() {\r\n if (this.bulkEditor) {\r\n this.bulkEditor.remove();\r\n this.bulkEditor = null;\r\n }\r\n }\r\n}\r\n\r\n","/* eslint-disable no-param-reassign */\r\n/* eslint-disable no-case-declarations */\r\nimport _ from 'underscore';\r\nimport legacy$ from 'jquery';\r\nimport { http } from '@bingads-webui/http-util';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport { getFwdLinkId } from '@bingads-webui-component-legacy/api-errors-campaign/map/editorialRejectionFwdLinkId';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport { getLocationString } from '@bingads-webui-campaign/delivery-status-popup-factory';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst i18nCommon = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/ads-tab/common');\r\n\r\nconst EditorialRejected = 70;\r\nconst EditorialApprovedLimited = 200;\r\nconst AppealableStatus = [EditorialRejected, EditorialApprovedLimited, 'EditorialRejected', 'EditorialApprovedLimited'];\r\n\r\nfunction getEditorialErrorMessage(reaonsCode, permissions) {\r\n let message = i18n.getString(`Error_Editorial_Raw_${reaonsCode}`) ||\r\n i18n.getString(`Editorial_RejectionReason_${reaonsCode}`);\r\n\r\n if (!message) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'getEditorialErrorMessageForEditorialAppeal',\r\n `Missed Editorial message mapping for code: ${reaonsCode}, use default`);\r\n message = i18n.getString('EditorialReasons_Default');\r\n }\r\n\r\n const fwLinkId = getFwdLinkId(reaonsCode);\r\n let fwlink = `http://go.microsoft.com/fwlink?LinkId=${fwLinkId}`;\r\n\r\n if (permissions && permissions.IsDomesticSimplifiedChineseEnabled) {\r\n fwlink = 'https://about.ads.microsoft.com/zh-cn/pilotpolicy.pdf';\r\n }\r\n\r\n return `${message}`;\r\n}\r\n\r\nexport function isAppealableStatus(status) {\r\n return _.contains(AppealableStatus, status);\r\n}\r\n\r\nexport function getInlineBulkAppealUrl(controller, action) {\r\n return queryify(`/Campaign/${controller}/${action}`, _.pick({\r\n cid: state.get('customer_id'),\r\n aid: state.get('account_id'),\r\n cmpid: state.get('campaign_id'),\r\n adgId: state.get('adgroup_id'),\r\n }, Boolean));\r\n}\r\n\r\n\r\nexport function ids2params(ids) {\r\n return _.map(ids, (id, index) => {\r\n return `ids[${index}]=${id}`;\r\n }).join('&');\r\n}\r\n\r\nconst getEntityTypeFromController = (controller) => {\r\n switch (controller) {\r\n case 'Ads':\r\n return 'Ad';\r\n case 'AssetGroup':\r\n return 'AssetGroup';\r\n case 'Extension':\r\n return 'Extension';\r\n case 'Keywords':\r\n default:\r\n return 'Keyword';\r\n }\r\n};\r\n\r\nexport const generateExtensionUrl = (url, adextension, scope) => {\r\n let type = scope.type;\r\n\r\n if (type === 'sitelink') {\r\n type = 'Sitelink2';\r\n } else if (type === 'businessinfo') {\r\n type = 'logo';\r\n }\r\n\r\n let args = _.extend({\r\n aid: scope.aid,\r\n cid: scope.cid,\r\n cmpid: scope.campaignId,\r\n type: type.replace('AdExtension', ''),\r\n adExtensionId: adextension && adextension.AdExtension && adextension.AdExtension.Id,\r\n campaignId: scope.campaignId || (adextension.Campaign && adextension.Campaign.Id),\r\n version: adextension && adextension.AdExtension && adextension.AdExtension.Version,\r\n });\r\n\r\n if ( type !== 'disclaimer') {\r\n args = _.extend(args, {\r\n adgid: scope.adGroupId,\r\n adGroupId: scope.adGroupId || (adextension.AdGroup && adextension.AdGroup.Id),\r\n });\r\n }\r\n\r\n return queryify(url, args);\r\n};\r\n\r\nexport function processRejectReasonsFromOdata(resultData, controller, permissions, Entities) {\r\n const appealIds = [];\r\n const rejectedReasons = [];\r\n const rejectedTerms = [];\r\n const resultValues = _.result(resultData, 'value') || resultData;\r\n\r\n // process each reason and generate reason string\r\n // as the user only need reasons, merge it here\r\n const reasonsAndPublisherCountriesMap = {};\r\n\r\n\r\n _.each(resultValues, ({EntityId, Reasons, IsAppealable}) => {\r\n if (IsAppealable) {\r\n appealIds.push(EntityId);\r\n\r\n _.each(Reasons, ({ReasonCode, Term, Location, LanguageToCountries, RejectionCountries}) => {\r\n const rejectedCountries = RejectionCountries || _.uniq(_.flatten(_.pluck(LanguageToCountries, 'PublisherCountries')));\r\n\r\n let reasonString = getEditorialErrorMessage(ReasonCode, permissions);\r\n // merge the reason & publishercountries\r\n\r\n if (reasonsAndPublisherCountriesMap[reasonString]) {\r\n reasonsAndPublisherCountriesMap[reasonString] =\r\n _.union(reasonsAndPublisherCountriesMap[reasonString], rejectedCountries);\r\n } else {\r\n reasonsAndPublisherCountriesMap[reasonString] = rejectedCountries;\r\n }\r\n\r\n let termString = Term;\r\n let locationStrings = typeof Location === 'string' ? Location : getLocationString({location: Location, commonI18n: i18nCommon});\r\n\r\n if (locationStrings) {\r\n termString = `${termString}(${i18n.getString('LblLocationString')}${locationStrings})`;\r\n }\r\n rejectedTerms.push(termString);\r\n });\r\n }\r\n });\r\n\r\n _.each(reasonsAndPublisherCountriesMap, (countries, reasonString) => {\r\n let rejectionReasonString = reasonString;\r\n const rejectedCountryStrings = _.map(countries, (country) => {\r\n return controller === 'Extension' ? country : i18n.getString(`PublisherCountry_${country}`);\r\n });\r\n\r\n if (!_.isEmpty(rejectedCountryStrings)) {\r\n rejectionReasonString = `${reasonString} (${rejectedCountryStrings.join(', ')})`;\r\n }\r\n rejectedReasons.push(rejectionReasonString);\r\n });\r\n\r\n const entityType = getEntityTypeFromController(controller);\r\n\r\n return {\r\n appealIds,\r\n appealData: [{\r\n Appeal: false,\r\n Justification: null,\r\n IsAppealable: true,\r\n RejectedReasons: rejectedReasons,\r\n RejectedTerms: rejectedTerms,\r\n EntityType: entityType,\r\n }],\r\n Entities,\r\n };\r\n}\r\n\r\nfunction getAppealRejectionsOdataNew(controller, _action, {\r\n adgroupEntityIds = [],\r\n ids,\r\n adgroupId,\r\n grid,\r\n success,\r\n jsonError,\r\n permissions,\r\n}) {\r\n const op = {};\r\n let Entities = {};\r\n\r\n if (controller === 'Asset') {\r\n _.each(ids, (id) => {\r\n Entities[id.EntityId] = id.EntityType;\r\n });\r\n op.data = {\r\n Entities: JSON.stringify(Entities),\r\n };\r\n } else if (adgroupEntityIds && !_.isEmpty(adgroupEntityIds)) {\r\n op.data = {\r\n 'EntityIdsParentIds': adgroupEntityIds,\r\n };\r\n } else if (!adgroupId) {\r\n op.data = {\r\n 'EntityIdsParentIds': _.map(ids, (id) => {\r\n const rowItem = grid.gridView.itemWithKey(id);\r\n const {Id: EntityId, AdGroup: adgroup } = rowItem;\r\n\r\n return {\r\n EntityId,\r\n ParentId: adgroup.Id,\r\n };\r\n }),\r\n };\r\n }\r\n\r\n const adgroupIdParameter = adgroupId ? `/AdGroups(${adgroupId})` : '';\r\n\r\n let odataUrl = '';\r\n\r\n switch (controller) {\r\n case 'Ads':\r\n odataUrl = `/Customers()/Accounts()${adgroupIdParameter}/Ads/Default.EditorialReasons`;\r\n break;\r\n\r\n case 'Keyword':\r\n odataUrl = `/Customers()/Accounts()${adgroupIdParameter}/Keywords/Default.EditorialReasons`;\r\n break;\r\n\r\n case 'Asset':\r\n odataUrl = '/Customers()/Accounts()/Assets/GetEditorialReasons';\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return odata.post(odataUrl, op)\r\n .then((data) => {\r\n if (data && !data.Errors) {\r\n const processedData = processRejectReasonsFromOdata(data, controller, permissions, Entities);\r\n\r\n success(processedData, adgroupId);\r\n } else {\r\n jsonError();\r\n }\r\n })\r\n .catch(() => {\r\n jsonError();\r\n });\r\n}\r\nfunction requestExtensionRejectReason({\r\n url,\r\n EntityId,\r\n controller,\r\n success,\r\n jsonError,\r\n permissions,\r\n}) {\r\n return http.post({\r\n url,\r\n data: { __RequestVerificationToken: legacy$('input[name=\"__RequestVerificationToken\"]').val()},\r\n contentType: 'application/x-www-form-urlencoded',\r\n }).then((data) => {\r\n if (data && !data.Errors) {\r\n const processedData = processRejectReasonsFromOdata({\r\n value: [{\r\n EntityId,\r\n Reasons: data.RejectionReasons,\r\n IsAppealable: data.IsAppealable,\r\n }],\r\n }, controller, permissions);\r\n\r\n success(processedData);\r\n } else {\r\n jsonError();\r\n }\r\n },\r\n ).catch(() => {\r\n jsonError();\r\n });\r\n}\r\n\r\nfunction getExtensionAppealRejections({\r\n ids,\r\n controller,\r\n grid,\r\n success,\r\n jsonError,\r\n permissions,\r\n scope,\r\n}) {\r\n let url = '/campaign/AdExtensions.m/GetRejectionReasonData';\r\n\r\n if (scope.type === 'disclaimer') {\r\n const disclaimerRepos = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n afterChangeComitted: _.noop,\r\n });\r\n let campaignId = ids[0];\r\n\r\n if (grid && grid.config && grid.config.name === 'summary_tab_ad') {\r\n const rowItem = grid.gridView.itemWithKey(ids[0]);\r\n\r\n campaignId = rowItem.Campaign.Id;\r\n }\r\n\r\n return disclaimerRepos.association.findAll({\r\n where: {\r\n campaignId,\r\n },\r\n }).then((adextension) => {\r\n url = generateExtensionUrl(url, {AdExtension: adextension && adextension[0], Campaign: {Id: campaignId}}, scope);\r\n return requestExtensionRejectReason({\r\n url,\r\n EntityId: adextension && adextension[0] && adextension[0].Id,\r\n controller,\r\n success,\r\n jsonError,\r\n permissions,\r\n });\r\n });\r\n }\r\n\r\n const adextension = grid.gridView.itemWithKey(ids[0]);\r\n\r\n url = generateExtensionUrl(url, adextension, scope);\r\n return requestExtensionRejectReason({\r\n url,\r\n EntityId: adextension && adextension.AdExtension && adextension.AdExtension.Id,\r\n controller,\r\n success,\r\n jsonError,\r\n permissions,\r\n });\r\n}\r\n\r\n\r\nexport function getAppealRejections(controller, action, ids, {\r\n grid,\r\n adgroupEntityIds,\r\n adgroupId,\r\n rowId,\r\n success,\r\n jsonError,\r\n permissions,\r\n scope,\r\n error = _.noop,\r\n}) {\r\n if (grid && grid.gridView) {\r\n if (controller === 'Extension') {\r\n return getExtensionAppealRejections({\r\n ids,\r\n controller,\r\n success,\r\n grid,\r\n permissions,\r\n jsonError,\r\n error,\r\n scope});\r\n } else {\r\n return getAppealRejectionsOdataNew(controller, action, {\r\n ids,\r\n adgroupEntityIds,\r\n success,\r\n grid,\r\n adgroupId,\r\n rowId,\r\n permissions,\r\n jsonError});\r\n }\r\n } else {\r\n return legacy$.advertiser.ajaxPost({\r\n url: getInlineBulkAppealUrl(controller, action),\r\n data: ids2params(ids),\r\n onSuccess: (data) => {\r\n if (data && !data.Errors) {\r\n success(data);\r\n }\r\n },\r\n onError: error,\r\n onJsonError: jsonError,\r\n });\r\n }\r\n}\r\n\r\nexport function requestExceptionOdata(grid,\r\n controller,\r\n scopeId,\r\n appealIds,\r\n appealData,\r\n Entities,\r\n successCallBack,\r\n exceptionCalLBack,\r\n finallyCallBack,\r\n) {\r\n if (grid.gridView) {\r\n const adgroupId = state.get('adgroup_id') || scopeId;\r\n let op = {\r\n data: {\r\n 'EntityIds': scopeId ? null : appealIds,\r\n JustificationText: appealData.Justification,\r\n },\r\n };\r\n\r\n if (controller === 'Asset') {\r\n op.data = {\r\n Entities: JSON.stringify(Entities),\r\n JustificationText: appealData.Justification,\r\n };\r\n }\r\n\r\n let odataUrl = adgroupId ?\r\n `/Customers()/Accounts()/AdGroups(${adgroupId})/Ads/Default.CreateAppeals` :\r\n '/Customers()/Accounts()/Ads/Default.CreateAppeals';\r\n\r\n switch (controller) {\r\n case 'Keyword':\r\n odataUrl = adgroupId ?\r\n `/Customers()/Accounts()/AdGroups(${adgroupId})/Keywords/Default.CreateAppeals` :\r\n '/Customers()/Accounts()/Keywords/Default.CreateAppeals';\r\n break;\r\n case 'Extension':\r\n odataUrl = '/Customers()/Accounts()/AdExtensions/Default.CreateAppeals';\r\n break;\r\n case 'Asset':\r\n odataUrl = '/Customers()/Accounts()/Assets/CreateAppeals';\r\n break;\r\n\r\n default:\r\n case 'Ads':\r\n break;\r\n }\r\n\r\n odata.post(odataUrl, op)\r\n .then(() => {\r\n successCallBack();\r\n })\r\n .catch((response) => {\r\n exceptionCalLBack(response);\r\n })\r\n .finally(() => {\r\n if (finallyCallBack) {\r\n finallyCallBack();\r\n }\r\n });\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport koSchema from '@bingads-webui-component-legacy/ko-schema/index';\r\n\r\nexport default class AppealEditorViewModel {\r\n constructor({\r\n i18n,\r\n isForVNext = false,\r\n }) {\r\n if (isForVNext) {\r\n const schema = {\r\n properties: {\r\n justification: {\r\n type: 'string',\r\n required: true,\r\n maxLength: 1000,\r\n },\r\n },\r\n };\r\n\r\n koSchema.properties(this, schema, ['justification']);\r\n\r\n this.justification.validators.required.set({\r\n message: i18n.get('EditorialAppeal_JustificationRequired'),\r\n });\r\n } else {\r\n this.justification = ko.observable('');\r\n }\r\n\r\n this.appealed = ko.observable(true);\r\n this.appealedVisible = ko.observable(true);\r\n this.justificationPanelVisible = ko.observable(true);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport $ from 'jquery';\r\nimport ViewModel from '@bingads-webui-campaign-legacy/editorial-appeal/viewmodel/editor';\r\nimport template from '@bingads-webui-campaign-legacy/editorial-appeal/template/editor.pug';\r\nimport reasonsTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/reasons.pug';\r\nimport inlineFormTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/inline-form.pug';\r\nimport notAppealableTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/not-appealable.pug';\r\nimport cancelButtonTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/cancel-button.pug';\r\nimport buttonPanelTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/button-panel.pug';\r\n\r\nconst legacy$ = $;\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/editorial-appeal');\r\n\r\nfunction removeDotAtTail(str) {\r\n if (_.last(str) === '.') {\r\n return _.initial(str).join('');\r\n }\r\n\r\n return str;\r\n}\r\n\r\nexport default class AppealView extends Backbone.View {\r\n initialize({\r\n controlId = 'control',\r\n appealData: {\r\n EntityType = 'entity',\r\n RejectedReasons = [],\r\n } = {},\r\n hideAppealCheckBox = false,\r\n appealTitle = i18n.get('EditorialAppeal_AppealTitle'),\r\n infoMsg,\r\n callback = null,\r\n appealIds,\r\n containerSelector,\r\n isForVNext = false,\r\n withRealTimeUpdates = false,\r\n }) {\r\n this.hideAppealCheckBox = hideAppealCheckBox;\r\n this.controlId = controlId;\r\n this.entityType = removeDotAtTail(EntityType);\r\n this.appealTitle = appealTitle;\r\n this.infoMsg = infoMsg;\r\n this.reasons = RejectedReasons;\r\n this.callback = callback;\r\n this.appealIds = appealIds;\r\n this.containerSelector = containerSelector;\r\n this.isForVNext = isForVNext;\r\n this.withRealTimeUpdates = withRealTimeUpdates;\r\n\r\n this._elementId = `${controlId}_${this.entityType}`;\r\n\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n isForVNext: this.isForVNext,\r\n });\r\n\r\n if (this.withRealTimeUpdates) {\r\n this.subscribeForRealTimeUpdates('justification');\r\n this.subscribeForRealTimeUpdates('appealed');\r\n }\r\n }\r\n\r\n subscribeForRealTimeUpdates(source) {\r\n const observable = this.viewModel[source];\r\n\r\n observable.subscribe((newValue) => {\r\n this.triggerChangeEvent(source, newValue);\r\n }, undefined, 'change');\r\n }\r\n\r\n triggerChangeEvent(/* source, newValue */) {\r\n if (this.withRealTimeUpdates) {\r\n this.trigger('change', this.getAppealData(), this.validate());\r\n }\r\n }\r\n\r\n validate() {\r\n return this.viewModel.validate();\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n controlId: this._elementId,\r\n i18n,\r\n isForVNext: this.isForVNext,\r\n infoMsg: this.infoMsg,\r\n }));\r\n\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this._create();\r\n this._init();\r\n\r\n return this;\r\n }\r\n\r\n getAppealParams() {\r\n const userAppealed = this.viewModel.appealed();\r\n\r\n const params = {\r\n 'EditorialAppeal.Appeal': userAppealed.toString(),\r\n 'EditorialAppeal.EntityType': this.entityType,\r\n };\r\n\r\n if (userAppealed) {\r\n params['EditorialAppeal.Justification'] = this.viewModel.justification();\r\n }\r\n\r\n return params;\r\n }\r\n\r\n getAppealData() {\r\n const userAppealed = this.viewModel.appealed();\r\n\r\n if (userAppealed) {\r\n const appealModel = {\r\n Prefix: 'EditorialAppeal',\r\n Appeal: userAppealed.toString(),\r\n EntityType: this.entityType,\r\n Justification: this.viewModel.justification(),\r\n };\r\n\r\n return appealModel;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getValidateParams() {\r\n // TODO: [zhbliu] this is DOM id/name\r\n const textAreaId = this.getAppealJustificationName();\r\n\r\n return {\r\n rules: {\r\n [textAreaId]: { required: true },\r\n },\r\n messages: {\r\n [textAreaId]: { required: i18n.get('EditorialAppeal_JustificationRequired') },\r\n },\r\n errorElement: 'div',\r\n errorPlacement(error, element) {\r\n element.parent().append(error);\r\n },\r\n };\r\n }\r\n\r\n getAppealIds() {\r\n return this.appealIds;\r\n }\r\n\r\n toInline(appealIds, rowId, disableAppealBtn, { appeal, cancel }) {\r\n if (_.isEmpty(appealIds)) {\r\n this.$('.details').after(notAppealableTemplate({ i18n }));\r\n this.$('.details').parent().append(cancelButtonTemplate({ rowId, i18n }));\r\n\r\n this.viewModel.justificationPanelVisible(false);\r\n this.$('.details .non-appeal-msg-panel').show();\r\n this.$(`.appeal[data-rowid=${rowId}]`).hide();\r\n } else {\r\n this.$('.details').parent().append(buttonPanelTemplate({ rowId, i18n }));\r\n }\r\n\r\n this.$('.root').wrap(inlineFormTemplate({ rowId }));\r\n\r\n legacy$(this.$(`form.inline[data-rowid=${rowId}]`)).validate(this.getValidateParams());\r\n\r\n this.$(`.cancel[data-rowid=${rowId}]`).click(cancel);\r\n\r\n if (disableAppealBtn) {\r\n this.$(`.appeal[data-rowid=${rowId}]`).attr('disabled', 'disabled');\r\n } else {\r\n this.$(`.appeal[data-rowid=${rowId}]`).click(appeal);\r\n }\r\n\r\n }\r\n\r\n toBulk(appealIds) {\r\n const $noAppealMessagePanel = this.$('.details .non-appeal-msg-panel');\r\n const emptyLength = 0;\r\n\r\n if (_.isEmpty(appealIds)) {\r\n if ($noAppealMessagePanel.length === emptyLength) {\r\n this.$('.details').after(notAppealableTemplate({ i18n }));\r\n }\r\n\r\n this.viewModel.justificationPanelVisible(false);\r\n $noAppealMessagePanel.show();\r\n } else {\r\n this.viewModel.justificationPanelVisible(true);\r\n $noAppealMessagePanel.hide();\r\n }\r\n }\r\n\r\n getAppealJustificationName() {\r\n return this.$('.justification').attr('name');\r\n }\r\n\r\n _create() {\r\n if (this.callback) {\r\n this.callback(this.$el);\r\n this.$('.details').addClass('appeal-kw-details').parent();\r\n } else {\r\n $(this.containerSelector).append(this.$el);\r\n if (!this.isForVNext) {\r\n legacy$(this.$('.justification').closest('form')).validate().settings.messages[this.$('.justification').attr('name')] = {\r\n required: i18n.get('EditorialAppeal_JustificationRequired'),\r\n };\r\n }\r\n }\r\n }\r\n\r\n _init() {\r\n if (this.appealTitle) {\r\n this.$('.title').text(this.appealTitle);\r\n }\r\n\r\n if (_.isArray(this.reasons)) {\r\n const data = {\r\n reasons: _.uniq(this.reasons),\r\n };\r\n\r\n this.$('.reasons').html(reasonsTemplate(data));\r\n }\r\n\r\n if (!this.isForVNext) {\r\n legacy$(this.$('.justification')).counter(i18n.get('Ad_CharacterRemaning'), null, i18n.get('Counter_CharacterExceeded'));\r\n }\r\n\r\n this.$('.root').show();\r\n this.viewModel.justification('');\r\n\r\n if (this.hideAppealCheckBox) {\r\n this.viewModel.appealedVisible(false);\r\n this.viewModel.appealed(true);\r\n } else {\r\n this.viewModel.appealedVisible(true);\r\n this.viewModel.appealed(false);\r\n }\r\n\r\n if (this.controlId === 'adAppeal') {\r\n this.$('.ad-info').show();\r\n } else {\r\n this.$('.ad-info').hide();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport inlineErrorTemplate from '@bingads-webui-campaign-legacy/editorial-appeal/template/inline-error.pug';\r\n\r\nconst i18n = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/editorial-appeal');\r\n\r\nexport default class InlineErrorView extends Backbone.View {\r\n get events() {\r\n return {\r\n '.button': this.onCancel,\r\n };\r\n }\r\n\r\n initialize({\r\n rowId,\r\n callback = _.noop,\r\n useKwCss = false,\r\n }) {\r\n this.rowId = rowId;\r\n this.callback = callback;\r\n this.useKwCss = useKwCss;\r\n }\r\n\r\n render() {\r\n this.$el.html(inlineErrorTemplate({ rowId: this.rowId, useKwCss: this.useKwCss, i18n }));\r\n\r\n return this;\r\n }\r\n\r\n onCancel() {\r\n this.callback(this.rowId);\r\n }\r\n\r\n removeCancel() {\r\n this.$('.button').remove();\r\n }\r\n}\r\n","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (editMode, i18n, i18nGlobal, isDisplayPlusDisplayAd, isMultiAdFormatDisplayAd, isMultiAdFormatVideoAd, isSTADisabled, isXandrVideoAd, permissions, showInline, showSaveAndCreateAnother) {\n\n\n\npug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"fwLink\"] = pug_interp = function(linkId, displayText, ariaLabelContext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", 'https://go.microsoft.com/fwlink/?linkid=' + linkId, true, true)+\" target=\\\"_blank\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"fwLink\"] = pug_interp = function(linkId, displayText, ariaLabelContext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", 'https://go.microsoft.com/fwlink/?linkid=' + linkId, true, true)+\" target=\\\"_blank\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"migrationWarning\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-12 form-group\\\" data-bind=\\\"visible: showMigrationAlertForEXTA() || showMigrationAlertForSTA() || showSTAEndWarning()\\\"\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showMigrationAlertForEXTA()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isSTADisabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"switchBackToSTA form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ExpandedTextAd_Migration_SwitchBackToSTA')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration_EndSupport') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showMigrationAlertForSTA()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration_Consider') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"switchBackToEXTA form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ExpandedTextAd_Migration_SwitchBackToEXTA')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54538\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showSTAEndWarning()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('STA_End_Warning') + ' ')) ? \"\" : pug_interp)) + \"\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"form-horizontal\",showInline ? '' : 'adEditor-container'], [false,true]), false, true)) + \"\\u003E\\u003Cdiv data-bind=\\\"attr:{class: containerClass}\\\"\\u003E\";\nif (!showInline) {\npug_html = pug_html + \"\\u003Ch5\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Create_Description')) ? \"\" : pug_interp)) + \"\\u003Cspan\\u003E \";\npug_mixins[\"fwLink\"]('832330', i18n.get('Ad_Create_Description_Tip'), i18n.get('Ad_Create_Description'));\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh5\\u003E\";\n}\npug_mixins[\"migrationWarning\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\" data-bind=\\\"visible: showAdTypeWithErrors()\\\"\\u003E\";\nif (!showInline) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: showAdType()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"adTypeLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Type')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_AdType', i18n.get('Ad_Type'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003C!--ko if: adTypeOptions().length--\\u003E\\u003Cselect class=\\\"ad-types form-control\\\" data-bind=\\\"options: adTypeOptions, optionsText: "Name", optionsValue: "Value", value: Type, disable: disableAdType\\\" aria-labelledby=\\\"adTypeLabel\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!--ko if: Type() === 'ResponsiveSearch'--\\u003E\";\nif (permissions.IsRSAAsDefaultType) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('RSA_As_Default_Type') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"app54667\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", (i18n.getString('Click to learn more about {{item}}')).replace('{{item}}', i18n.getString('RSA_As_Default_Type')), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-format-option-container\\\" data-bind=\\\"visible: showAdFormatOptions()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko foreach: availableAdTypes--\\u003E\\u003Cdiv data-bind=\\\"attr: { "data-type": $data }, visible: $root.Type() === $data\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errors.isAppealable()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-offset-2 col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"editorial-appeal-panel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar infoStyle = isXandrVideoAd ? 'margin-bottom: 16px' : '';\npug_html = pug_html + (\"\\u003Cdiv\" + (\" class=\\\"alert alert-info form-group\\\"\"+pug.attr(\"style\", pug.style(infoStyle), true, true)) + \"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = ((editMode ? i18n.get('Ads_Edited_Latency') : i18n.get('Ads_Created_Latency')) + ' ')) ? \"\" : pug_interp)));\npug_mixins[\"fwLink\"]('832333', i18n.get('LearnMoreLinkText'), editMode ? i18n.get('Ads_Edited_Latency') : i18n.get('Ads_Created_Latency'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!showInline && !isDisplayPlusDisplayAd && !isXandrVideoAd && !isMultiAdFormatDisplayAd && !isMultiAdFormatVideoAd) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"save-bar form-group appEditor-save-container\\\"\\u003E\\u003Cinput\" + (\" class=\\\"save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Save'), true, true)+\" data-bind=\\\"enable: hasWebsiteImageOptedInObservable\\\"\") + \"\\u003E\";\nif (showSaveAndCreateAnother) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"save-create-another btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Ad_SaveCreate'), true, true)+\" data-bind=\\\"enable: hasWebsiteImageOptedInObservable\\\"\") + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"editMode\" in locals_for_with?locals_for_with.editMode:typeof editMode!==\"undefined\"?editMode:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nGlobal\" in locals_for_with?locals_for_with.i18nGlobal:typeof i18nGlobal!==\"undefined\"?i18nGlobal:undefined,\"isDisplayPlusDisplayAd\" in locals_for_with?locals_for_with.isDisplayPlusDisplayAd:typeof isDisplayPlusDisplayAd!==\"undefined\"?isDisplayPlusDisplayAd:undefined,\"isMultiAdFormatDisplayAd\" in locals_for_with?locals_for_with.isMultiAdFormatDisplayAd:typeof isMultiAdFormatDisplayAd!==\"undefined\"?isMultiAdFormatDisplayAd:undefined,\"isMultiAdFormatVideoAd\" in locals_for_with?locals_for_with.isMultiAdFormatVideoAd:typeof isMultiAdFormatVideoAd!==\"undefined\"?isMultiAdFormatVideoAd:undefined,\"isSTADisabled\" in locals_for_with?locals_for_with.isSTADisabled:typeof isSTADisabled!==\"undefined\"?isSTADisabled:undefined,\"isXandrVideoAd\" in locals_for_with?locals_for_with.isXandrVideoAd:typeof isXandrVideoAd!==\"undefined\"?isXandrVideoAd:undefined,\"permissions\" in locals_for_with?locals_for_with.permissions:typeof permissions!==\"undefined\"?permissions:undefined,\"showInline\" in locals_for_with?locals_for_with.showInline:typeof showInline!==\"undefined\"?showInline:undefined,\"showSaveAndCreateAnother\" in locals_for_with?locals_for_with.showSaveAndCreateAnother:typeof showSaveAndCreateAnother!==\"undefined\"?showSaveAndCreateAnother:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (showAdGroupInfo) {pug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\" data-bind=\\\"visible: alertMessage\\\"\\u003E\\u003Cdiv class=\\\"alert alert-danger col-sm-12\\\" data-bind=\\\"text: alertMessage, attr: {id: "AdGroupAlert-" + adGroup().Id, "aria-hidden": !alertMessage}\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\" data-bind=\\\"visible: duplicateAlertMessage\\\"\\u003E\\u003Cdiv class=\\\"alert alert-danger col-sm-12\\\" data-bind=\\\"text: duplicateAlertMessage, attr: {id: "AdGroupDuplicateAlert-" + adGroup().Id, "aria-hidden": !duplicateAlertMessage}\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\" data-bind=\\\"attr: {"aria-describedby": "AdGroupBriefing-" + adGroup().Id + " AdGroupAlert-" + adGroup().Id + " AdGroupDuplicateAlert-" + adGroup().Id}\\\"\\u003E\";\nif (showAdGroupInfo) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-display col-sm-2\\\" data-bind=\\\"attr: {id: "AdGroupBriefing-" + adGroup().Id}\\\"\\u003E\\u003Cdiv class=\\\"adgroup-display-title\\\"\\u003E\\u003Cspan data-bind=\\\"text: adGroup().Name\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- ko foreach: firstTwoKeywords--\\u003E\\u003Cdiv class=\\\"adgroup-display-keyword\\\"\\u003E\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"ads-creative col-sm-10\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"showAdGroupInfo\" in locals_for_with?locals_for_with.showAdGroupInfo:typeof showAdGroupInfo!==\"undefined\"?showAdGroupInfo:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"ad-editor-list-group\\\"\"+pug.attr(\"aria-label\", i18n.get('CrudAd_AdGroupAdsEditor_AdEditorListGroup_Label'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row col-sm-offset-9 col-sm-3\\\"\\u003E\\u003Cdiv class=\\\"pager-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adGroupId, data, i18n, isForVNext) {pug_mixins[\"toolbar\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"adEditor-toolbar\\\"\\u003E\\u003Cdiv class=\\\"btn-group\\\"\\u003E# if (data.hasMultiAdgroups) { #\\u003Cbutton class=\\\"btn btn-default dropdown-toggle a11y-k-listview-button\\\" data-toggle=\\\"dropdown\\\" tabindex=\\\"-1\\\" aria-haspopup=\\\"true\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Copy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cul class=\\\"dropdown-menu\\\" role=\\\"menu\\\"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default itemAction-copy\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Copy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fli\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default itemAction-copyToOthers\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Copy_To_OtherAdGroups')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"dropdown-submenu\\\" role=\\\"presentation\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default copy-to-some\\\" role=\\\"menuitem\\\" aria-haspopup=\\\"true\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Copy_To_Some')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"caret\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cul class=\\\"dropdown-menu copyToSome\\\" data-id=\\\"#:data.Id#\\\" role=\\\"menu\\\"\\u003E# for (var i = 0; i \\u003C data.adGroups.length; i++) { #\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"text-left a11y-k-listview-button\\\" onclick=\\\"event.stopPropagation();\\\" onmousedown=\\\"event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-adgroupid=\\\"#: data.adGroups[i].Id #\\\"\\u003E\\u003Cspan\\u003E   #= data.adGroups[i].Name #\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E# } #\\u003Cli class=\\\"divider\\\" role=\\\"presentation\\\"\\u003E\\u003C\\u002Fli\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default itemAction-copyToSome\\\" role=\\\"menuitem\\\" onmousedown=\\\"event.stopPropagation();\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Button_Apply')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E# } else { #\\u003Cbutton class=\\\"btn btn-default a11y-k-listview-button itemAction-copy\\\" role=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Copy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E# } #\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default a11y-k-listview-button itemAction-edit\\\" role=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Edit')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default a11y-k-listview-button itemAction-remove\\\" role=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Remove')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"textAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd a11y-k-listview-button\\\" target=\\\"_blank\\\" href=\\\"#: data.DestinationUrl #\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan\\u003E#: data.Title #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd a11y-k-listview-button\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan\\u003E#: data.DisplayUrl #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewtext truncated\\\"\\u003E\\u003Cspan\\u003E#: data.Text #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"appInstallAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd a11y-k-listview-button\\\" target=\\\"_blank\\\" href=\\\"#: data.FinalUrls[0] #\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan\\u003E#: data.Title #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd a11y-k-listview-button\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cspan\\u003E#: data.AppPlatform #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewtext truncated\\\"\\u003E\\u003Cspan\\u003E#: data.Text #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"expandedTextAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd a11y-k-listview-button\\\" target=\\\"_blank\\\" href=\\\"#: data.FinalUrls[0] #\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan\\u003E#: data.title #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd a11y-k-listview-button\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\"\\u003E\\u003Cspan\\u003E#: data.displayUrl #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewtext truncated\\\"\\u003E\\u003Cspan\\u003E#: data.text #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"responsiveAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"responsive-ad-preview-shared-template\\\"\\u003E\\u003Cimg src=\\\"#: data.ThumbnailForAdList #\\\" align=\\\"left\\\" alt=\\\"\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E#: data.Headline #\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E#: data.LongHeadline #\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E#: data.Text #\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E#: data.BusinessName #\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"responsiveSearchAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd a11y-k-listview-button\\\" target=\\\"_blank\\\" href=\\\"#: data.FinalUrls[0] #\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan\\u003E#: data.title #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd a11y-k-listview-button\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan\\u003E#: data.displayUrl #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewtext truncated\\\"\\u003E\\u003Cspan\\u003E#: data.text #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"dynamicSearchAdPreview\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cspan class=\\\"previewTitleAd a11y-k-listview-button\\\"\\u003E\" + (pug.escape(null == (pug_interp = '{' + i18n.get('Ad_DSA_Title') + '}') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd a11y-k-listview-button\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan\\u003E#: data.displayUrl #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewtext truncated\\\"\\u003E\\u003Cspan\\u003E#: data.text #\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"actionbox\"] = pug_interp = function(data, isForVNext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"# if (data.action === 'create') { #\\u003Cdiv class=\\\"create-ad #if (data.isFirst) {# adgroup-createBox-sm #} else {# adgroup-createBox-lg #}#\\\"\\u003E\\u003Ca class=\\\"create-ad-link\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"0\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (null == (pug_interp = i18n.get('Ad_Create')) ? \"\" : pug_interp) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E# } else if (data.action === 'dash') { #\";\nif (!isForVNext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"#if (data.isFirst) {# adgroup-dashedBox-sm #} else {# adgroup-dashedBox-lg #}#\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"# } #\";\n};\npug_html = pug_html + \"# if (data.action) { #\";\npug_mixins[\"actionbox\"](data, isForVNext, adGroupId);\npug_html = pug_html + \"# } else { #\\u003Cdiv class=\\\"adEditor-listitem dlbItem #if (data.isDuplicated || data.hasError) {# adEditor-error #} #\\\" data-id=\\\"#:data.Id#\\\" id=\\\"crud-ad-ad-preview-#:data.Id#\\\"\\u003E# if (data.Type == 'Text') { #\";\npug_mixins[\"textAdPreview\"](data);\npug_html = pug_html + \"# } else if (data.Type == 'ExpandedText') { #\";\npug_mixins[\"expandedTextAdPreview\"](data);\npug_html = pug_html + \"# } else if (data.Type == 'ResponsiveSearch') { #\";\npug_mixins[\"responsiveSearchAdPreview\"](data);\npug_html = pug_html + \"# } else if (data.Type == 'AppInstall') { #\";\npug_mixins[\"appInstallAdPreview\"](data);\npug_html = pug_html + \"# } else if (data.Type == 'DynamicSearch') { #\";\npug_mixins[\"dynamicSearchAdPreview\"](data);\npug_html = pug_html + \"# } else if (data.Type == 'Responsive') { #\";\npug_mixins[\"responsiveAdPreview\"](data);\npug_html = pug_html + \"# } #\";\npug_mixins[\"toolbar\"](data);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E# } #\";}.call(this,\"adGroupId\" in locals_for_with?locals_for_with.adGroupId:typeof adGroupId!==\"undefined\"?adGroupId:undefined,\"data\" in locals_for_with?locals_for_with.data:typeof data!==\"undefined\"?data:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cinput id=\\\"countdowndatepicker\\\"\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, syntax) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cspan class=\\\"countdownEditor-syntax\\\"\\u003E\" + (pug.escape(null == (pug_interp = syntax) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_Syntax', '', i18n.getString('CountdownEditor_Syntax_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003Chr\\u003E\\u003Cform class=\\\"form-horizontal form-grid\\\"\\u003E\\u003Cdiv class=\\\"flexible-grid-row-1 form-label control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_CountdownEnds_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_End', i18n.getString('CountdownEditor_CountdownEnds_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-1 form-date\\\" data-property=\\\"date\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-1 form-time\\\" data-property=\\\"time\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"flexible-grid-row-1 form-time-format countdownEditor-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_TimeFormat_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"form-validation-container flexible-grid-row-2 form-validation\\\" data-property=\\\"date\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-validation-container flexible-grid-row-3 form-validation\\\" data-property=\\\"time\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"flexible-grid-row-4 form-label control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_CountdownStarts_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_Start', i18n.getString('CountdownEditor_CountdownStarts_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-4 form-days\\\" data-property=\\\"days\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cspan class=\\\"flexible-grid-row-4 form-days-description countdownEditor-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_DaysBefore_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"form-validation-container flexible-grid-row-5 form-validation\\\" data-property=\\\"days\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"flexible-grid-row-6 form-label control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_TimeZone_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_TimeZone', i18n.getString('CountdownEditor_TimeZone_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-6 form-time-zone\\\" data-property=\\\"isGlobal\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"flexible-grid-row-7 form-label control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CountdownEditor_Language_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_Language', i18n.getString('CountdownEditor_Language_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-7 form-language\\\" data-property=\\\"language\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-validation-container flexible-grid-row-8 form-validation\\\" data-property=\\\"$overall\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-input-container flexible-grid-row-9 form-buttons\\\" data-property=\\\"$buttons\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fform\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"syntax\" in locals_for_with?locals_for_with.syntax:typeof syntax!==\"undefined\"?syntax:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (position) {pug_html = pug_html + \"\\u003Cul\" + (\" class=\\\"dropdown-menu\\\"\"+\" data-bind=\\\"foreach: items\\\" role=\\\"menu\\\"\"+pug.attr(\"style\", pug.style('display: block; left: ' + position.left + 'px; top: ' + position.top + 'px'), true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Ca role=\\\"menuitem\\\" data-bind=\\\"click: action, aria-label: description\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cdiv class=\\\"type-bold\\\" data-bind=\\\"text: name\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"type-normal\\\" data-bind=\\\"text: description\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";}.call(this,\"position\" in locals_for_with?locals_for_with.position:typeof position!==\"undefined\"?position:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isForVNext, tabItems) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"appInstallAdPreview\"] = pug_interp = function(tabItems, isForVNext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"ui-tabs preview-nav-pills\\\"\\u003E\\u003Cul class=\\\"ui-tabs-nav btn-group\\\"\\u003E\\u003Cli data-bind=\\\"css: previewTabSelected(tabItems.Mobile)\\\"\\u003E\\u003Ca\" + (\" class=\\\"selected btn preview-tab\\\"\"+pug.attr(\"data-target\", tabItems.Mobile, true, true)+\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_MobileView')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli data-bind=\\\"css: previewTabSelected(tabItems.Tablet)\\\"\\u003E\\u003Ca\" + (\" class=\\\"selected btn preview-tab\\\"\"+pug.attr(\"data-target\", tabItems.Tablet, true, true)+\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_TabletView')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"css: previewType() === tabItems.Mobile ? "app-install__mobile-frame" : "app-install__tablet-frame"\\\"\\u003E\\u003Cdiv class=\\\"app-install__preview-ad\\\"\\u003E\\u003Cdiv class=\\\"app-install__preview\\\"\\u003E\\u003Cdiv class=\\\"preview-app-icon\\\"\\u003E\\u003Cdiv class=\\\"preview-app-placeholder\\\" data-bind=\\\"visible:!appSelected() || manualApp()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cimg class=\\\"preview-app-image\\\" data-bind=\\\"visible: appSelected() && !manualApp(), attr: { src: MediaUrl, alt: "" }\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"preview-app-description\\\"\\u003E\\u003Ca class=\\\"preview-app-title\\\" data-bind=\\\"text: adTitlePreview, attr: { target:"_blank", href: previewUrl }\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"preview-app-details\\\" data-bind=\\\"text: adTextPreview\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"app-install__actions\\\"\\u003E\\u003Ca class=\\\"preview-app-url\\\" data-bind=\\\"text: appStorePreview\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"preview-app-actions\\\"\\u003E\\u003Ca data-bind=\\\"attr: { target: "_blank", href: previewUrl, tabindex: "-1" }\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" type=\\\"button\\\" data-bind=\\\"attr: { tabindex: appSelected() ? "0" : "-1" }\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AppInstall_PreviewButtonText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"if: previewType() === tabItems.Mobile\\\"\\u003E\\u003Cdiv class=\\\"app-install__mobile-frame\\\"\\u003E\\u003Cdiv class=\\\"app-install__preview-ad\\\"\\u003E\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd mainline app-preview-title\\\" data-bind=\\\"text: adTitlePreview, attr: { target:"_blank", href: previewUrl }\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Preview_Prefix')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"previewUrlAd mainline appInstallAdPreview\\\" data-bind=\\\"text: appStorePreview\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"app-install-mobile-preview\\\"\\u003E\\u003Ctable\\u003E\\u003Ctbody\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"preview-app-icon\\\"\\u003E\\u003Cdiv class=\\\"app-install__app-placeholder\\\" data-bind=\\\"visible:!appSelected() || manualApp()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cimg class=\\\"applookup-results-image\\\" data-bind=\\\"visible: appSelected() && !manualApp(), attr: { src: MediaUrl }\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"preview-app-details\\\"\\u003E\\u003Cdiv class=\\\"preview-wrap-long-text\\\" data-bind=\\\"text: adTextPreview\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"preview-app-actions\\\"\\u003E\\u003Ca data-bind=\\\"attr: { target:"_blank", href: previewUrl }\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" type=\\\"button\\\" disabled=\\\"disabled\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AppInstall_PreviewButtonText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"if: previewType() === tabItems.Tablet\\\"\\u003E\\u003Cdiv class=\\\"app-install__tablet-frame\\\"\\u003E\\u003Cdiv class=\\\"app-install__preview-ad\\\"\\u003E\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd mainline app-preview-title\\\" data-bind=\\\"text: adTitlePreview, attr: { href: previewUrl }\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Preview_Prefix')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"previewUrlAd mainline appInstallAdPreview\\\" data-bind=\\\"text: appStorePreview\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"app-install-tablet-preview\\\"\\u003E\\u003Ctable\\u003E\\u003Ctbody\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"preview-app-icon\\\"\\u003E\\u003Cdiv class=\\\"app-install__app-placeholder\\\" data-bind=\\\"visible:!appSelected() || manualApp()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cimg class=\\\"applookup-results-image\\\" data-bind=\\\"visible:appSelected() && !manualApp(), attr: { src: MediaUrl }\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"preview-app-details\\\"\\u003E\\u003Cdiv class=\\\"preview-wrap-long-text\\\" data-bind=\\\"text: adTextPreview\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"preview-app-actions\\\"\\u003E\\u003Ca data-bind=\\\"attr: { target:"_blank", href: previewUrl }\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" type=\\\"button\\\" disabled=\\\"disabled\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AppInstall_PreviewButtonText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"form-group app-lookup-control\\\" data-bind=\\\"visible: !appLookupDisabled()\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_MobileApp')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AppInstall_MobileApp', i18n.get('AppInstall_MobileApp'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dropdownContainer applookup-dropdown\\\" data-bind=\\\"css:appSelected() && !manualApp() ? "applookup-selected-popover" : "applookup-popover"\\\"\\u003E\\u003Cdiv class=\\\"dropDownSelect\\\" rel=\\\"popover\\\"\\u003E\\u003Cdiv class=\\\"form-control changeapp clickable\\\" data-bind=\\\"css: {"validation-error": !AppStoreId.isValid()}, visible:!appSelected() || manualApp(), attr: {"aria-label": appIdPlaceholderText}\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\\u003Cspan data-bind=\\\"text:appIdPlaceholderText, css:manualApp() ? "" : "lookup-placeholder"\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan data-bind=\\\"visible: !editMode()\\\"\\u003E\\u003Ca class=\\\"icon edit_icon change-app-edit\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ctable class=\\\"col-sm-8 appinfo-table\\\" data-bind=\\\"visible: appSelected() && !manualApp()\\\"\\u003E\\u003Ctbody\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"app-icon\\\"\\u003E\\u003Cimg class=\\\"applookup-results-image\\\" data-bind=\\\"attr: { src: MediaUrl }\\\" alt=\\\"\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"app-details\\\"\\u003E\\u003Cul role=\\\"presentation\\\"\\u003E\\u003Cli class=\\\"wrap-long-text\\\" data-bind=\\\"text: AltText\\\" role=\\\"presentation\\\"\\u003E\\u003C\\u002Fli\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Ca class=\\\"wrap-long-text appstoreselector\\\" data-bind=\\\"attr: {href: previewUrl, target:"_blank"}, text: AppStoreId\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cspan data-bind=\\\"visible: developerName()\\\"\\u003E - \\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"wrap-long-text\\\" data-bind=\\\"text: developerName\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"app-actions\\\"\\u003E\\u003Cspan class=\\\"edit-selectedapp\\\" data-bind=\\\"visible: !editMode()\\\"\\u003E\\u003Ca\" + (\" class=\\\"icon edit_icon block-app-icon changeapp clickable\\\"\"+\" href=\\\"javascript:void(0);\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.get('Reselect_Mobile_App'), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"koValidationError\"]('AppPlatform', 'LookupEnabledAppPlatformValidationError');\npug_mixins[\"koValidationError\"]('AppStoreId', 'LookupEnabledAppStoreIdValidationError');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: appLookupDisabled()\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_Platform')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cselect class=\\\"form-control\\\" name=\\\"Ad.AppInstallAd.AppPlatform\\\" data-bind=\\\"options: appPlatforms, optionsText: "Name", optionsValue: "Value", value: AppPlatform, disable: editMode\\\"\\u003E\\u003C\\u002Fselect\\u003E\";\npug_mixins[\"koValidationError\"]('AppPlatform', 'LookupDisabledAppPlatformValidationError');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: appLookupDisabled()\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\"\\u003E\\u003Clabel data-bind=\\\"text: appIdName\\\"\\u003E\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_AppExtensions_PackageName', '', i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput class=\\\"form-control\\\" name=\\\"Ad.AppInstallAd.AppStoreId\\\" data-bind=\\\"value: AppStoreId, disable: editMode\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('AppStoreId', 'LookupDisabledAppStoreIdValidationError');\npug_html = pug_html + (\"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\" id=\\\"label-app-install-ad-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_Title')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AppInstall_AdTitle', i18n.get('AppInstall_Title'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput class=\\\"form-control\\\" name=\\\"Ad.AppInstallAd.AdTitle\\\" data-bind=\\\"css: {"validation-error": !Title.isValid()}, value: Title, valueUpdate: "input"\\\" aria-describedby=\\\"Title_CharactersRemaining\\\" aria-labelledby=\\\"label-app-install-ad-title\\\"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Title');\npug_mixins[\"koValidationError\"]('Title');\npug_html = pug_html + (\"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\" id=\\\"label-app-install-ad-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_Text')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AppInstall_AdText', i18n.get('AppInstall_Text'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput class=\\\"form-control\\\" name=\\\"Ad.AppInstallAd.AdDescription\\\" data-bind=\\\"css: {"validation-error": !Text.isValid()}, value: Text, valueUpdate: "input"\\\" aria-describedby=\\\"Text_CharactersRemaining\\\" aria-labelledby=\\\"label-app-install-ad-description\\\"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Text');\npug_mixins[\"koValidationError\"]('Text');\npug_html = pug_html + (\"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group devicePreference-panel\\\"\\u003E\\u003Clabel class=\\\"control-label col-sm-4\\\" id=\\\"label-preference\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_DevicePreference')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AppInstall_DevicePref', i18n.get('AppInstall_DevicePreference'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" role=\\\"group\\\" aria-labelledby=\\\"label-preference\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput name=\\\"Ad.AppInstallAd.TabletExcluded\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: DevicePreference.isMobile, attr: { "aria-checked" : DevicePreference.isMobile() ? "true" : "false" }\\\" role=\\\"checkbox\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppInstall_ExcludeTablets')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"koValidationError\"]('DevicePreference');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"app-upgraded-url\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"stopBinding: true\\\"\\u003E\\u003Cdiv class=\\\"AppealTemplate\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"appInstallAdPreview\"](tabItems, isForVNext);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"tabItems\" in locals_for_with?locals_for_with.tabItems:typeof tabItems!==\"undefined\"?tabItems:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (fields, i18n, isMMA, showLightbulb) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\n\n\n\n\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"RSAProperty\"] = pug_interp = function(property, label, ariaLabel, placeholder, helpId, countModelName, index, showLightbulb, isMMA){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"form-group\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + countModelName + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\";\nif (index == 0) {\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 ad-rsa-filed-group\\\"\\u003E\";\nif (showLightbulb) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",property + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'style: { visibility: ' + property + 'IsAIGeneratedAsset() ? \"visible\" : \"hidden\" }', true, true)+pug.attr(\"aria-label\", i18n.get('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"name\", property, true, true)+pug.attr(\"placeholder\", i18n.get(placeholder), true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-label\", i18n.get(ariaLabel, { index: index + 1 }), true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining' + `_${isMMA ? 'MMA' : 'RSA'}`, true, true)) + \"\\u003E\";\nif (!isMMA) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group ad-rsa-pin-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"ad-field-position\",\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-positionLink'], [false,false,false,true]), false, true)+pug.attr(\"data-bind\", 'css: { visible: ' + property + 'Position() !== \"None\"}', true, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\"\"+pug.attr(\"aria-label\", i18n.get('Ad_PinToPosition'), true, true)+\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-pushpin\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (\" class=\\\"ad-pinned\\\"\"+pug.attr(\"data-bind\", 'text: positionFieldMap(' + property + 'Position())', true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu\",property + '-positionMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.positionMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"positionText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.selectPosition', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\\u003Cdiv class=\\\"form-hint\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([property + '-characters__counter'], [true]), false, true)+pug.attr(\"data-bind\", 'text:' + property + '.char_rem', true, true)+pug.attr(\"id\", property + '_CharactersRemaining' + `_${isMMA ? 'MMA' : 'RSA'}`, true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (!isMMA) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"dynamicTextMenu\"](property);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"koValidationError\"](property, 'AdField-' + property + `_${isMMA ? 'MMA' : 'RSA'}`);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003C!-- RSA descritions--\\u003E\";\n// iterate fields\n;(function(){\n var $$obj = fields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var field = $$obj[index];\npug_mixins[\"RSAProperty\"](field, 'Ad_Descriptions', 'Ad_Nth_Description', '', 'pop_BA_RSA_Descriptions', 'showDescriptionCount ', index, showLightbulb, isMMA);\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var field = $$obj[index];\npug_mixins[\"RSAProperty\"](field, 'Ad_Descriptions', 'Ad_Nth_Description', '', 'pop_BA_RSA_Descriptions', 'showDescriptionCount ', index, showLightbulb, isMMA);\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: errorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-rsa-actions\\\"\\u003E\\u003Ca class=\\\"ad-rsa-add-description clickable\\\" data-bind=\\\"css: { disabled: showDescriptionCount() >= maxCount }, attr: { "aria-disabled": showDescriptionCount() >= maxCount ? "true" : "false", tabindex: showDescriptionCount() >= maxCount ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AddDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"fields\" in locals_for_with?locals_for_with.fields:typeof fields!==\"undefined\"?fields:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isMMA\" in locals_for_with?locals_for_with.isMMA:typeof isMMA!==\"undefined\"?isMMA:undefined,\"showLightbulb\" in locals_for_with?locals_for_with.showLightbulb:typeof showLightbulb!==\"undefined\"?showLightbulb:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (allowDisclaimerAds, i18n, labels, nameAttrs, placeholders, useUpgradedUrl, uuid) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\n\n\n\n\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"property\"] = pug_interp = function(property, label, helpId, withDynamicText, useTextArea, hideDynamicText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar labelId = uuid.v4();\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\nif (helpId) {\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\";\nvar nameAttribute = nameAttrs ? nameAttrs[property] : '';\nif (withDynamicText) {\nif (useTextArea) {\npug_html = pug_html + \"\\u003Ctextarea\" + (pug.attr(\"class\", pug.classes([\"form-control\",property], [false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" rows=\\\"2\\\"\"+pug.attr(\"data-bind\", 'textInput: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\\u003C\\u002Ftextarea\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\\u003Cdiv class=\\\"form-hint\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([property + '-characters__counter'], [true]), false, true)+pug.attr(\"data-bind\", 'text:' + property + '.char_rem', true, true)+pug.attr(\"id\", property + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (!hideDynamicText) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"dynamicTextMenu\"](property);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", css: {\"validation-error\": !' + property + '.isValid()}, attr: {\"aria-invalid\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"](property);\n}\npug_mixins[\"koValidationError\"](property, 'AdField-' + property);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"path\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__separator text-center\\\"\\u003E\\u003Clabel class=\\\"control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = '/') ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ext__displayUrl__path\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+pug.attr(\"name\", nameAttrs[property], true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+pug.attr(\"data-bind\", 'value: ' + property + ', valueUpdate: \"input\", css: {\"validation-error\": !'+ property + '.isValid()}', true, true)+pug.attr(\"aria-label\", labels[property] || placeholders[property], true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--TODO[lizho] Add remaining characters form hint after having UI mockup--\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"row ac-container\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Ads_AdTitle', i18n.get('Ad_Title'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"type-bold form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DSA_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"property\"]('Text', 'Ad_Text', 'pop_BA_NewAdCreate_AdText', true, false, true);\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"visible: isDynamicDescriptionEnabled()\\\"\\u003E\\u003Clabel class=\\\"information-message\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('DynamicDescriptionMessage') + ' ') ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" query=\\\"app54695\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"property\"]('TextPart2', 'Ad_Text2', 'pop_BA_NewAdCreate_AdText2', true, false, true);\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"visible: isDynamicDescriptionEnabled()\\\"\\u003E\\u003Clabel class=\\\"information-message\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('DynamicDescriptionMessage') + ' ') ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" query=\\\"app54695\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Path')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_DSA_Path', i18n.get('Ad_Path'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 display-url\\\"\\u003E\\u003Cdiv class=\\\"ext__displayUrl__domain form-control-static\\\"\\u003E\\u003Cspan data-bind=\\\"text: domain\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"path\"]('Path1');\npug_mixins[\"path\"]('Path2');\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('Path1');\npug_mixins[\"koValidationError\"]('Path2');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_FinalUrl')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_FinalURL', i18n.get('Ad_Title'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"type-bold form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DSA_URL')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (allowDisclaimerAds) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: showDisclaimer()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"label-disclaimer\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Disclaimer')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_DisclaimerAd', i18n.get('Ad_Disclaimer'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 form-control-static\\\"\\u003E\\u003Cp data-bind=\\\"text: adDisclaimerHint()\\\"\\u003E\\u003C\\u002Fp\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (useUpgradedUrl) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"advanced-options\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"preview-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"allowDisclaimerAds\" in locals_for_with?locals_for_with.allowDisclaimerAds:typeof allowDisclaimerAds!==\"undefined\"?allowDisclaimerAds:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"labels\" in locals_for_with?locals_for_with.labels:typeof labels!==\"undefined\"?labels:undefined,\"nameAttrs\" in locals_for_with?locals_for_with.nameAttrs:typeof nameAttrs!==\"undefined\"?nameAttrs:undefined,\"placeholders\" in locals_for_with?locals_for_with.placeholders:typeof placeholders!==\"undefined\"?placeholders:undefined,\"useUpgradedUrl\" in locals_for_with?locals_for_with.useUpgradedUrl:typeof useUpgradedUrl!==\"undefined\"?useUpgradedUrl:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, syntax) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cspan class=\\\"countdownEditor-syntax\\\"\\u003E\" + (pug.escape(null == (pug_interp = syntax) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Countdown_Syntax',i18n.getString('CountdownEditor_Syntax_Tooltip'));\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"syntax\" in locals_for_with?locals_for_with.syntax:typeof syntax!==\"undefined\"?syntax:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsDisclaimerAdsEnabled, IsEXTAMigrationNotificationEnabled, IsExpandedTextAdV2Enabled, domainWatermark, i18n, isNativeAdsEnabled, isNativeAdsRebrandingEnabled, isVanityUrlEnabled, labels, nameAttrs, placeholders, uuid) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"data-bind\", 'if: ' + item + '().length > 0, attr: {\"aria-hidden\": ' + item + '().length == 0}', true, true)+pug.attr(\"id\", id ? id : item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+pug.attr(\"data-bind\", 'html: ' + item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"property\"] = pug_interp = function(property, label, helpId, withDynamicText, useTextArea, hideDynamicText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar labelId = uuid.v4();\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\nif (helpId) {\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\";\nvar nameAttribute = nameAttrs ? nameAttrs[property] : '';\nif (withDynamicText) {\nif (useTextArea) {\npug_html = pug_html + \"\\u003Ctextarea\" + (pug.attr(\"class\", pug.classes([\"form-control\",property], [false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" rows=\\\"2\\\"\"+pug.attr(\"data-bind\", 'textInput: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\\u003C\\u002Ftextarea\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\\u003Cdiv class=\\\"form-hint\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([property + '-characters__counter'], [true]), false, true)+pug.attr(\"data-bind\", 'text:' + property + '.char_rem', true, true)+pug.attr(\"id\", property + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (!hideDynamicText) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"dynamicTextMenu\"](property);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", css: {\"validation-error\": !' + property + '.isValid()}, attr: {\"aria-invalid\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"](property);\n}\npug_mixins[\"koValidationError\"](property, 'AdField-' + property);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"path\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__separator text-center\\\"\\u003E\\u003Clabel class=\\\"control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = '/') ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ext__displayUrl__path\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+pug.attr(\"name\", nameAttrs[property], true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+pug.attr(\"data-bind\", 'value: ' + property + ', valueUpdate: \"input\", css: {\"validation-error\": !'+ property + '.isValid()}', true, true)+pug.attr(\"aria-label\", labels[property] || placeholders[property], true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--TODO[lizho] Add remaining characters form hint after having UI mockup--\\u003E\";\n};\npug_mixins[\"url\"] = pug_interp = function(property, label, helpId, container, labelId){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"fieldItemAd col-sm-offset-4\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([container], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"container-fluid\\\"\\u003E\";\npug_mixins[\"koValidationError\"](property);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"row ac-container\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\nif (IsEXTAMigrationNotificationEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"warn warn-info form-group\\\"\\u003E\\u003Cdiv class=\\\"warn-image iconba-Warning iconba\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"warn-info-inline\\\"\\u003E\" + (null == (pug_interp = i18n.get('EXTA_Migration_Warning_Updated')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_mixins[\"url\"]('FinalUrls', 'Ad_FinalUrl', 'pop_BA_NewAdCreate_FinalURL', 'final-url', 'extaFinalUrlLabel');\npug_mixins[\"property\"]('TitlePart1', 'Ad_TitlePart1', 'pop_BA_NewAdCreate_AdTitle1', true);\npug_mixins[\"property\"]('TitlePart2', 'Ad_TitlePart2', 'pop_BA_NewAdCreate_AdTitle2', true);\nif (IsExpandedTextAdV2Enabled) {\npug_mixins[\"property\"]('TitlePart3', 'Ad_TitlePart3', 'pop_BA_NewAdCreate_AdTitle3', true);\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_html = pug_html + \"\\u003Clabel class=\\\"ext__displayUrl__domain_label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DisplayUrl')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_VanityURL', i18n.get('Ad_DisplayUrl'), i18n);\n}\nelse {\npug_html = pug_html + \"\\u003Clabel class=\\\"ext__displayUrl__domain_label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Path')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Path', i18n.get('Ad_Path'), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 display-url\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__domain\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+pug.attr(\"name\", nameAttrs['DisplayUrl'], true, true)+pug.attr(\"placeholder\", placeholders['DisplayUrl'], true, true)+\" data-bind=\\\"value: DisplayUrl, valueUpdate: "input", css: {"validation-error": !DisplayUrl.isValid()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__domain form-control-static\\\"\\u003E\\u003Cspan data-bind=\\\"text: DisplayUrl, visibile: DisplayUrl\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"ext__displayUrl__domain--placeholder\\\" data-bind=\\\"visible: !DisplayUrl()\\\"\\u003E\" + (pug.escape(null == (pug_interp = domainWatermark) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_mixins[\"path\"]('Path1');\npug_mixins[\"path\"]('Path2');\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_mixins[\"koValidationError\"]('DisplayUrl');\n}\npug_mixins[\"koError\"]('errorMessage');\npug_mixins[\"koValidationError\"]('Path1');\npug_mixins[\"koValidationError\"]('Path2');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (IsExpandedTextAdV2Enabled) {\npug_mixins[\"property\"]('Text', 'Ad_Text1', 'pop_BA_NewAdCreate_AdText', true, true);\npug_mixins[\"property\"]('TextPart2', 'Ad_Text2', 'pop_BA_NewAdCreate_AdText2', true, true);\n}\nelse {\npug_mixins[\"property\"]('Text', 'Ad_Text', 'pop_BA_NewAdCreate_AdText', true, true);\n}\nif (IsDisclaimerAdsEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: showDisclaimer()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"label-disclaimer\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Disclaimer')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_DisclaimerAd', i18n.get('Ad_Disclaimer'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 form-control-static\\\"\\u003E\\u003Cp data-bind=\\\"text: adDisclaimerHint()\\\"\\u003E\\u003C\\u002Fp\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (isNativeAdsEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"label-preference\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Preferences')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_NativeAdPreferred', i18n.get('Ad_Preferences'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" role=\\\"group\\\" aria-labelledby=\\\"label-preference\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel data-analyticsid=\\\"omniture-msan-preference-checkbox\\\"\\u003E\\u003Cinput\" + (\" class=\\\"prefer-native-format\\\"\"+pug.attr(\"name\", nameAttrs['NativePreference'], true, true)+\" type=\\\"checkbox\\\" data-bind=\\\"checked: NativePreference.isNativePreference, attr: { "aria-checked" : NativePreference.isNativePreference() ? "true" : "false" }\\\" role=\\\"checkbox\\\" data-analyticsid=\\\"omniture-msan-preference-checkbox\\\"\") + \"\\u003E\";\nif (isNativeAdsRebrandingEnabled) {\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Audience')) ? \"\" : pug_interp));\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Native')) ? \"\" : pug_interp));\n}\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_mixins[\"url\"]('MobileFinalUrls', 'MobileFinalUrl_Label', 'pop_BA_NewCampaignCreate_Ad_MobileURL', 'mobile-url', 'extaMobileUrlLabel');\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext-ad-url-options\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"preview-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"IsDisclaimerAdsEnabled\" in locals_for_with?locals_for_with.IsDisclaimerAdsEnabled:typeof IsDisclaimerAdsEnabled!==\"undefined\"?IsDisclaimerAdsEnabled:undefined,\"IsEXTAMigrationNotificationEnabled\" in locals_for_with?locals_for_with.IsEXTAMigrationNotificationEnabled:typeof IsEXTAMigrationNotificationEnabled!==\"undefined\"?IsEXTAMigrationNotificationEnabled:undefined,\"IsExpandedTextAdV2Enabled\" in locals_for_with?locals_for_with.IsExpandedTextAdV2Enabled:typeof IsExpandedTextAdV2Enabled!==\"undefined\"?IsExpandedTextAdV2Enabled:undefined,\"domainWatermark\" in locals_for_with?locals_for_with.domainWatermark:typeof domainWatermark!==\"undefined\"?domainWatermark:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isNativeAdsEnabled\" in locals_for_with?locals_for_with.isNativeAdsEnabled:typeof isNativeAdsEnabled!==\"undefined\"?isNativeAdsEnabled:undefined,\"isNativeAdsRebrandingEnabled\" in locals_for_with?locals_for_with.isNativeAdsRebrandingEnabled:typeof isNativeAdsRebrandingEnabled!==\"undefined\"?isNativeAdsRebrandingEnabled:undefined,\"isVanityUrlEnabled\" in locals_for_with?locals_for_with.isVanityUrlEnabled:typeof isVanityUrlEnabled!==\"undefined\"?isVanityUrlEnabled:undefined,\"labels\" in locals_for_with?locals_for_with.labels:typeof labels!==\"undefined\"?labels:undefined,\"nameAttrs\" in locals_for_with?locals_for_with.nameAttrs:typeof nameAttrs!==\"undefined\"?nameAttrs:undefined,\"placeholders\" in locals_for_with?locals_for_with.placeholders:typeof placeholders!==\"undefined\"?placeholders:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (fields, i18n, isMMA, showLightbulb) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\n\n\n\n\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"RSAProperty\"] = pug_interp = function(property, label, ariaLabel, placeholder, helpId, countModelName, index, showLightbulb, isMMA){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"form-group\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + countModelName + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\";\nif (index == 0) {\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 ad-rsa-filed-group\\\"\\u003E\";\nif (showLightbulb) {\npug_html = pug_html + \"\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",property + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'style: { visibility: ' + property + 'IsAIGeneratedAsset() ? \"visible\" : \"hidden\" }', true, true)+pug.attr(\"aria-label\", i18n.get('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"name\", property, true, true)+pug.attr(\"placeholder\", i18n.get(placeholder), true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-label\", i18n.get(ariaLabel, { index: index + 1 }), true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining' + `_${isMMA ? 'MMA' : 'RSA'}`, true, true)) + \"\\u003E\";\nif (!isMMA) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group ad-rsa-pin-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"ad-field-position\",\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-positionLink'], [false,false,false,true]), false, true)+pug.attr(\"data-bind\", 'css: { visible: ' + property + 'Position() !== \"None\"}', true, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\"\"+pug.attr(\"aria-label\", i18n.get('Ad_PinToPosition'), true, true)+\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-pushpin\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\" + (\" class=\\\"ad-pinned\\\"\"+pug.attr(\"data-bind\", 'text: positionFieldMap(' + property + 'Position())', true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu\",property + '-positionMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.positionMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"positionText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.selectPosition', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\\u003Cdiv class=\\\"form-hint\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([property + '-characters__counter'], [true]), false, true)+pug.attr(\"data-bind\", 'text:' + property + '.char_rem', true, true)+pug.attr(\"id\", property + '_CharactersRemaining' + `_${isMMA ? 'MMA' : 'RSA'}`, true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (!isMMA) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"dynamicTextMenu\"](property);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"koValidationError\"](property, 'AdField-' + property + `_${isMMA ? 'MMA' : 'RSA'}`);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003C!-- RSA headlines--\\u003E\";\n// iterate fields\n;(function(){\n var $$obj = fields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var field = $$obj[index];\npug_mixins[\"RSAProperty\"](field, 'Ad_Headlines', 'Ad_Nth_Headline', '', 'pop_BA_RSA_Headlines', 'showHeadlineCount ', index, showLightbulb, isMMA);\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var field = $$obj[index];\npug_mixins[\"RSAProperty\"](field, 'Ad_Headlines', 'Ad_Nth_Headline', '', 'pop_BA_RSA_Headlines', 'showHeadlineCount ', index, showLightbulb, isMMA);\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: errorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-rsa-actions\\\"\\u003E\\u003Ca class=\\\"ad-rsa-add-headline clickable\\\" data-bind=\\\"css: { disabled: showHeadlineCount() >= maxCount }, attr: { "aria-disabled": showHeadlineCount() >= maxCount ? "true" : "false", tabindex: showHeadlineCount() >= maxCount ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AddHeadline')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"fields\" in locals_for_with?locals_for_with.fields:typeof fields!==\"undefined\"?fields:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isMMA\" in locals_for_with?locals_for_with.isMMA:typeof isMMA!==\"undefined\"?isMMA:undefined,\"showLightbulb\" in locals_for_with?locals_for_with.showLightbulb:typeof showLightbulb!==\"undefined\"?showLightbulb:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"popover row singleSelection\\\" role=\\\"dialog\\\"\\u003E\\u003Cdiv class=\\\"popover-inner\\\"\\u003E\\u003Cdiv class=\\\"popover-content\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (domainWatermark, i18n, isNativeAdsEnabled, isNativeAdsRebrandingEnabled, isVanityUrlEnabled, labels, nameAttrs, placeholders) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"data-bind\", 'if: ' + item + '().length > 0, attr: {\"aria-hidden\": ' + item + '().length == 0}', true, true)+pug.attr(\"id\", id ? id : item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+pug.attr(\"data-bind\", 'html: ' + item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\npug_mixins[\"path\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__separator text-center\\\"\\u003E\\u003Clabel class=\\\"control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = '/') ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ext__displayUrl__path\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+pug.attr(\"name\", nameAttrs[property], true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+pug.attr(\"data-bind\", 'value: ' + property + ', valueUpdate: \"input\", css: {\"validation-error\": !'+ property + '.isValid()}', true, true)+pug.attr(\"aria-label\", labels[property] || placeholders[property], true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--TODO[lizho] Add remaining characters form hint after having UI mockup--\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\npug_mixins[\"url\"] = pug_interp = function(property, label, helpId, container, labelId){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"fieldItemAd col-sm-offset-4\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([container], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"container-fluid\\\"\\u003E\";\npug_mixins[\"koValidationError\"](property);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"row ac-container\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\npug_mixins[\"url\"]('FinalUrls', 'Ad_FinalUrl', 'pop_BA_NewAdCreate_FinalURL', 'final-url', 'rsaFinalUrlLabel');\npug_html = pug_html + \"\\u003Cdiv class=\\\"headlines-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_html = pug_html + \"\\u003Clabel class=\\\"ext__displayUrl__domain_label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DisplayUrl')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_VanityURL', i18n.get('Ad_DisplayUrl'), i18n);\n}\nelse {\npug_html = pug_html + \"\\u003Clabel class=\\\"ext__displayUrl__domain_label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Path')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_Path', i18n.get('Ad_Path'), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8 display-url\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__domain\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+pug.attr(\"name\", nameAttrs['DisplayUrl'], true, true)+pug.attr(\"placeholder\", placeholders['DisplayUrl'], true, true)+\" data-bind=\\\"value: DisplayUrl, valueUpdate: "input", css: {"validation-error": !DisplayUrl.isValid()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext__displayUrl__domain form-control-static\\\"\\u003E\\u003Cspan data-bind=\\\"text: DisplayUrl, visibile: DisplayUrl\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"ext__displayUrl__domain--placeholder\\\" data-bind=\\\"visible: !DisplayUrl()\\\"\\u003E\" + (pug.escape(null == (pug_interp = domainWatermark) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_mixins[\"path\"]('Path1');\npug_mixins[\"path\"]('Path2');\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\";\nif (isVanityUrlEnabled) {\npug_mixins[\"koValidationError\"]('DisplayUrl');\n}\npug_mixins[\"koError\"]('errorMessage');\npug_mixins[\"koValidationError\"]('Path1');\npug_mixins[\"koValidationError\"]('Path2');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"descriptions-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isNativeAdsEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"label-preference\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Preferences')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_NativeAdPreferred', i18n.get('Ad_Preferences'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" role=\\\"group\\\" aria-labelledby=\\\"label-preference\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel data-analyticsid=\\\"omniture-msan-preference-checkbox\\\"\\u003E\\u003Cinput\" + (\" class=\\\"prefer-native-format\\\"\"+pug.attr(\"name\", nameAttrs['NativePreference'], true, true)+\" type=\\\"checkbox\\\" data-bind=\\\"checked: NativePreference.isNativePreference, attr: { "aria-checked" : NativePreference.isNativePreference() ? "true" : "false" }\\\" role=\\\"checkbox\\\" data-analyticsid=\\\"omniture-msan-preference-checkbox\\\"\") + \"\\u003E\";\nif (isNativeAdsRebrandingEnabled) {\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Audience')) ? \"\" : pug_interp));\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Native')) ? \"\" : pug_interp));\n}\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_mixins[\"url\"]('MobileFinalUrls', 'MobileFinalUrl_Label', 'pop_BA_NewCampaignCreate_Ad_MobileURL', 'mobile-url', 'rsaMobileUrlLabel');\npug_html = pug_html + \"\\u003Cdiv class=\\\"ext-ad-url-options\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"ad-strength-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"preview-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"domainWatermark\" in locals_for_with?locals_for_with.domainWatermark:typeof domainWatermark!==\"undefined\"?domainWatermark:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isNativeAdsEnabled\" in locals_for_with?locals_for_with.isNativeAdsEnabled:typeof isNativeAdsEnabled!==\"undefined\"?isNativeAdsEnabled:undefined,\"isNativeAdsRebrandingEnabled\" in locals_for_with?locals_for_with.isNativeAdsRebrandingEnabled:typeof isNativeAdsRebrandingEnabled!==\"undefined\"?isNativeAdsRebrandingEnabled:undefined,\"isVanityUrlEnabled\" in locals_for_with?locals_for_with.isVanityUrlEnabled:typeof isVanityUrlEnabled!==\"undefined\"?isVanityUrlEnabled:undefined,\"labels\" in locals_for_with?locals_for_with.labels:typeof labels!==\"undefined\"?labels:undefined,\"nameAttrs\" in locals_for_with?locals_for_with.nameAttrs:typeof nameAttrs!==\"undefined\"?nameAttrs:undefined,\"placeholders\" in locals_for_with?locals_for_with.placeholders:typeof placeholders!==\"undefined\"?placeholders:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\n\n\n\n\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"row ac-container\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"headlines-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"descriptions-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isNativeAdsEnabled, nameAttrs, placeholders, uuid) {pug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"dynamicTextMenu\"] = pug_interp = function(property){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"btn-group\\\"\\u003E\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"dropdown-toggle\",\"legacy-dropdown-toggle\",property + '-dynamicTextLink'], [false,false,true]), false, true)+\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DynamicText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cul\" + (pug.attr(\"class\", pug.classes([\"dropdown-menu\",\"dropdown-menu-right\",property + '-dynamicTextMenu'], [false,false,true]), false, true)+pug.attr(\"data-bind\", 'foreach:' + property + '.dynamicTextMenu', true, true)+\" role=\\\"menu\\\"\") + \"\\u003E\\u003Cli\\u003E\\u003Ca\" + (\" class=\\\"dynamicText\\\"\"+pug.attr(\"data-bind\", 'text: text, click: $parent.' + property + '.appendDynamicText', true, true)+\" role=\\\"menuitem\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"property\"] = pug_interp = function(property, label, helpId, withDynamicText, useTextArea, hideDynamicText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar labelId = uuid.v4();\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\nif (helpId) {\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\";\nvar nameAttribute = nameAttrs ? nameAttrs[property] : '';\nif (withDynamicText) {\nif (useTextArea) {\npug_html = pug_html + \"\\u003Ctextarea\" + (pug.attr(\"class\", pug.classes([\"form-control\",property], [false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" rows=\\\"2\\\"\"+pug.attr(\"data-bind\", 'textInput: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\\u003C\\u002Ftextarea\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"name\", nameAttribute, true, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", attr: {\"aria-invalid\": !' + property + '.isValid()}, css: {\"validation-error\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"clearfix\\\"\\u003E\\u003Cdiv class=\\\"form-hint\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([property + '-characters__counter'], [true]), false, true)+pug.attr(\"data-bind\", 'text:' + property + '.char_rem', true, true)+pug.attr(\"id\", property + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (!hideDynamicText) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' | ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"dynamicTextMenu\"](property);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cinput\" + (pug.attr(\"class\", pug.classes([\"form-control\",\"text\",property], [false,false,true]), false, true)+pug.attr(\"placeholder\", placeholders[property], true, true)+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'value: ' + property +', valueUpdate: \"input\", css: {\"validation-error\": !' + property + '.isValid()}, attr: {\"aria-invalid\": !' + property + '.isValid()}', true, true)+pug.attr(\"aria-labelledby\", labelId, true, true)+pug.attr(\"aria-describedby\", 'AdField-' + property + ' ' + property + '_CharactersRemaining', true, true)) + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"](property);\n}\npug_mixins[\"koValidationError\"](property, 'AdField-' + property);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\";\npug_mixins[\"property\"]('Title', 'Ad_Title', 'pop_BA_CampaignCreate_Ads_AdTitle', true);\npug_mixins[\"property\"]('Text', 'Ad_Text', 'pop_BA_NewAdCreate_AdText', true);\npug_mixins[\"property\"]('DisplayUrl', 'Ad_DisplayUrl', 'pop_BA_CampaignCreate_Ads_DisplayURL', false);\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group devicePreference-panel\\\"\\u003E\";\nif (!isNativeAdsEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-4 control-label\\\" id=\\\"label-preference\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_DevicePreference')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Ads_DevicePref', i18n.get('Ad_DevicePreference'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" role=\\\"group\\\" aria-labelledby=\\\"label-preference\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput class=\\\"prefer-mobile-device DevicePreference\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: DevicePreference.isMobile, attr: { "aria-checked" : DevicePreference.isMobile() ? "true" : "false" }\\\" role=\\\"checkbox\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('DevicePreference_Mobile')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"label-preference\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Preferences')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" role=\\\"group\\\" aria-labelledby=\\\"label-preference\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput class=\\\"prefer-mobile-device DevicePreference\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: DevicePreference.isMobile, attr: { "aria-checked" : DevicePreference.isMobile() ? "true" : "false" }\\\" role=\\\"checkbox\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Mobile')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('Page_NewCampaignCreate_Ad_Mobile', i18n.get('AdPreferences_Mobile'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput class=\\\"prefer-native-format\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: NativePreference.isNativePreference, attr: { "aria-checked" : NativePreference.isNativePreference() ? "true" : "false" }\\\" role=\\\"checkbox\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdPreferences_Native')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_NativeAdPreferred', i18n.get('AdPreferences_Native'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"upgraded-url\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"preview-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isNativeAdsEnabled\" in locals_for_with?locals_for_with.isNativeAdsEnabled:typeof isNativeAdsEnabled!==\"undefined\"?isNativeAdsEnabled:undefined,\"nameAttrs\" in locals_for_with?locals_for_with.nameAttrs:typeof nameAttrs!==\"undefined\"?nameAttrs:undefined,\"placeholders\" in locals_for_with?locals_for_with.placeholders:typeof placeholders!==\"undefined\"?placeholders:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"upgraded-url__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, showDisclaimer) {pug_html = pug_html + \"\\u003Cdiv class=\\\"preview-ad__url\\\" data-bind=\\\"visible: DisplayUrl\\\"\\u003E\\u003Cdiv class=\\\"truncated\\\"\\u003E\\u003Cspan class=\\\"preview-ad-slug\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Entity_Ads')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"previewUrlAd\\\" target=\\\"_blank\\\" data-bind=\\\"attr: {href: DestinationUrl}\\\"\\u003E\\u003C!-- ko text: DisplayUrl--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (showDisclaimer) {\npug_html = pug_html + \"\\u003Cspan\\u003E  \\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"disclaimer-pinned\\\"\\u003E\\u003Ca class=\\\"btn-create disclaimer-popup-link\\\" data-bind=\\\"text: DisclaimerPopHint(), visible: DisclaimerPopHint\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"disclaimer-placeholder\\\" data-bind=\\\"visible: IsDisclaimerPopupHintVisible()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"preview-ad__description\\\"\\u003E\\u003Cspan data-bind=\\\"text: Text\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\nif (showDisclaimer) {\npug_html = pug_html + \"\\u003Cspan\\u003E \\u003C\\u002Fspan\\u003E\\u003Cspan data-bind=\\\"text: DisclaimerLineText, visible: IsAdditionalLineLayout()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Ca target=\\\"_blank\\\" style=\\\"margin-left: 10px\\\" data-bind=\\\"attr: {href: DisclaimerFinalUrl()}, visible: IsAdditionalLineLayout()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Disclaimer_Ad_AdditionalLine_FinalUrlText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showDisclaimer\" in locals_for_with?locals_for_with.showDisclaimer:typeof showDisclaimer!==\"undefined\"?showDisclaimer:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"popover-disclaimer\\\"\\u003E\\u003Cspan class=\\\"preview-ad-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Disclaimer_Ad_Popup_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cbutton class=\\\"btn-create disclaimer-popup-close alert-ignore close closeimage\\\"\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cbr\\u003E\\u003Cbr\\u003E\\u003Cp target=\\\"_blank\\\" data-bind=\\\"text:DisclaimerPopupText()\\\"\\u003E\\u003C\\u002Fp\\u003E\\u003Ca target=\\\"_blank\\\" data-bind=\\\"attr: {href: DisclaimerFinalUrl()}, visible: DisclaimerFinalUrl()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (panels, uuid) {var idSuffix = uuid.v4();\npug_html = pug_html + \"\\u003Cdiv class=\\\"ui-tabs preview-nav-pills\\\" data-bind=\\\"foreach: tabGroups\\\"\\u003E\\u003Cul class=\\\"ui-tabs-nav btn-group\\\" data-bind=\\\"visible: $root.isTabGroupVisible($data), foreach: $data\\\" role=\\\"tablist\\\"\\u003E\\u003Cli data-bind=\\\"css: $root.selectedPanel() === name ? "ui-tabs-selected" : "preview-tabs-unselected"\\\" role=\\\"presentation\\\"\\u003E\\u003Ca\" + (\" class=\\\"selected btn preview-tab\\\"\"+pug.attr(\"data-bind\", 'attr: {\"data-target\": name, \"aria-controls\": \"preview-\" + name + \"-' + idSuffix + '\", \"aria-selected\": $root.selectedPanel() === name ? \"true\" : \"false\", \"tabindex\": $root.selectedPanel() === name ? \"0\" : \"-1\", id: \"tab-\" + name + \"-' + idSuffix + '\"}, text: title', true, true)+\" role=\\\"tab\\\" href=\\\"javascript:void(0);\\\"\") + \"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previews\\\"\\u003E\";\n// iterate panels\n;(function(){\n var $$obj = panels;\n if ('number' == typeof $$obj.length) {\n for (var name = 0, $$l = $$obj.length; name < $$l; name++) {\n var panel = $$obj[name];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes(['preview-' + name], [true]), false, true)+pug.attr(\"data-bind\", 'visible: selectedPanel() === \"' + name + '\", attr: {id: \"preview-' + name + '-' + idSuffix + '\", \"aria-labelledby\": \"tab-' + name + '-' + idSuffix + '\"}', true, true)+\" role=\\\"tabpanel\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var name in $$obj) {\n $$l++;\n var panel = $$obj[name];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes(['preview-' + name], [true]), false, true)+pug.attr(\"data-bind\", 'visible: selectedPanel() === \"' + name + '\", attr: {id: \"preview-' + name + '-' + idSuffix + '\", \"aria-labelledby\": \"tab-' + name + '-' + idSuffix + '\"}', true, true)+\" role=\\\"tabpanel\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"panels\" in locals_for_with?locals_for_with.panels:typeof panels!==\"undefined\"?panels:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adType) {pug_html = pug_html + \"\\u003Cdiv class=\\\"preview-device-Pref\\\"\\u003E\\u003Cdiv class=\\\"previewAd mainline\\\"\\u003E\\u003Cdiv\\u003E\";\nif (adType === 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewTitleAd\\\" data-bind=\\\" visible: Title\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (adType !== 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003Ca class=\\\"previewTitleAd\\\" target=\\\"_blank\\\" data-bind=\\\"attr: {href: DestinationUrl}, visible: Title\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"./AdPreviewBody.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adType\" in locals_for_with?locals_for_with.adType:typeof adType!==\"undefined\"?adType:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"previewAd nativeads native-ad-previewbox\\\"\\u003E\\u003Cdiv class=\\\"media-left\\\"\\u003E\\u003Csvg\" + (\" class=\\\"media-object\\\"\"+pug.attr(\"alt\", i18n.get('NativeAd_Image_Alt'), true, true)+\" xmlns=\\\"http:\\u002F\\u002Fwww.w3.org\\u002F2000\\u002Fsvg\\\" width=\\\"70\\\" height=\\\"60\\\" viewBox=\\\"0 0 24 24\\\" opacity=\\\"0.7\\\"\") + \"\\u003E\\u003Cpath d=\\\"M0 0h24v24H0z\\\" fill=\\\"none\\\"\\u003E\\u003C\\u002Fpath\\u003E\\u003Cpath d=\\\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\\\"\\u003E\\u003C\\u002Fpath\\u003E\\u003C\\u002Fsvg\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"media-body\\\"\\u003E\\u003Cdiv\\u003E\\u003Ca class=\\\"previewTitleAd\\\" target=\\\"_blank\\\" data-bind=\\\"attr: {href: DestinationUrl}\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"./AdPreviewBody.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adType) {pug_html = pug_html + \"\\u003Cdiv class=\\\"bing-preview-container\\\"\\u003E\\u003Cdiv\\u003E\";\nif (adType === 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewTitleAd\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (adType !== 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003Ca class=\\\"previewTitleAd\\\" target=\\\"_blank\\\" data-bind=\\\"attr: {href: DestinationUrl}\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"./AdPreviewBody.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adType\" in locals_for_with?locals_for_with.adType:typeof adType!==\"undefined\"?adType:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adType) {pug_html = pug_html + \"\\u003Cdiv class=\\\"ad-preview-bing-searchbox-icon\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Col class=\\\"bing-preview-container\\\"\\u003E\\u003Cli class=\\\"bing-preview-answer\\\"\\u003E\\u003Cdiv\\u003E\";\nif (adType === 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewTitleAd\\\" data-bind=\\\"visible: Title\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (adType !== 'DynamicSearchAd') {\npug_html = pug_html + \"\\u003C!-- ko if: !!DestinationUrl() && DestinationUrl().length \\u003E 0--\\u003E\\u003Ca class=\\\"previewTitleAd\\\" target=\\\"_blank\\\" data-bind=\\\"attr: {href: DestinationUrl}, visible: Title\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !DestinationUrl() || DestinationUrl().length === 0--\\u003E\\u003Ca class=\\\"previewTitleAd\\\" target=\\\"_blank\\\" data-bind=\\\"visible: Title\\\"\\u003E\\u003C!-- ko text: Title--\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fa\\u003E\\u003C!-- \\u002Fko--\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"./AdPreviewBody.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fli\\u003E\\u003C\\u002Fol\\u003E\";}.call(this,\"adType\" in locals_for_with?locals_for_with.adType:typeof adType!==\"undefined\"?adType:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adExtensionDynamicFeatures, adExtensionStaticFeatures, appendLearnMoreLink, i18n, isDSAMixedModeCampaignEnabled, objective, otherExtensions, suggestedExtensions) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"baseAdExtension\"] = pug_interp = function(label, helpId, type, i18n, objective){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar labelId = 'Create' + type + 'AdExtensionLabel';\nvar addButtonId = 'associationsAdd' + type;\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-3 text-right\\\"\\u003E\\u003Clabel\" + (pug.attr(\"id\", labelId, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get(label)) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\nif (helpId) {\npug_mixins[\"popupHelp\"](helpId, i18n.get(label), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"associations__container col-sm-9\\\"\"+pug.attr(\"data-type\", type, true, true)+\" role=\\\"group\\\"\"+pug.attr(\"aria-labelledby\", labelId, true, true)) + \"\\u003E\\u003Cdiv\" + (pug.attr(\"data-bind\", 'if: ' + type + '().length === 0', true, true)) + \"\\u003E\\u003Ca\" + (\" class=\\\"create-extension\\\"\"+pug.attr(\"data-target\", type, true, true)+\" href=\\\"javascript:void(0);\\\" role=\\\"button\\\"\"+pug.attr(\"id\", addButtonId, true, true)+pug.attr(\"aria-labelledby\", addButtonId + ' ' + labelId, true, true)) + \"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AdExtensions_CreateNew')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"data-bind\", 'if: ' + type + '().length > 0', true, true)) + \"\\u003E\\u003Cdiv class=\\\"campaign-adextension-list\\\"\\u003E\\u003Ca\" + (\" class=\\\"edit-extension pull-right\\\"\"+pug.attr(\"data-target\", type, true, true)+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", i18n.get('Edit'), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Edit')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv\" + (pug.attr(\"data-bind\", 'foreach:' + type, true, true)) + \"\\u003E\\u003Cdiv class=\\\"adExtension-previewbox\\\"\\u003E\";\nif (block) {\nblock && block();\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"Location\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: CompanyName\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- ko foreach: display--\\u003E\\u003Cdiv data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv data-bind=\\\"text: PhoneNumber\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Location', 'pop_BA_CampaignCreate_Ads_LocationExtensions', 'Location', i18n, objective);\n};\npug_mixins[\"SiteLink\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: DisplayText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- ko if: Description1.length \\u003E 0--\\u003E\\u003Cdiv data-bind=\\\"text: Description1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: Description2.length \\u003E 0--\\u003E\\u003Cdiv data-bind=\\\"text: Description2\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\";\n}\n}, 'AdExtensions_Type_Sitelink', 'pop_BA_CampaignCreate_Ads_SitelinkExtensions', 'SiteLink', i18n, objective);\n};\npug_mixins[\"App\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: AppPlatform\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"text: DisplayText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_App', 'pop_BA_CampaignCreate_Ads_AppExtensions', 'App', i18n, objective);\n};\npug_mixins[\"Call\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: PhoneNumber\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_Call', 'pop_BA_CampaignCreate_Ads_CallExtensions', 'Call', i18n, objective);\n};\npug_mixins[\"Callout\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: Text\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_Callout', 'pop_BA_CampaignCreate_Ads_CalloutExtensions', 'Callout', i18n, objective);\n};\npug_mixins[\"Review\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: Text + " - " + Source\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_Review', 'pop_BA_CampaignCreate_Ads_ReviewExtensions', 'Review', i18n, objective);\n};\npug_mixins[\"StructuredSnippet\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"text: Category + ": " + Texts.join(", ")\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_StructuredSnippet', 'pop_BA_CampaignCreate_Ads_StructuredSnippetExtensions', 'StructuredSnippet', i18n, objective);\n};\npug_mixins[\"Price\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"foreach: TableRows\\\"\\u003E\\u003Cdiv data-bind=\\\"if: $index() < $parent.showItemCount\\\"\\u003E\\u003Ca data-bind=\\\"attr: { href: FinalUrls[0] }, text: Header\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E − \\u003C\\u002Fspan\\u003E\\u003Cspan data-bind=\\\"text: Description\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"price-adextension-price-info\\\" data-bind=\\\"text: PriceInfo\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"if: TableRows.length > showItemCount\\\"\\u003E\\u003Cspan data-bind=\\\"text: AdExtensionMoreInfo\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_Price', 'pop_BA_CampaignCreate_Ads_PriceExtensions', 'Price', i18n, objective);\n};\npug_mixins[\"AdExtensionWithDynamicTemplate\"] = pug_interp = function(type, dynamicTemplateName, hideHelpTooltip){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar helpTooltip = hideHelpTooltip ? undefined : 'pop_BA_CampaignCreate_Ads_' + type + 'Extensions';\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"data-bind\", \"html: $parent.adExtensionDynamicFeatures['\" + type + \"']['\" + dynamicTemplateName + \"']({ data: $data })\", true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_' + type, helpTooltip, type, i18n, objective);\n};\npug_mixins[\"AdExtensionWithStaticTemplate\"] = pug_interp = function(type, staticTemplateName, hideHelpTooltip){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar helpTooltip = hideHelpTooltip ? undefined : 'pop_BA_CampaignCreate_Ads_' + type + 'Extensions';\npug_mixins[\"baseAdExtension\"].call({\nblock: function(){\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"data-bind\", \"html: $parent.adExtensionStaticFeatures['\" + type + \"']['\" + staticTemplateName + \"']({ data: $data })\", true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}, 'AdExtensions_Type_' + type, helpTooltip, type, i18n, objective);\n};\npug_mixins[\"extensionList\"] = pug_interp = function(extensions){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\n// iterate extensions\n;(function(){\n var $$obj = extensions;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var ext = $$obj[pug_index0];\nvar dynamicFeatures = adExtensionDynamicFeatures[ext];\nvar dynamicTemplateName = dynamicFeatures && dynamicFeatures.universalItemTemplate && \"universalItemTemplate\";\nvar staticFeatures = adExtensionStaticFeatures[ext];\nvar staticTemplateName = staticFeatures && staticFeatures.universalItemTemplate && \"universalItemTemplate\";\nif (dynamicTemplateName) {\nvar hideHelpTooltip = dynamicFeatures.hideHelpTooltip\npug_mixins[\"AdExtensionWithDynamicTemplate\"](ext, dynamicTemplateName, hideHelpTooltip);\n}\nelse\nif (staticTemplateName) {\nvar hideHelpTooltip = staticFeatures.hideHelpTooltip\npug_mixins[\"AdExtensionWithStaticTemplate\"](ext, staticTemplateName, hideHelpTooltip);\n}\nelse {\npug_mixins[ext]();\n}\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var ext = $$obj[pug_index0];\nvar dynamicFeatures = adExtensionDynamicFeatures[ext];\nvar dynamicTemplateName = dynamicFeatures && dynamicFeatures.universalItemTemplate && \"universalItemTemplate\";\nvar staticFeatures = adExtensionStaticFeatures[ext];\nvar staticTemplateName = staticFeatures && staticFeatures.universalItemTemplate && \"universalItemTemplate\";\nif (dynamicTemplateName) {\nvar hideHelpTooltip = dynamicFeatures.hideHelpTooltip\npug_mixins[\"AdExtensionWithDynamicTemplate\"](ext, dynamicTemplateName, hideHelpTooltip);\n}\nelse\nif (staticTemplateName) {\nvar hideHelpTooltip = staticFeatures.hideHelpTooltip\npug_mixins[\"AdExtensionWithStaticTemplate\"](ext, staticTemplateName, hideHelpTooltip);\n}\nelse {\npug_mixins[ext]();\n}\n }\n }\n}).call(this);\n\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal container-fluid\\\"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"adgroup-ads__container\",isDSAMixedModeCampaignEnabled ? 'mixed-mode-campaign-creation' : ''], [false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (!isDSAMixedModeCampaignEnabled) {\npug_html = pug_html + \"\\u003C!-- ko foreach: adGroups--\\u003E\\u003Cdiv class=\\\"adgroup-creative\\\" data-bind=\\\"attr: { "data-id": Id }\\\"\\u003E\\u003Cdiv class=\\\"adgroup-ads-creative\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"dynamic-adgroup-ad-creation-section-container\\\" data-bind=\\\"visible: dynamicAdGroups().length>0\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Ca class=\\\"col-sm-12\\\" id=\\\"dynamicAdGroupAdEditorSectionTitle\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#dynamicAdGroupAdEditorSection\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: { "aria-expanded": isDynamicSectionExpanded() ? "true" : "false" }\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign\\\" data-bind=\\\"css: isDynamicSectionExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dynamic_AdGroups_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fh3\\u003E\\u003Cdiv class=\\\"collapse in\\\" id=\\\"dynamicAdGroupAdEditorSection\\\" data-section=\\\"dynamic\\\" role=\\\"group\\\"\\u003E\\u003C!-- ko foreach: dynamicAdGroups--\\u003E\\u003Cdiv class=\\\"adgroup-creative\\\" data-bind=\\\"attr: { "data-id": Id }\\\"\\u003E\\u003Cdiv class=\\\"adgroup-ads-creative\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"standard-adgroup-ad-creation-section-container\\\" data-bind=\\\"visible: standardAdGroups().length>0\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Ca class=\\\"col-sm-12\\\" id=\\\"standardAdGroupAdEditorSectionTitle\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#standardAdGroupAdEditorSection\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: { "aria-expanded": isStandardSectionExpanded() ? "true" : "false" }\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign\\\" data-bind=\\\"css: isStandardSectionExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Standard_AdGroups_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fh3\\u003E\\u003Cdiv class=\\\"collapse in\\\" id=\\\"standardAdGroupAdEditorSection\\\" data-section=\\\"standard\\\" role=\\\"group\\\"\\u003E\\u003C!-- ko foreach: standardAdGroups--\\u003E\\u003Cdiv class=\\\"adgroup-creative\\\" data-bind=\\\"attr: { "data-id": Id }\\\"\\u003E\\u003Cdiv class=\\\"adgroup-ads-creative\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Ca data-toggle=\\\"collapse\\\" data-target=\\\"#createAdExtensions\\\" data-bind=\\\"attr: { "aria-expanded": isAdExtensionExpanded() ? "true" : "false" }\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan class=\\\"spritedimage spritedimagealign\\\" data-bind=\\\"css: isAdExtensionExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_AdExtensions_Toggle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fh3\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-extensions collapse in\\\" id=\\\"createAdExtensions\\\" role=\\\"group\\\"\\u003E\\u003Cp\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Ad_AdExtensions_Description'), 'app54489')) ? \"\" : pug_interp) + \"\\u003C\\u002Fp\\u003E\";\nif (!objective) {\npug_mixins[\"extensionList\"](otherExtensions);\n}\nelse {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignObjective_SuggestedExtensions_' + objective)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\npug_mixins[\"extensionList\"](suggestedExtensions);\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignObjective_SuggestedExtensions_Others')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\npug_mixins[\"extensionList\"](otherExtensions);\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adExtensionDynamicFeatures\" in locals_for_with?locals_for_with.adExtensionDynamicFeatures:typeof adExtensionDynamicFeatures!==\"undefined\"?adExtensionDynamicFeatures:undefined,\"adExtensionStaticFeatures\" in locals_for_with?locals_for_with.adExtensionStaticFeatures:typeof adExtensionStaticFeatures!==\"undefined\"?adExtensionStaticFeatures:undefined,\"appendLearnMoreLink\" in locals_for_with?locals_for_with.appendLearnMoreLink:typeof appendLearnMoreLink!==\"undefined\"?appendLearnMoreLink:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isDSAMixedModeCampaignEnabled\" in locals_for_with?locals_for_with.isDSAMixedModeCampaignEnabled:typeof isDSAMixedModeCampaignEnabled!==\"undefined\"?isDSAMixedModeCampaignEnabled:undefined,\"objective\" in locals_for_with?locals_for_with.objective:typeof objective!==\"undefined\"?objective:undefined,\"otherExtensions\" in locals_for_with?locals_for_with.otherExtensions:typeof otherExtensions!==\"undefined\"?otherExtensions:undefined,\"suggestedExtensions\" in locals_for_with?locals_for_with.suggestedExtensions:typeof suggestedExtensions!==\"undefined\"?suggestedExtensions:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (editMode, i18n, i18nGlobal, isDisplayPlusDisplayAd, isSTADisabled, permissions, showInline, showSaveAndCreateAnother) {\n\n\n\npug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"fwLink\"] = pug_interp = function(linkId, displayText, ariaLabelContext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", 'https://go.microsoft.com/fwlink/?linkid=' + linkId, true, true)+\" target=\\\"_blank\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"fwLink\"] = pug_interp = function(linkId, displayText, ariaLabelContext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", 'https://go.microsoft.com/fwlink/?linkid=' + linkId, true, true)+\" target=\\\"_blank\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"migrationWarning\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-12 form-group\\\" data-bind=\\\"visible: showMigrationAlertForEXTA() || showMigrationAlertForSTA() || showSTAEndWarning()\\\"\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showMigrationAlertForEXTA()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isSTADisabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"switchBackToSTA form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ExpandedTextAd_Migration_SwitchBackToSTA')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration_EndSupport') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showMigrationAlertForSTA()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('ExpandedTextAd_Migration_Consider') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"switchBackToEXTA form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('ExpandedTextAd_Migration_SwitchBackToEXTA')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54538\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" data-bind=\\\"visible: showSTAEndWarning()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('STA_End_Warning') + ' ')) ? \"\" : pug_interp)) + \"\\u003Cspan\\u003E | \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"help:app54537\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"crawlImgAgreementAlert\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\";\nvar link = '' + i18n.getString('SharedLibrary_UrlOptions_CrawlImgLandPage_AlertMessage_Link') + ''\npug_html = pug_html + (null == (pug_interp = i18n.getString('SharedLibrary_UrlOptions_CrawlImgLandPage_AlertMessage_Improve_MMA').replace('{0}', link)) ? \"\" : pug_interp) + \"\\u003Cspan\\u003E \\u003C\\u002Fspan\\u003E\\u003Ca class=\\\"HelpTopic\\\" query=\\\"ext52034\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"form-horizontal\",showInline ? '' : 'adEditor-container'], [false,true]), false, true)) + \"\\u003E\\u003Cdiv data-bind=\\\"attr:{class: containerClass}\\\"\\u003E\";\nif (!showInline) {\npug_html = pug_html + \"\\u003Ch5\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Create_Description')) ? \"\" : pug_interp)) + \"\\u003Cspan\\u003E \";\npug_mixins[\"fwLink\"]('832330', i18n.get('Ad_Create_Description_Tip'), i18n.get('Ad_Create_Description'));\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh5\\u003E\";\n}\npug_mixins[\"migrationWarning\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\" data-bind=\\\"visible: showAdTypeWithErrors()\\\"\\u003E\";\nif (!showInline) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: showAdType()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 control-label\\\"\\u003E\\u003Clabel id=\\\"adTypeLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Ad_Type')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_NewAdCreate_AdType', i18n.get('Ad_Type'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003C!--ko if: adTypeOptions().length--\\u003E\\u003Cselect class=\\\"ad-types form-control\\\" data-bind=\\\"options: adTypeOptions, optionsText: "Name", optionsValue: "Value", value: Type, disable: disableAdType\\\" aria-labelledby=\\\"adTypeLabel\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!--ko if: Type() === 'ResponsiveSearch'--\\u003E\";\nif (permissions.IsRSAAsDefaultType) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = (i18n.get('RSA_As_Default_Type') + ' ')) ? \"\" : pug_interp)) + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" query=\\\"app54667\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", (i18n.getString('Click to learn more about {{item}}')).replace('{{item}}', i18n.getString('RSA_As_Default_Type')), true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + (\"\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko foreach: availableAdTypes--\\u003E\\u003Cdiv data-bind=\\\"attr: { "data-type": $data }, visible: $root.Type() === $data\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: errors.isAppealable()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-offset-2 col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"editorial-appeal-panel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-info form-group\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (pug.escape(null == (pug_interp = ((editMode ? i18n.get('Ads_Edited_Latency') : i18n.get('Ads_Created_Latency')) + ' ')) ? \"\" : pug_interp)));\npug_mixins[\"fwLink\"]('832333', i18n.get('LearnMoreLinkText'), editMode ? i18n.get('Ads_Edited_Latency') : i18n.get('Ads_Created_Latency'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"crawlImgAgreementAlert\"]();\nif (!showInline && !isDisplayPlusDisplayAd) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"save-bar form-group appEditor-save-container\\\"\\u003E\\u003Cinput\" + (\" class=\\\"save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Save'), true, true)+\" data-bind=\\\"enable: hasWebsiteImageOptedInObservable\\\"\") + \"\\u003E\";\nif (showSaveAndCreateAnother) {\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"save-create-another btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Ad_SaveCreate'), true, true)+\" data-bind=\\\"enable: hasWebsiteImageOptedInObservable\\\"\") + \"\\u003E\";\n}\npug_html = pug_html + \"\\u003Cinput\" + (\" class=\\\"cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18nGlobal.get('Button_Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"editMode\" in locals_for_with?locals_for_with.editMode:typeof editMode!==\"undefined\"?editMode:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"i18nGlobal\" in locals_for_with?locals_for_with.i18nGlobal:typeof i18nGlobal!==\"undefined\"?i18nGlobal:undefined,\"isDisplayPlusDisplayAd\" in locals_for_with?locals_for_with.isDisplayPlusDisplayAd:typeof isDisplayPlusDisplayAd!==\"undefined\"?isDisplayPlusDisplayAd:undefined,\"isSTADisabled\" in locals_for_with?locals_for_with.isSTADisabled:typeof isSTADisabled!==\"undefined\"?isSTADisabled:undefined,\"permissions\" in locals_for_with?locals_for_with.permissions:typeof permissions!==\"undefined\"?permissions:undefined,\"showInline\" in locals_for_with?locals_for_with.showInline:typeof showInline!==\"undefined\"?showInline:undefined,\"showSaveAndCreateAnother\" in locals_for_with?locals_for_with.showSaveAndCreateAnother:typeof showSaveAndCreateAnother!==\"undefined\"?showSaveAndCreateAnother:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isAutoTargetCampaign, maxAdGroupsError) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"row-fluid adgroups-keywords__container\\\"\\u003E\\u003Cdiv class=\\\"ad-group-list-container col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"landing-page-container col-sm-9\\\" data-bind=\\\"visible: showLandingPage, css: { "ad-group--no-toggle": hasOneAdGroup() }\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ad-group-list pull-left col-sm-12\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"filter-clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"alert alert-danger\\\" id=\\\"MaxAdGroupsError\\\" data-bind=\\\"visible: showAdGroupLimitError, attr: {"aria-hidden": !showAdGroupLimitError}\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko if: showAdGroupLimitError --\\u003E\" + (pug.escape(null == (pug_interp = maxAdGroupsError) ? \"\" : pug_interp)) + \"\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput\" + (\" class=\\\"btn btn-default btn-create-adgroup\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('AdGroup_Label_AddButton'), true, true)+\" data-bind=\\\"visible: !hasMaxAdGroups()\\\" aria-describedby=\\\"MaxAdGroupsError\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isAutoTargetCampaign) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"keyword-planner-root container-fluid col-sm-6\\\" data-bind=\\\"style: {marginTop: keywordPlannerTopValuePixel()}, visible: isKeywordPlannerEnabled()\\\"\\u003E\\u003Cdiv class=\\\"keyword-planner-container container-fluid\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"filter-clear\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isAutoTargetCampaign\" in locals_for_with?locals_for_with.isAutoTargetCampaign:typeof isAutoTargetCampaign!==\"undefined\"?isAutoTargetCampaign:undefined,\"maxAdGroupsError\" in locals_for_with?locals_for_with.maxAdGroupsError:typeof maxAdGroupsError!==\"undefined\"?maxAdGroupsError:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (helpId, i18n, showSelectAllOnPage, title) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"title\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = title) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"](helpId, title, i18n);\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"searchbox form-horizontal url col-sm-12\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"searchbox form-horizontal keywords col-sm-11\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"keyword-planner-search-button btn clickable\\\"\"+\" tabIndex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"aria-label\", i18n.get('KeywordPlanner_SearchTerm'), true, true)+\" data-bind=\\\"attr: { disabled: allLocationsUnsupported() ? "disabled" : null }\\\"\") + \"\\u003E\\u003Cdiv class=\\\"filter_search_icon_small\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group keyword-planner-content\\\"\\u003E\\u003Cdiv area-live=\\\"polite\\\"\\u003E\\u003Cdiv class=\\\"alert alert-warning col-sm-12\\\" data-bind=\\\"visible: excludedLocationsWarning(), text: excludedLocationsWarning()\\\" role=\\\"alert\\\" aria-live=\\\"polite\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning no-suggestion-note col-sm-12\\\" data-bind=\\\"visible: noSuggestionNote, html: noSuggestionNote\\\" role=\\\"alert\\\" aria-live=\\\"polite\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"grid keyword-planner\\\" data-bind=\\\"visible: isKeywordPlannerVisible\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (showSelectAllOnPage) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"suggested-keyword-select-all-on-page\\\" data-bind=\\\"visible: isKeywordPlannerVisible\\\"\\u003E\\u003Ca class=\\\"select-all-on-page\\\" href=\\\"javascript:void(0);\\\"\\u003E\\u003Cspan class=\\\"arrow-back-double\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan data-bind=\\\"text: selectMultiIdeasText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"visible: isKeywordPlannerVisible\\\"\\u003E\\u003Cdiv class=\\\"pagination_host\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"off-screen\\\" aria-live=\\\"polite\\\" data-bind=\\\"text: recentUserActionPrompt()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"helpId\" in locals_for_with?locals_for_with.helpId:typeof helpId!==\"undefined\"?helpId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showSelectAllOnPage\" in locals_for_with?locals_for_with.showSelectAllOnPage:typeof showSelectAllOnPage!==\"undefined\"?showSelectAllOnPage:undefined,\"title\" in locals_for_with?locals_for_with.title:typeof title!==\"undefined\"?title:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {pug_html = pug_html + \"\\u003Cspan class=\\\"clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\\u003Cspan class=\\\"arrow-back-double\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fspan\\u003E\";}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {pug_html = pug_html + \"\\u003Cspan class=\\\"clickable\\\" tabindex=\\\"0\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (data, i18n) {pug_mixins[\"toolbar\"] = pug_interp = function(data){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"advanced-keyword-planner-toolbar\\\"\\u003E\\u003Cdiv class=\\\"input-group\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary apply-to-adgroups dropdown-toggle\\\" data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_ApplyToAdGroups')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"caret caret-dropdown\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default cancel-panel\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_Close')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cul class=\\\"dropdown-menu copy-dropdown\\\" role=\\\"menu\\\"\\u003E\\u003Cli\\u003E\\u003Ca class=\\\"add-to-new-adgroup\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_ApplyToNewAdGroup')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Ca class=\\\"add-to-all-adgroups\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_ApplyToAllAdGroups')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"grid-submenu-flyout\\\"\\u003E\\u003Ca href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_ApplyToSelectedAdGroups')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"caret caret-right caret-dropdown\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cul class=\\\"grid-groupmenu dropdown-menu adgroups-list\\\" role=\\\"menu\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003C!--ko foreach: adgroups--\\u003E\\u003Cli\\u003E\\u003Ca class=\\\"grid-submenu-item\\\" onclick=\\\"event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Clabel class=\\\"normal-font\\\"\\u003E\\u003Cinput class=\\\"margin-right-little\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: $data.checked\\\"\\u003E\\u003Cspan data-bind=\\\"text: $data.isUnnamed ? $data.defaultName() : $data.name()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cli class=\\\"divider\\\"\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Ca class=\\\"add-to-some-adgroups\\\" href=\\\"javascript:void(0);\\\" tabindex=\\\"-1\\\" role=\\\"menuitem\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_Button_Add')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"toolbar\"](data);\npug_html = pug_html + \"\\u003Cdiv class=\\\"advanced-keyword-planner bingadsgrid\\\"\\u003E\\u003Cdiv class=\\\"grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"data\" in locals_for_with?locals_for_with.data:typeof data!==\"undefined\"?data:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isForVNext) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"row landing-page-container\\\"\\u003E\\u003Cdiv\\u003E\\u003Cdiv class=\\\"pull-left\\\"\\u003E\\u003Clabel class=\\\"landing-page-container__label\\\" id=\\\"KeywordPlanner_LandingPage_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_Label_LandingPage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Keywords_Website', i18n.get('KeywordPlanner_Label_LandingPage'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\nif (!isForVNext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left\\\"\\u003E\\u003Cinput class=\\\"landing-page-container__checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isNotReady\\\" aria-labelledby=\\\"KeywordPlanner_LandingNotReady_Label\\\"\\u003E\\u003Cspan id=\\\"KeywordPlanner_LandingNotReady_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_Label_LandingNotReady')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cinput\" + (\" class=\\\"form-control\\\"\"+\" type=\\\"text\\\" data-bind=\\\"value: url, disable: isNotReady, attr: {"aria-disabled": isNotReady() ? "true" : "false"} \\\"\"+pug.attr(\"placeholder\", i18n.get('KeywordPlanner_LandingPagePlaceholder'), true, true)+\" aria-labelledby=\\\"KeywordPlanner_LandingPage_Label\\\"\") + \"\\u003E\";\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left\\\"\\u003E\\u003Cinput class=\\\"landing-page-container__checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isNotReady\\\" aria-labelledby=\\\"KeywordPlanner_LandingNotReady_Label\\\"\\u003E\\u003Cspan id=\\\"KeywordPlanner_LandingNotReady_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('KeywordPlanner_Label_LandingNotReady')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (helpId, i18n) {pug_mixins[\"helpLink\"] = pug_interp = function(topic, displayText, ariaLabelContext, fBindContext, fBindQuery, onLinkClickUrl){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nif (onLinkClickUrl) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"DelegateLink\\\"\"+pug.attr(\"href\", onLinkClickUrl, true, true)+\" target=\\\"_blank\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\nif (fBindContext) {\nif (fBindQuery) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"data-bind\", 'attr: { \"query\": \"help:\" + ' + topic + ', \"aria-label\": ' + ariaLabelContext + '+\" \"+\"' + displayText + '\" }', true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"query\", 'help:' + topic, true, true)+pug.attr(\"data-bind\", 'attr: { \"aria-label\": ' + ariaLabelContext + '+\" \"+\"' + displayText + '\" }', true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n}\nelse {\nif (fBindQuery) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"data-bind\", 'attr: { \"query\": \"help:\" + ' + topic + '}', true, true)+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"query\", 'help:' + topic, true, true)+pug.attr(\"aria-label\", (ariaLabelContext || '') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n}\n}\n};\npug_mixins[\"helpLink\"](helpId, i18n.get('LearnMoreLinkText'));}.call(this,\"helpId\" in locals_for_with?locals_for_with.helpId:typeof helpId!==\"undefined\"?helpId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"mixed-mode-adgroup-create\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cdiv class=\\\"dynamic-adgroup-creation-section-container\\\" data-bind=\\\"visible: !hasDisclaimerSettings() || allowDisclaimer()\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Ca class=\\\"col-sm-12\\\" id=\\\"dynamicAdGroupSectionTitle\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#dynamicAdGroupSection\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: { "aria-expanded": isDynamicAdGroupSectionExpanded() ? "true" : "false" }\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign\\\" data-bind=\\\"css: isDynamicAdGroupSectionExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dynamic_AdGroups_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fh3\\u003E\\u003Cdiv class=\\\"collapse in\\\" id=\\\"dynamicAdGroupSection\\\" data-section=\\\"dynamic\\\"\\u003E\\u003Cp class=\\\"section-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('MixedMode_DynamicAdGroupSection_Description')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:56794\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fp\\u003E\\u003Cdiv class=\\\"dsa-settings-container form-horizontal\\\" data-bind=\\\"visible: hasDSASettings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dynamic-ad-group-create-view-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"standard-adgroup-creation-section-container\\\"\\u003E\\u003Ch3 class=\\\"type-bold\\\"\\u003E\\u003Ca class=\\\"col-sm-12\\\" id=\\\"standardAdGroupSectionTitle\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#standardAdGroupSection\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: { "aria-expanded": isStandardAdGroupSectionExpanded() ? "true" : "false" }\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign\\\" data-bind=\\\"css: isStandardAdGroupSectionExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Standard_AdGroups_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fh3\\u003E\\u003Cdiv class=\\\"collapse\\\" id=\\\"standardAdGroupSection\\\" data-section=\\\"standard\\\"\\u003E\\u003Cp class=\\\"section-description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('MixedMode_StandardAdGroupSection_Description')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:app54522\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fp\\u003E\\u003Cdiv class=\\\"standard-ad-group-create-view-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, uuid) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"deletedConfirmation\"] = pug_interp = function(message){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"deletedConfirmation alert alert-success\\\"\"+pug.attr(\"data-bind\", 'text: ' + message, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\nvar id = uuid.v4();\nvar label_collapse = i18n.get('AdGroup_Label_Collapse');\nvar label_expand = i18n.get('AdGroup_Label_Expand');\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"visible: !isDeleted()\\\"\\u003E\\u003Cdiv class=\\\"accordion-with-popup-help\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"row accordion-toggle\\\"\"+\" data-toggle=\\\"collapse\\\"\"+pug.attr(\"data-target\", '#'+id, true, true)+pug.attr(\"data-bind\", 'attr: {\"aria-expanded\": isOpen() ? \"true\" : \"false\", \"tabindex\": isOnlyAdGroup() ? \"-1\" : \"0\", \"aria-label\": isOnlyAdGroup() ? \"\" : (isOpen() ? \"' + label_collapse + '\":\"' + label_expand + '\"), \"role\": isOnlyAdGroup() ? \"group\" : \"button\"}, css: { \"clickable\": !isOnlyAdGroup() }', true, true)+pug.attr(\"aria-describedby\", 'AdGroup_Name_Label-'+id, true, true)) + \"\\u003E\\u003Cdiv class=\\\"col-sm-1 ad-group-list__col-sm-1--toggle\\\"\\u003E\\u003Cspan class=\\\"glyphicon ad-group-list__glyphicon\\\" data-bind=\\\"css: {"glyphicon-chevron-down": !isOpen(), "glyphicon-chevron-up": isOpen()}, visible: !isOnlyAdGroup()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-10 pull-left\\\"\\u003E\\u003Clabel\" + (\" class=\\\"ad-group-list__col-sm-1__label\\\"\"+pug.attr(\"id\", 'AdGroup_Name_Label-'+id, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroup_Label_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Keywords_AdGroupName', i18n.get('AdGroup_Label_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 ad-group-list__col-sm-1--toggle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-9 pull-left adgroup__body\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cinput\" + (\" class=\\\"adgroup-name form-control\\\"\"+\" type=\\\"text\\\"\"+pug.attr(\"data-bind\", 'textInput: Name, css: {\"validation-error\": !Name.isValid() || isNameDuplicate()}, attr: {\"aria-invalid\": !Name.isValid(), \"aria-describedby\": \"AdGroupNameError-\" + \"' + id + '\" + (isNameDuplicate() ? \" DuplicateAdGroupNameError-\" + \"' + id + '\" : \"\") + \" Name_CharactersRemaining-\" + \"' + id + '\"}', true, true)+pug.attr(\"aria-labelledby\", 'AdGroup_Name_Label-'+id, true, true)+\" aria-required=\\\"true\\\"\") + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Name', 'Name_CharactersRemaining-' + id);\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"visible: shouldValidateName()\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('Name', 'AdGroupNameError-' + id);\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv\" + (\" class=\\\"error name-duplicate-error\\\"\"+\" data-bind=\\\"visible: isNameDuplicate(), attr: {"aria-hidden": !isNameDuplicate()}\\\"\"+pug.attr(\"id\", 'DuplicateAdGroupNameError-' + id, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C!-- ko if: isNameDuplicate --\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroup_Message_DuplicateAdGroupName')) ? \"\" : pug_interp)) + \"\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"ad-group-collapsible collapse in\\\"\"+pug.attr(\"id\", id, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1 ad-group-list__col-sm-1--remove\\\"\\u003E\\u003Ca class=\\\"clickable glyphicon glyphicon-remove ad-group-list__glyphicon\\\" data-bind=\\\"visible: !isOnlyAdGroup(), attr: {"aria-label": removeButtonLabel() }\\\" role=\\\"button\\\" tabindex=\\\"0\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Remove')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\" data-bind=\\\"visible: isDeleted()\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 ad-group-list__col-sm-1--toggle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-9\\\"\\u003E\";\npug_mixins[\"deletedConfirmation\"]('deletedConfirmationMessage');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"visible: !hide()\\\"\\u003E\\u003Cdiv class=\\\"checkbox checkbox-copy\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: copySetting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_CopySettings')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Settings_UseAnother', i18n.get('Campaign_CopySettings'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-control-static copy-settings\\\" data-bind=\\\"visible: copySetting\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (IsCampaignMultipleLanguageEnabled, i18n, isExperiment, isOppotunityCampaignLevel, isSignUpPage, popupIds, showLanguage) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\n\n\n\n\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-horizontal campaign-settings__container\\\"\\u003E\\u003Cinput id=\\\"CampaignId\\\" type=\\\"hidden\\\" data-bind=\\\"value: Id\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel id=\\\"Campaign_Name_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = isExperiment ? i18n.get('Experiment_Name') : i18n.get('Campaign_Name')) ? \"\" : pug_interp)) + \"\\u003Cspan style=\\\"color:rgb(164, 38, 44);\\\"\\u003E\" + (pug.escape(null == (pug_interp = ' *') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.CampaignName, i18n.get('Campaign_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-4\\\" role=\\\"presentation\\\"\\u003E\\u003Cinput\" + (\" class=\\\"name form-control\\\"\"+\" data-bind=\\\"value: Name, valueUpdate: "input", attr: {"aria-invalid": !Name.isValid()}, css: {"validation-error": !Name.isValid()}\\\"\"+pug.attr(\"placeholder\", i18n.get('CampaignSetting_Placeholder_Name'), true, true)+\" type=\\\"text\\\" aria-required=\\\"true\\\" aria-describedby=\\\"CampaignNameErrors Name_CharactersRemaining\\\" aria-labelledby=\\\"Campaign_Name_Label\\\"\"+pug.attr(\"disabled\", isOppotunityCampaignLevel, true, true)) + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Name');\npug_html = pug_html + \"\\u003Cdiv class=\\\"clear\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('Name', 'CampaignNameErrors');\npug_html = pug_html + \"\\u003Cdiv class=\\\"copy-campaign-settings\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"if: showCampaignGoal()\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Goal')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-4 form-control-static\\\"\\u003E\\u003Cspan data-bind=\\\"text: campaignGoalText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"if: showTimeZoneText()\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_TimeZone')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Settings_TimeZone', i18n.get('Campaign_TimeZone'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-4 form-control-static\\\"\\u003E\\u003Cspan data-bind=\\\"text: timeZoneText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isSignUpPage && !isOppotunityCampaignLevel) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\";\nif (isExperiment) {\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Label_Experiment_Budget')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Label_Budget')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.Budget, i18n.get('Label_Budget'), i18n);\n}\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"budget-alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"budget\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C!-- ko if: isMixedDSACampaignRecommendation--\\u003E\\u003Cdiv class=\\\"dsa-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\";\nif (showLanguage && !IsCampaignMultipleLanguageEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Language')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.Language, i18n.get('Campaign_Language'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-4 language-setting\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C!-- ko if: shouldShowSponsoredCampaignCashbackOptIn--\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput class=\\\"sponsored-campaign-cashback--switch\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isSponsoredCampaignCashbackOptedIn, disable: isSponsoredCampaignCashbackOptInReadonly\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Enable_Cashback_Promotions_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv class=\\\"bidding-strategy__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isOppotunityCampaignLevel) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"location-targets\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (showLanguage && IsCampaignMultipleLanguageEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group language-container\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Language')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.MultiLanguage, i18n.get('Campaign_Language'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-8 language-setting\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group language-error-container\\\" data-bind=\\\"css: { hide: !languageError() }\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error col-sm-8\\\" data-bind=\\\"text: languageError\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"rsa-auto-assets-setting-container\\\" data-bind=\\\"visible: hasRsaAutoAssets\\\"\\u003E\\u003Cdiv class=\\\"form-group rsa-auto-assets-setting-form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignSetting_RsaAutoAssets_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_RSA_AutoAssets', i18n.get('CampaignSetting_RsaAutoAssets_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-8 rsa-auto-assets-setting-panel\\\"\\u003E\\u003Cdiv class=\\\"rsa-auto-assets-switch-container\\\"\\u003E\\u003Clabel class=\\\"checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"rsa-auto-assets-switch\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isRsaAutoAssetsSettingChecked\\\"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignSetting_RsaAutoAssets_Enable')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"disclaimer__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- ko if: isMixedDSACampaignCreate--\\u003E\\u003Cdiv class=\\\"mixed-mode-dsa-settings-container\\\"\\u003E\\u003Cdiv class=\\\"form-group mixed-mode-dsa-settings-form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Mixed_Mode_DSA_Settings_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_DSA_DynamicSearchAds', i18n.get('Campaign_Mixed_Mode_DSA_Settings_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-8 mixed-model-dsa-settings-panel\\\"\\u003E\\u003Cdiv class=\\\"dsa-switch-container\\\"\\u003E\\u003Cdiv class=\\\"form-control-static description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Campaign_Mixed_Mode_DSA_Settings_Text')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:56794\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Clabel class=\\\"checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"dsa-switch\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isMixedModeDSASettingsChecked, enable: enableMixedModeDSASettings()\\\"\\u003E\\u003Cdiv class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EnableMixedModeDSASettings')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dsa-settings-container\\\" data-bind=\\\"visible: isMixedModeDSASettingsChecked\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: shouldShowCashbackSettings--\\u003E\\u003Cdiv class=\\\"cashback-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Cdiv class=\\\"audienceSettings__container impression-tracking-urls\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"broad-only-setting-container\\\" data-bind=\\\"visible: hasBroadOnlySetting\\\"\\u003E\\u003Cdiv class=\\\"form-group broad-only-setting-form-group\\\"\\u003E\\u003Ch2 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignSetting_BroadOnly_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_RSA_EnableBroadOnly', i18n.get('CampaignSetting_BroadOnly_Title'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"col-sm-8 broad-only-setting-panel\\\"\\u003E\\u003Cdiv class=\\\"form-control-static description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('CampaignSetting_BroadOnly_Description')) ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:app54634\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CampaignSetting_BroadOnly_LearnMore')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"broad-only-setting\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!--ko if: showVanityUrlSettings()--\\u003E\\u003Cdiv class=\\\"vanity-url-option\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"IsCampaignMultipleLanguageEnabled\" in locals_for_with?locals_for_with.IsCampaignMultipleLanguageEnabled:typeof IsCampaignMultipleLanguageEnabled!==\"undefined\"?IsCampaignMultipleLanguageEnabled:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isExperiment\" in locals_for_with?locals_for_with.isExperiment:typeof isExperiment!==\"undefined\"?isExperiment:undefined,\"isOppotunityCampaignLevel\" in locals_for_with?locals_for_with.isOppotunityCampaignLevel:typeof isOppotunityCampaignLevel!==\"undefined\"?isOppotunityCampaignLevel:undefined,\"isSignUpPage\" in locals_for_with?locals_for_with.isSignUpPage:typeof isSignUpPage!==\"undefined\"?isSignUpPage:undefined,\"popupIds\" in locals_for_with?locals_for_with.popupIds:typeof popupIds!==\"undefined\"?popupIds:undefined,\"showLanguage\" in locals_for_with?locals_for_with.showLanguage:typeof showLanguage!==\"undefined\"?showLanguage:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (appendLearnMoreLink, errId, i18n, isForVNext, isNegativeKeyword, popupIds, uuid) {pug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\nvar errorId = uuid.v4();\npug_mixins[\"keywordInput\"] = pug_interp = function(i18n, isNegativeKeyword){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar attributes = {};\nattributes.rows = isNegativeKeyword ? 10 : 18;\nif (!isNegativeKeyword) {\nattributes['aria-labelledby'] ='Keyword_EnterKeywords_Label';\nattributes['aria-describedby'] ='keyword_placeholder ' + 'Error-' + errorId;\nattributes['aria-required'] ='true'\n}\npug_html = pug_html + \"\\u003Ctextarea\" + (pug.attrs(pug.merge([{\"class\": \"keyword-textarea form-control\",\"data-bind\": \"textInput: keywordsTextareaVal, css: { error: !validate() && isAfterFirstInteraction() }, attr: { "aria-invalid": !validate() && isAfterFirstInteraction() }\",\"placeholder\": pug.escape((isNegativeKeyword ? '' : i18n.get('Keyword_Label_TextareaDefault')))},attributes]), true)) + \"\\u003E\\u003C\\u002Ftextarea\\u003E\";\n};\npug_mixins[\"keywordInputError\"] = pug_interp = function(errId){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"create-keywords-errors\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('keywordsTextareaVal', 'Error-' + errorId);\npug_html = pug_html + \"\\u003Cdiv class=\\\"create-keywords-panel__errors\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\nif (!isNegativeKeyword) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Clabel id=\\\"Keyword_EnterKeywords_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Keyword_Label_EnterKeywords')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.EnterKeywords, i18n.get('Keyword_Label_EnterKeywords'), i18n);\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Keyword_Label_MatchType'), 'app51021')) ? \"\" : pug_interp) + \"\\u003C\\u002Fp\\u003E\";\n}\npug_html = pug_html + \"\\u003C!--ko if: !keywordsTextareaVal()--\\u003E\\u003Clabel class=\\\"displayNone\\\" id=\\\"keyword_placeholder\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('Keyword_Label_TextareaDefault')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C!--\\u002Fko--\\u003E\";\npug_mixins[\"keywordInput\"](i18n, isNegativeKeyword);\npug_mixins[\"keywordInputError\"](errId);\nif (!isForVNext) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Keyword_Label_MatchType'), 'app51021')) ? \"\" : pug_interp) + \"\\u003C\\u002Fp\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-warning form-group\\\" id=\\\"Keyword_Bmm_Warning_Div\\\" data-bind=\\\"visible: showBmmWarningAlert()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Keyword_Bmm_Warning'), 'app51021')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-warning form-group\\\" id=\\\"Keyword_Bmm_Warning_Div\\\" data-bind=\\\"visible: showMutableKeywordMatchTypAlert()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Keyword_Bmm_Match_Type_Mutate_Warning'), '', {}, 'https://help.ads.microsoft.com/#apex/bae/en/14053/1')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert alert-danger form-group\\\" id=\\\"Keyword_Bmm_Block_Div\\\" data-bind=\\\"visible: showBmmBlockAlert()\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = appendLearnMoreLink(i18n.get('Keyword_Bmm_Block'), 'app51021')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_mixins[\"keywordInput\"](i18n, isNegativeKeyword);\npug_mixins[\"keywordInputError\"](errId);\n}}.call(this,\"appendLearnMoreLink\" in locals_for_with?locals_for_with.appendLearnMoreLink:typeof appendLearnMoreLink!==\"undefined\"?appendLearnMoreLink:undefined,\"errId\" in locals_for_with?locals_for_with.errId:typeof errId!==\"undefined\"?errId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined,\"isNegativeKeyword\" in locals_for_with?locals_for_with.isNegativeKeyword:typeof isNegativeKeyword!==\"undefined\"?isNegativeKeyword:undefined,\"popupIds\" in locals_for_with?locals_for_with.popupIds:typeof popupIds!==\"undefined\"?popupIds:undefined,\"uuid\" in locals_for_with?locals_for_with.uuid:typeof uuid!==\"undefined\"?uuid:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isSignUp, popupIds, showOnlyKeywords) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koErrors\"] = pug_interp = function(id, cssClass){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"class\", pug.classes([cssClass ? cssClass : 'alert alert-danger'], [true]), false, true)+\" data-bind=\\\"visible: errors().length > 0, foreach: errors, attr: {"aria-hidden": errors().length == 0}\\\"\"+pug.attr(\"id\", id ? id : 'KoErrors', true, true)) + \"\\u003E\\u003Cli\\u003E\\u003Cdiv data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\nif (!showOnlyKeywords) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-10 row\\\"\\u003E\";\npug_mixins[\"koErrors\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-10 pull-left\\\"\\u003E\\u003Clabel class=\\\"ad-group-list__col-sm-1__label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AdGroup_Label_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.AdGroupName, i18n.get('AdGroup_Label_Name'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4 pull-left\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cinput\" + (\" class=\\\"form-control name\\\"\"+\" type=\\\"text\\\" data-bind=\\\"textInput: Name, css: {"error": !Name.isValid()}\\\"\"+pug.attr(\"placeholder\", i18n.get('AdGroup_NamePlaceholder'), true, true)+\" aria-describedby=\\\"Name_CharactersRemaining\\\"\") + \"\\u003E\";\npug_mixins[\"koCharactersRemaining\"]('Name');\npug_mixins[\"koValidationError\"]('Name');\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"ads-section__container container-fluid\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"add-keywords-root row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"parser\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isSignUp) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"keyword-planner-root\",\"container-fluid\",isSignUp ? 'col-sm-4' : 'col-sm-6'], [false,false,true]), false, true)+\" data-bind=\\\"visible: showKeywordPlanner\\\"\") + \"\\u003E\\u003Cdiv class=\\\"keyword-planner-container container-fluid\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isSignUp\" in locals_for_with?locals_for_with.isSignUp:typeof isSignUp!==\"undefined\"?isSignUp:undefined,\"popupIds\" in locals_for_with?locals_for_with.popupIds:typeof popupIds!==\"undefined\"?popupIds:undefined,\"showOnlyKeywords\" in locals_for_with?locals_for_with.showOnlyKeywords:typeof showOnlyKeywords!==\"undefined\"?showOnlyKeywords:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, isDomesticSimplifiedChineseEnabled, popupIds) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this)\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"koValidationError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cul\" + (pug.attr(\"data-bind\", 'visible: !' + item + '.isValid(), foreach: ' + item + '.errors, attr: {\"aria-hidden\": ' + item + '.isValid()}', true, true)+pug.attr(\"id\", id ? id : item + 'ValidationError', true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cli role=\\\"presentation\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: $data\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel id=\\\"Campaign_DomainName_Label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Settings_DomainName')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Settings_DSAWebsite', i18n.getString('Campaign_Settings_DomainName'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cinput class=\\\"dsa-domainname-input form-control\\\" data-bind=\\\"value:DomainName, disable: disabled\\\" aria-describedby=\\\"Campaign_Website_Tip\\\" aria-labelledby=\\\"Campaign_DomainName_Label\\\"\\u003E\";\npug_mixins[\"koValidationError\"]('DomainName');\npug_html = pug_html + \"\\u003Cdiv class=\\\"pull-left form-hint\\\" id=\\\"Campaign_Website_Tip\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Dsa_Campaign_Website_Tip')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Settings_DomainLanguage_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Settings_WebsiteLanguage', i18n.getString('Campaign_Settings_DomainLanguage_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Fh5\\u003E\";\nif (isDomesticSimplifiedChineseEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"form-control-static website-language-setting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Language_SimplifiedChinese')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"form-control-static website-language-setting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Language_English')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C!--ko if: isTargetingSourceEnabled--\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Ch5 class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_TargetingSource')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"](popupIds.TargetingSource, i18n.getString('Campaign_TargetingSource'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Fh5\\u003E\\u003Cdiv class=\\\"col-sm-10 dsa-targeting-source\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!--ko if: isDynamicDescriptionPhase1Enabled--\\u003E\\u003Clabel class=\\\"checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"dynamic-description-switch\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isDynamicDescriptionChecked\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DynamicDescriptionEnabled')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_DSA_DynamicDescriptions', i18n.getString('DynamicDescriptionEnabled'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003C!-- \\u002Fko--\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isDomesticSimplifiedChineseEnabled\" in locals_for_with?locals_for_with.isDomesticSimplifiedChineseEnabled:typeof isDomesticSimplifiedChineseEnabled!==\"undefined\"?isDomesticSimplifiedChineseEnabled:undefined,\"popupIds\" in locals_for_with?locals_for_with.popupIds:typeof popupIds!==\"undefined\"?popupIds:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cform class=\\\"bulk-appeal\\\" id=\\\"bulkAppealForm\\\" style=\\\"display: none;\\\"\\u003E\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('AppealExceptionButton')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003Cdiv class=\\\"editor\\\" id=\\\"bulkAppealContainer\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\"\\u003E\\u003Cinput\" + (\" class=\\\"button btn btn-primary appeal\\\"\"+\" id=\\\"bulkAppealButton\\\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('AppealExceptionButton'), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"button btn btn-default cancel\\\"\"+\" id=\\\"bulkCancelButton\\\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fform\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, rowId) {pug_html = pug_html + \"\\u003Cdiv class=\\\"appeal-button-panel\\\"\\u003E\\u003Cinput\" + (\" class=\\\"button button-highlighted btn btn-primary appeal\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"data-rowid\", rowId, true, true)+pug.attr(\"id\", 'CreateInlineAppeal_' + rowId, true, true)+pug.attr(\"value\", i18n.get('AppealExceptionButton'), true, true)) + \"\\u003E\\u003Cinput\" + (\" class=\\\"cancel-btn btn btn-default cancel\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"data-rowid\", rowId, true, true)+pug.attr(\"id\", 'CancelInlineAppeal_' + rowId, true, true)+pug.attr(\"value\", i18n.get('BulkEdit_CancelButton'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"rowId\" in locals_for_with?locals_for_with.rowId:typeof rowId!==\"undefined\"?rowId:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, rowId) {pug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cinput\" + (\" class=\\\"appeal-button-panel btn btn-primary cancel\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"data-rowid\", rowId, true, true)+pug.attr(\"id\", 'CancelInlineAppeal_' + rowId, true, true)+pug.attr(\"value\", i18n.get('BulkEdit_CancelButton'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"rowId\" in locals_for_with?locals_for_with.rowId:typeof rowId!==\"undefined\"?rowId:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (controlId, i18n, infoMsg, isForVNext) {pug_mixins[\"koError\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"data-bind\", 'if: ' + item + '().length > 0, attr: {\"aria-hidden\": ' + item + '().length == 0}', true, true)+pug.attr(\"id\", id ? id : item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"error\\\"\"+pug.attr(\"data-bind\", 'html: ' + item, true, true)+\" role=\\\"alert\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"koCharactersRemaining\"] = pug_interp = function(item, id){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"remaining-hint help-block\\\"\\u003E\\u003Cspan\" + (pug.attr(\"data-bind\", 'text:' + item + '.char_rem', true, true)+pug.attr(\"id\", id ? id : item + '_CharactersRemaining', true, true)+\" role=\\\"status\\\" aria-live=\\\"polite\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"form-horizontal panel\\\"\"+pug.attr(\"id\", 'EditorialAppeal_Full_' + controlId, true, true)) + \"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"col-sm-offset-2 col-sm-10 ad-info\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_AdInfo', true, true)) + \"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_AdsSummaryText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cul class=\\\"appeal-adinfo\\\"\\u003E\\u003Cli class=\\\"appeal-adinfo-item\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_AdsItem1')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003Cli class=\\\"appeal-adinfo-item\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_AdsItem2')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"col-sm-offset-2 col-sm-10 clearfix root\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId, true, true)) + \"\\u003E\\u003Clabel\\u003E\\u003Cinput\" + (\" class=\\\"select\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_Select', true, true)+\" type=\\\"checkbox\\\" data-bind=\\\"checked: appealed, visible: appealedVisible\\\"\") + \"\\u003E\\u003Cspan\" + (\" class=\\\"title\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_Title', true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_AppealTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv\" + (\" class=\\\"row details\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_Details', true, true)+\" data-bind=\\\"visible: appealed\\\"\") + \"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"appeal-column-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_RejectionReasons')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"reasons\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_Reasons', true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\" data-bind=\\\"visible: justificationPanelVisible\\\"\\u003E\\u003Cdiv class=\\\"appeal-column-title\\\" id=\\\"editorial-appeal-jusification-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialAppeal_Justification')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Ctextarea\" + (\" class=\\\"appeal-textarea justification\\\"\"+\" cols=\\\"36\\\"\"+pug.attr(\"id\", 'EditorialAppeal_' + controlId + '_Justification', true, true)+pug.attr(\"name\", 'EditorialAppeal_' + controlId + '_Justification', true, true)+\" maxlength=\\\"1000\\\" rows=\\\"4\\\" aria-labelledby=\\\"editorial-appeal-jusification-label\\\" data-bind=\\\"textInput: justification, css: { required: appealed }\\\"\") + \"\\u003E\\u003C\\u002Ftextarea\\u003E\";\nif (isForVNext) {\npug_mixins[\"koCharactersRemaining\"]('justification');\npug_mixins[\"koError\"]('justification.errors');\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (infoMsg) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\";\nif (isForVNext) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = infoMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"infomark spritedimage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = infoMsg) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"controlId\" in locals_for_with?locals_for_with.controlId:typeof controlId!==\"undefined\"?controlId:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"infoMsg\" in locals_for_with?locals_for_with.infoMsg:typeof infoMsg!==\"undefined\"?infoMsg:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, rowId, useKwCss) {pug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([useKwCss ? 'appeal-kw-details' : ''], [true]), false, true)+pug.attr(\"id\", 'InlineAppealError_' + rowId, true, true)) + \"\\u003E\\u003Ctable class=\\\"budgeterror-table\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\"\\u003E\\u003Ctr\\u003E\\u003Ctd class=\\\"budget-errorstatus-column\\\"\\u003E\\u003Cdiv class=\\\"status_error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"budget-errortext-column\\\"\\u003E\\u003Cdiv class=\\\"budget-error-text\\\" id=\\\"errorText\\\" role=\\\"alert\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('NoRejectionReasonFound')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbr\\u003E\\u003Cinput\" + (\" class=\\\"button button-highlighted btn btn-primary cancel\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.get('BulkEdit_CancelButton'), true, true)+pug.attr(\"id\", 'CancelInlineAppeal_' + rowId, true, true)+pug.attr(\"data-rowid\", rowId, true, true)) + \"\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"rowId\" in locals_for_with?locals_for_with.rowId:typeof rowId!==\"undefined\"?rowId:undefined,\"useKwCss\" in locals_for_with?locals_for_with.useKwCss:typeof useKwCss!==\"undefined\"?useKwCss:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (rowId) {pug_html = pug_html + \"\\u003Cform\" + (\" class=\\\"inline\\\"\"+pug.attr(\"id\", 'inlineAppealForm_' + rowId, true, true)+pug.attr(\"data-rowid\", rowId, true, true)) + \"\\u003E\\u003C\\u002Fform\\u003E\";}.call(this,\"rowId\" in locals_for_with?locals_for_with.rowId:typeof rowId!==\"undefined\"?rowId:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"non-appeal-msg-panel form-group\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.get('EditorialNotAppealableMessage')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (reasons) {pug_html = pug_html + \"\\u003Cul\\u003E\";\n// iterate reasons\n;(function(){\n var $$obj = reasons;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var reason = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (null == (pug_interp = reason) ? \"\" : pug_interp) + \"\\u003C\\u002Fli\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var reason = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cli\\u003E\" + (null == (pug_interp = reason) ? \"\" : pug_interp) + \"\\u003C\\u002Fli\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ful\\u003E\";}.call(this,\"reasons\" in locals_for_with?locals_for_with.reasons:typeof reasons!==\"undefined\"?reasons:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["permissions","config","get","Text","_","AppInstall","DynamicSearch","Product","expandedTextFields","IsVanityUrlEnabled","push","IsExpandedTextAdV2Enabled","ExpandedText","responsiveSearchFields","ResponsiveSearch","Responsive","i18n","window","globalLegacyI18n","adGroupTypeEnum","adTypeEnum","defaultAdType","campaignTypes","search","shopping","audience","hotel","_ref","isRSAAsDefaultTypeEnabled","campaignAdTypesMapping","_ref2","appInstallAdsAllowed","isSTADisabled","isForVNext","base","pageContext","Permissions","IsMultiMediaAdsEnabled","IsAdultAdsEnabled","IsDomesticSimplifiedChineseEnabled","dynamic","MMAForCN","IsWhiteListEXTAEnabled","unshift","IsResponsiveAdForSSCEnabled","campaignSubTypeAdTypesMapping","ViewModel","_createClass","_this","_ref3","arguments","length","undefined","_ref3$model","model","_ref3$campaignId","campaignId","_ref3$adGroupId","adGroupId","_ref3$adGroupType","adGroupType","_ref3$campaignType","campaignType","_ref3$campaignSubType","campaignSubType","_ref3$isFeedBasedCamp","isFeedBasedCampaign","_ref3$showInline","showInline","_ref3$appInstallAdsAl","_ref3$campaignDomain","campaignDomain","_ref3$isDynamicDescri","isDynamicDescriptionEnabled","_ref3$isMigratingToEX","isMigratingToEXTA","_ref3$isSTADisabled","_ref3$isRSAAsDefaultT","_ref3$isResponsiveAdE","isResponsiveAdEnabled","_ref3$isMMAInDSAEnabl","isMMAInDSAEnabled","_ref3$isForVNext","_ref3$adsCountMap","adsCountMap","_ref3$isAdgroupCreati","isAdgroupCreation","_ref3$selectedAdForma","selectedAdFormat","_classCallCheck","this","ko","scope","scenario","hasWebsiteImageOptedInObservable","type","Type","koSchema","properties","Ad","availableAdTypes","getAvailableAdTypes","adTypesRegisterForLanguageChange","adTypeOptions","adTypes","isSmartShoppingCampaign","ShoppingSmartAds","getTypesFromExistingModel","adType","concat","isDynamicAdGroupAdCreation","getDynamicSearchAdTypes","Name","Value","showAdType","showAdTypeWithErrors","errors","isAppealable","disableAdType","showMigrationAlertForEXTA","showMigrationAlertForSTA","showSTAEndWarning","isDisplayPlusNativeEdit","isAudienceCampaign","isAudienceNativeAdsCampaign","DisplayPlusEdit","setClarityTag","IsDisplayPlusAudienceNative","CampaignSubType","containerClass","hideFooter","AdFormat","Display","Video","showAdFormatOptions","MultiAdFormat","key","value","_this2","checkCampaignSubType","IsSmartShoppingCampaignEnabled","extend","schema","viewModel","isTraditionalChinese","keys","maxLength","traditionalChineseMaxLength","getFields","options","opt2fields","original","include","exclude","applyFieldRules","isNativeAdsEnabled","_default","_ref$model","_ref$isNativeAdsEnabl","_ref$isTraditionalChi","upgradedUrlFields","TextAd","NativePreference","dynamicTextExtension","isFinal","url","mobileUrl","maxLengthExtension","showNativeAdPreview","isNativePreference","defaultPreviewType","DevicePreference","isMobile","DisclaimerPopUpView","_Backbone$View","_callSuper","_inherits","$el","html","template","Backbone","IsDisclaimerAdsEnabled","Panel","_ref2$adType","result","IsDisclaimerPopupHintVisible","showDisclaimer","disclaimer","$","empty","append","render","el","_ref$tabs","tabs","selectedPanel","tabGroups","tab","name","title","tabGroup","AdsPreviewContainer","_ref2$tabs","subTab","panels","apply","uuid","panel","target","selected","currentTarget","dataset","adViewModel","Title","DisplayUrl","DestinationUrl","previewModel","tokenisersWithSpaces","tokenisersWithNoSpaces","longAdTitleDetails","generateTitleUsingDisplayUrl","displayUrl","details","trim","displayUrlInTitle","replace","firstSlashIndex","indexOf","substring","newTitle","AdTitleWithDisplayUrlMaxLimit","description","results","isLongAdTitle","resultDescription","resultTitle","maxLimit","AdTitleWithDescriptionMaxLimit","originalLength","inputChars","split","startPosition","i","character","charCodeAt","toString","generateTitleUsingDescription","previewTitleAndText","longAdTitle","PreviewContainer","contentClass","top","topTemplate","LongAdTitleDecorator","PreviewViewModel","sidebar","sidebarTemplate","mobile","mobileTemplate","MobileDecorator","native","nativeTemplate","View","_ref$placeholders","placeholders","_ref$showOnlyFinalUrl","showOnlyFinalUrl","_ref$api","api","_ref$editMode","editMode","_ref$urlOptionsEnable","urlOptionsEnabled","_ref$defaultLandingPa","defaultLandingPageUrl","_ref$placeholderEnabl","placeholderEnabled","_ref$ariaPrefix","ariaPrefix","defaultOptions","isMobilePreferred","entityType","landingPageUrlRequired","highLightModeInError","isFinalUrl","FinalUrls","MobileFinalUrls","upgradedUrlView","UpgradedUrl","finalMobileUrl","trackingTemplate","customParameters","UrlCustomParameters","on","urlInputChanged","mobileUrlChanged","isValid","getValues","finalUrl","event","devicePreferenceChanged","arrayEmptyValue","stringEmptyValue","uulModel","toObject","TrackingUrlTemplate","errorObject","handleApiErrors","clearApiErrors","TextAdEditor","_ref$showAdType","_ref$showInline","editorTemplate","previewContainer","previewBuilder","initPreviewTab","mode","upgradedUrlValid","validate","error","property","add","clear","isCampaignApiError","appPlatformKeys","previewTabItems","Mobile","Tablet","_ref$appLookupDisable","appLookupDisabled","_ref$developerName","developerName","activityLogger","tabItems","schemaFields","schemaMapper","customValidations","AppStoreId","AppPlatform","test","message","fields","AppInstallAd","appPlatformsEnum","enum","appPlatforms","appSelected","previewType","manualApp","AltText","MediaUrl","appIdPlaceholderText","appIdName","appStoreIdPlaceholderText","adTitlePreview","appStorePreview","appStoreName","adTextPreview","previewUrl","field","logChange","signal","subscribe","AppInstallAdEditor","_ref$isForVNext","appeal","applookupRendered","applookupView","focusLockAppLookupPopupEditor","applookupLoggingInformation","handleCreated","handleCancel","tmpl","finalUrlSuffix","showUurlTestTool","isHorizontal","popupHelpKeyAdLandingPage","popupHelpKeyAdTrackTemplate","popupHelpKeyAdParameters","fn","originalView","trigger","uurlControl","find","hide","text","css","closest","showPopover","$popoverContainer","flag","tempEl","popover","container","placement","popoverTemplate","content","AppLookupView","appPlatform","FocusLockAppLookupPopupEditor","focusLockInstanceDecorator","onExit","removePopover","focusFirstItemOnMount","managed","popoverExtender","decorate","excludeCb","clickCb","hiddenCb","open","data","setSelectedApp","clearApp","remove","$container","e","$target","clikedInsideControl","hasClass","parents","children","newTop","height","Boolean","AppTitle","IconUrl","DeviceType","DeveloperName","urlEditor","ko_model","fullUrl","AppUrl","ApplookupLoggingInformation","_this3","validateViewModel","prev","next","errorMessages","landingPageUrlErrorMessages","_this4","logAppLookupInformation","actionName","instrumentation","logMessage","constants","LOGCATEGORY","TRACE","LOGLEVEL","INFO","_ref$useUpgradedUrl","useUpgradedUrl","_ref$scope","_toConsumableArray","customValidation","Path2","DynamicSearchAd","domain","getDomain","protocol","URI","isAllowDisclaimer","disclaimerInfo","computeDisclaimerAsync","extensionsSharedRepos","SharedRepository","DisclaimerAdExtension","afterChangeComitted","disclaimerCampaignId","Number","CurrentCampaign","Id","adDisclaimerHint","DisclaimerLayout","getString","Path1","lengthExtensionProperties","IsIffCountdownForDSAEnabled","parsedTextMaxLengthExtension","params","queryParameters","entitySet","edmCampaign","currentAccount","Campaigns","bypassCache","jsDataCampaign","Campaign","then","CampaignSettings","setting","Object","create","association","findAll","where","disclaimerdata","i18nAdCustomizers","IsNewAdsAdCustomizerEditorEnabled","IsIfFunctionMilestone1Enabled","withNewAdCustomizerEditor","evaluateAdCustomizers","newEvaluateAdCustomizers","deps","countdownI18nDummy","i18nDummy","legacyEvaluateAdCustomizers","self","fieldName","createField","textPart1","ParsedText","textPart2","ParsedTextPart2","slice","combineText","combinedUrl","addPath","path","DisclaimerLineText","LineText","ShowDisclaimer","DisclaimerFinalUrl","IsAdditionalLineLayout","IsPopupLayout","DisclaimerPopHint","DisclaimerPopupText","PopupText","dependency","picker","clickedAway","keydown","preventDefault","keyup","activateNextItem","activatePrevItem","pickActiveItem","off","DatePicker","observable","datePickerTemplate","parameters","culture","format","min","Date","animation","footer","elementDatePicker","kendoDatePicker","datePicker","click","bind","kendo","addClass","date","pattern","time","days","minimum","maximum","isGlobal","language","getSupportedLanguages","required","placeholder","label","control","validators","showLabel","range","valueMessages","true","timeZoneMapper","getTimeZoneText","false","prepareTemplate","syntax","func","formatCountdown","prefix","suffix","ret","editor","enableAdCustomizersHelpers","view","customizableFields","nameAttrs","element","updateAction","remainingCountCallBack","perfMarker","newAttachAdCustomizersHelpers","dynamicAttachAdCustomizersHelpers","remaining","fieldsWithLabel","labels","DynamicSearchAdEditor","allowDisclaimerAds","urlOptions","UrlOptions","smallContainer","buildPreview","enableAdCustomizersHelpersForDSA","getTrackingTemplate","getUrlCustomParameters","FinalUrlSuffix","getFinalUrlSuffix","IsExpandedDsaPhase2Enabled","KoSchema","ProductAd","response","getODataErrors","_ref$isVanityUrlEnabl","isVanityUrlEnabled","_ref$IsExpandedTextAd","lengthCheckFields","ExpandedTextAd","getFinalUrlDomain","errorMessage","fieldsWithPlaceHolder","IsEXTAMigrationNotificationEnabled","fieldMapping","IsNativeAdsAllowed","isNativeAdsRebrandingEnabled","IsNativeAdsRebrandingEnabled","createChild","finalUrlEditor","UrlEditor","ariaLabelledby","ariaId","mobileUrlEditor","hasErrors","domainWatermark","attr","previewViewModel","enableAdCustomizersHelpersForEXTA","regex","TextPart2","legacyInstru","nullableStringFields","prop","title1","TitlePart1","title2","TitlePart2","title3","TitlePart3","parsedErrors","memo","isCampaignEditorialError","disapproved","isTitle1HaveErrors","isTitle2HaveErrors","code","disapprovedText","isTitle3HaveErrors","returnError","CampaignEditorialError","text1","text2","isText1HaveErrors","isText2HaveErrors","errorFields","ResponsiveSearchAd","getFormattedField","filter","map","PinnedField","headlineFields","descriptionFields","placeHolders","descriptions","descriptionText","getDescPreview","combineDescriptions","Description1","Description2","headlines","headlinesText","getTitlePreview","Headline1","Headline2","Headline3","join","getExpandedTextAdDisplayUrl","ParsedPath1","ParsedPath2","_ref$inlineSuggestion","inlineSuggestionsEnabled","_ref$showLightbulb","showLightbulb","_ref$isImproveRSA","isImproveRSA","_ref$accountId","accountId","headlinesView","HeadlinesView","Headlines","descriptionsView","DescriptionsView","Descriptions","adStrengthContainer","adId","ResponsiveSearchAdStrengthView","edm","jsdata","appState","token","Token","odataPath","BingAdsAdInsightWebApiUri","buildAdStrength","editorHeadlineDescriptionOnlyTemplate","rv","enableAIGenAssetContextualAttribute","enableAdCustomizersHelpersForRSA","_superPropGet","attachAIGenAssetContextualAttribute","isAIGeneratedAsset","inlineErrorFields","_len","args","Array","_key","onPreviewImageChanged","imageUrl","setPreviewImageCallback","onImageExtensionChanged","changes","showImgExtWithoutAdGroupID","onCachedImageExtensionChanged","cachedImageExtensionChanges","timeZone","serverContext","_ref$logActivity","logActivity","externalCachedImageExtensionChanges","_ref$showImgExtWithou","preferenceService","ad","cloneDeep","showInitialErrors","cachedAd","apiErrors","RSAImageExtInAdGroupCreation","adStrengthRepository","AdStrengthRepository","autoEnd","returnSuggestionIds","applySuggestionIds","viewSuggestionIds","logAppliedSuggestionsFunc","assetLibraryEventHandler","clickViewIdeas","enableRSAExpansion","RSAImageExtInCampaignCreation","cid","AdvertiserCustomerID","aid","adContext","advertiserCustomerId","imageExtRepository","Repository","globalLegacySchema","summaryDataContextManager","updateContext","createRequestFactory","legacyI18n","mergeI18n","newI18n","theme","oDataConfig","odataRootUrl","odataToken","current","added","removed","updated","maxImageExtensionsPerAdGroup","AdExtension","MaxSelectedImagesPerAdGroupOrCampaignForV2","dateFormat","eventHandler","fetchAdStrengthV2","IsDisclaimerForRSAEnabled","hasDisclaimer","disclaimerData","Promise","targetError","focusableElements","getTabbableNodes","focus","incomplete","errorField","JSON","stringify","formatRSAObject","_this$apiErrors","Property","Message","Code","isSaving","isCanceling","_this5","onFirstErrorHandler","_objectSpread","ReactDOM","_jsx","ThemeProvider","InstrumentationContext","Provider","PreferenceContext","PreferenceService","I18nContext","ResponsiveSearchAdEditor","item","onChanged","onFetchAdStrengthV2","onFetchDisclaimerInfo","fetchDisclaimerInfo","showActionBar","triggerTestUurl","showFinalUrlSuffix","showAdCustomizers","showDynamicTextExtention","isForVnext","updateSuggestionMeasurement","saveLogAppliedSuggestionsFunc","saveAssetLibraryEventHandler","renderImageExtension","injectSetPreviewImage","cb","_ref4","_msgsArr","_ref4$scope","currentItems","createdExtModels","removedExtModels","updatedExtModels","createdImageExtensionsIds","removedImageExtensionsIds","updatedImageExtensionsIds","ext","msgsArr","hasDisabledImages","usedImagesSources","previousExistingImgExtsCount","disabled","source","val","_ref5","_this6","defaultParams","adGroupName","campaignName","saveImgsExtPerfMarker","willInit","createImageExtensionsPromise","extension","newExtensions","newExtIds","index","deletePromise","destroyAll","id","in","updatePromise","update","updateAll","done","catch","err","pageName","_TL_","notificationApi","showWarning","page","finally","logImageExtensionUpdates","extraInfo","imagePathFromConfig","ImageExtensionsPane","dataModelUtil","imagePath","adCreatorScenario","instrumentationScenarios","RSA","isAADUser","IsAADUser","_ref$biddingStrategyT","biddingStrategyType","triggerCancel","triggerClose","handleSave","isMultiAdFormatAd","loadClipchampPlayer","resetFields","serverErrors","allowedVideoTypes","savedAdVideo","Videos","getVideoAdModel","verifiedTrackingSetting","getVerifiedTrackingSettings","biddingScheme","getBiddingScheme","directBiddingStrategyType","campaignSettings","getCampaignSettings","getCampaignSubType","isXandrServingCampaign","isXandrServing","savedAdModel","isDirty","ImpressionTrackingUrls","video","newVideoFromGridObject","uid","Math","random","currentPageIndex","updatedAdModel","oDataToken","oDataPath","_ref2$directBiddingSt","videos","parsedVideos","includes","Asset","SubType","ads","clearFields","ScopeContext","values","Scenario","Activity","ServerContext","PermissionsContext","AdEditor","onAdsValidation","adsModel","onCancel","cancel","onSave","onSaveAndCreateAnother","image","imageRepository","ImageRepository","Images","imageAsset","isLoading","imagePromise","getImageByIdAsync","IdString","imgObjMT","imageObject","newImageFromMTObject","imageSources","Existing","croppedImagePlacements","getAutoCroppedImages","originalImageToCrop","isMultimediaAd","isMultimediaAdinMSANEnabled","imageOption","defaultImageOption","aspectRatioOption","defaultAspectRatioOption","isDisplayAds","imageData","imagePlacementsToImage","crops","TargetWidth","TargetHeight","CropWidth","CropHeight","CropX","CropY","updateGrid","saveAds","campaign","adGroup","activity","UiBlocker","blocking","loadingText","classes","blockUiContainer","blockerIndicator","style","isLoadingImage","parentRemove","components","ComponentSettings","core","ThemeFluent","EditDisplayAdWizard","gridData","DisplayPlusNativeForm","withRecommendationContext","props","onDataChange","setAds","supportImageFitting","useContext","didServerReturnErrors","useMemo","onValidate","useCallback","dataPatch","ActuationGroup","actuationProps","isActive","AttentionBeaconGroup","FormErrorGroup","formErrorProps","showAllValidationErrors","_jsxs","ValidationGroup","validationProps","AssetGroup","className","UnmappedFormErrors","DisplayPlusNativeAds","DisplayPlusNative","mtData","isCleaning","onCleaningComplete","_useState","useState","AdGroup","convertFromAdModel","modelToViewModel","_useState2","_slicedToArray","setData","_useState3","_useState4","setBiddingScheme","isBoostCampaign","DisplayPlusAmplify","IsAmplifyEnabled","useEffect","isLegacyResponsiveAd","LegacyResponsiveAd","getMultiImagesFromMTAssetsAsync","odata","images","idString","prevData","ImageList","Customers","$withKey","Accounts","select","toPromise","getCampaignBiddingScheme","BiddingScheme","_Fragment","saveFailed","getODataConfig","imageOdata","ImageOData","translateHotspots","isVideoAsAnAssetEnabled","VideoAsAnAsset","isImageFittingEnabled","HotSpots","hotspots","hotspot","glyph","Glyph","actionText","ActionText","assetSource","AssetSource","desc","Description","Placement","uri","Uri","oldAdsModel","saveAdsWithMetadata","buildSaveAdsPayload","onSaveAdsSuccess","onSaveAdsFailed","onSaveAdsFinally","setSavingState","saveAdAction","PerformanceMarkerContext","lengthExceededErrorCodes","i18nGlobal","adTypeMapper","TextAdView","AppInstallAdView","DynamicSearchAdView","ProductAdView","ExpandedTextAdView","ResponsiveAdView","adTypeSchema","dynamicSearch","appInstall","product","expandedText","responsive","responsiveSearch","_ref$externalCachedIm","_ref$campaignId","_ref$adGroupId","_ref$adGroupType","_ref$campaignType","_ref$campaignSubType","_ref$isFeedBasedCampa","_ref$isSaveToServer","isSaveToServer","_ref$showSaveAndCreat","showSaveAndCreateAnother","_ref$appInstallAdsAll","IsUserAppInstallAdsAllowed","_ref$isSTADisabled","IsSTADisabled","_ref$isRSAAsDefaultTy","IsRSAAsDefaultType","_ref$isResponsiveAdEn","IsAIMCampaignEnabled","_ref$isMultiMediaAdsE","isMultiMediaAdsEnabled","_ref$isMMAInDSAEnable","IsMMAInDSAEnabled","_ref$campaignDomain","_ref$isDynamicDescrip","_ref$firstTextAdModel","firstTextAdModel","_ref$firstExpandedTex","firstExpandedTextAdModel","_ref$firstResponsiveS","firstResponsiveSearchAdModel","_ref$perfMarker","_ref$isRecommendation","isRecommendation","_ref$adsCountMap","_ref$isImpressionTrac","isImpressionTrackingUrlsEnabled","IsImpressionTrackingUrlsEnabled","_ref$isOpenCreatePane","isOpenCreatePanel","_ref$isAdgroupCreatio","_ref$isImproveMMA","isImproveMMA","_ref$serverContext","perfMarkerRender","isSaved","isAudienceNativeCampaign","isMultiAdFormatEnabled","EnableNewResponsiveSearchAdEditor","ResponsiveSearchAdView","XandrVideoCampaigns","isXandrVideoAdsCampaign","XandrVideoAd","isXandrVideoAd","XandrDisplayAdsCampaigns","isXandrDisplayAdsCampaign","DisplayPlusCopilotAssetGeneration","DisplayPlusDisplayAd","XandrDisplayAd","DisplayPlusNativeAd","isDisplayAdUnderNativeCampaign","isVideoAdUnderNativeCampaign","defaultSelectedAdFormat","Native","isMultiAdFormatDisplayAd","isMultiAdFormatVideoAd","start","applyActivity","inContextRepairRecommendation","applyDeliveryStatus","adTypeViews","firstModelMap","fillModel","mapSTAToEXTA","adViewOption","isMobileUrlEnabled","isVideo","isPlaceholderMMA","testUurlAdTypes","_type","isInline","level","uurlLevels","context","customerId","userId","entityId","testUurl","apiInLog","call","prevScope","adFormat","refreshResponsiveAdEditor","NewSearchMMAEditor","AdSubType","SUBSTRATE","cachedAdExtension","lastClientModelId","currentAdExtension","suggestedAdExtensions","t","TimeStamp","getUtcTime","AcceptInfo","ReturnSuggestionIds","ViewSuggestionIds","ApplySuggestionIds","ClickViewIdeas","AdId","Channel","Feature","Action","UserId","mes","CampaignId","AdGroupId","DeliveryStatusType","trace","originalResponsiveAdEditorView","newOption","prepend","renderAdFormatOption","willRender","improveMMAAdEditor","isDisplayPlusDisplayAd","subView","editorialAppeal","EditorialAppealView","hasError","setErrorsIfExist","isRSANewCopilotScenario","triggerSaving","triggerCanceling","survey","surveyManager","checkIfSurveyIsOpen","AdFormatOption","showHeader","onChange","onAdFormatChange","querySelector","closingAfterSave","perfMarkerSave","saveAdPromise","adEditorView","saveAdAsync","saveToClient","saveToServer","logCopilotRSAAssetSuggestionAdoption","logRSAAssetSuggestionAdoption","logDeliveryStatusRecommendationAdoption","$errors","not","exists","scrollIntoView","block","resetViewToCreateAnother","resetEditMode","cachedSavedresult","AdGroups","Ads","cacheResponse","adapter","provideJustification","hasChange","_ref3$entity","entity","Error","uniq","each","getBulkApiErrors","success","saveImageExtensionsToServer","withUiBlock","logging","stop","v4","prepareErrorMessage","appealableErrors","getAppealableErrors","setRejectedInfos","paths","getPath1AndPath2","path1","path2","MAX_HEADLINES","MMAAssetConfigs","MAX_LONGHEADLINES","MAX_DESCRIPTIONS","_ref$idField","idField","_ref$maxAdsCount","maxAdsCount","_ref$adGroups","adGroups","_ref$isMixedModeCampa","isMixedModeCampaignCreation","firstTwoKeywords","allAdGroupsInfo","hasMultiAdgroups","defaultAds","action","deletedAdIds","alertMessage","duplicateAlertMessage","refresh","_defineProperty","allAdGroups","adg","AdGroupType","_generateKeywordInfo","isEmpty","slb","refreshSource","keywords","Keywords","splice","refreshDuplicateMessage","hasDuplicate","isDuplicated","parse","Headline","LongHeadlines","LongHeadline","newAd","originalAd","updateMMAfields","checkIfExist","_pushAdToArray","copiedAd","savedAdsIds","addedAds","removedAdIds","deleted","totalCounts","sourceAd","j","EditorForm","dialogDecorator","EditorView","position","maxWidth","popupFront","EditorPanel","panelDecorator","panelClassName","panelReadyAriaLabel","AdGroupAdsEditor","_ref$Campaign","_ref$Campaign2","_ref$Campaign2$Id","_ref$Campaign2$Domain","DomainName","_ref$Campaign2$Dynami","DynamicDescriptionEnabled","_ref$pageSize","pageSize","_ref$showAdGroupInfo","showAdGroupInfo","_ref$Language","Language","_ref$Languages","Languages","languages","_ref$usePanel","usePanel","String","IsRSASuggestionCMUIEnabled","adEditorListContainer","copy","_copyAd","edit","_editAd","_deleteAd","copyToSome","_copyAdToSomeAdGroups","copyToOthers","_copyAdToAllOtherAdGroups","itemActions","callback","dynamicDescriptionEnabled","createTemplate","i18","_initializeListView","getAds","items","total","isFirst","getDynamicSearchAdDisplayUrl","updateAttributeForListItem","SingleListBox","processItem","_processItem","sourceItems","_getData","useCallbackForFetchOnly","itemIdField","templates","layoutTemplate","adListTemplate","itemLayoutTemplate","adPreviewTemplate","listContainerSelector","removeAttr","sourceId","targetAdGroupIds","adgroupid","popup","alert","confirm","onDelete","App","views","alertCenter","showConfirmation","_hasMaxAds","isFull","count","focusId","document","activeElement","onCopy","onCreate","onUpdate","findAd","getCachedImageExtensionChanges","syncTheExtension","eventsToActions","_onClose","_handleCreatedAd","_handleUpdatedAd","onClose","listContainer","addScenario","initializeOptions","logScenario","aimAdEdit","aimAdCreation","isGridDisplay","viewContext","currentAdGroup","currentCampaign","CampaignType","isUpdate","PerfMarkerFactory","createMarker","loadAdEditorPromise","loadResponsiveAdEditorAsync","ResponsiveAdEditor","audienceAd","onCreateAnother","headlinePositionMenu","descriptionPositionMenu","selectPosition","positionMenu","i18nErrors","headlinePositionFields","descriptionPositionFields","headlineErrorMap","lessMinRequire","duplicate","lessPosition","descriptionErrorMap","miniRequire","positionFields","errorMap","list","getPreviewList","needValication","HeadlinesViewModel","defaultCount","maxCount","positionFieldMap","positionExtension","initHeadlines","fieldText","aiGeneratedAssetContainer","display","showHeadlineCount","max","DescriptionsViewModel","_ref2$model","_ref2$isForVNext","initDescriptions","showDescriptionCount","RSAListView","fieldsValue","_RSAListView","_ref$defaultCount","_ref$maxCount","_ref$miniRequire","_ref$isMMA","isMMA","set","headlinesTemplate","_RSAListView2","_ref2$defaultCount","_ref2$maxCount","_ref2$miniRequire","_ref2$showLightbulb","_ref2$isMMA","desciptionsTemplate","_AdsCreateView","allAppealableErrors","clearAlertMessages","hasAds","hasUniqAds","hasDuplicateAds","allAds","_clearAdsErrors","_hasApiErrors","adgroupId","resourceName","parentId","models","formatedAd","_formatAd","AdGroupName","CampaignName","AdsCreateView","_ref$availableExtensi","availableExtensions","adExtensionsDynamicFeatures","adExtensionsStaticFeatures","adExtensionDynamicFeatures","adExtensionStaticFeatures","dynamicAdGroups","SearchDynamic","standardAdGroups","SearchStandard","isDynamicSectionExpanded","isStandardSectionExpanded","isAdExtensionExpanded","hasChanges","splitAds","change","pluck","flatten","groupBy","viewList","editorViewMapper","appAssociationsEditor","Call","callAssociationsEditor","Callout","calloutAssociationsEditor","Location","locationAssociationsEditor","Review","reviewAssociationsEditor","SiteLink","sitelinkAssociationsEditor","StructuredSnippet","structuredsnippetAssociationsEditor","Price","priceAssociationsEditor","Promotion","promotionAssociationsEditor","FilterLink","filterLinkAssociationsEditor","Flyer","flyerAssociationsEditor","actionlinkAssociationsEditor","CreateView","_ref$context","showAdAndExtensionMarker","IsActionLinkExtensionAllowed","IsPriceExtensionAllowed","IsLocationExtensionAllowed","IsAppExtensionAllowed","IsSiteLinkExtensionsAllowed","IsCallExtensionAllowed","IsCalloutExtensionAllowed","IsReviewExtensionAllowed","IsStructuredSnippetExtensionAllowed","IsPromotionAdExtensionEnabled","IsFilterLinkAdExtensionEnabled","IsFlyerAdExtensionEnabled","universalItemTemplate","actionUniversalItemTemplate","objective","suggestedExtensions","openedExtEditor","excuteObjective","method","objectiveActions","All","initialize","otherExtensions","willShow","openExtensionPanel","evt","scrollTo","originalIds","newIds","adgroup","initializeAdGroupEditorView","removedAdGroup","_ref6","adgroupsToPaste","fromAdGroup","copyAdFromOtherAdGroup","_ref7","isDSAMixedModeCampaignEnabled","appendLearnMoreLink","logActivities","every","save","scrollUtil","errorElements","$dynamicAdGroupSection","$standardAdGroupSection","collapse","saveAdAndExtensionMarker","adsToCreate","_ref8","destroy","requestResult","_ref9","_this7","isEdit","toggleDecorator","getToggleEl","containerCss","hasSubTitle","showErrorsInline","vnextContext","dynamicFeatures","dynamicTextMenu","propertyNames","appendDynamicText","originalValue","getCharCountExcludingAdCustomizers","newGetCharCountExcludingAdCustomizers","legacyGetCharCountExcludingAdCustomizers","countCharCountExcludingAdCustomizers","lengthValidator","nullable","blockInput","process","instrument","operation","deletedKeywordsCount","Status","createdKeywordsCount","viewmodel","isNotReady","urlEntered","landingPage","keyCode","prototype","keywordPlannerView","KeywordPlannerView","isCampaignCreation","keywordPlannerTimeout","addSuggestion","landingPageView","LandingPageView","onSearch","shouldNotCreateDefaultEditor","shouldNotRenderWhenThereIsNoAdGroup","checkKeywordPlannerSupport","showLandingPage","isKeywordPlannerEnabled","allLocationsUnsupported","updateLandingPageStatus","valueArray","updateAdgroupsList","show","isLanguagesSupported","isLanguageSupported","setLanguages","setLocationTargetingByCampaign","setTimeout","moveKeywordPlanner","seedKeywords","selectedAdGroup","keywordPlannerTop","keywordPlannerTopValue","changeSelectedAdGroup","newSelected","getUniqueName","Suggestions","targets","sourceReqId","selectedAdgroups","suggestedAvgCpc","AggregateMetric","ko_schema","numCreated","maxAdGroups","hasMaxAdGroups","showAdGroupLimitError","isDuplicateName","isDuplicate","comparisonName","toLowerCase","checkDuplicates","isNameDuplicate","uniqueName","removeAdGroup","toRemove","addAdGroup","toAdd","keywordPlannerTopValuePixel","offset","isWaitingForSaveResponse","hasOneAdGroup","events","isOptional","checkAdGroupNameDuplicates","CreateViewModel","existError","updateViews","updateCampaign","shouldNext","shouldBack","shouldCancel","getUpdates","shouldValidate","updates","getChanges","AdScheduleUseSearcherTimeZone","showErrorElements","isOpen","saveAdGroupKeywordMarker","updatedAdgroupsCount","ag","createdAdgroupsCount","adgroupType","toUpdate","adGroupView","parseInt","updateViewModels","errorList","subEntity","isAutoTargetCampaign","canEdit","errorsOfThisItem","errorExtractor","updateViewModelsOnError","contextAdGroups","getContextObject","maxAdGroupsError","addEventListener","updateView","UpdateView","defaultBid","hideHeader","isOnlyAdGroup","logNameChange","deletedAdGroup","lastDeleted","onlyAdGroup","createAndRefocus","adgroups","locations","tire2Locations","numLocationsTargeted","countryLocationInfo","noSuggestionNote","onlytire2LocationSupported","excludedLocationsWarning","selectMultiIdeasText","recentUserActionPrompt","isKeywordPlannerVisible","suggestedAdgroup","SuggestedAdGroup","AddToNewAdGroup","compact","minimumFractionDigits","maximumFractionDigits","getSearchRangeString","pow","floor","log10","ceil","getSearchRange","formatDecimal","unnameCounter","isUnnamed","checked","defaultName","grid","pgrid","vnext","tableClasses","dataSource","rows","bodyRows","columns","getColumns","selection","enabled","a11y","selectAllLabel","gridView","sortable","Keyword","helpId","headClasses","bodyClasses","AverageSearchVolume","realI18n","AverageCPC","CompetitionLevel","bingadsGridColumn","checkedRowIds","selectedItems","checkedKeywords","kw","selectedKeywords","noRowSelected","keywordPlannerCreateOptions","stopPropagation","getCompareFunction","a","b","aProp","bProp","keywordPlannerSortFunc","input","direction","popupIds","GetKeywordIdeas","MonthlySearches","AvgCPC","Competition","GetAdGroupIdeas","currentSourceReqId","searchboxKeywords","Searchbox","defaultText","searchButtonAriaLabel","searchboxUrl","AdvancedView","KeywordPlannerAdvancedView","originalLanguages","keywordPlannerSupportedLanguages","languages2Use","lang","keywordPlannerSupportedLanguagesIdValueMap","useTireTwoMarkets","locationSupportedLanguages","getKeywordPlannerSupportedLanguagesByLocationIds","languagesCanUse","getLanguagesSupportedByLocations","isSelectedLanguagesOnlyTire2ForKeywordPlanner","includedTargets","locationTargets","criterion","supportedCountries","keywordPlannerSupportedCountries","supportedCountryCodes","supportedTire2CountryCodes","country","SupportKeywordSearch","countryCode","CountryCode","locationId","LocationType","languageBundle","LocationId","countryLocationId","onlyTire2LangaugesSelected","tire2SupportedCountryIds","getKeywordPlannerSupportedLocationIdsByLangauges","supportedCountryIds","_updateStatusByLocations","locationsObj","locationFilters","Intermediate","getAll","totalCount","disable","enable","paginationView","page_number","page_size","resetPageNumber","item_count","pageCount","projection","_updateSelectMultiIdeasText","req","hasOnlyKeyword","requestUrl","substr","odataLimits","criteria","keywordsArray","keyword","keywordLength","languagesToUse","languageSupportedLoations","locationIdsSupportedByLanguage","requestLocations","location","PropertyTemplateProjection","local","$metadata","keywordPlannerAdgroupNameColumnTemplate","keywordPlannerAdgroupSeeMoreColumnTemplate","MapProjection","searchCount","averageCPC","decimalFormatter","fromFloatToString","competition","adgroupItem","DisplayName","numRowsToShow","kwd","showSelectAllOnPage","Pagination","PaginationTmpl","sourceData","SourceProjection","seed","proptmpl","getPropTempl","suggestionPropName","sortableCols","memorySort","MemorySortProjection","memoryPage","MemoryPageProjection","getMap","PageProjection","src","pipe","Grid","layout","TableLayout","partial","class","tableTmplJade","popupTopicId","gridClicked","fetch","PaginationConnector","connect","requestData","post","customHeader","dummy","textStatus","xhr","getResponseHeader","res","showNoSuggestionsMessage","AdgroupName","updatePagination","refreshGridSource","requestId","userSelectedLanguages","parent","suggestions","learnMoreLink","learnMoreTemplate","logInteraction","addAddGroup","removeAdgroupFromSource","valueOf","column","adgroupName","handleAddGroup","end","newData","adgroupArray","languagesToCheck","isDynamicAdGroupSectionExpanded","isStandardAdGroupSectionExpanded","hasDSASettings","hasDisclaimerSettings","isDomesticSimplifiedChineseEnabled","allowDisclaimer","MixedModeAdGroupCreate","showAdGroupKeywordMarker","initializeAutoTargetAdGroupCreateView","initializeKeywordAdGroupCreateView","initializeDSASettings","modified","mounted","dynamicAdGroupSectionViewModel","autoTargetAdGroupCreateView","standardAdGroupSectionViewModel","keywordAdGroupCreateView","removeStandardAdGroupSectionAriaExpandedAttribute","disclaimerSettings","hasDSASettingsInCampaignSettings","adjustSectionOrder","toggleDSASettings","dsaSettingsView","targetingSource","Source","koModel","campaignContext","campaignParams","newCampaignContext","CampaignParams","setValues","saveTargetingSource","campaignErrors","scrollToDSAError","forEach","AutoTargetAdGroupCreateView","AdGroupView","_view$prototype","originalCreateAndRefocus","submitDSASettings","AutoTargetAdGroupUpdateView","AutoTargetView","DomainLanguage","TargetingSource","setAutoTargetsViewSetting","serializedAdGroup","autoTargets","DsaTargets","adGroupsStored","currentId","object","Bid","first","updateOnVisible","adGroupBid","autoTargetAdGroupUpdateDecorator","AdGroupUpdateView","saveDSASettings","validateDSASettings","checkAllAdGroupNameDuplicate","dsaSettings","LanguageCode","KeywordAdGroupCreateView","keywordAdGroupCreateDecorator","KeywordAdGroupUpdateView","keywordAdGroupUpdateDecorator","DSASettingsView","updateSubViewDSASettings","$sectionRoot","$standardAdGroupSectionContainer","$dynamicAdGroupSectionContainer","validateIfThereIsAtLeast1AdGroup","keywordAdGroupCreationResult","dynamicAdGroupCreationResult","standardAdGroupCreateResult","dynamicAdGroupCreateResult","KeywordsView","selectThisAdGroup","addedKeywords","getChangedKeywords","getContextObjects","keywordObjects","showErrors","clearErrors","s$AdGroup","StartDate","EndDate","shouldValidateName","isDeleted","deletedConfirmationMessage","removeButtonLabel","deletedConfirmationTimeout","newAdGroup","blocker","adGroupToUpdate","delete","confirmDelete","promise","deleteParams","contextCampaign","viewHasChanges","hasDuplicateNames","selectedCampaigns","copySetting","_ref$scenario","campaignSelectorProxy","CampaignSelectorProxy","onEventTrigger","selectedItem","onCampaignSelectorEventTrigger","campaignSelector","getCampaignSelectorView","loadCampaignAndTargets","expand","disclaimerRepository","skipExtensionCache","criterionLoader","load","shouldShowCashbackSettings","shouldShowSponsoredCampaignCashbackOptIn","isSponsoredCampaignCashbackOptedIn","isSponsoredCampaignCashbackOptInReadonly","isExperiment","isDisclaimerAdsEnabled","isMixedDSACampaignRecommendation","isMixedDSACampaignCreate","currentCampaignType","isAudienceCampaignCreate","campaignProps","schemas","TimeZone","getAccountTimeZone","languageError","timeZoneText","isAfterSave","showTimeZoneText","enableMixedModeDSASettings","isMixedModeDSASettingsChecked","hasRsaAutoAssets","isRsaAutoAssetsSettingChecked","hasBroadOnlySetting","isBroadOnlySettingChecked","selectedBrandLists","deletedBrandListIds","addedBrandListIds","savedBrandListIds","showVanityUrlSettings","vanityUrlSettings","DisplayUrlMode","WebsiteDescription","campaignGoalText","showCampaignGoal","isAmplifyEnabled","s$CampaignCriterion","s$DisclaimerAdExtension","AppEventDelegator","_AppEventDelegator","_edm","_Language","LocationTargetsView","_LocationTargetsView","CopySettings","_CopySettings","BiddingStrategyView","_BiddingStrategyView","SharedBudgetView","_SharedBudgetView","MultiLanguage","_MultiLanguage","AdsCampaignDisclaimers","_AdsCampaignDisclaimers","ExperimentBudgetAlert","_ExperimentBudgetAlert","_SharedRepository","_DSASettingsView","CashbackSettingsView","_CashbackSettings","isSponsoredCampaignCashbackOptInAvailable","_LoadMap","_AudienceCampaignShared","SponsoredCampaignShared","BroadOnlySetting","_BrandListsComponents","defaultPopupIds","Budget","physicalIntentOptions","_physicalIntentOptions","VanityUrlOption","_VanityUrlOption","preferencesService","_preferencesService","showLanguage","showInitialUiBlocker","hideBidStrategy","IsAdsGlobalizationPhase1Enabled","IsAdsGlobalizationPhase2Enabled","IsAdsGlobalizationPhase6Enabled","IsAdsGlobalizationPhase2JapanEnabled","IsAdsGlobalizationPhase9Enabled","IsAdsGlobalizationPhase9VIEnabled","showCampaignSettingMarker","personalizedOfferUtils","isMSStoreAdsGAWorkflow","isAudienceVideoAdsCampaign","isEnabledForVerifiedImpressionTracking","IsEnabledForVerifiedImpressionTrackingAtCampaignLevel","isSignUpPage","isWindowsStoreAdsEnabled","isWindowsStoreAdsManualCPAEnabled","isSupportMaxConversionsForSscEnabled","eventDelegator","autoTargetingSettings","biddingStrategyView","bidStrategyName","BidStrategyName","maxCpc","MaxCpc","Amount","targetCpa","TargetCpa","targetRoas","TargetRoas","targetAdPosition","TargetAdPosition","targetImpressionShare","TargetImpressionShare","i18nNewDesign","shouldSupportCashbackSettings","autoTargetingEnabled","PredictiveTargetingEnabled","ccJsData","isBroadMatchOnlyCampaign","costPerSale","TargetCostPerSale","validateWithBudget","shouldShowSponsoredCampaignCashback","BidStrategy","IsManualBiddingDeprecationEnabled","IsManualCpmEnabled","IsAudienceCampaignAutoBiddingV2Enabled","VerifiedTrackingSettings","VerifiedTrackingData","Data","Values","ImpressionTrackingView","IASTrackingInfo","isInitialize","isCreation","BiddingStrategyType","enhancedCPC","maxConversionValue","initBudgetView","initDSASettingsView","initCashbackSettings","initRSASettingsView","initBroadOnlyView","isMultipleLanguageEnabledIncampaign","initMultiLangaugeSelector","isCreationScenario","copySettings","copyFromCampaign","React","disclaimerProps","ref","DisclaimerAdsEnabled","AllowDisclaimerEnabled","repository","resetSelectedDisclaimer","selectedDisclaimer","renderDisclaimerUI","inCampaignEditing","searchCondition","audienceCondition","IsMSANDisclaimerEnabled","VanityUrlWebsiteDescription","getAssociatedDisclaimer","toggleDisclaimerUI","isDisclaimerCheckboxDisabled","initDisclaimerUI","isNativeAd","onDisclaimerCheckboxChange","disclaimerAdsEnabled","initAutoAssetsUI","initBroadOnlyUI","renderBroadOnlySetting","isBroadMatchOnly","setIsBroadMatchOnly","onBrandListsChange","CurrentAccount","initVanityUrlSettings","renderVanityUrlSettings","settings","setBidStrategyForPersonalizedOffersV2","cashBackSettings","cashbackSettingsView","PersonalizedOffersEnabled","CashbackMonthlyBudget","MonthlyBudget","CashbackPercent","Percent","CashbackScope","Scope","CouponsEnabled","isCashbackScopeReadonly","decimal","showCoupon","isNotAudienceCampaign","isReadOnly","IsCostPerSaleEnabled","isEnablePersonalizedOffersChecked","setupBudgetValidationForCostPerSale","budget","isCPSSelected","selectedBidStrategy","sharedBudgetIsNotAllowedWarning","strategy","budgetAmount","budgetView","amount","validateMultipleLanguage","isValidate","getSelectedLanguages","updateLanguageErrorMessage","languageOptions","inEditMode","selectedLanguages","defaultLanguage","IsSimplifiedChineseLanguageEnabledInMultipleLanguage","instantiateLocationTargetsView","isWindowsStoreAd","hideAudience","physicalIntent","PeopleIn","supportCashbackSettings","showPhysicalIntentView","languageSelector","campaignLanguage","locationTargetsView","budgetDraft","targetingSourceCampaignId","greyOutBudgetIfExperiment","experimentBudgetAlert","experimentId","ExperimentId","IsExperimentsEnabled","Experiment","query","$select","$filter","$top","$count","Experiments","defaultDSADomainName","localStorage","isCampaignSettingsScenario","rsaSettings","AutoGeneratedAssetsEnabled","isOppotunityCampaignLevel","IsCampaignMultipleLanguageEnabled","locationTargetsPromise","domainName","domainLanguage","dsaSource","isPromotionsForBrands","criterions","setLocationData","isDSASettingsAvailable","validateVerifiedImpressionTracking","getPropertyValidationErrors","propErrors","errorsOfPropery","getErrorMessages","getAllLocations","modelInfo","allLocationTargets","keepAllLocations","populateParentField","removeNegativeId","intent","getData","IASInputChange","originAutoGeneratedAsset","rsaAutoGeneratedAssetsSettings","originBroadOnly","broadOnlySetting","IsBroadMatchOnlyCampaign","associations","v","SharedEntityId","EntityId","BrandListsAssociations","biddingSchema","autoTargetingDefault","RSABidStrategyAutoTargeting","PredictiveMatching","AutoTargetingEnabled","TargetingSourceSetting","CampaignCriterions","deletedLocations","disclaimerDefaultSettings","originalDisclaimerSetting","selectedDisclaimerId","state","originalDisclaimerId","isSelectedDisclaimerChanged","AdExtensionAssociations","IsPersonalizedOffersV2Enabled","IsPersonalizedOffersV3Enabled","targetBidStrategy","getLocationRecommendationsStatus","handleCampaignResponse","hasLocationErrors","setContext","targetToCountMapping","CriterionType","targetKey","SelectionStatus","clearAllErrors","setCampaignId","updateLocation","refreshLocationData","clearDeletedLocationsList","updateTargetingSource","saveCampaignMarker","validationErrorNode","setErrors","setSavedBrandLists","brandListError","savedBrandLists","shouldFilterErrorCodes","node","isCreate","getContext","errorsByEntity","hasEntityCreated","separateErrors","getAndHandleApiErrors","brandlist","errMap","reduce","acc","scrollToErrors","cashbackSettings","domainNameError","handleApiErrorsForCampaignLevel","disableLanguage","campaignNameChange","budgetFactory","newFactory","showBudgetMinRecommend","BCCBudgetImprovementEnabled","minimumBudget","currencySymbol","getCurrencySymbol","AccountCurrencyCode","accountCurrencyCode","noApplyBudgetFromSharedLibrary","hideDailyBudgetOptions","updateBidStrategy","isCoOpCampaign","s$Keyword","parseKeyword","matchType","MatchType","parsedKeyword","isNegativeKeyword","isBmmBlockEnabled","parserSchema","keywordsTextareaVal","isAfterFirstInteraction","showBmmWarningAlert","showMutableKeywordMatchTypAlert","showBmmBlockAlert","maxKeywords","numSeedKeywords","seedKeywordTimeout","parsedKeywords","uniqueParsedKeywords","parseKeywords","newKeywords","peekKeywords","isBmmExist","words","isKeywordsValid","parser","reset","s$TextAd","KeywordViewModel","_KeywordViewModel","DynamicPermissions","KeywordBmmSignupP2","KeywordBmmPhase2","isBmmWarningEnabled","KeywordBmmAlert","KeywordBmmWarning","isMutableKeywordMatchTypeEnabled","BMMBehaviorUpdate","parserViewModel","keywordSuggestionsAdded","help","getKeys","getKeywords","isBmmWarning","isMutableKeywordMatchTypeWarning","isBmmBlock","getSeedKeywords","endIndex","keywordsChanged","outTextArea","newKeyword","textareaValue","getKeyFromKeyword","oldKeywords","serializeToCreate","serializeToDelete","getCurKeywords","toCreate","serializedKeywords","serializedKeyword","toDelete","getNameAndLengthForProperty","addErrors","escapeHtml","errorFromAd","pairs","successfulKeywords","keywordsWithErrors","newlyCreatedKeywords","numberOfCreatedKeywords","keywordsImportedFromPlanner","suggestedKeyword","keywordsCreated","suggestionsUsed","detailedSuggestionsUsed","mapObject","reqGroup","_ref$Name","showKeywordPlanner","showOnlyKeywords","isSignUp","createView","includedLocations","LocationTargetTypes","includedCriterions","Criterion","LocationCriterion","RadiusCriterion","setLocationTargeting","Medium","PricingModel","_ref$DomainName","_ref$DomainLanguage","_ref$Source","_ref$disabled","_ref$dynamicDescripti","_ref$isMixedDSACampai","isTargetingSourceEnabled","isDynamicDescriptionPhase1Enabled","isDynamicDescriptionChecked","DSASettings","_ref$popupIds","webSiteLanguage","DSAEnableInFrenchGerman","IsEnabledForDSAInCHandNLandITandESandSE","DSAEnabledInPLandPTandTRandGR","DSAEnabledInDKandFIandNO","DSAEUPhase2","DSAEnabledInJapanese","IsAdsGlobalizationPhase9DSAEnabled","AdsGlobalizationPhase9DSA","i18nStrings","SaveWarning","enableSimplifiedChinese","onLanguageChange","TargetingSourceView","isTargetingSourceValid","initWebSiteLanguage","initTargetSource","isDSASupportMultipleLanguages","processedDomainName","RegExp","legacy$","InlineAppealView","rowId","controller","submit","appealTitle","disableAppealBtn","utilities","onInlineAppealSuccess","expandRowDetail","jsonError","inlineErrorView","InlineErrorView","cancelInlineAppeal","appealIds","_ref2$appealData$","appealData","firstAppealData","IsAppealable","controlId","callBackForInlineAppeal","hideAppealCheckBox","toInline","createInlineAppeal","cancelInlineUpdates","valid","appealJson","getAppealData","Appeal","EntityType","Justification","bulkAction","onCreateAppealSuccess","appealHtml","setElement","_elementId","MaxEntityInOneAdGroup","maxItems","formatDate","dateUtil","alertHelper","AlertHelper","BulkAppealView","onAppeal","Entities","editorial","submitRequestException","onBulkCreateAppealSuccess","showAlert","infoMsg","_ref$adGroupLevelType","adGroupLevelType","_ref$requestException","requestExceptionFromPopup","_ref$instrumentation","currentQueryFilter","filterService","getCombinedFilter","clone","currentQuery","deliveryStatusToQuery","daterange","queryToUse","currentDeliveryStatusQueryValue","DeliveryStatus","$in","odataV4","$expand","startdate","enddate","ParentId","queryString","edmCommon","AssetsWithBIData","$makeCall","payload","gridDataParameters","DateRange","AssetType","scrollTop","fetchIdsForCrossPageSelectionForEditorialGrid","getAppealRejections","ids","selectedRowIds","gridHelper","getSelectedRowIds","limit","getEntitySet","toJSON","getAdGroupId","allPageSelected","fetchIdsForCrossPageSelectionForNewGrid","adgroupEntityIds","isAppealableStatus","_ref3$adgroupEntityId","onFetchBulkAppealRejections","useKwCss","removeCancel","unbind","colValue","getColumnValue","getCampaignId","currentRow","itemWithKey","showToolbar","hideForm","legacy$Form","resetForm","_ref4$appealIds","_ref4$appealData$","_ref4$Entities","getValidateParams","toBulk","removeClass","Errors","dataContextManager","campaignCacheManager","invalidate","contextToUpdate","deselectAll","SingleAppealView","JustificationText","showAdStrength","refreshAdItem","EntityIdsParentIds","processedData","processRejectReasonsFromOdata","toolbar","gridToolbarGroup","showAllToolbars","_ref2$appealIds","menuIsDisabled","menu","is","getMenu","hideinlineEditors","getExpandedRowDetail","AppealAggregator","menuToFollow","_ref$disableAppealBtn","inlineEditors","bulkEditor","without","hasExpandedRowDetail","inlineEditor","openBulkAppealEditor","BulkAppealEditor","disableButtons","singleEditor","i18nCommon","AppealableStatus","status","getInlineBulkAppealUrl","queryify","cmpid","adgId","ids2params","getEntityTypeFromController","generateExtensionUrl","adextension","adExtensionId","version","Version","adgid","resultData","rejectedReasons","rejectedTerms","resultValues","reasonsAndPublisherCountriesMap","Reasons","ReasonCode","Term","LanguageToCountries","rejectedCountries","RejectionCountries","reasonString","reaonsCode","logger","fwLinkId","getFwdLinkId","fwlink","getEditorialErrorMessage","termString","locationStrings","getLocationString","commonI18n","countries","rejectionReasonString","rejectedCountryStrings","RejectedReasons","RejectedTerms","requestExtensionRejectReason","http","__RequestVerificationToken","contentType","RejectionReasons","_ref6$error","disclaimerRepos","rowItem","getExtensionAppealRejections","_action","op","adgroupIdParameter","odataUrl","getAppealRejectionsOdataNew","ajaxPost","onSuccess","onError","onJsonError","requestExceptionOdata","scopeId","successCallBack","exceptionCalLBack","finallyCallBack","AppealEditorViewModel","justification","appealed","appealedVisible","justificationPanelVisible","AppealView","str","_ref$controlId","_ref$appealData","_ref$appealData2","_ref$appealData2$Enti","_ref$appealData2$Reje","_ref$hideAppealCheckB","_ref$appealTitle","_ref$callback","containerSelector","_ref$withRealTimeUpda","withRealTimeUpdates","reasons","subscribeForRealTimeUpdates","newValue","triggerChangeEvent","_create","_init","userAppealed","Prefix","textAreaId","getAppealJustificationName","rules","messages","errorElement","errorPlacement","after","notAppealableTemplate","cancelButtonTemplate","buttonPanelTemplate","wrap","inlineFormTemplate","$noAppealMessagePanel","reasonsTemplate","counter","_ref$useKwCss","inlineErrorTemplate","pug","module","exports","locals","pug_interp","pug_html","pug_mixins","locals_for_with","cssClass","attributes","popupId","ariaLabelContext","templateString","linkId","displayText","escape","infoStyle","left","ariaLabel","countModelName","$$obj","$$l","withDynamicText","useTextArea","hideDynamicText","labelId","nameAttribute","idSuffix","addButtonId","dynamicTemplateName","hideHelpTooltip","helpTooltip","staticTemplateName","extensions","pug_index0","staticFeatures","link","topic","fBindContext","fBindQuery","onLinkClickUrl","label_collapse","label_expand","errId","errorId","attrs","merge","EnterKeywords","reason"],"sourceRoot":""}