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AMgL,EAAU,CAAEC,QAAS,GAAIC,YAAa,IAwCvCF,EAAQC,QAAQ,iBAAmB,CAChCE,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,gBACPC,GAAI,CAAC,CAACC,KAAK,WAAaC,KAAK,6BAA8BC,MAAO,IAElEC,KAAK,EACLC,GAAI,YACJC,EAAG,gBACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,6BAlC4BC,EAACC,EAAqBC,KAUlD,GADAlB,EAAQE,YAAYe,GAAuBC,GACtClB,EAAQE,YAAYe,GAAqBE,QAC1C,MAAM,IAAIC,MAAM,oBAAsBH,EAAsB,mCAEhEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUpF,KAC3D+D,EAAQE,YAAYF,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUpF,IAAMgF,IA0BzFD,CAF4B,6BACXZ,EAAQ,MAMjClC,OAAOqD,aAAerD,OAAOqD,cAAgB,GAC7CrD,OAAOqD,aAAatB,QAAOlL,EAAAA,EAAA,GACpBmJ,OAAOqD,aAAatB,SAAW,IAC/BD,EAAQC,SAGX/B,OAAOqD,aAAarB,YAAWnL,EAAAA,EAAA,GAC5BmJ,OAAOqD,aAAarB,aAAe,IACnCF,EAAQE,aAEY,MAAMsB,EAAiB,GAC9BA,EAAe,2DAA6D,CACpFrB,EAAGA,IAAMC,EAAQ,MACjBqB,GAAI,qCAEpBvD,OAAOqD,aAAerD,OAAOqD,cAAgB,GAC7CrD,OAAOqD,aAAaC,eAAczM,EAAAA,EAAA,GACPmJ,OAAOqD,aAAaC,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAUtN,cCAjBqN,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/get-article.action.ts?36ab","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-article/lobas-article.tsx?0941","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-article/components/lobas-image-list.tsx?5bd5","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-article/components/articleView.tsx?d267","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-article/lobas-article.view.tsx?a40a","webpack://Msdyn365.Commerce.Online/./lib/lobas-article/module-registration.js?80b0","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/* eslint-disable no-debugger */\r\nimport { createObservableDataAction, IAction, ICreateActionContext } from '@msdyn365-commerce/core';\r\nimport { retailAction } from '@msdyn365-commerce/retail-proxy';\r\nimport { IArticle } from './DataServiceEntities.g';\r\nimport { createGetArticleByURLInput } from './DataActionExtension.g';\r\n\r\nexport default createObservableDataAction({\r\n action: >retailAction,\r\n input: (context: ICreateActionContext) => {\r\n let articleName = context.requestContext.url.requestUrl.pathname.split('/').at(-1);\r\n if (articleName === undefined) {\r\n articleName = '';\r\n }\r\n\r\n return createGetArticleByURLInput(articleName);\r\n }\r\n});\r\n","/* eslint-disable no-debugger */\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { ILobasArticleData } from './lobas-article.data';\r\nimport { ILobasArticleProps } from './lobas-article.props.autogenerated';\r\nimport { IArticleViewProps } from './components/articleView';\r\n//import { IArticle } from '../../actions/DataServiceEntities.g';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport interface ILobasArticleViewProps extends ILobasArticleProps {\r\n articleViewProps: IArticleViewProps;\r\n articleProps: IModuleProps;\r\n}\r\n\r\n/*export interface ILobasArticleState {\r\n article: IArticle | undefined;\r\n}*/\r\n/**\r\n *\r\n * LobasArticle component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass LobasArticle extends React.PureComponent /*, ILobasArticleState*/> {\r\n public constructor(props: ILobasArticleProps /*, state: ILobasArticleState*/) {\r\n super(props);\r\n //this.state = { article: undefined };\r\n }\r\n\r\n /*public componentDidMount() {\r\n void this.props.data.articles.then(res => {\r\n console.log(res);\r\n\r\n const article = res;\r\n\r\n if (res) {\r\n this.setState({ article: article });\r\n }\r\n });\r\n }*/\r\n\r\n public render(): JSX.Element | null {\r\n if (!this.props.data.articles.result) {\r\n return null;\r\n }\r\n\r\n const viewProps = {\r\n ...this.props,\r\n articleViewProps: {\r\n article: this.props.data.articles.result,\r\n locale: this.props.context.request.locale,\r\n resources: this.props.resources,\r\n className: this.props.config.className,\r\n context: this.props.context\r\n },\r\n articleProps: {\r\n moduleProps: this.props,\r\n className: '',\r\n tag: 'div'\r\n }\r\n };\r\n\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default LobasArticle;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n INodeProps,\r\n Node,\r\n removeContainerZoomStyle,\r\n removeInlineZoomStyle,\r\n IComponentNodeProps,\r\n IModalViewProps,\r\n ImagefullView,\r\n defaultDataScale,\r\n inlineZoomImageOnHover,\r\n inlineZoomInitClick,\r\n inlineZoomImageOnMouseMove,\r\n inlineZoomImageOnMouseOut\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\r\nimport { ILobasArticleResources } from '../lobas-article.props.autogenerated';\r\n\r\nexport interface ILobasImageListProps {\r\n resources: ILobasArticleResources;\r\n context: Msdyn365.ICoreContext;\r\n images?: Msdyn365.IImageData[];\r\n}\r\n\r\n/**\r\n * The interface for IImageListViewProps.\r\n */\r\nexport interface ILobasImageListViewProps {\r\n imageListContainer: INodeProps;\r\n imageListItem: INodeProps;\r\n imageListItems: ILobasImageListItem[] | undefined;\r\n imageModal: React.ReactElement | null;\r\n}\r\n\r\n/**\r\n * The interface for IImageListItem.\r\n */\r\nexport interface ILobasImageListItem {\r\n image: JSX.Element | undefined;\r\n}\r\n\r\nexport interface ILobasImageListNotificationItem {\r\n key: string;\r\n value: string;\r\n}\r\n\r\nexport interface ILobasImageListOnClickNotification {\r\n notificationItem: ILobasImageListNotificationItem;\r\n}\r\n\r\nexport interface ILobasImageListState {\r\n modalIsOpen: boolean;\r\n activeIndex: number;\r\n isMobileImageZoomed: boolean;\r\n isImageZoomed: boolean;\r\n animating: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * ImageList component.\r\n * @extends {React.PureComponent}\r\n */\r\nclass ImageList extends React.PureComponent {\r\n private readonly _inlineZoomDivRef: Map = new Map();\r\n\r\n public constructor(props: ILobasImageListProps) {\r\n super(props);\r\n this._toggleModal = this._toggleModal.bind(this);\r\n this.state = { activeIndex: 0, isImageZoomed: false, isMobileImageZoomed: false, modalIsOpen: false, animating: false };\r\n\r\n this._onImageMouseOut = this._onImageMouseOut.bind(this);\r\n this._inlineZoomImageOnHover = this._inlineZoomImageOnHover.bind(this);\r\n this._onInlineImageClick = this._onInlineImageClick.bind(this);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: ILobasImageListViewProps = {\r\n ...this.props,\r\n imageListContainer: {\r\n className: classnames('ms-image-list__list', 'lobas-image-list__list'),\r\n role: 'list',\r\n tag: 'ul'\r\n },\r\n imageListItem: {\r\n className: classnames('ms-image-list__list-item', 'lobas-image-list__list-item'),\r\n role: 'listitem',\r\n tag: 'li',\r\n onClick: this._openModalDialog\r\n },\r\n imageListItems: this._renderImageListItems(),\r\n imageModal: this.imageModalSlider('')\r\n };\r\n return this.imageListView(viewProps);\r\n }\r\n\r\n /**\r\n * Render list of images.\r\n * @returns List of images with text and redirection link.\r\n */\r\n private readonly _renderImageListItems = (): ILobasImageListItem[] | undefined => {\r\n const imageList: Msdyn365.IImageData[] | undefined = this.props.images;\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=0&q=80&m=6&f=png', w: 100, h: 0 },\r\n lg: { q: 'w=200&h=0&q=80&m=6&f=png', w: 200, h: 0 },\r\n xl: { q: 'w=300&h=0&q=80&m=6&f=png', w: 300, h: 0 }\r\n },\r\n lazyload: false,\r\n disableLazyLoad: true\r\n };\r\n return imageList?.map((image, index) => {\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings!,\r\n imageSettings: defaultImageSettings\r\n };\r\n\r\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\r\n const imageImage = (\r\n \r\n );\r\n\r\n const imageListItem: ILobasImageListItem = {\r\n image: imageImage\r\n };\r\n return imageListItem;\r\n });\r\n };\r\n\r\n private imageListView = (props: ILobasImageListViewProps): JSX.Element => {\r\n const { imageListContainer, imageListItem, imageListItems, imageModal } = props;\r\n return (\r\n <>\r\n \r\n {imageListItems?.map(item => {\r\n let indexKey: string = '';\r\n\r\n if (item.image) {\r\n const image = (item.image as unknown) as Msdyn365.Image;\r\n indexKey = image.props.src as string;\r\n }\r\n return (\r\n \r\n {item.image && item.image}\r\n \r\n );\r\n })}\r\n \r\n {imageModal}\r\n \r\n );\r\n };\r\n\r\n private readonly _openModalDialog = () => {\r\n this._toggleModal();\r\n };\r\n\r\n private _toggleModal(): void {\r\n if (this.state.modalIsOpen) {\r\n const parentDiv = this._inlineZoomDivRef.get(this.state.activeIndex);\r\n if (parentDiv && parentDiv.children && parentDiv.children.length >= 2) {\r\n const image = parentDiv.children[1].querySelector('img');\r\n if (image) {\r\n image.removeAttribute('style');\r\n }\r\n }\r\n this.setState({\r\n isImageZoomed: false\r\n });\r\n }\r\n this.setState({\r\n isImageZoomed: false,\r\n modalIsOpen: !this.state.modalIsOpen\r\n });\r\n removeInlineZoomStyle();\r\n removeContainerZoomStyle();\r\n }\r\n\r\n private readonly imageModalSlider = (ZoomView: string): React.ReactElement => {\r\n const zoomedImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=650&h=0&q=80&m=6&f=png', w: 650, h: 0 },\r\n lg: { q: 'w=1000&h=0&q=80&m=6&f=png', w: 1000, h: 0 },\r\n xl: { q: 'w=1600&h=0&q=80&m=6&f=png', w: 1600, h: 0 }\r\n },\r\n lazyload: false,\r\n disableLazyLoad: true\r\n };\r\n const carouselprops = {\r\n tag: Carousel,\r\n className: classnames('ms-media-gallery__carousel', 'lobas-image-list__carousel'),\r\n items:\r\n this.props.images &&\r\n this.props.images.map((item: Msdyn365.IImageData, index: number) =>\r\n this._renderImageInlineOnZoom(item, zoomedImageSettings, index)\r\n ),\r\n activeIndex: this.state.activeIndex,\r\n next: this.next,\r\n previous: this.previous,\r\n interval: false,\r\n directionTextPrev: this.props.resources.previousScreenshotFlipperText,\r\n directionTextNext: this.props.resources.nextScreenshotFlipperText,\r\n onIndicatorsClickHandler: this.goToIndex,\r\n showPaginationTooltip: true,\r\n hideIndicator: false,\r\n keyboard: false,\r\n handleOnExited: this.onExited,\r\n handleOnExiting: this.onExiting,\r\n isDisabledFunctionality: this.state.isMobileImageZoomed\r\n } as IComponentNodeProps;\r\n\r\n const carousel = ;\r\n\r\n const imageModalSliderProps: IModalViewProps = {\r\n modalIsOpen: this.state.modalIsOpen,\r\n ontoggle: this._toggleModal,\r\n galleryCarousel: carousel,\r\n classNames: classnames('ms-media-gallery__modal', 'msc-modal-input-required', 'lobas-image-list__modal')\r\n };\r\n return ImagefullView(imageModalSliderProps) as React.ReactElement;\r\n };\r\n\r\n private readonly onExiting = () => {\r\n this.setState({ animating: true });\r\n };\r\n\r\n private readonly onExited = () => {\r\n this.setState({ animating: false });\r\n };\r\n\r\n /**\r\n * On click next in carousel.\r\n */\r\n private readonly next = (): void => {\r\n removeInlineZoomStyle();\r\n if (this.isLastItem() === undefined) {\r\n return;\r\n }\r\n\r\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex + 1;\r\n this.goToIndex(nextIndex);\r\n\r\n this.updateZoomedInImage();\r\n };\r\n\r\n /**\r\n * On click previous in carousel.\r\n */\r\n private readonly previous = (): void => {\r\n removeInlineZoomStyle();\r\n const images = this.props.images;\r\n const nextIndex = this.isFirstItem() ? (images ? images.length - 1 : 0) : this.state.activeIndex - 1;\r\n this.goToIndex(nextIndex);\r\n this.updateZoomedInImage();\r\n };\r\n\r\n private readonly isFirstItem = () => this.state.activeIndex === 0;\r\n\r\n private readonly isLastItem = () => {\r\n const images = this.props.images;\r\n return images && this.state.activeIndex === images.length - 1;\r\n };\r\n\r\n /**\r\n * Zoomed out image on previous/next click.\r\n */\r\n public updateZoomedInImage(): void {\r\n this.setState({ isImageZoomed: false });\r\n }\r\n\r\n private readonly goToIndex = (index: number): void => {\r\n this.setState({ activeIndex: index });\r\n };\r\n\r\n private readonly _refHandler = (index: number) => (divRef: HTMLDivElement) => {\r\n this._inlineZoomDivRef.set(index, divRef);\r\n };\r\n\r\n private _renderImageInlineOnZoom(image: Msdyn365.IImageData, imageSettings: Msdyn365.IImageSettings, index: number): React.ReactNode {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private _inlineZoomImageOnHover(event: React.MouseEvent): void {\r\n inlineZoomImageOnHover(event, String(defaultDataScale));\r\n }\r\n\r\n private _handleMobileViewZoomedImageClick(event: React.MouseEvent) {\r\n const target = event.currentTarget;\r\n const mobileZoomedInImageClassName = classnames('msc-mobile-zoomed-in', 'lobas-image-list__zoomed-in');\r\n if (!this.state.isMobileImageZoomed) {\r\n const bounds = target.getBoundingClientRect();\r\n const dataScale = Number(defaultDataScale);\r\n\r\n const positionX = event.clientX - bounds.left;\r\n const positionY = event.clientY - bounds.top;\r\n const scaledPositionX = positionX * dataScale;\r\n const scaledPositionY = positionY * dataScale;\r\n\r\n target.style.transform = `scale(${dataScale})`;\r\n target.classList.add(mobileZoomedInImageClassName);\r\n target.parentElement!.style.overflow = 'auto';\r\n target.parentElement!.scrollTo(scaledPositionX - positionX, scaledPositionY - positionY);\r\n this.setState({\r\n isMobileImageZoomed: true\r\n });\r\n } else {\r\n target.style.transform = '';\r\n target.classList.remove(mobileZoomedInImageClassName);\r\n target.parentElement!.style.overflow = '';\r\n this.setState({\r\n isMobileImageZoomed: false\r\n });\r\n }\r\n }\r\n\r\n private _onInlineImageClick(event: React.MouseEvent): void {\r\n if (window.innerWidth <= 768) {\r\n // $msv-breakpoint-m\r\n this._handleMobileViewZoomedImageClick(event);\r\n return;\r\n }\r\n inlineZoomInitClick(event, String(defaultDataScale));\r\n this.setState({\r\n isImageZoomed: true\r\n });\r\n }\r\n\r\n private _onImageMouseOut(event: React.MouseEvent): void {\r\n inlineZoomImageOnMouseOut(event);\r\n this.setState({\r\n isImageZoomed: false\r\n });\r\n }\r\n}\r\n\r\nexport default ImageList;\r\n","import React, { Component } from 'react';\r\nimport { IArticle } from '../../../actions/DataServiceEntities.g';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { ILobasArticleResources } from '../lobas-article.props.autogenerated';\r\nimport classNames from 'classnames';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport LobasImageList from './lobas-image-list';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nexport interface IArticleViewProps {\r\n article: IArticle;\r\n locale: string;\r\n resources: ILobasArticleResources;\r\n className: string;\r\n context: Msdyn365.ICoreContext;\r\n}\r\n\r\nclass ArticleView extends Component {\r\n private fixDateFormat(date: Date | undefined): String {\r\n if (!date) {\r\n return '';\r\n }\r\n\r\n const length = 10;\r\n return new Date(date).toLocaleDateString(this.props.locale).substring(0, length);\r\n }\r\n\r\n public render() {\r\n // const imagecontainer = this.renderImageSection();\r\n if (this.props.article) {\r\n return (\r\n
\r\n

{this.props.article.Title}

\r\n
\r\n {`${this.props.resources.articlePublishedDate} `}\r\n {`${this.fixDateFormat(this.props.article.DateReleased)}`}\r\n
\r\n
\r\n {this.props.article.Keywords?.split(',').map(kw => (\r\n // eslint-disable-next-line react/jsx-key\r\n

{kw}

\r\n ))}\r\n
\r\n {/* */}\r\n
\r\n {this.renderImageSection()}\r\n
\r\n );\r\n } else {\r\n return <>;\r\n }\r\n }\r\n\r\n private renderImageSection() {\r\n const images: Msdyn365.IImageData[] = ArrayExtensions.hasElements(this.props.article.MediaLocations)\r\n ? this.props.article.MediaLocations?.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Url\r\n };\r\n })\r\n : [];\r\n\r\n return ;\r\n }\r\n}\r\n\r\nexport default ArticleView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { ILobasArticleViewProps } from './lobas-article';\r\n//import { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport ArticleView from './components/articleView';\r\n\r\nconst LobasArticleView: React.FC = props => {\r\n if (props.data.articles.status === 'FAILED') {\r\n return (\r\n \r\n {props.resources.noArticleLabel}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default LobasArticleView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['lobas-article'] = {\n c: () => require('partner/modules/lobas-article/lobas-article.tsx'),\n $type: 'contentModule',\n da: [{name:'articles', path:'actions/get-article.action', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'lobas-article',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/lobas-article'\n });\n \n\n {\n const sanitizedActionPath = 'actions/get-article.action';\n let dataAction = require('partner/actions/get-article.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\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 export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|lobas-article|lobas-article'] = {\n c: () => require('partner/modules/lobas-article/lobas-article.view.tsx'),\n cn: '__local__-__local__-lobas-article'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["createObservableDataAction","action","retailAction","input","context","articleName","requestContext","url","requestUrl","pathname","split","at","undefined","createGetArticleByURLInput","LobasArticle","React","constructor","props","super","render","this","data","articles","result","viewProps","_objectSpread","articleViewProps","article","locale","request","resources","className","config","articleProps","moduleProps","tag","renderView","ImageList","_inlineZoomDivRef","Map","_renderImageListItems","imageList","images","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","disableLazyLoad","map","image","index","imageProps","gridSettings","imageSettings","Msdyn365","Object","assign","loadFailureBehavior","imageListView","imageListContainer","imageListItem","imageListItems","imageModal","Node","item","indexKey","src","key","_openModalDialog","_toggleModal","imageModalSlider","ZoomView","zoomedImageSettings","carouselprops","Carousel","classnames","items","_renderImageInlineOnZoom","activeIndex","state","next","previous","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","onIndicatorsClickHandler","goToIndex","showPaginationTooltip","hideIndicator","keyboard","handleOnExited","onExited","handleOnExiting","onExiting","isDisabledFunctionality","isMobileImageZoomed","carousel","imageModalSliderProps","modalIsOpen","ontoggle","galleryCarousel","classNames","ImagefullView","setState","animating","removeInlineZoomStyle","isLastItem","nextIndex","updateZoomedInImage","isFirstItem","length","_refHandler","divRef","set","bind","isImageZoomed","_onImageMouseOut","_inlineZoomImageOnHover","_onInlineImageClick","role","onClick","parentDiv","get","children","querySelector","removeAttribute","removeContainerZoomStyle","ref","defaultDataScale","actionContext","fallBackSrc","onMouseOver","id","shouldSkipToMainImage","imageFallbackOptimize","bypassHideOnFailure","onMouseMove","inlineZoomImageOnMouseMove","event","inlineZoomImageOnHover","String","_handleMobileViewZoomedImageClick","target","currentTarget","mobileZoomedInImageClassName","style","transform","classList","remove","parentElement","overflow","bounds","getBoundingClientRect","dataScale","Number","positionX","clientX","left","positionY","clientY","top","scaledPositionX","scaledPositionY","add","scrollTo","window","innerWidth","inlineZoomInitClick","inlineZoomImageOnMouseOut","ArticleView","Component","fixDateFormat","date","Date","toLocaleDateString","substring","_this$props$article$K","Title","articlePublishedDate","DateReleased","Keywords","kw","dangerouslySetInnerHTML","getRichTextHtml","Content","renderImageSection","_this$props$article$M","ArrayExtensions","MediaLocations","mediaLocation","Url","LobasImageList","status","Module","noArticleLabel","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}