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,GAEhB,CAmBoBggC,CAAqBv8C,EAAMtM,MAAM,KAG1C,QACL+K,EAAGrC,OAAO52B,KAAIw6B,GAASA,EAAMtM,QAC7B+hB,EACA,CACEyK,oBAAoB,EACpBhf,kB,CAGJ,MAAOngC,GAEP,OADAwwB,QAAQxwB,MAAMA,GACP,E,CAEX,CAGO,SAASy7E,EACdC,GACA,eAAEv9C,GACFgC,GAA0B,GAE1B,MAAM9zB,EAAkC,GAElCsvE,EAA+BtoF,KAAKq0C,MAAMr0C,KAAKC,UAAUooF,IAC/D,IAAK,IAAIn3E,EAAI,EAAGA,EAAIo3E,EAAatwF,OAAQkZ,GAAK,EAAG,CAC/C,MACMhI,EAAOg/E,EADFI,EAAap3E,GACgC47B,GAEpC,IAAhB5jC,EAAKlR,QAEPghB,EAAO1Z,KAAK4J,EAAK,GAAG4hC,G,CAIxB,OAAO9xB,CACT,CAEO,SAASuvE,EAA0BF,GACxC,MAAMrvE,EAAmC,GAEnCsvE,EAA+BtoF,KAAKq0C,MAAMr0C,KAAKC,UAAUooF,IAC/D,IAAK,IAAIn3E,EAAI,EAAGA,EAAIo3E,EAAatwF,OAAQkZ,GAAK,EAAG,CAC/C,MAAMm5B,EAAKi+C,EAAap3E,GAClBhI,EAAOg/E,EAAuC79C,GAEpDrxB,EAAO1Z,KAAK,CACVouC,OAAQxkC,EACR8iC,cAAe3B,EAAG9J,UAAY,QAAM8J,EAAGjL,UAAW,CAAC,IAAK,QAAS,SACjE2M,aAAc1B,EAAG7J,cAAgB,QAAM6J,EAAGrB,cAAe,CAAC,IAAK,QAAS,SACxExJ,YAAa6K,EAAGxK,MAAQ,QAAMwK,EAAG9K,aAAc,CAAC,IAAK,QAAS,SAC9D0M,aAAc5B,EAAG3J,aACjB5M,IAAK,UAAQuW,EAAGtC,Y,CAIpB,OAAO/uB,CACT,C","sources":["../../../../audience-campaign/packages/crud-audience-adgroup/src/OptTgt-toggle.tsx","../../../../audience-campaign/packages/crud-audience-adgroup/src/view.js","../../../../audience-campaign/packages/crud-audience-adgroup/src/advanced-settings/view.js","../../../../audience-campaign/packages/crud-audience-adgroup/src/crud-adgroup-basic/view.js","../../../../audience-campaign/packages/crud-audience-budget-bid/src/kpi-estimate-react.js","../../../../audience-campaign/packages/crud-audience-budget-bid/src/bid-strategy-react.js","../../../../audience-campaign/packages/crud-audience-budget-bid/src/view.js","../../../../audience-campaign/packages/crud-audience-campaign/src/alert-react.js","../../../../audience-campaign/packages/crud-audience-campaign/src/alert-react-style.js","../../../../audience-campaign/packages/crud-audience-campaign/src/view.js","../../../../audience-campaign/packages/crud-audience-campaign/src/shopping.js","../../../../audience-campaign/packages/reach-estimate-control/src/audience-meter.js","../../../../audience-campaign/packages/reach-estimate-control/src/utils.js","../../../../audience-campaign/packages/reach-estimate-control/src/view.js","../../../../audience-campaign/packages/reach-estimate-control/src/estimate-request-factory.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/merge-i18n.js","../../../../audience-campaign/packages/responsive-ad-editor/src/asset-suggestion/asset-suggestion-repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/constants.js","../../../../audience-campaign/packages/responsive-ad-editor/src/asset-suggestion/asset-suggestion-picker.js","../../../../audience-campaign/packages/responsive-ad-editor/src/asset-suggestion/asset-suggestion-helper.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/test-mock-data/mock.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/ad-recommend-repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-recommend/recommend-ad-list.tsx","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-recommend/recommend-ad-preview-carousel.tsx","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-recommend/recommend-ad-carousel.tsx","../../../../audience-campaign/packages/responsive-ad-editor/src/types.ts","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-recommend/recommend-ad-button.tsx","../../../../audience-campaign/packages/responsive-ad-editor/src/call-to-action-text/index.tsx","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-edit/view.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/account-setting-repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/video-repository-util.js","../../../../audience-campaign/packages/responsive-ad-editor/src/asset-suggestion/asset-suggestion-log.js","../../../../audience-campaign/packages/responsive-ad-editor/src/boost-image/style.js","../../../../audience-campaign/packages/responsive-ad-editor/src/boost-image/image-repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/boost-image/index.js","../../../../audience-campaign/packages/responsive-ad-editor/src/crud-audience-ad-react.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/save-ad-logging.js","../../../../audience-campaign/packages/responsive-ad-editor/src/crud-audience-ad-react-with-context.js","../../../../audience-campaign/packages/responsive-ad-editor/src/responsive-ad-repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/view.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/index.js","../../../../audience-campaign/packages/responsive-ad-editor/src/config.js","../../../../audience-campaign/packages/responsive-ad-editor/src/copilot-search-mma-editor-styles.js","../../../../audience-campaign/packages/responsive-ad-editor/src/advanced-settings-styles.js","../../../../audience-campaign/packages/responsive-ad-editor/src/advanced-settings.js","../../../../audience-campaign/packages/responsive-ad-editor/src/useEvaluatedAssets.js","../../../../audience-campaign/packages/responsive-ad-editor/src/copilot-search-mma-editor-container.js","../../../../audience-campaign/packages/responsive-ad-editor/src/useAutomatedCTA.js","../../../../audience-campaign/packages/responsive-ad-editor/src/useInitAdCustomizer.js","../../../../audience-campaign/packages/responsive-ad-editor/src/copilot-search-mma-editor.js","../../../../audience-campaign/packages/responsive-ad-editor/src/useAppliedLog.js","../../../../audience-campaign/packages/responsive-ad-editor/src/get-unified-ad-preview-config.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-editor-style.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/image-experience-with-suggestion-poller.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-editor-header.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-editor-container.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-editor-footer.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-progress.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-error.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/bulk-mma-convert-editor.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/data-util.js","../../../../audience-campaign/packages/responsive-ad-editor/src/mma-creation-rsa/repository.js","../../../../audience-campaign/packages/responsive-ad-editor/src/placeholder-mma-editor.js","../../../../audience-campaign/packages/responsive-ad-editor/src/search-mma-ad-preview.js","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/errors-util.js","../../../../audience-campaign/packages/target-bid-adjustment/src/bid-adjustment-utils.js","../../../../audience-campaign/packages/target-bid-adjustment/src/grid-config-generator.js","../../../../audience-campaign/packages/target-bid-adjustment/src/bid-adjustment.js","../../../../audience-campaign/packages/target-bid-adjustment/src/bid-adjustment-control-view.js","../../../../audience-campaign/packages/crud-audience-adgroup/src/advanced-settings/template.pug","../../../../audience-campaign/packages/crud-audience-adgroup/src/audience-target-selector-collapse.pug","../../../../audience-campaign/packages/crud-audience-adgroup/src/crud-adgroup-basic/template.pug","../../../../audience-campaign/packages/crud-audience-adgroup/src/template.pug","../../../../audience-campaign/packages/crud-audience-budget-bid/src/template.pug","../../../../audience-campaign/packages/crud-audience-campaign/src/template.pug","../../../../audience-campaign/packages/reach-estimate-control/src/audience-meter.pug","../../../../audience-campaign/packages/reach-estimate-control/src/template.pug","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-edit/editorHeadlineDescriptionOnly.pug","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-edit/inlineErrors.pug","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-edit/template.pug","../../../../audience-campaign/packages/responsive-ad-editor/src/template.pug","../../../../audience-campaign/packages/target-bid-adjustment/src/bid-adjustment-template.pug","../../../../audience-campaign/packages/target-bid-adjustment/src/bid-adjustment.pug","../../../../audience-campaign/packages/target-bid-adjustment/src/target-exclude.pug","../../../../audience-campaign/packages/responsive-ad-editor/src/ad-recommend/recommend-ad-cache.ts","../../../../audience-campaign/packages/responsive-ad-editor/src/utils/ad-recommend-util.ts"],"sourcesContent":["/* istanbul ignore file */\r\nimport React from 'react';\r\nimport { isFunction } from 'underscore';\r\nimport { Toggle, MessageBar, MessageBarType } from '@fluentui/react';\r\n\r\ndeclare const _TL_;\r\ninterface IProps {\r\n checked: boolean;\r\n i18n: any;\r\n activityLogger: any;\r\n parent: any;\r\n labelTxt: string;\r\n onTxt: string;\r\n offTxt: string;\r\n isAudienceFeedBasedCampaign: boolean;\r\n alwaysDisabled: boolean;\r\n}\r\n\r\nconst getAudienceFeedBasedCampaignPredictiveTargetingText = i18n => (\r\n
\r\n \r\n {i18n.getString(_TL_('Predictive targeting is automatically enabled for feed-based campaigns. Please note that this won’t impact campaign performance, as the audience signals associated with predictive targeting have already been serving with all feed-based campaigns. '))}\r\n \r\n \r\n {i18n.getString(_TL_('Learn more about predictive targeting.'))}\r\n \r\n
\r\n);\r\n\r\nexport class OptTgtToggle extends React.Component {\r\n constructor(props: IProps) {\r\n super(props);\r\n\r\n this.state = {\r\n checked: props.checked,\r\n disable: !this.validate(),\r\n shouldShowTargetExclusionActualDeliveryStatus: false,\r\n };\r\n }\r\n\r\n onChange = (ev: React.MouseEvent, checked?: boolean) => {\r\n const { parent } = this.props;\r\n const { i18n } = this.props;\r\n if (this.props.activityLogger && this.props.activityLogger.signal) {\r\n this.props.activityLogger.signal(`Status change, checked: ${checked}`, 'predictive targeting toogle button');\r\n }\r\n if (checked === false) {\r\n if (!this.validate()) {\r\n parent.errorsView.setErrors([{\r\n message: i18n.getString(_TL_('Predictive targeting cannot be turned off if ad group does not have any target.')),\r\n }]);\r\n return; // Opt Tgt cannot be turned off if there is no effective targets.\r\n }\r\n }\r\n\r\n this.setState({\r\n checked,\r\n }, () => {\r\n parent.handleEstimateUpdates(parent);\r\n if (isFunction(parent.handleAgeGenderExclusion)) {\r\n // in setting page and enable flag\r\n // true means we are delivery actual delivery status wiht PT setting and target type\r\n this.setState({\r\n shouldShowTargetExclusionActualDeliveryStatus: parent.handleAgeGenderExclusion(),\r\n });\r\n }\r\n });\r\n }\r\n\r\n getData = () => this.state.checked\r\n\r\n validate = () => {\r\n const { alwaysDisabled } = this.props;\r\n const effectiveTgts = this.props.parent.currentLevelTargetInfo &&\r\n this.props.parent.currentLevelTargetInfo.getEffectiveCriterions();\r\n return effectiveTgts && effectiveTgts.length > 0 && !alwaysDisabled;\r\n }\r\n\r\n disableByValidation() {\r\n const validate = this.validate();\r\n const { disable } = this.state;\r\n let { checked } = this.state;\r\n\r\n // If change from non-disable to disable,\r\n // set checked to initial value or default to true if it's null\r\n if (validate && disable === true) {\r\n checked = (this.props.checked == null) ? true : checked;\r\n }\r\n\r\n this.setState({\r\n checked,\r\n disable: !validate,\r\n });\r\n\r\n return checked;\r\n }\r\n\r\n render() {\r\n const {\r\n i18n, labelTxt, onTxt, offTxt, isAudienceFeedBasedCampaign,\r\n } = this.props;\r\n const { checked, disable, shouldShowTargetExclusionActualDeliveryStatus } = this.state;\r\n if (isAudienceFeedBasedCampaign) {\r\n return getAudienceFeedBasedCampaignPredictiveTargetingText(i18n);\r\n }\r\n return (\r\n <>\r\n \r\n {disable &&\r\n \r\n {i18n.getString(_TL_('Predictive targeting is required when no audience target is selected. Select an audience target to unlock this control'))}\r\n \r\n }\r\n {shouldShowTargetExclusionActualDeliveryStatus &&\r\n \r\n {i18n.getString(_TL_('Based on your new settings, we’ve modified your age and gender exclusion settings. Please review these settings to ensure that they are accurate.'))}\r\n \r\n }\r\n \r\n );\r\n }\r\n}\r\n","/* eslint-disable max-len */\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport {\r\n CompanyNameCriterionSetting,\r\n JobFunctionCriterionSetting,\r\n IndustryCriterionSetting,\r\n AgeCriterionSetting,\r\n DeviceCriterionSetting,\r\n GenderCriterionSetting,\r\n AudienceCriterionSetting,\r\n LocationCriterionSetting,\r\n PlacementSetting,\r\n} from '@bingads-webui-campaign/audience-criterion-setting';\r\nimport { InputControl } from '@bingads-webui/input-control';\r\nimport { RemainingCharsHint } from '@bingads-webui/remaining-chars-hint';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { ReachEstimateControl, EstimateRequestFactory } from '@bingads-webui-campaign/reach-estimate-control';\r\nimport { shouldSupportCashbackSettings } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport {\r\n AudienceTargetSelector,\r\n AudienceCampaignErrorsView,\r\n AudienceStepBase,\r\n criterionHelper,\r\n getBulkErrorsLogMessage,\r\n BidStrategy,\r\n getFeedInfo,\r\n generateNameSuggestionSuffix,\r\n isFeedBasedAudienceCampaign,\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { getLocationsInfo, showIMAReachModal, getLocationsInfoFromCampaignCriterions } from '@bingads-webui-campaign-react/ima-reach-representation';\r\nimport { getBlackListCriterions } from '@bingads-webui-campaign/audience-advanced-target-settings';\r\nimport { BoostPlacementTarget } from '@bingads-webui-campaign-react/boost-placement-target';\r\nimport { ContextualTargetWithStyle, getSelectionFromCriterions, getContextualTargetInfo } from '@bingads-webui-campaign-react/boost-contextual-target';\r\n\r\nimport template from './template.pug';\r\nimport collapseTemplate from './audience-target-selector-collapse.pug';\r\nimport { OptTgtToggle } from './OptTgt-toggle';\r\n\r\n/**\r\n * CrudAudienceAdgroup class that extends {AudienceStepBase} class\r\n * The class defines the section of the setting AdGroup with the targets\r\n *\r\n * @class CrudAudienceAdgroup\r\n * @extends {AudienceStepBase}\r\n */\r\nexport class CrudAudienceAdgroup extends AudienceStepBase {\r\n /**\r\n * Initializes the {CrudAudienceAdgroup} class.\r\n *\r\n * @param {Object} options - options for initializing the class.\r\n * @param {Object} options.viewContext = viewContext for the View.\r\n * @returns {undefined}\r\n */\r\n initialize(options) {\r\n this.renderMarker;\r\n this.perfMarker = options.perfMarker;\r\n this.perfMarker.willInit();\r\n this.isAdImpressions = options.isAdImpressions;\r\n this.wizardElement = options.wizardElement;\r\n this.viewContext = options.viewContext || {};\r\n this.viewContext.level = 'adGroup';\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.audienceCampaignType = options.audienceCampaignType || 'Audience';\r\n this.scenario = options.scenario || '';\r\n this.currentLevelTargetInfo = options.currentLevelTargetInfo;\r\n this.saveOnce = false;\r\n this.currentCampaign = this.viewContext.currentCampaign;\r\n this.options = options;\r\n\r\n const schema = DependencyResolver.get('$/schema!campaign/AdGroup');\r\n const SchemaModel = backboneSchema(\r\n schema,\r\n this.i18n,\r\n ['Name', 'Medium', 'PricingModel', 'Campaign']\r\n );\r\n this.isSimplifyCampaignCreation = this.scenario === 'simplify-campaign-creation';\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n this.accountInfo = config.get('CurrentAccount');\r\n this.permissions = config.get('Permissions');\r\n this.isIMAReachRepresentationPhase1Enabled = _.result(this.permissions, 'IsIMAReachRepresentationPhase1Enabled');\r\n this.isAudienceCampaignCollapseTargetSelectionEnable =\r\n _.result(this.permissions, 'IsAudienceCampaignCollapseTargetSelectionEnabled', false);\r\n\r\n this.isMSANRemoveDeviceTargetsEnabled = _.result(this.permissions, 'IsMSANRemoveDeviceTargetsEnabled');\r\n this.IsDomesticSimplifiedChineseEnabled = _.result(this.permissions, 'IsDomesticSimplifiedChineseEnabled');\r\n this.isShowDisclaimerBannerEnabled = _.get(this.permissions, ['dynamic', 'AgeGenderDisclaimer'], false);\r\n this.Enable1PPlacementTargeting = _.get(this.permissions, ['dynamic', 'Enable1PPlacementTargeting'], false);\r\n this.isBoostConversionBasedSegmentEnabled = _.get(this.permissions, ['dynamic', 'BoostConversionBasedSegment'], false) &&\r\n _.get(this.permissions, ['IsAmplifyEnabled'], false);\r\n\r\n this.boostPlacementReactComponent = React.createRef();\r\n this.optTgtReactComponent = React.createRef();\r\n\r\n this.isMSANBoostEnabled = _.result(this.permissions, 'IsAmplifyEnabled', false);\r\n this.isContextualTargetEnabled = this.isMSANBoostEnabled &&\r\n _.result(this.permissions, 'IsContextualTargetEnabled', false);\r\n\r\n this.workflow = options.workflow;\r\n\r\n this.model = new SchemaModel();\r\n this.logScenario = options.logScenario;\r\n this.activityLogger = this.logScenario.createAdGroup.create();\r\n this.applyActivity = options.applyActivity;\r\n this.isOpenCreatePanel = options.isOpenCreatePanel;\r\n this.isLastStep = options.lastStep === 'CrudAudienceAdgroup';\r\n this.isForVNext = options && options.isForVNext;\r\n // Location is selected by default, Device is hidden from the selector\r\n this.audienceTargetSelector = new AudienceTargetSelector({\r\n layout: this.isAudienceCampaignCollapseTargetSelectionEnable ? 'collapse' : 'card',\r\n selectedTypeKeys: [],\r\n blackListKeys: this.IsDomesticSimplifiedChineseEnabled ? getBlackListCriterions({\r\n campaignType: this.audienceCampaignType.toLowerCase(),\r\n permissions: this.permissions || {},\r\n }) : _.compact(['device', this.audienceCampaignType === 'shopping' && 'placement']),\r\n activityLogger: this.activityLogger,\r\n permissions: this.permissions,\r\n });\r\n\r\n // mock\r\n // this.currentCampaign.CampaignCashback = { MonthlyBudget: 1 };\r\n\r\n this.supportCashbackSettings = shouldSupportCashbackSettings(this.currentCampaign, this.permissions);\r\n\r\n const settingOptions = {\r\n viewContext: this.viewContext,\r\n currentLevelTargetInfo: this.currentLevelTargetInfo,\r\n scenario: options.scenario,\r\n isLiveUpdateEnabled: true,\r\n showTargetSelection: true,\r\n showBidAdjustment: this.supportCashbackSettings,\r\n showTargetOrBid: false,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n activityLogger: this.activityLogger,\r\n };\r\n\r\n this.locationSetting = new LocationCriterionSetting(_.extend({\r\n hideTitleLabel: true,\r\n deps: _.defaults(options.deps, {\r\n isNewUI: options.isForVNext,\r\n ...(this.isIMAReachRepresentationPhase1Enabled ? {\r\n onLocationTargetsChange: locationTargets => this.onLocationTargetsChange(locationTargets),\r\n isAudienceCreationWorkflow: true,\r\n } : {}),\r\n }),\r\n }, settingOptions, {\r\n showBidAdjustment: false,\r\n }));\r\n this.ageSetting = new AgeCriterionSetting(settingOptions);\r\n this.genderSetting = new GenderCriterionSetting(settingOptions);\r\n if (!this.isMSANRemoveDeviceTargetsEnabled) {\r\n this.deviceSetting = new DeviceCriterionSetting(settingOptions);\r\n }\r\n\r\n this.audienceSetting = new AudienceCriterionSetting(settingOptions);\r\n this.companySetting = new CompanyNameCriterionSetting(settingOptions);\r\n this.industrySetting = new IndustryCriterionSetting(settingOptions);\r\n this.jobFunctionSetting = new JobFunctionCriterionSetting(settingOptions);\r\n if (this.Enable1PPlacementTargeting) {\r\n this.placementSetting = new PlacementSetting(settingOptions);\r\n }\r\n this.targetSettingViews = _.compact([\r\n this.locationSetting,\r\n this.ageSetting,\r\n this.genderSetting,\r\n this.audienceSetting,\r\n this.companySetting,\r\n this.industrySetting,\r\n this.jobFunctionSetting,\r\n this.Enable1PPlacementTargeting && this.placementSetting,\r\n ]);\r\n\r\n if (this.deviceSetting) {\r\n this.targetSettingViews.push(this.deviceSetting);\r\n }\r\n\r\n this.reachControl = new ReachEstimateControl({\r\n isSticky: true,\r\n viewContext: this.viewContext,\r\n scenario: options.logScenario.value,\r\n });\r\n this.estimateRequestFactory = new EstimateRequestFactory({\r\n currentLevelTargetInfo: this.currentLevelTargetInfo,\r\n });\r\n\r\n this.errorsView = new AudienceCampaignErrorsView();\r\n\r\n if (this.isIMAReachRepresentationPhase1Enabled) {\r\n this.audienceSetting.setOnAudiencesTargetChangeCallback((audienceTargets) => {\r\n this.activityLogger.signal(`onAudienceTargetsChange: ${JSON.stringify(audienceTargets)}`);\r\n this.onAudienceTargetsChange(audienceTargets);\r\n });\r\n }\r\n\r\n this.isAudienceCampaignCollapseTargetSelectionEnabled =\r\n _.result(this.permissions, 'IsAudienceCampaignCollapseTargetSelectionEnabled', false);\r\n\r\n this.isCopyCampaignSettingsAudienceCampaignEnabled = _.result(this.permissions, 'IsCopyCampaignSettingsAudienceCampaignEnabled', false);\r\n\r\n if (this.isCopyCampaignSettingsAudienceCampaignEnabled) {\r\n const CopyAdgroupSettings = DependencyResolver.get('campaignui/feature/adgroup-create-advanced/view/copy-adgroup-settings');\r\n this.adGroupSettings = new CopyAdgroupSettings();\r\n this.adGroupSettings.on('copy.adgroup', this.adgroupCopyDriver.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * willShow() gets called from the wizard, and we take the snapshot\r\n * so that we can compare and save the delta\r\n *\r\n * @returns {undefined}\r\n */\r\n willShow() {\r\n // While it's ideal where willInit align with the contructor, it is created with the wizard.\r\n // The perf marker is to measure the user experience perf for the component.\r\n this.perfMarker.willRender();\r\n this.startListeningForEvents();\r\n this.handleEstimateUpdates();\r\n this.originalSnapshot = this.currentLevelTargetInfo.getSnapshot();\r\n this.ageSetting.saveSnapshot();\r\n this.genderSetting.saveSnapshot();\r\n\r\n if (this.deviceSetting) {\r\n this.deviceSetting.saveSnapshot();\r\n }\r\n\r\n if (this.supportCashbackSettings) {\r\n this.targetSettingViews.forEach((criterionEditor) => {\r\n if (criterionEditor.resetSupportCashbackSettings) {\r\n criterionEditor.resetSupportCashbackSettings(true, {\r\n level: 'AdGroup',\r\n value: this.viewContext.currentAdGroup.CashbackPercent,\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (this.isContextualTargetEnabled) {\r\n this.contextualSelection = [];\r\n\r\n const contextualTargetsCriterions = this.currentLevelTargetInfo.getAllByType('ContextualTarget');\r\n this.contextualSelection = getSelectionFromCriterions(contextualTargetsCriterions);\r\n // reference copy is OK enough as the selection change comes as a new array.\r\n this.initialContextualSelection = this.contextualSelection;\r\n }\r\n if (this.options && this.options.perfMarker && this.renderMarker) {\r\n this.renderMarker.done();\r\n }\r\n }\r\n\r\n renderOptTgtSwtich() {\r\n // in campaign creation flow, we do not have campaign type and sub type until campaign created\r\n // so we need to get this info until adgroup creation page.\r\n\r\n ReactDOM.render(\r\n ,\r\n this.$('.optimized-toggle')[0]\r\n );\r\n }\r\n\r\n /**\r\n * Get the title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get title() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Adgroup_Title'),\r\n };\r\n }\r\n\r\n /**\r\n * Get the page title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get pageTitle() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Adgroup_PageTitle'),\r\n };\r\n }\r\n\r\n onContextualSelectionChange(data) {\r\n this.contextualSelection = data || [];\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n if (this.options && this.options.perfMarker) {\r\n this.renderMarker = this.perfMarker.createChild('RenderCrudAdGroup');\r\n this.renderMarker.willInit();\r\n }\r\n // this code should be after campaign is created.\r\n const campaignType = _.get(this.viewContext, 'currentCampaign.CampaignType');\r\n const campaignSubType = _.get(this.viewContext, 'currentCampaign.CampaignSubType');\r\n this.isAudienceFeedBasedCampaign = (campaignType === 8 || campaignType === 'Audience') &&\r\n (campaignSubType === 1 || campaignSubType === 'AudienceFeedBased');\r\n // we are intentionally not changing the above variable name because we do not know all scenarios where it's being used\r\n this.isAudienceFeedBasedCampaignNew = isFeedBasedAudienceCampaign(campaignSubType);\r\n this.isNativeAds = (campaignType === 8 || campaignType === 'Audience') &&\r\n (campaignSubType === 0 || campaignSubType === 'AudienceStatic');\r\n this.$el.html(template(this));\r\n\r\n if (!this.viewContext.currentAdGroup) {\r\n this.nameInput = new InputControl({\r\n entity: this.model,\r\n field: 'Name',\r\n ariaLabelledby: 'adgroupNameLabel',\r\n });\r\n\r\n this.nameInput.on('input-changed', () => {\r\n this.activityLogger.signal('adgroup name change', 'crud audience adgroup');\r\n });\r\n\r\n if (this.isAudienceCampaignCollapseTargetSelectionEnabled) {\r\n this.nameInput.setState({ value: generateNameSuggestionSuffix('Adgroup') });\r\n }\r\n\r\n this.nameInputRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'Name',\r\n });\r\n\r\n this.$('.name-input-control-container').prepend(this.nameInput.render().$el);\r\n this.$('.remaining-chars-hint-container').append(this.nameInputRemainingCharsHint.render().$el);\r\n } else {\r\n this.$('.adgroup-name-input-container').hide();\r\n }\r\n\r\n if (this.isMSANBoostEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.$('.boost-placement-target')[0]\r\n );\r\n }\r\n\r\n if (this.isContextualTargetEnabled) {\r\n ReactDOM.render(\r\n this.onContextualSelectionChange(selection)}\r\n />,\r\n this.$('.contextual-target-container')[0]\r\n );\r\n }\r\n\r\n if (!this.isSimplifyCampaignCreation) {\r\n this.$('.opttgt-setting').append('
');\r\n this.$('.optimized-container').html(collapseTemplate({ isFeedBasedAudienceCampaign: this.isAudienceFeedBasedCampaign, i18n: this.i18n }));\r\n this.$('.optTgt-setting-container').append(this.audienceTargetSelector.render().$el);\r\n\r\n this.$('.optTgt-setting-container .crud-audience-target-selector .crud-audience-target-selector__description').text(this.i18n.getString('OptimizedTargeting_Expand_Description'));\r\n if (!this.isAudienceFeedBasedCampaign) {\r\n this.renderOptTgtSwtich();\r\n this.$('.optimized-targeting-description').html(`${this.i18n.getString('Audience_Campaign_Predictive_Targeting_Description')}${this.i18n.getString('Audiences_GoToAdgroupTab_LearnMore')}`);\r\n }\r\n } else {\r\n this.$('.audience-target-selector-container').append(this.audienceTargetSelector.render().$el);\r\n\r\n if (this.isSimplifyCampaignCreation && !this.isAudienceFeedBasedCampaign) {\r\n this.renderOptTgtSwtich();\r\n }\r\n }\r\n\r\n if (!this.isSimplifyCampaignCreation && !this.isAudienceFeedBasedCampaign) {\r\n this.$('.audience-reach-estimate-container').append(this.reachControl.render().$el);\r\n }\r\n\r\n this.$('.errors-container').append(this.errorsView.render().$el);\r\n\r\n if (this.isAudienceCampaignCollapseTargetSelectionEnabled) {\r\n this.audienceTargetSelector.$('.location-setting-container').append(this.locationSetting.render().$el);\r\n this.audienceTargetSelector.$('.age-setting-container').append(this.ageSetting.render().$el);\r\n this.audienceTargetSelector.$('.gender-setting-container').append(this.genderSetting.render().$el);\r\n this.audienceTargetSelector.$('.audience-setting-container').append(this.audienceSetting.render().$el);\r\n this.audienceTargetSelector.$('.companyName-setting-container').append(this.companySetting.render().$el);\r\n this.audienceTargetSelector.$('.industry-setting-container').append(this.industrySetting.render().$el);\r\n this.audienceTargetSelector.$('.jobFunction-setting-container').append(this.jobFunctionSetting.render().$el);\r\n if (this.Enable1PPlacementTargeting && this.isNativeAds) {\r\n this.audienceTargetSelector.$('.placement-setting-container').append(this.placementSetting.render().$el);\r\n }\r\n // this.audienceTargetSelector.$('.control-label').removeClass();\r\n this.audienceTargetSelector.$('.control-label').removeClass('show');\r\n // end of my changes\r\n } else {\r\n this.$('.location-setting-container').append(this.locationSetting.render().$el).hide();\r\n this.$('.age-setting-container').append(this.ageSetting.render().$el).hide();\r\n this.$('.gender-setting-container').append(this.genderSetting.render().$el).hide();\r\n\r\n // All the device targets are all selected\r\n // this.$('.device-setting-container').append(this.deviceSetting.render().$el).hide();\r\n this.$('.audience-setting-container').append(this.audienceSetting.render().$el).hide();\r\n this.$('.companyName-setting-container').append(this.companySetting.render().$el).hide();\r\n this.$('.industry-setting-container').append(this.industrySetting.render().$el).hide();\r\n this.$('.jobFunction-setting-container').append(this.jobFunctionSetting.render().$el).hide();\r\n if (this.Enable1PPlacementTargeting && this.isNativeAds) {\r\n this.$('.placement-setting-container').append(this.placementSetting.render().$el).hide();\r\n }\r\n }\r\n this.perfMarker.done();\r\n if (this.isCopyCampaignSettingsAudienceCampaignEnabled) {\r\n this.$('.copy-adgroup-settings-container').append(this.adGroupSettings.render().$el);\r\n }\r\n return this;\r\n }\r\n\r\n getAdGroupData() {\r\n let params = null;\r\n let isUpdateScenario = false;\r\n if (this.viewContext.currentAdGroup) {\r\n params = this.viewContext.currentAdGroup;\r\n isUpdateScenario = true;\r\n } else {\r\n params = this.model.toJSON();\r\n params.Campaign = { Id: this.viewContext.currentCampaign.Id };\r\n params.AdScheduleUseSearcherTimeZone = false;\r\n if (this.viewContext.currentCampaign.CampaignSubType === 'AudienceVideoAds') {\r\n params.PricingModel = 'CPV';\r\n } else if (this.isAdImpressions) {\r\n params.PricingModel = 'CPM';\r\n }\r\n }\r\n\r\n if (this.isMSANBoostEnabled) {\r\n params = {\r\n ...params,\r\n ...this.boostPlacementReactComponent.current.getData(),\r\n };\r\n }\r\n\r\n if (this.isAudienceFeedBasedCampaign) {\r\n params.UseOptimizedTargeting = true;\r\n } else {\r\n const useOptimizedTargeting = this.optTgtReactComponent.current.getData();\r\n params.UseOptimizedTargeting = useOptimizedTargeting;\r\n // for adgroup creation scenario, we always set it as true, MT is going to throw error if value is false.\r\n if (this.isSimplifyCampaignCreation || !isUpdateScenario) {\r\n params.UseOptimizedTargeting = true;\r\n }\r\n }\r\n\r\n if (this.Enable1PPlacementTargeting && !this.isAudienceFeedBasedCampaignNew) {\r\n params.BoostAdunitIds = this.placementSetting.getSnapshot();\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Get the data that is used for the parameter for saving.\r\n *\r\n * @returns {Object} - object representing the data for the adgroup to be saved.\r\n */\r\n getDataAsync() {\r\n const params = this.getAdGroupData();\r\n\r\n // Let the checkbox save changes to the currentLevelTargetInfo\r\n const updateTasks = [\r\n this.ageSetting.updateCriterionDataAsync(),\r\n this.genderSetting.updateCriterionDataAsync(),\r\n ];\r\n\r\n if (this.deviceSetting) {\r\n updateTasks.push(this.deviceSetting.updateCriterionDataAsync());\r\n }\r\n\r\n // Get the audience criterions from the\r\n return Promise.all(updateTasks).then(() => {\r\n // Location and Device are not supported for TargetSetting property\r\n let targetTypes = this.currentLevelTargetInfo.getAllNoneEmptyTypeKeys();\r\n targetTypes = _.reject(\r\n targetTypes,\r\n targetType => targetType === 'Location' ||\r\n targetType === 'Radius' ||\r\n targetType === 'NegativeLocation' ||\r\n targetType === 'Device' ||\r\n targetType === 'ContextualTarget'\r\n );\r\n\r\n params.TargetSetting = targetTypes.join(';');\r\n\r\n const currentSnapshot = this.currentLevelTargetInfo.getSnapshot();\r\n\r\n let targets =\r\n criterionHelper.compareAndGetCriterionsDelta(this.originalSnapshot, currentSnapshot);\r\n\r\n // Do not need to save NegativeAge, Gender and Device\r\n targets = _.reject(targets, target => (\r\n target.CriterionType === 'NegativeAge' ||\r\n target.CriterionType === 'NegativeGender' ||\r\n target.CriterionType === 'NegativeDevice'));\r\n\r\n if (!this.currentLevelTargetInfo.listenToLocationCriterion) {\r\n // use the targets that are returned from the location target setting control\r\n targets = _.reject(targets, target => (\r\n target.CriterionType === 'Location' ||\r\n target.CriterionType === 'Radius' ||\r\n target.CriterionType === 'NegativeLocation'));\r\n\r\n const {\r\n intent = [],\r\n locations = [],\r\n deletedLocations = [],\r\n } = this.locationSetting.getData();\r\n const locationCriterions = intent.concat(locations).concat(deletedLocations);\r\n\r\n targets = targets.concat(locationCriterions);\r\n }\r\n\r\n if (this.isContextualTargetEnabled) {\r\n const contextualTargets = getContextualTargetInfo(\r\n this.initialContextualSelection,\r\n this.contextualSelection\r\n );\r\n\r\n targets = targets.concat(contextualTargets);\r\n }\r\n\r\n const processedTargets = [];\r\n _.each(targets, (target) => {\r\n const campaignName = this.viewContext.currentCampaign.Name;\r\n const adgroupName = this.model.get('Name');\r\n let processedTarget = cloneDeep(target);\r\n\r\n // remove virtual negative IDs\r\n if (parseInt(processedTarget.Id, 10) < 0) {\r\n processedTarget.Id = undefined; // eslint-disable-line\r\n }\r\n\r\n // if no adgroup exist, remove campaign and adgroup property\r\n if (this.viewContext.currentAdGroup) {\r\n processedTarget.AdGroup = { // eslint-disable-line\r\n Id: this.viewContext.currentAdGroup.Id,\r\n };\r\n } else {\r\n processedTarget = _.omit(processedTarget, 'Campaign'); // eslint-disable-line\r\n processedTarget = _.omit(processedTarget, 'AdGroup'); // eslint-disable-line\r\n }\r\n\r\n processedTarget = _.extendOwn(processedTarget, {\r\n CampaignName: campaignName,\r\n AdGroupName: adgroupName,\r\n });\r\n\r\n processedTargets.push(processedTarget);\r\n });\r\n\r\n const adGroupCriterions = _.reject(processedTargets, target => (\r\n target.Criterion.Type === 'Audience'));\r\n const adGroupAudienceCriterions = _.filter(processedTargets, target => (\r\n target.Criterion.Type === 'Audience'));\r\n\r\n params.AdGroupCriterions = adGroupCriterions;\r\n params.AdGroupAudienceCriterions = adGroupAudienceCriterions;\r\n\r\n return params;\r\n });\r\n }\r\n\r\n /**\r\n * It attempts to save and return true if the save is done succefully.\r\n *\r\n * @returns {boolean} - returns true if it is ready to go to the next step.\r\n */\r\n wizardShouldGoNext() {\r\n this.activityLogger.trace('wizard should go next is called');\r\n return this.validateAndSave().then((isSuccess) => {\r\n if (isSuccess) {\r\n this.stopListeningForEvents();\r\n }\r\n\r\n this.activityLogger.trace(`validate and save result: ${isSuccess}`);\r\n this.activityLogger.signal(`clicked next: ${isSuccess}`, 'crud audience adgroup');\r\n return isSuccess;\r\n });\r\n }\r\n\r\n /**\r\n * It prepares to go back to the previous step.\r\n *\r\n * @returns {boolean} - returns true if it is ready to go to the back.\r\n */\r\n wizardShouldGoBack() {\r\n return this.validateAndSave().then((isSuccess) => {\r\n if (isSuccess) {\r\n this.stopListeningForEvents();\r\n }\r\n\r\n this.activityLogger.signal(`clicked back: ${isSuccess}`, 'crud audience adgroup');\r\n\r\n return isSuccess;\r\n });\r\n }\r\n\r\n /**\r\n * Start listening for the events\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n startListeningForEvents() {\r\n this.listenTo(\r\n this.audienceTargetSelector,\r\n 'selectionChanged',\r\n this.onSelectionChanged\r\n );\r\n this.listenTo(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.handleEstimateUpdates\r\n );\r\n\r\n this.listenTo(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.disableOptToggle\r\n );\r\n\r\n if (this.isAudienceCampaignCollapseTargetSelectionEnabled) {\r\n this.listenTo(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.onReloadTargetSummary\r\n );\r\n }\r\n }\r\n\r\n disableOptToggle() {\r\n if (!this.isAudienceFeedBasedCampaign && this.optTgtReactComponent && this.optTgtReactComponent.current) {\r\n this.optTgtReactComponent.current.disableByValidation.call(this.optTgtReactComponent.current);\r\n }\r\n }\r\n\r\n /**\r\n * Stop listening for the events\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n stopListeningForEvents() {\r\n this.stopListening(\r\n this.audienceTargetSelector,\r\n 'selectionChanged',\r\n this.onSelectionChanged\r\n );\r\n this.stopListening(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.handleEstimateUpdates\r\n );\r\n\r\n this.stopListening(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.disableOptToggle\r\n );\r\n\r\n if (this.isAudienceCampaignCollapseTargetSelectionEnabled) {\r\n this.stopListening(\r\n this.currentLevelTargetInfo,\r\n 'AdGroupCriterionChanged',\r\n this.onReloadTargetSummary\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Saves the AdGroup and exits.\r\n * This is only used when 'Save & Exit' button is shown on this step.\r\n *\r\n * @returns {undefined} - returns undefined\r\n */\r\n saveAndExit() {\r\n this.validateAndSave().then((isSuccess) => {\r\n this.activityLogger.signal(`save and exit: ${isSuccess}`, 'crud audience adgroup');\r\n if (isSuccess) {\r\n this.trigger('saveAndExit');\r\n if (this.isOpenCreatePanel && this.isLastStep) {\r\n const mes = { CampaignId: this.viewContext.currentCampaign.Id, DeliveryStatusType: 'NoEligibleAdGroups' };\r\n\r\n this.applyActivity.trace(JSON.stringify(mes));\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Validates controls on page\r\n *\r\n * @returns {boolean} - returns true if succesful\r\n */\r\n validate() {\r\n if (this.nameInput && !this.nameInput.getState().isValid) {\r\n this.nameInput.setState({ showError: true });\r\n this.nameInput.$el[0].scrollIntoView(false);\r\n\r\n this.activityLogger.trace(`validation failed due to name input: ${this.nameInput.getState()}`);\r\n\r\n return false;\r\n }\r\n\r\n if (!this.isAudienceFeedBasedCampaign) {\r\n const isTargetsValid = this.optTgtReactComponent.current && this.optTgtReactComponent.current.validate();\r\n // when target to all set to On\r\n if (!isTargetsValid) {\r\n this.optTgtReactComponent.current.setState({\r\n checked: true,\r\n });\r\n }\r\n }\r\n\r\n if (!this.locationSetting.validate() ||\r\n !this.ageSetting.validate() ||\r\n !this.genderSetting.validate() ||\r\n !(!this.deviceSetting || this.deviceSetting.validate()) ||\r\n !this.audienceSetting.validate() ||\r\n !this.companySetting.validate() ||\r\n !this.industrySetting.validate() ||\r\n !this.jobFunctionSetting.validate()) {\r\n this.activityLogger.trace('validation failed due to one of the target settings');\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * It validates the reach and privacy of selected targets and then\r\n * attempts to save and return true if the save is done succefully.\r\n *\r\n * @returns {boolean} - returns true if save was succesful\r\n */\r\n validateAndSave() {\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return this.reachControl.validate().then((isValid) => {\r\n this.activityLogger.trace(`reach control validation result: ${isValid}`);\r\n if (isValid) {\r\n return this.checkIMAReachAndSave();\r\n }\r\n const message = this.reachControl.errorMessage;\r\n\r\n this.errorsView.setErrors([{ message }]);\r\n\r\n return false;\r\n }).catch(() => {\r\n // TODO: log here\r\n });\r\n }\r\n\r\n checkIMAReachAndSave() {\r\n const currentSnapshot = this.currentLevelTargetInfo.getSnapshot();\r\n const audienceIds = [];\r\n const audienceTargets = _.chain(currentSnapshot)\r\n .filter(item => item.CriterionType === 'InMarket')\r\n .reduce((memo, item) => {\r\n const audienceId = item.Criterion.AudienceId;\r\n\r\n if (_.indexOf(audienceIds, audienceId) === -1) {\r\n audienceIds.push(audienceId);\r\n memo.push({\r\n Level: 'AdGroup',\r\n AudienceCriterion: {\r\n AudienceId: item.Criterion.AudienceId,\r\n AudienceName: item.Criterion.AudienceName,\r\n },\r\n });\r\n }\r\n\r\n return memo;\r\n }, [])\r\n .value();\r\n let locationCriterions;\r\n\r\n if (!this.currentLevelTargetInfo.listenToLocationCriterion) {\r\n // use the targets that are returned from the location target setting control\r\n const {\r\n intent = [],\r\n locations = [],\r\n } = this.locationSetting.getAllLocations();\r\n locationCriterions = intent.concat(locations);\r\n locationCriterions = _.filter(locationCriterions, c => c.Status !== 'Deleted');\r\n\r\n const adGroupCriterionsWithoutIntent = _.filter(locationCriterions, c => c.CriterionType !== 'LocationIntentCriterion');\r\n const campaignCriterions = this.locationSetting.getCampaignLocationCriterions();\r\n\r\n // inherit locations\r\n if (adGroupCriterionsWithoutIntent.length === 0 &&\r\n campaignCriterions &&\r\n campaignCriterions.length > 0) {\r\n const overrideInfo = getLocationsInfoFromCampaignCriterions(campaignCriterions);\r\n locationCriterions = overrideInfo.locations.concat(overrideInfo.intent);\r\n }\r\n } else {\r\n locationCriterions = _.filter(currentSnapshot, target => (\r\n target.CriterionType === 'Location' ||\r\n target.CriterionType === 'Radius' ||\r\n target.CriterionType === 'NegativeLocation'));\r\n\r\n locationCriterions = _.filter(locationCriterions, c => c.Status !== 'Deleted');\r\n\r\n const campaignCriterions = this.currentLevelTargetInfo.getCampaignLocationCriterions();\r\n\r\n // inherit locations\r\n if (locationCriterions.length === 0 &&\r\n campaignCriterions &&\r\n campaignCriterions.length > 0) {\r\n locationCriterions = _.filter(campaignCriterions, c => c.Status !== 'Deleted');\r\n }\r\n }\r\n\r\n if (this.isIMAReachRepresentationPhase1Enabled && this.isForVNext &&\r\n locationCriterions.length > 0 && audienceTargets.length > 0) {\r\n return new Promise((resolve) => {\r\n const onYes = () => {\r\n this.saveAsync().then((isSuccess) => {\r\n resolve(isSuccess);\r\n });\r\n };\r\n const onCancel = () => resolve(false);\r\n const locationsInfo = getLocationsInfo(locationCriterions);\r\n showIMAReachModal({\r\n locationsInfo,\r\n onYes,\r\n onCancel,\r\n deliveryChannel: 'AIM',\r\n // this adgroupId is needed to indicate it's ad group level\r\n // we don't care about it's value\r\n adGroupId: this.viewContext.currentAdGroup && this.viewContext.currentAdGroup.Id ?\r\n Number(this.viewContext.currentAdGroup.Id) : 1,\r\n audienceAssociations: { value: audienceTargets },\r\n i18n: this.i18n,\r\n aid: this.accountInfo.Id,\r\n cid: this.accountInfo.AdvertiserCustomerID,\r\n }).then((isIMAReachModalShow) => {\r\n if (!isIMAReachModalShow) {\r\n this.saveAsync().then((isSuccess) => {\r\n resolve(isSuccess);\r\n });\r\n }\r\n });\r\n });\r\n }\r\n return this.saveAsync();\r\n }\r\n\r\n /**\r\n * Save the adgroup with the given setting.\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save process is succesful or not.\r\n */\r\n saveAsync() {\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n\r\n this.errorsView.removeErrors();\r\n\r\n let createTask;\r\n\r\n // If saved already\r\n if (this.viewContext.currentAdGroup && this.viewContext.currentAdGroup.Id) {\r\n createTask = Promise.resolve(true);\r\n } else {\r\n const adGroupParams = this.getAdGroupData();\r\n\r\n this.activityLogger.trace(`creating the ad group with the params: ${adGroupParams}`);\r\n\r\n createTask = jsdata.AdGroup.create(\r\n adGroupParams,\r\n { adapter: 'bulk', cacheResponse: false }\r\n ).then((data) => {\r\n if (_.isFinite(data.Id)) {\r\n this.viewContext.currentAdGroup = data;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n return createTask\r\n .then(() =>\r\n this.getDataAsync())\r\n .then(params => jsdata.AdGroup.update(\r\n params.Id,\r\n params,\r\n { adapter: 'bulk', cacheResponse: false }\r\n ))\r\n .then((data) => {\r\n if (_.isFinite(data.Id)) {\r\n this.viewContext.currentAdGroup = data;\r\n\r\n // This will be reused from step4.\r\n this.viewContext.audienceSetting = this.audienceSetting;\r\n\r\n const savedAdGroupCriterions = data.AdGroupCriterions ? data.AdGroupCriterions : [];\r\n const savedAudienceAdGroupCriterions =\r\n data.AdGroupAudienceCriterions ? data.AdGroupAudienceCriterions : [];\r\n\r\n return this.postProcessAfterSaveAsync(\r\n savedAdGroupCriterions,\r\n savedAudienceAdGroupCriterions\r\n );\r\n }\r\n\r\n return Promise.resolve(false);\r\n }).catch((response) => {\r\n this.handleErrors(response);\r\n\r\n return Promise.resolve(false);\r\n })\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n handleErrors(response) {\r\n const createAudienceTargetsActivity = this.logScenario.createAudienceTargets.create();\r\n\r\n if (response && response.entity) {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n if (response.errors.length) {\r\n const bulkApiErrors = this.i18nErrors.getBulkApiErrors(response.errors);\r\n const noMappedErrors = _.every(bulkApiErrors, error => error.code === error.message);\r\n\r\n if (_.isEmpty(bulkApiErrors) || noMappedErrors) {\r\n this.errorsView.setErrors([{ message: this.i18n.getString('GenericErrorMessage_Short') }]);\r\n\r\n createAudienceTargetsActivity.error(`${getBulkErrorsLogMessage(response.errors)}, Entity:${JSON.stringify(response.entity)}`);\r\n } else {\r\n this.errorsView.setErrors(bulkApiErrors);\r\n\r\n createAudienceTargetsActivity.trace(getBulkErrorsLogMessage(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience campaign creation api error');\r\n });\r\n }\r\n }\r\n } else {\r\n // Unexpected case. Log Error.\r\n createAudienceTargetsActivity.error(JSON.stringify(response));\r\n }\r\n } else {\r\n // Ajax error\r\n this.errorsView.setErrors(this.i18nErrors.getODataErrors(response.errors));\r\n }\r\n }\r\n\r\n /**\r\n * Post processing after the save.\r\n * This ensures that updated criterions from the server are saved on the cache\r\n * @private\r\n *\r\n * @param {Array} savedAdGroupCriterions - array of adgroup criterions not including audience\r\n * @param {Array} savedAudienceAdGroupCriterions - array of audience type adgroup criterions\r\n * @returns {Promise} - promise of cache being settled.\r\n */\r\n postProcessAfterSaveAsync(savedAdGroupCriterions = [], savedAudienceAdGroupCriterions = []) {\r\n const targetInfo = this.currentLevelTargetInfo;\r\n if (savedAdGroupCriterions.length > 0 || savedAudienceAdGroupCriterions.length > 0) {\r\n return targetInfo.destroyAllAsync().then(() => {\r\n const updatedCriterions =\r\n criterionHelper.applyCriterionsDelta(\r\n this.originalSnapshot,\r\n _.union(savedAdGroupCriterions, savedAudienceAdGroupCriterions)\r\n );\r\n\r\n return targetInfo.createMultipleAsync(updatedCriterions).then(() => true);\r\n });\r\n }\r\n\r\n // No criterion saved, just move on.\r\n return Promise.resolve(true);\r\n }\r\n\r\n /**\r\n * Get the actions of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns array that has information about the actions.\r\n */\r\n get actions() {\r\n const actions = [\r\n {\r\n name: 'back',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Back_Label'),\r\n },\r\n {\r\n name: 'done',\r\n htmlAttributes: {\r\n class: 'btn-primary',\r\n },\r\n enabled: true,\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Exit'),\r\n },\r\n ];\r\n\r\n if (this.scenario === 'adgroup-creation' && this.audienceCampaignType === 'shopping') {\r\n // use the actions as is\r\n } else if (this.scenario === 'campaign-creation' || this.scenario === 'adgroup-creation') {\r\n // need the next button at the top.\r\n actions.unshift({\r\n name: 'next',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Next'),\r\n });\r\n } else {\r\n return super.actions;\r\n }\r\n\r\n return actions;\r\n }\r\n\r\n // private function\r\n // event handler for handling the section changed.\r\n onSelectionChanged(containerId) {\r\n this.$(this.getContainerNameFromId(containerId)).show();\r\n }\r\n\r\n // private function\r\n // returning container name by the given id.\r\n getContainerNameFromId(id) {\r\n return `.${id}-setting-container`;\r\n }\r\n\r\n // private function\r\n // event handler for handling the updating of reach estimates.\r\n handleEstimateUpdates(parent = null) {\r\n const ts = parent == null ? this : parent;\r\n const { currentCampaign } = ts.viewContext;\r\n // This can be undefined if it's first displayed but has value when come from next step\r\n const biddingSchemeType = currentCampaign &&\r\n currentCampaign.BiddingScheme &&\r\n currentCampaign.BiddingScheme.Type;\r\n const bidinfo = BidStrategy[biddingSchemeType];\r\n const subType = currentCampaign &&\r\n currentCampaign.CampaignSubType;\r\n const campaignSetting = _.first(_.get(currentCampaign, 'CampaignSettings')) || {};\r\n const feedInfo = getFeedInfo(campaignSetting);\r\n const useOptimizedTargeting = ts.optTgtReactComponent.current &&\r\n ts.optTgtReactComponent.current.getData();\r\n const targets = ts.estimateRequestFactory.create(bidinfo, subType, feedInfo, useOptimizedTargeting);\r\n const hasAudienceRemarketingList = ts.currentLevelTargetInfo.hasAudienceRemarketingList();\r\n\r\n ts.reachControl.updateEstimate(targets, hasAudienceRemarketingList);\r\n }\r\n\r\n remove() {\r\n this.audienceTargetSelector.remove();\r\n this.locationSetting.remove();\r\n this.ageSetting.remove();\r\n this.genderSetting.remove();\r\n\r\n if (this.deviceSetting) {\r\n this.deviceSetting.remove();\r\n }\r\n\r\n this.audienceSetting.remove();\r\n this.companySetting.remove();\r\n this.industrySetting.remove();\r\n this.jobFunctionSetting.remove();\r\n this.reachControl.remove();\r\n this.errorsView.remove();\r\n if (this.nameInput) {\r\n this.nameInput.remove();\r\n }\r\n if (this.nameInputRemainingCharsHint) {\r\n this.nameInputRemainingCharsHint.remove();\r\n }\r\n super.remove();\r\n }\r\n\r\n onLocationTargetsChange(locationTargets) {\r\n // subscribed location targets changes\r\n const {\r\n locationIntentCriterion,\r\n targetedLocationCriterions,\r\n excludedLocationCriterions,\r\n } = getLocationsInfo(locationTargets);\r\n\r\n // refresh audience association components\r\n return this.audienceSetting.reloadAudienceData({\r\n targetedLocationCriterions,\r\n excludedLocationCriterions,\r\n locationIntentCriterion,\r\n isLocationRestricted: false,\r\n });\r\n }\r\n\r\n onAudienceTargetsChange(audienceTargets) {\r\n // subscrib audienceTargets changes\r\n // refresh location components\r\n this.locationSetting.reloadLocationView(audienceTargets);\r\n }\r\n\r\n deselectAll() {\r\n // eslint-disable-next-line max-len\r\n if (this.locationSetting.targetSelectionView && this.locationSetting.targetSelectionView.locationTargetsView) {\r\n this.locationSetting.targetSelectionView.locationTargetsView.settoSpecificLocation();\r\n }\r\n\r\n const targetTypes = [\r\n 'Radius',\r\n 'Location',\r\n 'NegativeLocation',\r\n 'Audience',\r\n 'CompanyName',\r\n 'NegativeCompanyName',\r\n 'JobFunction',\r\n 'NegativeJobFunction',\r\n 'Industry',\r\n 'NegativeIndustry',\r\n ];\r\n _.each(targetTypes, (targetType) => {\r\n this.currentLevelTargetInfo.destroyTargetTypeAsync(targetType);\r\n });\r\n }\r\n\r\n // isLocation: Locations must be handled seperately.\r\n // locType: True = location, False = Radius\r\n // isIncluded: This is specifically for location use.\r\n criterionFormat(formatted, criterions, isLocation = false, locType = false, isIncluded = false) {\r\n _.each(criterions, (loadedCriterionData) => {\r\n const formattedCriterion = criterionHelper.reformatFetchedCriterion(\r\n loadedCriterionData,\r\n loadedCriterionData.CampaignId,\r\n loadedCriterionData.AdGroupId\r\n );\r\n\r\n // Reassign the name if it was not properly assigned.\r\n if (!formattedCriterion.Criterion.Name) {\r\n formattedCriterion.Criterion.Name = loadedCriterionData.Criterion.AgeRange ||\r\n loadedCriterionData.Criterion.GenderType || loadedCriterionData.Criterion.GenderType ||\r\n loadedCriterionData.Criterion.IntentOption || loadedCriterionData.Criterion.CompanyName ||\r\n loadedCriterionData.Criterion.JobFunction || loadedCriterionData.Criterion.Industry;\r\n }\r\n\r\n if (isLocation && this.locationSetting.targetSelectionView.locationTargetsView) {\r\n // Locations need to be handled with a specific format. Use helper function.\r\n // eslint-disable-next-line max-len\r\n this.locationSetting.targetSelectionView.locationTargetsView.locationManageView.searchView.convertFromCriterionHelperFormat(locType, formattedCriterion, isIncluded);\r\n } else {\r\n // All other criterions are added to this list for later use.\r\n formatted.push({\r\n Criterion: formattedCriterion.Criterion,\r\n CriterionType: formattedCriterion.CriterionType,\r\n });\r\n }\r\n });\r\n }\r\n\r\n copyAdgroupCriterion(source) {\r\n const adgroup = source[0];\r\n this.activityLogger.signal(`Copy setting from setting: ${adgroup.Name} ${adgroup.Id}`, 'Audience Copy Ad Group Setting');\r\n\r\n const criterions = source[1];\r\n // Negative Criterions do not have the CriterionBid field. Use this to check.\r\n const ageKeys = criterions.filter(i => i.Criterion.Type === 'Age' && i.CriterionBid).map(i => i.Criterion.AgeRange);\r\n const genderKeys = criterions.filter(i => i.Criterion.Type === 'Gender' && i.CriterionBid).map(i => i.Criterion.GenderType);\r\n const locations = criterions.filter(i => i.Criterion.Type === 'Location' && i.CriterionBid);\r\n const radiusList = criterions.filter(i => i.Criterion.Type === 'Radius' && i.CriterionBid);\r\n // All location permutations must be handled seperately.\r\n const excludedLocations = criterions.filter(i => i.Criterion.Type === 'Location' && !i.CriterionBid);\r\n const otherCriterions = criterions.filter(i => i.Criterion.Type === 'CompanyName'\r\n || i.Criterion.Type === 'JobFunction' || i.Criterion.Type === 'Industry');\r\n\r\n if (!_.isEmpty(ageKeys)) {\r\n this.ageSetting.targetSelectionView.setKeys(ageKeys);\r\n }\r\n\r\n if (!_.isEmpty(genderKeys)) {\r\n this.genderSetting.targetSelectionView.setKeys(genderKeys);\r\n }\r\n\r\n const formattedCriterions = [];\r\n\r\n // All other non-checkbox Criterion.\r\n this.criterionFormat(formattedCriterions, otherCriterions);\r\n // This adds all non-location criterions to the criterion list.\r\n this.currentLevelTargetInfo.createMultipleAsync(formattedCriterions);\r\n\r\n _.delay(() => {\r\n // Audience Criterions\r\n if (source[2] && source[2].value) {\r\n // const audienceCriterions = [];\r\n this.currentLevelTargetInfo.audienceAssociationView.expandAssociation();\r\n this.currentLevelTargetInfo.audienceAssociationView.expandExclusion();\r\n const { configSettings } = this.currentLevelTargetInfo.audienceAssociationView.doubleListBoxViewModel;\r\n _.each(source[2].value, (criterion) => {\r\n this.audienceSetting.convertAudienceMTCriterion(criterion.AdGroupCriterion, configSettings);\r\n });\r\n }\r\n }, 3000);\r\n\r\n // Included Locations\r\n this.criterionFormat(formattedCriterions, locations, true, true, true);\r\n // Excluded Locations\r\n this.criterionFormat(formattedCriterions, excludedLocations, true, true, false);\r\n // Radius. We do not support Excluded Radius yet.\r\n this.criterionFormat(formattedCriterions, radiusList, true, false, false);\r\n }\r\n\r\n adgroupCopyDriver(source) {\r\n // First clear out the existing settings.\r\n this.deselectAll();\r\n\r\n // Fill in the criterion\r\n this.copyAdgroupCriterion(source);\r\n\r\n _.delay(() => {\r\n // UseOptimizedTargeting\r\n if (source[0] && source[0].UseOptimizedTargeting != null) {\r\n this.optTgtReactComponent.current.onChange(null, source[0].UseOptimizedTargeting);\r\n }\r\n }, 3000);\r\n }\r\n\r\n /* updates the summary under the auidence target selection\r\n when collapse is closed.\r\n */\r\n onReloadTargetSummary() {\r\n const locationTSummary = this.locationSetting.getTargetedSummary();\r\n const locationESummary = this.locationSetting.getExcludedSummary();\r\n const ageSummary = this.ageSetting.getSummary();\r\n const genderSummary = this.genderSetting.getSummary();\r\n const audienceTSummary = this.audienceSetting.getTargetedSummary();\r\n const audienceESummary = this.audienceSetting.getExcludedSummary();\r\n const companyTSummary = this.companySetting.getTargetedSummary();\r\n const companyESummary = this.companySetting.getExcludedSummary();\r\n const industryTSummary = this.industrySetting.getTargetedSummary();\r\n const industryESummary = this.industrySetting.getExcludedSummary();\r\n const jobTSummary = this.jobFunctionSetting.getTargetedSummary();\r\n const jobESummary = this.jobFunctionSetting.getExcludedSummary();\r\n\r\n this.audienceTargetSelector.dataModel.locationSummaryText(`${locationTSummary}\\n${locationESummary}`);\r\n this.audienceTargetSelector.dataModel.ageSummaryText(ageSummary);\r\n this.audienceTargetSelector.dataModel.genderSummaryText(genderSummary);\r\n this.audienceTargetSelector.dataModel.audienceSummaryText(`${audienceTSummary}\\n${audienceESummary}`);\r\n this.audienceTargetSelector.dataModel.companyNameSummaryText(`${companyTSummary}\\n${companyESummary}`);\r\n this.audienceTargetSelector.dataModel.industrySummaryText(`${industryTSummary}\\n${industryESummary}`);\r\n this.audienceTargetSelector.dataModel.jobFunctionSummaryText(`${jobTSummary}\\n${jobESummary}`);\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 ko from 'knockout';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport '@bingads-webui-campaign/ko-stop-binding';\r\nimport template from './template.pug';\r\n\r\n/**\r\n * AudienceAdvancedSettings class\r\n * The class defines the Advanced settings for Audience Campaign/Adgroup\r\n * It currently supports and is used by only Audience AdGroups.\r\n *\r\n * @class AudienceAdvancedSettings\r\n */\r\nexport class AudienceAdvancedSettings extends Backbone.View {\r\n /**\r\n * Initializes the {AudienceAdvancedSettings} class.\r\n *\r\n * @param {Object} options - options for initializing the class.\r\n * @returns {undefined}\r\n */\r\n initialize(options) {\r\n this.viewContext = options.viewContext;\r\n this.model = options.viewContext.currentAdGroup;\r\n this.campaign = {};\r\n\r\n this.scenario = options.scenario;\r\n this.level = options.viewContext.level;\r\n this.supportCashbackSettings = options.supportCashbackSettings;\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n this.isNewUI = config.get('IsNewUI');\r\n\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n\r\n if (this.isNewUI) {\r\n this.isExclusionsExpanded = ko.observable(false);\r\n }\r\n\r\n if (this.scenario === 'adgroup-settings') {\r\n this.initExclusions();\r\n this.initUrlOptions();\r\n this.initAdRotation();\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n isSettings: this.scenario === 'adgroup-settings',\r\n isNewUI: this.isNewUI,\r\n }));\r\n\r\n // delay init (and render) Ad schedule view\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n jsdata.Campaign.find(Number(this.viewContext.currentCampaign.Id))\r\n .then((campaign) => {\r\n this.campaign = campaign;\r\n this.initAdScheduleViewAsync();\r\n });\r\n\r\n if (this.scenario === 'adgroup-settings') {\r\n this.$('.url-options').append(this.upgradedUrlOptions.render().$el);\r\n\r\n this.$('.ad-rotation').append(this.adRotation.render().$el);\r\n\r\n if (this.isNewUI) {\r\n this.$('#setExclusions').collapse('show');\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'show.bs.collapse': 'showExclusions',\r\n 'hide.bs.collapse': 'hideExclusions',\r\n };\r\n }\r\n\r\n showExclusions(e) {\r\n const sectionName = $(e.target).data('section');\r\n\r\n if (this.isNewUI && sectionName === 'ExclusionsSection') {\r\n this.isExclusionsExpanded(true);\r\n this.$('.camp-adg-shared-exclusions-dropdown .bedded-icon-marker').toggleClass('expanderImage expandedImage');\r\n }\r\n }\r\n\r\n hideExclusions(e) {\r\n const sectionName = $(e.target).data('section');\r\n\r\n if (this.isNewUI && sectionName === 'ExclusionsSection') {\r\n this.isExclusionsExpanded(false);\r\n this.$('.camp-adg-shared-exclusions-dropdown .bedded-icon-marker').toggleClass('expanderImage expandedImage');\r\n }\r\n }\r\n\r\n /**\r\n * Validates the inputs\r\n *\r\n * @returns {bool} returns true if validation succeeded\r\n */\r\n validate() {\r\n return this.adScheduleView.validate()\r\n && (this.upgradedUrlOptions ? this.upgradedUrlOptions.validate() : true);\r\n }\r\n\r\n /**\r\n * Get the data that is used as the parameter for saving.\r\n *\r\n * @returns {Object} - object representing the data for the adgroup to be saved.\r\n */\r\n getData() {\r\n const params = {};\r\n\r\n const dateSettings = this.adScheduleView.getDateSettings();\r\n const adScheduleUseSearcherTimeZone = _.result(this.adScheduleView, 'getAdScheduleUseSearcherTimeZone');\r\n\r\n _.extend(params, dateSettings);\r\n\r\n if (this.scenario === 'adgroup-settings') {\r\n const urlOptions = this.upgradedUrlOptions.toObject();\r\n if (_.isEmpty(urlOptions.TrackingUrlTemplate)) {\r\n urlOptions.TrackingUrlTemplate = null;\r\n }\r\n if (_.isEmpty(urlOptions.FinalUrlSuffix)) {\r\n urlOptions.FinalUrlSuffix = null;\r\n }\r\n if (_.isEmpty(urlOptions.UrlCustomParameters)) {\r\n urlOptions.UrlCustomParameters = null;\r\n }\r\n\r\n const adRotation = this.adRotation.getValues();\r\n\r\n _.extend(params, urlOptions, adRotation);\r\n }\r\n\r\n if (_.isBoolean(adScheduleUseSearcherTimeZone)) {\r\n params.AdScheduleUseSearcherTimeZone = adScheduleUseSearcherTimeZone;\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Save Exclusions\r\n *\r\n * @returns {undefined}\r\n */\r\n saveExtensions() {\r\n const exclusionRepository = DependencyResolver.get('campaignui/feature/advanced-settings/util/exclusion-repository');\r\n const siteExclusions = this.siteExclusionView.getValues();\r\n\r\n const campaignId = this.viewContext.currentCampaign.Id;\r\n const adgroupId = this.viewContext.currentAdGroup.Id;\r\n\r\n const data = {\r\n AdGroupId: adgroupId,\r\n CampaignId: campaignId,\r\n AdvancedSettings: {\r\n ExcludedSites: siteExclusions,\r\n },\r\n };\r\n\r\n return exclusionRepository.saveExtensions(data, 'adgroup')\r\n .catch((response) => {\r\n if (response.NegativeSitesResult) {\r\n this.siteExclusionView.showErrors(response.NegativeSitesResult);\r\n\r\n if (this.isNewUI) {\r\n this.$('#setExclusions').collapse('show');\r\n }\r\n\r\n throw 'exclusion error'; //eslint-disable-line\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Ad rotation view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initAdRotation() {\r\n const AdRotationView = DependencyResolver.get('campaignui/feature/advanced-settings/view/ad-rotation');\r\n\r\n this.adRotation = new AdRotationView(_.result(_.result(this.model, 'AdRotation'), 'RotationType'));\r\n }\r\n\r\n /**\r\n * Initialize Exclusions view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initExclusions() {\r\n const exclusionRepository = DependencyResolver.get('campaignui/feature/advanced-settings/util/exclusion-repository');\r\n const BaseExclusionView = DependencyResolver.get('campaignui/feature/advanced-settings/view/base-exclusion');\r\n\r\n const level = 'adgroup';\r\n const campaignId = this.viewContext.currentCampaign.Id;\r\n const adgroupId = this.viewContext.currentAdGroup.Id;\r\n\r\n exclusionRepository.load(campaignId, adgroupId, level)\r\n .then(([campaignExclusions, adgroupExclusions]) => {\r\n this.siteExclusionView = new BaseExclusionView({\r\n exclusions: _.result(adgroupExclusions, 'ExcludedSites'),\r\n exclusionType: 'site',\r\n level,\r\n campaignExclusions: _.result(campaignExclusions, 'ExcludedSites'),\r\n });\r\n this.$('.site-exclusions').append(this.siteExclusionView.render().$el);\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Url Options view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initUrlOptions() {\r\n const urlOptionsTemplate = DependencyResolver.get('campaignui/feature/advanced-settings/template/url-options');\r\n const UpgradedUrlOptions = DependencyResolver.get('component/upgraded-url/view/advancedSettingsUrlOptions');\r\n\r\n this.upgradedUrlOptions = new UpgradedUrlOptions({\r\n editMode: this.scenario === 'adgroup-settings',\r\n entityType: 'adgroup',\r\n trackingTemplate: _.result(this.model, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(this.model.UrlCustomParameters) ?\r\n undefined : this.model.UrlCustomParameters,\r\n urlOptionsTemplate,\r\n showUurlTestTool: true,\r\n isForVNext: this.isNewUI,\r\n adGroupId: this.model.Id,\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Ad Schedule view\r\n *\r\n * @private\r\n * @returns {Promise} - Promise of initializing ad schedule view\r\n */\r\n initAdScheduleViewAsync() {\r\n if (this.scenario === 'adgroup-settings') {\r\n return this.updateAdScheduleViewWithContextAsync();\r\n }\r\n\r\n return new Promise((resolve) => {\r\n resolve(this.renderAdSchedule());\r\n });\r\n }\r\n\r\n /**\r\n * Update Ad Schedule view in adgroup creation\r\n *\r\n * @private\r\n * @returns {Promise} - Promise of initializing ad schedule view\r\n */\r\n updateAdScheduleViewWithContextAsync() {\r\n const campaignId = this.viewContext.currentCampaign.Id;\r\n const adgroupId = this.viewContext.currentAdGroup.Id;\r\n\r\n const criterionLoader = DependencyResolver.get('campaignui/feature/base-targets/util/criterionLoader');\r\n\r\n const adgroupCriterions = criterionLoader.load(campaignId, adgroupId, ['DayTimeCriterion']);\r\n const campaignCriterions = criterionLoader.load(campaignId, '', ['DayTimeCriterion']);\r\n\r\n return Promise.join(adgroupCriterions, campaignCriterions)\r\n .then(([adgroupTargets, campaignTargets]) => {\r\n const adGroupSchedulingRows = this.parseSchedulingRows(adgroupTargets);\r\n const campaignSchedulingRows = this.parseSchedulingRows(campaignTargets, true);\r\n\r\n this.renderAdSchedule(adGroupSchedulingRows, campaignSchedulingRows);\r\n });\r\n }\r\n\r\n /**\r\n * Render Ad Schedule view\r\n * @param {Array} adGroupSchedulingRows adGroupScheduling rows\r\n * @param {Array} campaignSchedulingRows campaignScheduling rows\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n renderAdSchedule(adGroupSchedulingRows = [], campaignSchedulingRows = []) {\r\n // TODO: add timezone\r\n const isSettings = this.scenario === 'adgroup-settings';\r\n const adScheduleTimeZoneSetting = isSettings && this.model ?\r\n this.model.AdScheduleTimeZoneSetting :\r\n this.campaign.AdScheduleTimeZoneSetting;\r\n const adScheduleUseSearcherTimeZone = isSettings && this.model ?\r\n this.model.AdScheduleUseSearcherTimeZone :\r\n this.campaign.AdScheduleUseSearcherTimeZone;\r\n const model = {\r\n adScheduleTimeZoneSetting,\r\n adScheduleUseSearcherTimeZone,\r\n dayTimeRanges: adGroupSchedulingRows,\r\n startDate: _.result(this.model, 'StartDate'),\r\n endDate: _.result(this.model, 'EndDate'),\r\n adGroupStatus: _.result(this.model, 'Status'),\r\n };\r\n\r\n const AdScheduleView = DependencyResolver.get('campaignui/feature/ad-schedule/view/index');\r\n if (this.adScheduleView) {\r\n this.adScheduleView.remove();\r\n }\r\n this.adScheduleView = new AdScheduleView({\r\n model,\r\n level: 'adgroup',\r\n showDateSettings: true,\r\n campaignDayTimeRanges: campaignSchedulingRows,\r\n campaignAdScheduleUseSearcherTimeZone: this.campaign.AdScheduleUseSearcherTimeZone,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n });\r\n this.$('.ad-schedule').append(this.adScheduleView.render().$el);\r\n }\r\n\r\n /**\r\n * Parse SchedulingRows\r\n * @param {object} targets targets\r\n * @param {string} resetId reset id optional\r\n *\r\n * @private\r\n\r\n * @returns {undefined}\r\n */\r\n parseSchedulingRows(targets, resetId = false) {\r\n const schedulingRows = [];\r\n\r\n _.each(targets, (target) => {\r\n const criterion = target.Criterion;\r\n const multiplier = target.CriterionBid.Multiplier;\r\n let cashbackPercent = _.chain(target)\r\n .result('CriterionCashback')\r\n .result('CashbackPercent')\r\n .value();\r\n\r\n if (+cashbackPercent === -1) {\r\n cashbackPercent = null;\r\n }\r\n\r\n if (cashbackPercent != null) {\r\n cashbackPercent = this.i18n.formatDecimalToFixed(cashbackPercent, { digits: 2 });\r\n }\r\n\r\n schedulingRows.push({\r\n Id: resetId ? '' : target.Id,\r\n Day: criterion.Day,\r\n StartHour: criterion.FromHour,\r\n StartMinute: criterion.FromMinute,\r\n EndHour: criterion.ToHour,\r\n EndMinute: criterion.ToMinute,\r\n BidAdjustmentType: multiplier < 0 ? -1 : 1,\r\n BidAdjustmentAmount: Math.abs(multiplier),\r\n CashbackPercent: cashbackPercent,\r\n });\r\n });\r\n\r\n return schedulingRows;\r\n }\r\n}\r\n","/* eslint-disable max-len */\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport ko from 'knockout';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { InputControl } from '@bingads-webui/input-control';\r\nimport { RemainingCharsHint } from '@bingads-webui/remaining-chars-hint';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport {\r\n AudienceCampaignErrorsView,\r\n getBidSchema,\r\n getBulkErrorsLogMessage,\r\n getCampaignType,\r\n CampaignSubTypeTextMapping,\r\n AudienceStepBase,\r\n getBoostSetting,\r\n BiddingStrategyToRangeKey,\r\n PricingModelToBidParam,\r\n BiddingStrategyToPricingModel,\r\n BiddingStrategyValueToRecommendBidKey,\r\n generateNameSuggestionSuffix,\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { CashbackSettings } from '@bingads-webui-campaign/cashback-settings';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { FrequencyCapping } from '@bingads-webui-campaign/frequency-capping';\r\nimport { BoostPlacementTarget } from '@bingads-webui-campaign-react/boost-placement-target';\r\nimport { ContextualTargetWithStyle, getSelectionFromCriterions, getContextualTargetInfo } from '@bingads-webui-campaign-react/boost-contextual-target';\r\nimport { shouldSupportCashbackSettings, logAdGroupPersonalizedOffers } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport { AudienceAdvancedSettings } from '../advanced-settings/view';\r\n\r\nimport template from './template.pug';\r\n/**\r\n * CrudAudienceAdgroupBasic class that extends {AudienceStepBase} class\r\n * The class defines the section of the setting budget and bid\r\n *\r\n * @class CrudAudienceAdgroupBasic\r\n * @extends {AudienceStepBase}\r\n */\r\nexport class CrudAudienceAdgroupBasic extends AudienceStepBase {\r\n /**\r\n * Initializes the {CrudAudienceAdgroupBasic} class.\r\n *\r\n * @param {Object} options - options for initializing the class.\r\n * @param {Object} options.viewContext = viewContext for the View.\r\n * @returns {undefined}\r\n */\r\n initialize(options) {\r\n this.viewContext = options.viewContext;\r\n this.wizardElement = options.wizardElement;\r\n this.currentLevelTargetInfo = options.currentLevelTargetInfo;\r\n this.scenario = options.scenario;\r\n this.currentCampaign = options.viewContext.currentCampaign;\r\n this.currentAdGroup = options.viewContext.currentAdGroup;\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.decimal = DependencyResolver.get('component/humanize/decimal');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.deps = options.deps || {};\r\n this.isNewUI = _.result(this.deps, 'isNewUI', false);\r\n this.isNextButtonEnabled = (\r\n !(this.viewContext.isReadOnlyUser || this.viewContext.CurrentAccountInActive)\r\n );\r\n const config = DependencyResolver.get('component/config/index');\r\n const permissions = config.get('Permissions');\r\n const {\r\n IsAudienceCampaignCollapseTargetSelectionEnabled,\r\n IsAmplifyEnabled,\r\n IsContextualTargetEnabled,\r\n } = permissions;\r\n\r\n const bidStrategyType = this.currentCampaign && this.currentCampaign.BiddingScheme && this.currentCampaign.BiddingScheme.Type;\r\n const autoBidStrategyList = ['MaxClicks', 'MaxConversions', 'TargetCpa', 'TargetRoas', 'MaxConversionValue', 'TargetImpressionShare', 'CostPerSale'];\r\n this.isAutoBidding = _.contains(autoBidStrategyList, bidStrategyType);\r\n\r\n this.workflow = options.workflow;\r\n this.boostPlacementReactComponent = React.createRef();\r\n\r\n this.isAudienceCampaignCollapseTargetSelectionEnabled = IsAudienceCampaignCollapseTargetSelectionEnabled;\r\n this.isMSANBoostEnabled = IsAmplifyEnabled;\r\n this.isContextualTargetEnabled = this.isMSANBoostEnabled && IsContextualTargetEnabled;\r\n this.isFCapEnabled = bidStrategyType === 'ManualCpm';\r\n\r\n this.supportCashbackSettings = shouldSupportCashbackSettings(this.currentCampaign, permissions);\r\n\r\n if (this.supportCashbackSettings) {\r\n this.initCashbackSettings(this.currentAdGroup, this.currentCampaign);\r\n\r\n if (this.cashbackSettingsView) {\r\n this.cashbackSettingsView.viewModel.CashbackPercent\r\n .subscribe((v) => {\r\n if (this.cashbackSettingsView.viewModel.validateCashbackPercent(v)) {\r\n this.onCashbackPercentChange(v);\r\n }\r\n });\r\n }\r\n }\r\n\r\n this.initializeNameInputControl();\r\n\r\n this.initializeBiddingStrategyView();\r\n this.initDefaultBidInput();\r\n\r\n this.initAudienceAdvancedSettings();\r\n\r\n this.errorsView = new AudienceCampaignErrorsView();\r\n\r\n this.logScenario = options.logScenario;\r\n\r\n if (this.isContextualTargetEnabled) {\r\n this.contextualSelection = [];\r\n\r\n const contextualTargetsCriterions = this.currentLevelTargetInfo.getAllByType('ContextualTarget');\r\n this.contextualSelection = getSelectionFromCriterions(contextualTargetsCriterions);\r\n // reference copy is OK enough as the selection change comes as a new array.\r\n this.initialContextualSelection = this.contextualSelection;\r\n }\r\n\r\n this.frequencyCapping = [{}];\r\n\r\n if (this.currentAdGroup && this.currentAdGroup.FrequencyCapSettings) {\r\n this.frequencyCapping = this.currentAdGroup.FrequencyCapSettings;\r\n }\r\n\r\n this.initialFrequencyCapping = _.clone(this.frequencyCapping);\r\n\r\n this.viewmodel = {\r\n isAdvancedAdgroupExpanded: ko.observable(false),\r\n isAutoBidding: this.isAutoBidding,\r\n };\r\n }\r\n\r\n /**\r\n * Define events and event handlers for them.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object defining events\r\n */\r\n get events() {\r\n return {\r\n 'click .audience-advanced-settings-header': 'toggleAdvancedSettings',\r\n };\r\n }\r\n\r\n /**\r\n * Get the actions of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns array that has information about the actions.\r\n */\r\n get actions() {\r\n const actions = [\r\n {\r\n name: 'next',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Next'),\r\n enabled: this.isNextButtonEnabled,\r\n },\r\n ];\r\n\r\n if (this.viewContext.currentAdGroup) {\r\n actions.push({\r\n name: 'done',\r\n enabled: this.isNextButtonEnabled,\r\n htmlAttributes: {\r\n class: 'btn btn-primary btn-exitWithSave',\r\n },\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Exit'),\r\n });\r\n } else {\r\n actions.push({\r\n name: 'cancel',\r\n displayText: this.i18n.getString('Audience_Campaign_Cancel_Label'),\r\n });\r\n }\r\n\r\n return actions;\r\n }\r\n\r\n onCashbackPercentChange(value) {\r\n const formattedValue = value === '' || value == null ? null : this.decimal.fromLocalToFloat(value);\r\n if (this.advancedSettings &&\r\n this.advancedSettings.adScheduleView) {\r\n this.advancedSettings.adScheduleView\r\n .toggleCashbackPercentColumns(true, {\r\n level: 'AdGroup',\r\n value: formattedValue,\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Saves the AdGroup and exits.\r\n * This is only used when 'Save & Exit' button is shown on this step.\r\n *\r\n * @returns {undefined} - returns undefined\r\n */\r\n saveAndExit() {\r\n return this.save().then((isSuccess) => {\r\n if (isSuccess) {\r\n this.trigger('saveAndExit');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Toggle Advanced Settings Section\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n toggleAdvancedSettings() {\r\n this.$('#advancedSettings').toggle();\r\n this.$('.audience-advanced-settings-header .bedded-icon-marker').toggleClass('expanderImage expandedImage');\r\n this.viewmodel.isAdvancedAdgroupExpanded(!this.viewmodel.isAdvancedAdgroupExpanded());\r\n }\r\n\r\n /**\r\n * Initialize Name input control\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initializeNameInputControl() {\r\n const schema = DependencyResolver.get('$/schema!campaign/AdGroup');\r\n const SchemaModel = backboneSchema(\r\n schema,\r\n this.i18n,\r\n ['Name']\r\n );\r\n\r\n this.adGroupNameInputModel = new SchemaModel();\r\n\r\n if (this.currentAdGroup) {\r\n this.adGroupNameInputModel.set('Name', this.currentAdGroup.Name);\r\n }\r\n\r\n this.nameInput = new InputControl({\r\n entity: this.adGroupNameInputModel,\r\n field: 'Name',\r\n ariaLabelledby: 'adgroupNameLabel',\r\n });\r\n\r\n if (this.isAudienceCampaignCollapseTargetSelectionEnabled && _.isEmpty(this.adGroupNameInputModel.get('Name'))) {\r\n this.nameInput.setState({ value: generateNameSuggestionSuffix('Adgroup') });\r\n }\r\n\r\n this.nameInputRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.adGroupNameInputModel,\r\n field: 'Name',\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Bidding Strtegy view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initializeBiddingStrategyView() {\r\n const BiddingStrategyView = DependencyResolver.get('campaignui/feature/bidding-strategy/view/setting');\r\n const campaignType = getCampaignType(this.viewContext.currentCampaign);\r\n const campaignSubType = CampaignSubTypeTextMapping[this.viewContext.currentCampaign && this.viewContext.currentCampaign.CampaignSubType];\r\n // in adgroup setting page\r\n if (this.currentAdGroup && this.currentAdGroup.BiddingScheme) {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'AdGroup',\r\n biddingStrategyType: this.currentAdGroup.BiddingScheme.Type,\r\n campaignSubType,\r\n campaignType,\r\n });\r\n } else {\r\n // in create adgroup\r\n let biddingStrategyType;\r\n if (\r\n this.viewContext.currentCampaign &&\r\n campaignSubType === 'AudienceVideoAds' &&\r\n this.viewContext.currentCampaign.BiddingScheme &&\r\n this.viewContext.currentCampaign.BiddingScheme.Type\r\n ) {\r\n biddingStrategyType = this.viewContext.currentCampaign.BiddingScheme.Type;\r\n }\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n entityType: 'AdGroup',\r\n isInitialize: true,\r\n biddingStrategyType,\r\n campaignSubType,\r\n campaignType,\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Initialize Default Bid input\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initDefaultBidInput() {\r\n const config = DependencyResolver.get('component/config/index');\r\n const bidSchemeType = this.viewContext.currentCampaign &&\r\n this.viewContext.currentCampaign.BiddingScheme &&\r\n this.viewContext.currentCampaign.BiddingScheme.Type;\r\n\r\n const DefaultBidModel = backboneSchema(getBidSchema({\r\n bidCeil: _.result(config.get(BiddingStrategyToRangeKey[bidSchemeType] || 'KeywordBidRange'), 'CeilingValue'),\r\n bidFloor: _.result(config.get(BiddingStrategyToRangeKey[bidSchemeType] || 'KeywordBidRange'), 'FloorValue'),\r\n }), this.i18n, ['Amount']);\r\n\r\n this.defaultBidModel = new DefaultBidModel();\r\n\r\n if (_.get(this.viewContext, 'currentCampaign.CampaignType') === 'Audience'\r\n && _.contains([0, 'AudienceStatic'], _.get(this.viewContext, 'currentCampaign.CampaignSubType'))\r\n && _.contains(['ManualCpc', 'EnhancedCpc'], this.currentCampaign.BiddingScheme.Type)) {\r\n const recommendedValueFromContext = config.get(BiddingStrategyValueToRecommendBidKey[bidSchemeType]);\r\n const recommendedValue = _.isNull(recommendedValueFromContext) || _.isUndefined(recommendedValueFromContext) ? 3.3 : recommendedValueFromContext;\r\n this.defaultBidModel.set(\r\n 'Amount',\r\n this.i18n.formatDecimal(recommendedValue, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n })\r\n );\r\n }\r\n\r\n if (this.currentAdGroup) {\r\n const bidParam = PricingModelToBidParam[this.currentAdGroup.PricingModel] || 'SearchBid';\r\n const amount = this.currentAdGroup[bidParam];\r\n if (amount) {\r\n this.defaultBidModel.set('Amount', amount.toString());\r\n }\r\n }\r\n\r\n const AutoBidModel = backboneSchema({\r\n name: 'AutoBid',\r\n type: 'object',\r\n properties: {\r\n Amount: {\r\n type: 'string',\r\n },\r\n },\r\n }, this.i18n, ['Amount']);\r\n this.autoBidModel = new AutoBidModel();\r\n this.autoBidModel.set('Amount', 'Auto');\r\n\r\n this.defaultBidInput = new InputControl({\r\n entity: this.isAutoBidding ? this.autoBidModel : this.defaultBidModel,\r\n field: 'Amount',\r\n addonText: this.viewContext.accountCurrencyCode,\r\n ariaLabelledby: 'defaultBidLabel',\r\n readonly: this.isAutoBidding,\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Advanced Settings view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initAudienceAdvancedSettings() {\r\n this.advancedSettings = new AudienceAdvancedSettings({\r\n viewContext: this.viewContext,\r\n scenario: this.scenario,\r\n isNewUI: this.isNewUI,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n });\r\n }\r\n\r\n initCashbackSettings(adGroup, campaign) {\r\n const CashbackPercent = _.chain(adGroup)\r\n .result('AdGroupCashback')\r\n .result('Percent', null)\r\n .value();\r\n const CashbackScope = _.chain(adGroup)\r\n .result('AdGroupCashback')\r\n .result('Scope')\r\n .value() || 'None';\r\n const CouponsEnabled = _.chain(adGroup)\r\n .result('AdGroupCashback')\r\n .result('CouponsEnabled', 'None')\r\n .value();\r\n const ParentLevelCashbackPercent = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('Percent', null)\r\n .value();\r\n const ParentLevelCashbackScope = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('Scope')\r\n .value() || 'None';\r\n const ParentCouponsEnabled = _.chain(campaign)\r\n .result('CampaignCashback')\r\n .result('CouponsEnabled', 'None')\r\n .value();\r\n if (this.supportCashbackSettings) {\r\n this.cashbackSettingsView = new CashbackSettings({\r\n CashbackPercent,\r\n CashbackScope,\r\n showEnableCashbackSettingsCheckbox: false,\r\n showCashbackBudget: false,\r\n isCashbackScopeReadonly: false,\r\n showInheritFromParentOption: true,\r\n ParentLevelCashbackPercent,\r\n ParentLevelCashbackScope,\r\n CouponsEnabled,\r\n ParentCouponsEnabled,\r\n deps: {\r\n ...this.deps,\r\n i18n: this.i18n,\r\n },\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Get the title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get title() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Adgroup_Basic_Title'),\r\n };\r\n }\r\n\r\n /**\r\n * Get the page title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get pageTitle() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Adgroup_Basic_PageTitle'),\r\n };\r\n }\r\n\r\n onContextualSelectionChange(data) {\r\n this.contextualSelection = data || [];\r\n }\r\n\r\n onFrequencyCappingChange(data) {\r\n this.frequencyCapping = data.FrequencyCapSettings;\r\n this.renderFrequencyCapping();\r\n }\r\n\r\n renderFrequencyCapping() {\r\n if (this.isFCapEnabled) {\r\n ReactDOM.render(\r\n this.onFrequencyCappingChange(data)}\r\n />,\r\n this.$('.frequency-capping-container')[0]\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template(this));\r\n\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n this.renderFrequencyCapping();\r\n\r\n if (this.isMSANBoostEnabled && this.scenario !== 'adgroup-creation') {\r\n ReactDOM.render(\r\n ,\r\n this.$('.boost-placement-target')[0]\r\n );\r\n }\r\n\r\n if (this.isContextualTargetEnabled && this.scenario !== 'adgroup-creation') {\r\n ReactDOM.render(\r\n this.onContextualSelectionChange(selection)}\r\n />,\r\n this.$('.contextual-target-container')[0]\r\n );\r\n }\r\n\r\n this.$('.name-input-control-container').prepend(this.nameInput.render().$el);\r\n this.$('.remaining-chars-hint-container').append(this.nameInputRemainingCharsHint.render().$el);\r\n\r\n this.$('.bidding-strategy-container').append(this.biddingStrategyView.render().$el);\r\n\r\n this.$('.default-bid-container').append(this.defaultBidInput.render().$el);\r\n\r\n if (this.cashbackSettingsView) {\r\n this.$('.cashback-settings-container').append(this.cashbackSettingsView.render().$el);\r\n }\r\n\r\n this.$('.audience-advanced-settings-container').append(this.advancedSettings.render().$el);\r\n\r\n this.$('.errors-container').append(this.errorsView.render().$el);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the object data to save the AdGroup.\r\n *\r\n * @returns {Object} - data representation of the object.\r\n */\r\n getData() {\r\n let pricingModel = 'CPC';\r\n if (\r\n this.viewContext.currentCampaign.BiddingScheme &&\r\n this.viewContext.currentCampaign.BiddingScheme.Type\r\n ) {\r\n pricingModel =\r\n BiddingStrategyToPricingModel[this.viewContext.currentCampaign.BiddingScheme.Type] ||\r\n pricingModel;\r\n }\r\n let params = {\r\n Name: this.adGroupNameInputModel.toJSON().Name,\r\n Medium: 'Search',\r\n PricingModel: pricingModel,\r\n Languages: ['All'],\r\n Campaign: {\r\n Id: this.viewContext.currentCampaign.Id,\r\n },\r\n BiddingScheme: this.biddingStrategyView.getValues(),\r\n [PricingModelToBidParam[pricingModel]]: this.defaultBidModel.toJSON().Amount,\r\n };\r\n\r\n if (this.viewContext.currentAdGroup) {\r\n params.Id = this.viewContext.currentAdGroup.Id;\r\n }\r\n\r\n if (this.isMSANBoostEnabled && this.scenario !== 'adgroup-creation') {\r\n params = {\r\n ...params,\r\n ...this.boostPlacementReactComponent.current.getData(),\r\n };\r\n }\r\n\r\n _.extend(params, this.advancedSettings.getData());\r\n\r\n const scheduling = this.getScheduleInfo();\r\n\r\n params.AdGroupCriterions = this.populateCriterionWithAdGroupInfo(scheduling);\r\n\r\n if (this.isContextualTargetEnabled) {\r\n const contextualTargets = getContextualTargetInfo(\r\n this.initialContextualSelection,\r\n this.contextualSelection\r\n );\r\n this.populateCriterionWithAdGroupInfo(contextualTargets);\r\n\r\n params.AdGroupCriterions = [\r\n ...(_.isArray(params.AdGroupCriterions) ? params.AdGroupCriterions : []),\r\n ...contextualTargets,\r\n ];\r\n }\r\n\r\n if (this.cashbackSettingsView) {\r\n _.extend(params, this.cashbackSettingsView.getValues());\r\n }\r\n\r\n if (this.isFCapEnabled) {\r\n if (JSON.stringify(this.initialFrequencyCapping) !== JSON.stringify(this.frequencyCapping)) {\r\n _.extend(params, { FrequencyCapSettings: [{}] });\r\n\r\n if (this.frequencyCapping) {\r\n params.FrequencyCapSettings = this.frequencyCapping;\r\n }\r\n }\r\n }\r\n\r\n return params;\r\n }\r\n\r\n validate() {\r\n const isAdvancedSettingsValid = this.advancedSettings.validate();\r\n const isCashbackSettingsValid = this.cashbackSettingsView ? this.cashbackSettingsView.validate() : true;\r\n\r\n if (!this.nameInput.getState().isValid\r\n || !this.defaultBidInput.getState().isValid\r\n || !isAdvancedSettingsValid\r\n || !isCashbackSettingsValid) {\r\n this.nameInput.setState({ showError: true });\r\n this.defaultBidInput.setState({ showError: true });\r\n\r\n if (!isAdvancedSettingsValid) {\r\n if (!this.$('#advancedSettings').is(':visible')) {\r\n this.toggleAdvancedSettings();\r\n }\r\n this.$('#advancedSettings')[0].scrollIntoView();\r\n } else {\r\n this.nameInput.$el[0].scrollIntoView(false);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * It attempts to save and return true if the save is done succefully.\r\n *\r\n * @returns {boolean} - returns true if it is ready to go to the next step.\r\n */\r\n wizardShouldGoNext() {\r\n return this.save();\r\n }\r\n\r\n /**\r\n * Save the adgroup with the given setting.\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save process is succesful or not.\r\n */\r\n save() {\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const params = this.getData();\r\n\r\n let updateOrCreateTask = null;\r\n\r\n if (params.Id) {\r\n updateOrCreateTask = jsdata.AdGroup.update(\r\n params.Id,\r\n params,\r\n { adapter: 'bulk', cacheResponse: false }\r\n );\r\n } else {\r\n updateOrCreateTask = jsdata.AdGroup.create(params, { adapter: 'bulk', cacheResponse: false });\r\n }\r\n\r\n this.errorsView.removeErrors();\r\n\r\n const createAdGroupBasicActivity = this.logScenario.createAdGroupBasic.create();\r\n\r\n return updateOrCreateTask.then((data) => {\r\n if (_.isFinite(data.Id)) {\r\n this.viewContext.currentAdGroup = data;\r\n logAdGroupPersonalizedOffers(\r\n this.supportCashbackSettings,\r\n createAdGroupBasicActivity.signal.bind(createAdGroupBasicActivity), params\r\n );\r\n return this.advancedSettings.updateAdScheduleViewWithContextAsync().then(() => true);\r\n }\r\n\r\n return Promise.resolve(false);\r\n })\r\n .catch((response) => {\r\n if (response && response.entity) {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n if (response.errors.length) {\r\n const adGroupErrors = _.partition(\r\n response.errors,\r\n error => error.Type === 'AdGroup Error'\r\n )[0];\r\n\r\n this.errorsView.setErrors(this.i18nErrors.getBulkApiErrors(adGroupErrors));\r\n\r\n createAdGroupBasicActivity.trace(getBulkErrorsLogMessage(response.errors));\r\n }\r\n } else {\r\n // Unexpected case. Log Error.\r\n createAdGroupBasicActivity.error(getBulkErrorsLogMessage(response.errors));\r\n }\r\n } else {\r\n // Ajax error\r\n this.errorsView.setErrors(this.i18nErrors.getODataErrors(response.errors));\r\n }\r\n\r\n return false;\r\n })\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n /**\r\n * Populate AdGroup Criterion\r\n *\r\n * @private\r\n * @param {object} criterions - criterions to populate\r\n * @returns {object} - filtered criterions with AdGroupId\r\n */\r\n /* eslint-disable no-param-reassign */\r\n populateCriterionWithAdGroupInfo(criterions) {\r\n if (this.scenario === 'adgroup-settings') {\r\n _.each(criterions, (criterion) => {\r\n criterion.AdGroup = {\r\n Id: this.viewContext.currentAdGroup.Id,\r\n };\r\n }, this);\r\n } else {\r\n _.each(criterions, (criterion) => {\r\n criterion.CampaignName = this.viewContext.currentCampaign.Name;\r\n criterion.AdGroupName = this.adGroupNameInputModel.toJSON().Name;\r\n }, this);\r\n }\r\n\r\n return criterions;\r\n }\r\n\r\n /**\r\n * Get Ad Schedule info\r\n *\r\n * @private\r\n * @returns {object} scheduling info\r\n */\r\n getScheduleInfo() {\r\n const deletedDayTimeCb = (deletedDayTimeCriterions) => {\r\n _.each(deletedDayTimeCriterions, (criterion) => {\r\n criterion.Status = 'Deleted';\r\n if (this.scenario === 'adgroup-settings') {\r\n criterion.AdGroup = {\r\n Id: this.viewContext.currentAdGroup.Id,\r\n };\r\n } else {\r\n criterion.CampaignName = this.viewContext.currentCampaign.Name;\r\n criterion.AdGroupName = this.adGroupNameInputModel.toJSON().Name;\r\n }\r\n });\r\n };\r\n const scheduling = this.advancedSettings.adScheduleView.getValues(deletedDayTimeCb);\r\n\r\n return scheduling;\r\n }\r\n}\r\n","/* eslint-disable jsx-a11y/label-has-for */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { unitValueMap } from '@bingads-webui-campaign/reach-estimate-control';\r\n\r\n/**\r\n * @const {Object} COLUMN_FORMATS The different formats supported by ProjectionGridBaseColumn\r\n * @property {string} PERCENTAGE_VALUE value: 'percentage-value'\r\n * Formats a float as percentage. E.g.: 42.07 => 42.07%, 0.15 => 0.15%\r\n * @property {string} DECIMAL_Original: value: 'decimal-original'\r\n * A number with at most two decimal points.\r\n * @property {string} DECIMAL: value: 'decimal'\r\n * A number with two decimal points.\r\n */\r\nconst COLUMN_FORMATS = {\r\n PERCENTAGE_VALUE: 'percentage-value',\r\n DECIMAL_Original: 'decimal-original',\r\n DECIMAL: 'decimal',\r\n};\r\n\r\nconst getEstimateDataConfig = (pricingModel, isVideo) => _.compact([\r\n {\r\n name: 'impressions',\r\n i18nLabel: 'EstimatedImpressions',\r\n helpTopic: 'pop_BA_CampaignCreate_AudAds_EstImpressions',\r\n ApiDataName: 'EstImpression',\r\n format: COLUMN_FORMATS.DECIMAL_Original,\r\n },\r\n isVideo && {\r\n name: 'views',\r\n i18nLabel: 'EstimatedViews',\r\n helpTopic: 'pop_BA_CampaignCreate_AudAds_EstViews',\r\n ApiDataName: 'EstView',\r\n format: COLUMN_FORMATS.DECIMAL_Original,\r\n },\r\n {\r\n name: 'clicks',\r\n i18nLabel: 'EstimatedClicks',\r\n helpTopic: 'pop_BA_CampaignCreate_AudAds_EstClicks',\r\n ApiDataName: 'EstClick',\r\n format: COLUMN_FORMATS.DECIMAL_Original,\r\n },\r\n {\r\n name: 'CTR',\r\n i18nLabel: 'EstimatedCTR',\r\n helpTopic: 'pop_BA_CampaignCreate_AudAds_EstCTR',\r\n ApiDataName: 'EstCTR',\r\n format: COLUMN_FORMATS.PERCENTAGE_VALUE,\r\n },\r\n {\r\n name: `avg${pricingModel}`,\r\n i18nLabel: `EstimatedAvg${pricingModel}`,\r\n helpTopic: `pop_BA_CampaignCreate_AudAds_Est${pricingModel}`,\r\n ApiDataName: 'EstCPC',\r\n format: COLUMN_FORMATS.DECIMAL,\r\n },\r\n {\r\n name: 'spend',\r\n i18nLabel: 'EstimatedSpend',\r\n helpTopic: 'pop_BA_CampaignCreate_AudAds_EstSpend',\r\n ApiDataName: 'EstSpend',\r\n format: COLUMN_FORMATS.DECIMAL,\r\n },\r\n]);\r\n\r\nconst getFormatter = (i18n, format, value) => {\r\n let formatter = _.identity;\r\n\r\n switch (format) {\r\n case COLUMN_FORMATS.PERCENTAGE_VALUE:\r\n formatter = _.compose(i18n.percentToFixedFormatter({\r\n digits: 2,\r\n }), number => number / 100);\r\n break;\r\n case COLUMN_FORMATS.DECIMAL_Original:\r\n formatter = i18n.decimalFormatter({\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 2,\r\n });\r\n break;\r\n case COLUMN_FORMATS.DECIMAL:\r\n formatter = i18n.decimalFormatter({\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return _.isNull(value) || _.isUndefined(value) ?\r\n '' : formatter(value);\r\n};\r\n\r\nconst getValue = (obj, i18n, format) => {\r\n let result;\r\n let unitShort;\r\n\r\n if (_.isObject(obj)) {\r\n result = obj.Value;\r\n unitShort = unitValueMap[obj.Unit].unit;\r\n } else {\r\n result = obj;\r\n unitShort = '';\r\n }\r\n return `${getFormatter(i18n, format, result)}${unitShort}`;\r\n};\r\n\r\nexport const getRange = (data, i18n, format) => {\r\n if (data === null || data === undefined) {\r\n return ' - ';\r\n }\r\n const { High, Low } = data;\r\n if ((_.isObject(High) && High.Value === 0) || (_.isNumber(High) && High === 0)) {\r\n return `${getValue(High, i18n, format)}`;\r\n }\r\n return `${getValue(Low, i18n, format)} - ${getValue(High, i18n, format)}`;\r\n};\r\n\r\nexport function KPIEstimateReact(props) {\r\n const { pricingModel, isVideo } = props;\r\n const learnMore = props.i18n.getString('LearnMoreLinkText');\r\n const estimateDataConfig = getEstimateDataConfig(pricingModel, isVideo);\r\n\r\n return (\r\n
\r\n
\r\n {props.reqStatus ?\r\n
\r\n {estimateDataConfig.map(item => (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {getRange(\r\n props[item.ApiDataName] || {},\r\n props.i18n,\r\n item.format\r\n )}\r\n
\r\n
))}\r\n
:\r\n
\r\n {props.i18n.getString('Audience_Campaign_KPIEstimation_RequestError')}\r\n
\r\n }\r\n
\r\n );\r\n}\r\n\r\nKPIEstimateReact.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n percentToFixedFormatter: PropTypes.func.isRequired,\r\n decimalFormatter: PropTypes.func.isRequired,\r\n }).isRequired,\r\n reqStatus: PropTypes.bool.isRequired,\r\n pricingModel: PropTypes.string.isRequired,\r\n isVideo: PropTypes.bool,\r\n};\r\n\r\nKPIEstimateReact.defaultProps = {\r\n isVideo: false,\r\n};\r\n","/* eslint-disable jsx-a11y/label-has-for */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { HelpLink } from '@bingads-webui-react/help-link';\r\nimport { Dropdown } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const BidStrategyReact = (props) => {\r\n const {\r\n i18n,\r\n onStrategyChange,\r\n keys,\r\n defaultSelectedKey,\r\n isDisabled,\r\n } = props;\r\n const options = keys.map(key => ({ key, text: i18n.getString(`BidStrategySetting_Option_${key}`), title: i18n.getString(`BidStrategySetting_Option_${key}`) }));\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {i18n.getString('BidStrategySetting_OptionQuestion')} \r\n \r\n {i18n.getString('LearnMoreLinkText')}\r\n \r\n \r\n
\r\n onStrategyChange(item)}\r\n />\r\n
);\r\n};\r\n\r\nBidStrategyReact.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onStrategyChange: PropTypes.func.isRequired,\r\n isDisabled: PropTypes.bool,\r\n keys: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n defaultSelectedKey: PropTypes.string.isRequired,\r\n};\r\n\r\nBidStrategyReact.defaultProps = {\r\n isDisabled: false,\r\n};\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport ko from 'knockout';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport {\r\n CompanyNameCriterionSetting,\r\n JobFunctionCriterionSetting,\r\n IndustryCriterionSetting,\r\n AgeCriterionSetting,\r\n DeviceCriterionSetting,\r\n GenderCriterionSetting,\r\n AudienceCriterionSetting,\r\n LocationCriterionSetting\r\n} from '@bingads-webui-campaign/audience-criterion-setting';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport { InputControl } from '@bingads-webui/input-control';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport {\r\n AudienceCampaignErrorsView,\r\n AudienceStepBase,\r\n criterionHelper,\r\n getBidSchema,\r\n getBulkErrorsLogMessage,\r\n BidStrategy,\r\n CampaignSubTypes,\r\n getCampaignType,\r\n PricingModelToRangeKey,\r\n getFeedInfo,\r\n DefaultBidCPVWarningThreshold,\r\n BiddingStrategyValueToRecommendBidKey,\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { shouldSupportCashbackSettings } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport { EstimateRequestFactory } from '@bingads-webui-campaign/reach-estimate-control';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport { GoalSelectorView } from '@bingads-webui-campaign-react/goal-selector';\r\nimport BiddingStrategyView from '@bingads-webui-campaign-legacy/bidding-strategy/view/setting';\r\nimport { FrequencyCapping } from '@bingads-webui-campaign/frequency-capping';\r\nimport template from './template.pug';\r\nimport { KPIEstimateReact } from './kpi-estimate-react';\r\nimport { BidStrategyReact } from './bid-strategy-react';\r\n\r\n/**\r\n * CrudAudienceBudgetBid class that extends {AudienceStepBase} class\r\n * The class defines the section of the setting budget and bid\r\n *\r\n * @class CrudAudienceBudgetBid\r\n * @extends {AudienceStepBase}\r\n */\r\nexport class CrudAudienceBudgetBid extends AudienceStepBase {\r\n initialize(options = {}) {\r\n this.renderMarker;\r\n this.perfMarker = options.perfMarker;\r\n this.perfMarker.willInit();\r\n this.wizardElement = options.wizardElement;\r\n this.options = options;\r\n this.deps = options.deps || {};\r\n this.audienceCampaignType = options.audienceCampaignType || '';\r\n this.viewContext = options.viewContext;\r\n this.currentCampaign = this.viewContext.currentCampaign;\r\n this.currentLevelTargetInfo = this.options.currentLevelTargetInfo;\r\n this.isAdImpressions = this.options.isAdImpressions;\r\n this.estimateRequestFactory = new EstimateRequestFactory({\r\n currentLevelTargetInfo: this.currentLevelTargetInfo,\r\n });\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.odata = DependencyResolver.get('component/http/channel/odata');\r\n this.targetBidAdjustment = {};\r\n this.defaultBidUpdatedByUser = false;\r\n this.IsSuggestedBidShowedOnUI = false;\r\n this.showDefaultBidWarning = false;\r\n this.isDefaultBidCPVWarningRendered = false;\r\n this.logScenario = options.logScenario;\r\n this.activityLogger = this.logScenario.createBudgetBids.create();\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n this.permissions = config.get('Permissions');\r\n this.config = config;\r\n\r\n const {\r\n IsManualCpmEnabled,\r\n IsManualCpcForVideoAdsEnabled,\r\n IsAudienceCampaignSwapAdsBudgetAndBidsEnabled,\r\n IsKPIEstimateForAudienceFeedBasedEnabled,\r\n IsEnabledDeprecateManualCpcForAudienceCampaign,\r\n IsHideCpmForFeedbasedCampaginEnabled,\r\n dynamic: {\r\n AgeGenderDisclaimer,\r\n } = {},\r\n } = this.permissions;\r\n\r\n const bidStrategyType = this.currentCampaign && this.currentCampaign.BiddingScheme && this.currentCampaign.BiddingScheme.Type;\r\n this.isCpmEnabled = IsManualCpmEnabled;\r\n this.isManualCpcForVideoAdsEnabled = IsManualCpcForVideoAdsEnabled;\r\n this.isSwapStepsEnabled = IsAudienceCampaignSwapAdsBudgetAndBidsEnabled &&\r\n this.audienceCampaignType !== 'shopping';\r\n this.isHideCpmForFeedbasedCampaginEnabled = IsHideCpmForFeedbasedCampaginEnabled;\r\n this.IsAIMBidSuggestionEnabled = this.options.audienceCampaignType !== 'shopping' || IsKPIEstimateForAudienceFeedBasedEnabled;\r\n this.isEnabledDeprecateManualCpcForAudienceCampaign = IsEnabledDeprecateManualCpcForAudienceCampaign;\r\n this.isShowDisclaimerBannerEnabled = AgeGenderDisclaimer;\r\n this.isFCapEnabled = bidStrategyType === 'ManualCpm';\r\n\r\n this.CampaignGoalSelectionView = GoalSelectorView;\r\n\r\n this.isVideo = options.isVideo;\r\n this.isFeedBased = options.audienceCampaignType === 'shopping';\r\n // eslint-disable-next-line no-nested-ternary\r\n this.pricingModel = this.isVideo ? 'CPV' : (this.isCpmEnabled || this.isAdImpressions ? 'CPM' : 'CPC');\r\n this.pricingModels = ['CPC', 'CPV', 'CPM'];\r\n this.pricingModelToBidTypeString = {\r\n CPC: 'ManualCpc',\r\n CPV: 'ManualCpv',\r\n CPM: 'ManualCpm',\r\n EnhancedCPC: 'EnhancedCpc',\r\n MaxConversions: 'MaxConversions',\r\n };\r\n this.pricingModelToBidTypeEnum = {\r\n CPC: BidStrategy.ManualCpc,\r\n EnhancedCPC: BidStrategy.EnhancedCpc,\r\n CPV: BidStrategy.ManualCpv,\r\n CPM: BidStrategy.ManualCpm,\r\n };\r\n this.pricingModelAdgroupBidAttributeMapping = {\r\n CPC: 'SearchBid',\r\n CPV: 'CpvBid',\r\n CPM: 'CpmBid',\r\n EnhancedCPC: 'SearchBid',\r\n MaxConversions: 'SearchBid',\r\n };\r\n this.suggestedBidMapping = {};\r\n\r\n this.initDefaultBidInput();\r\n this.initAdScheduleView();\r\n\r\n this.errorsView = new AudienceCampaignErrorsView();\r\n\r\n this.frequencyCapping = [{}];\r\n\r\n if (this.currentAdGroup && this.currentAdGroup.FrequencyCapSettings) {\r\n this.frequencyCapping = this.currentAdGroup.FrequencyCapSettings;\r\n }\r\n\r\n this.initialFrequencyCapping = _.clone(this.frequencyCapping);\r\n\r\n this.viewmodel = {\r\n isAdScheduleExpanded: ko.observable(false),\r\n isBidAdjustmentsExpanded: ko.observable(false),\r\n };\r\n }\r\n\r\n /**\r\n * Get the title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get title() {\r\n let title = this.i18n.getString('Audience_Campaign_Settings_BudgetBidsTitle');\r\n\r\n if (this.isSwapStepsEnabled) {\r\n title = this.i18n.getString('Audience_Campaign_Settings_BudgetBidsTitle_Step3');\r\n }\r\n\r\n if (this.options.audienceCampaignType === 'shopping') {\r\n title = this.i18n.getString('Audience_ShoppingCampaign_BudgetBidsTitle_Step3');\r\n }\r\n\r\n return {\r\n text: title,\r\n };\r\n }\r\n\r\n /**\r\n * Get the page title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get pageTitle() {\r\n let text = this.i18n.getString('BudgetBidsStep_PageTitle');\r\n\r\n if (this.options.audienceCampaignType === 'shopping') {\r\n text = this.i18n.getString('Audience_ShoppingCampaign_BudgetBidsTitle_Step3_PageTitle');\r\n }\r\n\r\n return {\r\n text,\r\n };\r\n }\r\n\r\n /**\r\n * Define events and event handlers for them.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object defining events\r\n */\r\n get events() {\r\n return {\r\n 'click .adschedule-section': 'toggleAdSchedule',\r\n 'click .bid-adjustments-section': 'toggleBidAdjustments',\r\n };\r\n }\r\n\r\n toggleAdSchedule() {\r\n this.$('#adScheduleTargets').toggle();\r\n this.$('.adschedule-section .bedded-icon-marker').toggleClass('expanderImage expandedImage');\r\n this.viewmodel.isAdScheduleExpanded(!this.viewmodel.isAdScheduleExpanded());\r\n }\r\n\r\n toggleBidAdjustments() {\r\n this.$('#bidAdjustmentTargets').toggle();\r\n this.$('.bid-adjustments-section .bedded-icon-marker').toggleClass('expanderImage expandedImage');\r\n this.viewmodel.isBidAdjustmentsExpanded(!this.viewmodel.isBidAdjustmentsExpanded());\r\n }\r\n\r\n /**\r\n * Get the actions of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns array that has information about the actions.\r\n */\r\n\r\n get actions() {\r\n const actions = [];\r\n\r\n if (this.isSwapStepsEnabled) {\r\n actions.push({\r\n name: 'next',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Next'),\r\n });\r\n\r\n actions.push({\r\n name: 'back',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Back_Label'),\r\n });\r\n\r\n actions.push({\r\n name: 'done',\r\n htmlAttributes: {\r\n class: 'btn-primary',\r\n },\r\n enabled: true,\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Exit'),\r\n });\r\n } else {\r\n actions.push({\r\n name: 'save',\r\n htmlAttributes: {\r\n class: 'btn-primary',\r\n },\r\n displayText: this.i18n.getString('Save'),\r\n });\r\n\r\n actions.push({\r\n name: 'back',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Back_Label'),\r\n });\r\n }\r\n\r\n return actions;\r\n }\r\n\r\n /**\r\n * Get the data that is used for the parameter for saving.\r\n * @param {bool} skipAdScheduling - skip to save the adscheduling data when click back button.\r\n *\r\n * @returns {Object} - object representing the data for the campaign to be saved.\r\n */\r\n getData(skipAdScheduling) {\r\n this.campaignId = this.viewContext.currentCampaign.Id;\r\n this.campaignName = this.viewContext.currentCampaign.Name;\r\n this.adGroupId = this.viewContext.currentAdGroup.Id;\r\n\r\n const adGroup = {\r\n Campaign: { Id: this.campaignId },\r\n Id: this.adGroupId,\r\n Medium: 'Search',\r\n // eslint-disable-next-line max-len\r\n [this.pricingModelAdgroupBidAttributeMapping[this.pricingModel]]: this.defaultBidModel.toJSON().Amount,\r\n PricingModel: this.pricingModel,\r\n Status: 'Active',\r\n };\r\n\r\n const currentSnapshot = this.currentLevelTargetInfo.getSnapshot(this.supportCashbackSettings);\r\n\r\n let targets =\r\n criterionHelper.compareAndGetCriterionsDelta(this.originalSnapshot, currentSnapshot);\r\n\r\n // Audience Targeting goes to AdGroupAudienceCriterions not AdGroupCriterions\r\n const audienceTargets = _.filter(targets, target => target.Criterion.Type === 'Audience');\r\n\r\n targets = _.reject(targets, target => target.Criterion.Type === 'Audience');\r\n\r\n adGroup.AdGroupCriterions = this.populateCriterionWithAdGroupIds(targets);\r\n adGroup.AdGroupAudienceCriterions = this.populateCriterionWithAdGroupIds(audienceTargets);\r\n\r\n const params = {};\r\n\r\n params.Id = this.campaignId;\r\n params.Name = this.campaignName;\r\n params.AdGroups = [adGroup];\r\n params.Budget = this.budgetPanelView.getValues();\r\n\r\n if (this.isAudienceCampaignAutoBiddingV2Enabled) {\r\n params.BiddingScheme = this.biddingStrategyView.getValues();\r\n } else {\r\n params.BiddingScheme = {\r\n Type: this.pricingModelToBidTypeString[this.pricingModel],\r\n };\r\n }\r\n\r\n const dateSettings = this.adScheduleView.getDateSettings();\r\n _.extend(adGroup, dateSettings);\r\n\r\n if (JSON.stringify(this.initialFrequencyCapping) !== JSON.stringify(this.frequencyCapping)) {\r\n _.extend(adGroup, { FrequencyCapSettings: [{}] });\r\n\r\n if (this.frequencyCapping) {\r\n adGroup.FrequencyCapSettings = this.frequencyCapping;\r\n }\r\n }\r\n\r\n if (!skipAdScheduling) {\r\n const scheduling = this.getScheduleInfo();\r\n\r\n // Add Campaign Criterions\r\n this.populateCriterionCampaignIds(scheduling);\r\n params.CampaignCriterions = scheduling;\r\n }\r\n\r\n if (this.goalSelectionView) {\r\n params.CampaignConversionGoalAssociations =\r\n this.goalSelectionView.convertToMTFormat(this.campaignId);\r\n }\r\n\r\n return params;\r\n }\r\n\r\n isDefaultBidUsed() {\r\n return this.pricingModel !== 'MaxConversions';\r\n }\r\n\r\n /**\r\n * Validate inputs\r\n *\r\n * @private\r\n * @returns {bool} are inputs valid\r\n */\r\n validate() {\r\n this.defaultBidInput.setState({ showError: true });\r\n\r\n return this.budgetPanelView.validate() &&\r\n (this.isDefaultBidUsed() ? this.defaultBidInput.getState().isValid : true) &&\r\n this.adScheduleView.validate() &&\r\n _.every(this.targetBidAdjustment, targetBidAdjustment =>\r\n targetBidAdjustment.validate());\r\n }\r\n\r\n /**\r\n * Update the Campaign with the given setting.\r\n * @param {bool} skipAdScheduling - skip to save the adscheduling data when click back button.\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the update process is succesful or not.\r\n */\r\n updateCampaign(skipAdScheduling) {\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const params = this.getData(skipAdScheduling);\r\n\r\n this.errorsView.removeErrors();\r\n\r\n\r\n if (this.adScheduleView) {\r\n params.AdScheduleUseSearcherTimeZone =\r\n _.result(this.adScheduleView, 'getAdScheduleUseSearcherTimeZone');\r\n }\r\n\r\n return jsdata.Campaign.update(this.campaignId, params, { adapter: 'bulk' }).then((data) => {\r\n if (_.isFinite(data.Id)) {\r\n if (this.IsAIMBidSuggestionEnabled) {\r\n // log for ad insight team to analyze suggestion bid usage.\r\n const logdata = {\r\n CampaignId: params.Id,\r\n AdGroupId: params.AdGroups[0].Id,\r\n SuggestedBid: this.viewContext.SuggestedBid,\r\n SearchBid: params.AdGroups[0].SearchBid,\r\n IsSuggestedBidShowedOnUI: this.IsSuggestedBidShowedOnUI,\r\n AccountCurrencyCode: this.viewContext.accountCurrencyCode,\r\n };\r\n this.activityLogger.trace(logdata);\r\n }\r\n\r\n const originalCurrentCampaign = this.viewContext.currentCampaign;\r\n this.viewContext.currentCampaign = {\r\n CampaignType: originalCurrentCampaign.CampaignType,\r\n CampaignSubType: originalCurrentCampaign.CampaignSubType,\r\n CampaignSettings: originalCurrentCampaign.CampaignSettings,\r\n ...data,\r\n };\r\n\r\n if (this.permissions.IsPersonalizedOffersEnabled) {\r\n // the cashback settings in return data is missing\r\n // we need to add this back\r\n const cashbackSettings = _.chain(originalCurrentCampaign)\r\n .result('CampaignCashback')\r\n .value();\r\n this.viewContext.currentCampaign.CampaignCashback = cashbackSettings;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n })\r\n .catch((response) => {\r\n if (response && response.entity) {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n // TODO: handle error types\r\n this.errorsView.setErrors(this.i18nErrors.getBulkApiErrors(response.errors));\r\n\r\n this.activityLogger.trace(getBulkErrorsLogMessage(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience budget bid api error');\r\n });\r\n } else {\r\n // Unexpected case. Log Error.\r\n this.activityLogger.error(getBulkErrorsLogMessage(response.errors));\r\n }\r\n } else {\r\n // Ajax Error\r\n this.errorsView.setErrors(this.i18nErrors.getODataErrors(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience budget bid api error');\r\n });\r\n }\r\n\r\n return false;\r\n })\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n getEstimatePromise(data) {\r\n return this.odata.post('Customers()/Accounts()/Default.AudienceEstimationV2', {\r\n host: 'adinsight.odata.url',\r\n path: 'AdInsight/V2/',\r\n data: { request: data },\r\n customHeader: {\r\n name: 'x-ms-scenarioname',\r\n value: this.logScenario.value,\r\n },\r\n });\r\n }\r\n\r\n getCPCRecommendedBidPromise(targetsData) {\r\n if (_.get(this.viewContext, 'currentCampaign.CampaignType') === 'Audience'\r\n && _.get(this.viewContext, 'currentCampaign.CampaignSubType') === 'AudienceStatic') {\r\n const config = DependencyResolver.get('component/config/index');\r\n const recommendedValueFromContext = config.get(BiddingStrategyValueToRecommendBidKey.ManualCpc);\r\n const recommendedValue = _.isUndefined(recommendedValueFromContext) || _.isNull(recommendedValueFromContext) ? 3.3 : recommendedValueFromContext;\r\n return { SuggestedBid: recommendedValue };\r\n }\r\n return this.getEstimatePromise(targetsData);\r\n }\r\n\r\n updateKPIEstimateAsync(e) {\r\n // Empty data passed in updatePanel function to initialize kpi estimate table\r\n const estimateDataMock = {\r\n '@odata.context': 'http://int.adinsight-mt.trafficmanager.net:823/AdInsightMT/V2/oData/$metadata#Microsoft.Advertiser.AdInsight.MT.Interfaces.AIM.AudienceInsight.GetAudienceKPIEstimationV2Response',\r\n ClicksLostToBid: null,\r\n ClicksLostToBudget: null,\r\n Currency: null,\r\n ErrorCode: 'Success',\r\n ErrorMessage: null,\r\n EstAudienceSize: null,\r\n EstCPC: null,\r\n EstCTR: null,\r\n EstClick: null,\r\n EstCostPerEvent: null,\r\n EstImpression: null,\r\n EstSpend: null,\r\n EstView: null,\r\n EventsLostToBid: null,\r\n EventsLostToBudget: null,\r\n IsMinSuggestedBudget: false,\r\n RequestFulfilledByHost: 'CO01EAP00004131',\r\n SuggestedBid: null,\r\n SuggestedBudget: null,\r\n };\r\n this.showDefaultBidWarning = false;\r\n // if default bid is changed, set this.defaultBidUpdatedByUser = true.\r\n if (e && e.target && e.target.className && $(e.target).hasClass('Amount-value')) {\r\n this.defaultBidUpdatedByUser = true;\r\n }\r\n if (!this.budgetPanelView.validate() ||\r\n !this.defaultBidInput.getState().isValid ||\r\n !this.defaultBidModel.toJSON().Amount ||\r\n _.isNaN(this.defaultBidModel.toJSON().Amount)\r\n ) {\r\n this.updateDefaultBidWarning();\r\n this.updatePanel(estimateDataMock, true);\r\n return;\r\n }\r\n this.showDefaultBidWarning = this.pricingModel === 'CPV' && this.defaultBidModel.toJSON().Amount > DefaultBidCPVWarningThreshold;\r\n this.updateDefaultBidWarning();\r\n\r\n const subType = this.viewContext.currentCampaign &&\r\n this.viewContext.currentCampaign.CampaignSubType;\r\n const campaignSetting = _.first(_.get(this.viewContext.currentCampaign, 'CampaignSettings')) || {};\r\n const feedInfo = getFeedInfo(campaignSetting);\r\n const { UseOptimizedTargeting } = this.viewContext.currentAdGroup;\r\n // eslint-disable-next-line max-len\r\n const targetsData = this.estimateRequestFactory.create(this.pricingModelToBidTypeEnum[this.pricingModel], subType, feedInfo, UseOptimizedTargeting);\r\n targetsData.DailyBudget = this.budgetPanelView.getValues().Amount;\r\n targetsData.Bid = this.defaultBidModel.toJSON().Amount;\r\n\r\n // Create AudienceEstimation Promise\r\n if (_.isEmpty(targetsData)) {\r\n this.updatePanel(estimateDataMock, true);\r\n return;\r\n }\r\n\r\n const audienceEstimationUrl = 'Customers()/Accounts()/Default.AudienceKPIEstimationV2';\r\n\r\n this.odata.post(audienceEstimationUrl, {\r\n host: 'adinsight.odata.url',\r\n path: 'AdInsight/V2/',\r\n data: { request: targetsData },\r\n customHeader: {\r\n name: 'x-ms-scenarioname',\r\n value: this.logScenario.value,\r\n },\r\n }).then((estimateData) => {\r\n this.updatePanel(estimateData, estimateData && estimateData.ErrorCode === 'Success');\r\n }).catch((response) => {\r\n const hasErrors = response && !_.isUndefined(response.error);\r\n\r\n if (hasErrors) {\r\n this.updatePanel({ ErrorCode: JSON.stringify(response.error) }, false);\r\n } else {\r\n this.updatePanel({ ErrorCode: JSON.stringify(response) }, false);\r\n }\r\n }).finally(withUiBlock($('.kpiestimation-result'), this.i18n.getString('Loading')));\r\n }\r\n\r\n updatePanel(estimateData, reqStatus) {\r\n this.estimateData = estimateData || {};\r\n this.estimateData.reqStatus = reqStatus;\r\n\r\n ReactDOM.render(\r\n ,\r\n this.$('.kpiestimation-result')[0]\r\n );\r\n }\r\n\r\n /**\r\n * Triggers event 'saveAndExit', otherwise it displays an error.\r\n * @private\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save was succesful or not.\r\n * */\r\n saveAndExit() {\r\n if (!this.validate()) {\r\n this.activityLogger.signal('save and exit: false', 'crud audience budget bid');\r\n return false;\r\n }\r\n return this.updateCampaign(false).then((isSuccessful) => {\r\n if (!isSuccessful) {\r\n this.activityLogger.signal(`save and exit: ${isSuccessful}`, 'crud audience budget bid');\r\n return Promise.reject();\r\n }\r\n\r\n this.trigger('saveAndExit');\r\n\r\n this.activityLogger.signal('save and exit: true', 'crud audience budget bid');\r\n return true;\r\n });\r\n }\r\n\r\n /**\r\n * Save the Campaign setting updates.\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save was succesful or not.\r\n */\r\n save() {\r\n if (!this.validate()) {\r\n this.activityLogger.signal('clicked save: false', 'crud audience budget bid');\r\n return false;\r\n }\r\n\r\n return this.updateCampaign(false).then((isSuccessful) => {\r\n this.activityLogger.signal(`clicked save: ${isSuccessful}`, 'crud audience budget bid');\r\n\r\n if (isSuccessful) {\r\n this.trigger('saveAndExit');\r\n }\r\n });\r\n }\r\n\r\n onFrequencyCappingChange(data) {\r\n this.frequencyCapping = data.FrequencyCapSettings;\r\n this.renderFrequencyCapping();\r\n }\r\n\r\n renderFrequencyCapping() {\r\n if (this.isFCapEnabled) {\r\n ReactDOM.render(\r\n this.onFrequencyCappingChange(data)}\r\n />,\r\n this.$('.frequency-capping-container')[0]\r\n );\r\n } else {\r\n ReactDOM.unmountComponentAtNode(this.$('.frequency-capping-container')[0]);\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n if (this.options && this.options.perfMarker) {\r\n this.renderMarker = this.perfMarker.createChild('RenderBudgetBid');\r\n this.renderMarker.willInit();\r\n }\r\n\r\n // Update pricingModel based on context\r\n if (this.viewContext.currentAdGroup) {\r\n this.pricingModel = this.viewContext.currentAdGroup.PricingModel;\r\n }\r\n\r\n this.$el.html(template(this));\r\n\r\n ko.applyBindings(this.viewmodel, this.el);\r\n\r\n this.renderFrequencyCapping();\r\n\r\n // Delay initialize control as it needs data from other steps\r\n this.initDailyBudgetView();\r\n\r\n this.$('.budget').append(this.budgetPanelView.render().$el);\r\n this.$('.default-bid').append(this.defaultBidInput.render().$el);\r\n this.$('.adschedule-targets').append(this.adScheduleView.render().$el);\r\n this.$('.errors-container').append(this.errorsView.render().$el);\r\n if (this.IsAIMBidSuggestionEnabled) {\r\n this.$('.default-bid').change(this.updateKPIEstimateAsync.bind(this));\r\n this.$('.budget').change(this.updateKPIEstimateAsync.bind(this));\r\n }\r\n\r\n this.initTargetBidAdjustmentsAndRender();\r\n\r\n const { CampaignSubType } = this.viewContext.currentCampaign;\r\n\r\n this.isMSANeCPCAutoBiddingEnabled =\r\n getCampaignType(this.viewContext.currentCampaign) === 'audience' &&\r\n [\r\n CampaignSubTypes.AudienceStatic,\r\n CampaignSubTypes.AudienceFeedBased,\r\n CampaignSubTypes.AudienceDynamicFeedBased,\r\n ].includes(CampaignSubType);\r\n this.isAudienceCampaignAutoBiddingV2Enabled =\r\n this.permissions.IsAudienceCampaignAutoBiddingV2Enabled &&\r\n getCampaignType(this.viewContext.currentCampaign) === 'audience' &&\r\n [\r\n CampaignSubTypes.AudienceStatic,\r\n CampaignSubTypes.AudienceFeedBased,\r\n CampaignSubTypes.AudienceDynamicFeedBased,\r\n ].includes(CampaignSubType);\r\n\r\n if (this.isAudienceCampaignAutoBiddingV2Enabled) {\r\n this.biddingStrategyView = new BiddingStrategyView({\r\n biddingStrategyType: 'EnhancedCPC',\r\n isInitialize: true,\r\n isCreation: true,\r\n campaignType: 'audience',\r\n activityLogger: this.activityLogger,\r\n i18nNewDesign: this.options.newI18n,\r\n campaignLanguage: 'English',\r\n campaignSubType: CampaignSubType,\r\n });\r\n this.biddingStrategyView.viewModel.selectedBidStrategy.subscribe((strategy) => {\r\n if (strategy === 'EnhancedCpc') {\r\n strategy = 'EnhancedCPC';\r\n }\r\n this.onBidStrategyChanged({ key: strategy });\r\n });\r\n this.$('.bidding-strategy__container').empty().html(this.biddingStrategyView.render().$el);\r\n } else {\r\n this.initBidStrategy();\r\n }\r\n\r\n this.perfMarker.done();\r\n return this;\r\n }\r\n\r\n /**\r\n * Update bid input control based on the bid strategy user selects\r\n * as well as the suggested bid.\r\n * @param {object} item selected option item\r\n *\r\n * @return {undefined}\r\n */\r\n onBidStrategyChanged = (item) => {\r\n this.pricingModel = item.key;\r\n this.isFCapEnabled = this.pricingModel === 'ManualCpm';\r\n this.renderFrequencyCapping();\r\n this.initDefaultBidInput();\r\n if (this.IsAIMBidSuggestionEnabled && this.suggestedBidMapping[this.pricingModel]) {\r\n const localized = this.i18n.formatDecimal(this.suggestedBidMapping[this.pricingModel], {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n });\r\n this.defaultBidInput.setState({\r\n value: localized,\r\n });\r\n this.updateKPIEstimateAsync();\r\n }\r\n\r\n // Do not show the default bid on maxConversion\r\n if (this.isDefaultBidUsed()) {\r\n this.$('.bid__container').show();\r\n this.$('.default-bid').html(this.defaultBidInput.render().$el);\r\n } else {\r\n this.$('.bid__container').hide();\r\n }\r\n };\r\n\r\n /**\r\n * render Conversion Goal Selection View\r\n * @param {object} campaign campaign that is use to update goalSelection View\r\n * @returns {undefined}\r\n */\r\n renderConversionGoalSelection = (campaign) => {\r\n const isSPA = campaign.CampaignSubType === 'ShoppingSponsoredProductAd';\r\n // Cashback CPS Campaign:\r\n const isCPS = campaign.CampaignCashback != null &&\r\n (campaign.CampaignCashback.PersonalizedOffersEnabled === true\r\n || campaign.CampaignCashback.MonthlyBudget > 0);\r\n\r\n const isSelectorEnabled = !isSPA && !isCPS;\r\n if (isSelectorEnabled) {\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const state = DependencyResolver.get('component/state/index');\r\n this.goalSelectionView = new this.CampaignGoalSelectionView({\r\n i18n: this.i18n,\r\n pageSize: 10,\r\n isMultiMode: true,\r\n isHideSaveBar: true,\r\n campaign,\r\n jsdata,\r\n state,\r\n activityLogger: this.activityLogger,\r\n });\r\n this.$('.conversion-goal-selection').empty().html(this.goalSelectionView.render().el);\r\n } else {\r\n this.$('.conversion-goal-section').empty();\r\n }\r\n };\r\n\r\n getCampaignPromise = () => {\r\n const campaign = this.viewContext.currentCampaign;\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n\r\n const params = {\r\n queryParameters: {\r\n entitySet: campaign,\r\n expand: ['CampaignConversionGoal/Goals'],\r\n },\r\n bypassCache: true,\r\n };\r\n\r\n return jsdata.Campaign.find(Number(campaign.Id), params);\r\n };\r\n\r\n /**\r\n * WillShow is called when the view is shown.\r\n * To support navigating back and forth with the targeting change,\r\n * we reinitialize the target and bid adjustment.\r\n *\r\n * @return {undefined}\r\n */\r\n willShow() {\r\n // While it's ideal where willInit align with the contructor, it is created with the wizard.\r\n // The perf marker is to measure the user experience perf for the component.\r\n this.perfMarker.willRender();\r\n this.toggleTargetsCashbackPercentColumns();\r\n // refresh suggested bid for all possible bid strategies since user may update\r\n // targets.\r\n const subType = _.get(this.viewContext.currentCampaign, 'CampaignSubType');\r\n const campaignSetting = _.first(_.get(this.viewContext.currentCampaign, 'CampaignSettings')) || {};\r\n const feedInfo = getFeedInfo(campaignSetting);\r\n const { UseOptimizedTargeting } = this.viewContext.currentAdGroup;\r\n const targetsData =\r\n this.estimateRequestFactory.create(\r\n this.isEnabledDeprecateManualCpcForAudienceCampaign ? BidStrategy.EnhancedCpc :BidStrategy.ManualCpc,\r\n subType, feedInfo, UseOptimizedTargeting\r\n );\r\n const targetsCPVData =\r\n this.estimateRequestFactory.create(\r\n BidStrategy.ManualCpv,\r\n subType, feedInfo, UseOptimizedTargeting\r\n );\r\n const targetsCPMData =\r\n this.estimateRequestFactory.create(\r\n BidStrategy.ManualCpm,\r\n subType, feedInfo, UseOptimizedTargeting\r\n );\r\n // Use mock promise for video/non-video case to keep the read logic direct and clean.\r\n // video case doesn't need Cpc estimation and non-video case doesn't need Cpv.\r\n const mockEstimateData = { SuggestedBid: 0 };\r\n const promises = [\r\n this.getCampaignPromise(),\r\n this.isVideo ? Promise.resolve(mockEstimateData) : this.getCPCRecommendedBidPromise(targetsData),\r\n this.isVideo ? this.getEstimatePromise(targetsCPVData) : Promise.resolve(mockEstimateData),\r\n this.getEstimatePromise(targetsCPMData),\r\n ];\r\n\r\n Promise\r\n .all(promises)\r\n .then(([campaign, cpcEstimateData, cpvEstimateData, cpmEstimateData]) => {\r\n // duplicate suggested bid mapping as there are currently 2 separate controls\r\n this.suggestedBidMapping.CPC = cpcEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.ManualCpc = cpcEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.CPV = cpvEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.CPM = cpmEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.ManualCpm = cpmEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.EnhancedCPC = cpcEstimateData.SuggestedBid;\r\n this.suggestedBidMapping.EnhancedCpc = cpcEstimateData.SuggestedBid;\r\n\r\n // save the snapshot to make the diff later.\r\n this.originalSnapshot = this.currentLevelTargetInfo.getSnapshot();\r\n if (this.viewContext.currentCampaign && this.viewContext.currentCampaign.Budget) {\r\n this.budgetPanelView.update({ Amount: this.viewContext.currentCampaign.Budget.Amount });\r\n }\r\n if (this.IsAIMBidSuggestionEnabled && this.suggestedBidMapping[this.pricingModel]) {\r\n if (this.defaultBidUpdatedByUser === false) {\r\n const localized = this.i18n.formatDecimal(this.suggestedBidMapping[this.pricingModel], {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n });\r\n this.defaultBidInput.setState({\r\n value: localized,\r\n });\r\n this.IsSuggestedBidShowedOnUI = true;\r\n } else {\r\n this.IsSuggestedBidShowedOnUI = false;\r\n }\r\n this.updateKPIEstimateAsync();\r\n } else if (this.IsAIMBidSuggestionEnabled && !this.suggestedBidMapping[this.pricingModel]) {\r\n if (this.defaultBidUpdatedByUser === false) {\r\n this.defaultBidInput.setState({\r\n value: '',\r\n });\r\n this.IsSuggestedBidShowedOnUI = true;\r\n }\r\n this.updateKPIEstimateAsync();\r\n }\r\n this.renderConversionGoalSelection(campaign);\r\n }).finally(withUiBlock($('.crud-audience-budget-bid'), this.i18n.getString('Loading')));\r\n if (this.options && this.options.perfMarker && this.renderMarker) {\r\n this.renderMarker.done();\r\n }\r\n }\r\n\r\n toggleTargetsCashbackPercentColumns() {\r\n if (this.permissions.IsPersonalizedOffersEnabled) {\r\n const { currentCampaign } = this.viewContext;\r\n const supportCashbackSettings = shouldSupportCashbackSettings(\r\n currentCampaign,\r\n this.permissions\r\n );\r\n this.supportCashbackSettings = supportCashbackSettings;\r\n\r\n const cashbackPercent = _.chain(currentCampaign)\r\n .result('CampaignCashback')\r\n .result('Percent', null)\r\n .value();\r\n\r\n _.forEach(this.targetBidAdjustment, (criterionEditor) => {\r\n if (criterionEditor.resetSupportCashbackSettings) {\r\n criterionEditor.resetSupportCashbackSettings(supportCashbackSettings, {\r\n level: 'Campaign',\r\n value: cashbackPercent,\r\n });\r\n }\r\n this.adScheduleView.toggleCashbackPercentColumns(supportCashbackSettings, {\r\n level: 'Campaign',\r\n value: cashbackPercent,\r\n });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Checks if wizard can go to the next step\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save was succesful or not.\r\n */\r\n wizardShouldGoNext() {\r\n if (!this.validate()) {\r\n this.activityLogger.signal('clicked next: false', 'crud audience budget bid');\r\n return false;\r\n }\r\n\r\n return this.updateCampaign(false).then((isSuccessful) => {\r\n if (!isSuccessful) {\r\n this.activityLogger.signal(`clicked next: ${isSuccessful}`, 'crud audience budget bid');\r\n return Promise.reject();\r\n }\r\n\r\n this.activityLogger.signal('clicked next: true', 'crud audience budget bid');\r\n return isSuccessful;\r\n });\r\n }\r\n\r\n /**\r\n * wizardShouldGoBack is called when the step goes backi\r\n * To support navigating back and persist, we save.\r\n *\r\n * @return {Promise} - Promise of saving.\r\n */\r\n wizardShouldGoBack() {\r\n if (!this.validate()) {\r\n this.activityLogger.signal('clicked back: false', 'crud audience budget bid');\r\n return Promise.resolve(false);\r\n }\r\n\r\n return this.updateCampaign(true).then((isSuccess) => {\r\n this.activityLogger.signal(`clicked back: ${isSuccess}`, 'crud audience budget bid');\r\n\r\n return isSuccess;\r\n });\r\n }\r\n\r\n initBidStrategy() {\r\n if (this.isVideo || this.isCpmEnabled) {\r\n const { CampaignSubType } = this.viewContext.currentCampaign;\r\n const shouldDeprecateManualCpc = this.isEnabledDeprecateManualCpcForAudienceCampaign &&\r\n getCampaignType(this.viewContext.currentCampaign) === 'audience' &&\r\n [\r\n CampaignSubTypes.AudienceStatic,\r\n CampaignSubTypes.AudienceFeedBased,\r\n CampaignSubTypes.AudienceDynamicFeedBased,\r\n ].includes(CampaignSubType);\r\n let keys = this.pricingModels.slice();\r\n const isHideCpmForFeedbasedEnabled = this.isFeedBased\r\n && this.isHideCpmForFeedbasedCampaginEnabled;\r\n const pricingModelControls = {\r\n CPC: {\r\n disabled: (this.isVideo && !this.isManualCpcForVideoAdsEnabled) || shouldDeprecateManualCpc,\r\n },\r\n CPV: {\r\n disabled: !this.isVideo,\r\n },\r\n CPM: {\r\n disabled: !this.isCpmEnabled || isHideCpmForFeedbasedEnabled,\r\n },\r\n };\r\n this.pricingModels.forEach((pModel) => {\r\n if (pricingModelControls[pModel].disabled) {\r\n keys = keys.filter(key => key !== pModel);\r\n }\r\n });\r\n\r\n if (this.isMSANeCPCAutoBiddingEnabled) {\r\n keys.unshift('EnhancedCPC');\r\n this.pricingModel = 'EnhancedCPC';\r\n }\r\n\r\n // refresh bid model with latest bid strategy\r\n // make sure price model don't change after render bid input\r\n this.onBidStrategyChanged({ key: this.pricingModel });\r\n\r\n ReactDOM.render(\r\n ,\r\n this.$('.bid-strategy')[0]\r\n );\r\n }\r\n }\r\n\r\n updateDefaultBidWarning() {\r\n const defaultBidWarningSelector = '.default-bid-warning';\r\n if (this.showDefaultBidWarning) {\r\n if (!this.isDefaultBidCPVWarningRendered) {\r\n ReactDOM.render(\r\n ,\r\n this.$(defaultBidWarningSelector)[0]\r\n );\r\n this.isDefaultBidCPVWarningRendered = true;\r\n }\r\n this.$(defaultBidWarningSelector).show();\r\n } else {\r\n this.$(defaultBidWarningSelector).hide();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize Target Bid Adjustments view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initTargetBidAdjustmentsAndRender() {\r\n const criterions = cloneDeep(this.currentLevelTargetInfo.getAll());\r\n\r\n // Normalize location type criterions\r\n const criterionTypesGrouped = _.groupBy(criterions, (criterion) => {\r\n if (criterion.Criterion.Type === 'Radius' ||\r\n criterion.Criterion.Type === 'NegativeLocation') {\r\n return 'Location';\r\n }\r\n\r\n return criterion.Criterion.Type;\r\n });\r\n\r\n this.$('.bid-adjustment-targets-container').empty();\r\n\r\n const criterionSettingOptions = {\r\n currentLevelTargetInfo: this.currentLevelTargetInfo,\r\n showTargetSelection: false,\r\n showBidAdjustment: true,\r\n showTargetOrBid: false,\r\n activityLogger: this.activityLogger,\r\n };\r\n\r\n // Initialize and Render CriterionSetting control for each criterion type.\r\n _.each(criterionTypesGrouped, (criterionTypeGroup) => {\r\n let criterionType = _.take(criterionTypeGroup).Criterion.Type;\r\n\r\n if (criterionType === 'Radius' || criterionType === 'NegativeLocation') {\r\n criterionType = 'Location';\r\n }\r\n\r\n if (criterionType === 'ContextualTarget') {\r\n return;\r\n }\r\n\r\n switch (criterionType) {\r\n case 'CompanyName':\r\n this.targetBidAdjustment[criterionType] =\r\n new CompanyNameCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'JobFunction':\r\n this.targetBidAdjustment[criterionType] =\r\n new JobFunctionCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Industry':\r\n this.targetBidAdjustment[criterionType] =\r\n new IndustryCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Age':\r\n this.targetBidAdjustment[criterionType] =\r\n new AgeCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Gender':\r\n this.targetBidAdjustment[criterionType] =\r\n new GenderCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Device':\r\n this.targetBidAdjustment[criterionType] =\r\n new DeviceCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Audience':\r\n this.targetBidAdjustment[criterionType] =\r\n new AudienceCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n case 'Location':\r\n this.targetBidAdjustment[criterionType] =\r\n new LocationCriterionSetting(criterionSettingOptions);\r\n break;\r\n\r\n default:\r\n throw new Error('unsupported type');\r\n }\r\n\r\n this.$('.bid-adjustment-targets-container').append(this.targetBidAdjustment[criterionType].render().$el);\r\n }, this);\r\n }\r\n\r\n /**\r\n * Initialize Daily Budget view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initDailyBudgetView() {\r\n const BudgetPanelView = DependencyResolver.get('campaignui/feature/budget/view/budget-panel');\r\n\r\n this.budgetPanelView = new BudgetPanelView({\r\n model: this.viewContext.currentCampaign.Budget,\r\n activityLogger: this.activityLogger,\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Default Bid input\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initDefaultBidInput() {\r\n let currentPricingModel = this.pricingModel;\r\n // share same bid range with CPC\r\n if (this.pricingModel === 'EnhancedCPC') {\r\n currentPricingModel = 'CPC';\r\n }\r\n\r\n const DefaultBidModel = backboneSchema(getBidSchema({\r\n bidCeil: _.result(this.config.get(PricingModelToRangeKey[currentPricingModel]), 'CeilingValue'),\r\n bidFloor: _.result(this.config.get(PricingModelToRangeKey[currentPricingModel]), 'FloorValue'),\r\n }), this.i18n, ['Amount']);\r\n\r\n this.defaultBidModel = new DefaultBidModel();\r\n this.defaultBidInput = new InputControl({\r\n entity: this.defaultBidModel,\r\n field: 'Amount',\r\n addonText: this.viewContext.accountCurrencyCode,\r\n ariaLabelledby: 'defaultBidLabel',\r\n });\r\n this.defaultBidInput.on('input-changed', () => {\r\n this.activityLogger.signal('default bid change', 'crud audience budget bid');\r\n });\r\n }\r\n\r\n /**\r\n * Initialize Ad Schedule view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initAdScheduleView() {\r\n const AdScheduleView = DependencyResolver.get('campaignui/feature/ad-schedule/view/index');\r\n\r\n this.adScheduleView = new AdScheduleView({\r\n model: {},\r\n level: 'campaign',\r\n showDateSettings: 'true',\r\n activityLogger: this.activityLogger,\r\n });\r\n }\r\n\r\n /**\r\n * Get Ad Schedule info\r\n *\r\n * @private\r\n * @returns {object} scheduling info\r\n */\r\n getScheduleInfo() {\r\n const deletedDayTimeCb = (deletedDayTimeCriterions) => {\r\n _.each(deletedDayTimeCriterions, (criterion) => {\r\n criterion.Status = 'Deleted';\r\n criterion.Campaign = {\r\n Id: this.campaignId,\r\n };\r\n });\r\n };\r\n const scheduling = this.adScheduleView.getValues(deletedDayTimeCb);\r\n\r\n return scheduling;\r\n }\r\n\r\n /**\r\n * Populate Campaign Criterion\r\n *\r\n * @private\r\n * @param {object} criterions criterions to populate\r\n * @returns {undefined}\r\n */\r\n populateCriterionCampaignIds(criterions) {\r\n _.each(criterions, (criterion) => {\r\n criterion.Status = _.isEmpty(criterion.Status) ? 'Active' : criterion.Status;\r\n criterion.Campaign = {\r\n Id: this.campaignId,\r\n };\r\n }, this);\r\n }\r\n\r\n /**\r\n * Populate AdGroup Criterion\r\n *\r\n * @private\r\n * @param {object} criterions - criterions to populate\r\n * @returns {object} - filtered criterions with AdGroupId\r\n */\r\n populateCriterionWithAdGroupIds(criterions) {\r\n _.each(criterions, (criterion) => {\r\n criterion.AdGroup = {\r\n Id: this.adGroupId,\r\n };\r\n }, this);\r\n\r\n return criterions;\r\n }\r\n\r\n remove() {\r\n _.each(this.targetBidAdjustment, (view) => {\r\n view.remove();\r\n });\r\n if (this.budgetPanelView) {\r\n this.budgetPanelView.remove();\r\n }\r\n if (this.goalSelectionView) {\r\n this.goalSelectionView.remove();\r\n }\r\n this.defaultBidInput.remove();\r\n this.adScheduleView.remove();\r\n this.errorsView.remove();\r\n super.remove();\r\n }\r\n}\r\n","/* eslint-disable */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mapObject, constant } from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { HelpLink } from '@bingads-webui-react/help-link';\r\nimport { getAlertStyle } from './alert-react-style';\r\n\r\nconst Alert = (props) => {\r\n const [visible, setVisible] = React.useState(true);\r\n const { i18n, alertKey, learnMoreId } = props;\r\n\r\n return (\r\n visible &&\r\n
\r\n
\r\n
\r\n \r\n {`${i18n.getString(alertKey)} `}\r\n \r\n {i18n.getString('LearnMoreLinkText')}\r\n \r\n \r\n { setVisible(false); }}\r\n />\r\n
\r\n
);\r\n};\r\n\r\nAlert.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n percentToFixedFormatter: PropTypes.func.isRequired,\r\n decimalFormatter: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape(mapObject(\r\n getAlertStyle(),\r\n constant(PropTypes.string.isRequired)\r\n )).isRequired,\r\n alertKey: PropTypes.string.isRequired,\r\n learnMoreId: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const AlertReact = withDefaultStyles(Alert, getAlertStyle);\r\n","export const getAlertStyle = () => ({\r\n root: {\r\n marginTop: 20,\r\n marginBottom: 12,\r\n '& .alert-image': {\r\n marginTop: 3,\r\n },\r\n '& .alert-info-inline': {\r\n width: '100%',\r\n '& a': {\r\n marginTop: 2,\r\n textDecoration: 'none',\r\n },\r\n '& a:hover': {\r\n textDecoration: 'none',\r\n },\r\n '& .glyphicon': {\r\n float: 'right',\r\n top: 4,\r\n color: '#605E5C',\r\n fontSize: 16,\r\n },\r\n },\r\n\r\n },\r\n});\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport {\r\n AudienceCampaignErrorsView,\r\n AudienceStepBase,\r\n getBulkErrorsLogMessage,\r\n ImpressionTrackingUrlOptions,\r\n generateNameSuggestionSuffix,\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { InputControl } from '@bingads-webui/input-control';\r\nimport { RemainingCharsHint } from '@bingads-webui/remaining-chars-hint';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport template from './template.pug';\r\nimport { AlertReact } from './alert-react';\r\n\r\nconst ImpressionTrackingUrlsMaxCount = 2;\r\n/**\r\n * saveAndExit event.\r\n *\r\n * @event CrudAudienceCampaign#saveAndExit\r\n * @type {Object}\r\n */\r\n\r\n/**\r\n * CrudAudienceCampaign class that extends {AudienceStepBase} class\r\n * The class defines the section of the setting Campaign\r\n *\r\n * @fires CrudAudienceCampaign#saveAndExit\r\n * @class CrudAudienceCampaign\r\n * @extends {AudienceStepBase}\r\n */\r\nexport class CrudAudienceCampaign extends AudienceStepBase {\r\n /**\r\n * Initializes the {CrudAudienceCampaign} class.\r\n *\r\n * @param {Object} options - options for initializing the class.\r\n * @param {Object} options.viewContext - viewContext for the View.\r\n * @param {Object} options.perfMarker - perfMarker\r\n * @returns {undefined}\r\n */\r\n initialize(options) {\r\n if (options && options.perfMarker) {\r\n options.perfMarker.willInit();\r\n }\r\n this.renderMarker;\r\n this.perfMarker = options.perfMarker;\r\n this.isAdImpressions = options.isAdImpressions;\r\n this.options = options;\r\n this.viewContext = options.viewContext;\r\n this.wizardElement = options.wizardElement;\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.isNextButtonEnabled = (\r\n !(this.viewContext.isReadOnlyUser || this.viewContext.CurrentAccountInActive)\r\n );\r\n\r\n const schema = DependencyResolver.get('$/schema!campaign/Campaign');\r\n const SchemaModel = backboneSchema(\r\n schema,\r\n this.i18n,\r\n ['Name']\r\n );\r\n\r\n this.model = new SchemaModel();\r\n this.logScenario = options.logScenario;\r\n this.activityLogger = this.logScenario.createCampaignSettings.create();\r\n this.isVideo = options.isVideo;\r\n this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel =\r\n options.isEnabledForVerifiedImpressionTrackingAtCampaignLevel && this.isVideo;\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n this.permissions = config.get('Permissions');\r\n\r\n this.isCopyCampaignSettingsAudienceCampaignEnabled = _.result(this.permissions, 'IsCopyCampaignSettingsAudienceCampaignEnabled', false);\r\n this.isEnabledDeprecateManualCpcForAudienceCampaign = _.result(this.permissions, 'IsEnabledDeprecateManualCpcForAudienceCampaign', false);\r\n\r\n if (this.isCopyCampaignSettingsAudienceCampaignEnabled) {\r\n const CopyCampaignSettings = DependencyResolver.get('crud-campaign/view/copy-campaign-settings');\r\n this.copySettings = new CopyCampaignSettings({\r\n scenario: 'copy-audience-campaign-settings',\r\n activityLogger: this.activityLogger,\r\n });\r\n this.copySettings.on('copy.campaign', this.copyFromCampaign.bind(this));\r\n }\r\n\r\n this.initControls();\r\n }\r\n\r\n /**\r\n * Get the title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get title() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Campaign_Title'),\r\n };\r\n }\r\n\r\n /**\r\n * Get the page title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get pageTitle() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Campaign_PageTitle'),\r\n };\r\n }\r\n\r\n /**\r\n * Get the actions of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns array that has information about the actions.\r\n */\r\n get actions() {\r\n const actions = [\r\n {\r\n name: 'next',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Next'),\r\n enabled: this.isNextButtonEnabled,\r\n },\r\n ];\r\n\r\n if (this.viewContext.currentCampaign) {\r\n actions.push({\r\n name: 'done',\r\n enabled: this.isNextButtonEnabled,\r\n htmlAttributes: {\r\n class: 'btn btn-primary btn-exitWithSave',\r\n },\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Exit'),\r\n });\r\n } else {\r\n actions.push({\r\n name: 'cancel',\r\n displayText: this.i18n.getString('Audience_Campaign_Cancel_Label'),\r\n });\r\n }\r\n\r\n return actions;\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n // View can be inherited, this only needs to use perfMarker of its own.\r\n if (this.options && this.options.perfMarker) {\r\n this.renderMarker =\r\n this.perfMarker.createChild('RenderCampaignCrud');\r\n\r\n this.renderMarker.willInit();\r\n }\r\n if (this.perfMarker.name === 'CampaignCrud') {\r\n this.perfMarker.willRender();\r\n }\r\n\r\n this.$el.html(template(this));\r\n\r\n if (this.isVideo) {\r\n this.updateVideoAlert();\r\n }\r\n if (this.isAdImpressions) {\r\n this.updateAdImpressionAlert();\r\n }\r\n this.$('.name-input-control-container').append(this.nameInput.render().$el);\r\n this.$('.remaining-chars-hint-container').append(this.nameInputRemainingCharsHint.render().$el);\r\n this.$('.errors-container').append(this.errorsView.render().$el);\r\n\r\n if (this.isCopyCampaignSettingsAudienceCampaignEnabled) {\r\n this.$('.copy-campaign-settings-container').append(this.copySettings.render().$el);\r\n }\r\n\r\n if (this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel) {\r\n this.$('.impression-tracking-url-options-container').append(this.impressionTrackingUrlOptions.render().$el);\r\n }\r\n\r\n if (this.budget) {\r\n this.$('.budget').empty().append(this.budget.$el);\r\n this.budget.render();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n updateVideoAlert() {\r\n ReactDOM.render(\r\n ,\r\n this.$('.video-alert')[0]\r\n );\r\n }\r\n\r\n updateAdImpressionAlert() {\r\n ReactDOM.render(\r\n ,\r\n this.$('.adimpression-alert')[0]\r\n );\r\n }\r\n\r\n /**\r\n * WillShow is called when the view is shown.\r\n * To support navigating back\r\n * we reinitialize the budget.\r\n *\r\n * @return {undefined}\r\n */\r\n willShow() {\r\n if (this.viewContext.currentCampaign\r\n && this.viewContext.currentCampaign.Budget\r\n && this.budget\r\n && this.budget.viewModel.isIndividualBudgetSelected()) {\r\n this.budget.budgetView.update({ Amount: this.viewContext.currentCampaign.Budget.Amount });\r\n }\r\n if (this.perfMarker.name === 'CampaignCrud') {\r\n this.perfMarker.done();\r\n // As we show the first section of the wizard, we consider the whole wizard done rendered.\r\n if (this.perfMarker.parentMarker) {\r\n this.perfMarker.parentMarker.done();\r\n }\r\n if (this.options && this.options.perfMarker && this.renderMarker) {\r\n this.renderMarker.done();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * It attempts to save and return true if the save is done succefully.\r\n *\r\n * @returns {boolean} - returns true if it is ready to go to the next step.\r\n */\r\n wizardShouldGoNext() {\r\n return this.save().then((isSuccessful) => {\r\n this.activityLogger.signal(`clicked next: ${isSuccessful}`, 'crud audience campaign');\r\n return isSuccessful;\r\n });\r\n }\r\n\r\n /**\r\n * Get the data that is used for the parameter for saving.\r\n *\r\n * @returns {Object} - object representing the data for the campaign to be saved.\r\n */\r\n getData() {\r\n const timeZoneMapper = DependencyResolver.get('component/timezonemapper/index');\r\n\r\n const params = this.model.toJSON();\r\n\r\n // TODO: (youngim) somehow model.set does not work with extra properties\r\n // ['Name', 'TimeZone', 'CampaignType', 'LanguageCode']);\r\n // This should be set with the model.\r\n params.TimeZone = timeZoneMapper.getAccountTimeZone();\r\n params.CampaignType = 'Audience';\r\n params.Languages = ['All'];\r\n params.CampaignSubType = this.isVideo ? 'AudienceVideoAds' : undefined;\r\n\r\n if (this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel && this.IASTrackingInfo) {\r\n // eslint-disable-next-line max-len\r\n params.VerifiedTrackingData = this.IASTrackingInfo;\r\n }\r\n\r\n if (this.budget) {\r\n params.Budget = this.budget.getValues(params);\r\n }\r\n\r\n if (!this.viewContext.currentCampaign) {\r\n params.AdScheduleUseSearcherTimeZone = false;\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Save the campaign with the given setting.\r\n *\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save process is succesful or not.\r\n */\r\n save() {\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const params = this.getData();\r\n\r\n let createOrUpdateTask;\r\n\r\n if (this.viewContext.currentCampaign) {\r\n params.Id = this.viewContext.currentCampaign.Id;\r\n createOrUpdateTask =\r\n jsdata.Campaign.update(params.Id, params, { adapter: 'bulk', cacheResponse: false });\r\n } else {\r\n if (this.isAdImpressions) {\r\n params.BiddingScheme = {\r\n Type: 'ManualCpm',\r\n };\r\n } else if (!this.isVideo && this.isEnabledDeprecateManualCpcForAudienceCampaign) {\r\n // when isEnabledDeprecateManualCpcForAudienceCampaign is enabled, we create the campaign with BiddingScheme eCpc\r\n // because we want to deprecate mCpc for audience campaign\r\n // the default BiddingScheme will be eCpc for audience campaign except for video/brandawareness audience campaigns\r\n // if UI pass mCpc to MT, MT will convert it into eCpc\r\n params.BiddingScheme = {\r\n Type: 'EnhancedCpc',\r\n };\r\n }\r\n createOrUpdateTask =\r\n jsdata.Campaign.create(params, { adapter: 'bulk', cacheResponse: false });\r\n }\r\n\r\n this.errorsView.removeErrors();\r\n\r\n return createOrUpdateTask.then((data) => {\r\n if (_.isFinite(data.Id)) {\r\n this.activityLogger.signal(`is simplify piloting account: ${this.permissions.IsNewStaticAudienceCampaignCreationEnabled} campaign Id: ${data.Id}, campaign Type: ${data.CampaignType}, campaign SubType: ${data.CampaignSubType}`, 'default campaign creation');\r\n // Market team ask ui to trigger an event when customer create a new audience ads campaign\r\n $(document).trigger('analytic_campaign_created', data);\r\n // for audience campaign, we need to get the bidding scheme information\r\n if (data.CampaignType === 'Audience') {\r\n return jsdata.Campaign.find(data.Id, {\r\n queryParameters: {\r\n query: {\r\n // Must select Id for jsdata cache\r\n $select: 'Id, BiddingScheme, CampaignType, CampaignSubType, CampaignSettings',\r\n },\r\n },\r\n bypassCache: false,\r\n cacheResponse: true,\r\n }).then((rawResponse) => {\r\n const campaign = {\r\n ...data,\r\n ...rawResponse,\r\n };\r\n this.viewContext.currentCampaign = campaign;\r\n return true;\r\n });\r\n }\r\n this.viewContext.currentCampaign = data;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }).catch((response) => {\r\n if (response && response.entity) {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n const campaignErrors = _.partition(\r\n response.errors,\r\n error => error.Type === 'Campaign Error'\r\n )[0];\r\n\r\n if (campaignErrors.length) {\r\n this.errorsView.setErrors(this.i18nErrors.getBulkApiErrors(campaignErrors));\r\n\r\n this.activityLogger.trace(getBulkErrorsLogMessage(campaignErrors));\r\n\r\n _.each(campaignErrors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience campaign creation api error');\r\n });\r\n }\r\n } else {\r\n // Unexpected case. Log Error.\r\n this.activityLogger.error(JSON.stringify(response));\r\n }\r\n } else {\r\n // Ajax errors\r\n this.errorsView.setErrors(this.i18nErrors.getODataErrors(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience campaign creation api error');\r\n });\r\n }\r\n\r\n return false;\r\n }).finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n /**\r\n * Save the campaign and then exit the wizard.\r\n *\r\n * @fires CrudAudienceCampaign#saveAndExit\r\n * @returns {Promise} - returns promise of returning boolean value indicating\r\n * if the save process is succesful or not.\r\n */\r\n saveAndExit() {\r\n return this.save().then((isSuccessful) => {\r\n this.activityLogger.signal(`save and exit: ${isSuccessful}`, 'crud audience campaign');\r\n if (isSuccessful) {\r\n this.trigger('saveAndExit');\r\n }\r\n });\r\n }\r\n\r\n validate() {\r\n if (!this.nameInput.getState().isValid) {\r\n this.nameInput.setState({ showError: true });\r\n\r\n return false;\r\n }\r\n\r\n if (this.impressionTrackingUrlOptions && this.IASTrackingInfo === 'error') {\r\n this.impressionTrackingUrlOptions.setErrors([this.i18n.getString('IASImpressionTracking_Invalid')], 'VerifiedImpressionTracking_IAS');\r\n return false;\r\n }\r\n\r\n return this.budget.validate();\r\n }\r\n\r\n // private function\r\n // it initailizes the name input view, errors view and budget view\r\n initControls() {\r\n this.nameInput = new InputControl({\r\n entity: this.model,\r\n field: 'Name',\r\n required: true,\r\n ariaLabelledby: 'campaignNameLabel',\r\n });\r\n\r\n this.nameInput.on('input-changed', () => {\r\n this.activityLogger.signal('campaign name change', 'crud audience campaign');\r\n });\r\n\r\n const isAudienceCampaignCollapseTargetSelectionEnabled =\r\n _.result(this.permissions, 'IsAudienceCampaignCollapseTargetSelectionEnabled', false);\r\n\r\n if (isAudienceCampaignCollapseTargetSelectionEnabled && _.isEmpty(this.model.get('Name'))) {\r\n this.nameInput.setState({ value: generateNameSuggestionSuffix('Campaign') });\r\n }\r\n\r\n this.nameInputRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'Name',\r\n });\r\n\r\n if (this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel) {\r\n this.impressionTrackingUrlOptions = new ImpressionTrackingUrlOptions({\r\n i18n: this.i18n,\r\n initialIASImpressionTrackingUrlValue: '',\r\n maxImpressionTrackingUrlsCount: ImpressionTrackingUrlsMaxCount,\r\n isImpressionTrackingUrlSectionVisible: false,\r\n isIASSectionVisible: true,\r\n isEnabledForVerifiedImpressionTrackingAtCampaignLevel:\r\n this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel,\r\n });\r\n\r\n this.impressionTrackingUrlOptions.on('IASInputChange', (value) => {\r\n if ((_.isString(value) && value.length === 0)) {\r\n // update scenario\r\n if (this.viewContext.currentCampaign &&\r\n this.viewContext.currentCampaign.VerifiedTrackingData) {\r\n this.IASTrackingInfo = 'delete_value';\r\n } else {\r\n // create scenario\r\n this.IASTrackingInfo = undefined;\r\n }\r\n } else {\r\n this.IASTrackingInfo = value;\r\n }\r\n });\r\n }\r\n\r\n this.errorsView = new AudienceCampaignErrorsView();\r\n\r\n this.initBudgetView();\r\n }\r\n\r\n // private function\r\n // it initailizes the instance of the budget view.\r\n initBudgetView() {\r\n const SharedBudgetView = DependencyResolver.get('campaignui/feature/shared-budget/view/shared-budget-switch-editor');\r\n const Budget = DependencyResolver.get('campaignui/feature/budget/view/budget');\r\n\r\n const budgetFactory = SharedBudgetView.newFactory(Budget);\r\n\r\n this.budget = budgetFactory({\r\n model: _.isObject(this.model) ? this.model.budget : {},\r\n accountCurrencyCode: this.viewContext.accountCurrencyCode,\r\n activityLogger: this.activityLogger,\r\n });\r\n }\r\n\r\n copyFromCampaign(source) {\r\n const campaign = _.first(source);\r\n this.activityLogger.signal(`Copy setting from campaign: ${campaign.Name} ${campaign.Id}`, 'Audience Copy Campaign Setting');\r\n\r\n // copy budget setting\r\n const budget = _.result(campaign, 'Budget');\r\n if (_.isObject(budget) && this.budget &&\r\n (budget.Type === 'DailyStandard' || budget.Type === 'DailyAccelerated' || budget.Id > 0)\r\n ) {\r\n this.budget.update(budget);\r\n }\r\n\r\n // video audience campaign\r\n if (_.result(this.options, 'isVideo')) {\r\n // copy video impression tracking url\r\n if (this.isEnabledForVerifiedImpressionTrackingAtCampaignLevel) {\r\n const IASImpressionTrackingUrlValue = _.chain(campaign).result('CampaignSettings').first().result('VerifiedTrackingSettings')\r\n .first()\r\n .result('VerifiedTrackingData')\r\n .first()\r\n .result('Data')\r\n .result('Values')\r\n .value();\r\n\r\n if (_.isArray(IASImpressionTrackingUrlValue) && !_.isEmpty(IASImpressionTrackingUrlValue)) {\r\n this.impressionTrackingUrlOptions\r\n .setIASImpressionTrackingUrlValue(IASImpressionTrackingUrlValue);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { isPersonalizedOfferAvailable, logCampaignPersonalizedOffers } from '@bingads-webui-campaign/personalized-offer-shared';\r\nimport { CashbackSettings } from '@bingads-webui-campaign/cashback-settings';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { getBulkErrorsLogMessage, getProductData, CampaignSubTypes } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport { CrudAudienceCampaign } from './view';\r\n\r\n/**\r\n * CrudAudienceShoppingCampaign class that extends {CrudAudienceCampaign} class\r\n * The class defines the section of the setting Campaign\r\n *\r\n * @class CrudAudienceShoppingCampaign\r\n * @extends {CrudAudienceCampaign}\r\n */\r\nexport class CrudAudienceShoppingCampaign extends CrudAudienceCampaign {\r\n /**\r\n * Initializes the {CrudAudienceShoppingCampaign} class.\r\n *\r\n * @param {Object} options - options for initializing the class.\r\n * @param {Object} options.viewContext = viewContext for the View.\r\n * @returns {undefined}\r\n */\r\n initialize(options) {\r\n if (options && options.perfMarker) {\r\n options.perfMarker.willInit();\r\n }\r\n this.renderMarker;\r\n this.viewContext = options.viewContext;\r\n this.wizardElement = options.wizardElement;\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.productData = options.data;\r\n this.feedData = options.feedData;\r\n this.isNextButtonEnabled = (\r\n !(this.viewContext.isReadOnlyUser || this.viewContext.CurrentAccountInActive)\r\n );\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n this.permissions = config.get('Permissions') || {};\r\n this.isEnabledDynamicFeedCampaign = this.permissions.IsEnabledForDynamicFeedCampaign;\r\n this.isEnhancedPAFilterP2Enabled = Boolean(_.result(config.get('Permissions'), 'IsEnhancedPAFilterP2Enabled'));\r\n\r\n const schema = DependencyResolver.get('$/schema!dynamicdb/ShoppingCampaign');\r\n const SchemaModel = backboneSchema(\r\n schema,\r\n this.i18n,\r\n ['Name', 'CampaignType', 'TimeZone', 'Languages', 'ProviderId']\r\n );\r\n\r\n this.model = new SchemaModel();\r\n this.logScenario = options.logScenario;\r\n this.activityLogger = this.logScenario.createCampaignSettings.create();\r\n this.perfMarker = options.perfMarker;\r\n\r\n super.initControls();\r\n this.initShoppingSettingsView();\r\n\r\n this.shouldShowCashbackSettings = options.isForVNext && isPersonalizedOfferAvailable(\r\n this.permissions,\r\n options.audienceCampaignType,\r\n options.audienceCampaignSubType\r\n );\r\n this.options = options;\r\n\r\n this.isCopyCampaignSettingsAudienceCampaignEnabled = _.result(this.permissions, 'IsCopyCampaignSettingsAudienceCampaignEnabled', false);\r\n if (this.isCopyCampaignSettingsAudienceCampaignEnabled) {\r\n const CopyCampaignSettings = DependencyResolver.get('crud-campaign/view/copy-campaign-settings');\r\n this.copySettings = new CopyCampaignSettings({\r\n scenario: 'copy-audience-campaign-settings',\r\n activityLogger: this.activityLogger,\r\n });\r\n this.copySettings.on('copy.campaign', this.copyFromCampaign.bind(this));\r\n }\r\n\r\n this.initCashbackSettingsView();\r\n }\r\n\r\n initCashbackSettingsView() {\r\n if (this.shouldShowCashbackSettings && this.options.deps) {\r\n this.cashbackSettingsView = new CashbackSettings({\r\n deps: { ...this.options.deps, i18n: this.i18n },\r\n isCreationScenario: true,\r\n });\r\n\r\n this.shoppingSettingsView.on('feedChanged', (feedId) => {\r\n if (feedId) {\r\n this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersDisabled(true);\r\n this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersChecked(false);\r\n } else {\r\n this.cashbackSettingsView.viewModel.isEnablePersonalizedOffersDisabled(false);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n if (this.options && this.options.perfMarker) {\r\n this.renderMarker = this.perfMarker.createChild('RenderShoppingCampaignCrud');\r\n this.renderMarker.willInit();\r\n }\r\n this.perfMarker.willRender();\r\n\r\n super.render();\r\n\r\n this.$('.shopping-settings-container').append(this.shoppingSettingsView.render().$el);\r\n\r\n if (this.cashbackSettingsView) {\r\n this.$('.cashback-settings-container').empty().append(this.cashbackSettingsView.render().$el);\r\n }\r\n return this;\r\n }\r\n\r\n validate() {\r\n const isCashbackSettingsValid = !this.cashbackSettingsView ||\r\n this.cashbackSettingsView.validate();\r\n\r\n return this.shoppingSettingsView.validate() && super.validate() && isCashbackSettingsValid;\r\n }\r\n\r\n /**\r\n * Get the data that is used for the parameter for saving.\r\n *\r\n * @returns {Object} - object representing the data for the campaign to be saved.\r\n */\r\n getData() {\r\n const params = super.getData();\r\n\r\n if (this.isEnabledDynamicFeedCampaign) {\r\n params.FeedId = this.shoppingSettingsView.viewModel.FeedId();\r\n if (!params.FeedId) {\r\n params.ProviderId = this.shoppingSettingsView.viewModel.ProviderId();\r\n }\r\n } else {\r\n params.ProviderId = this.shoppingSettingsView.viewModel.ProviderId();\r\n }\r\n\r\n params.CampaignSubType = params.FeedId\r\n ? CampaignSubTypes.AudienceDynamicFeedBased\r\n : CampaignSubTypes.AudienceFeedBased;\r\n\r\n if (this.shoppingSettingsView.hasFilteredProducts()) {\r\n params.Priority = 'Low';\r\n params.LocalInventoryAdsEnabled = false;\r\n\r\n params.CampaignProductScope = _.defaults(this.shoppingSettingsView.getProductScope(), {\r\n CampaignName: params.Name,\r\n });\r\n\r\n if (this.productData.CampaignCriterionsData && this.productData.CampaignCriterionsData.Id) {\r\n params.CampaignProductScope.Id = this.productData.CampaignCriterionsData.Id;\r\n }\r\n }\r\n\r\n if (!this.viewContext.currentCampaign) {\r\n params.AdScheduleUseSearcherTimeZone = false;\r\n }\r\n\r\n if (this.cashbackSettingsView) {\r\n _.extend(params, this.cashbackSettingsView.getValues());\r\n }\r\n\r\n return params;\r\n }\r\n\r\n /**\r\n * Save the campaign with the given setting.\r\n *\r\n * @returns {Promise} - returns promise with a return boolean value indicating\r\n * if the save is succesful or not.\r\n */\r\n save() {\r\n if (this.shoppingSettingsView.hasFilteredProducts() &&\r\n this.shoppingSettingsView.filterDataComesFrom === 'NewComponent') {\r\n this.shoppingSettingsView.clickApplyButton();\r\n }\r\n\r\n if (!this.validate()) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n const params = this.getData();\r\n\r\n let createOrUpdateTask;\r\n\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n\r\n if (this.viewContext.currentCampaign) {\r\n params.Id = this.viewContext.currentCampaign.Id;\r\n createOrUpdateTask =\r\n jsdata.ShoppingCampaign.update(params.Id, params, { adapter: 'bulk', cacheResponse: false });\r\n } else {\r\n // when isEnabledDeprecateManualCpcForAudienceCampaign is enabled, we create the campaign with BiddingScheme eCpc\r\n // because we want to deprecate mCpc for audience campaign\r\n // the default BiddingScheme will be eCpc for audience campaign except for video/brandawareness audience campaigns\r\n // if UI pass mCpc to MT, MT will convert it into eCpc\r\n if (params.CampaignType === 'Audience' && _.result(this.permissions, 'IsEnabledDeprecateManualCpcForAudienceCampaign', false)) {\r\n params.BiddingScheme = {\r\n Type: 'EnhancedCpc',\r\n };\r\n }\r\n createOrUpdateTask =\r\n jsdata.ShoppingCampaign.create(params, { adapter: 'bulk', cacheResponse: false });\r\n }\r\n\r\n this.errorsView.removeErrors();\r\n\r\n return createOrUpdateTask.then(data => getProductData({\r\n campaignId: data.Id,\r\n getCampaignCriterionsOnly: true,\r\n }).then((productData) => {\r\n if (productData && this.productData) {\r\n this.productData.CampaignCriterionsData = productData.CampaignCriterionsData;\r\n }\r\n\r\n if (_.isFinite(data.Id)) {\r\n const campaign = data;\r\n campaign.CampaignCashback = {\r\n MonthlyBudget: campaign.CashbackMonthlyBudget,\r\n Percent: campaign.CashbackPercent,\r\n Scope: campaign.CashbackScope,\r\n CouponsEnabled: campaign.CouponsEnabled,\r\n PersonalizedOffersEnabled: campaign.PersonalizedOffersEnabled,\r\n };\r\n\r\n logCampaignPersonalizedOffers(\r\n this.cashbackSettingsView,\r\n this.activityLogger.signal.bind(this.activityLogger),\r\n data\r\n );\r\n\r\n campaign.CampaignSettings = [{\r\n ProviderId: campaign.ProviderId,\r\n FeedId: campaign.FeedId,\r\n }];\r\n\r\n this.viewContext.currentCampaign = campaign;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }))\r\n .catch((response) => {\r\n if (response && response.entity) {\r\n const hasErrors = response && !_.isUndefined(response.errors);\r\n\r\n if (hasErrors) {\r\n if (response.errors.length) {\r\n this.errorsView.setErrors(this.i18nErrors.getBulkApiErrors(response.errors));\r\n\r\n this.activityLogger.trace(getBulkErrorsLogMessage(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience campaign creation api error');\r\n });\r\n }\r\n } else {\r\n // Unexpected case. Log Error.\r\n this.activityLogger.error(JSON.stringify(response));\r\n }\r\n } else {\r\n // Ajax error [400] - RowCountExceeded\r\n this.errorsView.setErrors(this.i18nErrors.getODataErrors(response.errors));\r\n _.each(response.errors, (error) => {\r\n this.activityLogger.signal(error.Error, 'audience campaign creation api error');\r\n });\r\n }\r\n\r\n return false;\r\n })\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n willShow() {\r\n super.willShow();\r\n if (this.viewContext.currentCampaign) {\r\n if (this.isEnabledDynamicFeedCampaign) {\r\n this.shoppingSettingsView.renderCatagrizedOptionsList({\r\n disabled: true,\r\n });\r\n } else {\r\n this.shoppingSettingsView.disableStoreSelection();\r\n }\r\n }\r\n this.perfMarker.done();\r\n // As we show the first section of the wizard, we consider the whole wizard done rendered.\r\n\r\n if (this.perfMarker.parentMarker) {\r\n this.perfMarker.parentMarker.done();\r\n }\r\n if (this.options && this.options.perfMarker && this.renderMarker) {\r\n this.renderMarker.done();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize shopping settings view\r\n *\r\n * @private\r\n * @returns {undefined}\r\n */\r\n initShoppingSettingsView() {\r\n const ShoppingSettingsView = DependencyResolver.get('campaignui/feature/shopping-campaign/view/campaign-creation/shopping-settings');\r\n\r\n this.shoppingSettingsView = new ShoppingSettingsView({\r\n data: this.productData,\r\n feedData: this.feedData,\r\n model: this.setting,\r\n campaignType: 'Audience',\r\n campaignSubType: 'AudienceFeedBased',\r\n activityLogger: this.activityLogger,\r\n });\r\n }\r\n\r\n copyFromCampaign(source) {\r\n const noExistingCampaign = !this.viewContext.currentCampaign;\r\n super.copyFromCampaign(source);\r\n const campaign = _.first(source);\r\n this.activityLogger.signal(`Copy setting from campaign: ${campaign.Name} ${campaign.Id}`, 'Audience Copy Campaign Setting');\r\n\r\n // copy Personalized promotions(cashback setting)\r\n const cashBackSettings = _.result(campaign, 'CampaignCashback');\r\n if (cashBackSettings) {\r\n this.cashbackSettingsView.setValues({\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 });\r\n }\r\n\r\n const copyWhiteList = [\r\n 'AudienceDynamicFeedBased',\r\n 'AudienceFeedBased',\r\n ];\r\n\r\n if (_.contains(copyWhiteList, campaign.CampaignSubType) && noExistingCampaign) {\r\n let feedId;\r\n const getTreeInfo = this.isEnhancedPAFilterP2Enabled && (campaign.CampaignSubType === 'AudienceFeedBased');\r\n if (campaign.CampaignSubType === 'AudienceDynamicFeedBased') {\r\n feedId = _.result(campaign.CampaignSettings[0], 'FeedId');\r\n } else {\r\n feedId = _.result(campaign.CampaignSettings[0], 'ProviderId');\r\n }\r\n this.shoppingSettingsView.refreshCategorizedOptionsList(feedId);\r\n this.getProductData(_.result(campaign, 'Id'), _.first(campaign.CampaignSettings[0]), getTreeInfo)\r\n .then((productData) => {\r\n this.shoppingSettingsView.refreshData(campaign, productData);\r\n })\r\n .finally(withUiBlock());\r\n } else if (noExistingCampaign) {\r\n this.shoppingSettingsView.viewModel.selectAllProducts(true);\r\n }\r\n }\r\n\r\n // todo: private\\campaign-legacy\\packages\\shopping-campaign\\view\\campaign-creation\\index.js\r\n // Move getProductData's code there and this code to common area after permissions modifications.\r\n getProductData(campaignId, setting, getTreeInfo) {\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const state = DependencyResolver.get('component/state/index');\r\n\r\n let url = queryify('/Campaign/NewCampaign/GetProductScope', {\r\n aid: state.get('account_id'),\r\n cid: state.get('customer_id'),\r\n uid: state.get('user_id'),\r\n });\r\n\r\n const urlQueryStringObject = {\r\n campaignId,\r\n salesCountry: _.result(setting, 'SalesCountry'),\r\n };\r\n\r\n url = queryify(url, urlQueryStringObject);\r\n\r\n if (this.shouldShowPlaceholderStoreIfExists) {\r\n url = `${url}&storeTypes=placeholder`;\r\n }\r\n\r\n if (getTreeInfo) {\r\n url = queryify(url, {\r\n getCategoryFullData: true,\r\n getProductTypeFullData: true,\r\n });\r\n }\r\n\r\n const params = {\r\n url,\r\n adapter: 'legacy',\r\n bypassCache: true,\r\n cacheResponse: false,\r\n };\r\n\r\n return jsdata.Product.find('MetaData', params)\r\n // Ui blocker is added by caller function\r\n .catch(() => {\r\n this.viewModel.errors.add();\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport template from './audience-meter.pug';\r\n\r\n/**\r\n * AudienceMeter class\r\n * This is a pure view for the Meter-Needle portion of the Reach Estimate Control\r\n *\r\n * @class AudienceMeter\r\n */\r\nexport class AudienceMeter extends Backbone.View {\r\n initialize() {\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n\r\n this.meterProps = {\r\n value: 0,\r\n max: 100,\r\n min: 0,\r\n };\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template({ i18n: this.i18n }));\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Show Audience Meter\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n show() {\r\n this.$el.show();\r\n }\r\n\r\n /**\r\n * Hide Audience Meter\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n hide() {\r\n this.$el.hide();\r\n }\r\n\r\n /**\r\n * Move the arrow pointer along the broad meter scale\r\n *\r\n * @param {Number} value value to which the the pointer should be moved\r\n * @returns {undefined}\r\n */\r\n moveAlongBroad(value) {\r\n this.$('.arrow').css({ left: this.calcBroadPos(value) });\r\n this.$('.arrow').css('border-top-color', 'green');\r\n }\r\n\r\n /**\r\n * Move the arrow pointer to the specific meter category\r\n *\r\n * @returns {undefined}\r\n */\r\n moveToSpecific() {\r\n const midPointVal = 50; // percentage\r\n\r\n this.$('.arrow').css({ left: this.calcSpecificPos(midPointVal) });\r\n this.$('.arrow').css('border-top-color', 'red');\r\n }\r\n\r\n /**\r\n * Helper to calculate pointer position along broad scale\r\n * @private\r\n *\r\n * @param {Number} value to which the the pointer should be moved\r\n * @returns {Number} position in pixels\r\n */\r\n calcBroadPos(value) {\r\n const specificMeterSize = this.$('.specific-meter').width();\r\n const broadMeterSize = this.$('.broad-meter').width();\r\n const arrowGap = _.first(this.$('.arrow').css('borderLeftWidth'));\r\n\r\n const broadScalePos = value * ((broadMeterSize - arrowGap) / this.meterProps.max);\r\n\r\n // Offset final position with specific meter width\r\n return specificMeterSize + broadScalePos;\r\n }\r\n\r\n /**\r\n * Helper to calculate pointer position along specific scale\r\n * @private\r\n *\r\n * @param {Number} value to which the the pointer should be moved\r\n * @returns {Number} position in pixels\r\n */\r\n calcSpecificPos(value) {\r\n const specificMeterSize = this.$('.specific-meter').width();\r\n const arrowGap = _.first(this.$('.arrow').css('borderLeftWidth'));\r\n\r\n return value * ((specificMeterSize - arrowGap) / this.meterProps.max);\r\n }\r\n}\r\n","const unitValueMap = {\r\n None: {\r\n value: 1,\r\n unit: '',\r\n },\r\n Thousand: {\r\n value: 1000,\r\n unit: 'K',\r\n },\r\n Million: {\r\n value: 1000000,\r\n unit: 'M',\r\n },\r\n Billion: {\r\n value: 1000000000,\r\n unit: 'B',\r\n },\r\n};\r\n\r\nexport { unitValueMap };\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { AudienceMeter } from './audience-meter';\r\nimport template from './template.pug';\r\nimport { unitValueMap } from './utils';\r\n\r\n/**\r\n * ReachEstimateControl class\r\n * Updates the Reach Estimate for AdGroup Targets\r\n *\r\n * @class AudienceMeter\r\n */\r\nexport class ReachEstimateControl extends Backbone.View {\r\n initialize(options = {}) {\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n const permissionConfig = DependencyResolver.get('component/config/index');\r\n this.permissions = permissionConfig.get('Permissions');\r\n\r\n // Allow Updating Estimates no more than once every 2000 ms\r\n this.debouncedUpdateEstimateFunc = _.debounce((data, hasAudience) => this.updateEstimateInternal(data, hasAudience), 2000); // eslint-disable-line max-len\r\n\r\n this.audienceMeter = new AudienceMeter();\r\n\r\n // Empty Init Promises for early validate() case\r\n this.postAudienceEstimation = Promise.resolve();\r\n this.postPrivacyCheck = Promise.resolve();\r\n\r\n // Set initial state to be valid\r\n this.isValid = true;\r\n this.lastEstimateData = null;\r\n\r\n // Panel is to be sticky, so it is always visible to user\r\n this.isPanelSticky = options.isSticky;\r\n this.viewContext = options.viewContext;\r\n this.scenario = options.scenario;\r\n this.customModifyTarget = options.modifyTarget;\r\n this.customThreshold = options.threshold;\r\n this.customRootMargin = options.rootMargin;\r\n\r\n $(window).on('resize', () => {\r\n this.updateEstimatesOnMeter(this.lastEstimateData);\r\n });\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template(this));\r\n\r\n this.$('.audience-meter-container').append(this.audienceMeter.render().el);\r\n\r\n if (this.isPanelSticky) {\r\n this.stickPanel();\r\n }\r\n\r\n // hide the view by default, since we only want to show it when there is data\r\n this.$el.hide();\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Call debounced update estimate function\r\n *\r\n * @param {object} targetsData the targets\r\n * @param {bool} hasAudienceRemarketingList hasAudienceRemarketingList\r\n * @returns {Promise} - promise with status\r\n */\r\n updateEstimate(targetsData, hasAudienceRemarketingList) {\r\n return this.debouncedUpdateEstimateFunc(targetsData, hasAudienceRemarketingList);\r\n }\r\n\r\n /**\r\n * Makes the Reach control panel sticky\r\n *\r\n * @returns {undefined}\r\n */\r\n stickPanel() {\r\n if (!window.IntersectionObserver) {\r\n return;\r\n }\r\n\r\n const modifyTarget = (entries) => {\r\n // Sticky only when it intersects with the window at the top\r\n // and only when the control is displayed\r\n if (_.first(entries).intersectionRatio < 1 &&\r\n _.first(entries).boundingClientRect.height > 0 &&\r\n (_.first(entries).intersectionRect.y < 100 ||\r\n _.first(entries).intersectionRect.top < 100)) {\r\n this.$('.reach-estimate-control').addClass('sticky');\r\n } else {\r\n this.$('.reach-estimate-control').removeClass('sticky');\r\n }\r\n };\r\n\r\n const target = this.$('#reach-control-sentinel').get(0);\r\n\r\n this.observer = new IntersectionObserver(this.customModifyTarget || modifyTarget, {\r\n root: null,\r\n rootMargin: this.customRootMargin || '0px',\r\n threshold: this.customThreshold || 1.0,\r\n });\r\n this.observer.observe(target);\r\n }\r\n\r\n /**\r\n * Validate Audience Reach Estimate\r\n *\r\n * @returns {bool} returns true if reach is valid\r\n */\r\n validate() {\r\n return Promise.all([this.postAudienceEstimation, this.postPrivacyCheck])\r\n .then(() => this.permissions.IsAmplifyEnabled || this.isValid).catch(() => { // eslint-disable-line arrow-body-style\r\n // TODO: log response\r\n return true;\r\n });\r\n }\r\n\r\n /**\r\n * Returns the error message of the reach estimate control\r\n *\r\n * @returns {string} - string for error message\r\n */\r\n get errorMessage() {\r\n return this.errMsg;\r\n }\r\n\r\n /**\r\n * Update the Reach Estimates\r\n * Use the debounce version of this function when dealing with high volume inputs: updateEstimate\r\n *\r\n * @private\r\n * @param {object} targetsData the targets\r\n * @param {bool} hasAudienceRemarketingList hasAudienceRemarketingList\r\n * @returns {Promise} promise with status\r\n */\r\n updateEstimateInternal(targetsData, hasAudienceRemarketingList) {\r\n const odata = DependencyResolver.get('component/http/channel/odata');\r\n const context = DependencyResolver.get('audienceCampaignPageContext');\r\n\r\n // Update if current targets have Audience Remarketing lists\r\n // (used to display appropriate messaging if PrivacyCheck fails)\r\n this.hasAudienceRemarketingList = hasAudienceRemarketingList;\r\n\r\n const urlBase = `Customers(${context.CurrentCustomerId})/Accounts(${context.CurrentAccount.Id})/`;\r\n const audienceEstimationUrl = `${urlBase}Default.AudienceEstimationV2`;\r\n const privacyCheckUrl = `${urlBase}Default.PrivacyCheckV3`;\r\n const option = {\r\n host: 'adinsight.odata.url',\r\n path: 'AdInsight/V2/',\r\n data: { request: targetsData },\r\n customHeader: {\r\n name: 'x-ms-scenarioname',\r\n value: this.scenario || 'AudienceCampaign',\r\n },\r\n };\r\n\r\n // Create AudienceEstimation Promise\r\n if (!_.isEmpty(targetsData)) {\r\n this.postAudienceEstimation = odata.post(audienceEstimationUrl, option);\r\n this.postPrivacyCheck = odata.post(privacyCheckUrl, option);\r\n } else {\r\n this.postAudienceEstimation = Promise.resolve({});\r\n this.postPrivacyCheck = Promise.resolve({});\r\n }\r\n\r\n return Promise.all([this.postAudienceEstimation, this.postPrivacyCheck])\r\n .then(([estimateData, privacyData]) => {\r\n this.lastEstimateData = estimateData;\r\n\r\n if (_.get(estimateData, ['EstImpression', 'Value']) != null) {\r\n this.$el.show();\r\n } else {\r\n this.$el.hide();\r\n }\r\n this.updatePanel(estimateData, privacyData, estimateData && privacyData);\r\n })\r\n .catch((response) => {\r\n this.updatePanel(response, response, false);\r\n })\r\n .finally(withUiBlock(this.$el, this.i18n.getString('Loading'), false));\r\n }\r\n\r\n /**\r\n * Update Panel\r\n * @private\r\n *\r\n * @param {object} estimateData data with estimates\r\n * @param {object} privacyData data with privacy check results\r\n * @param {object} reqStatus indicates if request succeeded\r\n * @returns {undefined}\r\n */\r\n updatePanel(estimateData, privacyData, reqStatus) {\r\n const isReachTooSpecific = _.result(estimateData, 'IsImpressionTooSpecific');\r\n const privacyCheckResult = _.result(privacyData, 'CheckResult');\r\n\r\n // Update Estimate section of Reach Panel\r\n if (!reqStatus || privacyCheckResult !== 'Pass') {\r\n this.hideEstimate();\r\n } else {\r\n this.audienceMeter.show();\r\n this.$('.estimate-note').show();\r\n this.updateEstimatesOnMeter(estimateData);\r\n }\r\n\r\n // Update Warning section of Reach Panel\r\n this.errMsg = this.validateReach(privacyCheckResult, isReachTooSpecific, reqStatus);\r\n if ((privacyCheckResult !== 'Pass' || isReachTooSpecific || !reqStatus) && this.errMsg !== '') {\r\n this.showWarning(this.errMsg);\r\n } else {\r\n this.hideWarning();\r\n }\r\n }\r\n\r\n /**\r\n * Update Estimate\r\n * @private\r\n *\r\n * @param {object} data on estimates\r\n * @returns {undefined}\r\n */\r\n updateEstimatesOnMeter(data) {\r\n if (!data || !data.EstImpression) {\r\n return;\r\n }\r\n if (this.viewContext) {\r\n this.viewContext.SuggestedBid = data.SuggestedBid;\r\n }\r\n\r\n const estImprVal = data.EstImpression.Value;\r\n const estImprUnit = unitValueMap[data.EstImpression.Unit].unit;\r\n const estImprUnitVal = unitValueMap[data.EstImpression.Unit].value;\r\n\r\n const estImprText = `${estImprVal}${estImprUnit}`;\r\n const estImpr = estImprVal * estImprUnitVal;\r\n\r\n // Set new estimated impressions and move needle accordingly\r\n this.$('strong.impr').text(estImprText);\r\n\r\n if (data.IsImpressionTooSpecific) {\r\n this.audienceMeter.moveToSpecific();\r\n } else {\r\n this.audienceMeter.moveAlongBroad(this.calcMeterValue(estImpr));\r\n }\r\n }\r\n\r\n /**\r\n * Hide estimate\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n hideEstimate() {\r\n this.audienceMeter.hide();\r\n this.$('.estimate-note').hide();\r\n }\r\n\r\n /**\r\n * Show warning\r\n * @private\r\n *\r\n * @param {String} erroMessage to show\r\n * @returns {undefined}\r\n */\r\n showWarning(erroMessage) {\r\n this.$('.reach-warning').show();\r\n this.$('.reach-warning').text(erroMessage);\r\n }\r\n\r\n /**\r\n * Hide warning\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n hideWarning() {\r\n this.$('.reach-warning').hide();\r\n }\r\n\r\n /**\r\n * Checks for and sets Entity Valid state, also returns Warning Message if invalid\r\n * @private\r\n *\r\n * @param {object} privacyCheckResult The Privacy check Result\r\n * @param {object} isTooSpecific True if Estimated Impressions are too specific\r\n * @param {object} success indicates if request succeeded\r\n * @returns {undefined}\r\n */\r\n validateReach(privacyCheckResult, isTooSpecific, success) {\r\n let message = '';\r\n\r\n // Set valid state to true unless invalid state detected\r\n this.isValid = true;\r\n\r\n if (!success || privacyCheckResult === 'Pending') {\r\n message = this.i18n.getString('Audience_Campaign_ReachControl_NotAvailable');\r\n\r\n return message;\r\n }\r\n\r\n if (privacyCheckResult === 'TooNarrow' && this.hasAudienceRemarketingList) {\r\n message = this.i18n.getString('Audience_Campaign_ReachControl_PrivacyCheckFailed_AudienceReMarketing');\r\n this.isValid = true;\r\n\r\n return message;\r\n }\r\n\r\n if (privacyCheckResult === 'TooNarrow' && !this.hasAudienceRemarketingList) {\r\n message = this.i18n.getString('Audience_Campaign_ReachControl_PrivacyCheckFailed');\r\n this.isValid = false;\r\n\r\n return message;\r\n }\r\n\r\n // as long as the privacy check passed, we don't care about the possible estimation\r\n if (isTooSpecific && !this.permissions.IsKPIEstimateForAudienceFeedBasedEnabled) {\r\n message = this.i18n.getString('Audience_Campaign_ReachControl_TargettingTooSpecific');\r\n this.isValid = false;\r\n\r\n return message;\r\n }\r\n\r\n return message;\r\n }\r\n\r\n /**\r\n * Calculate the percentage value to be used in Audience Meter\r\n * @private\r\n *\r\n * @param {Number} estImpr estimated impressions\r\n * @returns {Number} percentageVal\r\n */\r\n calcMeterValue(estImpr) {\r\n // Use logarithimc scale to represent impressions: y = a log x + b\r\n // 100 = a log 64B + b: (64B experimentally derived as max impressions value)\r\n // 20 = a log 1K + b: (1K experimentally derived as min impressions value)\r\n // TODO: Tune this as needed after inital selfhosting\r\n const transformedVal = (4.45078 * Math.log(estImpr)) - 10.74487;\r\n\r\n return transformedVal;\r\n }\r\n\r\n remove() {\r\n super.remove();\r\n\r\n if (this.observer) {\r\n this.observer.disconnect();\r\n }\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { FeedBasedCampaginSubTypes, CampaignSubTypeMapping, BidStrategy } from '@bingads-webui-campaign/audience-campaign-shared';\r\n\r\n// Age Target Enum Map between Campaign and AdInsights\r\nconst ageTargetMap = {\r\n EighteenToTwentyFive: 'EighteenToTwentyFour',\r\n TwentyFiveToThirtyFive: 'TwentyFiveToThirtyFour',\r\n ThirtyFiveToFifty: 'ThirtyFiveToFourtyNine',\r\n FiftyToSixtyFive: 'FiftyToSixtyFour',\r\n SixtyFiveAndAbove: 'SixtyFiveAndAbove',\r\n Unknown: 'Unknown',\r\n};\r\n\r\n/**\r\n * Estimate Request Factory\r\n * This serves to create the request for AudienceEstimation and Privacy Check calls to AdInsights\r\n *\r\n * @class EstimateRequestFactory\r\n */\r\nexport class EstimateRequestFactory {\r\n constructor(options = {}) {\r\n this.currentLevelTargetInfo = options.currentLevelTargetInfo;\r\n this.parentLevelTargetInfo = options.parentLevelTargetInfo;\r\n const permissionConfig = DependencyResolver.get('component/config/index');\r\n this.permissions = permissionConfig.get('Permissions');\r\n this.bidStrategyPermissionBind = {\r\n [BidStrategy.ManualCpc]: true,\r\n [BidStrategy.EnhancedCpc]: true,\r\n [BidStrategy.ManualCpv]: this.permissions.IsKPIEstimateForCPVEnabled,\r\n [BidStrategy.ManualCpm]: this.permissions.IsKPIEstimateForCPMEnabled,\r\n };\r\n this.campaignSubTypesSupported = [\r\n CampaignSubTypeMapping.AudienceStatic,\r\n CampaignSubTypeMapping.AudienceVideoAds,\r\n ];\r\n if (this.permissions.IsKPIEstimateForAudienceFeedBasedEnabled) {\r\n this.campaignSubTypesSupported =\r\n this.campaignSubTypesSupported.concat(FeedBasedCampaginSubTypes);\r\n }\r\n\r\n this.request = {};\r\n }\r\n\r\n /**\r\n * Creates the request for AudienceEstimation and Privacy Check calls\r\n *\r\n * @param {number} bidStrategy bid strategy enum used to create request\r\n * @param {number} campaignSubType sub type enum of campaign used to create request\r\n * @param {object} feedInfo audience campaign feed information\r\n * @param {object} useOptimizedTargeting if use Optimized Targeting\r\n *\r\n * @returns {object} request\r\n */\r\n create(bidStrategy, campaignSubType, feedInfo, useOptimizedTargeting) {\r\n this.request = {};\r\n\r\n return this.createWithTargetSettings(['CompanyName', 'Industry', 'JobFunction', 'Audience'], bidStrategy, campaignSubType, feedInfo, useOptimizedTargeting);\r\n }\r\n\r\n /**\r\n * Creates the request for AudienceEstimation and Privacy Check calls\r\n * This takes into account the user's TargetAndBid vs BidOnly selection\r\n *\r\n * @param {Array} targetSettings targetSettings\r\n * @param {number} bidStrategy bid strategy enum used to create request\r\n * @param {number} campaignSubType sub type enum of campaign used to create request\r\n * @param {object} feedInfo audience campaign feed information\r\n * @param {object} useOptimizedTargeting if use Optimized Targeting\r\n *\r\n * @returns {object} request\r\n */\r\n createWithTargetSettings(\r\n targetSettings, bidStrategy, campaignSubType,\r\n feedInfo, useOptimizedTargeting\r\n ) {\r\n this.request = {};\r\n\r\n this.addAgeTargets();\r\n this.addGenderTargets();\r\n this.addLocationTargets();\r\n this.addRadiusTargets();\r\n\r\n // Add Included Targets only if Target & Bid\r\n this.addCompanyTargets(_.contains(targetSettings, 'CompanyName'));\r\n this.addIndustryTargets(_.contains(targetSettings, 'Industry'));\r\n this.addJobFunctionTargets(_.contains(targetSettings, 'JobFunction'));\r\n this.addAudienceTargets(_.contains(targetSettings, 'Audience'));\r\n\r\n if (_.isNumber(bidStrategy) && this.bidStrategyPermissionBind[bidStrategy]) {\r\n this.request.CampaignBiddingStrategy = bidStrategy;\r\n } else {\r\n this.request.CampaignBiddingStrategy = BidStrategy.ManualCpc;\r\n }\r\n let subType = campaignSubType;\r\n // We convert it to enum number first\r\n if (_.isString(subType)) {\r\n subType = CampaignSubTypeMapping[campaignSubType];\r\n }\r\n if ((_.isNumber(subType) && this.campaignSubTypesSupported.includes(subType))) {\r\n this.request.CampaignSubType = subType;\r\n } else {\r\n this.request.CampaignSubType = CampaignSubTypeMapping.AudienceStatic;\r\n }\r\n\r\n if (FeedBasedCampaginSubTypes.includes(this.request.CampaignSubType)) {\r\n this.request.Feed = {\r\n StoreId: _.get(feedInfo, 'StoreId'),\r\n FeedId: _.get(feedInfo, 'FeedId'),\r\n };\r\n }\r\n\r\n this.request.AutoTargeting = useOptimizedTargeting;\r\n return this.request;\r\n }\r\n\r\n /**\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n addAgeTargets() {\r\n const criterions = this.currentLevelTargetInfo.getAllByType('Age');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n\r\n _.each(criterions, (c) => {\r\n if (c.CriterionType === 'Age') {\r\n const translatedAgeTarget = ageTargetMap[c.Criterion.AgeCriterion.Target];\r\n\r\n targets.Includes.push(translatedAgeTarget);\r\n } else if (c.CriterionType === 'NegativeAge') {\r\n const translatedAgeTarget = ageTargetMap[c.Criterion.AgeCriterion.Target];\r\n\r\n targets.Excludes.push(translatedAgeTarget);\r\n }\r\n });\r\n\r\n this.request.Age = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n addGenderTargets() {\r\n const criterions = this.currentLevelTargetInfo.getAllByType('Gender');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n\r\n _.each(criterions, (c) => {\r\n if (c.CriterionType === 'Gender') {\r\n targets.Includes.push(c.Criterion.GenderCriterion.Target);\r\n } else if (c.CriterionType === 'NegativeGender') {\r\n targets.Excludes.push(c.Criterion.GenderCriterion.Target);\r\n }\r\n });\r\n\r\n this.request.Gender = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n addLocationTargets() {\r\n let targetInfoToUse = this.currentLevelTargetInfo;\r\n\r\n if (this.parentLevelTargetInfo &&\r\n this.currentLevelTargetInfo.parentLevelTogglesByType.Location) {\r\n targetInfoToUse = this.parentLevelTargetInfo;\r\n }\r\n\r\n const includedCriterions = targetInfoToUse.getAllByType('Location');\r\n const excludedCriterions = targetInfoToUse.getAllByType('NegativeLocation');\r\n\r\n if (_.isEmpty(includedCriterions) && _.isEmpty(excludedCriterions)) {\r\n // If no location criterions found, then target 'All locations'\r\n this.request.Location = {};\r\n\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n\r\n _.each(includedCriterions, (c) => {\r\n const locationCriterion = c.Criterion.LocationCriterion;\r\n\r\n if (locationCriterion) {\r\n if (c.CriterionType === 'NegativeLocation') {\r\n targets.Excludes.push(locationCriterion.LocationId);\r\n } else {\r\n targets.Includes.push(locationCriterion.LocationId);\r\n }\r\n } else if (c['@odata.type'] === '#Model.NegativeCampaignCriterion') { // For campaign inherited criterions\r\n targets.Excludes.push(c.Criterion.LocationId);\r\n } else if (c['@odata.type'] === '#Model.CampaignCriterion') {\r\n targets.Includes.push(c.Criterion.LocationId);\r\n }\r\n });\r\n\r\n _.each(excludedCriterions, (c) => {\r\n const excludedLocationCriterion = c.Criterion.LocationCriterion;\r\n\r\n if (excludedLocationCriterion) {\r\n targets.Excludes.push(excludedLocationCriterion.LocationId);\r\n }\r\n });\r\n\r\n this.request.Location = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n addRadiusTargets() {\r\n let targetInfoToUse = this.currentLevelTargetInfo;\r\n\r\n if (this.parentLevelTargetInfo &&\r\n this.currentLevelTargetInfo.parentLevelTogglesByType.Location) {\r\n targetInfoToUse = this.parentLevelTargetInfo;\r\n }\r\n\r\n const radiusCriterions = targetInfoToUse.getAllByType('Radius');\r\n\r\n if (_.isEmpty(radiusCriterions)) {\r\n return;\r\n }\r\n\r\n const radiusTargets = [];\r\n\r\n _.each(radiusCriterions, (c) => {\r\n const radiusCriterion = c.Criterion.RadiusCriterion;\r\n\r\n if (radiusCriterion) {\r\n radiusTargets.push({\r\n Radius: radiusCriterion.Radius,\r\n CenterLongitude: radiusCriterion.Longitude,\r\n CenterLatitude: radiusCriterion.Latitude,\r\n });\r\n }\r\n });\r\n\r\n if (radiusTargets.length > 0) {\r\n this.request.RadiusTargets = radiusTargets;\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * @param {bool} addInclusions addInclusions\r\n * @returns {undefined}\r\n */\r\n addCompanyTargets(addInclusions) {\r\n const criterions = this.currentLevelTargetInfo.getAllByType('CompanyName');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n const arr = _.partition(criterions, c => c.CriterionType === 'CompanyName');\r\n const includedCriterions = arr[0];\r\n const excludedCriterions = arr[1];\r\n\r\n if (addInclusions) {\r\n _.each(includedCriterions, (c) => {\r\n targets.Includes.push(c.Criterion.CompanyNameCriterion.Target);\r\n });\r\n }\r\n\r\n _.each(excludedCriterions, (c) => {\r\n targets.Excludes.push(c.Criterion.CompanyNameCriterion.Target);\r\n });\r\n\r\n this.request.Company = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n * @param {bool} addInclusions addInclusions\r\n * @returns {undefined}\r\n */\r\n addJobFunctionTargets(addInclusions) {\r\n const criterions = this.currentLevelTargetInfo.getAllByType('JobFunction');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n const arr = _.partition(criterions, c => c.CriterionType === 'JobFunction');\r\n const includedCriterions = arr[0];\r\n const excludedCriterions = arr[1];\r\n\r\n if (addInclusions) {\r\n _.each(includedCriterions, (c) => {\r\n targets.Includes.push(c.Criterion.JobFunctionCriterion.Target);\r\n });\r\n }\r\n\r\n _.each(excludedCriterions, (c) => {\r\n targets.Excludes.push(c.Criterion.JobFunctionCriterion.Target);\r\n });\r\n\r\n this.request.JobFunction = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n * @param {bool} addInclusions addInclusions\r\n * @returns {undefined}\r\n */\r\n addIndustryTargets(addInclusions) {\r\n const criterions = this.currentLevelTargetInfo.getAllByType('Industry');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n const arr = _.partition(criterions, c => c.CriterionType === 'Industry');\r\n const includedCriterions = arr[0];\r\n const excludedCriterions = arr[1];\r\n\r\n if (addInclusions) {\r\n _.each(includedCriterions, (c) => {\r\n targets.Includes.push(c.Criterion.IndustryCriterion.Target);\r\n });\r\n }\r\n\r\n _.each(excludedCriterions, (c) => {\r\n targets.Excludes.push(c.Criterion.IndustryCriterion.Target);\r\n });\r\n\r\n this.request.Industry = targets;\r\n }\r\n\r\n /**\r\n * @private\r\n * @param {bool} addInclusions addInclusions\r\n * @returns {undefined}\r\n */\r\n addAudienceTargets(addInclusions) {\r\n let criterions = this.currentLevelTargetInfo.getAllByType('Audience');\r\n\r\n criterions = _.reject(criterions, c => c.Status === 'Paused');\r\n\r\n if (_.isEmpty(criterions)) {\r\n return;\r\n }\r\n\r\n const targets = { Includes: [], Excludes: [] };\r\n const arr = _.partition(criterions, c => c.Status === 'Excluded');\r\n\r\n const excludedCriterions = arr[0];\r\n const includedCriterions = arr[1];\r\n\r\n if (addInclusions) {\r\n _.each(includedCriterions, (c) => {\r\n targets.Includes.push(c.Criterion.AudienceId);\r\n });\r\n }\r\n\r\n _.each(excludedCriterions, (c) => {\r\n targets.Excludes.push(c.Criterion.AudienceId);\r\n });\r\n\r\n this.request.Audience = targets;\r\n }\r\n}\r\n","const getData = i18n => i18n.p$data.value().resource.data;\r\n\r\nexport const mergeI18n = (target, parentI18n) => {\r\n // catch error in mock i18n\r\n try {\r\n Object.assign(getData(target), getData(parentI18n));\r\n } catch (error) {\r\n console.warn(error);\r\n }\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\n\r\n// scenario is used to differentiate API calls source\r\nconst autoCompleteEndpoint = '{odataPath}Mca/V1/Customers({customer_id})/Accounts({account_id})/Default.GetAdAutoComplete?scenario={scenario}';\r\nconst adRecommendationEndpoint = '{odataPath}Campaign/V2/Customers({customer_id})/Accounts({account_id})/Campaigns({campaign_id})/Default.CreateResponsiveSearchAdRecommendation?scenario={scenario}';\r\nconst extractBusinessInfoEndpoint = '{odataPath}Campaign/V2/Customers({customer_id})/Accounts({account_id})/Campaigns({campaign_id})/Default.GetExtractedBusinessInfo?scenario={scenario}';\r\n\r\nconst formatUrl = (url, pageContext, campaignId, adGroupId, scenario) => url\r\n .replace('{odataPath}', pageContext.BingAdsWebApiUri)\r\n .replace('{account_id}', _.result(pageContext.CurrentAccount, 'Id'))\r\n .replace('{customer_id}', _.result(pageContext.CurrentCustomer, 'Id'))\r\n .replace('{campaign_id}', campaignId)\r\n .replace('{adgroup_id}', adGroupId)\r\n .replace('{scenario}', scenario);\r\n\r\nexport class AdStrengthSuggestionRepository {\r\n constructor({\r\n field,\r\n assetType,\r\n viewModel,\r\n pageContext,\r\n scenario,\r\n }) {\r\n this.field = field;\r\n this.assetType = assetType;\r\n this.viewModel = viewModel;\r\n this.pageContext = pageContext;\r\n this.scenario = scenario;\r\n }\r\n\r\n fetchAdStrengthSuggestion(isAutoComplete) {\r\n const {\r\n field,\r\n assetType,\r\n viewModel,\r\n pageContext,\r\n scenario,\r\n } = this;\r\n\r\n let currentFinalUrl = null;\r\n if (!_.isEmpty(viewModel.model.get('FinalUrls'))) {\r\n currentFinalUrl = _.first(viewModel.model.get('FinalUrls'));\r\n } else {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n const requestBody = isAutoComplete ? {\r\n url: currentFinalUrl,\r\n adType: 'EXTA',\r\n maxCount: 3,\r\n autoCompleteFieldIndex: assetType === 'headline' ? 0 : 2,\r\n adFields: [\r\n assetType === 'headline' ? viewModel.model.get(field) : '',\r\n '',\r\n assetType === 'headline' ? '' : viewModel.model.get(field),\r\n ],\r\n } : {\r\n count: 1,\r\n business: {\r\n Website: currentFinalUrl,\r\n },\r\n headlineCount: viewModel.maxHeadlineSuggestions,\r\n descriptionCount: viewModel.maxDescriptionSuggestions,\r\n caller: 'cmmt_ra',\r\n };\r\n\r\n const option = {\r\n url: formatUrl(\r\n isAutoComplete ? autoCompleteEndpoint : adRecommendationEndpoint,\r\n pageContext,\r\n viewModel.campaignId,\r\n viewModel.adGroupId,\r\n scenario\r\n ),\r\n contentType: 'application/json',\r\n headers: {\r\n authorization: `CCMTSmallToken ${pageContext.Token}`,\r\n },\r\n type: 'POST',\r\n data: stringifySync(requestBody),\r\n };\r\n\r\n const fetchDataPromise = new Promise((resolve) => {\r\n $.ajax(option).then((rawData) => {\r\n let data = [];\r\n if (!_.isEmpty(rawData)) {\r\n if (isAutoComplete) {\r\n data = _.map(rawData.Suggestions, (suggestion) => {\r\n suggestion.AssetType = assetType; // eslint-disable-line no-param-reassign\r\n return suggestion;\r\n });\r\n } else if (rawData.value && rawData.value.length > 0) {\r\n data = data.concat(_.map(_.first(rawData.value).Headlines, (headline) => {\r\n headline.Asset.AssetType = 'headline'; // eslint-disable-line no-param-reassign\r\n return headline.Asset;\r\n }));\r\n data = data.concat(_.map(_.first(rawData.value).Descriptions, (description) => {\r\n description.Asset.AssetType = 'description'; // eslint-disable-line no-param-reassign\r\n return description.Asset;\r\n }));\r\n }\r\n }\r\n resolve(data);\r\n }).catch((err) => {\r\n if (err && err.responseJSON && err.responseJSON[0] && err.responseJSON[0].Code === 'LanguageMismatchUserAd') {\r\n // ignore this error\r\n return;\r\n }\r\n throw err;\r\n });\r\n });\r\n\r\n return fetchDataPromise.then(rawData => ({\r\n data: rawData,\r\n }));\r\n }\r\n\r\n fetchBusinessInfo(isAutoComplete) {\r\n const {\r\n viewModel,\r\n pageContext,\r\n scenario,\r\n } = this;\r\n\r\n const field = 'BusinessName';\r\n\r\n let currentFinalUrl = null;\r\n if (!_.isEmpty(viewModel.model.get('FinalUrls'))) {\r\n currentFinalUrl = _.first(viewModel.model.get('FinalUrls'));\r\n } else {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n if (isAutoComplete) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n const requestBody = {\r\n url: currentFinalUrl,\r\n };\r\n\r\n const option = {\r\n url: formatUrl(\r\n extractBusinessInfoEndpoint,\r\n pageContext,\r\n viewModel.campaignId,\r\n viewModel.adGroupId,\r\n scenario\r\n ),\r\n contentType: 'application/json',\r\n headers: {\r\n authorization: `CCMTSmallToken ${pageContext.Token}`,\r\n },\r\n type: 'POST',\r\n data: stringifySync(requestBody),\r\n };\r\n\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n let data = [];\r\n if (!_.isEmpty(rawData)) {\r\n data = [{\r\n Text: rawData[field],\r\n AssetType: 'business',\r\n }];\r\n }\r\n resolve(data);\r\n }, reject);\r\n });\r\n\r\n return fetchDataPromise.then(rawData => ({\r\n data: rawData,\r\n }));\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { MMAAssetConfigs } from './config';\r\n\r\nexport const headlineFields = _.map(_.range(MMAAssetConfigs.MAX_HEADLINES), i => `Headline${i}`);\r\nexport const longHeadlineFields = _.map(_.range(MMAAssetConfigs.MAX_LONGHEADLINES), i => `LongHeadline${i}`);\r\nexport const descriptionFields = _.map(_.range(MMAAssetConfigs.MAX_DESCRIPTIONS), i => `Description${i}`);\r\n\r\nexport const ResponsiveAdScenarios = {\r\n MMASearch: 'MMASearch',\r\n MMAResponsive: 'MMAResponsive',\r\n NonMMAResponsive: 'NonMMAResponsive',\r\n};\r\n\r\nexport const AdEditFields = {\r\n Headline: 'Headline',\r\n LongHeadline: 'LongHeadline',\r\n Description: 'Description',\r\n Text: 'Text',\r\n BusinessName: 'BusinessName',\r\n};\r\n\r\nexport const assetSuggestionType = {\r\n // use for asset suggestions\r\n [AdEditFields.Headline]: 'headline',\r\n [AdEditFields.LongHeadline]: 'description',\r\n [AdEditFields.Description]: 'description',\r\n [AdEditFields.Text]: 'description',\r\n [AdEditFields.BusinessName]: 'business',\r\n};\r\n\r\nexport const singleAssetSuggestionType = {\r\n [AdEditFields.Headline]: 'shortHeadline',\r\n [AdEditFields.LongHeadline]: 'longHeadline',\r\n [AdEditFields.Text]: 'description',\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, no-param-reassign,\r\nno-plusplus, react/no-array-index-key */\r\n/* istanbul ignore file */\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport Promise from 'bluebird';\r\nimport $ from 'jquery';\r\nimport classnames from 'classnames';\r\nimport { isValidUrl } from '@bingads-webui/url-util';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { AdStrengthSuggestionRepository } from './asset-suggestion-repository';\r\nimport { containerExists } from './asset-suggestion-helper';\r\nimport { singleAssetSuggestionType, assetSuggestionType, headlineFields, longHeadlineFields, descriptionFields } from '../constants';\r\n\r\nexport class AdStrengthSuggestionPicker extends React.Component {\r\n static defaultProps = {\r\n itemsToDisplay: [],\r\n container: $(document.body),\r\n permissions: {},\r\n };\r\n\r\n getDisplayPosition(target, container, permissions) {\r\n const $target = $(target);\r\n const targetOffset = $target.offset();\r\n const containerOffset = container.offset();\r\n\r\n let assetSectionHeight = 0;\r\n let hrHeight = 0;\r\n const $panel = $('.ad-edit-and-preview-container .collapsible-panel');\r\n if (permissions.IsMultiMediaAdsPhase2Enabled && $panel.length > 0) {\r\n assetSectionHeight = $panel.outerHeight();\r\n const hrStyle = window.getComputedStyle($('.ad-edit-and-preview-container hr')[0]);\r\n hrHeight = parseInt(hrStyle.marginTop, 10) + parseInt(hrStyle.marginBottom, 10) +\r\n parseInt(hrStyle.borderTopWidth, 10) + parseInt(hrStyle.borderBottomWidth, 10);\r\n }\r\n\r\n // Calculate the position of the popup relative to the container.\r\n // The container needs to be non-statically positioned, either fixed, relative or absolute,\r\n // because the popup is position: absolute.\r\n return {\r\n top: (targetOffset.top - containerOffset.top) + $target.outerHeight() +\r\n assetSectionHeight + hrHeight * 2, // eslint-disable-line no-mixed-operators\r\n left: targetOffset.left - containerOffset.left,\r\n };\r\n }\r\n\r\n addAssetSuggestion(event, target, field, description, inputText) {\r\n const {\r\n viewModel,\r\n element,\r\n pickerContainer,\r\n activityLogger,\r\n scenario,\r\n } = this.props;\r\n if (!_.isEmpty(target)) {\r\n const targetSelector = `.${target.className.split(' ').join('.')}`;\r\n $(targetSelector).val(description);\r\n viewModel.model.set(field, description);\r\n element.trigger('input-changed', event);\r\n activityLogger.signal(`${field}, ${description}`, `${scenario} asset suggestions select`);\r\n }\r\n if (!_.isEmpty(inputText)) {\r\n activityLogger.signal(`${field}, ${description}`, `${scenario} auto complete asset suggestions select.`);\r\n } else {\r\n activityLogger.signal(`${field}, ${description}`, `${scenario} inline recommendation asset suggestions select.`);\r\n }\r\n\r\n event.stopPropagation();\r\n event.preventDefault();\r\n // Hide picker\r\n ReactDOM.unmountComponentAtNode(pickerContainer);\r\n }\r\n\r\n render() {\r\n const {\r\n container, i18n, target, field, itemsToDisplay, activityLogger, scenario, permissions, input,\r\n } = this.props;\r\n\r\n const position = this.getDisplayPosition(target, container, permissions);\r\n\r\n const containerStyle = {\r\n display: 'block', left: `${position.left}px`, top: `${position.top}px`, zIndex: 20,\r\n };\r\n\r\n let pickerTitle = '';\r\n if (field.startsWith('Headline')) {\r\n pickerTitle = i18n.getString('Ad_Strength_Suggestion_Picker_Title_Headline');\r\n } else if (field.startsWith('LongHeadline')) {\r\n pickerTitle = i18n.getString('Ad_Strength_Suggestion_Picker_Title_LongHeadline');\r\n } else if (field.startsWith('Description')) {\r\n pickerTitle = i18n.getString('Ad_Strength_Suggestion_Picker_Title_AdText');\r\n }\r\n const pickerTitleStyle = { padding: '10px 10px 3px 10px', fontWeight: 'bold' };\r\n\r\n let contentView = null;\r\n const contentClasses = ['picker-list'];\r\n contentView = itemsToDisplay.map(({ Text }, index) => (\r\n
  • \r\n this.addAssetSuggestion(event, target, field, Text, input)}\r\n key={index}\r\n data-index={index}\r\n >\r\n {Text ?
    {Text}
    : null}\r\n \r\n
  • ), this);\r\n\r\n _.each(itemsToDisplay, ({ Text }) => {\r\n activityLogger.signal(`${field}, ${Text}`, `${scenario} asset suggestions view`);\r\n });\r\n\r\n if (!_.isEmpty(itemsToDisplay)) {\r\n activityLogger.signal(`${field}, ${Text}`, `${scenario} asset suggestions page view`);\r\n if (!_.isEmpty(input)) {\r\n activityLogger.signal(`${field}, ${input}`, `${scenario} auto complete asset suggestions view.`);\r\n } else {\r\n activityLogger.signal(`${field}, ${input}`, `${scenario} inline recommendation asset suggestions view.`);\r\n }\r\n }\r\n\r\n return (\r\n
      \r\n
    • \r\n {pickerTitle}\r\n
    • \r\n {contentView}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nAdStrengthSuggestionPicker.propTypes = {\r\n itemsToDisplay: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n description: PropTypes.string,\r\n })),\r\n target: PropTypes.shape({}).isRequired,\r\n container: PropTypes.shape({ offset: PropTypes.func }),\r\n pickerContainer: PropTypes.objectOf(PropTypes.any).isRequired,\r\n viewModel: PropTypes.objectOf(PropTypes.any).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n field: PropTypes.string.isRequired,\r\n element: PropTypes.objectOf(PropTypes.any).isRequired,\r\n activityLogger: PropTypes.shape({\r\n signal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scenario: PropTypes.string.isRequired,\r\n permissions: PropTypes.shape({\r\n IsMultiMediaAdsPhase2Enabled: PropTypes.bool,\r\n }),\r\n input: PropTypes.string.isRequired,\r\n};\r\n\r\nexport class AdStrengthSuggestionController {\r\n constructor({\r\n containerSelector,\r\n pageContext,\r\n i18n,\r\n activityLogger,\r\n }) {\r\n this.containerSelector = containerSelector;\r\n this.pageContext = pageContext || {};\r\n this.i18n = i18n;\r\n this.cachedAutoCompleteSuggestions = {};\r\n this.cachedCreationSuggestions = {};\r\n this.cachedBusiness = {};\r\n this.activityLogger = activityLogger;\r\n\r\n const state = DependencyResolver.get('component/state/index');\r\n state.set('textSuggestions', {\r\n autoCompleteSuggestions: this.cachedAutoCompleteSuggestions,\r\n creationSuggestions: this.cachedCreationSuggestions,\r\n businessNameSuggestions: this.cachedBusiness,\r\n });\r\n }\r\n\r\n keydown(event) {\r\n switch (event.key) {\r\n case 'Escape':\r\n this.hidePicker();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n registerGlobalEvents(target) {\r\n $(window).on('click', event => this.clickedAway(event));\r\n $(target).on('keydown', event => this.keydown(event));\r\n }\r\n\r\n hidePicker() {\r\n const existingPickerContainer = $('.mma-ad-strength-suggestion-container');\r\n if (containerExists(existingPickerContainer)) {\r\n ReactDOM.unmountComponentAtNode(_.first(existingPickerContainer));\r\n }\r\n $(window).off('click', this.clickedAway);\r\n $(this.target).off('keydown', this.keydown);\r\n }\r\n\r\n clickedAway(event) {\r\n const target = $(event.target);\r\n if (target.closest('.ad-strength-suggestion-helper-area').length === 0 &&\r\n target.closest('.mma-ad-strength-suggestion-container').length === 0) {\r\n this.hidePicker();\r\n }\r\n }\r\n\r\n // eslint-disable-next-line max-len\r\n renderPicker(target, field, viewModel, assetType, element, scenario, input, finalUrl) {\r\n const { containerSelector, i18n } = this;\r\n const existingPickerContainer = $('.mma-ad-strength-suggestion-container');\r\n let suggestions\r\n = this.filterSuggestion(viewModel, assetType, input, field, finalUrl);\r\n if (field === 'BusinessName' && input) {\r\n suggestions = [];\r\n }\r\n if (!_.isEmpty(suggestions) && containerExists(existingPickerContainer)) {\r\n const pickerContainer = _.first(existingPickerContainer);\r\n // render latest picker\r\n ReactDOM.render(React.createElement(AdStrengthSuggestionPicker, {\r\n element,\r\n itemsToDisplay: suggestions,\r\n target,\r\n field,\r\n container: $(containerSelector),\r\n pickerContainer,\r\n viewModel,\r\n assetType,\r\n i18n,\r\n activityLogger: this.activityLogger,\r\n scenario,\r\n permissions: this.pageContext.Permissions,\r\n input,\r\n }), pickerContainer);\r\n this.registerGlobalEvents(target);\r\n } else {\r\n this.hidePicker();\r\n }\r\n }\r\n\r\n // Only value of target field which is the input and the finalUrl matter.\r\n isAutoCompleteSuggestionCached(assetType, finalUrl, input) {\r\n const {\r\n cachedAutoCompleteSuggestions,\r\n } = this;\r\n\r\n return (\r\n finalUrl &&\r\n assetType &&\r\n input &&\r\n _.get(cachedAutoCompleteSuggestions, [finalUrl, assetType, input])\r\n );\r\n }\r\n\r\n isCreationSuggestionCached(finalUrl) {\r\n const {\r\n cachedCreationSuggestions,\r\n } = this;\r\n\r\n return (\r\n finalUrl &&\r\n cachedCreationSuggestions[finalUrl] &&\r\n !_.isEmpty(cachedCreationSuggestions[finalUrl])\r\n );\r\n }\r\n\r\n isBusinessCached(finalUrl) {\r\n const {\r\n cachedBusiness,\r\n } = this;\r\n\r\n return (\r\n finalUrl &&\r\n cachedBusiness[finalUrl] &&\r\n !_.isEmpty(cachedBusiness[finalUrl])\r\n );\r\n }\r\n\r\n filterSuggestion(viewModel, assetType, input, field, finalUrl) {\r\n const targetSuggestions =\r\n // eslint-disable-next-line no-nested-ternary\r\n input ?\r\n this.cachedAutoCompleteSuggestions[finalUrl] && this.cachedAutoCompleteSuggestions[finalUrl][assetType] && this.cachedAutoCompleteSuggestions[finalUrl][assetType][input] :\r\n (assetType === assetSuggestionType.BusinessName ?\r\n this.cachedBusiness[finalUrl] : this.cachedCreationSuggestions[finalUrl]);\r\n const filteredSuggestions =\r\n _.filter(targetSuggestions, (suggestion) => {\r\n if (suggestion.AssetType.toLowerCase() !== assetType || _.isEmpty(suggestion.Text)) {\r\n return false;\r\n }\r\n const suggestionContent = suggestion.Text.toLowerCase();\r\n // If the input field is not empty, provide suggestions which start with the inputted text.\r\n if (!_.isEmpty(input) && !suggestionContent.startsWith(input.toLowerCase())) {\r\n return false;\r\n }\r\n\r\n /* Filter out asset that have been inputted */\r\n if (field.startsWith('Headline')) {\r\n for (let i = 0; i < viewModel.showHeadlineCount(); i++) {\r\n const key = `Headline${i}`;\r\n if (suggestion.Text === viewModel.model.get(key)) {\r\n return false;\r\n }\r\n }\r\n } else if (field.startsWith('LongHeadline')) {\r\n for (let i = 0; i < viewModel.showLongHeadlineCount(); i++) {\r\n const key = `LongHeadline${i}`;\r\n if (suggestion.Text === viewModel.model.get(key)) {\r\n return false;\r\n }\r\n }\r\n } else if (field.startsWith('Description')) {\r\n for (let i = 0; i < viewModel.showDescriptionCount(); i++) {\r\n const key = `Description${i}`;\r\n if (suggestion.Text === viewModel.model.get(key)) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n return filteredSuggestions;\r\n }\r\n\r\n autoFillSuggestionsMultipleField({\r\n view,\r\n viewModel,\r\n finalUrl,\r\n scenario,\r\n }) {\r\n const model = viewModel.model.toJSON();\r\n const nonEmptyHeadlineCount =\r\n _.filter(headlineFields, field => !_.isEmpty(model[field])).length;\r\n if (nonEmptyHeadlineCount < viewModel.autoFillHeadlineCount) {\r\n const headlineSuggestions = this.filterSuggestion(viewModel, assetSuggestionType.Headline, null, 'Headline', finalUrl);\r\n for (let i = 0, j = 0; i < viewModel.showHeadlineCount() &&\r\n i < headlineSuggestions.length &&\r\n j < viewModel.autoFillHeadlineCount - nonEmptyHeadlineCount; i++) {\r\n const targetField = headlineFields[i];\r\n const targetSuggestion = headlineSuggestions[i].Text;\r\n if (_.isEmpty(model[targetField])) {\r\n $(`.${targetField}-value`).val(targetSuggestion);\r\n viewModel.model.set(targetField, targetSuggestion);\r\n view[targetField].trigger('input-changed');\r\n this.activityLogger.signal(`${targetField}, ${targetSuggestion}`, `${scenario} asset suggestions auto-fill`);\r\n j++;\r\n }\r\n }\r\n }\r\n\r\n const nonEmptyLongHeadlineCount =\r\n _.filter(longHeadlineFields, field => !_.isEmpty(model[field])).length;\r\n if (nonEmptyLongHeadlineCount < viewModel.autoFillLongHeadlineCount) {\r\n const longHeadlineSuggestions = this.filterSuggestion(viewModel, assetSuggestionType.LongHeadline, null, 'LongHeadline', finalUrl);\r\n for (let i = 0, j = 0; i < viewModel.showLongHeadlineCount() &&\r\n i < longHeadlineSuggestions.length &&\r\n j < viewModel.autoFillLongHeadlineCount - nonEmptyLongHeadlineCount; i++) {\r\n const targetField = longHeadlineFields[i];\r\n const targetSuggestion = longHeadlineSuggestions[i].Text;\r\n if (_.isEmpty(model[targetField])) {\r\n $(`.${targetField}-value`).val(targetSuggestion);\r\n viewModel.model.set(targetField, targetSuggestion);\r\n view[targetField].trigger('input-changed');\r\n this.activityLogger.signal(`${targetField}, ${targetSuggestion}`, `${scenario} asset suggestions auto-fill`);\r\n j++;\r\n }\r\n }\r\n }\r\n\r\n const nonEmptyDescriptionCount =\r\n _.filter(descriptionFields, field => !_.isEmpty(model[field])).length;\r\n if (nonEmptyDescriptionCount < viewModel.autoFillDescriptionCount) {\r\n const descriptionSuggestions = this.filterSuggestion(viewModel, assetSuggestionType.Description, null, 'Description', finalUrl);\r\n for (let i = 0, j = 0; i < viewModel.showDescriptionCount() &&\r\n i < descriptionSuggestions.length &&\r\n j < viewModel.autoFillDescriptionCount - nonEmptyDescriptionCount; i++) {\r\n const targetField = descriptionFields[i];\r\n const targetSuggestion = descriptionSuggestions[i].Text;\r\n if (_.isEmpty(model[targetField])) {\r\n $(`.${targetField}-value`).val(targetSuggestion);\r\n viewModel.model.set(targetField, targetSuggestion);\r\n view[targetField].trigger('input-changed');\r\n this.activityLogger.signal(`${targetField}, ${targetSuggestion}`, `${scenario} asset suggestions auto-fill`);\r\n j++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n autoFillSuggestionsSingleField({\r\n view,\r\n viewModel,\r\n finalUrl,\r\n scenario,\r\n }) {\r\n const model = viewModel.model.toJSON();\r\n _.each(singleAssetSuggestionType, (viewField, field) => {\r\n if (_.isEmpty(model[field])) {\r\n const headlineSuggestions = this.filterSuggestion(\r\n viewModel,\r\n assetSuggestionType[field], null, field, finalUrl\r\n );\r\n if (!_.isEmpty(headlineSuggestions)) {\r\n const targetSuggestion = headlineSuggestions[0].Text;\r\n const targetField = `.${field}-value`;\r\n\r\n $(targetField).val(targetSuggestion);\r\n viewModel.model.set(field, targetSuggestion);\r\n view[viewField].trigger('input-changed');\r\n this.activityLogger.signal(`${field}, ${targetSuggestion}`, `${scenario} asset suggestions auto-fill`);\r\n }\r\n }\r\n });\r\n }\r\n\r\n getAdStrengthSuggestion({\r\n assetType,\r\n target,\r\n field,\r\n viewModel,\r\n element,\r\n scenario,\r\n }) {\r\n const {\r\n containerSelector, pageContext,\r\n } = this;\r\n const existingPickerContainer = $('.mma-ad-strength-suggestion-container');\r\n if (!containerExists(existingPickerContainer)) {\r\n const containerToUse = $('
    ');\r\n containerToUse.appendTo($(containerSelector));\r\n } else {\r\n this.hidePicker();\r\n }\r\n\r\n const repository = new AdStrengthSuggestionRepository({\r\n field,\r\n assetType,\r\n viewModel,\r\n pageContext,\r\n scenario,\r\n });\r\n\r\n const finalUrl = !_.isEmpty(viewModel.model.get('FinalUrls')) ?\r\n _.first(viewModel.model.get('FinalUrls')) : null;\r\n\r\n const inputText = viewModel.model.get(field);\r\n const isAutoComplete = !_.isEmpty(inputText);\r\n\r\n if (isAutoComplete) {\r\n this.activityLogger.signal(`${field}`, `${scenario} auto complete displayed`);\r\n }\r\n return new Promise((resolve) => {\r\n if (isValidUrl(finalUrl) && isAutoComplete && !this.isAutoCompleteSuggestionCached(assetType, finalUrl, inputText)) {\r\n repository.fetchAdStrengthSuggestion(true)\r\n .then(({ data }) => {\r\n this.cachedAutoCompleteSuggestions =\r\n {\r\n ...this.cachedAutoCompleteSuggestions,\r\n [finalUrl]: {\r\n ...this.cachedAutoCompleteSuggestions[finalUrl],\r\n [assetType]: {\r\n ..._.get(this.cachedAutoCompleteSuggestions, [finalUrl, assetType]),\r\n [inputText]: data,\r\n },\r\n },\r\n };\r\n resolve();\r\n });\r\n } else {\r\n // No field value found in the model.\r\n // So we can just read it from the cache which is guranteed by getAdStrengthSuggestionForURL\r\n // which will be called everytime URL is altered.\r\n resolve();\r\n }\r\n })\r\n .then(() => {\r\n this.renderPicker(\r\n target,\r\n field,\r\n viewModel,\r\n assetType,\r\n element,\r\n scenario,\r\n inputText,\r\n finalUrl\r\n );\r\n });\r\n }\r\n\r\n getAdStrengthSuggestionForURL({\r\n view,\r\n viewModel,\r\n scenario,\r\n }) {\r\n const {\r\n pageContext,\r\n } = this;\r\n\r\n const repository = new AdStrengthSuggestionRepository({\r\n viewModel,\r\n pageContext,\r\n scenario,\r\n });\r\n\r\n const finalUrl = _.first(viewModel.model.get('FinalUrls'));\r\n\r\n if (isValidUrl(finalUrl)) {\r\n const creationFetchPromise = (this.isCreationSuggestionCached(finalUrl) ?\r\n Promise.resolve({ data: this.cachedCreationSuggestions[finalUrl] }) :\r\n repository.fetchAdStrengthSuggestion(false)\r\n ).then(({ data }) => {\r\n this.cachedCreationSuggestions[finalUrl] = data;\r\n viewModel.currentSuggestions = data;\r\n // audience campaign -> ad\r\n if (view.isAudienceCampaign) {\r\n if (pageContext.Permissions && !pageContext.Permissions.IsResponsiveAdRecommendationMSANEnabled) {\r\n if (pageContext.Permissions &&\r\n pageContext.Permissions.IsAudienceCampaignMultiMediaAdsEnabled) {\r\n this.autoFillSuggestionsMultipleField({\r\n view, viewModel, finalUrl, scenario,\r\n });\r\n } else {\r\n this.autoFillSuggestionsSingleField({\r\n view, viewModel, finalUrl, scenario,\r\n });\r\n }\r\n }\r\n // search campaign -> multimedia ad\r\n } else if (pageContext.Permissions &&\r\n pageContext.Permissions.IsMMAAutoFillEnabled) {\r\n this.autoFillSuggestionsMultipleField({\r\n view, viewModel, finalUrl, scenario,\r\n });\r\n }\r\n });\r\n const businessFetchPromise = (this.isBusinessCached(finalUrl) ?\r\n Promise.resolve({ data: this.cachedBusiness[finalUrl] }) :\r\n repository.fetchBusinessInfo(false)\r\n ).then(({ data }) => {\r\n this.cachedBusiness[finalUrl] = data;\r\n }).catch((e) => {\r\n this.activityLogger.signal(`${e.responseText}`, 'finalUrl mismatch');\r\n });\r\n return Promise.all([\r\n creationFetchPromise,\r\n businessFetchPromise,\r\n ]);\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { AdStrengthSuggestionController } from './asset-suggestion-picker';\r\n\r\nexport const containerExists = container => (!_.isEmpty(container) && container.length > 0);\r\n\r\nlet controller = null;\r\n\r\n/*\r\n * Attaches focus, input event listeners to ad text fields\r\n */\r\nexport const attachAdStrengthSuggestionHelpers = ({\r\n element,\r\n field,\r\n viewModel,\r\n pageContext,\r\n assetType,\r\n i18n,\r\n activityLogger,\r\n scenario,\r\n}) => {\r\n // add the class so that click in the input will not trigger picker to be hidden\r\n element.$el.addClass('ad-strength-suggestion-helper-area');\r\n\r\n const attachedFunc = (event) => {\r\n if (!event) {\r\n return;\r\n }\r\n const { type, target, key } = event;\r\n\r\n const {\r\n selectionStart, selectionEnd,\r\n } = target || {};\r\n // Ignore if any text is selected, we are only interested in the cursor\r\n if (selectionStart !== selectionEnd) {\r\n return;\r\n }\r\n\r\n // Ignore escape key up since it shouldn't prompt any helper\r\n if (type === 'keyup' && key === 'Escape') {\r\n return;\r\n }\r\n\r\n // Delay creating controller since the container won't be available until view is loaded\r\n if (controller === null) {\r\n controller = new AdStrengthSuggestionController({\r\n containerSelector: 'div.ad-properties-section',\r\n pageContext,\r\n i18n,\r\n activityLogger,\r\n });\r\n }\r\n\r\n controller.getAdStrengthSuggestion({\r\n assetType,\r\n target,\r\n field,\r\n viewModel,\r\n element,\r\n scenario,\r\n });\r\n };\r\n\r\n element.on('input-changed', _.debounce(attachedFunc, 300));\r\n element.on('input-focused', attachedFunc);\r\n};\r\n\r\nexport const attachAdStrengthSuggestionHelperForURL = ({\r\n element,\r\n view,\r\n viewModel,\r\n pageContext,\r\n i18n,\r\n activityLogger,\r\n scenario,\r\n}) => {\r\n // add the class so that click in the input will not trigger picker to be hidden\r\n element.$el.addClass('ad-strength-suggestion-helper-area');\r\n\r\n const onUrlChanged = () => {\r\n // Delay creating controller since the container won't be available until view is loaded\r\n if (controller === null) {\r\n controller = new AdStrengthSuggestionController({\r\n containerSelector: 'div.ad-properties-section',\r\n pageContext,\r\n i18n,\r\n activityLogger,\r\n });\r\n }\r\n\r\n controller.getAdStrengthSuggestionForURL({\r\n view,\r\n viewModel,\r\n scenario,\r\n });\r\n };\r\n\r\n onUrlChanged();\r\n\r\n return onUrlChanged;\r\n};\r\n\r\nexport const clearAdStrengthSuggestionController = () => { controller = null; };\r\n","export const previews = [{\r\n images: [[{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: 'Image191x100',\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 17, SourceWidth: 2400, SourceHeight: 1257,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 2400, SourceHeight: 1257, SourceX: 0, SourceY: 17,\r\n },\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: null,\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 2400, SourceHeight: 1257, SourceX: 0, SourceY: 17,\r\n },\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: {\r\n SourceWidth: 2296, SourceHeight: 1290, SourceX: 52, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 2296, SourceHeight: 1290, SourceX: 52, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', type: null, associationType: 'ImageMedia178X100', width: 2400, height: 1290, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: {\r\n SourceWidth: 1935, SourceHeight: 1290, SourceX: 233, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1935, SourceHeight: 1290, SourceX: 233, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', type: null, associationType: 'ImageMedia15X10', width: 2400, height: 1290, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: {\r\n SourceWidth: 1716, SourceHeight: 1290, SourceX: 342, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1716, SourceHeight: 1290, SourceX: 342, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', type: null, associationType: 'ImageMedia133X100', width: 2400, height: 1290, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 2400,\r\n height: 1290,\r\n cropSettings: {\r\n SourceWidth: 1290, SourceHeight: 1290, SourceX: 555, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1290, SourceHeight: 1290, SourceX: 555, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', idString: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', src: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png', type: null, associationType: 'SquareImageMedia', width: 2400, height: 1290, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }]],\r\n shortHeadline: 'Maps Bing Maps',\r\n longHeadline: 'Make it faster and easier to go from Browsing to doing Things Online.',\r\n description: 'Make it faster and easier to go from Browsing to doing Things Online.',\r\n businessName: 'Bing',\r\n url: 'https://bing.com',\r\n}, {\r\n images: [[{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }]],\r\n shortHeadline: 'Bing Photo Search',\r\n longHeadline: 'Make it faster and easier to go from Browsing to doing the Things you Love.',\r\n description: 'Make it faster and easier to go from Browsing to doing the Things you Love.',\r\n businessName: 'Bing',\r\n url: 'https://bing.com',\r\n}, {\r\n images: [[{\r\n id: '7146826138370',\r\n idString: '7146826138370',\r\n src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2',\r\n type: 'Image191x100',\r\n associationType: 'LandscapeImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n isIncluded: false,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: '7146826138370', idString: '7146826138370', src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2', type: null, associationType: 'LandscapeImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: '7146826138370',\r\n idString: '7146826138370',\r\n src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: false,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: '7146826138370', idString: '7146826138370', src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: '7146826138370',\r\n idString: '7146826138370',\r\n src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: false,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: '7146826138370', idString: '7146826138370', src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: '7146826138370',\r\n idString: '7146826138370',\r\n src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: false,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: '7146826138370', idString: '7146826138370', src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: '7146826138370',\r\n idString: '7146826138370',\r\n src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: false,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: '7146826138370', idString: '7146826138370', src: 'https://www.bing-exp.com/th?id=OADD2.7146826138370_17CZ8MCZKY4MKLZWVI&pid=21.2', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: 'Image191x100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceX: 0, SourceY: 258, SourceWidth: 1080, SourceHeight: 565,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: null,\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 565, SourceX: 0, SourceY: 258,\r\n },\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 607, SourceX: 0, SourceY: 237,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', type: null, associationType: 'ImageMedia178X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 720, SourceX: 0, SourceY: 180,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', type: null, associationType: 'ImageMedia15X10', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 0, SourceY: 134,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', type: null, associationType: 'ImageMedia133X100', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1080,\r\n height: 1080,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 1080, SourceX: 0, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', idString: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', src: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1xZL420knQHMs_-TvANTgp33NWP_XeKZI.jpg', type: null, associationType: 'SquareImageMedia', width: 1080, height: 1080, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: true, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }], [{\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: 'Image191x100',\r\n width: 1920,\r\n height: 812,\r\n cropSettings: {\r\n SourceX: 185, SourceY: 0, SourceWidth: 1551, SourceHeight: 812,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1551, SourceHeight: 812, SourceX: 185, SourceY: 0,\r\n },\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: null,\r\n width: 1920,\r\n height: 812,\r\n cropSettings: null,\r\n effectSettings: null,\r\n baseId: null,\r\n metadata: null,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: true,\r\n originCropSetting: {\r\n SourceWidth: 1551, SourceHeight: 812, SourceX: 185, SourceY: 0,\r\n },\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: 'Image178x100',\r\n associationType: 'ImageMedia178X100',\r\n width: 1920,\r\n height: 812,\r\n cropSettings: {\r\n SourceWidth: 1445, SourceHeight: 812, SourceX: 238, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1445, SourceHeight: 812, SourceX: 238, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', type: null, associationType: 'ImageMedia178X100', width: 1920, height: 812, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: 'Image150x100',\r\n associationType: 'ImageMedia15X10',\r\n width: 1920,\r\n height: 812,\r\n cropSettings: {\r\n SourceWidth: 1218, SourceHeight: 812, SourceX: 351, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1218, SourceHeight: 812, SourceX: 351, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', type: null, associationType: 'ImageMedia15X10', width: 1920, height: 812, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: 'Image133x100',\r\n associationType: 'ImageMedia133X100',\r\n width: 1920,\r\n height: 812,\r\n cropSettings: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 420, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 1080, SourceHeight: 812, SourceX: 420, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', type: null, associationType: 'ImageMedia133X100', width: 1920, height: 812, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }, {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg',\r\n type: 'Image1x1',\r\n associationType: 'SquareImageMedia',\r\n width: 1920,\r\n height: 812,\r\n cropSettings: {\r\n SourceWidth: 812, SourceHeight: 812, SourceX: 554, SourceY: 0,\r\n },\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n originCropSetting: {\r\n SourceWidth: 812, SourceHeight: 812, SourceX: 554, SourceY: 0,\r\n },\r\n isAutoCropping: true,\r\n baseImage: {\r\n id: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', idString: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', src: 'https://blogs.bing.com/BingBlogs/files/b6/b6b1efa2-e24a-447d-8ec2-076a9ba7c4f2.jpg', type: null, associationType: 'SquareImageMedia', width: 1920, height: 812, cropSettings: null, effectSettings: null, baseId: null, metadata: null, isIncluded: false, isLogo: false, isRecommendedImage: false, originCropSetting: null,\r\n },\r\n }]],\r\n shortHeadline: 'Bing Images Search',\r\n longHeadline: 'Turn information into action. Make it faster & easier to go from Browsing to doing Things.',\r\n description: 'Turn information into action. Make it faster & easier to go from Browsing to doing Things.',\r\n businessName: 'Bing',\r\n url: 'https://bing.com',\r\n}];\r\n\r\n\r\nexport const ads = [{\r\n '@odata.type': '#Model.ResponsiveAd',\r\n Text: 'Make it faster and easier to go from Browsing to doing Things Online.',\r\n FinalUrls: ['https://bing.com'],\r\n Headline: 'Maps Bing Maps',\r\n LongHeadline: 'Make it faster and easier to go from Browsing to doing Things Online.',\r\n BusinessName: 'Bing',\r\n Images: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1080, CropWidth: 1080, ImageUrl: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1080, CropWidth: 1080, ImageUrl: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1290, CropWidth: 2400, ImageUrl: 'https://blogs.bing.com/BingBlogs/files/50/50be2ce8-de70-4b33-8aa6-43abf774d114.png',\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n Headlines: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Maps Bing Maps', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n LongHeadlines: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Make it faster and easier to go from Browsing to doing Things Online.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Bing helps you turn information into action, making it faster & easier to go from Browsing', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n Descriptions: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Make it faster and easier to go from Browsing to doing Things Online.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Bing helps you turn information into action, making it faster & easier to go from Browsing', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n}, {\r\n '@odata.type': '#Model.ResponsiveAd',\r\n Text: 'Make it faster and easier to go from Browsing to doing the Things you Love.',\r\n FinalUrls: ['https://bing.com'],\r\n Headline: 'Bing Photo Search',\r\n LongHeadline: 'Make it faster and easier to go from Browsing to doing the Things you Love.',\r\n BusinessName: 'Bing',\r\n Images: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1080, CropWidth: 1080, ImageUrl: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1-HWpcPamxFHV1xYBSKHbKKD-kCAwRAi1.jpg',\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1080, CropWidth: 1080, ImageUrl: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/16KVMOQPeJU2laynni3k-c6CORdmpobSZ.jpg',\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.ImageAsset', Id: 0, Name: null, AssetType: 'Empty', Text: null, TracingId: null, SubType: 'None', IdString: '0', CropX: 0, CropY: 0, CropHeight: 1080, CropWidth: 1080, ImageUrl: 'https://aggsvcstorage.z13.web.core.windows.net/stock-images/1A9HiRm2AhPL6u0sgct0ku6nxDSPoHZhb.jpg',\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n Headlines: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Bing Photo Search', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n LongHeadlines: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Make it faster and easier to go from Browsing to doing the Things you Love.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Turn information into action, making it faster and easier to go from Browsing to doing.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n Descriptions: [{\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Make it faster and easier to go from Browsing to doing the Things you Love.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }, {\r\n Id: '',\r\n PinnedField: 'None',\r\n EditorialStatus: null,\r\n AssociationType: 'None',\r\n UiDisplayStatus: 'Inactive',\r\n PerformanceLabel: null,\r\n RecommendationId: null,\r\n Asset: {\r\n '@odata.type': '#Model.TextAsset', Id: 0, Name: null, AssetType: 'Text', Text: 'Turn information into action, making it faster and easier to go from Browsing to doing.', TracingId: null,\r\n },\r\n PerformanceMetrics: null,\r\n }],\r\n}];\r\n","import _ from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { serverContextStore } from '@bingads-webui-campaign/global-context-store';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { ads } from './test-mock-data/mock';\r\n\r\nexport default class AdRecommendRepository {\r\n constructor(options) {\r\n this.baseURL = `/ODataApi/Campaign/V2${options.baseURL}`;\r\n }\r\n\r\n getRecommendAds(url) {\r\n const query = {\r\n FinalURL: url,\r\n Locale: _.get(serverContextStore, ['state', 'serverContext', 'CurrentLocale'], 'en-US'),\r\n };\r\n\r\n const select = [\r\n 'FinalUrls',\r\n 'BusinessName',\r\n 'Headline',\r\n 'LongHeadline',\r\n 'Text',\r\n 'Model.ResponsiveAd/Images',\r\n 'Model.ResponsiveAd/Headlines',\r\n 'Model.ResponsiveAd/LongHeadlines',\r\n 'Model.ResponsiveAd/Descriptions',\r\n ];\r\n\r\n if (window.e2eTestEnvironment) {\r\n return Promise.resolve({ value: ads });\r\n }\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n return odata.post(\r\n `${this.baseURL}Ads/Default.GetResponsiveAdRecommendation?$select=${select.join(',')}`,\r\n _.extend({ data: query }, { oDataToken: config.get('odata.token') })\r\n );\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport _ from 'underscore';\r\nimport { DefaultButton, Stack } from '@fluentui/react';\r\nimport { AdPlacementCardPreview } from '@bingads-webui-campaign-react/ad-placement-preview';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { IImageExperienceImage } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport AdRecommendRepository from '../utils/ad-recommend-repository';\r\nimport { getRecommendCacheByUrl, setRecommendCache } from './recommend-ad-cache';\r\nimport { IActivityLogger, IRecommendAd, IAdRecommendResponse, ISetUpAdWithRecommendAdParam } from './types';\r\nimport { convertAdUnitsToImageExperiences } from '../utils/ad-recommend-util';\r\n\r\ndeclare let _TL_: any;\r\n\r\ninterface IProps {\r\n url: string;\r\n baseURL: string;\r\n onSaveRecommendAd: () => void;\r\n setUpAdWithRecommendAd: (param: ISetUpAdWithRecommendAdParam) => void;\r\n i18n: any;\r\n i18nErrors: any;\r\n errorCodes: string[];\r\n activityLogger: IActivityLogger;\r\n}\r\n\r\nexport function RecommendAdList(props: IProps) {\r\n const {\r\n url, baseURL, i18n, setUpAdWithRecommendAd, errorCodes, i18nErrors, activityLogger,\r\n } = props;\r\n\r\n const [loaded, setLoaded] = useState(false);\r\n const [creating, setCreating] = useState(false);\r\n const [ads, setAds] = useState([]);\r\n const [imageExperiences, setImageExperiences] = useState([]);\r\n\r\n useEffect(() => {\r\n const fetchRecommendation = async () => {\r\n if (url) {\r\n const repository = new AdRecommendRepository({ baseURL });\r\n\r\n const resultFromCache = getRecommendCacheByUrl(url);\r\n\r\n try {\r\n let res: IAdRecommendResponse;\r\n if (resultFromCache) {\r\n res = resultFromCache;\r\n } else {\r\n res = await repository.getRecommendAds(url);\r\n activityLogger.signal(`fetch ad recommendation. The final URL: ${url}. The Response: ${JSON.stringify(res)}`, 'responsive ad recommendation');\r\n }\r\n setRecommendCache(url, res);\r\n\r\n const result = convertAdUnitsToImageExperiences(res.value, { imageListIndex: 0 });\r\n\r\n setAds(res.value);\r\n setImageExperiences(result);\r\n setLoaded(true);\r\n } catch (error) {\r\n setLoaded(true);\r\n }\r\n }\r\n };\r\n\r\n fetchRecommendation();\r\n }, [activityLogger, baseURL, url]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ AdRecommendationMSANList: 'true' });\r\n activityLogger.signal(`show the recommendation list - recommend-ad-list. The final URL: ${url}.`, 'responsive ad recommendation');\r\n }, [activityLogger, url]);\r\n\r\n async function onEdit(e) {\r\n activityLogger.signal(`Edit - recommend-ad-list. The final URL: ${url}.`, 'responsive ad recommendation');\r\n setCreating(true);\r\n await setUpAdWithRecommendAd({\r\n ad: ads[e.currentTarget.id],\r\n isAdEditShown: true,\r\n shouldSaveAdFromRecommend: false,\r\n });\r\n setCreating(false);\r\n }\r\n\r\n async function onApply(e) {\r\n activityLogger.signal(`Apply - recommend-ad-list. The final URL: ${url}.`, 'responsive ad recommendation');\r\n setCreating(true);\r\n await setUpAdWithRecommendAd({\r\n ad: ads[e.currentTarget.id],\r\n isAdEditShown: false,\r\n shouldSaveAdFromRecommend: true,\r\n });\r\n setCreating(false);\r\n }\r\n\r\n return imageExperiences.length === 0 ? null : (\r\n
    \r\n \r\n
    {i18n.getString(_TL_('Recommended Ads for this Campaign'))}
    \r\n
    \r\n \r\n {imageExperiences.map((item, index) => {\r\n const {\r\n Headline,\r\n LongHeadline,\r\n Text,\r\n BusinessName,\r\n } = ads[index];\r\n const { aspectRatio, imagePreviewHeight } = constants.aspectRatios.Image191x100;\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 {errorCodes.map((errorCode: string) => (\r\n
    \r\n {i18nErrors.getString(`API_ErrorNumber_${errorCode}`) || i18nErrors.getString('ErrorNumber_-1')}\r\n
    \r\n ))}\r\n
    \r\n \r\n
    \r\n );\r\n}\r\n","\r\nimport _ from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo } from 'react';\r\nimport {\r\n UAPPlacementTypeAlias as EPT,\r\n useImageExperienceAdPreviewModel,\r\n UnstyledAdPreviewCarouselLayout as AdPreviewCarouselLayout,\r\n} from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\nimport { IImageExperienceImage } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\nimport { IRecommendAd } from './types';\r\n\r\nconst adPreviewConfig = [{\r\n placementSetName: 'RecommandAd',\r\n placementTypes: [EPT.MSAN.MSEdgeSingleCarousel],\r\n}];\r\n\r\nconst adPreviewConfigMMAV2 = [{\r\n placementSetName: 'RecommandAD-MMAV2',\r\n placementTypes: [EPT.MSANV2.MSNCarousel],\r\n}];\r\n\r\ninterface IRecommendAdPreviewCarouselProps {\r\n isMMAV2Enabled: boolean;\r\n imageList: IImageExperienceImage[];\r\n ads: IRecommendAd[];\r\n url: string;\r\n activeIndex: number;\r\n setActiveIndex: (index: number) => void;\r\n i18n: any;\r\n}\r\n\r\nexport const RecommandAdPreviewCarousel = ({\r\n isMMAV2Enabled,\r\n imageList,\r\n ads,\r\n url,\r\n activeIndex,\r\n setActiveIndex,\r\n i18n,\r\n}: IRecommendAdPreviewCarouselProps) => {\r\n const {\r\n onUpdateImageExperienceImageList,\r\n multiImagePlacementSets: placementSets,\r\n } = useImageExperienceAdPreviewModel(isMMAV2Enabled ? adPreviewConfigMMAV2 : adPreviewConfig);\r\n\r\n useEffect(() => {\r\n // transform imageList to 2-dimensional array, the 1st dimension is image,\r\n // and the 2nd dimension is placement\r\n const finalImageList = _.map(imageList, image => ([image]));\r\n onUpdateImageExperienceImageList(finalImageList);\r\n }, [imageList, onUpdateImageExperienceImageList]);\r\n\r\n const curPlacementList = useMemo(() => {\r\n const { placementList } = _.first(placementSets) || {};\r\n // each placement has multiple images, and for this case,\r\n // make each image in a placement as a separated placement\r\n const finalPlacementList = [];\r\n _.forEach(placementList, ({ images, ...rest }) => {\r\n _.forEach(images, (image) => {\r\n finalPlacementList.push({ ...rest, ...image });\r\n });\r\n });\r\n return finalPlacementList;\r\n }, [placementSets]);\r\n\r\n const onRenderPlacement = useCallback((placement, AdPlacementComponent, idx) => {\r\n const {\r\n LongHeadline, Headline, Text, BusinessName,\r\n } = ads[idx] || {};\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }, [ads, i18n, url]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { DefaultButton, PrimaryButton, Stack } from '@fluentui/react';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { IImageExperienceImage } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\nimport { IRecommendAd, IActivityLogger, ISetUpAdWithRecommendAdParam } from './types';\r\nimport './style.less';\r\nimport { RecommandAdPreviewCarousel } from './recommend-ad-preview-carousel';\r\n\r\ndeclare let _TL_;\r\n\r\ninterface RecommendAdCarouselProps {\r\n i18n: any;\r\n url: string;\r\n toggleOpen: (val: boolean) => void;\r\n setUpAdWithRecommendAd: (param: ISetUpAdWithRecommendAdParam) => void;\r\n ads: IRecommendAd[];\r\n imageExperiences: IImageExperienceImage[];\r\n isMMAV2Enabled: boolean;\r\n activityLogger: IActivityLogger;\r\n}\r\n\r\ninterface RecommendAdCarouselState {\r\n selectedIndex: number;\r\n creating: boolean;\r\n errorMessage: string;\r\n}\r\n\r\nexport class RecommendAdCarousel extends\r\n React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedIndex: 0,\r\n errorMessage: '',\r\n creating: false,\r\n };\r\n }\r\n\r\n render() {\r\n const {\r\n url, i18n, toggleOpen, setUpAdWithRecommendAd, imageExperiences, ads, isMMAV2Enabled,\r\n } = this.props;\r\n\r\n const {\r\n selectedIndex,\r\n errorMessage,\r\n creating,\r\n } = this.state;\r\n\r\n return (\r\n \r\n
    \r\n

    {i18n.getString(_TL_('Ad Recommendation Preview'))}

    \r\n this.setState({ selectedIndex: idx })}\r\n isMMAV2Enabled={isMMAV2Enabled}\r\n imageList={imageExperiences}\r\n ads={ads}\r\n url={url}\r\n i18n={i18n}\r\n />\r\n
    \r\n \r\n {\r\n this.props.activityLogger.signal(`create this ad - recommend-ad-carusel. The final URL: ${url}.`, 'responsive ad recommendation');\r\n this.setState({\r\n creating: true,\r\n });\r\n try {\r\n await setUpAdWithRecommendAd({\r\n ad: ads[selectedIndex],\r\n isAdEditShown: true,\r\n shouldSaveAdFromRecommend: false,\r\n });\r\n toggleOpen(false);\r\n } catch (error) {\r\n this.setState({\r\n errorMessage: i18n.getString(_TL_('Failed to create this ad.')),\r\n });\r\n } finally {\r\n this.setState({\r\n creating: false,\r\n });\r\n }\r\n }}\r\n text={i18n.getString(_TL_('Create this ad'))}\r\n />\r\n {\r\n this.props.activityLogger.signal(`cancel - recommend-ad-carusel. The final URL: ${url}.`, 'responsive ad recommendation');\r\n toggleOpen(false);\r\n }}\r\n text={i18n.getString(_TL_('Cancel'))}\r\n />\r\n
    {errorMessage}
    \r\n
    \r\n
    \r\n
    \r\n\r\n );\r\n }\r\n}\r\n","export interface ICropSettings {\r\n SourceX: number,\r\n SourceY: number,\r\n SourceWidth: number,\r\n SourceHeight: number\r\n}\r\n\r\n\r\nexport interface IAssetPayload {\r\n id: number;\r\n idString: string;\r\n subType: string;\r\n cropX?: number;\r\n cropY?: number;\r\n cropWidth?: number;\r\n cropHeight?: number;\r\n}\r\n\r\nexport enum AssociationType {\r\n Image191x100 = 'Image191x100',\r\n Image178x100 = 'Image178x100',\r\n Image172x100 = 'Image172x100',\r\n Image169x100 = 'Image169x100',\r\n Image155x100 = 'Image155x100',\r\n Image150x100 = 'Image150x100',\r\n Image133x100 = 'Image133x100',\r\n Image1x1 = 'Image1x1',\r\n Image93x100 = 'Image93x100',\r\n OriginalImage = 'OriginalImage',\r\n}\r\n\r\nexport interface IImageExperienceImage {\r\n setIncluded(val: boolean): void;\r\n isMaunalCropped(): boolean;\r\n isManualEdited(val: boolean): boolean;\r\n setCropSettings(cropSettings: ICropSettings): void;\r\n formatToSave(isMultimediaAd?: boolean, isVideoThumbnail?: boolean, overrideInfo?: any, isMMAV2Enabled?: boolean): IAssetPayload;\r\n copyEffectsFromOther(another: IImageExperienceImage): void;\r\n setType(AssociationType): void;\r\n isLogo: boolean;\r\n IsIncluded: boolean;\r\n isAutoCropping: boolean;\r\n Type: AssociationType;\r\n Id: string;\r\n IdString: string;\r\n isVirtual?: boolean;\r\n Width: number;\r\n Height: number;\r\n FinalSrc: string;\r\n CropSettings?: ICropSettings;\r\n BaseId?: number;\r\n associationType: string;\r\n}\r\n\r\nexport interface IImageAssetUpdate {\r\n id: number;\r\n}\r\n\r\nexport interface IImageExperienceImageWithUpdate {\r\n finalIdString: string;\r\n image: IImageExperienceImage;\r\n}\r\n\r\nexport interface IImageInfo {\r\n url: string,\r\n width: number,\r\n height: number,\r\n baseId: string,\r\n metadata: string,\r\n sourceType: string;\r\n isRecommendedImage: boolean;\r\n originalUrl: string;\r\n cropSettingOnOriginal: ICropSettings,\r\n placementSettings: Array,\r\n originalWidth: number,\r\n originalHeight: number,\r\n\r\n}\r\n\r\nexport interface IImageMapUrl {\r\n [key: string]: IImageInfo,\r\n}\r\n\r\nexport interface IMTAsset {\r\n Id: string,\r\n SubType: string,\r\n CropX: number,\r\n CropY: number,\r\n CropWidth: number,\r\n CropHeight: number,\r\n IdString: string,\r\n ImageUrl: string;\r\n Height: number;\r\n Width: number;\r\n}\r\n\r\ninterface ITextAsset {\r\n Asset: {\r\n Text: string;\r\n AssetType: string;\r\n }\r\n}\r\n\r\nexport interface IImageAsset {\r\n Asset: IMTAsset;\r\n}\r\n\r\nexport interface IRecommendAd {\r\n FinalUrls: string[];\r\n Text: string;\r\n Headline: string;\r\n LongHeadline: string;\r\n BusinessName: string;\r\n Headlines: ITextAsset[];\r\n Descriptions: ITextAsset[];\r\n LongHeadlines: ITextAsset[];\r\n Images: IImageAsset[];\r\n}\r\n\r\nexport interface IAdRecommendResponse {\r\n value: IRecommendAd[];\r\n}\r\n\r\nexport interface IActivityLogger{\r\n signal: (args0: string, args1: string) => void;\r\n}\r\n\r\nexport interface ISetUpAdWithRecommendAdParam {\r\n ad: IRecommendAd,\r\n isAdEditShown?: boolean,\r\n shouldSaveAdFromRecommend: boolean,\r\n}\r\n\r\nexport interface ResponsiveAdForPreview {\r\n images: IImageExperienceImage[][],\r\n shortHeadline: string;\r\n longHeadline: string;\r\n description: string;\r\n businessName: string;\r\n url: string;\r\n}\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport { isValidUrl } from '@bingads-webui/url-util';\r\nimport { Modal, Stack, Spinner, SpinnerSize, ISpinnerStyles } from '@fluentui/react';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { IImageExperienceImage } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport { RecommendAdCarousel } from './recommend-ad-carousel';\r\nimport AdRecommendRepository from '../utils/ad-recommend-repository';\r\nimport { IActivityLogger, IRecommendAd, IAdRecommendResponse, ISetUpAdWithRecommendAdParam } from './types';\r\nimport { getRecommendCacheByUrl, setRecommendCache } from './recommend-ad-cache';\r\nimport { convertAdUnitsToImageExperiences } from '../utils/ad-recommend-util';\r\n\r\nimport './style.less';\r\n\r\ndeclare let _TL_;\r\n\r\ninterface RecommendButtonProps {\r\n model: any;\r\n i18n: any;\r\n baseURL: string;\r\n setUpAdWithRecommendAd: (param: ISetUpAdWithRecommendAdParam) => void;\r\n activityLogger: IActivityLogger;\r\n shouldOverrideAdInEditor: boolean;\r\n isMMAV2Enabled: boolean;\r\n}\r\n\r\ninterface IState {\r\n isOpen: boolean;\r\n url: string;\r\n loaded: boolean;\r\n ads: IRecommendAd[];\r\n imageExperiences: IImageExperienceImage[];\r\n}\r\n\r\nexport class RecommendButton extends React.Component {\r\n constructor(props: RecommendButtonProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isOpen: false,\r\n loaded: false,\r\n ads: [],\r\n imageExperiences: [],\r\n url: _.first(_.result(props.model.attributes, 'FinalUrls')),\r\n };\r\n }\r\n\r\n componentDidMount(): void {\r\n this.fetchRecommendation();\r\n }\r\n\r\n startToLoad = (url: string) => {\r\n if (url === this.state.url) {\r\n return;\r\n }\r\n this.setState({\r\n url,\r\n loaded: false,\r\n }, () => {\r\n this.fetchRecommendation();\r\n });\r\n };\r\n\r\n cleanData = () => {\r\n this.setState({\r\n ads: [],\r\n loaded: true,\r\n });\r\n };\r\n\r\n toggleOpen = (val: boolean) => {\r\n this.setState({\r\n isOpen: val,\r\n });\r\n };\r\n\r\n isRecommendAdinEditor = (res) => {\r\n const { model }= this.props;\r\n return _.any(res.value, item =>\r\n model.get('Headline0') === item.Headline &&\r\n model.get('Description0') === item.Text &&\r\n model.get('LongHeadline0') === item.LongHeadline &&\r\n model.get('Path1') === item.Path1 &&\r\n model.get('FinalUrls') === item.FinalUrls);\r\n };\r\n\r\n fetchRecommendation = async () => {\r\n const { baseURL } = this.props;\r\n const { url } = this.state;\r\n const repository = new AdRecommendRepository({ baseURL });\r\n\r\n if (isValidUrl(url)) {\r\n try {\r\n const resultFromCache = getRecommendCacheByUrl(url);\r\n let res: IAdRecommendResponse;\r\n if (resultFromCache) {\r\n res = resultFromCache;\r\n } else {\r\n res = await repository.getRecommendAds(url);\r\n this.props.activityLogger.signal(`fetch ad recommendation. The final URL: ${url}. The Response: ${JSON.stringify(res)}`, 'responsive ad recommendation');\r\n this.props.activityLogger.signal(`show recommendation button - recommend ad button. The final URL: ${url}.`, 'responsive ad recommendation');\r\n setRecommendCache(url, res);\r\n }\r\n // ad recommend preview for V2 image aspect ratio is 1.69, for V1 is 1.78\r\n const index = this.props.isMMAV2Enabled ? 4 : 1;\r\n const result = convertAdUnitsToImageExperiences(res.value, { imageListIndex: index }, this.props.isMMAV2Enabled);\r\n\r\n try {\r\n if (!_.isEmpty(res.value) && !this.isRecommendAdinEditor(res) && this.props.shouldOverrideAdInEditor) {\r\n await this.props.setUpAdWithRecommendAd({\r\n ad: res.value[0],\r\n shouldSaveAdFromRecommend: false,\r\n });\r\n }\r\n this.props.activityLogger.signal(`recommendation prefill sucessfully, The final URL: ${url}.`, 'responsive ad recommendation');\r\n setClarityTag({ AdRecommendPrefill: 'true' });\r\n } finally {\r\n this.setState({\r\n ads: res.value,\r\n loaded: true,\r\n imageExperiences: result,\r\n });\r\n }\r\n } catch (error) {\r\n this.setState({\r\n loaded: true,\r\n });\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n i18n, setUpAdWithRecommendAd,\r\n } = this.props;\r\n\r\n const {\r\n isOpen, loaded, url, ads, imageExperiences,\r\n } = this.state;\r\n\r\n if (!isValidUrl(url)) {\r\n return null;\r\n }\r\n\r\n if (!loaded) {\r\n const spinnerStyles: ISpinnerStyles = { label: { color: 'black' } };\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n\r\n return ads.length === 0 ? null : (\r\n
    \r\n {\r\n this.toggleOpen(true);\r\n this.props.activityLogger.signal(`view recommendations - recommend ad button. The final URL: ${url}.`, 'responsive ad recommendation');\r\n setClarityTag({ AdRecommendationMSANModal: 'true' });\r\n },\r\n }}\r\n message={i18n.getString(_TL_('Ads recommended based on the Final URL.'))}\r\n level=\"Info\"\r\n icon={(
    )}\r\n dismissible={false}\r\n />\r\n this.toggleOpen(false)}\r\n isBlocking={false}\r\n >\r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\n\r\nexport function urlChangeForRecommendationAd(\r\n element,\r\n reactComponentRef: React.RefObject\r\n) {\r\n const onUrlFocusout = (url: string) => {\r\n reactComponentRef.current && reactComponentRef.current.startToLoad(url);\r\n };\r\n\r\n const onUrlChanged = () => {\r\n reactComponentRef.current && reactComponentRef.current.cleanData();\r\n };\r\n\r\n element.on('urlChanged', onUrlChanged);\r\n element.on('urlFocusout', onUrlFocusout);\r\n}\r\n","import React, { forwardRef, useImperativeHandle } from 'react';\r\nimport { isString, size } from 'underscore';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\n\r\n// eslint-disable-next-line no-underscore-dangle\r\ndeclare let _TL_: any;\r\n\r\ninterface CallToActionTextProps {\r\n i18n: any;\r\n defaultValue: string;\r\n}\r\n\r\nexport const CallToActionText: React.FC = forwardRef(({ i18n, defaultValue = '' }: CallToActionTextProps, ref) => {\r\n const textFieldRef = React.useRef(null); // Create a ref for the TextField\r\n const [errorMessage, setErrorMessage] = React.useState('');\r\n const { maxLength }= ResponsiveAd.properties.CallToActionText;\r\n\r\n useImperativeHandle(ref, () => ({\r\n getData: (): string => textFieldRef.current.value.trim(),\r\n isValid: () => {\r\n const value = textFieldRef.current.value.trim();\r\n return isString(value) && size(value) > 0 && size(value) <= maxLength;\r\n },\r\n }));\r\n\r\n const handleChange = (event, [newValue]) => {\r\n const value = newValue.trim();\r\n setErrorMessage(size(value) === 0 ? i18n.getString(_TL_('Required field')) : '');\r\n };\r\n\r\n return (\r\n \r\n );\r\n});\r\n\r\n","import Backbone from 'backbone';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport ko from 'knockout';\r\nimport { BackboneSchema as backboneSchema } from '@bingads-webui/backbone-schema';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { InputControl } from '@bingads-webui/input-control';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { AudienceCampaignErrorsView, ImpressionTrackingUrlOptions } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport {\r\n ThirdPartyMeasurementBackboneView,\r\n getVerifiedTrackingSettingWrite,\r\n getVerifiedTrackingSettingsRead\r\n} from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { RemainingCharsHint } from '@bingads-webui/remaining-chars-hint';\r\nimport { attachAdCustomizersHelpers, evaluateAdCustomizers } from '@bingads-webui-campaign/ad-customizers';\r\nimport { HotspotPanel, BoostAnchors } from '@bingads-webui-campaign-react/responsive-ad-editor-components';\r\nimport {\r\n attachAIGenAssetContextualAttribute,\r\n} from '@bingads-webui-campaign/responsive-search-ad-strength';\r\nimport { CallToActionAriaText } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\n\r\nimport template from './template.pug';\r\nimport editorHeadlineDescriptionOnlyTemplate from './editorHeadlineDescriptionOnly.pug';\r\nimport { MMAAssetConfigs, ResponsiveAdConfigs } from '../config';\r\nimport { attachAdStrengthSuggestionHelpers, clearAdStrengthSuggestionController, attachAdStrengthSuggestionHelperForURL } from '../asset-suggestion/asset-suggestion-helper';\r\nimport { headlineFields, longHeadlineFields, descriptionFields, ResponsiveAdScenarios, assetSuggestionType } from '../constants';\r\nimport { RecommendButton, urlChangeForRecommendationAd } from '../ad-recommend';\r\nimport { CallToActionText } from '../call-to-action-text/index.tsx';\r\nimport { getJobResults } from '../mma-creation-rsa/repository';\r\n\r\nconst CallToAction = ['Default', 'NoButton', 'ApplyNow', 'BookNow', 'ContactUs', 'Download', 'GetQuote', 'Install', 'LearnMore', 'SeeMore', 'ShopNow', 'SignUp', 'Subscribe', 'VisitSite', 'AddToCart', 'BookTravel', 'Buy', 'BuyNow', 'OpenLink', 'OrderNow', 'RegisterNow'];\r\n\r\n/**\r\n * AdEdit class that extends {Backbone.View} class\r\n * The class defines the section for ad creation.\r\n *\r\n * @class AdEdit\r\n * @extends {Backbone.View}\r\n */\r\nexport class AdEdit extends Backbone.View {\r\n get events() {\r\n return {\r\n 'click .save-ad-button': 'saveAdAsync',\r\n 'click .ad-mma-add-headline': 'addHeadline',\r\n 'click .ad-mma-add-long-headline': 'addLoneHeadline',\r\n 'click .ad-mma-add-description': 'addDescription',\r\n 'click .expand-cta-options': 'expandCTA',\r\n 'click .expand-boost-anchors-options': 'toggleBoostAnchors',\r\n 'click .headline-delete': 'removeHeadline',\r\n 'click .long-headline-delete': 'removeLongHeadline',\r\n 'click .description-delete': 'removeDescription',\r\n 'focusout .final-url input.form-control.url-field': 'finalURLChange',\r\n 'keyup .final-url input.form-control.url-value': 'finalURLChange',\r\n 'change .option-select': 'adStatusChange',\r\n 'click .errorCountLink': 'toggleErrorGrid',\r\n 'click #runInBackground': 'hideProgress',\r\n };\r\n }\r\n\r\n /**\r\n * Initialize the ad image manager.\r\n *\r\n * @param {object} options - options, further defined bellow.\r\n *\r\n * @param {object} options.viewContext - viewContext object in order to get the campaign and ad\r\n * group ids.\r\n *\r\n * @param {object} options.ad - ad to be edited.\r\n *\r\n * @param {boolean} options.isUpdate - determines if the ad creation editor should create a new ad\r\n * or update existing one.\r\n *\r\n * @param {boolean} options.isGridDisplay - determine if the save button needs to be shown or not.\r\n *\r\n * @returns {undefined} no return value\r\n *\r\n */\r\n initialize(options = {}) {\r\n this.isForVNext = options.isForVNext || false;\r\n this.isUpdate = this.isAdNotEmpty(options.ad) && (options.ad.isSaved !== false);\r\n this.campaignSettings = options.campaignSettings;\r\n this.ad = _.omit(options.ad, v => (typeof v !== 'number' && (this.isEmpty(v) || v[0] == null)));\r\n this.showSaveButton = options.isGridDisplay || false;\r\n this.logScenario = options.logScenario;\r\n this.baseURL = options.baseURL;\r\n this.isSimplifyAudienceCreation = options.isSimplifyAudienceCreation;\r\n this.isAdRecommendationMSANEnabled = options.isAdRecommendationMSANEnabled;\r\n this.newI18n = options.newI18n;\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n this.config = DependencyResolver.get('component/config/index');\r\n this.permissions = this.config.get('Permissions') || {};\r\n this.odata = DependencyResolver.get('component/http/channel/odata');\r\n this.recommendButtonReactComponent = React.createRef();\r\n this.hotspotReactComponent = React.createRef();\r\n this.boostAnchorsReactComponent = React.createRef();\r\n this.callToActionTextComponent = React.createRef();\r\n this.callToActionAriaTextComponent = React.createRef();\r\n this.instrumentation = options.instrumentation;\r\n this.scenario = options.scenario;\r\n this.edm = options.edm;\r\n this.jsdata = options.jsdata;\r\n this.isVideo = options.isVideo;\r\n this.isMobileUrlEnabled = options.isMobileUrlEnabled == null ?\r\n true : options.isMobileUrlEnabled;\r\n this.viewContext = options.viewContext;\r\n this.pageContext = options.pageContext;\r\n this.isImpressionTrackingUrlsEnabled =\r\n (this.viewContext &&\r\n (_.result(this.viewContext.currentCampaign, 'CampaignType') === 1 ||\r\n _.result(this.viewContext.currentCampaign, 'CampaignType') === 'Default')) ||\r\n options.isImpressionTrackingUrlsEnabled == null ?\r\n false : options.isImpressionTrackingUrlsEnabled;\r\n\r\n this.biddingSchemeType = this.getBiddingSchemeType(options);\r\n this.isThirdPartyMeasurementEnabled =\r\n (_.result(this.viewContext.currentCampaign, 'CampaignType') === 'Audience' ||\r\n _.result(this.viewContext.currentCampaign, 'CampaignType') === 8) &&\r\n (_.result(this.viewContext.currentCampaign, 'CampaignSubType') === 'AudienceStatic' ||\r\n _.result(this.viewContext.currentCampaign, 'CampaignSubType') === 0);\r\n this.isMOATEnabled = _.get(this.permissions, 'IsMOATEnabled', false);\r\n\r\n this.ImpressionTrackingUrlsMaxCount =\r\n this.permissions.IsUpToSixImpressionTrackingUrlsEnabled ? 6 : 2;\r\n\r\n this.isAudienceCampaign = options.isAudienceCampaign;\r\n this.isMSANLogoAndCTAForMMAEnabled = options.isMSANLogoAndCTAForMMAEnabled;\r\n this.isMultimediaAd = options.isMultimediaAd;\r\n this.isBulkEditMMA = options.isBulkEditMMA;\r\n\r\n this.isMultiMediaAdsPhase2Enabled =\r\n this.isMultimediaAd && this.permissions.IsMultiMediaAdsPhase2Enabled;\r\n this.isMMAAutomatedCTAOptInEnabled =\r\n this.isMultimediaAd && this.permissions.IsMMAAutomatedCTAOptInEnabled;\r\n this.callToActionSetting = this.campaignSettings && _.find(this.campaignSettings, setting => setting['@odata.type'] === '#Model.CallToActionSetting');\r\n this.automatedCTAEnable = !this.callToActionSetting || !this.callToActionSetting.AutomatedCallToActionOptOut;\r\n\r\n this.isAudienceCampaignMultiMediaAdsEnabled =\r\n this.permissions.IsAudienceCampaignMultiMediaAdsEnabled &&\r\n (_.result(this.viewContext.currentCampaign, 'CampaignType') === 'Audience' ||\r\n _.result(this.viewContext.currentCampaign, 'CampaignType') === 8) &&\r\n !options.isVideo;\r\n\r\n this.isBoostScenario = this.isAudienceCampaign && this.permissions.IsAmplifyEnabled;\r\n this.isBoostCTAAriaTextEnabled = this.isBoostScenario && this.permissions.IsBoostCTAAriaTextEnabled;\r\n this.isBoostAnchorsEnabled = this.isBoostScenario && this.permissions.IsBoostAnchorEnabled;\r\n this.isBoostCustomCTAEnabled = this.permissions.IsBoostCustomCTAEnabled;\r\n\r\n this.isMMAAdCustomizersEnabled = this.permissions.IsMMACountdownInsertionEnabled ||\r\n this.permissions.IsMMAKeywordInsertionEnabled ||\r\n this.permissions.IsMMALocationInsertionEnabled ||\r\n this.permissions.IsMMAAdCustomizerInsertionEnabled;\r\n\r\n this.IsBoostCTAPhase2Enabled = this.permissions.IsBoostCTAPhase2Enabled;\r\n\r\n this.isMSANBoostEnabled = this.isAudienceCampaign && this.permissions.IsAmplifyEnabled;\r\n this.responsiveAdScenario = ResponsiveAdScenarios.NonMMAResponsive;\r\n\r\n if (this.isMultiMediaAdsPhase2Enabled) {\r\n this.responsiveAdScenario = ResponsiveAdScenarios.MMASearch;\r\n }\r\n\r\n if (this.isAudienceCampaignMultiMediaAdsEnabled) {\r\n this.responsiveAdScenario = ResponsiveAdScenarios.MMAResponsive;\r\n }\r\n\r\n this.responsiveAdScenario = `${this.responsiveAdScenario} | IsMMAAutoFillEnabled: ${this.permissions.IsMMAAutoFillEnabled}`;\r\n\r\n this.isMMAEnabled =\r\n this.isMultiMediaAdsPhase2Enabled || this.isAudienceCampaignMultiMediaAdsEnabled;\r\n\r\n this.isMoveFinalUrlTop = this.isAudienceCampaignMultiMediaAdsEnabled || this.isMultimediaAd;\r\n\r\n this.activityLogger = options.activityLogger;\r\n this.genericErr = new AudienceCampaignErrorsView();\r\n\r\n if (this.ad.Headlines && typeof (this.ad.Headlines) === 'string') {\r\n this.ad.Headlines = JSON.parse(this.ad.Headlines);\r\n }\r\n if (this.ad.LongHeadlines && typeof (this.ad.LongHeadlines) === 'string') {\r\n this.ad.LongHeadlines = JSON.parse(this.ad.LongHeadlines);\r\n }\r\n if (this.ad.Descriptions && typeof (this.ad.Descriptions) === 'string') {\r\n this.ad.Descriptions = JSON.parse(this.ad.Descriptions);\r\n }\r\n\r\n this.setUpAdWithRecommendAd = options.setUpAdWithRecommendAd;\r\n this.shouldOverrideAdInEditor = options.shouldOverrideAdInEditor;\r\n this.isSimplifyAudienceCreation = options.isSimplifyAudienceCreation;\r\n\r\n this.isMMAV2Enabled = options.isMMAV2Enabled;\r\n\r\n this.initHeadlines = this.ad.Headlines ? this.ad.Headlines.length : 0;\r\n this.initLongHeadlines = this.ad.LongHeadlines ? this.ad.LongHeadlines.length : 0;\r\n this.initDescriptions = this.ad.Descriptions ? this.ad.Descriptions.length : 0;\r\n\r\n this.preferencesService = DependencyResolver.get('component/preference/service/index');\r\n this.websiteImageOptInPreferenceName = options.websiteImageOptInPreferenceName;\r\n this.hasWebsiteImageOptedInObservable = options.hasWebsiteImageOptedInObservable;\r\n this.parsedTextMaxLengthExtension = options.parsedTextMaxLengthExtension;\r\n this.onUpdateHotspots = options.onUpdateHotspots;\r\n this.hotspots = options.hotspots;\r\n this.boostAnchorData = _.first(this.ad.BoostAnchors);\r\n this.callToActionText = this.ad && !_.isEmpty(this.ad.CallToActionText) ? this.ad.CallToActionText : null;\r\n this.callToActionAriaText = this.ad && !_.isEmpty(this.ad.CallToActionAriaText) ? this.ad.CallToActionAriaText : null;\r\n\r\n if (options.isBulkEditMMA) {\r\n this.adStatusOptions = [\r\n {\r\n text: this.i18n.getString('Active'),\r\n value: 'Active',\r\n },\r\n {\r\n text: this.i18n.getString('Paused'),\r\n value: 'Paused',\r\n },\r\n ];\r\n this.onClose = options.onClose;\r\n this.showProgress = ko.observable(false);\r\n this.statusText = ko.observable(this.i18n.getString('BulkEdit_InitialStatus'));\r\n this.successCount = ko.observable(0);\r\n this.errorCount = ko.observable(0);\r\n this.totalCount = ko.observable(0);\r\n this.adStatus = ko.observable('Active');\r\n this.completePercentage = ko.computed(() => {\r\n const total = this.totalCount();\r\n if (total === 0) {\r\n return '1%';\r\n }\r\n\r\n const success = this.successCount();\r\n const error = this.errorCount();\r\n const completed = Math.floor(((success + error) * 100) / total);\r\n return completed < 1 ? `${completed + 1}%` : `${completed}%`;\r\n });\r\n // Error related properties\r\n this.maxInlineErrorCount = 100;\r\n this.showErrors = ko.observable(false);\r\n this.showErrorGrid = ko.observable(false);\r\n this.errorCountString = ko.computed(() => this.i18n.getString('BulkEdit_InlineError_ErrorCount').replace('{0}', this.errorCount()));\r\n this.initInlineErrors = ko.observable([]);\r\n this.inlineErrors = ko.computed({\r\n read() {\r\n return this.initInlineErrors();\r\n },\r\n write(value) {\r\n /* istanbul ignore next */\r\n if (value.Status === 'CompletedWithErrors') {\r\n // due to the repository is js can not build success in demo\r\n getJobResults(value.Id, 'errors', 0, this.maxInlineErrorCount, 'Ad', this.odata)\r\n .done((response) => {\r\n if (response && response.value) {\r\n const err = response.value.map((errorObject) => {\r\n const errorKey = errorObject.Errors[0];\r\n const entityName = errorObject.EntityKey[0].Value;\r\n\r\n return {\r\n error: this.i18n.getString(`Error_Campaign_API_${errorKey}`),\r\n name: entityName,\r\n };\r\n });\r\n\r\n this.initInlineErrors(err);\r\n }\r\n this.viewModel.showProgress(false);\r\n this.viewModel.showErrors(true);\r\n });\r\n }\r\n },\r\n }, this);\r\n this.errorCountLinkText = ko.computed(() => {\r\n if (this.showErrorGrid()) {\r\n return this.i18n.getString('BulkEdit_InlineError_HideErrorLink');\r\n }\r\n return this.i18n.getString('BulkEdit_InlineError_ErrorLink').replace('{0}', this.errorCount());\r\n }, this);\r\n this.errorsGrids = ko.observable([\r\n this.i18n.getString(_TL_('Ad')),\r\n this.i18n.getString(_TL_('Error')),\r\n ], this);\r\n }\r\n\r\n this.isImproveMMA = options.isImproveMMA;\r\n this.isRecommendation = options.isRecommendation;\r\n\r\n const currentOptInPref =\r\n this.preferencesService.findByNameAtUserLevel(this.websiteImageOptInPreferenceName);\r\n\r\n const shouldCTANotExpand = this.isBoostScenario && !_.get(this.ad, 'CallToActionLanguage');\r\n\r\n this.viewModel = {\r\n maxHeadlines: MMAAssetConfigs.MAX_HEADLINES,\r\n showHeadlineCount: ko.observable(Math.max(\r\n MMAAssetConfigs.DEFAULT_HEADLINES,\r\n this.initHeadlines\r\n )),\r\n headlinesErrorMessage: ko.observable(false),\r\n maxLongHeadlines: MMAAssetConfigs.MAX_LONGHEADLINES,\r\n showLongHeadlineCount: ko.observable(Math.max(\r\n MMAAssetConfigs.DEFAULT_LONGHEADLINES,\r\n this.initLongHeadlines\r\n )),\r\n longHeadlinesErrorMessage: ko.observable(false),\r\n maxDescriptions: MMAAssetConfigs.MAX_DESCRIPTIONS,\r\n showDescriptionCount: ko.observable(Math.max(\r\n MMAAssetConfigs.DEFAULT_DESCRIPTIONS,\r\n this.initDescriptions\r\n )),\r\n maxHeadlineSuggestions: this.isMMAEnabled ?\r\n MMAAssetConfigs.MAX_HEADLINE_SUGGESTIONS :\r\n ResponsiveAdConfigs.MAX_HEADLINE_SUGGESTIONS,\r\n maxDescriptionSuggestions: this.isMMAEnabled ?\r\n MMAAssetConfigs.MAX_DESCRIPTION_SUGGESTIONS :\r\n ResponsiveAdConfigs.MAX_DESCRIPTION_SUGGESTIONS,\r\n currentSuggestions: [],\r\n autoFillHeadlineCount: 2,\r\n autoFillLongHeadlineCount: 1,\r\n autoFillDescriptionCount: 2,\r\n descriptionsErrorMessage: ko.observable(false),\r\n businessNameErrorMessage: ko.observable(false),\r\n isCTAExpanded: ko.observable(!shouldCTANotExpand),\r\n isBoostAnchorsExpanded: ko.observable(this.ad && !_.isEmpty(this.ad.BoostAnchors)),\r\n Language: ko.observable(this.ad && !_.isEmpty(this.ad.CallToActionLanguage) ?\r\n this.ad.CallToActionLanguage : null),\r\n actionLanguageErrorMessage: ko.observable(false),\r\n ActionType: ko.observable(this.ad && !_.isEmpty(this.ad.CallToAction) ?\r\n this.ad.CallToAction : null),\r\n actionTextErrorMessage: ko.observable(false),\r\n urlOptionErrorMessage: ko.observable(false),\r\n adGroupId: Number(this.viewContext.currentAdGroup.Id),\r\n campaignId: Number(this.viewContext.currentCampaign.Id),\r\n showWebsiteImageOptIn: ko.observable(false),\r\n hasWebsiteImageOptIn:\r\n ko.observable(currentOptInPref && currentOptInPref.Data && currentOptInPref.Data.OptIn),\r\n };\r\n if (options.isBulkEditMMA) {\r\n _.extend(this.viewModel, {\r\n showProgress: this.showProgress,\r\n statusText: this.statusText,\r\n completePercentage: this.completePercentage,\r\n adStatusOptions: this.adStatusOptions,\r\n adStatus: this.adStatus,\r\n showErrors: this.showErrors,\r\n showErrorGrid: this.showErrorGrid,\r\n errorCount: this.errorCount,\r\n errorCountString: this.errorCountString,\r\n errorCountLinkText: this.errorCountLinkText,\r\n inlineErrors: this.inlineErrors,\r\n errorsGrids: this.errorsGrids,\r\n maxInlineErrorCount: this.maxInlineErrorCount,\r\n });\r\n }\r\n\r\n this.initializeAdModel();\r\n this.initializeAdContent();\r\n if (this.ad && this.ad.errors) {\r\n this.initializeAdError();\r\n }\r\n\r\n this.viewModel.hasWebsiteImageOptIn.subscribe((newOptInState) => {\r\n this.preferencesService.setAtUserLevel({\r\n Name: this.websiteImageOptInPreferenceName,\r\n Data: { OptIn: newOptInState },\r\n });\r\n this.hasWebsiteImageOptedInObservable(newOptInState);\r\n });\r\n\r\n this.activityLogger.signal(`ad-edit view initialize: ${this.permissions.dynamic && this.permissions.dynamic.MMACopilot}`, 'rae-view deprecation');\r\n }\r\n\r\n clear() {\r\n this.isUpdate = false;\r\n this.ad = null;\r\n this.initializeAdModel();\r\n this.initializeAdContent();\r\n ko.cleanNode(this.el);\r\n this.render();\r\n }\r\n\r\n initializeAdModel() {\r\n const schema = cloneDeep(DependencyResolver.get('$/schema!campaign/ResponsiveAd'));\r\n const fields = [\r\n 'Campaign',\r\n 'AdGroup',\r\n !this.isMMAEnabled && 'Headline',\r\n !this.isMMAEnabled && 'LongHeadline',\r\n 'BusinessName',\r\n !this.isMMAEnabled && 'Text',\r\n 'FinalUrls',\r\n this.isMobileUrlEnabled && 'MobileFinalUrls',\r\n 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix',\r\n 'UrlCustomParameters',\r\n 'CallToAction',\r\n (this.isMultiMediaAdsPhase2Enabled || this.isBoostScenario || this.isMSANLogoAndCTAForMMAEnabled) && 'CallToActionLanguage',\r\n 'Images',\r\n this.isImpressionTrackingUrlsEnabled && 'ImpressionTrackingUrls',\r\n this.isThirdPartyMeasurementEnabled && 'VerifiedTrackingData',\r\n ];\r\n\r\n // Temporary override of the maxLength. Once everything is ready, schema itself will be updated\r\n schema.properties.Headline.maxLength = 30;\r\n\r\n if (this.isMMAEnabled) {\r\n this.headlineFields = headlineFields;\r\n _.each(this.headlineFields, (key) => {\r\n schema.properties[key] = _.clone(schema.properties.Headline);\r\n });\r\n fields.push(this.headlineFields);\r\n\r\n if (this.ad) {\r\n if (this.initHeadlines === 0) {\r\n // create before phase2, fill Headline to Headline0\r\n this.ad.Headline0 = this.ad.Headline;\r\n } else {\r\n _.each(_.get(this.ad, ['Headlines'], []), (val, idx) => {\r\n this.ad[this.headlineFields[idx]] = _.isEmpty(val.Asset) ? val.Text : val.Asset.Text;\r\n });\r\n }\r\n }\r\n\r\n this.longHeadlineFields = longHeadlineFields;\r\n _.each(this.longHeadlineFields, (key) => {\r\n schema.properties[key] = _.clone(schema.properties.LongHeadline);\r\n });\r\n fields.push(this.longHeadlineFields);\r\n\r\n if (this.ad) {\r\n if (this.initLongHeadlines === 0) {\r\n // create before phase2, fill LongHeadline to LongHeadline0\r\n this.ad.LongHeadline0 = this.ad.LongHeadline;\r\n } else {\r\n _.each(_.get(this.ad, ['LongHeadlines'], []), (val, idx) => {\r\n this.ad[this.longHeadlineFields[idx]] = _.isEmpty(val.Asset) ?\r\n val.Text : val.Asset.Text;\r\n });\r\n }\r\n }\r\n\r\n this.descriptionFields = descriptionFields;\r\n _.each(this.descriptionFields, (key) => {\r\n schema.properties[key] = _.clone(schema.properties.Text);\r\n });\r\n fields.push(this.descriptionFields);\r\n\r\n if (this.ad) {\r\n if (this.initDescriptions === 0) {\r\n // create before phase2, fill Text to Description0\r\n this.ad.Description0 = this.ad.Text;\r\n } else {\r\n _.each(_.get(this.ad, ['Descriptions'], []), (val, idx) => {\r\n this.ad[this.descriptionFields[idx]] = _.isEmpty(val.Asset) ? val.Text : val.Asset.Text;\r\n });\r\n }\r\n }\r\n if (this.isBulkEditMMA) {\r\n fields.push('AdStatus');\r\n }\r\n }\r\n\r\n // For Boost only, we got updated CallToActionLanguage to support\r\n if (this.isBoostScenario) {\r\n if (this.IsBoostCTAPhase2Enabled) {\r\n if (_.result(schema, ['properties', 'CallToActionLanguage'])) {\r\n schema.properties.CallToActionLanguage.enum = _.union(\r\n schema.properties.CallToActionLanguage.enum,\r\n [\r\n 'Albanian',\r\n 'Catalan',\r\n 'Gaelic',\r\n 'Hindi',\r\n 'Indonesian',\r\n 'Korean',\r\n 'Thai',\r\n 'Ukrainian',\r\n 'Vietnamese',\r\n 'Afrikaans',\r\n 'Amharic',\r\n 'Armenian',\r\n 'Assamese',\r\n 'Azerbaijani',\r\n 'Basque',\r\n 'Bengali',\r\n 'Cambodian',\r\n 'Galician',\r\n 'Georgian',\r\n 'Gujarati',\r\n 'Kannada',\r\n 'Kazakh',\r\n 'Laotian',\r\n 'Malay',\r\n 'Malayalam',\r\n 'Maori',\r\n 'Marathi',\r\n 'Nepali',\r\n 'Oriya',\r\n 'Persian',\r\n 'Punjabi',\r\n 'Quechua',\r\n 'Tamil',\r\n 'Telugu',\r\n 'Urdu',\r\n 'Uzbek',\r\n 'Welsh',\r\n ]\r\n );\r\n }\r\n } else if (_.result(schema, ['properties', 'CallToActionLanguage'])) {\r\n schema.properties.CallToActionLanguage.enum = _.union(\r\n schema.properties.CallToActionLanguage.enum,\r\n [\r\n 'Albanian',\r\n 'Catalan',\r\n 'Gaelic',\r\n 'Hindi',\r\n 'Indonesian',\r\n 'Korean',\r\n 'Thai',\r\n 'Ukrainian',\r\n 'Vietnamese',\r\n ]\r\n );\r\n }\r\n }\r\n\r\n const SchemaModel = backboneSchema(\r\n schema,\r\n this.newI18n || this.i18n,\r\n _.flatten(_.compact(fields)),\r\n this.ad\r\n );\r\n\r\n this.model = new SchemaModel();\r\n this.model.set({\r\n CallToAction: this.ad && !_.isEmpty(this.ad.CallToAction) ? this.ad.CallToAction : 'Default',\r\n });\r\n\r\n if (this.isMultiMediaAdsPhase2Enabled || this.isBoostScenario || this.isMSANLogoAndCTAForMMAEnabled) {\r\n this.model.set({\r\n CallToActionLanguage: this.ad && !_.isEmpty(this.ad.CallToActionLanguage) ?\r\n this.ad.CallToActionLanguage : null,\r\n });\r\n }\r\n\r\n if (this.isThirdPartyMeasurementEnabled) {\r\n if (this.ad) {\r\n const verifiedTrackingSettings = getVerifiedTrackingSettingsRead(this.ad);\r\n this.model.set(verifiedTrackingSettings);\r\n }\r\n }\r\n\r\n if (this.isBulkEditMMA) {\r\n this.model.set({\r\n AdStatus: this.adStatus(),\r\n });\r\n }\r\n\r\n this.viewModel.model = this.model;\r\n }\r\n\r\n enableAdStrengthSuggestionHelpers() {\r\n const enableAdStrengthFields = _.union(this.headlineFields, this.longHeadlineFields, this.descriptionFields); // eslint-disable-line max-len\r\n _.each(enableAdStrengthFields, (field) => {\r\n const element = this[field].$el;\r\n const property = this[field];\r\n attachAdCustomizersHelpers({\r\n container: $('div[data-type=\"Responsive\"], div.crud-multimedia-ad-react'),\r\n element,\r\n updateAction: (text) => {\r\n property.entity.set(field, text);\r\n $(`.form-control.${field}-value`).val(text);\r\n property.trigger('input-changed');\r\n },\r\n deps: {\r\n i18n: this.i18n,\r\n countdownI18nDummy: this.i18n,\r\n config: this.config,\r\n instrumentation: this.instrumentation,\r\n permissions: this.permissions,\r\n edmCampaign: this.edm,\r\n jsDataCampaign: this.jsdata,\r\n scope: {\r\n campaignId: Number(this.viewContext.currentCampaign.Id),\r\n adGroupId: Number(this.viewContext.currentAdGroup.Id),\r\n },\r\n },\r\n adType: 'ResponsiveAd',\r\n field,\r\n });\r\n });\r\n if (this.parsedTextMaxLengthExtension) {\r\n this.parsedTextMaxLengthExtension.extend(this, enableAdStrengthFields, 'ResponsiveAd');\r\n }\r\n }\r\n\r\n getEvaluateAdCustomizers(text) {\r\n return new Promise((resolve) => {\r\n if (this.isMMAAdCustomizersEnabled) {\r\n evaluateAdCustomizers({\r\n text,\r\n deps: {\r\n i18n: this.i18n,\r\n countdownI18nDummy: this.i18n,\r\n config: this.config,\r\n instrumentation: this.instrumentation,\r\n jsDataCampaign: this.jsdata,\r\n },\r\n adType: 'ResponsiveAd',\r\n })\r\n .then((data) => {\r\n resolve(data);\r\n });\r\n } else {\r\n resolve(text);\r\n }\r\n });\r\n }\r\n\r\n overrideEvents(elem, field) {\r\n elem.delegateEvents({\r\n [`input .${field}-value`]: (event) => {\r\n elem.entity.set(field, event.target.value);\r\n elem.trigger('input-changed', event);\r\n elem.setState({ showError: true });\r\n },\r\n [`focus .${field}-value`]: (event) => {\r\n elem.trigger('input-focused', event);\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Initialize the form part of the ad creation view.\r\n *\r\n * @returns {undefined} no return value\r\n *\r\n */\r\n initializeAdContent() {\r\n clearAdStrengthSuggestionController();\r\n if (this.isMMAEnabled) {\r\n _.each(this.headlineFields, (field) => {\r\n this[field] = new InputControl({\r\n entity: this.model,\r\n field,\r\n ariaLabelledby: 'responsiveAdShortHeadlineLabel',\r\n });\r\n\r\n this.overrideEvents(this[field], field);\r\n\r\n this[field].on('input-changed', () => {\r\n const data = this.model.toJSON();\r\n const firstHeadline = _.first(_.filter(\r\n this.headlineFields,\r\n key => !_.isEmpty(data[key])\r\n ));\r\n this.getEvaluateAdCustomizers(data[firstHeadline])\r\n .then((text) => {\r\n const updateObject = {\r\n updatedElement: 'ShortHeadline',\r\n text,\r\n };\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n $(`.form-control.${field}-value`).click();\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(field, 'none');\r\n });\r\n\r\n this[`${field}RemainingCharsHint`] = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n property: this[field],\r\n model: this.model,\r\n field,\r\n });\r\n\r\n this[field].maxLength = () => this[`${field}RemainingCharsHint`].maxSize;\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this[field],\r\n field,\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.Headline,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n });\r\n\r\n _.each(this.longHeadlineFields, (field) => {\r\n this[field] = new InputControl({\r\n entity: this.model,\r\n field,\r\n ariaLabelledby: 'responsiveAdLongHeadlineLabel',\r\n });\r\n\r\n this.overrideEvents(this[field], field);\r\n\r\n this[field].on('input-changed', () => {\r\n const data = this.model.toJSON();\r\n const firstLongHeadline = _.first(_.filter(\r\n this.longHeadlineFields,\r\n key => !_.isEmpty(data[key])\r\n ));\r\n this.getEvaluateAdCustomizers(data[firstLongHeadline])\r\n .then((text) => {\r\n const updateObject = {\r\n updatedElement: 'LongHeadline',\r\n text,\r\n };\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n $(`.form-control.${field}-value`).click();\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(field, 'none');\r\n });\r\n\r\n this[`${field}RemainingCharsHint`] = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n property: this[field],\r\n model: this.model,\r\n field,\r\n });\r\n\r\n this[field].maxLength = () => this[`${field}RemainingCharsHint`].maxSize;\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this[field],\r\n field,\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.LongHeadline,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n });\r\n\r\n _.each(this.descriptionFields, (field) => {\r\n this[field] = new InputControl({\r\n entity: this.model,\r\n field,\r\n ariaLabelledby: 'responsiveAdDescriptionLabel',\r\n });\r\n\r\n this.overrideEvents(this[field], field);\r\n\r\n this[field].on('input-changed', () => {\r\n const data = this.model.toJSON();\r\n const firstDescription = _.first(_.filter(\r\n this.descriptionFields,\r\n key => !_.isEmpty(data[key])\r\n ));\r\n this.getEvaluateAdCustomizers(data[firstDescription])\r\n .then((text) => {\r\n const updateObject = {\r\n updatedElement: 'Description',\r\n text,\r\n };\r\n this.activityLogger.signal(`ad field change: ${field}`, 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n $(`.form-control.${field}-value`).click();\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(field, 'none');\r\n });\r\n\r\n this[`${field}RemainingCharsHint`] = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n property: this[field],\r\n model: this.model,\r\n field,\r\n });\r\n\r\n this[field].maxLength = () => this[`${field}RemainingCharsHint`].maxSize;\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this[field],\r\n field,\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.Description,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n });\r\n\r\n if (this.isMultiMediaAdsPhase2Enabled || this.isBoostScenario || this.isMSANLogoAndCTAForMMAEnabled) {\r\n const ActionLanguageAdapter = DependencyResolver.get('campaignui/feature/adextension/actionlink/view/language-adapter');\r\n this.actionLanguageAdapter = new ActionLanguageAdapter({\r\n observable: this.viewModel.Language,\r\n viewModel: this.viewModel,\r\n entity: this.model,\r\n field: 'CallToActionLanguage',\r\n isMultimediaAd: this.isMultimediaAd || this.isMSANLogoAndCTAForMMAEnabled,\r\n isMMAAutomatedCTAOptInEnabled: this.isMMAAutomatedCTAOptInEnabled,\r\n isBoostScenario: this.isBoostScenario,\r\n callback: (selectedOption) => {\r\n this.model.set('CallToActionLanguage', selectedOption.id);\r\n this.trigger('fieldUpdated', {\r\n updatedElement: 'CallToActionLanguage',\r\n text: selectedOption.value,\r\n });\r\n },\r\n });\r\n\r\n const ActionTypeAdapter = DependencyResolver.get('campaignui/feature/adextension/actionlink/view/action-type-adapter');\r\n this.actionTypeAdapter = new ActionTypeAdapter({\r\n observable: this.viewModel.ActionType,\r\n viewModel: this.viewModel,\r\n entity: this.model,\r\n field: 'CallToAction',\r\n isMultimediaAd: this.isMultimediaAd || this.isMSANLogoAndCTAForMMAEnabled,\r\n isMMAAutomatedCTAOptInEnabled: this.isMMAAutomatedCTAOptInEnabled,\r\n isBoostScenario: this.isBoostScenario,\r\n isBoostCustomCTAEnabled: this.isBoostCustomCTAEnabled,\r\n callback: (selectedOption) => {\r\n this.model.set('CallToAction', selectedOption.id);\r\n this.trigger('fieldUpdated', {\r\n updatedElement: 'CallToAction',\r\n text: selectedOption.value,\r\n });\r\n },\r\n });\r\n }\r\n } else {\r\n this.shortHeadline = new InputControl({\r\n entity: this.model,\r\n field: 'Headline',\r\n ariaLabelledby: 'responsiveAdShortHeadlineLabel',\r\n });\r\n\r\n this.shortHeadline.on('input-changed', () => {\r\n const updateObject = {\r\n updatedElement: 'ShortHeadline',\r\n text: this.shortHeadline.getState().value,\r\n };\r\n this.activityLogger.signal('ad field change: shortHeadline', 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n });\r\n\r\n this.overrideEvents(this.shortHeadline, 'Headline');\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this.shortHeadline,\r\n field: 'Headline',\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.Headline,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n\r\n this.shortHeaderRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'Headline',\r\n });\r\n\r\n this.longHeadline = new InputControl({\r\n entity: this.model,\r\n field: 'LongHeadline',\r\n ariaLabelledby: 'responsiveAdLongHeadlineLabel',\r\n });\r\n\r\n this.overrideEvents(this.longHeadline, 'LongHeadline');\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this.longHeadline,\r\n field: 'LongHeadline',\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.LongHeadline,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n\r\n this.longHeaderRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'LongHeadline',\r\n });\r\n\r\n this.longHeadline.on('input-changed', () => {\r\n const updateObject = {\r\n updatedElement: 'LongHeadline',\r\n text: this.longHeadline.getState().value,\r\n };\r\n this.activityLogger.signal('ad field change: longHeadline', 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n });\r\n\r\n this.description = new InputControl({\r\n entity: this.model,\r\n field: 'Text',\r\n ariaLabelledby: 'responsiveAdDescriptionLabel',\r\n });\r\n\r\n this.overrideEvents(this.description, 'Text');\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this.description,\r\n field: 'Text',\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.Text,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n\r\n this.descriptionRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'Text',\r\n });\r\n\r\n this.description.on('input-changed', () => {\r\n const updateObject = {\r\n updatedElement: 'Description',\r\n text: this.description.getState().value,\r\n };\r\n this.activityLogger.signal('ad field change: description', 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n });\r\n }\r\n\r\n this.businessName = new InputControl({\r\n entity: this.model,\r\n field: 'BusinessName',\r\n ariaLabelledby: 'responsiveAdBusinessNameLabel',\r\n });\r\n this.businessName.on('input-changed', () => {\r\n const updateObject = {\r\n updatedElement: 'BusinessName',\r\n text: this.businessName.getState().value,\r\n };\r\n this.activityLogger.signal('ad field change: businessName', 'responsive ad editor');\r\n this.trigger('fieldUpdated', updateObject);\r\n });\r\n\r\n this.overrideEvents(this.businessName, 'BusinessName');\r\n\r\n if (!this.isRecommendation) {\r\n attachAdStrengthSuggestionHelpers({\r\n element: this.businessName,\r\n field: 'BusinessName',\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n assetType: assetSuggestionType.BusinessName,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n isRecommendation: this.isRecommendation,\r\n });\r\n }\r\n\r\n this.businessNameRemainingCharsHint = new RemainingCharsHint({\r\n i18n: this.i18n,\r\n model: this.model,\r\n field: 'BusinessName',\r\n });\r\n\r\n const UrlEditor = DependencyResolver.get('component/url-input/view/url-input');\r\n\r\n this.finalUrlEditor = new UrlEditor({\r\n inputProtocol: this.isMSANBoostEnabled,\r\n url: _.first(_.result(this.model.attributes, 'FinalUrls')),\r\n ariaLabelledby: 'responsiveAdFinalUrlLabel',\r\n ariaId: 'responsiveAdFinalUrl',\r\n disabled: this.scenario === 'new-audience-static-creation',\r\n required: true,\r\n });\r\n\r\n this.mobileUrlEditor = new UrlEditor({\r\n inputProtocol: this.isMSANBoostEnabled,\r\n url: _.first(_.result(this.model.attributes, 'MobileFinalUrls')),\r\n ariaLabelledby: 'responsiveAdMobileUrlLabel',\r\n ariaId: 'responsiveAdMobileUrl',\r\n });\r\n\r\n if (this.isImpressionTrackingUrlsEnabled) {\r\n this.ImpressionTrackingUrlsUrlOptions = new ImpressionTrackingUrlOptions({\r\n i18n: this.i18n,\r\n initialImpressionTrackingUrls: this.model.get('ImpressionTrackingUrls'),\r\n maxImpressionTrackingUrlsCount: this.ImpressionTrackingUrlsMaxCount,\r\n isIASSectionVisible: false,\r\n });\r\n\r\n this.ImpressionTrackingUrlsUrlOptions.on('InputChange', (impressionTrackingUrls) => {\r\n this.model.errors.unset('ImpressionTrackingUrl');\r\n this.model.set('ImpressionTrackingUrls', impressionTrackingUrls);\r\n this.ImpressionTrackingUrlsUrlOptions.removeErrors();\r\n });\r\n }\r\n\r\n if (this.isThirdPartyMeasurementEnabled) {\r\n this.ThirdPartyMeasurementView = new ThirdPartyMeasurementBackboneView({\r\n i18n: this.i18n,\r\n initialThirdPartyMeasurement: this.model.get('VerifiedTrackingSettings'),\r\n isMOATEnabled: this.isMOATEnabled,\r\n });\r\n\r\n this.ThirdPartyMeasurementView.on('InputChange', (thirdPartyMeasurement) => {\r\n this.model.set('VerifiedTrackingSettings', thirdPartyMeasurement);\r\n });\r\n\r\n this.ThirdPartyMeasurementView.listenTo(this.model, 'change:VerifiedTrackingSettings', (model) => {\r\n this.ThirdPartyMeasurementView.renderWithInput(model.get('VerifiedTrackingSettings'));\r\n });\r\n }\r\n\r\n this.finalUrlEditor.on('urlChanged', (url) => {\r\n this.activityLogger.signal('ad field change: finalUrls', 'responsive ad editor');\r\n if (url) {\r\n this.model.set({ FinalUrls: [url] });\r\n this.finalUrlEditor.setError('');\r\n this.trigger('fieldUpdated', { updatedElement: 'FinalUrl', url });\r\n } else {\r\n this.model.set({ FinalUrls: [] });\r\n this.trigger('fieldUpdated', { updatedElement: 'FinalUrl', url: '' });\r\n }\r\n });\r\n\r\n if (this.isAdRecommendationMSANEnabled && this.isAudienceCampaign && !this.isVideo && !this.isSimplifyAudienceCreation) {\r\n urlChangeForRecommendationAd(this.finalUrlEditor, this.recommendButtonReactComponent);\r\n }\r\n\r\n if (!this.isRecommendation) {\r\n this.onUrlChanged = attachAdStrengthSuggestionHelperForURL({\r\n element: this.finalUrlEditor,\r\n viewModel: this.viewModel,\r\n pageContext: this.pageContext,\r\n view: this,\r\n i18n: this.i18n,\r\n activityLogger: this.activityLogger,\r\n scenario: this.responsiveAdScenario,\r\n });\r\n }\r\n\r\n this.mobileUrlEditor.on('urlChanged', (url) => {\r\n this.activityLogger.signal('ad field change: mobileFinalUrls', 'responsive ad editor');\r\n this.model.set({ MobileFinalUrls: url ? [url] : [] });\r\n if (url) {\r\n this.mobileUrlEditor.setError('');\r\n }\r\n });\r\n\r\n const UrlOptions = DependencyResolver.get('component/upgraded-url/view/urlOptionsV2');\r\n\r\n this.advancedURLOptions = new UrlOptions({\r\n entityType: 'Audience',\r\n placeholderEnabled: true,\r\n trackingTemplate: _.result(this.model.attributes, 'TrackingUrlTemplate'),\r\n finalUrlSuffix: _.result(this.model.attributes, 'FinalUrlSuffix'),\r\n customParameters: _.isEmpty(_.result(this.model.attributes, 'UrlCustomParameters')) ? undefined : _.clone(this.model.attributes.UrlCustomParameters),\r\n showUurlTestTool: true,\r\n isForVNext: this.isForVNext,\r\n activityLogger: this.activityLogger,\r\n });\r\n\r\n this.advancedURLOptions.on('testUurl', (fn, originalView) => {\r\n const testUurl = DependencyResolver.get('component/upgraded-url/service/testUurl');\r\n const state = DependencyResolver.get('component/state/index');\r\n originalView.isInline = false; // eslint-disable-line\r\n originalView.level = testUurl.uurlLevels.Ad; // eslint-disable-line\r\n const params = this.getData() || {};\r\n const context = {\r\n customerId: state.get('customer_id'),\r\n userId: state.get('user_id'),\r\n accountId: state.get('account_id'),\r\n campaignId: state.get('campaign_id') || (params.Campaign && params.Campaign.Id) || 0,\r\n adGroupId: state.get('adgroup_id') || (params.AdGroup && params.AdGroup.Id) || 0,\r\n entityId: params.Id ? params.Id : '',\r\n };\r\n const options = {\r\n apiInLog: 'responsive-ad-editor/uurlTest',\r\n };\r\n testUurl.testUurl(fn, originalView, params, context, options);\r\n });\r\n\r\n if (this.isUpdate &&\r\n (!this.isEmpty(this.ad.TrackingUrlTemplate) || !this.isEmpty(this.ad.UrlCustomParameters) ||\r\n !this.isEmpty(this.ad.FinalUrlSuffix))) {\r\n this.advancedURLOptions.expand();\r\n }\r\n\r\n this.adPropertiesToControlMap = {\r\n FinalUrls: this.finalUrlEditor,\r\n MobileFinalUrls: this.mobileUrlEditor,\r\n };\r\n }\r\n\r\n finalURLChange() {\r\n if (typeof this.onUrlChanged === 'function') {\r\n this.onUrlChanged();\r\n }\r\n }\r\n\r\n adStatusChange(e) {\r\n this.adStatus(e.target.value);\r\n }\r\n\r\n toggleErrorGrid() {\r\n this.showErrorGrid(!this.showErrorGrid());\r\n }\r\n\r\n hideProgress() {\r\n this.showProgress(false);\r\n this.onClose();\r\n }\r\n\r\n initializeAdError() {\r\n _.forEach(this.ad.errors, (error) => {\r\n this.setError(error);\r\n });\r\n }\r\n\r\n updateFinalUrlPrefix(prefix) {\r\n this.finalUrlEditor.ko_model.protocol(prefix);\r\n }\r\n\r\n updateFinalUrl(url) {\r\n this.finalUrlEditor.ko_model.fullUrl(url);\r\n }\r\n\r\n addHeadline(e) {\r\n // remove focus style after click\r\n e.currentTarget.blur();\r\n if (this.viewModel.showHeadlineCount() < MMAAssetConfigs.MAX_HEADLINES) {\r\n this.viewModel.showHeadlineCount(this.viewModel.showHeadlineCount() + 1);\r\n\r\n this.activityLogger.signal(`headline clicked: MMAinMSAN ${this.isAudienceCampaignMultiMediaAdsEnabled}`, 'responsive ad editor');\r\n }\r\n }\r\n\r\n addLoneHeadline(e) {\r\n // remove focus style after click\r\n e.currentTarget.blur();\r\n if (this.viewModel.showLongHeadlineCount() < MMAAssetConfigs.MAX_LONGHEADLINES) {\r\n this.viewModel.showLongHeadlineCount(this.viewModel.showLongHeadlineCount() + 1);\r\n this.activityLogger.signal(`long headline clicked: MMAinMSAN ${this.isAudienceCampaignMultiMediaAdsEnabled}`, 'responsive ad editor');\r\n }\r\n }\r\n\r\n addDescription(e) {\r\n // remove focus style after click\r\n e.currentTarget.blur();\r\n if (this.viewModel.showDescriptionCount() < MMAAssetConfigs.MAX_DESCRIPTIONS) {\r\n this.viewModel.showDescriptionCount(this.viewModel.showDescriptionCount() + 1);\r\n this.activityLogger.signal(`description clicked: MMAinMSAN ${this.isAudienceCampaignMultiMediaAdsEnabled}`, 'responsive ad editor');\r\n }\r\n }\r\n\r\n expandCTA() {\r\n this.viewModel.isCTAExpanded(!this.viewModel.isCTAExpanded());\r\n }\r\n\r\n toggleBoostAnchors() {\r\n this.viewModel.isBoostAnchorsExpanded(!this.viewModel.isBoostAnchorsExpanded());\r\n }\r\n\r\n removeHeadline(e) {\r\n const index = Number(e.currentTarget.dataset.id);\r\n this.shiftOneIndex('Headline', index, this.viewModel.showHeadlineCount());\r\n this.viewModel.showHeadlineCount(this.viewModel.showHeadlineCount() - 1);\r\n }\r\n\r\n removeLongHeadline(e) {\r\n const index = Number(e.currentTarget.dataset.id);\r\n this.shiftOneIndex('LongHeadline', index, this.viewModel.showLongHeadlineCount());\r\n this.viewModel.showLongHeadlineCount(this.viewModel.showLongHeadlineCount() - 1);\r\n }\r\n\r\n removeDescription(e) {\r\n const index = Number(e.currentTarget.dataset.id);\r\n this.shiftOneIndex('Description', index, this.viewModel.showDescriptionCount());\r\n this.viewModel.showDescriptionCount(this.viewModel.showDescriptionCount() - 1);\r\n }\r\n\r\n // elements of fields shift one index to the left\r\n shiftOneIndex(type, index, count) {\r\n let field = `${type}${index}`;\r\n let nextField;\r\n\r\n if (_.some(this.viewModel.currentSuggestions, suggestion =>\r\n suggestion.Text === this[field].getState().value)) {\r\n this.activityLogger.signal(`${field}, ${this[field].getState().value}`, `${this.responsiveAdScenario} delete a suggested asset`);\r\n } else {\r\n this.activityLogger.signal(`${field}, ${this[field].getState().value}`, `${this.responsiveAdScenario} delete an asset`);\r\n }\r\n\r\n // remove last one\r\n if (index >= count - 1) {\r\n if (this[field]) {\r\n this[field].setState({\r\n value: '',\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(field, 'none');\r\n }\r\n return;\r\n }\r\n\r\n for (let i = index; i < count - 1; i += 1) {\r\n nextField = `${type}${i + 1}`;\r\n\r\n const { value } = this[nextField].getState();\r\n const display = this.getAIGenAssetContextualAttributeStatus(nextField);\r\n\r\n this[field].setState({\r\n value,\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(field, display);\r\n\r\n field = nextField;\r\n }\r\n\r\n if (this[nextField]) {\r\n this[nextField].setState({\r\n value: '',\r\n });\r\n this.updateAIGenAssetContextualAttributeStatus(nextField, 'none');\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {Object} view itself\r\n */\r\n render() {\r\n if (this.isImproveMMA) {\r\n this.$el.html(editorHeadlineDescriptionOnlyTemplate({\r\n i18n: this.i18n,\r\n headlineFields: this.headlineFields,\r\n longHeadlineFields: this.longHeadlineFields,\r\n descriptionFields: this.descriptionFields,\r\n }));\r\n } else if (this.isBulkEditMMA) {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n callToAction: CallToAction,\r\n showSaveButton: this.showSaveButton,\r\n isImpressionTrackingUrlsEnabled: this.isImpressionTrackingUrlsEnabled,\r\n isMultimediaAd: this.isMultimediaAd,\r\n isMultiMediaAdsPhase2Enabled: this.isMultiMediaAdsPhase2Enabled,\r\n isMMAAutomatedCTAOptInEnabled: this.isMMAAutomatedCTAOptInEnabled,\r\n automatedCTAEnable: this.automatedCTAEnable,\r\n isBoostScenario: this.isBoostScenario,\r\n isMSANLogoAndCTAForMMAEnabled: this.isMSANLogoAndCTAForMMAEnabled,\r\n isMMAEnabled: this.isMMAEnabled,\r\n isMoveFinalUrlTop: this.isMoveFinalUrlTop,\r\n isBulkEditMMA: this.isBulkEditMMA,\r\n headlineFields: this.headlineFields,\r\n longHeadlineFields: this.longHeadlineFields,\r\n descriptionFields: this.descriptionFields,\r\n showProgress: this.showProgress,\r\n statusText: this.statusText,\r\n completePercentage: this.completePercentage,\r\n adStatusOptions: this.adStatusOptions,\r\n showErrors: this.showErrors,\r\n errorCountString: this.errorCountString,\r\n inlineErrors: this.inlineErrors,\r\n errorsGrids: this.errorsGrids,\r\n errorCountLinkText: this.errorCountLinkText,\r\n }));\r\n } else {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n callToAction: CallToAction,\r\n showSaveButton: this.showSaveButton,\r\n isImpressionTrackingUrlsEnabled: this.isImpressionTrackingUrlsEnabled,\r\n isMultimediaAd: this.isMultimediaAd,\r\n isMultiMediaAdsPhase2Enabled: this.isMultiMediaAdsPhase2Enabled,\r\n isMMAAutomatedCTAOptInEnabled: this.isMMAAutomatedCTAOptInEnabled,\r\n automatedCTAEnable: this.automatedCTAEnable,\r\n isBoostScenario: this.isBoostScenario,\r\n isMSANLogoAndCTAForMMAEnabled: this.isMSANLogoAndCTAForMMAEnabled,\r\n isBoostAnchorsEnabled: this.isBoostAnchorsEnabled,\r\n isBoostCustomCTAEnabled: this.isBoostCustomCTAEnabled,\r\n isBoostCTAAriaTextEnabled: this.isBoostCTAAriaTextEnabled,\r\n isMMAEnabled: this.isMMAEnabled,\r\n isMoveFinalUrlTop: this.isMoveFinalUrlTop,\r\n isBulkEditMMA: this.isBulkEditMMA,\r\n headlineFields: this.headlineFields,\r\n longHeadlineFields: this.longHeadlineFields,\r\n descriptionFields: this.descriptionFields,\r\n }));\r\n }\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n if (this.isImproveMMA && this.isMMAEnabled) {\r\n _.each(this.headlineFields, (field, idx) => {\r\n this.$(`.short-headline-form-${idx} .short-headline-form`).append(this[field].render().el);\r\n this.$(`.short-headline-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n _.each(this.longHeadlineFields, (field, idx) => {\r\n this.$(`.long-headline-form-${idx} .long-headline-form`).append(this[field].render().el);\r\n this.$(`.long-headline-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n _.each(this.descriptionFields, (field, idx) => {\r\n this.$(`.description-form-${idx} .description-form`).append(this[field].render().el);\r\n this.$(`.description-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n\r\n this.enableAIGenAssetContextualAttribute();\r\n\r\n return this;\r\n }\r\n\r\n if (this.isMMAEnabled) {\r\n _.each(this.headlineFields, (field, idx) => {\r\n this.$(`.short-headline-form-${idx} .short-headline-form`).append(this[field].render().el);\r\n this.$(`.short-headline-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n _.each(this.longHeadlineFields, (field, idx) => {\r\n this.$(`.long-headline-form-${idx} .long-headline-form`).append(this[field].render().el);\r\n this.$(`.long-headline-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n _.each(this.descriptionFields, (field, idx) => {\r\n this.$(`.description-form-${idx} .description-form`).append(this[field].render().el);\r\n this.$(`.description-form-${idx} > .remaining-chars-hint-container`).append(this[`${field}RemainingCharsHint`].render().el);\r\n });\r\n if (this.isMultiMediaAdsPhase2Enabled || this.isBoostScenario || this.isMSANLogoAndCTAForMMAEnabled) {\r\n this.$('.action-language').append(this.actionLanguageAdapter.render().el);\r\n this.$('.action-text').append(this.actionTypeAdapter.render().el);\r\n }\r\n } else {\r\n this.$('.short-headline-form').append(this.shortHeadline.render().el);\r\n this.$('.short-headline > .remaining-chars-hint-container').append(this.shortHeaderRemainingCharsHint.render().el);\r\n this.$('.long-headline-form').append(this.longHeadline.render().el);\r\n this.$('.long-headline > .remaining-chars-hint-container').append(this.longHeaderRemainingCharsHint.render().el);\r\n this.$('.description-form').append(this.description.render().el);\r\n this.$('.description > .remaining-chars-hint-container').append(this.descriptionRemainingCharsHint.render().el);\r\n }\r\n\r\n this.$('.business-name-form').append(this.businessName.render().el);\r\n this.$('.business-name > .remaining-chars-hint-container').append(this.businessNameRemainingCharsHint.render().el);\r\n this.$('.final-url').append(this.finalUrlEditor.render().el);\r\n if (this.isMobileUrlEnabled) {\r\n this.$('.mobile-url').append(this.mobileUrlEditor.render().el);\r\n } else {\r\n this.$('.mobile-url').remove();\r\n }\r\n\r\n if (this.isImpressionTrackingUrlsEnabled) {\r\n this.$('.impression-tracking-urls').append(this.ImpressionTrackingUrlsUrlOptions.render().el);\r\n }\r\n\r\n if (this.isThirdPartyMeasurementEnabled) {\r\n this.$('.third-party-measurements').append(this.ThirdPartyMeasurementView.render().el);\r\n }\r\n\r\n this.$('.advanced-url-options').append(this.advancedURLOptions.render().el);\r\n this.$('.generic-errors').append(this.genericErr.render().el);\r\n\r\n if (this.isMMAAdCustomizersEnabled) {\r\n this.enableAdStrengthSuggestionHelpers();\r\n if (this.ad) {\r\n const enableAdStrengthFields = _.union(this.headlineFields, this.longHeadlineFields, this.descriptionFields); // eslint-disable-line max-len\r\n _.each(enableAdStrengthFields, (field) => {\r\n this[`${field}RemainingCharsHint`].updateHint();\r\n });\r\n }\r\n }\r\n\r\n if (this.isAdRecommendationMSANEnabled && this.isAudienceCampaign && !this.isVideo && !this.isSimplifyAudienceCreation) {\r\n ReactDOM.render(, this.$('.get-recommend-ad')[0]);\r\n }\r\n\r\n if (this.isMSANBoostEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.$('.hotspot-panel')[0]\r\n );\r\n }\r\n\r\n if (this.isBoostAnchorsEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.$('.boost-anchors-section')[0]\r\n );\r\n }\r\n\r\n if (this.isBoostScenario && this.isBoostCustomCTAEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.$('.call-to-action-text')[0]\r\n );\r\n }\r\n\r\n if (this.isBoostCTAAriaTextEnabled) {\r\n ReactDOM.render(\r\n ,\r\n this.$('.call-to-action-aria-text')[0]\r\n );\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a boolean that determines whether the passed variable is empty or not.\r\n * Empty meaning: null, undefined, []\r\n *\r\n * @param {object} value The value to be inspected.\r\n *\r\n * @returns {boolean} True for empty value, false otherwise.\r\n *\r\n */\r\n isEmpty(value) {\r\n // value == null also handles the case where value is undefined\r\n return (value == null || value.length === 0);\r\n }\r\n\r\n /**\r\n * Makes sure that all the needed parameters are contained on the object, and valid, before this\r\n * is used to save the ad.\r\n *\r\n * @param {object} params The object to be sent on the save request.\r\n *\r\n * @returns {boolean} True if everything is ok, false if values are missing or invalid.\r\n *\r\n */\r\n isDataValid(params) {\r\n let isValid = true;\r\n\r\n if (this.isMMAEnabled) {\r\n if (this.isImproveMMA) {\r\n this.viewModel.actionLanguageErrorMessage(false);\r\n this.viewModel.actionTextErrorMessage(false);\r\n } else if (this.isMultiMediaAdsPhase2Enabled) {\r\n if (_.isEmpty(params.CallToActionLanguage)) {\r\n isValid = false;\r\n this.viewModel.actionLanguageErrorMessage(this.i18n.getString('Validation_NotEmpty_Required_Field'));\r\n } else {\r\n this.viewModel.actionLanguageErrorMessage(false);\r\n }\r\n\r\n if (_.isEmpty(params.CallToAction) || params.CallToAction === 'Default') {\r\n isValid = false;\r\n this.viewModel.actionTextErrorMessage(this.i18n.getString('Validation_NotEmpty_Required_Field'));\r\n } else {\r\n this.viewModel.actionTextErrorMessage(false);\r\n }\r\n }\r\n if (this.isBulkEditMMA) {\r\n if (this.isEmpty(params.BusinessName) || params.BusinessName.length > MMAAssetConfigs.MAX_BUSINESS_NAME) {\r\n isValid = false;\r\n this.businessName.setState({ showError: true });\r\n return false;\r\n }\r\n return isValid;\r\n }\r\n if (_.isEmpty(params.Headlines) ||\r\n JSON.parse(params.Headlines).length < MMAAssetConfigs.MIN_HEADLINES) {\r\n isValid = false;\r\n this.viewModel.headlinesErrorMessage(this.i18n.getString('Multimedia_Ad_Error_AssetFieldMinimumNotMet', {\r\n field: this.i18n.getString('Audience_Campaign_Ad_Short_Headline_Label').toLowerCase(),\r\n min_count: MMAAssetConfigs.MIN_HEADLINES,\r\n }));\r\n } else {\r\n this.viewModel.headlinesErrorMessage(false);\r\n }\r\n // longheadline optional in MMA\r\n if ((((_.isEmpty(params.LongHeadlines) ||\r\n JSON.parse(params.LongHeadlines).length < MMAAssetConfigs.MIN_LONGHEADLINES))) && (!this.isMMAEnabled || this.isAudienceCampaign)) {\r\n isValid = false;\r\n this.viewModel.longHeadlinesErrorMessage(this.i18n.getString('Multimedia_Ad_Error_AssetFieldMinimumNotMet', {\r\n field: this.i18n.getString('Audience_Campaign_Ad_Long_Headline_Label').toLowerCase(),\r\n min_count: MMAAssetConfigs.MIN_LONGHEADLINES,\r\n }));\r\n } else {\r\n this.viewModel.longHeadlinesErrorMessage(false);\r\n }\r\n\r\n if (_.isEmpty(params.Descriptions) ||\r\n JSON.parse(params.Descriptions).length < MMAAssetConfigs.MIN_DESCRIPTIONS) {\r\n isValid = false;\r\n this.viewModel.descriptionsErrorMessage(this.i18n.getString('Multimedia_Ad_Error_AssetFieldMinimumNotMet', {\r\n field: this.i18n.getString('Audience_Campaign_Ad_Description_Label').toLowerCase(),\r\n min_count: MMAAssetConfigs.MIN_DESCRIPTIONS,\r\n }));\r\n } else {\r\n this.viewModel.descriptionsErrorMessage(false);\r\n }\r\n\r\n this.viewModel.businessNameErrorMessage(false);\r\n this.viewModel.urlOptionErrorMessage(false);\r\n }\r\n\r\n if (!this.isImproveMMA) {\r\n if (this.isEmpty(params.FinalUrls)) {\r\n isValid = false;\r\n this.finalUrlEditor.setError(this.i18n.getString('Audience_Campaign_Ad_Error_RequiredField'));\r\n }\r\n }\r\n\r\n if (!this.model.isValid()) {\r\n if (!this.isMMAEnabled) {\r\n this.shortHeadline.setState({ showError: true });\r\n this.longHeadline.setState({ showError: true });\r\n this.description.setState({ showError: true });\r\n }\r\n if (this.businessName) {\r\n this.businessName.setState({ showError: true });\r\n }\r\n return false;\r\n }\r\n\r\n if (this.isMSANBoostEnabled) {\r\n isValid = isValid && this.hotspotReactComponent.current.validate();\r\n\r\n if (this.isBoostCustomCTAEnabled && this.model.get('CallToAction') === 'CustomText') {\r\n isValid = isValid && this.callToActionTextComponent.current.isValid();\r\n }\r\n\r\n if (this.isBoostCTAAriaTextEnabled) {\r\n isValid = isValid && this.callToActionAriaTextComponent.current.isValid();\r\n }\r\n }\r\n\r\n // isValid = isValid && this.advancedURLOptions.isValid();\r\n return isValid;\r\n }\r\n\r\n /**\r\n * Check if the error is AdEdit error, if so set the error message\r\n *\r\n * @param {object} error - Error object\r\n * @returns {boolean} - true if the error belongs to the AdEdit false other wise.\r\n */\r\n setError(error) {\r\n if (error.Property && _.includes(_.keys(this.adPropertiesToControlMap), error.Property)) {\r\n const control = this.adPropertiesToControlMap[error.Property];\r\n\r\n control.setError(this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`));\r\n return true;\r\n }\r\n let ifCatch = 0;\r\n if (error.Error && error.Error.toLowerCase().indexOf('impressiontrackingurl') !== -1) {\r\n const errors = this.model.errors.get('ImpressionTrackingUrl') instanceof Array ?\r\n this.model.errors.get('ImpressionTrackingUrl').concat(this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`)) :\r\n [this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`)];\r\n\r\n this.model.errors.set({\r\n ImpressionTrackingUrl: errors,\r\n });\r\n this.ImpressionTrackingUrlsUrlOptions.setErrors(errors);\r\n\r\n ifCatch = 1;\r\n }\r\n\r\n if (error.Property === 'CallToAction') {\r\n this.viewModel.actionLanguageErrorMessage(this.i18n.getString(`Error_Campaign_API_${error.Error}`));\r\n }\r\n\r\n if (error.Property === 'ResponsiveAdHeadlines') {\r\n this.viewModel.headlinesErrorMessage(this.i18n.getString(`Multimedia_Ad_Error_${error.Error}`, {\r\n field: 'short headline',\r\n min_count: MMAAssetConfigs.MIN_HEADLINES,\r\n }) || this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`));\r\n }\r\n\r\n if (error.Property === 'ResponsiveAdLongHeadlines') {\r\n this.viewModel.longHeadlinesErrorMessage(this.i18n.getString(`Multimedia_Ad_Error_${error.Error}`, {\r\n field: 'long headline',\r\n min_count: MMAAssetConfigs.MIN_LONGHEADLINES,\r\n }) || this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`));\r\n }\r\n\r\n if (error.Property === 'ResponsiveAdDescriptions') {\r\n this.viewModel.descriptionsErrorMessage(this.i18n.getString(`Multimedia_Ad_Error_${error.Error}`, {\r\n field: 'ad text',\r\n min_count: MMAAssetConfigs.MIN_DESCRIPTIONS,\r\n }) || this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`));\r\n }\r\n\r\n if (error.Property === 'BusinessName') {\r\n this.viewModel.descriptionsErrorMessage(this.i18n.getString(`Multimedia_Ad_Error_${error.Error}`));\r\n }\r\n\r\n if (error.Property === 'CustomParameters' || (error.Error && error.Error.toLowerCase().indexOf('customparameters') !== -1)) {\r\n this.viewModel.urlOptionErrorMessage(this.i18nErrors.getString(`Error_Campaign_API_${error.Error}`));\r\n }\r\n\r\n if (_.isEmpty(error.Property) && !ifCatch) {\r\n const genericErrorMessage = this.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`)\r\n || this.i18n.getString(`Multimedia_Ad_Error_${error.Error}`)\r\n || error.message\r\n || this.i18nErrors.getString('ErrorNumber_-1');\r\n\r\n this.genericErr.setErrorMessage(genericErrorMessage);\r\n }\r\n\r\n if (error.Error === 'InvalidUrlScheme') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('Invalid Url Schema')));\r\n }\r\n\r\n if (error.Error === 'HotSpotMissingRequiredField') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('HotSpot Missing Required Field')));\r\n }\r\n\r\n if (error.Error === 'InvalidGlyph') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('Invalid Glyph')));\r\n }\r\n\r\n if (error.Error === 'HotSpotsHasDuplication') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('HotSpots Has Duplication')));\r\n }\r\n\r\n if (error.Error === 'CustomerIsNotAllowedForHotSpots') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('Customer Is Not Allowed For HotSpots')));\r\n }\r\n\r\n if (error.Error === 'InvalidHotSpot') {\r\n this.hotspotReactComponent.current.setError(this.i18n.getString(_TL_('Invalid HotSpot')));\r\n }\r\n\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Sets the input elements on the ad model, and returns an object with the parameters\r\n * needed for the save request.\r\n *\r\n * @returns {object} Object with parameters to save the ad.\r\n *\r\n */\r\n getData() {\r\n const TrackingUrlTemplate = this.advancedURLOptions.getTrackingTemplate();\r\n const UrlCustomParameters = this.advancedURLOptions.getUrlCustomParameters(true);\r\n const FinalUrlSuffix = this.advancedURLOptions.getFinalUrlSuffix();\r\n this.model.set({\r\n TrackingUrlTemplate,\r\n UrlCustomParameters,\r\n FinalUrlSuffix,\r\n });\r\n\r\n if (this.isThirdPartyMeasurementEnabled) {\r\n const verifiedTrackingSettings = this.model.get('VerifiedTrackingSettings');\r\n const verifiedTrackingSettingsAttachment = getVerifiedTrackingSettingWrite(verifiedTrackingSettings);\r\n this.model.set(verifiedTrackingSettingsAttachment);\r\n }\r\n\r\n let data = this.model.toJSON();\r\n const adGroupId = Number(this.viewContext.currentAdGroup.Id);\r\n const campaignId = Number(this.viewContext.currentCampaign.Id);\r\n\r\n if (this.isBoostScenario) {\r\n if (data.CallToAction === 'Default') {\r\n delete data.CallToAction;\r\n delete data.CallToActionLanguage;\r\n }\r\n }\r\n\r\n if (this.isMSANBoostEnabled) {\r\n data.HotSpots = JSON.stringify(this.hotspotReactComponent.current.getData());\r\n }\r\n\r\n if (this.isBoostAnchorsEnabled) {\r\n data.BoostAnchors = this.boostAnchorsReactComponent.current.getData();\r\n }\r\n\r\n if (this.isBoostScenario && this.isBoostCustomCTAEnabled) {\r\n data.CallToActionText = this.callToActionTextComponent.current.getData();\r\n }\r\n\r\n if (this.isBoostCTAAriaTextEnabled) {\r\n data.CallToActionAriaText = this.callToActionAriaTextComponent.current.getData();\r\n }\r\n\r\n _.extend(data, { Campaign: { Id: campaignId }, AdGroup: { Id: adGroupId } });\r\n\r\n if (this.isUpdate) {\r\n data.Id = this.ad.Id;\r\n data = this.deleteUndefinedParameters(data);\r\n }\r\n\r\n if (this.isMMAEnabled) {\r\n data.Headlines = JSON.stringify(_.map(_.filter(\r\n this.headlineFields,\r\n field => !_.isEmpty(data[field])\r\n ), field => ({\r\n Text: data[field],\r\n })));\r\n data.LongHeadlines = JSON.stringify(_.map(_.filter(\r\n this.longHeadlineFields,\r\n field => !_.isEmpty(data[field])\r\n ), field => ({\r\n Text: data[field],\r\n })));\r\n data.Descriptions = JSON.stringify(_.map(_.filter(\r\n this.descriptionFields,\r\n field => !_.isEmpty(data[field])\r\n ), field => ({\r\n Text: data[field],\r\n })));\r\n if (this.isBulkEditMMA) {\r\n data.AdStatus = this.adStatus() || '';\r\n }\r\n }\r\n\r\n return _.omit(data, this.isEmpty);\r\n }\r\n\r\n /**\r\n * Set the optional parameters that are set to emty, to be 'delete_value', so that they get\r\n * deleted during the ad update.\r\n *\r\n * @param {object} params The object to be sent on the update request.\r\n *\r\n * @returns {object} Updated object to be sent to the update request.\r\n *\r\n */\r\n deleteUndefinedParameters(params) {\r\n const optionalParameters = ['MobileFinalUrls', 'TrackingUrlTemplate', 'UrlCustomParameters', 'LandscapeLogoMediaId', 'SquareLogoMediaId', 'FinalUrlSuffix'];\r\n\r\n if (this.isImpressionTrackingUrlsEnabled) {\r\n optionalParameters.push('ImpressionTrackingUrls');\r\n }\r\n\r\n if (this.isMMAEnabled) {\r\n optionalParameters.push(...[\r\n 'Headline',\r\n 'LongHeadline',\r\n 'Text',\r\n ]);\r\n }\r\n\r\n if (this.isThirdPartyMeasurementEnabled) {\r\n optionalParameters.push('VerifiedTrackingData');\r\n }\r\n\r\n _.forEach(optionalParameters, (p) => {\r\n if (this.isEmpty(params[p]) || (params[p] instanceof Array && params[p].length === 0)) {\r\n // eslint-disable-next-line no-param-reassign\r\n params[p] = 'delete_value';\r\n }\r\n });\r\n\r\n return params;\r\n }\r\n\r\n isAdNotEmpty(ad) {\r\n return _.get(ad, 'Id', -1) > 0;\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 const self = this;\r\n\r\n _.each(_.range(this.viewModel.showHeadlineCount()), (i) => {\r\n const element = self.$(`.iconba.iconba-Lightbulb.Headline${i}-AIGeneratedAsset`);\r\n _.first(element).style.display = this.ad.Headlines[i].IsAlgoGeneratedAsset ? 'inline-block' : 'none';\r\n attachAIGenAssetContextualAttribute(_.extend({\r\n element,\r\n i18n: this.i18n,\r\n improveMMAOption: { type: 'Text' },\r\n newI18n: this.newI18n,\r\n }));\r\n });\r\n\r\n _.each(_.range(this.viewModel.showLongHeadlineCount()), (i) => {\r\n const element = self.$(`.iconba.iconba-Lightbulb.LongHeadline${i}-AIGeneratedAsset`);\r\n _.first(element).style.display = this.ad.LongHeadlines[i].IsAlgoGeneratedAsset ? 'inline-block' : 'none';\r\n attachAIGenAssetContextualAttribute(_.extend({\r\n element,\r\n i18n: this.i18n,\r\n improveMMAOption: { type: 'Text' },\r\n newI18n: this.newI18n,\r\n }));\r\n });\r\n\r\n _.each(_.range(this.viewModel.showDescriptionCount()), (i) => {\r\n const element = self.$(`.iconba.iconba-Lightbulb.Description${i}-AIGeneratedAsset`);\r\n _.first(element).style.display = this.ad.Descriptions[i].IsAlgoGeneratedAsset ? 'inline-block' : 'none';\r\n attachAIGenAssetContextualAttribute(_.extend({\r\n element,\r\n i18n: this.i18n,\r\n improveMMAOption: { type: 'Text' },\r\n newI18n: this.newI18n,\r\n }));\r\n });\r\n }\r\n\r\n updateAIGenAssetContextualAttributeStatus(field, display) {\r\n const aiGeneratedAssetContainer = $(`.${field}-AIGeneratedAsset`);\r\n\r\n if (!_.isEmpty(aiGeneratedAssetContainer) && aiGeneratedAssetContainer.length > 0) {\r\n _.first(aiGeneratedAssetContainer).style.display = display;\r\n }\r\n }\r\n\r\n getAIGenAssetContextualAttributeStatus(field) {\r\n const aiGeneratedAssetContainer = $(`.${field}-AIGeneratedAsset`);\r\n\r\n if (!_.isEmpty(aiGeneratedAssetContainer) && aiGeneratedAssetContainer.length > 0) {\r\n return _.first(aiGeneratedAssetContainer).style.display;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getBiddingSchemeType(options = {}) {\r\n if (this.isUpdate) {\r\n return _.get(options.ad, ['BiddingScheme', 'Type'], '');\r\n }\r\n return _.get(options, ['biddingScheme', 'Type'], '');\r\n }\r\n\r\n getVerifiedTrackingSettingAttachment(verifiedTrackingSettings = null) {\r\n if (_.isNull(verifiedTrackingSettings)) {\r\n return {};\r\n }\r\n\r\n if (_.isEmpty(verifiedTrackingSettings)) {\r\n return { VerifiedTrackingData: '' };\r\n }\r\n\r\n const result = [];\r\n _.mapObject(verifiedTrackingSettings, (value, key) => {\r\n result.push({ Key: key, Value: value });\r\n });\r\n\r\n return { VerifiedTrackingData: JSON.stringify([result]) };\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\n\r\nexport const AccountSettingRepository = {\r\n getAccountSettings: (settings) => {\r\n const config = DependencyResolver.get('component/config/index');\r\n const cid = _.result(config.get('CurrentCustomer'), 'Id');\r\n const aid = _.result(config.get('CurrentAccount'), 'Id');\r\n const url = `${config.get('odata.url')}${config.get('odata.path')}/Customers(${cid})/Accounts(${aid})?$select=${settings.join(',')}`;\r\n\r\n return odata.get(url, { oDataToken: config.get('odata.token') });\r\n },\r\n\r\n updateAccountSettings: (data) => {\r\n const config = DependencyResolver.get('component/config/index');\r\n const cid = _.result(config.get('CurrentCustomer'), 'Id');\r\n const aid = _.result(config.get('CurrentAccount'), 'Id');\r\n\r\n const url = `${config.get('odata.url')}${config.get('odata.path')}/Customers(${cid})/Accounts(${aid})`;\r\n return odata.patch(url, { data, oDataToken: config.get('odata.token') });\r\n },\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport {\r\n constants,\r\n ImageExperienceImage,\r\n} from '@bingads-webui-campaign-react/image-experience';\r\nimport {\r\n newVideoFromGridObject,\r\n newVideoFromMTObject,\r\n} from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { getAllImagesInfoFromMTAssets, getImageProps } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\n/**\r\n * Get videos with original thumbnail url and custom thumbnail record.\r\n * @param {object} odata OData object for sending request\r\n * @param {string} baseURL URL with customer ID and account ID\r\n * @param {Array} videos Array of videos from Ad\r\n * @returns {Promise} resolve list of videos and custom thumbnail record.\r\n */\r\nexport const getVideosAndThumbnailsFromMTAssets = (\r\n odata,\r\n baseURL,\r\n videos\r\n) => {\r\n const thumbnailRecord = {};\r\n const thumbnailAssets = _.pluck(videos, 'Asset').map(asset => ({ Asset: asset.CustomThumbnailAsset || {} }));\r\n\r\n const options = {\r\n mTAssetArrays: thumbnailAssets,\r\n baseURL,\r\n odata,\r\n };\r\n\r\n return getAllImagesInfoFromMTAssets(options)\r\n .then(imageToUrlMap => Promise.all(constants.videoTypesWithOrder.map((videoType) => {\r\n const videoWrapper = videos.find(v => v.Asset.SubType === videoType);\r\n const video = videoWrapper.Asset;\r\n let thumbnail;\r\n const customThumbnailAsset = video && video.CustomThumbnailAsset;\r\n if (customThumbnailAsset) {\r\n const imageProps = getImageProps(customThumbnailAsset, imageToUrlMap, true);\r\n imageProps.type = customThumbnailAsset.SubType;\r\n thumbnail = new ImageExperienceImage(imageProps);\r\n }\r\n\r\n // MT overrides ThumbnailUrl so we need to restore it by calling OData\r\n if (thumbnail) {\r\n thumbnailRecord[thumbnail.Type] = thumbnail;\r\n const url = `${baseURL}Videos/${video.Id}`;\r\n return odata.get(url)\r\n .then(asset => newVideoFromMTObject({ ...asset, SubType: videoType }));\r\n }\r\n return Promise.resolve(newVideoFromGridObject(video));\r\n }))\r\n .then(videoList => ({ videoList, thumbnailRecord })));\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport { AdEditFields, assetSuggestionType } from '../constants';\r\n\r\n// used for audience campaign non multimedia ad\r\nexport const getTextSuggestionAdoption = (textSuggestions, saveAdParams) => {\r\n const finalUrl = _.first(saveAdParams.FinalUrls);\r\n const autoCompleteSuggestions = _.get(textSuggestions, ['autoCompleteSuggestions', finalUrl], []);\r\n const creationSuggestions = _.get(textSuggestions, ['creationSuggestions', finalUrl], []);\r\n const businessNameSuggestions = _.get(textSuggestions, ['businessNameSuggestions', finalUrl], []);\r\n\r\n const suggestionMatch = (suggestion, assetType, testValue) =>\r\n suggestion.AssetType === assetType && suggestion.Text === testValue;\r\n\r\n return Object.keys(AdEditFields).reduce((textSuggestionAdoption, field) => {\r\n textSuggestionAdoption[field] = {\r\n value: saveAdParams[field],\r\n };\r\n const suggestionMatchForField =\r\n _.partial(suggestionMatch, _, assetSuggestionType[field], saveAdParams[field]);\r\n\r\n if (field === AdEditFields.BusinessName) {\r\n textSuggestionAdoption[field].isSuggestionAdopted =\r\n businessNameSuggestions.some(suggestionMatchForField);\r\n } else {\r\n textSuggestionAdoption[field].isSuggestionAdopted =\r\n autoCompleteSuggestions.some(suggestionMatchForField) ||\r\n creationSuggestions.some(suggestionMatchForField);\r\n }\r\n return textSuggestionAdoption;\r\n }, {});\r\n};\r\n","export const getStyle = () => ({\r\n imagePlaceholder: {\r\n width: 115,\r\n height: 98,\r\n display: 'block',\r\n border: '2px solid #1079d1',\r\n objectFit: 'cover',\r\n },\r\n portraitWithImage: {\r\n position: 'relative',\r\n\r\n '& .image-edit': {\r\n position: 'absolute',\r\n border: 'none',\r\n height: 32,\r\n width: 32,\r\n borderRadius: '50%',\r\n backgroundColor: 'rbga(255,255,255,0.5)',\r\n left: 17,\r\n top: 57,\r\n '&:hover': {\r\n backgroundColor: '#106ebeff',\r\n '&:before': {\r\n color: '#fff',\r\n },\r\n },\r\n },\r\n '& .image-delete': {\r\n position: 'absolute',\r\n border: 'none',\r\n height: 32,\r\n width: 32,\r\n borderRadius: '50%',\r\n backgroundColor: 'rbga(255,255,255,0.5)',\r\n left: 60,\r\n top: 57,\r\n '&:hover': {\r\n backgroundColor: '#106ebeff',\r\n '&:before': {\r\n color: '#fff',\r\n },\r\n },\r\n },\r\n '& .image-add': {\r\n height: 32,\r\n width: 122,\r\n },\r\n },\r\n});\r\n","import { result } from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\n\r\nexport const getImageData = async (id) => {\r\n const cid = result(config.get('CurrentCustomer'), 'Id');\r\n const aid = result(config.get('CurrentAccount'), 'Id');\r\n const url = `${config.get('odata.url')}${config.get('odata.path')}/Customers(${cid})/Accounts(${aid})/Images(${id})`;\r\n\r\n return odata.get(url, { oDataToken: config.get('odata.token') });\r\n};\r\n","/* eslint-disable react/prop-types */\r\nimport React, { useCallback, useState, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport { AddImageCrudAdComponent } from '@bingads-webui-campaign-react/add-media-panel-crud-ad';\r\nimport { useAssetLibraryImagePicker, useImagePicker, useWebsiteSuggestion } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { MediaEditorPanel } from '@bingads-webui-campaign-react/media-editor-panel';\r\nimport { PivotItemKey } from '@bingads-webui-campaign-react/media-editor';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { MediaRepository } from '@bingads-webui-campaign/media-repository';\r\nimport { ImageExperienceImage } from '@bingads-webui-campaign-react/image-experience';\r\n\r\nimport { getStyle } from './style';\r\nimport { getImageData } from './image-repository';\r\n\r\nconst BoostImage = ({\r\n cid,\r\n aid,\r\n i18n,\r\n permissions,\r\n oDataConfig,\r\n instrumentation,\r\n activityLogger,\r\n url,\r\n preferencesService,\r\n perfMarker,\r\n onSavePortraitImage,\r\n associatedImages,\r\n dateFormat,\r\n timeZone,\r\n serverContext,\r\n}) => {\r\n const maxUploadNum = 1;\r\n const [isImageEditDisplayed, setIsImageEditDisplayed] = useState(false);\r\n const [image, setImage] = useState();\r\n const classes = useDefaultStyles(getStyle);\r\n\r\n const {\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n } = useImagePicker();\r\n\r\n const mediaRepository = useMemo(() => new MediaRepository({\r\n cid,\r\n aid,\r\n oDataConfig,\r\n }), [aid, cid, oDataConfig]);\r\n\r\n const onNewImageSelected = useCallback((imagePlacements) => {\r\n const newImage = imagePlacements[0][0];\r\n setDisplayImagePicker(false);\r\n setImage(newImage);\r\n onSavePortraitImage(newImage);\r\n }, [setImage, setDisplayImagePicker, onSavePortraitImage]);\r\n\r\n const minCropSize = [470, 940];\r\n\r\n const {\r\n imagePickerError,\r\n setImagePickerError,\r\n clearImagePickerError,\r\n uploadImage,\r\n processUploadedImage,\r\n minSize,\r\n addImageByUrl,\r\n getStockImages,\r\n onSelectStockImage,\r\n onImageSelected,\r\n onImagesSelected,\r\n socialMediaDataSource,\r\n customMediaSourceConfig,\r\n } = useAssetLibraryImagePicker({\r\n cid,\r\n aid,\r\n oDataConfig,\r\n onNewImageSelected,\r\n i18n,\r\n permissions,\r\n isPortraitImage: true,\r\n });\r\n\r\n const {\r\n suggestionState,\r\n suggestionPoller,\r\n } = useWebsiteSuggestion({\r\n oDataConfig,\r\n adContext: {\r\n advertiserCustomerId: cid,\r\n accountId: aid,\r\n },\r\n instrumentation,\r\n logActivity: activityLogger.signal.bind(activityLogger),\r\n permissions,\r\n fullUrl: url,\r\n adCreatorScenario: {\r\n scenarioName: 'BoostImageAdCreation',\r\n scenarioValue: 'BoostImageAdCreation',\r\n },\r\n });\r\n\r\n const { suggestion = {} } = suggestionState;\r\n\r\n const onEdit = () => {\r\n setIsImageEditDisplayed(true);\r\n };\r\n\r\n const onRemove = () => {\r\n setImage({});\r\n onSavePortraitImage({});\r\n };\r\n\r\n const onSaveEditImage = (imagePlacement) => {\r\n image.cropSettings = imagePlacement.cropSettings;\r\n setImage(image);\r\n setIsImageEditDisplayed(false);\r\n onSavePortraitImage(image);\r\n };\r\n\r\n if (!_.isEmpty(associatedImages) && image === undefined) {\r\n const portraitImage = associatedImages.find(i => constants.portraitSubtypes[i.Asset.SubType]);\r\n if (!_.isUndefined(portraitImage)) {\r\n getImageData(portraitImage.Asset.Id).then((imgObjMT) => {\r\n window.console.log(imgObjMT);\r\n\r\n const portraitImageExperienceImage = new ImageExperienceImage({\r\n id: portraitImage.Asset.Id,\r\n src: imgObjMT.OriginalUrl,\r\n type: constants.portraitSubtypes[portraitImage.Asset.SubType],\r\n width: imgObjMT.Width,\r\n height: imgObjMT.Height,\r\n associationType: portraitImage.Asset.SubType,\r\n disableEdit: false,\r\n isIncluded: true,\r\n isLogo: false,\r\n isRecommendedImage: false,\r\n source: imgObjMT.SourceType,\r\n cropSettings: {\r\n SourceX: portraitImage.Asset.CropX,\r\n SourceY: portraitImage.Asset.CropY,\r\n SourceHeight: portraitImage.Asset.CropHeight,\r\n SourceWidth: portraitImage.Asset.CropWidth,\r\n },\r\n });\r\n setImage(portraitImageExperienceImage);\r\n });\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n
    {i18n.getString(_TL_('Portrait image'))}
    \r\n
    \r\n
    \r\n {!(image instanceof ImageExperienceImage) && (\r\n \r\n )}\r\n {image instanceof ImageExperienceImage && (\r\n \r\n \"\"\r\n \r\n \r\n \r\n )}\r\n
    \r\n {\r\n setDisplayImagePicker(newOpen);\r\n if (!newOpen) {\r\n clearImagePickerError();\r\n }\r\n }}\r\n uploadImage={uploadImage}\r\n processUploadedImage={processUploadedImage}\r\n minSize={minSize}\r\n maxUploadNum={maxUploadNum}\r\n imageExperienceProps={{\r\n suggestion,\r\n suggestionPoller,\r\n finalUrl: url,\r\n imageOption: constants.imageOptionKeys.Portrait,\r\n isPortraitImage: true,\r\n }}\r\n addImageByUrl={addImageByUrl}\r\n managedViewSelectionState={selectedMediaPanelSource}\r\n updateManagedViewSelectionState={setSelectedMediaPanelSource}\r\n stockImageConfig={{\r\n getStockImages,\r\n onSelectStockImage,\r\n }}\r\n socialImageConfig={{\r\n socialMediaDataSource,\r\n activityLogger,\r\n }}\r\n assetLibraryConfig={{\r\n cid,\r\n aid,\r\n oDataConfig,\r\n dateFormat,\r\n timeZone,\r\n preferencesService,\r\n activityLogger,\r\n onImageSelected,\r\n onImagesSelected,\r\n onImageAddError: e => setImagePickerError(e),\r\n }}\r\n i18n={i18n}\r\n cid={cid.toString()}\r\n aid={aid.toString()}\r\n errorMessage={imagePickerError}\r\n imageType={null}\r\n customMediaSourceConfig={customMediaSourceConfig}\r\n perfMarker={perfMarker}\r\n permissions={permissions}\r\n serverContext={serverContext}\r\n />\r\n\r\n {(image instanceof ImageExperienceImage) && (\r\n setIsImageEditDisplayed(false)}\r\n onApply={onSaveEditImage}\r\n mediaRepository={mediaRepository}\r\n aspectRatioConfig={constants.aspectRatiosForBoostPortrait}\r\n cropSettings={image.cropSettings}\r\n minCropSize={minCropSize}\r\n baseImage={{\r\n Type: image.Type,\r\n Src: image.Src,\r\n Width: image.Width,\r\n Height: image.Height,\r\n }}\r\n adCreatorScenario={{\r\n scenarioName: 'BoostImageAdCreation',\r\n scenarioValue: 'BoostImageAdCreation',\r\n }}\r\n disabledPivotItemKeys={[PivotItemKey.Effect]}\r\n customizedDefaultSelectedPivotItemKey={PivotItemKey.Crop}\r\n />)}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport { BoostImage };\r\n","/* eslint-disable react/no-array-index-key */\r\n/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport classnames from 'classnames';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { BackboneViewWrapper } from '@bingads-webui-react/backbone-view-wrapper';\r\nimport { bulkEditChange } from '@bingads-webui-campaign-legacy/bulk-edit/service/bulk-edit';\r\nimport getParams from '@bingads-webui-campaign-legacy/bulk-edit/service/get-params';\r\nimport { bulkApiErrorNumberToErrorMessageMapping } from '@bingads-webui-campaign/api-errors';\r\n\r\nimport {\r\n MessageBar,\r\n MessageBarType,\r\n} from '@bingads-webui-react/fabric-control';\r\nimport {\r\n Row,\r\n Col,\r\n Button,\r\n} from '@bingads-webui-react/primitive';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport {\r\n ImageExperience,\r\n PreviewCarousel,\r\n MMAPreviewCarousel,\r\n UnifiedPreviewCarousel,\r\n UnifiedMMAMSANPreviewCarousel,\r\n SavedAdList,\r\n constants,\r\n getAutoCroppedImages,\r\n} from '@bingads-webui-campaign-react/image-experience';\r\nimport { VideoPreviewCarousel } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport {\r\n SuggestionPoller,\r\n MediaRepository,\r\n SuggestionStatus,\r\n mapSuggestionResponseToState,\r\n} from '@bingads-webui-campaign/media-repository';\r\nimport { isValidUrl } from '@bingads-webui/url-util';\r\nimport { ImageOData } from '@bingads-webui-campaign/image-odata';\r\nimport {\r\n getAdCreatorInstrumentation,\r\n instrumentationScenarios,\r\n} from '@bingads-webui-campaign/ad-creator-tools-instrumentation';\r\nimport { ImageSuggestionCarousel } from '@bingads-webui-campaign-react/image-suggestion-carousel';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport {\r\n getImagesFromMTAssetsAsync,\r\n getMultiImagesFromMTAssetsAsync,\r\n uploadRecommendImage,\r\n omitDeletedParameters,\r\n setMTImageModel,\r\n getFlattenedImageAssetList,\r\n updateAssetsIdsAsync,\r\n} from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\nimport { AdEdit } from './ad-edit/view';\r\nimport { AccountSettingRepository } from './utils/account-setting-repository';\r\nimport { getVideosAndThumbnailsFromMTAssets } from './utils/video-repository-util';\r\nimport { logSaveAdInfoForMetrics } from './utils/save-ad-logging';\r\nimport { getTextSuggestionAdoption } from './asset-suggestion/asset-suggestion-log';\r\nimport { RecommendAdList, getRecommendCacheByUrl } from './ad-recommend';\r\nimport { BoostImage } from './boost-image';\r\nimport { getUnifiedAdPreviewConfig } from './get-unified-ad-preview-config';\r\n\r\nconst initialState = {\r\n shortHeadline: '',\r\n longHeadline: '',\r\n description: '',\r\n businessName: '',\r\n url: '',\r\n protocol: 'https://',\r\n callToAction: '',\r\n imageList: [],\r\n savedAdsList: [],\r\n videoList: [],\r\n thumbnailRecord: {}, // { VideoMedia16X9Thumbnail: object, ... }\r\n isAdEditShown: true,\r\n imageErrorMessages: [],\r\n videoErrorMessages: [],\r\n genericErrorMessages: [],\r\n errorCodes: [],\r\n currentAd: null,\r\n isBlocking: false,\r\n draftUnsaved: false,\r\n isStockPhotoEnabled: false,\r\n oDataConfig: null,\r\n videoUploading: false,\r\n currentSelectedImageId: null,\r\n currentSelectedLogoId: null,\r\n cropImage: null,\r\n blockCarousel: false,\r\n hasWebsiteImageOptedIn: true,\r\n enableAutoRotate: true,\r\n hasManualCroppedLogo: false,\r\n hasManualCroppedImage: false,\r\n hasUsedViewAllPlacements: false,\r\n isRecommendAd: false,\r\n hotspots: [],\r\n mmaBulkConversionStatus: 'Active',\r\n isBulkEditMMA: true,\r\n isBulkEditMMAUnSaved: false,\r\n campaignSettings: [],\r\n ...mapSuggestionResponseToState(SuggestionStatus.EmptyURL),\r\n};\r\n\r\nexport class CrudAudienceAdReact extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.perfMarker = props.perfMarker;\r\n this.perfMarker.willInit();\r\n\r\n this.isAdRecommendationMSANEnabled = props.isAdRecommendationMSANEnabled;\r\n // override only in Ad creation scenario and not opt out the prefill\r\n // no prefill in some test cases\r\n this.shouldOverrideAdInEditor = !props.ad && !_.result(props.permissions.dynamic, 'OptOutMSANAdRecommendationPrefill') && !window.e2eTestEnvironment;\r\n\r\n this.isMultiMediaAdsPhase2Enabled = props.permissions.IsMultiMediaAdsPhase2Enabled;\r\n this.IsVideoAdEditorEnabled = props.permissions &&\r\n props.permissions.IsVideoAdEditorEnabled;\r\n\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n\r\n this.isMSANBoostEnabled = props.isAudienceCampaign && props.permissions.IsAmplifyEnabled;\r\n this.isBoostPortraitImageEnabled = this.isMSANBoostEnabled && props.permissions.IsBoostPortraitImageEnabled;\r\n this.isBoost200x100ImageEnabled = this.isMSANBoostEnabled && props.permissions.IsBoost200x100ImageEnabled;\r\n this.isBoostNewAspectRatioSupportEnabled = this.isMSANBoostEnabled && props.permissions.IsBoostNewAspectRatioSupportEnabled;\r\n\r\n this.isNativeAd = props.isAudienceCampaign\r\n && (_.result(props.viewContext.currentCampaign, 'CampaignSubType') === 'AudienceStatic'\r\n || _.result(props.viewContext.currentCampaign, 'CampaignSubType') === 0);\r\n\r\n this.isAudienceImageUpscale = this.isNativeAd && _.result(props.permissions.dynamic, 'AudienceImageUpscale');\r\n\r\n this.isMSANLogoAndCTAForMMAEnabled = props.isAudienceCampaign && !this.isMSANBoostEnabled\r\n && (_.result(props.viewContext.currentCampaign, 'CampaignSubType') === 'AudienceStatic'\r\n || _.result(props.viewContext.currentCampaign, 'CampaignSubType') === 0)\r\n && props.permissions.IsMSANLogoAndCTAForMMAEnabled;\r\n\r\n this.isLogoEnabled =\r\n (this.props.isMultimediaAd && props.permissions.IsMultiMediaAdsPhase2Enabled && !props.isRecommendation)\r\n || (props.isAudienceCampaign && props.permissions.IsAmplifyEnabled)\r\n || this.isMSANLogoAndCTAForMMAEnabled;\r\n\r\n this.recommendAssetIdImageUrlMap = {};\r\n this.imageTypesWithOrder = constants.getImageTypesWithOrder(this.props.isMultimediaAd); // eslint-disable-line max-len\r\n\r\n this.defaultPreviewFields = {\r\n shortHeadline: props.i18n.getString('Audience_Campaign_Ad_Preview_Default_ShortHeadline'),\r\n longHeadline: props.i18n.getString('Audience_Campaign_Ad_Preview_Default_LongHeadline'),\r\n description: props.i18n.getString('Audience_Campaign_Ad_Preview_Default_Description'),\r\n businessName: props.i18n.getString('Audience_Campaign_Ad_Preview_Default_BusinessName'),\r\n callToAction: props.i18n.getString('Audience_Campaign_Ad_Preview_Default_CallToAction'),\r\n url: 'https://example.com',\r\n };\r\n\r\n const newState = {};\r\n // DataProcessorFactory('nnfa');\r\n this.adEditRef = React.createRef();\r\n this.imagePreviewCarouselRef = React.createRef();\r\n this.videoPreviewCarouselRef = React.createRef();\r\n\r\n this.saveAdAsync = this.saveAdAsync.bind(this);\r\n this.saveMMABulkConversion = this.saveMMABulkConversion.bind(this);\r\n this.progressCb = this.progressCb.bind(this);\r\n this.cancelAdAsync = this.cancelAdAsync.bind(this);\r\n\r\n this.isVideo = props.isVideo && this.props.permissions.IsVideoAdsForCampaignEnabled;\r\n\r\n this.baseURL = `/Customers(${props.cid})/Accounts(${props.aid})/`;\r\n\r\n const { isMultimediaAdinMSANEnabled, isMultimediaAd, isBulkEditMMA } = this.props;\r\n this.isMMAEnabled = isMultimediaAdinMSANEnabled || isMultimediaAd;\r\n\r\n this.logInfo = {\r\n isGridDisplay: props.isGridDisplay,\r\n isVideo: this.isVideo,\r\n isMMAInMSAN: isMultimediaAdinMSANEnabled,\r\n isMMASearch: isMultimediaAd && this.isMultiMediaAdsPhase2Enabled,\r\n isEdit: !!props.ad,\r\n };\r\n\r\n this.logWithMetadata('responsive ad editor loaded');\r\n\r\n this.adPreviewPerfMarker = this.props.perfMarker.createChild('adPreviewOpen');\r\n\r\n // collect unSupported ratios, return back to MT when saving\r\n this.UiUnsupportedRatios = [];\r\n\r\n this.isSimplifyAudienceCreation = props.scenario === 'new-audience-static-creation';\r\n\r\n if (props.ad) {\r\n newState.currentAd = props.ad;\r\n newState.isBlocking = false;\r\n newState.shortHeadline = props.ad.Headline;\r\n newState.longHeadline = props.ad.LongHeadline;\r\n newState.description = props.ad.Text;\r\n if ((this.props.isMultimediaAd && this.isMultiMediaAdsPhase2Enabled) ||\r\n isMultimediaAdinMSANEnabled) {\r\n if (!_.isEmpty(props.ad.Headlines)) {\r\n if (_.isEmpty(_.first(props.ad.Headlines).Asset)) {\r\n // edit ad in campaign / ad group creation\r\n newState.shortHeadline = _.first(props.ad.Headlines).Text;\r\n } else {\r\n // edit in grid\r\n newState.shortHeadline = _.first(props.ad.Headlines).Asset.Text;\r\n }\r\n }\r\n if (!_.isEmpty(props.ad.LongHeadlines)) {\r\n if (_.isEmpty(_.first(props.ad.LongHeadlines).Asset)) {\r\n newState.longHeadline = _.first(props.ad.LongHeadlines).Text;\r\n } else {\r\n newState.longHeadline = _.first(props.ad.LongHeadlines).Asset.Text;\r\n }\r\n }\r\n if (!_.isEmpty(props.ad.Descriptions)) {\r\n if (_.isEmpty(_.first(props.ad.Descriptions).Asset)) {\r\n newState.description = _.first(props.ad.Descriptions).Text;\r\n } else {\r\n newState.description = _.first(props.ad.Descriptions).Asset.Text;\r\n }\r\n }\r\n }\r\n newState.businessName = props.ad.BusinessName;\r\n newState.callToAction = props.ad.CallToAction;\r\n newState.url = _.first(props.ad.FinalUrls);\r\n newState.imageList = props.ad.ImageList || [];\r\n if (!_.isEmpty(newState.imageList) && !_.isEmpty(_.first(newState.imageList))) {\r\n newState.currentSelectedImageId = this.getDefaultCurrentSelectedImageId(newState.imageList);\r\n }\r\n newState.isStockPhotoEnabled = true;\r\n newState.hotspots = _.map(props.ad.HotSpots, item =>\r\n item.Asset && {\r\n title: item.Asset.Title,\r\n desc: item.Asset.Description,\r\n actionText: item.Asset.ActionText,\r\n glyph: item.Asset.Glyph,\r\n uri: item.Asset.Uri,\r\n placement: item.Asset.Placement,\r\n });\r\n newState.oDataConfig = {\r\n odataRootUrl: 'test.com',\r\n odataPath: '/Mock/',\r\n odataToken: 'token',\r\n };\r\n\r\n // For Image Suggestion from Final URL\r\n if (props.isAdCreatorEnabled || props.isFinalUrlImageRetrievalEnabled) {\r\n _.extend(newState, mapSuggestionResponseToState(SuggestionStatus.FetchInProgress));\r\n this.onFinalUrlChanged(newState.url);\r\n }\r\n }\r\n\r\n this.isImageFittingEnabled = _.result(props.permissions.dynamic, 'ImageFittingMVP', false)\r\n && !_.result(props.permissions.dynamic, 'ImageFittingExlcudeMAE', true)\r\n && _.result(props.permissions.dynamic, 'ImageFittingUnifiedImageROI', false)\r\n && !props.ad.LegacyResponsiveAd\r\n && isMultimediaAdinMSANEnabled; // only enable for audience ads for MVP\r\n\r\n this.state = _.defaults(newState, initialState);\r\n this.initialVideos = [];\r\n\r\n this.jsdata = props.jsdata;\r\n this.permissions = props.permissions;\r\n if (this.permissions.IsMMAAutomatedCTAOptInEnabled && props.viewContext.currentCampaign && props.viewContext.currentCampaign.Id && this.jsdata && this.jsdata.Campaign) {\r\n const params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n },\r\n bypassCache: true,\r\n };\r\n this.jsdata.Campaign.find(props.viewContext.currentCampaign.Id, params).then((data) => {\r\n this.setState({ campaignSettings: data.CampaignSettings });\r\n });\r\n }\r\n\r\n if (isMultimediaAdinMSANEnabled) {\r\n this.adCreatorScenario = instrumentationScenarios.MSAN;\r\n } else if (props.isFinalUrlImageRetrievalEnabled) {\r\n this.adCreatorScenario = instrumentationScenarios.MSANImage;\r\n } else if (isMultimediaAd) {\r\n this.adCreatorScenario = instrumentationScenarios.MMA;\r\n } else if (isBulkEditMMA) {\r\n this.adCreatorScenario = instrumentationScenarios.MMAConversion;\r\n } else {\r\n this.adCreatorScenario = instrumentationScenarios.default;\r\n }\r\n\r\n if (props.isAdCreatorEnabled || props.isFinalUrlImageRetrievalEnabled) {\r\n this.suggestionPoller = new SuggestionPoller({\r\n cid: props.cid,\r\n aid: props.aid,\r\n cmpId: props.viewContext.currentCampaign.Id,\r\n oDataConfig: props.oDataConfig,\r\n jobCompleteCallback: this.onPollingSuggestionCompleted.bind(this),\r\n logger: getAdCreatorInstrumentation(this.props.instrumentation, this.adCreatorScenario, this.props.permissions).websiteSuggestionActivity, // eslint-disable-line max-len\r\n });\r\n }\r\n\r\n this.mediaRepository = new MediaRepository({\r\n cid: props.cid,\r\n aid: props.aid,\r\n cmpId: props.viewContext.currentCampaign.Id,\r\n oDataConfig: props.oDataConfig,\r\n });\r\n\r\n this.imageOData = new ImageOData(props.cid, props.aid, props.oDataConfig);\r\n\r\n // this is an observable passed in scenarios where the save ad button is not\r\n // part of this view (e.g. most top of grid scenarios)\r\n this.hasWebsiteImageOptedInObservable = props.hasWebsiteImageOptedInObservable;\r\n\r\n if (!this.hasWebsiteImageOptedInObservable) {\r\n if (props.isAdCreatorEnabled && props.isMultimediaAdinMSANEnabled) {\r\n this.hasWebsiteImageOptedInObservable = (newValue) => {\r\n this.setState({\r\n hasWebsiteImageOptedIn: newValue,\r\n });\r\n };\r\n } else {\r\n this.hasWebsiteImageOptedInObservable = _.noop;\r\n }\r\n }\r\n\r\n this.enableAdPreviewLibrary = _.get(props.permissions.dynamic, 'AdPreviewLibrarySearchMMA', false);\r\n this.props.activityLogger.signal(`crud-audience-ad-react constructor: ${props.permissions.dynamic && props.permissions.dynamic.MMACopilot}`, 'rae-view deprecation');\r\n }\r\n\r\n componentDidMount() {\r\n this.openTime = new Date();\r\n if (this.props.ad) {\r\n if (this.isVideo) {\r\n this.fetchAndFillVideosAsync();\r\n } else if (_.isEmpty(this.state.imageList)) {\r\n this.fetchAndFillImagesAsync();\r\n }\r\n }\r\n this.props.activityLogger.signal(`ad editor opened: isGrid: ${this.props.isGridDisplay}, isEdit: ${!!this.props.ad}, isVideo: ${!!this.isVideo}, url: ${this.state.url}`, 'responsive ad editor');\r\n\r\n this.perfMarker.done();\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.props.isBulkEditMMA) return;\r\n if (this.props.isImproveMMA) return;\r\n if (this.props.isAdCreatorEnabled && this.adEditRef.current && this.adEditRef.current.view.$) {\r\n // disable this from running in unit tests ReactDOM.render will always fail because the 2nd arg is\r\n // not attached to any DOM in unit test scenario\r\n const disabled = (this.state.imageList.length >= constants.DEFAULT_MAX_IMAGE || this.isMSANBoostEnabled);\r\n\r\n ReactDOM.render(\r\n \r\n {\r\n !disabled &&\r\n \r\n {\r\n const { websiteSuggestionCarouselActivity } =\r\n getAdCreatorInstrumentation(this.props.instrumentation, this.adCreatorScenario);\r\n\r\n websiteSuggestionCarouselActivity.trace(`CarouselImageSelected: ${index};`);\r\n\r\n this.setState({ blockCarousel: true });\r\n this.state.addImageCallback(imageSource, constants.imageOptionKeys.Image, suggestionId)\r\n .then((error = {}) => {\r\n if (error && error.errorMessage) {\r\n this.setState({\r\n carousel: {\r\n ...this.state.carousel,\r\n message: {\r\n type: MessageBarType.error,\r\n message: error.errorMessage,\r\n },\r\n },\r\n });\r\n }\r\n return Promise.resolve();\r\n })\r\n .finally(() => {\r\n this.setState({ blockCarousel: false });\r\n });\r\n this.setState({\r\n carousel: {\r\n ...this.state.carousel,\r\n images: _.reject(this.state.carousel.images, (val, ind) => ind === index),\r\n },\r\n });\r\n }}\r\n onSelectSeeAll={() => this.state.openAddImageCallback()}\r\n />\r\n \r\n }\r\n ,\r\n this.adEditRef.current.view.$('.image-suggestion-carousel')[0]\r\n );\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n if (this.suggestionPoller) {\r\n this.suggestionPoller.cancel();\r\n }\r\n }\r\n\r\n onPollingSuggestionCompleted(response, isSubdomainScraping) {\r\n if (response.error) {\r\n // error handling section\r\n this.setState(mapSuggestionResponseToState(SuggestionStatus.ServerError, response));\r\n } else {\r\n this.setState(mapSuggestionResponseToState(\r\n SuggestionStatus.FetchSucceed,\r\n response,\r\n isSubdomainScraping\r\n ));\r\n }\r\n }\r\n\r\n onAdFieldUpdated = (updatedObj) => {\r\n const { isFinalUrlImageRetrievalEnabled, isAdCreatorEnabled } = this.props;\r\n\r\n switch (updatedObj.updatedElement) {\r\n case 'LongHeadline':\r\n this.setState({ longHeadline: updatedObj.text });\r\n break;\r\n\r\n case 'ShortHeadline':\r\n this.setState({ shortHeadline: updatedObj.text });\r\n break;\r\n\r\n case 'Description':\r\n this.setState({ description: updatedObj.text });\r\n break;\r\n\r\n case 'BusinessName':\r\n this.setState({ businessName: updatedObj.text });\r\n break;\r\n\r\n case 'FinalUrl': {\r\n const newUrl = updatedObj.url;\r\n let newState = {};\r\n\r\n\r\n if (isAdCreatorEnabled || isFinalUrlImageRetrievalEnabled) {\r\n const control = this.adEditRef.current.view.adPropertiesToControlMap.FinalUrls;\r\n\r\n let validURL;\r\n if (this.adEditRef.current.view.isMSANBoostEnabled) {\r\n const uriRegex = /^(\\S+:(\\/\\/)?)(\\S+)/;\r\n validURL = uriRegex.test(newUrl);\r\n } else {\r\n validURL = isValidUrl(newUrl);\r\n }\r\n\r\n if (_.isEmpty(newUrl)) {\r\n newState = mapSuggestionResponseToState(SuggestionStatus.EmptyURL);\r\n control.setError(this.props.i18n.getString('Audience_Campaign_Ad_Error_RequiredField'));\r\n } else if (!validURL) {\r\n newState = mapSuggestionResponseToState(SuggestionStatus.InvalidURL);\r\n control.setError(this.props.i18nErrors.getString('API_ErrorNumber_2611')); // eslint-disable-line react/prop-types\r\n } else {\r\n newState = mapSuggestionResponseToState(SuggestionStatus.FetchInProgress);\r\n control.setError('');\r\n }\r\n }\r\n\r\n this.setState(\r\n _.extend({ url: newUrl }, newState),\r\n (isAdCreatorEnabled || isFinalUrlImageRetrievalEnabled) ? () => {\r\n this.onFinalUrlChanged(newUrl);\r\n } : undefined\r\n );\r\n break;\r\n }\r\n case 'CallToAction':\r\n this.setState({ callToAction: updatedObj.text });\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n onUpdateFinalUrlPrefix = (ev, newPrefix) => {\r\n this.setState({ protocol: newPrefix.text });\r\n this.adEditRef.current.view.updateFinalUrlPrefix(newPrefix.text);\r\n };\r\n\r\n onUpdateHotspots = (hotspots) => {\r\n this.setState({\r\n hotspots,\r\n });\r\n };\r\n\r\n onUpdateFinalUrl = (ev) => {\r\n let newState = {};\r\n const newUrl = ev && ev.target && ev.target.value;\r\n if (this.props.isAdCreatorEnabled) {\r\n const finalUrlControl = this.adEditRef.current.view.adPropertiesToControlMap.FinalUrls;\r\n if (!isValidUrl(this.state.protocol + newUrl)) {\r\n newState = mapSuggestionResponseToState(SuggestionStatus.InvalidURL);\r\n finalUrlControl.setError(this.props.i18nErrors.getString('API_ErrorNumber_2611')); // eslint-disable-line react/prop-types\r\n } else {\r\n newState = mapSuggestionResponseToState(SuggestionStatus.FetchInProgress);\r\n finalUrlControl.setError('');\r\n }\r\n }\r\n\r\n this.setState(\r\n _.extend({ url: this.state.protocol + newUrl }, newState),\r\n this.props.isAdCreatorEnabled ? () => {\r\n this.onFinalUrlChanged(this.state.protocol + newUrl);\r\n } : undefined\r\n );\r\n this.adEditRef.current.view.updateFinalUrl(this.state.protocol + newUrl);\r\n this.adEditRef.current.view.finalURLChange();\r\n // call to fetch RSA text field recommendations after updating URL in website image view\r\n };\r\n\r\n\r\n onFinalUrlChanged = _.debounce((url) => {\r\n // cancel existing suggestion poller jobs\r\n if (this.suggestionPoller) {\r\n this.suggestionPoller.cancel();\r\n }\r\n if (this.state.suggestion.inProgress && isValidUrl(url)) {\r\n // first param is aspectRatio type, we don't need it here, so deliver null\r\n const minimumSize = constants.getMinimumSizeForImage(null, this.props.isMultimediaAd);\r\n this.suggestionPoller.getLandingPageSuggestions({\r\n landingPageUrl: url,\r\n enableOfflinePollingDelay: this.props.enableOfflinePollingDelay,\r\n minimumResolution: {\r\n width: minimumSize[0],\r\n height: minimumSize[1],\r\n },\r\n });\r\n }\r\n }, 1000);\r\n\r\n onImageListUpdated = (imageList, currentSelectedId, isLogo) => {\r\n const newState = {\r\n imageList,\r\n enableAutoRotate: true,\r\n cropImage: null,\r\n };\r\n\r\n this.props.activityLogger.signal(`image added: MMAinMSAN: ${this.props.isMultimediaAdinMSANEnabled}`, 'responsive ad editor');\r\n\r\n // log when new images added in audience ads editor\r\n if (this.props.isMultimediaAdinMSANEnabled) {\r\n // eslint-disable-next-line newline-per-chained-call\r\n const newImageList = _.chain(imageList).flatten().map(img => `${img.id}`).uniq().sortBy().value();\r\n // eslint-disable-next-line newline-per-chained-call\r\n const curImageList = _.chain(this.state.imageList).flatten().map(img => `${img.id}`).uniq().sortBy().value();\r\n const newImages = _.difference(newImageList, curImageList);\r\n if (newImages.length > 0) {\r\n this.props.activityLogger.signal(`new images added, isEditing:${!!this.props.ad}, image ids:${newImages.join(',')}, image count:${newImages.length}`, 'responsive ad editor');\r\n }\r\n }\r\n\r\n if ((this.isMMAEnabled && imageList.length > 0) ||\r\n imageList.length === this.imageTypesWithOrder.length) {\r\n newState.imageErrorMessages = [];\r\n }\r\n\r\n if (this.isMMAEnabled) {\r\n let selectedId = currentSelectedId || (isLogo ? this.state.currentSelectedLogoId : this.state.currentSelectedImageId);\r\n const exist = this.findImageSetById(\r\n isLogo ? this.getLogoList(imageList) : this.getImageListWithoutLogo(imageList),\r\n isLogo ? this.state.currentSelectedLogoId : this.state.currentSelectedImageId\r\n );\r\n\r\n if (!exist) {\r\n if (imageList.length > 0) {\r\n selectedId = isLogo ?\r\n this.getDefaultCurrentSelectedLogoId(imageList) :\r\n this.getDefaultCurrentSelectedImageId(imageList);\r\n } else {\r\n selectedId = null;\r\n }\r\n }\r\n\r\n if (isLogo) {\r\n newState.currentSelectedLogoId = selectedId;\r\n } else {\r\n newState.currentSelectedImageId = selectedId;\r\n }\r\n }\r\n\r\n this.setState(newState);\r\n\r\n if (this.props.isAdCreatorEnabled || this.props.isFinalUrlImageRetrievalEnabled) {\r\n const list = _.flatten(newState.imageList, 1);\r\n\r\n AccountSettingRepository.getAccountSettings(['AllowCrawlImagesFromLandingPage']).then((response) => {\r\n const shouldEnableOptIn =\r\n _.result(response, 'AllowCrawlImagesFromLandingPage') !== 'true' &&\r\n _.some(\r\n list,\r\n image =>\r\n image.source === constants.imageSources.Website ||\r\n image.source === constants.imageSources.WebsiteCarousel ||\r\n image.source === constants.imageSources.AdRecommendation\r\n );\r\n\r\n if (this.adEditRef.current) {\r\n const isOptedIn = this.adEditRef.current.view.viewModel.hasWebsiteImageOptIn();\r\n\r\n this.adEditRef.current.view.viewModel.showWebsiteImageOptIn(shouldEnableOptIn);\r\n if (shouldEnableOptIn) {\r\n this.hasWebsiteImageOptedInObservable(isOptedIn);\r\n } else {\r\n this.hasWebsiteImageOptedInObservable(true);\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n onVideoListUpdated = (videoList) => {\r\n const newState = { videoList, draftUnsaved: false };\r\n\r\n if (videoList.length === constants.videoTypesWithOrder.length) {\r\n newState.videoErrorMessages = [];\r\n }\r\n // eslint-disable-next-line max-len\r\n const isCreate = this.initialVideos.length === 0 && videoList.length === constants.videoTypesWithOrder.length;\r\n const isVideoUpdated = this.initialVideos.length === videoList.length &&\r\n videoList.some((video, index) => video.Id !== this.initialVideos[index].Id);\r\n newState.draftUnsaved = isCreate || isVideoUpdated;\r\n\r\n this.setState(newState);\r\n };\r\n\r\n onSaveThumbnailAsDraft = ({\r\n thumbnailRecord,\r\n }) => {\r\n this.props.activityLogger.signal('save video thumbnail as draft', 'responsive ad editor');\r\n this.setState({\r\n thumbnailRecord,\r\n draftUnsaved: true,\r\n });\r\n };\r\n\r\n onVideoUploadStatusUpdate = (videoUploading) => {\r\n this.setState({\r\n videoUploading,\r\n videoErrorMessages: [],\r\n });\r\n };\r\n\r\n onImagePreviewRequested = (type) => {\r\n if (this.imagePreviewCarouselRef.current) {\r\n this.imagePreviewCarouselRef.current.setPreviewIndexByType(type);\r\n }\r\n };\r\n\r\n onVideoPreviewRequested = (type) => {\r\n if (this.videoPreviewCarouselRef.current) {\r\n this.videoPreviewCarouselRef.current.setPreviewIndexByType(type);\r\n }\r\n };\r\n\r\n onImageSelected = (imageId, isLogoSelected = false) => {\r\n if (isLogoSelected) {\r\n this.setState({\r\n currentSelectedLogoId: imageId,\r\n });\r\n } else {\r\n this.setState({\r\n currentSelectedImageId: imageId,\r\n });\r\n }\r\n };\r\n\r\n onImageEditCancelled = () => {\r\n this.setState({\r\n cropImage: null,\r\n enableAutoRotate: true,\r\n });\r\n };\r\n\r\n onCropImage = (imageObj) => {\r\n this.setState({\r\n cropImage: imageObj,\r\n enableAutoRotate: false,\r\n });\r\n };\r\n\r\n onAddAspectRatio = (imageType) => {\r\n const { imageList, currentSelectedImageId } = this.state;\r\n\r\n // We don't support logo in ad preview, so we need to filter out logo images\r\n const imageListWithoutLogo = this.getImageListWithoutLogo(imageList);\r\n const previewImages = this.findImageSetById(imageListWithoutLogo, currentSelectedImageId);\r\n\r\n let newPreviewImages = null;\r\n const targetedRatioIdx = _.findIndex(previewImages, image => image.type === imageType);\r\n if (targetedRatioIdx >= 0) {\r\n const targetedRatio = previewImages[targetedRatioIdx].clone();\r\n targetedRatio.setIncluded(true);\r\n newPreviewImages = [...previewImages];\r\n newPreviewImages.splice(targetedRatioIdx, 1, targetedRatio);\r\n } else {\r\n // for image added before partial aspect ratio is supported, may missed some ratio info\r\n const croppedImages = getAutoCroppedImages({\r\n originalImageToCrop: _.first(previewImages),\r\n isMultimediaAd: this.props.isMultimediaAd,\r\n isMultimediaAdinMSANEnabled: this.props.isMultimediaAdinMSANEnabled,\r\n });\r\n const target = _.find(croppedImages, image => image.type === imageType);\r\n target.isIncluded = true;\r\n newPreviewImages = [...previewImages, target];\r\n newPreviewImages.sort((a, b) => b.aspectRatio - a.aspectRatio);\r\n }\r\n\r\n const newImageList = this.setImageSetById(imageList, currentSelectedImageId, newPreviewImages);\r\n this.onImageListUpdated(newImageList, currentSelectedImageId);\r\n return newImageList;\r\n };\r\n\r\n onRemoveAspectRatio = (imageType) => {\r\n const { imageList, currentSelectedImageId } = this.state;\r\n\r\n // We don't support logo in ad preview, so we need to filter out logo images\r\n const imageListWithoutLogo = this.getImageListWithoutLogo(imageList);\r\n const previewImages = this.findImageSetById(imageListWithoutLogo, currentSelectedImageId);\r\n\r\n const targetedRatioIdx = _.findIndex(previewImages, image => image.type === imageType);\r\n if (targetedRatioIdx >= 0) {\r\n const targetedRatio = previewImages[targetedRatioIdx].clone();\r\n targetedRatio.setIncluded(false);\r\n const newPreviewImages = [...previewImages];\r\n newPreviewImages.splice(targetedRatioIdx, 1, targetedRatio);\r\n const newImageList = this.setImageSetById(imageList, currentSelectedImageId, newPreviewImages);\r\n this.onImageListUpdated(newImageList, currentSelectedImageId);\r\n return newImageList;\r\n }\r\n return imageList;\r\n };\r\n\r\n onAdSaved = (savedAd, imageToGenerateThumbnail) => {\r\n // from MT return, construct a object that AdList needs\r\n let formattedSavedAd;\r\n if (this.props.isMultimediaAdinMSANEnabled) {\r\n formattedSavedAd = _.pick(\r\n savedAd,\r\n 'Id',\r\n 'BusinessName',\r\n 'Headlines',\r\n 'LongHeadlines',\r\n 'Descriptions'\r\n );\r\n } else {\r\n formattedSavedAd = _.pick(\r\n savedAd,\r\n 'Id',\r\n 'Headline',\r\n 'LongHeadline',\r\n 'Text',\r\n 'BusinessName'\r\n );\r\n }\r\n\r\n // get the thumbnail\r\n // eslint-disable-next-line no-nested-ternary\r\n formattedSavedAd.ThumbnailForAdList = (this.isVideo ?\r\n this.state.videoList[0] : imageToGenerateThumbnail)\r\n .ThumbnailForAdList;\r\n\r\n formattedSavedAd.FinalUrls = savedAd.FinalUrls;\r\n\r\n formattedSavedAd.Id = parseInt(formattedSavedAd.Id, 10);\r\n\r\n const savedAdsListWithoutDuplicate =\r\n _.reject(\r\n this.state.savedAdsList,\r\n savedAdItem => parseInt(savedAdItem.Id, 10) === formattedSavedAd.Id\r\n );\r\n\r\n this.setState(_.defaults({\r\n savedAdsList: [\r\n ...savedAdsListWithoutDuplicate,\r\n formattedSavedAd,\r\n ],\r\n isAdEditShown: false,\r\n draftUnsaved: false,\r\n }, initialState), () => {\r\n this.props.onAdSaved(\r\n savedAd,\r\n imageToGenerateThumbnail &&\r\n (imageToGenerateThumbnail.src || imageToGenerateThumbnail.originalUrl)\r\n );\r\n });\r\n };\r\n\r\n onEditAd = (adId) => {\r\n const {\r\n isMultimediaAdinMSANEnabled,\r\n } = this.props;\r\n\r\n this.setState({\r\n isBlocking: true,\r\n });\r\n\r\n let extraExpand = '';\r\n\r\n if (isMultimediaAdinMSANEnabled) {\r\n extraExpand = ',Model.ResponsiveAd/Headlines,Model.ResponsiveAd/LongHeadlines,Model.ResponsiveAd/Descriptions';\r\n }\r\n\r\n this.props.responsiveAdRepository.getAdAsync(adId, extraExpand).then((ad) => {\r\n this.setState({\r\n shortHeadline: ad.Headline,\r\n longHeadline: ad.LongHeadline,\r\n description: ad.Text,\r\n businessName: ad.BusinessName,\r\n url: _.first(ad.FinalUrls),\r\n callToAction: ad.CallToAction,\r\n });\r\n if (this.isVideo) {\r\n return getVideosAndThumbnailsFromMTAssets(\r\n this.props.odata,\r\n this.baseURL,\r\n ad.Videos\r\n ).then(({ videoList, thumbnailRecord }) => {\r\n this.setState({\r\n videoList,\r\n thumbnailRecord,\r\n isAdEditShown: true,\r\n currentAd: ad,\r\n draftUnsaved: false,\r\n });\r\n this.initialVideos = videoList;\r\n });\r\n }\r\n\r\n return this.initializeImagesModelInternal({ ad }).then(({\r\n images,\r\n currentSelectedImageId,\r\n }) => {\r\n this.setState({\r\n isAdEditShown: true,\r\n currentAd: ad,\r\n imageList: images,\r\n currentSelectedImageId,\r\n });\r\n });\r\n }).finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n };\r\n\r\n onRemoveAd = (adId) => {\r\n this.setState({\r\n isBlocking: true,\r\n });\r\n\r\n this.props.responsiveAdRepository.removeAdAsync(adId).then(() => {\r\n // remove the Ad from the list\r\n const updatedSavedAdsList =\r\n _.reject(this.state.savedAdsList, savedAd => parseInt(savedAd.Id, 10) === adId);\r\n\r\n this.setState({\r\n savedAdsList: updatedSavedAdsList,\r\n isAdEditShown: updatedSavedAdsList.length === 0,\r\n });\r\n }).finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n };\r\n\r\n onCreateAd = () => {\r\n this.props.activityLogger.signal(`crud-audience-ad-react saveToClient: ${JSON.stringify(this.pilotCheckLogInfo())}`, 'rae-view deprecation');\r\n\r\n // When reusing the ad edit, clear and reset the Backbone view\r\n if (this.adEditRef.current) {\r\n this.adEditRef.current.view.clear();\r\n }\r\n\r\n this.setState(_.defaults(\r\n { savedAdsList: this.state.savedAdsList },\r\n initialState\r\n ));\r\n this.initialVideos = [];\r\n };\r\n\r\n onSaveRecommendAd = async () => {\r\n await this.saveAdAsync({ recommendSave: true });\r\n };\r\n\r\n onSavePortraitImage = (portraitImage) => {\r\n this.portraitImage = portraitImage;\r\n };\r\n\r\n setUpAdWithRecommendAd = async ({\r\n ad,\r\n isAdEditShown = this.state.isAdEditShown,\r\n shouldSaveAdFromRecommend,\r\n }) => {\r\n const {\r\n odata, cid, aid, oDataConfig,\r\n } = this.props;\r\n this.setState({\r\n shortHeadline: ad.Headline || _.get(ad.Headlines, ['0', 'Asset', 'Text']),\r\n longHeadline: ad.LongHeadline || _.get(ad.LongHeadlines, ['0', 'Asset', 'Text']),\r\n description: ad.Text || _.get(ad.Descriptions, ['0', 'Asset', 'Text']),\r\n businessName: ad.BusinessName,\r\n url: _.first(ad.FinalUrls),\r\n callToAction: ad.CallToAction,\r\n isBlocking: true,\r\n });\r\n\r\n try {\r\n const uploadedImageIds = await uploadRecommendImage(ad.Images, {\r\n cid, aid, oDataConfig,\r\n }, this.recommendAssetIdImageUrlMap);\r\n const images = await getMultiImagesFromMTAssetsAsync(odata, this.baseURL, ad.Images, false, false, this.props.isMMAV2Enabled);\r\n\r\n _.each(images, (ImageExperiences) => {\r\n _.each(ImageExperiences, (image) => {\r\n if (_.contains(uploadedImageIds, image.id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n image.source = constants.imageSources.AdRecommendation;\r\n }\r\n });\r\n });\r\n\r\n let currentSelectedImageId;\r\n if (this.isMMAEnabled && images.length > 0) {\r\n currentSelectedImageId = this.getDefaultCurrentSelectedImageId(images);\r\n }\r\n\r\n this.setState({\r\n isAdEditShown,\r\n currentAd: ad,\r\n imageList: images,\r\n currentSelectedImageId,\r\n isRecommendAd: true,\r\n isBlocking: false,\r\n }, () => {\r\n this.onImageListUpdated(images);\r\n if (shouldSaveAdFromRecommend) {\r\n this.onSaveRecommendAd();\r\n }\r\n });\r\n } catch (error) {\r\n throw new Error('Failed to set up ad with recommend ad');\r\n } finally {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Sets the input elements on the ad model, and returns an object with the parameters\r\n * needed for the save request.\r\n *\r\n * @returns {object} Object with parameters to save the ad.\r\n *\r\n */\r\n getData() {\r\n let data = this.adEditRef.current.view.getData();\r\n\r\n if (this.isVideo) {\r\n const videos = _.map(this.state.videoList, videoObj => videoObj.formatToSave());\r\n const thumbnails = this.IsVideoAdEditorEnabled ?\r\n // eslint-disable-next-line max-len\r\n _.map(_.compact(_.values(this.state.thumbnailRecord)), thumbnail => thumbnail.formatToSave(false, true, true))\r\n : [];\r\n\r\n data.Videos = JSON.stringify([...videos, ...thumbnails]);\r\n } else if (!this.props.isAdCreatorEnabled) {\r\n // when ad creator is enabled, the images data model are generated later after async calls\r\n // Only fill in images data model when ad creator is off to not cause confusion\r\n setMTImageModel(\r\n data,\r\n {},\r\n this.state.imageList,\r\n {\r\n isMultimediaAdinMSANEnabled: this.props.isMultimediaAdinMSANEnabled,\r\n isMultimediaAd: this.props.isMultimediaAd,\r\n isMMAV2Enabled: this.props.isMMAV2Enabled,\r\n },\r\n this.UiUnsupportedRatios\r\n );\r\n }\r\n\r\n if (!this.props.isMobileUrlEnabled) {\r\n data = _.omit(data, ['MobileFinalUrls']);\r\n }\r\n\r\n if (!this.props.isImpressionTrackingUrlsEnabled) {\r\n data = _.omit(data, ['ImpressionTrackingUrls']);\r\n }\r\n\r\n return data;\r\n }\r\n\r\n // on top of getData, for images with effects, we need to update image id\r\n getProcessedDataAsync(originalData) {\r\n if (this.isVideo) {\r\n return Promise.resolve({\r\n mtModel: originalData,\r\n });\r\n }\r\n\r\n const flattenedIncludedImageAssetList = getFlattenedImageAssetList(this.state.imageList, this.props.isMultimediaAdinMSANEnabled, this.props.isMultimediaAd);\r\n const imageIndexAsThumbnail = 0;\r\n\r\n return updateAssetsIdsAsync(flattenedIncludedImageAssetList, imageIndexAsThumbnail, this.props.isAdCreatorEnabled, this.imageOData)\r\n .then((updates) => {\r\n const originalThumbnailAsset = flattenedIncludedImageAssetList[imageIndexAsThumbnail];\r\n const overrideInfo = updates[imageIndexAsThumbnail];\r\n let imageToGenerateThumbnail;\r\n\r\n if (overrideInfo) {\r\n imageToGenerateThumbnail = originalThumbnailAsset.copyThumbnailLookToNewImage({\r\n id: overrideInfo.id,\r\n src: overrideInfo.bingSrc,\r\n });\r\n } else {\r\n imageToGenerateThumbnail = originalThumbnailAsset;\r\n }\r\n\r\n if (this.props.isAdCreatorEnabled) {\r\n // when adcreator is off, selection happens earlier in getData/getMMAPayload\r\n // When adcreator is on, selection happens later here after ids are updated\r\n setMTImageModel(\r\n originalData,\r\n updates,\r\n this.state.imageList,\r\n {\r\n isMultimediaAdinMSANEnabled: this.props.isMultimediaAdinMSANEnabled,\r\n isMultimediaAd: this.props.isMultimediaAd,\r\n isMMAV2Enabled: this.props.isMMAV2Enabled,\r\n isBoostPortraitImageEnabled: this.isBoostPortraitImageEnabled,\r\n isBoost200x100ImageEnabled: this.isBoost200x100ImageEnabled,\r\n isBoostNewAspectRatioSupportEnabled: this.isBoostNewAspectRatioSupportEnabled,\r\n isImageFittingEnabled: this.isImageFittingEnabled,\r\n },\r\n this.UiUnsupportedRatios,\r\n this.portraitImage\r\n );\r\n }\r\n\r\n return {\r\n mtModel: originalData,\r\n imageToGenerateThumbnail,\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Sets the error messages for the list of errors received as response from the\r\n * ad creation/update.\r\n *\r\n * @param {object} errors List of errors from response\r\n *\r\n * @returns {undefined} no return value\r\n *\r\n */\r\n /* istanbul ignore next */\r\n\r\n setResponseErrors(errors) {\r\n _.forEach(errors, (error) => {\r\n // fix the bug that error message is not shown for images\r\n error.Property === 'Images' &&\r\n this.setState({\r\n imageErrorMessages: [\r\n this.props.i18nErrors.getString(`API_ErrorNumber_${error.ErrorNumber}`) || this.props.i18nErrors.getString('ErrorNumber_-1'),\r\n ],\r\n });\r\n\r\n if (!this.adEditRef.current.view.setError(error)) {\r\n this.setState({\r\n genericErrorMessages: [\r\n ...this.state.genericErrorMessages,\r\n error.message,\r\n ],\r\n });\r\n }\r\n });\r\n\r\n this.setState({\r\n errorCodes: _.map(errors, error => error.ErrorNumber),\r\n });\r\n }\r\n\r\n setBulkEditStatus(status) {\r\n this.setState({\r\n mmaBulkConversionStatus: status,\r\n });\r\n }\r\n\r\n getFirstElement(item) {\r\n if (_.isArray(item)) {\r\n return _.first(item);\r\n }\r\n return item;\r\n }\r\n\r\n getLogo = (imageList) => {\r\n const { currentSelectedLogoId } = this.state;\r\n\r\n const logos = _.filter(imageList, imageArr =>\r\n this.getFirstElement(imageArr).isLogo === true);\r\n if (currentSelectedLogoId) {\r\n return _.find(logos, logo => _.first(logo).Id === currentSelectedLogoId) || _.first(logos);\r\n }\r\n return _.first(logos);\r\n };\r\n\r\n getImageListWithoutLogo = imageList => _.filter(imageList, imageArr =>\r\n this.getFirstElement(imageArr).isLogo !== true);\r\n\r\n getLogoList = imageList => _.filter(imageList, imageArr =>\r\n this.getFirstElement(imageArr).isLogo === true);\r\n\r\n getImagesForPreview() {\r\n const { imageList, currentSelectedImageId } = this.state;\r\n if (this.isMMAEnabled) {\r\n // We don't support logo in ad preview, so we need to filter out logo images\r\n const imageListWithoutLogo = this.getImageListWithoutLogo(imageList);\r\n\r\n if (currentSelectedImageId) {\r\n const previewImages =\r\n this.findImageSetById(imageListWithoutLogo, currentSelectedImageId);\r\n\r\n if (previewImages) {\r\n return previewImages;\r\n }\r\n }\r\n\r\n if (imageListWithoutLogo.length > 0) {\r\n return _.first(imageListWithoutLogo);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n return imageList;\r\n }\r\n\r\n getPreviewTexts = () => ({\r\n longHeadline: this.state.longHeadline && this.state.longHeadline.length > 0 ?\r\n this.state.longHeadline : this.defaultPreviewFields.longHeadline,\r\n shortHeadline: this.state.shortHeadline && this.state.shortHeadline.length > 0 ?\r\n this.state.shortHeadline : this.defaultPreviewFields.shortHeadline,\r\n description: this.state.description && this.state.description.length > 0 ?\r\n this.state.description : this.defaultPreviewFields.description,\r\n businessName: this.state.businessName && this.state.businessName.length > 0 ?\r\n this.state.businessName : this.defaultPreviewFields.businessName,\r\n url: this.state.url && this.state.url.length > 0 ?\r\n this.state.url : this.defaultPreviewFields.url,\r\n callToAction: this.state.callToAction && this.state.callToAction.length > 0 ?\r\n this.state.callToAction : this.defaultPreviewFields.callToAction,\r\n });\r\n\r\n getDefaultCurrentSelectedImageId(imageList) {\r\n const firstPlacementOfFirstImage = _.first(this.getImageListWithoutLogo(imageList)[0]);\r\n\r\n return this.props.isAdCreatorEnabled\r\n ? _.result(firstPlacementOfFirstImage, 'BaseId') : _.result(firstPlacementOfFirstImage, 'Id');\r\n }\r\n\r\n getDefaultCurrentSelectedLogoId(imageList) {\r\n const firstLogo = _.first(this.getLogo(imageList));\r\n return _.result(firstLogo, 'Id');\r\n }\r\n\r\n getOptInPreferenceFlag() {\r\n const { isMultimediaAdinMSANEnabled } = this.props;\r\n\r\n return isMultimediaAdinMSANEnabled ? constants.preferenceFlags.MMAInMSANWebsiteImageOptIn\r\n : constants.preferenceFlags.MMAWebsiteImageOptIn;\r\n }\r\n\r\n setUnSupportedRatios(images = [], isMultimediaAdinMSANEnabled) {\r\n if (isMultimediaAdinMSANEnabled) {\r\n const msanAspectRatioAssociations =\r\n Object.values(constants.getAspectRatios({ isMultimediaAdinMSANEnabled }))\r\n .map(item => item.associationType);\r\n this.UiUnsupportedRatios = images.filter(image => !_.contains(msanAspectRatioAssociations, _.get(image, ['Asset', 'SubType'])));\r\n }\r\n }\r\n getBulkEditParams(params) {\r\n const {\r\n CallToAction, CallToActionLanguage, Images, BusinessName, AdStatus,\r\n } = params;\r\n const { allPages, selectedItems, filterService } = this.props;\r\n const AdditionalData = {\r\n BusinessName,\r\n Images,\r\n CallToAction,\r\n CallToActionLanguage,\r\n Status: AdStatus,\r\n };\r\n const batchAction = {\r\n Actions: [{\r\n PasteAs: 'MultiMediaAd',\r\n '@odata.type': '#Model.CopyAction',\r\n AdditionalData: JSON.stringify(AdditionalData),\r\n }],\r\n EditCopy: false,\r\n };\r\n const filters = _.result(filterService, 'query');\r\n const projection = {\r\n selectedIds: allPages ? [] : _.pluck(selectedItems, 'Id'),\r\n isSelectAll: allPages,\r\n filters,\r\n };\r\n const finalParams = getParams(projection, batchAction, 'Ad');\r\n finalParams.Selection.QueryString = finalParams.Selection.QueryString.replace(/CampaignType%20/g, 'Campaign%2FCampaignType%20').replace(/CampaignStatus%20/g, 'Campaign%2FStatus%20').replace(/AdGroupStatus%20/g, 'AdGroup%2FStatus%20');\r\n return finalParams;\r\n }\r\n\r\n setImageSetById = (imageList, baseImageId, newImageSet) => {\r\n if (!baseImageId) return false;\r\n\r\n let imageSetIdx;\r\n\r\n if (this.props.isAdCreatorEnabled) {\r\n imageSetIdx = _.findIndex(imageList, placements =>\r\n placements[0].BaseId.toString() === baseImageId.toString());\r\n } else {\r\n imageSetIdx = _.findIndex(imageList, placements =>\r\n _.some(placements, placement => placement.Id.toString() === baseImageId.toString()));\r\n }\r\n\r\n if (imageSetIdx >= 0) {\r\n const newImageList = [...imageList];\r\n newImageList.splice(imageSetIdx, 1, newImageSet);\r\n return newImageList;\r\n }\r\n return [...imageList, newImageSet];\r\n };\r\n\r\n pilotCheckLogInfo = () => ({\r\n isGridDisplay: this.props.isGridDisplay,\r\n isImproveMMA: this.props.isImproveMMA,\r\n isRecommendation: this.props.isRecommendation,\r\n isMultimediaAd: this.props.isMultimediaAd,\r\n isAdCreatorEnabled: this.props.isAdCreatorEnabled,\r\n isPlaceholderMMA: this.props.isPlaceholderMMA,\r\n isMMAV2Enabled: this.props.isMMAV2Enabled,\r\n isBulkEditMMA: this.props.isBulkEditMMA,\r\n });\r\n\r\n findImageSetById = (imageList, baseImageId) => {\r\n if (!baseImageId) return false;\r\n\r\n let imageSetToEdit;\r\n\r\n if (this.props.isAdCreatorEnabled) {\r\n imageSetToEdit = _.find(imageList, placements =>\r\n placements[0].BaseId.toString() === baseImageId.toString());\r\n } else {\r\n imageSetToEdit = _.find(imageList, placements =>\r\n _.some(placements, placement => placement.Id.toString() === baseImageId.toString()));\r\n }\r\n\r\n return imageSetToEdit;\r\n };\r\n\r\n isOnlyOneIncludedImage = (ratio) => {\r\n const { isMultimediaAdinMSANEnabled } = this.props;\r\n const { imageList } = this.state;\r\n if (!isMultimediaAdinMSANEnabled) {\r\n return false;\r\n }\r\n\r\n return _.filter(imageList, (images) => {\r\n const landscapeImage = images.find(image => image.Type === ratio);\r\n return landscapeImage && landscapeImage.IsIncluded;\r\n }, []).length === 1;\r\n };\r\n\r\n initializeImagesModelInternal({ perfMarker, ad } = {}) {\r\n const {\r\n isMultimediaAdinMSANEnabled,\r\n ad: adProp,\r\n odata,\r\n isMultimediaAd,\r\n isAdCreatorEnabled,\r\n isImproveMMA,\r\n } = this.props;\r\n const finalAd = ad || adProp;\r\n\r\n this.setUnSupportedRatios(finalAd.Image, true);\r\n\r\n const fetchImagesPromise = isMultimediaAdinMSANEnabled ? getMultiImagesFromMTAssetsAsync(\r\n odata,\r\n this.baseURL,\r\n finalAd.Images,\r\n isAdCreatorEnabled,\r\n isImproveMMA,\r\n this.props.isMMAV2Enabled,\r\n this.isBoostPortraitImageEnabled,\r\n this.isBoost200x100ImageEnabled,\r\n this.isBoostNewAspectRatioSupportEnabled,\r\n this.isImageFittingEnabled && !this.isMSANBoostEnabled\r\n ) : getImagesFromMTAssetsAsync(\r\n odata,\r\n this.baseURL,\r\n finalAd.Images,\r\n isMultimediaAd,\r\n isAdCreatorEnabled,\r\n this.isImageFittingEnabled\r\n );\r\n\r\n if (perfMarker) {\r\n perfMarker.willInit();\r\n }\r\n\r\n return fetchImagesPromise.then((images) => {\r\n let currentSelectedImageId = null;\r\n let currentSelectedLogoId = null;\r\n\r\n if (this.isMMAEnabled && images.length > 0) {\r\n currentSelectedLogoId = this.getDefaultCurrentSelectedLogoId(images);\r\n currentSelectedImageId = this.getDefaultCurrentSelectedImageId(images);\r\n }\r\n\r\n return {\r\n images,\r\n currentSelectedLogoId,\r\n currentSelectedImageId,\r\n };\r\n });\r\n }\r\n\r\n fetchAndFillImagesAsync() {\r\n this.setState({ isBlocking: true });\r\n\r\n this.initializeImagesModelInternal({\r\n perfMarker: this.adPreviewPerfMarker,\r\n }).then(({\r\n images,\r\n currentSelectedLogoId,\r\n currentSelectedImageId,\r\n }) => {\r\n this.setState({\r\n imageList: images,\r\n currentSelectedLogoId,\r\n currentSelectedImageId,\r\n });\r\n this.adPreviewPerfMarker.done();\r\n\r\n if (this.props.isMultimediaAdinMSANEnabled) {\r\n // eslint-disable-next-line newline-per-chained-call\r\n const imageIds = _.chain(images).flatten().map(img => `${img.id}`).uniq().sortBy().value();\r\n this.props.activityLogger.signal(`editing ad, image ids:${imageIds.join(',')} image count:${imageIds.length}`, 'responsive ad editor');\r\n }\r\n }).finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n }\r\n\r\n fetchAndFillVideosAsync() {\r\n this.setState({ isBlocking: true });\r\n\r\n getVideosAndThumbnailsFromMTAssets(\r\n this.props.odata,\r\n this.baseURL,\r\n this.props.ad.Videos\r\n ).then(({ videoList, thumbnailRecord }) => {\r\n this.setState({\r\n videoList,\r\n thumbnailRecord,\r\n });\r\n this.initialVideos = videoList;\r\n })\r\n .catch(e => this.setState({\r\n videoErrorMessages: [this.props.i18n.getString('ImageExperience_Video_Error_LoadVideoFail_Template', e)],\r\n }))\r\n .finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n }\r\n\r\n hasCreatedAd() {\r\n this.props.activityLogger.signal(`crud-audience-ad-react saveToClient: ${JSON.stringify(this.pilotCheckLogInfo())}`, 'rae-view deprecation');\r\n return this.state.savedAdsList.length > 0;\r\n }\r\n\r\n cancelAdAsync() {\r\n this.props.activityLogger.signal('cancel ad creation', 'responsive ad editor');\r\n if (this.adEditRef.current) {\r\n this.adEditRef.current.view.clear();\r\n }\r\n\r\n this.setState(_.defaults(\r\n {\r\n savedAdsList: this.state.savedAdsList,\r\n isAdEditShown: false,\r\n isBulkEditMMA: false,\r\n },\r\n initialState\r\n ));\r\n if (this.props.isBulkEditMMA) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n logWithMetadata(api, params = {}) {\r\n this.props.activityLogger.signal({\r\n ...this.logInfo,\r\n ...params,\r\n }, api);\r\n }\r\n\r\n saveAdLog(data) {\r\n const getAssetCount = (assets) => {\r\n if (assets) {\r\n try {\r\n return JSON.parse(assets).length;\r\n } catch (error) {\r\n return 0;\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n let MMAParams = {};\r\n if (this.isMMAEnabled) {\r\n const imageDetails = this.state.imageList.map(images => images.map(image => ({\r\n isIncluded: image.IsIncluded,\r\n isManualEdited: image.isManualEdited(),\r\n type: image.Type,\r\n source: image.source,\r\n })));\r\n\r\n MMAParams = {\r\n imagesCount: this.state.imageList.length,\r\n imageDetails,\r\n };\r\n }\r\n\r\n this.logWithMetadata('responsive ad saved', {\r\n headlinesCount: getAssetCount(data.Headlines),\r\n LongHeadlinesCount: getAssetCount(data.LongHeadlines),\r\n descriptionsCount: getAssetCount(data.Descriptions),\r\n ...MMAParams,\r\n });\r\n }\r\n\r\n saveAdLogForTextRecommendation(saveAdParams) {\r\n const state = DependencyResolver.get('component/state/index');\r\n const textSuggestions = state.get('textSuggestions') || {};\r\n this.logWithMetadata('saveAdLogForTextRecommendation', {\r\n textSuggestions,\r\n textSuggestionAdoption: getTextSuggestionAdoption(textSuggestions, saveAdParams),\r\n });\r\n state.set('textSuggestions', null);\r\n }\r\n\r\n shouldUpdateAccountSettingForAllowCrawlImages() {\r\n return _.chain(this)\r\n .result('adEditRef')\r\n .result('current')\r\n .result('view')\r\n .result('viewModel')\r\n .result('showWebsiteImageOptIn', false)\r\n .value() && this.hasWebsiteImageOptedInObservable();\r\n }\r\n\r\n /**\r\n * Called when the save button is pressed. Saves the ad.\r\n *\r\n * @returns {undefined} no return value\r\n *\r\n */\r\n saveAdAsync({ recommendSave = false } = {}) {\r\n this.props.activityLogger.signal(`click save ad: ${this.state.url}`, 'responsive ad editor');\r\n this.props.activityLogger.signal(`crud-audience-ad-react saveAdAsync: ${JSON.stringify(this.pilotCheckLogInfo())}`, 'rae-view deprecation');\r\n // If not editing anything, just return\r\n if (!this.state.isAdEditShown && !recommendSave) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n // remove errors\r\n this.setState({\r\n imageErrorMessages: [],\r\n videoErrorMessages: [],\r\n genericErrorMessages: [],\r\n errorCodes: [],\r\n });\r\n\r\n if (this.props.isPlaceholderMMA) {\r\n this.setState({\r\n isBlocking: true,\r\n });\r\n return this.props.responsiveAdRepository.savePlaceholderMMA(this.props.pageContext)\r\n .then((data) => {\r\n if (_.isFinite(data.value)) {\r\n _.defaults(data, {\r\n Type: 'Responsive',\r\n });\r\n\r\n this.props.activityLogger.signal('saved an ad', 'placeholder MMA');\r\n this.props.activityLogger.signal(`saved an ad: time cost: ${new Date() - this.openTime}, isGrid: ${this.props.isGridDisplay}, isEdit: ${!!this.props.ad}, isVideo: ${this.isVideo}, isMMAinMSAN: ${this.props.isMultimediaAdinMSANEnabled}`, 'responsive ad editor');\r\n this.openTime = new Date();\r\n return data;\r\n }\r\n\r\n return false;\r\n })\r\n .catch((response) => {\r\n if (response) {\r\n const errorMsgs = [];\r\n const errors = _.unique(response, false, error => error.Code);\r\n\r\n _.forEach(errors, (error) => {\r\n const genericErrorMessage = this.props.i18n.getString(`Multimedia_Ad_Error_${error.Code}`)\r\n || this.props.i18nErrors.getString('ErrorNumber_-1');\r\n errorMsgs.push(genericErrorMessage);\r\n\r\n this.props.activityLogger.signal(error, 'placeholder MMA creation api error');\r\n });\r\n\r\n this.setState({\r\n genericErrorMessages: errorMsgs,\r\n });\r\n return false;\r\n }\r\n this.logWithMetadata('placeholder MMA saving failed');\r\n return false;\r\n })\r\n .finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n }\r\n\r\n const initialParams = this.getData();\r\n\r\n if (!this.isDataValid(initialParams)) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n this.saveAdLog(initialParams);\r\n this.saveAdLogForTextRecommendation(initialParams);\r\n\r\n this.setState({\r\n isBlocking: true,\r\n });\r\n\r\n return this.getProcessedDataAsync(initialParams)\r\n .then((result) => {\r\n const {\r\n mtModel: params,\r\n imageToGenerateThumbnail,\r\n } = result;\r\n\r\n return Promise.all([\r\n this.props.responsiveAdRepository.saveAdAsync(params),\r\n this.shouldUpdateAccountSettingForAllowCrawlImages() ? AccountSettingRepository.updateAccountSettings({ AllowCrawlImagesFromLandingPage: 'true' }) : Promise.resolve(),\r\n ])\r\n .then(([data]) => {\r\n if (_.isFinite(Number(data.Id))) {\r\n // Align with other ad types, since MMA can be mixed with other ads in ad list\r\n if (this.props.isMultimediaAd) {\r\n _.defaults(data, {\r\n Type: 'Responsive',\r\n ThumbnailForAdList: imageToGenerateThumbnail.ThumbnailForAdList,\r\n ImageList: this.state.imageList,\r\n });\r\n // eslint-disable-next-line no-param-reassign\r\n data = omitDeletedParameters(data);\r\n }\r\n\r\n // logging for metrics\r\n if (this.props.instrumentation) {\r\n const enableAdCreatorMetrics = this.props.isAdCreatorEnabled\r\n || this.props.isFinalUrlImageRetrievalEnabled;\r\n const { saveAdActivity } =\r\n getAdCreatorInstrumentation(this.props.instrumentation, this.adCreatorScenario);\r\n const imageList = getFlattenedImageAssetList(this.state.imageList, this.props.isMultimediaAdinMSANEnabled, this.props.isMultimediaAd);\r\n\r\n logSaveAdInfoForMetrics({\r\n data,\r\n saveAdActivity,\r\n imageList,\r\n state: this.state,\r\n enableAdCreatorMetrics,\r\n });\r\n }\r\n\r\n // log for the Ad recommendation\r\n if (this.state.isRecommendAd) {\r\n const recommendData = getRecommendCacheByUrl(this.state.url);\r\n const adData = _.extend(_.pick(data, ['Id', 'FinalUrls', 'AdGroup']), {\r\n Images: JSON.parse(data.Images),\r\n LongHeadlines: JSON.parse(data.LongHeadlines),\r\n Descriptions: JSON.parse(data.Descriptions),\r\n Headlines: JSON.parse(data.Headlines),\r\n });\r\n this.props.activityLogger.signal(\r\n `save the ad from recommendation. The ad id is: ${data.Id}. The final URL: ${this.state.url}. The ad data is: ${JSON.stringify(adData)}. The origin recommend data: ${JSON.stringify(recommendData)}. The assetid and url mapping: ${JSON.stringify(this.recommendAssetIdImageUrlMap)} `,\r\n 'responsive ad recommendation'\r\n );\r\n }\r\n\r\n // Only for a creation wizard scenario\r\n if (!this.props.isGridDisplay) {\r\n this.onAdSaved(data, imageToGenerateThumbnail);\r\n }\r\n\r\n this.props.activityLogger.signal('saved an ad', 'responsive ad editor');\r\n this.props.activityLogger.signal(`saved an ad: time cost: ${new Date() - this.openTime}, isGrid: ${this.props.isGridDisplay}, isEdit: ${!!this.props.ad}, isVideo: ${this.isVideo}, isMMAinMSAN: ${this.props.isMultimediaAdinMSANEnabled}`, 'responsive ad editor');\r\n this.openTime = new Date();\r\n return data;\r\n }\r\n\r\n return false;\r\n });\r\n })\r\n .catch((response) => {\r\n if (response) {\r\n const errors = _.unique(response.errors, false, error => error.ErrorNumber);\r\n\r\n this.setResponseErrors(errors);\r\n if (this.isVideo) {\r\n const newErrors = errors.map(error => (\r\n \r\n {this.i18nErrors.getString(bulkApiErrorNumberToErrorMessageMapping[`API_ErrorNumber_${error.ErrorNumber}`])}\r\n \r\n \r\n ));\r\n\r\n this.setState({\r\n videoErrorMessages: [\r\n ...this.state.videoErrorMessages,\r\n ...newErrors,\r\n ],\r\n });\r\n }\r\n _.each(errors, (error) => {\r\n this.props.activityLogger.signal(error.Error, 'responsive ad creation api error');\r\n });\r\n return false;\r\n }\r\n this.logWithMetadata('responsive ad saving failed');\r\n return false;\r\n })\r\n .finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Called when the save button is pressed. Saves the ad to client in ad group creation\r\n * for multimedia ad now.\r\n *\r\n * @returns {Promise} Promise to return the ad\r\n *\r\n */\r\n saveToClient() {\r\n this.props.activityLogger.signal('click save ad to client', 'responsive ad editor');\r\n this.props.activityLogger.signal(`crud-audience-ad-react saveToClient: ${JSON.stringify(this.pilotCheckLogInfo())}`, 'rae-view deprecation');\r\n // If not editing anything, just return\r\n if (!this.state.isAdEditShown) {\r\n return Promise.resolve(true);\r\n }\r\n\r\n // remove errors\r\n this.setState({\r\n imageErrorMessages: [],\r\n videoErrorMessages: [],\r\n genericErrorMessages: [],\r\n errorCodes: [],\r\n });\r\n\r\n const initialParams = this.getData(this.isUpdate);\r\n\r\n if (!this.isDataValid(initialParams)) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return Promise.all([\r\n this.getProcessedDataAsync(initialParams),\r\n this.shouldUpdateAccountSettingForAllowCrawlImages() ? AccountSettingRepository.updateAccountSettings({ AllowCrawlImagesFromLandingPage: 'true' }) : Promise.resolve(),\r\n ])\r\n .then(([result]) => {\r\n let params = result.mtModel;\r\n\r\n if (this.props.isMultimediaAd) {\r\n const { imageToGenerateThumbnail } = result;\r\n\r\n _.defaults(params, {\r\n Type: 'Responsive',\r\n ThumbnailForAdList: imageToGenerateThumbnail.ThumbnailForAdList,\r\n ImageList: this.state.imageList,\r\n });\r\n\r\n params = omitDeletedParameters(params); // eslint-disable-line no-param-reassign\r\n }\r\n\r\n return params;\r\n });\r\n }\r\n\r\n progressCb() {\r\n this.adEditRef.current.view.showProgress(true);\r\n }\r\n saveMMABulkConversion() {\r\n const self = this;\r\n this.setState({\r\n imageErrorMessages: [],\r\n videoErrorMessages: [],\r\n genericErrorMessages: [],\r\n errorCodes: [],\r\n });\r\n const initialParams = this.getData();\r\n\r\n if (!this.isDataValid(initialParams)) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n this.setState({\r\n isBlocking: true,\r\n });\r\n return this.getProcessedDataAsync(initialParams)\r\n .then((result) => {\r\n const {\r\n mtModel: params,\r\n } = result;\r\n\r\n const bulkParams = this.getBulkEditParams(params);\r\n return bulkEditChange({\r\n params: bulkParams,\r\n progressCB: _.bind(self.progressCb, self),\r\n completeCB: (response) => {\r\n this.adEditRef.current.view.showProgress(false);\r\n self.setState({\r\n isBlocking: false,\r\n });\r\n if (response.Status === 'CompletedWithErrors') {\r\n self.adEditRef.current.view.showErrors(true);\r\n this.adEditRef.current.view.successCount(response.SuccessRowCount);\r\n this.adEditRef.current.view.totalCount(response.TotalRowCount);\r\n self.adEditRef.current.view.errorCount(response.ErrorRowCount);\r\n self.adEditRef.current.view.inlineErrors(response);\r\n self.setState({\r\n isBulkEditMMAUnSaved: true,\r\n bulkEditMMAFailed: true,\r\n });\r\n } else if (response.Status === 'Completed') {\r\n self.logWithMetadata('mma bulk create successfully');\r\n self.props.onAdSaved();\r\n }\r\n return response;\r\n },\r\n failedCB: (e) => {\r\n this.logWithMetadata(`mma bulk conversion failed. ${JSON.stringify(e)}`);\r\n self.setState({\r\n isBulkEditMMAUnSaved: true,\r\n bulkEditMMAFailed: true,\r\n });\r\n const errorMes = e.errors.map(error => JSON.stringify(error));\r\n this.setState({\r\n genericErrorMessages: [\r\n ...this.state.genericErrorMessages,\r\n ...errorMes,\r\n ],\r\n });\r\n },\r\n })\r\n .finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n })\r\n .catch((response) => {\r\n const errors = _.unique(response.errors, false, error => error.ErrorNumber);\r\n this.setResponseErrors(errors);\r\n this.logWithMetadata('mma bulk get params failed');\r\n return false;\r\n })\r\n .finally(() => {\r\n this.setState({\r\n isBlocking: false,\r\n });\r\n });\r\n }\r\n\r\n isMeetingMinimumRequirement(MMAImageList) {\r\n const aspectRatios =\r\n constants.getMmaAspectRatios();\r\n const ratioCounts = _.mapObject(aspectRatios, () => 0);\r\n _.each(MMAImageList, imageArray =>\r\n _.each(imageArray, (imageObj) => {\r\n if (imageObj.isIncluded) {\r\n ratioCounts[imageObj.type] += 1;\r\n }\r\n }));\r\n return _.every(ratioCounts, (count, type) => count >= aspectRatios[type].minimumRequirements);\r\n }\r\n\r\n /**\r\n * Makes sure that all the needed parameters are contained on the object, and valid, before this\r\n * is used to save the ad.\r\n *\r\n * @param {object} params The object to be sent on the save request.\r\n *\r\n * @returns {boolean} True if everything is ok, false if values are missing or invalid.\r\n *\r\n */\r\n isDataValid(params) {\r\n if (this.isVideo) {\r\n if (this.state.videoUploading) {\r\n this.setState({\r\n videoErrorMessages: [this.props.i18n.getString('ImageExperience_VideosUploading')],\r\n });\r\n return false;\r\n }\r\n if (this.state.videoList.length !== constants.videoTypesWithOrder.length) {\r\n this.setState({\r\n videoErrorMessages: [this.props.i18n.getString('ImageExperience_VideosMissing')],\r\n });\r\n return false;\r\n }\r\n // Only videos w/ Id and Status in [Draft, Active, Unverified] are valid.\r\n const invalidVideos = this.state.videoList.filter(videoObj =>\r\n videoObj.Id === 0 ||\r\n (videoObj.Status !== 'Draft' &&\r\n videoObj.Status !== 'Active' &&\r\n videoObj.Status !== 'Unverified'));\r\n if (invalidVideos.length > 0) {\r\n this.setState({\r\n videoErrorMessages: [this.props.i18n.getString('ImageExperience_InvalidVideo')],\r\n });\r\n return false;\r\n }\r\n return this.adEditRef.current.view.isDataValid(params);\r\n } else if (this.props.isMultimediaAd) {\r\n const MMAImageList = this.getImageListWithoutLogo(this.state.imageList);\r\n let imageErrorMessages = [];\r\n if (MMAImageList.length <= 0 ||\r\n !_.every(\r\n MMAImageList,\r\n imageArray => _.every(imageArray, imageObj => !_.isNull(imageObj.Id))\r\n ) ||\r\n !_.some(\r\n MMAImageList,\r\n imageArray => _.some(imageArray, imageObj => imageObj.isIncluded === true)\r\n )) {\r\n // should include at least one ratio\r\n imageErrorMessages = [this.props.i18n.getString('ImageExperience_ImagesAspectRatioRequired')];\r\n }\r\n\r\n if (this.isMultiMediaAdsPhase2Enabled && !this.isMeetingMinimumRequirement(MMAImageList)) {\r\n // should include minimum ratios in phase2\r\n imageErrorMessages = [this.props.i18n.getString('ImageExperience_MinimumAspectRatioRequired')];\r\n }\r\n\r\n if (_.isEmpty(imageErrorMessages)) {\r\n return this.adEditRef.current.view.isDataValid(params);\r\n }\r\n\r\n this.setState({ imageErrorMessages });\r\n if (this.props.isBulkEditMMA) {\r\n return this.adEditRef.current.view.isDataValid(params);\r\n }\r\n return false;\r\n } else if (this.props.isMultimediaAdinMSANEnabled) {\r\n const MMAImageList = this.getImageListWithoutLogo(this.state.imageList);\r\n\r\n let imageErrorMessages = [];\r\n if (MMAImageList.length === 0) {\r\n imageErrorMessages = [this.props.i18n.getString('ImageExperience_ImagesRequired')];\r\n this.setState({ imageErrorMessages });\r\n return false;\r\n }\r\n\r\n const isMMAV2Format = this.props.isMMAV2Enabled && _.some(MMAImageList, images => images.find(image => image.Type === 'OriginalImage'));\r\n\r\n const noLandscapeImageIncluded = MMAImageList\r\n .map(images => images.find(image => image.Type === 'Image191x100'))\r\n .every(image => !image.IsIncluded);\r\n\r\n const noOriginalImageIncluded = this.props.isMMAV2Enabled && MMAImageList\r\n .map(images => images.find(image => image.Type === 'OriginalImage'))\r\n .every(image => !image.IsIncluded); // this is always true since original image is not showing on UI\r\n\r\n if (isMMAV2Format && noOriginalImageIncluded) {\r\n imageErrorMessages = [this.props.i18n.getString('ImageExperience_OriginalImageRequired')];\r\n this.setState({ imageErrorMessages });\r\n return false;\r\n }\r\n\r\n if (!isMMAV2Format && noLandscapeImageIncluded) {\r\n imageErrorMessages = [this.props.i18n.getString('ImageExperience_LandscapeImageRequired')];\r\n this.setState({ imageErrorMessages });\r\n return false;\r\n }\r\n return this.adEditRef.current.view.isDataValid(params);\r\n } else if (this.state.imageList.length === this.imageTypesWithOrder.length &&\r\n _.every(this.state.imageList, imageObj => imageObj.Id > 0)) {\r\n return this.adEditRef.current.view.isDataValid(params);\r\n }\r\n this.setState({\r\n imageErrorMessages: [this.props.i18n.getString('ImageExperience_ImagesRequired')],\r\n });\r\n\r\n return false;\r\n }\r\n\r\n renderImageExperience(previewTexts, adPreviewConfig) {\r\n // Adding this to make sure ImageExperience is mounted on every newly created ad\r\n const shouldRender = this.isVideo ? !this.state.isBlocking : true;\r\n return (shouldRender &&\r\n \r\n \r\n this.onImageListUpdated(imageList, currentSelectedImageId, isLogo)\r\n }\r\n onImagePreviewRequested={this.onImagePreviewRequested}\r\n onVideoListUpdated={this.onVideoListUpdated}\r\n onVideoPreviewRequested={this.onVideoPreviewRequested}\r\n onSaveThumbnailAsDraft={this.onSaveThumbnailAsDraft}\r\n onUpdateFinalUrlPrefix={this.onUpdateFinalUrlPrefix}\r\n onUpdateFinalUrl={this.onUpdateFinalUrl}\r\n perfMarker={this.props.perfMarker}\r\n isForVNext={this.props.isForVNext}\r\n isAudienceAd={this.props.isAudienceCampaign}\r\n isMultimediaAd={this.props.isMultimediaAd}\r\n isStockPhotoEnabled={this.props.isStockPhotoEnabled}\r\n oDataConfig={this.props.oDataConfig}\r\n genericImage={this.props.genericImage}\r\n activityLogger={this.props.activityLogger}\r\n permissions={this.props.permissions}\r\n isVideo={this.props.permissions.IsVideoAdsForCampaignEnabled && this.isVideo}\r\n onVideoUploadStatusUpdate={this.onVideoUploadStatusUpdate}\r\n cropImage={this.state.cropImage}\r\n suggestion={this.state.suggestion}\r\n suggestionPoller={this.suggestionPoller}\r\n isAdCreatorEnabled={this.props.isAdCreatorEnabled}\r\n isFinalUrlImageRetrievalEnabled={this.props.isFinalUrlImageRetrievalEnabled}\r\n isLogoEnabled={this.isLogoEnabled}\r\n imageErrorMessages={this.state.imageErrorMessages}\r\n mediaRepository={this.mediaRepository}\r\n finalUrl={this.state.url}\r\n finalUrlProtocol={this.state.protocol}\r\n setAddNewImageCallback={(callback) => {\r\n this.setState({ addImageCallback: callback });\r\n }}\r\n setOpenAddImageCallback={(callback) => {\r\n this.setState({ openAddImageCallback: callback });\r\n }}\r\n adCreatorScenario={this.adCreatorScenario}\r\n onManualCropLogo={() => this.setState({ hasManualCroppedLogo: true })}\r\n onManualCropImage={() => this.setState({ hasManualCroppedImage: true })}\r\n preferencesService={this.props.preferencesService}\r\n isImproveMMA={this.props.isImproveMMA}\r\n isMMAV2Enabled={this.props.isMMAV2Enabled}\r\n isMSANBoostEnabled={this.isMSANBoostEnabled}\r\n isBoost200x100ImageEnabled={this.isBoost200x100ImageEnabled}\r\n isBoostNewAspectRatioSupportEnabled={this.isBoostNewAspectRatioSupportEnabled}\r\n enableUnifiedAdPreview={this.enableAdPreviewLibrary}\r\n adPreviewConfig={adPreviewConfig}\r\n isAudienceMMAWithLogoAndCTA={this.isMSANLogoAndCTAForMMAEnabled}\r\n showCopilotOptionForImage={this.props.permissions.IsBackgroundSceneEnabled}\r\n assetLibraryEventHandler={{\r\n onUploadImage: (imgId) => {\r\n if (this.props.isMultimediaAdinMSANEnabled) {\r\n this.props.activityLogger.signal(`uploaded image audience ad editor, isEditing:${!!this.props.ad}, image id:${imgId}`, 'responsive ad editor');\r\n }\r\n },\r\n }}\r\n supportImageUpscale={this.isAudienceImageUpscale}\r\n isImageFittingEnabled={this.isImageFittingEnabled}\r\n />\r\n {\r\n !this.isLogoEnabled && this.state.imageErrorMessages.length > 0 &&\r\n
    \r\n {\r\n this.state.imageErrorMessages.map((errMsg, index) => (\r\n
    \r\n {errMsg}\r\n
    \r\n ))\r\n }\r\n
    \r\n }\r\n {\r\n this.state.videoErrorMessages.length > 0 &&\r\n
    \r\n {\r\n this.state.videoErrorMessages.map((errMsg, index) => (\r\n
    \r\n {errMsg}\r\n
    \r\n ))\r\n }\r\n
    \r\n }\r\n {\r\n this.state.draftUnsaved &&\r\n this.setState({ draftUnsaved: false })}\r\n >\r\n {this.props.i18n.getString('ImageExperience_UnsavedDraft_Warn')}\r\n \r\n }\r\n
    \r\n );\r\n }\r\n\r\n renderAdEdit() {\r\n return (\r\n \r\n );\r\n }\r\n\r\n render() {\r\n this.perfMarker.willRender();\r\n\r\n const previewTexts = this.getPreviewTexts();\r\n\r\n const {\r\n isMultimediaAdinMSANEnabled, isMultimediaAd, isPlaceholderMMA,\r\n } = this.props;\r\n\r\n const { savedAdsList, errorCodes } = this.state;\r\n\r\n if (this.state.blockCarousel &&\r\n (!!this.state.suggestion.inProgress || this.state.carousel.isError)) {\r\n this.setState({\r\n blockCarousel: false,\r\n });\r\n }\r\n\r\n const adPreviewConfig = getUnifiedAdPreviewConfig({\r\n isMultimediaAdinMSANEnabled,\r\n isMultimediaAd,\r\n isMSANBoostEnabled: this.isMSANBoostEnabled,\r\n isMMAV2Enabled: this.props.isMMAV2Enabled,\r\n isBoost200x100ImageEnabled: this.isBoost200x100ImageEnabled,\r\n isBoostNewAspectRatioSupportEnabled: this.isBoostNewAspectRatioSupportEnabled,\r\n });\r\n const PreviewCarouselComponent = this.enableAdPreviewLibrary ? UnifiedPreviewCarousel : PreviewCarousel;\r\n const MMAMSANPreviewCarouselComponent = this.enableAdPreviewLibrary ? UnifiedMMAMSANPreviewCarousel : MMAPreviewCarousel;\r\n const imagePreview = isMultimediaAdinMSANEnabled ?\r\n ( logo.isIncluded)}\r\n isAdCreatorEnabled={this.props.isAdCreatorEnabled}\r\n adCreatorScenario={this.adCreatorScenario}\r\n instrumentation={this.props.instrumentation}\r\n onUsedViewAllPlacements={() => this.setState({ hasUsedViewAllPlacements: true })}\r\n isImproveMMA={this.props.isImproveMMA}\r\n newI18n={this.props.newI18n}\r\n permissions={this.props.permissions}\r\n isMMAV2Enabled={this.props.isMMAV2Enabled}\r\n isBoost200x100ImageEnabled={this.isBoost200x100ImageEnabled}\r\n isBoostNewAspectRatioSupportEnabled={this.isBoostNewAspectRatioSupportEnabled}\r\n adPreviewConfig={adPreviewConfig}\r\n isImageFittingEnabled={this.isImageFittingEnabled}\r\n />)\r\n :\r\n ( this.setState({ hasUsedViewAllPlacements: true })}\r\n isImproveMMA={this.props.isImproveMMA}\r\n newI18n={this.props.newI18n}\r\n adPreviewConfig={adPreviewConfig}\r\n />);\r\n\r\n return (\r\n
    \r\n {this.props.renderMMABulkConversionHeader && this.props.renderMMABulkConversionHeader({ selectedRowCount: this.props.selectedRowCount })}\r\n {\r\n !this.props.isGridDisplay && !this.props.isBulkEditMMA &&\r\n // don't show ad list in new audience creation flow\r\n !this.isSimplifyAudienceCreation &&\r\n \r\n }\r\n {\r\n !this.props.isGridDisplay &&\r\n !this.state.isAdEditShown &&\r\n this.isAdRecommendationMSANEnabled &&\r\n this.props.isAudienceCampaign &&\r\n !this.props.isBulkEditMMA &&\r\n // don't show recommend ad list in new audience creation flow\r\n !this.isSimplifyAudienceCreation &&\r\n !this.isVideo &&\r\n
    \r\n \r\n {/* init ad editor in order to save the ad when isAdEditShown is false */}\r\n
    {this.renderAdEdit()}
    \r\n
    \r\n }\r\n {\r\n this.state.isAdEditShown &&\r\n
    \r\n {\r\n !isPlaceholderMMA &&\r\n \r\n
    \r\n {!isMultimediaAd && !this.props.isAdCreatorEnabled &&\r\n this.renderImageExperience(previewTexts, adPreviewConfig)}\r\n
    \r\n \r\n \r\n {(this.props.isMultimediaAd || this.props.isAdCreatorEnabled) &&\r\n this.isLogoEnabled &&\r\n this.renderImageExperience(previewTexts, adPreviewConfig)}\r\n {this.isBoostPortraitImageEnabled && (\r\n this.onSavePortraitImage(portraitImage)}\r\n associatedImages={this.props.ad && this.props.ad.Images}\r\n dateFormat={_.get(this.props.pageContext, ['CurrentUser', 'CultureDateTimeFormat', 'ShortDatePattern'])}\r\n timeZone={_.get(this.props.pageContext, ['CurrentAccount', 'TimeZone'])}\r\n serverContext={this.props.serverContext}\r\n />\r\n )}\r\n
    \r\n {this.renderAdEdit()}\r\n
    \r\n \r\n \r\n
    \r\n {(this.props.isMultimediaAd || this.props.isAdCreatorEnabled) &&\r\n !this.isLogoEnabled &&\r\n this.renderImageExperience(previewTexts, adPreviewConfig)}\r\n {this.isVideo ?\r\n : imagePreview\r\n }\r\n
    \r\n \r\n
    \r\n
    \r\n }\r\n {\r\n !isMultimediaAd &&\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n {`${this.props.i18n.getString('Audience_Campaign_Ad_Policy_Description')} `}\r\n \r\n \r\n {this.props.i18n.getString('Audience_Campaign_Ad_Policy_Label')}\r\n \r\n .\r\n
    \r\n
    \r\n
    \r\n }\r\n
    \r\n {\r\n this.state.genericErrorMessages.map((errMsg, index) => (\r\n
    \r\n {errMsg}\r\n
    \r\n ))\r\n }\r\n
    \r\n {\r\n !this.props.isGridDisplay && !this.props.isBulkEditMMA &&\r\n
    \r\n \r\n {this.props.i18n.getString('Audience_Campaign_Ad_Save')}\r\n \r\n {\r\n this.state.savedAdsList.length > 0 &&\r\n \r\n {this.props.i18n.getString('Audience_Campaign_Cancel_Label')}\r\n \r\n }\r\n
    \r\n }\r\n {\r\n this.props.isBulkEditMMA && this.props.renderMMABulkConversionActionButtons && !this.state.isBlocking &&\r\n this.props.renderMMABulkConversionActionButtons({\r\n saveMMABulkConversion: this.saveMMABulkConversion,\r\n cancelMMABulkConversion: this.cancelAdAsync,\r\n isUnSaved: this.state.isBulkEditMMAUnSaved || this.state.isBlocking,\r\n })\r\n }\r\n {\r\n this.props.isBulkEditMMA && this.state.bulkEditMMAFailed &&\r\n this.setState({ bulkEditMMAFailed: false })}\r\n >\r\n {this.props.newI18n.getString(_TL_('we’re unable to save your multimedia ad(s) due to an error. Please try again. '))}\r\n \r\n }\r\n
    \r\n }\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nCrudAudienceAdReact.propTypes = {\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n parseDecimal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n i18nErrors: PropTypes.shape({\r\n getBulkApiErrors: PropTypes.func.isRequired,\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n responsiveAdRepository: PropTypes.shape({\r\n getAdAsync: PropTypes.func.isRequired,\r\n removeAdAsync: PropTypes.func.isRequired,\r\n saveAdAsync: PropTypes.func.isRequired,\r\n savePlaceholderMMA: PropTypes.func.isRequired,\r\n saveMMABulkConversion: PropTypes.func,\r\n }).isRequired,\r\n odata: PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n post: PropTypes.func.isRequired,\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n viewContext: PropTypes.shape({\r\n currentAdGroup: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n pageContext: PropTypes.objectOf(PropTypes.any),\r\n isMobileUrlEnabled: PropTypes.bool,\r\n isImpressionTrackingUrlsEnabled: PropTypes.bool,\r\n isGridDisplay: PropTypes.bool,\r\n onAdSaved: PropTypes.func,\r\n onClose: PropTypes.func,\r\n ad: PropTypes.objectOf(PropTypes.any),\r\n isMultimediaAdinMSANEnabled: PropTypes.bool,\r\n isAdRecommendationMSANEnabled: PropTypes.bool,\r\n perfMarker: PropTypes.shape({\r\n willFetchFile: PropTypes.func.isRequired,\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n isForVNext: PropTypes.bool,\r\n isMultimediaAd: PropTypes.bool,\r\n isPlaceholderMMA: PropTypes.bool,\r\n isAudienceCampaign: PropTypes.bool,\r\n isStockPhotoEnabled: PropTypes.bool,\r\n isBulkEditMMA: PropTypes.bool,\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }),\r\n activityLogger: PropTypes.shape({\r\n signal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n IsBoostPortraitImageEnabled: PropTypes.bool,\r\n IsStockPhotoFilterEnabled: PropTypes.bool,\r\n IsVideoAdsForCampaignEnabled: PropTypes.bool,\r\n IsMultiMediaAdsPhase2Enabled: PropTypes.bool,\r\n IsVideoAdEditorEnabled: PropTypes.bool,\r\n IsAmplifyEnabled: PropTypes.bool,\r\n IsBoost200x100ImageEnabled: PropTypes.bool,\r\n IsBoostNewAspectRatioSupportEnabled: PropTypes.bool,\r\n IsMSANLogoAndCTAForMMAEnabled: PropTypes.bool,\r\n dynamic: PropTypes.object,\r\n IsBackgroundSceneEnabled: PropTypes.bool,\r\n }),\r\n isVideo: PropTypes.bool,\r\n isAdCreatorEnabled: PropTypes.bool,\r\n isFinalUrlImageRetrievalEnabled: PropTypes.bool,\r\n isRecommendation: PropTypes.bool,\r\n scenario: PropTypes.string,\r\n jsdata: PropTypes.shape({}),\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n enableOfflinePollingDelay: PropTypes.bool,\r\n hasWebsiteImageOptedInObservable: PropTypes.func,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n preferencesService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }),\r\n parsedTextMaxLengthExtension: PropTypes.shape({\r\n extend: PropTypes.func,\r\n }),\r\n selectedItems: PropTypes.arrayOf(PropTypes.shape({})),\r\n allPages: PropTypes.bool,\r\n filterService: PropTypes.shape({}),\r\n selectedRowCount: PropTypes.number,\r\n renderMMABulkConversionHeader: PropTypes.func,\r\n renderMMABulkConversionActionButtons: PropTypes.func,\r\n isImproveMMA: PropTypes.bool,\r\n isMMAV2Enabled: PropTypes.bool,\r\n biddingScheme: PropTypes.shape({}),\r\n serverContext: PropTypes.shape({}),\r\n};\r\n\r\nCrudAudienceAdReact.defaultProps = {\r\n onAdSaved: _.noop,\r\n onClose: _.noop,\r\n ad: null,\r\n pageContext: {},\r\n perfMarker: {\r\n willFetchFile: _.noop,\r\n willInit: _.noop,\r\n willFetchData: _.noop,\r\n willRender: _.noop,\r\n done: _.noop,\r\n createChild: _.noop,\r\n },\r\n isForVNext: false,\r\n isAudienceCampaign: false,\r\n scenario: '',\r\n isMultimediaAd: false,\r\n isPlaceholderMMA: false,\r\n isStockPhotoEnabled: false,\r\n isMultimediaAdinMSANEnabled: false,\r\n isMobileUrlEnabled: true,\r\n isImpressionTrackingUrlsEnabled: false,\r\n isGridDisplay: false,\r\n isBulkEditMMA: false,\r\n oDataConfig: null,\r\n permissions: { dynamic: {} },\r\n isVideo: false,\r\n isAdRecommendationMSANEnabled: false,\r\n isAdCreatorEnabled: false,\r\n isFinalUrlImageRetrievalEnabled: false,\r\n isRecommendation: false,\r\n jsdata: {},\r\n enableOfflinePollingDelay: true,\r\n hasWebsiteImageOptedInObservable: null,\r\n preferencesService: {},\r\n parsedTextMaxLengthExtension: {\r\n extend: _.noop,\r\n },\r\n selectedItems: [],\r\n allPages: false,\r\n selectedRowCount: 0,\r\n renderMMABulkConversionActionButtons: _.noop,\r\n renderMMABulkConversionHeader: _.noop,\r\n filterService: {},\r\n isImproveMMA: false,\r\n isMMAV2Enabled: false,\r\n biddingScheme: {},\r\n serverContext: {},\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { getListOfEffectSettings } from '@bingads-webui-campaign/ad-creator-tools-instrumentation';\r\n\r\nexport const logSaveAdInfoForMetrics = ({\r\n data,\r\n saveAdActivity,\r\n enableAdCreatorMetrics,\r\n imageList = [],\r\n state = {},\r\n}) => {\r\n const baseAdIdMessage = `SavedAdId: ${data.Id}`;\r\n\r\n if (enableAdCreatorMetrics) {\r\n const adIdMessage = [baseAdIdMessage];\r\n\r\n if (_.any(\r\n imageList,\r\n ({ source }) => source === constants.imageSources.WebsiteCarousel\r\n )) {\r\n adIdMessage.push('UsedWebsiteCarouselImage');\r\n }\r\n\r\n if (_.any(\r\n imageList,\r\n ({ source, isLogo }) => source === constants.imageSources.Website && !isLogo\r\n )) {\r\n adIdMessage.push('UsedWebsiteTabImage');\r\n }\r\n\r\n if (_.any(\r\n imageList,\r\n ({ source, isLogo }) => source === constants.imageSources.Website && isLogo\r\n )) {\r\n adIdMessage.push('UsedWebsiteTabImageForLogo');\r\n }\r\n\r\n if (_.any(\r\n imageList,\r\n ({ isLogo }) => isLogo\r\n )) {\r\n adIdMessage.push('UserAddedLogo');\r\n }\r\n\r\n if (state.hasManualCroppedImage) {\r\n adIdMessage.push('UserAppliedManualCrop');\r\n }\r\n\r\n if (state.hasManualCroppedLogo) {\r\n adIdMessage.push('UserAppliedManualCropToLogo');\r\n }\r\n\r\n if (state.hasUsedViewAllPlacements) {\r\n adIdMessage.push('UserOpenedViewAllPlacements');\r\n }\r\n\r\n saveAdActivity.trace(`${adIdMessage.join(';')};`);\r\n\r\n const effects = getListOfEffectSettings(imageList) || [];\r\n\r\n if (effects.length > 0) {\r\n _.each(effects, (effect) => {\r\n saveAdActivity.trace(`${baseAdIdMessage};SmartEffectUsed: ${effect};`);\r\n });\r\n }\r\n } else {\r\n saveAdActivity.trace(`${baseAdIdMessage};`);\r\n }\r\n};\r\n","import { ThemeProvider } from 'react-jss';\r\nimport React, { useMemo, forwardRef, Suspense } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\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 { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { CrudAudienceAdReact } from './crud-audience-ad-react';\r\n\r\nconst DelayedCopilotSearchMMAEditor =\r\n React.lazy(() => import(/* webpackMode: 'eager' */'./copilot-search-mma-editor')\r\n .then(({ CopilotSearchMMAEditor }) => ({\r\n default: CopilotSearchMMAEditor,\r\n })));\r\n\r\nconst DelayedBulkMMAConvertEditor =\r\n React.lazy(() => import(/* webpackMode: 'eager' */'./mma-creation-rsa/bulk-mma-convert-editor')\r\n .then(({ BulkMMAConvertEditor }) => ({\r\n default: BulkMMAConvertEditor,\r\n })));\r\n\r\nconst DelayedPlaceholderMMAEditor =\r\n React.lazy(() => import(/* webpackMode: 'eager' */'./placeholder-mma-editor')\r\n .then(({ PlaceholderMMAEditor }) => ({\r\n default: PlaceholderMMAEditor,\r\n })));\r\n\r\nexport const CrudAudienceAdReactWithContext = forwardRef((props, ref) => {\r\n const scopeValue = useMemo(() => ({\r\n scope: {\r\n values: {\r\n cid: props.cid,\r\n aid: props.aid,\r\n uid: props.uid,\r\n },\r\n },\r\n }), [props.cid, props.aid, props.uid]);\r\n\r\n let CoreEditor = CrudAudienceAdReact;\r\n\r\n if (props.permissions.dynamic.MMACopilot && props.isMultimediaAd) {\r\n if (props.isPlaceholderMMA) {\r\n CoreEditor = DelayedPlaceholderMMAEditor;\r\n } else if (!props.isRecommendation && !props.isBulkEditMMA) {\r\n CoreEditor = DelayedCopilotSearchMMAEditor;\r\n }\r\n }\r\n\r\n if (props.permissions.dynamic.MMARefactor && props.isMultimediaAd && props.isBulkEditMMA) {\r\n CoreEditor = DelayedBulkMMAConvertEditor;\r\n }\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\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nCrudAudienceAdReactWithContext.propTypes = {\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n uid: PropTypes.string,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n preferencesService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }),\r\n serverContext: PropTypes.shape({\r\n ServicesEndpoints: PropTypes.shape({\r\n CampaignAPI: PropTypes.string,\r\n }),\r\n Token: PropTypes.string,\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n MMACopilot: PropTypes.bool,\r\n MMARefactor: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n isMultimediaAd: PropTypes.bool,\r\n isPlaceholderMMA: PropTypes.bool,\r\n isRecommendation: PropTypes.bool,\r\n isBulkEditMMA: PropTypes.bool,\r\n};\r\n\r\nCrudAudienceAdReactWithContext.defaultProps = {\r\n preferencesService: {},\r\n isMultimediaAd: false,\r\n isPlaceholderMMA: false,\r\n isRecommendation: false,\r\n isBulkEditMMA: false,\r\n uid: '0',\r\n};\r\n","import { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { processImageListViewModelToModel, omitDeletedParameters } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\n\r\nimport { AccountSettingRepository } from './utils/account-setting-repository';\r\n\r\nconst saveAdsEndpoint = 'Customers({customer_id})/Accounts({account_id})/Campaigns({campaign_id})/AdGroups({adgroup_id})/Ads';\r\nconst formatUrl = (url, pageContext, campaignId, adGroupId) => url\r\n .replace('{customer_id}', _.result(pageContext.CurrentCustomer, 'Id'))\r\n .replace('{account_id}', _.result(pageContext.CurrentAccount, 'Id'))\r\n .replace('{campaign_id}', campaignId)\r\n .replace('{adgroup_id}', adGroupId);\r\n\r\nexport class ResponsiveAdRepository {\r\n constructor(options) {\r\n this.viewContext = options.viewContext;\r\n this.isVideo = options.isVideo;\r\n this.campaignDomain = options.campaignDomain;\r\n\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n this.edmCampaign = DependencyResolver.get('component/edm-campaign/index');\r\n this.odata = DependencyResolver.get('component/http/channel/odata');\r\n }\r\n\r\n /**\r\n * Gets the existing ad data.\r\n *\r\n * @param {number} id - ad id to get the data.\r\n * @param {string} extraExpand - extra model data\r\n *\r\n * @returns {Promise} - promise of getting ad\r\n */\r\n getAdAsync(id, extraExpand) {\r\n const adGroupId = this.viewContext.currentAdGroup.Id;\r\n const campaignId = this.viewContext.currentCampaign.Id;\r\n\r\n const entitySet = this.edmCampaign.currentAccount\r\n .Campaigns.$withKey(campaignId)\r\n .AdGroups.$withKey(adGroupId).Ads;\r\n const params = {\r\n entitySet,\r\n bypassCache: true,\r\n queryParameters: {\r\n query: {\r\n $expand: this.isVideo ? 'Model.ResponsiveAd/Videos' : `Model.ResponsiveAd/Images${extraExpand}`,\r\n },\r\n },\r\n };\r\n\r\n return this.jsdata.Ad.find(id, params).then((ad) => {\r\n const adWithIds = ad;\r\n\r\n adWithIds.Campaign = { Id: campaignId };\r\n adWithIds.AdGroup = { Id: adGroupId };\r\n\r\n return adWithIds;\r\n });\r\n }\r\n\r\n /**\r\n * Deletes the specified ad.\r\n *\r\n * @param {number} id - id of the ad to remove\r\n *\r\n * @returns {undefined} - promise of removing ad\r\n */\r\n removeAdAsync(id) {\r\n const adGroupId = this.viewContext.currentAdGroup.Id;\r\n\r\n return this.jsdata.Ad\r\n .destroy(id, { adapter: 'bulk', parentId: adGroupId });\r\n }\r\n\r\n saveAdAsync(params) {\r\n let savePromise;\r\n\r\n // when use the bulkupsert API, the custom parameter need escape semicolon from ';' to '\\;',\r\n // because the MT side will use ';' to split the several custom parameters:w\r\n const escapeParams = _.isArray(params.UrlCustomParameters) ?\r\n _.defaults({\r\n UrlCustomParameters: _.map(params.UrlCustomParameters, item => _.defaults({\r\n Value: _.contains(item.Value, ';') ? item.Value.replace(/;/g, '\\\\;') : item.Value,\r\n }, item)),\r\n }, params) : params;\r\n\r\n if (params.Id > 0) {\r\n savePromise = this.jsdata.ResponsiveAd.update(params.Id, escapeParams, { adapter: 'bulk', cacheResponse: false });\r\n } else {\r\n savePromise = this.jsdata.ResponsiveAd.create(escapeParams, { adapter: 'bulk', cacheResponse: false });\r\n }\r\n\r\n return savePromise;\r\n }\r\n\r\n savePlaceholderMMA(pageContext) {\r\n const campaignId = Number(this.viewContext.currentCampaign.Id);\r\n const adGroupId = Number(this.viewContext.currentAdGroup.Id);\r\n\r\n const requestBody = {\r\n '@odata.type': 'Model.ResponsiveAd',\r\n Campaign: {\r\n Id: campaignId,\r\n },\r\n AdGroup: {\r\n Id: adGroupId,\r\n },\r\n Type: 'Responsive',\r\n DisplayUrl: this.campaignDomain,\r\n };\r\n\r\n const url = formatUrl(saveAdsEndpoint, pageContext, campaignId, adGroupId);\r\n const option = {\r\n path: 'Advertiser/V2/',\r\n data: requestBody,\r\n };\r\n\r\n return new Promise((resolve, reject) => {\r\n this.odata.post(url, option)\r\n .then((data) => {\r\n resolve(data);\r\n })\r\n .catch((response) => {\r\n reject(_.result(response, ['responseJSON', 'value'], null));\r\n });\r\n });\r\n }\r\n\r\n saveMMABulkConversion(params) {\r\n const ids = _.map(params, ad => ad.Id);\r\n const savePromise = this.jsdata.ResponsiveAd.updateMany(ids, params, { adapter: 'bulk', cacheResponse: false });\r\n\r\n return savePromise;\r\n }\r\n\r\n processImageAndSaveSearchAdAsync(data, imageOData, showImageOptedIn, isMultimediaAd = true, isMultimediaAdinMSANEnabled = false, isMMAV2Enabled = false, UiUnsupportedRatios = []) {\r\n return processImageListViewModelToModel(data.Images.ImageList, imageOData, isMultimediaAd, isMultimediaAdinMSANEnabled, isMMAV2Enabled, UiUnsupportedRatios).then((result) => {\r\n const {\r\n mtModel,\r\n imageToGenerateThumbnail,\r\n } = result;\r\n\r\n const params = _.defaults(mtModel, data);\r\n\r\n return Promise.all([\r\n this.saveAdAsync(params),\r\n showImageOptedIn ? AccountSettingRepository.updateAccountSettings({ AllowCrawlImagesFromLandingPage: 'true' }) : Promise.resolve(),\r\n ])\r\n .then(([responseData]) => {\r\n if (_.isFinite(Number(responseData.Id))) {\r\n _.defaults(responseData, {\r\n Type: 'Responsive',\r\n ThumbnailForAdList: imageToGenerateThumbnail.ThumbnailForAdList,\r\n ImageList: data.Images.ImageList,\r\n });\r\n return omitDeletedParameters(responseData);\r\n }\r\n\r\n return false;\r\n });\r\n });\r\n }\r\n\r\n processImageAndSaveToClientAsync(data, imageOData, showImageOptedIn, isMultimediaAd = true, isMultimediaAdinMSANEnabled = false, isMMAV2Enabled = false, UiUnsupportedRatios = []) {\r\n return Promise.all([\r\n processImageListViewModelToModel(data.Images.ImageList, imageOData, isMultimediaAd, isMultimediaAdinMSANEnabled, isMMAV2Enabled, UiUnsupportedRatios),\r\n showImageOptedIn ? AccountSettingRepository.updateAccountSettings({ AllowCrawlImagesFromLandingPage: 'true' }) : Promise.resolve(),\r\n ])\r\n .then(([result]) => {\r\n const {\r\n mtModel,\r\n imageToGenerateThumbnail,\r\n } = result;\r\n\r\n const params = _.defaults(mtModel, data, {\r\n Type: 'Responsive',\r\n ThumbnailForAdList: imageToGenerateThumbnail.ThumbnailForAdList,\r\n ImageList: data.Images.ImageList,\r\n });\r\n\r\n return omitDeletedParameters(params);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport Promise from 'bluebird';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\nimport {\r\n AudienceStepBase,\r\n AudienceCampaignErrorsView\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\n\r\nimport template from './template.pug';\r\nimport { mergeI18n } from './utils/merge-i18n';\r\nimport { CrudAudienceAdReactWithContext } from './crud-audience-ad-react-with-context';\r\nimport { ResponsiveAdRepository } from './responsive-ad-repository';\r\nimport GenericImage from '../media/1.91to1.jpg';\r\n\r\n/**\r\n * ResponsiveAdEditor class that extends {AudienceStepBase} class\r\n * The class defines the section of the setting Ads\r\n *\r\n * @class ResponsiveAdEditor\r\n * @extends {AudienceStepBase}\r\n */\r\nexport class ResponsiveAdEditor extends AudienceStepBase {\r\n initialize(options = {}) {\r\n this.options = options;\r\n this.renderMarker;\r\n this.isForVNext = options.isForVNext;\r\n this.isMultimediaAd = options.isMultimediaAd || false;\r\n this.isPlaceholderMMA = options.isPlaceholderMMA || false;\r\n this.perfMarker = options.perfMarker;\r\n this.perfMarker.willInit();\r\n this.wizardElement = options.wizardElement;\r\n this.enableOfflinePollingDelay = options.enableOfflinePollingDelay;\r\n\r\n this.viewContext = options.viewContext || {};\r\n this.serverContext = options.serverContext || {};\r\n this.pageContext = _.get(options.deps, 'pageContext') || options.pageContext;\r\n this.isGridDisplay = options.isGridDisplay;\r\n // this.isGridDisplay = false;\r\n this.isMobileUrlEnabled = options.isMobileUrlEnabled == null ?\r\n true : options.isMobileUrlEnabled;\r\n this.isImpressionTrackingUrlsEnabled =\r\n _.result(options, ['deps', 'pageContext', 'Permissions', 'IsImpressionTrackingUrlsEnabled'], false) ||\r\n _.result(options, ['pageContext', 'Permissions', 'IsImpressionTrackingUrlsEnabled'], false) ||\r\n options.isImpressionTrackingUrlsEnabled;\r\n this.ad = options.ad;\r\n this.biddingScheme = options.biddingScheme;\r\n this.newI18n = options.newI18n;\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n mergeI18n(this.i18n, this.newI18n);\r\n\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n if (_.isFunction(this.i18nErrors.getI18n)) {\r\n const i18nInstance = this.i18nErrors.getI18n();\r\n mergeI18n(this.i18n, i18nInstance ? i18nInstance.realI18n : i18nInstance);\r\n }\r\n this.scenario = options.scenario;\r\n this.logScenario = options.logScenario;\r\n this.activityLogger = this.logScenario.createAds.create();\r\n this.hasWebsiteImageOptedInObservable = options.hasWebsiteImageOptedInObservable;\r\n this.parsedTextMaxLengthExtension = options.parsedTextMaxLengthExtension;\r\n this.isRecommendation = options.isRecommendation;\r\n this.edm = options.edm;\r\n this.jsdata = options.jsdata;\r\n this.isImproveMMA = options.isImproveMMA;\r\n this.recommendationTargetAccountId = options.ad && options.ad.TargetAccountId;\r\n\r\n this.responsiveAdRepository = new ResponsiveAdRepository({\r\n viewContext: this.viewContext,\r\n isVideo: options.isVideo,\r\n campaignDomain: options.campaignDomain,\r\n });\r\n\r\n this.noCreatedAdErr = new AudienceCampaignErrorsView();\r\n\r\n this.crudReactComponent = React.createRef();\r\n this.onAdSaved = this.onAdSaved.bind(this);\r\n\r\n // configure parameters needed tfor stock image feature\r\n const config = DependencyResolver.get('component/config/index');\r\n const odataToken = config.get('odata.token');\r\n const odataPath = config.get('odata.url') + config.get('odata.path');\r\n const odataRootUrl = config.get('CampaignAzureDomain');\r\n this.permissions = config.get('Permissions');\r\n this.isVideo = options.isVideo;\r\n\r\n this.isOpenCreatePanel = options.isOpenCreatePanel;\r\n this.isLastStep = options.lastStep === 'ResponsiveAdEditor';\r\n this.applyActivity = options.applyActivity;\r\n this.isSwapStepsEnabled = this.permissions.IsAudienceCampaignSwapAdsBudgetAndBidsEnabled &&\r\n this.scenario !== 'adgroup-creation';\r\n\r\n this.isAudienceCampaign = (_.result(this.viewContext.currentCampaign, 'CampaignType') === 'Audience' ||\r\n _.result(this.viewContext.currentCampaign, 'CampaignType') === 8 ||\r\n options.audienceCampaignType === 'Audience');\r\n this.isMultimediaAdinMSANEnabled = this.isAudienceCampaign &&\r\n this.permissions.IsAudienceCampaignMultiMediaAdsEnabled &&\r\n !options.isVideo;\r\n\r\n this.isMMAV2Enabled = this.isMultimediaAdinMSANEnabled && this.permissions.IsMMAV2Enabled && !this.permissions.IsAmplifyEnabled;\r\n\r\n this.isAdRecommendationMSANEnabled = this.isAudienceCampaign &&\r\n this.permissions.IsResponsiveAdRecommendationMSANEnabled;\r\n\r\n this.oDataConfig = {\r\n odataRootUrl,\r\n odataPath,\r\n odataToken,\r\n };\r\n\r\n // enable dynamic config for this flag.\r\n this.isFinalUrlImageRetrievalEnabled = this.isAudienceCampaign;\r\n\r\n // enable ad creator for MSAN and MMA\r\n this.isAdCreatorEnabled = this.isMultimediaAdinMSANEnabled || this.isMultimediaAd;\r\n }\r\n\r\n /**\r\n * class name of el\r\n */\r\n get className() {\r\n return this.isMultimediaAd ? 'crud-multimedia-ad' : '';\r\n }\r\n\r\n /**\r\n * Get the title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get title() {\r\n const title = this.isSwapStepsEnabled ?\r\n this.i18n.getString('Audience_Campaign_Crud_Ad_Title_Step4') : this.i18n.getString('Audience_Campaign_Crud_Ad_Title');\r\n\r\n return {\r\n text: title,\r\n };\r\n }\r\n\r\n /**\r\n * Get the page title of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns object has a property text that is used for the title of the section.\r\n */\r\n get pageTitle() {\r\n return {\r\n text: this.i18n.getString('Audience_Campaign_Crud_Ad_PageTitle'),\r\n };\r\n }\r\n\r\n onRenderedInDOM() {\r\n this.perfMarker.done();\r\n }\r\n\r\n remove() {\r\n const imageExperienceView = this.$('.react-image-experience')[0];\r\n if (imageExperienceView) {\r\n ReactDOM.unmountComponentAtNode(imageExperienceView);\r\n }\r\n super.remove();\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n if (this.options && this.options.perfMarker) {\r\n this.renderMarker = this.perfMarker.createChild('RenderCrudAd');\r\n this.renderMarker.willInit();\r\n }\r\n\r\n this.perfMarker.willRender();\r\n\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n isGridDisplay: this.isGridDisplay,\r\n isVideo: this.isVideo,\r\n isMultimediaAd: this.isMultimediaAd,\r\n isAdCreatorEnabled: this.isAdCreatorEnabled,\r\n }));\r\n\r\n const path = DependencyResolver.get('Constants').imagePath;\r\n const odata = DependencyResolver.get('component/http/channel/odata');\r\n const state = DependencyResolver.get('component/state/index');\r\n const config = DependencyResolver.get('component/config/index');\r\n const cid = config.get('CurrentAccount') ? config.get('CurrentAccount').AdvertiserCustomerID : config.get('advertiserCustomerID');\r\n const aid = this.isImproveMMA ? this.recommendationTargetAccountId : state.get('account_id');\r\n const uid = _.result(config.get('CurrentUser'), 'Id');\r\n const instrumentation = DependencyResolver.get('campaignui/feature/instrumentation/index');\r\n const preferencesService = DependencyResolver.get('component/preference/service/index');\r\n\r\n ReactDOM.render(\r\n \r\n ,\r\n this.$('.react-image-experience')[0]\r\n );\r\n\r\n this.$('.error-no-created-ad').append(this.noCreatedAdErr.render().el);\r\n this.onRenderedInDOM();\r\n if (this.options && this.options.perfMarker && this.renderMarker) {\r\n this.renderMarker.done();\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the actions of the step section.\r\n * This is automatically called from the wizard.\r\n *\r\n * @readonly\r\n * @returns {Object} returns array that has information about the actions.\r\n */\r\n get actions() {\r\n const actions = [];\r\n\r\n if (this.isSwapStepsEnabled) {\r\n actions.push({\r\n name: 'done',\r\n htmlAttributes: {\r\n class: 'btn-primary',\r\n },\r\n enabled: true,\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Save_Label'),\r\n });\r\n\r\n actions.push({\r\n name: 'back',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Back_Label'),\r\n });\r\n } else {\r\n actions.push({\r\n name: 'back',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Back_Label'),\r\n });\r\n\r\n actions.push({\r\n name: 'done',\r\n htmlAttributes: {\r\n class: 'btn-primary',\r\n },\r\n enabled: true,\r\n method: 'saveAndExit',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Exit'),\r\n });\r\n\r\n if (this.scenario === 'adgroup-creation') {\r\n // use the actions as is\r\n } else if (this.scenario === 'campaign-creation') {\r\n // need the next button at the top.\r\n actions.unshift({\r\n name: 'next',\r\n displayText: this.i18n.getString('Audience_Campaign_Crud_Campaign_Save_Next'),\r\n });\r\n }\r\n }\r\n\r\n return actions;\r\n }\r\n\r\n saveAdAsync() {\r\n if (this.crudReactComponent.current) {\r\n return this.crudReactComponent.current.saveAdAsync()\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n return Promise.resolve(true);\r\n }\r\n\r\n saveToClient() {\r\n if (this.crudReactComponent.current) {\r\n return this.crudReactComponent.current.saveToClient()\r\n .finally(withUiBlock(this.wizardElement, this.i18n.getString('Loading')));\r\n }\r\n\r\n return Promise.resolve(true);\r\n }\r\n\r\n /**\r\n * Checks if at least one ad was created.\r\n * @private\r\n *\r\n * @returns {boolean} true if there is at least one ad created, false if no ad was created\r\n */\r\n hasCreatedAd() {\r\n return this.crudReactComponent.current.hasCreatedAd();\r\n }\r\n\r\n /**\r\n * Checks if wizard can go to the next step\r\n *\r\n * @returns {Promise} Promise.resolve(true) if at leas one ad was created, Promise.reject()\r\n * if noad was created\r\n */\r\n wizardShouldGoNext() {\r\n return this.saveAdAsync().then((isSaved) => {\r\n if (!isSaved) {\r\n this.activityLogger.signal('clicked next: false', 'responsive ad editor');\r\n return Promise.reject();\r\n }\r\n\r\n if (!this.hasCreatedAd()) {\r\n this.noCreatedAdErr.setErrorMessage(this.i18n.getString('Audience_Campaign_Crud_NoCreatedAd'));\r\n this.activityLogger.signal('clicked next: false', 'responsive ad editor');\r\n return Promise.reject();\r\n }\r\n\r\n this.activityLogger.signal('clicked next: true', 'responsive ad editor');\r\n return true;\r\n });\r\n }\r\n\r\n /**\r\n * Always go back. But add a log.\r\n * @private\r\n *\r\n * @returns {Promise} always allow go back.\r\n */\r\n wizardShouldGoBack() {\r\n this.activityLogger.signal('clicked back: true', 'responsive ad editor');\r\n return new Promise(resolve => resolve(true));\r\n }\r\n\r\n /**\r\n * Triggers event 'saveAndExit' if at least one ad was created, otherwise it displays an error.\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n saveAndExit() {\r\n return this.saveAdAsync().then((isSaved) => {\r\n if (!isSaved) {\r\n this.activityLogger.signal('save and exit: false', 'responsive ad editor');\r\n return Promise.reject();\r\n }\r\n\r\n if (!this.hasCreatedAd()) {\r\n this.activityLogger.signal('save and exit: false', 'responsive ad editor');\r\n this.noCreatedAdErr.setErrorMessage(this.i18n.getString('Audience_Campaign_Crud_NoCreatedAd'));\r\n return Promise.reject();\r\n }\r\n\r\n this.trigger('saveAndExit');\r\n if (this.isOpenCreatePanel && this.isLastStep) {\r\n const mes = { CampaignId: this.viewContext.currentCampaign.Id, DeliveryStatusType: 'NoEligibleAdGroups' };\r\n\r\n this.applyActivity.trace(JSON.stringify(mes));\r\n }\r\n this.activityLogger.signal('save and exit: true', 'responsive ad editor');\r\n return true;\r\n });\r\n }\r\n\r\n /**\r\n * Event handler for when ad is saved\r\n * @param {Object} savedAd saved ad\r\n * @param {string} imageUrl image url\r\n * @returns {undefined}\r\n */\r\n onAdSaved(savedAd, imageUrl) {\r\n this.noCreatedAdErr.removeErrors();\r\n\r\n this.trigger('onSave', { savedAd, imageUrl });\r\n }\r\n\r\n /**\r\n * Event handler on create another requested\r\n *\r\n * @returns {undefined}\r\n */\r\n onCreateAnother() {\r\n this.crudReactComponent.current.onCreateAd();\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Backbone from 'backbone';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport {\r\n Button,\r\n} from '@bingads-webui-react/primitive';\r\n\r\nimport { CrudAudienceAdReactWithContext } from '../crud-audience-ad-react-with-context';\r\nimport { ResponsiveAdRepository } from '../responsive-ad-repository';\r\nimport GenericImage from '../../media/1.91to1.jpg';\r\nimport { mergeI18n } from '../utils/merge-i18n';\r\n\r\nexport class StyledMMABulkConversionView extends Backbone.View {\r\n initialize(props = {}) {\r\n this.props = props;\r\n this.state = {};\r\n this.hasRSAorExTA = props.hasRSAorExTA;\r\n this.selectedItems = props.selectedItems;\r\n this.selectedRowCount = props.selectedRowCount;\r\n this.isPlaceholderMMA = props.isPlaceholderMMA || false;\r\n this.perfMarker = props.perfMarker;\r\n this.perfMarker.willInit();\r\n this.wizardElement = props.wizardElement;\r\n this.viewContext = props.viewContext || {};\r\n this.pageContext = _.get(props.deps, 'pageContext') || props.pageContext;\r\n this.isGridDisplay = props.isGridDisplay;\r\n this.ad = props.ad;\r\n this.newI18n = props.newI18n;\r\n this.i18n = props.i18n;\r\n this.i18nErrors = DependencyResolver.get('component/api-errors-campaign/index');\r\n mergeI18n(this.i18n, this.newI18n);\r\n\r\n if (_.isFunction(this.i18nErrors.getI18n)) {\r\n const i18nInstance = this.i18nErrors.getI18n();\r\n mergeI18n(this.i18n, i18nInstance ? i18nInstance.realI18n : i18nInstance);\r\n }\r\n\r\n this.scenario = props.scenario;\r\n const logScenario = props.instrumentation.bulkEditMMAConversionAd.create();\r\n this.activityLogger = logScenario.bulkEditMMAConversionAd.create();\r\n this.hasWebsiteImageOptedInObservable = props.hasWebsiteImageOptedInObservable;\r\n this.parsedTextMaxLengthExtension = props.parsedTextMaxLengthExtension;\r\n this.isRecommendation = props.isRecommendation;\r\n this.jsdata = props.jsdata;\r\n this.serverContext = props.serverContext;\r\n\r\n this.responsiveAdRepository = new ResponsiveAdRepository({\r\n viewContext: this.viewContext,\r\n isVideo: props.isVideo,\r\n campaignDomain: props.campaignDomain,\r\n });\r\n this.crudReactComponent = React.createRef();\r\n this.onAdSaved = this.onAdSaved.bind(this);\r\n this.onClose = this.onClose.bind(this);\r\n\r\n const config = DependencyResolver.get('component/config/index');\r\n const odataToken = config.get('odata.token');\r\n const odataPath = config.get('odata.url') + config.get('odata.path');\r\n const odataRootUrl = config.get('CampaignAzureDomain');\r\n this.permissions = config.get('Permissions');\r\n\r\n this.isOpenCreatePanel = props.isOpenCreatePanel;\r\n this.isLastStep = props.lastStep === 'ResponsiveAdEditor';\r\n this.applyActivity = props.applyActivity;\r\n\r\n this.oDataConfig = {\r\n odataRootUrl,\r\n odataPath,\r\n odataToken,\r\n };\r\n }\r\n get pageTitle() {\r\n return {\r\n text: this.newI18n.getString(_TL_('MMA_Conversion_From_RSA_PageTitle')),\r\n };\r\n }\r\n onAdSaved() {\r\n this.trigger('saveAndRefresh');\r\n }\r\n onClose() {\r\n this.trigger('close');\r\n }\r\n\r\n renderMMABulkConversionActionButtons({ saveMMABulkConversion, cancelMMABulkConversion, isUnSaved }) {\r\n return (\r\n
    \r\n {!isUnSaved &&\r\n \r\n {this.i18n.getString('Audience_Campaign_Ad_Save')}\r\n \r\n }\r\n \r\n {this.i18n.getString('Audience_Campaign_Cancel_Label')}\r\n \r\n
    \r\n );\r\n }\r\n\r\n renderMMABulkConversionHeader({ selectedRowCount }) {\r\n return (\r\n
    \r\n
    {this.i18n.getString('Multimedia_Ad_Bulk_Conversion_Title', { count: selectedRowCount })}
    \r\n
    {this.newI18n.getString(_TL_('Your existing responsive search ads will continue to serve after you copy them to Multimedia ads.'))}
    \r\n
    \r\n );\r\n }\r\n\r\n renderImageExperience() {\r\n const {\r\n customerId, accountId, adGroupId, campaignId, campaignType,\r\n }= this.props.scope;\r\n const { instrumentation, allPages } = this.props;\r\n const config = DependencyResolver.get('component/config/index');\r\n const odata = DependencyResolver.get('component/http/channel/odata');\r\n const odataToken = config.get('odata.token');\r\n const odataPath = config.get('odata.url') + config.get('odata.path');\r\n const odataRootUrl = config.get('CampaignAzureDomain');\r\n const jsdata = DependencyResolver.get('component/js-data-campaign/index');\r\n const viewContext= {\r\n currentAdGroup: {\r\n get Id() {\r\n return adGroupId;\r\n },\r\n },\r\n currentCampaign: {\r\n Id: campaignId,\r\n CampaignType: campaignType,\r\n },\r\n };\r\n const preferencesService = DependencyResolver.get('component/preference/service/index');\r\n const filterService = this.props.filterService.getCombinedFilter();\r\n this.oDataConfig = {\r\n odataRootUrl,\r\n odataPath,\r\n odataToken,\r\n };\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n render() {\r\n ReactDOM.render(\r\n (\r\n
    {this.renderImageExperience()}
    \r\n ), this.el\r\n );\r\n return this;\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n\r\n","export const MMAAssetConfigs = {\r\n MAX_HEADLINES: 15,\r\n DEFAULT_HEADLINES: 1,\r\n MIN_HEADLINES: 1,\r\n MAX_LONGHEADLINES: 5,\r\n DEFAULT_LONGHEADLINES: 1,\r\n MIN_LONGHEADLINES: 1,\r\n MAX_DESCRIPTIONS: 5,\r\n DEFAULT_DESCRIPTIONS: 1,\r\n MIN_DESCRIPTIONS: 1,\r\n MAX_HEADLINE_SUGGESTIONS: 15, // MAX_HEADLINES\r\n MAX_DESCRIPTION_SUGGESTIONS: 10, // MAX_DESCRIPTIONS + MAX_LONGHEADLINES\r\n MAX_BUSINESS_NAME: 25,\r\n};\r\n\r\n\r\nexport const ResponsiveAdConfigs = {\r\n MAX_HEADLINE_SUGGESTIONS: 15,\r\n MAX_DESCRIPTION_SUGGESTIONS: 10,\r\n};\r\n","export const getMMAEditorStyles = () => ({\r\n '@global': {\r\n '.top-grid-form .ad-editor__container .crud-audience-ad .react-image-experience .crud-audience-ad-react.crud-multimedia-ad-react': {\r\n '& .ad-edit-and-preview-container': {\r\n position: 'relative',\r\n '& .ad-customizer-container': {\r\n '& .picker-list, > .dropdown-menu.adCustomizersEditor': {\r\n marginTop: 0,\r\n marginLeft: 0,\r\n },\r\n },\r\n '& .image-experience-content': {\r\n minWidth: 'unset',\r\n '& .image-list-view-content .image-list .image-list-content': {\r\n width: '100%',\r\n border: 'none',\r\n margin: 0,\r\n padding: 0,\r\n '& .image-list-item.image-list-add-placeholder': {\r\n borderStyle: 'dashed',\r\n borderColor: '#c8c6c4',\r\n borderRadius: 6,\r\n borderWidth: 1,\r\n marginTop: 8,\r\n },\r\n '& .image-list-choice-group': {\r\n '& .ms-ChoiceFieldGroup-flexContainer': {\r\n flexWrap: 'wrap',\r\n width: 'unset',\r\n '& .ms-ChoiceField': {\r\n marginBottom: 4,\r\n marginRight: 8,\r\n '& ~ .ms-ChoiceField': {\r\n marginLeft: 0,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .actionextension-search-dropdown-container .dropdown-search-selector__dropdown': {\r\n marginLeft: 0,\r\n '& .dropdown-toggle .text-left': {\r\n padding: '4px 0 0 8px',\r\n },\r\n },\r\n },\r\n 'div .adEditor-container .ad-editor-form__container .crud-audience-ad .react-image-experience .crud-audience-ad-react.crud-multimedia-ad-react': {\r\n '& .ad-edit-and-preview-container': {\r\n position: 'relative',\r\n '& .ad-customizer-container': {\r\n '& .picker-list, > .dropdown-menu.adCustomizersEditor': {\r\n marginTop: 0,\r\n marginLeft: 0,\r\n },\r\n },\r\n '& .image-experience-content': {\r\n minWidth: 'unset',\r\n '& .image-list-view-content .image-list .image-list-content': {\r\n '& .image-list-item.image-list-add-placeholder': {\r\n marginTop: 8,\r\n },\r\n '& .image-list-choice-group .ms-ChoiceFieldGroup-flexContainer': {\r\n flexFlow: 'row',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n width: 'unset',\r\n '& .ms-ChoiceField': {\r\n marginBottom: 4,\r\n marginRight: 8,\r\n '& ~ .ms-ChoiceField': {\r\n marginLeft: 0,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .actionextension-search-dropdown-container .dropdown-search-selector__dropdown': {\r\n marginLeft: 0,\r\n '& .dropdown-toggle .text-left': {\r\n padding: '4px 0 0 8px',\r\n },\r\n },\r\n },\r\n '.ads-page': {\r\n paddingTop: 24,\r\n '& .top-grid-form .panel': {\r\n marginTop: 0,\r\n },\r\n },\r\n },\r\n adEditorShell: {\r\n width: '100%',\r\n },\r\n mmaAdImagePreviewCarousel: {\r\n position: 'sticky',\r\n width: '100%',\r\n minWidth: 669,\r\n top: '0px',\r\n '& .new-preview-carousel-container-adprelib': {\r\n '& .new-carousel-navigation-mma-adprelib': {\r\n '& .carousel-indicators': {\r\n left: 20,\r\n margin: '20px 24px',\r\n position: 'absolute',\r\n width: 'auto',\r\n },\r\n '& .carousel-control.left': {\r\n left: 0,\r\n bottom: -7,\r\n position: 'absolute',\r\n marginLeft: 15,\r\n marginRight: 76,\r\n height: 32,\r\n marginTop: 20,\r\n marginBottom: 20,\r\n top: 'auto',\r\n right: 0,\r\n },\r\n '& .carousel-control.right': {\r\n left: 0,\r\n bottom: -7,\r\n position: 'absolute',\r\n marginLeft: 135,\r\n marginRight: 76,\r\n height: 32,\r\n marginTop: 20,\r\n marginBottom: 20,\r\n top: 'auto',\r\n right: 0,\r\n },\r\n },\r\n },\r\n },\r\n rightStyles: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n container: {\r\n display: 'flex',\r\n width: '100%',\r\n gap: '32px',\r\n '& .text-input-container': {\r\n width: '100% !important',\r\n },\r\n '& .title-item': {\r\n width: 'auto',\r\n maxWidth: '100%',\r\n },\r\n },\r\n leftStyles: {\r\n width: '40%',\r\n maxWidth: 600,\r\n minWidth: 482,\r\n '& .text-assets-collection-container': {\r\n width: 'unset',\r\n '& label.control-label': {\r\n textAlign: 'left',\r\n },\r\n },\r\n '& .business-name-container': {\r\n width: 'unset',\r\n },\r\n },\r\n headerStackStyles: {\r\n width: 'unset',\r\n '& .server-errors': {\r\n marginBottom: 15,\r\n '& .error a': {\r\n color: '#A80000',\r\n },\r\n },\r\n },\r\n imageExperienceStyle: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n '& .image-list-choice-group .ms-ChoiceFieldGroup-flexContainer': {\r\n width: 'unset !important',\r\n },\r\n '& .image-suggestion-carousel-root .panel-heading .see-all-link': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n textAssetStyle: {\r\n '& .text-assets-collection-container': {\r\n width: '100%',\r\n },\r\n },\r\n businessNameStyle: {\r\n '& .business-name-container': {\r\n width: '100%',\r\n },\r\n },\r\n});\r\n\r\n","export const getAdvancedSettingsStyles = (components, theme) => ({\r\n collapsiblePanel: {\r\n '&.advanced-settings-panel': {\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n marginLeft: 0,\r\n },\r\n\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n marginLeft: '-8px', // compensate 8px padding on the left of icon\r\n color: theme.palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: theme.palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n '& .collapse-container': {\r\n padding: 2,\r\n },\r\n },\r\n },\r\n});\r\n\r\n","import React, { useMemo, useContext, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n ValidatedBootstrapPanel,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { URLOptionsSection, MobileUrlSection } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { getAdvancedSettingsStyles } from './advanced-settings-styles';\r\n\r\nexport const AdvancedSettings = ({\r\n mobileFinalUrls,\r\n trackingUrlTemplate,\r\n finalUrlSuffix,\r\n urlCustomParameters,\r\n triggerTestUurl,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions, Token } = serverContext || { };\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const classes = useDefaultStyles(getAdvancedSettingsStyles);\r\n\r\n const [\r\n allAdvancedSettingsSections,\r\n advancedSettingsExpandedSections,\r\n setAdvancedSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['mobile-final-url', 'advanced-url-options'] /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const allAdvancedSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdvancedSettingsExpandedSections }),\r\n [setAdvancedSettingsExpandedSections]\r\n );\r\n\r\n const [advancedSettingsSectionExpanded, setAdvancedSettingsSectionExpanded] = useState(false);\r\n const onAdvancedSettingsSectionToggle = useCallback((expanded) => {\r\n setAdvancedSettingsSectionExpanded(expanded);\r\n }, []);\r\n\r\n const advancedInputSections = () => (\r\n \r\n \r\n \r\n \r\n );\r\n\r\n return (\r\n <>\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Advanced settings'))}\r\n \r\n \r\n \r\n \r\n
    \r\n {advancedInputSections()}\r\n
    \r\n
    \r\n
    \r\n \r\n )}\r\n />\r\n \r\n );\r\n};\r\n\r\nAdvancedSettings.propTypes = {\r\n finalUrlSuffix: PropTypes.string,\r\n mobileFinalUrls: PropTypes.string,\r\n trackingUrlTemplate: PropTypes.string,\r\n urlCustomParameters: PropTypes.arrayOf(PropTypes.shape({})),\r\n triggerTestUurl: PropTypes.func.isRequired,\r\n};\r\n\r\nAdvancedSettings.defaultProps = {\r\n finalUrlSuffix: undefined,\r\n mobileFinalUrls: undefined,\r\n trackingUrlTemplate: undefined,\r\n urlCustomParameters: undefined,\r\n};\r\n","import { useState, useEffect } from 'react';\r\nimport { evaluateAdCustomizers } from '@bingads-webui-campaign/ad-customizers-next';\r\n\r\nconst adType = 'ResponsiveAd';\r\n\r\nexport const useEvaluatedAssests = ({ headline, longHeadline, description }) => {\r\n const [evaluatedHeadLine, setEvaluatedHeadLine] = useState(headline);\r\n const [evaluatedLongHeadLine, setEvaluatedLongHeadLine] = useState(longHeadline);\r\n const [evaluatedDescription, setEvaluatedDescription] = useState(description);\r\n\r\n useEffect(() => {\r\n evaluateAdCustomizers({\r\n text: headline,\r\n adType,\r\n field: 'Headlines',\r\n }).then((evaluatedText) => {\r\n setEvaluatedHeadLine(evaluatedText);\r\n });\r\n }, [headline]);\r\n\r\n useEffect(() => {\r\n evaluateAdCustomizers({\r\n text: description,\r\n adType,\r\n field: 'Descriptions',\r\n }).then((evaluatedText) => {\r\n setEvaluatedDescription(evaluatedText);\r\n });\r\n }, [description]);\r\n\r\n useEffect(() => {\r\n evaluateAdCustomizers({\r\n text: longHeadline,\r\n adType,\r\n field: 'LongHeadlines',\r\n }).then((evaluatedText) => {\r\n setEvaluatedLongHeadLine(evaluatedText);\r\n });\r\n }, [longHeadline]);\r\n\r\n return {\r\n evaluatedHeadLine,\r\n evaluatedLongHeadLine,\r\n evaluatedDescription,\r\n };\r\n};\r\n","import classNames from 'classnames';\r\nimport React, { useContext, useMemo, useRef, useState, useCallback } from 'react';\r\nimport { noop, isArray, first, isEmpty } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeStyles } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidatedLegacyCallToActionWithLanguageSection } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n ValidatedFinalUrlWithRecommendationsSection,\r\n LongHeadlineAssetCollectionSection,\r\n HeadlineAssetCollectionSection,\r\n DescriptionAssetCollectionSection,\r\n ValidatedBusinessNameWithRecommendationSection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport {\r\n ImageListPortalContainerWithCarouselSection,\r\n LogoListPortalContainerSection,\r\n ValidatedImageExperienceWrapper,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useCopilot } from '@bingads-webui-campaign-react/copilot-experience';\r\n\r\nimport { getMMAEditorStyles } from './copilot-search-mma-editor-styles';\r\nimport { AdvancedSettings } from './advanced-settings';\r\nimport { getUnifiedAdPreviewConfig } from './get-unified-ad-preview-config';\r\nimport { SearchMMAAdPreview } from './search-mma-ad-preview';\r\nimport { errorMapper } from './utils/errors-util';\r\nimport { useAutomatedCTA } from './useAutomatedCTA';\r\nimport { useInitAdCustomizer } from './useInitAdCustomizer';\r\nimport { useEvaluatedAssests } from './useEvaluatedAssets';\r\n\r\nconst advancedSettingsStyles = mergeStyles({\r\n marginBottom: 40,\r\n});\r\n\r\nconst featureName = 'searchMMA';\r\nconst entity = 'ResponsiveAd';\r\n\r\nexport const CopilotSearchMMAEditorContainerInternal = ({\r\n data,\r\n errors,\r\n onDataChange,\r\n onReset,\r\n scope,\r\n perfMarker,\r\n permissions,\r\n viewContext,\r\n genericImage,\r\n showAllValidationErrors,\r\n showUnmappedFormErrors,\r\n triggerTestUurl,\r\n adId,\r\n newI18n,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const errorMapperWithI18n = useMemo(() => error => errorMapper(error, i18n), [i18n]);\r\n const defaultPreviewFields = useMemo(() => ({\r\n shortHeadline: i18n.getString(_TL_('Short headline')),\r\n longHeadline: i18n.getString(_TL_('Long headline')),\r\n description: i18n.getString(_TL_('Ad text')),\r\n businessName: i18n.getString(_TL_('Business name')),\r\n callToAction: i18n.getString(_TL_('Shop Now')),\r\n url: 'https://example.com',\r\n }), [i18n]);\r\n\r\n const { cid, aid } = scope.values || {};\r\n const campaignId = viewContext.currentCampaign && viewContext.currentCampaign.Id;\r\n\r\n const classes = useDefaultStyles(getMMAEditorStyles);\r\n\r\n const finalUrls = data.FinalUrls;\r\n const firstUrl = finalUrls && first(finalUrls);\r\n const finalUrlForRecommendation = data.FinalUrlForRecommendation;\r\n const businessName = data.BusinessName;\r\n const mobileFinalUrls = data.MobileFinalUrls;\r\n const headlines = data.Headlines;\r\n const longHeadlines = data.LongHeadlines;\r\n const descriptions = data.Descriptions;\r\n const trackingUrlTemplate = data.TrackingUrlTemplate;\r\n const finalUrlSuffix = data.FinalUrlSuffix;\r\n const urlCustomParameters = data.UrlCustomParameters;\r\n const images = data.Images;\r\n const callToAction = data.CallToAction;\r\n const imageList = images && images.ImageList;\r\n const [ctaText, setCTAText] = useState(callToAction && callToAction.cta);\r\n const {\r\n evaluatedHeadLine,\r\n evaluatedLongHeadLine,\r\n evaluatedDescription,\r\n } = useEvaluatedAssests({\r\n headline: headlines && headlines.Headline0,\r\n longHeadline: longHeadlines && longHeadlines.LongHeadline0,\r\n description: descriptions && descriptions.Description0,\r\n });\r\n\r\n const imageData = useMemo(() => ({\r\n Images: images,\r\n Headlines: headlines && headlines.Headline0 ? { ...headlines, Headline0: evaluatedHeadLine } : headlines,\r\n LongHeadlines: longHeadlines && longHeadlines.LongHeadline0 ? { ...longHeadlines, LongHeadline0: evaluatedLongHeadLine } : longHeadlines,\r\n Descriptions: descriptions && descriptions.Description0 ? { ...descriptions, Description0: evaluatedDescription } : descriptions,\r\n BusinessName: businessName,\r\n CallToAction: ctaText,\r\n FinalUrls: finalUrls,\r\n }), [businessName, ctaText, descriptions, evaluatedDescription, evaluatedHeadLine, evaluatedLongHeadLine, finalUrls, headlines, images, longHeadlines]);\r\n\r\n const previewData = useMemo(() => ({\r\n shortHeadline: isEmpty(evaluatedHeadLine) ? defaultPreviewFields.shortHeadline : evaluatedHeadLine,\r\n longHeadline: isEmpty(evaluatedLongHeadLine) ? defaultPreviewFields.longHeadline : evaluatedLongHeadLine,\r\n description: isEmpty(evaluatedDescription) ? defaultPreviewFields.description : evaluatedDescription,\r\n businessName: isEmpty(businessName) ? defaultPreviewFields.businessName : businessName,\r\n url: isEmpty(firstUrl) ? defaultPreviewFields.url : firstUrl,\r\n callToAction: isEmpty(ctaText) ? defaultPreviewFields.callToAction : ctaText,\r\n }), [businessName, ctaText, evaluatedDescription, evaluatedHeadLine, evaluatedLongHeadLine, firstUrl]);\r\n\r\n const [\r\n allAdSettingsSections,\r\n adSettingsExpandedSections,\r\n setAdSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['final-url', 'images', 'logos', 'headlines', 'long-headlines', 'descriptions', 'business-name', 'call-to-action', 'mobile-final-url', 'advanced-url-options'] /* all sections */,\r\n ['final-url', 'images', 'logos', 'headlines', 'long-headlines', 'descriptions', 'business-name'] /* initially expanded sections */\r\n );\r\n\r\n const maxUploadNum = useMemo(() => {\r\n const imageListLength = imageList && isArray(imageList) ? imageList.length : 0;\r\n return constants.DEFAULT_MAX_IMAGE - imageListLength;\r\n }, [imageList]);\r\n\r\n // copilot states and actions\r\n const [addNewDescriptionCallback, setAddNewDescriptionCallback] = useState(noop);\r\n const [addNewShortHeadlinesCallback, setAddNewShortHeadlinesCallback] = useState(noop);\r\n const [addNewLongHeadlinesCallback, setAddNewLongHeadlinesCallback] = useState(noop);\r\n const [finalUrlForCopilotRecommendations, setFinalUrlForCopilotRecommendations] = useState(first(finalUrls));\r\n\r\n const imagesContainerRef = useRef(null);\r\n const logosContainerRef = useRef(null);\r\n const [imageExperiencePortalContainerState, setImageExperiencePortalContainerState] = useState({});\r\n const [previewImagesSharedState, setPreviewImagesSharedState] = useState({ previewImageId: null, cropImageObj: null });\r\n const [imageExperienceAddNewImageCallback, setImageExperienceAddNewImageCallback] = useState(noop);\r\n const [newCTACallback, setNewCTACallback] = useState(noop);\r\n\r\n const allAssetsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdSettingsExpandedSections }),\r\n [setAdSettingsExpandedSections]\r\n );\r\n\r\n const {\r\n copilotBanner,\r\n suggestionPoller,\r\n } = useCopilot({\r\n maxUploadNum,\r\n addNewShortHeadlinesCallback,\r\n addNewLongHeadlinesCallback,\r\n addNewDescriptionCallback,\r\n imageExperienceAddNewImageCallback,\r\n newCTACallback,\r\n currentCTA: callToAction && callToAction.cta,\r\n onReset,\r\n cid,\r\n aid,\r\n serverContext,\r\n instrumentation,\r\n data: isEmpty(data) ? undefined : data,\r\n campaignId,\r\n assetGroupId: adId,\r\n feature: 'MMA',\r\n });\r\n\r\n const updateFinalUrlForCopilot = useCallback(() => {\r\n setFinalUrlForCopilotRecommendations(finalUrlForRecommendation);\r\n }, [finalUrlForRecommendation]);\r\n\r\n const updateFinalUrlCallback = useCallback((newFinalUrls) => {\r\n onDataChange({\r\n data: {\r\n ...data,\r\n FinalUrls: newFinalUrls,\r\n },\r\n });\r\n }, [data, onDataChange]);\r\n\r\n const onCallActionLanguageChange = useCallback((updates) => {\r\n setCTAText(updates.ctaText);\r\n }, []);\r\n\r\n const adPreviewConfig = getUnifiedAdPreviewConfig({ isMultimediaAd: true });\r\n const automatedCTAEnable = useAutomatedCTA({\r\n isMMAAutomatedCTAOptInEnabled: true,\r\n campaignId,\r\n });\r\n\r\n useInitAdCustomizer({\r\n viewContext,\r\n permissions,\r\n i18n: newI18n,\r\n });\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {showUnmappedFormErrors && (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n { copilotBanner }\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
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nCopilotSearchMMAEditorContainerInternal.propTypes = {\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.string,\r\n MobileFinalUrls: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.arrayOf(PropTypes.string),\r\n LongHeadlines: PropTypes.arrayOf(PropTypes.string),\r\n Descriptions: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.string,\r\n FinalUrlForRecommendation: PropTypes.string,\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n language: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n onReset: PropTypes.func.isRequired,\r\n errors: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AdPreviewLibrarySearchMMA: PropTypes.bool,\r\n CopilotCTALogoGeneration: PropTypes.bool,\r\n }),\r\n IsBackgroundSceneEnabled: PropTypes.bool,\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n viewContext: PropTypes.shape({\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n showAllValidationErrors: PropTypes.bool.isRequired,\r\n showUnmappedFormErrors: PropTypes.bool,\r\n triggerTestUurl: PropTypes.func.isRequired,\r\n adId: PropTypes.number,\r\n newI18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nCopilotSearchMMAEditorContainerInternal.defaultProps = {\r\n showUnmappedFormErrors: true,\r\n adId: null,\r\n};\r\n\r\nexport const CopilotSearchMMAEditorContainer = withScope(CopilotSearchMMAEditorContainerInternal);\r\n","import _ from 'underscore';\r\nimport { useState, useEffect } from 'react';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\n\r\nexport const useAutomatedCTA = ({ isMMAAutomatedCTAOptInEnabled, campaignId }) => {\r\n const [automatedCTAEnable, setAutomatedCTAEnable] = useState(false);\r\n\r\n useEffect(() => {\r\n if (isMMAAutomatedCTAOptInEnabled && jsdata.Campaign && campaignId && edmCampaign.currentAccount) {\r\n const params = {\r\n queryParameters: {\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n },\r\n bypassCache: true,\r\n };\r\n jsdata.Campaign.find(campaignId, params).then((data) => {\r\n const campaignSettings = data.CampaignSettings;\r\n const callToActionSetting = campaignSettings && _.find(campaignSettings, setting => setting['@odata.type'] === '#Model.CallToActionSetting');\r\n setAutomatedCTAEnable(!callToActionSetting || !callToActionSetting.AutomatedCallToActionOptOut);\r\n });\r\n }\r\n }, [campaignId, isMMAAutomatedCTAOptInEnabled]);\r\n\r\n return automatedCTAEnable;\r\n};\r\n","import { useContext } from 'react';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { initializeAdCustomizer } from '@bingads-webui-campaign/ad-customizers-next';\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\n\r\nexport const useInitAdCustomizer = ({ viewContext, permissions, i18n }) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n const campaignId = viewContext.currentCampaign && viewContext.currentCampaign.Id;\r\n const adGroupId = viewContext.currentAdGroup && viewContext.currentAdGroup.Id;\r\n\r\n initializeAdCustomizer({\r\n deps: {\r\n i18n,\r\n config,\r\n instrumentation,\r\n permissions,\r\n edmCampaign,\r\n jsDataCampaign,\r\n timeZone: config.get('AccountTimeZone'),\r\n scope: {\r\n campaignId: Number(campaignId),\r\n adGroupId: Number(adGroupId),\r\n },\r\n showAdCustomizers: true,\r\n IsRSAIffPopupEnabledFromDeps: false,\r\n },\r\n adType: 'ResponsiveAd',\r\n });\r\n};\r\n","import React, { useContext, useMemo, useState, useCallback, useImperativeHandle, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { ImageOData } from '@bingads-webui-campaign/image-odata';\r\nimport { convertFromAdModel, processViewModelDataForSaving } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport { withRecommendationContext, RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withBannerService } from '@bingads-webui/inline-copilot';\r\nimport { testUurl, uurlLevels } from '@bingads-webui-component-legacy/upgraded-url/service/testUurl';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { CopilotSearchMMAEditorContainer } from './copilot-search-mma-editor-container';\r\nimport { mapBulkUpsertErrors } from './utils/errors-util';\r\nimport { useAppliedLog } from './useAppliedLog';\r\n\r\nconst emptyRecommendationData = {\r\n Images: {\r\n ImageList: [],\r\n ImageAssets: null,\r\n },\r\n Headlines: {\r\n Headline0: '',\r\n Headline1: '',\r\n Headline2: '',\r\n },\r\n LongHeadlines: {\r\n LongHeadline0: '',\r\n },\r\n Descriptions: {\r\n Description0: '',\r\n Description1: '',\r\n },\r\n};\r\n\r\nconst emptyData = {\r\n ...emptyRecommendationData,\r\n BusinessName: undefined,\r\n FinalUrls: [],\r\n MobileFinalUrls: [],\r\n TrackingUrlTemplate: undefined,\r\n UrlCustomParameters: undefined,\r\n FinalUrlSuffix: undefined,\r\n};\r\n\r\nconst CopilotSearchMMAEditorInternal = ({\r\n responsiveAdRepository,\r\n genericImage,\r\n viewContext,\r\n ad,\r\n onChanged,\r\n perfMarker,\r\n oDataConfig,\r\n permissions,\r\n editorRef,\r\n newI18n,\r\n externalErrors,\r\n showAllValidationErrors,\r\n showUnmappedFormErrors,\r\n}) => {\r\n const { scope } = useContext(ScopeContext);\r\n const { cid, aid, uid } = scope.values || {};\r\n const i18n = useContext(I18nContext);\r\n const [data, setData] = useState(() => (ad ? convertFromAdModel(ad) : {}));\r\n const [isDataValid, setIsDataValid] = useState(false);\r\n const [errors, setErrors] = useState(ad ? (ad.errors || []) : []);\r\n const [blocking, setBlocking] = useState(false);\r\n const imageOData = useMemo(() => new ImageOData(cid, aid, oDataConfig), [cid, aid, oDataConfig]);\r\n const [saveFailed, setSaveFailed] = useState(false);\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const campaignId = viewContext.currentCampaign && viewContext.currentCampaign.Id;\r\n const adgroupId = viewContext.currentAdGroup && viewContext.currentAdGroup.Id;\r\n const { logAppliedSuggestion } = useAppliedLog({ campaignId });\r\n const activityContext = useContext(ActivityContext);\r\n const log = activityContext.signal;\r\n\r\n const clearAllErrors = useCallback(() => {\r\n setErrors([]);\r\n }, []);\r\n\r\n const onDataChange = useCallback(({ data: newData, isValid }) => {\r\n setData(newData);\r\n setIsDataValid(isValid);\r\n onChanged(newData, isValid);\r\n }, [onChanged]);\r\n\r\n const onReset = useCallback((clearAll) => {\r\n const dataPatch = {\r\n data: {\r\n ...data,\r\n ...(clearAll ? emptyData : emptyRecommendationData),\r\n },\r\n isValid: false,\r\n };\r\n\r\n onDataChange(dataPatch);\r\n }, [data, onDataChange]);\r\n\r\n useImperativeHandle(editorRef, () => ({\r\n saveAdAsync: () => {\r\n if (isDataValid) {\r\n setSaveFailed(false);\r\n setBlocking(true);\r\n clearAllErrors();\r\n\r\n const adData = processViewModelDataForSaving(data, campaignId, adgroupId, ad && ad.isSaved !== false && ad.Id);\r\n\r\n return responsiveAdRepository.processImageAndSaveSearchAdAsync(adData, imageOData, false)\r\n .then((responseData) => {\r\n if (responseData) {\r\n const descriptions = JSON.parse(responseData.Descriptions); // empty?\r\n const headlines = JSON.parse(responseData.Headlines);\r\n const longHeadlines = JSON.parse(responseData.LongHeadlines);\r\n logAppliedSuggestion({\r\n assetData: {\r\n Descriptions: _.pluck(descriptions, 'Text'),\r\n Headlines: _.pluck(headlines, 'Text'),\r\n LongHeadlines: _.pluck(longHeadlines, 'Text'),\r\n Images: {\r\n ImageList: responseData.ImageList,\r\n },\r\n FinalUrls: responseData.FinalUrls,\r\n Id: responseData.Id,\r\n },\r\n isEditing: !!adData.Id,\r\n });\r\n }\r\n return responseData;\r\n })\r\n .catch((response) => {\r\n setSaveFailed(true);\r\n if (response) {\r\n const resErrors = _.unique(response.errors, false, err => err.ErrorNumber);\r\n setErrors(mapBulkUpsertErrors({\r\n errors: resErrors, i18n, scenario: 'mmaSave',\r\n }));\r\n return false;\r\n }\r\n return false;\r\n }).finally(() => {\r\n setBlocking(false);\r\n });\r\n }\r\n setSaveFailed(true);\r\n return Promise.resolve(false);\r\n },\r\n saveToClient: () => {\r\n if (isDataValid) {\r\n clearAllErrors();\r\n const adData = processViewModelDataForSaving(data, campaignId, adgroupId, ad && ad.isSaved !== false && ad.Id);\r\n return responsiveAdRepository.processImageAndSaveToClientAsync(adData, imageOData, false);\r\n }\r\n setSaveFailed(true);\r\n return Promise.resolve(false);\r\n },\r\n hasCreatedAd: () => {\r\n },\r\n onCreateAd: () => {\r\n setRecommendationContext({\r\n themes: [],\r\n headlines: [],\r\n longHeadlines: [],\r\n descriptions: [],\r\n imageAssets: [],\r\n });\r\n onReset(true);\r\n },\r\n logAppliedSuggestion,\r\n // for recommendation\r\n // setResponseErrors: () => {\r\n // },\r\n // getData: () => {\r\n // },\r\n // getProcessedDataAsync: () => {\r\n // },\r\n // isDataValid: () => {\r\n // },\r\n // getFlattenedImageAssetList\r\n }));\r\n\r\n useEffect(() => () => {\r\n log(`new search mma editor url: ${data.FinalUrls}`);\r\n }, [data.FinalUrls, log]);\r\n\r\n const triggerTestUurl = useCallback((fn, originalView) => {\r\n originalView.isInline = false; // eslint-disable-line\r\n originalView.level = uurlLevels.Ad; // eslint-disable-line\r\n const params = data || {};\r\n const context = {\r\n customerId: +cid,\r\n userId: +uid,\r\n accountId: +aid,\r\n campaignId,\r\n adGroupId: adgroupId,\r\n entityId: (ad && ad.Id) || '',\r\n };\r\n const options = {\r\n apiInLog: 'responsive-ad-editor/uurlTest',\r\n };\r\n testUurl(fn, originalView, params, context, options);\r\n }, [ad, adgroupId, aid, cid, data, uid, campaignId]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCopilotSearchMMAEditorInternal.propTypes = {\r\n responsiveAdRepository: PropTypes.shape({\r\n processImageAndSaveSearchAdAsync: PropTypes.func.isRequired,\r\n processImageAndSaveToClientAsync: PropTypes.func.isRequired,\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n viewContext: PropTypes.shape({\r\n currentAdGroup: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n ad: PropTypes.shape({\r\n Images: PropTypes.shape({}),\r\n Id: PropTypes.number,\r\n ImageList: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({}))),\r\n errors: PropTypes.arrayOf(PropTypes.shape({})),\r\n isSaved: PropTypes.bool,\r\n }),\r\n onChanged: PropTypes.func,\r\n perfMarker: PropTypes.shape({\r\n willFetchFile: PropTypes.func.isRequired,\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }),\r\n permissions: PropTypes.shape({\r\n IsBoostPortraitImageEnabled: PropTypes.bool,\r\n IsStockPhotoFilterEnabled: PropTypes.bool,\r\n IsVideoAdsForCampaignEnabled: PropTypes.bool,\r\n IsMultiMediaAdsPhase2Enabled: PropTypes.bool,\r\n IsVideoAdEditorEnabled: PropTypes.bool,\r\n IsAmplifyEnabled: PropTypes.bool,\r\n IsBoost200x100ImageEnabled: PropTypes.bool,\r\n IsBoostNewAspectRatioSupportEnabled: PropTypes.bool,\r\n IsMSANLogoAndCTAForMMAEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n // onAdSaved: PropTypes.func,\r\n editorRef: PropTypes.shape({\r\n current: PropTypes.shape({}),\r\n }).isRequired,\r\n newI18n: PropTypes.shape({}).isRequired,\r\n externalErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n showAllValidationErrors: PropTypes.bool,\r\n showUnmappedFormErrors: PropTypes.bool,\r\n};\r\n\r\nCopilotSearchMMAEditorInternal.defaultProps = {\r\n ad: null,\r\n onChanged: _.noop,\r\n perfMarker: {\r\n willFetchFile: _.noop,\r\n willInit: _.noop,\r\n willFetchData: _.noop,\r\n willRender: _.noop,\r\n done: _.noop,\r\n createChild: _.noop,\r\n },\r\n oDataConfig: null,\r\n permissions: { dynamic: {} },\r\n externalErrors: undefined,\r\n showAllValidationErrors: false,\r\n showUnmappedFormErrors: true,\r\n};\r\n\r\nexport const CopilotSearchMMAEditor = _.compose(\r\n withBannerService,\r\n withRecommendationContext\r\n)(CopilotSearchMMAEditorInternal);\r\n","import { useContext, useCallback } from 'react';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { logCopilotRecommendations } from '@bingads-webui-campaign-react/copilot-common';\r\n\r\nexport const useAppliedLog = ({ campaignId }) => {\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n const logAppliedSuggestion = useCallback(({\r\n assetData,\r\n isEditing,\r\n }) => {\r\n logCopilotRecommendations({\r\n recommendationContext,\r\n assetGroup: assetData,\r\n campaignId,\r\n isEditing,\r\n });\r\n }, [campaignId, recommendationContext]);\r\n\r\n return {\r\n logAppliedSuggestion,\r\n };\r\n};\r\n","import { UAPPlacementTypeAlias as EPT } from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\nimport { AdTypeEnum } from '@bingads-webui-campaign-react/image-experience';\r\n\r\nconst searchMMAConfig = {\r\n adType: AdTypeEnum.MMA,\r\n placementConfig: [{\r\n placementSetName: 'searchMMAConfig',\r\n placementTypes: [...EPT.MMA.All],\r\n }],\r\n};\r\n\r\nconst msanMMAConfig = {\r\n adType: AdTypeEnum.MSAN,\r\n placementConfig: [{\r\n placementSetName: 'msanMMAConfig',\r\n placementTypes: [\r\n ...EPT.MSAN.All,\r\n EPT.Outlook.Web,\r\n EPT.Outlook.Mobile,\r\n ],\r\n }],\r\n};\r\n\r\nconst msanMMAV2Config = {\r\n adType: AdTypeEnum.MSANV2,\r\n placementConfig: [{\r\n placementSetName: 'msanMMAV2Config',\r\n placementTypes: [\r\n ...EPT.MSANV2.All,\r\n EPT.Outlook.Web,\r\n EPT.Outlook.Mobile,\r\n ],\r\n }],\r\n};\r\n\r\n// Boost\r\nconst basicBoostPlacementTypes = [\r\n EPT.Boost.WindowsSpotlight,\r\n EPT.Boost.DiscoverCard,\r\n EPT.Boost.StartMenu,\r\n EPT.Boost.ActionCenter,\r\n EPT.Boost.Banner,\r\n EPT.Boost.Prong1Prong2Feed,\r\n EPT.Boost.Coachmark,\r\n];\r\nconst msanMMABoostConfigBasic = {\r\n adType: AdTypeEnum.Boost,\r\n placementConfig: [{\r\n placementSetName: 'msanMMABoostConfigBasic',\r\n placementTypes: [\r\n ...EPT.MSAN.All, // MMA V2 is not supported in MSAN Boost\r\n ...basicBoostPlacementTypes,\r\n ],\r\n }],\r\n};\r\nconst msanMMABoostConfigNew = {\r\n adType: AdTypeEnum.Boost,\r\n placementConfig: [{\r\n placementSetName: 'msanMMABoostConfigNew',\r\n placementTypes: [\r\n ...EPT.MSAN.All, // MMA V2 is not supported in MSAN Boost\r\n EPT.Boost.HeroImageCarousel200x100,\r\n ...basicBoostPlacementTypes,\r\n ],\r\n }],\r\n};\r\nconst msanMMABoostConfigAll = {\r\n adType: AdTypeEnum.NewBoost,\r\n placementConfig: [{\r\n placementSetName: 'msanMMABoostConfigAll',\r\n placementTypes: [\r\n ...EPT.MSAN.All, // MMA V2 is not supported in MSAN Boost\r\n ...EPT.Boost.All,\r\n ],\r\n }],\r\n};\r\n\r\nconst defaultConfig = {\r\n adType: 'default',\r\n placementConfig: [{\r\n placementSetName: 'defaultConfig',\r\n placementTypes: [\r\n EPT.Outlook.Web,\r\n EPT.Outlook.Mobile,\r\n ],\r\n }],\r\n};\r\n\r\nexport const getUnifiedAdPreviewConfig = ({\r\n isMultimediaAd,\r\n isMultimediaAdinMSANEnabled,\r\n isMMAV2Enabled,\r\n isMSANBoostEnabled,\r\n isBoost200x100ImageEnabled,\r\n isBoostNewAspectRatioSupportEnabled,\r\n}) => {\r\n if (isMultimediaAd) {\r\n return searchMMAConfig;\r\n }\r\n\r\n if (isMultimediaAdinMSANEnabled && !isMSANBoostEnabled && !isMMAV2Enabled) {\r\n return msanMMAConfig;\r\n }\r\n\r\n if (isMMAV2Enabled) {\r\n return msanMMAV2Config;\r\n }\r\n\r\n if (isMSANBoostEnabled) {\r\n if (isBoostNewAspectRatioSupportEnabled) {\r\n return msanMMABoostConfigAll;\r\n } else if (isBoost200x100ImageEnabled) {\r\n return msanMMABoostConfigNew;\r\n }\r\n return msanMMABoostConfigBasic;\r\n }\r\n\r\n return defaultConfig;\r\n};\r\n","export const getBulkMMAEditorStyles = () => ({\r\n '@global': {\r\n '.top-grid-form#bulkEditContainer .crud-audience-ad .react-image-experience .crud-audience-ad-react.crud-multimedia-ad-react': {\r\n '& .ad-edit-and-preview-container .image-experience-content': {\r\n minWidth: 'unset',\r\n '& .image-list-view-content .image-list .image-list-content': {\r\n width: '100%',\r\n border: 'none',\r\n margin: 0,\r\n padding: 0,\r\n '& .image-list-item.image-list-add-placeholder': {\r\n borderStyle: 'dashed',\r\n borderColor: '#c8c6c4',\r\n borderRadius: 6,\r\n borderWidth: 1,\r\n marginTop: 8,\r\n },\r\n '& .image-list-choice-group': {\r\n '& .ms-ChoiceFieldGroup-flexContainer': {\r\n flexWrap: 'wrap',\r\n width: 'unset',\r\n '& .ms-ChoiceField': {\r\n marginBottom: 4,\r\n marginRight: 8,\r\n '& ~ .ms-ChoiceField': {\r\n marginLeft: 0,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n '& .actionextension-search-dropdown-container .dropdown-search-selector__dropdown': {\r\n marginLeft: 0,\r\n '& .dropdown-toggle .text-left': {\r\n padding: '4px 0 0 8px',\r\n },\r\n },\r\n },\r\n },\r\n adEditorShell: {\r\n width: '100%',\r\n },\r\n mmaAdImagePreviewCarousel: {\r\n position: 'sticky',\r\n width: '100%',\r\n minWidth: 669,\r\n top: '0px',\r\n '& .new-preview-carousel-container-adprelib': {\r\n '& .new-carousel-navigation-mma-adprelib': {\r\n '& .carousel-indicators': {\r\n left: 20,\r\n margin: '20px 24px',\r\n position: 'absolute',\r\n width: 'auto',\r\n },\r\n '& .carousel-control.left': {\r\n left: 0,\r\n bottom: -7,\r\n position: 'absolute',\r\n marginLeft: 15,\r\n marginRight: 76,\r\n height: 32,\r\n marginTop: 20,\r\n marginBottom: 20,\r\n top: 'auto',\r\n right: 0,\r\n },\r\n '& .carousel-control.right': {\r\n left: 0,\r\n bottom: -7,\r\n position: 'absolute',\r\n marginLeft: 135,\r\n marginRight: 76,\r\n height: 32,\r\n marginTop: 20,\r\n marginBottom: 20,\r\n top: 'auto',\r\n right: 0,\r\n },\r\n },\r\n },\r\n },\r\n rightStyles: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n container: {\r\n display: 'flex',\r\n width: '100%',\r\n gap: '32px',\r\n '& .text-input-container': {\r\n width: '100% !important',\r\n },\r\n '& .title-item': {\r\n width: 'auto',\r\n maxWidth: '100%',\r\n },\r\n },\r\n leftStyles: {\r\n width: '40%',\r\n maxWidth: 600,\r\n minWidth: 482,\r\n '& .text-assets-collection-container': {\r\n width: 'unset',\r\n '& label.control-label': {\r\n textAlign: 'left',\r\n },\r\n },\r\n '& .business-name-container': {\r\n width: 'unset',\r\n },\r\n },\r\n headerStackStyles: {\r\n width: 'unset',\r\n '& .server-errors': {\r\n marginBottom: 15,\r\n '& .error a': {\r\n color: '#A80000',\r\n },\r\n },\r\n },\r\n businessNameStyle: {\r\n '& .business-name-container': {\r\n width: '100%',\r\n },\r\n },\r\n imageExperienceStyle: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n '& .image-list-choice-group .ms-ChoiceFieldGroup-flexContainer': {\r\n width: 'unset !important',\r\n },\r\n '& .image-suggestion-carousel-root .panel-heading .see-all-link': {\r\n fontWeight: 'normal',\r\n },\r\n },\r\n});\r\n\r\n","import React, { useEffect, useContext, useCallback, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { validateAdUrl } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ValidatedImageExperienceWrapper } from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { useWebsiteSuggestion } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { getUnifiedAdPreviewConfig } from '../get-unified-ad-preview-config';\r\n\r\nexport const ImageExperienceWithSuggestionPollerForBulk = ({\r\n campaignId,\r\n oDataConfig,\r\n data,\r\n ctaText,\r\n url,\r\n setUrl,\r\n permissions,\r\n perfMarker,\r\n imagesContainerRef,\r\n logosContainerRef,\r\n genericImage,\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n setImageExperiencePortalContainerState,\r\n setImageExperienceAddNewImageCallback,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const serverContext = useContext(ServerContext);\r\n const { scope } = useContext(ScopeContext);\r\n const activityContext = useContext(ActivityContext);\r\n const scenario = useContext(ScenarioContext);\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const { aid } = scope.values || {};\r\n const adPreviewConfig = getUnifiedAdPreviewConfig({ isMultimediaAd: true });\r\n const businessName = data.BusinessName;\r\n const images = data.Images;\r\n const imageData = useMemo(() => ({\r\n Images: images,\r\n BusinessName: businessName,\r\n CallToAction: ctaText,\r\n FinalUrls: [url],\r\n }), [businessName, ctaText, images, url]);\r\n\r\n const {\r\n suggestionState,\r\n suggestionPoller,\r\n } = useWebsiteSuggestion({\r\n oDataConfig,\r\n adContext: {\r\n advertiserCustomerId: _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']),\r\n accountId: aid,\r\n campaignId,\r\n },\r\n instrumentation,\r\n logActivity: activityContext.signal,\r\n permissions,\r\n fullUrl: url,\r\n hasErrorInUrl: validateAdUrl(url) !== null,\r\n adCreatorScenario: {\r\n scenarioName: `${scenario.name}AdCreation`,\r\n scenarioValue: `${scenario.name}AdCreation`,\r\n },\r\n customizedGetMinimumSizeForImage: _.partial(constants.getMinimumSizeForImage, null, true),\r\n });\r\n\r\n const updateFinalUrlCallback = useCallback((newFinalUrls) => {\r\n setUrl(newFinalUrls[0]);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (suggestionState && suggestionState.suggestion && suggestionState.suggestion.images) {\r\n setRecommendationContext({\r\n images: {\r\n websiteImagesState: {\r\n suggestion: suggestionState.suggestion,\r\n },\r\n },\r\n });\r\n }\r\n }, [setRecommendationContext, suggestionState]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageExperienceWithSuggestionPollerForBulk.propTypes = {\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n MobileFinalUrls: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.arrayOf(PropTypes.string),\r\n LongHeadlines: PropTypes.arrayOf(PropTypes.string),\r\n Descriptions: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.string,\r\n FinalUrlForRecommendation: PropTypes.string,\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n language: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AdPreviewLibrarySearchMMA: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n ctaText: PropTypes.string.isRequired,\r\n imagesContainerRef: PropTypes.shape({\r\n current: PropTypes.instanceOf(Element),\r\n }).isRequired,\r\n logosContainerRef: PropTypes.shape({\r\n current: PropTypes.instanceOf(Element),\r\n }).isRequired,\r\n previewImagesSharedState: PropTypes.shape({}).isRequired,\r\n setPreviewImagesSharedState: PropTypes.func.isRequired,\r\n setImageExperiencePortalContainerState: PropTypes.func.isRequired,\r\n setImageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n url: PropTypes.string.isRequired,\r\n setUrl: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const BulkMMAConvertEditorHeader = ({\r\n i18n,\r\n selectedRowCount,\r\n}) => (\r\n
    \r\n
    {i18n.getString(_TL_('Copy responsive search ads to Multimedia ads ({{count}} ads selected)'), { count: selectedRowCount })}
    \r\n
    {i18n.getString(_TL_('Your existing responsive search ads will continue to serve after you copy them to Multimedia ads.'))}
    \r\n
    \r\n);\r\n\r\nBulkMMAConvertEditorHeader.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n selectedRowCount: PropTypes.number.isRequired,\r\n};\r\n","import classNames from 'classnames';\r\nimport React, { useContext, useMemo, useRef, useState, useCallback } from 'react';\r\nimport { noop } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { /* ResponsiveAd, */ AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidatedLegacyCallToActionWithLanguageSection } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n ValidatedBusinessNameWithRecommendationSection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n ImageListPortalContainerSection,\r\n LogoListPortalContainerSection,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { AdStatusSection } from '@bingads-webui-campaign-react/ad-status';\r\n\r\nimport { getBulkMMAEditorStyles } from './bulk-mma-convert-editor-style';\r\nimport { SearchMMAAdPreview } from '../search-mma-ad-preview';\r\nimport { errorMapper } from '../utils/errors-util';\r\nimport { ImageExperienceWithSuggestionPollerForBulk } from './image-experience-with-suggestion-poller';\r\nimport { BulkMMAConvertEditorHeader } from './bulk-mma-convert-editor-header';\r\n\r\nconst entity = 'ResponsiveAd';\r\n\r\nexport const BulkMMAConvertEditorContainer = ({\r\n data,\r\n errors,\r\n onDataChange,\r\n perfMarker,\r\n permissions,\r\n viewContext,\r\n genericImage,\r\n showAllValidationErrors,\r\n oDataConfig,\r\n selectedRowCount,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const errorMapperWithI18n = useMemo(() => error => errorMapper(error, i18n), [i18n]);\r\n const campaignId = viewContext.currentCampaign && viewContext.currentCampaign.Id;\r\n const classes = useDefaultStyles(getBulkMMAEditorStyles);\r\n const [url, setUrl] = useState('');\r\n const businessName = data.BusinessName;\r\n const images = data.Images;\r\n const callToAction = data.CallToAction;\r\n const [ctaText, setCTAText] = useState(callToAction && callToAction.cta);\r\n\r\n const previewData = useMemo(() => ({\r\n shortHeadline: i18n.getString('Audience_Campaign_Ad_Preview_Default_ShortHeadline'),\r\n longHeadline: i18n.getString('Audience_Campaign_Ad_Preview_Default_LongHeadline'),\r\n description: i18n.getString('Audience_Campaign_Ad_Preview_Default_Description'),\r\n businessName: businessName || i18n.getString('Audience_Campaign_Ad_Preview_Default_BusinessName'),\r\n displayUrl: url,\r\n url: url || 'https://www.bing.com',\r\n callToAction: ctaText,\r\n }), [businessName, ctaText, i18n, url]);\r\n\r\n const [\r\n allAdSettingsSections,\r\n adSettingsExpandedSections,\r\n setAdSettingsExpandedSections,\r\n ] = useCollapseState(\r\n ['images', 'logos', 'business-name', 'call-to-action', 'ad-status'] /* all sections */,\r\n ['images', 'logos', 'business-name', 'call-to-action', 'ad-status'] /* initially expanded sections */\r\n );\r\n\r\n const imagesContainerRef = useRef(null);\r\n const logosContainerRef = useRef(null);\r\n const [imageExperiencePortalContainerState, setImageExperiencePortalContainerState] = useState({});\r\n const [previewImagesSharedState, setPreviewImagesSharedState] = useState({ previewImageId: null, cropImageObj: null });\r\n const [, setImageExperienceAddNewImageCallback] = useState(noop);\r\n\r\n const allAssetsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdSettingsExpandedSections }),\r\n [setAdSettingsExpandedSections]\r\n );\r\n\r\n const onCallActionLanguageChange = useCallback((updates) => {\r\n setCTAText(updates.ctaText);\r\n }, []);\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\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
    \r\n );\r\n};\r\n\r\nBulkMMAConvertEditorContainer.propTypes = {\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.string,\r\n MobileFinalUrls: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.arrayOf(PropTypes.string),\r\n LongHeadlines: PropTypes.arrayOf(PropTypes.string),\r\n Descriptions: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.string,\r\n FinalUrlForRecommendation: PropTypes.string,\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n language: PropTypes.string,\r\n }),\r\n AdStatus: PropTypes.string,\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n errors: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AdPreviewLibrarySearchMMA: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n viewContext: PropTypes.shape({\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n showAllValidationErrors: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }).isRequired,\r\n selectedRowCount: PropTypes.number.isRequired,\r\n};\r\n\r\nBulkMMAConvertEditorContainer.defaultProps = {\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button } from '@bingads-webui-react/primitive';\r\n\r\nexport const BulkMMAConvertEditorFooter = ({\r\n i18n,\r\n showSave,\r\n onSave,\r\n onClose,\r\n}) => (\r\n
    \r\n {showSave &&\r\n \r\n {i18n.getString('Audience_Campaign_Ad_Save')}\r\n \r\n }\r\n \r\n {i18n.getString('Audience_Campaign_Cancel_Label')}\r\n \r\n
    \r\n);\r\n\r\nBulkMMAConvertEditorFooter.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n showSave: PropTypes.bool.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","import React, { useMemo, } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nconst noTranslateModel = { noTranslate: text => ({text}) };\r\n\r\nexport const BulkMMAConvertProgress = ({\r\n onHide, i18n, show, totalCount, completeCount,\r\n}) => {\r\n const completePercentage = useMemo(() => {\r\n const total = totalCount;\r\n if (total === 0) {\r\n return '1%';\r\n }\r\n\r\n const completed = Math.floor((completeCount * 100) / total);\r\n return completed < 1 ? `${completed + 1}%` : `${completed}%`;\r\n }, [completeCount, totalCount]);\r\n\r\n if (!show) {\r\n return null;\r\n }\r\n\r\n const messageTemplate = i18n.getString(_TL_('You can see a summary of your changes on the {{noTranslate}}Bulk Edits{{/noTranslate}} page.'));\r\n\r\n return (\r\n
    \r\n
    {i18n.getString('BulkEdit_InitialStatus')}
    \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\nBulkMMAConvertProgress.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onHide: PropTypes.func.isRequired,\r\n totalCount: PropTypes.number.isRequired,\r\n completeCount: PropTypes.number.isRequired,\r\n show: PropTypes.bool.isRequired,\r\n};\r\n\r\nBulkMMAConvertProgress.defaultProps = {\r\n};\r\n","/* eslint-disable no-script-url */\r\nimport React, { useMemo, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const BulkMMAConvertError = ({\r\n show, inlineErrors, i18n, errorCount,\r\n}) => {\r\n const [showErrorGrid, setShowErrorGrid] = useState(false);\r\n const errorCountString = i18n.getString('BulkEdit_InlineError_ErrorCount').replace('{0}', errorCount);\r\n const errorCountLinkText = useMemo(() => {\r\n if (showErrorGrid) {\r\n return i18n.getString('BulkEdit_InlineError_HideErrorLink');\r\n }\r\n return i18n.getString('BulkEdit_InlineError_ErrorLink').replace('{0}', errorCount);\r\n }, [errorCount, i18n, showErrorGrid]);\r\n const errorsGrids = useMemo(() => [i18n.getString(_TL_('Ad')), i18n.getString(_TL_('Error'))], [i18n]);\r\n\r\n const onToggleErrorGrid = useCallback(() => {\r\n setShowErrorGrid(!showErrorGrid);\r\n }, [showErrorGrid]);\r\n\r\n if (!show) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n
    {errorCountString}
    \r\n {errorCountLinkText}\r\n
    \r\n {showErrorGrid && (\r\n
    \r\n \r\n \r\n \r\n {errorsGrids.map(item => (\r\n \r\n ))}\r\n \r\n \r\n \r\n {inlineErrors.map(item => (\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n {item}\r\n
    \r\n
    \r\n
    {item.name}
    \r\n
    \r\n
    {item.error}
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nBulkMMAConvertError.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n errorCount: PropTypes.number.isRequired,\r\n show: PropTypes.bool.isRequired,\r\n inlineErrors: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n error: PropTypes.string,\r\n })).isRequired,\r\n};\r\n\r\nBulkMMAConvertError.defaultProps = {\r\n};\r\n","import React, { useContext, useMemo, useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { MessageBar, MessageBarType } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { ImageOData } from '@bingads-webui-campaign/image-odata';\r\nimport { processImageListViewModelToModel } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { bulkEditChange } from '@bingads-webui-campaign-legacy/bulk-edit/service/bulk-edit';\r\nimport { BulkMMAConvertEditorContainer } from './bulk-mma-convert-editor-container';\r\nimport { mapBulkUpsertErrors } from '../utils/errors-util';\r\nimport { BulkMMAConvertEditorFooter } from './bulk-mma-convert-editor-footer';\r\nimport { BulkMMAConvertProgress } from './bulk-mma-convert-progress';\r\nimport { BulkMMAConvertError } from './bulk-mma-convert-error';\r\nimport { getJobResults } from './repository';\r\nimport { getBulkEditParams, processViewModelDataForSaving } from './data-util';\r\n\r\nconst BulkMMAConvertEditorInternal = ({\r\n genericImage,\r\n viewContext,\r\n onAdSaved,\r\n onClose,\r\n perfMarker,\r\n oDataConfig,\r\n permissions,\r\n odata,\r\n allPages,\r\n selectedItems,\r\n filterService,\r\n selectedRowCount,\r\n}) => {\r\n const { scope } = useContext(ScopeContext);\r\n const { cid, aid } = scope.values || {};\r\n const i18n = useContext(I18nContext);\r\n const [data, setData] = useState({});\r\n const [isDataValid, setIsDataValid] = useState(true);\r\n const [errors, setErrors] = useState([]);\r\n const [blocking, setBlocking] = useState(false);\r\n const imageOData = useMemo(() => new ImageOData(cid, aid, oDataConfig), [cid, aid, oDataConfig]);\r\n const [saveFailed, setSaveFailed] = useState(false);\r\n const [isUnSaved, setUnSaved] = useState(false);\r\n const [showProgress, setShowProgress] = useState(false);\r\n const [bulkSuccessCount, setBulkSuccessCount] = useState(0);\r\n const [bulkErrorCount, setBulkErrorCount] = useState(0);\r\n const [bulkTotalCount, setBulkTotalCount] = useState(0);\r\n const [bulkInlineErrors, setBulkInlineErrors] = useState([]);\r\n const [bulkFailed, setBulkFailed] = useState(false);\r\n const [showBulkPartialError, setShowBulkPartialError] = useState(false);\r\n const [genericErrorMessages, setGenericErrorMessages] = useState([]);\r\n\r\n const clearAllErrors = useCallback(() => {\r\n setErrors([]);\r\n }, []);\r\n\r\n const onDataChange = useCallback(({ data: newData, isValid }) => {\r\n setData(newData);\r\n setIsDataValid(isValid);\r\n }, []);\r\n\r\n const onProgess = useCallback(() => {\r\n setShowProgress(true);\r\n }, []);\r\n\r\n const onHideProgress = useCallback(() => {\r\n setShowProgress(false);\r\n onClose();\r\n }, [onClose]);\r\n\r\n const onSave = useCallback(() => {\r\n if (isDataValid) {\r\n setSaveFailed(false);\r\n setBlocking(true);\r\n clearAllErrors();\r\n const adData = processViewModelDataForSaving(data);\r\n return processImageListViewModelToModel(adData.Images.ImageList, imageOData)\r\n .then((result) => {\r\n const {\r\n mtModel,\r\n } = result;\r\n\r\n const params = _.defaults(mtModel, adData);\r\n const bulkParams = getBulkEditParams(params, { allPages, selectedItems, filterService });\r\n return bulkEditChange({\r\n params: bulkParams,\r\n progressCB: onProgess,\r\n completeCB: (response) => {\r\n setShowProgress(false);\r\n setBlocking(false);\r\n if (response.Status === 'CompletedWithErrors') {\r\n setShowBulkPartialError(true);\r\n setBulkSuccessCount(response.SuccessRowCount);\r\n setBulkTotalCount(response.TotalRowCount);\r\n setBulkErrorCount(response.ErrorRowCount);\r\n setUnSaved(true);\r\n setBulkFailed(true);\r\n getJobResults(response.Id, 'errors', 0, 100, 'Ad', odata)\r\n .done((jobResponse) => {\r\n if (jobResponse && jobResponse.value) {\r\n const err = jobResponse.value.map((errorObject) => {\r\n const errorKey = errorObject.Errors[0];\r\n const entityName = errorObject.EntityKey[0].Value;\r\n\r\n return {\r\n error: i18n.getString(`Error_Campaign_API_${errorKey}`),\r\n name: entityName,\r\n };\r\n });\r\n\r\n setBulkInlineErrors(err);\r\n }\r\n });\r\n } else if (response.Status === 'Completed') {\r\n onAdSaved();\r\n }\r\n return response;\r\n },\r\n failedCB: (e) => {\r\n // mma bulk conversion failed\r\n setUnSaved(true);\r\n setBulkFailed(true);\r\n const errorMes = e.errors.map(error => JSON.stringify(error));\r\n setGenericErrorMessages(errorMes);\r\n },\r\n })\r\n .finally(() => { setBlocking(false); });\r\n })\r\n .catch((response) => {\r\n // mma bulk get params failed\r\n setSaveFailed(true);\r\n if (response) {\r\n const resErrors = _.unique(response.errors, false, err => err.ErrorNumber);\r\n setErrors(mapBulkUpsertErrors({\r\n errors: resErrors, i18n, scenario: 'mmaSave',\r\n }));\r\n return false;\r\n }\r\n return false;\r\n })\r\n .finally(() => { setBlocking(false); });\r\n }\r\n setSaveFailed(true);\r\n return Promise.resolve(false);\r\n }, [allPages, clearAllErrors, data, filterService, i18n, imageOData, isDataValid, odata, onAdSaved, onProgess, selectedItems]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
    \r\n {\r\n genericErrorMessages.map((errMsg, index) => (\r\n
    \r\n {errMsg}\r\n
    \r\n ))\r\n }\r\n
    \r\n \r\n {\r\n bulkFailed &&\r\n setBulkFailed(false)}\r\n >\r\n {i18n.getString(_TL_('we’re unable to save your multimedia ad(s) due to an error. Please try again. '))}\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nBulkMMAConvertEditorInternal.propTypes = {\r\n selectedItems: PropTypes.arrayOf(PropTypes.shape({})),\r\n allPages: PropTypes.bool,\r\n filterService: PropTypes.shape({}),\r\n selectedRowCount: PropTypes.number,\r\n genericImage: PropTypes.string.isRequired,\r\n viewContext: PropTypes.shape({\r\n currentAdGroup: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n currentCampaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n onAdSaved: PropTypes.func.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n perfMarker: PropTypes.shape({\r\n willFetchFile: PropTypes.func.isRequired,\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n oDataConfig: PropTypes.shape({\r\n odataRootUrl: PropTypes.string,\r\n odataPath: PropTypes.string,\r\n odataToken: PropTypes.string,\r\n }),\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({}),\r\n }),\r\n odata: PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n post: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nBulkMMAConvertEditorInternal.defaultProps = {\r\n selectedItems: [],\r\n allPages: false,\r\n selectedRowCount: 0,\r\n filterService: {},\r\n perfMarker: {\r\n willFetchFile: _.noop,\r\n willInit: _.noop,\r\n willFetchData: _.noop,\r\n willRender: _.noop,\r\n done: _.noop,\r\n createChild: _.noop,\r\n },\r\n oDataConfig: null,\r\n permissions: { dynamic: {} },\r\n};\r\n\r\nexport const BulkMMAConvertEditor = _.compose(withRecommendationContext)(BulkMMAConvertEditorInternal);\r\n","/* istanbul ignore file */\r\nimport _ from 'underscore';\r\nimport getParams from '@bingads-webui-campaign-legacy/bulk-edit/service/get-params';\r\n\r\nexport const getBulkEditParams = (params, selectionParams) => {\r\n const {\r\n CallToAction, CallToActionLanguage, Images, BusinessName, AdStatus,\r\n } = params;\r\n const { allPages, selectedItems, filterService } = selectionParams;\r\n const AdditionalData = {\r\n BusinessName,\r\n Images,\r\n CallToAction,\r\n CallToActionLanguage,\r\n Status: AdStatus,\r\n };\r\n const batchAction = {\r\n Actions: [{\r\n PasteAs: 'MultiMediaAd',\r\n '@odata.type': '#Model.CopyAction',\r\n AdditionalData: JSON.stringify(AdditionalData),\r\n }],\r\n EditCopy: false,\r\n };\r\n const filters = _.result(filterService, 'query');\r\n const projection = {\r\n selectedIds: allPages ? [] : _.pluck(selectedItems, 'Id'),\r\n isSelectAll: allPages,\r\n filters,\r\n filterOptions: filterService.odataOptions,\r\n };\r\n const finalParams = getParams(projection, batchAction, 'Ad');\r\n return finalParams;\r\n};\r\n\r\nexport const processViewModelDataForSaving = viewModel => ({\r\n CallToAction: viewModel.CallToAction.cta,\r\n CallToActionLanguage: viewModel.CallToAction.language,\r\n BusinessName: viewModel.BusinessName,\r\n Images: viewModel.Images,\r\n AdStatus: viewModel.AdStatus,\r\n});\r\n","/* istanbul ignore file */\r\nimport _ from 'underscore';\r\n\r\nexport const getJobResults = (jobId, statusFilter, skip, take, entity, odata) => {\r\n const urlTmpls = _.mapObject({\r\n getJobResults: '/Customers()/{{accountInUrl ? \\'Accounts()/\\' : \\'\\'}}BulkEditSessions(\\'{{jobId}}\\')/BulkEditResults?$top={{top}}&$skip={{skip}}',\r\n }, url => _.template(url));\r\n let url = urlTmpls.getJobResults({\r\n jobId,\r\n top: take,\r\n skip,\r\n accountInUrl: !entity || entity !== 'Account',\r\n });\r\n\r\n let filter = '';\r\n if (statusFilter === 'OnlyErrors') {\r\n filter = 'Errors/any() or EditorialErrors/any()';\r\n } else if (statusFilter ==='OnlySuccessful') {\r\n filter = 'not (Errors/any() or EditorialErrors/any())';\r\n }\r\n\r\n if (filter !== '') {\r\n url += urlTmpls.filterSuffix({\r\n statusFilter: filter,\r\n });\r\n }\r\n\r\n return odata.get(url);\r\n};\r\n","import React, { useContext, useState, useImperativeHandle } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const PlaceholderMMAEditor = ({\r\n responsiveAdRepository,\r\n pageContext,\r\n editorRef,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [errors, setErrors] = useState([]);\r\n\r\n useImperativeHandle(editorRef, () => ({\r\n saveAdAsync: () => {\r\n setErrors([]);\r\n\r\n return responsiveAdRepository.savePlaceholderMMA(pageContext)\r\n .then((data) => {\r\n if (_.isFinite(data.value)) {\r\n _.defaults(data, {\r\n Type: 'Responsive',\r\n });\r\n return data;\r\n }\r\n\r\n return false;\r\n })\r\n .catch((response) => {\r\n if (response) {\r\n const errorMsgs = [];\r\n const errorsFromResponse = _.unique(response, false, error => error.Code);\r\n\r\n _.forEach(errorsFromResponse, (error) => {\r\n const genericErrorMessage = i18n.getString(`Multimedia_Ad_Error_${error.Code}`)\r\n || i18n.getString('ErrorNumber_-1');\r\n errorMsgs.push(genericErrorMessage);\r\n });\r\n\r\n setErrors(errorMsgs);\r\n return false;\r\n }\r\n return false;\r\n });\r\n },\r\n }));\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n {\r\n errors.map((errMsg, index) => (\r\n
    \r\n {errMsg}\r\n
    \r\n ))\r\n }\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nPlaceholderMMAEditor.propTypes = {\r\n responsiveAdRepository: PropTypes.shape({\r\n savePlaceholderMMA: PropTypes.func.isRequired,\r\n }).isRequired,\r\n pageContext: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n CurrentAccount: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n editorRef: PropTypes.shape({\r\n current: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n","import React, { useContext, useMemo, useCallback, useEffect } from 'react';\r\nimport _, { get } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { getAutoCroppedImages, UnifiedPreviewCarousel, PreviewCarousel, getDefaultCurrentSelectedImageId, getImageListWithoutLogo } from '@bingads-webui-campaign-react/image-experience';\r\n\r\nimport { getUnifiedAdPreviewConfig } from './get-unified-ad-preview-config';\r\n\r\nconst findImageSetById = (imageList, baseImageId) => {\r\n if (!baseImageId) return false;\r\n\r\n const imageSetToEdit = _.find(imageList, placements => placements[0].BaseId.toString() === baseImageId.toString());\r\n return imageSetToEdit;\r\n};\r\n\r\nconst setImageSetById = (imageList, baseImageId, newImageSet) => {\r\n if (!baseImageId) return false;\r\n\r\n const imageSetIdx = _.findIndex(imageList, placements =>\r\n placements[0].BaseId.toString() === baseImageId.toString());\r\n\r\n if (imageSetIdx >= 0) {\r\n const newImageList = [...imageList];\r\n newImageList.splice(imageSetIdx, 1, newImageSet);\r\n return newImageList;\r\n }\r\n return [...imageList, newImageSet];\r\n};\r\n\r\nexport const SearchMMAAdPreview = ({\r\n data,\r\n onDataChange,\r\n permissions,\r\n genericImage,\r\n previewTexts,\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const enableAdPreviewLibrary = get(permissions.dynamic, 'AdPreviewLibrarySearchMMA', false);\r\n const imageList = data.Images && data.Images.ImageList;\r\n\r\n const onCropImage = useCallback((cropImageObj) => {\r\n setPreviewImagesSharedState({ ...previewImagesSharedState, cropImageObj });\r\n // autorotate=false\r\n }, [previewImagesSharedState, setPreviewImagesSharedState]);\r\n\r\n\r\n const { previewImageId } = previewImagesSharedState;\r\n\r\n useEffect(() => {\r\n if (!previewImageId && imageList && imageList.length > 0) {\r\n const firstImageId = getDefaultCurrentSelectedImageId(imageList);\r\n if (firstImageId) {\r\n setPreviewImagesSharedState({ ...previewImagesSharedState, previewImageId: firstImageId });\r\n }\r\n }\r\n }, [imageList, previewImageId, previewImagesSharedState, setPreviewImagesSharedState]);\r\n\r\n const onAddAspectRatio = useCallback((imageType) => {\r\n // We don't support logo in ad preview, so we need to filter out logo images\r\n const imageListWithoutLogo = getImageListWithoutLogo(imageList);\r\n const previewImages = findImageSetById(imageListWithoutLogo, previewImageId);\r\n\r\n let newPreviewImages = null;\r\n const targetedRatioIdx = _.findIndex(previewImages, image => image.type === imageType);\r\n if (targetedRatioIdx >= 0) {\r\n const targetedRatio = previewImages[targetedRatioIdx].clone();\r\n targetedRatio.setIncluded(true);\r\n newPreviewImages = [...previewImages];\r\n newPreviewImages.splice(targetedRatioIdx, 1, targetedRatio);\r\n } else {\r\n // for image added before partial aspect ratio is supported, may missed some ratio info\r\n const croppedImages = getAutoCroppedImages({\r\n originalImageToCrop: _.first(previewImages),\r\n isMultimediaAd: true,\r\n isMultimediaAdinMSANEnabled: false,\r\n });\r\n const target = _.find(croppedImages, image => image.type === imageType);\r\n target.isIncluded = true;\r\n newPreviewImages = [...previewImages, target];\r\n newPreviewImages.sort((a, b) => b.aspectRatio - a.aspectRatio);\r\n }\r\n\r\n const newImageList = setImageSetById(imageList, previewImageId, newPreviewImages);\r\n onDataChange({\r\n data: {\r\n ...data,\r\n Images: {\r\n ...data.Images,\r\n ImageList: newImageList,\r\n },\r\n },\r\n });\r\n return newImageList;\r\n }, [data, imageList, onDataChange, previewImageId]);\r\n\r\n const onRemoveAspectRatio = (imageType) => {\r\n const imageListWithoutLogo = getImageListWithoutLogo(imageList);\r\n const previewImages = findImageSetById(imageListWithoutLogo, previewImageId);\r\n\r\n const targetedRatioIdx = _.findIndex(previewImages, image => image.type === imageType);\r\n if (targetedRatioIdx >= 0) {\r\n const targetedRatio = previewImages[targetedRatioIdx].clone();\r\n targetedRatio.setIncluded(false);\r\n const newPreviewImages = [...previewImages];\r\n newPreviewImages.splice(targetedRatioIdx, 1, targetedRatio);\r\n const newImageList = setImageSetById(imageList, previewImageId, newPreviewImages);\r\n onDataChange({\r\n data: {\r\n ...data,\r\n Images: {\r\n ...data.Images,\r\n ImageList: newImageList,\r\n },\r\n },\r\n });\r\n return newImageList;\r\n }\r\n return imageList;\r\n };\r\n\r\n const PreviewCarouselComponent = enableAdPreviewLibrary ? UnifiedPreviewCarousel : PreviewCarousel;\r\n const adPreviewConfig = getUnifiedAdPreviewConfig({ isMultimediaAd: true });\r\n\r\n const imagesForPreview = useMemo(() => {\r\n const imageListWithoutLogo = getImageListWithoutLogo(imageList);\r\n\r\n if (previewImageId) {\r\n const previewImages = findImageSetById(imageListWithoutLogo, previewImageId);\r\n\r\n if (previewImages) {\r\n return previewImages;\r\n }\r\n }\r\n\r\n if (imageListWithoutLogo.length > 0) {\r\n return _.first(imageListWithoutLogo);\r\n }\r\n\r\n return [];\r\n }, [imageList, previewImageId]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nSearchMMAAdPreview.propTypes = {\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.string,\r\n MobileFinalUrls: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.arrayOf(PropTypes.string),\r\n LongHeadlines: PropTypes.arrayOf(PropTypes.string),\r\n Descriptions: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.string,\r\n FinalUrlForRecommendation: PropTypes.string,\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n language: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n AdPreviewLibrarySearchMMA: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n genericImage: PropTypes.string.isRequired,\r\n previewTexts: PropTypes.shape({\r\n shortHeadline: PropTypes.string,\r\n longHeadline: PropTypes.string,\r\n description: PropTypes.string,\r\n businessName: PropTypes.string,\r\n displayUrl: PropTypes.string,\r\n url: PropTypes.string,\r\n callToAction: PropTypes.string,\r\n }).isRequired,\r\n previewImagesSharedState: PropTypes.shape({\r\n previewImageId: PropTypes.string,\r\n cropImageObj: PropTypes.shape({}),\r\n }).isRequired,\r\n setPreviewImagesSharedState: PropTypes.func.isRequired,\r\n};\r\n","import { identity, result } from 'underscore';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { MMAAssetConfigs } from '../config';\r\n\r\nconst getBulkUploadEntityType = entitySchema =>\r\n (entitySchema.properties['bulk-upload-type'] || {}).value ||\r\n entitySchema.name;\r\n\r\nconst getBulkUploadErrorType = entitySchema =>\r\n `${getBulkUploadEntityType(entitySchema)} Error`;\r\n\r\nconst bulkUpsertAdSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(ResponsiveAd)]: 'ResponsiveAd',\r\n};\r\n\r\nexport const mapBulkUpsertErrors = ({\r\n errors,\r\n bulkUpsertEntityErrorMap = bulkUpsertAdSettingsEntityErrorMap,\r\n errorProcessor = identity,\r\n scenario,\r\n i18n,\r\n activityLogger,\r\n}) =>\r\n getBulkApiErrors(errors, scenario, i18n, activityLogger).map((error) => {\r\n const errorType = error.type;\r\n const mappedErrorType = result(bulkUpsertEntityErrorMap, errorType, errorType);\r\n // eslint-disable-next-line no-param-reassign\r\n error.type = mappedErrorType;\r\n return errorProcessor(error);\r\n });\r\n\r\nexport const errorMapper = (error, i18n) => {\r\n if ((error && error.message && error.message.indexOf(' {\r\n const max = 900;\r\n let min = -90;\r\n\r\n if (criterionType === 'Device') {\r\n min = -100;\r\n }\r\n\r\n return {\r\n max,\r\n min,\r\n };\r\n },\r\n};\r\n\r\nconst getBidAdjustmentOptions = () => {\r\n const i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n\r\n return {\r\n percentage: 0,\r\n availableOptions: [\r\n { key: 'inc', text: i18n.getString('Audience_Campaign_Settings_BidAdjustment_Increase') },\r\n { key: 'dec', text: i18n.getString('Audience_Campaign_Settings_BidAdjustment_Decrease') },\r\n ],\r\n selectedOption: 'inc',\r\n };\r\n};\r\n\r\n/**\r\n * Function to compute bid adjustment\r\n * @param {string} rawBidPercentage Bid percentage input\r\n * @param {string} bidAdjOptionText Bid adjustment option input\r\n *\r\n * @returns {int} Computed Bid adjustment value\r\n */\r\nconst computeBidAdjustment = (rawBidPercentage, bidAdjOptionText) => {\r\n const percentage = Number(rawBidPercentage);\r\n\r\n const bidAdjustmentOptions = getBidAdjustmentOptions();\r\n const bidAdjOption = _.find(\r\n bidAdjustmentOptions.availableOptions,\r\n option => option.text === bidAdjOptionText\r\n );\r\n\r\n const bidAdjOptionKey = _.result(bidAdjOption, 'key');\r\n\r\n return bidAdjOptionKey === 'dec' ? -percentage : percentage;\r\n};\r\n\r\n/**\r\n * Function to validate bid adjustment\r\n * @param {string} val Bid percentage input\r\n * @param {string} criterionType - type of the criterion\r\n * @param {boolean} isAudienceCampaign - is audience campaign or not\r\n *\r\n * @returns {bool} is valid\r\n */\r\nconst isBidAdjustmentValid = (val, criterionType) => {\r\n const { max, min } = bidAjdLimits.getMaxMinByType(criterionType);\r\n\r\n return (val < 0 && val >= min) ||\r\n (val >= 0 && val <= max);\r\n};\r\n\r\n/**\r\n * Function to get bid adjustment validation error\r\n * @param {string} v Bid percentage input\r\n * @param {string} criterionType - type of the criterion\r\n * @param {boolean} isEnableCustomMessage - is custom message enabled or not\r\n *\r\n * @returns {string} validation error\r\n */\r\nconst getValidationError = (v, criterionType, isEnableCustomMessage) => {\r\n const val = Number(v);\r\n const i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n const { max, min } = bidAjdLimits.getMaxMinByType(criterionType);\r\n let validationError = '';\r\n\r\n if (_.isNaN(val)) {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Invalid');\r\n } else if (val < 0) {\r\n if (val === -100 && isEnableCustomMessage && criterionType === 'Age') {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Validation_Decrease_100_Setting', { min: 0, max: Math.abs(min) });\r\n } else {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Validation', { min: 0, max: Math.abs(min) });\r\n }\r\n } else {\r\n validationError = i18n.getString('Audience_Campaign_Settings_Bid_Validation', { min: 0, max });\r\n }\r\n\r\n return validationError;\r\n};\r\n\r\nexport {\r\n getBidAdjustmentOptions,\r\n computeBidAdjustment,\r\n isBidAdjustmentValid,\r\n isCashbackPercentValid,\r\n getValidationError,\r\n getCashbackPercentValidationError,\r\n getRealCashbackPercentValue,\r\n getCashbackInheritOptions,\r\n getParentLevelCashbackPercent,\r\n};\r\n","import { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport $ from 'jquery';\r\nimport { CashbackPercentControlView } from '@bingads-webui-campaign/cashback-percent-control-view';\r\nimport _ from 'underscore';\r\nimport {\r\n ageSettingOptions,\r\n genderSettingOptions,\r\n deviceSettingOptions,\r\n companyTargetItemTemplate\r\n} from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { getBidAdjustmentOptions } from './bid-adjustment-utils';\r\nimport targetExcludeTemplate from './target-exclude.pug';\r\nimport bidAdjustmentTemplate from './bid-adjustment.pug';\r\n\r\nexport class GridConfigGenerator {\r\n constructor(options = {}) {\r\n this.data = options.data;\r\n this.criterionType = options.criterionType;\r\n this.readonly = options.readonly;\r\n this.showExclusion = options.showExclusion;\r\n this.activityLogger = options.activityLogger;\r\n this.bingadsGridColumn = DependencyResolver.get('component/bingads-grid/shared/column');\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.decimal = DependencyResolver.get('component/humanize/decimal');\r\n\r\n const permissionConfig = DependencyResolver.get('component/config/index');\r\n const permissions = permissionConfig.get('Permissions');\r\n\r\n this.supportCashbackSettings = options.supportCashbackSettings &&\r\n !permissions.IsPersonalizedOffersV3Enabled;\r\n this.viewContext = options.viewContext;\r\n this.onCashbackPercentChange = options.onCashbackPercentChange || _.noop;\r\n this.$gridRoot = options.$gridRoot;\r\n this.isMSANBoostEnabled = permissions.IsAmplifyEnabled;\r\n this.isHideBidAdjustmentForBoostEnabled = permissions.dynamic && permissions.dynamic.HideBidAdjustmentForBoost;\r\n }\r\n\r\n get advancedTargetExcludedColumn() {\r\n return this.bingadsGridColumn({\r\n name: 'TargetExclude',\r\n property: item => item,\r\n title: this.showExclusion ? this.i18n.getString('Audience_Campaign_Target_Setting_Company_Grid_Column_Target') : '',\r\n template: (locals) => {\r\n const criterion = locals.value;\r\n const isExcluded = this.isCriterionExcluded(criterion);\r\n\r\n return targetExcludeTemplate({\r\n isIncluded: !isExcluded,\r\n isExcluded,\r\n i18n: this.i18n,\r\n });\r\n },\r\n });\r\n }\r\n\r\n get audienceTargetColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: 'Audience_Campaign_Target_Setting_Audience_Title',\r\n template: locals => locals.value.AudienceName,\r\n });\r\n }\r\n\r\n get cashbackPercentColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'CashbackPercent',\r\n property: item => item,\r\n title: 'Campaign_Maximum_Cashback_Offer',\r\n bodyClasses: ['cashback-percent-cell-wrap'],\r\n template: (locals) => {\r\n const criterion = locals.value;\r\n\r\n if (this.isCriterionExcluded(locals.value)) {\r\n return '-';\r\n }\r\n\r\n const { CashbackPercent } = criterion.Criterion;\r\n\r\n const cashbackPercentControlView = new CashbackPercentControlView({\r\n viewContext: this.viewContext,\r\n i18n: this.i18n,\r\n decimal: this.decimal,\r\n CashbackPercent,\r\n isParentLevel: this.readonly,\r\n });\r\n\r\n setTimeout(() => {\r\n // eslint-disable-next-line no-underscore-dangle\r\n const key = locals.value.Id;\r\n const row = this.$gridRoot.find(`tr[data-key='${key}']`);\r\n const root = $(row).find('.cashback-percent-cell-wrap');\r\n root.empty().append(cashbackPercentControlView.render().$el);\r\n cashbackPercentControlView.on('change', (validated, val) => {\r\n this.onCashbackPercentChange(validated, val, row);\r\n });\r\n });\r\n\r\n return '';\r\n },\r\n });\r\n }\r\n\r\n get advancedBidAdjustmentColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'BidAdjustment',\r\n property: item => item,\r\n title: 'Audience_Campaign_Settings_BidAdjustment',\r\n template: (locals) => {\r\n const criterion = locals.value;\r\n\r\n if (this.isCriterionExcluded(locals.value)) {\r\n return '-';\r\n }\r\n\r\n const bidAdjustmentOptions = getBidAdjustmentOptions();\r\n\r\n let bidValue = 0;\r\n\r\n // For Audience Criterions\r\n if (criterion.Criterion.BidMultiplier != null) {\r\n bidValue = criterion.Criterion.BidMultiplier;\r\n }\r\n\r\n // For ones that are generated\r\n if (criterion.Criterion.BidAdjustment != null) {\r\n bidValue = criterion.Criterion.BidAdjustment;\r\n }\r\n\r\n bidAdjustmentOptions.percentage = Math.abs(bidValue);\r\n\r\n // negtive or -0\r\n if ((bidValue < 0) || (1 / bidValue === -Infinity)) {\r\n bidAdjustmentOptions.selectedOption = 'dec';\r\n }\r\n\r\n return bidAdjustmentTemplate({\r\n size: 5, // input control size\r\n percentage: bidAdjustmentOptions.percentage,\r\n availableOptions: bidAdjustmentOptions.availableOptions,\r\n selectedOption: bidAdjustmentOptions.selectedOption,\r\n readonly: this.readonly,\r\n i18n: this.i18n,\r\n });\r\n },\r\n });\r\n }\r\n\r\n isCriterionExcluded(criterion) {\r\n let isExcluded = false;\r\n\r\n if (criterion.Status && criterion.Status === 'Excluded') {\r\n isExcluded = true;\r\n }\r\n\r\n if (criterion.SelectionStatus && criterion.SelectionStatus === 'Excluded') {\r\n isExcluded = true;\r\n }\r\n\r\n // Linked in target knows the excluded state by the type.\r\n if (criterion.CriterionType && criterion.CriterionType.indexOf('Negative') >= 0) {\r\n isExcluded = true;\r\n }\r\n\r\n return isExcluded;\r\n }\r\n\r\n getTargetColumnByCriterionType() {\r\n switch (this.criterionType) {\r\n case 'Audience':\r\n return this.audienceTargetColumn;\r\n case 'Age':\r\n case 'Gender':\r\n case 'Device':\r\n return this.getAdvancedTargetColumn(this.criterionType);\r\n case 'Location':\r\n case 'NegativeLocation':\r\n case 'Radius':\r\n return this.locationTargetColumn;\r\n case 'CompanyName':\r\n case 'NegativeCompanyName':\r\n return this.companyTargetColumn;\r\n case 'JobFunction':\r\n case 'NegativeJobFunction':\r\n return this.jobFunctionTargetColumn;\r\n case 'Industry':\r\n case 'NegativeIndustry':\r\n return this.industryTargetColumn;\r\n default:\r\n throw new Error('unsupported criterion type');\r\n }\r\n }\r\n\r\n getColumns() {\r\n return _.compact([\r\n this.advancedTargetExcludedColumn,\r\n this.getTargetColumnByCriterionType(),\r\n !(this.isMSANBoostEnabled && this.isHideBidAdjustmentForBoostEnabled) && this.advancedBidAdjustmentColumn,\r\n this.supportCashbackSettings && this.cashbackPercentColumn,\r\n ]);\r\n }\r\n\r\n getAdvancedTargetColumn(criterionType) {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: `Audience_Campaign_Target_Setting_${criterionType}_Title`,\r\n template: (locals) => {\r\n if (criterionType === 'Age') {\r\n // When retrieved from MT, AgeRange field is there and we respect that first.\r\n const ageTarget =\r\n locals.value.AgeRange ? locals.value.AgeRange : locals.value.AgeCriterion.Target;\r\n const ageTargetLabel = ageSettingOptions.selections[ageTarget].labelKey;\r\n\r\n return `${this.i18n.getString(ageTargetLabel)}`;\r\n } else if (criterionType === 'Gender') {\r\n // When retrieved from MT, GenderType field is there and we respect that first.\r\n const genderTarget =\r\n locals.value.GenderType ? locals.value.GenderType : locals.value.GenderCriterion.Target;\r\n const genderTargetLabel = genderSettingOptions.selections[genderTarget].labelKey;\r\n\r\n return `${this.i18n.getString(genderTargetLabel)}`;\r\n } else if (criterionType === 'Device') {\r\n // When retrieved from MT, DeviceType field is there and we respect that first.\r\n const deviceTarget =\r\n locals.value.DeviceName ?\r\n locals.value.DeviceName : locals.value.DeviceCriterion.DeviceName;\r\n const deviceTargetLabel = deviceSettingOptions.selections[deviceTarget].labelKey;\r\n\r\n return `${this.i18n.getString(deviceTargetLabel)}`;\r\n }\r\n\r\n return '';\r\n },\r\n });\r\n }\r\n\r\n get locationTargetColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: 'Audience_Campaign_Target_Setting_Location_Title',\r\n template: (locals) => {\r\n let locationTarget;\r\n if (locals.value.RadiusCriterion) {\r\n locationTarget = locals.value.RadiusCriterion.Name;\r\n } else if (locals.value.LocationCriterion) {\r\n locationTarget = locals.value.LocationCriterion.Name;\r\n } else if (locals.value.Name) {\r\n locationTarget = locals.value.Name;\r\n } else {\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`Criterion value: ${JSON.stringify(locals.value)}`, 'bid adjustment locationTargetColumn');\r\n }\r\n return null;\r\n }\r\n\r\n return locationTarget;\r\n },\r\n });\r\n }\r\n\r\n get companyTargetColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: 'Audience_Campaign_Target_Setting_Company_Grid_Column_Companies',\r\n template: (locals) => {\r\n const criterion = locals.value.CompanyNameCriterion;\r\n const item = {\r\n name: criterion.Name,\r\n logoUrl: criterion.LogoUrl,\r\n industry: criterion.Industry,\r\n size: criterion.Size,\r\n };\r\n return companyTargetItemTemplate({ item, i18n: this.i18n });\r\n },\r\n });\r\n }\r\n\r\n get jobFunctionTargetColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: 'Audience_Campaign_Target_Setting_Job_Function_Grid_Column_Job_Functions',\r\n template: (locals) => {\r\n const criterion = locals.value.JobFunctionCriterion;\r\n\r\n return criterion.Name;\r\n },\r\n });\r\n }\r\n\r\n get industryTargetColumn() {\r\n return this.bingadsGridColumn({\r\n i18n: this.i18n,\r\n name: 'Target',\r\n property: 'Criterion',\r\n title: 'Audience_Campaign_Target_Setting_Industry_Grid_Column_Industries',\r\n template: (locals) => {\r\n const criterion = locals.value.IndustryCriterion;\r\n\r\n return criterion.Name;\r\n },\r\n });\r\n }\r\n\r\n getConfig() {\r\n return {\r\n tableClasses: ['table', 'table--no-border', 'grid'],\r\n dataSource: {\r\n type: 'memory',\r\n data: this.data,\r\n primaryKey: 'Id',\r\n },\r\n columns: this.getColumns(),\r\n };\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport pgrid from 'projection-grid';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { cloneDeep, get } from '@bingads-webui-universal/primitive-utilities';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { ageOptions, genderOptions, deviceOptions } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { GridConfigGenerator } from './grid-config-generator';\r\nimport {\r\n computeBidAdjustment,\r\n isBidAdjustmentValid,\r\n getValidationError,\r\n getRealCashbackPercentValue,\r\n} from './bid-adjustment-utils';\r\nimport template from './bid-adjustment-template.pug';\r\n\r\nconst criterionsWithPagination = [\r\n 'Location',\r\n 'NegativeLocation',\r\n 'Radius',\r\n 'CompanyName',\r\n 'Industry',\r\n 'JobFunction',\r\n 'Audience',\r\n];\r\n\r\nlet permissions = {};\r\n\r\nexport class BidAdjustment extends Backbone.View {\r\n initialize(options = {}) {\r\n this.decimal = DependencyResolver.get('component/humanize/decimal');\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.targetConstants = DependencyResolver.get('campaignui/feature/base-targets/viewmodel/targetConstants');\r\n this.BaseTargetUpdateView = DependencyResolver.get('campaignui/feature/base-targets/view/baseUpdate');\r\n this.targetTypes = DependencyResolver.get('campaignui/feature/base-targets/viewmodel/targetTypes');\r\n this.currentLevelTargetInfo = options.currentLevelTargetInfo;\r\n this.parentLevelTargetInfo = options.parentLevelTargetInfo || {};\r\n this.viewContext = options.viewContext || {};\r\n this.isAudienceCampaign = _.has(options, 'isAudienceCampaign') ? options.isAudienceCampaign : true;\r\n this.readonly = !!options.readonly;\r\n this.showExclusion = _.has(options, 'showExclusion') ? options.showExclusion : true;\r\n this.activityLogger = options.activityLogger;\r\n this.campaignId = options.campaignId || '';\r\n this.adgroupId = options.adgroupId || '';\r\n this.level = options.level || '';\r\n this.scenario = options.scenario || '';\r\n this.supportCashbackSettings = options.supportCashbackSettings;\r\n this.isSearchDSAShoppingAdgroupLevel = options.isSearchDSAShoppingAdgroupLevel;\r\n // Set inital state to valid\r\n this.isValid = true;\r\n this.isBidAdjustmentValid = true;\r\n this.onChange = options.onChange;\r\n\r\n const permissionConfig = DependencyResolver.get('component/config/index');\r\n permissions = permissionConfig.get('Permissions');\r\n\r\n this.initializeWithTypes(options.criterionTypes);\r\n }\r\n\r\n initializeWithTypes(criterionTypes) {\r\n this.criterionTypes = criterionTypes;\r\n this.criterionType = _.first(criterionTypes);\r\n\r\n _.each(criterionTypes, (criterionType) => {\r\n this.listenTo(\r\n this.currentLevelTargetInfo,\r\n `${this.currentLevelTargetInfo.resourceName}${criterionType}Changed`,\r\n () => this.onCriterionChanged()\r\n );\r\n });\r\n\r\n this.shouldShowPagination = false;\r\n\r\n if (_.intersection(criterionTypes, criterionsWithPagination).length > 0) {\r\n this.shouldShowPagination = true;\r\n }\r\n }\r\n\r\n /**\r\n * Get current state of control\r\n *\r\n * @returns {Object} State current state\r\n */\r\n getState() {\r\n return {\r\n isValid: this.isBidAdjustmentValid &&\r\n (this.isCashbackPercentValid || !this.supportCashbackSettings),\r\n };\r\n }\r\n\r\n onCriterionChanged() {\r\n const currentCriterions = this.fetchCriterions();\r\n\r\n if (this.grid && this.grid.gridView) {\r\n this.grid.gridView.patch({\r\n dataSource: {\r\n data: currentCriterions,\r\n },\r\n });\r\n }\r\n }\r\n\r\n fetchSingleCriterionType(criterionType, targetInfo) {\r\n let criterions = cloneDeep(targetInfo.getAllByType(criterionType));\r\n\r\n const typeToOptions = {\r\n Age: ageOptions,\r\n Gender: genderOptions,\r\n Device: deviceOptions,\r\n };\r\n\r\n const typeToPath = {\r\n Age: 'Criterion.AgeCriterion.Target',\r\n Gender: 'Criterion.GenderCriterion.Target',\r\n Device: 'Criterion.DeviceCriterion.DeviceName',\r\n };\r\n\r\n if (!this.isAudienceCampaign && _.contains(_.keys(typeToOptions), criterionType)) {\r\n const orderedNames = _.keys(typeToOptions[criterionType]);\r\n\r\n let orderedCriterions = [];\r\n _.each(orderedNames, (name) => {\r\n orderedCriterions = orderedCriterions.concat(_.filter(criterions, criterion =>\r\n get(criterion, typeToPath[criterionType]) === name));\r\n });\r\n\r\n criterions = _.compact(orderedCriterions);\r\n }\r\n\r\n return criterions;\r\n }\r\n\r\n fetchCriterions(isCurrent = true) {\r\n if (this.criterionTypes) {\r\n let currentCriterions = [];\r\n\r\n _.each(this.criterionTypes, (criterionType) => {\r\n const criterions = this.fetchSingleCriterionType(\r\n criterionType,\r\n isCurrent ? this.currentLevelTargetInfo : this.parentLevelTargetInfo\r\n );\r\n currentCriterions = currentCriterions.concat(criterions);\r\n });\r\n\r\n return currentCriterions;\r\n }\r\n\r\n return [];\r\n }\r\n\r\n /**\r\n * Event handler for bid adjustment change\r\n * @private\r\n * @param {Object} e change event\r\n *\r\n * @returns {Promise} - Promise of handling bid adjustment change\r\n */\r\n handleBidAdjustmentChange(e) {\r\n const bidAdjustmentControl = this.grid.gridView.$(e.target).parent();\r\n\r\n const bidAdjPercentage = bidAdjustmentControl.children('input').val();\r\n const bidAdjOption = bidAdjustmentControl.children('select').val();\r\n\r\n bidAdjustmentControl.children('.error').empty();\r\n bidAdjustmentControl.children('.error').removeAttr('role');\r\n bidAdjustmentControl.children('.error').attr('aria-hidden', 'true');\r\n this.isBidAdjustmentValid = true;\r\n\r\n // Validate bid adjustment\r\n const bidAdj = computeBidAdjustment(bidAdjPercentage, bidAdjOption);\r\n if (!isBidAdjustmentValid(bidAdj, this.criterionType)) {\r\n bidAdjustmentControl.children('.error').attr('role', 'alert');\r\n bidAdjustmentControl.children('.error').removeAttr('aria-hidden');\r\n bidAdjustmentControl.children('.error').text(getValidationError(bidAdj, this.criterionType, (this.isSearchDSAShoppingAdgroupLevel || (this.isAudienceCampaign && this.level === 'adgroup'))));\r\n this.isBidAdjustmentValid = false;\r\n\r\n if (this.onChange) {\r\n this.onChange(this.isBidAdjustmentValid);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n // Update grid item data with the BidAdjustment value\r\n const rowData = this.grid.gridView.itemOfElement(e.target);\r\n if (!rowData) {\r\n return Promise.resolve(false);\r\n }\r\n if (rowData.Criterion.Type === 'Audience') {\r\n rowData.Criterion.BidMultiplier = bidAdj;\r\n } else {\r\n rowData.Criterion.BidAdjustment = bidAdj;\r\n }\r\n\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`bid adjustment change: ${this.criterionType}`, 'bid adjustment');\r\n }\r\n\r\n return this.currentLevelTargetInfo.updateAsync(rowData);\r\n }\r\n\r\n /**\r\n * Currently the implemenation of bid adj. column is really ridiculous\r\n * if the input number is validated, the control will be completely unmounted\r\n * then re-created again which is caused by calling\r\n * this.currentLevelTargetInfo.updateAsync(rowData).\r\n * To avoid this behavior for cashback percent column, I have to implement\r\n * a different validation by checking the error spans and try not to trigger\r\n * update event.\r\n */\r\n get isCashbackPercentValid() {\r\n const $cashbackPercentErrors = this.$el.find('.bid-adjustment-grid td[data-Column=CashbackPercent] .error');\r\n return _.every($cashbackPercentErrors, (__, i) => {\r\n const $err = $cashbackPercentErrors.eq(i);\r\n return $err.text() === '';\r\n });\r\n }\r\n\r\n handleCashbackPercentChange(validated, cashbackPercent, row) {\r\n const rowData = this.grid.gridView.itemOfElement(row);\r\n if (validated) {\r\n if (!rowData) {\r\n return;\r\n }\r\n rowData.Criterion.CashbackPercent =\r\n getRealCashbackPercentValue(cashbackPercent, this.decimal);\r\n\r\n if (this.activityLogger) {\r\n this.activityLogger.signal(`cashback percent change: ${this.criterionType}`, 'cashback percent');\r\n }\r\n\r\n this.currentLevelTargetInfo.updateAsync(rowData, true);\r\n }\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template(this));\r\n\r\n this.initializeAndRenderGrid();\r\n\r\n return this;\r\n }\r\n\r\n getDeviceTypeOptions(campaignBids = {}, adgroupBids = {}) {\r\n const deviceKeys = this.targetConstants.rowKeys.Device.concat(['Computers']);\r\n\r\n if (permissions.IsOriginalDeviceTargetingEnabled) {\r\n _.each(deviceKeys, (device) => {\r\n _.each(this.targetConstants.osNames[device], (os) => {\r\n deviceKeys.push(`${device}${os}`);\r\n });\r\n });\r\n }\r\n\r\n const deviceTypeOptions = {};\r\n\r\n _.each(deviceKeys, (device) => {\r\n deviceTypeOptions[`DeviceType${device}CampaignBidAdjustment`] = campaignBids[`Device${device}Bid`] || 0;\r\n deviceTypeOptions[`DeviceType${device}CampaignBidId`] = campaignBids[`Device${device}BidId`] || '';\r\n deviceTypeOptions[`DeviceType${device}AdgroupBidAdjustment`] = adgroupBids[`Device${device}Bid`] || 0;\r\n deviceTypeOptions[`DeviceType${device}AdgroupBidId`] = adgroupBids[`Device${device}BidId`] || '';\r\n });\r\n return deviceTypeOptions;\r\n }\r\n\r\n extractBids(targets) {\r\n const bids = {};\r\n\r\n _.each(targets, (target) => {\r\n let prefix = `${target.Criterion.Type}${target.Criterion.DeviceCriterion[this.targetConstants.targetTypeToFilterProperty[target.Criterion.Type]]}`;\r\n\r\n if (target.Criterion.Type === 'Device' && target.Criterion.OSName) {\r\n prefix += target.Criterion.OSName;\r\n }\r\n const name = `${prefix}Bid`;\r\n const id = `${name}Id`;\r\n\r\n bids[name] = target.Criterion.BidAdjustment ? target.Criterion.BidAdjustment : 0;\r\n bids[id] = target.Id || '';\r\n });\r\n return bids;\r\n }\r\n\r\n /**\r\n * Initializes and renders the grid\r\n * @private\r\n *\r\n * @returns {undefined}\r\n */\r\n initializeAndRenderGrid() {\r\n const currentCriterions = this.fetchCriterions();\r\n\r\n // When opening both device os targeting\r\n // and linkedInTargeting pilots, there should be\r\n // both features showing up.\r\n if (this.criterionType === 'Device' &&\r\n permissions.IsOriginalDeviceTargetingEnabled\r\n ) {\r\n let campaignBids = {};\r\n let adgroupBids = {};\r\n let isParentView = false;\r\n if (this.level === 'campaign' || this.scenario === 'adgroup-create') {\r\n campaignBids = this.extractBids(currentCriterions);\r\n } else if (this.level === 'adgroup') {\r\n if (Object.keys(this.parentLevelTargetInfo).length !== 0) {\r\n const parentCriterions = this.fetchCriterions(false);\r\n campaignBids = this.extractBids(parentCriterions);\r\n } else {\r\n isParentView = true;\r\n }\r\n adgroupBids = this.extractBids(currentCriterions);\r\n }\r\n const deviceTypeOptions = this.getDeviceTypeOptions(campaignBids, adgroupBids);\r\n this.deviceTargetsUpdateView = new this.BaseTargetUpdateView(_.extend({\r\n targetType: this.targetTypes.OriginalDevice,\r\n campaignId: this.campaignId,\r\n adgroupId: this.adgroupId,\r\n level: this.level,\r\n scenario: this.scenario,\r\n activityLogger: this.activityLogger,\r\n showLevelToggle: false,\r\n isParentView,\r\n onChange: this.onChange,\r\n }, deviceTypeOptions));\r\n this.$('.bid-adjustment-grid').append(this.deviceTargetsUpdateView.render().el);\r\n } else {\r\n const configGenerator = new GridConfigGenerator({\r\n data: currentCriterions,\r\n criterionType: this.criterionType,\r\n readonly: this.readonly,\r\n showExclusion: this.showExclusion,\r\n activityLogger: this.activityLogger,\r\n supportCashbackSettings: this.supportCashbackSettings,\r\n viewContext: this.viewContext,\r\n onCashbackPercentChange: this.handleCashbackPercentChange.bind(this),\r\n $gridRoot: this.$('.bid-adjustment-grid'),\r\n });\r\n const config = configGenerator.getConfig();\r\n\r\n const gridFactory = pgrid.factory({ vnext: true });\r\n\r\n if (this.shouldShowPagination) {\r\n gridFactory\r\n .use(paginationPlugin)\r\n .use(a11yPlugin);\r\n _.extend(config, {\r\n plugins: {\r\n a11y: { i18n: this.i18n },\r\n pagination: {\r\n pageSizeText: this.i18n.getString('Grid_ShowRows'),\r\n pageNumberLabelText: this.i18n.getString('GridPage_Colon'),\r\n totalPageCountText: this.i18n.getString('Grid_PageOf'),\r\n },\r\n },\r\n });\r\n }\r\n\r\n this.grid = gridFactory\r\n .create(_.extend({}, config, {\r\n events: {\r\n load: (e) => {\r\n this.handleBidAdjustmentChange(e);\r\n this.handleCashbackPercentChange(e);\r\n },\r\n 'change .bid-adjustment-input': e => this.handleBidAdjustmentChange(e),\r\n 'change select.bid-adjustment-select': e => this.handleBidAdjustmentChange(e),\r\n // 'input .cashback-percent-input': e => this.handleCashbackPercentChange(e),\r\n // 'change select.cashback-option-select': e => this.handleCashbackOptionChange(e),\r\n },\r\n }));\r\n\r\n this.$('.bid-adjustment-grid').append(this.grid.gridView.render().el);\r\n }\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { DependencyResolver } from '@bingads-webui-campaign/dependency-resolver';\r\nimport { getBidAdjustmentOptions, computeBidAdjustment, isBidAdjustmentValid, getValidationError } from './bid-adjustment-utils';\r\nimport template from './bid-adjustment.pug';\r\n\r\nexport class BidAdjustmentControlView extends Backbone.View {\r\n initialize(options = {}) {\r\n this.i18n = DependencyResolver.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\n this.criterionType = options.criterionType;\r\n this.bidAdjustmentOptions = _.defaults(\r\n options.bidAdjustmentOptions || {},\r\n getBidAdjustmentOptions()\r\n );\r\n\r\n // Set inital state to valid\r\n this.isValid = true;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'change input': e => this.handleBidAdjustmentChange(e),\r\n 'change select': e => this.handleBidAdjustmentChange(e),\r\n };\r\n }\r\n\r\n /**\r\n * Event handler for bid adjustment change\r\n * @private\r\n *\r\n * @returns {Promise} - Promise of handling bid adjustment change\r\n */\r\n handleBidAdjustmentChange() {\r\n this.$('.error').empty();\r\n\r\n this.isValid = true;\r\n\r\n // Validate bid adjustment\r\n const bidAdjValue = this.getBidAdjustmentValue();\r\n\r\n if (!isBidAdjustmentValid(bidAdjValue, this.criterionType)) {\r\n this.$('.error').text(getValidationError(bidAdjValue, this.criterionType));\r\n this.isValid = false;\r\n }\r\n }\r\n\r\n /**\r\n * Check if the control is in a valid state\r\n *\r\n * @returns {boolean} current state\r\n */\r\n validate() {\r\n return this.isValid;\r\n }\r\n\r\n getBidAdjustmentValue() {\r\n const bidAdjPercentage = this.$('input').val();\r\n const bidAdjOption = this.$('select').val();\r\n\r\n const bidAdjValue = computeBidAdjustment(bidAdjPercentage, bidAdjOption);\r\n\r\n return bidAdjValue;\r\n }\r\n\r\n /**\r\n * Renders the view\r\n *\r\n * @returns {View} returns the view itself\r\n */\r\n render() {\r\n this.$el.html(template(_.extend(this.bidAdjustmentOptions, { size: 5, i18n: this.i18n })));\r\n\r\n return this;\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 (i18n, isNewUI, isSettings) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"audience-advanced-settings form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label crud-adgroup-schedule-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_AdSchedule')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-4 form-control-static\\\"\\u003E\\u003Cdiv class=\\\"ad-schedule\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"form-group\",\"exclusions-section\",isSettings === false ? 'hide' : ''], [false,false,true]), false, true)) + \"\\u003E\";\nif (isNewUI) {\npug_html = pug_html + \"\\u003Ca class=\\\"camp-adg-shared-exclusions-dropdown\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#setExclusions\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isExclusionsExpanded() ? "true" : "false"}\\\" role=\\\"button\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign expanderImage\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdvancedSetting_ExclusionText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_Settings_Exclusions', i18n.getString('AdvancedSetting_ExclusionText'), i18n.getString('LearnMoreLinkText'));\npug_html = pug_html + \"\\u003Cdiv class=\\\"collapse\\\" id=\\\"setExclusions\\\" data-section=\\\"ExclusionsSection\\\"\\u003E\\u003Cdiv class=\\\"col-sm-10\\\"\\u003E\\u003Cdiv class=\\\"camp-adg-shared-text-under-dropdown\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdvancedSetting_WebSiteExclusionDesc')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"site-exclusions\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = 'Exclusions') ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-10\\\"\\u003E\\u003Cdiv class=\\\"site-exclusions\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"form-group\",\"url-options\",isSettings === false ? 'hide' : ''], [false,false,true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"form-group\",\"ad-rotation-section\",isSettings === false ? 'hide' : ''], [false,false,true]), false, true)) + \"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdvancedSetting_AdRotationText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"ad-rotation\\\"\\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,\"isNewUI\" in locals_for_with?locals_for_with.isNewUI:typeof isNewUI!==\"undefined\"?isNewUI:undefined,\"isSettings\" in locals_for_with?locals_for_with.isSettings:typeof isSettings!==\"undefined\"?isSettings: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 (_TL_, i18n, isFeedBasedAudienceCampaign, optTgt) {\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"crud-audience-target-selector form-horizontal layout-collapse\\\"\\u003E\";\nif (!isFeedBasedAudienceCampaign) {\npug_html = pug_html + \"\\u003Ch3\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString(_TL_('Predictive targeting'))) ? \"\" : pug_interp)) + \"\\u003C\\u002Fh3\\u003E\";\n}\npug_html = pug_html + \"\\u003Cp class=\\\"optimized-targeting-description\\\"\\u003E\\u003C\\u002Fp\\u003E\\u003Cdiv class=\\\"optimized-selector-container optimized-selector-container\\\"\\u003E\";\nvar itemClass = 'optTgt-collapse-header';\nvar itemClassSelect = 'optTgt-setting-container';\nvar collapseId= 'optTgt-collapse';\nvar summaryId = 'optTgt-summary';\nvar shouldExpand = isFeedBasedAudienceCampaign ? 'true':'false';\nvar shouldCollapseClassName = isFeedBasedAudienceCampaign ? 'collapse in collapse-container':'collapse collapse-container';\n{\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([itemClass], [true]), false, true)) + \"\\u003E\\u003Cbutton\" + (\" class=\\\"btn btn-primary expand-btn\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"id\", optTgt, true, true)+\" role=\\\"button\\\" data-toggle=\\\"collapse\\\"\"+pug.attr(\"data-target\", '#'+collapseId, true, true)+pug.attr(\"aria-expanded\", shouldExpand, true, true)+pug.attr(\"aria-controls\", collapseId, true, true)) + \"\\u003E\\u003Cdiv class=\\\"target-header selection-item-button\\\"\\u003E\\u003Cp class=\\\"target-selection-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('OptimizedTargeting_Expand_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([shouldCollapseClassName], [true]), false, true)+pug.attr(\"id\", collapseId, true, true)) + \"\\u003E\\u003Cdiv\" + (\" class=\\\"item-container\\\"\"+pug.attr(\"id\", itemClassSelect, true, true)) + \"\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([itemClassSelect], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"_TL_\" in locals_for_with?locals_for_with._TL_:typeof _TL_!==\"undefined\"?_TL_:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isFeedBasedAudienceCampaign\" in locals_for_with?locals_for_with.isFeedBasedAudienceCampaign:typeof isFeedBasedAudienceCampaign!==\"undefined\"?isFeedBasedAudienceCampaign:undefined,\"optTgt\" in locals_for_with?locals_for_with.optTgt:typeof optTgt!==\"undefined\"?optTgt: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, supportCashbackSettings) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"adgroup-creation-step1-container\\\"\\u003E\\u003Cdiv class=\\\"form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel class=\\\"adgroup-name-label\\\" id=\\\"adgroupNameLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_AdGroup_Label_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudTargets_AdGroupName', i18n.getString('Audience_Campaign_AdGroup_Label_Name'), i18n.getString('LearnMoreLinkText'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"name-input-control-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"copy-adgroup-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bidding-strategy-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: !isAutoBidding\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel class=\\\"default-bid-label\\\" id=\\\"defaultBidLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_SetBid')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"default-bid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"frequency-capping-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (supportCashbackSettings) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"cashback-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"audience-advanced-settings-section\\\"\\u003E\\u003Ca class=\\\"audience-advanced-settings-header col-sm-12\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isAdvancedAdgroupExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign expanderImage\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_AdGroup_AdvancedSettings')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"collapse\\\" id=\\\"advancedSettings\\\"\\u003E\\u003Cdiv class=\\\"audience-advanced-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"boost-placement-target\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"contextual-target-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"errors-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"supportCashbackSettings\" in locals_for_with?locals_for_with.supportCashbackSettings:typeof supportCashbackSettings!==\"undefined\"?supportCashbackSettings: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 (Enable1PPlacementTargeting, _TL_, i18n, isAudienceFeedBasedCampaign, isNativeAds, isShowDisclaimerBannerEnabled, optTgtTgBtn) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"crud-audience-adgroup form-horizontal adgroup-settings__container\\\"\\u003E\\u003Cdiv class=\\\"adgroup-name-input-container\\\"\\u003E\\u003Clabel class=\\\"adgroup-name-label\\\" id=\\\"adgroupNameLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_AdGroup_Label_Name')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudTargets_AdGroupName', i18n.getString('Audience_Campaign_AdGroup_Label_Name'), i18n.getString('LearnMoreLinkText'));\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"name-input-control-container col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"copy-adgroup-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"opttgt-setting\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-target-selector-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"boost-placement-target\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"contextual-target-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"target-setting-and-estimate-container\\\"\\u003E\\u003Cdiv class=\\\"audience-target-settings-container col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"location-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"age-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"gender-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"device-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"companyName-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"industry-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"jobFunction-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (Enable1PPlacementTargeting && isNativeAds) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"placement-setting-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nvar itemClassSelect = 'optTgt-setting-container';\nvar collapseId= 'optTgt-collapse';\nif (!isAudienceFeedBasedCampaign) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"optimized-toggle-container\\\"\\u003E\\u003Cbutton\" + (\" class=\\\"btn btn-primary expand-btn\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"id\", optTgtTgBtn, true, true)+\" role=\\\"button\\\" data-toggle=\\\"collapse\\\"\"+pug.attr(\"data-target\", '#'+collapseId+'-toggle', true, true)+\" aria-expanded=\\\"true\\\"\"+pug.attr(\"aria-controls\", collapseId+'-toggle', true, true)) + \"\\u003E\\u003Cdiv class=\\\"target-header selection-item-button\\\"\\u003E\\u003Cp class=\\\"target-selection-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('OptimizedTargeting_Expand_AdvancedTitle')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_PredictiveTargeting_OptimizedDisabled', i18n.getString(_TL_('Predictive targeting')), i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cdiv\" + (\" class=\\\"collapse in collapse-container\\\"\"+pug.attr(\"id\", collapseId+'-toggle', true, true)+\" aria-expanded=\\\"true\\\"\") + \"\\u003E\\u003Cdiv\" + (\" class=\\\"item-container\\\"\"+pug.attr(\"id\", itemClassSelect+'-toggle', true, true)) + \"\\u003E\\u003Cdiv class=\\\"optimized-toggle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-reach-estimate-container col-sm-3 col-sm-offset-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"errors-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isShowDisclaimerBannerEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info\\\" style=\\\"margin-left: 32px\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Targeting_Disclaimer')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"Enable1PPlacementTargeting\" in locals_for_with?locals_for_with.Enable1PPlacementTargeting:typeof Enable1PPlacementTargeting!==\"undefined\"?Enable1PPlacementTargeting:undefined,\"_TL_\" in locals_for_with?locals_for_with._TL_:typeof _TL_!==\"undefined\"?_TL_:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isAudienceFeedBasedCampaign\" in locals_for_with?locals_for_with.isAudienceFeedBasedCampaign:typeof isAudienceFeedBasedCampaign!==\"undefined\"?isAudienceFeedBasedCampaign:undefined,\"isNativeAds\" in locals_for_with?locals_for_with.isNativeAds:typeof isNativeAds!==\"undefined\"?isNativeAds:undefined,\"isShowDisclaimerBannerEnabled\" in locals_for_with?locals_for_with.isShowDisclaimerBannerEnabled:typeof isShowDisclaimerBannerEnabled!==\"undefined\"?isShowDisclaimerBannerEnabled:undefined,\"optTgtTgBtn\" in locals_for_with?locals_for_with.optTgtTgBtn:typeof optTgtTgBtn!==\"undefined\"?optTgtTgBtn: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 (IsAIMBidSuggestionEnabled, i18n, isShowDisclaimerBannerEnabled) {pug_html = pug_html + \"\\u003Cdiv class=\\\"crud-audience-budget-bid form-horizontal campaign-settings__container\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Budget_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"budget col-sm-8\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bidding-strategy__container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bid-strategy\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (IsAIMBidSuggestionEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"bid__container\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel id=\\\"defaultBidLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_DefaultBid')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-10 form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Bid_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"default-bid col-sm-2 form-group-subset\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"default-bid-warning col-sm-12\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"frequency-capping-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"kpiestimation-result\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel id=\\\"defaultBidLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_DefaultBid')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"default-bid col-sm-2\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"frequency-capping-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"conversion-goal-section\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Goals_Section_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-10 form-control-static\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Campaign_Goals_Help_Text')) ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003Ca class=\\\"HelpTopic\\\" href=\\\"javascript:void(0);\\\" query=\\\"help:app54814\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('LearnMoreLinkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"conversion-goal-selection\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"bid-adjustments-container\\\"\\u003E\\u003Ca class=\\\"bid-adjustments-section col-sm-12\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isBidAdjustmentsExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign expanderImage\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_BidAdjustment')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"collapse\\\" id=\\\"bidAdjustmentTargets\\\"\\u003E\\u003Cdiv class=\\\"bid-adjustment-targets-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"adschedule-targets-container\\\"\\u003E\\u003Ca class=\\\"adschedule-section col-sm-12\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isAdScheduleExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"bedded-icon-marker spritedimagealign expanderImage\\\"\\u003E\\u003C\\u002Fspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Settings_AdSchedule')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"collapse\\\" id=\\\"adScheduleTargets\\\"\\u003E\\u003Cdiv class=\\\"adschedule-targets\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"errors-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isShowDisclaimerBannerEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-info\\\" style=\\\"margin-left: 32px\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert-info-inline\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Targeting_Disclaimer')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"IsAIMBidSuggestionEnabled\" in locals_for_with?locals_for_with.IsAIMBidSuggestionEnabled:typeof IsAIMBidSuggestionEnabled!==\"undefined\"?IsAIMBidSuggestionEnabled:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isShowDisclaimerBannerEnabled\" in locals_for_with?locals_for_with.isShowDisclaimerBannerEnabled:typeof isShowDisclaimerBannerEnabled!==\"undefined\"?isShowDisclaimerBannerEnabled: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, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\n\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"crud-audience-campaign form-horizontal campaign-settings__container\\\"\\u003E\\u003Cdiv class=\\\"video-alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"adimpression-alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Crud_Campaign_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel class=\\\"campaign-name-label\\\" id=\\\"campaignNameLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_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\"]('pop_BA_CampaignCreate_Settings_CampaignName', i18n.getString('Audience_Campaign_Campaign_Name'), i18n.getString('LearnMoreLinkText'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"name-input-control-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003Cdiv class=\\\"copy-campaign-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"col-sm-2 control-label\\\"\\u003E\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Budget_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_Budget_SharedBudget', i18n.getString('Audience_Campaign_Budget_Label'), i18n.getString('LearnMoreLinkText'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"budget col-sm-8\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"shopping-settings-container\\\" style=\\\"margin-bottom:10px;\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"cashback-settings-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"impression-tracking-url-options-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"errors-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 (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"audience-meter\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_ReachControl_EstimatedImpressions')) ? \"\" : pug_interp)) + \"\\u003Cstrong class=\\\"impr\\\"\\u003E\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"meter-container\\\"\\u003E\\u003Cdiv class=\\\"arrow\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"meter\\\"\\u003E\\u003Cdiv class=\\\"specific-meter\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"broad-meter\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-specific-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_ReachControl_Specific')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-broad-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_ReachControl_Broad')) ? \"\" : pug_interp)) + \"\\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) {pug_html = pug_html + \"\\u003Cdiv id=\\\"reach-control-sentinel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"reach-estimate-control\\\"\\u003E\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-body\\\"\\u003E\\u003Cdiv class=\\\"audience-meter-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"estimate-note\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_ReachControl_Note')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"reach-warning alert alert-warning\\\"\\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 (descriptionFields, headlineFields, i18n, longHeadlineFields) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\n\n\n\n\n\n\n\n\n\npug_html = pug_html + \"\\u003Cdiv class=\\\"ad-creation-content\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"ad-properties-section\\\"\\u003E\\u003Cdiv class=\\\"short-headlines form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdShortHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Short_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_ShortHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Short_Headline_Label') }));\n// iterate headlineFields\n;(function(){\n var $$obj = headlineFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"short-headline\",\"short-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"short-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"short-headline\",\"short-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"short-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-headline clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showHeadlineCount() >= maxHeadlines }, attr: { "aria-disabled": showHeadlineCount() >= maxHeadlines ? "true" : "false", tabindex: showHeadlineCount() >= maxHeadlines ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddHeadline')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: headlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: headlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"long-headlines form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdLongHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Long_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_LongHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Long_Headline_Label') }));\n// iterate longHeadlineFields\n;(function(){\n var $$obj = longHeadlineFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"long-headline\",\"long-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showLongHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"long-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"long-headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showLongHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"long-headline\",\"long-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showLongHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"long-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"long-headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showLongHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-long-headline clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showLongHeadlineCount() >= maxLongHeadlines }, attr: { "aria-disabled": showLongHeadlineCount() >= maxLongHeadlines ? "true" : "false", tabindex: showLongHeadlineCount() >= maxLongHeadlines ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddLongHeadline')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: longHeadlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: longHeadlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"descriptions form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdDescriptionLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Description_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_AdText', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Description_Label') }));\n// iterate descriptionFields\n;(function(){\n var $$obj = descriptionFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"description\",\"description-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showDescriptionCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"description-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"description-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showDescriptionCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var field = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"description\",\"description-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showDescriptionCount' + '()', true, true)) + \"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Lightbulb\",field + '-AIGeneratedAsset'], [false,false,true]), false, true)+pug.attr(\"aria-label\", i18n.getString('Ad_Strength_RSA_AI_Generated_Asset'), true, true)+\" tabindex=\\\"0\\\" style=\\\"position:absolute;left:-20px;top:7px;color:#0078D4;font-size:16px;display:none;\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"description-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"description-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showDescriptionCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-description clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showDescriptionCount() >= maxDescriptions }, attr: { "aria-disabled": showDescriptionCount() >= maxDescriptions ? "true" : "false", tabindex: showDescriptionCount() >= maxDescriptions ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: descriptionsErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: descriptionsErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"descriptionFields\" in locals_for_with?locals_for_with.descriptionFields:typeof descriptionFields!==\"undefined\"?descriptionFields:undefined,\"headlineFields\" in locals_for_with?locals_for_with.headlineFields:typeof headlineFields!==\"undefined\"?headlineFields:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"longHeadlineFields\" in locals_for_with?locals_for_with.longHeadlineFields:typeof longHeadlineFields!==\"undefined\"?longHeadlineFields: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=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText, href:"javascript:void(0)"\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.name\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Fthead\\u003E\\u003C\\u002Ftable\\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 (adStatusOptions, automatedCTAEnable, descriptionFields, headlineFields, i18n, isBoostAnchorsEnabled, isBoostCTAAriaTextEnabled, isBoostCustomCTAEnabled, isBoostScenario, isBulkEditMMA, isMMAAutomatedCTAOptInEnabled, isMMAEnabled, isMSANLogoAndCTAForMMAEnabled, isMoveFinalUrlTop, isMultiMediaAdsPhase2Enabled, isMultimediaAd, longHeadlineFields, selectedOption) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, arialLabelText){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" style=\\\"z-index: 1\\\"\"+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\", (arialLabelText || 'Learn more') + ' ' + (ariaLabelContext || ''), true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"helpLink\"] = pug_interp = function(topic, displayText, ariaLabelContext, fBindQuery){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\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\\\"\"+pug.attr(\"query\", 'help:' + topic, true, true)+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || ' ') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"ad-creation-content\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"ad-properties-section\\\"\\u003E\\u003Cdiv class=\\\"image-manager-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"image-required-error error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isBulkEditMMA) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"image-experience\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"business-name form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdBusinessNameLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Business_Name_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_BusinessName', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Business_Name_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"business-name-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: businessNameErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: businessNameErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"call-to-action form-group\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Clabel class=\\\"control-label accordion cta-options__title\\\"\\u003E\\u003Ca class=\\\"expand-cta-options\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isCTAExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"spritedimagealign\\\" data-bind=\\\"css: isCTAExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-control-static\\\"\\u003E\";\nif (isMMAAutomatedCTAOptInEnabled) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_1_bulk_edit')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_2_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_3_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_4_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_5_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"helpLink\"]('app54810', i18n.getString('LearnMore'));\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + (\"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"call-to-action-section\\\" data-bind=\\\"visible: isCTAExpanded\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-4\\\"\\u003E\\u003Clabel class=\\\"control-label cta-options__language-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Language_Label')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_MMA_ActionLanguage', i18n.getString('Audience_Campaign_Ad_Language_Label'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"action-language\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: actionLanguageErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"action-language-error error\\\" data-bind=\\\"text: actionLanguageErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group col-sm-4\\\"\\u003E\\u003Clabel class=\\\"control-label cta-options__action-text-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Action_Text_Label')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AdExtensions_ActionText', i18n.getString('Audience_Campaign_Ad_Action_Text_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"action-text\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: actionTextErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"action-text-error error\\\" data-bind=\\\"text: actionTextErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Chr\\u003E\\u003Cdiv class=\\\"form-group col-sm-4\\\"\\u003E\\u003Clabel id=\\\"responsiveAdStatusLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Ad_Status_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cselect class=\\\"option-select form-control\\\"\\u003E\";\n// iterate adStatusOptions\n;(function(){\n var $$obj = adStatusOptions;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.value, true, true)+pug.attr(\"selected\", item.value === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.value, true, true)+pug.attr(\"selected\", item.value === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fselect\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body\\\" data-bind=\\\"visible: showProgress\\\" role=\\\"alert\\\"\\u003E\";\nvar link = '' + i18n.getString('BulkEdit_GoToBulkEditsPage') + ''\npug_html = pug_html + (\"\\u003Cdiv data-bind=\\\"html: statusText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bulk-edit-progress-bar\\\"\\u003E\\u003Cdiv class=\\\"progress\\\"\\u003E\\u003Cdiv class=\\\"progress-bar\\\" data-bind=\\\"style:{width: completePercentage}, attr:{"aria-valuenow": completePercentage}\\\" role=\\\"progressbar\\\" aria-valuemin=\\\"0%\\\" aria-valuemax=\\\"100%\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bulkeditlink\\\"\\u003E\" + (null == (pug_interp = i18n.getString('BulkEdit_RunInBackground_Description').replace('{0}', link)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"runInBackground\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_RunInBackground')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"./inlineErrors.pug\").call(this, locals)) ? \"\" : pug_interp));\n}\nelse {\nif (isMoveFinalUrlTop) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"final-url form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdFinalUrlLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Final_URL_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_FinalURL', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Final_URL_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"get-recommend-ad\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"image-suggestion-carousel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (isMMAEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"image-experience\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"short-headlines form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdShortHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Short_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_ShortHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Short_Headline_Label') }));\n// iterate headlineFields\n;(function(){\n var $$obj = headlineFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"short-headline\",\"short-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"short-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"short-headline\",\"short-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"short-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-headline clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showHeadlineCount() >= maxHeadlines }, attr: { "aria-disabled": showHeadlineCount() >= maxHeadlines ? "true" : "false", tabindex: showHeadlineCount() >= maxHeadlines ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddHeadline')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: headlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: headlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"long-headlines form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdLongHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Long_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_LongHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Long_Headline_Label') }));\n// iterate longHeadlineFields\n;(function(){\n var $$obj = longHeadlineFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"long-headline\",\"long-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showLongHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"long-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"long-headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showLongHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"long-headline\",\"long-headline-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showLongHeadlineCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"long-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"long-headline-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showLongHeadlineCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-long-headline clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showLongHeadlineCount() >= maxLongHeadlines }, attr: { "aria-disabled": showLongHeadlineCount() >= maxLongHeadlines ? "true" : "false", tabindex: showLongHeadlineCount() >= maxLongHeadlines ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddLongHeadline')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: longHeadlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: longHeadlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"descriptions form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdDescriptionLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Description_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_AdText', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Description_Label') }));\n// iterate descriptionFields\n;(function(){\n var $$obj = descriptionFields;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"description\",\"description-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showDescriptionCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"description-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"description-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showDescriptionCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var _ = $$obj[index];\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"description\",\"description-form-\" + index], [false,true]), false, true)+\" style=\\\"position:relative;\\\"\"+pug.attr(\"data-bind\", 'visible: ' + index + ' < ' + 'showDescriptionCount' + '()', true, true)) + \"\\u003E\\u003Cdiv class=\\\"description-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\" + (\" class=\\\"description-delete iconba iconba-Delete\\\"\"+pug.attr(\"data-id\", index, true, true)+\" tabindex=\\\"0\\\" data-bind=\\\"visible: showDescriptionCount() > 1\\\" style=\\\"position:absolute;right:-20px;top:10px;cursor:pointer;\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Ca class=\\\"ad-mma-add-description clickable\\\" style=\\\"border:none;\\\" data-bind=\\\"css: { disabled: showDescriptionCount() >= maxDescriptions }, attr: { "aria-disabled": showDescriptionCount() >= maxDescriptions ? "true" : "false", tabindex: showDescriptionCount() >= maxDescriptions ? "-1" : "0" }\\\"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-plus\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Ad_AddDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: descriptionsErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: descriptionsErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"hotspot-panel\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"short-headline form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdShortHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Short_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_ShortHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Short_Headline_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"short-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: headlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: headlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"long-headline form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdLongHeadlineLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Long_Headline_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_LongHeadline', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Long_Headline_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"long-headline-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: longHeadlinesErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: longHeadlinesErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"description form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdDescriptionLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Description_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_AdText', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Description_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"description-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: descriptionsErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: descriptionsErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"business-name form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdBusinessNameLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Business_Name_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_BusinessName', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Business_Name_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"business-name-form\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"remaining-chars-hint-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: businessNameErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: businessNameErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (!isMoveFinalUrlTop) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"final-url form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdFinalUrlLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Final_URL_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_FinalURL', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Final_URL_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"mobile-url form-group\\\"\\u003E\\u003Clabel id=\\\"responsiveAdMobileUrlLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Mobile_URL_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_CampaignCreate_AudAds_MobileURL', '', i18n.getString('Click to learn more about {{item}}', { item: i18n.getString('Audience_Campaign_Ad_Mobile_URL_Label') }));\npug_html = pug_html + \"\\u003Cdiv class=\\\"error hidden\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isMultiMediaAdsPhase2Enabled || isBoostScenario || isMSANLogoAndCTAForMMAEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"call-to-action form-group\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Clabel class=\\\"control-label accordion cta-options__title\\\"\\u003E\\u003Ca class=\\\"expand-cta-options\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isCTAExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"spritedimagealign\\\" data-bind=\\\"css: isCTAExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isMMAAutomatedCTAOptInEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-control-static\\\"\\u003E\";\nif (automatedCTAEnable) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_1_enabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_2_enabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_3_enabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_1_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_2_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_3_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_4_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_New_Description_5_disabled')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_mixins[\"helpLink\"]('app54810', i18n.getString('LearnMore'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (isMSANLogoAndCTAForMMAEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-control-static\\\"\\u003E\\u003Cspan\\u003E\" + (null == (pug_interp = i18n.getString('Audience_Campaign_MMA_CTA_Description').replace(/{{bold}}/g, '').replace(/{{\\/bold}}/g, '')) ? \"\" : pug_interp) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (isMultimediaAd) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"form-control-static\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Call_To_Action_Description')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + (\"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"call-to-action-section\\\" data-bind=\\\"visible: isCTAExpanded\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-4\\\"\\u003E\\u003Clabel class=\\\"control-label cta-options__language-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Language_Label')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_MMA_ActionLanguage', i18n.getString('Audience_Campaign_Ad_Language_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"action-language\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: actionLanguageErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"action-language-error error\\\" data-bind=\\\"text: actionLanguageErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group col-sm-4\\\"\\u003E\";\nif (isMSANLogoAndCTAForMMAEnabled) {\npug_html = pug_html + (\"\\u003Clabel class=\\\"control-label cta-options__action-text-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Action_Text_Label')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AudAds_CTA_Text', i18n.getString('Audience_Campaign_Ad_Action_Text_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\";\n}\nelse {\npug_html = pug_html + (\"\\u003Clabel class=\\\"control-label cta-options__action-text-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Action_Text_Label')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AdExtensions_ActionText', i18n.getString('Audience_Campaign_Ad_Action_Text_Label'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"action-text\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" data-bind=\\\"visible: actionTextErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"action-text-error error\\\" data-bind=\\\"text: actionTextErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (isBoostCustomCTAEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"call-to-action-text\\\" data-bind=\\\"visible: ActionType() === "CustomText"\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (isBoostCTAAriaTextEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"call-to-action-aria-text\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nif (isBoostAnchorsEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"boost-anchors form-group\\\"\\u003E\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Clabel class=\\\"control-label accordion boost-anchor__title\\\"\\u003E\\u003Ca class=\\\"expand-boost-anchors-options\\\" href=\\\"javascript:void(0);\\\" data-bind=\\\"attr: {"aria-expanded": isBoostAnchorsExpanded() ? "true" : "false"}\\\"\\u003E\\u003Cspan class=\\\"spritedimagealign\\\" data-bind=\\\"css: isBoostAnchorsExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Ad_Boost_Anchors_Label')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"boost-anchors-section\\\" data-bind=\\\"visible: isBoostAnchorsExpanded\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + (\"\\u003Cdiv class=\\\"website-image-opt-in\\\" data-bind=\\\"visible: showWebsiteImageOptIn\\\"\\u003E\\u003Clabel class=\\\"website-image-section-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('SharedLibrary_UrlOptions_CrawlImgLandPage')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_AcctLevelOptions_AutoRetrieve', i18n.getString('SharedLibrary_UrlOptions_CrawlImgLandPage'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cspan class=\\\"website-image-checkbox-label\\\" for=\\\"website-image-opt-in-checkbox\\\"\\u003E\\u003Cinput id=\\\"website-image-opt-in-checkbox\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: hasWebsiteImageOptIn\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('SharedLibrary_UrlOptions_Include_CrawlImgLandPageDescription')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"visible: !hasWebsiteImageOptIn()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdCreator_WebsiteImage_OptIn_Error')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"audience-ads-policy-container\\\"\\u003E\\u003Cdiv class=\\\"alert alert-info\\\"\\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').replace('{0}', link)) ? \"\" : pug_interp) + \"\\u003Cspan\\u003E \\u003C\\u002Fspan\\u003E\";\npug_mixins[\"helpLink\"]('app54714', i18n.getString('LearnMore'));\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"advanced-url-options\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv data-bind=\\\"visible: urlOptionErrorMessage\\\"\\u003E\\u003Cdiv class=\\\"col-sm-4\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-8\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"text: urlOptionErrorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"impression-tracking-urls\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"third-party-measurements\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"generic-errors\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adStatusOptions\" in locals_for_with?locals_for_with.adStatusOptions:typeof adStatusOptions!==\"undefined\"?adStatusOptions:undefined,\"automatedCTAEnable\" in locals_for_with?locals_for_with.automatedCTAEnable:typeof automatedCTAEnable!==\"undefined\"?automatedCTAEnable:undefined,\"descriptionFields\" in locals_for_with?locals_for_with.descriptionFields:typeof descriptionFields!==\"undefined\"?descriptionFields:undefined,\"headlineFields\" in locals_for_with?locals_for_with.headlineFields:typeof headlineFields!==\"undefined\"?headlineFields:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isBoostAnchorsEnabled\" in locals_for_with?locals_for_with.isBoostAnchorsEnabled:typeof isBoostAnchorsEnabled!==\"undefined\"?isBoostAnchorsEnabled:undefined,\"isBoostCTAAriaTextEnabled\" in locals_for_with?locals_for_with.isBoostCTAAriaTextEnabled:typeof isBoostCTAAriaTextEnabled!==\"undefined\"?isBoostCTAAriaTextEnabled:undefined,\"isBoostCustomCTAEnabled\" in locals_for_with?locals_for_with.isBoostCustomCTAEnabled:typeof isBoostCustomCTAEnabled!==\"undefined\"?isBoostCustomCTAEnabled:undefined,\"isBoostScenario\" in locals_for_with?locals_for_with.isBoostScenario:typeof isBoostScenario!==\"undefined\"?isBoostScenario:undefined,\"isBulkEditMMA\" in locals_for_with?locals_for_with.isBulkEditMMA:typeof isBulkEditMMA!==\"undefined\"?isBulkEditMMA:undefined,\"isMMAAutomatedCTAOptInEnabled\" in locals_for_with?locals_for_with.isMMAAutomatedCTAOptInEnabled:typeof isMMAAutomatedCTAOptInEnabled!==\"undefined\"?isMMAAutomatedCTAOptInEnabled:undefined,\"isMMAEnabled\" in locals_for_with?locals_for_with.isMMAEnabled:typeof isMMAEnabled!==\"undefined\"?isMMAEnabled:undefined,\"isMSANLogoAndCTAForMMAEnabled\" in locals_for_with?locals_for_with.isMSANLogoAndCTAForMMAEnabled:typeof isMSANLogoAndCTAForMMAEnabled!==\"undefined\"?isMSANLogoAndCTAForMMAEnabled:undefined,\"isMoveFinalUrlTop\" in locals_for_with?locals_for_with.isMoveFinalUrlTop:typeof isMoveFinalUrlTop!==\"undefined\"?isMoveFinalUrlTop:undefined,\"isMultiMediaAdsPhase2Enabled\" in locals_for_with?locals_for_with.isMultiMediaAdsPhase2Enabled:typeof isMultiMediaAdsPhase2Enabled!==\"undefined\"?isMultiMediaAdsPhase2Enabled:undefined,\"isMultimediaAd\" in locals_for_with?locals_for_with.isMultimediaAd:typeof isMultimediaAd!==\"undefined\"?isMultimediaAd:undefined,\"longHeadlineFields\" in locals_for_with?locals_for_with.longHeadlineFields:typeof longHeadlineFields!==\"undefined\"?longHeadlineFields:undefined,\"selectedOption\" in locals_for_with?locals_for_with.selectedOption:typeof selectedOption!==\"undefined\"?selectedOption: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, isAdCreatorEnabled, isGridDisplay, isMultimediaAd, isVideo) {pug_html = pug_html + \"\\u003Cdiv class=\\\"crud-audience-ad\\\"\\u003E\";\nif (!isMultimediaAd) {\nif (isAdCreatorEnabled) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"text-audience-ad\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = (isGridDisplay ? i18n.getString(isVideo ? 'Audience_Campaign_Crud_Video_Ad_Edit_Description' : 'Audience_Campaign_Crud_Ad_Edit_Description') : i18n.getString(isVideo ? 'Audience_Campaign_Crud_Video_Ad_Description' : 'Audience_Campaign_Crud_Ad_Description')) + ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = (isGridDisplay ? i18n.getString(isVideo ? 'Audience_Campaign_Crud_Video_Ad_Edit_Description' : 'Audience_Campaign_Crud_Ad_Edit_Description') : i18n.getString(isVideo ? 'Audience_Campaign_Crud_Video_Ad_Description' : 'Audience_Campaign_Crud_Ad_Description')) + ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"react-image-experience\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"created-ad-list-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error-no-created-ad\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isAdCreatorEnabled\" in locals_for_with?locals_for_with.isAdCreatorEnabled:typeof isAdCreatorEnabled!==\"undefined\"?isAdCreatorEnabled:undefined,\"isGridDisplay\" in locals_for_with?locals_for_with.isGridDisplay:typeof isGridDisplay!==\"undefined\"?isGridDisplay:undefined,\"isMultimediaAd\" in locals_for_with?locals_for_with.isMultimediaAd:typeof isMultimediaAd!==\"undefined\"?isMultimediaAd:undefined,\"isVideo\" in locals_for_with?locals_for_with.isVideo:typeof isVideo!==\"undefined\"?isVideo: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=\\\"form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"bid-adjustment-grid\\\"\\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 (availableOptions, i18n, percentage, readonly, selectedOption, size) {pug_html = pug_html + \"\\u003Cdiv class=\\\"form-inline bid-adjustment-cell\\\"\\u003E\\u003Cselect\" + (\" class=\\\"bid-adjustment-select form-control\\\"\"+pug.attr(\"disabled\", readonly, true, true)+pug.attr(\"aria-label\", i18n.getString('BidAdjustment_Options'), true, true)) + \"\\u003E\";\n// iterate availableOptions\n;(function(){\n var $$obj = availableOptions;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.text, true, true)+pug.attr(\"selected\", item.key === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var item = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Coption\" + (pug.attr(\"value\", item.text, true, true)+pug.attr(\"selected\", item.key === selectedOption, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = item.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Foption\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fselect\\u003E\\u003Cinput\" + (\" class=\\\"inline-input bid-adjustment-input form-control\\\"\"+\" type=\\\"text\\\"\"+pug.attr(\"aria-label\", i18n.getString('BidAdjustment_BidMultiplier'), true, true)+pug.attr(\"size\", size, true, true)+pug.attr(\"maxlength\", size, true, true)+pug.attr(\"value\", percentage, true, true)+pug.attr(\"disabled\", readonly, true, true)) + \"\\u003E\\u003Cspan\\u003E%\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"availableOptions\" in locals_for_with?locals_for_with.availableOptions:typeof availableOptions!==\"undefined\"?availableOptions:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"percentage\" in locals_for_with?locals_for_with.percentage:typeof percentage!==\"undefined\"?percentage:undefined,\"readonly\" in locals_for_with?locals_for_with.readonly:typeof readonly!==\"undefined\"?readonly:undefined,\"selectedOption\" in locals_for_with?locals_for_with.selectedOption:typeof selectedOption!==\"undefined\"?selectedOption:undefined,\"size\" in locals_for_with?locals_for_with.size:typeof size!==\"undefined\"?size: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, isExcluded, isIncluded) {if ((isExcluded)) {\npug_html = pug_html + \"\\u003Cspan class=\\\"statusExcluded_icon\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"targeting-status\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Target_Setting_Excluded_Status')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif ((isIncluded)) {\npug_html = pug_html + \"\\u003Cspan class=\\\"statusEnabled_icon\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"targeting-status\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Audience_Campaign_Target_Setting_Included_Status')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isExcluded\" in locals_for_with?locals_for_with.isExcluded:typeof isExcluded!==\"undefined\"?isExcluded:undefined,\"isIncluded\" in locals_for_with?locals_for_with.isIncluded:typeof isIncluded!==\"undefined\"?isIncluded:undefined));;return pug_html;};\nmodule.exports = template;","import { IAdRecommendResponse } from './types';\r\n\r\nconst recomendCache: {[key: string]: IAdRecommendResponse} = {};\r\n\r\nexport function getRecommendCacheByUrl(url: string) {\r\n return recomendCache[url];\r\n}\r\n\r\nexport function setRecommendCache(url: string, response: IAdRecommendResponse) {\r\n recomendCache[url] = response;\r\n}\r\n","import _ from 'underscore';\r\nimport { getCenterCroppedSettings } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { IImageExperienceImage, getMultiImages, IMTAsset } from '@bingads-webui-campaign-react/responsive-ad-editor-utils';\r\nimport { IRecommendAd, ResponsiveAdForPreview } from '../ad-recommend';\r\n\r\nexport function imageAssetcenterCrop(asset: IMTAsset) {\r\n const {\r\n SourceHeight,\r\n SourceWidth,\r\n SourceX,\r\n SourceY,\r\n } = getCenterCroppedSettings({\r\n SourceHeight: asset.CropHeight,\r\n SourceWidth: asset.CropWidth,\r\n SourceX: 0,\r\n SourceY: 0,\r\n }, 1.91);\r\n\r\n return {\r\n ...asset,\r\n CropX: SourceX,\r\n CropY: SourceY,\r\n CropWidth: SourceWidth,\r\n CropHeight: SourceHeight,\r\n };\r\n}\r\n\r\nexport function convertRecommendAssetToImageExperience(ad: IRecommendAd, isMMAV2Enabled: boolean = false)\r\n: IImageExperienceImage[][] {\r\n const imageToUrlMap = {};\r\n\r\n try {\r\n ad.Images.forEach((image) => {\r\n image.Asset.Id = !!image.Asset.Id ? image.Asset.Id : image.Asset.ImageUrl; // eslint-disable-line\r\n image.Asset.IdString = image.Asset.ImageUrl; // eslint-disable-line no-param-reassign\r\n image.Asset.SubType = isMMAV2Enabled ? 'OriginalImage' : 'LandscapeImageMedia'; // eslint-disable-line no-param-reassign\r\n\r\n imageToUrlMap[image.Asset.Id] = {\r\n url: image.Asset.ImageUrl,\r\n height: image.Asset.CropHeight,\r\n width: image.Asset.CropWidth,\r\n isRecommendedImage: true,\r\n };\r\n\r\n image.Asset = imageAssetcenterCrop(image.Asset); // eslint-disable-line no-param-reassign\r\n });\r\n\r\n return getMultiImages(\r\n ad.Images.map(image => image.Asset),\r\n imageToUrlMap,\r\n {\r\n isAdCreatorEnabled: false,\r\n isMMAV2Enabled,\r\n }\r\n );\r\n } catch (error) {\r\n console.error(error);\r\n return [];\r\n }\r\n}\r\n\r\n// imageListIndex: choose which ratio to display for preview\r\nexport function convertAdUnitsToImageExperiences(\r\n adUnits: IRecommendAd[],\r\n { imageListIndex }: { imageListIndex: number },\r\n isMMAV2Enabled: boolean = false\r\n): IImageExperienceImage[] {\r\n const result: IImageExperienceImage[] = [];\r\n // deep clone ads\r\n const recommendAds: IRecommendAd[] = JSON.parse(JSON.stringify(adUnits));\r\n for (let i = 0; i < recommendAds.length; i += 1) {\r\n const ad = recommendAds[i];\r\n const item = convertRecommendAssetToImageExperience(ad, isMMAV2Enabled);\r\n\r\n if (item.length !== 0) {\r\n // display the ImageMedia178X100 image of each recommend ad\r\n result.push(item[0][imageListIndex]);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function convertAdunitsToImageList(adUnits: IRecommendAd[]): ResponsiveAdForPreview[] {\r\n const result: ResponsiveAdForPreview[] = [];\r\n // deep clone ads\r\n const recommendAds: IRecommendAd[] = JSON.parse(JSON.stringify(adUnits));\r\n for (let i = 0; i < recommendAds.length; i += 1) {\r\n const ad = recommendAds[i];\r\n const item = convertRecommendAssetToImageExperience(ad);\r\n\r\n result.push({\r\n images: item,\r\n shortHeadline: ad.Headline || _.get(ad.Headlines, ['0', 'Asset', 'Text']) as any,\r\n longHeadline: ad.LongHeadline || _.get(ad.LongHeadlines, ['0', 'Asset', 'Text']) as any,\r\n description: ad.Text || _.get(ad.Descriptions, ['0', 'Asset', 'Text']) as any,\r\n businessName: ad.BusinessName,\r\n url: _.first(ad.FinalUrls) as string,\r\n });\r\n }\r\n\r\n return result;\r\n}\r\n"],"names":["OptTgtToggle","constructor","props","super","onChange","ev","checked","parent","this","i18n","activityLogger","signal","validate","setState","handleEstimateUpdates","isFunction","handleAgeGenderExclusion","shouldShowTargetExclusionActualDeliveryStatus","errorsView","setErrors","message","getString","getData","state","alwaysDisabled","effectiveTgts","currentLevelTargetInfo","getEffectiveCriterions","length","disable","disableByValidation","render","labelTxt","onTxt","offTxt","isAudienceFeedBasedCampaign","className","href","getAudienceFeedBasedCampaignPredictiveTargetingText","Toggle","onText","offText","inlineLabel","label","disabled","MessageBar","messageBarType","warning","isMultiline","dismissButtonAriaLabel","CrudAudienceAdgroup","_AudienceStepBase","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","options","_this","renderMarker","perfMarker","willInit","isAdImpressions","wizardElement","viewContext","level","DependencyResolver","get","i18nErrors","audienceCampaignType","scenario","saveOnce","currentCampaign","schema","SchemaModel","backboneSchema","isSimplifyCampaignCreation","config","accountInfo","permissions","isIMAReachRepresentationPhase1Enabled","_","isAudienceCampaignCollapseTargetSelectionEnable","isMSANRemoveDeviceTargetsEnabled","IsDomesticSimplifiedChineseEnabled","isShowDisclaimerBannerEnabled","Enable1PPlacementTargeting","isBoostConversionBasedSegmentEnabled","boostPlacementReactComponent","React","optTgtReactComponent","isMSANBoostEnabled","isContextualTargetEnabled","workflow","model","logScenario","createAdGroup","create","applyActivity","isOpenCreatePanel","isLastStep","lastStep","isForVNext","audienceTargetSelector","AudienceTargetSelector","layout","selectedTypeKeys","blackListKeys","getBlackListCriterions","campaignType","toLowerCase","supportCashbackSettings","shouldSupportCashbackSettings","settingOptions","isLiveUpdateEnabled","showTargetSelection","showBidAdjustment","showTargetOrBid","locationSetting","LocationCriterionSetting","hideTitleLabel","deps","_objectSpread","isNewUI","onLocationTargetsChange","locationTargets","isAudienceCreationWorkflow","ageSetting","AgeCriterionSetting","genderSetting","GenderCriterionSetting","deviceSetting","DeviceCriterionSetting","audienceSetting","AudienceCriterionSetting","companySetting","CompanyNameCriterionSetting","industrySetting","IndustryCriterionSetting","jobFunctionSetting","JobFunctionCriterionSetting","placementSetting","PlacementSetting","targetSettingViews","push","reachControl","ReachEstimateControl","isSticky","estimateRequestFactory","EstimateRequestFactory","AudienceCampaignErrorsView","setOnAudiencesTargetChangeCallback","audienceTargets","concat","JSON","stringify","onAudienceTargetsChange","isAudienceCampaignCollapseTargetSelectionEnabled","isCopyCampaignSettingsAudienceCampaignEnabled","CopyAdgroupSettings","adGroupSettings","on","adgroupCopyDriver","bind","_this2","willRender","startListeningForEvents","originalSnapshot","getSnapshot","saveSnapshot","forEach","criterionEditor","resetSupportCashbackSettings","currentAdGroup","CashbackPercent","contextualSelection","contextualTargetsCriterions","getAllByType","getSelectionFromCriterions","initialContextualSelection","done","ReactDOM","_jsx","ref","i18nNewDesign","$","text","data","_this3","createChild","campaignSubType","isAudienceFeedBasedCampaignNew","isFeedBasedAudienceCampaign","isNativeAds","$el","html","template","hide","nameInput","InputControl","entity","field","ariaLabelledby","generateNameSuggestionSuffix","nameInputRemainingCharsHint","RemainingCharsHint","prepend","append","BoostPlacementTarget","ContextualTargetWithStyle","onContextualSelectionChange","selection","renderOptTgtSwtich","collapseTemplate","removeClass","params","isUpdateScenario","toJSON","Campaign","Id","AdScheduleUseSearcherTimeZone","CampaignSubType","PricingModel","current","UseOptimizedTargeting","useOptimizedTargeting","BoostAdunitIds","_this4","getAdGroupData","updateTasks","updateCriterionDataAsync","Promise","then","targetTypes","getAllNoneEmptyTypeKeys","targetType","TargetSetting","join","currentSnapshot","targets","criterionHelper","compareAndGetCriterionsDelta","target","CriterionType","listenToLocationCriterion","_this4$locationSettin","_this4$locationSettin2","intent","_this4$locationSettin3","locations","_this4$locationSettin4","deletedLocations","locationCriterions","contextualTargets","getContextualTargetInfo","processedTargets","campaignName","Name","adgroupName","processedTarget","cloneDeep","parseInt","undefined","AdGroup","CampaignName","AdGroupName","adGroupCriterions","Criterion","Type","adGroupAudienceCriterions","AdGroupCriterions","AdGroupAudienceCriterions","_this5","trace","validateAndSave","isSuccess","stopListeningForEvents","_this6","listenTo","onSelectionChanged","disableOptToggle","onReloadTargetSummary","call","stopListening","_this7","trigger","mes","CampaignId","DeliveryStatusType","getState","isValid","showError","scrollIntoView","_this8","checkIMAReachAndSave","errorMessage","catch","_this9","audienceIds","filter","item","reduce","memo","audienceId","AudienceId","Level","AudienceCriterion","AudienceName","c","Status","campaignCriterions","getCampaignLocationCriterions","_this$locationSetting","getAllLocations","_this$locationSetting2","_this$locationSetting3","adGroupCriterionsWithoutIntent","overrideInfo","getLocationsInfoFromCampaignCriterions","resolve","locationsInfo","getLocationsInfo","showIMAReachModal","onYes","saveAsync","onCancel","deliveryChannel","adGroupId","Number","audienceAssociations","aid","cid","AdvertiserCustomerID","isIMAReachModalShow","createTask","_this10","jsdata","removeErrors","adGroupParams","adapter","cacheResponse","getDataAsync","update","savedAdGroupCriterions","savedAudienceAdGroupCriterions","postProcessAfterSaveAsync","response","handleErrors","finally","withUiBlock","_this11","createAudienceTargetsActivity","createAudienceTargets","errors","bulkApiErrors","getBulkApiErrors","noMappedErrors","error","code","getBulkErrorsLogMessage","Error","getODataErrors","_this12","targetInfo","destroyAllAsync","updatedCriterions","applyCriterionsDelta","createMultipleAsync","actions","name","displayText","htmlAttributes","class","enabled","method","_superPropGet","unshift","containerId","getContainerNameFromId","show","id","ts","biddingSchemeType","BiddingScheme","bidinfo","BidStrategy","subType","campaignSetting","feedInfo","getFeedInfo","hasAudienceRemarketingList","updateEstimate","remove","_getLocationsInfo","locationIntentCriterion","targetedLocationCriterions","excludedLocationCriterions","reloadAudienceData","isLocationRestricted","reloadLocationView","_this13","targetSelectionView","locationTargetsView","settoSpecificLocation","destroyTargetTypeAsync","formatted","criterions","_this14","isLocation","locType","isIncluded","loadedCriterionData","formattedCriterion","reformatFetchedCriterion","AdGroupId","AgeRange","GenderType","IntentOption","CompanyName","JobFunction","Industry","locationManageView","searchView","convertFromCriterionHelperFormat","source","_this15","adgroup","ageKeys","i","CriterionBid","map","genderKeys","radiusList","excludedLocations","otherCriterions","setKeys","formattedCriterions","criterionFormat","audienceAssociationView","expandAssociation","expandExclusion","configSettings","doubleListBoxViewModel","criterion","convertAudienceMTCriterion","AdGroupCriterion","_this16","deselectAll","copyAdgroupCriterion","locationTSummary","getTargetedSummary","locationESummary","getExcludedSummary","ageSummary","getSummary","genderSummary","audienceTSummary","audienceESummary","companyTSummary","companyESummary","industryTSummary","industryESummary","jobTSummary","jobESummary","dataModel","locationSummaryText","ageSummaryText","genderSummaryText","audienceSummaryText","companyNameSummaryText","industrySummaryText","jobFunctionSummaryText","AudienceStepBase","AudienceAdvancedSettings","_Backbone$View","campaign","isExclusionsExpanded","ko","initExclusions","initUrlOptions","initAdRotation","isSettings","find","initAdScheduleViewAsync","upgradedUrlOptions","adRotation","collapse","e","sectionName","toggleClass","adScheduleView","dateSettings","getDateSettings","adScheduleUseSearcherTimeZone","urlOptions","toObject","TrackingUrlTemplate","FinalUrlSuffix","UrlCustomParameters","getValues","exclusionRepository","siteExclusions","siteExclusionView","campaignId","AdvancedSettings","ExcludedSites","saveExtensions","NegativeSitesResult","showErrors","AdRotationView","BaseExclusionView","adgroupId","load","_ref","_ref2","_slicedToArray","campaignExclusions","adgroupExclusions","exclusions","exclusionType","urlOptionsTemplate","UpgradedUrlOptions","editMode","entityType","trackingTemplate","finalUrlSuffix","customParameters","showUurlTestTool","updateAdScheduleViewWithContextAsync","renderAdSchedule","criterionLoader","adgroupCriterions","_ref3","_ref4","adgroupTargets","campaignTargets","adGroupSchedulingRows","parseSchedulingRows","campaignSchedulingRows","adScheduleTimeZoneSetting","AdScheduleTimeZoneSetting","dayTimeRanges","startDate","endDate","adGroupStatus","AdScheduleView","showDateSettings","campaignDayTimeRanges","campaignAdScheduleUseSearcherTimeZone","resetId","schedulingRows","multiplier","Multiplier","cashbackPercent","result","formatDecimalToFixed","digits","Day","StartHour","FromHour","StartMinute","FromMinute","EndHour","ToHour","EndMinute","ToMinute","BidAdjustmentType","BidAdjustmentAmount","Math","abs","Backbone","CrudAudienceAdgroupBasic","decimal","isNextButtonEnabled","isReadOnlyUser","CurrentAccountInActive","IsAudienceCampaignCollapseTargetSelectionEnabled","IsAmplifyEnabled","IsContextualTargetEnabled","bidStrategyType","isAutoBidding","isFCapEnabled","initCashbackSettings","cashbackSettingsView","viewModel","subscribe","v","validateCashbackPercent","onCashbackPercentChange","initializeNameInputControl","initializeBiddingStrategyView","initDefaultBidInput","initAudienceAdvancedSettings","frequencyCapping","FrequencyCapSettings","initialFrequencyCapping","viewmodel","isAdvancedAdgroupExpanded","formattedValue","fromLocalToFloat","advancedSettings","toggleCashbackPercentColumns","save","toggle","adGroupNameInputModel","set","biddingStrategyType","BiddingStrategyView","getCampaignType","CampaignSubTypeTextMapping","biddingStrategyView","isInitialize","bidSchemeType","DefaultBidModel","getBidSchema","bidCeil","BiddingStrategyToRangeKey","bidFloor","defaultBidModel","recommendedValueFromContext","BiddingStrategyValueToRecommendBidKey","recommendedValue","formatDecimal","maximumFractionDigits","minimumFractionDigits","bidParam","PricingModelToBidParam","amount","toString","AutoBidModel","type","properties","Amount","autoBidModel","defaultBidInput","addonText","accountCurrencyCode","readonly","adGroup","CashbackScope","CouponsEnabled","ParentLevelCashbackPercent","ParentLevelCashbackScope","ParentCouponsEnabled","CashbackSettings","showEnableCashbackSettingsCheckbox","showCashbackBudget","isCashbackScopeReadonly","showInheritFromParentOption","renderFrequencyCapping","FrequencyCapping","legacyI18n","validationProps","updateValidation","onFrequencyCappingChange","el","boostSetting","getBoostSetting","pricingModel","BiddingStrategyToPricingModel","_defineProperty","Medium","Languages","scheduling","getScheduleInfo","populateCriterionWithAdGroupInfo","_toConsumableArray","isAdvancedSettingsValid","isCashbackSettingsValid","is","toggleAdvancedSettings","updateOrCreateTask","createAdGroupBasicActivity","createAdGroupBasic","logAdGroupPersonalizedOffers","adGroupErrors","deletedDayTimeCriterions","COLUMN_FORMATS","getValue","obj","format","unitShort","Value","unitValueMap","Unit","unit","formatter","percentToFixedFormatter","number","decimalFormatter","getFormatter","getRange","High","Low","KPIEstimateReact","isVideo","learnMore","estimateDataConfig","i18nLabel","helpTopic","ApiDataName","getEstimateDataConfig","_jsxs","children","reqStatus","HelpPopup","topic","defaultProps","BidStrategyReact","onStrategyChange","keys","defaultSelectedKey","isDisabled","title","HelpLink","query","role","Dropdown","CrudAudienceBudgetBid","_len","args","Array","_key","onBidStrategyChanged","IsAIMBidSuggestionEnabled","suggestedBidMapping","localized","updateKPIEstimateAsync","isDefaultBidUsed","renderConversionGoalSelection","isSPA","isCPS","CampaignCashback","PersonalizedOffersEnabled","MonthlyBudget","goalSelectionView","CampaignGoalSelectionView","pageSize","isMultiMode","isHideSaveBar","empty","getCampaignPromise","queryParameters","entitySet","expand","bypassCache","odata","targetBidAdjustment","defaultBidUpdatedByUser","IsSuggestedBidShowedOnUI","showDefaultBidWarning","isDefaultBidCPVWarningRendered","createBudgetBids","_this$permissions","IsManualCpmEnabled","IsManualCpcForVideoAdsEnabled","IsAudienceCampaignSwapAdsBudgetAndBidsEnabled","IsKPIEstimateForAudienceFeedBasedEnabled","IsEnabledDeprecateManualCpcForAudienceCampaign","IsHideCpmForFeedbasedCampaginEnabled","_this$permissions$dyn","dynamic","AgeGenderDisclaimer","isCpmEnabled","isManualCpcForVideoAdsEnabled","isSwapStepsEnabled","isHideCpmForFeedbasedCampaginEnabled","isEnabledDeprecateManualCpcForAudienceCampaign","GoalSelectorView","isFeedBased","pricingModels","pricingModelToBidTypeString","CPC","CPV","CPM","EnhancedCPC","MaxConversions","pricingModelToBidTypeEnum","ManualCpc","EnhancedCpc","ManualCpv","ManualCpm","pricingModelAdgroupBidAttributeMapping","initAdScheduleView","isAdScheduleExpanded","isBidAdjustmentsExpanded","skipAdScheduling","populateCriterionWithAdGroupIds","AdGroups","Budget","budgetPanelView","isAudienceCampaignAutoBiddingV2Enabled","populateCriterionCampaignIds","CampaignCriterions","CampaignConversionGoalAssociations","convertToMTFormat","logdata","SuggestedBid","SearchBid","AccountCurrencyCode","originalCurrentCampaign","CampaignType","CampaignSettings","IsPersonalizedOffersEnabled","cashbackSettings","post","host","path","request","customHeader","targetsData","getEstimatePromise","estimateDataMock","ClicksLostToBid","ClicksLostToBudget","Currency","ErrorCode","ErrorMessage","EstAudienceSize","EstCPC","EstCTR","EstClick","EstCostPerEvent","EstImpression","EstSpend","EstView","EventsLostToBid","EventsLostToBudget","IsMinSuggestedBudget","RequestFulfilledByHost","SuggestedBudget","hasClass","updateDefaultBidWarning","updatePanel","DefaultBidCPVWarningThreshold","DailyBudget","Bid","estimateData","updateCampaign","isSuccessful","initDailyBudgetView","change","initTargetBidAdjustmentsAndRender","isMSANeCPCAutoBiddingEnabled","CampaignSubTypes","AudienceStatic","AudienceFeedBased","AudienceDynamicFeedBased","includes","IsAudienceCampaignAutoBiddingV2Enabled","isCreation","newI18n","campaignLanguage","selectedBidStrategy","strategy","initBidStrategy","toggleTargetsCashbackPercentColumns","targetsCPVData","targetsCPMData","mockEstimateData","promises","getCPCRecommendedBidPromise","cpcEstimateData","cpvEstimateData","cpmEstimateData","shouldDeprecateManualCpc","slice","isHideCpmForFeedbasedEnabled","pricingModelControls","pModel","defaultBidWarningSelector","Alert","getAll","criterionTypesGrouped","criterionSettingOptions","criterionTypeGroup","criterionType","BudgetPanelView","currentPricingModel","PricingModelToRangeKey","view","AlertReact","withDefaultStyles","_React$useState","_React$useState2","visible","setVisible","alertKey","learnMoreId","classes","root","onClick","marginTop","marginBottom","width","textDecoration","float","top","color","fontSize","CrudAudienceCampaign","createCampaignSettings","isEnabledForVerifiedImpressionTrackingAtCampaignLevel","CopyCampaignSettings","copySettings","copyFromCampaign","initControls","updateVideoAlert","updateAdImpressionAlert","impressionTrackingUrlOptions","budget","isIndividualBudgetSelected","budgetView","parentMarker","timeZoneMapper","TimeZone","getAccountTimeZone","IASTrackingInfo","VerifiedTrackingData","createOrUpdateTask","IsNewStaticAudienceCampaignCreationEnabled","document","$select","rawResponse","campaignErrors","required","ImpressionTrackingUrlOptions","initialIASImpressionTrackingUrlValue","maxImpressionTrackingUrlsCount","isImpressionTrackingUrlSectionVisible","isIASSectionVisible","initBudgetView","SharedBudgetView","budgetFactory","newFactory","IASImpressionTrackingUrlValue","first","setIASImpressionTrackingUrlValue","CrudAudienceShoppingCampaign","_CrudAudienceCampaign","productData","feedData","isEnabledDynamicFeedCampaign","IsEnabledForDynamicFeedCampaign","isEnhancedPAFilterP2Enabled","Boolean","initShoppingSettingsView","shouldShowCashbackSettings","isPersonalizedOfferAvailable","audienceCampaignSubType","initCashbackSettingsView","isCreationScenario","shoppingSettingsView","feedId","isEnablePersonalizedOffersDisabled","isEnablePersonalizedOffersChecked","FeedId","ProviderId","hasFilteredProducts","Priority","LocalInventoryAdsEnabled","CampaignProductScope","getProductScope","CampaignCriterionsData","filterDataComesFrom","clickApplyButton","ShoppingCampaign","getProductData","getCampaignCriterionsOnly","CashbackMonthlyBudget","Percent","Scope","logCampaignPersonalizedOffers","renderCatagrizedOptionsList","disableStoreSelection","ShoppingSettingsView","setting","noExistingCampaign","cashBackSettings","setValues","getTreeInfo","refreshCategorizedOptionsList","refreshData","selectAllProducts","url","queryify","uid","urlQueryStringObject","salesCountry","shouldShowPlaceholderStoreIfExists","getCategoryFullData","getProductTypeFullData","Product","add","AudienceMeter","meterProps","max","min","css","left","calcBroadPos","calcSpecificPos","None","Thousand","Million","Billion","permissionConfig","debouncedUpdateEstimateFunc","hasAudience","updateEstimateInternal","audienceMeter","postAudienceEstimation","postPrivacyCheck","lastEstimateData","isPanelSticky","customModifyTarget","modifyTarget","customThreshold","threshold","customRootMargin","rootMargin","window","updateEstimatesOnMeter","stickPanel","IntersectionObserver","observer","entries","intersectionRatio","boundingClientRect","height","intersectionRect","y","addClass","observe","errMsg","context","urlBase","CurrentCustomerId","CurrentAccount","audienceEstimationUrl","privacyCheckUrl","option","privacyData","isReachTooSpecific","privacyCheckResult","hideEstimate","validateReach","hideWarning","showWarning","estImprVal","estImprUnit","estImprUnitVal","estImprText","estImpr","IsImpressionTooSpecific","moveToSpecific","moveAlongBroad","calcMeterValue","erroMessage","isTooSpecific","success","log","disconnect","ageTargetMap","EighteenToTwentyFive","TwentyFiveToThirtyFive","ThirtyFiveToFifty","FiftyToSixtyFive","SixtyFiveAndAbove","Unknown","parentLevelTargetInfo","bidStrategyPermissionBind","IsKPIEstimateForCPVEnabled","IsKPIEstimateForCPMEnabled","campaignSubTypesSupported","CampaignSubTypeMapping","AudienceVideoAds","FeedBasedCampaginSubTypes","bidStrategy","createWithTargetSettings","targetSettings","addAgeTargets","addGenderTargets","addLocationTargets","addRadiusTargets","addCompanyTargets","addIndustryTargets","addJobFunctionTargets","addAudienceTargets","CampaignBiddingStrategy","Feed","StoreId","AutoTargeting","Includes","Excludes","translatedAgeTarget","AgeCriterion","Target","Age","GenderCriterion","Gender","targetInfoToUse","parentLevelTogglesByType","Location","includedCriterions","excludedCriterions","locationCriterion","LocationCriterion","LocationId","excludedLocationCriterion","radiusCriterions","radiusTargets","radiusCriterion","RadiusCriterion","Radius","CenterLongitude","Longitude","CenterLatitude","Latitude","RadiusTargets","addInclusions","arr","CompanyNameCriterion","Company","JobFunctionCriterion","IndustryCriterion","Audience","p$data","resource","mergeI18n","parentI18n","Object","assign","console","warn","formatUrl","pageContext","replace","BingAdsWebApiUri","CurrentCustomer","AdStrengthSuggestionRepository","assetType","isAutoComplete","currentFinalUrl","requestBody","adType","maxCount","autoCompleteFieldIndex","adFields","count","business","Website","headlineCount","maxHeadlineSuggestions","descriptionCount","maxDescriptionSuggestions","caller","contentType","headers","authorization","Token","stringifySync","rawData","Suggestions","suggestion","AssetType","Headlines","headline","Asset","Descriptions","description","err","responseJSON","Code","reject","Text","headlineFields","MMAAssetConfigs","MAX_HEADLINES","longHeadlineFields","MAX_LONGHEADLINES","descriptionFields","MAX_DESCRIPTIONS","ResponsiveAdScenarios","AdEditFields","Headline","LongHeadline","Description","BusinessName","assetSuggestionType","singleAssetSuggestionType","AdStrengthSuggestionPicker","_React$Component","container","$target","targetOffset","offset","containerOffset","assetSectionHeight","hrHeight","$panel","IsMultiMediaAdsPhase2Enabled","outerHeight","hrStyle","getComputedStyle","borderTopWidth","borderBottomWidth","event","inputText","_this$props","element","pickerContainer","targetSelector","split","val","stopPropagation","preventDefault","_this$props2","itemsToDisplay","input","position","getDisplayPosition","containerStyle","display","zIndex","pickerTitle","startsWith","contentView","index","addAssetSuggestion","classnames","style","padding","fontWeight","body","AdStrengthSuggestionController","containerSelector","cachedAutoCompleteSuggestions","cachedCreationSuggestions","cachedBusiness","autoCompleteSuggestions","creationSuggestions","businessNameSuggestions","hidePicker","clickedAway","keydown","existingPickerContainer","containerExists","off","closest","finalUrl","suggestions","filterSuggestion","Permissions","registerGlobalEvents","targetSuggestions","suggestionContent","showHeadlineCount","showLongHeadlineCount","showDescriptionCount","nonEmptyHeadlineCount","autoFillHeadlineCount","headlineSuggestions","j","targetField","targetSuggestion","nonEmptyLongHeadlineCount","autoFillLongHeadlineCount","longHeadlineSuggestions","nonEmptyDescriptionCount","autoFillDescriptionCount","descriptionSuggestions","_ref5","viewField","_ref6","appendTo","repository","isValidUrl","isAutoCompleteSuggestionCached","fetchAdStrengthSuggestion","_ref7","renderPicker","_ref8","creationFetchPromise","isCreationSuggestionCached","_ref9","currentSuggestions","isAudienceCampaign","IsResponsiveAdRecommendationMSANEnabled","IsAudienceCampaignMultiMediaAdsEnabled","autoFillSuggestionsMultipleField","autoFillSuggestionsSingleField","IsMMAAutoFillEnabled","businessFetchPromise","isBusinessCached","fetchBusinessInfo","_ref10","responseText","controller","attachAdStrengthSuggestionHelpers","attachedFunc","selectionStart","selectionEnd","getAdStrengthSuggestion","ads","FinalUrls","Images","PinnedField","EditorialStatus","AssociationType","UiDisplayStatus","PerformanceLabel","RecommendationId","TracingId","SubType","IdString","CropX","CropY","CropHeight","CropWidth","ImageUrl","PerformanceMetrics","LongHeadlines","AdRecommendRepository","baseURL","FinalURL","Locale","serverContextStore","e2eTestEnvironment","oDataToken","RecommendAdList","setUpAdWithRecommendAd","errorCodes","loaded","setLoaded","useState","creating","setCreating","setAds","imageExperiences","setImageExperiences","async","onEdit","ad","currentTarget","isAdEditShown","shouldSaveAdFromRecommend","onApply","useEffect","resultFromCache","res","getRecommendAds","imageListIndex","fetchRecommendation","setClarityTag","AdRecommendationMSANList","UiBlocker","blocking","Stack","horizontal","tokens","childrenGap","aspectRatio","imagePreviewHeight","aspectRatios","Image191x100","image","additionalSetting","previewTexts","longHeadline","shortHeadline","businessName","DefaultButton","String","errorCode","adPreviewConfig","placementSetName","placementTypes","MSAN","MSEdgeSingleCarousel","adPreviewConfigMMAV2","MSANV2","MSNCarousel","RecommandAdPreviewCarousel","isMMAV2Enabled","imageList","activeIndex","setActiveIndex","onUpdateImageExperienceImageList","multiImagePlacementSets","placementSets","finalImageList","curPlacementList","useMemo","placementList","finalPlacementList","images","rest","onRenderPlacement","useCallback","placement","AdPlacementComponent","idx","placementData","RecommendAdCarousel","selectedIndex","toggleOpen","loadingText","PrimaryButton","RecommendButton","startToLoad","cleanData","isOpen","isRecommendAdinEditor","Path1","shouldOverrideAdInEditor","AdRecommendPrefill","attributes","componentDidMount","spinnerStyles","marginLeft","verticalFill","horizontalAlign","Spinner","styles","size","small","labelPosition","action","callback","AdRecommendationMSANModal","icon","dismissible","Modal","scrollableContentClassName","onDismiss","isBlocking","CallToActionText","forwardRef","defaultValue","textFieldRef","setErrorMessage","maxLength","ResponsiveAd","useImperativeHandle","trim","isString","placeholder","componentRef","newValue","alwaysShowError","CallToAction","AdEdit","isUpdate","isAdNotEmpty","isSaved","campaignSettings","isEmpty","showSaveButton","isGridDisplay","isSimplifyAudienceCreation","isAdRecommendationMSANEnabled","recommendButtonReactComponent","hotspotReactComponent","boostAnchorsReactComponent","callToActionTextComponent","callToActionAriaTextComponent","instrumentation","edm","isMobileUrlEnabled","isImpressionTrackingUrlsEnabled","getBiddingSchemeType","isThirdPartyMeasurementEnabled","isMOATEnabled","ImpressionTrackingUrlsMaxCount","IsUpToSixImpressionTrackingUrlsEnabled","isMSANLogoAndCTAForMMAEnabled","isMultimediaAd","isBulkEditMMA","isMultiMediaAdsPhase2Enabled","isMMAAutomatedCTAOptInEnabled","IsMMAAutomatedCTAOptInEnabled","callToActionSetting","automatedCTAEnable","AutomatedCallToActionOptOut","isAudienceCampaignMultiMediaAdsEnabled","isBoostScenario","isBoostCTAAriaTextEnabled","IsBoostCTAAriaTextEnabled","isBoostAnchorsEnabled","IsBoostAnchorEnabled","isBoostCustomCTAEnabled","IsBoostCustomCTAEnabled","isMMAAdCustomizersEnabled","IsMMACountdownInsertionEnabled","IsMMAKeywordInsertionEnabled","IsMMALocationInsertionEnabled","IsMMAAdCustomizerInsertionEnabled","IsBoostCTAPhase2Enabled","responsiveAdScenario","isMMAEnabled","isMoveFinalUrlTop","genericErr","parse","initHeadlines","initLongHeadlines","initDescriptions","preferencesService","websiteImageOptInPreferenceName","hasWebsiteImageOptedInObservable","parsedTextMaxLengthExtension","onUpdateHotspots","hotspots","boostAnchorData","BoostAnchors","callToActionText","callToActionAriaText","CallToActionAriaText","adStatusOptions","onClose","showProgress","statusText","successCount","errorCount","totalCount","adStatus","completePercentage","total","completed","floor","maxInlineErrorCount","showErrorGrid","errorCountString","initInlineErrors","inlineErrors","read","write","getJobResults","errorObject","errorKey","Errors","entityName","EntityKey","errorCountLinkText","errorsGrids","_TL_","isImproveMMA","isRecommendation","currentOptInPref","findByNameAtUserLevel","shouldCTANotExpand","maxHeadlines","DEFAULT_HEADLINES","headlinesErrorMessage","maxLongHeadlines","DEFAULT_LONGHEADLINES","longHeadlinesErrorMessage","maxDescriptions","DEFAULT_DESCRIPTIONS","MAX_HEADLINE_SUGGESTIONS","ResponsiveAdConfigs","MAX_DESCRIPTION_SUGGESTIONS","descriptionsErrorMessage","businessNameErrorMessage","isCTAExpanded","isBoostAnchorsExpanded","Language","CallToActionLanguage","actionLanguageErrorMessage","ActionType","actionTextErrorMessage","urlOptionErrorMessage","showWebsiteImageOptIn","hasWebsiteImageOptIn","Data","OptIn","initializeAdModel","initializeAdContent","initializeAdError","newOptInState","setAtUserLevel","MMACopilot","fields","Headline0","LongHeadline0","Description0","enum","verifiedTrackingSettings","getVerifiedTrackingSettingsRead","AdStatus","enableAdStrengthFields","property","attachAdCustomizersHelpers","updateAction","countdownI18nDummy","edmCampaign","jsDataCampaign","scope","extend","evaluateAdCustomizers","elem","delegateEvents","overrideEvents","firstHeadline","getEvaluateAdCustomizers","updateObject","updatedElement","click","updateAIGenAssetContextualAttributeStatus","maxSize","firstLongHeadline","firstDescription","ActionLanguageAdapter","actionLanguageAdapter","observable","selectedOption","ActionTypeAdapter","actionTypeAdapter","shortHeaderRemainingCharsHint","longHeaderRemainingCharsHint","descriptionRemainingCharsHint","businessNameRemainingCharsHint","reactComponentRef","UrlEditor","finalUrlEditor","inputProtocol","ariaId","mobileUrlEditor","ImpressionTrackingUrlsUrlOptions","initialImpressionTrackingUrls","impressionTrackingUrls","unset","ThirdPartyMeasurementView","ThirdPartyMeasurementBackboneView","initialThirdPartyMeasurement","thirdPartyMeasurement","renderWithInput","setError","onUrlChanged","getAdStrengthSuggestionForURL","attachAdStrengthSuggestionHelperForURL","MobileFinalUrls","UrlOptions","advancedURLOptions","placeholderEnabled","fn","originalView","testUurl","isInline","uurlLevels","Ad","customerId","userId","accountId","entityId","apiInLog","adPropertiesToControlMap","prefix","ko_model","protocol","fullUrl","blur","dataset","shiftOneIndex","nextField","getAIGenAssetContextualAttributeStatus","editorHeadlineDescriptionOnlyTemplate","callToAction","enableAIGenAssetContextualAttribute","enableAdStrengthSuggestionHelpers","updateHint","HotspotPanel","enableHotSpotPlacement","IsBoostHotSpotPlacementEnabled","MAX_BUSINESS_NAME","MIN_HEADLINES","min_count","MIN_LONGHEADLINES","MIN_DESCRIPTIONS","Property","ErrorNumber","ifCatch","indexOf","ImpressionTrackingUrl","genericErrorMessage","getTrackingTemplate","getUrlCustomParameters","getFinalUrlSuffix","verifiedTrackingSettingsAttachment","getVerifiedTrackingSettingWrite","HotSpots","deleteUndefinedParameters","optionalParameters","apply","p","self","IsAlgoGeneratedAsset","attachAIGenAssetContextualAttribute","improveMMAOption","aiGeneratedAssetContainer","Key","AccountSettingRepository","settings","patch","getVideosAndThumbnailsFromMTAssets","videos","thumbnailRecord","mTAssetArrays","asset","CustomThumbnailAsset","getAllImagesInfoFromMTAssets","imageToUrlMap","constants","videoTypesWithOrder","videoType","thumbnail","video","customThumbnailAsset","imageProps","getImageProps","ImageExperienceImage","newVideoFromMTObject","newVideoFromGridObject","videoList","getTextSuggestionAdoption","textSuggestions","saveAdParams","suggestionMatch","testValue","textSuggestionAdoption","suggestionMatchForField","isSuggestionAdopted","some","getStyle","imagePlaceholder","border","objectFit","portraitWithImage","borderRadius","backgroundColor","getImageData","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","abrupt","stop","_x","BoostImage","oDataConfig","onSavePortraitImage","associatedImages","dateFormat","timeZone","serverContext","_useState","_useState2","isImageEditDisplayed","setIsImageEditDisplayed","_useState3","_useState4","setImage","useDefaultStyles","_useImagePicker","useImagePicker","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","mediaRepository","MediaRepository","onNewImageSelected","imagePlacements","newImage","_useAssetLibraryImage","useAssetLibraryImagePicker","isPortraitImage","imagePickerError","setImagePickerError","clearImagePickerError","uploadImage","processUploadedImage","minSize","addImageByUrl","getStockImages","onSelectStockImage","onImageSelected","onImagesSelected","socialMediaDataSource","customMediaSourceConfig","_useWebsiteSuggestion","useWebsiteSuggestion","adContext","advertiserCustomerId","logActivity","adCreatorScenario","scenarioName","scenarioValue","suggestionState","suggestionPoller","_suggestionState$sugg","portraitImage","portraitSubtypes","imgObjMT","portraitImageExperienceImage","src","OriginalUrl","Width","Height","associationType","disableEdit","isLogo","isRecommendedImage","SourceType","cropSettings","SourceX","SourceY","SourceHeight","SourceWidth","paddingBottom","alt","AddImageCrudAdComponent","setIsOpen","newOpen","maxUploadNum","imageExperienceProps","imageOption","imageOptionKeys","Portrait","managedViewSelectionState","updateManagedViewSelectionState","stockImageConfig","socialImageConfig","assetLibraryConfig","onImageAddError","imageType","MediaEditorPanel","imagePlacement","aspectRatioConfig","aspectRatiosForBoostPortrait","minCropSize","baseImage","Src","disabledPivotItemKeys","PivotItemKey","Effect","customizedDefaultSelectedPivotItemKey","Crop","initialState","savedAdsList","imageErrorMessages","videoErrorMessages","genericErrorMessages","currentAd","draftUnsaved","isStockPhotoEnabled","videoUploading","currentSelectedImageId","currentSelectedLogoId","cropImage","blockCarousel","hasWebsiteImageOptedIn","enableAutoRotate","hasManualCroppedLogo","hasManualCroppedImage","hasUsedViewAllPlacements","isRecommendAd","mmaBulkConversionStatus","isBulkEditMMAUnSaved","mapSuggestionResponseToState","SuggestionStatus","EmptyURL","CrudAudienceAdReact","onAdFieldUpdated","updatedObj","isFinalUrlImageRetrievalEnabled","isAdCreatorEnabled","newUrl","newState","validURL","control","adEditRef","test","FetchInProgress","InvalidURL","onFinalUrlChanged","onUpdateFinalUrlPrefix","newPrefix","updateFinalUrlPrefix","onUpdateFinalUrl","finalUrlControl","updateFinalUrl","finalURLChange","cancel","inProgress","minimumSize","getMinimumSizeForImage","getLandingPageSuggestions","landingPageUrl","enableOfflinePollingDelay","minimumResolution","onImageListUpdated","currentSelectedId","isMultimediaAdinMSANEnabled","newImageList","flatten","img","uniq","sortBy","curImageList","newImages","imageTypesWithOrder","selectedId","findImageSetById","getLogoList","getImageListWithoutLogo","getDefaultCurrentSelectedLogoId","getDefaultCurrentSelectedImageId","list","shouldEnableOptIn","imageSources","WebsiteCarousel","AdRecommendation","isOptedIn","onVideoListUpdated","isCreate","initialVideos","isVideoUpdated","onSaveThumbnailAsDraft","onVideoUploadStatusUpdate","onImagePreviewRequested","imagePreviewCarouselRef","setPreviewIndexByType","onVideoPreviewRequested","videoPreviewCarouselRef","imageId","onImageEditCancelled","onCropImage","imageObj","onAddAspectRatio","_this$state","imageListWithoutLogo","previewImages","newPreviewImages","targetedRatioIdx","targetedRatio","clone","setIncluded","splice","croppedImages","getAutoCroppedImages","originalImageToCrop","sort","a","b","setImageSetById","onRemoveAspectRatio","_this$state2","onAdSaved","savedAd","imageToGenerateThumbnail","formattedSavedAd","ThumbnailForAdList","savedAdsListWithoutDuplicate","savedAdItem","originalUrl","onEditAd","adId","extraExpand","responsiveAdRepository","getAdAsync","Videos","initializeImagesModelInternal","onRemoveAd","removeAdAsync","updatedSavedAdsList","onCreateAd","pilotCheckLogInfo","clear","onSaveRecommendAd","saveAdAsync","recommendSave","_callee2","_ref5$isAdEditShown","uploadedImageIds","_context2","uploadRecommendImage","recommendAssetIdImageUrlMap","sent","getMultiImagesFromMTAssetsAsync","ImageExperiences","t0","finish","getLogo","logos","imageArr","getFirstElement","logo","getPreviewTexts","defaultPreviewFields","baseImageId","newImageSet","imageSetIdx","placements","BaseId","isPlaceholderMMA","isOnlyOneIncludedImage","ratio","landscapeImage","IsIncluded","IsVideoAdEditorEnabled","isBoostPortraitImageEnabled","IsBoostPortraitImageEnabled","isBoost200x100ImageEnabled","IsBoost200x100ImageEnabled","isBoostNewAspectRatioSupportEnabled","IsBoostNewAspectRatioSupportEnabled","isNativeAd","isAudienceImageUpscale","IsMSANLogoAndCTAForMMAEnabled","isLogoEnabled","getImageTypesWithOrder","saveMMABulkConversion","progressCb","cancelAdAsync","IsVideoAdsForCampaignEnabled","_this$props3","logInfo","isMMAInMSAN","isMMASearch","isEdit","logWithMetadata","adPreviewPerfMarker","UiUnsupportedRatios","ImageList","Title","desc","actionText","ActionText","glyph","Glyph","uri","Uri","Placement","odataRootUrl","odataPath","odataToken","isImageFittingEnabled","LegacyResponsiveAd","currentAccount","Campaigns","instrumentationScenarios","MSANImage","MMA","MMAConversion","default","SuggestionPoller","cmpId","jobCompleteCallback","onPollingSuggestionCompleted","logger","getAdCreatorInstrumentation","websiteSuggestionActivity","imageOData","ImageOData","enableAdPreviewLibrary","openTime","Date","fetchAndFillVideosAsync","fetchAndFillImagesAsync","DEFAULT_MAX_IMAGE","ThemeProvider","theme","components","ComponentSettings","core","ThemeFluent","ImageSuggestionCarousel","isLoading","carousel","isError","messageInfo","onSelectImage","imageSource","suggestionId","websiteSuggestionCarouselActivity","addImageCallback","Image","MessageBarType","ind","onSelectSeeAll","openAddImageCallback","isSubdomainScraping","ServerError","FetchSucceed","videoObj","formatToSave","thumbnails","setMTImageModel","originalData","mtModel","flattenedIncludedImageAssetList","getFlattenedImageAssetList","updateAssetsIdsAsync","updates","originalThumbnailAsset","copyThumbnailLookToNewImage","bingSrc","status","_this$state3","firstPlacementOfFirstImage","firstLogo","preferenceFlags","MMAInMSANWebsiteImageOptIn","MMAWebsiteImageOptIn","msanAspectRatioAssociations","values","getAspectRatios","_this$props4","allPages","selectedItems","filterService","AdditionalData","batchAction","Actions","PasteAs","EditCopy","filters","projection","selectedIds","isSelectAll","finalParams","getParams","Selection","QueryString","_this$props5","adProp","finalAd","setUnSupportedRatios","fetchImagesPromise","getImagesFromMTAssetsAsync","imageIds","api","getAssetCount","assets","MMAParams","imageDetails","isManualEdited","imagesCount","headlinesCount","LongHeadlinesCount","descriptionsCount","_ref10$recommendSave","savePlaceholderMMA","errorMsgs","initialParams","isDataValid","saveAdLog","saveAdLogForTextRecommendation","getProcessedDataAsync","shouldUpdateAccountSettingForAllowCrawlImages","AllowCrawlImagesFromLandingPage","_ref11","omitDeletedParameters","enableAdCreatorMetrics","saveAdActivity","_ref$imageList","_ref$state","baseAdIdMessage","adIdMessage","effects","getListOfEffectSettings","effect","logSaveAdInfoForMetrics","recommendData","getRecommendCacheByUrl","adData","setResponseErrors","newErrors","bulkApiErrorNumberToErrorMessageMapping","_ref13","bulkParams","getBulkEditParams","bulkEditChange","progressCB","completeCB","SuccessRowCount","TotalRowCount","ErrorRowCount","bulkEditMMAFailed","failedCB","errorMes","MMAImageList","getMmaAspectRatios","ratioCounts","imageArray","minimumRequirements","isMeetingMinimumRequirement","isMMAV2Format","noLandscapeImageIncluded","every","noOriginalImageIncluded","ImageExperience","customThumbnailRecord","isAudienceAd","genericImage","finalUrlProtocol","setAddNewImageCallback","setOpenAddImageCallback","onManualCropLogo","onManualCropImage","enableUnifiedAdPreview","isAudienceMMAWithLogoAndCTA","showCopilotOptionForImage","IsBackgroundSceneEnabled","assetLibraryEventHandler","onUploadImage","imgId","supportImageUpscale","BackboneViewWrapper","View","biddingScheme","getOptInPreferenceFlag","eventsToActions","_this$props6","_this$state4","getUnifiedAdPreviewConfig","PreviewCarouselComponent","UnifiedPreviewCarousel","PreviewCarousel","MMAMSANPreviewCarouselComponent","UnifiedMMAMSANPreviewCarousel","MMAPreviewCarousel","imagePreview","getImagesForPreview","totalImageListCount","onUsedViewAllPlacements","renderMMABulkConversionHeader","selectedRowCount","SavedAdList","isEditable","onCreateAnotherAd","renderAdEdit","renderImageExperience","Row","Col","sm","VideoPreviewCarousel","rel","Button","btnStyle","renderMMABulkConversionActionButtons","cancelMMABulkConversion","isUnSaved","willFetchFile","willFetchData","DelayedCopilotSearchMMAEditor","CopilotSearchMMAEditor","DelayedBulkMMAConvertEditor","BulkMMAConvertEditor","DelayedPlaceholderMMAEditor","PlaceholderMMAEditor","CrudAudienceAdReactWithContext","scopeValue","CoreEditor","MMARefactor","Suspense","fallback","ServerContext","Provider","I18nContext","InstrumentationContext","PreferenceContext","ScopeContext","PermissionsContext","Scenario","Activity","editorRef","ResponsiveAdRepository","campaignDomain","$withKey","Ads","$expand","adWithIds","destroy","parentId","escapeParams","DisplayUrl","ids","updateMany","showImageOptedIn","processImageListViewModelToModel","responseData","ResponsiveAdEditor","getI18n","i18nInstance","realI18n","createAds","recommendationTargetAccountId","TargetAccountId","noCreatedAdErr","crudReactComponent","IsMMAV2Enabled","imageExperienceView","imagePath","GenericImage","onRenderedInDOM","saveToClient","hasCreatedAd","imageUrl","StyledMMABulkConversionView","hasRSAorExTA","bulkEditMMAConversionAd","_this$props$scope","getCombinedFilter","getMMAEditorStyles","minWidth","margin","borderStyle","borderColor","borderWidth","flexWrap","marginRight","flexFlow","paddingTop","adEditorShell","mmaAdImagePreviewCarousel","bottom","right","rightStyles","gap","maxWidth","leftStyles","textAlign","headerStackStyles","imageExperienceStyle","textAssetStyle","businessNameStyle","getAdvancedSettingsStyles","collapsiblePanel","borderBottom","palette","themePrimary","themeDarker","transform","overflow","mobileFinalUrls","trackingUrlTemplate","urlCustomParameters","triggerTestUurl","useContext","DynamicPermissions","_useCollapseState","useCollapseState","_useCollapseState2","allAdvancedSettingsSections","advancedSettingsExpandedSections","setAdvancedSettingsExpandedSections","allAdvancedSettingsExpand","collapseExpander","setActiveKeys","advancedSettingsSectionExpanded","setAdvancedSettingsSectionExpanded","onAdvancedSettingsSectionToggle","expanded","_Fragment","ValidatedBootstrapPanel","onToggle","actuationProps","classNames","BootstrapPanel","Heading","Collapse","Body","allPanelItems","checkItems","skipItemsTypeCheck","activeKeys","MobileUrlSection","URLOptionsSection","token","advancedSettingsStyles","mergeStyles","featureName","CopilotSearchMMAEditorContainerInternal","onDataChange","onReset","showAllValidationErrors","showUnmappedFormErrors","errorMapperWithI18n","errorMapper","finalUrls","firstUrl","finalUrlForRecommendation","FinalUrlForRecommendation","headlines","longHeadlines","descriptions","cta","ctaText","setCTAText","_useEvaluatedAssests","evaluatedHeadLine","setEvaluatedHeadLine","evaluatedLongHeadLine","setEvaluatedLongHeadLine","_useState5","_useState6","evaluatedDescription","setEvaluatedDescription","evaluatedText","useEvaluatedAssests","imageData","previewData","allAdSettingsSections","adSettingsExpandedSections","setAdSettingsExpandedSections","imageListLength","isArray","noop","addNewDescriptionCallback","setAddNewDescriptionCallback","addNewShortHeadlinesCallback","setAddNewShortHeadlinesCallback","_useState7","_useState8","addNewLongHeadlinesCallback","setAddNewLongHeadlinesCallback","_useState9","_useState10","finalUrlForCopilotRecommendations","setFinalUrlForCopilotRecommendations","imagesContainerRef","useRef","logosContainerRef","_useState11","_useState12","imageExperiencePortalContainerState","setImageExperiencePortalContainerState","_useState13","previewImageId","cropImageObj","_useState14","previewImagesSharedState","setPreviewImagesSharedState","_useState15","_useState16","imageExperienceAddNewImageCallback","setImageExperienceAddNewImageCallback","_useState17","_useState18","newCTACallback","setNewCTACallback","allAssetsExpand","_useCopilot","useCopilot","currentCTA","assetGroupId","feature","copilotBanner","updateFinalUrlForCopilot","updateFinalUrlCallback","newFinalUrls","onCallActionLanguageChange","setAutomatedCTAEnable","useAutomatedCTA","initializeAdCustomizer","showAdCustomizers","IsRSAIffPopupEnabledFromDeps","useInitAdCustomizer","ActuationGroup","isActive","AttentionBeaconGroup","FormErrorGroup","formErrorProps","ValidationGroup","AssetGroup","onValidate","CopilotRepositoryProvider","locale","getLocale","recommendationType","enableLogoAndCTA","CopilotCTALogoGeneration","UnmappedFormErrors","mapper","ValidatedFinalUrlWithRecommendationsSection","onFinalURLFocusOut","onFinalURLEnterKeyUp","ImageListPortalContainerWithCarouselSection","containerRef","containerState","imageLimit","LogoListPortalContainerSection","HeadlineAssetCollectionSection","LongHeadlineAssetCollectionSection","isOptional","DescriptionAssetCollectionSection","ValidatedBusinessNameWithRecommendationSection","ValidatedLegacyCallToActionWithLanguageSection","isDisplayPlusMMA","SearchMMAAdPreview","ValidatedImageExperienceWrapper","imagesContaineRef","logosContaineRef","isBoostPortraitEnabled","updatePortalContainerState","initialValue","isAd","wizardPerfMarker","isCombinedMsanAndMmaAspectRatios","customMaxImageCount","UAPLPMaxIntegration","AdPreviewLibrarySearchMMA","CopilotSearchMMAEditorContainer","withScope","emptyRecommendationData","ImageAssets","Headline1","Headline2","Description1","emptyData","CopilotSearchMMAEditorInternal","onChanged","externalErrors","convertFromAdModel","setData","setIsDataValid","setBlocking","saveFailed","setSaveFailed","_useContext2","RecommendationContext","setRecommendationContext","_useAppliedLog","_useContext","recommendationContext","logAppliedSuggestion","assetData","isEditing","logCopilotRecommendations","assetGroup","useAppliedLog","ActivityContext","clearAllErrors","newData","clearAll","dataPatch","processViewModelDataForSaving","processImageAndSaveSearchAdAsync","resErrors","mapBulkUpsertErrors","processImageAndSaveToClientAsync","themes","imageAssets","withBannerService","withRecommendationContext","searchMMAConfig","AdTypeEnum","placementConfig","EPT","All","msanMMAConfig","Outlook","Web","Mobile","msanMMAV2Config","basicBoostPlacementTypes","Boost","WindowsSpotlight","DiscoverCard","StartMenu","ActionCenter","Banner","Prong1Prong2Feed","Coachmark","msanMMABoostConfigBasic","msanMMABoostConfigNew","HeroImageCarousel200x100","msanMMABoostConfigAll","NewBoost","defaultConfig","getBulkMMAEditorStyles","ImageExperienceWithSuggestionPollerForBulk","setUrl","activityContext","ScenarioContext","hasErrorInUrl","validateAdUrl","customizedGetMinimumSizeForImage","websiteImagesState","BulkMMAConvertEditorHeader","BulkMMAConvertEditorContainer","displayUrl","ImageListPortalContainerSection","isBulk","AdStatusSection","BulkMMAConvertEditorFooter","showSave","onSave","noTranslateModel","noTranslate","BulkMMAConvertProgress","onHide","completeCount","messageTemplate","ariaValuenow","ariaValuemin","ariaValuemax","ReactTemplate","BulkMMAConvertError","setShowErrorGrid","onToggleErrorGrid","BulkMMAConvertEditorInternal","setUnSaved","setShowProgress","bulkSuccessCount","setBulkSuccessCount","bulkErrorCount","setBulkErrorCount","_useState19","_useState20","bulkTotalCount","setBulkTotalCount","_useState21","_useState22","bulkInlineErrors","setBulkInlineErrors","_useState23","_useState24","bulkFailed","setBulkFailed","_useState25","_useState26","showBulkPartialError","setShowBulkPartialError","_useState27","_useState28","setGenericErrorMessages","onProgess","onHideProgress","language","selectionParams","filterOptions","odataOptions","jobResponse","jobId","statusFilter","skip","take","urlTmpls","accountInUrl","filterSuffix","errorsFromResponse","firstImageId","imagesForPreview","entitySchema","bulkUpsertAdSettingsEntityErrorMap","getBulkUploadEntityType","_ref$bulkUpsertEntity","bulkUpsertEntityErrorMap","_ref$errorProcessor","errorProcessor","identity","errorType","mappedErrorType","isHtmlMessage","DangerousHtmlMessage","bidAjdLimits","getBidAdjustmentOptions","percentage","availableOptions","computeBidAdjustment","rawBidPercentage","bidAdjOptionText","bidAdjustmentOptions","bidAdjOption","isBidAdjustmentValid","_bidAjdLimits$getMaxM","getValidationError","isEnableCustomMessage","_bidAjdLimits$getMaxM2","GridConfigGenerator","showExclusion","bingadsGridColumn","IsPersonalizedOffersV3Enabled","$gridRoot","isHideBidAdjustmentForBoostEnabled","HideBidAdjustmentForBoost","locals","isExcluded","isCriterionExcluded","targetExcludeTemplate","bodyClasses","cashbackPercentControlView","CashbackPercentControlView","isParentLevel","setTimeout","row","validated","bidValue","BidMultiplier","BidAdjustment","Infinity","bidAdjustmentTemplate","SelectionStatus","audienceTargetColumn","getAdvancedTargetColumn","locationTargetColumn","companyTargetColumn","jobFunctionTargetColumn","industryTargetColumn","advancedTargetExcludedColumn","getTargetColumnByCriterionType","advancedBidAdjustmentColumn","cashbackPercentColumn","ageTarget","ageTargetLabel","ageSettingOptions","selections","labelKey","genderTarget","genderTargetLabel","genderSettingOptions","deviceTarget","DeviceName","DeviceCriterion","deviceTargetLabel","deviceSettingOptions","locationTarget","logoUrl","LogoUrl","industry","Size","companyTargetItemTemplate","tableClasses","dataSource","primaryKey","columns","getColumns","criterionsWithPagination","targetConstants","BaseTargetUpdateView","isSearchDSAShoppingAdgroupLevel","initializeWithTypes","criterionTypes","resourceName","onCriterionChanged","shouldShowPagination","isCashbackPercentValid","currentCriterions","fetchCriterions","grid","gridView","typeToOptions","ageOptions","genderOptions","Device","deviceOptions","typeToPath","orderedNames","orderedCriterions","isCurrent","fetchSingleCriterionType","bidAdjustmentControl","bidAdjPercentage","removeAttr","attr","bidAdj","rowData","itemOfElement","updateAsync","$cashbackPercentErrors","__","eq","getRealCashbackPercentValue","initializeAndRenderGrid","campaignBids","adgroupBids","deviceKeys","rowKeys","IsOriginalDeviceTargetingEnabled","device","osNames","os","deviceTypeOptions","bids","targetTypeToFilterProperty","OSName","isParentView","extractBids","parentCriterions","getDeviceTypeOptions","deviceTargetsUpdateView","OriginalDevice","showLevelToggle","handleCashbackPercentChange","getConfig","gridFactory","pgrid","vnext","use","paginationPlugin","a11yPlugin","plugins","a11y","pagination","pageSizeText","pageNumberLabelText","totalPageCountText","events","handleBidAdjustmentChange","BidAdjustmentControlView","bidAdjValue","getBidAdjustmentValue","pug","module","exports","pug_interp","pug_html","pug_mixins","locals_for_with","popupId","ariaLabelContext","arialLabelText","block","escape","optTgt","itemClassSelect","collapseId","shouldExpand","shouldCollapseClassName","optTgtTgBtn","$$obj","$$l","fBindQuery","pug_index0","link","recomendCache","setRecommendCache","convertRecommendAssetToImageExperience","imageAssetcenterCrop","convertAdUnitsToImageExperiences","adUnits","recommendAds","convertAdunitsToImageList"],"sourceRoot":""}