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B,OAC5B4sB,UAAWtD,GAAgBvrB,YAMvC,G","sources":["../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/styles.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/paginator.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/landing-page-footer.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/countries.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/statuses.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/status-badge.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/lift-studies-grid/delete-study-dialog.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/lift-studies-grid/config.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/campaigns.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/experiment-errors.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/experiment.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/lift-studies-grid/grid.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/utils.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/maximums.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/country/country-selector.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/status-selector.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/landing-page/toolbar.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/lift-measurement.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/intents.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/wizard/footer/buttons.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/wizard/footer/footer.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/errors.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/page-layout.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/validate.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/validated/required-dropdown.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/country/country-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/date.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/date/start-date-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/date/date-picker-strings.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-methods.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-input.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-tag.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-display.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-selector.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-textarea.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/keyword/keyword-textarea-validation.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/measurement-type-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/search-lift/search-customer-id.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/skeleton/card-content-skeleton.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/search-lift/search-lift-loading.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/search-lift/search-lift.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/api-save-error-notification.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/uet-tag/uet-tag-selector-utils.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/uet-tag/uet-tag-selector.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/visit-conversion-lift/visit-conversion-methods.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/visit-conversion-lift/visit-conversion-input.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/visit-conversion-lift/visit-conversion-lift-loading.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/visit-conversion-lift/visit-conversion-lift-not-allowed.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/visit-conversion-lift/visit-conversion-lift.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/experiment-name-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/impression-threshold-message.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/selected-campaigns-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/configure-study-step.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/conversion.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/configure-study-step-repository.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/uet.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/campaign.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/selected-campaigns-grid-columns.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/constants/budget-format-options.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-grid/select-campaigns-grid.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-grid/select-campaigns-toolbar.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/summary/campaign-name-tag.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/summary/selected-campaigns-accordion.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/summary/study-summary-drawer.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-grid/select-campaigns-footer.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-grid/select-campaigns-grid-data-source.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/lift-experiment-campaigns.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-step.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/wizard/config.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/common/components/select-campaigns-step-repository.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/keywords.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/wizard/templates.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/wizard/wizard.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/lift-measurement-form.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/lift-measurement-create.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/lift-measurement-edit.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/fetch/result.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/confidence-levels.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/overview-table.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/positive-performing-audiences-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/audience-overview-section.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/campaign-overview-section.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/performance-card/styles.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/performance-card/lift.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/performance-card/confidence-level.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/performance-card/treatment-control.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/performance-card/performance-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/experiment-overview-section.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/page-header.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/results/study-summary-card.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/utils/download.js","../../../node_modules/@bingads-webui-campaign-react/lift-measurement-pages/src/lift-measurement-results.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\r\nimport { uiblockerStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const useCampaignNameTagStyles = makeStyles({\r\n  button: {\r\n    textAlign: 'left',\r\n  },\r\n});\r\n\r\nexport const useFilterDropdownStyles = makeStyles({\r\n  root: {\r\n    maxWidth: '250px',\r\n  },\r\n  truncatedText: {\r\n    overflowX: 'hidden',\r\n    textOverflow: 'ellipsis',\r\n    whiteSpace: 'nowrap',\r\n  },\r\n});\r\n\r\nexport const useKeywordInputStyles = makeStyles({\r\n  textarea: {\r\n    width: '100%',\r\n    height: '120px',\r\n  },\r\n  textareaContainer: {\r\n    paddingLeft: '36px',\r\n    width: '100%',\r\n  },\r\n});\r\n\r\nexport const useMeasurementTypeSelectorStyles = makeStyles({\r\n  dropdownContainer: {\r\n    paddingLeft: '36px',\r\n    width: '100%',\r\n  },\r\n  dropdown: {\r\n    width: '100%',\r\n  },\r\n  truncatedText: {\r\n    overflowX: 'hidden',\r\n    textOverflow: 'ellipsis',\r\n    whiteSpace: 'nowrap',\r\n  },\r\n});\r\n\r\nexport const useRadioChildControlStyles = makeStyles({\r\n  container: {\r\n    paddingLeft: '36px',\r\n    width: '100%',\r\n  },\r\n  warning: {\r\n    marginTop: '10px',\r\n  },\r\n});\r\n\r\nexport const useSearchCustomerIdStyles = makeStyles({\r\n  input: {\r\n    width: '100%',\r\n  },\r\n});\r\n\r\nexport const useSelectCampaignGridStyles = makeStyles({\r\n  dataGridRow: {\r\n    opacity: '1',\r\n  },\r\n  dataGridRowDisabled: {\r\n    opacity: '0.5',\r\n  },\r\n  selectCampaignTableCell: {\r\n    alignItems: 'center',\r\n    display: 'flex',\r\n  },\r\n  spinner: {\r\n    'min-height': '50px',\r\n  },\r\n});\r\n\r\nexport const useTagsListStyles = makeStyles({\r\n  root: {\r\n    paddingBottom: '10px',\r\n  },\r\n  tagsList: {\r\n    columnGap: '2px',\r\n    display: 'flex',\r\n    flexWrap: 'wrap',\r\n    rowGap: '2px',\r\n  },\r\n  tagsToolbar: {\r\n    alignItems: 'center',\r\n    display: 'flex',\r\n    justifyContent: 'space-between',\r\n  },\r\n});\r\n\r\nexport const getUIBlockerStyle = () => ({\r\n  '@global': uiblockerStyle({ palette: {} }),\r\n});\r\n\r\nexport const noDataStyles = palette => ({\r\n  color: palette.neutralSecondary,\r\n  fontSize: '26px',\r\n  paddingLeft: '32px',\r\n});\r\n","import React, { useCallback, useContext } from 'react';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Button,\r\n  Caption1,\r\n  Divider,\r\n  makeStyles,\r\n  Select,\r\n  useId,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  ArrowLeftRegular,\r\n  ArrowRightRegular,\r\n} from '@fluentui/react-icons';\r\n\r\nconst useStyles = makeStyles({\r\n  root: {\r\n    alignItems: 'center',\r\n    columnGap: '15px',\r\n    display: 'flex',\r\n    flexDirection: 'row',\r\n    justifyContent: 'space-between',\r\n  },\r\n  pageNumber: {\r\n    marginRight: '4px',\r\n    maxWidth: '32px',\r\n  },\r\n});\r\n\r\nconst pageSizeOptions = [\r\n  10,\r\n  25,\r\n  50,\r\n];\r\n\r\nexport const Paginator = () => {\r\n  const i18n = useContext(I18nContext);\r\n  const styles = useStyles();\r\n\r\n  const { dispatch, state } = useContext(GridContext);\r\n  const { pageNumber, pageSize } = state.pagination;\r\n\r\n  const pageSizeId = useId();\r\n  const pageSizeLabel = i18n.getString(_TL_('Rows per page:'));\r\n  const pageCount = Math.ceil(state.totalCount / pageSize);\r\n  const pageCountSeparator = i18n.getString(_TL_('of'));\r\n\r\n  const onSelectPageSize = useCallback((e, { value }) => {\r\n    dispatch({\r\n      type: 'UPDATE_PAGINATION',\r\n      payload: {\r\n        pageNumber: 1,\r\n        pageSize: Number(value),\r\n      },\r\n    });\r\n  }, [dispatch]);\r\n\r\n  const onDecreasePageNumber = useCallback(() => {\r\n    if (pageNumber > 1) {\r\n      dispatch({\r\n        type: 'UPDATE_PAGINATION',\r\n        payload: {\r\n          ...state.pagination,\r\n          pageNumber: pageNumber - 1,\r\n        },\r\n      });\r\n    }\r\n  }, [dispatch, state.pagination, pageNumber]);\r\n\r\n  const onIncreasePageNumber = useCallback(() => {\r\n    dispatch({\r\n      type: 'UPDATE_PAGINATION',\r\n      payload: {\r\n        ...state.pagination,\r\n        pageNumber: pageNumber + 1,\r\n      },\r\n    });\r\n  }, [dispatch, state.pagination, pageNumber]);\r\n\r\n  return (\r\n    <div className={styles.root}>\r\n      <Caption1>{pageSizeLabel}</Caption1>\r\n      <Select\r\n        appearance=\"outline\"\r\n        id={pageSizeId}\r\n        onChange={onSelectPageSize}\r\n        size=\"small\"\r\n        value={pageSize}\r\n      >\r\n        {pageSizeOptions.map(pageSizeOption => (\r\n          <option key={pageSizeOption}>{pageSizeOption}</option>\r\n        ))}\r\n      </Select>\r\n      <Divider vertical />\r\n      <Button\r\n        appearance=\"subtle\"\r\n        disabled={pageNumber === 1}\r\n        icon={<ArrowLeftRegular />}\r\n        onClick={onDecreasePageNumber}\r\n        size=\"small\"\r\n      />\r\n      <Caption1>{`${pageNumber} ${pageCountSeparator} ${pageCount}`}</Caption1>\r\n      <Button\r\n        appearance=\"subtle\"\r\n        disabled={pageNumber === pageCount}\r\n        icon={<ArrowRightRegular />}\r\n        onClick={onIncreasePageNumber}\r\n        size=\"small\"\r\n      />\r\n    </div>\r\n  );\r\n};\r\n","import { getTheme } from '@fluentui/react';\r\nimport {\r\n  Caption1,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport React, { useContext } from 'react';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Paginator } from '../common/paginator';\r\nimport { noDataStyles } from '../common/styles';\r\n\r\nconst { palette } = getTheme();\r\nconst useStyles = makeStyles({\r\n  noData: noDataStyles(palette),\r\n});\r\n\r\nexport const LandingPageFooter = () => {\r\n  const i18n = useContext(I18nContext);\r\n  const styles = useStyles();\r\n  const { state } = useContext(GridContext);\r\n\r\n  return (\r\n    <>\r\n      {state.items.length > 0 ?\r\n        <>\r\n          <Caption1>{`${state.totalCount} ${i18n.getString(_TL_('experiments'))}`}</Caption1>\r\n          <Paginator />\r\n        </> :\r\n        <div className={styles.noData}>\r\n          {i18n.getString(_TL_('There are no lift studies.'))}\r\n        </div>\r\n      }\r\n    </>\r\n  );\r\n};\r\n","export const countries = {\r\n  AD: {\r\n    code: 'AD',\r\n    name: _TL_('Andorra'),\r\n  },\r\n  AE: {\r\n    code: 'AE',\r\n    name: _TL_('United Arab Emirates'),\r\n  },\r\n  AG: {\r\n    code: 'AG',\r\n    name: _TL_('Antigua and Barbuda'),\r\n  },\r\n  AI: {\r\n    code: 'AI',\r\n    name: _TL_('Anguilla'),\r\n  },\r\n  AL: {\r\n    code: 'AL',\r\n    name: _TL_('Albania'),\r\n  },\r\n  AM: {\r\n    code: 'AM',\r\n    name: _TL_('Armenia'),\r\n  },\r\n  AR: {\r\n    code: 'AR',\r\n    name: _TL_('Argentina'),\r\n  },\r\n  AS: {\r\n    code: 'AS',\r\n    name: _TL_('American Samoa'),\r\n  },\r\n  AT: {\r\n    code: 'AT',\r\n    name: _TL_('Austria'),\r\n  },\r\n  AU: {\r\n    code: 'AU',\r\n    name: _TL_('Australia'),\r\n  },\r\n  AW: {\r\n    code: 'AW',\r\n    name: _TL_('Aruba'),\r\n  },\r\n  AZ: {\r\n    code: 'AZ',\r\n    name: _TL_('Azerbaijan'),\r\n  },\r\n  BA: {\r\n    code: 'BA',\r\n    name: _TL_('Bosnia and Herzegovina'),\r\n  },\r\n  BB: {\r\n    code: 'BB',\r\n    name: _TL_('Barbados'),\r\n  },\r\n  BD: {\r\n    code: 'BD',\r\n    name: _TL_('Bangladesh'),\r\n  },\r\n  BE: {\r\n    code: 'BE',\r\n    name: _TL_('Belgium'),\r\n  },\r\n  BF: {\r\n    code: 'BF',\r\n    name: _TL_('Burkina Faso'),\r\n  },\r\n  BG: {\r\n    code: 'BG',\r\n    name: _TL_('Bulgaria'),\r\n  },\r\n  BH: {\r\n    code: 'BH',\r\n    name: _TL_('Bahrain'),\r\n  },\r\n  BJ: {\r\n    code: 'BJ',\r\n    name: _TL_('Benin'),\r\n  },\r\n  BM: {\r\n    code: 'BM',\r\n    name: _TL_('Bermuda'),\r\n  },\r\n  BN: {\r\n    code: 'BN',\r\n    name: _TL_('Brunei'),\r\n  },\r\n  BO: {\r\n    code: 'BO',\r\n    name: _TL_('Bolivia'),\r\n  },\r\n  BR: {\r\n    code: 'BR',\r\n    name: _TL_('Brazil'),\r\n  },\r\n  BS: {\r\n    code: 'BS',\r\n    name: _TL_('Bahamas, The'),\r\n  },\r\n  BW: {\r\n    code: 'BW',\r\n    name: _TL_('Botswana'),\r\n  },\r\n  BZ: {\r\n    code: 'BZ',\r\n    name: _TL_('Belize'),\r\n  },\r\n  CA: {\r\n    code: 'CA',\r\n    name: _TL_('Canada'),\r\n  },\r\n  CC: {\r\n    code: 'CC',\r\n    name: _TL_('Cocos (Keeling) Islands'),\r\n  },\r\n  CD: {\r\n    code: 'CD',\r\n    name: _TL_('Congo (DRC)'),\r\n  },\r\n  CF: {\r\n    code: 'CF',\r\n    name: _TL_('Central African Republic'),\r\n  },\r\n  CG: {\r\n    code: 'CG',\r\n    name: _TL_('Congo'),\r\n  },\r\n  CH: {\r\n    code: 'CH',\r\n    name: _TL_('Switzerland'),\r\n  },\r\n  CI: {\r\n    code: 'CI',\r\n    name: _TL_(\"Côte d'Ivoire\"),\r\n  },\r\n  CK: {\r\n    code: 'CK',\r\n    name: _TL_('Cook Islands'),\r\n  },\r\n  CL: {\r\n    code: 'CL',\r\n    name: _TL_('Chile'),\r\n  },\r\n  CM: {\r\n    code: 'CM',\r\n    name: _TL_('Cameroon'),\r\n  },\r\n  CO: {\r\n    code: 'CO',\r\n    name: _TL_('Colombia'),\r\n  },\r\n  CR: {\r\n    code: 'CR',\r\n    name: _TL_('Costa Rica'),\r\n  },\r\n  CX: {\r\n    code: 'CX',\r\n    name: _TL_('Christmas Island'),\r\n  },\r\n  CY: {\r\n    code: 'CY',\r\n    name: _TL_('Cyprus'),\r\n  },\r\n  CZ: {\r\n    code: 'CZ',\r\n    name: _TL_('Czechia'),\r\n  },\r\n  DE: {\r\n    code: 'DE',\r\n    name: _TL_('Germany'),\r\n  },\r\n  DJ: {\r\n    code: 'DJ',\r\n    name: _TL_('Djibouti'),\r\n  },\r\n  DK: {\r\n    code: 'DK',\r\n    name: _TL_('Denmark'),\r\n  },\r\n  DM: {\r\n    code: 'DM',\r\n    name: _TL_('Dominica'),\r\n  },\r\n  DO: {\r\n    code: 'DO',\r\n    name: _TL_('Dominican Republic'),\r\n  },\r\n  DZ: {\r\n    code: 'DZ',\r\n    name: _TL_('Algeria'),\r\n  },\r\n  EC: {\r\n    code: 'EC',\r\n    name: _TL_('Ecuador'),\r\n  },\r\n  EE: {\r\n    code: 'EE',\r\n    name: _TL_('Estonia'),\r\n  },\r\n  EG: {\r\n    code: 'EG',\r\n    name: _TL_('Egypt'),\r\n  },\r\n  ER: {\r\n    code: 'ER',\r\n    name: _TL_('Eritrea'),\r\n  },\r\n  ES: {\r\n    code: 'ES',\r\n    name: _TL_('Spain'),\r\n  },\r\n  ET: {\r\n    code: 'ET',\r\n    name: _TL_('Ethiopia'),\r\n  },\r\n  FI: {\r\n    code: 'FI',\r\n    name: _TL_('Finland'),\r\n  },\r\n  FJ: {\r\n    code: 'FJ',\r\n    name: _TL_('Fiji Islands'),\r\n  },\r\n  FO: {\r\n    code: 'FO',\r\n    name: _TL_('Faroe Islands'),\r\n  },\r\n  FR: {\r\n    code: 'FR',\r\n    name: _TL_('France'),\r\n  },\r\n  GA: {\r\n    code: 'GA',\r\n    name: _TL_('Gabon'),\r\n  },\r\n  GB: {\r\n    code: 'GB',\r\n    name: _TL_('United Kingdom'),\r\n  },\r\n  GD: {\r\n    code: 'GD',\r\n    name: _TL_('Grenada'),\r\n  },\r\n  GE: {\r\n    code: 'GE',\r\n    name: _TL_('Georgia'),\r\n  },\r\n  GF: {\r\n    code: 'GF',\r\n    name: _TL_('French Guiana'),\r\n  },\r\n  GI: {\r\n    code: 'GI',\r\n    name: _TL_('Gibraltar'),\r\n  },\r\n  GL: {\r\n    code: 'GL',\r\n    name: _TL_('Greenland'),\r\n  },\r\n  GM: {\r\n    code: 'GM',\r\n    name: _TL_('Gambia, The'),\r\n  },\r\n  GN: {\r\n    code: 'GN',\r\n    name: _TL_('Guinea'),\r\n  },\r\n  GP: {\r\n    code: 'GP',\r\n    name: _TL_('Guadeloupe'),\r\n  },\r\n  GR: {\r\n    code: 'GR',\r\n    name: _TL_('Greece'),\r\n  },\r\n  GT: {\r\n    code: 'GT',\r\n    name: _TL_('Guatemala'),\r\n  },\r\n  GU: {\r\n    code: 'GU',\r\n    name: _TL_('Guam'),\r\n  },\r\n  GW: {\r\n    code: 'GW',\r\n    name: _TL_('Guinea-Bissau'),\r\n  },\r\n  GY: {\r\n    code: 'GY',\r\n    name: _TL_('Guyana'),\r\n  },\r\n  HK: {\r\n    code: 'HK',\r\n    name: _TL_('Hong Kong SAR'),\r\n  },\r\n  HN: {\r\n    code: 'HN',\r\n    name: _TL_('Honduras'),\r\n  },\r\n  HR: {\r\n    code: 'HR',\r\n    name: _TL_('Croatia'),\r\n  },\r\n  HT: {\r\n    code: 'HT',\r\n    name: _TL_('Haiti'),\r\n  },\r\n  HU: {\r\n    code: 'HU',\r\n    name: _TL_('Hungary'),\r\n  },\r\n  ID: {\r\n    code: 'ID',\r\n    name: _TL_('Indonesia'),\r\n  },\r\n  IE: {\r\n    code: 'IE',\r\n    name: _TL_('Ireland'),\r\n  },\r\n  IL: {\r\n    code: 'IL',\r\n    name: _TL_('Israel'),\r\n  },\r\n  IN: {\r\n    code: 'IN',\r\n    name: _TL_('India'),\r\n  },\r\n  IQ: {\r\n    code: 'IQ',\r\n    name: _TL_('Iraq'),\r\n  },\r\n  IS: {\r\n    code: 'IS',\r\n    name: _TL_('Iceland'),\r\n  },\r\n  IT: {\r\n    code: 'IT',\r\n    name: _TL_('Italy'),\r\n  },\r\n  JM: {\r\n    code: 'JM',\r\n    name: _TL_('Jamaica'),\r\n  },\r\n  JP: {\r\n    code: 'JP',\r\n    name: _TL_('Japan'),\r\n  },\r\n  KG: {\r\n    code: 'KG',\r\n    name: _TL_('Kyrgyzstan'),\r\n  },\r\n  KM: {\r\n    code: 'KM',\r\n    name: _TL_('Comoros'),\r\n  },\r\n  KN: {\r\n    code: 'KN',\r\n    name: _TL_('Saint Kitts and Nevis'),\r\n  },\r\n  KY: {\r\n    code: 'KY',\r\n    name: _TL_('Cayman Islands'),\r\n  },\r\n  LC: {\r\n    code: 'LC',\r\n    name: _TL_('Saint Lucia'),\r\n  },\r\n  LI: {\r\n    code: 'LI',\r\n    name: _TL_('Liechtenstein'),\r\n  },\r\n  LK: {\r\n    code: 'LK',\r\n    name: _TL_('Sri Lanka'),\r\n  },\r\n  LS: {\r\n    code: 'LS',\r\n    name: _TL_('Lesotho'),\r\n  },\r\n  LT: {\r\n    code: 'LT',\r\n    name: _TL_('Lithuania'),\r\n  },\r\n  LU: {\r\n    code: 'LU',\r\n    name: _TL_('Luxembourg'),\r\n  },\r\n  LV: {\r\n    code: 'LV',\r\n    name: _TL_('Latvia'),\r\n  },\r\n  LY: {\r\n    code: 'LY',\r\n    name: _TL_('Libya'),\r\n  },\r\n  MC: {\r\n    code: 'MC',\r\n    name: _TL_('Monaco'),\r\n  },\r\n  MD: {\r\n    code: 'MD',\r\n    name: _TL_('Moldova'),\r\n  },\r\n  ME: {\r\n    code: 'ME',\r\n    name: _TL_('Montenegro'),\r\n  },\r\n  MG: {\r\n    code: 'MG',\r\n    name: _TL_('Madagascar'),\r\n  },\r\n  MH: {\r\n    code: 'MH',\r\n    name: _TL_('Marshall Islands'),\r\n  },\r\n  MK: {\r\n    code: 'MK',\r\n    name: _TL_('Republic of North Macedonia'),\r\n  },\r\n  MN: {\r\n    code: 'MN',\r\n    name: _TL_('Mongolia'),\r\n  },\r\n  MO: {\r\n    code: 'MO',\r\n    name: _TL_('Macao SAR'),\r\n  },\r\n  MP: {\r\n    code: 'MP',\r\n    name: _TL_('Northern Mariana Islands'),\r\n  },\r\n  MQ: {\r\n    code: 'MQ',\r\n    name: _TL_('Martinique'),\r\n  },\r\n  MR: {\r\n    code: 'MR',\r\n    name: _TL_('Mauritania'),\r\n  },\r\n  MS: {\r\n    code: 'MS',\r\n    name: _TL_('Montserrat'),\r\n  },\r\n  MT: {\r\n    code: 'MT',\r\n    name: _TL_('Malta'),\r\n  },\r\n  MU: {\r\n    code: 'MU',\r\n    name: _TL_('Mauritius'),\r\n  },\r\n  MV: {\r\n    code: 'MV',\r\n    name: _TL_('Maldives'),\r\n  },\r\n  MW: {\r\n    code: 'MW',\r\n    name: _TL_('Malawi'),\r\n  },\r\n  MX: {\r\n    code: 'MX',\r\n    name: _TL_('Mexico'),\r\n  },\r\n  MY: {\r\n    code: 'MY',\r\n    name: _TL_('Malaysia'),\r\n  },\r\n  NA: {\r\n    code: 'NA',\r\n    name: _TL_('Namibia'),\r\n  },\r\n  NC: {\r\n    code: 'NC',\r\n    name: _TL_('New Caledonia'),\r\n  },\r\n  NE: {\r\n    code: 'NE',\r\n    name: _TL_('Niger'),\r\n  },\r\n  NF: {\r\n    code: 'NF',\r\n    name: _TL_('Norfolk Island'),\r\n  },\r\n  NG: {\r\n    code: 'NG',\r\n    name: _TL_('Nigeria'),\r\n  },\r\n  NL: {\r\n    code: 'NL',\r\n    name: _TL_('Netherlands'),\r\n  },\r\n  NO: {\r\n    code: 'NO',\r\n    name: _TL_('Norway'),\r\n  },\r\n  NP: {\r\n    code: 'NP',\r\n    name: _TL_('Nepal'),\r\n  },\r\n  NR: {\r\n    code: 'NR',\r\n    name: _TL_('Nauru'),\r\n  },\r\n  NU: {\r\n    code: 'NU',\r\n    name: _TL_('Niue'),\r\n  },\r\n  NZ: {\r\n    code: 'NZ',\r\n    name: _TL_('New Zealand'),\r\n  },\r\n  OM: {\r\n    code: 'OM',\r\n    name: _TL_('Oman'),\r\n  },\r\n  PA: {\r\n    code: 'PA',\r\n    name: _TL_('Panama'),\r\n  },\r\n  PE: {\r\n    code: 'PE',\r\n    name: _TL_('Peru'),\r\n  },\r\n  PF: {\r\n    code: 'PF',\r\n    name: _TL_('French Polynesia'),\r\n  },\r\n  PG: {\r\n    code: 'PG',\r\n    name: _TL_('Papua New Guinea'),\r\n  },\r\n  PH: {\r\n    code: 'PH',\r\n    name: _TL_('Philippines'),\r\n  },\r\n  PK: {\r\n    code: 'PK',\r\n    name: _TL_('Pakistan'),\r\n  },\r\n  PL: {\r\n    code: 'PL',\r\n    name: _TL_('Poland'),\r\n  },\r\n  PM: {\r\n    code: 'PM',\r\n    name: _TL_('Saint Pierre and Miquelon'),\r\n  },\r\n  PN: {\r\n    code: 'PN',\r\n    name: _TL_('Pitcairn Islands'),\r\n  },\r\n  PR: {\r\n    code: 'PR',\r\n    name: _TL_('Puerto Rico'),\r\n  },\r\n  PT: {\r\n    code: 'PT',\r\n    name: _TL_('Portugal'),\r\n  },\r\n  PW: {\r\n    code: 'PW',\r\n    name: _TL_('Palau'),\r\n  },\r\n  PY: {\r\n    code: 'PY',\r\n    name: _TL_('Paraguay'),\r\n  },\r\n  QA: {\r\n    code: 'QA',\r\n    name: _TL_('Qatar'),\r\n  },\r\n  RE: {\r\n    code: 'RE',\r\n    name: _TL_('Reunion'),\r\n  },\r\n  RO: {\r\n    code: 'RO',\r\n    name: _TL_('Romania'),\r\n  },\r\n  RS: {\r\n    code: 'RS',\r\n    name: _TL_('Serbia'),\r\n  },\r\n  RW: {\r\n    code: 'RW',\r\n    name: _TL_('Rwanda'),\r\n  },\r\n  SA: {\r\n    code: 'SA',\r\n    name: _TL_('Saudi Arabia'),\r\n  },\r\n  SC: {\r\n    code: 'SC',\r\n    name: _TL_('Seychelles'),\r\n  },\r\n  SE: {\r\n    code: 'SE',\r\n    name: _TL_('Sweden'),\r\n  },\r\n  SG: {\r\n    code: 'SG',\r\n    name: _TL_('Singapore'),\r\n  },\r\n  SI: {\r\n    code: 'SI',\r\n    name: _TL_('Slovenia'),\r\n  },\r\n  SK: {\r\n    code: 'SK',\r\n    name: _TL_('Slovakia'),\r\n  },\r\n  SL: {\r\n    code: 'SL',\r\n    name: _TL_('Sierra Leone'),\r\n  },\r\n  SM: {\r\n    code: 'SM',\r\n    name: _TL_('San Marino'),\r\n  },\r\n  SN: {\r\n    code: 'SN',\r\n    name: _TL_('Senegal'),\r\n  },\r\n  SO: {\r\n    code: 'SO',\r\n    name: _TL_('Somalia'),\r\n  },\r\n  SR: {\r\n    code: 'SR',\r\n    name: _TL_('Suriname'),\r\n  },\r\n  SV: {\r\n    code: 'SV',\r\n    name: _TL_('El Salvador'),\r\n  },\r\n  TC: {\r\n    code: 'TC',\r\n    name: _TL_('Turks and Caicos Islands'),\r\n  },\r\n  TG: {\r\n    code: 'TG',\r\n    name: _TL_('Togo'),\r\n  },\r\n  TH: {\r\n    code: 'TH',\r\n    name: _TL_('Thailand'),\r\n  },\r\n  TJ: {\r\n    code: 'TJ',\r\n    name: _TL_('Tajikistan'),\r\n  },\r\n  TK: {\r\n    code: 'TK',\r\n    name: _TL_('Tokelau'),\r\n  },\r\n  TN: {\r\n    code: 'TN',\r\n    name: _TL_('Tunisia'),\r\n  },\r\n  TO: {\r\n    code: 'TO',\r\n    name: _TL_('Tonga'),\r\n  },\r\n  TR: {\r\n    code: 'TR',\r\n    name: _TL_('Turkey'),\r\n  },\r\n  TT: {\r\n    code: 'TT',\r\n    name: _TL_('Trinidad and Tobago'),\r\n  },\r\n  TV: {\r\n    code: 'TV',\r\n    name: _TL_('Tuvalu'),\r\n  },\r\n  TW: {\r\n    code: 'TW',\r\n    name: _TL_('Taiwan'),\r\n  },\r\n  TZ: {\r\n    code: 'TZ',\r\n    name: _TL_('Tanzania'),\r\n  },\r\n  UG: {\r\n    code: 'UG',\r\n    name: _TL_('Uganda'),\r\n  },\r\n  US: {\r\n    code: 'US',\r\n    name: _TL_('United States'),\r\n  },\r\n  UY: {\r\n    code: 'UY',\r\n    name: _TL_('Uruguay'),\r\n  },\r\n  VA: {\r\n    code: 'VA',\r\n    name: _TL_('Holy City (the Vatican)'),\r\n  },\r\n  VC: {\r\n    code: 'VC',\r\n    name: _TL_('Saint Vincent and the Grenadines'),\r\n  },\r\n  VE: {\r\n    code: 'VE',\r\n    name: _TL_('Venezuela'),\r\n  },\r\n  VG: {\r\n    code: 'VG',\r\n    name: _TL_('Virgin Islands, British'),\r\n  },\r\n  VI: {\r\n    code: 'VI',\r\n    name: _TL_('Virgin Islands, U.S.'),\r\n  },\r\n  VN: {\r\n    code: 'VN',\r\n    name: _TL_('Vietnam'),\r\n  },\r\n  VU: {\r\n    code: 'VU',\r\n    name: _TL_('Vanuatu'),\r\n  },\r\n  WF: {\r\n    code: 'WF',\r\n    name: _TL_('Wallis and Futuna'),\r\n  },\r\n  WS: {\r\n    code: 'WS',\r\n    name: _TL_('Samoa'),\r\n  },\r\n  YE: {\r\n    code: 'YE',\r\n    name: _TL_('Yemen'),\r\n  },\r\n  YT: {\r\n    code: 'YT',\r\n    name: _TL_('Mayotte'),\r\n  },\r\n  ZA: {\r\n    code: 'ZA',\r\n    name: _TL_('South Africa'),\r\n  },\r\n  ZM: {\r\n    code: 'ZM',\r\n    name: _TL_('Zambia'),\r\n  },\r\n  ZW: {\r\n    code: 'ZW',\r\n    name: _TL_('Zimbabwe'),\r\n  },\r\n};\r\n","export const STATUS_SCHEDULED = 'Scheduled';\r\nexport const STATUS_RUNNING = 'Running';\r\nexport const STATUS_MEASURING = 'MeasuringResults';\r\nexport const STATUS_COMPLETED = 'Completed';\r\nexport const STATUS_FAILED = 'Failed';\r\nexport const STATUS_DELETED = 'Deleted';\r\n\r\nexport const statuses = {\r\n  [STATUS_MEASURING]: {\r\n    badgeColor: 'informative',\r\n    code: STATUS_MEASURING,\r\n    name: _TL_('Measuring results'),\r\n    infoTitle: _TL_(\"We're creating your experiment\"),\r\n    infoText: _TL_(\"Your experiment {{name}} has finished running and we're measuring results.\"),\r\n  },\r\n  [STATUS_RUNNING]: {\r\n    badgeColor: 'informative',\r\n    code: STATUS_RUNNING,\r\n    name: _TL_('Active'),\r\n    infoTitle: _TL_('Your experiment is active'),\r\n    infoText: _TL_(\"Your experiment {{name}} is currently running as expected. Once it's complete, you can view the results. Note: You can't edit active experiments.\"),\r\n  },\r\n  [STATUS_SCHEDULED]: {\r\n    badgeColor: 'important',\r\n    code: STATUS_SCHEDULED,\r\n    name: _TL_('Scheduled'),\r\n    infoTitle: _TL_('Your experiment has been scheduled'),\r\n    infoText: _TL_('Your experiment {{name}} is scheduled to run on {{startDate}}. Note: You can still edit this this experiment before it runs.'),\r\n  },\r\n  [STATUS_FAILED]: {\r\n    badgeColor: 'danger',\r\n    code: STATUS_FAILED,\r\n    name: _TL_('Experiment failed'),\r\n    infoTitle: _TL_('Your experiment has failed'),\r\n    infoText: _TL_(\"Your experiment {{name}} failed. Your campaign(s) didn't meet the eligibility requirements to run the experiment. Please review the eligibility requirements that appear in the Summary pane during experiment creation.\"),\r\n  },\r\n  [STATUS_COMPLETED]: {\r\n    badgeColor: 'success',\r\n    code: STATUS_COMPLETED,\r\n    name: _TL_('Completed'),\r\n    infoTitle: _TL_('Your experiment is complete'),\r\n    infoText: _TL_('Your experiment {{name}} has completed.'),\r\n  },\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Badge,\r\n  makeStyles,\r\n  Popover,\r\n  PopoverTrigger,\r\n  PopoverSurface,\r\n  Subtitle1,\r\n} from '@fluentui/react-components';\r\nimport { statuses } from './statuses';\r\n\r\nconst useStyles = makeStyles({\r\n  popoverContent: {\r\n    maxWidth: '500px',\r\n  },\r\n});\r\n\r\nexport const StatusBadge = ({\r\n  code,\r\n  infoTextData,\r\n  text,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const styles = useStyles();\r\n\r\n  return (\r\n    <Popover\r\n      positioning=\"after\"\r\n      withArrow\r\n    >\r\n      <PopoverTrigger disableButtonEnhancement>\r\n        <Badge\r\n          appearance=\"tint\"\r\n          color={statuses[code].badgeColor}\r\n        >\r\n          {i18n.getString(text)}\r\n        </Badge>\r\n      </PopoverTrigger>\r\n      <PopoverSurface tabIndex={-1}>\r\n        <div className={styles.popoverContent}>\r\n          <Subtitle1>{i18n.getString(statuses[code].infoTitle)}</Subtitle1>\r\n          <p>{i18n.getString(statuses[code].infoText, infoTextData)}</p>\r\n        </div>\r\n      </PopoverSurface>\r\n    </Popover>\r\n  );\r\n};\r\n\r\nStatusBadge.propTypes = {\r\n  code: PropTypes.oneOf(Object.keys(statuses)).isRequired,\r\n  infoTextData: PropTypes.shape({\r\n    name: PropTypes.string,\r\n    startDate: PropTypes.string,\r\n  }).isRequired,\r\n  text: PropTypes.string.isRequired,\r\n};\r\n","import * as React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n  Dialog,\r\n  DialogTrigger,\r\n  DialogSurface,\r\n  DialogTitle,\r\n  DialogBody,\r\n  DialogActions,\r\n  DialogContent,\r\n  Button,\r\n} from '@fluentui/react-components';\r\nimport { DeleteRegular } from '@fluentui/react-icons';\r\nimport { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  STATUS_COMPLETED,\r\n  STATUS_DELETED,\r\n  STATUS_FAILED,\r\n  STATUS_MEASURING,\r\n  STATUS_RUNNING,\r\n  STATUS_SCHEDULED,\r\n} from '../statuses';\r\n\r\nconst nonDeletableStatuses = [\r\n  STATUS_RUNNING,\r\n  STATUS_MEASURING,\r\n];\r\n\r\nexport const DeleteStudyDialog = ({ onDelete, name, status }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const description = i18n.getString(_TL_('Are you sure you want to delete the lift study, {{name}}?'), { name });\r\n  const deleteButtonLabel = i18n.getString(_TL_('Delete'));\r\n  const closeButtonLabel = i18n.getString(_TL_('Close'));\r\n  return (\r\n    <Dialog>\r\n      <DialogTrigger disableButtonEnhancement>\r\n        <Button\r\n          aria-label={i18n.getString(_TL_('Delete'))}\r\n          disabled={nonDeletableStatuses.includes(status)}\r\n          icon={<DeleteRegular />}\r\n          className=\"delete-experiment-modal\"\r\n        />\r\n      </DialogTrigger>\r\n      <DialogSurface>\r\n        <DialogBody>\r\n          <DialogTitle>{i18n.getString(_TL_('Delete Lift Study'))}</DialogTitle>\r\n          <DialogContent>\r\n            {description}\r\n          </DialogContent>\r\n          <DialogActions>\r\n            <DialogTrigger disableButtonEnhancement>\r\n              <Button appearance=\"secondary\" aria-label={closeButtonLabel}>{closeButtonLabel}</Button>\r\n            </DialogTrigger>\r\n            <Button\r\n              className=\"delete-experiment\"\r\n              appearance=\"primary\"\r\n              onClick={() => onDelete()}\r\n              aria-label={deleteButtonLabel}\r\n            >{deleteButtonLabel}\r\n            </Button>\r\n          </DialogActions>\r\n        </DialogBody>\r\n      </DialogSurface>\r\n    </Dialog>\r\n  );\r\n};\r\n\r\nDeleteStudyDialog.propTypes = {\r\n  onDelete: PropTypes.func.isRequired,\r\n  name: PropTypes.string.isRequired,\r\n  status: PropTypes.oneOf([\r\n    STATUS_COMPLETED,\r\n    STATUS_DELETED,\r\n    STATUS_FAILED,\r\n    STATUS_MEASURING,\r\n    STATUS_RUNNING,\r\n    STATUS_SCHEDULED,\r\n  ]).isRequired,\r\n};\r\n","import React from 'react';\r\nimport {\r\n  Button,\r\n  createTableColumn,\r\n  TableCellLayout,\r\n  Text,\r\n  Tooltip,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  EditRegular,\r\n} from '@fluentui/react-icons';\r\n// import { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { countries } from '../../common/countries';\r\nimport { StatusBadge } from '../status-badge';\r\nimport { DeleteStudyDialog } from './delete-study-dialog';\r\nimport {\r\n  statuses,\r\n  STATUS_COMPLETED,\r\n  STATUS_SCHEDULED,\r\n} from '../statuses';\r\n\r\n/*\r\nconst getHelpButton = (headerName, topic) => {\r\n  const stopPropagation = (e) => { e.stopPropagation(); };\r\n\r\n  return (\r\n    // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\r\n    <span onClick={stopPropagation} onKeyDown={stopPropagation}>\r\n      <HelpButton\r\n        aria-label={headerName}\r\n        topic={topic}\r\n      />\r\n    </span>\r\n  );\r\n};\r\n\r\nconst getHeaderCell = (i18n, name, topic) => {\r\n  const headerName = i18n.getString(_TL_('{{name}}'), { name });\r\n  return (\r\n    <> {headerName} {getHelpButton(headerName, topic)} </>\r\n  );\r\n};\r\n*/\r\n\r\nconst getCountryName = ({ country, i18n }) => i18n.getString(countries[country].name);\r\n\r\nexport const getColumns = ({\r\n  i18n,\r\n  onClickDelete,\r\n  onClickEdit,\r\n  onClickName,\r\n}) => [\r\n  createTableColumn({\r\n    columnId: 'Name',\r\n    compare: (a, b) => a.Name.localeCompare(b.Name),\r\n    renderCell: (item) => {\r\n      const experimentName = item.Status === STATUS_COMPLETED\r\n        ? (\r\n          <Text\r\n            onClick={() => onClickName({\r\n              id: item.Id,\r\n              name: item.Name,\r\n            })}\r\n            style={{ cursor: 'pointer' }}\r\n            underline\r\n          >\r\n            {item.Name}\r\n          </Text>\r\n        )\r\n        : item.Name;\r\n      const instructions = i18n.getString(_TL_('Click to view the results for experiment \"{{name}}\".'), {\r\n        name: item.Name,\r\n      });\r\n\r\n      return (\r\n        <Tooltip\r\n          content={item.Status === STATUS_COMPLETED ? instructions : item.Name}\r\n          relationship=\"description\"\r\n          withArrow\r\n        >\r\n          <TableCellLayout\r\n            className=\"experiment-name\"\r\n            truncate\r\n          >\r\n            {experimentName}\r\n          </TableCellLayout>\r\n        </Tooltip>\r\n      );\r\n    },\r\n    // renderHeaderCell: () => getHeaderCell(i18n, 'Experiment name', 'pop_BA_Experiments_Name'),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Experiment name')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'Status',\r\n    renderCell: (item) => {\r\n      const infoTextData = { name: item.Name };\r\n\r\n      if (item.Status === STATUS_SCHEDULED) {\r\n        infoTextData.startDate = item.StartDate;\r\n      }\r\n\r\n      return (\r\n        <TableCellLayout>\r\n          <StatusBadge\r\n            code={item.Status}\r\n            infoTextData={infoTextData}\r\n            text={statuses[item.Status].name}\r\n          />\r\n        </TableCellLayout>\r\n      );\r\n    },\r\n    // renderHeaderCell: () => getHeaderCell(i18n, 'Status', 'pop_BA_Experiments_Status'),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Status')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'Campaigns',\r\n    renderCell: (item) => {\r\n      const campaignNames = item.Campaigns.map(campaign => campaign.Name);\r\n      const campaignNamesString = campaignNames.join(i18n.getString(_TL_(', ')));\r\n      return (\r\n        <Tooltip\r\n          content={campaignNamesString}\r\n          relationship=\"description\"\r\n          withArrow\r\n        >\r\n          <TableCellLayout truncate>\r\n            {campaignNamesString}\r\n          </TableCellLayout>\r\n        </Tooltip>\r\n      );\r\n    },\r\n    // renderHeaderCell: () => getHeaderCell(i18n, 'Campaigns', 'pop_BA_Experiments_Campaigns'),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Campaigns')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'dates',\r\n    compare: (a, b) => a.StartDate.localeCompare(b.StartDate),\r\n    renderCell: (item) => {\r\n      const dateRangeString = `${i18n.formatDate(new Date(item.StartDate))} - ${i18n.formatDate(new Date(item.EndDate))}`;\r\n      return (\r\n        <Tooltip\r\n          content={dateRangeString}\r\n          relationship=\"description\"\r\n          withArrow\r\n        >\r\n          <TableCellLayout truncate>\r\n            {dateRangeString}\r\n          </TableCellLayout>\r\n        </Tooltip>\r\n      );\r\n    },\r\n    // renderHeaderCell: () => getHeaderCell(i18n, 'Experiment dates', 'pop_BA_Experiments_Dates'),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Experiment dates')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'Country',\r\n    compare: (a, b) => getCountryName({ country: a.Country, i18n }).localeCompare(getCountryName({ country: b.Country, i18n })),\r\n    renderCell: (item) => {\r\n      const countryString = getCountryName({ country: item.Country, i18n });\r\n      return (\r\n        <Tooltip\r\n          content={countryString}\r\n          relationship=\"description\"\r\n          withArrow\r\n        >\r\n          <TableCellLayout truncate>\r\n            {countryString}\r\n          </TableCellLayout>\r\n        </Tooltip>\r\n      );\r\n    },\r\n    // renderHeaderCell: () => getHeaderCell(i18n, 'Country', 'pop_BA_Experiments_Country'),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Country')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'actions',\r\n    renderCell: item => (\r\n      <TableCellLayout>\r\n        <Button\r\n          className=\"edit-experiment\"\r\n          aria-label={i18n.getString(_TL_('Edit'))}\r\n          disabled={item.Status !== STATUS_SCHEDULED}\r\n          icon={<EditRegular />}\r\n          onClick={() => {\r\n            onClickEdit(item.Id);\r\n          }}\r\n        />\r\n        <DeleteStudyDialog\r\n          onDelete={() => onClickDelete(item.Id)}\r\n          name={item.Name}\r\n          status={item.Status}\r\n        />\r\n      </TableCellLayout>\r\n    ),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Actions')),\r\n  }),\r\n];\r\n\r\nexport const getCellFocusMode = (columnId) => {\r\n  if (columnId === 'status' || columnId === 'campaigns') {\r\n    return 'none';\r\n  }\r\n\r\n  if (columnId === 'actions') {\r\n    return 'group';\r\n  }\r\n\r\n  return 'cell';\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const fetchCampaignsByIdEDM = ({ cid, aid }, campaignIds) => {\r\n  const formattedCampaignIds = campaignIds.join(', ');\r\n  return edmCampaign\r\n    .Customers.$withKey(cid)\r\n    .Accounts.$withKey(aid)\r\n    .Campaigns\r\n    .get({ filter: { where: `Id in [${formattedCampaignIds}]` } })\r\n    .toPromise();\r\n};\r\n","export const EXPERIMENT_API_ERRORS = {\r\n  CampaignAssociationsLimitExceeded: _TL_('A maximum of 10 campaigns can be selected for a single lift study.'),\r\n  DuplicateEntity: _TL_('One or more of your keywords are duplicated.'),\r\n  DuplicateTagId: _TL_('One or more of your selected tags are duplicated.'),\r\n  EntityAlreadyExists: _TL_('This lift experiment name is already used under this account.'),\r\n  EntityLimitExceeded: _TL_('You have more than 20 keywords.'),\r\n  ExperimentStartDateInvalid: _TL_('The start date selected for the lift study is in the past.'),\r\n  ExperimentTimeperiodOverlapping: _TL_(\"You've already scheduled a lift measurement experiment to run during those dates. You can only run one experiment during a given time period. Please choose different dates.\"),\r\n  ExperimentTypeInvalid: _TL_('At least one measurement type needs to be selected for a lift study.'),\r\n  InvalidCountryCode: _TL_('The selected country is not supported for lift studies.'),\r\n  InvalidCustomerId: _TL_('The CID may not be associated with the business or client. Please confirm and enter the correct CID.'),\r\n  InvalidStatus: _TL_('Only active campaigns, which use audience targeting may be used for lift studies.'),\r\n  InvalidTagStatus: _TL_('One or more of your selected tags are not active.'),\r\n  KeywordIsBlank: _TL_('One or more of your keywords are blank.'),\r\n  KeywordTooLong: _TL_('One or more of your keywords is over the character limit of 100.'),\r\n  NameExceededMaxLen: _TL_('Lift study names must be less than 128 characters.'),\r\n  NotAllowedToDoCurrentOperation: _TL_('The status for this lift study can not be changed.'),\r\n  TagsBatchSizeExceesdLimit: _TL_('A maximum of 5 tags is allowed for a single lift study.'),\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { curlyTemplate } from '@bingads-webui/primitive-utilities';\r\nimport { EXPERIMENT_API_ERRORS } from '../common/constants/experiment-errors';\r\n\r\nexport const USE_SEARCH_MEASUREMENT = 1;\r\nexport const USE_VISIT_MEASUREMENT = 2;\r\nexport const USE_CONVERSION_MEASUREMENT = 4;\r\n\r\nexport const createMeasurementTypeEnum = ({\r\n  useConversionLift,\r\n  useSearchLift,\r\n  useVisitLift,\r\n}) => {\r\n  const x = useSearchLift ? USE_SEARCH_MEASUREMENT : 0;\r\n  const y = useVisitLift ? USE_VISIT_MEASUREMENT : 0;\r\n  const z = useConversionLift ? USE_CONVERSION_MEASUREMENT : 0;\r\n  return x + y + z;\r\n};\r\n\r\nexport const parseMeasurementTypeEnum = combinedEnum => ({\r\n  useConversionLift: combinedEnum.includes('Conversion'),\r\n  useSearchLift: combinedEnum.includes('Search'),\r\n  useVisitLift: combinedEnum.includes('Visit'),\r\n});\r\n\r\nexport const stitchFullCampaignsIntoExperiments = (associatedCampaigns, fetchedLiftExperiments) => {\r\n  const associatedCampaignsById = {};\r\n  associatedCampaigns.forEach((campaign) => {\r\n    associatedCampaignsById[campaign.Id] = campaign;\r\n  });\r\n  const formattedLiftExperiments = fetchedLiftExperiments.reduce((accum, liftExperiment) => {\r\n    const formattedCampaigns = liftExperiment.Campaigns.map(campaignId => associatedCampaignsById[campaignId]);\r\n    accum.push({\r\n      ...liftExperiment,\r\n      Campaigns: formattedCampaigns,\r\n    });\r\n    return accum;\r\n  }, []);\r\n  return formattedLiftExperiments;\r\n};\r\n\r\nexport const fetchExperiment = async ({ cid, aid, liftExperimentId }, { onSuccess, onFailure }) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperiments\r\n  .$withKey(liftExperimentId)\r\n  .get({\r\n    select: [\r\n      'Id',\r\n      'Name',\r\n      'Campaigns',\r\n      'Country',\r\n      'Keywords',\r\n      'MeasurementType',\r\n      'StartDate',\r\n      'SearchCustomerId',\r\n      'UETTags',\r\n    ],\r\n  })\r\n  .toPromise()\r\n  .then((response) => {\r\n    // This handles the case where a lift exp id param is included but is incorrect (the api returns a 204)\r\n    if (!response) {\r\n      throw new Error();\r\n    }\r\n    onSuccess(response);\r\n  })\r\n  .catch(() => onFailure(curlyTemplate(_TL_('Failed to fetch lift study: {{liftExperimentId}}'))({ liftExperimentId })));\r\n\r\nexport const fetchExperiments = ({ cid, aid }, { query, onSuccess, onFailure }) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperiments\r\n  .get(query)\r\n  .toPromise()\r\n  .then((response) => {\r\n    onSuccess(response.value);\r\n  })\r\n  .catch(() => onFailure(_TL_('Failed to fetch lift studies')));\r\n\r\nexport const saveExperiment = ({ cid, aid }, { payload, onSuccess, onFailure }) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperiments\r\n  .post(payload)\r\n  .toPromise()\r\n  .then((response) => {\r\n    onSuccess(response);\r\n    return { isAPISaveFailure: false };\r\n  })\r\n  .catch((response) => {\r\n    const apiErrorCode = response.body.value[0].Code;\r\n    const errorMessage = curlyTemplate(_TL_('Failed to create lift study: {{errorMessage}}'))({ errorMessage: EXPERIMENT_API_ERRORS[apiErrorCode] });\r\n    onFailure(errorMessage);\r\n    return {\r\n      isAPISaveFailure: true,\r\n      error: new Error(errorMessage),\r\n    };\r\n  });\r\n\r\n\r\nexport const updateExperiment = ({ cid, aid }, { payload, onSuccess, onFailure }) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperiments\r\n  .update(payload.Id, payload)\r\n  .then((response) => {\r\n    onSuccess(response);\r\n    return { isAPISaveFailure: false };\r\n  })\r\n  .catch((response) => {\r\n    const apiErrorCode = response.body.value[0].Code;\r\n    const errorMessage = curlyTemplate(_TL_('Failed to update lift study: {{liftExperimentId}}. {{errorMessage}}'))({ errorMessage: EXPERIMENT_API_ERRORS[apiErrorCode], liftExperimentId: payload.Id });\r\n    onFailure(errorMessage);\r\n    return {\r\n      isAPISaveFailure: true,\r\n      error: new Error(errorMessage),\r\n    };\r\n  });\r\n\r\nexport const deleteExperiment = ({ cid, aid }, liftExperimentId, onSuccess, onFailure) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperiments\r\n  .$withKey(liftExperimentId)\r\n  .destroyAsPromise()\r\n  .then(() => {\r\n    onSuccess(liftExperimentId);\r\n  })\r\n  .catch(() => {\r\n    onFailure(curlyTemplate(_TL_('Failed to delete lift study: {{liftExperimentId}}'))({ liftExperimentId }));\r\n  });\r\n","import $ from 'jquery';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useEffect } from 'react';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport {\r\n  DataGrid,\r\n  DataGridBody,\r\n  DataGridCell,\r\n  DataGridHeader,\r\n  DataGridHeaderCell,\r\n  DataGridRow,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  getCellFocusMode,\r\n  getColumns,\r\n} from './config';\r\nimport { fetchCampaignsByIdEDM } from '../../fetch/campaigns';\r\nimport { deleteExperiment, fetchExperiments, stitchFullCampaignsIntoExperiments } from '../../fetch/experiment';\r\n\r\nexport const LiftStudiesGrid = ({ onClickEdit, siteMap }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const { dispatch, state } = useContext(GridContext);\r\n  const { scope } = useContext(ScopeContext);\r\n\r\n  const onClickName = useCallback(({ id }) => {\r\n    const route = getRoutePathById(siteMap, 'lift-measurement-results');\r\n    scope.append({ liftExperimentId: id });\r\n    scope.save(route);\r\n  }, [scope, siteMap]);\r\n\r\n  const onFailure = useCallback((message) => {\r\n    const alertHelper = new AlertHelper({ i18n });\r\n    alertHelper.showError(message);\r\n  }, [i18n]);\r\n\r\n  const onDeleteFailure = useCallback((message) => {\r\n    setClarityTag({\r\n      IsDeleteLiftExperimentSuccessful: false,\r\n    });\r\n    const alertHelper = new AlertHelper({ i18n });\r\n    alertHelper.showError(message);\r\n  }, [i18n]);\r\n\r\n  const onDeleteSuccess = useCallback((liftExperimentIdToDelete) => {\r\n    const liftExperimentsWithDeletedRemoved = state.items.reduce((accum, liftExperiment) => {\r\n      if (liftExperimentIdToDelete !== liftExperiment.Id) {\r\n        accum.push(liftExperiment);\r\n      }\r\n      return accum;\r\n    }, []);\r\n    setClarityTag({\r\n      IsDeleteLiftExperimentSuccessful: true,\r\n    });\r\n    dispatch({ type: 'FINISH_LOAD_DATA', payload: { items: liftExperimentsWithDeletedRemoved, totalCount: state.totalCount - 1 } });\r\n  }, [dispatch, state.items, state.totalCount]);\r\n\r\n  const onClickDelete = useCallback((liftExperimentIdToDelete) => {\r\n    setClarityTag({\r\n      IsClickedDeleteLiftExperiment: true,\r\n    });\r\n    deleteExperiment(scope.values, liftExperimentIdToDelete, onDeleteSuccess, onDeleteFailure);\r\n  }, [onDeleteSuccess, onDeleteFailure, scope]);\r\n\r\n  const columns = getColumns({\r\n    i18n, onClickDelete, onClickEdit, onClickName,\r\n  });\r\n\r\n  const onFetchExperimentsSuccess = useCallback(async (fetchedLiftExperiments) => {\r\n    const associatedCampaignIds = fetchedLiftExperiments.reduce((accum, liftExperiment) => [...accum, liftExperiment.Campaigns], []);\r\n    if (associatedCampaignIds && associatedCampaignIds.length > 0) {\r\n      const campaignsResponse = await fetchCampaignsByIdEDM(scope.values, associatedCampaignIds)\r\n        .finally(withUiBlock($('.lift-measurement-wrapper'), i18n.getString(_TL_('Loading'))), [i18n]);\r\n      const formattedLiftExperiments = stitchFullCampaignsIntoExperiments(campaignsResponse.value, fetchedLiftExperiments);\r\n      dispatch({ type: 'FINISH_LOAD_DATA', payload: { items: formattedLiftExperiments, totalCount: formattedLiftExperiments.length } });\r\n    } else {\r\n      dispatch({ type: 'FINISH_LOAD_DATA', payload: { items: fetchedLiftExperiments, totalCount: fetchedLiftExperiments.length } });\r\n    }\r\n  }, [dispatch, i18n, scope.values]);\r\n\r\n  const getOrderBy = useCallback((column) => {\r\n    if (!column.fieldName || column.fieldName === 'Status' || column.fieldName === 'Campaigns' || column.fieldName === 'actions') {\r\n      return undefined;\r\n    } else if (column.fieldName === 'dates') {\r\n      return { StartDate: column.isSortDescending ? -1 : 1 };\r\n    }\r\n\r\n    return {\r\n      [column.fieldName]: column.isSortDescending ? -1 : 1,\r\n    };\r\n  }, []);\r\n\r\n  useEffect(() => {\r\n    fetchExperiments(scope.values, {\r\n      query: {\r\n        count: true,\r\n        top: state.pagination.pageSize,\r\n        skip: ((state.pagination.pageNumber - 1) * state.pagination.pageSize),\r\n        filter: { where: state.editableFilter },\r\n        orderby: getOrderBy(state.sortedColumn),\r\n      },\r\n      onSuccess: onFetchExperimentsSuccess,\r\n      onFailure,\r\n    });\r\n  }, [getOrderBy, onFailure, onFetchExperimentsSuccess, state.editableFilter, state.pagination, state.sortedColumn, scope.values]);\r\n\r\n  const onSortChange = useCallback((e, { sortColumn, sortDirection }) => {\r\n    setClarityTag({\r\n      IsLiftExperimentSortChanged: true,\r\n      LiftExperimentSortField: sortColumn,\r\n      LiftExperimentSortDirection: sortDirection,\r\n    });\r\n    dispatch({\r\n      type: 'UPDATE_SORTED_COLUMN',\r\n      payload: {\r\n        ...state.sortedColumn,\r\n        fieldName: sortColumn,\r\n        isSortDescending: sortDirection === 'descending',\r\n      },\r\n    });\r\n  }, [dispatch, state]);\r\n\r\n  return (\r\n    <>\r\n      <DataGrid\r\n        className=\"lift-measurement-experiments-grid\"\r\n        columns={columns}\r\n        getRowId={item => item.Id}\r\n        items={state.items}\r\n        onSortChange={onSortChange}\r\n        sortable\r\n      >\r\n        <DataGridHeader>\r\n          <DataGridRow>\r\n            {({ renderHeaderCell }) => (\r\n              <DataGridHeaderCell style={{ padding: '0 10px' }}>\r\n                  {renderHeaderCell()}\r\n              </DataGridHeaderCell>\r\n            )}\r\n          </DataGridRow>\r\n        </DataGridHeader>\r\n        <DataGridBody>\r\n          {({ item, rowId }) => (\r\n            <DataGridRow key={rowId}>\r\n              {({ renderCell, columnId }) => (\r\n                <DataGridCell focusMode={getCellFocusMode(columnId)}>\r\n                  {renderCell(item)}\r\n                </DataGridCell>\r\n              )}\r\n            </DataGridRow>\r\n          )}\r\n        </DataGridBody>\r\n      </DataGrid>\r\n    </>\r\n  );\r\n};\r\n\r\nLiftStudiesGrid.propTypes = {\r\n  onClickEdit: PropTypes.func.isRequired,\r\n  siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.string,\r\n  })).isRequired,\r\n};\r\n","import { maxKeywordCount } from './constants/maximums';\r\n\r\nexport const parseKeywordString = (keywordString) => {\r\n  const words = keywordString\r\n    .split(',')\r\n    .map(word => word.trim());\r\n  return words;\r\n};\r\n\r\nexport const sortByName = i18n => (a, b) => {\r\n  if (i18n.getString(a.name) < i18n.getString(b.name)) {\r\n    return -1;\r\n  }\r\n\r\n  if (i18n.getString(b.name) < i18n.getString(a.name)) {\r\n    return 1;\r\n  }\r\n\r\n  return 0;\r\n};\r\n\r\nexport const getUETTags = (wizardData) => {\r\n  if (wizardData.useVisitConversionLift && wizardData.useConversionLift && wizardData.useVisitLift) {\r\n    return wizardData.uetTags.both;\r\n  } else if (wizardData.useConversionLift) {\r\n    return wizardData.uetTags.conversion;\r\n  } else if (wizardData.useVisitLift) {\r\n    return wizardData.uetTags.visit;\r\n  }\r\n  return undefined;\r\n};\r\n\r\nexport const getKeywords = (wizardData) => {\r\n  if (!wizardData.keywordsMethod || !wizardData.useSearchLift) {\r\n    return undefined;\r\n  }\r\n  return wizardData.keywordsMethod === 'entry'\r\n    ? parseKeywordString(wizardData.typedKeywordString)\r\n        .filter(kw => kw.length > 0)\r\n        .slice(0, maxKeywordCount)\r\n    : wizardData.selectedKeywords.map(keywordId => wizardData.fetchedKeywords[keywordId].name);\r\n};\r\n","export const maxCampaignCount = 10; // maximum number of campaigns for a lift experiment\r\nexport const maxExperimentNameLength = 255; // maximum length of an experiment name\r\nexport const maxFetchedAdGroupsCount = 1000; // maximum number of AD Groups\r\nexport const maxFetchedAudienceCriterionCount = 1000; // maximum number of Audience Criterion\r\nexport const maxFetchedGoalsCount = 200; // maximum number of conversion goals to fetch\r\nexport const maxFetchedKeywordsCount = 200; // maximum number of keywords to fetch\r\nexport const maxFetchedTagsCount = 200; // maximum number of UET tags to fetch\r\nexport const maxKeywordCount = 20; // maximum number of keywords for a lift experiment\r\nexport const maxKeywordLength = 100; // maximum length of a keyword\r\nexport const maxSearchCid = 999999999; // maximum value for search CID\r\nexport const maxTagCount = 5; // maximum number of UET tags for a lift experiment\r\nexport const minSearchCid = 1; // minimum value for search CID\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Dropdown,\r\n  Option,\r\n} from '@fluentui/react-components';\r\nimport { countries } from '../../countries';\r\nimport { useFilterDropdownStyles } from '../../styles';\r\nimport { sortByName } from '../../utils';\r\n\r\nexport const getButtonText = ({\r\n  delimiter,\r\n  i18n,\r\n  placeholder,\r\n  selectedCountries,\r\n}) => {\r\n  if (selectedCountries.length === 0) {\r\n    return placeholder;\r\n  }\r\n  const formattedSelectionText = selectedCountries\r\n    .map(code => i18n.getString(countries[code].name))\r\n    .join(delimiter);\r\n  const countryText = selectedCountries.length > 1 ? i18n.getString(_TL_('Countries:')) : i18n.getString(_TL_('Country:'));\r\n  return `${countryText} ${formattedSelectionText}`;\r\n};\r\n\r\nexport const CountrySelector = ({\r\n  onSelect,\r\n  selectedCountries,\r\n}) => {\r\n  const styles = useFilterDropdownStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const placeholder = i18n.getString(_TL_('Countries: All'));\r\n  const dropdownLabel = i18n.getString(_TL_('Experiment country filter'));\r\n  const delimiter = i18n.getString(_TL_(', '));\r\n\r\n  const buttonText = useMemo(() => getButtonText({\r\n    delimiter,\r\n    i18n,\r\n    placeholder,\r\n    selectedCountries,\r\n  }), [delimiter, i18n, placeholder, selectedCountries]);\r\n\r\n  const countryKeyValues = useMemo(() => Object.values(countries).sort(sortByName(i18n)), [i18n]);\r\n\r\n  const onOptionSelect = useCallback((e, data) => {\r\n    onSelect(data.selectedOptions);\r\n  }, [onSelect]);\r\n\r\n  return (\r\n    <div className={styles.root}>\r\n      <Dropdown\r\n        className=\"country-selector\"\r\n        aria-label={dropdownLabel}\r\n        placeholder={placeholder}\r\n        button={<span className={styles.truncatedText}>{buttonText}</span>}\r\n        data-selectedOptions={selectedCountries.length ? selectedCountries : placeholder}\r\n        multiselect\r\n        onOptionSelect={onOptionSelect}\r\n        selectedOptions={selectedCountries}\r\n      >\r\n        {countryKeyValues.map(({ code, name }) => (\r\n          <Option\r\n            key={code}\r\n            value={code}\r\n            className={`country-selector-option-${code}`}\r\n          >\r\n            {i18n.getString(name)}\r\n          </Option>\r\n        ))}\r\n      </Dropdown>\r\n    </div>\r\n  );\r\n};\r\n\r\nCountrySelector.propTypes = {\r\n  onSelect: PropTypes.func.isRequired,\r\n  selectedCountries: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Dropdown,\r\n  Option,\r\n} from '@fluentui/react-components';\r\nimport { useFilterDropdownStyles } from '../common/styles';\r\nimport { statuses } from './statuses';\r\n\r\nexport const getButtonText = ({\r\n  delimiter,\r\n  i18n,\r\n  placeholder,\r\n  selectedStatuses,\r\n}) => {\r\n  if (selectedStatuses.length === 0) {\r\n    return placeholder;\r\n  }\r\n  const formattedSelectionText = selectedStatuses\r\n    .map(status => i18n.getString(statuses[status].name))\r\n    .join(delimiter);\r\n  const statusText = selectedStatuses.length > 1 ? i18n.getString(_TL_('Statuses:')) : i18n.getString(_TL_('Status:'));\r\n  return `${statusText} ${formattedSelectionText}`;\r\n};\r\n\r\nexport const StatusSelector = ({\r\n  onSelect,\r\n  selectedStatuses,\r\n}) => {\r\n  const styles = useFilterDropdownStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const placeholder = i18n.getString(_TL_('Statuses: All'));\r\n  const dropdownLabel = i18n.getString(_TL_('Experiment status filter'));\r\n  const delimiter = i18n.getString(_TL_(', '));\r\n\r\n  const buttonText = useMemo(() => getButtonText({\r\n    delimiter,\r\n    i18n,\r\n    placeholder,\r\n    selectedStatuses,\r\n  }), [delimiter, i18n, placeholder, selectedStatuses]);\r\n\r\n  const statusMap = useMemo(() => Object.values(statuses), []);\r\n\r\n  const onOptionSelect = useCallback((e, data) => {\r\n    onSelect(data.selectedOptions);\r\n  }, [onSelect]);\r\n\r\n\r\n  return (\r\n    <div className={styles.root}>\r\n      <Dropdown\r\n        className=\"status-selector\"\r\n        aria-label={dropdownLabel}\r\n        placeholder={placeholder}\r\n        button={<span className={styles.truncatedText}>{buttonText}</span>}\r\n        data-selectedOptions={selectedStatuses.length ? selectedStatuses : placeholder}\r\n        multiselect\r\n        onOptionSelect={onOptionSelect}\r\n        selectedOptions={selectedStatuses}\r\n      >\r\n        {statusMap.map(({ code, name }) => (\r\n          <Option\r\n            key={code}\r\n            value={code}\r\n            className={`status-selector-option-${name}`}\r\n          >\r\n            {i18n.getString(name)}\r\n          </Option>\r\n        ))}\r\n      </Dropdown>\r\n    </div>\r\n  );\r\n};\r\n\r\nStatusSelector.propTypes = {\r\n  onSelect: PropTypes.func.isRequired,\r\n  selectedStatuses: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport {\r\n  Button,\r\n  Input,\r\n  makeStyles,\r\n  mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  SearchRegular,\r\n} from '@fluentui/react-icons';\r\nimport {\r\n  Stack,\r\n} from '@fluentui/react/lib/Stack';\r\nimport { CountrySelector } from '../common/components/country/country-selector';\r\nimport { StatusSelector } from './status-selector';\r\n\r\nconst useStyles = makeStyles({\r\n  search: {\r\n    width: '300px',\r\n  },\r\n});\r\n\r\nconst debouncedEditableFilterDispatch = _.debounce((currentEditableFilterPayload, dispatch) => dispatch({ type: 'SET_EDITABLE_FILTER', payload: currentEditableFilterPayload }), 300);\r\n\r\nexport const Toolbar = ({ onClickCreate }) => {\r\n  const styles = useStyles();\r\n  const toolbarTokens = {\r\n    childrenGap: 12,\r\n  };\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const createButtonLabel = i18n.getString(_TL_('Create'));\r\n  const searchBoxPlaceholder = i18n.getString(_TL_('Search by experiment name'));\r\n  const searchBoxLabel = i18n.getString(_TL_('Experiment name search'));\r\n\r\n  const { dispatch } = useContext(GridContext);\r\n\r\n  const [countryFilters, setCountryFilters] = useState([]);\r\n  const [searchFilter, setSearchFilter] = useState('');\r\n  const [statusFilters, setStatusFilters] = useState([]);\r\n\r\n  const onChangeCountries = useCallback((countries) => {\r\n    setClarityTag({\r\n      IsSelectedLiftExperimentCountryFilter: true,\r\n    });\r\n    setCountryFilters([...countries]);\r\n  }, []);\r\n\r\n  const onChangeSearchInput = useCallback((_e, { value }) => {\r\n    setClarityTag({\r\n      IsChangedLiftExperimentSearchFilter: true,\r\n    });\r\n    setSearchFilter(value);\r\n  }, []);\r\n\r\n  const onChangeStatuses = useCallback((statuses) => {\r\n    setClarityTag({\r\n      IsSelectedLiftExperimentStatusFilter: true,\r\n    });\r\n    setStatusFilters([...statuses]);\r\n  }, []);\r\n\r\n  const fetchExperimentsFilter = useMemo(() => {\r\n    const formattedCountryFilters = countryFilters.map(country => `'${country}'`).join(', ');\r\n    const formattedStatusFilters = statusFilters.map(country => `'${country}'`).join(', ');\r\n    return [\r\n      searchFilter.length ? `contains(tolower(Name), '${searchFilter.toLowerCase()}')` : null,\r\n      countryFilters.length ? `Country in [${formattedCountryFilters}]` : null,\r\n      statusFilters.length ? `Status in [${formattedStatusFilters}]` : null,\r\n    ].filter(fragment => fragment).join(' and ');\r\n  }, [countryFilters, searchFilter, statusFilters]);\r\n\r\n  useEffect(() => {\r\n    debouncedEditableFilterDispatch(fetchExperimentsFilter, dispatch);\r\n  }, [fetchExperimentsFilter, dispatch]);\r\n\r\n  return (\r\n    <Stack horizontal horizontalAlign=\"space-between\">\r\n      <Stack horizontal tokens={toolbarTokens}>\r\n        <Button className=\"create-experiment\" appearance=\"primary\" onClick={onClickCreate}>{createButtonLabel}</Button>\r\n        <StatusSelector\r\n          onSelect={onChangeStatuses}\r\n          selectedStatuses={statusFilters}\r\n        />\r\n        <CountrySelector\r\n          onSelect={onChangeCountries}\r\n          selectedCountries={countryFilters}\r\n        />\r\n      </Stack>\r\n      <Input\r\n        className={mergeClasses('search-filter', styles.search)}\r\n        aria-label={searchBoxLabel}\r\n        contentBefore={<SearchRegular />}\r\n        onChange={onChangeSearchInput}\r\n        placeholder={searchBoxPlaceholder}\r\n        value={searchFilter}\r\n      />\r\n    </Stack>\r\n  );\r\n};\r\n\r\nToolbar.propTypes = {\r\n  onClickCreate: PropTypes.func.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { GridContextProvider } from '@bingads-webui-grid/grid-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Card,\r\n  CardFooter,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { getUIBlockerStyle } from './common/styles';\r\nimport { LandingPageFooter } from './landing-page/landing-page-footer';\r\nimport { LiftStudiesGrid } from './landing-page/lift-studies-grid/grid';\r\nimport { Toolbar } from './landing-page/toolbar';\r\n\r\n\r\nconst useStyles = makeStyles({\r\n  footer: {\r\n    alignItems: 'center',\r\n    display: 'flex',\r\n    flexDirection: 'row',\r\n    justifyContent: 'space-between',\r\n  },\r\n  gridMobileView: {\r\n    '@media screen and (max-width: 600px)': {\r\n      width: 'fit-content',\r\n    },\r\n  },\r\n});\r\n\r\nexport const LiftMeasurement = ({ siteMap }) => {\r\n  useDefaultStyles(getUIBlockerStyle);\r\n  const mainLayoutTokens = {\r\n    childrenGap: 15,\r\n    padding: 30,\r\n  };\r\n  const styles = useStyles();\r\n\r\n  const { scope } = useContext(ScopeContext);\r\n\r\n  const onClickCreate = useCallback(() => {\r\n    setClarityTag({\r\n      IsClickedCreateLiftExperiment: true,\r\n    });\r\n    const route = getRoutePathById(siteMap, 'lift-measurement-creation');\r\n    scope.save(route);\r\n  }, [scope, siteMap]);\r\n  const onClickEdit = useCallback((liftExperimentId) => {\r\n    setClarityTag({\r\n      IsClickedEditLiftExperiment: true,\r\n    });\r\n    const route = getRoutePathById(siteMap, 'lift-measurement-edit');\r\n    scope.append({ liftExperimentId });\r\n    scope.save(route);\r\n  }, [scope, siteMap]);\r\n\r\n  const initialGridContext = useMemo(() => ({\r\n    items: [],\r\n    editableFilter: '',\r\n    pagination: {\r\n      pageNumber: 1,\r\n      pageSize: 10,\r\n    },\r\n    totalCount: 0,\r\n  }), []);\r\n\r\n  return (\r\n    <div className=\"lift-measurement-wrapper\">\r\n      <Stack tokens={mainLayoutTokens}>\r\n        <GridContextProvider {...initialGridContext}>\r\n          <Toolbar onClickCreate={onClickCreate} />\r\n          <Card className={styles.gridMobileView}>\r\n            <LiftStudiesGrid onClickEdit={onClickEdit} siteMap={siteMap} />\r\n            <CardFooter className={styles.footer}>\r\n              <LandingPageFooter />\r\n            </CardFooter>\r\n          </Card>\r\n        </GridContextProvider>\r\n      </Stack >\r\n    </div >\r\n  );\r\n};\r\n\r\nLiftMeasurement.propTypes = {\r\n  siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.string,\r\n  })).isRequired,\r\n};\r\n","export const CREATE_INTENT = 'create';\r\nexport const EDIT_INTENT = 'edit';\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Button,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  matchStepState,\r\n  STEP_STATES,\r\n  WIZARD_EVENTS,\r\n  useWizardService,\r\n} from '@bingads-webui-react/wizard';\r\n\r\nexport const NextButton = ({ disabled }) => {\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.SAVE_AND_NEXT);\r\n  }, [send]);\r\n\r\n  return (\r\n    <Button\r\n      appearance=\"primary\"\r\n      className=\"step-next-button\"\r\n      disabled={disabled || isBlocking}\r\n      onClick={onNextClicked}\r\n    >\r\n      {i18n.getString(_TL_('Next'))}\r\n    </Button>\r\n  );\r\n};\r\n\r\nNextButton.propTypes = {\r\n  disabled: PropTypes.bool,\r\n};\r\n\r\nNextButton.defaultProps = {\r\n  disabled: false,\r\n};\r\n\r\nexport const BackButton = () => {\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 onBackClicked = useCallback(() => {\r\n    send(WIZARD_EVENTS.BACK);\r\n  }, [send]);\r\n\r\n  return (\r\n    <Button\r\n      className=\"step-back-button\"\r\n      disabled={isBlocking}\r\n      onClick={onBackClicked}\r\n    >\r\n      {i18n.getString(_TL_('Back'))}\r\n    </Button>\r\n  );\r\n};\r\n\r\nexport const CancelButton = () => {\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 onCancelClicked = useCallback(() => {\r\n    send(WIZARD_EVENTS.CANCEL);\r\n  }, [send]);\r\n\r\n  return (\r\n    <Button\r\n      className=\"step-cancel-button\"\r\n      disabled={isBlocking}\r\n      onClick={onCancelClicked}\r\n    >\r\n      {i18n.getString(_TL_('Cancel'))}\r\n    </Button>\r\n  );\r\n};\r\n\r\nexport const SaveAndExitButton = ({ disabled }) => {\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.SAVE_AND_EXIT);\r\n  }, [send]);\r\n\r\n  return (\r\n    <Button\r\n      appearance=\"primary\"\r\n      className=\"step-save-and-exit-button\"\r\n      disabled={disabled || isBlocking}\r\n      onClick={onNextClicked}\r\n    >\r\n      {i18n.getString(_TL_('Save and exit'))}\r\n    </Button>\r\n  );\r\n};\r\n\r\nSaveAndExitButton.propTypes = {\r\n  disabled: PropTypes.bool,\r\n};\r\n\r\nSaveAndExitButton.defaultProps = {\r\n  disabled: false,\r\n};\r\n","import React from 'react';\r\nimport {\r\n  getIsFirstStep,\r\n  getIsLastStep,\r\n  useWizardService,\r\n} from '@bingads-webui-react/wizard';\r\nimport { Stack } from '@fluentui/react';\r\nimport { NextButton, BackButton, CancelButton, SaveAndExitButton } from './buttons';\r\n\r\nexport const LiftMeasurementStepFooter = () => {\r\n  const { state } = useWizardService();\r\n  const isFirstStep = getIsFirstStep(state);\r\n  const isLastStep = getIsLastStep(state);\r\n\r\n  return (\r\n    <Stack horizontal tokens={{ childrenGap: 16 }}>\r\n      {isFirstStep && <NextButton />}\r\n      {isLastStep && <BackButton />}\r\n      {isLastStep && <SaveAndExitButton />}\r\n      <CancelButton />\r\n    </Stack>\r\n  );\r\n};\r\n","export const errorMessages = {\r\n  CAMPAIGN_REQUIRED: _TL_('Please select at least one campaign before proceeding to the next step.'),\r\n  CAMPAIGNS_TOO_MANY: _TL_('Your lift experiment can include up to {{max}} campaigns.'),\r\n  CONVERSION_GOAL_REQUIRED: _TL_('Please select a UET tag that has an active conversion goal associated with it.'),\r\n  COUNTRY_REQUIRED: _TL_('Country is required.'),\r\n  KEYWORDS_TOO_LONG: _TL_('You entered {{count}} {{unit}} that {{verb}} the {{max}}-character limit. Please shorten your text.'),\r\n  KEYWORDS_TOO_MANY: _TL_('You entered {{count}} keywords. The lift experiment is limited to {{max}} keywords.'),\r\n  MEASUREMENT_TYPE_REQUIRED: _TL_('You must select at least one lift measurement type.'),\r\n  NAME_REQUIRED: _TL_('Experiment name is required.'),\r\n  NAME_TOO_LONG: _TL_('Experiment name must be 255 or less characters in length.'),\r\n  SAVE_VALIDATION_FAILED: _TL_('You can\\'t save this lift experiment. Please fix the errors and try again.'),\r\n  SEARCH_CID_RANGE: _TL_('Customer ID must be between 1 and 999999999.'),\r\n  SEARCH_CID_TYPE: _TL_('Customer ID must be a number.'),\r\n  SELECTED_KEYWORDS_REQUIRED: _TL_('Keywords are required.'),\r\n  START_DATE_REQUIRED: _TL_('Start date is required.'),\r\n  STATUS_INVALID_FOR_EDIT: _TL_('Lift studies can only be edited while they are in a scheduled status.'),\r\n  TYPED_KEYWORDS_REQUIRED: _TL_('Keywords are required.'),\r\n  UET_TAG_SELECTION_REQUIRED: _TL_('Please check below for an issue with your UET tags selection.'),\r\n  UET_REQUIRED: _TL_('UET tags are required.'),\r\n  VISIT_CONVERSION_LIFT_REQUIRED: _TL_('When using \\'Visit and conversion lift\\', you must choose to measure visit and conversion lift, conversion lift only, or visit lift only.'),\r\n};\r\n","export const mainLayoutTokens = {\r\n  childrenGap: 15,\r\n  padding: 30,\r\n};\r\n\r\nexport const stepLayoutTokens = {\r\n  childrenGap: 15,\r\n  padding: '32px',\r\n  maxWidth: '67%',\r\n};\r\n\r\nexport const selectCampaignsStepLayoutTokens = {\r\n  childrenGap: 15,\r\n  padding: '32px',\r\n};\r\n\r\nexport const footerStyles = {\r\n  alignItems: 'center',\r\n  display: 'flex',\r\n  flexDirection: 'row',\r\n  justifyContent: 'space-between',\r\n};\r\n\r\nexport const cardHeaderStyles = {\r\n  cardHeader: {\r\n    display: 'flex',\r\n  },\r\n  label: {\r\n    paddingRight: '5px',\r\n  },\r\n};\r\n\r\nexport const selectCampaignsStyles = {\r\n  root: {\r\n    display: 'flex',\r\n    flexGrow: 1,\r\n  },\r\n  content: {\r\n    flexGrow: 1,\r\n  },\r\n};\r\n\r\nexport const selectedCampaignsAccordionStyles = {\r\n  accordionHeader: {\r\n    display: 'flex',\r\n    paddingBottom: '5px',\r\n    '& button': {\r\n      paddingLeft: '0px',\r\n      paddingRight: '0px',\r\n    },\r\n  },\r\n  accordionHeaderText: {\r\n    marginRight: 'auto',\r\n  },\r\n  count: {\r\n    color: '#616161',\r\n  },\r\n  tagsList: {\r\n    columnGap: '2px',\r\n    display: 'flex',\r\n    flexWrap: 'wrap',\r\n    rowGap: '2px',\r\n  },\r\n};\r\n\r\nexport const studySummaryDrawerStyles = {\r\n  content: {\r\n    display: 'flex',\r\n    justifyContent: 'space-between',\r\n  },\r\n  drawer: {\r\n    paddingLeft: '15px',\r\n    paddingRight: '20px',\r\n    backgroundColor: '#f5f5f5',\r\n    backgroundSize: '100% 0px',\r\n    borderLeftStyle: 'solid',\r\n    borderLeftWidth: '1px',\r\n    borderLeftColor: '#e1dfdd',\r\n  },\r\n  drawerHeader: {\r\n    paddingBottom: '20px',\r\n  },\r\n  subTitle: {\r\n    marginTop: '20px !important',\r\n    paddingBottom: '15px',\r\n  },\r\n  totalBudget: {\r\n    paddingBottom: '10px',\r\n    color: '#616161',\r\n  },\r\n};\r\n\r\n","import {\r\n  ADD_KEYWORDS_BY_ENTRY,\r\n  ADD_KEYWORDS_BY_SELECTION,\r\n} from './components/keyword/keyword-methods';\r\nimport {\r\n  maxCampaignCount,\r\n  maxExperimentNameLength,\r\n  maxKeywordLength,\r\n  maxSearchCid,\r\n  minSearchCid,\r\n} from './constants/maximums';\r\nimport { errorMessages } from './errors';\r\nimport { parseKeywordString } from './utils';\r\n\r\nexport const validateCampaigns = ({ selectedCampaignsById }) => {\r\n  if (selectedCampaignsById == null) {\r\n    return false;\r\n  }\r\n\r\n  const campaigns = Object.values(selectedCampaignsById);\r\n\r\n  if (campaigns.length === 0) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nexport const validateExperimentName = ({ experimentName }) => {\r\n  if (experimentName.length > maxExperimentNameLength) {\r\n    return false;\r\n  }\r\n\r\n  if (experimentName.trim().length === 0) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nexport const validateStartDate = ({ startDate }) => startDate != null;\r\n\r\nexport const validateCountry = ({ country }) => country != null;\r\n\r\nexport const validateMeasurementTypes = ({ useConversionLift, useSearchLift, useVisitLift }) => (\r\n  !!useConversionLift || !!useSearchLift || !!useVisitLift\r\n);\r\n\r\nexport const validateEnteredKeywordsRequired = ({ typedKeywordString }) => typedKeywordString.trim().length > 0;\r\n\r\nexport const validateSelectedKeywordsCount = ({ selectedKeywords }) => selectedKeywords.length > 0;\r\n\r\nexport const validateSearchCid = ({ searchCid }) => {\r\n  if (searchCid.trim().length === 0) {\r\n    return true;\r\n  }\r\n\r\n  const value = Number(searchCid);\r\n\r\n  if (isNaN(value)) {\r\n    return false;\r\n  }\r\n\r\n  if (!Number.isInteger(value)) {\r\n    return false;\r\n  }\r\n\r\n  if (value < minSearchCid || value > maxSearchCid) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nexport const validateSearchLift = (data) => {\r\n  const {\r\n    keywordsMethod,\r\n    typedKeywordString,\r\n    useSearchLift,\r\n  } = data;\r\n\r\n  if (!useSearchLift) {\r\n    return true;\r\n  }\r\n\r\n  if (keywordsMethod === ADD_KEYWORDS_BY_ENTRY) {\r\n    if (!validateEnteredKeywordsRequired(data)) {\r\n      return false;\r\n    }\r\n\r\n    const parsedKeywords = parseKeywordString(typedKeywordString);\r\n    const tooLongKeywords = parsedKeywords.filter(word => word.length > maxKeywordLength);\r\n\r\n    if (tooLongKeywords.length > 0) {\r\n      return false;\r\n    }\r\n  }\r\n\r\n  if (keywordsMethod === ADD_KEYWORDS_BY_SELECTION) {\r\n    if (!validateSelectedKeywordsCount(data)) {\r\n      return false;\r\n    }\r\n  }\r\n\r\n  if (!validateSearchCid(data)) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n};\r\n\r\nexport const validateCampaignCount = ({ count, i18n }) => {\r\n  if (count === 0) {\r\n    return {\r\n      isValid: false,\r\n      error: i18n.getString(errorMessages.CAMPAIGN_REQUIRED),\r\n    };\r\n  } else if (count > maxCampaignCount) {\r\n    return {\r\n      isValid: false,\r\n      error: i18n.getString(errorMessages.CAMPAIGNS_TOO_MANY, { max: maxCampaignCount }),\r\n    };\r\n  }\r\n  return {\r\n    isValid: true,\r\n    error: null,\r\n  };\r\n};\r\n\r\nexport const validateVisitConversionLift = (data) => {\r\n  const {\r\n    useConversionLift,\r\n    useVisitLift,\r\n    useVisitConversionLift,\r\n    uetTags,\r\n  } = data;\r\n\r\n  if (!useVisitConversionLift) {\r\n    return true;\r\n  }\r\n\r\n  if (useConversionLift && useVisitLift) {\r\n    return uetTags.both.length !== 0;\r\n  }\r\n\r\n  if (useConversionLift) {\r\n    return uetTags.conversion.length !== 0;\r\n  }\r\n\r\n  if (useVisitLift) {\r\n    return uetTags.visit.length !== 0;\r\n  }\r\n\r\n  return false;\r\n};\r\n\r\nconst isMeasurementTypeSelected = data => data.useSearchLift || data.useVisitConversionLift;\r\n\r\nexport const validateLiftExperiment = data => !!data.isValid && isMeasurementTypeSelected(data) && validateVisitConversionLift(data);\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useEffect } from 'react';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { Dropdown } from '@fluentui/react-components';\r\n\r\nconst AdaptedDropdown = ({\r\n  errorMessage,\r\n  onOptionSelect,\r\n  updateValidation,\r\n  useSearchLift,\r\n  validationProps,\r\n  ...restProps\r\n}) => {\r\n  const onSelect = useCallback((e, data) => {\r\n    const { selectedOptions } = data;\r\n    updateValidation(selectedOptions.length === 0 ? [errorMessage] : [], { selectedOptions });\r\n    onOptionSelect(e, data);\r\n  }, [errorMessage, onOptionSelect, updateValidation]);\r\n\r\n  useEffect(() => {\r\n    const selected = validationProps.data.selectedOptions;\r\n    updateValidation(selected.length === 0 && useSearchLift ? [errorMessage] : [], { selectedOptions: selected });\r\n  }, [errorMessage, updateValidation, useSearchLift, validationProps.data.selectedOptions]);\r\n\r\n  return (\r\n    <Dropdown\r\n      {...restProps}\r\n      onOptionSelect={onSelect}\r\n      selectedOptions={validationProps.data.selectedOptions}\r\n    />\r\n  );\r\n};\r\n\r\nAdaptedDropdown.propTypes = {\r\n  errorMessage: PropTypes.string.isRequired,\r\n  onOptionSelect: PropTypes.func.isRequired,\r\n  useSearchLift: PropTypes.bool.isRequired,\r\n  updateValidation: PropTypes.func.isRequired,\r\n  validationProps: PropTypes.shape({\r\n    data: PropTypes.shape({\r\n      selectedOptions: PropTypes.arrayOf(PropTypes.oneOfType([\r\n        PropTypes.number,\r\n        PropTypes.string,\r\n      ])).isRequired,\r\n    }).isRequired,\r\n  }).isRequired,\r\n};\r\n\r\nexport const RequiredDropdown = withCustomValidation(AdaptedDropdown);\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  CardHeader,\r\n  Field,\r\n  Label,\r\n  makeStyles,\r\n  Option,\r\n} from '@fluentui/react-components';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { countries } from '../../countries';\r\nimport { errorMessages } from '../../errors';\r\nimport { cardHeaderStyles } from '../../page-layout';\r\nimport { sortByName } from '../../utils';\r\nimport { RequiredDropdown } from '../validated/required-dropdown';\r\n\r\nconst useStyles = makeStyles(cardHeaderStyles);\r\n\r\nexport const CountryCard = ({ country, onChangeCountry, showError }) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const countryLabel = i18n.getString(_TL_('Country'));\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n  const countryKeyValues = useMemo(() => Object.values(countries).sort(sortByName(i18n)), [i18n]);\r\n  const countryAsArray = useMemo(() => (country ? [country] : []), [country]);\r\n\r\n  const onOptionSelect = useCallback((e, data) => {\r\n    onChangeCountry(data.selectedOptions[0]);\r\n  }, [onChangeCountry]);\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const onValidateCountry = useCallback(({ isValid, messages }) => {\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n    } else {\r\n      setFieldProps({\r\n        validationMessage: i18n.getString(errorMessages[messages[0]]),\r\n        validationState: 'error',\r\n      });\r\n    }\r\n  }, [i18n]);\r\n\r\n  return (\r\n    <Card className=\"country-card\">\r\n      <CardHeader\r\n        header={\r\n          <div className={styles.cardHeader}>\r\n            <Label size=\"large\" className={styles.label} required>{countryLabel}</Label>\r\n            <HelpButton\r\n              aria-label={`${learnMore} ${countryLabel}`}\r\n              topic=\"pop_BA_Experiments_LiftCountry\"\r\n            />\r\n          </div>\r\n        }\r\n      />\r\n      <Field {...(showError ? fieldProps : null)}>\r\n        <RequiredDropdown\r\n          ariaLabel={i18n.getString(_TL_('Lift measurement country dropdown'))}\r\n          errorMessage=\"COUNTRY_REQUIRED\"\r\n          onOptionSelect={onOptionSelect}\r\n          value={country ? i18n.getString(countries[country].name) : ''}\r\n          validationProps={{\r\n            data: { selectedOptions: countryAsArray },\r\n            field: 'selectedOptions',\r\n            onValidate: onValidateCountry,\r\n          }}\r\n        >\r\n          {countryKeyValues.map(({ code, name }) => (\r\n            <Option\r\n              key={code}\r\n              value={code}\r\n              className={`country-selector-option-${name}`}\r\n            >\r\n              {i18n.getString(name)}\r\n            </Option>\r\n          ))}\r\n        </RequiredDropdown>\r\n      </Field>\r\n    </Card>\r\n  );\r\n};\r\n\r\nCountryCard.propTypes = {\r\n  country: PropTypes.string,\r\n  onChangeCountry: PropTypes.func.isRequired,\r\n  showError: PropTypes.bool,\r\n};\r\n\r\nCountryCard.defaultProps = {\r\n  country: null,\r\n  showError: false,\r\n};\r\n","const MS_PER_SEC = 1000;\r\nconst SEC_PER_MIN = 60;\r\nconst MIN_PER_HR = 60;\r\nconst HR_PER_DAY = 24;\r\n\r\nexport const MS_PER_DAY = MS_PER_SEC * SEC_PER_MIN * MIN_PER_HR * HR_PER_DAY;\r\n\r\nexport const getFormattedDateString = (d) => {\r\n  const isoString = d.toISOString();\r\n  return isoString.split('T')[0];\r\n};\r\n\r\nexport const DATE_FORMAT = 'MM/dd/yyyy';\r\nexport const API_DATE_FORMAT = 'yyyy-MM-dd';\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport dateUtils from '@bingads-webui-component-legacy/humanize/date';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n  Card,\r\n  CardHeader,\r\n  Field,\r\n  Label,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { DatePicker } from '@fluentui/react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport {\r\n  DATE_FORMAT,\r\n  MS_PER_DAY,\r\n} from '../../date';\r\nimport { errorMessages } from '../../errors';\r\nimport { cardHeaderStyles } from '../../page-layout';\r\nimport { getDatePickerStrings } from './date-picker-strings';\r\n\r\nconst useStyles = makeStyles(cardHeaderStyles);\r\n\r\nexport const StartDateCardInternal = ({\r\n  onChangeStartDate,\r\n  showError,\r\n  startDate,\r\n  updateValidation,\r\n}) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const localizedStrings = getDatePickerStrings(i18n);\r\n  const tomorrow = new Date(Date.now() + MS_PER_DAY);\r\n  const initialDate = useMemo(() => (startDate ? new Date(startDate) : null), [startDate]);\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n  const startDateLabel = i18n.getString(_TL_('Start date'));\r\n  const fieldProps = startDate == null && showError\r\n    ? {\r\n      validationMessage: i18n.getString(errorMessages.START_DATE_REQUIRED),\r\n      validationState: 'error',\r\n    }\r\n    : null;\r\n\r\n  const onSelectStartDate = useCallback((date) => {\r\n    const formattedDate = dateUtils.format(date, DATE_FORMAT);\r\n    updateValidation([], { startDate: formattedDate });\r\n    onChangeStartDate(formattedDate);\r\n  }, [onChangeStartDate, updateValidation]);\r\n\r\n  const onFormatDate = useCallback(date => (\r\n    date\r\n      ? i18n.formatDate(date)\r\n      : ''\r\n  ), [i18n]);\r\n\r\n  return (\r\n    <Card className=\"start-date-card\">\r\n      <CardHeader\r\n        header={\r\n          <div className={styles.cardHeader}>\r\n            <Label size=\"large\" className={styles.label} required>{startDateLabel}</Label>\r\n            <HelpButton\r\n              aria-label={`${learnMore} ${startDateLabel}`}\r\n              topic=\"pop_BA_Experiments_StartDate\"\r\n            />\r\n          </div>\r\n          }\r\n      />\r\n      <Field {...fieldProps}>\r\n        <DatePicker\r\n          ariaLabel={i18n.getString(_TL_('Lift measurement start date picker'))}\r\n          formatDate={onFormatDate}\r\n          initialPickerDate={tomorrow}\r\n          minDate={tomorrow}\r\n          onSelectDate={onSelectStartDate}\r\n          strings={localizedStrings}\r\n          value={initialDate}\r\n        />\r\n      </Field>\r\n    </Card>\r\n  );\r\n};\r\n\r\nStartDateCardInternal.propTypes = {\r\n  onChangeStartDate: PropTypes.func.isRequired,\r\n  showError: PropTypes.bool,\r\n  startDate: PropTypes.string,\r\n  updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nStartDateCardInternal.defaultProps = {\r\n  showError: false,\r\n  startDate: null,\r\n};\r\n\r\nexport const StartDateCard = withCustomValidation(StartDateCardInternal);\r\n","export const getDatePickerStrings = i18n => ({\r\n  months: [\r\n    i18n.getString(_TL_('January')),\r\n    i18n.getString(_TL_('February')),\r\n    i18n.getString(_TL_('March')),\r\n    i18n.getString(_TL_('April')),\r\n    i18n.getString(_TL_('May')),\r\n    i18n.getString(_TL_('June')),\r\n    i18n.getString(_TL_('July')),\r\n    i18n.getString(_TL_('August')),\r\n    i18n.getString(_TL_('September')),\r\n    i18n.getString(_TL_('October')),\r\n    i18n.getString(_TL_('November')),\r\n    i18n.getString(_TL_('December')),\r\n  ],\r\n  shortMonths: [\r\n    i18n.getString(_TL_('Jan')),\r\n    i18n.getString(_TL_('Feb')),\r\n    i18n.getString(_TL_('Mar')),\r\n    i18n.getString(_TL_('Apr')),\r\n    i18n.getString(_TL_('May')),\r\n    i18n.getString(_TL_('Jun')),\r\n    i18n.getString(_TL_('Jul')),\r\n    i18n.getString(_TL_('Aug')),\r\n    i18n.getString(_TL_('Sep')),\r\n    i18n.getString(_TL_('Oct')),\r\n    i18n.getString(_TL_('Nov')),\r\n    i18n.getString(_TL_('Dec')),\r\n  ],\r\n  days: [\r\n    i18n.getString(_TL_('Sun')),\r\n    i18n.getString(_TL_('Mon')),\r\n    i18n.getString(_TL_('Tue')),\r\n    i18n.getString(_TL_('Wed')),\r\n    i18n.getString(_TL_('Thu')),\r\n    i18n.getString(_TL_('Fri')),\r\n    i18n.getString(_TL_('Sat')),\r\n  ],\r\n  shortDays: [\r\n    i18n.getString(_TL_('S')),\r\n    i18n.getString(_TL_('M')),\r\n    i18n.getString(_TL_('T')),\r\n    i18n.getString(_TL_('W')),\r\n    i18n.getString(_TL_('T')),\r\n    i18n.getString(_TL_('F')),\r\n    i18n.getString(_TL_('S')),\r\n  ],\r\n  goToToday: i18n.getString(_TL_('Go to today')),\r\n  prevMonthAriaLabel: i18n.getString(_TL_('Go to previous month')),\r\n  nextMonthAriaLabel: i18n.getString(_TL_('Go to next month')),\r\n  prevYearAriaLabel: i18n.getString(_TL_('Go to previous year')),\r\n  nextYearAriaLabel: i18n.getString(_TL_('Go to next year')),\r\n  closeButtonAriaLabel: i18n.getString(_TL_('Close date picker')),\r\n  isRequiredErrorMessage: i18n.getString(_TL_('Start date is required.')),\r\n  invalidInputErrorMessage: i18n.getString(_TL_('Invalid date format.')),\r\n});\r\n","export const ADD_KEYWORDS_BY_ENTRY = 'entry';\r\nexport const ADD_KEYWORDS_BY_SELECTION = 'select';\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  RadioGroup,\r\n  Radio,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  ADD_KEYWORDS_BY_ENTRY,\r\n  ADD_KEYWORDS_BY_SELECTION,\r\n} from './keyword-methods';\r\n\r\nexport const KeywordInput = ({\r\n  entryControl,\r\n  isDisabled,\r\n  isSelectDisabled,\r\n  keywordsMethod,\r\n  onChangeKeywordsMethod,\r\n  selectControl,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const selectLabel = i18n.getString(_TL_('Select keywords'));\r\n  const entryLabel = i18n.getString(_TL_('Enter keywords'));\r\n\r\n  const onSelectRadio = useCallback((e, data) => {\r\n    onChangeKeywordsMethod(data.value);\r\n  }, [onChangeKeywordsMethod]);\r\n\r\n  return (\r\n    <RadioGroup\r\n      className=\"keywords-radio-group\"\r\n      disabled={isDisabled}\r\n      onChange={onSelectRadio}\r\n      value={keywordsMethod}\r\n    >\r\n      <Radio\r\n        disabled={isSelectDisabled}\r\n        label={selectLabel}\r\n        value={ADD_KEYWORDS_BY_SELECTION}\r\n      />\r\n      {keywordsMethod === ADD_KEYWORDS_BY_SELECTION && selectControl}\r\n      <Radio\r\n        label={entryLabel}\r\n        value={ADD_KEYWORDS_BY_ENTRY}\r\n      />\r\n      {keywordsMethod === ADD_KEYWORDS_BY_ENTRY && entryControl}\r\n    </RadioGroup>\r\n  );\r\n};\r\n\r\nKeywordInput.propTypes = {\r\n  entryControl: PropTypes.node.isRequired,\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  isSelectDisabled: PropTypes.bool.isRequired,\r\n  keywordsMethod: PropTypes.oneOf([\r\n    ADD_KEYWORDS_BY_ENTRY,\r\n    ADD_KEYWORDS_BY_SELECTION,\r\n  ]),\r\n  onChangeKeywordsMethod: PropTypes.func.isRequired,\r\n  selectControl: PropTypes.node.isRequired,\r\n};\r\n\r\nKeywordInput.defaultProps = {\r\n  keywordsMethod: null,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback } from 'react';\r\nimport {\r\n  Button,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  Dismiss12Regular,\r\n} from '@fluentui/react-icons';\r\n\r\nexport const KeywordTag = ({\r\n  id,\r\n  listRemoveId,\r\n  name,\r\n  onRemove,\r\n}) => {\r\n  const removeTagId = `${listRemoveId}-${id}`;\r\n  const onRemoveTag = useCallback(() => {\r\n    onRemove(id);\r\n  }, [id, onRemove]);\r\n\r\n  return (\r\n    <Button\r\n      appearance=\"primary\"\r\n      aria-labelledby={`${listRemoveId} ${removeTagId}`}\r\n      icon={<Dismiss12Regular />}\r\n      iconPosition=\"after\"\r\n      id={removeTagId}\r\n      onClick={onRemoveTag}\r\n      shape=\"circular\"\r\n      size=\"small\"\r\n    >\r\n      {name}\r\n    </Button>\r\n  );\r\n};\r\n\r\nKeywordTag.propTypes = {\r\n  id: PropTypes.number.isRequired,\r\n  listRemoveId: PropTypes.string.isRequired,\r\n  name: PropTypes.string.isRequired,\r\n  onRemove: PropTypes.func.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Button,\r\n  Text,\r\n  useId,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  DeleteRegular,\r\n} from '@fluentui/react-icons';\r\nimport { useTagsListStyles } from '../../styles';\r\nimport { KeywordTag } from './keyword-tag';\r\n\r\nexport const KeywordDisplay = ({\r\n  fetchedKeywords,\r\n  onRemoveAllKeywords,\r\n  onRemoveKeyword,\r\n  selectedKeywords,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const styles = useTagsListStyles();\r\n  const tagsListId = useId('selectedKeywordsTagsList');\r\n  const tagsListRemoveId = `${tagsListId}-remove`;\r\n\r\n  const onRemoveTag = useCallback((removedId) => {\r\n    onRemoveKeyword(removedId);\r\n  }, [onRemoveKeyword]);\r\n\r\n  return (\r\n    <div className={styles.root}>\r\n      <div className={styles.tagsToolbar}>\r\n        <Text weight=\"semibold\">\r\n          {i18n.getString(_TL_('Selected keywords'))}\r\n        </Text>\r\n        <Button\r\n          appearance=\"subtle\"\r\n          icon={<DeleteRegular />}\r\n          iconPosition=\"before\"\r\n          onClick={onRemoveAllKeywords}\r\n          size=\"small\"\r\n        >\r\n          {i18n.getString(_TL_('Remove all'))}\r\n        </Button>\r\n      </div>\r\n      <div\r\n        className={styles.tagsList}\r\n        id={tagsListId}\r\n      >\r\n        {selectedKeywords.map((keywordId) => {\r\n          const { id, name } = fetchedKeywords[keywordId];\r\n          return (\r\n            <KeywordTag\r\n              id={id}\r\n              key={id}\r\n              name={name}\r\n              listRemoveId={tagsListRemoveId}\r\n              onRemove={onRemoveTag}\r\n            />\r\n          );\r\n        })}\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nKeywordDisplay.propTypes = {\r\n  fetchedKeywords: PropTypes.objectOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    impressions: PropTypes.number.isRequired,\r\n  })),\r\n  onRemoveAllKeywords: PropTypes.func.isRequired,\r\n  onRemoveKeyword: PropTypes.func.isRequired,\r\n  selectedKeywords: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n};\r\n\r\nKeywordDisplay.defaultProps = {\r\n  fetchedKeywords: null,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Field,\r\n  Label,\r\n  Option,\r\n  useId,\r\n} from '@fluentui/react-components';\r\nimport { maxKeywordCount } from '../../constants/maximums';\r\nimport { errorMessages } from '../../errors';\r\nimport { useMeasurementTypeSelectorStyles } from '../../styles';\r\nimport { RequiredDropdown } from '../validated/required-dropdown';\r\nimport { KeywordDisplay } from './keyword-display';\r\n\r\nexport const KeywordSelector = ({\r\n  fetchedKeywords,\r\n  isDisabled,\r\n  onRemove,\r\n  onRemoveAll,\r\n  onSelect,\r\n  orderedFetchedKeywords,\r\n  selected,\r\n  showError,\r\n  useSearchLift,\r\n}) => {\r\n  const dropdownId = useId('useKeywordSelector');\r\n  const styles = useMeasurementTypeSelectorStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const placeholder = i18n.getString(_TL_('Select keywords'));\r\n  const impressionsUnit = i18n.getString(_TL_('impressions'));\r\n\r\n  const buttonText = useMemo(() => {\r\n    if (selected.length === 0) {\r\n      return placeholder;\r\n    }\r\n    return selected.map(keywordId => fetchedKeywords[keywordId].name).join(i18n.getString(_TL_(', ')));\r\n  }, [fetchedKeywords, i18n, placeholder, selected]);\r\n\r\n  const onSelectDropdownOption = useCallback((e, data) => {\r\n    onSelect(data.selectedOptions);\r\n  }, [onSelect]);\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const onValidateKeywords = useCallback(({ isValid, messages }) => {\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n    } else {\r\n      setFieldProps({\r\n        validationMessage: i18n.getString(errorMessages[messages[0]]),\r\n        validationState: 'error',\r\n      });\r\n    }\r\n  }, [i18n]);\r\n\r\n  return (\r\n    <div className={styles.dropdownContainer}>\r\n      <Label\r\n        disabled={isDisabled}\r\n        id={dropdownId}\r\n        required\r\n      >\r\n        {i18n.getString(_TL_('Keywords'))}\r\n      </Label>\r\n      {selected.length > 0 && (\r\n        <KeywordDisplay\r\n          fetchedKeywords={fetchedKeywords}\r\n          onRemoveAllKeywords={onRemoveAll}\r\n          onRemoveKeyword={onRemove}\r\n          selectedKeywords={selected}\r\n        />\r\n      )}\r\n      <Field {...(showError ? fieldProps : null)}>\r\n        <RequiredDropdown\r\n          aria-labelledby={dropdownId}\r\n          button={<span className={styles.truncatedText}>{buttonText}</span>}\r\n          className={styles.dropdown}\r\n          disabled={isDisabled}\r\n          errorMessage=\"SELECTED_KEYWORDS_REQUIRED\"\r\n          multiselect\r\n          onOptionSelect={onSelectDropdownOption}\r\n          useSearchLift={useSearchLift}\r\n          validationProps={{\r\n            data: { selectedOptions: selected },\r\n            field: 'selectedOptions',\r\n            onValidate: onValidateKeywords,\r\n          }}\r\n        >\r\n          {orderedFetchedKeywords.map(({ id, impressions, name }) => {\r\n            const isMaxedOut = selected.length === maxKeywordCount;\r\n            const isOptionDisabled = isMaxedOut && !selected.includes(id);\r\n            const optionLabel = `${name} (${impressions} ${impressionsUnit})`;\r\n\r\n            return (\r\n              <Option\r\n                className={`keyword-selector-option-${name}`}\r\n                disabled={isOptionDisabled}\r\n                key={id}\r\n                value={id}\r\n              >\r\n                {optionLabel}\r\n              </Option>\r\n            );\r\n          })}\r\n        </RequiredDropdown>\r\n      </Field>\r\n    </div>\r\n  );\r\n};\r\n\r\nKeywordSelector.propTypes = {\r\n  fetchedKeywords: PropTypes.objectOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    impressions: PropTypes.number.isRequired,\r\n  })),\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  onRemove: PropTypes.func.isRequired,\r\n  onRemoveAll: PropTypes.func.isRequired,\r\n  onSelect: PropTypes.func.isRequired,\r\n  orderedFetchedKeywords: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    impressions: PropTypes.number.isRequired,\r\n  })),\r\n  selected: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n  showError: PropTypes.bool,\r\n  useSearchLift: PropTypes.bool.isRequired,\r\n};\r\n\r\nKeywordSelector.defaultProps = {\r\n  fetchedKeywords: null,\r\n  orderedFetchedKeywords: null,\r\n  showError: false,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n  Field,\r\n  Label,\r\n  Textarea,\r\n  useId,\r\n} from '@fluentui/react-components';\r\nimport { useKeywordInputStyles } from '../../styles';\r\nimport { getCustomValidator } from './keyword-textarea-validation';\r\nimport { errorMessages } from '../../errors';\r\n\r\nconst ValidatedTextarea = withValidation(Textarea);\r\n\r\nexport const KeywordTextarea = ({\r\n  isDisabled,\r\n  keywordString,\r\n  onChange,\r\n  showError,\r\n}) => {\r\n  const textareaId = useId('keywordTextarea');\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const placeholder = i18n.getString(_TL_('Enter keywords separated by commas'));\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const onChangeTextarea = useCallback((e, data) => {\r\n    if (data.length) {\r\n      const { value } = data[0];\r\n      onChange(value);\r\n    }\r\n  }, [onChange]);\r\n\r\n  const styles = useKeywordInputStyles();\r\n\r\n  const validator = getCustomValidator();\r\n\r\n  const onValidateKeywords = useCallback(({ isValid, messages }) => {\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n    } else {\r\n      const message = messages[0];\r\n\r\n      if (typeof message === 'object') {\r\n        setFieldProps({\r\n          validationMessage: i18n.getString(errorMessages[message.key], message.data),\r\n          validateState: 'error',\r\n        });\r\n      } else {\r\n        setFieldProps({\r\n          validationMessage: i18n.getString(errorMessages[message]),\r\n          validationState: 'error',\r\n        });\r\n      }\r\n    }\r\n  }, [i18n]);\r\n\r\n  return (\r\n    <div className={styles.textareaContainer}>\r\n      <Label\r\n        disabled={isDisabled}\r\n        id={textareaId}\r\n        required\r\n      >\r\n        {i18n.getString(_TL_('Enter keywords separated by commas'))}\r\n      </Label>\r\n      <Field {...(showError ? fieldProps : null)}>\r\n        <ValidatedTextarea\r\n          aria-labelledby={textareaId}\r\n          className={styles.textarea}\r\n          disabled={isDisabled}\r\n          onChange={onChangeTextarea}\r\n          placeholder={placeholder}\r\n          textarea={{ className: styles.textarea }}\r\n          validationProps={{\r\n            data: { keywordString },\r\n            field: 'keywordString',\r\n            onValidate: onValidateKeywords,\r\n            validator,\r\n          }}\r\n        />\r\n      </Field>\r\n    </div>\r\n  );\r\n};\r\n\r\nKeywordTextarea.propTypes = {\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  keywordString: PropTypes.string.isRequired,\r\n  onChange: PropTypes.func.isRequired,\r\n  showError: PropTypes.bool,\r\n};\r\n\r\nKeywordTextarea.defaultProps = {\r\n  showError: false,\r\n};\r\n","import { maxKeywordCount, maxKeywordLength } from '../../constants/maximums';\r\nimport { parseKeywordString } from '../../utils';\r\n\r\nexport const getCustomValidator = () => (value) => {\r\n  const parsedKeywords = parseKeywordString(value);\r\n\r\n  if (!parsedKeywords[0]) {\r\n    // We can't use `parsedKeywords.length === 0` because when `value` is just whitespace, `parsedKeywords` will be an\r\n    // array with an empty string as its only member.\r\n    return ['TYPED_KEYWORDS_REQUIRED'];\r\n  }\r\n\r\n  const tooLongKeywords = parsedKeywords.filter(word => word.length > maxKeywordLength);\r\n\r\n  if (tooLongKeywords.length > 0) {\r\n    return [{\r\n      key: 'KEYWORDS_TOO_LONG',\r\n      data: {\r\n        count: tooLongKeywords.length,\r\n        max: maxKeywordLength,\r\n        unit: tooLongKeywords.length === 1 ? 'keyword' : 'keywords',\r\n        verb: tooLongKeywords.length === 1 ? 'exceeds' : 'exceed',\r\n      },\r\n    }];\r\n  }\r\n\r\n  if (parsedKeywords.length > maxKeywordCount) {\r\n    return [{\r\n      key: 'KEYWORDS_TOO_MANY',\r\n      data: {\r\n        count: parsedKeywords.length,\r\n        max: maxKeywordCount,\r\n      },\r\n    }];\r\n  }\r\n\r\n  return [];\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  CardHeader,\r\n  makeStyles,\r\n  Subtitle2,\r\n  Switch,\r\n} from '@fluentui/react-components';\r\n\r\nconst useStyles = makeStyles({\r\n  cardHeader: {\r\n    display: 'flex',\r\n    '& input': {\r\n      height: '100%',\r\n      width: '100%',\r\n    }\r\n  },\r\n});\r\n\r\nexport const MeasurementTypeCard = ({\r\n  children,\r\n  description,\r\n  helpId,\r\n  isAllowed,\r\n  isEnabled,\r\n  onToggle,\r\n  title,\r\n}) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n\r\n  const className = title.toLowerCase().replace(/ /g, '-');\r\n\r\n  return (\r\n    <Card className={`${className}-card`}>\r\n      <CardHeader\r\n        header={\r\n          <div className={styles.cardHeader}>\r\n            <Switch\r\n              checked={isEnabled}\r\n              disabled={!isAllowed}\r\n              label={<Subtitle2>{title}</Subtitle2>}\r\n              onChange={onToggle}\r\n            />\r\n            <HelpButton\r\n              aria-label={`${learnMore} ${title}`}\r\n              topic={helpId}\r\n            />\r\n          </div>\r\n        }\r\n      />\r\n      {description}\r\n      {children}\r\n    </Card>\r\n  );\r\n};\r\n\r\nMeasurementTypeCard.propTypes = {\r\n  children: PropTypes.node.isRequired,\r\n  description: PropTypes.oneOfType([\r\n    PropTypes.node,\r\n    PropTypes.string,\r\n  ]),\r\n  helpId: PropTypes.string.isRequired,\r\n  isAllowed: PropTypes.bool.isRequired,\r\n  isEnabled: PropTypes.bool,\r\n  onToggle: PropTypes.func.isRequired,\r\n  title: PropTypes.string.isRequired,\r\n};\r\n\r\nMeasurementTypeCard.defaultProps = {\r\n  description: null,\r\n  isEnabled: true,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n  Field,\r\n  Input,\r\n  Label,\r\n} from '@fluentui/react-components';\r\nimport { maxSearchCid, minSearchCid } from '../../constants/maximums';\r\nimport { errorMessages } from '../../errors';\r\nimport { useSearchCustomerIdStyles } from '../../styles';\r\n\r\nconst SearchCustomerIdInternal = ({\r\n  customerId,\r\n  isDisabled,\r\n  onChange,\r\n  showError,\r\n  updateValidation,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const label = i18n.getString(_TL_('Add customer ID (optional)'));\r\n  const placeholder = i18n.getString(_TL_('Enter the CID associated with your Search campaigns'));\r\n\r\n  const styles = useSearchCustomerIdStyles();\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const getIsValid = useCallback((data) => {\r\n    if (data === '') {\r\n      return { isValid: true };\r\n    }\r\n    if (!data) {\r\n      return { errorMessage: errorMessages.SEARCH_CID_TYPE, isValid: false };\r\n    }\r\n    const formattedData = Number(data);\r\n    if (formattedData < minSearchCid || formattedData > maxSearchCid) {\r\n      return { errorMessage: errorMessages.SEARCH_CID_RANGE, isValid: false };\r\n    }\r\n    return { isValid: true };\r\n  }, []);\r\n\r\n  const onChangeInput = useCallback((e, data) => {\r\n    const { errorMessage, isValid } = getIsValid(data.value);\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n      updateValidation([], { searchCid: data.value });\r\n    } else {\r\n      setFieldProps({\r\n        validationMessage: i18n.getString(errorMessage),\r\n        validationState: 'error',\r\n      });\r\n      updateValidation([errorMessage], { searchCid: data.value });\r\n    }\r\n    onChange(data.value);\r\n  }, [getIsValid, i18n, onChange, updateValidation]);\r\n\r\n  return (\r\n    <div className=\"search-customer-id\">\r\n      <Label disabled={isDisabled}>{label}</Label>\r\n      <Field {...(showError ? fieldProps : null)}>\r\n        <Input\r\n          className={styles.input}\r\n          disabled={isDisabled}\r\n          onChange={onChangeInput}\r\n          placeholder={placeholder}\r\n          value={customerId}\r\n        />\r\n      </Field>\r\n    </div>\r\n  );\r\n};\r\n\r\nSearchCustomerIdInternal.propTypes = {\r\n  customerId: PropTypes.string.isRequired,\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  onChange: PropTypes.func.isRequired,\r\n  showError: PropTypes.bool,\r\n  updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nSearchCustomerIdInternal.defaultProps = {\r\n  showError: false,\r\n};\r\n\r\nexport const SearchCustomerId = withCustomValidation(SearchCustomerIdInternal);\r\n","import PropTypes from 'prop-types';\r\nimport React, { useMemo } from 'react';\r\nimport {\r\n  makeStyles,\r\n  Skeleton,\r\n  SkeletonItem,\r\n  useId,\r\n} from '@fluentui/react-components';\r\n\r\nconst useStyles = makeStyles({\r\n  row: {\r\n    alignItems: 'center',\r\n    columnGap: '10px',\r\n    display: 'grid',\r\n    gridTemplateColumns: 'min-content 80%',\r\n    paddingBottom: '10px',\r\n    position: 'relative',\r\n    rowGap: '10px',\r\n  },\r\n});\r\n\r\nexport const CardContentSkeleton = ({ rowCount }) => {\r\n  const skeletonId = useId('cardContentSkeleton');\r\n  const rowKeys = useMemo(() => [...Array(rowCount).keys()], [rowCount]);\r\n  const styles = useStyles();\r\n\r\n  return (\r\n    <div>\r\n      <Skeleton>\r\n        {rowKeys.map(rowKey => (\r\n          <div className={styles.row} key={`${skeletonId}-${rowKey}`}>\r\n            <SkeletonItem shape=\"circle\" size={24} />\r\n            <SkeletonItem size={16} />\r\n          </div>\r\n        ))}\r\n      </Skeleton>\r\n    </div>\r\n  );\r\n};\r\n\r\nCardContentSkeleton.propTypes = {\r\n  rowCount: PropTypes.number,\r\n};\r\n\r\nCardContentSkeleton.defaultProps = {\r\n  rowCount: 3,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { CardContentSkeleton } from '../skeleton/card-content-skeleton';\r\nimport { MeasurementTypeCard } from '../measurement-type-card';\r\n\r\nconst noop = () => {};\r\n\r\nexport const SearchLiftLoading = ({ title }) => (\r\n  <MeasurementTypeCard\r\n    description={null}\r\n    helpId=\"pop_BA_Experiments_SearchLift\"\r\n    isAllowed={false}\r\n    isEnabled={false}\r\n    onToggle={noop}\r\n    title={title}\r\n  >\r\n    <CardContentSkeleton />\r\n  </MeasurementTypeCard>\r\n);\r\n\r\nSearchLiftLoading.propTypes = {\r\n  title: PropTypes.string.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidationGroup, withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { KeywordInput } from '../keyword/keyword-input';\r\nimport {\r\n  ADD_KEYWORDS_BY_ENTRY,\r\n  ADD_KEYWORDS_BY_SELECTION,\r\n} from '../keyword/keyword-methods';\r\nimport { KeywordSelector } from '../keyword/keyword-selector';\r\nimport { KeywordTextarea } from '../keyword/keyword-textarea';\r\nimport { MeasurementTypeCard } from '../measurement-type-card';\r\nimport { SearchCustomerId } from './search-customer-id';\r\nimport { SearchLiftLoading } from './search-lift-loading';\r\n\r\nconst SearchLiftInternal = ({\r\n  customerId,\r\n  isAllowed,\r\n  isEnabled,\r\n  keywordsMethod,\r\n  onChangeCustomerId,\r\n  onChangeKeywords,\r\n  onChangeKeywordsMethod,\r\n  onRemoveAllKeywords,\r\n  onRemoveKeyword,\r\n  onSelectKeywords,\r\n  onToggle,\r\n  selectedKeywords,\r\n  showError,\r\n  typedKeywordString,\r\n  updateValidation,\r\n}) => {\r\n  const { state: wizardState } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const title = i18n.getString(_TL_('Search lift'));\r\n  const description = i18n.getString(_TL_('Measure your brand search rate (search queries that contain your brand) by adding keywords associated with both your campaign and brand name. You can also enter your customer ID to help measure results. Note: If you use different customer IDs for your Audience and Search campaigns, please ensure that you enter the customer ID associated with your Search campaigns.'));\r\n  const isLiftTypeDisabled = !isAllowed || !isEnabled;\r\n\r\n  const hasNoKeywords = useMemo(() => {\r\n    const keywordKeys = wizardData.fetchedKeywords\r\n      ? Object.keys(wizardData.fetchedKeywords)\r\n      : [];\r\n    return keywordKeys.length === 0;\r\n  }, [wizardData.fetchedKeywords]);\r\n\r\n  const onValidateSearchLift = useCallback(({\r\n    data,\r\n    isDirty,\r\n    isValid,\r\n    messages,\r\n  }) => {\r\n    if (isValid) {\r\n      updateValidation([], data);\r\n    }\r\n\r\n    if (isDirty) {\r\n      updateValidation(messages, data);\r\n    }\r\n  }, [updateValidation]);\r\n\r\n  const validationProps = {\r\n    onValidate: onValidateSearchLift,\r\n  };\r\n\r\n  if (wizardData.isFetchingKeywords !== false) {\r\n    return (\r\n      <SearchLiftLoading title={title} />\r\n    );\r\n  }\r\n\r\n  return wizardData.fetchedKeywords && (\r\n    <ValidationGroup validationProps={validationProps}>\r\n      <MeasurementTypeCard\r\n        description={description}\r\n        helpId=\"pop_BA_Experiments_SearchLift\"\r\n        isAllowed={isAllowed}\r\n        isEnabled={isEnabled}\r\n        onToggle={onToggle}\r\n        title={title}\r\n      >\r\n        <KeywordInput\r\n          entryControl={\r\n            <KeywordTextarea\r\n              isDisabled={isLiftTypeDisabled}\r\n              keywordString={typedKeywordString}\r\n              onChange={onChangeKeywords}\r\n              showError={showError}\r\n            />\r\n          }\r\n          isDisabled={isLiftTypeDisabled}\r\n          isSelectDisabled={hasNoKeywords}\r\n          keywordsMethod={keywordsMethod}\r\n          onChangeKeywordsMethod={onChangeKeywordsMethod}\r\n          selectControl={\r\n            <KeywordSelector\r\n              fetchedKeywords={wizardData.fetchedKeywords}\r\n              isDisabled={isLiftTypeDisabled || hasNoKeywords}\r\n              onRemove={onRemoveKeyword}\r\n              onRemoveAll={onRemoveAllKeywords}\r\n              onSelect={onSelectKeywords}\r\n              orderedFetchedKeywords={wizardData.orderedFetchedKeywords}\r\n              selected={selectedKeywords}\r\n              showError={showError}\r\n              useSearchLift={wizardData.useSearchLift}\r\n            />\r\n          }\r\n        />\r\n        <SearchCustomerId\r\n          customerId={customerId}\r\n          isDisabled={isLiftTypeDisabled}\r\n          onChange={onChangeCustomerId}\r\n          showError={showError}\r\n        />\r\n      </MeasurementTypeCard>\r\n    </ValidationGroup>\r\n  );\r\n};\r\n\r\nSearchLiftInternal.propTypes = {\r\n  customerId: PropTypes.string.isRequired,\r\n  isAllowed: PropTypes.bool.isRequired,\r\n  isEnabled: PropTypes.bool,\r\n  keywordsMethod: PropTypes.oneOf([\r\n    ADD_KEYWORDS_BY_ENTRY,\r\n    ADD_KEYWORDS_BY_SELECTION,\r\n  ]),\r\n  onChangeCustomerId: PropTypes.func.isRequired,\r\n  onChangeKeywords: PropTypes.func.isRequired,\r\n  onChangeKeywordsMethod: PropTypes.func.isRequired,\r\n  onRemoveAllKeywords: PropTypes.func.isRequired,\r\n  onRemoveKeyword: PropTypes.func.isRequired,\r\n  onSelectKeywords: PropTypes.func.isRequired,\r\n  onToggle: PropTypes.func.isRequired,\r\n  selectedKeywords: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n  showError: PropTypes.bool,\r\n  typedKeywordString: PropTypes.string.isRequired,\r\n  updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nSearchLiftInternal.defaultProps = {\r\n  isEnabled: true,\r\n  keywordsMethod: null,\r\n  showError: false,\r\n};\r\n\r\nexport const SearchLift = withCustomValidation(SearchLiftInternal);\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { makeStyles } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nconst useStyles = makeStyles({\r\n  message: {\r\n    fontSize: '12px',\r\n  },\r\n  root: {\r\n    paddingBottom: '13px',\r\n    paddingTop: '10px',\r\n  },\r\n});\r\n\r\nexport const ApiSaveErrorNotification = ({ message }) => {\r\n  const styles = useStyles();\r\n\r\n  return (\r\n    <MessageBar className={styles.root} intent=\"error\">\r\n      <MessageBarBody>\r\n        <span className={styles.message}>{message}</span>\r\n      </MessageBarBody>\r\n    </MessageBar>\r\n  );\r\n};\r\n\r\nApiSaveErrorNotification.propTypes = {\r\n  message: PropTypes.string.isRequired,\r\n};\r\n","export const getActiveGoalsCount = goals => goals.filter(({ status }) => status === 'Active').length;\r\n\r\nexport const getGoalsOptionText = ({\r\n  goal,\r\n  none,\r\n  plural,\r\n  singular,\r\n}) => {\r\n  const { goals, name } = goal;\r\n  const count = getActiveGoalsCount(goals);\r\n\r\n  if (count === 0) {\r\n    return `${name} (${none})`;\r\n  }\r\n\r\n  if (count === 1) {\r\n    return `${name} (${count} ${singular})`;\r\n  }\r\n\r\n  return `${name} (${count} ${plural})`;\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Field,\r\n  Label,\r\n  Option,\r\n  useId,\r\n  Tooltip,\r\n} from '@fluentui/react-components';\r\nimport { maxTagCount } from '../../constants/maximums';\r\nimport { errorMessages } from '../../errors';\r\nimport { useMeasurementTypeSelectorStyles } from '../../styles';\r\nimport { getGoalsOptionText } from './uet-tag-selector-utils';\r\nimport { RequiredDropdown } from '../validated/required-dropdown';\r\n\r\nexport const UetTagSelector = ({\r\n  fetchedUetTags,\r\n  isDisabled,\r\n  onSelect,\r\n  orderedFetchedUetTags,\r\n  selected,\r\n  showError,\r\n  areActiveConversionGoalsMissing,\r\n}) => {\r\n  const dropdownId = useId('uetTagSelector');\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const placeholder = i18n.getString(_TL_('Select UET tag'));\r\n  const delimiter = i18n.getString(_TL_(', '));\r\n  const buttonText = useMemo(() => {\r\n    if (selected.length === 0) {\r\n      return placeholder;\r\n    }\r\n    return selected.map(tagId => fetchedUetTags[tagId].name).join(delimiter);\r\n  }, [delimiter, fetchedUetTags, placeholder, selected]);\r\n\r\n  const hoverMessage = areActiveConversionGoalsMissing ? i18n.getString(_TL_('The selected conversion lift does not have any active conversion goals')) : null;\r\n  const goalsUnit = i18n.getString(_TL_('active goal'));\r\n  const goalsUnitPlural = i18n.getString(_TL_('active goals'));\r\n  const noGoals = i18n.getString(_TL_('no active goals'));\r\n\r\n  const onOptionSelect = useCallback((e, data) => {\r\n    onSelect(data.selectedOptions);\r\n  }, [onSelect]);\r\n\r\n  const styles = useMeasurementTypeSelectorStyles();\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const onValidateUetTags = useCallback(({ isValid, messages }) => {\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n    } else {\r\n      setFieldProps({\r\n        validationMessage: i18n.getString(errorMessages[messages[0]]),\r\n        validationState: 'error',\r\n      });\r\n    }\r\n  }, [i18n]);\r\n\r\n  return (\r\n    <div>\r\n      <Label\r\n        disabled={isDisabled}\r\n        id={dropdownId}\r\n        required\r\n      >\r\n        {i18n.getString(_TL_('UET tags'))}\r\n      </Label>\r\n      <Tooltip relationship=\"description\" content={hoverMessage} withArrow visible={areActiveConversionGoalsMissing}>\r\n        <Field {...(showError ? fieldProps : null)}>\r\n          <RequiredDropdown\r\n            aria-labelledby={dropdownId}\r\n            button={<span className={styles.truncatedText}>{buttonText}</span>}\r\n            className={styles.dropdown}\r\n            disabled={isDisabled || areActiveConversionGoalsMissing}\r\n            errorMessage=\"UET_REQUIRED\"\r\n            multiselect\r\n            onOptionSelect={onOptionSelect}\r\n            validationProps={{\r\n              data: { selectedOptions: selected },\r\n              field: 'selectedOptions',\r\n              onValidate: onValidateUetTags,\r\n            }}\r\n          >\r\n            {orderedFetchedUetTags.map((goal) => {\r\n              const { id } = goal;\r\n              const isMaxedOut = selected.length === maxTagCount;\r\n              const isOptionDisabled = isMaxedOut && !selected.includes(id);\r\n\r\n              return (\r\n                <Option\r\n                  disabled={isOptionDisabled}\r\n                  key={id}\r\n                  value={id}\r\n                  className={`uet-tag-selector-option-${id}`}\r\n                >\r\n                  {getGoalsOptionText({\r\n                    goal,\r\n                    none: noGoals,\r\n                    plural: goalsUnitPlural,\r\n                    singular: goalsUnit,\r\n                  })}\r\n                </Option>\r\n              );\r\n            })}\r\n          </RequiredDropdown>\r\n        </Field>\r\n      </Tooltip>\r\n    </div>\r\n  );\r\n};\r\n\r\nUetTagSelector.propTypes = {\r\n  fetchedUetTags: PropTypes.objectOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    goalsCount: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  onSelect: PropTypes.func.isRequired,\r\n  orderedFetchedUetTags: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    goalsCount: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  selected: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n  showError: PropTypes.bool,\r\n  areActiveConversionGoalsMissing: PropTypes.bool,\r\n};\r\n\r\nUetTagSelector.defaultProps = {\r\n  showError: false,\r\n  areActiveConversionGoalsMissing: false,\r\n};\r\n","export const TRACK_BOTH_VISIT_AND_CONVERSION = 'both';\r\nexport const TRACK_CONVERSION_ONLY = 'conversion';\r\nexport const TRACK_VISIT_ONLY = 'visit';\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  RadioGroup,\r\n  Radio,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  TRACK_BOTH_VISIT_AND_CONVERSION,\r\n  TRACK_CONVERSION_ONLY,\r\n  TRACK_VISIT_ONLY,\r\n} from './visit-conversion-methods';\r\n\r\nexport const VisitConversionInput = ({\r\n  combinedControl,\r\n  conversionControl,\r\n  isDisabled,\r\n  onChangeMethod,\r\n  useConversionLift,\r\n  useVisitLift,\r\n  visitControl,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const combinedLabel = i18n.getString(_TL_('Measure visit and conversion lift'));\r\n  const conversionLabel = i18n.getString(_TL_('Measure conversion lift only'));\r\n  const visitLabel = i18n.getString(_TL_('Measure visit lift only'));\r\n\r\n  let trackingMethod = null;\r\n  if (useConversionLift && useVisitLift) {\r\n    trackingMethod = TRACK_BOTH_VISIT_AND_CONVERSION;\r\n  } else if (useConversionLift) {\r\n    trackingMethod = TRACK_CONVERSION_ONLY;\r\n  } else if (useVisitLift) {\r\n    trackingMethod = TRACK_VISIT_ONLY;\r\n  }\r\n\r\n  const onSelectRadio = useCallback((e, { value }) => {\r\n    if (value === TRACK_BOTH_VISIT_AND_CONVERSION) {\r\n      onChangeMethod({\r\n        useConversionLift: true,\r\n        useVisitLift: true,\r\n      });\r\n    } else if (value === TRACK_CONVERSION_ONLY) {\r\n      onChangeMethod({\r\n        useConversionLift: true,\r\n        useVisitLift: false,\r\n      });\r\n    } else {\r\n      onChangeMethod({\r\n        useConversionLift: false,\r\n        useVisitLift: true,\r\n      });\r\n    }\r\n  }, [onChangeMethod]);\r\n\r\n  return (\r\n    <RadioGroup\r\n      className=\"visit-conversion-radio-group\"\r\n      disabled={isDisabled}\r\n      onChange={onSelectRadio}\r\n      value={trackingMethod}\r\n    >\r\n      <Radio\r\n        label={combinedLabel}\r\n        value={TRACK_BOTH_VISIT_AND_CONVERSION}\r\n      />\r\n      {trackingMethod === TRACK_BOTH_VISIT_AND_CONVERSION && combinedControl}\r\n      <Radio\r\n        label={conversionLabel}\r\n        value={TRACK_CONVERSION_ONLY}\r\n      />\r\n      {trackingMethod === TRACK_CONVERSION_ONLY && conversionControl}\r\n      <Radio\r\n        label={visitLabel}\r\n        value={TRACK_VISIT_ONLY}\r\n      />\r\n      {trackingMethod === TRACK_VISIT_ONLY && visitControl}\r\n    </RadioGroup>\r\n  );\r\n};\r\n\r\nVisitConversionInput.propTypes = {\r\n  combinedControl: PropTypes.node.isRequired,\r\n  conversionControl: PropTypes.node.isRequired,\r\n  isDisabled: PropTypes.bool.isRequired,\r\n  onChangeMethod: PropTypes.func.isRequired,\r\n  useConversionLift: PropTypes.bool,\r\n  useVisitLift: PropTypes.bool,\r\n  visitControl: PropTypes.node.isRequired,\r\n};\r\n\r\nVisitConversionInput.defaultProps = {\r\n  useConversionLift: false,\r\n  useVisitLift: false,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { CardContentSkeleton } from '../skeleton/card-content-skeleton';\r\nimport { MeasurementTypeCard } from '../measurement-type-card';\r\n\r\nconst noop = () => {};\r\n\r\nexport const VisitConversionLiftLoading = ({ title }) => (\r\n  <MeasurementTypeCard\r\n    description={null}\r\n    helpId=\"pop_BA_Experiments_VisitsConversions\"\r\n    isAllowed={false}\r\n    isEnabled={false}\r\n    onToggle={noop}\r\n    title={title}\r\n  >\r\n    <CardContentSkeleton />\r\n  </MeasurementTypeCard>\r\n);\r\n\r\nVisitConversionLiftLoading.propTypes = {\r\n  title: PropTypes.string.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { MeasurementTypeCard } from '../measurement-type-card';\r\n\r\nconst noop = () => {};\r\n\r\nexport const VisitConversionLiftNotAllowed = ({ title }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const explanation = i18n.getString(_TL_(\"You can't measure visits or conversions because you haven't yet set up UET tags and conversion tracking.\"));\r\n  return (\r\n    <MeasurementTypeCard\r\n      description={explanation}\r\n      helpId=\"pop_BA_Experiments_VisitsConversions\"\r\n      isAllowed={false}\r\n      isEnabled={false}\r\n      onToggle={noop}\r\n      title={title}\r\n    />\r\n  );\r\n};\r\n\r\nVisitConversionLiftNotAllowed.propTypes = {\r\n  title: PropTypes.string.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Field } from '@fluentui/react-components';\r\nimport { errorMessages } from '../../errors';\r\nimport { useRadioChildControlStyles } from '../../styles';\r\nimport { UetTagSelector } from '../uet-tag/uet-tag-selector';\r\nimport { getActiveGoalsCount } from '../uet-tag/uet-tag-selector-utils';\r\nimport { MeasurementTypeCard } from '../measurement-type-card';\r\nimport { VisitConversionInput } from './visit-conversion-input';\r\nimport { VisitConversionLiftLoading } from './visit-conversion-lift-loading';\r\nimport { VisitConversionLiftNotAllowed } from './visit-conversion-lift-not-allowed';\r\n\r\nconst VisitConversionLiftInternal = ({\r\n  isEnabled,\r\n  onChangeMethod,\r\n  onSelectUetTags,\r\n  onToggle,\r\n  selectedUetTags,\r\n  showError,\r\n  updateValidation,\r\n  useConversionLift,\r\n  useVisitLift,\r\n}) => {\r\n  const { state: wizardState } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n  const styles = useRadioChildControlStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const title = i18n.getString(_TL_('Visit and conversion lift'));\r\n  const description = i18n.getString(_TL_('Measure your website visitation rate and/or conversion rate. For both measurement types, you\\'ll need to select the appropriate UET tag for your website.'));\r\n\r\n  const isAllowed = useMemo(() => {\r\n    const isFinishedFetching = !!(wizardData.fetchedUetTags && wizardData.orderedFetchedUetTags);\r\n    if (isFinishedFetching) {\r\n      return Object.keys(wizardData.fetchedUetTags).length && wizardData.orderedFetchedUetTags.length;\r\n    }\r\n    return isFinishedFetching;\r\n  }, [wizardData.fetchedUetTags, wizardData.orderedFetchedUetTags]);\r\n  const isLiftTypeDisabled = !isAllowed || !isEnabled;\r\n\r\n  const [hasLiftTypeRequiredError, setHasLiftTypeRequiredError] = useState(false);\r\n\r\n  const onToggleUseVisitConversionLift = useCallback(() => {\r\n    const newValue = !isEnabled;\r\n    if (newValue && !useConversionLift && !useVisitLift) {\r\n      updateValidation(['VISIT_CONVERSION_LIFT_REQUIRED'], { isEnabled: newValue, useConversionLift, useVisitLift });\r\n      setHasLiftTypeRequiredError(true);\r\n    } else {\r\n      setHasLiftTypeRequiredError(false);\r\n    }\r\n    onToggle();\r\n  }, [isEnabled, onToggle, updateValidation, useConversionLift, useVisitLift]);\r\n\r\n  const onChangeLiftTypeMethod = useCallback((values) => {\r\n    updateValidation([], {\r\n      isEnabled,\r\n      useConversionLift: values.useConversionLift,\r\n      useVisitLift: values.useVisitLift,\r\n    });\r\n    setHasLiftTypeRequiredError(false);\r\n    onChangeMethod(values);\r\n  }, [isEnabled, onChangeMethod, updateValidation]);\r\n\r\n  // We need to show only those UET tags with active conversion goals for the \"Measure conversion lift only\" option.\r\n  const orderedFetchedUetTagsWithActiveGoals = useMemo(() => (\r\n    !wizardData.orderedFetchedUetTags\r\n      ? null\r\n      : wizardData.orderedFetchedUetTags.filter(tag => getActiveGoalsCount(tag.goals) > 0)\r\n  ), [wizardData.orderedFetchedUetTags]);\r\n\r\n  // We should only show the conversion warning if the user has opted for both visit and conversion lift and selected\r\n  // UET tags without active conversion goals.\r\n  const [bothVisitAndConversionFieldProps, setBothVisitAndConversionFieldProps] = useState(null);\r\n\r\n  const areActiveConversionGoalsMissing = useMemo(() => (\r\n    orderedFetchedUetTagsWithActiveGoals && orderedFetchedUetTagsWithActiveGoals.length === 0\r\n  ), [orderedFetchedUetTagsWithActiveGoals]);\r\n\r\n  const onSelectWithBothVisitAndConversion = useCallback((selectedTags) => {\r\n    if (selectedTags.length > 0) {\r\n      const withActiveGoalsCount = selectedTags.reduce((sum, tagId) => {\r\n        const tagObject = wizardData.fetchedUetTags[tagId];\r\n        const activeGoalsCount = getActiveGoalsCount(tagObject.goals);\r\n        return sum + activeGoalsCount;\r\n      }, 0);\r\n      if (withActiveGoalsCount === 0) {\r\n        updateValidation(['CONVERSION_GOAL_REQUIRED'], { selectedTags });\r\n        setBothVisitAndConversionFieldProps({\r\n          validationMessage: i18n.getString(errorMessages.CONVERSION_GOAL_REQUIRED),\r\n          validationState: 'error',\r\n        });\r\n      } else {\r\n        updateValidation([], { selectedTags });\r\n        setBothVisitAndConversionFieldProps(null);\r\n      }\r\n    } else {\r\n      updateValidation([], { selectedTags });\r\n      setBothVisitAndConversionFieldProps(null);\r\n    }\r\n    onSelectUetTags(selectedTags);\r\n  }, [i18n, onSelectUetTags, updateValidation, wizardData.fetchedUetTags]);\r\n\r\n  if (!wizardData.isUetTagsFetched) {\r\n    return (\r\n      <VisitConversionLiftLoading title={title} />\r\n    );\r\n  }\r\n\r\n  if (!isAllowed) {\r\n    return (\r\n      <VisitConversionLiftNotAllowed title={title} />\r\n    );\r\n  }\r\n\r\n  return (\r\n    <MeasurementTypeCard\r\n      description={description}\r\n      helpId=\"pop_BA_Experiments_VisitsConversions\"\r\n      isAllowed={isAllowed}\r\n      isEnabled={isEnabled}\r\n      onToggle={onToggleUseVisitConversionLift}\r\n      title={title}\r\n    >\r\n      {showError && hasLiftTypeRequiredError && (\r\n        <MessageBar intent=\"error\">\r\n          <MessageBarBody>{i18n.getString(errorMessages.VISIT_CONVERSION_LIFT_REQUIRED)}</MessageBarBody>\r\n        </MessageBar>\r\n      )}\r\n      <VisitConversionInput\r\n        combinedControl={\r\n          <div className={styles.container}>\r\n            <Field {...(showError ? bothVisitAndConversionFieldProps : null)}>\r\n              <UetTagSelector\r\n                fetchedUetTags={wizardData.fetchedUetTags || null}\r\n                isDisabled={isLiftTypeDisabled}\r\n                orderedFetchedUetTags={wizardData.orderedFetchedUetTags || null}\r\n                onSelect={onSelectWithBothVisitAndConversion}\r\n                selected={selectedUetTags.both || []}\r\n                showError={showError}\r\n                areActiveConversionGoalsMissing={areActiveConversionGoalsMissing}\r\n              />\r\n            </Field>\r\n          </div>\r\n        }\r\n        conversionControl={\r\n          <div className={styles.container}>\r\n            <UetTagSelector\r\n              fetchedUetTags={wizardData.fetchedUetTags || null}\r\n              isDisabled={isLiftTypeDisabled}\r\n              orderedFetchedUetTags={orderedFetchedUetTagsWithActiveGoals}\r\n              onSelect={onSelectUetTags}\r\n              selected={selectedUetTags.conversion || []}\r\n              showError={showError}\r\n              areActiveConversionGoalsMissing={areActiveConversionGoalsMissing}\r\n            />\r\n          </div>\r\n        }\r\n        isDisabled={isLiftTypeDisabled}\r\n        onChangeMethod={onChangeLiftTypeMethod}\r\n        useConversionLift={useConversionLift}\r\n        useVisitLift={useVisitLift}\r\n        visitControl={\r\n          <div className={styles.container}>\r\n            <UetTagSelector\r\n              fetchedUetTags={wizardData.fetchedUetTags || null}\r\n              isDisabled={isLiftTypeDisabled}\r\n              orderedFetchedUetTags={wizardData.orderedFetchedUetTags || null}\r\n              onSelect={onSelectUetTags}\r\n              selected={selectedUetTags.visit || []}\r\n              showError={showError}\r\n            />\r\n          </div>\r\n        }\r\n      />\r\n    </MeasurementTypeCard>\r\n  );\r\n};\r\n\r\nVisitConversionLiftInternal.propTypes = {\r\n  isEnabled: PropTypes.bool,\r\n  onChangeMethod: PropTypes.func.isRequired,\r\n  onSelectUetTags: PropTypes.func.isRequired,\r\n  onToggle: PropTypes.func.isRequired,\r\n  selectedUetTags: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.number)).isRequired,\r\n  showError: PropTypes.bool,\r\n  updateValidation: PropTypes.func.isRequired,\r\n  useConversionLift: PropTypes.bool,\r\n  useVisitLift: PropTypes.bool,\r\n};\r\n\r\nVisitConversionLiftInternal.defaultProps = {\r\n  isEnabled: false,\r\n  showError: false,\r\n  useConversionLift: false,\r\n  useVisitLift: false,\r\n};\r\n\r\nexport const VisitConversionLift = withCustomValidation(VisitConversionLiftInternal);\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withValidation } from '@bingads-webui-react/validation';\r\nimport {\r\n  Card,\r\n  CardHeader,\r\n  Field,\r\n  Input,\r\n  Label,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { maxExperimentNameLength } from '../constants/maximums';\r\nimport { errorMessages } from '../errors';\r\nimport { cardHeaderStyles } from '../page-layout';\r\n\r\nconst useStyles = makeStyles(cardHeaderStyles);\r\n\r\nconst ValidatedInput = withValidation(Input);\r\n\r\nexport const getErrorProcessor = () => {\r\n  const customErrors = {\r\n    required: 'NAME_REQUIRED',\r\n    maxLength: 'NAME_TOO_LONG',\r\n  };\r\n  return errors => Object.entries(errors).map(([key, oldError]) => customErrors[key] || oldError);\r\n};\r\n\r\nexport const experimentNameSchema = {\r\n  name: 'Experiment Name Schema',\r\n  type: 'object',\r\n  properties: {\r\n    experimentName: {\r\n      type: 'string',\r\n      required: true,\r\n      maxLength: maxExperimentNameLength,\r\n    },\r\n  },\r\n};\r\n\r\nexport const ExperimentNameCard = ({ experimentName, onChange, showError }) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n  const experimentNameLabel = i18n.getString(_TL_('Experiment name'));\r\n\r\n  const [fieldProps, setFieldProps] = useState(null);\r\n\r\n  const onValidateExperimentName = useCallback(({ isValid, messages }) => {\r\n    if (isValid) {\r\n      setFieldProps(null);\r\n    } else {\r\n      setFieldProps({\r\n        validationMessage: i18n.getString(errorMessages[messages[0]]),\r\n        validationState: 'error',\r\n      });\r\n    }\r\n  }, [i18n]);\r\n\r\n  const errorProcessor = useCallback(getErrorProcessor(), []);\r\n\r\n  return (\r\n    <Card className=\"experiment-name-card\">\r\n      <CardHeader\r\n        header={\r\n          <div className={styles.cardHeader}>\r\n            <Label size=\"large\" className={styles.label} required>{experimentNameLabel}</Label>\r\n            <HelpButton\r\n              aria-label={`${learnMore} ${experimentNameLabel}`}\r\n              topic=\"pop_BA_Experiments_LiftName\"\r\n            />\r\n          </div>\r\n          }\r\n      />\r\n      <Field {...(showError ? fieldProps : null)}>\r\n        <ValidatedInput\r\n          type=\"text\"\r\n          name=\"experimentName\"\r\n          className=\"experiment-name-input\"\r\n          placeholder={i18n.getString(_TL_('Enter the name'))}\r\n          validationProps={{\r\n            data: { experimentName },\r\n            errorProcessor,\r\n            field: 'experimentName',\r\n            onValidate: onValidateExperimentName,\r\n            schema: experimentNameSchema,\r\n          }}\r\n          onChange={onChange}\r\n        />\r\n      </Field>\r\n    </Card>\r\n  );\r\n};\r\n\r\nExperimentNameCard.propTypes = {\r\n  experimentName: PropTypes.string,\r\n  onChange: PropTypes.func.isRequired,\r\n  showError: PropTypes.bool,\r\n};\r\n\r\nExperimentNameCard.defaultProps = {\r\n  experimentName: null,\r\n  showError: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { makeStyles } from '@fluentui/react-components';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\n\r\nconst useStyles = makeStyles({\r\n  message: {\r\n    fontSize: '12px',\r\n  },\r\n  root: {\r\n    paddingBottom: '5px',\r\n    paddingTop: '10px',\r\n  },\r\n});\r\n\r\nexport const ImpressionThresholdMessage = () => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const message = i18n.getString(_TL_('Lift measurement might not have significant/useful results if audiences associated with your selected campaign(s) have less than one million impressions when the experiment is running. Results are also not guaranteed to be significant even if the impression threshold is met.'));\r\n\r\n  return (\r\n    <MessageBar className={styles.root}>\r\n      <MessageBarBody>\r\n        <span className={styles.message}>{message}</span>\r\n      </MessageBarBody>\r\n    </MessageBar>\r\n  );\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  Text,\r\n  Subtitle2,\r\n} from '@fluentui/react-components';\r\n\r\nexport const SelectedCampaignsCard = ({ campaigns }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const cardTitle = i18n.getString(_TL_('Campaigns'));\r\n  const noContent = i18n.getString(_TL_('No campaigns selected'));\r\n  const cardContent = campaigns.length === 0\r\n    ? noContent\r\n    : campaigns.map(({ name }) => name).join(i18n.getString(_TL_(', ')));\r\n\r\n  return (\r\n    <Card className=\"selected-campaigns-card\">\r\n      <Subtitle2>{cardTitle}</Subtitle2>\r\n      <Text className=\"selected-campaigns\">{cardContent}</Text>\r\n    </Card>\r\n  );\r\n};\r\n\r\nSelectedCampaignsCard.propTypes = {\r\n  campaigns: PropTypes.arrayOf(PropTypes.shape({\r\n    name: PropTypes.string.isRequired,\r\n  })).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ValidationGroup, withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Subtitle1,\r\n  Text,\r\n  Title3,\r\n} from '@fluentui/react-components';\r\nimport { errorMessages } from '../errors';\r\nimport { stepLayoutTokens } from '../page-layout';\r\nimport { validateVisitConversionLift } from '../validate';\r\nimport { CountryCard } from './country/country-card';\r\nimport { StartDateCard } from './date/start-date-card';\r\nimport { ADD_KEYWORDS_BY_SELECTION } from './keyword/keyword-methods';\r\nimport { SearchLift } from './search-lift/search-lift';\r\nimport { ApiSaveErrorNotification } from './api-save-error-notification';\r\nimport { VisitConversionLift } from './visit-conversion-lift/visit-conversion-lift';\r\nimport { ExperimentNameCard } from './experiment-name-card';\r\nimport { ImpressionThresholdMessage } from './impression-threshold-message';\r\nimport { SelectedCampaignsCard } from './selected-campaigns-card';\r\n\r\nconst titles = {\r\n  create: _TL_('Create your lift measurement experiment'),\r\n  edit: _TL_('Edit your lift measurement experiment'),\r\n};\r\n\r\nconst ConfigureStudyStepInternal = ({ updateValidation }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const { state: wizardState, send } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n  const { showError } = wizardData;\r\n  const [hasLiftTypeRequiredError, setHasLiftTypeRequiredError] = useState(false);\r\n  const selectedCampaigns = useMemo(() => (\r\n    wizardData.selectedCampaignsById\r\n      ? Object.values(wizardData.selectedCampaignsById).map(campaign => ({ name: campaign.Name }))\r\n      : []\r\n  ), [wizardData.selectedCampaignsById]);\r\n\r\n  // Localized strings.\r\n  const title = i18n.getString(titles[wizardData.intent]);\r\n  const instructions = i18n.getString(_TL_('Lift measurement experiments provide reports on the branch search rate, website visitation rate, and conversion rate for your Audience campaigns (Display, Native, Online Video, and Feed-based). These measurements help you understand how much more likely consumers are to search for your brand, visit your website, and make purchases after seeing your Audience ads.'));\r\n  const measurementSectionHeader = i18n.getString(_TL_('Measurement types'));\r\n\r\n  const onChangeExperimentName = useCallback((event) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { experimentName: event.target.value });\r\n  }, [send]);\r\n\r\n  const onChangeStartDate = useCallback((startDate) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { startDate });\r\n  }, [send]);\r\n\r\n  const onChangeCountry = useCallback((country) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { country });\r\n  }, [send]);\r\n\r\n  const onToggleUseSearchLift = useCallback(() => {\r\n    const newValue = !wizardData.useSearchLift;\r\n\r\n    if (!newValue && !wizardData.useConversionLift && !wizardData.useVisitLift) {\r\n      updateValidation(['MEASUREMENT_TYPE_REQUIRED']);\r\n      setHasLiftTypeRequiredError(true);\r\n    } else {\r\n      setHasLiftTypeRequiredError(false);\r\n    }\r\n\r\n    setClarityTag({\r\n      IsLiftExperimentUsingSearchLift: newValue,\r\n    });\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { useSearchLift: newValue });\r\n  }, [send, updateValidation, wizardData.useConversionLift, wizardData.useSearchLift, wizardData.useVisitLift]);\r\n\r\n  const onChangeKeywords = useCallback((typedKeywordString) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { typedKeywordString });\r\n  }, [send]);\r\n\r\n  const onChangeKeywordsMethod = useCallback((method) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { keywordsMethod: method });\r\n  }, [send]);\r\n\r\n  const onRemoveAllKeywords = useCallback(() => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { selectedKeywords: [] });\r\n  }, [send]);\r\n\r\n  const onRemoveKeyword = useCallback((removedId) => {\r\n    const filteredKeywords = wizardData.selectedKeywords.filter(keywordId => keywordId !== removedId);\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { selectedKeywords: filteredKeywords });\r\n  }, [send, wizardData.selectedKeywords]);\r\n\r\n  const onSelectKeywords = useCallback((selectedWords) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { selectedKeywords: [...selectedWords] });\r\n  }, [send]);\r\n\r\n  const onChangeCustomerId = useCallback((cid) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { searchCid: cid });\r\n  }, [send]);\r\n\r\n  const [hasUETTagsSelectionError, setHasUETTagsSelectionError] = useState(false);\r\n  const onToggleUseVisitConversionLift = useCallback(() => {\r\n    const isNowToggledOn = !wizardData.useVisitConversionLift;\r\n    if (isNowToggledOn) {\r\n      send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { useVisitConversionLift: true });\r\n    } else {\r\n      setHasUETTagsSelectionError(false);\r\n      send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { useVisitConversionLift: false, useVisitLift: false, useConversionLift: false });\r\n    }\r\n  }, [send, wizardData.useVisitConversionLift]);\r\n\r\n  const onChangeVisitConversionLiftMethod = useCallback((values) => {\r\n    if (!wizardData.useSearchLift && !values.useConversionLift && !values.useVisitLift) {\r\n      updateValidation(['MEASUREMENT_TYPE_REQUIRED']);\r\n      setHasLiftTypeRequiredError(true);\r\n    } else {\r\n      setHasLiftTypeRequiredError(false);\r\n    }\r\n\r\n    setClarityTag({\r\n      IsLiftExperimentUsingConversionLift: values.useConversionLift,\r\n      IsLiftExperimentUsingVisitLift: values.useVisitLift,\r\n    });\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n      useConversionLift: values.useConversionLift,\r\n      useVisitLift: values.useVisitLift,\r\n    });\r\n  }, [send, updateValidation, wizardData.useSearchLift]);\r\n\r\n  const onSelectUetTags = useCallback((selectedTags) => {\r\n    let key;\r\n\r\n    if (wizardData.useConversionLift && wizardData.useVisitLift) {\r\n      key = 'both';\r\n    } else if (wizardData.useConversionLift) {\r\n      key = 'conversion';\r\n    } else {\r\n      key = 'visit';\r\n    }\r\n    setHasUETTagsSelectionError(false);\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n      uetTags: {\r\n        ...wizardData.uetTags,\r\n        [key]: [...selectedTags],\r\n      },\r\n    });\r\n  }, [send, wizardData]);\r\n\r\n  const onValidate = useCallback(({ isValid }) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isValid });\r\n  }, [send]);\r\n\r\n  useEffect(() => {\r\n    const isTagsSelectionValid = validateVisitConversionLift(wizardData);\r\n    if (showError && !isTagsSelectionValid) {\r\n      setHasUETTagsSelectionError(true);\r\n    }\r\n  }, [showError, wizardData]);\r\n\r\n  return (\r\n    <ValidationGroup validationProps={{ onValidate }}>\r\n      <Stack tokens={stepLayoutTokens} className=\"configure-study-step\">\r\n        <Title3>{title}</Title3>\r\n        <Text>\r\n          <LearnMoreLink\r\n            linkText={i18n.getString(_TL_('Learn more'))}\r\n            text={instructions}\r\n            topic=\"app54859\"\r\n          />\r\n        </Text>\r\n        {wizardData.apiSaveErrorMessage ? (\r\n          <ApiSaveErrorNotification message={wizardData.apiSaveErrorMessage} />\r\n        ) : (\r\n          <ImpressionThresholdMessage />\r\n        )}\r\n        <SelectedCampaignsCard campaigns={selectedCampaigns} />\r\n        <ExperimentNameCard\r\n          experimentName={wizardData.experimentName || ''}\r\n          onChange={onChangeExperimentName}\r\n          showError={showError}\r\n        />\r\n        <StartDateCard\r\n          startDate={wizardData.startDate || null}\r\n          onChangeStartDate={onChangeStartDate}\r\n          showError={showError}\r\n        />\r\n        <CountryCard\r\n          country={wizardData.country || null}\r\n          onChangeCountry={onChangeCountry}\r\n          showError={showError}\r\n        />\r\n        <Subtitle1>{measurementSectionHeader}</Subtitle1>\r\n        {showError && hasLiftTypeRequiredError && (\r\n          <MessageBar intent=\"error\">\r\n            <MessageBarBody>{i18n.getString(errorMessages.MEASUREMENT_TYPE_REQUIRED)}</MessageBarBody>\r\n          </MessageBar>\r\n        )}\r\n        {showError && hasUETTagsSelectionError && (\r\n          <MessageBar intent=\"error\">\r\n            <MessageBarBody>{i18n.getString(errorMessages.UET_TAG_SELECTION_REQUIRED)}</MessageBarBody>\r\n          </MessageBar>\r\n        )}\r\n        <SearchLift\r\n          customerId={wizardData.searchCid || ''}\r\n          isAllowed\r\n          isEnabled={!!wizardData.useSearchLift}\r\n          keywordsMethod={wizardData.keywordsMethod || ADD_KEYWORDS_BY_SELECTION}\r\n          onChangeCustomerId={onChangeCustomerId}\r\n          onChangeKeywords={onChangeKeywords}\r\n          onChangeKeywordsMethod={onChangeKeywordsMethod}\r\n          onRemoveAllKeywords={onRemoveAllKeywords}\r\n          onRemoveKeyword={onRemoveKeyword}\r\n          onSelectKeywords={onSelectKeywords}\r\n          onToggle={onToggleUseSearchLift}\r\n          selectedKeywords={wizardData.selectedKeywords || []}\r\n          showError={showError}\r\n          typedKeywordString={wizardData.typedKeywordString || ''}\r\n        />\r\n        <VisitConversionLift\r\n          isEnabled={!!wizardData.useVisitConversionLift}\r\n          onChangeMethod={onChangeVisitConversionLiftMethod}\r\n          onSelectUetTags={onSelectUetTags}\r\n          onToggle={onToggleUseVisitConversionLift}\r\n          selectedUetTags={wizardData.uetTags}\r\n          showError={showError}\r\n          useConversionLift={!!wizardData.useConversionLift}\r\n          useVisitLift={!!wizardData.useVisitLift}\r\n        />\r\n      </Stack>\r\n    </ValidationGroup>\r\n  );\r\n};\r\n\r\nConfigureStudyStepInternal.propTypes = {\r\n  updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ConfigureStudyStep = withCustomValidation(ConfigureStudyStepInternal);\r\n","import { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\n\r\nexport const conversionGoalFields = [\r\n  'Id',\r\n  'Name',\r\n  'Status',\r\n  'Tag',\r\n];\r\n\r\nexport const fetchConversionGoal = ({\r\n  count,\r\n  scope,\r\n  tagId,\r\n}) => {\r\n  const { currentAccount } = getEntityFromScope(scope);\r\n  const filters = ['Status eq \\'Active\\''];\r\n\r\n  if (tagId != null) {\r\n    const tagIdFilter = Array.isArray(tagId)\r\n      ? `Tag/Id in [${tagId.join(', ')}]`\r\n      : `Tag/Id eq ${tagId}`;\r\n    filters.push(tagIdFilter);\r\n  }\r\n\r\n  const query = {\r\n    filter: {\r\n      where: filters.join(' and '),\r\n    },\r\n    select: [...conversionGoalFields],\r\n    top: count || 20,\r\n  };\r\n\r\n  return currentAccount.Goals['Default.GetConversionGoals']\r\n    .$makeCall({ query })\r\n    .toPromise();\r\n};\r\n\r\nexport const transformFetchedGoal = fetchedGoal => ({\r\n  id: fetchedGoal.Id,\r\n  name: fetchedGoal.Name,\r\n  status: fetchedGoal.Status,\r\n});\r\n","import { useCallback, useContext } from 'react';\r\nimport dateUtils from '@bingads-webui-component-legacy/humanize/date';\r\nimport { notificationApi } from '@bingads-webui-campaign/notification-center';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { fetchConversionGoal, transformFetchedGoal } from '../../fetch/conversion';\r\nimport { fetchKeywords } from '../../fetch/keywords';\r\nimport { fetchUetTags, getFetchedTagCollections, getFetchedTagsWithGoalsIds } from '../../fetch/uet';\r\nimport { EDIT_INTENT } from '../constants/intents';\r\nimport { maxFetchedGoalsCount, maxFetchedKeywordsCount, maxFetchedTagsCount } from '../constants/maximums';\r\nimport { createMeasurementTypeEnum, saveExperiment, updateExperiment } from '../../fetch/experiment';\r\nimport { API_DATE_FORMAT } from '../date';\r\nimport { errorMessages } from '../errors';\r\nimport { getKeywords, getUETTags } from '../utils';\r\nimport { validateLiftExperiment } from '../validate';\r\nimport { ADD_KEYWORDS_BY_ENTRY } from './keyword/keyword-methods';\r\n\r\nconst onFetchKeywordsSuccess = ({ send }) => (keywords) => {\r\n  const orderedFetchedKeywords = [];\r\n  const fetchedKeywords = {};\r\n\r\n  keywords.forEach((keyword) => {\r\n    const fetchedKeyword = {\r\n      id: keyword.Id,\r\n      name: keyword.Text,\r\n      status: keyword.Status,\r\n      impressions: keyword.PerformanceMetrics && keyword.PerformanceMetrics.Impressions,\r\n    };\r\n    orderedFetchedKeywords.push(fetchedKeyword);\r\n    fetchedKeywords[keyword.Id] = { ...fetchedKeyword };\r\n  });\r\n\r\n  const updatedWizardData = {\r\n    fetchedKeywords,\r\n    isFetchingKeywords: false,\r\n    orderedFetchedKeywords,\r\n  };\r\n\r\n  if (orderedFetchedKeywords.length === 0) {\r\n    updatedWizardData.keywordsMethod = ADD_KEYWORDS_BY_ENTRY;\r\n  }\r\n\r\n  send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, updatedWizardData);\r\n};\r\n\r\nconst onFetchUetTagsFailure = ({ i18n, msg, send }) => () => {\r\n  notificationApi.showWarning(i18n.getString(msg));\r\n  send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isUetTagsFetched: true });\r\n};\r\n\r\nconst onFetchUetTagsSuccess = ({ i18n, scope, send }) => (data) => {\r\n  const { fetchedTags, fetchedTagsAsArray } = getFetchedTagCollections(data);\r\n  const tagsWithGoalsIds = getFetchedTagsWithGoalsIds(fetchedTagsAsArray);\r\n\r\n  if (tagsWithGoalsIds.length > 0) {\r\n    // For any fetched tags that have associated conversion goals, we need to fetch those goals and add them to the\r\n    // tag before setting the fetch results in state.\r\n    const msg = _TL_('Failed to fetch conversion goals.');\r\n    fetchConversionGoal({\r\n      count: maxFetchedGoalsCount,\r\n      scope,\r\n      tagId: tagsWithGoalsIds,\r\n    })\r\n      .then(({ value }) => {\r\n        value.forEach((goal) => {\r\n          fetchedTags[goal.Tag.Id].goals.push(transformFetchedGoal(goal));\r\n        });\r\n        send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n          fetchedUetTags: fetchedTags,\r\n          isUetTagsFetched: true,\r\n          orderedFetchedUetTags: fetchedTagsAsArray,\r\n        });\r\n      })\r\n      .catch(onFetchUetTagsFailure({ i18n, msg, send }));\r\n  } else {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n      fetchedUetTags: fetchedTags,\r\n      isUetTagsFetched: true,\r\n      orderedFetchedUetTags: fetchedTagsAsArray,\r\n    });\r\n  }\r\n};\r\n\r\nexport const useConfigureStudyRepository = () => {\r\n  const { scope } = useContext(ScopeContext);\r\n  const { state: wizardState, send } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n  const isEdit = wizardData.intent === EDIT_INTENT;\r\n\r\n  const i18n = useContext(I18nContext);\r\n\r\n  const load = useCallback(() => new Promise((resolve) => {\r\n    if (wizardData.isFetchingKeywords == null) {\r\n      wizardData.isFetchingKeywords = true;\r\n      fetchKeywords({\r\n        count: maxFetchedKeywordsCount,\r\n        scope,\r\n      })\r\n        .then(onFetchKeywordsSuccess({ send }))\r\n        .catch((error) => {\r\n          notificationApi.showWarning(i18n.getString(_TL_('Failed to fetch keywords: {{ responseText }}'), { responseText: error.responseText }));\r\n          send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isFetchingKeywords: false });\r\n        });\r\n    }\r\n\r\n    if (!wizardData.isUetTagsFetched) {\r\n      const msg = _TL_('Failed to fetch UET tags.');\r\n      fetchUetTags({\r\n        count: maxFetchedTagsCount,\r\n        onFailure: onFetchUetTagsFailure({ i18n, msg, send }),\r\n        onSuccess: onFetchUetTagsSuccess({ i18n, scope, send }),\r\n        scope,\r\n      });\r\n    }\r\n\r\n    setTimeout(() => resolve({}), 1000);\r\n  }), [i18n, scope, send, wizardData.isFetchingKeywords, wizardData.isUetTagsFetched]);\r\n\r\n  const onFailure = useCallback((message) => {\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { apiSaveErrorMessage: message });\r\n  }, [send]);\r\n\r\n  const save = useCallback(async () => {\r\n    if (!validateLiftExperiment(wizardData)) {\r\n      send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { showError: true });\r\n      const saveValidationError = new Error(i18n.getString(errorMessages.SAVE_VALIDATION_FAILED));\r\n      return Promise.reject(saveValidationError);\r\n    }\r\n\r\n    const payload = {\r\n      Campaigns: Object.keys(wizardData.selectedCampaignsById).map(idAsString => Number(idAsString)),\r\n      Country: wizardData.country,\r\n      Keywords: getKeywords(wizardData),\r\n      MeasurementType: createMeasurementTypeEnum({\r\n        useConversionLift: wizardData.useConversionLift,\r\n        useSearchLift: wizardData.useSearchLift,\r\n        useVisitLift: wizardData.useVisitLift,\r\n      }),\r\n      Name: wizardData.experimentName,\r\n      StartDate: dateUtils.toString(wizardData.startDate, API_DATE_FORMAT),\r\n      SearchCustomerId: wizardData.searchCid ? Number(wizardData.searchCid) : null,\r\n      UETTags: getUETTags(wizardData),\r\n    };\r\n\r\n    let saveResult;\r\n    if (isEdit) {\r\n      payload.Id = scope.values.liftExperimentId;\r\n      saveResult = await updateExperiment(scope.values, { payload, onSuccess: () => { }, onFailure });\r\n    } else {\r\n      saveResult = await saveExperiment(scope.values, { payload, onSuccess: () => { }, onFailure });\r\n    }\r\n\r\n    return saveResult.isAPISaveFailure ? Promise.reject(saveResult.error) : Promise.resolve({});\r\n  }, [i18n, isEdit, onFailure, scope.values, send, wizardData]);\r\n\r\n  return {\r\n    load,\r\n    save,\r\n  };\r\n};\r\n","import { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\n\r\nexport const fetchUetTags = ({\r\n  count,\r\n  onFailure,\r\n  onSuccess,\r\n  scope,\r\n}) => {\r\n  const { currentAccount } = getEntityFromScope(scope);\r\n  const currentAccountTagsObservable = currentAccount.Tags.get({\r\n    top: count,\r\n    select: [\r\n      'Id',\r\n      'Name',\r\n      'Status',\r\n      'GoalsCount',\r\n    ],\r\n    orderby: [\r\n      ['GoalsCount', 'desc'],\r\n    ],\r\n    filter: {\r\n      where: 'Status eq \\'Active\\'',\r\n    },\r\n  });\r\n\r\n  return currentAccountTagsObservable.subscribe({\r\n    next: onSuccess,\r\n    error: onFailure,\r\n  });\r\n};\r\n\r\nexport const transformFetchedUetTag = fetchedTag => ({\r\n  id: fetchedTag.Id,\r\n  name: fetchedTag.Name,\r\n  status: fetchedTag.Status,\r\n  goals: [],\r\n  goalsCount: fetchedTag.GoalsCount,\r\n});\r\n\r\nexport const getFetchedTagCollections = (data) => {\r\n  const fetchedTags = {};\r\n  const fetchedTagsAsArray = [];\r\n\r\n  data.value.forEach((fetchedTag) => {\r\n    const uetTag = transformFetchedUetTag(fetchedTag);\r\n    fetchedTagsAsArray.push(uetTag);\r\n    fetchedTags[fetchedTag.Id] = uetTag;\r\n  });\r\n\r\n  return {\r\n    fetchedTags,\r\n    fetchedTagsAsArray,\r\n  };\r\n};\r\n\r\nexport const getFetchedTagsWithGoalsIds = fetchedTags => fetchedTags\r\n  .filter(fetchedTag => fetchedTag.goalsCount > 0)\r\n  .map(fetchedTag => fetchedTag.id);\r\n","export const CAMPAIGN_PAUSED_STATUSES = [\r\n  'UserPaused',\r\n  'BudgetPaused',\r\n  'BudgetUserPaused',\r\n];\r\n\r\nexport const CAMPAIGN_TYPE_DISPLAY = _TL_('Display');\r\nexport const CAMPAIGN_TYPE_NATIVE = _TL_('Native');\r\nexport const CAMPAIGN_TYPE_ONLINE_VIDEO = _TL_('Online video');\r\nexport const CAMPAIGN_TYPE_FEED_BASED = _TL_('Feed-based');\r\n\r\nexport const DEFAULT_CAMPAIGN_SUBTYPE_FILTER = \"CampaignSubType in ['AudienceDynamicFeedBased', 'AudienceFeedBased', 'AudienceStatic', 'AudienceVideoAds', 'BrandAwarenessVideoAds', 'DisplayAds']\";\r\n","export const getSelectedCampaignsGridColumns = (i18n => [{\r\n  key: 'CampaignName',\r\n  name: i18n.getString(_TL_('Campaign name')),\r\n  fieldName: 'Name',\r\n}]);\r\n","export const budgetFormatOptions = {\r\n  compact: 'short',\r\n  minimumFractionDigits: 2,\r\n  maximumFractionDigits: 2,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n  createTableColumn,\r\n  DataGrid,\r\n  DataGridBody,\r\n  DataGridCell,\r\n  DataGridHeader,\r\n  DataGridHeaderCell,\r\n  DataGridRow,\r\n  Spinner,\r\n  TableCellLayout,\r\n} from '@fluentui/react-components';\r\nimport { Pause12Filled, PresenceBusy12Filled } from '@fluentui/react-icons';\r\nimport { budgetFormatOptions } from '../../constants/budget-format-options';\r\nimport {\r\n  CAMPAIGN_PAUSED_STATUSES,\r\n  CAMPAIGN_TYPE_DISPLAY,\r\n  CAMPAIGN_TYPE_FEED_BASED,\r\n  CAMPAIGN_TYPE_NATIVE,\r\n  CAMPAIGN_TYPE_ONLINE_VIDEO,\r\n} from '../../constants/campaign';\r\nimport { EDIT_INTENT } from '../../constants/intents';\r\nimport { useSelectCampaignGridStyles } from '../../styles';\r\n\r\nconst getCampaignSubtypeText = (subType) => {\r\n  switch (subType) {\r\n    case 'AudienceStatic':\r\n      return CAMPAIGN_TYPE_NATIVE;\r\n    case 'BrandAwarenessVideoAds':\r\n    case 'AudienceVideoAds':\r\n      return CAMPAIGN_TYPE_ONLINE_VIDEO;\r\n    case 'AudienceFeedBased':\r\n    case 'AudienceDynamicFeedBased':\r\n      return CAMPAIGN_TYPE_FEED_BASED;\r\n    case 'DisplayAds':\r\n    default:\r\n      return CAMPAIGN_TYPE_DISPLAY;\r\n  }\r\n};\r\n\r\nconst getAudienceTargetingText = (targetingEnabled) => {\r\n  if (targetingEnabled === null) {\r\n    return _TL_('');\r\n  }\r\n\r\n  return targetingEnabled ? _TL_('Enabled') : _TL_('Disabled');\r\n};\r\n\r\nconst getColumns = ({ CurrencyCode, i18n }) => [\r\n  createTableColumn({\r\n    columnId: 'Name',\r\n    compare: (a, b) => a.Name.localeCompare(b.Name),\r\n    renderCell: ((campaign) => {\r\n      let nameIcon = <PresenceBusy12Filled primaryFill=\"#0F7C0F\" />;\r\n      if (CAMPAIGN_PAUSED_STATUSES.includes(campaign.Status)) {\r\n        nameIcon = <Pause12Filled primaryFill=\"#262626\" />;\r\n      } else if (!campaign.IsAudienceTargetingEnabled) {\r\n        nameIcon = <PresenceBusy12Filled primaryFill=\"#262626\" />;\r\n      }\r\n      return (\r\n        <TableCellLayout media={nameIcon} truncate>\r\n          {campaign.Name}\r\n        </TableCellLayout>\r\n      );\r\n    }),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Campaign name')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'CampaignSubType',\r\n    renderCell: campaign => i18n.getString(getCampaignSubtypeText(campaign.CampaignSubType)),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Campaign type')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'IsAudienceTargetingEnabled',\r\n    renderCell: campaign => i18n.getString(getAudienceTargetingText(campaign.IsAudienceTargetingEnabled)),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Audience targeting')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'DailyTargetBudgetAmount',\r\n    compare: (a, b) => a.DailyTargetBudgetAmount - b.DailyTargetBudgetAmount,\r\n    renderCell: campaign => i18n.formatCurrency(campaign.DailyTargetBudgetAmount, CurrencyCode, budgetFormatOptions),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Budget per day')),\r\n  }),\r\n  createTableColumn({\r\n    columnId: 'IsEligibleForMSANLiftExperiment',\r\n    compare: (a, b) => a.IsEligibleForMSANLiftExperiment - b.IsEligibleForMSANLiftExperiment,\r\n    renderCell: campaign => i18n.getString(campaign.IsEligibleForMSANLiftExperiment ? _TL_('Eligible') : _TL_('Ineligible')),\r\n    renderHeaderCell: () => i18n.getString(_TL_('Campaign eligibility')),\r\n  }),\r\n];\r\n\r\nconst SelectCampaignsGridInternal = ({\r\n  onCampaignsChange,\r\n  serverContext,\r\n}) => {\r\n  const styles = useSelectCampaignGridStyles();\r\n\r\n  const { CurrentAccount } = serverContext;\r\n  const { CurrencyCode } = CurrentAccount;\r\n\r\n  const { dispatch, state } = useContext(GridContext);\r\n  const { state: wizardState, send } = useWizardService();\r\n  const i18n = useContext(I18nContext);\r\n  const columns = getColumns({ CurrencyCode, i18n });\r\n\r\n  const onChangeSelectedCampaigns = useCallback((_event, { selectedItems }) => {\r\n    const { selectedCampaignsById } = wizardState.context.wizardData;\r\n\r\n    const eligibleCampaigns = state.items ? state.items.filter(campaign => campaign.IsEligibleForMSANLiftExperiment) : [];\r\n    // Datagrid nas no notion of disabled items, so once something on page is selected - it always gives you back the entire page when clicking select all\r\n    const isSelectAll = selectedItems.size >= state.pagination.pageSize;\r\n    if (isSelectAll) {\r\n      const isAllEligibleCampaignsSelected = eligibleCampaigns.every(campaign => selectedCampaignsById[campaign.Id]);\r\n      if (isAllEligibleCampaignsSelected) {\r\n        eligibleCampaigns.forEach((campaign) => {\r\n          delete selectedCampaignsById[campaign.Id];\r\n        });\r\n      } else {\r\n        eligibleCampaigns.forEach((campaign) => {\r\n          selectedCampaignsById[campaign.Id] = campaign;\r\n        });\r\n      }\r\n    } else {\r\n      eligibleCampaigns.forEach((campaign) => {\r\n        if (selectedItems.has(campaign.Id)) {\r\n          selectedCampaignsById[campaign.Id] = campaign;\r\n        } else if (selectedCampaignsById[campaign.Id]) {\r\n          delete selectedCampaignsById[campaign.Id];\r\n        }\r\n      });\r\n    }\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { selectedCampaignsById });\r\n    onCampaignsChange({ count: Object.keys(selectedCampaignsById).length });\r\n  }, [onCampaignsChange, send, state.items, state.pagination.pageSize, wizardState.context.wizardData]);\r\n\r\n  const selectedItems = useMemo(() => {\r\n    const selectedCampaignsIds = Object.keys(wizardState.context.wizardData.selectedCampaignsById).map(idAsString => Number(idAsString));\r\n    return new Set(selectedCampaignsIds);\r\n    // eslint-disable-next-line\r\n  }, [wizardState.context.wizardData.selectedCampaignsById, Object.keys(wizardState.context.wizardData.selectedCampaignsById).length]);\r\n\r\n  const onSortChange = useCallback((e, { sortColumn, sortDirection }) => {\r\n    dispatch({\r\n      type: 'UPDATE_SORTED_COLUMN',\r\n      payload: {\r\n        ...state.sortedColumn,\r\n        fieldName: sortColumn,\r\n        isSortDescending: sortDirection === 'descending',\r\n      },\r\n    });\r\n  }, [dispatch, state]);\r\n\r\n  const { isInitialized, intent } = wizardState.context.wizardData;\r\n  const isEdit = intent === EDIT_INTENT;\r\n  return (\r\n    <DataGrid\r\n      columns={columns}\r\n      getRowId={campaign => campaign.Id}\r\n      items={state.items || []}\r\n      onSelectionChange={onChangeSelectedCampaigns}\r\n      onSortChange={onSortChange}\r\n      selectionMode=\"multiselect\"\r\n      sortable\r\n      selectedItems={selectedItems}\r\n    >\r\n      <DataGridHeader>\r\n        <DataGridRow\r\n          select\r\n          selectionCell={{\r\n            checkboxIndicator: { 'aria-label': i18n.getString(_TL_('Select all campaigns')) },\r\n          }}\r\n        >\r\n          {({ renderHeaderCell }) => (\r\n            <DataGridHeaderCell>{renderHeaderCell()}</DataGridHeaderCell>\r\n          )}\r\n        </DataGridRow>\r\n      </DataGridHeader>\r\n      {((isEdit && !isInitialized) || state.items === null) ? (\r\n        <Spinner className={styles.spinner} label={i18n.getString(_TL_('Loading campaigns...'))} />\r\n      ) : (\r\n        <DataGridBody>\r\n          {({ item, rowId }) => (\r\n            <DataGridRow\r\n              className={item.IsEligibleForMSANLiftExperiment ? styles.dataGridRow : styles.dataGridRowDisabled}\r\n              key={rowId}\r\n              selectionCell={{\r\n                checkboxIndicator: { 'aria-label': i18n.getString(_TL_('Select campaign')) },\r\n              }}\r\n            >\r\n              {({ renderCell }) => (\r\n                <DataGridCell className={styles.selectCampaignTableCell}>\r\n                  {renderCell(item)}\r\n                </DataGridCell>\r\n              )}\r\n            </DataGridRow>\r\n          )}\r\n        </DataGridBody>\r\n      )}\r\n    </DataGrid>\r\n  );\r\n};\r\n\r\nSelectCampaignsGridInternal.propTypes = {\r\n  onCampaignsChange: PropTypes.func.isRequired,\r\n  serverContext: PropTypes.shape({\r\n    CurrentAccount: PropTypes.shape({\r\n      CurrencyCode: PropTypes.string.isRequired,\r\n    }).isRequired,\r\n  }).isRequired,\r\n};\r\n\r\nexport const SelectCampaignsGrid = withServerContext(SelectCampaignsGridInternal);\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Dropdown, Input, Option } from '@fluentui/react-components';\r\nimport { SearchRegular } from '@fluentui/react-icons';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  CAMPAIGN_TYPE_DISPLAY,\r\n  CAMPAIGN_TYPE_FEED_BASED,\r\n  CAMPAIGN_TYPE_NATIVE,\r\n  CAMPAIGN_TYPE_ONLINE_VIDEO,\r\n  DEFAULT_CAMPAIGN_SUBTYPE_FILTER,\r\n} from '../../constants/campaign';\r\nimport { useFilterDropdownStyles } from '../../styles';\r\n\r\nconst campaignTypes = [\r\n  CAMPAIGN_TYPE_DISPLAY,\r\n  CAMPAIGN_TYPE_NATIVE,\r\n  CAMPAIGN_TYPE_ONLINE_VIDEO,\r\n  CAMPAIGN_TYPE_FEED_BASED,\r\n];\r\n\r\nconst debouncedEditableFilterDispatch = _.debounce((currentEditableFilterPayload, dispatch) => dispatch({ type: 'SET_EDITABLE_FILTER', payload: currentEditableFilterPayload }), 300);\r\n\r\nexport const SelectCampaignsToolbar = () => {\r\n  const styles = useFilterDropdownStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const searchBoxPlaceholder = i18n.getString(_TL_('Search campaigns'));\r\n  const inputLabel = i18n.getString(_TL_('Campaign name search'));\r\n  const dropdownPlaceholder = i18n.getString(_TL_('Campaign types: All'));\r\n  const dropdownLabel = i18n.getString(_TL_('Campaign type filter'));\r\n\r\n  const { dispatch } = useContext(GridContext);\r\n  const [campaignSearchText, setCampaignSearchText] = useState('');\r\n  const [selectedCampaignTypes, setSelectedCampaignTypes] = useState([]);\r\n\r\n  const dropdownButtonText = useMemo(\r\n    () => {\r\n      if (selectedCampaignTypes.length === 0) {\r\n        return dropdownPlaceholder;\r\n      }\r\n      const formattedSelectionText = selectedCampaignTypes.join(i18n.getString(_TL_(', ')));\r\n      const statusText = selectedCampaignTypes.length > 1 ? i18n.getString(_TL_('Campaign types:')) : i18n.getString(_TL_('Campaign type:'));\r\n      return `${statusText} ${formattedSelectionText}`;\r\n    },\r\n    [i18n, dropdownPlaceholder, selectedCampaignTypes]\r\n  );\r\n\r\n  const currentEditableFilterPayload = useMemo(() => {\r\n    const filterPayloadBase = `contains(tolower(Name), '${campaignSearchText.toLowerCase()}')`;\r\n    if (selectedCampaignTypes.length) {\r\n      const formattedCampaignSubTypes = selectedCampaignTypes.map((campaignSubTypeDisplayText) => {\r\n        switch (campaignSubTypeDisplayText) {\r\n          case CAMPAIGN_TYPE_DISPLAY:\r\n            return 'DisplayAds';\r\n          case CAMPAIGN_TYPE_NATIVE:\r\n            return 'AudienceStatic';\r\n          case CAMPAIGN_TYPE_FEED_BASED:\r\n            return \"AudienceDynamicFeedBased', 'AudienceFeedBased\";\r\n          case CAMPAIGN_TYPE_ONLINE_VIDEO:\r\n          default:\r\n            return \"AudienceVideoAds', 'BrandAwarenessVideoAds\";\r\n        }\r\n      });\r\n      const formattedFilter = formattedCampaignSubTypes.map(campaignSubType => `'${campaignSubType}'`).join(', ');\r\n      return `${filterPayloadBase} and CampaignSubType in [${formattedFilter}]`;\r\n    }\r\n    return `${filterPayloadBase} and ${DEFAULT_CAMPAIGN_SUBTYPE_FILTER}`;\r\n  }, [campaignSearchText, selectedCampaignTypes]);\r\n\r\n  useEffect(() => {\r\n    debouncedEditableFilterDispatch(currentEditableFilterPayload, dispatch);\r\n  }, [currentEditableFilterPayload, dispatch]);\r\n\r\n  const onChangeSearchInput = useCallback((_e, { value }) => {\r\n    setCampaignSearchText(value);\r\n  }, []);\r\n\r\n  const onOptionSelect = useCallback((_e, data) => {\r\n    setSelectedCampaignTypes(data.selectedOptions);\r\n  }, []);\r\n\r\n  return (\r\n    <Stack horizontal horizontalAlign=\"space-between\">\r\n      <Input\r\n        className=\"campaigns-search-filter\"\r\n        aria-label={inputLabel}\r\n        contentBefore={<SearchRegular />}\r\n        onChange={onChangeSearchInput}\r\n        placeholder={searchBoxPlaceholder}\r\n        value={campaignSearchText}\r\n      />\r\n      <Dropdown\r\n        className=\"campaign-type-filter\"\r\n        aria-label={dropdownLabel}\r\n        placeholder={dropdownPlaceholder}\r\n        button={\r\n          <span className={styles.truncatedText}>{dropdownButtonText}</span>\r\n        }\r\n        data-selectedOptions={selectedCampaignTypes.length ? selectedCampaignTypes : dropdownPlaceholder}\r\n        multiselect\r\n        onOptionSelect={onOptionSelect}\r\n        selectedOptions={selectedCampaignTypes}\r\n      >\r\n        {campaignTypes.map(campaignType => (\r\n          <Option\r\n            key={campaignType}\r\n            value={campaignType}\r\n            className={`campaign-type-selector-option-${campaignType}`}\r\n          >\r\n            {i18n.getString(campaignType)}\r\n          </Option>\r\n        ))}\r\n      </Dropdown>\r\n    </Stack>\r\n  );\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Button,\r\n  useId,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  Dismiss12Regular,\r\n} from '@fluentui/react-icons';\r\nimport { useCampaignNameTagStyles } from '../../styles';\r\n\r\nexport const CampaignNameTag = ({\r\n  campaign,\r\n  onRemove,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const tagsListId = useId('selectedCampaignsTagsList');\r\n  const removeTagId = `${tagsListId}-remove-${campaign.Id}`;\r\n  const campaignName = i18n.getString(_TL_('{{name}}'), { name: campaign.Name });\r\n  const styles = useCampaignNameTagStyles();\r\n\r\n  return (\r\n    <Button\r\n      appearance=\"outline\"\r\n      aria-labelledby={removeTagId}\r\n      className={classnames('experiment-summary-campaign', styles.button)}\r\n      icon={<Dismiss12Regular />}\r\n      iconPosition=\"after\"\r\n      id={campaign.Id}\r\n      onClick={() => onRemove(campaign.Id)}\r\n      shape=\"rounded\"\r\n      size=\"small\"\r\n    >\r\n      {campaignName}\r\n    </Button>\r\n  );\r\n};\r\n\r\nCampaignNameTag.propTypes = {\r\n  campaign: PropTypes.shape({\r\n    Id: PropTypes.number.isRequired,\r\n    Name: PropTypes.string.isRequired,\r\n  }).isRequired,\r\n  onRemove: PropTypes.func.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n  makeStyles,\r\n  Caption1Strong,\r\n  Accordion,\r\n  AccordionItem,\r\n  AccordionHeader,\r\n  AccordionPanel,\r\n} from '@fluentui/react-components';\r\nimport { selectedCampaignsAccordionStyles } from '../../page-layout';\r\nimport { CampaignNameTag } from './campaign-name-tag';\r\n\r\nconst useStyles = makeStyles(selectedCampaignsAccordionStyles);\r\n\r\nexport const SelectedCampaignsAccordion = ({ onRemoveCampaign, selectedCampaigns }) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n\r\n  const selectedCampaignsHeader = i18n.getString(_TL_('Campaigns'));\r\n\r\n  const numCampaigns = useMemo(() => selectedCampaigns.length, [selectedCampaigns]);\r\n\r\n  const { state: wizardState, send } = useWizardService();\r\n  const removeCampaign = useCallback((id) => {\r\n    const { selectedCampaignsById } = wizardState.context.wizardData;\r\n    delete selectedCampaignsById[id];\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { selectedCampaignsById });\r\n    onRemoveCampaign({ count: Object.keys(selectedCampaignsById).length });\r\n  }, [onRemoveCampaign, send, wizardState.context.wizardData]);\r\n\r\n  return (\r\n    <Accordion collapsible defaultOpenItems=\"1\">\r\n      <AccordionItem value=\"1\">\r\n        <AccordionHeader size=\"small\" className={styles.accordionHeader}>\r\n          <Caption1Strong className={styles.accordionHeaderText}>{selectedCampaignsHeader}</Caption1Strong>\r\n          <span className={styles.count}>{numCampaigns} {i18n.getString(_TL_('campaigns'))}</span>\r\n        </AccordionHeader>\r\n        <AccordionPanel>\r\n          <div className={styles.tagsList}>\r\n            {selectedCampaigns.map(campaign => (\r\n              <CampaignNameTag campaign={campaign} onRemove={removeCampaign} key={campaign.Id} />\r\n            ))}\r\n          </div>\r\n        </AccordionPanel>\r\n      </AccordionItem>\r\n    </Accordion>\r\n  );\r\n};\r\n\r\nSelectedCampaignsAccordion.propTypes = {\r\n  onRemoveCampaign: PropTypes.func.isRequired,\r\n  selectedCampaigns: PropTypes.arrayOf(PropTypes.shape({\r\n    Id: PropTypes.number.isRequired,\r\n    Name: PropTypes.string.isRequired,\r\n  })).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  makeStyles,\r\n  Subtitle1,\r\n  Subtitle2,\r\n  Body1,\r\n  Caption1,\r\n  Caption1Strong,\r\n  mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport {\r\n  DrawerBody,\r\n  DrawerHeader,\r\n  DrawerHeaderTitle,\r\n  DrawerInline,\r\n} from '@fluentui/react-drawer';\r\nimport { budgetFormatOptions } from '../../constants/budget-format-options';\r\nimport { studySummaryDrawerStyles } from '../../page-layout';\r\nimport { ImpressionThresholdMessage } from '../impression-threshold-message';\r\nimport { SelectedCampaignsAccordion } from './selected-campaigns-accordion';\r\n\r\nconst useStyles = makeStyles(studySummaryDrawerStyles);\r\n\r\nconst StudySummaryDrawerInternal = ({ onRemoveCampaign, serverContext }) => {\r\n  const styles = useStyles();\r\n  const { CurrentAccount } = serverContext;\r\n  const { CurrencyCode } = CurrentAccount;\r\n  const i18n = useContext(I18nContext);\r\n  const studySummaryTitle = i18n.getString(_TL_('Experiment summary'));\r\n  const campaignSelectionTitle = i18n.getString(_TL_('Selected campaigns'));\r\n  const totalBudgetLabel = i18n.getString(_TL_('Total budget for selected campaigns'));\r\n\r\n  const { state: wizardState } = useWizardService();\r\n  const { selectedCampaignsById } = wizardState.context.wizardData;\r\n\r\n  const selectedCampaigns = Object.keys(selectedCampaignsById).map(campaignId => selectedCampaignsById[campaignId]);\r\n  const totalBudgetFormatted = useMemo(() => {\r\n    if (!CurrencyCode) return '--';\r\n    const total = selectedCampaigns.reduce((acc, campaign) => {\r\n      const dailyTargetBudgetAmount = campaign.DailyTargetBudgetAmount ? campaign.DailyTargetBudgetAmount : 0;\r\n      const dailyBudget = campaign.Budget && campaign.Budget.Amount ? campaign.Budget.Amount : dailyTargetBudgetAmount;\r\n      return acc + dailyBudget;\r\n    }, 0);\r\n    return i18n.formatCurrency(total, CurrencyCode, budgetFormatOptions);\r\n  }, [selectedCampaigns, i18n, CurrencyCode]);\r\n\r\n  return (\r\n    <DrawerInline open position=\"end\" size=\"small\" className=\"experiment-summary\">\r\n      <DrawerHeader className={mergeClasses(styles.drawer, styles.drawerHeader)}>\r\n        <DrawerHeaderTitle>\r\n          <Subtitle1> {studySummaryTitle} </Subtitle1>\r\n        </DrawerHeaderTitle>\r\n      </DrawerHeader>\r\n      <DrawerBody className={styles.drawer}>\r\n        <Stack>\r\n          <ImpressionThresholdMessage />\r\n          <Subtitle2 className={styles.subTitle}> {campaignSelectionTitle} </Subtitle2>\r\n          <Body1>\r\n            <div className={mergeClasses(styles.totalBudget, styles.content)}>\r\n              <Caption1Strong>{totalBudgetLabel}</Caption1Strong>\r\n              <Caption1>{totalBudgetFormatted}</Caption1>\r\n            </div>\r\n            <SelectedCampaignsAccordion\r\n              onRemoveCampaign={onRemoveCampaign}\r\n              selectedCampaigns={selectedCampaigns}\r\n            />\r\n          </Body1>\r\n        </Stack>\r\n      </DrawerBody>\r\n    </DrawerInline>\r\n  );\r\n};\r\n\r\nStudySummaryDrawerInternal.propTypes = {\r\n  onRemoveCampaign: PropTypes.func.isRequired,\r\n  serverContext: PropTypes.shape({\r\n    CurrentAccount: PropTypes.shape({\r\n      CurrencyCode: PropTypes.string.isRequired,\r\n    }).isRequired,\r\n  }).isRequired,\r\n};\r\n\r\nexport const StudySummaryDrawer = withServerContext(StudySummaryDrawerInternal);\r\n","import { getTheme } from '@fluentui/react';\r\nimport {\r\n  Caption1,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport React, { useContext } from 'react';\r\nimport { curlyTemplate } from '@bingads-webui/primitive-utilities';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Paginator } from '../../paginator';\r\nimport { noDataStyles } from '../../styles';\r\n\r\nconst { palette } = getTheme();\r\nconst useStyles = makeStyles({\r\n  noData: noDataStyles(palette),\r\n});\r\n\r\n\r\nexport const SelectCampaignsFooter = () => {\r\n  const i18n = useContext(I18nContext);\r\n  const styles = useStyles();\r\n  const { state } = useContext(GridContext);\r\n\r\n  return state.items && state.items.length > 0\r\n    ? (\r\n      <>\r\n        <Caption1> {curlyTemplate(i18n.getString(_TL_('{{count}} Campaign(s)')))({ count: state.totalCount })}</Caption1>\r\n        <Paginator />\r\n      </>\r\n    ) : (\r\n      <div className={styles.noData}>\r\n        {i18n.getString(_TL_('There are no campaigns.'))}\r\n      </div>\r\n    );\r\n};\r\n","import { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { GridContext } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useCallback, useContext, useEffect } from 'react';\r\nimport { fetchLiftExperimentCampaigns } from '../../../fetch/lift-experiment-campaigns';\r\n\r\nexport const SelectCampaignsGridDataSource = () => {\r\n  const { state, dispatch } = useContext(GridContext);\r\n  const i18n = useContext(I18nContext);\r\n  const { scope } = useContext(ScopeContext);\r\n\r\n  const getOrderBy = useCallback((column) => {\r\n    if (!column.fieldName) {\r\n      return undefined;\r\n    }\r\n\r\n    return `${column.fieldName} ${column.isSortDescending ? 'DESC' : 'ASC'}`;\r\n  }, []);\r\n\r\n  const onSuccess = useCallback((response) => {\r\n    dispatch({ type: 'FINISH_LOAD_DATA', payload: { items: response.value, totalCount: response['@odata.count'] } });\r\n  }, [dispatch]);\r\n  const onFailure = useCallback((message) => {\r\n    const alertHelper = new AlertHelper({ i18n });\r\n    alertHelper.showError(message);\r\n  }, [i18n]);\r\n\r\n  useEffect(() => {\r\n    const orderBy = getOrderBy(state.sortedColumn);\r\n    dispatch({ type: 'START_LOAD_DATA' });\r\n    fetchLiftExperimentCampaigns(scope.values, {\r\n      query: {\r\n        $count: true,\r\n        $top: state.pagination.pageSize,\r\n        $skip: ((state.pagination.pageNumber - 1) * state.pagination.pageSize),\r\n        $filter: state.editableFilter,\r\n        ...(orderBy ? { $orderby: orderBy } : {}),\r\n      },\r\n      onSuccess,\r\n      onFailure,\r\n    });\r\n  }, [dispatch, getOrderBy, onFailure, onSuccess, state.editableFilter, state.pagination, state.sortedColumn, scope.values]);\r\n\r\n  return null;\r\n};\r\n","import { edmCampaign } from '@bingads-webui/edm-campaign';\r\n\r\nexport const fetchLiftExperimentCampaigns = (\r\n  { aid, cid },\r\n  {\r\n    onFailure,\r\n    onSuccess,\r\n    query,\r\n  }\r\n) => edmCampaign\r\n  .Customers.$withKey(cid)\r\n  .Accounts.$withKey(aid)\r\n  .LiftExperimentCampaigns\r\n  .get(query)\r\n  .toPromise()\r\n  .then((response) => {\r\n    onSuccess(response);\r\n  })\r\n  .catch(() => onFailure(_TL_('Failed to fetch campaigns')));\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport { GridContextProvider } from '@bingads-webui-grid/grid-context';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { MessageBar, MessageBarBody } from '@fluentui/react-message-bar';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Card,\r\n  CardFooter,\r\n  makeStyles,\r\n  Text,\r\n  Title3,\r\n} from '@fluentui/react-components';\r\nimport { getTheme, SelectionMode } from '@fluentui/react';\r\nimport { DEFAULT_CAMPAIGN_SUBTYPE_FILTER } from '../constants/campaign';\r\nimport { getSelectedCampaignsGridColumns } from '../constants/selected-campaigns-grid-columns';\r\nimport {\r\n  footerStyles,\r\n  selectCampaignsStepLayoutTokens,\r\n  selectCampaignsStyles\r\n} from '../page-layout';\r\nimport { getUIBlockerStyle, noDataStyles } from '../styles';\r\nimport { validateCampaignCount } from '../validate';\r\nimport { SelectCampaignsGrid } from './select-campaigns-grid/select-campaigns-grid';\r\nimport { SelectCampaignsToolbar } from './select-campaigns-grid/select-campaigns-toolbar';\r\nimport { StudySummaryDrawer } from './summary/study-summary-drawer';\r\nimport { SelectCampaignsFooter } from './select-campaigns-grid/select-campaigns-footer';\r\nimport { SelectCampaignsGridDataSource } from './select-campaigns-grid/select-campaigns-grid-data-source';\r\n\r\nconst { palette } = getTheme();\r\n\r\nconst useStyles = makeStyles({\r\n  footer: footerStyles,\r\n  ...selectCampaignsStyles,\r\n  noData: noDataStyles(palette),\r\n});\r\n\r\nexport const SelectCampaignsStep = () => {\r\n  useDefaultStyles(getUIBlockerStyle);\r\n  const styles = useStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const title = i18n.getString(_TL_('Choose one or more campaigns for this experiment'));\r\n  const instructions = i18n.getString(_TL_('Select up to 10 campaigns. Please review the campaign eligibility requirements listed in the summary to ensure that your experiment runs successfully.'));\r\n\r\n  const { state: wizardState, send } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n  const {\r\n    isValid,\r\n    selectCampaignsError,\r\n    showError,\r\n  } = wizardData;\r\n\r\n  const onChangeSelectedCampaigns = useCallback(({ count }) => {\r\n    const results = validateCampaignCount({ count, i18n });\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n      isValid: results.isValid,\r\n      selectCampaignsError: results.error,\r\n    });\r\n  }, [i18n, send]);\r\n\r\n  const initialGridContext = useMemo(() => ({\r\n    editableFilter: DEFAULT_CAMPAIGN_SUBTYPE_FILTER,\r\n    items: [],\r\n    pagination: {\r\n      pageNumber: 1,\r\n      pageSize: 10,\r\n    },\r\n    selectedColumns: getSelectedCampaignsGridColumns(i18n),\r\n    selectedItems: new Set(),\r\n    selectionMode: SelectionMode.multiple,\r\n    totalCount: 0,\r\n  }), [i18n]);\r\n\r\n  return (\r\n    <div className={classNames(styles.root, 'select-campaigns-step')}>\r\n      <GridContextProvider {...initialGridContext}>\r\n        <SelectCampaignsGridDataSource />\r\n        <div className={styles.content}>\r\n          <Stack tokens={selectCampaignsStepLayoutTokens}>\r\n            <Title3>{title}</Title3>\r\n            <Text>{instructions}</Text>\r\n            {(showError && !isValid) && (\r\n              <MessageBar intent=\"error\">\r\n                <MessageBarBody>{selectCampaignsError}</MessageBarBody>\r\n              </MessageBar>\r\n            )}\r\n            <SelectCampaignsToolbar />\r\n            <Card>\r\n              <div className=\"select-campaigns-grid\">\r\n                <SelectCampaignsGrid onCampaignsChange={onChangeSelectedCampaigns} />\r\n              </div>\r\n              <CardFooter className={styles.footer}>\r\n                <SelectCampaignsFooter />\r\n              </CardFooter>\r\n            </Card>\r\n          </Stack>\r\n        </div>\r\n        <StudySummaryDrawer onRemoveCampaign={onChangeSelectedCampaigns} />\r\n      </GridContextProvider>\r\n    </div>\r\n  );\r\n};\r\n","import { SaveBlocker, DefaultTemplate } from '@bingads-webui-react/wizard-ui-library';\r\nimport { ConfigureStudyStep } from '../common/components/configure-study-step';\r\nimport { useConfigureStudyRepository } from '../common/components/configure-study-step-repository';\r\nimport { SelectCampaignsStep } from '../common/components/select-campaigns-step';\r\nimport { useSelectCampaignsRepository } from '../common/components/select-campaigns-step-repository';\r\n\r\nexport const stepConfigs = [{\r\n  id: 'step-1',\r\n  view: SelectCampaignsStep,\r\n  repository: useSelectCampaignsRepository,\r\n}, {\r\n  id: 'step-2',\r\n  view: ConfigureStudyStep,\r\n  repository: useConfigureStudyRepository,\r\n}];\r\n\r\nexport const layoutConfig = {\r\n  'step-1': {\r\n    template: DefaultTemplate,\r\n    noBlocker: true,\r\n  },\r\n  'step-2': {\r\n    template: DefaultTemplate,\r\n    customBlocker: SaveBlocker,\r\n  },\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { fetchCampaignsByIdEDM } from '../../fetch/campaigns';\r\nimport { fetchExperiment, parseMeasurementTypeEnum } from '../../fetch/experiment';\r\nimport { EDIT_INTENT } from '../constants/intents';\r\nimport { errorMessages } from '../errors';\r\nimport { validateCampaignCount } from '../validate';\r\nimport { ADD_KEYWORDS_BY_ENTRY, ADD_KEYWORDS_BY_SELECTION } from './keyword/keyword-methods';\r\nimport { STATUS_SCHEDULED } from '../../landing-page/statuses';\r\n\r\nexport const useSelectCampaignsRepository = () => {\r\n  const { scope } = useContext(ScopeContext);\r\n\r\n  const { state: wizardState, send } = useWizardService();\r\n  const { wizardData } = wizardState.context;\r\n  const isEdit = wizardData.intent === EDIT_INTENT;\r\n\r\n  const i18n = useContext(I18nContext);\r\n\r\n  const load = useCallback(() => new Promise((resolve) => {\r\n    if (isEdit) {\r\n      if (!wizardData.isInitialized) {\r\n        const onFailure = (message) => {\r\n          const alertHelper = new AlertHelper({ i18n });\r\n          alertHelper.showError(message);\r\n          // If request for lift study fails, push the user back from edit form to lift studies grid\r\n          send(WIZARD_EVENTS.CANCEL);\r\n        };\r\n        const onSuccess = async (liftExperiment) => {\r\n          // Handle the case where user manually enters url for an uneditable lift study\r\n          if (liftExperiment.Status !== STATUS_SCHEDULED) {\r\n            onFailure(errorMessages.STATUS_INVALID_FOR_EDIT);\r\n          }\r\n\r\n          const uetTags = {\r\n            both: [],\r\n            conversion: [],\r\n            visit: [],\r\n          };\r\n          const study = {\r\n            ...liftExperiment,\r\n            ...parseMeasurementTypeEnum(liftExperiment.MeasurementType),\r\n          };\r\n\r\n          if (study.useVisitLift && study.useConversionLift) {\r\n            uetTags.both = [...study.UETTags];\r\n          } else if (study.useVisitLift) {\r\n            uetTags.visit = [...study.UETTags];\r\n          } else if (study.useConversionLift) {\r\n            uetTags.conversion = [...study.UETTags];\r\n          }\r\n\r\n          const response = await fetchCampaignsByIdEDM(scope.values, study.Campaigns);\r\n          const selectedCampaigns = response.value;\r\n          const selectedCampaignsById = {};\r\n          selectedCampaigns.forEach((campaign) => {\r\n            selectedCampaignsById[campaign.Id] = campaign;\r\n          });\r\n\r\n          send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n            isInitialized: true,\r\n            experimentName: study.Name,\r\n            startDate: study.StartDate,\r\n            country: study.Country,\r\n            useSearchLift: study.useSearchLift,\r\n            selectedKeywords: [],\r\n            keywordsMethod: ADD_KEYWORDS_BY_ENTRY,\r\n            typedKeywordString: study.Keywords.join(i18n.getString(_TL_(', '))),\r\n            searchCid: study.SearchCustomerId || '',\r\n            useVisitConversionLift: study.useVisitLift || study.useConversionLift,\r\n            useVisitLift: study.useVisitLift,\r\n            useConversionLift: study.useConversionLift,\r\n            uetTags,\r\n            selectedCampaignsById,\r\n          });\r\n\r\n          resolve({}); // still unsure how this resolution is being used\r\n        };\r\n        fetchExperiment(scope.values, { onSuccess, onFailure });\r\n      }\r\n    } else if (!wizardData.isInitialized) {\r\n      send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n        isInitialized: true,\r\n        isValid: false,\r\n        experimentName: '',\r\n        startDate: null,\r\n        country: null,\r\n        useSearchLift: true,\r\n        selectedKeywords: [],\r\n        keywordsMethod: ADD_KEYWORDS_BY_SELECTION,\r\n        typedKeywordString: '',\r\n        searchCid: '',\r\n        useVisitConversionLift: false,\r\n        useVisitLift: undefined,\r\n        useConversionLift: undefined,\r\n        uetTags: {\r\n          both: [],\r\n          conversion: [],\r\n          visit: [],\r\n        },\r\n      });\r\n    }\r\n\r\n    resolve({});\r\n  }), [i18n, isEdit, scope, send, wizardData.isInitialized]);\r\n\r\n  const save = useCallback(() => {\r\n    const { selectedCampaignsById } = wizardData;\r\n    const count = Object.keys(selectedCampaignsById).length;\r\n    const result = validateCampaignCount({ count, i18n });\r\n\r\n    send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n      isValid: result.isValid,\r\n      selectCampaignsError: result.error,\r\n      showError: !result.isValid,\r\n    });\r\n\r\n    if (!result.isValid) {\r\n      return Promise.reject(new Error(result.error));\r\n    }\r\n\r\n    return new Promise((resolve) => {\r\n      setTimeout(() => resolve({}), 800);\r\n    });\r\n  }, [i18n, send, wizardData]);\r\n\r\n  return {\r\n    load,\r\n    save,\r\n  };\r\n};\r\n","import { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport {\r\n  getFormattedDateString,\r\n  MS_PER_DAY,\r\n} from '../common/date';\r\n\r\nexport const fetchKeywords = ({\r\n  count,\r\n  scope,\r\n}) => {\r\n  const { currentAccount } = getEntityFromScope(scope);\r\n  const endDate = new Date(Date.now());\r\n  const formattedEndDate = getFormattedDateString(endDate);\r\n  const msPer90Days = MS_PER_DAY * 90;\r\n  const startDate = new Date(endDate.valueOf() - msPer90Days);\r\n  const formattedStartDate = getFormattedDateString(startDate);\r\n\r\n  return currentAccount.Keywords['Default.GridData'].findAll({\r\n    select: [\r\n      'Id',\r\n      'Text',\r\n      'Status',\r\n      'PerformanceMetrics/Impressions',\r\n    ],\r\n    filter: {\r\n      where: 'Status eq \\'Active\\'',\r\n    },\r\n    orderBy: [\r\n      {\r\n        key: 'PerformanceMetrics/Impressions',\r\n        direction: 'DESC',\r\n      },\r\n    ],\r\n    limit: count,\r\n    query: {\r\n      gridDataParameters: {\r\n        DateRange: {\r\n          StartDate: formattedStartDate,\r\n          EndDate: formattedEndDate,\r\n        },\r\n      },\r\n    },\r\n  });\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n  getCurrentStepId,\r\n  useWizardService,\r\n} from '@bingads-webui-react/wizard';\r\nimport { layoutConfig } from './config';\r\n\r\nexport const CustomLayoutTemplate = ({ items }) => {\r\n  const { state } = useWizardService();\r\n  const currentStepId = getCurrentStepId(state);\r\n  const config = layoutConfig[currentStepId];\r\n  const {\r\n    noBlocker,\r\n    customBlocker,\r\n    template: Template,\r\n  } = config;\r\n  const newItems = { ...items };\r\n\r\n  if (noBlocker) {\r\n    newItems.Blocker = undefined;\r\n  } else if (customBlocker) {\r\n    newItems.Blocker = customBlocker;\r\n  }\r\n\r\n  return <Template items={newItems} />;\r\n};\r\n\r\nCustomLayoutTemplate.propTypes = {\r\n  items: PropTypes.shape({}).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n  Layout,\r\n  LayoutContainer,\r\n  StepContainer,\r\n  Wizard,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n  CardFooter,\r\n  LoadingShimmer,\r\n  BusyBlocker,\r\n  CancelWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { tokens } from '@fluentui/react-components';\r\nimport { CREATE_INTENT, EDIT_INTENT } from '../common/constants/intents';\r\nimport { LiftMeasurementStepFooter } from './footer/footer';\r\nimport { stepConfigs } from './config';\r\nimport { CustomLayoutTemplate } from './templates';\r\n\r\nconst getStyles = () => ({\r\n  '@global': {\r\n    '.default-layout': {\r\n      '& .step-content-container': {\r\n        padding: 0,\r\n      },\r\n      '& .footer-container': {\r\n        'background-color': tokens.colorNeutralBackground1,\r\n        bottom: 0,\r\n        position: 'sticky',\r\n      },\r\n    },\r\n  },\r\n});\r\n\r\nexport const LiftMeasurementWizard = ({\r\n  intent,\r\n  onCancel,\r\n  onSaveAndExit,\r\n}) => {\r\n  useDefaultStyles(getStyles);\r\n\r\n  const config = {\r\n    id: 'lift-measurement-wizard',\r\n    actions: {\r\n      onDone: () => {\r\n        onSaveAndExit();\r\n      },\r\n      onExited: () => {\r\n        onCancel();\r\n      },\r\n    },\r\n    initialWizardData: {\r\n      intent,\r\n      selectedCampaignsById: {},\r\n      uetTags: {\r\n        both: [],\r\n        conversion: [],\r\n        visit: [],\r\n      },\r\n    },\r\n    steps: stepConfigs,\r\n  };\r\n\r\n  return (\r\n    <Wizard config={config}>\r\n      <LayoutContainer template={CustomLayoutTemplate}>\r\n        <Layout type=\"LoadingShimmer\" component={LoadingShimmer} />\r\n        <Layout type=\"StepContainer\" component={StepContainer} />\r\n        <Layout type=\"Footer\" component={LiftMeasurementStepFooter} />\r\n        <Layout type=\"CardFooter\" component={CardFooter} />\r\n        <Layout type=\"Blocker\" component={BusyBlocker} />\r\n        <Layout type=\"CancelDialog\" component={CancelWizardDialog} />\r\n      </LayoutContainer>\r\n    </Wizard>\r\n  );\r\n};\r\n\r\nLiftMeasurementWizard.propTypes = {\r\n  intent: PropTypes.oneOf([\r\n    CREATE_INTENT,\r\n    EDIT_INTENT,\r\n  ]).isRequired,\r\n  onCancel: PropTypes.func.isRequired,\r\n  onSaveAndExit: PropTypes.func.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { CREATE_INTENT, EDIT_INTENT } from './common/constants/intents';\r\nimport { LiftMeasurementWizard } from './wizard/wizard';\r\n\r\nexport const LiftMeasurementForm = ({ intent, siteMap }) => {\r\n  const { scope } = useContext(ScopeContext);\r\n\r\n  const onCancel = useCallback(() => {\r\n    const route = getRoutePathById(siteMap, 'lift-measurement');\r\n    if (intent === EDIT_INTENT) {\r\n      scope.remove('liftExperimentId');\r\n      setClarityTag({\r\n        IsCancellingEditLiftExperiment: true,\r\n      });\r\n    } else {\r\n      setClarityTag({\r\n        IsCancellingCreateLiftExperiment: true,\r\n      });\r\n    }\r\n    scope.save(route);\r\n  }, [intent, scope, siteMap]);\r\n\r\n  const onSaveAndExit = useCallback(() => {\r\n    const route = getRoutePathById(siteMap, 'lift-measurement');\r\n    if (intent === EDIT_INTENT) {\r\n      scope.remove('liftExperimentId');\r\n    }\r\n    scope.save(route);\r\n  }, [intent, scope, siteMap]);\r\n\r\n  return (\r\n    <LiftMeasurementWizard\r\n      intent={intent}\r\n      onCancel={onCancel}\r\n      onSaveAndExit={onSaveAndExit}\r\n    />\r\n  );\r\n};\r\n\r\nLiftMeasurementForm.propTypes = {\r\n  intent: PropTypes.oneOf([\r\n    CREATE_INTENT,\r\n    EDIT_INTENT,\r\n  ]).isRequired,\r\n  siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.string,\r\n  })).isRequired,\r\n};\r\n","import React from 'react';\r\nimport { CREATE_INTENT } from './common/constants/intents';\r\nimport { LiftMeasurementForm } from './lift-measurement-form';\r\n\r\nexport const LiftMeasurementCreate = props => <LiftMeasurementForm {...props} intent={CREATE_INTENT} />;\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useEffect } from 'react';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { EDIT_INTENT } from './common/constants/intents';\r\nimport { LiftMeasurementForm } from './lift-measurement-form';\r\n\r\nexport const LiftMeasurementEdit = (props) => {\r\n  const { scope } = useContext(ScopeContext);\r\n  const { siteMap } = props;\r\n\r\n  useEffect(() => {\r\n    if (scope.values.liftExperimentId == null) {\r\n      const route = getRoutePathById(siteMap, 'lift-measurement');\r\n      scope.remove('liftExperimentId');\r\n      scope.save(route);\r\n    }\r\n  }, [scope, scope.values.liftExperimentId, siteMap]);\r\n\r\n  return <LiftMeasurementForm {...props} intent={EDIT_INTENT} />;\r\n};\r\n\r\nLiftMeasurementEdit.propTypes = {\r\n  siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.string,\r\n  })).isRequired,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const fetchResults = async ({\r\n  liftExperimentId,\r\n  onFailure,\r\n  onSuccess,\r\n  scope: {\r\n    values: {\r\n      aid,\r\n      cid,\r\n    },\r\n  },\r\n  fetch,\r\n}) => {\r\n  try {\r\n    const res = await fetch(`/Customers(${cid})/Accounts(${aid})/GetLiftExperimentResult(${liftExperimentId})`);\r\n    const bodyJson = await res.json();\r\n    if (res.ok) {\r\n      return onSuccess(bodyJson);\r\n    }\r\n    onFailure(res);\r\n    return null;\r\n  } catch (e) {\r\n    onFailure(e);\r\n    return null;\r\n  }\r\n};\r\n\r\nconst stringValues = [\r\n  'Confidence_BSearch',\r\n  'Confidence_Convert',\r\n  'Confidence_Visit',\r\n  'MeasurementCat',\r\n];\r\nexport const transformResults = apiData => _.reduce(apiData, (transformedResults, rootArray, rootKey) => ({\r\n  ...transformedResults,\r\n  [rootKey]: _.map(rootArray, result => _.reduce(result, (transformedResult, value, key) => ({\r\n    ...transformedResult,\r\n    [key]: stringValues.includes(key) || isNaN(Number(value))\r\n      ? value\r\n      : Number(value),\r\n  }), {})),\r\n}), {});\r\n\r\nexport const getConversionData = resultData => ({\r\n  confidence: resultData.Confidence_Convert,\r\n  control: resultData.Control_ConverterRate,\r\n  lift: resultData.Lift_Converter,\r\n  treatment: resultData.Treatment_ConverterRate,\r\n});\r\n\r\nexport const getSearchData = resultData => ({\r\n  confidence: resultData.Confidence_BSearch,\r\n  control: resultData.Control_BSearcherRate,\r\n  lift: resultData.Lift_BSearcher,\r\n  treatment: resultData.Treatment_BSearcherRate,\r\n});\r\n\r\nexport const getVisitData = resultData => ({\r\n  confidence: resultData.Confidence_Visit,\r\n  control: resultData.Control_VisitorRate,\r\n  lift: resultData.Lift_Visitor,\r\n  treatment: resultData.Treatment_VisitorRate,\r\n});\r\n\r\nexport const getAudienceResults = (resultsData) => {\r\n  const audienceResults = resultsData.TargetType_Result;\r\n  return {\r\n    conversion: audienceResults.map((audienceData, i) => ({\r\n      id: `${audienceData.TargetTypeId}-${i}`,\r\n      name: audienceData.TargetTypeId,\r\n      ...getConversionData(audienceData),\r\n    })),\r\n    search: audienceResults.map((audienceData, i) => ({\r\n      id: `${audienceData.TargetTypeId}-${i}`,\r\n      name: audienceData.TargetTypeId,\r\n      ...getSearchData(audienceData),\r\n    })),\r\n    visit: audienceResults.map((audienceData, i) => ({\r\n      id: `${audienceData.TargetTypeId}-${i}`,\r\n      name: audienceData.TargetTypeId,\r\n      ...getVisitData(audienceData),\r\n    })),\r\n  };\r\n};\r\n\r\nexport const measurementCategories = {\r\n  'Awareness-Search Lift': 'search',\r\n  'Consideration-Visit Lift': 'visit',\r\n  'Conversion-Conversion Lift': 'conversion',\r\n};\r\n\r\nexport const getBottomPerformerResults = (resultsData) => {\r\n  const bottomPerformerResults = resultsData.Bottom5_Result || [];\r\n  const allData = {\r\n    conversion: [],\r\n    search: [],\r\n    visit: [],\r\n  };\r\n  bottomPerformerResults.forEach((performerData) => {\r\n    if (measurementCategories[performerData.MeasurementCat]) {\r\n      const mappedData = {\r\n        audienceId: performerData.TargetValueId,\r\n        audienceTypeId: performerData.TargetTypeId,\r\n        rank: performerData.Rank_Lift,\r\n      };\r\n      allData[measurementCategories[performerData.MeasurementCat]].push(mappedData);\r\n    }\r\n  });\r\n  return allData;\r\n};\r\n\r\nexport const getTopPerformerResults = (resultsData) => {\r\n  const topPerformerResults = resultsData.Top5_Result;\r\n  const allData = {\r\n    conversion: [],\r\n    search: [],\r\n    visit: [],\r\n  };\r\n  topPerformerResults.forEach((performerData) => {\r\n    if (measurementCategories[performerData.MeasurementCat]) {\r\n      const mappedData = {\r\n        audienceId: performerData.TargetValueId, // This is the ID for the value shown in the \"Audience name\" column.\r\n        audienceTypeId: performerData.TargetTypeId, // This is the ID for the value shown in the \"Audience type\" column.\r\n        rank: performerData.Rank_Lift,\r\n      };\r\n      allData[measurementCategories[performerData.MeasurementCat]].push(mappedData);\r\n    }\r\n  });\r\n  // Still need to sort the data by `rank`.\r\n  return allData;\r\n};\r\n\r\nexport const getCampaignIds = (resultsData) => {\r\n  let campaignIds = [];\r\n  if (resultsData.Campaign_Result) {\r\n    campaignIds = resultsData.Campaign_Result.map(campaignData => campaignData.CampaignId);\r\n  }\r\n  return campaignIds;\r\n};\r\n\r\nexport const getCampaignResults = (resultsData, campaigns) => {\r\n  const campaignResults = resultsData.Campaign_Result;\r\n  return {\r\n    conversion: campaignResults.map(campaignData => ({\r\n      id: campaignData.CampaignId,\r\n      name: campaigns[campaignData.CampaignId].name,\r\n      ...getConversionData(campaignData),\r\n    })),\r\n    search: campaignResults.map(campaignData => ({\r\n      id: campaignData.CampaignId,\r\n      name: campaigns[campaignData.CampaignId].name,\r\n      ...getSearchData(campaignData),\r\n    })),\r\n    visit: campaignResults.map(campaignData => ({\r\n      id: campaignData.CampaignId,\r\n      name: campaigns[campaignData.CampaignId].name,\r\n      ...getVisitData(campaignData),\r\n    })),\r\n  };\r\n};\r\n\r\nexport const getOverallResults = (resultsData) => {\r\n  const overallResults = resultsData.CID_Result[0];\r\n  return {\r\n    conversion: getConversionData(overallResults),\r\n    search: getSearchData(overallResults),\r\n    visit: getVisitData(overallResults),\r\n  };\r\n};\r\n","export const confidenceLevels = {\r\n  High: _TL_('High'),\r\n  Low: _TL_('Low'),\r\n  Medium: _TL_('Medium'),\r\n};\r\n\r\nexport const getConfidenceLevel = (value) => {\r\n  if (confidenceLevels[value] == null) {\r\n    return _TL_('Invalid confidence level');\r\n  }\r\n  return confidenceLevels[value];\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Table,\r\n  TableBody,\r\n  TableCell,\r\n  TableHeader,\r\n  TableHeaderCell,\r\n  TableRow,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { getConfidenceLevel } from './confidence-levels';\r\n\r\nconst useStyles = makeStyles({\r\n  helpContainer: {\r\n    alignItems: 'center',\r\n    columnGap: '5px',\r\n    display: 'flex',\r\n  },\r\n  tableHeaderCell: {\r\n    fontWeight: 'bold',\r\n  },\r\n});\r\n\r\nexport const OverviewTable = ({\r\n  items,\r\n  liftHelpTopic,\r\n  liftLabel,\r\n  primaryColumnHeader,\r\n  primaryColumnHelpTopic,\r\n  title,\r\n}) => {\r\n  const className = title.toLowerCase().replace(/ /g, '-');\r\n  const i18n = useContext(I18nContext);\r\n  const confidenceLabel = i18n.getString(_TL_('Confidence level'));\r\n  const controlLabel = i18n.getString(_TL_('Control'));\r\n  const defaultLiftLabel = i18n.getString(_TL_('Lift'));\r\n  const treatmentLabel = i18n.getString(_TL_('Treatment'));\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n  const styles = useStyles();\r\n  const columns = [\r\n    {\r\n      columnKey: 'name',\r\n      label: (\r\n        <div className={styles.helpContainer}>\r\n          <span>{primaryColumnHeader}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${primaryColumnHeader}`}\r\n            topic={primaryColumnHelpTopic}\r\n          />\r\n        </div>\r\n      ),\r\n    },\r\n    {\r\n      columnKey: 'control',\r\n      label: (\r\n        <div className={styles.helpContainer}>\r\n          <span>{controlLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${controlLabel}`}\r\n            topic=\"pop_BA_Experiments_Control\"\r\n          />\r\n        </div>\r\n      ),\r\n    },\r\n    {\r\n      columnKey: 'treatment',\r\n      label: (\r\n        <div className={styles.helpContainer}>\r\n          <span>{treatmentLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${treatmentLabel}`}\r\n            topic=\"pop_BA_Experiments_Treatment\"\r\n          />\r\n        </div>\r\n      ),\r\n    },\r\n    {\r\n      columnKey: 'lift',\r\n      label: (\r\n        <div className={styles.helpContainer}>\r\n          <span>{liftLabel || defaultLiftLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${liftLabel || defaultLiftLabel}`}\r\n            topic={liftHelpTopic}\r\n          />\r\n        </div>\r\n      ),\r\n    },\r\n    {\r\n      columnKey: 'confidence',\r\n      label: (\r\n        <div className={styles.helpContainer}>\r\n          <span>{confidenceLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${confidenceLabel}`}\r\n            topic=\"pop_BA_Experiments_Confidence\"\r\n          />\r\n        </div>\r\n      ),\r\n    },\r\n  ];\r\n  const getPercentageString = useCallback((value) => {\r\n    if (value === 'N/A') {\r\n      return '--';\r\n    }\r\n    const percentageValue = i18n.formatDecimalToFixed(value * 100, { digits: 2 });\r\n    const percentageString = i18n.getString(_TL_('{{value}}%'), {\r\n      value: percentageValue,\r\n    });\r\n    return percentageString;\r\n  }, [i18n]);\r\n\r\n  return (\r\n    <Table aria-label={title} className={`${className}-overview-table`}>\r\n      <TableHeader>\r\n        <TableRow>\r\n          {columns.map(column => (\r\n            <TableHeaderCell className={styles.tableHeaderCell} key={column.columnKey}>\r\n              {column.label}\r\n            </TableHeaderCell>\r\n          ))}\r\n        </TableRow>\r\n      </TableHeader>\r\n      <TableBody>\r\n        {items.map(item => (\r\n          <TableRow key={item.id}>\r\n            <TableCell>{item.name}</TableCell>\r\n            <TableCell>{getPercentageString(item.control)}</TableCell>\r\n            <TableCell>{getPercentageString(item.treatment)}</TableCell>\r\n            <TableCell>{getPercentageString(item.lift)}</TableCell>\r\n            <TableCell>{i18n.getString(getConfidenceLevel(item.confidence))}</TableCell>\r\n          </TableRow>\r\n        ))}\r\n      </TableBody>\r\n    </Table>\r\n  );\r\n};\r\n\r\nOverviewTable.propTypes = {\r\n  items: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.oneOfType([\r\n      PropTypes.number,\r\n      PropTypes.string,\r\n    ]).isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  liftHelpTopic: PropTypes.string.isRequired,\r\n  liftLabel: PropTypes.string,\r\n  primaryColumnHeader: PropTypes.string.isRequired,\r\n  primaryColumnHelpTopic: PropTypes.string.isRequired,\r\n  title: PropTypes.string.isRequired,\r\n};\r\n\r\nOverviewTable.defaultProps = {\r\n  liftLabel: null,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  Subtitle2,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\n\r\nconst useStyles = makeStyles({\r\n  root: {\r\n    marginBottom: '12px',\r\n  },\r\n  row: {\r\n    alignItems: 'start',\r\n    columnGap: '10px',\r\n    display: 'grid',\r\n    gridTemplateColumns: '12% 88%',\r\n    position: 'relative',\r\n  },\r\n});\r\n\r\nconst sortByRank = (a, b) => {\r\n  if (a.rank < b.rank) {\r\n    return -1;\r\n  }\r\n  if (b.rank < a.rank) {\r\n    return 1;\r\n  }\r\n  return 0;\r\n};\r\n\r\nconst PerformersList = ({ data, label }) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const sortedData = useMemo(() => {\r\n    if (data) {\r\n      return [...data].sort(sortByRank);\r\n    }\r\n    return null;\r\n  }, [data]);\r\n\r\n  if (!sortedData) {\r\n    return null;\r\n  }\r\n\r\n  const delimiter = i18n.getString(_TL_(', '));\r\n  const list = sortedData.map(performer => (\r\n    `${performer.audienceId} (${performer.audienceTypeId})`\r\n  )).join(delimiter);\r\n\r\n  return (\r\n    <div className={styles.row}>\r\n      <span>{label}</span>\r\n      <span>{list}</span>\r\n    </div>\r\n  );\r\n};\r\n\r\nPerformersList.propTypes = {\r\n  data: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })),\r\n  label: PropTypes.string.isRequired,\r\n};\r\n\r\nPerformersList.defaultProps = {\r\n  data: null,\r\n};\r\n\r\nexport const PositivePerformingAudiencesCard = ({ bottomData, topData }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const title = i18n.getString(_TL_('Audience performance'));\r\n  const highLabel = i18n.getString(_TL_('High-performing'));\r\n  const lowLabel = i18n.getString(_TL_('Low-performing'));\r\n  const styles = useStyles();\r\n\r\n  return (\r\n    <div className=\"audience-performance\">\r\n      <Card className={styles.root}>\r\n        <Subtitle2>{title}</Subtitle2>\r\n        <PerformersList\r\n          data={topData}\r\n          label={highLabel}\r\n        />\r\n        {bottomData.length > 0 && (\r\n          <PerformersList\r\n            data={bottomData}\r\n            label={lowLabel}\r\n          />\r\n        )}\r\n      </Card>\r\n    </div>\r\n  );\r\n};\r\n\r\nPositivePerformingAudiencesCard.propTypes = {\r\n  bottomData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })),\r\n  topData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n};\r\n\r\nPositivePerformingAudiencesCard.defaultProps = {\r\n  bottomData: null,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Accordion,\r\n  AccordionHeader,\r\n  AccordionItem,\r\n  AccordionPanel,\r\n  Card,\r\n  Subtitle1,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { OverviewTable } from './overview-table';\r\nimport { PositivePerformingAudiencesCard } from './positive-performing-audiences-card';\r\n\r\nconst useStyles = makeStyles({\r\n  accordionHeader: {\r\n    fontWeight: '600',\r\n  },\r\n  card: {\r\n    paddingBottom: '24px',\r\n  },\r\n  heading: {\r\n    marginTop: '36px !important',\r\n  },\r\n});\r\n\r\nconst layoutTokens = {\r\n  childrenGap: 15,\r\n};\r\n\r\nexport const AudienceOverviewSection = ({\r\n  conversionBottomPerformerData,\r\n  conversionData,\r\n  conversionTopPerformerData,\r\n  measurementTypes,\r\n  searchBottomPerformerData,\r\n  searchData,\r\n  searchTopPerformerData,\r\n  visitBottomPerformerData,\r\n  visitData,\r\n  visitTopPerformerData,\r\n}) => {\r\n  const [openItems, setOpenItems] = useState([1]);\r\n  const onToggle = useCallback((event, data) => {\r\n    setOpenItems(data.openItems);\r\n  }, []);\r\n\r\n  const styles = useStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const sectionTitle = i18n.getString(_TL_('Audience overview'));\r\n  const searchLiftTitle = i18n.getString(_TL_('Search lift'));\r\n  const visitLiftTitle = i18n.getString(_TL_('Visit lift'));\r\n  const conversionLiftTitle = i18n.getString(_TL_('Conversion lift'));\r\n  const audienceTypeColumnHeader = i18n.getString(_TL_('Audience type'));\r\n  const { useConversionLift, useSearchLift, useVisitLift } = measurementTypes;\r\n\r\n  return (\r\n    <>\r\n      <Subtitle1 className={styles.heading}>{sectionTitle}</Subtitle1>\r\n      <Accordion\r\n        collapsible\r\n        multiple\r\n        onToggle={onToggle}\r\n        openItems={openItems}\r\n      >\r\n        {useSearchLift && (\r\n          <AccordionItem value={1} className=\"search-lift\">\r\n            <AccordionHeader as=\"h5\" size=\"large\">\r\n              <span className={styles.accordionHeader}>\r\n                {searchLiftTitle}\r\n              </span>\r\n            </AccordionHeader>\r\n            <AccordionPanel>\r\n              <Stack tokens={layoutTokens}>\r\n                <Card className={styles.card}>\r\n                  <OverviewTable\r\n                    items={searchData}\r\n                    liftHelpTopic=\"pop_BA_Experiments_Audiences_SearchLift\"\r\n                    primaryColumnHeader={audienceTypeColumnHeader}\r\n                    primaryColumnHelpTopic=\"pop_BA_Experiments_AudienceListType\"\r\n                    title={searchLiftTitle}\r\n                  />\r\n                </Card>\r\n                <PositivePerformingAudiencesCard\r\n                  bottomData={searchBottomPerformerData}\r\n                  topData={searchTopPerformerData}\r\n                />\r\n              </Stack>\r\n            </AccordionPanel>\r\n          </AccordionItem>\r\n        )}\r\n        {useVisitLift && (\r\n          <AccordionItem value={2} className=\"visit-lift\">\r\n            <AccordionHeader as=\"h5\" size=\"large\">\r\n              <span className={styles.accordionHeader}>\r\n                {visitLiftTitle}\r\n              </span>\r\n            </AccordionHeader>\r\n            <AccordionPanel>\r\n              <Stack tokens={layoutTokens}>\r\n                <Card className={styles.card}>\r\n                  <OverviewTable\r\n                    items={visitData}\r\n                    liftHelpTopic=\"pop_BA_Experiments_Audiences_VisitsLift\"\r\n                    primaryColumnHeader={audienceTypeColumnHeader}\r\n                    primaryColumnHelpTopic=\"pop_BA_Experiments_AudienceListType\"\r\n                    title={visitLiftTitle}\r\n                  />\r\n                </Card>\r\n                <PositivePerformingAudiencesCard\r\n                  bottomData={visitBottomPerformerData}\r\n                  topData={visitTopPerformerData}\r\n                />\r\n              </Stack>\r\n            </AccordionPanel>\r\n          </AccordionItem>\r\n        )}\r\n        {useConversionLift && (\r\n          <AccordionItem value={3} className=\"conversion-lift\">\r\n            <AccordionHeader as=\"h5\" size=\"large\">\r\n              <span className={styles.accordionHeader}>\r\n                {conversionLiftTitle}\r\n              </span>\r\n            </AccordionHeader>\r\n            <AccordionPanel>\r\n              <Stack tokens={layoutTokens}>\r\n                <Card className={styles.card}>\r\n                  <OverviewTable\r\n                    items={conversionData}\r\n                    liftHelpTopic=\"pop_BA_Experiments_Audiences_ConversionLift\"\r\n                    primaryColumnHeader={audienceTypeColumnHeader}\r\n                    primaryColumnHelpTopic=\"pop_BA_Experiments_AudienceListType\"\r\n                    title={conversionLiftTitle}\r\n                  />\r\n                </Card>\r\n                <PositivePerformingAudiencesCard\r\n                  bottomData={conversionBottomPerformerData}\r\n                  topData={conversionTopPerformerData}\r\n                />\r\n              </Stack>\r\n            </AccordionPanel>\r\n          </AccordionItem>\r\n        )}\r\n      </Accordion>\r\n    </>\r\n  );\r\n};\r\n\r\nAudienceOverviewSection.propTypes = {\r\n  conversionBottomPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })),\r\n  conversionData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  conversionTopPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  measurementTypes: PropTypes.shape({\r\n    useConversionLift: PropTypes.bool.isRequired,\r\n    useSearchLift: PropTypes.bool.isRequired,\r\n    useVisitLift: PropTypes.bool.isRequired,\r\n  }).isRequired,\r\n  searchBottomPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })),\r\n  searchData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  searchTopPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  visitBottomPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })),\r\n  visitData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  visitTopPerformerData: PropTypes.arrayOf(PropTypes.shape({\r\n    audienceId: PropTypes.string.isRequired,\r\n    audienceTypeId: PropTypes.string.isRequired,\r\n    rank: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n};\r\n\r\nAudienceOverviewSection.defaultProps = {\r\n  conversionBottomPerformerData: null,\r\n  searchBottomPerformerData: null,\r\n  visitBottomPerformerData: null,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  Subtitle1,\r\n  Subtitle2,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { OverviewTable } from './overview-table';\r\n\r\nconst useStyles = makeStyles({\r\n  card: {\r\n    marginBottom: '12px',\r\n    paddingBottom: '24px',\r\n  },\r\n  cards: {\r\n    marginTop: '15px',\r\n  },\r\n  heading: {\r\n    marginTop: '24px !important',\r\n  },\r\n});\r\n\r\nexport const CampaignOverviewSection = ({\r\n  conversionData,\r\n  measurementTypes,\r\n  searchData,\r\n  visitData,\r\n}) => {\r\n  const styles = useStyles();\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const sectionTitle = i18n.getString(_TL_('Campaign overview'));\r\n  const searchLiftTitle = i18n.getString(_TL_('Search lift'));\r\n  const visitLiftTitle = i18n.getString(_TL_('Visit lift'));\r\n  const conversionLiftTitle = i18n.getString(_TL_('Conversion lift'));\r\n  const campaignNameColumnHeader = i18n.getString(_TL_('Campaign'));\r\n  const { useConversionLift, useSearchLift, useVisitLift } = measurementTypes;\r\n\r\n  return (\r\n    <div className=\"campaign-overview\">\r\n      <Subtitle1 className={styles.heading}>{sectionTitle}</Subtitle1>\r\n      <div className={styles.cards}>\r\n        {useSearchLift && (\r\n          <Card className={styles.card}>\r\n            <Subtitle2>{searchLiftTitle}</Subtitle2>\r\n            <OverviewTable\r\n              items={searchData}\r\n              liftHelpTopic=\"pop_BA_Experiments_Campaigns_SearchLift\"\r\n              primaryColumnHeader={campaignNameColumnHeader}\r\n              primaryColumnHelpTopic=\"pop_BA_Experiments_LiftCampaignName\"\r\n              title={searchLiftTitle}\r\n            />\r\n          </Card>\r\n        )}\r\n        {useVisitLift && (\r\n          <Card className={styles.card}>\r\n            <Subtitle2>{visitLiftTitle}</Subtitle2>\r\n            <OverviewTable\r\n              items={visitData}\r\n              liftHelpTopic=\"pop_BA_Experiments_Campaigns_VisitLift\"\r\n              primaryColumnHeader={campaignNameColumnHeader}\r\n              primaryColumnHelpTopic=\"pop_BA_Experiments_LiftCampaignName\"\r\n              title={visitLiftTitle}\r\n            />\r\n          </Card>\r\n        )}\r\n        {useConversionLift && (\r\n          <Card className={styles.card}>\r\n            <Subtitle2>{conversionLiftTitle}</Subtitle2>\r\n            <OverviewTable\r\n              items={conversionData}\r\n              liftHelpTopic=\"pop_BA_Experiments_Campaigns_ConversionLift\"\r\n              primaryColumnHeader={campaignNameColumnHeader}\r\n              primaryColumnHelpTopic=\"pop_BA_Experiments_LiftCampaignName\"\r\n              title={conversionLiftTitle}\r\n            />\r\n          </Card>\r\n        )}\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nCampaignOverviewSection.propTypes = {\r\n  conversionData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  measurementTypes: PropTypes.shape({\r\n    useConversionLift: PropTypes.bool.isRequired,\r\n    useSearchLift: PropTypes.bool.isRequired,\r\n    useVisitLift: PropTypes.bool.isRequired,\r\n  }).isRequired,\r\n  searchData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n  visitData: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.number.isRequired,\r\n    name: PropTypes.string.isRequired,\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  })).isRequired,\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n  helpContainer: {\r\n    alignItems: 'center',\r\n    columnGap: '5px',\r\n    display: 'flex',\r\n  },\r\n  card: {\r\n    borderBottomStyle: 'solid',\r\n    borderBottomWidth: '0px',\r\n    borderLeftStyle: 'solid',\r\n    borderLeftWidth: '5px',\r\n    borderRightStyle: 'solid',\r\n    borderRightWidth: '0px',\r\n    borderTopStyle: 'solid',\r\n    borderTopWidth: '0px',\r\n  },\r\n  label: {\r\n    alignItems: 'center',\r\n    columnGap: '5px',\r\n    display: 'flex',\r\n  },\r\n});\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Body1,\r\n  Title2,\r\n} from '@fluentui/react-components';\r\nimport { useStyles } from './styles';\r\n\r\nexport const Lift = ({\r\n  color,\r\n  helpTopic,\r\n  label,\r\n  value,\r\n}) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const displayedValue = Number.isFinite(value)\r\n    ? i18n.getString(_TL_('{{percentage}}%'), {\r\n      percentage: Math.round(value * 100),\r\n    })\r\n    : i18n.getString(_TL_('--'));\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n\r\n  return (\r\n    <Stack>\r\n      <div className={styles.label}>\r\n        <Body1>{label}</Body1>\r\n        <HelpButton\r\n          aria-label={`${learnMore} ${label}`}\r\n          topic={helpTopic}\r\n        />\r\n      </div>\r\n      <Title2 style={{ color }}>\r\n        {displayedValue}\r\n      </Title2>\r\n    </Stack>\r\n  );\r\n};\r\n\r\nLift.propTypes = {\r\n  color: PropTypes.string.isRequired,\r\n  helpTopic: PropTypes.string.isRequired,\r\n  label: PropTypes.string.isRequired,\r\n  value: PropTypes.number.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Caption1,\r\n  Caption1Strong,\r\n} from '@fluentui/react-components';\r\nimport { useStyles } from './styles';\r\n\r\nexport const ConfidenceLevel = ({ value }) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const label = i18n.getString(_TL_('Confidence level'));\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n\r\n  return (\r\n    <Stack>\r\n      <div className={styles.label}>\r\n        <Caption1>{label}</Caption1>\r\n        <HelpButton\r\n          aria-label={`${learnMore} ${label}`}\r\n          topic=\"pop_BA_Experiments_Confidence\"\r\n        />\r\n      </div>\r\n      <Caption1Strong>{value}</Caption1Strong>\r\n    </Stack>\r\n  );\r\n};\r\n\r\nConfidenceLevel.propTypes = {\r\n  value: PropTypes.string.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HorizontalBarChart } from '@fluentui/react-charting';\r\nimport { useStyles } from './styles';\r\n\r\nconst dataVizColors = {\r\n  control: '#637CEF',\r\n  conversion: '#CA5010',\r\n  search: '#9373C0',\r\n  visit: '#E3008C',\r\n};\r\n\r\nconst getPercentageString = (value, i18n) => {\r\n  if (value === 'N/A') {\r\n    return '--';\r\n  }\r\n  const percentageValue = i18n.formatDecimalToFixed(value * 100, { digits: 2 });\r\n  return i18n.getString(_TL_('{{value}}%'), {\r\n    value: percentageValue,\r\n  });\r\n};\r\n\r\nconst CustomDataLabel = ({ chartData }) => {\r\n  const i18n = useContext(I18nContext);\r\n  const rawValue = chartData[0].horizontalBarChartdata.x;\r\n  return getPercentageString(rawValue, i18n);\r\n};\r\n\r\nCustomDataLabel.propTypes = {\r\n  chartData: PropTypes.arrayOf(PropTypes.shape({\r\n    horizontalBarChartdata: PropTypes.shape({\r\n      x: PropTypes.number.isRequired,\r\n      y: PropTypes.number.isRequired,\r\n    }).isRequired,\r\n  })).isRequired,\r\n};\r\n\r\nexport const TreatmentControl = ({\r\n  color,\r\n  control,\r\n  treatment,\r\n}) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const treatmentLabel = i18n.getString(_TL_('Treatment'));\r\n  const controlLabel = i18n.getString(_TL_('Control'));\r\n  const learnMore = i18n.getString(_TL_('Click to learn more about'));\r\n  const maxValue = treatment > control ? treatment : control;\r\n\r\n  const data = [\r\n    {\r\n      chartData: [\r\n        {\r\n          color,\r\n          horizontalBarChartdata: { x: treatment, y: maxValue },\r\n          legend: treatmentLabel,\r\n          yAxisCalloutData: getPercentageString(treatment, i18n),\r\n        },\r\n      ],\r\n      chartTitle: (\r\n        <span className={styles.label}>\r\n          <span>{treatmentLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${treatmentLabel}`}\r\n            topic=\"pop_BA_Experiments_Treatment\"\r\n          />\r\n        </span>\r\n      ),\r\n    },\r\n    {\r\n      chartData: [\r\n        {\r\n          color: dataVizColors.control,\r\n          horizontalBarChartdata: { x: control, y: maxValue },\r\n          legend: controlLabel,\r\n          yAxisCalloutData: getPercentageString(control, i18n),\r\n        },\r\n      ],\r\n      chartTitle: (\r\n        <span className={styles.label}>\r\n          <span>{controlLabel}</span>\r\n          <HelpButton\r\n            aria-label={`${learnMore} ${controlLabel}`}\r\n            topic=\"pop_BA_Experiments_Control\"\r\n          />\r\n        </span>\r\n      ),\r\n    },\r\n  ];\r\n\r\n  const getCustomDataLabel = useCallback(props => (\r\n    <CustomDataLabel {...props} />\r\n  ), []);\r\n\r\n  return (\r\n    <HorizontalBarChart\r\n      barChartCustomData={getCustomDataLabel}\r\n      data={data}\r\n    />\r\n  );\r\n};\r\n\r\nTreatmentControl.propTypes = {\r\n  color: PropTypes.string.isRequired,\r\n  control: PropTypes.number.isRequired,\r\n  treatment: PropTypes.number.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {\r\n  Card,\r\n  Subtitle1,\r\n} from '@fluentui/react-components';\r\nimport { Lift } from './lift';\r\nimport { ConfidenceLevel } from './confidence-level';\r\nimport { TreatmentControl } from './treatment-control';\r\nimport { useStyles } from './styles';\r\n\r\nexport const PerformanceCard = ({\r\n  color,\r\n  confidence,\r\n  control,\r\n  lift,\r\n  liftHelpTopic,\r\n  subtitle,\r\n  title,\r\n  treatment,\r\n}) => {\r\n  const styles = useStyles();\r\n  const className = `${title.toLowerCase().replace(/ /g, '-')}-overview`;\r\n\r\n  return (\r\n    <div className={className}>\r\n      <Card\r\n        className={styles.card}\r\n        orientation=\"horizontal\"\r\n        style={{ borderColor: color }}\r\n      >\r\n        <section>\r\n          <Subtitle1>{title}</Subtitle1>\r\n          <Lift\r\n            color={color}\r\n            helpTopic={liftHelpTopic}\r\n            label={subtitle}\r\n            value={lift}\r\n          />\r\n          <ConfidenceLevel value={confidence} />\r\n        </section>\r\n        <section>\r\n          <TreatmentControl\r\n            color={color}\r\n            control={control}\r\n            treatment={treatment}\r\n          />\r\n        </section>\r\n      </Card>\r\n    </div>\r\n  );\r\n};\r\n\r\nPerformanceCard.propTypes = {\r\n  color: PropTypes.string.isRequired,\r\n  confidence: PropTypes.string.isRequired,\r\n  control: PropTypes.number.isRequired,\r\n  lift: PropTypes.number.isRequired,\r\n  liftHelpTopic: PropTypes.string.isRequired,\r\n  subtitle: PropTypes.string.isRequired,\r\n  title: PropTypes.string.isRequired,\r\n  treatment: PropTypes.number.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Subtitle1,\r\n} from '@fluentui/react-components';\r\nimport { PerformanceCard } from './performance-card/performance-card';\r\n\r\nconst dataVizColors = {\r\n  conversion: '#CA5010',\r\n  search: '#9373C0',\r\n  visit: '#E3008C',\r\n};\r\n\r\nconst tokens = {\r\n  childrenGap: 15,\r\n};\r\n\r\nexport const ExperimentOverviewSection = ({\r\n  conversionData,\r\n  measurementTypes,\r\n  searchData,\r\n  visitData,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const sectionTitle = i18n.getString(_TL_('Overview'));\r\n  const searchTitle = i18n.getString(_TL_('Search lift'));\r\n  const searchSubtitle = i18n.getString(_TL_('Brand search rate'));\r\n  const visitTitle = i18n.getString(_TL_('Visit lift'));\r\n  const visitSubtitle = i18n.getString(_TL_('Website visitation rate'));\r\n  const conversionTitle = i18n.getString(_TL_('Conversion lift'));\r\n  const conversionSubtitle = i18n.getString(_TL_('Conversion rate'));\r\n  const { useConversionLift, useSearchLift, useVisitLift } = measurementTypes;\r\n\r\n  return (\r\n    <>\r\n      <Subtitle1>{sectionTitle}</Subtitle1>\r\n      <Stack horizontal tokens={tokens}>\r\n        {useSearchLift && (\r\n          <PerformanceCard\r\n            color={dataVizColors.search}\r\n            liftHelpTopic=\"pop_BA_Experiments_Awareness\"\r\n            subtitle={searchSubtitle}\r\n            title={searchTitle}\r\n            {...searchData}\r\n          />\r\n        )}\r\n        {useVisitLift && (\r\n          <PerformanceCard\r\n            color={dataVizColors.visit}\r\n            liftHelpTopic=\"pop_BA_Experiments_Consideration\"\r\n            subtitle={visitSubtitle}\r\n            title={visitTitle}\r\n            {...visitData}\r\n          />\r\n        )}\r\n        {useConversionLift && (\r\n          <PerformanceCard\r\n            color={dataVizColors.conversion}\r\n            liftHelpTopic=\"pop_BA_Experiments_Conversions\"\r\n            subtitle={conversionSubtitle}\r\n            title={conversionTitle}\r\n            {...conversionData}\r\n          />\r\n        )}\r\n      </Stack>\r\n    </>\r\n  );\r\n};\r\n\r\nExperimentOverviewSection.propTypes = {\r\n  conversionData: PropTypes.shape({\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  }).isRequired,\r\n  measurementTypes: PropTypes.shape({\r\n    useConversionLift: PropTypes.bool.isRequired,\r\n    useSearchLift: PropTypes.bool.isRequired,\r\n    useVisitLift: PropTypes.bool.isRequired,\r\n  }).isRequired,\r\n  searchData: PropTypes.shape({\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  }).isRequired,\r\n  visitData: PropTypes.shape({\r\n    confidence: PropTypes.string.isRequired,\r\n    control: PropTypes.number.isRequired,\r\n    lift: PropTypes.number.isRequired,\r\n    treatment: PropTypes.number.isRequired,\r\n  }).isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext } from 'react';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Button,\r\n  Menu,\r\n  MenuItem,\r\n  MenuList,\r\n  MenuPopover,\r\n  MenuTrigger,\r\n  Title3,\r\n} from '@fluentui/react-components';\r\nimport { ArrowDownload20Filled } from '@fluentui/react-icons';\r\n\r\nexport const DownloadMenu = ({\r\n  onClickExcel,\r\n  onClickJson,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const downloadLabel = i18n.getString(_TL_('Download'));\r\n  const excelLabel = i18n.getString(_TL_('Excel'));\r\n  const jsonLabel = i18n.getString(_TL_('JSON'));\r\n\r\n  return (\r\n    <Menu>\r\n      <MenuTrigger disableButtonEnhancement>\r\n        <Button>\r\n          <ArrowDownload20Filled />\r\n          {downloadLabel}\r\n        </Button>\r\n      </MenuTrigger>\r\n      <MenuPopover>\r\n        <MenuList>\r\n          <MenuItem onClick={onClickExcel}>{excelLabel}</MenuItem>\r\n          <MenuItem onClick={onClickJson}>{jsonLabel}</MenuItem>\r\n        </MenuList>\r\n      </MenuPopover>\r\n    </Menu>\r\n  );\r\n};\r\n\r\nDownloadMenu.propTypes = {\r\n  onClickExcel: PropTypes.func.isRequired,\r\n  onClickJson: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ResultsPageHeader = ({\r\n  onClickExcel,\r\n  title,\r\n}) => {\r\n  const i18n = useContext(I18nContext);\r\n  const pageDescription = i18n.getString(_TL_('View your reports for conversion lift, search lift, and visit lift. We report specific data points for each lift measurement type: Conversion rate, brand search rate, and website visitation rate. These measurements help you understand how much more likely consumers are to search for your brand, visit your website, and convert on your website after seeing your Audience ads.'));\r\n  const downloadLabel = i18n.getString(_TL_('Download'));\r\n\r\n  return (\r\n    <div className=\"results-page-header\">\r\n      <Stack horizontal horizontalAlign=\"space-between\">\r\n        <Title3>{title}</Title3>\r\n        <Button onClick={onClickExcel} className=\"download-results-btn\">\r\n          <ArrowDownload20Filled />\r\n          {downloadLabel}\r\n        </Button>\r\n      </Stack>\r\n      <p>\r\n        <LearnMoreLink\r\n          linkText={i18n.getString(_TL_('Learn more'))}\r\n          text={pageDescription}\r\n          topic=\"app54859\"\r\n        />\r\n      </p>\r\n    </div>\r\n  );\r\n};\r\n\r\nResultsPageHeader.propTypes = {\r\n  onClickExcel: PropTypes.func.isRequired,\r\n  title: PropTypes.string.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport { HelpButton } from '@bingads-webui-react/help-popup';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n  Card,\r\n  Skeleton,\r\n  SkeletonItem,\r\n  Subtitle1,\r\n  Text,\r\n  makeStyles,\r\n} from '@fluentui/react-components';\r\nimport { countries } from '../common/countries';\r\n\r\nconst useStyles = makeStyles({\r\n  card: {\r\n    marginBottom: '12px',\r\n  },\r\n  field: {\r\n    display: 'table-row',\r\n  },\r\n  fields: {\r\n    borderSpacing: '1em',\r\n    display: 'table',\r\n  },\r\n  label: {\r\n    display: 'table-cell',\r\n    minWidth: '136px',\r\n    whiteSpace: 'nowrap',\r\n  },\r\n  labelContents: {\r\n    columnGap: '5px',\r\n    display: 'flex',\r\n  },\r\n  value: {\r\n    display: 'table-cell',\r\n  },\r\n});\r\n\r\nconst StudySummaryCardField = ({\r\n  helpTopic,\r\n  label,\r\n  value,\r\n}) => {\r\n  const styles = useStyles();\r\n  return (\r\n    <section className={styles.field}>\r\n      <div className={styles.label}>\r\n        <div className={styles.labelContents}>\r\n          <Text weight=\"bold\">{label}</Text>\r\n          {!!helpTopic && (\r\n            <HelpButton\r\n              aria-label={label}\r\n              topic={helpTopic}\r\n            />\r\n          )}\r\n        </div>\r\n      </div>\r\n      <div className={styles.value}>\r\n        <Text>{value}</Text>\r\n      </div>\r\n    </section>\r\n  );\r\n};\r\n\r\nStudySummaryCardField.propTypes = {\r\n  helpTopic: PropTypes.string,\r\n  label: PropTypes.string.isRequired,\r\n  value: PropTypes.string.isRequired,\r\n};\r\n\r\nStudySummaryCardField.defaultProps = {\r\n  helpTopic: null,\r\n};\r\n\r\nexport const StudySummaryCard = ({\r\n  campaigns,\r\n  country,\r\n  endDate,\r\n  keywords,\r\n  startDate,\r\n}) => {\r\n  const styles = useStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const cardTitle = i18n.getString(_TL_('Summary'));\r\n  const campaignsLabel = i18n.getString(_TL_('Campaigns'));\r\n  const campaignsValue = useMemo(() => campaigns.map(campaign => campaign.name).join(i18n.getString(_TL_(', '))), [campaigns, i18n]);\r\n  const countryLabel = i18n.getString(_TL_('Country'));\r\n  const countryValue = i18n.getString(countries[country].name);\r\n  const dateRangeLabel = i18n.getString(_TL_('Experiment dates'));\r\n  const dateRangeValue = i18n.getString(_TL_('{{startDate}} - {{endDate}}'), {\r\n    startDate: i18n.formatDate(new Date(startDate), { raw: 'MM/dd/yy' }),\r\n    endDate: i18n.formatDate(new Date(endDate), { raw: 'MM/dd/yy' }),\r\n  });\r\n  const keywordsLabel = i18n.getString(_TL_('Keywords'));\r\n  const keywordsValue = useMemo(\r\n    () => (\r\n      keywords.length\r\n        ? keywords.join(i18n.getString(_TL_(', ')))\r\n        : i18n.getString(_TL_('None selected'))\r\n    ),\r\n    [keywords, i18n]\r\n  );\r\n\r\n  return (\r\n    <div className=\"study-summary-card\">\r\n      <Card className={styles.card}>\r\n        <Subtitle1>{cardTitle}</Subtitle1>\r\n        <section className={styles.fields}>\r\n          <StudySummaryCardField\r\n            helpTopic=\"pop_BA_Experiments_Campaigns\"\r\n            label={campaignsLabel}\r\n            value={campaignsValue}\r\n          />\r\n          <StudySummaryCardField\r\n            helpTopic=\"pop_BA_Experiments_Country\"\r\n            label={countryLabel}\r\n            value={countryValue}\r\n          />\r\n          <StudySummaryCardField\r\n            helpTopic=\"pop_BA_Experiments_Dates\"\r\n            label={dateRangeLabel}\r\n            value={dateRangeValue}\r\n          />\r\n          <StudySummaryCardField\r\n            label={keywordsLabel}\r\n            value={keywordsValue}\r\n          />\r\n        </section>\r\n      </Card>\r\n    </div>\r\n  );\r\n};\r\n\r\nStudySummaryCard.propTypes = {\r\n  campaigns: PropTypes.arrayOf(PropTypes.shape({\r\n    name: PropTypes.string.isRequired,\r\n  })).isRequired,\r\n  country: PropTypes.string.isRequired,\r\n  endDate: PropTypes.string.isRequired,\r\n  keywords: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n  startDate: PropTypes.string.isRequired,\r\n};\r\n\r\nconst useSkeletonStyles = makeStyles({\r\n  card: {\r\n    marginBottom: '12px',\r\n  },\r\n  firstRow: {\r\n    alignItems: 'center',\r\n    columnGap: '20px',\r\n    display: 'grid',\r\n    gridTemplateColumns: '17% 42%',\r\n    position: 'relative',\r\n    rowGap: '12px',\r\n  },\r\n  row: {\r\n    alignItems: 'center',\r\n    columnGap: '20px',\r\n    display: 'grid',\r\n    gridTemplateColumns: '17% 17%',\r\n    paddingTop: '20px',\r\n    position: 'relative',\r\n    rowGap: '12px',\r\n  },\r\n  skeletonRoot: {\r\n    marginBottom: '12px',\r\n    marginLeft: '12px',\r\n    marginRight: '12px',\r\n    marginTop: '12px',\r\n  },\r\n});\r\n\r\nexport const StudySummaryCardSkeleton = () => {\r\n  const styles = useSkeletonStyles();\r\n  const i18n = useContext(I18nContext);\r\n  const loadingMessage = i18n.getString(_TL_('Loading content'));\r\n  const cardTitle = i18n.getString(_TL_('Experiment summary'));\r\n\r\n  return (\r\n    <Card className={styles.card}>\r\n      <Subtitle1>{cardTitle}</Subtitle1>\r\n      <Skeleton aria-label={loadingMessage} className={styles.skeletonRoot}>\r\n        <div className={styles.firstRow}>\r\n          <SkeletonItem size={20} />\r\n          <SkeletonItem size={20} />\r\n        </div>\r\n        <div className={styles.row}>\r\n          <SkeletonItem size={20} />\r\n          <SkeletonItem size={20} />\r\n        </div>\r\n        <div className={styles.row}>\r\n          <SkeletonItem size={20} />\r\n          <SkeletonItem size={20} />\r\n        </div>\r\n      </Skeleton>\r\n    </Card>\r\n  );\r\n};\r\n","import XLSX from 'xlsx';\r\nimport { downloadify } from '@bingads-webui/download-service';\r\n\r\nconst getDateString = () => new Date().toISOString().split('T')[0];\r\n\r\nconst getFileName = (id, extension) => {\r\n  const dateString = getDateString();\r\n  return `Lift_Experiment_Result_${id}_${dateString}.${extension}`;\r\n};\r\n\r\nconst addWorksheet = (results, workbook, sheetName) => {\r\n  if (results && results.length > 0) {\r\n    const worksheet = XLSX.utils.json_to_sheet(results);\r\n    XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);\r\n  }\r\n};\r\n\r\nexport const downloadExcel = (id, data) => {\r\n  const workbook = XLSX.utils.book_new();\r\n  const fileName = getFileName(id, 'xlsx');\r\n\r\n  addWorksheet(data.Campaign_Result, workbook, 'CampaignResult');\r\n  addWorksheet(data.CID_Result, workbook, 'CIDResult');\r\n  addWorksheet(data.TargetType_Result, workbook, 'TargetTypeResult');\r\n  addWorksheet(data.Top5_Result, workbook, 'Top5Result');\r\n  addWorksheet(data.Bottom5_Result, workbook, 'Bottom5Result');\r\n\r\n  XLSX.writeFile(workbook, fileName);\r\n\r\n  return true;\r\n};\r\n\r\nexport const downloadJson = (id, data) => {\r\n  const fileName = getFileName(id, 'json');\r\n  const dataString = JSON.stringify(data);\r\n  downloadify(fileName, dataString, { type: 'text/json' });\r\n\r\n  return true;\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById } from '@bingads-webui-react/with-site-map';\r\nimport { withServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useFetch } from '@bingads-webui-campaign/react-hook-use-fetch';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport {\r\n  Title3,\r\n} from '@fluentui/react-components';\r\nimport { fetchExperiment, parseMeasurementTypeEnum } from './fetch/experiment';\r\nimport { fetchCampaignsByIdEDM } from './fetch/campaigns';\r\nimport {\r\n  getAudienceResults,\r\n  getBottomPerformerResults,\r\n  getCampaignResults,\r\n  getOverallResults,\r\n  getTopPerformerResults,\r\n  transformResults,\r\n  getCampaignIds,\r\n  fetchResults,\r\n} from './fetch/result';\r\nimport { AudienceOverviewSection } from './results/audience-overview-section';\r\nimport { CampaignOverviewSection } from './results/campaign-overview-section';\r\nimport { ExperimentOverviewSection } from './results/experiment-overview-section';\r\nimport { ResultsPageHeader } from './results/page-header';\r\nimport { StudySummaryCard } from './results/study-summary-card';\r\nimport { downloadExcel } from './utils/download';\r\n\r\nconst mainLayoutTokens = {\r\n  childrenGap: 15,\r\n  padding: 30,\r\n};\r\n\r\nexport const LiftMeasurementResultsInternal = ({ siteMap }) => {\r\n  const { scope } = useContext(ScopeContext);\r\n  const { fetch } = useFetch();\r\n\r\n  const [isLoading, setIsLoading] = useState(true);\r\n  const [experimentName, setExperimentName] = useState('');\r\n  const [campaignsAsArray, setCampaignsAsArray] = useState([]);\r\n  const [country, setCountry] = useState(null);\r\n  const [startDate, setStartDate] = useState(null);\r\n  const [endDate, setEndDate] = useState(null);\r\n  const [measurementTypes, setMeasurementTypes] = useState({\r\n    useConversionLift: false,\r\n    useSearchLift: false,\r\n    useVisitLift: false,\r\n  });\r\n  const [keywords, setKeywords] = useState([]);\r\n  const [overallResults, setOverallResults] = useState({});\r\n  const [audienceResults, setAudienceResults] = useState({});\r\n  const [topPerformerResults, setTopPerformerResults] = useState({});\r\n  const [bottomPerformerResults, setBottomPerformerResults] = useState({});\r\n  const [campaignResults, setCampaignResults] = useState({});\r\n  const [liftStudyResults, setLiftStudyResults] = useState();\r\n\r\n  const fetchCampaigns = useCallback(async (studyResults) => {\r\n    try {\r\n      const campaignIds = getCampaignIds(studyResults);\r\n      const results = campaignIds.length > 0 ? await fetchCampaignsByIdEDM(scope.values, campaignIds) : null;\r\n\r\n      if (!results || !results.value) return;\r\n\r\n      const transformedCampaigns = results.value.reduce((acc, result) => {\r\n        acc[result.Id] = { name: result.Name, id: result.Id };\r\n        return acc;\r\n      }, {});\r\n\r\n      setCampaignsAsArray(Object.values(transformedCampaigns));\r\n      setCampaignResults(getCampaignResults(studyResults, transformedCampaigns));\r\n    } catch (e) {\r\n      console.log('Error fetching campaigns');\r\n      console.log(e);\r\n    }\r\n  }, [scope.values]);\r\n\r\n  const fetchLiftStudyResults = useCallback(async liftExperimentId => fetchResults({\r\n    liftExperimentId,\r\n    scope,\r\n    fetch,\r\n    onSuccess: (response) => {\r\n      setClarityTag({\r\n        IsFetchLiftExperimentResultsSuccessful: true,\r\n      });\r\n      setLiftStudyResults(response);\r\n      return transformResults(response);\r\n    },\r\n    onFailure: (error) => {\r\n      setClarityTag({\r\n        IsFetchLiftExperimentResultsSuccessful: false,\r\n      });\r\n      setIsLoading(false);\r\n      console.log('Error fetching lift study results');\r\n      console.log(error);\r\n    },\r\n  }), [fetch, scope]);\r\n\r\n  useEffect(() => {\r\n    if (scope.values.liftExperimentId == null) {\r\n      const route = getRoutePathById(siteMap, 'lift-measurement');\r\n      scope.remove('liftExperimentId');\r\n      scope.save(route);\r\n    } else {\r\n      setClarityTag({\r\n        IsFetchingLiftExperimentResults: true,\r\n        IsLiftMeasurementPage: true,\r\n        LiftMeasurementPage: 'results',\r\n      });\r\n      // Fetch from the experiment, experiment results, and campaigns endpoints to build out the page state.\r\n      fetchExperiment(scope.values, {\r\n        onSuccess: async (liftExperiment) => {\r\n          setExperimentName(liftExperiment.Name);\r\n          setCountry(liftExperiment.Country);\r\n          setStartDate(liftExperiment.StartDate);\r\n          setEndDate(liftExperiment.EndDate);\r\n          setMeasurementTypes(parseMeasurementTypeEnum(liftExperiment.MeasurementType));\r\n          setKeywords(liftExperiment.Keywords == null ? [] : liftExperiment.Keywords);\r\n\r\n          const results = await fetchLiftStudyResults(liftExperiment.Id);\r\n\r\n          if (results) {\r\n            await fetchCampaigns(results);\r\n            setOverallResults(getOverallResults(results));\r\n            setAudienceResults(getAudienceResults(results));\r\n            setTopPerformerResults(getTopPerformerResults(results));\r\n            setBottomPerformerResults(getBottomPerformerResults(results));\r\n            setIsLoading(false);\r\n          }\r\n        },\r\n        onFailure: (message) => {\r\n          // We should log the details of the failure and then route the user back to the landing page.\r\n          console.log('The fetch failed:');\r\n          console.log(message);\r\n        },\r\n      });\r\n    }\r\n  }, [fetchCampaigns, fetchLiftStudyResults, scope, scope.values.liftExperimentId, siteMap]);\r\n\r\n  const onClickExcel = useCallback(() => {\r\n    if (liftStudyResults) {\r\n      setClarityTag({\r\n        IsDownloadingLiftMeasurementExcelResults: true,\r\n      });\r\n      downloadExcel(scope.values.liftExperimentId, liftStudyResults);\r\n    }\r\n  }, [scope.values.liftExperimentId, liftStudyResults]);\r\n\r\n  const i18n = useContext(I18nContext);\r\n  const loadingMessage = i18n.getString(_TL_('Loading lift experiment results...'));\r\n\r\n  return (\r\n    <div className=\"lift-measurement-results\">\r\n      {isLoading ?\r\n        <Stack tokens={mainLayoutTokens}>\r\n          <Title3 className=\"loading-message\">{loadingMessage}</Title3>\r\n        </Stack>\r\n        :\r\n        <Stack tokens={mainLayoutTokens}>\r\n          <ResultsPageHeader\r\n            onClickExcel={onClickExcel}\r\n            title={experimentName}\r\n          />\r\n          <StudySummaryCard\r\n            campaigns={campaignsAsArray}\r\n            country={country}\r\n            endDate={endDate}\r\n            keywords={keywords}\r\n            startDate={startDate}\r\n          />\r\n          <ExperimentOverviewSection\r\n            conversionData={overallResults.conversion}\r\n            measurementTypes={measurementTypes}\r\n            searchData={overallResults.search}\r\n            visitData={overallResults.visit}\r\n          />\r\n          <AudienceOverviewSection\r\n            conversionBottomPerformerData={bottomPerformerResults.conversion}\r\n            conversionData={audienceResults.conversion}\r\n            conversionTopPerformerData={topPerformerResults.conversion}\r\n            measurementTypes={measurementTypes}\r\n            searchBottomPerformerData={bottomPerformerResults.search}\r\n            searchData={audienceResults.search}\r\n            searchTopPerformerData={topPerformerResults.search}\r\n            visitBottomPerformerData={bottomPerformerResults.visit}\r\n            visitData={audienceResults.visit}\r\n            visitTopPerformerData={topPerformerResults.visit}\r\n          />\r\n          <CampaignOverviewSection\r\n            conversionData={campaignResults.conversion}\r\n            measurementTypes={measurementTypes}\r\n            searchData={campaignResults.search}\r\n            visitData={campaignResults.visit}\r\n          />\r\n        </Stack>\r\n      }\r\n    </div>\r\n  );\r\n};\r\n\r\nLiftMeasurementResultsInternal.propTypes = {\r\n  siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n    id: PropTypes.string,\r\n  })).isRequired,\r\n  serverContext: PropTypes.shape({\r\n    Token: PropTypes.string.isRequired,\r\n  }).isRequired,\r\n};\r\n\r\nexport const LiftMeasurementResults = withServerContext(LiftMeasurementResultsInternal);\r\n"],"names":["useCampaignNameTagStyles","makeStyles","button","textAlign","useFilterDropdownStyles","root","maxWidth","truncatedText","overflowX","textOverflow","whiteSpace","useKeywordInputStyles","textarea","width","height","textareaContainer","paddingLeft","useMeasurementTypeSelectorStyles","dropdownContainer","dropdown","useRadioChildControlStyles","container","warning","marginTop","useSearchCustomerIdStyles","input","useSelectCampaignGridStyles","dataGridRow","opacity","dataGridRowDisabled","selectCampaignTableCell","alignItems","display","spinner","useTagsListStyles","paddingBottom","tagsList","columnGap","flexWrap","rowGap","tagsToolbar","justifyContent","getUIBlockerStyle","uiblockerStyle","palette","noDataStyles","color","neutralSecondary","fontSize","useStyles","flexDirection","pageNumber","marginRight","pageSizeOptions","Paginator","i18n","useContext","I18nContext","styles","_useContext","GridContext","dispatch","state","_state$pagination","pagination","pageSize","pageSizeId","useId","pageSizeLabel","getString","_TL_","pageCount","Math","ceil","totalCount","pageCountSeparator","onSelectPageSize","useCallback","e","_ref","value","type","payload","Number","onDecreasePageNumber","_objectSpread","onIncreasePageNumber","_jsxs","className","children","_jsx","Caption1","Select","appearance","id","onChange","size","map","pageSizeOption","Divider","vertical","Button","disabled","icon","ArrowLeftRegular","onClick","concat","ArrowRightRegular","getTheme","noData","LandingPageFooter","_Fragment","items","length","countries","AD","code","name","AE","AG","AI","AL","AM","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BJ","BM","BN","BO","BR","BS","BW","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CO","CR","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FO","FR","GA","GB","GD","GE","GF","GI","GL","GM","GN","GP","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JP","KG","KM","KN","KY","LC","LI","LK","LS","LT","LU","LV","LY","MC","MD","ME","MG","MH","MK","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","NA","NC","NE","NF","NG","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PT","PW","PY","QA","RE","RO","RS","RW","SA","SC","SE","SG","SI","SK","SL","SM","SN","SO","SR","SV","TC","TG","TH","TJ","TK","TN","TO","TR","TT","TV","TW","TZ","UG","US","UY","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW","STATUS_SCHEDULED","STATUS_RUNNING","STATUS_MEASURING","STATUS_COMPLETED","STATUS_FAILED","statuses","_defineProperty","badgeColor","infoTitle","infoText","popoverContent","StatusBadge","infoTextData","text","Popover","positioning","withArrow","PopoverTrigger","disableButtonEnhancement","Badge","PopoverSurface","tabIndex","Subtitle1","nonDeletableStatuses","DeleteStudyDialog","onDelete","status","description","deleteButtonLabel","closeButtonLabel","Dialog","DialogTrigger","includes","DeleteRegular","DialogSurface","DialogBody","DialogTitle","DialogContent","DialogActions","getCountryName","country","getCellFocusMode","columnId","fetchCampaignsByIdEDM","campaignIds","cid","aid","formattedCampaignIds","join","edmCampaign","Customers","$withKey","Accounts","Campaigns","get","filter","where","toPromise","EXPERIMENT_API_ERRORS","CampaignAssociationsLimitExceeded","DuplicateEntity","DuplicateTagId","EntityAlreadyExists","EntityLimitExceeded","ExperimentStartDateInvalid","ExperimentTimeperiodOverlapping","ExperimentTypeInvalid","InvalidCountryCode","InvalidCustomerId","InvalidStatus","InvalidTagStatus","KeywordIsBlank","KeywordTooLong","NameExceededMaxLen","NotAllowedToDoCurrentOperation","TagsBatchSizeExceesdLimit","createMeasurementTypeEnum","useConversionLift","useSearchLift","useVisitLift","parseMeasurementTypeEnum","combinedEnum","stitchFullCampaignsIntoExperiments","associatedCampaigns","fetchedLiftExperiments","associatedCampaignsById","forEach","campaign","Id","reduce","accum","liftExperiment","formattedCampaigns","campaignId","push","fetchExperiment","_ref4","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_ref2","_ref3","liftExperimentId","onSuccess","onFailure","wrap","_context","prev","next","abrupt","LiftExperiments","select","then","response","Error","catch","curlyTemplate","stop","_x","_x2","apply","arguments","saveExperiment","_ref7","_ref8","post","isAPISaveFailure","apiErrorCode","body","Code","errorMessage","error","updateExperiment","_ref9","_ref10","update","LiftStudiesGrid","onClickEdit","siteMap","scope","ScopeContext","onClickName","route","getRoutePathById","append","save","message","AlertHelper","showError","onDeleteFailure","setClarityTag","IsDeleteLiftExperimentSuccessful","onDeleteSuccess","liftExperimentIdToDelete","liftExperimentsWithDeletedRemoved","onClickDelete","IsClickedDeleteLiftExperiment","_ref11","destroyAsPromise","deleteExperiment","values","columns","createTableColumn","compare","a","b","Name","localeCompare","renderCell","item","experimentName","Status","Text","style","cursor","underline","instructions","Tooltip","content","relationship","TableCellLayout","truncate","renderHeaderCell","startDate","StartDate","campaignNamesString","dateRangeString","formatDate","Date","EndDate","Country","countryString","EditRegular","getColumns","onFetchExperimentsSuccess","associatedCampaignIds","campaignsResponse","formattedLiftExperiments","_toConsumableArray","finally","withUiBlock","$","sent","getOrderBy","column","fieldName","isSortDescending","useEffect","_ref5","_ref6","query","fetchExperiments","count","top","skip","editableFilter","orderby","sortedColumn","onSortChange","sortColumn","sortDirection","IsLiftExperimentSortChanged","LiftExperimentSortField","LiftExperimentSortDirection","DataGrid","getRowId","sortable","DataGridHeader","DataGridRow","DataGridHeaderCell","padding","DataGridBody","rowId","DataGridCell","focusMode","parseKeywordString","keywordString","split","word","trim","sortByName","getUETTags","wizardData","useVisitConversionLift","uetTags","both","conversion","visit","getKeywords","keywordsMethod","typedKeywordString","kw","slice","selectedKeywords","keywordId","fetchedKeywords","CountrySelector","onSelect","selectedCountries","placeholder","dropdownLabel","delimiter","buttonText","useMemo","formattedSelectionText","countryText","getButtonText","countryKeyValues","Object","sort","onOptionSelect","data","selectedOptions","Dropdown","multiselect","Option","StatusSelector","selectedStatuses","statusText","statusMap","search","debouncedEditableFilterDispatch","_","currentEditableFilterPayload","Toolbar","onClickCreate","createButtonLabel","searchBoxPlaceholder","searchBoxLabel","_useState","useState","_useState2","_slicedToArray","countryFilters","setCountryFilters","_useState3","_useState4","searchFilter","setSearchFilter","_useState5","_useState6","statusFilters","setStatusFilters","onChangeCountries","IsSelectedLiftExperimentCountryFilter","onChangeSearchInput","_e","IsChangedLiftExperimentSearchFilter","onChangeStatuses","IsSelectedLiftExperimentStatusFilter","fetchExperimentsFilter","formattedCountryFilters","formattedStatusFilters","toLowerCase","fragment","Stack","horizontal","horizontalAlign","tokens","childrenGap","Input","mergeClasses","contentBefore","SearchRegular","footer","gridMobileView","LiftMeasurement","useDefaultStyles","IsClickedCreateLiftExperiment","IsClickedEditLiftExperiment","initialGridContext","GridContextProvider","Card","CardFooter","EDIT_INTENT","NextButton","_useWizardService","useWizardService","send","isBlocking","matchStepState","STEP_STATES","FETCHING","LOADING","SAVING","onNextClicked","WIZARD_EVENTS","SAVE_AND_NEXT","defaultProps","BackButton","_useWizardService2","onBackClicked","BACK","CancelButton","_useWizardService3","onCancelClicked","CANCEL","SaveAndExitButton","_useWizardService4","SAVE_AND_EXIT","LiftMeasurementStepFooter","isFirstStep","getIsFirstStep","isLastStep","getIsLastStep","errorMessages","CAMPAIGN_REQUIRED","CAMPAIGNS_TOO_MANY","CONVERSION_GOAL_REQUIRED","COUNTRY_REQUIRED","KEYWORDS_TOO_LONG","KEYWORDS_TOO_MANY","MEASUREMENT_TYPE_REQUIRED","NAME_REQUIRED","NAME_TOO_LONG","SAVE_VALIDATION_FAILED","SEARCH_CID_RANGE","SEARCH_CID_TYPE","SELECTED_KEYWORDS_REQUIRED","START_DATE_REQUIRED","STATUS_INVALID_FOR_EDIT","TYPED_KEYWORDS_REQUIRED","UET_TAG_SELECTION_REQUIRED","UET_REQUIRED","VISIT_CONVERSION_LIFT_REQUIRED","stepLayoutTokens","selectCampaignsStepLayoutTokens","cardHeaderStyles","cardHeader","label","paddingRight","validateCampaignCount","isValid","max","validateVisitConversionLift","RequiredDropdown","withCustomValidation","updateValidation","validationProps","restProps","_objectWithoutProperties","_excluded","selected","CountryCard","onChangeCountry","countryLabel","learnMore","countryAsArray","fieldProps","setFieldProps","onValidateCountry","messages","validationMessage","validationState","CardHeader","header","Label","required","HelpButton","topic","Field","ariaLabel","field","onValidate","MS_PER_DAY","MS_PER_SEC","getFormattedDateString","d","toISOString","StartDateCardInternal","onChangeStartDate","localizedStrings","months","shortMonths","days","shortDays","goToToday","prevMonthAriaLabel","nextMonthAriaLabel","prevYearAriaLabel","nextYearAriaLabel","closeButtonAriaLabel","isRequiredErrorMessage","invalidInputErrorMessage","getDatePickerStrings","tomorrow","now","initialDate","startDateLabel","onSelectStartDate","date","formattedDate","dateUtils","format","onFormatDate","DatePicker","initialPickerDate","minDate","onSelectDate","strings","StartDateCard","ADD_KEYWORDS_BY_ENTRY","ADD_KEYWORDS_BY_SELECTION","KeywordInput","entryControl","isDisabled","isSelectDisabled","onChangeKeywordsMethod","selectControl","selectLabel","entryLabel","onSelectRadio","RadioGroup","Radio","KeywordTag","listRemoveId","onRemove","removeTagId","onRemoveTag","Dismiss12Regular","iconPosition","shape","KeywordDisplay","onRemoveAllKeywords","onRemoveKeyword","tagsListId","tagsListRemoveId","removedId","weight","_fetchedKeywords$keyw","KeywordSelector","onRemoveAll","orderedFetchedKeywords","dropdownId","impressionsUnit","onSelectDropdownOption","onValidateKeywords","impressions","isOptionDisabled","optionLabel","ValidatedTextarea","withValidation","Textarea","KeywordTextarea","textareaId","onChangeTextarea","validator","parsedKeywords","tooLongKeywords","key","unit","verb","validateState","MeasurementTypeCard","helpId","isAllowed","isEnabled","onToggle","title","replace","Switch","checked","Subtitle2","SearchCustomerIdInternal","customerId","getIsValid","formattedData","onChangeInput","_getIsValid","searchCid","SearchCustomerId","row","gridTemplateColumns","position","CardContentSkeleton","rowCount","skeletonId","rowKeys","Array","keys","Skeleton","rowKey","SkeletonItem","noop","SearchLiftLoading","SearchLiftInternal","onChangeCustomerId","onChangeKeywords","onSelectKeywords","context","isLiftTypeDisabled","hasNoKeywords","isDirty","isFetchingKeywords","ValidationGroup","SearchLift","paddingTop","ApiSaveErrorNotification","MessageBar","intent","MessageBarBody","getActiveGoalsCount","goals","getGoalsOptionText","goal","none","plural","singular","UetTagSelector","fetchedUetTags","orderedFetchedUetTags","areActiveConversionGoalsMissing","tagId","hoverMessage","goalsUnit","goalsUnitPlural","noGoals","onValidateUetTags","visible","TRACK_BOTH_VISIT_AND_CONVERSION","TRACK_CONVERSION_ONLY","TRACK_VISIT_ONLY","VisitConversionInput","combinedControl","conversionControl","onChangeMethod","visitControl","combinedLabel","conversionLabel","visitLabel","trackingMethod","VisitConversionLiftLoading","VisitConversionLiftNotAllowed","explanation","VisitConversionLiftInternal","onSelectUetTags","selectedUetTags","isFinishedFetching","hasLiftTypeRequiredError","setHasLiftTypeRequiredError","onToggleUseVisitConversionLift","newValue","onChangeLiftTypeMethod","orderedFetchedUetTagsWithActiveGoals","tag","bothVisitAndConversionFieldProps","setBothVisitAndConversionFieldProps","onSelectWithBothVisitAndConversion","selectedTags","sum","tagObject","isUetTagsFetched","VisitConversionLift","ValidatedInput","experimentNameSchema","properties","maxLength","ExperimentNameCard","experimentNameLabel","onValidateExperimentName","errorProcessor","customErrors","errors","entries","oldError","getErrorProcessor","schema","ImpressionThresholdMessage","SelectedCampaignsCard","campaigns","cardTitle","noContent","cardContent","titles","create","edit","ConfigureStudyStep","wizardState","selectedCampaigns","selectedCampaignsById","measurementSectionHeader","onChangeExperimentName","event","UPDATE_WIZARD_DATA","target","onToggleUseSearchLift","IsLiftExperimentUsingSearchLift","method","filteredKeywords","selectedWords","hasUETTagsSelectionError","setHasUETTagsSelectionError","onChangeVisitConversionLiftMethod","IsLiftExperimentUsingConversionLift","IsLiftExperimentUsingVisitLift","isTagsSelectionValid","Title3","LearnMoreLink","linkText","apiSaveErrorMessage","conversionGoalFields","onFetchUetTagsFailure","msg","notificationApi","showWarning","onFetchUetTagsSuccess","_getFetchedTagCollect","fetchedTags","fetchedTagsAsArray","fetchedTag","uetTag","goalsCount","GoalsCount","transformFetchedUetTag","getFetchedTagCollections","tagsWithGoalsIds","getFetchedTagsWithGoalsIds","currentAccount","getEntityFromScope","filters","tagIdFilter","isArray","Goals","$makeCall","fetchConversionGoal","fetchedGoal","Tag","CAMPAIGN_PAUSED_STATUSES","CAMPAIGN_TYPE_DISPLAY","CAMPAIGN_TYPE_NATIVE","CAMPAIGN_TYPE_ONLINE_VIDEO","CAMPAIGN_TYPE_FEED_BASED","DEFAULT_CAMPAIGN_SUBTYPE_FILTER","getSelectedCampaignsGridColumns","budgetFormatOptions","compact","minimumFractionDigits","maximumFractionDigits","CurrencyCode","nameIcon","PresenceBusy12Filled","primaryFill","Pause12Filled","IsAudienceTargetingEnabled","media","subType","getCampaignSubtypeText","CampaignSubType","targetingEnabled","DailyTargetBudgetAmount","formatCurrency","IsEligibleForMSANLiftExperiment","SelectCampaignsGrid","withServerContext","onCampaignsChange","serverContext","CurrentAccount","onChangeSelectedCampaigns","_event","selectedItems","eligibleCampaigns","every","has","selectedCampaignsIds","idAsString","Set","_wizardState$context$","isInitialized","isEdit","onSelectionChange","selectionMode","selectionCell","checkboxIndicator","Spinner","campaignTypes","SelectCampaignsToolbar","inputLabel","dropdownPlaceholder","campaignSearchText","setCampaignSearchText","selectedCampaignTypes","setSelectedCampaignTypes","dropdownButtonText","filterPayloadBase","formattedFilter","campaignSubTypeDisplayText","campaignSubType","campaignType","CampaignNameTag","campaignName","classnames","accordionHeader","accordionHeaderText","SelectedCampaignsAccordion","onRemoveCampaign","selectedCampaignsHeader","numCampaigns","removeCampaign","Accordion","collapsible","defaultOpenItems","AccordionItem","AccordionHeader","Caption1Strong","AccordionPanel","drawer","backgroundColor","backgroundSize","borderLeftStyle","borderLeftWidth","borderLeftColor","drawerHeader","subTitle","totalBudget","StudySummaryDrawer","studySummaryTitle","campaignSelectionTitle","totalBudgetLabel","totalBudgetFormatted","total","acc","dailyTargetBudgetAmount","Budget","Amount","DrawerInline","open","DrawerHeader","DrawerHeaderTitle","DrawerBody","Body1","SelectCampaignsFooter","SelectCampaignsGridDataSource","orderBy","LiftExperimentCampaigns","fetchLiftExperimentCampaigns","$count","$top","$skip","$filter","$orderby","flexGrow","stepConfigs","view","selectCampaignsError","results","selectedColumns","SelectionMode","multiple","classNames","repository","load","Promise","resolve","study","MeasurementType","UETTags","Keywords","undefined","result","setTimeout","reject","endDate","formattedEndDate","valueOf","formattedStartDate","findAll","direction","limit","gridDataParameters","DateRange","fetchKeywords","keywords","keyword","fetchedKeyword","PerformanceMetrics","Impressions","updatedWizardData","onFetchKeywordsSuccess","responseText","Tags","subscribe","fetchUetTags","saveValidationError","saveResult","isMeasurementTypeSelected","toString","layoutConfig","template","DefaultTemplate","noBlocker","customBlocker","SaveBlocker","CustomLayoutTemplate","currentStepId","getCurrentStepId","config","Template","newItems","Blocker","getStyles","colorNeutralBackground1","bottom","LiftMeasurementWizard","onCancel","onSaveAndExit","actions","onDone","onExited","initialWizardData","steps","Wizard","LayoutContainer","Layout","component","LoadingShimmer","StepContainer","BusyBlocker","CancelWizardDialog","LiftMeasurementForm","remove","IsCancellingEditLiftExperiment","IsCancellingCreateLiftExperiment","LiftMeasurementCreate","props","LiftMeasurementEdit","fetchResults","_ref$scope$values","fetch","res","bodyJson","json","ok","t0","stringValues","getConversionData","resultData","confidence","Confidence_Convert","control","Control_ConverterRate","lift","Lift_Converter","treatment","Treatment_ConverterRate","getSearchData","Confidence_BSearch","Control_BSearcherRate","Lift_BSearcher","Treatment_BSearcherRate","getVisitData","Confidence_Visit","Control_VisitorRate","Lift_Visitor","Treatment_VisitorRate","getAudienceResults","resultsData","audienceResults","TargetType_Result","audienceData","i","TargetTypeId","measurementCategories","getBottomPerformerResults","bottomPerformerResults","Bottom5_Result","allData","performerData","MeasurementCat","mappedData","audienceId","TargetValueId","audienceTypeId","rank","Rank_Lift","getTopPerformerResults","topPerformerResults","Top5_Result","getCampaignIds","Campaign_Result","campaignData","CampaignId","getCampaignResults","campaignResults","getOverallResults","overallResults","CID_Result","confidenceLevels","High","Low","Medium","helpContainer","tableHeaderCell","fontWeight","OverviewTable","liftHelpTopic","liftLabel","primaryColumnHeader","primaryColumnHelpTopic","confidenceLabel","controlLabel","defaultLiftLabel","treatmentLabel","columnKey","getPercentageString","percentageValue","formatDecimalToFixed","digits","Table","TableHeader","TableRow","TableHeaderCell","TableBody","TableCell","marginBottom","sortByRank","PerformersList","sortedData","list","performer","PositivePerformingAudiencesCard","bottomData","topData","highLabel","lowLabel","card","heading","layoutTokens","AudienceOverviewSection","conversionBottomPerformerData","conversionData","conversionTopPerformerData","measurementTypes","searchBottomPerformerData","searchData","searchTopPerformerData","visitBottomPerformerData","visitData","visitTopPerformerData","openItems","setOpenItems","sectionTitle","searchLiftTitle","visitLiftTitle","conversionLiftTitle","audienceTypeColumnHeader","as","cards","CampaignOverviewSection","campaignNameColumnHeader","borderBottomStyle","borderBottomWidth","borderRightStyle","borderRightWidth","borderTopStyle","borderTopWidth","Lift","helpTopic","displayedValue","isFinite","percentage","round","Title2","ConfidenceLevel","dataVizColors","CustomDataLabel","chartData","rawValue","horizontalBarChartdata","x","propTypes","PropTypes","isRequired","y","TreatmentControl","maxValue","legend","yAxisCalloutData","chartTitle","getCustomDataLabel","HorizontalBarChart","barChartCustomData","PerformanceCard","subtitle","orientation","borderColor","ExperimentOverviewSection","searchTitle","searchSubtitle","visitTitle","visitSubtitle","conversionTitle","conversionSubtitle","ResultsPageHeader","onClickExcel","pageDescription","downloadLabel","ArrowDownload20Filled","fields","borderSpacing","minWidth","labelContents","StudySummaryCardField","StudySummaryCard","campaignsLabel","campaignsValue","countryValue","dateRangeLabel","dateRangeValue","raw","keywordsLabel","keywordsValue","firstRow","skeletonRoot","marginLeft","getFileName","extension","dateString","addWorksheet","workbook","sheetName","worksheet","XLSX","json_to_sheet","book_append_sheet","mainLayoutTokens","LiftMeasurementResults","useFetch","isLoading","setIsLoading","setExperimentName","campaignsAsArray","setCampaignsAsArray","_useState7","_useState8","setCountry","_useState9","_useState10","setStartDate","_useState11","_useState12","setEndDate","_useState13","_useState14","setMeasurementTypes","_useState15","_useState16","setKeywords","_useState17","_useState18","setOverallResults","_useState19","_useState20","setAudienceResults","_useState21","_useState22","setTopPerformerResults","_useState23","_useState24","setBottomPerformerResults","_useState25","_useState26","setCampaignResults","_useState27","_useState28","liftStudyResults","setLiftStudyResults","fetchCampaigns","studyResults","transformedCampaigns","t1","console","log","fetchLiftStudyResults","_callee2","_context2","IsFetchLiftExperimentResultsSuccessful","apiData","transformedResults","rootArray","rootKey","transformedResult","isNaN","IsFetchingLiftExperimentResults","IsLiftMeasurementPage","LiftMeasurementPage","_onSuccess","_callee3","_context3","_x3","IsDownloadingLiftMeasurementExcelResults","book_new","fileName","downloadExcel","loadingMessage"],"sourceRoot":""}