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EAAAA,EAAAA,KAACS,EAAAA,cAAa,CAACC,MAAOF,EAAME,MAAMtB,UAChCY,EAAAA,EAAAA,KAACM,GAAgBK,EAAAA,EAAAA,GAAA,GAAKC,IAAAA,KAAOJ,EAAO,YACtB,EASlB,OAHAD,EAAIM,YAAW,sBAAAC,QAAyBC,EAAAA,EAAAA,gBAAeT,GAAiB,KACxEU,IAAqBT,EAAKD,GAEnBC,CACT,C","sources":["../../../node_modules/@bingads-webui-react/campaign-odata/src/index.js","../../../node_modules/@bingads-webui-react/with-theme-from-props/src/with-theme-from-props.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { memoize, isObject } from 'underscore';\r\nimport stringify from 'json-stable-stringify';\r\nimport { ReactObservable } from '@bingads-webui-react/react-observable';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { getEntityFromScope } from '@bingads-webui/edm-campaign';\r\nimport { Observable } from '@bingads-webui-universal/observable';\r\n\r\nconst observableGetter = memoize(\r\n escapeResult => (\r\n new Observable((observer) => {\r\n observer.next(escapeResult);\r\n return () => { };\r\n })),\r\n\r\n escapeResult => (isObject(escapeResult) ? stringify(escapeResult) : escapeResult)\r\n);\r\n\r\nfunction CampaignODataImpl({\r\n scope,\r\n call,\r\n escapeHatch,\r\n fallback,\r\n onError,\r\n children,\r\n // This parameter is only used for testing purposes\r\n testRef,\r\n}) {\r\n if (testRef) {\r\n // eslint-disable-next-line no-param-reassign\r\n testRef.current = { children };\r\n }\r\n\r\n const {\r\n currentCustomer,\r\n currentAccount,\r\n currentCampaign,\r\n currentAdGroup,\r\n currentEntity,\r\n } = getEntityFromScope(scope);\r\n\r\n const escapeResult = escapeHatch({\r\n currentCustomer,\r\n currentAccount,\r\n currentCampaign,\r\n currentAdGroup,\r\n currentEntity,\r\n });\r\n\r\n if (escapeResult !== undefined) {\r\n const observable = observableGetter(escapeResult);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nCampaignODataImpl.propTypes = {\r\n scope: PropTypes.shape({\r\n values: PropTypes.object,\r\n }).isRequired,\r\n call: PropTypes.func.isRequired,\r\n escapeHatch: PropTypes.func,\r\n fallback: PropTypes.element.isRequired,\r\n onError: PropTypes.func.isRequired,\r\n children: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaignODataImpl.defaultProps = {\r\n escapeHatch: () => (undefined),\r\n};\r\n\r\nexport const CampaignOData = withScope(CampaignODataImpl);\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nexport const withThemeFromProps = (WrappedComponent) => {\r\n const HoC = props => (\r\n \r\n \r\n \r\n );\r\n\r\n HoC.propTypes = {\r\n theme: PropTypes.shape({}).isRequired,\r\n };\r\n HoC.displayName = `WithThemeFromProps(${getDisplayName(WrappedComponent)})`;\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n"],"names":["observableGetter","memoize","escapeResult","Observable","observer","next","isObject","stringify","CampaignODataImpl","_ref","scope","call","escapeHatch","fallback","onError","children","testRef","current","_getEntityFromScope","getEntityFromScope","currentCustomer","currentAccount","currentCampaign","currentAdGroup","currentEntity","undefined","observable","_jsx","ReactObservable","defaultProps","CampaignOData","withScope","withThemeFromProps","WrappedComponent","HoC","props","ThemeProvider","theme","_objectSpread","_","displayName","concat","getDisplayName","hoistNonReactStatics"],"sourceRoot":""}