{"version":3,"sources":["api/appProvider.js","constants/constants.js","reducers/mainUI.reducer.js","components/AtSpinner/index.jsx","components/Popup-Container/index.jsx","utils/hooks.js","components/ExplorugIframePopup/index.jsx","utils/domutils.js","components/PageFlip/index.js","components/Page-preview-bar/index.jsx","utils/utils.js","components/FullscreenButton/index.jsx","components/Knobs/index.jsx","reducers/overlayEditor.reducer.js","components/Overlay-div-editor/index.jsx","components/DraggableBox/index.jsx","components/Overlay-div-area/index.jsx","components/Flipbook-CustomRugs/index.jsx","components/Video-Player/index.jsx","components/OverlayVideos/index.js","components/MainPage/index.jsx","App.js","reportWebVitals.js","serviceWorkerRegistration.js","index.js"],"names":["cdnFolder","window","assetsDomain","publicURL","console","log","fullscreenbtnsrc","getImagesNameArray","totalPagesNum","arr","i","num","L","R","push","getThumbsNameArray","thumbName","createFilpBookConstants","res","constantsJson","FlipPageConstants","catalogName","catalogClassName","titleName","hasExplorugPopUp","explorugPopUpUrl","previewBarPosition","mainPageVideoPath","imageAssetsFolder","mainPageImagesPath","customCatalogImagesPath","catalog_eachPageSize","w","h","customCatalog_eachPageSize","totalPageNumber","totalPageNum","mainPageImages","customCatalogImages","mainPageThumbs","CustomCatalogPageThumbs","customCatalogThumbsPath","mainPageImages_text","mainPageCatalogImage","customCatalogImages_text","OverlayVideos","hasOverlayVideos","videos","customRugsLinks","textArr","length","textFileNames","Array","fill","forEach","element","index","parts","split","parseInt","side","toLowerCase","number","getImages_TextArray","UiStateContext","React","createContext","UiDispatchContext","SET_RUGINROOMPOPUP","SET_EXPLORUGPOPUP","SET_EXPLORUGPOPUPURL","SET_EXHIBITIONPOPUP","SET_EXHIBITIONPOPUPURL","SET_SHOWMAINPAGELOADING","SET_POPUPIFRAMEURL","SET_SHOWPOPUPIFRAME","SET_SHOWMOSAICDESIGNPOPUP","SET_MOSAICDESIGNURL","SET_SHOWCONTACTPOPUP","SET_MAILTO_EMAILADDRESS","SET_RUGINROOM_IFRAMELOADED","SET_PAGENUM","mainUiActions","initialUiState","showRugInRoomPopup","rugInRoomIframeLoaded","showExplorugPopup","getExplorugPopupUrl","showExhibitionPopup","exhibitionPopUpUrl","showMainPageLoading","popupIframeUrl","showPopupIframe","showMosaicDesignIframe","mosaicDesignUrl","allowPageFlipByArrowKey","showContactPopup","mailToEmailAddress","pageNum","mainUiReducer","state","action","type","payload","UiStateProvider","children","useReducer","dispatch","Provider","value","useUiState","context","useContext","undefined","Error","useUiDispatch","AtSpinner","props","className","size","AtSpinnerOverlay","show","useState","render","setRender","useEffect","classNames","style","animation","onAnimationEnd","defaultProps","PopupContainer","showIframePopup","iframeUrl","onLoad","onClose","iframeID","onIframeLoadSuccess","iframeContainerClassName","previousIframeUrl","ref","useRef","current","usePrevious","iframeLoaded","setIframeLoaded","onIframeClose","childWindow","document","getElementById","contentWindow","handler","message","source","data","addEventListener","removeEventListener","invisible","visible","onClick","e","target","indexOf","aria-label","id","src","title","frameBorder","allowFullScreen","ExplorugIframePopup","mainUiState","mainUIDispatch","onIframeLoad","Fragment","isMosaic","isAppleDevice","navigator","userAgent","includes","isTouchScreen","maxTouchPoints","test","substr","sendMessageToExplorugIframe","msg","iFrameID","iframeEl","postMessage","lastExplorugIframeDesign","postMessageToExplorugIframe","url","json","location","search","query","result","part","item","decodeURIComponent","getJsonFromUrl","triggeredDesign","initdesign","customclass","initvar","initview","customClassName","initDesignVariation","resetUI","setTimeout","Page","forwardRef","imageUrl","key","imageClassname","imageUrlPrefix","imgAltText","textOverlay","textOverlayClassName","alt","PageFlip","onFlip","onChangeOrientation","onChangeState","onInit","images","width","height","minWidth","maxWidth","minHeight","maxHeight","maxShadowOpacity","mobileScrollSupport","useportrait","showPageCorners","changePageWithArrowKey","startPage","disableFlipOnRandomClick","textsOverlays","arrowKeyPress","showCover","useWindowSize","windowWidth","windowHeight","useKey","nodeName","pageFlip","flipPrev","update","onFold","swipeDistance","map","PagePreviewBar","thumbs","handlePageThumbClick","currentPageNumber","flipPage","idleThresholdTime","showPreviewBar","setShowPreviewBar","thumbContainerRef","isIdle","useIdle","isActive","handleNavigator","direction","offsetValue","offsetWidth","scrollLeft","pullUp","hidden","alignLeft","scrollWidth","clientWidth","thumb","active","handleMainPageThumbClick","setPageDims","pageWidth","pageHeight","imageSize","FullscreenButton","containerref","useToggle","toggle","isFullscreen","useFullscreen","Knobs","handleActionKnobClick","pageElement","values","divElement","divIndex","Knob","page","left","Left","top","Top","Link","content","placement","hoverCloseDelay","inheritDarkTheme","EditorStateContext","EditorDispatchContext","SET_OVERLAYDIVLINKS","SET_EDITORMODE","mainEditorActions","initialEditorState","editorMode","links","mainEditorReducer","EditorStateProvider","useEditorState","useEditorDispatch","OverlayDivEditor","ChangeActiveDivValues","onOverlayDivsValueConfirm","activeDivValues","createNewDiv","onComplete","onDelete","editorState","label","placeholder","Width","onChange","val","Height","inputWid","EditableRow","labelWid","span","DraggableBox","offsetX","offsetY","mouseDown","move","el","pageX","pageY","onMouseDown","clientX","getBoundingClientRect","clientY","onMouseUp","OverlayDivArea","overlayDivHover","overlayMouseOut","onLinkClick","pageState","setActiveDivValues","setActive","showCanvas","setShowCanvas","setMouseDown","fabricCanvas","setFabricCanvas","overlayEditorDispatch","overlayEditorState","overlayDivRef","canvasSize","setCanvasSize","setCanvasHeight","JSON","parse","stringify","offsetHeight","addRectangle","rect","canvas","fabric","Canvas","percentStrToPxVal","percentStrToPx","Rect","angle","add","newDivElement","on","ev","scaleX","scaleY","totalWid","totalHgt","divElem_","px_w","parseFloat","px_h","px_l","px_t","pxToPercentStr","percent_w","Math","round","percent_h","percent_l","percent_t","disposeFabricCanvas","dispose","err","error","Number","card","Card","activeDiv","link","open","stopPropagation","handleOverlayDivClick","onMouseEnter","onMouseOut","onMouseMove","wid","hgt","currentPageElement","filter","splice","Flipbook","showCustomRugs","customRugsRef","setPageState","setCurrentPageNumber","pageSize","setPageSize","pageDims","replace","hideCustomCatalog","onFlipBookClick","pageNUM","getCurrentPageIndex","getSettings","flipController","showCorner","barClassName","previewbarClassname","turnToPage","pageRef","flipNext","pageNumber","VideoPlayer","pauseVideo","videoType","vidRef","pause","play","autoPlay","muted","loop","playPromise","then","catch","imageSrc","videoSrc","shown","MainPage","mainPageRef","setShowCustomRugs","animate","setAnimate","handleKeyDown","history","pushState","onpopstate","event","resizeEvent","createEvent","initUIEvent","dispatchEvent","triggerWindowResize","preventDefault","keyCode","Helmet","display","innerWidth","video","App","flipbookConstantsLoaded","setFlipbookConstantsLoaded","Promise","resolve","reject","fetchJsonp","jsonpCallbackFunction","response","ex","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","isLocalhost","Boolean","hostname","match","registerValidSW","swUrl","config","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","onUpdate","onSuccess","ReactDOM","StrictMode","URL","process","href","origin","fetch","headers","contentType","get","status","ready","unregister","reload","checkValidServiceWorker","serviceWorkerRegistration"],"mappings":"iUAEMA,EAAWC,OAAOD,WAAa,MAKxBE,EAAmC,KAApBD,OAAOE,UAAkB,WAAa,qCAAqCH,EAAU,UACjHI,QAAQC,IAAI,eAAgBH,EAAcD,OAAOE,W,qBCLpCG,EAAmB,CAAC,GAAD,OAC3BJ,EAD2B,yCAE3BA,EAF2B,+BAM1BK,EAAqB,SAACC,GAE1B,IADA,IAAIC,EAAM,GACDC,EAAI,EAAGA,GAAKF,EAAeE,IAAK,CACvC,IAAIC,EAAMD,EAAI,GAAK,IAAMA,EAAIA,EACvBE,EAAID,EAAM,WACVE,EAAIF,EAAM,WAChBF,EAAIK,KAAKF,GACTH,EAAIK,KAAKD,GAEX,OAAOJ,GAEHM,EAAqB,SAACP,GAE1B,IADA,IAAIC,EAAM,GACDC,EAAI,EAAGA,GAAKF,EAAeE,IAAK,CACvC,IACMM,GADIN,EAAI,GAAK,IAAMA,EAAIA,GACL,OACxBD,EAAIK,KAAKE,GAEX,OAAOP,GAkDHQ,EAA0B,SAACC,GAC/B,IA/B8BC,EA+BxBC,EA9BoB,CACxBC,YAAa,eAFeF,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AS,CAAE,iBAAkB,YAE5BpE,MAAK,SAACkC,GAEL,IAAMmC,EAAcnC,EAASkC,QAAQE,IAAI,gBAEnB,MAApBpC,EAASqC,QACO,MAAfF,IAA8D,IAAvCA,EAAYtW,QAAQ,cAG5Cc,UAAUsU,cAAcqB,MAAMxE,MAAK,SAACqD,GAClCA,EAAaoB,aAAazE,MAAK,WAC7Blc,OAAO+L,SAAS6U,eAKpB1B,GAAgBC,EAAOC,MAG1BjD,OAAM,WACLhc,QAAQC,IAAI,oEAtFVygB,CAAwB1B,EAAOC,GAI/BrU,UAAUsU,cAAcqB,MAAMxE,MAAK,WACjC/b,QAAQC,IACN,+GAMJ8e,GAAgBC,EAAOC,OCxB/B0B,GAKAxC,O","file":"static/js/main.c732d852.chunk.js","sourcesContent":["// import cdnFolder from '../constants/constants';\r\n\r\nconst cdnFolder= window.cdnFolder || \"HRI\"; //\"CustomRugs\"\r\n\r\nexport const domain = `https://v3.explorug.com`;\r\nexport const explorugLinkDomain = \"https://v3.explorug.com/\"; //\"https://v3dev.explorug.com/build/\"; // \r\n\r\nexport const assetsDomain = window.publicURL ==='' ? './Assets' : 'https://cdn.explorug.com/catalogs/'+cdnFolder+'/Assets'; //'https://cdn.explorug.com/scripts/catalogs/CustomRugs/Assets'; //'./Assets'; \r\nconsole.log(\"assetsDomain\", assetsDomain, window.publicURL)\r\n","import { assetsDomain } from \"../api/appProvider\";\r\nimport fetchJsonp from \"fetch-jsonp\";\r\n\r\nexport const fullscreenbtnsrc = [\r\n `${assetsDomain}/icons/enter-fullscreen.svg`,\r\n `${assetsDomain}/icons/exit-fullscreen.svg`,\r\n];\r\n\r\nvar FlipPageConstants;\r\nconst getImagesNameArray = (totalPagesNum) => {\r\n let arr = [];\r\n for (var i = 1; i <= totalPagesNum; i++) {\r\n let num = i < 10 ? \"0\" + i : i;\r\n const L = num + \" - L.jpg\";\r\n const R = num + \" - R.jpg\";\r\n arr.push(L);\r\n arr.push(R);\r\n }\r\n return arr;\r\n};\r\nconst getThumbsNameArray = (totalPagesNum) => {\r\n let arr = [];\r\n for (var i = 1; i <= totalPagesNum; i++) {\r\n let num = i < 10 ? \"0\" + i : i;\r\n const thumbName = num + \".jpg\";\r\n arr.push(thumbName);\r\n }\r\n return arr;\r\n};\r\nconst getImages_TextArray = ({ textArr, totalPageNum }) => {\r\n if (!textArr || !textArr.length) return [];\r\n let textFileNames = new Array(totalPageNum * 2).fill(\"\");\r\n if (textArr && textArr.length) {\r\n textArr.forEach((element, index) => {\r\n const parts = element.split(\"-\");\r\n if (parts.length > 1) {\r\n const num = parseInt(parts[0]);\r\n let side = parts[1]?.toLowerCase() === \"l\" ? \"L\" : \"R\";\r\n const index = side === \"L\" ? (num - 1) * 2 : (num - 1) * 2 + 1;\r\n const number = num > 9 ? num : \"0\" + num;\r\n textFileNames[index] = number + \" - \" + side + \"_Text.png\";\r\n }\r\n });\r\n }\r\n return textFileNames;\r\n};\r\n\r\nconst buildFlipbookConstants = (constantsJson) => {\r\n const flipbookConstants = {\r\n catalogName: \"at-catalog \" + constantsJson.catalogClassName || \"\",\r\n titleName: constantsJson.catalogName + \" Interactive Catalog\",\r\n hasExplorugPopUp: false,\r\n explorugPopUpUrl: \"\",\r\n previewBarPosition: constantsJson.previewBarPosition,\r\n mainPageVideoPath: constantsJson.imageAssetsFolder + `/videos/Flip Catalog Cover.mp4`,\r\n mainPageImagesPath: constantsJson.imageAssetsFolder + \"/mainPages/\",\r\n customCatalogImagesPath: constantsJson.imageAssetsFolder + \"/pages/\",\r\n catalog_eachPageSize: constantsJson.catalog_eachPageSize || { w: 1920, h: 2160 },\r\n customCatalog_eachPageSize: constantsJson.customCatalog_eachPageSize || { w: 1241, h: 1749 },\r\n totalPageNumber: constantsJson.totalPageNum,\r\n mainPageImages: [\"00 - L.jpg\", \"00 - R.jpg\"],\r\n customCatalogImages: getImagesNameArray(constantsJson.totalPageNum),\r\n mainPageThumbs: [],\r\n CustomCatalogPageThumbs: getThumbsNameArray(constantsJson.totalPageNum),\r\n customCatalogThumbsPath: constantsJson.imageAssetsFolder + `/thumbs/`,\r\n mainPageImages_text: constantsJson.mainPageImages_text || [],\r\n mainPageCatalogImage: constantsJson.imageAssetsFolder + \"/mainPages/01.jpg\",\r\n customCatalogImages_text: constantsJson.customCatalogImages_text || [],\r\n OverlayVideos: constantsJson.OverlayVideos || {\r\n hasOverlayVideos: false,\r\n videos: [],\r\n },\r\n customRugsLinks: constantsJson.customRugsLinks,\r\n };\r\n return flipbookConstants;\r\n};\r\n\r\nconst createFilpBookConstants = (res) => {\r\n const FlipPageConstants = buildFlipbookConstants(res);\r\n FlipPageConstants.mainPageVideoPath = assetsDomain + \"/\" + FlipPageConstants.mainPageVideoPath;\r\n FlipPageConstants.mainPageImagesPath = assetsDomain + \"/\" + FlipPageConstants.mainPageImagesPath;\r\n FlipPageConstants.customCatalogImagesPath = assetsDomain + \"/\" + FlipPageConstants.customCatalogImagesPath;\r\n FlipPageConstants.customCatalogThumbsPath = assetsDomain + \"/\" + FlipPageConstants.customCatalogThumbsPath;\r\n FlipPageConstants.mainPageCatalogImage = assetsDomain + \"/\" + FlipPageConstants.mainPageCatalogImage;\r\n\r\n FlipPageConstants.customCatalogImages_text = getImages_TextArray({\r\n textArr: FlipPageConstants.customCatalogImages_text,\r\n totalPageNum: FlipPageConstants.totalPageNumber,\r\n });\r\n window.FlipPageConstants = FlipPageConstants;\r\n console.log(\"-----FlipPageConstants----\", FlipPageConstants);\r\n return FlipPageConstants;\r\n};\r\nexport const loadPageData = () => {\r\n return new Promise((resolve, reject) => {\r\n fetchJsonp(assetsDomain + \"/js/flipbook-Constants.js\", {\r\n jsonpCallbackFunction: \"getConstants\",\r\n })\r\n .then(function (response) {\r\n return response.json();\r\n })\r\n .then(function (json) {\r\n console.log(\"parsed json\", json);\r\n const FlipPageConstants = createFilpBookConstants(json);\r\n resolve(FlipPageConstants);\r\n })\r\n .catch(function (ex) {\r\n console.log(\"parsing failed\", ex);\r\n reject(ex);\r\n });\r\n\r\n // fetch(\"./Assets/js/flipbook-Constants.json\")\r\n // .then((res) => res.json())\r\n // .then((res) => {\r\n // });\r\n });\r\n};\r\n\r\nexport default FlipPageConstants;\r\n","import React from \"react\";\r\n\r\nimport FlipPageConstants from \"../constants/constants\";\r\n\r\nconst UiStateContext = React.createContext();\r\nconst UiDispatchContext = React.createContext();\r\n\r\nconst SET_RUGINROOMPOPUP = \"SET_RUGINROOMPOPUP\";\r\nconst SET_EXPLORUGPOPUP = \"SET_EXPLORUGPOPUP\";\r\nconst SET_EXPLORUGPOPUPURL = \"SET_EXPLORUGPOPUPURL\";\r\nconst SET_EXHIBITIONPOPUP = \"SET_EXHIBITIONPOPUP\";\r\nconst SET_EXHIBITIONPOPUPURL = \"SET_EXHIBITIONPOPUPURL\";\r\nconst SET_SHOWMAINPAGELOADING = \"SET_SHOWMAINPAGELOADING\";\r\nconst SET_POPUPIFRAMEURL = \"SET_POPUPIFRAMEURL\";\r\nconst SET_SHOWPOPUPIFRAME = \"SET_SHOWPOPUPIFRAME\";\r\nconst SET_SHOWMOSAICDESIGNPOPUP = \"SET_SHOWMOSAICDESIGNPOPUP\";\r\nconst SET_MOSAICDESIGNURL = \"SET_MOSAICDESIGNURL\";\r\nconst SET_SHOWCONTACTPOPUP = \"SET_SHOWCONTACTPOPUP\";\r\nconst SET_ALLOW_PAGEFLIP_BYARROWKEY = \"SET_ALLOW_PAGEFLIP_BYARROWKEY\";\r\nconst SET_MAILTO_EMAILADDRESS = \"SET_MAILTO_EMAILADDRESS\";\r\nconst SET_RUGINROOM_IFRAMELOADED = \"SET_RUGINROOM_IFRAMELOADED\";\r\nconst SET_PAGENUM = \"SET_PAGENUM\";\r\n\r\nconst mainUiActions = {\r\n SET_RUGINROOMPOPUP,\r\n SET_EXPLORUGPOPUP,\r\n SET_EXPLORUGPOPUPURL,\r\n SET_EXHIBITIONPOPUP,\r\n SET_EXHIBITIONPOPUPURL,\r\n SET_SHOWMAINPAGELOADING,\r\n SET_POPUPIFRAMEURL,\r\n SET_SHOWPOPUPIFRAME,\r\n SET_SHOWMOSAICDESIGNPOPUP,\r\n SET_MOSAICDESIGNURL,\r\n SET_ALLOW_PAGEFLIP_BYARROWKEY,\r\n SET_SHOWCONTACTPOPUP,\r\n SET_MAILTO_EMAILADDRESS,\r\n SET_RUGINROOM_IFRAMELOADED,\r\n SET_PAGENUM\r\n};\r\nconst getExplorugPopupUrl =()=>{\r\n let explorugPopUpUrl='';\r\n const hasExplorugPopUp = FlipPageConstants && FlipPageConstants.hasExplorugPopUp \r\n if(hasExplorugPopUp){\r\n explorugPopUpUrl = FlipPageConstants.explorugPopUpUrl && FlipPageConstants.explorugPopUpUrl!=='' ? FlipPageConstants.explorugPopUpUrl: explorugPopUpUrl\r\n }\r\n return explorugPopUpUrl;\r\n}\r\nconst initialUiState = {\r\n showRugInRoomPopup: false,\r\n rugInRoomIframeLoaded: false,\r\n showExplorugPopup: false,\r\n explorugPopUpUrl: getExplorugPopupUrl(),\r\n //\"https://v3dev.explorug.com/build/explorug.html?page=beyonddreams2&?&initdesign=Designs/Artwork/Bamboo.ctf&mode=ecat&customclass=no-color-customization\"\r\n //\"https://v3dev.explorug.com/build/explorug.html?page=beyonddreams2&?&initdesign=Designs/Artwork/Assorted Design/Tappeto Classico.ctf&mode=ecat&customclass=no-color-cust selected-views-only view-tappeto\",\r\n //\"http://localhost:23456/?page=beyonddreams2\",\r\n //\"https://v3.explorug.com/explorug.html?page=beyonddreams&mode=ecat&initdesign=2021%20EPI2/designs/Distant%20Waves\",\r\n //\"https://v3.explorug.com/explorug.html?page=dgd&mode=ecat&initdesign=PLAID%20A%20LIGHT%20GREY&initview=Lounge\",\r\n\r\n showExhibitionPopup: false,\r\n exhibitionPopUpUrl: \"\",\r\n showMainPageLoading: true,\r\n popupIframeUrl: \"\",\r\n showPopupIframe: false,\r\n showMosaicDesignIframe: false,\r\n mosaicDesignUrl: \"\",\r\n allowPageFlipByArrowKey: true,\r\n showContactPopup: false,\r\n mailToEmailAddress: \"\",\r\n pageNum:1\r\n\r\n //\"https://v3.explorug.com/explorug.html?page=beyonddreams2&initdesign=Designs/Artwork/Assorted%20Design/Tappeto%20Classico.ctf&mode=ecat&customclass=no-color-cust\"\r\n};\r\nconst mainUiReducer = (state, action) => {\r\n const { type, payload } = action;\r\n // console.log(type)\r\n switch (type) {\r\n case SET_RUGINROOMPOPUP:\r\n return { ...state, showRugInRoomPopup: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_EXPLORUGPOPUP:\r\n return { ...state, showExplorugPopup: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_EXPLORUGPOPUPURL:\r\n return { ...state, explorugPopUpUrl: payload };\r\n case SET_EXHIBITIONPOPUP:\r\n return { ...state, showExhibitionPopup: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_EXHIBITIONPOPUPURL:\r\n return { ...state, exhibitionPopUpUrl: payload };\r\n case SET_SHOWMAINPAGELOADING:\r\n return { ...state, showMainPageLoading: payload };\r\n case SET_POPUPIFRAMEURL:\r\n return { ...state, popupIframeUrl: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_SHOWPOPUPIFRAME:\r\n return { ...state, showPopupIframe: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_SHOWMOSAICDESIGNPOPUP:\r\n return { ...state, showMosaicDesignIframe: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_MOSAICDESIGNURL:\r\n return { ...state, mosaicDesignUrl: payload };\r\n case SET_SHOWCONTACTPOPUP:\r\n return { ...state, showContactPopup: payload, allowPageFlipByArrowKey: !payload };\r\n case SET_MAILTO_EMAILADDRESS:\r\n return { ...state, mailToEmailAddress: payload };\r\n case SET_RUGINROOM_IFRAMELOADED:\r\n return { ...state, rugInRoomIframeLoaded: payload };\r\n case SET_PAGENUM:\r\n return {...state, pageNum: payload}\r\n default:\r\n return state;\r\n }\r\n};\r\nfunction UiStateProvider({ children }) {\r\n const [state, dispatch] = React.useReducer(mainUiReducer, initialUiState);\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\nfunction useUiState() {\r\n const context = React.useContext(UiStateContext);\r\n if (context === undefined) {\r\n throw new Error(\"useCountState must be used within a CountProvider\");\r\n }\r\n return context;\r\n}\r\nfunction useUiDispatch() {\r\n const context = React.useContext(UiDispatchContext);\r\n if (context === undefined) {\r\n throw new Error(\"useCountDispatch must be used within a CountProvider\");\r\n }\r\n return context;\r\n}\r\nexport { UiStateProvider, useUiState, useUiDispatch, mainUiActions };\r\n","import React, { useState, useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport classNames from \"classnames\";\r\n\r\nconst AtSpinner = props => {\r\n const { className, size = \"lg\" } = props;\r\n return
;\r\n};\r\nconst AtSpinnerOverlay = props => {\r\n const { show, className='' } = props;\r\n const [render, setRender] = useState(show);\r\n\r\n useEffect(() => {\r\n if (show) setRender(true);\r\n }, [show]);\r\n\r\n const onAnimationEnd = () => {\r\n if (!show) setRender(false);\r\n };\r\n\r\n return (\r\n render && (\r\n \r\n {show && }\r\n \r\n )\r\n );\r\n};\r\nAtSpinner.propTypes = {\r\n className: PropTypes.string\r\n};\r\nAtSpinner.defaultProps = {\r\n className: \"\"\r\n};\r\n// const DebouncedAtSpinnerOverlay = debounceRender(AtSpinnerOverlay, 1000);\r\n\r\nexport { AtSpinner, AtSpinnerOverlay };\r\n","import classNames from \"classnames\";\r\nimport React, { PropTypes, useEffect, useState } from \"react\";\r\nimport { usePrevious } from \"../../utils/hooks\";\r\nimport { AtSpinner, AtSpinnerOverlay } from \"../AtSpinner\";\r\n\r\nconst PopupContainer = (props) => {\r\n const { showIframePopup = false, \r\n iframeUrl = \"\", \r\n onLoad, onClose, \r\n iframeID=\"popupIframe\", \r\n onIframeLoadSuccess, className='', iframeContainerClassName ='' } = props;\r\n\r\n const previousIframeUrl = usePrevious(iframeUrl);\r\n \r\n const [iframeLoaded, setIframeLoaded] = useState(false);\r\n const onIframeClick = (e) => {\r\n if(!e.target.className || typeof e.target.className!=='string') return;\r\n \r\n const target = e.target.className.indexOf(\"bd-popup-wrapper\");\r\n if (target === 0) {\r\n onIframeClose();\r\n }\r\n };\r\n\r\n const onIframeLoad = () => {\r\n setIframeLoaded(true);\r\n if (onLoad) onLoad();\r\n };\r\n const onIframeClose = () => {\r\n if (onClose) onClose();\r\n };\r\n useEffect(() => {\r\n //console.log(\"iframeUrl\", iframeUrl, \"previousIframeUrl\", previousIframeUrl);\r\n if (iframeUrl !== previousIframeUrl) {\r\n setIframeLoaded(false);\r\n }\r\n }, [iframeUrl]);\r\n\r\n \r\n\r\n useEffect(() => {\r\n if(!onIframeLoadSuccess) return;\r\n\r\n const childWindow = document.getElementById(iframeID).contentWindow;\r\n \r\n const handler = message => {\r\n\r\n //console.log(\"useEffect -> message.source !== childWindow\", iframeID, message.source === childWindow, message)\r\n \r\n if (message.source !== childWindow) {\r\n return; // Skip message in this event listener\r\n }\r\n console.log(\"useEffect -> message.data\", message.data)\r\n \r\n if (message.data === \"success\" || message.data === \"explorug loaded\" ) {\r\n if(onIframeLoadSuccess) onIframeLoadSuccess();\r\n }\r\n\r\n }\r\n window.addEventListener(\"message\", handler);\r\n // clean up\r\n return () => window.removeEventListener(\"message\", handler);\r\n }, []); // empty array => run only once\r\n\r\n return (\r\n \r\n
\r\n \r\n {}\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nPopupContainer.propTypes = {};\r\n\r\nexport default PopupContainer;\r\n","\r\nimport React from 'react';\r\nimport { useEffect, useRef } from \"react\";\r\n\r\nexport function usePrevious(value) {\r\n const ref = useRef(null);\r\n useEffect(() => {\r\n ref.current = value;\r\n }, [value]);\r\n return ref.current;\r\n}\r\n\r\nexport function useDoubleClick(callback) {\r\n /** callback ref Pattern **/\r\n const [elem, setElem] = React.useState(null)\r\n const callbackRef = React.useCallback(node => {\r\n setElem(node)\r\n callbackRef.current = node\r\n }, [])\r\n\r\n React.useEffect(() => {\r\n inputCallbackRef.current = callback\r\n })\r\n\r\n const countRef = React.useRef(0)\r\n/** Refs for the timer **/\r\n const timerRef = React.useRef(null)\r\n/**Input callback Ref for callback passed **/\r\n const inputCallbackRef = React.useRef(null)\r\n \r\n React.useEffect(() => {\r\n function handler() {\r\n const isDoubleClick = countRef.current + 1 === 2\r\n const timerIsPresent = timerRef.current\r\n if (timerIsPresent && isDoubleClick) {\r\n \r\n clearTimeout(timerRef.current)\r\n timerRef.current = null\r\n countRef.current = 0\r\n if (inputCallbackRef.current) {\r\n inputCallbackRef.current()\r\n }\r\n }\r\n if (!timerIsPresent) {\r\n countRef.current = countRef.current + 1\r\n const timer = setTimeout(() => {\r\n clearTimeout(timerRef.current)\r\n timerRef.current = null\r\n countRef.current = 0\r\n }, 300)\r\n timerRef.current = timer\r\n }\r\n }\r\n if (elem) {\r\n elem.addEventListener('click', handler)\r\n }\r\n return () => {\r\n if (elem) {\r\n elem.removeEventListener('click', handler)\r\n }\r\n }\r\n }, [elem])\r\n\r\n return [callbackRef, elem]\r\n}","import React, { PropTypes } from 'react';\r\nimport { mainUiActions, useUiDispatch, useUiState } from '../../reducers/mainUI.reducer';\r\nimport PopupContainer from '../Popup-Container';\r\n\r\nconst ExplorugIframePopup = props => {\r\n \r\n const { iframeID = \"explorugIframe\"} = props;\r\n const mainUiState = useUiState();\r\n const mainUIDispatch = useUiDispatch();\r\n \r\n const onIframeLoad = () => {\r\n console.log(\"loaded.....explorugIframe...... iframe\");\r\n mainUIDispatch({\r\n type: mainUiActions.SET_SHOWMAINPAGELOADING,\r\n payload: false,\r\n });\r\n };\r\n\r\n const onPopupClose=(e)=>{\r\n mainUIDispatch({\r\n type: mainUiActions.SET_EXPLORUGPOPUP,\r\n payload: false\r\n })\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nExplorugIframePopup.propTypes = {\r\n \r\n};\r\n\r\nexport default ExplorugIframePopup;","\r\nexport const isAppleDevice = navigator.userAgent.includes(\"Mac\");\r\nexport const isTouchScreen = navigator.maxTouchPoints >= 1;\r\nexport const isMobileDevice =\r\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iPhone|iPod|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)vodafone|wap|windows (ce|phone)|xda|xiino/i.test(\r\n navigator.userAgent\r\n ) ||\r\n (isAppleDevice && isTouchScreen) ||\r\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\r\n navigator.userAgent.substr(0, 4)\r\n );\r\n\r\nfunction isTouchEvent(event) {\r\n return event.nativeEvent.type === \"touchstart\" || event.nativeEvent.type === \"touchmove\";\r\n}\r\nexport const getTouchedPoints = ({ e, parentId = \"\" }) => {\r\n let { clientX, clientY } = isTouchEvent(e) ? e.nativeEvent.targetTouches[0] : e;\r\n if (parentId === \"\")\r\n //with respect to page\r\n return { clientX, clientY };\r\n else {\r\n const { left, top } = document.getElementById(parentId).getBoundingClientRect();\r\n const { x, y } = { x: clientX - left, y: clientY - top };\r\n return { clientX: x, clientY: y };\r\n }\r\n};\r\nexport const getTouchedPointSide = ({ e, parentId = \"\" }) => {\r\n if (parentId === \"\") {\r\n return { hor: \"\", ver: \"\" };\r\n }\r\n const { clientX, clientY } = getTouchedPoints({ e, parentId });\r\n const { width, height } = document.getElementById(parentId).getBoundingClientRect();\r\n\r\n let hor = clientX > width / 2 ? \"right\" : \"left\";\r\n let ver = clientY > height / 2 ? \"bottom\" : \"top\";\r\n return { hor, ver };\r\n};\r\n\r\nexport const getTranslateXY = (querySelector = \"\") => {\r\n if (querySelector === \"\") return;\r\n var matrix = window.getComputedStyle(document.querySelector(querySelector)).transform || \"\";\r\n var x = 0,\r\n y = 0;\r\n if (matrix !== \"\") {\r\n var matrixValues = matrix.match(/matrix.*\\((.+)\\)/)[1].split(\", \");\r\n x = parseFloat(matrixValues[4])||0;\r\n y = parseFloat(matrixValues[5])||0;\r\n }\r\n return { translateX: x, translateY: y };\r\n};\r\nexport const readImage = (url, i) => {\r\n let imageUrl = url;\r\n if (url instanceof Blob) {\r\n imageUrl = URL.createObjectURL(url);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let image = new Image();\r\n image.crossOrigin = \"Anonymous\";\r\n image.src = imageUrl;\r\n image.onload = () => {\r\n if (i) resolve({ image, ...i });\r\n else resolve(image);\r\n };\r\n image.onerror = reject;\r\n });\r\n};\r\n\r\nexport const getFromSessionStorage = (key) => {\r\n const item = sessionStorage.getItem(key);\r\n if (item === \"undefined\") return undefined;\r\n if (item === \"null\") return null;\r\n try {\r\n return JSON.parse(item);\r\n } catch (error) {\r\n return item;\r\n }\r\n};\r\n\r\n export const getJsonFromUrl = (url) =>{\r\n if (!url) url = window.location.search;\r\n var query = url.substr(1);\r\n var result = {};\r\n query.split(\"&\").forEach(function (part) {\r\n var item = part.split(\"=\");\r\n result[item[0]] = decodeURIComponent(item[1]);\r\n });\r\n return result;\r\n }\r\n\r\n \r\n var sendMessageToExplorugIframe = function (msg, iFrameID = 'explorugIframe') {\r\n console.log(\"sendMessageToExplorugIframe -> msg\", msg)\r\n // Make sure you are sending a string, and to stringify JSON\r\n var iframeEl = document.getElementById(iFrameID);\r\n iframeEl.contentWindow.postMessage(msg, \"*\");\r\n };\r\n\r\n var lastExplorugIframeDesign = ''\r\n export const postMessageToExplorugIframe = (url)=>{\r\n const json = getJsonFromUrl(url);\r\n const triggeredDesign = json.initdesign;\r\n const customclass = json.customclass || '';\r\n const props = json.props ||'';\r\n const initvar = json.initvar||'original';\r\n const initview = json.initview;\r\n const resetUI = true\r\n var msg = { \r\n triggeredDesign: triggeredDesign, \r\n customClassName: customclass, \r\n initDesignVariation:initvar,\r\n resetUI: resetUI,\r\n props:props,\r\n initview\r\n }\r\n var iFrameID = 'explorugIframe'; \r\n if (triggeredDesign && lastExplorugIframeDesign !== triggeredDesign) {\r\n lastExplorugIframeDesign = triggeredDesign;\r\n\r\n if (initvar !== \"original\") {\r\n msg.initDesignVariation = \"original\";\r\n msg.initview = \"\";\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n setTimeout(() => {\r\n msg.initDesignVariation = initvar;\r\n msg.initview = '';\r\n console.log('call initvar with \"\" view', msg.initview);\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n if(initview!==''){\r\n setTimeout(()=>{\r\n msg.initview = initview;\r\n console.log('call initvar with '+initview+' view');\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n },1500)\r\n }\r\n }, 1000);\r\n } else {\r\n if(initview!==''){\r\n msg.initview = '';\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n setTimeout(()=>{\r\n msg.initview = initview;\r\n console.log('call with '+initview+' view');\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n },1500)\r\n }\r\n else{\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n }\r\n }\r\n } else {\r\n // if (customdesignurl && initview === \"\") {\r\n // console.log(\"custom desgin \", customdesignurl, \"cannot be open without passing room name.\");\r\n // }\r\n sendMessageToExplorugIframe(msg,iFrameID);\r\n } \r\n }\r\n \r\n","import React, { useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { useKey, useWindowSize } from \"react-use\";\r\nimport HTMLFlipBook from \"react-pageflip\";\r\nimport classNames from \"classnames\";\r\n//import PageHtml from \"../PageHtml\";\r\n\r\nconst Page = React.forwardRef((props, ref) => {\r\n const { id = \"\", key, imageUrl, imageClassname = \"\", imageUrlPrefix = \"\", imgAltText = \"\", textOverlay, textOverlayClassName=\"\" } = props;\r\n return (\r\n
\r\n {imgAltText}\r\n {textOverlay && (\r\n \r\n )}\r\n
\r\n );\r\n});\r\n\r\nconst PageHTML = React.forwardRef((props, ref) => {\r\n return (\r\n
\r\n

Page Header

\r\n

{props.children}

\r\n

Page number: {props.number}

\r\n
\r\n );\r\n});\r\n\r\nconst PageFlip = React.forwardRef((props, ref) => {\r\n const {\r\n className,\r\n onFlip,\r\n onChangeOrientation,\r\n onChangeState,\r\n onInit,\r\n images = [],\r\n width,\r\n height,\r\n minWidth,\r\n maxWidth,\r\n minHeight,\r\n maxHeight,\r\n maxShadowOpacity = 0.5,\r\n mobileScrollSupport = true,\r\n useportrait = false,\r\n showPageCorners = true,\r\n imageClassname='',\r\n imageUrlPrefix,\r\n imgAltText,\r\n changePageWithArrowKey,\r\n startPage = 0,\r\n disableFlipOnRandomClick = true,\r\n textsOverlays = [],\r\n arrowKeyPress,\r\n showCover\r\n } = props;\r\n \r\n const { width: windowWidth, height: windowHeight } = useWindowSize();\r\n\r\n useKey(\"ArrowRight\", (e) => {\r\n if(changePageWithArrowKey && e.target.nodeName!==\"INPUT\" && arrowKeyPress){\r\n arrowKeyPress(e,'next');\r\n }\r\n\r\n // if (changePageWithArrowKey && ref.current && e.target.nodeName !== \"INPUT\" && mainUiState.allowPageFlipByArrowKey)\r\n // ref.current.pageFlip().flipNext();\r\n \r\n });\r\n\r\n useKey(\"ArrowLeft\", (e) => {\r\n if (changePageWithArrowKey && ref.current && e.target.nodeName !== \"INPUT\")\r\n ref.current.pageFlip().flipPrev();\r\n });\r\n\r\n useKey(\"ArrowUp\", () => {\r\n if (ref.current) {\r\n ref.current.pageFlip().update();\r\n }\r\n });\r\n useEffect(() => {\r\n if (!ref) return;\r\n setTimeout(() => {\r\n if(ref.current)\r\n ref.current.pageFlip().update();\r\n }, 200); \r\n }, [windowWidth, windowHeight]);\r\n\r\n const handlePageStateChange = (e) => {\r\n if (onChangeState) onChangeState(e);\r\n };\r\n const onPageInit = (e) => {\r\n if (onInit) onInit(e);\r\n };\r\n return (\r\n \r\n (onFlip ? onFlip(e) : null)}\r\n onFold={(e) => console.log(\"flip\", e)}\r\n onChangeOrientation={(e) => {\r\n if (onChangeOrientation) onChangeOrientation(e);\r\n }}\r\n onChangeState={handlePageStateChange}\r\n onInit={onPageInit}\r\n ref={ref}\r\n //showPageCorners={false}\r\n swipeDistance={10}\r\n startPage={startPage}\r\n showCover={showCover}\r\n >\r\n {images &&\r\n images.map((imageUrl, index) => (\r\n 0 && textsOverlays[index] && textsOverlays[index] !== \"\"\r\n ? textsOverlays[index]\r\n : null\r\n }\r\n textOverlayClassName=\"text_overlay\"\r\n >\r\n\r\n ))}\r\n \r\n\r\n {disableFlipOnRandomClick &&
}\r\n
\r\n );\r\n});\r\n\r\nPageFlip.propTypes = {\r\n className: PropTypes.string,\r\n onFlip: PropTypes.func,\r\n onChangeOrientation: PropTypes.func,\r\n onChangeState: PropTypes.func,\r\n images: PropTypes.array,\r\n width: PropTypes.number,\r\n height: PropTypes.number,\r\n minWidth: PropTypes.number,\r\n maxWidth: PropTypes.number,\r\n minHeight: PropTypes.number,\r\n maxHeight: PropTypes.number,\r\n maxShadowOpacity: PropTypes.number,\r\n mobileScrollSupport: PropTypes.bool,\r\n useportrait: PropTypes.bool,\r\n imageClassname: PropTypes.string,\r\n imageUrlPrefix: PropTypes.string,\r\n imgAltText: PropTypes.string,\r\n changePageWithArrowKey: PropTypes.bool,\r\n};\r\n\r\nexport default PageFlip;\r\n","import classNames from \"classnames\";\r\nimport React, { useEffect, useRef, useState } from \"react\";\r\nimport { useIdle } from \"react-use\";\r\nimport { assetsDomain } from \"../../api/appProvider\";\r\n//import FlipPageConstants from \"../../constants/constants\";\r\n\r\nconst PagePreviewBar = (props) => {\r\n const { thumbs, handlePageThumbClick, currentPageNumber, flipPage, className, idleThresholdTime = 10000 } = props;\r\n const [showPreviewBar, setShowPreviewBar] = useState(false);\r\n const thumbContainerRef = useRef(null);\r\n\r\n const isIdle = useIdle(idleThresholdTime, false, [\r\n \"mousemove\",\r\n \"mousedown\",\r\n \"resize\",\r\n \"keydown\",\r\n \"touchstart\",\r\n \"wheel\",\r\n ]);\r\n const FlipPageConstants = window.FlipPageConstants;\r\n\r\n useEffect(() => {\r\n if (isIdle && showPreviewBar) setShowPreviewBar(!showPreviewBar);\r\n }, [isIdle]);\r\n const handleToggleIcon = () => {\r\n setShowPreviewBar(!showPreviewBar);\r\n };\r\n const handleMainPageThumbClick = (index) => {\r\n if (handlePageThumbClick) handlePageThumbClick(index);\r\n };\r\n const isActive = (currentPageNumber, index) => {\r\n const isActivePage = currentPageNumber - 1 === index; // Math.round(currentPageNumber / 2) === index;\r\n return isActivePage;\r\n };\r\n\r\n const handleNavigator = (direction) => {\r\n let offsetValue =\r\n direction === \"right\"\r\n ? thumbContainerRef.current.offsetWidth / 2\r\n : (-1 * thumbContainerRef.current.offsetWidth) / 2;\r\n thumbContainerRef.current.scrollLeft += offsetValue;\r\n };\r\n return (\r\n
\r\n
\r\n {FlipPageConstants && FlipPageConstants.customCatalogThumbsPath !== \"\" && (\r\n <>\r\n \r\n\r\n handleNavigator(\"left\")}\r\n >\r\n handleNavigator(\"right\")}\r\n >\r\n \r\n )}\r\n\r\n flipPage(\"prev\")}\r\n >\r\n flipPage(\"next\")}\r\n >\r\n
\r\n {FlipPageConstants && FlipPageConstants.customCatalogThumbsPath !== \"\" && (\r\n thumbContainerRef.current?.clientWidth,\r\n })}\r\n id=\"bd-page-preview\"\r\n ref={thumbContainerRef}\r\n >\r\n
\r\n {thumbs &&\r\n thumbs.map((thumb, index) => (\r\n handleMainPageThumbClick(index)}\r\n >\r\n \"\"\r\n
\r\n ))}\r\n
\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nPagePreviewBar.propTypes = {};\r\n\r\nexport default PagePreviewBar;\r\n","\r\nexport const setPageDims = (windowWidth, windowHeight, catalog_eachPageSize) => {\r\n var pageWidth, pageHeight;\r\n var imageSize = { w: catalog_eachPageSize.w*2, h: catalog_eachPageSize.h };\r\n var padding = 20; //15//windowWidth % 2 ===1 ? :21;\r\n if (windowWidth > windowHeight) {\r\n pageHeight = windowHeight - padding;\r\n pageWidth = pageHeight * (imageSize.w / imageSize.h);\r\n if (pageWidth > windowWidth) {\r\n pageWidth = windowWidth - padding;\r\n pageHeight = pageWidth * (imageSize.h / imageSize.w);\r\n }\r\n } else {\r\n pageWidth = windowWidth - padding;\r\n pageHeight = pageWidth * (imageSize.h / imageSize.w);\r\n }\r\n\r\n pageWidth = pageWidth % 2 === 1 ? pageWidth - 1 : pageWidth;\r\n\r\n return { w: pageWidth, h: pageHeight };\r\n};\r\n\r\nexport const flipPage = (direction, pageRef) => {\r\n if (!direction) return;\r\n direction += \"\";\r\n if (direction.toLowerCase() === \"next\") {\r\n pageRef.current.pageFlip().flipNext();\r\n } else if (direction.toLowerCase() === \"prev\") {\r\n pageRef.current.pageFlip().flipPrev();\r\n } else if (parseFloat(direction)) {\r\n const pageNumber = parseFloat(direction);\r\n pageRef.current.pageFlip().turnToPage(pageNumber);\r\n }\r\n};\r\n","import React, { PropTypes } from \"react\";\r\nimport { useFullscreen, useToggle } from \"react-use\";\r\nimport { fullscreenbtnsrc } from \"../../constants/constants\";\r\n\r\nconst FullscreenButton = (props) => {\r\n const { containerref, className='' } = props;\r\n //const containerref = useRef(null);\r\n const [show, toggle] = useToggle(false);\r\n\r\n const isFullscreen = useFullscreen(containerref, show, {\r\n onClose: () => toggle(false),\r\n });\r\n return (\r\n <>\r\n toggle()} alt=\"fullscreen\" />\r\n \r\n );\r\n};\r\n\r\nFullscreenButton.propTypes = {};\r\n\r\nexport default FullscreenButton;\r\n","import React, { PropTypes } from 'react';\r\n\r\nimport { Tooltip2 } from \"@blueprintjs/popover2\";\r\nimport { assetsDomain } from \"../../api/appProvider\";\r\nimport classNames from 'classnames';\r\n\r\nconst Knobs = props => {\r\n const { customRugsLinks, currentPageNumber, handleActionKnobClick } = props;\r\n\r\n return (\r\n \r\n {customRugsLinks && (\r\n
\r\n {customRugsLinks &&\r\n customRugsLinks.map(\r\n (pageElement, index) =>\r\n pageElement.values &&\r\n pageElement.values.map((divElement, divIndex) => (\r\n \r\n {divElement.Knob && currentPageNumber === pageElement.page && (\r\n handleActionKnobClick(e, divElement.Link)}\r\n >\r\n \r\n \"action-knob\"\r\n \r\n
\r\n )}\r\n
\r\n ))\r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nKnobs.propTypes = {\r\n \r\n};\r\n\r\nexport default Knobs;","import React from \"react\";\r\n\r\nconst EditorStateContext = React.createContext();\r\nconst EditorDispatchContext = React.createContext();\r\n\r\nconst SET_OVERLAYDIVLINKS = \"SET_OVERLAYDIVLINKS\";\r\nconst SET_EDITORMODE = \"SET_EDITORMODE\";\r\nconst mainEditorActions = {\r\n SET_OVERLAYDIVLINKS,\r\n SET_EDITORMODE,\r\n};\r\nconst initialEditorState = {\r\n editorMode: false,\r\n links: [],\r\n};\r\nconst mainEditorReducer = (state, action) => {\r\n const { type, payload } = action;\r\n // console.log(type)\r\n switch (type) {\r\n case SET_OVERLAYDIVLINKS:\r\n return { ...state, links: payload };\r\n case SET_EDITORMODE:\r\n return { ...state, editorMode: payload };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\nfunction EditorStateProvider({ children }) {\r\n const [state, dispatch] = React.useReducer(mainEditorReducer, initialEditorState);\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\nfunction useEditorState() {\r\n const context = React.useContext(EditorStateContext);\r\n if (context === undefined) {\r\n throw new Error(\"useCountState must be used within a CountProvider\");\r\n }\r\n return context;\r\n}\r\nfunction useEditorDispatch() {\r\n const context = React.useContext(EditorDispatchContext);\r\n if (context === undefined) {\r\n throw new Error(\"useCountDispatch must be used within a CountProvider\");\r\n }\r\n return context;\r\n}\r\nexport { EditorStateProvider, useEditorState, useEditorDispatch, mainEditorActions };\r\n","import { Button, Col, Divider, Input, Row, Space } from \"antd\";\r\nimport React from \"react\";\r\nimport { useEditorState } from \"../../reducers/overlayEditor.reducer\";\r\n\r\nconst OverlayDivEditor = (props) => {\r\n const { ChangeActiveDivValues, onOverlayDivsValueConfirm, activeDivValues, createNewDiv, onComplete, onDelete } =\r\n props;\r\n const editorState = useEditorState();\r\n\r\n return (\r\n <>\r\n {/* {mainUIState.editorMode && (\r\n
\r\n \r\n
\r\n )} */}\r\n
\r\n {editorState.editorMode && createNewDiv && (\r\n
\r\n \r\n \r\n
\r\n )}\r\n {editorState.editorMode && activeDivValues && (\r\n
\r\n ChangeActiveDivValues({ Width: val })}\r\n >\r\n ChangeActiveDivValues({ Height: val })}\r\n >\r\n ChangeActiveDivValues({ Top: val })}\r\n >\r\n ChangeActiveDivValues({ Left: val })}\r\n >\r\n ChangeActiveDivValues({ Link: val })}\r\n inputWid={24}\r\n >\r\n
\r\n \r\n \r\n\r\n {onDelete && (\r\n \r\n )}\r\n \r\n
\r\n\r\n {onComplete && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nOverlayDivEditor.propTypes = {};\r\n\r\nexport default OverlayDivEditor;\r\n\r\nconst EditableRow = (props) => {\r\n const { label, placeholder, value, onChange, labelWid = 6, inputWid = 12 } = props;\r\n return (\r\n \r\n {label} \r\n \r\n {\r\n if (onChange) onChange(e.target.value);\r\n }}\r\n />\r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nconst DraggableBox = (props) => {\r\n let offsetX, offsetY;\r\n let mouseDown = false;\r\n const move = (e) => {\r\n if(!mouseDown) return;\r\n const el = e.target;\r\n el.style.left = `${e.pageX - offsetX}px`;\r\n el.style.top = `${e.pageY - offsetY}px`;\r\n };\r\n const add = (e) => {\r\n mouseDown = true;\r\n const el = e.target;\r\n offsetX = e.clientX - el.getBoundingClientRect().left;\r\n offsetY = e.clientY - el.getBoundingClientRect().top;\r\n\r\n el.addEventListener(\"mousemove\", move);\r\n };\r\n const remove = (e) => {\r\n mouseDown = false;\r\n const el = e.target;\r\n el.removeEventListener(\"mousemove\", move);\r\n };\r\n\r\n return (\r\n
\r\n {props.children}\r\n
\r\n );\r\n};\r\n\r\nDraggableBox.propTypes = {};\r\n\r\nexport default DraggableBox;\r\n","import classNames from \"classnames\";\r\nimport { fabric } from \"fabric\";\r\n\r\nimport React, { PropTypes, useEffect, useRef, useState } from \"react\";\r\n//import FlipPageConstants from \"../../constants/constants\";\r\nimport { useUiDispatch, useUiState } from \"../../reducers/mainUI.reducer\";\r\nimport Knobs from \"../Knobs\";\r\nimport OverlayDivEditor from \"../Overlay-div-editor\";\r\nimport DraggableBox from \"../DraggableBox\";\r\nimport { mainEditorActions, useEditorDispatch, useEditorState } from \"../../reducers/overlayEditor.reducer\";\r\n\r\nconst OverlayDivArea = (props) => {\r\n const { currentPageNumber, overlayDivHover, overlayMouseOut, onLinkClick, pageState } = props;\r\n //const [pageLinks, setPageLinks]= useState(links);\r\n\r\n const [activeDivValues, setActiveDivValues] = useState(null);\r\n // const { editor, onReady } = useFabricJSEditor();\r\n\r\n const [active, setActive] = useState(false);\r\n\r\n const [showCanvas, setShowCanvas] = useState(false);\r\n const [mouseDown, setMouseDown] = useState(false);\r\n const [fabricCanvas, setFabricCanvas] = useState(null);\r\n\r\n const overlayEditorDispatch = useEditorDispatch();\r\n const overlayEditorState = useEditorState();\r\n const {links: customRugsLinks} = overlayEditorState;//FlipPageConstants.customRugsLinks;\r\n \r\n const editorState = useEditorState();\r\n\r\n const overlayDivRef = useRef(null);\r\n const [canvasSize, setCanvasSize] = useState({ w: 500, h: 500 });\r\n const FlipPageConstants = window.FlipPageConstants;\r\n\r\n useEffect(() => {\r\n setTimeout(() => {\r\n setCanvasHeight();\r\n }, 500);\r\n const links = JSON.parse(JSON.stringify(FlipPageConstants.customRugsLinks));\r\n \r\n overlayEditorDispatch({\r\n type: mainEditorActions.SET_OVERLAYDIVLINKS,\r\n payload: links,\r\n })\r\n }, []);\r\n const setCanvasHeight = () => {\r\n if (!overlayDivRef || !overlayDivRef.current) return;\r\n window.overlayDivRef = overlayDivRef;\r\n setCanvasSize({\r\n w: overlayDivRef.current.offsetWidth,\r\n h: overlayDivRef.current.offsetHeight,\r\n });\r\n };\r\n const addRectangle = (divElement) => {\r\n //if(!divElement) return;\r\n const canvas = new fabric.Canvas(\"sample-canvas\");\r\n setCanvasHeight();\r\n let rect;\r\n if (!divElement) {\r\n rect = new fabric.Rect({\r\n width: 50,\r\n height: 50,\r\n fill: \"blue\",\r\n angle: 0,\r\n top: 50,\r\n left: 50,\r\n });\r\n } else {\r\n const percentStrToPxVal = percentStrToPx(divElement);\r\n rect = new fabric.Rect({\r\n width: percentStrToPxVal.Width,\r\n height: percentStrToPxVal.Height,\r\n fill: \"blue\",\r\n angle: 0,\r\n top: percentStrToPxVal.Top,\r\n left: percentStrToPxVal.Left,\r\n });\r\n }\r\n canvas.add(rect);\r\n\r\n let newDivElement = divElement\r\n ? { ...divElement }\r\n : { Width: \"6%\", Height: \"9%\", Left: \"60%\", Top: \"65%\", Link: \"\" };\r\n\r\n function objectMovedListener(ev) {\r\n let target = ev.target;\r\n newDivElement = {\r\n ...newDivElement,\r\n Width: target.width * target.scaleX,\r\n Height: target.height * target.scaleY,\r\n Left: target.left,\r\n Top: target.top,\r\n };\r\n setActiveDivValues(newDivElement);\r\n }\r\n\r\n canvas.on(\"object:modified\", objectMovedListener);\r\n setFabricCanvas(canvas);\r\n };\r\n const percentStrToPx = (divElement) => {\r\n const totalWid = overlayDivRef.current.offsetWidth;\r\n const totalHgt = overlayDivRef.current.offsetHeight;\r\n const divElem_ = { ...divElement };\r\n\r\n const percentVal = parseFloat(divElement.Width);\r\n const px_w = (parseFloat(divElement.Width) * totalWid) / 100;\r\n const px_h = (parseFloat(divElement.Height) * totalHgt) / 100;\r\n const px_l = (parseFloat(divElement.Left) * totalWid) / 100;\r\n const px_t = (parseFloat(divElement.Top) * totalHgt) / 100;\r\n\r\n return { ...divElem_, Width: px_w, Height: px_h, Top: px_t, Left: px_l };\r\n };\r\n const pxToPercentStr = (activeDivValues) => {\r\n const totalWid = overlayDivRef.current.offsetWidth;\r\n const totalHgt = overlayDivRef.current.offsetHeight;\r\n const divElem_ = { ...activeDivValues };\r\n\r\n const percent_w = Math.round(((activeDivValues.Width * 100) / totalWid) * 1000) / 1000 + \"%\";\r\n const percent_h = Math.round(((activeDivValues.Height * 100) / totalHgt) * 1000) / 1000 + \"%\";\r\n const percent_l = Math.round(((activeDivValues.Left * 100) / totalWid) * 1000) / 1000 + \"%\";\r\n const percent_t = Math.round(((activeDivValues.Top * 100) / totalHgt) * 1000) / 1000 + \"%\";\r\n\r\n return { ...divElem_, Width: percent_w, Height: percent_h, Top: percent_t, Left: percent_l };\r\n };\r\n\r\n const createNewDiv = () => {\r\n disposeFabricCanvas();\r\n setShowCanvas(true);\r\n addRectangle();\r\n };\r\n const handleOverlayDivClick = (divElement, e, divIndex) => {\r\n const link = divElement.Link;\r\n //if (pageState !== \"fold_corner\") {\r\n if (editorState.editorMode) {\r\n setActive(divIndex);\r\n setShowCanvas(true);\r\n setActiveDivValues(percentStrToPx(divElement));\r\n addRectangle(divElement);\r\n \r\n } else if (onLinkClick) {\r\n onLinkClick(link);\r\n } else {\r\n window.open(link, \"_blank\");\r\n }\r\n e.stopPropagation();\r\n //}\r\n };\r\n const handleActionKnobClick = (e, link) => {\r\n if (onLinkClick) {\r\n onLinkClick(link);\r\n } else {\r\n window.open(link, \"_blank\");\r\n }\r\n e.stopPropagation();\r\n };\r\n\r\n const ChangeActiveDivValues = ({ Width, Height, Top, Left, Link }) => {\r\n const wid = Width ? Width : activeDivValues.Width;\r\n const hgt = Height ? Height : activeDivValues.Height;\r\n const top = Top ? Top : activeDivValues.Top;\r\n const left = Left ? Left : activeDivValues.Left;\r\n const link = Link ? Link : activeDivValues.Link;\r\n\r\n setActiveDivValues({ ...activeDivValues, Width: wid, Height: hgt, Top: top, Left: left, Link: link });\r\n };\r\n\r\n const onOverlayDivsValueConfirm = () => {\r\n const links = overlayEditorState.links; //[...FlipPageConstants.customRugsLinks];\r\n\r\n let currentPageElement = links.filter((pageElement) => pageElement.page === currentPageNumber);\r\n if (!currentPageElement || !currentPageElement.length) {\r\n currentPageElement = { page: currentPageNumber, values: [pxToPercentStr(activeDivValues)] };\r\n links.push(currentPageElement)\r\n } else {\r\n if (active || active === 0) {\r\n currentPageElement[0].values.splice(active, 1);\r\n currentPageElement[0].values.splice(active, 0, pxToPercentStr(activeDivValues));\r\n } else {\r\n currentPageElement[0].values.push(pxToPercentStr(activeDivValues));\r\n }\r\n }\r\n\r\n overlayEditorDispatch({\r\n type: mainEditorActions.SET_OVERLAYDIVLINKS,\r\n payload: links,\r\n })\r\n setActive(null);\r\n setShowCanvas(false);\r\n disposeFabricCanvas();\r\n };\r\n const onDelete =()=>{\r\n const links = overlayEditorState.links; //[...FlipPageConstants.customRugsLinks];\r\n\r\n let currentPageElement = links.filter((pageElement) => pageElement.page === currentPageNumber);\r\n if(currentPageElement.length){\r\n if (active || active === 0) {\r\n currentPageElement[0].values.splice(active, 1); \r\n }\r\n }\r\n \r\n overlayEditorDispatch({\r\n type: mainEditorActions.SET_OVERLAYDIVLINKS,\r\n payload: links,\r\n })\r\n setActive(null);\r\n setShowCanvas(false);\r\n disposeFabricCanvas();\r\n \r\n }\r\n const disposeFabricCanvas = () => {\r\n if (fabricCanvas) {\r\n try {\r\n fabricCanvas.dispose();\r\n } catch (err) {\r\n console.error(\"disposeFabricCanvas -> err\", err);\r\n }\r\n }\r\n };\r\n const onMouseMove = () => {\r\n if (!mouseDown) return;\r\n };\r\n const onComplete = () => {\r\n const links = overlayEditorState.links;\r\n console.log(\"onComplete -> links\", JSON.stringify(links));\r\n };\r\n return (\r\n <>\r\n
\r\n {customRugsLinks &&\r\n customRugsLinks.map(\r\n (pageElement, index) =>\r\n pageElement.values && (\r\n \r\n {pageElement.values.map((divElement, divIndex) => (\r\n \r\n handleOverlayDivClick(divElement, e, divIndex)}\r\n onMouseEnter={(e) => overlayDivHover(e, divElement)}\r\n onMouseOut={(e) => overlayMouseOut(e, divElement)}\r\n onMouseDown={(e) => setMouseDown(true)}\r\n onMouseMove={(e) => onMouseMove(e)}\r\n onMouseUp={(e) => setMouseDown(false)}\r\n >
\r\n \r\n ))}\r\n \r\n )\r\n )}\r\n\r\n {customRugsLinks && pageState!=='flipping' && (\r\n \r\n )}\r\n \r\n\r\n <>\r\n {\r\n editorState.editorMode && (\r\n \r\n \r\n \r\n )\r\n }\r\n \r\n\r\n {\r\n
\r\n {/* */}\r\n \r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nOverlayDivArea.propTypes = {};\r\n\r\nexport default OverlayDivArea;\r\n","import React, { useEffect, useRef, useState } from \"react\";\r\n\r\nimport classNames from \"classnames\";\r\n\r\n//import FlipPageConstants from \"../../constants/constants\";\r\n\r\nimport { postMessageToExplorugIframe } from \"../../utils/domutils\";\r\nimport PageFlip from \"../PageFlip\";\r\nimport { Tooltip2 } from \"@blueprintjs/popover2\";\r\nimport { assetsDomain } from \"../../api/appProvider\";\r\nimport { mainUiActions, useUiDispatch, useUiState } from \"../../reducers/mainUI.reducer\";\r\nimport PagePreviewBar from \"../Page-preview-bar\";\r\nimport { flipPage, setPageDims } from \"../../utils/utils\";\r\nimport { useWindowSize } from \"react-use\";\r\nimport FullscreenButton from \"../FullscreenButton\";\r\nimport OverlayDivArea from \"../Overlay-div-area\";\r\nimport { useEditorState } from \"../../reducers/overlayEditor.reducer\";\r\nconst Flipbook = (props) => {\r\n const {\r\n className,\r\n showCustomRugs = true,\r\n disableFlipOnRandomClick = true,\r\n pageWidth = 1920,\r\n pageHeight = 2160,\r\n showCover = false,\r\n onClose,\r\n //onLinkClick\r\n } = props;\r\n const customRugsRef = React.useRef(); // React.createRef(); use React.useRef() for functional component;\r\n window.customRugsRef = customRugsRef;\r\n const FlipPageConstants = window.FlipPageConstants;\r\n\r\n const containerref = useRef(null);\r\n const [pageState, setPageState] = useState(\"\");\r\n const [currentPageNumber, setCurrentPageNumber] = useState(1);\r\n //console.log(\"Flipbook -> currentPageNumber\", currentPageNumber);\r\n const [activeDivValues, setActiveDivValues] = useState(null);\r\n\r\n const [active, setActive] = useState(false);\r\n const mainUIDispatch = useUiDispatch();\r\n const mainUIState = useUiState();\r\n const editorState = useEditorState();\r\n\r\n const { width: windowWidth, height: windowHeight } = useWindowSize();\r\n const [pageSize, setPageSize] = useState({ w: windowWidth, h: windowHeight });\r\n\r\n const customRugsLinks = FlipPageConstants.customRugsLinks;\r\n const customCatalog_eachPageSize = FlipPageConstants.customCatalog_eachPageSize;\r\n\r\n useEffect(() => {\r\n const pageDims = setPageDims(windowWidth, windowHeight, customCatalog_eachPageSize);\r\n setPageSize(pageDims);\r\n }, []);\r\n\r\n useEffect(() => {\r\n const pageDims = setPageDims(windowWidth, windowHeight, customCatalog_eachPageSize);\r\n setPageSize(pageDims);\r\n }, [windowWidth, windowHeight]);\r\n\r\n const onPage = (e) => {\r\n //console.log(\"currentPageNumber\", currentPageNumber);\r\n\r\n if (customRugsRef && customRugsRef.current) {\r\n const pageNUM = customRugsRef.current.pageFlip().getCurrentPageIndex() / 2 + 1;\r\n setCurrentPageNumber(pageNUM);\r\n mainUIDispatch({\r\n type: mainUiActions.SET_PAGENUM,\r\n payload: pageNUM,\r\n });\r\n //console.log(\"currentPageNumber\", currentPageNumber, pageNUM, customRugsRef.current.pageFlip().getCurrentPageIndex());\r\n }\r\n };\r\n const onChangeOrientation = (e) => {\r\n //console.log(\"customrugs onChangeOrientation\", e.data);\r\n };\r\n const onChangeState = (e) => {\r\n //console.log(\"customrugs onChangeState---\", customRugsRef.current.pageFlip());\r\n setPageState(e.data);\r\n if (e.data === \"flipping\") {\r\n //setCurrentPage(pageViews.OTHER);\r\n mainUIDispatch({\r\n type: mainUiActions.SET_PAGENUM,\r\n payload: 0,\r\n });\r\n }\r\n };\r\n\r\n const onLinkClick = (url) => {\r\n try {\r\n if (url.indexOf(\"newtab:-\") !== -1) {\r\n window.open(url.replace(\"newtab:-\", \"\"), \"_blank\");\r\n } else if (url.indexOf(\"initdesign\") > 0) {\r\n postMessageToExplorugIframe(url);\r\n setTimeout(() => {\r\n mainUIDispatch({\r\n type: mainUiActions.SET_EXPLORUGPOPUP,\r\n payload: true,\r\n });\r\n }, 1000);\r\n } else throw url;\r\n } catch {\r\n window.open(url, \"_blank\");\r\n }\r\n };\r\n // const handleOverlayDivClick = (divElement, e, divIndex) => {\r\n // //console.log(\"handleOverlayDivClick -> link\", link);\r\n // const link = divElement.Link;\r\n // if (pageState !== \"fold_corner\") {\r\n // if (editorState.editorMode) {\r\n // setActive(divIndex);\r\n // setActiveDivValues(divElement);\r\n // console.log(\"handleOverlayDivClick -> divElement\", divElement);\r\n // } else if (onLinkClick) {\r\n // onLinkClick(link);\r\n // } else {\r\n // window.open(link, \"_blank\");\r\n // }\r\n // e.stopPropagation();\r\n // }\r\n // };\r\n\r\n const overlayDivHover = (e) => {\r\n if (!customRugsRef) return;\r\n const currentState = customRugsRef.current.pageFlip().getSettings().showPageCorners;\r\n if (currentState) {\r\n customRugsRef.current.pageFlip().flipController.showCorner(\"TOP\");\r\n customRugsRef.current.pageFlip().getSettings().showPageCorners = false;\r\n }\r\n };\r\n const overlayMouseOut = (e) => {\r\n if (!customRugsRef) return;\r\n const currentState = customRugsRef.current.pageFlip().getSettings().showPageCorners;\r\n if (!currentState) {\r\n customRugsRef.current.pageFlip().getSettings().showPageCorners = true;\r\n }\r\n };\r\n\r\n const handleActionKnobClick = (e, link) => {\r\n console.log(\"handleActionKnobClick\");\r\n if (onLinkClick) {\r\n onLinkClick(link);\r\n } else {\r\n window.open(link, \"_blank\");\r\n }\r\n e.stopPropagation();\r\n };\r\n\r\n const onFlipBookClick = (e) => {\r\n e.stopPropagation();\r\n if (e.target.className === \"stf__block\") {\r\n if (onClose) onClose();\r\n }\r\n };\r\n\r\n const handlePageThumbClick = (index) => {\r\n let number = Math.round(index * 2);\r\n number = number === 0 ? 1 : number;\r\n\r\n setCurrentPageNumber(number);\r\n // setPageName(number);\r\n customRugsRef.current.pageFlip().turnToPage(number);\r\n setTimeout(() => {\r\n //\r\n }, 1000);\r\n };\r\n const turnPage = (direction) => {\r\n flipPage(direction, customRugsRef);\r\n };\r\n const previewbarClassname = () => {\r\n var barClassName = \"\";\r\n console.log(\"previewbarClassname -> FlipPageConstants.previewBarPosition\", FlipPageConstants.previewBarPosition);\r\n\r\n switch (FlipPageConstants.previewBarPosition) {\r\n case 0:\r\n barClassName = \"\";\r\n break;\r\n case 1:\r\n barClassName = \"preview-bar-up\";\r\n break;\r\n case 2:\r\n barClassName = \"preview-bar-left\";\r\n break;\r\n default:\r\n barClassName = \"\";\r\n\r\n break;\r\n }\r\n return barClassName;\r\n };\r\n\r\n return (\r\n <>\r\n onFlipBookClick(e)}\r\n style={{\r\n width: pageSize.w,\r\n height: pageSize.h,\r\n }}\r\n ref={containerref}\r\n >\r\n {/*
\r\n \r\n
*/}\r\n \r\n\r\n {/*
\r\n {customRugsLinks &&\r\n customRugsLinks.map(\r\n (pageElement, index) =>\r\n pageElement.values && (\r\n \r\n {pageElement.values.map((divElement, divIndex) => (\r\n \r\n handleOverlayDivClick(divElement, e, divIndex)}\r\n onMouseEnter={(e) => overlayDivHover(e, divElement)}\r\n onMouseOut={(e) => overlayMouseOut(e, divElement)}\r\n // onMouseDown={(e)=>setMouseDown(true)}\r\n >
\r\n \r\n ))}\r\n \r\n )\r\n )}\r\n\r\n {customRugsLinks && (\r\n \r\n )}\r\n \r\n */}\r\n\r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Flipbook;\r\n\r\nconst generateKey = (pre) => {\r\n const key = `${pre}_${new Date().getTime()}`;\r\n //console.log(\"generateKey -> key\", key);\r\n\r\n return key;\r\n};\r\n","import classNames from \"classnames\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { getTouchedPoints } from \"../../utils/domutils\";\r\n\r\nconst VideoPlayer = (props) => {\r\n const {\r\n id = \"bd_video_player\",\r\n className = \"\",\r\n pauseVideo = false,\r\n src = \"./videos/slideshow.mp4\",\r\n videoType = \"video/mp4\",\r\n } = props;\r\n const vidRef = React.useRef();\r\n\r\n useEffect(() => {\r\n if (pauseVideo) {\r\n vidRef.current.pause();\r\n } else {\r\n vidRef.current.play();\r\n }\r\n }, [pauseVideo]);\r\n\r\n const videoLoad = () => {\r\n // vidRef.current.play();\r\n const playPromise = vidRef.current.play();\r\n if (playPromise !== undefined) {\r\n playPromise\r\n .then(() => {\r\n console.log(\"audio played auto\");\r\n })\r\n .catch(() => {\r\n console.log(\"playback prevented\");\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nVideoPlayer.propTypes = {};\r\n\r\nexport default VideoPlayer;\r\n","import classNames from \"classnames\";\r\nimport React, { PropTypes, useEffect, useState } from \"react\";\r\nimport { useWindowSize } from \"react-use\";\r\nimport { assetsDomain } from \"../../api/appProvider\";\r\n//import FlipPageConstants from \"../../constants/constants\";\r\nimport { useUiState } from \"../../reducers/mainUI.reducer\";\r\nimport { setPageDims } from \"../../utils/utils\";\r\nimport VideoPlayer from \"../Video-Player\";\r\n\r\nconst OverlayVideos = (props) => {\r\n const { className, page, imageSrc, videoSrc } = props;\r\n const mainUiState = useUiState();\r\n const { width: windowWidth, height: windowHeight } = useWindowSize();\r\n const [pageSize, setPageSize] = useState({ w: windowWidth, h: windowHeight });\r\n const FlipPageConstants = window.FlipPageConstants;\r\n\r\n const customCatalog_eachPageSize = FlipPageConstants.customCatalog_eachPageSize;\r\n\r\n useEffect(() => {\r\n const pageDims = setPageDims(windowWidth, windowHeight, customCatalog_eachPageSize);\r\n setPageSize(pageDims);\r\n }, []);\r\n\r\n useEffect(() => {\r\n const pageDims = setPageDims(windowWidth, windowHeight, customCatalog_eachPageSize);\r\n setPageSize(pageDims);\r\n }, [windowWidth, windowHeight]);\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nOverlayVideos.propTypes = {};\r\n\r\nexport default OverlayVideos;\r\n","import classNames from \"classnames\";\r\nimport React, { useEffect, useRef, useState } from \"react\";\r\nimport { useWindowSize } from \"react-use\";\r\n//import FlipPageConstants from \"../../constants/constants\";\r\n\r\nimport { useUiState } from \"../../reducers/mainUI.reducer\";\r\nimport { AtSpinnerOverlay } from \"../AtSpinner\";\r\nimport ExplorugIframePopup from \"../ExplorugIframePopup\";\r\nimport Flipbook from \"../Flipbook-CustomRugs\";\r\nimport PageFlip from \"../PageFlip\";\r\n\r\nimport { setPageDims } from \"../../utils/utils\";\r\nimport VideoPlayer from \"../Video-Player\";\r\nimport FullscreenButton from \"../FullscreenButton\";\r\nimport { Helmet } from \"react-helmet\";\r\nimport { mainEditorActions, useEditorDispatch, useEditorState } from \"../../reducers/overlayEditor.reducer\";\r\n\r\nimport OverlayVideos from \"../OverlayVideos\";\r\nconst triggerWindowResize = () => {\r\n var resizeEvent = window.document.createEvent(\"UIEvents\");\r\n resizeEvent.initUIEvent(\"resize\", true, false, window, 0);\r\n window.dispatchEvent(resizeEvent);\r\n};\r\nconst MainPage = (props) => {\r\n const mainPageRef = React.useRef(); //React.createRef();\r\n const containerref = useRef(null);\r\n const { width: windowWidth, height: windowHeight } = useWindowSize();\r\n const [pageSize, setPageSize] = useState({ w: windowWidth, h: windowHeight });\r\n const [showCustomRugs, setShowCustomRugs] = useState(false);\r\n const [animate, setAnimate] = useState(false);\r\n const mainUiState = useUiState();\r\n const editorState = useEditorState();\r\n const overlayEditorDispatch = useEditorDispatch();\r\n \r\nconst FlipPageConstants = window.FlipPageConstants;\r\n const catalog_eachPageSize = FlipPageConstants.catalog_eachPageSize;\r\n\r\n useEffect(() => {\r\n window.ref = mainPageRef;\r\n const pageDims = setPageDims(windowWidth, windowHeight, catalog_eachPageSize);\r\n setPageSize(pageDims);\r\n document.addEventListener(\"keydown\", handleKeyDown, false);\r\n window.history.pushState({ state: \"initial\" }, \"\", \"\");\r\n\r\n window.onpopstate = function (event) {\r\n // console.log(\"useEffect -> event.state\", event.state)\r\n if (event.state && event.state.state === \"initial\") {\r\n setShowCustomRugs(false);\r\n setAnimate(false);\r\n\r\n triggerWindowResize();\r\n event.preventDefault();\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n const pageDims = setPageDims(windowWidth, windowHeight, catalog_eachPageSize);\r\n setPageSize(pageDims);\r\n }, [windowWidth, windowHeight]);\r\n\r\n const onMainpageClick = (e) => {\r\n if (e.target.className === \"flipbook-overlay\" || e.target.className === \"pageFlip-container\") {\r\n setShowCustomRugs(false);\r\n }\r\n };\r\n const handleKeyDown = (event) => {\r\n const key = event.keyCode;\r\n if (key === 69) {\r\n console.log(\"handleKeyDown -> editorState.editorMode\", editorState.editorMode);\r\n overlayEditorDispatch({\r\n type: mainEditorActions.SET_EDITORMODE,\r\n payload: true,\r\n });\r\n }\r\n };\r\n return (\r\n \r\n {FlipPageConstants.titleName && FlipPageConstants.titleName !== \"\" && (\r\n \r\n {FlipPageConstants.titleName}\r\n \r\n )}\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n \r\n\r\n {FlipPageConstants && FlipPageConstants.mainPageVideoPath !== \"\" && (\r\n \r\n )}\r\n {FlipPageConstants &&\r\n FlipPageConstants.mainPageCatalogImage &&\r\n FlipPageConstants.mainPageCatalogImage !== \"\" && (\r\n
\r\n {\r\n if (window.innerWidth > 1300 && windowHeight > 700) {\r\n setAnimate(true);\r\n }\r\n window.history.pushState(null, \"\", \"\");\r\n setTimeout(() => {\r\n setShowCustomRugs(true);\r\n }, 1200);\r\n }}\r\n >\r\n \r\n
\r\n \r\n )}\r\n\r\n {\r\n setAnimate(true);\r\n window.history.pushState(null, \"\", \"\");\r\n setTimeout(() => {\r\n setShowCustomRugs(true);\r\n }, 1200);\r\n }}\r\n >\r\n \r\n\r\n setShowCustomRugs(false)}\r\n />\r\n {FlipPageConstants.OverlayVideos &&\r\n FlipPageConstants.OverlayVideos.hasOverlayVideos &&\r\n FlipPageConstants.OverlayVideos.videos.map((video, index) => (\r\n <>\r\n \r\n \r\n ))}\r\n {\r\n // \r\n }\r\n {/* {\r\n \r\n }\r\n \r\n {\r\n \r\n }\r\n {\r\n \r\n } */}\r\n {FlipPageConstants.hasExplorugPopUp && (\r\n <>\r\n \r\n\r\n \r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nMainPage.propTypes = {};\r\n\r\nexport default MainPage;\r\n","import { useEffect, useState } from \"react\";\r\nimport \"antd/dist/antd.css\";\r\nimport \"./App.scss\";\r\nimport MainPage from \"./components/MainPage\";\r\nimport { loadPageData } from \"./constants/constants\";\r\n\r\nfunction App() {\r\n const [flipbookConstantsLoaded, setFlipbookConstantsLoaded] = useState(false);\r\n\r\n useEffect(() => {\r\n loadPageData().then(res=>{\r\n //console.log(\"window.FlipPageConstants\", window.FlipPageConstants);\r\n setFlipbookConstantsLoaded(true);\r\n })\r\n }, []);\r\n\r\n return flipbookConstantsLoaded ? : <>;\r\n}\r\n\r\nexport default App;\r\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://cra.link/PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://cra.link/PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then((registration) => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://cra.link/PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch((error) => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then((response) => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then((registration) => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log('No internet connection found. App is running in offline mode.');\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then((registration) => {\r\n registration.unregister();\r\n })\r\n .catch((error) => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport \"./index.css\";\r\nimport App from \"./App\";\r\nimport reportWebVitals from \"./reportWebVitals\";\r\nimport { UiStateProvider } from \"./reducers/mainUI.reducer\";\r\nimport { EditorStateProvider } from \"./reducers/overlayEditor.reducer\";\r\nimport * as serviceWorkerRegistration from './serviceWorkerRegistration';\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://cra.link/PWA\r\nserviceWorkerRegistration.register();\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n"],"sourceRoot":""}