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oBAAqBjG,GACrBkG,wBAAsB,EACtBma,YAAaA,EACbuiC,cAAeA,EACfE,uBAAwBA,EACxBqC,6BAA2B,EAC3B7kC,oBAAkB,EAClB0gB,oBAAqBA,KAEvB7tE,EAAAA,EAAAA,KAACqlE,EAAAA,cAAa,CAAClvC,SAAUivC,EAAeA,EAAa1kE,KAAI,SAAAC,GAAK,OAAIA,EAAMwU,OAAO,IAAI,SAErFnV,EAAAA,EAAAA,KAAC0yC,EAAS,CACR/wC,KAAMA,EACN2jE,0BAA2B,WAAF,OAAQzkE,IAAAA,IAAM,EACvC8xC,IAAKwyB,EACLtyB,mBAAiB,EACjBC,oBAAqBjG,GACrBkG,wBAAsB,EACtBlkB,YAAaA,EACbg/C,oBAAqBA,QAGzB7tE,EAAAA,EAAAA,KAACyyC,GAAAA,EAAO,KACRzyC,EAAAA,EAAAA,KAAC4zF,GAAc,CACbC,OAtDK,WACbxoB,GACF,EAqDU5vC,KAAM,WAAF,OAAQA,IAAK,EAAM,EACvBq4D,qBAAsB,WAAF,OAAQr4D,IAAK,EAAK,UAKlD,EA4BAypC,GAAS9jE,aAAe,CACtBgkE,aAAc,KACdqqB,cAAe,CAAC,EAChBE,wBAAwB,EACxB/kB,mBAAmB,GAIrB,IAAM2qB,IAA2B5oB,EAAAA,EAAAA,KAAmB5qB,EAAAA,GAAAA,IAClDmjB,GACA,0B","sources":["../../../../component-react/packages/web-exclusions/src/exclusion-errors.js","../../../../component-react/packages/web-exclusions/src/ip-exclusions.js","../../../../component-react/packages/web-exclusions/src/styles/site-exclusion-note-style.js","../../../../component-react/packages/web-exclusions/src/site-exclusions-note.js","../../../../component-react/packages/web-exclusions/src/site-exclusions.js","../../../../component-react/packages/web-exclusions/src/web-exclusions.js","../../../../component-react/packages/web-exclusions/util/web-exclusions.util.ts","../../../../component-react/packages/web-exclusions/src/server-validated-web-exclusions.js","../../../../component-react/packages/web-exclusions/src/web-exclusions-section.js","../../../../component-react/packages/website-list-selector/src/types/exclusion-lists.tsx","../../../../component-react/packages/website-list-selector/src/custom-tag-item-renderer.tsx","../../../../component-react/packages/website-list-selector/src/utils.ts","../../../../component-react/packages/website-list-selector/src/types/api.ts","../../../../component-react/packages/website-list-selector/src/repository.ts","../../../../component-react/packages/website-list-selector/src/main.tsx","../../../../component-react/packages/with-props/src/with-props.js","../../../../component-react/packages/with-store-details/src/style.js","../../../../component-react/packages/with-store-details/src/with-store-from-provider-id.js","../../../../component-react/packages/with-store-details/src/shared.js","../../../../component-react/packages/with-store-details/src/with-store-url.js","../../../../component-react/packages/wizard-performance-marker/src/utils.js","../../../../component-react/packages/wizard-performance-marker/src/step-perf-marker.js","../../../../component-react/packages/wizard-performance-marker/src/wizard-perf-marker.js","../../../../component-react/packages/wizard-shared-components/src/utils/shared.js","../../../../component-react/packages/wizard-shared-components/src/components/name.js","../../../../component-react/packages/wizard-shared-components/src/utils/location-target-shared.js","../../../../component-react/packages/wizard-shared-components/src/components/specific-location-targets-editor.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/single-line-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/section-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/ad-schedule-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/radius-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/audience-signal-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/with-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/constants/error_entity.js","../../../../component-react/packages/wizard-shared-components/src/constants/default-data.js","../../../../component-react/packages/wizard-shared-components/src/constants/campaign-language.js","../../../../component-react/packages/wizard-shared-components/src/components/validated-campaign-name.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/campaign-name-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/panel-keys.js","../../../../component-react/packages/wizard-shared-components/src/components/validated-language-target.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/language-target-panel.js","../../../../component-react/packages/wizard-shared-components/src/utils/ad-schedule-shared.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/ad-schedule-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/single-language-target-panel.js","../../../../component-react/packages/wizard-shared-components/src/utils/use-localize-budget.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/budget-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/date-settings-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/shimmers/date-settings-shimmer.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/short-headlines-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/descriptions-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/images-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/conversion-based-bidding-banner.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/bid-strategy-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/url-options-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/sections/bid-value.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/bid-value-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/panels/app-details-panel.js","../../../../component-react/packages/wizard-shared-components/src/components/sections/audience-signal-section.js","../../../../component-react/packages/wizard-shared-components/src/utils/data-converter.js","../../../../component-react/packages/wizard-shared-components/src/utils/p$dadeRange.js","../../../../component-react/packages/wizard-shared-components/src/utils/conversion-goal-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/final-url-expansion-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/bid-budget-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/listing-group-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/store-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/search-themes-shared.js","../../../../component-react/packages/wizard-shared-components/src/utils/disclaimer-shared.js","../../../../component-react/packages/wizard-shared-components/src/constants/localization-keys.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/styles.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/cropped-preview.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/image-targets.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ad-preview.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/pagination.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/utl.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/add-image/add-image.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/populate-images.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/constants.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/validated-image-experience.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ad-panel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-container.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/validated-legacy-call-to-action.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/use-display-ads-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ad-panel-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/view-all-recommendations-panel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/carousel-style.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-suggestion-carousel.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/creative-workbench.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ratio-picker.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/create-another-ad-menu.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/create-ad-with-ai-dialog.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/use-create-ads.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-container-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/ad-editor.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/ad-components/display-ads-with-copilot.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/model/verified-tracking-setting.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/use-display-ads-repository.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/edit-ad-footer.js","../../../../component-react/packages/xandr-display-ads-campaign-shared-components/src/wizards/edit-display-ad-wizard.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/shared-components.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/styles.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-preview.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/add-video-button.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/carousel-style.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-suggestion-card.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-recommendations-panel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-ads-suggestion-carousel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/use-video-ads-copilot.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-metadata.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/bulk.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/bulk-upsert-errors.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/map-bulk-upsert-errors.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-detils-style.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/target-constants.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-constraints/targets-constraints.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/account-currency-daily-exchange-rate.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/deal-details.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/format-numbers.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/ad.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/ad-bulk.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/fetch-exchange-rate-mapping.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/common/utils.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/validated-video-experience.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/final-url.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-panel.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/page-manager.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/video-ads-container.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/model/deal.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-editor-footer.js","../../../../component-react/packages/xandr-video-campaign-shared-components/src/ad-components/ad-editor.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text } from '@bingads-webui-react/fabric-control';\r\n\r\nconst ErrorReason = ({ reason }) => (\r\n
\r\n {reason}\r\n
\r\n);\r\n\r\nErrorReason.propTypes = {\r\n reason: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const ExclusionErrors = ({ errors }) => (\r\n errors.map(error => (\r\n
\r\n {_.isEmpty(error.Value) ? : error.Value.map(value => (\r\n \r\n {value}:\r\n \r\n \r\n ))}\r\n
\r\n ))\r\n);\r\n\r\nExclusionErrors.propTypes = {\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nExclusionErrors.defaultProps = {\r\n errors: [],\r\n};\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TextField, Text, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { ExclusionErrors } from './exclusion-errors';\r\n\r\nconst textStyles = { root: { fontWeight: 600 } };\r\n\r\nexport const IpExclusions = ({\r\n exclusions, placeholder, handleExclusionInputChange, errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [exclusionList, setExclusionList] = useState(exclusions);\r\n\r\n useMemo(() => {\r\n setExclusionList(exclusions);\r\n }, [exclusions]);\r\n\r\n const handleExclusionTextFieldChange = useCallback(\r\n (input) => {\r\n setExclusionList(input.target.value);\r\n handleExclusionInputChange({ value: input.target.value, type: 'ExcludedIPs' });\r\n },\r\n [setExclusionList, handleExclusionInputChange]\r\n );\r\n\r\n return (\r\n
\r\n \r\n {i18n.getString(_TL_('IP address'))}\r\n \r\n \r\n\r\n \r\n {!placeholder && (\r\n {i18n.getString(_TL_('Enter IP addresses or a range of IP addresses that will be blocked from seeing your ad, one IP address per line.'))}\r\n )}\r\n \r\n\r\n {errors && errors.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nIpExclusions.propTypes = {\r\n exclusions: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string,\r\n handleExclusionInputChange: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nIpExclusions.defaultProps = {\r\n errors: [],\r\n placeholder: '',\r\n};\r\n","\r\nexport const getStyles = () => ({\r\n link: {\r\n paddingLeft: 10,\r\n },\r\n});\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { Link, Text } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarTitle, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { getStyles } from './styles/site-exclusion-note-style';\r\n\r\nconst SiteExclusionNoteBase = ({ level, siteMap }) => {\r\n const i18n = useContext(I18nContext);\r\n const path = getRoutePathById(siteMap, 'site-exclusion-lists-entrypoint');\r\n const classes = useDefaultStyles(getStyles);\r\n const { dynamic: { AWFWebExclusionsWarning: showAWFWarning } } = useContext(PermissionsContext);\r\n\r\n return (\r\n
\r\n \r\n \r\n {i18n.getString(_TL_('Note'))}\r\n {level === ScopeLevel.AdGroup ? (\r\n {showAWFWarning ? i18n.getString(_TL_('Add websites to exclude at the ad group level below. Any account-level website exclusion lists will also be applied to this ad group. Please note that Audience campaigns will always serve on Microsoft sites (e.g., Microsoft Bing, Microsoft Casual Games, MSN, and Outlook.com) even if you\\'ve added website exclusions for them.')) : i18n.getString(_TL_('Add websites to exclude at the ad group level below. Any account-level website exclusion lists will also be applied to this ad group.'))}\r\n ) : (\r\n {showAWFWarning ? i18n.getString(_TL_('Add websites to exclude at the campaign level below. Any account-level website exclusion lists will also be applied to this campaign. Please note that Audience campaigns will always serve on Microsoft sites (e.g., Microsoft Bing, Microsoft Casual Games, MSN, and Outlook.com) even if you\\'ve added website exclusions for them.')) : i18n.getString(_TL_('Add websites to exclude at the campaign level below. Any account-level website exclusion lists will also be applied to this campaign.'))}\r\n )}\r\n {path && (\r\n \r\n \r\n \r\n {i18n.getString(_TL_('View account-level website exclusion lists'))}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nSiteExclusionNoteBase.propTypes = {\r\n level: PropTypes.string.isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const SiteExclusionNote = withSiteMap(SiteExclusionNoteBase);\r\n","import React, { useState, useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TextField, Text, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { ExclusionErrors } from './exclusion-errors';\r\nimport { SiteExclusionNote } from './site-exclusions-note';\r\n\r\nconst textFieldStyles = { fieldGroup: { borderColor: '#D1D1D1' } };\r\nconst textStyles = { root: { fontWeight: 600 } };\r\n\r\nexport const SiteExclusions = ({\r\n level, placeholder, exclusions, readOnlyExclusions, handleExclusionInputChange, errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const [exclusionList, setExclusionList] = useState(exclusions);\r\n\r\n useMemo(() => {\r\n setExclusionList(exclusions);\r\n }, [exclusions]);\r\n\r\n const handleExclusionTextFieldChange = useCallback(\r\n (input) => {\r\n setExclusionList(input.target.value);\r\n handleExclusionInputChange({ value: input.target.value, type: 'ExcludedSites' });\r\n },\r\n [setExclusionList, handleExclusionInputChange]\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {i18n.getString(_TL_('Website'))}\r\n \r\n \r\n {!placeholder && (\r\n {i18n.getString(_TL_('Enter websites to exclude from showing your ads, one website per line.'))}\r\n )}\r\n \r\n\r\n {errors && errors.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n\r\n \r\n\r\n {level === ScopeLevel.AdGroup && (\r\n \r\n {i18n.getString(_TL_('Campaign-level website exclusions'))}\r\n \r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nSiteExclusions.propTypes = {\r\n level: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string,\r\n exclusions: PropTypes.string.isRequired,\r\n readOnlyExclusions: PropTypes.string,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n handleExclusionInputChange: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nSiteExclusions.defaultProps = {\r\n placeholder: '',\r\n readOnlyExclusions: '',\r\n errors: [],\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport {\r\n Accordion,\r\n AccordionItem,\r\n AccordionHeader,\r\n AccordionPanel,\r\n} from '@fluentui/react-components';\r\nimport { IpExclusions } from './ip-exclusions';\r\nimport { SiteExclusions } from './site-exclusions';\r\n\r\nexport const WebExclusions = ({\r\n showSiteExclusion,\r\n showIPExclusion,\r\n showAccordion,\r\n siteInputProps,\r\n ipInputProps,\r\n level,\r\n exclusionData,\r\n setExclusionsCallback,\r\n errors,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const siteExclusions =\r\n level === ScopeLevel.Campaign\r\n ? _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedSites'\r\n )\r\n : _.result(\r\n exclusionData && exclusionData.adgroupExclusions,\r\n 'ExcludedSites'\r\n ) || '';\r\n const campaignReadOnlySiteExclusions =\r\n level === ScopeLevel.AdGroup\r\n ? _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedSites'\r\n )\r\n : '';\r\n const ipExclusions =\r\n _.result(\r\n exclusionData && exclusionData.campaignExclusions,\r\n 'ExcludedIPs'\r\n ) || '';\r\n\r\n const hasSiteExclusionsErrors = errors.find(error => 'NegativeSitesResult' in error);\r\n const hasIpExclusionsErrors = errors.find(error => 'NegativeIPsResult' in error);\r\n\r\n const siteExclusionsError = hasSiteExclusionsErrors\r\n ? hasSiteExclusionsErrors.NegativeSitesResult\r\n : [];\r\n const ipExclusionsError = hasIpExclusionsErrors\r\n ? hasIpExclusionsErrors.NegativeIPsResult\r\n : [];\r\n\r\n const handleExclusionInputChange = ({ value, type }) => {\r\n setExclusionsCallback(value, type);\r\n };\r\n\r\n const siteExclusionsInput = (\r\n \r\n );\r\n\r\n const ipExclusionsInput = (\r\n \r\n );\r\n\r\n return (\r\n
\r\n {showAccordion ? (\r\n \r\n {showSiteExclusion && (\r\n \r\n {i18n.getString(_TL_('Add websites'))}\r\n \r\n {siteExclusionsInput}\r\n \r\n \r\n )}\r\n {showIPExclusion && (\r\n \r\n {i18n.getString(_TL_('Manually add IP addresses'))}\r\n \r\n {ipExclusionsInput}\r\n \r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {showSiteExclusion && siteExclusionsInput}\r\n {showIPExclusion && ipExclusionsInput}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nWebExclusions.propTypes = {\r\n showSiteExclusion: PropTypes.bool,\r\n showIPExclusion: PropTypes.bool,\r\n showAccordion: PropTypes.bool,\r\n siteInputProps: PropTypes.shape({}),\r\n ipInputProps: PropTypes.shape({}),\r\n level: PropTypes.string.isRequired,\r\n exclusionData: PropTypes.shape({}).isRequired,\r\n setExclusionsCallback: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n};\r\n\r\nWebExclusions.defaultProps = {\r\n showSiteExclusion: false,\r\n showIPExclusion: false,\r\n showAccordion: false,\r\n siteInputProps: {},\r\n ipInputProps: {},\r\n errors: [],\r\n};\r\n","import _ from 'underscore';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\n\r\nexport const entitySeparator = '-------------------------';\r\n\r\nexport const formatInvalidEntities = ({\r\n InvalidEntities,\r\n ValidEntities,\r\n}: {\r\n InvalidEntities: string[];\r\n ValidEntities: string[];\r\n}): string => _.compact(_.union(InvalidEntities, _.isEmpty(ValidEntities) ? [] : [entitySeparator], ValidEntities)).join('\\r\\n');\r\n\r\nconst getExclusionCount = exclusionData => _.compact(exclusionData.split(/\\r?\\n/)).length;\r\n\r\nexport const getSummary = (level, exclusionData, i18n) => {\r\n if (level === ScopeLevel.Campaign) {\r\n const siteExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedSites', '');\r\n const ipExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedIPs', '');\r\n const siteExclusionsCount = getExclusionCount(siteExclusions);\r\n const ipExclusionsCount = getExclusionCount(ipExclusions);\r\n return i18n.getString(_TL_('{{siteExclusionsCount}} website(s) excluded at the ad level. {{ipExclusionsCount}} IP address(es) excluded at the ad level.'), { siteExclusionsCount, ipExclusionsCount });\r\n }\r\n\r\n const siteExclusions = _.result(exclusionData && exclusionData.adgroupExclusions, 'ExcludedSites', '');\r\n const campaignReadOnlySiteExclusions = _.result(exclusionData && exclusionData.campaignExclusions, 'ExcludedSites', '');\r\n const adgroupLevelExclusionCount = getExclusionCount(siteExclusions);\r\n const campaignLevelExclusionCount = getExclusionCount(campaignReadOnlySiteExclusions);\r\n return i18n.getString(_TL_('{{adgroupLevelExclusionCount}} website(s) excluded at the ad level. {{campaignLevelExclusionCount}} website(s) excluded at the campaign level.'), { adgroupLevelExclusionCount, campaignLevelExclusionCount });\r\n};\r\n","import {\r\n withFormError,\r\n propertyIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport React from 'react';\r\nimport {\r\n FormErrorBeaconAdapter, ValidationBeaconAdapter,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { withAttentionBeacon } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport { WebExclusions } from './web-exclusions';\r\n\r\nexport const webExclusionPropertyVal = propertyIs('webExclusions');\r\n\r\nexport const ServerValidatedWebExclusions = withAttentionBeacon(\r\n withFormError(WebExclusions, { showError: false }),\r\n { Adapters: [FormErrorBeaconAdapter, ValidationBeaconAdapter] }\r\n);\r\n\r\nconst WebExclusionsInternal = ({\r\n updateValidation,\r\n parentData,\r\n level,\r\n ...rest\r\n}) => {\r\n const onChange = (exclusionsData, type) => {\r\n const keyName = level === ScopeLevel.Campaign ? 'campaignExclusions' : 'adgroupExclusions';\r\n const patchExclusions = {\r\n exclusions: {\r\n ...(parentData.exclusions || {}),\r\n [keyName]: {\r\n ...(parentData.exclusions && parentData.exclusions[keyName] ? parentData.exclusions[keyName] : {}),\r\n [type]: exclusionsData,\r\n },\r\n },\r\n };\r\n\r\n updateValidation([], patchExclusions);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst WebExclusionsWithValidation = withCustomValidation(WebExclusionsInternal);\r\n\r\nexport const ServerValidatedWebExclusionsWithValidation = withAttentionBeacon(\r\n withFormError(WebExclusionsWithValidation, { showError: false }),\r\n { Adapters: [FormErrorBeaconAdapter, ValidationBeaconAdapter] }\r\n);\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ServerValidatedWebExclusions, webExclusionPropertyVal } from './server-validated-web-exclusions';\r\nimport { getSummary } from '../util/web-exclusions.util';\r\nimport image from './media/website-exclusion.svg';\r\n\r\nexport const WebExclusionsSection = ({\r\n showSiteExclusion, showIPExclusion, level, exclusionData, setExclusionsCallback, errors, expand, ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'web-exclusions',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n {i18n.getString(_TL_('Which websites should not show your ads and which IP addresses should be blocked from seeing your ads?'))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nWebExclusionsSection.propTypes = {\r\n showSiteExclusion: PropTypes.bool,\r\n showIPExclusion: PropTypes.bool,\r\n level: PropTypes.string.isRequired,\r\n exclusionData: PropTypes.shape({}).isRequired,\r\n setExclusionsCallback: PropTypes.func.isRequired,\r\n errors: PropTypes.shape([]),\r\n expand: PropTypes.func.isRequired,\r\n};\r\n\r\nWebExclusionsSection.defaultProps = {\r\n showSiteExclusion: false,\r\n showIPExclusion: false,\r\n errors: [],\r\n};\r\n","export interface AccountPlacementExclusionList {\r\n ItemCount: number;\r\n AssociationCount: number;\r\n Id: number;\r\n Name: string;\r\n}\r\n\r\nexport type ListType = 'block' | 'allow';\r\n\r\nexport type CampaignType = 'Audience' | 'BrandAwarenessVideoAds' | 'Search' | 'Display' | number | null;\r\n\r\nexport interface ListSelectorProps {\r\n listType: ListType\r\n selected?: AccountPlacementExclusionList[]\r\n onChange: (selected: any[]) => void\r\n}\r\n\r\nexport const TEXT_CONTENT = {\r\n description: {\r\n block: _TL_('Add website exclusion lists to your campaign to help prevent your ads from being shown on certain websites. Note: You can create, edit, and view account-level lists in your Website control lists.'),\r\n allow: _TL_('Adding allowed website lists to this campaign is optional. This option helps you specify sites where you want your ads to appear, giving you more control over ad placement while still maintaining broader distribution across other sites.'),\r\n },\r\n listLabel: {\r\n block: _TL_('Blocked Lists'),\r\n allow: _TL_('Allowed Lists'),\r\n },\r\n ariaLabel: {\r\n block: _TL_('Select blocked website lists'),\r\n allow: _TL_('Select allowed website lists'),\r\n },\r\n};\r\n","\r\nimport React from 'react';\r\nimport { makeStyles, tokens, Text, makeStaticStyles } from '@fluentui/react-components';\r\n\r\nexport const useTagContentStyles = makeStyles({\r\n Text: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n },\r\n List: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n alignItems: 'center',\r\n display: 'flex',\r\n columnGap: tokens.spacingHorizontalXS,\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n ListItem: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n Container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n ButtonContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n columnGap: tokens.spacingHorizontalL,\r\n width: 'fit-content',\r\n },\r\n MessageBar: {\r\n width: 'fit-content',\r\n },\r\n PopoverContentBefore: {\r\n fontWeight: tokens.fontWeightSemibold,\r\n paddingLeft: tokens.spacingHorizontalS,\r\n },\r\n EntitySelector: {\r\n maxWidth: '100%',\r\n marginTop: tokens.spacingVerticalS,\r\n },\r\n});\r\n\r\nconst useStaticStyles = makeStaticStyles({\r\n '.entities-collection-container': {\r\n maxWidth: '630px',\r\n },\r\n});\r\n\r\nexport const CustomWebsiteListTagItemRenderer: React.FC<{content: string}> = ({ content }) => {\r\n useStaticStyles();\r\n const classes = useTagContentStyles();\r\n return (\r\n \r\n {content}\r\n \r\n );\r\n};\r\n","import { RequestMethod, ServerContext } from './types/api';\r\n\r\nexport const callMT = async (\r\n url: string,\r\n method: RequestMethod,\r\n body: any,\r\n headers\r\n) => {\r\n const response = await fetch(url, {\r\n method,\r\n body: JSON.stringify(body),\r\n headers,\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok');\r\n }\r\n\r\n return response.json();\r\n};\r\n\r\nexport const getHeadersRequestByServerContext = (serverContext: ServerContext) => ({\r\n 'Content-Type': 'application/json',\r\n lcid: serverContext.CurrentUser.Locale,\r\n 'x-ms-clientapplication': 'bingadsweb',\r\n 'x-ms-applicationname': 'bingadsweb',\r\n 'x-ms-pagetrackingid': serverContext.PageTrackingId,\r\n Authorization: `CCMTSmallToken ${serverContext.Token}`,\r\n CustomerAccountId: serverContext.CurrentAccount.Id,\r\n CustomerId: serverContext.CurrentAccount.AdvertiserCustomerID,\r\n});\r\n","export interface ServerContext {\r\n CurrentAccount: {\r\n Id: number;\r\n AdvertiserCustomerID: number;\r\n };\r\n CurrentUser: {\r\n Locale: string;\r\n };\r\n PageTrackingId: string;\r\n ServicesEndpoints: {\r\n CmAPI: string;\r\n };\r\n Token: string;\r\n}\r\nexport interface SharedEntity {\r\n Id: number;\r\n Name: string;\r\n Description: string;\r\n Type: string;\r\n Scope: string;\r\n}\r\nexport interface BatchErrors {\r\n Index: number;\r\n Message: string;\r\n}\r\nexport interface SharedEntityAssociation {\r\n EntityId: number;\r\n EntityType: 'Campaign' | 'Account';\r\n SharedEntityId: number; // AccountPlacementExclusionListId\r\n SharedEntityType: 'AccountPlacementExclusionList';\r\n SharedEntityCustomerId?: number; // Ignore for account level\r\n}\r\nexport interface SetSharedEntityAssociationsRequest {\r\n Associations: SharedEntityAssociation[];\r\n SharedEntityScope: string;\r\n}\r\nexport interface GetSharedEntitiesRequest {\r\n SharedEntityScope: string;\r\n SharedEntityType: string;\r\n SharedEntityId: number;\r\n}\r\nexport interface GetSharedEntitiesResponse {\r\n SharedEntities: SharedEntity[];\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface SetSharedEntityAssociationsResponse {\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface DeleteSharedEntityAssociationsRequest {\r\n Associations: SharedEntityAssociation[];\r\n SharedEntityScope: string;\r\n}\r\nexport interface DeleteSharedEntityAssociationsResponse {\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport interface GetSharedEntityAssociationsByEntityIdsRequest {\r\n EntityIds: number[];\r\n EntityType: string;\r\n SharedEntityScope: string;\r\n SharedEntityType: string;\r\n}\r\nexport interface GetSharedEntityAssociationsByEntityIdsResponse {\r\n Associations: SharedEntityAssociation[];\r\n PartialErrors?: BatchErrors[];\r\n}\r\nexport enum RequestMethod {\r\n Post = 'POST',\r\n Delete = 'DELETE'\r\n}\r\n","import { getHeadersRequestByServerContext, callMT } from './utils';\r\nimport {\r\n RequestMethod,\r\n ServerContext,\r\n GetSharedEntitiesResponse,\r\n GetSharedEntitiesRequest,\r\n SetSharedEntityAssociationsResponse,\r\n SetSharedEntityAssociationsRequest,\r\n DeleteSharedEntityAssociationsResponse,\r\n DeleteSharedEntityAssociationsRequest,\r\n GetSharedEntityAssociationsByEntityIdsResponse,\r\n GetSharedEntityAssociationsByEntityIdsRequest,\r\n SharedEntity,\r\n} from './types/api';\r\n\r\nclass WebsiteListSelectorRepository {\r\n async getListsByAccountId(serverContext = {} as ServerContext): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: GetSharedEntitiesRequest = {\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityId: headers.CustomerAccountId,\r\n };\r\n\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntities/Query`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async associateListsToCampaign(\r\n serverContext = {} as ServerContext,\r\n lists: SharedEntity[],\r\n campaignId: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n\r\n const previousAssociations = await this.getListsByCampaignId(serverContext, campaignId);\r\n\r\n // Convert arrays to sets for easier comparison\r\n const previousSet = new Set(previousAssociations.map(({ Id }) => Id));\r\n const newSet = new Set(lists.map(({ Id }) => Id));\r\n\r\n // Find ids in previous associations but not in new associations\r\n const removedAssociations = Array.from(previousSet).filter(id => !newSet.has(id));\r\n\r\n // Find ids in new associations but not in previous associations\r\n const newAssociations = Array.from(newSet).filter(id => !previousSet.has(id));\r\n\r\n // Delete associations that are not in the new list\r\n await this.deleteListAssociationsByAccountId(serverContext, removedAssociations, campaignId);\r\n\r\n // if there are no new associations, return early\r\n if (newAssociations.length === 0) {\r\n return {};\r\n }\r\n\r\n const body: SetSharedEntityAssociationsRequest = {\r\n SharedEntityScope: 'Account',\r\n Associations: newAssociations.map(id => ({\r\n SharedEntityId: id,\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityScope: 'Account',\r\n EntityId: campaignId,\r\n EntityType: 'Campaign',\r\n })),\r\n };\r\n\r\n // Create new associations\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations/Set`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async deleteListAssociationsByAccountId(\r\n serverContext = {} as ServerContext,\r\n lists: number[],\r\n campaignId: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: DeleteSharedEntityAssociationsRequest = {\r\n SharedEntityScope: 'Account',\r\n Associations: lists.map(id => ({\r\n SharedEntityId: id,\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n EntityId: campaignId,\r\n EntityType: 'Campaign',\r\n })),\r\n };\r\n\r\n return callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations`,\r\n RequestMethod.Delete,\r\n body,\r\n headers\r\n );\r\n }\r\n\r\n async getListsByCampaignId(\r\n serverContext = {} as ServerContext,\r\n payload: number\r\n ): Promise {\r\n const headers = getHeadersRequestByServerContext(serverContext);\r\n const body: GetSharedEntityAssociationsByEntityIdsRequest = {\r\n EntityIds: [payload],\r\n EntityType: 'Campaign',\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n };\r\n\r\n const associated: GetSharedEntityAssociationsByEntityIdsResponse = await callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntityAssociations/QueryByEntityIds`,\r\n RequestMethod.Post,\r\n body,\r\n headers\r\n );\r\n\r\n const queryBody: GetSharedEntitiesRequest = {\r\n SharedEntityScope: 'Account',\r\n SharedEntityType: 'AccountPlacementExclusionList',\r\n SharedEntityId: associated.Associations[0].EntityId,\r\n };\r\n\r\n const entities: GetSharedEntitiesResponse = await callMT(\r\n `${serverContext.ServicesEndpoints?.CmAPI}v13/SharedEntities/Query`,\r\n RequestMethod.Post,\r\n queryBody,\r\n headers\r\n );\r\n\r\n return associated.Associations.map(item =>\r\n entities.SharedEntities.find(entity => entity.Id === item.SharedEntityId) || { Id: item.SharedEntityId } as SharedEntity);\r\n }\r\n}\r\n\r\nexport const repository = new WebsiteListSelectorRepository();\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { ServerEntitySelectorInline } from '@bingads-webui-fluent-component/entity-selector';\r\nimport { Text, Label } from '@fluentui/react-components';\r\nimport { Info16Regular } from '@fluentui/react-icons';\r\nimport { ListSelectorProps, TEXT_CONTENT } from './types/exclusion-lists';\r\nimport { CustomWebsiteListTagItemRenderer, useTagContentStyles } from './custom-tag-item-renderer';\r\nimport { repository } from './repository';\r\n\r\nexport const WebsiteListSelector = ({ listType, selected, onChange }: ListSelectorProps) => {\r\n const i18n: any = useContext(I18nContext);\r\n const serverContext: any = useContext(ServerContext);\r\n const classes = useTagContentStyles();\r\n\r\n const fetchData = () => repository.getListsByAccountId(serverContext).then(response => ({\r\n count: response.SharedEntities?.length || 0,\r\n items: (response.SharedEntities || []).map(item => ({\r\n ...item,\r\n // selection tree requires those props\r\n value: item.Id,\r\n content: item.Name,\r\n })),\r\n }));\r\n\r\n const renderItemContent = flatItem => (\r\n
\r\n \r\n {flatItem.Name}\r\n \r\n \r\n {flatItem.ItemCount}{' '}{i18n.getString(_TL_('websites'))}\r\n \r\n
\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n {`${i18n.getString(_TL_('Lists'))} (${selected?.length})`}\r\n \r\n \r\n
\r\n\r\n item?.Name.toLowerCase().includes(search.toLowerCase())}\r\n selectionMode=\"multiselect\"\r\n onRenderTagContent={CustomWebsiteListTagItemRenderer}\r\n onRenderItemContent={renderItemContent}\r\n popOverContentBefore={{i18n.getString(TEXT_CONTENT.listLabel[listType])}}\r\n aria-label={i18n.getString(TEXT_CONTENT.ariaLabel[listType])}\r\n />\r\n
\r\n );\r\n};\r\n\r\nWebsiteListSelector.defaultProps = {\r\n listType: 'block',\r\n selected: [],\r\n onChange: () => { },\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nexport const withProps = (extraProps, WrappedComponent) => {\r\n const HoC = (props) => {\r\n const finalProps = _.isFunction(extraProps) ?\r\n extraProps(props) :\r\n _.extend({}, props, extraProps);\r\n return (\r\n \r\n );\r\n };\r\n\r\n HoC.displayName = `WithProps(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","export const getStyles = () => ({\r\n withStoreLoadingContainer: {\r\n minHeight: 84,\r\n '& .loading': {\r\n paddingTop: 30,\r\n },\r\n },\r\n withStoreErrorContainer: {\r\n paddingTop: 10,\r\n '& .alert': {\r\n alignItems: 'center',\r\n padding: [4, 16, 4, 12],\r\n\r\n '& .alert-image:before': {\r\n lineHeight: '32px',\r\n },\r\n\r\n '& .alert__content': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexGrow: 1,\r\n alignItems: 'center',\r\n },\r\n\r\n '& .alert__action': {\r\n marginLeft: 'auto',\r\n marginTop: 'unset',\r\n },\r\n },\r\n UrlContainer: {\r\n width: '435px',\r\n '& .store-url-text-container': {\r\n marginBottom: '10px',\r\n },\r\n },\r\n MobileUrlContainer: {\r\n width: '435px',\r\n marginTop: '20px',\r\n },\r\n },\r\n});\r\n\r\n","import { noop, isArray, some } from 'underscore';\r\nimport React, { useState, useEffect, useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { getStoreQueriesWithLocalMock } from '@bingads-webui-campaign-react/merchant-shared';\r\nimport { Loading } from '@bingads-webui-campaign-react/loading';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getStyles } from './style';\r\n\r\nconst storeFormattedText = (providerId, getStoreResponse) => (getStoreResponse ? `ID: ${getStoreResponse.Id}, Name: ${getStoreResponse.Name}` : `ID: ${providerId}`);\r\n\r\nconst isStoreNotFoundFetchError = storeFetchError =>\r\n storeFetchError && isArray(storeFetchError.raw) && some(storeFetchError.raw, ({ ErrorCode }) => ErrorCode === 'StoreNotFoundErr');\r\n\r\nconst createStoreDetails = (providerId, getStoreResponse) => ({\r\n id: providerId,\r\n name: getStoreResponse && getStoreResponse.Name,\r\n storeUrl: getStoreResponse && getStoreResponse.DestinationUrl,\r\n text: storeFormattedText(providerId, getStoreResponse),\r\n});\r\n\r\nexport function withStoreFromProviderId(WrappedComponent) {\r\n const HOC = (props) => {\r\n const {\r\n i18n,\r\n providerId,\r\n updateValidation,\r\n } = props;\r\n\r\n const [storeFetchState, setStoreFetchState] = useState({ fetchComplete: !providerId, storeDetails: null });\r\n const activity = useContext(ActivityContext);\r\n\r\n const storeQueries = useMemo(() => getStoreQueriesWithLocalMock(), []);\r\n\r\n useEffect(() => {\r\n if (providerId) {\r\n updateValidation(['store load in progress'], null, false /* shouldDirty */);\r\n storeQueries.getStore(providerId, true /* withCache */).then(\r\n (getStoreResponse) => {\r\n updateValidation([], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, storeDetails: createStoreDetails(providerId, getStoreResponse) });\r\n },\r\n (getStoreError) => {\r\n if (isStoreNotFoundFetchError(getStoreError)) {\r\n // deleted store and draft (placeholder) store scenarios will both return StoreNotFoundErr - we still return store details\r\n // with the information we have.\r\n if (activity) {\r\n activity.trace(`Store was not found for Store ID: ${providerId}`);\r\n }\r\n\r\n updateValidation([], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, storeDetails: createStoreDetails(providerId) });\r\n } else {\r\n if (activity) {\r\n activity.error(`Store load failed: ${getStoreError instanceof Error ? getStoreError : JSON.stringify(getStoreError)}`);\r\n }\r\n // TODO: This needs to be imporoved. Currently setting empty validation message to mar invalid but\r\n // to avoid showing message in withError HOC since this wrapper has it's own error message for load failure.\r\n updateValidation([''], null, false /* shouldDirty */);\r\n setStoreFetchState({ fetchComplete: true, getStoreError });\r\n }\r\n }\r\n );\r\n }\r\n }, [activity, providerId, storeQueries, updateValidation]);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const loadingSpinner = useMemo(() => (\r\n
\r\n \r\n
\r\n ), [classes.withStoreLoadingContainer, i18n]);\r\n\r\n const loadingError = useMemo(() => (\r\n
\r\n )}\r\n dismissible={false}\r\n />\r\n
\r\n ), [classes.withStoreErrorContainer, i18n]);\r\n\r\n if (providerId && !storeFetchState.fetchComplete) {\r\n return loadingSpinner;\r\n }\r\n\r\n if (providerId && storeFetchState.fetchComplete && storeFetchState.getStoreError) {\r\n return loadingError;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n providerId: PropTypes.number,\r\n updateValidation: PropTypes.func,\r\n };\r\n\r\n HOC.defaultProps = {\r\n providerId: undefined,\r\n updateValidation: noop,\r\n };\r\n\r\n HOC.displayName = `withStoreFromProviderId(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n\r\n return HOC;\r\n}\r\n","\r\nexport const getTopLevelDomainFromUrl = (url) => {\r\n const hostNameParts = new URL(url).hostname.split('.');\r\n const partCount = hostNameParts.length;\r\n\r\n if (partCount >= 2) {\r\n const ccTldSpecified = partCount >= 3 && (hostNameParts[partCount - 2].length === 3 || hostNameParts[partCount - 2].length === 2) && hostNameParts[partCount - 1].length === 2;\r\n return ccTldSpecified ?\r\n `${hostNameParts[partCount - 3]}.${hostNameParts[partCount - 2]}.${hostNameParts[partCount - 1]}` :\r\n `${hostNameParts[partCount - 2]}.${hostNameParts[partCount - 1]}`;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const isFinalUrlAlignedWithStoreDomain = (finalUrl, storeDomain) => {\r\n const finalUrlDomain = getTopLevelDomainFromUrl(finalUrl);\r\n return finalUrlDomain && storeDomain && finalUrlDomain.toLowerCase() === storeDomain.toLowerCase();\r\n};\r\n\r\n","import React, { useRef, useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop, result } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { Text } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { isFinalUrlAlignedWithStoreDomain, getTopLevelDomainFromUrl } from './shared';\r\nimport { getStyles } from './style';\r\n\r\nexport function withStoreUrl(WrappedComponent) {\r\n const HOC = (props) => {\r\n const {\r\n i18n,\r\n validationProps,\r\n updateValidation,\r\n storeDetails,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n const storeDetailsInternal = useRef(null);\r\n\r\n useMemo(() => {\r\n const storeUrl = storeDetails && storeDetails.storeUrl;\r\n if (storeUrl) {\r\n const storeDomain = getTopLevelDomainFromUrl(storeUrl);\r\n storeDetailsInternal.current = { url: storeUrl, domain: storeDomain };\r\n }\r\n }, [storeDetails]);\r\n\r\n const validationOnUrlChange = useCallback((value) => {\r\n const storeDomain = result(storeDetailsInternal.current, 'domain', null);\r\n let finalUrlValidatorError;\r\n if (storeDomain) {\r\n finalUrlValidatorError = isFinalUrlAlignedWithStoreDomain(value, storeDomain) ?\r\n null :\r\n i18n.getString(_TL_('Final URL domain does not match merchant center store URL'));\r\n }\r\n return finalUrlValidatorError;\r\n }, [i18n]);\r\n\r\n const storeUrl = result(storeDetailsInternal.current, 'url', null);\r\n const storeUrlText = useMemo(() => (storeUrl &&\r\n
\r\n { i18n.getString(_TL_('Merchant center store URL: {{storeUrl}}'), { storeUrl }) }\r\n
\r\n ), [i18n, storeUrl]);\r\n\r\n return (\r\n \r\n
\r\n {storeUrlText}\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n providerId: PropTypes.number,\r\n updateValidation: PropTypes.func,\r\n storeDetails: PropTypes.shape({\r\n storeUrl: PropTypes.string,\r\n }),\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n updateOnMount: PropTypes.bool,\r\n }).isRequired,\r\n };\r\n\r\n HOC.defaultProps = {\r\n providerId: undefined,\r\n updateValidation: noop,\r\n storeDetails: undefined,\r\n };\r\n\r\n HOC.displayName = `withStoreUrl(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n\r\n return HOC;\r\n}\r\n","import { createContext } from 'react';\r\n\r\nexport const STEP_STATE = {\r\n AUTO: 'AUTO',\r\n MANUAL: 'MANUAL',\r\n};\r\n\r\nexport const WizardPerfMarkerContext = createContext({});\r\n","import _ from 'underscore';\r\nimport { useEffect, useRef, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { STEP_STATES, useWizardService } from '@bingads-webui-react/wizard-core';\r\nimport { WizardPerfMarkerContext } from './utils';\r\n\r\nexport const StepPerfMarker = ({ parentPerfMarker, markerName }) => {\r\n const stepPerfMarkerRef = useRef(null);\r\n const { register = _.noop, unregister = _.noop } = useContext(WizardPerfMarkerContext);\r\n\r\n const { state } = useWizardService();\r\n const currentStepFullState = state.toStrings()[1] || '';\r\n const currentStepState = currentStepFullState.split('.')[1];\r\n\r\n useEffect(() => {\r\n if (parentPerfMarker) {\r\n stepPerfMarkerRef.current = parentPerfMarker.createChild(markerName, { autoEnd: false });\r\n register();\r\n }\r\n\r\n return () => {\r\n stepPerfMarkerRef.current = null;\r\n unregister();\r\n };\r\n }, [markerName, parentPerfMarker, register, unregister]);\r\n\r\n const handleStepStateChange = useCallback(\r\n () => {\r\n if (!stepPerfMarkerRef.current) {\r\n return;\r\n }\r\n\r\n if (currentStepState === STEP_STATES.FETCHING) {\r\n stepPerfMarkerRef.current.willFetchFile();\r\n } else if (currentStepState === STEP_STATES.LOADING) {\r\n stepPerfMarkerRef.current.willInit();\r\n } else if (currentStepState === STEP_STATES.ACTIVE) {\r\n stepPerfMarkerRef.current.willRender();\r\n setTimeout(() => {\r\n stepPerfMarkerRef.current && stepPerfMarkerRef.current.done();\r\n }, 0);\r\n }\r\n },\r\n [currentStepState]\r\n );\r\n\r\n useEffect(\r\n () => {\r\n handleStepStateChange();\r\n },\r\n [handleStepStateChange]\r\n );\r\n\r\n return null;\r\n};\r\n\r\nStepPerfMarker.propTypes = {\r\n markerName: PropTypes.string.isRequired,\r\n parentPerfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","\r\nimport PropTypes from 'prop-types';\r\nimport React, { useContext, useCallback, useRef } from 'react';\r\nimport { getCurrentStepId, useWizardService } from '@bingads-webui-react/wizard-core';\r\nimport { StepPerfMarker } from './step-perf-marker';\r\nimport { STEP_STATE, WizardPerfMarkerContext } from './utils';\r\n\r\nexport const WizardPerfMarker = ({ wizardName, wizardMarker, children }) => {\r\n const { state } = useWizardService();\r\n const wizardPerfMarkerContext = useContext(WizardPerfMarkerContext);\r\n const currentStepId = getCurrentStepId(state);\r\n const currentStep = `${wizardName}_${currentStepId}`;\r\n const perfMarkerRef = useRef(currentStep);\r\n\r\n const checkAndCreateChildMarker = useCallback(() => {\r\n if (!wizardPerfMarkerContext[currentStep] ||\r\n (wizardPerfMarkerContext[currentStep] === STEP_STATE.AUTO && currentStep === perfMarkerRef.current)) {\r\n wizardPerfMarkerContext[currentStep] = STEP_STATE.AUTO;\r\n return ;\r\n }\r\n perfMarkerRef.current = currentStep;\r\n return null;\r\n }, [currentStep, wizardMarker, wizardPerfMarkerContext]);\r\n\r\n const register = useCallback(() => {\r\n if (wizardPerfMarkerContext[currentStep] !== STEP_STATE.AUTO) {\r\n wizardPerfMarkerContext[currentStep] = STEP_STATE.MANUAL;\r\n }\r\n }, [currentStep, wizardPerfMarkerContext]);\r\n\r\n const unregister = useCallback(() => {\r\n delete wizardPerfMarkerContext[currentStep];\r\n }, [currentStep, wizardPerfMarkerContext]);\r\n\r\n return (\r\n \r\n {checkAndCreateChildMarker()}\r\n {children}\r\n \r\n );\r\n};\r\n\r\nWizardPerfMarker.propTypes = {\r\n wizardName: PropTypes.string.isRequired,\r\n wizardMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n }).isRequired,\r\n children: PropTypes.node.isRequired,\r\n};\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack, Text } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const ErrorString = ({\r\n error,\r\n}) => (\r\n \r\n {error}\r\n \r\n);\r\n\r\nErrorString.propTypes = {\r\n error: PropTypes.string,\r\n};\r\nErrorString.defaultProps = {\r\n error: '',\r\n};\r\n\r\nexport const Errors = ({\r\n errors,\r\n}) => (\r\n
\r\n {errors && errors.map(error => ErrorString({ error }))}\r\n
\r\n);\r\n\r\nErrors.propTypes = {\r\n errors: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nexport const SpanWithComponent = ({\r\n SpanText,\r\n Component,\r\n}) => (\r\n \r\n {SpanText}\r\n \r\n \r\n);\r\n\r\nSpanWithComponent.propTypes = {\r\n Component: PropTypes.func.isRequired,\r\n SpanText: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,\r\n};\r\n\r\nexport const withVerticalAlignCenterSpan = Component => (\r\n props,\r\n defaultRender\r\n) => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst nameErrorCode = {\r\n RequiredField: 'RequiredField',\r\n ExceedLength: 'ExceedLength',\r\n};\r\n\r\nexport const getNameErrorMsg = ({ code, i18n, maxLength }) => {\r\n switch (code) {\r\n case nameErrorCode.RequiredField:\r\n return i18n.getString(_TL_('Required field'));\r\n case nameErrorCode.ExceedLength:\r\n return i18n.getString(_TL_('Field should not exceed {{number}} characters'), { number: maxLength });\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const validateName = ({ name, maxLength }) => {\r\n let error = null;\r\n if (name == null || name === '') {\r\n error = nameErrorCode.RequiredField;\r\n } else if (name && name.length > maxLength) {\r\n error = nameErrorCode.ExceedLength;\r\n }\r\n return error;\r\n};\r\n\r\nexport const checkShouldShowError = attribute => attribute.isInvalid || attribute.isDirty;\r\nexport const checkShouldShowErrors = attribute => (attribute.errors && attribute.errors.length > 0);\r\n","import React, { useContext } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { TextField } from '@bingads-webui-react/fabric-control';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withVerticalAlignCenterSpan, ErrorString, getNameErrorMsg, validateName, checkShouldShowError, checkShouldShowErrors, Errors } from '../utils/shared';\r\n\r\nconst maxLength = 128;\r\n\r\nexport const isCampaignNameValid = name => validateName({ name, maxLength }) == null;\r\n\r\nexport const defaultName = undefined;\r\n\r\nexport const CampaignName = React.memo((props) => {\r\n const {\r\n name,\r\n setName,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const campaingNameText = i18n.getString(_TL_('Campaign name'));\r\n const error = name.error ? name.error : getNameErrorMsg({ code: validateName({ name: name.value, maxLength }), i18n, maxLength });\r\n const shouldShowError = checkShouldShowError(name);\r\n return (\r\n
\r\n ())}\r\n onChange={(e, value) => {\r\n setName({\r\n value,\r\n isDirty: true,\r\n isInvalid: isCampaignNameValid(value) !== true,\r\n });\r\n }}\r\n styles={{ fieldGroup: { width: 461, marginTop: '8px' } }}\r\n />\r\n {shouldShowError && error && }\r\n {checkShouldShowErrors(name) && x.message)} />}\r\n
\r\n );\r\n});\r\n\r\nCampaignName.propTypes = {\r\n name: PropTypes.shape({}),\r\n setName: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaignName.defaultProps = {\r\n name: {\r\n value: undefined,\r\n isDirty: false,\r\n isInvalid: false,\r\n },\r\n};\r\n","import { LocalizationKeys } from '../constants/localization-keys';\r\n\r\nexport const locationTargetsOptionKeys = {\r\n everywhere: 'everywhere',\r\n specific: 'specific',\r\n bundleOrDefaultMarket: 'bundle',\r\n};\r\n\r\nexport const getLocationsString = (i18n, settings, isAdGroupLevel = false, bidStrategyType, hideBid = false) => {\r\n if (settings == null) {\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n const {\r\n targetOption,\r\n currentLocations = [],\r\n } = settings;\r\n\r\n let isTargetEverywhere = targetOption === locationTargetsOptionKeys.everywhere;\r\n if (isAdGroupLevel) {\r\n isTargetEverywhere = currentLocations.length === 0;\r\n }\r\n\r\n if (isTargetEverywhere) {\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n let details = '';\r\n let includedLocations = currentLocations.filter(x => x.SelectionStatus === 'Included');\r\n const excludedLocations = currentLocations.filter(x => x.SelectionStatus === 'Excluded');\r\n if (bidStrategyType === 'Commission') {\r\n includedLocations = [];\r\n }\r\n if (includedLocations.length) {\r\n details += `${i18n.getString(_TL_('Included locations: '))}`;\r\n includedLocations.forEach((target, index) => {\r\n details += target.location;\r\n if (!hideBid) {\r\n details += `: ${i18n.getString(LocalizationKeys[target.bidAdjustmentDropdown])}`;\r\n details += `: ${target.bidAdjustmentInput}%`;\r\n }\r\n if (index < includedLocations.length - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n if (excludedLocations.length) {\r\n if (includedLocations.length) {\r\n details += ', ';\r\n }\r\n details += `${i18n.getString(_TL_('Excluded locations: '))}`;\r\n excludedLocations.forEach((target, index) => {\r\n details += target.location;\r\n if (index < excludedLocations.length - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n return details;\r\n};\r\n\r\nexport const getLocationTargetTitleDetails = (i18n, location, isAdGroupLevel, bidStrategyType, hideBid = false) => {\r\n if (!location) return '';\r\n const {\r\n parentLevelSettings,\r\n currentLevelSettings,\r\n useParentLevel,\r\n } = location;\r\n\r\n if (useParentLevel) {\r\n if (isAdGroupLevel) {\r\n return getLocationsString(i18n, parentLevelSettings, isAdGroupLevel, bidStrategyType, hideBid);\r\n }\r\n return i18n.getString(_TL_('Targeting everywhere.'));\r\n }\r\n\r\n return getLocationsString(i18n, currentLevelSettings, isAdGroupLevel, bidStrategyType, hideBid);\r\n};\r\n\r\nexport const mergeLocations = (includedLocations, excludedLocations, targetedLocations) => {\r\n let conflictingCount = 0;\r\n let duplicateCount = 0;\r\n\r\n // Create Sets of existing location IDs for efficient lookup\r\n const includedLocationIds = new Set(includedLocations.map(loc => loc.location.Id));\r\n const excludedLocationIds = new Set(excludedLocations.map(loc => loc.location.Id));\r\n\r\n const newIncludedLocations = [];\r\n const newExcludedLocations = [];\r\n\r\n // Process targeted included locations\r\n targetedLocations.includedLocations.forEach((loc) => {\r\n const locId = loc.location.Id;\r\n if (excludedLocationIds.has(locId)) {\r\n conflictingCount += 1;\r\n } else if (includedLocationIds.has(locId)) {\r\n duplicateCount += 1;\r\n } else {\r\n newIncludedLocations.push(loc);\r\n }\r\n });\r\n\r\n // Process targeted excluded locations\r\n targetedLocations.excludedLocations.forEach((loc) => {\r\n const locId = loc.location.Id;\r\n if (includedLocationIds.has(locId)) {\r\n conflictingCount += 1;\r\n } else if (excludedLocationIds.has(locId)) {\r\n duplicateCount += 1;\r\n } else {\r\n newExcludedLocations.push(loc);\r\n }\r\n });\r\n\r\n return {\r\n includedLocations: [...includedLocations, ...newIncludedLocations],\r\n excludedLocations: [...excludedLocations, ...newExcludedLocations],\r\n conflictingCount,\r\n duplicateCount,\r\n };\r\n};\r\n","import React, { useContext, useCallback, useMemo, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n LocationTargetsEditor as BingMapsLocationTargetsEditor,\r\n isLegacyLocationAndRadiusEqual,\r\n BingMapsContextProvider,\r\n getIsRadiusTarget as defaultGetIsRadiusTarget,\r\n TARGETING_TYPE,\r\n} from '@bingads-webui-react/bing-maps';\r\nimport { BulkLocationsSearchProvider, BulkLocationsSearchDrawer } from '@bingads-webui-react/bulk-locations-search';\r\nimport { Dismiss24Regular } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n Toaster,\r\n useToastController,\r\n ToastTitle,\r\n Toast,\r\n ToastTrigger,\r\n ToastBody,\r\n} from '@fluentui/react-toast';\r\nimport { Button } from '@fluentui/react-components';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { mergeLocations } from '../utils/location-target-shared';\r\n\r\n\r\n// reference: private/new-expert-signup/packages/expert-location-target/src/with-bing-maps-context-provider.js\r\nconst BING_MAPS_API_KEY = 'AgRuCtepgsuuCYV9J6S6w1j8ay2JJwnu8f5EPgv4kkoJoIuka8yui-NzKrvlESTQ';\r\n\r\nconst toasterId = 'bulkLocationsSearchToasterID';\r\n\r\nexport const SpecificLocationTargetsEditor = (props) => {\r\n const {\r\n data,\r\n setData,\r\n edmCampaign,\r\n allowPositiveLocationTargeting,\r\n allowNegativeLocationTargeting,\r\n showSearchTypeOptions,\r\n strings,\r\n scope,\r\n defaultSelectedSearchType,\r\n isBrandAwarenessCampaignScenario,\r\n showBulkLocations,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const mapRef = useRef();\r\n const mapBulkLocationsRef = useRef();\r\n const [isDrawerOpen, setIsBulkLocationsSearchDrawerOpen] = useState(false);\r\n const { dispatchToast, dismissToast } = useToastController(toasterId);\r\n const serverContext = useContext(ServerContext);\r\n const {\r\n includedLocations,\r\n excludedLocations,\r\n } = data;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n // TODO: useMemo\r\n\r\n // reference: private/multi-channel/packages/mca-data/src/use-campaign-api-call/use-campaign-api-call.js\r\n const {\r\n Token,\r\n } = serverContext;\r\n\r\n const makeLocationsCall = useCallback((search) => {\r\n const {\r\n cid,\r\n aid,\r\n } = scope.values;\r\n\r\n return edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations.get({\r\n select: ['ParentLocations'],\r\n search,\r\n ...(isBrandAwarenessCampaignScenario ? { IsBrandAwarenessCampaignScenario: true } : {}),\r\n IsBrandAwarenessCampaignScenario: isBrandAwarenessCampaignScenario,\r\n }).toPromise()\r\n .then(response => response)\r\n .catch(error => console.log(error));\r\n }, [scope, edmCampaign, isBrandAwarenessCampaignScenario]);\r\n\r\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\n const makeBulkLocationsCall = useCallback((searchTerms, countryCode) => {\r\n const {\r\n cid,\r\n aid,\r\n } = scope.values;\r\n\r\n activity.signal('BulkSearchLocations called');\r\n\r\n return edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations['Default.BulkSearchLocations']\r\n .$makeCall({\r\n query: {\r\n select: ['Location'],\r\n ...(countryCode ? { filter: { where: `Location/CountryCode eq '${countryCode}'` } } : {}),\r\n ...(isBrandAwarenessCampaignScenario ? { servingChannel: 'Xandr' } : {}),\r\n },\r\n payload: {\r\n searchTerms,\r\n },\r\n }).toPromise()\r\n .then(response => response)\r\n .catch(error => console.log(error));\r\n }, [scope, edmCampaign, isBrandAwarenessCampaignScenario]);\r\n\r\n const renderToaster = useCallback((toastId, intent, toastTitle, toastMessage) =>\r\n dispatchToast(\r\n \r\n \r\n }\r\n onClick={() => dismissToast(toastId)}\r\n />\r\n \r\n }\r\n >\r\n {toastTitle}\r\n \r\n {toastMessage && {toastMessage}}\r\n ,\r\n {\r\n toastId, pauseOnHover: true, timeout: 8000, position: 'bottom-start', intent,\r\n }\r\n ), [dispatchToast, i18n]);\r\n\r\n const handleBulkLocationsSearchDrawerOpen = useCallback(() => {\r\n activity.signal('Add Bulk Locations panel opens');\r\n setIsBulkLocationsSearchDrawerOpen(true);\r\n }, [setIsBulkLocationsSearchDrawerOpen]);\r\n\r\n const searchOptions = useMemo(() => ({\r\n getLocations: makeLocationsCall,\r\n skipBingMapAPISearch: isBrandAwarenessCampaignScenario,\r\n }), [isBrandAwarenessCampaignScenario, makeLocationsCall]);\r\n\r\n const maxItems = 1000;\r\n const getIsRadiusTarget = useCallback((location, targetingType) => {\r\n if (targetingType) {\r\n return defaultGetIsRadiusTarget(location, targetingType) &&\r\n targetingType === TARGETING_TYPE.Included;\r\n }\r\n return defaultGetIsRadiusTarget(location, targetingType);\r\n }, []);\r\n\r\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\n const setBulkLocationsData = useCallback((targetedLocations) => {\r\n const result = mergeLocations(includedLocations, excludedLocations, targetedLocations);\r\n activity.signal('Add Locations Button clicked')\r\n\r\n if (result.conflictingCount > 0) {\r\n renderToaster('bulkLocationConflict', 'warning', i18n.getString(_TL_('Unable to add locations')), i18n.getString(_TL_('{{count}} location(s) cannot be added due to targeting conflicts.'), { count: result.conflictingCount }));\r\n }\r\n if (result.duplicateCount > 0) {\r\n renderToaster('bulkLocationSuccess', 'success', i18n.getString(_TL_('Duplicate locations removed')), i18n.getString(_TL_('We automatically removed {{count}} duplicate location(s).'), { count: result.duplicateCount }));\r\n }\r\n\r\n setData({\r\n includedLocations: result.includedLocations,\r\n excludedLocations: result.excludedLocations,\r\n });\r\n }, [includedLocations, excludedLocations, setData, renderToaster, i18n]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n setData({ includedLocations: bingMapLocations })}\r\n onNegativeLocationTargetsChange={bingMapLocations => setData({ excludedLocations: bingMapLocations })}\r\n customizedLocationEqual={isLegacyLocationAndRadiusEqual}\r\n getIsRadiusTarget={getIsRadiusTarget}\r\n />\r\n \r\n
\r\n );\r\n};\r\n\r\nSpecificLocationTargetsEditor.propTypes = {\r\n setData: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n edmCampaign: PropTypes.shape({}).isRequired,\r\n allowPositiveLocationTargeting: PropTypes.bool,\r\n allowNegativeLocationTargeting: PropTypes.bool,\r\n showSearchTypeOptions: PropTypes.bool,\r\n showBulkLocations: PropTypes.bool,\r\n strings: PropTypes.shape({}),\r\n defaultSelectedSearchType: PropTypes.string,\r\n isBrandAwarenessCampaignScenario: PropTypes.bool,\r\n};\r\n\r\nSpecificLocationTargetsEditor.defaultProps = {\r\n data: {},\r\n allowPositiveLocationTargeting: true,\r\n allowNegativeLocationTargeting: true,\r\n showSearchTypeOptions: true,\r\n showBulkLocations: false,\r\n strings: {},\r\n defaultSelectedSearchType: undefined,\r\n isBrandAwarenessCampaignScenario: false,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst singleLineShimmer = [\r\n { type: ShimmerElementType.line, width: 200, height: 50 },\r\n];\r\n\r\nexport const SingleLineShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const SectionShimmer = () => (\r\n
\r\n \r\n \r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType, mergeStyles } from '@fluentui/react';\r\n\r\nconst wrapperClass = mergeStyles({\r\n padding: 2,\r\n selectors: {\r\n '& > .ms-Shimmer-container': {\r\n margin: '10px 0',\r\n border: 'none',\r\n },\r\n },\r\n});\r\n\r\nconst shimmerWithElementFirstRow = [\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n { type: ShimmerElementType.line, height: 30 },\r\n { type: ShimmerElementType.gap, width: 10, height: 30 },\r\n];\r\n\r\nconst shimmerWithElementSecondRow = [\r\n { type: ShimmerElementType.circle, height: 24 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 24 },\r\n { type: ShimmerElementType.line, height: 16, width: '20%' },\r\n { type: ShimmerElementType.gap, width: '100%', height: 16 },\r\n];\r\n\r\nexport const AdScheduleShimmer = () => (\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","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nexport const radiusShimmerElement = [\r\n { type: ShimmerElementType.line, width: 20, height: 20 },\r\n { type: ShimmerElementType.gap, width: 5 },\r\n { type: ShimmerElementType.line, height: 16, width: 300 },\r\n { type: ShimmerElementType.gap, height: 20, width: '100%' },\r\n];\r\n\r\nexport const RadiusShimmer = () => (\r\n \r\n);\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nconst audienceShimmerElement = [\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '2%', height: 100 },\r\n { type: ShimmerElementType.line, width: 200, height: 100 },\r\n { type: ShimmerElementType.gap, width: '100%', height: 100 },\r\n];\r\n\r\nexport const AudienceSignalShimmer = () => (\r\n
\r\n \r\n
\r\n);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const withShimmer = (WrappedComponent, Shimmer) => {\r\n const ShimmerWrapper = ({ showShimmer, ...props }) => {\r\n if (showShimmer) {\r\n return ;\r\n }\r\n\r\n return ;\r\n };\r\n\r\n ShimmerWrapper.propTypes = {\r\n showShimmer: PropTypes.bool,\r\n };\r\n\r\n ShimmerWrapper.defaultProps = {\r\n showShimmer: false,\r\n };\r\n\r\n return ShimmerWrapper;\r\n};\r\n\r\n","export const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AdGroup: 'adGroup',\r\n AssetGroup: 'assetGroup',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n AudienceGroupAssetGroupAssociation: 'audienceGroupAssetGroupAssociation',\r\n BrandListAssociation: 'brandListAssociation',\r\n};\r\n","export const CnDefaultLocationTargetsViewModel = {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n currentLocations: [{\r\n Criterion: {\r\n BidAdjustment: 0,\r\n LocationCriterion: {\r\n CountryCode: 'CN',\r\n Latitude: 36.5594,\r\n LesLocationType: 'Country',\r\n LocationId: 39,\r\n LocationType: 'Country',\r\n Longitude: 103.753,\r\n Name: 'China',\r\n NameTypeCombo: 'China (country/region)',\r\n Type: 'Location',\r\n },\r\n OriginalBidAdjustment: 0,\r\n OriginalCashbackPercent: undefined,\r\n Type: 'Location',\r\n },\r\n CriterionType: 'Location',\r\n Id: undefined,\r\n SelectionStatus: 'Included',\r\n Status: 'Active',\r\n bidAdjustmentDropdown: 'Increase by',\r\n bidAdjustmentInput: 0,\r\n location: 'China (country/region)',\r\n }],\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'specific',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n};\r\n\r\nexport const globalDefaultLocationTargetsViewModel = {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'everywhere',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n};\r\n\r\nexport const getDefaultLocationTargetsViewModel = isCnMarket => (isCnMarket ? CnDefaultLocationTargetsViewModel : globalDefaultLocationTargetsViewModel);\r\n\r\nexport const getDefaultLanguagesViewModel = isCnMarket => (isCnMarket ? ['SimplifiedChinese'] : ['All']);\r\n","export const campaignLanguageStrings = {\r\n None: _TL_('Use my campaign settings'),\r\n Albanian: _TL_('Albanian'),\r\n Arabic: _TL_('Arabic'),\r\n Bosnian: _TL_('Bosnian'),\r\n Bulgarian: _TL_('Bulgarian'),\r\n Croatian: _TL_('Croatian'),\r\n Czech: _TL_('Czech'),\r\n Danish: _TL_('Danish'),\r\n Dutch: _TL_('Dutch'),\r\n English: _TL_('English'),\r\n Estonian: _TL_('Estonian'),\r\n Finnish: _TL_('Finnish'),\r\n French: _TL_('French'),\r\n German: _TL_('German'),\r\n Greek: _TL_('Greek'),\r\n Hungarian: _TL_('Hungarian'),\r\n Icelandic: _TL_('Icelandic'),\r\n Italian: _TL_('Italian'),\r\n Japanese: _TL_('Japanese'),\r\n Latvian: _TL_('Latvian'),\r\n Lithuanian: _TL_('Lithuanian'),\r\n Macedonian: _TL_('Macedonian'),\r\n Maltese: _TL_('Maltese'),\r\n Norwegian: _TL_('Norwegian'),\r\n Polish: _TL_('Polish'),\r\n Portuguese: _TL_('Portuguese'),\r\n Romanian: _TL_('Romanian'),\r\n Russian: _TL_('Russian'),\r\n Serbian: _TL_('Serbian'),\r\n SimplifiedChinese: _TL_('Simplified Chinese'),\r\n Slovak: _TL_('Slovak'),\r\n Slovenian: _TL_('Slovenian'),\r\n Spanish: _TL_('Spanish'),\r\n Swedish: _TL_('Swedish'),\r\n TraditionalChinese: _TL_('Traditional Chinese'),\r\n Turkish: _TL_('Turkish'),\r\n Hebrew: _TL_('Hebrew'),\r\n Hindi: _TL_('Hindi'),\r\n Malay: _TL_('Malay'),\r\n Thai: _TL_('Thai'),\r\n Indonesian: _TL_('Indonesian'),\r\n Tagalog: _TL_('Tagalog'),\r\n Vietnamese: _TL_('Vietnamese'),\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport {\r\n entityIs,\r\n andComp,\r\n propertyIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\n\r\nimport { ERROR_ENTITY } from '../constants';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst campaignNameProp = andComp(entityIsCampaign, propertyIs('Name'));\r\n\r\nexport const ValidatedCampaignName = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedFixedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ValidatedCampaignName } from '../validated-campaign-name';\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nconst ValidatedCampaignNameWithShimmer = withShimmer(ValidatedCampaignName, SingleLineShimmer);\r\n\r\nexport const CampaignNamePanel = ({ key, isLoading, ...rest }) => (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n);\r\n\r\nCampaignNamePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n};\r\n\r\nCampaignNamePanel.defaultProps = {\r\n isLoading: false,\r\n};\r\n","export const PANEL_KEYS = {\r\n CAMPAIGN_NAME: 'campaign',\r\n LANGUAGE_TARGET: 'language-target',\r\n LOCATIONS: 'locations',\r\n AD_SCHEDULE: 'ad-schedule',\r\n BUDGET: 'budget',\r\n START_END_DATES: 'start-end-dates',\r\n SHORT_HEADLINES: 'headlines',\r\n DESCRIPTIONS: 'descriptions',\r\n IMAGES: 'images',\r\n AUDIENCE_SIGNAL: 'audience-signal',\r\n VIDEOS: 'videos',\r\n BID_STRATEGY: 'bid-strategy',\r\n BID_VALUE: 'bid-value',\r\n URL_OPTIONS: 'url-options',\r\n LOGOS: 'logos',\r\n FINAL_URL_EXPANSION: 'final-url-expansion',\r\n AUTO_GEN_ASSETS: 'auto-gen-assets',\r\n PAGE_FEEDS: 'page-feeds',\r\n CAMPAIGN_URL_OPTIONS: 'campaign-url-options',\r\n BRAND_EXCLUSIONS: 'brand-exclusions',\r\n COST_PER_SALE: 'cost_per_sale',\r\n SHOPPING: 'shopping-ads',\r\n CONVERSIONS: 'conversions',\r\n PRONG_IMAGES: 'prong-images',\r\n SPOTLIGHT_IMAGES: 'spotlight-images',\r\n NEW_CUSTOMER_ACQUISITION: 'new-customer-acquisition',\r\n APP: 'app',\r\n DISCLAIMERS: 'disclaimers',\r\n};\r\n","import { isEmpty } from 'underscore';\r\nimport { withValidation, withError, AdapterFactory } from '@bingads-webui-react/validation';\r\nimport { LanguageTarget, SingleLanguageTarget } from '@bingads-webui-campaign-react/language-target';\r\n\r\nconst LanguageTargetValidationAdapter = AdapterFactory({\r\n defaultValue: [],\r\n valueToInject: 'selectedLanguages',\r\n functionToInject: 'setSelectedLanguages',\r\n});\r\n\r\nexport const LanguageTargetValidatorFactory = i18n => function LanguageTargetValidator(value, defaultValidator) {\r\n const defaultErrors = defaultValidator(value);\r\n return [\r\n ...isEmpty(defaultErrors) ? [] : defaultErrors,\r\n ...value.length < 1 ? [i18n.getString(_TL_('Select at least one language'))] : [],\r\n ];\r\n};\r\n\r\nexport const SingleLanguageTargetValidator = (value, defaultValidator) => {\r\n if (value === null || value === undefined) {\r\n return [];\r\n }\r\n return defaultValidator(value);\r\n};\r\n\r\nconst SingleLanguageTargetValidationAdapter = AdapterFactory({\r\n defaultValue: 'None',\r\n valueToInject: 'selectedLanguage',\r\n functionToInject: 'setSelectedLanguage',\r\n});\r\n\r\nexport const ValidatedLanguageTarget = withError(withValidation(LanguageTarget, LanguageTargetValidationAdapter));\r\n\r\nexport const ValidatedSingleLanguageTarget = withError(withValidation(SingleLanguageTarget, SingleLanguageTargetValidationAdapter));\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { map } from 'underscore';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { PANEL_KEYS } from './panel-keys';\r\nimport { ERROR_ENTITY, campaignLanguageStrings } from '../../constants';\r\nimport { LanguageImg } from '../../media';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\nimport { ValidatedLanguageTarget, LanguageTargetValidatorFactory } from '../validated-language-target';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst campaignLanguagesProp = andComp(entityIsCampaign, propertyIs('Languages'));\r\n\r\nconst ServerValidatedLanguageTargetWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLanguageTarget,\r\n { filter: campaignLanguagesProp }\r\n )),\r\n SectionShimmer\r\n );\r\n\r\nexport const LanguageTargetPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n CurrentLocale: locale,\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n isLoading,\r\n expand,\r\n data = {},\r\n topicKey,\r\n ...rest\r\n } = props;\r\n\r\n return (\r\n i18n.getString(campaignLanguageStrings[lang] || lang)\r\n ).toString()}\r\n icon={LanguageImg}\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: PANEL_KEYS.LANGUAGE_TARGET,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nLanguageTargetPanel.propTypes = {\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nLanguageTargetPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n topicKey: null,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const minuteToSaveMap = {\r\n ZERO: 0,\r\n FIFTEEN: 15,\r\n THIRTY: 30,\r\n FORTY_FIVE: 45,\r\n};\r\n\r\nexport const getDay = (day) => {\r\n switch (day) {\r\n case 'Alldays':\r\n return _TL_('All days');\r\n case 'Monday':\r\n return _TL_('Monday');\r\n case 'Tuesday':\r\n return _TL_('Tuesday');\r\n case 'Wednesday':\r\n return _TL_('Wednesday');\r\n case 'Thursday':\r\n return _TL_('Thursday');\r\n case 'Friday':\r\n return _TL_('Friday');\r\n case 'Saturday':\r\n return _TL_('Saturday');\r\n case 'Sunday':\r\n return _TL_('Sunday');\r\n case 'MondayToFriday':\r\n return _TL_('Monday - Friday');\r\n default:\r\n return _TL_('All days');\r\n }\r\n};\r\n\r\nexport const getMin = (min) => {\r\n switch (min) {\r\n case 0:\r\n return '00';\r\n case 15:\r\n return '15';\r\n case 30:\r\n return '30';\r\n case 45:\r\n return '45';\r\n default:\r\n return '00';\r\n }\r\n};\r\n\r\nexport const getTime = (hour, is12) => {\r\n switch (hour) {\r\n case 0:\r\n return is12 ? _TL_('12:{{min}} AM') : _TL_('00:{{min}}');\r\n case 1:\r\n return is12 ? _TL_('01:{{min}} AM') : _TL_('01:{{min}}');\r\n case 2:\r\n return is12 ? _TL_('02:{{min}} AM') : _TL_('02:{{min}}');\r\n case 3:\r\n return is12 ? _TL_('03:{{min}} AM') : _TL_('03:{{min}}');\r\n case 4:\r\n return is12 ? _TL_('04:{{min}} AM') : _TL_('04:{{min}}');\r\n case 5:\r\n return is12 ? _TL_('05:{{min}} AM') : _TL_('05:{{min}}');\r\n case 6:\r\n return is12 ? _TL_('06:{{min}} AM') : _TL_('06:{{min}}');\r\n case 7:\r\n return is12 ? _TL_('07:{{min}} AM') : _TL_('07:{{min}}');\r\n case 8:\r\n return is12 ? _TL_('08:{{min}} AM') : _TL_('08:{{min}}');\r\n case 9:\r\n return is12 ? _TL_('09:{{min}} AM') : _TL_('09:{{min}}');\r\n case 10:\r\n return is12 ? _TL_('10:{{min}} AM') : _TL_('10:{{min}}');\r\n case 11:\r\n return is12 ? _TL_('11:{{min}} AM') : _TL_('11:{{min}}');\r\n case 12:\r\n return is12 ? _TL_('12:{{min}} PM') : _TL_('12:{{min}}');\r\n case 13:\r\n return is12 ? _TL_('01:{{min}} PM') : _TL_('13:{{min}}');\r\n case 14:\r\n return is12 ? _TL_('02:{{min}} PM') : _TL_('14:{{min}}');\r\n case 15:\r\n return is12 ? _TL_('03:{{min}} PM') : _TL_('15:{{min}}');\r\n case 16:\r\n return is12 ? _TL_('04:{{min}} PM') : _TL_('16:{{min}}');\r\n case 17:\r\n return is12 ? _TL_('05:{{min}} PM') : _TL_('17:{{min}}');\r\n case 18:\r\n return is12 ? _TL_('06:{{min}} PM') : _TL_('18:{{min}}');\r\n case 19:\r\n return is12 ? _TL_('07:{{min}} PM') : _TL_('19:{{min}}');\r\n case 20:\r\n return is12 ? _TL_('08:{{min}} PM') : _TL_('20:{{min}}');\r\n case 21:\r\n return is12 ? _TL_('09:{{min}} PM') : _TL_('21:{{min}}');\r\n case 22:\r\n return is12 ? _TL_('10:{{min}} PM') : _TL_('22:{{min}}');\r\n case 23:\r\n return is12 ? _TL_('11:{{min}} PM') : _TL_('23:{{min}}');\r\n case 24:\r\n return is12 ? _TL_('12:{{min}} AM') : _TL_('24:{{min}}');\r\n default:\r\n return is12 ? _TL_('00:{{min}} AM') : _TL_('00:{{min}}');\r\n }\r\n};\r\n\r\n\r\nexport const getDayTimeDetails = (i18n, dayTime, is12, hideBidAdjustment = false) => {\r\n const startHour = dayTime().StartHour();\r\n const endHour = dayTime().EndHour();\r\n const startMin = getMin(minuteToSaveMap[dayTime().StartMinute()]);\r\n const endMin = getMin(minuteToSaveMap[dayTime().EndMinute()]);\r\n const dateTimePart = `${i18n.getString(getDay(dayTime().Day()))} ${i18n.getString(_TL_('from {{from}} to {{to}}'), {\r\n from: i18n.getString(getTime(startHour, is12), { min: startMin }),\r\n to: i18n.getString(getTime(endHour, is12), { min: endMin }),\r\n })}`;\r\n\r\n if (hideBidAdjustment) {\r\n return dateTimePart;\r\n }\r\n return `${dateTimePart}: ${(_.isUndefined(dayTime().BidAdjustmentType()) || dayTime().BidAdjustmentType() > 0) ? i18n.getString(_TL_('Increase By')) : i18n.getString(_TL_('Decrease By'))}\r\n ${_.isUndefined(dayTime().BidAdjustmentAmount()) ? 0 : dayTime().BidAdjustmentAmount()}%`;\r\n};\r\n\r\nexport const getAdScheduleDetails = (i18n, adScheduleView, hideBidAdjustment = false) => {\r\n if (adScheduleView) {\r\n const useCampaignSettings = adScheduleView.koModel.useCampaignSettings();\r\n const schedules = useCampaignSettings ? adScheduleView.koModel.campaignDayTimeRanges() : adScheduleView.koModel.dayTimeRanges();\r\n let details = '';\r\n const dateSettings = adScheduleView.getDateSettings();\r\n if (!_.isEmpty(dateSettings) && dateSettings.EndDate !== '1/1/3000') {\r\n details = i18n.getString(_TL_('Scheduled from {{from}} to {{to}}: '), { from: dateSettings.StartDate, to: dateSettings.EndDate });\r\n }\r\n\r\n const hideAdScheduleBidAdjustments = adScheduleView.koModel.hideAdScheduleBidAdjustments();\r\n if (!hideAdScheduleBidAdjustments) {\r\n const is12 = adScheduleView.koModel.timeDisplayType() === '12-hour';\r\n const len = schedules.length;\r\n schedules.forEach((schedule, index) => {\r\n details += getDayTimeDetails(i18n, schedule, is12, hideBidAdjustment);\r\n if (details && index < len - 1) {\r\n details += ', ';\r\n }\r\n });\r\n }\r\n const adScheduleUseSearcherTimeZone = adScheduleView.getAdScheduleUseSearcherTimeZone();\r\n if (adScheduleUseSearcherTimeZone) {\r\n details += ` ${i18n.getString(_TL_('In Ad viewer\\'s time zone'))}`;\r\n } else {\r\n details += ` ${i18n.getString(_TL_('In Your account\\'s time zone'))}`;\r\n }\r\n return details;\r\n }\r\n return '';\r\n};\r\n","import React, { useContext, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport {\r\n entityIs,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { getAdScheduleDetails } from '../../utils/ad-schedule-shared';\r\nimport { AdScheduleImg } from '../../media';\r\nimport { AdScheduleShimmer, withShimmer } from '../shimmers';\r\n\r\nconst campaignDayTimeCriterions = entityIs(ERROR_ENTITY.CampaignDayTimeCriterion);\r\n\r\nconst ServerValidatedLegacyAdScheduleWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLegacyAdSchedule,\r\n { filter: campaignDayTimeCriterions }\r\n )),\r\n AdScheduleShimmer\r\n );\r\n\r\nexport const AdSchedulePanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const [adScheduleView, setAdScheduleView] = useState(null);\r\n const setAdScheduleViewCallback = useCallback((view) => { setAdScheduleView(view); }, []);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const { adSchedules } = data;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nAdSchedulePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nAdSchedulePanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { ERROR_ENTITY, campaignLanguageStrings } from '../../constants';\r\nimport { LanguageImg } from '../../media';\r\nimport { ValidatedSingleLanguageTarget, SingleLanguageTargetValidator } from '../validated-language-target';\r\n\r\nconst entityIsAdgroup = entityIs(ERROR_ENTITY.AdGroup);\r\nconst adgroupLanguageProp = andComp(entityIsAdgroup, propertyIs('Language'));\r\n\r\nconst ServerValidatedLanguageTarget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedSingleLanguageTarget, { filter: adgroupLanguageProp }));\r\n\r\nexport const SingleLanguageTargetPanel = (props) => {\r\n const serverContext = useContext(ServerContext);\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n CurrentLocale: locale,\r\n DynamicPermissions,\r\n Permissions,\r\n } = serverContext;\r\n\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const {\r\n expand,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'language',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nSingleLanguageTargetPanel.propTypes = {\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nSingleLanguageTargetPanel.defaultProps = {\r\n data: {},\r\n};\r\n","import { useContext, useCallback } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const useLocalizeBudget = () => {\r\n const i18n = useContext(I18nContext);\r\n const localizeBudget = useCallback((budget, currency) => i18n.formatCurrency(\r\n Number(budget), currency.toUpperCase(),\r\n { withSymbol: false, maximumFractionDigits: 2 }\r\n ), [i18n]);\r\n return {\r\n localizeBudget,\r\n };\r\n};\r\n","import React, { useContext, useMemo, useCallback, useState, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { BudgetComponent } from '@bingads-webui-campaign-react/budget-component';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n// eslint-disable-next-line\r\nimport BingAdsWebUIStaticLegacyPageContext from '@bingads-webui-static-legacy/page-context';\r\n// eslint-disable-next-line\r\nimport { BudgetSuggestionDialog, useBudgetSuggestionRepository, MODE } from '@bingads-webui-campaign-react/budget-suggestion-v2';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { BudgetImg } from '../../media';\r\nimport { useLocalizeBudget } from '../../utils/use-localize-budget';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\n\r\nconst { BudgetRange } = BingAdsWebUIStaticLegacyPageContext;\r\n\r\nconst getStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst budgetProp = andComp(entityIsCampaign, propertyIs('Budget'));\r\nconst ServerValidatedBudgetComponentWithShimmer =\r\n withShimmer(\r\n withControlErrorHandling(withUnvalidatedControlErrors(\r\n BudgetComponent,\r\n { filter: budgetProp }\r\n )),\r\n SectionShimmer\r\n );\r\n\r\nexport const BudgetPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n const getResponsiveStyles = useResponsiveStyles(getStyles);\r\n const { localizeBudget } = useLocalizeBudget();\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n budgetAmount,\r\n currency,\r\n campaignId,\r\n campaignType,\r\n showBudgetSuggestion,\r\n isCampaignSetting,\r\n campaign,\r\n } = data;\r\n\r\n const { DailyRange } = BudgetRange || {};\r\n\r\n const budgetSuggestion = useMemo(() => ({\r\n Currency: currency,\r\n GlobalMaximumBudget: { DailyBudget: DailyRange.CeilingValue ? DailyRange.CeilingValue : 3000000 },\r\n GlobalMinimumBudget: { DailyBudget: DailyRange.FloorValue ? DailyRange.FloorValue : 0.05 },\r\n }), [currency, DailyRange.CeilingValue, DailyRange.FloorValue]);\r\n\r\n\r\n const budgetTitleDetails = useMemo(() => i18n.getString(_TL_('{{budgetAmount}} {{currency}} per day'), { budgetAmount, currency }), [budgetAmount, currency, i18n]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBudgetChange = useCallback((newBudget, shouldLocalize = false) => {\r\n if (newBudget) {\r\n const budgetAmountValue = shouldLocalize ? localizeBudget(newBudget, currency) : newBudget;\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }\r\n }, [currency, onFieldChange, localizeBudget]);\r\n\r\n const onBudgetChangeFromBudgetSuggestion = useCallback((newBudget, shouldLocalize = false) => {\r\n if (newBudget && newBudget.Amount) {\r\n const budgetAmountValue = shouldLocalize ? localizeBudget(newBudget.Amount, currency) : newBudget.Amount;\r\n onFieldChange({ budgetAmount: budgetAmountValue });\r\n }\r\n }, [currency, onFieldChange, localizeBudget]);\r\n\r\n const onBudgetValidate = useCallback(({ isValid, messages }) => {\r\n onFieldChange({ isBudgetValid: isValid, budgetErrors: messages });\r\n }, [onFieldChange]);\r\n\r\n const [budgetSuggestionData, setBudgetSuggestionData] = useState(null);\r\n const {\r\n loadBudget,\r\n } = useBudgetSuggestionRepository({\r\n campaignId,\r\n mode: MODE.EDITING,\r\n campaignType,\r\n currency,\r\n });\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n useEffect(() => {\r\n if (showBudgetSuggestion && isCampaignSetting) {\r\n loadBudget({ campaign: {}, assetGroup: {} }).then((datas) => {\r\n setBudgetSuggestionData(datas);\r\n }).finally(() => {\r\n });\r\n }\r\n }, [isCampaignSetting, loadBudget, showBudgetSuggestion]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n\r\n {/* will check Delivery Status in campaign when MT added */}\r\n {/* {showBudgetSuggestion && (data.DeliveryStatus === 'BudgetSuggestions' || 'BudgetSuggestions' in data.DeliveryStatusDetails) && isCampaignSetting && */}\r\n {showBudgetSuggestion &&\r\n isCampaignSetting &&\r\n !_.isEmpty(budgetSuggestionData) &&\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nBudgetPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nBudgetPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedLegacyDateSetting, getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\n\r\nimport { PANEL_KEYS } from './panel-keys';\r\nimport { StartEndDateImg } from '../../media';\r\nimport { DateSettingsShimmer, withShimmer } from '../shimmers';\r\n\r\nconst ValidatedLegacyDateSettingWithShimmer = withShimmer(ValidatedLegacyDateSetting, DateSettingsShimmer);\r\n\r\nexport const DateSettingsPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n isLoading,\r\n expand,\r\n timeZone,\r\n data = {},\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n StartDate,\r\n EndDate,\r\n Id,\r\n } = data;\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: PANEL_KEYS.START_END_DATES,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nDateSettingsPanel.propTypes = {\r\n isLoading: PropTypes.bool,\r\n // eslint-disable-next-line react/forbid-prop-types\r\n collapseState: PropTypes.arrayOf(PropTypes.any).isRequired,\r\n expand: PropTypes.func.isRequired,\r\n data: PropTypes.shape({}),\r\n timeZone: PropTypes.string,\r\n};\r\n\r\nDateSettingsPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n timeZone: null,\r\n};\r\n","import React from 'react';\r\nimport { Shimmer, ShimmerElementType } from '@fluentui/react';\r\n\r\nimport { SectionShimmer } from './section-shimmer';\r\nimport { RadiusShimmer } from './radius-shimmer';\r\n\r\nexport const DateSettingsShimmer = () => (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n HeadlineAssetCollection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const ShortHeadlinesPanel = ({\r\n headlinesCardSummaryDetails,\r\n allAssetsExpand,\r\n icon,\r\n featureName,\r\n setAddNewShortHeadlinesCallback,\r\n isOptional,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: PANEL_KEYS.SHORT_HEADLINES,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nShortHeadlinesPanel.propTypes = {\r\n headlinesCardSummaryDetails: PropTypes.shape({}).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.node.isRequired,\r\n setAddNewShortHeadlinesCallback: PropTypes.func.isRequired,\r\n featureName: PropTypes.string.isRequired,\r\n isOptional: PropTypes.bool,\r\n};\r\n\r\nShortHeadlinesPanel.defaultProps = {\r\n isOptional: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n DescriptionAssetCollection,\r\n} from '@bingads-webui-campaign-react/pmax-text-input';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const DescriptionsPanel = ({\r\n descriptionsCardSummaryDetails,\r\n allAssetsExpand,\r\n icon,\r\n setAddNewDescriptionCallback,\r\n featureName,\r\n isOptional,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: PANEL_KEYS.DESCRIPTIONS,\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nDescriptionsPanel.propTypes = {\r\n descriptionsCardSummaryDetails: PropTypes.shape({}).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.node.isRequired,\r\n setAddNewDescriptionCallback: PropTypes.func.isRequired,\r\n featureName: PropTypes.string.isRequired,\r\n isOptional: PropTypes.bool,\r\n};\r\n\r\nDescriptionsPanel.defaultProps = {\r\n isOptional: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n ImageListPortalContainerWithControlErrorHandling,\r\n ImageListSummaryCardDetails,\r\n PerfMaxImageSuggestionCarousel,\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { PANEL_KEYS } from './panel-keys';\r\n\r\nexport const BaseImagePanel = ({\r\n titleKey,\r\n topicKey,\r\n panelKey,\r\n icon,\r\n iconAltText,\r\n imagesData,\r\n allAssetsExpand,\r\n containerRef,\r\n portalContainerState,\r\n addNewImageCallback,\r\n description,\r\n maxUploadNum,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const permissions = useContext(PermissionsContext);\r\n return (\r\n }\r\n />}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allAssetsExpand,\r\n expandKey: panelKey,\r\n }}\r\n {...rest}\r\n >\r\n {description && i18n.getString(description)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nBaseImagePanel.propTypes = {\r\n titleKey: PropTypes.string.isRequired,\r\n topicKey: PropTypes.string.isRequired,\r\n panelKey: PropTypes.string.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n iconAltText: PropTypes.string.isRequired,\r\n imagesData: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n containerRef: PropTypes.shape({}).isRequired,\r\n portalContainerState: PropTypes.shape({}).isRequired,\r\n addNewImageCallback: PropTypes.func.isRequired,\r\n description: PropTypes.string.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n};\r\n\r\nexport const ImagesPanel = ({\r\n images,\r\n allAssetsExpand,\r\n icon,\r\n imageExperienceAddNewImageCallback,\r\n maxUploadNum,\r\n imagesContainerRef,\r\n imageExperiencePortalContainerState,\r\n topicKey,\r\n ...rest\r\n}) => (\r\n \r\n);\r\n\r\nImagesPanel.propTypes = {\r\n images: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n imageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n imagesContainerRef: PropTypes.shape({}).isRequired,\r\n imageExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nImagesPanel.defaultProps = {\r\n topicKey: null,\r\n};\r\n\r\nexport const LogosPanel = ({\r\n logos,\r\n allAssetsExpand,\r\n icon,\r\n logoExperienceAddNewImageCallback,\r\n maxUploadNum,\r\n logosContainerRef,\r\n logoExperiencePortalContainerState,\r\n description,\r\n titleKey,\r\n ...rest\r\n}) => (\r\n \r\n);\r\n\r\nLogosPanel.propTypes = {\r\n logos: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n allAssetsExpand: PropTypes.func.isRequired,\r\n icon: PropTypes.string.isRequired,\r\n logoExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n maxUploadNum: PropTypes.number.isRequired,\r\n logosContainerRef: PropTypes.shape({}).isRequired,\r\n logoExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n description: PropTypes.string.isRequired,\r\n titleKey: PropTypes.string,\r\n};\r\n\r\nLogosPanel.defaultProp = {\r\n titleKey: null,\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DefaultButton, Link } from '@bingads-webui-react/fluent-controls';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nconst DEFAULT_MESSAGE = _TL_('Conversion tracking must be configured for your bid strategy to be effective. Without configured conversion tracking, your bid strategy will automatically switch to maximizing clicks instead of optimizing for conversions, which may not be ideal for your campaign performance.');\r\nconst TRANSITION_MESSAGE = _TL_('Once we track a sufficient amount of conversion data, your Performance Max campaigns will automatically switch to your selected conversion-based bid strategy. You can always change the bid strategy in the campaign\\'s settings. {{link}}Learn more about bid strategy for Performance Max campaigns{{/link}}');\r\n\r\nconst getTemplateToDisplay = (i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal) => {\r\n if (_.isUndefined(hasActiveGoal)) {\r\n return null;\r\n }\r\n\r\n if (isCampaignCreation) {\r\n if (!hasActiveGoal) {\r\n return { message: i18n.getString(DEFAULT_MESSAGE), type: 'warning' };\r\n }\r\n return null;\r\n }\r\n\r\n if (usesMaxClicks) {\r\n if (!hasActiveGoal) {\r\n return { message: i18n.getString(DEFAULT_MESSAGE), type: 'warning' };\r\n }\r\n return { message: i18n.getString(TRANSITION_MESSAGE), type: 'info' };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst getUsesMaxClicks = campaign => _.chain(campaign)\r\n .get(['data', 'CampaignSettings'], [])\r\n .where({ '@odata.type': '#Model.PerformanceMaxSetting' })\r\n .first()\r\n .get('UseMaxClicks')\r\n .value();\r\n\r\nconst getHasActiveGoal = conversionGoalsDetails => _.get(conversionGoalsDetails, 'IsActiveConversionGoalPresent');\r\n\r\n// TODO(orlandom): Remove when the new Big Strategy component is ready\r\nexport const ConversionBasedBiddingBanner = (props) => {\r\n const {\r\n i18n,\r\n scope,\r\n campaign,\r\n conversionGoalsDetails,\r\n isCampaignCreation,\r\n } = props;\r\n\r\n const usesMaxClicks = useMemo(() => getUsesMaxClicks(campaign), [campaign]);\r\n const hasActiveGoal = useMemo(() => getHasActiveGoal(conversionGoalsDetails), [conversionGoalsDetails]);\r\n\r\n const messageSettings = useMemo(\r\n () => getTemplateToDisplay(i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal),\r\n [i18n, usesMaxClicks, isCampaignCreation, hasActiveGoal]\r\n );\r\n\r\n const onSetConversionTracking = useCallback(() => {\r\n scope.save('/campaign/vnext/conversiongoals/create');\r\n }, [scope]);\r\n\r\n if (!messageSettings) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {text},\r\n link: text => (\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n {text}\r\n ),\r\n }}\r\n />\r\n
\r\n {(!isCampaignCreation && !hasActiveGoal) && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nConversionBasedBiddingBanner.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaign: PropTypes.shape({}).isRequired,\r\n conversionGoalsDetails: PropTypes.shape({}).isRequired,\r\n isCampaignCreation: PropTypes.bool.isRequired,\r\n};\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n BidStrategyComponent,\r\n BID_STRATEGY_OPTIONS_MAP,\r\n MAX_CONVERSIONS,\r\n MAX_CONVERSIONS_VALUE\r\n} from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n withUnvalidatedControlErrors,\r\n withControlErrorHandling,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { TargetCpaWarningBanner } from '@bingads-webui-campaign-react/target-cpa-warning-banner';\r\n\r\nimport { ConversionBasedBiddingBanner } from '../conversion-based-bidding-banner';\r\nimport { BidStrategyImg } from '../../media';\r\nimport { ERROR_ENTITY } from '../../constants';\r\n\r\nconst getBidStrategyStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n bottomMargin: {\r\n marginBottom: '8px',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst bidStrategyProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst ServerValidatedBidStrategyComponent = withControlErrorHandling(withUnvalidatedControlErrors(BidStrategyComponent, { filter: bidStrategyProp }));\r\n\r\nexport const BidStrategyPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const { CurrentAccount: { CurrencyCode } } = serverContext || {};\r\n const bidRange = (serverContext && serverContext.KeywordBidRange) || null;\r\n\r\n const getStyles = useResponsiveStyles(getBidStrategyStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n options,\r\n data = {},\r\n topicKey,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n campaign,\r\n conversionGoalDetails,\r\n bidStrategy,\r\n currency,\r\n cpa,\r\n roas,\r\n isInitialAdditionalDetailsChecked,\r\n budgetAmount,\r\n } = data;\r\n\r\n const {\r\n bidStrategyComponentOptions = {},\r\n biddingBannerOptions = {},\r\n scenario = '',\r\n } = options;\r\n\r\n const {\r\n bidStrategyOptions,\r\n hideAdditionalDetails,\r\n ...restBidStrategyComponentOptions\r\n } = bidStrategyComponentOptions;\r\n\r\n const {\r\n ...restBiddingBannerOptions\r\n } = biddingBannerOptions;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const bidStrategyTitleDetails = useMemo(() => {\r\n let targetValue = '';\r\n let bidStrategyText = '';\r\n if (bidStrategy) {\r\n if (bidStrategy === MAX_CONVERSIONS.type && cpa) {\r\n targetValue = `${cpa} ${currency}`;\r\n } else if (bidStrategy === MAX_CONVERSIONS_VALUE.type && roas) {\r\n targetValue = `${roas} %`;\r\n }\r\n const predefinedBidStrategy = BID_STRATEGY_OPTIONS_MAP[bidStrategy];\r\n bidStrategyText = predefinedBidStrategy ? predefinedBidStrategy.text : bidStrategy;\r\n }\r\n\r\n return (\r\n <>\r\n {i18n.getString(_TL_('{{bidStrategyText}}'), { bidStrategyText }) + (targetValue ? `, ${i18n.getString(_TL_('target {{targetValue}}'), { targetValue })}` : '')}\r\n \r\n \r\n );\r\n }, [bidStrategy, i18n, budgetAmount, cpa, activity, scenario, roas, currency]);\r\n\r\n const addBottomMargin = useMemo(() => hideAdditionalDetails, [hideAdditionalDetails]);\r\n\r\n const onFieldChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n ...updatedData,\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const onBidStrategyChange = useCallback((e, newBidStrategy) => {\r\n const bidStrategyType = _.get(newBidStrategy, 'type');\r\n onFieldChange({ bidStrategy: bidStrategyType });\r\n }, [onFieldChange]);\r\n\r\n const onMarketingMetricChange = useCallback(({\r\n data: newMarketingMetric,\r\n isValid,\r\n messages,\r\n }) => {\r\n onFieldChange({\r\n ...newMarketingMetric,\r\n isMarketingMetricValid: isValid,\r\n marketingMetricErrors: messages,\r\n });\r\n }, [onFieldChange]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n \r\n {addBottomMargin &&
}\r\n \r\n );\r\n};\r\n\r\nBidStrategyPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n bidStrategy: PropTypes.string,\r\n currency: PropTypes.string,\r\n cpa: PropTypes.number,\r\n roas: PropTypes.number,\r\n campaign: PropTypes.shape({}),\r\n conversionGoalDetails: PropTypes.shape({}),\r\n isInitialAdditionalDetailsChecked: PropTypes.bool,\r\n }),\r\n options: PropTypes.shape({\r\n bidStrategyComponentOptions: PropTypes.shape({}),\r\n biddingBannerOptions: PropTypes.shape({}),\r\n scenario: PropTypes.string,\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n topicKey: PropTypes.string,\r\n};\r\n\r\nBidStrategyPanel.defaultProps = {\r\n data: {},\r\n options: {},\r\n isLoading: false,\r\n topicKey: null,\r\n};\r\n","import React, { useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ValidatedUrlOptionsParameter, ValidatedUrlOptionsParameterWithError } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { UrlOptionsImg } from '../../media';\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nconst getUrlOptionsStyles = () => ({\r\n urlOptionsContainer: {\r\n maxWidth: 435,\r\n },\r\n});\r\n\r\nconst ValidatedUrlOptionsParameterWithShimmer = withShimmer(ValidatedUrlOptionsParameter, SingleLineShimmer);\r\nconst ValidatedUrlOptionsParameterWithErrorWithShimmer = withShimmer(ValidatedUrlOptionsParameterWithError, SingleLineShimmer);\r\n\r\nexport const UrlOptionsPanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getUrlOptionsStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n options,\r\n data = {},\r\n isTrackingUrlTemplateRequired,\r\n isWithError,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n showDescription,\r\n urlParameterOptions,\r\n } = options;\r\n\r\n const {\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n } = data || {};\r\n\r\n const urlOptions = useMemo(() => ({\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n }), [trackingUrlTemplate, finalUrlSuffix, urlCustomParameters]);\r\n\r\n const urlOptionsDetails = useMemo(() => getUrlOptionsDetails(i18n, urlOptions), [urlOptions, i18n]);\r\n\r\n return (\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: key,\r\n }}\r\n {...rest}\r\n >\r\n
\r\n {\r\n showDescription &&\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n }\r\n {\r\n isWithError ?\r\n () :\r\n ()\r\n }\r\n
\r\n \r\n );\r\n};\r\n\r\nUrlOptionsPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n options: PropTypes.shape({\r\n showDescription: PropTypes.bool,\r\n urlParameterOptions: PropTypes.shape({}),\r\n }),\r\n data: PropTypes.shape({\r\n TrackingUrlTemplate: PropTypes.string,\r\n FinalUrlSuffix: PropTypes.string,\r\n UrlCustomParameters: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n isTrackingUrlTemplateRequired: PropTypes.bool,\r\n isWithError: PropTypes.bool,\r\n};\r\n\r\nUrlOptionsPanel.defaultProps = {\r\n data: {},\r\n options: {},\r\n isLoading: false,\r\n isTrackingUrlTemplateRequired: false,\r\n isWithError: false,\r\n};\r\n","import React, { useContext, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { CustomValidatedDefaultBid } from '@bingads-webui-campaign-react/default-bid';\r\nimport { Label } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nexport const PriceModelToRange = {\r\n ManualCpa: 'KeywordBidRange',\r\n ManualCpc: 'KeywordBidRange',\r\n};\r\n\r\nexport const ValidatedBidValue = ({\r\n validationProps,\r\n onBidChange,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { data: campaign, bidValueType } = validationProps || {};\r\n\r\n const { BiddingScheme } = campaign;\r\n\r\n const getBidRange = useCallback((type) => {\r\n const bidCeil = _.result(serverContext[PriceModelToRange[type]], 'CeilingValue');\r\n const bidFloor = _.result(serverContext[PriceModelToRange[type]], 'FloorValue');\r\n\r\n return { bidCeil, bidFloor };\r\n }, [serverContext]);\r\n\r\n const SearchBid = useCallback(() => {\r\n const { bidCeil, bidFloor } = getBidRange(BiddingScheme.Type);\r\n\r\n return (\r\n \r\n );\r\n }, [getBidRange, i18n, BiddingScheme, serverContext.CurrentAccount.CurrencyCode, bidValueType, onBidChange]);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nValidatedBidValue.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}).isRequired,\r\n bidValueType: PropTypes.string.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n onBidChange: PropTypes.func.isRequired,\r\n};\r\n\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n TextTitle,\r\n ValidatedPanel,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n entityIs,\r\n propertyIs,\r\n andComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { SectionShimmer, withShimmer } from '../shimmers';\r\n\r\nimport { ERROR_ENTITY } from '../../constants';\r\nimport { ValidatedBidValue } from '../sections/bid-value';\r\n\r\nconst getBidStrategyStyles = () => ({\r\n budgetTitle: {\r\n fontSize: '18px',\r\n display: 'inline',\r\n },\r\n bottomMargin: {\r\n marginBottom: '8px',\r\n },\r\n});\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\nconst bidValueProp = andComp(entityIsCampaign, propertyIs('BiddingScheme'));\r\nconst ServerValidatedBidValueComponentWithShimmer =\r\n withShimmer(\r\n withUnvalidatedControlErrors(\r\n ValidatedBidValue,\r\n { filter: bidValueProp }\r\n ),\r\n SectionShimmer\r\n );\r\n\r\nexport const BidValuePanel = (props) => {\r\n const i18n = useContext(I18nContext);\r\n const getStyles = useResponsiveStyles(getBidStrategyStyles);\r\n\r\n const {\r\n key,\r\n isLoading,\r\n expand,\r\n onDataChange,\r\n data = {},\r\n bidValueType,\r\n ...rest\r\n } = props;\r\n\r\n const {\r\n campaign,\r\n currency,\r\n } = data;\r\n\r\n const bidAmount = useMemo(() => {\r\n if (!isLoading && campaign?.BiddingScheme) {\r\n const { BiddingScheme } = campaign;\r\n return BiddingScheme[bidValueType];\r\n }\r\n return null;\r\n }, [isLoading, campaign, bidValueType]);\r\n\r\n const bidValueDetails = useMemo(() => i18n.getString(_TL_('{{bidAmount}} {{currency}}'), { bidAmount, currency }), [bidAmount, currency, i18n]);\r\n\r\n const onBidValueChange = useCallback((updatedData) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n [bidValueType]: updatedData,\r\n }),\r\n });\r\n }, [onDataChange, bidValueType]);\r\n\r\n return (\r\n \r\n }\r\n actuationProps={{\r\n expandKey: key,\r\n expand,\r\n }}\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nBidValuePanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n currency: PropTypes.string,\r\n campaign: PropTypes.shape({}),\r\n }),\r\n isLoading: PropTypes.bool,\r\n expand: PropTypes.func.isRequired,\r\n bidValueType: PropTypes.string.isRequired,\r\n};\r\n\r\nBidValuePanel.defaultProps = {\r\n data: {},\r\n isLoading: false,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n TextTitle,\r\n getPanelErrorProps,\r\n ValidatedFixedPanel,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\n\r\nimport { AppPanel } from '@bingads-webui-campaign-react/app-store-selector';\r\n\r\nimport { SingleLineShimmer, withShimmer } from '../shimmers';\r\n\r\nexport const AppDetailsPanel = (props) => {\r\n const {\r\n key, isLoading, data = {}, ...rest\r\n } = props;\r\n const { campaign } = data || {};\r\n const selectedApp = campaign && campaign.AppSetting;\r\n\r\n const AppPanelWithShimmer = withShimmer(AppPanel, SingleLineShimmer);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nAppDetailsPanel.propTypes = {\r\n key: PropTypes.string.isRequired,\r\n isLoading: PropTypes.bool,\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n AppSetting: PropTypes.shape({}),\r\n }),\r\n }),\r\n platform: PropTypes.string.isRequired,\r\n};\r\n\r\nAppDetailsPanel.defaultProps = {\r\n isLoading: false,\r\n data: {},\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@bingads-webui-react/fluent-controls';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nimport { SignalsSparkleImg } from '../../media';\r\n\r\nconst getStyles = () => ({\r\n root: {\r\n marginTop: 24,\r\n },\r\n title: {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n lineHeight: '28px',\r\n margin: 0,\r\n },\r\n});\r\n\r\nexport const AudienceSignalSection = ({ children }) => {\r\n const i18n = useContext(I18nContext);\r\n const getResponsiveStyles = useResponsiveStyles(getStyles);\r\n\r\n return (\r\n \r\n

\r\n {i18n.getString(_TL_('Signals (Optional)'))}\r\n

\r\n \r\n \"\"\r\n \r\n {i18n.getString(_TL_('Signals give us valuable information about who you want to reach.'))}\r\n {i18n.getString(_TL_('We\\'ll use them as a starting point to find customers and determine who sees your ads.'))}\r\n \r\n \r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n};\r\n\r\nAudienceSignalSection.propTypes = {\r\n children: PropTypes.node,\r\n};\r\n\r\nAudienceSignalSection.defaultProps = {\r\n children: null,\r\n};\r\n","export function modelToViewModelDayTimeTargets(targets, resetId = false) {\r\n const schedulingRows = [];\r\n\r\n targets.forEach((target) => {\r\n const criterion = target.Criterion;\r\n const multiplier = target.CriterionBid.Multiplier;\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: window.Math.abs(multiplier),\r\n });\r\n });\r\n\r\n return schedulingRows;\r\n}\r\n","import { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } from '@bingads-webui-campaign/filter-storage';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { useContext } from 'react';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\n\r\n// date-filter plugin and related logic is in \"projection-grid-date-filter/src/plugin.js\"\r\n\r\nconst formatDateInEntitySet = date => kendo.toString(date, 'yyyy-MM-dd');\r\nconst parseDate = dateString => kendo.parseDate(dateString);\r\n\r\nfunction useDateRangeDefault() {\r\n const preferenceService = useContext(PreferenceContext);\r\n const serverContext = useContext(ServerContext);\r\n const waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService,\r\n });\r\n const waterFallDateFilters = waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]);\r\n const dateFilter = waterfallDateFilterProcessor(waterFallDateFilters, serverContext);\r\n return dateFilter;\r\n}\r\n\r\nexport function useP$DaterangeDefault() {\r\n const dateFilter = useDateRangeDefault();\r\n return Promise.resolve(dateFilter);\r\n}\r\n\r\n// What about comparison date range?\r\n// Listing Gruop page does not have comparison date range\r\nexport function useDateRange() {\r\n const dateRange = useDateRangeDefault();\r\n return {\r\n StartDate: formatDateInEntitySet(dateRange.start) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeStartDate)),\r\n EndDate: formatDateInEntitySet(dateRange.end) ||\r\n formatDateInEntitySet(parseDate(dateRange.RangeEndDate)),\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\n\r\nexport const getConversionGoalTitleDetails = (i18n, conversionGoals = {}) => {\r\n const {\r\n goalScopeSelection,\r\n goalSelection,\r\n } = conversionGoals;\r\n\r\n if (goalScopeSelection === Scopes.CAMPAIGN && _.size(goalSelection) > 0) {\r\n const goalNames = _.pluck(goalSelection, 'Name');\r\n\r\n return goalNames.join(', ');\r\n }\r\n\r\n return i18n.getString(_TL_('Use account settings'));\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const getFinalUrlExpansionTitleDetails = (i18n, view, isFinalUrlExpansionEnabled) => {\r\n if (!view) return '';\r\n if (!isFinalUrlExpansionEnabled) {\r\n return i18n.getString(_TL_('Use the Final URL only'));\r\n }\r\n const selected = view.selectedTargetsView.viewmodel.values();\r\n const exactUrls = [];\r\n const rules = [];\r\n\r\n _.each(selected, (target) => {\r\n const conditions = target.Criterion.WebPage.Parameter.Conditions;\r\n _.each(conditions, (condition) => {\r\n if (condition.Operator === 'Equals') {\r\n exactUrls.push(condition.ArgumentOperand);\r\n } else {\r\n rules.push(`URL contains ${condition.ArgumentOperand}`);\r\n }\r\n });\r\n });\r\n\r\n const exactUrlsDetails = exactUrls.length > 0 ? `${i18n.getString(_TL_('Excluded URLs: '))}${exactUrls.join(', ')}` : null;\r\n const rulesDetails = rules.length > 0 ? `${i18n.getString(_TL_('Exclusion rules: '))}${rules.join(', ')}`:null;\r\n\r\n if (exactUrlsDetails && rulesDetails) {\r\n return `${exactUrlsDetails}; ${rulesDetails}`;\r\n }\r\n return exactUrlsDetails || rulesDetails || i18n.getString(_TL_('You’ve enabled Final URL expansion'));\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const getBidStrategyMap = _.memoize(() => ({\r\n MaxClicks: _TL_('Maximize clicks'),\r\n MaxConversions: _TL_('Maximize conversions'),\r\n MaxConversionValue: _TL_('Maximize conversion value'),\r\n MaxImpressions: _TL_('Maximize impressions'),\r\n MaxReach: _TL_('Maximize reach'),\r\n ManualCpa: _TL_('CPI (cost per install)'),\r\n ManualCpm: _TL_('CPM (cost per thousand impressions) for maximizing reach'),\r\n ManualCpv: _TL_('CPCV (cost per completed view)'),\r\n ManualCpc: _TL_('CPC (cost per click)'),\r\n EnhancedCpc: _TL_('Enhanced CPC (enhanced cost per click)'),\r\n CostPerSale: _TL_('Cost per Sale'),\r\n TargetRoas: _TL_('Target ROAS'),\r\n TargetCpa: _TL_('Target CPA'),\r\n TargetImpressionShare: _TL_('Target impression share'),\r\n}));\r\n\r\nexport const getBidTitleDetails = (i18n, bid) => {\r\n if (!bid || !getBidStrategyMap()[bid.Type]) {\r\n return '';\r\n }\r\n\r\n return i18n.getString(getBidStrategyMap()[bid.Type]);\r\n};\r\n\r\nexport const getBidBudgetTitleDetails = (serverContext, i18n, bid, budget) => {\r\n const currencyCode = serverContext.CurrentAccount.CurrencyCode;\r\n const amount = _.isNumber(budget.Amount) ?\r\n i18n.formatCurrency(budget.Amount, currencyCode) :\r\n '-';\r\n const bidType = getBidTitleDetails(i18n, bid);\r\n let bidVal = '';\r\n if (bid.TargetCpa) {\r\n bidVal = i18n.formatCurrency(bid.TargetCpa, currencyCode);\r\n }\r\n if (bid.TargetRoas) {\r\n bidVal = i18n.formatPercent(bid.TargetRoas);\r\n }\r\n return i18n.getString(_TL_('{{amount}} per day; {{bidType}}, default CPA {{bidVal}}'), {\r\n amount, bidType, bidVal,\r\n });\r\n};\r\n\r\nexport const getBudgetTitleDetails = (serverContext, i18n, budget) => {\r\n const currencyCode = serverContext.CurrentAccount.CurrencyCode;\r\n const amount = _.isNumber(budget && budget.Amount) ?\r\n i18n.formatCurrency(budget.Amount, currencyCode) :\r\n '-';\r\n return i18n.getString(_TL_('{{amount}} per day'), {\r\n amount,\r\n });\r\n};\r\n","import { pluck } from 'underscore';\r\n\r\nexport const getListingGroupDetails = (i18n, isEditing, {\r\n productFilter,\r\n listingGroup,\r\n}) => {\r\n if (isEditing && productFilter) {\r\n return `${i18n.getString(_TL_('Products: Filterd by '))}${productFilter}`;\r\n }\r\n if (!isEditing) {\r\n if (!listingGroup) {\r\n return i18n.getString('All products');\r\n }\r\n return `${listingGroup.operand}: ${pluck(listingGroup.items, 'primary').join(',')}`;\r\n }\r\n return '';\r\n};\r\n","export const getStoreTitleDetails = (i18n, storesData, storeContainerData = {}, isAudience = false) => {\r\n const storeId = storeContainerData.ProviderId;\r\n if (!storeId) {\r\n return i18n.getString(_TL_('No store added'));\r\n }\r\n const { countries, stores } = storesData;\r\n const store =\r\n (stores[storeId] && stores[storeId].text) ||\r\n `ID: ${storeId}`; // Display only Store ID while stores are loading. No localization to be consistent with how we display stores.\r\n const salesCountry =\r\n (countries[storeContainerData.SalesCountry] && countries[storeContainerData.SalesCountry].text)\r\n || storeContainerData.SalesCountry;\r\n const localInventoryAdsEnabled = storeContainerData.LocalInventoryAdsEnabled ?\r\n i18n.getString(_TL_('Enabled')) :\r\n i18n.getString(_TL_('Disabled'));\r\n\r\n if (isAudience) {\r\n return i18n.getString(_TL_('Merchant Center store: {{store}}. Country/region of sale: {{salesCountry}}'), {\r\n store, salesCountry,\r\n });\r\n }\r\n return i18n.getString(_TL_('Merchant Center store: {{store}}. Country/region of sale: {{salesCountry}}. Local inventory ads: {{localInventoryAdsEnabled}}'), {\r\n store, salesCountry, localInventoryAdsEnabled,\r\n });\r\n};\r\n","export const getSearchThemeDetails = (i18n, searchThemes) => {\r\n const selected = searchThemes && searchThemes.filter(item => item.Status !== 'Deleted');\r\n if (selected && selected.length > 0) {\r\n return selected.map(item => item.SearchTheme).join(', ');\r\n }\r\n return i18n.getString(_TL_('No search themes added'));\r\n};\r\n","export const getDisclaimerTitleDetails = (i18n, disclaimer) => {\r\n const {\r\n selectedDisclaimer,\r\n } = disclaimer || {};\r\n\r\n if (selectedDisclaimer && selectedDisclaimer.Name) {\r\n return selectedDisclaimer.Name;\r\n }\r\n return i18n.getString(_TL_('No disclaimer selected'));\r\n};\r\n","export const LocalizationKeys = {\r\n ManualCpc: _TL_('Fixed bid per night (per click)'),\r\n PercentCpc: _TL_('Percentage of room price (per click)'),\r\n Commission: _TL_('Percentage of room price (per stay)'),\r\n Individual: _TL_('Individual budget'),\r\n individual: _TL_('Individual budget'),\r\n 'Increase by': _TL_('Increase by'),\r\n 'Decrease by': _TL_('Decrease by'),\r\n UrlCustomParameters: _TL_('Custom parameters'),\r\n TrackingUrlTemplate: _TL_('Tracking template'),\r\n FinalUrlSuffix: _TL_('Final URL suffix'),\r\n ExcludedSites: _TL_('Website'),\r\n ExcludedIPs: _TL_('IP Address'),\r\n Targeted: _TL_('Targeted'),\r\n Computer: _TL_('Computer'),\r\n Desktop: _TL_('Desktop'),\r\n Tablet: _TL_('Tablet'),\r\n Smartphone: _TL_('Smartphone'),\r\n Monday: _TL_('Monday'),\r\n Tuesday: _TL_('Tuesday'),\r\n Wednesday: _TL_('Wednesday'),\r\n Thursday: _TL_('Thursday'),\r\n Friday: _TL_('Friday'),\r\n Saturday: _TL_('Saturday'),\r\n Sunday: _TL_('Sunday'),\r\n 'Selected date': _TL_('Selected date'),\r\n 'Default date': _TL_('Default date'),\r\n};\r\n\r\nexport const ConversionGoalKeyToStringMapping = {\r\n Campaign_Goals_Account_Level_Label: _TL_('Use the account \"Include in conversions\" setting'),\r\n Campaign_Goals_Account_Level_Subtext: _TL_('This option applies the same conversion goals that you have selected at the account level to this campaign.'),\r\n Campaign_Goals_Campaign_Level_Label: _TL_('Choose conversion goals for this campaign'),\r\n Campaign_Goals_Campaign_Level_Subtext: _TL_('This option allows you to select specific conversion goals for this campaign only.'),\r\n GoalSelector_List_Header: _TL_('Available goals: {{itemCount}}'),\r\n GoalSelector_Result_List_Header: _TL_('Selected goal: {{itemCount}}'),\r\n GoalSelector_Radio_Aria_Label: _TL_('Select which conversions are included in the Conversion columns for this campaign and used for optimizing your bid strategy. Updating this setting will override the “Include in conversions” setting made at the account level.'),\r\n GoalSelector_EmptyList_Content: _TL_('No results to display.'),\r\n EntitySelector_Search_Placeholder: _TL_('Search'),\r\n UnifiedEventTracking_Goal_Creation_Type_Event_Category: _TL_('Category'),\r\n GoalSelector_Result_Action_Bar: _TL_('Select all on this page'),\r\n GoalSelector_TrackingStatus_Value_InactiveDueToTagUnavailable: _TL_('This goal is not associated with an active UET tag. Verify the tag setup and associate the goal with a valid UET tag.'),\r\n GoalSelector_TrackingStatus_Value_NoRecentConversion: _TL_(\"This goal doesn't have enough conversions to optimize campaign performance because it hasn't recorded conversions in the past 7 days. Ensure that for an online goal, the UET tag is placed on every webpage.\"),\r\n GoalSelector_TrackingStatus_Value_RecordingConversions: _TL_(\"We've seen your UET tag and have recorded conversions within the last 7 days. If your conversion window is greater than 7 days and you are filtering on the last 7 days, you may see this status even if no conversions are shown in the Conversions column, as conversions are reported at the time of the click.\"),\r\n GoalSelector_TrackingStatus_Value_TagInactive: _TL_('No website activity data has been received from the UET tag associated with this goal in the past 24 hours. Verify the UET tag setup or associate the goal with an active tag.'),\r\n GoalSelector_TrackingStatus_Value_Unverified: _TL_(\"We haven't received any data from the UET tag for this goal. For new goals, allow 24 hours for conversions to start recording. Otherwise, verify the UET tag setup or associate this goal with an active tag.\"),\r\n Segment_Goal_Category_Download: _TL_('Download'),\r\n Segment_Goal_Category_Purchase: _TL_('Purchase'),\r\n Segment_Goal_Category_AddToCart: _TL_('Add to cart'),\r\n Segment_Goal_Category_BeginCheckout: _TL_('Begin checkout'),\r\n Segment_Goal_Category_BookAppointment: _TL_('Book appointment'),\r\n Segment_Goal_Category_Contact: _TL_('Contact'),\r\n Segment_Goal_Category_GetDirections: _TL_('Get directions'),\r\n Segment_Goal_Category_InStoreVisit: _TL_('In-store visit'),\r\n Segment_Goal_Category_Other: _TL_('Other'),\r\n Segment_Goal_Category_OutboundClick: _TL_('Outbound click'),\r\n Segment_Goal_Category_PageView: _TL_('Page view'),\r\n Segment_Goal_Category_RequestQuote: _TL_('Request quote'),\r\n Segment_Goal_Category_SignUp: _TL_('Sign-up'),\r\n Segment_Goal_Category_SubmitLeadForm: _TL_('Submit lead form'),\r\n Segment_Goal_Category_Subscribe: _TL_('Subscribe'),\r\n Segment_Goal_Category_Unassigned: _TL_('Unassigned'),\r\n Campaign_Goals_Option_Goals: _TL_('Goals'),\r\n Campaign_Goals_Option_GoalSets: _TL_('Goal Sets'),\r\n EntitySelector_Pagination_Page: _TL_('Page:'),\r\n EntitySelector_Pagination_TotalPageCountText: _TL_('of'),\r\n EntitySelector_Pagination_PreviousPageText: _TL_('Previous page'),\r\n EntitySelector_Pagination_NextPageText: _TL_('Next page'),\r\n 'Remove all': 'Remove all',\r\n 'No results found for {{searchText}}': _TL_('No results found for {{searchText}}'),\r\n 'Found {{totalCount}} Results for {{searchText}}': _TL_('Found {{totalCount}} Results for {{searchText}}'),\r\n};\r\n","export const getAdsStepStyles = (/* components, theme */) => ({\r\n displayAdPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n width: 400,\r\n marginTop: 20,\r\n float: 'left',\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n addNewImageButton: {\r\n height: 96,\r\n width: 170,\r\n borderRadius: '6px',\r\n border: '1px dashed #c8c6c4',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n displayAdPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n height: 5,\r\n },\r\n displayAdPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n displayAdPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '2px',\r\n display: 'flex',\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: '100%',\r\n },\r\n emptyPreview: {\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 6,\r\n },\r\n adPreviewRoot: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n paddingTop: 0,\r\n position: 'sticky',\r\n top: '-10px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n marginTop: '-18px',\r\n },\r\n adPreviewSizeHeader: {\r\n height: 40,\r\n },\r\n adPreviewPageTitle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n adPreviewSizeTitle: {\r\n fontSize: 14,\r\n fontWeight: 700,\r\n paddingRight: 5,\r\n },\r\n adPreviewPanel: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n position: 'sticky',\r\n top: '0px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n marginTop: 16,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n },\r\n displayAd: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 20,\r\n },\r\n previewTagText: {\r\n fontSize: 12,\r\n color: '#605E5C',\r\n },\r\n pagination: {\r\n paddingTop: 20,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n columnGap: '10px',\r\n },\r\n pageControl: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n pageControlPreviousIcon: {\r\n paddingRight: 8,\r\n },\r\n pageControlNextIcon: {\r\n paddingLeft: 8,\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n marginRight: 10,\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n displayAdPanelContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n placementInfos: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n columnGap: 10,\r\n rowGap: '5px',\r\n },\r\n enabledPlacement: {\r\n backgroundColor: '#DFF6DD',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n enabledText: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n disabledPlacement: {\r\n backgroundColor: '#F3F2F1',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n disabledText: {\r\n color: '#605E5C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n fontStyle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n placementLabel: {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n },\r\n placmentResolution: {\r\n paddingTop: 5,\r\n paddingBottom: 5,\r\n },\r\n displayAdPanelFinalUrlContainer: {\r\n width: 45,\r\n },\r\n displayImageLabel: {\r\n marginBottom: 4,\r\n },\r\n});\r\n\r\nexport const getCreativeWorkbenchStyles = () => ({\r\n creativeWorkbenchRoot: {\r\n position: 'relative',\r\n display: 'flex',\r\n padding: '24px',\r\n height: 'auto',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n borderRadius: '12px',\r\n marginTop: '16px',\r\n border: '1px dashed #B3B0AD',\r\n },\r\n header: {\r\n fontSize: 16,\r\n fontWeight: '600',\r\n lineHeight: '20px',\r\n display: 'flex',\r\n },\r\n copilotIcon: {\r\n paddingTop: '3px !important',\r\n paddingLeft: '0px !important',\r\n paddingRight: '9px !important',\r\n marginBottom: '2px',\r\n height: '21px',\r\n },\r\n description: {\r\n fontSize: 14,\r\n fontWeight: '400',\r\n color: 'rgba(96, 94, 92, 1)',\r\n lineHeight: '20px',\r\n },\r\n});\r\n\r\nexport const getImageSuggestionCarouselStyles = () => ({\r\n imageSuggestionCarouselRoot: {\r\n '& .image-suggestion-carousel-root': {\r\n '& .panel': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n marginTop: 10,\r\n },\r\n croppedImage: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n width: '107px',\r\n height: '76px',\r\n background: '#F3F2F1',\r\n },\r\n});\r\n\r\nexport const getDisplayAdStepBaseStyles = () => ({\r\n displayAdsStepRoot: {\r\n '& .display-ad-panel-root': {\r\n width: '100% !important',\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\n\r\nexport const CropPreview = props => (\r\n
\r\n
\r\n
\r\n);\r\n","import { DropdownMenuItemType } from '@bingads-webui-react/fabric-control';\r\n\r\nconst partnerTrafficString = _TL_('Eligible to serve on partner traffic');\r\nconst onoTrafficString = _TL_('Eligible to serve on Microsoft sites');\r\n\r\nconst standard = [{\r\n width: 970,\r\n height: 250,\r\n text: _TL_('970 x 250 — Billboard'),\r\n sizeText: _TL_('970 x 250'),\r\n targetText: _TL_('Billboard'),\r\n}, {\r\n width: 970,\r\n height: 90,\r\n text: _TL_('970 x 90 — Super leaderboard'),\r\n sizeText: _TL_('970 x 90'),\r\n targetText: _TL_('Super leaderboard'),\r\n}, {\r\n width: 728,\r\n height: 90,\r\n text: _TL_('728 x 90 — Leaderboard'),\r\n sizeText: _TL_('728 x 90'),\r\n targetText: _TL_('Leaderboard'),\r\n}, {\r\n width: 468,\r\n height: 60,\r\n text: _TL_('468 x 60 — Full banner'),\r\n sizeText: _TL_('468 x 60'),\r\n targetText: _TL_('Full banner'),\r\n}, {\r\n width: 336,\r\n height: 280,\r\n text: _TL_('336 x 280 — Large rectangle'),\r\n sizeText: _TL_('336 x 280'),\r\n targetText: _TL_('Large rectangle'),\r\n}, {\r\n width: 300,\r\n height: 600,\r\n text: _TL_('300 x 600 — Half-page'),\r\n sizeText: _TL_('300 x 600'),\r\n targetText: _TL_('Half-page'),\r\n}, {\r\n width: 300,\r\n height: 250,\r\n text: _TL_('300 x 250 — Medium rectangle'),\r\n sizeText: _TL_('300 x 250'),\r\n targetText: _TL_('Medium rectangle'),\r\n}, {\r\n width: 250,\r\n height: 250,\r\n text: _TL_('250 x 250 — Square'),\r\n sizeText: _TL_('250 x 250'),\r\n targetText: _TL_('Square'),\r\n}, {\r\n width: 234,\r\n height: 60,\r\n text: _TL_('234 x 60 — Half-banner'),\r\n sizeText: _TL_('234 x 60'),\r\n targetText: _TL_('Half-banner'),\r\n}, {\r\n width: 180,\r\n height: 150,\r\n text: _TL_('180 x 150 — Rectangle'),\r\n sizeText: _TL_('180 x 150'),\r\n targetText: _TL_('Rectangle'),\r\n}, {\r\n width: 160,\r\n height: 600,\r\n text: _TL_('160 x 600 — Wide skyscraper'),\r\n sizeText: _TL_('160 x 600'),\r\n targetText: _TL_('Wide skyscraper'),\r\n}, {\r\n width: 120,\r\n height: 600,\r\n text: _TL_('120 x 600 — Skyscraper'),\r\n sizeText: _TL_('120 x 600'),\r\n targetText: _TL_('Skyscraper'),\r\n}];\r\n\r\nconst mobile = [{\r\n width: 480,\r\n height: 320,\r\n text: _TL_('480 x 320 — Landscape (interstitial)'),\r\n sizeText: _TL_('480 x 320'),\r\n targetText: _TL_('Landscape (interstitial)'),\r\n}, {\r\n width: 320,\r\n height: 480,\r\n text: _TL_('320 x 480 — Portrait (interstitial)'),\r\n sizeText: _TL_('320 x 480'),\r\n targetText: _TL_('Portrait (interstitial)'),\r\n}, {\r\n width: 320,\r\n height: 100,\r\n text: _TL_('320 x 100 — Large banner'),\r\n sizeText: _TL_('320 x 100'),\r\n targetText: _TL_('Large banner'),\r\n}, {\r\n width: 320,\r\n height: 50,\r\n text: _TL_('320 x 50 — Leaderboard'),\r\n sizeText: _TL_('320 x 50'),\r\n targetText: _TL_('Leaderboard'),\r\n}, {\r\n width: 300,\r\n height: 50,\r\n text: _TL_('300 x 50 — Banner'),\r\n sizeText: _TL_('300 x 50'),\r\n targetText: _TL_('Banner'),\r\n}, {\r\n width: 216,\r\n height: 36,\r\n text: _TL_('216 x 36 — Large banner'),\r\n sizeText: _TL_('216 x 36'),\r\n targetText: _TL_('Large banner'),\r\n}, {\r\n width: 168,\r\n height: 28,\r\n text: _TL_('168 x 28 — Medium banner'),\r\n sizeText: _TL_('168 x 28'),\r\n targetText: _TL_('Medium banner'),\r\n}, {\r\n width: 120,\r\n height: 20,\r\n text: _TL_('120 x 20 — Small banner'),\r\n sizeText: _TL_('120 x 20'),\r\n targetText: _TL_('Small banner'),\r\n}];\r\n\r\nconst getSupportedSize = (supportedSize, source) => {\r\n if (!supportedSize || !source) {\r\n return [];\r\n }\r\n\r\n return source.filter(sourceSize => supportedSize.some(baseSize => baseSize.width === sourceSize.width && baseSize.height === sourceSize.height));\r\n};\r\n\r\nconst getStandardOnO = () => {\r\n const supportedSize = [{\r\n width: 300,\r\n height: 250,\r\n }, {\r\n width: 728,\r\n height: 90,\r\n }, {\r\n width: 300,\r\n height: 600,\r\n }, {\r\n width: 160,\r\n height: 600,\r\n }, {\r\n width: 970,\r\n height: 250,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, standard);\r\n};\r\n\r\nconst getStandardOthers = () => {\r\n const supportedSize = [{\r\n width: 336,\r\n height: 280,\r\n }, {\r\n width: 250,\r\n height: 250,\r\n }, {\r\n width: 120,\r\n height: 600,\r\n }, {\r\n width: 970,\r\n height: 90,\r\n }, {\r\n width: 468,\r\n height: 60,\r\n }, {\r\n width: 234,\r\n height: 60,\r\n }, {\r\n width: 180,\r\n height: 150,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, standard);\r\n};\r\n\r\nconst getMobileOnO = () => {\r\n const supportedSize = [{\r\n width: 320,\r\n height: 50,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, mobile);\r\n};\r\n\r\nconst getMobileOthers = () => {\r\n const supportedSize = [{\r\n width: 320,\r\n height: 100,\r\n }, {\r\n width: 320,\r\n height: 480,\r\n }, {\r\n width: 480,\r\n height: 320,\r\n }, {\r\n width: 120,\r\n height: 20,\r\n }, {\r\n width: 300,\r\n height: 50,\r\n }, {\r\n width: 216,\r\n height: 36,\r\n }, {\r\n width: 168,\r\n height: 28,\r\n }];\r\n\r\n return getSupportedSize(supportedSize, mobile);\r\n};\r\n\r\nconst getOptionsTranslated = (\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n sourceOptions\r\n) => {\r\n const resultOptions = [];\r\n sourceOptions.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n resultOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n return resultOptions;\r\n};\r\n\r\nexport const getAllStandardOptions = () => getStandardOnO().concat(getStandardOthers());\r\n\r\nexport const getAllMobileOptions = () => getMobileOnO().concat(getMobileOthers());\r\n\r\nexport const getStandardTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const standardOnO = getStandardOnO();\r\n const standardOnoOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, standardOnO);\r\n const standardOthers = getStandardOthers();\r\n const standardOtherOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, standardOthers);\r\n\r\n const options = [\r\n ...(standardOnoOptions.length > 0 ? [{\r\n key: 'standardOnoPlacements',\r\n text: i18n.getString(onoTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...standardOnoOptions,\r\n ...(standardOnoOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(standardOtherOptions.length > 0 ? [{\r\n key: 'standardOtherPlacements',\r\n text: i18n.getString(partnerTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...standardOtherOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n\r\nexport const getMobileTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const mobileOnO = getMobileOnO();\r\n const mobileOnoOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, mobileOnO);\r\n const mobileOthers = getMobileOthers();\r\n const mobileOtherOptions = getOptionsTranslated(i18n, sourceWidth, sourceHeight, mobileOthers);\r\n\r\n const options = [\r\n ...(mobileOnoOptions.length > 0 ? [{\r\n key: 'mobileOnoPlacements',\r\n text: i18n.getString(onoTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...mobileOnoOptions,\r\n ...(mobileOnoOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(mobileOtherOptions.length > 0 ? [{\r\n key: 'mobileOtherPlacements',\r\n text: i18n.getString(partnerTrafficString),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...mobileOtherOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n\r\nexport const getTargetOptions = ({\r\n i18n,\r\n sourceWidth,\r\n sourceHeight,\r\n}) => {\r\n const standardOptions = [];\r\n standard.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n standardOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n const mobileOptions = [];\r\n mobile.forEach(({\r\n width,\r\n height,\r\n text,\r\n sizeText,\r\n targetText,\r\n }) => {\r\n if ((!sourceHeight || sourceHeight >= height) && (!sourceWidth || sourceWidth >= width)) {\r\n mobileOptions.push({\r\n key: `Image${width}x${height}`,\r\n width,\r\n height,\r\n text: i18n.getString(text),\r\n sizeText: i18n.getString(sizeText),\r\n targetText: i18n.getString(targetText),\r\n });\r\n }\r\n });\r\n\r\n const options = [\r\n ...(standardOptions.length > 0 ? [{\r\n key: 'standard',\r\n text: i18n.getString(_TL_('Standard')),\r\n itemType: DropdownMenuItemType.Header,\r\n }]: []),\r\n ...standardOptions,\r\n ...(standardOptions.length > 0 ? [{\r\n key: 'divider',\r\n itemType: DropdownMenuItemType.Divider,\r\n }]: []),\r\n ...(mobileOptions.length > 0 ? [{\r\n key: 'Mobile',\r\n text: i18n.getString(_TL_('Mobile')),\r\n itemType: DropdownMenuItemType.Header,\r\n }]:[]),\r\n ...mobileOptions,\r\n ];\r\n\r\n return options;\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useEffect, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text, FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Link } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { CropPreview } from './cropped-preview';\r\nimport { getTargetOptions } from './image-targets';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nexport const AdPreview = (props) => {\r\n const {\r\n i18n,\r\n ads,\r\n onUpdateCurrentImageIndex,\r\n disablePagination,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n } = props;\r\n\r\n const displayAds = (ads && ads.data) || [];\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n const { currentPageIndex } = ads;\r\n const [currentImageIdx, setCurrentImageIdx] = useState(0);\r\n const targetOptions = useMemo(() => getTargetOptions({ i18n }), [i18n]);\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const goToPrevImage = () => {\r\n setCurrentImageIdx(currentImageIdx - 1);\r\n };\r\n\r\n const goToNextImage = () => {\r\n setCurrentImageIdx(currentImageIdx + 1);\r\n };\r\n\r\n const goToImageIndex = (idx) => {\r\n setCurrentImageIdx(idx);\r\n };\r\n\r\n const displayAdsArray = _.isArray(displayAds) ? displayAds : [];\r\n const displayAdsInPage = displayAdsArray.slice(getPageAdjustedIndex(0), getPageAdjustedIndex(9) + 1);\r\n const currentAd = displayAds[getPageAdjustedIndex(currentImageIdx)] || displayAds[0];\r\n const currentImage = (currentAd && currentAd.data && currentAd.data.image) || undefined;\r\n const resizeImageHeight = useMemo(() => {\r\n if (currentImage && currentImage.cropHeight && currentImage.cropWidth) {\r\n const aspectRatio = currentImage.cropWidth / currentImage.cropHeight;\r\n const maxWidth = 458;\r\n return Math.min(maxWidth / aspectRatio, 280);\r\n }\r\n return 0;\r\n }, [currentImage]);\r\n\r\n const currentImageTarget = useMemo(() => {\r\n if (!currentImage) {\r\n return null;\r\n }\r\n const target = targetOptions.find(option => option.key === `Image${currentImage.targetWidth}x${currentImage.targetHeight}`);\r\n\r\n return target || null;\r\n }, [currentImage, targetOptions]);\r\n\r\n useEffect(() => {\r\n setCurrentImageIdx(0);\r\n }, [currentPageIndex]);\r\n\r\n useEffect(() => {\r\n if (currentImageIdx > displayAdsInPage.length - 1) {\r\n setCurrentImageIdx(0);\r\n }\r\n onUpdateCurrentImageIndex(currentImageIdx);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentImageIdx, displayAdsInPage.length]);\r\n\r\n return (\r\n
\r\n
\r\n {`${i18n.getString(_TL_('Preview'))}: ${i18n.getString(_TL_('Ad'))} ${currentImageIdx + 1}`} \r\n
\r\n
\r\n
\r\n {currentImageTarget &&\r\n
\r\n {currentImageTarget.sizeText}\r\n \r\n {currentImageTarget.targetText}\r\n \r\n
\r\n }\r\n
\r\n
\r\n { currentImage ? (\r\n ) : (\r\n
\r\n )\r\n }\r\n
\r\n {\r\n !disablePagination && displayAdsInPage.length > 1 && (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Previous ad'))} \r\n \r\n
\r\n {displayAdsInPage.map((image, idx) => (\r\n
\r\n goToImageIndex(idx)}\r\n onClick={() => goToImageIndex(idx)}\r\n className={classes.paginationIndicatorDot}\r\n style={{ backgroundColor: getPageAdjustedIndex(idx) === getPageAdjustedIndex(currentImageIdx) ? '#0078d4' : '#c8c6c4' }}\r\n />\r\n
\r\n ))}\r\n
\r\n \r\n {i18n.getString(_TL_('Next ad'))} \r\n \r\n
\r\n
\r\n )\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('This is an example of what your display ad might look like. Depending on placement, the actual ad shown may appear differently.'))}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAdPreview.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.instanceOf(Array),\r\n currentPageIndex: PropTypes.number,\r\n }).isRequired,\r\n disablePagination: PropTypes.bool,\r\n onUpdateCurrentImageIndex: PropTypes.func,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n};\r\n\r\nAdPreview.defaultProps = {\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n onUpdateCurrentImageIndex: _.noop,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Link, TextField } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { FontIcon, Text } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const Pagination = ({\r\n totalPages,\r\n disablePagination,\r\n classes,\r\n goToPrevPage,\r\n goToNextPage,\r\n goToPage,\r\n currentPageIndex,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n <>\r\n {totalPages > 1 && !disablePagination && (\r\n
\r\n
\r\n \r\n Prev \r\n \r\n goToPage(val)}\r\n />\r\n {i18n.getString(_TL_('of'))} {totalPages} \r\n \r\n {i18n.getString(_TL_('Next'))} \r\n \r\n
\r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nPagination.propTypes = {\r\n totalPages: PropTypes.number.isRequired,\r\n disablePagination: PropTypes.bool,\r\n classes: PropTypes.shape({\r\n pagination: PropTypes.shape({}).isRequired,\r\n pageControls: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n goToPrevPage: PropTypes.func.isRequired,\r\n goToNextPage: PropTypes.func.isRequired,\r\n goToPage: PropTypes.func.isRequired,\r\n currentPageIndex: PropTypes.number.isRequired,\r\n};\r\n\r\nPagination.defaultProps = {\r\n disablePagination: false,\r\n};\r\n","import _ from 'underscore';\r\nimport { AspectRatiosForDisplayAds } from '@bingads-webui-campaign-react/image-experience-model';\r\n\r\nexport const imageModelToViewModel = (imageModel) => {\r\n const type = /^Image(\\d+)x(\\d+)/.exec(imageModel.type);\r\n const width = parseInt(type[1], 10);\r\n const height = parseInt(type[2], 10);\r\n const image = {\r\n id: imageModel.id,\r\n disableEdit: imageModel.disableEdit,\r\n subType: 'DisplayCreativeImage',\r\n targetWidth: width,\r\n targetHeight: height,\r\n cropX: imageModel.cropSettings.SourceX,\r\n cropY: imageModel.cropSettings.SourceY,\r\n cropWidth: imageModel.cropSettings.SourceWidth,\r\n cropHeight: imageModel.cropSettings.SourceHeight,\r\n src: imageModel.src,\r\n text: imageModel.text,\r\n originalWidth: imageModel.width,\r\n originalHeight: imageModel.height,\r\n };\r\n\r\n return image;\r\n};\r\n\r\nexport const imagePlacementsToImage = ({ crops, defaults, selected }) => {\r\n const filtered = crops.filter(({ type, width, height }) => {\r\n const aspectRatio = AspectRatiosForDisplayAds[type];\r\n const { minSize: [minWidth, minHeight] } = aspectRatio;\r\n return width >= minWidth && height >= minHeight;\r\n });\r\n\r\n let selectedImage = null;\r\n if (selected) {\r\n const selectedIndex = filtered.findIndex(({ type }) => type === `Image${selected.TargetWidth}x${selected.TargetHeight}`);\r\n filtered[selectedIndex].cropSettings = {\r\n ...filtered[selectedIndex].cropSettings,\r\n SourceWidth: selected.CropWidth,\r\n SourceHeight: selected.CropHeight,\r\n SourceX: selected.CropX,\r\n SourceY: selected.CropY,\r\n };\r\n selectedImage = filtered[selectedIndex];\r\n } else {\r\n selectedImage = _.max(filtered, ({ cropSettings: { SourceHeight, SourceWidth }, width, height }) => (SourceHeight * SourceWidth) / width / height);\r\n }\r\n\r\n return {\r\n data: {\r\n ...defaults,\r\n image: imageModelToViewModel(selectedImage),\r\n imagePlacements: filtered,\r\n },\r\n };\r\n};\r\n\r\nexport const isAdsEmpty = ({\r\n displayAds,\r\n}) => {\r\n if (displayAds.length === 1) {\r\n return displayAds[0].data && displayAds[0].data.image === null && displayAds[0].data.FinalUrls.length === 1 && displayAds[0].data.FinalUrls[0] === undefined;\r\n }\r\n\r\n return !(displayAds.length > 1);\r\n};\r\n\r\nexport const addCreativesToDisplayAds = ({\r\n displayAds, creatives,\r\n}) => {\r\n if (isAdsEmpty({ displayAds })) {\r\n // no ad exists, all ads are empty.\r\n return [...creatives];\r\n }\r\n\r\n return [...displayAds, ...creatives];\r\n};\r\n\r\n// recursivley translate all the keys and child keys first character to upper case for now\r\nexport const transformFirstCharacterToUpperCase = (creativeData = {}) => Object.keys(creativeData).reduce((acc, key) => {\r\n if (typeof creativeData[key] === 'object') {\r\n acc[key.charAt(0).toUpperCase() + key.slice(1)] = transformFirstCharacterToUpperCase(creativeData[key]);\r\n } else {\r\n acc[key.charAt(0).toUpperCase() + key.slice(1)] = creativeData[key];\r\n }\r\n return acc;\r\n}, {});\r\n\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { noop } from 'underscore';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { AddImageCrudAdComponent } from '@bingads-webui-campaign-react/add-media-panel-crud-ad';\r\nimport { useAssetLibraryImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nexport const AddImage = ({\r\n advertiserCustomerId,\r\n accountId,\r\n i18n,\r\n perfMarker,\r\n preferenceService,\r\n permissions,\r\n oDataConfig,\r\n suggestionState,\r\n suggestionPoller,\r\n fullUrl,\r\n urlPrefix,\r\n onUpdateUrlPrefix,\r\n onUpdateUrlValue,\r\n dateFormat,\r\n timeZone,\r\n activityLogger,\r\n maxUploadNum,\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n onNewImageSelected,\r\n isAADUser,\r\n creativeEditorProps,\r\n serverContext,\r\n}) => {\r\n const [addImageChildPerfmarker] = useState(() => perfMarker.createChild('imagePicker'));\r\n const emptyFinalUrl = !fullUrl || fullUrl === `${urlPrefix}://`;\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 getInvestImages,\r\n onSelectStockImage,\r\n onImageSelected,\r\n onImagesSelected,\r\n socialMediaDataSource,\r\n customMediaSourceConfig,\r\n } = useAssetLibraryImagePicker({\r\n cid: advertiserCustomerId.toString(),\r\n aid: accountId.toString(),\r\n oDataConfig,\r\n onNewImageSelected,\r\n i18n,\r\n permissions,\r\n isDisplayAds: true,\r\n });\r\n\r\n const { suggestion = {} } = suggestionState;\r\n\r\n return (\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: emptyFinalUrl ? '' : fullUrl,\r\n finalUrlProtocol: `${urlPrefix}://`,\r\n onUpdateFinalUrl: onUpdateUrlValue,\r\n onUpdateFinalUrlPrefix: onUpdateUrlPrefix,\r\n isMultimediaAd: false,\r\n imageOption: constants.defaultImageOption,\r\n isDisplayAds: 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 investImageConfig={{\r\n getInvestImages,\r\n }}\r\n socialImageConfig={{\r\n socialMediaDataSource,\r\n activityLogger,\r\n }}\r\n assetLibraryConfig={{\r\n cid: advertiserCustomerId.toString(),\r\n aid: accountId.toString(),\r\n oDataConfig,\r\n dateFormat,\r\n timeZone,\r\n preferencesService: preferenceService,\r\n activityLogger,\r\n onImageSelected,\r\n onImagesSelected,\r\n onImageAddError: e => setImagePickerError(e),\r\n enableStockMultipleSelection: true,\r\n enableInvestMultipleSelection: true,\r\n enableWebsiteMultipleSelection: true,\r\n }}\r\n i18n={i18n}\r\n cid={advertiserCustomerId.toString()}\r\n aid={accountId.toString()}\r\n errorMessage={imagePickerError}\r\n imageType={null}\r\n customMediaSourceConfig={customMediaSourceConfig}\r\n perfMarker={addImageChildPerfmarker}\r\n permissions={permissions}\r\n isAADUser={isAADUser}\r\n creativeEditorProps={creativeEditorProps}\r\n serverContext={serverContext}\r\n />\r\n );\r\n};\r\n\r\nAddImage.propTypes = {\r\n advertiserCustomerId: PropTypes.number.isRequired,\r\n accountId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).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 }).isRequired,\r\n preferenceService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n }),\r\n }),\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 suggestionState: PropTypes.shape({\r\n suggestion: PropTypes.shape({}),\r\n carousel: PropTypes.shape({}),\r\n }).isRequired,\r\n suggestionPoller: PropTypes.shape({}).isRequired,\r\n adCreatorScenario: PropTypes.shape({\r\n scenarioName: PropTypes.string,\r\n scenarioValue: PropTypes.string,\r\n }),\r\n fullUrl: PropTypes.string,\r\n urlPrefix: PropTypes.string,\r\n onUpdateUrlPrefix: PropTypes.func,\r\n onUpdateUrlValue: PropTypes.func,\r\n dateFormat: PropTypes.string,\r\n timeZone: PropTypes.number,\r\n activityLogger: PropTypes.shape({}),\r\n maxUploadNum: PropTypes.number,\r\n displayImagePicker: PropTypes.bool,\r\n setDisplayImagePicker: PropTypes.func.isRequired,\r\n selectedMediaPanelSource: PropTypes.string.isRequired,\r\n setSelectedMediaPanelSource: PropTypes.func.isRequired,\r\n onNewImageSelected: PropTypes.func.isRequired,\r\n isAADUser: PropTypes.bool,\r\n creativeEditorProps: PropTypes.shape({}),\r\n assetLibraryConfigs: PropTypes.shape({\r\n imagePickerError: PropTypes.string,\r\n setImagePickerError: PropTypes.func,\r\n clearImagePickerError: PropTypes.func,\r\n uploadImage: PropTypes.func,\r\n processUploadedImage: PropTypes.func,\r\n minSize: PropTypes.number,\r\n addImageByUrl: PropTypes.func,\r\n getStockImages: PropTypes.func,\r\n getInvestImages: PropTypes.func,\r\n onSelectStockImage: PropTypes.func,\r\n onImageSelected: PropTypes.func,\r\n onImagesSelected: PropTypes.func,\r\n socialMediaDataSource: PropTypes.shape({}),\r\n customMediaSourceConfig: PropTypes.shape({}),\r\n }).isRequired,\r\n};\r\n\r\nAddImage.defaultProps = {\r\n permissions: {},\r\n adCreatorScenario: undefined,\r\n fullUrl: '',\r\n urlPrefix: '',\r\n onUpdateUrlPrefix: noop,\r\n onUpdateUrlValue: noop,\r\n dateFormat: 'M/d/yyyy',\r\n timeZone: 71,\r\n activityLogger: {},\r\n displayImagePicker: false,\r\n maxUploadNum: 1,\r\n isAADUser: false,\r\n creativeEditorProps: undefined,\r\n};\r\n","import React, { useContext, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport {\r\n getUrlPrefixAndDestination,\r\n getUpdatedFullUrlOnPrefixUpdate,\r\n getUpdatedFullUrlOnTextUpdate,\r\n validateAdUrl\r\n} from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useWebsiteSuggestion } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nimport { AddImage } from './add-image';\r\n\r\nconst getStyles = () => ({\r\n buttonContainer: {\r\n display: 'flex',\r\n padding: '32px',\r\n height: '134px',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n borderRadius: '12px',\r\n marginTop: '16px',\r\n border: '1px dashed #B3B0AD',\r\n },\r\n});\r\n\r\nconst PopulateImages = ({\r\n aid,\r\n i18n,\r\n perfMarker,\r\n preferenceService,\r\n permissions,\r\n oDataConfig,\r\n serverContext,\r\n onNewImageSelected,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n instrumentation,\r\n campaignId,\r\n onUpdateUrl,\r\n fullUrl,\r\n maxUploadNum,\r\n showAddButton,\r\n creativeEditorProps,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const activity = useContext(ActivityContext);\r\n const scenario = useContext(ScenarioContext);\r\n const [privateUrl, setPrivateUrl] = useState('');\r\n\r\n const url = useMemo(() => {\r\n if (validateAdUrl(fullUrl)=== null) {\r\n return fullUrl;\r\n }\r\n\r\n return privateUrl || 'https://';\r\n }, [fullUrl, privateUrl]);\r\n\r\n const urlPrefixValue = useMemo(() => {\r\n const [prefix] = getUrlPrefixAndDestination(url);\r\n return prefix;\r\n }, [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: activity.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 });\r\n\r\n const updateUrl = (evt) => {\r\n const { value } = evt.target;\r\n const newUrl = getUpdatedFullUrlOnTextUpdate(urlPrefixValue, value);\r\n if (onUpdateUrl) {\r\n onUpdateUrl(newUrl);\r\n } else {\r\n setPrivateUrl(newUrl);\r\n }\r\n };\r\n\r\n const updateUrlPrefix = (evt, { text }) => {\r\n const newPrefix = text.substring(0, text.length - 3);\r\n const [, original] = getUrlPrefixAndDestination(url);\r\n const newUrl = getUpdatedFullUrlOnPrefixUpdate(original, newPrefix);\r\n if (onUpdateUrl) {\r\n onUpdateUrl(newUrl);\r\n } else {\r\n setPrivateUrl(newUrl);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n { showAddButton &&\r\n
\r\n {\r\n setDisplayImagePicker(true);\r\n }}\r\n className=\"add-image-button\"\r\n styles={{ root: { minWidth: '200px', marginTop: 16 } }}\r\n />\r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nPopulateImages.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n }).isRequired,\r\n preferenceService: PropTypes.shape({\r\n setAtUserLevel: PropTypes.func,\r\n findByNameAtUserLevel: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n }),\r\n }).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 serverContext: PropTypes.shape({\r\n CurrentAccount: PropTypes.shape({\r\n AdvertiserCustomerID: PropTypes.number,\r\n TimeZone: PropTypes.number,\r\n }),\r\n CurrentUser: PropTypes.shape({\r\n CultureDateTimeFormat: PropTypes.shape({\r\n ShortDatePattern: PropTypes.string,\r\n }),\r\n }),\r\n }).isRequired,\r\n onNewImageSelected: PropTypes.func.isRequired,\r\n selectedMediaPanelSource: PropTypes.string.isRequired,\r\n setSelectedMediaPanelSource: PropTypes.func.isRequired,\r\n displayImagePicker: PropTypes.bool.isRequired,\r\n setDisplayImagePicker: PropTypes.func.isRequired,\r\n instrumentation: PropTypes.shape({\r\n addScenario: PropTypes.func,\r\n }).isRequired,\r\n onUpdateUrl: PropTypes.func,\r\n fullUrl: PropTypes.string,\r\n maxUploadNum: PropTypes.number,\r\n showAddButton: PropTypes.bool,\r\n creativeEditorProps: PropTypes.shape({}),\r\n};\r\n\r\nPopulateImages.defaultProps = {\r\n onUpdateUrl: undefined,\r\n fullUrl: '',\r\n maxUploadNum: 10,\r\n showAddButton: true,\r\n creativeEditorProps: undefined,\r\n};\r\n\r\nconst wrapped = withPreference(withInstrumentation(PopulateImages));\r\n\r\nexport { wrapped as PopulateImages };\r\n","import _ from 'underscore';\r\n\r\n// errors\r\nexport const errors = {\r\n NO_RECOMMENDATION: _TL_('There are no recommendations for this Final URL'),\r\n FinalURL: _TL_('Unable to generate recommendations for this Final URL'),\r\n DEFAULT: _TL_('Unable to generate recommendations'),\r\n};\r\n\r\n// convert placementTexts and placements to a map\r\nexport const placements = {\r\n SuperLeaderboard: {\r\n name: _TL_('970x90 Super leaderboard'),\r\n size: '970x90',\r\n },\r\n Leaderboard: {\r\n name: _TL_('728x90 Leaderboard'),\r\n size: '728x90',\r\n },\r\n FullBanner: {\r\n name: _TL_('468x60 Full banner'),\r\n size: '468x60',\r\n },\r\n SmallLeaderboard: {\r\n name: _TL_('320x50 Small leaderboard'),\r\n size: '320x50',\r\n },\r\n Banner: {\r\n name: _TL_('300x50 Banner'),\r\n size: '300x50',\r\n },\r\n LargeBanner: {\r\n name: _TL_('216x36 Large banner'),\r\n size: '216x36',\r\n },\r\n MediumBanner: {\r\n name: _TL_('168x28 Medium banner'),\r\n size: '168x28',\r\n },\r\n SmallBanner: {\r\n name: _TL_('120x20 Small banner'),\r\n size: '120x20',\r\n },\r\n HalfBanner: {\r\n name: _TL_('234x60 Half banner'),\r\n size: '234x60',\r\n },\r\n Billboard: {\r\n name: _TL_('970x250 Billboard'),\r\n size: '970x250',\r\n },\r\n LandscapeLargeBanner: {\r\n name: _TL_('320x100 Landscape large banner'),\r\n size: '320x100',\r\n },\r\n Landscape: {\r\n name: _TL_('480x320 Landscape'),\r\n size: '480x320',\r\n },\r\n LargeRectangle: {\r\n name: _TL_('336x280 Large rectangle'),\r\n size: '336x280',\r\n },\r\n MediumRectangle: {\r\n name: _TL_('300x250 Medium rectangle'),\r\n size: '300x250',\r\n },\r\n Rectangle: {\r\n name: _TL_('180x150 Rectangle'),\r\n size: '180x150',\r\n },\r\n Square: {\r\n name: _TL_('250x250 Square'),\r\n size: '250x250',\r\n },\r\n Portrait: {\r\n name: _TL_('320x480 Portrait'),\r\n size: '320x480',\r\n },\r\n HalfPage: {\r\n name: _TL_('300x600 Half page'),\r\n size: '300x600',\r\n },\r\n WideSkyscraper: {\r\n name: _TL_('160x600 Wide skyscraper'),\r\n size: '160x600',\r\n },\r\n Skyscraper: {\r\n name: _TL_('120x600 Skyscraper'),\r\n size: '120x600',\r\n },\r\n};\r\n\r\nconst ratios = {\r\n [placements.SuperLeaderboard.size]: 'SuperLeaderboard',\r\n [placements.Leaderboard.size]: 'Leaderboard',\r\n [placements.FullBanner.size]: 'FullBanner',\r\n [placements.SmallLeaderboard.size]: 'SmallLeaderboard',\r\n [placements.Banner.size]: 'Banner',\r\n [placements.LargeBanner.size]: 'LargeBanner',\r\n [placements.MediumBanner.size]: 'MediumBanner',\r\n [placements.SmallBanner.size]: 'SmallBanner',\r\n [placements.HalfBanner.size]: 'HalfBanner',\r\n [placements.Billboard.size]: 'Billboard',\r\n [placements.LandscapeLargeBanner.size]: 'LandscapeLargeBanner',\r\n [placements.Landscape.size]: 'Landscape',\r\n [placements.LargeRectangle.size]: 'LargeRectangle',\r\n [placements.MediumRectangle.size]: 'MediumRectangle',\r\n [placements.Rectangle.size]: 'Rectangle',\r\n [placements.Square.size]: 'Square',\r\n [placements.Portrait.size]: 'Portrait',\r\n [placements.HalfPage.size]: 'HalfPage',\r\n [placements.WideSkyscraper.size]: 'WideSkyscraper',\r\n [placements.Skyscraper.size]: 'Skyscraper',\r\n};\r\n\r\nexport const ratioGrouping = {\r\n XWide: [\r\n ratios[placements.SuperLeaderboard.size],\r\n ratios[placements.Leaderboard.size],\r\n ratios[placements.FullBanner.size],\r\n ratios[placements.SmallLeaderboard.size],\r\n ratios[placements.Banner.size],\r\n ratios[placements.LargeBanner.size],\r\n ratios[placements.MediumBanner.size],\r\n ratios[placements.SmallBanner.size],\r\n ],\r\n Landscape: [\r\n ratios[placements.HalfBanner.size],\r\n ratios[placements.Billboard.size],\r\n ratios[placements.LandscapeLargeBanner.size],\r\n ratios[placements.Landscape.size],\r\n ],\r\n Square: [\r\n ratios[placements.LargeRectangle.size],\r\n ratios[placements.MediumRectangle.size],\r\n ratios[placements.Rectangle.size],\r\n ratios[placements.Square.size],\r\n ],\r\n Vertical: [\r\n ratios[placements.Portrait.size],\r\n ratios[placements.HalfPage.size],\r\n ratios[placements.WideSkyscraper.size],\r\n ratios[placements.Skyscraper.size],\r\n ],\r\n};\r\n\r\n// MT has this unicode character : –\r\nexport const getPlacement = ad => ratios[ad.template.templateName.split('-')[0].trim()];\r\n\r\nexport const getPlacementFromTemplate = template => ratios[template.templateName.split('-')[0].trim()];\r\n\r\n// add placement to each ad\r\nexport const addPlacementToAd = (ads) => {\r\n const adsWithPlacement = ads.map((ad) => {\r\n const MTPlacement = getPlacement(ad);\r\n\r\n return {\r\n ...ad,\r\n placement: MTPlacement,\r\n };\r\n });\r\n\r\n return adsWithPlacement;\r\n};\r\n\r\n// return a map grouped by image url\r\nexport const groupAdsByImages = (ads) => {\r\n const groupedAds = _.groupBy(ads, ad => ad.template.image.url);\r\n return groupedAds;\r\n};\r\n\r\nexport const groupAdsByRatio = (groupedAds) => {\r\n const adsWithRatioGroups = {};\r\n\r\n const imageUrls = _.keys(groupedAds);\r\n\r\n // for each image url, group by placement ratio group\r\n _.each(imageUrls, (imageUrl) => {\r\n const ads = groupedAds[imageUrl];\r\n const groupedByPlacement = _.groupBy(ads, (ad) => {\r\n const { placement } = ad;\r\n const ratioGroup = _.findKey(ratioGrouping, ratiosKey => _.contains(ratiosKey, placement));\r\n return ratioGroup;\r\n });\r\n\r\n adsWithRatioGroups[imageUrl] = groupedByPlacement;\r\n });\r\n\r\n return adsWithRatioGroups;\r\n};\r\n\r\nconst getRandomImageForEachRatioGroup = (adsWithRatioGroups) => {\r\n const randomImages = [];\r\n\r\n _.each(adsWithRatioGroups, (ads) => {\r\n const randomImage = _.mapObject(ads, (group) => {\r\n const randomAd = _.sample(group);\r\n\r\n const imageSuggestionCarouselObj = {\r\n thumbnailUrl: randomAd.url,\r\n fullUrl: randomAd.template.image.url,\r\n suggestionId: randomAd.recommendationId,\r\n };\r\n\r\n return imageSuggestionCarouselObj;\r\n });\r\n\r\n randomImages.push(..._.values(randomImage));\r\n });\r\n\r\n return randomImages;\r\n};\r\n\r\n\r\nexport const processAndGroupAds = (ads) => {\r\n const adsWithPlacement = addPlacementToAd(ads);\r\n const groupedAds = groupAdsByImages(adsWithPlacement);\r\n const adsWithRatioGroups = groupAdsByRatio(groupedAds);\r\n\r\n return {\r\n imagesToSuggest: getRandomImageForEachRatioGroup(adsWithRatioGroups),\r\n groupedAds: adsWithRatioGroups,\r\n };\r\n};\r\n\r\n\r\nexport const getItemsForListFromGroupedAds = (groupedAds) => {\r\n const items = [];\r\n\r\n _.each(groupedAds, (ratioGroups) => {\r\n _.each(ratioGroups, (ads) => {\r\n const sampleAd = _.sample(ads);\r\n\r\n const newItem = {\r\n id: sampleAd.recommendationId,\r\n previewSrc: sampleAd.url,\r\n previewType: sampleAd.placement,\r\n placements: ads.map(ad => ({\r\n id: ad.recommendationId,\r\n type: ad.placement,\r\n })),\r\n };\r\n\r\n items.push(newItem);\r\n });\r\n });\r\n\r\n return items;\r\n};\r\n\r\nexport const getAdsInMatchingGroup = (groupedAds, id) => {\r\n const matchingGroup = _.find(groupedAds, ratioGroups => _.find(ratioGroups, ads => _.some(ads, ad => ad.recommendationId === id)));\r\n const matchingAds = _.find(matchingGroup, ads => _.some(ads, ad => ad.recommendationId === id));\r\n\r\n return matchingAds;\r\n};\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n","import React, { useEffect, useMemo, useCallback, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Text, ChoiceGroup } from '@fluentui/react';\r\nimport { Dropdown, Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { entityIs, propertyIs, andComp } from '@bingads-webui-campaign-react/form-error';\r\nimport { PreferenceContext } from '@bingads-webui-react/preference-context';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { DefaultButton, ERROR_ENTITY, IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { MediaEditorPanel } from '@bingads-webui-campaign-react/media-editor-panel';\r\nimport { PivotItemKey } from '@bingads-webui-campaign-react/media-editor';\r\nimport { isTestEnvironment } from '@bingads-webui-campaign/global-app-init';\r\nimport { MediaRepository } from '@bingads-webui-campaign/media-repository';\r\nimport { constants } from '@bingads-webui-campaign-react/image-experience';\r\nimport { ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AspectRatiosForDisplayAds } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { PreviewSingleRightRailWrapper } from '@bingads-webui-campaign-react/preview-right-rail-wrapper';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { DisplayAdsEditorDrawer as DisplayAdsEditor } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { useBrandKitService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\n\r\nimport { getTargetOptions, getStandardTargetOptions, getMobileTargetOptions, getAllStandardOptions, getAllMobileOptions } from './image-targets';\r\nimport { imageModelToViewModel, imagePlacementsToImage } from '../model/utl';\r\nimport { PopulateImages } from './populate-images';\r\nimport { CropPreview } from './cropped-preview';\r\nimport { placements, getPlacementFromTemplate } from '../model/constants';\r\n\r\nconst DisplayAdsEditorDrawer = withComponentErrorLogging(DisplayAdsEditor, 'DisplayAdsEditorDrawer');\r\n\r\nconst ImageContainerWidth = 170;\r\nconst ImageContainerHeight = 107;\r\n\r\nconst getStyles = () => ({\r\n rootContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '20px',\r\n },\r\n imageContainer: {\r\n position: 'relative',\r\n height: `${ImageContainerHeight}px`,\r\n width: `${ImageContainerWidth}px`,\r\n overflow: 'hidden',\r\n borderRadius: '6px',\r\n backgroundColor: '#F3F2F1',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n buttonContainerStyle: {\r\n display: 'flex',\r\n position: 'absolute',\r\n bottom: '5px',\r\n width: '100%',\r\n justifyContent: 'space-evenly',\r\n },\r\n choiceGroupStyles: {\r\n '& .ms-ChoiceField': {\r\n margin: '0',\r\n },\r\n '& label': {\r\n padding: '0 0 2px 0',\r\n fontWeight: 'normal',\r\n },\r\n },\r\n});\r\n\r\nconst dropdownStyles = {\r\n dropdown: { width: 250 },\r\n};\r\n\r\nconst editButtonStyle = {\r\n root: {\r\n borderRadius: '99px',\r\n height: 32,\r\n width: 32,\r\n backgroundColor: '#ffffffd4',\r\n },\r\n};\r\n\r\nexport const validateImage = (/* Image, i18n */) => {\r\n const messages = [];\r\n\r\n return messages;\r\n};\r\n\r\nconst entityIsAd = entityIs(ERROR_ENTITY.Ad);\r\nconst imageTypeFromImage = image => `Image${image.targetWidth}x${image.targetHeight}`;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nfunction getImageStyles(image) {\r\n const contentWidth = ImageContainerWidth;\r\n const contentHeight = ImageContainerHeight;\r\n let desiredCropWidth = contentWidth;\r\n let desiredCropHeight = contentHeight;\r\n\r\n const cropImageWidth = image.cropWidth;\r\n const cropImageHeight = image.cropHeight;\r\n\r\n const cropRatio = contentHeight / cropImageHeight > contentWidth / cropImageWidth ?\r\n contentHeight / cropImageHeight : contentWidth / cropImageWidth;\r\n\r\n desiredCropHeight = cropImageHeight * cropRatio;\r\n desiredCropWidth = cropImageWidth * cropRatio;\r\n\r\n const xScale = desiredCropWidth / image.cropWidth;\r\n const yScale = desiredCropHeight / image.cropHeight;\r\n\r\n const midPointOffsetX = desiredCropWidth > contentWidth ?\r\n Math.ceil(-(desiredCropWidth - contentWidth) / 2) : 0;\r\n const midPointOffsetY = desiredCropHeight > contentHeight ?\r\n Math.ceil(-(desiredCropHeight - contentHeight) / 2) : 0;\r\n\r\n return {\r\n image: {\r\n width: image.originalWidth * xScale,\r\n height: image.originalHeight * yScale,\r\n },\r\n container: {\r\n marginLeft: `${(-image.cropX * xScale) + midPointOffsetX}px`,\r\n marginTop: `${(-image.cropY * yScale) + midPointOffsetY}px`,\r\n },\r\n };\r\n}\r\n\r\nconst standardDeviceType = 'standard';\r\nconst mobileDeviceType = 'mobile';\r\nconst standardSizes = getAllStandardOptions();\r\nconst mobileSizes = getAllMobileOptions();\r\n\r\nconst getImageTypeFromSize = ((displayAd) => {\r\n if (!displayAd || !displayAd.image || !displayAd.image.targetHeight || !displayAd.image.targetWidth) {\r\n return standardDeviceType;\r\n }\r\n const { targetWidth, targetHeight } = displayAd.image;\r\n const findDeviceType = size => size.width === targetWidth && size.height === targetHeight;\r\n\r\n if (standardSizes.findIndex(findDeviceType) >=0) {\r\n return standardDeviceType;\r\n }\r\n\r\n if (mobileSizes.findIndex(findDeviceType) >=0) {\r\n return mobileDeviceType;\r\n }\r\n\r\n return standardDeviceType;\r\n});\r\n\r\nconst CustomComponent = (props) => {\r\n const {\r\n i18n,\r\n displayAd,\r\n updateValidation,\r\n oDataConfig,\r\n campaignId,\r\n cid,\r\n aid,\r\n permissions,\r\n serverContext,\r\n perfMarker,\r\n isLoadingImage,\r\n creativeEditorProps,\r\n onRenderCustomAddImageButton,\r\n } = props;\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 isDisplayImageRegroupEnabled = permissions && permissions.dynamic && permissions.dynamic.IsDisplayImageRegroupEnabled;\r\n const scenario = useContext(ScenarioContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const [isImageEditDisplayed, setIsImageEditDisplayed] = useState(false);\r\n const [isDisplayTemplateEditorOpen, setIsDisplayTemplateEditorOpen] = useState(false);\r\n const classes = useDefaultStyles(getStyles);\r\n const preferenceService = useContext(PreferenceContext);\r\n\r\n const [deviceFormatType, setDeviceFormatType] = useState(standardDeviceType);\r\n const mediaRepository = useMemo(() => new MediaRepository({\r\n cid,\r\n aid,\r\n cmpId: campaignId,\r\n oDataConfig,\r\n }), [aid, campaignId, cid, oDataConfig]);\r\n\r\n const currentPlacementIndex = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.targetWidth && displayAd.image.targetHeight) {\r\n const type = imageTypeFromImage(displayAd.image);\r\n const imagePlacementIndex = _.findIndex(displayAd.imagePlacements, placement => placement.type === type);\r\n return imagePlacementIndex;\r\n }\r\n return -1;\r\n }, [displayAd]);\r\n\r\n const copilotRepository = useCopilotRepositoryContext();\r\n const { brandKitDataService, brandkitApiState } = useBrandKitService();\r\n\r\n useEffect(() => {\r\n const shouldDirty = !(_.isUndefined(displayAd) || _.isNull(displayAd));\r\n if (isDisplayImageRegroupEnabled === true) {\r\n const deviceType = getImageTypeFromSize(displayAd);\r\n setDeviceFormatType(deviceType);\r\n }\r\n\r\n // update on mount.\r\n updateValidation(displayAd && (displayAd.image || isLoadingImage) ? validateImage(displayAd.image, i18n) : [i18n.getString(_TL_('Please add an image.'))], {\r\n image: displayAd ? displayAd.image : null,\r\n imagePlacements: displayAd ? displayAd.imagePlacements : null,\r\n creativeData: displayAd ? displayAd.creativeData : null,\r\n }, shouldDirty);\r\n }, [displayAd, i18n, isLoadingImage, updateValidation, isDisplayImageRegroupEnabled]);\r\n\r\n const onEdit = useCallback(() => {\r\n if (displayAd && displayAd.creativeData) {\r\n if (\r\n displayAd.creativeData.creativeMeta &&\r\n displayAd.creativeData.creativeMeta.template &&\r\n Number(displayAd.creativeData.creativeMeta.template.version) >= 1.2\r\n ) {\r\n setIsDisplayTemplateEditorOpen(true);\r\n } else {\r\n setDisplayImagePicker(true);\r\n }\r\n } else {\r\n setIsImageEditDisplayed(true);\r\n }\r\n }, [displayAd, setDisplayImagePicker]);\r\n\r\n const onRemoveImage = useCallback(() => {\r\n updateValidation([i18n.getString(_TL_('Please add an image.'))], {\r\n image: null,\r\n creativeData: null,\r\n });\r\n }, [i18n, updateValidation]);\r\n\r\n const dropdownOptions = useMemo(() => {\r\n if (isDisplayImageRegroupEnabled === true) {\r\n if (deviceFormatType === 'mobile') {\r\n return getMobileTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }\r\n\r\n return getStandardTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }\r\n\r\n return getTargetOptions({\r\n i18n,\r\n sourceWidth: displayAd && displayAd.image ? displayAd.image.originalWidth : null,\r\n sourceHeight: displayAd && displayAd.image ? displayAd.image.originalHeight : null,\r\n });\r\n }, [i18n, displayAd, deviceFormatType, isDisplayImageRegroupEnabled]);\r\n\r\n const deviceFormatOptions = useMemo(() => [\r\n {\r\n key: standardDeviceType,\r\n text: i18n.getString(_TL_('Standard')),\r\n }, {\r\n key: mobileDeviceType,\r\n text: i18n.getString(_TL_('Mobile')),\r\n },\r\n ], [i18n]);\r\n\r\n const onChangeTarget = useCallback((event, item, selectItem) => {\r\n const image = displayAd && displayAd.image ? displayAd.image : {};\r\n const currentItem = item || selectItem;\r\n if (image) {\r\n const imagePlacementIndex = _.findIndex(displayAd.imagePlacements, placement => placement.type === currentItem.key);\r\n if (imagePlacementIndex >=0) {\r\n const imageViewModel = imageModelToViewModel(displayAd.imagePlacements[imagePlacementIndex]);\r\n\r\n updateValidation([], {\r\n image: {\r\n ...imageViewModel,\r\n },\r\n imagePlacements: displayAd.imagePlacements,\r\n });\r\n }\r\n } else {\r\n updateValidation([i18n.getString(_TL_('Please add an image.'))], {\r\n image: {\r\n targetWidth: currentItem.width,\r\n targetHeight: currentItem.height,\r\n },\r\n });\r\n }\r\n }, [displayAd, i18n, updateValidation]);\r\n\r\n const selectedItem = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.targetWidth && displayAd.image.targetHeight) {\r\n if (isDisplayImageRegroupEnabled === true) {\r\n const imageKey = imageTypeFromImage(displayAd.image);\r\n const target = dropdownOptions.find(option => option.key === imageKey);\r\n if (target) {\r\n return imageKey;\r\n }\r\n\r\n const firstItem = dropdownOptions.find(option => !option.itemType);\r\n if (firstItem) {\r\n firstItem.key;\r\n onChangeTarget(null, null, firstItem);\r\n }\r\n }\r\n\r\n return imageTypeFromImage(displayAd.image);\r\n }\r\n return undefined;\r\n }, [displayAd, dropdownOptions, onChangeTarget, isDisplayImageRegroupEnabled]);\r\n\r\n const minCropSize = useMemo(() => {\r\n if (displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex]) {\r\n return constants.getMinimumSizeForImage(\r\n displayAd.imagePlacements[currentPlacementIndex].type,\r\n false,\r\n constants.defaultImageOption,\r\n false,\r\n false,\r\n true\r\n );\r\n }\r\n return null;\r\n }, [currentPlacementIndex, displayAd]);\r\n\r\n const baseImage = useMemo(() => {\r\n if (displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex]) {\r\n const base = displayAd.imagePlacements[currentPlacementIndex];\r\n return {\r\n Type: base.type,\r\n Src: base.src,\r\n Width: base.width,\r\n Height: base.height,\r\n };\r\n }\r\n return null;\r\n }, [currentPlacementIndex, displayAd]);\r\n\r\n const onSaveEditImage = useCallback(({ cropSettings }) => {\r\n const base = displayAd.imagePlacements[currentPlacementIndex];\r\n\r\n base.cropSettings = cropSettings;\r\n\r\n updateValidation([], {\r\n image: {\r\n ...displayAd.image,\r\n cropWidth: cropSettings.SourceWidth,\r\n cropHeight: cropSettings.SourceHeight,\r\n cropX: cropSettings.SourceX,\r\n cropY: cropSettings.SourceY,\r\n },\r\n imagePlacements: displayAd.imagePlacements,\r\n creativeData: displayAd.creativeData,\r\n });\r\n\r\n setIsImageEditDisplayed(false);\r\n }, [currentPlacementIndex, displayAd, updateValidation]);\r\n\r\n const onNewImageSelected = useCallback((imagePlacements) => {\r\n if (imagePlacements && imagePlacements[0] && imagePlacements[0].creativeData) {\r\n updateValidation([], {\r\n ...imagePlacements[0],\r\n });\r\n } else {\r\n const newAdData = imagePlacementsToImage({ crops: imagePlacements[0] });\r\n updateValidation([], {\r\n ...newAdData.data,\r\n });\r\n }\r\n setDisplayImagePicker(false);\r\n }, [setDisplayImagePicker, updateValidation]);\r\n\r\n const placementTitle = useMemo(() => {\r\n if (!creativeEditorProps) {\r\n return '';\r\n }\r\n const { creativeData } = creativeEditorProps || {};\r\n\r\n const { creativeMeta } = creativeData || {};\r\n\r\n const { placement, template = {} } = creativeMeta || {};\r\n\r\n if (!placement) {\r\n const placementFromTemplate = getPlacementFromTemplate(template);\r\n\r\n return placements[placementFromTemplate].name;\r\n }\r\n return placements[placement].name;\r\n }, [creativeEditorProps]);\r\n\r\n const resizeImageHeightForThumbnail = useMemo(() => {\r\n if (displayAd && displayAd.image && displayAd.image.cropHeight && displayAd.image.cropWidth) {\r\n const aspectRatio = displayAd.image.cropWidth / displayAd.image.cropHeight;\r\n const maxWidth = 170;\r\n return Math.min(maxWidth / aspectRatio, 107);\r\n }\r\n return 0;\r\n }, [displayAd]);\r\n\r\n const imageControl = useMemo(() => {\r\n if (!displayAd) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {!isLoadingImage && displayAd.image &&\r\n (\r\n \r\n )\r\n }\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {\r\n creativeEditorProps ?\r\n \r\n {i18n.getString(placementTitle)}\r\n \r\n :\r\n
\r\n {isDisplayImageRegroupEnabled ===true &&\r\n (\r\n
\r\n
\r\n \r\n
\r\n setDeviceFormatType(item.key)}\r\n selectedKey={deviceFormatType}\r\n className={classes.choiceGroupStyles}\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 }, [classes.choiceGroupStyles, classes.buttonContainerStyle, classes.imageContainer, classes.rootContainer, isDisplayImageRegroupEnabled, deviceFormatType, deviceFormatOptions, creativeEditorProps, displayAd, dropdownOptions, i18n, isLoadingImage, onChangeTarget, onEdit, onRemoveImage, placementTitle, resizeImageHeightForThumbnail, selectedItem]);\r\n\r\n const AddImageButton = useMemo(() => {\r\n if (onRenderCustomAddImageButton) {\r\n return onRenderCustomAddImageButton({\r\n setDisplayImagePicker,\r\n });\r\n }\r\n\r\n return (\r\n setDisplayImagePicker(true)}\r\n />\r\n );\r\n }, [i18n, onRenderCustomAddImageButton, setDisplayImagePicker]);\r\n\r\n return (\r\n
\r\n
\r\n {displayAd && (displayAd.image || isLoadingImage) ?\r\n imageControl : AddImageButton\r\n }\r\n
\r\n 0 ? displayAd.FinalUrls[0] : null}\r\n creativeEditorProps={creativeEditorProps}\r\n />\r\n setIsImageEditDisplayed(false)}\r\n onApply={onSaveEditImage}\r\n mediaRepository={mediaRepository}\r\n aspectRatioConfig={AspectRatiosForDisplayAds}\r\n cropSettings={displayAd && displayAd.imagePlacements && displayAd.imagePlacements[currentPlacementIndex] ? displayAd.imagePlacements[currentPlacementIndex].cropSettings : null}\r\n minCropSize={minCropSize}\r\n baseImage={baseImage}\r\n hasRightRail\r\n onRenderRightRailContent={({\r\n previewImageUrl,\r\n cropSettings = {},\r\n }) => {\r\n const {\r\n SourceWidth, SourceX, SourceY,\r\n } = cropSettings || {};\r\n const aspectRatio = displayAd.image.cropWidth / displayAd.image.cropHeight;\r\n const maxWidth = 500;\r\n const resizeImageHeight = Math.min(maxWidth / aspectRatio, 600);\r\n\r\n return (\r\n \r\n );\r\n }}\r\n adCreatorScenario={{\r\n scenarioName: `${scenario.name}AdCreation`,\r\n scenarioValue: `${scenario.name}AdCreation`,\r\n }}\r\n isThumbsUpDownEnabled={serverContext.IsAADUser}\r\n isTestEnv={isTestEnvironment(document.domain)}\r\n disabledPivotItemKeys={[PivotItemKey.Effect]}\r\n customizedDefaultSelectedPivotItemKey={PivotItemKey.Crop}\r\n />\r\n {\r\n isDisplayTemplateEditorOpen &&\r\n 0 ? displayAd.FinalUrls[0] : null}\r\n showNavigation\r\n showSummaryBarControl\r\n preferenceService={preferenceService}\r\n displayTemplatesDataService={copilotRepository}\r\n isOpen={isDisplayTemplateEditorOpen}\r\n setIsOpen={setIsDisplayTemplateEditorOpen}\r\n imageData={{\r\n ...displayAd.image,\r\n metadata: displayAd.creativeData.creativeMeta,\r\n }}\r\n onApplyCreative={creativeEditorProps.onApplyCreative}\r\n scenario={scenario}\r\n aid={aid}\r\n cid={cid}\r\n sourceType={displayAd.image.originalSourceType}\r\n />\r\n }\r\n
\r\n );\r\n};\r\n\r\nCustomComponent.propTypes = {\r\n // onDataChange: PropTypes.func.isRequired,\r\n // idx: PropTypes.number.isRequired,\r\n displayAd: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n image: PropTypes.shape({\r\n src: PropTypes.string,\r\n originalWidth: PropTypes.number,\r\n originalHeight: PropTypes.number,\r\n cropWidth: PropTypes.number,\r\n cropHeight: PropTypes.number,\r\n cropX: PropTypes.number,\r\n cropY: PropTypes.number,\r\n targetHeight: PropTypes.number,\r\n targetWidth: PropTypes.number,\r\n }),\r\n imagePlacements: PropTypes.arrayOf(PropTypes.shape({\r\n src: PropTypes.string,\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n type: PropTypes.string,\r\n cropSettings: PropTypes.shape({\r\n SourceX: PropTypes.number,\r\n SourceY: PropTypes.number,\r\n SourceWidth: PropTypes.number,\r\n SourceHeight: PropTypes.number,\r\n }),\r\n })),\r\n creativeData: PropTypes.shape({\r\n creativeMeta: PropTypes.shape({\r\n placement: PropTypes.string,\r\n template: PropTypes.shape({ version: PropTypes.string }),\r\n }),\r\n }),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n IsDisplayImageRegroupEnabled: PropTypes.bool,\r\n BrandKitUI: PropTypes.bool,\r\n }).isRequired,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n IsAADUser: PropTypes.bool,\r\n }).isRequired,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n creativeEditorProps: PropTypes.shape({\r\n onApplyCreative: PropTypes.func,\r\n }),\r\n onRenderCustomAddImageButton: PropTypes.func,\r\n useBrandKit: PropTypes.bool,\r\n};\r\n\r\nCustomComponent.defaultProps = {\r\n creativeEditorProps: undefined,\r\n onRenderCustomAddImageButton: undefined,\r\n};\r\n\r\nconst ImageExperienceWithValidation = withServerContext(withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(CustomComponent)))));\r\n\r\nexport const ValidatedImageExperience = (props) => {\r\n const {\r\n displayAd, idx, i18n, ...rest\r\n } = props;\r\n\r\n const ImageProp = andComp(entityIsAd, propertyIs(`Image.ImageMedia_${idx}`));\r\n\r\n const dataObj = {\r\n image: (displayAd && displayAd.image) || null,\r\n imagePlacements: (displayAd && displayAd.imagePlacements) || null,\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nValidatedImageExperience.propTypes = {\r\n displayAd: PropTypes.shape({\r\n image: PropTypes.shape({ }),\r\n imagePlacements: PropTypes.arrayOf(PropTypes.shape({})),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n idx: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\n\r\nimport { ValidatedImageExperience } from './validated-image-experience';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const DisplayAdPanel = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n campaignId,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n displayAd,\r\n keyIndex,\r\n isSelectedPanel,\r\n oDataConfig,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n isLoadingImage,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n const finalUrlsObj = { FinalUrls: displayAd && displayAd.FinalUrls };\r\n\r\n const verifiedTrackingSettingObj = {\r\n VerifiedTrackingSettings: displayAd && displayAd.VerifiedTrackingSettings,\r\n };\r\n\r\n const isIasTrackingEnable = _.result(permissions.dynamic, 'EnableDisplayAdsIasTracking', false);\r\n const isAdvancedURLOptionsForMSANDisplayEnabled =\r\n _.result(permissions.dynamic, 'AdvancedURLOptionsForDisplay', false) &&\r\n _.result(permissions.dynamic, 'EnableMSANDisplayCampaigns', false);\r\n\r\n const isImpressionTrackingForDisplayAndVideoEnabled =\r\n _.result(permissions, 'isImpressionTrackingForDisplayAndVideoEnabled', false);\r\n\r\n const IsMOATEnabled = _.result(permissions, 'IsMOATEnabled', false);\r\n\r\n const onValidationUpdate = useCallback((result) => {\r\n onUpdate(result);\r\n }, [onUpdate]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [verifiedTrackingSettingObj.VerifiedTrackingSettings, displayAd]);\r\n\r\n return (\r\n
\r\n \r\n \r\n { !removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n { !(isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled)\r\n && isIasTrackingEnable && (\r\n \r\n )}\r\n { (isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && (\r\n
\r\n {advancedSettings}\r\n
\r\n )}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdPanel.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n EnableDisplayAdsIasTracking: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n displayAd: PropTypes.shape([]).isRequired,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nDisplayAdPanel.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { Link, usePageManager } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { Pagination } from './pagination';\r\nimport { DisplayAdPanel } from './display-ad-panel';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nexport const DisplayAdsContainer = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentImageIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n campaignId,\r\n isLoadingImage,\r\n initialAdsCount,\r\n } = props;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [DisplayAds, setDisplayAds] = useState(ads || []);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n onAddItem,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads, initialAdsCount);\r\n\r\n const onAddAd = useCallback(() => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n }, [activity, currentPage.numberOfAdsInPage, onAddItem]);\r\n\r\n const onImagePanelUpdate = (result, idx, uid) => {\r\n let itemAtIdx = DisplayAds[idx] || { image: null, FinalUrls: [], uid: null };\r\n\r\n if (!itemAtIdx.uid) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = DisplayAds.slice(0, idx);\r\n const itemsAfter = DisplayAds.slice(idx + 1, DisplayAds.length);\r\n setDisplayAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n };\r\n\r\n const onRemovePanel = (idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n DisplayAds.splice(idx, 1);\r\n\r\n setDisplayAds([...DisplayAds]);\r\n\r\n removeItem();\r\n };\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...DisplayAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onDisplayAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, DisplayAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setDisplayAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrDisplayAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, DisplayAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const displayAd = _.filter(DisplayAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (displayAd && displayAd[0] && _.isUndefined(displayAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setDisplayAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n return (\r\n
\r\n {\r\n _.map(pages, (page) => {\r\n const panels = _.map(_.range(page.numberOfAdsInPage), (idx) => {\r\n const displayAd = (DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)].data);\r\n\r\n const uid = (DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, page.pageNumber)].uid) || _.uniqueId('displayAd_');\r\n\r\n const isCurrentPage = page.id === currentPage.id;\r\n\r\n return (\r\n
\r\n onImagePanelUpdate(result, getPageAdjustedIndex(idx, page.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, page.pageNumber), page)}\r\n removeCloseButton={page.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n isSelectedPanel={currentImageIndex === idx}\r\n oDataConfig={oDataConfig}\r\n isLoadingImage={isLoadingImage}\r\n />\r\n
\r\n );\r\n });\r\n\r\n return panels;\r\n })\r\n }\r\n {\r\n (currentPage.numberOfAdsInPage < maxItems && !disablePagination && !_.isEmpty(DisplayAds)) &&\r\n
\r\n \r\n  {i18n.getString(_TL_('Create another ad'))}\r\n \r\n
\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdsContainer.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentImageIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool,\r\n initialAdsCount: PropTypes.number,\r\n};\r\n\r\nDisplayAdsContainer.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n resetFields: false,\r\n currentImageIndex: 0,\r\n isAdGridEditorMode: false,\r\n isLoadingImage: false,\r\n initialAdsCount: 0,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ValidatedLegacyCallToAction } from '@bingads-webui-campaign-react/legacy-call-to-action';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nconst getStyles = () => ({\r\n container: {\r\n position: 'relative',\r\n },\r\n});\r\n\r\nexport const CTAInCreativeEditor = ({ newCTA, onValidate }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const permissions = useContext(PermissionsContext);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n","import { useContext, useCallback, useState } from 'react';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { useBrandKitDataService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nimport { processAndGroupAds, errors } from '../model/constants';\r\n\r\nconst formatReturnedSuggestions = suggestions => ({\r\n RecommendedAssets: {\r\n ImageAssets: suggestions.map(({ recommendationId }) =>\r\n ({ RecommendationId: recommendationId })),\r\n },\r\n});\r\n\r\nconst formatBrandkitForAPI = (obj) => {\r\n if (Array.isArray(obj)) {\r\n return obj.map(formatBrandkitForAPI);\r\n } else if (obj !== null && typeof obj === 'object') {\r\n const formattedObj = {};\r\n Object.keys(obj).forEach((key) => {\r\n if (key === 'Id') {\r\n formattedObj.Id = parseInt(obj[key], 10);\r\n } else if (key === 'SubType') {\r\n formattedObj.SubType = 'None';\r\n } else if (key !== 'Type') {\r\n formattedObj[key] = formatBrandkitForAPI(obj[key]);\r\n }\r\n });\r\n return formattedObj;\r\n }\r\n return obj;\r\n};\r\n\r\nexport const useDisplayAdsCopilot = () => {\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const { logBannerGenerated } = useCopilotLoggers();\r\n const [isLoadingBrandKit, setIsLoadingBrandkit] = useState(false);\r\n const [brandkit, setBrandKit] = useState(null);\r\n const [isBrandKitEmpty, setIsBrandKitEmpty] = useState(true);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid } = scope.values;\r\n const permissions = useContext(PermissionsContext);\r\n const serverContext = useContext(ServerContext);\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const repository = useCopilotRepositoryContext();\r\n\r\n const {\r\n fetchDisplayAdsAssetRecommendations,\r\n fetchDisplayAdsTemplateDefinition,\r\n editDisplayAdsAssetRecommendations,\r\n finalUrl,\r\n } = repository;\r\n\r\n const { getBrandKitDataByAccId } = useBrandKitDataService();\r\n\r\n const fetchBrandKit = useCallback(async () => {\r\n if (isBrandKitEnabled) {\r\n const restrictionCall = isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n });\r\n setIsLoadingBrandkit(true);\r\n const response = await getBrandKitDataByAccId({ accId: aid });\r\n const isRestricted = await restrictionCall;\r\n if (!isRestricted) {\r\n const isBrandKitHavingData = response?.BrandKits?.[0] && Object.keys(response.BrandKits[0]).length > 0 && (response.BrandKits[0].Fonts?.length !== 0 ||\r\n response.BrandKits[0].Images?.length !== 0 ||\r\n response.BrandKits[0].LandscapeLogos?.length !== 0 ||\r\n response.BrandKits[0].Palettes?.length !== 0 ||\r\n response.BrandKits[0].SquareLogos?.length !== 0);\r\n if (isBrandKitHavingData) {\r\n setIsBrandKitEmpty(false);\r\n setClarityTag({ DisplayAdsWithBrandKit: 'true' });\r\n setBrandKit(formatBrandkitForAPI(response.BrandKits[0]));\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n }\r\n setIsLoadingBrandkit(false);\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n setIsLoadingBrandkit(false);\r\n }\r\n }\r\n }, [isBrandKitEnabled, getBrandKitDataByAccId, aid, serverContext, permissions, setBrandKit, setIsBrandKitEmpty]);\r\n\r\n const fetch = useCallback(async (count = 10, useBrandKit) => {\r\n if (!finalUrl) {\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: true,\r\n });\r\n\r\n if (!isLoadingBrandKit) {\r\n fetchDisplayAdsAssetRecommendations(count, (useBrandKit && brandkit) ? brandkit : null, isBrandKitEnabled ? '1.2' : '1.1').then((response) => {\r\n const { ImageAssets, Ads } = response;\r\n\r\n const {\r\n groupedAds,\r\n imagesToSuggest,\r\n } = processAndGroupAds(Ads);\r\n\r\n setRecommendationContext({\r\n ImageAssets,\r\n Ads,\r\n isLoading: false,\r\n finalUrl,\r\n groupedAds,\r\n imagesToSuggest,\r\n errorMessage: null,\r\n });\r\n\r\n logBannerGenerated(finalUrl, formatReturnedSuggestions(Ads));\r\n }).catch((e) => {\r\n if (e.message === 'NO_RECOMMENDATION') {\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n imagesToSuggest: [],\r\n Ads: [],\r\n groupedAds: [],\r\n errorMessage: errors.NO_RECOMMENDATION,\r\n });\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n imagesToSuggest: [],\r\n Ads: [],\r\n groupedAds: [],\r\n errorMessage: (e && e.errors && e.errors[0] && errors[e.errors[0].target]) || errors.DEFAULT,\r\n });\r\n });\r\n }\r\n }, [fetchDisplayAdsAssetRecommendations, finalUrl, logBannerGenerated, brandkit, isLoadingBrandKit, setRecommendationContext, isBrandKitEnabled]);\r\n\r\n const fetchAigcTemplateDefinition = useCallback(templateId => fetchDisplayAdsTemplateDefinition(templateId)\r\n .then(response => response)\r\n .catch(err => ({ err })), [fetchDisplayAdsTemplateDefinition]);\r\n\r\n\r\n const generate = useCallback(ads => editDisplayAdsAssetRecommendations(ads).then((updatedCreative) => {\r\n const { Ads } = updatedCreative;\r\n\r\n return Ads && Ads[0];\r\n }), [editDisplayAdsAssetRecommendations]);\r\n\r\n return {\r\n fetch,\r\n fetchAigcTemplateDefinition,\r\n generate,\r\n finalUrlForCopilot: finalUrl,\r\n isBrandKitEmpty,\r\n fetchBrandKit,\r\n };\r\n};\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Label, Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input-fluent-v2';\r\nimport { IconButton } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { Button, makeStyles } from '@fluentui/react-components';\r\nimport { AddRegular } from '@fluentui/react-icons';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\n\r\nimport { ValidatedImageExperience } from './validated-image-experience';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { CTAInCreativeEditor } from './validated-legacy-call-to-action';\r\nimport { useDisplayAdsCopilot } from './use-display-ads-copilot';\r\n\r\nconst useFluentV2Styles = makeStyles({\r\n button: {\r\n display: 'flex',\r\n 'flex-flow': 'column',\r\n },\r\n addIcon: {\r\n color: '#0078D4',\r\n fontSize: '32px',\r\n },\r\n});\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const DisplayAdPanelWithCopilot = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n campaignId,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n displayAd,\r\n useBrandKit,\r\n keyIndex,\r\n isSelectedPanel,\r\n oDataConfig,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n isLoadingImage,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const { generate, fetchAigcTemplateDefinition } = useDisplayAdsCopilot();\r\n\r\n const fluentV2Styles = useFluentV2Styles();\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n const finalUrlsObj = { FinalUrls: displayAd && displayAd.FinalUrls };\r\n\r\n const verifiedTrackingSettingObj = {\r\n VerifiedTrackingSettings: displayAd && displayAd.VerifiedTrackingSettings,\r\n };\r\n\r\n const isIasTrackingEnable = _.result(permissions.dynamic, 'EnableDisplayAdsIasTracking', false);\r\n const isAdvancedURLOptionsForMSANDisplayEnabled =\r\n _.result(permissions.dynamic, 'AdvancedURLOptionsForDisplay', false) &&\r\n _.result(permissions.dynamic, 'EnableMSANDisplayCampaigns', false);\r\n\r\n const isImpressionTrackingForDisplayAndVideoEnabled =\r\n _.result(permissions, 'isImpressionTrackingForDisplayAndVideoEnabled', false);\r\n\r\n\r\n const IsMOATEnabled = _.result(permissions, 'IsMOATEnabled', false);\r\n\r\n const onValidationUpdate = useCallback((result) => {\r\n onUpdate(result);\r\n }, [onUpdate]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [verifiedTrackingSettingObj.VerifiedTrackingSettings, displayAd, isAdvancedURLOptionsForMSANDisplayEnabled]);\r\n\r\n const onCTAUpdate = useCallback((data, setCTA) => {\r\n if (!_.isEmpty(data)) {\r\n setCTA(data);\r\n }\r\n }, []);\r\n\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const creativeEditorProps = useMemo(() => ({\r\n onRenderCTA: (newCTA, setCTA) => { onCTAUpdate(result.data, setCTA); }} />,\r\n onApplyCreative: ({\r\n imageObj,\r\n creativeMeta,\r\n }) => {\r\n onUpdate({\r\n data: {\r\n ...displayAd,\r\n image: imageObj,\r\n creativeData: {\r\n creativeMeta,\r\n },\r\n },\r\n isValid: true,\r\n isDirty: true,\r\n });\r\n },\r\n finalUrl: displayAd && displayAd.FinalUrls && displayAd.FinalUrls[0],\r\n creativeData: displayAd && displayAd.creativeData,\r\n onGenerateCreative: creativeDataInner => generate({\r\n template: {\r\n ...creativeDataInner,\r\n },\r\n }),\r\n fetchAigcTemplateDefinition,\r\n }), [displayAd, generate, fetchAigcTemplateDefinition, onCTAUpdate, onUpdate]);\r\n\r\n const onRenderCustomAddImageButton = useCallback(({ setDisplayImagePicker }) => (\r\n
\r\n \r\n
\r\n\r\n ), [classes.addNewImageButton, fluentV2Styles.addIcon, fluentV2Styles.button]);\r\n\r\n return (\r\n
\r\n \r\n \r\n { !removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n { !(isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && isIasTrackingEnable && (\r\n \r\n )}\r\n { (isAdvancedURLOptionsForMSANDisplayEnabled || isImpressionTrackingForDisplayAndVideoEnabled) && (\r\n
\r\n {advancedSettings}\r\n
\r\n )}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nDisplayAdPanelWithCopilot.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n EnableDisplayAdsIasTracking: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n displayAd: PropTypes.shape([]).isRequired,\r\n useBrandKit: PropTypes.bool,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nDisplayAdPanelWithCopilot.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Panel, PanelType } from '@fluentui/react';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ViewAllRecommendations } from '@bingads-webui/inline-copilot-ui';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nimport { getAdsInMatchingGroup, getItemsForListFromGroupedAds } from '../model/constants';\r\n\r\n\r\nexport const AllRecommendationsPanel = ({ isOpen, onDismiss, onSelectImageSuggestion }) => {\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const [{ isLoading, groupedAds } = {}] = useContext(RecommendationContext);\r\n const { finalUrl } = useCopilotRepositoryContext();\r\n\r\n const images = useMemo(() => getItemsForListFromGroupedAds(groupedAds), [groupedAds]);\r\n\r\n const handleDismiss = useCallback(() => {\r\n if (activity) {\r\n activity.signal('[All Recommendations Panel] - Closing panel');\r\n }\r\n\r\n onDismiss();\r\n }, [activity, onDismiss]);\r\n\r\n const handleSelectImageSuggestion = useCallback((id) => {\r\n if (activity) {\r\n activity.signal(`[All Recommendations Panel] - Selecting image ${id}`);\r\n }\r\n\r\n const matchingAds = getAdsInMatchingGroup(groupedAds, id);\r\n\r\n onSelectImageSuggestion(matchingAds);\r\n onDismiss();\r\n }, [activity, groupedAds, onSelectImageSuggestion, onDismiss]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAllRecommendationsPanel.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n onSelectImageSuggestion: PropTypes.func.isRequired,\r\n};\r\n","const IMAGE_DIM = {\r\n width: 106,\r\n height: 76,\r\n marginRight: 8,\r\n};\r\n\r\nconst PaddleBottomValue = 18;\r\n\r\nexport const initialImageContainerLeftMargin = 10;\r\n\r\nexport const getFullyShownImagesCount = (width) => {\r\n if (!width) {\r\n return 0;\r\n }\r\n\r\n const itemWidth = IMAGE_DIM.width + IMAGE_DIM.marginRight;\r\n\r\n return Math.floor(width / itemWidth);\r\n};\r\n\r\nexport const getCarouselStyles = (components, { palette = {} } = {}, iconFontFamily = 'MsAds MDL2 Assets') => ({\r\n carouselParent: {\r\n position: 'relative',\r\n display: 'inline-flex',\r\n width: '100%',\r\n alignItems: 'end',\r\n },\r\n disabledCarouselParent: {\r\n pointerEvents: 'none',\r\n opacity: 0.4,\r\n },\r\n image: {\r\n ...IMAGE_DIM,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n objectFit: 'cover',\r\n borderRadius: 6,\r\n },\r\n imageContainer: ({ imageContainerLeftMargin, isCollapsible }) => ({\r\n height: 80,\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n display: 'flex',\r\n marginLeft: isCollapsible ? imageContainerLeftMargin : 0,\r\n flexGrow: 1,\r\n }),\r\n imageParentContainer: ({ imageParentLeftOffset, numberOfImages }) => ({\r\n width: (IMAGE_DIM.width + IMAGE_DIM.marginRight) * numberOfImages,\r\n position: 'relative',\r\n left: ((-1 * IMAGE_DIM.width) - IMAGE_DIM.marginRight) * imageParentLeftOffset,\r\n display: 'flex',\r\n columnGap: '10px',\r\n }),\r\n imageClickableContainer: {\r\n display: 'inline',\r\n width: 107,\r\n '& :hover': {\r\n cursor: 'pointer',\r\n },\r\n '& img': {\r\n verticalAlign: 'top',\r\n },\r\n },\r\n loadingMessageContainer: {\r\n marginTop: 16,\r\n marginLeft: 16,\r\n },\r\n loadingText: {\r\n display: 'inline-block',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n verticalAlign: 'top',\r\n },\r\n panel: {},\r\n panelHeading: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n panelTitle: {\r\n flexGrow: 0,\r\n },\r\n panelIcon: {\r\n marginRight: 3,\r\n paddingBottom: 12,\r\n '&:before': {\r\n fontFamily: iconFontFamily,\r\n content: '\"\\\\E3AF\"',\r\n },\r\n },\r\n panelHelpButton: {\r\n display: 'flex',\r\n },\r\n imageHintRight: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n background: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: 20,\r\n height: IMAGE_DIM.height,\r\n right: 32,\r\n },\r\n imageHintLeft: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n background: 'linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.927755) 18.23%, rgba(255, 255, 255, 0.776042) 48.44%, rgba(250, 249, 255, 0.5) 78.24%, rgba(255, 255, 255, 0) 100%)',\r\n width: 30,\r\n height: IMAGE_DIM.height,\r\n left: 34,\r\n transform: 'rotate(-180deg)',\r\n },\r\n paddleBtn: {\r\n bottom: PaddleBottomValue,\r\n },\r\n moreIcon: {\r\n fontSize: '18px',\r\n height: '60px',\r\n width: '33px',\r\n color: palette.themeDarkAlt,\r\n },\r\n seeAll: {\r\n display: 'inline-block',\r\n position: 'absolute',\r\n right: 0,\r\n bottom: 12,\r\n whiteSpace: 'nowrap',\r\n maxWidth: 50,\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n seeAllInHeader: {\r\n marginLeft: 'auto',\r\n '& a': {\r\n position: 'static',\r\n color: palette.themePrimary,\r\n fontSize: 12,\r\n '&:hover, $:acitve, $:focus': {\r\n color: palette.themeDarkAlt,\r\n },\r\n '&:hover': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n },\r\n useBrandKitHeader: {\r\n float: 'right',\r\n },\r\n spinner: {\r\n ...components.getBlockerStyle(16, palette),\r\n display: 'inline-block',\r\n lineHeight: '16px',\r\n },\r\n parentContainer: {\r\n '& $panel': { // need more selector specificity to override styles applied to top of grid panels\r\n marginLeft: 0,\r\n marginTop: 12,\r\n },\r\n '& $panelHeading': {\r\n border: 'none',\r\n '& $panelTitle.collapsible-title': {\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '24px',\r\n '& > a': {\r\n '& .helpbutton': {\r\n fontSize: '14px',\r\n lineHeight: '24px',\r\n display: 'inline',\r\n verticalAlign: 'bottom',\r\n },\r\n },\r\n marginTop: 0,\r\n },\r\n },\r\n '& + .alert-info': {\r\n marginTop: 8,\r\n '& a': {\r\n color: palette.themeDarkAlt,\r\n },\r\n },\r\n },\r\n});\r\n","import React, { useContext, useCallback, useState, useMemo, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ImageSuggestionCarousel } from '@bingads-webui-campaign-react/image-suggestion-carousel';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { Shimmer, ShimmerElementsGroup, ShimmerElementType, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AllRecommendationsPanel } from './view-all-recommendations-panel';\r\nimport { getCarouselStyles, getFullyShownImagesCount, initialImageContainerLeftMargin } from './carousel-style';\r\nimport { getImageSuggestionCarouselStyles } from './styles';\r\n\r\nconst SuggestionViewImageCount = 5;\r\nconst MaxSuggestionsInCarousel = 15;\r\n\r\nconst LoadingShimmer = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const shimmerElements = useMemo(() => {\r\n const shimmerElement = [];\r\n\r\n _.each(_.range(SuggestionViewImageCount), () => {\r\n shimmerElement.push({ type: ShimmerElementType.line, height: 76, width: 106 });\r\n shimmerElement.push({ type: ShimmerElementType.gap, width: 10, height: 76 });\r\n });\r\n\r\n return shimmerElement;\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n } />\r\n
\r\n );\r\n};\r\n\r\nconst getImageDimension = src => new Promise((resolve) => {\r\n const img = new Image();\r\n img.src = src;\r\n img.onload = () => {\r\n const width = img.naturalWidth;\r\n const height = img.naturalHeight;\r\n\r\n resolve({\r\n imgWidth: width, imgHeight: height,\r\n });\r\n };\r\n});\r\n\r\nconst ImageView = ({ src }) => {\r\n const [width, setWidth] = useState(0);\r\n const [height, setHeight] = useState(0);\r\n\r\n const aspectRatio = width / height;\r\n const maxWidth = 107;\r\n\r\n const resizeHeight = Math.min(maxWidth / aspectRatio, 76);\r\n\r\n useEffect(() => {\r\n getImageDimension(src).then(({ imgWidth, imgHeight }) => {\r\n setWidth(imgWidth);\r\n setHeight(imgHeight);\r\n });\r\n }, [src]);\r\n\r\n if (!width || !height) {\r\n return
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageView.propTypes = {\r\n src: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const DisplayAdsImageSuggestionCarousel = ({\r\n maxUploadNum = 5,\r\n onSelectImageSuggestion,\r\n useBrandKit = false,\r\n isBrandKitEmpty,\r\n setUseBrandKit,\r\n}) => {\r\n const [isSeeAllPanelOpen, setIsSeeAllPanelOpen] = useState(false);\r\n const [imagesToSuggest, setImagesToSuggest] = useState([]);\r\n const [isCopilotEnabled, setIsCopilotEnabled] = useState(false);\r\n const activity = useContext(ActivityContext);\r\n\r\n const [recommendationContext, , reportRecommendations] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n const permissions = useContext(PermissionsContext);\r\n const serverContext = useContext(ServerContext);\r\n const isBrandKitEnabled = permissions && permissions.dynamic && permissions.dynamic.BrandKitUI;\r\n\r\n const {\r\n imagesToSuggest: imageSuggestions,\r\n isLoading,\r\n groupedAds,\r\n errorMessage,\r\n } = recommendationContext || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const classes = useDefaultStyles(getImageSuggestionCarouselStyles);\r\n\r\n const { carouselState } = useMemo(() => ({\r\n carouselState: {\r\n carousel: {\r\n isError: _.isEmpty(imageSuggestions),\r\n },\r\n suggestion: {\r\n images: imageSuggestions,\r\n },\r\n },\r\n panelState: {\r\n panelImages: imageSuggestions,\r\n hasMore: false,\r\n },\r\n }), [imageSuggestions]);\r\n\r\n\r\n const { suggestion, carousel } = carouselState || {};\r\n const { images: suggestionImages } = suggestion || {};\r\n\r\n const onOffsetChange = useCallback((offset) => {\r\n const viewedImages = imagesToSuggest.slice(offset, offset + SuggestionViewImageCount);\r\n const suggestionIds = _.pluck(viewedImages, 'suggestionId');\r\n reportRecommendations({ view: suggestionIds });\r\n logSuggestionsViewed(suggestionIds);\r\n }, [imagesToSuggest, reportRecommendations, logSuggestionsViewed]);\r\n\r\n const onSelectImage = useCallback((fullUrl, index) => {\r\n // get all the groups for this base image.\r\n const allGroupedAds = groupedAds[fullUrl];\r\n\r\n // get thumbnail url from index\r\n const { thumbnailUrl } = imagesToSuggest[index];\r\n\r\n // find which group this thumbnail url belongs to\r\n const ads = _.find(allGroupedAds, group => _.find(group, ad => ad.url === thumbnailUrl));\r\n\r\n onSelectImageSuggestion(ads);\r\n }, [groupedAds, imagesToSuggest, onSelectImageSuggestion]);\r\n\r\n const onSelectSeeAllImages = useCallback(() => {\r\n const suggestionIds = suggestionImages.map(({ suggestionId }) => suggestionId);\r\n\r\n setIsSeeAllPanelOpen(true);\r\n logSuggestionsViewed(suggestionIds);\r\n }, [logSuggestionsViewed, suggestionImages]);\r\n\r\n const onRenderImage = useCallback((src, classesProp) => (\r\n
\r\n \r\n
\r\n ), [classes.croppedImage]);\r\n\r\n const onBrandKitToggle = useCallback((value) => {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - useBrandKitToggle changed to ${value}`);\r\n }\r\n setUseBrandKit(value);\r\n }, [activity, setUseBrandKit]);\r\n\r\n useEffect(() => {\r\n const truncatedImages = _.isArray(suggestionImages) && suggestionImages.slice(0, MaxSuggestionsInCarousel);\r\n setImagesToSuggest(truncatedImages || []);\r\n }, [suggestionImages]);\r\n\r\n useEffect(() => {\r\n if (isBrandKitEnabled) {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(isRestricted => setIsCopilotEnabled(!isRestricted));\r\n } else {\r\n setIsCopilotEnabled(false);\r\n }\r\n }, [isBrandKitEnabled, permissions, serverContext]);\r\n\r\n return (\r\n
\r\n { isLoading ?\r\n : (\r\n 0 ? imagesToSuggest : []}\r\n i18n={i18n}\r\n isEmpty={carousel && carousel.isError}\r\n onSelectImage={onSelectImage}\r\n onSelectSeeAll={onSelectSeeAllImages}\r\n showEllipsisWhenNoMoreImages\r\n showViewAllInHeader\r\n enableBrandKit={isBrandKitEnabled && !isBrandKitEmpty && isCopilotEnabled}\r\n useBrandKit={useBrandKit}\r\n setUseBrandKit={onBrandKitToggle}\r\n stylingOverrides={{\r\n getCarouselStyles,\r\n getFullyShownImagesCount,\r\n initialImageContainerLeftMargin,\r\n seeAllLinkText: _TL_('View all'),\r\n }}\r\n onOffsetChange={onOffsetChange}\r\n onRenderImage={onRenderImage}\r\n />\r\n )}\r\n {isSeeAllPanelOpen && (\r\n setIsSeeAllPanelOpen(false)}\r\n onSelectImageSuggestion={onSelectImageSuggestion}\r\n />\r\n )}\r\n {\r\n errorMessage && (\r\n \r\n {i18n.getString(errorMessage)}\r\n \r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nDisplayAdsImageSuggestionCarousel.propTypes = {\r\n maxUploadNum: PropTypes.number.isRequired,\r\n onSelectImageSuggestion: PropTypes.func.isRequired,\r\n useBrandKit: PropTypes.bool,\r\n isBrandKitEmpty: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext, useState, useCallback, useEffect, useMemo } from 'react';\r\nimport {\r\n useId,\r\n Button,\r\n Toaster,\r\n useToastController,\r\n Toast,\r\n ToastTitle,\r\n ToastBody,\r\n Spinner,\r\n} from '@fluentui/react-components';\r\nimport { DismissRegular } from '@fluentui/react-icons';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input-fluent-v2';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { CopilotIcon } from '@bingads-webui-react/copilot-ui-base';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { ValidationGroup, withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { getCreativeWorkbenchStyles } from './styles';\r\nimport { DisplayAdsImageSuggestionCarousel } from './display-ads-suggestion-carousel';\r\nimport { useDisplayAdsCopilot } from './use-display-ads-copilot';\r\n\r\n\r\nconst ValidatedFinalUrl = withError(withCustomValidation(UrlInput));\r\n\r\nexport const CreativeWorkbench = ({\r\n onFinalURLFocusOut,\r\n onCreateAds,\r\n isNewLogo,\r\n useBrandKit,\r\n setUseBrandKit,\r\n}) => {\r\n const [dataModel, setDataModel] = useState({\r\n data: {},\r\n });\r\n\r\n const toasterId = useId('toaster');\r\n const { dispatchToast, dismissToast, updateToast } = useToastController(toasterId);\r\n\r\n const classes = useDefaultStyles(getCreativeWorkbenchStyles);\r\n\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n const { finalUrl: finalUrlFromContext } = useCopilotRepositoryContext();\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const FETCH_COUNT = 10;\r\n\r\n const { finalUrlForCopilot, fetch, isBrandKitEmpty, fetchBrandKit } = useDisplayAdsCopilot();\r\n\r\n const onValidate = (result) => {\r\n setDataModel(result);\r\n };\r\n\r\n const notifyFinalURLchange = () => {\r\n const isValid = _.result(dataModel, 'isValid', false);\r\n const finalUrls = _.result(dataModel, ['data', 'FinalUrls'], undefined);\r\n const finalUrl = _.first(finalUrls);\r\n\r\n if (isValid) {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Final URL changed to ${finalUrl}`);\r\n }\r\n\r\n onFinalURLFocusOut(finalUrl);\r\n }\r\n };\r\n\r\n const finalUrlValidationProps = {\r\n data: {\r\n FinalUrls: dataModel.data.FinalUrls,\r\n },\r\n initialValue: {\r\n FinalUrls: dataModel.data.FinalUrls,\r\n },\r\n };\r\n\r\n const addingRecommendationToast = useMemo(() => (\r\n \r\n }>\r\n {i18n.getString(_TL_('Adding recommendation'))}\r\n \r\n \r\n ), [i18n]);\r\n\r\n const errorOnCreateAdsToast = useMemo(() => (\r\n \r\n } onClick={() => dismissToast(toasterId)} />\r\n }\r\n >\r\n {i18n.getString(_TL_('Error adding recommendation'))}\r\n \r\n \r\n {i18n.getString(_TL_('An error occurred while adding the recommendation. Please try again later.'))}\r\n \r\n \r\n ), [dismissToast, i18n, toasterId]);\r\n\r\n const onSelectImageSuggestion = useCallback((ads) => {\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - User selected image suggestion - ${JSON.stringify(ads)}`);\r\n }\r\n\r\n if (ads && ads.length === 1) {\r\n dispatchToast(addingRecommendationToast, { toastId: toasterId, timeout: -1 });\r\n onCreateAds(ads)\r\n .then(() => dismissToast(toasterId))\r\n .catch((error) => {\r\n activity.error(`[DisplayAdsCopilot] - Error adding recommendation -- error: ${JSON.stringify(error)} -- ads: ${JSON.stringify(ads)}`);\r\n\r\n updateToast({\r\n content: errorOnCreateAdsToast,\r\n intent: 'error',\r\n toastId: toasterId,\r\n timeout: 5000,\r\n });\r\n });\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n openRatioPicker: true,\r\n creatives: ads,\r\n });\r\n }, [activity, addingRecommendationToast, dismissToast, dispatchToast, errorOnCreateAdsToast, onCreateAds, setRecommendationContext, toasterId, updateToast]);\r\n\r\n useEffect(() => {\r\n if (finalUrlFromContext) {\r\n setDataModel({\r\n data: {\r\n FinalUrls: [finalUrlFromContext],\r\n },\r\n });\r\n }\r\n }, [finalUrlFromContext]);\r\n\r\n useEffect(() => {\r\n if (finalUrlForCopilot) {\r\n fetch(FETCH_COUNT, useBrandKit);\r\n }\r\n }, [fetch, finalUrlForCopilot, useBrandKit]);\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n \r\n {\r\n i18n.getString(_TL_('AI-generated creatives'))\r\n }\r\n
\r\n
\r\n {\r\n i18n.getString(_TL_('Our AI pulls text and images from your Final URL to automatically generate creatives for your ads.'))\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\nCreativeWorkbench.propTypes = {\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n onCreateAds: PropTypes.func.isRequired,\r\n isNewLogo: PropTypes.bool,\r\n useBrandKit: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n\r\nCreativeWorkbench.defaultProps = {\r\n isNewLogo: false,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useCallback, useState, useEffect, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport {\r\n Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, Button, DialogContent, DialogActions,\r\n Image, makeStyles, mergeClasses, shorthands, Badge, Checkbox, tokens, Spinner,\r\n} from '@fluentui/react-components';\r\nimport { Dismiss24Regular } from '@fluentui/react-icons';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\n\r\nimport { placements } from '../model/constants';\r\n\r\nconst useStyles = makeStyles({\r\n selectableImageContainer: {\r\n display: 'inline-block',\r\n position: 'relative',\r\n ...shorthands.padding('2px'),\r\n ...shorthands.border('2px', 'solid', tokens.colorTransparentBackground),\r\n },\r\n selectedImageContainer: {\r\n ...shorthands.border('2px', 'solid', tokens.colorPaletteBlueBorderActive),\r\n ...shorthands.borderRadius('4px'),\r\n },\r\n selectableImageList: {\r\n display: 'grid',\r\n gridTemplateColumns: '1fr 1fr',\r\n ...shorthands.gap('16px'),\r\n ...shorthands.margin('16px', '0px', '0px'),\r\n },\r\n ratioDescription: {\r\n position: 'absolute',\r\n bottom: '8px',\r\n left: '8px',\r\n },\r\n imageCheckbox: {\r\n position: 'absolute',\r\n top: '4px',\r\n right: '4px',\r\n },\r\n});\r\n\r\nconst SelectableImage = (props) => {\r\n const {\r\n id, src, description, size, onSelect, checked,\r\n } = props;\r\n\r\n const handleClick = useCallback(() => {\r\n onSelect(id);\r\n }, [id, onSelect]);\r\n\r\n const imageDimension = useMemo(() => {\r\n const dimensionList = size.split('x');\r\n const width = Number(dimensionList[0]);\r\n const height = Number(dimensionList[1]);\r\n\r\n // handle aspect ratio for portrait images\r\n if (height > width) {\r\n const maxHeightRatio = 500 / height;\r\n const maxWidthRatio = 250 / width;\r\n\r\n const ratio = Math.min(maxHeightRatio, maxWidthRatio);\r\n\r\n return {\r\n width: width * ratio,\r\n height: height * ratio,\r\n };\r\n }\r\n\r\n return null;\r\n }, [size]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {description}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nSelectableImage.propTypes = {\r\n id: PropTypes.string.isRequired,\r\n src: PropTypes.string.isRequired,\r\n description: PropTypes.string.isRequired,\r\n size: PropTypes.string.isRequired,\r\n onSelect: PropTypes.func.isRequired,\r\n checked: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst RatioPickerInternal = (props) => {\r\n const {\r\n open,\r\n creatives,\r\n onApply,\r\n onOpenChange,\r\n onApplyButtonText,\r\n } = props;\r\n const i18n = useContext(I18nContext);\r\n const [creativeSelections, setCreativeSelections] = useState(Array(creatives.length).fill(true));\r\n\r\n const [isApplying, setIsApplying] = useState(false);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n // reset the selected creatives when the creatives change\r\n useEffect(() => {\r\n setCreativeSelections(creatives.map(() => true));\r\n }, [creatives]);\r\n\r\n const onRatioApply = useCallback(() => {\r\n const selectedCreatives = creatives.filter((creative, index) => creativeSelections[index]);\r\n\r\n setIsApplying(true);\r\n\r\n onApply(selectedCreatives).finally(() => {\r\n setIsApplying(false);\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Successfully saved creatives - ${JSON.stringify(selectedCreatives)}`);\r\n }\r\n });\r\n }, [activity, creativeSelections, creatives, onApply]);\r\n\r\n const onImageSelect = useCallback((id) => {\r\n const index = creatives.findIndex(creative => creative.recommendationId === id);\r\n const newSelectedCreative = [...creativeSelections];\r\n newSelectedCreative[index] = !newSelectedCreative[index];\r\n\r\n setCreativeSelections(newSelectedCreative);\r\n }, [creatives, creativeSelections]);\r\n\r\n const styles = useStyles();\r\n\r\n return (\r\n {\r\n onOpenChange(data.open);\r\n }}\r\n >\r\n \r\n
\r\n \r\n \r\n }\r\n />\r\n \r\n }\r\n >\r\n {i18n.getString(_TL_('Which display placements do you want your creatives to serve in?'))}\r\n \r\n \r\n {i18n.getString(_TL_('Select the checkbox next to all the placements where you want your creatives to serve. Then, we\\'ll create your ads.'))}\r\n
\r\n {\r\n creatives.map((creative, index) => (\r\n \r\n ))\r\n }\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n selected) || isApplying}\r\n className=\"create-ads\"\r\n >\r\n {\r\n isApplying\r\n ? \r\n : onApplyButtonText || i18n.getString(_TL_('Create ads'))\r\n }\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nRatioPickerInternal.propTypes = {\r\n open: PropTypes.bool,\r\n creatives: PropTypes.arrayOf(PropTypes.shape({})),\r\n onApply: PropTypes.func.isRequired,\r\n onOpenChange: PropTypes.func.isRequired,\r\n onApplyButtonText: PropTypes.string,\r\n};\r\n\r\nRatioPickerInternal.defaultProps = {\r\n open: false,\r\n creatives: [],\r\n onApplyButtonText: undefined,\r\n};\r\n\r\nconst RatioPickerWithRecommendationContext = (props) => {\r\n const {\r\n onCreateAds,\r\n ...rest\r\n } = props;\r\n\r\n const [recommendationContext, setRecommendationContext] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n\r\n const { openRatioPicker, creatives } = recommendationContext;\r\n\r\n const handleRatioPickerState = useCallback((state) => {\r\n setRecommendationContext({\r\n openRatioPicker: state,\r\n });\r\n }, [setRecommendationContext]);\r\n\r\n const onApply = useCallback(selectedCreatives => onCreateAds(selectedCreatives).then(() => handleRatioPickerState(false)), [onCreateAds, handleRatioPickerState]);\r\n\r\n useEffect(() => {\r\n if (_.isEmpty(creatives)) { return; }\r\n\r\n logSuggestionsViewed(creatives.map(creative => creative.recommendationId));\r\n }, [creatives, logSuggestionsViewed]);\r\n\r\n if (_.isEmpty(creatives)) {\r\n return null;\r\n }\r\n\r\n return (\r\n 0 ? creatives[0].recommendationId : 'empty'}\r\n creatives={creatives}\r\n open={openRatioPicker}\r\n onOpenChange={handleRatioPickerState}\r\n onApply={onApply}\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nRatioPickerWithRecommendationContext.propTypes = {\r\n onCreateAds: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const RatioPicker = RatioPickerWithRecommendationContext;\r\n","import React, { useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Menu, MenuItem, MenuList, MenuPopover, MenuTrigger } from '@fluentui/react-components';\r\nimport { Add20Regular, Image20Regular, GlanceHorizontalSparkles20Regular } from '@fluentui/react-icons';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nexport const CreateAnotherAdMenu = ({\r\n onCreateWithAI,\r\n onCreateFromExistingImage,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const handleCreateWithAI = useCallback(() => {\r\n onCreateWithAI();\r\n\r\n if (activity) {\r\n activity.signal('[Creating another ad] - With AI');\r\n }\r\n }, [onCreateWithAI, activity]);\r\n\r\n const handleCreateFromExistingImage = useCallback(() => {\r\n onCreateFromExistingImage();\r\n\r\n if (activity) {\r\n activity.signal('[Creating another ad] - From existing image');\r\n }\r\n }, [onCreateFromExistingImage, activity]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n } onClick={handleCreateWithAI}>\r\n {i18n.getString(_TL_('Create with AI'))}\r\n \r\n } onClick={handleCreateFromExistingImage}>\r\n {i18n.getString(_TL_('Use existing image'))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCreateAnotherAdMenu.propTypes = {\r\n onCreateWithAI: PropTypes.func.isRequired,\r\n onCreateFromExistingImage: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { CreateDisplayAdDialog } from '@bingads-webui/inline-copilot-ui';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\n\r\nimport { getAdsInMatchingGroup, getItemsForListFromGroupedAds } from '../model/constants';\r\n\r\nexport const CreateAdWithAiDialog = ({\r\n isOpen,\r\n onDismiss,\r\n onFinalURLFocusOut,\r\n onCreateAds,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n\r\n const [{ isLoading, groupedAds } = {}] = useContext(RecommendationContext);\r\n const { finalUrl: initialFinalUrl = '' } = useCopilotRepositoryContext();\r\n\r\n const [finalUrl, setFinalUrl] = useState(initialFinalUrl);\r\n const [images, setImages] = useState([]);\r\n const [selectedImages, setSelectedImages] = useState([]);\r\n\r\n const handleFinalUrlUpdate = useCallback((url) => {\r\n if (url === finalUrl) { return; }\r\n\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Updating Final URL');\r\n }\r\n\r\n setFinalUrl(url);\r\n setImages([]);\r\n setSelectedImages([]);\r\n\r\n onFinalURLFocusOut(url);\r\n }, [finalUrl, onFinalURLFocusOut, activity]);\r\n\r\n useEffect(() => {\r\n setImages(getItemsForListFromGroupedAds(groupedAds));\r\n }, [groupedAds]);\r\n\r\n const handleSelectImages = useCallback((ids) => {\r\n if (activity) {\r\n // ids and selectedImage should differ by one element, the last the user clicked\r\n const lastId = _.difference(_.union(ids, selectedImages), _.intersection(ids, selectedImages))[0];\r\n\r\n if (ids.includes(lastId)) {\r\n activity.signal(`[Create Ad with AI dialog] - Selecting image ${lastId}`);\r\n } else {\r\n activity.signal(`[Create Ad with AI dialog] - Deselecting image ${lastId}`);\r\n }\r\n }\r\n\r\n setSelectedImages(ids);\r\n }, [selectedImages, activity]);\r\n\r\n const handleCreateAds = useCallback((ids) => {\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Creating ads');\r\n }\r\n\r\n const matchingAds = _.chain(ids)\r\n .map(id => getAdsInMatchingGroup(groupedAds, id))\r\n .flatten()\r\n .value();\r\n\r\n return onCreateAds(matchingAds).then(onDismiss);\r\n }, [groupedAds, onCreateAds, onDismiss, activity]);\r\n\r\n const handleDismiss = useCallback(() => {\r\n if (activity) {\r\n activity.signal('[Create Ad with AI dialog] - Closing dialog');\r\n }\r\n\r\n onDismiss();\r\n }, [onDismiss, activity]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nCreateAdWithAiDialog.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n onDismiss: PropTypes.func.isRequired,\r\n onFinalURLFocusOut: PropTypes.func.isRequired,\r\n onCreateAds: PropTypes.func.isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport { useCallback, useContext } from 'react';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useAssetLibraryImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nconst getProcessedCreative = (finalUrl, image, creative) => ({\r\n data: {\r\n FinalUrls: [finalUrl],\r\n image,\r\n creativeData: {\r\n creativeId: image.id,\r\n creativeMeta: {\r\n ...creative,\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const useCreateAds = ({\r\n oDataConfig,\r\n permissions,\r\n aid,\r\n onCreateAds,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const [{ finalUrl }] = useContext(RecommendationContext);\r\n\r\n const advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n\r\n const {\r\n addCreatives: addToAssetLibrary,\r\n } = useAssetLibraryImagePicker({\r\n cid: advertiserCustomerId.toString(),\r\n aid: aid.toString(),\r\n oDataConfig,\r\n onNewImageSelected: _.noop,\r\n i18n,\r\n permissions,\r\n isDisplayAds: true,\r\n });\r\n\r\n return useCallback(creativesToAdd => addToAssetLibrary({ creativeData: creativesToAdd })\r\n .then((savedImages) => {\r\n const creatives = savedImages.map((savedImage, index) => getProcessedCreative(finalUrl, savedImage, creativesToAdd[index]));\r\n onCreateAds(creatives);\r\n return creatives;\r\n }), [addToAssetLibrary, finalUrl, onCreateAds]);\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { usePageManager } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { CampaignFetchProvider } from '@bingads-webui-campaign-react/campaign-http';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useCopilotLoggers, useInitCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { DisplayAdPanelWithCopilot } from './display-ad-panel-with-copilot';\r\nimport { Pagination } from './pagination';\r\nimport { CreativeWorkbench } from './creative-workbench';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { addCreativesToDisplayAds } from '../model/utl';\r\nimport { RatioPicker } from './ratio-picker';\r\nimport { CreateAnotherAdMenu } from './create-another-ad-menu';\r\nimport { CreateAdWithAiDialog } from './create-ad-with-ai-dialog';\r\nimport { useCreateAds } from './use-create-ads';\r\n\r\nexport const DisplayAdsContainerWithCopilot = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentImageIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n campaignId,\r\n isLoadingImage,\r\n initialAdsCount,\r\n hideFooter,\r\n } = props;\r\n\r\n const isEditScenario = useMemo(() => isAdGridEditorMode && ads && ads[0] && !!ads[0].Id, [ads, isAdGridEditorMode]);\r\n\r\n useInitCopilotLoggers({ campaignId, isEditScenario });\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { logEnterFlow } = useCopilotLoggers();\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [DisplayAds, setDisplayAds] = useState(ads);\r\n const [copilotFinalUrl, setCopilotFinalUrl] = useState();\r\n const [isCreateAdDialogOpen, setIsCreateAdDialogOpen] = useState(false);\r\n const [useBrandKit, setUseBrandKit] = useState(true);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n onAddItem,\r\n pages,\r\n onAddItemsToPage,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads, initialAdsCount);\r\n\r\n const onAddAd = useCallback(() => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n }, [activity, currentPage.numberOfAdsInPage, onAddItem]);\r\n\r\n const onImagePanelUpdate = useCallback((result, idx, uid) => {\r\n let itemAtIdx = DisplayAds[idx] || { image: null, FinalUrls: [], uid: null };\r\n\r\n if (!itemAtIdx.uid) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = DisplayAds.slice(0, idx);\r\n const itemsAfter = DisplayAds.slice(idx + 1, DisplayAds.length);\r\n setDisplayAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n }, [DisplayAds]);\r\n\r\n const onRemovePanel = useCallback((idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n DisplayAds.splice(idx, 1);\r\n\r\n setDisplayAds([...DisplayAds]);\r\n\r\n removeItem();\r\n }, [DisplayAds, activity, removeItem]);\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(DisplayAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n // method to create ads in the wizard.\r\n // ads should be an array of ads with entire ad object.\r\n // ads should have the assets already saved to asset library and image experience object.\r\n // ads: [{ data: { image: {..}, FinalUrls: [..], creativeData: {..} }}]\r\n const onCreateAds = useCallback((creatives) => {\r\n const newAds = addCreativesToDisplayAds({ displayAds: DisplayAds, creatives });\r\n\r\n // get total numeber of ads possible\r\n const totalAdsExculudingLastPage = pages.length > 1 ? (pages.length - 1) * 10 : 0;\r\n\r\n // current number of items\r\n const currentItemCount = totalAdsExculudingLastPage + pages[pages.length - 1].numberOfAdsInPage;\r\n\r\n if (newAds.length > currentItemCount) {\r\n onAddItemsToPage(newAds.length - currentItemCount);\r\n }\r\n\r\n if (activity) {\r\n activity.signal(`[DisplayAdsCopilot] - Adding new copilot recommended ads - ${creatives.length}`);\r\n }\r\n setDisplayAds(newAds);\r\n }, [DisplayAds, onAddItemsToPage, pages, activity]);\r\n\r\n const createAds = useCreateAds({\r\n oDataConfig,\r\n permissions,\r\n aid,\r\n onCreateAds,\r\n });\r\n\r\n useEffect(() => logEnterFlow(), [logEnterFlow]);\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...DisplayAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onDisplayAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, DisplayAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setDisplayAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrDisplayAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, DisplayAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const displayAd = _.filter(DisplayAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (displayAd && displayAd[0] && _.isUndefined(displayAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n\r\n // For reload scenario if we can't find any ad in local state, refresh state\r\n if (permissions.dynamic.MultiAdFormat && _.isEmpty(displayAd) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setDisplayAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n const onFinalURLFocusOut = (finalUrl) => {\r\n setCopilotFinalUrl(finalUrl);\r\n };\r\n const isNewLogo = _.get(permissions, ['dynamic', 'AdsCopilotUxImprovements']);\r\n\r\n const pageComponent = useMemo(() => (\r\n _.map(_.range(currentPage.numberOfAdsInPage), (idx) => {\r\n const displayAd = (DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)].data);\r\n\r\n const uid = (DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)] && DisplayAds[getPageAdjustedIndex(idx, currentPage.pageNumber)].uid) || _.uniqueId('displayAd_');\r\n\r\n return (\r\n
\r\n onImagePanelUpdate(result, getPageAdjustedIndex(idx, currentPage.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, currentPage.pageNumber), currentPage)}\r\n removeCloseButton={currentPage.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n isSelectedPanel={currentImageIndex === idx}\r\n oDataConfig={oDataConfig}\r\n isLoadingImage={isLoadingImage}\r\n />\r\n
\r\n );\r\n })\r\n ), [DisplayAds, aid, campaignId, cid, currentImageIndex, currentPage, getPageAdjustedIndex, i18n, isLoadingImage, oDataConfig, onImagePanelUpdate, onRemovePanel, perfMarker, permissions]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n

\r\n {i18n.getString(_TL_('Your ads'))}\r\n

\r\n

\r\n {\r\n i18n.getString(_TL_('We create ads for you based on your assets. You can choose to add your own images below.'))\r\n }\r\n

\r\n
\r\n {pageComponent}\r\n {\r\n !hideFooter && (currentPage.numberOfAdsInPage < maxItems && !disablePagination && !_.isEmpty(DisplayAds)) &&\r\n
\r\n setIsCreateAdDialogOpen(true)}\r\n />\r\n
\r\n }\r\n {isCreateAdDialogOpen && (\r\n setIsCreateAdDialogOpen(false)}\r\n onFinalURLFocusOut={onFinalURLFocusOut}\r\n />\r\n )}\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nDisplayAdsContainerWithCopilot.propTypes = {\r\n aid: PropTypes.number.isRequired,\r\n cid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentImageIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n isLoadingImage: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n initialAdsCount: PropTypes.number,\r\n};\r\n\r\nDisplayAdsContainerWithCopilot.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n resetFields: false,\r\n currentImageIndex: 0,\r\n isAdGridEditorMode: false,\r\n isLoadingImage: false,\r\n hideFooter: false,\r\n initialAdsCount: 0,\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\n// import { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { DisplayAdsContainer } from './display-ads-container';\r\nimport { AdPreview } from './ad-preview';\r\n\r\nconst getAdsStepStyles = (/* components, theme */) => ({\r\n displayAdPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n width: 400,\r\n marginTop: 20,\r\n float: 'left',\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n displayAdPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'space-between',\r\n },\r\n displayAdPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n displayAdPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '2px',\r\n display: 'flex',\r\n },\r\n adPreviewSizeTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: 498,\r\n },\r\n adPreviewSizeHeader: {\r\n height: 40,\r\n },\r\n adPreviewPanel: {\r\n width: 540,\r\n padding: 20,\r\n paddingBottom: 20,\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'center',\r\n },\r\n displayAd: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n emptyPreview: {\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#F3F2F1',\r\n borderRadius: 6,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n displayAdPanelContent: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n});\r\n\r\nconst containerStyle = {\r\n display: 'flex',\r\n '& .image-list-content': {\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n};\r\n\r\nexport const AdEditor = ({\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n permissions,\r\n adsModel,\r\n onAdsValidation,\r\n oDataConfig,\r\n resetFields,\r\n serverErrors,\r\n isLoadingImage,\r\n}) => (\r\n
\r\n
\r\n \r\n error.message) : []} />\r\n
\r\n _.noop}\r\n ads={adsModel}\r\n disablePagination\r\n customStyleFunction={getAdsStepStyles}\r\n useCustomStyleFunction\r\n />\r\n
);\r\n\r\nAdEditor.propTypes = {\r\n containerStyle: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n adsModel: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n resetFields: PropTypes.bool.isRequired,\r\n serverErrors: PropTypes.shape({}),\r\n isLoadingImage: PropTypes.bool.isRequired,\r\n};\r\n\r\nAdEditor.defaultProps = {\r\n serverErrors: null,\r\n};\r\n\r\n/*\r\nconst AdEditorWithErrorLogging = withComponentErrorLogging(\r\n AdEditor,\r\n 'XandrVideoAdsAdEditing'\r\n);\r\n\r\nexport { AdEditorWithErrorLogging as AdEditor };\r\n*/\r\n","import React, { useState, useCallback, useContext, useMemo, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Stack } from '@fluentui/react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { useFormService } from '@bingads-webui-react/form-core';\r\nimport { useWizardService, matchStepState, STEP_STATES } from '@bingads-webui-react/wizard';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { getODataConfig } from '../model/constants';\r\nimport { getDisplayAdStepBaseStyles } from './styles';\r\nimport { DisplayAdsContainerWithCopilot, AdPreview } from './index';\r\n\r\nconst StepHeader = ({\r\n title,\r\n description,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n

\r\n {i18n.getString(title)}\r\n

\r\n {description &&\r\n

\r\n {i18n.getString(description)}\r\n

\r\n }\r\n
\r\n );\r\n};\r\n\r\nStepHeader.propTypes = {\r\n title: PropTypes.string.isRequired,\r\n description: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const DisplayAdsWithCopilot = ({\r\n data = {},\r\n onDataChange,\r\n error,\r\n isAdGridEditorMode,\r\n hideFooter,\r\n}) => {\r\n const {\r\n errors = [],\r\n } = error || {};\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state } = useWizardService();\r\n\r\n const classes = useDefaultStyles(getDisplayAdStepBaseStyles);\r\n\r\n const { campaign = {}, editingAdId } = state.context.wizardData;\r\n\r\n const { Id: campaignId } = campaign;\r\n\r\n const currentStates = state.toStrings()[1];\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const [currentImageIndex, setCurrentImageIndex] = useState(0);\r\n\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n\r\n\r\n const removeEmptyAds = newAdsData => newAdsData.filter(ad => !_.isEmpty(ad.data));\r\n\r\n const onAdsValidation = useCallback((results) => {\r\n const { data: newAdsData, ...restResults } = results;\r\n\r\n const newAds = removeEmptyAds(newAdsData);\r\n\r\n const dataPatch = {\r\n data: [\r\n ...newAds,\r\n ],\r\n ...restResults,\r\n };\r\n onDataChange({ data: dataPatch, isValid: dataPatch.isValid });\r\n }, [onDataChange]);\r\n\r\n useEffect(() => {\r\n if (activity && matchStepState(state, STEP_STATES.LOADING)) {\r\n activity.signal(`onDisplayAdsStepLoading - ${currentStates}`);\r\n }\r\n\r\n if (activity && matchStepState(state, STEP_STATES.SAVING)) {\r\n activity.signal(`onDisplayAdsStepSaving - ${currentStates}`);\r\n }\r\n }, [activity, currentStates, state]);\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 data && data.data ? (\r\n \r\n ) : null\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\nDisplayAdsWithCopilot.propTypes = {\r\n data: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n errors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n isAdGridEditorMode: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n};\r\n\r\nDisplayAdsWithCopilot.defaultProps = {\r\n data: {},\r\n error: {},\r\n isAdGridEditorMode: false,\r\n hideFooter: false,\r\n};\r\n\r\n","import _ from 'underscore';\r\n\r\nexport function getVerifiedTrackingSettings(model) {\r\n const verifiedTrackingSettings = _.get(model, 'VerifiedTrackingSettings');\r\n\r\n if (!verifiedTrackingSettings || verifiedTrackingSettings.length === 0) {\r\n return {};\r\n }\r\n const results = [];\r\n\r\n verifiedTrackingSettings.forEach((setting) => {\r\n const vendor = _.get(setting, 'VerifiedTrackingVendor');\r\n\r\n if (!_.isString(vendor)) {\r\n return;\r\n }\r\n\r\n if (!_.isEqual(vendor, 'IAS') && !_.isEqual(vendor, 'MOAT')) {\r\n return;\r\n }\r\n\r\n const result = {};\r\n\r\n result.vendorName = vendor;\r\n if (_.isEqual(vendor, 'MOAT')) {\r\n results.push(result);\r\n return;\r\n }\r\n\r\n const data = _.get(setting, 'VerifiedTrackingData[0].Data');\r\n\r\n if (!_.isObject(data) || _.isEmpty(data)) {\r\n return;\r\n }\r\n\r\n const keys = _.get(data, 'Keys');\r\n\r\n if (!_.isArray(keys) || _.isEmpty(keys)) {\r\n return;\r\n }\r\n\r\n const values = _.get(data, 'Values');\r\n\r\n if (!_.isArray(values) || _.isEmpty(values)) {\r\n return;\r\n }\r\n\r\n const keyMap = { IAS_advertiserEntityId: 'advertiserEntityId', IAS_publisherEntityId: 'publisherEntityId' };\r\n\r\n\r\n _.each(keys, (key, index) => {\r\n if (keyMap[key]) {\r\n result[keyMap[key]] = values[index];\r\n }\r\n });\r\n results.push(result);\r\n });\r\n\r\n return { VerifiedTrackingSettings: results };\r\n}\r\n","import { useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { saveAds } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ImageRepository } from '@bingads-webui-campaign-react/image-experience';\r\nimport { constants, newImageFromMTObject } from '@bingads-webui-campaign-react/image-experience-model';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { getAutoCroppedImages } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\nimport { getODataConfig } from '../model/constants';\r\nimport { imagePlacementsToImage } from '../model/utl';\r\nimport { getVerifiedTrackingSettings } from '../model/verified-tracking-setting';\r\n\r\nexport const useDisplayAdsRepository = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n const { scope } = useContext(ScopeContext);\r\n const { state } = useWizardService();\r\n const { logSuggestionsApplied } = useCopilotLoggers();\r\n\r\n const advertiserCustomerId = _.get(serverContext, ['CurrentAccount', 'AdvertiserCustomerID']);\r\n\r\n const imageRepository = new ImageRepository(advertiserCustomerId, scope.values.aid, getODataConfig(serverContext));\r\n\r\n const load = () => {\r\n const initialAds = state.context.wizardData.savedAdModel;\r\n\r\n if (!initialAds) {\r\n return Promise.resolve({\r\n data: [\r\n {\r\n uid: Math.random(),\r\n data: {\r\n FinalUrls: [],\r\n image: null,\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n const imageAsset = initialAds.Images[0].Asset;\r\n\r\n const verifiedTrackingSetting = getVerifiedTrackingSettings(initialAds);\r\n\r\n const imagePromise = imageRepository.getImageByIdAsync(imageAsset.IdString)\r\n .then((imgObjMT) => {\r\n const imageObject = newImageFromMTObject(imgObjMT, constants.imageSources.Existing);\r\n const croppedImagePlacements = getAutoCroppedImages({\r\n originalImageToCrop: imageObject,\r\n isMultimediaAd: false,\r\n isMultimediaAdinMSANEnabled: false,\r\n imageOption: constants.defaultImageOption,\r\n aspectRatioOption: constants.defaultAspectRatioOption,\r\n isDisplayAds: true,\r\n });\r\n const imageData = imagePlacementsToImage({\r\n crops: croppedImagePlacements,\r\n selected: {\r\n TargetWidth: imageAsset.TargetWidth,\r\n TargetHeight: imageAsset.TargetHeight,\r\n CropWidth: imageAsset.CropWidth,\r\n CropHeight: imageAsset.CropHeight,\r\n CropX: imageAsset.CropX,\r\n CropY: imageAsset.CropY,\r\n },\r\n });\r\n\r\n const metaData = imageObject.metadata;\r\n let uriDecodedMetaData = metaData;\r\n\r\n // while saving we only replace the ',' symbol with %2C. So we need to replace it back to ','\r\n if (metaData) {\r\n uriDecodedMetaData = metaData.replace(/%2C/g, ',');\r\n }\r\n\r\n const decodedMetadata = parseSync(uriDecodedMetaData);\r\n\r\n const creativeData = decodedMetadata ? {\r\n creativeId: imageAsset.IdString,\r\n creativeMeta: decodedMetadata,\r\n } : null;\r\n\r\n const { TrackingUrlTemplate, FinalUrlSuffix, UrlCustomParameters, ImpressionTrackingUrls } = initialAds;\r\n\r\n const savedAd = {\r\n data: [{\r\n uid: Math.random(),\r\n Id: initialAds.Id ? initialAds.Id : null,\r\n data: {\r\n FinalUrls: initialAds.Id ? initialAds && initialAds.FinalUrls : [],\r\n creativeData,\r\n ...imageData.data,\r\n ...verifiedTrackingSetting,\r\n TrackingUrlTemplate,\r\n FinalUrlSuffix,\r\n UrlCustomParameters,\r\n ImpressionTrackingUrls,\r\n },\r\n }],\r\n };\r\n\r\n return savedAd;\r\n });\r\n\r\n return imagePromise;\r\n };\r\n\r\n const save = ({ data }) => {\r\n const {\r\n isCreateAnother,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n } = state.context.wizardData;\r\n\r\n return new Promise((resolve, reject) => {\r\n saveAds({\r\n ads: isMultiAdFormatAd ? { ...data, adSubType: 'Display' } : data,\r\n campaign: { Id: scope.values.campaignId },\r\n adGroup: { Id: scope.values.adGroupId },\r\n activity,\r\n }, { scenario: scenarioContext.name, i18n, activityLogger: activity }).then((result) => {\r\n if (isCreateAnother) {\r\n onSaveAndCreateAnother(result);\r\n } else {\r\n onSave(result);\r\n }\r\n\r\n const suggestionIds = _.chain(data.data)\r\n .map(ad => _.get(ad, 'data.creativeData.creativeMeta.recommendationId'))\r\n .compact()\r\n .value();\r\n\r\n logSuggestionsApplied(\r\n scope.values.campaignId,\r\n scope.values.adGroupId,\r\n undefined /* textSuggestions */,\r\n suggestionIds\r\n );\r\n\r\n resolve();\r\n }).catch(() => {\r\n reject();\r\n });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack, PrimaryButton, DefaultButton } from '@fluentui/react';\r\nimport {\r\n useWizardService,\r\n matchStepState,\r\n STEP_STATES,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\nimport { CancelButton } from '@bingads-webui-react/wizard-ui-library';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst Save = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndPublishClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isCreateAnother: false });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => i18n.getString(_TL_('Save ad')), [i18n]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nexport const SaveAndCreateAnother = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isCreateAnother: true });\r\n send(WIZARD_EVENTS.SAVE_AND_NEXT);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {i18n.getString(_TL_('Save & create another ad'))}\r\n \r\n );\r\n};\r\n\r\n\r\nexport const EditAdFooter = ({\r\n cancelButtonText,\r\n}) => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\nEditAdFooter.propTypes = {\r\n cancelButtonText: PropTypes.string,\r\n};\r\nEditAdFooter.defaultProps = {\r\n cancelButtonText: undefined,\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n BusyBlocker,\r\n CancelWizardDialog,\r\n DefaultTemplate,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { withLoggingContext } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { DisplayAdsWithCopilot } from '../ad-components';\r\nimport { useDisplayAdsRepository } from './use-display-ads-repository';\r\nimport { EditAdFooter } from './edit-ad-footer';\r\n\r\nconst DISPLAY_AD = 'Display Ad';\r\n\r\nconst StepConfig = [{\r\n id: DISPLAY_AD,\r\n view: props => (\r\n \r\n \r\n \r\n ),\r\n repository: useDisplayAdsRepository,\r\n}];\r\n\r\nconst EditDisplayAdWizardInternal = ({\r\n gridData,\r\n perfMarker,\r\n onCancel,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild('DisplayAdEditAdWizard')\r\n ), [perfMarker]);\r\n\r\n const config = useMemo(() => ({\r\n id: 'display-plus-wizard',\r\n initialStep: DISPLAY_AD,\r\n steps: StepConfig,\r\n actions: {\r\n onDone: () => { },\r\n onExited: () => onCancel(),\r\n },\r\n initialWizardData: {\r\n savedAdModel: gridData,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n },\r\n attachStepActivities: false,\r\n }), [gridData, onCancel, onSave, onSaveAndCreateAnother, isMultiAdFormatAd]);\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\nEditDisplayAdWizardInternal.propTypes = {\r\n gridData: PropTypes.object.isRequired,\r\n perfMarker: PropTypes.object.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onSaveAndCreateAnother: PropTypes.func.isRequired,\r\n isMultiAdFormatAd: PropTypes.bool,\r\n};\r\n\r\nEditDisplayAdWizardInternal.defaultProps = {\r\n isMultiAdFormatAd: false,\r\n};\r\n\r\nexport const EditDisplayAdWizard = withLoggingContext(withRecommendationContext(EditDisplayAdWizardInternal));\r\n","import { withSignal, CommonEventParser } from '@bingads-webui-react/hoc-with-signal';\r\nimport {\r\n PrimaryButton as FabricPrimaryButton,\r\n DefaultButton as FabricDefaultButton,\r\n Link as FabricLink,\r\n TextField as FabricTextField,\r\n IconButton as FabricIconButton,\r\n} from '@bingads-webui-react/fabric-control';\r\n\r\nexport const PrimaryButton = withSignal(FabricPrimaryButton, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const DefaultButton = withSignal(FabricDefaultButton, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const Link = withSignal(FabricLink, {\r\n onClick: CommonEventParser,\r\n});\r\n\r\nexport const TextField = withSignal(FabricTextField, {\r\n onChange: CommonEventParser,\r\n});\r\n\r\nexport const IconButton = withSignal(FabricIconButton, {\r\n onClick: CommonEventParser,\r\n});\r\n","export const getAdsStepStyles = (/* components, theme */) => ({\r\n videoPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n videoRepairPanelRoot: {\r\n marginTop: 20,\r\n width: 800,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n paddingTop: 10,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n },\r\n '& .add-image-button': {\r\n border: '1px solid #8a8886',\r\n background: '#FFFFFF !important',\r\n fontWeight: 600,\r\n borderRadius: 2,\r\n '&:before': {\r\n content: '\"\\\\E710\"',\r\n color: '#0078D4',\r\n marginRight: 8,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n backgroundColor: 'none !important',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n videoPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n height: 5,\r\n },\r\n adPreviewTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n width: '100%',\r\n },\r\n adPreviewHeader: {\r\n height: 40,\r\n },\r\n adPreviewRoot: {\r\n maxWidth: '540px',\r\n width: '100%',\r\n padding: 20,\r\n paddingBottom: 20,\r\n position: 'sticky',\r\n top: '0px',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n video: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n videoPanelContent: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n placementInfos: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n columnGap: 10,\r\n rowGap: '5px',\r\n alignItems: 'center',\r\n },\r\n enabledPlacement: {\r\n backgroundColor: '#DFF6DD',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n enabledText: {\r\n color: '#0C5E0C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n disabledPlacement: {\r\n backgroundColor: '#F3F2F1',\r\n padding: '3px 5px',\r\n borderRadius: 4,\r\n },\r\n disabledText: {\r\n color: '#605E5C',\r\n fontWeight: 600,\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: 5,\r\n },\r\n fontStyle: {\r\n fontSize: 14,\r\n fontWeight: 600,\r\n },\r\n placementLabel: {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n },\r\n placmentResolution: {\r\n paddingTop: 5,\r\n paddingBottom: 5,\r\n },\r\n videoPanelFinalUrlContainer: {\r\n width: 45,\r\n },\r\n starStyle: {\r\n fontSize: 20,\r\n },\r\n});\r\n\r\nexport const getImageSuggestionCarouselStyles = () => ({\r\n imageSuggestionCarouselRoot: {\r\n '& .image-suggestion-carousel-root': {\r\n '& .panel': {\r\n backgroundColor: 'transparent',\r\n\r\n '& .helpbutton': {\r\n margin: '4px 0px',\r\n },\r\n },\r\n },\r\n marginTop: 10,\r\n },\r\n croppedImage: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n width: '107px',\r\n height: '76px',\r\n background: '#F3F2F1',\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\n/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useRef, useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Text, FontIcon } from '@bingads-webui-react/fabric-control';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ClipchampPlayer } from '@bingads-webui-campaign-react/clipchamp-player';\r\nimport { Link } from '../common/shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nexport const AdPreview = (props) => {\r\n const {\r\n i18n,\r\n ads,\r\n onUpdateCurrentVideoIndex,\r\n disablePagination,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n permissions,\r\n loadClipchampPlayer,\r\n } = props;\r\n\r\n const videos = (ads && ads.data && _.isArray(ads.data)) ? ads.data : [];\r\n\r\n const videoRef = useRef();\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const { currentPageIndex } = ads;\r\n\r\n const [currentVideoIdx, setCurrentVideoIdx] = useState(0);\r\n\r\n const [videoHeight, setVideoHeight] = useState('280'); // default 280 height for horizontal videos\r\n const videoTemplateUIEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const goToPrevVideo = () => {\r\n setCurrentVideoIdx(currentVideoIdx - 1);\r\n };\r\n\r\n const goToNextVideo = () => {\r\n setCurrentVideoIdx(currentVideoIdx + 1);\r\n };\r\n\r\n const goToVideoIndex = (idx) => {\r\n setCurrentVideoIdx(idx);\r\n };\r\n\r\n const videosInPage = videos.slice(getPageAdjustedIndex(0), getPageAdjustedIndex(9) + 1);\r\n\r\n const currentVideo = videos[getPageAdjustedIndex(currentVideoIdx)] || videos[0];\r\n\r\n useEffect(() => {\r\n setCurrentVideoIdx(0);\r\n }, [currentPageIndex]);\r\n\r\n useEffect(() => {\r\n if (currentVideoIdx > videosInPage.length - 1) {\r\n setCurrentVideoIdx(0);\r\n }\r\n onUpdateCurrentVideoIndex(currentVideoIdx);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentVideoIdx, videosInPage.length]);\r\n\r\n const source = (currentVideo && currentVideo.data && currentVideo.data.video && currentVideo.data.video.src) || '';\r\n\r\n useEffect(() => {\r\n if (videoRef.current) {\r\n videoRef.current.load();\r\n }\r\n }, [source]);\r\n\r\n\r\n useEffect(() => {\r\n if (currentVideo?.data?.video) {\r\n const { height, width } = currentVideo.data.video;\r\n const isVertical = height > width;\r\n\r\n if (isVertical) {\r\n setVideoHeight('420');\r\n } else {\r\n setVideoHeight('280');\r\n }\r\n }\r\n }, [currentVideo]);\r\n\r\n return (\r\n
\r\n
\r\n {i18n.getString(_TL_('Ad preview'))} \r\n
\r\n
\r\n {videoTemplateUIEnabled ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n {\r\n !disablePagination && videosInPage.length > 1 && (\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Previous ad'))} \r\n \r\n
\r\n {\r\n videosInPage.map((video, idx) => (\r\n
\r\n goToVideoIndex(idx)} onClick={() => goToVideoIndex(idx)} className={classes.paginationIndicatorDot} style={{ backgroundColor: getPageAdjustedIndex(idx) === getPageAdjustedIndex(currentVideoIdx) ? '#0078d4' : '#c8c6c4' }} />\r\n
\r\n ))\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('Next ad'))} \r\n \r\n
\r\n
\r\n )\r\n }\r\n
\r\n \r\n {i18n.getString(_TL_('This is an example of what your video ad might look like. Depending on placement, the actual ad shown may appear differently.'))}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAdPreview.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.instanceOf(Array),\r\n currentPageIndex: PropTypes.number,\r\n }).isRequired,\r\n disablePagination: PropTypes.bool,\r\n onUpdateCurrentVideoIndex: PropTypes.func.isRequired,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n loadClipchampPlayer: PropTypes.func,\r\n};\r\n\r\nAdPreview.defaultProps = {\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n loadClipchampPlayer: _.noop,\r\n};\r\n","\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, makeStyles, mergeClasses, shorthands } from '@fluentui/react-components';\r\nimport { AddRegular } from '@fluentui/react-icons';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useStyles = makeStyles({\r\n buttonContainer: {\r\n width: '170px',\r\n ...shorthands.border('1px', 'dashed', '#c8c6c4'),\r\n height: '96px',\r\n display: 'flex',\r\n ...shorthands.borderRadius('6px'),\r\n },\r\n buttonContainerMultiple: {\r\n width: '112px',\r\n height: '99px',\r\n },\r\n button: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n },\r\n addIcon: {\r\n color: '#0078D4',\r\n fontSize: '32px',\r\n },\r\n addIconMultiple: {\r\n fontSize: '22px',\r\n },\r\n});\r\n\r\nexport const AddVideoButton = ({ onClick, multiVideoMode }) => {\r\n const classes = useStyles();\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nAddVideoButton.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n multiVideoMode: PropTypes.bool,\r\n};\r\n\r\nAddVideoButton.defaultProps = {\r\n multiVideoMode: false,\r\n};\r\n","export const overrideClasses = {\r\n image: {\r\n borderRadius: 6,\r\n },\r\n imageContainer: {\r\n height: 80,\r\n display: 'flex',\r\n },\r\n imageParentContainer: {\r\n display: 'flex',\r\n columnGap: '10px',\r\n },\r\n imageClickableContainer: {\r\n width: 107,\r\n '& img': {\r\n verticalAlign: 'top',\r\n },\r\n },\r\n seeAll: {\r\n bottom: 12,\r\n maxWidth: 'initial',\r\n },\r\n parentContainer: {\r\n '& $panelHeading': {\r\n display: 'flex',\r\n border: 'none',\r\n '& $panelTitle.collapsible-title': {\r\n flexGrow: 0,\r\n fontSize: '12px',\r\n fontWeight: 600,\r\n lineHeight: '24px',\r\n '& > a': {\r\n '& .helpbutton': {\r\n fontSize: '14px',\r\n lineHeight: '24px',\r\n display: 'inline',\r\n verticalAlign: 'bottom',\r\n },\r\n },\r\n marginTop: 0,\r\n },\r\n },\r\n },\r\n};\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { PlacementQualityToText } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { submitEvent } from '@bingads-webui-universal/accessibility-helper';\r\nimport {\r\n makeStyles,\r\n mergeClasses,\r\n shorthands,\r\n tokens,\r\n Badge,\r\n} from '@fluentui/react-components';\r\nimport { TimerRegular } from '@fluentui/react-icons';\r\nimport { curlyTemplate } from '@bingads-webui-universal/primitive-utilities';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n boxShadow: '0px 0.6px 1.8px 0px rgba(0, 0, 0, 0.10), 0px 3.2px 7.2px 0px rgba(0, 0, 0, 0.13)',\r\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n fontSize: tokens.fontSizeBase200,\r\n },\r\n qualityContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '5px',\r\n marginTop: '5px',\r\n },\r\n info: {\r\n position: 'absolute',\r\n top: '210px',\r\n left: tokens.spacingHorizontalS,\r\n backgroundColor: 'black',\r\n color: 'white',\r\n width: '52px',\r\n fontSize: tokens.fontSizeBase200,\r\n height: tokens.spacingVerticalXXL,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\r\n ...shorthands.overflow('hidden'),\r\n },\r\n icon: {\r\n fontSize: tokens.fontSizeBase400,\r\n },\r\n videoContainer: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n },\r\n video: {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n});\r\n\r\n// create a description for the video from text in the scenes\r\nconst getVideoDescription = ({ videoAsset, i18n }) => {\r\n const { duration } = videoAsset.template;\r\n const texts = videoAsset.template.scenes.map(scene => scene.text.join(' '));\r\n return curlyTemplate(i18n.getString(_TL_('video recommendation with duration {{duration}} seconds. Description: {{description}}')))({\r\n duration,\r\n description: texts.join(' '),\r\n });\r\n};\r\n\r\nexport const VideoSuggestionCard = ({\r\n videoAsset, resizeHeight, onSelectVideoSuggestion, i18n, showQuality,\r\n}) => {\r\n const classes = useStyles();\r\n const [showVideo, setShowVideo] = React.useState(false);\r\n const src = videoAsset.thumbnailUrl;\r\n const { width } = videoAsset.template;\r\n const { height } = videoAsset.template;\r\n const aspectRatio = width / height;\r\n\r\n // convert seconds to mm:ss\r\n const { duration } = videoAsset.template;\r\n const totalSeconds = duration / 1000;\r\n const minutes = Math.floor((totalSeconds) / 60);\r\n const seconds = Math.floor((totalSeconds) % 60);\r\n const durationString = `${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;\r\n const description = getVideoDescription({ videoAsset, i18n });\r\n\r\n return (\r\n
\r\n setShowVideo(true)}\r\n onMouseOut={() => setShowVideo(false)}\r\n onFocus={() => setShowVideo(true)}\r\n onBlur={() => setShowVideo(false)}\r\n aria-label={description}\r\n >\r\n \r\n {showVideo && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n {durationString}\r\n
\r\n
\r\n
\r\n {\r\n showQuality && (\r\n
\r\n \r\n {i18n.getString(PlacementQualityToText[videoAsset.quality])}\r\n
\r\n )\r\n }\r\n
\r\n );\r\n};\r\n\r\nVideoSuggestionCard.propTypes = {\r\n videoAsset: PropTypes.shape({\r\n url: PropTypes.string,\r\n thumbnailUrl: PropTypes.string,\r\n template: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n duration: PropTypes.number,\r\n scenes: PropTypes.arrayOf(PropTypes.shape({\r\n text: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }),\r\n }).isRequired,\r\n resizeHeight: PropTypes.number.isRequired,\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n showQuality: PropTypes.bool,\r\n};\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useRef, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Panel, PanelType, DefaultButton } from '@bingads-webui-react/fabric-control';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { FluentProvider, webLightTheme } from '@fluentui/react-components';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\n\r\nimport { VideoSuggestionCard } from './video-suggestion-card';\r\n\r\nconst getPanelStyles = (components, { palette = {} } = {}) => ({\r\n panel: {\r\n top: 60,\r\n },\r\n subtitle: {\r\n paddingTop: 22,\r\n color: palette.neutralDark,\r\n },\r\n panelHeader: {\r\n paddingLeft: 24,\r\n paddingRight: 24,\r\n alignSelf: 'justify-start',\r\n flexGrow: 1,\r\n },\r\n panelTitle: {\r\n fontSize: 20,\r\n fontWeight: 600,\r\n display: 'inline-block',\r\n lineHeight: '27px',\r\n },\r\n contentHeading: {\r\n paddingTop: 17,\r\n fontSize: '12px',\r\n paddingBottom: 20,\r\n },\r\n gridContainer: {\r\n display: 'grid',\r\n columnGap: '16px',\r\n rowGap: '16px',\r\n gridTemplateColumns: '430px 430px',\r\n },\r\n});\r\n\r\nexport const VideoRecommendationsPanel = ({\r\n i18n, isOpen, close, onSelectVideoSuggestion, permissions,\r\n}) => {\r\n const classes = useDefaultStyles(getPanelStyles);\r\n const contentRef = useRef(null);\r\n const { finalUrl } = useCopilotRepositoryContext();\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n const {\r\n videoAssets,\r\n } = recommendationContext || {};\r\n const isVideoAsAnAssetEnabled = permissions.dynamic.VideoAsAnAsset && !permissions.isAmplifyEnabled;\r\n\r\n const onDismiss = useCallback((evt) => {\r\n const target = evt && evt.currentTarget;\r\n if (evt.key === 'Escape' || (contentRef.current && contentRef.current.closest(`.${classes.panel}`).contains(target))) {\r\n close();\r\n }\r\n }, [classes.panel, close]);\r\n\r\n const onRenderFooterContent = () => (\r\n close()}\r\n text={i18n.getString(_TL_('Cancel'))}\r\n />\r\n );\r\n\r\n const onSelection = (index) => {\r\n onSelectVideoSuggestion(index);\r\n close();\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n {text},\r\n finalUrl,\r\n }}\r\n template={i18n.getString(_TL_('{{strong}}Final URL:{{/strong}} {{finalUrl}}'))}\r\n />\r\n
\r\n
\r\n {videoAssets &&\r\n videoAssets.map((videoAsset, index) => ( onSelection(index)}\r\n resizeHeight={242}\r\n i18n={i18n}\r\n showQuality={isVideoAsAnAssetEnabled}\r\n />))\r\n }\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nVideoRecommendationsPanel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n close: PropTypes.func.isRequired,\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n};\r\n","import React, { useContext, useCallback, useState, useMemo, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { ImageSuggestionCarousel } from '@bingads-webui-campaign-react/image-suggestion-carousel';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Spinner } from '@fluentui/react-components';\r\nimport { Shimmer, ShimmerElementsGroup, ShimmerElementType, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { CroppedImageView } from '@bingads-webui-campaign-react/cropped-image-view';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { overrideClasses } from './carousel-style';\r\nimport { getImageSuggestionCarouselStyles } from './styles';\r\nimport { VideoRecommendationsPanel } from './video-recommendations-panel';\r\n\r\nconst IMAGE_DIM = {\r\n width: 106,\r\n height: 76,\r\n marginRight: 8,\r\n};\r\n\r\nconst initialImageContainerLeftMargin = 10;\r\nconst SuggestionViewImageCount = 5;\r\nconst MaxSuggestionsInCarousel = 15;\r\n\r\nconst LoadingShimmer = ({ i18n }) => {\r\n const shimmerElements = useMemo(() => {\r\n const shimmerElement = [];\r\n\r\n _.each(_.range(SuggestionViewImageCount), () => {\r\n shimmerElement.push({ type: ShimmerElementType.line, height: 76, width: 106 });\r\n shimmerElement.push({ type: ShimmerElementType.gap, width: 10, height: 76 });\r\n });\r\n\r\n return shimmerElement;\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n } />\r\n
\r\n );\r\n};\r\n\r\nLoadingShimmer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nconst getImageDimension = src => new Promise((resolve) => {\r\n const img = new Image();\r\n img.src = src;\r\n img.onload = () => {\r\n const width = img.naturalWidth;\r\n const height = img.naturalHeight;\r\n\r\n resolve({\r\n imgWidth: width, imgHeight: height,\r\n });\r\n };\r\n});\r\n\r\nconst ImageView = ({ src }) => {\r\n const [width, setWidth] = useState(0);\r\n const [height, setHeight] = useState(0);\r\n\r\n const aspectRatio = width / height;\r\n const maxWidth = 107;\r\n\r\n const resizeHeight = Math.min(maxWidth / aspectRatio, 76);\r\n\r\n useEffect(() => {\r\n getImageDimension(src).then(({ imgWidth, imgHeight }) => {\r\n setWidth(imgWidth);\r\n setHeight(imgHeight);\r\n });\r\n }, [src]);\r\n\r\n if (!width || !height) {\r\n return
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nImageView.propTypes = {\r\n src: PropTypes.string.isRequired,\r\n};\r\n\r\nexport const VideoAdsSuggestionCarousel = ({\r\n onSelectVideoSuggestion,\r\n i18n,\r\n permissions,\r\n useBrandKit = false,\r\n isBrandKitEmpty,\r\n setUseBrandKit,\r\n}) => {\r\n // For Video BK will only work with new templates\r\n const isBrandKitEnabled = permissions && permissions.dynamic && (permissions.dynamic.BrandKitUI && permissions.dynamic.VideoTemplateUI);\r\n const [isSeeAllPanelOpen, setIsSeeAllPanelOpen] = useState(false);\r\n const [videosToSuggest, setVideosToSuggest] = useState([]);\r\n\r\n const [recommendationContext, , reportRecommendations] = useContext(RecommendationContext);\r\n const { logSuggestionsViewed } = useCopilotLoggers();\r\n\r\n const {\r\n videoAssets: videoSuggestions,\r\n isLoading,\r\n errorMessage,\r\n } = recommendationContext || {};\r\n\r\n const classes = useDefaultStyles(getImageSuggestionCarouselStyles);\r\n\r\n const { carouselState } = useMemo(() => ({\r\n carouselState: {\r\n carousel: {\r\n isError: _.isEmpty(videoSuggestions),\r\n },\r\n suggestion: {\r\n images: videoSuggestions,\r\n },\r\n },\r\n panelState: {\r\n panelImages: videoSuggestions,\r\n hasMore: false,\r\n },\r\n }), [videoSuggestions]);\r\n\r\n const { suggestion, carousel } = carouselState || {};\r\n const { images: suggestionImages } = suggestion || {};\r\n\r\n const onOffsetChange = useCallback((offset) => {\r\n const viewedImages = videosToSuggest.slice(offset, offset + SuggestionViewImageCount);\r\n const suggestionIds = _.pluck(viewedImages, 'suggestionId');\r\n reportRecommendations({ view: suggestionIds });\r\n logSuggestionsViewed(undefined /* imageSuggestionIds */, suggestionIds);\r\n }, [videosToSuggest, reportRecommendations, logSuggestionsViewed]);\r\n\r\n const onSelectIndex = useCallback((index) => {\r\n onSelectVideoSuggestion(videosToSuggest[index]);\r\n }, [videosToSuggest, onSelectVideoSuggestion]);\r\n\r\n const onSelectImage = useCallback((__, index) => {\r\n onSelectIndex(index);\r\n }, [onSelectIndex]);\r\n\r\n const onSelectSeeAllImages = useCallback(() => {\r\n const suggestionIds = suggestionImages.map(({ suggestionId }) => suggestionId);\r\n\r\n setIsSeeAllPanelOpen(true);\r\n logSuggestionsViewed(undefined /* imageSuggestionIds */, suggestionIds);\r\n }, [logSuggestionsViewed, suggestionImages]);\r\n\r\n const onRenderImage = useCallback((src, classesProp) => (\r\n
\r\n \r\n
\r\n ), [classes.croppedImage]);\r\n\r\n useEffect(() => {\r\n const truncatedImages = _.isArray(suggestionImages) && suggestionImages.slice(0, MaxSuggestionsInCarousel);\r\n setVideosToSuggest(truncatedImages || []);\r\n }, [suggestionImages]);\r\n\r\n return (\r\n
\r\n {isLoading ?\r\n : (\r\n )}\r\n {isSeeAllPanelOpen && (\r\n setIsSeeAllPanelOpen(false)}\r\n onSelectVideoSuggestion={onSelectIndex}\r\n permissions={permissions}\r\n />)}\r\n {errorMessage && (\r\n \r\n {i18n.getString(errorMessage)}\r\n )}\r\n
\r\n );\r\n};\r\n\r\nVideoAdsSuggestionCarousel.propTypes = {\r\n onSelectVideoSuggestion: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n useBrandKit: PropTypes.bool,\r\n isBrandKitEmpty: PropTypes.bool,\r\n setUseBrandKit: PropTypes.func,\r\n};\r\n","import { useContext, useCallback, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { getLocalStorage } from '@bingads-webui/storage';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { useBrandKitDataService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { formatBrandkitForAPI } from '@bingads-webui-campaign-react/ads-studio-app-shared-components';\r\n\r\nconst FetchCount = 10;\r\n\r\nexport const useVideoAdsCopilot = () => {\r\n const [, setRecommendationContext] = useContext(RecommendationContext);\r\n\r\n const repository = useCopilotRepositoryContext();\r\n\r\n const { logBannerGenerated } = useCopilotLoggers();\r\n\r\n const { fetchVideoAdsAssetRecommendations, finalUrl } = repository;\r\n const [isLoadingBrandKit, setIsLoadingBrandkit] = useState(false);\r\n const [brandkit, setBrandKit] = useState(null);\r\n const [isBrandKitEmpty, setIsBrandKitEmpty] = useState(true);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid } = scope.values;\r\n const permissions = useContext(PermissionsContext);\r\n // For Video BK will only work with new templates\r\n const isBrandKitEnabled = permissions && permissions.dynamic && (permissions.dynamic.BrandKitUI && permissions.dynamic.VideoTemplateUI);\r\n\r\n const { getBrandKitDataByAccId } = useBrandKitDataService();\r\n\r\n const fetchBrandKit = useCallback(async () => {\r\n if (isBrandKitEnabled) {\r\n setIsLoadingBrandkit(true);\r\n const response = await getBrandKitDataByAccId({ accId: aid });\r\n setIsLoadingBrandkit(false);\r\n const isBrandKitHavingData = response && response.BrandKits && response.BrandKits[0] && (!_.isEmpty(response.BrandKits[0].Fonts) ||\r\n !_.isEmpty(response.BrandKits[0].Images) ||\r\n !_.isEmpty(response.BrandKits[0].LandscapeLogos) ||\r\n !_.isEmpty(response.BrandKits[0].Palettes) ||\r\n !_.isEmpty(response.BrandKits[0].SquareLogos));\r\n if (isBrandKitHavingData) {\r\n setIsBrandKitEmpty(false);\r\n const updatedResponse = {\r\n ...response.BrandKits[0],\r\n };\r\n setBrandKit(formatBrandkitForAPI(updatedResponse));\r\n } else {\r\n setIsBrandKitEmpty(true);\r\n }\r\n }\r\n }, [isBrandKitEnabled, getBrandKitDataByAccId, aid, setBrandKit, setIsBrandKitEmpty]);\r\n\r\n const fetch = useCallback((taskManager, useBrandKit) => {\r\n if (!finalUrl || isLoadingBrandKit) {\r\n return;\r\n }\r\n\r\n setRecommendationContext({\r\n isLoading: true,\r\n errorMessage: undefined,\r\n });\r\n\r\n taskManager.addTask({\r\n taskId: isBrandKitEnabled ? `${finalUrl}-brandkit-${useBrandKit}` : finalUrl,\r\n taskFn: () => {\r\n setRecommendationContext({ isLoading: true });\r\n const localStorage = getLocalStorage();\r\n const campaignObjective = localStorage.get('CampaignObjective');\r\n const recommendationType = campaignObjective === 'Awareness' ? 'OLV' : 'CTV';\r\n return fetchVideoAdsAssetRecommendations(FetchCount, false, recommendationType, null, (useBrandKit && brandkit) ? brandkit : null);\r\n },\r\n }).then((response) => {\r\n const { ads } = response.data;\r\n\r\n const videoAssets = ads.map((ad) => {\r\n const {\r\n url, thumbnailUrl, recommendationId, template, videoMetadata,\r\n } = ad;\r\n\r\n return {\r\n url,\r\n thumbnailUrl,\r\n quality: videoMetadata.quality,\r\n width: videoMetadata.width,\r\n height: videoMetadata.height,\r\n sourceVideoBitRate: videoMetadata.sourceVideoBitRate,\r\n suggestionId: recommendationId,\r\n RecommendationId: recommendationId,\r\n template,\r\n };\r\n });\r\n\r\n logBannerGenerated(finalUrl, {\r\n RecommendedAssets: {\r\n VideoAssets: videoAssets,\r\n },\r\n });\r\n\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n videoAssets,\r\n });\r\n }).catch(() => {\r\n setRecommendationContext({\r\n isLoading: false,\r\n finalUrl,\r\n videoAssets: [],\r\n errorMessage: _TL_('Unable to generate recommendations for this Final URL'),\r\n });\r\n });\r\n }, [fetchVideoAdsAssetRecommendations, finalUrl, logBannerGenerated, setRecommendationContext, isLoadingBrandKit, brandkit]);\r\n\r\n return {\r\n fetch,\r\n finalUrlForCopilot: finalUrl,\r\n isBrandKitEmpty,\r\n fetchBrandKit,\r\n };\r\n};\r\n","import React from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Label, Icon } from '@bingads-webui-react/fabric-control';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getAdsStepStyles } from './styles';\r\n\r\nconst convertBpsToKbps = (bps) => {\r\n // Divide bps by 1,000\r\n const Kbps = bps / (10 ** 3);\r\n\r\n return Math.floor(Kbps);\r\n};\r\n\r\nconst Placements = {\r\n AUDIENCE_NETWORK: _TL_('Microsoft Advertising Network'),\r\n GENERAL_CTV: _TL_('General CTV'),\r\n NETFLIX: _TL_('Premium CTV'),\r\n};\r\n\r\nexport const PlacementQualities = {\r\n PERFECT: 7,\r\n EXCELLENT_AND_PERFECT: 6,\r\n PERFECT_AND_GOOD: 5,\r\n ONLY_PERFECT: 4,\r\n EXCELLENT: 3,\r\n ONLY_EXCELLENT: 2,\r\n GOOD: 1,\r\n NONE: 0,\r\n};\r\n\r\n// recently changed wording for each quality label\r\n// perfect -> excellent\r\n// excellent -> good\r\n// good -> fair\r\nexport const PlacementQualityToText = {\r\n [PlacementQualities.PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.EXCELLENT]: _TL_('Good'),\r\n [PlacementQualities.GOOD]: _TL_('Fair'),\r\n [PlacementQualities.NONE]: _TL_('Poor'),\r\n [PlacementQualities.PERFECT_AND_GOOD]: _TL_('Excellent'),\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.ONLY_PERFECT]: _TL_('Excellent'),\r\n [PlacementQualities.ONLY_EXCELLENT]: _TL_('Good'),\r\n};\r\n\r\nconst QualityToPlacements = {\r\n [PlacementQualities.PERFECT]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV, Placements.NETFLIX], disabled: [] },\r\n [PlacementQualities.EXCELLENT]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV], disabled: [Placements.NETFLIX] },\r\n [PlacementQualities.GOOD]: { enabled: [Placements.AUDIENCE_NETWORK], disabled: [Placements.GENERAL_CTV, Placements.NETFLIX] },\r\n [PlacementQualities.NONE]: { enabled: [], disabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV, Placements.NETFLIX] },\r\n [PlacementQualities.PERFECT_AND_GOOD]: { enabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV], disabled: [Placements.NETFLIX] },\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: { enabled: [Placements.GENERAL_CTV, Placements.NETFLIX], disabled: [Placements.AUDIENCE_NETWORK] },\r\n [PlacementQualities.ONLY_PERFECT]: { enabled: [Placements.NETFLIX], disabled: [Placements.AUDIENCE_NETWORK, Placements.GENERAL_CTV] },\r\n [PlacementQualities.ONLY_EXCELLENT]: { enabled: [Placements.GENERAL_CTV], disabled: [Placements.AUDIENCE_NETWORK, Placements.NETFLIX] },\r\n};\r\n\r\nconst StarsToQuality = {\r\n [PlacementQualities.PERFECT]: 3,\r\n [PlacementQualities.EXCELLENT_AND_PERFECT]: 3,\r\n [PlacementQualities.PERFECT_AND_GOOD]: 3,\r\n [PlacementQualities.ONLY_PERFECT]: 3,\r\n [PlacementQualities.EXCELLENT]: 2,\r\n [PlacementQualities.ONLY_EXCELLENT]: 2,\r\n [PlacementQualities.GOOD]: 1,\r\n [PlacementQualities.NONE]: 0,\r\n};\r\n\r\nexport const PlacementTitle = ({ i18n, classes, titleText }) => (\r\n
\r\n \r\n \r\n
\r\n);\r\n\r\nPlacementTitle.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n placementLabel: PropTypes.string.isRequired,\r\n }).isRequired,\r\n titleText: PropTypes.string.isRequired,\r\n};\r\n\r\n\r\nexport const PlacementInfo = (props) => {\r\n const {\r\n i18n,\r\n videoAd,\r\n } = props;\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const classes = defaultClasses;\r\n\r\n if (videoAd && videoAd.video) {\r\n const {\r\n width, height, quality = 0, sourceVideoBitRate,\r\n } = videoAd.video;\r\n\r\n return (\r\n
\r\n \r\n
{width}px x {height}px, {`${convertBpsToKbps(sourceVideoBitRate)} ${_TL_('Kbps')}`} ({PlacementQualityToText[quality]} {i18n.getString(_TL_('quality'))})
\r\n
\r\n {QualityToPlacements[quality].enabled.map(placement => (\r\n
{i18n.getString(placement)}
\r\n ))}\r\n {QualityToPlacements[quality].disabled.map(placement => (\r\n
{i18n.getString(placement)}
\r\n ))}\r\n
\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nPlacementInfo.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n quality: PropTypes.number,\r\n sourceVideoBitRate: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\n\r\nexport const PlacementInfoWithStars = (props) => {\r\n const {\r\n i18n,\r\n videoAd,\r\n } = props;\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const classes = defaultClasses;\r\n\r\n if (videoAd && videoAd.video) {\r\n const {\r\n width, height, quality = 0, sourceVideoBitRate,\r\n } = videoAd.video;\r\n\r\n const numberOfStars = StarsToQuality[quality] || 0;\r\n\r\n const numberOfDisabledStars = 3 - numberOfStars;\r\n\r\n return (\r\n
\r\n \r\n
\r\n {\r\n _.range(numberOfStars).map(idx => (\r\n \r\n ))\r\n }\r\n {\r\n numberOfDisabledStars > 0 && _.range(numberOfDisabledStars).map(idx => (\r\n \r\n ))\r\n }\r\n ({PlacementQualityToText[quality]} {i18n.getString(_TL_('quality'))})\r\n
\r\n
{width}px x {height}px, {`${convertBpsToKbps(sourceVideoBitRate)} ${_TL_('Kbps')}`}
\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\n\r\nPlacementInfoWithStars.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n quality: PropTypes.number,\r\n sourceVideoBitRate: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n};\r\n","import { has } from 'underscore';\r\n\r\nexport const isBulkWrappedResponse = bulkResult => has(bulkResult, 'entity'); // && has(bulkResult, 'errors');\r\n","import { identity, contains, isEmpty, isEqual } from 'underscore';\r\nimport { mapBulkUpsertErrors } from './map-bulk-upsert-errors';\r\n\r\nexport const ERROR_ENTITY = {\r\n Campaign: 'campaign',\r\n AdGroup: 'adGroup',\r\n AssetGroup: 'assetGroup',\r\n Ad: 'ad',\r\n CampaignLocation: 'campaignLocation',\r\n CampaignRadius: 'campaignRadius',\r\n CampaignNegativeLocation: 'campaignNegativeLocation',\r\n CampaignLocationIntent: 'campaignLocationIntent',\r\n CampaignDayTimeCriterion: 'campaignDayTimeCriterion',\r\n CampaignNegativeWebpage: 'campaignNegativeWebpage',\r\n};\r\n\r\nexport const serverErrorsCompare = (prev, curr) => !(!isEmpty(curr) && !isEqual(prev, curr));\r\n\r\nconst getBulkUploadEntityType = entitySchema =>\r\n (entitySchema.properties['bulk-upload-type'] || {}).value ||\r\n entitySchema.name;\r\n\r\nexport const getBulkUploadErrorType = entitySchema =>\r\n `${getBulkUploadEntityType(entitySchema)} Error`;\r\n\r\nexport const modelToViewModelForBulkErrors = (errors, bulkUpsertEntityErrorMap, scenario, i18n, activityLogger) =>\r\n mapBulkUpsertErrors(errors, bulkUpsertEntityErrorMap, /* errorProcessor */ identity, scenario, i18n, activityLogger);\r\n\r\nconst ReferencedEntityInvalidIdErrors = ['CampaignServiceInvalidCampaignId', 'CampaignServiceFutureFeatureCode', 'CampaignServiceInvalidAdGroupId'];\r\nexport const removeReferencedEntityInvalidIdErrors = bulkErrors =>\r\n bulkErrors.filter(({ Error }) => !contains(ReferencedEntityInvalidIdErrors, Error));\r\n\r\nexport const getPanelErrorProps = ({ needsAttention }) => (needsAttention ? {\r\n error: _TL_(\"* Something's wrong\"),\r\n} : {});\r\n","import { identity, result } from 'underscore';\r\nimport { getBulkApiErrors } from '@bingads-webui-campaign/api-errors';\r\n\r\nexport const mapBulkUpsertErrors = (errors, bulkUpsertEntityErrorMap, errorProcessor = identity, scenario, i18n, activityLogger) =>\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","/* istanbul ignore file */\r\n\r\nexport const getDealDetailsStyle = () => ({\r\n dealDetails: {\r\n width: 313,\r\n '& h5': {\r\n fontSize: 14,\r\n },\r\n '& .option-wrapper': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n fontSize: 12,\r\n marginBottom: 8,\r\n '& .option-name': {\r\n flex: 2,\r\n color: '#605E5C',\r\n },\r\n '& .option-value': {\r\n color: '#323130',\r\n },\r\n },\r\n },\r\n});\r\n","/* istanbul ignore file */\r\n\r\nexport const DeviceKeys = {\r\n Computers: 'Computers',\r\n Tablets: 'Tablets',\r\n Smartphones: 'Smartphones',\r\n ConnectedTVs: 'ConnectedTVs',\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport _, { difference, each, get } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport * as locationTargetConverter from '@bingads-webui-campaign-legacy/location-targets/util/locationTargetConverter';\r\nimport { DeviceKeys } from '../target-constants';\r\n\r\nexport function getCountriesLocations(locationIds, lcid, cid, aid) {\r\n if (_.size(locationIds) === 0) {\r\n return Promise.resolve([]);\r\n }\r\n const reqs = _.map(locationIds, id => ({\r\n type: 'GET',\r\n url: `${edmCampaign.Customers.$withKey(cid).Accounts.$withKey(aid).Locations.$withKey(id).path}?%24expand=ParentLocations`,\r\n headers: lcid ? {\r\n lcid,\r\n } : undefined,\r\n }));\r\n\r\n return odata.batch({ reqs, needContentType: true });\r\n}\r\n\r\nconst targetTypes = {\r\n Device: 'Device',\r\n Age: 'Age',\r\n Gender: 'Gender',\r\n Location: 'Location',\r\n Audience: 'Audience',\r\n};\r\n\r\nexport function getTargetConstraints(deal, targetType) {\r\n const ret = {\r\n mandatory: [],\r\n isRestricted: deal.Type === 'Restricted',\r\n };\r\n\r\n if (!deal || !deal.DealTargetConstraints) { return ret; }\r\n\r\n const devicesConstraints = deal.DealTargetConstraints.find(target => target.TargetType === targetType);\r\n\r\n if (!devicesConstraints) {\r\n return ret;\r\n }\r\n\r\n ret.mandatory = devicesConstraints.Mandatory || [];\r\n ret.isRestricted = devicesConstraints.DealTargetRestrictionLevel === 'Restricted';\r\n\r\n return ret;\r\n}\r\n\r\nasync function getLocationCritetions({\r\n serverContext, countries,\r\n}) {\r\n const cid = serverContext.CurrentCustomer.Id;\r\n const aid = serverContext.CurrentAccount.Id;\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n\r\n const response = await getCountriesLocations(countries, lcid, cid, aid);\r\n const locationCriterions = [];\r\n\r\n each(response, (location) => {\r\n const criterion = locationTargetConverter.buildLocationCriterionFromSearchResult(\r\n location.data,\r\n { mode: 'location', status: 'Included' }\r\n );\r\n criterion.location = get(criterion, 'Criterion.LocationCriterion.NameTypeCombo');\r\n locationCriterions.push(criterion);\r\n });\r\n\r\n return locationCriterions;\r\n}\r\n\r\nexport async function modelConstraints(deal, adGroup, serverContext) {\r\n if (!deal || !adGroup) { return adGroup; }\r\n\r\n const isCreating = !adGroup.Id;\r\n\r\n const deviceConstraints = getTargetConstraints(deal, targetTypes.Device);\r\n const locationConstraints = getTargetConstraints(deal, targetTypes.Location);\r\n const ageConstraints = getTargetConstraints(deal, targetTypes.Age);\r\n const genderConstraints = getTargetConstraints(deal, targetTypes.Gender);\r\n const audienceConstraints = getTargetConstraints(deal, targetTypes.Audience);\r\n\r\n const dealLocationTargets = adGroup.locationTargets;\r\n if (isCreating && locationConstraints && locationConstraints.isRestricted === false && dealLocationTargets && dealLocationTargets.currentLevelSettings) {\r\n dealLocationTargets.currentLevelSettings.targetOption = 'everywhere';\r\n dealLocationTargets.currentLevelSettings.currentLocations = [];\r\n } else if (get(adGroup, ['locationTargets', 'currentLevelSettings', 'initLocations'], []).length === 0) {\r\n // locations\r\n const locations = await getLocationCritetions({\r\n serverContext,\r\n countries: locationConstraints.mandatory,\r\n });\r\n\r\n if (locations.length !== 0) {\r\n dealLocationTargets.currentLevelSettings.currentLocations = locations;\r\n dealLocationTargets.currentLevelSettings.initLocations = [];\r\n dealLocationTargets.currentLevelSettings.targetOption = 'specific';\r\n dealLocationTargets.useParentLevel = false;\r\n }\r\n }\r\n const adGroupModel = {};\r\n if (ageConstraints.isRestricted) {\r\n adGroupModel.ageRanges = [];\r\n adGroupModel.initialAgeRanges = [];\r\n adGroupModel.negativeAgeRanges = [];\r\n }\r\n\r\n if (genderConstraints.isRestricted) {\r\n adGroupModel.initialGenderTypes = [];\r\n adGroupModel.negativeGenderTYpes = [];\r\n adGroupModel.genderTypes = [];\r\n }\r\n\r\n if (audienceConstraints.isRestricted) {\r\n adGroupModel.audiences = [];\r\n }\r\n\r\n return {\r\n ...adGroup,\r\n ...adGroupModel,\r\n deal,\r\n locationTargets: dealLocationTargets,\r\n dealLocationList: locationConstraints.mandatory,\r\n deviceTypes: isCreating ? deviceConstraints.mandatory : adGroup.deviceTypes,\r\n deviceRestrictions: deviceConstraints.isRestricted ? Object.keys(DeviceKeys) : difference(Object.keys(DeviceKeys), deviceConstraints.mandatory),\r\n deviceRestricted: deviceConstraints.isRestricted,\r\n locationRestricted: locationConstraints.isRestricted,\r\n // locationRestricted: false,\r\n ageRestricted: ageConstraints.isRestricted,\r\n genderRestricted: genderConstraints.isRestricted,\r\n audienceRestricted: audienceConstraints.isRestricted,\r\n genreRestricted: true,\r\n };\r\n}\r\n","/* istanbul ignore file */\r\nimport { find, get } from 'underscore';\r\nimport { ceil } from 'lodash';\r\n\r\n// ref: /private/Campaign/MT/Source/Interface/Entity/CurrencyType.cs\r\n\r\nexport const CurrencyCode2CurrencyId = {\r\n AUD: 1,\r\n BRL: 2,\r\n ARS: 15,\r\n CAD: 3,\r\n CLP: 16,\r\n COP: 18,\r\n DKK: 5,\r\n EUR: 6,\r\n HKD: 30,\r\n INR: 36,\r\n JPY: 8,\r\n MXN: 57,\r\n NOK: 9,\r\n NZD: 10,\r\n PEN: 64,\r\n SGD: 74,\r\n ZAR: 13,\r\n SEK: 11,\r\n CHF: 4,\r\n USD: 12,\r\n GBP: 7,\r\n VEF: 87,\r\n TWD: 82,\r\n MYR: 58,\r\n PHP: 65,\r\n VND: 88,\r\n THB: 78,\r\n IDR: 34,\r\n DZD: 23,\r\n BHD: 42,\r\n EGP: 25,\r\n IQD: 37,\r\n JOD: 41,\r\n KWD: 46,\r\n LBP: 48,\r\n MAD: 52,\r\n QAR: 69,\r\n OMR: 62,\r\n SAR: 72,\r\n TND: 79,\r\n CNY: 17,\r\n TRY: 93,\r\n PLN: 67,\r\n AED: 21,\r\n ILS: 35,\r\n NGN: 99,\r\n KRW: 45,\r\n};\r\n\r\nexport const MTCurrencyConvertor = {\r\n AustralianDollar: 'AUD',\r\n BrazilianReal: 'BRL',\r\n CanadianDollar: 'CAD',\r\n SwissFranc: 'CHF',\r\n DanishKrone: 'DKK',\r\n EURO: 'EUR',\r\n UKPound: 'GBP',\r\n JapaneseYen: 'JPY',\r\n NorwegianKrone: 'NOK',\r\n NewZealandDollar: 'NZD',\r\n SwedishKrona: 'SEK',\r\n USDollar: 'USD',\r\n SouthAfricanRand: 'ZAR',\r\n ArgentinePeso: 'ARS',\r\n ChileanPeso: 'CLP',\r\n YuanRenminbi: 'CNY',\r\n ColombianPeso: 'COP',\r\n UAEDirham: 'AED',\r\n AlgerianDinar: 'DZD',\r\n EgyptianPound: 'EGP',\r\n HongKongDollar: 'HKD',\r\n IndonesianRupiah: 'IDR',\r\n IsraeliSheqel: 'ILS',\r\n IndianRupee: 'INR',\r\n LebanesePound: 'LBP',\r\n MoroccanDirham: 'MAD',\r\n MexicanPeso: 'MXN',\r\n MalaysianRinggit: 'MYR',\r\n PeruvianNuevoSol: 'PEN',\r\n PhilippinePeso: 'PHP',\r\n Zloty: 'PLN',\r\n QatariRial: 'QAR',\r\n SaudiRiyal: 'SAR',\r\n SingaporeDollar: 'SGD',\r\n ThaiBaht: 'THB',\r\n NewTaiwanDollar: 'TWD',\r\n VenezuelanBolivar: 'VEF',\r\n VietnamDong: 'VND',\r\n NewTurkishLira: 'TRY',\r\n NigerianNaira: 'NGN',\r\n Won: 'KRW',\r\n};\r\n\r\nexport const getConvertedCurrencyDealMinimumBid = (minimumBid, dealCurrency, accountCurrency, exchangeRateMapping) => {\r\n if (minimumBid && accountCurrency && exchangeRateMapping) {\r\n const dealCurrencyId = CurrencyCode2CurrencyId[MTCurrencyConvertor[dealCurrency] || 'USD'] || 12;\r\n const dealCurrencyToUSD = get(find(exchangeRateMapping, item => item.CurrencyId === dealCurrencyId), 'ExchangeRateValue', 1);\r\n\r\n const accountCurrencyId = CurrencyCode2CurrencyId[accountCurrency] || 12;\r\n const accountCurrencyToUSD = get(find(exchangeRateMapping, item => item.CurrencyId === accountCurrencyId), 'ExchangeRateValue', 1);\r\n\r\n return ceil((minimumBid * dealCurrencyToUSD) / accountCurrencyToUSD, 2);\r\n }\r\n return minimumBid;\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { get, isNumber, uniq, chain, sortBy, compact } from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { getDealDetailsStyle } from './deal-detils-style';\r\nimport { getTargetConstraints } from './deal-constraints';\r\nimport { MTCurrencyConvertor } from './account-currency-daily-exchange-rate';\r\n\r\nexport function getVideoConstraintDuration(dealDetails, i18n) {\r\n const minimumDuration = get(dealDetails, 'DealAdQualityConstraints[0].MinimumDuration');\r\n if (minimumDuration && isNumber(minimumDuration)) {\r\n return `${Math.round(minimumDuration/1000, 1)} ${i18n.getString(_TL_('seconds'))}`;\r\n }\r\n return i18n.getString(_TL_('Unavailable'));\r\n}\r\n\r\nexport function isNetflixDeal(deal) {\r\n return deal.Seller && deal.Seller.toLowerCase().indexOf('netflix') > -1;\r\n}\r\n\r\nexport function isDealDeleted(deal) {\r\n return deal.Error && deal.Error === 'InvalidId';\r\n}\r\n\r\nconst AgeRanges = {\r\n EighteenToTwentyFive: _TL_('18-24'),\r\n TwentyFiveToThirtyFive: _TL_('25-34'),\r\n ThirtyFiveToFifty: _TL_('35-49'),\r\n FiftyToSixtyFive: _TL_('50-64'),\r\n SixtyFiveAndAbove: _TL_('65+'),\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nconst sortAgeRanges = ageRanges => sortBy(ageRanges, ageRange => AgeRanges[ageRange]);\r\n\r\nconst formatAgeRange = (ageRange, i18n) => (AgeRanges[ageRange] ? i18n.getString(AgeRanges[ageRange]) : ageRange);\r\n\r\nconst formatAgeRanges = (ageRanges, i18n) => {\r\n return chain(sortAgeRanges(ageRanges))\r\n .map(ageRange => formatAgeRange(ageRange, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n};\r\n\r\nexport function targetConstraintsToText(dealDetails, targetType, i18n, locationMap = {}) {\r\n const { mandatory, isRestricted } = getTargetConstraints(dealDetails, targetType);\r\n\r\n if (mandatory.length === 0) {\r\n if (isRestricted) {\r\n if (isNetflixDeal(dealDetails)) {\r\n return i18n.getString(_TL_('Unavailable'));\r\n }\r\n return i18n.getString(_TL_('Restricted'));\r\n }\r\n return i18n.getString(_TL_('No Restrictions'));\r\n }\r\n\r\n if (targetType === 'Location') {\r\n return uniq(mandatory.map((location) => {\r\n const locationName = locationMap[location];\r\n return locationName;\r\n })).join(', ');\r\n } else if (targetType === 'Age') {\r\n return formatAgeRanges(mandatory, i18n);\r\n }\r\n return mandatory.join(', ');\r\n}\r\n\r\nexport const DealDetails = (props) => {\r\n const { i18n, dealDetails, style, shouldShowGenre } = props;\r\n const classes = useDefaultStyles(getDealDetailsStyle);\r\n const dealOptions = compact([{\r\n name: i18n.getString(_TL_('Publisher')),\r\n value: dealDetails.Seller,\r\n }, {\r\n name: i18n.getString(_TL_('Minimum bid ')),\r\n value: dealDetails.MinimumBid ?\r\n `${decimal.fromFloatToString(dealDetails.MinimumBid, 2)} ${MTCurrencyConvertor[dealDetails.Currency] || 'USD'}` : `${i18n.getString(_TL_('Unavailable'))}`,\r\n }, {\r\n name: i18n.getString(_TL_('Duration ')),\r\n value: `${getVideoConstraintDuration(dealDetails, i18n)}`,\r\n }, {\r\n name: i18n.getString(_TL_('Country')),\r\n value: dealDetails.CountryName || i18n.getString(_TL_('Everywhere')),\r\n }, {\r\n name: i18n.getString(_TL_('Device targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Device', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Gender targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Gender', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Age targeting')),\r\n value: dealDetails.AgeRange || targetConstraintsToText(dealDetails, 'Age', i18n),\r\n }, {\r\n name: i18n.getString(_TL_('Audience targeting')),\r\n value: targetConstraintsToText(dealDetails, 'Audience', i18n),\r\n }, shouldShowGenre && {\r\n name: i18n.getString(_TL_('Genre targeting')),\r\n value: dealDetails.Genre ? _TL_('Available') : _TL_('Unavailable'),\r\n }]);\r\n\r\n return (\r\n
\r\n
\r\n
{i18n.getString(_TL_('Media deal details'))}
\r\n
\r\n {dealOptions.map(option => (\r\n
\r\n
{option.name}
\r\n
{option.value}
\r\n
\r\n ))}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nDealDetails.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n dealDetails: PropTypes.shape({\r\n Seller: PropTypes.string,\r\n StartDate: PropTypes.string,\r\n EndDate: PropTypes.string,\r\n Genre: PropTypes.string,\r\n Currency: PropTypes.string,\r\n Duration: PropTypes.string,\r\n CountryName: PropTypes.string,\r\n MinimumBid: PropTypes.number,\r\n AskPrice: PropTypes.number,\r\n }).isRequired,\r\n style: PropTypes.shape({}),\r\n};\r\n\r\nDealDetails.defaultProps = {\r\n style: {},\r\n};\r\n","/* istanbul ignore file */\r\n\r\nexport function bytesForHuman(bytes) {\r\n if (!bytes) {\r\n return '';\r\n }\r\n let num = bytes;\r\n const units = ['', 'K', 'M', 'B', 'T', 'P'];\r\n\r\n let i = 0;\r\n\r\n for (i; num > 1000; i += 1) {\r\n num /= 1000;\r\n }\r\n\r\n return `${num.toFixed(1)} ${units[i]}`;\r\n}\r\n","import { pick, each, values, filter, extend, isUndefined, isNull, isEmpty, mapObject } from 'underscore';\r\n\r\nconst verifiedTrackingSettingAttachment = (ad) => {\r\n const verifiedTrackingSettings = ad.data.VerifiedTrackingSettings;\r\n if (isUndefined(verifiedTrackingSettings) || isNull(verifiedTrackingSettings)) {\r\n return {};\r\n }\r\n\r\n if (isEmpty(verifiedTrackingSettings)) {\r\n return { VerifiedTrackingData: '' };\r\n }\r\n const results = [];\r\n\r\n each(verifiedTrackingSettings, (setting) => {\r\n const result = [];\r\n mapObject(setting, (value, key) => {\r\n result.push({ Key: key, Value: value });\r\n });\r\n results.push(result);\r\n });\r\n\r\n return { VerifiedTrackingData: JSON.stringify(results) };\r\n};\r\n\r\nexport const viewModelToModelForAd = ({ adsViewModel, campaign, adGroup }, isDeletedEntities = false) => {\r\n // parse the ads\r\n const adViewModel = [];\r\n\r\n each(adsViewModel, (ad) => {\r\n const finalUrl = ad.data.FinalUrls;\r\n const trackingUrlTemplate = ad.data.TrackingUrlTemplate;\r\n const finalUrlSuffix = ad.data.FinalUrlSuffix;\r\n const urlCustomParameters = ad.data.UrlCustomParameters;\r\n\r\n const video = ad.data.video ? JSON.stringify([{ id: ad.data.video.id, idString: ad.data.video.idString, subType: ad.data.video.type }]) : undefined;\r\n const image = ad.data.image ? JSON.stringify([{\r\n id: ad.data.image.id,\r\n subType: 'DisplayCreativeImage',\r\n targetWidth: ad.data.image.targetWidth,\r\n targetHeight: ad.data.image.targetHeight,\r\n cropX: ad.data.image.cropX,\r\n cropY: ad.data.image.cropY,\r\n cropWidth: ad.data.image.cropWidth,\r\n cropHeight: ad.data.image.cropHeight,\r\n }]) : undefined;\r\n\r\n const verifiedTrackingSettingAttachmentObj = verifiedTrackingSettingAttachment(ad);\r\n const impressionTrackingUrls = ad.data.ImpressionTrackingUrls ? { ImpressionTrackingUrls: ad.data.ImpressionTrackingUrls } : {};\r\n\r\n const fields = {\r\n 'Client Id': `${ad.uid}`,\r\n FinalUrls: finalUrl,\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n Campaign: pick(campaign, 'Id'),\r\n AdGroup: pick(adGroup, 'Id'),\r\n ...verifiedTrackingSettingAttachmentObj,\r\n ...impressionTrackingUrls,\r\n };\r\n\r\n if (image) {\r\n extend(fields, { Images: image });\r\n }\r\n if (video) {\r\n extend(fields, { Videos: video });\r\n }\r\n\r\n if (ad.Id) {\r\n fields.Id = ad.Id;\r\n }\r\n\r\n if (isDeletedEntities) {\r\n fields.Status = 'Deleted';\r\n }\r\n\r\n if (ad.adSubType) {\r\n fields.AdSubType = ad.adSubType;\r\n }\r\n\r\n adViewModel.push(fields);\r\n });\r\n\r\n return adViewModel;\r\n};\r\n\r\nconst adsWithIdsAttached = (savedAdsData, oldAdsData) => {\r\n const ads = [];\r\n\r\n each(oldAdsData, (ad, idx) => {\r\n // From API find the saved Item that has the client id same as the view model uid.\r\n // Once we have this item we try to patch the Id into the data model, so next time we know this will be an update scenario.\r\n const savedAdItem = filter(savedAdsData, sAd => sAd['Client Id'] === `${ad.uid}`);\r\n\r\n if (savedAdItem && savedAdItem[0] && savedAdItem[0].Id) {\r\n ads[idx] = { ...ad, Id: savedAdItem[0].Id };\r\n } else {\r\n ads[idx] = { ...ad, Id: undefined };\r\n }\r\n });\r\n\r\n return ads;\r\n};\r\n\r\nexport const bulkModelToViewModelForAd = ({\r\n adsModel,\r\n originalAdsModel,\r\n}) => {\r\n const processedAds = adsWithIdsAttached(adsModel, originalAdsModel.data);\r\n\r\n const adViewModel = {\r\n data: processedAds,\r\n isValid: true,\r\n isDirty: false,\r\n currentPageIndex: 1,\r\n };\r\n\r\n return adViewModel;\r\n};\r\n\r\n\r\nexport const modelToViewModelForAd = ({\r\n adsModel,\r\n}) => {\r\n const adsVideoModel = { ...adsModel };\r\n\r\n return adsVideoModel;\r\n};\r\n\r\nexport const splitUpdateAndCreateAds = ({\r\n adsViewModel, oldAdsModel, campaign, adGroup,\r\n}) => {\r\n const adIds = [];\r\n\r\n const adsToCreate = [];\r\n const adsToUpdate = [];\r\n const adsToDelete = [];\r\n\r\n each(values(adsViewModel.data), (ad) => {\r\n if (ad.data && (ad.data.video || ad.data.image)) {\r\n const adToSave = { ...ad };\r\n if (adsViewModel.adSubType) {\r\n adToSave.adSubType = adsViewModel.adSubType;\r\n }\r\n\r\n // check if the ad has ID\r\n if (adToSave.Id) {\r\n adsToUpdate.push(adToSave);\r\n\r\n // add the Ids of Ads that have already been saved to API\r\n // so that we can delete if the oldAdsModel contains more Ids\r\n adIds.push(adToSave.Id);\r\n } else {\r\n adsToCreate.push(adToSave);\r\n }\r\n }\r\n });\r\n\r\n if (oldAdsModel) {\r\n // get ids of the ads that are deleted (missing in adIds array)\r\n each(values(oldAdsModel.data), (oldAd) => {\r\n if (oldAd.Id && !adIds.includes(oldAd.Id)) {\r\n adsToDelete.push(oldAd);\r\n }\r\n });\r\n }\r\n\r\n const adsNeededToCreate = viewModelToModelForAd({ adsViewModel: adsToCreate, campaign, adGroup });\r\n\r\n const adsNeededToUpdate = [\r\n ...viewModelToModelForAd({ adsViewModel: adsToUpdate, campaign, adGroup }),\r\n ...viewModelToModelForAd({ adsViewModel: adsToDelete, campaign, adGroup }, true),\r\n ];\r\n\r\n return { adsNeededToCreate, adsNeededToUpdate };\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { edmCampaign, getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport { QueryParam } from '@bingads-webui-react/scope-service';\r\n\r\nimport { isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, ERROR_ENTITY } from '../common';\r\nimport { bulkModelToViewModelForAd, splitUpdateAndCreateAds } from './ad';\r\n\r\nconst attachUidToErrorProperty = errors => _.map(errors, (error) => {\r\n // eslint-disable-next-line no-param-reassign\r\n error.Property = `${error.Property}_${error['Client Id']}`;\r\n\r\n return error;\r\n});\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst adEDM = edmCampaign.types.resolve('Model.ResponsiveAd');\r\nconst adResource = new adEDM.ResourceIdentifier();\r\n\r\n\r\nconst createData = data => adResource.bulkCreate.bind(adResource)(data);\r\n\r\nconst updateData = data => adResource.bulkUpdate.bind(adResource)(data);\r\n\r\nconst bulkUpsertAdSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(ResponsiveAd)]: ERROR_ENTITY.Ad,\r\n};\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n systemErrors: [],\r\n serverErrors: [],\r\n});\r\n\r\nconst postVideoByUrl = ({ videoUrl }) => {\r\n const queryParam = new QueryParam(window.location);\r\n\r\n queryParam.remove(['adGroupId', 'campaignId']);\r\n const { currentEntity } = getEntityFromScope(queryParam);\r\n\r\n return currentEntity\r\n .Videos['Default.CreateVideo']\r\n .$makeCall({\r\n functionParams: {},\r\n payload: {\r\n videoUrl,\r\n description: '',\r\n },\r\n })\r\n .toPromise();\r\n};\r\n\r\nconst uploadVideo = ({ ad }) => postVideoByUrl({ videoUrl: ad.data.video.url }).then((res) => {\r\n _.extend(ad.data.video, newVideoFromMTObject({ SubType: 'VideoMedia16X9', Status: 'Draft', Id: res.value }));\r\n});\r\n\r\nconst uploadVideoIfNeeded = ({ ads }) => {\r\n const videoPromises = [];\r\n ads.data.forEach((ad) => {\r\n if (ad.data && ad.data.video && !ad.data.video.id) {\r\n videoPromises.push(uploadVideo({ ad }));\r\n }\r\n });\r\n\r\n if (_.isEmpty(videoPromises)) {\r\n return Promise.resolve(ads);\r\n }\r\n\r\n return Promise.all(videoPromises).then(() => ads);\r\n};\r\n\r\nexport const saveAds = ({\r\n ads,\r\n oldAdsModel,\r\n campaign,\r\n adGroup,\r\n activity = null,\r\n}, { scenario, i18n }) => uploadVideoIfNeeded({ ads }).then((adsViewModel) => {\r\n const { adsNeededToCreate, adsNeededToUpdate } = splitUpdateAndCreateAds({\r\n adsViewModel, oldAdsModel, campaign, adGroup,\r\n });\r\n\r\n const promises = {};\r\n\r\n if (adsNeededToCreate.length > 0) {\r\n promises.createAds = createData(adsNeededToCreate);\r\n }\r\n\r\n if (adsNeededToUpdate.length > 0) {\r\n promises.updateAds = updateData(adsNeededToUpdate);\r\n }\r\n\r\n return Promise.props(promises).then((results) => {\r\n const updatedAds = results.updateAds || [];\r\n const createdAds = results.createAds || [];\r\n\r\n const result = [...updatedAds, ...createdAds];\r\n\r\n const data = {\r\n ads: bulkModelToViewModelForAd({\r\n adsModel: result,\r\n originalAdsModel: adsViewModel,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n\r\n if (activity) {\r\n activity.signal(`onAdsSavedSuccessfully, redirecting to campaign grid page - adCount: ${result.length}`);\r\n }\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n\r\n // we need to attach uid to each error to identify which video panel has an error.\r\n // the uid is stored in the clientid of the error.\r\n const errorsWithPropertyIdsAttached = attachUidToErrorProperty(errors);\r\n\r\n const entities = entity ?\r\n bulkModelToViewModelForAd({\r\n adsModel: entity,\r\n originalAdsModel: adsViewModel,\r\n }) :\r\n adsViewModel;\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n errorsWithPropertyIdsAttached,\r\n bulkUpsertAdSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activity\r\n );\r\n\r\n if (activity) {\r\n activity.signal(`onAdsSavedUnsuccessfully, ${JSON.stringify(serverErrors)}`);\r\n }\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n ads: { ...entities },\r\n serverErrors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n ads: adsViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n});\r\n","import { odata } from '@bingads-webui/http-util';\r\nimport { getODataConfig } from '../model/ad-bulk';\r\n\r\nconst expireTimeDefault = 86400 * 1000; // 1 day\r\n\r\n\r\nexport function setLocalStorageWithExpire(key, data, expire) {\r\n const obj = {\r\n data,\r\n time: Date.now(),\r\n expire,\r\n };\r\n localStorage.setItem(key, JSON.stringify(obj));\r\n}\r\n\r\nfunction getLocalStorageWithExpire(key) {\r\n let val = localStorage.getItem(key);\r\n if (!val) {\r\n return null;\r\n }\r\n try {\r\n val = JSON.parse(val);\r\n } catch (error) {\r\n console.error('Error during JSON parse:', error);\r\n return null;\r\n }\r\n if (Date.now() - val.time > val.expire) {\r\n localStorage.removeItem(key);\r\n return { val: val.data, expired: true };\r\n }\r\n return { val: val.data, expired: false };\r\n}\r\n\r\nexport function getKey() {\r\n const date = new Date();\r\n return `${date.getFullYear}/${date.getMonth}/${date.getDay}`;\r\n}\r\n\r\nexport async function fetchExchangeRateMapping(serverContext) {\r\n const oDataConfig = getODataConfig(serverContext);\r\n const baseURL = `${oDataConfig.oDataPath}/Customers(${serverContext.CurrentCustomer.Id})/Accounts(${serverContext.CurrentAccount.Id})/`;\r\n const url = `${baseURL}/Default.GetExchangeRate`;\r\n\r\n try {\r\n const result = await odata.get(url, oDataConfig);\r\n if (result && result.value) {\r\n setLocalStorageWithExpire(getKey(), result.value, expireTimeDefault);\r\n return result.value;\r\n }\r\n } catch (error) {\r\n console.error(error + url);\r\n }\r\n return Promise.resolve();\r\n}\r\n\r\nexport function getAccountExchangeRateFromLocalStorage(serverContext) {\r\n let exchangeRateMapping = getLocalStorageWithExpire(getKey());\r\n\r\n if (!exchangeRateMapping || exchangeRateMapping.expired) {\r\n exchangeRateMapping = fetchExchangeRateMapping(serverContext);\r\n }\r\n\r\n return exchangeRateMapping;\r\n}\r\n","import config from '@bingads-webui-component-legacy/config/index';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\n\r\nexport const isDealCampaign = () => location.pathname.includes('awarenessmediadeal');\r\nexport const isCTVCampaign = () => location.pathname.includes('awareness') && !isDealCampaign();\r\n\r\nexport const getVideoDeal = () => {\r\n if (!isDealCampaign()) {\r\n return null;\r\n }\r\n let videoDeal = config.get('VideoMediaDeal');\r\n if (!videoDeal) {\r\n if (localStorage.supportsStorage()) {\r\n videoDeal = localStorage.get('VideoMediaDeal');\r\n config.set('VideoMediaDeal', videoDeal);\r\n }\r\n }\r\n\r\n return videoDeal;\r\n};\r\n","import React, { useEffect, useState, useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { VideoExperience, newVideoFromMTObject, ImageExperienceVideo } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { entityIs, propertyIs, andComp } from '@bingads-webui-campaign-react/form-error';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withPreference } from '@bingads-webui-react/preference-context';\r\nimport { CopilotVideoEditor } from '@bingads-webui-campaign-react/edit-video-ads-view';\r\nimport { withAssetLibraryServicesLoaded } from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport { VideoTemplateEditorContextWrapper } from '@bingads-webui-campaign-react/video-ads-editor';\r\n\r\nimport { AddVideoButton } from './add-video-button';\r\nimport { IconButton } from '../common/shared-components';\r\nimport { VideoAdsSuggestionCarousel } from './video-ads-suggestion-carousel';\r\nimport { useVideoAdsCopilot } from './use-video-ads-copilot';\r\nimport { PlacementInfoWithStars } from './video-metadata';\r\nimport { ERROR_ENTITY } from '../common';\r\n\r\nconst entityIsAd = entityIs(ERROR_ENTITY.Ad);\r\n// TODO - move to a common place.\r\nconst legacyTemplates = ['00000001-0000-0000-0000-000000000000', '00000001-0000-0000-0000-000000000001'];\r\n\r\nexport const validateVideo = (video, i18n, videoRequirementForDeal, skipQualityValidation) => {\r\n const messages = [];\r\n\r\n if (!video) {\r\n messages.push(i18n.getString(_TL_('Please add a video.')));\r\n return messages;\r\n }\r\n\r\n if (video.Status !== 'Active') {\r\n return [];\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (video.quality === 0 && !skipQualityValidation) {\r\n messages.push(i18n.getString(_TL_('Your video is low quality and doesn\\'t meet our requirements to serve on eligible networks. Please upload another file and try again.')));\r\n }\r\n\r\n if ((video.height < 720 || video.width < 960) && !skipQualityValidation) {\r\n messages.push(i18n.getString(_TL_('Your video must be at least 960x720 pixels. Please upload another file and try again.')));\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (videoRequirementForDeal && video.quality < videoRequirementForDeal) {\r\n if (videoRequirementForDeal === 2) {\r\n messages.push(i18n.getString(_TL_('For this deal your asset must meet the General CTV requirements.')));\r\n } else if (videoRequirementForDeal === 4) {\r\n messages.push(i18n.getString(_TL_('For this deal your asset must meet the Premium Video requirements.')));\r\n }\r\n }\r\n\r\n if (messages.length > 1) {\r\n return video.Status === 'Active' ? [_.first(messages)] : [];\r\n }\r\n\r\n // for draft video, we only show processing error message.\r\n return messages;\r\n};\r\n\r\nconst getStyles = (/* components, theme */) => ({\r\n videoPanelButton: {\r\n justifyContent: 'flex-end',\r\n display: 'none',\r\n cursor: 'pointer',\r\n borderRadius: 99,\r\n background: '#FFFFFF',\r\n width: 32,\r\n height: 32,\r\n },\r\n videoPanelButtonContainer: {\r\n position: 'absolute',\r\n left: '50%',\r\n top: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n columnGap: '10px',\r\n display: 'flex',\r\n },\r\n});\r\n\r\nconst CustomComponent = (props) => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n onDataChange,\r\n idx,\r\n i18n,\r\n videoAd,\r\n updateValidation,\r\n videoRequirementForDeal,\r\n permissions,\r\n renderError,\r\n assetLibraryConfig,\r\n dataService,\r\n copilotEnabled,\r\n isCTV,\r\n multiVideoMode,\r\n isVideoRequired,\r\n skipQualityValidation,\r\n loadClipchampPlayer,\r\n useBrandKit,\r\n setUseBrandKit,\r\n isBrandKitEmpty,\r\n ...rest\r\n } = props;\r\n const {\r\n getVideo,\r\n } = dataService;\r\n const {\r\n cid, aid, perfMarker, serverContext,\r\n } = rest;\r\n\r\n const video = videoAd && videoAd.video ? videoAd.video : null;\r\n\r\n const videoTemplateUIEnabled = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n const isGoogleImportVideoAdNeedsRepair = permissions && permissions.IsGoogleImportVideoAdsEnabled\r\n && _.get(videoAd, 'video.sourceType') === 'GoogleImported'\r\n && _.get(videoAd, 'video.status') === 'Failed';\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const [isUploading, setIsUploading] = useState(false);\r\n const [showVideoEditor, setShowVideoEditor] = useState(false);\r\n const [isFetchingVideo, setIsFetchingVideo] = useState(false);\r\n const [multiVideoList, setMultiVideoList] = useState(() => (videoAd && videoAd.videos ? [...videoAd.videos] : []));\r\n const [showMultiVideoCopilotEditor, setShowMultiVideoCopilotEditor] = useState({\r\n isOpen: false,\r\n });\r\n const [isVideoFetched, setIsVideoFetched] = useState(false);\r\n\r\n const enableEdit = video && video.template;\r\n const templateId = video && video.template && video.template.templateId;\r\n const isLegacyTemplate = legacyTemplates.includes(templateId);\r\n\r\n const onErrorsUpdated = (errors) => {\r\n // already converted using i18n;\r\n\r\n if (errors) {\r\n updateValidation(errors, { video: null });\r\n }\r\n };\r\n\r\n const onUpdateVideoList = (list) => {\r\n if (list.length > 0) {\r\n const validationMessage = validateVideo(list[0], i18n, videoRequirementForDeal, skipQualityValidation);\r\n updateValidation(validationMessage, { video: list[0] });\r\n if (activity) {\r\n activity.signal(`onVideoValidated - messages: ${validationMessage} - isValid: ${validationMessage.length === 0}`);\r\n }\r\n } else {\r\n updateValidation([i18n.getString(_TL_('Please add a video.'))], { video: null });\r\n }\r\n };\r\n\r\n const onUpdateMultiAdVideoList = useCallback((list) => {\r\n const validVideos = list.filter(multiVideo => multiVideo !== undefined);\r\n setMultiVideoList(validVideos);\r\n\r\n let validationMessages = [];\r\n if (validVideos.length > 0) {\r\n validationMessages = validVideos.map(valVideo => validateVideo(valVideo, i18n, videoRequirementForDeal, skipQualityValidation));\r\n }\r\n\r\n const aggregatedMessages = validationMessages.flat();\r\n\r\n updateValidation(aggregatedMessages, { videos: validVideos });\r\n if (activity) {\r\n activity.signal(`onVideoValidated - messages: ${aggregatedMessages} - isValid: ${aggregatedMessages.length === 0}`);\r\n }\r\n }, [i18n, updateValidation, videoRequirementForDeal, activity, skipQualityValidation]);\r\n\r\n useEffect(() => {\r\n if (isUploading) {\r\n updateValidation([i18n.getString(_TL_('Please wait while we upload your video.'))], { video: null });\r\n\r\n if (activity) {\r\n activity.signal('video is uploading');\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isUploading]);\r\n\r\n useEffect(() => {\r\n const shouldDirty = !(_.isUndefined(videoAd) || _.isNull(videoAd));\r\n ((multiVideoMode === false) && updateValidation(\r\n videoAd ? validateVideo(videoAd.video, i18n, videoRequirementForDeal, skipQualityValidation) : [i18n.getString(_TL_('Please add a video.'))],\r\n { video: videoAd && videoAd.video ? videoAd.video : null },\r\n shouldDirty\r\n ));\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const onRenderItemDropdown = (values, videoAsset) => {\r\n if (values.uploadVideo !== null) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n values.onReplace(videoAsset.Type)}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n };\r\n\r\n const onRenderItemDropdownCoPilot = (values) => {\r\n if (values.uploadVideo !== null) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {enableEdit &&\r\n
\r\n setShowVideoEditor(true)}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n }\r\n
\r\n {\r\n const validationMessage = validateVideo(null, i18n, videoRequirementForDeal, skipQualityValidation);\r\n updateValidation(validationMessage, { video: null });\r\n }}\r\n iconProps={{ iconName: 'Cancel' }}\r\n className=\"remove-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n };\r\n\r\n const onRenderItemDropDownForMultiModeWithCopilot = useCallback((selectedVideo, selectedIdx) => {\r\n const selectedMultiVideo = multiVideoList[selectedIdx];\r\n\r\n\r\n return (\r\n
\r\n {\r\n selectedVideo.template && (\r\n
\r\n setShowMultiVideoCopilotEditor({\r\n isOpen: true,\r\n video: selectedMultiVideo,\r\n idx: selectedIdx,\r\n })}\r\n iconProps={{ iconName: 'Edit' }}\r\n className=\"edit-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n )\r\n }\r\n
\r\n {\r\n // remove only the selected video\r\n const updatedVideos = [...multiVideoList];\r\n updatedVideos.splice(selectedIdx, 1);\r\n onUpdateMultiAdVideoList(updatedVideos);\r\n }}\r\n\r\n iconProps={{ iconName: 'Cancel' }}\r\n className=\"remove-icon-button\"\r\n styles={{ root: { borderRadius: '99px', height: 32, width: 32 } }}\r\n />\r\n
\r\n
\r\n );\r\n }, [multiVideoList, classes.videoPanelButton, onUpdateMultiAdVideoList]);\r\n\r\n const getNewVideoObject = useCallback((newVideo) => {\r\n const validationMessage = validateVideo(newVideo, i18n, videoRequirementForDeal, skipQualityValidation);\r\n const videoObject = new ImageExperienceVideo({\r\n ...newVideo,\r\n width: newVideo.template.width,\r\n height: newVideo.template.height,\r\n src: newVideo.src || newVideo.url,\r\n type: 'VideoMedia16X9',\r\n thumbnailUrl: newVideo.thumbnailUrl,\r\n });\r\n videoObject.url = newVideo.url;\r\n if (!videoObject.recommendationId) {\r\n videoObject.recommendationId = newVideo.recommendationId || newVideo.suggestionId;\r\n }\r\n\r\n return { videoObject, validationMessage };\r\n }, [i18n, videoRequirementForDeal, skipQualityValidation]);\r\n\r\n const updateWithNewVideo = useCallback((newVideo) => {\r\n const { videoObject, validationMessage } = getNewVideoObject(newVideo);\r\n\r\n if (multiVideoMode) {\r\n const isDuplicate = multiVideoList.find(v => v.recommendationId === videoObject.recommendationId);\r\n if (!isDuplicate) {\r\n onUpdateMultiAdVideoList([...multiVideoList, videoObject]);\r\n }\r\n } else {\r\n updateValidation(validationMessage, {\r\n video: videoObject,\r\n });\r\n }\r\n }, [getNewVideoObject, multiVideoMode, multiVideoList, onUpdateMultiAdVideoList, updateValidation]);\r\n\r\n const updateWithNewVideoAtIdx = useCallback((newVideo, newVideoIdx) => {\r\n const videoObject = new ImageExperienceVideo({\r\n ...newVideo,\r\n width: newVideo.template.width,\r\n height: newVideo.template.height,\r\n src: newVideo.src || newVideo.url,\r\n type: 'VideoMedia16X9',\r\n thumbnailUrl: newVideo.thumbnailUrl,\r\n });\r\n videoObject.url = newVideo.url;\r\n if (!videoObject.recommendationId) {\r\n videoObject.recommendationId = newVideo.recommendationId || newVideo.suggestionId;\r\n }\r\n\r\n const updatedVideos = [...multiVideoList];\r\n updatedVideos[newVideoIdx] = videoObject;\r\n onUpdateMultiAdVideoList(updatedVideos);\r\n }, [multiVideoList, onUpdateMultiAdVideoList]);\r\n\r\n const onChangeVideo = useCallback((newVideo) => {\r\n updateWithNewVideo({ ...newVideo, status: 'Active' });\r\n }, [updateWithNewVideo]);\r\n\r\n const onChangeMultiVideo = useCallback((newVideo, newVideoIdx) => {\r\n updateWithNewVideoAtIdx({ ...newVideo, status: 'Active' }, newVideoIdx);\r\n }, [updateWithNewVideoAtIdx]);\r\n\r\n useEffect(() => {\r\n if (!multiVideoMode && video && video.id && video.metadata && !video.template) {\r\n setIsFetchingVideo(true);\r\n getVideo({ id: video.id, fetchMetadata: true }).then((newVideo) => {\r\n updateWithNewVideo(newVideoFromMTObject(newVideo));\r\n }).finally(() => {\r\n setIsFetchingVideo(false);\r\n });\r\n }\r\n }, [getVideo, updateWithNewVideo, video, multiVideoMode]);\r\n\r\n useEffect(() => {\r\n if (!isFetchingVideo & !isVideoFetched && copilotEnabled && multiVideoMode && multiVideoList.length > 0 && multiVideoList.some(v => v && v.id && v.metadata && !v.template)) {\r\n setIsFetchingVideo(true);\r\n const getVideoPromises = [];\r\n const updatedVideos = [];\r\n multiVideoList.forEach((v, index) => {\r\n if (v && v.id && v.metadata && !v.template) {\r\n getVideoPromises.push(getVideo({ id: v.id, fetchMetadata: true }).then((newVideo) => {\r\n const { videoObject } = getNewVideoObject(newVideoFromMTObject(newVideo));\r\n updatedVideos.push([videoObject, index]);\r\n }));\r\n } else {\r\n updatedVideos.push([v, index]);\r\n }\r\n });\r\n\r\n Promise.all(getVideoPromises).finally(() => {\r\n const existingVideos = [...multiVideoList];\r\n updatedVideos.forEach(([newVideo, index]) => {\r\n existingVideos[index] = newVideo;\r\n });\r\n\r\n onUpdateMultiAdVideoList(existingVideos);\r\n setIsFetchingVideo(false);\r\n setIsVideoFetched(true);\r\n });\r\n }\r\n }, [getVideo, updateWithNewVideo, multiVideoMode, multiVideoList, isFetchingVideo, onUpdateMultiAdVideoList, copilotEnabled, isVideoFetched, getNewVideoObject]);\r\n\r\n useEffect(() => {\r\n if (multiVideoMode && isVideoRequired && _.isEmpty(videoAd.videos)) {\r\n updateValidation([i18n.getString(_TL_('Please add a video.'))], { video: null }, false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const { finalUrlForCopilot } = useVideoAdsCopilot();\r\n\r\n return (\r\n <>\r\n \r\n {(multiVideoMode === false) ? (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {!isGoogleImportVideoAdNeedsRepair && videoAd && videoAd.video && videoAd.video.quality !== undefined && (\r\n )}\r\n
) : (\r\n
\r\n \r\n
)}\r\n {renderError}\r\n {copilotEnabled && (!multiVideoMode || (multiVideoMode && multiVideoList.length < 5)) &&\r\n \r\n }\r\n \r\n {\r\n copilotEnabled && video && video.template && (\r\n videoTemplateUIEnabled && !isLegacyTemplate ? (\r\n {\r\n setShowVideoEditor(newOpen);\r\n }}\r\n isCTV={isCTV}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker.createChild('VideoTemplateEditor')}\r\n isDialog\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n ) : (\r\n {\r\n setShowVideoEditor(newOpen);\r\n }}\r\n onApply={onChangeVideo}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n i18n={i18n}\r\n perfMarker={perfMarker.createChild('CopilotVideoEditor')}\r\n isCTV={isCTV}\r\n />\r\n )\r\n )\r\n }\r\n {\r\n copilotEnabled && multiVideoMode && (\r\n videoTemplateUIEnabled ? (\r\n onChangeMultiVideo(newVideo, showMultiVideoCopilotEditor.idx)}\r\n setIsOpen={(newOpen) => {\r\n setShowMultiVideoCopilotEditor({ isOpen: newOpen });\r\n }}\r\n isCTV={isCTV}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker.createChild('VideoTemplateEditor')}\r\n isDialog\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n ) : (\r\n {\r\n setShowMultiVideoCopilotEditor({ isOpen: newOpen });\r\n }}\r\n onApply={newVideo => onChangeMultiVideo(newVideo, showMultiVideoCopilotEditor.idx)}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrlForCopilot}\r\n assetLibraryConfig={assetLibraryConfig}\r\n permissions={permissions}\r\n isAADUser={serverContext && serverContext.IsAADUser}\r\n i18n={i18n}\r\n perfMarker={perfMarker.createChild('CopilotVideoEditor')}\r\n isCTV={isCTV}\r\n />\r\n )\r\n )\r\n }\r\n \r\n );\r\n};\r\n\r\n\r\nCustomComponent.propTypes = {\r\n onDataChange: PropTypes.func.isRequired,\r\n idx: PropTypes.number.isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n Status: PropTypes.string,\r\n VideoTemplateUI: PropTypes.bool,\r\n }),\r\n messages: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n videoRequirementForDeal: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n renderError: PropTypes.node.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func,\r\n }).isRequired,\r\n serverContext: PropTypes.shape({\r\n IsAADUser: PropTypes.bool,\r\n }).isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n copilotEnabled: PropTypes.bool.isRequired,\r\n isVideoRequired: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst VideoExperienceWithValidation = _.compose(\r\n withControlErrorHandling,\r\n withUnvalidatedControlErrors,\r\n withError,\r\n withCustomValidation,\r\n withAssetLibraryServicesLoaded\r\n)(CustomComponent);\r\n\r\nconst ValidatedVideoExperience = (props) => {\r\n const {\r\n videoAd, idx, i18n, multiVideoMode, isCTV, isVideoRequired, ...rest\r\n } = props;\r\n\r\n const {\r\n serverContext, preferenceService, cid, aid, oDataConfig,\r\n } = rest;\r\n\r\n const videoProp = andComp(entityIsAd, propertyIs(`Video.VideoMedia16X9_${idx}`));\r\n\r\n const validVideos = videoAd && Array.isArray(videoAd.videos) ? videoAd.videos.filter(video => video !== undefined) : [];\r\n\r\n const multiAdDataObj = { videos: validVideos };\r\n\r\n const dataObj = { video: videoAd ? videoAd.video : null };\r\n\r\n const processingMessage = i18n.getString(_TL_('We\\'re processing your video and reviewing its quality, which may take some time to complete. Please provide your Final URL and select Save. Then, you can check your video\\'s status from the ad grid.'));\r\n\r\n const passiveMessages = videoAd && videoAd.video && videoAd.video.Status === 'Draft' ? [processingMessage] : [];\r\n\r\n const updatedVideoAd = multiVideoMode ? { videos: validVideos } : videoAd;\r\n\r\n const activityLogger = useContext(ActivityContext);\r\n\r\n const assetLibraryConfig = {\r\n cid,\r\n aid,\r\n oDataConfig,\r\n dateFormat: _.get(serverContext, ['CurrentUser', 'CultureDateTimeFormat', 'ShortDatePattern']),\r\n timeZone: _.get(serverContext, ['CurrentAccount', 'TimeZone']),\r\n preferencesService: preferenceService,\r\n activityLogger,\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nValidatedVideoExperience.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n videoAd: PropTypes.shape({\r\n video: PropTypes.shape({\r\n Status: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n idx: PropTypes.number.isRequired,\r\n multiVideoMode: PropTypes.bool,\r\n isCTV: PropTypes.bool,\r\n isVideoRequired: PropTypes.bool.isRequired,\r\n skipQualityValidation: PropTypes.bool,\r\n};\r\n\r\nValidatedVideoExperience.defaultProps = {\r\n multiVideoMode: false,\r\n isCTV: false,\r\n skipQualityValidation: false,\r\n};\r\n\r\nconst VideoExperienceWithPreference = withPreference(ValidatedVideoExperience);\r\n\r\nconst VideoExperienceWithPreferenceRecommendationFetch = (props) => {\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n const { fetch, isBrandKitEmpty, fetchBrandKit } = useVideoAdsCopilot();\r\n const { useBrandKit } = props;\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, [fetchBrandKit]);\r\n\r\n useEffect(() => {\r\n if (props.copilotEnabled) {\r\n fetch(copilotFetchTaskManager, useBrandKit);\r\n }\r\n }, [props, copilotFetchTaskManager, fetch]);\r\n\r\n return ;\r\n};\r\n\r\nexport { VideoExperienceWithPreference as ValidatedVideoExperience };\r\nexport { VideoExperienceWithPreferenceRecommendationFetch as ValidatedVideoExperienceWithRecommendationFetch };\r\n","import React, { useContext, useEffect, useMemo, useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withCustomValidation, withError, ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedFinalUrl as UrlInput } from '@bingads-webui-campaign-react/validated-url-input';\r\n\r\n\r\nconst ValidatedFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(withError(withCustomValidation(UrlInput))));\r\n\r\nexport const FinalUrl = ({\r\n i18n,\r\n finalUrlsObj,\r\n containerClassName,\r\n setCopilotFinalUrl,\r\n isAdGridEditorMode,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const [validationState, setValidationState] = useState({});\r\n const [updatedCopilotFinalUrl, setUpdatedCopilotFinalUrl] = useState(false);\r\n\r\n const updateValidationState = (result) => {\r\n setValidationState(result);\r\n };\r\n\r\n const notifyCopilotFinalURLchange = useCallback(() => {\r\n const isValid = _.result(validationState, 'isValid', false);\r\n const finalUrls = _.result(validationState, ['data', 'FinalUrls'], undefined);\r\n const finalUrl = _.first(finalUrls);\r\n\r\n if (isValid) {\r\n if (activity) {\r\n activity.signal(`[VideoAdsCopilot] - Final URL changed to ${finalUrl}`);\r\n }\r\n\r\n setCopilotFinalUrl(finalUrl);\r\n setUpdatedCopilotFinalUrl(true);\r\n }\r\n }, [activity, validationState, setCopilotFinalUrl]);\r\n\r\n const handleKeyUp = useCallback((e) => {\r\n const { key } = e;\r\n if (key === 'Enter') {\r\n notifyCopilotFinalURLchange();\r\n }\r\n }, [notifyCopilotFinalURLchange]);\r\n\r\n const additionalProperties = useMemo(() => ({ onBlur: notifyCopilotFinalURLchange, onKeyUp: handleKeyUp }), [notifyCopilotFinalURLchange, handleKeyUp]);\r\n\r\n useEffect(() => {\r\n // for editor notify final url to trigger copilot on editor open\r\n if (isAdGridEditorMode && !updatedCopilotFinalUrl) {\r\n notifyCopilotFinalURLchange();\r\n }\r\n }, [isAdGridEditorMode, notifyCopilotFinalURLchange, updatedCopilotFinalUrl]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFinalUrl.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n finalUrlsObj: PropTypes.shape({}).isRequired,\r\n containerClassName: PropTypes.string,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({}).isRequired,\r\n isAdGridEditorMode: PropTypes.bool,\r\n};\r\n\r\nFinalUrl.defaultProps = {\r\n containerClassName: '',\r\n isAdGridEditorMode: false,\r\n};\r\n","import React, { useContext, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { ResponsiveAd } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { ThirdPartyMeasurementContainerWithValidation } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { AdvancedSettings } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { CampaignFetchProvider } from '@bingads-webui-campaign-react/campaign-http';\r\n\r\nimport { ValidatedVideoExperience } from './validated-video-experience';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { IconButton } from '../common/shared-components';\r\nimport { FinalUrl } from './final-url';\r\nimport { useVideoAdsCopilot } from './use-video-ads-copilot';\r\nimport { getODataConfig } from '../model/ad-bulk';\r\n\r\nconst VideoPanel = ({\r\n i18n,\r\n perfMarker,\r\n cid,\r\n aid,\r\n onUpdate,\r\n onRemovePanel,\r\n removeCloseButton,\r\n permissions,\r\n videoAd,\r\n keyIndex,\r\n isSelectedPanel,\r\n videoRequirementForDeal,\r\n oDataConfig: oDataConfigProp,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n biddingScheme,\r\n isForDeal,\r\n isXandrServingCampaign,\r\n dealLoaded,\r\n setCopilotFinalUrl,\r\n isAdGridEditorMode,\r\n copilotFetchTaskManager,\r\n copilotEnabled,\r\n loadClipchampPlayer,\r\n useBrandKit,\r\n setUseBrandKit,\r\n}) => {\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const videoTypesWithOrder = ['VideoMedia16X9'];\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n DynamicPermissions: {\r\n EnableMSANVideoCampaigns,\r\n },\r\n } = serverContext;\r\n\r\n const oDataConfig = oDataConfigProp || getODataConfig(serverContext);\r\n\r\n const isBiddingStrategyCPV = _.get(biddingScheme, 'Type') === 'ManualCpv';\r\n\r\n const legacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n\r\n const i18nMerged = useMemo(() => mergeI18n(legacyI18n, i18n), [legacyI18n, i18n]);\r\n\r\n const finalUrlsObj = { FinalUrls: videoAd && videoAd.FinalUrls };\r\n\r\n const { fetch, isBrandKitEmpty, fetchBrandKit } = useVideoAdsCopilot();\r\n\r\n const verifiedTrackingSettingObj = useMemo(() => ({\r\n VerifiedTrackingSettings: videoAd && videoAd.VerifiedTrackingSettings,\r\n }), [videoAd]);\r\n\r\n const shouldRepairGoogleImportVideoAd = permissions && permissions.IsGoogleImportVideoAdsEnabled\r\n && _.get(videoAd, 'video.sourceType') === 'GoogleImported'\r\n && _.get(videoAd, 'video.status') === 'Failed';\r\n\r\n const onValidationUpdate = (result) => {\r\n onUpdate(result);\r\n };\r\n\r\n useEffect(() => {\r\n fetchBrandKit();\r\n }, [fetchBrandKit]);\r\n\r\n useEffect(() => {\r\n if (copilotEnabled) {\r\n fetch(copilotFetchTaskManager, useBrandKit);\r\n setClarityTag({ VideoCopilotGeneration: true });\r\n }\r\n }, [copilotEnabled, copilotFetchTaskManager, fetch, useBrandKit]);\r\n\r\n const advancedSettings = useMemo(() => (\r\n \r\n ), [biddingScheme, verifiedTrackingSettingObj.VerifiedTrackingSettings, videoAd]);\r\n\r\n return (\r\n
\r\n \r\n \r\n {!removeCloseButton &&\r\n
\r\n \r\n
\r\n }\r\n \r\n
\r\n \r\n
\r\n {\r\n // If Xandr serving campaign\r\n // and\r\n // CPM and enable IAS\r\n isXandrServingCampaign &&\r\n permissions.EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign && !isBiddingStrategyCPV\r\n && (\r\n \r\n )}\r\n {\r\n // Hide when Deal or CTV or EditMode Xandr Serving\r\n EnableMSANVideoCampaigns &&\r\n !isForDeal && !isBiddingStrategyCPV && !(isAdGridEditorMode && isXandrServingCampaign) &&\r\n
\r\n {advancedSettings}\r\n
\r\n }\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nVideoPanel.propTypes = {\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign: PropTypes.bool,\r\n IsMOATEnabled: PropTypes.bool,\r\n IsGoogleImportVideoAdsEnabled: PropTypes.bool,\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n getLocale: PropTypes.func.isRequired,\r\n }).isRequired,\r\n biddingScheme: PropTypes.shape({}).isRequired,\r\n onUpdate: PropTypes.func.isRequired,\r\n onRemovePanel: PropTypes.func.isRequired,\r\n removeCloseButton: PropTypes.bool.isRequired,\r\n videoAd: PropTypes.shape([]).isRequired,\r\n keyIndex: PropTypes.number.isRequired,\r\n isSelectedPanel: PropTypes.bool.isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n videoRequirementForDeal: PropTypes.number,\r\n isForDeal: PropTypes.bool,\r\n dealLoaded: PropTypes.bool,\r\n setCopilotFinalUrl: PropTypes.func.isRequired,\r\n isAdGridEditorMode: PropTypes.bool,\r\n copilotFetchTaskManager: PropTypes.shape({}).isRequired,\r\n copilotEnabled: PropTypes.bool.isRequired,\r\n isXandrServingCampaign: PropTypes.bool,\r\n};\r\n\r\nVideoPanel.defaultProps = {\r\n oDataConfig: null,\r\n customStyleFunction: _.noop,\r\n videoRequirementForDeal: null,\r\n useCustomStyleFunction: false,\r\n isForDeal: false,\r\n dealLoaded: null,\r\n isAdGridEditorMode: false,\r\n isXandrServingCampaign: false,\r\n};\r\n\r\nconst VideoPanelWithContexts = ({ ...props }) => {\r\n const [copilotFinalUrl, setCopilotFinalUrl] = React.useState('');\r\n const serverContext = useContext(ServerContext);\r\n const { permissions } = props;\r\n const isUsingVideoTemplates = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nVideoPanelWithContexts.propTypes = {\r\n i18n: PropTypes.shape({\r\n getLocale: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignId: PropTypes.number.isRequired,\r\n};\r\n\r\nconst WrappedComponent = withRecommendationContext(VideoPanelWithContexts);\r\n\r\nexport { WrappedComponent as VideoPanel };\r\n\r\n","import { useState, useCallback } from 'react';\r\nimport _ from 'underscore';\r\n\r\nconst ITEMS_PER_PAGE = 10;\r\n\r\nconst MAX_ITEMS = 10;\r\n\r\nconst addItemsToPages = (pages, lastPage, lastPageIndex, count) => {\r\n const page = lastPage;\r\n\r\n if (page.numberOfAdsInPage + count > ITEMS_PER_PAGE) {\r\n const remaining = count - (ITEMS_PER_PAGE - page.numberOfAdsInPage);\r\n const itemsBefore = pages.slice(0, lastPageIndex - 1);\r\n const itemsAfter = pages.slice(lastPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: ITEMS_PER_PAGE, pageNumber: page.pageNumber, id: page.id };\r\n\r\n const nextPageItem = { numberOfAdsInPage: 0, pageNumber: page.pageNumber + 1, id: Math.random() };\r\n\r\n return addItemsToPages([...itemsBefore, newPageItem, ...itemsAfter], nextPageItem, lastPageIndex + 1, remaining);\r\n }\r\n\r\n const itemsBefore = pages.slice(0, lastPageIndex - 1);\r\n const itemsAfter = pages.slice(lastPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: page.numberOfAdsInPage + count, pageNumber: page.pageNumber, id: page.id };\r\n\r\n return {\r\n currentPage: newPageItem,\r\n pages: [...itemsBefore, newPageItem, ...itemsAfter],\r\n };\r\n};\r\n\r\nexport const usePageManager = (ads, initialAdsCount = 1) => {\r\n const calculateTotalPages = () => {\r\n if (_.isUndefined(ads)) {\r\n return 1;\r\n }\r\n const totalPages = Math.ceil(ads.length / ITEMS_PER_PAGE);\r\n\r\n return totalPages;\r\n };\r\n\r\n const [totalPages, setTotalPages] = useState(calculateTotalPages());\r\n\r\n const maxItems = MAX_ITEMS;\r\n\r\n const createPages = () => {\r\n if (_.isUndefined(ads)) {\r\n return [{ numberOfAdsInPage: initialAdsCount, pageNumber: 1, id: Math.random() }];\r\n }\r\n\r\n if (ads.length === 0) {\r\n return [{ numberOfAdsInPage: initialAdsCount, pageNumber: 1, id: Math.random() }];\r\n }\r\n\r\n let totalAds = ads.length;\r\n\r\n return _.map(_.range(totalPages), (idx) => {\r\n const numberOfAdsInPage = totalAds > ITEMS_PER_PAGE ? ITEMS_PER_PAGE : totalAds;\r\n\r\n totalAds -= ITEMS_PER_PAGE;\r\n return { numberOfAdsInPage, pageNumber: idx + 1, id: Math.random() };\r\n });\r\n };\r\n\r\n const [currentPageIndex, setCurrentPageIndex] = useState(1);\r\n\r\n const [pages, setPages] = useState(createPages());\r\n\r\n const [currentPage, setCurrentPage] = useState(pages[0]);\r\n\r\n const getPageAdjustedIndex = (idx, pageNumber = null) => {\r\n const page = pageNumber || currentPageIndex;\r\n\r\n const val = (((page - 1) * ITEMS_PER_PAGE) + idx);\r\n\r\n return val;\r\n };\r\n\r\n const onAddPage = useCallback(() => {\r\n const newPage = { numberOfAdsInPage: 1, pageNumber: currentPageIndex + 1, id: Math.random() };\r\n\r\n setPages([...pages.concat(newPage)]);\r\n setCurrentPage(newPage);\r\n setCurrentPageIndex(currentPageIndex + 1);\r\n setTotalPages(totalPages + 1);\r\n }, [currentPageIndex, pages, totalPages]);\r\n\r\n const onAddItem = () => {\r\n const page = currentPage;\r\n\r\n if (page.numberOfAdsInPage === ITEMS_PER_PAGE) {\r\n onAddPage();\r\n } else {\r\n const itemsBefore = pages.slice(0, currentPageIndex - 1);\r\n const itemsAfter = pages.slice(currentPageIndex, pages.length);\r\n\r\n const newPageItem = { numberOfAdsInPage: page.numberOfAdsInPage + 1, pageNumber: page.pageNumber, id: page.id };\r\n setCurrentPage(newPageItem);\r\n setPages([...itemsBefore, newPageItem, ...itemsAfter]);\r\n }\r\n };\r\n\r\n const onAddItemsToPage = (count) => {\r\n const lastPage = pages[pages.length - 1];\r\n\r\n const lastPageIndex = pages.length;\r\n\r\n const {\r\n pages: newPages,\r\n } = addItemsToPages(pages, lastPage, lastPageIndex, count);\r\n\r\n setPages(newPages);\r\n setTotalPages(newPages.length);\r\n setCurrentPage(newPages[newPages.length - 1]);\r\n setCurrentPageIndex(newPages.length);\r\n };\r\n\r\n const goToNextPage = () => {\r\n setCurrentPageIndex(currentPageIndex + 1);\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) + 1] });\r\n };\r\n\r\n const goToPrevPage = () => {\r\n setCurrentPageIndex(currentPageIndex - 1);\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) - 1] });\r\n };\r\n\r\n const goToPage = (val) => {\r\n const valInt = parseInt(val, 10);\r\n if (valInt > 0 && valInt <= totalPages) {\r\n _.debounce(setCurrentPageIndex(parseInt(valInt, 10)), 100);\r\n setCurrentPage(pages[valInt - 1]);\r\n }\r\n };\r\n\r\n const removeLastPage = () => {\r\n setCurrentPage({ ...pages[(currentPageIndex - 1) - 1] });\r\n setPages([...pages.splice(0, pages.length - 1)]);\r\n setCurrentPageIndex(currentPageIndex - 1);\r\n setTotalPages(totalPages - 1);\r\n };\r\n\r\n const removeItemFromLastPage = () => {\r\n const lastPage = pages[pages.length - 1];\r\n\r\n if (lastPage.numberOfAdsInPage === 1) {\r\n removeLastPage();\r\n } else {\r\n const newPage = { id: lastPage.id, numberOfAdsInPage: lastPage.numberOfAdsInPage - 1, pageNumber: lastPage.pageNumber };\r\n\r\n const itemsBefore = pages.slice(0, pages.length - 1);\r\n\r\n setCurrentPage({ ...newPage });\r\n setPages([...itemsBefore, newPage]);\r\n }\r\n };\r\n\r\n const removeItem = () => {\r\n if (currentPage.numberOfAdsInPage === 1) {\r\n removeLastPage();\r\n } else if (pages.length === 1) {\r\n const newPage = { id: currentPage.id, numberOfAdsInPage: currentPage.numberOfAdsInPage - 1, pageNumber: currentPage.pageNumber };\r\n\r\n setCurrentPage({ ...newPage });\r\n setPages([newPage]);\r\n } else {\r\n removeItemFromLastPage();\r\n }\r\n };\r\n\r\n return {\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n getPageAdjustedIndex,\r\n goToPrevPage,\r\n goToNextPage,\r\n goToPage,\r\n onAddPage,\r\n onAddItem,\r\n onAddItemsToPage,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n };\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useEffect, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { MessageBar } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { FontIcon, Text } from '@bingads-webui-react/fabric-control';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport { useCopilotLoggers, useInitCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { isCopilotRegionRestricted } from '@bingads-webui-react/copilot-utils';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { VideoPanel } from './video-panel';\r\nimport { PlacementQualities } from '../ad-components';\r\nimport { Link, TextField } from '../common/shared-components';\r\nimport { getAdsStepStyles } from './styles';\r\nimport { usePageManager } from './page-manager';\r\n\r\n// TODO: Upload video styling for smaller videos.\r\n// TODO: Upload video styling for larger videos.\r\n// TODO: Add background of video while uploading.\r\n// TODO: Add label for processing.\r\n// TODO: Add progress video background\r\n// TODO: Add suggested placements component next to the video.\r\n\r\n\r\n// TODO: Add dots for Ad Preview pagination - DONE\r\n\r\n\r\nexport const VideoAdsContainer = (props) => {\r\n const {\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n onAdsValidation,\r\n currentVideoIndex,\r\n ads = [],\r\n oDataConfig,\r\n disablePagination,\r\n permissions,\r\n deal,\r\n dealLoaded,\r\n customStyleFunction,\r\n useCustomStyleFunction,\r\n resetFields,\r\n isAdGridEditorMode,\r\n allowCopilotVideoGeneration,\r\n biddingScheme = {},\r\n campaignId,\r\n hideFooter,\r\n isXandrServingCampaign,\r\n loadClipchampPlayer,\r\n } = props;\r\n\r\n const videoRequirementForDeal = _.get(deal, ['DealAdQualityConstraints', '0', 'VideoQuality']);\r\n\r\n const isForDeal = !_.isEmpty(deal);\r\n\r\n let dealVideoRequirementText;\r\n if (videoRequirementForDeal === PlacementQualities.ONLY_PERFECT) {\r\n dealVideoRequirementText = i18n.getString(_TL_('Your campaign\\'s media deal requires that your video is of excellent quality (three stars). For more information about the technical requirements, see '));\r\n } else if (videoRequirementForDeal === PlacementQualities.ONLY_EXCELLENT) {\r\n dealVideoRequirementText = i18n.getString(_TL_('For this deal your asset must meet the General Video requirements.'));\r\n }\r\n\r\n const isEditScenario = useMemo(() => isAdGridEditorMode && ads && ads[0] && ads[0].Id, [ads, isAdGridEditorMode]);\r\n\r\n useInitCopilotLoggers({ campaignId, feature: 'VideoAds', isEditScenario });\r\n\r\n const { logEnterFlow } = useCopilotLoggers();\r\n\r\n const defaultClasses = useDefaultStyles(getAdsStepStyles);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const customClasses = useDefaultStyles(customStyleFunction);\r\n\r\n const classes = useCustomStyleFunction ? customClasses : defaultClasses;\r\n\r\n const [videoAds, setVideoAds] = useState(ads || []);\r\n\r\n const [useBrandKit, setUseBrandKit] = useState(true);\r\n\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const [isAdsCopilotRegionRestricted, setIsAdsCopilotRegionRestricted] = useState(true);\r\n useEffect(() => {\r\n isCopilotRegionRestricted({\r\n feature: 'Recommendations',\r\n permissions,\r\n serverContext,\r\n }).then(setIsAdsCopilotRegionRestricted);\r\n }, [permissions, serverContext]);\r\n\r\n const copilotEnabled = allowCopilotVideoGeneration &&\r\n permissions.dynamic.VideoCopilotGeneration &&\r\n !isAdsCopilotRegionRestricted &&\r\n (!videoRequirementForDeal || videoRequirementForDeal < PlacementQualities.ONLY_PERFECT);\r\n\r\n const {\r\n goToNextPage,\r\n goToPrevPage,\r\n goToPage,\r\n getPageAdjustedIndex,\r\n currentPage,\r\n currentPageIndex,\r\n pages,\r\n onAddItem,\r\n removeItem,\r\n totalPages,\r\n maxItems,\r\n } = usePageManager(ads);\r\n\r\n const onAddAd = () => {\r\n onAddItem();\r\n if (activity) {\r\n activity.signal(`Adding new ad panel - current total: ${currentPage.numberOfAdsInPage}`);\r\n }\r\n };\r\n\r\n const onVideoPanelUpdate = (result, idx, uid) => {\r\n let itemAtIdx = videoAds[idx] || { video: null, FinalUrls: [], uid: null };\r\n\r\n if (itemAtIdx.uid === null) {\r\n itemAtIdx = { ...result, uid, Id: itemAtIdx.Id };\r\n } else {\r\n itemAtIdx = { ...result, uid: itemAtIdx.uid, Id: itemAtIdx.Id };\r\n }\r\n\r\n const itemsBefore = videoAds.slice(0, idx);\r\n const itemsAfter = videoAds.slice(idx + 1, videoAds.length);\r\n setVideoAds([...itemsBefore, { ...itemAtIdx }, ...itemsAfter]);\r\n };\r\n\r\n const onRemovePanel = (idx) => {\r\n if (activity) {\r\n activity.signal(`Removing ad panel at idx ${idx}`);\r\n }\r\n videoAds.splice(idx, 1);\r\n\r\n setVideoAds([...videoAds]);\r\n\r\n removeItem();\r\n };\r\n\r\n const isAllValid = () => {\r\n let valid = true;\r\n // eslint-disable-next-line consistent-return\r\n _.each(videoAds, (ad) => {\r\n if (!ad.isValid) {\r\n valid = false;\r\n }\r\n });\r\n\r\n return valid;\r\n };\r\n\r\n const isAllDirty = () => {\r\n let dirty = false;\r\n // eslint-disable-next-line consistent-return\r\n _.each(videoAds, (ad) => {\r\n if (ad.isDirty) {\r\n dirty = true;\r\n }\r\n });\r\n\r\n return dirty;\r\n };\r\n\r\n useEffect(() => {\r\n if (activity) {\r\n activity.signal(`[VideoAdsCopilot] - useBrandKitToggle changed to ${useBrandKit}`);\r\n }\r\n }, [useBrandKit, activity]);\r\n\r\n useEffect(() => {\r\n const result = {\r\n data: [...videoAds], isValid: isAllValid(), isDirty: isAllDirty(), currentPageIndex,\r\n };\r\n onAdsValidation(result);\r\n if (activity) {\r\n activity.signal(`onVideoAdsContainerValidated - ${JSON.stringify(result)}`);\r\n }\r\n // disabling exhaustive deps since the onAdsValidation value changes on each rerender.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPageIndex, videoAds]);\r\n\r\n useEffect(() => {\r\n if (resetFields) {\r\n setVideoAds([]);\r\n }\r\n }, [resetFields]);\r\n\r\n useEffect(() => {\r\n setClarityTag('XandrVideoAds', 'true');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!_.isEqual(ads, videoAds) && !isAdGridEditorMode) {\r\n // check if ads has any ad that has id. (update scenario)\r\n let shouldUpdate = false;\r\n\r\n _.each(ads, (ad) => {\r\n const videoAd = _.filter(videoAds, vAd => vAd.uid === ad.uid);\r\n\r\n if (videoAd && videoAd[0] && _.isUndefined(videoAd[0].Id) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n\r\n // For reload scenario if we can't find any ad in local state, refresh state\r\n if (permissions.dynamic.MultiAdFormat && _.isEmpty(videoAd) && ad.Id) {\r\n shouldUpdate = true;\r\n }\r\n });\r\n\r\n if (shouldUpdate) {\r\n setVideoAds(ads);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [ads]);\r\n\r\n useEffect(() => {\r\n if (copilotEnabled) {\r\n logEnterFlow();\r\n }\r\n }, [copilotEnabled, logEnterFlow]);\r\n\r\n return (\r\n
\r\n {\r\n dealVideoRequirementText &&\r\n \r\n {dealVideoRequirementText}\r\n {(videoRequirementForDeal === PlacementQualities.ONLY_PERFECT) &&\r\n \r\n {i18n.getString(_TL_('About video ads'))}.\r\n }\r\n \r\n }\r\n {\r\n _.map(pages, (page) => {\r\n const panels = _.map(_.range(page.numberOfAdsInPage), (idx) => {\r\n const videoAd = (videoAds[getPageAdjustedIndex(idx, page.pageNumber)] && videoAds[getPageAdjustedIndex(idx, page.pageNumber)].data);\r\n\r\n const uid = (videoAds[getPageAdjustedIndex(idx, page.pageNumber)] && videoAds[getPageAdjustedIndex(idx, page.pageNumber)].uid) || Math.random();\r\n\r\n const isCurrentPage = page.id === currentPage.id;\r\n\r\n return (\r\n
\r\n onVideoPanelUpdate(result, getPageAdjustedIndex(idx, page.pageNumber), uid)}\r\n onRemovePanel={() => onRemovePanel(getPageAdjustedIndex(idx, page.pageNumber), page)}\r\n removeCloseButton={page.numberOfAdsInPage === 1}\r\n keyIndex={uid}\r\n videoRequirementForDeal={videoRequirementForDeal}\r\n isSelectedPanel={currentVideoIndex === idx}\r\n oDataConfig={oDataConfig}\r\n biddingScheme={biddingScheme}\r\n isXandrServingCampaign={isXandrServingCampaign}\r\n isForDeal={isForDeal}\r\n dealLoaded={dealLoaded}\r\n isAdGridEditorMode={isAdGridEditorMode}\r\n copilotEnabled={copilotEnabled}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n useBrandKit={useBrandKit}\r\n setUseBrandKit={setUseBrandKit}\r\n />\r\n
\r\n );\r\n });\r\n\r\n return panels;\r\n })\r\n }\r\n
\r\n {\r\n (!hideFooter && (currentPage.numberOfAdsInPage < maxItems && !disablePagination)) && (\r\n \r\n  {i18n.getString(_TL_('Create another ad'))}\r\n \r\n )\r\n }\r\n
\r\n {totalPages > 1 && !disablePagination && (\r\n
\r\n
\r\n \r\n Prev \r\n \r\n goToPage(val)}\r\n />\r\n of {totalPages} \r\n \r\n Next \r\n \r\n
\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\n\r\nVideoAdsContainer.propTypes = {\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n biddingScheme: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({\r\n dynamic: PropTypes.shape({\r\n VideoCopilotGeneration: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n ads: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n oDataConfig: PropTypes.shape({}),\r\n disablePagination: PropTypes.bool,\r\n customStyleFunction: PropTypes.func,\r\n useCustomStyleFunction: PropTypes.bool,\r\n resetFields: PropTypes.bool,\r\n currentVideoIndex: PropTypes.number,\r\n isAdGridEditorMode: PropTypes.bool,\r\n hideFooter: PropTypes.bool,\r\n deal: PropTypes.shape({}),\r\n dealLoaded: PropTypes.bool,\r\n allowCopilotVideoGeneration: PropTypes.bool,\r\n campaignId: PropTypes.number,\r\n isXandrServingCampaign: PropTypes.bool,\r\n};\r\n\r\nVideoAdsContainer.defaultProps = {\r\n oDataConfig: null,\r\n disablePagination: false,\r\n customStyleFunction: _.noop,\r\n useCustomStyleFunction: false,\r\n deal: null,\r\n dealLoaded: false,\r\n resetFields: false,\r\n hideFooter: false,\r\n currentVideoIndex: 0,\r\n isAdGridEditorMode: false,\r\n allowCopilotVideoGeneration: false,\r\n campaignId: -1,\r\n isXandrServingCampaign: false,\r\n};\r\n","/* istanbul ignore file */\r\n\r\nimport { get, uniq, isEmpty } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { getTargetConstraints, getCountriesLocations } from '../common/deal-constraints';\r\n\r\nexport const fillLocationForDeal = async (deal, serverContext) => {\r\n if (!deal) {\r\n return Promise.resolve();\r\n }\r\n const locationIds = getTargetConstraints(deal, 'Location').mandatory;\r\n\r\n const cid = serverContext.CurrentCustomer.Id;\r\n const aid = serverContext.CurrentAccount.Id;\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n\r\n const responses = await getCountriesLocations(locationIds, lcid, cid, aid);\r\n const CountryName = uniq(responses.map(res => res.data.EnglishName)).join(',');\r\n return {\r\n ...deal,\r\n CountryName,\r\n };\r\n};\r\n\r\nexport const getDealDetails = async (cid, aid, campaignId, serverContext) => {\r\n try {\r\n const targets = await edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .CampaignCriterions.$cast('Model.CampaignCriterion')\r\n .get({\r\n filter: {\r\n where: \"isof(Criterion,'Model.DealCriterion')\",\r\n },\r\n })\r\n .toPromise();\r\n\r\n const dealId = get(targets, 'value[0].Criterion.DealId');\r\n\r\n if (!dealId) {\r\n return Promise.resolve();\r\n }\r\n\r\n try {\r\n const dealDetail = await edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Deals.$withKey(targets.value[0].Criterion.DealId)\r\n .get()\r\n .toPromise();\r\n\r\n if (serverContext) {\r\n const filledDeal = await fillLocationForDeal(dealDetail, serverContext);\r\n return filledDeal;\r\n }\r\n return dealDetail;\r\n } catch (error) {\r\n console.error(error);\r\n // If we get an error with errorCode InvalidId,\r\n // we will return the dealId and the error code as it is deleted by Xandr.\r\n const errorCodeTarget = GetDealErrorCode(error, 'InvalidId');\r\n if (errorCodeTarget) {\r\n return Promise.resolve({\r\n Id: dealId,\r\n Error: errorCodeTarget,\r\n });\r\n }\r\n return Promise.resolve();\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n return Promise.resolve();\r\n }\r\n};\r\n\r\nconst GetDealErrorCode = (error, expectedError) => {\r\n if (error.status !== 400) {\r\n return null;\r\n }\r\n\r\n const responseErrArray = get(error, ['responseJSON', 'value']);\r\n if (isEmpty(responseErrArray)) {\r\n return null;\r\n }\r\n\r\n if (get(responseErrArray, [0, 'Code']) === expectedError) {\r\n return expectedError;\r\n }\r\n return null;\r\n};\r\n","import React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\r\n\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst useStyles = makeStyles({\r\n buttonStyle: {\r\n marginRight: tokens.spacingHorizontalS,\r\n marginTop: tokens.spacingVerticalL,\r\n },\r\n});\r\n\r\nexport const AdEditorFooter = ({\r\n cancel,\r\n save,\r\n saveAndCreateAnother,\r\n}) => {\r\n const classes = useStyles();\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nAdEditorFooter.propTypes = {\r\n cancel: PropTypes.func.isRequired,\r\n save: PropTypes.func.isRequired,\r\n saveAndCreateAnother: PropTypes.func.isRequired,\r\n};\r\n","import React, { useEffect, useState, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { FluentProvider, webLightTheme, Divider } from '@fluentui/react-components';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withLoggingContext, useCopilotLoggers } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { getLogVersion } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport {\r\n getLoggerWithoutPageInfo,\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\n\r\n\r\nimport { saveAds, getDealDetails } from '../model';\r\nimport { VideoAdsContainer } from './video-ads-container';\r\nimport { AdPreview } from './ad-preview';\r\nimport { AdEditorFooter } from './ad-editor-footer';\r\n\r\nconst getAdsStepStyles = (/* components, theme */) => ({\r\n videoPanelRoot: {\r\n marginTop: 20,\r\n width: 500,\r\n minHeight: 181,\r\n padding: 20,\r\n paddingBottom: 20,\r\n background: '#FFFFFF',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n borderRadius: 6,\r\n '& .image-list-item-status-indicator': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n },\r\n '& .error': {\r\n marginTop: 20,\r\n },\r\n '& .image-experience-content': {\r\n width: 170,\r\n '& .col-sm-3': {\r\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%)',\r\n borderRadius: 6,\r\n width: '170px !important',\r\n height: '96px !important',\r\n paddingTop: '10px !important',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'none',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'white !important',\r\n },\r\n '& .ms-Button': {\r\n width: 56,\r\n height: 24,\r\n marginTop: 10,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n },\r\n },\r\n '& .image-section-label': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .image-list-label': {\r\n fontWeight: 600,\r\n },\r\n '& .image-list-content': {\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n '& .image-list-item-video': {\r\n position: 'relative',\r\n width: '170px !important', // fixed for 16:9 aspect ratio\r\n '&:hover': {\r\n '& .edit-button': {\r\n display: 'flex',\r\n },\r\n },\r\n '& .placeholder-content': {\r\n color: 'black !important',\r\n },\r\n\r\n },\r\n '& .image-item-ratio-label': {\r\n paddingTop: 10,\r\n },\r\n '& .thumbnail-preview': {\r\n borderRadius: 6,\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n width: '170px !important',\r\n height: '96px !important',\r\n },\r\n },\r\n selectedPanel: {\r\n border: '1px solid #0078D4',\r\n },\r\n videoPanelHeader: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'flex-end',\r\n },\r\n adPreviewTitle: {\r\n fontSize: 18,\r\n fontWeight: 600,\r\n },\r\n previewContainer: {\r\n height: 280,\r\n width: 498,\r\n },\r\n adPreviewHeader: {\r\n height: 40,\r\n },\r\n adPreviewRoot: {\r\n width: 540,\r\n padding: 20,\r\n paddingBottom: 20,\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n video: {\r\n borderRadius: '6px',\r\n filter: 'drop-shadow(0px 0.6px 1.8px rgba(0, 0, 0, 0.1)) drop-shadow(0px 3.2px 7.2px rgba(0, 0, 0, 0.13))',\r\n },\r\n previewTag: {\r\n marginTop: 10,\r\n },\r\n pagination: {\r\n paddingTop: 10,\r\n width: '100%',\r\n },\r\n pageControls: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n columnGap: '10px',\r\n },\r\n paginationIndicatorDot: {\r\n height: 8,\r\n width: 8,\r\n borderRadius: '50%',\r\n display: 'inline-block',\r\n cursor: 'pointer',\r\n },\r\n paginationButton: {\r\n height: 8,\r\n width: 8,\r\n opacity: 0,\r\n },\r\n paginationIndicator: {\r\n display: 'flex',\r\n columnGap: '2px',\r\n },\r\n videoPanelContent: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n },\r\n placementInfoTile: {\r\n paddingTop: 20,\r\n marginLeft: 10,\r\n },\r\n});\r\n\r\nconst containerStyle = {\r\n display: 'flex',\r\n '& .image-list-content': {\r\n border: 'none !important',\r\n padding: '0px !important',\r\n },\r\n};\r\n\r\nconst AdEditor = ({\r\n aid,\r\n cid,\r\n i18n,\r\n perfMarker,\r\n permissions,\r\n adsModel,\r\n campaignId,\r\n adGroupId,\r\n onAdsValidation,\r\n oDataConfig,\r\n resetFields,\r\n biddingScheme,\r\n isXandrServingCampaign,\r\n onCancel,\r\n onSave,\r\n onSaveAndCreateAnother,\r\n isMultiAdFormatAd,\r\n loadClipchampPlayer,\r\n}) => {\r\n const [deal, setDeal] = useState(null);\r\n const [dealLoaded, setDealLoaded] = useState(false);\r\n const [serverErrors, setServerErrors] = useState(null);\r\n const [blocking, setBlocking] = useState(false);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const { logSuggestionsApplied } = useCopilotLoggers();\r\n\r\n useEffect(() => {\r\n const fetchDeal = async () => {\r\n const dealDetail = await getDealDetails(cid, aid, campaignId);\r\n setDeal(dealDetail);\r\n setDealLoaded(true);\r\n };\r\n\r\n fetchDeal();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const scenario = instrumentation.createScenario('XandrVideoAdsAdEditing');\r\n const activity = scenario.createActivity('Ad');\r\n const versionForLog = getLogVersion(permissions);\r\n const logger = getLoggerWithoutPageInfo(activity, versionForLog, 'XandrVideoAdsAdEditing');\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const saveAd = () => saveAds({\r\n ads: isMultiAdFormatAd ? { ...adsModel, adSubType: 'Video' } : adsModel,\r\n campaign: { Id: campaignId },\r\n adGroup: { Id: adGroupId },\r\n activity,\r\n }, { scenario, i18n }).then((adData) => {\r\n const suggestionIds = _.chain(adsModel.data)\r\n .map(ad => ad.data.video.recommendationId).compact().value();\r\n\r\n logSuggestionsApplied(\r\n campaignId,\r\n adGroupId,\r\n undefined /* textSuggestions */,\r\n undefined /* imageSuggestionIds */,\r\n suggestionIds\r\n );\r\n return adData;\r\n }).finally(() => setBlocking(false));\r\n\r\n const saveVideoAd = () => {\r\n setBlocking(true);\r\n\r\n if (adsModel.data[0].data.video.id) {\r\n return saveAd();\r\n }\r\n\r\n const videoMetaData = _.omit(adsModel.data[0].data.video, 'savedMaterial');\r\n const { savedImages, savedLogo } = adsModel.data[0].data.video.savedMaterial || {};\r\n\r\n return uploadVideoMetadata({\r\n videoMetadata: videoMetaData,\r\n newVideoFromMTObject,\r\n savedImages,\r\n savedLogo,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n }).then((uploadedVideo) => {\r\n // eslint-disable-next-line no-param-reassign\r\n adsModel.data[0].data.video = uploadedVideo;\r\n return saveAd();\r\n });\r\n };\r\n\r\n const save = (saveAnother) => {\r\n setServerErrors(null);\r\n\r\n if (!adsModel.isValid) {\r\n return Promise.resolve(false);\r\n }\r\n\r\n return saveVideoAd().then((result) => {\r\n if (result && result.ads && result.ads.data) {\r\n if (saveAnother) {\r\n onSaveAndCreateAnother(result);\r\n } else {\r\n onSave(result);\r\n }\r\n }\r\n }).catch((result) => {\r\n setServerErrors(result.serverErrors);\r\n });\r\n };\r\n\r\n const cancel = () => {\r\n onCancel();\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n error.message) : []} />\r\n
\r\n _.noop}\r\n ads={adsModel}\r\n disablePagination\r\n customStyleFunction={getAdsStepStyles}\r\n useCustomStyleFunction\r\n permissions={permissions}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />\r\n
\r\n \r\n save(false)}\r\n saveAndCreateAnother={() => save(true)}\r\n />\r\n
\r\n \r\n
);\r\n};\r\nAdEditor.propTypes = {\r\n containerStyle: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n adGroupId: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n adsModel: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n isValid: PropTypes.bool.isRequired,\r\n }).isRequired,\r\n onAdsValidation: PropTypes.func.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n resetFields: PropTypes.bool.isRequired,\r\n serverErrors: PropTypes.shape({}),\r\n biddingScheme: PropTypes.shape({}),\r\n isXandrServingCampaign: PropTypes.bool,\r\n isMultiAdFormatAd: PropTypes.bool,\r\n onCancel: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onSaveAndCreateAnother: PropTypes.func.isRequired,\r\n};\r\n\r\nAdEditor.defaultProps = {\r\n serverErrors: null,\r\n biddingScheme: {},\r\n isXandrServingCampaign: false,\r\n isMultiAdFormatAd: false,\r\n};\r\n\r\n\r\nconst AdEditorWithErrorLogging = withLoggingContext(withComponentErrorLogging(\r\n AdEditor,\r\n 'XandrVideoAdsAdEditing'\r\n));\r\n\r\nexport { AdEditorWithErrorLogging as AdEditor };\r\n\r\n"],"names":["ErrorReason","_ref","reason","_jsx","children","Text","variant","styles","root","color","ExclusionErrors","_ref2","errors","map","error","className","_","Value","Key","value","_jsxs","style","display","defaultProps","textStyles","fontWeight","IpExclusions","exclusions","placeholder","handleExclusionInputChange","i18n","useContext","I18nContext","_useState","useState","_useState2","_slicedToArray","exclusionList","setExclusionList","useMemo","handleExclusionTextFieldChange","useCallback","input","target","type","Stack","horizontal","tokens","childrenGap","getString","_TL_","HelpButton","topic","TextField","multiline","rows","resizable","onChange","length","getStyles","link","paddingLeft","SiteExclusionNote","withSiteMap","level","siteMap","path","getRoutePathById","classes","useDefaultStyles","showAWFWarning","PermissionsContext","dynamic","AWFWebExclusionsWarning","MessageBar","layout","MessageBarBody","MessageBarTitle","ScopeLevel","AdGroup","size","Link","href","rel","textFieldStyles","fieldGroup","borderColor","SiteExclusions","readOnlyExclusions","readOnly","WebExclusions","showSiteExclusion","showIPExclusion","showAccordion","siteInputProps","ipInputProps","exclusionData","setExclusionsCallback","siteExclusions","Campaign","campaignExclusions","adgroupExclusions","campaignReadOnlySiteExclusions","ipExclusions","hasSiteExclusionsErrors","find","hasIpExclusionsErrors","siteExclusionsError","NegativeSitesResult","ipExclusionsError","NegativeIPsResult","siteExclusionsInput","_objectSpread","ipExclusionsInput","Accordion","multiple","collapsible","AccordionItem","AccordionHeader","AccordionPanel","entitySeparator","formatInvalidEntities","InvalidEntities","ValidEntities","join","getExclusionCount","split","getSummary","siteExclusionsCount","ipExclusionsCount","adgroupLevelExclusionCount","campaignLevelExclusionCount","webExclusionPropertyVal","propertyIs","ServerValidatedWebExclusions","withAttentionBeacon","withFormError","showError","Adapters","FormErrorBeaconAdapter","ValidationBeaconAdapter","WebExclusionsWithValidation","withCustomValidation","updateValidation","parentData","rest","_objectWithoutProperties","_excluded","exclusionsData","keyName","patchExclusions","_defineProperty","ServerValidatedWebExclusionsWithValidation","WebExclusionsSection","expand","ValidatedPanel","title","TextTitle","titleKey","icon","image","iconStyles","width","topicKey","details","attentionBeaconProps","getExtraProps","getPanelErrorProps","actuationProps","expandKey","formErrorProps","filter","TEXT_CONTENT","description","block","allow","listLabel","ariaLabel","useTagContentStyles","fontWeightSemibold","List","alignItems","columnGap","spacingHorizontalXS","marginBottom","spacingVerticalL","ListItem","justifyContent","Container","flexDirection","ButtonContainer","spacingHorizontalL","PopoverContentBefore","spacingHorizontalS","EntitySelector","maxWidth","marginTop","spacingVerticalS","useStaticStyles","CustomWebsiteListTagItemRenderer","content","callMT","async","url","method","body","headers","response","fetch","JSON","stringify","ok","Error","json","getHeadersRequestByServerContext","serverContext","lcid","CurrentUser","Locale","PageTrackingId","Authorization","Token","CustomerAccountId","CurrentAccount","Id","CustomerId","AdvertiserCustomerID","RequestMethod","repository","getListsByAccountId","SharedEntityScope","SharedEntityType","SharedEntityId","ServicesEndpoints","CmAPI","Post","associateListsToCampaign","lists","campaignId","previousAssociations","this","getListsByCampaignId","previousSet","Set","newSet","removedAssociations","Array","from","id","has","newAssociations","deleteListAssociationsByAccountId","Associations","EntityId","EntityType","Delete","payload","EntityIds","associated","queryBody","entities","item","SharedEntities","entity","WebsiteListSelector","listType","selected","isUnderlineLink","isGreyBackground","linkType","text","linkText","Label","ServerEntitySelectorInline","fetchData","then","count","items","Name","customFilter","search","toLowerCase","includes","selectionMode","onRenderTagContent","onRenderItemContent","flatItem","name","itemCount","ItemCount","popOverContentBefore","withProps","extraProps","WrappedComponent","HoC","props","finalProps","displayName","concat","getDisplayName","hoistNonReactStatics","withStoreLoadingContainer","minHeight","paddingTop","withStoreErrorContainer","padding","lineHeight","flexGrow","marginLeft","UrlContainer","MobileUrlContainer","storeFormattedText","providerId","getStoreResponse","isStoreNotFoundFetchError","storeFetchError","isArray","raw","some","ErrorCode","createStoreDetails","storeUrl","DestinationUrl","withStoreFromProviderId","HOC","fetchComplete","storeDetails","storeFetchState","setStoreFetchState","activity","ActivityContext","storeQueries","getStoreQueriesWithLocalMock","useEffect","getStore","getStoreError","trace","loadingSpinner","Loading","isVisible","loadingError","Alert","message","dismissible","React","undefined","noop","getTopLevelDomainFromUrl","hostNameParts","URL","hostname","partCount","isFinalUrlAlignedWithStoreDomain","finalUrl","storeDomain","finalUrlDomain","withStoreUrl","validationProps","storeDetailsInternal","useRef","current","domain","validationOnUrlChange","finalUrlValidatorError","result","storeUrlText","classNames","prepopulateUrl","STEP_STATE","WizardPerfMarkerContext","createContext","StepPerfMarker","parentPerfMarker","markerName","stepPerfMarkerRef","_useContext","_useContext$register","register","_useContext$unregiste","unregister","currentStepState","useWizardService","state","toStrings","createChild","autoEnd","handleStepStateChange","STEP_STATES","FETCHING","willFetchFile","LOADING","willInit","ACTIVE","willRender","setTimeout","done","propTypes","PropTypes","isRequired","WizardPerfMarker","wizardName","wizardMarker","wizardPerfMarkerContext","currentStepId","getCurrentStepId","currentStep","perfMarkerRef","checkAndCreateChildMarker","Provider","ErrorString","Fragment","nowrap","Errors","SpanWithComponent","_ref3","SpanText","Component","withVerticalAlignCenterSpan","defaultRender","verticalAlign","nameErrorCode","getNameErrorMsg","_ref4","code","maxLength","number","validateName","_ref5","checkShouldShowError","attribute","isInvalid","isDirty","checkShouldShowErrors","isCampaignNameValid","defaultName","CampaignName","setName","campaingNameText","shouldShowError","classnames","label","onRenderLabel","HelpPopup","e","x","locationTargetsOptionKeys","everywhere","specific","bundleOrDefaultMarket","getLocationsString","settings","isAdGroupLevel","arguments","bidStrategyType","hideBid","targetOption","_settings$currentLoca","currentLocations","isTargetEverywhere","includedLocations","SelectionStatus","excludedLocations","forEach","index","location","LocalizationKeys","bidAdjustmentDropdown","bidAdjustmentInput","getLocationTargetTitleDetails","parentLevelSettings","currentLevelSettings","useParentLevel","BING_MAPS_API_KEY","toasterId","SpecificLocationTargetsEditor","data","setData","edmCampaign","allowPositiveLocationTargeting","allowNegativeLocationTargeting","showSearchTypeOptions","strings","scope","defaultSelectedSearchType","isBrandAwarenessCampaignScenario","showBulkLocations","mapRef","mapBulkLocationsRef","isDrawerOpen","setIsBulkLocationsSearchDrawerOpen","_useToastController","useToastController","dispatchToast","dismissToast","ServerContext","makeLocationsCall","_scope$values","values","cid","aid","Customers","$withKey","Accounts","Locations","get","select","IsBrandAwarenessCampaignScenario","toPromise","catch","console","log","makeBulkLocationsCall","searchTerms","countryCode","_scope$values2","signal","$makeCall","query","where","servingChannel","renderToaster","toastId","intent","toastTitle","toastMessage","Toast","ToastTitle","action","ToastTrigger","Button","appearance","Dismiss24Regular","onClick","ToastBody","pauseOnHover","timeout","position","handleBulkLocationsSearchDrawerOpen","searchOptions","getLocations","skipBingMapAPISearch","getIsRadiusTarget","targetingType","defaultGetIsRadiusTarget","TARGETING_TYPE","Included","setBulkLocationsData","targetedLocations","conflictingCount","duplicateCount","includedLocationIds","loc","excludedLocationIds","newIncludedLocations","newExcludedLocations","locId","push","_toConsumableArray","mergeLocations","Toaster","BulkLocationsSearchProvider","onBulkLocationsSearch","onAddLocations","setIsDrawerOpen","campaignApiToken","bingMapsApiKey","campaignApiServiceRoot","CampaignAPI","CampaignAPIPath","BulkLocationsSearchDrawer","BingMapsContextProvider","BingMapsLocationTargetsEditor","onBulkLocationButtonClick","locationTargets","negativeLocationTargets","isRadiusExcludeEnabled","maxLocationTargets","maxNegativeLocationTargets","onLocationTargetsChange","bingMapLocations","onNegativeLocationTargetsChange","customizedLocationEqual","isLegacyLocationAndRadiusEqual","singleLineShimmer","ShimmerElementType","line","height","SingleLineShimmer","Shimmer","shimmerElements","radiusShimmerElement","gap","SectionShimmer","wrapperClass","mergeStyles","selectors","margin","border","shimmerWithElementFirstRow","shimmerWithElementSecondRow","circle","RadiusShimmer","audienceShimmerElement","AudienceSignalShimmer","withShimmer","ShimmerWrapper","showShimmer","ERROR_ENTITY","AssetGroup","CampaignLocation","CampaignRadius","CampaignNegativeLocation","CampaignLocationIntent","CampaignDayTimeCriterion","CampaignNegativeWebpage","AudienceGroupAssetGroupAssociation","BrandListAssociation","CnDefaultLocationTargetsViewModel","bidMode","Criterion","BidAdjustment","LocationCriterion","CountryCode","Latitude","LesLocationType","LocationId","LocationType","Longitude","NameTypeCombo","Type","OriginalBidAdjustment","OriginalCashbackPercent","CriterionType","Status","initLocations","peopleInLocation","peopleSearchingForLocation","globalDefaultLocationTargetsViewModel","getDefaultLocationTargetsViewModel","isCnMarket","getDefaultLanguagesViewModel","campaignLanguageStrings","None","Albanian","Arabic","Bosnian","Bulgarian","Croatian","Czech","Danish","Dutch","English","Estonian","Finnish","French","German","Greek","Hungarian","Icelandic","Italian","Japanese","Latvian","Lithuanian","Macedonian","Maltese","Norwegian","Polish","Portuguese","Romanian","Russian","Serbian","SimplifiedChinese","Slovak","Slovenian","Spanish","Swedish","TraditionalChinese","Turkish","Hebrew","Hindi","Malay","Thai","Indonesian","Tagalog","Vietnamese","entityIsCampaign","entityIs","campaignNameProp","andComp","ValidatedCampaignNameWithShimmer","RemainingCharsValidatedTextField","field","schema","CampaignNamePanel","key","isLoading","ValidatedFixedPanel","PANEL_KEYS","CAMPAIGN_NAME","LANGUAGE_TARGET","LOCATIONS","AD_SCHEDULE","BUDGET","START_END_DATES","SHORT_HEADLINES","DESCRIPTIONS","IMAGES","AUDIENCE_SIGNAL","VIDEOS","BID_STRATEGY","BID_VALUE","URL_OPTIONS","LOGOS","FINAL_URL_EXPANSION","AUTO_GEN_ASSETS","PAGE_FEEDS","CAMPAIGN_URL_OPTIONS","BRAND_EXCLUSIONS","COST_PER_SALE","SHOPPING","CONVERSIONS","PRONG_IMAGES","SPOTLIGHT_IMAGES","NEW_CUSTOMER_ACQUISITION","APP","DISCLAIMERS","LanguageTargetValidationAdapter","AdapterFactory","defaultValue","valueToInject","functionToInject","LanguageTargetValidatorFactory","defaultValidator","defaultErrors","isEmpty","SingleLanguageTargetValidator","SingleLanguageTargetValidationAdapter","ValidatedLanguageTarget","withError","withValidation","LanguageTarget","ValidatedSingleLanguageTarget","SingleLanguageTarget","campaignLanguagesProp","ServerValidatedLanguageTargetWithShimmer","withControlErrorHandling","withUnvalidatedControlErrors","LanguageTargetPanel","locale","CurrentLocale","DynamicPermissions","Permissions","permissions","_props$data","Languages","lang","toString","LanguageImg","validator","minuteToSaveMap","ZERO","FIFTEEN","THIRTY","FORTY_FIVE","getDay","day","getMin","min","getTime","hour","is12","getAdScheduleDetails","adScheduleView","hideBidAdjustment","schedules","koModel","useCampaignSettings","campaignDayTimeRanges","dayTimeRanges","dateSettings","getDateSettings","EndDate","StartDate","to","hideAdScheduleBidAdjustments","timeDisplayType","len","schedule","dayTime","startHour","StartHour","endHour","EndHour","startMin","StartMinute","endMin","EndMinute","dateTimePart","Day","BidAdjustmentType","BidAdjustmentAmount","getDayTimeDetails","adScheduleUseSearcherTimeZone","getAdScheduleUseSearcherTimeZone","campaignDayTimeCriterions","ServerValidatedLegacyAdScheduleWithShimmer","ValidatedLegacyAdSchedule","AdSchedulePanel","setAdScheduleView","setAdScheduleViewCallback","view","adSchedules","AdScheduleImg","isCreation","entityIsAdgroup","adgroupLanguageProp","ServerValidatedLanguageTarget","SingleLanguageTargetPanel","Language","IsDomesticSimplifiedChineseEnabled","showSelectedLanguages","multiSelect","supportAllOption","additionalOptions","useLocalizeBudget","localizeBudget","budget","currency","formatCurrency","Number","toUpperCase","withSymbol","maximumFractionDigits","BudgetRange","BingAdsWebUIStaticLegacyPageContext","budgetTitle","fontSize","budgetProp","ServerValidatedBudgetComponentWithShimmer","BudgetComponent","BudgetPanel","CurrencyCode","getResponsiveStyles","useResponsiveStyles","onDataChange","budgetAmount","campaignType","showBudgetSuggestion","isCampaignSetting","campaign","DailyRange","budgetSuggestion","Currency","GlobalMaximumBudget","DailyBudget","CeilingValue","GlobalMinimumBudget","FloorValue","budgetTitleDetails","onFieldChange","updatedData","prevData","onBudgetChange","newBudget","budgetAmountValue","onBudgetChangeFromBudgetSuggestion","shouldLocalize","Amount","onBudgetValidate","isValid","messages","isBudgetValid","budgetErrors","budgetSuggestionData","setBudgetSuggestionData","loadBudget","useBudgetSuggestionRepository","mode","MODE","EDITING","assetGroup","datas","finally","BudgetImg","as","headingClassName","showDropdown","onNotifyValidation","withSlider","BudgetSuggestionDialog","Budget","minBudget","maxBudget","defaultBudget","ValidatedLegacyDateSettingWithShimmer","ValidatedLegacyDateSetting","_Fragment","DateSettingsPanel","timeZone","getDateSettingDetails","StartEndDateImg","TimeZone","isCreate","initialValue","Date","ShortHeadlinesPanel","headlinesCardSummaryDetails","allAssetsExpand","featureName","setAddNewShortHeadlinesCallback","isOptional","iconAltText","HeadlineAssetCollection","showDeleteButton","DescriptionsPanel","descriptionsCardSummaryDetails","setAddNewDescriptionCallback","DescriptionAssetCollection","BaseImagePanel","panelKey","imagesData","containerRef","portalContainerState","addNewImageCallback","maxUploadNum","ImageListSummaryCardDetails","images","isLogos","ImageListPortalContainerWithControlErrorHandling","containerState","PerfMaxImageSuggestionCarousel","addImageCallback","ImagesPanel","imageExperienceAddNewImageCallback","imagesContainerRef","imageExperiencePortalContainerState","_excluded2","LogosPanel","logos","logoExperienceAddNewImageCallback","logosContainerRef","logoExperiencePortalContainerState","_excluded3","defaultProp","DEFAULT_MESSAGE","ConversionBasedBiddingBanner","conversionGoalsDetails","isCampaignCreation","usesMaxClicks","first","getUsesMaxClicks","hasActiveGoal","getHasActiveGoal","messageSettings","getTemplateToDisplay","onSetConversionTracking","save","wordBreak","ReactTemplate","template","model","b","disableShrink","DefaultButton","getBidStrategyStyles","bottomMargin","bidStrategyProp","ServerValidatedBidStrategyComponent","BidStrategyComponent","BidStrategyPanel","ScopeContext","bidRange","KeywordBidRange","options","conversionGoalDetails","bidStrategy","cpa","roas","isInitialAdditionalDetailsChecked","_options$bidStrategyC","bidStrategyComponentOptions","_options$biddingBanne","biddingBannerOptions","_options$scenario","scenario","bidStrategyOptions","hideAdditionalDetails","restBidStrategyComponentOptions","restBiddingBannerOptions","Object","assign","_objectDestructuringEmpty","bidStrategyTitleDetails","targetValue","bidStrategyText","MAX_CONVERSIONS","MAX_CONVERSIONS_VALUE","predefinedBidStrategy","BID_STRATEGY_OPTIONS_MAP","TargetCpaWarningBanner","addBottomMargin","onBidStrategyChange","newBidStrategy","onMarketingMetricChange","newMarketingMetric","isMarketingMetricValid","marketingMetricErrors","BidStrategyImg","selectedBidStrategy","defaultChecked","marketingMetricsValue","inputUnit","hideMessage","getUrlOptionsStyles","urlOptionsContainer","ValidatedUrlOptionsParameterWithShimmer","ValidatedUrlOptionsParameter","ValidatedUrlOptionsParameterWithErrorWithShimmer","ValidatedUrlOptionsParameterWithError","UrlOptionsPanel","isTrackingUrlTemplateRequired","isWithError","showDescription","urlParameterOptions","trackingUrlTemplate","TrackingUrlTemplate","finalUrlSuffix","FinalUrlSuffix","urlCustomParameters","UrlCustomParameters","urlOptions","urlOptionsDetails","getUrlOptionsDetails","UrlOptionsImg","PriceModelToRange","ManualCpa","ManualCpc","ValidatedBidValue","onBidChange","bidValueType","BiddingScheme","getBidRange","bidCeil","bidFloor","SearchBid","_getBidRange","CustomValidatedDefaultBid","placeholderText","currencyCode","properties","minimum","maximum","required","htmlFor","bidValueProp","ServerValidatedBidValueComponentWithShimmer","BidValuePanel","bidAmount","bidValueDetails","onBidValueChange","AppDetailsPanel","selectedApp","AppSetting","AppPanelWithShimmer","AppPanel","AudienceSignalSection","src","SignalsSparkleImg","alt","modelToViewModelDayTimeTargets","targets","resetId","schedulingRows","criterion","multiplier","CriterionBid","Multiplier","FromHour","FromMinute","ToHour","ToMinute","window","Math","abs","formatDateInEntitySet","date","kendo","parseDate","dateString","useDateRangeDefault","preferenceService","PreferenceContext","waterFallDateFilters","WaterfallFilterStorage","getFilters","WaterfallFilterType","DateFilter","waterfallDateFilterProcessor","useP$DaterangeDefault","dateFilter","Promise","resolve","useDateRange","dateRange","start","RangeStartDate","end","RangeEndDate","getConversionGoalTitleDetails","conversionGoals","goalScopeSelection","goalSelection","Scopes","CAMPAIGN","getFinalUrlExpansionTitleDetails","isFinalUrlExpansionEnabled","selectedTargetsView","viewmodel","exactUrls","rules","conditions","WebPage","Parameter","Conditions","condition","Operator","ArgumentOperand","exactUrlsDetails","rulesDetails","getBidStrategyMap","MaxClicks","MaxConversions","MaxConversionValue","MaxImpressions","MaxReach","ManualCpm","ManualCpv","EnhancedCpc","CostPerSale","TargetRoas","TargetCpa","TargetImpressionShare","getBidTitleDetails","bid","getBidBudgetTitleDetails","amount","bidType","bidVal","formatPercent","getBudgetTitleDetails","getListingGroupDetails","isEditing","productFilter","listingGroup","operand","pluck","getStoreTitleDetails","storesData","storeContainerData","isAudience","storeId","ProviderId","countries","stores","store","salesCountry","SalesCountry","localInventoryAdsEnabled","LocalInventoryAdsEnabled","getSearchThemeDetails","searchThemes","SearchTheme","getDisclaimerTitleDetails","disclaimer","selectedDisclaimer","PercentCpc","Commission","Individual","individual","ExcludedSites","ExcludedIPs","Targeted","Computer","Desktop","Tablet","Smartphone","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","ConversionGoalKeyToStringMapping","Campaign_Goals_Account_Level_Label","Campaign_Goals_Account_Level_Subtext","Campaign_Goals_Campaign_Level_Label","Campaign_Goals_Campaign_Level_Subtext","GoalSelector_List_Header","GoalSelector_Result_List_Header","GoalSelector_Radio_Aria_Label","GoalSelector_EmptyList_Content","EntitySelector_Search_Placeholder","UnifiedEventTracking_Goal_Creation_Type_Event_Category","GoalSelector_Result_Action_Bar","GoalSelector_TrackingStatus_Value_InactiveDueToTagUnavailable","GoalSelector_TrackingStatus_Value_NoRecentConversion","GoalSelector_TrackingStatus_Value_RecordingConversions","GoalSelector_TrackingStatus_Value_TagInactive","GoalSelector_TrackingStatus_Value_Unverified","Segment_Goal_Category_Download","Segment_Goal_Category_Purchase","Segment_Goal_Category_AddToCart","Segment_Goal_Category_BeginCheckout","Segment_Goal_Category_BookAppointment","Segment_Goal_Category_Contact","Segment_Goal_Category_GetDirections","Segment_Goal_Category_InStoreVisit","Segment_Goal_Category_Other","Segment_Goal_Category_OutboundClick","Segment_Goal_Category_PageView","Segment_Goal_Category_RequestQuote","Segment_Goal_Category_SignUp","Segment_Goal_Category_SubmitLeadForm","Segment_Goal_Category_Subscribe","Segment_Goal_Category_Unassigned","Campaign_Goals_Option_Goals","Campaign_Goals_Option_GoalSets","EntitySelector_Pagination_Page","EntitySelector_Pagination_TotalPageCountText","EntitySelector_Pagination_PreviousPageText","EntitySelector_Pagination_NextPageText","getAdsStepStyles","displayAdPanelRoot","paddingBottom","background","boxShadow","borderRadius","float","flexWrap","marginRight","fontFamily","backgroundColor","addNewImageButton","selectedPanel","displayAdPanelHeader","displayAdPanelButton","cursor","displayAdPanelButtonContainer","left","top","transform","previewContainer","emptyPreview","adPreviewRoot","adPreviewSizeHeader","adPreviewPageTitle","adPreviewSizeTitle","paddingRight","adPreviewPanel","displayAd","previewTag","previewTagText","pagination","pageControls","pageControl","pageControlPreviousIcon","pageControlNextIcon","paginationIndicatorDot","paginationButton","opacity","paginationIndicator","displayAdPanelContent","placementInfoTile","placementInfos","rowGap","enabledPlacement","enabledText","disabledPlacement","disabledText","fontStyle","placementLabel","placmentResolution","displayAdPanelFinalUrlContainer","displayImageLabel","getCreativeWorkbenchStyles","creativeWorkbenchRoot","header","copilotIcon","getImageSuggestionCarouselStyles","imageSuggestionCarouselRoot","croppedImage","getDisplayAdStepBaseStyles","displayAdsStepRoot","CropPreview","overflow","CroppedImageView","partnerTrafficString","onoTrafficString","standard","sizeText","targetText","mobile","getSupportedSize","supportedSize","source","sourceSize","baseSize","getStandardOnO","getStandardOthers","getMobileOnO","getMobileOthers","getOptionsTranslated","sourceWidth","sourceHeight","sourceOptions","resultOptions","getTargetOptions","standardOptions","mobileOptions","_ref6","itemType","DropdownMenuItemType","Header","Divider","AdPreview","ads","onUpdateCurrentImageIndex","disablePagination","customStyleFunction","useCustomStyleFunction","displayAds","defaultClasses","customClasses","currentPageIndex","currentImageIdx","setCurrentImageIdx","targetOptions","getPageAdjustedIndex","idx","goToImageIndex","displayAdsInPage","slice","currentAd","currentImage","resizeImageHeight","cropHeight","cropWidth","aspectRatio","currentImageTarget","option","targetWidth","targetHeight","adPreviewPageHeader","adPreviewTargetTitle","originalWidth","SourceX","cropX","SourceY","cropY","SourceWidth","disabled","FontIcon","iconName","tabIndex","role","onKeyDown","Pagination","totalPages","goToPrevPage","goToNextPage","goToPage","val","imageModelToViewModel","imageModel","exec","parseInt","disableEdit","subType","cropSettings","SourceHeight","originalHeight","imagePlacementsToImage","crops","defaults","filtered","AspectRatiosForDisplayAds","_aspectRatio$minSize","minSize","minWidth","selectedImage","selectedIndex","findIndex","TargetWidth","TargetHeight","CropWidth","CropHeight","CropX","CropY","_ref4$cropSettings","imagePlacements","AddImage","advertiserCustomerId","accountId","perfMarker","oDataConfig","suggestionState","suggestionPoller","fullUrl","urlPrefix","onUpdateUrlPrefix","onUpdateUrlValue","dateFormat","activityLogger","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","onNewImageSelected","isAADUser","creativeEditorProps","addImageChildPerfmarker","emptyFinalUrl","_useAssetLibraryImage","useAssetLibraryImagePicker","isDisplayAds","imagePickerError","setImagePickerError","clearImagePickerError","uploadImage","processUploadedImage","addImageByUrl","getStockImages","getInvestImages","onSelectStockImage","onImageSelected","onImagesSelected","socialMediaDataSource","customMediaSourceConfig","_suggestionState$sugg","suggestion","AddImageCrudAdComponent","isOpen","setIsOpen","newOpen","imageExperienceProps","finalUrlProtocol","onUpdateFinalUrl","onUpdateFinalUrlPrefix","isMultimediaAd","imageOption","constants","defaultImageOption","managedViewSelectionState","updateManagedViewSelectionState","stockImageConfig","investImageConfig","socialImageConfig","assetLibraryConfig","preferencesService","onImageAddError","enableStockMultipleSelection","enableInvestMultipleSelection","enableWebsiteMultipleSelection","errorMessage","imageType","adCreatorScenario","buttonContainer","PopulateImages","instrumentation","onUpdateUrl","showAddButton","ScenarioContext","privateUrl","setPrivateUrl","validateAdUrl","urlPrefixValue","_getUrlPrefixAndDesti","getUrlPrefixAndDestination","_useWebsiteSuggestion","useWebsiteSuggestion","adContext","logActivity","hasErrorInUrl","scenarioName","scenarioValue","evt","newPrefix","substring","_getUrlPrefixAndDesti3","original","newUrl","getUpdatedFullUrlOnPrefixUpdate","getUpdatedFullUrlOnTextUpdate","IsAADUser","wrapped","withPreference","withInstrumentation","NO_RECOMMENDATION","FinalURL","DEFAULT","placements","SuperLeaderboard","Leaderboard","FullBanner","SmallLeaderboard","Banner","LargeBanner","MediumBanner","SmallBanner","HalfBanner","Billboard","LandscapeLargeBanner","Landscape","LargeRectangle","MediumRectangle","Rectangle","Square","Portrait","HalfPage","WideSkyscraper","Skyscraper","ratios","_ratios","ratioGrouping","XWide","Vertical","addPlacementToAd","ad","MTPlacement","templateName","trim","getPlacement","placement","getRandomImageForEachRatioGroup","adsWithRatioGroups","randomImages","randomImage","group","randomAd","thumbnailUrl","suggestionId","recommendationId","apply","processAndGroupAds","groupedAds","groupAdsByImages","imageUrls","imageUrl","groupedByPlacement","ratiosKey","groupAdsByRatio","imagesToSuggest","getItemsForListFromGroupedAds","ratioGroups","sampleAd","newItem","previewSrc","previewType","getAdsInMatchingGroup","matchingGroup","getODataConfig","odataPath","document","indexOf","isLocal","odataToken","oDataToken","oDataPath","DisplayAdsEditorDrawer","withComponentErrorLogging","DisplayAdsEditor","rootContainer","imageContainer","buttonContainerStyle","bottom","choiceGroupStyles","dropdownStyles","dropdown","editButtonStyle","entityIsAd","Ad","imageTypeFromImage","standardDeviceType","mobileDeviceType","standardSizes","mobileSizes","CustomComponent","isLoadingImage","onRenderCustomAddImageButton","_useImagePicker","useImagePicker","isDisplayImageRegroupEnabled","IsDisplayImageRegroupEnabled","InstrumentationContext","isImageEditDisplayed","setIsImageEditDisplayed","_useState3","_useState4","isDisplayTemplateEditorOpen","setIsDisplayTemplateEditorOpen","_useState5","_useState6","deviceFormatType","setDeviceFormatType","mediaRepository","MediaRepository","cmpId","currentPlacementIndex","copilotRepository","useCopilotRepositoryContext","_useBrandKitService","useBrandKitService","brandKitDataService","brandkitApiState","shouldDirty","deviceType","_displayAd$image","findDeviceType","getImageTypeFromSize","creativeData","onEdit","creativeMeta","version","onRemoveImage","dropdownOptions","mobileOnO","mobileOnoOptions","mobileOthers","mobileOtherOptions","getMobileTargetOptions","standardOnO","standardOnoOptions","standardOthers","standardOtherOptions","getStandardTargetOptions","deviceFormatOptions","onChangeTarget","event","selectItem","currentItem","imagePlacementIndex","imageViewModel","selectedItem","imageKey","firstItem","minCropSize","getMinimumSizeForImage","baseImage","base","Src","Width","Height","onSaveEditImage","newAdData","placementTitle","_ref4$template","placementFromTemplate","getPlacementFromTemplate","resizeImageHeightForThumbnail","imageControl","IconButton","iconProps","HelpPopupInline","ChoiceGroup","selectedKey","Dropdown","AddImageButton","FinalUrls","MediaEditorPanel","onDismiss","onApply","aspectRatioConfig","hasRightRail","onRenderRightRailContent","previewImageUrl","_ref5$cropSettings","PreviewSingleRightRailWrapper","previewTitle","previewSettings","Preview","isThumbsUpDownEnabled","isTestEnv","isTestEnvironment","disabledPivotItemKeys","PivotItemKey","Effect","customizedDefaultSelectedPivotItemKey","Crop","containerClassName","editorContainer","hasFetchBrandKitData","useBrandKit","showNavigation","showSummaryBarControl","displayTemplatesDataService","imageData","metadata","onApplyCreative","sourceType","originalSourceType","ImageExperienceWithValidation","withServerContext","ValidatedImageExperience","ImageProp","dataObj","ValidatedFinalUrl","UrlInput","DisplayAdPanel","onUpdate","onRemovePanel","removeCloseButton","keyIndex","isSelectedPanel","legacyI18n","globalLegacyI18n","i18nMerged","mergeI18n","finalUrlsObj","verifiedTrackingSettingObj","VerifiedTrackingSettings","isIasTrackingEnable","isAdvancedURLOptionsForMSANDisplayEnabled","isImpressionTrackingForDisplayAndVideoEnabled","IsMOATEnabled","onValidationUpdate","advancedSettings","AdvancedSettings","impressionTrackingUrls","ImpressionTrackingUrls","verifiedTrackingSettings","isDisplay","isVideo","ValidationGroup","ResponsiveAd","onValidate","validateOnRender","disableRemoveAll","hideRatioLabel","ImageExperienceCircleUploadType","disableUploadTextField","ImagePickerContainerHeight","ThirdPartyMeasurementContainerWithValidation","videoAd","adType","DisplayAdsContainer","onAdsValidation","currentImageIndex","_props$ads","resetFields","isAdGridEditorMode","initialAdsCount","DisplayAds","setDisplayAds","_usePageManager","usePageManager","currentPage","pages","onAddItem","removeItem","maxItems","onAddAd","numberOfAdsInPage","isAllValid","valid","isAllDirty","dirty","setClarityTag","shouldUpdate","vAd","uid","rootDisplayAdsContainer","page","pageNumber","isCurrentPage","itemAtIdx","itemsBefore","itemsAfter","onImagePanelUpdate","splice","container","CTAInCreativeEditor","newCTA","stopPropagation","ValidatedLegacyCallToAction","CallToAction","valueText","CallToActionValue","ctaText","CallToActionText","isCustomCTAEnabled","formatBrandkitForAPI","obj","formattedObj","keys","SubType","useDisplayAdsCopilot","RecommendationContext","setRecommendationContext","logBannerGenerated","useCopilotLoggers","isLoadingBrandKit","setIsLoadingBrandkit","brandkit","setBrandKit","isBrandKitEmpty","setIsBrandKitEmpty","isBrandKitEnabled","BrandKitUI","fetchDisplayAdsAssetRecommendations","fetchDisplayAdsTemplateDefinition","editDisplayAdsAssetRecommendations","getBrandKitDataByAccId","useBrandKitDataService","fetchBrandKit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","restrictionCall","_response$BrandKits","_response$BrandKits$","_response$BrandKits$2","_response$BrandKits$3","_response$BrandKits$4","_response$BrandKits$5","wrap","_context","prev","next","isCopilotRegionRestricted","feature","accId","sent","BrandKits","Fonts","Images","LandscapeLogos","Palettes","SquareLogos","DisplayAdsWithBrandKit","stop","_callee2","_args2","_context2","abrupt","ImageAssets","Ads","_processAndGroupAds","RecommendedAssets","RecommendationId","fetchAigcTemplateDefinition","templateId","err","generate","updatedCreative","finalUrlForCopilot","useFluentV2Styles","makeStyles","button","addIcon","DisplayAdPanelWithCopilot","_useDisplayAdsCopilot","fluentV2Styles","isAdvancedURLOptionsForMSANVideoEnabled","onCTAUpdate","setCTA","onRenderCTA","imageObj","onGenerateCreative","creativeDataInner","AddRegular","AllRecommendationsPanel","onSelectImageSuggestion","_useContext2$","_useContext2$2","handleDismiss","handleSelectImageSuggestion","matchingAds","Panel","scrollableContent","main","animation","PanelType","custom","customWidth","closeButtonAriaLabel","headerText","FluentProvider","theme","webLightTheme","ViewAllRecommendations","creatives","onFinalUrlEntered","onCreativeSelected","IMAGE_DIM","getFullyShownImagesCount","itemWidth","floor","getCarouselStyles","components","_ref$palette","palette","iconFontFamily","carouselParent","disabledCarouselParent","pointerEvents","objectFit","imageContainerLeftMargin","overflowX","overflowY","isCollapsible","imageParentContainer","imageParentLeftOffset","numberOfImages","imageClickableContainer","loadingMessageContainer","loadingText","panel","panelHeading","panelTitle","panelIcon","panelHelpButton","imageHintRight","right","imageHintLeft","paddleBtn","moreIcon","themeDarkAlt","seeAll","whiteSpace","textOverflow","seeAllInHeader","themePrimary","useBrandKitHeader","spinner","getBlockerStyle","parentContainer","LoadingShimmer","shimmerElement","Spinner","labelPosition","customElementsGroup","ShimmerElementsGroup","ImageView","setWidth","setHeight","resizeHeight","img","Image","onload","naturalWidth","naturalHeight","imgWidth","imgHeight","getImageDimension","DisplayAdsImageSuggestionCarousel","_ref3$maxUploadNum","_ref3$useBrandKit","setUseBrandKit","isSeeAllPanelOpen","setIsSeeAllPanelOpen","_useState7","_useState8","setImagesToSuggest","_useState9","_useState10","isCopilotEnabled","setIsCopilotEnabled","_useContext2","recommendationContext","reportRecommendations","logSuggestionsViewed","imageSuggestions","carouselState","carousel","isError","panelState","panelImages","hasMore","suggestionImages","onOffsetChange","offset","viewedImages","suggestionIds","onSelectImage","allGroupedAds","onSelectSeeAllImages","_ref7","onRenderImage","classesProp","onBrandKitToggle","truncatedImages","isRestricted","ImageSuggestionCarousel","helpTopic","onSelectSeeAll","showEllipsisWhenNoMoreImages","showViewAllInHeader","enableBrandKit","stylingOverrides","initialImageContainerLeftMargin","seeAllLinkText","messageBarType","MessageBarType","CreativeWorkbench","onFinalURLFocusOut","onCreateAds","isNewLogo","dataModel","setDataModel","useId","updateToast","finalUrlFromContext","finalUrlValidationProps","addingRecommendationToast","media","errorOnCreateAdsToast","DismissRegular","openRatioPicker","CopilotIcon","additionalProperties","onBlur","finalUrls","inline","useStyles","selectableImageContainer","shorthands","colorTransparentBackground","selectedImageContainer","colorPaletteBlueBorderActive","selectableImageList","gridTemplateColumns","ratioDescription","imageCheckbox","SelectableImage","onSelect","checked","handleClick","imageDimension","dimensionList","maxHeightRatio","maxWidthRatio","ratio","mergeClasses","Checkbox","bordered","shape","fit","Badge","RatioPickerInternal","open","onOpenChange","onApplyButtonText","fill","creativeSelections","setCreativeSelections","isApplying","setIsApplying","onRatioApply","selectedCreatives","creative","onImageSelect","newSelectedCreative","Dialog","DialogSurface","DialogBody","DialogTitle","DialogTrigger","DialogContent","DialogActions","disableButtonEnhancement","RatioPicker","handleRatioPickerState","CreateAnotherAdMenu","onCreateWithAI","onCreateFromExistingImage","handleCreateWithAI","handleCreateFromExistingImage","Menu","MenuTrigger","Add20Regular","MenuPopover","MenuList","MenuItem","GlanceHorizontalSparkles20Regular","Image20Regular","CreateAdWithAiDialog","_useCopilotRepository2","initialFinalUrl","setFinalUrl","setImages","selectedImages","setSelectedImages","handleFinalUrlUpdate","handleSelectImages","ids","lastId","handleCreateAds","flatten","CreateDisplayAdDialog","onFinalUrlUpdate","onSelectedImagesUpdate","useCreateAds","addToAssetLibrary","addCreatives","creativesToAdd","savedImages","savedImage","creativeId","getProcessedCreative","DisplayAdsContainerWithCopilot","hideFooter","isEditScenario","useInitCopilotLoggers","logEnterFlow","copilotFinalUrl","setCopilotFinalUrl","isCreateAdDialogOpen","setIsCreateAdDialogOpen","onAddItemsToPage","newAds","isAdsEmpty","addCreativesToDisplayAds","currentItemCount","createAds","MultiAdFormat","pageComponent","CampaignFetchProvider","CopilotRepositoryProvider","getLocale","recommendationType","containerStyle","AdEditor","adsModel","serverErrors","ErrorMessages","onUpdateCurrentVideoIndex","StepHeader","DisplayAdsWithCopilot","_ref2$data","_ref3$errors","_state$context$wizard","context","wizardData","_state$context$wizard2","editingAdId","currentStates","PerformanceMarkerContext","setCurrentImageIndex","saveFailed","useFormService","results","newAdsData","restResults","removeEmptyAds","dataPatch","matchStepState","SAVING","ActuationGroup","isActive","AttentionBeaconGroup","FormErrorGroup","showAllValidationErrors","UnmappedFormErrors","getVerifiedTrackingSettings","setting","vendor","vendorName","keyMap","IAS_advertiserEntityId","IAS_publisherEntityId","Save","_useWizardService","send","isBlocking","onNextClicked","WIZARD_EVENTS","UPDATE_WIZARD_DATA","isCreateAnother","SAVE_AND_EXIT","buttonText","PrimaryButton","SaveAndCreateAnother","_useWizardService2","SAVE_AND_NEXT","EditAdFooter","cancelButtonText","CancelButton","DISPLAY_AD","StepConfig","Activity","scenarioContext","logSuggestionsApplied","imageRepository","ImageRepository","load","initialAds","savedAdModel","random","imageAsset","Asset","verifiedTrackingSetting","getImageByIdAsync","IdString","imgObjMT","imageObject","newImageFromMTObject","imageSources","Existing","croppedImagePlacements","getAutoCroppedImages","originalImageToCrop","isMultimediaAdinMSANEnabled","aspectRatioOption","defaultAspectRatioOption","metaData","uriDecodedMetaData","replace","decodedMetadata","parseSync","onSave","onSaveAndCreateAnother","isMultiAdFormatAd","reject","saveAds","adSubType","adGroup","adGroupId","compact","EditDisplayAdWizardInternal","gridData","onCancel","wizardPerfMarker","config","initialStep","steps","actions","onDone","onExited","initialWizardData","attachStepActivities","PerformanceMarkerProvider","immediateDone","Scenario","Wizard","LayoutContainer","DefaultTemplate","Layout","component","StepContainer","BusyBlocker","CancelWizardDialog","EditDisplayAdWizard","withLoggingContext","withRecommendationContext","withSignal","FabricPrimaryButton","CommonEventParser","FabricDefaultButton","FabricLink","FabricTextField","FabricIconButton","videoPanelRoot","videoRepairPanelRoot","videoPanelHeader","adPreviewTitle","adPreviewHeader","video","videoPanelContent","videoPanelFinalUrlContainer","starStyle","loadClipchampPlayer","videos","videoRef","currentVideoIdx","setCurrentVideoIdx","videoHeight","setVideoHeight","videoTemplateUIEnabled","VideoTemplateUI","goToVideoIndex","videosInPage","currentVideo","_currentVideo$data","_currentVideo$data$vi","ClipchampPlayer","videoUrl","controls","ref","buttonContainerMultiple","addIconMultiple","AddVideoButton","multiVideoMode","overrideClasses","borderRadiusLarge","overlay","fontSizeBase200","qualityContainer","info","spacingVerticalXXL","borderRadiusMedium","fontSizeBase400","videoContainer","VideoSuggestionCard","videoAsset","onSelectVideoSuggestion","showQuality","_React$useState","_React$useState2","showVideo","setShowVideo","totalSeconds","duration","minutes","seconds","durationString","texts","scenes","scene","curlyTemplate","getVideoDescription","submitEvent","onMouseOver","onMouseOut","onFocus","autoPlay","loop","TimerRegular","PlacementQualityToText","quality","getPanelStyles","subtitle","neutralDark","panelHeader","alignSelf","contentHeading","gridContainer","VideoRecommendationsPanel","close","contentRef","videoAssets","isVideoAsAnAssetEnabled","VideoAsAnAsset","isAmplifyEnabled","currentTarget","closest","contains","onSelection","isFooterAtBottom","onRenderFooterContent","strong","VideoAdsSuggestionCarousel","_ref4$useBrandKit","videosToSuggest","setVideosToSuggest","videoSuggestions","onSelectIndex","__","_ref8","alwaysShowViewAll","classOverrides","useVideoAdsCopilot","fetchVideoAdsAssetRecommendations","updatedResponse","taskManager","addTask","taskId","taskFn","campaignObjective","getLocalStorage","videoMetadata","sourceVideoBitRate","VideoAssets","convertBpsToKbps","bps","Kbps","pow","Placements","PlacementQualities","StarsToQuality","enabled","PlacementTitle","titleText","PlacementInfoWithStars","_videoAd$video2","_videoAd$video2$quali","numberOfStars","numberOfDisabledStars","Icon","isBulkWrappedResponse","bulkResult","serverErrorsCompare","curr","isEqual","getBulkUploadErrorType","entitySchema","getBulkUploadEntityType","modelToViewModelForBulkErrors","bulkUpsertEntityErrorMap","errorProcessor","identity","getBulkApiErrors","errorType","mappedErrorType","mapBulkUpsertErrors","ReferencedEntityInvalidIdErrors","removeReferencedEntityInvalidIdErrors","bulkErrors","needsAttention","getDealDetailsStyle","dealDetails","flex","DeviceKeys","Computers","Tablets","Smartphones","ConnectedTVs","getCountriesLocations","locationIds","reqs","odata","batch","needContentType","targetTypes","getTargetConstraints","deal","targetType","ret","mandatory","DealTargetConstraints","devicesConstraints","TargetType","Mandatory","DealTargetRestrictionLevel","getLocationCritetions","_x","_getLocationCritetions","locationCriterions","CurrentCustomer","LocaleID","each","locationTargetConverter","buildLocationCriterionFromSearchResult","status","modelConstraints","_x2","_x3","_x4","_modelConstraints","isCreating","deviceConstraints","locationConstraints","ageConstraints","genderConstraints","audienceConstraints","dealLocationTargets","locations","adGroupModel","ageRanges","initialAgeRanges","negativeAgeRanges","initialGenderTypes","negativeGenderTYpes","genderTypes","audiences","dealLocationList","deviceTypes","deviceRestrictions","difference","deviceRestricted","locationRestricted","ageRestricted","genderRestricted","audienceRestricted","genreRestricted","CurrencyCode2CurrencyId","AUD","BRL","ARS","CAD","CLP","COP","DKK","EUR","HKD","INR","JPY","MXN","NOK","NZD","PEN","SGD","ZAR","SEK","CHF","USD","GBP","VEF","TWD","MYR","PHP","VND","THB","IDR","DZD","BHD","EGP","IQD","JOD","KWD","LBP","MAD","QAR","OMR","SAR","TND","CNY","TRY","PLN","AED","ILS","NGN","KRW","MTCurrencyConvertor","AustralianDollar","BrazilianReal","CanadianDollar","SwissFranc","DanishKrone","EURO","UKPound","JapaneseYen","NorwegianKrone","NewZealandDollar","SwedishKrona","USDollar","SouthAfricanRand","ArgentinePeso","ChileanPeso","YuanRenminbi","ColombianPeso","UAEDirham","AlgerianDinar","EgyptianPound","HongKongDollar","IndonesianRupiah","IsraeliSheqel","IndianRupee","LebanesePound","MoroccanDirham","MexicanPeso","MalaysianRinggit","PeruvianNuevoSol","PhilippinePeso","Zloty","QatariRial","SaudiRiyal","SingaporeDollar","ThaiBaht","NewTaiwanDollar","VenezuelanBolivar","VietnamDong","NewTurkishLira","NigerianNaira","Won","getConvertedCurrencyDealMinimumBid","minimumBid","dealCurrency","accountCurrency","exchangeRateMapping","dealCurrencyId","dealCurrencyToUSD","CurrencyId","accountCurrencyId","accountCurrencyToUSD","ceil","getVideoConstraintDuration","minimumDuration","isNumber","round","isNetflixDeal","Seller","isDealDeleted","AgeRanges","EighteenToTwentyFive","TwentyFiveToThirtyFive","ThirtyFiveToFifty","FiftyToSixtyFive","SixtyFiveAndAbove","Unknown","formatAgeRanges","chain","sortBy","ageRange","sortAgeRanges","formatAgeRange","targetConstraintsToText","locationMap","_getTargetConstraints","uniq","DealDetails","shouldShowGenre","dealOptions","MinimumBid","decimal","fromFloatToString","CountryName","AgeRange","Genre","bytesForHuman","bytes","num","i","toFixed","viewModelToModelForAd","adsViewModel","isDeletedEntities","adViewModel","idString","verifiedTrackingSettingAttachmentObj","isUndefined","isNull","VerifiedTrackingData","mapObject","verifiedTrackingSettingAttachment","fields","pick","extend","Videos","AdSubType","bulkModelToViewModelForAd","savedAdsData","oldAdsData","savedAdItem","sAd","adsWithIdsAttached","originalAdsModel","modelToViewModelForAd","adResource","types","ResourceIdentifier","bulkUpsertAdSettingsEntityErrorMap","getErrorsPlaceholders","systemErrors","uploadVideo","queryParam","QueryParam","remove","getEntityFromScope","currentEntity","functionParams","postVideoByUrl","res","newVideoFromMTObject","oldAdsModel","_ref4$activity","videoPromises","uploadVideoIfNeeded","_splitUpdateAndCreate","adIds","adsToCreate","adsToUpdate","adsToDelete","adToSave","oldAd","adsNeededToCreate","adsNeededToUpdate","splitUpdateAndCreateAds","promises","bulkCreate","bind","updateAds","bulkUpdate","updateData","updatedAds","createdAds","bulkOrSystemError","errorsWithPropertyIdsAttached","Property","attachUidToErrorProperty","warn","stack","setLocalStorageWithExpire","expire","time","now","localStorage","setItem","getKey","getFullYear","getMonth","_fetchExchangeRateMapping","baseURL","t0","getAccountExchangeRateFromLocalStorage","getItem","parse","expired","getLocalStorageWithExpire","fetchExchangeRateMapping","isDealCampaign","pathname","isCTVCampaign","getVideoDeal","videoDeal","supportsStorage","set","legacyTemplates","validateVideo","videoRequirementForDeal","skipQualityValidation","videoPanelButton","videoPanelButtonContainer","VideoExperienceWithValidation","withAssetLibraryServicesLoaded","renderError","dataService","copilotEnabled","isCTV","isVideoRequired","getVideo","isGoogleImportVideoAdNeedsRepair","IsGoogleImportVideoAdsEnabled","isUploading","setIsUploading","showVideoEditor","setShowVideoEditor","isFetchingVideo","setIsFetchingVideo","multiVideoList","setMultiVideoList","showMultiVideoCopilotEditor","setShowMultiVideoCopilotEditor","_useState11","_useState12","isVideoFetched","setIsVideoFetched","enableEdit","isLegacyTemplate","onErrorsUpdated","onUpdateMultiAdVideoList","list","validVideos","multiVideo","validationMessages","valVideo","aggregatedMessages","flat","onRenderItemDropdownCoPilot","validationMessage","onRenderItemDropDownForMultiModeWithCopilot","selectedVideo","selectedIdx","selectedMultiVideo","updatedVideos","getNewVideoObject","newVideo","videoObject","ImageExperienceVideo","updateWithNewVideo","_getNewVideoObject","v","updateWithNewVideoAtIdx","newVideoIdx","onChangeVideo","onChangeMultiVideo","fetchMetadata","getVideoPromises","all","existingVideos","UiBlocker","blocking","blockUiContainer","blockerIndicator","_createElement","VideoExperience","videoList","onVideoListUpdated","onVideoUploadStatusUpdate","showErrors","videoLabelHelpTopic","CustomAddVideoControl","onRenderItemDropdown","onReplace","enableShowingErrors","VideoTemplateEditorContextWrapper","videoMetaData","isDialog","CopilotVideoEditor","ValidatedVideoExperience","videoProp","multiAdDataObj","processingMessage","passiveMessages","updatedVideoAd","customErrorRendering","VideoExperienceWithPreference","VideoExperienceWithPreferenceRecommendationFetch","copilotFetchTaskManager","TaskManager","_useVideoAdsCopilot2","FinalUrl","validationState","setValidationState","updatedCopilotFinalUrl","setUpdatedCopilotFinalUrl","notifyCopilotFinalURLchange","handleKeyUp","onKeyUp","VideoPanel","oDataConfigProp","biddingScheme","isForDeal","isXandrServingCampaign","dealLoaded","EnableMSANVideoCampaigns","isBiddingStrategyCPV","_useVideoAdsCopilot","shouldRepairGoogleImportVideoAd","VideoCopilotGeneration","allowedVideoSizes","videoExperienceCircleUploadType","videoPickerContainerHeight","EnableIASVerifiedImpressionTrackingURLsForBrandAwarenessCampaign","isMOATEnabled","isUsingVideoTemplates","enableLogoAndCTA","useClipchamp","ITEMS_PER_PAGE","addItemsToPages","lastPage","lastPageIndex","remaining","newPageItem","nextPageItem","setTotalPages","setCurrentPageIndex","totalAds","createPages","setPages","setCurrentPage","onAddPage","newPage","removeLastPage","valInt","newPages","removeItemFromLastPage","VideoAdsContainer","dealVideoRequirementText","currentVideoIndex","allowCopilotVideoGeneration","_props$biddingScheme","videoAds","setVideoAds","isAdsCopilotRegionRestricted","setIsAdsCopilotRegionRestricted","rootVideoAdsContainer","onVideoPanelUpdate","fillLocationForDeal","responses","EnglishName","getDealDetails","dealId","dealDetail","filledDeal","errorCodeTarget","Campaigns","CampaignCriterions","$cast","Deals","DealId","GetDealErrorCode","t1","_x5","_x6","expectedError","responseErrArray","buttonStyle","AdEditorFooter","cancel","saveAndCreateAnother","setDeal","setDealLoaded","setServerErrors","setBlocking","fetchDeal","createScenario","createActivity","versionForLog","getLogVersion","logger","getLoggerWithoutPageInfo","videoRepository","createVideoRepository","folderRepository","createFolderRepository","createImageRepository","saveAd","adData","saveAnother","savedMaterial","savedLogo","uploadVideoMetadata","uploadedVideo","saveVideoAd","AdEditorWithErrorLogging"],"sourceRoot":""}