{"version":3,"sources":["../node_modules/react-semantic-ui-datepickers/dist/locales sync /^/.//.*/.json$","Redux/Types/HeaderTypes.ts","Redux/Reducers/App_Reducers/AppSettingsReducer.ts","Redux/Types/AuthTypes.ts","Redux/Reducers/App_Reducers/AuthReducer.ts","Redux/Types/BrandingTypes.ts","Redux/Reducers/App_Reducers/BrandingReducer.ts","Redux/Types/IdentityTypes.ts","Language/Default_Settings.ts","Redux/Types/GlobalTypes.ts","Redux/Reducers/App_Reducers/IdentityReducer.ts","Redux/Types/ProductListTypes.ts","Redux/Reducers/App_Reducers/ProductListReducer.ts","Redux/Types/ProductDetailsTypes.ts","Redux/Reducers/App_Reducers/ProductDetailsReducer.ts","Redux/Types/OrderTypes.ts","Redux/Reducers/App_Reducers/OrderReducer.ts","Redux/Reducers/App_Reducers/ProcessCheckoutReducer.ts","Redux/Types/UserDetailsTypes.ts","Redux/Reducers/App_Reducers/UserDetailsReducer.ts","Redux/Types/CategoryTypes.ts","Redux/Reducers/App_Reducers/CategoryReducer.ts","Redux/Types/FreightTypes.ts","Redux/Reducers/App_Reducers/FreightReducer.ts","Redux/Reducers/IndexReducers.ts","Redux/Types/ProcessCheckoutTypes.ts","Redux/ConfigureStore.ts","Pages/Layout.tsx","APIHost.ts","Utils/B2BHelpers.ts","Utils/ApiUtil.ts","Redux/Actions/AuthActions.ts","Enums/PromoMatrix/DiscountSourceType.ts","Utils/ProductsHelper.ts","Utils/PromotionsHelper.ts","Enums/PaymentMethods/PaymentMethodType.ts","Redux/Actions/OrderActions.ts","Pages/Login/RestrictedPage.tsx","Utils/LoginHelper.ts","Redux/Selectors/SettingsSelectors.ts","Redux/Selectors/UserSelectors.ts","Routes.ts","Pages/Landing/Index.tsx","Images/Icons/LockIcon.js","Images/Icons/ErrorCrossIcon.js","Components/PageElements/Cin7FormHeading.tsx","Images/Cover_Client_B2B.jpg","Components/PageElements/Login/SidePageBanner.tsx","Images/Icons/EmailIcon.js","Images/Icons/Global/CircleTickIcon.tsx","Images/Icons/Global/AlertCircleIcon.tsx","Components/PageElements/Cin7ConfirmationBox.tsx","Redux/Actions/BrandingActions.ts","Components/Global/Loading.tsx","Images/Icons/Global/LoadingSpinnerIcon.tsx","Components/Global/LoadingSpinner.tsx","Images/Icons/BoxIcons/OpenBox.tsx","Images/Cin7Logo.tsx","Components/Global/Image.tsx","Pages/Login/Views/StoreHeading.tsx","Images/Icons/ClearInputIcon.js","Components/FormElements/InputField.tsx","Components/FormElements/PasswordMeter.tsx","Images/Icons/ShowPasswordIcon.js","Images/Icons/HidePasswordIcon.js","Components/FormElements/PasswordField.tsx","Components/FormElements/ButtonField.tsx","Components/AppForms/LoginForm.tsx","Pages/Login/Views/SignIn.tsx","Redux/Actions/IdentityActions.ts","Components/AppForms/ForgotPasswordForm.tsx","Pages/Login/Views/ForgotPassword.tsx","Components/AppForms/ResetPasswordForm.tsx","Pages/Login/Views/ResetPassword.tsx","Pages/Notifications/Success/ResetPasswordConfirmation.tsx","Pages/Notifications/Success/ForgotPasswordConfirmation.tsx","Pages/Notifications/Errors/FailedView.tsx","Components/PageElements/Login/SidePageBannerFooter.tsx","Components/PageElements/Login/ContactUsFooter.tsx","Pages/Login/Login.tsx","Pages/Notifications/Success/CreatePasswordConfirmation.tsx","Components/AppForms/CreateAccountForm.tsx","Pages/Login/Views/Registration.tsx","Pages/Login/Register.tsx","Pages/Notifications/Errors/PageNotFound.tsx","Utils/CategoriesHelper.ts","Redux/Actions/ProductListActions.ts","Utils/Global/UnauthorizeIfNeeded.ts","Components/PageElements/Products/ProductsListBrandFilter.tsx","Redux/Selectors/OrderSelectors.ts","Utils/FreightHelper.ts","Utils/OrderHelper.ts","Components/Global/PriceDisplay.tsx","Components/Global/RetailPriceDisplay.tsx","Components/PageElements/Products/ProductPrice.tsx","Components/PageElements/DynamicTitleSection.tsx","Components/PageElements/Products/StockIndicator.tsx","Images/Icons/Products/ArrowRightIcon.tsx","Components/PageElements/Products/ProductPromotionsBanner.tsx","Components/PageElements/Products/ProductTile.tsx","Components/PageElements/Products/ProductsListItems.tsx","Redux/Actions/ProductDetailsActions.ts","Images/Icons/Global/CaretDownIcon.tsx","Components/Global/MoreActionsDropdown.tsx","Components/Global/MoreActionsPanel.tsx","Components/PageElements/Products/ProductInfoCard.tsx","Images/Icons/Global/CloseIcon.tsx","Images/Icons/NavigationIcons/NextArrowIcon.tsx","Images/Icons/NavigationIcons/PrevArrowIcon.tsx","Components/PageElements/Products/ProductGalleryModal.tsx","Components/PageElements/Products/ProductGallery.tsx","Redux/Selectors/ProductDetailsSelectors.ts","Components/Global/HtmlBlock.tsx","Components/PageElements/Products/ProductTeaser.tsx","Components/PageElements/Products/ProductDetailsCart.tsx","Images/Icons/CircleDecrementIcon.js","Images/Icons/CircleIncrementIcon.js","Components/PageElements/Products/ProductOptionQuantity.tsx","Redux/Selectors/ProductSelectors.ts","Components/PageElements/Products/ProductOptionPriceRange.tsx","Components/PageElements/Products/ProductOptionPrice.tsx","Components/PageElements/Products/UOMStockIndicator.tsx","Components/PageElements/Products/ProductOptionSectionInfo.tsx","Images/Icons/Products/ExpandArrowIcon.tsx","Components/PageElements/Products/ProductStandardPromotion.tsx","Components/PageElements/Products/ProductContractPricePromotion.tsx","Components/PageElements/Products/ProductPromotionsTooltip.tsx","Components/PageElements/Products/ProductOptionUOMUnitPrice.tsx","Components/PageElements/Products/ProductOptionSection.tsx","Components/PageElements/Products/ProductOptionsList.tsx","Components/PageElements/Products/ProductPromotionsSection.tsx","Components/PageElements/Products/ProductAttachment.tsx","Components/PageElements/Products/ProductDetailsStickyFooter.tsx","Components/PageElements/Products/ProductDetailsContent.tsx","Images/Icons/BoxIcons/EmptyBox.tsx","Components/PageElements/Products/ProductNotFound.tsx","Components/PageElements/Products/ProductDetailsModal.tsx","Pages/Products/Views/ProductsList.tsx","Redux/Actions/CategoryActions.ts","Components/Global/Chip.tsx","Pages/Products/Views/Category.tsx","Images/Icons/Account/QuoteIcon.tsx","Images/Icons/Account/UserIcon.tsx","Images/Icons/Account/LogoutIcon.tsx","Images/Icons/Account/GenericIcon.tsx","Redux/Actions/HeaderActions.ts","Components/PageElements/Orders/IssuesCard.tsx","Components/PageElements/Orders/ConfirmBulkOrderModal.tsx","Components/PageElements/Orders/UploadBulkOrderModal.tsx","Components/PageElements/Orders/UploadBulkOrder.tsx","Domain/BulkImportCSV.ts","Utils/Global/UseWindowSizeHook.tsx","Components/Global/NavigationMenu.tsx","Components/Global/SideMenu.tsx","Components/PageElements/MiniCartTax.tsx","Images/Icons/Global/SearchIcon.tsx","Components/Global/HeaderSearch.tsx","Images/Icons/ClearInputBoldIcon.tsx","Domain/ProductNameSearch.ts","Components/Global/SearchModal.tsx","Images/Icons/Global/MenuIcon.tsx","Images/Icons/Orders/CartIcon.tsx","Components/Global/Header.tsx","Images/Icons/NavigationIcons/BackArrowIcon.tsx","Components/PageElements/GoBack.tsx","Components/Global/ReturnPanel.tsx","Pages/Products/Views/ProductDetail.tsx","Components/PageElements/Products/ProductFilterBackground.tsx","Pages/Products/Products.tsx","Pages/SellerContent/Views/CustomPage1.tsx","Pages/SellerContent/Views/CustomPage2.tsx","Pages/SellerContent/Views/TermsAndConditions.tsx","Pages/SellerContent/SellerContent.tsx","Components/PageElements/Account/AccountOnHoldBanner.tsx","Pages/Account/Views/AccountDetails.tsx","Components/PageElements/Account/ReorderModal.tsx","Components/PageElements/Account/OrderTile.tsx","Redux/Actions/UserDetailsActions.ts","Components/PageElements/Account/OrderHistoryList.tsx","Pages/Account/Views/OrderHistory.tsx","Pages/Account/Account.tsx","Utils/CustomHomepageHelper.ts","Images/Icons/CustomHomepage/EmptyCategoryImage.tsx","Components/PageElements/CustomHomepage/CustomHomepageImage.tsx","Components/PageElements/CustomHomepage/CustomHomepageContent.tsx","Pages/Landing/CustomHomepage.tsx","Components/PageElements/Orders/CheckoutFooter.tsx","Components/PageElements/Orders/EmptyCart.tsx","Images/Icons/Orders/RemoveIcon.tsx","Components/PageElements/Orders/OrderOptionNotes.tsx","Components/PageElements/Orders/AddNoteModal.tsx","Components/PageElements/Orders/AddNoteButton.tsx","Components/PageElements/Orders/OrderDetailProductOption.tsx","Components/PageElements/Orders/OrderDetailProductTile.tsx","Components/PageElements/Orders/OrderReviewDetailsList.tsx","Components/PageElements/Orders/TotalsPanel.tsx","Domain/ProductCheckoutValidation.ts","Pages/Orders/Views/Cart.tsx","Images/Icons/Orders/DeliveryAddressIcon.tsx","Images/Icons/Orders/BillingAddressIcon.tsx","Utils/CountriesList.ts","Components/PageElements/Orders/EditAddressModal.tsx","Components/PageElements/Orders/AddressPanel.tsx","Images/Icons/Orders/FreightOptionIcon.tsx","Redux/Actions/FreightActions.ts","Components/PageElements/Orders/FreightPanel.tsx","Components/PageElements/Orders/DeliveryInstructionsPanel.tsx","Components/PageElements/Orders/Delivery.tsx","Images/Icons/Orders/PayOnlinePaymentIcon.tsx","Components/PageElements/Orders/PayOnlinePaymentOptionButton.tsx","Images/Icons/Orders/OnAccountPaymentIcon.tsx","Components/PageElements/Orders/OnAccountPaymentOptionButton.tsx","Components/PageElements/Orders/PaymentPanel.tsx","Components/PageElements/Orders/InvoiceParticularsPanel.tsx","Components/PageElements/Orders/Billing.tsx","Pages/Orders/Views/Checkout.tsx","Domain/ApproveAndProcessOrder.ts","Pages/Orders/Views/OrderCompletion.tsx","Pages/Orders/Orders.tsx","Components/Global/ProductDetailsModal.tsx","Pages/Login/ContactUsForm.tsx","Pages/Login/ContactUs.tsx","Pages/Login/ContactUsConfirmation.tsx","App.tsx","index.tsx"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","Side_Menu_Toggle_Status","Side_Menu_Reset_Status","initialState","isMenuOpen","Authorize_B2B_User","Deauthorize_B2B_User","Refresh_User_Token","Logout_Clear_State","Auth_Errors_Clear_State","isAuthorize","subscribedToken","refreshToken","errorMessage","Display_Store_Brand_Info","Display_Store_Brand_Not_Found","Reset_Brand_Info","Getting_Brand_Info","Update_Contact_Form_Email_Status","Reset_Contact_Form_Email_Status","Contact_Form_Email_Requested","Contact_Form_Email_Request_Has_Response","Update_ReCaptcha_Validation_Result","brandFound","storeName","moduleId","loginPageImageUrl","loginBannerImageUrl","isGettingBrandInfo","contactFormEnabled","contactUsEmailStatus","isContactFormEmailRequested","isContactFormEmailRequestHasResponse","isReCaptchaValidated","Authenticating_User","Authentication_Error","Login_Email_Address_Not_Valid","Login_Reset_Initial_State","Login_Validation_Inputs_Failed","Login_Get_User_Details","Login_Reset_User_Details","ForgotPassword_Email_Address_Not_Valid","ForgotPassword_Fail_Sending_Link","ForgotPassword_Sending_Link","ForgotPassword_Send_Reset_Link","ForgotPassword_Clear_State","ResetPassword_Updating_Password","ResetPassword_Password_Updated","ResetPassword_Update_Password_Failed","ResetPassword_Password_Validation_Failed","ResetPassword_Clear_State","Registration_Get_Registered_User_Details","Registration_Getting_User_Details","Registration_Getting_User_Details_Failed","Registration_Confirm_User_Email","Registration_Confirm_User_Email_Failed","Registration_Updating_Password","Registration_Password_Updated","Registration_Update_Password_Failed","Registration_Password_Validation_Failed","Registration_Clear_State","Registration_Get_User_Status","Registration_Get_User_Status_Failed","LoginPageContent","ForgotPasswordContent","ResetPasswordContent","RegistrationPageContent","ForgotPasswordConfirmationContent","ValidationMessages","B2BPageTitles","ProductsListPageContent","OrderHistoryListPageContent","ProductActionsContent","HeaderContent","OrderReviewPageContent","OrderCheckoutPageContent","OrderCompletionPageContent","AccountDetailsPageContent","AccountOnHoldContent","OrderNotesModalContent","OrderNotesButtonContent","UploadBulkOrderModalContent","ConfirmBulkOrderModalContent","UploadBulkOrderContent","ReorderModalContent","Redirect_To_Login_Page","displayErrorView","emailAddress","forgotPasswordButtonLabel","text","isAuthenticating","isFieldValidationActive","isForgotPasswordLinkSent","isForgotPasswordValidationActive","isResetPasswordValidationActive","isResetPasswordCompleted","isSendingPasswordLink","isUpdatingPassword","isWarningMessageActive","isWarningValidationActive","isErrorMessageActive","isErrorValidationActive","loginButtonLabel","loginErrorMessage","resetPasswordButtonLabel","createAccountButtonLabel","isCreatePasswordCompleted","isRegistrationValidationActive","registrationErrorMessage","forgotPasswordErrorMessage","shouldRedirect","storeDomain","storeModuleId","userId","userToken","emailToken","isEmailConfirmed","userInfo","branchInfo","moduleSettings","termsAndConditionsContent","customPage1Title","customPage1Content","customPage2Title","customPage2Content","checkoutSummaryText","customHomepage","productRetailPriceTier","label","value","currencyCode","isGettingUserDetailsAndStatus","displayReturnToLogin","tenantName","userStatus","userDetailsFetched","Fetching_Products_List","Fetch_Products_List","Fetch_Products_Error","Reset_Products_List","Product_List_View_List","Product_List_View_Gallery","Fetch_Brands_List","Reset_Brands_List","Fetch_Categories_List","Reset_Categories_List","Fetch_Categories_Error","Create_Category_Route_Objects","Reset_Category_Route_Objects","Filter_Menu_Toggle_Status","Reset_Products_Filter","Update_Products_Filter","isFetchingProducts","products","filter","filterMenuOpen","filterMenuToggledByUser","brandIds","categoryIds","brands","brandsFetched","categories","isFetchingCategories","categoriesFetched","categoryRouteObjects","numberOfCategories","message","productListViewStyle","serviceHasMore","Fetching_Product_Details","Fetch_Product_Details","Fetch_Product_Error","UpdateProductOptionDisplayPrice","Show_Product_Details_Modal","Hide_Product_Details_Modal","Set_Product_Id_To_Load","productIdToLoad","showProductDetailsModal","isFetchingProductDetails","product","productNotFound","Calculated_Promotions","Calculate_Promotions","Increment_Order_Quantity","Decrement_Order_Quantity","Set_Order_Quantity","Remove_Order_Product","Clear_Cart","Creating_Order","Create_Order_Success","Create_Order_Fail","Redirect_To_Confirmation","Redirect_To_Payment","Order_Completion_Successful","Update_Purchase_Order_Number","Update_Delivery_Instructions","Update_Delivery_Date","Update_Delivery_Address","Update_Order_Item_Notes","Delete_Order_Item_Notes","Reset_Checkout_State","Update_Order_Payment_Method","Fetching_Reorder_Details","Reorder_Details_Success","Reorder_Details_Fail","Reorder_Details_Reset","Force_Stop_Display_Placing_Order_Message","Set_Payment_Failed","orderItems","orderItemNotes","isLoading","reference","shouldRedirectToPayment","shouldContinueDisplayingPlacingOrder","orderDetails","poNumber","deliveryInstructions","deliveryDate","deliveryAddress","paymentMethod","isFetchingReorderDetails","isReorderComplete","reorderErrorMessage","reorderItemsCount","reorderUnavailableItemsCount","hidePriceWhileFetchingPromotionCalculations","isFetchingPromotions","paymentFailed","reviewPageStatus","deliveryPageStatus","billingPageStatus","confirmPageStatus","Getting_Order_History","Order_History_Success","Order_History_Fail","orderHistory","orders","totalPages","Change_Current_Category","Reset_Current_Category","Go_Back","category","name","subCategories","goBack","Get_Freight_Options","Reset_Freight_Options","Set_Selected_Freight_Zone","Reset_Selected_Freight_Zone","Set_Selected_Freight_Tier","Reset_Selected_Freight_Tier","Set_Selected_Freight_Tier_Attribute","Reset_Selected_Freight_Tier_Attribute","Set_Filtered_Freight_Zones","Reset_Filtered_Freight_Zones","FreightTierPriceType","freightOptionsFetched","freightOptions","freightZone","freightTier","type","Undefined","price","freightTierAttribute","minimum","maximum","freightZonesFiltered","IndexReducers","appSettingsReducer","state","arguments","length","undefined","headerTypes","_objectSpread","authReducer","action","types","payload","brandingReducer","success","identityReducer","linkSent","authTypes","productListReducer","Array","from","forEach","item","some","concat","_toConsumableArray","updatedFields","routes","productDetailsReducer","updatedOptions","productOptions","options","x","uomId","lineItemDiscount","contractPrice","match","find","option","processCheckoutReducer","pageStatus","orderReducer","groupOptions","productId","styleCode","images","taxRate","allowOverselling","totalItems","sortOptionsFunc","optionA","optionB","findIndexOfOption","_action$payload$produ","findIndex","sortedOptions","optionId","sizeId","optionAIndex","optionBIndex","findIncrementGroupName","cartProduct","productOption","productQuantity","increment","sort","incrementOrderProduct","findDecrementGroupName","decrementOrderProduct","splice","setGroupOptions","findSetGroupName","quantity","setOrderProduct","setQuantity","findRemoveGroupIndex","Number","findRemoveOptionIndex","totalOptionQuantity","quantityDifference","firstName","lastName","company","address1","address2","city","postCode","country","orderItemNote","orderItemOptionId","notes","itemNote","itemsCount","unavailableItemsCount","addProductDetailsReducerProduct","userDetailsReducer","categoryReducer","freightReducer","persistConfig","key","storage","stateReconciler","autoMergeLevel2","whitelist","Layout","_Component","_classCallCheck","_callSuper","_inherits","_createClass","_jsx","className","role","children","this","props","Component","environment","hostname","window","location","includes","endsWith","APIHost","appSettings","GetEnvironmentConfig","require","requestType","domainName","clientHostSettings","ClientHostUrls","PageRoutes","RedirectClientSideSwitchCase","login","default","authSettings","ApiHostUrls","AuthApi","GenerateSwitchCase","AuthorizeUser","RefreshUserToken","LogoutUser","identitySettings","IdentityApi","ResetPassword","CreatePassword","ForgotPassword","ConfirmEmail","GetRegisterDetails","GetUserDetails","GetUserStatus","productSettings","ProductApi","GetProductNames","GetProductsList","GetProductDetails","GetBrandsList","GetCategoriesList","GetCheckoutValidationDetail","checkoutSettings","CheckoutApi","CreateOrder","Reorder","GetOrderHistoryList","BulkImportCSV","ApproveOrder","Freight","promoMatrixSettings","PromoMatrixApi","CalculatePromotions","contactUsFormSettings","ContactUsFormApi","SendRequestEmail","ValidateReCaptchaToken","apiUrl","MobileClientUrlEndpoint","hostValue","pageRoute","GetUrlParameters","parameterSearch","urlParameters","url","GetCurrentUrl","parameter","urlValues","searchParams","get","replace","urlString","href","URL","ValidateEmailAddress","ValidateStrongPassword","password","passwordScore","GenerateTextInputValidationParameters","inputFieldId","validationFieldId","textInputValidationParameters","textInputField","document","getElementById","textInputValidationField","GeneratePasswordValidationParameters","passwordMeterContainerClass","passwordValidationParameters","passwordInputField","passwordValidationField","passwordMeterContainer","getElementsByClassName","DisplayFailValidation","inputTarget","validationField","parentNode","classList","add","remove","innerText","ClearFailValidation","StripHTMLFromInputs","htmlValue","ApiUtil","token","headers","persistedStorage","localStorage","getItem","persistedStorageObject","JSON","parse","config","authHost","apiUtil","ClearIdentityErrorMessages","dispatch","GetRefreshToken","axios","post","AuthAPI","then","res","data","catch","LogoutB2BUser","DefaultHeaders","identityTypes","brandingTypes","productListTypes","productDetailsTypes","categoryTypes","freightTypes","DiscountSourceType","apiHost","GetProductImageUrl","imagePath","WebFilesHost","GroupByKey","array","f","groups","group","stringify","push","RoundStockNumber","stockNumber","Math","floor","GetTotalProductOptionPrice","uomSize","discountSource","PriceTier","retailPrice","SpecialPrice","baseUnitPrice","IsThereAValidUnitDiscountBetweenPriceAndSpecialPrice","specialPrice","GetLineItemDiscount","abs","FormatIncomingDate","date","Date","mo","Intl","DateTimeFormat","month","format","da","day","PromotionsHelper","compareToSpecialPrice","overallArray","productCategories","sizeRangeId","unitPrice","uomPrice","isNaN","lineDiscount","priceBreakId","stockId","skuRangeId","categoryIdArray","appliedDiscounts","total","lineItems","i","rowId","basket","orderItem","basketLineItem","matchingProductOption","GetMatch","promotions","contractPrices","promotion","getContractPrice","matchingPromo","discount","lineItem","promoDescriptions","isArray","contractPricePromoDescriptions","ShouldShowPromotionDescriptions","quantityRange","PaymentMethodType","cancel","CancelToken","source","getState","_state$identityReduce","_state$identityReduce2","productDetails","itemsForPromotion","_","cloneDeep","priceTier","orderLineItems","MapOrderItemsForPromotions","_getState$authReducer","AssignRowIdToOrderedLineItems","calcPromoRequest","GetModuleId","listOfOrderLines","axiosConfig","cancelToken","PromoMatrixAPI","_orderItemsUpdatedWit","orderItemsUpdatedWithPromoValues","MapBasketBackToOrderItems","productsWithQuantity","_x$productOptions","error","isCancel","response","status","IncrementOrderQuantity","SetOrderQuantity","RemoveOrderProduct","ClearCart","ResetCheckoutState","UpdateOrderPaymentMethod","ForceStopDisplayingPlacingOrder","SetOrderFailAndErrorMessage","RestrictedPage","_componentDidMount","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this$props$userRestr","wrap","_context","prev","next","userRestrictions","orderedItems","stop","apply","_this$props","component","rest","_objectWithoutProperties","_excluded","Route","render","Redirect","to","pathname","connect","_state$orderReducer","GetTenantImageUrl","AssetsHost","getStoreLogo","_state$brandingReduce","getIsCustomHomepageEnabled","_state$identityReduce3","enabled","getCustomHomepageSettings","_state$identityReduce4","_state$identityReduce5","defaultPaymentPortalEnabled","active","defaultOnAccountEnabled","getUserIsOnHold","accountOnHold","getUserRemainingCreditLimit","remainingCreditLimit","getUserInfo","getBranchInfo","_state$identityReduce6","getIsPaymentsPortalEnabled","_state$identityReduce7","_state$identityReduce8","_state$identityReduce9","_state$identityReduce10","paymentOptions","paymentPortalEnabled","getUserDepositPercentage","_state$identityReduce11","_state$identityReduce12","depositPercentage","getIsOnAccountOptionEnabled","_getIsPaymentsPortalE","_state$identityReduce13","_state$identityReduce14","_state$identityReduce15","_state$identityReduce16","onAccountEnabled","getUserCurrency","_state$identityReduce17","_state$identityReduce18","_state$identityReduce19","getUserPriceTier","_state$identityReduce20","_state$identityReduce21","getUserInfoFetched","_state$identityReduce22","getRetailPriceTierCurrency","_state$identityReduce23","_state$identityReduce24","_state$identityReduce25","CategoriesRoute","CustomHompepageRoute","Index","isCustomHomepageEnabled","useSelector","LockIcon","_this","fillColor","FillColor","setState","cls1","fill","_jsxs","xmlns","width","height","viewBox","d","style","transform","ErrorCrossIcon","cls2","stroke","strokeWidth","strokeLinecap","strokeLinejoin","strokeMiterlimit","Cin7FormHeading","pageTitle","pageTitleClass","pageSubtitle","pageSubtitleClass","enableIcon","iconType","RenderIcon","iconValue","_Fragment","SidePageBanner","customerBanner","backgroundImg","CoverClientB2B","b2bCoverImageStyle","backgroundImage","EmailIcon","CircleTickIcon","strokeColor","cx","cy","r","AlertCircleIcon","Cin7ConfirmationBox","boxIcon","boxMessage","boxType","boxSubMessage","RenderConfirmationIcon","host","GetStoreInformation","brandInfo","ResetContactUsForm","Loading","inLine","takeOver","LoadingSpinnerIcon","_this$props$size","size","LoadingSpinner","OpenBox","Cin7Logo","version","fillRule","points","Image","altText","logo","Placeholder","Img","src","alt","loader","unloader","StoreHeading","logoImageUrl","ClearInputIcon","InputField","_len","args","_key","_inputOnFocus","currentTarget","_inputOnBlur","targetFormGroup","_onChange","onChange","clearInputButton","querySelector","_onClear","preventDefault","targetInput","onClear","focus","fieldErrorId","fieldId","fieldIndex","fieldName","fieldType","fieldClass","fieldLabel","formGroupClass","FormGroup","Input","placeholder","onFocus","onBlur","tabIndex","Label","for","Button","onClick","PasswordMeter","_renderPasswordLabel","testedResult","score","passwordEntry","passwordIncrement","testedPassword","zxcvbn","max","ShowPasswordIcon","HidePasswordIcon","PasswordField","target","passwordScoreReset","_revealPassword","prevState","revealPassword","_this$state","passwordStrength","ButtonField","disableButton","buttonLabel","buttonClass","buttonType","disabled","LoginForm","emailValidationParameters","passwordvalidationParameters","inputField","_defineProperty","emailAddressField","_onSubmit","credentials","loginPasswordField","LoginB2BUser","logoutMessage","auth","LogoutClearState","Form","onSubmit","Link","b2bHelpers","isValidEmail","userCredentials","Email","Password","errorStatus","errorDescription","errors","description","startsWith","str","word","lastIndexOf","SignIn","signIn","_state$from","search","SignInWithRouter","withRouter","ForgotPasswordForm","validationParameters","forgotPassword","SendResetPasswordLink","resetPasswordLinkData","IdentityAPI","ForgotPasswordClearState","ForgotPasswordWithRouter","ResetPasswordForm","passwordMeterField","ResetUserPassword","newPasswordField","resetPassword","ReturnToLoginLink","newPassword","isPasswordAnEmail","resetPasswordData","UserId","Code","ModuleId","_error$response","ResetPasswordClearState","ResetPasswordWithRouter","ResetPasswordConfirmation","NavLink","ForgotPasswordConfirmation","FailedView","_runAction","title","_this2","hideBanner","tryAgainAction","FailedViewNotice","ev","SidePageBannerFooter","rel","ContactUsFooter","history","useHistory","useDispatch","Login","_renderPageTitles","pathName","parentPath","_resetBranding","pagePath","path","Cin7B2BHeading","pageView","Switch","exact","CreatePasswordConfirmation","RegistrationClearState","registration","CreateAccountForm","passwordUpdated","createPasswordData","Registration","_getUserDetails","userProfileDetails","ConfirmUserEmail","GetRegisteredUserDetails","InvitationText","getUserEmail","globalTypes","confirmEmailData","EmailToken","emailConfirmed","params","Register","PageNotFound","getCategoryPaths","parentCategory","categoryArray","totalList","c","encodedName","encodeURIComponent","findCategoryFromId","cat","_step","_iterator","_createForOfIteratorHelper","s","n","done","result","err","findParent","categoryToSearch","childId","_step2","_iterator2","_step3","_iterator3","findElders","defaultParent","familyArray","parent","unshift","useMatchingCategory","useDefaultParent","useCategoryRouteObjects","variable","variables","substring","split","pair","getQueryVariable","segments","Boolean","categoryRoutes","pathToMatch","_step4","_iterator4","route","localeCompare","checkEquivalenceOfPath","join","getAllDescendents","sub","useCurrentCategory","useMemo","page","query","filters","_filters$brandIds","_filters$categoryIds","postBody","keyword","ProductsAPI","unauthorizeIfNeeded","UpdateProductsFilter","DisplayFilterMenu","toggledByUser","ProductsListBrandFilter","_clearFilter","productsList","brandSearchParameter","_applyFilter","_onChangeBrand","checked","currentBrandIds","slice","index","valueOf","_onSearchBrand","toLowerCase","String","prevProps","CloseIcon","variant","Accordion","elevation","defaultExpanded","AccordionSummary","Typography","AccordionDetails","InputProps","startAdornment","SearchIcon","endAdornment","CloseCircleIcon","brand","FormControlLabel","control","Checkbox","toString","labelPlacement","getOrderItemOptionNote","getOrderItemCount","_state$orderReducer2","reduce","counter","cart","getOrderReducer","getReorderItemsCount","_state$orderReducer3","getReorderUnavailableItemsCount","_state$orderReducer4","getIsFetchingReorderDetails","_state$orderReducer5","getIsReorderComplete","_state$orderReducer6","getReorderErrorMessage","_state$orderReducer7","getOrderErrorMessage","_state$orderReducer8","getIsFetchingPromotions","_state$orderReducer10","getCartItemsTotal","_state$orderReducer11","totalItemsPrice","totalPrice","getCartDiscountTotal","_state$orderReducer12","totalDiscount","getFullOrder","getOrderAddressOrUserAddress","_state$orderReducer13","_state$orderReducer14","getOrderFirstNameOrUserFirstName","_state$orderReducer15","_state$orderReducer16","getOrderLastNameOrUserLastName","_state$orderReducer17","_state$orderReducer18","getBillingAddress","billingAddress","getShouldRedirectToConfirmation","_state$orderReducer19","getShouldRedirectToPayment","_state$orderReducer20","getPaymentFailed","_state$orderReducer21","getPaymentUrl","_state$orderReducer22","paymentsPortalAddress","GetPaymentsPortalAddress","currentUrl","orderId","orderStageIfPaymentMadeInFull","orderStage","returnUrl","port","getPaymentMethod","_state$orderReducer23","_state$orderReducer24","getCartItemsWeightTotal","_state$orderReducer25","totalWeight","weight","round","getCartItemsHaveWeight","_state$orderReducer26","every","useCurrentFreightZone","useCurrentFreightTier","useCurrentFreightTierAttribute","useCurrentFreightPrice","tier","attribute","_attribute$price","Weight","Value","FlatRate","useHasFreightOptions","fetched","useHasFilteredZones","FormatMoney","_value","locale","toFixed","NumberFormat","currency","minimumFractionDigits","FormatAmount","GetOrderTotalTax","freightPrice","totalTax","defaultTaxRate","taxStatus","totalOptionTax","productTaxRate","optionTotal","GetTaxLabel","taxLabel","FormatDate","ye","year","PaymentsPortalAddress","getIsPayAccountOnHold","userIsOnHold","cartTotal","PriceDisplay","userCurrencyCode","RetailPriceDisplay","retailCurrencyCode","ProductPrice","minPrice","maxNumber","ListPrice","maxPrice","checkForSameMinAndMaxPrice","ListContractPrice","minRangeContractPrice","maxRangeContractPrice","ListSpecialPrice","minSpecialPrice","maxSpecialPrice","checkForRetailPrice","DynamicTitleSection","dynamicClass","DynamicTitle","StockIndicator","_identity$moduleSetti","sizes","identity","remainingOptionStock","optionGroupStock","stock","incomingStockDate","incomingDate","indicators","stockDisplay","isNonStock","totalStock","a","b","oversellStockIndicator","remainingStock","_identity$moduleSetti2","ArrowRightIcon","_state$productListRed","_ref","OpenAction","ProductTile","productImageUrl","image","medium","hasPromotions","ProductPromotionsBanner","hasMultipleOptions","ProductsListItems","_useState","useState","_useState2","_slicedToArray","currentPage","setCurrentPage","_useState3","_useState4","hasMore","setHasMore","useEffect","loadMore","searchParameter","ProductList","sortedList","setProductDetailId","InfiniteScrollLoader","InfiniteScrollResults","InfiniteScroll","dataLength","scrollableTarget","HideProductDetailsModal","ShowProductDetails","ShowProductDetailsModal","CaretDownIcon","MoreActionsDropdown","_closeMenu","dropdownOpen","_toggleActionsMenu","actions","MoreActionsPanel","ProductInfoCard","NextArrowIcon","circleOpacity","fillColorCirlce","fillColorArrow","opacity","PrevArrowIcon","ProductGalleryModal","_handleKeyPress","event","_props","closeModal","prevImage","nextImage","totalImages","galleryIndex","currentImage","bind","galleryImages","addEventListener","removeEventListener","renderGalleryOptions","full","nextImageClick","prevImageClick","ProductGallery","_switchImageView","productImage","clickedSrcImage","currentIndex","getAttribute","thumbnailElements","querySelectorAll","contains","selectedImage","parseInt","_toggleGalleryViewClick","_toggleGalleryView","activeModal","_prevImageClick","_prevImage","currentImages","productImages","toggle","imageIndex","_nextImageClick","_nextImage","currentImageCount","imageUrl","productThumbImageUrl","thumbnail","galleryModalProps","innerWidth","_state$productDetails","getProductDetailsId","_state$productDetails2","getProductDetailsProductId","_state$productDetails3","_state$productDetails4","getProductDetailsDescription","_state$productDetails5","_state$productDetails6","HtmlBlock","__html","content","htmlBlock","indexOf","dangerouslySetInnerHTML","rawDescription","ProductTeaser","showMore","setShowMore","setHtmlBlock","ProductDetailsCart","cartItems","discountedPromoPrice","CircleDecrementIcon","CircleIncrementIcon","ProductOptionQuantity","_this$props$product$a","_incrementQuantity","getCartQuantity","_decrementQuantity","DecrementOrderQuantity","_updateQuantity","updateState","currentQuantity","maxQuantity","getMaxQuantity","_inputQuantity","_updateInputQuantity","hasFocus","order","orderProduct","_this$props2","remaining","childItemProductInCart","childItemsInCart","itemOption","normalQuantity","internalQuantity","pattern","setFocus","updateQuantity","getIsFetchingCategories","ProductOptionPriceRange","getProductOptionsByOptionId","hasSpecialPrice","productOptionsHaveSpecial","getOptionsMinPrice","getOptionsMaxPrice","getOptionsMinSpecialPrice","getOptionsMaxSpecialPrice","ProductOptionPrice","_price","forceHideSpecialPrice","productDetailsReducerProduct","hidePriceWhenNotAddingProductDetailsReducerProductToCalcPromos","hidePriceWhenAddingProductDetailsReducerProductToCalcPromos","defaultProps","ProductOptionSectionInfo","productOptionId","optionGroup","totalQuantity","ExpandArrowIcon","ProductStandardPromotion","descriptions","_ref$showHeaderTitle","showHeaderTitle","pd","ReactHtmlParser","promotionDescription","ProductContractPricePromotion","cpd","ProductsPromotionsTooltip","_React$useState","React","_React$useState2","anchorEl","setAnchorEl","handlePopoverClose","open","onMouseEnter","onMouseLeave","Popover","onClose","ProductOptionUOMUnitPrice","_option$uomSize","ProductOptionSection","_toggleSizes","_toggleImageModalClick","_toggleImageModal","imageModalOpen","optionImageItem","activeClass","standardPromotions","contractPricePromotions","ProductOptionAction","ProductOptionInner","productOption3","_productOption3$size","option1","option2","option3","UOMStockIndicator","ShouldShowContractPriceDescriptions","_parentItem$commonPro","_parentItem$commonPro2","optionImageUrl","parentItem","commonPromotions","standardPromotionDescriptions","hasUoms","optionCode","ProductOptionsList","groupedOptions2","ProductPromotionsSection","ProductAttachment","attachment","attachmentLink","ProductDetailsStickyFooter","CloseAction","go","goBackSettings","specificRoute","onClickKeepShopping","onClickCheckout","ProductDetailsContent","_this$props$productDe","_this$props$productDe2","_setDefaultPageTitle","_productDetails$produ","_productDetails$produ2","_productDetails$produ3","_productDetails$produ4","commonPromotionData","contractPriceDescriptions","EmptyBox","ProductNotFound","ProductDetailsModal","_resetProductQuantity","_openNewTab","ProductsList","_props$location$state","_setProductDetailId","productDetailId","ResetProductsList","parameters","decodeURIComponent","_prevProps$location$s","_this$props$location$","refreshProductsList","_this$props$location$2","Dialog","fullWidth","reason","maxWidth","ChangeCurrentCategory","newCategory","SetGoBack","Chip","onDelete","_props$color","color","_props$deletable","deletable","_props$className","_props$variant","styles","backgroundColor","border","Category","currentCategory","matchingCategory","cro","viewType","brandsAvailable","setSearchParameter","elders","breadcrumbs","onClickBreadcrumb","categorySelected","_cro$find","newPath","routeObject","_x","crumbList","crumbCategory","ToggleProductListView","brandId","_brands$find","removeBrandFilter","QuoteIcon","UserIcon","LogoutIcon","GenericIcon","ToggleSideMenu","ResetSideMenu","bem","BemHelper","IssuesCardVariant","IssuesCard","sections","block","element","section","issues","gutterBottom","ConfirmBulkOrderModal","orderItemCount","hasErrors","csvReadErrors","importErrors","stockErrors","errorSections","rowIndex","sku","barcode","onCloseClick","DialogContent","Divider","onReuploadClick","stockWarnings","Warning","warning","hasSuccessfullRows","ActionCard","actionButtonLabel","icon","AddToCartIcon","onActionClick","onAddToCart","UploadIcon","ReplaceCartIcon","onReplaceCart","useStyles","makeStyles","root","borderRadius","padding","fontFamily","fontSize","fontWeight","minWidth","UploadBulkOrderModal","classes","UploadBulkOrderModalText","onDownloadTemplateClick","light","FileUploader","uploadButtonText","dragAndDropPromptText","dragAndDropPromptSubText","onDrop","onUpload","onUploadCancel","uploading","uploadingButtonText","uploadingText","UploadBulkOrder","importCSV","downloadTemplate","onImportSuccess","showUploadBulkOrder","setShowUploadBulkOrder","showConfirmBulkOrder","setShowConfirmBulkOrder","_useState5","_useState6","setUploading","_useState7","readErrors","_useState8","importIssues","setImportIssues","_useState9","_useState10","importedOrder","setImportedOrder","canceledUploadRef","useRef","canceled","addToCart","addImportedOrderToCart","orderOptions","quantityOrdered","cancelUpload","current","files","failedReadRecords","failedImportRecords","stockIssues","getStockIssues","shouldShowConfirmationModal","_BulkImportCSV","file","fileFormData","FormData","append","CheckoutAPI","sent","t0","abrupt","Promise","reject","useIsWindowSmall","windowSize","setWindowSize","handleResize","innerHeight","useWindowSize","NavigationMenu","smallScreen","grandparent","setGrandparent","initialParent","initialCategory","currentParent","setCurrentParent","scrollingElement","newGrandparent","newMatch","onClickCategoryMenuItem","childCategory","toPath","back","_categoryRouteObjects","scrollTo","behavior","top","left","_x2","_x3","onClickGoBack","_ref2","_callee2","newParent","_context2","Menu","TransitionGroup","transitionname","CSSTransition","addEndListener","node","timeout","classNames","child","SideMenu","_closeMenuOnNavigate","_toggleMenu","_logoutUser","showBulkOrder","_document$querySelect","header","hasNameAndCompany","stickyContainerHeight","clientHeight","ProfileInfo","TermsContainer","AccountLinks","UploadSimpleIcon","Desktop","Mobile","paddingBottom","download","RouterWrapped","MiniCartTax","HeaderSearch","onClickSearchBox","ClearInputBoldIcon","ProductNameSearch","_ProductNameSearch","searchCriteria","SearchModal","setQuery","fetching","setFetching","setError","autoCompleteResults","setAutoCompleteResults","wrapperRef","handleClickOutside","_wrapperRef$current","fetchProductNames","mappedProductOptions","p","finish","debouncedFetchProductNames","debounce","_handleSearch","_handleOptionSelected","_navigate","withBoldMatchedChars","regex","RegExp","escapeRegExp","ref","autoFocus","MenuIcon","CartIcon","Header","setActiveModal","maxTotalItems","totalCartItems","cartItemsTotal","toggleModal","onClickLink","totalCartItemsDisplay","BackArrowIcon","GoBack","goBackAttributes","RenderButton","linkText","ReturnPanel","GoBackButton","ProductDetail","ProductFilterBackground","_productsList$filter","CustomPage1","setPageTitle","CustomPage2","TermsAndConditions","SellerContent","pageHeading","AccountOnHoldBanner","userRemainingCreditLimit","isPaymentsPortalEnabled","AccountDetails","email","ReorderModal","orderRef","orderItemsCount","count","unavailableCount","orderOption","ReorderAction","align","OrderTile","_reorder","OpenReorderDialog","documentLinkAbsolutePath","createdDate","isDispatched","customerOrderNumber","outstandingAmt","OrderHistoryList","showShortenedPagination","_changePage","nextActivePage","activePage","searchTerm","_onSearch","term","_openReorderDialog","reorderModalOpen","reorderId","reorderRef","_closeReorderDialog","userDetails","OrderHistoryTable","Table","striped","borderless","onKeyDown","Pagination","shape","siblingCount","numberOfPagesAvailable","OrderHistory","Account","_getPageHeading","useHomepageImageUrl","EmptyCategoryImage","CustomHomepageImage","CustomHomepageContent","customHomepageSettings","Banner","_banner$imageName","currentHost","banner","homepageImagePath","bannerImagePath","GetHomepageImageUrl","imageName","bannerImage","imageAltText","imageLink","linkIsInternal","origin","onClickCategoryTile","FeaturedCategories","heading","featuredCategoriesHeading","featuredCategories","activeCategories","categoryID","_category$imageName","categoryId","GetCategoryName","categoryRoute","GetCategoryLink","CustomHomepage","isUserInfoFetched","CheckoutFooter","loading","setLoading","orderData","freightDescription","zone","useCurrentFreightDescription","hasFreightOptions","calculatingPromotions","hasFilteredZones","createPortal","body","displayCompleteButton","ShouldContinue","shouldContinue","finally","_order$orderDetails","_order$orderItemNotes","_option$sizeId","_option$uomId","getFullYear","getMonth","getDate","toUTCString","PayOnline","EstimatedTimeOfDelivery","DeliveryInstructions","CustomerOrderNumber","FreightPrice","FreightDescription","EmptyCart","RemoveIcon","OrderOptionNotes","itemOptionNote","itemOptionId","hasNote","AddNoteModal","_props$note","note","textareaRef","currentNote","setNote","_textareaRef$current","maxLength","deleteNote","updateNote","AddNoteButton","displayModal","setDisplayModal","OrderDetailProductOption","_removeCartProduct","hasMultipleOptionGroups","isSizeOption","totalOptionsPrice","totalOptionsDiscount","totalOptionsQuantity","optionHasMultipleOptions","singleOption","hasNotes","labelHasContent","OrderDetailProductTile","_item$productOptions$","totalProductPrice","hasUomOptions","groupedOptions","itemOptions","_option$0$sizeId","OrderReviewDetailsList","FreightPriceDisplay","selectedFreightTier","selectedFreightTierAttrubute","currentFreightPrice","ToBeConfirmed","TotalsPanel","cartGrandTotal","grandTotal","useCartGrandTotal","taxTotal","useCartTaxTotal","discountTotal","ProductCheckoutValidation","_ProductCheckoutValidation","Cart","setStockWarnings","validateStock","productIds","validationResult","all","productResultOption","cartProductOption","availableQuantity","productCode","productName","DeliveryAddressIcon","clipRule","BillingAddressIcon","countryList","EditAddressModal","_onChangeFirstName","_onChangeLastName","_onChangeCompany","_onChangeAddress1","_onChangeAddress2","_onChangeCity","_onChangeState","_onChangePostCode","_onChangeCountry","_updateAddress","UpdateAction","isEditWindowOpen","address","countries","Select","defaultValue","openUpwards","AddressPanel","editModalOpen","setEditModalOpen","addressIcon","toggleEditModal","FreightOptionIcon","ResetSelectedFreightZone","ResetSelectedFreightTier","FreightPanel","cartItemsHaveWeight","cartWeight","getAvailableTierAttribute","useCallback","_tier$conditions","conditions","condition","freightZones","console","log","_freightReducer$freig","_freightReducer$freig2","availableCondition","filteredZones","_zone$tiers","tiers","getOnlyWeightTiers","SetFilteredFreightZones","selectedZone","selectedTier","handleChangeZone","zoneId","SetSelectedFreightZone","handleChangeTier","selectedAttribute","tierId","SetSelectedFreightTier","availableAttribute","FreightOptionsContent","RadioGroup","Radio","priceText","getPriceText","PageContent","DeliveryInstructionsPanel","UpdateDeliveryInstructions","_onChangeDeliveryDate","UpdateDeliveryDate","editMode","minDate","setDate","hideDeliveryDateField","SemanticDatepicker","clearOnSameDateClick","pointing","showToday","showOutsideDays","deliveryInstructionsInput","dispath","deliveryDateInput","Delivery","deliveryAddressInput","PayOnlinePaymentIcon","PayOnlinePaymentOptionButton","payOnlineMethodCode","payOnlineChecked","onClickEventHandler","DecoratedRadioButton","css","OnAccountPaymentIcon","OnAccountPaymentOptionButton","onAccountMethodCode","onAccountChecked","PaymentPanel","isUserOnHold","onAccountPaymentConfig","paymentPortalPaymentConfig","isOnAccountOptionEnabled","userDepositPercentage","selectedPaymentMethod","OnAccount","displayOnAccountPaymentOptionFirst","displayOnAccountPaymentOption","getCurrentPaymentMethod","currentPaymentMethod","setCurrentPaymentMethod","setOnAccountChecked","setPayOnlineChecked","updatePaymentMethod","marginBottom","InvoiceParticularPanel","_onChangePoNumber","UpdatePoNumber","poNumberInput","Billing","Checkout","cartItemsCount","cartError","shouldRedirectToConfirmation","hasCustomCheckoutSummary","paymentUrl","didPaymentFail","CustomCheckoutSummary","_ApproveAndProcessOrder","OrderCompletion","fullOrder","ApproveAndProcessOrder","Orders","visible","hideModal","ProductDetailsModalContent","ContactUsForm","brandingInfo","setName","setEmail","phone","setPhone","companyName","setCompanyName","setMessage","_useState11","_useState12","nameHasValidationError","setNameHasValidationError","_useState13","_useState14","emailHasValidationError","setEmailHasValidationError","_useState15","_useState16","messageHasValidationError","setMessageHasValidationError","_useState17","_useState18","emailValidationErrorMessage","setEmailValidationErrorMessage","_useState19","_useState20","recaptchaValidationError","setRecaptchaValidationError","_useState21","_useState22","recaptchaClicked","setRecaptchaClicked","_useState23","_useState24","reCaptchaTokenExpired","setReCaptchaTokenExpired","_useState25","_useState26","recaptchaValidationErrorMessage","setRecaptchaValidationErrorMessage","handleSubmit","hasValidationErrors","validateMandatoryFields","contactFormData","ContactUsFormAPI","displayEmailError","Grid","container","spacing","xs","sm","md","FormControl","TextField","inputProps","ReCAPTCHA","sitekey","GoogleRecaptchaSiteKey","reCaptchaValidationData","onExpired","ContactUs","reload","ContactUsConfirmation","App","_APIHost$GetEnvironme","GetEnvironment","clientToken","datadogRum","init","applicationId","site","service","env","process","sessionSampleRate","sessionReplaySampleRate","trackUserInteractions","trackResources","trackLongTasks","defaultPrivacyLevel","allowedTracingUrls","startSessionReplayRecording","datadogLogs","forwardErrorsToLogs","ThemeProvider","theme","B2BTheme","Products","baseUrl","getElementsByTagName","createBrowserHistory","basename","_configureStore","rootReducer","combineReducers","router","connectRouter","persistedReducer","persistReducer","middleware","thunk","routerMiddleware","store","createStore","composeWithDevTools","applyMiddleware","persistor","persistStore","configureStore","initialReduxState","rootElement","ReactDOM","Provider","PersistGate","ConnectedRouter"],"mappings":"s1ZAAA,IAAIA,EAAM,CACT,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,IAChB,eAAgB,KAIjB,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,EAC5B,CACA,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,CACP,CACA,OAAOP,EAAIE,EACZ,CACAD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,EACpB,EACAC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK,G,2ZC9CPY,EAA0B,0BAC1BC,EAAyB,yBCKzBC,EAAqC,CAC9CC,YAAY,GCPHC,EAAqB,qBACrBC,EAAuB,uBACvBC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A,UACA,UACA,QACA,YACA,SACA,YACA,UACA,aACA,OACA,YACA,WACA,SACA,gBACA,SACA,QACA,oCACA,WACA,WACA,YACA,UACA,UACA,QACA,YACA,OACA,OACA,UACA,cACA,SACA,QACA,UACA,QACA,SACA,SACA,aACA,QACA,WACA,8CACA,SACA,aACA,mCACA,SACA,UACA,UACA,UACA,QACA,gBACA,YACA,aACA,QACA,aACA,SACA,WACA,WACA,OACA,QACA,mBACA,aACA,aACA,YACA,UACA,SACA,iCACA,UACA,SACA,WACA,aACA,aACA,UACA,aACA,UACA,UACA,QACA,QACA,cACA,gBACA,cACA,YACA,QACA,UACA,OACA,iBACA,2BACA,SACA,OACA,WACA,QACA,sBACA,SACA,mBACA,WACA,OACA,cACA,WACA,SACA,WACA,cACA,QACA,8BACA,UACA,SACA,SACA,aACA,sBACA,+CACA,wBACA,cACA,eACA,4BACA,mCACA,QACA,aACA,wBACA,eACA,UACA,SACA,aACA,eACA,YACA,eACA,WACA,WACA,kBACA,UACA,eACG,+CACA,cACH,cACA,QACA,YACA,QACA,WACA,yBACA,SACA,cACA,uBACA,SACA,aACA,+BACA,WACA,cACA,OACA,UACA,QACA,sBACA,UACA,SACA,eACA,2BACA,SACA,SACA,UACA,uBACA,iBACA,uCACA,2BACA,UACA,aACA,UACA,YACA,WACA,yBACA,sBACA,oBACA,iBACA,QACA,SACA,WACA,oBCbcC,I,OAvMO,SAAAz/C,GAClB,SAAAy/C,EAAY/+C,GAAwB,IAAD2U,EAa7B,OAb6BpV,aAAA,KAAAw/C,IAC/BpqC,EAAAnV,aAAA,KAAAu/C,EAAA,CAAM/+C,KA2HVg/C,mBAAqB,SAACp3D,GAClB+sB,EAAKG,SAAS,CACVjX,UAAWjW,EAAE40B,OAAOpsB,OAE5B,EAACukB,EAEDsqC,kBAAoB,SAACr3D,GACjB+sB,EAAKG,SAAS,CACVhX,SAAUlW,EAAE40B,OAAOpsB,OAE3B,EAACukB,EAEDuqC,iBAAmB,SAACt3D,GAChB+sB,E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,IACAC,YAAiBxrC,IAGbyrC,EAAQC,sBACZN,EACA3kE,EACAklE,+BAAoBC,kBAAep9C,WAAC,EAAG88C,KAMzC,MAAO,CAAEG,QAAOI,UAFEC,YAAaL,GAGjC,CsMnB6BM,CAAe/rC,GADvBzhB,OAAOytD,mBACpBP,GAAKV,GAALU,MAAOI,GAASd,GAATc,UAITI,GAAczoD,SAASC,eAAe,YAE5CyoD,IAASn9C,OACPjR,eAACquD,IAAQ,CAACV,MAAOA,GAAMxtD,SACrBH,eAACsuD,KAAW,CAAClV,QAAS,KAAM2U,UAAWA,GAAU5tD,SAC/CH,eAACuuD,IAAe,CAACrsC,QAASA,GAAQ/hB,SAChCH,eAACorD,GAAG,UAIV+C,G","file":"static/js/main.64787f3b.chunk.js","sourcesContent":["var map = {\n\t\"./bg-BG.json\": 906,\n\t\"./ca-ES.json\": 907,\n\t\"./cs-CZ.json\": 908,\n\t\"./de-DE.json\": 909,\n\t\"./el-GR.json\": 910,\n\t\"./en-US.json\": 482,\n\t\"./es-ES.json\": 911,\n\t\"./et-EE.json\": 912,\n\t\"./fi-FI.json\": 913,\n\t\"./fr-FR.json\": 914,\n\t\"./he-IL.json\": 915,\n\t\"./it-IT.json\": 916,\n\t\"./ja-JP.json\": 917,\n\t\"./ko-KR.json\": 918,\n\t\"./nb-NO.json\": 919,\n\t\"./nl-NL.json\": 920,\n\t\"./nn-NO.json\": 921,\n\t\"./pl-PL.json\": 922,\n\t\"./pt-BR.json\": 923,\n\t\"./ro-RO.json\": 924,\n\t\"./ru-RU.json\": 925,\n\t\"./sk-SK.json\": 926,\n\t\"./sv-SE.json\": 927,\n\t\"./tr-TR.json\": 928,\n\t\"./zh-CN.json\": 929\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 905;","export const Side_Menu_Toggle_Status = \"Side_Menu_Toggle_Status\";\nexport const Side_Menu_Reset_Status = \"Side_Menu_Reset_Status\";","import * as headerTypes from \"./../../Types/HeaderTypes\";\n\nexport type AppSettingsStateType = {\n    isMenuOpen: boolean;\n};\n\nexport const initialState: AppSettingsStateType = {\n    isMenuOpen: false,\n};\n\nexport const AppSettings = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): AppSettingsStateType => {\n    switch (action.type) {\n        case headerTypes.Side_Menu_Toggle_Status:\n            return {\n                ...state,\n                isMenuOpen: !state.isMenuOpen,\n            };\n        case headerTypes.Side_Menu_Reset_Status:\n            return {\n                ...state,\n                isMenuOpen: initialState.isMenuOpen,\n            };\n        default:\n            return state;\n    }\n};\n","export const Authorize_B2B_User = \"Authorize_B2B_User\";\nexport const Deauthorize_B2B_User = \"Deauthorize_B2B_User\";\nexport const Refresh_User_Token = \"Refresh_User_Token\";\nexport const Logout_Clear_State = \"Logout_Clear_State\";\nexport const Auth_Errors_Clear_State = \"Auth_Errors_Clear_State\";","import * as types from \"./../../Types/AuthTypes\";\n\nexport type AuthStateType = {\n    isAuthorize: boolean;\n    subscribedToken: string;\n    refreshToken: string;\n    errorMessage: string;\n};\n\nexport const initialState: AuthStateType = {\n    isAuthorize: false,\n    subscribedToken: \"\",\n    refreshToken: \"\",\n    errorMessage: \"\",\n};\n\nexport const AuthReducer = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): AuthStateType => {\n    switch (action.type) {\n        case types.Authorize_B2B_User:\n        case types.Refresh_User_Token:\n            return {\n                ...state,\n                isAuthorize: action.payload.isAuthorize,\n                subscribedToken: action.payload.subscribedToken,\n                refreshToken: action.payload.refreshToken,\n                errorMessage: initialState.errorMessage,\n            };\n        case types.Deauthorize_B2B_User:\n            return {\n                ...state,\n                isAuthorize: false,\n                subscribedToken: \"\",\n                refreshToken: \"\",\n                errorMessage: action.payload.errorMessage,\n            };\n        case types.Logout_Clear_State:\n            return {\n                ...state,\n                isAuthorize: initialState.isAuthorize,\n                subscribedToken: initialState.subscribedToken,\n                refreshToken: initialState.refreshToken,\n                errorMessage: initialState.errorMessage,\n            };\n        default:\n            return state;\n    }\n};\n","export const Display_Store_Brand_Info = \"Display_Store_Brand_Info\";\nexport const Display_Store_Brand_Not_Found = \"Display_Store_Brand_Not_Found\";\nexport const Reset_Brand_Info = \"Reset_Brand_Info\";\nexport const Getting_Brand_Info = \"Getting_Brand_Info\";\nexport const Update_Contact_Form_Email_Status = \"Update_Contact_Form_Email_Status\";\nexport const Reset_Contact_Form_Email_Status = \"Reset_Contact_Form_Email_Status\";\nexport const Contact_Form_Email_Requested = \"Contact_Form_Email_Requested\";\nexport const Contact_Form_Email_Request_Has_Response = \"Contact_Form_Email_Request_Has_Response\";\nexport const Update_ReCaptcha_Validation_Result = \"Update_ReCaptcha_Validation_Result\";\n","import * as types from \"../../Types/BrandingTypes\";\n\nexport type BrandingStateType = {\n    brandFound: boolean;\n    storeName: string;\n    moduleId: number;\n    loginPageImageUrl: string;\n    loginBannerImageUrl: string;\n    isGettingBrandInfo: boolean;\n    contactFormEnabled: boolean;\n    contactUsEmailStatus: boolean;\n    isContactFormEmailRequested: boolean;\n    isContactFormEmailRequestHasResponse: boolean;\n    isReCaptchaValidated: boolean;\n};\n\nconst initialState: BrandingStateType = {\n    brandFound: false,\n    storeName: \"\",\n    moduleId: 0,\n    loginPageImageUrl: \"\",\n    loginBannerImageUrl: \"\",\n    isGettingBrandInfo: false,\n    contactFormEnabled: false,\n    contactUsEmailStatus: false,\n    isContactFormEmailRequested: false,\n    isContactFormEmailRequestHasResponse: false,\n    isReCaptchaValidated: false,\n};\n\nexport const BrandingReducer = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): BrandingStateType => {\n\n    switch (action.type) {\n        case types.Display_Store_Brand_Info:\n            return {\n                ...state,\n                storeName: action.payload.storeName,\n                moduleId: action.payload.moduleId,\n                loginPageImageUrl: action.payload.loginPageImageUrl,\n                loginBannerImageUrl: action.payload.loginBannerImageUrl,\n                brandFound: true,\n                isGettingBrandInfo: false,\n                contactFormEnabled: action.payload.contactFormEnabled,\n            };\n        case types.Display_Store_Brand_Not_Found:\n            return {\n                ...state,\n                storeName: initialState.storeName,\n                moduleId: 0,\n                loginPageImageUrl: action.payload.loginPageImageUrl,\n                loginBannerImageUrl: action.payload.loginBannerImageUrl,\n                brandFound: false,\n                isGettingBrandInfo: false,\n                contactFormEnabled: action.payload.contactFormEnabled,\n            };\n        case types.Reset_Brand_Info:\n            return {\n                ...state,\n                storeName: initialState.storeName,\n                moduleId: 0,\n                loginPageImageUrl: \"\",\n                loginBannerImageUrl: \"\",\n                brandFound: false,\n                isGettingBrandInfo: false,\n                contactFormEnabled: false,\n            };\n        case types.Getting_Brand_Info:\n            return {\n                ...state,\n                isGettingBrandInfo: true,\n            };\n        case types.Update_Contact_Form_Email_Status:\n            return {\n                ...state,\n                contactUsEmailStatus: action.payload.success,\n            };\n        case types.Reset_Contact_Form_Email_Status:\n            return {\n                ...state,\n                contactUsEmailStatus: false,\n                isContactFormEmailRequested: false,\n                isContactFormEmailRequestHasResponse: false,\n                isReCaptchaValidated: false,\n            };\n        case types.Contact_Form_Email_Requested:\n            return {\n                ...state,\n                isContactFormEmailRequested: true,\n            };\n        case types.Contact_Form_Email_Request_Has_Response:\n            return {\n                ...state,\n                isContactFormEmailRequestHasResponse: true,\n            };\n        case types.Update_ReCaptcha_Validation_Result:\n            return {\n                ...state,\n                isReCaptchaValidated: action.payload.success,\n            };\n        default:\n            return state;\n    }\n};\n","//Login Types\nexport const Authenticating_User = \"Authenticating_User\";\nexport const Authentication_Warning = \"Authentication_Warning\";\nexport const Authentication_Error = \"Authentication_Error\";\nexport const Login_Email_Address_Not_Valid = \"Email_Address_Not_Valid\";\nexport const Login_Reset_Initial_State = \"Reset_Login_Initial_State\";\nexport const Login_Validation_Inputs_Failed = \"Login_Validation_Inputs_Failed\";\nexport const Login_Get_User_Details = \"Login_Get_User_Details\";\nexport const Login_Reset_User_Details = \"Login_Reset_User_Details\";\n\n//Forgot Password Types\nexport const ForgotPassword_Email_Address_Not_Valid = \"ForgotPassword_Email_Address_Not_Valid\";\nexport const ForgotPassword_Fail_Sending_Link = \"ForgotPassword_Fail_Sending_Link\";\nexport const ForgotPassword_Sending_Link = \"ForgotPassword_Sending_Link\";\nexport const ForgotPassword_Send_Reset_Link = \"ForgotPassword_Send_Reset_Link\";\nexport const ForgotPassword_Clear_State = \"ForgotPassword_Clear_State\";\n\n//Reset Password Types\nexport const ResetPassword_Updating_Password = \"ResetPassword_Updating_Password\";\nexport const ResetPassword_Password_Updated = \"ResetPassword_Password_Updated\";\nexport const ResetPassword_Update_Password_Failed = \"ResetPassword_Fail_Update_Password\";\nexport const ResetPassword_Password_Validation_Failed = \"ResetPassword_Password_Validation_Failed\";\nexport const ResetPassword_Clear_State = \"ResetPassword_Clear_State\";\n\n//Registration Types\nexport const Registration_Get_Registered_User_Details = \"Registration_Get_Registered_User_Details\";\nexport const Registration_Getting_User_Details = \"Registration_Getting_User_Details\";\nexport const Registration_Getting_User_Details_Failed = \"Registration_Getting_User_Details_Failed\";\nexport const Registration_Confirm_User_Email = \"Registration_Confirm_User_Email\";\nexport const Registration_Confirm_User_Email_Failed = \"Registration_Confirm_User_Email_Failed\";\nexport const Registration_Updating_Password = \"Registration_Updating_Password\";\nexport const Registration_Password_Updated = \"Registration_Password_Updated\";\nexport const Registration_Update_Password_Failed = \"Registration_Update_Password_Failed\";\nexport const Registration_Password_Validation_Failed = \"Registration_Password_Validation_Failed\";\nexport const Registration_Clear_State = \"Registration_Clear_State\";\nexport const Registration_Get_User_Status = \"Registration_Get_User_Status\";\nexport const Registration_Get_User_Status_Failed = \"Registration_Get_User_Status_Failed\";","export const LoginPageContent = {\n    default_buttonLabel: \"Login\",\n    isAuthenticating_buttonLabel: \"Authenticating...\"\n}\n\nexport const ForgotPasswordContent = {\n    default_buttonLabel: \"Send link\",\n    isSending_buttonLabel: \"Sending...\",\n    return_linkLabel: \"Return to login\"\n}\n\nexport const ResetPasswordContent = {\n    default_buttonLabel: \"Reset password\",\n    isUpdating_buttonLabel: \"Resetting...\"\n}\n\nexport const RegistrationPageContent = {\n    default_buttonLabel: \"Create an account\",\n    default_sectionLegend: \"Please enter a password.\",\n    default_tc_0: \"By creating an account you are agreeing to our\",\n    default_tc_1: \"Terms of Service\",\n    default_tc_2: \"and\",\n    default_tc_3: \"Privacy Policy\",\n    process_buttonLabel: \"Processing...\"\n}\n\nexport const ForgotPasswordConfirmationContent = {\n    default_message: \"If the email doesn’t show up soon, check your spam folder. We sent it to\",\n    default_buttonLabel: \"Return to login\"\n}\n\nexport const ValidationMessages = {\n    error_PasswordValidation: \"Try making your password longer, for example, using random words combined into a phrase.\",\n    error_emailAsPassword: \"Looks like you've entered an email. Please enter a new password instead.\",\n    invalid_EmailAddress: \"Invalid email address\"\n}\n\nexport const B2BPageTitles = {\n    root_title: \"Cin7 B2B\",\n    registration_title: \"Create an account\",\n    products_list_title: \"Products List\",\n    product_details_title: \"Product Details\",\n    order_review_title: \"Order Review\",\n    order_cart_title: \"Cart\",\n    order_checkout_title: \"Checkout\",\n    order_completion_title: \"Order Complete\",\n    seller_terms_and_conditions_title: \"Terms and Conditions\",\n    my_account_title: \"My Account\",\n    order_history_title: \"Order History\",\n    custom_page_1_title: \"About Us\",\n    custom_page_2_title: \"Contact Us\"\n}\n\nexport const GlobalElementContent = {\n    default_returnLoginLabel: \"Return to login\",\n    default_tryAgainLabel: \"Try Again\"\n}\n\nexport const ProductsListPageContent = {\n    default_noResultsLabel: \"No products found.\"\n}\n\nexport const OrderHistoryListPageContent = {\n    default_noResultsLabel: \"No orders found.\"\n}\n\nexport const ProductDetailsPageContent = {\n    default_backButtonLabel: \"Back\"\n}\n\nexport const ProductActionsContent = {\n    default_resetQuantityLabel: \"Reset all quantities\",\n    default_openNewTabLabel: \"Open in new tab\"\n}\n\nexport const HeaderContent = {\n    default_miniCartTaxLabel: \"Tax\"\n}\n\nexport const OrderFooterContent = {\n    default_totalQuantityLabel: \"Items\",\n    default_totalDiscountLabel: \"Discount\",\n    default_totalPriceLabel: \"Total\",\n    default_totalFreightLabel: \"Freight\",\n    default_totalTaxLabel: \"Tax\"\n}\n\nexport const OrderReviewPageContent = {\n    default_quantityTitle: \"Qty\",\n    default_priceTitle: \"Price\",\n    default_discountTitle: \"Discount\",\n    default_totalTitle: \"Total\",\n    default_totalQuantityLabel: \"Total Qty\",\n    default_totalPriceLabel: \"Product Total\",\n    default_noResultsLabel: \"No items added to order.\",\n    default_emptyCartTitle: \"Your cart is empty\",\n    default_emptyCartMessage: \"Browse the store to find things to buy, or upload a bulk order if you already know what you want.\",\n    default_returntohomepageButtonLabel: \"Return to homepage\",\n    default_browseProductsButtonLabel: \"Browse products\",\n    default_uploadBulkOrderButtonLabel: \"Upload bulk order\",\n}\n\nexport const OrderCheckoutPageContent = {\n    default_totalQuantityLabel: \"Total Qty\",\n    default_totalDiscountLabel: \"Discount\",\n    default_totalTaxLabel: \"Tax\",\n    default_grandTotalLabel: \"Total to Pay\",\n    default_paymentLabel: \"Payment\",\n    default_freightLabel: \"Freight Options\",\n    default_deliveryAddressLabel: \"Delivery Address\",\n    default_billingAddressLabel: \"Billing Address\",\n    default_editDeliveryAddressMessageLabel: \"This will not change the address on file - please contact the seller for this.\"\n}\n\nexport const OrderCompletionPageContent = {\n    default_returntohomepageButtonText: \"Continue to homepage\",\n    default_returnButtonText: \"Continue to Product List\",\n    default_orderSuccessMessage: \"Order Successfully Placed\"\n}\n\nexport const AccountDetailsPageContent = {\n    default_detailsSectionHeading: \"Personal Information\",\n    default_detailsSectionNote: \"Contact the seller to update your details.\"\n}\n\nexport const AccountOnHoldContent = {\n    default_accountOnHoldMessage: \"Account on hold - please contact us to continue buying.\",\n    default_accountOnHoldPaymentsPortalMessage: \"Account on hold - please contact us to continue buying on credit.\",\n    default_accountOverCreditLimitMessage: \"Credit limit reached - please contact us to continue buying.\",\n    default_accountOverCreditLimitPaymentsPortalMessage: \"Credit limit reached - please contact us to continue buying on credit.\",\n    default_orderTotalOverCreditLimitMessage: \"Order total is over credit limit - please contact us to continue buying.\",\n    default_orderTotalOverCreditLimitPaymentsPortalMessage: \"Order total is over credit limit - please contact us to continue buying on credit.\"\n}\n\nexport const OrderNotesModalContent = {\n    default_addNoteHeader: \"Add Note\",\n    default_editNoteHeader: \"Edit Note\",\n    default_saveNoteButtonLabel: \"Save Note\",\n    default_cancelButtonLabel: \"Cancel\",\n    default_removeNoteButtonLabel: \"Remove Note\",\n}\n\nexport const OrderNotesButtonContent = {\n    default_editNote: \"Edit Note\",\n    default_addNote: \"Add Note\",\n}\n\nexport const UploadBulkOrderModalContent = {\n    default_header: \"Upload a bulk order\",\n    default_getHelp: \"Get Help\",\n    default_cancel: \"Cancel\",\n    default_prepareYourOrderTitle: \"Step 1: Prepare your order\",\n    default_prepareYourOrderMessage: \"Download the CSV template and paste in the SKUs/Codes/Barcodes for the products you want, along with how much you want to buy.\",\n    default_downloadTemplateButtonLabel: \"Download Template\",\n    default_uploadYourOrderTitle: \"Step 2: Upload your order\",\n    default_uploadYourOrderMessageDragAndDrop: \"When you are ready, save your order file and drag it to the box below. You can also click on the upload file button to continue.\",\n    default_uploadYourOrderMessageUpload: \"When you are ready, save your order file and click on the upload file button to continue.\",\n    default_uploadPrompt: \"Drag your order here to upload it\",\n    default_uploadPromptSubText: \"or click the upload file button to continue\",\n    default_uploadButtonLabel: \"Upload File\",\n    default_uploadingButtonLabel: \"Cancel\",\n    default_uploadingTitle: \"Uploading....\",\n}\n\nexport const ReviewBulkOrderContent = {\n    default_header: \"Check your bulk order\",\n    default_subtitle: \"You can double-check this before you checkout\",\n    default_addToOrderButtonLabel: \"Add to Order\",\n    default_removeButtonLabel: \"Remove\",\n}\n\nexport const ConfirmBulkOrderModalContent = {\n    default_header: \"Confirm bulk order\",\n    default_subtitle: \"How do you want to continue?\",\n    default_cancelButtonLabel: \"Cancel\",\n    default_reuploadButtonLabel: \"Re-upload file\",\n    default_reuploadTitle: \"Re-upload File\",\n    default_reuploadMessage: \"This will allow you to upload a new CSV.\",\n    default_addButtonLabel: \"Add\",\n    default_replaceButtonLabel: \"Replace\",\n    default_replaceTitle: \"Replace Cart\",\n    default_addTitle: \"Add to your Cart\",\n    default_addMessage: \"This will add the items you imported into your Cart\",\n    default_reuploadFileButtonLabel: \"Re-upload file\",\n    default_issuesTitle: \"Issues\",\n    default_warningsTitle: \"Warning\",\n    default_csvReadErrorMessage: \"We could not import the following rows to your order - please check the data format and try again\",\n    default_importErrorMessage: \"We could not add the items below to your order - please check your SKUs/Codes/Barcodes and try again\",\n    default_stockErrorMessage: \"No stock available - the following items will not be added into your Cart\",\n    default_stockWarningMessage: \"Insufficient quantity - the following items will be added with the currently available stock\",\n}\n\nexport const UploadBulkOrderContent = {\n    default_fileError: \"Unable to import the products in the uploaded file - please check the file or contact support\",\n}\n\nexport const SideMenuContent = {\n    default_bulkOrderUpload: \"Upload a Bulk Order\"\n}\n\nexport const ReorderModalContent = {\n    default_retryButtonLabel: 'Retry',\n    default_cancelButtonLabel: 'Cancel',\n    default_confirmButtonLabel: 'Confirm',\n    default_doneButtonLabel: 'Done',\n    default_addToCartNote: 'This will add to existing items in your cart.',\n}\n\nexport const SearchModal = {\n    default_autocompleteError: 'Sorry, we were unable to retrieve products.'\n}","export const Redirect_To_Error_Page = \"Redirect_To_Error_Page\";\nexport const Redirect_To_Login_Page = \"Redirect_To_Login_Page\";\nexport const Validate_Input_Field = \"Validate_Input_Field\";","import * as types from \"../../Types/IdentityTypes\";\nimport * as authTypes from \"../../Types/AuthTypes\";\nimport * as text from \"../../../Language/Default_Settings\";\nimport { Redirect_To_Login_Page } from \"../../Types/GlobalTypes\";\n\nexport type IdentityStateType = {\n    displayErrorView: boolean;\n    emailAddress: string;\n    storeName: string;\n    errorMessage: string;\n    forgotPasswordButtonLabel: string;\n    isAuthenticating: boolean;\n    isFieldValidationActive: boolean;\n    isForgotPasswordLinkSent: boolean;\n    isForgotPasswordValidationActive: boolean;\n    isResetPasswordValidationActive: boolean;\n    isResetPasswordCompleted: boolean;\n    isSendingPasswordLink: boolean;\n    isUpdatingPassword: boolean;\n    isWarningMessageActive: boolean;\n    isWarningValidationActive: boolean;\n    isErrorMessageActive: boolean;\n    isErrorValidationActive: boolean;\n    loginButtonLabel: string;\n    loginErrorMessage: string;\n    resetPasswordButtonLabel: string;\n    createAccountButtonLabel: string;\n    isCreatePasswordCompleted: boolean;\n    isRegistrationValidationActive: boolean;\n    registrationErrorMessage: string;\n    forgotPasswordErrorMessage: string;\n    shouldRedirect: boolean;\n    storeDomain: string;\n    storeModuleId: 0;\n    userId: string;\n    userToken: string;\n    emailToken: string;\n    isEmailConfirmed: boolean;\n    userInfo: {};\n    branchInfo: {};\n    moduleSettings: {\n        termsAndConditionsContent: string;\n        customPage1Title: string;\n        customPage1Content: string;\n        customPage2Title: string;\n        customPage2Content: string;\n        checkoutSummaryText: string;\n        customHomepage: CustomHomepageType | null;\n        productRetailPriceTier: RetailPriceTier;\n        // more missing from here\n    };\n    isGettingUserDetailsAndStatus: boolean;\n    displayReturnToLogin: boolean;\n    tenantName: string;\n    userStatus: number;\n    userDetailsFetched: boolean;\n};\n\nexport type PriceTier = {\n    currencyCode: string;\n    taxStatus: string;\n    defaultTaxRate: number;\n    compareToSpecialPrice: boolean;\n}\n\nexport type CustomHomepageType = {\n    enabled: boolean;\n    banner: CustomHomepageBannerType | null;\n    featuredCategoriesHeading: string | null;\n    featuredCategories: FeaturedCategoryType[] | null;\n}\n\nexport type CustomHomepageBannerType = {\n    imageName: string;\n    imageLink: string;\n    imageAltText: string;\n}\n\nexport type FeaturedCategoryType = {\n    categoryID: number;\n    imageName: string;\n    imageAltText: string;\n    sort: number;\n}\n\nexport type RetailPriceTier = {\n    label: string;\n    value: string;\n    currencyCode: string;\n}\n\nexport const initialState: IdentityStateType = {\n    displayErrorView: false,\n    emailAddress: \"\",\n    storeName: \"\",\n    errorMessage: \"\",\n    forgotPasswordButtonLabel: text.ForgotPasswordContent.default_buttonLabel,\n    isAuthenticating: false,\n    isFieldValidationActive: false,\n    isForgotPasswordLinkSent: false,\n    isForgotPasswordValidationActive: false,\n    isResetPasswordValidationActive: false,\n    isResetPasswordCompleted: false,\n    isSendingPasswordLink: false,\n    isUpdatingPassword: false,\n    isWarningMessageActive: false,\n    isWarningValidationActive: false,\n    isErrorMessageActive: false,\n    isErrorValidationActive: false,\n    loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n    loginErrorMessage: \"\",\n    resetPasswordButtonLabel: text.ResetPasswordContent.default_buttonLabel,\n    createAccountButtonLabel: text.RegistrationPageContent.default_buttonLabel,\n    isCreatePasswordCompleted: false,\n    isRegistrationValidationActive: false,\n    registrationErrorMessage: \"\",\n    forgotPasswordErrorMessage: \"\",\n    shouldRedirect: false,\n    storeDomain: \"\", //Do we need this? maybe\n    storeModuleId: 0,\n    userId: \"\",\n    userToken: \"\",\n    emailToken: \"\",\n    isEmailConfirmed: false,\n    userInfo: {},\n    branchInfo: {},\n    moduleSettings: {\n        termsAndConditionsContent: \"\",\n        customPage1Title: \"\",\n        customPage1Content: \"\",\n        customPage2Title: \"\",\n        customPage2Content: \"\",\n        checkoutSummaryText: \"\",\n        customHomepage: null,\n        productRetailPriceTier: {\n            label: \"\",\n            value: \"\",\n            currencyCode: \"\"\n        }\n    },\n    isGettingUserDetailsAndStatus: false,\n    displayReturnToLogin: false,\n    tenantName: \"\",\n    userStatus: 0,\n    userDetailsFetched: false,\n};\n\nexport const IdentityReducer = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): IdentityStateType => {\n    switch (action.type) {\n        //Login Page\n        case types.Authenticating_User:\n            return {\n                ...state,\n                isAuthenticating: true,\n                isFieldValidationActive: false,\n                isWarningMessageActive: false,\n                isErrorMessageActive: false,\n                loginButtonLabel: text.LoginPageContent.isAuthenticating_buttonLabel,\n                loginErrorMessage: \"\",\n            };\n        case types.Authentication_Warning:\n            return {\n                ...state,\n                isAuthenticating: false,\n                isFieldValidationActive: false,\n                isWarningMessageActive: true,\n                isErrorMessageActive: false,\n                loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n                loginErrorMessage: action.payload.message,\n            };\n        case types.Authentication_Error:\n            return {\n                ...state,\n                isAuthenticating: false,\n                isFieldValidationActive: false,\n                isWarningMessageActive: false,\n                isErrorMessageActive: true,\n                loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n                loginErrorMessage: action.payload.message,\n            };\n        case types.Login_Validation_Inputs_Failed:\n            return {\n                ...state,\n                isFieldValidationActive: true,\n                loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n            };\n        case types.Login_Email_Address_Not_Valid:\n            return {\n                ...state,\n                isAuthenticating: false,\n                isFieldValidationActive: true,\n                loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n            };\n        case types.Login_Reset_Initial_State:\n            return {\n                ...state,\n                isAuthenticating: false,\n                isFieldValidationActive: false,\n                loginButtonLabel: text.LoginPageContent.default_buttonLabel,\n            };\n        case types.Login_Get_User_Details:\n            return {\n                ...state,\n                userId: action.payload.userId,\n                storeModuleId: action.payload.moduleId,\n                userInfo: action.payload.userInfo,\n                branchInfo: action.payload.branchInfo,\n                moduleSettings: action.payload.moduleSettings,\n                tenantName: action.payload.tenantName,\n                userDetailsFetched: true,\n            };\n        case types.Login_Reset_User_Details:\n            return {\n                ...state,\n                userId: initialState.userId,\n                storeModuleId: initialState.storeModuleId,\n                userInfo: initialState.userInfo,\n                branchInfo: initialState.branchInfo,\n                moduleSettings: initialState.moduleSettings,\n                tenantName: initialState.tenantName,\n                userDetailsFetched: initialState.userDetailsFetched,\n            };\n        //Forgot Password Page\n        case types.ForgotPassword_Send_Reset_Link:\n            return {\n                ...state,\n                emailAddress: action.payload.emailAddress,\n                isForgotPasswordLinkSent: action.payload.linkSent,\n            };\n        case types.ForgotPassword_Sending_Link:\n            return {\n                ...state,\n                isSendingPasswordLink: true,\n                forgotPasswordButtonLabel: text.ForgotPasswordContent.isSending_buttonLabel,\n                forgotPasswordErrorMessage: \"\",\n            };\n        case types.ForgotPassword_Fail_Sending_Link:\n            return {\n                ...state,\n                isSendingPasswordLink: false,\n                forgotPasswordButtonLabel: text.ForgotPasswordContent.default_buttonLabel,\n                forgotPasswordErrorMessage: action.payload.errorMessage,\n            };\n        case types.ForgotPassword_Email_Address_Not_Valid:\n            return {\n                ...state,\n                isForgotPasswordValidationActive: true,\n            };\n        case types.ForgotPassword_Clear_State:\n            return {\n                ...state,\n                isSendingPasswordLink: initialState.isSendingPasswordLink,\n                isForgotPasswordLinkSent: initialState.isForgotPasswordLinkSent,\n                forgotPasswordButtonLabel: initialState.forgotPasswordButtonLabel,\n                forgotPasswordErrorMessage: \"\",\n            };\n        //Reset Pasword Page\n        case types.ResetPassword_Updating_Password:\n            return {\n                ...state,\n                isUpdatingPassword: true,\n                resetPasswordButtonLabel: text.ResetPasswordContent.isUpdating_buttonLabel,\n            };\n        case types.ResetPassword_Password_Updated: {\n            return {\n                ...state,\n                emailAddress: action.payload.emailAddress,\n                isResetPasswordCompleted: action.payload.isResetPasswordCompleted,\n                isUpdatingPassword: false,\n                resetPasswordButtonLabel: text.ResetPasswordContent.default_buttonLabel,\n                storeDomain: action.payload.storeDomain,\n            };\n        }\n        case types.ResetPassword_Update_Password_Failed:\n            return {\n                ...state,\n                isUpdatingPassword: false,\n                resetPasswordButtonLabel: text.ResetPasswordContent.default_buttonLabel,\n                errorMessage: action.payload.message,\n                displayReturnToLogin: action.payload.displayReturnToLogin,\n            };\n        case types.ResetPassword_Password_Validation_Failed:\n            return {\n                ...state,\n                isResetPasswordValidationActive: true,\n            };\n        case types.ResetPassword_Clear_State:\n            return {\n                ...state,\n                isUpdatingPassword: initialState.isUpdatingPassword,\n                isResetPasswordCompleted: initialState.isResetPasswordCompleted,\n                resetPasswordButtonLabel: initialState.resetPasswordButtonLabel,\n                errorMessage: \"\",\n                displayReturnToLogin: initialState.displayReturnToLogin,\n            };\n        //Registration Page\n        case types.Registration_Getting_User_Details: {\n            return {\n                ...state,\n                isGettingUserDetailsAndStatus: true,\n            };\n        }\n        case types.Registration_Get_Registered_User_Details: {\n            return {\n                ...state,\n                userId: action.payload.userId,\n                emailAddress: action.payload.emailAddress,\n                storeName: action.payload.storeName,\n                userToken: action.payload.userToken,\n                storeModuleId: action.payload.storeModuleId,\n            };\n        }\n        case types.Registration_Getting_User_Details_Failed: {\n            return {\n                ...state,\n                isGettingUserDetailsAndStatus: false,\n            };\n        }\n        case types.Registration_Confirm_User_Email: {\n            return {\n                ...state,\n                isEmailConfirmed: action.payload.isEmailConfirmed,\n            };\n        }\n        case types.Registration_Confirm_User_Email_Failed:\n            return {\n                ...state,\n                isEmailConfirmed: false,\n            };\n        case types.Registration_Updating_Password:\n            return {\n                ...state,\n                isUpdatingPassword: true,\n                isFieldValidationActive: false,\n                isRegistrationValidationActive: false,\n                isWarningValidationActive: false,\n                createAccountButtonLabel: text.RegistrationPageContent.process_buttonLabel,\n            };\n        case types.Registration_Password_Updated: {\n            return {\n                ...state,\n                isFieldValidationActive: false,\n                isCreatePasswordCompleted: action.payload.isCreatePasswordCompleted,\n                isUpdatingPassword: false,\n                createAccountButtonLabel: text.RegistrationPageContent.default_buttonLabel,\n                storeDomain: action.payload.storeDomain,\n            };\n        }\n        case types.Registration_Update_Password_Failed:\n            return {\n                ...state,\n                isUpdatingPassword: false,\n                isFieldValidationActive: false,\n                isRegistrationValidationActive: false,\n                isWarningValidationActive: true,\n                registrationErrorMessage: action.payload.message,\n                createAccountButtonLabel: text.RegistrationPageContent.default_buttonLabel,\n                displayReturnToLogin: action.payload.displayReturnToLogin,\n            };\n        case types.Registration_Password_Validation_Failed:\n            return {\n                ...state,\n                isFieldValidationActive: true,\n                isRegistrationValidationActive: false,\n                isWarningValidationActive: false,\n            };\n        case Redirect_To_Login_Page:\n            return {\n                ...state,\n                shouldRedirect: action.payload.shouldRedirect,\n            };\n        case authTypes.Auth_Errors_Clear_State:\n            return {\n                ...state,\n                isAuthenticating: initialState.isAuthenticating,\n                loginButtonLabel: initialState.loginButtonLabel,\n                errorMessage: initialState.errorMessage,\n                isWarningValidationActive: initialState.isWarningValidationActive,\n                isWarningMessageActive: initialState.isWarningMessageActive,\n                isErrorMessageActive: initialState.isErrorMessageActive,\n                loginErrorMessage: initialState.loginErrorMessage,\n                isRegistrationValidationActive: initialState.isRegistrationValidationActive,\n                registrationErrorMessage: \"\",\n                displayReturnToLogin: initialState.displayReturnToLogin,\n            };\n        case types.Registration_Clear_State:\n            return {\n                ...state,\n                isCreatePasswordCompleted: initialState.isCreatePasswordCompleted,\n                shouldRedirect: initialState.shouldRedirect,\n            };\n        case types.Registration_Get_User_Status:\n            return {\n                ...state,\n                userStatus: action.payload.userStatus,\n                isGettingUserDetailsAndStatus: false,\n            };\n        case types.Registration_Get_User_Status_Failed:\n            return {\n                ...state,\n                isGettingUserDetailsAndStatus: false,\n            };\n        default:\n            return state;\n    }\n};\n","export const Fetching_Products_List = \"Fetching_Products_List\";\nexport const Fetch_Products_List = \"Fetch_Products_List\";\nexport const Fetch_Products_Error = \"Fetch_Products_Error\";\nexport const Reset_Products_List = \"Reset_Products_List\";\n\nexport const Product_List_View_List = \"Product_List_View_List\";\nexport const Product_List_View_Gallery = \"Product_List_View_Gallery\";\n\nexport const Fetch_Brands_List = \"Fetch_Brands_List\";\nexport const Reset_Brands_List = \"Reset_Brands_List\";\n\nexport const Fetch_Categories_List = \"Fetch_Categories_List\";\nexport const Reset_Categories_List = \"Reset_Categories_List\";\nexport const Fetch_Categories_Error = \"Fetch_Categories_Error\";\nexport const Create_Category_Route_Objects = \"Create_Category_Route_Objects\";\nexport const Reset_Category_Route_Objects = \"Reset_Category_Route_Objects\";\n\nexport const Filter_Menu_Toggle_Status = \"Filter_Menu_Toggle_Status\";\nexport const Reset_Products_Filter = \"Reset_Products_Filter\";\nexport const Update_Products_Filter = \"Update_Products_Filter\";\n","import { ProductListItem, ProductsListType } from \"../../Actions/ProductListActions\";\nimport * as types from \"./../../Types/ProductListTypes\";\n\nexport const initialState: ProductsListType = {\n    isFetchingProducts: false,\n    products: [],\n    filter: {\n        filterMenuOpen: false,\n        filterMenuToggledByUser: false,\n        brandIds: [],\n        categoryIds: [],\n    },\n    brands: [],\n    brandsFetched: false,\n    categories: [],\n    isFetchingCategories: false,\n    categoriesFetched: false,\n    categoryRouteObjects: [],\n    numberOfCategories: null,\n    message: \"\",\n    productListViewStyle: \"gallery-view\",\n    serviceHasMore: true,\n};\n\nexport const ProductListReducer = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): ProductsListType => {\n    switch (action.type) {\n        case types.Fetching_Products_List:\n            return {\n                ...state,\n                isFetchingProducts: true,\n                message: \"\",\n            };\n        case types.Fetch_Products_List:\n            const serviceHasMore = Array.from(action.payload.products).length > 0;\n\n            if (serviceHasMore) {\n                action.payload.products.forEach((item: ProductListItem) => {\n                    if (!state.products.some((product: { id: number }) => product.id === item.id)) {\n                        state.products = [...state.products, item];\n                    }\n                });\n            }\n            return {\n                ...state,\n                isFetchingProducts: false,\n                products: state.products,\n                message: \"\",\n                serviceHasMore: serviceHasMore,\n            };\n        case types.Fetch_Products_Error:\n            return {\n                ...state,\n                isFetchingProducts: false,\n                message: action.payload.message,\n            };\n        case types.Product_List_View_List:\n            return {\n                ...state,\n                productListViewStyle: \"list-view\",\n            };\n        case types.Product_List_View_Gallery:\n            return {\n                ...state,\n                productListViewStyle: \"gallery-view\",\n            };\n        case types.Reset_Products_List:\n            return {\n                ...state,\n                isFetchingProducts: false,\n                products: [],\n                message: \"\",\n                serviceHasMore: initialState.serviceHasMore,\n            };\n        case types.Fetch_Brands_List:\n            return {\n                ...state,\n                brands: action.payload.brands,\n                brandsFetched: action.payload.brandsFetched,\n            };\n        case types.Reset_Brands_List:\n            return {\n                ...state,\n                brands: [],\n                brandsFetched: initialState.brandsFetched,\n            };\n        case types.Filter_Menu_Toggle_Status:\n            state.filter.filterMenuOpen = !state.filter.filterMenuOpen;\n            return {\n                ...state,\n                filter: {\n                    ...state.filter,\n                    filterMenuToggledByUser: action.payload.filterMenuToggledByUser,\n                },\n            };\n        case types.Reset_Products_Filter:\n            return {\n                ...state,\n                filter: {\n                    filterMenuOpen: initialState.filter.filterMenuOpen,\n                    brandIds: initialState.filter.brandIds,\n                    categoryIds: initialState.filter.categoryIds,\n                    filterMenuToggledByUser: state.filter.filterMenuToggledByUser,\n                },\n            };\n        case types.Update_Products_Filter:\n            const updatedFields: { brandIds?: number[]; categoryIds?: number[] } = {};\n\n            if (action.payload.brandIds) updatedFields.brandIds = action.payload.brandIds;\n            if (action.payload.categoryIds) updatedFields.categoryIds = action.payload.categoryIds;\n\n            return {\n                ...state,\n                filter: {\n                    ...state.filter,\n                    ...updatedFields,\n                },\n            };\n        case types.Fetch_Categories_List:\n            return {\n                ...state,\n                categories: action.payload.categories,\n                isFetchingCategories: action.payload.isFetchingCategories,\n                categoriesFetched: action.payload.categoriesFetched,\n                numberOfCategories: action.payload.numberOfCategories,\n            };\n        case types.Fetch_Categories_Error:\n            return {\n                ...state,\n                message: action.payload.message,\n                isFetchingCategories: false,\n                categoriesFetched: true,\n            };\n        case types.Reset_Categories_List:\n            return {\n                ...state,\n                categories: [],\n                categoriesFetched: initialState.categoriesFetched,\n                numberOfCategories: initialState.numberOfCategories,\n            };\n        case types.Reset_Category_Route_Objects:\n            return {\n                ...state,\n                categoryRouteObjects: [],\n            };\n        case types.Create_Category_Route_Objects:\n            return {\n                ...state,\n                categoryRouteObjects: action.payload.routes,\n            };\n        default:\n            return state;\n    }\n};\n","export const Fetching_Product_Details = \"Fetching_Product_Details\";\nexport const Fetch_Product_Details = \"Fetch_Product_Details\";\nexport const Fetch_Product_Error = \"Fetch_Product_Error\";\nexport const UpdateProductOptionDisplayPrice = \"Update_Product_Option_Display_Price\"\nexport const Show_Product_Details_Modal = \"Show_Product_Details_Modal\";\nexport const Hide_Product_Details_Modal = \"Hide_Product_Details_Modal\";\nexport const Set_Product_Id_To_Load = \"Set_Product_Id_To_Load\";","import { DiscountSourceType } from \"../../../Enums/PromoMatrix/DiscountSourceType\";\nimport ContractPricePromotionDisplay from \"../../../Interfaces/PromoMatrix/ContractPricePromotionDisplay\";\nimport StandardPromotionDisplay from \"../../../Interfaces/PromoMatrix/StandardPromotionDisplay\";\nimport * as types from \"./../../Types/ProductDetailsTypes\";\n\nexport type ProductDetailsStateType = {\n    productIdToLoad: number | null;\n    showProductDetailsModal: boolean;\n    isFetchingProductDetails: boolean;\n    product: ProductDetails | null;\n    message: string;\n    productNotFound: boolean;\n};\n\nexport const initialState: ProductDetailsStateType = {\n    productIdToLoad: null,\n    showProductDetailsModal: false,\n    isFetchingProductDetails: false,\n    product: null,\n    message: \"\",\n    productNotFound: false,\n};\n\nexport type ProductDetailImage ={\n    thumbnail: string;\n    medium: string;\n    full: string;\n}\n\nexport type ProductDetailsOption = {\n    optionId: number;\n    sizeId: number | null;\n    uomId?: number;\n    code: string;\n    optionCode: string;\n    option1: string;\n    option2: string;\n    option3: string | null;\n    size: string | null;\n    uomSize?: number;\n    price: number;\n    retailPrice: number;\n    specialPrice: number;\n    contractPrice: number;\n    uomPrice: number;\n    lineItemDiscount: number;\n    image: string | null;\n    stock: number;\n    sizeRangeId: number | null;\n    productCategories: number[];\n    commonPromotions: string | null;\n    standardPromotions: StandardPromotionDisplay[];\n    contractPricePromotions: ContractPricePromotionDisplay[];\n    incomingDate: string | null;\n    weight: number;\n    productQuantity: number;\n    baseUnitPrice?: number;\n    discountSource: DiscountSourceType;\n  };\n\n\nexport type ProductDetails = {\n    brand: string;\n    stock: number;\n    description: string;\n    images: ProductDetailImage[];\n    option1Name: string;\n    option2Name: string;\n    option3Name: string | null;\n    currencyCode: string;\n    taxStatus: string;\n    taxRate: number | null;\n    minPrice: number;\n    maxPrice: number;\n    retailPrice: number;\n    minSpecialPrice: number;\n    maxSpecialPrice: number;\n    allowOverselling: boolean;\n    isNonStock: boolean;\n    options: ProductDetailsOption[];\n  };\n\nexport const ProductDetailsReducer = (\n    state = initialState,\n    action: { type: string; payload: any }\n): ProductDetailsStateType => {\n    switch (action.type) {\n        case types.Fetching_Product_Details:\n            return {\n                ...state,\n                isFetchingProductDetails: true,\n                message: \"\",\n                productNotFound: false,\n            };\n        case types.Fetch_Product_Details:\n            return {\n                ...state,\n                isFetchingProductDetails: false,\n                product: action.payload.product,\n                message: \"\",\n                productNotFound: false,\n            };\n        case types.Fetch_Product_Error:\n            return {\n                ...state,\n                isFetchingProductDetails: false,\n                message: action.payload.message,\n                productNotFound: action.payload.productNotFound,\n            };\n        case types.UpdateProductOptionDisplayPrice:\n\n        let product = state.product;\n\n        let productOptions: ProductDetailsOption[] = action.payload;\n\n        let updatedOptions;\n    \n        if (product && product.options) {\n\n            let isUomProduct = product.options.filter(x => x.uomId && x.uomId > 0).length > 0;\n\n            if(isUomProduct){\n                updatedOptions = product.options.map((x: ProductDetailsOption) => {\n                    return {\n                        ...x,\n                        lineItemDiscount: action.payload[0].lineItemDiscount,\n                        contractPrice: action.payload[0].contractPrice,\n                    };\n                });\n\n            }else{\n                updatedOptions = product.options.map((x: ProductDetailsOption) => {\n                    let match = productOptions.find((option: ProductDetailsOption) => {\n                        return option.code === x.code\n                    });\n                    if (match) {\n                        return {\n                            ...x,\n                            lineItemDiscount: match.lineItemDiscount,\n                            contractPrice: match.contractPrice,\n                        };\n                    }\n                    return x;\n                });\n            }\n    \n            return {\n                ...state,\n                product: {\n                    ...product,\n                    options: updatedOptions,\n                },\n            };\n        }\n    \n        return state;\n    \n        case types.Show_Product_Details_Modal:\n            return {\n                ...state,\n                showProductDetailsModal: true,\n            };\n        case types.Hide_Product_Details_Modal:\n            return {\n                ...state,\n                showProductDetailsModal: false,\n            };\n        case types.Set_Product_Id_To_Load:\n            return {\n                ...state,\n                productIdToLoad: action.payload,\n            };\n        default:\n            return state;\n    }\n};\n","export const Calculated_Promotions = \"Calculated_Promotions\";\nexport const Calculate_Promotions = \"Calculate_Promotions\";\nexport const Increment_Order_Quantity = \"Increment_Order_Quantity\";\nexport const Decrement_Order_Quantity = \"Decrement_Order_Quantity\";\nexport const Set_Order_Quantity = \"Set_Order_Quantity\";\nexport const Remove_Order_Product = \"Remove_Order_Product\";\nexport const Clear_Cart = \"Clear_Cart\";\nexport const Creating_Order = \"Creating_Order\";\nexport const Create_Order_Success = \"Create_Order_Success\";\nexport const Create_Order_Fail = \"Create_Order_Fail\";\nexport const Redirect_To_Confirmation = \"Redirect_To_Confirmation\";\nexport const Redirect_To_Payment = \"Redirect_To_Payment\";\nexport const Order_Completion_Successful= \"Order_Completion_Successful\";\nexport const Update_Purchase_Order_Number = \"Update_Purchase_Order_Number\";\nexport const Update_Delivery_Instructions = \"Update_Delivery_Instructions\";\nexport const Update_Delivery_Date = \"Update_Delivery_Date\";\nexport const Update_Delivery_Address = \"Update_Delivery_Address\";\nexport const Update_Order_Item_Notes = \"Update_Order_Item_Notes\";\nexport const Delete_Order_Item_Notes = \"Delete_Order_Item_Notes\";\nexport const Reset_Checkout_State = \"Reset_Checkout_State\";\nexport const Update_Order_Payment_Method = \"Update_Order_Payment_Method\";\n\nexport const Fetching_Reorder_Details = \"Fetching_Reorder_Details\";\nexport const Reorder_Details_Success = \"Reorder_Details_Success\";\nexport const Reorder_Details_Fail = \"Reorder_Details_Fail\";\nexport const Reorder_Details_Reset = \"Reorder_Details_Reset\";\nexport const Force_Stop_Display_Placing_Order_Message = \"Force_Stop_Display_Placing_Order_Message\";\nexport const Set_Payment_Failed = \"Set_Payment_Failed\";","import * as types from './../../Types/OrderTypes';\nimport { ProductDetailsOption } from './ProductDetailsReducer';\n\nexport type OrderItemNote = {\n    optionId: number,\n    productId: number,\n    uomId: number | null,\n    notes: string | null\n}\n\nexport type ProductData = {\n    id: number,\n    name: string,\n    styleCode: string,\n    images: string [],\n    taxRate: number\n}\n\nexport type CartItem = {\n    product : ProductData,\n    productId: number,\n    productOptions: ProductDetailsOption [],\n    totalItems: number\n}\n\nexport type OrderStateType = {\n  orderItems: CartItem[],\n  orderItemNotes: OrderItemNote[],\n  isLoading: boolean,\n  reference: string,\n  id: number,\n  shouldRedirect: boolean,\n  shouldRedirectToPayment: boolean,\n  shouldContinueDisplayingPlacingOrder: boolean;\n  errorMessage: string,\n  orderDetails: {\n      poNumber: string, \n      deliveryInstructions: string,\n      deliveryDate: Date | null,\n      deliveryAddress: any | null,\n      paymentMethod: string | null,\n  },\n  isFetchingReorderDetails: boolean,\n  isReorderComplete: boolean,\n  reorderErrorMessage: string,\n  reorderItemsCount: number,\n  reorderUnavailableItemsCount: number,\n  hidePriceWhileFetchingPromotionCalculations: boolean,\n  isFetchingPromotions: boolean,\n  paymentFailed: boolean\n}\n\nexport const initialState: OrderStateType = {\n    orderItems: [],\n    orderItemNotes: [],\n    isLoading: false,\n    reference: '',\n    id: 0,\n    shouldRedirect: false,\n    shouldRedirectToPayment: false,\n    shouldContinueDisplayingPlacingOrder: false,\n    errorMessage: '',\n    orderDetails: {\n        poNumber: '',\n        deliveryInstructions: '',\n        deliveryDate: null,\n        deliveryAddress: null,\n        paymentMethod: null\n    },\n    isFetchingReorderDetails: false,\n    isReorderComplete: false,\n    reorderErrorMessage: '',\n    reorderItemsCount: 0,\n    reorderUnavailableItemsCount: 0,\n    hidePriceWhileFetchingPromotionCalculations: false,\n    isFetchingPromotions: false,\n    paymentFailed: false\n};\n\n\nexport const OrderReducer = (state = initialState, action: {type: string, payload: any | undefined}): OrderStateType => {\n\n    switch(action.type) {\n        case types.Increment_Order_Quantity:\n            let groupOptions:any = {\n                productId: action.payload.product.id,\n                product: {\n                    id: action.payload.product.id,\n                    name: action.payload.product.name,\n                    styleCode: action.payload.product.styleCode,\n                    images: action.payload.product.images,\n                    taxRate: action.payload.product.taxRate,\n                    allowOverselling: action.payload.product.allowOverselling\n                },\n                productOptions: [],\n                totalItems: 0\n            }\n            \n            type OptionId = {optionId: number, sizeId: number, uomId: number};\n            // Keep the product option ordering rather than appending to the cart options\n            const sortOptionsFunc = (optionA: OptionId, optionB: OptionId) => {\n                const findIndexOfOption = (option: OptionId) => \n                    (action.payload.product.options ?? [])\n                    .findIndex((sortedOptions: OptionId) => \n                        sortedOptions.optionId === option.optionId \n                        && sortedOptions.sizeId === option.sizeId \n                        && sortedOptions.uomId === option.uomId);\n                const optionAIndex = findIndexOfOption(optionA);\n                const optionBIndex = findIndexOfOption(optionB);\n                if (optionAIndex > optionBIndex) return 1;\n                if (optionAIndex < optionBIndex) return -1;\n                return 0;\n            }\n\n            let findIncrementGroupName = state.orderItems.findIndex((x: {productId: number}) => x.productId === action.payload.product.id);\n            if(findIncrementGroupName === -1){\n                let cartProduct = action.payload.productOption;\n                cartProduct.productQuantity = action.payload.increment;\n                groupOptions.totalItems = action.payload.increment;\n\n                groupOptions.productOptions = [...groupOptions.productOptions, cartProduct].sort(sortOptionsFunc);\n                return {\n                    ...state,\n                    orderItems: [...state.orderItems, groupOptions]\n                }\n            }\n\n            let incrementOrderProduct = state.orderItems[findIncrementGroupName]\n                .productOptions.findIndex((x: ProductDetailsOption) => \n                    x.optionId === action.payload.productOption.optionId \n                    && x.sizeId === action.payload.productOption.sizeId \n                    && x.uomId === action.payload.productOption.uomId);\n            \n            if(incrementOrderProduct === -1) {\n                let cartProduct = action.payload.productOption;\n                cartProduct.productQuantity = action.payload.increment;\n\n                state.orderItems[findIncrementGroupName].totalItems += action.payload.increment;\n                state.orderItems[findIncrementGroupName].productOptions = [...state.orderItems[findIncrementGroupName].productOptions, cartProduct].sort(sortOptionsFunc);\n\n                return {\n                    ...state\n                }\n            }\n            state.orderItems[findIncrementGroupName].productOptions[incrementOrderProduct].productQuantity += action.payload.increment;\n            state.orderItems[findIncrementGroupName].totalItems += action.payload.increment;\n\n            return {\n                ...state\n            };\n        case types.Decrement_Order_Quantity:\n\n            let findDecrementGroupName = state.orderItems.findIndex((x: {productId: number}) => x.productId === action.payload.product.id);\n            \n            if(findDecrementGroupName === -1) {\n                return {\n                    ...state\n                };\n            }\n\n            let decrementOrderProduct = state.orderItems[findDecrementGroupName].productOptions.findIndex((x: ProductDetailsOption) => \n                x.optionId === action.payload.productOption.optionId \n            && x.sizeId === action.payload.productOption.sizeId \n            && x.uomId === action.payload.productOption.uomId);\n            \n            if (decrementOrderProduct === -1) {\n                return {\n                    ...state\n                };\n            }\n\n            state.orderItems[findDecrementGroupName].productOptions[decrementOrderProduct].productQuantity -= 1;\n            state.orderItems[findDecrementGroupName].totalItems -= 1;\n\n            if (state.orderItems[findDecrementGroupName].totalItems <= 0) {\n                // Remove product if quantity is 0.\n                state.orderItems.splice(findDecrementGroupName, 1);\n            }\n            else if (state.orderItems[findDecrementGroupName].productOptions[decrementOrderProduct].productQuantity <= 0) {\n                // Remove product option if quantity is 0.\n                state.orderItems[findDecrementGroupName].productOptions.splice(decrementOrderProduct, 1);\n            }\n\n            return {\n                ...state\n            };\n        case types.Set_Order_Quantity:\n            var setGroupOptions:any = {\n                productId: action.payload.product.id,\n                product: {\n                    id: action.payload.product.id,\n                    name: action.payload.product.name,\n                    styleCode: action.payload.product.styleCode,\n                    images: action.payload.product.images,\n                    taxRate: action.payload.product.taxRate,\n                    allowOverselling: action.payload.product.allowOverselling\n                },\n                productOptions: [],\n                totalItems: 0\n            }\n\n            let findSetGroupName = state.orderItems.findIndex((x: {productId: number}) => x.productId === action.payload.product.id);\n\n            if (findSetGroupName === -1) {\n\n                if (action.payload.quantity <= 0) {\n                    return {\n                        ...state\n                    }\n                }\n\n                let cartProduct = action.payload.productOption;\n                cartProduct.productQuantity = action.payload.quantity;\n                setGroupOptions.totalItems += action.payload.quantity;\n\n                setGroupOptions.productOptions = [...setGroupOptions.productOptions, cartProduct];\n                \n                return {\n                    ...state,\n                    orderItems: [...state.orderItems, setGroupOptions]\n                }\n            }\n\n            let setOrderProduct = state.orderItems[findSetGroupName].productOptions.findIndex((x: ProductDetailsOption) => \n                x.optionId === action.payload.productOption.optionId \n            && x.sizeId === action.payload.productOption.sizeId \n            && x.uomId === action.payload.productOption.uomId);\n            \n            if (setOrderProduct === -1) {\n\n                if (action.payload.quantity <= 0) {\n                    return {\n                        ...state\n                    }\n                }\n\n                let cartProduct = action.payload.productOption;\n                cartProduct.productQuantity = action.payload.quantity;\n\n                state.orderItems[findSetGroupName].totalItems += action.payload.quantity;\n                state.orderItems[findSetGroupName].productOptions = [...state.orderItems[findSetGroupName].productOptions, cartProduct];\n\n                return {\n                    ...state\n                }\n            }\n\n            let setQuantity = action.payload.quantity - state.orderItems[findSetGroupName].productOptions[setOrderProduct].productQuantity;\n\n            state.orderItems[findSetGroupName].productOptions[setOrderProduct].productQuantity += setQuantity;\n            state.orderItems[findSetGroupName].totalItems += setQuantity;\n\n            if (state.orderItems[findSetGroupName].totalItems <= 0) {\n                // Remove product if quantity is 0.\n                state.orderItems.splice(findSetGroupName, 1);\n            }\n            else if (state.orderItems[findSetGroupName].productOptions[setOrderProduct].productQuantity <= 0) {\n                // Remove product option if quantity is 0.\n                state.orderItems[findSetGroupName].productOptions.splice(setOrderProduct, 1);\n            }\n\n            return {\n                ...state\n            };\n        case types.Remove_Order_Product:\n            let findRemoveGroupIndex = state.orderItems.findIndex((x: {productId: number}) => x.productId === Number(action.payload.productId));\n\n            if (findRemoveGroupIndex === -1) {\n                return {\n                    ...state\n                };\n            }\n\n            if (action.payload.optionId === null) {\n                state.orderItems.splice(findRemoveGroupIndex, 1);\n                return {\n                    ...state\n                };\n            }\n\n            let findRemoveOptionIndex = state.orderItems[findRemoveGroupIndex].productOptions.findIndex((x: ProductDetailsOption) => \n                x.optionId === action.payload.optionId \n            && x.sizeId === action.payload.sizeId \n            && x.uomId === action.payload.uomId);\n\n            if (findRemoveOptionIndex === -1) {\n                return {\n                    ...state\n                };\n            }\n\n            state.orderItems[findRemoveGroupIndex].productOptions.splice(findRemoveOptionIndex, 1);\n\n            let totalOptionQuantity = 0;\n\n            // Recalculate total options quantity for the product.\n            state.orderItems[findRemoveGroupIndex].productOptions.forEach((option: {productQuantity: number}) => {\n                totalOptionQuantity += option.productQuantity\n            });            \n\n            let quantityDifference = totalOptionQuantity - state.orderItems[findRemoveGroupIndex].totalItems;\n\n            /// INVESTIGATE\n            //state.orderItems[findRemoveGroupIndex].productOptions.productQuantity = totalOptionQuantity;\n\n            state.orderItems[findRemoveGroupIndex].totalItems += quantityDifference;\n\n            return {\n                ...state\n            };\n        case types.Clear_Cart:\n            return {\n                ...state,\n                orderItems: initialState.orderItems,\n                orderItemNotes: initialState.orderItemNotes\n            };\n        case types.Update_Purchase_Order_Number:\n\n            state.orderDetails.poNumber = action.payload.poNumber;\n\n            return {\n                ...state\n            };\n        case types.Update_Delivery_Date:\n\n            state.orderDetails.deliveryDate = action.payload.deliveryDate;\n\n            return {\n                ...state\n            };\n        case types.Update_Delivery_Instructions:\n\n            state.orderDetails.deliveryInstructions = action.payload.deliveryInstructions;\n\n            return {\n                ...state\n            };\n        case types.Creating_Order:\n            return {\n                ...state,\n                isLoading: true,\n                shouldContinueDisplayingPlacingOrder: true,\n                errorMessage: initialState.errorMessage,\n                paymentFailed: initialState.paymentFailed\n            };\n        case types.Create_Order_Success:\n            state.orderDetails.poNumber = '';\n            state.orderDetails.deliveryInstructions = '';\n            state.orderDetails.deliveryDate = null;\n            state.orderDetails.deliveryAddress = null;\n            state.orderDetails.paymentMethod = null;\n\n            return {\n                ...state,\n                isLoading: false,\n                reference: action.payload.reference,\n                id: action.payload.id\n            };\n        case types.Create_Order_Fail:\n            return {\n                ...state,\n                isLoading: false,\n                shouldContinueDisplayingPlacingOrder: false,\n                errorMessage: action.payload.errorMessage\n            };\n        case types.Redirect_To_Confirmation:\n            return {\n                ...state,\n                shouldRedirect: action.payload.shouldRedirect\n            };\n        case types.Redirect_To_Payment:\n            return {\n                ...state,\n                shouldRedirectToPayment: action.payload.shouldRedirectToPayment\n            };\n        case types.Order_Completion_Successful:\n            return {\n                ...state,\n                shouldRedirect: false,\n                shouldRedirectToPayment: false,\n                isLoading: false,\n                shouldContinueDisplayingPlacingOrder: false,\n                paymentFailed: initialState.paymentFailed\n            };\n        case types.Update_Delivery_Address:\n\n            state.orderDetails.deliveryAddress = {\n                firstName: action.payload.deliveryAddress.firstName,\n                lastName: action.payload.deliveryAddress.lastName,\n                company: action.payload.deliveryAddress.company,\n                address1: action.payload.deliveryAddress.address1,\n                address2: action.payload.deliveryAddress.address2,\n                city: action.payload.deliveryAddress.city,\n                state: action.payload.deliveryAddress.state,\n                postCode: action.payload.deliveryAddress.postCode,\n                country: action.payload.deliveryAddress.country\n            };\n\n            return {\n                ...state\n            };\n        case types.Update_Order_Item_Notes:\n            const orderItemNoteExists = state.orderItemNotes.some((orderItemNote) => orderItemNote.optionId === action.payload.orderItemOptionId && orderItemNote.productId === action.payload.productId && orderItemNote.uomId === action.payload.uomId)\n\n            if (orderItemNoteExists) {\n                return {\n                    ...state,\n                    orderItemNotes: state.orderItemNotes.map(orderItemNote => {\n                        if (orderItemNote.optionId !== action.payload.orderItemOptionId || orderItemNote.productId !== action.payload.productId || orderItemNote.uomId !== action.payload.uomId) {\n                            return orderItemNote;\n                        }\n\n                        return {...orderItemNote, notes: action.payload.notes}\n                    })\n                }\n            }\n\n            return {\n                ...state,\n                orderItemNotes: [\n                    ...state.orderItemNotes,\n                    {optionId: action.payload.orderItemOptionId, productId: action.payload.productId, uomId: action.payload.uomId, notes: action.payload.notes}\n                ]\n            }\n        case types.Delete_Order_Item_Notes:\n            return {\n                ...state,\n                orderItemNotes: state.orderItemNotes.filter(itemNote => itemNote.optionId !== action.payload.orderItemOptionId || itemNote.productId !== action.payload.productId || itemNote.uomId !== action.payload.uomId)\n            }\n        case types.Fetching_Reorder_Details:\n            return {\n                ...state,\n                isFetchingReorderDetails: true,\n                isReorderComplete: initialState.isReorderComplete,\n                reorderErrorMessage: initialState.reorderErrorMessage\n            };\n        case types.Reorder_Details_Success:\n            return {\n                ...state,\n                isFetchingReorderDetails: initialState.isFetchingReorderDetails,\n                isReorderComplete: true,\n                reorderErrorMessage: initialState.reorderErrorMessage,\n                reorderItemsCount: action.payload.itemsCount,\n                reorderUnavailableItemsCount: action.payload.unavailableItemsCount,\n            };\n        case types.Reorder_Details_Fail:\n            return {\n                ...state,\n                isFetchingReorderDetails: initialState.isFetchingReorderDetails,\n                isReorderComplete: initialState.isReorderComplete,\n                reorderErrorMessage: action.payload.message\n            };\n        case types.Reorder_Details_Reset:\n            return {\n                ...state,\n                isFetchingReorderDetails: initialState.isFetchingReorderDetails,\n                isReorderComplete: initialState.isReorderComplete,\n                reorderErrorMessage: initialState.reorderErrorMessage,\n                reorderItemsCount: initialState.reorderItemsCount,\n                reorderUnavailableItemsCount: initialState.reorderUnavailableItemsCount,\n            };\n        case types.Calculate_Promotions:\n        return {\n            ...state,\n            hidePriceWhileFetchingPromotionCalculations: action.payload.addProductDetailsReducerProduct,\n            isFetchingPromotions: action.payload.isLoading,\n            }\n        case types.Calculated_Promotions:\n            return {\n                ...state,\n                orderItems: action.payload,\n                hidePriceWhileFetchingPromotionCalculations: false,\n                isFetchingPromotions: false,\n            }\n        case types.Reset_Checkout_State:\n            return {\n                ...state,\n                errorMessage: initialState.errorMessage,\n                shouldRedirect: initialState.shouldRedirect,\n                shouldRedirectToPayment: initialState.shouldRedirectToPayment,\n                isLoading: initialState.isLoading,\n                shouldContinueDisplayingPlacingOrder: initialState.shouldContinueDisplayingPlacingOrder,\n                paymentFailed: initialState.paymentFailed\n            };\n        case types.Update_Order_Payment_Method:\n            return {\n                ...state,\n                orderDetails: {\n                    ...state.orderDetails,\n                    paymentMethod: action.payload.paymentMethod\n                }\n            }\n        case types.Force_Stop_Display_Placing_Order_Message:\n            return {\n                ...state,\n                shouldContinueDisplayingPlacingOrder: false\n            }\n        case types.Set_Payment_Failed:\n            return {\n                ...state,\n                paymentFailed : action.payload\n            }\n        default: \n            return state;\n    }\n}","import * as types from \"../../Types/ProcessCheckoutTypes\";\n\ntype statuses = \"step-completed\" | \"current-step\" | \"pending-step\";\n\nexport type ProcessCheckoutStateType = {\n    reviewPageStatus: statuses;\n    deliveryPageStatus: statuses;\n    billingPageStatus: statuses;\n    confirmPageStatus: statuses;\n};\n\nexport const initialState: ProcessCheckoutStateType = {\n    reviewPageStatus: \"pending-step\",\n    deliveryPageStatus: \"pending-step\",\n    billingPageStatus: \"pending-step\",\n    confirmPageStatus: \"pending-step\",\n};\n\nexport const ProcessCheckoutReducer = (\n    state = initialState,\n    action: { type: string; payload: any | undefined }\n): ProcessCheckoutStateType => {\n    switch (action.type) {\n        case types.Review_Order_Reset:\n        case types.Review_Order_Active:\n        case types.Review_Order_Completed:\n            return {\n                ...state,\n                reviewPageStatus: action.payload.pageStatus,\n            };\n        case types.Delivery_Order_Reset:\n        case types.Delivery_Order_Active:\n        case types.Delivery_Order_Completed:\n            return {\n                ...state,\n                deliveryPageStatus: action.payload.pageStatus,\n            };\n        case types.Billing_Order_Reset:\n        case types.Billing_Order_Active:\n        case types.Billing_Order_Completed:\n            return {\n                ...state,\n                billingPageStatus: action.payload.pageStatus,\n            };\n        case types.Confirm_Order_Reset:\n        case types.Confirm_Order_Active:\n            return {\n                ...state,\n                confirmPageStatus: action.payload.pageStatus,\n            };\n        default:\n            return state;\n    }\n};\n","export const Getting_Order_History = \"Getting_Order_History\";\nexport const Order_History_Success = \"Order_History_Success\";\nexport const Order_History_Fail = \"Order_History_Fail\";","import * as types from \"./../../Types/UserDetailsTypes\";\n\nexport type UserDetailsStateType = {\n    orderHistory: {\n        isLoading: boolean;\n        orders: [];\n        totalPages: number;\n        message: string;\n    };\n};\n\nconst initialState: UserDetailsStateType = {\n    orderHistory: {\n        isLoading: false,\n        orders: [],\n        totalPages: 1,\n        message: \"\",\n    },\n};\n\nexport const UserDetailsReducer = (\n    state = initialState,\n    action: { type: string; payload: any }\n): UserDetailsStateType => {\n    switch (action.type) {\n        case types.Getting_Order_History:\n            return {\n                ...state,\n                orderHistory: {\n                    orders: state.orderHistory.orders,\n                    isLoading: true,\n                    message: \"\",\n                    totalPages: state.orderHistory.totalPages,\n                },\n            };\n        case types.Order_History_Success:\n            return {\n                ...state,\n                orderHistory: {\n                    isLoading: false,\n                    orders: action.payload.orders,\n                    totalPages: action.payload.totalPages,\n                    message: \"\",\n                },\n            };\n        case types.Order_History_Fail:\n            return {\n                ...state,\n                orderHistory: {\n                    isLoading: false,\n                    message: action.payload.message,\n                    orders: state.orderHistory.orders,\n                    totalPages: state.orderHistory.totalPages,\n                },\n            };\n        default:\n            return state;\n    }\n};\n","export const Change_Current_Category = \"Change_Current_Category\";\nexport const Reset_Current_Category = \"Reset_Current_Category\";\nexport const Go_Back = \"Go_Back\";\n","import { CategoryType } from \"../../../Components/PageElements/Products/ProductCategoryFilter\";\nimport * as types from \"../../Types/CategoryTypes\";\n\nexport type CategoryStateType = {\n    category: CategoryType;\n    goBack: boolean;\n};\n\nexport const initialState: CategoryStateType = {\n    category: { id: -1, name: \"\", subCategories: [] },\n    goBack: false,\n};\n\nexport const CategoryReducer = (state = initialState, action: { type: string; payload: any }): CategoryStateType => {\n    switch (action.type) {\n        case types.Change_Current_Category:\n            return {\n                ...state,\n                category: action.payload.category,\n            };\n        case types.Reset_Current_Category:\n            return {\n                ...state,\n                category: initialState.category,\n            };\n        case types.Go_Back:\n            return {\n                ...state,\n                goBack: action.payload.goBack,\n            };\n        default:\n            return state;\n    }\n};\n","export const Get_Freight_Options = \"Get_Freight_Options\";\nexport const Reset_Freight_Options = \"Reset_Freight_Options\";\nexport const Set_Selected_Freight_Zone = \"Set_Selected_Freight_Zone\";\nexport const Reset_Selected_Freight_Zone = \"Reset_Selected_Freight_Zone\";\nexport const Set_Selected_Freight_Tier = \"Set_Selected_Freight_Tier\";\nexport const Reset_Selected_Freight_Tier = \"Reset_Selected_Freight_Tier\";\nexport const Set_Selected_Freight_Tier_Attribute = \"Set_Selected_Freight_Tier_Attribute\";\nexport const Reset_Selected_Freight_Tier_Attribute = \"Reset_Selected_Freight_Tier_Attribute\";\nexport const Set_Filtered_Freight_Zones = \"Set_Filtered_Freight_Zones\";\nexport const Reset_Filtered_Freight_Zones = \"Reset_Filtered_Freight_Zones\";","import * as types from \"../../Types/FreightTypes\";\n\nexport type FreightZoneType = {\n    id: number;\n    name: string;\n    tiers?: FreightTierType[];\n};\n\nexport enum FreightTierPriceType {\n    Undefined = 0,\n    ToBeConfirmed = 1,\n    FlatRate = 2,\n    Weight = 3,\n    Value = 4,\n};\n\nexport type FreightTierType = {\n    id: number;\n    name: string;\n    type: FreightTierPriceType;\n    price: number;\n    conditions?: FreightTierAttributeType[];\n};\n\nexport type FreightTierAttributeType = {\n    id: number;\n    minimum: number;\n    maximum: number;\n    price: number;\n};\n\nexport type FreightStateType = {\n    freightOptionsFetched: boolean;\n    freightOptions: FreightZoneType[];\n    freightZone: FreightZoneType;\n    freightTier: FreightTierType;\n    freightTierAttribute: FreightTierAttributeType;\n    freightZonesFiltered: boolean;\n};\n\nexport const initialState: FreightStateType = {\n    freightOptionsFetched: false,\n    freightOptions: [],\n    freightZone: { id: -1, name: \"\" },\n    freightTier: { id: -1, name: \"\", type: FreightTierPriceType.Undefined, price: 0 },\n    freightTierAttribute: { id: -1, minimum: -1, maximum: -1, price: 0 },\n    freightZonesFiltered: true,\n};\n\nexport const FreightReducer = (state = initialState, action: { type: string; payload: any }): FreightStateType => {\n    switch (action.type) {\n        case types.Get_Freight_Options:\n            return {\n                ...state,\n                freightOptionsFetched: action.payload.freightOptionsFetched,\n                freightOptions: action.payload.freightOptions,\n            };\n        case types.Set_Selected_Freight_Zone:\n            return {\n                ...state,\n                freightZone: action.payload.freightZone,\n            };\n        case types.Reset_Selected_Freight_Zone:\n            return {\n                ...state,\n                freightZone: initialState.freightZone,\n                freightTier: initialState.freightTier,\n                freightTierAttribute: initialState.freightTierAttribute,\n            };\n        case types.Set_Selected_Freight_Tier:\n            return {\n                ...state,\n                freightTier: action.payload.freightTier,\n            };\n        case types.Reset_Selected_Freight_Tier:\n            return {\n                ...state,\n                freightTier: initialState.freightTier,\n                freightTierAttribute: initialState.freightTierAttribute,\n            };\n        case types.Set_Selected_Freight_Tier_Attribute:\n            return {\n                ...state,\n                freightTierAttribute: action.payload.freightTierAttribute,\n            };\n        case types.Reset_Selected_Freight_Tier_Attribute:\n            return {\n                ...state,\n                freightTierAttribute: initialState.freightTierAttribute,\n            };\n        case types.Reset_Freight_Options:\n            return {\n                ...state,\n                freightOptionsFetched: initialState.freightOptionsFetched,\n                freightOptions: initialState.freightOptions,\n                freightZone: initialState.freightZone,\n                freightTier: initialState.freightTier,\n                freightTierAttribute: initialState.freightTierAttribute,\n            };\n        case types.Set_Filtered_Freight_Zones:\n            return {\n                ...state,\n                freightZonesFiltered: action.payload.freightZonesFiltered\n            };\n        case types.Reset_Filtered_Freight_Zones:\n            return {\n                ...state,\n                freightZonesFiltered: initialState.freightZonesFiltered\n            };\n        default:\n            return state;\n    }\n};\n","import { AppSettings } from \"./App_Reducers/AppSettingsReducer\";\nimport { AuthReducer } from \"./App_Reducers/AuthReducer\";\nimport { BrandingReducer } from \"./App_Reducers/BrandingReducer\";\nimport { IdentityReducer } from \"./App_Reducers/IdentityReducer\";\nimport { ProductListReducer } from \"./App_Reducers/ProductListReducer\";\nimport { ProductDetailsReducer } from \"./App_Reducers/ProductDetailsReducer\";\nimport { OrderReducer } from \"./App_Reducers/OrderReducer\";\nimport { ProcessCheckoutReducer } from \"./App_Reducers/ProcessCheckoutReducer\";\nimport { UserDetailsReducer } from \"./App_Reducers/UserDetailsReducer\";\nimport { CategoryReducer } from \"./App_Reducers/CategoryReducer\";\nimport { FreightReducer } from \"./App_Reducers/FreightReducer\";\n\nexport const IndexReducers = {\n    appSettingsReducer: AppSettings,\n    authReducer: AuthReducer,\n    brandingReducer: BrandingReducer,\n    identityReducer: IdentityReducer,\n    productListReducer: ProductListReducer,\n    productDetailsReducer: ProductDetailsReducer,\n    processCheckoutReducer: ProcessCheckoutReducer,\n    orderReducer: OrderReducer,\n    userDetailsReducer: UserDetailsReducer,\n    categoryReducer: CategoryReducer,\n    freightReducer: FreightReducer,\n};\n","//Review Page\nexport const Review_Order_Reset = \"Review_Order_Reset\";\nexport const Review_Order_Active = \"Review_Order_Active\";\nexport const Review_Order_Completed = \"Review_Order_Completed\";\n\n//Delivery Page\nexport const Delivery_Order_Reset = \"Delivery_Order_Reset\";\nexport const Delivery_Order_Active = \"Delivery_Order_Active\";\nexport const Delivery_Order_Completed = \"Delivery_Order_Completed\";\n\n//Billing Page\nexport const Billing_Order_Reset = \"Billing_Order_Reset\";\nexport const Billing_Order_Active = \"Billing_Order_Active\";\nexport const Billing_Order_Completed = \"Billing_Order_Completed\";\n\n//Confirm Page\nexport const Confirm_Order_Reset = \"Confirm_Order_Reset\";\nexport const Confirm_Order_Active = \"Confirm_Order_Active\";\n//export const Confirm_Order_Completed = \"Confirm_Order_Completed\";","import { applyMiddleware, combineReducers, createStore } from 'redux';\nimport { persistStore, persistReducer } from 'redux-persist';\nimport storage from 'redux-persist/lib/storage';\nimport thunk from 'redux-thunk';\nimport { connectRouter, routerMiddleware } from 'connected-react-router';\nimport { IndexReducers } from './Reducers/IndexReducers';\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2';\n\n//Redux Persist\nconst persistConfig = {\n  key: 'root',\n  storage: storage,\n  stateReconciler: autoMergeLevel2,\n  whitelist: [\n    'authReducer',\n    'brandingReducer',\n    'productListReducer',\n    'orderReducer',\n    'identityReducer',\n    'userDetailsReducer',\n    'freightReducer'\n  ]\n};\n\nexport default function configureStore (history: any, initialState: object) {\n  \n  const rootReducer = combineReducers({\n    ...IndexReducers,\n    router: connectRouter(history)\n  });\n\n  const persistedReducer = persistReducer(persistConfig, rootReducer);\n\n  const middleware = [\n    thunk,\n    routerMiddleware(history)\n  ];\n\n  const store = createStore(\n    persistedReducer,\n    initialState,\n    composeWithDevTools(applyMiddleware(...middleware))\n  );\n\n  //Redux Persistor\n  const persistor = persistStore(store);\n  \n  return { store, persistor };\n}\n","import React, { Component } from 'react';\n\nclass Layout extends Component {\n  render() {\n    return(\n      <div className=\"main-wrapper\" role=\"main\">\n        {this.props.children}\n      </div>\n    );\n  }\n}\n\nexport default Layout;","let environment = \"\";\n\nconst hostname = window.location.hostname;\n\n// Hostnames can be custom domains (i.e. mobelgroup.co.nz) or cin7 domains (i.e. ghettomart.staging.cin7.com).\n// Custom domains can be configured to be run on an environment by including the corresponding environment name in the domain.\n// e.g. b2b.ci.mobelgroup.co.nz\n\nif (hostname.includes(\"test01.b2b.\")) {\n    environment = \"test01\";\n} else if (hostname.includes(\"test02.b2b.\")) {\n    environment = \"test02\";\n} else if (hostname.includes(\"test03.b2b.\")) {\n    environment = \"test03\";\n} else if (hostname.includes(\"b2b.staging.\")) {\n    environment = \"staging\";\n} else if (hostname.includes(\"b2b.cin7.com\")) {\n    environment = \"production\";\n} else if (hostname.includes(\"b2b.ci.\")) {\n    environment = \"ci\";\n} else if (hostname === \"localhost\" || hostname.endsWith(\".localhost\")) {\n    environment = \"development\";\n} else {\n    environment = \"production\";\n}\n\nclass APIHost {\n    hostname: string;\n    appSettings: any;\n\n    constructor() {\n        this.hostname = window.location.hostname;\n        this.appSettings = this.GetEnvironmentConfig();\n    }\n\n    static GetEnvironment() {\n        return environment;\n    }\n\n    GetEnvironmentConfig() {\n        switch (environment) {\n            case \"ci\":\n                return require(\"./Config/appsettings.ci.json\");\n            case \"staging\":\n                return require(\"./Config/appsettings.staging.json\");\n            case \"production\":\n                return require(\"./Config/appsettings.production.json\");\n            case \"test01\":\n                return require(\"./Config/appsettings.test01.json\");\n            case \"test02\":\n                return require(\"./Config/appsettings.test02.json\");\n            case \"test03\":\n                return require(\"./Config/appsettings.test03.json\");\n            case \"development\":\n            default:\n                return require(\"./Config/appsettings.development.json\");\n        }\n    }\n\n    RedirectHostRoutes(requestType: string, domainName: any) {\n        const clientHostSettings = this.appSettings.ClientHostUrls.PageRoutes;\n        if (requestType === \"Login\") {\n            return this.RedirectClientSideSwitchCase(this.hostname, clientHostSettings.login, domainName);\n        }\n\n        return this.RedirectClientSideSwitchCase(this.hostname, clientHostSettings.default, \"b2b.dev.cin7.com\");\n    }\n\n    AuthAPI(requestType: string) {\n        const authSettings = this.appSettings.ApiHostUrls.AuthApi;\n        switch (requestType) {\n            case \"StoreInformation\":\n            case \"AuthorizeUser\":\n                return this.GenerateSwitchCase(authSettings.AuthorizeUser);\n            case \"RefreshUserToken\":\n                return this.GenerateSwitchCase(authSettings.RefreshUserToken);\n            case \"Logout\":\n                return this.GenerateSwitchCase(authSettings.LogoutUser);\n            default:\n                return null;\n        }\n    }\n\n    IdentityAPI(requestType: string) {\n        const identitySettings = this.appSettings.ApiHostUrls.IdentityApi;\n        switch (requestType) {\n            case \"ResetPassword\":\n                return this.GenerateSwitchCase(identitySettings.ResetPassword);\n            case \"CreatePassword\":\n                return this.GenerateSwitchCase(identitySettings.CreatePassword);\n            case \"ForgotPassword\":\n                return this.GenerateSwitchCase(identitySettings.ForgotPassword);\n            case \"ConfirmEmail\":\n                return this.GenerateSwitchCase(identitySettings.ConfirmEmail);\n            case \"GetRegisterDetails\":\n                return this.GenerateSwitchCase(identitySettings.GetRegisterDetails);\n            case \"GetUserDetails\":\n                return this.GenerateSwitchCase(identitySettings.GetUserDetails);\n            case \"GetUserStatus\":\n                return this.GenerateSwitchCase(identitySettings.GetUserStatus);\n            default:\n                return null;\n        }\n    }\n\n    ProductsAPI(requestType: string) {\n        const productSettings = this.appSettings.ApiHostUrls.ProductApi;\n        switch (requestType) {\n            case \"GetProductNames\":\n                return this.GenerateSwitchCase(productSettings.GetProductNames);\n            case \"GetProductsList\":\n                return this.GenerateSwitchCase(productSettings.GetProductsList);\n            case \"GetProductDetails\":\n                return this.GenerateSwitchCase(productSettings.GetProductDetails);\n            case \"GetBrandsList\":\n                return this.GenerateSwitchCase(productSettings.GetBrandsList);\n            case \"GetCategoriesList\":\n                return this.GenerateSwitchCase(productSettings.GetCategoriesList);\n            case \"GetCheckoutValidationDetail\":\n                return this.GenerateSwitchCase(productSettings.GetCheckoutValidationDetail);\n            default:\n                return null;\n        }\n    }\n\n    CheckoutAPI(requestType: string) {\n        const checkoutSettings = this.appSettings.ApiHostUrls.CheckoutApi;\n        switch (requestType) {\n            case \"CreateOrder\":\n                return this.GenerateSwitchCase(checkoutSettings.CreateOrder);\n            case \"Reorder\":\n                return this.GenerateSwitchCase(checkoutSettings.Reorder);\n            case \"GetOrderHistoryList\":\n                return this.GenerateSwitchCase(checkoutSettings.GetOrderHistoryList);\n            case \"BulkImportCSV\":\n                return this.GenerateSwitchCase(checkoutSettings.BulkImportCSV);\n            case \"ApproveOrder\":\n                return this.GenerateSwitchCase(checkoutSettings.ApproveOrder);\n            case \"Freight\":\n                return this.GenerateSwitchCase(checkoutSettings.Freight);\n            default:\n                return null;\n        }\n    }\n\n    PromoMatrixAPI(requestType: string) {\n        const promoMatrixSettings = this.appSettings.ApiHostUrls.PromoMatrixApi;\n        switch (requestType) {\n            case \"CalculatePromotions\":\n                return this.GenerateSwitchCase(promoMatrixSettings.CalculatePromotions);\n            default:\n                return null;\n        }\n    }\n\n    ContactUsFormAPI(requestType: string) {\n        const contactUsFormSettings = this.appSettings.ApiHostUrls.ContactUsFormApi;\n        switch (requestType) {\n            case \"SendRequestEmail\":\n                return this.GenerateSwitchCase(contactUsFormSettings.SendRequestEmail);\n            case \"ValidateReCaptchaToken\":\n                return this.GenerateSwitchCase(contactUsFormSettings.ValidateReCaptchaToken);\n            default:\n                return null;\n        }\n    }\n\n    GenerateSwitchCase(apiUrl: any) {\n        return this.appSettings.MobileClientUrlEndpoint + apiUrl;\n    }\n\n    RedirectClientSideSwitchCase(hostValue: string, pageRoute: any, domainName: string) {\n        if (hostValue === \"localhost\") {\n            return \"http://\" + domainName + \":3000\" + pageRoute;\n        }\n\n        return \"https://\" + domainName + pageRoute;\n    }\n}\n\nexport default APIHost;\n","export const GetUrlParameters = (parameterSearch:string[]) => {\n\n    const urlParameters:any = {};\n    \n    const url = GetCurrentUrl();\n\n    parameterSearch.forEach(parameter => {\n        const urlValues:string | null = url.searchParams.get(parameter);\n\n        if (urlValues){\n            if(parameter === \"userToken\" || parameter === \"emailToken\"){\n                urlParameters[parameter] = urlValues.replace(/ /g,\"+\");\n            }\n            else {\n                urlParameters[parameter] = urlValues;\n            }\n        }\n    });\n\n    return urlParameters;\n};\n\nexport const GetCurrentUrl = () => {\n    const urlString:string = window.location.href;\n    const url:URL = new URL(urlString);\n\n    return url;\n}\n\nexport const GetPasswordValidation = (password: string) => {\n\n    let lowerCaseLetters = /[a-z]/g;\n    let lowerCasePass = false;\n    \n    if(password.match(lowerCaseLetters)) { \n        lowerCasePass = true;\n    } else {\n        lowerCasePass = false;\n    }\n\n    let upperCaseLetters = /[A-Z]/g;\n    let upperCasePass = false;\n\n    if(password.match(upperCaseLetters)) { \n        upperCasePass = true;\n    } else {\n        upperCasePass = false;\n    }\n\n    let hasNumbers = /[0-9]/g;\n    let hasNumbersPass = false;\n\n    if(password.match(hasNumbers)) { \n        hasNumbersPass = true;\n    } else {\n        hasNumbersPass = false;\n    }\n\n    let passwordLength = 8;\n    let passwordLengthPass = false;\n\n    if(password.length >= passwordLength) {\n        passwordLengthPass = true;\n    }\n\n    else {\n        passwordLengthPass = false;\n    }\n\n    if(lowerCasePass && upperCasePass && hasNumbersPass && passwordLengthPass) {\n        return true;\n    }\n\n    return false;\n\n}\n\nexport const ValidateEmailAddress = (emailAddress: string) => {\n    let emailRegex = /^(([^<>().,;:\\s@\"]+(.[^<>().,;:\\s@\"]+)*)|(\".+\"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+.)+[a-zA-Z]{2,}))$/;\n    if(emailAddress.match(emailRegex)){\n        return true;\n    }\n    return false;\n}\n\n\nexport const ValidateStrongPassword = (password: string, passwordScore: number) => {\n\n    if(password) {\n        if(passwordScore >= 2){\n            return true;\n        }\n\n        return false;\n    }\n    \n    return false;\n}\n\nexport const GenerateTextInputValidationParameters = (inputFieldId: string, validationFieldId: string) => {\n    let textInputValidationParameters:any = {};\n\n    let textInputField = document.getElementById(inputFieldId);\n    let textInputValidationField = document.getElementById(validationFieldId);\n\n    if(textInputField) {\n        textInputValidationParameters[\"inputField\"] = textInputField;\n    } else {\n        textInputValidationParameters[\"inputField\"] = null;\n    }\n\n    if(textInputValidationField) {\n        textInputValidationParameters[\"validationField\"] = textInputValidationField;\n    } else {\n        textInputValidationParameters[\"validationField\"] = null;\n    }\n\n    return textInputValidationParameters;\n}\n\nexport const GeneratePasswordValidationParameters = (inputFieldId: string, validationFieldId: string, passwordMeterContainerClass: string) => {\n    let passwordValidationParameters:any = {};\n    \n    let passwordInputField = document.getElementById(inputFieldId);\n    let passwordValidationField = document.getElementById(validationFieldId);\n    let passwordMeterContainer = document.getElementsByClassName(passwordMeterContainerClass)[0];\n\n    if(passwordInputField)  {\n        passwordValidationParameters[\"inputField\"] = passwordInputField;\n    } else {\n        passwordValidationParameters[\"inputField\"] = null;\n    }\n\n    if(passwordValidationField) {\n        passwordValidationParameters[\"validationField\"] = passwordValidationField;\n    } else {\n        passwordValidationParameters[\"validationField\"] = null;\n    }\n\n    if(passwordMeterContainer) {\n        passwordValidationParameters[\"passwordMeterContainer\"] = passwordMeterContainer;\n    } else {\n        passwordValidationParameters[\"passwordMeterContainer\"] = null;\n    }\n\n    return passwordValidationParameters;\n}\n\nexport const DisplayFailValidation = (inputTarget:HTMLElement | null, validationField: HTMLElement | null, passwordMeterContainer:Element | null, errorMessage:string) => {\n\n    if(inputTarget) {\n        if(inputTarget.parentNode) {\n            let formGroup = inputTarget.parentNode as HTMLElement;\n            formGroup.classList.add(\"validate-field-group\",\"failed\", \"active\");\n        }\n\n        if(validationField) {\n            validationField.classList.remove(\"hide\");\n            validationField.classList.add(\"show\");\n            validationField.innerText = errorMessage;\n        }\n    }\n\n    if(passwordMeterContainer) {\n        passwordMeterContainer.classList.remove(\"show\");\n        passwordMeterContainer.classList.add(\"hide\");\n    }\n}\n\nexport const ClearFailValidation = (inputTarget:HTMLElement | null, validationField: HTMLElement | null, passwordMeterContainer:Element | null) => {\n    if(inputTarget) {\n        if(inputTarget.parentNode) {\n            let formGroup = inputTarget.parentNode as HTMLElement;\n            formGroup.classList.remove(\"validate-field-group\",\"failed\"); \n        }\n        if(validationField) {\n            validationField.classList.remove(\"show\");\n            validationField.classList.add(\"hide\");\n            validationField.innerText = \"\";\n        }\n    }\n    if(passwordMeterContainer) {\n        passwordMeterContainer.classList.remove(\"hide\");\n        passwordMeterContainer.classList.add(\"show\");\n    }\n}\n\nexport const StripHTMLFromInputs = (htmlValue: string) => {\n    var validation = /(<([^>]+)>)/ig;\n\n    return htmlValue.replace(validation, \"\");\n}\n","class ApiUtil {\n    DefaultHeaders(token?: string) {\n\n        if (token) {\n            return {\n                headers: {\n                    'Content-Type': 'application/json',\n                    'Authorization': `Bearer ${token}`\n                }\n            }\n        }\n        else {\n            let persistedStorage = localStorage.getItem('persist:root');\n\n            let authReducer;\n    \n            if (persistedStorage) {\n                let persistedStorageObject = JSON.parse(persistedStorage);\n                authReducer = JSON.parse(persistedStorageObject.authReducer);\n            }\n    \n            if (authReducer) {\n                if (authReducer.subscribedToken) {\n                    return {\n                        headers: {\n                            'Content-Type': 'application/json',\n                            'Authorization': `Bearer ${authReducer.subscribedToken}`\n                        }\n                    }\n                }\n                return null;\n            }\n        }\n        \n        return {\n            headers: {\n                'Content-Type': 'application/json'\n            }\n        }\n    }\n\n    GetModuleId() {\n        let persistedStorage = localStorage.getItem('persist:root');\n\n        let brandingReducer;\n\n        if (persistedStorage) {\n            let persistedStorageObject = JSON.parse(persistedStorage);\n            brandingReducer = JSON.parse(persistedStorageObject.brandingReducer);\n        }\n\n        if (brandingReducer) {\n            return brandingReducer.moduleId;\n        }\n        \n        return 0;\n    }\n\n    GetRefreshToken() {\n        let persistedStorage = localStorage.getItem('persist:root');\n\n        let authReducer;\n\n        if (persistedStorage) {\n            let persistedStorageObject = JSON.parse(persistedStorage);\n            authReducer = JSON.parse(persistedStorageObject.authReducer);\n        }\n\n        if (authReducer && authReducer.refreshToken) {\n            return { \"RefreshToken\": authReducer.refreshToken };\n        }\n        \n        return null;\n    }\n}\n\nexport default ApiUtil; ","import APIHost from \"../../APIHost\";\nimport axios from \"axios\";\nimport * as headerTypes from \"../Types/HeaderTypes\";\nimport * as identityTypes from \"../Types/IdentityTypes\";\nimport * as brandingTypes from \"../Types/BrandingTypes\";\nimport * as productListTypes from \"./../Types/ProductListTypes\";\nimport * as productDetailsTypes from \"./../Types/ProductDetailsTypes\";\nimport * as types from \"./../Types/AuthTypes\";\nimport * as categoryTypes from \"./../Types/CategoryTypes\";\nimport * as freightTypes from \"./../Types/FreightTypes\";\nimport * as b2bHelpers from \"../../Utils/B2BHelpers\";\nimport ApiUtil from \"../../Utils/ApiUtil\";\n\ninterface loginActionsTypes {\n  emailAddress: string;\n  password: string;\n}\n\nconst config = {\n  headers: {\n    \"Content-Type\": \"application/json\",\n  },\n};\n\nconst authHost = new APIHost();\nconst apiUtil = new ApiUtil();\n\nexport const LoginB2BUser = (credentials: loginActionsTypes) => (\n  dispatch: any\n) => {\n  let emailValidationParameters = b2bHelpers.GenerateTextInputValidationParameters(\n    \"EmailAddress\",\n    \"emailValidationError\"\n  );\n  let passwordvalidationParameters = b2bHelpers.GenerateTextInputValidationParameters(\n    \"LoginPassword\",\n    \"passwordValidationError\"\n  );\n  let isValidEmail = b2bHelpers.ValidateEmailAddress(credentials.emailAddress);\n\n  if (credentials.emailAddress && credentials.password) {\n    //Login Request - Processing phase\n    dispatch({ type: identityTypes.Authenticating_User });\n\n    let userCredentials = {\n      Email: credentials.emailAddress,\n      Password: credentials.password,\n    };\n\n    if (isValidEmail) {\n      axios\n        .post(authHost.AuthAPI(\"AuthorizeUser\"), userCredentials, config)\n        .then((res) => {\n\n          dispatch({\n            type: types.Authorize_B2B_User,\n            payload: {\n              isAuthorize: res.data.success,\n              subscribedToken: res.data.token,\n              refreshToken: res.data.refreshToken,\n            },\n          });\n        })\n        .catch((error) => {\n          if (error.response) {\n            let errorStatus = error.response.status;\n\n            let errorDescription = \"Error: Unable to login.\";\n\n            if (error.response.data) {\n              errorDescription = error.response.data.errors[0].description;\n            }\n\n            if (errorStatus) {\n                dispatch({\n                  type: identityTypes.Authentication_Error,\n                  payload: {\n                    message: errorDescription,\n                  },\n                });\n            }\n          } else {\n            if (error.message) {\n              dispatch({\n                type: identityTypes.Authentication_Error,\n                payload: {\n                  message: error.message,\n                },\n              });\n            } else {\n              dispatch({\n                type: identityTypes.Authentication_Error,\n                payload: {\n                  message: \"Something went wrong.\",\n                },\n              });\n            }\n          }\n        });\n    } else {\n      b2bHelpers.DisplayFailValidation(\n        emailValidationParameters.inputField,\n        emailValidationParameters.validationField,\n        null,\n        \"Invalid email address\"\n      );\n      dispatch({\n        type: identityTypes.Login_Email_Address_Not_Valid,\n      });\n    }\n  } else {\n    if (!credentials.password && !credentials.emailAddress) {\n      b2bHelpers.DisplayFailValidation(\n        emailValidationParameters.inputField,\n        emailValidationParameters.validationField,\n        null,\n        \"Enter your email address\"\n      );\n      b2bHelpers.DisplayFailValidation(\n        passwordvalidationParameters.inputField,\n        passwordvalidationParameters.validationField,\n        null,\n        \"Enter your password\"\n      );\n    } else if (!credentials.emailAddress) {\n      b2bHelpers.DisplayFailValidation(\n        emailValidationParameters.inputField,\n        emailValidationParameters.validationField,\n        null,\n        \"Enter your email address\"\n      );\n    } else {\n      b2bHelpers.DisplayFailValidation(\n        passwordvalidationParameters.inputField,\n        passwordvalidationParameters.validationField,\n        null,\n        \"Enter your password\"\n      );\n    }\n\n    dispatch({\n      type: identityTypes.Login_Validation_Inputs_Failed,\n    });\n  }\n};\n\nexport const ClearIdentityErrorMessages = () => (dispatch: any) => {\n  dispatch({\n    type: types.Auth_Errors_Clear_State,\n  });\n};\n\n//Clear Logout Error Message State\nexport const LogoutClearState = () => (dispatch: any) => {\n  dispatch({\n    type: types.Logout_Clear_State,\n  });\n};\n\nexport const RefreshUserToken = () => (dispatch: any) => {\n  let refreshToken = apiUtil.GetRefreshToken();\n\n  if (refreshToken === null) {\n    dispatch(LogoutB2BUser());\n    return;\n  }\n\n  axios\n    .post(authHost.AuthAPI(\"RefreshUserToken\"), refreshToken, config)\n    .then((res) => {\n      dispatch({\n        type: types.Refresh_User_Token,\n        payload: {\n          isAuthorize: res.data.success,\n          subscribedToken: res.data.token,\n          refreshToken: res.data.refreshToken,\n        },\n      });\n    })\n    .catch(() => {\n      dispatch(LogoutB2BUser(\"You have been logged out due to inactivity.\"));\n    });\n};\n\nexport const LogoutB2BUser = (errorMessage?: string) => (dispatch: any) => {\n  let refreshToken = apiUtil.GetRefreshToken();\n\n  var headers = apiUtil.DefaultHeaders();\n\n  if (refreshToken !== null && headers !== null) {\n    axios\n      .post(authHost.AuthAPI(\"Logout\"), refreshToken, headers)\n      .then((res) => {})\n      .catch(() => {});\n  }\n\n  dispatch({\n    type: identityTypes.Login_Reset_Initial_State,\n  });\n  dispatch({\n    type: identityTypes.Login_Reset_User_Details,\n  });\n  dispatch({\n    type: headerTypes.Side_Menu_Reset_Status,\n  });\n  dispatch({\n    type: brandingTypes.Reset_Brand_Info,\n  });\n  dispatch({\n    type: productListTypes.Reset_Products_List,\n  });\n  dispatch({\n    type: productListTypes.Reset_Brands_List,\n  });\n  dispatch({\n    type: productListTypes.Reset_Products_Filter,\n  });\n  dispatch({\n    type: productListTypes.Reset_Categories_List,\n  });\n  dispatch({\n    type: productDetailsTypes.Hide_Product_Details_Modal,\n  });\n  dispatch({\n      type: categoryTypes.Reset_Current_Category\n  });\n  dispatch({\n      type: productListTypes.Reset_Category_Route_Objects\n  });\n  dispatch({\n    type: freightTypes.Reset_Freight_Options\n  });\n  dispatch({\n    type: types.Deauthorize_B2B_User,\n    payload: {\n      errorMessage: errorMessage || \"\",\n    },\n  });\n};\n","export enum DiscountSourceType {\n    None = 0,\n    SpecialPrice = 1,\n    PriceTier = 2,\n    Promotions = 3,\n    Manual = 4,\n    Other = 5\n}","import APIHost from '../APIHost';\nimport { DiscountSourceType } from '../Enums/PromoMatrix/DiscountSourceType';\nimport AppliedOrderLineDiscount from '../Interfaces/PromoMatrix/AppliedOrderLineDiscount';\nimport { ProductDetailsOption } from '../Redux/Reducers/App_Reducers/ProductDetailsReducer';\n\nconst apiHost = new APIHost();\n\nexport const GetProductImageUrl = (imagePath:string) => {\n    let appSettings = apiHost.GetEnvironmentConfig();\n    \n    if (appSettings && imagePath && imagePath.length > 0) {\n\n        if (imagePath.includes('https://')) {\n            return imagePath;\n        }\n\n        return appSettings.WebFilesHost + imagePath;\n    }\n\n    return '';\n};\n\n// Check if a list of product options contains sizes.\nexport const ContainsSizes = (list: any[]) => {\n    let containsSizes = list.some((options: any[]) =>\n        {\n            return options.some((item: any) => item.size || (item.uomSize && options.length > 1))\n        }\n    );\n    return containsSizes;\n};\n\n// Check if a list of product options contains UOMs.\nexport const ContainsUoms = (list: any[]) => {\n    return list.find((item: any) => item.uomId) !== undefined;\n};\n\n// Group a list by the given keys.\nexport const GroupByKey = (array: any[], f: any) => {\n    let groups: any = {};\n    array.forEach(function (o) {\n        var group = JSON.stringify(f(o));\n        groups[group] = groups[group] || [];\n        groups[group].push(o);\n    });\n    return Object.keys(groups).map(function (group) {\n        return groups[group];\n    })\n};\n\nexport const RoundStockNumber = (stockNumber: number) => {\n    return Math.floor(stockNumber);\n};\n\n\nexport function getContractPrice(promotions: AppliedOrderLineDiscount[]): number {\n    const contractPrices = promotions\n      .map((promotion) => promotion.contractPrice)\n      .filter((price): price is number => price !== null);\n  \n      return contractPrices.length === 1 ? contractPrices[0] : 0;\n    }\nexport const GetTotalProductOptionPrice = (option: ProductDetailsOption) => {\n    if(option.contractPrice){\n        if(option.uomSize){\n            return option.contractPrice * option.uomSize * option.productQuantity;\n        }\n        return option.contractPrice * option.productQuantity;\n    }\n\n    if(option.lineItemDiscount){\n        let price = option.discountSource === DiscountSourceType.PriceTier && option.retailPrice > 0 \n            ? option.retailPrice\n            : option.price;\n        if(option.discountSource === DiscountSourceType.SpecialPrice && option.uomSize && option.baseUnitPrice){\n            price = option.baseUnitPrice * option.uomSize;\n        }\n        \n        return (price * option.productQuantity) - option.lineItemDiscount;\n    }\n    const isValidUnitDiscount = IsThereAValidUnitDiscountBetweenPriceAndSpecialPrice(option);\n    if (isValidUnitDiscount) {\n        return option.specialPrice * option.productQuantity;\n    } else {\n        return option.price * option.productQuantity;\n    }\n}\n\nexport const IsThereAValidUnitDiscountBetweenPriceAndSpecialPrice = (option: ProductDetailsOption) : boolean=> {\n    const {specialPrice, price} = option;\n    return !option.contractPrice && !!specialPrice && specialPrice < price;\n}\n\nexport const GetLineItemDiscount = (option : ProductDetailsOption) => {\n    const { price, specialPrice, productQuantity } = option;\n    return option.lineItemDiscount > 0 ? option.lineItemDiscount : \n        IsThereAValidUnitDiscountBetweenPriceAndSpecialPrice(option) ? Math.abs(price - specialPrice) * productQuantity : 0;\n}\n\nexport const GetSpecialPriceDiscount = (option : ProductDetailsOption) => {\n    const {price, specialPrice, productQuantity} = option;\n    return option.hasOwnProperty(\"price\") && !Number.isNaN(price) && price > 0 && !Number.isNaN(productQuantity) && productQuantity > 0 &&\n        IsThereAValidUnitDiscountBetweenPriceAndSpecialPrice(option) ? Math.abs(price - specialPrice) * productQuantity : 0;\n}\n\nexport const ProductObjectContainsOptionId = (product: any) => {\n    return product && product.hasOwnProperty(\"optionId\") && product.optionId;\n}\n\nexport const FormatIncomingDate = (value: string | null) => {\n\n    if (value) {\n        const date = new Date( Date.parse(value) );\n\n        const mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(date);\n        const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date);\n    \n        return `${da} ${mo}`;\n    }\n\n    return \"\";\n};\n","import PromotionOrderLine from '../Interfaces/PromoMatrix/PromotionOrderLine';\nimport ContractPricePromotionDisplay from \"../Interfaces/PromoMatrix/ContractPricePromotionDisplay\";\nimport StandardPromotionDisplay from \"../Interfaces/PromoMatrix/StandardPromotionDisplay\";\nimport { CartItem } from '../Redux/Reducers/App_Reducers/OrderReducer';\nimport { ProductDetailsOption } from '../Redux/Reducers/App_Reducers/ProductDetailsReducer';\nimport { getContractPrice } from './ProductsHelper';\nimport AppliedOrderLineDiscount from '../Interfaces/PromoMatrix/AppliedOrderLineDiscount';\n\nexport default class PromotionsHelper {\n\n    static MapOrderItemsForPromotions(orderItems : CartItem[], compareToSpecialPrice: boolean\n    ): PromotionOrderLine[]{\n        const overallArray : PromotionOrderLine[] = [];\n        orderItems.forEach(x => {\n            if(x.productOptions){\n                x.productOptions.forEach((productOption : ProductDetailsOption) => {\n                    const {price, retailPrice, specialPrice, optionId, sizeId, productCategories, \n                        uomId, sizeRangeId, uomSize, baseUnitPrice} = productOption;\n            \n                    let productQuantity = productOption.productQuantity;\n                    if(!productQuantity){ productQuantity = 0;}\n            \n                    let unitPrice = price ? price : 0;\n                    if( uomId && uomSize && baseUnitPrice){\n                        unitPrice = baseUnitPrice * uomSize;\n                    }\n            \n                    overallArray.push({\n                        price: unitPrice,\n                        retailPrice:  0, // can be used to compare price column as a discount to retail\n                        uomPrice: uomId ? price : 0,\n                        quantity: productQuantity,\n                        specialPrice: specialPrice && !Number.isNaN(specialPrice) ? specialPrice : 0,\n                        lineDiscount: 0,\n                        productId: x.productId,\n                        priceBreakId: !Number.isNaN(optionId) ? optionId : 0,\n                        stockId: sizeId ? sizeId : uomId ? uomId : 0, \n                        skuRangeId: sizeRangeId && sizeRangeId > 0 ? sizeRangeId : undefined,\n                        categoryIdArray: \"\",\n                        productCategories: productCategories,\n                        appliedDiscounts:  [],\n                        total: 0,\n                        uomSize: uomSize\n                    });\n                })\n            }\n        });\n        return overallArray;\n    }\n\n    static AssignRowIdToOrderedLineItems(lineItems: PromotionOrderLine[]): void{\n        lineItems.forEach((x, i) => x.rowId = i);\n    }\n\n    static MapBasketBackToOrderItems(basket: PromotionOrderLine[], orderItems: CartItem[]) {\n        if (!basket || !orderItems) {\n            return orderItems;\n        }\n        orderItems.forEach(orderItem => {\n            basket.forEach(basketLineItem => {\n                if(!orderItem.productOptions){ return }\n                const matchingProductOption = PromotionsHelper.GetMatch(orderItem.productOptions, basketLineItem)\n                if (matchingProductOption) {\n                    if(!matchingProductOption.productQuantity){\n                        matchingProductOption.productQuantity = 0;\n                    }\n                    matchingProductOption.lineItemDiscount = basketLineItem.lineDiscount;\n                    matchingProductOption.contractPrice = getContractPrice(basketLineItem.appliedDiscounts);\n                    if(matchingProductOption.lineItemDiscount > 0){\n                        let matchingPromo = basketLineItem.appliedDiscounts\n                        .filter((x : AppliedOrderLineDiscount) => x.discount === matchingProductOption.lineItemDiscount);\n                        if(matchingPromo?.length > 0){\n                            matchingProductOption.discountSource = matchingPromo[0].discountSource\n                        }\n                    }\n                }\n            });\n        });\n        \n        return orderItems;\n    }\n\n    static GetMatch(productOptions:ProductDetailsOption[], lineItem: PromotionOrderLine  ){\n        return productOptions.find(x => {\n            if(x.optionId !== lineItem.priceBreakId){\n                return false;\n            }\n            if(x.sizeId){\n                return x.sizeId === lineItem.stockId;\n            }\n            if(x.uomId){\n                return x.uomId === lineItem.stockId;\n            }\n            return !x.uomId && !lineItem.stockId;  \n        });\n    }\n\n    static ShouldShowPromotionDescriptions(promoDescriptions : StandardPromotionDisplay[]|ContractPricePromotionDisplay[]){\n        return Array.isArray(promoDescriptions) && promoDescriptions.length > 0\n    }\n\n    static ShouldShowContractPriceDescriptions(contractPricePromoDescriptions : ContractPricePromotionDisplay[]){\n        return this.ShouldShowPromotionDescriptions(contractPricePromoDescriptions) && \n        !(contractPricePromoDescriptions.length === 1 && contractPricePromoDescriptions[0].quantityRange === \"0+\")\n    }\n}","export enum PaymentMethodType {\n    OnAccount = 0,\n    PayOnline = 1\n}","import * as types from './../Types/OrderTypes';\nimport * as freightTypes from './../Types/FreightTypes';\nimport { UpdateProductOptionDisplayPrice } from './../Types/ProductDetailsTypes';\nimport { CartItem, OrderItemNote } from '../Reducers/App_Reducers/OrderReducer';\nimport axios from 'axios';\nimport { RefreshUserToken } from './../Actions/AuthActions';\nimport APIHost from '../../APIHost';\nimport ApiUtil from '../../Utils/ApiUtil';\nimport PromotionsHelper from '../../Utils/PromotionsHelper';\nimport CalculatePromotionsRequest from '../../Interfaces/PromoMatrix/CalculatePromotionsRequest';\nimport { PaymentMethodType } from '../../Enums/PaymentMethods/PaymentMethodType';\nimport { GetLineItemDiscount } from '../../Utils/ProductsHelper';\nimport _ from 'lodash';\nimport { ProductDetailsOption } from '../Reducers/App_Reducers/ProductDetailsReducer';\nimport { DiscountSourceType } from '../../Enums/PromoMatrix/DiscountSourceType';\n\nconst apiHost = new APIHost();\nconst apiUtil = new ApiUtil();\n\nlet cancel = axios.CancelToken.source();\n\nexport const CalculatePromotions = (addProductDetailsReducerProduct = false) => \n    (dispatch: any, getState: any) => {\n    const state =  getState();\n    const productDetails = state.productDetailsReducer.product;\n    const productId = productDetails?.id;\n\n    const itemsForPromotion =  _.cloneDeep([...state.orderReducer.orderItems]);\n    const productOptions : ProductDetailsOption[] = _.cloneDeep(productDetails?.options);\n    // opening for first time, add product to order\n    if(addProductDetailsReducerProduct \n        && productOptions && !itemsForPromotion.some((item: any) => item.productId === productId)){\n            let item : CartItem = {\n                productId: productDetails.id,\n                product: productDetails,\n                productOptions: productOptions,\n                totalItems: 0\n            };\n        itemsForPromotion.push(item)\n    }\n\n    const compareToSpecialPrice = state.identityReducer?.userInfo.priceTier?.compareToSpecialPrice;\n    const orderLineItems = PromotionsHelper.MapOrderItemsForPromotions(itemsForPromotion, compareToSpecialPrice);\n            \n    if(Array.isArray(orderLineItems) && orderLineItems.length > 0){\n        dispatch({\n            type: types.Calculate_Promotions,\n            payload: { addProductDetailsReducerProduct: addProductDetailsReducerProduct }\n        });\n        PromotionsHelper.AssignRowIdToOrderedLineItems(orderLineItems);\n        const headers = apiUtil.DefaultHeaders(getState().authReducer?.subscribedToken);\n\n        if (headers === null) {\n            return;\n        }\n\n        const calcPromoRequest : CalculatePromotionsRequest = {\n            moduleId: apiUtil.GetModuleId(),\n            listOfOrderLines: orderLineItems\n        };\n\n        if (cancel) {\n            // Cancel the previous request before making a new request\n            cancel.cancel();\n          }\n          \n          cancel = axios.CancelToken.source();\n      \n        const axiosConfig = {\n            headers: headers.headers, \n            cancelToken: cancel.token\n          };\n\n        dispatch({\n            type: types.Calculate_Promotions,\n            payload: { isLoading: true }\n        });\n\n        axios.post(apiHost.PromoMatrixAPI(\"CalculatePromotions\"), calcPromoRequest, axiosConfig).then(res => {\n\n            const orderItemsUpdatedWithPromoValues = \n                PromotionsHelper.MapBasketBackToOrderItems(res.data.basket, itemsForPromotion);\n\n            let productOptions = orderItemsUpdatedWithPromoValues\n                .filter((x : CartItem) => x.productId === productId)[0]?.productOptions;\n                \n\n            if(productOptions){\n               dispatch({\n                    type: UpdateProductOptionDisplayPrice,\n                    payload: productOptions\n                });\n            }\n\n            if (orderItemsUpdatedWithPromoValues){\n\n                let productsWithQuantity = orderItemsUpdatedWithPromoValues?.filter(item => item.totalItems > 0);\n                productsWithQuantity.forEach((x: any) => {\n                    x.productOptions = x.productOptions?.filter((item: any) => item.productQuantity > 0);\n                })\n\n                dispatch({\n                    type: types.Calculated_Promotions,\n                    payload: productsWithQuantity\n                });\n            }\n\n            dispatch({\n                type: types.Calculate_Promotions,\n                payload: { isLoading: false }\n            });\n\n        })\n        .catch(error => {\n            if (axios.isCancel(error)) {\n                return;\n            }\n\n            dispatch({\n                type: types.Calculate_Promotions,\n                payload: { isLoading: false }\n            });\n\n            if (error.response) {\n                let errorStatus = error.response.status;\n    \n                switch (errorStatus) {\n                    case 401:\n                        dispatch(RefreshUserToken());\n                        break;\n                    \n                    default:\n                        return;\n                }\n            } else {\n                return;\n            }\n        });\n    }\n}\n\nexport const IncrementOrderQuantity = (option: any, product: any, increment: number = 1) => (dispatch: any) => {    \n\n    dispatch({\n        type: types.Increment_Order_Quantity,\n        payload: {productOption: option, product, increment}\n    });\n}\n\nexport const DecrementOrderQuantity = (option: any, product: any) => (dispatch: any) => {\n    dispatch({\n        type: types.Decrement_Order_Quantity,\n        payload: {productOption: option, product: product}\n    });\n}\n\nexport const SetOrderQuantity = (option: any, product: any, quantity: number) => (dispatch: any) => {    \n    dispatch({\n        type: types.Set_Order_Quantity,\n        payload: {productOption: option, product: product, quantity: quantity}\n    });\n}\n\nexport const RemoveOrderProduct = (productId: number, optionId: number | null, sizeId: number | null, uomId: number | null) => (dispatch: any) => {\n\n    dispatch({\n        type: types.Remove_Order_Product,\n        payload: {productId: productId, optionId: optionId, sizeId: sizeId, uomId: uomId}\n    });\n}\n\nexport const ClearCart = () => (dispatch: any) => {\n\n    dispatch({\n        type: types.Clear_Cart\n    });\n}\n\nexport const UpdatePoNumber = (poNumberInput: string) => (dispatch: any) => {\n    dispatch({\n        type: types.Update_Purchase_Order_Number,\n        payload: { poNumber: poNumberInput }\n    });\n}\n\nexport const UpdateDeliveryDate = (deliveryDateInput: Date | null) => (dispatch: any) => {\n    dispatch({\n        type: types.Update_Delivery_Date,\n        payload: { deliveryDate: deliveryDateInput }\n    });\n}\n\nexport const UpdateDeliveryInstructions = (deliveryInstructionsInput: string) => (dispath: any) => {\n    dispath({\n        type: types.Update_Delivery_Instructions,\n        payload: { deliveryInstructions: deliveryInstructionsInput }\n    });\n}\n\nexport const UpdateDeliveryAddress = (deliveryAddressInput: any) => (dispatch: any) => {\n    dispatch({\n        type: types.Update_Delivery_Address,\n        payload: { deliveryAddress: deliveryAddressInput }\n    });\n}\n\nexport const CreateOrder = (order: any, userInfo: any, freightPrice: number, freightDescription: string) => (dispatch: any) => {\n\n    var headers = apiUtil.DefaultHeaders('');\n\n    if (headers === null) {\n        return;\n    }\n\n    let lineItems: { \n        productId: number; \n        optionId: number; \n        sizeId: number | null; \n        quantity: number; \n        description: string; \n        uomId: number | null; \n        uomSize: number | null; \n        contractPrice: number | null; \n        discount: number; \n        discountSource: DiscountSourceType; }[] = [];\n    \n    order.orderItems.forEach((product: CartItem) => {\n        product.productOptions.forEach((option: ProductDetailsOption) => {\n            const description = order.orderItemNotes.find((orderItemNote: OrderItemNote) => orderItemNote.optionId === option.optionId && orderItemNote.uomId === option.uomId)?.notes;\n            lineItems.push(\n                {\n                    productId: product.productId,\n                    optionId: option.optionId,\n                    sizeId: option.sizeId ?? null,\n                    quantity: option.productQuantity,\n                    description,\n                    uomId: option.uomId ?? null,\n                    uomSize: option.uomSize ?? null,\n                    contractPrice: option.contractPrice ? option.contractPrice : null,\n                    discount: GetLineItemDiscount(option),\n                    discountSource: option.discountSource\n                })\n        })\n    });\n\n    var deliveryDate = null;\n\n    if (order.orderDetails.deliveryDate != null) {\n        var date = new Date( Date.parse(order.orderDetails.deliveryDate) );\n\n        var dateEndOfDay = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);\n        \n        deliveryDate = dateEndOfDay.toUTCString();\n    }\n\n    const paymentMethod = order.orderDetails?.paymentMethod;\n\n    let postBody = {\n        moduleId: apiUtil.GetModuleId(),\n        paymentMethod: paymentMethod === PaymentMethodType.PayOnline ? null : \"On Account\",\n        billingAddress: {\n            company: userInfo.billingAddress.company,\n            firstName: userInfo.firstName,\n            lastName: userInfo.lastName,\n            address1: userInfo.billingAddress.address1,\n            address2: userInfo.billingAddress.address2,\n            city: userInfo.billingAddress.city,\n            state: userInfo.billingAddress.state,\n            postCode: userInfo.billingAddress.postCode,\n            country: userInfo.billingAddress.country\n        },\n        deliveryAddress: {\n            company: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.company : userInfo.deliveryAddress.company,\n            firstName: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.firstName : userInfo.firstName,\n            lastName: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.lastName : userInfo.lastName,\n            address1: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.address1 : userInfo.deliveryAddress.address1,\n            address2: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.address2 : userInfo.deliveryAddress.address2,\n            city: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.city : userInfo.deliveryAddress.city,\n            state: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.state : userInfo.deliveryAddress.state,\n            postCode: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.postCode : userInfo.deliveryAddress.postCode,\n            country: order.orderDetails.deliveryAddress ? order.orderDetails.deliveryAddress.country : userInfo.deliveryAddress.country\n        },\n        lineItems: lineItems,\n        EstimatedTimeOfDelivery: deliveryDate,\n        DeliveryInstructions: order.orderDetails.deliveryInstructions,\n        CustomerOrderNumber: order.orderDetails.poNumber,\n        FreightPrice: freightPrice,\n        FreightDescription: freightDescription,\n    };\n\n    dispatch({\n       type: types.Creating_Order\n    });\n\n    axios.post(apiHost.CheckoutAPI(\"CreateOrder\"), postBody, headers).then(res => {\n\n        let response = res.data;\n\n        if (response.success) {\n            dispatch({\n                type: types.Create_Order_Success,\n                payload: {\n                    reference: response.reference,\n                    id: response.id\n                }\n            });\n\n            if (paymentMethod === PaymentMethodType.PayOnline) {\n                dispatch({\n                    type: types.Redirect_To_Payment,\n                    payload: {\n                        shouldRedirectToPayment: true\n                    }\n                });\n            }\n            else {\n                dispatch(ForceStopDisplayingPlacingOrder());\n                dispatch({\n                    type: types.Redirect_To_Confirmation,\n                    payload: {\n                        shouldRedirect: true\n                    }\n                });\n            }\n        }\n        else {\n            \n            let errorMessage = \"An unknown error occurred.\";\n\n            if (response.errors) {\n                errorMessage = response.errors[0].description;\n            }\n\n            dispatch(SetOrderFailAndErrorMessage(errorMessage));\n        }\n\n    }).catch((error) => {\n        if (error.response) {\n            let errorStatus = error.response.status;\n\n            switch (errorStatus) {\n                case 401:\n                    dispatch(SetOrderFailAndErrorMessage(''));\n                    dispatch(RefreshUserToken());\n                    break;\n                \n                default:\n                    dispatch(SetOrderFailAndErrorMessage(error.message));\n                    break;\n            }\n        } else {\n            dispatch(SetOrderFailAndErrorMessage(error.message));\n        }\n    });\n}\n\nexport const OrderCompletionSuccessful = () => (dispatch: any) => {\n    dispatch({\n        type: types.Order_Completion_Successful\n    });\n    dispatch({\n        type: types.Clear_Cart\n    });\n    dispatch({\n        type: freightTypes.Reset_Freight_Options\n    });\n}\n\nexport const ResetCheckoutState = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Checkout_State\n    });\n}\n\nexport const UpdateOrderItemNotes = (orderItemOptionId: number, productId: number, uomId: number | null, notes: string) => (dispatch: any) => {\n    dispatch({\n        type: types.Update_Order_Item_Notes,\n        payload: { orderItemOptionId, notes, productId, uomId }\n    });\n}\n\nexport const DeleteOrderItemNotes = (orderItemOptionId: number, productId: number, uomId: number | null) => (dispatch: any) => {\n    dispatch({\n        type: types.Delete_Order_Item_Notes,\n        payload: { orderItemOptionId, productId, uomId }\n    });\n}\n\nexport const Reorder = (orderId: number) => (dispatch: any) => {\n\n    var headers = apiUtil.DefaultHeaders('');\n\n    if (headers === null) {\n        return;\n    }\n\n    let postBody = {\n        moduleId: apiUtil.GetModuleId(),\n        orderId: orderId\n    };\n\n    dispatch({\n        type: types.Fetching_Reorder_Details\n    });\n\n    axios.post(apiHost.CheckoutAPI(\"Reorder\"), postBody, headers).then(res => {\n\n        let response = res.data;\n\n        let count = 0;\n\n        let unavailableCount = 0;\n\n        response.orderItems.forEach((orderItem: any) => {\n\n            let product = {\n                id: orderItem.id,\n                name: orderItem.name,\n                styleCode: orderItem.styleCode,\n                images: orderItem.images.map((image: any) => {\n                    return ({\n                        thumbnail: image !== null ? image.thumbnail : null,\n                        medium: image !== null ? image.medium : null,\n                        full: image !== null ? image.full : null\n                    });\n                }),\n                taxRate: orderItem.taxRate,\n                allowOverselling: orderItem.allowOverselling\n            };\n\n            orderItem.orderOptions.forEach((orderOption: any) => {\n\n                let quantityOrdered: number = orderOption.quantityOrdered;\n\n                if (orderItem.allowOverselling === false && orderOption.stock <= 0) {\n                    unavailableCount += quantityOrdered;\n                    return;\n                }\n\n                let option = {\n                    optionId: orderOption.optionId,\n                    sizeId: orderOption.sizeId,\n                    code: orderOption.code,\n                    option1: orderOption.option1,\n                    option2: orderOption.option2,\n                    option3: orderOption.option3,\n                    size: orderOption.size,\n                    uomId: orderOption.uomId,\n                    uomSize: orderOption.uomSize,\n                    price: orderOption.price,\n                    specialPrice: orderOption.specialPrice,\n                    image: orderOption.image != null ? orderOption.image.thumbnail : null,\n                    stock: orderOption.stock\n                };\n    \n                if (orderItem.allowOverselling === false && orderOption.stock < quantityOrdered) {\n                    unavailableCount += (quantityOrdered - orderOption.stock);\n                    quantityOrdered = orderOption.stock;\n                }\n\n                count += quantityOrdered;\n    \n                dispatch(IncrementOrderQuantity(option, product, quantityOrdered));\n            });\n        });\n        \n        dispatch(CalculatePromotions());\n\n        dispatch({\n            type: types.Reorder_Details_Success,\n            payload: {\n                itemsCount: count,\n                unavailableItemsCount: unavailableCount\n            }\n        });\n\n    }).catch((error) => {\n        if (error.response) {\n            let errorStatus = error.response.status;\n\n            switch (errorStatus) {\n                case 401:\n                    dispatch({\n                        type: types.Reorder_Details_Fail,\n                        payload: {\n                            message: ''\n                        }\n                    });\n                    dispatch(RefreshUserToken());\n                    break;\n\n                default:\n                    dispatch({\n                        type: types.Reorder_Details_Fail,\n                        payload: {\n                            message: error.message\n                        }\n                    });\n                    break;\n            }\n        } else {\n            dispatch({\n                type: types.Reorder_Details_Fail,\n                payload: {\n                    message: error.message\n                }\n            });\n        }\n    });\n}\n\nexport const ResetReorderState = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reorder_Details_Reset\n    });\n}\n\nexport const ResetOrderPaymentRedirect = () => (dispatch: any) => {\n    dispatch({\n        type: types.Redirect_To_Payment,\n        payload: {\n            shouldRedirectToPayment: false\n        }\n    });\n}\n\nexport const UpdateOrderPaymentMethod = (paymentMethod?: PaymentMethodType) => (dispatch: any) => {\n    dispatch({\n        type: types.Update_Order_Payment_Method,\n        payload: { paymentMethod }\n    });\n}\n\nexport const ForceStopDisplayingPlacingOrder = () => (dispatch: any) => {\n    dispatch({\n        type: types.Force_Stop_Display_Placing_Order_Message\n    });\n}\n\nexport const SetOrderFailAndErrorMessage = (errorMessage : string) => (dispatch: any) => {\n    dispatch({\n        type: types.Create_Order_Fail,\n        payload: {\n            errorMessage: errorMessage\n        }\n    });\n}\n\nexport const SetPaymentFailed = (paymentFailed: boolean) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Payment_Failed,\n        payload: {\n            paymentFailed: paymentFailed\n        }\n    });\n}","import React, { Component } from 'react';\nimport { Route, Redirect, RouteComponentProps } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { CalculatePromotions } from \"../../Redux/Actions/OrderActions\";\n\ninterface componentProps extends Partial<RouteComponentProps> {\n    userRestrictions?: {\n        isAuthorize: boolean;\n    };\n    orderedItems: any[];\n    component: React.ComponentType<any>;\n    path?: string;\n    CalculatePromotions: () => void;\n}\n\nclass RestrictedPage extends Component<componentProps, {}> {\n\n    async componentDidMount(){\n        if(this.props.userRestrictions?.isAuthorize && this.props.orderedItems.length > 0) {\n            await this.props.CalculatePromotions();\n        }\n    }\n\n    render() {\n        const {userRestrictions, component: Component, ...rest} = this.props;\n\n        const renderRoute = (props: any) => {\n            if(userRestrictions!.isAuthorize) {\n                return(\n                    <Component {...props} />\n                );\n            }\n            else {\n                return (\n                    <Redirect to={\n                        {\n                            pathname: '/login',\n                            state: {from: props.location}\n                        }\n                    } />\n                )\n            }\n        }\n        \n        return(\n            <Route {...rest} render={renderRoute} />\n        )\n    }\n}\n\nconst MapStateToProps = (state: {authReducer: any, orderReducer: any}) => ({\n    userRestrictions: state.authReducer,\n    orderedItems: state.orderReducer?.orderItems\n});\n\nexport default connect(MapStateToProps, {CalculatePromotions})(RestrictedPage);","import APIHost from '../APIHost';\n\nconst apiHost = new APIHost();\n\nexport const GetTenantImageUrl = (imagePath:string) => {\n    let appSettings = apiHost.GetEnvironmentConfig();\n    \n    if (appSettings && imagePath && imagePath.length > 0) {\n\n        if (imagePath.includes('https://')) {\n            return imagePath;\n        }\n\n        return appSettings.AssetsHost + imagePath;\n    }\n\n    return imagePath;\n};","import { GetTenantImageUrl } from \"../../Utils/LoginHelper\";\nimport { CustomHomepageType } from \"../Reducers/App_Reducers/IdentityReducer\";\n\nexport const getStoreLogo = (state:any): string => {\n    return GetTenantImageUrl(state.brandingReducer?.loginPageImageUrl);\n}\n\nexport const getIsCustomHomepageEnabled = (state: any) : boolean => state.identityReducer?.moduleSettings?.customHomepage?.enabled;\n\nexport const getCustomHomepageSettings = (state: any) : CustomHomepageType => state.identityReducer?.moduleSettings?.customHomepage;\n","import { PaymentOptionsConfig } from '../../Types/PaymentOptionsConfig';\n\nconst defaultPaymentPortalEnabled : PaymentOptionsConfig = {\n    active: false,\n    sort: -1\n}\n\nconst defaultOnAccountEnabled : PaymentOptionsConfig = {\n    active: false,\n    sort: 0\n}\n\nexport const getUserIsOnHold = (state: any) => state.identityReducer?.userInfo?.accountOnHold;\n\nexport const getUserRemainingCreditLimit = (state: any) => state.identityReducer?.userInfo?.remainingCreditLimit;\n\nexport const getUserInfo = (state: any) => state.identityReducer?.userInfo;\n\nexport const getBranchInfo = (state: any) => state.identityReducer?.branchInfo;\n\nexport const getIsPaymentsPortalEnabled = (state: any) : PaymentOptionsConfig => state.identityReducer?.moduleSettings?.paymentOptions?.paymentPortalEnabled ?? defaultPaymentPortalEnabled;\n\nexport const getUserDepositPercentage = (state: any) =>  state.identityReducer?.userInfo?.depositPercentage;\n\nexport const getIsOnAccountOptionEnabled = (state: any) : PaymentOptionsConfig => {\n    if (getIsPaymentsPortalEnabled(state)?.active) {\n        return state.identityReducer?.moduleSettings?.paymentOptions?.onAccountEnabled ?? defaultOnAccountEnabled;\n    }\n    else {\n        defaultOnAccountEnabled.active = true;\n        return defaultOnAccountEnabled;\n    }\n};\n\nexport const getUserCurrency = (state: any) => state.identityReducer?.userInfo?.priceTier?.currencyCode;\n\nexport const getUserPriceTier = (state: any) => state.identityReducer?.userInfo?.priceTier;\n\nexport const getUserInfoFetched = (state: any) => state.identityReducer?.userDetailsFetched;\n\nexport const getRetailPriceTierCurrency = (state: any) : string => state.identityReducer?.moduleSettings?.productRetailPriceTier?.currencyCode;\n","export const ProductDetailsRoute = \"/products/details/\";\nexport const OrderReviewRoute = \"/cart\";\nexport const CategoriesRoute = \"/products/\";\nexport const CustomHompepageRoute = \"/home\";\n","import React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { Redirect } from \"react-router-dom\";\nimport { getIsCustomHomepageEnabled } from \"../../Redux/Selectors/SettingsSelectors\";\nimport { getUserInfoFetched } from \"../../Redux/Selectors/UserSelectors\";\nimport { CategoriesRoute, CustomHompepageRoute } from \"../../Routes\";\n\nexport const Index = () => {\n    const isCustomHomepageEnabled = useSelector(getIsCustomHomepageEnabled);\n    const isUserInfoFetched = useSelector(getUserInfoFetched);\n\n    if (!isUserInfoFetched || isCustomHomepageEnabled) {\n        return <Redirect to={CustomHompepageRoute} />;\n    }\n    else {\n        return <Redirect to={CategoriesRoute} />;\n    }\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass LockIcon extends Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            fillColor: '#33b3cb'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.FillColor) {\n            this.setState({\n                fillColor: this.props.FillColor\n            });\n        }\n    }\n\n    render() { \n        const { fillColor } = this.state;\n        const cls1 = {\n            fill: fillColor\n        }\n\n        return ( \n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"18.214\" height=\"27.857\" viewBox=\"0 0 18.214 27.857\">\n                <title>Lock Icon</title>\n                <path id=\"Path_5287\" d=\"M433.371 292.663h-.757v-4.654a7.008 7.008 0 0 0-14.016-.016v4.67h-.755a1.343 1.343 0 0 0-1.343 1.343v13.5a1.343 1.343 0 0 0 1.342 1.344h15.528a1.343 1.343 0 0 0 1.344-1.342v-13.5a1.343 1.343 0 0 0-1.343-1.345zm-7.768-9.788a5.135 5.135 0 0 1 5.134 5.134v4.654h-10.265v-4.654a5.135 5.135 0 0 1 5.128-5.134zm7.233 24.1h-14.462v-12.439h14.465zm-7.232-3.254a.936.936 0 0 0 .937-.935v-4.065a.937.937 0 1 0-1.874-.005v4.068a.936.936 0 0 0 .933.941z\" style={cls1} data-name=\"Path 5287\" transform=\"translate(-416.5 -280.993)\"/>\n            </svg>\n         );\n    }\n}\n\nLockIcon.propTypes = {\n    FillColor: PropTypes.string\n}\n \nexport default LockIcon;","import React, { Component } from 'react';\nclass ErrorCrossIcon extends Component {\n\n    render() { \n        const cls1 = {\n            fill: 'none',\n            stroke: '#dd3b3b',\n            strokeWidth: '2.5px',\n            strokeMiterlimit: 10\n        }\n        const cls2 = {\n            fill: 'none',\n            stroke: '#dd3b3b',\n            strokeWidth: '2.5px',\n            strokeLinecap: 'round',\n            strokeLinejoin: 'round'\n        }\n        return ( \n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"92.5\" height=\"92.5\" viewBox=\"0 0 92.5 92.5\">\n                <title id=\"ErrorCrossIcon\">Error Red Cross</title>\n                <g id=\"Group_737\" data-name=\"Group 737\" transform=\"translate(-502.311 -407.038)\">\n                    <path id=\"Path_5156\" d=\"M593.561 453.291a45 45 0 1 1-45.007-45 45 45 0 0 1 45.007 45z\" style={cls1} data-name=\"Path 5156\"/>\n                    <g id=\"Group_736\" data-name=\"Group 736\" transform=\"translate(530.979 435.705)\">\n                        <path id=\"Line_247\" d=\"M35.166 0L0 35.166\" style={cls2} data-name=\"Line 247\"/>\n                        <path id=\"Line_248\" d=\"M35.166 35.166L0 0\" style={cls2} data-name=\"Line 248\"/>\n                    </g>\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default ErrorCrossIcon;","import React, { Component } from 'react';\n\n//Assets\nimport LockIcon from './../../Images/Icons/LockIcon';\nimport ErrorCrossIcon from './../../Images/Icons/ErrorCrossIcon';\n\ninterface componentProps {\n    pageTitle: string;\n    pageTitleClass?: string;\n    pageSubtitle?: string;\n    pageSubtitleClass?: string;\n    enableIcon?: boolean;\n    iconType?: string;\n    iconValue?: string;\n}\n\nclass Cin7FormHeading extends Component<componentProps, {}> {\n    \n    render() { \n        const { pageTitle, pageTitleClass, pageSubtitle, pageSubtitleClass, enableIcon, iconType} = this.props;\n\n        const RenderIcon: any = (props: componentProps) => {\n            switch (props.iconValue) {\n                case \"LockIcon\":\n                    return <LockIcon FillColor={'#002dff'} />;\n                default:\n                    return <ErrorCrossIcon />;\n            }\n        }\n\n        return ( \n            <>\n                {enableIcon && \n                    <div className=\"cin7-heading-icon-container\">\n                        <RenderIcon iconValue={iconType} />\n                    </div>\n                }\n\n                <h2 className={`${enableIcon ? \"icon-on-top\": \"icon-default\"} ${pageTitleClass ? pageTitleClass : \"title-default\"}`}>\n                    <strong>{pageTitle}</strong>\n                </h2>\n\n                {pageSubtitle && \n                    <h3>\n                        <span className={`legend ${pageSubtitleClass}`}>\n                            {pageSubtitle}\n                        </span>\n                    </h3>\n                }\n            </>\n         );\n    }\n}\n \nexport default Cin7FormHeading;","export default __webpack_public_path__ + \"static/media/Cover_Client_B2B.d5fad3e0.jpg\";","import React from \"react\";\n\nimport CoverClientB2B from \"../../../Images/Cover_Client_B2B.jpg\";\nimport { GetTenantImageUrl } from \"../../../Utils/LoginHelper\";\n\nimport \"./Styles/_SidePageBanner.scss\";\n\ntype Props = {\n    customerBanner?: string;\n};\n\nconst SidePageBanner = (props: Props) => {\n    const { customerBanner } = props;\n    let backgroundImg = CoverClientB2B;\n\n    if (customerBanner && customerBanner.length !== 0) {\n        backgroundImg = GetTenantImageUrl(customerBanner);\n    }\n\n    const b2bCoverImageStyle = {\n        backgroundImage: `url(\"${backgroundImg}\")`,\n    };\n\n    return (\n        <div className=\"side-banner-container\" style={b2bCoverImageStyle}>\n            {!CoverClientB2B && (\n                <>\n                    <div className=\"side-banner-overlay\"></div>\n                    <div className=\"side-banner-text\">{`Order With A Click`}</div>\n                </>\n            )}\n        </div>\n    );\n};\n\nexport default SidePageBanner;\n","import React, { Component } from 'react';\n\nclass EmailIcon extends Component {\n    \n    render() { \n\n        const cls1 = {\n            fill: 'none',\n            stroke: '#373839',\n            strokeLinejoin: 'round',\n            strokeWidth: '1.5px'\n        };\n\n        const cls2 = {\n            fill: 'none',\n            stroke: '#373839',\n            strokeLinejoin: 'round',\n            strokeWidth: '1.5px',\n            strokeLinecap: 'square'\n        };\n\n        const cls3 = {\n            fill: 'none',\n            stroke: '#373839',\n            strokeLinejoin: 'round',\n            strokeWidth: '1.5px',\n            strokeLinecap: 'round'\n        };\n\n        return ( \n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"18.5\" height=\"13.846\" viewBox=\"0 0 18.5 13.846\">\n                <title id=\"Email-Icon\">Email Envelope</title>\n                <g id=\"Group_9927\" data-name=\"Group 9927\" transform=\"translate(-1406.633 -410.645)\">\n                    <path id=\"Rectangle_2801\" d=\"M0 0h17v12.346H0z\" style={cls1} data-name=\"Rectangle 2801\" transform=\"translate(1407.383 411.395)\"/>\n                    <g id=\"Group_9921\" data-name=\"Group 9921\" transform=\"translate(1408.831 418.329)\">\n                        <path id=\"Line_249\" d=\"M3.58 0L0 4.284\" style={cls2} data-name=\"Line 249\"/>\n                        <path id=\"Line_250\" d=\"M0 0l3.58 4.284\" style={cls2} data-name=\"Line 250\" transform=\"translate(10.524)\"/>\n                    </g>\n                    <path id=\"Path_5182\" d=\"M1408.452 412.353l7.266 5.9 7.206-5.944\" style={cls3} data-name=\"Path 5182\" transform=\"translate(.186 .031)\"/>\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default EmailIcon;","import React, { Component } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentState {\n    strokeColor: string;\n}\n\nclass CircleTickIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            strokeColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n    \n    render() {\n        const { strokeColor } = this.state;\n        \n        const cls1 = {\n            stroke: strokeColor\n        }\n        \n        return (\n            <svg width=\"72\" height=\"72\" viewBox=\"0 0 72 72\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Success</title>\n                <path d=\"M21 39L30 48L51 27\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\" style={cls1}/>\n                <circle cx=\"36\" cy=\"36\" r=\"31.5\" strokeWidth=\"3\" style={cls1}/>\n            </svg>\n        );\n    }\n}\n \nexport default CircleTickIcon;","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass AlertCircleIcon extends Component<componentProps,componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            strokeColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() {\n\n        const { strokeColor } = this.state;\n        \n        const cls1: CSSProperties = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Warning</title>\n                <path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" style={cls1} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n                <path d=\"M12 8V12\" style={cls1} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n                <path d=\"M12 16H12.01\" style={cls1} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n            </svg>\n\n        )\n    }\n}\n\nexport default AlertCircleIcon;","import React, { Component } from \"react\";\nimport EmailIcon from \"./../../Images/Icons/EmailIcon\";\nimport CircleTickIcon from \"./../../Images/Icons/Global/CircleTickIcon\";\nimport AlertCircleIcon from \"../../Images/Icons/Global/AlertCircleIcon\";\nimport \"./Styles/_Cin7ConfirmationBox.scss\";\n\ninterface componentProps {\n    boxMessage: string;\n    boxSubMessage?: string;\n    boxIcon?: string;\n    boxType?: string;\n}\n\nclass Cin7ConfirmationBox extends Component<componentProps, {}> {\n    render() {\n        const { boxIcon, boxMessage, boxType, boxSubMessage } = this.props;\n\n        const RenderConfirmationIcon = (props: any) => {\n            switch (props.iconType) {\n                case \"email-icon\":\n                    return <EmailIcon />;\n                case \"error-icon\":\n                    return <AlertCircleIcon strokeColor=\"#C42651\" />;\n                case \"warning-icon\":\n                    return <AlertCircleIcon strokeColor=\"#F2C94C\" />;\n                case \"info-icon\":\n                    return <AlertCircleIcon strokeColor=\"#00326b\" />;\n                default:\n                    return <CircleTickIcon strokeColor=\"#61A25E\" />;\n            }\n        };\n\n        return (\n            <div className={`confirmation-box-content ${boxType ? boxType : \"default-box\"}`}>\n                {boxIcon && (\n                    <div className={`confirmation-box-icon ${boxIcon}`}>\n                        <RenderConfirmationIcon iconType={boxIcon} />\n                    </div>\n                )}\n                <div className=\"confirmation-box-message\">\n                    <span className=\"main-message\">{boxMessage}</span>\n                    {boxSubMessage && <span className=\"sub-message\">{boxSubMessage}</span>}\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default Cin7ConfirmationBox;\n","import * as types from \"../Types/BrandingTypes\";\nimport APIHost from \"../../APIHost\";\nimport axios from \"axios\";\n\nconst config = {\n    headers: {\n        \"Content-Type\": \"application/json\",\n    },\n};\n\nconst host = new APIHost();\n\nexport interface contactRequestEmailTypes{\n    name: string;\n    email: string;\n    companyName: string;\n    phone: string;\n    message: string;\n    moduleId: number;\n}\n\nexport interface ReCaptchaValidationRequestTypes{\n    token: string;\n    moduleId: number;\n}\n\n//Get Store Details\nexport const GetStoreInformation = (brandFound: boolean) => (dispatch: any) => {\n    if (!brandFound) {\n        dispatch({ type: types.Getting_Brand_Info });\n\n        axios\n            .get(host.AuthAPI(\"StoreInformation\"), config)\n            .then((res) => {\n                let brandInfo = res.data;\n                dispatch({\n                    type: types.Display_Store_Brand_Info,\n                    payload: {\n                        storeName: brandInfo.storeName,\n                        moduleId: brandInfo.moduleId,\n                        loginPageImageUrl: brandInfo.loginPageImageUrl,\n                        loginBannerImageUrl: brandInfo.loginBannerImageUrl,\n                        contactFormEnabled: brandInfo.contactFormEnabled\n                    },\n                });\n            })\n            .catch(() => {\n                dispatch({\n                    type: types.Display_Store_Brand_Not_Found,\n                    payload: {\n                        loginPageImageUrl: \"\",\n                        loginBannerImageUrl: \"\",\n                    },\n                });\n            });\n    }\n};\n\nexport const ValidateGoogleReCaptcha = (reCaptchaValidationData: ReCaptchaValidationRequestTypes) =>(dispatch: any) => {   \n    if(reCaptchaValidationData.token && reCaptchaValidationData.moduleId){\n\n        axios.post(host.ContactUsFormAPI('ValidateReCaptchaToken'),reCaptchaValidationData,config).then((res) => {\n            dispatch({\n                type: types.Update_ReCaptcha_Validation_Result,\n                payload: res.data\n            }) \n        }).catch((error) => {\n            dispatch({\n                type: types.Update_ReCaptcha_Validation_Result,\n                payload: {\n                    success: false\n                }\n            }) \n        })\n    }\n};\n\nexport const SendContactUsRequestEmail = (contactFormData: contactRequestEmailTypes) => (dispatch: any) => {\n\n    dispatch({\n        type: types.Contact_Form_Email_Requested\n    })\n\n    if(contactFormData.moduleId){\n        axios.post(host.ContactUsFormAPI('SendRequestEmail'),contactFormData, config).then(res => {\n            let data = res.data;\n            dispatch({\n                type: types.Update_Contact_Form_Email_Status,\n                payload: data\n            });\n            dispatch({\n                type: types.Contact_Form_Email_Request_Has_Response\n            });\n        }).catch((error) => {\n            \n            dispatch({\n                type: types.Update_Contact_Form_Email_Status,\n                payload: {\n                    success: false\n                }\n            });\n            dispatch({\n                type: types.Contact_Form_Email_Request_Has_Response\n            });\n        });\n    }else{\n        dispatch({\n            type: types.Update_Contact_Form_Email_Status,\n            payload: {\n                success: false\n            }\n        });\n        dispatch({\n            type: types.Contact_Form_Email_Request_Has_Response\n        });\n    }\n}\n\nexport const ResetContactUsForm = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Contact_Form_Email_Status\n    });\n}\n","import React, { Component } from 'react';\n\nimport './Styles/_Loading.scss';\n\ninterface componentProps {\n    takeOver?: boolean;\n    inLine?: boolean;\n    text?: string;\n}\n\nclass Loading extends Component<componentProps, {}> {\n\n    render() {\n        const { inLine, text, takeOver } = this.props;\n\n        return (\n            <div className={`loading-container ${inLine ? \"\" : \"full-screen\"} ${takeOver ? \"take-over\" : \"\"}`}>\n                <div className=\"full-screen-background\">\n                    <div className=\"loading-dots\">\n                        <div></div>\n                        <div></div>\n                        <div></div>\n                    </div>\n                    <div className=\"loading-label\">{text ? text : 'Loading...'}</div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default Loading;","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    fillColor?: string;\n    size?: number;\n}\n\ninterface componentStates extends componentProps {}\n\nclass LoadingSpinnerIcon extends Component<componentProps,componentStates> {\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            fillColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if (this.props.fillColor) {\n            this.setState({\n                fillColor: this.props.fillColor\n            });\n        }\n    }\n\n    render() {\n\n        const { fillColor } = this.state;\n        const {size = 48} = this.props;\n        const cls1: CSSProperties = {\n            fill: fillColor\n        }\n\n        return (\n            <svg width={size} height={size} viewBox='0 0 48 48' fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <path d=\"M9.90462 18.8697C12.738 11.085 21.3456 7.07122 29.1303 9.90461C31.2528 10.6771 33.0949 11.8789 34.5944 13.3761L37.4235 10.547C35.5235 8.64867 33.1887 7.12503 30.4984 6.14584C20.6378 2.55688 9.7348 7.64103 6.14585 17.5016C2.55689 27.3622 7.64104 38.2652 17.5016 41.8542C24.6719 44.4639 32.3934 42.4876 37.453 37.4235L34.6239 34.5944C30.6295 38.5947 24.5319 40.1563 18.8697 38.0954C11.085 35.262 7.07123 26.6544 9.90462 18.8697Z\" style={cls1} />\n            </svg>\n        );\n    }\n}\n\nexport default LoadingSpinnerIcon;","import React, { Component } from 'react';\nimport LoadingSpinnerIcon from '../../Images/Icons/Global/LoadingSpinnerIcon';\nimport './Styles/_LoadingSpinner.scss';\n\nclass LoadingSpinner extends Component<{size?: number}> {\n\n    render() {\n        return (\n            <div className=\"loading-spinner-container\">\n                <LoadingSpinnerIcon fillColor={'#b1b1b2'} size={this.props.size} />\n            </div>\n        );\n    }\n}\n\nexport default LoadingSpinner;","import React, { Component, CSSProperties } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass OpenBox extends Component<componentProps, componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            strokeColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() { \n        const { strokeColor } = this.state;\n        \n        const cls1: CSSProperties = {\n            stroke: strokeColor\n        }\n          \n        return ( \n            <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <path d=\"M18.75 8.25V30.75M18.75 8.25H29.25L32.3182 15L29.25 15.4091M18.75 8.25H6.74998L3.74997 15L6.74998 15.3529M18.75 8.25L16.5 16.5L6.74998 15.3529M18.75 8.25L21.0682 16.5L29.25 15.4091M18.75 30.75L6.74998 27.75V15.3529M18.75 30.75L29.25 27.75C29.25 27.15 29.25 19.2727 29.25 15.4091\" style={cls1} strokeWidth=\"1.5\" strokeLinejoin=\"round\"/>\n            </svg>\n\n         );\n    }\n}\n \nexport default OpenBox;","import React, { Component } from 'react';\n\ninterface componentProps {}\n\ninterface componentStates extends componentProps {}\n\nclass Cin7Logo extends Component<componentProps,componentStates> {\n    render() {\n\n        return (\n            <svg width=\"1103px\" height=\"432px\" viewBox=\"0 0 1103 432\" version=\"1.1\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Cin7</title>\n                <g id=\"cin7-blue\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\" transform=\"translate(1.000000, 0.000000)\">\n                    <g id=\"cin7\" transform=\"translate(50.000000, 82.000000)\">\n                        <path d=\"M458.7166,45.4808 C504.3966,45.4808 530.0566,73.1148 535.9766,108.3608 L481.2746,108.3608 C478.1736,99.0558 470.2786,93.1338 458.7166,93.1338 C438.9796,93.1338 427.9826,110.8988 427.9826,134.8658 C427.9826,158.5518 438.9796,176.5978 458.7166,176.5978 C470.2786,176.5978 478.1736,170.6768 481.2746,161.0898 L535.9766,161.0898 C530.0566,196.6178 504.3966,224.2518 458.7166,224.2518 C408.2436,224.2518 372.9976,186.7498 372.9976,134.8658 C372.9976,82.9838 408.2436,45.4808 458.7166,45.4808\" id=\"Fill-1\" fill=\"#002DFF\"></path>\n                        <polygon id=\"Fill-3\" fill=\"#002DFF\" points=\"577.428 221.432 632.131 221.432 632.131 48.301 577.428 48.301\"></polygon>\n                        <polygon id=\"Fill-5\" fill=\"#002DFF\" points=\"835.662 221.432 790.828 221.432 727.666 134.866 727.666 221.432 674.937 221.432 674.937 48.301 725.974 48.301 782.933 128.946 782.933 48.301 835.662 48.301\"></polygon>\n                        <polygon id=\"Fill-6\" fill=\"#002DFF\" points=\"953.245 221.432 898.261 221.432 943.376 94.826 875.985 94.826 875.985 48.301 1001.744 48.301 1001.744 83.547\"></polygon>\n                        <polygon id=\"Fill-7\" fill=\"#7F96FF\" points=\"101.4935 274.5824 129.0095 287.8334 137.0185 291.6894 94.8525 106.9704 63.2385 106.9704\"></polygon>\n                        <polygon id=\"Fill-8\" fill=\"#7F96FF\" points=\"30.4481 240.3695 65.9721 257.4765 31.6211 106.9705 0.0001 106.9705\"></polygon>\n                        <polygon id=\"Fill-12\" fill=\"#7F96FF\" points=\"177.9017 193.7904 158.0837 106.9704 126.4687 106.9704 162.0927 263.0524\"></polygon>\n                        <polygon id=\"Fill-9\" fill=\"#002DFF\" points=\"215.3431 270.058 184.5311 284.896 243.4531 26.743 264.7771 53.472\"></polygon>\n                        <polygon id=\"Fill-10\" fill=\"#002DFF\" points=\"276.9955 240.3695 246.1565 255.2205 286.1005 80.2115 307.4435 106.9735\"></polygon>\n                        <polygon id=\"Fill-11\" fill=\"#002DFF\" points=\"85.3094 0.0003 63.9824 26.7423 188.6014 26.7423 182.4974 53.4843 42.6564 53.4843 21.3294 80.2283 176.3934 80.2283 170.2904 106.9703 -0.0006 106.9703 6.1034 133.7123 164.1864 133.7123 129.0094 287.8333 153.7204 299.7323 222.1334 0.0003\"></polygon>\n                    </g>\n                </g>\n            </svg>\n        );\n    }\n}\n\nexport default Cin7Logo;","import React, { Component } from 'react';\nimport Img from 'react-image';\nimport LoadingSpinner from './LoadingSpinner';\nimport OpenBox from '../../Images/Icons/BoxIcons/OpenBox';\nimport Cin7Logo from '../../Images/Cin7Logo';\n\nimport './Styles/_Image.scss';\n\ninterface componentProps {\n    imagePath: string;\n    altText: string;\n    logo?: boolean;\n}\n\nclass Image extends Component<componentProps,{}> {\n\n    render() {\n\n        const { imagePath, altText, logo } = this.props;\n\n        const Placeholder: any = () => {\n            if (logo) {\n                return (\n                    <div className=\"logo-image\">\n                        <Cin7Logo />\n                    </div>\n                );\n            }\n            else {\n                return (\n                    <OpenBox strokeColor={'#D6D7D8'} />\n                );\n            }\n        };\n\n        return(\n            <div className=\"image-container\">\n                <Img src={imagePath} alt={altText} loader={<LoadingSpinner />} unloader={<Placeholder />} />\n            </div>\n        );\n    }    \n}\n\nexport default Image;","import React from \"react\";\nimport Image from \"../../../Components/Global/Image\";\n\ntype Props = {\n    logoImageUrl: string;\n    storeName?: string;\n};\n\nconst StoreHeading = (props: Props) => {\n    if (props.logoImageUrl) {\n        return (\n            <div className=\"company-logo-container\">\n                <Image imagePath={props.logoImageUrl} altText=\"Store Brand Logo\" logo={true} />\n            </div>\n        );\n    } else {\n        return <div className=\"company-logo-container\">{props.storeName}</div>;\n    }\n};\n\nexport default StoreHeading;\n","import React, { Component } from 'react';\n\nclass ClearInputIcon extends Component {\n    render() { \n        const cls1 = {\n            fill: 'none',\n            stroke: '#6d6e74',\n            strokeWidth: '2px'\n        };\n        return ( \n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"15.414\" height=\"15.414\" viewBox=\"0 0 15.414 15.414\">\n                <title>Clear</title>\n                <g id=\"Group_505\" data-name=\"Group 505\" transform=\"translate(-538.793 -427.793)\">\n                    <path id=\"Line_223\" d=\"M0 0l14 14\" style={cls1} data-name=\"Line 223\" transform=\"translate(539.5 428.5)\"/>\n                    <path id=\"Line_224\" d=\"M14 0L0 14\" style={cls1} data-name=\"Line 224\" transform=\"translate(539.5 428.5)\"/>\n                </g>\n            </svg>\n\n         );\n    }\n}\n \nexport default ClearInputIcon;","import React, { Component } from 'react';\nimport { Button, FormGroup, Label, Input } from 'reactstrap';\n\n//Assets\nimport ClearInputIcon from './../../Images/Icons/ClearInputIcon';\n\ninterface componentProps {\n    fieldClass?: string;\n    fieldErrorId?: string;\n    formGroupClass?: string;\n    fieldId: string;\n    fieldIndex?: number;\n    fieldLabel?: string;\n    fieldName?: string;\n    fieldType?: string | any;\n    onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n    onClear: () => void;\n}\n\ninterface componentStates extends Partial<componentProps> {}\n\nclass InputField extends Component<componentProps, componentStates> {\n\n\n    render() { \n        \n        const {fieldErrorId, fieldId, fieldIndex, fieldName, fieldType, fieldClass, fieldLabel, formGroupClass} = this.props;\n\n        return ( \n            <>\n            <FormGroup className={`cin7-form-group ${formGroupClass ? formGroupClass : \"default-group\"}`}>\n                <Input \n                    type={fieldType ? fieldType : \"text\"}\n                    id={fieldId} \n                    name={fieldName} \n                    className={`${fieldClass ? fieldClass : \"default-input\"} cin7-input input-field`} \n                    placeholder={\" \"}\n                    onFocus={this._inputOnFocus} \n                    onBlur={this._inputOnBlur} \n                    onChange={this._onChange} \n                    tabIndex={fieldIndex}\n                />\n                <Label className=\"cin7-float-label\" for={fieldId}>{fieldLabel ? fieldLabel : \"Default Label\"}</Label>\n                <Button className=\"cin7-custom-input-icon clear-icon\" onClick={this._onClear} tabIndex={-1}><ClearInputIcon /></Button>\n            </FormGroup>\n            <span id={fieldErrorId} className=\"validation-message hide\"></span>\n            </>\n         );\n    }\n\n    _inputOnFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n        let targetFormGroup: any | undefined = e.currentTarget.parentNode;\n        targetFormGroup.classList.add(\"active\");\n    }\n\n    _inputOnBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n        let targetFormGroup: any | undefined = e.currentTarget.parentNode;\n\n        if(!e.currentTarget.value) {\n            targetFormGroup.classList.remove(\"active\");\n        }\n    }\n\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.props.onChange(e);\n\n        let targetFormGroup: any | undefined = e.currentTarget.parentNode;\n        let clearInputButton = targetFormGroup.querySelector(\".cin7-custom-input-icon\");\n\n        if(clearInputButton !== null){\n            if(e.currentTarget.value) {\n                clearInputButton.classList.add(\"active\");\n            }\n            else {\n                clearInputButton.classList.remove(\"active\");\n            }\n        }\n    }\n\n    _onClear = (e:React.MouseEvent<any, MouseEvent>) => {\n        e.preventDefault();\n\n        let targetFormGroup = e.currentTarget.parentNode;\n        let targetInput = targetFormGroup.querySelector(\".cin7-input\");\n        \n        targetInput.value = '';\n\n        e.currentTarget.classList.remove(\"active\");\n        targetFormGroup.classList.remove(\"active\");\n\n        this.props.onClear();\n\n        targetInput.focus();\n    }\n\n}\n \nexport default InputField;","import React, { Component } from 'react';\nimport zxcvbn from 'zxcvbn';\n\ninterface componentProps {\n    passwordEntry: string;\n    passwordIncrement: number;\n}\n\ninterface componentStates extends componentProps {}\n\nclass PasswordMeter extends Component<componentProps, componentStates> {\n\n    _renderPasswordLabel = (testedResult: { score: any; }) => {\n        switch(testedResult.score) {\n            case 0:\n            case 1:\n                return \"Weak\";\n            case 2:\n                return \"Fair\";\n            case 3:\n            case 4:\n                return \"Great!\";\n            default:\n                return \"Weak\";\n        }\n    }\n\n    render() { \n        const { passwordEntry, passwordIncrement } = this.props;\n        const testedPassword: {score: any;} = zxcvbn(passwordEntry);\n        \n        //Overwrite Default State to display Indication of Weak password\n        if(testedPassword.score === 0){\n            testedPassword.score = passwordIncrement;\n        }\n\n        return ( \n            <div className={`cin7-password-meter`}>\n                <progress id=\"Pass-Meter\" className={`cin7-password-meter-progress strength-${this._renderPasswordLabel(testedPassword).replace(\"!\",\"\")}`} value={testedPassword.score} max=\"3\" />\n                <div className={`cin7-password-meter-label strength-${this._renderPasswordLabel(testedPassword).replace(\"!\",\"\")}`}>\n                    {passwordEntry && (\n                        <strong>{this._renderPasswordLabel(testedPassword)}</strong>\n                    )}\n                </div>\n            </div>\n         );\n    }\n}\n \nexport default PasswordMeter;","import React, { Component } from 'react';\nclass ShowPasswordIcon extends Component {\n    render() { \n\n        const cls1 = {\n            fill: 'none',\n            stroke: '#373839',\n            strokeLinecap: 'round',\n            strokeLinejoin: 'round'\n        };\n\n        const cls2 = {\n            fill: '#373839',\n            stroke: '#373839',\n            strokeMiterlimit:10\n        };\n\n        return ( \n            <svg aria-labelledby=\"ShowPasswordIcon\" xmlns=\"https://www.w3.org/2000/svg\" width=\"19.676\" height=\"11.111\" viewBox=\"0 0 19.676 11.111\">\n                <title id=\"ShowPasswordIcon\">Show password</title>\n                <g id=\"ShowPassword\" data-name=\"Show Password\" transform=\"translate(-534.875 -783.924)\">\n                    <g id=\"Group_290\" data-name=\"Group 290\" transform=\"translate(540.63 785.264)\">\n                        <path id=\"Path_4962\" d=\"M284.136 352.272a4.082 4.082 0 1 1-7.5 2.23 4.069 4.069 0 0 1 .716-2.31\" style={cls1} data-name=\"Path 4962\" transform=\"translate(-276.636 -352.192)\"/>\n                    </g>\n                    <path id=\"Path_4967\" d=\"M284.8 355.569s-4.181 5.055-9.338 5.055-9.338-5.055-9.338-5.055 4.181-5.056 9.338-5.056 9.338 5.056 9.338 5.056z\" style={cls1} data-name=\"Path 4967\" transform=\"translate(269.247 433.911)\"/>\n                    <g id=\"Group_291\" data-name=\"Group 291\" transform=\"translate(544.046 786.993)\">\n                        <g id=\"Group_287\" data-name=\"Group 287\">\n                            <path id=\"Path_4966\" d=\"M284.746 356.291a.639.639 0 1 1-.639-.64.637.637 0 0 1 .639.64z\" style={cls2} data-name=\"Path 4966\" transform=\"translate(-283.467 -355.651)\"/>\n                        </g>\n                    </g>\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default ShowPasswordIcon;","import React, { Component } from 'react';\nclass HidePasswordIcon extends Component {\n    render() { \n\n        const cls1 = {\n            fill: 'none',\n            stroke: '#373839',\n            strokeLinecap: 'round',\n            strokeLinejoin: 'round'\n        };\n\n        const cls2 = {\n            fill: '#373839',\n            stroke: '#373839',\n            strokeMiterlimit: 10\n        };\n\n        const cls3 = {\n            fill: 'none',\n            stroke: '#373839'\n        }\n\n        return ( \n            <svg aria-labelledby=\"HidePasswordIcon\" xmlns=\"https://www.w3.org/2000/svg\" width=\"20\" height=\"11.923\" viewBox=\"0 0 20 11.923\">\n                <title id=\"HidePasswordIcon\">Hide password</title>\n                <g id=\"Hide Password\" data-name=\"Hide Password\" transform=\"translate(-533.875 -792.077)\">\n                    <g id=\"Group_290\" data-name=\"Group 290\" transform=\"translate(539.792 794.25)\">\n                        <path id=\"Path_4962\" d=\"M284.136 352.272a4.082 4.082 0 1 1-7.5 2.23 4.069 4.069 0 0 1 .716-2.31\" style={cls1} data-name=\"Path 4962\" transform=\"translate(-276.636 -352.192)\"/>\n                    </g>\n                    <path id=\"Path_4967\" d=\"M285.128 355.552s-4.254 5.037-9.5 5.037-9.5-5.037-9.5-5.037 4.254-5.039 9.5-5.039 9.5 5.039 9.5 5.039z\" style={cls1} data-name=\"Path 4967\" transform=\"translate(268.247 442.911)\"/>\n                    <g id=\"Group_291\" data-name=\"Group 291\" transform=\"translate(543.207 795.98)\">\n                        <g id=\"Group_287\" data-name=\"Group 287\">\n                            <path id=\"Path_4966\" d=\"M284.746 356.291a.639.639 0 1 1-.639-.64.637.637 0 0 1 .639.64z\" style={cls2} data-name=\"Path 4966\" transform=\"translate(-283.467 -355.651)\"/>\n                        </g>\n                    </g>\n                    <path id=\"Line_191\" d=\"M0 10.965L17.324 0\" style={cls3} data-name=\"Line 191\" transform=\"translate(535.5 792.5)\"/>\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default HidePasswordIcon;\n\n","import React, { Component } from 'react';\nimport {FormGroup, Input, Label, Button} from 'reactstrap';\nimport PasswordMeter from './PasswordMeter';\n\nimport ShowPasswordIcon from '../../Images/Icons/ShowPasswordIcon.js';\nimport HidePasswordIcon from '../../Images/Icons/HidePasswordIcon.js';\n\ninterface componentProps {\n    fieldClass?: string;\n    fieldErrorId?: string;\n    fieldId: string;\n    fieldIndex?: number;\n    fieldLabel?: string;\n    fieldName: string;\n    formGroupClass?: string;\n    passwordStrength?: boolean;\n    onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\ninterface componentStates {\n    revealPassword: boolean;\n    passwordEntry: string;\n    passwordScoreReset: number;\n}\n\nclass PasswordField extends Component<componentProps,componentStates> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            revealPassword: false,\n            passwordEntry: '',\n            passwordScoreReset: 0\n         }\n    }\n\n    render() { \n\n        const { revealPassword, passwordEntry, passwordScoreReset } = this.state;\n        const {fieldClass, fieldErrorId, fieldId, fieldIndex, fieldLabel, fieldName, formGroupClass, passwordStrength} = this.props;\n\n        return ( \n            <>\n                <FormGroup className={`cin7-form-group ${formGroupClass ? formGroupClass : \"default-group\"}`}>\n                    <Input type={revealPassword ? \"text\" : \"password\" } \n                        onFocus={this._inputOnFocus}\n                        onBlur={this._inputOnBlur}\n                        onChange={this._onChange}\n                        id={fieldId} name={fieldName} \n                        className={`${fieldClass ? fieldClass : \"default-input-password\"} cin7-input password-field`}\n                        placeholder={\" \"}\n                        tabIndex={fieldIndex} \n                    />\n                    <Label className=\"cin7-float-label\" for={fieldId}>{fieldLabel ? fieldLabel : \"Default Label\"}</Label>\n                    <Button className=\"cin7-custom-input-icon eye-icon\" tabIndex={-1} onClick={this._revealPassword}>\n                        {revealPassword ? <HidePasswordIcon /> : <ShowPasswordIcon />}\n                    </Button>\n                </FormGroup>\n                <span id={fieldErrorId} className=\"validation-message hide\"></span>\n                {passwordStrength && <PasswordMeter passwordEntry={passwordEntry} passwordIncrement={passwordScoreReset} />}\n            </>\n         );\n    }\n\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.props.onChange(e);\n        \n        this.setState({\n            passwordEntry: e.target.value,\n            passwordScoreReset: 1\n        });\n\n        if(e.target.value === \"\") {\n            this.setState({\n                passwordScoreReset: 0\n            });\n        }\n    }\n\n    _inputOnFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n        let targetFormGroup: any | undefined = e.currentTarget.parentNode;\n        targetFormGroup.classList.add(\"active\");\n    }\n\n    _inputOnBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n        let targetFormGroup: any | undefined = e.currentTarget.parentNode;\n        if(!e.currentTarget.value) {\n            targetFormGroup.classList.remove(\"active\");\n        }\n    }\n\n    _revealPassword = (e: React.MouseEvent<any, MouseEvent>) => {\n        e.preventDefault();\n        \n        this.setState(prevState => ({\n            revealPassword: !prevState.revealPassword\n        }));\n    }\n}\n \nexport default PasswordField;","import React, { Component } from 'react';\nimport {Button, FormGroup} from 'reactstrap';\n\ninterface componentProps {\n    buttonClass?: string;\n    buttonLabel?: string;\n    buttonType?: \"button\" | \"submit\" | \"reset\";\n    disableButton?: boolean;\n}\n\nclass ButtonField extends Component<componentProps, {}> {\n\n    render() {\n        const {disableButton, buttonLabel, buttonClass, buttonType} = this.props;\n\n        return ( \n            <FormGroup className=\"cin7-form-group\">\n                    <Button type={buttonType ? buttonType : \"button\"} className={`cin7-button ${buttonClass ? buttonClass : \"default\"}`} disabled={disableButton ? disableButton : false}>{buttonLabel}</Button>\n            </FormGroup>\n         );\n    }\n}\n \nexport default ButtonField;","import React, { Component } from 'react';\nimport { Form } from 'reactstrap';\nimport {Link} from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { LoginB2BUser, LogoutClearState, ClearIdentityErrorMessages } from '../../Redux/Actions/AuthActions';\n\nimport InputField from './../FormElements/InputField';\nimport PasswordField from './../FormElements/PasswordField';\nimport ButtonField from './../FormElements/ButtonField';\nimport Cin7ConfirmationBox from '../PageElements/Cin7ConfirmationBox';\nimport { GenerateTextInputValidationParameters, ClearFailValidation } from '../../Utils/B2BHelpers';\n\ninterface componentProps {\n    login: {\n        isAuthenticating: boolean;\n        isFieldValidationActive: boolean;\n        isErrorMessageActive: boolean;\n        isWarningMessageActive: boolean;\n        loginButtonLabel: string;\n        loginErrorMessage: string;\n    };\n    auth: {\n        errorMessage: string;\n    }\n    LoginB2BUser: (credentials: any) => void;\n    ClearIdentityErrorMessages: () => void;\n    LogoutClearState: () => void;\n}\n\ninterface componentStates {\n    emailAddressField: string | undefined;\n    loginPasswordField: string | undefined;\n    logoutMessage: string | undefined;\n}\n\nclass LoginForm extends Component<componentProps, componentStates> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            emailAddressField: \"\",\n            loginPasswordField: \"\",\n            logoutMessage: this.props.auth.errorMessage\n        }\n    }\n\n    componentDidMount() {\n        this.props.ClearIdentityErrorMessages();\n        this.props.LogoutClearState();\n    }\n\n    render(){\n\n        const { login } = this.props;\n\n        return(\n            <>\n            {login.isWarningMessageActive && \n                <Cin7ConfirmationBox \n                    boxType={\"warning-box\"}\n                    boxIcon={\"warning-icon\"}\n                    boxMessage={login.loginErrorMessage}\n                />\n            }\n            {login.isErrorMessageActive && \n                <Cin7ConfirmationBox \n                    boxType={\"error-box\"}\n                    boxIcon={\"error-icon\"}\n                    boxMessage={login.loginErrorMessage}\n                />\n            }\n            {this.state.logoutMessage &&\n                <Cin7ConfirmationBox\n                    boxType={\"info-box\"}\n                    boxIcon={\"info-icon\"}\n                    boxMessage={this.state.logoutMessage}\n                />\n            }\n            <Form className=\"cin7-form\" onSubmit={this._onSubmit}>\n                <InputField \n                    fieldType=\"email\"\n                    fieldLabel=\"Email address\" \n                    fieldId=\"EmailAddress\" \n                    fieldIndex={0}\n                    fieldName=\"emailAddressField\" \n                    fieldErrorId=\"emailValidationError\"\n                    onChange={this._onChange}\n                    onClear={this._onClear}\n                />\n                <PasswordField \n                    fieldLabel=\"Password\" \n                    fieldId=\"LoginPassword\"\n                    fieldIndex={0}\n                    fieldName=\"loginPasswordField\"\n                    fieldErrorId=\"passwordValidationError\"\n                    onChange={this._onChange}\n                />\n                <ButtonField buttonLabel={login.loginButtonLabel} buttonType=\"submit\" disableButton={login.isAuthenticating} />\n            </Form>\n            <Link to={'/login/forgot-password'} className=\"login-pages-link\">\n                Forgot password?\n            </Link>\n            </>\n        );\n    }\n\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        if(this.props.login.isFieldValidationActive) {\n            let emailValidationParameters = GenerateTextInputValidationParameters(\"EmailAddress\", \"emailValidationError\");\n            let passwordvalidationParameters = GenerateTextInputValidationParameters(\"LoginPassword\", \"passwordValidationError\");\n            ClearFailValidation(emailValidationParameters.inputField, emailValidationParameters.validationField, null);\n            ClearFailValidation(passwordvalidationParameters.inputField, passwordvalidationParameters.validationField, null);\n        }\n        \n        this.setState({\n            [e.target.name]: e.target.value\n        } as unknown as Pick<componentStates, keyof componentStates>);\n    }\n\n    _onClear = () => {\n        this.setState({\n            emailAddressField: \"\"\n        })\n    }\n\n    _onSubmit = (e: React.SyntheticEvent) => {\n        e.preventDefault();\n        let credentials = {\n            emailAddress: this.state.emailAddressField,\n            password: this.state.loginPasswordField\n        }\n\n        this.props.LoginB2BUser(credentials);\n        \n    }\n}\n\nconst MapStateToProps = (state: { identityReducer: any; authReducer: any }) => ({\n    login: state.identityReducer,\n    auth: state.authReducer\n});\n\nexport default connect(MapStateToProps, {LoginB2BUser,LogoutClearState, ClearIdentityErrorMessages})(LoginForm);","import React, { Component } from \"react\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { withRouter, Redirect } from \"react-router\";\nimport { connect } from \"react-redux\";\nimport LoginForm from \"./../../../Components/AppForms/LoginForm\";\n\n// Returns true if the str string starts with the word string\nfunction startsWith(str: string, word: string) {\n    return str.lastIndexOf(word, 0) === 0;\n}\n\ninterface componentProps extends RouteComponentProps<any> {\n    signIn: {\n        isAuthorize: boolean;\n    };\n}\n\nclass SignIn extends Component<componentProps, {}> {\n    render() {\n        const { signIn, location } = this.props;\n        const state: any = location.state;\n        if (signIn.isAuthorize) {\n            if (state?.from?.pathname) {\n                if (!startsWith(state.from.pathname, \"/registration\") && !startsWith(state.from.pathname, \"/login\")) {\n                    return (\n                        <Redirect\n                            to={{\n                                pathname: state.from.pathname,\n                                search: state.from.search,\n                                state: { from: location },\n                            }}\n                        />\n                    );\n                }\n            } else {\n                return (\n                    <Redirect\n                        to={{\n                            pathname: \"/\",\n                            state: { from: location },\n                        }}\n                    />\n                );\n            }\n        }\n        return <LoginForm />;\n    }\n}\nconst SignInWithRouter = withRouter(SignIn);\n\nconst MapStateToProps = (state: { authReducer: any }) => ({\n    signIn: state.authReducer,\n});\n\nexport default connect(MapStateToProps, null)(SignInWithRouter);\n","import * as types from '../Types/IdentityTypes';\nimport * as globalTypes from './../Types/GlobalTypes';\nimport * as b2bHelpers from '../../Utils/B2BHelpers';\nimport APIHost  from '../../APIHost';\nimport ApiUtil from '../../Utils/ApiUtil';\nimport { ValidationMessages } from '../../Language/Default_Settings';\nimport axios from 'axios';\nimport { RefreshUserToken } from './../Actions/AuthActions';\nimport { UpdateOrderPaymentMethod } from './OrderActions';\n\nconst config = {\n    headers: {\n        'Content-Type': 'application/json',\n    }\n};\n\nconst host = new APIHost();\nconst apiUtil = new ApiUtil();\n\ninterface loginActionsTypes {\n    emailAddress: string;\n    password?: string;\n}\n\ninterface resetPasswordTypes {\n    userId: string;\n    userToken: string;\n    storeModuleId: number | undefined;\n}\n\ninterface confirmEmailTypes {\n    userId: string;\n    emailToken: string;\n} \n\ninterface registerDetailsTypes extends resetPasswordTypes {}\n\n//Forgot Password Actions\nexport const SendResetPasswordLink = (credentials: loginActionsTypes) => (dispatch: any) => {\n    let resetPasswordLinkData = {\n        Email: credentials.emailAddress\n    }\n\n    let validationParameters = b2bHelpers.GenerateTextInputValidationParameters(\"EmailAddress\", \"emailValidationError\");\n    let isValidEmail = b2bHelpers.ValidateEmailAddress(credentials.emailAddress);\n\n    if(isValidEmail) {\n\n        dispatch({\n            type: types.ForgotPassword_Sending_Link\n        });\n\n        axios.post(host.IdentityAPI(\"ForgotPassword\"), resetPasswordLinkData, config).then(res => {\n\n            dispatch({\n                type: types.ForgotPassword_Send_Reset_Link,\n                payload: {linkSent: res.data.success, emailAddress: credentials.emailAddress}\n            });\n        }).catch((error) => {\n            if (error.message) {\n                dispatch({\n                    type: types.ForgotPassword_Fail_Sending_Link,\n                    payload: {\n                        errorMessage: error.message\n                    }\n                });\n            }\n            else {\n                dispatch({\n                    type: types.ForgotPassword_Fail_Sending_Link,\n                    payload: {\n                        errorMessage: \"Something went wrong.\"\n                    }\n                });\n            }\n        });\n    }\n    else {\n        b2bHelpers.DisplayFailValidation(validationParameters.inputField, validationParameters.validationField, null, ValidationMessages.invalid_EmailAddress);\n        dispatch({\n            type: types.ForgotPassword_Email_Address_Not_Valid,\n            payload: {\n                errorMessage: \"Invalid email address.\"\n            }\n        });\n    }    \n}\n\n//Clear Forgot Password State\nexport const ForgotPasswordClearState = () => (dispatch: any) => {\n    dispatch({\n        type: types.ForgotPassword_Clear_State\n    });\n}\n\n//Reset Password Actions\nexport const ResetUserPassword = (newPassword: string, passwordScore: number) => (dispatch: any) => {\n\n    let isPasswordAnEmail = b2bHelpers.ValidateEmailAddress(newPassword);\n    let validationParameters = b2bHelpers.GeneratePasswordValidationParameters(\"NewPassword\",\"Reset-Password-Validation\", \"cin7-password-meter\");\n    let isStrongPassword = b2bHelpers.ValidateStrongPassword(newPassword, passwordScore);\n\n    if (isStrongPassword && newPassword && !isPasswordAnEmail) {\n\n        let credentials = b2bHelpers.GetUrlParameters([\"userId\", \"userToken\", \"storeModuleId\"]);\n\n        let resetPasswordData = {\n            UserId: credentials.userId,\n            Code: credentials.userToken,\n            Password: newPassword,\n            ModuleId: credentials.storeModuleId\n        }\n\n        dispatch({\n            type: types.ResetPassword_Updating_Password\n        });\n\n        axios.post(host.IdentityAPI(\"ResetPassword\"), resetPasswordData, config).then(res => {\n            let data = res.data;\n            if (data.success) {\n\n                dispatch({\n                    type: types.ResetPassword_Password_Updated,\n                    payload: { storeDomain: data.storeDomain, isResetPasswordCompleted: data.success, emailAddress: data.emailAddress }\n                });\n            } else {\n                let displayReturnToLogin = false;\n                let errorDescription = data.errors[0].description;\n                let errorCode = data.errors[0].code;\n\n                if (errorCode === \"InvalidToken\") {\n                    displayReturnToLogin = true;\n                }\n\n                dispatch({\n                    type: types.ResetPassword_Update_Password_Failed,\n                    payload: {\n                        message: errorDescription,\n                        displayReturnToLogin: displayReturnToLogin\n                    }\n                });\n            }\n        }).catch((error) => {\n            let errorDescription = error.response?.data.errors[0].description;\n            dispatch({\n                type: types.ResetPassword_Update_Password_Failed,\n                payload: {\n                    message: errorDescription\n                }\n            });\n        });\n    }\n    else if (isPasswordAnEmail === true) {\n        b2bHelpers.DisplayFailValidation(validationParameters.inputField, validationParameters.validationField, validationParameters.passwordMeterContainer, ValidationMessages.error_emailAsPassword);\n        dispatch({\n            type: types.ResetPassword_Password_Validation_Failed\n        });\n    } else {\n        b2bHelpers.DisplayFailValidation(validationParameters.inputField, validationParameters.validationField, validationParameters.passwordMeterContainer, ValidationMessages.error_PasswordValidation);\n        dispatch({\n            type: types.ResetPassword_Password_Validation_Failed\n        });\n    }\n\n}\n\n//Clear Reset Password State\nexport const ResetPasswordClearState = () => (dispatch: any) => {\n    dispatch({\n        type: types.ResetPassword_Clear_State\n    });\n}\n\n//Confirm Email Actions\nexport const ConfirmUserEmail = (credentials: confirmEmailTypes) => (dispatch: any) => {\n\n    if(credentials.userId) {\n\n        let confirmEmailData = {\n            UserId: credentials.userId,\n            EmailToken: credentials.emailToken\n        }\n\n        axios.post(host.IdentityAPI(\"ConfirmEmail\"), confirmEmailData, config).then(res => {\n            let data = res.data;\n            dispatch({\n                type: types.Registration_Confirm_User_Email,\n                payload: {emailConfirmed: data.emailConfirmed}\n            });\n        });\n    }\n\n    else {\n        dispatch({\n            type: types.Registration_Confirm_User_Email_Failed,\n            payload: {emailConfirmed: false}\n        });\n    }\n}\n\n//Registration Actions\nexport const GetRegisteredUserDetails = (credentials: registerDetailsTypes) => (dispatch: any) => {\n\n    if (credentials.userId) {\n\n        dispatch({type: types.Registration_Getting_User_Details});\n\n        let getUserEmail = {\n            UserId: credentials.userId,\n            ModuleId: credentials.storeModuleId\n        }\n\n        axios.post(host.IdentityAPI(\"GetRegisterDetails\"), getUserEmail, config).then(res => {\n            let data = res.data;\n\n            dispatch({\n                type: types.Registration_Get_Registered_User_Details,\n                payload: {\n                    emailAddress: data.emailAddress,\n                    storeName: data.storeName,\n                    userId: credentials.userId,\n                    userToken: credentials.userToken,\n                    storeModuleId: credentials.storeModuleId\n                }\n            });\n        }).catch(() => {\n            dispatch({\n                type: types.Registration_Getting_User_Details_Failed\n            });\n        });\n    }\n    else {\n        dispatch({\n            type: globalTypes.Redirect_To_Login_Page,\n            payload: {\n                shouldRedirect: true\n            }\n        });\n    }\n}\n\nexport const CreatePassword = (emailAddress: string, newPassword: string, passwordScore: number) => (dispatch: any) => {\n    let isPasswordAnEmail = b2bHelpers.ValidateEmailAddress(newPassword);\n    let validationParameters = b2bHelpers.GeneratePasswordValidationParameters(\"NewPassword\", \"Reset-Password-Validation\", \"cin7-password-meter\");\n    let isStrongPassword = b2bHelpers.ValidateStrongPassword(newPassword, passwordScore);\n\n\n    if (isStrongPassword && newPassword && !isPasswordAnEmail) {\n\n        let createPasswordData = {\n            Email: emailAddress,\n            Password: newPassword\n        }\n\n        dispatch({\n            type: types.Registration_Updating_Password\n        });\n\n        axios.post(host.IdentityAPI(\"CreatePassword\"), createPasswordData, config).then(res => {\n            let data = res.data;\n            if (data.success) {\n                dispatch({\n                    type: types.Registration_Password_Updated,\n                    payload: { isCreatePasswordCompleted: data.success }\n                });\n            } else {\n                let displayReturnToLogin = false;\n                let errorDescription = data.errors[0].description;\n                let errorCode = data.errors[0].code;\n\n                if (errorCode === \"UserAlreadyHasPassword\") {\n                    displayReturnToLogin = true;\n                    errorDescription = \"Sorry, that link has expired.\";\n                }\n\n                dispatch({\n                    type: types.Registration_Update_Password_Failed,\n                    payload: {\n                        message: errorDescription,\n                        displayReturnToLogin: displayReturnToLogin\n                    }\n                });\n            }\n\n        }).catch((error) => {\n            let errorDescription = error.response.data.errors[0].description;\n\n            dispatch({\n                type: types.Registration_Update_Password_Failed,\n                payload: {\n                    message: errorDescription\n                }\n            });\n        });\n    }\n    else if (isPasswordAnEmail) {\n        b2bHelpers.DisplayFailValidation(validationParameters.inputField, validationParameters.validationField, validationParameters.passwordMeterContainer, ValidationMessages.error_emailAsPassword);\n        dispatch({\n            type: types.Registration_Password_Validation_Failed\n        });\n    } else {\n        b2bHelpers.DisplayFailValidation(validationParameters.inputField, validationParameters.validationField, validationParameters.passwordMeterContainer, ValidationMessages.error_PasswordValidation);\n        dispatch({\n            type: types.Registration_Password_Validation_Failed\n        });\n    }\n}\n\nexport const GetUserDetails = (token: string) => (dispatch: any) => {\n\n    var headers = apiUtil.DefaultHeaders(token);\n\n    if (headers === null) {\n        return;\n    }\n\n    let postBody = {\n        moduleId: apiUtil.GetModuleId()\n    };\n\n    axios.post(host.IdentityAPI(\"GetUserDetails\"), postBody, headers).then(res => {\n        let userInfo = res.data.userInfo;\n        let branchInfo = res.data.branchInfo;\n        let moduleSettings = res.data.moduleSettings;\n\n        dispatch({\n            type: types.Login_Get_User_Details,\n            payload: {\n                userInfo: userInfo,\n                branchInfo: branchInfo,\n                moduleSettings: moduleSettings,\n                tenantName: res.data.tenantName\n            }\n        });\n\n        dispatch(UpdateOrderPaymentMethod(undefined));\n    }).catch((error) => {\n        if (error.response) {\n            let errorStatus = error.response.status;\n\n            switch (errorStatus) {\n                case 401:\n                    dispatch(RefreshUserToken());\n                    break;\n                default:\n                    dispatch({\n                        type: globalTypes.Redirect_To_Login_Page,\n                        payload: {\n                            message: error.message\n                        }\n                    });\n                    break;\n            }\n        } else {\n            dispatch({\n                type: globalTypes.Redirect_To_Login_Page,\n                payload: {\n                    message: error.message\n                }\n            });\n        }\n    });\n}\n\nexport const RegistrationClearState = () => (dispatch: any) => {\n    dispatch({\n        type: types.Registration_Clear_State\n    });\n}\n\nexport const GetUserStatus = (credentials: registerDetailsTypes) => (dispatch: any) => {\n\n    if (credentials.userId) {\n\n        const params = {\n            userId: credentials.userId,\n            moduleId: credentials.storeModuleId\n        };\n\n        axios.get(host.IdentityAPI(\"GetUserStatus\"), { params }).then(res => {\n            const data = res.data;\n\n            dispatch({\n                type: types.Registration_Get_User_Status,\n                payload: {\n                    userStatus: data\n                }\n            });\n        }).catch(() => {\n            dispatch({\n                type: types.Registration_Get_User_Status_Failed\n            });\n        });\n    }\n    else {\n        dispatch({\n            type: types.Registration_Get_User_Status_Failed\n        });\n    }\n}","import React, { Component } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Form } from 'reactstrap';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { SendResetPasswordLink } from './../../Redux/Actions/IdentityActions';\n\n//Custom Assets\nimport InputField from './../FormElements/InputField';\nimport ButtonField from './../FormElements/ButtonField';\nimport Cin7ConfirmationBox from '../PageElements/Cin7ConfirmationBox';\nimport { GenerateTextInputValidationParameters, ClearFailValidation } from '../../Utils/B2BHelpers';\nimport { ForgotPasswordContent } from '../../Language/Default_Settings';\n\n\ninterface componentProps {\n    forgotPassword: {\n        forgotPasswordButtonLabel: string,\n        isForgotPasswordValidationActive: boolean,\n        isSendingPasswordLink: boolean,\n        forgotPasswordErrorMessage: string\n    }\n    SendResetPasswordLink: (params:any) => void;\n}\n\ninterface componentStates {\n    emailAddress: string;\n}\n\nclass ForgotPasswordForm extends Component<componentProps, componentStates> {\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            emailAddress: ''\n        }\n    }\n\n    render(){\n        \n        const { forgotPassword } = this.props;\n\n        return(\n            <>\n            {forgotPassword.forgotPasswordErrorMessage && \n                <Cin7ConfirmationBox \n                    boxType={\"error-box\"}\n                    boxIcon={\"error-icon\"}\n                    boxMessage={forgotPassword.forgotPasswordErrorMessage}\n                />\n            }\n            <Form className=\"cin7-form\" onSubmit={this._onSubmit}>\n                <InputField \n                    fieldType=\"email\"\n                    fieldLabel=\"Email address\" \n                    fieldId=\"EmailAddress\" \n                    fieldName=\"emailAddress\"\n                    fieldErrorId=\"emailValidationError\" \n                    onChange={this._onChange}\n                    onClear={this._onClear}\n                />\n                <ButtonField buttonLabel={forgotPassword.forgotPasswordButtonLabel} buttonType=\"submit\" disableButton={forgotPassword.isSendingPasswordLink} />\n            </Form>\n            <Link to={'/login'} className=\"login-pages-link\">\n                {ForgotPasswordContent.return_linkLabel}\n            </Link>\n            </>\n        );\n    }\n\n    //Functions\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        let validationParameters = GenerateTextInputValidationParameters(\"EmailAddress\",\"emailValidationError\");\n        if(this.props.forgotPassword.isForgotPasswordValidationActive) {\n            ClearFailValidation(validationParameters.inputField, validationParameters.validationField, null);\n        }\n\n        this.setState({\n            [e.target.name]: e.target.value\n        } as unknown as Pick<componentStates, keyof componentStates>);\n    }\n\n    _onClear = () => {\n        this.setState({\n            emailAddress: ''\n        });\n    }\n    \n    _onSubmit = (e: React.SyntheticEvent) => {\n        e.preventDefault();\n        let credentials = {\n            emailAddress: this.state.emailAddress\n        }\n        this.props.SendResetPasswordLink(credentials);\n    }\n    \n}\n\n\nconst MapStateToProps = (state: {identityReducer: any} ) => ({\n    forgotPassword: state.identityReducer\n})\n\nexport default connect(MapStateToProps, {SendResetPasswordLink})(ForgotPasswordForm);","import React, { Component } from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { withRouter, Redirect } from 'react-router';\nimport { connect } from 'react-redux';\nimport { ForgotPasswordClearState } from '../../../Redux/Actions/IdentityActions';\nimport ForgotPasswordForm from './../../../Components/AppForms/ForgotPasswordForm';\n\ninterface componentProps extends RouteComponentProps<any> {\n    forgotPassword: {\n        isForgotPasswordLinkSent: boolean\n    }\n    ForgotPasswordClearState: () => void;\n}\n\nclass ForgotPassword extends Component<componentProps, {}> {\n\n    componentDidMount() {\n        this.props.ForgotPasswordClearState();\n    }\n\n    render(){\n\n        const { forgotPassword, location } = this.props;\n\n        if (forgotPassword.isForgotPasswordLinkSent) {\n            this.props.ForgotPasswordClearState();\n            return (\n                <Redirect to={\n                    {\n                        pathname: location.pathname + '/confirmation',\n                        state: {from: location}\n                    }\n                } />\n            )\n        }\n\n        return(\n            <ForgotPasswordForm />\n        );\n    }\n}\n\nconst ForgotPasswordWithRouter = withRouter(ForgotPassword);\n\nconst MapStateToProps = (state: {identityReducer: any}) => ({\n    forgotPassword: state.identityReducer\n});\n\nexport default connect(MapStateToProps, {ForgotPasswordClearState})(ForgotPasswordWithRouter);","import React, { Component } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Form } from 'reactstrap';\nimport PasswordField from '../FormElements/PasswordField';\nimport ButtonField from '../FormElements/ButtonField';\nimport { GeneratePasswordValidationParameters, ClearFailValidation } from '../../Utils/B2BHelpers';\nimport { connect } from 'react-redux';\nimport {ResetUserPassword} from './../../Redux/Actions/IdentityActions';\nimport Cin7ConfirmationBox from '../PageElements/Cin7ConfirmationBox';\n\n\ninterface componentProps {\n    resetPassword: {\n        isResetPasswordValidationActive: boolean;\n        isUpdatingPassword: boolean;\n        resetPasswordButtonLabel: string;\n        errorMessage: string;\n    };\n    displayReturnToLogin: boolean;\n    ResetUserPassword: (newPassword: string, passwordScore: number) => void;\n}\n\ninterface componentStates {\n    newPasswordField: string;\n}\n\nclass ResetPasswordForm extends Component<componentProps, componentStates> {\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            newPasswordField: ''\n        }\n    }\n\n    \n    //Functions\n    _onSubmit = (e: React.SyntheticEvent) => {\n        e.preventDefault();\n        let passwordMeterField = document.getElementById(\"Pass-Meter\") as HTMLProgressElement;\n        let passwordScore = 0;\n\n        if(passwordMeterField) {\n            passwordScore = passwordMeterField.value;\n        }\n        this.props.ResetUserPassword(this.state.newPasswordField, passwordScore);  \n    }\n\n\n    render(){\n\n        const { resetPassword, displayReturnToLogin } = this.props;\n\n        const ReturnToLoginLink: any = () => {\n            return (\n                <Link to={'/login'} className=\"login-pages-link\">Continue to Login</Link>\n            );\n        }\n\n        return (\n            <>\n            {resetPassword.errorMessage && \n                <Cin7ConfirmationBox \n                    boxType={\"error-box\"}\n                    boxIcon={\"error-icon\"}\n                    boxMessage={resetPassword.errorMessage}\n                />\n            }\n            {displayReturnToLogin ? <ReturnToLoginLink /> :\n                <Form className=\"cin7-form\" onSubmit={this._onSubmit}>\n                    <PasswordField\n                        fieldLabel=\"New password\"\n                        fieldId=\"NewPassword\"\n                        fieldName=\"newPasswordField\"\n                        passwordStrength={true}\n                        formGroupClass=\"register-meter-margin\"\n                        fieldErrorId=\"Reset-Password-Validation\"\n                        onChange={this._onChange}\n                    />\n                    <ButtonField buttonLabel={resetPassword.resetPasswordButtonLabel} buttonType=\"submit\" disableButton={resetPassword.isUpdatingPassword} />\n                </Form>\n            }\n            </>\n        );\n    }\n\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        let validationParameters = GeneratePasswordValidationParameters(\"NewPassword\",\"Reset-Password-Validation\", \"cin7-password-meter\");\n\n        if(this.props.resetPassword.isResetPasswordValidationActive) {\n            ClearFailValidation(validationParameters.inputField, \n                validationParameters.validationField, \n                validationParameters.passwordMeterContainer);\n        }\n\n        this.setState({\n            [e.target.name]: e.target.value\n        }as unknown as Pick<componentStates, keyof componentStates>);\n    }\n}\n\nconst MapStateToProps = (state: {identityReducer: any;} ) => ({\n    resetPassword: state.identityReducer\n});\n\n\nexport default connect(MapStateToProps, {ResetUserPassword})(ResetPasswordForm);","import React, { Component } from 'react';\nimport ResetPasswordForm from '../../../Components/AppForms/ResetPasswordForm';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { withRouter, Redirect } from 'react-router';\nimport { connect } from 'react-redux';\nimport { ResetPasswordClearState } from '../../../Redux/Actions/IdentityActions';\n\ninterface componentProps extends RouteComponentProps<any> {\n    resetPassword: {\n        isResetPasswordCompleted: boolean;\n        displayReturnToLogin: boolean;\n    }\n    ResetPasswordClearState: () => void;\n}\n\nclass ResetPassword extends Component<componentProps, {}> {\n\n    componentWillMount() {\n        this.props.ResetPasswordClearState();\n    }\n\n    render(){\n\n        const {resetPassword, location} = this.props;\n\n        if (resetPassword.isResetPasswordCompleted) {\n            this.props.ResetPasswordClearState();\n            return(\n                <Redirect to={\n                    {\n                        pathname: location.pathname + 'confirmation',\n                        state: {from: location}\n                    }\n                } />\n            )\n        }\n\n        return(\n            <ResetPasswordForm displayReturnToLogin={resetPassword.displayReturnToLogin} />\n        );\n    }\n}\n\nconst ResetPasswordWithRouter = withRouter(ResetPassword);\n\nconst MapStateToProps = (state: {identityReducer: any}) => ({\n    resetPassword: state.identityReducer\n});\n\nexport default connect(MapStateToProps, {ResetPasswordClearState})(ResetPasswordWithRouter);","import React, { Component } from 'react';\nimport { NavLink } from 'reactstrap';\n\n//Redux\nimport {connect} from 'react-redux';\n\ninterface componentProps {\n    resetPassword: {\n        emailAddress: string;\n    }\n}\n\ninterface componentStates {}\n\nclass ResetPasswordConfirmation extends Component<componentProps, componentStates> {\n    render() { \n        const { resetPassword } = this.props;\n\n        return ( \n            <>\n            <div className=\"side-image-theme-text-content\">\n                The password for <span className=\"emphasis\">{resetPassword.emailAddress}</span> has been updated.\n            </div>\n            <NavLink href={`/login`}\n                className=\"login-pages-link\">\n                Return to login\n            </NavLink>\n            </>\n         );\n    }\n}\n\nconst MapStateToProps = (state: {identityReducer: any}) => ({\n    resetPassword: state.identityReducer\n});\n\nexport default connect(MapStateToProps)(ResetPasswordConfirmation);","import React, { Component } from 'react';\nimport { Link, Redirect } from 'react-router-dom';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { ForgotPasswordConfirmationContent } from '../../../Language/Default_Settings';\n\ninterface componentProps {\n    forgotPassword: {\n        emailAddress: string;\n    }\n}\n\nclass ForgotPasswordConfirmation extends Component<componentProps, {}> {\n    render() { \n        const { forgotPassword } = this.props;\n\n        if (forgotPassword.emailAddress) {\n            return (\n                <>\n                    <div className=\"side-image-theme-text-content\">\n                        {ForgotPasswordConfirmationContent.default_message} <span className=\"emphasis email-container email-display\">{forgotPassword.emailAddress}</span>\n                    </div>\n                    <Link to={'/login'} className=\"login-pages-link\">\n                        {ForgotPasswordConfirmationContent.default_buttonLabel}\n                    </Link>\n                </>\n            );\n        }\n        else {\n            return (\n                <Redirect to={\n                    {\n                        pathname: '/login/forgot-password'\n                    }\n                } />\n            );\n        }\n    }\n}\n\nconst MapStateToProps = (state: {identityReducer: any}) => ({\n    forgotPassword: state.identityReducer\n});\n\nexport default connect(MapStateToProps)(ForgotPasswordConfirmation);","import React, { Component, SyntheticEvent } from \"react\";\nimport Cin7FormHeading from \"./../../../Components/PageElements/Cin7FormHeading\";\nimport SidePageBanner from \"../../../Components/PageElements/Login/SidePageBanner\";\nimport ErrorCrossIcon from \"./../../../Images/Icons/ErrorCrossIcon\";\n\ninterface componentProps {\n    message?: string;\n    hideBanner?: boolean;\n    tryAgainAction?: (e: SyntheticEvent) => void;\n}\n\nclass FailedView extends Component<componentProps, {}> {\n    componentDidMount() {\n        document.title = \"Cin7 B2B - Oops!\";\n    }\n\n    render() {\n        const { message, hideBanner, tryAgainAction } = this.props;\n\n        const FailedViewNotice: any = () => {\n            return (\n                <div className=\"side-image-theme-content\">\n                    <div className=\"side-image-theme-header\">\n                        <Cin7FormHeading\n                            pageTitle={\"Oh no!\"}\n                            pageTitleClass={\"failed-message\"}\n                            pageSubtitle={message ? message : \"Something went wrong.\"}\n                            pageSubtitleClass={\"failed-subtitle\"}\n                        />\n                    </div>\n                    <div className=\"side-image-theme-body\">\n                        <div className=\"side-image-theme-body-icon\">\n                            <ErrorCrossIcon />\n                        </div>\n                    </div>\n                    <div className=\"side-image-theme-footer no-logo\">\n                        {tryAgainAction && (\n                            <div className=\"cin7-form\">\n                                <div className=\"cin7-form-group form-group\">\n                                    <button\n                                        type=\"submit\"\n                                        className=\"cin7-button default btn btn-secondary\"\n                                        onClick={(ev) => this._runAction(tryAgainAction, ev)}\n                                    >\n                                        Try Again\n                                    </button>\n                                </div>\n                            </div>\n                        )}\n                    </div>\n                </div>\n            );\n        };\n\n        if (hideBanner) {\n            return <FailedViewNotice />;\n        } else {\n            return (\n                <div id=\"Side-Image-Theme\">\n                    <div className=\"side-image-theme-container\">\n                        <SidePageBanner />\n                        <FailedViewNotice />\n                    </div>\n                </div>\n            );\n        }\n    }\n\n    _runAction = (action: any, e: SyntheticEvent) => {\n        e.preventDefault();\n        action(e);\n    };\n}\n\nexport default FailedView;\n","import React, { Component } from 'react';\nimport { NavLink } from 'reactstrap';\n\nimport './Styles/_SidePageBannerFooter.scss';\n\nclass SidePageBannerFooter extends Component {\n    \n    render() {\n\n        return ( \n            <div className=\"side-image-theme-footer text-logo\">\n                <div className=\"side-image-theme-footer-logo\">\n                    <span className=\"cin7-text-logo\"><NavLink href=\"https://www.cin7.com/legal/terms-of-use/\" target=\"_blank\" rel=\"noopener noreferrer\">Powered by Cin7</NavLink></span>\n                </div>\n            </div>\n         );\n    }\n}\n \nexport default SidePageBannerFooter;","import React, { SyntheticEvent } from \"react\";\nimport \"./Styles/ContactUsFooter.scss\";\nimport { useHistory } from \"react-router\";\nimport { useDispatch } from \"react-redux\";\nimport { ResetContactUsForm } from \"../../../Redux/Actions/BrandingActions\";\n\nexport const ContactUsFooter = () => {\n  const history = useHistory();\n  const dispatch = useDispatch();\n\n  const handleContactUsClick = (e: SyntheticEvent) => {\n    dispatch(ResetContactUsForm());\n    history.push(\"/contact-us\");\n  };\n\n  return (\n    <div className=\"contact-us-footer\">\n      <div className=\"contact-us-horizontal-line\">&nbsp;</div>\n      <div className=\"contact-us-text\">Don't have an account?</div>\n      <button\n        className=\"default-button outline fullWidth\"\n        onClick={(e) => handleContactUsClick(e)}\n      >\n        Contact Us\n      </button>\n    </div>\n  );\n};\n","import React, { Component } from \"react\";\nimport { Route, Switch, Redirect, RouteComponentProps } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\n\nimport Cin7FormHeading from \"../../Components/PageElements/Cin7FormHeading\";\nimport SidePageBanner from \"../../Components/PageElements/Login/SidePageBanner\";\nimport Cin7ConfirmationBox from \"../../Components/PageElements/Cin7ConfirmationBox\";\nimport { GetTenantImageUrl } from \"../../Utils/LoginHelper\";\nimport { GetStoreInformation } from \"../../Redux/Actions/BrandingActions\";\nimport Loading from \"../../Components/Global/Loading\";\nimport { B2BPageTitles } from \"../../Language/Default_Settings\";\nimport StoreHeading from \"./Views/StoreHeading\";\n\n//Pages\nimport SignIn from \"./Views/SignIn\";\nimport ForgotPassword from \"./Views/ForgotPassword\";\nimport ResetPassword from \"./Views/ResetPassword\";\nimport ResetPasswordConfirmation from \"../Notifications/Success/ResetPasswordConfirmation\";\nimport ForgotPasswordConfirmation from \"../Notifications/Success/ForgotPasswordConfirmation\";\nimport FailedView from \"../Notifications/Errors/FailedView\";\nimport SidePageBannerFooter from \"../../Components/PageElements/Login/SidePageBannerFooter\";\nimport { ContactUsFooter } from \"../../Components/PageElements/Login/ContactUsFooter\";\n\ninterface componentProps extends RouteComponentProps<any> {\n    login: {\n        brandFound: boolean;\n        storeName: string;\n        loginPageImageUrl: string;\n        loginBannerImageUrl: string;\n        isGettingBrandInfo: boolean;\n        contactFormEnabled: boolean;\n    };\n    pagePath?: string;\n    pageView?: string;\n    GetStoreInformation: (brandFound: boolean) => void;\n}\n\ninterface componentStates {\n    pagePath: string;\n    parentPath: string;\n}\n\nclass Login extends Component<componentProps, componentStates> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            pagePath: props.location.pathname,\n            parentPath: props.match.path,\n        };\n    }\n\n    componentDidMount() {\n        let pathName = this.props.location.pathname;\n        this._renderPageTitles(pathName);\n\n        //Get Store Logo, Banner, Module ID, and Store Name from store info API\n        this.props.GetStoreInformation(this.props.login.brandFound);\n    }\n\n    static getDerivedStateFromProps(props: componentProps, state: componentStates) {\n        if (props.pagePath !== state.pagePath) {\n            return {\n                pagePath: props.location.pathname,\n            };\n        }\n\n        return null;\n    }\n\n    componentDidUpdate() {\n        this._renderPageTitles(this.state.pagePath);\n    }\n\n    _renderPageTitles = (pathName: string) => {\n        let parentPath = this.state.parentPath;\n\n        let storeName = this.props.login.storeName ? this.props.login.storeName : B2BPageTitles.root_title;\n\n        switch (pathName) {\n            case `${parentPath}/reset-password`:\n            case `${parentPath}/reset-password/`:\n                document.title = `${storeName} - Reset Password`;\n                break;\n            case `${parentPath}/forgot-password`:\n                document.title = `${storeName} - Forgot Password`;\n                break;\n            case `${parentPath}/reset-confirmation`:\n                document.title = `${storeName} - Confirmation`;\n                break;\n            default:\n                document.title = `${storeName} - Login`;\n                break;\n        }\n    };\n\n    _resetBranding = () => {\n        this.props.GetStoreInformation(this.props.login.brandFound);\n    };\n\n    render() {\n        const { pagePath, parentPath } = this.state;\n        const { login } = this.props;\n\n        if (login.isGettingBrandInfo) {\n            return <Loading />;\n        }\n\n        if (!login.brandFound) {\n            return <FailedView message={\"Store not found.\"} tryAgainAction={this._resetBranding} />;\n        }\n\n        let logoImageUrl = GetTenantImageUrl(login.loginPageImageUrl);\n\n        const Cin7B2BHeading: any = (props: componentProps) => {\n            switch (props.pageView) {\n                case `${parentPath}`:\n                case `${parentPath}/`:\n                    return null;\n                case `${parentPath}/forgot-password`:\n                    return (\n                        <Cin7FormHeading\n                            pageTitle={\"Forgot your password\"}\n                            pageSubtitle={\"Enter your email address and we’ll send you a link to reset your password.\"}\n                            pageSubtitleClass={\"light\"}\n                        />\n                    );\n                case `${parentPath}/forgot-password/confirmation`:\n                    return (\n                        <Cin7ConfirmationBox\n                            boxIcon={\"email-icon\"}\n                            boxMessage={\"We’ve sent an email with password reset instructions.\"}\n                        />\n                    );\n                case `${parentPath}/reset-password`:\n                case `${parentPath}/reset-password/`:\n                    return <Cin7FormHeading pageTitle={\"Reset Password\"} enableIcon={true} iconType={\"LockIcon\"} />;\n                case `${parentPath}/reset-password/confirmation`:\n                    return (\n                        <Cin7ConfirmationBox\n                            boxIcon={\"tick-icon\"}\n                            boxType={\"success-box\"}\n                            boxMessage={\"Success!\"}\n                            boxSubMessage={\"Your password has been updated.\"}\n                        />\n                    );\n                default: {\n                    return (\n                        <Cin7FormHeading\n                            pageTitle={\"Cin7 B2B\"}\n                            pageSubtitle={\"Unable to find matching page.\"}\n                            pageSubtitleClass={\"light\"}\n                        />\n                    );\n                }\n            }\n        };\n\n        return (\n            <div id=\"Side-Image-Theme\">\n                <div className=\"side-image-theme-container customer-page\">\n                    <SidePageBanner customerBanner={login.loginBannerImageUrl} />\n                    <div className=\"side-image-theme-content\">\n                        <div className=\"side-image-theme-header\">\n                            <StoreHeading logoImageUrl={logoImageUrl} storeName={login.storeName} />\n                            <Cin7B2BHeading pageView={pagePath} />\n                        </div>\n                        <div className=\"side-image-theme-body\">\n                            <Switch>\n                                <Route exact path={\"/login\"} component={SignIn} />\n                                <Route exact path=\"/login/forgot-password\" component={ForgotPassword} />\n                                <Route\n                                    exact\n                                    path=\"/login/forgot-password/confirmation\"\n                                    component={ForgotPasswordConfirmation}\n                                />\n                                <Route exact path=\"/login/reset-password\" component={ResetPassword} />\n                                <Route\n                                    exact\n                                    path={\"/login/reset-password/confirmation\"}\n                                    component={ResetPasswordConfirmation}\n                                />                            \n                                <Redirect to={\"/page-not-found\"} />\n                            </Switch>\n                            {login.contactFormEnabled && <ContactUsFooter />}\n                        </div>                        \n                        <SidePageBannerFooter />\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nconst MapStateToProps = (state: { brandingReducer: any }) => ({\n    login: state.brandingReducer,\n});\n\nexport default connect(MapStateToProps, { GetStoreInformation })(Login);\n","import React, { Component } from 'react';\nimport { NavLink } from 'reactstrap';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { RegistrationClearState } from '../../../Redux/Actions/IdentityActions';\n\ninterface componentProps {\n    registration: {\n        emailAddress: string;\n    }\n    RegistrationClearState: () => void;\n}\n\ninterface componentStates { }\n\nclass CreatePasswordConfirmation extends Component<componentProps, componentStates> {\n\n    componentDidMount() {\n        this.props.RegistrationClearState();\n    }\n\n    render() {\n        const { registration } = this.props;\n\n        return (\n            <>\n                <div className=\"side-image-theme-text-content\">\n                    The password for <span className=\"emphasis email-display\">{registration.emailAddress}</span> has been created.\n                </div>\n                <NavLink href={`/login`}\n                    className=\"login-pages-link\">\n                    Proceed to login\n                </NavLink>\n            </>\n        );\n    }\n}\n\nconst MapStateToProps = (state: { identityReducer: any }) => ({\n    registration: state.identityReducer\n});\n\nexport default connect(MapStateToProps, { RegistrationClearState })(CreatePasswordConfirmation);","import React, { Component } from 'react';\nimport { Form, NavLink } from 'reactstrap';\nimport { Link } from 'react-router-dom';\n\n//Assets\nimport { GeneratePasswordValidationParameters, ClearFailValidation } from '../../Utils/B2BHelpers';\nimport { RegistrationPageContent } from '../../Language/Default_Settings';\nimport PasswordField from './../FormElements/PasswordField';\nimport ButtonField from './../FormElements/ButtonField';\nimport Cin7ConfirmationBox from '../PageElements/Cin7ConfirmationBox';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { CreatePassword } from './../../Redux/Actions/IdentityActions';\nimport {ClearIdentityErrorMessages} from './../../Redux/Actions/AuthActions';\n\ninterface componentProps {\n    registration: {\n        emailAddress: string;\n        isUpdatingPassword: boolean;\n        isFieldValidationActive: boolean;\n        isRegistrationValidationActive: boolean;\n        isWarningValidationActive: boolean;\n        createAccountButtonLabel: string;\n        registrationErrorMessage: string;\n        isCreatePasswordCompleted: boolean;\n        storeDomain?: string;\n    };\n    displayReturnToLogin?: boolean;\n    CreatePassword: (emailAddress: string, newPassword: string, passwordScore: number) => void;\n    ClearIdentityErrorMessages: () => void;\n}\n\ninterface componentStates {\n    newPasswordField: string;\n}\n\ninterface componentStates extends Partial<componentProps> {\n    passwordUpdated: boolean;\n}\n\n\nclass CreateAccountForm extends Component<componentProps, componentStates> {\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            newPasswordField: \"\",\n            passwordUpdated: props.registration.isCreatePasswordCompleted\n        }\n    }\n\n   \n    static getDerivedStateFromProps(props: componentProps, state: componentStates) {\n        if(props.registration.isCreatePasswordCompleted !== state.passwordUpdated) {\n            return {\n                passwordUpdated: props.registration.isCreatePasswordCompleted\n            }\n        }\n        return null;\n    }\n    componentDidMount(){\n        this.props.ClearIdentityErrorMessages();\n    }\n\n    render() { \n        const { registration, displayReturnToLogin } = this.props;\n\n        const ReturnToLoginLink: any = () => {\n            return (\n                <Link to={'/login'} className=\"login-pages-link\">Continue to Login</Link>\n            );\n        }\n\n        return (\n            <>\n            {registration.isRegistrationValidationActive && \n                <Cin7ConfirmationBox \n                    boxType={\"error-box\"}\n                    boxIcon={\"error-icon\"}\n                    boxMessage={registration.registrationErrorMessage}\n                />\n            }\n            {registration.isWarningValidationActive && \n                <Cin7ConfirmationBox \n                    boxType={\"warning-box\"}\n                    boxIcon={\"warning-icon\"}\n                    boxMessage={registration.registrationErrorMessage}\n                />\n            }\n            {displayReturnToLogin ? <ReturnToLoginLink /> :\n                <Form className=\"cin7-form\" onSubmit={this._onSubmit}>\n                    <div className=\"section-legend\">\n                        {RegistrationPageContent.default_sectionLegend}\n                    </div>\n                    <PasswordField\n                        fieldLabel=\"Password\"\n                        fieldId=\"NewPassword\"\n                        fieldName=\"newPasswordField\"\n                        passwordStrength={true}\n                        formGroupClass={\"register-meter-margin\"}\n                        fieldErrorId=\"Reset-Password-Validation\"\n                        onChange={this._onChange}\n                    />\n                    <ButtonField buttonLabel={registration.createAccountButtonLabel} buttonType=\"submit\" disableButton={registration.isUpdatingPassword} />\n                    <div className=\"cin7-form-tc\">\n                        {RegistrationPageContent.default_tc_0} <NavLink className=\"tc-link\" href=\"https://www.cin7.com/legal/terms-of-use/\" rel=\"noopener noreferrer\" target=\"_blank\">{RegistrationPageContent.default_tc_1}</NavLink> {RegistrationPageContent.default_tc_2} <NavLink className=\"tc-link\" href=\"https://www.cin7.com/legal/privacy-policy/\" rel=\"noopener noreferrer\" target=\"_blank\">{RegistrationPageContent.default_tc_3}</NavLink>.\n                    </div>\n                </Form>\n            }\n            </>\n         );\n    }\n\n    //Functions\n\n    _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n        let validationParameters = GeneratePasswordValidationParameters(\"NewPassword\",\"Reset-Password-Validation\", \"cin7-password-meter\");\n        \n        if(this.props.registration.isFieldValidationActive) {\n            ClearFailValidation(validationParameters.inputField, \n                validationParameters.validationField, \n                validationParameters.passwordMeterContainer);\n        }\n\n        this.setState({\n            [e.target.name]: e.target.value\n        } as unknown as Pick<componentStates, keyof componentStates> );\n    }\n\n    _onSubmit = (e:React.SyntheticEvent) => {\n        e.preventDefault();\n        let passwordMeterField = document.getElementById(\"Pass-Meter\") as HTMLProgressElement;\n        let passwordScore = 0;\n\n        if(passwordMeterField) {\n            passwordScore = passwordMeterField.value;\n        }\n        \n        this.props.CreatePassword(this.props.registration.emailAddress, this.state.newPasswordField, passwordScore);\n    }\n\n}\n//Redux Map Props\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n    registration: state.identityReducer\n});\n \nexport default connect(MapStateToProps, {CreatePassword, ClearIdentityErrorMessages})(CreateAccountForm);","import React, { Component } from 'react';\nimport { GetUrlParameters } from '../../../Utils/B2BHelpers';\nimport { Redirect } from 'react-router';\n\n//Components\nimport CreateAccountForm from '../../../Components/AppForms/CreateAccountForm';\nimport FailedView from '../../Notifications/Errors/FailedView';\nimport Loading from '../../../Components/Global/Loading';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { GetRegisteredUserDetails, ConfirmUserEmail, GetUserStatus } from '../../../Redux/Actions/IdentityActions';\n//Assets\nimport { RouteComponentProps } from 'react-router';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\n\ninterface componentProps extends Partial<RouteComponentProps> {\n    registration: {\n        isCreatePasswordCompleted: boolean;\n        emailAddress: string;\n        storeName: string;\n        errorMessage?: string;\n        shouldRedirect: boolean;\n        displayErrorView: boolean;\n        isGettingUserDetailsAndStatus: boolean;\n        displayReturnToLogin: boolean;\n        userStatus: number;\n    };\n    GetRegisteredUserDetails: (credentials:any) => void;\n    ConfirmUserEmail: (credentials:any) => void;\n    GetUserStatus: (credentials:any) => void;\n}\n\ninterface componentStates {\n    storeName: string;\n    emailAddress: string;\n    errorMessage?: any;\n    displayErrorView: boolean;\n}\n\nclass Registration extends Component<componentProps, componentStates> {\n    constructor(props: any) {\n        super(props);\n        this.state = { \n            storeName: props.registration.storeName,\n            emailAddress: props.registration.emailAddress,\n            errorMessage: props.registration.errorMessage,\n            displayErrorView: props.registration.displayErrorView,\n         }\n    }\n\n    componentDidMount() {\n        //Set Page Title\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.registration_title}`;\n\n        //Get User Credentials on Load\n        this._getUserDetails();\n    }\n\n    static getDerivedStateFromProps(props: componentProps, state: componentStates) {\n        if (props.registration.emailAddress !== state.emailAddress || props.registration.storeName !== state.storeName) {\n            return {\n                emailAddress: props.registration.emailAddress,\n                storeName: props.registration.storeName\n            }\n        }\n        \n        return null;\n    }\n\n    _getUserDetails = () => {\n        let userProfileDetails = GetUrlParameters([\"userId\", \"emailToken\", \"storeModuleId\"]);\n\n        //Confirm Email\n        this.props.ConfirmUserEmail(userProfileDetails);\n\n        this.props.GetRegisteredUserDetails(userProfileDetails);\n\n        //Get Status\n        this.props.GetUserStatus(userProfileDetails);\n    }\n\n    render() { \n        const { location, registration } = this.props;\n        const { storeName, emailAddress } = this.state;\n\n        if (registration.isCreatePasswordCompleted) {\n            return(\n                <Redirect to={\n                    {\n                        pathname: '/registration/confirmation',\n                        state: {from: location}\n                    }\n                } />\n            )\n        }\n\n        if (registration.isGettingUserDetailsAndStatus) {\n            return <Loading />;\n        }\n\n        const InvitationText: any = () => {\n\n            if (storeName) {\n                return (\n                    <h2>\n                        <strong>{storeName}</strong> has invited you to create a <strong>Cin7 B2B</strong> account.\n                    </h2>\n                );\n            }\n            else {\n                return (\n                    <h2>\n                        You have been invited to create a <strong>Cin7 B2B</strong> account.\n                    </h2>\n                );\n            }\n        }\n\n        if (!emailAddress || registration.userStatus === -1) {\n            return (\n                <FailedView message={\"Invalid link.\"} hideBanner={true} tryAgainAction={this._getUserDetails} />\n            );\n        }\n        else if (registration.userStatus === 60) {\n            return (\n                <FailedView message={\"Your invitation has been canceled. Please ask the seller to resend an invitation.\"} hideBanner={true} />\n            );\n        }\n        else if (registration.userStatus !== 20 && registration.userStatus !== 21) {\n            return (\n                <FailedView message={\"Invalid status. Please ask the seller to resend an invitation.\"} hideBanner={true} />\n            );\n        }\n        else {\n            return (\n                <>\n                    {!registration.displayReturnToLogin &&\n                        <div className=\"side-image-theme-header\">\n                            <InvitationText />\n                            <h3>\n                                <span className=\"legend\">Your email login will be: </span>\n                                <span className=\"email-text email-display\"><strong>{emailAddress}</strong></span>\n                            </h3>\n                        </div>\n                    }\n                    <div className=\"side-image-theme-body\">\n                        <CreateAccountForm displayReturnToLogin={registration.displayReturnToLogin} />\n                    </div>\n                </>\n            );\n        }\n    }\n}\n\n//Redux Map Props\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n    registration: state.identityReducer\n});\n \nexport default connect(MapStateToProps, { GetRegisteredUserDetails, ConfirmUserEmail, GetUserStatus })(Registration);","import React, { Component } from \"react\";\nimport { Route, Switch, Redirect, RouteComponentProps } from \"react-router-dom\";\nimport Cin7FormHeading from \"../../Components/PageElements/Cin7FormHeading\";\nimport SidePageBanner from \"../../Components/PageElements/Login/SidePageBanner\";\nimport Cin7ConfirmationBox from \"../../Components/PageElements/Cin7ConfirmationBox\";\nimport { GetStoreInformation } from \"../../Redux/Actions/BrandingActions\";\nimport { connect } from \"react-redux\";\nimport Loading from \"../../Components/Global/Loading\";\nimport FailedView from \"../Notifications/Errors/FailedView\";\nimport { GetTenantImageUrl } from \"../../Utils/LoginHelper\";\nimport StoreHeading from \"./Views/StoreHeading\";\n\n//Pages\nimport CreatePasswordConfirmation from \"../Notifications/Success/CreatePasswordConfirmation\";\nimport Registration from \"./Views/Registration\";\nimport SidePageBannerFooter from \"../../Components/PageElements/Login/SidePageBannerFooter\";\n\ninterface componentProps extends RouteComponentProps<any> {\n    login: {\n        brandFound: boolean;\n        storeName: string;\n        loginPageImageUrl: string;\n        loginBannerImageUrl: string;\n        isGettingBrandInfo: boolean;\n    };\n    pagePath?: string;\n    pageView?: string;\n    GetStoreInformation: (brandFound: boolean) => void;\n}\n\ninterface componentStates {\n    pagePath: string;\n    parentPath: string;\n}\n\nclass Register extends Component<componentProps, componentStates> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            pagePath: props.location.pathname,\n            parentPath: props.match.path,\n        };\n    }\n\n    componentDidMount() {\n        let pathName = this.props.location.pathname;\n        this._renderPageTitles(pathName);\n\n        //Get Store Logo, Banner, Module ID, and Store Name from store info API\n        this.props.GetStoreInformation(this.props.login.brandFound);\n    }\n\n    static getDerivedStateFromProps(props: componentProps, state: componentStates) {\n        if (props.pagePath !== state.pagePath) {\n            return {\n                pagePath: props.location.pathname,\n            };\n        }\n\n        return null;\n    }\n\n    componentDidUpdate() {\n        this._renderPageTitles(this.state.pagePath);\n    }\n\n    _renderPageTitles = (pathName: string) => {\n        let parentPath = this.state.parentPath;\n\n        switch (pathName) {\n            case `${parentPath}/confirmation`:\n                document.title = \"Cin7 B2B - Confirmation\";\n                break;\n            default:\n                document.title = \"Cin7 B2B - Registration\";\n                break;\n        }\n    };\n\n    _resetBranding = () => {\n        this.props.GetStoreInformation(this.props.login.brandFound);\n    };\n\n    render() {\n        const { pagePath, parentPath } = this.state;\n        const { login } = this.props;\n\n        if (login.isGettingBrandInfo) {\n            return <Loading />;\n        }\n\n        if (!login.brandFound) {\n            return <FailedView message={\"Store not found.\"} tryAgainAction={this._resetBranding} />;\n        }\n\n        let logoImageUrl = GetTenantImageUrl(login.loginPageImageUrl);\n\n        const Cin7B2BHeading: any = (props: componentProps) => {\n            switch (props.pageView) {\n                case `${parentPath}/`:\n                case `${parentPath}`:\n                    return \"\";\n                case `${parentPath}/confirmation`:\n                    return (\n                        <Cin7ConfirmationBox\n                            boxIcon={\"tick-icon\"}\n                            boxType={\"success-box\"}\n                            boxMessage={\"Your password has been set.\"}\n                        />\n                    );\n                default: {\n                    return (\n                        <Cin7FormHeading\n                            pageTitle={\"Cin7 B2B\"}\n                            pageSubtitle={\"Unable to find matching page.\"}\n                            pageSubtitleClass={\"light\"}\n                        />\n                    );\n                }\n            }\n        };\n\n        return (\n            <div id=\"Side-Image-Theme\">\n                <div className=\"side-image-theme-container\">\n                    <SidePageBanner customerBanner={login.loginBannerImageUrl} />\n                    <div className=\"side-image-theme-content\">\n                        <div className=\"side-image-theme-header\">\n                            <StoreHeading logoImageUrl={logoImageUrl} storeName={login.storeName} />\n                            <Cin7B2BHeading pageView={pagePath} />\n                        </div>\n                        <div className=\"side-image-theme-body\">\n                            <Switch>\n                                <Route path=\"/registration/confirmation\" component={CreatePasswordConfirmation} />\n                                <Route path=\"/registration\" component={Registration} />\n                                <Redirect to={\"/page-not-found\"} />\n                            </Switch>\n                        </div>\n                        <SidePageBannerFooter />\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nconst MapStateToProps = (state: { identityReducer: any; brandingReducer: any }) => ({\n    registration: state.identityReducer,\n    login: state.brandingReducer,\n});\n\nexport default connect(MapStateToProps, { GetStoreInformation })(Register);\n","import React, { Component } from 'react';\n\nclass PageNotFound extends Component {\n\n    render() { \n        return ( \n            <h2>404 - Oops page not found</h2>\n         );\n    }\n}\n \nexport default PageNotFound;","import { useMemo } from \"react\";\nimport { useSelector } from \"react-redux\";\n\nimport { RootState } from \"..\";\nimport { CategoryType } from \"../Components/PageElements/Products/ProductCategoryFilter\";\n\n/**\n * Recursively flattens the pathnames of a category tree.\n * The first call of this function should ensure parent category path is empty or starts with a slash\n * @param parentCategory Path and ID of parent. Path should be \"\" if this is the first call of this function.\n * @param categoryArray An array of categories, each of which may contain subCategories of the same CategoryType\n * @returns Returns an array of route strings or [ ]\n */\nexport const getCategoryPaths = (parentCategory: { path: string; id: number }, categoryArray: CategoryType[]) => {\n    if (categoryArray.length === 0) {\n        return [];\n    }\n    const totalList: { path: string; id: number }[] = [];\n    categoryArray.forEach((c) => {\n        // Encode each category for use in the URL. Browsers needs help replacing ' with %27.\n        const encodedName = encodeURIComponent(c.name).replace(/'/g, \"%27\");\n        totalList.push({ id: c.id, path: `${parentCategory.path}/${encodedName}/` });\n        if (c.subCategories.length !== 0) {\n            totalList.push(\n                ...getCategoryPaths({ path: `${parentCategory.path}/${encodedName}`, id: c.id }, c.subCategories)\n            );\n        }\n    });\n    return totalList;\n};\n\n// Searches recursively for the category belonging to the provided id\nexport const findCategoryFromId = (cat: CategoryType, id: number): CategoryType | undefined => {\n    // Base case\n    if (cat.id === id) {\n        return cat;\n    }\n    if (cat.subCategories.length !== 0) {\n        for (let c of cat.subCategories) {\n            const result = findCategoryFromId(c, id);\n            if (result) return result;\n        }\n    }\n};\n\n// Searches recursively for the category which has the provided Id as a child\nexport const findParent = (categoryToSearch: CategoryType, childId: number): CategoryType | undefined => {\n    // If categoryToSearch and child match then there is no parent\n    if (categoryToSearch.id === childId) {\n        return undefined;\n    }\n\n    // These for loops could be combined but are seperate to improve speed (preventing prematurely searching deeper)\n    if (categoryToSearch.subCategories.length !== 0) {\n        for (let c of categoryToSearch.subCategories) {\n            // Base case\n            if (c.id === childId) {\n                return categoryToSearch;\n            }\n        }\n        for (let cat of categoryToSearch.subCategories) {\n            const result = findParent(cat, childId);\n            if (result) return result;\n        }\n    }\n};\n\n// Returns an array of all the parents, grandparents, ancestors of the given category(id)\nexport const findElders = (defaultParent: CategoryType, id: number): CategoryType[] => {\n    if (id < 0) return [];\n    const familyArray: CategoryType[] = [];\n    const parent = findParent(defaultParent, id);\n    if (parent) {\n        if (parent.id < 0) return [defaultParent];\n        familyArray.unshift(parent);\n        familyArray.unshift(...findElders(defaultParent, parent.id));\n    }\n    return familyArray;\n};\n\n// Retrieves the given variable from the url query params\nexport function getQueryVariable(variable: string) {\n    const query = window.location.search.substring(1);\n    const variables = query.split(\"&\");\n    for (let i = 0; i < variables.length; i++) {\n        const pair = variables[i].split(\"=\");\n        if (pair[0] === variable) {\n            return pair[1];\n        }\n    }\n    return undefined;\n}\n\n// Find if an array of category paths (with ID) contains a provided path.\n// categoryRoutes must start and end with a forward slash (/).\nexport const checkEquivalenceOfPath = (\n    categoryRoutes: { id: number; path: string }[],\n    pathToMatch: string\n): { id: number; path: string } | undefined => {\n    for (const route of categoryRoutes) {\n        // Ignore the start and end slahses, check for equivalence of the string\n        if (route.path.substring(1, route.path.length - 1).localeCompare(pathToMatch) === 0) {\n            return route;\n        }\n    }\n};\n\n// Check current page in query params exists\nexport const useMatchingCategory = () => {\n    const defaultParent = useDefaultParent();\n    const categoryRouteObjects = useCategoryRouteObjects();\n    const pagePath = getQueryVariable(\"t\");\n    const segments = [];\n    if (!pagePath) {\n        return { id: defaultParent.id, path: \"\" };\n    }\n    // Remove any slahses on the ends of the string\n    segments.push(...pagePath.split(\"/\").filter(Boolean));\n    const pathToMatch = segments.join(\"/\");\n    return checkEquivalenceOfPath(categoryRouteObjects, pathToMatch);\n};\n\n// Returns the id's of all the descendents of a given category (must provide the whole tree)\nexport const getAllDescendents = (category: CategoryType) => {\n    const children: number[] = [];\n    category.subCategories.forEach((sub) => {\n        children.push(sub.id);\n        children.push(...getAllDescendents(sub));\n    });\n    return children;\n};\n\nexport const useCategoryRouteObjects = () => {\n    return useSelector((state: RootState) => state.productListReducer.categoryRouteObjects);\n};\n\nexport const useCurrentCategory = () => {\n    return useSelector((state: RootState) => state.categoryReducer.category);\n};\n\nexport const useCategories = () => {\n    return useSelector((state: RootState) => state.productListReducer.categories);\n};\n\nexport const useDefaultParent = () => {\n    const categories = useCategories();\n    return useMemo(() => {\n        return {\n            id: -1,\n            name: \"All Products\",\n            subCategories: categories,\n        };\n    }, [categories]);\n};\n","import axios, { CancelTokenSource } from \"axios\";\n\nimport * as types from \"./../Types/ProductListTypes\";\nimport { RefreshUserToken } from \"./../Actions/AuthActions\";\nimport APIHost from \"./../../APIHost\";\nimport ApiUtil from \"../../Utils/ApiUtil\";\nimport { getCategoryPaths } from \"../../Utils/CategoriesHelper\";\nimport { CategoryType } from \"../../Components/PageElements/Products/ProductCategoryFilter\";\nimport { unauthorizeIfNeeded } from \"../../Utils/Global/UnauthorizeIfNeeded\";\n\nconst host = new APIHost();\nconst apiUtil = new ApiUtil();\n\nexport type ProductListItem = {\n  brand: string;\n  stock: number;\n  currencyCode: string;\n  taxStatus: string;\n  minPrice: number;\n  maxPrice: number;\n  retailPrice: number;\n  minSpecialPrice: number;\n  maxSpecialPrice: number;\n  image: string | null;\n  images: string[];\n  allowOverselling: boolean;\n  isNonStock: boolean;\n  hasMultipleOptions: boolean;\n  hasPromotions: boolean;\n  minRangeContractPrice: number;\n  maxRangeContractPrice: number;\n  sizeRangeId: number;\n  incomingDate: string | null;\n  id: number;\n  name: string;\n  styleCode: string;\n};\n\ntype PostBody = {\n  moduleId: number;\n  page: number;\n  keyword: string;\n  brandIds: number[];\n  categoryIds: number[];\n};\n\nexport type ProductsListType = {\n    brands: any[];\n    brandsFetched: boolean;\n    categories: CategoryType[];\n    isFetchingCategories: boolean;\n    categoriesFetched: boolean;\n    categoryRouteObjects: {\n        id: number;\n        path: string;\n    }[];\n    numberOfCategories: number | null;\n    filter: {\n        filterMenuOpen: boolean;\n        filterMenuToggledByUser: boolean;\n        brandIds: number[];\n        categoryIds: number[];\n    };\n    isFetchingProducts: boolean;\n    message: string;\n    productListViewStyle: string;\n    products: ProductListItem[];\n    serviceHasMore: boolean;\n};\n\nexport const ResetProductsList = () => (dispatch: any) => {\n  dispatch({\n    type: types.Reset_Products_List,\n  });\n};\n\nlet source: CancelTokenSource;\nexport const GetProductsList = (\n  token: string,\n  page: number,\n  query?: string,\n  filters?: { brandIds?: number[]; categoryIds?: number[] }\n) => (dispatch: any) => {\n  const headers = apiUtil.DefaultHeaders(token);\n  if (headers === null) {\n    return;\n  }\n\n  // If a token exists from a previous request, cancel it\n  if (typeof source != typeof undefined && page === 1) {\n    source.cancel(\"Operation canceled due to new request.\")\n  }\n\n  //Save the cancel token for the current request\n  source = axios.CancelToken.source();\n\n  dispatch({\n    type: types.Fetching_Products_List,\n  });\n\n  const postBody: PostBody = {\n    moduleId: apiUtil.GetModuleId(),\n    page: page,\n    keyword: \"\",\n    brandIds: [],\n    categoryIds: [],\n  };\n\n  if (query && query.length > 0) {\n    postBody.keyword = query;\n  }\n\n  if (filters?.brandIds && filters?.brandIds?.length > 0) {\n    postBody.brandIds = filters?.brandIds;\n  }\n\n  if (filters?.categoryIds && filters?.categoryIds?.length > 0) {\n    postBody.categoryIds = filters?.categoryIds;\n  }\n\n  axios\n    .post(host.ProductsAPI(\"GetProductsList\"), postBody, {...headers, cancelToken: source.token})\n    .then((res) => {\n      dispatch({\n        type: types.Fetch_Products_List,\n        payload: {\n          products: res.data.products,\n        },\n      });\n    })\n    .catch((error) => {\n      if (axios.isCancel(error)) {\n        return;\n      }\n      if (error.response) {\n        let errorStatus = error.response.status;\n\n        switch (errorStatus) {\n          case 401:\n            dispatch({\n              type: types.Fetch_Products_Error,\n              payload: {\n                message: \"\",\n              },\n            });\n            dispatch(RefreshUserToken());\n            break;\n\n          default:\n            dispatch({\n              type: types.Fetch_Products_Error,\n              payload: {\n                message: error.message,\n              },\n            });\n            break;\n        }\n      } else {\n        dispatch({\n          type: types.Fetch_Products_Error,\n          payload: {\n            message: error.message,\n          },\n        });\n      }\n    });\n};\n\nexport const GetBrandsList = (token: string) => (dispatch: any) => {\n  var headers = apiUtil.DefaultHeaders(token);\n\n  if (headers === null) {\n    return;\n  }\n\n  const postBody = {\n    moduleId: apiUtil.GetModuleId(),\n  };\n\n  axios\n    .post(host.ProductsAPI(\"GetBrandsList\"), postBody, headers)\n    .then((res) => {\n      dispatch({\n        type: types.Fetch_Brands_List,\n        payload: {\n          brands: res.data.brands,\n          brandsFetched: res.data.success,\n        },\n      });\n    });\n};\n\nexport const GetCategoriesList = (token: string) => (dispatch: any) => {\n  const headers = apiUtil.DefaultHeaders(token);\n  if (headers === null) {\n    return;\n  }\n\n  const postBody = {\n    moduleId: apiUtil.GetModuleId(),\n  };\n\n  dispatch({\n    type: types.Fetch_Categories_List,\n    payload: {\n      categories: [],\n      categoriesFetched: false,\n      isFetchingCategories: true,\n    },\n  });\n  \n  axios\n    .post(host.ProductsAPI(\"GetCategoriesList\"), postBody, headers)\n    .then((res) => {\n      dispatch({\n        type: types.Fetch_Categories_List,\n        payload: {\n          categories: res.data.categories,\n          categoriesFetched: res.data.success,\n          isFetchingCategories: false,\n          numberOfCategories: res.data.categories.length,\n        },\n      });\n      const categoryRouteObjects = getCategoryPaths({path: \"\", id: -1}, res.data.categories);\n      if (categoryRouteObjects.length !== 0) {\n        dispatch({\n            type: types.Create_Category_Route_Objects,\n            payload: {\n              routes: categoryRouteObjects,\n            },\n          });\n      }\n    })\n    .catch((error) => {\n      if (axios.isCancel(error)) {\n        return;\n      }\n      unauthorizeIfNeeded(error, dispatch);\n      dispatch({\n        type: types.Fetch_Categories_Error,\n        payload: {\n          message: error.message,\n        },\n      });\n    });\n  \n};\n\nexport const UpdateProductsFilter = (filter: {\n  brandIds?: number[];\n  categoryIds?: number[];\n}) => (dispatch: any) => {\n  dispatch({\n    type: types.Update_Products_Filter,\n    payload: {\n      brandIds: filter.brandIds,\n      categoryIds: filter.categoryIds,\n    },\n  });\n};\n\n//Toggle View Actions\nexport const ToggleProductListView = (viewType: string) => (dispatch: any) => {\n  switch (viewType) {\n    case \"gallery-view\":\n      dispatch({\n        type: types.Product_List_View_Gallery,\n      });\n      break;\n    case \"list-view\":\n    default:\n      dispatch({\n        type: types.Product_List_View_List,\n      });\n      break;\n  }\n};\n\nexport const DisplayFilterMenu = (toggledByUser: boolean) => (dispatch: any) => {\n  dispatch({\n    type: types.Filter_Menu_Toggle_Status,\n    payload: {\n      filterMenuToggledByUser: toggledByUser\n    }\n  });\n};\n","import { AxiosError } from \"axios\";\nimport * as types from \"../../Redux/Types/AuthTypes\";\n\nexport const unauthorizeIfNeeded = (error: AxiosError, dispatch: any) => {\n    if (error.response) {\n        let errorStatus = error.response.status;\n\n        if (errorStatus === 401) {\n            dispatch({\n                type: types.Deauthorize_B2B_User,\n                payload: {\n                    message: \"Failed to authenticate user. Please login again.\",\n                },\n            });\n        } else if (errorStatus === 403) {\n            dispatch({\n                type: types.Deauthorize_B2B_User,\n                payload: {\n                    message: \"Failed to authenticate user. Please login again.\",\n                },\n            });\n        }\n    }\n};\n","import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { UpdateProductsFilter, DisplayFilterMenu, ProductsListType } from \"../../../Redux/Actions/ProductListActions\";\nimport { GetCategoriesList } from \"../../../Redux/Actions/ProductListActions\";\nimport {\n    Button,\n    Checkbox,\n    Input,\n    Accordion,\n    CloseCircleIcon,\n    CloseIcon,\n    SearchIcon,\n    AccordionDetails,\n    AccordionSummary,\n    Typography,\n    FormControlLabel,\n} from \"@cin7/ui\";\n\nimport \"./Styles/_ProductsListBrandFilter.scss\";\n\ninterface componentProps {\n    productsList: ProductsListType;\n    auth: {\n        subscribedToken: string;\n    };\n    UpdateProductsFilter: (filter: { brandIds?: number[]; categoryIds?: number[] }) => void;\n    DisplayFilterMenu: (toggledByUser: boolean) => void;\n}\n\ninterface componentState {\n    brands: any[];\n    brandIds: number[];\n    brandSearchParameter: string;\n}\n\nclass ProductsListBrandFilter extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            brands: this.props.productsList.brands,\n            brandIds: this.props.productsList.filter.brandIds,\n            brandSearchParameter: \"\",\n        };\n    }\n\n    componentDidUpdate(prevProps: any) {\n        if (prevProps.productsList.brands !== this.props.productsList.brands) {\n            this.setState({\n                brands: this.props.productsList.brands,\n            });\n        }\n\n        if (prevProps.productsList.filter.brandIds !== this.props.productsList.filter.brandIds) {\n            this.setState({\n                brandIds: this.props.productsList.filter.brandIds,\n            });\n        }\n    }\n\n    render() {\n        const { productsList } = this.props;\n        const { brands, brandIds, brandSearchParameter } = this.state;\n        return (\n            <>\n                <div id=\"Filter-Sidebar\" className={productsList.filter.filterMenuOpen ? \"active\" : \"\"}>\n                    <div\n                        id=\"Products-List-Brand-Filter\"\n                        className={`${productsList.filter.filterMenuOpen ? \" active\" : \"\"}`}\n                    >\n                        {productsList.filter.filterMenuOpen && (\n                            <div className=\"products-filter\">\n                                <h2>Filter</h2>\n                                <div\n                                    className={\"filter-close-icon\"}\n                                    onClick={() => this.props.DisplayFilterMenu(false)}\n                                >\n                                    <CloseIcon />\n                                </div>\n\n                                <div className=\"filter-action-buttons\">\n                                    <Button\n                                        id={\"Filter-Action-Apply\"}\n                                        className=\"filter-action-apply\"\n                                        onClick={this._applyFilter}\n                                    >\n                                        Apply Filter\n                                    </Button>\n                                    <Button\n                                        id={\"Filter-Action-Clear\"}\n                                        className=\"filter-action-clear\"\n                                        variant={\"secondary\"}\n                                        onClick={this._clearFilter}\n                                    >\n                                        Clear\n                                    </Button>\n                                </div>\n                                <div className=\"filters-heading\">\n                                    Filters<span>&nbsp;</span>\n                                </div>\n                                <div className=\"filters\">\n                                    {productsList.brands.length > 0 ? (\n                                        <Accordion elevation={0} defaultExpanded>\n                                            <AccordionSummary>\n                                                <Typography variant={\"h4\"}>Brand</Typography>\n                                            </AccordionSummary>\n                                            <AccordionDetails>\n                                                <div className=\"brand-filter filter\">\n                                                    <Input\n                                                        id={\"Brand-Search-Box\"}\n                                                        className=\"brand-search-box\"\n                                                        onChange={(e) => this._onSearchBrand(e.target.value)}\n                                                        value={brandSearchParameter}\n                                                        InputProps={{\n                                                            startAdornment: (\n                                                                <div className=\"input-icon\">\n                                                                    <SearchIcon />\n                                                                </div>\n                                                            ),\n                                                            endAdornment: brandSearchParameter && (\n                                                                <div\n                                                                    className=\"input-icon\"\n                                                                    onClick={() => this._onSearchBrand(\"\")}\n                                                                >\n                                                                    <CloseCircleIcon />\n                                                                </div>\n                                                            ),\n                                                        }}\n                                                    />\n                                                    <div className=\"brands-list\">\n                                                        {brands.map((brand: any) => (\n                                                            <FormControlLabel\n                                                                key={brand.id}\n                                                                value=\"top\"\n                                                                control={\n                                                                    <Checkbox\n                                                                        key={brand.id}\n                                                                        id={brand.id.toString()}\n                                                                        value={brand.id}\n                                                                        checked={brandIds.includes(brand.id)}\n                                                                        onChange={this._onChangeBrand}\n                                                                    />\n                                                                }\n                                                                label={brand.name}\n                                                                labelPlacement=\"end\"\n                                                            />\n                                                        ))}\n                                                    </div>\n                                                </div>\n                                            </AccordionDetails>\n                                        </Accordion>\n                                    ) : null}\n                                </div>\n                            </div>\n                        )}\n                    </div>\n                </div>\n            </>\n        );\n    }\n\n    _clearFilter = () => {\n        this.setState({\n            brands: this.props.productsList.brands,\n            brandIds: [],\n            brandSearchParameter: \"\",\n        });\n\n        const filter = {\n            brandIds: [],\n        };\n        this.props.UpdateProductsFilter(filter);\n    };\n\n    _applyFilter = () => {\n        const filter = {\n            brandIds: this.state.brandIds,\n        };\n\n        this.props.UpdateProductsFilter(filter);\n        this.props.DisplayFilterMenu(false);\n    };\n\n    _onChangeBrand = (e: React.ChangeEvent<HTMLInputElement>, checked: boolean) => {\n        var brands: number[] = [];\n\n        if (checked) {\n            brands.push(Number(e.target.value));\n\n            this.setState({\n                brandIds: this.state.brandIds.concat(brands),\n            });\n        } else {\n            var currentBrandIds = this.state.brandIds.slice();\n            var index = currentBrandIds.findIndex((x) => x.valueOf() === Number(e.target.value));\n            currentBrandIds.splice(index, 1);\n\n            brands = currentBrandIds;\n\n            this.setState({\n                brandIds: brands,\n            });\n        }\n    };\n\n    _onSearchBrand = (value: string | number) => {\n        var brands: any[] = this.props.productsList.brands.filter((x: { name: string }) =>\n            x.name.toLowerCase().includes(String(value).toLowerCase())\n        );\n\n        this.setState({\n            brands: brands,\n            brandSearchParameter: String(value),\n        });\n    };\n}\n\nconst MapStateToProps = (state: { productListReducer: any; authReducer: any }) => ({\n    productsList: state.productListReducer,\n    auth: state.authReducer,\n});\n\nexport default connect(MapStateToProps, {\n    UpdateProductsFilter,\n    GetCategoriesList,\n    DisplayFilterMenu,\n})(ProductsListBrandFilter);\n","import { GetCurrentUrl } from \"../../Utils/B2BHelpers\";\nimport { GetPaymentsPortalAddress } from \"../../Utils/OrderHelper\";\nimport { GetLineItemDiscount, GetTotalProductOptionPrice } from \"../../Utils/ProductsHelper\";\nimport { OrderItemNote } from \"../Reducers/App_Reducers/OrderReducer\";\n\nexport const getOrderItemOptionNote = (optionId: number, productId: number, uomId: number | null) => (state:any) => state.orderReducer?.orderItemNotes.find((orderItemNote: OrderItemNote) => orderItemNote.optionId === optionId && orderItemNote.productId === productId && orderItemNote.uomId === uomId);\n\nexport const getOrderItemCount = (state: any) => state.orderReducer?.orderItems.reduce((counter: number, cart: any) => {\n    return counter + cart.totalItems\n}, 0);\n\nexport const getOrderReducer = (state: any) => state.orderReducer;\n\nexport const getReorderItemsCount = (state: any) => state.orderReducer?.reorderItemsCount;\n\nexport const getReorderUnavailableItemsCount = (state: any) => state.orderReducer?.reorderUnavailableItemsCount;\n\nexport const getIsFetchingReorderDetails = (state: any) => state.orderReducer?.isFetchingReorderDetails;\n\nexport const getIsReorderComplete = (state: any) => state.orderReducer?.isReorderComplete;\n\nexport const getReorderErrorMessage = (state: any) => state.orderReducer?.reorderErrorMessage;\n\nexport const getOrderErrorMessage = (state: any) => state.orderReducer?.errorMessage;\n\nexport const getHidePriceWhileFetchingPromotionCalculations = (state: any) => state.orderReducer?.hidePriceWhileFetchingPromotionCalculations;\n\nexport const getIsFetchingPromotions = (state: any) => state.orderReducer?.isFetchingPromotions;\n\nexport const getCartItemsTotal = (state: any) => {\n    let totalItemsPrice = 0;\n\n    state.orderReducer?.orderItems.forEach((item: any) => {\n        totalItemsPrice += item.productOptions.reduce((totalPrice: number, option: any) => {\n            return totalPrice + GetTotalProductOptionPrice(option);\n        }, 0);\n    }, 0);\n\n    return totalItemsPrice;\n}\n\nexport const getCartDiscountTotal = (state: any) => {\n    let totalDiscount = 0;\n\n    state.orderReducer?.orderItems.forEach((item: any) => {\n\n        totalDiscount += item.productOptions.reduce((totalDiscount: number, option: any) => {\n            return totalDiscount + GetLineItemDiscount(option);\n        }, 0);\n\n    }, 0);\n\n    return totalDiscount;\n}\n\nexport const getFullOrder = (state: any) => state.orderReducer;\n\nexport const getOrderAddressOrUserAddress = (state: any) => state.orderReducer?.orderDetails?.deliveryAddress ? state.orderReducer.orderDetails.deliveryAddress : state.identityReducer?.userInfo?.deliveryAddress;\n\nexport const getOrderFirstNameOrUserFirstName = (state: any) => state.orderReducer?.orderDetails?.deliveryAddress ? state.orderReducer.orderDetails.deliveryAddress.firstName : state.identityReducer?.userInfo?.firstName;\n\nexport const getOrderLastNameOrUserLastName = (state: any) => state.orderReducer?.orderDetails?.deliveryAddress ? state.orderReducer.orderDetails.deliveryAddress.lastName : state.identityReducer?.userInfo?.lastName;\n\nexport const getBillingAddress = (state: any) => state.identityReducer?.userInfo?.billingAddress;\n\nexport const getShouldRedirectToConfirmation = (state: any) => state.orderReducer?.shouldRedirect;\n\nexport const getShouldRedirectToPayment = (state: any) => state.orderReducer?.shouldRedirectToPayment;\n\nexport const getPaymentFailed = (state: any) => state.orderReducer?.paymentFailed;\n\nexport const getPaymentUrl = (state: any) => {\n    const paymentsPortalAddress = GetPaymentsPortalAddress();\n    const currentUrl = GetCurrentUrl();\n    const tenantName = state.identityReducer?.tenantName;\n    const orderId = state.orderReducer?.id;\n    const orderStageIfPaymentMadeInFull = state.identityReducer?.moduleSettings?.orderStage ?? \"\";\n\n    if (!orderId) {\n        return null;\n    }\n\n    let returnUrl = \"https://\" + currentUrl.hostname;\n\n    if (currentUrl.hostname === 'localhost') {\n        returnUrl = \"http://\" + currentUrl.hostname + \":\" + currentUrl.port;\n    }\n\n    let paymentUrl = paymentsPortalAddress + `/Search/LookupB2BV2Orders?username=${tenantName}&OrderId=${orderId}&ReturnUrl=${encodeURIComponent(returnUrl)}` +\n        `&OrderStageForFullPayment=${encodeURIComponent(orderStageIfPaymentMadeInFull)}`;\n\n    return paymentUrl;\n}\n\nexport const getPaymentMethod = (state: any) => state.orderReducer?.orderDetails?.paymentMethod;\n\nexport const getCartItemsWeightTotal = (state: any) => {\n    let totalWeight = 0;\n\n    state.orderReducer?.orderItems.forEach((item: any) => {\n        item.productOptions.forEach((option: any) => {\n            if (option.weight <= 0) return 0;\n            totalWeight += (option.uomSize > 0 ? option.uomSize : 1) * option.productQuantity * option.weight;\n        });\n    });\n\n    return Math.round(totalWeight * 100) / 100;\n}\n\n// returns true if all items in the cart have a weight greater than 0 else false.\nexport const getCartItemsHaveWeight = (state: any) => {\n    return state.orderReducer?.orderItems.every((item: any) => {\n        return item.productOptions.every((option: any) => option.weight > 0);\n    });\n}\n","import { useSelector } from \"react-redux\";\nimport { RootState } from \"..\";\nimport { FreightTierPriceType } from \"../Redux/Reducers/App_Reducers/FreightReducer\";\n\nexport const useFreightOptionsFetched = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightOptionsFetched);\n};\n\nexport const useFreightOptions = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightOptions);\n};\n\nexport const useCurrentFreightZone = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightZone);\n};\n\nexport const useCurrentFreightTier = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightTier);\n};\n\nexport const useCurrentFreightTierAttribute = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightTierAttribute);\n};\n\nexport const useCurrentFreightPrice = () => {\n    const tier = useCurrentFreightTier();\n    const attribute = useCurrentFreightTierAttribute();\n    if (tier?.id > 0) {\n        if ((tier.type === FreightTierPriceType.Weight || tier.type === FreightTierPriceType.Value) && attribute?.id > 0) {\n            return attribute.price ?? 0;\n        }\n        else if (tier.type === FreightTierPriceType.FlatRate) {\n            return tier.price;\n        }\n    }\n    return 0;\n};\n\nexport const useCurrentFreightDescription = () => {\n    const zone = useCurrentFreightZone();\n    const tier = useCurrentFreightTier();\n\n    let description = \"\";\n\n    if (zone?.id > 0 && tier?.id > 0) {\n        description = zone.name + \" - \" + tier.name;\n    }\n\n    return description;\n};\n\nexport const useHasFreightOptions = () => {\n    const fetched = useFreightOptionsFetched();\n    const freightOptions = useFreightOptions();\n    \n    if (fetched && freightOptions?.length > 0) {\n        return true;\n    }\n\n    return false;\n};\n\nexport const useHasFilteredZones = () => {\n    return useSelector((state: RootState) => state.freightReducer.freightZonesFiltered);\n};\n","import { useSelector } from \"react-redux\";\nimport APIHost from \"../APIHost\";\nimport { HeaderContent } from \"../Language/Default_Settings\";\nimport { getCartItemsTotal, getOrderReducer } from \"../Redux/Selectors/OrderSelectors\";\nimport { getBranchInfo, getUserInfo, getUserPriceTier } from \"../Redux/Selectors/UserSelectors\";\nimport { useCurrentFreightPrice } from \"./FreightHelper\";\nimport { GetTotalProductOptionPrice } from \"./ProductsHelper\";\n\nexport const FormatMoney = (value: number, currencyCode: string) => {\n\n    value = Number(value?.toFixed(6));\n    \n    var locale;\n\n    // Get the locale based on the currencyCode. This is to stop the region prefixing the value e.g. $10 NZD displays as \"NZ$10.00\" instead of just \"$10.00\" if the locale is not \"en-NZ\".\n    // As a future improvement we should either get the locale from Cin7 or lookup the locale using an extension.\n    switch (currencyCode) {\n        case \"NZD\":\n            locale = \"en-NZ\";\n            break;\n        case \"AUD\":\n            locale = \"en-AU\";\n            break;\n        case \"CAD\":\n            locale = \"en-CA\";\n            break;\n        default:\n            locale = \"en-US\";\n            break;\n    }\n\n    return new Intl.NumberFormat(locale, { style: 'currency', currency: currencyCode, minimumFractionDigits: 2 }).format(value);\n};\n\nexport const FormatAmount = (value:number) => {\n    return new Intl.NumberFormat('en-US').format(value);\n}\n\nexport const UndoFormatAmount = (value:string) => {\n    return Number(value.replace(/,/g, ''));\n}\n\nexport const GetOrderTotalTax = (orderItems: any[], userInfo: any, branchInfo: any, freightPrice: number) => {\n\n    let totalTax = 0;\n    \n    let taxRate = userInfo.priceTier.defaultTaxRate;\n\n    if (userInfo.taxRate != null) {\n        // Member level tax rate.\n        taxRate = userInfo.taxRate;\n    } else if (branchInfo != null && branchInfo.taxRate != null) {\n        // Branch level tax rate.\n        taxRate = branchInfo.taxRate;\n    }\n\n    let taxStatus = userInfo.priceTier.taxStatus;\n\n    orderItems.forEach((item: {product: {taxRate: number | null}, productOptions: []}) => {\n        totalTax += item.productOptions.reduce((totalOptionTax: number, option: any) => {\n            let productTaxRate = taxRate;\n\n            if (item.product.taxRate != null) {\n                productTaxRate = item.product.taxRate;\n            }\n\n            let optionTotal = GetTotalProductOptionPrice(option);\n\n            switch (taxStatus) {\n                case \"Excl\":\n                    totalOptionTax += optionTotal * productTaxRate;\n                    break;\n                case \"Incl\":\n                    totalOptionTax += optionTotal - (optionTotal / (1 + productTaxRate));\n                    break;\n                default:\n                    break;\n            }\n\n            return totalOptionTax;\n        }, 0)\n    }, 0);\n\n    switch (taxStatus) {\n        case \"Excl\":\n            totalTax += freightPrice * taxRate;\n            break;\n        case \"Incl\":\n            totalTax += freightPrice - (freightPrice / (1 + taxRate));\n            break;\n        default:\n            break;\n    }\n\n    return totalTax;\n};\n\nexport const GetTaxLabel = (taxStatus: string) => {\n    let taxLabel = HeaderContent.default_miniCartTaxLabel + \" \" + taxStatus;\n\n    switch (taxStatus) {\n        case \"Excl\":\n        case \"Incl\":\n            taxLabel += \".\";\n            break;\n        default:\n            break;\n    }\n\n    return taxLabel;\n}\n\nexport const FormatDate = (value: string | null) => {\n\n    if (value) {\n        let date = new Date( Date.parse(value) );\n\n        const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(date);\n        const mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(date);\n        const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date);\n    \n        return `${da} - ${mo} - ${ye}`;\n    }\n\n    return \"\";\n};\n\nexport const GetPaymentsPortalAddress = () => {\n    const apiHost = new APIHost();\n    const appSettings = apiHost.GetEnvironmentConfig();\n    return appSettings.PaymentsPortalAddress;\n}\n\nexport const getIsPayAccountOnHold = (userIsOnHold: boolean, remainingCreditLimit: number, cartTotal: number) => {\n    if (userIsOnHold) {\n        return true;\n    }\n    else if (remainingCreditLimit && cartTotal > remainingCreditLimit) {\n        return true;\n    }\n    return false;\n}\n\nexport const useCartTaxTotal = () => {\n    const cart = useSelector(getOrderReducer);\n    const orderItems = cart.orderItems;\n    const userInfo = useSelector(getUserInfo);\n    const branchInfo = useSelector(getBranchInfo);\n    const priceTier = useSelector(getUserPriceTier);\n\n    const freightPrice = useCurrentFreightPrice();\n\n    let totalTax = 0;\n\n    if (priceTier) {\n        totalTax = GetOrderTotalTax(orderItems, userInfo, branchInfo, freightPrice);\n    }\n\n    return totalTax;\n}\n\nexport const useCartGrandTotal = () => {\n    const cart = useSelector(getOrderReducer);\n    const orderItems = cart.orderItems;\n    const userInfo = useSelector(getUserInfo);\n    const branchInfo = useSelector(getBranchInfo);\n    const priceTier = useSelector(getUserPriceTier);\n\n    const totalItemsPrice = useSelector(getCartItemsTotal);\n\n    const freightPrice = useCurrentFreightPrice();\n    \n    let totalTax = 0;\n\n    if (priceTier) {\n        totalTax = GetOrderTotalTax(orderItems, userInfo, branchInfo, freightPrice);\n    }\n\n    let grandTotal = totalItemsPrice + freightPrice;\n\n    if (totalTax && priceTier && priceTier.taxStatus === \"Excl\") {\n        grandTotal = totalItemsPrice + freightPrice + totalTax;\n    }\n\n    return grandTotal;\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { getUserCurrency } from '../../Redux/Selectors/UserSelectors';\nimport { FormatMoney } from '../../Utils/OrderHelper';\nimport LoadingSpinner from './LoadingSpinner';\n\ninterface PriceDisplayProps {\n    value: number;\n    isLoading?: boolean;\n};\n\nexport const PriceDisplay = (props: PriceDisplayProps) => {\n\n    const {\n        value,\n        isLoading,\n    } = props;\n\n    const userCurrencyCode = useSelector(getUserCurrency);\n\n    if (isLoading) {\n        return <LoadingSpinner size={26} />;\n    }\n\n    if (userCurrencyCode) {\n        return <>{FormatMoney(value, userCurrencyCode)}</>;\n    }\n    else {\n        return null;\n    }\n};\n\nexport default PriceDisplay;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { getUserCurrency, getRetailPriceTierCurrency } from '../../Redux/Selectors/UserSelectors';\nimport { FormatMoney } from '../../Utils/OrderHelper';\nimport LoadingSpinner from './LoadingSpinner';\n\ninterface RetailPriceDisplayProps {\n    value: number;\n    isLoading?: boolean;\n};\n\nexport const RetailPriceDisplay = (props: RetailPriceDisplayProps) => {\n\n    const {\n        value,\n        isLoading,\n    } = props;\n\n    const userCurrencyCode = useSelector(getUserCurrency);\n    const retailCurrencyCode = useSelector(getRetailPriceTierCurrency)\n\n    if (isLoading) {\n        return <LoadingSpinner size={26} />;\n    }\n\n    if (retailCurrencyCode && (userCurrencyCode === retailCurrencyCode)) {\n        return <>RRP: {FormatMoney(value, retailCurrencyCode)}<br /></>;\n    }\n    else {\n        return null;\n    }\n};\n\nexport default RetailPriceDisplay;\n","import React, {Component} from 'react';\nimport PriceDisplay from '../../Global/PriceDisplay';\n\nimport './Styles/_ProductPrice.scss';\nimport RetailPriceDisplay from '../../Global/RetailPriceDisplay';\n\ninterface componentProps {\n    product: any;\n}\n \ninterface componentState {}\n \nclass ProductPrice extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {};\n    }\n\n    checkForSameMinAndMaxPrice(minPrice: number, maxNumber: number){\n        return minPrice === maxNumber;\n    }\n\n    checkForRetailPrice(product: any){\n        if (product.retailPrice !== 0 && product.retailPrice > product.minPrice)\n        {\n            return (\n                <div className='product-code'>\n                    <RetailPriceDisplay value={product.retailPrice} />\n                </div>\n            );\n        }\n    }\n\n    render() {\n        const { product } = this.props;\n\n        const ListPrice: any = () => {\n            if (product.minPrice == null || product.maxPrice == null) {\n                return null;\n            }\n\n            if (this.checkForSameMinAndMaxPrice(product.minPrice, product.maxPrice)) {\n                return <PriceDisplay value={product.minPrice} />;\n            }\n\n            return (\n                <>\n                    <PriceDisplay value={product.minPrice} /> - <PriceDisplay value={product.maxPrice} />\n                </>\n            );\n        };\n\n        const ListContractPrice: any = () => {\n            if (!product.minRangeContractPrice && !product.maxRangeContractPrice) {\n                return null;\n            }\n\n            if (this.checkForSameMinAndMaxPrice(product.minRangeContractPrice, product.maxRangeContractPrice)) {\n                return <PriceDisplay value={product.minRangeContractPrice} />;\n            }\n\n            return (\n                <>\n                    <PriceDisplay value={product.minRangeContractPrice} /> - <PriceDisplay value={product.maxRangeContractPrice} />\n                </>\n            );\n        };\n        \n        const ListSpecialPrice: any = () => {\n            if (this.checkForSameMinAndMaxPrice(product.minSpecialPrice, product.maxSpecialPrice)) {\n                return <PriceDisplay value={product.minSpecialPrice} />;\n            }\n\n            return (\n                <>\n                    <PriceDisplay value={product.minSpecialPrice} /> - <PriceDisplay value={product.maxSpecialPrice} />\n                </>\n            );\n        };\n\n        if (product.minSpecialPrice && product.maxSpecialPrice && !product.minRangeContractPrice && !product.maxRangeContractPrice) {\n            return (\n                <>\n                    {this.checkForRetailPrice(product)}\n                    <div className=\"product-details-price\">\n                        <span className=\"special-price\"><ListSpecialPrice /> <span className=\"original-price\">{<ListPrice />}</span></span>\n                    </div>\n                </>\n            );\n        }\n        else if(product.minRangeContractPrice && product.maxRangeContractPrice && ListContractPrice){\n            return (\n                <>\n                    {this.checkForRetailPrice(product)}\n                    <div className=\"product-details-price\">\n                        {<ListContractPrice />}\n                    </div>\n                </>\n            )\n        }\n        else {\n            return (\n                <>\n                    {this.checkForRetailPrice(product)}\n                    <div className=\"product-details-price\">\n                        {<ListPrice />}\n                    </div>\n                </>\n            );\n        }\n    }\n}\n \nexport default ProductPrice;","import React, { Component } from 'react';\n\ninterface componentProps {\n    title: string;\n}\n\nclass DynamicTitleSection extends Component<componentProps,{}> {\n\n    render() {\n\n        const { title } = this.props;\n\n        let dynamicClass = \"\";\n\n        if (title) {\n            if (title.length > 70) {\n                dynamicClass = \"title-lg\";\n            } else if (title.length > 50) {\n                dynamicClass = \"title-md\";\n            }\n        }\n\n        const DynamicTitle = () => {            \n            return(\n                <span className={dynamicClass}>{title}</span>\n            );\n        }\n\n        return <DynamicTitle />\n    }    \n}\n\nexport default DynamicTitleSection;","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { FormatIncomingDate, RoundStockNumber } from './../../../Utils/ProductsHelper';\nimport { FormatAmount } from '../../../Utils/OrderHelper';\n\nimport './Styles/_StockIndicator.scss';\n\ninterface componentProps {\n    product?: any;\n    productOption?: any;\n    sizes?: boolean;\n    remainingOptionStock?: number;\n    identity: {\n        moduleSettings: {\n            stockDisplay: number;\n            oversellStockIndicator: string | null;\n        }\n    };\n}\n\nclass StockIndicator extends Component<componentProps,{}> {\n\n    render() {\n        const { sizes, productOption, product, identity, remainingOptionStock } = this.props;\n\n        let optionGroupStock = productOption != null ? productOption.stock : product.stock;\n        let incomingStockDate = productOption != null ? productOption.incomingDate : product.incomingDate;\n\n        let indicators = false;\n\n        switch (identity.moduleSettings.stockDisplay) {\n            case 2: // Do not display stock.\n                return null;\n            case 1: // Display stock indicators.\n                indicators = true;\n                break;\n            case 0: // Display stock numbers.\n            default:\n                break;\n        }\n\n        if (product?.isNonStock) {\n            return (\n                <div className=\"stock-indicator\">Available</div>\n            );\n        }\n\n        if (productOption) {            \n            if (sizes) {\n                optionGroupStock = productOption.reduce((totalStock: number, item: { uomId: number, stock: number; uomSize: number; }) => {\n                    return totalStock + (item.stock > 0 ? (item.uomId ? Math.floor(item.stock / item.uomSize) : item.stock) : 0);\n                }, 0);\n\n                if (productOption.some((option: { uomId: number; }) => option.uomId)) {\n                    // Only show an indicator for UOM group.\n                    indicators = true;\n                }\n\n                if (productOption.some((option: { incomingDate: string; }) => option.incomingDate)) {\n                    const optionsSortedByDate = productOption.slice().sort((a: any, b: any) => Number(new Date(a.incomingDate)) - Number(new Date(b.incomingDate)));\n                    incomingStockDate = optionsSortedByDate.find((option: { incomingDate: string; }) => option.incomingDate).incomingDate;\n                }\n            }\n            else if (productOption.uomId) {\n                // Calculate UOM stock.\n                optionGroupStock = Math.floor(productOption.stock / productOption.uomSize);\n            }\n        }\n\n        if (optionGroupStock <= 0) {\n            if (product?.allowOverselling) {\n                return (\n                    <div className=\"stock-indicator-container\">\n                        <div className=\"stock-indicator\">{identity.moduleSettings?.oversellStockIndicator || 'Available'}</div>\n                        {incomingStockDate && <div className=\"stock-indicator incoming-stock\">Incoming {FormatIncomingDate(incomingStockDate)}</div>}\n                    </div>\n                );\n            }\n            else {\n                if (incomingStockDate) {\n                    return (\n                        <div className=\"stock-indicator incoming-stock\">Incoming {FormatIncomingDate(incomingStockDate)}</div>\n                    );\n                }\n                else {\n                    return (\n                        <div className=\"stock-indicator out-of-stock\">Out of stock</div>\n                    );\n                }\n            }\n        }\n\n        const remainingStock = remainingOptionStock !== undefined && remainingOptionStock !== optionGroupStock ? FormatAmount(RoundStockNumber(remainingOptionStock)) : null;\n\n        if (indicators) {\n            if (!product?.allowOverselling) {\n                if (optionGroupStock > 0 && optionGroupStock < 4) {\n                    return (\n                        <div className=\"stock-indicator stock-warning\">{remainingStock !== null && (remainingStock + \" of \")}{FormatAmount(RoundStockNumber(optionGroupStock))} left in stock</div>\n                    );\n                } else if (optionGroupStock < 11) {\n                    return (\n                        <div className=\"stock-indicator stock-warning\">Low stock</div>\n                    );\n                }\n            }\n\n            return (\n                <div className=\"stock-indicator\">{optionGroupStock <= 0 && identity.moduleSettings?.oversellStockIndicator ? identity.moduleSettings.oversellStockIndicator : 'Available'}</div>\n            );\n        }\n        else {\n            return (\n                <div className=\"stock-indicator\">{remainingStock !== null && (remainingStock + \" of \")}{FormatAmount(RoundStockNumber(optionGroupStock))} Available</div>\n            );\n        }\n    }    \n}\n\nconst MapStateToProps = (state: { identityReducer: any; }) => ({\n    identity: state.identityReducer\n});\n\nexport default connect(MapStateToProps, {})(StockIndicator);","import React, { Component } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentState {\n    strokeColor: string;\n}\n\nclass ArrowRightIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            strokeColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() { \n        const {strokeColor} = this.state;\n        \n        const cls1 = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Go</title>\n                <path d=\"M18 12L29 24L18 36\" style={cls1} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            </svg>\n        );\n    }\n}\n \nexport default ArrowRightIcon;","import * as React from 'react';\nimport { connect } from \"react-redux\";\n\nimport './Styles/_ProductPromotionsBanner.scss';\n\ninterface IProductPromotionsBannerProps{\n    productListViewStyle : string;\n    OpenAction: (e: any) => void;\n}\n\nconst ProductPromotionsBanner : React.FC<IProductPromotionsBannerProps> = ({productListViewStyle, OpenAction}) => {\n    return (\n        <span data-testid=\"promotion-banner\" className={[\"promotion-tile\", productListViewStyle && productListViewStyle === \"list-view\" ? \" list-view\" : \"\"].join('')} \n            onClick={(e) => {OpenAction(e)}}>\n            Promo\n        </span>\n    )\n}\n\nconst MapStateToProps = (state: {\n    productListReducer: any;\n  }) => ({\n    productListViewStyle: state.productListReducer?.productListViewStyle\n});\n\nexport default connect(MapStateToProps, {\n})(ProductPromotionsBanner);","import React, { Component, SyntheticEvent } from \"react\";\nimport Image from \"../../Global/Image\";\nimport { GetProductImageUrl } from \"../../../Utils/ProductsHelper\";\nimport ProductPrice from \"../../../Components/PageElements/Products/ProductPrice\";\nimport DynamicTitleSection from \"../../../Components/PageElements/DynamicTitleSection\";\nimport StockIndicator from \"./StockIndicator\";\nimport ArrowRightIcon from \"../../../Images/Icons/Products/ArrowRightIcon\";\nimport ProductPromotionsBanner from \"./ProductPromotionsBanner\";\n\nimport \"./Styles/_ProductTile.scss\";\n\ninterface componentProps {\n    product: any;\n    OpenAction: (e: SyntheticEvent, productId: number | null) => void;\n}\n\nclass ProductTile extends Component<componentProps, {}> {\n    render() {\n        const { product, OpenAction } = this.props;\n\n        let productImageUrl = GetProductImageUrl(product.image);\n\n        if (product.images && product.images.length > 0) {\n            productImageUrl = GetProductImageUrl(product.images[0].medium);\n        }\n\n        return (\n            <div className=\"product-tile\" key={product.id}>\n                <div className=\"product-tile-inner\">\n                    {product.hasPromotions && (\n                        <ProductPromotionsBanner OpenAction={(e: any) => OpenAction(e, product.id)} />\n                    )}\n                    <div\n                        id={`product-${product.id}`}\n                        className=\"product-link\"\n                        onClick={(e) => {\n                            OpenAction(e, product.id);\n                        }}\n                    >\n                        <div className=\"product-image-container\">\n                            <Image imagePath={productImageUrl} altText={`${product.styleCode}`} />\n                        </div>\n                        <div className=\"product-detail-container\">\n                            <section>\n                                <div className=\"product-title\">\n                                    <DynamicTitleSection title={product.name} />\n                                </div>\n                                <div className=\"product-code\">{product.styleCode}</div>\n                                <div className=\"product-price\">\n                                    <ProductPrice product={product} />\n                                </div>\n                            </section>\n                            <div className=\"product-stock-option-container\">\n                                <StockIndicator product={product} />\n                                <div className=\"product-options\">{product.hasMultipleOptions && \"More Options\"}</div>\n                            </div>\n                        </div>\n                        <div className=\"product-action-container\">\n                            <div className=\"product-arrow-right\">\n                                <ArrowRightIcon strokeColor=\"#808081\" />\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default ProductTile;\n","import React, { SyntheticEvent, useEffect, useState } from \"react\";\nimport InfiniteScroll from \"react-infinite-scroll-component\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { ProductsListPageContent } from \"../../../Language/Default_Settings\";\nimport Loading from \"../../Global/Loading\";\nimport Cin7ConfirmationBox from \"../Cin7ConfirmationBox\";\nimport ProductTile from \"./ProductTile\";\nimport { GetProductsList } from \"../../../Redux/Actions/ProductListActions\";\nimport { RootState } from \"../../..\";\nimport { useCurrentCategory } from \"../../../Utils/CategoriesHelper\";\n\nimport \"./Styles/_ProductsListItems.scss\";\n\ntype Props = {\n    searchParameter: string;\n    setProductDetailId: (e: SyntheticEvent, id: number | null) => void;\n};\n\nconst ProductsListItems = (props: Props) => {\n    const dispatch = useDispatch();\n    const auth = useSelector((state: RootState) => state.authReducer);\n    const productsList = useSelector((state: RootState) => state.productListReducer);\n    const category = useCurrentCategory();\n    const [currentPage, setCurrentPage] = useState(1);\n    const [hasMore, setHasMore] = useState(false);\n\n    // Page number must reset if category or brand filter changes\n    useEffect(() => {\n        setCurrentPage(1);\n    }, [category.id, setCurrentPage, productsList.filter.brandIds]);\n\n    useEffect(() => {\n        setHasMore(productsList.serviceHasMore);\n    }, [productsList.serviceHasMore]);\n\n    const loadMore = (e?: React.SyntheticEvent) => {\n        e?.preventDefault();\n        if (hasMore && !productsList.isFetchingProducts) {\n            dispatch(\n                GetProductsList(auth.subscribedToken, currentPage + 1, props.searchParameter, {\n                    brandIds: productsList.filter.brandIds,\n                    categoryIds: productsList.filter.categoryIds,\n                })\n            );\n            setCurrentPage(currentPage + 1);\n        }\n    };\n\n    if (productsList.message) {\n        return productsList.message ? (\n            <Cin7ConfirmationBox boxType={\"error-box\"} boxIcon={\"error-icon\"} boxMessage={productsList.message} />\n        ) : null;\n    }\n\n    const ProductList = () => {\n        if (!productsList.isFetchingProducts && productsList.products.length === 0) {\n            return <div className=\"no-results-panel\">{ProductsListPageContent.default_noResultsLabel}</div>;\n        } else {\n            let sortedList = productsList.products;\n            return (\n                <div className={`products-list-body ${productsList.productListViewStyle}`}>\n                    {sortedList.map((product: any) => (\n                        <ProductTile key={product.id} product={product} OpenAction={props.setProductDetailId} />\n                    ))}\n                </div>\n            );\n        }\n    };\n\n    const InfiniteScrollLoader = () => {\n        if (currentPage === 1) {\n            return null;\n        } else {\n            return <Loading inLine={true} />;\n        }\n    };\n\n    const InfiniteScrollResults = () => {\n        if (currentPage === 1 && productsList.isFetchingProducts) {\n            return (\n                <div className=\"products-loading-container\">\n                    <Loading />\n                </div>\n            );\n        } else {\n            return (\n                <InfiniteScroll\n                    className={`products-list ${productsList.productListViewStyle}`}\n                    dataLength={productsList.products.length}\n                    next={loadMore}\n                    hasMore={hasMore}\n                    loader={productsList.isFetchingProducts && <InfiniteScrollLoader />}\n                    scrollableTarget={\"contain\"}\n                >\n                    <ProductList />\n                </InfiniteScroll>\n            );\n        }\n    };\n\n    return (\n        <div id=\"Products-List-Items\">\n            <div className=\"products-list-filter-container\">\n                <InfiniteScrollResults />\n            </div>\n            {productsList.serviceHasMore && !productsList.isFetchingProducts && productsList.products.length >= 24 && (\n                <div className=\"load-more-button\">\n                    <div className=\"grey-button btn btn-secondary\" onClick={(e) => loadMore(e)}>\n                        Load More\n                    </div>\n                </div>\n            )}\n        </div>\n    );\n};\nexport default ProductsListItems;\n","import * as types from './../Types/ProductDetailsTypes';\nimport { RefreshUserToken } from './../Actions/AuthActions';\nimport APIHost from './../../APIHost';\nimport axios from 'axios';\nimport ApiUtil from '../../Utils/ApiUtil';\n\nconst host = new APIHost();\nconst apiUtil = new ApiUtil();\n\nexport const GetProductDetails = (token: string, productId: number) => (dispatch: any, getState: any) => {\n    var headers = apiUtil.DefaultHeaders(token);\n\n    if (headers === null) {\n        return;\n    }\n\n    dispatch({\n        type: types.Fetching_Product_Details\n    });\n\n    const postBody = {\n        moduleId: apiUtil.GetModuleId(),\n        id: productId\n    };\n    \n    axios.post(host.ProductsAPI(\"GetProductDetails\"), postBody, headers).then(res => {\n             dispatch({\n            type: types.Fetch_Product_Details,\n            payload: {\n                product: res.data.product\n            }\n        });\n    }).catch((error) => {\n        if (error.response) {\n            let errorStatus = error.response.status;\n\n            switch (errorStatus) {\n                case 404:\n                    dispatch({\n                        type: types.Fetch_Product_Error,\n                        payload: {\n                            message: 'This product is no longer available.',\n                            productNotFound: true\n                        }\n                    });\n                    break;\n                case 401:\n                    dispatch({\n                        type: types.Fetch_Product_Error,\n                        payload: {\n                            message: ''\n                        }\n                    });\n                    dispatch(RefreshUserToken());\n                    break;                \n                default:\n                    dispatch({\n                        type: types.Fetch_Product_Error,\n                        payload: {\n                            message: error.message\n                        }\n                    });\n                    break;\n            }\n        } else {\n            dispatch({\n                type: types.Fetch_Product_Error,\n                payload: {\n                    message: error.message\n                }\n            });\n        }\n    });\n}\n\nexport const ShowProductDetailsModal = (dispatch: any) => {\n    dispatch({\n        type: types.Show_Product_Details_Modal\n    });\n}\n\n\nexport const HideProductDetailsModal = (dispatch: any) => {\n    dispatch({\n        type: types.Hide_Product_Details_Modal\n    });\n}\n\nexport const ShowProductDetails = (productId: number) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Product_Id_To_Load,\n        payload: productId\n    });\n    ShowProductDetailsModal(dispatch);\n}\n","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass CaretDownIcon extends Component<componentProps,componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            strokeColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() {\n\n        const { strokeColor } = this.state;\n        \n        const cls1: CSSProperties = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>More</title>\n                <path d=\"M8 10L12 14.5L16 10\" style={cls1} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n            </svg>\n\n        )\n    }\n}\n\nexport default CaretDownIcon;","import React, { Component, SyntheticEvent } from 'react';\nimport {RouteComponentProps} from 'react-router-dom'\nimport { withRouter } from 'react-router';\n\nimport CaretDownIcon from '../../Images/Icons/Global/CaretDownIcon';\n\nimport './Styles/_MoreActionsDropdown.scss';\n\ninterface componentProps extends RouteComponentProps<any> {\n    actions: {\n        name: string;\n        action: (e: SyntheticEvent) => void;\n    }[]\n}\n\ninterface componentState {\n    dropdownOpen: boolean;\n}\n\nclass MoreActionsDropdown extends Component<componentProps,componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            dropdownOpen: false\n        };\n    }\n\n    render() {\n        const { dropdownOpen } = this.state;\n        const { actions } = this.props;\n\n        if (actions) {\n            return (\n                <div className=\"actions-menu\">\n                    <div className=\"actions-icon-container\">\n                        <div className=\"actions-icon\" onClick={this._toggleActionsMenu}>More <CaretDownIcon strokeColor=\"#393939\" /></div>\n                    </div>\n                    {dropdownOpen &&\n                        <>\n                            <div className=\"dropdown-cover\" onClick={this._closeMenu}></div>\n                            <div className=\"dropdown-menu-body\">\n                                {actions.map(\n                                    (action: any) => <button onClick={(ev) => this._runAction(action.action, ev)} key={action.name}>{action.name}</button>\n                                )}\n                            </div>\n                        </>\n                    }\n                </div>\n            );\n        }\n        else {\n            return <div className=\"actions-menu no-actions\"></div>;\n        }\n    }\n\n    _runAction = (action: any, e: SyntheticEvent) => {\n        e.preventDefault();\n        action(e);\n        this._closeMenu();\n    }\n\n    _closeMenu = () => {\n        this.setState({\n            dropdownOpen: false\n        });\n    }\n\n    _toggleActionsMenu = (e: SyntheticEvent) => {\n        e.preventDefault();\n\n        this.setState(prevState => ({\n            dropdownOpen: !prevState.dropdownOpen\n        }));\n    }\n    \n}\n\nexport default withRouter(MoreActionsDropdown);","import React, { Component } from \"react\";\nimport MoreActionsDropdown from \"./MoreActionsDropdown\";\n\nimport \"./Styles/_MoreActionsPanel.scss\";\n\ninterface componentProps {\n    actions?: any;\n}\n\nclass MoreActionsPanel extends Component<componentProps> {\n    render() {\n        const { actions } = this.props;\n\n        return (\n            <>\n                <div id=\"Global-Return-Panel\">\n                    <MoreActionsDropdown actions={actions} />\n                </div>\n            </>\n        );\n    }\n}\n\nexport default MoreActionsPanel;\n","import React, {Component} from 'react';\nimport StockIndicator from './StockIndicator';\nimport './Styles/_ProductInfoCard.scss';\n\ninterface componentProps {\n    product: any;\n}\n \ninterface componentState {}\n \nclass ProductInfoCard extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {}\n    }\n\n    render() {\n        const { product } = this.props;\n\n        if(!product) {\n            return <></>\n        }\n\n        return (\n            <div id=\"Product-Info-Card\">\n                {product?.brand && product.brand !== \"0\" &&\n                <div className=\"product-info-row\">\n                    <div className=\"product-info-brand\">{product.brand}</div>\n                </div>}\n                <div className=\"product-info-row\">\n                    <div className=\"product-info-name\">{product.name}</div>\n                </div>\n                <div className=\"product-info-row\">\n                    {product.styleCode && <div className=\"product-info-sku\">{product.styleCode} -&nbsp;</div>}\n                    <StockIndicator product={product} />\n                </div>\n            </div>\n        );\n    }\n}\n \nexport default ProductInfoCard;","import React, { Component } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentState {\n    strokeColor: string;\n}\n\nclass CloseIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            strokeColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if (this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n    \n    render() {\n        const { strokeColor } = this.state;\n        \n        const cls1 = {\n            stroke: strokeColor\n        }\n        \n        return (\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Close</title>\n                <path d=\"M16 8L8 16\" style={cls1} strokeLinecap=\"round\"/>\n                <path d=\"M16 16L8 8\" style={cls1} strokeLinecap=\"round\"/>\n            </svg>\n        );\n    }\n}\n \nexport default CloseIcon;","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    circleOpacity?: number;\n    fillColorCirlce?: string;\n    fillColorArrow?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass NextArrowIcon extends Component<componentProps,componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            circleOpacity: .703,\n            fillColorCirlce: \"#e7f3fd\",\n            fillColorArrow: \"#373839\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColorCirlce) {\n            this.setState({\n                fillColorCirlce: this.props.fillColorCirlce\n            });\n        }\n\n        if(this.props.fillColorArrow) {\n            this.setState({\n                fillColorArrow: this.props.fillColorArrow\n            })\n        }\n\n        if(this.props.circleOpacity) {\n            this.setState({\n                circleOpacity: this.props.circleOpacity\n            })\n        }\n    }\n\n    render() {\n\n        const { fillColorCirlce, fillColorArrow, circleOpacity } = this.state;\n        \n        const cls1: CSSProperties = {\n            fill: fillColorCirlce,\n            opacity: circleOpacity\n        }\n\n        const cls2: CSSProperties = {\n            fill: fillColorArrow\n        }\n\n        return (\n            <svg xmlns=\"https://www.w3.org/2000/svg\" id=\"Group_11059\" width=\"50\" height=\"50\" data-name=\"Group 11059\" viewBox=\"0 0 50 50\">\n                <title>Next</title>\n                <circle id=\"Ellipse_32\" cx=\"25\" cy=\"25\" r=\"25\" style={cls1} data-name=\"Ellipse 32\"/>\n                <path id=\"Path_5549\" d=\"M1314.772-44.2a1.056 1.056 0 0 1 1.492-.008l12.555 12.405-12.555 12.4a1.055 1.055 0 0 1-.743.3 1.053 1.053 0 0 1-.749-.313 1.055 1.055 0 0 1 .007-1.492l11.037-10.9-11.037-10.9a1.055 1.055 0 0 1-.007-1.492z\" style={cls2} data-name=\"Path 5549\" transform=\"translate(-1294.607 56.807)\"/>\n            </svg>\n\n        )\n    }\n}\n\nexport default NextArrowIcon;","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    circleOpacity?: number;\n    fillColorCirlce?: string;\n    fillColorArrow?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass PrevArrowIcon extends Component<componentProps,componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            circleOpacity: .703,\n            fillColorCirlce: \"#e7f3fd\",\n            fillColorArrow: \"#373839\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColorCirlce) {\n            this.setState({\n                fillColorCirlce: this.props.fillColorCirlce\n            });\n        }\n\n        if(this.props.fillColorArrow) {\n            this.setState({\n                fillColorArrow: this.props.fillColorArrow\n            })\n        }\n\n        if(this.props.circleOpacity) {\n            this.setState({\n                circleOpacity: this.props.circleOpacity\n            })\n        }\n    }\n\n    render() {\n\n        const { fillColorCirlce, fillColorArrow, circleOpacity } = this.state;\n        \n        const cls1: CSSProperties = {\n            fill: fillColorCirlce,\n            opacity: circleOpacity\n        }\n\n        const cls2: CSSProperties = {\n            fill: fillColorArrow\n        }\n\n        return (\n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"50\" height=\"50\" viewBox=\"0 0 50 50\">\n                <title>Previous</title>\n                <g id=\"Group_11061\" data-name=\"Group 11061\" transform=\"translate(-25 -548)\">\n                    <circle id=\"Ellipse_32\" cx=\"25\" cy=\"25\" r=\"25\" style={cls1} data-name=\"Ellipse 32\" transform=\"translate(25 548)\"/>\n                    <path id=\"Path_5549\" d=\"M1328.513-44.2a1.056 1.056 0 0 0-1.492-.008l-12.555 12.405 12.555 12.4a1.055 1.055 0 0 0 .743.3 1.053 1.053 0 0 0 .749-.313 1.055 1.055 0 0 0-.007-1.492l-11.037-10.9 11.037-10.9a1.055 1.055 0 0 0 .007-1.492z\" style={cls2} data-name=\"Path 5549\" transform=\"translate(-1273.678 604.807)\"/>\n                </g>\n            </svg>\n        )\n    }\n}\n\nexport default PrevArrowIcon;","import React, {Component, SyntheticEvent} from 'react';\nimport CloseIcon from '../../../Images/Icons/Global/CloseIcon';\nimport NextArrowIcon from '../../../Images/Icons/NavigationIcons/NextArrowIcon';\nimport PrevArrowIcon from '../../../Images/Icons/NavigationIcons/PrevArrowIcon';\nimport Image from '../../Global/Image';\nimport { GetProductImageUrl } from '../../../Utils/ProductsHelper';\n\nimport './Styles/_ProductGalleryModal.scss';\n\ninterface componentProps {\n    _props: {\n    closeModal: () => void,\n    prevImageClick: (e: SyntheticEvent) => void,\n    prevImage: () => void,\n    nextImageClick: (e: SyntheticEvent) => void,\n    nextImage: () => void,\n    galleryImages: any[],\n    currentImage: number,\n    }\n}\n \ninterface componentState {\n    totalImages: number;\n    galleryIndex: number;\n}\n\nclass ProductGalleryModal extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            totalImages: 0,\n            galleryIndex: this.props._props.currentImage\n        };\n        this._handleKeyPress = this._handleKeyPress.bind(this);\n    }\n\n    componentDidMount() {\n        if (this.props._props.galleryImages) {\n            this.setState({\n                totalImages: this.props._props.galleryImages.length - 1\n            });\n        }\n        document.addEventListener(\"keydown\", this._handleKeyPress, false);\n    }\n\n    componentWillUnmount() {\n        document.removeEventListener(\"keydown\", this._handleKeyPress, false);\n    }\n\n    render() {\n\n        const { _props } = this.props;\n        const { totalImages } = this.state;\n        \n        const renderGalleryOptions = _props.galleryImages.map((item: any, index: number) => {\n            let productImageUrl = GetProductImageUrl(item.full);\n            return (\n                <div className={`gallery-image-modal ${index === _props.currentImage ? \"active\" : \"inactive\"}`} key={index} index-item={index}>\n                    <Image imagePath={productImageUrl} altText={`product-${index}`} />\n                </div>\n            );\n        });\n        \n        return (\n            <>\n                <div id=\"Product-Gallery-Modal\">\n                    <div className=\"modal-overlay\" onClick={_props.closeModal}></div>\n                    <div className=\"gallery-container\">\n                        <div className=\"gallery-close-container\" onClick={_props.closeModal}>\n                            <CloseIcon strokeColor={'#fff'} />\n                        </div>\n                        <div id=\"Product-Gallery-View\" className=\"gallery-list-content\">\n                            {renderGalleryOptions}\n                        </div>\n                        {_props.currentImage < totalImages && <div className=\"next-image\" onClick={_props.nextImageClick}>\n                            <NextArrowIcon />\n                        </div>}\n                        {_props.currentImage !== 0 && <div className=\"prev-image\" onClick={_props.prevImageClick}>\n                            <PrevArrowIcon />\n                        </div>}\n                    </div>\n                </div>\n            </>\n        );\n    }\n\n    _handleKeyPress = (event: KeyboardEvent) => {\n        if (event.code === \"Escape\") {\n            this.props._props.closeModal();\n        }\n        else if (event.code === \"ArrowLeft\") {\n            this.props._props.prevImage();\n        }\n        else if (event.code === \"ArrowRight\") {\n            this.props._props.nextImage();\n        }\n    }\n}\n\nexport default ProductGalleryModal;\n","import React, {Component, SyntheticEvent} from 'react';\nimport ProductGalleryModal from './ProductGalleryModal';\nimport { GetProductImageUrl } from '../../../Utils/ProductsHelper';\nimport Image from '../../Global/Image';\nimport NextArrowIcon from '../../../Images/Icons/NavigationIcons/NextArrowIcon';\nimport PrevArrowIcon from '../../../Images/Icons/NavigationIcons/PrevArrowIcon';\n\n//Styles\nimport './Styles/_ProductGallery.scss';\n\ninterface componentProps {\n    productImages: any[];\n}\n \ninterface componentState {\n    imagePath: string;\n    activeModal: boolean;\n    selectedImage: number;\n}\n \nclass ProductGallery  extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            imagePath: \"\",\n            activeModal: false,\n            selectedImage: 0\n        };\n    }\n\n    componentDidMount(){\n        if(this.props.productImages.length > 0) {\n            let imageUrl = GetProductImageUrl(this.props.productImages[0].full);\n\n            this.setState({\n                imagePath: imageUrl\n            });\n        }\n    }\n    \n    render() { \n\n        const {productImages} = this.props;\n        const { imagePath, activeModal, selectedImage } = this.state;\n        const totalImages = productImages.length - 1;\n\n        const productOptions = productImages.map((item: any, index: number) => {\n            let imageIndex = index + 1;\n            let productThumbImageUrl = GetProductImageUrl(item.thumbnail);\n            let productImageUrl = GetProductImageUrl(item.full);\n\n            return (\n                <div id=\"productImages\" className={`product-options view-${imageIndex} ${index === 0 ? \"active\" : \"inactive\"}`} image-index={index} key={index} onClick={(e) => {this._switchImageView(e, productImageUrl)}}>\n                    {<Image imagePath={productThumbImageUrl} altText={`product-${index}`} />}\n                </div>\n            )\n        });\n\n        const galleryModalProps = { \n            closeModal: this._toggleGalleryView,\n            prevImageClick: this._prevImageClick,\n            prevImage: this._prevImage,\n            nextImageClick: this._nextImageClick,\n            nextImage: this._nextImage,\n            galleryImages: productImages,\n            currentImage: selectedImage,\n        }\n\n        if (window.innerWidth > 768) {\n            return ( \n                <div className=\"product-details-gallery\">\n                    <div id=\"Product-Gallery-Main\" className=\"product-main-image\">\n                        <div id=\"Main-Image-View\" onClick={this._toggleGalleryViewClick}>\n                            <Image imagePath={imagePath} altText={`main-product-view`} />\n                        </div>\n                    </div>\n                    <div id=\"Product-Gallery-Options\" className={`product-variant-images ${productImages.length <= 2 ? \"left-align\" : \"default\"}`}>\n                        {productOptions}\n                    </div>\n                    {activeModal && <ProductGalleryModal _props={galleryModalProps} />}\n                </div>\n            );\n        }\n        else {\n            return ( \n                <div className=\"product-details-gallery\">\n                    <div id=\"Product-Gallery-Main\" className=\"product-main-image\">\n\n                        <div className=\"prev-image\" onClick={this._prevImageClick}>\n                            {selectedImage !== 0 && <PrevArrowIcon />}\n                        </div>\n                        <div id=\"Main-Image-View\" onClick={this._toggleGalleryViewClick}>\n                            <Image imagePath={imagePath} altText={`main-product-view`} />\n                        </div>\n                        <div className=\"next-image\" onClick={this._nextImageClick}>\n                            {selectedImage < totalImages && <NextArrowIcon />}\n                        </div>\n                        <div id=\"Product-Gallery-Options-Mobile\">\n                            {productOptions}\n                        </div>\n                    </div>\n                    {activeModal && <ProductGalleryModal _props={galleryModalProps} />}\n                </div>\n            );\n         }\n    }\n\n    _switchImageView = (e:SyntheticEvent, productImage:string) => {\n        e.preventDefault();\n        let clickedSrcImage = productImage;\n        let currentIndex = e.currentTarget.getAttribute('image-index');\n        let thumbnailElements = document.querySelectorAll('.product-options.active');\n\n        if(thumbnailElements) {\n            thumbnailElements.forEach((item) => {\n                if(!e.currentTarget.classList.contains('active')) {\n                    item.classList.remove('active');\n                    item.classList.add('inactive');\n                }\n            });\n        }\n\n        if(clickedSrcImage && currentIndex) {\n            if(clickedSrcImage !== this.state.imagePath) {\n                this.setState({\n                    imagePath: clickedSrcImage,\n                    selectedImage: parseInt(currentIndex)\n                });\n\n                e.currentTarget.classList.remove('inactive');\n                e.currentTarget.classList.add('active');\n            }\n        }\n    }\n\n    _toggleGalleryViewClick = (e:SyntheticEvent) => {\n        e.preventDefault();\n        this._toggleGalleryView();\n    }\n\n    _toggleGalleryView = () => {\n        this.setState(prevState => ({\n            activeModal: !prevState.activeModal\n        }));\n    }\n\n    _prevImageClick = (e:SyntheticEvent) => {\n        e.preventDefault();\n        this._prevImage();\n    }\n\n    _prevImage = () => {\n        let currentIndex = this.state.selectedImage;\n\n        if(currentIndex > 0) {\n            let currentImages = document.querySelectorAll('#productImages');\n            this.setState(prevState => ({\n                selectedImage: prevState.selectedImage - 1,\n                imagePath: GetProductImageUrl(this.props.productImages[prevState.selectedImage - 1].full)\n            }));\n\n            if(currentImages) {\n                currentImages.forEach((item) => {\n                    if(item.classList.contains('active')) {\n                        item.classList.toggle('active');\n                        item.classList.toggle('inactive');\n                    }\n\n                    let imageIndex = item.getAttribute('index-item');\n\n                    if(imageIndex) {\n                        if(parseInt(imageIndex) === (currentIndex - 1)) {\n                            item.classList.toggle('active');\n                            item.classList.toggle('inactive');\n                        }\n                    }\n                })\n            }\n        }        \n    }\n\n    _nextImageClick = (e:SyntheticEvent) => {\n        e.preventDefault();\n        this._nextImage();\n    }\n\n    _nextImage = () => {\n        let currentIndex = this.state.selectedImage;\n        let currentImageCount = this.props.productImages.length-1;\n\n        if(currentIndex < currentImageCount) {\n            let currentImages = document.querySelectorAll('#productImages');\n            this.setState(prevState => ({\n                selectedImage: prevState.selectedImage + 1,\n                imagePath: GetProductImageUrl(this.props.productImages[this.state.selectedImage + 1].full)\n            }));\n\n            if(currentImages) {\n                currentImages.forEach((item) => {\n\n                    if(item.classList.contains('active')) {\n                        item.classList.toggle('active');\n                        item.classList.toggle('inactive');\n                    }\n\n                    let imageIndex = item.getAttribute('index-item');\n\n                    if(imageIndex) {\n                        if(parseInt(imageIndex) === (currentIndex + 1)) {\n                            item.classList.toggle('active');\n                            item.classList.toggle('inactive');\n                        }\n                    }\n                })\n            }\n        }        \n    }\n}\n \nexport default ProductGallery;","export const showProductDetailsModal = (state:any): boolean => {\n    return state.productDetailsReducer?.showProductDetailsModal;\n}\n\nexport const getProductDetailsId = (state: any): number => {\n    return state.productDetailsReducer?.productIdToLoad;\n}\n\nexport const getProductDetailsProductId = (state: any): number => {\n    return state.productDetailsReducer?.product?.id;\n}\n\nexport const getProductDetailsDescription = (state: any): string => {\n    return state.productDetailsReducer?.product?.description;\n}","import React, {Component} from 'react';\n\nimport './Styles/_HtmlBlock.scss';\n\ninterface componentProps {\n    content: any;\n    htmlBlock: any;\n}\n \ninterface componentState {}\n \nclass HtmlBlock extends Component<componentProps, componentState> {\n\n    rawDescription(){\n        var rawMarkup = this.props.content;\n        return { __html: rawMarkup };\n    }\n\n    render() {\n        const { content, htmlBlock } = this.props;\n\n        if (content) {\n            return (\n                <div className={htmlBlock}>\n                    {content.indexOf('</') !== -1\n                        ? (\n                            <div dangerouslySetInnerHTML={this.rawDescription()} >\n                            </div>\n                        )\n                        : content\n                    }\n                </div>\n            );\n        } else {\n            return null;\n        }\n    }\n}\n \nexport default HtmlBlock;","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { getProductDetailsDescription } from '../../../Redux/Selectors/ProductDetailsSelectors';\nimport HtmlBlock from '../../Global/HtmlBlock';\nimport './Styles/_ProductTeaser.scss';\n\nexport const ProductTeaser = () => {\n\tconst [showMore, setShowMore] = useState(false);\n    const [htmlBlock, setHtmlBlock] = useState(\"html-block--less\");\n\tconst description = useSelector(getProductDetailsDescription);\n\n    const toggleDescription = () => {\n        setHtmlBlock(showMore? \"html-block--less\" : \"html-block\");\n        setShowMore(!showMore);\n    }\n\n\n    if (description) {\n        return (\n            <div className=\"product-details-teaser\">\n                <h6>Description</h6>\n                <HtmlBlock content={description} htmlBlock={htmlBlock}/>\n                <div className=\"showMore\" onClick={toggleDescription}>\n                    {showMore ? \"Show less\" : \"Show more\"}\n                </div>\n            </div>\n        );\n    } else {\n        return (\n            <div className=\"product-details-teaser\">No description available.</div>\n        );\n    }\n}","import React, {Component} from 'react';\nimport { FormatAmount } from '../../../Utils/OrderHelper';\nimport PriceDisplay from '../../Global/PriceDisplay';\nimport { GetTotalProductOptionPrice } from '../../../Utils/ProductsHelper';\n\n//Redux\nimport { connect } from 'react-redux';\n\n//Styles\nimport './Styles/_ProductInfoCart.scss';\n\ninterface componentProps {\n    cartItems: {\n        orderItems: any;\n    };\n    productId: number;\n}\n \ninterface componentState {\n}\n \nclass ProductDetailsCart extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {}\n    }\n\n    render() {\n\n        const { cartItems, productId } = this.props;\n        const findIncrementGroupName = cartItems.orderItems.findIndex((x: {productId: number}) => x.productId === productId);\n        let totalItems = 0;\n        let totalPrice = 0;\n        let discountedPromoPrice = 0;\n        \n        if (findIncrementGroupName !== -1) {\n            totalItems = cartItems.orderItems[findIncrementGroupName].totalItems;\n            cartItems.orderItems[findIncrementGroupName].productOptions.forEach((item: any) => {\n                totalPrice += GetTotalProductOptionPrice(item);\n                discountedPromoPrice += item.lineItemDiscount > 0 ? item.lineItemDiscount : 0;\n            });\n        }\n\n        return (\n            <div className=\"product-details-cart\">\n                <div className=\"product-details-cart-container\">\n                    <span className=\"cart-label items\">Items</span>\n                    <span className=\"cart-value items\">{FormatAmount(totalItems)}</span>\n                </div>\n                {\n                    discountedPromoPrice > 0 &&\n                    <div className=\"product-details-cart-container\">\n                        <span className=\"cart-label\">Discount</span>\n                        <span className=\"cart-value discount\">{<PriceDisplay value={discountedPromoPrice} />}</span>\n                    </div>\n                }\n                <div className=\"product-details-cart-container\">\n                    <span className=\"cart-label\">Total</span>\n                    <span className=\"cart-value\">{<PriceDisplay value={totalPrice} />}</span>\n                </div>\n            </div>\n        );\n    }\n}\n\nconst MapStateToProps = (state: {orderReducer: any;}) => ({\n    cartItems: state.orderReducer\n});\n \nexport default connect(MapStateToProps)(ProductDetailsCart);","import React, { Component } from 'react';\nclass CircleDecrementIcon extends Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            fillColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColor) {\n            this.setState({\n                fillColor: this.props.fillColor\n            });\n        }\n    }\n\n    render() { \n        const {fillColor} = this.state;\n        \n        const cls1 = {\n            fill: fillColor\n        }\n\n        return (\n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 25 25\">\n                <title>Decrement</title>\n                <g id=\"Group_10968\" data-name=\"Group 10968\" transform=\"translate(-112.19 703.809)\">\n                    <rect id=\"Rectangle_3178\" data-name=\"Rectangle 3178\" width=\"14.475\" height=\"1.5\" transform=\"translate(117.452 -692.059)\" style={cls1} />\n                    <path id=\"Path_5497\" data-name=\"Path 5497\" d=\"M124.69-703.809a12.5,12.5,0,0,0-12.5,12.5,12.5,12.5,0,0,0,12.5,12.5,12.5,12.5,0,0,0,12.5-12.5A12.5,12.5,0,0,0,124.69-703.809Zm0,23.5a11.012,11.012,0,0,1-11-11,11.012,11.012,0,0,1,11-11,11.013,11.013,0,0,1,11,11A11.013,11.013,0,0,1,124.69-680.309Z\" style={cls1} />\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default CircleDecrementIcon;","import React, { Component } from 'react';\nclass CircleIncrementIcon extends Component {\n    constructor(props) {\n        super(props);\n        this.state = {\n            fillColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColor) {\n            this.setState({\n                fillColor: this.props.fillColor\n            });\n        }\n    }\n\n    render() { \n        const {fillColor} = this.state;\n        \n        const cls1 = {\n            fill: fillColor\n        }\n\n        return (\n            <svg xmlns=\"https://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 25 25\">\n                <title>Increment</title>\n                <g id=\"Group_10967\" data-name=\"Group 10967\" transform=\"translate(-149.19 703.809)\">\n                    <path id=\"Path_5495\" data-name=\"Path 5495\" d=\"M162.44-698.546h-1.5v6.487h-6.487v1.5h6.487v6.488h1.5v-6.488h6.488v-1.5H162.44Z\" style={cls1} />\n                    <path id=\"Path_5496\" data-name=\"Path 5496\" d=\"M161.69-703.809a12.5,12.5,0,0,0-12.5,12.5,12.5,12.5,0,0,0,12.5,12.5,12.5,12.5,0,0,0,12.5-12.5A12.5,12.5,0,0,0,161.69-703.809Zm0,23.5a11.012,11.012,0,0,1-11-11,11.012,11.012,0,0,1,11-11,11.013,11.013,0,0,1,11,11A11.013,11.013,0,0,1,161.69-680.309Z\" style={cls1} />\n                </g>\n            </svg>\n         );\n    }\n}\n \nexport default CircleIncrementIcon;","import React, { Component, SyntheticEvent, ChangeEvent } from 'react';\nimport { connect } from 'react-redux';\nimport { IncrementOrderQuantity, DecrementOrderQuantity, SetOrderQuantity, CalculatePromotions } from '../../../Redux/Actions/OrderActions';\nimport { FormatAmount, UndoFormatAmount } from '../../../Utils/OrderHelper';\n\n// Images\nimport CircleDecrementIcon from '../../../Images/Icons/CircleDecrementIcon';\nimport CircleIncrementIcon from '../../../Images/Icons/CircleIncrementIcon';\n\nimport './Styles/_ProductOptionQuantity.scss';\n\ninterface componentProps {\n    order: {\n        orderItems: any[];\n    };\n    option: any;\n    product: any;\n    tabIndex?: number;\n    IncrementOrderQuantity: (productOption: any, product: any) => void;\n    DecrementOrderQuantity: (productOption: any, product: any) => void;\n    SetOrderQuantity: (productOption: any, product: any, quantity: number) => void;\n    CalculatePromotions: () => void;\n}\n \ninterface componentState {\n    allowOverselling: boolean;\n    quantity: number;\n    hasFocus: boolean;\n}\n\nconst remainingStock = (product: any, option: any, orderItems: any) => {\n    let remaining: number = option.stock;\n\n    if (option.uomId) {\n        remaining = Math.floor(option.stock / option.uomSize);\n    }\n\n    const childItemProductInCart = orderItems.find((item: any) => item.productId === product.id);\n\n    if (childItemProductInCart) {\n\n        const childItemsInCart = childItemProductInCart.productOptions.filter((itemOption: any) => itemOption.optionId === option.optionId);\n\n        if (childItemsInCart) {\n\n            let normalQuantity = childItemsInCart.reduce((counter: number, item: any) => {\n                return counter += item.uomId ? item.productQuantity * item.uomSize : item.productQuantity;\n            }, 0);\n\n            if (option.uomId) {\n                remaining = Math.floor((option.stock - normalQuantity) / option.uomSize);\n            }\n            else {\n                remaining -= normalQuantity;\n            }\n        }\n    }\n\n    return remaining;\n}\n\nclass ProductOptionQuantity extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            allowOverselling: this.props.product.allowOverselling ?? true,\n            quantity: this.getCartQuantity(),\n            hasFocus: false\n        };\n    }\n\n    getCartQuantity() {\n        const { option, product } = this.props;\n        const { orderItems } = this.props.order;\n        let findIncrementGroupName = orderItems.findIndex((x: {productId: number}) => x.productId === product.id);\n\n        if (findIncrementGroupName !== -1) {\n\n            let orderProduct = orderItems[findIncrementGroupName].productOptions.findIndex((x: { optionId: number, sizeId: number, uomId: number }) => x.optionId === option.optionId && x.sizeId === option.sizeId && x.uomId === option.uomId);\n            if (orderProduct !== -1) {\n                return orderItems[findIncrementGroupName].productOptions[orderProduct].productQuantity\n            }\n        }  \n\n        return 0;\n    }\n\n    getMaxQuantity() {\n        const { option, product } = this.props;\n        const { orderItems } = this.props.order;\n        \n        if (option.stock) {\n            if (option.sizeId) {\n                return option.stock;\n            }\n            else {\n                return  this.getCartQuantity() + remainingStock(product, option, orderItems);\n            }\n        }\n        else {\n            return 0;\n        }\n    }\n\n    updateQuantity() {\n        this.setState({ quantity: this.getCartQuantity() });\n    }\n\n    setFocus(hasFocus: boolean) {\n        this.setState({hasFocus});\n    }\n    \n    render() {\n        const { tabIndex } = this.props;\n        const { allowOverselling, hasFocus, quantity: internalQuantity } = this.state;\n        const quantity = hasFocus ? internalQuantity : this.getCartQuantity();\n\n        let maxQuantity = this.getMaxQuantity();\n\n        return (\n            <div className=\"option-details-inner-child-actions\">\n                <button className=\"option-quantity-actions option-quantity-decrement\" disabled={quantity <= 0} onClick={this._decrementQuantity}><CircleDecrementIcon fillColor='#4E4F4F' /></button>\n                <input className=\"option-quantity\" pattern=\"[0-9,]{0,9}\" value={quantity ? FormatAmount(quantity) : 0} onChange={(e) => this._updateQuantity(e, this._inputQuantity)} tabIndex={tabIndex} onFocus={() => {this.setFocus(true); this.updateQuantity()}} onBlur={(e) => {this.setFocus(false); this._updateQuantity(e, this._updateInputQuantity)}} />\n                <button className=\"option-quantity-actions option-quantity-increment\" disabled={allowOverselling ? false : quantity >= Math.floor(maxQuantity)} onClick={this._incrementQuantity}><CircleIncrementIcon fillColor='#4E4F4F' /></button>\n            </div>\n        );\n    }\n\n    _incrementQuantity = (e: SyntheticEvent) => {\n        e.preventDefault();\n        const quantity = this.getCartQuantity();\n\n        if (quantity >= 9999999) {\n            return;\n        }\n\n        this.props.IncrementOrderQuantity(this.props.option, this.props.product);\n        this.props.CalculatePromotions();\n    }\n\n    _decrementQuantity = (e: SyntheticEvent) => {\n        e.preventDefault();\n        const quantity = this.getCartQuantity();\n\n        if (quantity <= 0) {\n            return;\n        }\n\n        this.props.DecrementOrderQuantity(this.props.option, this.props.product);\n        this.props.CalculatePromotions();\n    }\n\n    _updateQuantity = (e: ChangeEvent<HTMLInputElement>, updateState: (quantity: number) => void) => {\n        e.preventDefault();\n\n        let currentQuantity = UndoFormatAmount(e.target.value);\n\n        if (Number(currentQuantity) > 9999999) {\n            return;\n        }\n\n        if (Number(currentQuantity) < 0) {\n            e.target.value = \"0\";\n            return;\n        }\n\n        let maxQuantity = this.getMaxQuantity();\n\n        if (!this.state.allowOverselling && currentQuantity > maxQuantity) {\n            currentQuantity = maxQuantity > 0 ? maxQuantity : 0;\n        }\n\n        updateState(Number(currentQuantity));\n    }\n\n    _inputQuantity = (quantity: number) => {\n\n        this.setState({\n            quantity: quantity | 0\n        });\n    }\n\n    _updateInputQuantity = (quantity: number) => {\n\n        this.props.SetOrderQuantity(this.props.option, this.props.product, quantity);\n        this.props.CalculatePromotions();\n    }\n}\n\nconst MapStateToProps = (state: { orderReducer: any }) => ({\n    order: state.orderReducer\n});\n\nexport default connect(MapStateToProps, {IncrementOrderQuantity,DecrementOrderQuantity,SetOrderQuantity,CalculatePromotions})(ProductOptionQuantity);","import { OrderItemNote } from \"../Reducers/App_Reducers/OrderReducer\";\n\nexport const getStockCount = (optionId: number, productId: number, sizeId: number) => (state:any) => {\n    state.productDetailsReducer?.product.find((orderItemNote: OrderItemNote) => orderItemNote.optionId === optionId && orderItemNote.productId === productId);\n}\n\nexport const getProductOptionsByOptionId = (options: any[], optionId: number) => () => {\n    return options.filter((option: any) => option.optionId === optionId);\n}\n\nexport const productOptionsHaveSpecial = (options: any[]) => () => {\n    return options.some((option: any) => option.specialPrice > 0);\n}\n\nexport const getOptionsMinPrice = (options: any[]) => () => {\n    return options.reduce((minPrice: number, option: any) => { return option.price < minPrice ? option.price : minPrice; }, options[0].price );\n}\n\nexport const getOptionsMaxPrice = (options: any[]) => () => {\n    return options.reduce((maxPrice: number, option: any) => { return option.price > maxPrice ? option.price : maxPrice; }, options[0].price );\n}\n\nexport const getOptionsMinSpecialPrice = (options: any[]) => () => {\n    return options.reduce((minSpecialPrice: number, option: any) => { return option.specialPrice > 0 && option.specialPrice < minSpecialPrice ? option.specialPrice : minSpecialPrice; }, options[0].specialPrice );\n}\n\nexport const getOptionsMaxSpecialPrice = (options: any[]) => () => {\n    return options.reduce((maxSpecialPrice: number, option: any) => { return option.specialPrice > maxSpecialPrice ? option.specialPrice : maxSpecialPrice; }, options[0].specialPrice );\n}\n\nexport const getIsFetchingCategories = (state: any) => state.productListReducer?.isFetchingCategories;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport {\n    getOptionsMaxPrice,\n    getOptionsMaxSpecialPrice,\n    getOptionsMinPrice,\n    getOptionsMinSpecialPrice,\n    getProductOptionsByOptionId,\n    productOptionsHaveSpecial\n} from '../../../Redux/Selectors/ProductSelectors';\nimport PriceDisplay from '../../Global/PriceDisplay';\n\nimport './Styles/_StockIndicator.scss';\n\ninterface ProductOptionPriceRangeProps {\n    product: any;\n    optionId: number;\n}\n\nconst ListPrice = (minPrice: number, maxPrice: number) => {\n\n    if (minPrice === maxPrice) {\n        return <PriceDisplay value={minPrice} />;\n    }\n    else {\n        return (\n            <>\n                <PriceDisplay value={minPrice} /> - <PriceDisplay value={maxPrice} />\n            </>\n        );\n    }\n};\n\nconst ListSpecialPrice = (minSpecialPrice: number, maxSpecialPrice: number) => {\n    if (minSpecialPrice === maxSpecialPrice) {\n        return <PriceDisplay value={minSpecialPrice} />;\n    }\n    else {\n        return (\n            <>\n                <PriceDisplay value={minSpecialPrice} /> - <PriceDisplay value={maxSpecialPrice} />\n            </>\n        );\n    }\n};\n\nexport const ProductOptionPriceRange: React.FC<ProductOptionPriceRangeProps> = (\n    props\n) => {\n    const { product, optionId } = props;\n\n    const options = useSelector(getProductOptionsByOptionId(product.options, optionId));\n    const hasSpecialPrice = useSelector(productOptionsHaveSpecial(options));\n    const minPrice = useSelector(getOptionsMinPrice(options));\n    const maxPrice = useSelector(getOptionsMaxPrice(options));\n    const minSpecialPrice = useSelector(getOptionsMinSpecialPrice(options));\n    const maxSpecialPrice = useSelector(getOptionsMaxSpecialPrice(options));\n\n    if (hasSpecialPrice) {\n        return (\n            <div className=\"product-details-price\">\n                <span className=\"special-price\">{ListSpecialPrice(minSpecialPrice, maxSpecialPrice)} <span className=\"original-price\">{ListPrice(minPrice, maxPrice)}</span></span>\n            </div>\n        );\n    } else {\n        return (\n            <div className=\"product-details-price\">\n                {ListPrice(minPrice, maxPrice)}\n            </div>\n        );\n    }\n}\n\nexport default ProductOptionPriceRange;\n","import React, {Component} from 'react';\nimport PriceDisplay from '../../Global/PriceDisplay';\nimport { connect } from 'react-redux';\n\nimport './Styles/_ProductOptionPrice.scss';\nimport { ProductDetailsOption } from '../../../Redux/Reducers/App_Reducers/ProductDetailsReducer';\n\ntype ProductDetailsReducerProduct = {\n    minRangeContractPrice: number;\n    maxRangeContractPrice: number;\n}\n\ninterface componentProps {\n    option: ProductDetailsOption;\n    forceHideSpecialPrice?: boolean;\n    hidePriceWhileFetchingPromotionCalculations: boolean;\n    productDetailsReducerProduct: ProductDetailsReducerProduct;\n}\n \ninterface componentState {}\n \nclass ProductOptionPrice extends Component<componentProps, componentState> {\n\n    static defaultProps = {\n        forceHideSpecialPrice: false\n    }\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {};\n    }\n\n    render() {\n        const { \n            option, \n            forceHideSpecialPrice, \n            hidePriceWhileFetchingPromotionCalculations, \n            productDetailsReducerProduct \n        } = this.props;\n        const hidePriceWhenNotAddingProductDetailsReducerProductToCalcPromos = \n            !hidePriceWhileFetchingPromotionCalculations \n            && (Boolean(productDetailsReducerProduct?.minRangeContractPrice \n            && productDetailsReducerProduct?.maxRangeContractPrice) || option.contractPrice);\n        const hidePriceWhenAddingProductDetailsReducerProductToCalcPromos = \n        hidePriceWhileFetchingPromotionCalculations && \n            (Boolean(productDetailsReducerProduct?.minRangeContractPrice && productDetailsReducerProduct?.maxRangeContractPrice) \n            || option.contractPrice); \n\n        let price = option.contractPrice ? option.contractPrice : option.price;\n\n        if(option.contractPrice && option.uomSize){\n            price*= option.uomSize;\n        }\n\n        if (option.specialPrice && !forceHideSpecialPrice && !option.contractPrice) {\n            return (\n                <div className=\"product-details-option-price\">{\n                    hidePriceWhenNotAddingProductDetailsReducerProductToCalcPromos ? <></> :\n                    <><span className=\"special-price\">{<PriceDisplay value={option.specialPrice} />}</span> <span className=\"original-price\">{<PriceDisplay value={option.price} />}</span></>\n                }\n                </div>\n            );\n        } else {\n            return (\n                <div className=\"product-details-option-price\">\n                    {hidePriceWhenAddingProductDetailsReducerProductToCalcPromos ? <></> : <PriceDisplay value={price ?? 0} />}\n                </div>\n            );\n        }\n    }\n}\n\nconst MapStateToProps = (state: {orderReducer: any; productDetailsReducer : any;}) => ({\n    hidePriceWhileFetchingPromotionCalculations: state.orderReducer?.hidePriceWhileFetchingPromotionCalculations,\n    productDetailsReducerProduct: state.productDetailsReducer?.product\n});\n \nexport default connect(MapStateToProps, {})(ProductOptionPrice);","import React from 'react';\nimport { connect } from 'react-redux';\nimport StockIndicator from './StockIndicator';\n\nimport './Styles/_StockIndicator.scss';\n\ninterface UOMStockIndicatorProps {\n    product?: any;\n    productOption?: any;\n    order: {\n        orderItems: any;\n    };\n}\n\nconst remainingStock = (product: any, option: any, orderItems: any) => {\n    let remaining: number = option.stock;\n\n    if (option.uomId) {\n        remaining = Math.floor(option.stock / option.uomSize);\n    }\n\n    const childItemProductInCart = orderItems.find((item: any) => item.productId === product.id);\n\n    if (childItemProductInCart) {\n\n        const childItemsInCart = childItemProductInCart.productOptions.filter((itemOption: any) => itemOption.optionId === option.optionId);\n\n        if (childItemsInCart) {\n\n            let normalQuantity = childItemsInCart.reduce((counter: number, item: any) => {\n                return counter += item.uomId ? item.productQuantity * item.uomSize : item.productQuantity;\n            }, 0);\n\n            if (option.uomId) {\n                remaining = Math.floor((option.stock - normalQuantity) / option.uomSize);\n            }\n            else {\n                remaining -= normalQuantity;\n            }\n        }\n    }\n\n    return remaining;\n}\n\nexport const UOMStockIndicator: React.FC<UOMStockIndicatorProps> = (\n    props\n) => {\n\n    const { productOption, product } = props;\n    const { orderItems } = props.order;\n\n    const option = { ...productOption };\n\n    if (product.allowOverselling) {\n        return (\n            <StockIndicator product={product} productOption={option} />\n        );\n    }\n    else {\n        return (\n            <StockIndicator product={product} productOption={option} remainingOptionStock={remainingStock(product, option, orderItems)} />\n        );\n    }\n}\n\nconst MapStateToProps = (state: { identityReducer: any; orderReducer: any; }) => ({\n    identity: state.identityReducer,\n    order: state.orderReducer\n});\n\nexport default connect(MapStateToProps, {})(UOMStockIndicator);","import React, {Component} from 'react';\n\n//Redux\nimport { connect } from 'react-redux';\nimport { FormatAmount } from '../../../Utils/OrderHelper';\n\ninterface componentProps {\n    product: any;\n    productOptionId: number;\n    cartItems: {\n        orderItems: any;\n    }\n}\n\ninterface componentState {}\n\nclass ProductOptionSectionInfo extends Component<componentProps, componentState> {\n\n    render() {\n        const { cartItems, product, productOptionId } = this.props;\n\n        let findIncrementGroupName = cartItems.orderItems.findIndex((x: {productId: number}) => x.productId === product.id);\n        let totalItems:number = 0;\n\n        if (findIncrementGroupName !== -1) {\n            let optionGroup = cartItems.orderItems[findIncrementGroupName].productOptions.filter((x: { optionId: number }) => x.optionId === productOptionId);\n            if (optionGroup) {\n                totalItems = optionGroup.reduce((totalQuantity: number, item: { productQuantity: number; }) => {\n                    if(item?.productQuantity){\n                        return totalQuantity + item?.productQuantity;\n                    }\n                    return totalQuantity;\n                }, 0);\n            }\n        }\n\n        return (\n            <div className=\"product-option-quantity\">{FormatAmount(totalItems)}</div>\n        )\n\n    }\n}\n\nconst MapStateToProps = (state: {orderReducer: any;}) => ({\n    cartItems: state.orderReducer\n});\n\nexport default connect(MapStateToProps)(ProductOptionSectionInfo);","import React, { Component } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentState {\n    strokeColor: string;\n}\n\nclass ExpandArrowIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            strokeColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() { \n        const {strokeColor} = this.state;\n        \n        const cls1 = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Expand</title>\n                <path d=\"M36 18L24 29L12 18\" style={cls1} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            </svg>\n        );\n    }\n}\n \nexport default ExpandArrowIcon;","import * as React from \"react\";\nimport StandardPromotionDisplay from \"../../../Interfaces/PromoMatrix/StandardPromotionDisplay\";\nimport ReactHtmlParser from 'html-react-parser'; \n\nimport \"./Styles/_ProductStandardPromotion.scss\"\n\ninterface IProductStandardPromotionsProps {\n    descriptions : StandardPromotionDisplay[];\n    showHeaderTitle? : boolean;\n}\n\nexport const ProductStandardPromotion : React.FC<IProductStandardPromotionsProps> = ({descriptions, showHeaderTitle=false}) => {\n    \n    return (\n        <>\n        { descriptions.length > 0 && \n            <div data-testid=\"promo-list-container\" className=\"promotions-list-container\">\n                {showHeaderTitle && <div className=\"promotion-description header\">Current Promotions</div>}\n                {descriptions.map((pd:StandardPromotionDisplay, i:number) => {\n                    return <div className=\"promotion-description\" key={`promo-desc-${i}`}><span>- {ReactHtmlParser(pd.promotionDescription)}</span></div>\n                })}\n            </div>\n        }\n        </>\n    )\n}","import * as React from \"react\";\nimport ContractPricePromotionDisplay from \"../../../Interfaces/PromoMatrix/ContractPricePromotionDisplay\";\n\nimport \"./Styles/_ProductContractPricePromotion.scss\"\n\ninterface IProductContractPricePromotionsProps {\n    descriptions : ContractPricePromotionDisplay[];\n    showHeaderTitle? : boolean;\n}\n\nexport const ProductContractPricePromotion : React.FC<IProductContractPricePromotionsProps> = ({descriptions, showHeaderTitle=false}) => {\n    \n    return (\n        <>\n        { descriptions.length > 0 && \n            <div data-testid=\"promo-list-container\" className=\"promotions-list-container\">\n                {showHeaderTitle && <div className=\"promotion-description header\">Volume Pricing</div>}\n                <div className=\"contract-pricing-container\">\n                    <div className=\"header\">Quantity</div>\n                    <div className=\"header\">Price</div>\n                </div>\n                {descriptions.map((cpd:ContractPricePromotionDisplay, i:number) => {\n                    return (\n                        <div className=\"contract-pricing-container\" key={`contract-price-container-${i}`}>\n                            <div className=\"promotion-description-quantity\" key={`contract-quantity-${i}`}>{cpd.quantityRange}</div>\n                            <div className=\"promotion-description-price\" key={`contract-price-${i}`}>{cpd.price}</div>\n                        </div>\n                    )\n                })}\n            </div>\n        }\n        </>\n    )\n}","import * as React from 'react';\nimport { Popover } from '@cin7/ui';\n\nimport \"./Styles/_ProductsPromotionsTooltip.scss\";\n\ninterface IProductsPromotionsTooltip{\n    content: JSX.Element;\n}\n\nexport const ProductsPromotionsTooltip : React.FC<IProductsPromotionsTooltip> = (props) => {\n    const [anchorEl, setAnchorEl] = React.useState<HTMLDivElement | null>(null);\n\n    const handlePopoverOpen = (event: React.MouseEvent<HTMLDivElement>) => {\n        setAnchorEl(event.currentTarget);\n    };\n    \n    const handlePopoverClose = () => {\n        setAnchorEl(null);\n    };\n\n    const open = Boolean(anchorEl);\n\n    return (\n        <>\n            <div\n                onMouseEnter={handlePopoverOpen}\n                onMouseLeave={handlePopoverClose}\n            >\n                {props.children}\n            </div>\n            <Popover\n                anchorEl={anchorEl}\n                open={open}\n                onClose={handlePopoverClose}\n            >\n                {props.content}\n            </Popover>\n        </>\n    )\n}","import React from 'react'\nimport PriceDisplay from '../../Global/PriceDisplay';\n\nimport './Styles/_ProductOptionUOMUnitPrice.scss';\nimport { ProductDetailsOption } from '../../../Redux/Reducers/App_Reducers/ProductDetailsReducer';\n\ninterface propsModel {\n    option : ProductDetailsOption\n}\n\nexport const ProductOptionUOMUnitPrice = (props: propsModel) => {\n    const { option } = props;\n    \n    let unitPrice = option.contractPrice\n        ? option.contractPrice\n        : (option.price / (option.uomSize ?? 1));\n\n\n    if(unitPrice > 0) {\n        return (\n            <div className=\"product-details-option-UOM-unit-price\">\n                <PriceDisplay value={unitPrice} />\n            </div>\n        )\n    }\n    return (<></>);\n}\n","import React, { Component, SyntheticEvent } from \"react\";\nimport { ContainsUoms, GetProductImageUrl } from \"../../../Utils/ProductsHelper\";\nimport ProductOptionQuantity from \"../../../Components/PageElements/Products/ProductOptionQuantity\";\nimport ProductOptionPriceRange from \"./ProductOptionPriceRange\";\nimport ProductOptionPrice from \"../../../Components/PageElements/Products/ProductOptionPrice\";\nimport StockIndicator from \"./StockIndicator\";\nimport UOMStockIndicator from \"./UOMStockIndicator\";\nimport ProductOptionSectionInfo from \"./ProductOptionSectionInfo\";\nimport ExpandArrowIcon from \"../../../Images/Icons/Products/ExpandArrowIcon\";\nimport Image from \"../../Global/Image\";\nimport { ProductStandardPromotion } from \"./ProductStandardPromotion\";\nimport { ProductContractPricePromotion } from \"./ProductContractPricePromotion\";\nimport ContractPricePromotionDisplay from \"../../../Interfaces/PromoMatrix/ContractPricePromotionDisplay\";\nimport StandardPromotionDisplay from \"../../../Interfaces/PromoMatrix/StandardPromotionDisplay\";\nimport { ProductsPromotionsTooltip } from \"./ProductPromotionsTooltip\";\nimport PromotionsHelper from \"../../../Utils/PromotionsHelper\";\nimport { IProductPromotionsSectionProps } from \"./ProductPromotionsSection\";\nimport ProductGalleryModal from \"./ProductGalleryModal\";\n\nimport \"./Styles/_ProductOptionSection.scss\";\nimport { ProductOptionUOMUnitPrice } from \"./ProductOptionUOMUnitPrice\";\nimport RetailPriceDisplay from \"../../Global/RetailPriceDisplay\";\nimport { ProductDetailsOption } from \"../../../Redux/Reducers/App_Reducers/ProductDetailsReducer\";\n\ninterface componentProps {\n    option: ProductDetailsOption[];\n    sizes: boolean;\n    product: any;\n    tabIndex?: number;\n}\n\ninterface componentState {\n    active: boolean;\n    imageModalOpen: boolean;\n}\n\nclass ProductOptionSection extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            active: false,\n            imageModalOpen: false,\n        };\n    }\n\n    checkForRetailPrice(productOption: any){\n        if (productOption.retailPrice > productOption.price)\n        {\n            return (\n                <div className='product-option-code'>\n                    <RetailPriceDisplay value={productOption.retailPrice} />\n                </div>\n            );\n        }\n    }\n\n    render() {\n        const activeClass = this.state.active ? \"active\" : \"inactive\";\n        const { option, sizes, product, tabIndex } = this.props;\n        let standardPromotions: StandardPromotionDisplay[] = option?.standardPromotions;\n        let contractPricePromotions: ContractPricePromotionDisplay[] = option?.contractPricePromotions;\n\n        const productOption = option;\n\n        const ProductOptionAction: any = () => {\n            if (sizes) {\n                return (\n                    <span className=\"product-option-arrow-right\">\n                        <ExpandArrowIcon strokeColor=\"#808081\" />\n                    </span>\n                );\n            } else {\n                return <ProductOptionQuantity product={product} option={productOption} tabIndex={tabIndex} />;\n            }\n        };\n\n        const ProductOptionInner: any = () => {\n            const productOptions: any = option;\n\n            if (sizes) {\n                return (\n                    <div key={productOption.optionId} className=\"option-details-inner\">\n                        <div className=\"option-details-inner-child\">\n                            {productOptions.map((productOption3: any) => {\n                                const standardPromotions: StandardPromotionDisplay[] =\n                                    productOption3?.standardPromotions;\n                                const contractPricePromotions: ContractPricePromotionDisplay[] =\n                                    productOption3?.contractPricePromotions;\n                                return (\n                                    <div\n                                        key={`${productOption3.sizeId},${productOption3.uomId}`}\n                                        className=\"option-details-inner-child-container\"\n                                    >\n                                        <div className=\"option-details-inner-child-details\">\n                                            <div className=\"inner-child-option-title\">\n                                                {productOption3.size ?? productOption3.option1}\n                                                {!!productOption3.uomSize && ` (${productOption3.uomSize})`}{\" \"}\n                                                {productOption3.option2} {productOption3.option3}\n                                            </div>\n                                            {(productOption3.uomId || !productOption3.sizeId) && (\n                                                <ProductOptionPrice option={productOption3} />\n                                            )}\n                                            {(productOption3.uomId && productOption3.uomSize > 0) && (\n                                                <div className=\"product-details-option-UOM-unit-price\">\n                                                    (<ProductOptionUOMUnitPrice option={productOption3} />&nbsp;per unit)\n                                                </div>\n                                            )}\n                                            {(productOption3.uomId || !productOption3.sizeId) && (\n                                                <div className=\"option-sku\">{productOption3.code}</div>\n                                            )}\n                                            {productOption3.sizeId ? (\n                                                <StockIndicator product={product} productOption={productOption3} />\n                                            ) : (\n                                                <UOMStockIndicator product={product} productOption={productOption3} />\n                                            )}\n                                            {PromotionsHelper.ShouldShowContractPriceDescriptions(\n                                                contractPricePromotions\n                                            ) ? (\n                                                <ProductsPromotionsTooltip\n                                                    content={\n                                                        <ProductContractPricePromotion\n                                                            descriptions={contractPricePromotions}\n                                                            showHeaderTitle\n                                                        />\n                                                    }\n                                                >\n                                                    <span className=\"hover-text\">See Volume Pricing</span>\n                                                </ProductsPromotionsTooltip>\n                                            ) : PromotionsHelper.ShouldShowPromotionDescriptions(standardPromotions) ? (\n                                                <ProductsPromotionsTooltip\n                                                    content={\n                                                        <ProductStandardPromotion\n                                                            descriptions={standardPromotions}\n                                                            showHeaderTitle\n                                                        />\n                                                    }\n                                                >\n                                                    <span className=\"hover-text\">See Promotions</span>\n                                                </ProductsPromotionsTooltip>\n                                            ) : (\n                                                <></>\n                                            )}\n                                        </div>\n                                        <ProductOptionQuantity\n                                            product={product}\n                                            option={productOption3}\n                                            tabIndex={tabIndex}\n                                        />\n                                    </div>\n                                );\n                            })}\n                        </div>\n                    </div>\n                );\n            } else {\n                return null;\n            }\n        };\n\n        let productImageUrl = \"\";\n        let optionImageItem;\n\n        if (product.images && product.images[0]) {\n            productImageUrl = product.images[0].thumbnail;\n            optionImageItem = product.images[0];\n        }\n\n        let optionImageUrl = GetProductImageUrl(productImageUrl);\n\n        let parentItem = null;\n\n        if (sizes) {\n            parentItem = option[0];\n\n            if (parentItem.image) {\n                optionImageItem = parentItem.image;\n                optionImageUrl = GetProductImageUrl(parentItem.image.thumbnail);\n            }\n\n            standardPromotions = (parentItem.commonPromotions as IProductPromotionsSectionProps)\n                ?.standardPromotionDescriptions;\n            contractPricePromotions = (parentItem.commonPromotions as IProductPromotionsSectionProps)\n                ?.contractPricePromoDescriptions;\n        } else {\n            if (productOption.image) {\n                optionImageItem = productOption.image;\n                optionImageUrl = GetProductImageUrl(productOption.image.thumbnail);\n            }\n        }\n\n        const galleryModalProps = { \n            closeModal: () => this._toggleImageModal(),\n            prevImageClick: () => null,\n            prevImage: () => null,\n            nextImageClick: () => null,\n            nextImage: () => null,\n            galleryImages: [optionImageItem],\n            currentImage: 0,\n        }\n\n        const hasUoms = ContainsUoms(Array.isArray(product?.options) ? Array.from(product.options) : []);\n\n        const productOptionId: number = parentItem != null ? parentItem.optionId : productOption.optionId;\n        return (\n            <div className=\"product-option-details\">\n                <div className={`product-option-details-container ${activeClass}`}>\n                    <div className={`product-option-details-tile`}>\n                        <div\n                            className={`product-option-image-container${optionImageItem ? \" clickable\" : \"\"}`}\n                            onClick={(e) => this._toggleImageModalClick(e)}\n                        >\n                            <span className=\"product-option-image\">\n                                <Image\n                                    imagePath={optionImageUrl}\n                                    altText={parentItem != null ? parentItem.code : productOption.code}\n                                />\n                            </span>\n                        </div>\n                        <div\n                            className={`product-option-detail-container${sizes ? \" sizes\" : \"\"}`}\n                            onClick={() => sizes && this._toggleSizes()}\n                        >\n                            <div className=\"product-option-detail\">\n                                <div className=\"product-option-title\">\n                                    {parentItem != null\n                                        ? parentItem.uomId == null\n                                            ? parentItem.option1\n                                            : null\n                                        : productOption.option1}{\" \"}\n                                    {parentItem != null\n                                        ? parentItem.uomId == null\n                                            ? parentItem.option2\n                                            : null\n                                        : productOption.option2}{\" \"}\n                                    {parentItem != null\n                                        ? parentItem.uomId == null\n                                            ? parentItem.option3\n                                            : null\n                                        : productOption.option3}\n                                    {productOption.uomSize && ` (${productOption.uomSize})`}\n                                </div>\n                                <div className=\"option-info-container\">\n                                    <div className=\"option-info-details\">\n                                        <div className=\"product-option-price\">\n                                            {parentItem != null ? (\n                                                hasUoms && !product?.maxRangeContractPrice ? (\n                                                    <ProductOptionPriceRange\n                                                        product={product}\n                                                        optionId={productOptionId}\n                                                    />\n                                                ) : (\n                                                    <ProductOptionPrice option={parentItem} />\n                                                )\n                                            ) : (\n                                                <>\n                                                <ProductOptionPrice option={productOption} />\n                                                {(productOption.uomId && productOption.uomSize > 0) && (\n                                                    <div className=\"product-details-option-UOM-unit-price\">\n                                                        (<ProductOptionUOMUnitPrice option={productOption} /> &nbsp;per unit)\n                                                    </div>\n                                                )}\n                                                </>\n                                            )}\n                                        </div>\n                                        {sizes && (\n                                            <>\n                                                {this.checkForRetailPrice(productOption[0])}\n                                                <div className=\"product-option-code\">{productOption[0].optionCode}</div>\n                                            </>\n                                        )}\n                                        {parentItem == null && (\n                                            <>\n                                                {this.checkForRetailPrice(productOption)}\n                                                <div className=\"product-option-code\">{productOption.code} </div>\n                                            </>\n                                        )}\n                                        <div className=\"product-option-stock\">\n                                            <StockIndicator\n                                                product={product}\n                                                productOption={productOption}\n                                                sizes={sizes}\n                                            />\n                                        </div>\n                                        {PromotionsHelper.ShouldShowContractPriceDescriptions(\n                                            contractPricePromotions\n                                        ) ? (\n                                            <ProductsPromotionsTooltip\n                                                content={\n                                                    <ProductContractPricePromotion\n                                                        descriptions={contractPricePromotions}\n                                                        showHeaderTitle\n                                                    />\n                                                }\n                                            >\n                                                <span className=\"hover-text\">See Volume Pricing</span>\n                                            </ProductsPromotionsTooltip>\n                                        ) : PromotionsHelper.ShouldShowPromotionDescriptions(standardPromotions) ? (\n                                            <ProductsPromotionsTooltip\n                                                content={\n                                                    <ProductStandardPromotion\n                                                        descriptions={standardPromotions}\n                                                        showHeaderTitle\n                                                    />\n                                                }\n                                            >\n                                                <span className=\"hover-text\">See Promotions</span>\n                                            </ProductsPromotionsTooltip>\n                                        ) : (\n                                            <></>\n                                        )}\n                                    </div>\n                                    {parentItem != null && (\n                                        <ProductOptionSectionInfo product={product} productOptionId={productOptionId} />\n                                    )}\n                                </div>\n                            </div>\n                            <div className=\"product-option-action-container\">\n                                <ProductOptionAction />\n                            </div>\n                        </div>\n                    </div>\n                    <div className=\"product-option-details-content\">\n                        <ProductOptionInner />\n                    </div>\n                </div>\n                {this.state.imageModalOpen && optionImageItem && (\n                    <ProductGalleryModal _props={galleryModalProps} />\n                )}\n            </div>\n        );\n    }\n\n    _toggleSizes = () => {\n        this.setState((prevState) => ({\n            active: !prevState.active,\n        }));\n    };\n\n    _toggleImageModalClick = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this._toggleImageModal();\n    };\n\n    _toggleImageModal = () => {\n        this.setState((prevState) => ({\n            imageModalOpen: !prevState.imageModalOpen,\n        }));\n    };\n}\n\nexport default ProductOptionSection;\n","import React, { Component } from 'react';\nimport ProductOptionSection from './ProductOptionSection';\nimport { ContainsSizes, GroupByKey } from '../../../Utils/ProductsHelper';\nimport { connect } from 'react-redux';\n\n//Styles\nimport './Styles/_ProductOptionsList.scss';\nimport { ProductDetailsOption } from '../../../Redux/Reducers/App_Reducers/ProductDetailsReducer';\n\ninterface componentProps {\n    product: any;\n    options: ProductDetailsOption[];\n}\n\nclass ProductOptionsList extends Component<componentProps, {}> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {}\n    }\n    \n    render() {\n        const { product, options } = this.props;\n\n        if (options) {\n            const groupedOptions2 = GroupByKey(options, (item: any) => {\n                return [item.optionId]\n            });\n\n            var sizes = ContainsSizes(Array.from(groupedOptions2));\n\n            let tabIndex = 1;\n\n            if (sizes) {\n                return (\n                    <div id=\"Product-Options-Container\">\n                        {\n                            Array.from(groupedOptions2).map(\n                                (option: ProductDetailsOption[]) =>\n                                    <ProductOptionSection \n                                        key={option[0].optionId} \n                                        product={product} \n                                        option={option} \n                                        sizes={true} tabIndex={tabIndex++} />\n                            )\n                        }\n                    </div>\n                );\n            }\n            else {\n                return (\n                    <div id=\"Product-Options-Container\">\n                        {\n                            Array.from(groupedOptions2).map(\n                                (option: any) =>\n                                    (option.map((option2: any) =>\n                                        (<ProductOptionSection \n                                            key={option2.optionId} \n                                            product={product} \n                                            option={option2} \n                                            sizes={false} \n                                            tabIndex={tabIndex++} />)\n                                    ))\n                            )\n                        }\n                    </div>\n                );\n            }\n        }\n\n        return ('No options available.');\n    }\n}\n\nconst MapStateToProps = (state: {productDetailsReducer: any;}) => ({\n    options: state.productDetailsReducer.product?.options\n});\n\nexport default connect(MapStateToProps)(ProductOptionsList);","import * as React from \"react\";\nimport { Accordion, AccordionSummary, Typography, AccordionDetails,  } from \"@cin7/ui\";\nimport ContractPricePromotionDisplay from \"../../../Interfaces/PromoMatrix/ContractPricePromotionDisplay\";\nimport StandardPromotionDisplay from \"../../../Interfaces/PromoMatrix/StandardPromotionDisplay\";\nimport { ProductStandardPromotion } from \"./ProductStandardPromotion\";\nimport { ProductContractPricePromotion } from \"./ProductContractPricePromotion\";\nimport PromotionsHelper from \"../../../Utils/PromotionsHelper\";\n\nimport \"./Styles/_ProductPromotionsSection.scss\"\n\nexport interface IProductPromotionsSectionProps {\n    contractPricePromoDescriptions : ContractPricePromotionDisplay[];\n    standardPromotionDescriptions : StandardPromotionDisplay[];\n}\n\nexport const ProductPromotionsSection : React.FC<IProductPromotionsSectionProps> = ({contractPricePromoDescriptions, standardPromotionDescriptions}) => {\n\n    return (\n        <div className=\"product-promotions-section-wrapper\">\n                { PromotionsHelper.ShouldShowContractPriceDescriptions(contractPricePromoDescriptions) ?\n                    <Accordion elevation={0}>\n                        <AccordionSummary><Typography variant={\"h4\"}>Volume Pricing</Typography></AccordionSummary>\n                        <AccordionDetails>\n                                <ProductContractPricePromotion descriptions={contractPricePromoDescriptions} />\n                        </AccordionDetails>\n                    </Accordion>  :\n                    PromotionsHelper.ShouldShowPromotionDescriptions(standardPromotionDescriptions) && contractPricePromoDescriptions.length === 0  ?\n                    <Accordion elevation={0}>\n                        <AccordionSummary><Typography variant={\"h4\"}>\n                            {standardPromotionDescriptions ? standardPromotionDescriptions.length : 0} Available {standardPromotionDescriptions.length > 1 ? \"Promotions\" : \"Promotion\"}</Typography></AccordionSummary>\n                        <AccordionDetails>\n                        <ProductStandardPromotion descriptions={standardPromotionDescriptions} />\n                        </AccordionDetails>\n                    </Accordion>\n                    : \n                    <></>\n                } \n        </div>\n    )\n}","import { Link } from '@cin7/ui';\nimport React from 'react';\nimport { GetProductImageUrl } from '../../../Utils/ProductsHelper';\nimport './Styles/_ProductAttachment.scss';\n\ntype Props = {\n    attachment?: {\n        description: string;\n        path: string;\n    }\n};\n\nexport const ProductAttachment = (props: Props) => {\n    if (!props.attachment) {\n        return null;\n    }\n\n    const attachmentLink = GetProductImageUrl(props.attachment.path);\n\n    return (\n        <div className={\"product-details-attachment-container\"}>\n            <div className={\"product-attachment\"}>\n                <div className={\"attachment-label\"}><i className={\"icon fas fa-list-alt\"}></i></div>\n                <Link id=\"attachment-description\" href={attachmentLink} target=\"_blank\" rel=\"noopener noreferrer\">\n                    {props.attachment.description}\n                </Link>\n            </div>\n        </div>\n    );\n};\n","import React, { SyntheticEvent } from \"react\";\nimport { useHistory } from \"react-router\";\nimport { CategoriesRoute } from \"../../../Routes\";\n\n// Styles\nimport \"./Styles/_ProductDetailsContent.scss\";\nimport \"../../../Components/Global/Styles/_Buttons.scss\";\nimport { getOrderReducer } from \"../../../Redux/Selectors/OrderSelectors\";\nimport { useSelector } from \"react-redux\";\nimport { getProductDetailsProductId } from \"../../../Redux/Selectors/ProductDetailsSelectors\";\nimport { GetTotalProductOptionPrice } from \"../../../Utils/ProductsHelper\";\nimport PriceDisplay from \"../../Global/PriceDisplay\";\n\ntype Props = {\n    version: \"mobile\" | \"desktop\";\n    CloseAction?: (e: SyntheticEvent<Element, Event>, productId: number | null) => void;\n    goBackSettings?: {\n        specificRoute: string;\n        linkText: string;\n    };\n};\n\nconst ProductDetailsStickyFooter = (props: Props) => {\n    const history = useHistory();\n\n    const onClickKeepShopping = (e: SyntheticEvent) => {\n        if (window.location.pathname === \"/cart\" && props.CloseAction) {\n            history.push(CategoriesRoute);\n            history.go(0);\n        } else if (props.CloseAction) {\n            props.CloseAction(e, null);\n        } else if (props.goBackSettings) {\n            history.push(props.goBackSettings.specificRoute);\n        } else {\n            history.goBack();\n        }\n    };\n\n    const onClickCheckout = (e: SyntheticEvent) => {\n        history.push(\"/cart\");\n        if (props.CloseAction) {\n            props.CloseAction(e, null);\n        }\n    };\n\n    let findIncrementGroupName = -1;\n    const productId = useSelector(getProductDetailsProductId);\n    const cartItems = useSelector(getOrderReducer);\n    const orderItems = cartItems.orderItems;\n    if ( orderItems.length > 0) {\n        findIncrementGroupName = orderItems.findIndex((x: {productId: number}) => x.productId === productId);\n    }\n    let totalItems = 0;\n    let totalPrice = 0;\n    \n    if (findIncrementGroupName !== -1) {\n        totalItems = orderItems[findIncrementGroupName].totalItems;\n        orderItems[findIncrementGroupName].productOptions.forEach((item: any) => {\n            totalPrice += GetTotalProductOptionPrice(item);\n        });\n    }\n\n    return (\n        <div className={`product-details-sticky-footer-${props.version}`}>\n            {props.version === \"mobile\" && <div className=\"itemTotals\">\n                <div>{totalItems} items</div>\n                <div><PriceDisplay value={totalPrice} /></div>\n            </div>}\n            <div className={\"sticky-buttons\"}>\n                <button className={\"default-button outline\"} onClick={(e) => onClickKeepShopping(e)}>\n                    Keep Shopping\n                </button>\n                <button className={\"default-button filled\"} onClick={(e) => onClickCheckout(e)}>\n                    Checkout\n                </button>\n            </div>\n        </div>\n    );\n};\n\nexport default ProductDetailsStickyFooter;\n","import React, { Component, SyntheticEvent } from \"react\";\nimport ProductInfoCard from \"./ProductInfoCard\";\nimport ProductGallery from \"./ProductGallery\";\nimport { ProductTeaser } from \"./ProductTeaser\";\nimport ProductDetailsCart from \"./ProductDetailsCart\";\nimport ProductOptionsList from \"./ProductOptionsList\";\nimport { ProductPromotionsSection } from \"./ProductPromotionsSection\";\nimport { ProductAttachment } from \"./ProductAttachment\";\nimport { B2BPageTitles } from \"../../../Language/Default_Settings\";\n\nimport \"./Styles/_ProductDetailsContent.scss\";\nimport ProductDetailsStickyFooter from \"./ProductDetailsStickyFooter\";\n\ninterface componentProps {\n    productDetails: {\n        isFetchingProductDetails: boolean;\n        product: any;\n        message: string;\n    };\n    goBackSettings?: {\n        specificRoute: string;\n        linkText: string;\n    };\n    CloseAction?: (e: SyntheticEvent<Element, Event>, productId: number | null) => void;\n}\n\ninterface componentState {}\n\nclass ProductDetailsContent extends Component<componentProps, componentState> {\n    componentDidMount() {\n        if (this.props.productDetails?.product?.name) {\n            document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.product_details_title} - ${this.props.productDetails.product.name}`;\n        } else {\n            this._setDefaultPageTitle();\n        }\n    }\n\n    componentWillUnmount() {\n        this._setDefaultPageTitle();\n    }\n\n    render() {\n        const { productDetails, CloseAction, goBackSettings } = this.props;\n        const commonPromotionData = productDetails.product?.commonPromotions;\n\n        return (\n            <div id=\"Product-Details-Content\">\n                <div className=\"product-details-inner\">\n                    <div id=\"Product-Details-Image-Column\">\n                        <div className=\"product-details-content\">\n                            {(window.innerWidth < 768) && <ProductInfoCard product={productDetails.product} />}\n                            {productDetails.product?.images && (\n                                <ProductGallery productImages={productDetails.product.images} />\n                            )}\n                            <ProductDetailsCart productId={productDetails.product?.id} />\n                        </div>\n                    </div>\n                    <div id=\"Product-Details-Options-Column\">\n                        <div id=\"Product-Details-Options-Column-Wrapper\">\n                            <div id=\"Product-Details-Info-Column\">\n                                <div className=\"product-info-container\">\n                                    {(window.innerWidth >= 768) && <ProductInfoCard product={productDetails.product} />}\n                                </div>\n                                <div className=\"product-details-content\">\n                                    <ProductTeaser />\n                                    <ProductAttachment attachment={productDetails.product?.attachment} />\n                                </div>\n                            </div>\n                            <div className={\"product-details-options\"}>\n                                {commonPromotionData &&\n                                    Array.isArray(commonPromotionData.contractPriceDescriptions) &&\n                                    Array.isArray(commonPromotionData.standardPromotionDescriptions) && (\n                                        <ProductPromotionsSection\n                                            contractPricePromoDescriptions={commonPromotionData.contractPriceDescriptions}\n                                            standardPromotionDescriptions={\n                                                commonPromotionData.standardPromotionDescriptions\n                                            }\n                                        />\n                                    )}\n                                <ProductOptionsList product={productDetails.product} />\n                            </div>\n                        </div>\n                        <ProductDetailsStickyFooter\n                            version={\"desktop\"}\n                            CloseAction={CloseAction}\n                            goBackSettings={goBackSettings}\n                        />\n                    </div>\n                    <ProductDetailsStickyFooter\n                        version={\"mobile\"}\n                        CloseAction={CloseAction}\n                        goBackSettings={goBackSettings}\n                    />\n                </div>\n            </div>\n        );\n    }\n\n    _setDefaultPageTitle() {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.product_details_title}`;\n    }\n}\n\nexport default ProductDetailsContent;\n","import React, { Component, CSSProperties } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentStates extends componentProps { }\n\nclass EmptyBox extends Component<componentProps, componentStates> {\n\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            strokeColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if (this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() {\n        const { strokeColor } = this.state;\n\n        const cls1: CSSProperties = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"328\" height=\"328\" viewBox=\"0 0 328 328\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <path d=\"M163.364 159.559L70.3987 116.078L163.364 80.2715L256.329 115.44L163.364 159.559Z\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M256.329 169.151V235.01L163.364 279.131V159.559\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M70.3987 169.791V235.65L163.364 279.132\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M163.364 80.2718L209.846 50.8584\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M256.329 115.44L301.596 86.0952\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M209.846 50.8584L301.596 86.0954\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M163.364 80.2714L120.574 48.8687\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M70.3986 116.079L26.4039 84.1074\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M120.574 48.8687L26.4039 84.1073\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M163.364 159.559L204.305 194.087\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M256.329 115.44L297.104 149.329\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M204.305 194.088L297.104 149.329\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M70.3986 116.079L28.5343 148.689\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M163.364 159.559L122.114 192.81\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path d=\"M28.5343 148.689L122.114 192.81\" style={cls1} strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            </svg>\n        );\n    }\n}\n\nexport default EmptyBox;","import React, { Component } from 'react';\nimport EmptyBox from '../../../Images/Icons/BoxIcons/EmptyBox';\n\nimport './Styles/_ProductNotFound.scss';\n\ninterface componentProps {\n    message: string;\n}\n\nclass ProductNotFound extends Component<componentProps, {}> {\n\n    render() {\n        const { message } = this.props;\n\n        return (\n            <div id=\"Product-Not-Found-Container\">\n                <EmptyBox strokeColor={'#212121'} />\n                <h2 className=\"product-not-found-message\">{message}</h2>\n            </div>\n        );\n    }\n}\n \nexport default ProductNotFound;","import React, { Component, SyntheticEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { GetProductDetails } from \"../../../Redux/Actions/ProductDetailsActions\";\nimport { RemoveOrderProduct, CalculatePromotions } from \"../../../Redux/Actions/OrderActions\";\nimport { ProductActionsContent } from \"../../../Language/Default_Settings\";\nimport MoreActionsPanel from \"../../Global/MoreActionsPanel\";\nimport Loading from \"../../Global/Loading\";\nimport ProductDetailsContent from \"./ProductDetailsContent\";\nimport Cin7ConfirmationBox from \"../Cin7ConfirmationBox\";\nimport ProductNotFound from \"./ProductNotFound\";\n\nimport \"./Styles/_ProductDetailsModal.scss\";\n\ninterface componentProps {\n    productId?: number;\n    productDetails: {\n        isFetchingProductDetails: boolean;\n        product: any;\n        message: string;\n        productNotFound: boolean;\n    };\n    auth: {\n        subscribedToken: string;\n    };\n    CloseAction: (e: SyntheticEvent, productId: number | null) => void;\n    CalculatePromotions: (addProductDetailsReducerProduct: boolean) => void;\n    GetProductDetails: (token: string, productId: number) => void;\n    RemoveOrderProduct: (\n        productId: number,\n        optionId: number | null,\n        sizeId: number | null,\n        uomId: number | null\n    ) => void;\n}\n\ninterface componentState {\n    productId: number;\n    isFetchingProductDetails: boolean;\n    product: any;\n    message: string;\n    userToken: string;\n}\n\nclass ProductDetailsModal extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            productId: 0,\n            isFetchingProductDetails: props.productDetails.isFetchingProductDetails,\n            product: props.productDetails.product,\n            message: props.productDetails.message,\n            userToken: props.auth.subscribedToken,\n        };\n    }\n\n    componentDidMount() {\n        let id = Number(this.props.productId);\n\n        this.setState({\n            productId: id,\n        });\n\n        this.props.GetProductDetails(this.props.auth.subscribedToken, id);\n    }\n\n    static getDerivedStateFromProps(props: componentProps, state: componentState) {\n        if (props.auth.subscribedToken !== state.userToken) {\n            return {\n                userToken: props.auth.subscribedToken,\n            };\n        }\n        if (props.productId !== state.productId) {\n            return {\n                productId: props.productId,\n            };\n        }\n        return null;\n    }\n\n    componentDidUpdate(prevProps: any) {\n        if (prevProps.auth.subscribedToken !== this.props.auth.subscribedToken) {\n            this.props.GetProductDetails(this.props.auth.subscribedToken, this.state.productId);\n        }\n        if (this.props.productId && this.props.productId > 0 && prevProps.productId !== this.props.productId) {\n            this.props.GetProductDetails(this.props.auth.subscribedToken, this.props.productId);\n        }\n\n        // fetch promotions after loading product\n        if (prevProps.productDetails.isFetchingProductDetails && \n                !this.props.productDetails.isFetchingProductDetails) {\n            this.props.CalculatePromotions(true);\n        }\n    }\n\n    render() {\n        const { productDetails, CloseAction } = this.props;\n\n        const actions = [\n            {\n                name: ProductActionsContent.default_resetQuantityLabel,\n                action: this._resetProductQuantity,\n            },\n            {\n                name: ProductActionsContent.default_openNewTabLabel,\n                action: this._openNewTab,\n            },\n        ];\n\n        if (productDetails.message) {\n            if (productDetails.productNotFound) {\n                return (\n                    <>\n                        <MoreActionsPanel actions={actions} />\n                        <ProductNotFound message={productDetails.message} />\n                    </>\n                );\n            } else {\n                return (\n                    <>\n                        <MoreActionsPanel actions={actions} />\n                        {productDetails.message && (\n                            <div className=\"error-message-container\">\n                                <Cin7ConfirmationBox\n                                    boxType={\"error-box\"}\n                                    boxIcon={\"error-icon\"}\n                                    boxMessage={productDetails.message}\n                                />\n                            </div>\n                        )}\n                    </>\n                );\n            }\n        }\n\n        if (productDetails.isFetchingProductDetails) {\n            return <Loading inLine />;\n        } else {\n            return (\n                <>\n                    <MoreActionsPanel actions={actions} />\n                    <ProductDetailsContent productDetails={productDetails} CloseAction={CloseAction} />\n                </>\n            );\n        }\n    }\n\n    _resetProductQuantity = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this.props.RemoveOrderProduct(this.state.productId, null, null, null);\n        this.props.CalculatePromotions(true);\n\n        //Re renders the details page\n        this.setState(this.state);\n    };\n\n    _openNewTab = (e: SyntheticEvent) => {\n        e.preventDefault();\n\n        window.open(`/products/details/${this.props.productId}`, \"_blank\");\n    };\n}\n\nconst MapStateToProps = (state: { productDetailsReducer: any; orderReducer: any; authReducer: any }) => ({\n    productDetails: state.productDetailsReducer,\n    auth: state.authReducer,\n});\n\nexport default connect(MapStateToProps, {\n    GetProductDetails,\n    RemoveOrderProduct,\n    CalculatePromotions,\n})(ProductDetailsModal);\n","import React, { Component, SyntheticEvent } from \"react\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\n\nimport { Dialog } from \"@cin7/ui\";\n\nimport { ResetProductsList, GetProductsList, GetBrandsList } from \"../../../Redux/Actions/ProductListActions\";\nimport { B2BPageTitles } from \"../../../Language/Default_Settings\";\nimport ProductsListItems from \"../../../Components/PageElements/Products/ProductsListItems\";\nimport { GetUrlParameters } from \"../../../Utils/B2BHelpers\";\nimport ProductDetailsModal from \"../../../Components/PageElements/Products/ProductDetailsModal\";\nimport { ProductsListType } from \"../../../Redux/Actions/ProductListActions\";\n\nimport \"../Styles/_ProductsList.scss\";\n\ninterface LocationState {\n    productId?: string;\n}\n\ninterface componentProps {\n    productsList: ProductsListType;\n    auth: {\n        subscribedToken: string;\n    };\n    ResetProductsList: () => void;\n    GetProductsList: (\n        token: string,\n        page: number,\n        keywords?: string,\n        filters?: { brandIds?: number[]; categoryIds?: number[] }\n    ) => void;\n    GetBrandsList: (token: string) => void;\n}\n\ninterface componentState {\n    searchParameter: string;\n    productDetailId: number | null;\n    brandIds: number[];\n}\n\nclass ProductsList extends Component<\n    RouteComponentProps<{}, StaticContext, LocationState> & componentProps,\n    componentState\n> {\n    constructor(props: RouteComponentProps<{}, StaticContext, LocationState> & componentProps) {\n        super(props);\n        const productDetailId = !!props.location.state?.productId ? parseInt(props.location.state.productId) : null;\n        this.state = {\n            searchParameter: \"\",\n            productDetailId,\n            brandIds: [],\n        };\n    }\n\n    componentDidMount() {\n        this.props.ResetProductsList();\n\n        this._setDefaultPageTitle();\n\n        if (!this.props.productsList.brandsFetched) {\n            this.props.GetBrandsList(this.props.auth.subscribedToken);\n        }\n\n        let parameters = GetUrlParameters([\"query\"]);\n\n        if (parameters.query) {\n            this.setState({\n                searchParameter: decodeURIComponent(parameters.query),\n            });\n        }\n        this.props.GetProductsList(this.props.auth.subscribedToken, 1, parameters.query, {\n            brandIds: this.props.productsList.filter.brandIds,\n            categoryIds: this.props.productsList.filter.categoryIds,\n        });\n    }\n\n    componentDidUpdate(prevProps: any) {\n        this._setDefaultPageTitle();\n\n        if (prevProps.auth.subscribedToken !== this.props.auth.subscribedToken) {\n            this.props.GetProductsList(this.props.auth.subscribedToken, 1, this.state.searchParameter, {\n                brandIds: this.props.productsList.filter.brandIds,\n                categoryIds: this.props.productsList.filter.categoryIds,\n            });\n        }\n\n        let parameters = GetUrlParameters([\"query\"]);\n\n        let refreshProductsList = false;\n\n        let searchParameter = this.state.searchParameter;\n\n        if (prevProps.location.state?.productId !== this.props.location.state?.productId) {\n            const productDetailId = !!this.props.location.state?.productId\n                ? parseInt(this.props.location.state.productId)\n                : null;\n            this.setState({ productDetailId });\n        }\n\n        if (parameters.query) {\n            if (parameters.query !== this.state.searchParameter) {\n                this.props.ResetProductsList();\n                this.setState({\n                    searchParameter: parameters.query,\n                });\n                refreshProductsList = true;\n                searchParameter = parameters.query;\n            }\n        } else {\n            if (this.state.searchParameter !== \"\") {\n                this.setState({\n                    searchParameter: \"\",\n                    productDetailId: null,\n                });\n                searchParameter = \"\";\n                refreshProductsList = true;\n            }\n        }\n\n        if (prevProps.productsList.filter.brandIds !== this.props.productsList.filter.brandIds) {\n            this.props.ResetProductsList();\n            this.setState({\n                brandIds: this.props.productsList.filter.brandIds,\n            });\n            refreshProductsList = true;\n        }\n\n        if (\n            JSON.stringify(prevProps.productsList.filter.categoryIds) !==\n            JSON.stringify(this.props.productsList.filter.categoryIds)\n        ) {\n            this.props.ResetProductsList();\n            refreshProductsList = true;\n        }\n\n        if (refreshProductsList) {\n            this.props.GetProductsList(this.props.auth.subscribedToken, 1, searchParameter, {\n                brandIds: this.props.productsList.filter.brandIds,\n                categoryIds: this.props.productsList.filter.categoryIds,\n            });\n        }\n    }\n\n    render() {\n        const { searchParameter, productDetailId } = this.state;\n        return (\n            <>\n                {productDetailId && (\n                    <Dialog\n                        open\n                        fullWidth\n                        onClose={(e, reason) => this._setProductDetailId(null, null)}\n                        className=\"product\"\n                        maxWidth={\"lg\"}\n                    >\n                        <div className=\"product-details-modal-content\">\n                            <ProductDetailsModal productId={productDetailId} CloseAction={this._setProductDetailId} />\n                        </div>\n                    </Dialog>\n                )}\n                <div id=\"Products-List-Container\" className={productDetailId ? \"product-detail-open\" : \"\"}>\n                    <ProductsListItems\n                        searchParameter={searchParameter}\n                        setProductDetailId={this._setProductDetailId}\n                    />\n                </div>\n            </>\n        );\n    }\n\n    _setProductDetailId = (e: SyntheticEvent | null, id: number | null) => {\n        e?.preventDefault();\n\n        this.setState({ productDetailId: id });\n    };\n\n    _setDefaultPageTitle() {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.products_list_title}`;\n    }\n}\n\nconst MapStateToProps = (state: { productListReducer: any; authReducer: any }) => ({\n    productsList: state.productListReducer,\n    auth: state.authReducer,\n});\n\nexport default connect(MapStateToProps, {\n    ResetProductsList,\n    GetProductsList,\n    GetBrandsList,\n})(ProductsList);\n","import { CategoryType } from \"../../Components/PageElements/Products/ProductCategoryFilter\";\nimport { getAllDescendents } from \"../../Utils/CategoriesHelper\";\nimport * as types from \"./../Types/CategoryTypes\";\nimport { UpdateProductsFilter } from \"./ProductListActions\";\n\nexport const ChangeCurrentCategory = (newCategory: CategoryType) => (dispatch: any) => {\n    dispatch({\n        type: types.Change_Current_Category,\n        payload: {\n            category: newCategory,\n        },\n    });\n    dispatch(\n        UpdateProductsFilter({\n            categoryIds: newCategory.id === -1 ? [] : [newCategory.id, ...getAllDescendents(newCategory)],\n        })\n    );\n};\n\nexport const ResetCurrentCategory = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Current_Category,\n    });\n};\n\nexport const SetGoBack = (goBack: boolean) => (dispatch: any) => {\n    dispatch({\n        type: types.Go_Back,\n        payload: {\n            goBack: goBack,\n        },\n    });\n};\n","import React from \"react\";\nimport { CloseCircleIcon } from \"@cin7/ui\";\n\nimport \"./Styles/_Chip.scss\";\n\nexport interface ChipProps {\n    label: string;\n    onDelete?: VoidFunction;\n    onClick?: VoidFunction;\n    color?: string;\n    deletable?: boolean;\n    className?: string;\n    variant?: \"primary\" | \"secondary\";\n}\n\nexport const Chip = (props: ChipProps) => {\n    const {\n        label,\n        onDelete,\n        color = \"#004FA9\",\n        deletable = false,\n        className = \"\",\n        onClick,\n        variant = \"primary\",\n    } = props;\n    const styles =\n        variant === \"primary\" ? { backgroundColor: color, color: \"#fff\" } : { border: `1px solid ${color}`, color };\n    return (\n        <div className={`chip ${className} chip--${variant}`} style={styles} onClick={onClick}>\n            <div className=\"chip__label\">{label}</div>\n            {deletable && (\n                <div className=\"chip__delete-icon\" onClick={onDelete}>\n                    <CloseCircleIcon />\n                </div>\n            )}\n        </div>\n    );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { useHistory } from \"react-router\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { CategoryType } from \"../../../Components/PageElements/Products/ProductCategoryFilter\";\nimport ProductsListBrandFilter from \"../../../Components/PageElements/Products/ProductsListBrandFilter\";\nimport {\n    findElders,\n    useCategoryRouteObjects,\n    useCurrentCategory,\n    useDefaultParent,\n    useMatchingCategory,\n} from \"../../../Utils/CategoriesHelper\";\nimport ProductsList from \"./ProductsList\";\nimport {\n    DisplayFilterMenu,\n    ToggleProductListView,\n    UpdateProductsFilter,\n} from \"../../../Redux/Actions/ProductListActions\";\nimport { RootState } from \"../../..\";\nimport { SetGoBack } from \"../../../Redux/Actions/CategoryActions\";\nimport { GetUrlParameters } from \"../../../Utils/B2BHelpers\";\nimport ProductNotFound from \"../../../Components/PageElements/Products/ProductNotFound\";\nimport { Chip } from \"../../../Components/Global/Chip\";\n\nimport \"../Styles/_Category.scss\";\nimport \"../../../Components/Global/Styles/_Buttons.scss\";\n\nconst Category = (props: any): JSX.Element => {\n    const currentCategory = useCurrentCategory();\n    const matchingCategory = useMatchingCategory();\n    const defaultParent = useDefaultParent();\n    const cro = useCategoryRouteObjects();\n    const history = useHistory();\n    const dispatch = useDispatch();\n    const viewType = useSelector((state: RootState) => state.productListReducer.productListViewStyle);\n    const brands = useSelector((state: RootState) => state.productListReducer.brands);\n    const categoriesFetched = useSelector((state: RootState) => state.productListReducer.categoriesFetched);\n    const brandsFetched = useSelector((state: RootState) => state.productListReducer.brandsFetched);\n    const filter = useSelector((state: RootState) => state.productListReducer.filter);\n    const brandsAvailable = brandsFetched && brands.length > 0;\n\n    const [searchParameter, setSearchParameter] = useState(\"\");\n    const parameters = GetUrlParameters([\"query\"]);\n\n    useEffect(() => {\n        if (parameters.query) {\n            setSearchParameter(decodeURIComponent(parameters.query));\n        } else {\n            setSearchParameter(\"\");\n        }\n    }, [setSearchParameter, parameters]);\n\n    const elders = findElders(defaultParent, currentCategory.id);\n    const breadcrumbs = [];\n    if (elders.length > 1) {\n        // Exclude defaultParent from the breadcrumbs with slice\n        breadcrumbs.push(...elders.slice(1), currentCategory);\n    }\n\n    const onClickBreadcrumb = async (categorySelected: CategoryType) => {\n        const newPath = cro.find((routeObject) => routeObject.id === categorySelected.id)?.path;\n        history.push(`/products/?t=${newPath}`);\n        // Someone tell me why this works\n        await dispatch(SetGoBack(true));\n    };\n\n    const crumbList: React.ReactElement[] = [];\n    breadcrumbs.forEach((crumbCategory, i) => {\n        crumbList.push(\n            <div\n                key={crumbCategory.id}\n                onClick={() => onClickBreadcrumb(crumbCategory)}\n                className={`breadcrumbs${i === breadcrumbs.length - 1 ? \" last\" : \"\"}`}\n            >\n                {i === 0 ? null : <li>{\"/\"}</li>}\n                <li>{`${crumbCategory.name}`}</li>\n            </div>\n        );\n    });\n\n    const removeBrandFilter = (brandId: number) => {\n        dispatch(\n            UpdateProductsFilter({\n                brandIds: filter.brandIds.filter((id) => id !== brandId),\n                categoryIds: filter.categoryIds,\n            })\n        );\n    };\n\n    const clearBrandFilter = () => {\n        dispatch(\n            UpdateProductsFilter({\n                brandIds: [],\n                categoryIds: [],\n            })\n        );\n    };\n\n    if (categoriesFetched && !matchingCategory) {\n        return (\n            <div id={\"contain\"}>\n                <ProductNotFound message={\"Category not found\"} />\n            </div>\n        );\n    }\n\n    return (\n        <>\n            {brandsAvailable && <ProductsListBrandFilter />}\n            <div id={\"contain\"}>\n                <div className={\"category-header\"}>\n                    <div className={\"title-container\"}>\n                        <h1 className={\"category-title\"}>\n                            {(searchParameter && `Search results for \"${searchParameter}\"`) ||\n                                currentCategory.name ||\n                                \"All Products\"}\n                        </h1>\n                        <ol className={\"crumb-list\"}>{crumbList}</ol>\n                    </div>\n                    <div className={\"category-buttons\"}>\n                        {searchParameter && (\n                            <button className={\"default-button filled\"} onClick={() => history.push(\"/products\")}>\n                                Clear Search\n                            </button>\n                        )}\n                        <div className={\"filter-change-view-container\"}>\n                            {brandsAvailable && (\n                                <button\n                                    className={\"default-button outline\"}\n                                    onClick={() => dispatch(DisplayFilterMenu(true))}\n                                >\n                                    <div className={\"button-icon-container\"}>\n                                        <i className=\"icon fas fa-sliders\"></i>Filter\n                                    </div>\n                                </button>\n                            )}\n                            <button\n                                className={\"default-button outline\"}\n                                onClick={() =>\n                                    dispatch(\n                                        ToggleProductListView(viewType === \"list-view\" ? \"gallery-view\" : \"list-view\")\n                                    )\n                                }\n                            >\n                                <div className={\"button-icon-container switching\"}>\n                                    <i className={`icon fas fa-${viewType === \"list-view\" ? \"picture-o\" : \"bars\"}`}></i>\n                                    Change View\n                                </div>\n                            </button>\n                        </div>\n                    </div>\n                </div>\n                <hr />\n                {filter.brandIds.length >= 1 && (\n                    <div className=\"chips\">\n                        <div className={\"chip-box\"}>\n                            <label className={\"label\"}>\n                                <i className=\"icon fas fa-filter\"></i>Filtered By:\n                            </label>\n                            <div className={\"chips-inner\"}>\n                                {filter.brandIds.map((brandId) => {\n                                    return (\n                                        <Chip\n                                            key={brandId}\n                                            label={brands.find((brand) => brand.id === brandId)?.name || \"\"}\n                                            onDelete={() => removeBrandFilter(brandId)}\n                                            deletable\n                                        />\n                                    );\n                                })}\n                            </div>\n                        </div>\n                        <hr />\n                        <div className={\"clear-box\"}>\n                            <button className={\"default-button outline clear-button\"} onClick={clearBrandFilter}>\n                                Clear All\n                            </button>\n                        </div>\n                    </div>\n                )}\n                {/* Don't load the Products until there is a category confirmed */}\n                {currentCategory.name && <ProductsList {...props} />}\n            </div>\n        </>\n    );\n};\n\nexport default Category;\n","import React, { Component } from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentState {\n    strokeColor: string;\n}\n\nclass QuoteIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            strokeColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n    \n    render() { \n        const {strokeColor} = this.state;\n          \n        return (\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <path stroke={strokeColor} d=\"M20.5 2C20.5 1.72386 20.2761 1.5 20 1.5H4C3.72386 1.5 3.5 1.72386 3.5 2V22C3.5 22.2761 3.72386 22.5 4 22.5H20C20.2761 22.5 20.5 22.2761 20.5 22V2Z\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                <path stroke={strokeColor} d=\"M6.5 4.5H9.5M14.5 19.5H17.5M6.5 9.5H17.5M6.5 12.5H17.5M6.5 15.5H17.5\" strokeLinecap=\"round\" />\n            </svg>\n        );\n    }\n}\n \nexport default QuoteIcon;","import React from 'react';\n\ninterface ComponentProps {\n    strokeColor: string;\n}\n\nexport const UserIcon: React.FC<ComponentProps> = (props) => {\n    const { strokeColor } = props;\n    return (\n        <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n            xmlns=\"https://www.w3.org/2000/svg\">\n            <path d=\"M19.5 21.5L4.5 21.5V16C4.5 16 5 15 8 13.8794C11 12.7588 13 12.7588 16 13.8794C19 15 19.5 16 19.5 16V21.5Z\" stroke={strokeColor} strokeLinejoin=\"round\" />\n            <path d=\"M15.5 6.5C15.5 4.567 13.933 3 12 3C10.067 3 8.5 4.567 8.5 6.5C8.5 8.433 10.067 10 12 10C13.933 10 15.5 8.433 15.5 6.5Z\" stroke={strokeColor} />\n        </svg>\n    );\n}","import React from \"react\";\n\ninterface ComponentProps {\n    strokeColor: string;\n}\n\nexport const LogoutIcon: React.FC<ComponentProps> = (props) => {\n    const { strokeColor } = props;\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill={strokeColor}>\n            <g>\n                <path d=\"M0,0h24v24H0V0z\" fill=\"none\" />\n            </g>\n            <g>\n                <g>\n                    <polygon points=\"5,5 12,5 12,3 3,3 3,21 12,21 12,19 5,19\" />\n                    <polygon points=\"21,12 17,8 17,11 9,11 9,13 17,13 17,16\" />\n                </g>\n            </g>\n        </svg>\n    );\n};\n","import React from \"react\";\n\ninterface ComponentProps {\n    strokeColor: string;\n}\n\nexport const GenericIcon: React.FC<ComponentProps> = (props) => {\n    const { strokeColor } = props;\n    return (\n        <svg version=\"1.1\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n            <g stroke-linecap=\"round\" stroke-width=\"1.5\" stroke={strokeColor} fill=\"none\" stroke-linejoin=\"round\">\n                <path d=\"M5.25,20.246c-0.82842,0 -1.5,-0.67158 -1.5,-1.5v-16.5c0,-0.82842 0.67158,-1.5 1.5,-1.5h16.5c0.82842,0 1.5,0.67158 1.5,1.5v16.5c0,0.82842 -0.67158,1.5 -1.5,1.5Z\"></path>\n                <path d=\"M20.25,23.246h-18h-6.55671e-08c-0.828427,-3.62117e-08 -1.5,-0.671573 -1.5,-1.5c0,0 0,0 0,0v-18\"></path>\n                <path d=\"M8.25,6.75h10.5\"></path>\n                <path d=\"M8.25,9.75h10.5\"></path>\n                <path d=\"M8.25,12.75h7.5\"></path>\n            </g>\n        </svg>\n    );\n};\n","import * as headerTypes from \"./../Types/HeaderTypes\";\n\n//Toggle Actions\nexport const ToggleSideMenu = () => (dispatch: any) => {\n    dispatch({\n        type: headerTypes.Side_Menu_Toggle_Status,\n    });\n};\n\nexport const ResetSideMenu = () => (dispatch: any) => {\n    dispatch({\n        type: headerTypes.Side_Menu_Reset_Status,\n    });\n};\n","import React, { ReactNode } from 'react';\nimport { BemHelper, Typography } from '@cin7/ui';\n\nimport './Styles/_IssuesCard.scss';\n\nconst bem = new BemHelper('issues-card');\n\nexport interface IssuesCardProps {\n    variant: IssuesCardVariant;\n    action?: ReactNode;\n    title: string;\n    sections: IssuesCardSection[]\n    className?: string;\n}\n\nexport interface IssuesCardSection {\n    title: string,\n    issues: ReactNode[];\n}\n\nexport enum IssuesCardVariant {\n    Error = 'error',\n    Warning = 'warning'\n}\n\nexport const IssuesCard: React.FC<IssuesCardProps> = (props) => {\n    const { variant, action, title, sections, className } = props;\n    return (\n        <div className={bem.block(variant) + ` ${className || ''}`}>\n            <div className={bem.element('issues')}>\n                <Typography variant={\"h2\"} className={bem.element('issues-title')}>{title}</Typography>\n                {sections.map((section, i) => {\n                    if (section.issues.length === 0) return null;\n                    return (\n                        <div key={i}>\n                            <Typography variant={\"body1\"} gutterBottom>{section.title}</Typography>\n                            <ul className={bem.element('issues-list')}>\n                                {section.issues}      \n                            </ul>\n                        </div>\n                    )\n                })}\n            </div>\n            {!!action && <div className={bem.element('action')}>{action}</div>}\n        </div>\n    )\n}","import { Button, Dialog, Typography, BemHelper, AddToCartIcon, ReplaceCartIcon, ActionCard, UploadIcon, Divider, DialogContent } from '@cin7/ui';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { FailedImportRecord, FailedReadRecord } from '../../../Domain/BulkImportCSV';\nimport { ConfirmBulkOrderModalContent } from '../../../Language/Default_Settings';\nimport { getOrderItemCount } from '../../../Redux/Selectors/OrderSelectors';\nimport { IssuesCard, IssuesCardVariant } from './IssuesCard';\n\nimport './Styles/_ConfirmBulkOrderModal.scss';\n\nexport interface ConfirmBulkOrderModalProps {\n    onCloseClick: VoidFunction;\n    onAddToCart: VoidFunction;\n    onReplaceCart: VoidFunction;\n    onReuploadClick: VoidFunction;\n    csvReadErrors: FailedReadRecord[];\n    importErrors: FailedImportRecord[];\n    stockErrors: string[];\n    stockWarnings: string[];\n    hasSuccessfullRows: boolean;\n}\n\nexport interface Error {\n    product: string,\n    sku: string,\n    error: string\n}\n\nconst bem = new BemHelper('confirm-bulk-order-modal')\n\nexport const ConfirmBulkOrderModal: React.FC<ConfirmBulkOrderModalProps> = (props) => {\n    const orderItemCount = useSelector(getOrderItemCount);\n    const hasErrors = props.csvReadErrors.length > 0 || props.importErrors.length > 0 || props.stockErrors.length > 0;\n    const errorSections = [];\n    \n    if (props.csvReadErrors.length > 0) {\n        errorSections.push({\n            title: ConfirmBulkOrderModalContent.default_csvReadErrorMessage,\n            issues: \n                props.csvReadErrors.map((error, i) => {\n                    return <li key={i}><Typography variant={\"body1\"} gutterBottom>Row <strong>{error.rowIndex}</strong></Typography></li>\n                })\n        })\n    }\n\n    if (props.importErrors.length > 0) {\n        errorSections.push({\n            title: ConfirmBulkOrderModalContent.default_importErrorMessage,\n            issues: \n                props.importErrors.map((error, i) => {\n                    return (\n                        <li key={i}>\n                            <Typography variant={\"body1\"} gutterBottom>\n                                SKU: <strong>\"{error.sku}\"</strong> - Barcode: <strong>\"{error.barcode}\"</strong> - Size: <strong>\"{error.size}\"</strong> - Quantity: <strong>{error.quantity}</strong>\n                            </Typography>\n                        </li>\n                    )\n                })\n        })\n    }\n\n    if (props.stockErrors.length > 0) {\n        errorSections.push({\n            title: ConfirmBulkOrderModalContent.default_stockErrorMessage,\n            issues: \n                props.stockErrors.map((error, i) => {\n                    return <li key={i}><Typography variant={\"body1\"} gutterBottom>{error}</Typography></li>\n                })\n        })\n    }\n\n    return (\n        <Dialog open onClose={(e, reason) => props.onCloseClick()} className={bem.block()}>\n            <DialogContent>\n            <div className={bem.element('content')}>\n                <div className={bem.element('header')}>\n                    <Typography variant={\"h1\"} className={bem.element('header-text')}>\n                        {ConfirmBulkOrderModalContent.default_header}\n                    </Typography>\n                    <Button variant=\"secondary\" onClick={props.onCloseClick} className={bem.element('cancel-button')}>{ConfirmBulkOrderModalContent.default_cancelButtonLabel}</Button>\n                </div>\n                <Divider />\n                {hasErrors && (\n                    <IssuesCard \n                        title={ConfirmBulkOrderModalContent.default_issuesTitle}\n                        variant={IssuesCardVariant.Error}\n                        sections={errorSections}\n                        action={<Button className={bem.element('reupload-button')} onClick={props.onReuploadClick}>{ConfirmBulkOrderModalContent.default_reuploadFileButtonLabel}</Button>} \n                    />\n                )}\n                 {props.stockWarnings.length > 0 && (\n                    <IssuesCard \n                        title={ConfirmBulkOrderModalContent.default_warningsTitle}\n                        variant={IssuesCardVariant.Warning}\n                        sections={[\n                            {\n                                title: ConfirmBulkOrderModalContent.default_stockWarningMessage,\n                                issues: \n                                    props.stockWarnings.map((warning, i) => {\n                                        return <li key={i}><Typography variant={\"body1\"} gutterBottom>{warning}</Typography></li>\n                                    })\n                            }\n                        ]}\n                    />\n                )}\n                <Typography variant={\"body1\"} gutterBottom className={bem.element('prompt')}>{ConfirmBulkOrderModalContent.default_subtitle}</Typography>\n                <div className={bem.element('actions')}>\n                    {props.hasSuccessfullRows ? (\n                        <ActionCard \n                            actionButtonLabel={ConfirmBulkOrderModalContent.default_addButtonLabel} \n                            icon={<AddToCartIcon />} \n                            message={ConfirmBulkOrderModalContent.default_addMessage}\n                            onActionClick={props.onAddToCart} \n                            title={ConfirmBulkOrderModalContent.default_addTitle}\n                        />\n                        ) : (\n                        <ActionCard \n                            actionButtonLabel={ConfirmBulkOrderModalContent.default_reuploadButtonLabel} \n                            icon={<UploadIcon />} \n                            message={ConfirmBulkOrderModalContent.default_reuploadMessage}\n                            onActionClick={props.onReuploadClick} \n                            title={ConfirmBulkOrderModalContent.default_reuploadTitle}\n                        />\n                    )}\n                    {props.hasSuccessfullRows && orderItemCount > 0 && <ActionCard\n                        actionButtonLabel={ConfirmBulkOrderModalContent.default_replaceButtonLabel} \n                        icon={<ReplaceCartIcon />} \n                        message={`This will remove the ${orderItemCount} item${orderItemCount > 1 ? 's' : ''} in your Cart and create a new Cart for your order`}\n                        onActionClick={props.onReplaceCart} \n                        title={ConfirmBulkOrderModalContent.default_replaceTitle}\n                    />}\n                </div>\n            </div>\n            </DialogContent>\n        </Dialog>\n    )\n}","import {\n    Button,\n    Typography,\n    FileUploader,\n    UploadIcon,\n    BemHelper,\n    makeStyles,\n    Divider,\n    Dialog,\n    DialogContent,\n} from \"@cin7/ui\";\nimport React from \"react\";\nimport { UploadBulkOrderModalContent as UploadBulkOrderModalText } from \"../../../Language/Default_Settings\";\nimport Cin7ConfirmationBox from \"../Cin7ConfirmationBox\";\n\nimport \"./Styles/_UploadBulkOrderModal.scss\";\n\nexport interface UploadBulkOrderModalProps {\n    onDownloadTemplateClick: VoidFunction;\n    onUploadCancel: VoidFunction;\n    onCloseClick: VoidFunction;\n    onUpload: (files: File[]) => void;\n    uploading: boolean;\n    errorMessage?: string;\n}\n\nconst bem = new BemHelper(\"upload-bulk-order-modal\");\n\nconst useStyles = makeStyles({\n    root: {\n        backgroundColor: \"#00326B\",\n        borderRadius: 4,\n        color: \"white\",\n        height: 32,\n        padding: \".5rem 1rem\",\n        fontFamily: \"Calibre\",\n        fontSize: \"1rem\",\n        fontWeight: 600,\n        minWidth: 200,\n        \"&:hover\": {\n            backgroundColor: \"#002EFF\",\n        },\n    },\n});\n\nexport const UploadBulkOrderModal: React.FC<UploadBulkOrderModalProps> = (props) => {\n    const classes = useStyles();\n    return (\n        <Dialog open fullWidth maxWidth={\"sm\"} onClose={(e, reason) => props.onCloseClick()} className={bem.block()}>\n            <DialogContent>\n                <div className={bem.element(\"content\")}>\n                    <div className={bem.element(\"header\")}>\n                        <Typography variant={\"h3\"} className={bem.element(\"header-text\")}>\n                            {UploadBulkOrderModalText.default_header}\n                        </Typography>\n                        <div className={bem.element(\"header-actions\")}>\n                            {/* <Button type=\"secondary\">{UploadBulkOrderModalText.default_getHelp}</Button> */}\n                            <Button\n                                variant=\"secondary\"\n                                onClick={props.onCloseClick}\n                                className={bem.element(\"cancel-button\")}\n                            >\n                                {UploadBulkOrderModalText.default_cancel}\n                            </Button>\n                        </div>\n                    </div>\n                    <Divider />\n                    {props.errorMessage && (\n                        <Cin7ConfirmationBox\n                            boxType={\"error-box\"}\n                            boxIcon={\"error-icon\"}\n                            boxMessage={props.errorMessage}\n                        />\n                    )}\n                    <div className={bem.element(\"prepare-order\")}>\n                        <div className={bem.element(\"prepare-order-instructions\")}>\n                            <Typography variant={\"h4\"}>\n                                {UploadBulkOrderModalText.default_prepareYourOrderTitle}\n                            </Typography>\n                            <Typography variant={\"body1\"}>\n                                {UploadBulkOrderModalText.default_prepareYourOrderMessage}\n                            </Typography>\n                        </div>\n                        <Button className={classes.root} variant=\"primary\" onClick={props.onDownloadTemplateClick}>\n                            {UploadBulkOrderModalText.default_downloadTemplateButtonLabel}\n                        </Button>\n                    </div>\n                    <Divider light />\n                    <div className={bem.element(\"upload-order\")}>\n                        <div className={bem.element(\"upload-order-instructions\")}>\n                            <Typography variant={\"h4\"}>\n                                {UploadBulkOrderModalText.default_uploadYourOrderTitle}\n                            </Typography>\n                            <Typography className={bem.element(\"upload-drag-and-drop-message\")} variant={\"body1\"}>\n                                {UploadBulkOrderModalText.default_uploadYourOrderMessageDragAndDrop}\n                            </Typography>\n                            <Typography className={bem.element(\"upload-message\")} variant={\"body1\"}>\n                                {UploadBulkOrderModalText.default_uploadYourOrderMessageUpload}\n                            </Typography>\n                        </div>\n                        <FileUploader\n                            uploadButtonText={UploadBulkOrderModalText.default_uploadButtonLabel}\n                            icon={<UploadIcon />}\n                            dragAndDropPromptText={UploadBulkOrderModalText.default_uploadPrompt}\n                            dragAndDropPromptSubText={UploadBulkOrderModalText.default_uploadPromptSubText}\n                            onDrop={props.onUpload}\n                            onUploadCancel={props.onUploadCancel}\n                            uploading={props.uploading}\n                            uploadingButtonText={UploadBulkOrderModalText.default_uploadingButtonLabel}\n                            uploadingText={UploadBulkOrderModalText.default_uploadingTitle}\n                        />\n                    </div>\n                </div>\n            </DialogContent>\n        </Dialog>\n    );\n};\n","import React, { useRef, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { BulkImportCSVResponse, FailedImportRecord, FailedReadRecord, OrderItem, OrderOption } from '../../../Domain/BulkImportCSV';\nimport { UploadBulkOrderContent } from '../../../Language/Default_Settings';\nimport { CalculatePromotions, ClearCart, IncrementOrderQuantity } from '../../../Redux/Actions/OrderActions';\nimport { getOrderItemCount } from '../../../Redux/Selectors/OrderSelectors';\nimport { ConfirmBulkOrderModal } from './ConfirmBulkOrderModal';\nimport { UploadBulkOrderModal } from './UploadBulkOrderModal';\n\nexport interface UploadBulkOrderProps {\n    onClose: VoidFunction;\n    importCSV: (file: File) => Promise<BulkImportCSVResponse>;\n    downloadTemplate: VoidFunction;\n    onImportSuccess?: VoidFunction\n}\n\nconst getStockIssues = (orderItems: OrderItem[]) => {\n    const stockErrors: string[] = [];\n    const stockWarnings: string[] = [];\n    orderItems.forEach(orderItem => {\n        orderItem.orderOptions.forEach(option => {\n            if (orderItem.allowOverselling || option.quantityOrdered <= option.stock) {\n                return;\n            }\n            if (option.stock > 0) {\n                stockWarnings.push(`${orderItem.name} ${option.code} - quantity is now ${option.stock}`)\n            } else {\n                stockErrors.push(`${orderItem.name} ${option.code}`)\n            }\n        })\n    })\n\n    return { stockErrors, stockWarnings }\n}\n\ninterface ImportIssues {\n    error?: string,\n    importErrors: FailedImportRecord[],\n    readErrors: FailedReadRecord[],\n    stockErrors: string[],\n    stockWarnings: string[],\n}\n\nexport const UploadBulkOrder: React.FC<UploadBulkOrderProps> = ({ onClose, importCSV, downloadTemplate, onImportSuccess }) => {\n    const [showUploadBulkOrder, setShowUploadBulkOrder] = useState(true);\n    const [showConfirmBulkOrder, setShowConfirmBulkOrder] = useState(false);\n    const [uploading, setUploading] = useState(false);\n    const [importIssues, setImportIssues] = useState<ImportIssues>({ error: undefined, importErrors: [], readErrors: [], stockErrors: [], stockWarnings: []});\n    const [importedOrder, setImportedOrder] = useState<OrderItem[]>([]);\n    const canceledUploadRef = useRef({canceled: false});\n    \n    const dispatch = useDispatch();\n    const orderItemCount = useSelector(getOrderItemCount);\n    const clearCart = () => dispatch(ClearCart());\n    const calculatePromotions = () => dispatch(CalculatePromotions());\n    const addToCart = (option: OrderOption, product: OrderItem, quantity: number) => dispatch(IncrementOrderQuantity(option, product, quantity));\n    const addImportedOrderToCart = (importedOrder: OrderItem[]) => {\n        importedOrder.forEach(orderItem => {\n            orderItem.orderOptions.forEach(option => {\n                if (orderItem.allowOverselling) {\n                    return addToCart(option, orderItem, option.quantityOrdered);\n                }\n                if (option.quantityOrdered <= option.stock) {\n                    addToCart(option, orderItem, option.quantityOrdered);\n                } else if (option.stock > 0) {\n                    addToCart(option, orderItem, option.stock);\n                }\n            })\n        })\n        calculatePromotions();\n        onImportSuccess?.();\n    }\n    const cancelUpload = () => canceledUploadRef.current = { canceled: true };\n    \n    return (\n        <>\n            {showUploadBulkOrder && (\n                <UploadBulkOrderModal \n                    onDownloadTemplateClick={downloadTemplate}\n                    onCloseClick={() => { \n                        setShowUploadBulkOrder(false); \n                        cancelUpload(); \n                        onClose();\n                    }} \n                    onUploadCancel={() => { setUploading(false); cancelUpload(); }}\n                    onUpload={(files) => {\n                        if (files.length > 0) {\n                            if (!files[0].name.endsWith('.csv')) {\n                                setImportIssues({ ...importIssues, error: `File type must be .csv, this file is ${files[0].name}`})\n                                return;\n                            }\n                            setImportIssues({ ...importIssues, error: undefined });\n                            setUploading(true); \n                            importCSV(files[0]).then((response: BulkImportCSVResponse) => {\n                                setUploading(false)\n                                if (canceledUploadRef.current.canceled) {\n                                    canceledUploadRef.current = { canceled: false };\n                                    return;\n                                }\n                                const { failedReadRecords, failedImportRecords, orderItems } = response;\n                                setImportedOrder(orderItems);\n                                const stockIssues = getStockIssues(response.orderItems);\n                                setImportIssues({ ...importIssues, importErrors: failedImportRecords, readErrors: failedReadRecords, ...stockIssues });\n                               \n                                const hasErrors = failedImportRecords.length > 0 \n                                    || failedReadRecords.length > 0 \n                                    || stockIssues.stockErrors.length > 0 \n                                    || stockIssues.stockWarnings.length > 0;\n\n                                const shouldShowConfirmationModal = hasErrors || orderItemCount > 0 ;\n\n                                if (orderItems.length === 0 && !hasErrors) {\n                                    setImportIssues({...importIssues, error: UploadBulkOrderContent.default_fileError});\n                                    return;\n                                }\n                                \n                                setShowUploadBulkOrder(false); \n\n                                if (shouldShowConfirmationModal) {\n                                    setImportedOrder(response.orderItems);\n                                    setShowConfirmBulkOrder(true);\n                                } else {\n                                    addImportedOrderToCart(response.orderItems);\n                                    onClose();\n                                } \n                            }).catch(() => {\n                                setUploading(false);\n                                setImportIssues({...importIssues, error: UploadBulkOrderContent.default_fileError});\n                            })\n                        }\n                    }} \n                    errorMessage={importIssues.error}\n                    uploading={uploading} \n                />\n            )}\n            {showConfirmBulkOrder && (\n                <ConfirmBulkOrderModal \n                    onCloseClick={() => { setShowConfirmBulkOrder(false); onClose(); }} \n                    onAddToCart={() => {\n                        if (importedOrder) addImportedOrderToCart(importedOrder);\n                        onClose();\n                    }} \n                    onReplaceCart={() => {\n                        clearCart();\n                        if (importedOrder) addImportedOrderToCart(importedOrder)\n                        onClose();\n                    }} \n                    onReuploadClick={() => { setShowConfirmBulkOrder(false); setShowUploadBulkOrder(true) }} \n                    importErrors={importIssues.importErrors} \n                    csvReadErrors={importIssues.readErrors} \n                    stockWarnings={importIssues.stockWarnings}\n                    stockErrors={importIssues.stockErrors}\n                    hasSuccessfullRows={importedOrder?.length > 0}\n                />\n            )}\n        </>\n    )\n}","import axios from \"axios\";\nimport APIHost from \"../APIHost\";\nimport ApiUtil from \"../Utils/ApiUtil\";\n\nexport interface OrderOption {\n    code: string,\n    image: null,\n    option1: string,\n    option2: string,\n    option3: string,\n    optionId: number,\n    price: number,\n    quantityOrdered: number,\n    productQuantity?: number,\n    size: string,\n    sizeId: number,\n    sort: number,\n    specialPrice: number,\n    stock: number\n}\n\nexport interface OrderItem {\n    id: number;\n    allowOverselling: boolean;\n    brand: string;\n    currencyCode: string;\n    description: string;\n    images: [],\n    maxPrice: number,\n    maxSpecialPrice: number,\n    minPrice: number,\n    minSpecialPrice: number,\n    name: string,\n    option1Name: string,\n    option2Name: string,\n    option3Name: string,\n    options: null,\n    orderOptions: OrderOption[],\n    orderType: string,\n    sizeRangeId: number,\n    stock: number,\n    styleCode: string,\n    taxRate: null,\n    taxStatus: number\n}\n\nexport interface FailedReadRecord {\n    row: string;\n    rowIndex: number;\n}\n\nexport interface FailedImportRecord {\n    sku: string;\n    barcode: string;\n    size: string;\n    quantity: number;\n}\n\nexport interface BulkImportCSVResponse {\n    orderItems: OrderItem[],\n    failedReadRecords: FailedReadRecord[],\n    failedImportRecords: FailedImportRecord[]\n}\n\nexport async function BulkImportCSV(file: File): Promise<BulkImportCSVResponse> {\n    var headers = new ApiUtil().DefaultHeaders('');\n\n    if (headers === null) {\n        throw new Error ('Unauthenticated');\n    }\n\n    var fileFormData = new FormData();\n    fileFormData.append('CsvFile', file)\n    fileFormData.append('ModuleId', new ApiUtil().GetModuleId())\n    let result;\n\n    try {\n        result = await axios.post<BulkImportCSVResponse>(new APIHost().CheckoutAPI(\"BulkImportCSV\"), fileFormData, headers);\n    } catch (e) {\n        return Promise.reject(e);\n    }\n\n    return result.data;\n}","import { useState, useEffect } from \"react\";\n// Define general type for useWindowSize hook, which includes width and height\ntype Size = {\n    width: number | undefined;\n    height: number | undefined;\n};\n\n// Hook\nexport default function useWindowSize(): Size {\n    // Initialize state with undefined width/height so server and client renders match\n    const [windowSize, setWindowSize] = useState<Size>({\n        width: undefined,\n        height: undefined,\n    });\n    useEffect(() => {\n        // Handler to call on window resize\n        function handleResize() {\n            // Set window width/height to state\n            setWindowSize({\n                width: window.innerWidth,\n                height: window.innerHeight,\n            });\n        }\n        // Add event listener\n        window.addEventListener(\"resize\", handleResize);\n        // Call handler right away so state gets updated with initial window size\n        handleResize();\n        // Remove event listener on cleanup\n        return () => window.removeEventListener(\"resize\", handleResize);\n    }, []); // Empty array ensures that effect is only run on mount\n    return windowSize;\n}\n\nexport function useIsWindowSmall(): boolean {\n    const windowSize = useWindowSize();\n    // Uses medium breakpoint from src\\Theme\\Components\\_Mixins.scss\n    return !!windowSize.width && windowSize.width < 768;\n}\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { useHistory } from \"react-router\";\nimport { CSSTransition, TransitionGroup } from \"react-transition-group\";\n\nimport { RootState } from \"../..\";\nimport { ChangeCurrentCategory, SetGoBack } from \"../../Redux/Actions/CategoryActions\";\nimport { ToggleSideMenu } from \"../../Redux/Actions/HeaderActions\";\nimport { GetCategoriesList } from \"../../Redux/Actions/ProductListActions\";\nimport {\n    findCategoryFromId,\n    findParent,\n    useCategoryRouteObjects,\n    useCurrentCategory,\n    useDefaultParent,\n    useMatchingCategory,\n} from \"../../Utils/CategoriesHelper\";\nimport { useIsWindowSmall } from \"../../Utils/Global/UseWindowSizeHook\";\nimport { CategoryType } from \"../PageElements/Products/ProductCategoryFilter\";\n\nimport \"./Styles/_NavMenu.scss\";\n\nconst NavigationMenu = () => {\n    const history = useHistory();\n    const dispatch = useDispatch();\n    const matchingCategory = useMatchingCategory();\n    const currentCategory = useCurrentCategory();\n    const categoryRouteObjects = useCategoryRouteObjects();\n    const smallScreen = useIsWindowSmall();\n    const defaultParent = useDefaultParent();\n\n    const auth = useSelector((state: RootState) => state.authReducer);\n    const productsList = useSelector((state: RootState) => state.productListReducer);\n    const goBack = useSelector((state: RootState) => state.categoryReducer.goBack);\n\n    const [grandparent, setGrandparent] = useState<CategoryType>();\n\n    // Set the first parent to be the parent of the current page found with query params\n    const initialParent = useMemo(() => {\n        if (matchingCategory) {\n            const initialCategory = findCategoryFromId(defaultParent, matchingCategory.id);\n            return initialCategory && initialCategory.subCategories.length > 0\n                ? initialCategory\n                : findParent(defaultParent, matchingCategory.id);\n        }\n    }, [matchingCategory, defaultParent]);\n\n    const [currentParent, setCurrentParent] = useState<CategoryType>(initialParent || defaultParent);\n\n    const scrollingElement = document.getElementById(\"Sidebar\");\n\n    // If menu page matches the actual page but the parent category is not the category in redux, update redux\n    useEffect(() => {\n        if (\n            currentParent.id === matchingCategory?.id &&\n            JSON.stringify(currentCategory) !== JSON.stringify(currentParent)\n        ) {\n            dispatch(ChangeCurrentCategory(currentParent));\n        }\n    }, [currentParent, matchingCategory?.id, currentCategory, dispatch]);\n\n    // If categories in redux change, set the parent to All Products\n    useEffect(() => {\n        if (defaultParent && currentParent.subCategories.length < 1) {\n            setCurrentParent(defaultParent);\n        }\n    }, [defaultParent, currentParent.subCategories.length]);\n\n    // When we change page, make sure the initial menu category is the correct one\n    useEffect(() => {\n        if (currentCategory.id === matchingCategory?.id && currentCategory.subCategories.length > 0) {\n            setCurrentParent(currentCategory);\n        }\n    }, [currentCategory, matchingCategory?.id]);\n\n    // When currentParent changes, set the new grandparent\n    useEffect(() => {\n        if (currentParent) {\n            const newGrandparent = findParent(defaultParent, currentParent.id);\n            if (newGrandparent) setGrandparent(newGrandparent);\n        }\n    }, [currentParent, defaultParent]);\n\n    // If the url changes, update the redux category state\n    useEffect(() => {\n        if (matchingCategory?.id) {\n            const newMatch = findCategoryFromId(defaultParent, matchingCategory.id);\n            if (newMatch && newMatch.id !== currentCategory.id) dispatch(ChangeCurrentCategory(newMatch));\n        }\n    }, [matchingCategory?.id, defaultParent, currentCategory, dispatch]);\n\n    // On load, fetch the categories if not already done or in progress\n    useEffect(() => {\n        if (\n            (productsList.categoriesFetched && productsList.numberOfCategories !== null) ||\n            productsList.isFetchingCategories\n        )\n            return;\n        dispatch(GetCategoriesList(auth.subscribedToken));\n    }, [\n        dispatch,\n        auth.subscribedToken,\n        productsList.categoriesFetched,\n        productsList.isFetchingCategories,\n        productsList.numberOfCategories,\n    ]);\n\n    const onClickCategoryMenuItem = async (childCategory?: CategoryType, toPath?: string, back?: boolean) => {\n        if (childCategory) {\n            if (childCategory.subCategories.length === 0 || childCategory.id === currentParent.id) {\n                const newPath = categoryRouteObjects.find((routeObject) => routeObject.id === childCategory.id)?.path;\n                history.push(`/products/?t=${newPath}`);\n                smallScreen && dispatch(ToggleSideMenu());\n            } else {\n                // Someone tell me why this works\n                await dispatch(SetGoBack(back || false));\n                setCurrentParent(childCategory);\n                scrollingElement?.scrollTo({ behavior: \"auto\", top: 0, left: 0 });\n            }\n        } else if (toPath) {\n            switch (toPath) {\n                case \"/products/\":\n                    await dispatch(SetGoBack(back || false));\n                    history.push(toPath);\n                    dispatch(ChangeCurrentCategory(defaultParent));\n                    setCurrentParent(defaultParent);\n                    smallScreen && dispatch(ToggleSideMenu());\n                    break;\n                default:\n                    await dispatch(SetGoBack(back || false));\n                    history.push(\"/products\");\n                    dispatch(ChangeCurrentCategory(defaultParent));\n                    setCurrentParent(defaultParent);\n                    smallScreen && dispatch(ToggleSideMenu());\n                    break;\n            }\n        }\n    };\n\n    const onClickGoBack = async () => {\n        const newParent = grandparent;\n        if (newParent) {\n            // Someone tell me why this works\n            await dispatch(SetGoBack(true));\n            setCurrentParent(newParent);\n        }\n    };\n\n    const Menu = (\n        <>\n            {!smallScreen && (\n                <li\n                    onClick={() => onClickCategoryMenuItem(undefined, \"/products/\", true)}\n                    className={`menu-item top-item ${matchingCategory?.id === -1 && \"current\"} ${\n                        currentParent.id !== defaultParent.id && \"desktop-only\"\n                    }`}\n                >\n                    {\"All Products\"}\n                </li>\n            )}\n            <TransitionGroup transitionname=\"catnav\" className=\"transition-group\">\n                <CSSTransition\n                    key={currentParent.id}\n                    addEndListener={(node, done) => {\n                        node.addEventListener(\"transitionend\", done, true);\n                    }}\n                    timeout={500}\n                    classNames={`animate-menu-${goBack ? \"backwards\" : \"forwards\"}`}\n                >\n                    <div className={`navigation-menu-list`}>\n                        {smallScreen && (\n                            <li\n                                onClick={() => onClickCategoryMenuItem(undefined, \"/products/\")}\n                                className={`menu-item top-item ${matchingCategory?.id === -1 && \"current\"} ${\n                                    currentParent.id !== defaultParent.id && \"desktop-only\"\n                                }`}\n                            >\n                                {\"All Products\"}\n                            </li>\n                        )}\n                        {grandparent && currentParent.id >= 0 && (\n                            <>\n                                {!smallScreen && <hr />}\n                                <li className={`menu-item back top-item`} onClick={() => onClickGoBack()}>\n                                    {<i className=\"fa fa fa-chevron-left\"></i>}\n                                    {\"Back\"}\n                                </li>\n                            </>\n                        )}\n                        <hr />\n                        {smallScreen && currentParent.id >= 0 && (\n                            <li className={`menu-item title`}>{currentParent.name}</li>\n                        )}\n                        {currentParent.id >= 0 && (\n                            <li\n                                className={`menu-item ${matchingCategory?.id === currentParent.id && \"current\"}`}\n                                onClick={() => onClickCategoryMenuItem(currentParent)}\n                            >\n                                {`All ${currentParent.name}`}\n                            </li>\n                        )}\n                        {currentParent.subCategories.map((child) => {\n                            return (\n                                <li\n                                    className={`menu-item ${matchingCategory?.id === child.id && \"current\"}`}\n                                    onClick={() => onClickCategoryMenuItem(child)}\n                                    key={child.id}\n                                >\n                                    {child.name}\n                                    {child.subCategories.length !== 0 && <i className=\"fa fa fa-chevron-right\"></i>}\n                                </li>\n                            );\n                        })}\n                    </div>\n                </CSSTransition>\n            </TransitionGroup>\n        </>\n    );\n\n    return productsList.categoriesFetched && productsList.categories.length === 0 ? (\n        <div className={\"empty-nav-menu\"}></div>\n    ) : (\n        <div className={\"nav-menu\"}>\n            <ul>{Menu}</ul>\n        </div>\n    );\n};\n\nexport default NavigationMenu;\n","import React, { Component, SyntheticEvent } from \"react\";\nimport { Link, RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { NavLink } from \"reactstrap\";\nimport { connect } from \"react-redux\";\nimport download from \"downloadjs\";\nimport { History } from \"history\";\nimport { Button, UploadSimpleIcon } from \"@cin7/ui\";\n\nimport QuoteIcon from \"../../Images/Icons/Account/QuoteIcon\";\nimport { UserIcon } from \"../../Images/Icons/Account/UserIcon\";\nimport { LogoutIcon } from \"../../Images/Icons/Account/LogoutIcon\";\nimport { GenericIcon } from \"../../Images/Icons/Account/GenericIcon\";\nimport { LogoutB2BUser } from \"./../../Redux/Actions/AuthActions\";\nimport { GetUserDetails } from \"./../../Redux/Actions/IdentityActions\";\nimport { ToggleSideMenu } from \"./../../Redux/Actions/HeaderActions\";\nimport { B2BPageTitles } from \"../../Language/Default_Settings\";\nimport { UploadBulkOrder } from \"../PageElements/Orders/UploadBulkOrder\";\nimport { BulkImportCSV } from \"../../Domain/BulkImportCSV\";\nimport { OrderReviewRoute } from \"../../Routes\";\nimport NavigationMenu from \"./NavigationMenu\";\n\nimport \"./Styles/_SideMenu.scss\";\n\ninterface componentProps {\n    history: History;\n    header: {\n        isMenuOpen: boolean;\n    };\n    identity: {\n        userInfo: {\n            firstName: string;\n            lastName: string;\n            company: string;\n        };\n        moduleSettings: {\n            termsAndConditionsContent: string;\n            customPage1Title: string;\n            customPage1Content: string;\n            customPage2Title: string;\n            customPage2Content: string;\n        };\n    };\n    auth: {\n        subscribedToken: string;\n    };\n    ToggleSideMenu: () => void;\n    GetUserDetails: (token: string) => void;\n    LogoutB2BUser: () => void;\n}\n\nclass SideMenu extends Component<\n    RouteComponentProps & componentProps,\n    { showBulkOrder: boolean; smallScreen: boolean | undefined; height: number }\n> {\n    constructor(props: RouteComponentProps & componentProps) {\n        super(props);\n        this.state = { showBulkOrder: false, smallScreen: undefined, height: 0 };\n    }\n\n    componentDidMount() {\n        if (!this.props.identity.userInfo.firstName && !this.props.identity.userInfo.company) {\n            this.props.GetUserDetails(this.props.auth.subscribedToken);\n        }\n\n        window.addEventListener(\"resize\", this.handleResize);\n        this.handleResize();\n    }\n    componentWillUnmount() {\n        window.removeEventListener(\"resize\", this.handleResize);\n    }\n\n    componentDidUpdate(prevProps: any) {\n        if (prevProps.auth.subscribedToken !== this.props.auth.subscribedToken) {\n            this.props.GetUserDetails(this.props.auth.subscribedToken);\n        }\n    }\n\n    handleResize = () => {\n        this.setState({ height: window.innerHeight });\n        if (window.innerWidth < 768) {\n            this.setState({ smallScreen: true });\n        } else {\n            this.setState({ smallScreen: false });\n        }\n    };\n\n    render() {\n        const { header, identity } = this.props;\n        const hasNameAndCompany =\n            identity.userInfo.company && (identity.userInfo.firstName || identity.userInfo.lastName);\n        const stickyContainerHeight = document.querySelector(\".account-sticky-container\")?.clientHeight;\n\n        const ProfileInfo = (\n            <div className=\"profile-info\">\n                <div className=\"profile-name\">\n                    {identity.userInfo.firstName} {identity.userInfo.lastName}\n                    {hasNameAndCompany ? \" — \" : \"\"}\n                    <span className=\"profile-company\">{identity.userInfo.company}</span>\n                </div>\n            </div>\n        );\n\n        const TermsContainer = (\n            <div className=\"terms-container\">\n                <NavLink href=\"https://www.cin7.com/legal/terms-of-use/\" target=\"_blank\" rel=\"noopener noreferrer\">\n                    Powered by Cin7\n                </NavLink>\n            </div>\n        );\n\n        const AccountLinks = (\n            <>\n                <div className=\"account-link my-account\">\n                    <Link to={\"/account/details\"} onClick={this._closeMenuOnNavigate}>\n                        <UserIcon strokeColor={\"#00326b\"} />\n                        <span className=\"label\">My Account</span>\n                    </Link>\n                </div>\n                <div className=\"account-link order-history\">\n                    <Link to={\"/account/orders\"} onClick={this._closeMenuOnNavigate}>\n                        <QuoteIcon strokeColor={\"#00326b\"} />\n                        <span className=\"label\">Order History</span>\n                    </Link>\n                </div>\n                <div className=\"account-link bulk-upload\">\n                    <Link\n                        to={\"#\"}\n                        onClick={() => {\n                            this.setState({ showBulkOrder: true });\n                            this.props.ToggleSideMenu();\n                        }}\n                    >\n                        <div className=\"upload-icon\">\n                            <UploadSimpleIcon />\n                        </div>\n                        <span className=\"label\">Upload a Bulk Order</span>\n                    </Link>\n                </div>\n            </>\n        );\n\n        const Desktop = () => {\n            return (\n                <>\n                    <div className=\"account-content\">\n                        {ProfileInfo}\n                        <div className=\"account-links\">\n                            {AccountLinks}\n\n                            <div className=\"account-logout\">\n                                <Button className=\"logout-button\" onClick={this._logoutUser} variant=\"secondary\">\n                                    Log out\n                                </Button>\n                            </div>\n                        </div>\n                    </div>\n                    <div className=\"nav-footer-content\">\n                        {identity.moduleSettings && identity.moduleSettings.customPage1Content && (\n                            <div className=\"footer-item\">\n                                <Link to={\"/seller/page-1\"} onClick={this._closeMenuOnNavigate}>\n                                    {identity.moduleSettings.customPage1Title\n                                        ? identity.moduleSettings.customPage1Title\n                                        : B2BPageTitles.custom_page_1_title}\n                                </Link>\n                            </div>\n                        )}\n                        {identity.moduleSettings && identity.moduleSettings.customPage2Content && (\n                            <div className=\"footer-item\">\n                                <Link to={\"/seller/page-2\"} onClick={this._closeMenuOnNavigate}>\n                                    {identity.moduleSettings.customPage2Title\n                                        ? identity.moduleSettings.customPage2Title\n                                        : B2BPageTitles.custom_page_2_title}\n                                </Link>\n                            </div>\n                        )}\n                        {identity.moduleSettings && identity.moduleSettings.termsAndConditionsContent && (\n                            <div className=\"footer-item\">\n                                <Link to={\"/seller/terms-and-conditions\"} onClick={this._closeMenuOnNavigate}>\n                                    {B2BPageTitles.seller_terms_and_conditions_title}\n                                </Link>\n                            </div>\n                        )}\n                        {TermsContainer}\n                    </div>\n                </>\n            );\n        };\n\n        const Mobile = () => {\n            return (\n                <>\n                    <div className=\"account-content\">\n                        {ProfileInfo}\n                        <div className=\"account-links\">\n                            {AccountLinks}\n\n                            {identity.moduleSettings && identity.moduleSettings.customPage1Content && (\n                                <div className=\"account-link\">\n                                    <Link to={\"/seller/page-1\"} onClick={this._closeMenuOnNavigate}>\n                                        <GenericIcon strokeColor={\"#00326b\"} />\n                                        <span className=\"label\">\n                                            {identity.moduleSettings.customPage1Title\n                                                ? identity.moduleSettings.customPage1Title\n                                                : B2BPageTitles.custom_page_1_title}\n                                        </span>\n                                    </Link>\n                                </div>\n                            )}\n                            {identity.moduleSettings && identity.moduleSettings.customPage2Content && (\n                                <div className=\"account-link\">\n                                    <Link to={\"/seller/page-2\"} onClick={this._closeMenuOnNavigate}>\n                                        <GenericIcon strokeColor={\"#00326b\"} />\n                                        <span className=\"label\">\n                                            {identity.moduleSettings.customPage2Title\n                                                ? identity.moduleSettings.customPage2Title\n                                                : B2BPageTitles.custom_page_2_title}\n                                        </span>\n                                    </Link>\n                                </div>\n                            )}\n                            {identity.moduleSettings && identity.moduleSettings.termsAndConditionsContent && (\n                                <div className=\"account-link\">\n                                    <Link to={\"/seller/terms-and-conditions\"} onClick={this._closeMenuOnNavigate}>\n                                        <GenericIcon strokeColor={\"#00326b\"} />\n                                        <span className=\"label\">{B2BPageTitles.seller_terms_and_conditions_title}</span>\n                                    </Link>\n                                </div>\n                            )}\n\n                            <div className=\"account-link logout\">\n                                <Link to={\"\"} onClick={this._logoutUser}>\n                                    <LogoutIcon strokeColor={\"#00326b\"} />\n                                    <span className=\"label\">Log Out</span>\n                                </Link>\n                            </div>\n                        </div>\n                    </div>\n                    {TermsContainer}\n                </>\n            );\n        };\n\n        return (\n            <>\n                <div id=\"Sidebar\" className={header.isMenuOpen ? \"active\" : \"\"}>\n                    <div\n                        className=\"nav-content\"\n                        style={{\n                            paddingBottom:\n                                this.state.smallScreen && this.state.height <= 700 ? 0 : stickyContainerHeight,\n                        }}\n                    >\n                        {this.state.smallScreen && <NavigationMenu />}\n                        <div className={`${this.state.smallScreen ? \"account-sticky-container\" : \"plain-div\"}`}>\n                            {this.state.smallScreen ? <Mobile /> : <Desktop />}\n                        </div>\n                    </div>\n                </div>\n                {header.isMenuOpen && !this.state.smallScreen && (\n                    <div className=\"shadow-bg\" onClick={this._toggleMenu}></div>\n                )}\n                {this.state.showBulkOrder && (\n                    <UploadBulkOrder\n                        downloadTemplate={() => {\n                            download(\"Sku, Barcode, Quantity, Size\", \"template.csv\", \"text/csv\");\n                        }}\n                        onClose={() => this.setState({ showBulkOrder: false })}\n                        importCSV={BulkImportCSV}\n                        onImportSuccess={() => {\n                            this.props.history.push(OrderReviewRoute);\n                        }}\n                    />\n                )}\n            </>\n        );\n    }\n\n    _closeMenuOnNavigate = () => {\n        this.props.ToggleSideMenu();\n    };\n\n    _toggleMenu = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this.props.ToggleSideMenu();\n    };\n\n    _logoutUser = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this.props.LogoutB2BUser();\n    };\n}\n\nconst MapStateToProps = (state: { appSettingsReducer: any; identityReducer: any; authReducer: any }) => ({\n    header: state.appSettingsReducer,\n    identity: state.identityReducer,\n    auth: state.authReducer,\n});\n\nconst RouterWrapped = withRouter(SideMenu);\nexport default connect(MapStateToProps, { ToggleSideMenu, LogoutB2BUser, GetUserDetails })(RouterWrapped);\n","import React, { Component } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { GetTaxLabel } from '../../Utils/OrderHelper';\nimport { connect } from 'react-redux';\n\nimport './Styles/_MiniCartTax.scss';\n\ninterface componentProps extends Partial<RouteComponentProps> {\n    identity: {\n        userInfo: {\n            priceTier: {\n                currencyCode: string;\n                taxStatus: string;\n            }\n        }\n    };\n}\n\nclass MiniCartTax extends Component<componentProps, {}> {\n    render() {\n        const { identity } = this.props;\n\n        return (\n            <div className=\"mini-cart-tax\">\n                {identity && identity.userInfo && identity.userInfo.priceTier &&\n                    <div className=\"mini-cart-tax-type\">\n                        <div className=\"mini-cart-tax-currency\">{identity.userInfo.priceTier.currencyCode}</div>\n                        <div className=\"mini-cart-tax-variance\">{GetTaxLabel(identity.userInfo.priceTier.taxStatus)}</div>\n                    </div>}\n            </div>\n        );\n    }\n}\n\nconst MapStateToProps = (state: { identityReducer: any; }) => ({\n    identity: state.identityReducer\n});\n\nexport default connect(MapStateToProps)(MiniCartTax);","import React from 'react';\n\nexport const SearchIcon: React.FC = () => {\n    return (\n        <svg width=\"33\" height=\"33\" viewBox=\"0 0 33 33\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Search</title>\n            <path d=\"M13.3333 25.6667C20.1448 25.6667 25.6667 20.1448 25.6667 13.3333C25.6667 6.52182 20.1448 1 13.3333 1C6.52182 1 1 6.52182 1 13.3333C1 20.1448 6.52182 25.6667 13.3333 25.6667Z\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M31.6673 31.6667L22.334 22.3334\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n        </svg>\n    );\n}\n","import React, { SyntheticEvent } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { SearchIcon } from \"../../Images/Icons/Global/SearchIcon\";\nimport { ResetSideMenu } from \"../../Redux/Actions/HeaderActions\";\n\nimport \"./Styles/_HeaderSearch.scss\";\n\ntype Props = {\n    closeModal: (e: SyntheticEvent) => void;\n};\n\nconst HeaderSearch = (props: Props) => {\n    const dispatch = useDispatch();\n\n    const onClickSearchBox = (e: SyntheticEvent) => {\n        props.closeModal(e);\n        dispatch(ResetSideMenu());\n    };\n\n    return (\n        <div className=\"header-search-container\" id=\"Header-Search\" onClick={(e) => onClickSearchBox(e)}>\n            <SearchIcon />\n            <div className=\"search-label\">Search</div>\n        </div>\n    );\n};\n\nexport default HeaderSearch;\n","import React, { Component } from 'react';\n\ninterface componentProps {\n    fillColor?: string;\n}\n\ninterface componentState {\n    fillColor: string;\n}\n\nclass ClearInputBoldIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            fillColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColor) {\n            this.setState({\n                fillColor: this.props.fillColor\n            });\n        }\n    }\n    \n    render() {\n        const { fillColor } = this.state;\n        \n        const cls1 = {\n            stroke: fillColor,\n            fill: fillColor\n        }\n        \n        return (\n            <svg width=\"24\" height=\"24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Clear</title>\n                <path d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10zm-7.414-5.414L12 9.172 9.414 6.586a2 2 0 1 0-2.828 2.828L9.172 12l-2.586 2.586a2 2 0 1 0 2.828 2.828L12 14.828l2.586 2.586a2 2 0 1 0 2.828-2.828L14.828 12l2.586-2.586a2 2 0 1 0-2.828-2.828z\" style={cls1} strokeWidth=\"2\" />\n            </svg>\n         );\n    }\n}\n \nexport default ClearInputBoldIcon;","import axios from \"axios\";\nimport APIHost from \"../APIHost\";\nimport ApiUtil from \"../Utils/ApiUtil\";\n\nexport interface ProductName {\n    id: number;\n    name: string;\n    styleCode: string;\n}\n\nexport interface ProductNameSearchResponse {\n    products: ProductName[];\n}\n\nexport async function ProductNameSearch(searchCriteria: string): Promise<ProductNameSearchResponse> {\n    var headers = new ApiUtil().DefaultHeaders('');\n\n    if (headers === null) {\n        throw new Error ('Unauthenticated');\n    }\n\n    let result;\n\n    try {\n        result = await axios.post<ProductNameSearchResponse>(new APIHost().ProductsAPI(\"GetProductNames\"), { keyword: searchCriteria, moduleId: new ApiUtil().GetModuleId() }, headers);\n    } catch (e) {\n        return Promise.reject(e);\n    }\n\n    return result.data;\n}","import React, { SyntheticEvent, useState, useEffect, useRef, useMemo, ChangeEvent } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { SearchIcon } from '../../Images/Icons/Global/SearchIcon';\nimport ClearInputIcon from '../../Images/Icons/ClearInputBoldIcon';\nimport { useHistory } from 'react-router';\nimport { debounce, escapeRegExp } from 'lodash-es'\nimport { Button, Typography } from '@cin7/ui';\n\nimport { ProductNameSearch } from '../../Domain/ProductNameSearch';\nimport { StripHTMLFromInputs } from '../../Utils/B2BHelpers';\nimport Loading from './Loading'\nimport { ShowProductDetails } from '../../Redux/Actions/ProductDetailsActions';\n\nimport './Styles/_SearchModal.scss';\n\ninterface componentProps {\n    closeModal: (e?: SyntheticEvent) => void;\n}\n\ntype AutoCompleteResultsType = {\n    title: string,\n    code: string,\n    id: number,\n};\n\nexport const SearchModal = (props: componentProps) => {\n    const [query, setQuery] = useState(\"\");\n    const [fetching, setFetching] = useState(false);\n    const [error, setError] = useState<string>();\n    const dispatch = useDispatch();\n    const showProductDetails = (productId: number) => dispatch(ShowProductDetails(productId));\n    const [autoCompleteResults, setAutoCompleteResults] = useState<AutoCompleteResultsType[]>([]);\n    const wrapperRef = useRef<HTMLDivElement>(null);\n    const history = useHistory();\n    const closeModal = props.closeModal;\n\n    useEffect(() => {\n        const handleClickOutside = (event: MouseEvent) => {\n            if (wrapperRef && !wrapperRef.current?.contains(event.target as Node)) {\n                closeModal()\n            }\n        }\n    \n        document.addEventListener('mousedown', handleClickOutside);\n        // Remove the listener on unmount\n        return () => document.removeEventListener('mousedown', handleClickOutside);\n    }, [closeModal])\n\n    const fetchProductNames = async (query: string) => {\n        try {\n            setError(undefined);\n            setFetching(true);\n            const result = await ProductNameSearch(query);\n            const mappedProductOptions = result.products.map(p => ({title: p.name, code: p.styleCode, id: p.id}));\n            setAutoCompleteResults(mappedProductOptions)\n        } catch {\n            setAutoCompleteResults([]);\n            setError(\"Unable to load products\");\n        } finally {\n            setFetching(false);\n        }\n    }\n\n    const debouncedFetchProductNames = useMemo(\n        () => debounce(fetchProductNames, 350)\n    , []);\n\n    // Stop the invocation of the debounced function after unmounting\n    useEffect(() => {\n      return () => {\n        debouncedFetchProductNames.cancel();\n      }\n    }, [debouncedFetchProductNames]);\n\n    const _handleSearch = (query: string) => {\n        setFetching(true);\n        setQuery(query);\n        debouncedFetchProductNames(query);\n    }\n\n    const _handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n        if (!e.target.value) {\n            setQuery(\"\");\n            return;\n        }\n        \n        _handleSearch(e.target.value);\n    }\n\n    const _handleOptionSelected = (_: React.MouseEvent<HTMLDivElement>, id: number) => {\n        props.closeModal();\n        showProductDetails(id);\n    }\n\n    const _navigate = (e: SyntheticEvent, title?: string) => {\n        e.preventDefault();\n        props.closeModal(e);\n        history.push(`/products/?query=${encodeURIComponent(title ?? \"\")}`)\n    }\n\n    const _onClear = (e:React.MouseEvent<any, MouseEvent>) => {\n        e.preventDefault();\n\n        let targetFormGroup = e.currentTarget.parentNode;\n        let targetInput = targetFormGroup.querySelector(\".cin7-input\");\n\n        setQuery(\"\");\n \n        targetInput.focus();\n    }\n\n    const withBoldMatchedChars = (title: string) => {\n        // Match case insensitive\n        const regex = new RegExp(\"(\" + escapeRegExp(query) + \")\", \"gi\");\n        return title.replace(regex, '<b>$1</b>');\n    }\n\n    const getProductCodeText = (code: string) => {\n        return code !== \"\" ? \" - \" + code : code;\n    }\n\n    return (\n        <div id=\"Search-Modal\" ref={wrapperRef}>\n            <div className=\"modal-overlay\" onClick={props.closeModal}></div>\n            <div className=\"search-background\"></div>\n            <div className=\"search-container\">\n                <div className=\"search-input-container\">\n                    <div className=\"search-button\" onClick={(e) => _navigate(e, query)}><SearchIcon /></div>\n                    <form className=\"search-label\" onSubmit={(e) => _navigate(e, query)}>\n                        <input className=\"cin7-input\" value={query} onChange={_handleChange} autoFocus />\n                    </form>\n                    <div className=\"clear-icon\" onClick={_onClear}><ClearInputIcon fillColor=\"#B2B2B2\" /></div>\n                    <div className=\"cancel-button\" onClick={props.closeModal} >Cancel</div>\n                </div>\n            </div>\n            <div className=\"search-results\">\n                {query.length > 0 && (\n                    <>\n                        <div className=\"results\">\n                            {fetching ? (\n                                <Loading inLine />\n                            )   :   (\n                                !!error ? (\n                                    <>\n                                        <Typography variant={\"h2\"}>Sorry, we were unable to load products</Typography>\n                                        <Typography variant={'body1'} gutterBottom>Please try again or contact us with a screenshot</Typography>\n                                        <Button onClick={() => {setError(\"\"); _handleSearch(query)}}>Try Again</Button>\n                                    </>\n                                ) : (\n                                    <>\n                                    <div className=\"products\">\n                                        {autoCompleteResults.length === 0 && (\n                                            <Typography variant={\"h4\"}>No products found matching \"{query}\"</Typography>\n                                        )}\n                                        {autoCompleteResults.map((result: any) => {\n                                            return <div className=\"result\" key={result.id} onClick={(e) => _handleOptionSelected(e, result.id) } dangerouslySetInnerHTML={{ __html: withBoldMatchedChars(StripHTMLFromInputs(result.title)) + \"<span class=\\\"result-sku\\\">\" + withBoldMatchedChars(StripHTMLFromInputs(getProductCodeText(result.code))) + \"</span>\" }}></div>\n                                        })}\n                                        </div>\n                                        \n                                        {autoCompleteResults.length === 12 && (\n                                            <Button fullWidth variant=\"secondary\" className=\"view-more-button\" onClick={(e) => _navigate(e, query)} >View More</Button>\n                                        )}\n                                    </>\n                                )\n                            )}\n                        </div>\n                    </>\n                )}\n            </div>\n        </div>\n    )\n}\n\nexport default SearchModal;","import React from 'react';\n\nexport const MenuIcon: React.FC = () => {\n    return (\n        <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Menu</title>\n            <path d=\"M8.32035 14.4H37.1204C37.6503 14.4 38.0804 13.9709 38.0804 13.44C38.0804 12.9091 37.6503 12.48 37.1204 12.48H8.32035C7.79043 12.48 7.36035 12.9091 7.36035 13.44C7.36035 13.9709 7.78947 14.4 8.32035 14.4Z\" fill=\"#00326B\" />\n            <path d=\"M8.32035 35.52H37.1204C37.6503 35.52 38.0804 35.0909 38.0804 34.56C38.0804 34.0291 37.6503 33.6 37.1204 33.6H8.32035C7.79043 33.6 7.36035 34.0291 7.36035 34.56C7.36035 35.0909 7.78947 35.52 8.32035 35.52Z\" fill=\"#00326B\" />\n            <path d=\"M8.32035 24.96H37.1204C37.6503 24.96 38.0804 24.5309 38.0804 24C38.0804 23.4692 37.6503 23.04 37.1204 23.04H8.32035C7.79043 23.04 7.36035 23.4692 7.36035 24C7.36035 24.5309 7.78947 24.96 8.32035 24.96Z\" fill=\"#00326B\" />\n        </svg>\n    );\n}","import React from 'react';\n\nexport const CartIcon: React.FC = () => {\n    return (\n        <svg width=\"34\" height=\"34\" viewBox=\"0 0 34 34\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Cart</title>\n            <path d=\"M5.24707 7.95654H31.1782C31.3921 7.9565 31.6032 8.00579 31.795 8.1006C31.9868 8.1954 32.1541 8.33315 32.284 8.50315C32.4139 8.67315 32.5028 8.87082 32.5439 9.08078C32.585 9.29074 32.577 9.50735 32.5208 9.71376L29.6644 20.1847C29.4236 21.0681 28.899 21.8478 28.1714 22.4037C27.4438 22.9596 26.5536 23.2608 25.638 23.2609H8.46933\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M1 1H1.52591C2.16434 1.00003 2.78334 1.2196 3.27909 1.62187C3.77483 2.02415 4.11718 2.58466 4.24869 3.20939L8.88312 25.2254C9.01464 25.8501 9.35698 26.4106 9.85273 26.8129C10.3485 27.2152 10.9675 27.4347 11.6059 27.4348H27.4348\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M10.7393 33.0001C11.8919 33.0001 12.8263 32.0657 12.8263 30.9131C12.8263 29.7605 11.8919 28.8262 10.7393 28.8262C9.5867 28.8262 8.65234 29.7605 8.65234 30.9131C8.65234 32.0657 9.5867 33.0001 10.7393 33.0001Z\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M24.6524 33.0001C25.805 33.0001 26.7393 32.0657 26.7393 30.9131C26.7393 29.7605 25.805 28.8262 24.6524 28.8262C23.4998 28.8262 22.5654 29.7605 22.5654 30.9131C22.5654 32.0657 23.4998 33.0001 24.6524 33.0001Z\" stroke=\"#00326B\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n        </svg>\n    );\n}\n","import React, { SyntheticEvent, useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { useHistory } from \"react-router\";\n\nimport { ResetSideMenu, ToggleSideMenu } from \"./../../Redux/Actions/HeaderActions\";\nimport Image from \"./Image\";\nimport MiniCartTax from \"../PageElements/MiniCartTax\";\nimport HeaderSearch from \"../Global/HeaderSearch\";\nimport SearchModal from \"./SearchModal\";\nimport { MenuIcon } from \"../../Images/Icons/Global/MenuIcon\";\nimport { CartIcon } from \"../../Images/Icons/Orders/CartIcon\";\nimport CloseIcon from \"../../Images/Icons/Global/CloseIcon\";\nimport { FormatAmount } from \"../../Utils/OrderHelper\";\nimport { getCartItemsTotal, getOrderItemCount } from \"../../Redux/Selectors/OrderSelectors\";\nimport { getStoreLogo } from \"../../Redux/Selectors/SettingsSelectors\";\nimport PriceDisplay from \"./PriceDisplay\";\nimport { useIsWindowSmall } from \"../../Utils/Global/UseWindowSizeHook\";\nimport { RootState } from \"../..\";\n\nimport \"./Styles/_Header.scss\";\n\nexport const Header = () => {\n    const [activeModal, setActiveModal] = useState(false);\n    const maxTotalItems = 9999999;\n    const totalCartItems = useSelector(getOrderItemCount);\n    const cartItemsTotal = useSelector(getCartItemsTotal);\n    const logoImageUrl = useSelector(getStoreLogo);\n    const isMenuOpen = useSelector((state: RootState) => state.appSettingsReducer.isMenuOpen);\n    const storeName = useSelector((state: RootState) => state.brandingReducer.storeName);\n    const smallScreen = useIsWindowSmall();\n    const history = useHistory();\n    const dispatch = useDispatch();\n\n    const toggleMenu = (e: SyntheticEvent) => {\n        e.preventDefault();\n        dispatch(ToggleSideMenu());\n    };\n\n    const toggleModal = (e?: SyntheticEvent) => {\n        e?.preventDefault();\n\n        setActiveModal(!activeModal);\n    };\n\n    const onClickLink = (e: SyntheticEvent, to: string) => {\n        e.preventDefault();\n        dispatch(ResetSideMenu());\n        history.push(to);\n    };\n\n    const totalCartItemsDisplay = () => {\n        if (totalCartItems > maxTotalItems) {\n            return `${FormatAmount(maxTotalItems)}+`;\n        } else {\n            return FormatAmount(totalCartItems);\n        }\n    };\n\n    return (\n        <>\n            <div className=\"main-header\">\n                <div className=\"nav-menu-toggle-container\">\n                    <div id=\"Open-Nav\" className=\"menu-button\" onClick={toggleMenu}>\n                        {smallScreen && isMenuOpen ? <CloseIcon strokeColor={\"#00326B\"} /> : <MenuIcon />}\n                    </div>\n                </div>\n                <div className=\"logo-container\">\n                    <div className={logoImageUrl ? \"company-logo\" : \"company-store-name\"}>\n                        <Link className={logoImageUrl ? \"logo-link\" : \"logo-link-store-name\"} to={\"/\"} onClick={(e) => onClickLink(e, \"/\")}>\n\n                            {logoImageUrl ? (<Image imagePath={logoImageUrl} altText={storeName} logo={true} />) : \n                            (<h2 className=\"store-name\">{storeName}</h2>)}\n\n                        </Link>\n                    </div>\n                </div>\n                <div className=\"search-container\">\n                    <HeaderSearch closeModal={toggleModal} />\n                </div>\n                <div className=\"tax-container\">\n                    <MiniCartTax />\n                </div>\n                <div className=\"cart-container\">\n                    <div className=\"mini-cart-container\">\n                        <Link className=\"cart-link\" to={\"/cart\"} onClick={(e) => onClickLink(e, \"/cart\")}>\n                            <div className=\"mini-cart-order-quantity\">{totalCartItemsDisplay()}</div>\n                            <div className=\"cart-icon-container\">\n                                <CartIcon />\n                            </div>\n                            <div className=\"cart-order-quantity\">\n                                <div>\n                                    {totalCartItemsDisplay()} Item{totalCartItems === 1 ? \"\" : \"s\"}\n                                </div>\n                                <div>{<PriceDisplay value={cartItemsTotal} />}</div>\n                            </div>\n                            <div className=\"cart-arrow-icon-container\">\n                                <i className=\"icon fas fa-chevron-right\"></i>\n                            </div>\n                        </Link>\n                    </div>\n                </div>\n            </div>\n            {activeModal && <SearchModal closeModal={toggleModal} />}\n        </>\n    );\n};\n","import React, {Component, CSSProperties} from 'react';\n\ninterface componentProps {\n    strokeColor?: string;\n}\n\ninterface componentStates extends componentProps {}\n\nclass BackArrowIcon extends Component<componentProps,componentStates> {\n\n    constructor(props:componentProps) {\n        super(props);\n        this.state = {\n            strokeColor: \"#000\"\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.strokeColor) {\n            this.setState({\n                strokeColor: this.props.strokeColor\n            });\n        }\n    }\n\n    render() {\n\n        const { strokeColor } = this.state;\n        \n        const cls1: CSSProperties = {\n            stroke: strokeColor\n        }\n\n        return (\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Back</title>\n                <path d=\"M10.5 16L6 12M6 12L10.5 8M6 12H18\" style={cls1} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n            </svg>\n\n        )\n    }\n}\n\nexport default BackArrowIcon;","import React, { Component } from 'react';\nimport {RouteComponentProps} from 'react-router-dom'\nimport { withRouter } from 'react-router';\n\nimport BackArrowIcon from '../../Images/Icons/NavigationIcons/BackArrowIcon';\n\nimport './Styles/_GoBack.scss';\n\ninterface componentProps extends RouteComponentProps<any> {\n    goBackAttributes?: {\n        specificRoute: string;\n        linkText: string;\n    };\n}\n\nclass GoBack extends Component<componentProps,{}> {\n\n    render() {\n\n        const { goBackAttributes } = this.props;\n\n        const RenderButton = () => {\n            if(goBackAttributes) {\n                return(\n                    <button className={`go-back-button`} onClick={() => this.props.history.push(goBackAttributes.specificRoute)}>\n                        <div className=\"back-icon\"><BackArrowIcon strokeColor=\"#393939\" /></div>\n                        {goBackAttributes.linkText && <div className=\"link-text\">{goBackAttributes.linkText}</div>}\n                    </button>\n                );\n            }\n            \n            return(\n                <button className=\"go-back-button\" onClick={() => this.props.history.goBack()}>\n                    <div className=\"back-icon\"><BackArrowIcon strokeColor=\"#393939\" />Back</div>\n                </button>\n            );\n        }\n\n        return <RenderButton />\n    }\n    \n}\n\nexport default withRouter(GoBack);","import React, { Component } from 'react';\nimport GoBack from '../PageElements/GoBack';\nimport './Styles/_ReturnPanel.scss';\nimport MoreActionsDropdown from './MoreActionsDropdown';\n\ninterface componentProps {\n    goBackSettings?: {\n        specificRoute: string;\n        linkText: string;\n    };\n    title?: string;\n    actions?: any;\n}\n\nclass ReturnPanel extends Component<componentProps> {\n\n    render(){\n\n        const { goBackSettings, title, actions } = this.props;\n\n        return (\n            <>\n                <div id=\"Global-Return-Panel\">\n                    <GoBack goBackAttributes={goBackSettings} />\n                    {title && \n                    <div className=\"title-content\">{title}</div>}\n                    <MoreActionsDropdown actions={actions} />\n                </div>\n            </>\n        );\n    }\n}\n\nexport default (ReturnPanel);","import React, { Component, SyntheticEvent } from \"react\";\n\nimport ReturnPanel from \"../../../Components/Global/ReturnPanel\";\nimport * as PageContent from \"../../../Language/Default_Settings\";\nimport * as PageRoutes from \"../../../Routes\";\n\n//Redux\nimport { connect } from \"react-redux\";\nimport { GetProductDetails } from \"../../../Redux/Actions/ProductDetailsActions\";\nimport { RemoveOrderProduct, CalculatePromotions } from \"../../../Redux/Actions/OrderActions\";\n\n//Assets\nimport { ProductActionsContent } from \"../../../Language/Default_Settings\";\n\n//Page Elements\nimport \"./../Styles/_ProductDetail.scss\";\n\n//Assets\nimport Cin7ConfirmationBox from \"../../../Components/PageElements/Cin7ConfirmationBox\";\nimport Loading from \"../../../Components/Global/Loading\";\nimport ProductDetailsContent from \"../../../Components/PageElements/Products/ProductDetailsContent\";\nimport ProductNotFound from \"../../../Components/PageElements/Products/ProductNotFound\";\n\ninterface componentProps {\n    match: {\n        params: {\n            id: number;\n        };\n    };\n    productDetails: {\n        isFetchingProductDetails: boolean;\n        product: any;\n        message: string;\n        productNotFound: boolean;\n    };\n    auth: {\n        subscribedToken: string;\n    };\n\n    GetProductDetails: (token: string, productId: number) => void;\n    RemoveOrderProduct: (\n        productId: number,\n        optionId: number | null,\n        sizeId: number | null,\n        uomId: number | null\n    ) => void;\n    CalculatePromotions: () => void;\n}\n\ninterface componentState {\n    productId: number;\n    isFetchingProductDetails: boolean;\n    product: any;\n    message: string;\n    userToken: string;\n}\n\nconst GoBackButton = {\n    specificRoute: PageRoutes.CategoriesRoute,\n    linkText: PageContent.ProductDetailsPageContent.default_backButtonLabel,\n};\n\nclass ProductDetail extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            productId: 0,\n            isFetchingProductDetails: props.productDetails.isFetchingProductDetails,\n            product: props.productDetails.product,\n            message: props.productDetails.message,\n            userToken: props.auth.subscribedToken,\n        };\n    }\n\n    componentDidMount() {\n        let id = Number(this.props.match.params.id);\n\n        this.setState({\n            productId: id,\n        });\n\n        this.props.GetProductDetails(this.props.auth.subscribedToken, id);\n    }\n\n    static getDerivedStateFromProps(props: componentProps, state: componentState) {\n        if (props.auth.subscribedToken !== state.userToken) {\n            return {\n                userToken: props.auth.subscribedToken,\n            };\n        }\n        if (props.match.params.id !== state.productId) {\n            return {\n                productId: props.match.params.id,\n            };\n        }\n        return null;\n    }\n\n    componentDidUpdate(prevProps: any) {\n        if (prevProps.auth.subscribedToken !== this.props.auth.subscribedToken) {\n            this.props.GetProductDetails(this.props.auth.subscribedToken, this.state.productId);\n        }\n        if (prevProps.match.params.id !== this.props.match.params.id) {\n            this.props.GetProductDetails(this.props.auth.subscribedToken, this.props.match.params.id);\n        }\n        if (prevProps.productDetails.isFetchingProductDetails !== this.props.productDetails.isFetchingProductDetails) {\n            this.props.CalculatePromotions();\n        }\n    }\n\n    render() {\n        const { productDetails } = this.props;\n\n        const actions = [\n            {\n                name: ProductActionsContent.default_resetQuantityLabel,\n                action: this._resetProductQuantity,\n            },\n        ];\n\n        if (productDetails.message) {\n            if (productDetails.productNotFound) {\n                return (\n                    <div className={\"content-box\"}>\n                        <ReturnPanel goBackSettings={GoBackButton} actions={actions} />\n                        <ProductNotFound message={productDetails.message} />\n                    </div>\n                );\n            } else {\n                return (\n                    <div className={\"content-box\"}>\n                        <ReturnPanel goBackSettings={GoBackButton} actions={actions} />\n                        {productDetails.message && (\n                            <div className=\"error-message-container\">\n                                <Cin7ConfirmationBox\n                                    boxType={\"error-box\"}\n                                    boxIcon={\"error-icon\"}\n                                    boxMessage={productDetails.message}\n                                />\n                            </div>\n                        )}\n                    </div>\n                );\n            }\n        }\n\n        if (productDetails.isFetchingProductDetails) {\n            return <Loading />;\n        } else {\n            return (\n                <div className={\"content-box\"}>\n                    <ReturnPanel goBackSettings={GoBackButton} actions={actions} />\n                    <ProductDetailsContent productDetails={productDetails} goBackSettings={GoBackButton} />\n                </div>\n            );\n        }\n    }\n\n    _resetProductQuantity = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this.props.RemoveOrderProduct(this.state.productId, null, null, null);\n\n        //Re renders the details page\n        this.setState(this.state);\n    };\n}\n\nconst MapStateToProps = (state: { productDetailsReducer: any; orderReducer: any; authReducer: any }) => ({\n    productDetails: state.productDetailsReducer,\n    auth: state.authReducer,\n});\n\nexport default connect(MapStateToProps, { GetProductDetails, RemoveOrderProduct, CalculatePromotions })(ProductDetail);\n","import React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { RootState } from \"../../..\";\nimport { DisplayFilterMenu } from \"../../../Redux/Actions/ProductListActions\";\n\nimport \"./Styles/_ProductFilterBackground.scss\";\n\nconst ProductFilterBackground = () => {\n    const productsList = useSelector((state: RootState) => state.productListReducer);\n    const dispatch = useDispatch();\n\n    return productsList.filter?.filterMenuOpen ? (\n        <div className=\"clear-bg\" onClick={() => dispatch(DisplayFilterMenu(false))}></div>\n    ) : null;\n};\n\nexport default ProductFilterBackground;\n","import React, { useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Redirect, Route, Switch } from \"react-router-dom\";\n\nimport Category from \"./Views/Category\";\nimport SideMenu from \"../../Components/Global/SideMenu\";\nimport { Header } from \"../../Components/Global/Header\";\nimport { GetCategoriesList } from \"../../Redux/Actions/ProductListActions\";\nimport NavigationMenu from \"../../Components/Global/NavigationMenu\";\nimport { useCategoryRouteObjects } from \"../../Utils/CategoriesHelper\";\nimport { useIsWindowSmall } from \"../../Utils/Global/UseWindowSizeHook\";\nimport ProductDetail from \"./Views/ProductDetail\";\nimport ProductFilterBackground from \"../../Components/PageElements/Products/ProductFilterBackground\";\n\nimport \"./Styles/_ProductDetails.scss\";\n\ntype Props = {\n    auth: {\n        subscribedToken: string;\n    };\n    GetCategoriesList: (token: string) => void;\n};\n\nconst Products = (props: Props) => {\n    const categoryRouteObjects = useCategoryRouteObjects();\n    const smallScreen = useIsWindowSmall();\n\n    useEffect(() => {\n        GetCategoriesList(props.auth.subscribedToken);\n    }, [props.auth.subscribedToken]);\n\n    return (\n        <>\n            <SideMenu />\n            <div id=\"Body-Content\">\n                <Header />\n                <div className={\"content-container\"}>\n                    <ProductFilterBackground />\n                    {!smallScreen && <NavigationMenu />}\n                    {categoryRouteObjects && (\n                        <Switch>\n                            <Route exact path={\"/products/\"} component={Category} />;\n                            <Route exact path={\"/products/details/:id\"} component={ProductDetail} />\n                            <Redirect exact path={\"/products/list\"} to={\"/products/\"} />;\n                            <Redirect to={\"/page-not-found\"} />\n                        </Switch>\n                    )}\n                </div>\n            </div>\n        </>\n    );\n};\n\nconst MapStateToProps = (state: { authReducer: any }) => ({\n    auth: state.authReducer,\n});\n\nexport default connect(MapStateToProps, { GetCategoriesList })(Products);\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\nimport ReturnPanel from '../../../Components/Global/ReturnPanel';\nimport HtmlBlock from '../../../Components/Global/HtmlBlock';\n\ninterface componentProps {\n  identity: {\n    moduleSettings: {\n      customPage1Title: string;\n      customPage1Content: string;\n    }\n  };\n}\n\ninterface componentState {}\n\nclass CustomPage1 extends Component<componentProps, componentState> {\n  componentDidMount() {\n    this.setPageTitle();\n  }\n\n  componentDidUpdate() {\n    this.setPageTitle();\n  }\n\n  render() {\n    const { identity } = this.props;\n\n    return (\n      <>\n        <ReturnPanel title={identity.moduleSettings.customPage1Title ? identity.moduleSettings.customPage1Title : B2BPageTitles.custom_page_1_title} />\n        <div id=\"Seller-Content-Container\">\n          <div id=\"Seller-Content\">\n            <HtmlBlock content={identity.moduleSettings.customPage1Content} />\n          </div>\n        </div>\n      </>\n    );\n  }\n\n  setPageTitle() {\n    document.title = `${B2BPageTitles.root_title} - ${this.props.identity.moduleSettings.customPage1Title ? this.props.identity.moduleSettings.customPage1Title : B2BPageTitles.custom_page_1_title}`;\n  }\n}\n\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n  identity: state.identityReducer\n});\n\nexport default connect(MapStateToProps,{})(CustomPage1);\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\nimport ReturnPanel from '../../../Components/Global/ReturnPanel';\nimport HtmlBlock from '../../../Components/Global/HtmlBlock';\n\ninterface componentProps {\n  identity: {\n    moduleSettings: {\n      customPage2Title: string;\n      customPage2Content: string;\n    }\n  };\n}\n\ninterface componentState {}\n\nclass CustomPage2 extends Component<componentProps, componentState> {\n    componentDidMount() {\n        this.setPageTitle();\n    }\n\n    componentDidUpdate() {\n        this.setPageTitle();\n    }\n\n    render() {\n        const { identity } = this.props;\n\n        return (\n            <>\n                <ReturnPanel title={identity.moduleSettings.customPage2Title ? identity.moduleSettings.customPage2Title : B2BPageTitles.custom_page_2_title} />\n                <div id=\"Seller-Content-Container\">\n                    <div id=\"Seller-Content\">\n                        <HtmlBlock content={identity.moduleSettings.customPage2Content} />\n                    </div>\n                </div>\n            </>\n        );\n    }\n\n    setPageTitle() {\n        document.title = `${B2BPageTitles.root_title} - ${this.props.identity.moduleSettings.customPage2Title ? this.props.identity.moduleSettings.customPage2Title : B2BPageTitles.custom_page_2_title}`;\n    }\n}\n\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n  identity: state.identityReducer\n});\n\nexport default connect(MapStateToProps,{})(CustomPage2);\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\nimport ReturnPanel from '../../../Components/Global/ReturnPanel';\nimport HtmlBlock from '../../../Components/Global/HtmlBlock';\n\ninterface componentProps {\n  identity: {\n    moduleSettings: {\n      termsAndConditionsContent: string;\n    }\n  };\n}\n\ninterface componentState {}\n\nclass TermsAndConditions extends Component<componentProps, componentState> {\n  componentDidMount() {\n    this.setPageTitle();\n  }\n\n  componentDidUpdate() {\n    this.setPageTitle();\n  }\n\n  render() {\n    const { identity } = this.props;\n\n    return (\n      <>\n        <ReturnPanel title={B2BPageTitles.seller_terms_and_conditions_title} />\n        <div id=\"Seller-Content-Container\">\n          <div id=\"Seller-Content\">\n            <HtmlBlock content={identity.moduleSettings.termsAndConditionsContent} />\n          </div>\n        </div>\n      </>\n    );\n  }\n\n  setPageTitle() {\n    document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.seller_terms_and_conditions_title}`;\n  }\n}\n\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n  identity: state.identityReducer\n});\n\nexport default connect(MapStateToProps,{})(TermsAndConditions);\n","import React, { Component } from 'react';\nimport { Route, Switch, Redirect, RouteComponentProps } from 'react-router-dom';\nimport SideMenu from '../../Components/Global/SideMenu';\nimport { Header } from '../../Components/Global/Header';\nimport CustomPage1 from './Views/CustomPage1';\nimport CustomPage2 from './Views/CustomPage2';\nimport TermsAndConditions from './Views/TermsAndConditions';\n\nimport './Styles/_SellerContent.scss';\n\ninterface componentProps extends RouteComponentProps<any> {}\n\ninterface componentStates {\n  pageHeading: string\n}\n\nclass SellerContent extends Component<componentProps, componentStates> {\n  constructor(props: componentProps){\n    super(props);\n    this.state = {\n        pageHeading: props.location.pathname\n    }\n  }\n\n  render() {\n    return (\n      <>\n        <SideMenu />\n        <div id=\"Body-Content\">\n          <Header />\n          <Switch>\n            <Route exact path={'/seller/page-1'} component={CustomPage1} />\n            <Route exact path={'/seller/page-2'} component={CustomPage2} />\n            <Route exact path={'/seller/terms-and-conditions'} component={TermsAndConditions} />\n            <Redirect to={'/page-not-found'} />\n          </Switch>\n        </div>\n      </>\n    );\n  }\n}\n\nexport default SellerContent;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { AccountOnHoldContent } from '../../../Language/Default_Settings';\nimport { getCartItemsTotal } from '../../../Redux/Selectors/OrderSelectors';\nimport { getIsPaymentsPortalEnabled, getUserIsOnHold, getUserRemainingCreditLimit } from '../../../Redux/Selectors/UserSelectors';\nimport Cin7ConfirmationBox from '../Cin7ConfirmationBox';\n\nimport './Styles/_AccountOnHoldBanner.scss';\n\nexport const AccountOnHoldBanner: React.FC = () => {\n\n    const userIsOnHold = useSelector(getUserIsOnHold);\n    const userRemainingCreditLimit = useSelector(getUserRemainingCreditLimit);\n    const cartItemsTotal = useSelector(getCartItemsTotal);\n    const isPaymentsPortalEnabled = useSelector(getIsPaymentsPortalEnabled).active;\n\n    if (userRemainingCreditLimit && userRemainingCreditLimit <= 0) {\n        return (\n            <div className=\"account-on-hold-banner\">\n                <Cin7ConfirmationBox\n                    boxType={\"warning-box\"}\n                    boxIcon={\"warning-icon\"}\n                    boxMessage={isPaymentsPortalEnabled ? AccountOnHoldContent.default_accountOverCreditLimitPaymentsPortalMessage : AccountOnHoldContent.default_accountOverCreditLimitMessage}\n                />\n            </div>\n        );\n    }\n    else if (userIsOnHold) {\n        return (\n            <div className=\"account-on-hold-banner\">\n                <Cin7ConfirmationBox\n                    boxType={\"warning-box\"}\n                    boxIcon={\"warning-icon\"}\n                    boxMessage={isPaymentsPortalEnabled ? AccountOnHoldContent.default_accountOnHoldPaymentsPortalMessage : AccountOnHoldContent.default_accountOnHoldMessage}\n                />\n            </div>\n        );\n    }\n    else if (userRemainingCreditLimit && userRemainingCreditLimit > 0 && cartItemsTotal > 0 && cartItemsTotal > userRemainingCreditLimit) {\n        return (\n            <div className=\"account-on-hold-banner\">\n                <Cin7ConfirmationBox\n                    boxType={\"warning-box\"}\n                    boxIcon={\"warning-icon\"}\n                    boxMessage={isPaymentsPortalEnabled ? AccountOnHoldContent.default_orderTotalOverCreditLimitPaymentsPortalMessage : AccountOnHoldContent.default_orderTotalOverCreditLimitMessage}\n                />\n            </div>\n        );\n    }\n    else {\n        return null;\n    }\n}\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { LogoutB2BUser } from '../../../Redux/Actions/AuthActions';\nimport { AccountDetailsPageContent, B2BPageTitles } from '../../../Language/Default_Settings';\nimport { AccountOnHoldBanner } from '../../../Components/PageElements/Account/AccountOnHoldBanner';\n\nimport '../Styles/_AccountDetails.scss';\n\ninterface componentProps {\n    identity: {\n        userInfo: {\n            company: string;\n            firstName: string;\n            lastName: string;\n            email: string;\n        }\n    };\n    LogoutB2BUser: () => void;\n}\n\ninterface componentState {}\n\nclass AccountDetails extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {};\n    }\n\n    componentDidMount() {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.my_account_title}`;\n    }\n\n    render() {\n        const { userInfo } = this.props.identity;\n\n        return (\n            <div id=\"Account-Details-Container\">\n                <div className=\"account-details-content\">\n                    <div className=\"account-on-hold-container\"><AccountOnHoldBanner /></div>\n                    <div className=\"section-heading\">{AccountDetailsPageContent.default_detailsSectionHeading}</div>\n                    <div className=\"section-note\">{AccountDetailsPageContent.default_detailsSectionNote}</div>\n                    <div className=\"user-details-container\">\n                        <div className=\"user-details\">\n                            <div className=\"user-detail user-name\">{userInfo.firstName} {userInfo.lastName}</div>\n                            <div className=\"user-detail user-company\">{userInfo.company}</div>\n                            <div className=\"user-detail user-email email-display\">{userInfo.email}</div>\n                        </div>\n                        <div className=\"user-details-action\"><div className=\"log-out-link\" onClick={this._logoutUser}>Log out</div></div>\n                    </div>\n                    <div className=\"order-history-link\"><Link to={\"/account/orders\"}>View your order history</Link></div>\n                </div>\n            </div>\n        );\n    }\n\n    _logoutUser = (e: React.SyntheticEvent) => {\n        e.preventDefault();\n        this.props.LogoutB2BUser();\n    }\n}\n\nconst MapStateToProps = (state: {identityReducer: any;}) => ({\n    identity: state.identityReducer,\n});\n\nexport default connect(MapStateToProps,{LogoutB2BUser})(AccountDetails);\n","import { BemHelper, Button, Divider, Dialog, DialogContent, Typography } from '@cin7/ui';\nimport React, { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport CircleTickIcon from '../../../Images/Icons/Global/CircleTickIcon';\nimport AlertCircleIcon from '../../../Images/Icons/Global/AlertCircleIcon';\nimport { Reorder as ReorderAction, ResetReorderState } from '../../../Redux/Actions/OrderActions';\nimport { getOrderItemCount, getReorderItemsCount, getReorderUnavailableItemsCount, getIsFetchingReorderDetails, getIsReorderComplete, getReorderErrorMessage } from '../../../Redux/Selectors/OrderSelectors';\nimport Loading from '../../Global/Loading';\nimport Cin7ConfirmationBox from '../Cin7ConfirmationBox';\nimport { ReorderModalContent } from '../../../Language/Default_Settings'\nimport './Styles/_ReorderModal.scss';\n\ninterface ReorderModalProps {\n    orderId: number,\n    orderRef: string,\n    CloseAction: VoidFunction;\n}\n\nconst bem = new BemHelper('reorder-modal')\n\nexport const ReorderModal: React.FC<ReorderModalProps> = (props) => {\n    const {orderRef, orderId, CloseAction} = props;\n    const errorMessage = useSelector(getReorderErrorMessage);\n    const orderItemsCount = useSelector(getOrderItemCount);\n    const reorderItemsCount = useSelector(getReorderItemsCount);\n    const reorderUnavailableItemsCount = useSelector(getReorderUnavailableItemsCount);\n    const isFetchingReorderDetails = useSelector(getIsFetchingReorderDetails);\n    const isReorderComplete = useSelector(getIsReorderComplete);\n    const dispatch = useDispatch();\n    const Reorder = () => dispatch(ReorderAction(orderId))\n    \n    useEffect(() => {\n        dispatch(ResetReorderState())\n    }, [dispatch])\n    \n    return (\n        <Dialog open onClose={(e, reason) => CloseAction()} className={bem.block()}>\n            <DialogContent>\n            <div className={bem.element('content')}>\n                <div className={bem.element('header')}>\n                    <Typography variant={\"h1\"} className={bem.element('header-text')}>\n                        Reorder\n                    </Typography>\n                </div>\n                <Divider />\n                {isFetchingReorderDetails && <Loading inLine={true} />}\n                {\n                    errorMessage && (\n                        <>\n                            <Cin7ConfirmationBox\n                                boxType={\"error-box\"}\n                                boxIcon={\"error-icon\"}\n                                boxMessage={errorMessage}\n                            />\n                            <div className={bem.element('action-buttons')}>\n                                <Button className={bem.element('retry-button')} onClick={Reorder}>{ReorderModalContent.default_retryButtonLabel}</Button>\n                                <Button className={bem.element('cancel-button')} onClick={CloseAction} variant={\"secondary\"}>{ReorderModalContent.default_cancelButtonLabel}</Button>\n                            </div>\n                        </>\n                    )\n                }\n                {isReorderComplete && (\n                    <div className={bem.element('complete-container')}>\n                        {reorderItemsCount > 0 && (<>\n                            <CircleTickIcon strokeColor=\"#61A25E\" />\n                            <Typography className={bem.element('reorder-text')} align={\"center\"}>\n                                Successfully reordered <strong>{orderRef}</strong>.<br />{reorderItemsCount} {reorderItemsCount === 1 ? 'item' : 'items'} added to your cart.\n                            </Typography>\n                            {reorderUnavailableItemsCount > 0 && (\n                                <Typography className={bem.element('reorder-text')} align={\"center\"}>\n                                    {reorderUnavailableItemsCount} {reorderUnavailableItemsCount === 1 ? 'item wasn\\'t' : 'items weren\\'t'} available for reordering.\n                                </Typography>\n                            )}\n                        </>)}\n                        {reorderItemsCount <= 0 && (<>\n                            <div className=\"info-icon\"><AlertCircleIcon strokeColor=\"#00326b\" /></div>\n                            <Typography className={bem.element('reorder-text')} align={\"center\"}>\n                                None of the items in order <strong>{orderRef}</strong> are available for reordering.\n                            </Typography>\n                        </>)}\n                        <div className={bem.element('action-buttons')}>\n                            <Button className={bem.element('done-button')} onClick={CloseAction}>{ReorderModalContent.default_doneButtonLabel}</Button>\n                        </div>\n                    </div>\n                )}\n                {!isReorderComplete && !isFetchingReorderDetails && !errorMessage && (\n                    <>\n                        {orderItemsCount > 0 && <Cin7ConfirmationBox\n                            boxType={\"info-box\"}\n                            boxIcon={\"info-icon\"}\n                            boxMessage={ReorderModalContent.default_addToCartNote}\n                        />}\n                        <Typography className={bem.element('reorder-text')} align={\"center\"}>\n                            Would you like to reorder <strong>{orderRef}</strong>?\n                        </Typography>\n\n                        <div className={bem.element('action-buttons')}>\n                            <Button className={bem.element('confirm-button')} onClick={Reorder}>{ReorderModalContent.default_confirmButtonLabel}</Button>\n                            <Button className={bem.element('cancel-button')} onClick={CloseAction} variant={\"secondary\"}>{ReorderModalContent.default_cancelButtonLabel}</Button>\n                        </div>\n                    </>\n                )}\n            </div>\n            </DialogContent>\n        </Dialog>\n    )\n}\n","import React, { Component } from 'react';\nimport { FormatDate, FormatAmount } from '../../../Utils/OrderHelper';\nimport { RoundStockNumber } from '../../../Utils/ProductsHelper';\nimport PriceDisplay from '../../Global/PriceDisplay';\n\nimport './Styles/_OrderTile.scss';\n\ninterface componentProps {\n    order: any;\n    OpenReorderDialog: (orderId: number, orderRef: string) => void;\n}\n\nclass OrderTile extends Component<componentProps, {}> {\n    \n    render() {\n        const { order } = this.props;\n\n        return (\n            <tr className=\"order-tile\" key={order.id}>\n                <td className=\"order-reference\"><a href={order.documentLinkAbsolutePath} rel=\"noopener noreferrer\" target=\"_blank\">{order.reference}</a></td>\n                <td className=\"order-created\">{FormatDate(order.createdDate)}</td>\n                <td className={\"order-status \" + (order.isDispatched ? \"order-status-dispatched\" : \"order-status-open\")} >{order.isDispatched ? \"Dispatched\" : \"Open\"}</td>\n                <td className=\"order-customer-number\">{order.customerOrderNumber}</td>\n                <td className=\"order-total-quantity\">{FormatAmount(RoundStockNumber(order.totalQuantity))}</td>\n                <td className=\"order-total\">{<PriceDisplay value={order.total} />}</td>\n                <td className=\"order-outstanding-amt\">{order.outstandingAmt !== 0 && <PriceDisplay value={order.outstandingAmt} />}</td>\n                <td className=\"order-action\" onClick={(e) => this._reorder(e, order.id, order.reference)}>Reorder</td>\n            </tr>\n        );\n    }\n\n    _reorder = (e: React.MouseEvent, orderId: number, orderRef: string) => {\n        this.props.OpenReorderDialog(orderId, orderRef);\n    }\n}\n\nexport default OrderTile;","import * as types from './../Types/UserDetailsTypes';\nimport { RefreshUserToken } from './../Actions/AuthActions';\nimport APIHost from './../../APIHost';\nimport axios from 'axios';\nimport ApiUtil from '../../Utils/ApiUtil';\n\nconst host = new APIHost();\nconst apiUtil = new ApiUtil();\n\nexport const GetOrderHistoryList = (token: string, page: number, keyword: string) => (dispatch: any) => {\n\n    var headers = apiUtil.DefaultHeaders(token);\n\n    if (headers === null) {\n        return;\n    }\n\n    dispatch({\n        type: types.Getting_Order_History\n    });\n\n    const postBody = {\n        moduleId: apiUtil.GetModuleId(),\n        page: page,\n        keyword: keyword\n    };\n\n    axios.post(host.CheckoutAPI(\"GetOrderHistoryList\"), postBody, headers).then(res => {\n        dispatch({\n            type: types.Order_History_Success,\n            payload: {\n                orders: res.data.orders,\n                totalPages: res.data.numberOfPagesAvailable\n            }\n        });\n    }).catch((error) => {\n        if (error.response) {\n            let errorStatus = error.response.status;\n\n            switch (errorStatus) {\n                case 401:\n                    dispatch({\n                        type: types.Order_History_Fail,\n                        payload: {\n                            message: ''\n                        }\n                    });\n                    dispatch(RefreshUserToken());\n                    break;\n\n                default:\n                    dispatch({\n                        type: types.Order_History_Fail,\n                        payload: {\n                            message: error.message\n                        }\n                    });\n                    break;\n            }\n        } else {\n            dispatch({\n                type: types.Order_History_Fail,\n                payload: {\n                    message: error.message\n                }\n            });\n        }\n    });\n};","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Loading from '../../Global/Loading';\nimport Cin7ConfirmationBox from '../Cin7ConfirmationBox';\nimport { ReorderModal } from './ReorderModal';\nimport OrderTile from './OrderTile';\nimport { OrderHistoryListPageContent } from '../../../Language/Default_Settings';\nimport { GetOrderHistoryList } from '../../../Redux/Actions/UserDetailsActions';\nimport { Table } from 'reactstrap';\nimport { CloseCircleIcon, Input, Pagination, SearchIcon } from '@cin7/ui';\n\nimport './Styles/_OrderHistoryList.scss';\n\ninterface componentProps {\n    userDetails: {\n        orderHistory: {\n            isLoading: boolean;\n            message: string;\n            orders: [];\n            totalPages: number;\n        }\n    };\n    auth: {\n        subscribedToken: string;\n    };\n    GetOrderHistoryList: (token: string, page: number, keyword: string) => void;\n}\n\ninterface componentState {\n    searchTerm: string;\n    reorderModalOpen: boolean;\n    reorderId: number;\n    reorderRef: string;\n    showShortenedPagination: boolean;\n}\n\nclass OrderHistoryList extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            searchTerm: \"\",\n            reorderModalOpen: false,\n            reorderId: 0,\n            reorderRef: '',\n            showShortenedPagination: false\n        };\n    }\n\n    componentDidMount() {\n        this.props.GetOrderHistoryList(this.props.auth.subscribedToken, 1, \"\");\n\n        window.addEventListener(\"resize\", this.handleResize);\n        this.handleResize();\n    }\n    \n      componentWillUnmount() {\n        window.removeEventListener(\"resize\", this.handleResize);\n      }\n    \n      handleResize = () => {    \n        if (window.innerWidth < 500) {\n          this.setState({showShortenedPagination: true});\n        } else {\n          this.setState({showShortenedPagination: false});\n        }\n      }\n    \n\n    render() {\n        const { userDetails } = this.props;\n        const { searchTerm, reorderModalOpen } = this.state;\n\n        let orderHistory = userDetails.orderHistory;\n        let totalPages = orderHistory.totalPages;\n\n        if (orderHistory.message) {\n            return (\n                <Cin7ConfirmationBox\n                    boxType={\"error-box\"}\n                    boxIcon={\"error-icon\"}\n                    boxMessage={orderHistory.message}\n                />\n            );\n        }\n\n        const OrderHistoryTable = () => {\n            if (orderHistory.isLoading) {\n                return (\n                    <Loading inLine={true} />\n                );\n            }\n            else if (!orderHistory.orders) {\n                return (\n                    <div className=\"no-results-panel\">{OrderHistoryListPageContent.default_noResultsLabel}</div>\n                );\n            }\n            else {\n                return (\n                    <div className=\"order-history-list-results\">\n                        <Table striped borderless>\n                            <thead>\n                                <tr className=\"order-headers\">\n                                    <th className=\"order-reference\">Order Ref</th>\n                                    <th className=\"order-created\">Created Date</th>\n                                    <th className=\"order-status\">Order Status</th>\n                                    <th className=\"order-customer-number\">PO Number</th>\n                                    <th className=\"order-total-quantity\">Order Qty</th>\n                                    <th className=\"order-total\">Order Total</th>\n                                    <th className=\"order-outstanding-amt\">Outstanding Amt</th>\n                                    <th className=\"order-action\">Action</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                {orderHistory.orders.map((order: any) =>\n                                    <OrderTile key={order.id} order={order} OpenReorderDialog={this._openReorderDialog} />\n                                )}\n                            </tbody>\n                        </Table>\n                    </div>\n                );\n            }\n        }\n        return (\n            <div className=\"order-history-list\">\n                <div className=\"order-history-search\" onKeyDown={(e) => { e.key === 'Enter' && this._onSearch(this.state.searchTerm)}}>\n                    <div className=\"order-search-label\">Search</div>\n                    <Input\n                        className=\"order-search-box\"\n                        onChange={(e) => this.setState({searchTerm: e.target.value})}\n                        InputProps={{\n                            startAdornment: <div className=\"input-icon search-input-icon\"><SearchIcon /></div>,\n                            endAdornment: this.state.searchTerm && <div className=\"input-icon\" onClick={() => this._onClear()}><CloseCircleIcon /></div>\n                        }}\n                        value={this.state.searchTerm}\n                        placeholder={\"Order Ref or PO Number\"}\n                    />\n                </div>\n                {reorderModalOpen && <div className=\"reorder-modal-container\"><ReorderModal orderId={this.state.reorderId} orderRef={this.state.reorderRef} CloseAction={this._closeReorderDialog} /></div>}\n                {<OrderHistoryTable />}\n                {<Pagination key={searchTerm} shape=\"rounded\" variant=\"outlined\" count={totalPages} onChange={this._changePage} siblingCount={this.state.showShortenedPagination ? 0 : 1} />}\n                <div className=\"order-history-help-text\">Recent orders may not display immediately.</div>\n            </div>\n        );\n    }\n\n    _changePage = (_: React.ChangeEvent<unknown>, nextActivePage: number) => {\n        let activePage = nextActivePage;\n\n        this.props.GetOrderHistoryList(this.props.auth.subscribedToken, activePage, this.state.searchTerm);\n    };\n\n    _onClear = () => {\n        if (this.state.searchTerm !== \"\") {\n            this._onSearch(\"\");\n        }\n    };\n\n    _onSearch = (value: string | number) => {\n        let term = String(value);\n        this.setState({\n            searchTerm: term,\n        });\n        this.props.GetOrderHistoryList(this.props.auth.subscribedToken, 1, term);\n    };\n\n    _openReorderDialog = (orderId: number, orderRef: string) => {\n        this.setState({\n            reorderModalOpen: true,\n            reorderId: orderId,\n            reorderRef: orderRef\n        });\n    };\n\n    _closeReorderDialog = () => {\n        this.setState({\n            reorderModalOpen: false\n        });\n    };\n}\n\nconst MapStateToProps = (state: { userDetailsReducer: any; authReducer: any; }) => ({\n    userDetails: state.userDetailsReducer,\n    auth: state.authReducer\n});\n\nexport default connect(MapStateToProps, {GetOrderHistoryList})(OrderHistoryList);","import React, { Component } from 'react';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\nimport OrderHistoryList from '../../../Components/PageElements/Account/OrderHistoryList';\n\nimport '../Styles/_OrderHistory.scss';\n\nclass OrderHistory extends Component {\n\n    componentDidMount() {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.order_history_title}`;\n    }\n\n    render() {\n        return (\n            <div id=\"Order-History-Container\">\n                <div className=\"order-history-content\">\n                    <OrderHistoryList />\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default OrderHistory;\n","import React, { Component } from 'react';\nimport { Redirect, Switch, Route, RouteComponentProps } from 'react-router-dom';\nimport SideMenu from '../../Components/Global/SideMenu';\nimport { Header } from '../../Components/Global/Header';\nimport ReturnPanel from '../../Components/Global/ReturnPanel';\nimport { B2BPageTitles } from '../../Language/Default_Settings';\nimport AccountDetails from './Views/AccountDetails';\nimport OrderHistory from './Views/OrderHistory';\n\nimport './Styles/_Account.scss';\n\ninterface componentProps extends RouteComponentProps<any> {\n    pagePath?: string;\n}\n\nclass Account extends Component<componentProps, {}> {\n    render() {\n\n        const pageHeading = this._getPageHeading();\n\n        return (\n            <>\n                <SideMenu />\n                <div id=\"Body-Content\">\n                    <Header />\n                    <ReturnPanel title={pageHeading} />\n                    <div id=\"Account-Container\">\n                        <Switch>\n                            <Route exact path={'/account/details'} component={AccountDetails} />\n                            <Route exact path={'/account/orders'} component={OrderHistory} />\n                            <Redirect to={'/page-not-found'} />\n                        </Switch>\n                    </div>\n                </div>\n            </>\n        );\n    }\n\n    _getPageHeading() {\n        switch (this.props.location.pathname) {\n            case \"/account/orders\":\n                return B2BPageTitles.order_history_title;\n            default:\n                return B2BPageTitles.my_account_title;\n        }\n    }\n}\n\nexport default Account;\n","import { useSelector } from \"react-redux\";\nimport { RootState } from \"..\";\nimport APIHost from \"../APIHost\";\n\nexport const useModuleId = () => {\n    return useSelector((state: RootState) => state.brandingReducer?.moduleId);\n};\n\nexport const useHomepageImageUrl = () => {\n\n    const apiHost = new APIHost();\n    const appSettings = apiHost.GetEnvironmentConfig();\n    const moduleId = useModuleId();\n\n    return `${appSettings.AssetsHost}/module/${moduleId}/homepage/`;\n};","import React from 'react';\n\nexport const EmptyCategoryImage = () => {\n    return (\n        <svg width=\"340\" height=\"340\" viewBox=\"0 0 340 340\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <path d=\"M34 170C34 206.069 48.3285 240.662 73.8335 266.167C99.3384 291.671 133.931 306 170 306C206.069 306 240.662 291.671 266.167 266.167C291.671 240.662 306 206.069 306 170C306 133.931 291.671 99.3384 266.167 73.8335C240.662 48.3285 206.069 34 170 34C133.931 34 99.3384 48.3285 73.8335 73.8335C48.3285 99.3384 34 133.931 34 170Z\" fill=\"#F0F2FF\" />\n            <path d=\"M132.086 275.07C132.086 276.626 136.617 278.117 144.683 279.217C152.749 280.317 163.689 280.935 175.096 280.935C186.503 280.935 197.443 280.317 205.509 279.217C213.575 278.117 218.106 276.626 218.106 275.07C218.106 273.515 213.575 272.023 205.509 270.923C197.443 269.823 186.503 269.205 175.096 269.205C163.689 269.205 152.749 269.823 144.683 270.923C136.617 272.023 132.086 273.515 132.086 275.07Z\" fill=\"#D6DAFF\" />\n            <path d=\"M106.355 238.554C106.354 239.105 106.461 239.652 106.67 240.162C106.88 240.672 107.188 241.135 107.577 241.526C107.966 241.917 108.429 242.227 108.938 242.438C109.447 242.65 109.993 242.759 110.544 242.76H232.002C233.113 242.759 234.178 242.317 234.963 241.532C235.749 240.746 236.19 239.682 236.191 238.571V102.435L200.6 66.8369H110.544C109.433 66.8369 108.368 67.2782 107.582 68.0638C106.797 68.8493 106.355 69.9148 106.355 71.0257V238.554Z\" fill=\"white\" stroke=\"#4550E5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M122.223 113.951H219.973V207.791H122.223V113.951Z\" fill=\"#D6DAFF\" stroke=\"#4550E5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M143.445 149.968C143.445 153.09 144.686 156.085 146.894 158.293C149.102 160.501 152.097 161.742 155.22 161.742C158.342 161.742 161.337 160.501 163.545 158.293C165.753 156.085 166.994 153.09 166.994 149.968C166.994 146.845 165.753 143.85 163.545 141.642C161.337 139.434 158.342 138.193 155.22 138.193C152.097 138.193 149.102 139.434 146.894 141.642C144.686 143.85 143.445 146.845 143.445 149.968Z\" fill=\"white\" stroke=\"#4550E5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M219.979 189.04V199.958C219.979 202.032 219.156 204.021 217.689 205.487C216.222 206.954 214.233 207.778 212.159 207.778H130.043C127.969 207.778 125.98 206.954 124.513 205.487C123.047 204.021 122.223 202.032 122.223 199.958V192.583L142.262 175.042C143.381 174.048 144.839 173.522 146.335 173.572C147.831 173.623 149.251 174.247 150.3 175.314L158.341 183.359C159.074 184.092 160.068 184.503 161.105 184.503C162.142 184.503 163.136 184.092 163.869 183.359L188.689 158.539C189.28 157.941 189.994 157.48 190.783 157.189C191.572 156.898 192.415 156.784 193.252 156.856C194.096 156.898 194.92 157.13 195.662 157.535C196.404 157.939 197.046 158.505 197.539 159.192L219.979 189.04Z\" fill=\"white\" stroke=\"#4550E5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            <path d=\"M236.193 102.435H204.501C203.466 102.432 202.474 102.019 201.743 101.286C201.012 100.553 200.602 99.5601 200.602 98.5249V66.8369L236.193 102.435Z\" fill=\"#D6DAFF\" stroke=\"#4550E5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n        </svg>\n\n    );\n};\n","import React from 'react';\nimport Img from 'react-image';\nimport { EmptyCategoryImage } from '../../../Images/Icons/CustomHomepage/EmptyCategoryImage';\nimport LoadingSpinner from '../../Global/LoadingSpinner';\n\nimport './Styles/_CustomHomepageImage.scss';\n\ntype CustomHomepageImageProps = {\n    imagePath: string;\n    altText: string;\n};\n\nexport const CustomHomepageImage = (props: CustomHomepageImageProps) => {\n\n    return (\n        <div className=\"homepage-image-container\">\n            <Img src={props.imagePath} alt={props.altText} loader={<LoadingSpinner />} unloader={<EmptyCategoryImage />} />\n        </div>\n    );\n};","import React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { useHistory } from \"react-router\";\nimport { FeaturedCategoryType } from \"../../../Redux/Reducers/App_Reducers/IdentityReducer\";\nimport { getIsFetchingCategories } from \"../../../Redux/Selectors/ProductSelectors\";\nimport { getCustomHomepageSettings } from \"../../../Redux/Selectors/SettingsSelectors\";\nimport { GetCurrentUrl } from \"../../../Utils/B2BHelpers\";\nimport { findCategoryFromId, useCategoryRouteObjects, useDefaultParent } from \"../../../Utils/CategoriesHelper\";\nimport { useHomepageImageUrl } from \"../../../Utils/CustomHomepageHelper\";\nimport Loading from \"../../Global/Loading\";\nimport { CustomHomepageImage } from \"./CustomHomepageImage\";\nimport \"./Styles/_CustomHomepageContent.scss\";\n\nexport const CustomHomepageContent = () => {\n    const history = useHistory();\n    const customHomepageSettings = useSelector(getCustomHomepageSettings);\n    const isFetchingCategories = useSelector(getIsFetchingCategories);\n\n    const Banner = () => {\n        const currentHost = GetCurrentUrl();\n        const banner = customHomepageSettings.banner;\n        const homepageImagePath = useHomepageImageUrl();\n        const bannerImagePath = GetHomepageImageUrl(homepageImagePath, banner?.imageName ?? null);\n\n        if (banner && bannerImagePath) {\n            const bannerImage = <CustomHomepageImage imagePath={bannerImagePath} altText={banner.imageAltText} />;\n\n            if (banner.imageLink) {\n                const linkIsInternal = banner.imageLink.startsWith(currentHost.origin) ||\n                    banner.imageLink.startsWith(currentHost.host) ||\n                    banner.imageLink.startsWith(\"/\");\n\n                return (\n                    <div className=\"homepage-banner-container\">\n                        <a href={banner.imageLink}\n                            rel=\"noopener noreferrer\"\n                            target={linkIsInternal ? '_self' : '_blank'}>\n                            {bannerImage}\n                        </a>\n                    </div>\n                );\n            }\n            else {\n                return (\n                    <div className=\"homepage-banner-container\">\n                        {bannerImage}\n                    </div>\n                );\n            }\n        }\n        else {\n            return null;\n        }\n    };\n\n    const GetHomepageImageUrl = (path: string, imageName: string | null) => {\n        if (imageName === null || imageName === \"\") return null;\n        return `${path}${imageName}`;\n    };\n\n    const GetCategoryName = (defaultParent: any, categoryId: number) => {\n        const category = findCategoryFromId(defaultParent, categoryId);\n        return category?.name;\n    };\n\n    const GetCategoryLink = (categoryRouteObjects: any, categoryId: number) => {        \n        const categoryRoute = categoryRouteObjects.find((cat: any) => cat.id === categoryId);\n        return categoryRoute?.path;\n    };\n\n    const onClickCategoryTile = async (toPath: string | undefined) => {\n        if (toPath === undefined) history.push(\"/products/\");\n        history.push(`/products/?t=${toPath}`);\n    };\n\n    const FeaturedCategories = () => {\n        const heading = customHomepageSettings.featuredCategoriesHeading;\n        const featuredCategories = customHomepageSettings.featuredCategories;\n        const defaultParent = useDefaultParent();\n        const categoryRouteObjects = useCategoryRouteObjects();\n        const homepageImagePath = useHomepageImageUrl();\n\n        if (featuredCategories?.some) {\n\n            const activeCategories = featuredCategories.filter((cat) => findCategoryFromId(defaultParent, cat.categoryID) !== undefined);\n\n            if (activeCategories.length > 0) {\n                return (\n                    <div className=\"homepage-categories-container\">\n                        {heading && <h2>{heading}</h2>}\n                        <div className=\"categories-container\">\n                            {activeCategories.map((category: FeaturedCategoryType, index) => {\n                                const id = category.categoryID;\n                                const name = GetCategoryName(defaultParent, id);\n                                const imageUrl = GetHomepageImageUrl(homepageImagePath, category.imageName ?? null);\n                                const route = GetCategoryLink(categoryRouteObjects, id);\n\n                                return (\n                                    <div className=\"category-tile\" key={index} onClick={() => onClickCategoryTile(route)}>\n                                        <div className=\"category-image-overlay\">\n                                            {<CustomHomepageImage imagePath={imageUrl || \"\"} altText={category.imageAltText} />}\n                                        </div>\n                                        <div className=\"category-title\">\n                                            {name}\n                                        </div>\n                                    </div>\n                                );\n                            })}\n                        </div>\n                    </div>\n                );\n            }\n        }\n\n        return null;\n    };\n\n    return (\n        <div className=\"custom-homepage-content\">\n            <div className=\"custom-homepage-content-inner\">\n                {isFetchingCategories && <Loading inLine />}\n                {<Banner />}\n                {<FeaturedCategories />}\n            </div>\n        </div>\n    );\n};\n","import React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { Redirect } from \"react-router-dom\";\nimport { Header } from \"../../Components/Global/Header\";\nimport Loading from \"../../Components/Global/Loading\";\nimport NavigationMenu from \"../../Components/Global/NavigationMenu\";\nimport SideMenu from \"../../Components/Global/SideMenu\";\nimport { CustomHomepageContent } from \"../../Components/PageElements/CustomHomepage/CustomHomepageContent\";\nimport { getIsCustomHomepageEnabled } from \"../../Redux/Selectors/SettingsSelectors\";\nimport { getUserInfoFetched } from \"../../Redux/Selectors/UserSelectors\";\nimport { CategoriesRoute } from \"../../Routes\";\nimport { useIsWindowSmall } from \"../../Utils/Global/UseWindowSizeHook\";\n\nexport const CustomHomepage = () => {\n    const smallScreen = useIsWindowSmall();\n    const isCustomHomepageEnabled = useSelector(getIsCustomHomepageEnabled);\n    const isUserInfoFetched = useSelector(getUserInfoFetched);\n\n    if (isUserInfoFetched && !isCustomHomepageEnabled) {\n        return <Redirect to={CategoriesRoute} />;\n    }\n    else {\n        return (\n            <>\n                <SideMenu />\n                <div id=\"Body-Content\">\n                    <Header />\n                    {!isUserInfoFetched && <Loading inLine />}\n                    {isUserInfoFetched &&\n                        <div className={\"content-container\"}>\n                            {!smallScreen && <NavigationMenu />}\n                            <CustomHomepageContent />\n                        </div>}\n                </div>\n            </>\n        );\n    }\n};","import React, { useState } from 'react';\nimport { useHistory } from \"react-router\";\nimport { createPortal } from 'react-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { BemHelper, Button } from '@cin7/ui';\nimport { CreateOrder } from '../../../Redux/Actions/OrderActions';\nimport { getIsPaymentsPortalEnabled, getUserInfo, getUserIsOnHold, getUserRemainingCreditLimit } from '../../../Redux/Selectors/UserSelectors';\nimport { getCartItemsTotal, getFullOrder, getIsFetchingPromotions, getOrderItemCount, getPaymentMethod } from '../../../Redux/Selectors/OrderSelectors';\nimport Loading from '../../Global/Loading';\nimport { useCurrentFreightDescription, useCurrentFreightPrice, useHasFilteredZones, useHasFreightOptions } from '../../../Utils/FreightHelper';\nimport './Styles/_CheckoutFooter.scss';\nimport { PaymentMethodType } from '../../../Enums/PaymentMethods/PaymentMethodType';\nimport { getIsPayAccountOnHold } from '../../../Utils/OrderHelper';\n\nconst bem = new BemHelper('checkout-footer');\n\nexport interface CheckoutFooterProps {\n    displayCompleteButton?: boolean;\n    ShouldContinue?: () => Promise<boolean>;\n}\n\nexport const CheckoutFooter: React.FC<CheckoutFooterProps> = (props) => {\n\n    const history = useHistory();\n    const [loading, setLoading] = useState(false);\n    const userIsOnHold = useSelector(getUserIsOnHold);\n    const remainingCreditLimit = useSelector(getUserRemainingCreditLimit);\n    const orderData = useSelector(getFullOrder);\n    const userInfo = useSelector(getUserInfo);\n    const cartItemsTotal = useSelector(getCartItemsTotal);\n    const totalItems = useSelector(getOrderItemCount);\n    const isPaymentsPortalEnabled = useSelector(getIsPaymentsPortalEnabled);\n    const paymentMethod = useSelector(getPaymentMethod);\n    const freightPrice = useCurrentFreightPrice();\n    const freightDescription = useCurrentFreightDescription();\n    const hasFreightOptions = useHasFreightOptions();\n    const calculatingPromotions = useSelector(getIsFetchingPromotions);\n    const hasFilteredZones = useHasFilteredZones();\n\n    const dispatch = useDispatch();\n\n    const placeOrder = () => {\n        dispatch(CreateOrder(orderData, userInfo, freightPrice, freightDescription));\n    };\n\n    const handleContinueClick = () => {\n        if (typeof props.ShouldContinue === \"undefined\") {\n            history.push('/checkout');\n            return;\n        }\n        setLoading(true);\n        props.ShouldContinue().then((shouldContinue: boolean) => {\n            if (shouldContinue) history.push('/checkout');\n        }).finally(() => {\n            setLoading(false);\n        });\n    }\n\n    const handleBackToStoreClick = () => {\n        history.push('/products/');\n    }\n\n    const handleBackToCartClick = () => {\n        history.push('/cart');\n    }\n\n    const shouldDisablePlaceOrder = () => {\n        if (totalItems <= 0) return true;\n        if (hasFreightOptions && hasFilteredZones && !freightDescription) return true;\n        if (calculatingPromotions) return true;\n        if (isPaymentsPortalEnabled.active) return false;\n        return getIsPayAccountOnHold(userIsOnHold, remainingCreditLimit, cartItemsTotal);\n    }\n\n    return (\n        <div className=\"checkout-footer\">\n            {loading && createPortal(<Loading takeOver text=\"Validating stock\"/>, document.body)}\n            {!props.displayCompleteButton && <Button disabled={calculatingPromotions} className={bem.element('next-step-button')} fullWidth onClick={handleContinueClick} >Checkout</Button>}\n            {!props.displayCompleteButton && <Button className={bem.element('back-to-store-button')} fullWidth variant={\"secondary\"} onClick={handleBackToStoreClick} >Keep Shopping</Button>}\n            {props.displayCompleteButton && <Button className={bem.element('place-order-button')} fullWidth onClick={placeOrder} \n                disabled={shouldDisablePlaceOrder()} >{paymentMethod === PaymentMethodType.PayOnline ? \"Pay Online\" : \"Place Order\"}</Button>}\n            {props.displayCompleteButton && <Button className={bem.element('back-to-cart-button')} fullWidth variant={\"secondary\"} onClick={handleBackToCartClick} >Back to Cart</Button>}\n        </div>\n    );\n}\n","import React, { useState } from 'react';\nimport { useSelector } from \"react-redux\";\nimport { Button, Typography } from '@cin7/ui'\nimport './Styles/_EmptyCart.scss';\nimport { OrderReviewPageContent } from '../../../Language/Default_Settings';\nimport { useHistory } from 'react-router';\nimport { UploadBulkOrder } from './UploadBulkOrder';\nimport { BulkImportCSV } from '../../../Domain/BulkImportCSV';\nimport download from 'downloadjs';\nimport { CustomHompepageRoute, CategoriesRoute } from '../../../Routes';\nimport { getIsCustomHomepageEnabled } from \"../../../Redux/Selectors/SettingsSelectors\";\nimport { getUserInfoFetched } from \"../../../Redux/Selectors/UserSelectors\";\n\nexport const EmptyCart: React.FC = () => {\n    const history = useHistory();\n    const [showUploadBulkOrder, setShowUploadBulkOrder] = useState(false);\n    const isCustomHomepageEnabled = useSelector(getIsCustomHomepageEnabled);\n    const isUserInfoFetched = useSelector(getUserInfoFetched);\n    \n    return (\n        <div className=\"empty-cart\">\n            <Typography variant={\"h1\"} gutterBottom>\n                {OrderReviewPageContent.default_emptyCartTitle}\n            </Typography>\n            <Typography variant={\"body1\"} className=\"empty-cart__message\" gutterBottom>\n                {OrderReviewPageContent.default_emptyCartMessage}\n            </Typography>\n            <div className=\"empty-cart__actions\">\n                {(isUserInfoFetched && isCustomHomepageEnabled) ? (\n                    <Button\n                        className=\"empty-cart__return-homepage-button\"\n                        onClick={() => history.push(CustomHompepageRoute)}\n                    >{OrderReviewPageContent.default_returntohomepageButtonLabel}</Button>\n                ) : (\n                    <Button\n                        className=\"empty-cart__browse-products-button\"\n                        onClick={() => history.push(CategoriesRoute)}\n                    >{OrderReviewPageContent.default_browseProductsButtonLabel}</Button>\n                )}\n                <Button \n                    variant={'secondary'} \n                    onClick={() => setShowUploadBulkOrder(true)} \n                >{OrderReviewPageContent.default_uploadBulkOrderButtonLabel}</Button>\n            </div>\n            {showUploadBulkOrder && <UploadBulkOrder downloadTemplate={() => {download('Sku, Barcode, Quantity, Size', 'template.csv', 'text/csv')}} onClose={() => setShowUploadBulkOrder(false)} importCSV={BulkImportCSV} />}\n        </div>\n    )\n}","import React, { Component } from 'react';\n\ninterface componentProps {\n    fillColor?: string;\n}\n\ninterface componentState {\n    fillColor: string;\n}\n\nclass RemoveIcon extends Component<componentProps, componentState> {\n    constructor(props: Readonly<componentProps>) {\n        super(props);\n        this.state = {\n            fillColor: '#000'\n        }\n    }\n\n    componentDidMount() {\n        if(this.props.fillColor) {\n            this.setState({\n                fillColor: this.props.fillColor\n            });\n        }\n    }\n    \n    render() { \n        const {fillColor} = this.state;\n          \n        return ( \n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"https://www.w3.org/2000/svg\">\n                <title>Remove</title>\n                <path d=\"M18 8L8 18\" stroke={fillColor} strokeLinecap=\"round\" />\n                <path d=\"M18 18L8 8\" stroke={fillColor} strokeLinecap=\"round\" />\n            </svg>\n         );\n    }\n}\n \nexport default RemoveIcon;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { getOrderItemOptionNote } from '../../../Redux/Selectors/OrderSelectors';\n\nimport './Styles/_OrderOptionNotes.scss';\n\nexport interface OrderOptionNotesProps {\n    itemOptionId: number;\n    productId: number;\n    uomId: number | null;\n}\n\nexport const OrderOptionNotes: React.FC<OrderOptionNotesProps> = (props) => {\n    const itemOptionNote = useSelector(getOrderItemOptionNote(props.itemOptionId, props.productId, props.uomId));\n    const hasNote = !!itemOptionNote?.notes;\n    return (\n        <div className={[\"order-option-notes\", hasNote ? ' has-note' : ''].join('')}>\n            {hasNote && <>\n                <div className=\"order-option-notes__note\"><span className=\"order-option-notes__note-header\">Note: </span>{itemOptionNote?.notes}</div>\n            </>}\n        </div>\n    )\n}","import { Button, Dialog, DialogContent, Typography } from '@cin7/ui';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { OrderNotesModalContent } from '../../../Language/Default_Settings';\nimport { StripHTMLFromInputs } from '../../../Utils/B2BHelpers';\n\nimport './Styles/_AddNoteModal.scss';\n\nexport interface AddNoteModalProps {\n    onCloseClick: VoidFunction;\n    updateNote: (note: string) => void;\n    deleteNote: () => void;\n    note?: string;\n}\n\nexport const AddNoteModal: React.FC<AddNoteModalProps> = (props) => {\n    const {note = \"\"} = props;\n    const textareaRef = useRef<HTMLTextAreaElement>(null);\n    const [currentNote, setNote] = useState(note)\n\n    useEffect(() => {\n        textareaRef.current?.focus();\n    }, [textareaRef])\n\n    useEffect(() => {\n        setNote(note);\n    }, [note, setNote]);\n\n    const updateNote = (note: string) => {\n        if (note === \"\") props.deleteNote();\n        else props.updateNote(StripHTMLFromInputs(note));\n    }\n\n    return (\n        <Dialog fullWidth maxWidth=\"xs\" open onClose={(e, reason) => props.onCloseClick()} className=\"add-note-modal\">\n            <DialogContent className=\"add-note-modal__content\">\n                <Typography variant=\"h1\">{!!props.note ? OrderNotesModalContent.default_editNoteHeader : OrderNotesModalContent.default_addNoteHeader}</Typography>\n                <textarea ref={textareaRef} data-testid=\"add-note-modal\" className=\"add-note-modal__notes\" maxLength={250} onChange={(e) => setNote(e.target.value)} value={currentNote} autoFocus />\n                <div className=\"add-note-modal__action-buttons\">\n                    <Button variant=\"primary\" onClick={() => {updateNote(currentNote); props.onCloseClick();}}>{OrderNotesModalContent.default_saveNoteButtonLabel}</Button>\n                    <Button variant=\"secondary\" onClick={props.onCloseClick}>{OrderNotesModalContent.default_cancelButtonLabel}</Button>\n                    <Button variant=\"secondary\" onClick={() => {props.deleteNote(); props.onCloseClick();}}>{OrderNotesModalContent.default_removeNoteButtonLabel}</Button>\n                </div>\n            </DialogContent>\n        </Dialog>\n    )\n}","import { Button, Link } from '@cin7/ui';\nimport React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { OrderNotesButtonContent } from '../../../Language/Default_Settings';\nimport { DeleteOrderItemNotes, UpdateOrderItemNotes } from '../../../Redux/Actions/OrderActions';\nimport { getOrderItemOptionNote } from '../../../Redux/Selectors/OrderSelectors';\nimport { AddNoteModal } from './AddNoteModal';\n\nimport './Styles/_AddNoteButton.scss';\n\nexport interface AddNoteButtonProps {\n    itemOptionId: number;\n    productId: number;\n    uomId: number | null;\n}\n\nexport const AddNoteButton: React.FC<AddNoteButtonProps> = (props) => {\n    const [displayModal, setDisplayModal] = useState(false);\n    const dispatch = useDispatch();\n    const itemOptionNote = useSelector(getOrderItemOptionNote(props.itemOptionId, props.productId, props.uomId));\n    const updateNote = (note: string) => dispatch(UpdateOrderItemNotes(props.itemOptionId, props.productId, props.uomId, note))\n    const deleteNote = () => dispatch(DeleteOrderItemNotes(props.itemOptionId, props.productId, props.uomId))\n    const hasNote = !!itemOptionNote?.notes;\n    return (\n        <>\n            {hasNote && <Button className={\"edit-note-button\"} variant={\"secondary\"} onClick={() => setDisplayModal(true)} >{OrderNotesButtonContent.default_editNote}</Button>}\n            {!hasNote && <Link className={\"add-note-button\"} onClick={() => setDisplayModal(true)} >{OrderNotesButtonContent.default_addNote}</Link>}\n            {displayModal && <AddNoteModal onCloseClick={() => setDisplayModal(false)} note={itemOptionNote?.notes || \"\"} updateNote={updateNote} deleteNote={deleteNote} />}\n        </>\n    );\n}","import React, { Component, SyntheticEvent } from 'react';\nimport { connect } from 'react-redux';\nimport { RemoveOrderProduct, CalculatePromotions } from '../../../Redux/Actions/OrderActions';\nimport ProductOptionPrice from '../../../Components/PageElements/Products/ProductOptionPrice';\nimport { ProductOptionUOMUnitPrice } from '../../../Components/PageElements/Products/ProductOptionUOMUnitPrice';\n\nimport ProductOptionQuantity from '../../../Components/PageElements/Products/ProductOptionQuantity';\nimport { FormatAmount } from '../../../Utils/OrderHelper';\nimport PriceDisplay from '../../Global/PriceDisplay';\nimport RemoveIcon from '../../../Images/Icons/Orders/RemoveIcon';\nimport { OrderOptionNotes } from './OrderOptionNotes';\nimport { OrderItemNote } from '../../../Redux/Reducers/App_Reducers/OrderReducer';\nimport { GetTotalProductOptionPrice, GetLineItemDiscount } from '../../../Utils/ProductsHelper';\nimport { AddNoteButton } from './AddNoteButton';\n\nimport './Styles/_OrderDetailProductOption.scss';\n\ninterface componentProps {\n    product: any;\n    order: any;\n    optionGroup: any;\n    hasMultipleOptions: boolean;\n    hasMultipleOptionGroups: boolean;\n    RemoveOrderProduct: (productId: number, optionId: number, sizeId: number | null, uomId: number | null) => void;\n    isSizeOption: boolean;\n    CalculatePromotions: () => void;\n}\n\ninterface componentState { }\n\nclass OrderDetailProductOption extends Component<componentProps, componentState> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {}\n    }\n\n    hasNotes(optionId: number, productId: number, uomId: number | null) {\n        const itemNote = this.props.order.orderItemNotes.find((note: OrderItemNote) => note.optionId === optionId && note.productId === productId && note.uomId === uomId);\n        return !!itemNote?.notes;\n    }\n\n    render() {\n        const { product, optionGroup, hasMultipleOptions, hasMultipleOptionGroups, isSizeOption } = this.props;\n\n        let option = optionGroup[0];\n\n        let totalOptionsPrice = 0;\n        let totalOptionsDiscount = 0;\n        let totalOptionsQuantity= 0;\n        \n        optionGroup.forEach((options: { productQuantity: number; }) => {\n            totalOptionsPrice += GetTotalProductOptionPrice(options);\n            totalOptionsDiscount += GetLineItemDiscount(options);\n            totalOptionsQuantity += options.productQuantity;\n        });\n        let optionHasMultipleOptions = Array.from(optionGroup).length > 1;\n        const singleOption = optionGroup.length === 1;\n        return (\n            <>\n            <div className={[\"option-header\", this.hasNotes(option.optionId, product.id, option.uomId) ? \" has-notes\" : \"\"].join('')}>\n                {(option.option1 || option.uomSize) && <div className=\"option-title\">{option.option1}{option.uomSize && ` (${option.uomSize})`}</div>}\n                {isSizeOption && (\n                    <div className=\"option-note\">\n                        <div className=\"note-container\"><OrderOptionNotes itemOptionId={option.optionId} productId={product.id} uomId={option.uomId} /></div>\n                        <div className=\"add-note-button-container\"><AddNoteButton itemOptionId={option.optionId} productId={product.id} uomId={option.uomId} /></div>\n                    </div>)\n                }\n                </div>\n                <div className=\"option-header-titles\">\n                    <div className=\"title-quantity\">Quantity</div>\n                    <div className=\"title-price\">\n                        <div>Price</div>\n                        <div>{totalOptionsDiscount > 0 && \"Discount\"}</div>\n                        <div>Total</div>\n                    </div>\n                </div>\n            {optionGroup.map((productOption: any) =>  {\n                const labelHasContent = !!productOption.option2 || !!productOption.option3 || !!productOption.size;\n                const lineItemDiscount = GetLineItemDiscount(productOption);\n                \n                return (\n                    <div className=\"product-options-inner-container\" key={`${productOption.optionId}${productOption.sizeId}`}>\n                        <div className={[\"option-label\", labelHasContent ? \" has-label\" : \"\"].join('')}>\n                            {productOption.option2} {productOption.option3} {productOption.size} {!labelHasContent && !singleOption && productOption.code}\n                        </div>\n                        <div className=\"option-action-container\">\n                            {hasMultipleOptions && <span className=\"product-cart-delete\" onClick={(e) => this._removeCartProduct(e, productOption.optionId, productOption.sizeId, productOption.uomId)}>\n                                <RemoveIcon fillColor='#808081' />\n                            </span>}\n                        </div>\n                        {!isSizeOption && <div className=\"add-note-button-desktop\">\n                            <AddNoteButton itemOptionId={productOption.optionId} productId={product.id} uomId={productOption.uomId} />\n                        </div>}\n                        {!isSizeOption && <div\n                            className={\n                                [\n                                    \"option-note\",\n                                    this.hasNotes(productOption.optionId, product.id, productOption.uomId) ? \" has-notes\" : \"\",\n                                    (!labelHasContent && singleOption) ? \" no-label\" : \"\"\n                                ].join('')\n                            }\n                        >\n                            <OrderOptionNotes itemOptionId={productOption.optionId} productId={product.id} uomId={productOption.uomId} />\n                            <div className=\"add-note-button-mobile\"><AddNoteButton itemOptionId={productOption.optionId} productId={product.id} uomId={productOption.uomId} /></div>\n                        </div>}\n                        <div className=\"option-quantity-container\">\n                            <div className=\"quantity-label\">Quantity</div>\n                            <ProductOptionQuantity product={product} option={productOption} />\n                        </div>\n                        <div className=\"option-price-container\">\n                            <div className=\"option-price\">\n                                <div className=\"price-value-label\">Price</div>\n                                <ProductOptionPrice forceHideSpecialPrice option={productOption} />\n                                {(productOption.uomId && productOption.uomSize > 0) && (\n                                    <div className=\"option-UOM-unit-price\">\n                                        (<ProductOptionUOMUnitPrice option={productOption} />&nbsp;per unit)\n                                    </div>\n                                )}\n                            </div>\n                            <div className={`option-discount ${lineItemDiscount > 0 ? \"discount-applied\" : \"\"}`}>\n                                <div className=\"price-value-label\">{lineItemDiscount > 0 && \"Discount\"}</div>\n                                {lineItemDiscount > 0 ? <PriceDisplay value={lineItemDiscount} /> : <div>&nbsp;</div>}\n                            </div>\n                            <div className=\"option-total\">\n                                <div className=\"price-value-label\">Total</div>\n                                {<PriceDisplay value={GetTotalProductOptionPrice(productOption)} />}\n                            </div>\n                        </div>\n                    </div>\n                )\n            })}\n            {(hasMultipleOptionGroups && optionHasMultipleOptions) && <div className=\"product-options-total-container\">\n                <div className=\"product-total-items\">{FormatAmount(totalOptionsQuantity)} Item{totalOptionsQuantity === 1 ? '' : 's'}</div>\n                <div className=\"product-total-price\">{<PriceDisplay value={totalOptionsPrice} />}</div>\n            </div>}\n            </>\n        );\n    }\n\n    _removeCartProduct = (e: SyntheticEvent, optionId: number, sizeId: number, uomId: number) => {\n        e.preventDefault();\n        this.props.RemoveOrderProduct(this.props.product.id, optionId, sizeId, uomId);\n        this.props.CalculatePromotions();\n    }\n}\n\nconst MapStateToProps = (state: { orderReducer: any }) => ({\n    order: state.orderReducer\n});\n\nexport default connect(MapStateToProps, { RemoveOrderProduct, CalculatePromotions })(OrderDetailProductOption);","import React, { Component, SyntheticEvent } from 'react';\nimport { connect } from 'react-redux';\nimport { RemoveOrderProduct, CalculatePromotions } from '../../../Redux/Actions/OrderActions';\nimport { ShowProductDetails } from '../../../Redux/Actions/ProductDetailsActions';\nimport OrderDetailProductOption from './OrderDetailProductOption';\nimport PriceDisplay from '../../Global/PriceDisplay';\nimport { GetProductImageUrl, GroupByKey, GetTotalProductOptionPrice } from '../../../Utils/ProductsHelper';\nimport Image from '../../Global/Image';\nimport RemoveIcon from '../../../Images/Icons/Orders/RemoveIcon';\n\nimport './Styles/_OrderDetailProductTile.scss';\n\ninterface componentProps {\n    item: any;\n    RemoveOrderProduct: (productId: number, optionId: number | null, sizeId: number | null, uomId: number | null) => void;\n    CalculatePromotions: () => void;\n    ShowProductDetails: (id: number) => void;\n}\n\ninterface componentState { }\n\nclass OrderDetailProductTile extends Component<componentProps, componentState> {\n\n    render() {\n        const { item, ShowProductDetails } = this.props;\n\n        let product = item.product;\n\n        let productImageUrl = GetProductImageUrl('');\n\n        if (product.images && product.images[0]) {\n            productImageUrl = GetProductImageUrl(product.images[0].thumbnail);\n        }\n\n        let totalProductPrice = 0;\n        \n        item.productOptions.forEach((options: { price: number; specialPrice: number; productQuantity: number; }) => {\n            totalProductPrice += GetTotalProductOptionPrice(options);\n        });\n\n        let hasMultipleOptions = Array.from(item.productOptions).length > 1;\n\n        const hasUomOptions = item.productOptions.find((option: any) => option.uomId > 0) !== undefined;\n\n        let groupedOptions = hasUomOptions ? GroupByKey(item.productOptions, (itemOptions: any) => {\n            return [itemOptions.optionId, itemOptions.option1]\n        }) : GroupByKey(item.productOptions, (itemOptions: any) => {\n            return [itemOptions.option1]\n        });\n\n        let hasMultipleOptionGroups = Array.from(groupedOptions).length > 1;\n        const isSizeOption = item.productOptions[0]?.sizeId !== null;\n\n        return (\n            <div className=\"product-tile\" key={item.productId}>\n                <div className=\"product-tile-inner\">\n                    <div className=\"product-tile-inner-details-container\">\n                        <div className=\"product-image-container\" onClick={() => ShowProductDetails(item.productId)}>\n                            <span className=\"product-image\">\n                                <Image imagePath={productImageUrl} altText={`${product.styleCode}`} />\n                            </span>\n                        </div>\n                        <div className=\"product-detail-container\">\n                            <div className=\"product-title\" onClick={() => ShowProductDetails(item.productId)}>\n                               {product.name}\n                            </div>\n                            <span className=\"product-code\">{product.styleCode}</span>\n                        </div>\n                        <div className=\"product-action-container\">\n                            <span className=\"product-cart-delete\" onClick={this._removeCartProduct}>\n                                <RemoveIcon fillColor='#808081' />\n                            </span>\n                        </div>\n                    </div>\n                    <div className=\"product-options\">\n                        <div className=\"product-options-section\">\n                            <div className={`product-options-container ${hasMultipleOptions ? 'multiple-options' : ''}`}>\n                                {groupedOptions.map((option: any) => (\n                                    <OrderDetailProductOption key={`${option[0].optionId}${option[0].sizeId ?? option[0].uomId}`} isSizeOption={isSizeOption} product={product} optionGroup={option} hasMultipleOptions={hasMultipleOptions} hasMultipleOptionGroups={hasMultipleOptionGroups} />\n                                ))}\n                            </div>\n                        </div>\n                        {hasMultipleOptions && \n                            <div className=\"product-total-container\">\n                                <div className=\"product-total-items\">Subtotal</div>\n                                <div className=\"product-total-price\">{<PriceDisplay value={totalProductPrice} />}</div>\n                            </div>\n                        }\n                    </div>\n                </div>\n            </div>\n        );\n    }\n\n    _removeCartProduct = (e: SyntheticEvent) => {\n        e.preventDefault();\n        this.props.RemoveOrderProduct(this.props.item.productId, null, null, null);\n        this.props.CalculatePromotions();\n    }\n}\n\nconst MapStateToProps = (state: { orderReducer: any }) => ({\n    order: state.orderReducer\n});\n\nexport default connect(MapStateToProps, { RemoveOrderProduct, CalculatePromotions, ShowProductDetails })(OrderDetailProductTile);","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport OrderDetailProductTile from './OrderDetailProductTile';\n\nimport './Styles/_OrderReviewDetailsList.scss';\n\ninterface componentProps {\n    cartItems: {\n        orderItems: any;\n    };\n}\n\ninterface componentStates { }\n\nclass OrderReviewDetailsList extends Component<componentProps, componentStates> {\n    render() {\n        const { cartItems } = this.props;\n\n        if (cartItems.orderItems.length > 0) {\n            return (\n                <div id=\"Order-Review-Details-List\">\n                    {cartItems.orderItems.map((item: any) =>\n                        <OrderDetailProductTile key={item.productId} item={item} />\n                    )}\n                </div>\n            );\n        }\n        return null;\n    }\n}\n\nconst MapStateToProps = (state: { orderReducer: any }) => ({\n    cartItems: state.orderReducer\n});\n\nexport default connect(MapStateToProps)(OrderReviewDetailsList);","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { OrderCheckoutPageContent } from '../../../Language/Default_Settings';\nimport { PriceDisplay } from '../../Global/PriceDisplay';\nimport { AccountOnHoldBanner } from '../Account/AccountOnHoldBanner';\nimport { getCartDiscountTotal, getOrderItemCount, getCartItemsTotal, getIsFetchingPromotions } from '../../../Redux/Selectors/OrderSelectors';\nimport { FormatAmount, useCartGrandTotal, useCartTaxTotal } from '../../../Utils/OrderHelper';\nimport { useCurrentFreightPrice, useCurrentFreightTier, useCurrentFreightTierAttribute } from '../../../Utils/FreightHelper';\nimport { FreightTierPriceType } from '../../../Redux/Reducers/App_Reducers/FreightReducer';\nimport './Styles/_TotalsPanel.scss';\n\nconst FreightPriceDisplay = () => {\n    const selectedFreightTier = useCurrentFreightTier();\n    const selectedFreightTierAttrubute = useCurrentFreightTierAttribute();\n    const currentFreightPrice = useCurrentFreightPrice();\n\n    if (selectedFreightTier.type === FreightTierPriceType.Undefined || \n        selectedFreightTier.type === FreightTierPriceType.ToBeConfirmed ||\n        (selectedFreightTier.type === FreightTierPriceType.Weight && selectedFreightTierAttrubute?.price === null) || \n        (selectedFreightTier.type === FreightTierPriceType.Value && selectedFreightTierAttrubute?.price === null)) {\n        return <>{\"TBC\"}</>;\n    }\n    else {\n        return <PriceDisplay value={currentFreightPrice} />;\n    }\n};\n\nexport const TotalsPanel: React.FC = () => {\n\n    const cartItemsTotal = useSelector(getCartItemsTotal);\n    const cartGrandTotal = useCartGrandTotal();\n    const taxTotal = useCartTaxTotal();\n    const discountTotal = useSelector(getCartDiscountTotal);\n    const totalItems = useSelector(getOrderItemCount);\n    const calculatingPromotions = useSelector(getIsFetchingPromotions);\n\n    return (\n        <div className=\"totals-panel\">\n            <div className=\"account-on-hold-container\"><AccountOnHoldBanner /></div>\n            <div className=\"order-totals-content\">\n                <div className=\"totals-title\">Order Summary</div>\n                <div className=\"order-totals-container\">\n                    <div className=\"order-totals-price-container\">\n                        <div className=\"order-totals-price-row\">\n                            <div className=\"totals-label total-price-label\">{FormatAmount(totalItems)} Item{totalItems === 1 ? '' : 's'}</div>\n                            <div className=\"totals-value total-price-value\">{<PriceDisplay value={cartItemsTotal + discountTotal} isLoading={calculatingPromotions} />}</div>\n                        </div>\n                        {\n                            discountTotal > 0 &&\n                            <div className=\"order-totals-price-row\">\n                                <div className=\"totals-label total-price-label\">{OrderCheckoutPageContent.default_totalDiscountLabel}</div>\n                                <div className=\"totals-value total-price-value discount\">{<PriceDisplay value={discountTotal*-1} isLoading={calculatingPromotions} />}</div>\n                            </div>\n                        }                        \n                        <div className=\"order-totals-price-row subtotal\">\n                            <div className=\"totals-label\">Subtotal</div>\n                            <div className=\"totals-value\">{<PriceDisplay value={cartItemsTotal} isLoading={calculatingPromotions} />}</div>\n                        </div>\n                        <div className=\"order-totals-price-row\">\n                            <div className=\"totals-label\">Shipping</div>\n                            <div className=\"totals-value\">{<FreightPriceDisplay />}</div>\n                        </div>\n                        <div className=\"order-totals-price-row\">\n                            <div className=\"totals-label total-price-label\">{OrderCheckoutPageContent.default_totalTaxLabel}</div>\n                            <div className=\"totals-value total-price-value\">{<PriceDisplay value={taxTotal} isLoading={calculatingPromotions} />}</div>\n                        </div>\n                        \n                        <div className=\"order-totals-price-row grand-total\">\n                            <div className=\"totals-label total-price-label grand-total\">{OrderCheckoutPageContent.default_grandTotalLabel}</div>\n                            <div className=\"totals-value total-price-value grand-total\">{<PriceDisplay value={cartGrandTotal} isLoading={calculatingPromotions} />}</div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n}\n","import axios from \"axios\";\nimport APIHost from \"../APIHost\";\nimport ApiUtil from \"../Utils/ApiUtil\";\n\nexport interface Product {\n    id: number,\n    options: { optionId: number, sizeId: number | null, uomId: number | null, uomSize: number | null, stock: number }[]\n}\n\nexport interface ProductCheckoutValidationResponse {\n    product: Product;\n    success: boolean;\n}\n\nexport async function ProductCheckoutValidation(productId: number): Promise<ProductCheckoutValidationResponse> {\n    var headers = new ApiUtil().DefaultHeaders('');\n\n    if (headers === null) {\n        throw new Error ('Unauthenticated');\n    }\n\n    let result;\n\n    try {\n        result = await axios.post<ProductCheckoutValidationResponse>(new APIHost().ProductsAPI(\"GetCheckoutValidationDetail\"), { id: productId, moduleId: new ApiUtil().GetModuleId() }, headers);\n    } catch (e) {\n        return Promise.reject(e);\n    }\n\n    return result.data;\n}","import { BemHelper, Button, Typography } from '@cin7/ui';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { CheckoutFooter } from '../../../Components/PageElements/Orders/CheckoutFooter';\nimport { EmptyCart } from '../../../Components/PageElements/Orders/EmptyCart';\nimport { IssuesCard, IssuesCardVariant } from '../../../Components/PageElements/Orders/IssuesCard';\nimport OrderReviewDetailsList from '../../../Components/PageElements/Orders/OrderReviewDetailsList';\nimport { TotalsPanel } from '../../../Components/PageElements/Orders/TotalsPanel';\nimport { ProductCheckoutValidation, ProductCheckoutValidationResponse } from '../../../Domain/ProductCheckoutValidation';\nimport { CalculatePromotions, ClearCart, ResetCheckoutState, SetOrderQuantity } from './../../../Redux/Actions/OrderActions';\nimport { getOrderReducer } from '../../../Redux/Selectors/OrderSelectors';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\n\nimport '../Styles/_Cart.scss';\n\ninterface ProductStockWarning {\n    productName: string,\n    productCode: string,\n    availableQuantity: number\n}\n\ninterface OrderItem {\n    productId: number,\n    product: { allowOverselling: boolean, name: string },\n    productOptions: ProductOption[]\n}\n\ninterface ProductOption {\n    productQuantity: number,\n    optionId: number,\n    sizeId: number | null,\n    uomId: number | null,\n    stock: number,\n    code: string,\n    uomSize: number | null,\n}\n\nconst bem = new BemHelper('cart-page');\n\nexport const Cart: React.FC = () => {\n    \n    useEffect(() => {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.order_cart_title}`;\n      }, []);\n\n    const [stockWarnings, setStockWarnings] = useState<ProductStockWarning[]>([]);\n    const cart = useSelector(getOrderReducer);\n    const cartItems = cart.orderItems;\n    const dispatch = useDispatch();\n    const updateOrderQuantity = (option: any, product: any, quantity: number) => {\n        dispatch(SetOrderQuantity(option, product, quantity));\n        dispatch(CalculatePromotions());\n    };\n    const clearCart = () => dispatch(ClearCart());\n\n    useEffect(() => {\n        dispatch(ResetCheckoutState());\n    }, [dispatch]);\n\n    const validateStock = async () => {\n\n        const productIds = cartItems.filter((cartProduct: OrderItem) => !cartProduct.product.allowOverselling).map((product: OrderItem) => product.productId);\n\n        let validationResult: ProductCheckoutValidationResponse[] = [];\n\n        await Promise.all(productIds.map(async (productId: number) => {\n            let result = await ProductCheckoutValidation(productId);\n            validationResult.push(result);\n        }));\n\n        const stockWarnings: ProductStockWarning[] = [];\n\n        if (validationResult) {\n            validationResult.forEach((result) => {\n                result.product.options.forEach((productResultOption: { optionId: number; sizeId: number | null; uomId: number | null; uomSize: number | null; stock: number; }) => {\n                    const cartProduct = cartItems.find((p: OrderItem) => p.productId === result.product.id);\n                    if (!cartProduct) return;\n                    let cartProductOption = cartProduct.productOptions.find((option: ProductOption) => option.optionId === productResultOption.optionId && option.sizeId === productResultOption.sizeId && option.uomId === productResultOption.uomId);\n                    if (!cartProductOption) return;\n                    const remainingStock = productResultOption.uomId !== null && productResultOption.uomSize !== null ? Math.floor(productResultOption.stock / productResultOption.uomSize) : productResultOption.stock;\n                    if (cartProductOption.productQuantity > remainingStock) {\n                        cartProductOption.stock = productResultOption.stock;\n                        updateOrderQuantity(cartProductOption, cartProduct.product, remainingStock);\n                        stockWarnings.push({ availableQuantity: remainingStock, productCode: cartProductOption.code, productName: cartProduct.product.name });\n                    }\n                })\n            })\n            setStockWarnings(stockWarnings);\n            if (stockWarnings.length !== 0) return false;\n        }\n        return true;\n    }\n\n    return (\n        <>\n            <div className={bem.block()}>\n                <div className={bem.element('cart-inner-content')}>\n                    {cartItems.length > 0 && <div className={bem.element('header')}>\n                        <Typography variant={\"h1\"} className={bem.element('header-text')} >\n                            Your Cart\n                        </Typography>\n                        <div className={bem.element('clear-cart-container')}><Button className=\"clear-cart-button\" variant=\"secondary\" onClick={() => { clearCart() }} >Remove all</Button></div>\n                    </div>}\n                    <div className={bem.element('checkout-totals-mobile')}>{cartItems.length > 0 && <TotalsPanel />}</div>\n                    {stockWarnings.length === 0 && cartItems.length === 0 && (\n                        <div className={bem.element('empty-cart-container')}><EmptyCart /></div>\n                    )}\n                    <div className={bem.element('error-list-container')}>\n                        {stockWarnings.length > 0 && (\n                            <div className={bem.element('issues-container')}>\n                                <IssuesCard\n                                    title={\"Warning\"}\n                                    variant={IssuesCardVariant.Warning}\n                                    sections={[\n                                        {\n                                            title: \"Insufficient quantity - the following items will be updated with the currently available stock\",\n                                            issues:\n                                                stockWarnings.filter(x => x.availableQuantity > 0).map((warning: ProductStockWarning, i: number) => {\n                                                    return <li key={i}><Typography variant={\"body1\"} gutterBottom>{`${warning.productName} ${warning.productCode} - quantity updated to ${warning.availableQuantity}`}</Typography></li>\n                                                })\n                                        },\n                                        {\n                                            title: \"No stock available - the following items will be removed from the order\",\n                                            issues:\n                                                stockWarnings.filter(x => x.availableQuantity === 0).map((warning: ProductStockWarning, i: number) => {\n                                                    return <li key={i}><Typography variant={\"body1\"} gutterBottom>{`${warning.productName} ${warning.productCode}`}</Typography></li>\n                                                })\n                                        }\n                                    ]}\n                                    action={<Button className=\"close-button\" onClick={() => { setStockWarnings([]) }} >Close warning</Button>}\n                                />\n                            </div>\n                        )}\n                        <OrderReviewDetailsList />\n                    </div>\n                </div>\n                {cartItems.length > 0 && <div className={bem.element('checkout-totals-desktop')}>\n                    <TotalsPanel />\n                    <CheckoutFooter ShouldContinue={validateStock} />\n                </div>}\n            </div>\n            <div className=\"checkout-footer-mobile\">{cartItems.length > 0 && <CheckoutFooter ShouldContinue={validateStock} />}</div>\n        </>\n    );\n}","import React from 'react';\n\nexport const DeliveryAddressIcon: React.FC = () => {\n    return (\n        <svg width=\"48\" height=\"40\" viewBox=\"0 0 48 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Delivery</title>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M8.34766 19.8261C8.34766 19.2498 8.81484 18.7826 9.39113 18.7826H38.6085C39.1848 18.7826 39.652 19.2498 39.652 19.8261V38.6087C39.652 39.185 39.1848 39.6522 38.6085 39.6522H9.39113C8.81484 39.6522 8.34766 39.185 8.34766 38.6087V19.8261ZM10.4346 20.8695V37.5652H37.565V20.8695H10.4346Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13.5645 24C13.5645 23.4237 14.0316 22.9565 14.6079 22.9565H33.3905C33.9668 22.9565 34.434 23.4237 34.434 24C34.434 24.5763 33.9668 25.0435 33.3905 25.0435H14.6079C14.0316 25.0435 13.5645 24.5763 13.5645 24Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13.5645 28.174C13.5645 27.5977 14.0316 27.1305 14.6079 27.1305H33.3905C33.9668 27.1305 34.434 27.5977 34.434 28.174C34.434 28.7503 33.9668 29.2174 33.3905 29.2174H14.6079C14.0316 29.2174 13.5645 28.7503 13.5645 28.174Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13.5645 32.3478C13.5645 31.7715 14.0316 31.3043 14.6079 31.3043H33.3905C33.9668 31.3043 34.434 31.7715 34.434 32.3478C34.434 32.9241 33.9668 33.3913 33.3905 33.3913H14.6079C14.0316 33.3913 13.5645 32.9241 13.5645 32.3478Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M1.04348 12.5217C1.61978 12.5217 2.08696 12.9889 2.08696 13.5652V36.5217C2.08696 36.7985 2.19689 37.0639 2.39258 37.2596C2.58827 37.4553 2.85368 37.5652 3.13043 37.5652H44.8696C45.1463 37.5652 45.4117 37.4553 45.6074 37.2596C45.8031 37.0639 45.913 36.7985 45.913 36.5217V13.5652C45.913 12.9889 46.3802 12.5217 46.9565 12.5217C47.5328 12.5217 48 12.9889 48 13.5652V36.5217C48 37.352 47.6702 38.1482 47.0831 38.7353C46.496 39.3224 45.6998 39.6522 44.8696 39.6522H3.13043C2.30019 39.6522 1.50395 39.3224 0.916883 38.7353C0.329812 38.1482 0 37.352 0 36.5217V13.5652C0 12.9889 0.467181 12.5217 1.04348 12.5217Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M2.2384 12.5217H45.7616C45.7201 12.3377 45.6672 12.1339 45.5999 11.9136C45.2796 10.8653 44.6322 9.44337 43.3177 8.00945C40.7082 5.16265 35.2929 2.08696 24 2.08696C12.7071 2.08696 7.29181 5.16265 4.68225 8.00945C3.36782 9.44337 2.72043 10.8653 2.40011 11.9136C2.3328 12.1339 2.27993 12.3377 2.2384 12.5217ZM46.9565 13.5652C48 13.5652 48 13.5642 48 13.5632L48 13.5609L48 13.5554L47.9998 13.541L47.9988 13.4985C47.9978 13.4642 47.9959 13.4181 47.9925 13.3609C47.9855 13.2467 47.9721 13.0882 47.9463 12.8917C47.8949 12.4989 47.794 11.9525 47.5958 11.3038C47.1987 10.0043 46.4113 8.29576 44.8562 6.59924C41.7266 3.18517 35.6636 0 24 0C12.3364 0 6.2734 3.18517 3.14384 6.59924C1.5887 8.29576 0.801311 10.0043 0.404242 11.3038C0.206032 11.9525 0.105107 12.4989 0.0536706 12.8917C0.0279357 13.0882 0.0145271 13.2467 0.00754763 13.3609C0.00405681 13.4181 0.0021704 13.4642 0.00115648 13.4985L0.000198033 13.541L3.81262e-05 13.5554L8.0855e-06 13.5609L1.86588e-06 13.5632C4.35373e-07 13.5642 0 13.5652 1.04348 13.5652H0C0 14.1415 0.467181 14.6087 1.04348 14.6087H46.9565C47.5328 14.6087 48 14.1415 48 13.5652H46.9565Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M19.8262 7.30434C19.8262 6.72805 20.2934 6.26086 20.8697 6.26086H27.1305C27.7068 6.26086 28.174 6.72805 28.174 7.30434C28.174 7.88064 27.7068 8.34782 27.1305 8.34782H20.8697C20.2934 8.34782 19.8262 7.88064 19.8262 7.30434Z\" fill=\"black\" />\n        </svg>\n    );\n}\n","import React from 'react';\n\nexport const BillingAddressIcon: React.FC = () => {\n    return (\n        <svg width=\"40\" height=\"42\" viewBox=\"0 0 40 42\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Billing</title>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M2.6087 15.6522C2.37807 15.6522 2.1569 15.7438 1.99382 15.9069C1.83074 16.07 1.73913 16.2912 1.73913 16.5218V40H12.1739V16.5218C12.1739 16.2912 12.0823 16.07 11.9192 15.9069C11.7561 15.7438 11.535 15.6522 11.3043 15.6522H2.6087ZM0.764069 14.6772C1.25329 14.1879 1.91683 13.9131 2.6087 13.9131H11.3043C11.9962 13.9131 12.6597 14.1879 13.149 14.6772C13.6382 15.1664 13.913 15.8299 13.913 16.5218V40.8696C13.913 41.3499 13.5237 41.7392 13.0435 41.7392H0.869565C0.389318 41.7392 0 41.3499 0 40.8696V16.5218C0 15.8299 0.274844 15.1664 0.764069 14.6772Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M25.3921 0.615165C25.6564 0.499803 25.9453 0.451987 26.2327 0.47602C26.52 0.500054 26.797 0.595182 27.0385 0.752843C27.2799 0.910502 27.4784 1.12574 27.6161 1.37919C27.7537 1.63264 27.8261 1.91633 27.8268 2.20473L27.8269 2.20692L27.8269 16.5304C27.8269 17.0106 27.4375 17.4 26.9573 17.4C26.477 17.4 26.0877 17.0106 26.0877 16.5304L26.0877 2.2091L12.1747 8.39347L12.1747 14.7826C12.1747 15.2628 11.7854 15.6521 11.3051 15.6521C10.8249 15.6521 10.4355 15.2628 10.4355 14.7826V8.39126L10.4355 8.38908C10.4364 8.05143 10.5355 7.72133 10.7208 7.43906C10.9055 7.15776 11.1678 6.93609 11.4759 6.8009C11.4769 6.80043 11.478 6.79997 11.479 6.79951L25.3921 0.615165Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M3.9879 35.2921C4.31405 34.9659 4.7564 34.7827 5.21765 34.7827H8.69591C9.15715 34.7827 9.59951 34.9659 9.92566 35.2921C10.2518 35.6182 10.435 36.0606 10.435 36.5218V40.8697C10.435 41.3499 10.0457 41.7392 9.56547 41.7392C9.08522 41.7392 8.69591 41.3499 8.69591 40.8697V36.5218L5.21765 36.5218L5.21765 40.8697C5.21765 41.3499 4.82833 41.7392 4.34808 41.7392C3.86783 41.7392 3.47852 41.3499 3.47852 40.8697V36.5218C3.47852 36.0606 3.66174 35.6182 3.9879 35.2921Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M0 19.9999C0 19.5197 0.389318 19.1304 0.869565 19.1304H7.82609C8.30633 19.1304 8.69565 19.5197 8.69565 19.9999C8.69565 20.4802 8.30633 20.8695 7.82609 20.8695H0.869565C0.389318 20.8695 0 20.4802 0 19.9999Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M20.8691 9.56512C20.8691 9.08487 21.2585 8.69556 21.7387 8.69556H26.9561C27.4363 8.69556 27.8257 9.08487 27.8257 9.56512C27.8257 10.0454 27.4363 10.4347 26.9561 10.4347H21.7387C21.2585 10.4347 20.8691 10.0454 20.8691 9.56512Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M17.3906 13.0434C17.3906 12.5631 17.7799 12.1738 18.2602 12.1738H26.9558C27.4361 12.1738 27.8254 12.5631 27.8254 13.0434C27.8254 13.5236 27.4361 13.913 26.9558 13.913H18.2602C17.7799 13.913 17.3906 13.5236 17.3906 13.0434Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M0 23.4782C0 22.998 0.389318 22.6086 0.869565 22.6086H4.34783C4.82807 22.6086 5.21739 22.998 5.21739 23.4782C5.21739 23.9585 4.82807 24.3478 4.34783 24.3478H0.869565C0.389318 24.3478 0 23.9585 0 23.4782Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M27.7663 24.3479L31.302 24.3479C31.7822 24.3479 32.1715 24.7372 32.1715 25.2175C32.1715 25.6977 31.7822 26.087 31.302 26.087H27.7666C27.4268 26.0873 27.0976 26.2058 26.8355 26.4223C26.5734 26.6388 26.3947 26.9397 26.3302 27.2735C26.2657 27.6073 26.3193 27.9531 26.4819 28.2517C26.6444 28.5501 26.9055 28.7826 27.2206 28.9096C27.2209 28.9097 27.2204 28.9095 27.2206 28.9096L30.8094 30.3458C31.4994 30.6234 32.0728 31.1331 32.4285 31.7863C32.7842 32.4394 32.9015 33.196 32.7604 33.9262C32.6192 34.6565 32.2284 35.3148 31.655 35.7884C31.0815 36.262 30.3611 36.5213 29.6174 36.5218H26.0846C25.6043 36.5218 25.215 36.1325 25.215 35.6522C25.215 35.172 25.6043 34.7827 26.0846 34.7827H29.6161C29.9561 34.7824 30.2854 34.6639 30.5475 34.4474C30.8097 34.231 30.9883 33.93 31.0529 33.5962C31.1174 33.2624 31.0637 32.9166 30.9011 32.618C30.7387 32.3197 30.4775 32.0871 30.1624 31.9601C30.1622 31.96 30.1627 31.9602 30.1624 31.9601L26.5737 30.5239C25.8837 30.2463 25.3103 29.7366 24.9546 29.0835C24.5989 28.4303 24.4815 27.6737 24.6227 26.9435C24.7638 26.2132 25.1546 25.5549 25.7281 25.0813C26.3016 24.6077 27.0226 24.3484 27.7663 24.3479Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M28.6957 34.7827C29.176 34.7827 29.5653 35.172 29.5653 35.6523V37.3914C29.5653 37.8717 29.176 38.261 28.6957 38.261C28.2155 38.261 27.8262 37.8717 27.8262 37.3914V35.6523C27.8262 35.172 28.2155 34.7827 28.6957 34.7827Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M28.6957 22.6086C29.176 22.6086 29.5653 22.998 29.5653 23.4782V25.2173C29.5653 25.6976 29.176 26.0869 28.6957 26.0869C28.2155 26.0869 27.8262 25.6976 27.8262 25.2173V23.4782C27.8262 22.998 28.2155 22.6086 28.6957 22.6086Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M28.695 20.8695C23.4122 20.8695 19.1298 25.152 19.1298 30.4347C19.1298 35.7174 23.4122 39.9999 28.695 39.9999C33.9777 39.9999 38.2602 35.7174 38.2602 30.4347C38.2602 25.152 33.9777 20.8695 28.695 20.8695ZM17.3906 30.4347C17.3906 24.1915 22.4518 19.1304 28.695 19.1304C34.9382 19.1304 39.9993 24.1915 39.9993 30.4347C39.9993 36.6779 34.9382 41.7391 28.695 41.7391C22.4518 41.7391 17.3906 36.6779 17.3906 30.4347Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M14.7817 0C15.2619 0 15.6512 0.389318 15.6512 0.869565V6.28C15.6512 6.76025 15.2619 7.14957 14.7817 7.14957C14.3014 7.14957 13.9121 6.76025 13.9121 6.28V0.869565C13.9121 0.389318 14.3014 0 14.7817 0Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.1738 40.8696C12.1738 40.3893 12.5631 40 13.0434 40H18.2608C18.741 40 19.1303 40.3893 19.1303 40.8696C19.1303 41.3498 18.741 41.7391 18.2608 41.7391H13.0434C12.5631 41.7391 12.1738 41.3498 12.1738 40.8696Z\" fill=\"black\" />\n        </svg>\n\n    );\n}\n","// Adapted from: https://gist.github.com/incredimike/1469814\n\nexport const countryList = [\n\t\"Afghanistan\",\n\t\"Albania\",\n\t\"Algeria\",\n\t\"American Samoa\",\n\t\"Andorra\",\n\t\"Angola\",\n\t\"Anguilla\",\n\t\"Antarctica\",\n\t\"Antigua and Barbuda\",\n\t\"Argentina\",\n\t\"Armenia\",\n\t\"Aruba\",\n\t\"Australia\",\n\t\"Austria\",\n\t\"Azerbaijan\",\n\t\"The Bahamas\",\n\t\"Bahrain\",\n\t\"Bangladesh\",\n\t\"Barbados\",\n\t\"Belarus\",\n\t\"Belgium\",\n\t\"Belize\",\n\t\"Benin\",\n\t\"Bermuda\",\n\t\"Bhutan\",\n\t\"Bolivia (Plurinational State of)\",\n\t\"Bonaire, Sint Eustatius and Saba\",\n\t\"Bosnia and Herzegovina\",\n\t\"Botswana\",\n\t\"Bouvet Island\",\n\t\"Brazil\",\n\t\"British Indian Ocean Territory\",\n\t\"Brunei Darussalam\",\n\t\"Bulgaria\",\n\t\"Burkina Faso\",\n\t\"Burundi\",\n\t\"Cabo Verde\",\n\t\"Cambodia\",\n\t\"Cameroon\",\n\t\"Canada\",\n\t\"Cayman Islands\",\n\t\"Central African Republic\",\n\t\"Chad\",\n\t\"Chile\",\n\t\"China\",\n\t\"Christmas Island\",\n\t\"Cocos (Keeling) Islands\",\n\t\"Colombia\",\n\t\"Comoros\",\n\t\"Democratic Republic of the Congo\",\n\t\"Congo\",\n\t\"Cook Islands\",\n\t\"Costa Rica\",\n\t\"Croatia\",\n\t\"Cuba\",\n\t\"Curaçao\",\n\t\"Cyprus\",\n\t\"Czechia\",\n\t\"Côte d'Ivoire\",\n\t\"Denmark\",\n\t\"Djibouti\",\n\t\"Dominica\",\n\t\"Dominican Republic\",\n\t\"Ecuador\",\n\t\"Egypt\",\n\t\"El Salvador\",\n\t\"Equatorial Guinea\",\n\t\"Eritrea\",\n\t\"Estonia\",\n\t\"Eswatini\",\n\t\"Ethiopia\",\n\t\"Falkland Islands [Malvinas]\",\n\t\"Faroe Islands\",\n\t\"Fiji\",\n\t\"Finland\",\n\t\"France\",\n\t\"French Guiana\",\n\t\"French Polynesia\",\n\t\"French Southern Territories\",\n\t\"Gabon\",\n\t\"The Gambia\",\n\t\"Georgia\",\n\t\"Germany\",\n\t\"Ghana\",\n\t\"Gibraltar\",\n\t\"Greece\",\n\t\"Greenland\",\n\t\"Grenada\",\n\t\"Guadeloupe\",\n\t\"Guam\",\n\t\"Guatemala\",\n\t\"Guernsey\",\n\t\"Guinea\",\n\t\"Guinea-Bissau\",\n\t\"Guyana\",\n\t\"Haiti\",\n\t\"Heard Island and McDonald Islands\",\n\t\"Holy See\",\n\t\"Honduras\",\n\t\"Hong Kong\",\n\t\"Hungary\",\n\t\"Iceland\",\n\t\"India\",\n\t\"Indonesia\",\n\t\"Iran\",\n\t\"Iraq\",\n\t\"Ireland\",\n\t\"Isle of Man\",\n\t\"Israel\",\n\t\"Italy\",\n\t\"Jamaica\",\n\t\"Japan\",\n\t\"Jersey\",\n\t\"Jordan\",\n\t\"Kazakhstan\",\n\t\"Kenya\",\n\t\"Kiribati\",\n\t\"Korea (the Democratic People's Republic of)\",\n\t\"Kuwait\",\n\t\"Kyrgyzstan\",\n\t\"Lao People's Democratic Republic\",\n\t\"Latvia\",\n\t\"Lebanon\",\n\t\"Lesotho\",\n\t\"Liberia\",\n\t\"Libya\",\n\t\"Liechtenstein\",\n\t\"Lithuania\",\n\t\"Luxembourg\",\n\t\"Macao\",\n\t\"Madagascar\",\n\t\"Malawi\",\n\t\"Malaysia\",\n\t\"Maldives\",\n\t\"Mali\",\n\t\"Malta\",\n\t\"Marshall Islands\",\n\t\"Martinique\",\n\t\"Mauritania\",\n\t\"Mauritius\",\n\t\"Mayotte\",\n\t\"Mexico\",\n\t\"Federated States of Micronesia\",\n\t\"Moldova\",\n\t\"Monaco\",\n\t\"Mongolia\",\n\t\"Montenegro\",\n\t\"Montserrat\",\n\t\"Morocco\",\n\t\"Mozambique\",\n\t\"Myanmar\",\n\t\"Namibia\",\n\t\"Nauru\",\n\t\"Nepal\",\n\t\"Netherlands\",\n\t\"New Caledonia\",\n\t\"New Zealand\",\n\t\"Nicaragua\",\n\t\"Niger\",\n\t\"Nigeria\",\n\t\"Niue\",\n\t\"Norfolk Island\",\n\t\"Northern Mariana Islands\",\n\t\"Norway\",\n\t\"Oman\",\n\t\"Pakistan\",\n\t\"Palau\",\n\t\"Palestine, State of\",\n\t\"Panama\",\n\t\"Papua New Guinea\",\n\t\"Paraguay\",\n\t\"Peru\",\n\t\"Philippines\",\n\t\"Pitcairn\",\n\t\"Poland\",\n\t\"Portugal\",\n\t\"Puerto Rico\",\n\t\"Qatar\",\n\t\"Republic of North Macedonia\",\n\t\"Romania\",\n\t\"Russia\",\n\t\"Rwanda\",\n\t\"Réunion\",\n\t\"Saint Barthélemy\",\n\t\"Saint Helena, Ascension and Tristan da Cunha\",\n\t\"Saint Kitts and Nevis\",\n\t\"Saint Lucia\",\n\t\"Saint Martin\",\n\t\"Saint Pierre and Miquelon\",\n\t\"Saint Vincent and the Grenadines\",\n\t\"Samoa\",\n\t\"San Marino\",\n\t\"Sao Tome and Principe\",\n\t\"Saudi Arabia\",\n\t\"Senegal\",\n\t\"Serbia\",\n\t\"Seychelles\",\n\t\"Sierra Leone\",\n\t\"Singapore\",\n\t\"Sint Maarten\",\n\t\"Slovakia\",\n\t\"Slovenia\",\n\t\"Solomon Islands\",\n\t\"Somalia\",\n\t\"South Africa\",\n    \"South Georgia and the South Sandwich Islands\",\n    \"South Korea\",\n\t\"South Sudan\",\n\t\"Spain\",\n\t\"Sri Lanka\",\n\t\"Sudan\",\n\t\"Suriname\",\n\t\"Svalbard and Jan Mayen\",\n\t\"Sweden\",\n\t\"Switzerland\",\n\t\"Syrian Arab Republic\",\n\t\"Taiwan\",\n\t\"Tajikistan\",\n\t\"Tanzania, United Republic of\",\n\t\"Thailand\",\n\t\"Timor-Leste\",\n\t\"Togo\",\n\t\"Tokelau\",\n\t\"Tonga\",\n\t\"Trinidad and Tobago\",\n\t\"Tunisia\",\n\t\"Turkey\",\n\t\"Turkmenistan\",\n\t\"Turks and Caicos Islands\",\n\t\"Tuvalu\",\n\t\"Uganda\",\n\t\"Ukraine\",\n\t\"United Arab Emirates\",\n\t\"United Kingdom\",\n\t\"United States Minor Outlying Islands\",\n\t\"United States of America\",\n\t\"Uruguay\",\n\t\"Uzbekistan\",\n\t\"Vanuatu\",\n\t\"Venezuela\",\n\t\"Viet Nam\",\n\t\"British Virgin Islands\",\n\t\"U.S. Virgin Islands\",\n\t\"Wallis and Futuna\",\n\t\"Western Sahara\",\n\t\"Yemen\",\n\t\"Zambia\",\n\t\"Zimbabwe\",\n\t\"Åland Islands\"\n];","import { Button, Input, Dialog, DialogContent, Select } from '@cin7/ui';\nimport React, { Component } from 'react';\nimport { Form, FormGroup } from 'reactstrap';\nimport { OrderCheckoutPageContent } from '../../../Language/Default_Settings';\nimport { countryList } from '../../../Utils/CountriesList';\nimport Cin7ConfirmationBox from '../Cin7ConfirmationBox';\n\nimport './Styles/_EditAddressModal.scss';\n\ninterface componentProps {\n    title: string;\n    address: {\n        company: string;\n        address1: string;\n        address2: string;\n        city: string;\n        state: string;\n        postCode: string;\n        country: string;\n    };\n    firstName?: string;\n    lastName?: string;\n    CloseAction: () => void;\n    UpdateAction?: (updatedAddress: any) => void;\n}\n\ninterface componentStates {\n    isEditWindowOpen: boolean;\n    firstName?: string;\n    lastName?: string;\n    company: string;\n    address1: string;\n    address2: string;\n    city: string;\n    state: string;\n    postCode: string;\n    country: string;\n}\n\nclass EditAddressModal extends Component<componentProps, componentStates> {\n    constructor(props: componentProps) {\n        super(props);\n        this.state = {\n            isEditWindowOpen: false,\n            firstName: this.props.firstName,\n            lastName: this.props.lastName,\n            company: this.props.address.company,\n            address1: this.props.address.address1,\n            address2: this.props.address.address2,\n            city: this.props.address.city,\n            state: this.props.address.state,\n            postCode: this.props.address.postCode,\n            country: this.props.address.country\n        };\n    }\n\n    render() {\n        const { title, CloseAction, UpdateAction } = this.props;\n        const { firstName, lastName, company, address1, address2, city, state, postCode, country } = this.state;\n\n        let countries: { key: string; label: string; value: string }[] = [];\n\n        countryList.forEach((item) => {\n            countries.push({\n                key: item,\n                label: item,\n                value: item,\n            });\n        });\n\n        if (!countries.some((item) => item.value === this.state.country)) {\n            countries.push({\n                key: this.state.country,\n                label: this.state.country,\n                value: this.state.country,\n            });\n        }\n\n        return (\n            <Dialog onClose={(e, reason) => CloseAction()} open>\n                <DialogContent>\n                    <div className=\"edit-address-title\">Edit {title}</div>\n                    <Cin7ConfirmationBox\n                        boxType={\"info-box\"}\n                        boxIcon={\"info-icon\"}\n                        boxMessage={OrderCheckoutPageContent.default_editDeliveryAddressMessageLabel}\n                    />\n                    <div className=\"edit-address-container\">\n                        <Input\n                            id={\"FirstName\"}\n                            label={\"First Name\"}\n                            value={firstName}\n                            onChange={this._onChangeFirstName}\n                        />\n                        <Input\n                            id={\"LastName\"}\n                            label={\"Last Name\"}\n                            value={lastName}\n                            onChange={this._onChangeLastName}\n                        />\n                        <Input\n                            id={\"AddressCompany\"}\n                            label={\"Company Name\"}\n                            value={company}\n                            onChange={this._onChangeCompany}\n                        />\n                        <Input\n                            id={\"AddressAddress1\"}\n                            label={\"Address 1\"}\n                            value={address1}\n                            onChange={this._onChangeAddress1}\n                        />\n                        <Input\n                            id={\"AddressAddress2\"}\n                            label={\"Address 2\"}\n                            value={address2}\n                            onChange={this._onChangeAddress2}\n                        />\n                        <Input id={\"AddressCity\"} label={\"City\"} value={city} onChange={this._onChangeCity} />\n                        <Input\n                            id={\"AddressState\"}\n                            label={\"State/County\"}\n                            value={state}\n                            onChange={this._onChangeState}\n                        />\n                        <Input\n                            id={\"AddressPostcode\"}\n                            label={\"Post Code\"}\n                            value={postCode}\n                            onChange={this._onChangePostCode}\n                        />\n                        <Form>\n                            <FormGroup>\n                                <Select\n                                    label=\"Country\"\n                                    options={countries}\n                                    defaultValue={{ label: country, value: country }}\n                                    onChange={this._onChangeCountry}\n                                    openUpwards\n                                    id=\"AddressCountry\"\n                                />\n                            </FormGroup>\n                        </Form>\n                    </div>\n                    <div className=\"action-buttons\">\n                        <Button\n                            id=\"Cancel-Button\"\n                            className=\"address-action-clear\"\n                            onClick={CloseAction}\n                            variant={\"secondary\"}\n                        >\n                            Cancel\n                        </Button>\n                        {UpdateAction && (\n                            <Button id=\"Save-Button\" className=\"address-action-save\" onClick={this._updateAddress}>\n                                Save\n                            </Button>\n                        )}\n                    </div>\n                </DialogContent>\n            </Dialog>\n        );\n    }\n\n    _onChangeFirstName = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            firstName: e.target.value\n        });\n    }\n\n    _onChangeLastName = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            lastName: e.target.value\n        });\n    }\n\n    _onChangeCompany = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            company: e.target.value\n        });\n    }\n\n    _onChangeAddress1 = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            address1: e.target.value\n        });\n    }\n\n    _onChangeAddress2 = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            address2: e.target.value\n        });\n    }\n\n    _onChangeCity = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            city: e.target.value\n        });\n    }\n\n    _onChangeState = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            state: e.target.value\n        });\n    }\n\n    _onChangePostCode = (e: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            postCode: e.target.value\n        });\n    }\n\n    _onChangeCountry = (e: {value: string} | null) => {\n        this.setState({\n            country: String(e?.value)\n        });\n    }\n\n    _updateAddress = () => {\n        if (this.props.UpdateAction) {\n            var deliveryAddress = {\n                firstName: this.state.firstName,\n                lastName: this.state.lastName,\n                company: this.state.company,\n                address1: this.state.address1,\n                address2: this.state.address2,\n                city: this.state.city,\n                state: this.state.state,\n                postCode: this.state.postCode,\n                country: this.state.country\n            }\n            this.props.UpdateAction(deliveryAddress);\n\n            this.props.CloseAction();\n        }\n    }\n}\n\nexport default EditAddressModal;","import { BemHelper, Button } from '@cin7/ui';\nimport React, { useState } from 'react';\nimport { DeliveryAddressIcon } from '../../../Images/Icons/Orders/DeliveryAddressIcon';\nimport { BillingAddressIcon } from '../../../Images/Icons/Orders/BillingAddressIcon';\nimport EditAddressModal from './EditAddressModal';\n\nimport './Styles/_AddressPanel.scss';\n\nconst bem = new BemHelper('address-panel');\n\nexport interface AddressPanelProps {\n    title: string;\n    variant?: 'delivery' | 'billing';\n    address: {\n        company: string;\n        address1: string;\n        address2: string;\n        city: string;\n        state: string;\n        postCode: string;\n        country: string;\n    };\n    firstName?: string;\n    lastName?: string;\n    UpdateAction?: (updatedAddress: any) => void;\n}\n\nexport const AddressPanel: React.FC<AddressPanelProps> = (props) => {\n\n    const [editModalOpen, setEditModalOpen] = useState(false);\n    const { title, variant = 'billing', address, firstName, lastName, UpdateAction } = props;\n    const addressIcon = variant === 'delivery' ? <DeliveryAddressIcon /> : <BillingAddressIcon />;\n\n    const toggleEditModal = () => {\n        setEditModalOpen(!editModalOpen);\n    }\n\n    return (\n        <div className=\"address-panel\">\n            <div className={bem.element('panel-heading')}>\n                <div className={bem.element('address-title')}>{title}</div>\n            </div>\n            <div className={bem.element('address-inner-content')}>\n                <div className={bem.element('address-icon-container')}>{addressIcon}</div>\n                <div className={bem.element('address-container')}>\n                    {firstName && <span className={bem.element('address-first-name')}>{firstName} </span>}\n                    {lastName && <span className={bem.element('address-last-name')}>{lastName}</span>}\n                    <div className={bem.element('address-company')}>{address?.company}</div>\n                    <div className={bem.element('address-item address-address1')}>{address?.address1}</div>\n                    <div className={bem.element('address-item address-address2')}>{address?.address2}</div>\n                    <div className={bem.element('address-item address-city')}>{address?.city}</div>\n                    <div className={bem.element('address-item address-state')}>{address?.state}</div>\n                    <div className={bem.element('address-item address-postcode')}>{address?.postCode}</div>\n                    <div className={bem.element('address-item address-country')}>{address?.country}</div>\n                </div>\n                {variant === 'delivery' && <div className={bem.element('address-change')}>\n                    <Button className={bem.element('address-change-button')} variant={\"secondary\"} onClick={toggleEditModal}>Edit Address</Button>\n                </div>}\n            </div>\n            {editModalOpen &&\n                <EditAddressModal title={title}\n                    address={address}\n                    firstName={firstName}\n                    lastName={lastName}\n                    CloseAction={toggleEditModal}\n                    UpdateAction={UpdateAction} />}\n        </div>\n    );\n}","import React from 'react';\n\nexport const FreightOptionIcon: React.FC = () => {\n    return (\n        <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Freight to be confirmed</title>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M20.0145 0.383537C20.3949 0.783953 20.3787 1.41691 19.9783 1.79728C17.3852 4.2606 15.337 7.23994 13.9658 10.5433C12.5955 13.8444 11.9317 17.3959 12.0171 20.9692C12.0998 23.1256 12.4711 25.2612 13.1211 27.3191C13.2874 27.8457 12.9954 28.4075 12.4687 28.5738C11.9421 28.7402 11.3803 28.4481 11.214 27.9215C10.5094 25.6909 10.1073 23.3758 10.0183 21.0383L10.0177 21.0244L10.0178 21.0244C9.92467 17.1695 10.6403 13.3379 12.1186 9.7765C13.5969 6.21511 15.8051 3.00301 18.6008 0.347251C19.0012 -0.033125 19.6342 -0.016879 20.0145 0.383537Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M2.67578 31C2.67578 30.4477 3.1235 30 3.67578 30H10.7678C11.3201 30 11.7678 30.4477 11.7678 31C11.7678 31.5523 11.3201 32 10.7678 32H3.67578C3.1235 32 2.67578 31.5523 2.67578 31Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M2.67578 11C2.67578 10.4477 3.1235 10 3.67578 10H20.9978C21.5501 10 21.9978 10.4477 21.9978 11C21.9978 11.5523 21.5501 12 20.9978 12H3.67578C3.1235 12 2.67578 11.5523 2.67578 11Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M0 21C0 20.4477 0.447715 20 1 20H20.998C21.5503 20 21.998 20.4477 21.998 21C21.998 21.5523 21.5503 22 20.998 22H1C0.447715 22 0 21.5523 0 21Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M21.9859 0.383537C22.3663 -0.016879 22.9993 -0.033125 23.3997 0.347251C26.1954 3.00301 28.4035 6.21511 29.8818 9.7765C31.3601 13.3379 32.0758 17.1695 31.9826 21.0244C31.9693 21.5765 31.5109 22.0133 30.9588 22C30.4067 21.9866 29.9699 21.5282 29.9832 20.9761C30.0696 17.4006 29.4058 13.8466 28.0346 10.5433C26.6635 7.23994 24.6153 4.2606 22.0222 1.79728C21.6218 1.41691 21.6055 0.783953 21.9859 0.383537Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M20.002 11C20.002 10.4477 20.4497 10 21.002 10H38.324C38.8762 10 39.324 10.4477 39.324 11C39.324 11.5523 38.8762 12 38.324 12H21.002C20.4497 12 20.002 11.5523 20.002 11Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M20.002 21C20.002 20.4477 20.4497 20 21.002 20H41C41.5522 20 42 20.4477 42 21C42 21.5523 41.5522 22 41 22H21.002C20.4497 22 20.002 21.5523 20.002 21Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M30.3768 4.4789C27.4556 2.82135 24.1473 1.96776 20.7889 2.00508C17.4304 2.0424 14.1419 2.96931 11.2583 4.69137C8.37469 6.41343 5.99911 8.86909 4.37357 11.8082C2.74802 14.7472 1.93061 18.0647 2.00461 21.4225C2.07862 24.7804 3.04139 28.0586 4.79483 30.9232C6.54828 33.7878 9.02974 36.1364 11.9864 37.7298C12.4726 37.9918 12.6543 38.5983 12.3923 39.0845C12.1303 39.5707 11.5238 39.7524 11.0376 39.4904C7.76972 37.7293 5.02705 35.1335 3.08903 31.9673C1.151 28.8012 0.0868908 25.1779 0.00509913 21.4666C-0.0766924 17.7553 0.826761 14.0886 2.62342 10.8402C4.42007 7.59174 7.04571 4.87759 10.2328 2.97426C13.42 1.07093 17.0547 0.0464553 20.7666 0.00520326C24.4786 -0.0360488 28.1352 0.907398 31.3638 2.73942C34.5925 4.57145 37.2778 7.22658 39.1462 10.4343C41.0146 13.642 41.9993 17.2877 42 20.9999C42.0001 21.5522 41.5525 22 41.0002 22.0001C40.4479 22.0002 40.0001 21.5526 40 21.0003C39.9994 17.6416 39.1084 14.3432 37.418 11.4409C35.7275 8.53871 33.2979 6.13645 30.3768 4.4789Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M16.8787 26.8787C17.4413 26.3161 18.2044 26 19 26H35C35.7957 26 36.5587 26.3161 37.1213 26.8787C37.6839 27.4413 38 28.2044 38 29V37C38 37.5523 37.5523 38 37 38C36.4477 38 36 37.5523 36 37V29C36 28.7348 35.8947 28.4804 35.7071 28.2929C35.5196 28.1054 35.2652 28 35 28H19C18.7348 28 18.4804 28.1054 18.2929 28.2929C18.1054 28.4804 18 28.7348 18 29V41.0038C17.9995 41.1428 18.0279 41.2803 18.0835 41.4077C18.1391 41.5351 18.2207 41.6494 18.323 41.7435C18.4252 41.8376 18.546 41.9094 18.6776 41.9542C18.8091 41.999 18.9486 42.0159 19.087 42.0038C19.6372 41.9557 20.1222 42.3628 20.1702 42.913C20.2183 43.4632 19.8112 43.9482 19.261 43.9962C18.8457 44.0325 18.4273 43.9818 18.0327 43.8473C17.638 43.7129 17.2757 43.4977 16.9689 43.2154C16.662 42.9331 16.4174 42.59 16.2506 42.2079C16.0841 41.8264 15.9987 41.4145 16 40.9983C16 40.9976 16 40.9969 16 40.9962L17 41L16 40.9983V29C16 28.2043 16.3161 27.4413 16.8787 26.8787Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M36 30C36 29.4477 36.4477 29 37 29H41C42.8565 29 44.637 29.7375 45.9497 31.0503C47.2625 32.363 48 34.1435 48 36V41C48 41.7956 47.6839 42.5587 47.1213 43.1213C46.5587 43.6839 45.7956 44 45 44H39.83C39.2777 44 38.83 43.5523 38.83 43C38.83 42.4477 39.2777 42 39.83 42H45C45.2652 42 45.5196 41.8946 45.7071 41.7071C45.8946 41.5196 46 41.2652 46 41V36C46 34.6739 45.4732 33.4021 44.5355 32.4645C43.5979 31.5268 42.3261 31 41 31H38V41C38 41.5523 37.5523 42 37 42C36.4477 42 36 41.5523 36 41V30Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M41 29C41.5523 29 42 29.4477 42 30V35C42 35.2652 42.1054 35.5196 42.2929 35.7071C42.4804 35.8946 42.7348 36 43 36H47C47.5523 36 48 36.4477 48 37C48 37.5523 47.5523 38 47 38H43C42.2044 38 41.4413 37.6839 40.8787 37.1213C40.3161 36.5587 40 35.7956 40 35V30C40 29.4477 40.4477 29 41 29Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M37 42C35.8954 42 35 42.8954 35 44C35 45.1046 35.8954 46 37 46C38.1046 46 39 45.1046 39 44C39 42.8954 38.1046 42 37 42ZM33 44C33 41.7909 34.7909 40 37 40C39.2091 40 41 41.7909 41 44C41 46.2091 39.2091 48 37 48C34.7909 48 33 46.2091 33 44Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M22 42C20.8954 42 20 42.8954 20 44C20 45.1046 20.8954 46 22 46C23.1046 46 24 45.1046 24 44C24 42.8954 23.1046 42 22 42ZM18 44C18 41.7909 19.7909 40 22 40C24.2091 40 26 41.7909 26 44C26 46.2091 24.2091 48 22 48C19.7909 48 18 46.2091 18 44Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M23.8301 43C23.8301 42.4477 24.2778 42 24.8301 42H34.1701C34.7224 42 35.1701 42.4477 35.1701 43C35.1701 43.5523 34.7224 44 34.1701 44H24.8301C24.2778 44 23.8301 43.5523 23.8301 43Z\" fill=\"black\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M21.0001 5.10315e-09C21.5524 5.52586e-05 22.0001 0.447815 22 1.0001L21.998 21.0001C21.998 21.5524 21.5502 22.0001 20.9979 22C20.4457 21.9999 19.998 21.5522 19.998 20.9999L20 0.9999C20.0001 0.447615 20.4479 -5.51888e-05 21.0001 5.10315e-09Z\" fill=\"black\" />\n        </svg>\n    );\n}\n","import axios from \"axios\";\nimport * as types from \"./../Types/FreightTypes\";\nimport APIHost from \"./../../APIHost\";\nimport ApiUtil from \"../../Utils/ApiUtil\";\nimport { FreightTierAttributeType, FreightTierType, FreightZoneType } from \"../Reducers/App_Reducers/FreightReducer\";\n\nconst host = new APIHost();\nconst apiUtil = new ApiUtil();\n\ntype PostBody = {\n    moduleId: number;\n};\n\nexport type FreightType = {\n    freightOptions: FreightType[];\n};\n\nexport const ResetFreightSelection = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Freight_Options,\n    });\n};\n\nexport const GetFreightOptions = (token: string) => (dispatch: any) => {\n    const headers = apiUtil.DefaultHeaders(token);\n    if (headers === null) {\n        return;\n    }\n\n    const postBody: PostBody = {\n        moduleId: apiUtil.GetModuleId(),\n    };\n\n    axios\n        .post(host.CheckoutAPI(\"Freight\"), postBody, headers)\n        .then((res) => {\n            dispatch({\n                type: types.Get_Freight_Options,\n                payload: {\n                    freightOptionsFetched: res.data.success,\n                    freightOptions: res.data.freightZones,\n                },\n            });\n        })\n        .catch((err) => {\n            console.log(err);\n        });\n};\n\nexport const SetSelectedFreightZone = (selectedZone: FreightZoneType) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Selected_Freight_Zone,\n        payload: {\n            freightZone: selectedZone,\n        },\n    });\n};\n\nexport const ResetSelectedFreightZone = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Selected_Freight_Zone,\n    });\n};\n\nexport const SetSelectedFreightTier = (selectedTier: FreightTierType) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Selected_Freight_Tier,\n        payload: {\n            freightTier: selectedTier,\n        },\n    });\n};\n\nexport const ResetSelectedFreightTier = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Selected_Freight_Tier,\n    });\n};\n\nexport const SetSelectedFreightTierAttribute = (selectedAttribute: FreightTierAttributeType) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Selected_Freight_Tier_Attribute,\n        payload: {\n            freightTierAttribute: selectedAttribute,\n        },\n    });\n};\n\nexport const ResetSelectedFreightTierAttribute = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Selected_Freight_Tier_Attribute,\n    });\n};\n\nexport const SetFilteredFreightZones = (hasFilteredZones: boolean) => (dispatch: any) => {\n    dispatch({\n        type: types.Set_Filtered_Freight_Zones,\n        payload: {\n            freightZonesFiltered: hasFilteredZones,\n        },\n    });\n};\n\nexport const ResetFilteredFreightZones = () => (dispatch: any) => {\n    dispatch({\n        type: types.Reset_Filtered_Freight_Zones,\n    });\n};\n","import React, { useCallback, useEffect } from 'react';\nimport * as PageContent from '../../../Language/Default_Settings';\nimport { FreightOptionIcon } from '../../../Images/Icons/Orders/FreightOptionIcon';\nimport {\n    GetFreightOptions,\n    ResetSelectedFreightTier,\n    ResetSelectedFreightTierAttribute,\n    ResetSelectedFreightZone,\n    SetSelectedFreightTier,\n    SetSelectedFreightTierAttribute,\n    SetSelectedFreightZone,\n    SetFilteredFreightZones\n} from '../../../Redux/Actions/FreightActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { RootState } from '../../..';\nimport { FormControlLabel, Radio, RadioGroup } from '@cin7/ui';\nimport { useCurrentFreightZone, useCurrentFreightTier, useHasFreightOptions, useHasFilteredZones } from '../../../Utils/FreightHelper';\nimport { FormatMoney } from '../../../Utils/OrderHelper';\nimport { getUserCurrency } from '../../../Redux/Selectors/UserSelectors';\nimport { getCartItemsHaveWeight, getCartItemsTotal, getCartItemsWeightTotal } from '../../../Redux/Selectors/OrderSelectors';\nimport { FreightTierPriceType, FreightTierType, FreightZoneType } from '../../../Redux/Reducers/App_Reducers/FreightReducer';\n\nimport './Styles/_FreightPanel.scss';\n\nconst FreightPanel = () => {\n    const dispatch = useDispatch();\n\n    const auth = useSelector((state: RootState) => state.authReducer);\n    const freightReducer = useSelector((state: RootState) => state.freightReducer);\n    const userCurrencyCode = useSelector(getUserCurrency);\n    const cartItemsHaveWeight = useSelector(getCartItemsHaveWeight);\n    const cartWeight = useSelector(getCartItemsWeightTotal);\n    const cartTotal = useSelector(getCartItemsTotal);\n\n    const getAvailableTierAttribute = useCallback((tier: FreightTierType) => {\n        return tier.conditions?.find((condition) => ((tier.type === FreightTierPriceType.Weight && ((cartWeight >= condition.minimum && cartWeight <= condition.maximum) || (cartWeight >= condition.minimum && condition.maximum === null))) ||\n        (tier.type === FreightTierPriceType.Value && ((cartTotal >= condition.minimum && cartTotal <= condition.maximum) || (cartTotal >= condition.minimum && condition.maximum === null)))));\n    }, [cartWeight, cartTotal]);\n\n    // On load, fetch the freight options if not already done\n    useEffect(() => {\n        if (freightReducer.freightOptionsFetched) return;\n        dispatch(GetFreightOptions(auth.subscribedToken));\n    }, [dispatch, auth, freightReducer.freightOptionsFetched]);\n\n    useEffect(() => {\n        if (freightReducer.freightTierAttribute?.id < 0) return;\n        const tier = freightReducer.freightTier;\n        const availableCondition = getAvailableTierAttribute(tier);\n        // Reset the tier if cart items no longer have weight or the weight has changed so that the tier price is no longer valid.\n        // Reset the tier if cart value is 0 or the value has changed so that the tier price is no longer valid.\n        if ((tier.type === FreightTierPriceType.Weight && !cartItemsHaveWeight) || \n            (tier.type === FreightTierPriceType.Value && cartTotal <= 0) ||\n            freightReducer.freightTierAttribute?.id !== availableCondition?.id) {\n            dispatch(ResetSelectedFreightTier());\n        }\n    }, [dispatch, getAvailableTierAttribute, cartItemsHaveWeight, freightReducer.freightTier, freightReducer.freightTierAttribute, cartTotal]);\n\n\n    // Check if a zone has only weight tiers\n    const getOnlyWeightTiers = (zone: FreightZoneType) => {\n        let onlyWeightTiers = zone.tiers?.some(tier => {\n            return tier.type !== FreightTierPriceType.Weight;\n        })\n        return onlyWeightTiers;\n    };\n\n    // If the cart is missing weight remove zones with only weight tiers\n    let filteredZones = freightReducer.freightOptions;\n    if (!cartItemsHaveWeight) {\n        filteredZones = filteredZones.filter(zone => getOnlyWeightTiers(zone));\n    }\n\n    useEffect(() => {\n        dispatch(SetFilteredFreightZones(filteredZones.length > 0 ? true : false));\n    }, [dispatch, filteredZones.length]);\n\n    const selectedZone = useCurrentFreightZone();\n    const selectedTier = useCurrentFreightTier();\n    const hasFreightOptions = useHasFreightOptions();\n    const hasFilteredZones = useHasFilteredZones();\n\n    const handleChangeZone = (event: React.ChangeEvent<HTMLInputElement>) => {\n        const zoneId = (Number)((event.target as HTMLInputElement).value);\n        const zone = freightReducer.freightOptions.find(o => o.id === zoneId);\n        if (zone) {\n            dispatch(SetSelectedFreightZone(zone));\n            dispatch(ResetSelectedFreightTier());\n        }\n        else {\n            dispatch(ResetSelectedFreightZone());\n            dispatch(ResetSelectedFreightTier());\n        }\n    };\n\n    const handleChangeTier = (event: React.ChangeEvent<HTMLInputElement>) => {\n        const tierId = (Number)((event.target as HTMLInputElement).value);\n        const zone = freightReducer.freightOptions.find(o => o.id === selectedZone.id);\n        if (zone?.tiers) {\n            const tier = zone.tiers.find(o => o.id === tierId);\n            if (tier) {\n                dispatch(SetSelectedFreightTier(tier));\n                const availableAttribute = getAvailableTierAttribute(tier);\n                if ((tier.type === FreightTierPriceType.Weight || tier.type === FreightTierPriceType.Value) && availableAttribute) {\n                    dispatch(SetSelectedFreightTierAttribute(availableAttribute));\n                }\n                else {\n                    dispatch(ResetSelectedFreightTierAttribute());\n                }\n            }\n            else {\n                dispatch(ResetSelectedFreightTier());\n            }\n        }\n        else {\n            dispatch(ResetSelectedFreightZone());\n            dispatch(ResetSelectedFreightTier());\n        }\n    };\n\n    const getPriceText = (tier: FreightTierType) => {\n        if ((tier.type === FreightTierPriceType.Weight || tier.type === FreightTierPriceType.Value) && tier.conditions) {\n            const availableCondition = getAvailableTierAttribute(tier);\n            if (availableCondition) {\n                return availableCondition.price === null ? \"To Be Confirmed\" : FormatMoney(availableCondition.price, userCurrencyCode);\n            }\n        }\n        return tier.type === FreightTierPriceType.ToBeConfirmed ? \"To Be Confirmed\" : FormatMoney(tier.price, userCurrencyCode);\n    };\n\n    const FreightOptionsContent = () => {        \n\n        if (hasFreightOptions && hasFilteredZones) {\n\n            return (\n                <RadioGroup value={selectedZone.id} onChange={handleChangeZone} className={`freight-options-container ${hasFreightOptions && selectedTier.id < 0 && 'validation-message'}`}>\n                    {filteredZones.map((zone) => {\n                        return (\n                            <div key={zone.id} className='freight-zone-option'>\n                                <FormControlLabel value={zone.id} control={<Radio />} label={zone.name} />\n                                {selectedZone.id === zone.id &&\n                                    <RadioGroup value={selectedTier.id} onChange={handleChangeTier} className=\"freight-tiers-container\">\n                                        {zone.tiers && zone.tiers.map((tier) => {\n                                            const priceText = getPriceText(tier);\n                                            if (tier.type === FreightTierPriceType.Weight && !cartItemsHaveWeight) {\n                                                return null;\n                                            }\n                                            else {\n                                                return (\n                                                    <div key={tier.id} className='freight-tier-option'>\n                                                        <FormControlLabel value={tier.id} control={<Radio />} label={`${tier.name} - ${priceText}`} />\n                                                    </div>\n                                                );\n                                            }\n                                        })}\n                                    </RadioGroup>}\n                            </div>\n                        );\n                    })}\n                </RadioGroup>\n            );\n        }\n        else {\n            return (\n                <div className=\"freight-inner-content\">\n                    <FreightOptionIcon />\n                    <div className=\"freight-option\">\n                        <div className=\"freight-label\">{'TBC'}</div>\n                        <div className=\"freight-description\">{'Delivery information to be confirmed'}</div>\n                    </div>\n                </div>\n            );\n        }\n    };\n\n    return (\n        <div id=\"Freight-Panel\">\n            <div className=\"freight-title\">{PageContent.OrderCheckoutPageContent.default_freightLabel}\n                {hasFreightOptions && selectedTier.id < 0 && hasFilteredZones &&\n                    <span className='freight-validation-message'>Select a freight option</span>}</div>\n            {<FreightOptionsContent />}\n        </div>\n    );\n};\n\nexport default FreightPanel;","import React, { Component, SyntheticEvent } from 'react';\nimport { connect } from 'react-redux';\nimport { UpdateDeliveryInstructions, UpdateDeliveryDate } from './../../../Redux/Actions/OrderActions';\nimport { StripHTMLFromInputs } from '../../../Utils/B2BHelpers';\nimport SemanticDatepicker from 'react-semantic-ui-datepickers';\nimport { FormatDate } from '../../../Utils/OrderHelper';\nimport './Styles/_DeliveryInstructionsPanel.scss';\nimport 'react-semantic-ui-datepickers/dist/react-semantic-ui-datepickers.css';\n\ninterface componentProps {\n    UpdateDeliveryInstructions: (deliveryInstructionsInput: string) => void;\n    UpdateDeliveryDate: (deliveryDateInput: Date | null) => void;\n    order: {\n        orderDetails: {\n            deliveryInstructions: string;\n            deliveryDate: Date | null;\n        }\n    };\n    identity: {\n        moduleSettings: {\n            hideDeliveryDateField: boolean;\n        };\n    };\n    editMode: boolean;\n}\n\ninterface componentStates { }\n\nclass DeliveryInstructionsPanel extends Component<componentProps, componentStates> {\n    render() {\n        \n        const { order, identity, editMode } = this.props;\n\n        var minDate = new Date();\n        minDate.setDate(minDate.getDate() - 1);\n        return (\n            <div id=\"Delivery-Instructions-Panel\">\n                <div className=\"panel-container\">\n                    {!identity?.moduleSettings?.hideDeliveryDateField && (editMode || (!editMode && order.orderDetails.deliveryDate)) && <div className={`panel-content-group delivery-date ${!editMode ? \"non-edit-mode\" : \"\"}`}>\n                        <div className=\"panel-group-label\">{editMode ? \"Preferred Delivery Date\" : \"Preferred Delivery Date:\"}</div>\n                        <div className=\"panel-group-field\">\n                            {editMode ?\n                                <SemanticDatepicker value={order.orderDetails.deliveryDate != null ? new Date(order.orderDetails.deliveryDate) : null} onChange={this._onChangeDeliveryDate} clearOnSameDateClick={false} minDate={minDate} icon={\"calendar alternate outline\"} pointing={\"top left\"} showToday={false} showOutsideDays={true} /> : FormatDate(order.orderDetails.deliveryDate != null ? String(order.orderDetails.deliveryDate) : null)\n                            }\n                        </div>\n                    </div>}\n                    {(editMode || (!editMode && order.orderDetails.deliveryInstructions)) && <div className={`panel-content-group ${!editMode ? \"non-edit-mode\" : \"\"}`}>\n                        <div className=\"panel-group-label\">{editMode ? \"Delivery Instructions\" : \"Delivery Instructions:\"}</div>\n                        <div className=\"panel-group-field\">\n                            {editMode ? <textarea maxLength={1000} value={order.orderDetails.deliveryInstructions} onChange={this._onChange} /> : order.orderDetails.deliveryInstructions}\n                        </div>\n                    </div>}\n                </div>\n            </div>\n);\n    }\n\n    _onChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n        let targetInput = StripHTMLFromInputs(e.currentTarget.value);\n        this.props.UpdateDeliveryInstructions(targetInput);\n    }\n\n    _onChangeDeliveryDate = (_: SyntheticEvent | undefined, data: any) => {\n        this.props.UpdateDeliveryDate(data.value);\n    }\n}\n\nconst MapStateToProps = (state: { orderReducer: any; identityReducer: any; }) => ({\n    order: state.orderReducer,\n    identity: state.identityReducer,\n});\n\nexport default connect(MapStateToProps, { UpdateDeliveryInstructions, UpdateDeliveryDate })(DeliveryInstructionsPanel);","import React from 'react';\nimport { BemHelper, Typography } from '@cin7/ui';\nimport { AddressPanel } from '../../../Components/PageElements/Orders/AddressPanel';\nimport FreightPanel from '../../../Components/PageElements/Orders/FreightPanel';\nimport * as PageContent from '../../../Language/Default_Settings';\nimport { useDispatch, useSelector } from 'react-redux';\nimport DeliveryInstructionsPanel from '../../../Components/PageElements/Orders/DeliveryInstructionsPanel';\nimport { UpdateDeliveryAddress } from './../../../Redux/Actions/OrderActions';\nimport { getOrderAddressOrUserAddress, getOrderFirstNameOrUserFirstName, getOrderLastNameOrUserLastName } from '../../../Redux/Selectors/OrderSelectors';\n\nimport './Styles/_Delivery.scss';\n\nconst bem = new BemHelper('delivery');\n\nexport const Delivery: React.FC = () => {\n\n    const deliveryAddress = useSelector(getOrderAddressOrUserAddress);\n    const firstName = useSelector(getOrderFirstNameOrUserFirstName);\n    const lastName = useSelector(getOrderLastNameOrUserLastName);\n    const dispatch = useDispatch();\n    const updateDeliveryAddress = (deliveryAddress: any) => dispatch(UpdateDeliveryAddress(deliveryAddress));\n\n    return (\n        <div className={bem.block()}>\n            <div className={bem.element('delivery-container')}>\n                <Typography variant={\"h2\"} className={bem.element('delivery-title')} >\n                    Delivery\n                </Typography>\n                <div className={bem.element('delivery-inner-content')}>\n                    <AddressPanel title={PageContent.OrderCheckoutPageContent.default_deliveryAddressLabel}\n                        variant={\"delivery\"}\n                        address={deliveryAddress}\n                        firstName={firstName}\n                        lastName={lastName}\n                        UpdateAction={updateDeliveryAddress} />\n                    <FreightPanel />\n                    <DeliveryInstructionsPanel editMode={true} />\n                </div>\n            </div>\n        </div>\n    );\n}\n","import React from 'react';\n\nexport const PayOnlinePaymentIcon: React.FC = () => {\n    return (\n        <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>Pay Online</title>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M40.2659 11.3181H46.5079C47.0601 11.3181 47.5079 11.7658 47.5079 12.3181C47.5079 12.8704 47.0601 13.3181 46.5079 13.3181H40.2735C39.6873 13.3275 39.1087 13.4518 38.5704 13.6841C38.03 13.9172 37.5409 14.2546 37.1309 14.6769C36.721 15.0991 36.3982 15.598 36.1811 16.1451C35.964 16.6921 35.8569 17.2766 35.8657 17.865L35.8661 17.8866C35.8606 18.7264 36.0858 19.5515 36.5175 20.2719C36.9484 20.9911 37.5685 21.5782 38.31 21.9693L43.986 24.8954C45.0531 25.4576 45.9452 26.3021 46.5652 27.3366C47.1834 28.3682 47.5073 29.5492 47.5019 30.7517C47.5133 31.5993 47.3582 32.4409 47.0456 33.2289C46.7316 34.0201 46.2647 34.7418 45.6717 35.3525C45.0787 35.9633 44.3712 36.4513 43.5896 36.7885C42.808 37.1258 41.9675 37.3057 41.1163 37.318L41.1019 37.3182L34.8719 37.3181C34.3196 37.3181 33.8719 36.8704 33.8719 36.3181C33.8719 35.7658 34.3196 35.3181 34.8719 35.3181H41.0942C41.6804 35.3087 42.259 35.1844 42.7973 34.9521C43.3377 34.719 43.8268 34.3816 44.2368 33.9594C44.6467 33.5371 44.9695 33.0382 45.1866 32.4912C45.4037 31.9441 45.5108 31.3597 45.502 30.7712L45.5016 30.75C45.5068 29.9102 45.2814 29.0851 44.8497 28.3647C44.4187 27.6456 43.7988 27.0583 43.0575 26.6668L37.3821 23.7411C36.3146 23.1792 35.422 22.3347 34.8019 21.3C34.1837 20.2683 33.8599 19.087 33.8658 17.8844C33.8545 17.0368 34.0095 16.1953 34.3222 15.4074C34.6362 14.6161 35.103 13.8945 35.696 13.2837C36.289 12.6729 36.9965 12.185 37.7781 11.8477C38.5598 11.5105 39.4002 11.3306 40.2514 11.3182L40.2659 11.3181Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M41.5078 6.31787C42.0601 6.31787 42.5078 6.76559 42.5078 7.31787V12.3179C42.5078 12.8702 42.0601 13.3179 41.5078 13.3179C40.9555 13.3179 40.5078 12.8702 40.5078 12.3179V7.31787C40.5078 6.76559 40.9555 6.31787 41.5078 6.31787Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M41.5078 35.3179C42.0601 35.3179 42.5078 35.7656 42.5078 36.3179V40.6819C42.5078 41.2342 42.0601 41.6819 41.5078 41.6819C40.9555 41.6819 40.5078 41.2342 40.5078 40.6819V36.3179C40.5078 35.7656 40.9555 35.3179 41.5078 35.3179Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M5.50781 13.3181C4.71216 13.3181 3.9491 13.6342 3.38649 14.1968C2.82388 14.7594 2.50781 15.5225 2.50781 16.3181V36.3181C2.50781 37.1138 2.82388 37.8768 3.38649 38.4394C3.9491 39.002 4.71216 39.3181 5.50781 39.3181H29.5078C30.0601 39.3181 30.5078 39.7658 30.5078 40.3181C30.5078 40.8704 30.0601 41.3181 29.5078 41.3181H5.50781C4.18173 41.3181 2.90996 40.7913 1.97228 39.8536C1.0346 38.916 0.507812 37.6442 0.507812 36.3181V16.3181C0.507812 14.992 1.0346 13.7203 1.97228 12.7826C2.90996 11.8449 4.18173 11.3181 5.50781 11.3181H27.5078C28.0601 11.3181 28.5078 11.7658 28.5078 12.3181C28.5078 12.8704 28.0601 13.3181 27.5078 13.3181H5.50781Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M0.507812 20.3181C0.507812 19.7658 0.955528 19.3181 1.50781 19.3181H27.5078C28.0601 19.3181 28.5078 19.7658 28.5078 20.3181C28.5078 20.8704 28.0601 21.3181 27.5078 21.3181H1.50781C0.955528 21.3181 0.507812 20.8704 0.507812 20.3181Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M6.50781 26.3181C6.50781 25.7658 6.95553 25.3181 7.50781 25.3181H23.5078C24.0601 25.3181 24.5078 25.7658 24.5078 26.3181C24.5078 26.8704 24.0601 27.3181 23.5078 27.3181H7.50781C6.95553 27.3181 6.50781 26.8704 6.50781 26.3181Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M6.50781 30.3179C6.50781 29.7656 6.95553 29.3179 7.50781 29.3179H13.5078C14.0601 29.3179 14.5078 29.7656 14.5078 30.3179C14.5078 30.8702 14.0601 31.3179 13.5078 31.3179H7.50781C6.95553 31.3179 6.50781 30.8702 6.50781 30.3179Z\" fill=\"#00326B\" />\n        </svg>\n    );\n}\n","import React from 'react';\nimport { DecoratedRadioButton } from '@cin7/ui';\nimport { PaymentMethodType } from '../../../Enums/PaymentMethods/PaymentMethodType';\nimport { PayOnlinePaymentIcon } from '../../../Images/Icons/Orders/PayOnlinePaymentIcon';\n\ninterface PayOnlinePaymentOptionButtonProps {\n    payOnlineMethodCode: PaymentMethodType,\n    payOnlineChecked: boolean,\n    onClickEventHandler: () => void\n}\n\nexport const PayOnlinePaymentOptionButton: React.FC<PayOnlinePaymentOptionButtonProps> = ({payOnlineMethodCode, payOnlineChecked, onClickEventHandler}) => {\n    return (\n        <DecoratedRadioButton\n            icon={<PayOnlinePaymentIcon />}\n            message=\"Pay with a credit card or debit card online\"\n            title=\"Pay Online\"\n            value={payOnlineMethodCode}\n            checked={payOnlineChecked}\n            onClick={() => {\n                onClickEventHandler();\n            }}\n            css={null}\n        />\n    )\n}","import React from 'react';\n\nexport const OnAccountPaymentIcon: React.FC = () => {\n    return (\n        <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <title>On Account</title>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.0078 26C12.0078 24.8954 12.9032 24 14.0078 24H34.0078C35.1124 24 36.0078 24.8954 36.0078 26V40C36.0078 41.1046 35.1124 42 34.0078 42H14.0078C12.9032 42 12.0078 41.1046 12.0078 40V26ZM34.0078 26H14.0078V40H34.0078V26Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.0078 29C12.0078 28.4477 12.4555 28 13.0078 28H35.0078C35.5601 28 36.0078 28.4477 36.0078 29C36.0078 29.5523 35.5601 30 35.0078 30H13.0078C12.4555 30 12.0078 29.5523 12.0078 29Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M19.0078 24C19.5601 24 20.0078 24.4477 20.0078 25V41C20.0078 41.5523 19.5601 42 19.0078 42C18.4555 42 18.0078 41.5523 18.0078 41V25C18.0078 24.4477 18.4555 24 19.0078 24Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M25.0078 24C25.5601 24 26.0078 24.4477 26.0078 25V41C26.0078 41.5523 25.5601 42 25.0078 42C24.4555 42 24.0078 41.5523 24.0078 41V25C24.0078 24.4477 24.4555 24 25.0078 24Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M9 2C8.73478 2 8.48043 2.10536 8.29289 2.29289C8.10536 2.48043 8 2.73478 8 3V45C8 45.2652 8.10536 45.5196 8.29289 45.7071C8.48043 45.8946 8.73478 46 9 46H39C39.2652 46 39.5196 45.8946 39.7071 45.7071C39.8946 45.5196 40 45.2652 40 45V15.4142L26.5858 2H9ZM6.87868 0.87868C7.44129 0.316071 8.20435 0 9 0H27C27.2652 0 27.5196 0.105357 27.7071 0.292893L41.7071 14.2929C41.8946 14.4804 42 14.7348 42 15V45C42 45.7956 41.6839 46.5587 41.1213 47.1213C40.5587 47.6839 39.7956 48 39 48H9C8.20435 48 7.44129 47.6839 6.87868 47.1213C6.31607 46.5587 6 45.7956 6 45V3C6 2.20435 6.31607 1.44129 6.87868 0.87868Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M27 0C27.5523 0 28 0.447715 28 1V13C28 13.2652 28.1054 13.5196 28.2929 13.7071C28.4804 13.8946 28.7348 14 29 14H41C41.5523 14 42 14.4477 42 15C42 15.5523 41.5523 16 41 16H29C28.2043 16 27.4413 15.6839 26.8787 15.1213C26.3161 14.5587 26 13.7957 26 13V1C26 0.447715 26.4477 0 27 0Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M17.0078 16C17.5601 16 18.0078 16.4477 18.0078 17V19C18.0078 19.5523 17.5601 20 17.0078 20C16.4555 20 16.0078 19.5523 16.0078 19V17C16.0078 16.4477 16.4555 16 17.0078 16Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M17.0078 6C17.5601 6 18.0078 6.44772 18.0078 7V9C18.0078 9.55228 17.5601 10 17.0078 10C16.4555 10 16.0078 9.55228 16.0078 9V7C16.0078 6.44772 16.4555 6 17.0078 6Z\" fill=\"#00326B\" />\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M15 10C14.7348 10 14.4804 10.1054 14.2929 10.2929C14.1054 10.4804 14 10.7348 14 11C14 11.2652 14.1054 11.5196 14.2929 11.7071C14.4804 11.8946 14.7348 12 15 12H19C19.7957 12 20.5587 12.3161 21.1213 12.8787C21.6839 13.4413 22 14.2043 22 15C22 15.7957 21.6839 16.5587 21.1213 17.1213C20.5587 17.6839 19.7957 18 19 18H13C12.4477 18 12 17.5523 12 17C12 16.4477 12.4477 16 13 16H19C19.2652 16 19.5196 15.8946 19.7071 15.7071C19.8946 15.5196 20 15.2652 20 15C20 14.7348 19.8946 14.4804 19.7071 14.2929C19.5196 14.1054 19.2652 14 19 14H15C14.2043 14 13.4413 13.6839 12.8787 13.1213C12.3161 12.5587 12 11.7957 12 11C12 10.2043 12.3161 9.44129 12.8787 8.87868C13.4413 8.31607 14.2043 8 15 8H21C21.5523 8 22 8.44772 22 9C22 9.55228 21.5523 10 21 10H15Z\" fill=\"#00326B\" />\n        </svg>\n    );\n}\n","import React from \"react\";\nimport { DecoratedRadioButton } from '@cin7/ui';\nimport { PaymentMethodType } from '../../../Enums/PaymentMethods/PaymentMethodType';\nimport { OnAccountPaymentIcon } from '../../../Images/Icons/Orders/OnAccountPaymentIcon';\n\ninterface OnAccountPaymentOptionButtonProps {\n    onAccountMethodCode: PaymentMethodType,\n    onAccountChecked: boolean,\n    onClickEventHandler: () => void\n}\n\nexport const OnAccountPaymentOptionButton: React.FC<OnAccountPaymentOptionButtonProps> = ({onAccountMethodCode, onAccountChecked, onClickEventHandler}) => {\n    return (\n        <DecoratedRadioButton\n            icon={<OnAccountPaymentIcon />}\n            message=\"Use your account to order now\"\n            title=\"Pay On Account\"\n            value={onAccountMethodCode}\n            checked={onAccountChecked}\n            onClick={() => {\n                onClickEventHandler();\n            }}\n            css={null}\n        />\n    )\n}","import React, { useCallback, useEffect, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport {\n    getIsPaymentsPortalEnabled,\n    getIsOnAccountOptionEnabled,\n    getUserIsOnHold,\n    getUserDepositPercentage,\n    getUserRemainingCreditLimit,\n} from \"../../../Redux/Selectors/UserSelectors\";\nimport { getCartItemsTotal, getPaymentMethod } from \"../../../Redux/Selectors/OrderSelectors\";\nimport { PayOnlinePaymentOptionButton } from \"./PayOnlinePaymentOptionButton\";\nimport { OnAccountPaymentOptionButton } from \"./OnAccountPaymentOptionButton\";\nimport { RadioGroup } from \"@cin7/ui\";\nimport { UpdateOrderPaymentMethod } from \"../../../Redux/Actions/OrderActions\";\nimport { PaymentMethodType } from \"../../../Enums/PaymentMethods/PaymentMethodType\";\nimport { getIsPayAccountOnHold } from \"../../../Utils/OrderHelper\";\n\nimport \"./Styles/_PaymentPanel.scss\";\n\nexport const PaymentPanel: React.FC = () => {\n    const userIsOnHold = useSelector(getUserIsOnHold);\n    const remainingCreditLimit = useSelector(getUserRemainingCreditLimit);\n    const cartItemsTotal = useSelector(getCartItemsTotal);\n    const isUserOnHold = getIsPayAccountOnHold(userIsOnHold, remainingCreditLimit, cartItemsTotal);\n\n    const onAccountPaymentConfig = useSelector(getIsOnAccountOptionEnabled);\n    const paymentPortalPaymentConfig = useSelector(getIsPaymentsPortalEnabled);\n    const isPaymentsPortalEnabled = paymentPortalPaymentConfig.active;\n    const isOnAccountOptionEnabled = onAccountPaymentConfig.active;\n    const userDepositPercentage = useSelector(getUserDepositPercentage);\n\n    const selectedPaymentMethod = useSelector(getPaymentMethod);\n\n    const onAccountMethodCode = PaymentMethodType.OnAccount;\n    const payOnlineMethodCode = PaymentMethodType.PayOnline;\n\n    const displayOnAccountPaymentOptionFirst = onAccountPaymentConfig?.sort <= paymentPortalPaymentConfig?.sort;\n    const displayOnAccountPaymentOption =\n        !isUserOnHold && isOnAccountOptionEnabled && (!(userDepositPercentage >= 100) || !isPaymentsPortalEnabled);\n\n    const getCurrentPaymentMethod = useCallback(() => {\n        if (isUserOnHold && isPaymentsPortalEnabled) {\n            return payOnlineMethodCode;\n        }\n\n        if (selectedPaymentMethod >= 0) {\n            if (selectedPaymentMethod === payOnlineMethodCode && isPaymentsPortalEnabled) {\n                return payOnlineMethodCode;\n            }\n            if (selectedPaymentMethod === onAccountMethodCode && isOnAccountOptionEnabled) {\n                return onAccountMethodCode;\n            }\n        }\n\n        if (isPaymentsPortalEnabled && (!displayOnAccountPaymentOptionFirst || !displayOnAccountPaymentOption)) {\n            return payOnlineMethodCode;\n        } else {\n            return onAccountMethodCode;\n        }\n    }, [\n        displayOnAccountPaymentOption,\n        displayOnAccountPaymentOptionFirst,\n        isOnAccountOptionEnabled,\n        isPaymentsPortalEnabled,\n        isUserOnHold,\n        onAccountMethodCode,\n        payOnlineMethodCode,\n        selectedPaymentMethod,\n    ]);\n\n    const [currentPaymentMethod, setCurrentPaymentMethod] = useState<PaymentMethodType>(getCurrentPaymentMethod());\n\n    const [onAccountChecked, setOnAccountChecked] = useState(currentPaymentMethod === onAccountMethodCode);\n    const [payOnlineChecked, setPayOnlineChecked] = useState(currentPaymentMethod === payOnlineMethodCode);\n\n    const dispatch = useDispatch();\n\n    const updatePaymentMethod = useCallback(\n        (paymentMethod: PaymentMethodType) => {\n            dispatch(UpdateOrderPaymentMethod(paymentMethod));\n        },\n        [dispatch]\n    );\n\n    useEffect(() => {\n        const paymentMethod = getCurrentPaymentMethod();\n        setCurrentPaymentMethod(paymentMethod);\n        updatePaymentMethod(paymentMethod);\n        setPayOnlineChecked(!!paymentMethod);\n        setOnAccountChecked(!paymentMethod);\n    }, [setCurrentPaymentMethod, updatePaymentMethod, getCurrentPaymentMethod]);\n\n    return (\n        <div id=\"Payment-Panel\">\n            <div className=\"payment-title\">Payment Method</div>\n            {isUserOnHold && !isPaymentsPortalEnabled && (\n                <div className=\"no-payment-methods-content\">No payment methods available.</div>\n            )}\n            <RadioGroup>\n                {displayOnAccountPaymentOptionFirst ? (\n                    <>\n                        {displayOnAccountPaymentOption && (\n                            <OnAccountPaymentOptionButton\n                                onAccountChecked={onAccountChecked}\n                                onAccountMethodCode={onAccountMethodCode}\n                                onClickEventHandler={() => {\n                                    setOnAccountChecked(true);\n                                    setPayOnlineChecked(false);\n                                    updatePaymentMethod(onAccountMethodCode);\n                                }}\n                            />\n                        )}\n                        {isPaymentsPortalEnabled && !isUserOnHold && <div style={{ marginBottom: \"1rem\" }}></div>}\n                        {isPaymentsPortalEnabled && (\n                            <PayOnlinePaymentOptionButton\n                                payOnlineChecked={payOnlineChecked}\n                                payOnlineMethodCode={payOnlineMethodCode}\n                                onClickEventHandler={() => {\n                                    setPayOnlineChecked(true);\n                                    setOnAccountChecked(false);\n                                    updatePaymentMethod(payOnlineMethodCode);\n                                }}\n                            />\n                        )}\n                    </>\n                ) : (\n                    <>\n                        {isPaymentsPortalEnabled && (\n                            <PayOnlinePaymentOptionButton\n                                payOnlineChecked={payOnlineChecked}\n                                payOnlineMethodCode={payOnlineMethodCode}\n                                onClickEventHandler={() => {\n                                    setPayOnlineChecked(true);\n                                    setOnAccountChecked(false);\n                                    updatePaymentMethod(payOnlineMethodCode);\n                                }}\n                            />\n                        )}\n                        {displayOnAccountPaymentOption && <div style={{ marginBottom: \"1rem\" }}></div>}\n                        {displayOnAccountPaymentOption && (\n                            <OnAccountPaymentOptionButton\n                                onAccountChecked={onAccountChecked}\n                                onAccountMethodCode={onAccountMethodCode}\n                                onClickEventHandler={() => {\n                                    setOnAccountChecked(true);\n                                    setPayOnlineChecked(false);\n                                    updatePaymentMethod(onAccountMethodCode);\n                                }}\n                            />\n                        )}\n                    </>\n                )}\n            </RadioGroup>\n        </div>\n    );\n};\n","import React, { Component } from 'react';\nimport { Input } from 'reactstrap';\nimport { connect } from 'react-redux';\nimport { UpdatePoNumber } from './../../../Redux/Actions/OrderActions';\nimport { StripHTMLFromInputs } from '../../../Utils/B2BHelpers';\n\nimport './Styles/_InvoiceParticularPanel.scss';\n\ninterface componentProps {\n    UpdatePoNumber: (poNumberInput: string) => void;\n    order: {\n        orderDetails: {\n            poNumber: string;\n        }\n    }\n    editMode: boolean;\n}\n\ninterface componentStates { }\n\nclass InvoiceParticularPanel extends Component<componentProps, componentStates> {\n    render() {\n        const { order, editMode } = this.props;\n        \n        return (\n            <div id=\"Invoice-Particular-Panel\">\n                <div className=\"panel-container\">\n                    {(editMode || (!editMode && order.orderDetails.poNumber)) && <div className={`panel-content-group ${!editMode ? \"non-edit-mode\" : \"\"}`}>\n                        <div className=\"panel-group-label\">{editMode ? \"Purchase Order Number\" : \"Purchase Order Number:\"}</div>\n                        <div className=\"panel-group-field\">\n                            {editMode ?\n                                <Input maxLength={255} onChange={this._onChangePoNumber} value={order.orderDetails.poNumber} /> : order.orderDetails.poNumber\n                            }\n                        </div>\n                    </div>}\n                </div>\n            </div>\n        );\n    }\n\n    _onChangePoNumber = (e: React.ChangeEvent<HTMLInputElement>) => {\n        let targetInput = StripHTMLFromInputs(e.currentTarget.value);\n        \n        this.props.UpdatePoNumber(targetInput);\n    }\n}\n\nconst MapStateToProps = (state: {orderReducer: any}) => ({\n    order: state.orderReducer\n});\n\nexport default connect(MapStateToProps, {UpdatePoNumber})(InvoiceParticularPanel);","import React from 'react';\nimport { BemHelper, Typography } from '@cin7/ui';\nimport { AddressPanel } from '../../../Components/PageElements/Orders/AddressPanel';\nimport * as PageContent from '../../../Language/Default_Settings';\nimport { useSelector } from 'react-redux';\nimport { getBillingAddress } from '../../../Redux/Selectors/OrderSelectors';\nimport { PaymentPanel } from './PaymentPanel';\nimport InvoiceParticularPanel from './InvoiceParticularsPanel';\n\nimport './Styles/_Billing.scss';\n\nconst bem = new BemHelper('billing');\n\nexport const Billing: React.FC = () => {\n\n    const billingAddress = useSelector(getBillingAddress);\n\n    return (\n        <div className={bem.block()}>\n            <div className={bem.element('billing-container')}>\n                <Typography variant={\"h2\"} className={bem.element('billing-title')} >\n                    Billing\n                </Typography>\n                <div className={bem.element('billing-inner-content')}>\n                    <AddressPanel title={PageContent.OrderCheckoutPageContent.default_billingAddressLabel} variant={\"billing\"} address={billingAddress} />\n                    <InvoiceParticularPanel editMode={true} />\n                    <PaymentPanel />\n                </div>\n            </div>\n        </div>\n    );\n}\n","import { BemHelper, Typography } from '@cin7/ui';\nimport React, { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { TotalsPanel } from '../../../Components/PageElements/Orders/TotalsPanel';\nimport { CheckoutFooter } from '../../../Components/PageElements/Orders/CheckoutFooter';\nimport { EmptyCart } from '../../../Components/PageElements/Orders/EmptyCart';\nimport { B2BPageTitles } from '../../../Language/Default_Settings';\nimport { getOrderErrorMessage, getOrderReducer, getPaymentUrl, getShouldRedirectToConfirmation, \n    getShouldRedirectToPayment, getPaymentFailed } from '../../../Redux/Selectors/OrderSelectors';\nimport { Delivery } from '../../../Components/PageElements/Orders/Delivery';\nimport { Billing } from '../../../Components/PageElements/Orders/Billing';\nimport { Redirect } from 'react-router';\nimport Cin7ConfirmationBox from '../../../Components/PageElements/Cin7ConfirmationBox';\nimport { ResetCheckoutState, ResetOrderPaymentRedirect, ForceStopDisplayingPlacingOrder, \n    SetOrderFailAndErrorMessage, SetPaymentFailed } from '../../../Redux/Actions/OrderActions';\nimport { GetUrlParameters } from '../../../Utils/B2BHelpers';\nimport { RootState } from \"../../..\";\n\nimport \"../Styles/_Checkout.scss\";\n\nconst bem = new BemHelper(\"checkout-page\");\n\nexport const Checkout = () => {\n    const cart = useSelector(getOrderReducer);\n    const cartItems = cart.orderItems;\n    const cartItemsCount = cartItems.length;\n    const genericPaymentError = \"Payment Failed. Please try again.\";\n    const cartError = useSelector(getOrderErrorMessage);\n    const shouldRedirectToPayment = useSelector(getShouldRedirectToPayment);\n    const shouldRedirectToConfirmation = useSelector(getShouldRedirectToConfirmation);\n    const moduleSettings = useSelector((state: RootState) => state.identityReducer.moduleSettings);\n    const hasCustomCheckoutSummary = !!moduleSettings.checkoutSummaryText;\n    const paymentUrl = useSelector(getPaymentUrl);\n    const didPaymentFail = useSelector(getPaymentFailed);\n    const dispatch = useDispatch();\n\n    useEffect(() => {\n        document.title = `${B2BPageTitles.root_title} - ${B2BPageTitles.order_checkout_title}`;\n        const parameters = GetUrlParameters([\"redirectToCheckout\"]);\n\n        if (parameters && parameters[\"redirectToCheckout\"]) {\n            dispatch(ForceStopDisplayingPlacingOrder());\n        }\n    }, [dispatch]);\n\n    useEffect(() => {\n        dispatch(ResetCheckoutState());\n    }, [dispatch]);\n\n    useEffect(() => {\n        if (shouldRedirectToPayment && paymentUrl) {\n            window.location.href = paymentUrl;\n            dispatch(ResetOrderPaymentRedirect());\n        }\n    }, [dispatch, shouldRedirectToPayment, paymentUrl]);\n\n    useEffect(() => {\n        const parameters = GetUrlParameters([\"failed\", \"msg\"]);\n        if(parameters && parameters[\"failed\"] && parameters[\"msg\"]){\n            dispatch(SetPaymentFailed(true));\n            dispatch(SetOrderFailAndErrorMessage(decodeURIComponent(parameters[\"msg\"])));\n        }\n    }, [dispatch, cartError]);\n    \n    const CustomCheckoutSummary = () => {\n        if (hasCustomCheckoutSummary) {\n            return (\n            <div className=\"checkout-summary\">\n                <aside className=\"summary-text\">{moduleSettings.checkoutSummaryText}</aside>\n            </div>)\n        } else return null;\n    };\n\n    if (shouldRedirectToConfirmation) {\n        return (\n            <Redirect to={\n                {\n                    pathname: '/orders/complete'\n                }\n            } />\n        );\n    }\n    else {\n        return (\n            <>\n                <div className={bem.block()}>\n                    <div className={bem.element('checkout-inner-content')}>\n                        {\n                            cartItemsCount > 0 && \n                            <div className={bem.element('header')}>\n                                <Typography variant={\"h1\"} className={bem.element('header-text')} >\n                                    Checkout\n                                </Typography>\n                            </div>\n                        }\n                        {cartError && (\n                            <div className={bem.element(\"error-container\")}>\n                                <Cin7ConfirmationBox\n                                    boxType={\"error-box\"}\n                                    boxIcon={\"error-icon\"}\n                                    boxMessage={didPaymentFail ? genericPaymentError : cartError}\n                                    boxSubMessage={didPaymentFail ? cartError : \"\"}\n                                />\n                            </div>\n                        )}\n                        <div className={bem.element(\"checkout-totals-mobile\")}>\n                            {cartItemsCount > 0 && <TotalsPanel />}\n                            <CustomCheckoutSummary />\n                        </div>\n                        {cartItemsCount === 0 && (\n                            <div className={bem.element('empty-cart-container')}><EmptyCart /></div>\n                        )}\n                        {\n                            cartItemsCount > 0 && \n                            <>\n                                <Delivery />\n                                <Billing />\n                                <div className={bem.element('checkout-totals-footer')}><CheckoutFooter displayCompleteButton /></div>\n                            </>\n                        } \n                    </div>\n                    {cartItemsCount > 0 && (\n                        <div className={bem.element(\"checkout-totals-desktop\")}>\n                            <TotalsPanel />\n                            <CheckoutFooter displayCompleteButton />\n                            <CustomCheckoutSummary />\n                        </div>\n                    )}\n                </div>\n                <div className=\"checkout-footer-mobile\">{cartItemsCount > 0 && <CheckoutFooter displayCompleteButton />}</div>\n            </>\n        );\n    }\n};\n","import axios from \"axios\";\nimport APIHost from \"../APIHost\";\nimport ApiUtil from \"../Utils/ApiUtil\";\n\nexport async function ApproveAndProcessOrder(orderId: number): Promise<boolean> {\n    const headers = new ApiUtil().DefaultHeaders('');\n\n    if (headers === null) {\n        throw new Error ('Unauthenticated');\n    }\n\n    try {\n        const result = await axios.post(new APIHost().CheckoutAPI(\"ApproveOrder\"), { moduleId: new ApiUtil().GetModuleId(), orderId: orderId }, headers);\n        return result.data;\n    } catch (e) {\n        return Promise.reject(e);\n    }\n}","import React, { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport * as PageContent from '../../../Language/Default_Settings';\nimport CircleTickIcon from '../../../Images/Icons/Global/CircleTickIcon';\nimport { OrderCompletionSuccessful } from '../../../Redux/Actions/OrderActions';\nimport { GetUrlParameters } from '../../../Utils/B2BHelpers';\nimport { ApproveAndProcessOrder } from '../../../Domain/ApproveAndProcessOrder';\nimport './../Styles/_OrderCompletion.scss';\nimport { getFullOrder } from \"../../../Redux/Selectors/OrderSelectors\";\nimport { getIsCustomHomepageEnabled } from \"../../../Redux/Selectors/SettingsSelectors\";\nimport { getUserInfo, getUserInfoFetched } from \"../../../Redux/Selectors/UserSelectors\";\n\nconst OrderCompletion = () => {\n    const dispatch = useDispatch();\n\n    const fullOrder = useSelector(getFullOrder);\n    const userInfo = useSelector(getUserInfo);\n\n    useEffect(() => {\n        document.title = `${PageContent.B2BPageTitles.root_title} - ${PageContent.B2BPageTitles.order_completion_title}`;\n        dispatch(OrderCompletionSuccessful());\n\n        const parameters = GetUrlParameters([\"paid\", \"fullyPaidRedirect\"]);\n\n        if (parameters && parameters[\"paid\"] && !parameters[\"fullyPaidRedirect\"]) {\n            ApproveAndProcessOrder(fullOrder.id);\n        }\n    }, [dispatch, fullOrder.id]);\n\n    const isCustomHomepageEnabled = useSelector(getIsCustomHomepageEnabled);\n    const isUserInfoFetched = useSelector(getUserInfoFetched);\n\n    return (\n        <>\n            <div id=\"Order-Completion-Container\">\n                <div className=\"order-completion-content\">\n                    <div className=\"order-completion-icon\"><CircleTickIcon strokeColor=\"#61A25E\" /></div>\n                    <div className=\"order-completion-title\">{PageContent.OrderCompletionPageContent.default_orderSuccessMessage}</div>\n                    <div className=\"order-completion-body\">\n                        <div className=\"order-reference-text\">Your order number is<div className=\"order-reference\">{fullOrder.reference}</div></div>\n                        <div className=\"order-email-text\">We will send an email confirmation to<div className=\"email-display\">{userInfo.email}</div></div>\n                    </div>\n                    <div className=\"order-completion-action\">\n                        {(isUserInfoFetched && isCustomHomepageEnabled) ? (\n                            <Link className=\"action-link\" to={'/home/'}>{PageContent.OrderCompletionPageContent.default_returntohomepageButtonText}</Link>\n                        ) : (\n                            <Link className=\"action-link\" to={'/products/'}>{PageContent.OrderCompletionPageContent.default_returnButtonText}</Link>\n                        )}\n                    </div>\n                </div>\n            </div>\n        </>\n    );\n}\n\nexport default OrderCompletion;","import React, { Component } from 'react';\nimport { Route, Switch, Redirect } from 'react-router-dom';\nimport { createPortal } from 'react-dom';\nimport { connect } from 'react-redux';\nimport SideMenu from '../../Components/Global/SideMenu';\nimport { Header } from '../../Components/Global/Header';\nimport { Cart } from './Views/Cart';\nimport { Checkout } from './Views/Checkout';\nimport OrderCompletion from './Views/OrderCompletion';\nimport Loading from '../../Components/Global/Loading';\n\nimport './Styles/_Orders.scss';\n\ninterface componentProps {\n    cartItems: {\n        isLoading: boolean;\n        shouldRedirectToPayment: boolean;\n        shouldContinueDisplayingPlacingOrder: boolean;\n    };\n}\n \ninterface componentStates {}\n\nclass Orders extends Component<componentProps, componentStates> {\n    render() {\n        const { cartItems } = this.props;\n        return (\n            <>\n                {(cartItems.isLoading || cartItems.shouldRedirectToPayment || cartItems.shouldContinueDisplayingPlacingOrder)\n                    && createPortal(<Loading text=\"Placing Order...\" takeOver/>, document.body)}\n                <SideMenu />\n                <div id=\"Body-Content\">\n                    <Header />\n                    <Switch>\n                        <Route exact path={'/cart'} component={Cart} />\n                        <Route exact path={'/checkout'} component={Checkout} />\n                        <Route exact path={'/orders/complete'} component={OrderCompletion} />\n                        <Redirect to={'/page-not-found'} />\n                    </Switch>\n                </div>\n            </>\n        );\n        \n    }\n}\n\nconst MapStateToProps = (state: {orderReducer: any}) => ({\n    cartItems: state.orderReducer\n});\n\nexport default connect(MapStateToProps)(Orders);","import React from 'react';\nimport { Dialog } from \"@cin7/ui\"\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getProductDetailsId, showProductDetailsModal } from '../../Redux/Selectors/ProductDetailsSelectors';\nimport ProductDetailsModalContent from '../PageElements/Products/ProductDetailsModal';\nimport { HideProductDetailsModal } from '../../Redux/Actions/ProductDetailsActions';\n\nexport const ProductDetailsModal = () => {\n    const visible = useSelector(showProductDetailsModal);\n    const productId = useSelector(getProductDetailsId);\n    const dispatch = useDispatch();\n    const hideModal = () => dispatch(HideProductDetailsModal)\n\n    if (!visible) return null;\n\n    return (\n        <Dialog open onClose={(e, reason) => hideModal()} className=\"product\" fullWidth maxWidth={'lg'}>\n            <div className=\"product-details-modal-content\">\n                <ProductDetailsModalContent\n                    productId={productId}\n                    CloseAction={hideModal}\n                />\n            </div>\n        </Dialog>\n    )\n}","import { FormControl, Grid, TextField } from \"@cin7/ui\";\nimport React, { SyntheticEvent, useMemo, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { RootState } from \"../..\";\nimport SidePageBanner from \"../../Components/PageElements/Login/SidePageBanner\";\nimport \"./Styles/_ContactUs.scss\";\nimport ReCAPTCHA from \"react-google-recaptcha\";\nimport {\n  contactRequestEmailTypes,\n  ReCaptchaValidationRequestTypes,\n  SendContactUsRequestEmail,\n  ValidateGoogleReCaptcha,\n} from \"../../Redux/Actions/BrandingActions\";\nimport { Form } from \"semantic-ui-react\";\nimport { useHistory } from \"react-router\";\nimport { ValidateEmailAddress } from \"../../Utils/B2BHelpers\";\nimport StoreHeading from \"./Views/StoreHeading\";\nimport { GetTenantImageUrl } from \"../../Utils/LoginHelper\";\nimport * as types from \"../../Redux/Types/BrandingTypes\";\nimport APIHost from \"../../APIHost\";\n\nexport const ContactUsForm = () => {\n  const history = useHistory();\n  const dispatch = useDispatch();\n\n  const brandingInfo = useSelector((state: RootState) => state.brandingReducer);\n\n  const [name, setName] = useState(\"\");\n  const [email, setEmail] = useState(\"\");\n  const [phone, setPhone] = useState(\"\");\n  const [companyName, setCompanyName] = useState(\"\");\n  const [message, setMessage] = useState(\"\");\n  const [nameHasValidationError, setNameHasValidationError] = useState(false);\n  const [emailHasValidationError, setEmailHasValidationError] = useState(false);\n  const [messageHasValidationError, setMessageHasValidationError] =\n    useState(false);\n  const [emailValidationErrorMessage, setEmailValidationErrorMessage] =\n    useState(\"\");\n  const [recaptchaValidationError, setRecaptchaValidationError] =\n    useState(false);\n  const [recaptchaClicked, setRecaptchaClicked] =\n    useState(false);\n  const [reCaptchaTokenExpired, setReCaptchaTokenExpired] =\n    useState(false);\n  const [recaptchaValidationErrorMessage, setRecaptchaValidationErrorMessage] = useState(\"\");\n\n  const onRecaptchaChange = (value: any) => {\n    setRecaptchaClicked(true);\n    const data: ReCaptchaValidationRequestTypes = {\n      token: value,\n      moduleId: brandingInfo.moduleId,\n    };\n    dispatch(ValidateGoogleReCaptcha(data));\n    setRecaptchaValidationError(false);\n  };\n\n  const onRecaptchaExpiry = () => {\n    dispatch({\n      type: types.Update_ReCaptcha_Validation_Result,\n      payload: {\n          success: false\n      }\n    })\n    setRecaptchaClicked(false);\n    setReCaptchaTokenExpired(true);\n  }\n\n  const validateMandatoryFields = () => {\n    let hasValidationErrors = false;\n    if (!name) {\n      setNameHasValidationError(true);\n      hasValidationErrors = true;\n    }\n    if (!message) {\n      setMessageHasValidationError(true);\n      hasValidationErrors = true;\n    }\n    if (!email) {\n      setEmailHasValidationError(true);\n      setEmailValidationErrorMessage(\"Enter your email address\");\n      hasValidationErrors = true;\n    } else if (!ValidateEmailAddress(email)) {\n      setEmailHasValidationError(true);\n      setEmailValidationErrorMessage(\"Enter a valid email address\");\n      hasValidationErrors = true;\n    }\n\n    if(!recaptchaClicked){\n      if(!reCaptchaTokenExpired){\n        setRecaptchaValidationError(true);\n        setRecaptchaValidationErrorMessage(\"This field is required\");\n      }      \n      hasValidationErrors = true;\n    }\n    else if(recaptchaClicked && !brandingInfo.isReCaptchaValidated){\n      setRecaptchaValidationError(true);\n      setRecaptchaValidationErrorMessage(\"Unable to verify reCAPTCHA, please try again\");\n      hasValidationErrors = true;\n    }\n\n    return hasValidationErrors;\n  };\n\n  const resetMandatoryFieldsError = () => {\n    setNameHasValidationError(false);\n    setMessageHasValidationError(false);\n    setEmailHasValidationError(false);\n    setRecaptchaValidationError(false);\n    setRecaptchaClicked(false);\n    setReCaptchaTokenExpired(false);\n  };\n\n  const handleSubmit = (e: SyntheticEvent) => {\n    e.preventDefault();\n    const hasValidationErrors = validateMandatoryFields();\n    if (hasValidationErrors) return;\n\n    const data: contactRequestEmailTypes = {\n      name,\n      email,\n      phone,\n      companyName,\n      message,\n      moduleId: brandingInfo.moduleId,\n    };\n\n    dispatch(SendContactUsRequestEmail(data));\n    resetMandatoryFieldsError();\n  };\n\n  const handleCancel = (e: SyntheticEvent) => {\n    history.push(\"/login\");\n  };\n\n  const displayEmailError = useMemo(() => {\n    return (\n      brandingInfo.isContactFormEmailRequested &&\n      brandingInfo.isContactFormEmailRequestHasResponse &&\n      !brandingInfo.contactUsEmailStatus\n    );\n  }, [\n    brandingInfo.isContactFormEmailRequested,\n    brandingInfo.contactUsEmailStatus,\n    brandingInfo.isContactFormEmailRequestHasResponse,\n  ]);\n\n  let logoImageUrl = GetTenantImageUrl(brandingInfo.loginPageImageUrl);\n  const apiHost = new APIHost();\n  const appSettings = apiHost.GetEnvironmentConfig();\n\n  return (\n    <div id=\"Contact-Form\">\n      <div className=\"contact-form-container customer-page\">\n        <SidePageBanner customerBanner={brandingInfo.loginBannerImageUrl} />\n\n        <div className=\"contact-us-section\">\n          <Form onSubmit={handleSubmit}>\n            <div className=\"store-name\">\n              <StoreHeading\n                logoImageUrl={logoImageUrl}\n                storeName={brandingInfo.storeName}\n              />\n            </div>\n            <div className=\"contact-us-body\">\n              <h2 className=\"header\">Contact Us</h2>\n              <Grid container spacing={2} className=\"contact-us-grid\">\n                <Grid item xs={12} sm={6} md={6} className=\"name\">\n                  <div className=\"panel-content-group\">\n                    <div\n                      className={\n                        nameHasValidationError\n                          ? \"panel-group-label-error\"\n                          : \"panel-group-label\"\n                      }\n                    >\n                      Name*\n                    </div>\n                    <FormControl fullWidth>\n                      <TextField\n                        variant=\"outlined\"\n                        inputProps={{ className: \"contact-us-name\"}}\n                        value={name}\n                        placeholder=\"Type in your name\"\n                        onChange={(e) => {\n                          setNameHasValidationError(false);\n                          setName(e.target.value);\n                        }}\n                        error={nameHasValidationError}\n                      />\n                    </FormControl>\n                    <div className=\"panel-group-field\">\n                      {nameHasValidationError && (\n                        <div className=\"panel-group-error-text\">\n                          Enter your Name\n                        </div>\n                      )}\n                    </div>\n                  </div>\n                </Grid>\n                <Grid item xs={12} sm={6} md={6} className=\"phone-number\">\n                  <div className=\"panel-content-group\">\n                    <div className=\"panel-group-label\">Phone Number</div>\n                    <FormControl fullWidth>\n                      <TextField\n                        variant=\"outlined\"\n                        inputProps={{ className: \"contact-us-phone\"}}\n                        value={phone}\n                        placeholder=\"Type in your phone number\"\n                        onChange={(e) => setPhone(e.target.value)}\n                      />\n                    </FormControl>\n                    <div className=\"panel-group-field\"></div>\n                  </div>\n                </Grid>\n                <Grid item xs={12} sm={6} md={6} className=\"email-address\">\n                  <div className=\"panel-content-group\">\n                    <div\n                      className={\n                        emailHasValidationError\n                          ? \"panel-group-label-error\"\n                          : \"panel-group-label\"\n                      }\n                    >\n                      Email*\n                    </div>\n                    <FormControl fullWidth>\n                      <TextField\n                        variant=\"outlined\"\n                        inputProps={{ className: \"contact-us-email\"}}\n                        type=\"email\"\n                        value={email}\n                        placeholder=\"Type in your email\"\n                        onChange={(e) => {\n                          setEmailHasValidationError(false);\n                          setEmail(e.target.value);\n                        }}\n                        error={emailHasValidationError}\n                      />\n                    </FormControl>\n                    <div className=\"panel-group-field\">\n                      {emailHasValidationError && (\n                        <div className=\"panel-group-error-text\">\n                          {emailValidationErrorMessage}\n                        </div>\n                      )}\n                    </div>\n                  </div>\n                </Grid>\n                <Grid item xs={12} sm={6} md={6} className=\"company-name\">\n                  <div className=\"panel-content-group\">\n                    <div className=\"panel-group-label\">Company Name</div>\n                    <FormControl fullWidth>\n                      <TextField\n                        variant=\"outlined\"\n                        inputProps={{ className: \"contact-us-companyName\"}}\n                        value={companyName}\n                        placeholder=\"Type in your company name\"\n                        onChange={(e) => setCompanyName(e.target.value)}\n                      />\n                    </FormControl>\n                    <div className=\"panel-group-field\"></div>\n                  </div>\n                </Grid>\n                <Grid item xs={12} sm={12} md={12} className=\"message\">\n                  <div className=\"panel-content-group\">\n                    <div\n                      className={\n                        messageHasValidationError\n                          ? \"panel-group-label-error\"\n                          : \"panel-group-label\"\n                      }\n                    >\n                      Message*\n                    </div>\n                    <FormControl fullWidth>\n                      <textarea\n                        style={{\n                          border: messageHasValidationError\n                            ? \"1px solid #AA0000\"\n                            : \"\",\n                        }}\n                        maxLength={2000}\n                        className=\"contact-us-message\"\n                        value={message}\n                        placeholder=\"Write your message...\"\n                        onChange={(e) => {\n                          setMessageHasValidationError(false);\n                          setMessage(e.target.value);\n                        }}\n                      />\n                    </FormControl>\n                    <div className=\"panel-group-field\">\n                      {messageHasValidationError && (\n                        <div className=\"panel-group-error-text\">\n                          This field is required\n                        </div>\n                      )}\n                    </div>\n                  </div>\n                </Grid>\n                <Grid item xs={12} className=\"reCaptcha\">\n                  <ReCAPTCHA\n                    sitekey={appSettings.GoogleRecaptchaSiteKey}\n                    onChange={onRecaptchaChange}\n                    onExpired={onRecaptchaExpiry}\n                  />\n                  <div className=\"panel-group-field\">\n                      {recaptchaValidationError && (\n                         <div className=\"panel-content-group\">\n                        <div className=\"panel-group-error-text\">\n                          {recaptchaValidationErrorMessage}\n                        </div>\n                        </div>\n                      )}\n                    </div>\n                </Grid>\n\n                <Grid item xs={12} sm={4} md={4} className=\"send-button\">\n                  <button\n                    className=\"default-button filled  fullWidth contact-us-button\"\n                    onClick={(e) => handleSubmit(e)}\n                  >\n                    Send\n                  </button>\n                </Grid>\n                <Grid item xs={12} sm={4} md={4} className=\"cancel-button\">\n                  <button\n                    className=\"default-button outline fullWidth contact-us-button\"\n                    onClick={(e) => handleCancel(e)}\n                  >\n                    Cancel\n                  </button>\n                </Grid>\n\n                <Grid item xs={12} className=\"error-grid\">\n                  {displayEmailError && (\n                    <div className=\"email-failed-error\">\n                      Unable to send your message. Please try to send the\n                      message again.\n                    </div>\n                  )}\n                </Grid>\n              </Grid>\n            </div>\n          </Form>\n        </div>\n      </div>\n    </div>\n  );\n};\n","\nimport React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { RootState } from \"../..\";\nimport \"./Styles/_ContactUs.scss\";\nimport { ResetContactUsForm } from \"../../Redux/Actions/BrandingActions\";\nimport { Redirect} from \"react-router\";\nimport { ContactUsForm } from \"./ContactUsForm\";\n\nexport const ContactUs = (reload: boolean) => {\n  const brandingInfo = useSelector((state: RootState) => state.brandingReducer);\n\n  if (brandingInfo?.contactUsEmailStatus) {\n    ResetContactUsForm();\n    return (\n      <Redirect\n        to={{\n          pathname: \"/contact-us-confirmation\",\n        }}\n      />\n    );\n  }\n\n  return <ContactUsForm />;\n};\n\n","import React, { SyntheticEvent } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport Cin7ConfirmationBox from \"../../Components/PageElements/Cin7ConfirmationBox\";\nimport SidePageBanner from \"../../Components/PageElements/Login/SidePageBanner\";\nimport { RootState } from \"../..\";\nimport \"./Styles/_ContactUs.scss\";\nimport { useHistory } from \"react-router\";\nimport StoreHeading from \"./Views/StoreHeading\";\nimport { GetTenantImageUrl } from \"../../Utils/LoginHelper\";\n\nexport const ContactUsConfirmation = () => {\n  const brandingInfo = useSelector((state: RootState) => state.brandingReducer);\n  const history = useHistory();\n\n  const handleReturnToLoginClick = (e: SyntheticEvent) => {\n    history.push(\"/login\");\n  };\n\n  let logoImageUrl = GetTenantImageUrl(brandingInfo.loginPageImageUrl);\n  return (\n    <div id=\"Side-Image-Theme\">\n      <div className=\"side-image-theme-container customer-page\">\n        <SidePageBanner customerBanner={brandingInfo.loginBannerImageUrl} />\n\n        <div className=\"side-image-theme-content\">\n          <div className=\"side-image-theme-header\">\n            <StoreHeading\n              logoImageUrl={logoImageUrl}\n              storeName={brandingInfo.storeName}\n            />\n          </div>\n          <div className=\"side-image-theme-body\">\n            <Cin7ConfirmationBox\n              boxIcon=\"success\"\n              boxMessage=\"Thank you! We have received your message.\"\n            />\n            <div className=\"return-to-login\">\n              <button\n                className=\"default-button filled contact-us-button\"\n                onClick={(e) => handleReturnToLoginClick(e)}\n              >\n                Return to login\n              </button>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n};\n","import React, { Component } from \"react\";\nimport { Route, Switch } from \"react-router-dom\";\nimport { ThemeProvider, B2BTheme } from \"@cin7/ui\";\n//Layout\nimport Layout from \"./Pages/Layout\";\nimport RestrictedPage from \"./Pages/Login/RestrictedPage\";\n\n//Page Views\nimport { Index } from \"./Pages/Landing/Index\";\nimport Login from \"./Pages/Login/Login\";\nimport Register from \"./Pages/Login/Register\";\nimport PageNotFound from \"./Pages/Notifications/Errors/PageNotFound\";\nimport Products from \"./Pages/Products/Products\";\nimport SellerContent from \"./Pages/SellerContent/SellerContent\";\nimport Account from \"./Pages/Account/Account\";\nimport { CustomHomepage } from \"./Pages/Landing/CustomHomepage\";\n\n//Notification Views\nimport FailedView from \"./Pages/Notifications/Errors/FailedView\";\nimport Orders from \"./Pages/Orders/Orders\";\nimport { ProductDetailsModal } from \"./Components/Global/ProductDetailsModal\";\nimport { ContactUs } from \"./Pages/Login/ContactUs\";\nimport { ContactUsConfirmation } from \"./Pages/Login/ContactUsConfirmation\";\nimport { datadogRum } from \"@datadog/browser-rum\";\nimport { datadogLogs } from '@datadog/browser-logs';\nimport APIHost from \"./APIHost\";\n\nclass App extends Component<{}, {}> {\n\n    componentDidMount() {\n        const environment = APIHost.GetEnvironment() ?? undefined;\n        if (environment && environment !== \"development\") {\n            const clientToken = 'pubdb858fed3a5a24a2b1e13ef8c73896f6';\n            datadogRum.init({\n                applicationId: 'a4d267e2-769a-4255-95d5-58e000b351a7',\n                clientToken: clientToken,\n                site: 'us3.datadoghq.com',\n                service: 'omni-b2b',\n                env: environment,\n                version: process.env.REACT_APP_RELEASE_VERSION,\n                sessionSampleRate: 10,\n                sessionReplaySampleRate: 20,\n                trackUserInteractions: true,\n                trackResources: true,\n                trackLongTasks: true,\n                defaultPrivacyLevel: 'mask-user-input',\n                allowedTracingUrls: [/https:\\/\\/((?!applicationinsights.azure).)*$/, \"http://localhost:3000/\"],\n            });\n\n            datadogRum.startSessionReplayRecording();\n\n            datadogLogs.init({\n                service: 'omni-b2b',\n                env: environment,\n                version: process.env.REACT_APP_RELEASE_VERSION,\n                clientToken: clientToken,\n                site: 'us3.datadoghq.com',\n                forwardErrorsToLogs: true,\n                sessionSampleRate: 30,\n            });\n        }\n    }\n\n    render() {\n        return (\n            <ThemeProvider theme={B2BTheme as any}>\n                <Layout>\n                    <Switch>\n                        <Route exact path=\"/\" component={Index} />\n                        <Route path=\"/login\" component={Login} />\n                        <Route path=\"/contact-us\" component={ContactUs} />\n                        <Route path=\"/contact-us-confirmation\" component={ContactUsConfirmation} />\n                        <Route path=\"/registration\" component={Register} />\n                        <RestrictedPage path=\"/home\" component={CustomHomepage} />\n                        <RestrictedPage path=\"/products\" component={Products} />\n                        <RestrictedPage path=\"/orders\" component={Orders} />\n                        <RestrictedPage path=\"/cart\" component={Orders} />\n                        <RestrictedPage path=\"/checkout\" component={Orders} />\n                        <RestrictedPage path=\"/seller\" component={SellerContent} />\n                        <RestrictedPage path=\"/account\" component={Account} />\n                        <Route exact path=\"/something-went-wrong\" component={FailedView} />\n                        <Route path=\"/*\" component={PageNotFound} />\n                    </Switch>\n\n                    <ProductDetailsModal />\n                    <div className=\"clear-space\"></div>\n                </Layout>\n            </ThemeProvider>\n        );\n    }\n}\n\nexport default App;\n","import \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { ConnectedRouter } from \"connected-react-router\";\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"./Redux/ConfigureStore\";\nimport { PersistGate } from \"redux-persist/integration/react\";\nimport App from \"./App\";\n\n//Styles\nimport \"./Theme/bootstrap.css\";\nimport \"./Theme/FontAwesome/CSS/font-awesome.min.css\";\nimport \"./Theme/Global.scss\";\n\ndeclare global {\n  interface Window {\n    initialReduxState: Object;\n    analytics: any;\n    hostEndpoint: any;\n  }\n}\n\n// Create browser history to use in the Redux store\nconst baseUrl = document.getElementsByTagName(\"base\")[0].getAttribute(\"href\");\nconst history = createBrowserHistory({ basename: baseUrl as string });\n\n// Get the application-wide store instance, prepopulating with state from the server where available.\nconst initialState = window.initialReduxState;\nconst { store, persistor } = configureStore(history, initialState);\n\n// Allow useSelector by specifying the root state type\nexport type RootState = ReturnType<typeof store.getState>\nconst rootElement = document.getElementById(\"b2b-root\");\n\nReactDOM.render(\n  <Provider store={store}>\n    <PersistGate loading={null} persistor={persistor}>\n      <ConnectedRouter history={history}>\n        <App />\n      </ConnectedRouter>\n    </PersistGate>\n  </Provider>,\n  rootElement\n);\n"],"sourceRoot":""}