{"version":3,"sources":["../../../../multi-channel/packages/mca-inline-help/src/inline-help.js","../../../../multi-channel/packages/mca-core/src/constants.js","../../../../multi-channel/packages/mca-core/src/product.js","../../../../multi-channel/packages/mca-shared-components/src/blocker-context.js","../../../../multi-channel/packages/mca-shared-components/src/budget-suggestions-context.js","../../../../multi-channel/packages/mca-shared-components/src/label-with-required-style.js","../../../../multi-channel/packages/mca-shared-components/src/phone-number.js","../../../../multi-channel/packages/mca-shared-components/src/hooks/use-suggestion-website-context.js","../../../../multi-channel/packages/locale-and-market-context/src/use-context-data.js","../../../../multi-channel/packages/locale-and-market-context/src/locale-and-market-context.js","../../../../multi-channel/packages/locale-and-market-context/src/currency.js","../../../../multi-channel/packages/mca-core/src/up-pilot-enabled.js","../../../../multi-channel/packages/mca-core/src/pilots.js","../../../../multi-channel/packages/mca-data/src/common/use-debounced-dispatch.js","../../../../multi-channel/packages/mca-data/src/common/action-utilities.js","../../../../multi-channel/packages/mca-data/src/common/reducer-utilities.js","../../../../multi-channel/packages/mca-data/src/common/pluralize-entity.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/cc-util.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/index.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/actions-reset.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/actions-read.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/actions-update.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/actions-create.js","../../../../multi-channel/packages/mca-data/src/use-call/reducer.js","../../../../multi-channel/packages/mca-data/src/util/use-simple-read.js","../../../../multi-channel/packages/mca-data/src/use-mca-data/reducer-creators.js","../../../../multi-channel/packages/mca-data/src/use-cc-data/reducer-creators.js","../../../../multi-channel/packages/mca-data/src/use-preference/reducer-creators.js","../../../../multi-channel/packages/mca-data/src/root-reducer.js","../../../../multi-channel/packages/mca-data/src/common/data-store.js","../../../../multi-channel/packages/mca-data/index.js","../../../../multi-channel/packages/mca-shared-components/media/url-scan-error.svg","../../../../multi-channel/packages/mca-core/src/url-pilots.js","../../../../multi-channel/packages/mca-core/src/date.js","../../../../multi-channel/packages/mca-core/src/helpers.js","../../../../multi-channel/packages/mca-core/src/hooks/index.js","../../../../multi-channel/packages/mca-core/src/metric-data.js","../../../../multi-channel/packages/mca-core/src/preference/preference-names.js","../../../../multi-channel/packages/mca-core/src/preference/preference-defaults.js","../../../../multi-channel/packages/mca-core/src/phone-schema.js","../../../../multi-channel/packages/mca-core/src/url.js","../../../../multi-channel/packages/mca-core/src/validations/campaign-validation-schema.js","../../../../multi-channel/packages/mca-core/src/styles.js","../../../../multi-channel/packages/mca-core/src/conversion-tracking-revenue-currencies.js","../../../../multi-channel/packages/mca-core/src/file-validator.js","../../../../multi-channel/packages/mca-instrumentation/src/global-error-view.js","../../../../multi-channel/packages/mca-instrumentation/src/instrumentation-schemas.js","../../../../multi-channel/packages/mca-instrumentation/src/expected-error-codes.js","../../../../multi-channel/packages/mca-instrumentation/src/ajax-event-handler.js","../../../../multi-channel/packages/mca-instrumentation/src/instrumentation-context.js","../../../../multi-channel/packages/mca-instrumentation/src/instrumentation.js","../../../../multi-channel/packages/mca-instrumentation/src/expected-error-string.js"],"names":["InlineHelpUnstyled","memo","props","classes","topic","withoutSpace","button","ariaLabel","i18n","useContext","I18nContext","_useContext","InstrumentationContext","instrumentationService","_slicedToArray","instrumentationActivity","useMemo","instrumentation","inlineHelp","create","trace","_","noop","handleClick","useCallback","concat","Help","HelpButton","HelpPopup","React","createElement","className","classNames","_defineProperty","withSpace","role","onClick","aria-label","getString","_TL_","defaultProps","getHelpButtonStyles","getInlineHelpButtonStyles","InlineHelp","withDefaultStyles","components","_ref","_ref$palette","palette","_ref$iconFontFamily","iconFontFamily","_objectSpread","display","fontSize","fontWeight","marginLeft","OdataType","tileColumnWidth","DefaultCurrencyCode","ACCOUNT_BUDGET_EXCEED_CODE","MAX_CAMPAIGN_COUNT","PI_TYPE_CREDIT_CARD","Constants","PaymentTypeId","Postpay","Prepay","Undefined","PaymentOption","Threshold","PaymentInstrumentType","CreditCard","PI_TYPE_PAYPAL","PayPal","PI_TYPE_OFFLINE_PAYMENT_METHOD","OfflinePaymentMethod","INT_PHONE_REGEX","McaChannelTypes","Internal","Facebook","Instagram","Twitter","LinkedIn","MicrosoftAdvertising","GoogleAds","GoogleMyBusiness","BingPlaces","MSAN","McaChannelTypeBudgetRatio","McaSocialChannelTypes","McaChannelTypeToPlatformName","PlatformTypesSize","PlatformTypes","audience","Set","social","search","McaChannelTypeToServingPlatform","McaTargetModel","LocationTarget","RadiusTarget","AgeTarget","GenderTarget","McaAgeTargets","EighteenToTwentyFour","TwentyFiveToThirtyFour","ThirtyFiveToFortyNine","FiftyToSixtyFour","SixtyFiveAndAbove","Unknown","McaDefaultAgeTargets","McaGenderTargets","Female","Male","McaDefaultGenderTargets","TestAccountPartitionSuffixes","MediaType","Image","Video","Gif","McaAccountTier","None","M365PremiumAccountTier","McaEditorialEntityTypes","McaCampaign","McaAd","McaKeyword","McaEditorialTypes","Inline","Offline","PostState","Posted","Scheduled","Draft","Failed","FilterOptionKeys","AdType","SearchAd","ImageAd","VideoAd","CarouselAd","TOP_ADS_PIVOT_ID","AdPivots","id","name","shouldShowIfEmpty","type","acceptableImageTypes","acceptableVideoTypes","FileSizeLimits","WizardSubmitType","metricsOverall","metricsVisits","metricsVisitRate","metricsAssists","metricsTopPageVisits","metricsAvgTime","metricsAvgPages","metricsTotalVisits","metricsTotalConversions","metricsConversionRate","metricsTotalRevenue","metricsEstRevenue","specialPagesPanelTracking","specialPagesPanelName","specialPagesPanelQualifier","specialPagesPanelUrl","specialPagesPageTypes","specialPagesName","specialPagesQualifier","specialPagesUrl","specialPagesLearnMore","specialPagesTotalConversions","goalTypes","goalCategories","goalTrackingStatus","goalTagInstruction","customEventParametersLearnMore","revenueValue","revenueVariantValueLearnMore","tile","Container","DMC","UET","emailTag","emailPlatform","WordPress","Wix","Shopify","BigCommerce","allPlatformsLearnMore","Submit","Skip","SwitchToExpertMode","SwitchToOldSmartMode","UpCampaignGoals","IncreaseWebsiteVisit","value","title","isRecommended","IncreaseCallToBusiness","IncreaseBusinessLocationVisit","TermsAndConditionLink","chain","map","join","de-de","en-us","es-es","fr-fr","it-it","pt-br","zh-tw","Products","Expert","Smart","UP","AppScope","ADV","UpSignupWizardCouponClassForProd","UpSignupWizardCouponClassForNonProd","UpSignupWizardCouponDetails","AENOTINCPBCOFY22US100","ClassName","CouponPurposeId","CouponTypeId","CouponValue","CurrencyId","EndDate","ExpiryDate","ExpiryDateFromAssociation","LimitForDaysToUseFromCustomerCreation","MaxRedemptionCount","MaxRedemptionPerAccountCount","PercentOff","StartDate","UpfrontSpending","ATESTCOUPONCLASSXIAOHUL01","DAYS_OF_MONTH","McaChannelMinBudgetPerDay","PerfType","Clicks","Conversions","mobileDeviceQuery","mobileDevice","tabletDeviceQuery","__webpack_require__","d","__webpack_exports__","getProduct","_bingads_webui_campaign_campaign_ui_common__WEBPACK_IMPORTED_MODULE_0__","_constants__WEBPACK_IMPORTED_MODULE_1__","serverContext","CurrentAccount","CurrentCustomer","AccountMode","ACCOUNT_MODE","DEFAULT","EXPERT","SMART","UNIFIED_SMART","Error","createContext","block","PropTypes","string","isRequired","BudgetSuggestionsContext","limitedByBudgetCampaignIds","setLimitedByBudgetCampaignIds","hideLimitedStatus","setHideLimitedStatus","WrappedComponent","HOC","wrappedProps","omit","Object","assign","required","displayName","getDisplayName","hoistNonReactStatics","withRequiredStyle","Label","&:after","content","color","PhoneNumberPure","schema","onChange","valueInProps","propCountryCode","countryCode","setCountryCode","_useState","useState","undefined","_useState2","innerSelectedCountryCode","innerSetSelectedCountryCode","selectedCountryCode","setSelectedCountryCode","_useState3","_useState4","onChangeMetric","setOnChangeMetric","toString","replace","enabledSchema","filter","defaultPhoneSchema","s","disabled","item","label","sort","item1","item2","localeCompare","selectedSchema","isEmpty","isFunction","find","key","indexOf","get","selectedFormat","formats","f","format","arguments","length","str","_toConsumableArray","split","char","RegExp","getRegex","test","substr","trim","phoneNumber","formatPhoneNumber","useEffect","cursor","beforeCursor","event","target","setSelectionRange","diff","handleChange","code","number","newValue","handleCountryCodeChange","prefix","handlePhoneNumberChange","persist","selectionStart","style","Select","Input","placeholder","serverErrorProps","fieldSelector","PhoneNumber","withError","withValidation","withServerError","Context","useLocaleAndMarketContext","CURRENCY","ars","aud","brl","cad","chf","clp","cny","cop","dkk","dzd","egp","eur","gbp","hkd","idr","inr","jpy","lbp","mad","mxn","myr","nok","nzd","pen","php","qar","sar","sek","sgd","thb","twd","usd","vef","vnd","zar","getIsUnifiedProduct","getIsDMC","getIsUnifiedProductOrExpert","_pilots__WEBPACK_IMPORTED_MODULE_0__","_product__WEBPACK_IMPORTED_MODULE_1__","_constants__WEBPACK_IMPORTED_MODULE_2__","product","getPilotValue","useIsSubscriptionAdsProduct","useESCGlobalizationPilotValue","useIsGoogleImportSignupEnabled","useSmartPageUPIntegrationValue","useM365Enabled","useFullyManagedFacebookAdAccountPilotValue","useIsTestAccountCreationEnabled","useESCPrepayPilotValue","useIsESCMsanEnabled","useESCUetTagEnabledPilotValue","useIsCouponSpendRestrictionEnabled","react__WEBPACK_IMPORTED_MODULE_0__","_bingads_webui_campaign_react_server_context__WEBPACK_IMPORTED_MODULE_1__","_bingads_webui_campaign_react_up_context__WEBPACK_IMPORTED_MODULE_2__","_bingads_webui_campaign_react_basic_context_utils__WEBPACK_IMPORTED_MODULE_3__","_bingads_webui_campaign_campaign_ui_common__WEBPACK_IMPORTED_MODULE_4__","_url_pilots__WEBPACK_IMPORTED_MODULE_5__","_up_pilot_enabled__WEBPACK_IMPORTED_MODULE_6__","usePilotsValueWithSubAds","usePilotsValue","signup","postSignup","urlPilot","getDangerouslySetUrlPilot","UrlPilots","forcesubads","usePilotsValueWithoutSubAds","onlySignup","isPilotEnabled","isSubscriptionAdsEnabled","postSignupValue","isUnifiedProduct","useIsUnifiedProduct","isGoogleImportSignupPilotOn","ServerContext","isSiEnvironment","window","location","host","useDebouncedDispatch","dispatch","interval","timer","_len","args","Array","_key","clearTimeout","Promise","resolve","setTimeout","apply","finally","debounce","ActionSlices","mcaEntity","ccEntity","externalEntity","call","preference","ActionNameSeparator","ActionVerbs","read","update","destroy","reset","set","ActionStages","start","complete","fail","createAction","slice","stage","verb","actionName","createActionName","params","createCcEntityAction","entityName","splitActionName","action","_type$split","_type$split2","mergeEntities","existingEntities","newEntities","entityKey","data","forEach","ne","isUpdate","existingEntity","push","stringify","updateEntity","entityCollection","entityId","findIndex","e","getEntityCollectionName","pluralize","ccJsDataObj","getCCApis","cid","uid","ClientCenterUIAPI","ccBaseUrl","jsDataCcRest","GetJsDataInfo","cidFetcher","constant","uidFetcher","Customers","Customer","Accounts","Account","Users","User","PaymentInstruments","PaymentInstrument","Countries","DomainDataCountry","SubGeographies","DomainDataSubGeography","TimeZones","DomainDataTimeZone","Currencies","DomainDataCurrency","CurrencyCountriesMappings","CurrencyCountriesMapping","Languages","DomainDataLanguage","Notifications","StatusNotification","TermsAndConditions","SignupAggreementOptions","BillingStatements","EstimateTaxesAllPayments","BillingSummaryForAccounts","McaPaymentContexts","BillNowForMcas","BillNowForMca","DeletePIs","DeletePI","GetCoupons","Coupon","GetCouponDetails","AssociateAndRedeemCoupons","AssociateAndRedeemCoupon","AssociateCoupons","AssociateCoupon","GetCouponRedemptionsAndAssociations","GetCouponValidForCustomerWebsites","GetCouponValidForCustomerWebsite","SaveCouponStringForSignups","SaveCouponStringForSignup","GetCouponStringForSignups","GetCouponStringForSignup","getCCJsDataObj","defaultOptions","contentType","dataType","cacheResponse","xhrFields","withCredentials","useCcData","entityCollectionName","_ref$CurrentLocale","CurrentLocale","api","useDispatch","dispatchDebounced","resetEntities","readParams","readParamsWithUsLocale","mkt","_params$actionTime2","actionTime","Date","now","_params$useCache2","useCache","passThroughParams","_objectWithoutProperties","_excluded2","startAction","completeAction","failAction","options","bypassCache","then","response","catch","error","readEntity","_params$actionTime","_params$useCache","queryParams","_excluded","findAll","readEntities","_ref2","_ref2$immediate","immediate","dispatchFn","createParams","_createParams$immedia","createEntity","useSelector","state","ccEntities","shallowEqual","useCcDataById","_useCcData","_useCcData2","dataState","_useCcData2$","singleEntity","findWhere","readById","updateById","updateParams","initialCallState","isLoading","callReducer","globalState","callName","sideEffectFn","_params$callResponse2","callResponse","targetObject","entityCollStates","mcaEntities","callStates","calls","newCallStates","callState","_params$callResponse","lastUpdated","singleCallReducer","newEntityCollStates","entityCollKeys","keys","i","entityCollKey","entityCollState","useSimpleRead","hook","onError","isReadEnabled","_hook","_hook$","shouldRead","setShouldRead","DEFAULT_SKIP","initialEntityState","lastParentEntityPath","count","top","skip","select","handleActions","shouldReset","reject","handleReset","parentEntity","JSON","path","navigation","newData","paramSkip","newSkip","handleRead","updateData","originalDiff","handleUpdate","tempId","tempData","@mca.id","element","keyedElement","handleCreate","originalData","handleDestroy","ccReducerCreator","_action$params","_splitActionName","initialPreferenceState","lastUpdate","preferenceReducerCreator","preferenceName","handleSet","isUndefined","handleGet","mcaReducerKeys","mcaReducers","missingMcaReducers","newState","each","otherParams","entityCollectionState","newStates","mcaReducerCreator","ccReducers","combineReducers","preferenceReducers","preferenceNames","values","object","initialState","preferences","rootReducer","_splitActionName2","mcaEntityState","ccEntityState","preferenceState","persistConfig","storage","persistedReducer","persistReducer","middlewareEnhancer","applyMiddleware","thunkMiddleware","defaultStore","createStore","compose","persistStore","useAccount","resetOnRefresh","useIANATimeZone","accountId","Id","_useSimpleRead","account","timeZone","TimeZone","toIANATimeZone","fromLegacyTimeZone","module","exports","p","forceupsw","forceescgjapan","m365AdminTrackingId","m365EmailTrackingId","m365RmTrackingId","m365WebTrackingId","match","HasDateExpiredInPST","expiryDatePST","getTime","getAdType","ad","odataType","#Model.SearchAd","#Model.ImageAd","#Model.VideoAd","getTimestamp","performance","getExtension","index","lastIndexOf","substring","toLowerCase","localStorage","useHashedEmail","email","isSpamEmail","originalEmail","getIsSpamEmail","hashedEmail","CryptoJS","MD5","useCampaignIdFromScope","scope","ScopeContext","campaignId","SelectedProfiles","AdsDateRange","SocialReportDateRange","InboxActivityTypeFilter","HomeReportDataRange","SignUpWizard","CampaignCreationWizards","SignUpWizardV6","CampaignCreationWizardsV6","UpSignUpWizard","UPCampaignCreationWizards","SmartPageSignupEntry","SignUpWizardMode","CalendarPostTypeFilter","UpStepWizardStep","SubAdsWizardStep","UPWizardTermsAndCondition","SubAdsWizardTermsAndCondition","UpSpecialCategoryLastModifyTime","UpBudgetSuggestionsLastModifyTime","UpSignUpFlowId","UpMobileAppPrompt","UpChatBubbleRejectionInfo","last7Days","accountTimeZone","today","weekBack","setDate","getDate","formatterOptions","raw","formatDate","end","defaultCalendarPostTypeFilter","PreferenceDefaults","lastViewTime","countPromptDisplayed","totalTimes","lastRejectionTimestamp","where","input","j","m","n","chars","UrlRegex","allCurrencies","tl","escSupportedCurrenciesSorted","c","isIE11","navigator","userAgent","appVersion","getHelpContentHref","i18nLocale","localeCode","DefaultGlobalErrorView","appName","contactUs","href","rel","errorViewProps","description","descriptions","getLocale","GlobalErrorView","expectedErrorCodes","errorCode","toUpperCase","isExpectedErrorCodes","errorResponseJson","errorCodesInResponse","pluck","compact","uniq","contains","AjaxEventHandler","context","children","setInstrumentationService","_ref$instrumentation","Provider","HocInstrumentationContext","ExpectedErrorStrings","errorString","isExpectedErrorString","errorMessage","isError","errorMessageInLowerCase","some"],"mappings":"22BAUO,IAAMA,EAAqBC,eAAK,SAACC,GACtC,IACEC,EAKED,EALFC,QACAC,EAIEF,EAJFE,MACAC,EAGEH,EAHFG,aACAC,EAEEJ,EAFFI,OACAC,EACEL,EADFK,UAGIC,EAAOC,qBAAWC,eACxBC,EAAiCF,qBAAWG,KAArCC,EAA4DC,YAAAH,EAAA,GAAtC,GAEvBI,EAA0BC,kBAAQ,WACtC,OAAIH,EAC0BA,EAApBI,gBACmCC,WAAWC,SAC5BD,WAAWC,SAGhC,CAAEC,MAAOC,UAAEC,OACjB,CAACT,IAEEU,EAAcC,sBAAY,WAC9BT,EAAwBK,MA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C60B,yBAA0BD,SAAQ,CAACtqB,MAAOnL,GACxCs1B,MCsCF,IC1DDK,EAAuB,CAC3B,6BACA,yBACA,4DACA,iEACAjqB,IAAI,SAAAkqB,GAAW,OAAIA,EAAYnG,gBAE1B,SAASoG,EAAsB9Q,GACpC,IAAKA,EACH,OAAO,EAGT,IAAM+Q,EAAe11B,UAAE21B,QAAQhR,GAASA,EAAQyE,KAAK7K,UAAUoG,GACzDiR,EAA0B51B,UAAE2S,WAAW3S,UAAE+S,IAAI2iB,EAAc,gBAAkBA,EAAarG,cAAgB,GAChH,OAAOrvB,UAAE61B,KACPN,EACA,SAAAC,GAAW,OAAII,EAAwB9iB,QAAQ0iB,IAAgB","file":"static/js/application.initial~b7015691.0153d144.chunk.js","sourcesContent":["import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { memo, useContext, useCallback, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { HelpButton, HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { InstrumentationContext } from '@bingads-webui-campaign-react/mca-instrumentation';\r\nimport { getInlineHelpButtonStyles } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const InlineHelpUnstyled = memo((props) => {\r\n const {\r\n classes,\r\n topic,\r\n withoutSpace,\r\n button, // setting this to true is highly encouraged due to accessibility reasons\r\n ariaLabel,\r\n } = props;\r\n\r\n const i18n = useContext(I18nContext);\r\n const [instrumentationService] = useContext(InstrumentationContext);\r\n\r\n const instrumentationActivity = useMemo(() => {\r\n if (instrumentationService) {\r\n const { instrumentation } = instrumentationService;\r\n const inlineHelpScenario = instrumentation.inlineHelp.create();\r\n return inlineHelpScenario.inlineHelp.create();\r\n }\r\n\r\n return { trace: _.noop };\r\n }, [instrumentationService]);\r\n\r\n const handleClick = useCallback(() => {\r\n instrumentationActivity.trace(`Help popup clicked on topic: ${topic}`);\r\n }, [instrumentationActivity, topic]);\r\n\r\n const Help = button ? HelpButton : HelpPopup;\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n});\r\n\r\nInlineHelpUnstyled.propTypes = {\r\n topic: PropTypes.string.isRequired,\r\n classes: PropTypes.shape({\r\n inlineHelp: PropTypes.string,\r\n }).isRequired,\r\n withoutSpace: PropTypes.bool,\r\n button: PropTypes.bool,\r\n ariaLabel: PropTypes.string,\r\n};\r\n\r\nInlineHelpUnstyled.defaultProps = {\r\n withoutSpace: false,\r\n button: false,\r\n ariaLabel: null,\r\n};\r\n\r\nexport const getHelpButtonStyles = getInlineHelpButtonStyles;\r\n\r\nexport const InlineHelp = withDefaultStyles(\r\n InlineHelpUnstyled,\r\n (components, { palette = {}, iconFontFamily = 'MsAds MDL2 Assets' }) => ({\r\n inlineHelp: {\r\n display: 'inline',\r\n fontSize: '15px !important',\r\n fontWeight: 'normal',\r\n ...getHelpButtonStyles({ palette, iconFontFamily }),\r\n },\r\n withSpace: {\r\n marginLeft: 3,\r\n },\r\n })\r\n);\r\n\r\n","/* eslint-disable max-lines */\r\nimport _ from 'underscore';\r\nimport { Constants } from '@bingads-webui-clientcenter/entity-utils';\r\n\r\nexport const OdataType = '@odata.type';\r\nexport const OneDayMs = 86400000;\r\nexport const tileColumnWidth = 520;\r\nexport const DefaultCountryCode = 'US';\r\nexport const DefaultCurrencyCode = 'USD';\r\nexport const DefaultTimeZoneCode = '71'; // Paficifc Time US\r\nexport const DefaultLanguage = 'en-us';\r\nexport const TOKEN_EXPIRED = 'TokenExpired';\r\nexport const UNKNOWN_USER = 'Unknown User';\r\nexport const CUSTOMER_NAME_MAX_LENGTH = 90;\r\nexport const EXTERNAL_API_TIMEOUT = 5000;\r\nexport const ENTIRE_TIME_CAMPAIGN_OFFSET_NEWEST_DAY = -30; // 30 days\r\nexport const ENTIRE_TIME_CAMPAIGN_OFFSET_OLDEST_YEAR = -3; // 3 years\r\nexport const ENTIRE_TIME_SOCIAL_OFFSET_NEWEST_DAY = -30; // 30 days\r\nexport const ENTIRE_TIME_SOCIAL_OFFSET_OLDEST_DAY = -180; // 180 days\r\nexport const ACCOUNT_BUDGET_EXCEED_CODE = 'ExceedDailyBudgetLimit';\r\nexport const ACCOUNT_ENTITY = 'Account';\r\nexport const ACCOUNT_ACTIVATION_FIELD = 'AccountActivationField';\r\nexport const USER_ENTITY = 'User';\r\nexport const USER_UPDATE_FIELD = 'UserUpdateField';\r\nexport const SUPPORT_WEBSITE = 'https://about.ads.microsoft.com/en-us/microsoft-advertising-support';\r\nexport const A11yAnnounceAreaId = 'a11yAnnounceArea';\r\nexport const ALL_CAMPAIGNS_PATH = '/campaign/mca/ads/all-campaigns';\r\nexport const SINGLE_CAMPAIGN_PATH = '/campaign/mca/ads/campaign/';\r\nexport const GOOGLE_IMPORT_PATH = '/campaign/vnext/googleimport';\r\nexport const IMPORT_SCHEDULE_PATH = '/campaign/vnext/importschedule';\r\nexport const LIVE_CHAT_ELEMENT_ID = 'msSupportChatTrigger';\r\nexport const UP_SUPPORT_CHAT_LINK = 'https://vsa.services.microsoft.com/en-us/v1.0/?product=bingads&issue=Ads-Experiment&disability=false&mode=live&partnerId=a1689b11-62c0-4f31-be04-05982f92b619&modality=occhat&flowId=Showcase-Exp&queue=/chat/122';\r\nexport const MAX_KEYWORD_COUNT = 50;\r\nexport const MAX_CAMPAIGN_COUNT = 100;\r\n\r\nexport const PAYMENT_TYPE_POSTPAY = Constants.PaymentTypeId.Postpay;\r\nexport const PAYMENT_TYPE_PREPAY = Constants.PaymentTypeId.Prepay;\r\nexport const PAYMENT_TYPE_UNDEFINED = Constants.PaymentTypeId.Undefined;\r\nexport const PAYMENT_OPTION_THRESHOLD = Constants.PaymentOption.Threshold;\r\nexport const PAYMENT_OPTION_PREPAY = Constants.PaymentOption.Prepay;\r\nexport const PI_TYPE_CREDIT_CARD = Constants.PaymentInstrumentType.CreditCard;\r\nexport const PI_TYPE_PAYPAL = Constants.PaymentInstrumentType.PayPal;\r\nexport const PI_TYPE_OFFLINE_PAYMENT_METHOD = Constants.PaymentInstrumentType.OfflinePaymentMethod;\r\n\r\nexport const MAX_M365_STANDARD_SCHEDULED_POSTS_COUNT = 10;\r\nexport const MAX_ARIA_MESSAGE_DETAILS_SIZE = 200;\r\n\r\n// eslint-disable-next-line no-useless-escape\r\nexport const INT_PHONE_REGEX = /^(\\+0?\\d{1,3})?((\\s|\\(|\\))*\\-*\\d){8,10}$/;\r\n\r\nexport const PostLimits = {\r\n fb: 5000,\r\n twitter: 280,\r\n ig: 2200,\r\n linkedin: 1300,\r\n};\r\n\r\nexport const CreditCardStatus = {\r\n primary: 'primary',\r\n backup: 'backup',\r\n additional: 'additional',\r\n};\r\n\r\nexport const FlowIds = {\r\n DmcMain: 'DMC-main',\r\n DmcSignUp: 'DMC-signup',\r\n M365AdminSignUp: 'm365-admin-campaign',\r\n M365RmSignUp: 'm365-rm-campaign',\r\n SubAdsMain: 'Subscription-ads-main',\r\n SubAdsSignUp: 'Subscription-ads-signup',\r\n UpMain: 'UP-main',\r\n UpSignUp: 'UP-signup-up',\r\n UpSignUpExpert: 'UP-signup-expert',\r\n};\r\n\r\nexport const onErrorRetryLimit = 3;\r\n\r\n// Channel Types\r\nexport const McaChannelTypes = {\r\n Undefined: 'Undefined',\r\n Internal: 'Internal',\r\n Facebook: 'Facebook',\r\n Instagram: 'Instagram',\r\n Twitter: 'Twitter',\r\n LinkedIn: 'LinkedIn',\r\n MicrosoftAdvertising: 'MicrosoftAdvertising',\r\n GoogleAds: 'GoogleAds',\r\n GoogleMyBusiness: 'GoogleMyBusiness',\r\n BingPlaces: 'BingPlaces',\r\n MSAN: 'MSAN',\r\n};\r\n\r\n// Obtained from MT /private/MultiChannelAds/Common/DgoLib/EntityFactories/BudgetFactory.cs\r\nexport const McaChannelTypeBudgetRatio = {\r\n [McaChannelTypes.MicrosoftAdvertising]: 1,\r\n [McaChannelTypes.GoogleAds]: 3,\r\n [McaChannelTypes.Facebook]: 2,\r\n [McaChannelTypes.MSAN]: 1,\r\n};\r\n\r\nexport const McaSocialChannelTypes = [\r\n McaChannelTypes.Facebook,\r\n McaChannelTypes.Instagram,\r\n McaChannelTypes.LinkedIn,\r\n McaChannelTypes.Twitter,\r\n];\r\n\r\nexport const McaChannelTypeToPlatformName = {\r\n [McaChannelTypes.GoogleAds]: 'Google',\r\n [McaChannelTypes.MicrosoftAdvertising]: 'Bing',\r\n [McaChannelTypes.Facebook]: 'Facebook',\r\n [McaChannelTypes.MSAN]: 'Microsoft',\r\n};\r\n\r\nexport const PlatformTypesSize = 3;\r\n\r\nexport const PlatformTypes = {\r\n audience: new Set([McaChannelTypes.MSAN]),\r\n social: new Set([McaChannelTypes.Facebook]),\r\n search: new Set([McaChannelTypes.GoogleAds, McaChannelTypes.MicrosoftAdvertising]),\r\n};\r\n\r\nexport const McaChannelTypeToServingPlatform = {\r\n [McaChannelTypes.GoogleAds]: _TL_('Google'),\r\n [McaChannelTypes.MicrosoftAdvertising]: _TL_('Microsoft Advertising Network'),\r\n [McaChannelTypes.Facebook]: _TL_('Facebook, Instagram'),\r\n [McaChannelTypes.MSAN]: _TL_('Microsoft Advertising Network'),\r\n};\r\n\r\nexport const McaTargetModel = {\r\n LocationTarget: '#Model.LocationTarget',\r\n RadiusTarget: '#Model.RadiusTarget',\r\n AgeTarget: '#Model.AgeTarget',\r\n GenderTarget: '#Model.GenderTarget',\r\n};\r\n\r\nexport const McaAgeTargets = {\r\n EighteenToTwentyFour: 'EighteenToTwentyFour',\r\n TwentyFiveToThirtyFour: 'TwentyFiveToThirtyFour',\r\n ThirtyFiveToFortyNine: 'ThirtyFiveToFourtyNine',\r\n FiftyToSixtyFour: 'FiftyToSixtyFour',\r\n SixtyFiveAndAbove: 'SixtyFiveAndAbove',\r\n Unknown: 'Unknown',\r\n};\r\n\r\nexport const McaDefaultAgeTargets = [\r\n McaAgeTargets.EighteenToTwentyFour,\r\n McaAgeTargets.TwentyFiveToThirtyFour,\r\n McaAgeTargets.ThirtyFiveToFortyNine,\r\n McaAgeTargets.FiftyToSixtyFour,\r\n McaAgeTargets.SixtyFiveAndAbove,\r\n McaAgeTargets.Unknown,\r\n];\r\n\r\nexport const McaGenderTargets = {\r\n Female: 'Female',\r\n Male: 'Male',\r\n Unknown: 'Unknown',\r\n};\r\n\r\nexport const McaDefaultGenderTargets = [\r\n McaGenderTargets.Male,\r\n McaGenderTargets.Female,\r\n McaGenderTargets.Unknown,\r\n];\r\n\r\nexport const CriterionModel = {\r\n RadiusCriterion: '#Model.RadiusCriterion',\r\n LocationCriterion: '#Model.LocationCriterion',\r\n};\r\n\r\nexport const Location2Type = {\r\n Country: 'Country',\r\n SubGeography: 'SubGeography',\r\n MetroArea: 'MetroArea',\r\n City: 'City',\r\n PostalCode: 'PostalCode',\r\n County: 'County',\r\n Neighborhood: 'Neighborhood',\r\n};\r\n\r\nexport const McaRadiusUnit = {\r\n Miles: 'Miles',\r\n Kilometers: 'Kilometers',\r\n};\r\n\r\nexport const DistanceUnit = {\r\n Miles: 'Miles',\r\n Kilometers: 'Kilometers',\r\n};\r\n\r\nexport const McaChannelIds = {\r\n Undefined: 0,\r\n Internal: 1,\r\n Facebook: 2,\r\n Instagram: 3,\r\n Twitter: 4,\r\n GoogleMyBusiness: 7,\r\n BingPlaces: 8,\r\n LinkedIn: 9,\r\n};\r\n\r\n// Microsoft.Ads.TemplateAdSubstitution.TemplateAdType\r\nexport const TemplateAdType = {\r\n ExpandedTextAds: 'ExpandedTextAds',\r\n FaceBook: 'FaceBook',\r\n ImageAds: 'ImageAds',\r\n};\r\n\r\nexport const TestAccountPartitionSuffixes = [\r\n '_2EE8FF97-DCF0-4C9E-9EBE-CB05DFA435D4_110',\r\n '_2EE8FF97-DCF0-4C9E-9EBE-CB05DFA435D4_111',\r\n];\r\n\r\nexport const ConversationThreadLoadPatterns = {\r\n ExpandToRoot: 'ExpandToRoot',\r\n ExpandToChildren: 'ExpandToChildren',\r\n};\r\n\r\nexport const PROTOCOLS = {\r\n HTTP: 'http://',\r\n HTTPS: 'https://',\r\n};\r\n\r\nexport const McaOdataInboxActivityTypes = [\r\n '#Model.FacebookWallPost',\r\n '#Model.FacebookComment',\r\n '#Model.FacebookAdComment',\r\n '#Model.FacebookReview',\r\n '#Model.InstagramComment',\r\n '#Model.InstagramAdComment',\r\n '#Model.TwitterMention',\r\n '#Model.TwitterRetweet',\r\n '#Model.TwitterRetweetWithComment',\r\n '#Model.TwitterNewFollower',\r\n '#Model.LinkedInComment',\r\n];\r\n\r\n// Odata Activity Types\r\nexport const McaOdataActivityTypes = [\r\n ...McaOdataInboxActivityTypes,\r\n '#Model.FacebookPost',\r\n '#Model.InstagramPost',\r\n '#Model.TwitterPost',\r\n '#Model.LinkedInShare',\r\n '#Model.GoogleMyBusinessReview',\r\n '#Model.GoogleMyBusinessQuestion',\r\n '#Model.BingPlacesReview',\r\n];\r\n\r\n// Activity Types\r\nexport const McaActivityTypes = [\r\n // Facebook\r\n 'FacebookWallPost',\r\n 'FacebookComment',\r\n 'FacebookAdComment',\r\n 'FacebookReview',\r\n 'FacebookPost',\r\n // Instagram\r\n 'InstagramComment',\r\n 'InstagramAdComment',\r\n 'InstagramPost',\r\n // Twitter\r\n 'TwitterPost',\r\n 'TwitterMention',\r\n 'TwitterRetweet',\r\n 'TwitterRetweetWithComment',\r\n 'TwitterNewFollower',\r\n // Google My Business\r\n 'GoogleMyBusinessReview',\r\n 'GoogleMyBusinessQuestion',\r\n // Bing places\r\n 'BingPlacesReview',\r\n // LinkedIn\r\n 'LinkedInShare',\r\n 'LinkedInComment',\r\n];\r\n\r\n// List of supported activity types in social inbox\r\nexport const McaInboxActivityTypes = {\r\n // Facebook\r\n FacebookWallPost: 'FacebookWallPost',\r\n FacebookComment: 'FacebookComment',\r\n FacebookAdComment: 'FacebookAdComment',\r\n FacebookReview: 'FacebookReview',\r\n // Instagram\r\n InstagramComment: 'InstagramComment',\r\n InstagramAdComment: 'InstagramAdComment',\r\n // Twitter\r\n TwitterMention: 'TwitterMention',\r\n TwitterRetweet: 'TwitterRetweet',\r\n TwitterRetweetWithComment: 'TwitterRetweetWithComment',\r\n TwitterNewFollower: 'TwitterNewFollower',\r\n // LinkedIn\r\n LinkedInComment: 'LinkedInComment',\r\n};\r\n\r\nexport const McaChannelActivityTypes = {\r\n Facebook: [\r\n McaInboxActivityTypes.FacebookWallPost,\r\n McaInboxActivityTypes.FacebookComment,\r\n McaInboxActivityTypes.FacebookAdComment,\r\n McaInboxActivityTypes.FacebookReview,\r\n ],\r\n Instagram: [\r\n McaInboxActivityTypes.InstagramComment,\r\n McaInboxActivityTypes.InstagramAdComment,\r\n ],\r\n Twitter: [\r\n McaInboxActivityTypes.TwitterMention,\r\n McaInboxActivityTypes.TwitterRetweet,\r\n McaInboxActivityTypes.TwitterRetweetWithComment,\r\n McaInboxActivityTypes.TwitterNewFollower,\r\n ],\r\n LinkedIn: [\r\n McaInboxActivityTypes.LinkedInComment,\r\n ],\r\n};\r\n\r\nexport const McaActivityLayoutTypes = [\r\n 'InboxList',\r\n 'InboxConversation',\r\n 'PostPreview',\r\n];\r\n\r\n// ChannelUserTypes\r\nexport const McaChannelUserTypes = [\r\n 'FacebookUser',\r\n 'FacebookPage',\r\n 'InstagramUser',\r\n 'GoogleUser',\r\n 'BingUser',\r\n];\r\n\r\nexport const McaProfileStatus = {\r\n Draft: 1,\r\n Scheduled: 2,\r\n Active: 3,\r\n Deleted: 4,\r\n};\r\n\r\nexport const MediaType = {\r\n Unknown: 'Unknown',\r\n Image: 'Image',\r\n Video: 'Video',\r\n Gif: 'Gif',\r\n};\r\n\r\nexport const McaAccountTier = {\r\n None: 'None',\r\n M365PremiumAccountTier: 'M365PremiumAccountTier',\r\n};\r\n\r\nexport const McaMediaTypes = [\r\n 'noMedia',\r\n MediaType.Image,\r\n MediaType.Gif,\r\n MediaType.Video,\r\n 'Share',\r\n];\r\n\r\nexport const McaEditorialEntityTypes = {\r\n McaCampaign: 'McaCampaign',\r\n McaAd: 'McaAd',\r\n McaKeyword: 'McaKeyword',\r\n};\r\n\r\nexport const McaEditorialTypes = {\r\n Inline: 'Inline',\r\n Offline: 'Offline',\r\n};\r\n\r\nexport const McaEditorialAppealStatus = {\r\n UnKnown: 'UnKnown',\r\n Appealable: 'Appealable',\r\n AppealPending: 'AppealPending',\r\n NotAppealable: 'NotAppealable',\r\n};\r\n\r\nexport const McaEditorialStatus = {\r\n UnKnown: 'UnKnown',\r\n Approved: 'Approved',\r\n ApprovedLimited: 'ApprovedLimited',\r\n Disapproved: 'Disapproved',\r\n Pending: 'Pending',\r\n UnderAppeal: 'UnderAppeal',\r\n Rejected: 'Rejected',\r\n};\r\n\r\nexport const McaAppealStatus = {\r\n // ad status is approved or appeal is expired\r\n Unspecified: 'Unspecified',\r\n // ad status is disapproved, user has submitted appeal from UI\r\n Submitted: 'Submitted',\r\n // appeal request has been synced to current channelad or mcaad\r\n Synced: 'Synced',\r\n // appeal request sync is failed to current channelad or mcaad\r\n ErrorSyncing: 'ErrorSyncing',\r\n};\r\n\r\nexport const McaCampaignGoals = {\r\n IncreaseWebsiteVisit: {\r\n value: 'IncreaseWebsiteVisit',\r\n title: _TL_('Get more visits to my website'),\r\n description: _TL_('Visits to my website. Choose this goal if: You want to drive traffic to your website. What you need to know: Setting your goal right at the start lets us suggest the most helpful Microsoft Advertising and Google Ads features for your campaign. You\\'ll still have access to all Microsoft Advertising and Google Ads features regardless of the goal you choose.'),\r\n topic: 'pop_DMC_Goals_MoreVisits',\r\n },\r\n IncreaseCallToBusiness: {\r\n value: 'IncreaseCallToBusiness',\r\n title: _TL_('Get more phone calls to my business'),\r\n description: _TL_('Phone calls to my business. Choose this goal if: You want to drive new phone calls to your business\\'s phone number. What you need to know: Setting your goal right at the start lets us suggest the most helpful Microsoft Advertising and Google Ads features for your campaign. You\\'ll still have access to all Microsoft Advertising and Google Ads features regardless of the goal you choose.'),\r\n topic: 'pop_DMC_Goals_MoreCalls',\r\n },\r\n IncreaseBusinessLocationVisit: {\r\n value: 'IncreaseBusinessLocationVisit',\r\n title: _TL_('Get more visits to my business\\' physical location'),\r\n description: _TL_('Get more foot traffic. Choose this goal if: You want to get more people to visit your store or office. What you need to know: Setting your goal right at the start lets us suggest the most helpful Microsoft Advertising and Google Ads features for your campaign. You\\'ll still have access to all Microsoft Advertising and Google Ads features regardless of the goal you choose.'),\r\n topic: 'pop_DMC_Goals_MoreFootTraffic',\r\n },\r\n};\r\n\r\nexport const McaCampaignMode = {\r\n DMC: 'DMC',\r\n UP: 'UP',\r\n};\r\n\r\nexport const McaCampaignStatus = {\r\n Active: 'Active',\r\n Deleted: 'Deleted',\r\n Paused: 'Paused',\r\n Draft: 'Draft',\r\n};\r\n\r\n// Check the unicode CLDR documentation for other\r\n// date format skeletons\r\nexport const McaDateFormatType = [\r\n 'MEd', // Tue, 11/30\r\n 'MEdhm', // Tue, 11/30 2:33PM\r\n 'MMMd', // May 30\r\n 'MMMEEEEd', // Tuesday, Nov 30\r\n 'yMMMd', // May 30, 2022\r\n 'yMEdhm', // Tue, 11/30/2020 2:33PM\r\n 'yMEd', // Tue, 11/30/2020\r\n];\r\n\r\nexport const McaSocialChannels = {\r\n Facebook: {\r\n id: 'Facebook',\r\n name: _TL_('Facebook'),\r\n color: '#00188F',\r\n },\r\n Instagram: {\r\n id: 'Instagram',\r\n name: _TL_('Instagram'),\r\n color: '#E3008C',\r\n },\r\n Twitter: {\r\n id: 'Twitter',\r\n name: _TL_('Twitter'),\r\n color: '#4B003F',\r\n },\r\n LinkedIn: {\r\n id: 'LinkedIn',\r\n name: _TL_('LinkedIn'),\r\n color: '#00A2AD',\r\n },\r\n};\r\n\r\nexport const McaTopMetricsSettings = {\r\n Impressions: {\r\n color: '#00188F',\r\n title: _TL_('Impressions'),\r\n help: 'pop_DMC_Campaigns_Impr',\r\n },\r\n Clicks: {\r\n color: '#E3008C',\r\n title: _TL_('Clicks'),\r\n help: 'pop_DMC_Campaigns_Clicks',\r\n },\r\n Spend: {\r\n color: '#4B003F',\r\n title: _TL_('Spend'),\r\n },\r\n Directions: {\r\n color: '#001D3F',\r\n title: _TL_('Direction Inquiries'),\r\n help: 'pop_DMC_Campaigns_DirectionInquiries',\r\n },\r\n Calls: {\r\n color: '#00A2AD',\r\n title: _TL_('Calls'),\r\n help: 'pop_DMC_Campaigns_Calls',\r\n },\r\n Engagements: {\r\n color: '#917EDB',\r\n title: _TL_('Engagements'),\r\n help: 'pop_DMC_Campaigns_Engagement',\r\n },\r\n Audiences: {\r\n color: '#E1DFDD',\r\n title: _TL_('Audience Growth'),\r\n showSign: true,\r\n },\r\n Conversions: {\r\n color: '#EF6950',\r\n title: _TL_('Conversions'),\r\n help: 'pop_DMC_Campaigns_Conversions',\r\n },\r\n Revenue: {\r\n color: '#0078D4',\r\n title: _TL_('Conversion Revenue'),\r\n },\r\n};\r\n\r\nexport const PostState = {\r\n Posted: 'Posted',\r\n Scheduled: 'Scheduled',\r\n Draft: 'Draft',\r\n Failed: 'Failed',\r\n};\r\n\r\nexport const FilterOptionKeys = {\r\n Scheduled: 'scheduled',\r\n Posted: 'posted',\r\n Failed: 'failed',\r\n Draft: 'draft',\r\n};\r\n\r\nexport const MediaContainer = {\r\n McaSocial: 'McaSocial',\r\n McaAds: 'McaAds',\r\n};\r\n\r\nexport const PerformanceChartTypes = {\r\n Platform: 'platform',\r\n Metrics: 'metrics',\r\n};\r\n\r\nexport const PlatformPerfChartMetricTypes = {\r\n Audience: 'Audience',\r\n Social: 'Social',\r\n Search: 'Search',\r\n SearchAndSocial: 'SearchSocial',\r\n All: 'All',\r\n};\r\n\r\nexport const ReplyType = {\r\n private: {\r\n id: 'private',\r\n value: _TL_('Private Message'),\r\n },\r\n public: {\r\n id: 'public',\r\n value: _TL_('Public response'),\r\n },\r\n};\r\n\r\nexport const ReplyState = {\r\n Edit: 'Edit',\r\n Sending: 'Sending',\r\n Successful: 'Successful',\r\n Failed: 'Failed',\r\n};\r\n\r\nexport const ChannelSubMetrics = {\r\n Reactions: {\r\n id: 'Reactions',\r\n title: _TL_('Reactions'),\r\n },\r\n Comments: {\r\n id: 'Comments',\r\n title: _TL_('Comments'),\r\n },\r\n Shares: {\r\n id: 'Shares',\r\n title: _TL_('Shares'),\r\n },\r\n Likes: {\r\n id: 'Likes',\r\n title: _TL_('Likes'),\r\n },\r\n Replies: {\r\n // MT returns Replies metric as Comments,\r\n // hence using Comments metric id for lookup.\r\n id: 'Comments',\r\n title: _TL_('Replies'),\r\n },\r\n Retweets: {\r\n // MT returns Retweets metric as Shares,\r\n // hence using Shares metric id for lookup.\r\n id: 'Shares',\r\n title: _TL_('Retweets'),\r\n },\r\n AudiencesGain: {\r\n id: 'AudiencesGain',\r\n title: _TL_('Fans gained'),\r\n },\r\n AudiencesLost: {\r\n id: 'AudiencesLost',\r\n title: _TL_('Fans lost'),\r\n },\r\n FollowersGain: {\r\n id: 'AudiencesGain',\r\n title: _TL_('Followers gained'),\r\n },\r\n FollowersLost: {\r\n id: 'AudiencesLost',\r\n title: _TL_('Followers lost'),\r\n },\r\n};\r\n\r\nexport const DataStates = {\r\n Initializing: 'Initializing',\r\n Loading: 'Loading',\r\n Error: 'Error',\r\n Successful: 'Successful',\r\n};\r\n\r\nexport const AdType = {\r\n SearchAd: 'SearchAd',\r\n ImageAd: 'ImageAd',\r\n VideoAd: 'VideoAd',\r\n CarouselAd: 'CarouselAd',\r\n};\r\n\r\n// Microsoft.Ads.Mca.BusinessMT.Model.Ads.ImageSource\r\nexport const ImageSource = {\r\n UserUpload: 'UserUpload',\r\n ParseFromUrl: 'ParseFromUrl',\r\n Template: 'Template',\r\n M365Getty: 'M365Getty',\r\n StaticImage: 'StaticImage',\r\n};\r\n\r\nexport const TOP_ADS_PIVOT_ID = 'TopAd';\r\nexport const AdPivots = [{\r\n id: TOP_ADS_PIVOT_ID,\r\n name: _TL_('Top ads'),\r\n shouldShowIfEmpty: true,\r\n}, {\r\n id: AdType.SearchAd,\r\n name: _TL_('Text ads'),\r\n type: AdType.SearchAd,\r\n}, {\r\n id: AdType.ImageAd,\r\n name: _TL_('Image ads'),\r\n type: AdType.ImageAd,\r\n}, {\r\n id: AdType.VideoAd,\r\n name: _TL_('Video ads'),\r\n type: AdType.VideoAd,\r\n}];\r\n\r\nexport const urlPrefixOptions = [\r\n { key: 'https', text: 'https://' },\r\n { key: 'http', text: 'http://' },\r\n];\r\n\r\nexport const urlHost = {\r\n Facebook: 'facebook',\r\n Instagram: 'instagram',\r\n};\r\n\r\nexport const ActivityTypeDialogText = {\r\n FacebookWallPost: _TL_('wall post'),\r\n FacebookComment: _TL_('comment'),\r\n FacebookAdComment: _TL_('ad comment'),\r\n FacebookReview: _TL_('review'),\r\n FacebookPost: _TL_('Facebook post'),\r\n\r\n InstagramComment: _TL_('comment'),\r\n InstagramAdComment: _TL_('comment'),\r\n InstagramPost: _TL_('Instagram post'),\r\n\r\n TwitterPost: _TL_('Twitter post'),\r\n TwitterMention: _TL_('tweet'),\r\n TwitterRetweet: _TL_('tweet'),\r\n TwitterRetweetWithComment: _TL_('comment'),\r\n TwitterNewFollower: _TL_('notification'),\r\n\r\n LinkedInComment: _TL_('comment'),\r\n LinkedInShare: _TL_('LinkedIn share'),\r\n\r\n GoogleMyBusinessReview: _TL_('review'),\r\n GoogleMyBusinessQuestion: _TL_('question'),\r\n BingPlacesReview: _TL_('review'),\r\n};\r\n\r\nexport const wideChartWidth = 996;\r\nexport const narrowChartWidth = 466;\r\n\r\nexport const supportLink = 'https://help.digitalmarketing.microsoft.com/#apex/27/en/30006';\r\nexport const helpLink = 'https://help.digitalmarketing.microsoft.com/';\r\nexport const privacyAndCookiesLink = 'https://privacy.microsoft.com/en-us/PrivacyStatement';\r\nexport const subscriptionTnCLink = 'https://about.ads.microsoft.com/en-us/resources/policies/subscription-ads-beta';\r\nexport const subscriptionTnCLearnMoreLink = 'https://aka.ms/AAhkymq';\r\n// TODO: update the link\r\nexport const learnMoreCreateCampaignLink = 'https://www.bing.com';\r\nexport const learnMoreConnectSocialMediaLink = 'https://www.bing.com';\r\n\r\nexport const acceptableImageTypes = [\r\n '.png',\r\n '.jpg',\r\n '.jpeg',\r\n '.jfif',\r\n '.gif',\r\n];\r\n\r\nexport const acceptableVideoTypes = [\r\n '.mp4',\r\n '.wmv',\r\n '.mov',\r\n '.gif',\r\n];\r\n\r\nexport const MediaTypeMap = {\r\n '.png': MediaType.Image,\r\n '.jpg': MediaType.Image,\r\n '.jpeg': MediaType.Image,\r\n '.jfif': MediaType.Image,\r\n '.gif': MediaType.Image, // gif is treated as Image type by social channels\r\n '.mp4': MediaType.Video,\r\n '.wmv': MediaType.Video,\r\n '.mov': MediaType.Video,\r\n};\r\n\r\nexport const FileSizeLimits = {\r\n Image: 30 * 1024 * 1024,\r\n Gif: 15 * 1024 * 1024,\r\n Video: 1 * 1024 * 1024 * 1024,\r\n};\r\n\r\nexport const OrganicPostsMetrics = {\r\n Post: 'Posts',\r\n Engagements: 'Engagements',\r\n Likes: 'Likes',\r\n Impressions: 'Impressions',\r\n Published: 'Published',\r\n};\r\n\r\nexport const allCampaignMetrics = [\r\n 'Impressions',\r\n 'Clicks',\r\n 'Directions',\r\n 'Calls',\r\n 'Conversions',\r\n 'Spend',\r\n 'Engagements',\r\n];\r\n\r\nexport const adsAndSocialMetrics = [\r\n 'Impressions',\r\n 'Clicks',\r\n 'Conversions',\r\n 'Spend',\r\n 'Engagements',\r\n];\r\n\r\nexport const NEW_ACTIVITY_DATE_RANGE_OFFSET = 30;\r\n\r\nexport const ConversionTrackingHelpIds = {\r\n metricsOverall: 'pop_DMC_Campaigns_CATMetricsTile_CAT ',\r\n metricsVisits: 'pop_DMC_Campaigns_CATMetricsTile_TotalVisits',\r\n metricsVisitRate: 'pop_DMC_Campaigns_CATMetricsTile_RateOfVisits',\r\n metricsAssists: 'pop_DMC_Campaigns_CATMetricsTile_TotalAssists',\r\n metricsTopPageVisits: 'pop_DMC_Campaigns_CATMetricsTile_TopPageVisits',\r\n metricsAvgTime: 'pop_DMC_Campaigns_CATMetricsTile_AvgTime',\r\n metricsAvgPages: 'pop_DMC_Campaigns_CATMetricsTile_AvgPages',\r\n metricsTotalVisits: 'pop_DMC_Campaigns_CATMetricsTile_TotalVisitors',\r\n metricsTotalConversions: 'pop_BA_UET_Conversions',\r\n metricsConversionRate: 'pop_BA_CampaignGrids_ConvRate',\r\n metricsTotalRevenue: 'pop_BA_UET_Revenue',\r\n metricsEstRevenue: 'pop_BA_TotalEstConversionRev',\r\n specialPagesPanelTracking: 'pop_DMC_Campaigns_CAT_SpecialPagesPanel_Tracking',\r\n specialPagesPanelName: 'pop_DMC_Campaigns_CAT_SpecialPagesPanel_PageName',\r\n specialPagesPanelQualifier: 'pop_DMC_Campaigns_CAT_SpecialPagesPanel_Qualifier',\r\n specialPagesPanelUrl: 'pop_DMC_Campaigns_CAT_SpecialPagesPanel_URL',\r\n specialPagesPageTypes: 'pop_DMC_Campaigns_CATWiz_SpecialPages_PageTypes',\r\n specialPagesName: 'pop_DMC_Campaigns_CATWiz_SpecialPages_PageName',\r\n specialPagesQualifier: 'pop_DMC_Campaigns_CATWiz_SpecialPages_Qualifier',\r\n specialPagesUrl: 'pop_DMC_Campaigns_CATWiz_SpecialPages_URL',\r\n specialPagesLearnMore: 'app30016',\r\n specialPagesTotalConversions: 'pop_BA_UET_Conversions',\r\n goalTypes: 'pop_BA_UET_GoalTypes',\r\n goalCategories: 'pop_BA_ConversionGoal_GoalCategory',\r\n goalTrackingStatus: 'pop_BA_UET_TrackingStatus',\r\n goalTagInstruction: 'pop_BA_UET_TagInstruction',\r\n customEventParametersLearnMore: 'app54597',\r\n revenueValue: 'pop_BA_UET_RevenueValue',\r\n revenueVariantValueLearnMore: 'app51210',\r\n tile: {\r\n Container: 'app30010',\r\n DMC: 'app30010',\r\n UET: 'app54732',\r\n },\r\n emailTag: {\r\n Container: 'app30017',\r\n DMC: 'app30017',\r\n UET: 'app54733',\r\n },\r\n emailPlatform: {\r\n Container: {\r\n WordPress: 'app30014',\r\n Wix: 'app30013',\r\n Shopify: 'app30012',\r\n BigCommerce: 'app30011',\r\n },\r\n DMC: {\r\n WordPress: 'app30014',\r\n Wix: 'app30013',\r\n Shopify: 'app30012',\r\n BigCommerce: 'app30011',\r\n },\r\n UET: {\r\n WordPress: 'app54735',\r\n Wix: 'app54736',\r\n Shopify: 'app54737',\r\n BigCommerce: 'app54738',\r\n },\r\n },\r\n};\r\n\r\nexport const ConversionTrackingHelpIdsUp = {\r\n ...ConversionTrackingHelpIds,\r\n specialPagesLearnMore: 'app54780',\r\n tile: {\r\n Container: 'app54778',\r\n DMC: 'app54778',\r\n UET: 'app54732',\r\n },\r\n emailTag: {\r\n Container: 'app54753',\r\n DMC: 'app54753',\r\n UET: 'app54733',\r\n },\r\n allPlatformsLearnMore: 'https://help.ads.microsoft.com/#apex/ads/en/60088/-1-500',\r\n};\r\n\r\nexport const WizardSubmitType = {\r\n None: 0,\r\n Submit: 1,\r\n Skip: 2,\r\n SwitchToExpertMode: 3,\r\n SwitchToOldSmartMode: 4,\r\n};\r\n\r\nexport const UrlValidationStatus = {\r\n Pass: 'Pass',\r\n Timeout: 'Timeout',\r\n BlockedByThirdParty: 'BlockedByThirdParty',\r\n Fail: 'Fail',\r\n ServerError: 'ServerError',\r\n None: 'None',\r\n};\r\n\r\nexport const UrlErrorCodes = {\r\n BlockedByCloudflare: 'BlockedByCloudflare',\r\n UrlScanFailed: 'UrlScanFailed',\r\n UrlSSLVerificationFailed: 'UrlSSLVerificationFailed',\r\n};\r\nexport const UI_TRACE_WAIT_IN_MS = 1000;\r\n\r\nexport const UpCampaignGoals = {\r\n IncreaseWebsiteVisit: {\r\n value: 'IncreaseWebsiteVisit',\r\n title: _TL_('Visits to my website'),\r\n isRecommended: true,\r\n },\r\n IncreaseCallToBusiness: {\r\n value: 'IncreaseCallToBusiness',\r\n title: _TL_('Phone calls to my business'),\r\n isRecommended: false,\r\n },\r\n IncreaseBusinessLocationVisit: {\r\n value: 'IncreaseBusinessLocationVisit',\r\n title: _TL_('Visits to my physical business locations'),\r\n isRecommended: false,\r\n },\r\n};\r\n\r\nexport const SELECTED_ACTIVITY_TYPES = [\r\n 'FacebookPost',\r\n 'InstagramPost',\r\n 'TwitterPost',\r\n 'LinkedInShare',\r\n];\r\n\r\nexport const ACTIVITIES_FILTER = _.chain(SELECTED_ACTIVITY_TYPES)\r\n .map(type => `ActivityType eq Enum.ActivityType'${type}'`)\r\n .join(' or ')\r\n .value();\r\n\r\nexport const NotSetBusinessSize = 'Unknown';\r\nexport const DefaultBusinessSizeOption = 'OnlyOne';\r\n\r\nexport const BusinessSizeOptions = [\r\n {\r\n key: 'OnlyOne',\r\n text: _TL_('1'),\r\n },\r\n {\r\n key: 'TwoAndFour',\r\n text: _TL_('2 - 4'),\r\n },\r\n {\r\n key: 'FiveAndNine',\r\n text: _TL_('5 - 9'),\r\n },\r\n {\r\n key: 'TenAndTwentyFour',\r\n text: _TL_('10 - 24'),\r\n },\r\n {\r\n key: 'TwentyFiveAndFourtyNine',\r\n text: _TL_('25 - 49'),\r\n },\r\n {\r\n key: 'FiftyAndNinetyNine',\r\n text: _TL_('50 - 99'),\r\n },\r\n {\r\n key: 'HundredAndHundredFourtyNine',\r\n text: _TL_('100 - 149'),\r\n },\r\n {\r\n key: 'HundredFiftyAndTwoHundredFourtyNine',\r\n text: _TL_('150 - 249'),\r\n },\r\n {\r\n key: 'TwoHundredFiftyAndTwoHundredNinetyNine',\r\n text: _TL_('250 - 299'),\r\n },\r\n {\r\n key: 'ThreeHundredAndFourHundredNinetyNine',\r\n text: _TL_('300 - 499'),\r\n },\r\n {\r\n key: 'FiveHundredAndNineHundredNinetyNine',\r\n text: _TL_('500 - 999'),\r\n },\r\n {\r\n key: 'GreaterThanOneThousand',\r\n text: _TL_('>= 1000'),\r\n },\r\n];\r\n\r\n// Note: only support English for now\r\nexport const LanguageOptions = [\r\n {\r\n key: 'en-us',\r\n text: _TL_('English (US)'),\r\n },\r\n];\r\n\r\nexport const AddressFieldsForCcForm = [\r\n 'City',\r\n 'Country',\r\n 'Line1',\r\n 'Line2',\r\n 'PostalCode',\r\n 'StateOrProvince',\r\n];\r\n\r\nexport const ScrollToTypes = {\r\n Ads: 'Ads',\r\n KeywordThemes: 'KeywordThemes',\r\n CampaignDetails: 'CampaignDetails',\r\n Targets: 'Targets',\r\n};\r\n\r\nexport const SpecialAdCategoryTypes = {\r\n None: 'None',\r\n Employment: 'Employment',\r\n Housing: 'Housing',\r\n Credit: 'Credit',\r\n IssuesElectionsPolitics: 'IssuesElectionsPolitics',\r\n};\r\n\r\nexport const TermsAndConditionLink = {\r\n // visit https://about.ads.microsoft.com/en-us/resources/policies/microsoft-advertising-agreement?msatoolbar=1 to see all the supported languages\r\n 'de-de': 'https://about.ads.microsoft.com/de-de/ressourcen/richtlinien/microsoft-advertising-vertrag',\r\n 'en-us': 'https://about.ads.microsoft.com/en-us/resources/policies/microsoft-advertising-agreement',\r\n 'es-es': 'https://about.ads.microsoft.com/es-es/recursos/directivas/contrato-de-microsoft-advertising',\r\n 'fr-fr': 'https://about.ads.microsoft.com/fr-fr/ressources/politiques/contrat-microsoft-advertising',\r\n 'it-it': 'https://about.ads.microsoft.com/it-it/risorse/informative/contratto-per-microsoft-advertising',\r\n 'pt-br': 'https://about.ads.microsoft.com/pt-br/recursos/politicas/contrato-do-microsoft-advertising',\r\n 'zh-tw': 'https://about.ads.microsoft.com/zh-tw/resources/policies/microsoft-advertising-agreement',\r\n};\r\n\r\nexport const Products = {\r\n Expert: 'Expert',\r\n Smart: 'Smart',\r\n DMC: 'DMC',\r\n UP: 'UP',\r\n Unknown: 'Unknown',\r\n};\r\n\r\nexport const McaLocationType = {\r\n Country: 'Country',\r\n SubGeography: 'SubGeography',\r\n MetroArea: 'MetroArea',\r\n City: 'City',\r\n PostalCode: 'PostalCode',\r\n County: 'County',\r\n Neighborhood: 'Neighborhood',\r\n};\r\n\r\nexport const AppScope = {\r\n ADV: 1,\r\n DMC: 8,\r\n};\r\n\r\nexport const UpSignupWizardCouponClassForProd = 'AENOTINCPBCOFY22US100'; // for product\r\n\r\nexport const UpSignupWizardCouponClassForNonProd = 'ATESTCOUPONCLASSXIAOHUL01'; // for non-product\r\n\r\nexport const UpSignupWizardCouponDetails = {\r\n // for product\r\n AENOTINCPBCOFY22US100: {\r\n ClassName: 'AENOTINCPBCOFY22US100',\r\n CouponPurposeId: 0,\r\n CouponTypeId: 3,\r\n CouponValue: 100,\r\n CurrencyId: 12,\r\n EndDate: '2023-12-31T00:00:00.0000000',\r\n ExpiryDate: '2023-12-31T00:00:00.0000000',\r\n ExpiryDateFromAssociation: '0001-01-01T00:00:00.0000000',\r\n LimitForDaysToUseFromCustomerCreation: 30,\r\n MaxRedemptionCount: 1,\r\n MaxRedemptionPerAccountCount: 1,\r\n PercentOff: null,\r\n StartDate: '2021-12-01T00:00:00.0000000',\r\n UpfrontSpending: 25,\r\n id: 112758,\r\n },\r\n // for non-product\r\n ATESTCOUPONCLASSXIAOHUL01: {\r\n ClassName: 'ATESTCOUPONCLASSXIAOHUL01',\r\n CouponPurposeId: 0,\r\n CouponTypeId: 3,\r\n CouponValue: 100,\r\n CurrencyId: 12,\r\n EndDate: '2026-08-01T00:00:00.0000000',\r\n ExpiryDate: '2026-08-01T00:00:00.0000000',\r\n ExpiryDateFromAssociation: '0001-01-01T00:00:00.0000000',\r\n LimitForDaysToUseFromCustomerCreation: 30,\r\n MaxRedemptionCount: 1,\r\n MaxRedemptionPerAccountCount: 1,\r\n PercentOff: null,\r\n StartDate: '2023-11-01T00:00:00.0000000',\r\n UpfrontSpending: 25,\r\n id: 1243216625,\r\n },\r\n};\r\n\r\n// Below coupons will get removed when user switches to Expert from ESC\r\n// and get appended when switching back\r\nexport const ESC_ONLY_COUPONS = [\r\n UpSignupWizardCouponClassForProd,\r\n UpSignupWizardCouponClassForNonProd,\r\n 'AENOTINCBINGFY22US150', // BNP promotion CCL\r\n 'AENOTINCBINGFY23US150', // BNP promotion CCL in FY23\r\n];\r\n\r\nexport const DAYS_OF_MONTH = 30.4; // 30.4 days on average\r\n\r\nexport const SubscriptionPlanType = {\r\n Standard: 'Standard',\r\n Basic: 'Basic',\r\n Premium: 'Premium',\r\n Custom: 'Custom',\r\n};\r\n\r\nexport const SubscriptionPlanTypeLocal = {\r\n Standard: _TL_('Standard'),\r\n Basic: _TL_('Basic'),\r\n Premium: _TL_('Premium'),\r\n Custom: _TL_('Custom'),\r\n};\r\n\r\nexport const SubscriptionPlanStatus = {\r\n Active: 'Active',\r\n Cancelled: 'Cancelled',\r\n Deleted: 'Deleted',\r\n Draft: 'Draft',\r\n};\r\n\r\nexport const McaChannelMinBudgetPerDay = {\r\n [McaChannelTypes.Facebook]: 5,\r\n [McaChannelTypes.GoogleAds]: 3,\r\n [McaChannelTypes.MicrosoftAdvertising]: 2,\r\n};\r\n\r\nexport const PerfType = {\r\n Clicks: 'Clicks',\r\n Conversions: 'Conversions',\r\n};\r\n\r\nexport const EscLegalBusinessCountries = ['US', 'CN'];\r\n\r\n// Sub ads phase2 only support website goal\r\nexport const SUB_ADS_DEFAULT_CAMPAIGN_GOAL_OPTIONS = {\r\n IncreaseWebsiteVisit: true,\r\n IncreaseCallToBusiness: false,\r\n IncreaseBusinessLocationVisit: false,\r\n};\r\n\r\n// 600px\r\nexport const mobileMaxWidth = 600;\r\nexport const mobileDeviceQuery = `(max-width:${mobileMaxWidth}px)`;\r\nexport const mobileDevice = `@media ${mobileDeviceQuery}`;\r\n\r\nexport const tabletMaxWidth = 768;\r\nexport const tabletDeviceQuery = `(max-width:${tabletMaxWidth}px)`;\r\nexport const tabletDevice = `@media ${tabletDeviceQuery}`;\r\n\r\nexport const WebsiteValidationStatus = {\r\n Valid: 'Valid',\r\n URLNotValid: 'URLNotValid',\r\n URLAdvertisedBefore: 'URLAdvertisedBefore',\r\n MTError: 'MTError', // only used in UI\r\n};\r\n\r\nexport const EscImageRequirements = {\r\n maxFileSize: 30 * 1024 * 1024,\r\n minWidth: 720,\r\n minHeight: 720,\r\n};\r\n\r\nexport const MsanImageRequirements = {\r\n maxFileSize: 5 * 1024 * 1024,\r\n minWidth: 720,\r\n minHeight: 720,\r\n maxWidth: 2048,\r\n maxHeight: 2592,\r\n};\r\n","import { ACCOUNT_MODE } from '@bingads-webui-campaign/campaign-ui-common';\r\nimport { Products, AppScope } from './constants';\r\n\r\n/**\r\n * Account mode is not very accurate on identifying what the real product is\r\n * because sometime one AccountMode can represent multiple product, and some product has\r\n * multiple AccountMode in DB (historical reasons).\r\n * @param {object} serverContext - server context\r\n * @returns {string} - real product, e.g Expert, Smart, DMC, UP\r\n */\r\nexport const getProduct = (serverContext) => {\r\n const {\r\n CurrentAccount,\r\n CurrentCustomer,\r\n } = serverContext;\r\n\r\n if (CurrentCustomer && CurrentCustomer.AppScope === AppScope.DMC) {\r\n return Products.DMC;\r\n }\r\n\r\n if (CurrentAccount) {\r\n const { AccountMode } = CurrentAccount;\r\n switch (AccountMode) {\r\n case ACCOUNT_MODE.DEFAULT:\r\n case ACCOUNT_MODE.EXPERT:\r\n return Products.Expert;\r\n case ACCOUNT_MODE.SMART:\r\n return Products.Smart;\r\n case ACCOUNT_MODE.UNIFIED_SMART:\r\n return Products.UP;\r\n\r\n default: throw new Error(`Invalid account mode: ${AccountMode}`);\r\n }\r\n }\r\n\r\n return Products.Unknown;\r\n};\r\n","import _ from 'underscore';\r\nimport React, { createContext, useContext, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { UiBlocker } from '@bingads-webui-react/ui-blocker';\r\n\r\nconst BlockerContext = createContext({ block: () => _.noop });\r\n\r\nexport function BlockerProvider(props) {\r\n const [queue, updateQueue] = useState([]);\r\n\r\n const value = useMemo(() => {\r\n let items = [];\r\n\r\n return {\r\n block: (text) => {\r\n const item = { text };\r\n items.push(item);\r\n updateQueue(items);\r\n\r\n return () => {\r\n items = _.without(items, item);\r\n updateQueue(items);\r\n };\r\n },\r\n };\r\n }, [updateQueue]);\r\n\r\n const firstItem = queue[0];\r\n\r\n return (\r\n \r\n \r\n {props.children}\r\n \r\n \r\n );\r\n}\r\n\r\nBlockerProvider.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.element,\r\n PropTypes.arrayOf(PropTypes.element),\r\n ]).isRequired,\r\n};\r\n\r\nexport function Blocker(props) {\r\n const value = useContext(BlockerContext);\r\n const { loadingText } = props;\r\n\r\n useEffect(\r\n () => value.block(loadingText),\r\n [value, loadingText]\r\n );\r\n\r\n return null;\r\n}\r\n\r\nBlocker.propTypes = {\r\n loadingText: PropTypes.string.isRequired,\r\n};\r\n","import React from 'react';\r\n\r\n/**\r\n * Used to store Budget Suggestions context\r\n */\r\nexport const BudgetSuggestionsContext = React.createContext({\r\n limitedByBudgetCampaignIds: [],\r\n setLimitedByBudgetCampaignIds: () => { },\r\n hideLimitedStatus: () => { },\r\n setHideLimitedStatus: () => { },\r\n});\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\n\r\n/**\r\n * Higher-order component to wrap an form label with a CSS style to indicate it is required.\r\n * @param {Component} WrappedComponent - Form component to wrap.\r\n * @returns {Component} Form component with support for \"required\" styling.\r\n */\r\nconst withRequiredStyle = (WrappedComponent) => {\r\n const HOC = (props) => {\r\n const {\r\n classes,\r\n isRequired,\r\n } = props;\r\n\r\n const wrappedProps = _.omit(props, 'classes', 'isRequired');\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n HOC.propTypes = {\r\n classes: PropTypes.shape({ required: PropTypes.string }).isRequired,\r\n isRequired: PropTypes.bool,\r\n };\r\n\r\n HOC.defaultProps = {\r\n isRequired: false,\r\n };\r\n\r\n HOC.displayName = `withRequiredStyle(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HOC, WrappedComponent);\r\n return HOC;\r\n};\r\n\r\nexport const LabelWithRequiredStyle = withDefaultStyles(withRequiredStyle(Label), () => ({\r\n required: {\r\n '&:after': {\r\n content: '\" *\"',\r\n color: '#a4262c',\r\n },\r\n },\r\n}));\r\n\r\n","import _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useCallback, useMemo, useEffect, useState, useContext } from 'react';\r\nimport { Select } from '@bingads-webui-react/primitive';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { withValidation, withError, withServerError } from '@bingads-webui-react/validation';\r\nimport { Input } from '@bingads-webui-campaign-react/fluent-with-validation';\r\nimport { defaultPhoneSchema, formatPhoneNumber } from '@bingads-webui-campaign-react/mca-core';\r\n\r\nconst getRegex = (format = '') => {\r\n const encode = (char) => {\r\n switch (char) {\r\n case '#':\r\n return '\\\\d';\r\n case '(':\r\n case ')':\r\n return `\\\\${char}`;\r\n default:\r\n return char;\r\n }\r\n };\r\n\r\n const str = ['^', ..._.map(format.split(''), encode), '$'].join('');\r\n const regex = new RegExp(str);\r\n\r\n return regex;\r\n};\r\n\r\nconst repairInput = input => (\r\n (input || '').toString().replace(/\\+?([^\\n]*)/, '+$1')\r\n);\r\n\r\nconst PhoneNumberPure = (props) => {\r\n const {\r\n id,\r\n className,\r\n schema,\r\n onChange,\r\n value: valueInProps,\r\n countryCode: propCountryCode,\r\n setCountryCode,\r\n } = props;\r\n\r\n const [innerSelectedCountryCode, innerSetSelectedCountryCode] = useState(undefined);\r\n const selectedCountryCode = propCountryCode || innerSelectedCountryCode;\r\n const setSelectedCountryCode = setCountryCode || innerSetSelectedCountryCode;\r\n const [onChangeMetric, setOnChangeMetric] = useState({});\r\n const i18n = useContext(I18nContext);\r\n\r\n const value = useMemo(() => repairInput(valueInProps), [valueInProps]);\r\n\r\n const enabledSchema = useMemo(() => (\r\n _.map(\r\n _.filter(schema || defaultPhoneSchema, s => s.disabled !== true),\r\n item => ({\r\n ...item,\r\n label: i18n.getString(item.label),\r\n })\r\n ).sort((item1, item2) => item1.label.localeCompare(item2.label))\r\n ), [i18n, schema]);\r\n\r\n const selectedSchema = useMemo(() => {\r\n if (!_.isEmpty(propCountryCode) && _.isFunction(setCountryCode)) {\r\n return _.find(\r\n enabledSchema,\r\n s => selectedCountryCode === s.key\r\n ) || defaultPhoneSchema[0];\r\n }\r\n return _.find(\r\n enabledSchema,\r\n s => value.indexOf(s.countryCode) === 0 || selectedCountryCode === s.key\r\n ) || defaultPhoneSchema[0];\r\n }, [enabledSchema, propCountryCode, selectedCountryCode, setCountryCode, value]);\r\n\r\n const countryCode = _.get(selectedSchema, 'countryCode');\r\n\r\n const selectedFormat = useMemo(() => {\r\n if (value.indexOf(countryCode) !== 0) {\r\n return selectedSchema.formats[0];\r\n }\r\n\r\n return _.find(\r\n selectedSchema.formats,\r\n f => getRegex(f).test(value.substr(countryCode.length).trim())\r\n ) || selectedSchema.formats[0];\r\n }, [countryCode, selectedSchema.formats, value]);\r\n\r\n const phoneNumber = useMemo(() => formatPhoneNumber(\r\n value.indexOf(countryCode) !== 0 ? value.replace(/\\D/g, '') : value.substr(countryCode.length),\r\n selectedFormat\r\n ), [countryCode, selectedFormat, value]);\r\n\r\n useEffect(() => {\r\n if (onChangeMetric.cursor === 0 && onChangeMetric.beforeCursor === '') {\r\n onChangeMetric.event.target.setSelectionRange(0, 0);\r\n } else if (onChangeMetric.cursor && onChangeMetric.event && onChangeMetric.beforeCursor) {\r\n const diff = phoneNumber.indexOf(onChangeMetric.beforeCursor);\r\n if (diff !== -1) {\r\n onChangeMetric.event.target.setSelectionRange(\r\n diff + onChangeMetric.cursor,\r\n diff + onChangeMetric.cursor\r\n );\r\n }\r\n setOnChangeMetric({});\r\n }\r\n }, [phoneNumber, onChangeMetric]);\r\n\r\n const handleChange = useCallback((code, number) => {\r\n const newValue = _.isEmpty(number) ? '' : `${code} ${number}`;\r\n if (valueInProps !== newValue) {\r\n onChange({ target: { value: newValue } });\r\n }\r\n }, [valueInProps, onChange]);\r\n\r\n const handleCountryCodeChange = useCallback(({\r\n target: { value: newValue },\r\n }) => {\r\n setSelectedCountryCode(newValue);\r\n const prefix = _.get(_.find(enabledSchema, { key: newValue }), 'countryCode');\r\n handleChange(prefix, phoneNumber);\r\n }, [setSelectedCountryCode, enabledSchema, handleChange, phoneNumber]);\r\n\r\n const handlePhoneNumberChange = useCallback((event) => {\r\n event.persist();\r\n setOnChangeMetric({\r\n event,\r\n cursor: event.target.selectionStart,\r\n beforeCursor: event.target.value.substr(0, event.target.selectionStart),\r\n });\r\n handleChange(countryCode, formatPhoneNumber(event.target.value, selectedFormat));\r\n }, [countryCode, selectedFormat, handleChange]);\r\n\r\n useEffect(() => {\r\n if ((!_.isEmpty(phoneNumber) && value !== `${countryCode} ${formatPhoneNumber(phoneNumber)}`)\r\n || (_.isEmpty(phoneNumber) && value !== '')) {\r\n handleChange(countryCode, formatPhoneNumber(phoneNumber, selectedFormat));\r\n }\r\n }, [value, countryCode, phoneNumber, selectedFormat, handleChange]);\r\n\r\n return (\r\n
\r\n \r\n {_.map(enabledSchema, item => (\r\n \r\n ))}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nPhoneNumberPure.propTypes = {\r\n id: PropTypes.string,\r\n className: PropTypes.string,\r\n value: PropTypes.string,\r\n onChange: PropTypes.func,\r\n schema: PropTypes.arrayOf(PropTypes.shape({\r\n key: PropTypes.string.isRequired,\r\n label: PropTypes.string.isRequired,\r\n countryCode: PropTypes.string.isRequired,\r\n formats: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n })),\r\n countryCode: PropTypes.string,\r\n setCountryCode: PropTypes.func,\r\n};\r\n\r\nPhoneNumberPure.defaultProps = {\r\n id: null,\r\n className: null,\r\n value: null,\r\n onChange: _.noop,\r\n schema: null,\r\n countryCode: null,\r\n setCountryCode: null,\r\n};\r\n\r\nexport const PhoneNumber = withError(withValidation(PhoneNumberPure));\r\nexport const PhoneNumberWithServerError = withServerError(PhoneNumber);\r\n","import React, { useContext } from 'react';\r\n\r\nexport const SuggestionWebsiteContext = React.createContext('');\r\n\r\n// Used for Smart Page custom domain scenario, where the website is not available when the campaign is created\r\n// so we will use smart page free website URL to fetch related suggestions\r\nexport const useSuggestionWebsiteContext = () => {\r\n const website = useContext(SuggestionWebsiteContext);\r\n return website;\r\n};\r\n","import _ from 'underscore';\r\nimport { useMemo } from 'react';\r\n\r\nimport { MARKETS, ACCOUNT_SUPPORTED_ADDRESSES_TO_APPEND, LANGUAGES } from '@bingads-webui/esc-global-config';\r\n\r\nimport { getBrowserLanguage } from './helpers';\r\n\r\nexport const useContextData = ({\r\n instrumentationActivity,\r\n countryFromServerContext,\r\n Language,\r\n currencies,\r\n escgConfig,\r\n}) => useMemo(() => {\r\n // Remove China from the list, since it is only enabled as an account country\r\n const enabledMarketsWithPermissions = _.filter(_.get(escgConfig, 'markets', []), market => market.isEnabled && market.countryCode !== 'CN');\r\n const markets = _.map(enabledMarketsWithPermissions, (market) => {\r\n const marketDetails = _.find(MARKETS, m => m.countryCode === market.countryCode) || {};\r\n if (_.isEmpty(marketDetails)) {\r\n instrumentationActivity.error(`Market details not found for ${market}`);\r\n }\r\n return { ...marketDetails, ...market };\r\n });\r\n const legalBusinessAddresses = [...markets, ...ACCOUNT_SUPPORTED_ADDRESSES_TO_APPEND];\r\n const supportedCountryCodes = _.pluck(markets, 'countryCode');\r\n const supportedCountriesForFilter = _.pluck(markets, 'locationFilter');\r\n\r\n const enabledLanguagesWithPermissions = _.filter(_.get(escgConfig, 'languages', []), language => language.isEnabled);\r\n const languages = _.map(enabledLanguagesWithPermissions, (language) => {\r\n const languageDetails = _.find(LANGUAGES, l => l.language === language.language) || {};\r\n if (_.isEmpty(languageDetails)) {\r\n instrumentationActivity.error(`Language details not found for ${language}`);\r\n }\r\n return { ...languageDetails, ...language };\r\n });\r\n\r\n const defaultCountry = _.find(markets, m => m.countryCode === countryFromServerContext) ? countryFromServerContext : 'US';\r\n instrumentationActivity.trace(`LocaleAndMarketContext defaultCountry: ${defaultCountry}`);\r\n\r\n const browserLanguage = getBrowserLanguage();\r\n const defLang = Language || browserLanguage;\r\n const selectedLanguageOption = _.find(languages, l => l.languageCode === defLang);\r\n instrumentationActivity.trace(`LocaleAndMarketContext browserLanguage: ${browserLanguage}, currentUser.Language: ${Language}, selectedLanguageOption: ${JSON.stringify(selectedLanguageOption)}`);\r\n\r\n const defaultLanguage = !_.isEmpty(selectedLanguageOption) ? selectedLanguageOption.language : 'English';\r\n instrumentationActivity.trace(`LocaleAndMarketContext defaultLanguage: ${defaultLanguage}`);\r\n return {\r\n markets,\r\n languages,\r\n defaultCountry,\r\n defaultLanguage,\r\n supportedCountryCodes,\r\n legalBusinessAddresses,\r\n supportedCountriesForFilter,\r\n currencies,\r\n };\r\n}, [Language,\r\n countryFromServerContext,\r\n currencies,\r\n instrumentationActivity,\r\n escgConfig]);\r\n","import React, { useMemo, useContext, useEffect } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { InstrumentationContext } from '@bingads-webui-campaign-react/mca-instrumentation';\r\nimport { useESCGlobalizationPilotValue } from '@bingads-webui-campaign-react/mca-core';\r\nimport { useAccount, useCurrencies } from '@bingads-webui/overreact-cc';\r\nimport { useAccountLevelVariables, useCustomerLevelVariables } from '@bingads-webui-campaign-react/basic-context-utils';\r\nimport { usePostponeReadVariables } from '@bingads-webui/overreact-bingads';\r\n\r\nimport { useContextData } from './use-context-data';\r\n\r\nexport const Context = React.createContext();\r\nexport const useLocaleAndMarketContext = () => useContext(Context);\r\n\r\nexport const LocaleAndMarketContext = (props) => {\r\n const { children } = props;\r\n const serverContext = useContext(ServerContext);\r\n const {\r\n CurrentUser,\r\n UserRegion,\r\n CurrentAccount,\r\n CurrentLocale,\r\n } = serverContext;\r\n\r\n const config =\r\n {\r\n fetch: {\r\n postponeRead: false,\r\n },\r\n };\r\n\r\n const [{ data: account }, { read: readAccount }] = useAccount(useAccountLevelVariables(), usePostponeReadVariables());\r\n const [{ data: currencies }] = useCurrencies(useCustomerLevelVariables(), config);\r\n\r\n useEffect(() => {\r\n if (!_.isEmpty(CurrentAccount) && !account) {\r\n readAccount();\r\n }\r\n }, [CurrentAccount, account, readAccount]);\r\n\r\n const { Market, Language } = CurrentUser || {};\r\n const [instrumentationService] = useContext(InstrumentationContext);\r\n const instrumentationActivity = useMemo(() => {\r\n if (instrumentationService && instrumentationService.instrumentation) {\r\n const instrumentationScenario = instrumentationService.instrumentation.localeAndMarketContext.create();\r\n return instrumentationScenario.localeAndMarketContext.create();\r\n }\r\n return { trace: _.noop, error: _.noop };\r\n }, [instrumentationService]);\r\n\r\n const displayLanguage = CurrentLocale || document.documentElement.lang;\r\n instrumentationActivity.trace(`LocaleAndMarketContext displayLanguage: ${displayLanguage}`);\r\n\r\n const isGlobalizationEnabled = useESCGlobalizationPilotValue();\r\n const escgConfig = useMemo(() => {\r\n if (!isGlobalizationEnabled) {\r\n return {\r\n languages: [{\r\n isEnabled: true, isFbChannelAllowed: true, isGoogleChannelAllowed: true, language: 'English',\r\n }],\r\n markets: [{\r\n isEnabled: true, isFbChannelAllowed: true, isGoogleChannelAllowed: true, countryCode: 'US',\r\n }],\r\n targetLocations: [{\r\n isEnabled: true, isFbChannelAllowed: true, isGoogleChannelAllowed: true, countryCode: 'US',\r\n }],\r\n };\r\n }\r\n return serverContext.EscgConfig;\r\n }, [isGlobalizationEnabled, serverContext.EscgConfig]);\r\n\r\n const value = useContextData({\r\n instrumentationActivity,\r\n countryFromServerContext: _.get(account, ['BusinessAddress', 'Country']) || UserRegion || Market,\r\n Language,\r\n currencies,\r\n escgConfig,\r\n });\r\n\r\n if (_.isEmpty(value)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nLocaleAndMarketContext.propTypes = {\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]).isRequired,\r\n};\r\n","export const CURRENCY = {\r\n ars: 'ArgentinePeso',\r\n aud: 'AustralianDollar',\r\n brl: 'BrazilianReal',\r\n cad: 'CanadianDollar',\r\n chf: 'SwissFranc',\r\n clp: 'ChileanPeso',\r\n cny: 'YuanRenminbi',\r\n cop: 'ColombianPeso',\r\n dkk: 'DanishKrone',\r\n dzd: 'AlgerianDinar',\r\n egp: 'EgyptianPound',\r\n eur: 'Euro',\r\n gbp: 'UKPound',\r\n hkd: 'HongKongDollar',\r\n idr: 'IndonesianRupiah',\r\n inr: 'IndianRupee',\r\n jpy: 'JapaneseYen',\r\n lbp: 'LebanesePound',\r\n mad: 'MoroccanDirham',\r\n mxn: 'MexicanPeso',\r\n myr: 'MalaysianRingit',\r\n nok: 'NorwegianKrone',\r\n nzd: 'NewZealandDollar',\r\n pen: 'PeruvianNuevoSol',\r\n php: 'PhilippinePeso',\r\n qar: 'QatariRiyal',\r\n sar: 'SaudiRiyal',\r\n sek: 'SwedishKrona',\r\n sgd: 'SingaporeDollar',\r\n thb: 'ThaiBaht',\r\n twd: 'NewTaiwanDollar',\r\n usd: 'UsDollar',\r\n vef: 'VenezuelanBolivar',\r\n vnd: 'VietnamDong',\r\n zar: 'SouthAfricanRand',\r\n};\r\n","import { getPilotValue } from './pilots';\r\nimport { getProduct } from './product';\r\nimport { Products } from './constants';\r\n\r\nexport const getIsUnifiedProduct = (serverContext) => {\r\n const product = getProduct(serverContext);\r\n\r\n return product === Products.UP;\r\n};\r\n\r\nexport const getIsDMC = (serverContext) => {\r\n const product = getProduct(serverContext);\r\n\r\n return product === Products.DMC;\r\n};\r\n\r\n// This function is for signup, because in signup flow we allow user to switch to expert mode\r\n// Then a expert account will be created\r\nexport const getIsUnifiedProductOrExpert = (serverContext) => {\r\n const product = getProduct(serverContext);\r\n\r\n if (product === Products.Unknown) {\r\n return getPilotValue(serverContext, 'isUPSignupEnabled');\r\n }\r\n\r\n return product === Products.UP || product === Products.Expert;\r\n};\r\n","import { useContext } from 'react';\r\n\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { useIsUnifiedProduct } from '@bingads-webui-campaign-react/up-context';\r\nimport { usePilotsValue, getPilotValue } from '@bingads-webui-campaign-react/basic-context-utils';\r\nimport { isSiEnvironment } from '@bingads-webui-campaign/campaign-ui-common';\r\n\r\nimport { UrlPilots, getDangerouslySetUrlPilot } from './url-pilots';\r\nimport { getIsUnifiedProduct, getIsDMC } from './up-pilot-enabled';\r\nimport { DefaultCurrencyCode } from './constants';\r\n\r\nexport {\r\n getPilotValueWithSignUp,\r\n getPilotValue,\r\n useIsInternalUser,\r\n useIsReadOnlyUser,\r\n} from '@bingads-webui-campaign-react/basic-context-utils';\r\n\r\nexport const usePilotsValueWithSubAds = usePilotsValue;\r\n\r\nexport const useIsSubscriptionAdsProduct = () => {\r\n const signup = usePilotsValueWithSubAds('IsSubscriptionSignupEnabled');\r\n const postSignup = usePilotsValueWithSubAds('IsUnifiedProductSubscriptionEnabled');\r\n const urlPilot = getDangerouslySetUrlPilot(UrlPilots.forcesubads);\r\n return signup || postSignup || urlPilot;\r\n};\r\n\r\nexport function usePilotsValueWithoutSubAds(key, onlySignup = false) {\r\n const isPilotEnabled = usePilotsValueWithSubAds(key, onlySignup);\r\n const isSubscriptionAdsEnabled = useIsSubscriptionAdsProduct();\r\n return isPilotEnabled && !isSubscriptionAdsEnabled;\r\n}\r\n\r\nexport function useAdEditorialPilotValue() {\r\n return usePilotsValueWithSubAds('IsDMCAdEditorialEnabled');\r\n}\r\n\r\nexport function useSpecialCategorySettingPilotValue() {\r\n return usePilotsValueWithSubAds('IsUpSpecialCategorySettingEnabled');\r\n}\r\n\r\nexport function useAudienceUpdateEnabled() {\r\n const isSpecialCategoryEnabled = useSpecialCategorySettingPilotValue();\r\n const upAudienceUpdatePilotValue = usePilotsValueWithSubAds('IsUpAudienceUpdateEnabled');\r\n return isSpecialCategoryEnabled && upAudienceUpdatePilotValue;\r\n}\r\n\r\nexport const useDefaultSignupSearchAdsOnlyPilotValue = () => usePilotsValueWithSubAds('IsDMCDefaultSignupSearchAdsOnlyEnabled');\r\nexport const useManagedOnboardingPilotValue = () => usePilotsValueWithSubAds('IsDMCManagedOnboardingEnabled');\r\nexport const useDMCSmartPagePilotValue = () => usePilotsValueWithSubAds('IsDMCSmartPageEnabled');\r\nexport const useDMCLinkedinConnectPilotValue = () => usePilotsValueWithSubAds('IsDMCLinkedinConnectEnabled');\r\n\r\nexport const useIsSubscriptionAdsChangeWebsiteEnabled = () => {\r\n const changeWebsite = usePilotsValueWithSubAds('IsSubscriptionAdsChangeWebsiteEnabled');\r\n const isSubscriptionAdsEnabled = useIsSubscriptionAdsProduct();\r\n\r\n return changeWebsite && isSubscriptionAdsEnabled;\r\n};\r\n\r\nexport const useIsSubscriptionAdsChangeChannelEnabled = () => {\r\n const changeChannel = usePilotsValueWithSubAds('IsSubscriptionAdsChangeChannelEnabled');\r\n const isSubscriptionAdsEnabled = useIsSubscriptionAdsProduct();\r\n\r\n return changeChannel && isSubscriptionAdsEnabled;\r\n};\r\n\r\nexport const useDMCBWTIntegrationPilotValue = () => {\r\n // The DMCBWTIntegration pilot and ManagedOnboarding pilot need to be turned on at the same time\r\n const DMCBWTPilotValue = usePilotsValueWithSubAds('IsDMCBWTIntegrationEnabled');\r\n const managedOnboardingPilotValue = useManagedOnboardingPilotValue();\r\n return DMCBWTPilotValue && managedOnboardingPilotValue;\r\n};\r\nexport const useIsShowCouponDetailsEnabled = () => usePilotsValueWithSubAds('IsShowCouponDetailsEnabled');\r\nexport const useUnifiedProductPhase2Value = () => usePilotsValueWithSubAds('isUnifiedProductPhase2Enabled');\r\nexport const useIsUpOmnichannelChatEnabled = () => usePilotsValueWithSubAds('IsUpOmnichannelChatEnabled');\r\n\r\nexport function useESCGlobalizationPilotValue() {\r\n const postSignupValue = usePilotsValueWithSubAds('ESCGlobalization');\r\n return usePilotsValueWithSubAds('isEscGlobalEnabled') || postSignupValue;\r\n}\r\n\r\nexport const useIsM365Traffic = () => {\r\n const isM365SignUpFlowEnabled = usePilotsValueWithSubAds('isM365SignUpFlowEnabled');\r\n const hasM365TrackingId = getDangerouslySetUrlPilot(UrlPilots.m365RmTrackingId);\r\n\r\n return isM365SignUpFlowEnabled || hasM365TrackingId;\r\n};\r\n\r\nexport const useIsGoogleImportSignupEnabled = () => {\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n const isGoogleImportSignupPilotOn = usePilotsValueWithoutSubAds('isESCGoogleImportSignupEnabled');\r\n return isUnifiedProduct && isGoogleImportSignupPilotOn;\r\n};\r\n\r\nexport const useIsGoogleImportPostSignupEnabled = () => {\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n const isGoogleImportPostSignupPilotOn = usePilotsValueWithoutSubAds('isESCGoogleImportPostSignupEnabled');\r\n const serverContext = useContext(ServerContext);\r\n const {\r\n CurrentAccount: {\r\n CurrencyCode: currencyCode,\r\n } = {},\r\n } = serverContext;\r\n\r\n return isUnifiedProduct && isGoogleImportPostSignupPilotOn && currencyCode === DefaultCurrencyCode;\r\n};\r\n\r\nexport const useIsSubAdsSignUpStoped = () => usePilotsValueWithSubAds('StopSubscriptionSignups');\r\nexport const useIsDmcSignUpStoped = () => usePilotsValueWithSubAds('StopDmcSignups');\r\nexport const useIsEscSignUpStoped = () => usePilotsValueWithSubAds('StopEscSignups');\r\n\r\nexport const useStopSubAdsPhase1 = () => usePilotsValueWithSubAds('StopSubscriptionPhase1');\r\nexport const useStopDmcPhase1 = () => usePilotsValueWithSubAds('StopDmcPhase1');\r\nexport const useStopEscPhase1 = () => usePilotsValueWithSubAds('StopEscPhase1');\r\n\r\nexport const useIsBingAdsOptional = () => usePilotsValueWithSubAds('isBingAdsOptionalEnabled');\r\nexport const useSmartUIPilotValue = () => usePilotsValueWithSubAds('isSmartUIEnabled');\r\nexport const useIsInstagramPublishEnabled = () => usePilotsValueWithSubAds('IsDMCInstagramPublishEnabled');\r\nexport const useSmartPageUPIntegrationValue = () => usePilotsValueWithSubAds('isSmartPageUPIntegrationEnabled');\r\nexport const useSmartPageCoverImageCropperValue = () => usePilotsValueWithSubAds('isSmartPageCoverImageCropperEnabled');\r\nexport const useSmartPageRichTextEditorValue = () => usePilotsValueWithSubAds('isSmartPageRichTextEditorEnabled');\r\nexport const useUPHideDraftValue = () => usePilotsValueWithSubAds('isUPHideDraftEnabled');\r\nexport const useIsSmartPageUPConversionTrackingEnabled = () => usePilotsValueWithSubAds('isSmartPageUPConversionTrackingEnabled');\r\nexport const useM365Enabled = () => usePilotsValueWithSubAds('IsUnifiedProductM365IntegrationEnabled');\r\nexport const useIsNewImageCreatorEnabled = () => usePilotsValueWithSubAds('IsUnifiedProductNewImageCreatorEnabled');\r\nexport const useIsESCCurrencyEditableEnabled = () => usePilotsValueWithSubAds('isESCCurrencyEditableEnabled');\r\nexport const useIsESCBlockedWebsiteModalEnabled = () => usePilotsValueWithSubAds('isESCBlockedWebsiteModalEnabled');\r\nexport const useIsExpertFallbackToEscEnabled = () => usePilotsValueWithoutSubAds('IsESCExpertFallbackToEscEnabled');\r\n\r\nexport const useIsESCClarityEnabled = () => {\r\n const isESCClarityEnabled = usePilotsValueWithSubAds('IsESCClarityEnabled');\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n return isUnifiedProduct && isESCClarityEnabled;\r\n};\r\n\r\nexport function useDmcCouponPilotValue() {\r\n return usePilotsValueWithSubAds('isDMCCouponEnabled');\r\n}\r\n\r\nexport function useAutoAdsSuggestionPilotValue() {\r\n return usePilotsValueWithSubAds('IsDMCAutoAdsSuggestionEnabled');\r\n}\r\n\r\nexport function useSupportChatAndCallPilotValue() {\r\n return usePilotsValueWithSubAds('isDMCSupportChatAndCallEnabled');\r\n}\r\n\r\nexport function isRequestCallEnabled(serverContext, isUnifiedProduct) {\r\n return serverContext.SupportOptions.IfShowRequestCall &&\r\n (isUnifiedProduct || getPilotValue(serverContext, 'isDMCSupportChatAndCallEnabled'));\r\n}\r\n\r\nexport function isRequestChatEnabled(serverContext, isUnifiedProduct) {\r\n return serverContext.SupportOptions.IfShowLiveChat &&\r\n (isUnifiedProduct || getPilotValue(serverContext, 'isDMCSupportChatAndCallEnabled'));\r\n}\r\n\r\nexport function useDMCCouponClassAndPBCPilotValue() {\r\n return usePilotsValueWithSubAds('isDMCCouponClassAndPBCEnabled');\r\n}\r\n\r\nexport function useDMCFloatingHelpPilotValue() {\r\n return usePilotsValueWithSubAds('isDMCFloatingHelpEnabled');\r\n}\r\n\r\nexport function useIsDMC() {\r\n const serverContext = useContext(ServerContext);\r\n return getIsDMC(serverContext);\r\n}\r\n\r\nexport function useFullyManagedFacebookAdAccountPilotValue() {\r\n const serverContext = useContext(ServerContext);\r\n const isDMC = getIsDMC(serverContext);\r\n\r\n if (isDMC) {\r\n // FB reseller is not enabled for DMC\r\n return false;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nexport function useSmartPageStandaloneRedirectionPilotValue() {\r\n return usePilotsValueWithSubAds('isSmartPageStandaloneRedirectionEnabled');\r\n}\r\n\r\nexport function useShowUpBudgetBar() {\r\n return usePilotsValueWithSubAds('isUnifiedProductBudgetBarEnabled');\r\n}\r\n\r\nexport function useShowUpCouponPrompt() {\r\n const isUpCouponPromptEnabled = usePilotsValueWithSubAds('isUnifiedProductCouponPromptEnabled');\r\n return isUpCouponPromptEnabled;\r\n}\r\n\r\nexport function useShowInlineSwitchToExpert(isSignUp) {\r\n const isSubscriptionAdsProduct = useIsSubscriptionAdsProduct();\r\n return !isSubscriptionAdsProduct && isSignUp;\r\n}\r\n\r\nexport function useIsTestAccountCreationEnabled() {\r\n const isTestAccountCreationEnabled = usePilotsValueWithSubAds('isUnifiedProductTestAccountCreationEnabled');\r\n return isTestAccountCreationEnabled && isSiEnvironment(window.location.host);\r\n}\r\n\r\nexport function useIsEscBrowserExtensionEnabled() {\r\n return usePilotsValueWithSubAds('isEscBrowserExtensionEnabled');\r\n}\r\n\r\nexport function useSCv2PilotValue() {\r\n return usePilotsValueWithSubAds('isSCv2Enabled');\r\n}\r\n\r\nexport function useIsUpConversionChatSupportEnabled() {\r\n const isUpConversionChatSupportEnabled = usePilotsValueWithSubAds('IsUpConversionChatSupportEnabled');\r\n const isEscGlobalEnabled = useESCGlobalizationPilotValue();\r\n return isUpConversionChatSupportEnabled && !isEscGlobalEnabled;\r\n}\r\n\r\nexport function useIsSubAdsConversionChatSupportEnabled() {\r\n const isSubAdsConversionChatSupportEnabled = usePilotsValueWithSubAds('IsSubAdsConversionChatSupportEnabled');\r\n const isEscGlobalEnabled = useESCGlobalizationPilotValue();\r\n return isSubAdsConversionChatSupportEnabled && !isEscGlobalEnabled;\r\n}\r\n\r\nexport function getESCGlobalizationPilotValue(serverContext) {\r\n const postSignupValue = getPilotValue(serverContext, 'ESCGlobalization');\r\n return getPilotValue(serverContext, 'isEscGlobalEnabled') || postSignupValue;\r\n}\r\n\r\nexport function getESCJapanPilotValue(serverContext) {\r\n const escGlobalPilot = getESCGlobalizationPilotValue(serverContext);\r\n const urlPilot = getDangerouslySetUrlPilot(UrlPilots.forceescgjapan);\r\n const isSi = isSiEnvironment(window.location.host);\r\n\r\n return !!urlPilot && escGlobalPilot && isSi;\r\n}\r\n\r\nexport function useESCPrepayPilotValue() {\r\n return usePilotsValueWithoutSubAds('isESCPrepayEnabled');\r\n}\r\n\r\nexport function useESCPayPalPilotValue() {\r\n return usePilotsValueWithoutSubAds('isESCPayPalEnabled');\r\n}\r\n\r\nexport function useESCAddFundsStepPilotValue() {\r\n const isPrepayEnabled = useESCPrepayPilotValue();\r\n const isAddFundsStepEnabled = usePilotsValueWithoutSubAds('isESCAddFundsStepEnabled');\r\n return isPrepayEnabled && isAddFundsStepEnabled;\r\n}\r\n\r\nexport function useIsMobileAppEscEnabled() {\r\n const isMobileApp = usePilotsValueWithoutSubAds('MobileEsc');\r\n return isMobileApp;\r\n}\r\n\r\nexport const useIsESCNavigationRedesignPhase1Enabled = () => {\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n const isSubscriptionAdsEnabled = useIsSubscriptionAdsProduct();\r\n return isUnifiedProduct && !isSubscriptionAdsEnabled;\r\n};\r\n\r\nexport const getIsSubAds = (serverCtx) => {\r\n const signup = getPilotValue(serverCtx, 'IsSubscriptionSignupEnabled');\r\n const postSignup = getPilotValue(serverCtx, 'IsUnifiedProductSubscriptionEnabled');\r\n const urlPilot = getDangerouslySetUrlPilot(UrlPilots.forcesubads);\r\n return signup || postSignup || urlPilot;\r\n};\r\n\r\nexport const getIsEscNavigationRedesignPhase1 = serverContext => (\r\n !getIsSubAds(serverContext) && getIsUnifiedProduct(serverContext)\r\n);\r\n\r\nexport const getESCGlobalPhase2PilotValue = serverContext => getESCGlobalizationPilotValue(serverContext) && getPilotValue(serverContext, 'isESCGlobalPhase2Enabled');\r\nexport const useIsESCGlobalPhase2Enabled = () => {\r\n const isGlobalizationPhase2Enabled = usePilotsValueWithSubAds('isESCGlobalPhase2Enabled');\r\n return useESCGlobalizationPilotValue() && isGlobalizationPhase2Enabled;\r\n};\r\n\r\nexport const useIsESCMsanEnabled = () => {\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n\r\n const signup = usePilotsValueWithoutSubAds('IsESCMsanEnabled', true);\r\n const postSignup = usePilotsValueWithoutSubAds('IsEscMsanPilotEnabled');\r\n\r\n return isUnifiedProduct && (signup || postSignup);\r\n};\r\n\r\nexport const useIsUrlDomainReadOnlyEnabled = () => usePilotsValueWithoutSubAds('IsUrlDomainNotEditableEnabled');\r\n\r\nexport function useESCUetTagEnabledPilotValue() {\r\n // MTag will remain in use for sub ads customers\r\n const isPilotEnabled = usePilotsValueWithoutSubAds('IsESCUetTagEnabled');\r\n return isPilotEnabled;\r\n}\r\n\r\nexport const useIsESCIncreaseTargetRadiusEnabled = () => {\r\n const isUnifiedProduct = useIsUnifiedProduct();\r\n const isPilotEnabled = usePilotsValueWithoutSubAds('IsESCIncreaseTargetRadiusEnabled');\r\n return isUnifiedProduct && isPilotEnabled;\r\n};\r\n\r\nexport const useIsCouponSpendRestrictionEnabled = () => usePilotsValueWithSubAds('CouponSpendRestriction');\r\n","import Promise from 'bluebird';\r\nimport { useMemo } from 'react';\r\n\r\nconst DEFAULT_DEBOUNCE_TIMEOUT_IN_MS = 500;\r\n\r\nfunction debounce(f, interval) {\r\n let timer = null;\r\n\r\n return (...args) => {\r\n clearTimeout(timer);\r\n return new Promise((resolve) => {\r\n timer = setTimeout(\r\n () => resolve(f(...args)),\r\n interval\r\n );\r\n }).finally(() => {\r\n // Ajax already logs error message\r\n // This finally body is to by pass unhandled error from Promise\r\n });\r\n };\r\n}\r\n\r\nexport const useDebouncedDispatch = dispatch => useMemo(\r\n () => debounce(dispatch, DEFAULT_DEBOUNCE_TIMEOUT_IN_MS),\r\n [dispatch]\r\n);\r\n","import _ from 'underscore';\r\n// ActionNames are like these:\r\n// /