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C1B9EmB,EAAOC,QAAUb,2BCAjBY,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./lib/default-inline-style/module-registration.js?04b6","webpack://Msdyn365.Commerce.Online/./src/modules/default-inline-style/default-inline-style.tsx?3552","webpack://Msdyn365.Commerce.Online/./src/utils/script-utils.ts?cb52","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['default-inline-style'] = {\n c: () => require('@msdyn365-commerce-modules/core-components/dist/lib/modules/default-inline-style/default-inline-style'),\n $type: 'styleModule',\n da: [],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'default-inline-style',\n p: 'core-components',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/core-components/dist/lib/modules/default-inline-style'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SDK_FRAGMENT_NAME } from '@msdyn365-commerce/core-internal';\nimport * as React from 'react';\nimport { isAbsoluteUrl, isRelativeUrl, logDebug, logError } from '../../utils/script-utils';\nimport { IDefaultInlineStyleProps } from './default-inline-style.props.autogenerated';\n\n/**\n *\n * DefaultStyle\n * @extends {React.PureComponent>}\n */\n\nconst DefaultInlineStyle = (props: IDefaultInlineStyleProps<{}>) => {\n const { config, id, typeName, telemetry } = props;\n logDebug(`Adding style tags for '${id}/${typeName}'`, telemetry);\n const source = config.inlineStyle;\n\n if (!source || source === '' || isAbsoluteUrl(source) || isRelativeUrl(source)) {\n logError('Invalid inline style - Empty inline source defined or a url is being used as a source.', telemetry);\n return null;\n }\n\n if (source.includes('')) {\n logError('Invalid inline style - inline style should not contain html tags', telemetry);\n return null;\n }\n\n const styleHtml = ``;\n return React.createElement(SDK_FRAGMENT_NAME, { key: id, dangerouslySetInnerHTML: { __html: styleHtml } });\n};\n\nexport default DefaultInlineStyle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInternalTelemetry, LogLevel } from '@msdyn365-commerce/telemetry-internal';\n\nexport const logDebug = (debugMessage: string, telemetry: IInternalTelemetry | undefined): void => {\n telemetry && telemetry.log(LogLevel.Debug, debugMessage);\n};\n\nexport const logError = (errorMessage: string, telemetry: IInternalTelemetry | undefined): void => {\n telemetry && telemetry.log(LogLevel.Error, errorMessage);\n};\n\n/**\n * Returns true if the given string matches an URL pattern\n *\n * @param source The string to check against\n */\nexport const isAbsoluteUrl = (source: string): boolean => {\n // eslint-disable-next-line security/detect-unsafe-regex\n return /^(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/.test(source);\n};\n\nexport const isRelativeUrl = (source: string): boolean => {\n return /^(?!www\\.|(?:http|ftp)s?:\\/\\/|[A-Za-z]:\\\\|\\/\\/).*(\\.js){1}$/.test(source);\n};\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","props","config","id","typeName","telemetry","logDebug","source","inlineStyle","isAbsoluteUrl","isRelativeUrl","logError","includes","styleHtml","React","SDK_FRAGMENT_NAME","key","dangerouslySetInnerHTML","__html","debugMessage","log","LogLevel","Debug","errorMessage","Error","test","module","exports","ReactDOM"],"sourceRoot":""}