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,EAAW,EAAG,CACb,UAAW,oBACX,SAAU,CACR,KAAM,iBACR,CACF,EACA,CAACC,EAAW,EAAG,CACb,UAAW,oBACX,SAAU,CACR,KAAM,iBACR,CACF,EACA,CAACE,EAAqB,EAAG,CACvB,UAAW,OACX,SAAU,CACR,KAAM,eACR,CACF,EACA,CAACD,EAAW,EAAG,CACb,UAAW,oBACX,SAAU,CACR,KAAM,iBACR,CACF,EACA,CAACE,EAAiB,EAAG,CACnB,UAAW,OACX,SAAU,CACR,KAAM,eACR,CACF,EACA,CAACrC,EAAkB,EAAG,CACpB,UAAW,kBACX,SAAU,CACR,WAAY,oBACd,CACF,EACA,CAAC/W,EAAkB,EAAG,CACpB,UAAW,wBACX,SAAU,CACR,KAAM,qBACR,CACF,EACA,CAACd,EAA8B,EAAG,CAChC,UAAW,+BACX,SAAU,CACR,KAAM,4BACR,CACF,EACA,CAAC2C,EAAkB,EAAG,CACpB,UAAW,qBACX,SAAU,CACR,KAAM,kBACR,CACF,EACA,CAACC,EAAkB,EAAG,CACpB,UAAW,qBACX,SAAU,CACR,KAAM,kBACR,CACF,EACA,CAACyQ,EAAY,EAAG,CACd,UAAW,qBACX,SAAU,CAAE,KAAM,kBAAmB,CACvC,EACA,CAACtU,EAA6B,EAAG,CAC/B,UAAW,qBACX,SAAU,CAAE,KAAM,kBAAmB,CACvC,EACA,CAAC0U,EAAW,EAAG,CACb,UAAW,oBACX,SAAU,CAAE,KAAM,iBAAkB,CACtC,EACA,CAACL,EAAY,EAAG,CACd,UAAW,qBACX,SAAU,CACR,KAAM,mBACN,WAAY,4BACd,CACF,EACA,CAACpU,EAA6B,EAAG,CAC/B,UAAW,qBACX,SAAU,CACR,KAAM,kBACR,CACF,EACA,CAACmU,EAAY,EAAG,CACd,UAAW,qBACX,SAAU,CACR,KAAM,mBACN,WAAY,4BACd,CACF,EACA,CAACvS,EAAuB,EAAG,CACzB,UAAW,yBACX,SAAU,CAAE,KAAM,uBAAwB,GAAGhR,EAAY,CAC3D,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U,YAAa,qBAAsB,EACzE,qBAAsB,CACpB,KAAM,UACN,YAAa,uBACf,EACA,4BAA6B,CAC3B,KAAM,UACN,YAAa,wBACf,EACA,0BAA2B,CACzB,KAAM,SACN,YAAa,sBACf,EACA,wBAAyB,CACvB,KAAM,OACN,YAAa,iCACf,EACA,uBAAwB,CACtB,KAAM,UACN,YAAa,uBACf,EACA,qBAAsB,CACpB,KAAM,SACN,YAAa,qBACf,EACA,yBAA0B,CACxB,KAAM,SACN,YAAa,2BACf,EACA,uBAAwB,CACtB,KAAM,SACN,YAAa,uBACf,EACA,uBAAwB,CACtB,KAAM,SACN,YAAa,uBACf,EACA,mBAAoB,CAClB,KAAM,UACN,YAAa,qBACf,EACA,iBAAkB,CAChB,KAAM,SACN,YAAa,mBACf,EACA,mBAAoB,CAClB,KAAM,UACN,YAAa,qBACf,EACA,iBAAkB,CAChB,KAAM,SACN,YAAa,mBACf,EACA,2BAA4B,CAC1B,KAAM,SACN,YAAa,8BACf,EACA,iBAAkB,CAChB,KAAM,SACN,YAAa,mBACf,EACA,2BAA4B,CAC1B,KAAM,SACN,YAAa,8BACf,EACA,mBAAoB,CAClB,KAAM,UACN,YAAa,qBACf,EACA,sBAAuB,CACrB,KAAM,OACN,SAAU,GACV,YAAa,wBACf,EACA,eAAgB,CACd,KAAM,SACN,YAAa,iBACf,EACA,iBAAkB,CAChB,KAAM,UACN,YAAa,mBACf,EACA,eAAgB,CACd,KAAM,SACN,YAAa,iBACf,EACA,4BAA6B,CAC3B,KAAM,SACN,YAAa,8BACf,EACA,8BAA+B,CAC7B,KAAM,UACN,YAAa,gCACf,EACA,sBAAuB,CACrB,KAAM,OACN,YAAa,6BACf,EACA,sBAAuB,CACrB,KAAM,SACN,YAAa,uBACf,EACA,8BAA+B,CAC7B,KAAM,OACN,YAAa,qCACf,EACA,0BAA2B,CACzB,KAAM,UACN,YAAa,6BACf,EACA,wBAAyB,CACvB,KAAM,SACN,YAAa,2BACf,EACA,0BAA2B,CACzB,KAAM,UACN,YAAa,6BACf,EACA,wBAAyB,CACvB,KAAM,SACN,YAAa,2BACf,EACA,0BAA2B,CACzB,KAAM,UACN,YAAa,6BACf,EACA,uBAAwB,CACtB,KAAM,SACN,YAAa,2BACf,EACA,wBAAyB,CACvB,KAAM,SACN,YAAa,2BACf,EACA,6BAA8B,CAC5B,KAAM,OACN,YAAa,iCACf,EACA,4BAA6B,CAC3B,KAAM,UACN,YAAa,+BACf,EACA,kBAAmB,CACjB,KAAM,SACN,YAAa,oBACf,EACA,oBAAqB,CACnB,KAAM,UACN,YAAa,sBACf,EACA,kBAAmB,CAAE,KAAM,SAAU,YAAa,oBAAqB,EACvE,oBAAqB,CAAE,KAAM,UAAW,YAAa,sBAAuB,EAC5E,iBAAkB,CAChB,KAAM,UACN,YAAa,mBACf,EACA,eAAgB,CACd,KAAM,SACN,YAAa,iBACf,EACA,eAAgB,CACd,KAAM,SACN,YAAa,iBACf,EACA,iBAAkB,CAChB,KAAM,UACN,YAAa,mBACf,EACA,aAAc,CACZ,KAAM,SACN,YAAa,eACf,EACA,kBAAmB,CACjB,KAAM,SACN,YAAa,yBACf,EACA,mBAAoB,CAClB,KAAM,OACN,YAAa,0BACf,EACA,gBAAiB,CACf,KAAM,UACN,YAAa,kBACf,EACA,eAAgB,CACd,KAAM,UACN,YAAa,iBACf,EACA,aAAc,CACZ,KAAM,SACN,YAAa,eACf,EACA,kBAAmB,CACjB,KAAM,OACN,YAAa,qBACf,EACA,aAAc,CACZ,KAAM,SACN,YAAa,eACf,EACA,cAAe,CACb,KAAM,OACN,YAAa,kBACf,EACA,0BAA2B,CACzB,KAAM,UACN,YAAa,4BACf,EACA,yBAA0B,CACxB,KAAM,UACN,YAAa,2BACf,EACA,sBAAuB,CACrB,KAAM,UACN,YAAa,wBACf,EACA,uBAAwB,CACtB,KAAM,SACN,YAAa,8BACf,EACA,0BAA2B,CACzB,KAAM,SACN,YAAa,iCACf,EACA,yBAA0B,CACxB,KAAM,SACN,YAAa,gCACf,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UA,EAAM,MAAM,EACnC,OAAA6vB,OAGfM,GACC,UAAAhkB,EAACk1F,GAAa,QAAAx6F,EACZ,WAACmf,GAAc,aAAW,GACxB,SAAA7Z,EAAC4Z,GAAa,SAAb,CACE,UAAC,CAAE,MAAAI,KAEAha,EAAAE,EAAA,UAAAF,EAACm1F,GAAA,CACC,iBAAgB,GAChB,iBAAgB,GAChB,MAAO,CACL,WAAY,qBACZ,GAAGh6E,GACH,YAAanB,CACf,EAEA,SAACha,EAAA8xB,GAAA,CACC,SAACtX,EAAA9R,GAAA,CAAqB,YAAama,GACjC,UAAA7iB,EAACgiE,GAAc,UAAS,aAAa,MAAO,EAAG,IAC9CoyB,GAAO,MACPliE,GAAa,KAChB,CACF,GAEJ,IAEJ,CACF,EACF,EACF,EAEJ,EC5FAkjE,GAAW,SAAS,eAAe,MAAM,CAAE,EAAE,OAAOp1F,EAAC40F,KAAI,CAAE","names":["APP_NAME","RESERVED_USER_NAME","RESERVED_GENDER","RESERVED_AGE","INITIAL_DELTA","INITIAL_LOCATION","M_TO_KM_CONVERSION","DELETED_FILE","EVENT_QUEUE_SIZE","ALIAS_PREFIX","PLACE_PROVIDER","APP_NOTIFICATION_PROVIDER","BIG_ICON_SIZE_CLASSIC_ACHIEVEMENT","SMALL_ICON_SIZE_CLASSIC_ACHIEVEMENT","BIG_ICON_SIZE_LEVEL_ACHIEVEMENT","SMALL_ICON_SIZE_LEVEL_ACHIEVEMENT","TERMS_AND_CONDITIONS_SKIP_DATE","SEEN_MAP","LAST_SEEN_CHAT","LOCALE","PRE_SIGN_UP_DUPLICATE_ERROR","URL_REGEX","PASSWORD_REGEX","PHONE_NUMBER_REGEX","TIME_FORMAT_REGEX","SPECIFIC_SYMBOL","DEFAULT_CURRENCY","NONE","CURRENCIES","MAX_PRICE","MIN_PRICE","REDUX_RESET","SENTRY_DSN","FIRST_TIME","NOT_FIRST_TIME","BREAKING_CHANGES_VERSION","STATUS_ENV","VERSION","isEnabledConfig","value","dev","config","activities","age","allLanguages","distance","gender","kick","language","levels","notifications","orgRoles","places","repeat","URL","emojis","searchPlaces","BaseConfig","IS_DEV","init","replayIntegration","setupUser","user","setUser","aclitoApi","createApi","fetchBaseQuery","makeFederatedSignIn","provider","Auth","error","errorObject","LogLevel","NETWORK_ERRORS","isNetworkError","str","err","allLevels","enabledLogLevels","prepareMetadata","metadata","acc","key","queuedMessages","sentrySendTimeout","queueMessageForSentry","message","captureContext","sendQueuedMessages","record","captureMessage","sentryTransport","level","type","tags","timestamp","meta","severity","addBreadcrumb","messageLevel","captureException","Logger","transport","logger","makeUpdateAttributesCurrentUser","data","makeCompleteNewPassword","password","attributes","makeCurrentUser","makeSignIn","body","makeSignOut","makeSignUp","makeResetPasswordRequest","username","makeConfirmSignUp","makeResetPasswordSubmit","makeChangePassword","makeResendSignUpCode","authenticationClient","getTac","getStatus","customClient","api","FiltersInitialState","dayjs","LocaleInitialState","EventDatesInitialState","UserInfoInitialState","FirstLoadInitialState","PlaceInitialState","NotificationsInitialState","SearchEventsInitialState","AvailabilityDatesInitialState","SearchOrganizationsInitialState","FeedFiltersInitialState","AuthInitialState","latitudeDelta","longitudeDelta","initialLocation","LocationInitialState","NoteInitialState","MyNoteGrantsInitialState","ContentType","HttpClient","secure","format","axiosConfig","fetchToken","axios","params","qs","token","params1","params2","method","formItem","input","formData","property","propertyContent","isFileType","path","query","requestParams","responseFormat","UserClient","id","EventClient","repId","nextToken","limit","orgId","BASE_URL","PUBLIC_URL","APP_URL","WS_URL","GROUPS","TAC","LOGIN","USER_INFO","NAME","EMAIL","getPayload","session","p","name","surname","n","s","getUserData","cognitoToken","MessageClient","messageClient","eventClient","AchievementClient","achievementId","achievementClient","AvailabilityClient","availabilityClient","ChatClient","chatClient","ReportClient","reportClient","FeedClient","feedClient","OrganizationClient","isRegistered","organizationClient","userClient","PlaceClient","placeClient","NotesClient","notesClient","NotificationClient","notificationClient","ReservantoClient","reservantoClient","PaymentClient","eventId","startDate","endDate","productId","paymentId","form","paymentClient","FeedbackClient","feedbackClient","ReferralClient","referralClient","PublicClient","publicClient","REDUX_SAVE_NOTE","REDUX_GET_NOTE","REDUX_GET_NOTE_USER","REDUX_GET_MY_GRANTS","REDUX_CLEAR_NOTE","saveNoteAsync","createAsyncThunk","args","thunkAPI","tel","email","clearNoteAsync","_","getNoteAsync","userInfo","getNoteForUserAsync","getMyNoteGrants","REDUX_NOTE","REDUX_MY_GRANTS","SliceNote","createSlice","state","payload","builder","action","SliceMyNoteGrants","noteActions","noteReducers","noteSelectors","flushState","dispatch","authActions","fn","commonActions","eventActions","profileActions","notificationActions","availabilityActions","organizationsActions","locationActions","currentUser","updateAttributes","REDUX_AUTH_SIGN_IN","REDUX_AUTH_SIGN_UP","REDUX_AUTH_RQ_NEW_PSWD","REDUX_AUTH_SUBMIT_NEW_PSWD","REDUX_AUTH_CHANGE_PASSWORD","REDUX_AUTH_SIGN_OUT","REDUX_AUTH_FEDERATED","signInAsync","singUpAsync","requestNewPasswordAsync","submitNewPasswordAsync","changePasswordAsync","signOutAsync","federatedSignInAsync","REDUX_FIRST_TIME","REDUX_AUTH","SliceIsFirstTime","SliceAuth","isAnyOf","authReducers","authSelectors","REDUX_LOCALE","REDUX_CURRENT_SCREEN","REDUX_CONNECTED","REDUX_FIRST_LOAD","REDUX_IS_SEARCH_OPEN","REDUX_REFERRAL","REDUX_STATUS","SliceLocale","SliceStatus","SliceReferral","SliceCurrentScreen","SliceNetConnected","SliceFirstLoad","SliceIsSearchOpen","commonReducers","commonSelectors","REDUX_FIND_EVENT","REDUX_JOIN_REPEATING_EVENTS","REDUX_DELETE_REPEATING_EVENTS","REDUX_UPDATE_REPEATING_EVENTS","REDUX_UPDATE_EVENT_AS_FINISHED","REDUX_LOAD_SEARCH_EVENTS","applyFilters","values","REDUX_FILTERED_EVENTS","REDUX_EVENT_DATES","REDUX_FILTERS","SliceFilters","SliceSearchEvents","SliceEventDates","i","eventReducers","eventSelectors","REDUX_LOAD_NOTIFICATIONS","REDUX_DELETE_DB_NOTIFICATION","REDUX_DELETE_ALL_NOTIFICATIONS","loadNotificationsAsync","deleteAllNotificationsAsync","deleteDBNotificationAsync","REDUX_NOTIFICATIONS","SliceNotifications","notificationReducers","notificationSelectors","createSelector","items","REDUX_DELETE_ACC","REDUX_POPULATE_FIRST_TIME","REDUX_UPDATE_MY_PROFILE","REDUX_LOAD_USER","REDUX_ADD_LOCATION","REDUX_UPDATE_SETTINGS","REDUX_CREATE_USER_ALIAS","REDUX_UPDATE_USER_ALIAS","REDUX_REMOVE_USER_ALIAS","addLocationAsync","loadUserInfoAsync","updateUserSettingsAsync","deleteAccountAsync","d","populateIfFirstTimeAsync","__","res","attribute","note","stats","status","updateMyProfileAsync","locale","pushToken","updated","createUserAliasAsync","aliasData","updateUserAliasAsync","removeUserAliasAsync","REDUX_USER_INFO","SliceUserInfo","profileReducers","profileSelectors","REDUX_CREATE_PLACE","REDUX_UPDATE_PLACE","REDUX_NEARBY_PLACE","searchNearbyPlacesAsync","createPlaceAsync","updatePlaceAsync","REDUX_PLACE","SlicePlace","filtered","item","placeActions","placeReducers","placeSelectors","REDUX_ORGANIZATIONS","REDUX_FEED_FILTERS","SliceSearchOrganizations","SliceFeedFilters","organizationsReducers","organizationsSelectors","REDUX_AVAILABILITY_DATES","SliceAvailabilityDates","availabilityReducers","availabilitySelectors","REDUX_LOCATION","SliceLocation","e","coords","lat","lon","locationReducers","locationSelectors","REDUX_TOKEN","REDUX_LINK","SlicePushToken","_state","SliceLink","mobileReducers","customMiddleware","next","isPending","endpointName","originalArgs","latestQuery","queryArg","latestData","latestItems","latestCursor","loggerMiddleware","isRejectedWithValue","parseAsyncStorageData","storage","localeMiddleware","createDynamicMiddlewares","allDynamicMiddlewares","allAppliedDynamicMiddlewares","store","_store","compose","middlewares","middleware","index","mdwIndex","dynamicMiddlewaresInstance","dynamicMiddleware","addMiddleware","removeMiddleware","resetMiddlewares","configureStore","getDefaultMiddleware","messages","text_en","text_cs","text_sk","Provider","children","jsx","IntlProvider","Fragment","awsmobile","getPlayersVirtual","event","getPlayersByFlag","getQueuePlayersVirtual","getQueuePlayersByFlag","mapEvent","pool","_mapAlias","player","foundUser","foundAlias","alias","playersInfo","queuePlayersInfo","getParticipantsCount","_filterParticipants","getPlayersInQueueCount","isEventFull","isJoined","userId","canJoinEvent","canJoinQueue","eventIsRunning","resolveConfirm","shouldConfirmEvent","currentPlayer","isJoinedInChat","chat","isUserOrganizer","isUserTrainer","canLeaveEvent","EventModel","admin","translate","arr","_getItem","getById","obj","getByIdTranslate","t","cache","createIntlCache","translateDateFormat","date","intl","createIntl","formatEvents","events","_formatFn","formatEvent","safeStringDateParse","parsedValue","useTranslate","useIntl","useSchema","setZodErrorMap","customErrorMap","issue","ctx","z","passwordValidation","emailValidation","phoneValidator","loginSchema","passwordRequestSchema","passwordSubmitSchema","notesValidationSchema","passwordChangeSchema","uuidSchema","yup.string","signInValidationSchema","yup.object","userNameValidationSchema","passwordValidationSchema","passwordConfirmValidationSchema","yup.ref","codeValidationSchema","yup.number","createFeedSchema","editFeedSchema","newPlaceSchema","newOrgSchema","yup.boolean","originalValue","newAvailabilityValidationSchema","yup.date","newEventValidationSchema","editEventValidationSchema","playersCount","requireTrainer","userInfoValidationSchema","yup.array","reportUserValidationSchema","kickUserValidationSchema","otherText","area","aliasesEditValidationSchema","emailValidator","yup.ValidationError","dateSort","desc","x","y","xValue","yValue","func","sortByItem","useSelectObject","selectObjectTranslate","translatedGender","g","translatedFilterGender","translatedRepeatChoices","choice","translatedActivities","activity","translatedKickReasonsTypes","translatedLanguages","lang","translatedLocaleOptions","translatedLevels","ageOptions","a","translatedSearchPlaces","levelOptions","useAppSelector","useSelector","useTranslateDate","useDebounceEffect","waitTime","deps","useEffect","FlashMessageContext","createContext","FlashMessageProvider","showMessage","useFlashMessageContext","useContext","useShowFlashMessage","onHit","parseURL","url","findAllAndReplace","array","replacement","callback","element","findAllAndReplaceMultiple","unique","handleError","PAYMENT_LOG","PAYMENTS","PRODUCTS","PAID_PRODUCT","GET_PRODUCT","UPDATE_PRODUCT","CREATE_PRODUCT","DISCONTINUE_PRODUCT","CREATE_PAYMENTS","CANCEL_PAYMENT","GET_CREDIT","GET_STATS","CHECK_STATUS","paymentApi","queryFulfilled","payment","findPayment","newPayment","endpoint","updatedProduct","createdProduct","newPayments","useGetPaymentLogQuery","useGetCreditQuery","useGetPaymentsQuery","useGetProductsQuery","useGetProductQuery","useGetPaidQuery","useGetStatsQuery","useCreateProductMutation","useUpdateProductMutation","useDiscontinueProductMutation","useCreatePaymentsMutation","useCancelPaymentMutation","useCheckStatusMutation","CREATE_EVENT","UPDATE_EVENT","DELETE_EVENT","LOAD_MY_EVENTS","LOAD_MY_ORG_EVENTS","DISPLAY_EVENT","LEAVE_EVENT","JOIN_EVENT","CONFIRM_EVENT","KICK_FROM_EVENT","SEARCH_EVENTS","JOIN_PROVIDER_EVENT","LEAVE_PROVIDER_EVENT","HISTORY_EVENT","eventApi","queryArgs","refetch","rest","currentData","result","arg","currentArg","previousArg","getState","searchMapLocation","tag","l","draft","ids","newEvents","oldEvent","newEvent","refState","ref","r","updateCacheFromJoinToMyEventsRep","updateCacheFromJoinToMyEventsSingle","updateCacheFromLeaveToMyEventsRep","updateCacheFromLeaveToMyEventsSingle","idOrAliasId","aliasIds","useDisplayEventQuery","useJoinEventMutation","useLeaveEventMutation","useConfirmEventMutation","useKickFromEventMutation","useLoadMyEventsQuery","useLoadMyOrgEventsQuery","useLazyLoadMyEventsQuery","useLazyLoadMyOrgEventsQuery","useCreateEventMutation","useUpdateEventMutation","useDeleteEventMutation","useSearchEventsQuery","useLazySearchEventsQuery","useJoinProviderEventMutation","useLeaveProviderEventMutation","useEventHistoryQuery","idsToRemove","replaced","additionalEvents","useDisplayEvent","mappedEvent","dedupeByUpdatedAt","existing","assertObjectExists","q","CREATE_ORGANIZATION","DELETE_ORGANIZATION","UPDATE_ORGANIZATION","UPDATE_MY_ORGANIZATIONS_MEMBERS","JOIN_ORGANIZATION","JOIN_ORGANIZATION_LITE","LEAVE_ORGANIZATION_LITE","LEAVE_ORGANIZATION","FIND_ORGANIZATION","LIST_MY_ORGANIZATIONS","LIST_ALL_ORGANIZATIONS","organizationApi","app","unlimited","maxMembers","org","createdOrg","organizationCache","deleted","updatedOrg","members","m","o","member","orgs","selectMyOrganizations","endpointResult","useCreateOrganizationMutation","useDeleteOrganizationMutation","useUpdateOrganizationMutation","useUpdateMyOrganizationsMembersMutation","useJoinOrganizationMutation","useJoinOrganizationLiteMutation","useLeaveOrganizationMutation","useLeaveOrganizationLiteMutation","useFindOrganizationQuery","useListMyOrganizationsQuery","useLazyListMyOrganizationsQuery","useListAllOrganizationsQuery","useLazyListAllOrganizationsQuery","CREATE_FEED","UPDATE_FEED","DELETE_FEED","LIST_FEEDS_BY_MY_ORGS","LIST_FEEDS_BY_ORG","GET_FEED","feedApi","myOrgs","orgsToFilter","file","feedOrgId","createdFeed","feedCache","updatedFeed","feed","deleteFeedOrg","deleteFeedMyOrgs","selectAllFeeds","useListFeedsByOrgQuery","useCreateFeedMutation","useUpdateFeedMutation","useDeleteFeedMutation","useListFeedsByMyOrgsQuery","useGetFeedQuery","CREATE_AVAILABILITY","UPDATE_AVAILABILITY","DELETE_AVAILABILITY","LIST_AVAILABILITIES","SUGGEST_EVENTS","availabilityApi","inputData","createdAvailabilities","availabilityCache","updatedAvailability","deleteResult","selectAvailabilities","useCreateAvailabilityMutation","useUpdateAvailabilityMutation","useSuggestEventsQuery","useDeleteAvailabilityMutation","useListAvailabilitiesQuery","useLazyListAvailabilitiesQuery","CREATE_REPORT","reportApi","useCreateReportMutation","ChatMessageMetaData","EventProviderType","EventTag","NotificationTypeEventChanges","NotificationTypeEventInteractions","NotificationTypeEventLifeCycle","NotificationTypeOrg","NotificationTypeFeed","NotificationTypeFeedback","NotificationType","AchievementEventEnum","FeedbackType","Bank","randomString","JOIN_CHAT","LEAVE_CHAT","SEND_MESSAGE","FIND_AND_DISPLAY_CHAT","messageApi","updateCachedData","cacheDataLoaded","cacheEntryRemoved","ws","listener","updateIdentifier","patchResult","useJoinChatMutation","useLeaveChatMutation","useSendMessageMutation","useFindAndDisplayChatQuery","useLazyFindAndDisplayChatQuery","EventMatches","NoteMatches","ProfileMatches","AvailabilityMatches","OrganizationMatches","AuthMatches","NotificationMatches","FeedMatches","MessagesMatches","PlaceMatches","ReportMatches","AllMatches","setupUiMessageMiddleware","notificationCallBack","additionalMatchers","createListenerMiddleware","isFulfilled","isRejected","listenerApi","defaultAction","promiseResolution","isRTKQuery","matches","allMessages","matcher","actions","primary","primary10","red","red10","orange","orange10","blue","blue10","internalPaletteLight","internalPaletteDark","themeColors","internalPalette","activityColors","colors","ThemeContext","ThemeProvider","defaultTheme","withStorage","theme","setTheme","useState","setMode","mode","toggleTheme","getTheme","localTheme","jsxs","ThemeProviderSC","AvatarsMask","sizeMin","sizeMax","deviceMin","deviceMax","columnsFullWidth","columnsThreeFourths","convertPxToRem","sizeInPx","WebTheme","flashMessages","getBackgroundColor","getIcon","makeMessage","Icon","icon","color","size","containerStyle","originalColor","iconProps","wrapperProps","useTheme","overrideColor","overrideSize","iconRegistry","el","cloneElement","snackBarIconRegistry","MdOutlineCancel","RiErrorWarningLine","FaCheck","TbFlame","MdInfoOutline","MdPercent","MdOutlineShoppingCart","MdLanguage","MdKey","MdOutlinePayments","MdOutlinePending","BsTelephone","IoLogoFacebook","MdOutlineEmojiEmotions","IoLogoInstagram","IoLogoLinkedin","IoLogoYoutube","AiOutlineLock","IoLogoApple","FcGoogle","IoMdTime","MdTimer","MdOutlineCalendarMonth","BiCalendarCheck","MdDangerous","MdRemoveCircleOutline","MdAdd","MdOutlineShare","IoInfinite","MdRepeat","IoPersonCircle","IoPlayCircle","IoLocation","MdOutlineMyLocation","IoChevronUp","IoChevronForward","IoChevronDown","IoChevronUpOutline","IoChevronDownOutline","IoMdPodium","BsGenderAmbiguous","IoPricetagOutline","IoMenu","MdEdit","MdOutlinePersonRemove","MdOutlineCheckCircleOutline","MdCheck","MdContentCopy","MdQrCode","MdHelpOutline","MdOutlineLocationOn","BsFillCaretDownFill","BsFillCaretUpFill","MdArrowBack","MdNotificationsNone","MdOutlineSettings","IoMdPower","MdOutlineAccountCircle","MdOutlineTextsms","MdSearch","MdClose","MdArrowForward","IoSendSharp","IoRefresh","IoMdTrash","MdMoreHoriz","MdPersonSearch","IoMdLink","MdOutlineThumbUpOffAlt","BiCommentAdd","BiSolidCommentCheck","MdHeartBroken","MdOutlineHeartBroken","MdOutlineGroup","IoHandRight","IoPersonAdd","MdOutlineEmail","MdWarning","IoExit","BsFillCreditCardFill","MdMessage","IoMdPhotos","BsFillShiftFill","MdDownload","MdPersonAdd","IoFilter","MdReport","IoChevronBackOutline","IoChevronForwardOutline","MdChevronLeft","ImEmbed","Loader","MdNotes","MdSave","MdOutlineDarkMode","MdOutlineLightMode","MdPostAdd","MdOutlineAssignment","MdExpandMore","MdOutlineEvent","MdPrint","AiOutlineTrophy","showFlashMessage","props","autoHide","options","translation","messageType","messageAutoHide","messageOptions","backgroundColor","showNotification","cleanNotifications","useAppDispatch","useDispatch","useNotificationWS","relativeTime","utc","duration","isoWeek","LocaleContext","LocaleProvider","initialLocale","setInitialLocale","initial","Modal","opened","onClose","MTModal","Text","style","tx","text","txOptions","content","styles","MTText","HStack","Group","Collapsible","buttonLabelTx","defaultOpen","toggle","useDisclosure","textValue","CollapseButton","motion","Collapse","styled","Container","StyledDiv","Overlay","VStack","Stack","SectionTitle","onClick","testID","Title","FeedbackTooltip","OrganizationTooltip","SearchTooltip","Karma","points","ProfileTooltip","EventTooltip","FeedTooltip","banners","Banner","StyledText","$color","CardStatusBannerText","bannerColor","c","CardStatusBannerIcon","actionMappings","statusMappings","cardColorPicker","iconSelectRegistry","FaHockeyPuck","IoFootball","MdSportsVolleyball","GiTennisRacket","FaRunning","IoTennisball","FaGolfBall","FaTableTennis","MdSportsHandball","GiBoxingGlove","MdPool","FaSkating","FiTarget","IoBaseball","FaBowlingBall","MdSportsCricket","TbCurling","FaBicycle","GiPoolTriangle","GiMountainClimbing","MdSportsRugby","MdSkateboarding","FaSkiing","FaSnowboarding","GiFencer","TbKarate","MdSportsKabaddi","FaChess","FaHorse","IoFitness","TbYoga","FaDumbbell","FaHiking","FaBasketballBall","GiBallerinaShoes","IoBody","IoMale","IoFemale","IoMaleFemale","MdStar","IconSelect","iconColor","iconSize","icons","React.cloneElement","ActivityBannerText","activityType","ProductAdminTooltip","ProductShoppingTooltip","SettingsTooltip","Divider","ModalTooltipContext","ModalTooltipProvider","setContent","isOpen","open","close","showModal","newContent","hideModal","useTooltipModal","context","useShowTooltipModal","modals","useMemo","useSharedSettings","isLoading","settings","initialNotificationValues","initialOtherValues","newNotificationSettings","unwrapResult","newOtherSettings","objectKeys","TitleBar","Tab","setSelectedIndex","title","handleOnTabClick","StyledTab","Tabs","useStyles","createStyles","selectedIndex","growList","tabWidth","classes","MantineTabs","StyledList","Children","child","BackButton","nav","useNavigate","StyledButton","StyledIcon","Button","forwardRef","MTButton","SmallButton","bg","css","ActionButton","iconType","textcolor","badge","bgColor","Indicator","SubmitButton","onSubmit","onError","handleSubmit","useFormContext","TagButton","TabButton","Image","image","height","width","timeStamp","pic","StyledImage","useStepper","def","active","setActive","current","Stepper","steps","complete","MantineStepper","step","StyledTitle","HStackButtons","getCommonInputLabelStyle","StepperButtons","prevStep","nextStep","create","formState","handleButtonSubmit","DefaultAvatar","S3Image","imageURL","isLoaded","setIsLoaded","InlineTooltip","txTitle","txBody","Streak","streak","ActionAddEvent","ActionAddAvailability","ActionMap","ActionOrg","ActionAddFeed","ActionAddPayment","ActionAddAlias","EmptyList","vertical","isVertical","LocalNotificationIcons","ShowMoreButton","Fallback","Heading","ErrorBoundary","Sentry.ErrorBoundary","openInNewTab","newWindow","MobileBanner","bannerVisible","isMobile","isIOS","isAndroid","PlayersMembersNumber","organization","textSize","withIcon","max","count","isInPast","Language","Menu","Input","label","placeholder","txLabel","txPlaceholder","rightSection","optional","i18nLabel","labelContent","placeholderContent","MantineInput","Checkbox","MantineCheckbox","Select","isLoadingPlc","selectRef","useRef","MantineSelect","ValidatedCheckbox","onChange","useController","val","ValidatedInput","onBlur","formatTimeInput","modifiedRegex","_p1","p2","hours","minutes","ValidatedTimeInput","Textarea","MTTextarea","Switch","txSubLabel","switchHeight","StyledInput","MantineSwitch","ValidatedSwitch","ValidatedSelect","NumberInput","computeValue","ValidatedNumberInput","DateTimePicker","clearable","dateLabelContent","datePlaceholderContent","MDateTimePicker","ValidatedDateTimePicker","updateWithDate","handleValue","useCallback","convertedValue","ValidatedTextArea","MultiSelect","MantineMultiSelect","ValidatedMultiSelect","v","SearchBar","onClear","RadioGroup","Radio","RadioButton","PasswordInput","MantinePasswordInput","ValidatedPasswordInput","ValidatedSelectV2","ValidatedNumberInputV2","SVG","seed","createAvatar","Avatar","AvatarPlaceholder","picType","picValue","AvatarView","DefaultImage","generateColor","hash","char","hue","saturation","lightness","getInitials","words","firstInitial","secondInitial","OrgAvatar","initials","$bgColor","ImagePreview","preview","circular","PreviewImage","CurrentPicture","currentImage","DropzoneContent","getRandomUserName","getRandomUserSurname","getRandomAvatarSeed","TO_RADIANS","canvasPreview","canvas","crop","scale","rotate","scaleX","scaleY","pixelRatio","cropX","cropY","rotateRads","centerX","centerY","aspect","useDropZone","previewCanvasRef","imgSrc","setImgSrc","imgRef","setCrop","completedCrop","setCompletedCrop","setScale","setRotate","setPreview","rotateMarks","scaleMarks","handleUploadClick","handleAvatarClick","submit","blob","newBlob","finalResize","inBlob","blobReduce","onSelectFile","reader","onImageLoad","centerAspectCrop","mediaWidth","mediaHeight","centerCrop","makeAspectCrop","percentCrop","ImageDropzone","onRemove","imageOnly","onCompleteCrop","onChangeCrop","generateSeed","ImageContainer","ReactCrop","PreviewCanvasCircular","PreviewCanvas","Slider","ValidatedDropzone","fileField","imageField","onCrop","_convertBlobToBase64","resolve","reject","AvatarDropzone","MantineSlider","RangeSlider","MantineRangeSlider","ValidatedRangeSlider","MantineFInput","BasicCard","PlainCard","CardTitle","TimeText","GroupedContent","IconHolder","LeftSectionTitle","SectionGrid","TitleButtons","LeftSectionLarge","LeftSectionSmall","NotificationSettings","handleUpdateNotifications","translationNotificationTable","methods","useForm","queryMobile","useMediaQuery","Component","SimpleGrid","SubTitle","FormProvider","ROUTE_SIGN_IN","ROUTE_SIGN_UP","ROUTE_EVENTS","ROUTE_SEARCH","ROUTE_PROFILE","ROUTE_PROFILE_ALIASES","ROUTE_PROFILE_ALIASES_EDIT","ROUTE_PROFILE_ALIASES_CREATE","ROUTE_CALENDAR","ROUTE_EMBEDDED_CALENDAR","ROUTE_ORGANIZATIONS","ROUTE_SETTINGS","ROUTE_AVAILABILITY","ROUTE_ALIAS_INFO","ROUTE_NEW_AVAILABILITY","ROUTE_AVAILABILITY_INFO","ROUTE_AVAILABILITY_EDIT","ROUTE_REQUEST_PASSWORD","ROUTE_SUBMIT_PASSWORD","ROUTE_ABOUT_USER","ROUTE_NEW_EVENT","ROUTE_PROFILE_EDIT","ROUTE_EVENT_INFO","ROUTE_NOTES","ROUTE_NOTES_USER","ROUTE_MAP","ROUTE_GOALS","ROUTE_FEEDBACK","ROUTE_ORGANIZATION_POSTER","ROUTE_VERIFICATION","ROUTE_INVITE","ROUTE_STATUS","ROUTE_TAC_UPDATE","ROUTE_EVENT_INFO_PROVIDERS","ROUTE_NEW_ORGANIZATION","ROUTE_FEED_EDIT","ROUTE_FEED_INFO","ROUTE_FEEDS","ROUTE_EDIT_ORGANIZATION","ROUTE_USER_PROFILE","ROUTE_USER_LOCATION","ROUTE_EVENT_EDIT","ROUTE_REPORT_USER","ROUTE_NOTIFICATIONS","ROUTE_USER_PAYMENTS","ROUTE_PRODUCTS_BUY","ROUTE_PRODUCTS_FINISH","ROUTE_PRODUCTS_EDIT","ROUTE_PRODUCTS_CREATE","ROUTE_PRODUCTS_RECHARGE","ROUTE_PRODUCTS_LIST","ROUTE_PRODUCTS_STATS","ROUTE_PRODUCTS_LIST_DETAIL","ROUTE_SOCIAL","ROUTE_SHARE_ITEM","ROUTE_RESERVANTO","ROUTE_CHANGE_PASSWORD","MAP_API_KEY","FB_APP_ID","SHARE_URL","VAPID_KEY","MAP_BORDER_RADIUS","RRDUseNavigate","extractId","isAlias","isLeaveChargeApplied","formatEventDuration","getDuration","getDurationString","days","daysFormatted","hoursFormatted","minutesFormatted","InfoBuilder","DisplayMobile","DisplayFull","Content","EventName","EventHeader","Info","handleRedirectToLeader","handleRedirectToOrg","handleRedirectToMap","tDate","currency","eventPrice","multisportPrice","showPrice","showMultisportPrice","showSub","handleOrg","handleMap","handleLeader","useWebShare","print","openModal","useModal","handleShare","shareType","getUrl","useEventInfoHandlers","handleRedirectToEventInfo","linkTo","InfoLeft","model","CardBehindStyled","HStackStyled","ViewOnlyMap","location","isMapLoaded","useJsApiLoader","handleOnClick","mapRef","zoom","circleRadius","GoogleMap","Circle","Marker","InfoRight","useChatHandlers","leave","join","leaveChat","joinChat","txChatPlaceholderText","useEventInfoEditDelete","deleteEventTrigger","openConfirmModal","hasProduct","allowRepeating","onConfirmRepetition","closeAllModals","onConfirmSingle","filterJoinedAliases","players","leader","useEventInfoAliasesLeave","selectedIds","setSelectedIds","prevValues","StyledPlayerCard","Card","AliasModalLeaveItem","isSelected","handleOnPress","PlayerSelectModal","buttonProps","renderItem","topText","renderEmpty","React","AliasModalLeave","handleLeaveAliases","joinedPlayers","handleLeaveButtonClick","noAliases","useEventInfoLeave","leaveEventTrigger","isOpenedLeaveModal","onOpenLeaveModal","onCloseLeaveModal","leaveEvent","useEventInfoLeaveShared","handleAliasesLeave","handleLeave","leaveSingle","leaveRepeating","isRepeatingVisible","Buttons","compact","isLeader","isInQueue","canEdit","canLeave","displayOnly","handleDelete","handleEdit","shareEvent","handleChats","useEventInfoAliasJoin","selectedQueueIds","setSelectedQueueIds","willEventBeFull","willQueueBeFull","toggleSelected","selected","isSelectedQueue","AliasModalJoinItem","isAliasJoined","isAliasInQueue","handleOnAliasPress","itemBg","AliasModalJoin","handleJoinAliases","handleJoinButtonClick","JoinLeaveButton","ButtonText","useEventInfoJoin","joinEventTrigger","genderValidationCallback","genderNotSet","joinEvent","genderValidation","isLoadingJoin","useSharedEventInfoJoin","checkStatus","isLoadingStatus","joinWithInvalidGender","handleJoin","_handleJoinDialog","canJoinPlayers","canJoinPlayersInQueue","isAllowedToJoin","joinRepeating","joinSingle","JoinLeave","isOpenedJoinModal","onOpenJoinModal","onCloseJoinModal","disabledJoin","EventModal","navigation","EventTitle","SportTitle","CloseButton","LoaderContainer","EditModal","myRole","isAdmin","isPowerUser","updateOrgMembers","update","newRole","Box","useEventInfoKick","kickPlayer","canKick","KickForm","kickShared","yupResolver","watchArea","kickUserFromEvent","otherReason","reason","txKey","InviteHStack","CopyLinkButton","ShareModal","msg","copy","copied","useClipboard","qrRef","handleCopy","download","handleNavigation","FacebookShareButton","FacebookIcon","TwitterShareButton","XIcon","QRCode","formatEventWithDate","EmbeddedInfo","formattedEventWithDate","LoadedEventModal","eventUrl","useNotesShared","notes","handleClear","contactFilled","useNotes","openDialog","NotesListing","isEdit","Center","Space","GrantModal","handleGrant","orgName","zodResolver","handleSubmitForm","watchCheckBox","watchTel","watchEmail","isOk","GrantModalBody","GrantInfo","InputsWrapper","GDPRWrapper","GDPRText","OrgName","modalBodies","CancelPayment","DiscontinueProduct","FeedbackKarma","FeedbackComment","FeedbackEmoji","FeedbackFinish","AliasEvents","EmbedCalModal","EmbeddedModal","CalModal","ShareUrlModal","UpdateEvent","NewPlace","DeleteAvailability","DeleteAccount","DeleteAlias","DeleteFeed","RemoveMember","EditMember","DeleteOrgConfirm","DeleteOrgPermission","LeaveOrg","EventDelete","EventDeleteConfirm","LeaveEvent","KickPlayer","PlayerAttendance","WebShare","GrantNotes","CreatePlace","JoinChoice","EventPayment","ProductPageLeave","PaymentConfirm","GridContainer","GridItem","setIsLoading","showOptions","kartItems","navigateToPayment","Chip","Price","product","onConfirmRep","onUpdateRepeating","onUpdate","AboutModal","CopyButton","MTOM","MTCM","useSettings","deleteUserAccount","reservantoUrl","AnchorLink","StyledAnchorTag","MenuItemContainer","menuStyle","activeMenuStyle","$active","StyledHStack","SmallText","AnchorText","OtherSettings","translationOtherTable","handleUpdateOther","Settings","isDeleteLoading","showModalTooltip","handleDeleteAccount","handleLocaleChange","goToReservanto","navigateToChangePassword","ReservantoImg","composeUser","ageItem","genderItem","act","composeEvents","useProfile","pastEvents","MyProfileTabType","calculateEventDaySplit","calculateEventMonthSplit","externalColorPicker","eventProvider","externalEventColor","hashIds","myId","otherId","s1","s2","shouldShowBadge","chatId","lastUpdate","lastSeenData","hasData","useShowCardBadge","showBadge","setShowBadge","showRead","show","isForKids","isForAdults","getCurrentTag","OrganizationTag","isTeam","isClub","isOrganization","getCurentTag","providerImage","providerStyle","EventTags","fullText","EventCard","isAclitoEvent","tintColor","navigationKey","GridColumn","fullWidth","columns","Grid","EventsCards","showDateType","hiddenDates","setHiddenDates","handleHiddenDate","prev","dataToRender","calculateSplit","weekday","month","isHidden","DateToggle","DateText","functionObject","dataToReturn","tempData","AboutUserAttributes","myProfile","onAliasNavigation","AboutUserSection","AboutUser","GET_USER","GET_USER_REVIEWS","GET_USER_STATS","userApi","useGetUserQuery","useGetUserReviewsQuery","useGetUserStatsQuery","ReviewCards","reviews","review","SecondaryTitle","Body","Reviews","isReviewHidden","isMyProfile","isUninitialized","isSuccess","sortedData","showEmpty","Comments","debounce","wait","timeoutId","useFlexWrap","isFlexWrapped","setIsFlexWrapped","useLayoutEffect","checkFlexWrap","flexContainer","containerWidth","totalItemsWidth","total","debouncedCheckFlexWrap","DEFAULT_EMOJIS","MAX_EMOJIS","Stats","sortedEmojis","valueA","valueB","emojisArray","slicedEmojisArray","stat","AboutUserMain","showTooltipModal","StyledVStack","UserDeletedText","NameText","achievementApi","useGetAchievementsQuery","useGetUserAchievementsByUserIdQuery","useGetRankQuery","getLevel","levelSteps","cumulativeSum","getLevelCumulativeSum","idx","createDataForAchievementsCards","achievements","userAchievements","aliasId","filteredUserAchievements","achievement","calculateAchievementCardData","sortAchievements","achievementProgress","progressRequired","sumOfPreviousSteps","sum","currentProgress","totalProgress","b","splitIconArrayIntoPairs","AllIcons","checkIconNameType","iconName","createIcons","IconAll","AchievementIcon","unlocked","classic","AchievementView","NoCircle","sizeClassic","sizeNonClassic","IconContainer","$preview","ProgressBar","currentProgressValue","totalProgressValue","ProgressBarContainer","ProgressBarFiller","AchievementCard","description","Achievements","search","useLocation","myAliasId","isFetchingAchievements","isFetchingUserAchievements","StyledCard","Profile","tabIndex","setTabIndex","handleNavigationToGoals","handleTabChange","MyActivities","RRDUseLocation","useSearchParams","paramObject","useOnClickOutside","refsToIgnore","handler","withRouter","compareByMonth","fstDate","sndDate","compareByDay","compareByYear","compareByMonthAndYear","compareByMonthAndDayAndYear","CalendarDay","selectedDay","eventsByDay","onDayClick","day","handleClick","SelectedCalendarDay","isCurrent","MobileCalendar","topBarElement","showCal","setShowCal","filteredEvents","setFilteredEvents","setSelectedDay","handleShowCal","onDateChange","filterEventsByDay","TopBar","Calendar","useEmbed","makeUrl","SEARCH_CALENDAR_EVENTS","SEARCH_EMBEDDED_CALENDAR_EVENTS","calendarEventsApi","viewStartDate","viewEndDate","useSearchCalendarEventsQuery","useSearchEmbeddedCalendarEventsQuery","useCalendar","isPublic","offsetMonthViewDate","end","setViewStartDate","setViewEndDate","isFetching","publicEvents","handleNavigate","newDate","view","Views","handleRangeChange","range","start","weekRange","dayStart","debouncedNavigate","debouncedRangeChange","CalendarStyleWrapper","formattedWeekDate","monthDate","formatStart","formatEndSameMonth","formatEndDifferentMonth","formatYear","CustomToolbar","onView","onNavigate","goToView","timeFormat","goToBack","Navigate","goToNext","goToToday","handleTabIndexChange","dateFormat","ToolBar","StyledButtonBox","TodayButton","EventComponent","sportColor","mqLaptop","StyledLine","StyledBox","StyledTime","styleIconSelect","OPACITY","WeekComponent","StyledContainer","StyledName","components","CustomToolBar","SlotComponent","useLocalizer","localizer","dayjsLocalizer","formatFunction","culture","formats","localeRecord","sk","cs","en","embedModal","mappedEvents","mqTabletS","BigCalendar","Calendar$1","composeInitialEditValues","MapGuide","useDefaultLocation","userLocation","mapLocation","setMapLocation","confirmMapLocation","handleUpdateLocation","handleCenterChanged","region","getLocation","showPosition","showError","locationNotAllowed","position","DefaultLocation","disabled","mapContainer","FormWrapper","FormScreen","ProfileEditForm","showTac","placeholderName","placeholderSurname","tac","setTac","tacVisible","setTacVisible","pp","setPP","handleCheckboxChangeTac","handleCheckboxChangePP","composeInitialCreateValues","useProfilePrefill","prefill","setPrefill","useAboutUser","populateFirstTime","useUserInformation","updateUser","ProfileEdit","handleUpdateUser","initialValues","isMap","navBack","firebaseConfig","firebaseApp","initializeApp","messaging","isSupported","getMessaging","getFirebaseToken","getToken","FirebaseProvider","sub","onMessage","showMantineNotification","EmbeddedCalendar","ScreenWrapper","TopContainer","LanguageContainer","EmbeddedCalendar$1","useLogin","AuthLogo","ButtonContent","Social","onSocialClick","socialLogin","LinkButton","CognitoHostedUIIdentityProvider","LinkButtonContent","Screen","StyledScreen","logo","Header","navToLanding","logoURL","Contacts","Link","Copyright","urlLocale","DotDivider","Footer","textProps","to","StyledLink","NavLink","LoginForm","ForgotPasswordText","WithAuth","route","useAuthenticator","navigate","afterRun","setAfterRun","submitOnKeyPress","Login","login","searchParams","NoAccountLink","Login$1","useRegister","registerValidationSchema","RegisterForm","useRegisterWeb","register","Register","signUp","AlreadyHaveAccLink","Register$1","useRequestNewPassword","EmailForm","RequestNewPassword","requestNewPassword","useSubmitNewPassword","PasswordForm","SubmitNewPassword","submitNewPassword","convert","param","getBinary","getSeenMap","setSeenMap","useAvailabilities","onProfileClick","AvailabilityTags","AvailabilitiesCards","availabilities","availability","timeFrom","timeTo","Availabilities","trigger","loadNextAvailabilities","handleNav","useAvailabilityCompleteEdit","getValues","availabilityId","myEvents","cachedAvailabilities","dateTo","formErrorMapper","errorRecord","useFormErrorMap","translatedErrorKeys","errs","errorMessage","useAvailabilityCreateEdit","alreadyHasEvent","alreadyHasAvailability","calculateDateDiff","useAvailabilityEdit","updateAvailability","formValues","generateDates","frequency","arrayDates","generatedDate","useRepeatingForm","watch","watchDate","watchRepeat","watchNumberOfAvailabilities","watchRepeatAfter","watchDuration","formatDate","firstDate","secondDate","DateForm","showRepeating","availabilityDates","repeating","hour","minute","Items","calculateCircleRadius","Place","setValue","currentCenter","circleCenter","setCircleCenter","onMapClick","latitude","longitude","ContainerPlace","AvailabilityActivities","radioValue","setRadioValue","initialActivities","Activities","handleRadioChange","AvailabilityEdit","Date","AvailabilityEdit$1","useAvailabilityInfo","displayedAvailability","InfoContainer","Data","Suggestions","suggestedEvents","loading","EventsCard","useAvailabilityInfoWeb","deleteAvailability","onConfirmDelete","AvailabilityInfo","TopSection","InfoSection","MapSection","AvailabilityInfo$1","_t","useAvailabilityCreate","createAvailability","useAvailabilityNew","createAvailabilities","NewAvailability","EventFormContext","EventFormProvider","useEventFormContext","useEventCreateEdit","useGetActivityAndGenders","allActivities","setAllActivities","userActivity","self","userPool","place","trainer","trainerInfo","useEventInfoUpdate","updateEventTrigger","eventToEdit","getMyOrgsSelectOptions","useEventEdit","possibleGenders","isLoadingPlaces","orgOptions","updateEvent","updateRepeatingEvents","handleUpdateEvents","_updateDialog","generateTagMappings","selectedTag","Description","allActivitiesNoAny","watchLinkRequired","eventTag","inputStyle","usePlace","placeSelectList","usePlaceWeb","placesMapLocation","delta","resetField","useWatch","allList","selectedPlace","setSelectedPlace","setCurrentCenter","beenPlayed","handleUpdatePlaceActivities","handledPlace","shouldUpdate","updatePlaceActivities","placeToUpdate","handleCreatePlace","newPlace","loadPlaces","allPlaces","watchPlace","ContainerPlaceBox","NewPlaceTitleWrapper","NewPlaceTitle","markerMain","mapPlace","circleOptions","InfoBox","NewPlaceFormWrapper","NewPlaceFormInputs","StyledValidatedInput","StyledSubmitButton","watchSwitch","watchNumberOfEvents","eventDates","switchRepeating","FormRow","sectionMembers","membersInfo","me","adminInfo","powerUsersInfo","memberInfo","ad","adminNames","memberNames","useEventInfoSelectTrainer","setSelected","playersToSelect","orgMembers","handleOnPlayerPress","playerId","getOrgForTrainer","formOrg","displayedOrg","orgsInState","getOrgUserRole","userID","memberId","canEditFeed","currentUserRole","canCreateFeed","OrganizationModel","getProductOptions","products","productOptionsOneOff","productOptionsSub","myOrganizations","watchPrice","watchForFree","watchOrg","watchProductSub","watchProductOneOff","canDisplayProducts","Players","setParams","modelOrg","watchRequireConfirm","watchDontParticipate","watchEnableQueue","playersRequired","EventEdit","EventEditComponent","EventEdit$1","useNewEvent","createEventTrigger","EventNew","createNewEvent","EventNew$1","calculateStreak","MyEventsTabType","EventCards","handleClusterClick","eventsAtMarker","SimpleMap","onMapClusterClick","onMarkerClick","handleMarkerClick","GoogleMarkerClusterer","clusterer","EventsMap","selectedEvents","setSelectedEvents","Events","mappedMyEvents","handleShowMore","useReportUser","userToReport","createReport","ReportUser","handleReport","ReportUser$1","useShare","isLoadingEvent","eventError","isLoadingOrg","orgError","CLICK_REFERRAL","referralApi","useClickReferralMutation","Name","EventView","ActivityText","OrgView","ShareItem","useParams","click","ShareItemOld","ShareItemOld$1","useLocalNotifications","getNotificationBody","userName","_getSport","_getDate","useFilterNotifications","chipValue","setChipValue","filter","setFilter","handleChipFilter","handleFilter","_whichNotificationsToDisplay","bin","_bins","temp","bins","translations","useLocalNotificationsWeb","getOnClick","_navigateToFeedback","_navigateToEvent","_navigateToOrg","_navigateToFeed","_navigateToProfile","useNotificationAnimation","bounds","useMeasure","containerVariants","filterVariants","NotificationFilter","variant","AnimatePresence","LabelContainer","NotificationCard","notification","notificationBody","secondaryTitle","titleTranslations","bodyTranslations","TopContent","Message","BottomText","Notifications","filteredNotifications","cardVariant","deleteNotifications","sortedNotifications","MotionContainer","createElement","MotionVStack","useOrganizationSchema","getMaxMembersValidationSchema","useOrgCreateEdit","useOrganizationEdit","updateOrg","editOrg","useOrgEdit","orgTypeLabelText","firstWord","isCreating","watchMaxMembers","watchUnlimited","OrganizationEdit","newOrganizationSchema","OrganizationEdit$1","useOrganizationCreate","createOrganization","useNewOrganization","createOrg","OrganizationNew","createNewOrganization","OrgsTabType","OrganizationCard","OrganizationListing","handleSearch","resetSearch","getSelectedOrgs","ListingSection","HStackTop","SlideMenu","Orgs","useOrganizations","setSearch","debouncedSearch","setDebouncedSearch","myOrgsLoading","allOrgsLoading","allOrgs","myOrgsCreateLoading","myOrgsUpdateLoading","handleFilters","myOrgsSelected","ToggleContext","ToggleProvider","useToggleProvider","withToggleProvider","WrappedComponent","useOrganizationModel","memberControls","withControls","canSeeNotes","userInfoId","mergeAndFilter","a1","a2","a2Map","merged","matchedItem","mapFeedbackEvent","LIST_PAST_EVENTS","GET_PAST_EVENT","EMIT_FEEDBACK_EVENT","EMIT_EMOJI_BATCH_FEEDBACK_EVENT","FINISH_EVENT","EMOJIS_BY_ORG","feedbackApi","useFeedbackEvent","useGetPastEventQuery","useListPastEventsQuery","useEmitFeedbackEventMutation","useEmitEmojiBatchFeedbackEventMutation","useFinishEventMutation","useEmojisByOrgQuery","sortUsersByTopEmoji","users","emojiData","emojiName","userAEmojiValue","RoleBanner","OrgMemberCards","onRemoveMember","onEditMember","emojiMap","emoji","setEmoji","showSorting","sortedMembers","hasControl","handleRemoveMember","handleEditMember","handleClickUserNotes","useOrganizationMembers","useOrgMembers","removeMember","useOrganizationInfoSection","Members","MembersInner","Organizations","EmptySelectWrapper","ToggleBack","Outlet","Organizations$1","signOut","isLoadingPopulate","PageWrapper","ContentContainer","TitleDiv","useUserProfile","canBeReported","DeletedUserProfile","UserProfile","displayedUser","UserProfile$1","applyQueryParams","price","freeOnly","queryParams","objectifyQuerySearch","from","_getBoolean","isoString","useSearchFilters","filterInitialValue","setQueryParams","filters","Filter","clearFilter","ButtonSection","SearchTabType","useSearchBar","onQueryChange","deb","handleDebounceQuery","inputRef","setV","useSearchMap","radius","useCenterChange","locationFilter","center","setCenter","panToCenterOnLoad","onCenterChange","displayCircle","createRef","centerChanged","handleMapClusterClick","handleOnCenterChange","lng","_debouncedSearch","changed","map","MarkedMap","handleOnLoad","SearchMap","findEventsOnMap","showCircle","Map","useSearch","isSearchOpen","searchValue","setSearchValue","handleSearchBar","onFilterChange","f","Search","organizations","filterProps","Search$1","useEventInfoAliasesConfirmation","isAliasConfirmed","AliasModalConfirmItem","AliasModalConfirm","handleConfirmAliases","joinedAliases","handleConfirmButtonClick","InitialConfirmModal","onConfirmPress","onLeavePress","showConfirmationIcon","_findPlayer","isPlayerConfirmed","willUserWithAliasParticipate","isPlayerInQueue","canBePlayerKicked","useEventInfoKickShared","useEventInfoConfirmation","confirmEvent","confirmAliasesAttendance","isOpenedConfirmModal","closeConfirmModal","PlayerCards","isQueue","cardMapper","PlayerStack","handlePlayerKick","handleQuestionMarkClick","eventPlayer","handleNotesClick","onPlayerClick","isCurrentUserAdmin","InfoTab","SectionInfo","InfoContent","SectionPlayers","PlayersCards","QueueHeader","QueueTitle","updateLastSeen","lastMessage","findData","useChatWeb","isMyMessage","sortedMessages","MessagesList","hasMore","observerLoading","setObserverLoading","loadNext","observer","refM","refPrevLastItem","lastElementRef","node","entries","getRef","navigateToUserProfile","getMessage","MessageCard","SystemDate","SystemMessage","Cloud","MessageText","Wrapper","Scrollbar","$isMyMessage","ChatPlaceholder","getMessages","prevDay","currentDay","dateString","Chat","onSend","setText","handleSendMessage","handleOnMessageChange","handleKeyPress","WritingBox","useEventInfoInitial","EventInfo","EventInfoComponent","idContainer","EventInfo$1","Rank","rank","TableHeader","TableRow","MedalCell","NameCell","PointsCell","isCompleted","goal","goalProgress","Goals","setOrgId","isOrgTab","setIsOrgTab","tabId","setTabId","setAchievement","isRankDisabled","newTabId","isLoginDisabled","isTACUpdateRequired","currentVersion","skippedUntil","isRequired","contextKey","contextInitialState","getContextFromLocalStorage","saveContextToLocalStorage","removeContextFromLocalStorage","RequireAuth","setStatus","userData","setUserData","skipDate","setSkipDate","handleInvite","TwitterIcon","WhatsappShareButton","WhatsappIcon","FacebookMessengerShareButton","FacebookMessengerIcon","EmailShareButton","EmailIcon","LinkedinShareButton","LinkedinIcon","useReservanto","accepted","setMessage","saveToken","SvgFigure2","React.createElement","IconUrl","Logo","StyledLogo","Reservanto","Reservanto$1","useEventInfoProviders","goBack","EventInfoProviders","addEventToMyEvents","removeEventFromMyEvents","removeEvent","addEvent","ActionIcon","EventInfoProviders$1","AliasCard","showButtons","onEditAliasPress","onDeleteAliasPress","ProfileAliases","aliases","onCreatePress","onNavigateInfo","onBackPress","containerId","useProfileAliasesEdit","currentAlias","updateSecondaryProfile","AliasForm","ProfileAliasesEdit","isLoadingUpdateMyProfile","ProfileAliasesEdit$1","useProfileAliasesCreate","ProfileAliasesCreate","createSecondaryProfile","useNoteGrants","noteGrants","loadGrantOnFocus","NoteGrantListing","grant","Notes","useNotesUser","loadApiData","NotesUser","NotesUser$1","confirmSignUpHeaders","resendCodeHeaders","useVerify","code","clientId","response","setResponse","hasError","setHasError","confirmSignUpBody","resendCodeBody","sendRequest","headers","welcome","resp","resendRequest","handleVerification","codes","getCode","Result","canShowLink","ResultTextContainer","NewLink","SvgLogoWhite","SvgPosterTexture3","VerificationBody","Figure2","Verification","VerificationInner","Verification$1","aclitoWebURL","Invite","aclitoURL","useFeedEdit","createFeed","updateFeed","createOrUpdateFeed","OrganizationFeedEdit","handleCreateOrUpdateFeed","OrganizationFeedEditWrapper","feedId","selectedFeed","OrganizationFeedEdit$1","useFeedDelete","deleteFeed","FeedMenuOptions","StyledMoreButton","OrganizationFeedInfo","FeedText","OrganizationFeedInfo$1","FeedCard","FeedList","feedFilters","allData","isAllFetching","feeds","useFeedFilters","feedFilter","FeedFilter","submitFilters","OrganizationFeed","handleAddPost","useMarkerClick","ViewMap","ViewMap$1","PX_TO_MM","MM_TO_PX","OrganizationPoster","refTop","refBottom","qrSize","setQrSize","whiteBoxSize","setWhiteBoxSize","calculateSizes","topHeight","bottomHeight","qrSizeCalculated","_pixelsToMmNumber","whiteBoxSizeCalculated","resizeObserver","Poster","_pixelsToMmString","Texture","AclitoLogoWhite","Aclito","TitleYellow","WhiteBox","QRBox","OrganizationInfo","OrgTitle","OrgDescription","PrintButton","pixels","dpi","pixelsToMmString","PosterTexture","OrganizationPoster$1","Feedback","useFeedbackHandlers","handleFinish","finishEvent","handleCommentClick","userOrAliasId","emitFeedback","handleKarmaClick","karmaProvided","handleEmojiSubmit","handleBatchEmojiSubmit","batchEmitEmoji","isLoadingSingle","isLoadingBatch","useGetRatings","ratings","userRatings","comment","FeedbackCards","onEmojiClickSubmit","onKarmaClick","onCommentClick","FeedbackCard","karma","isOrganizer","isTrainer","canRemoveKarma","FeedbackInfo","emojiRatings","currentEmoji","AliasInfo","createSearchParams","AliasInfo$1","Status","useUserPayments","logs","restLogs","credit","payments","restPayments","cancelPayment","isCancelling","userPayments","sortedLogs","sortedPayments","kart","PaymentLogCard","paymentLog","colorIcon","colorIcon2","icon2","PaymentCard","onCancel","disabledButtons","userFound","StyledPlainCard","UserPayments","createKart","onPay","navigateToTopUp","log","useProductsBuy","setKartItems","amount","newAmount","k","ProductCard","onInfo","onDiscontinue","onEdit","onAdd","ProductsBuy","ProductsBuyInner","base64IsValid","src","fileValidator","paginationSchema","productTypeValidator","createProductInputValidator","leaveCharge","leaveChargeDate","refinementContext","paymentArrayValidator","updateProductInputValidator","columnData","column22","column0","column1","column14","column2","column10","column3","column12","column4","column5","column6","column7","column16","column8","column9","column18","column25","column26","column17","fioTransactionSchema","transactionAction","emojiEventValidator","karmaEventValidator","reviewEventValidator","notificationTypesValidator","notificationsSettingsInputValidator","functionLiteral","functionParamsUniqueSet","functionParamsConsecutiveStreak","functionParamsSamePeriod","functionParamsSecondarySamePeriod","functionParamsSimpleSum","functionParamsSecondarySimpleSum","functionParams","functionParamsSecondary","encodedLanguage","dateIsFutureRefine","createEventInputValidator","num","ProductsEdit","ProductsInner","ProductsInnerForm","updateProduct","ProductsList","ProductsListInner","productData","discontinue","showDiscontinued","setShowDiscontinued","unFilteredProducts","allProducts","navigateToDetail","navigateToEdit","navigateToCreate","navigateToBuy","navigateToStats","discontinueProduct","StyledAgGrid","AmountCellRenderer","StatusCellRenderer","AgGrid","lazy","__vitePreload","AgGridReact","AllCommunityModule","ModuleRegistry","ProductsListDetail","ProductsListDetailInner","tempId","setTempId","gridRef","paymentData","dataOrganization","isLoadingProducts","getRowData","membersMap","paymentsArray","memberPayments","aliasFound","onFilterTextBoxChanged","productOptions","columnDefs","rowData","newId","Suspense","ProductsCreateInner","createNewProduct","typeObject","typeOptions","watchType","watchLeaveCharge","getTotalPrice","allSameCurrency","firstValue","getCurrency","useProductsFinish","retryId","createPayments","idsCopy","isSelectEnabled","shouldFill","watchPayments","totalPrice","hasEnoughCredit","canPay","isAutoJoin","paymentObject","Tooltip","isVisible","setIsVisible","TooltipWrapper","TooltipText","useProductCard","initialValue","control","unregister","fields","append","remove","useFieldArray","onSubtract","aliasOptions","paymentArray","findDuplicateIndices","seen","duplicates","CounterContainer","CountDisplay","ProductCounter","min","setCount","ProductFinishCard","invalidIndexes","field","drawCheck","keyframes","iconBounce","IconWrapper","CheckmarkCircle","CheckmarkPath","PaymentSuccess","ProductsFinish","ProductsFinishInnerForm","handleSubmitData","navigateToRecharge","openSubmitModal","initialData","DifferentCurrency","ChangePassword","TacUpdate","handleUpdate","handleSkip","IBAN","account","prefix","number","bank","buf","pz","dividend","deconstructAccFromDB","accountString","prefixAcc","useCreditRecharge","vs","decomposedAcc","CreditRecharge","setPrice","spayd","useOrganizationInfoHandlers","deleteOrganization","joinOrganization","leaveOrganization","queryTablet","useReactRouterNavigate","handleButton","shareOrg","OrgEvents","handleCalendar","JoinOrganizationButton","canJoin","MembersMini","howManyAvatarsToFit","setHowManyAvatarsToFit","avatarSpacing","avatarSize","approximateChildWidth","checkContainer","isToBeSliced","avatars","CenterLoader","OrganizationInfoInner","isQuerySuccess","handleNavigateProducts","handleNavigateProductsBuy","handleNavigateMembers","onProductClick","OrganizationsButton","useInvoice","paid","refunded","allPayments","allOneOffPayments","numberOfOneOffPayments","allSubscriptionPayments","numberOfSubscriptionPayments","totalSubscription","partialSum","totalOneOff","tableSubscriptionPayments","u","actualUser","productName","tableOneOffPayments","eventName","eventDate","InvoiceTable","isReady","TableContainer","StyledTable","HeaderCell","TableBody","TableCell","OrganizationStats","OrganizationStatsInner","DatePickerInput","AclitoLogo","getLiteFilters","REDUX_LOAD_ALL","loadAllAsync","_data","canLoadAgain","liteFilters","withData","firstTimeLogin","completed","setCompleted","checkData","LoadingOverlay","useDrawer","matchers","isActive","closeNavigation","getSxStyle","DrawerDivider","themeType","MediaQuery","PermanentDrawer","setOpened","React.useState","setEmail","navRef","React.useRef","toggleRef","AppShell","Navbar","AppHeader","AppHeaderText","StyledTextEmail","TopDrawer","BottomDrawer","HeaderWrapper","Burger","Drawer","DrawerOutlet","Routes","BrowserRouter","ModalsProvider","RDRoutes","Route","ProductsCreate","ProductListDetail","AvailabilityNew","App","awsConfig","Amplify","Authenticator","ReduxProvider","MyApp","I18nProvider","MantineProvider","createRoot"],"sources":["../../../../packages/shared/util/constants.ts","../../../../packages/shared/util/isEnabledConfig.ts","../../../../packages/shared/config/config.base.ts","../../../../packages/shared/config/index.ts","../../../../packages/shared/lib/env/env.web.ts","../../../../packages/shared/lib/sentry/sentry.web.ts","../../../../packages/shared/redux/api.ts","../../../../packages/shared/api/requests/aws-authentication/federatedSignIn.ts","../../../../packages/shared/api/utils/errorObject.ts","../../../../packages/shared/lib/logger/types.ts","../../../../packages/shared/lib/logger/index.ts","../../../../packages/shared/api/requests/aws-authentication/updateUserAttributes.ts","../../../../packages/shared/api/requests/aws-authentication/completeNewPassword.ts","../../../../packages/shared/api/requests/aws-authentication/currentUser.ts","../../../../packages/shared/api/requests/aws-authentication/signIn.ts","../../../../packages/shared/api/requests/aws-authentication/signOut.ts","../../../../packages/shared/api/requests/aws-authentication/signUp.ts","../../../../packages/shared/api/requests/aws-authentication/resetPasswordRequest.ts","../../../../packages/shared/api/requests/aws-authentication/confirmSignUp.ts","../../../../packages/shared/api/requests/aws-authentication/resetPasswordSubmit.ts","../../../../packages/shared/api/requests/aws-authentication/changePassword.ts","../../../../packages/shared/api/requests/aws-authentication/resendSignUpCode.ts","../../../../packages/shared/api/requests/aws-authentication/_authenticationClient.ts","../../../../packages/shared/api/requests/custom/tac/getTac.ts","../../../../packages/shared/api/requests/custom/status/getStatus.ts","../../../../packages/shared/api/requests/custom/customClient.ts","../../../../packages/shared/api/api.ts","../../../../packages/shared/redux/initialStates.ts","../../../../packages/client/src/httpClient.ts","../../../../packages/client/src/user-client/UserClient.ts","../../../../packages/client/src/event-client/EventClient.ts","../../../../packages/client/src/utils/constants.ts","../../../../packages/shared/util/cognitoUser.ts","../../../../packages/client/src/cognitoToken.ts","../../../../packages/client/src/message-client/MessageClient.ts","../../../../packages/client/src/message-client/index.ts","../../../../packages/client/src/event-client/index.ts","../../../../packages/client/src/achievement-client/AchievementClient.ts","../../../../packages/client/src/achievement-client/index.ts","../../../../packages/client/src/availability-client/AvailabilityClient.ts","../../../../packages/client/src/availability-client/index.ts","../../../../packages/client/src/chat-client/ChatClient.ts","../../../../packages/client/src/chat-client/index.ts","../../../../packages/client/src/report-client/ReportClient.ts","../../../../packages/client/src/report-client/index.ts","../../../../packages/client/src/feed-client/FeedClient.ts","../../../../packages/client/src/feed-client/index.ts","../../../../packages/client/src/organization-client/OrganizationClient.ts","../../../../packages/client/src/organization-client/index.ts","../../../../packages/client/src/user-client/index.ts","../../../../packages/client/src/place-client/PlaceClient.ts","../../../../packages/client/src/place-client/index.ts","../../../../packages/client/src/note-client/NotesClient.ts","../../../../packages/client/src/note-client/index.ts","../../../../packages/client/src/notification-client/NotificationClient.ts","../../../../packages/client/src/notification-client/index.ts","../../../../packages/client/src/reservanto-client/ReservantoClient.ts","../../../../packages/client/src/reservanto-client/index.ts","../../../../packages/client/src/payment-client/PaymentClient.ts","../../../../packages/client/src/payment-client/index.ts","../../../../packages/client/src/feedback-client/FeedbackClient.ts","../../../../packages/client/src/feedback-client/index.ts","../../../../packages/client/src/referral-client/ReferralClient.ts","../../../../packages/client/src/referral-client/index.ts","../../../../packages/client/src/public-client/PublicClient.ts","../../../../packages/client/src/public-client/index.ts","../../../../packages/shared/redux/thunks/noteThunks.ts","../../../../packages/shared/redux/slices/noteSlices.ts","../../../../packages/shared/redux/utils/flushState.ts","../../../../packages/shared/util/helpersApi.ts","../../../../packages/shared/redux/thunks/authThunks.ts","../../../../packages/shared/redux/slices/authSlices.ts","../../../../packages/shared/redux/slices/commonSlices.ts","../../../../packages/shared/redux/thunks/eventThunks.ts","../../../../packages/shared/redux/slices/eventSlices.ts","../../../../packages/shared/redux/thunks/notificationThunks.ts","../../../../packages/shared/redux/slices/notificationsSlices.ts","../../../../packages/shared/redux/thunks/profileThunks.ts","../../../../packages/shared/redux/slices/profileSlices.ts","../../../../packages/shared/redux/thunks/placeThunks.ts","../../../../packages/shared/redux/slices/placeSlices.ts","../../../../packages/shared/redux/slices/organizationSlices.ts","../../../../packages/shared/redux/slices/availabilitySlices.ts","../../../../packages/shared/redux/slices/locationSlice.ts","../../../../packages/shared/redux/slices/mobileSlices.ts","../../../../packages/shared/redux/middleware/paginationMiddleware.ts","../../../../packages/shared/redux/middleware/loggerMiddleware.ts","../../../../packages/shared/features/event/utils/normalizeStorageData.ts","../../../../packages/shared/lib/storage/storage.web.ts","../../../../packages/shared/redux/middleware/localeMiddleware.ts","../../../../packages/shared/redux/dynamicMiddleware.ts","../../../../packages/shared/redux/store.ts","../../../../packages/shared/i18n/I18nProvider.tsx","../../../../packages/shared/aws/aws-exports.js","../../../../packages/shared/features/event/utils/getPlayers.ts","../../../../packages/shared/features/event/utils/mapEvent.ts","../../../../packages/shared/features/event/utils/getParticipantsCount.ts","../../../../packages/shared/features/event/utils/isEventFull.ts","../../../../packages/shared/features/event/utils/canJoinEvent.ts","../../../../packages/shared/features/event/utils/eventIsRunning.ts","../../../../packages/shared/features/event/utils/shouldConfirmEvent.ts","../../../../packages/shared/features/event/utils/isJoinedInChat.ts","../../../../packages/shared/features/event/utils/getEventRole.ts","../../../../packages/shared/features/event/utils/canLeaveEvent.ts","../../../../packages/shared/classes/EventModel.ts","../../../../packages/shared/util/selectObject.ts","../../../../packages/shared/util/translateDateFormat.ts","../../../../packages/shared/features/event/utils/formatEvents.ts","../../../../packages/shared/util/safeStringDateParse.ts","../../../../packages/shared/hooks/useTranslate.ts","../../../../packages/shared/hooks/useSchema.ts","../../../../packages/shared/util/sorter.ts","../../../../packages/shared/hooks/useSelectObject.ts","../../../../packages/shared/hooks/useSelector.ts","../../../../packages/shared/hooks/useTranslateDate.ts","../../../../packages/shared/hooks/useDebounceEffect.ts","../../../../packages/shared/providers/FlashMessageProvider.tsx","../../../../packages/shared/hooks/useShowFlashMessage.ts","../../../../packages/shared/util/parseURL.ts","../../../../packages/shared/util/findAndReplace.ts","../../../../packages/shared/util/unique.ts","../../../../packages/shared/redux/utils/handleError.ts","../../../../packages/shared/redux/api/paymentApi.ts","../../../../packages/shared/redux/api/eventApi.ts","../../../../packages/shared/util/dedupeByUpdatedAt.ts","../../../../packages/shared/util/assertions.ts","../../../../packages/shared/redux/api/organizationApi.ts","../../../../packages/shared/redux/api/feedApi.ts","../../../../packages/shared/redux/api/availabilityApi.ts","../../../../packages/shared/redux/api/reportApi.ts","../../../../packages/enums/src/index.ts","../../../../packages/shared/util/randomizers.ts","../../../../packages/shared/redux/api/messageApi.ts","../../../../packages/shared/redux/middleware/UiMessageMiddleware.ts","../../../../packages/shared/theme/colors.ts","../../../../packages/ui-web/providers/ThemeProvider.tsx","../../../../packages/ui-web/utils/mediaQueries.ts","../../../../packages/ui-web/utils/theme.ts","../../../../packages/shared/util/flashMessage.ts","../../../../packages/shared/util/snackBarConfig.ts","../../../../packages/shared/util/makeTranslatedMessage.ts","../../../../packages/ui-web/components/Icons/Icon.tsx","../../../../packages/ui-web/utils/showFlashMessage.tsx","../../../../packages/shared/hooks/useDispatch.ts","../../../../packages/shared/features/notification/hooks/useNotificationWS.ts","../../../../packages/shared/providers/LocaleProvider.tsx","../../../../packages/ui-web/components/Modal/Modal.tsx","../../../../packages/ui-web/components/Text.tsx","../../../../packages/ui-web/components/Layout/HStack.tsx","../../../../packages/ui-web/components/Layout/Collapsible.tsx","../../../../packages/ui-web/components/Layout/Container.tsx","../../../../packages/ui-web/components/Layout/Overlay.tsx","../../../../packages/ui-web/components/Layout/VStack.tsx","../../../../packages/ui-web/components/Layout/SectionTitle.tsx","../../../../packages/ui-web/components/Tooltips/FeedbackTooltip.tsx","../../../../packages/ui-web/components/Tooltips/OrganizationTooltip.tsx","../../../../packages/ui-web/components/Tooltips/SearchTooltip.tsx","../../../../packages/ui-web/components/Karma.tsx","../../../../packages/ui-web/components/Tooltips/ProfileTooltip.tsx","../../../../packages/ui-web/components/Tooltips/EventTooltip.tsx","../../../../packages/ui-web/components/Tooltips/FeedTooltip.tsx","../../../../packages/ui-web/components/Banner/BannersConfig.tsx","../../../../packages/ui-web/components/Banner/Banner.tsx","../../../../packages/ui-web/components/Banner/CardStatusBannerText.tsx","../../../../packages/ui-web/components/Banner/CardStatusBannerIcon.tsx","../../../../packages/shared/util/cardColorPicker.ts","../../../../packages/ui-web/components/Icons/IconSelect.tsx","../../../../packages/ui-web/components/Banner/ActivityBannerText.tsx","../../../../packages/ui-web/components/Tooltips/ProductAdminTooltip.tsx","../../../../packages/ui-web/components/Tooltips/ProductShoppingTooltip.tsx","../../../../packages/ui-web/components/Tooltips/SettingsTooltip.tsx","../../../../packages/ui-web/providers/ModalTooltipProvider.tsx","../../../../packages/shared/features/misc/hooks/useSettings.ts","../../../../packages/shared/util/object.ts","../../../../packages/ui-web/components/TitleBar.tsx","../../../../packages/ui-web/components/Tabs/Tab.tsx","../../../../packages/ui-web/components/Tabs/Tabs.tsx","../../../../packages/ui-web/components/Button/BackButton.tsx","../../../../packages/ui-web/components/Button/Button.tsx","../../../../packages/ui-web/components/Button/SmallButton.tsx","../../../../packages/ui-web/components/Button/ActionButtons.tsx","../../../../packages/ui-web/components/Button/SubmitButton.tsx","../../../../packages/ui-web/components/Button/TagButton.tsx","../../../../packages/ui-web/components/Tabs/TabButton.tsx","../../../../packages/ui-web/components/Image.tsx","../../../../packages/ui-web/components/Stepper/useStepper.ts","../../../../packages/ui-web/components/Stepper/Stepper.tsx","../../../../packages/ui-web/components/Title.tsx","../../../../packages/ui-web/utils/styles.ts","../../../../packages/ui-web/components/Stepper/StepperButtons.tsx","../../../../packages/shared/resources/default-person.svg","../../../../packages/ui-web/components/S3Image.tsx","../../../../packages/ui-web/components/InlineTooltip.tsx","../../../../packages/ui-web/components/Streak.tsx","../../../../packages/ui-web/components/EmptyList.tsx","../../src/components/Icons/LocallNotificationsIcons.tsx","../../src/components/ShowMoreButton.tsx","../../src/components/ErrorBoundary/components/Fallback.tsx","../../src/components/ErrorBoundary/ErrorBoundary.tsx","../../src/util/openLinkInNewTab.ts","../../src/components/MobileBanner.tsx","../../src/components/PlayersMembersNumber.tsx","../../src/components/Language.tsx","../../../../packages/ui-web/components/Form/Input.tsx","../../../../packages/ui-web/components/Form/Checkbox.tsx","../../../../packages/ui-web/components/Form/Select.tsx","../../../../packages/ui-web/components/Form/ValidatedCheckbox.tsx","../../../../packages/ui-web/components/Form/ValidatedInput.tsx","../../../../packages/shared/util/formatTimeInput.ts","../../../../packages/ui-web/components/Form/ValidatedTimeInput.tsx","../../../../packages/ui-web/components/Form/Textarea.tsx","../../../../packages/ui-web/components/Form/Switch.tsx","../../../../packages/ui-web/components/Form/ValidatedSwitch.tsx","../../../../packages/ui-web/components/Form/ValidatedSelect.tsx","../../../../packages/ui-web/components/Form/NumberInput.tsx","../../../../packages/ui-web/components/Form/ValidatedNumberInput.tsx","../../../../packages/ui-web/components/Form/DateTimePicker.tsx","../../../../packages/ui-web/components/Form/ValidatedDateTimePicker.tsx","../../../../packages/ui-web/components/Form/ValidatedTextArea.tsx","../../../../packages/ui-web/components/Form/MultiSelect.tsx","../../../../packages/ui-web/components/Form/ValidatedMultiSelect.tsx","../../../../packages/ui-web/components/Form/SearchBar.tsx","../../../../packages/ui-web/components/Form/RadioGroup.tsx","../../../../packages/ui-web/components/Form/RadioButton.tsx","../../../../packages/ui-web/components/Form/PasswordInput.tsx","../../../../packages/ui-web/components/Form/ValidatedPasswordInput.tsx","../../../../packages/ui-web/components/Form/ValidatedSelectV2.tsx","../../../../packages/ui-web/components/Form/ValidatedNumberInputV2.tsx","../../../../packages/shared/util/SVG.ts","../../../../packages/ui-web/components/Avatar/Avatar.tsx","../../../../packages/shared/util/avatarOrg.ts","../../../../packages/ui-web/components/Avatar/OrgAvatar.tsx","../../../../packages/ui-web/components/Dropzone/ImagePreview.tsx","../../../../packages/ui-web/components/Dropzone/CurrentPicture.tsx","../../../../packages/ui-web/components/Dropzone/DropzoneContent.tsx","../../../../packages/shared/util/getRandomUserAttributes.ts","../../../../packages/ui-web/components/Dropzone/canvasPreview.ts","../../../../packages/ui-web/components/Dropzone/useDropZone.ts","../../../../packages/ui-web/components/Dropzone/AvatarDropzone.tsx","../../../../packages/ui-web/components/Form/ValidatedDropzone.tsx","../../../../packages/ui-web/components/Form/Slider.tsx","../../../../packages/ui-web/components/Form/ValidatedSlider.tsx","../../../../packages/ui-web/components/Form/FileInput.tsx","../../../../packages/ui-web/components/CardStyles.ts","../../../../packages/ui-web/components/Layout/Sections.ts","../../src/features/misc/screens/Settings/components/NotificationSettings.tsx","../../src/util/constants.ts","../../src/hooks/useNavigate.ts","../../../../packages/shared/util/alias.ts","../../../../packages/shared/features/event/utils/leaveCharge.ts","../../../../packages/shared/features/event/utils/formatEventDuration.ts","../../src/features/event/screens/EventInfo/components/InfoBuilder.tsx","../../src/features/event/styles/eventInfoStyles.ts","../../src/features/event/screens/EventInfo/components/Info.tsx","../../src/hooks/useWebShare.tsx","../../src/features/event/screens/EventInfo/hooks/useEventInfoHandlers.tsx","../../src/features/event/screens/EventInfo/components/InfoLeft.tsx","../../src/common/Maps/ViewOnlyMap.tsx","../../src/features/event/screens/EventInfo/components/InfoRight.tsx","../../../../packages/shared/features/event/hooks/useChatHandlers.ts","../../src/features/event/screens/EventInfo/hooks/useEventInfoEditDelete.tsx","../../../../packages/shared/features/event/utils/filterJoinedAliases.ts","../../../../packages/shared/features/event/hooks/useEventInfoAliasesLeave.ts","../../src/common/Modals/ItemStyles.tsx","../../src/features/event/screens/EventInfo/components/AliasModalLeaveItem.tsx","../../src/common/Modals/PlayerSelectModal.tsx","../../src/features/event/screens/EventInfo/components/AliasModalLeave.tsx","../../../../packages/shared/features/event/hooks/useEventInfoLeave.ts","../../src/features/event/screens/EventInfo/hooks/useEventInfoLeave.tsx","../../src/features/event/screens/EventInfo/components/Buttons.tsx","../../../../packages/shared/features/event/hooks/useEventInfoAliasesJoin.ts","../../src/features/event/screens/EventInfo/components/AliasModalJoinItem.tsx","../../src/features/event/screens/EventInfo/components/AliasModalJoin.tsx","../../src/features/event/screens/EventInfo/components/JoinLeaveButton.tsx","../../../../packages/shared/features/event/hooks/useEventInfoJoin.ts","../../src/features/event/screens/EventInfo/hooks/useEventInfoJoin.tsx","../../src/features/event/screens/EventInfo/components/JoinLeave.tsx","../../src/common/Modals/EventModal.tsx","../../src/features/organization/components/EditModal.tsx","../../../../packages/shared/features/event/hooks/useEventInfoKick.ts","../../src/features/event/components/KickForm.tsx","../../src/common/InviteLayouts/InviteLayouts.ts","../../src/common/InviteLayouts/ShareModal.tsx","../../src/util/formatEventWithDateObject.tsx","../../src/features/event/screens/EventInfo/components/EmbeddedInfo.tsx","../../src/common/Modals/LoadedEventModal.tsx","../../../../packages/shared/features/notes/useNotesShared.ts","../../src/features/notes/screens/Notes/hooks/useNotes.tsx","../../src/features/notes/screens/Notes/components/NotesListing.tsx","../../src/common/Modals/GrantModal.tsx","../../src/components/ModalBodies/ModalBodies.tsx","../../src/hooks/useModal.tsx","../../src/features/misc/screens/Settings/hooks/useSettings.tsx","../../src/common/Text/AnchorLink.tsx","../../src/components/Drawer/components/DrawerStyles.ts","../../src/features/misc/screens/Settings/components/OtherSettings.tsx","../../src/features/misc/screens/Settings/Settings.tsx","../../../../packages/shared/features/profile/utils/composeUser.ts","../../../../packages/shared/features/profile/utils/composeEvents.ts","../../../../packages/shared/features/profile/hooks/useProfile.ts","../../src/features/profile/screens/Profile/types/index.ts","../../../../packages/shared/util/calculateDateSplit.ts","../../../../packages/shared/util/externalColorPicker.ts","../../../../packages/shared/util/getHash.ts","../../../../packages/shared/util/shouldShowBadge.ts","../../../../packages/shared/features/event/hooks/useShowCardBadge.ts","../../../../packages/shared/features/event/types/types.ts","../../../../packages/shared/features/event/utils/getEventTag.ts","../../../../packages/shared/features/organization/types/types.ts","../../../../packages/shared/features/organization/utils/getOrgTag.ts","../../src/util/providerData.tsx","../../src/components/Cards/EventTags.tsx","../../src/components/Cards/EventCard.tsx","../../src/components/Cards/GridColumn.tsx","../../src/components/Cards/EventsCards.tsx","../../src/common/Profile/AboutUserAttributes.tsx","../../src/common/Profile/AboutUserSection.tsx","../../../../packages/shared/redux/api/userApi.ts","../../src/common/Profile/ReviewCards.tsx","../../src/common/Profile/Reviews.tsx","../../../../packages/shared/util/debounce.ts","../../src/hooks/useFlexWrap.ts","../../src/common/Profile/Stats.tsx","../../src/common/Profile/AboutUserMain.tsx","../../../../packages/shared/redux/api/achievementApi.ts","../../../../packages/shared/features/goals/utils/getLevel.ts","../../../../packages/shared/features/goals/utils/createDataForAchievementCards.ts","../../../../packages/shared/features/goals/utils/splitIcons.ts","../../../../packages/ui-web/components/Icons/IconAll.tsx","../../../../packages/ui-web/achievements/utils/createIcons.tsx","../../../../packages/ui-web/achievements/AchievementIcon.tsx","../../../../packages/ui-web/achievements/ProgressBar.tsx","../../../../packages/ui-web/achievements/AchievementCard.tsx","../../src/features/goals/Achievements.tsx","../../src/features/profile/screens/Profile/Profile.tsx","../../src/hooks/useLocation.ts","../../src/hooks/useOnClickOutside.ts","../../src/navigation/withRouter.tsx","../../../../packages/shared/util/compareDates.ts","../../src/components/MobileCalendar/components/CalendarDay.tsx","../../src/components/MobileCalendar/MobileCalendar.tsx","../../src/components/Calendar/hooks/useEmbed.tsx","../../../../packages/shared/redux/api/calendarEventsApi.ts","../../src/components/Calendar/hooks/useCalendar.ts","../../src/components/Calendar/CalendarStyleWrapper.tsx","../../src/util/formattedWeekDate.ts","../../src/common/Calendar/components/CustomToolBar.tsx","../../src/common/Calendar/components/EventComponent.tsx","../../src/common/Calendar/components/SlotComponent.tsx","../../src/common/Calendar/index.tsx","../../src/components/Calendar/hooks/useLocalizer.ts","../../src/components/Calendar/Calendar.tsx","../../../../packages/shared/features/profile/utils/composeInitialEditValues.ts","../../src/common/Maps/MapGuide.tsx","../../src/common/DefaultLocation/hooks/useDefaultLocation.ts","../../src/common/DefaultLocation/DefaultLocation.tsx","../../src/features/profile/styles/styles.ts","../../src/common/ProfileEditForm/ProfileEditForm.tsx","../../../../packages/shared/features/profile/utils/composeInitialCreateValues.ts","../../../../packages/shared/features/profile/hooks/useProfilePrefill.ts","../../../../packages/shared/features/profile/hooks/useAboutUser.ts","../../src/hooks/useUserInformation.ts","../../src/features/profile/screens/ProfileEdit/ProfileEdit.tsx","../../src/util/firebase.ts","../../src/providers/FirebaseProvider.tsx","../../src/components/EmbeddedCalendar/EmbeddedCalendar.tsx","../../../../packages/shared/features/auth/hooks/useLogin.ts","../../../../packages/ui-web/auth/AuthLogo.tsx","../../../../packages/ui-web/auth/Button.tsx","../../../../packages/ui-web/auth/Title.tsx","../../../../packages/ui-web/auth/Social.tsx","../../../../packages/ui-web/auth/Screen.tsx","../../../../packages/ui-web/auth/Background.tsx","../../../../packages/ui-web/images/aclito.svg","../../../../packages/ui-web/auth/Header.tsx","../../../../packages/ui-web/auth/Box.tsx","../../src/features/auth/components/Footer/components/Contacts.tsx","../../src/features/auth/components/Footer/components/Copyright.tsx","../../src/features/auth/components/Footer/Footer.tsx","../../src/common/Text/Link.tsx","../../src/features/auth/screens/Login/components/Form/Form.tsx","../../src/navigation/withAuth.tsx","../../src/util/submitOnKeyPress.ts","../../src/features/auth/screens/Login/Login.tsx","../../../../packages/shared/features/auth/hooks/useRegister.ts","../../src/features/auth/screens/Register/components/Form/Form.tsx","../../src/features/auth/screens/Register/hooks/useRegisterWeb.ts","../../src/features/auth/screens/Register/Register.tsx","../../../../packages/shared/features/auth/hooks/useRequestNewPassword.ts","../../src/features/auth/screens/RequestNewPassword/components/Form/Form.tsx","../../src/features/auth/screens/RequestNewPassword/RequestNewPassword.tsx","../../../../packages/shared/features/auth/hooks/useSubmitNewPassword.ts","../../src/features/auth/screens/SubmitNewPassword/components/Form/Form.tsx","../../src/features/auth/screens/SubmitNewPassword/SubmitNewPassword.tsx","../../../../packages/shared/util/seenMap.ts","../../src/features/availability/screens/Availabilities/hooks/useAvailabilities.tsx","../../src/components/Cards/AvailabilityTags.tsx","../../src/components/Cards/AvailabilitiesCards.tsx","../../src/features/availability/screens/Availabilities/Availabilities.tsx","../../../../packages/shared/features/availability/hooks/useAvailaiblityCompleteEdit.ts","../../../../packages/shared/util/formErrorMapper.ts","../../../../packages/shared/hooks/useFormErrorMap.ts","../../src/features/availability/hooks/useAvailabilityCreateEdit.ts","../../../../packages/shared/util/calculateDateDiff.ts","../../../../packages/shared/features/availability/utils/composeInitialEditValues.ts","../../src/features/availability/screens/AvailabilityEdit/hooks/useAvailabilityEdit.ts","../../../../packages/shared/util/generateDates.ts","../../../../packages/shared/features/availability/hooks/useRepeatingForm.ts","../../../../packages/shared/util/formatRepeatingDate.ts","../../src/common/AvailabilityForm/DateForm.tsx","../../../../packages/shared/features/availability/utils/calculateCircleRadius.ts","../../src/common/AvailabilityForm/Place.tsx","../../../../packages/shared/types/index.ts","../../../../packages/shared/features/availability/hooks/useAvailabilityEdit.ts","../../src/common/AvailabilityForm/Activities.tsx","../../src/features/availability/screens/AvailabilityEdit/AvailabilityEdit.tsx","../../../../packages/shared/features/availability/hooks/useAvailabilityInfo.ts","../../src/features/availability/screens/AvailabilityInfo/components/Buttons.tsx","../../src/features/availability/screens/AvailabilityInfo/components/Info.tsx","../../src/features/availability/screens/AvailabilityInfo/components/Suggestions.tsx","../../src/features/availability/screens/AvailabilityInfo/hooks/useAvailabilityInfoWeb.ts","../../src/features/availability/screens/AvailabilityInfo/AvailabilityInfo.tsx","../../../../packages/shared/features/availability/utils/composeInitialCreateValues.ts","../../../../packages/shared/features/availability/hooks/useAvailabilityCreate.ts","../../src/features/availability/screens/AvailabilityNew/hooks/useAvailabilityNew.ts","../../src/features/availability/screens/AvailabilityNew/AvailabilityNew.tsx","../../../../packages/shared/providers/EventFormProvider.tsx","../../src/features/event/hooks/useEventCreateEdit.ts","../../../../packages/shared/features/event/hooks/useGetActivityAndGender.ts","../../../../packages/shared/features/event/utils/composeInitialEditValues.ts","../../../../packages/shared/features/event/hooks/useEventInfoUpdate.ts","../../../../packages/shared/util/getMyOrgsSelectOptions.ts","../../src/features/event/screens/EventEdit/hooks/useEventEdit.ts","../../../../packages/shared/features/event/utils/mapEventTags.ts","../../src/common/EventForm/Description.tsx","../../../../packages/shared/features/event/hooks/usePlace.ts","../../src/common/EventForm/hooks/usePlaceWeb.tsx","../../src/common/EventForm/Place.tsx","../../../../packages/shared/features/event/hooks/useRepeatingForm.ts","../../src/common/EventForm/DateForm.tsx","../../../../packages/shared/util/sectionOrgMembers.ts","../../../../packages/shared/features/event/hooks/useEventInfoSelectTrainer.ts","../../../../packages/shared/util/getOrgForTrainer.ts","../../../../packages/shared/util/getOrgUserRole.ts","../../../../packages/shared/features/organization/utils/canEditFeed.ts","../../../../packages/shared/features/organization/utils/canCreateFeed.ts","../../../../packages/shared/classes/OrganizationModel.ts","../../../../packages/shared/features/payments/utils/productOptions.ts","../../src/common/EventForm/Price.tsx","../../src/common/EventForm/Players.tsx","../../src/features/event/screens/EventEdit/EventEdit.tsx","../../../../packages/shared/features/event/utils/composeInitialCreateValues.ts","../../src/features/event/screens/EventNew/hooks/useNewEvent.ts","../../src/features/event/screens/EventNew/EventNew.tsx","../../../../packages/shared/util/calculateStreak.ts","../../src/features/event/screens/Events/types/index.ts","../../src/features/event/screens/Events/components/EventCards.tsx","../../src/util/clusterClick.ts","../../src/common/Maps/SimpleMap.tsx","../../src/features/event/screens/Events/components/EventsMap.tsx","../../src/features/event/screens/Events/Events.tsx","../../../../packages/shared/features/misc/hooks/useReportUser.ts","../../src/features/misc/screens/ReportUser/ReportUser.tsx","../../../../packages/shared/features/misc/hooks/useShare.ts","../../../../packages/shared/redux/api/referralApi.ts","../../src/features/misc/screens/ShareItem/styles.ts","../../src/features/misc/screens/ShareItem/components/EventView.tsx","../../src/features/misc/screens/ShareItem/components/OrgView.tsx","../../src/features/misc/screens/ShareItem/ShareItem.tsx","../../src/features/misc/screens/ShareItem/ShareItemOld.tsx","../../../../packages/shared/features/notification/hooks/useLocalNotifications.tsx","../../../../packages/shared/features/notification/hooks/useFilterNotifications.ts","../../src/features/notification/screens/Notifications/components/Buttons.tsx","../../src/features/notification/screens/Notifications/hooks/useLocalNotificationsWeb.ts","../../src/features/notification/screens/Notifications/hooks/useNotificationAnimation.ts","../../src/features/notification/screens/Notifications/components/NotificationFilter.tsx","../../src/components/Cards/NotificationCard.tsx","../../src/features/notification/screens/Notifications/Notifications.tsx","../../../../packages/shared/features/organization/hooks/useOrganizationSchema.ts","../../src/features/organization/hooks/useOrgCreateEdit.ts","../../../../packages/shared/features/organization/hooks/useOrganizationEdit.ts","../../../../packages/shared/features/organization/utils/composeInitialEditValues.ts","../../src/features/organization/screens/OrganizationEdit/hooks/useOrganizationEdit.ts","../../../../packages/shared/features/organization/utils/mapOrgTags.ts","../../../../packages/shared/features/organization/utils/orgTypeLabelText.ts","../../src/common/OrganizationForm/Description.tsx","../../src/features/organization/screens/OrganizationEdit/OrganizationEdit.tsx","../../../../packages/shared/features/organization/utils/composeInitialCreateValues.ts","../../../../packages/shared/features/organization/hooks/useOrganizationCreate.ts","../../src/features/organization/screens/OrganizationNew/hooks/useNewOrganization.ts","../../src/features/organization/screens/OrganizationNew/OrganizationNew.tsx","../../src/features/organization/screens/Organizations/interface.ts","../../src/components/Cards/OrganizationCard.tsx","../../src/features/organization/screens/Organizations/components/OrganizationListing.tsx","../../src/features/organization/screens/Organizations/hooks/useOrganizations.ts","../../src/providers/ToggleProvider.tsx","../../../../packages/shared/hooks/useOrganizationModel.ts","../../../../packages/shared/util/memberControls.ts","../../../../packages/shared/features/event/utils/canSeeNotes.ts","../../../../packages/shared/features/event/utils/mergeAndFilter.ts","../../../../packages/shared/features/event/utils/mapFeedbackEvent.ts","../../../../packages/shared/redux/api/feedbackApi.ts","../../../../packages/shared/util/sortByEmojis.ts","../../src/features/organization/screens/OrganizationInfo/components/RoleBanner.tsx","../../src/components/Cards/OrgMemberCards.tsx","../../../../packages/shared/features/organization/hooks/useOrganizationMembers.ts","../../src/features/organization/screens/OrganizationInfo/hooks/useOrgMembers.tsx","../../src/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoSection.ts","../../src/features/organization/screens/OrganizationInfo/components/Members.tsx","../../src/features/organization/screens/Organizations/Organizations.tsx","../../src/features/profile/screens/AboutUser/hooks/useAboutUser.ts","../../src/features/profile/screens/AboutUser/AboutUser.tsx","../../../../packages/shared/features/profile/hooks/useUserProfile.ts","../../src/features/profile/screens/UserProfile/components/Buttons.tsx","../../src/features/profile/screens/UserProfile/components/DeletedUserProfile.tsx","../../src/features/profile/screens/UserProfile/UserProfile.tsx","../../src/features/search/utils/queryParams.ts","../../src/features/search/hooks/useSearchFilters.ts","../../src/features/search/components/Filter.tsx","../../src/features/search/types/index.ts","../../src/features/search/hooks/useSearchBar.tsx","../../src/features/search/components/Searchbar.tsx","../../src/features/search/screens/Search/hooks/useSearchMap.ts","../../src/features/search/hooks/useCenterChange.ts","../../src/features/search/hooks/useSearchMap.tsx","../../src/features/search/components/Map.tsx","../../src/features/search/screens/Search/components/SearchMap.tsx","../../src/features/search/screens/Search/hooks/useSearch.ts","../../src/features/search/screens/Search/Search.tsx","../../../../packages/shared/features/event/hooks/useEventInfoAliasesConfirmation.ts","../../src/features/event/screens/EventInfo/components/AliasModalConfirmItem.tsx","../../src/features/event/screens/EventInfo/components/AliasModalConfirm.tsx","../../src/features/event/screens/EventInfo/components/InitialConfirmModal.tsx","../../../../packages/shared/features/event/utils/confirmation.ts","../../../../packages/shared/features/event/utils/willPlayerParticipate.ts","../../../../packages/shared/features/event/utils/isPlayerInQueue.ts","../../src/features/event/screens/EventInfo/hooks/useEventInfoKick.tsx","../../src/features/event/screens/EventInfo/hooks/useEventInfoConfirmation.tsx","../../src/components/Cards/PlayersCards.tsx","../../src/features/event/screens/EventInfo/components/InfoTab.tsx","../../../../packages/shared/util/updateLastSeen.ts","../../src/features/event/screens/EventInfo/hooks/useChatWeb.tsx","../../src/features/event/screens/EventInfo/components/Chat/MessagesList.tsx","../../src/features/event/screens/EventInfo/components/Chat/ChatPlaceholder.tsx","../../src/features/event/screens/EventInfo/components/Chat/Chat.tsx","../../src/features/event/screens/EventInfo/hooks/useEventInfoInitial.ts","../../src/features/event/screens/EventInfo/EventInfo.tsx","../../src/features/goals/Rank.tsx","../../src/features/goals/Info.tsx","../../src/features/goals/Goals.tsx","../../../../packages/shared/util/handleStatus.ts","../../src/util/context.ts","../../src/navigation/RequireAuth.tsx","../../src/features/misc/screens/Social/Social.tsx","../../src/features/misc/screens/Reservanto/hooks/useReservanto.tsx","../../../../packages/shared/resources/figure2.svg","../../../../packages/shared/resources/icons/adaptive-icon.png","../../src/common/Logo/Logo.tsx","../../src/features/misc/screens/Reservanto/Reservanto.tsx","../../../../packages/shared/features/event/hooks/useEventInfoProviders.ts","../../src/features/event/screens/EventInfoProviders/EventInfoProviders.tsx","../../src/features/profile/screens/ProfileAliases/components/AliasCard.tsx","../../src/features/profile/screens/ProfileAliases/ProfileAliases.tsx","../../../../packages/shared/features/profile/hooks/useProfileAliasesEdit.ts","../../src/features/profile/components/AliasForm.tsx","../../src/features/profile/screens/ProfileAliasesEdit/ProfileAliasesEdit.tsx","../../../../packages/shared/features/profile/hooks/useProfileAliasesCreate.ts","../../src/features/profile/screens/ProfielAliasesCreate/ProfileAliasesCreate.tsx","../../src/features/notes/screens/Notes/hooks/useNoteGrants.ts","../../src/features/notes/screens/Notes/components/NoteGrantListing.tsx","../../src/features/notes/screens/Notes/Notes.tsx","../../src/features/notes/screens/NotesUser/hooks/useNotesUser.ts","../../src/features/notes/screens/NotesUser/NotesUser.tsx","../../../../packages/shared/features/misc/utils/verifyHeaders.ts","../../../../packages/shared/features/misc/hooks/useVerify.ts","../../../../packages/shared/features/misc/utils/verificationErrorCodes.ts","../../src/features/integration/screens/Verification/components/Result.tsx","../../src/images/svgs/logo_white.svg","../../src/images/svgs/poster_texture3.svg","../../src/features/integration/screens/Verification/components/VerificationBody.tsx","../../src/features/integration/screens/Verification/Verification.tsx","../../src/features/integration/screens/Invite/Invite.tsx","../../../../packages/shared/features/organization/hooks/useFeedEdit.ts","../../src/features/organization/screens/OrganizationFeedEdit/OrganizationFeedEdit.tsx","../../src/features/organization/hooks/useFeedDelete.ts","../../src/features/organization/components/FeedMenuOptions.tsx","../../src/features/organization/screens/OrganizationFeedInfo/OrganizationFeedInfo.tsx","../../src/features/organization/components/FeedCard.tsx","../../src/features/organization/components/FeedList.tsx","../../../../packages/shared/features/organization/hooks/useFeedFilters.ts","../../src/features/organization/screens/OrganizationFeed/components/FeedFilter.tsx","../../src/features/organization/screens/OrganizationFeed/OrganizationFeed.tsx","../../src/features/event/screens/Events/hooks/useMarkerClick.tsx","../../src/features/map/screens/ViewMap/components/ViewMap.tsx","../../src/features/organization/screens/OrganizationPoster/OrganizationPoster.tsx","../../src/features/feedback/screens/Feedback/Feedback.tsx","../../src/features/feedback/screens/FeedbackInfo/hooks/useFeedbackHandlers.ts","../../../../packages/shared/features/feedback/hooks/useGetRatings.ts","../../src/components/Cards/FeedbackCards.tsx","../../src/features/feedback/screens/FeedbackInfo/FeedbackInfo.tsx","../../src/features/profile/screens/AliasInfo/AliasInfo.tsx","../../src/features/misc/screens/Status/Status.tsx","../../../../packages/shared/features/payments/hooks/useUserPayments.ts","../../src/components/Cards/PaymentLogCard.tsx","../../src/components/Cards/PaymentCard.tsx","../../src/features/payments/screens/UserPayments.tsx","../../../../packages/shared/features/payments/hooks/useProductsBuy.ts","../../src/components/Cards/ProductCard.tsx","../../src/features/payments/screens/ProductsBuy.tsx","../../../../packages/validators/src/notification.ts","../../../../packages/validators/src/utils/zodObject.ts","../../../../packages/validators/src/utils/paginationZod.ts","../../../../packages/validators/src/payments.ts","../../../../packages/validators/src/feedback.ts","../../../../packages/validators/src/place.ts","../../../../packages/validators/src/report.ts","../../../../packages/validators/src/reservanto.ts","../../../../packages/validators/src/userAchievement.ts","../../../../packages/validators/src/user.ts","../../../../packages/validators/src/achievement.ts","../../../../packages/validators/src/achievementEventTemp.ts","../../../../packages/validators/src/event.ts","../../../../packages/validators/src/availability.ts","../../../../packages/validators/src/chat.ts","../../../../packages/validators/src/feed.ts","../../../../packages/validators/src/message.ts","../../../../packages/validators/src/note.ts","../../../../packages/validators/src/organization.ts","../../../../packages/validators/src/referral.ts","../../../../packages/validators/src/index.ts","../../src/features/payments/screens/ProductsEdit.tsx","../../src/features/payments/screens/ProductsList.tsx","../../../../packages/ui-web/components/StyledAgGrid.tsx","../../../../packages/ui-web/payments/AgGridRenderers.tsx","../../src/features/payments/screens/ProductListDetail.tsx","../../src/features/payments/screens/ProductsCreate.tsx","../../../../packages/shared/features/payments/utils/getTotalPrice.ts","../../../../packages/shared/util/currency.ts","../../../../packages/shared/features/payments/hooks/useProductsFinish.ts","../../../../packages/ui-web/components/Tooltip.tsx","../../../../packages/shared/features/payments/hooks/useProductCard.ts","../../src/features/payments/components/ProductCounter.tsx","../../src/features/payments/components/ProductFinishCard.tsx","../../src/features/payments/components/PaymentSuccess.tsx","../../src/features/payments/screens/ProductsFinish.tsx","../../src/features/auth/screens/ChangePassword/ChangePassword.tsx","../../src/features/misc/screens/TacUpdate/TacUpdate.tsx","../../../../packages/shared/util/bankUtils.ts","../../../../packages/shared/features/payments/hooks/useCreditRecharge.ts","../../src/features/payments/screens/CreditRecharge.tsx","../../src/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoHandlers.tsx","../../src/features/organization/screens/OrganizationInfo/components/Buttons.tsx","../../src/features/organization/screens/OrganizationInfo/components/OrgEvents.tsx","../../src/features/organization/screens/OrganizationInfo/components/Description.tsx","../../src/features/organization/screens/OrganizationInfo/components/JoinOrganizationButton.tsx","../../src/features/organization/screens/OrganizationInfo/components/MembersMini.tsx","../../src/features/organization/screens/OrganizationInfo/OrganizationInfo.tsx","../../../../packages/ui-web/payments/useInvoice.ts","../../../../packages/ui-web/payments/InvoiceTable.tsx","../../src/features/payments/screens/OrganizationStats.tsx","../../../../packages/shared/resources/icons/aclito.svg","../../../../packages/ui-mobile/utils/getLiteFilters.ts","../../../../packages/shared/redux/thunks/thunks.ts","../../src/navigation/withData.tsx","../../src/components/Drawer/hooks/useDrawer.ts","../../src/components/Drawer/components/Footer/Footer.tsx","../../src/components/Drawer/components/DrawerDivider.tsx","../../src/components/Drawer/components/Header/Header.tsx","../../src/components/Drawer/Drawer.tsx","../../src/navigation/DrawerOutlet.tsx","../../src/navigation/Routes.tsx","../../src/App.tsx","../../src/main.tsx"],"sourcesContent":["export const APP_NAME = 'ACLITO';\n\nexport const RESERVED_USER_NAME = 'unknown';\nexport const RESERVED_GENDER = 'unknown';\nexport const RESERVED_AGE = 'unknown';\nexport const UNKNOWN_VALUE = 'unknown';\n\nexport const INITIAL_DELTA = {\n latitudeDelta: 4,\n longitudeDelta: 5.5,\n};\n\nexport const INITIAL_LOCATION = {\n latitude: 49.1951,\n longitude: 16.6068,\n lat: 49.1951,\n lng: 16.6068,\n lon: 16.6068,\n ...INITIAL_DELTA,\n};\n\nexport const M_TO_KM_CONVERSION = 1000;\nexport const DELETED_FILE = 'DELETED';\nexport const FEEDBACK_PLAYERS_LIMIT = 3;\n\nexport const BLUR_HASH = '';\n\nexport const EVENT_QUEUE_SIZE = 5;\nexport const ALIAS_PREFIX = 'ALIAS';\n\nexport const PLACE_PROVIDER = 'aclito';\nexport const APP_NOTIFICATION_PROVIDER = 'aclito';\n\nexport const BIG_ICON_SIZE_CLASSIC_ACHIEVEMENT = 48;\nexport const SMALL_ICON_SIZE_CLASSIC_ACHIEVEMENT = 24;\nexport const BIG_ICON_SIZE_LEVEL_ACHIEVEMENT = 32;\nexport const SMALL_ICON_SIZE_LEVEL_ACHIEVEMENT = 16;\n\nexport const LAST_ACTIVE = 'lastActive';\nexport const LAST_NOTIFICATION_ID = 'lastNotification';\nexport const TERMS_AND_CONDITIONS_SKIP_DATE = 'tacSkipDate';\nexport const SEEN_MAP = 'seenMap';\nexport const PREVIOUS_ORGANIZATIONS = 'previousOrganizations';\nexport const CURRENT_ORGANIZATION = 'currentOrganization';\nexport const HAS_LANGUAGE = 'hasLanguage';\nexport const CALENDAR_EVENT = 'calendarEvent';\nexport const LAST_SEEN_CHAT = 'lastSeenChat';\nexport const UPDATE_SEEN = '0';\nexport const REMINDER = 'reminder';\nexport const LOCALE = 'locale';\nexport const THEME = 'theme';\nexport const LOCATION_SERVICES = 'locationServices';\nexport const PRE_SIGN_UP_DUPLICATE_ERROR = 'EmailAlreadyExists';\n\nexport const URL_REGEX =\n /(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#()?&//=]*)/;\nexport const PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$/;\nexport const PHONE_NUMBER_REGEX = /^\\+?\\d{6,14}$/;\nexport const TIME_FORMAT_REGEX =\n /^(?!00:00$)(?:[1-9]|(?:[01]\\d|2[0-3]):[0-5]\\d)$/;\n\nexport const SPECIFIC_SYMBOL = '9477';\nexport const DEFAULT_CURRENCY = 'CZK' as const;\nexport const NONE = 'none';\nexport const CURRENCIES = [DEFAULT_CURRENCY, 'EUR'] as const;\nexport const SKIP_DB_TX = [] as any[];\nexport const MAX_PRICE = 10000;\nexport const MIN_PRICE = 0;\nexport const PROJECT_TOKEN_SPLITTER = '@@';\n\nexport const REDUX_RESET = '/reset';\nexport const SENTRY_DSN =\n 'https://c7d7d048250945eb847e133d060ea786@o1161822.ingest.sentry.io/6248343';\nexport const FIRST_TIME = 'FIRST_TIME';\nexport const NOT_FIRST_TIME = 'NOT_FIRST_TIME';\nexport const DEEP_LINK_URL = 'https://app.aclito.com';\n\nexport const PROJECT_ID_LITE = '61f932d4-de0f-4c8e-bcd8-e8d25c35b1f6';\nexport const PROJECT_ID_FULL = '1c7499dc-e53f-4274-91e8-ae081fe9b82e';\n\nexport const BREAKING_CHANGES_VERSION = 18;\nexport const STATUS_ENV: 'dev' | 'prod' = 'prod';\nexport const VERSION = '5.2.2';\n","import { ConfigType } from '../config/config.base';\n\nexport const isEnabledConfig = (value: ConfigType, dev: boolean) => {\n return (\n value === 'always' || (value === 'dev' && dev) || (value === 'prod' && !dev)\n );\n};\n","import activities from './json/activityConfig.json';\nimport age from './json/ageRangesConfig.json';\nimport allLanguages from './json/allLanguages.json';\nimport distance from './json/distanceConfig.json';\nimport gender from './json/genderConfig.json';\nimport kick from './json/kickReasons.json';\nimport language from './json/languageConfig.json';\nimport levels from './json/levelsConfig.json';\nimport notifications from './json/notificationsConfig.json';\nimport orgRoles from './json/orgUserRolesConfig.json';\nimport places from './json/placesConfig.json';\nimport repeat from './json/repeatConfig.json';\nimport URL from './json/URLsConfig.json';\nimport searchPlaces from './json/searchPlacesConfig.json';\nimport emojis from './json/emojiConfig.json';\nconst config = {\n activities,\n age,\n allLanguages,\n distance,\n gender,\n kick,\n language,\n levels,\n notifications,\n orgRoles,\n places,\n repeat,\n URL,\n emojis,\n searchPlaces,\n} as const;\ntype BaseConfig = typeof config;\nexport type ConfigType = 'always' | 'dev' | 'prod' | 'never';\nexport interface ConfigBaseProps extends BaseConfig {\n catchErrors: ConfigType;\n}\n\nconst BaseConfig: ConfigBaseProps = {\n catchErrors: 'prod',\n ...config,\n};\n\nexport default BaseConfig;\n","import BaseConfig from './config.base';\n\nconst config = BaseConfig;\n\nexport { config };\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst IS_DEV = import.meta.env.MODE === 'development';\nconst IS_PROD = !IS_DEV;\n\nexport { IS_DEV, IS_PROD };\n","import {\n init,\n replayIntegration,\n captureException,\n captureMessage,\n setUser,\n addBreadcrumb,\n} from '@sentry/react';\nimport type { UserInfo } from '@aclito/entities';\n\nimport { SENTRY_DSN, STATUS_ENV } from '../../util/constants';\nimport { isEnabledConfig } from '../../util/isEnabledConfig';\nimport { config } from '../../config';\nimport { IS_DEV } from '../env';\n\ninit({\n dsn: SENTRY_DSN,\n integrations: [replayIntegration({})],\n environment: STATUS_ENV === 'prod' ? 'productions' : 'development',\n tracesSampleRate: 1.0,\n replaysOnErrorSampleRate: 1.0,\n enabled: isEnabledConfig(config.catchErrors, IS_DEV),\n});\n\nconst setupUser = (user: UserInfo) => {\n setUser({ userInfoId: user.id });\n};\n\nexport { captureException, captureMessage, setupUser, addBreadcrumb };\nexport const wrap = null;\n","import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';\n\nexport const aclitoApi = createApi({\n reducerPath: 'aclitoApi',\n baseQuery: fetchBaseQuery({ baseUrl: '/' }),\n endpoints: () => ({}),\n tagTypes: [],\n});\n","import { CognitoHostedUIIdentityProvider, Auth } from '@aws-amplify/auth';\nimport { ICredentials } from '@aws-amplify/core';\n/**\n *\n * @param provider sign in type\n * @returns A promise of User if success, appropriate error message otherwise\n */\nexport const makeFederatedSignIn = async (\n provider: CognitoHostedUIIdentityProvider,\n): Promise => {\n try {\n return await Auth.federatedSignIn({ provider });\n } catch (error) {\n return Promise.reject(error);\n }\n};\n","import { ApiAuthErrors } from '../types/types';\n\nexport const errorObject: Record = {\n UserNotFoundException: 'UserNotFoundException',\n NotAuthorizedException: 'NotAuthorizedException',\n PasswordResetRequiredException: 'PasswordResetRequiredException',\n UserNotConfirmedException: 'UserNotConfirmedException',\n AttributesErrorException: 'AttributesErrorException',\n ExpiredCodeException: 'ExpiredCodeException',\n InvalidPasswordException: 'InvalidParameterException',\n InvalidParameterException: 'InvalidParameterException',\n LimitExceededException: 'LimitExceededException',\n NoUserException: 'NoUserException',\n PasswordErrorException: 'PasswordErrorException',\n UserLambdaValidationException: 'UserLambdaValidationException',\n UsernameExistsException: 'UsernameExistsException',\n};\n","import type { captureException } from '../sentry';\n\nexport enum LogLevel {\n Render = 'render',\n Redux = 'redux',\n Debug = 'debug',\n Info = 'info',\n Log = 'log',\n Warn = 'warn',\n Error = 'error',\n}\n\n/**\n * A union of some of Sentry's breadcrumb properties as well as Sentry's\n * `captureException` parameter, `CaptureContext`.\n */\nexport type Metadata = {\n /**\n * Applied as Sentry breadcrumb types. Defaults to `default`.\n *\n * @see https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types\n */\n type?:\n | 'default'\n | 'debug'\n | 'error'\n | 'navigation'\n | 'http'\n | 'info'\n | 'query'\n | 'transaction'\n | 'ui'\n | 'user';\n\n /**\n * Passed through to `Sentry.captureException`\n *\n * @see https://github.com/getsentry/sentry-javascript/blob/903addf9a1a1534a6cb2ba3143654b918a86f6dd/packages/types/src/misc.ts#L65\n */\n tags?: {\n [key: string]:\n | number\n | string\n | boolean\n | bigint\n | symbol\n | null\n | undefined;\n };\n\n /**\n * Any additional data, passed through to Sentry as `extra` param on\n * exceptions, or the `data` param on breadcrumbs.\n */\n [key: string]: unknown;\n} & Parameters[1];\n\nexport type Transport = (\n level: LogLevel,\n message: string | Error | unknown,\n metadata: Metadata,\n timestamp: number,\n) => void;\n\nexport type ConsoleTransportEntry = {\n id: string;\n timestamp: number;\n level: LogLevel;\n message: string | Error | unknown;\n metadata: Metadata;\n};\n","import dayjs from 'dayjs';\n\nimport { addBreadcrumb, captureException, captureMessage } from '../sentry';\nimport { IS_DEV, IS_PROD } from '../env';\n\nimport { LogLevel, Transport, Metadata } from './types';\n\nconst NETWORK_ERRORS = [\n 'Abort',\n 'Network request failed',\n 'Failed to fetch',\n 'Load failed',\n];\n\nfunction isNetworkError(e: unknown) {\n const str = String(e);\n for (const err of NETWORK_ERRORS) {\n if (str.includes(err)) {\n return true;\n }\n }\n return false;\n}\n\nconst allLevels = [\n LogLevel.Render,\n LogLevel.Redux,\n LogLevel.Debug,\n LogLevel.Info,\n LogLevel.Log,\n LogLevel.Warn,\n LogLevel.Error,\n];\nconst enabledLogLevels: {\n [key in LogLevel]: LogLevel[];\n} = {\n [LogLevel.Redux]: allLevels,\n [LogLevel.Render]: allLevels,\n [LogLevel.Debug]: allLevels,\n [LogLevel.Info]: [LogLevel.Info, LogLevel.Log, LogLevel.Warn, LogLevel.Error],\n [LogLevel.Log]: [LogLevel.Log, LogLevel.Warn, LogLevel.Error],\n [LogLevel.Warn]: [LogLevel.Warn, LogLevel.Error],\n [LogLevel.Error]: [LogLevel.Error],\n};\n\nexport function prepareMetadata(metadata: Metadata): Metadata {\n return Object.keys(metadata).reduce((acc, key) => {\n let value = metadata[key];\n if (value instanceof Error) {\n value = value.toString();\n }\n return { ...acc, [key]: value };\n }, {});\n}\n\n/**\n * Used in dev mode to nicely log to the console\n */\nexport const consoleTransport: Transport = (\n level,\n message,\n metadata,\n timestamp,\n) => {\n const extra = Object.keys(metadata).length\n ? ' ' + JSON.stringify(prepareMetadata(metadata), null, ' ')\n : '';\n const log = {\n [LogLevel.Render]: console.debug,\n [LogLevel.Redux]: console.debug,\n [LogLevel.Debug]: console.debug,\n [LogLevel.Info]: console.info,\n [LogLevel.Log]: console.log,\n [LogLevel.Warn]: console.warn,\n [LogLevel.Error]: console.error,\n }[level];\n if (message instanceof Error) {\n console.info(\n `${dayjs(timestamp).format('HH:mm:ss')} ${message.toString()}${extra}`,\n );\n log(message);\n } else {\n log(\n `${dayjs(timestamp).format('HH:mm:ss')} ${message?.toString()}${extra}`,\n );\n }\n};\n\nconst queuedMessages: [string, Parameters[1]][] = [];\nlet sentrySendTimeout: ReturnType | null = null;\n\nfunction queueMessageForSentry(\n message: string,\n captureContext: Parameters[1],\n) {\n queuedMessages.push([message, captureContext]);\n if (!sentrySendTimeout) {\n sentrySendTimeout = setTimeout(() => {\n sentrySendTimeout = null;\n sendQueuedMessages();\n }, 7000);\n }\n}\n\nfunction sendQueuedMessages() {\n while (queuedMessages.length > 0) {\n const record = queuedMessages.shift();\n if (record) {\n captureMessage(record[0], record[1]);\n }\n }\n}\n\nexport const sentryTransport: Transport = (\n level,\n message,\n { type, tags, ...metadata },\n timestamp,\n) => {\n const meta = prepareMetadata(metadata);\n\n if (typeof message === 'string') {\n const severity = (\n {\n [LogLevel.Debug]: 'debug',\n [LogLevel.Redux]: 'debug',\n [LogLevel.Render]: 'debug',\n [LogLevel.Info]: 'info',\n [LogLevel.Log]: 'log',\n [LogLevel.Warn]: 'warning',\n [LogLevel.Error]: 'error',\n } as const\n )[level];\n\n addBreadcrumb({\n message,\n data: meta,\n type: type || 'default',\n level: severity,\n timestamp: timestamp / 1000,\n });\n\n if (isNetworkError(message)) {\n return;\n }\n\n if (level === 'error' || level === 'warn' || level === 'log') {\n const messageLevel =\n {\n [LogLevel.Log]: 'log',\n [LogLevel.Warn]: 'warning',\n [LogLevel.Error]: 'error',\n }[level] || ('log' as any);\n queueMessageForSentry(message, {\n level: messageLevel,\n tags,\n extra: meta,\n });\n }\n } else {\n captureException(message, {\n tags,\n extra: meta,\n });\n }\n};\n\nexport class Logger {\n level = IS_DEV ? LogLevel.Debug : LogLevel.Info;\n transports: Transport[] = [];\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n constructor() {}\n\n render(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Render, `Render-${message}`, metadata);\n }\n\n redux(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Redux, `Redux-${message}`, metadata);\n }\n\n debug(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Debug, message, metadata);\n }\n\n info(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Info, message, metadata);\n }\n\n log(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Log, message, metadata);\n }\n\n warn(message: string, metadata: Metadata = {}) {\n this.transport(LogLevel.Warn, message, metadata);\n }\n\n error(error: Error | string | unknown, metadata: Metadata = {}) {\n this.transport(LogLevel.Error, error, metadata);\n }\n\n addTransport(transport: Transport) {\n this.transports.push(transport);\n return () => {\n this.transports.splice(this.transports.indexOf(transport), 1);\n };\n }\n\n protected transport(\n level: LogLevel,\n message: string | Error | unknown,\n metadata: Metadata = {},\n ) {\n const timestamp = Date.now();\n const meta = metadata || {};\n\n if (!enabledLogLevels[this.level].includes(level)) return;\n\n for (const transport of this.transports) {\n transport(level, message, meta, timestamp);\n }\n }\n}\n\nexport const logger = new Logger();\n\nif (IS_DEV) {\n logger.addTransport(consoleTransport);\n} else if (IS_PROD) {\n logger.addTransport(sentryTransport);\n}\n","import { Auth } from 'aws-amplify';\n\nimport { ApiAttributes } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\nimport { logger } from '../../../lib/logger';\n\n/**\n *\n * Updates current users attributes\n */\nexport const makeUpdateAttributesCurrentUser = async (\n data: ApiAttributes,\n): Promise => {\n try {\n logger.debug('Updating Attributes');\n const user = await Auth.currentAuthenticatedUser();\n await Auth.updateUserAttributes(user, data);\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\nimport { CognitoUser } from '@aws-amplify/auth';\n\nimport { ApiRequiredAttributes } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param user Cognito User\n * @param password New password\n * @param attributes Required attributes\n * @returns A message if successful, appropriate error otherwise\n */\nexport const makeCompleteNewPassword = async (\n user: CognitoUser,\n password: string,\n attributes: ApiRequiredAttributes,\n): Promise => {\n try {\n await Auth.completeNewPassword(user, password, {\n name: attributes.name,\n family_name: attributes.surname,\n gender: attributes.gender,\n });\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\nimport { CognitoUser } from '@aws-amplify/auth';\n\nimport { errorObject } from '../../utils/errorObject';\n\n/**\n *\n * @returns A current authenticated user\n */\nexport const makeCurrentUser = async (): Promise => {\n try {\n return await Auth.currentAuthenticatedUser();\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth, CognitoUser } from '@aws-amplify/auth';\n\nimport { ApiSignIn } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param body User credentials\n * @returns A promise of User if success, appropriate error message otherwise\n */\nexport const makeSignIn = async (body: ApiSignIn): Promise => {\n try {\n return await Auth.signIn({\n username: body.username,\n password: body.password,\n });\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @returns Returns a message about sign out\n */\nexport const makeSignOut = async (): Promise => {\n try {\n await Auth.signOut();\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from '@aws-amplify/auth';\nimport { ISignUpResult } from 'amazon-cognito-identity-js';\n\nimport { ApiSignUp } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n\n/**\n *\n * @param body The user attributes and credentials\n * @returns A promise of created user if success\n */\nexport const makeSignUp = async (body: ApiSignUp): Promise => {\n try {\n return await Auth.signUp({\n username: body.username,\n password: body.password,\n });\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param username Users username\n * @returns A string message or appropriate error\n */\nexport const makeResetPasswordRequest = async (\n username: string,\n): Promise => {\n try {\n await Auth.forgotPassword(username);\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { ApiConfirmSignUp } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param body Username and code\n * @returns A message ir appropriate error\n */\nexport const makeConfirmSignUp = async (\n body: ApiConfirmSignUp,\n): Promise => {\n try {\n await Auth.confirmSignUp(body.username, body.code);\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { ApiForgotPassword } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param body Username, code and new password\n * @returns A string message or appropriate error\n */\nexport const makeResetPasswordSubmit = async (\n body: ApiForgotPassword,\n): Promise => {\n try {\n await Auth.forgotPasswordSubmit(\n body.username,\n body.code.toString(),\n body.newPassword,\n );\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { ApiChangePassword } from '../../types/authentication';\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param body Cognito User and passwords\n * @returns A message or appropriate error\n */\nexport const makeChangePassword = async (\n body: ApiChangePassword,\n): Promise => {\n try {\n await Auth.changePassword(body.user, body.old, body.new);\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { Auth } from 'aws-amplify';\n\nimport { errorObject } from '../../utils/errorObject';\n/**\n *\n * @param username resends sign up code\n * @returns An appropriate error\n */\nexport const makeResendSignUpCode = async (\n username: string,\n): Promise => {\n try {\n await Auth.resendSignUp(username);\n return true;\n } catch (error) {\n //@ts-ignore\n return Promise.reject(errorObject[error.code]);\n }\n};\n","import { makeFederatedSignIn } from './federatedSignIn';\nimport { makeUpdateAttributesCurrentUser } from './updateUserAttributes';\nimport { makeCompleteNewPassword } from './completeNewPassword';\nimport { makeCurrentUser } from './currentUser';\nimport { makeSignIn } from './signIn';\nimport { makeSignOut } from './signOut';\nimport { makeSignUp } from './signUp';\nimport { makeResetPasswordRequest } from './resetPasswordRequest';\nimport { makeConfirmSignUp } from './confirmSignUp';\nimport { makeResetPasswordSubmit } from './resetPasswordSubmit';\nimport { makeChangePassword } from './changePassword';\nimport { makeResendSignUpCode } from './resendSignUpCode';\n\nexport const authenticationClient = {\n completeNewPassword: makeCompleteNewPassword,\n currentUser: makeCurrentUser,\n signIn: makeSignIn,\n signOut: makeSignOut,\n signUp: makeSignUp,\n resetPasswordRequest: makeResetPasswordRequest,\n confirmSignUp: makeConfirmSignUp,\n resetPasswordSubmit: makeResetPasswordSubmit,\n changePassword: makeChangePassword,\n resendSignUpCode: makeResendSignUpCode,\n updateAttributes: makeUpdateAttributesCurrentUser,\n federatedSignIn: makeFederatedSignIn,\n};\n","import { config } from '../../../../config';\nimport { LocaleType } from '../../../../types';\n\nexport type TAC = Record;\nexport const getTac = async () => {\n const res = await fetch(config.URL.aclitoTacUpdateURL);\n const data = await res.json();\n return data as TAC;\n};\n","import { config } from '../../../../config';\nimport { STATUS_ENV } from '../../../../util/constants';\n\nexport type ABody = { picture: string; url: string };\nexport type As = Record;\nexport interface StatusData {\n status: 'online' | 'offline';\n breakingChangesVersion: number;\n termsAndConditionsVersion: number;\n termsAndConditionsVersionEffectiveDate: string;\n bankAcc: string;\n as: As;\n}\n\nexport type Status = Record;\n\nexport const getStatus = async (): Promise => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const res = await fetch(config.URL.aclitoStatusURL, { cache: 'no-store' });\n const data = await res.json();\n return (data as Status)[STATUS_ENV];\n};\n","import { getTac } from './tac/getTac';\nimport { getStatus } from './status/getStatus';\n\nexport const customClient = {\n status: { getStatus },\n tac: { getTac },\n};\n","import { authenticationClient } from './requests/aws-authentication/_authenticationClient';\nimport { customClient } from './requests/custom/customClient';\n\nconst api = {\n authentication: authenticationClient,\n custom: customClient,\n};\n\nexport default api;\n","import dayjs from 'dayjs';\n\nimport { config } from '../config';\nimport { LocaleType } from '../types';\nimport { INITIAL_LOCATION, MAX_PRICE } from '../util/constants';\n\nimport {\n EventFilters,\n FirstLoad,\n SearchOrganizationStateProps,\n AuthInitialStateProps,\n SearchEventsInitialStateProps,\n NotificationsInitialStateProps,\n UserInfoInitialStateProps,\n AvailabilityDates,\n EventDates,\n NoteInitialStateProps,\n MyNoteGrantsInitialStateProps,\n FeedFilters,\n LocationInitialStateProps,\n PlaceStateProps,\n} from './types';\nconst { distance } = config;\n\nexport const FiltersInitialState = {\n activityType: { id: '', item: '' },\n from: dayjs().startOf('minutes').toISOString(),\n to: dayjs().add(3, 'months').startOf('day').toISOString(),\n gender: { id: '', item: '' },\n org: { id: '', item: '' },\n level: [{ id: '0', item: 'json.any' }],\n price: [0, MAX_PRICE],\n distance: distance.eventsDefaultDistance,\n location: undefined,\n query: undefined,\n freeOnly: true,\n tags: { adults: false, all: true, kids: false },\n isDirty: false,\n} as EventFilters;\n\nexport const LocaleInitialState: LocaleType = 'cs';\nexport const EventDatesInitialState = { date: [], endDate: [] } as EventDates;\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const UserInfoInitialState = {\n current: undefined,\n currentStats: undefined,\n orgId: undefined,\n isLoadingUpdateMyProfile: false,\n isLoadingDeleteAccount: false,\n isLoadingUpdateUserStats: false,\n isLoadingLocation: false,\n isLoadingSettings: false,\n isLoadingPopulate: false,\n} as UserInfoInitialStateProps;\n\nexport const FirstLoadInitialState = {\n isLoading: false,\n canLoadAgain: true,\n} as FirstLoad;\n\nexport const PlaceInitialState = {\n current: [],\n isLoading: false,\n error: undefined,\n} as PlaceStateProps;\n\nexport const NotificationsInitialState = {\n current: {\n items: [],\n },\n error: undefined,\n isLoading: false,\n} as NotificationsInitialStateProps;\n\nexport const SearchEventsInitialState = {\n current: {\n items: [],\n total: null,\n nextToken: null,\n aggregateItems: [],\n },\n error: undefined,\n isLoading: false,\n} as SearchEventsInitialStateProps;\n\nexport const AvailabilityDatesInitialState = {\n date: [],\n} as AvailabilityDates;\nexport const SearchOrganizationsInitialState = {\n filter: { name: '' },\n} as SearchOrganizationStateProps;\n\nexport const FeedFiltersInitialState = {\n feedOrg: { id: '', item: '' },\n} as FeedFilters;\n\nexport const AuthInitialState = {\n isLoadingSignIn: false,\n isLoadingRequestPassword: false,\n isLoadingSignUp: false,\n isLoadingSubmitPassword: false,\n isLoadingChangePassword: false,\n error: '',\n} as AuthInitialStateProps;\n\nconst { latitudeDelta, longitudeDelta, ...initialLocation } = INITIAL_LOCATION;\nexport const LocationInitialState: LocationInitialStateProps = {\n locationService: 'unset',\n liveLocation: undefined,\n userLocation: undefined,\n searchMapLocation: undefined,\n placesMapLocation: undefined,\n defaultLocation: initialLocation,\n delta: {\n latitudeDelta,\n longitudeDelta,\n },\n};\n\nexport const NoteInitialState: NoteInitialStateProps = {\n current: undefined,\n isLoading: false,\n error: undefined,\n};\n\nexport const MyNoteGrantsInitialState: MyNoteGrantsInitialStateProps = {\n current: [],\n isLoading: false,\n error: undefined,\n};\n","import axios, {\n AxiosInstance,\n AxiosRequestConfig,\n AxiosResponse,\n HeadersDefaults,\n ResponseType,\n} from 'axios';\nimport qs from 'qs';\n\nexport type QueryParamsType = Record;\n\nexport interface FullRequestParams\n extends Omit {\n path: string;\n /** content type of request body */\n type?: ContentType;\n /** query params */\n query?: QueryParamsType;\n /** format of response (i.e. response.json() -> format: \"json\") */\n format?: ResponseType;\n /** request body */\n body?: unknown;\n}\n\nexport type RequestParams = Omit<\n FullRequestParams,\n 'body' | 'method' | 'query' | 'path'\n>;\n\nexport interface ApiConfig\n extends Omit {\n secure?: boolean;\n format?: ResponseType;\n}\n\nexport enum ContentType {\n Json = 'application/json',\n FormData = 'multipart/form-data',\n UrlEncoded = 'application/x-www-form-urlencoded',\n Text = 'text/plain',\n}\n\nexport class HttpClient {\n public instance: AxiosInstance;\n private readonly format?: ResponseType;\n private readonly fetchToken: () => Promise;\n\n constructor(\n { secure, format, ...axiosConfig }: ApiConfig = {},\n fetchToken: () => Promise,\n ) {\n this.instance = axios.create({\n ...axiosConfig,\n baseURL: axiosConfig.baseURL || '',\n paramsSerializer: (params) =>\n qs.stringify(params, { arrayFormat: 'repeat' }),\n });\n this.format = format;\n this.fetchToken = fetchToken;\n\n // Add request interceptor to inject token\n this.instance.interceptors.request.use(async (config) => {\n const token = await this.fetchToken();\n if (token) {\n config.headers.set('Authorization', token);\n }\n return config;\n });\n }\n\n protected mergeRequestParams(\n params1: AxiosRequestConfig,\n params2?: AxiosRequestConfig,\n ): AxiosRequestConfig {\n const method = params1.method || (params2 && params2.method);\n\n return {\n ...this.instance.defaults,\n ...params1,\n ...(params2 || {}),\n headers: {\n ...((method &&\n this.instance.defaults.headers[\n method.toLowerCase() as keyof HeadersDefaults\n ]) ||\n {}),\n ...(params1.headers || {}),\n ...((params2 && params2.headers) || {}),\n },\n };\n }\n\n protected stringifyFormItem(formItem: unknown) {\n if (typeof formItem === 'object' && formItem !== null) {\n return JSON.stringify(formItem);\n } else {\n return `${formItem}`;\n }\n }\n\n protected createFormData(input: Record): FormData {\n return Object.keys(input || {}).reduce((formData, key) => {\n const property = input[key];\n const propertyContent: any[] =\n property instanceof Array ? property : [property];\n\n for (const formItem of propertyContent) {\n const isFileType = formItem instanceof Blob || formItem instanceof File;\n formData.append(\n key,\n isFileType ? formItem : this.stringifyFormItem(formItem),\n );\n }\n\n return formData;\n }, new FormData());\n }\n\n public request = async ({\n path,\n type,\n query,\n format,\n body,\n ...params\n }: FullRequestParams): Promise> => {\n const requestParams = this.mergeRequestParams(params);\n const responseFormat = format || this.format || undefined;\n\n if (type === ContentType.FormData && body && typeof body === 'object') {\n body = this.createFormData(body as Record);\n }\n\n if (type === ContentType.Text && body && typeof body !== 'string') {\n body = JSON.stringify(body);\n }\n\n return this.instance.request({\n method: params.method,\n headers: {\n ...(requestParams.headers || {}),\n ...(type && type !== ContentType.FormData\n ? { 'Content-Type': type }\n : {}),\n },\n params: query,\n responseType: responseFormat,\n data: body,\n url: path,\n });\n };\n}\n","import {\n CreateAliasInput,\n UpdateUserInfoInput,\n UserInfo,\n UpdateAliasInput,\n EventRaw,\n Review,\n Stats,\n Note,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\nexport class UserClient extends HttpClient {\n user = {\n getUser: () =>\n this.request<{ user: UserInfo; stats: Stats }>({\n path: '/users',\n method: 'GET',\n type: ContentType.Json,\n }),\n\n getUserReviews: (id: string) =>\n this.request({\n path: `/users/review/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n getUserStats: (id: string) =>\n this.request({\n path: `/users/stats/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n getUserProfile: (id: string) =>\n this.request<{ user: UserInfo; stats: Stats }>({\n path: `/users/profile/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n updateUser: (data: UpdateUserInfoInput) =>\n this.request({\n path: '/users',\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n initial: () =>\n this.request<{ user: UserInfo; note: Note; stats: Stats }>({\n path: '/users/initial',\n method: 'POST',\n type: ContentType.Json,\n }),\n\n deleteAccount: () =>\n this.request({\n path: '/users/account',\n method: 'DELETE',\n type: ContentType.Json,\n }),\n };\n alias = {\n deleteAlias: (id: string) =>\n this.request({\n path: `/users/alias/${id}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n\n createAlias: (body: CreateAliasInput) =>\n this.request({\n path: `/users/alias`,\n method: 'POST',\n body,\n type: ContentType.Json,\n }),\n\n updateAlias: (body: UpdateAliasInput) =>\n this.request({\n path: `/users/alias`,\n method: 'PATCH',\n body,\n type: ContentType.Json,\n }),\n };\n}\n","import {\n Chat,\n ConfirmEventParams,\n CreateAdminEventInput,\n CreateEventInput,\n Event,\n EventRaw,\n EventsByOrgParams,\n JoinLeaveEventParams,\n JoinLeaveEventRepeatingParams,\n KickFromEventParams,\n Place,\n SearchEventInput,\n UpdateEventInput,\n} from '@aclito/entities';\nimport { EventWithPlayers } from '@aclito/shared/types';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class EventClient extends HttpClient {\n admin = {\n upload: (body: CreateAdminEventInput[]) =>\n this.request({\n path: `/events/uploader`,\n method: 'POST',\n body,\n type: ContentType.Json,\n }),\n };\n\n events = {\n getEvent: (id: string) =>\n this.request({\n path: `/events/single/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n leaveProviderEvent: (id: string) =>\n this.request({\n path: `/events/provider/leave/${id}`,\n method: 'PATCH',\n type: ContentType.Json,\n }),\n\n joinProviderEvent: (id: string) =>\n this.request({\n path: `/events/provider/join/${id}`,\n method: 'PATCH',\n type: ContentType.Json,\n }),\n\n deleteEvent: (id: string) =>\n this.request({\n path: `/events/single/${id}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n\n deleteRepeatingEvent: (repId: string, id: string) =>\n this.request<{ id: string }[]>({\n path: `/events/repeating/${repId}`,\n method: 'DELETE',\n body: { id },\n type: ContentType.Json,\n }),\n\n getMyEvents: (nextToken: string | null, limit: number, orgId?: string) =>\n this.request<{ data: Event[]; nextToken: string | null }>({\n path: `/events/list`,\n method: 'GET',\n query: { nextToken, limit, orgId },\n type: ContentType.Json,\n }),\n\n getEventsByOrg: (id: string, query: EventsByOrgParams) =>\n this.request({\n path: `/events/org/${id}`,\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n\n searchEvents: (input: SearchEventInput) =>\n this.request<{\n data: EventRaw[];\n total: number;\n nextToken: string | null;\n }>({\n path: `/events/search`,\n method: 'GET',\n query: input,\n type: ContentType.Json,\n }),\n\n createEvent: (data: CreateEventInput) =>\n this.request>>({\n path: '/events',\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n\n joinEvent: (id: string, data: JoinLeaveEventParams) =>\n this.request({\n path: `/events/join/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n joinEventRepeating: (repId: string, data: JoinLeaveEventRepeatingParams) =>\n this.request<{ events: EventRaw[]; place: Place }>({\n path: `/events/join/repeating/${repId}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n leaveEvent: (id: string, data: JoinLeaveEventParams) =>\n this.request({\n path: `/events/leave/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n leaveRepeatingEvent: (repId: string, data: JoinLeaveEventRepeatingParams) =>\n this.request({\n path: `/events/leave/repeating/${repId}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n confirmEvent: (id: string, data: ConfirmEventParams) =>\n this.request({\n path: `/events/confirm/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n kickFromEvent: (id: string, data: KickFromEventParams) =>\n this.request({\n path: `/events/kick/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n updateEvent: (id: string, data: UpdateEventInput) =>\n this.request({\n path: `/events/single/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n eventHistory: () =>\n this.request({\n path: `/events/history`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n updateRepeatingEvent: (id: string, data: UpdateEventInput) =>\n this.request<{ events: EventRaw[]; place: Place }>({\n path: `/events/repeating/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n };\n}\n","export const BASE_URL = 'https://api.aclito.com';\nexport const PUBLIC_URL = `${BASE_URL}/public`;\nexport const HEALTH_URL = `${BASE_URL}/health`;\nexport const APP_URL = `${BASE_URL}/a`;\nexport const WS_URL = 'wss://ws.aclito.com';\n","import {\n CognitoAccessToken,\n CognitoIdToken,\n CognitoUserSession,\n} from 'amazon-cognito-identity-js';\nimport { Auth } from 'aws-amplify';\n\nconst GROUPS = 'cognito:groups';\nconst TAC = 'custom:termsAndConditions';\nconst LOGIN = 'custom:Login';\nconst USER_INFO = 'custom:userInfo';\nconst NAME = 'name';\nconst EMAIL = 'email';\n\nexport interface CognitoData {\n groups: Array;\n login: string;\n userInfo: string;\n email: string;\n name: string;\n surname: string;\n termsAndConditionsVersion: number;\n idToken: CognitoIdToken;\n accessToken: CognitoAccessToken;\n}\n\nconst getPayload = (session: CognitoUserSession) => {\n const p = session.getIdToken().payload;\n\n let name: string | undefined;\n let surname: string | undefined;\n\n if (p[NAME]) {\n const [n, s] = p[NAME].split(' ');\n name = n;\n surname = s;\n }\n return {\n groups: p[GROUPS],\n login: p[LOGIN],\n userInfo: p[USER_INFO],\n email: p[EMAIL] ?? '',\n termsAndConditionsVersion: p[TAC] ? Number(p[TAC]) : 0,\n name,\n surname,\n idToken: session.getIdToken(),\n accessToken: session.getAccessToken(),\n } as CognitoData;\n};\n\nconst getUserDataBySession = (session: CognitoUserSession) =>\n getPayload(session);\n\nconst getUserData = async () => {\n try {\n const session = await Auth.currentSession();\n return getPayload(session);\n } catch (e) {\n return null;\n }\n};\n\nexport { getUserData, getUserDataBySession };\n","import { getUserData } from '@aclito/shared/util/cognitoUser';\n\nexport const cognitoToken = async (): Promise => {\n let token: string | undefined;\n try {\n token = (await getUserData())?.idToken.getJwtToken();\n } catch (e) {\n token = undefined;\n }\n\n return token;\n};\n","import {\n CreateMessageInput,\n GetMessagesByEventIdParams,\n Message,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class MessageClient extends HttpClient {\n messages = {\n postMessage: (data: CreateMessageInput) =>\n this.request({\n path: `/messages`,\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n getMessagesByChatId: ({\n id,\n limit,\n nextToken,\n }: GetMessagesByEventIdParams & { id: string }) =>\n this.request<{ data: Message[]; nextToken: string | null }>({\n path: `/messages/list/${id}`,\n method: 'GET',\n query: { limit, nextToken },\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { MessageClient } from './MessageClient';\n\nconst messageClient = new MessageClient({ baseURL: APP_URL }, cognitoToken);\n\nexport default messageClient;\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { EventClient } from './EventClient';\n\nconst eventClient = new EventClient({ baseURL: APP_URL }, cognitoToken);\n\nexport default eventClient;\n","import {\n Achievement,\n AchievementOrgId,\n CreateAchievementInput,\n UpdateAchievementInput,\n UserAchievement,\n} from '@aclito/entities';\nimport { MyRank, UserRank } from '@aclito/shared/types';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class AchievementClient extends HttpClient {\n user = {\n getAllUserAchievements: (id: string, orgId?: string) =>\n this.request({\n path: `/achievements/user/${id}`,\n method: 'GET',\n query: { orgId },\n type: ContentType.Json,\n }),\n };\n rank = {\n getRank: (achievementId: string) =>\n this.request<{ rank: UserRank[]; myRanks: MyRank[] }>({\n path: `/achievements/rank/${achievementId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n achievements = {\n getAll: (orgId: AchievementOrgId) =>\n this.request({\n path: '/achievements',\n method: 'GET',\n query: { orgId },\n type: ContentType.Json,\n }),\n getOne: (id: string) =>\n this.request({\n path: `/achievements/single/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n deleteOne: (id: string) =>\n this.request({\n path: `/achievements/single/${id}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n\n create: (body: CreateAchievementInput) =>\n this.request({\n path: '/achievements',\n method: 'POST',\n body,\n }),\n updateOne: (body: UpdateAchievementInput, id: string) =>\n this.request({\n path: `/achievements/single/${id}`,\n method: 'PATCH',\n body,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { AchievementClient } from './AchievementClient';\n\nconst achievementClient = new AchievementClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default achievementClient;\n","import {\n DeleteAvailabilityInput,\n CreateAvailabilityInput,\n UpdateAvailabilityInput,\n GetAvailabilitiesByUserIdParams,\n Availability,\n Event,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class AvailabilityClient extends HttpClient {\n availabilities = {\n deleteAvailability: (data: DeleteAvailabilityInput) =>\n this.request({\n path: `/availabilities/single/${data.availabilityId}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n createAvailability: (data: CreateAvailabilityInput) =>\n this.request({\n path: '/availabilities',\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n updateAvailability: (data: UpdateAvailabilityInput) =>\n this.request({\n path: '/availabilities',\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n listAvailabilities: (query: GetAvailabilitiesByUserIdParams) =>\n this.request<{ data: Availability[]; nextToken: string | null }>({\n path: '/availabilities',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n suggestEvents: (id: string) =>\n this.request({\n path: `/availabilities/suggest/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { AvailabilityClient } from './AvailabilityClient';\n\nconst availabilityClient = new AvailabilityClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default availabilityClient;\n","import {\n Chat,\n GetChatByEventIdInput,\n GetChatByIdInput,\n ChatIdInput,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class ChatClient extends HttpClient {\n chats = {\n getChatByEventId: (data: GetChatByEventIdInput) =>\n this.request({\n path: `/chat/hash/${data.eventId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n getChatById: (data: GetChatByIdInput) =>\n this.request({\n path: `/chat/single/${data.id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n leaveChat: (data: ChatIdInput) =>\n this.request({\n path: `/chat/leave/${data.id}`,\n method: 'PATCH',\n type: ContentType.Json,\n }),\n joinChat: (data: ChatIdInput) =>\n this.request({\n path: `/chat/join/${data.id}`,\n method: 'PATCH',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { ChatClient } from './ChatClient';\n\nconst chatClient = new ChatClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default chatClient;\n","import { CreateReportInput, Report } from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class ReportClient extends HttpClient {\n reports = {\n createReport: (data: CreateReportInput) =>\n this.request({\n path: '/report',\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { ReportClient } from './ReportClient';\n\nconst reportClient = new ReportClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default reportClient;\n","import {\n CreateFeedInput,\n DeleteFeedInput,\n FeedRaw,\n UpdateFeedInput,\n GetFeedByFeedOrgIdParams,\n GetMyFeedQueryParams,\n Feed,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class FeedClient extends HttpClient {\n feeds = {\n createFeed: (data: CreateFeedInput) =>\n this.request({\n path: '/feed',\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n deleteFeed: (data: DeleteFeedInput) =>\n this.request({\n path: '/feed',\n method: 'DELETE',\n body: data,\n type: ContentType.Json,\n }),\n updateFeed: (data: UpdateFeedInput) =>\n this.request({\n path: '/feed',\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n listFeedsByOrg: (query: GetFeedByFeedOrgIdParams) =>\n this.request({\n path: '/feed',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n getFeed: (id: string) =>\n this.request({\n path: `/feed/single/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n searchMyFeeds: (query: GetMyFeedQueryParams) =>\n this.request({\n path: '/feed/my-feeds',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { FeedClient } from './FeedClient';\n\nconst feedClient = new FeedClient({ baseURL: APP_URL }, cognitoToken);\n\nexport default feedClient;\n","import {\n CreateOrganizationInput,\n DeleteOrganizationInput,\n GetAllOrganizationsParams,\n GetMyOrganizationsParams,\n GetOrganizationParams,\n Organization,\n UpdateOrganizationInput,\n UserInfo,\n UpdateOrganizationMemberParams,\n JoinOrgBodyInput,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class OrganizationClient extends HttpClient {\n admin = {\n getAll: () =>\n this.request({\n path: '/organization/admin/all-orgs',\n method: 'GET',\n type: ContentType.Json,\n }),\n updateRegistration: (id: string, isRegistered: boolean) =>\n this.request({\n path: `/organization/admin/registration/${id}`,\n method: 'PATCH',\n body: { isRegistered },\n type: ContentType.Json,\n }),\n getInvoice: (id: string) =>\n this.request({\n path: `/organization/admin/invoice/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n organizations = {\n createOrganization: (data: CreateOrganizationInput) =>\n this.request({\n path: '/organization',\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n\n updateOrganization: (data: UpdateOrganizationInput) =>\n this.request({\n path: '/organization',\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n joinOrganization: (orgId: string, query: JoinOrgBodyInput) =>\n this.request({\n path: `/organization/join/${orgId}`,\n method: 'PATCH',\n query,\n type: ContentType.Json,\n }),\n\n leaveOrganization: (orgId: string, data: { message: string }) =>\n this.request({\n path: `/organization/leave/${orgId}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n\n updateOrganizationMember: (\n orgId: string,\n data: UpdateOrganizationMemberParams,\n ) =>\n this.request({\n path: `/organization/role/${orgId}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n deleteOrganization: (data: DeleteOrganizationInput) =>\n this.request({\n path: `/organization/single/${data.orgId}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n getOrganization: (query: GetOrganizationParams) =>\n this.request<{\n org: Organization;\n members: UserInfo[];\n }>({\n path: `/organization/single/${query.orgId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n getMyOrganizations: (query: GetMyOrganizationsParams) =>\n this.request<{ data: Organization[]; nextToken: string }>({\n path: '/organization/my-orgs',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n getAllOrganizations: (query: GetAllOrganizationsParams) =>\n this.request<{ data: Organization[]; nextToken: string | null }>({\n path: '/organization/all-orgs',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { OrganizationClient } from './OrganizationClient';\n\nconst organizationClient = new OrganizationClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default organizationClient;\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { UserClient } from './UserClient';\n\nconst userClient = new UserClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default userClient;\n","import {\n CreatePlaceInput,\n ListPlaceInput,\n Place,\n UpdatePlaceInput,\n AdminListPlaceInput,\n AdminUpdatePlaceInput,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class PlaceClient extends HttpClient {\n admin = {\n provider: (query: AdminListPlaceInput) =>\n this.request({\n path: '/places/admin/list',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n all: () =>\n this.request({\n path: '/places/admin/all',\n method: 'GET',\n type: ContentType.Json,\n }),\n update: (data: AdminUpdatePlaceInput, id: string) =>\n this.request({\n path: `/places/admin/${id}`,\n method: 'PATCH',\n body: data,\n type: ContentType.Json,\n }),\n };\n\n places = {\n list: (query: ListPlaceInput) =>\n this.request({\n path: '/places/list',\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n create: (body: CreatePlaceInput) =>\n this.request({\n path: '/places',\n method: 'POST',\n body,\n type: ContentType.Json,\n }),\n update: (id: string, body: UpdatePlaceInput) =>\n this.request({\n path: `/places/single/${id}`,\n method: 'PATCH',\n body,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { PlaceClient } from './PlaceClient';\n\nconst placeClient = new PlaceClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default placeClient;\n","import { Note, NoteGrant, UpdateNoteInput } from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class NotesClient extends HttpClient {\n notes = {\n getNote: (id: string, query?: { orgId: string }) =>\n this.request({\n path: `/notes/${id}`,\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n\n patchNote: (body: UpdateNoteInput) =>\n this.request({\n path: `/notes`,\n method: 'PATCH',\n body,\n type: ContentType.Json,\n }),\n };\n grants = {\n getGrants: () =>\n this.request({\n path: `/notes/grants`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { NotesClient } from './NotesClient';\n\nconst notesClient = new NotesClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default notesClient;\n","import type { DeleteNotificationInput, Notification } from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class NotificationClient extends HttpClient {\n notifications = {\n deleteOne: (data: DeleteNotificationInput) =>\n this.request({\n path: `/notifications/single/${data.id}`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n\n listNotifications: () =>\n this.request({\n path: `/notifications/list`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n deleteAll: () =>\n this.request({\n path: `/notifications`,\n method: 'DELETE',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { NotificationClient } from './NotificationClient';\n\nconst notificationClient = new NotificationClient(\n { baseURL: APP_URL },\n cognitoToken,\n);\n\nexport default notificationClient;\n","import { ContentType, HttpClient } from '../httpClient';\n\nexport class ReservantoClient extends HttpClient {\n reservanto = {\n createReservantoToken: (token: string) =>\n this.request({\n path: `/reservanto/${token}`,\n method: 'POST',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { ReservantoClient } from './ReservantoClient';\n\nconst reservantoClient = new ReservantoClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default reservantoClient;\n","import {\n PaymentWithProduct,\n PaymentLog,\n Product,\n Payment,\n CreateProductInput,\n UpdateProductInput,\n CreatePaymentInput,\n Credit,\n EventRaw,\n Currency,\n UserInfo,\n PaymentPaid,\n PaymentStatusInput,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class PaymentClient extends HttpClient {\n status = {\n check: (eventId: string, body: PaymentStatusInput) =>\n this.request({\n path: `/payment/status/${eventId}`,\n method: 'POST',\n body,\n type: ContentType.Json,\n }),\n };\n log = {\n user: () =>\n this.request<{ logs: PaymentLog[] }>({\n path: `/payment/log`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n\n credit = {\n user: () =>\n this.request>({\n path: `/payment/credit`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n\n admin = {\n stats: (id: string, startDate: string, endDate: string) =>\n this.request<{\n payments: Payment[];\n events: EventRaw[];\n users: UserInfo[];\n products: Product[];\n }>({\n path: `/payment/admin/stats/${id}`,\n method: 'GET',\n query: {\n startDate,\n endDate,\n },\n type: ContentType.Json,\n }),\n };\n\n org = {\n stats: (id: string, startDate: string, endDate: string) =>\n this.request<{\n payments: Payment[];\n events: EventRaw[];\n users: UserInfo[];\n products: Product[];\n }>({\n path: `/payment/stats/${id}`,\n method: 'GET',\n query: {\n startDate,\n endDate,\n },\n type: ContentType.Json,\n }),\n };\n\n payment = {\n user: () =>\n this.request<{ payments: PaymentWithProduct[] }>({\n path: `/payment/payments`,\n method: 'GET',\n type: ContentType.Json,\n }),\n product: (productId: string) =>\n this.request<{ payments: Payment[]; events: EventRaw[] }>({\n path: `/payment/paid/${productId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n cancel: (paymentId: string) =>\n this.request({\n path: `/payment/cancel/${paymentId}`,\n method: 'PATCH',\n type: ContentType.Json,\n }),\n create: (body: CreatePaymentInput) =>\n this.request({\n path: `/payment/payments`,\n method: 'POST',\n body,\n type: ContentType.Json,\n }),\n };\n product = {\n org: (orgId: string) =>\n this.request({\n path: `/product/list/${orgId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n product: (productId: string) =>\n this.request({\n path: `/product/single/${productId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n create: (form: CreateProductInput) =>\n this.request({\n path: '/product',\n method: 'POST',\n body: form,\n type: ContentType.Json,\n }),\n discontinue: (id: string) =>\n this.request({\n path: `/product/discontinue/${id}`,\n method: 'POST',\n type: ContentType.Json,\n }),\n update: (form: UpdateProductInput) =>\n this.request({\n path: '/product',\n method: 'PATCH',\n body: form,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { PaymentClient } from './PaymentClient';\n\nconst paymentClient = new PaymentClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default paymentClient;\n","import { EventWithPlayers } from '@aclito/shared/types';\nimport {\n EmittedEmojiBatchFeedbackEvent,\n EmittedFeedbackEvent,\n EmojiByOrgMap,\n Event,\n FeedbackEvent,\n} from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class FeedbackClient extends HttpClient {\n org = {\n byOrg: (orgId: string) =>\n this.request({\n path: `/feedback/byOrgId/${orgId}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n };\n\n feedback = {\n getEvents: (orgId?: string) =>\n this.request({\n path: '/feedback/list',\n method: 'GET',\n query: { orgId },\n type: ContentType.Json,\n }),\n\n getEvent: (id: string) =>\n this.request({\n path: `/feedback/single/${id}`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n emit: (data: EmittedFeedbackEvent) =>\n this.request({\n path: `/feedback/emit`,\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n\n emitEmojiBatch: (data: EmittedEmojiBatchFeedbackEvent) =>\n this.request({\n path: `/feedback/emitEmojiBatch`,\n method: 'POST',\n body: data,\n type: ContentType.Json,\n }),\n\n finish: (id: string) =>\n this.request({\n path: `/feedback/finish/${id}`,\n method: 'POST',\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { FeedbackClient } from './FeedbackClient';\n\nconst feedbackClient = new FeedbackClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default feedbackClient;\n","import type { CreateClickReferralInput } from '@aclito/validators';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class ReferralClient extends HttpClient {\n referral = {\n click: (data: CreateClickReferralInput) =>\n this.request({\n path: '/referral/click',\n method: 'POST',\n query: data,\n type: ContentType.Json,\n }),\n };\n}\n","import { APP_URL } from '../utils/constants';\nimport { cognitoToken } from '../cognitoToken';\n\nimport { ReferralClient } from './ReferralClient';\n\nconst referralClient = new ReferralClient(\n {\n baseURL: APP_URL,\n },\n cognitoToken,\n);\n\nexport default referralClient;\n","import { EventRaw, EventsByOrgParams } from '@aclito/entities';\n\nimport { ContentType, HttpClient } from '../httpClient';\n\nexport class PublicClient extends HttpClient {\n public = {\n landing: () =>\n this.request({\n path: `/landing`,\n method: 'GET',\n type: ContentType.Json,\n }),\n\n calendar: (id: string, query: EventsByOrgParams) =>\n this.request({\n path: `/calendar/${id}`,\n method: 'GET',\n query,\n type: ContentType.Json,\n }),\n };\n}\n","import { PUBLIC_URL } from '../utils/constants';\n\nimport { PublicClient } from './PublicClient';\n\nconst publicClient = new PublicClient(\n {\n baseURL: PUBLIC_URL,\n },\n async () => {\n return undefined;\n },\n);\n\nexport default publicClient;\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { notesClient } from '@aclito/client';\nimport { Note, NoteGrant } from '@aclito/entities';\nimport axios from 'axios';\n\nimport { ThunkType } from '../types';\nimport { AppState } from '../store';\n\nexport const REDUX_SAVE_NOTE = 'noteSave';\nexport const REDUX_GET_NOTE = 'noteGet';\nexport const REDUX_GET_NOTE_USER = 'noteGetUser';\nexport const REDUX_GET_MY_GRANTS = 'myNoteGrants';\nexport const REDUX_CLEAR_NOTE = 'clearNotes';\n\nexport const saveNoteAsync = createAsyncThunk<\n Note,\n { tel: string; email: string },\n ThunkType\n>(REDUX_SAVE_NOTE, async (args, thunkAPI) => {\n const { tel, email } = args;\n try {\n return (\n await notesClient.notes.patchNote({\n tel: tel,\n email: email,\n })\n ).data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const clearNoteAsync = createAsyncThunk(\n REDUX_CLEAR_NOTE,\n async (_, thunkAPI) => {\n try {\n await notesClient.notes.patchNote({\n tel: '',\n email: '',\n });\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n\nexport const getNoteAsync = createAsyncThunk(\n REDUX_GET_NOTE,\n async (_, thunkAPI) => {\n const { userInfo } = thunkAPI.getState() as AppState;\n\n try {\n const res = await notesClient.notes.getNote(userInfo.current.id);\n\n return res.data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n\nexport const getNoteForUserAsync = createAsyncThunk<\n Note | undefined,\n { id: string; orgId: string },\n ThunkType\n>(REDUX_GET_NOTE_USER, async ({ id, orgId }, thunkAPI) => {\n try {\n const data = await notesClient.notes.getNote(id, { orgId });\n return data.data;\n } catch (error) {\n if (axios.isAxiosError(error)) {\n if (error.response?.status === 403) {\n return thunkAPI.rejectWithValue({\n type: 'permission',\n payload: 'forbidden',\n });\n }\n return thunkAPI.rejectWithValue({\n type: 'fail',\n });\n }\n\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const getMyNoteGrants = createAsyncThunk(\n REDUX_GET_MY_GRANTS,\n async (_, thunkAPI) => {\n try {\n const data = await notesClient.grants.getGrants();\n return data.data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { Note, NoteGrant } from '@aclito/entities';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport { MyNoteGrantsInitialState, NoteInitialState } from '../initialStates';\nimport {\n clearNoteAsync,\n getMyNoteGrants,\n getNoteAsync,\n getNoteForUserAsync,\n saveNoteAsync,\n} from '../thunks/noteThunks';\nimport { AppState } from '../store';\n\nexport const REDUX_NOTE = 'note';\nexport const REDUX_MY_GRANTS = 'myGrants';\nconst SliceNote = createSlice({\n name: REDUX_NOTE,\n initialState: NoteInitialState,\n reducers: {\n [REDUX_RESET + REDUX_NOTE]: () => NoteInitialState,\n\n setNote: (state, payload: PayloadAction) => {\n state.current = payload.payload;\n },\n },\n\n extraReducers: (builder) => {\n builder.addCase(clearNoteAsync.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(clearNoteAsync.fulfilled, (state) => {\n state.isLoading = false;\n if (state.current) {\n state.current.tel = '';\n state.current.email = '';\n }\n });\n builder.addCase(clearNoteAsync.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(getNoteAsync.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getNoteAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n state.current = action.payload;\n });\n builder.addCase(saveNoteAsync.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(saveNoteAsync.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(saveNoteAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n state.current = action.payload;\n });\n builder.addCase(getNoteAsync.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(getNoteForUserAsync.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getNoteForUserAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n state.current = action.payload;\n });\n builder.addCase(getNoteForUserAsync.rejected, (state) => {\n state.isLoading = false;\n state.current = undefined;\n });\n },\n});\n\nconst SliceMyNoteGrants = createSlice({\n name: REDUX_MY_GRANTS,\n initialState: MyNoteGrantsInitialState,\n reducers: {\n [REDUX_RESET + REDUX_MY_GRANTS]: () => MyNoteGrantsInitialState,\n addGrant: (state, payload: PayloadAction) => {\n state.current.push(payload.payload);\n },\n },\n\n extraReducers: (builder) => {\n builder.addCase(getMyNoteGrants.pending, (state) => {\n state.isLoading = true;\n });\n builder.addCase(getMyNoteGrants.fulfilled, (state, payload) => {\n state.current = payload.payload;\n state.isLoading = false;\n });\n builder.addCase(getMyNoteGrants.rejected, (state) => {\n state.isLoading = false;\n state.current = [];\n });\n },\n});\n\nexport const noteActions = {\n ...SliceNote.actions,\n ...SliceMyNoteGrants.actions,\n saveNoteAsync,\n clearNoteAsync,\n getMyNoteGrants,\n getNoteAsync,\n getNoteForUserAsync,\n};\nexport const noteReducers = {\n [REDUX_NOTE]: SliceNote.reducer,\n [REDUX_MY_GRANTS]: SliceMyNoteGrants.reducer,\n};\n\nexport const noteSelectors = {\n isLoading: (state: AppState) => state.note.isLoading,\n notes: (state: AppState) => state.note.current,\n myGrants: (state: AppState) => state.myGrants.current,\n isLoadingGrants: (state: AppState) => state.myGrants.isLoading,\n};\n","import { UnknownAction } from 'redux';\nimport { Dispatch } from 'react';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport {\n authActions,\n commonActions,\n eventActions,\n profileActions,\n notificationActions,\n availabilityActions,\n organizationsActions,\n locationActions,\n} from '../slices';\nimport { aclitoApi } from '../api';\nimport { noteActions } from '../slices/noteSlices';\n\nexport const flushState = (dispatch: Dispatch) => {\n Object.keys(authActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(authActions[fn]()));\n Object.keys(commonActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(commonActions[fn]()));\n Object.keys(eventActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(eventActions[fn]()));\n Object.keys(profileActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(profileActions[fn]()));\n Object.keys(notificationActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(notificationActions[fn]()));\n Object.keys(availabilityActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(availabilityActions[fn]()));\n Object.keys(organizationsActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(organizationsActions[fn]()));\n Object.keys(locationActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(locationActions[fn]()));\n Object.keys(noteActions)\n .filter((key) => key.startsWith(REDUX_RESET))\n //@ts-ignore\n .forEach((fn) => dispatch(noteActions[fn]()));\n dispatch(aclitoApi.util.resetApiState());\n};\n","import api from '../api/api';\nimport { ApiAttributes } from '../api/types/authentication';\n\nexport const currentUser = () => api.authentication.currentUser();\n\nexport const updateAttributes = (data: ApiAttributes) =>\n api.authentication.updateAttributes(data);\n","import { CognitoHostedUIIdentityProvider } from '@aws-amplify/auth/lib/types';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\n\nimport api from '../../api/api';\nimport {\n ApiChangePassword,\n ApiForgotPassword,\n ApiSignIn,\n ApiSignUp,\n} from '../../api/types/authentication';\nimport { ThunkAuthType } from '../types';\nimport { flushState } from '../utils/flushState';\nimport { ApiAuthErrors } from '../../api/types/types';\nimport { currentUser } from '../../util/helpersApi';\nimport { logger } from '../../lib/logger';\n\nexport const REDUX_AUTH_SIGN_IN = 'signIn';\nexport const REDUX_AUTH_SIGN_UP = 'signUp';\nexport const REDUX_AUTH_RQ_NEW_PSWD = 'requestNewPassword';\nexport const REDUX_AUTH_SUBMIT_NEW_PSWD = 'submitNewPassword';\nexport const REDUX_AUTH_CHANGE_PASSWORD = 'changePassword';\nexport const REDUX_AUTH_SIGN_OUT = 'signOut';\nexport const REDUX_AUTH_FEDERATED = 'federatedSignIn';\n\nexport const signInAsync = createAsyncThunk(\n REDUX_AUTH_SIGN_IN,\n async (data, thunkAPI) => {\n try {\n await api.authentication.signIn(data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n },\n);\n\nexport const singUpAsync = createAsyncThunk(\n REDUX_AUTH_SIGN_UP,\n async (data, thunkAPI) => {\n try {\n await api.authentication.signUp(data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n },\n);\n\nexport const requestNewPasswordAsync = createAsyncThunk<\n void,\n string,\n ThunkAuthType\n>(REDUX_AUTH_RQ_NEW_PSWD, async (data, thunkAPI) => {\n try {\n await api.authentication.resetPasswordRequest(data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n});\n\nexport const submitNewPasswordAsync = createAsyncThunk<\n void,\n ApiForgotPassword,\n ThunkAuthType\n>(REDUX_AUTH_SUBMIT_NEW_PSWD, async (data, thunkAPI) => {\n try {\n await api.authentication.resetPasswordSubmit(data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n});\n\nexport const changePasswordAsync = createAsyncThunk<\n void,\n Omit,\n ThunkAuthType\n>(REDUX_AUTH_CHANGE_PASSWORD, async (data, thunkAPI) => {\n try {\n const user = await currentUser();\n await api.authentication.changePassword({ user, ...data });\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n});\n\nexport const signOutAsync = createAsyncThunk(\n REDUX_AUTH_SIGN_OUT,\n async (_, thunkAPI) => {\n try {\n logger.debug('Flushing');\n await api.authentication.signOut();\n\n flushState(thunkAPI.dispatch);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n },\n);\n\nexport const federatedSignInAsync = createAsyncThunk<\n void,\n CognitoHostedUIIdentityProvider,\n ThunkAuthType\n>(REDUX_AUTH_FEDERATED, async (data, thunkAPI) => {\n try {\n await api.authentication.federatedSignIn(data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: error as ApiAuthErrors });\n }\n});\n","import { createSlice, isAnyOf, PayloadAction } from '@reduxjs/toolkit';\n\nimport {\n signOutAsync,\n federatedSignInAsync,\n requestNewPasswordAsync,\n signInAsync,\n singUpAsync,\n submitNewPasswordAsync,\n REDUX_AUTH_RQ_NEW_PSWD,\n REDUX_AUTH_SUBMIT_NEW_PSWD,\n REDUX_AUTH_SIGN_IN,\n REDUX_AUTH_SIGN_UP,\n changePasswordAsync,\n REDUX_AUTH_CHANGE_PASSWORD,\n} from '../thunks/authThunks';\nimport { REDUX_RESET } from '../../util/constants';\nimport { AuthInitialState } from '../initialStates';\nimport { AppState } from '../store';\n\nexport const REDUX_FIRST_TIME = 'firstTimeLogin';\nexport const REDUX_AUTH = 'auth';\n\nconst SliceIsFirstTime = createSlice({\n name: REDUX_FIRST_TIME,\n initialState: false,\n reducers: {\n updateIsFirstTime: (_, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_FIRST_TIME]: () => false,\n },\n});\n\nconst SliceAuth = createSlice({\n name: REDUX_AUTH,\n initialState: AuthInitialState,\n reducers: {\n [REDUX_RESET + REDUX_AUTH]: () => AuthInitialState,\n },\n extraReducers: (builder) => {\n builder.addMatcher(\n isAnyOf(\n signInAsync.pending,\n singUpAsync.pending,\n requestNewPasswordAsync.pending,\n submitNewPasswordAsync.pending,\n changePasswordAsync.pending,\n ),\n (state, action) => {\n switch (action.type.split('/')[0]) {\n case REDUX_AUTH_SIGN_IN:\n state.isLoadingSignIn = true;\n break;\n case REDUX_AUTH_SIGN_UP:\n state.isLoadingSignUp = true;\n break;\n case REDUX_AUTH_RQ_NEW_PSWD:\n state.isLoadingRequestPassword = true;\n break;\n case REDUX_AUTH_SUBMIT_NEW_PSWD:\n state.isLoadingSubmitPassword = true;\n break;\n case REDUX_AUTH_CHANGE_PASSWORD:\n state.isLoadingChangePassword = true;\n break;\n default:\n break;\n }\n },\n );\n\n builder.addMatcher(\n isAnyOf(\n signInAsync.fulfilled,\n singUpAsync.fulfilled,\n requestNewPasswordAsync.fulfilled,\n submitNewPasswordAsync.fulfilled,\n changePasswordAsync.fulfilled,\n ),\n (state, action) => {\n switch (action.type.split('/')[0]) {\n case REDUX_AUTH_SIGN_IN:\n state.isLoadingSignIn = false;\n break;\n case REDUX_AUTH_SIGN_UP:\n state.isLoadingSignUp = false;\n break;\n case REDUX_AUTH_RQ_NEW_PSWD:\n state.isLoadingRequestPassword = false;\n break;\n case REDUX_AUTH_SUBMIT_NEW_PSWD:\n state.isLoadingSubmitPassword = false;\n break;\n case REDUX_AUTH_CHANGE_PASSWORD:\n state.isLoadingChangePassword = false;\n break;\n default:\n break;\n }\n },\n );\n\n builder.addMatcher(\n isAnyOf(\n signInAsync.rejected,\n singUpAsync.rejected,\n submitNewPasswordAsync.rejected,\n requestNewPasswordAsync.rejected,\n changePasswordAsync.rejected,\n ),\n (state, action) => {\n state.isLoadingSignIn = false;\n state.isLoadingSignUp = false;\n state.isLoadingRequestPassword = false;\n state.isLoadingSubmitPassword = false;\n state.isLoadingChangePassword = false;\n state.error = action?.payload?.type ?? '';\n },\n );\n },\n});\n\nexport const authActions = {\n ...SliceIsFirstTime.actions,\n ...SliceAuth.actions,\n signInAsync,\n singUpAsync,\n requestNewPasswordAsync,\n submitNewPasswordAsync,\n changePasswordAsync,\n signOutAsync,\n federatedSignInAsync,\n};\n\nexport const authReducers = {\n [REDUX_FIRST_TIME]: SliceIsFirstTime.reducer,\n [REDUX_AUTH]: SliceAuth.reducer,\n};\n\nexport const authSelectors = {\n firstTimeLogin: (state: AppState) => state.firstTimeLogin,\n isLoadingSignIn: (state: AppState) => state.auth.isLoadingSignIn,\n isLoadingSignUp: (state: AppState) => state.auth.isLoadingSignUp,\n isLoadingChangePassword: (state: AppState) =>\n state.auth.isLoadingChangePassword,\n isLoadingSubmitPassword: (state: AppState) =>\n state.auth.isLoadingSubmitPassword,\n isLoadingRequestPassword: (state: AppState) =>\n state.auth.isLoadingRequestPassword,\n};\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nimport { FirstLoad } from '../types';\nimport { FirstLoadInitialState, LocaleInitialState } from '../initialStates';\nimport { REDUX_RESET } from '../../util/constants';\nimport { LocaleType } from '../../types';\nimport { AppState } from '../store';\nimport { StatusData } from '../../api/requests/custom/status/getStatus';\n\nexport const REDUX_LOCALE = 'locale';\nexport const REDUX_CURRENT_SCREEN = 'currentScreen';\nexport const REDUX_CONNECTED = 'netConnected';\nexport const REDUX_FIRST_LOAD = 'isFirstLoaded';\nexport const REDUX_IS_SEARCH_OPEN = 'isSearchOpen';\nexport const REDUX_REFERRAL = 'referral';\nexport const REDUX_STATUS = 'status';\n\nconst SliceLocale = createSlice({\n name: REDUX_LOCALE,\n initialState: LocaleInitialState,\n reducers: {\n updateLocale: (\n _,\n action: PayloadAction<{\n locale: LocaleType;\n }>,\n ) => action.payload.locale || 'cs',\n },\n});\n\n// This is cached status, might not be up-to date, use with caution.\nconst SliceStatus = createSlice({\n name: REDUX_STATUS,\n initialState: null as StatusData | null,\n reducers: {\n updateStatus: (\n _,\n action: PayloadAction<{\n status: StatusData;\n }>,\n ) => action.payload.status,\n },\n});\n\ntype ReferralState = { ref: string; entityId: string };\nconst SliceReferral = createSlice({\n name: REDUX_REFERRAL,\n initialState: null as null | ReferralState,\n reducers: {\n setReferral: (_, action: PayloadAction) =>\n action.payload,\n },\n});\n\nconst SliceCurrentScreen = createSlice({\n name: REDUX_CURRENT_SCREEN,\n initialState: '',\n reducers: {\n updateCurrentScreen: (_, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_CURRENT_SCREEN]: () => '',\n },\n});\n\nconst SliceNetConnected = createSlice({\n name: REDUX_CONNECTED,\n initialState: true,\n reducers: {\n updateNetConnected: (_, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_CONNECTED]: () => true,\n },\n});\n\nconst SliceFirstLoad = createSlice({\n name: REDUX_FIRST_LOAD,\n initialState: FirstLoadInitialState,\n reducers: {\n updateFirstLoad: (_, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_FIRST_LOAD]: () => FirstLoadInitialState,\n },\n});\n\nconst SliceIsSearchOpen = createSlice({\n name: REDUX_IS_SEARCH_OPEN,\n initialState: false,\n reducers: {\n setIsSearchOpen: (_, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_IS_SEARCH_OPEN]: () => false,\n },\n});\n\nexport const commonActions = {\n ...SliceLocale.actions,\n ...SliceCurrentScreen.actions,\n ...SliceNetConnected.actions,\n ...SliceFirstLoad.actions,\n ...SliceIsSearchOpen.actions,\n ...SliceReferral.actions,\n ...SliceStatus.actions,\n};\n\nexport const commonReducers = {\n [REDUX_LOCALE]: SliceLocale.reducer,\n [REDUX_REFERRAL]: SliceReferral.reducer,\n [REDUX_CURRENT_SCREEN]: SliceCurrentScreen.reducer,\n [REDUX_IS_SEARCH_OPEN]: SliceIsSearchOpen.reducer,\n [REDUX_CONNECTED]: SliceNetConnected.reducer,\n [REDUX_FIRST_LOAD]: SliceFirstLoad.reducer,\n [REDUX_STATUS]: SliceStatus.reducer,\n};\n\nexport const commonSelectors = {\n locale: (state: AppState) => state.locale as LocaleType,\n currentScreen: (state: AppState) => state.currentScreen,\n isSearchOpen: (state: AppState) => state.isSearchOpen,\n netConnected: (state: AppState) => state.netConnected,\n isFirstLoaded: (state: AppState) => state.isFirstLoaded,\n canLoadAgain: (state: AppState) => state.isFirstLoaded.canLoadAgain,\n status: (state: AppState) => state.status,\n};\n","import { AppThunk, EventFilters } from '../types';\nimport { eventActions } from '../slices';\n\nexport const REDUX_FIND_EVENT = 'findEvent';\nexport const REDUX_JOIN_REPEATING_EVENTS = 'joinRepeatingEvents';\nexport const REDUX_DELETE_REPEATING_EVENTS = 'deleteRepeatingEvents';\nexport const REDUX_UPDATE_REPEATING_EVENTS = 'updateRepeatingEvents';\nexport const REDUX_UPDATE_EVENT_AS_FINISHED = 'updateEventAsFinished';\nexport const REDUX_LOAD_SEARCH_EVENTS = 'loadSearchEvents';\n\nexport const applyFilters =\n (values: EventFilters): AppThunk =>\n (dispatch) => {\n dispatch(eventActions.updateFilter(values));\n };\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { Event } from '@aclito/entities';\n\nimport { applyFilters } from '../thunks/eventThunks';\nimport {\n EventDatesInitialState,\n FiltersInitialState,\n SearchEventsInitialState,\n} from '../initialStates';\nimport { EventDates, EventFilters } from '../types';\nimport { REDUX_RESET } from '../../util/constants';\nimport { AppState } from '../store';\n\nexport const REDUX_FILTERED_EVENTS = 'filteredEvents';\nexport const REDUX_EVENT_DATES = 'eventDates';\nexport const REDUX_FILTERS = 'searchFilters';\n\nconst SliceFilters = createSlice({\n name: REDUX_FILTERS,\n initialState: FiltersInitialState,\n reducers: {\n updateFilter: (_, action: PayloadAction) => {\n return action.payload;\n },\n clearFilter: () => FiltersInitialState,\n [REDUX_RESET + REDUX_FILTERS]: () => FiltersInitialState,\n },\n});\n\nconst SliceSearchEvents = createSlice({\n name: REDUX_FILTERED_EVENTS,\n initialState: SearchEventsInitialState,\n reducers: {\n updateSearchEvents: (state, action: PayloadAction) => ({\n ...state,\n current: { ...state.current, items: action.payload },\n }),\n resetToken: (state) => {\n if (state.current) {\n state.current.nextToken = null;\n }\n },\n },\n [REDUX_RESET + REDUX_FILTERED_EVENTS]: () => SearchEventsInitialState,\n});\n\nconst SliceEventDates = createSlice({\n name: REDUX_EVENT_DATES,\n initialState: EventDatesInitialState,\n reducers: {\n updateEventDates: (_, action: PayloadAction) => action.payload,\n removeEventDates: (state, action: PayloadAction) => {\n state.date = [...state.date].filter((_, i) => action.payload !== i);\n },\n [REDUX_RESET + REDUX_EVENT_DATES]: () => EventDatesInitialState,\n },\n});\n\nexport const eventActions = {\n ...SliceEventDates.actions,\n ...SliceFilters.actions,\n ...SliceSearchEvents.actions,\n applyFilters,\n};\n\nexport const eventReducers = {\n [REDUX_FILTERED_EVENTS]: SliceSearchEvents.reducer,\n [REDUX_FILTERS]: SliceFilters.reducer,\n [REDUX_EVENT_DATES]: SliceEventDates.reducer,\n};\n\nexport const eventSelectors = {\n searchFilters: (state: AppState) => state.searchFilters,\n eventDates: (state: AppState) => state.eventDates,\n};\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { notificationClient } from '@aclito/client';\nimport { Notification } from '@aclito/entities';\n\nimport { ThunkType } from '../types';\n\nexport const REDUX_LOAD_NOTIFICATIONS = 'loadNotifications';\nexport const REDUX_DELETE_DB_NOTIFICATION = 'deleteDNotification';\nexport const REDUX_DELETE_ALL_NOTIFICATIONS = 'deleteAllNotifications';\n\nexport const loadNotificationsAsync = createAsyncThunk<\n Notification[],\n void,\n ThunkType\n>(REDUX_LOAD_NOTIFICATIONS, async (_, thunkAPI) => {\n try {\n const res = await notificationClient.notifications.listNotifications();\n return res.data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const deleteAllNotificationsAsync = createAsyncThunk<\n void,\n void,\n ThunkType\n>(REDUX_DELETE_ALL_NOTIFICATIONS, async (_, thunkAPI) => {\n try {\n await notificationClient.notifications.deleteAll();\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const deleteDBNotificationAsync = createAsyncThunk<\n string,\n string,\n ThunkType\n>(REDUX_DELETE_DB_NOTIFICATION, async (data, thunkAPI) => {\n try {\n await notificationClient.notifications.deleteOne({ id: data });\n return data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n","import {\n createSelector,\n createSlice,\n isAnyOf,\n PayloadAction,\n} from '@reduxjs/toolkit';\nimport { Notification } from '@aclito/entities';\n\nimport { NotificationsInitialState } from '../initialStates';\nimport { REDUX_RESET } from '../../util/constants';\nimport {\n deleteAllNotificationsAsync,\n deleteDBNotificationAsync,\n loadNotificationsAsync,\n} from '../thunks/notificationThunks';\nimport { AppState } from '../store';\n\nexport const REDUX_NOTIFICATIONS = 'notifications';\n\nconst SliceNotifications = createSlice({\n name: REDUX_NOTIFICATIONS,\n initialState: NotificationsInitialState,\n reducers: {\n addNotification: (state, action: PayloadAction) => {\n if (!state?.current?.items) {\n return;\n }\n\n state.current.items.push(action.payload);\n },\n\n [REDUX_RESET + REDUX_NOTIFICATIONS]: () => NotificationsInitialState,\n },\n extraReducers: (builder) => {\n builder.addCase(loadNotificationsAsync.fulfilled, (state, action) => {\n state.current.items = action.payload;\n state.isLoading = false;\n });\n builder.addCase(loadNotificationsAsync.rejected, (state) => {\n state.isLoading = false;\n });\n builder.addCase(deleteDBNotificationAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n\n state.current.items = state.current.items\n .filter(Boolean)\n .filter((n) => n.id !== action.meta.arg);\n });\n\n builder.addCase(deleteDBNotificationAsync.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addCase(deleteAllNotificationsAsync.fulfilled, (state) => {\n state.current.items = [];\n state.isLoading = false;\n });\n builder.addCase(deleteAllNotificationsAsync.rejected, (state) => {\n state.isLoading = false;\n });\n\n builder.addMatcher(\n isAnyOf(\n deleteDBNotificationAsync.pending,\n loadNotificationsAsync.pending,\n deleteAllNotificationsAsync.pending,\n ),\n (state) => {\n state.isLoading = true;\n },\n );\n },\n});\n\nexport const notificationActions = {\n ...SliceNotifications.actions,\n deleteDBNotificationAsync,\n loadNotificationsAsync,\n deleteAllNotificationsAsync,\n};\n\nexport const notificationReducers = {\n [REDUX_NOTIFICATIONS]: SliceNotifications.reducer,\n};\n\nexport const notificationSelectors = {\n isLoading: (state: AppState) => state.notifications.isLoading,\n getNotifications: createSelector(\n (state: AppState) => state.notifications.current.items,\n (items) => items.filter(Boolean),\n ),\n};\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { userClient } from '@aclito/client';\nimport {\n UserInfo,\n UserLocation,\n UserAlias,\n UpdateUserInfoInput,\n EventRaw,\n Stats,\n CreateAliasInput,\n UpdateAliasInput,\n} from '@aclito/entities';\n\nimport { FIRST_TIME, NOT_FIRST_TIME } from '../../util/constants';\nimport api from '../../api/api';\nimport { currentUser, updateAttributes } from '../../util/helpersApi';\nimport { authActions, profileActions, locationActions } from '../slices';\nimport { ThunkAuthType, ThunkType, WithMessageProp } from '../types';\nimport { flushState } from '../utils/flushState';\nimport { AppState } from '../store';\nimport { errorObject } from '../../api/utils/errorObject';\nimport { noteActions } from '../slices/noteSlices';\n\nexport const REDUX_DELETE_ACC = 'deleteAccount';\nexport const REDUX_POPULATE_FIRST_TIME = 'populateFirstTime';\nexport const REDUX_UPDATE_MY_PROFILE = 'updateMyProfile';\nexport const REDUX_LOAD_USER = 'loadUser';\nexport const REDUX_ADD_LOCATION = 'addLocation';\nexport const REDUX_UPDATE_SETTINGS = 'settingsUpdate';\nexport const REDUX_CREATE_USER_ALIAS = 'createUserAlias';\nexport const REDUX_UPDATE_USER_ALIAS = 'updateUserAlias';\nexport const REDUX_REMOVE_USER_ALIAS = 'removeUserAlias';\n\nexport const addLocationAsync = createAsyncThunk<\n UserInfo,\n WithMessageProp<{ location: UserLocation }>,\n ThunkType\n>(REDUX_ADD_LOCATION, async (data, { dispatch, ...thunkAPI }) => {\n try {\n const { data: user } = await userClient.user.updateUser({\n location: data.location,\n });\n\n dispatch(locationActions.reset(['searchMapLocation', 'placesMapLocation']));\n return user;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const loadUserInfoAsync = createAsyncThunk<\n { user: UserInfo; stats: Stats },\n void,\n ThunkType\n>(REDUX_LOAD_USER, async (_, thunkAPI) => {\n try {\n const { data } = await userClient.user.getUser();\n return data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const updateUserSettingsAsync = createAsyncThunk<\n UserInfo,\n UpdateUserInfoInput,\n ThunkType\n>(REDUX_UPDATE_SETTINGS, async (data, thunkAPI) => {\n try {\n const { data: user } = await userClient.user.updateUser(data);\n return user;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const deleteAccountAsync = createAsyncThunk(\n REDUX_DELETE_ACC,\n async (_, { dispatch, ...thunkAPI }) => {\n try {\n const user = await currentUser();\n const data = await userClient.user.deleteAccount();\n\n if (data.data) {\n user.deleteUser(async (error, d) => {\n if (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n if (d) {\n await api.authentication.signOut();\n flushState(dispatch);\n }\n return;\n });\n }\n return;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n\nexport const populateIfFirstTimeAsync = createAsyncThunk<\n void,\n void,\n ThunkAuthType\n>(REDUX_POPULATE_FIRST_TIME, async (_, { dispatch, ...thunkAPI }) => {\n try {\n const user = await currentUser();\n user.getUserAttributes(async (__, res) => {\n if (res?.length) {\n const attr = res.find((attribute) => attribute.Name === 'custom:Login');\n if (attr?.Value === FIRST_TIME) {\n const {\n user: userInfo,\n note,\n stats,\n } = (await userClient.user.initial()).data;\n const status = await api.custom.status.getStatus();\n await api.authentication.updateAttributes({\n 'custom:userInfo': userInfo.id,\n 'custom:termsAndConditions':\n status.termsAndConditionsVersion.toString(),\n });\n dispatch(profileActions.updateUserInfo(userInfo));\n dispatch(profileActions.updateUserInfoStats(stats));\n dispatch(noteActions.setNote(note));\n return;\n }\n }\n });\n return;\n } catch (error) {\n await api.authentication.signOut();\n return thunkAPI.rejectWithValue({\n type: errorObject.UserNotFoundException,\n });\n }\n});\n\nexport const updateMyProfileAsync = createAsyncThunk<\n UserInfo,\n UpdateUserInfoInput,\n ThunkAuthType | ThunkType\n>(REDUX_UPDATE_MY_PROFILE, async (data, thunkAPI) => {\n const { locale, pushToken } = thunkAPI.getState() as AppState & {\n pushToken: string;\n };\n try {\n const { data: updated } = await userClient.user.updateUser({\n ...data,\n preferredLanguage: locale,\n pushToken,\n });\n try {\n await updateAttributes({ 'custom:Login': NOT_FIRST_TIME });\n thunkAPI.dispatch(authActions.updateIsFirstTime(false));\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n return updated;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const createUserAliasAsync = createAsyncThunk<\n UserInfo,\n { aliasData: CreateAliasInput },\n ThunkType\n>(REDUX_CREATE_USER_ALIAS, async ({ aliasData }, thunkAPI) => {\n try {\n const { data: updated } = await userClient.alias.createAlias(aliasData);\n\n return updated;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const updateUserAliasAsync = createAsyncThunk<\n UserInfo,\n { aliasData: UpdateAliasInput },\n ThunkType\n>(REDUX_UPDATE_USER_ALIAS, async ({ aliasData }, thunkAPI) => {\n try {\n const { data: updated } = await userClient.alias.updateAlias(aliasData);\n\n return updated;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n\nexport const removeUserAliasAsync = createAsyncThunk<\n UserInfo | EventRaw[],\n { aliasData: UserAlias },\n ThunkType\n>(REDUX_REMOVE_USER_ALIAS, async ({ aliasData }, thunkAPI) => {\n try {\n const data = await userClient.alias.deleteAlias(aliasData.id);\n return data.data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n});\n","import { createSlice, isAnyOf, PayloadAction } from '@reduxjs/toolkit';\nimport type { Stats, UserInfo } from '@aclito/entities';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport { UserInfoInitialState } from '../initialStates';\nimport {\n deleteAccountAsync,\n populateIfFirstTimeAsync,\n updateMyProfileAsync,\n loadUserInfoAsync,\n addLocationAsync,\n updateUserSettingsAsync,\n createUserAliasAsync,\n updateUserAliasAsync,\n removeUserAliasAsync,\n} from '../thunks/profileThunks';\nimport { AppState } from '../store';\n\nexport const REDUX_USER_INFO = 'userInfo';\n\nconst SliceUserInfo = createSlice({\n name: REDUX_USER_INFO,\n initialState: UserInfoInitialState,\n reducers: {\n updateUserInfo: (state, action: PayloadAction) => ({\n ...state,\n current: action.payload,\n }),\n updateUserInfoStats: (state, action: PayloadAction) => ({\n ...state,\n currentStats: action.payload,\n }),\n updateOrgId: (state, action: PayloadAction) => ({\n ...state,\n orgId: action.payload,\n }),\n\n [REDUX_RESET + REDUX_USER_INFO]: () => UserInfoInitialState,\n },\n extraReducers: (builder) => {\n builder.addCase(populateIfFirstTimeAsync.pending, (state) => {\n state.isLoadingPopulate = true;\n });\n builder.addCase(populateIfFirstTimeAsync.fulfilled, (state) => {\n state.isLoadingPopulate = false;\n });\n builder.addCase(populateIfFirstTimeAsync.rejected, (state) => {\n state.isLoadingPopulate = false;\n });\n builder.addCase(updateUserSettingsAsync.pending, (state) => {\n state.isLoadingSettings = true;\n });\n builder.addCase(updateUserSettingsAsync.fulfilled, (state, action) => {\n state.isLoadingSettings = false;\n state.current = action.payload;\n });\n builder.addCase(updateUserSettingsAsync.rejected, (state) => {\n state.isLoadingSettings = false;\n });\n\n builder.addCase(deleteAccountAsync.pending, (state) => {\n state.isLoadingDeleteAccount = true;\n });\n builder.addCase(deleteAccountAsync.rejected, (state) => {\n state.isLoadingDeleteAccount = false;\n });\n\n builder.addCase(loadUserInfoAsync.fulfilled, (state, action) => {\n state.current = action.payload.user;\n state.currentStats = action.payload.stats;\n });\n\n builder.addCase(addLocationAsync.pending, (state) => {\n state.isLoadingLocation = true;\n });\n builder.addCase(addLocationAsync.fulfilled, (state, action) => {\n state.isLoadingLocation = false;\n state.current = action.payload;\n });\n builder.addCase(addLocationAsync.rejected, (state) => {\n state.isLoadingLocation = false;\n });\n builder.addMatcher(\n isAnyOf(\n updateMyProfileAsync.pending,\n updateUserAliasAsync.pending,\n createUserAliasAsync.pending,\n removeUserAliasAsync.pending,\n ),\n (state) => {\n state.isLoadingUpdateMyProfile = true;\n },\n );\n builder.addMatcher(\n isAnyOf(\n updateMyProfileAsync.rejected,\n updateUserAliasAsync.rejected,\n createUserAliasAsync.rejected,\n removeUserAliasAsync.rejected,\n ),\n (state) => {\n state.isLoadingUpdateMyProfile = false;\n },\n );\n builder.addMatcher(\n isAnyOf(\n updateMyProfileAsync.fulfilled,\n updateUserAliasAsync.fulfilled,\n createUserAliasAsync.fulfilled,\n removeUserAliasAsync.fulfilled,\n ),\n (state, action) => {\n state.isLoadingUpdateMyProfile = false;\n if (!Array.isArray(action.payload)) {\n state.current = action.payload;\n }\n },\n );\n },\n});\n\nexport const profileActions = {\n ...SliceUserInfo.actions,\n deleteAccountAsync,\n populateIfFirstTimeAsync,\n updateMyProfileAsync,\n loadUserInfoAsync,\n addLocationAsync,\n updateUserSettingsAsync,\n createUserAliasAsync,\n updateUserAliasAsync,\n removeUserAliasAsync,\n};\nexport const profileReducers = {\n [REDUX_USER_INFO]: SliceUserInfo.reducer,\n};\n\nexport const profileSelectors = {\n userInfo: (state: AppState) => state.userInfo.current,\n orgId: (state: AppState) => state.userInfo.orgId,\n stats: (state: AppState) => state.userInfo.currentStats,\n isLoadingPopulate: (state: AppState) => state.userInfo.isLoadingPopulate,\n isLoadingUpdateMyProfile: (state: AppState) =>\n state.userInfo.isLoadingUpdateMyProfile,\n isLoadingDeleteAccount: (state: AppState) =>\n state.userInfo.isLoadingDeleteAccount,\n isLoadingUpdateUserStats: (state: AppState) =>\n state.userInfo.isLoadingUpdateUserStats,\n isLoadingLocation: (state: AppState) => state.userInfo.isLoadingLocation,\n isLoadingSettings: (state: AppState) => state.userInfo.isLoadingSettings,\n};\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { placeClient } from '@aclito/client';\nimport {\n CreatePlaceInput,\n ListPlaceInput,\n UpdatePlaceInput,\n} from '@aclito/entities';\n\nexport const REDUX_CREATE_PLACE = 'createPlace';\nexport const REDUX_UPDATE_PLACE = 'updatePlace';\nexport const REDUX_NEARBY_PLACE = 'nearbyPlace';\n\nexport const searchNearbyPlacesAsync = createAsyncThunk(\n REDUX_NEARBY_PLACE,\n async (data: { location: ListPlaceInput }, thunkAPI) => {\n try {\n const result = await placeClient.places.list(data.location);\n\n return result.data;\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n\nexport const createPlaceAsync = createAsyncThunk(\n REDUX_CREATE_PLACE,\n async (data: CreatePlaceInput, thunkAPI) => {\n try {\n return await placeClient.places.create(data).then((d) => d.data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n\nexport const updatePlaceAsync = createAsyncThunk(\n REDUX_UPDATE_PLACE,\n async (data: UpdatePlaceInput & { id: string }, thunkAPI) => {\n try {\n return await placeClient.places.update(data.id, data).then((d) => d.data);\n } catch (error) {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n },\n);\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { Place } from '@aclito/entities';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport { PlaceInitialState } from '../initialStates';\nimport {\n createPlaceAsync,\n updatePlaceAsync,\n searchNearbyPlacesAsync,\n} from '../thunks/placeThunks';\nimport { AppState } from '../store';\nimport { RejectCommonType } from '../types';\n\nexport const REDUX_PLACE = 'places';\n\nconst SlicePlace = createSlice({\n name: REDUX_PLACE,\n initialState: PlaceInitialState,\n reducers: {\n [REDUX_RESET + REDUX_PLACE]: () => PlaceInitialState,\n addPlace: (state, payload: PayloadAction) => {\n state.current.push(payload.payload);\n },\n },\n extraReducers: (builder) => {\n // List\n\n builder.addCase(searchNearbyPlacesAsync.pending, (state) => {\n state.error = undefined;\n state.isLoading = true;\n });\n\n builder.addCase(searchNearbyPlacesAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n state.current = action.payload;\n });\n\n builder.addCase(searchNearbyPlacesAsync.rejected, (state, action) => {\n state.isLoading = false;\n state.error = action.payload as RejectCommonType;\n });\n\n // Create\n builder.addCase(createPlaceAsync.pending, (state) => {\n state.error = undefined;\n state.isLoading = true;\n });\n\n builder.addCase(createPlaceAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n if (!state.current) {\n return;\n }\n state.current.push(action.payload);\n });\n\n builder.addCase(createPlaceAsync.rejected, (state, action) => {\n state.isLoading = false;\n state.error = action.payload as RejectCommonType;\n });\n\n // Update\n builder.addCase(updatePlaceAsync.pending, (state) => {\n state.error = undefined;\n state.isLoading = true;\n });\n\n builder.addCase(updatePlaceAsync.fulfilled, (state, action) => {\n state.isLoading = false;\n const all = state.current;\n const filtered = all\n .filter(Boolean)\n .filter((item) => item.id !== action.payload.id);\n filtered.push(action.payload);\n state.current = filtered;\n });\n\n builder.addCase(updatePlaceAsync.rejected, (state, action) => {\n state.isLoading = false;\n state.error = action.payload as RejectCommonType;\n });\n },\n});\n\nexport const placeActions = {\n ...SlicePlace.actions,\n createPlaceAsync,\n updatePlaceAsync,\n searchNearbyPlacesAsync,\n};\nexport const placeReducers = {\n [REDUX_PLACE]: SlicePlace.reducer,\n};\n\nexport const placeSelectors = {\n places: (state: AppState) => state.places.current,\n placesLoading: (state: AppState) => state.places.isLoading,\n};\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport {\n FeedFiltersInitialState,\n SearchOrganizationsInitialState,\n} from '../initialStates';\nimport { OrgFilter } from '../../types';\nimport { AppState } from '../store';\n\nimport { FeedFilters } from '@aclito/shared/redux/types';\n\nexport const REDUX_ORGANIZATIONS = 'searchOrganizations';\nexport const REDUX_FEED_FILTERS = 'feedFilters';\n\nconst SliceSearchOrganizations = createSlice({\n name: REDUX_ORGANIZATIONS,\n initialState: SearchOrganizationsInitialState,\n reducers: {\n [REDUX_RESET + REDUX_ORGANIZATIONS]: () => SearchOrganizationsInitialState,\n setOrganizationFilter: (state, action: PayloadAction) => ({\n ...state,\n filter: action.payload,\n }),\n clearOrganizationFilter: (state) => ({ ...state, filter: { name: '' } }),\n },\n});\n\nconst SliceFeedFilters = createSlice({\n name: REDUX_FEED_FILTERS,\n initialState: FeedFiltersInitialState,\n reducers: {\n [REDUX_RESET + REDUX_FEED_FILTERS]: () => FeedFiltersInitialState,\n setFeedFilters: (_, action: PayloadAction) => ({\n feedOrg: action.payload.feedOrg,\n }),\n clearFeedFilters: () => FeedFiltersInitialState,\n },\n});\n\nexport const organizationsActions = {\n ...SliceSearchOrganizations.actions,\n ...SliceFeedFilters.actions,\n};\nexport const organizationsReducers = {\n [REDUX_ORGANIZATIONS]: SliceSearchOrganizations.reducer,\n [REDUX_FEED_FILTERS]: SliceFeedFilters.reducer,\n};\n\nexport const organizationsSelectors = {\n getOrgFilter: (state: AppState) => state.searchOrganizations.filter,\n getFeedFilter: (state: AppState) => state.feedFilters,\n};\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport { AvailabilityDatesInitialState } from '../initialStates';\nimport { AvailabilityDates } from '../types';\nimport { AppState } from '../store';\n\nexport const REDUX_AVAILABILITY_DATES = 'availabilityDates';\n\nconst SliceAvailabilityDates = createSlice({\n name: REDUX_AVAILABILITY_DATES,\n initialState: AvailabilityDatesInitialState,\n reducers: {\n updateAvailabilityDates: (_, action: PayloadAction) =>\n action.payload,\n removeAvailabilityDate: (state, action: PayloadAction) => {\n state.date = [...state.date].filter((_, i) => action.payload !== i);\n },\n [REDUX_RESET + REDUX_AVAILABILITY_DATES]: () =>\n AvailabilityDatesInitialState,\n },\n});\n\nexport const availabilityActions = {\n ...SliceAvailabilityDates.actions,\n};\nexport const availabilityReducers = {\n [REDUX_AVAILABILITY_DATES]: SliceAvailabilityDates.reducer,\n};\n\nexport const availabilitySelectors = {\n availabilityDates: (state: AppState) => state.availabilityDates,\n};\n","import { createSlice, isAnyOf, PayloadAction } from '@reduxjs/toolkit';\n\nimport { REDUX_RESET } from '../../util/constants';\nimport { LocationInitialState } from '../initialStates';\nimport { AppState } from '../store';\nimport { LocationServices, UserLocation } from '../../types';\nimport { addLocationAsync, loadUserInfoAsync } from '../thunks/profileThunks';\n\nexport const REDUX_LOCATION = 'location';\n\ntype Key = 'searchMapLocation' | 'placesMapLocation';\nconst SliceLocation = createSlice({\n name: REDUX_LOCATION,\n initialState: LocationInitialState,\n reducers: {\n [REDUX_RESET + REDUX_LOCATION]: () => LocationInitialState,\n reset: (state, action: PayloadAction) => {\n action.payload.forEach((e) => {\n state[e] = undefined;\n });\n },\n\n setLocationService: (state, action: PayloadAction) => {\n state.locationService = action.payload;\n },\n setLiveLocation: (\n state,\n action: PayloadAction,\n ) => {\n state.liveLocation = action.payload;\n },\n\n updateUserLocation: (\n state,\n action: PayloadAction,\n ) => {\n state.userLocation = action.payload;\n },\n\n updatePlacesLocation: (state, action: PayloadAction) => {\n const coords = action.payload;\n state.placesMapLocation = {\n lat: coords.latitude,\n latitude: coords.latitude,\n lng: coords.longitude,\n lon: coords.longitude,\n longitude: coords.longitude,\n };\n },\n\n updateSearchMapLocations: (\n state,\n action: PayloadAction<{\n value: { lat: number; lon: number } | undefined;\n }>,\n ) => {\n const value = action.payload.value;\n if (!value) {\n state.searchMapLocation = undefined;\n } else {\n const { lat, lon } = value;\n state.searchMapLocation = {\n lat: lat,\n lng: lon,\n latitude: lat,\n lon: lon,\n longitude: lon,\n };\n }\n },\n },\n\n extraReducers: (builder) => {\n builder.addMatcher(\n isAnyOf(loadUserInfoAsync.fulfilled),\n (state, payload) => {\n if (payload.payload.user.location) {\n state.userLocation = {\n lon: payload.payload.user.location.lon,\n latitude: payload.payload.user.location.lat,\n lng: payload.payload.user.location.lon,\n longitude: payload.payload.user.location.lon,\n lat: payload.payload.user.location.lat,\n };\n }\n },\n );\n builder.addMatcher(\n isAnyOf(addLocationAsync.fulfilled),\n (state, payload) => {\n if (payload.payload.location) {\n state.userLocation = {\n lon: payload.payload.location.lon,\n latitude: payload.payload.location.lat,\n lng: payload.payload.location.lon,\n longitude: payload.payload.location.lon,\n lat: payload.payload.location.lat,\n };\n }\n },\n );\n },\n});\n\nexport const locationActions = {\n ...SliceLocation.actions,\n};\nexport const locationReducers = {\n [REDUX_LOCATION]: SliceLocation.reducer,\n};\n\nexport const locationSelectors = {\n defaultLocation: (state: AppState) => state.location.defaultLocation,\n delta: (state: AppState) => state.location.delta,\n locationService: (state: AppState) => state.location.locationService,\n liveLocation: (state: AppState) => state.location.liveLocation,\n userLocation: (state: AppState) =>\n state.location.userLocation || state.location.defaultLocation,\n searchMapLocation: (state: AppState) =>\n state.location.searchMapLocation ||\n state.location.liveLocation ||\n state.location.userLocation ||\n state.location.defaultLocation,\n placesMapLocation: (state: AppState) =>\n state.location.placesMapLocation ||\n state.location.liveLocation ||\n state.location.userLocation ||\n state.location.defaultLocation,\n};\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nimport { REDUX_RESET } from '@aclito/shared/util/constants';\nimport { AppState } from '@aclito/shared/redux/store';\n\nexport const REDUX_TOKEN = 'pushToken';\nexport const REDUX_LINK = 'link';\nconst SlicePushToken = createSlice({\n name: REDUX_TOKEN,\n initialState: '',\n reducers: {\n updatePushToken: (_state, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_TOKEN]: () => '',\n },\n});\nconst SliceLink = createSlice({\n name: REDUX_LINK,\n initialState: '',\n reducers: {\n updateLink: (_state, action: PayloadAction) => action.payload,\n [REDUX_RESET + REDUX_TOKEN]: () => '',\n },\n});\nexport const mobileActions = {\n ...SlicePushToken.actions,\n ...SliceLink.actions,\n};\nexport const mobileReducers = {\n [REDUX_TOKEN]: SlicePushToken.reducer,\n [REDUX_LINK]: SliceLink.reducer,\n};\nexport const mobileSelectors = {\n pushToken: (state: AppState) => state.pushToken,\n link: (state: AppState) => state.link,\n};\n","import { Middleware, isPending } from '@reduxjs/toolkit';\n\nimport { AppState } from '../store';\ninterface PaginationArg {\n nextToken: string | null;\n}\ninterface PaginationData {\n result: any[];\n nextToken: string | null;\n}\n//https://github.com/reduxjs/redux-toolkit/discussions/1163#discussioncomment-5168974\nexport const customMiddleware: Middleware =\n (api) => (next) => (action: any) => {\n // Exclude unrelated actions\n if (!isPending(action) || !action.meta || !action.meta.arg) {\n return next(action);\n }\n\n const { type, endpointName, originalArgs } = action.meta.arg;\n\n const state = api.getState() as AppState;\n\n const latestQuery = state.aclitoApi.queries[endpointName];\n\n // Exclude unrelated actions\n if (type !== 'query' || !originalArgs || !latestQuery) {\n return next(action);\n }\n\n const queryArg = originalArgs as PaginationArg;\n const latestData = latestQuery.data as PaginationData;\n const { result: latestItems, nextToken: latestCursor } = latestData;\n // Exclude first query runs\n if (!latestItems || !latestItems.length || latestCursor === undefined) {\n return next(action);\n }\n\n // Exclude normal subsequent queries\n if (queryArg.nextToken === latestCursor && latestCursor !== null) {\n return next(action);\n }\n\n action.meta.arg.originalArgs = {\n ...originalArgs,\n pageSize: latestItems.length,\n nextToken: null,\n refetch: true,\n } as PaginationArg;\n\n return next(action);\n };\n","import { Middleware } from 'redux';\nimport { isRejectedWithValue } from '@reduxjs/toolkit';\n\nimport { logger } from '../../lib/logger';\n\nexport const loggerMiddleware: Middleware = () => (next) => (action) => {\n logger.redux(`${(action as any).type}`);\n if (isRejectedWithValue(action)) {\n logger.redux(\n `${JSON.stringify(action.payload)} ${\n (action.meta.arg as any)?.endpointName ?? ''\n }`,\n );\n }\n\n return next(action);\n};\n","export const parseAsyncStorageData = async (str: Promise) => {\n return JSON.parse((await str) || '{}') as T;\n};\n","import { IStorage, Item, ItemToReturnType } from './types';\n\nimport { parseAsyncStorageData } from '@aclito/shared/features/event/utils/normalizeStorageData';\n\nexport const storage: IStorage = {\n setItem: async (item: Item, value: string) =>\n localStorage.setItem(item, value),\n getItem: async (item: Item) => localStorage.getItem(item) ?? '',\n getParsedItems: async (item: T) =>\n (await parseAsyncStorageData(storage.getItem(item))) as ItemToReturnType[T],\n removeItem: async (item: Item) => localStorage.removeItem(item),\n};\n","import { Middleware } from 'redux';\n\nimport { REDUX_LOCALE } from '../slices/commonSlices';\nimport { LOCALE } from '../../util/constants';\nimport { storage } from '../../lib/storage';\n\nexport const localeMiddleware: Middleware =\n () => (next) => async (action: any) => {\n switch (action.type) {\n case `${REDUX_LOCALE}/updateLocale`:\n await storage.setItem(LOCALE, action.payload.locale);\n break;\n default:\n }\n return next(action);\n };\n","import {\n UnknownAction,\n compose,\n Middleware,\n Dispatch,\n Store,\n} from '@reduxjs/toolkit';\n\nimport { logger } from '../lib/logger';\n//https://github.com/pofigizm/redux-dynamic-middlewares/blob/master/src/index.js\nconst createDynamicMiddlewares = () => {\n let allDynamicMiddlewares: Middleware[] = [];\n let allAppliedDynamicMiddlewares: ((\n next: Dispatch,\n ) => (action: UnknownAction) => unknown)[] = [];\n let store: Store;\n\n const enhancer = (_store: Store) => {\n store = _store;\n return (next: Dispatch) => (action: UnknownAction) => {\n // eslint-disable-next-line @typescript-eslint/ban-types\n return compose(...allAppliedDynamicMiddlewares)(next)(action);\n };\n };\n\n const addMiddleware = (...middlewares: Middleware[]) => {\n allAppliedDynamicMiddlewares.push(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n ...middlewares.map((middleware) => middleware(store)),\n );\n allDynamicMiddlewares.push(...middlewares);\n };\n\n const removeMiddleware = (middleware: Middleware) => {\n const index = allDynamicMiddlewares.findIndex((d) => d === middleware);\n\n if (index === -1) {\n logger.debug('Middleware does not exist! ' + middleware.name);\n\n return;\n }\n\n allDynamicMiddlewares = allDynamicMiddlewares.filter(\n (_, mdwIndex) => mdwIndex !== index,\n );\n allAppliedDynamicMiddlewares = allAppliedDynamicMiddlewares.filter(\n (_, mdwIndex) => mdwIndex !== index,\n );\n };\n\n const resetMiddlewares = () => {\n allAppliedDynamicMiddlewares = [];\n allDynamicMiddlewares = [];\n };\n\n return {\n enhancer,\n addMiddleware,\n removeMiddleware,\n resetMiddlewares,\n };\n};\n\nconst dynamicMiddlewaresInstance = createDynamicMiddlewares();\n\nexport default dynamicMiddlewaresInstance.enhancer;\n\nexport const { addMiddleware, removeMiddleware, resetMiddlewares } =\n dynamicMiddlewaresInstance;\n\nexport { createDynamicMiddlewares };\n","import { configureStore } from '@reduxjs/toolkit';\n\nimport { aclitoApi } from './api';\nimport {\n authReducers,\n availabilityReducers,\n commonReducers,\n eventReducers,\n notificationReducers,\n organizationsReducers,\n placeReducers,\n profileReducers,\n} from './slices';\nimport { noteReducers } from './slices/noteSlices';\nimport { mobileReducers } from './slices/mobileSlices';\nimport { locationReducers } from './slices/locationSlice';\nimport { customMiddleware } from './middleware/paginationMiddleware';\nimport { loggerMiddleware } from './middleware/loggerMiddleware';\nimport { localeMiddleware } from './middleware/localeMiddleware';\nimport dynamicMiddleware from './dynamicMiddleware';\n\nexport const store = configureStore({\n reducer: {\n ...eventReducers,\n ...commonReducers,\n ...authReducers,\n ...profileReducers,\n ...placeReducers,\n ...notificationReducers,\n ...organizationsReducers,\n ...availabilityReducers,\n ...noteReducers,\n ...mobileReducers,\n ...locationReducers,\n [aclitoApi.reducerPath]: aclitoApi.reducer,\n },\n devTools: true,\n //@ts-ignore\n middleware: (getDefaultMiddleware) => {\n return getDefaultMiddleware().concat([\n aclitoApi.middleware,\n customMiddleware,\n loggerMiddleware,\n localeMiddleware,\n dynamicMiddleware,\n ]);\n },\n});\nexport type AppState = ReturnType;\nexport type AppDispatch = typeof store.dispatch;\n","import React, { Fragment, PropsWithChildren } from 'react';\nimport { IntlProvider } from 'react-intl';\n\nimport { LocaleType } from '../types';\n\nimport text_cs from './messages/cs.json';\nimport text_en from './messages/en.json';\nimport text_sk from './messages/sk.json';\n\nexport const messages: Record> = {\n en: text_en,\n cs: text_cs,\n sk: text_sk,\n};\n\ntype ProviderProps = { locale: LocaleType };\n\nconst Provider: React.FC> = ({\n children,\n locale,\n}) => {\n return (\n \n {children}\n \n );\n};\nexport default Provider;\n","/* eslint-disable */\n// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.\n\nconst awsmobile = {\n aws_project_region: 'eu-central-1',\n aws_appsync_region: 'eu-central-1',\n aws_appsync_authenticationType: 'AMAZON_COGNITO_USER_POOLS',\n aws_cognito_identity_pool_id:\n 'eu-central-1:d8496cf6-b2ae-4941-a881-e563e7a6dd2d',\n aws_cognito_region: 'eu-central-1',\n aws_user_pools_id: 'eu-central-1_H9yFDn3sL',\n aws_user_pools_web_client_id: '52e926jsdl7lf2os1asildu5he',\n oauth: {\n domain: 'ubs-fed.auth.eu-central-1.amazoncognito.com',\n scope: [\n 'aws.cognito.signin.user.admin',\n 'email',\n 'openid',\n 'phone',\n 'profile',\n ],\n redirectSignIn:\n 'aclito://,aclitolite://,exp://127.0.0.1:19000/--/,http://localhost:3000/sign-in,https://app.aclito.com/sign-in,https://release-hyperenor.drg2myj4sum0e.amplifyapp.com/sign-in',\n redirectSignOut:\n 'aclito://,aclitolite://,exp://127.0.0.1:19000/--/,http://localhost:3000/sign-in,https://app.aclito.com/sign-in,https://release-hyperenor.drg2myj4sum0e.amplifyapp.com/sign-in',\n responseType: 'code',\n },\n federationTarget: 'COGNITO_USER_POOLS',\n aws_cognito_username_attributes: ['EMAIL'],\n aws_cognito_social_providers: ['FACEBOOK', 'GOOGLE', 'APPLE'],\n aws_cognito_signup_attributes: [],\n aws_cognito_mfa_configuration: 'OFF',\n aws_cognito_mfa_types: [],\n aws_cognito_password_protection_settings: {\n passwordPolicyMinLength: 8,\n passwordPolicyCharacters: ['REQUIRES_LOWERCASE', 'REQUIRES_NUMBERS'],\n },\n aws_cognito_verification_mechanisms: ['EMAIL'],\n};\n\nexport default awsmobile;\n","import { EventRaw } from '@aclito/entities';\n\n// Use virtual on BE - there might be some inconsistencies when shifting players around which results in inconsistent flags for certain scenarios\n// Use by flag on FE - Assuming the flags come correct from BE it should result for fewer inconsistencies on FE\n\nexport const getPlayersVirtual = (event: EventRaw) =>\n event.players\n .filter((p) => p.willParticipate)\n .slice(\n 0,\n event.maxPlayers === -1 ? event.players.length : event.maxPlayers,\n );\n\nexport const getPlayersByFlag = (event: EventRaw) =>\n event.players.filter((p) => p.willParticipate).filter((p) => !p.queueDate);\n\nexport const getQueuePlayersVirtual = (event: EventRaw) =>\n event.enableQueue\n ? event.players\n .filter((p) => p.willParticipate)\n .slice(event.maxPlayers, event.players.length)\n : [];\n\nexport const getQueuePlayersByFlag = (event: EventRaw) =>\n event.enableQueue\n ? event.players.filter((p) => p.willParticipate).filter((p) => p.queueDate)\n : [];\n","import { EventPlayer, UserInfo, Event } from '@aclito/entities';\n\nimport { getPlayersByFlag, getQueuePlayersByFlag } from './getPlayers';\n\nimport { EventWithPlayers, UserInfoWithAlias } from '@aclito/shared/types';\n\nexport const mapEvent = (event: Event, pool: UserInfo[]): EventWithPlayers => {\n const _mapAlias = (player: EventPlayer): UserInfoWithAlias => {\n const foundUser = pool.find((user) => user.id === player.id);\n\n const foundAlias = foundUser?.aliases.find(\n (alias) => alias.id === player.aliasId,\n );\n\n if (foundAlias && foundUser) {\n return {\n ...foundUser,\n name: foundAlias.name,\n image: foundAlias.image,\n surname: foundAlias.surname,\n aliasId: foundAlias.id,\n };\n }\n\n return { ...foundUser!, aliasId: foundUser?.id };\n };\n\n const playersInfo = getPlayersByFlag(event)\n .map((player) => {\n if (player.aliasId) {\n return _mapAlias(player);\n }\n\n return pool.find((user) => user.id === player.id);\n })\n .filter(Boolean);\n\n const queuePlayersInfo = getQueuePlayersByFlag(event)\n .map((player) => {\n if (player.aliasId) {\n return _mapAlias(player);\n }\n\n return pool.find((user) => user.id === player.id);\n })\n .filter(Boolean);\n\n return {\n ...event,\n leaderInfo: pool.find((user) => user.id === event.leader)!,\n playersInfo,\n queuePlayersInfo,\n };\n};\n","import { EventRaw } from '@aclito/entities';\n\nimport { getPlayersVirtual, getQueuePlayersVirtual } from './getPlayers';\n\nexport const getParticipantsCount = (event: EventRaw) =>\n getPlayersVirtual(_filterParticipants(event)).length;\n\nexport const getPlayersInQueueCount = (event: EventRaw) =>\n getQueuePlayersVirtual(_filterParticipants(event)).length;\n\nconst _filterParticipants = (event: EventRaw) => ({\n ...event,\n players: event.players?.filter((player) => player.willParticipate),\n});\n","import { EventRaw } from '@aclito/entities';\n\nimport { getParticipantsCount } from './getParticipantsCount';\n\nexport const isEventFull = (event: EventRaw) => {\n return (\n event.maxPlayers !== -1 && getParticipantsCount(event) >= event.maxPlayers\n );\n};\n","import dayjs from 'dayjs';\nimport { EventRaw, UserInfo } from '@aclito/entities';\n\nimport { EVENT_QUEUE_SIZE } from '../../../util/constants';\n\nimport { isEventFull } from './isEventFull';\nimport { getPlayersInQueueCount } from './getParticipantsCount';\n\nexport const isJoined = (event: EventRaw, userId: string) => {\n return event.players.some((player) => player.id === userId);\n};\n\nexport const canJoinEvent = (event: EventRaw, userInfo: UserInfo): boolean => {\n if (dayjs() > dayjs(event.date)) {\n return false;\n }\n\n if (isEventFull(event)) {\n return false;\n }\n\n if (userInfo.aliases.length) {\n if (\n event.players.filter((player) => player.id === userInfo.id).length >=\n userInfo.aliases.length + 1\n ) {\n return false;\n }\n } else if (event.players.some((p) => p.id === userInfo.id)) {\n return false;\n }\n\n return true;\n};\n\nexport const canJoinQueue = (event: EventRaw) => {\n if (!event.enableQueue) {\n return false;\n }\n return !(\n event.enableQueue && EVENT_QUEUE_SIZE <= getPlayersInQueueCount(event)\n );\n};\n","import dayjs from 'dayjs';\nimport { EventRaw } from '@aclito/entities';\n\nexport const eventIsRunning = (event: EventRaw) => {\n return dayjs(event.date) <= dayjs() && dayjs() < dayjs(event.endDate);\n};\n","import dayjs from 'dayjs';\nimport { EventPlayer, EventRaw, UserInfo } from '@aclito/entities';\n\nconst resolveConfirm = (player: EventPlayer | undefined, event: EventRaw) => {\n return (\n event.requireConfirmation &&\n player &&\n !player.isConfirmed &&\n !player.queueDate &&\n dayjs() >= dayjs(event.confirmationDate) &&\n dayjs() < dayjs(event.date) &&\n event.players.some((p) => p.id === player.id)\n );\n};\n\nexport const shouldConfirmEvent = (event: EventRaw, userInfo: UserInfo) => {\n if (userInfo.aliases.length) {\n const filteredPlayers = event.players.filter(\n (player) => player.id === userInfo.id,\n );\n\n return filteredPlayers.some((player) => resolveConfirm(player, event));\n }\n\n const currentPlayer = event.players.find(\n (player) => player.id === userInfo.id,\n );\n\n return resolveConfirm(currentPlayer, event);\n};\n","import { Chat, UserInfo } from '@aclito/entities';\n\nexport const isJoinedInChat = (chat: Chat, userInfo: UserInfo) =>\n chat.participants.some((id) => id === userInfo.id);\n","import { EventRaw } from '@aclito/entities';\n\nimport { UserInfoWithAlias } from '@aclito/shared/types';\n\nexport const isUserOrganizer = (\n userInfo: UserInfoWithAlias,\n event: EventRaw,\n) => {\n return event.leader === userInfo.id && !userInfo.aliasId;\n};\nexport const isUserTrainer = (userInfo: UserInfoWithAlias, event: EventRaw) => {\n return event.players.some((p) => {\n return p.isTrainer && p.id === userInfo.id && !userInfo.aliasId;\n });\n};\n","import type { EventRaw, UserInfo } from '@aclito/entities';\n\nimport { isUserTrainer } from './getEventRole';\n\nexport const canLeaveEvent = (event: EventRaw, userInfo: UserInfo) =>\n event.players.some((p) => p.id === userInfo.id) &&\n ((!isUserTrainer(userInfo, event) && event.leader !== userInfo.id) ||\n !!userInfo.aliases.length);\n","import dayjs from 'dayjs';\nimport { UserInfo } from '@aclito/entities';\n\nimport { FormattedEventWithPlayers } from '../types';\nimport {\n canJoinEvent,\n canJoinQueue,\n isJoined,\n} from '../features/event/utils/canJoinEvent';\nimport { eventIsRunning } from '../features/event/utils/eventIsRunning';\nimport { shouldConfirmEvent } from '../features/event/utils/shouldConfirmEvent';\nimport { isJoinedInChat } from '../features/event/utils/isJoinedInChat';\nimport { canLeaveEvent } from '../features/event/utils/canLeaveEvent';\n\nexport class EventModel {\n constructor(event: FormattedEventWithPlayers, userInfo: UserInfo) {\n this._event = event;\n this._userInfo = userInfo;\n this.init();\n }\n\n _hasProduct = false;\n\n get hasProduct(): boolean {\n return this._hasProduct;\n }\n\n set hasProduct(value: boolean) {\n this._hasProduct = value;\n }\n\n _hasTrainer = false;\n\n get hasTrainer(): boolean {\n return this._hasTrainer;\n }\n\n _event: FormattedEventWithPlayers;\n\n get event(): FormattedEventWithPlayers {\n return this._event;\n }\n\n set event(value: FormattedEventWithPlayers) {\n this._event = value;\n }\n\n _userInfo: UserInfo;\n\n get userInfo(): UserInfo {\n return this._userInfo;\n }\n\n set userInfo(value: UserInfo) {\n this._userInfo = value;\n }\n\n _displayOnly = false;\n\n get displayOnly(): boolean {\n return this._displayOnly;\n }\n\n set displayOnly(value: boolean) {\n this._displayOnly = value;\n }\n\n _canEdit = false;\n\n get canEdit(): boolean {\n return this._canEdit;\n }\n\n set canEdit(value: boolean) {\n this._canEdit = value;\n }\n\n _isJoined = false;\n\n get isJoined(): boolean {\n return this._isJoined;\n }\n\n set isJoined(value: boolean) {\n this._isJoined = value;\n }\n\n _isJoinedFully = false;\n\n get isJoinedFully(): boolean {\n return this._isJoinedFully;\n }\n\n set isJoinedFully(value: boolean) {\n this._isJoinedFully = value;\n }\n\n _isInQueue = false;\n\n get isInQueue(): boolean {\n return this._isInQueue;\n }\n\n set isInQueue(value: boolean) {\n this._isInQueue = value;\n }\n\n _hasRepetitionId = false;\n\n get hasRepetitionId(): boolean {\n return this._hasRepetitionId;\n }\n\n set hasRepetitionId(value: boolean) {\n this._hasRepetitionId = value;\n }\n\n _isInPast = false;\n\n get isInPast(): boolean {\n return this._isInPast;\n }\n\n set isInPast(value: boolean) {\n this._isInPast = value;\n }\n\n _canLeave = false;\n\n get canLeave(): boolean {\n return this._canLeave;\n }\n\n set canLeave(value: boolean) {\n this._canLeave = value;\n }\n\n _isJoinedInChat = false;\n\n get isJoinedInChat(): boolean {\n return this._isJoinedInChat;\n }\n\n set isJoinedInChat(value: boolean) {\n this._isJoinedInChat = value;\n }\n\n _canJoin = false;\n\n get canJoin(): boolean {\n return this._canJoin;\n }\n\n set canJoin(value: boolean) {\n this._canJoin = value;\n }\n\n _canJoinQueue = false;\n\n get canJoinQueue(): boolean {\n return this._canJoinQueue;\n }\n\n set canJoinQueue(value: boolean) {\n this._canJoinQueue = value;\n }\n\n _isLeader = false;\n\n get isLeader(): boolean {\n return this._isLeader;\n }\n\n set isLeader(value: boolean) {\n this._isLeader = value;\n }\n\n _running = false;\n\n get running(): boolean {\n return this._running;\n }\n\n set running(value: boolean) {\n this._running = value;\n }\n\n _canKick = false;\n\n get canKick(): boolean {\n return this._canKick;\n }\n\n set canKick(value: boolean) {\n this._canKick = value;\n }\n\n _shouldConfirm = false;\n\n get shouldConfirm() {\n return this._shouldConfirm;\n }\n\n set shouldConfirm(value: boolean) {\n this._shouldConfirm = value;\n }\n\n _canDisplayChat = false;\n\n get canDisplayChat() {\n return this._canDisplayChat;\n }\n\n set canDisplayChat(value: boolean) {\n this._canDisplayChat = value;\n }\n\n private init() {\n if (this._event && this._userInfo) {\n this._hasProduct =\n !!this._event.subscriptionProduct || !!this._event.oneOffProduct;\n this._displayOnly = dayjs(this._event.date) < dayjs();\n this._isInPast = dayjs(this._event.date) < dayjs();\n\n this._canEdit =\n !this._isInPast &&\n !!(\n this._event.leader === this._userInfo.id ||\n this._event.players.some(\n (p) => p.id === this.userInfo.id && p.isTrainer,\n ) ||\n this._event.org?.admins.some((admin) => admin === this._userInfo.id)\n );\n\n this._isJoined = isJoined(this._event, this._userInfo.id);\n\n this._isJoinedFully = this._userInfo.aliases.length\n ? this._event.players.filter(\n (player) => player.id === this._userInfo.id,\n ).length >=\n this._userInfo.aliases.length + 1\n : this._isJoined;\n\n this._isInQueue = this._event.queuePlayersInfo?.some(\n (player) => player.id === this._userInfo.id,\n );\n\n this._hasTrainer = this._event.players.some((p) => p.isTrainer);\n\n this._hasRepetitionId = !!this._event.repetitionId;\n\n this._canLeave = canLeaveEvent(this._event, this._userInfo);\n\n this._canJoin = canJoinEvent(this._event, this._userInfo);\n\n this._canJoinQueue = canJoinQueue(this._event);\n\n this._isLeader = this._event.leader === this._userInfo.id;\n\n this._running = eventIsRunning(this.event);\n\n this._isJoinedInChat = this._event.chat\n ? isJoinedInChat(this._event.chat, this.userInfo)\n : false;\n\n this._canDisplayChat = this._isJoined;\n\n this._canKick = this._event.leader\n ? this._userInfo.id === this._event.leader ||\n (!!this._event.players.find(\n (player) => player.isTrainer && player.id === this.userInfo.id,\n ) &&\n !this._displayOnly)\n : false;\n\n this._shouldConfirm = !!(\n this._event && shouldConfirmEvent(this._event, this._userInfo)\n );\n }\n }\n}\n","import { SelectObject, TranslateKey, txFn } from '../types';\n\nexport const translate = (arr: SelectObject[], t: txFn) => _getItem(arr, t);\n\nexport const getById = (id: string, obj: Record) => {\n if (!id) {\n return { item: '', id: '' };\n }\n\n return _getItem([obj[id]])[0];\n};\n\nexport const getByIdTranslate = (\n id: string,\n obj: Record,\n t: txFn,\n) => {\n if (!id) {\n return { item: '', id: '' };\n }\n\n return translate([obj[id]], t)[0];\n};\n\nconst _getItem = (arr: SelectObject[], t?: txFn) =>\n arr.map((obj) => ({\n item: t ? t(obj?.item as TranslateKey) : obj.item,\n id: obj.id,\n }));\n","import { createIntl, createIntlCache } from 'react-intl';\nimport dayjs from 'dayjs';\n\nimport { messages } from '@aclito/shared/i18n/I18nProvider';\nimport { TranslateKey, TranslateValues } from '@aclito/shared/types';\nimport { store } from '@aclito/shared/redux/store';\nconst cache = createIntlCache();\nexport const translateDateFormat = (\n date: string,\n id: TranslateKey,\n values?: TranslateValues,\n) => {\n const locale = store.getState().locale;\n const intl = createIntl({ locale, messages: messages[locale] }, cache);\n\n return dayjs(date).format(intl.formatMessage({ id }, values));\n};\n","import { EventRaw } from '@aclito/entities';\n\nimport { ActivitiesKey, txFn } from '@aclito/shared/types';\nimport { config } from '@aclito/shared/config';\nimport { getByIdTranslate } from '@aclito/shared/util/selectObject';\nimport { translateDateFormat } from '@aclito/shared/util/translateDateFormat';\n\nexport const formatEvents = (events: T[], t?: txFn) => {\n return events?.map((e) => _formatFn(e, t));\n};\n\nexport const formatEvent = (e: T, t?: txFn) => {\n return _formatFn(e, t);\n};\n\nconst _formatFn = (e: T, t?: txFn) => {\n return {\n ...e,\n formattedDate: translateDateFormat(e.date, 'date.day.month'),\n formattedTime: translateDateFormat(e.date, 'time.display'),\n formattedEndDate: translateDateFormat(e.endDate, 'date.display'),\n activityType: e.activityType as ActivitiesKey,\n formattedEndTime: translateDateFormat(e.endDate, 'time.display'),\n ...(t && {\n txActivity: getByIdTranslate(e.activityType, config.activities, t).item,\n }),\n ...(t && {\n txLevel: getByIdTranslate(e.minLevel.toString(), config.levels, t).item,\n }),\n ...(t && {\n txGender: getByIdTranslate(e.gender, config.gender.filter, t).item,\n }),\n };\n};\n","export const safeStringDateParse = (\n value: string | number | undefined | null,\n): number => {\n if (!value) return 0;\n\n const parsedValue = Number(value);\n\n return isNaN(parsedValue) ? 0 : parsedValue;\n};\n","import { useIntl } from 'react-intl';\n\nimport { TranslateKey, TranslateValues } from '../types';\n\nexport const useTranslate = () => {\n const intl = useIntl();\n return (id: TranslateKey, values?: TranslateValues) =>\n intl.formatMessage({ id }, values);\n};\n","import { z } from 'zod';\nimport * as yup from 'yup';\nimport dayjs from 'dayjs';\n\nimport {\n MAX_PRICE,\n MIN_PRICE,\n PASSWORD_REGEX,\n PHONE_NUMBER_REGEX,\n RESERVED_USER_NAME,\n TIME_FORMAT_REGEX,\n URL_REGEX,\n} from '../util/constants';\nimport { safeStringDateParse } from '../util/safeStringDateParse';\n\nimport { useTranslate } from './useTranslate';\n\nexport const useSchema = () => {\n const t = useTranslate();\n\n const setZodErrorMap = () => {\n const customErrorMap: z.ZodErrorMap = (issue, ctx) => {\n switch (issue.code) {\n // case z.ZodIssueCode.invalid_type:\n // case z.ZodIssueCode.invalid_string:\n case z.ZodIssueCode.too_small:\n if (issue.type === 'string') {\n return {\n message: t('validation.req'),\n };\n }\n if (issue.type === 'number') {\n return {\n message: t('validation.min', { min: Number(issue.minimum) }),\n };\n }\n return { message: 'Hodnota je příliš malá.' };\n case z.ZodIssueCode.too_big:\n return {\n message: t('validation.max', { max: Number(issue.maximum) }),\n };\n default:\n return { message: ctx.defaultError };\n }\n };\n\n z.setErrorMap(customErrorMap);\n };\n\n const passwordValidation = z\n .string()\n .min(8, t('validation.password.valid.length'))\n .regex(PASSWORD_REGEX, t('validation.password.valid.contains'));\n\n const emailValidation = z\n .string()\n .min(1, t('validation.email.req'))\n .email(t('validation.email.valid'));\n\n const phoneValidator = z\n .string()\n .min(1, t('validation.req'))\n .regex(PHONE_NUMBER_REGEX, t('validation.telephone.valid'));\n\n const loginSchema = z.object({\n username: emailValidation,\n password: passwordValidation,\n });\n const passwordRequestSchema = z.object({\n username: emailValidation,\n });\n const passwordSubmitSchema = z.object({\n username: emailValidation,\n code: z.string().min(1),\n newPassword: passwordValidation,\n });\n\n const notesValidationSchema = z.object({\n email: emailValidation,\n tel: phoneValidator,\n });\n\n const passwordChangeSchema = z\n .object({\n oldPassword: z.string().min(8, t('validation.password.valid.length')),\n newPassword: passwordValidation,\n })\n .refine((data) => data.oldPassword !== data.newPassword, {\n message: t('auth.changePassword.diff'),\n path: ['newPassword'],\n });\n\n const uuidSchema = yup.string().uuid();\n\n const signInValidationSchema = yup.object({\n username: yup\n .string()\n .email(t('validation.email.valid'))\n .required(t('validation.email.req')),\n password: yup\n .string()\n .min(8, t('validation.password.valid.length'))\n .required(t('validation.password.req')),\n });\n\n const userNameValidationSchema = yup.object({\n username: yup\n .string()\n .email(t('validation.email.valid'))\n .required(t('validation.email.req')),\n });\n\n const passwordValidationSchema = yup.object({\n password: yup\n .string()\n .min(8, t('validation.password.valid.length'))\n .matches(PASSWORD_REGEX, t('validation.password.valid.contains'))\n .required(t('validation.password.req')),\n });\n\n const passwordConfirmValidationSchema = yup.object({\n confirmPassword: yup\n .string()\n .min(8, t('validation.password.valid.length'))\n .matches(PASSWORD_REGEX, t('validation.password.valid.contains'))\n .required(t('validation.password.req'))\n .oneOf([yup.ref('password'), null], t('validation.confirm.valid')),\n });\n\n const codeValidationSchema = yup.object({\n code: yup.number().required(t('validation.req')),\n });\n\n const createFeedSchema = yup.object({\n feedText: yup.string().required(t('validation.req')),\n feedOrg: yup.object().required(t('validation.req')).nullable(),\n });\n\n const editFeedSchema = yup.object({\n feedText: yup.string().required(t('validation.req')),\n feedOrg: yup.object(),\n });\n\n const newPlaceSchema = yup\n .object({\n newPlace: yup.string().required(t('validation.req')),\n newPlaceAddress: yup.string().notRequired(),\n })\n .required();\n\n const newOrgSchema = yup.object({\n name: yup.string().required(t('validation.req')),\n description: yup.string(),\n address: yup.string(),\n maxMembers: yup\n .number()\n .transform((value) => (Number.isNaN(value) ? 1 : value))\n .when('unlimited', {\n is: true,\n then: yup.number().notRequired(),\n otherwise: yup\n .number()\n .min(1, t('validation.min', { min: 1 }))\n .required(t('validation.req'))\n .nullable(),\n })\n .nullable(),\n unlimited: yup.boolean(),\n private: yup.boolean(),\n email: yup.string().email(t('validation.email.valid')),\n telephone: yup\n .string()\n .transform((originalValue) =>\n originalValue === '' ? null : originalValue,\n )\n .matches(PHONE_NUMBER_REGEX, t('validation.telephone.valid'))\n .nullable(),\n });\n\n const newAvailabilityValidationSchema = yup.object({\n date: yup\n .date()\n .typeError(t('validation.date'))\n .min(dayjs(), t('validation.past'))\n .required(t('validation.req'))\n .nullable(),\n duration: yup\n .string()\n .matches(TIME_FORMAT_REGEX, t('validation.format'))\n .required(t('validation.req'))\n .nullable(),\n numberOfAvailabilities: yup.number().when('repeating', {\n is: true,\n then: yup.number().nullable().required(t('validation.req')),\n }),\n repeatAfter: yup\n .object()\n .when('repeating', {\n is: true,\n then: yup.object().nullable().required(t('validation.req')),\n })\n .nullable(),\n });\n\n const newEventValidationSchema = yup.object({\n date: yup\n .date()\n .typeError(t('validation.date'))\n .min(dayjs(), t('validation.past'))\n .required(t('validation.req'))\n .nullable(),\n duration: yup\n .string()\n .matches(TIME_FORMAT_REGEX, t('validation.format'))\n .required(t('validation.req'))\n .nullable(),\n forFree: yup.boolean(),\n activity: yup.object().required(t('validation.req')).nullable(),\n price: yup\n .number()\n .transform((value) => (Number.isNaN(value) ? 0 : value))\n .when('forFree', {\n is: true,\n then: yup.number().notRequired(),\n otherwise: yup\n .number()\n .min(MIN_PRICE, t('validation.min', { min: MIN_PRICE }))\n .max(MAX_PRICE, t('validation.max', { max: MAX_PRICE }))\n .required(t('validation.req'))\n .nullable(),\n })\n .nullable(),\n players: yup\n .number()\n .default(-1)\n .transform((value) => (Number.isNaN(value) ? 2 : value))\n .max(99, t('validation.max', { max: 99 }))\n .required(t('validation.req'))\n .when('enableQueue', {\n is: true,\n then: yup\n .number()\n .min(2, t('validation.min', { min: 2 }))\n .required(t('validation.req')),\n })\n .nullable(),\n numberOfEvents: yup.number().when('switchRepeating', {\n is: true,\n then: yup\n .number()\n .transform((value) => (Number.isNaN(value) ? 1 : value))\n .max(180, t('validation.max', { max: 180 }))\n .nullable()\n .required(t('validation.req')),\n }),\n place: yup.object().required(t('validation.req')).nullable(),\n level: yup.object().required(t('validation.req')).nullable(),\n info: yup.string(),\n gender: yup.object().required(t('validation.req')).nullable(),\n name: yup.string().required(t('validation.req')),\n linkRequired: yup.boolean(),\n private: yup.boolean(),\n org: yup.object().nullable(),\n externalLink: yup.string().when('linkRequired', {\n is: true,\n then: yup\n .string()\n .required(t('validation.req'))\n .matches(URL_REGEX, t('validation.url')),\n }),\n repeatAfter: yup\n .object()\n .when('switchRepeating', {\n is: true,\n then: yup.object().nullable().required(t('validation.req')),\n })\n .nullable(),\n hoursConfirm: yup\n .number()\n .when('requireConfirm', {\n is: true,\n then: yup\n .number()\n .required(t('validation.req'))\n .test({\n name: 'is-before-now',\n exclusive: false,\n params: {},\n message: () => t('validation.isInPast'),\n test: function (value) {\n return (\n dayjs() <\n dayjs(this.parent.date).subtract(\n safeStringDateParse(value),\n 'hours',\n )\n );\n },\n }),\n })\n .nullable(),\n });\n const editEventValidationSchema = (\n playersCount: number,\n requireTrainer?: boolean,\n ) =>\n yup.object({\n ...(requireTrainer && {\n trainer: yup\n .object()\n .notRequired()\n .when('dontParticipate', {\n is: true,\n then: yup.object().required(t('validation.req')).nullable(),\n otherwise: yup.object().notRequired().nullable(),\n }),\n }),\n date: yup\n .date()\n .typeError(t('validation.date'))\n .min(dayjs(), t('validation.past'))\n .required(t('validation.req'))\n .nullable(),\n duration: yup\n .string()\n .matches(TIME_FORMAT_REGEX, t('validation.format'))\n .required(t('validation.req'))\n .nullable(),\n forFree: yup.boolean(),\n unlimited: yup.boolean(),\n activity: yup.object().required(t('validation.req')).nullable(),\n price: yup\n .number()\n .transform((value) => (Number.isNaN(value) ? 0 : value))\n .when('forFree', {\n is: true,\n then: yup.number().notRequired(),\n otherwise: yup\n .number()\n .max(MAX_PRICE, t('validation.max', { max: MAX_PRICE }))\n .min(MIN_PRICE, t('validation.min', { min: MIN_PRICE }))\n .required(t('validation.req'))\n .nullable(),\n })\n .nullable(),\n players: yup\n .number()\n .transform((value) => (Number.isNaN(value) ? playersCount : value))\n .when('unlimited', {\n is: true,\n then: yup.number().notRequired(),\n otherwise: yup\n .number()\n .min(\n playersCount > 2 ? playersCount : 2,\n t('validation.min', { min: playersCount > 2 ? playersCount : 2 }),\n )\n .max(99, t('validation.max', { max: 99 }))\n .required(t('validation.req'))\n .nullable(),\n })\n .when('enableQueue', {\n is: true,\n then: yup\n .number()\n .min(playersCount, t('validation.min', { min: playersCount }))\n .required(t('validation.req')),\n })\n .nullable(),\n numberOfEvents: yup.number().when('switchRepeating', {\n is: true,\n then: yup.number().nullable().required(t('validation.req')),\n }),\n place: yup.object().required(t('validation.req')).nullable(),\n level: yup.object().required(t('validation.req')).nullable(),\n info: yup.string(),\n gender: yup.object().required(t('validation.req')).nullable(),\n name: yup.string().required(t('validation.req')),\n linkRequired: yup.boolean(),\n private: yup.boolean(),\n org: yup.object().nullable(),\n externalLink: yup.string().when('linkRequired', {\n is: true,\n then: yup\n .string()\n .required(t('validation.req'))\n .matches(URL_REGEX, t('validation.url')),\n }),\n repeatAfter: yup\n .object()\n .when('switchRepeating', {\n is: true,\n then: yup.object().nullable().required(t('validation.req')),\n })\n .nullable(),\n hoursConfirm: yup\n .number()\n .when('requireConfirm', {\n is: true,\n then: yup\n .number()\n .required(t('validation.req'))\n .test({\n name: 'is-before-now',\n exclusive: false,\n params: {},\n message: () => t('validation.isInPast'),\n test: function (value) {\n return (\n dayjs() <\n dayjs(this.parent.date).subtract(\n safeStringDateParse(value),\n 'hours',\n )\n );\n },\n }),\n })\n .nullable(),\n });\n\n const userInfoValidationSchema = yup.object({\n activities: yup.array().nullable(),\n languages: yup.array().nullable(),\n age: yup.object().nullable(),\n name: yup\n .string()\n .notOneOf([RESERVED_USER_NAME], t('validation.unknown.name')),\n surname: yup\n .string()\n .notOneOf([RESERVED_USER_NAME], t('validation.unknown.surname')),\n gender: yup.object().nullable(),\n image: yup.string(),\n description: yup.string(),\n });\n\n const reportUserValidationSchema = yup.object({\n message: yup.string().required(t('validation.req')),\n });\n const kickUserValidationSchema = yup.object().shape(\n {\n area: yup.object().when('otherText', {\n is: (otherText: string) => !otherText || otherText.length === 0,\n then: yup.object().required(t('validation.req')),\n }),\n otherText: yup.string().when('area', {\n is: (area: string) => !area || area.length === 0,\n then: yup.string().required(t('validation.req')),\n }),\n },\n [['area', 'otherText']],\n );\n\n const aliasesEditValidationSchema = yup.object({\n name: yup\n .string()\n .notOneOf([RESERVED_USER_NAME], t('validation.unknown.name')),\n surname: yup\n .string()\n .notOneOf([RESERVED_USER_NAME], t('validation.unknown.surname')),\n image: yup.string(),\n });\n\n const emailValidator = yup.string().email(t('validation.email.valid'));\n\n return {\n ValidationError: yup.ValidationError,\n notesValidationSchema,\n reportUserValidationSchema,\n passwordSubmitSchema,\n passwordRequestSchema,\n phoneValidator,\n emailValidator,\n signInValidationSchema,\n newEventValidationSchema,\n editEventValidationSchema,\n passwordConfirmValidationSchema,\n userNameValidationSchema,\n passwordValidationSchema,\n codeValidationSchema,\n userInfoValidationSchema,\n newPlaceSchema,\n newOrgSchema,\n kickUserValidationSchema,\n newAvailabilityValidationSchema,\n aliasesEditValidationSchema,\n uuidSchema,\n editFeedSchema,\n createFeedSchema,\n setZodErrorMap,\n passwordChangeSchema,\n loginSchema,\n };\n};\n","import dayjs from 'dayjs';\n\nimport { SelectObject } from '../types';\n\nexport const dateSort = (\n data: T[],\n key: K,\n type: 'asc' | 'desc',\n) => {\n const desc = (x: T, y: T) => {\n const xValue = x[key];\n const yValue = y[key];\n\n if (typeof xValue === 'string' && typeof yValue === 'string') {\n return dayjs(yValue).valueOf() - dayjs(xValue).valueOf();\n }\n\n if (typeof xValue === 'number' && typeof yValue === 'number') {\n return yValue - xValue;\n }\n\n if (xValue instanceof Date && yValue instanceof Date) {\n return yValue.getTime() - xValue.getTime();\n }\n\n return 0;\n };\n\n const asc = (x: T, y: T) => -desc(x, y);\n const func = type === 'asc' ? asc : desc;\n return [...data].sort(func);\n};\n\nexport const sortByItem = (items: SelectObject[]) =>\n [...items]?.sort((x, y) => (x.item > y.item ? 1 : -1));\n","import { SelectObject, TranslateKey } from '../types';\nimport { sortByItem } from '../util/sorter';\nimport { config } from '../config';\nimport {\n translate as selectObjectTranslate,\n getByIdTranslate,\n} from '../util/selectObject';\n\nimport { useTranslate } from './useTranslate';\nconst {\n language,\n gender,\n repeat,\n activities,\n kick,\n allLanguages,\n levels,\n age,\n searchPlaces,\n} = config;\nexport const useSelectObject = () => {\n const t = useTranslate();\n\n const translate = (arr: SelectObject[]) => selectObjectTranslate(arr, t);\n const getById = (id: string, obj: Record) =>\n getByIdTranslate(id, obj, t);\n\n const translatedGender = Object.values(gender.signup).map((g) => ({\n item: t(g.item as TranslateKey),\n id: g.id,\n }));\n\n const translatedFilterGender = Object.values(gender.filter).map((g) => ({\n item: t(g.item as TranslateKey),\n id: g.id,\n }));\n\n const translatedRepeatChoices = Object.values(repeat).map((choice) => ({\n item: t(choice.item as TranslateKey),\n id: choice.id,\n }));\n\n const translatedActivities = sortByItem(\n Object.values(activities).map((activity) => ({\n item: t(activity.item as TranslateKey),\n id: activity.id,\n })),\n );\n\n const translatedKickReasonsTypes = Object.values(kick).map((type) => ({\n item: t(type.item as TranslateKey),\n id: type.id,\n }));\n\n const translatedLanguages = Object.entries(allLanguages).map(\n ([key, lang]) => ({\n item: `${lang.name} (${lang.nativeName})`,\n id: key,\n }),\n );\n\n const translatedLocaleOptions = Object.values(language).map((lang) => ({\n item: t(lang.item as TranslateKey),\n id: lang.id,\n }));\n\n const translatedLevels = Object.values(levels).map((level) => ({\n item: t(level.item as TranslateKey),\n id: level.id,\n }));\n\n const ageOptions = Object.values(age).map((a) => ({\n item: a.id === age.unknown.id ? t(a.item as TranslateKey) : a.item,\n id: a.id,\n }));\n\n const translatedSearchPlaces = Object.values(searchPlaces).map((type) => ({\n ...type,\n item: t(type.item as TranslateKey),\n id: type.id,\n }));\n\n const levelOptions = translatedLevels.map((level) => ({\n ...level,\n item: level.item,\n }));\n\n return {\n translatedKickReasonsTypes,\n translate,\n translatedGender,\n translatedLanguages,\n translatedActivities,\n translatedFilterGender,\n translatedRepeatChoices,\n translatedLevels,\n ageOptions,\n levelOptions,\n translatedLocaleOptions,\n translatedSearchPlaces,\n getById,\n };\n};\n","import { TypedUseSelectorHook, useSelector } from 'react-redux';\n\nimport { AppState } from '../redux/store';\n\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\n","import dayjs from 'dayjs';\n\nimport { useTranslate } from './useTranslate';\n\nimport { TranslateKey } from '@aclito/shared/types';\n\nexport const useTranslateDate = () => {\n const t = useTranslate();\n\n return (date: string, format: TranslateKey) => dayjs(date).format(t(format));\n};\n","import { useEffect, DependencyList } from 'react';\n\nexport function useDebounceEffect(\n fn: () => void,\n waitTime: number,\n deps?: DependencyList,\n) {\n useEffect(() => {\n const t = setTimeout(() => {\n fn();\n }, waitTime);\n\n return () => {\n clearTimeout(t);\n };\n }, deps);\n}\n","import { createContext, ReactNode, useContext } from 'react';\n\nimport { LocaleType } from '../types';\nimport { FlashMessageInterface, FlashMessagesKeys } from '../util/flashMessage';\n\nexport type FlashMessageProps =\n | {\n locale: LocaleType;\n onHit?: () => void;\n key: FlashMessagesKeys;\n options?: Partial;\n }\n | {\n message: string;\n onHit?: () => void;\n type: FlashMessageInterface['type'];\n options?: Partial;\n };\n\nconst FlashMessageContext = createContext<{\n showMessage: (props: FlashMessageProps) => void;\n} | null>(null);\n\nconst FlashMessageProvider = ({\n children,\n showMessage,\n}: {\n children: ReactNode;\n showMessage: (props: FlashMessageProps) => void;\n}) => {\n return (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {children}\n \n );\n};\n\nexport const useFlashMessageContext = () => {\n const value = useContext(FlashMessageContext);\n\n if (!value)\n throw new Error(\n 'useFlashMessageContext must be used within FlashMessageProvider',\n );\n\n return value;\n};\n\nexport default FlashMessageProvider;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { FlashMessagesKeys } from '@aclito/shared/util/flashMessage';\nimport { useFlashMessageContext } from '@aclito/shared/providers/FlashMessageProvider';\n\nexport const useShowFlashMessage = () => {\n const locale = useAppSelector(commonSelectors.locale);\n const { showMessage } = useFlashMessageContext();\n return (key: FlashMessagesKeys, onHit?: () => void) => {\n showMessage({ key, onHit, locale });\n };\n};\n","export const parseURL = (url: string) => {\n if (!url.length) return undefined;\n\n if (url.slice(0, 7) !== 'http://' && url.slice(0, 8) !== 'https://') {\n return `https://${url}`.toLowerCase().trim();\n }\n\n return url.toLowerCase().trim();\n};\n","export const findAllAndReplace = (\n array: Array,\n replacement: T,\n callback: (item: T) => boolean,\n): T[] => array.map((element) => (callback(element) ? replacement : element));\n\nexport const findAllAndReplaceMultiple = (\n array: Array,\n replacement: Array,\n key: keyof T,\n): T[] =>\n array.map((arr) => {\n const found = replacement.find((r) => r[key] === arr[key]);\n return found || arr;\n });\n","export const unique = (array: readonly T[]): Array => {\n return Array.from(new Set(array));\n};\n","import axios from 'axios';\nimport { FetchBaseQueryError } from '@reduxjs/toolkit/query/react';\n\nexport const handleError = (error: unknown): { error: FetchBaseQueryError } => {\n if (axios.isAxiosError(error)) {\n if (error.response?.status === 409) {\n return { error: { error: 'permission', status: 'CUSTOM_ERROR' } };\n }\n if (error.response?.status === 400) {\n return { error: { error: 'fail', status: 'CUSTOM_ERROR' } };\n }\n if (error.response?.status === 401) {\n return { error: { error: 'permission', status: 'CUSTOM_ERROR' } };\n }\n if (error.response?.status === 403) {\n return { error: { error: 'permission', status: 'CUSTOM_ERROR' } };\n }\n return { error: { error: 'fail', status: 'CUSTOM_ERROR' } };\n }\n return { error: { error: 'fail', status: 'CUSTOM_ERROR' } };\n};\n","import {\n CreatePaymentInput,\n CreateProductInput,\n Credit,\n Currency,\n EventRaw,\n Payment,\n PaymentLog,\n PaymentPaid,\n PaymentStatusInput,\n PaymentWithProduct,\n Product,\n UpdateProductInput,\n UserInfo,\n} from '@aclito/entities';\nimport { paymentClient } from '@aclito/client';\n\nimport { findAllAndReplace } from '../../util/findAndReplace';\nimport { logger } from '../../lib/logger';\nimport { aclitoApi } from '../api';\nimport { handleError } from '../utils/handleError';\n\nexport const PAYMENT_LOG = 'getPaymentLog';\nexport const PAYMENTS = 'getPayments';\nexport const PRODUCTS = 'getProducts';\nexport const PAID_PRODUCT = 'getPaid';\nexport const GET_PRODUCT = 'getProduct';\nexport const UPDATE_PRODUCT = 'updateProduct';\nexport const CREATE_PRODUCT = 'createProduct';\nexport const DISCONTINUE_PRODUCT = 'discontinueProduct';\nexport const CREATE_PAYMENTS = 'createPayments';\nexport const CANCEL_PAYMENT = 'cancelPayment';\nexport const GET_CREDIT = 'getCredit';\nexport const GET_STATS = 'getStats';\nexport const CHECK_STATUS = 'checkStatus';\n\nexport const paymentApi = aclitoApi\n .enhanceEndpoints({\n addTagTypes: ['getProducts', 'getCredit', 'getPayments'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n [CANCEL_PAYMENT]: builder.mutation({\n queryFn: async (paymentId, _) => {\n try {\n const data = await paymentClient.payment.cancel(paymentId);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: payment } = await queryFulfilled;\n\n dispatch(\n paymentApi.util.updateQueryData(\n 'getPayments',\n undefined,\n (cache) => {\n const findPayment = cache.find((p) => p.id === payment.id);\n if (!findPayment) {\n return cache;\n }\n const newPayment = { ...findPayment, ...payment };\n return findAllAndReplace(\n cache,\n newPayment,\n (p) => p.id === newPayment.id,\n );\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [PAYMENT_LOG]: builder.query({\n queryFn: async () => {\n try {\n const data = await paymentClient.log.user();\n\n return { data: data.data.logs };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [GET_STATS]: builder.query<\n {\n payments: Payment[];\n events: EventRaw[];\n users: UserInfo[];\n products: Product[];\n },\n {\n id: string;\n startDate: string;\n endDate: string;\n endpoint: 'org' | 'admin';\n }\n >({\n queryFn: async ({ id, startDate, endDate, endpoint }) => {\n try {\n const data = await paymentClient[endpoint].stats(\n id,\n startDate,\n endDate,\n );\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [PAYMENTS]: builder.query({\n providesTags: ['getPayments'],\n queryFn: async () => {\n try {\n const data = await paymentClient.payment.user();\n\n return { data: data.data.payments };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [PRODUCTS]: builder.query({\n queryFn: async (orgId, _) => {\n try {\n const data = await paymentClient.product.org(orgId);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [PAID_PRODUCT]: builder.query<\n { payments: Payment[]; events: EventRaw[] },\n string\n >({\n queryFn: async (productId, _) => {\n try {\n const data = await paymentClient.payment.product(productId);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [GET_PRODUCT]: builder.query({\n queryFn: async (productId, _) => {\n try {\n const data = await paymentClient.product.product(productId);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [GET_CREDIT]: builder.query, void>({\n providesTags: ['getCredit'],\n queryFn: async () => {\n try {\n const data = await paymentClient.credit.user();\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [UPDATE_PRODUCT]: builder.mutation({\n queryFn: async (form, _) => {\n try {\n const data = await paymentClient.product.update(form);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: updatedProduct } = await queryFulfilled;\n dispatch(\n paymentApi.util.updateQueryData(\n 'getProducts',\n updatedProduct.orgId,\n (cache) =>\n findAllAndReplace(\n cache,\n updatedProduct,\n (a) => a.id === updatedProduct.id,\n ),\n ),\n );\n\n dispatch(\n paymentApi.util.updateQueryData(\n 'getProduct',\n updatedProduct.id,\n () => updatedProduct,\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [DISCONTINUE_PRODUCT]: builder.mutation({\n queryFn: async (productId, _) => {\n try {\n const data = await paymentClient.product.discontinue(productId);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: updatedProduct } = await queryFulfilled;\n dispatch(\n paymentApi.util.updateQueryData(\n 'getProducts',\n updatedProduct.orgId,\n (cache) =>\n findAllAndReplace(\n cache,\n updatedProduct,\n (a) => a.id === updatedProduct.id,\n ),\n ),\n );\n\n dispatch(\n paymentApi.util.updateQueryData(\n 'getProduct',\n updatedProduct.id,\n () => updatedProduct,\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [CREATE_PRODUCT]: builder.mutation({\n queryFn: async (form, _) => {\n try {\n const data = await paymentClient.product.create(form);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: createdProduct } = await queryFulfilled;\n dispatch(\n paymentApi.util.updateQueryData(\n 'getProducts',\n createdProduct.orgId,\n (cache) => [...cache, createdProduct],\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [CREATE_PAYMENTS]: builder.mutation<\n PaymentWithProduct[],\n CreatePaymentInput\n >({\n queryFn: async (form, _) => {\n try {\n const data = await paymentClient.payment.create(form);\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n invalidatesTags: ['getCredit'],\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: newPayments } = await queryFulfilled;\n\n dispatch(\n paymentApi.util.updateQueryData(\n 'getPayments',\n undefined,\n (cache) => [...cache, ...newPayments],\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [CHECK_STATUS]: builder.mutation<\n PaymentPaid,\n { eventId: string; data: PaymentStatusInput }\n >({\n queryFn: async ({ eventId, data }) => {\n try {\n const result = await paymentClient.status.check(eventId, data);\n\n return { data: result.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n });\n\nexport const {\n useGetPaymentLogQuery,\n useGetCreditQuery,\n useGetPaymentsQuery,\n useGetProductsQuery,\n useGetProductQuery,\n useGetPaidQuery,\n useGetStatsQuery,\n useCreateProductMutation,\n useUpdateProductMutation,\n useDiscontinueProductMutation,\n useCreatePaymentsMutation,\n useCancelPaymentMutation,\n useCheckStatusMutation,\n} = paymentApi;\n","import { Draft } from '@reduxjs/toolkit';\nimport { eventClient } from '@aclito/client';\nimport { EventRaw, Event, Place, Chat, UserInfo } from '@aclito/entities';\n\nimport { mapEvent } from '../../features/event/utils/mapEvent';\nimport { EventModel } from '../../classes/EventModel';\nimport { formatEvent } from '../../features/event/utils/formatEvents';\nimport {\n ActivitiesKey,\n EventForm,\n EventWithPlayers,\n GenderKey,\n NoUndefinedField,\n} from '../../types';\nimport { useAppSelector } from '../../hooks';\nimport { profileSelectors } from '../slices/profileSlices';\nimport { AppState } from '../store';\nimport { parseURL } from '../../util/parseURL';\nimport {\n findAllAndReplace,\n findAllAndReplaceMultiple,\n} from '../../util/findAndReplace';\nimport { unique } from '../../util/unique';\nimport { EventFilters } from '../types';\nimport { locationSelectors } from '../slices/locationSlice';\nimport { commonActions } from '../slices';\nimport { logger } from '../../lib/logger';\nimport { aclitoApi } from '../api';\nimport { handleError } from '../utils/handleError';\n\nimport { paymentApi } from './paymentApi';\n\nexport const CREATE_EVENT = 'createEvent';\nexport const UPDATE_EVENT = 'updateEvent';\nexport const DELETE_EVENT = 'deleteEvent';\nexport const LOAD_MY_EVENTS = 'loadMyEvents';\nexport const LOAD_MY_ORG_EVENTS = 'loadMyOrgEvents';\nexport const DISPLAY_EVENT = 'displayEvent';\nexport const LEAVE_EVENT = 'leaveEvent';\nexport const JOIN_EVENT = 'joinEvent';\nexport const CONFIRM_EVENT = 'confirmEvent';\nexport const KICK_FROM_EVENT = 'kickFromEvent';\nexport const SEARCH_EVENTS = 'searchEvents';\nexport const JOIN_PROVIDER_EVENT = 'joinProviderEvent';\nexport const LEAVE_PROVIDER_EVENT = 'leaveProviderEvent';\nexport const HISTORY_EVENT = 'eventHistory';\n\nexport const eventApi = aclitoApi\n .enhanceEndpoints({\n addTagTypes: [\n 'listMyEvents',\n 'listMyOrgEvents',\n 'displayEvent',\n 'searchEvents',\n ],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n [LOAD_MY_EVENTS]: builder.query<\n { result: Event[]; nextToken: string | null },\n { nextToken: string | null; refetch?: boolean }\n >({\n queryFn: async (args) => {\n try {\n const events = await eventClient.events.getMyEvents(\n args.nextToken,\n 50,\n );\n return {\n data: {\n result: events.data.data,\n nextToken: events.data.nextToken,\n },\n };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { result, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.result = result;\n } else {\n currentData.result.push(...result);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n providesTags: ['listMyEvents'],\n }),\n [LOAD_MY_ORG_EVENTS]: builder.query<\n { result: Event[]; nextToken: string | null },\n { nextToken: string | null; refetch?: boolean; orgId: string }\n >({\n queryFn: async (args) => {\n try {\n const events = await eventClient.events.getMyEvents(\n args.nextToken,\n 50,\n args.orgId,\n );\n return {\n data: {\n result: events.data.data,\n nextToken: events.data.nextToken,\n },\n };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { result, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.result = result;\n } else {\n currentData.result.push(...result);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n providesTags: ['listMyOrgEvents'],\n }),\n [HISTORY_EVENT]: builder.query({\n queryFn: async () => {\n try {\n const events = await eventClient.events.eventHistory();\n return { data: events.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [SEARCH_EVENTS]: builder.query<\n { data: EventRaw[]; total: number; nextToken: string | null },\n EventFilters & { nextToken: string | null; refetch?: boolean }\n >({\n queryFn: async (args, { getState }) => {\n try {\n const searchMapLocation = locationSelectors.searchMapLocation(\n getState() as AppState,\n );\n const events = await eventClient.events.searchEvents({\n limit: 50,\n nextToken: args.nextToken,\n query: args.query || undefined,\n lat: args.distance\n ? args.location?.lat || searchMapLocation.lat\n : undefined,\n lon: args.distance\n ? args.location?.lon || searchMapLocation.lon\n : undefined,\n gender: args.gender?.id || undefined,\n activityType: args.activityType?.id || undefined,\n freeOnly: args.freeOnly ? args.freeOnly : undefined,\n distance: args.distance ? Number(args.distance) : undefined,\n price: args.price?.join('|'),\n to: args.to,\n from: args.from,\n tags: args.tags\n ? Object.keys(args.tags)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .filter((tag) => args.tags[tag])\n .join('|')\n : undefined,\n eventOrgId: args.org?.id || undefined,\n level: args.level?.map((l) => parseInt(l.id)).join('|'),\n });\n return { data: { ...events.data } };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { data, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.data = data;\n } else {\n currentData.data.push(...data);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n providesTags: ['searchEvents'],\n }),\n [DELETE_EVENT]: builder.mutation<\n { id: string } | { id: string }[],\n { id: string } | { repId: string; id: string }\n >({\n queryFn: async (args) => {\n try {\n if ('repId' in args) {\n const result = await eventClient.events.deleteRepeatingEvent(\n args.repId,\n args.id,\n );\n return { data: result.data };\n } else {\n await eventClient.events.deleteEvent(args.id);\n return { data: { id: args.id } };\n }\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n (draft) => {\n if ('repId' in args) {\n const res = result.data as { id: string }[];\n const ids = res.map((id) => id.id);\n draft.result = draft.result.filter(\n (e) => !ids.includes(e.id),\n );\n return draft;\n } else {\n draft.result = draft.result.filter((e) => e.id !== args.id);\n return draft;\n }\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [CREATE_EVENT]: builder.mutation<\n Array>,\n EventForm\n >({\n queryFn: async (args) => {\n const data = args as NoUndefinedField;\n try {\n const res = await eventClient.events.createEvent({\n eventPlaceId: data.place.id,\n date: data.date,\n maxPlayers: data.players || -1,\n name: data.name,\n price: data.forFree ? 0 : data.price || 0,\n gender: data.gender.id as GenderKey,\n info: data.info,\n minLevel: parseInt(data.level.id),\n tags: data.tags,\n externalLink: parseURL(data.externalLink),\n eventOrgId: data.org?.id ? data.org?.id : undefined,\n oneOffProductId: data.productOneOff?.id\n ? data.productOneOff?.id\n : undefined,\n subscriptionProductId: data.productSub?.id\n ? data.productSub?.id\n : undefined,\n enableQueue: data.enableQueue,\n activityType: data.activity.id as ActivitiesKey,\n repeatAfter: data.repeatAfter?.id,\n duration: data.duration,\n numberOfEvents: data.numberOfEvents\n ? Number(data.numberOfEvents)\n : undefined,\n hoursConfirm: data.hoursConfirm\n ? Number(data.hoursConfirm)\n : undefined,\n trainer: data.trainer?.id,\n willParticipate: !data.dontParticipate,\n private: data.private,\n });\n return { data: res.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n (draft) => {\n draft.result = [...draft.result, ...result.data];\n return draft;\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [UPDATE_EVENT]: builder.mutation<\n (EventRaw & { place: Place }) | { events: EventRaw[]; place: Place },\n {\n data: EventForm;\n id: string;\n repeatingId?: string;\n }\n >({\n queryFn: async (args) => {\n const data = args.data as NoUndefinedField;\n try {\n const input = {\n eventId: args.id,\n eventPlaceId: data.place.id,\n date: data.date,\n maxPlayers: data.players || -1,\n name: data.name,\n price: data.forFree ? 0 : data.price || 0,\n gender: data.gender.id as GenderKey,\n info: data.info,\n minLevel: parseInt(data.level.id),\n tags: data.tags,\n externalLink: data.linkRequired\n ? parseURL(data.externalLink)\n : '',\n enableQueue: data.enableQueue,\n activityType: data.activity.id as ActivitiesKey,\n repeatAfter: data.repeatAfter?.id,\n duration: data.duration,\n private: data.private,\n hoursConfirm: data.hoursConfirm\n ? Number(data.hoursConfirm)\n : undefined,\n trainer: data.trainer?.id,\n willParticipate: !data.dontParticipate,\n };\n\n if (args.repeatingId) {\n const updated = await eventClient.events.updateRepeatingEvent(\n args.repeatingId,\n input,\n );\n return { data: updated.data };\n } else {\n const updated = await eventClient.events.updateEvent(\n args.id,\n input,\n );\n return { data: updated.data };\n }\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled;\n\n if ('repeatingId' in args) {\n const result = data as { events: EventRaw[]; place: Place };\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n (draft) => {\n const newEvents = result.events\n .map((event) => {\n const oldEvent = draft.result.find(\n (e) => e.id === event.id,\n );\n if (oldEvent) {\n return {\n ...oldEvent,\n ...event,\n };\n }\n })\n .filter(Boolean);\n draft.result = findAllAndReplaceMultiple(\n draft.result,\n newEvents,\n 'id',\n );\n return draft;\n },\n ),\n );\n } else {\n const result = data as EventRaw & { place: Place };\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n (draft) => {\n const oldEvent = draft.result.find(\n (e) => e.id === result.id,\n );\n if (oldEvent) {\n const newEvent = {\n ...oldEvent,\n ...result,\n };\n draft.result = findAllAndReplace(\n draft.result,\n newEvent,\n (e) => e.id === result.id,\n );\n return draft;\n }\n },\n ),\n );\n }\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n invalidatesTags: ['displayEvent'],\n }),\n [DISPLAY_EVENT]: builder.query({\n queryFn: async ({ id }) => {\n try {\n const event = await eventClient.events.getEvent(id);\n return { data: event.data };\n } catch (error) {\n return handleError(error);\n }\n },\n providesTags: ['displayEvent'],\n }),\n [JOIN_EVENT]: builder.mutation<\n | (EventRaw & { chat: Chat; place: Place })\n | { events: EventRaw[]; place: Place },\n | { id: string; aliasIds?: string[] }\n | { id: string; aliasIds?: string[]; repId: string }\n >({\n queryFn: async (args, { getState }) => {\n const refState = (getState() as AppState).referral;\n\n const ref = refState\n ? refState.entityId === args.id\n ? refState.ref\n : null\n : null;\n\n try {\n if ('repId' in args) {\n const event = await eventClient.events.joinEventRepeating(\n args.repId,\n { aliasIds: args?.aliasIds ?? [], eventId: args.id, ref },\n );\n return { data: event.data };\n } else {\n const event = await eventClient.events.joinEvent(args.id, {\n aliasIds: args.aliasIds ?? [],\n ref,\n });\n return { data: event.data };\n }\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled, getState }) {\n const state = getState() as AppState;\n const user = state.userInfo.current;\n const orgId = state.userInfo.orgId;\n\n try {\n const res = await queryFulfilled;\n\n dispatch(commonActions.setReferral(null));\n\n if ('repId' in args) {\n const result = res.data as { events: EventRaw[]; place: Place };\n for (const event of result.events) {\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: event.id },\n (draft) => {\n draft.players = event.players;\n draft.playersInfo.push(user);\n if (draft.chat) {\n draft.chat = {\n ...draft.chat,\n participants: unique([\n ...draft.chat.participants,\n user.id,\n ]),\n };\n }\n return draft;\n },\n ),\n );\n }\n for (const {\n endpointName,\n originalArgs,\n } of eventApi.util.selectInvalidatedBy(getState(), [\n 'searchEvents',\n ])) {\n if (endpointName !== SEARCH_EVENTS) continue;\n dispatch(\n eventApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (draft) => {\n return {\n ...draft,\n data: draft.data.filter(\n (e) => !result.events.find((r) => r.id === e.id),\n ),\n };\n },\n ),\n );\n }\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n updateCacheFromJoinToMyEventsRep(result),\n ),\n );\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyOrgEvents',\n { nextToken: null, orgId: orgId ?? '' },\n updateCacheFromJoinToMyEventsRep(result),\n ),\n );\n } else {\n const result = res.data as EventRaw & {\n chat: Chat;\n place: Place;\n };\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: args.id },\n (draft) => {\n draft.players = result.players;\n draft.playersInfo.push(user);\n draft.chat = result.chat;\n return draft;\n },\n ),\n );\n for (const {\n endpointName,\n originalArgs,\n } of eventApi.util.selectInvalidatedBy(getState(), [\n 'searchEvents',\n ])) {\n if (endpointName !== SEARCH_EVENTS) continue;\n dispatch(\n eventApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (draft) => {\n return {\n ...draft,\n data: draft.data.filter((e) => e.id !== result.id),\n };\n },\n ),\n );\n }\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n updateCacheFromJoinToMyEventsSingle(result),\n ),\n );\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyOrgEvents',\n { nextToken: null, orgId: orgId ?? '' },\n updateCacheFromJoinToMyEventsSingle(result),\n ),\n );\n }\n } catch (e) {\n logger.debug('Failed to join event', { message: e });\n }\n },\n }),\n [LEAVE_EVENT]: builder.mutation<\n (EventRaw & { chat: Chat; productLeaveCharge: boolean }) | EventRaw[],\n | { id: string; aliasIds?: string[]; message: string }\n | { id: string; aliasIds?: string[]; repId: string; message: string }\n >({\n queryFn: async (args) => {\n try {\n if ('repId' in args) {\n const event = await eventClient.events.leaveRepeatingEvent(\n args.repId,\n {\n aliasIds: args?.aliasIds ?? [],\n eventId: args.id,\n message: args.message,\n },\n );\n return { data: event.data };\n } else {\n const event = await eventClient.events.leaveEvent(args.id, {\n aliasIds: args.aliasIds ?? [],\n message: args.message,\n });\n return { data: event.data };\n }\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled, getState }) {\n try {\n const res = await queryFulfilled;\n const state = getState() as AppState;\n const user = state.userInfo.current;\n const orgId = state.userInfo.orgId;\n\n if ('repId' in args) {\n const result = res.data as EventRaw[];\n for (const event of result) {\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: event.id },\n (draft) => {\n draft.players = event.players;\n if (\n draft.chat &&\n !event.players.some((p) => p.id === user.id)\n ) {\n draft.chat.participants =\n draft.chat.participants.filter((p) => p !== user.id);\n }\n return draft;\n },\n ),\n );\n }\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n updateCacheFromLeaveToMyEventsRep(result, user),\n ),\n );\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyOrgEvents',\n { nextToken: null, orgId: orgId ?? '' },\n updateCacheFromLeaveToMyEventsRep(result, user),\n ),\n );\n } else {\n const result = res.data as EventRaw & {\n chat: Chat;\n productLeaveCharge: boolean;\n };\n\n if (result.productLeaveCharge) {\n dispatch(\n paymentApi.util.invalidateTags(['getCredit', 'getPayments']),\n );\n }\n\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: args.id },\n (draft) => {\n draft.players = result.players;\n draft.chat = result.chat;\n return draft;\n },\n ),\n );\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n updateCacheFromLeaveToMyEventsSingle(result, user),\n ),\n );\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyOrgEvents',\n { nextToken: null, orgId: orgId ?? '' },\n updateCacheFromLeaveToMyEventsSingle(result, user),\n ),\n );\n }\n } catch (e) {\n logger.debug('Failed to leave event', { message: e });\n }\n },\n }),\n\n [KICK_FROM_EVENT]: builder.mutation<\n EventRaw,\n { eventId: string; idOrAliasId: string; message: string }\n >({\n queryFn: async ({ eventId, idOrAliasId, message }) => {\n try {\n const event = await eventClient.events.kickFromEvent(eventId, {\n idOrAliasId,\n message,\n });\n\n return { data: event.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ eventId }, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: eventId },\n (draft) => {\n draft.players = result.data.players;\n return draft;\n },\n ),\n );\n\n dispatch(\n eventApi.util.updateQueryData(\n 'loadMyEvents',\n { nextToken: null },\n (draft) => {\n const oldEvent = draft.result.find(\n (e) => e.id === result.data.id,\n );\n if (oldEvent) {\n const newEvent = {\n ...oldEvent,\n ...result,\n };\n draft.result = findAllAndReplace(\n draft.result,\n newEvent,\n (e) => e.id === result.data.id,\n );\n return draft;\n }\n return draft;\n },\n ),\n );\n } catch (e) {\n logger.debug('Failed to kick from event', { message: e });\n }\n },\n }),\n\n [CONFIRM_EVENT]: builder.mutation<\n EventRaw,\n { id: string; aliasIds?: string[] }\n >({\n queryFn: async ({ id, aliasIds }) => {\n try {\n const event = await eventClient.events.confirmEvent(\n id,\n aliasIds ?? [],\n );\n\n return { data: event.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ id }, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n\n dispatch(\n eventApi.util.updateQueryData('displayEvent', { id }, (draft) => {\n draft.players = result.data.players;\n return draft;\n }),\n );\n } catch (e) {\n logger.debug('Failed to confirm event', { message: e });\n }\n },\n }),\n\n [JOIN_PROVIDER_EVENT]: builder.mutation({\n queryFn: async ({ id }) => {\n try {\n const event = await eventClient.events.joinProviderEvent(id);\n\n return { data: event.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ id }, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n\n dispatch(\n eventApi.util.updateQueryData('displayEvent', { id }, (draft) => {\n return { ...draft, ...result };\n }),\n );\n } catch (e) {\n logger.debug('Failed to join event', { message: e });\n }\n },\n }),\n\n [LEAVE_PROVIDER_EVENT]: builder.mutation({\n queryFn: async ({ id }) => {\n try {\n const event = await eventClient.events.leaveProviderEvent(id);\n\n return { data: event.data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ id }, { dispatch, queryFulfilled }) {\n try {\n const result = await queryFulfilled;\n\n dispatch(\n eventApi.util.updateQueryData('displayEvent', { id }, (draft) => {\n return { ...draft, ...result };\n }),\n );\n } catch (e) {\n logger.debug('Failed to leave event', { message: e });\n }\n },\n }),\n }),\n });\n\nexport const {\n useDisplayEventQuery,\n useJoinEventMutation,\n useLeaveEventMutation,\n useConfirmEventMutation,\n useKickFromEventMutation,\n useLoadMyEventsQuery,\n useLoadMyOrgEventsQuery,\n useLazyLoadMyEventsQuery,\n useLazyLoadMyOrgEventsQuery,\n useCreateEventMutation,\n useUpdateEventMutation,\n useDeleteEventMutation,\n useSearchEventsQuery,\n useLazySearchEventsQuery,\n useJoinProviderEventMutation,\n useLeaveProviderEventMutation,\n useEventHistoryQuery,\n} = eventApi;\n\ntype EventDraft = Draft<{\n result: Event[];\n nextToken: string | null;\n}>;\n\nconst updateCacheFromLeaveToMyEventsSingle = (\n result: EventRaw & {\n chat: Chat;\n },\n user: UserInfo,\n) => {\n return (draft: EventDraft) => {\n const oldEvent = draft.result.find((e) => e.id === result.id);\n if (oldEvent) {\n // if no longer in event, remove it\n if (!result.players.some((p) => p.id === user.id)) {\n draft.result = draft.result.filter((e) => e.id !== result.id);\n return draft;\n } else {\n const newEvent = {\n ...oldEvent,\n ...result,\n };\n draft.result = findAllAndReplace(\n draft.result,\n newEvent,\n (e) => e.id === result.id,\n );\n return draft;\n }\n }\n return draft;\n };\n};\n\nconst updateCacheFromLeaveToMyEventsRep = (\n result: EventRaw[],\n user: UserInfo,\n) => {\n return (draft: EventDraft) => {\n const idsToRemove: string[] = [];\n const newEvents = result\n .map((event) => {\n // if no longer in event, remove it\n if (!event.players.some((p) => p.id === user.id)) {\n idsToRemove.push(event.id);\n }\n const oldEvent = draft.result.find((e) => e.id === event.id);\n if (oldEvent) {\n return {\n ...oldEvent,\n ...event,\n };\n }\n })\n .filter(Boolean);\n const replaced = findAllAndReplaceMultiple(draft.result, newEvents, 'id');\n draft.result = replaced.filter((e) => !idsToRemove.includes(e.id));\n return draft;\n };\n};\n\nconst updateCacheFromJoinToMyEventsRep = (result: {\n events: EventRaw[];\n place: Place;\n}) => {\n return (draft: EventDraft) => {\n const additionalEvents: Event[] = [];\n const newEvents = result.events\n .map((event) => {\n const oldEvent = draft.result.find((e) => e.id === event.id);\n if (oldEvent) {\n return {\n ...oldEvent,\n ...event,\n };\n } else {\n additionalEvents.push({\n ...event,\n place: result.place,\n });\n }\n })\n .filter(Boolean);\n const replaced = findAllAndReplaceMultiple(draft.result, newEvents, 'id');\n\n draft.result = [...replaced, ...additionalEvents];\n return draft;\n };\n};\n\nconst updateCacheFromJoinToMyEventsSingle = (\n result: EventRaw & { chat: Chat; place: Place },\n) => {\n return (draft: EventDraft) => {\n const oldEvent = draft.result.find((e) => e.id === result.id);\n if (oldEvent) {\n const newEvent = {\n ...oldEvent,\n ...result,\n };\n draft.result = findAllAndReplace(\n draft.result,\n newEvent,\n (e) => e.id === result.id,\n );\n return draft;\n } else {\n draft.result = [...draft.result, result];\n return draft;\n }\n };\n};\n\nexport const useDisplayEvent = (id: T) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const { data, ...rest } = useDisplayEventQuery(\n { id: id ?? '' },\n { skip: !id },\n );\n\n if (!data) {\n return {\n model: undefined,\n ...rest,\n };\n }\n const mappedEvent = mapEvent(data, data.playersInfo);\n\n return {\n model: new EventModel(formatEvent(mappedEvent), userInfo),\n ...rest,\n };\n};\n","export const dedupeByUpdatedAt = (\n items: T[],\n): T[] => {\n return Object.values(\n items.reduce>((acc, item) => {\n const existing = acc[item.id];\n if (\n !existing ||\n new Date(item.updatedAt) > new Date(existing.updatedAt)\n ) {\n acc[item.id] = item;\n }\n return acc;\n }, {}),\n );\n};\n","type Truthy = Exclude;\n\nexport function assertObjectExists(q: T): asserts q is Truthy {\n if (q) {\n return;\n }\n throw new Error('object does not exist');\n}\n","import { organizationClient } from '@aclito/client';\nimport {\n Organization,\n UpdateOrganizationMemberParams,\n UserInfo,\n} from '@aclito/entities';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { aclitoApi } from '../api';\nimport { OrganizationForm } from '../../types';\nimport { AppState } from '../store';\nimport { assertObjectExists } from '../../util/assertions';\nimport { profileActions, REDUX_USER_INFO } from '../slices/profileSlices';\nimport { commonActions } from '../slices';\nimport { logger } from '../../lib/logger';\nimport { dedupeByUpdatedAt } from '../../util/dedupeByUpdatedAt';\nimport { handleError } from '../utils/handleError';\n\nimport { eventApi } from './eventApi';\n\nimport { findAllAndReplace } from '@aclito/shared/util/findAndReplace';\n\nexport const CREATE_ORGANIZATION = 'createOrganization';\nexport const DELETE_ORGANIZATION = 'deleteOrganization';\nexport const UPDATE_ORGANIZATION = 'updateOrganization';\nexport const UPDATE_MY_ORGANIZATIONS_MEMBERS = 'updateMyOrganizationsMembers';\nexport const JOIN_ORGANIZATION = 'joinOrganization';\nexport const JOIN_ORGANIZATION_LITE = 'joinOrganizationLite';\nexport const LEAVE_ORGANIZATION_LITE = 'leaveOrganizationLite';\nexport const LEAVE_ORGANIZATION = 'leaveOrganization';\nexport const FIND_ORGANIZATION = 'findOrganization';\nexport const LIST_MY_ORGANIZATIONS = 'listMyOrganizations';\nexport const LIST_ALL_ORGANIZATIONS = 'listAllOrganizations';\n\ntype UpdateMember = {\n orgId: string;\n data: UpdateOrganizationMemberParams;\n};\n\nexport const organizationApi = aclitoApi\n .enhanceEndpoints({\n addTagTypes: [\n 'listMyOrganizations',\n 'listAllOrganizations',\n 'findOrganization',\n ],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n [CREATE_ORGANIZATION]: builder.mutation({\n queryFn: async (args, app) => {\n const { unlimited, ...input } = args;\n const { userInfo } = app.getState() as AppState;\n const maxMembers = unlimited ? -1 : Number(args.maxMembers);\n\n if (!input.file) {\n delete input.file;\n }\n\n try {\n const { data: org } =\n await organizationClient.organizations.createOrganization({\n ...input,\n maxMembers,\n members: [userInfo.current.id],\n admins: [userInfo.current.id],\n powerUsers: [userInfo.current.id],\n telephone:\n input.telephone === null ? undefined : input.telephone,\n email: input.email === null ? undefined : input.email,\n });\n\n return { data: org };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: createdOrg } = await queryFulfilled;\n dispatch(\n organizationApi.util.updateQueryData(\n 'listMyOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: [createdOrg, ...organizationCache.orgs],\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n dispatch(\n organizationApi.util.updateQueryData(\n 'listAllOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: [createdOrg, ...organizationCache.orgs],\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [DELETE_ORGANIZATION]: builder.mutation<\n { orgId: string },\n { orgId: string }\n >({\n queryFn: async (args) => {\n try {\n const { data: deleted } =\n await organizationClient.organizations.deleteOrganization({\n orgId: args.orgId,\n });\n\n return { data: { orgId: deleted.id } };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled }) {\n try {\n await queryFulfilled;\n dispatch(\n organizationApi.util.updateQueryData(\n 'listMyOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: organizationCache.orgs.filter(\n (org) => org.id !== args.orgId,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n dispatch(\n organizationApi.util.updateQueryData(\n 'listAllOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: organizationCache.orgs.filter(\n (org) => org.id !== args.orgId,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [UPDATE_ORGANIZATION]: builder.mutation<\n Organization,\n OrganizationForm & { id: string }\n >({\n queryFn: async (args) => {\n try {\n const { unlimited, ...input } = args;\n const maxMembers = unlimited ? -1 : args.maxMembers;\n\n if (!input.file) {\n delete input.file;\n }\n\n const { data: updated } =\n await organizationClient.organizations.updateOrganization({\n ...input,\n maxMembers,\n telephone:\n input.telephone === null ? undefined : input.telephone,\n email: input.email === null ? undefined : input.email,\n });\n return { data: updated };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: updatedOrg } = await queryFulfilled;\n dispatch(\n organizationApi.util.updateQueryData(\n 'listMyOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: findAllAndReplace(\n organizationCache.orgs,\n updatedOrg,\n (org) => org.id === updatedOrg.id,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: updatedOrg.id },\n (organizationCache) => {\n organizationCache.org = updatedOrg;\n return organizationCache;\n },\n ),\n );\n\n dispatch(\n organizationApi.util.updateQueryData(\n 'listAllOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: findAllAndReplace(\n organizationCache.orgs,\n updatedOrg,\n (org) => org.id === updatedOrg.id,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [UPDATE_MY_ORGANIZATIONS_MEMBERS]: builder.mutation<\n Organization,\n UpdateMember\n >({\n queryFn: async (args, _) => {\n try {\n const { data: updated } =\n await organizationClient.organizations.updateOrganizationMember(\n args.orgId,\n { ...args.data },\n );\n assertObjectExists(updated);\n return { data: updated };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled }) {\n try {\n const { data: updatedOrg } = await queryFulfilled;\n dispatch(\n organizationApi.util.updateQueryData(\n 'listMyOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: findAllAndReplace(\n organizationCache.orgs,\n updatedOrg,\n (org) => org.id === updatedOrg.id,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: args.orgId },\n (draft) => {\n let members = draft.members;\n\n if (!args.data.newRole) {\n members = members.filter(\n (m) => m.id !== args.data.memberId,\n );\n }\n\n return {\n ...draft,\n org: updatedOrg,\n members,\n };\n },\n ),\n );\n dispatch(\n organizationApi.util.updateQueryData(\n 'listAllOrganizations',\n { nextToken: null },\n (organizationCache) => ({\n orgs: findAllAndReplace(\n organizationCache.orgs,\n updatedOrg,\n (org) => org.id === updatedOrg.id,\n ),\n nextToken: organizationCache.nextToken,\n }),\n ),\n );\n } catch (error) {\n return;\n }\n },\n }),\n [JOIN_ORGANIZATION]: builder.mutation({\n queryFn: async (args, { getState }) => {\n const refState = (getState() as AppState).referral;\n\n const ref = refState\n ? refState.entityId === args.orgId\n ? refState.ref\n : null\n : null;\n\n try {\n const { data: updated } =\n await organizationClient.organizations.joinOrganization(\n args.orgId,\n { ref },\n );\n assertObjectExists(updated);\n return { data: updated };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(\n { orgId },\n { dispatch, queryFulfilled, getState },\n ) {\n try {\n const state = getState() as AppState;\n const userInfo = state[REDUX_USER_INFO].current;\n const { data: updatedOrg } = await queryFulfilled;\n\n dispatch(commonActions.setReferral(null));\n dispatch(eventApi.util.invalidateTags(['displayEvent']));\n\n for (const {\n endpointName,\n originalArgs,\n } of organizationApi.util.selectInvalidatedBy(getState(), [\n 'listAllOrganizations',\n ])) {\n if (endpointName !== LIST_ALL_ORGANIZATIONS) continue;\n dispatch(\n organizationApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (draft) => {\n return {\n nextToken: draft.nextToken,\n orgs: draft.orgs.filter((o) => o.id !== orgId),\n };\n },\n ),\n );\n }\n\n dispatch(\n organizationApi.util.updateQueryData(\n 'listMyOrganizations',\n { nextToken: null }, // might be an issue with pagination\n (draft) => {\n return {\n nextToken: draft.nextToken,\n orgs: [...draft.orgs, updatedOrg],\n };\n },\n ),\n );\n\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: orgId },\n (organizationCache) => {\n return {\n ...organizationCache,\n org: updatedOrg,\n members: [...organizationCache.members, userInfo],\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [JOIN_ORGANIZATION_LITE]: builder.mutation<\n Organization,\n { orgId: string }\n >({\n queryFn: async (args, _) => {\n try {\n const { data: updated } =\n await organizationClient.organizations.joinOrganization(\n args.orgId,\n { ref: null },\n );\n assertObjectExists(updated);\n return { data: updated };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(\n { orgId },\n { dispatch, queryFulfilled, getState },\n ) {\n try {\n const state = getState() as AppState;\n const userInfo = state[REDUX_USER_INFO].current;\n\n const { data: updatedOrg } = await queryFulfilled;\n dispatch(profileActions.updateOrgId(orgId));\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: orgId },\n (organizationCache) => {\n return {\n ...organizationCache,\n org: updatedOrg,\n members: [...organizationCache.members, userInfo],\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [LEAVE_ORGANIZATION_LITE]: builder.mutation<\n Organization,\n { orgId: string }\n >({\n queryFn: async (args, _) => {\n try {\n const { data: updated } =\n await organizationClient.organizations.leaveOrganization(\n args.orgId,\n { message: '' },\n );\n assertObjectExists(updated);\n return { data: updated };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(\n { orgId },\n { dispatch, queryFulfilled, getState },\n ) {\n try {\n const state = getState() as AppState;\n const userInfo = state[REDUX_USER_INFO].current;\n const { data: updatedOrg } = await queryFulfilled;\n dispatch(profileActions.updateOrgId(undefined));\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: orgId },\n (organizationCache) => {\n return {\n ...organizationCache,\n org: updatedOrg,\n members: organizationCache.members.filter(\n (member) => member.id !== userInfo.id,\n ),\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [LEAVE_ORGANIZATION]: builder.mutation<\n Organization,\n { orgId: string; message: string }\n >({\n queryFn: async (args, _) => {\n try {\n const { data: updated } =\n await organizationClient.organizations.leaveOrganization(\n args.orgId,\n { message: args.message },\n );\n assertObjectExists(updated);\n return {\n data: updated,\n };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(\n { orgId },\n { dispatch, queryFulfilled, getState },\n ) {\n try {\n const state = getState() as AppState;\n const userId = state[REDUX_USER_INFO].current.id;\n const { data: updatedOrg } = await queryFulfilled;\n\n dispatch(eventApi.util.invalidateTags(['displayEvent']));\n\n for (const {\n endpointName,\n originalArgs,\n } of organizationApi.util.selectInvalidatedBy(getState(), [\n 'listMyOrganizations',\n ])) {\n if (endpointName !== LIST_MY_ORGANIZATIONS) continue;\n dispatch(\n organizationApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (draft) => {\n return {\n nextToken: draft.nextToken,\n orgs: draft.orgs.filter((o) => o.id !== orgId),\n };\n },\n ),\n );\n }\n\n dispatch(\n organizationApi.util.updateQueryData(\n 'findOrganization',\n { id: orgId },\n (organizationCache) => {\n return {\n ...organizationCache,\n org: updatedOrg,\n members: organizationCache.members.filter(\n (member) => member.id !== userId,\n ),\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [FIND_ORGANIZATION]: builder.query<\n { org: Organization; members: UserInfo[] },\n { id: string }\n >({\n queryFn: async (args, _) => {\n try {\n const { data } =\n await organizationClient.organizations.getOrganization({\n orgId: args.id,\n });\n\n return {\n data,\n };\n } catch (error) {\n return handleError(error);\n }\n },\n providesTags: ['findOrganization'],\n }),\n [LIST_MY_ORGANIZATIONS]: builder.query<\n {\n orgs: Organization[];\n nextToken: string | null;\n },\n { nextToken: string | null }\n >({\n queryFn: async (args, _) => {\n try {\n const { data: result } =\n await organizationClient.organizations.getMyOrganizations({\n limit: 50,\n nextToken: args.nextToken,\n });\n assertObjectExists(result);\n return { data: { orgs: result.data, nextToken: result.nextToken } };\n } catch (error) {\n return handleError(error);\n }\n },\n providesTags: ['listMyOrganizations'],\n keepUnusedDataFor: Number.POSITIVE_INFINITY,\n }),\n [LIST_ALL_ORGANIZATIONS]: builder.query<\n { orgs: Organization[]; nextToken: string | null },\n {\n name?: string;\n nextToken: string | null;\n refetch?: boolean;\n }\n >({\n queryFn: async (args) => {\n try {\n const result =\n await organizationClient.organizations.getAllOrganizations({\n name: args.name,\n limit: 50,\n nextToken: args.nextToken,\n });\n const orgs = result.data.data;\n const nextToken = result.data.nextToken;\n return { data: { orgs, nextToken } };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { orgs, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.orgs = orgs;\n } else {\n currentData.orgs.push(...orgs);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n providesTags: ['listAllOrganizations'],\n }),\n }),\n });\n\nexport const selectMyOrganizations = createSelector(\n (state: AppState) => state,\n (state) => {\n let res: Organization[] = [];\n\n for (const {\n endpointName,\n originalArgs,\n } of organizationApi.util.selectInvalidatedBy(state, [\n 'listMyOrganizations',\n ])) {\n if (endpointName === LIST_MY_ORGANIZATIONS) {\n const endpointResult =\n organizationApi.endpoints[LIST_MY_ORGANIZATIONS].select(\n originalArgs,\n // @ts-expect-error https://github.com/reduxjs/redux-toolkit/issues/2484\n )(state)?.data?.orgs ?? [];\n res = [...res, ...endpointResult];\n }\n }\n\n return dedupeByUpdatedAt(res);\n },\n);\n\nexport const {\n useCreateOrganizationMutation,\n useDeleteOrganizationMutation,\n useUpdateOrganizationMutation,\n useUpdateMyOrganizationsMembersMutation,\n useJoinOrganizationMutation,\n useJoinOrganizationLiteMutation,\n useLeaveOrganizationMutation,\n useLeaveOrganizationLiteMutation,\n useFindOrganizationQuery,\n useListMyOrganizationsQuery,\n useLazyListMyOrganizationsQuery,\n useListAllOrganizationsQuery,\n useLazyListAllOrganizationsQuery,\n} = organizationApi;\n","import { feedClient, organizationClient } from '@aclito/client';\nimport {\n CreateFeedInput,\n Feed,\n UpdateFeedInput,\n UserInfo,\n} from '@aclito/entities';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { aclitoApi } from '../api';\nimport { AppState } from '../store';\nimport { handleError } from '../utils/handleError';\nimport { logger } from '../../lib/logger';\nimport { dedupeByUpdatedAt } from '../../util/dedupeByUpdatedAt';\n\nimport { selectMyOrganizations } from './organizationApi';\n\nimport { findAllAndReplace } from '@aclito/shared/util/findAndReplace';\nimport { dateSort } from '@aclito/shared/util/sorter';\n\nexport const CREATE_FEED = 'createFeed';\nexport const UPDATE_FEED = 'updateFeed';\nexport const DELETE_FEED = 'deleteFeed';\nexport const LIST_FEEDS_BY_MY_ORGS = 'listFeedsByMyOrgs';\nexport const LIST_FEEDS_BY_ORG = 'listFeedsByOrg';\nexport const GET_FEED = 'getFeed';\n\nexport const feedApi = aclitoApi\n .enhanceEndpoints({\n addTagTypes: ['listFeeds', 'listMyOrgsFeeds', 'getFeed'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n [LIST_FEEDS_BY_ORG]: builder.query({\n queryFn: async (id) => {\n try {\n const { data } = await feedClient.feeds.listFeedsByOrg({\n feedOrgId: id,\n });\n return { data };\n } catch (error) {\n return handleError(error);\n }\n },\n providesTags: ['listFeeds'],\n keepUnusedDataFor: 300,\n }),\n\n [GET_FEED]: builder.query({\n queryFn: async (id) => {\n try {\n const { data } = await feedClient.feeds.getFeed(id);\n return { data };\n } catch (error) {\n return handleError(error);\n }\n },\n providesTags: ['getFeed'],\n }),\n\n [LIST_FEEDS_BY_MY_ORGS]: builder.query({\n queryFn: async (id, app) => {\n const state = app.getState() as AppState;\n const myOrgs = selectMyOrganizations(state);\n const orgsToFilter = id\n ? id\n : myOrgs?.map((org) => org.id).join(' ') ?? '';\n try {\n const { data } = await feedClient.feeds.searchMyFeeds({\n orgs: orgsToFilter,\n });\n return { data };\n } catch (error) {\n return handleError(error);\n }\n },\n keepUnusedDataFor: 300,\n providesTags: ['listMyOrgsFeeds'],\n }),\n [CREATE_FEED]: builder.mutation<\n Feed,\n Omit & {\n file: string | undefined;\n }\n >({\n queryFn: async ({ file, ...args }, app) => {\n const state = app.getState() as any;\n const userId: string = state.userInfo.current.id;\n\n try {\n const { data } = await feedClient.feeds.createFeed({\n feedOrgId: args.feedOrgId,\n feedPostedById: userId,\n text: args.text,\n ...(file && { file }),\n });\n const org = await organizationClient.organizations.getOrganization({\n orgId: args.feedOrgId,\n });\n\n return {\n data: {\n ...data,\n postedBy: state.userInfo.current as UserInfo,\n org: org.data.org,\n },\n };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ feedOrgId }, { dispatch, queryFulfilled }) {\n try {\n const { data: createdFeed } = await queryFulfilled;\n dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByOrg',\n feedOrgId,\n (feedCache) => [createdFeed, ...feedCache],\n ),\n );\n\n dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByMyOrgs',\n feedOrgId,\n (feedCache) => [createdFeed, ...feedCache],\n ),\n );\n dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByMyOrgs',\n '',\n (feedCache) => [createdFeed, ...feedCache],\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [UPDATE_FEED]: builder.mutation<\n Feed,\n Omit & {\n file: string | undefined;\n orgId: string;\n }\n >({\n queryFn: async ({ file, orgId, ...args }, app) => {\n const state = app.getState() as AppState;\n const userId: string = state.userInfo.current.id;\n\n try {\n const { data } = await feedClient.feeds.updateFeed({\n id: args.id,\n feedPostedById: userId,\n text: args.text,\n ...(file && { file }),\n });\n\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n invalidatesTags: ['getFeed'],\n async onQueryStarted(\n { orgId },\n { dispatch, queryFulfilled, getState },\n ) {\n try {\n const { data: updatedFeed } = await queryFulfilled;\n\n dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByOrg',\n orgId,\n (feedCache) => {\n return dateSort(\n findAllAndReplace(\n feedCache,\n updatedFeed,\n (feed) => feed.id === updatedFeed.id,\n ),\n 'updatedAt',\n 'desc',\n );\n },\n ),\n );\n\n for (const {\n endpointName,\n originalArgs,\n } of feedApi.util.selectInvalidatedBy(getState(), [\n 'listMyOrgsFeeds',\n ])) {\n if (endpointName !== LIST_FEEDS_BY_MY_ORGS) continue;\n\n dispatch(\n feedApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (feedCache) => {\n return dateSort(\n findAllAndReplace(\n feedCache,\n updatedFeed,\n (feed) => feed.id === updatedFeed.id,\n ),\n 'updatedAt',\n 'desc',\n );\n },\n ),\n );\n }\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [DELETE_FEED]: builder.mutation({\n queryFn: async ({ id }) => {\n try {\n await feedClient.feeds.deleteFeed({ id });\n\n return { data: undefined };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled, getState }) {\n try {\n const deleteFeedOrg = dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByOrg',\n args.feedOrgId,\n (feedCache) => feedCache.filter((feed) => feed.id !== args.id),\n ),\n );\n\n for (const {\n endpointName,\n originalArgs,\n } of feedApi.util.selectInvalidatedBy(getState(), [\n 'listMyOrgsFeeds',\n ])) {\n if (endpointName !== LIST_FEEDS_BY_MY_ORGS) continue;\n\n dispatch(\n feedApi.util.updateQueryData(\n endpointName,\n originalArgs,\n (feedCache) =>\n feedCache.filter((feed) => feed.id !== args.id),\n ),\n );\n }\n\n const deleteFeedMyOrgs = dispatch(\n feedApi.util.updateQueryData(\n 'listFeedsByMyOrgs',\n args.feedOrgId,\n (feedCache) => feedCache.filter((feed) => feed.id !== args.id),\n ),\n );\n try {\n await queryFulfilled;\n } catch (e) {\n logger.debug('API error', { err: e });\n deleteFeedOrg.undo();\n deleteFeedMyOrgs.undo();\n }\n } catch (err) {\n logger.debug('API error', { err });\n }\n },\n }),\n }),\n });\n\nexport const selectAllFeeds = createSelector(\n (state: AppState) => state,\n (state) => {\n let res: Feed[] = [];\n\n // Get invalidated entities from RTK Query\n for (const {\n endpointName,\n originalArgs,\n } of feedApi.util.selectInvalidatedBy(state, [\n 'listMyOrgsFeeds',\n 'listFeeds',\n ])) {\n if (\n endpointName === LIST_FEEDS_BY_MY_ORGS ||\n endpointName === LIST_FEEDS_BY_ORG\n ) {\n res = [\n ...res,\n ...(feedApi.endpoints[LIST_FEEDS_BY_MY_ORGS].select(originalArgs)(\n // @ts-expect-error https://github.com/reduxjs/redux-toolkit/issues/2484\n state,\n )?.data ?? []),\n ];\n res = [\n ...res,\n // @ts-expect-error https://github.com/reduxjs/redux-toolkit/issues/2484\n ...(feedApi.endpoints[LIST_FEEDS_BY_ORG].select(originalArgs)(state)\n ?.data ?? []),\n ];\n }\n }\n\n return dedupeByUpdatedAt(res);\n },\n);\nexport const {\n useListFeedsByOrgQuery,\n useCreateFeedMutation,\n useUpdateFeedMutation,\n useDeleteFeedMutation,\n useListFeedsByMyOrgsQuery,\n useGetFeedQuery,\n} = feedApi;\n","import {\n Availability,\n Event,\n CreateAvailabilityInput,\n DeleteAvailabilityInput,\n UpdateAvailabilityInput,\n} from '@aclito/entities';\nimport { availabilityClient } from '@aclito/client';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { aclitoApi } from '../api';\nimport { AppState } from '../store';\nimport { assertObjectExists } from '../../util/assertions';\nimport { logger } from '../../lib/logger';\nimport { handleError } from '../utils/handleError';\n\nimport { findAllAndReplace } from '@aclito/shared/util/findAndReplace';\n\nexport const CREATE_AVAILABILITY = 'createAvailability';\nexport const UPDATE_AVAILABILITY = 'updateAvailability';\nexport const DELETE_AVAILABILITY = 'deleteAvailability';\nexport const LIST_AVAILABILITIES = 'listAvailabilities';\nexport const SUGGEST_EVENTS = 'suggestEvents';\n\nexport const availabilityApi = aclitoApi\n .enhanceEndpoints({ addTagTypes: ['listAvailabilities'] })\n .injectEndpoints({\n endpoints: (builder) => ({\n [SUGGEST_EVENTS]: builder.query({\n queryFn: async (args) => {\n try {\n const { data } =\n await availabilityClient.availabilities.suggestEvents(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [CREATE_AVAILABILITY]: builder.mutation<\n Availability[],\n Omit\n >({\n queryFn: async (inputData) => {\n try {\n const { data } =\n await availabilityClient.availabilities.createAvailability(\n inputData,\n );\n assertObjectExists(data);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: createdAvailabilities } = await queryFulfilled;\n dispatch(\n availabilityApi.util.updateQueryData(\n 'listAvailabilities',\n { nextToken: null, refetch: undefined },\n (availabilityCache) => ({\n result: [\n ...createdAvailabilities,\n ...availabilityCache.result,\n ],\n nextToken: availabilityCache.nextToken,\n }),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [UPDATE_AVAILABILITY]: builder.mutation<\n Availability,\n UpdateAvailabilityInput\n >({\n queryFn: async (args) => {\n try {\n const { data } =\n await availabilityClient.availabilities.updateAvailability(args);\n assertObjectExists(data);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(_, { dispatch, queryFulfilled }) {\n try {\n const { data: updatedAvailability } = await queryFulfilled;\n dispatch(\n availabilityApi.util.updateQueryData(\n 'listAvailabilities',\n { nextToken: null, refetch: undefined },\n (availabilityCache) => ({\n result: findAllAndReplace(\n availabilityCache.result,\n updatedAvailability,\n (a) => a.id === updatedAvailability.id,\n ),\n nextToken: availabilityCache.nextToken,\n }),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [DELETE_AVAILABILITY]: builder.mutation({\n queryFn: async (args) => {\n try {\n await availabilityClient.availabilities.deleteAvailability({\n availabilityId: args.availabilityId,\n });\n return { data: undefined };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(args, { dispatch, queryFulfilled }) {\n const deleteResult = dispatch(\n availabilityApi.util.updateQueryData(\n 'listAvailabilities',\n {\n nextToken: null,\n refetch: undefined,\n },\n (availabilityCache) => ({\n result: availabilityCache.result.filter(\n (a) => a.id !== args.availabilityId,\n ),\n nextToken: availabilityCache.nextToken,\n }),\n ),\n );\n try {\n await queryFulfilled;\n } catch (e) {\n logger.debug('API error', { err: e });\n deleteResult.undo();\n }\n },\n }),\n [LIST_AVAILABILITIES]: builder.query<\n { result: Availability[]; nextToken: string | null },\n { nextToken: string | null; refetch?: boolean }\n >({\n queryFn: async (args) => {\n try {\n const { data } =\n await availabilityClient.availabilities.listAvailabilities({\n nextToken: args.nextToken,\n limit: 50,\n });\n assertObjectExists(data);\n const result = data.data;\n const nextToken = data.nextToken;\n return { data: { result, nextToken } };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { result, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.result = result;\n } else {\n currentData.result.push(...result);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n providesTags: ['listAvailabilities'],\n }),\n }),\n });\n\nexport const selectAvailabilities = createSelector(\n (state: AppState) => state,\n (state) =>\n availabilityApi.endpoints.listAvailabilities.select({\n nextToken: null,\n refetch: undefined,\n // @ts-expect-error https://github.com/reduxjs/redux-toolkit/issues/2484\n })(state)?.data?.result,\n);\n\nexport const {\n useCreateAvailabilityMutation,\n useUpdateAvailabilityMutation,\n useSuggestEventsQuery,\n useDeleteAvailabilityMutation,\n useListAvailabilitiesQuery,\n useLazyListAvailabilitiesQuery,\n} = availabilityApi;\n","import { CreateReportInput, Report } from '@aclito/entities';\nimport { reportClient } from '@aclito/client';\n\nimport { assertObjectExists } from '../../util/assertions';\nimport { aclitoApi } from '../api';\nimport { handleError } from '../utils/handleError';\n\nexport const CREATE_REPORT = 'createReport';\n\nexport const reportApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [CREATE_REPORT]: builder.mutation({\n queryFn: async (input, _) => {\n try {\n const data = await reportClient.reports.createReport(input);\n\n assertObjectExists(data.data);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const { useCreateReportMutation } = reportApi;\n","export const NOTIFICATION_TYPE_GROUP_MESSAGE = 'GroupMessage';\nexport const NOTIFICATION_TYPE_EVENT = 'Event';\nexport const NOTIFICATION_TYPE_ORG = 'Org';\nexport const NOTIFICATION_TYPE_PROFILE = 'Profile';\n\nexport type NotificationDataType = [\n typeof NOTIFICATION_TYPE_EVENT,\n typeof NOTIFICATION_TYPE_ORG,\n typeof NOTIFICATION_TYPE_GROUP_MESSAGE,\n typeof NOTIFICATION_TYPE_PROFILE,\n][number];\n\nexport enum ChatMessageMetaData {\n Left = 'LEFT',\n Joined = 'JOINED',\n Message = 'MESSAGE',\n}\n\nexport enum EventProviderType {\n ACLITO = 'ACLITO',\n RESERVANTO = 'RESERVANTO',\n CHYTRA_REZERVACE = 'CHYTRA_REZERVACE',\n}\n\nexport enum EventTag {\n ALL = 'ALL',\n KIDS = 'KIDS',\n ADULTS = 'ADULTS',\n}\n\nexport enum NotificationTypeEventChanges {\n EVENT_DELETE_REPEATING = 'EVENT_DELETE_REPEATING',\n EVENT_CHANGE_REPEATING = 'EVENT_CHANGE_REPEATING',\n EVENT_DELETE = 'EVENT_DELETE',\n}\n\nexport enum NotificationTypeEventInteractions {\n EVENT_LEFT = 'EVENT_LEFT',\n EVENT_LEFT_REPEATING = 'EVENT_LEFT_REPEATING',\n EVENT_JOIN_REPEATING = 'EVENT_JOIN_REPEATING',\n EVENT_MULTIPLE_LEFT = 'EVENT_MULTIPLE_LEFT',\n EVENT_QUEUE_LEFT = 'EVENT_QUEUE_LEFT',\n EVENT_MULTIPLE_QUEUE_LEFT = 'EVENT_MULTIPLE_QUEUE_LEFT',\n EVENT_KICK = 'EVENT_KICK',\n EVENT_QUEUE_KICK = 'EVENT_QUEUE_KICK',\n EVENT_INVITE = 'EVENT_INVITE',\n EVENT_JOIN = 'EVENT_JOIN',\n EVENT_MULTIPLE_JOIN = 'EVENT_MULTIPLE_JOIN',\n EVENT_QUEUE_MULTIPLE_JOIN = 'EVENT_QUEUE_MULTIPLE_JOIN',\n EVENT_QUEUE_REPEATING_JOIN = 'EVENT_QUEUE_REPEATING_JOIN',\n EVENT_QUEUE_REPEATING_LEFT = 'EVENT_QUEUE_REPEATING_LEFT',\n EVENT_QUEUE_JOIN = 'EVENT_QUEUE_JOIN',\n EVENT_PLAYER_CONFIRMED = 'EVENT_PLAYER_CONFIRMED',\n EVENT_MULTIPLE_PLAYER_CONFIRMED = 'EVENT_MULTIPLE_PLAYER_CONFIRMED',\n EVENT_CONFIRM = 'EVENT_CONFIRM',\n EVENT_CHANGE = 'EVENT_CHANGE',\n EVENT_QUEUE_SHIFT = 'EVENT_QUEUE_SHIFT',\n}\n\nexport enum NotificationTypeEventLifeCycle {\n EVENT_STARTING = 'EVENT_STARTING',\n EVENT_END = 'EVENT_END',\n}\n\nexport enum NotificationTypeOrg {\n ORG_ROLE_CHANGE = 'ORG_ROLE_CHANGE',\n ORG_LEFT = 'ORG_LEFT',\n ORG_JOIN = 'ORG_JOIN',\n ORG_DELETE = 'ORG_DELETE',\n ORG_KICK = 'ORG_KICK',\n}\n\nexport enum NotificationTypeFeed {\n FEED_CREATE = 'FEED_CREATE',\n FEED_UPDATE = 'FEED_UPDATE',\n}\n\nexport enum NotificationTypeFeedback {\n PROFILE_COMMENT_CREATE = 'PROFILE_COMMENT_CREATE',\n}\n\nexport const NotificationType = {\n ...NotificationTypeEventInteractions,\n ...NotificationTypeEventLifeCycle,\n ...NotificationTypeOrg,\n ...NotificationTypeFeed,\n ...NotificationTypeFeedback,\n ...NotificationTypeEventChanges,\n};\nexport type NotificationType =\n | NotificationTypeEventChanges\n | NotificationTypeEventInteractions\n | NotificationTypeFeed\n | NotificationTypeFeedback\n | NotificationTypeEventLifeCycle\n | NotificationTypeOrg;\n\nexport enum AchievementEventEnum {\n JOIN_EVENT = 'JOIN_EVENT',\n JOIN_EVENT_REF = 'JOIN_EVENT_REF',\n CREATE_EVENT = 'CREATE_EVENT',\n LEAVE_EVENT = 'LEAVE_EVENT',\n UPDATE_EVENT = 'UPDATE_EVENT',\n DELETE_EVENT = 'DELETE_EVENT',\n JOIN_ORG = 'JOIN_ORG',\n JOIN_ORG_REF = 'JOIN_ORG_REF',\n LEAVE_ORG = 'LEAVE_ORG',\n DELETE_ORG = 'DELETE_ORG',\n CREATE_AVAILABILITY = 'CREATE_AVAILABILITY',\n DELETE_AVAILABILITY = 'DELETE_AVAILABILITY',\n UPDATE_AVAILABILITY = 'UPDATE_AVAILABILITY',\n}\n\ntype PickEnum = {\n [P in keyof K]: P extends K ? P : never;\n};\n\nexport enum FeedbackType {\n REVIEW = 'REVIEW',\n EMOJI = 'EMOJI',\n KARMA = 'KARMA',\n}\n\nexport type AchievementType = PickEnum<\n AchievementEventEnum,\n | AchievementEventEnum.CREATE_EVENT\n | AchievementEventEnum.JOIN_EVENT_REF\n | AchievementEventEnum.CREATE_AVAILABILITY\n | AchievementEventEnum.JOIN_EVENT\n | AchievementEventEnum.JOIN_ORG\n | AchievementEventEnum.JOIN_ORG_REF\n>;\n\nexport enum Bank {\n FIO = 'FIO',\n}\n","export const randomValue = (set: E[]): E =>\n set[Math.floor(Math.random() * set.length)];\n\nexport const randomNumber = (range: number): number =>\n Math.floor(Math.random() * range);\n\nexport const randomString = (): string =>\n (Math.random() + 1).toString(36).substring(5);\n","import { chatClient, messageClient, WS_URL } from '@aclito/client';\nimport dayjs from 'dayjs';\nimport type { Chat, CreateMessageInput, Message } from '@aclito/entities';\nimport { ChatMessageMetaData } from '@aclito/enums';\n\nimport { aclitoApi } from '../api';\nimport { AppState } from '../store';\nimport { assertObjectExists } from '../../util/assertions';\nimport { randomString } from '../../util/randomizers';\nimport { findAllAndReplace } from '../../util/findAndReplace';\nimport { logger } from '../../lib/logger';\nimport { handleError } from '../utils/handleError';\n\nimport { eventApi } from './eventApi';\n\nexport const JOIN_CHAT = 'joinChat';\nexport const LEAVE_CHAT = 'leaveChat';\nexport const SEND_MESSAGE = 'sendMessage';\nexport const FIND_AND_DISPLAY_CHAT = 'findAndDisplayChat';\n\nexport const messageApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [FIND_AND_DISPLAY_CHAT]: builder.query<\n { messages: Message[]; nextToken: string | null },\n { id: string; nextToken: string | null; refetch?: boolean }\n >({\n queryFn: async ({ id, nextToken }) => {\n try {\n const { data: messages } =\n await messageClient.messages.getMessagesByChatId({\n id,\n limit: 20,\n nextToken: nextToken,\n });\n\n return {\n data: { messages: messages.data, nextToken: messages.nextToken },\n };\n } catch (error) {\n return handleError(error);\n }\n },\n serializeQueryArgs: ({ queryArgs }) => {\n const { nextToken, refetch, ...rest } = queryArgs;\n return rest;\n },\n merge: (currentData, { messages, nextToken }, { arg }) => {\n if (arg.refetch) {\n currentData.messages = messages;\n } else {\n currentData.messages.push(...messages);\n }\n currentData.nextToken = nextToken;\n },\n forceRefetch({ currentArg, previousArg }) {\n return !!currentArg?.nextToken && currentArg !== previousArg;\n },\n async onCacheEntryAdded(\n { id },\n { updateCachedData, cacheDataLoaded, cacheEntryRemoved, getState },\n ) {\n const ws = new WebSocket(`${WS_URL}?chatId=${id}`);\n try {\n await cacheDataLoaded;\n const state = getState() as AppState;\n const user = state.userInfo.current;\n // MessageEvent throws TS error in RN repo\n const listener = (event: any) => {\n const data = JSON.parse(event.data) as Message;\n updateCachedData((draft) => {\n if (user.id !== data.from) {\n draft.messages.push(data);\n }\n });\n };\n\n ws.addEventListener('message', listener);\n } catch {\n return;\n }\n await cacheEntryRemoved;\n ws.close();\n },\n }),\n [SEND_MESSAGE]: builder.mutation({\n queryFn: async (input) => {\n try {\n const { data: message } = await messageClient.messages.postMessage(\n input,\n );\n assertObjectExists(message);\n return { data: message };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(data, { dispatch, queryFulfilled, getState }) {\n const state = getState() as AppState;\n const updateIdentifier = randomString();\n const user = state.userInfo.current;\n const patchResult = dispatch(\n messageApi.util.updateQueryData(\n 'findAndDisplayChat',\n { id: data.chatId, nextToken: null },\n (draft) => {\n draft.messages.push({\n id: updateIdentifier,\n message: data.message,\n chatId: data.chatId,\n updatedAt: dayjs().toISOString(),\n createdAt: dayjs().toISOString(),\n date: dayjs().toISOString(),\n from: user.id,\n user,\n sent: false,\n system: false,\n meta: ChatMessageMetaData.Message,\n });\n return draft;\n },\n ),\n );\n try {\n const result = await queryFulfilled;\n dispatch(\n messageApi.util.updateQueryData(\n 'findAndDisplayChat',\n { id: data.chatId, nextToken: null },\n (draft) => {\n const replaced = findAllAndReplace(\n draft.messages,\n result.data,\n (i) => i.id === updateIdentifier,\n );\n return { ...draft, messages: replaced };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n patchResult.undo();\n }\n },\n }),\n [JOIN_CHAT]: builder.mutation({\n queryFn: async ({ id }) => {\n try {\n const { data } = await chatClient.chats.joinChat({ id });\n assertObjectExists(data);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(data, { dispatch, queryFulfilled }) {\n try {\n const res = await queryFulfilled;\n dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: data.eventId },\n (draft) => {\n draft.chat = res.data;\n return draft;\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [LEAVE_CHAT]: builder.mutation({\n queryFn: async ({ id }) => {\n try {\n const { data } = await chatClient.chats.leaveChat({ id });\n assertObjectExists(data);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(data, { dispatch, queryFulfilled, getState }) {\n const state = getState() as AppState;\n const user = state.userInfo.current;\n const patchResult = dispatch(\n eventApi.util.updateQueryData(\n 'displayEvent',\n { id: data.eventId },\n (draft) => {\n if (!draft.chat) return draft;\n\n draft.chat.participants = draft.chat.participants.filter(\n (p) => p !== user.id,\n );\n return draft;\n },\n ),\n );\n try {\n await queryFulfilled;\n } catch (e) {\n logger.debug('API error', { err: e });\n patchResult.undo();\n }\n },\n }),\n }),\n});\n\nexport const {\n useJoinChatMutation,\n useLeaveChatMutation,\n useSendMessageMutation,\n useFindAndDisplayChatQuery,\n useLazyFindAndDisplayChatQuery,\n} = messageApi;\n","import {\n createListenerMiddleware,\n isAnyOf,\n isFulfilled,\n isRejected,\n} from '@reduxjs/toolkit';\n\nimport { errorObject } from '../../api/utils/errorObject';\nimport { RejectAuthType, RejectCommonType } from '../types';\nimport {\n REDUX_UPDATE_EVENT_AS_FINISHED,\n REDUX_LOAD_SEARCH_EVENTS,\n REDUX_FIND_EVENT,\n REDUX_JOIN_REPEATING_EVENTS,\n REDUX_UPDATE_REPEATING_EVENTS,\n REDUX_DELETE_REPEATING_EVENTS,\n} from '../thunks/eventThunks';\nimport {\n REDUX_AUTH_SIGN_IN,\n REDUX_AUTH_SIGN_UP,\n REDUX_AUTH_RQ_NEW_PSWD,\n REDUX_AUTH_SUBMIT_NEW_PSWD,\n REDUX_AUTH_CHANGE_PASSWORD,\n} from '../thunks/authThunks';\nimport {\n REDUX_DELETE_ACC,\n REDUX_UPDATE_MY_PROFILE,\n REDUX_ADD_LOCATION,\n REDUX_POPULATE_FIRST_TIME,\n} from '../thunks/profileThunks';\nimport { REDUX_CREATE_PLACE, REDUX_UPDATE_PLACE } from '../thunks/placeThunks';\nimport { REDUX_DELETE_ALL_NOTIFICATIONS } from '../thunks/notificationThunks';\nimport { FlashMessagesKeys } from '../../util/flashMessage';\nimport { LocaleType, ObjectFromList } from '../../types';\nimport { REDUX_GET_NOTE_USER } from '../thunks/noteThunks';\nimport type { AppState } from '../store';\n\nimport {\n CREATE_EVENT,\n UPDATE_EVENT,\n DELETE_EVENT,\n JOIN_EVENT,\n LEAVE_EVENT,\n} from '@aclito/shared/redux/api/eventApi';\nimport {\n CREATE_FEED,\n DELETE_FEED,\n LIST_FEEDS_BY_MY_ORGS,\n LIST_FEEDS_BY_ORG,\n UPDATE_FEED,\n} from '@aclito/shared/redux/api/feedApi';\nimport {\n CREATE_AVAILABILITY,\n UPDATE_AVAILABILITY,\n DELETE_AVAILABILITY,\n LIST_AVAILABILITIES,\n} from '@aclito/shared/redux/api/availabilityApi';\nimport {\n CREATE_ORGANIZATION,\n UPDATE_ORGANIZATION,\n LEAVE_ORGANIZATION,\n JOIN_ORGANIZATION,\n LIST_MY_ORGANIZATIONS,\n FIND_ORGANIZATION,\n LIST_ALL_ORGANIZATIONS,\n} from '@aclito/shared/redux/api/organizationApi';\nimport { CREATE_REPORT } from '@aclito/shared/redux/api/reportApi';\nimport { LEAVE_CHAT, SEND_MESSAGE } from '@aclito/shared/redux/api/messageApi';\n\ntype RejectType = RejectCommonType | RejectAuthType;\n\ntype PromiseRejected = Record;\n\ntype PromiseType = {\n rejected: Partial | undefined;\n fulfilled: FlashMessagesKeys | undefined;\n};\n\ntype MessagesType = ObjectFromList;\nexport type AnyMessagesType = Record;\n\nconst EventMatches = [\n CREATE_EVENT,\n UPDATE_EVENT,\n DELETE_EVENT,\n JOIN_EVENT,\n LEAVE_EVENT,\n REDUX_UPDATE_EVENT_AS_FINISHED,\n REDUX_LOAD_SEARCH_EVENTS,\n REDUX_FIND_EVENT,\n REDUX_JOIN_REPEATING_EVENTS,\n REDUX_UPDATE_REPEATING_EVENTS,\n REDUX_DELETE_REPEATING_EVENTS,\n] as const;\nconst NoteMatches = [REDUX_GET_NOTE_USER] as const;\nconst ProfileMatches = [\n REDUX_DELETE_ACC,\n REDUX_UPDATE_MY_PROFILE,\n REDUX_ADD_LOCATION,\n] as const;\nconst AvailabilityMatches = [\n CREATE_AVAILABILITY,\n UPDATE_AVAILABILITY,\n DELETE_AVAILABILITY,\n LIST_AVAILABILITIES,\n] as const;\nconst OrganizationMatches = [\n CREATE_ORGANIZATION,\n LEAVE_ORGANIZATION,\n UPDATE_ORGANIZATION,\n JOIN_ORGANIZATION,\n LIST_MY_ORGANIZATIONS,\n FIND_ORGANIZATION,\n LIST_ALL_ORGANIZATIONS,\n] as const;\nconst AuthMatches = [\n REDUX_AUTH_SIGN_IN,\n REDUX_AUTH_SIGN_UP,\n REDUX_AUTH_RQ_NEW_PSWD,\n REDUX_AUTH_SUBMIT_NEW_PSWD,\n REDUX_POPULATE_FIRST_TIME,\n REDUX_AUTH_CHANGE_PASSWORD,\n] as const;\nconst NotificationMatches = [REDUX_DELETE_ALL_NOTIFICATIONS] as const;\nconst FeedMatches = [\n CREATE_FEED,\n UPDATE_FEED,\n DELETE_FEED,\n LIST_FEEDS_BY_MY_ORGS,\n LIST_FEEDS_BY_ORG,\n] as const;\nconst MessagesMatches = [LEAVE_CHAT, SEND_MESSAGE] as const;\nconst PlaceMatches = [REDUX_CREATE_PLACE, REDUX_UPDATE_PLACE] as const;\nconst ReportMatches = [CREATE_REPORT] as const;\n\nconst AllMatches = [\n ...ReportMatches,\n ...PlaceMatches,\n ...MessagesMatches,\n ...FeedMatches,\n ...NotificationMatches,\n ...AuthMatches,\n ...EventMatches,\n ...ProfileMatches,\n ...OrganizationMatches,\n ...AvailabilityMatches,\n ...NoteMatches,\n] as const;\nexport const setupUiMessageMiddleware = (\n notificationCallBack: ({\n locale,\n key,\n }: {\n locale: LocaleType;\n key: FlashMessagesKeys;\n }) => void,\n additionalMatchers?: AnyMessagesType,\n) => {\n const middleware = createListenerMiddleware();\n\n middleware.startListening({\n matcher: isAnyOf(isFulfilled, isRejected),\n effect: async (action: any, listenerApi) => {\n if (action.meta?.arg?.noMessage) {\n return;\n }\n let defaultAction = '',\n promiseResolution = '';\n\n const isRTKQuery =\n action.type.includes('executeQuery') ||\n action.type.includes('executeMutation');\n\n if (isRTKQuery) {\n defaultAction = action.meta?.arg?.endpointName;\n promiseResolution = action.meta?.requestStatus;\n } else {\n [defaultAction, promiseResolution] = action.type.split('/');\n }\n\n if (\n matches(defaultAction, [\n ...AllMatches,\n ...Object.keys(additionalMatchers ?? []),\n ])\n ) {\n const allMessages = { ...messages, ...additionalMatchers };\n const { locale } = listenerApi.getState() as AppState;\n if (promiseResolution.includes('fulfilled')) {\n const type =\n allMessages[defaultAction as keyof typeof allMessages].fulfilled;\n if (type) {\n notificationCallBack({ locale, key: type });\n }\n } else {\n if (isRTKQuery) {\n if (typeof action.payload?.error !== 'string') return;\n } else {\n if (action.payload.type === 'none') return;\n if (typeof action.payload.type !== 'string') return;\n }\n const type =\n allMessages[defaultAction as keyof typeof allMessages].rejected?.[\n (isRTKQuery\n ? action.payload.error\n : action.payload.type) as RejectType\n ];\n if (type) {\n notificationCallBack({ locale, key: type });\n }\n }\n }\n },\n });\n return middleware;\n};\nconst messages: MessagesType = {\n [REDUX_POPULATE_FIRST_TIME]: {\n fulfilled: undefined,\n rejected: {\n ...errorObject,\n },\n },\n [SEND_MESSAGE]: {\n fulfilled: undefined,\n rejected: {\n fail: 'sendMessageError',\n },\n },\n [REDUX_GET_NOTE_USER]: {\n fulfilled: undefined,\n rejected: {\n permission: 'noteUserPermission',\n },\n },\n [CREATE_FEED]: {\n fulfilled: 'feedCreateSuccess',\n rejected: {\n fail: 'feedCreateError',\n },\n },\n [UPDATE_FEED]: {\n fulfilled: 'feedUpdateSuccess',\n rejected: {\n fail: 'feedUpdateError',\n },\n },\n [LIST_FEEDS_BY_MY_ORGS]: {\n fulfilled: undefined,\n rejected: {\n fail: 'feedListError',\n },\n },\n [DELETE_FEED]: {\n fulfilled: 'feedDeleteSuccess',\n rejected: {\n fail: 'feedDeleteError',\n },\n },\n [LIST_FEEDS_BY_ORG]: {\n fulfilled: undefined,\n rejected: {\n fail: 'feedListError',\n },\n },\n [LEAVE_ORGANIZATION]: {\n fulfilled: 'orgLeaveSuccess',\n rejected: {\n permission: 'orgLeavePermission',\n },\n },\n [REDUX_ADD_LOCATION]: {\n fulfilled: 'locationUpdateSuccess',\n rejected: {\n fail: 'locationUpdateError',\n },\n },\n [REDUX_DELETE_ALL_NOTIFICATIONS]: {\n fulfilled: 'notificationDeleteAllSuccess',\n rejected: {\n fail: 'notificationDeleteAllError',\n },\n },\n [REDUX_CREATE_PLACE]: {\n fulfilled: 'placeCreateSuccess',\n rejected: {\n fail: 'placeCreateError',\n },\n },\n [REDUX_UPDATE_PLACE]: {\n fulfilled: 'placeUpdateSuccess',\n rejected: {\n fail: 'placeUpdateError',\n },\n },\n [DELETE_EVENT]: {\n fulfilled: 'deleteEventSuccess',\n rejected: { fail: 'deleteEventError' },\n },\n [REDUX_DELETE_REPEATING_EVENTS]: {\n fulfilled: 'deleteEventSuccess',\n rejected: { fail: 'deleteEventError' },\n },\n [LEAVE_EVENT]: {\n fulfilled: 'leaveEventSuccess',\n rejected: { fail: 'leaveEventError' },\n },\n [UPDATE_EVENT]: {\n fulfilled: 'updateEventSuccess',\n rejected: {\n fail: 'updateEventError',\n permission: 'updateEventPermissionError',\n },\n },\n [REDUX_UPDATE_REPEATING_EVENTS]: {\n fulfilled: 'updateEventSuccess',\n rejected: {\n fail: 'updateEventError',\n },\n },\n [CREATE_EVENT]: {\n fulfilled: 'createEventSuccess',\n rejected: {\n fail: 'createEventError',\n permission: 'createEventPermissionError',\n },\n },\n [REDUX_UPDATE_MY_PROFILE]: {\n fulfilled: 'updateMyProfileSuccess',\n rejected: { fail: 'updateMyProfileError', ...errorObject },\n },\n\n [REDUX_DELETE_ACC]: {\n fulfilled: 'accountDeleteSuccess',\n rejected: { fail: 'accountDeleteError' },\n },\n [JOIN_EVENT]: {\n fulfilled: 'joinEventSuccess',\n rejected: {\n fail: 'joinEventError',\n permission: 'joinEventPermissionError',\n },\n },\n [REDUX_JOIN_REPEATING_EVENTS]: {\n fulfilled: 'joinEventSuccess',\n rejected: {\n fail: 'joinEventError',\n permission: 'joinEventPermissionError',\n },\n },\n [REDUX_FIND_EVENT]: {\n fulfilled: undefined,\n rejected: { fail: 'findEventError' },\n },\n [REDUX_LOAD_SEARCH_EVENTS]: {\n fulfilled: undefined,\n rejected: { fail: 'searchEventsListError', empty: 'searchEventsListEmpty' },\n },\n [REDUX_UPDATE_EVENT_AS_FINISHED]: {\n fulfilled: 'eventUpdatedAsFinishedSuccess',\n rejected: { fail: 'eventUpdatedAsFinishedError' },\n },\n [JOIN_ORGANIZATION]: {\n fulfilled: 'orgJoinSuccess',\n rejected: { fail: 'orgJoinError', permission: 'orgJoinPermission' },\n },\n [UPDATE_ORGANIZATION]: {\n fulfilled: 'orgUpdateSuccess',\n rejected: { fail: 'orgUpdateError' },\n },\n [CREATE_ORGANIZATION]: {\n fulfilled: 'orgCreateSuccess',\n rejected: { fail: 'orgCreateError' },\n },\n [LIST_MY_ORGANIZATIONS]: {\n fulfilled: undefined,\n rejected: { fail: 'orgListError', empty: 'orgListErrorEmpty' },\n },\n [LIST_ALL_ORGANIZATIONS]: {\n fulfilled: undefined,\n rejected: { fail: 'orgListError', empty: 'orgListErrorEmpty' },\n },\n [FIND_ORGANIZATION]: {\n fulfilled: undefined,\n rejected: { fail: 'orgFindError' },\n },\n [REDUX_AUTH_SIGN_IN]: {\n fulfilled: undefined,\n rejected: {\n ...errorObject,\n },\n },\n [REDUX_AUTH_SIGN_UP]: {\n fulfilled: 'signUpSuccess',\n rejected: {\n ...errorObject,\n },\n },\n [REDUX_AUTH_RQ_NEW_PSWD]: {\n fulfilled: 'requestNewPasswordSuccess',\n rejected: {\n ...errorObject,\n },\n },\n [REDUX_AUTH_SUBMIT_NEW_PSWD]: {\n fulfilled: 'submitNewPasswordSuccess',\n rejected: {\n ...errorObject,\n },\n },\n [REDUX_AUTH_CHANGE_PASSWORD]: {\n fulfilled: 'changePasswordSuccess',\n rejected: {\n ...errorObject,\n },\n },\n [CREATE_REPORT]: {\n fulfilled: 'reportCreateSuccess',\n rejected: {\n fail: 'reportCreateError',\n permission: 'reportCreatePermissionError',\n },\n },\n [LEAVE_CHAT]: {\n fulfilled: 'chatLeaveSuccess',\n rejected: {\n fail: 'chatLeaveError',\n },\n },\n [CREATE_AVAILABILITY]: {\n fulfilled: 'availabilityCreateSuccess',\n rejected: {\n fail: 'availabilityCreateError',\n },\n },\n [UPDATE_AVAILABILITY]: {\n fulfilled: 'availabilityUpdateSuccess',\n rejected: {\n fail: 'availabilityUpdaterror',\n },\n },\n [DELETE_AVAILABILITY]: {\n fulfilled: 'availabilityDeleteSuccess',\n rejected: {\n fail: 'availabilityDeleteError',\n },\n },\n [LIST_AVAILABILITIES]: {\n fulfilled: undefined,\n rejected: {\n fail: 'availabilitiesListError',\n empty: 'availabilitiesListErrorEmpty',\n },\n },\n};\nconst matches = (matcher: string, actions: readonly string[]): boolean =>\n actions.some((action) => action === matcher);\n","const primary = '#4CAF50';\nconst primary10 = `${primary}1A`;\nconst red = '#FF5252';\nconst red10 = `${red}1A`;\nconst orange = '#FFC011';\nconst orange10 = `${orange}1A`;\nconst blue = '#3e90ff';\nconst blue10 = `${blue}1A`;\n\nexport const internalPaletteLight: InternalPaletteRecord = {\n primary,\n primary10,\n background: '#F5F5F5',\n red,\n red10,\n orange,\n orange10,\n blue,\n blue10,\n yellow: '#FFD600',\n grey10: '#E6E6E6',\n grey20: '#CCCCCC',\n grey30: '#B3B3B3',\n grey40: '#999999',\n grey50: '#808080',\n grey60: '#666666',\n grey70: '#4D4D4D',\n grey80: '#333333',\n grey90: '#1A1A1A',\n black: '#000000',\n white: '#FFFFFF',\n whiteText: '#FFFFFF',\n reservanto: '#07B7B5',\n chytrarezervace: '#02B6E4',\n transparent: 'rgba(0, 0, 0, 0)',\n};\n\nexport const internalPaletteDark: InternalPaletteRecord = {\n primary,\n primary10,\n background: '#1A1A1A',\n red,\n red10,\n orange,\n orange10,\n blue10,\n blue,\n yellow: '#FFD600',\n grey10: '#4D4D4D',\n grey20: '#666666',\n grey30: '#808080',\n grey40: '#999999',\n grey50: '#B3B3B3',\n grey60: '#CCCCCC',\n grey70: '#E6E6E6',\n grey80: '#FFFFFF',\n grey90: '#1A1A1A',\n black: '#FFFFFF',\n white: '#333333',\n whiteText: '#FFFFFF',\n reservanto: '#07B7B5',\n chytrarezervace: '#02B6E4',\n transparent: 'rgba(0, 0, 0, 0)',\n};\n\nexport const themeColors = (internalPalette: InternalPaletteRecord) => ({\n ...internalPalette,\n success: internalPalette.primary,\n error: internalPalette.red,\n\n bannerRunning: internalPalette.primary,\n bannerAdmin: internalPalette.primary,\n bannerPowerUser: internalPalette.blue,\n bannerJoinedAlias: internalPalette.primary,\n bannerQueued: internalPalette.orange,\n bannerConfirmed: internalPalette.yellow,\n bannerEventOrganizer: internalPalette.primary,\n\n achievement0: internalPalette.primary,\n achievement1: '#CD7F32',\n achievement2: '#A0CAE9',\n achievement3: '#FFD300',\n achievement4: '#4BE74A',\n achievement5: '#12AC40',\n achievement6: '#43D9E7',\n achievement7: '#35ADF9',\n achievement8: '#E0ABFF',\n achievement9: '#B64EF4',\n achievement10: '#EC2D2D',\n\n text: internalPalette.grey80,\n placeholder: internalPalette.grey50,\n border: internalPalette.grey40,\n mapCircle: internalPalette.primary10,\n mapCircleStroke: internalPalette.primary,\n notificationInfo: '#3576FA',\n copy: 'blue',\n copied: 'teal',\n reservanto: '#01b7b6',\n facebookBlue: '#1877F2',\n googleText: '#777777',\n\n lowKarma: internalPalette.red,\n karma: internalPalette.primary,\n\n shadow: internalPalette.grey30,\n modalOverlay: internalPalette.grey80,\n});\nexport const activityColors = {\n icehockey: '#0fb7ff',\n tennis: '#d2eb1a',\n running: '#a600bf',\n badminton: '#a35007',\n volleyball: '#ffbe19',\n football: '#28a100',\n golf: '#ffe8d6',\n tabletennis: '#a00744',\n handball: '#8e70ff',\n box: '#882166',\n swimming: '#bbad86',\n iceskating: '#dd8479',\n archery: '#204fcc',\n baseball: '#433DAF',\n bowling: '#9932CC',\n personaltraining: '#525722',\n cricket: '#997609',\n curling: '#f46488',\n cycling: '#cf792d',\n darts: '#719c72',\n billiard: '#1b8b52',\n wallclimbing: '#dfc646',\n rugby: '#684120',\n skateboarding: '#A3514F',\n skiing: '#685cf1',\n snowboarding: '#7ee8f6',\n squash: '#2372c8',\n fencing: '#2f5e5b',\n karate: '#bc0223',\n taekwondo: '#df869d',\n beachvolleyball: '#9B70C8',\n chess: '#BDE9A5',\n wrestling: '#D6E96A',\n horseriding: '#b2b6ca',\n fitness: '#eff147',\n pilates: '#3c7fa3',\n gym: '#8aa5e8',\n yoga: '#82a49a',\n hiking: '#3CE5B2',\n basketball: '#FF4500',\n circletraining: '#32CD32',\n aerobic: '#FFD700',\n spinning: '#1E90FF',\n tabata: '#FF6347',\n trx: '#8B008B',\n bosu: '#FFA500',\n heat: '#FF69B4',\n hiit: '#FF1493',\n zumba: '#FF0000',\n trampoline: '#00CED1',\n ballet: '#FF8C00',\n poledance: '#800080',\n hathayoga: '#2E8B57',\n poweryoga: '#228B22',\n dance: '#20B2AA',\n bachata: '#E57373',\n crossfit: '#FF5733',\n bodyform: '#81C784',\n any: '#4CAF50',\n default: '#FFFFFF',\n} as const;\n\nexport type ActivitiesColorsType = typeof activityColors;\nexport type ThemeColorsType = ReturnType;\nexport type ThemeColorsKeys = keyof ReturnType;\nexport type ThemeColorsRecord = Record;\nexport const colors = {\n palette: { ...themeColors(internalPaletteLight), activityColors },\n activitiesPalette: activityColors,\n ...themeColors(internalPaletteLight),\n};\ntype InternalPaletteRecord = Record;\ntype InternalPalette =\n | 'primary'\n | 'primary10'\n | 'background'\n | 'red'\n | 'red10'\n | 'yellow'\n | 'orange'\n | 'orange10'\n | 'grey10'\n | 'grey20'\n | 'grey30'\n | 'grey40'\n | 'grey50'\n | 'grey60'\n | 'grey70'\n | 'grey80'\n | 'grey90'\n | 'blue'\n | 'blue10'\n | 'black'\n | 'white'\n | 'whiteText'\n | 'transparent'\n | 'reservanto'\n | 'chytrarezervace';\n","import { createContext, ReactNode, useEffect, useState } from 'react';\nimport { ThemeProvider as ThemeProviderSC } from 'styled-components';\nimport {\n activityColors,\n internalPaletteDark,\n internalPaletteLight,\n themeColors,\n} from '@aclito/shared/theme/colors';\nimport { storage } from '@aclito/shared/lib/storage';\n\ntype ThemeProviderProps = {\n children: ReactNode;\n defaultTheme?: Theme;\n withStorage?: boolean;\n};\nexport type Theme = 'light' | 'dark';\nexport const ThemeContext = createContext<{\n theme: Theme;\n toggleTheme: () => void;\n}>({\n theme: 'light',\n toggleTheme: () => {\n return;\n },\n});\n\nconst ThemeProvider = ({\n children,\n defaultTheme,\n withStorage,\n}: ThemeProviderProps) => {\n const [theme, setTheme] = useState(defaultTheme ?? 'light');\n\n const colors = {\n activitiesPalette: activityColors,\n transparent: 'rgba(0, 0, 0, 0)',\n };\n\n const setMode = async (mode: Theme) => {\n withStorage && (await storage.setItem('theme', mode));\n setTheme(mode);\n };\n\n const toggleTheme = () => {\n theme === 'light' ? setMode('dark') : setMode('light');\n };\n\n const getTheme = async () => {\n const localTheme = (await storage.getItem('theme')) as Theme;\n localTheme && setTheme(localTheme);\n };\n\n useEffect(() => {\n withStorage && getTheme();\n }, []);\n\n return (\n \n \n \n {children}\n \n \n );\n};\nconst AvatarsMask = () => (\n \n \n \n \n \n);\nexport default ThemeProvider;\n","const sizeMin = {\n mobileS: 320,\n mobile: 481,\n tablet: 769,\n laptop: 1025,\n desktop: 1201,\n desktopL: 1470,\n};\n\nexport const sizeMax = {\n mobileS: 319,\n mobile: 480,\n tabletS: 650,\n tablet: 768,\n laptop: 1024,\n desktop: 1200,\n desktopL: 1470,\n desktopXL: 1680,\n desktopMax: 2200,\n};\n\nexport const deviceMin = {\n mobileS: `(min-width: ${sizeMin.mobileS}px)`,\n mobile: `(min-width: ${sizeMin.mobile}px)`,\n tablet: `(min-width: ${sizeMin.tablet}px)`,\n laptop: `(min-width: ${sizeMin.laptop}px)`,\n desktop: `(min-width: ${sizeMin.desktop}px)`,\n desktopL: `(min-width: ${sizeMin.desktopL})`,\n desktopXL: `(min-width: ${sizeMax.desktopXL}px)`,\n};\n\nexport const deviceMax = {\n mobileS: `(max-width: ${sizeMax.mobileS}px)`,\n mobile: `(max-width: ${sizeMax.mobile}px)`,\n tabletS: `(max-width: ${sizeMax.tabletS}px)`,\n tablet: `(max-width: ${sizeMax.tablet}px)`,\n laptop: `(max-width: ${sizeMax.laptop}px)`,\n desktop: `(max-width: ${sizeMax.desktop}px)`,\n desktopL: `(max-width: ${sizeMax.desktopL}px)`,\n desktopXL: `(max-width: ${sizeMax.desktopXL}px)`,\n desktopMax: `${sizeMax.desktopMax}px`,\n};\n\nexport const columnsFullWidth = {\n xs: 6,\n sm: 4,\n md: 4,\n lg: 3,\n xl: 2,\n};\n\nexport const columnsThreeFourths = {\n xs: 6,\n sm: 6,\n md: 4,\n lg: 4,\n xl: 3,\n};\n","import { colors } from '@aclito/shared/theme/colors';\nimport { MantineThemeOverride } from '@mantine/core';\n\nimport { sizeMax } from './mediaQueries';\n\nconst convertPxToRem = (sizeInPx: number): string => {\n const oneRemInPx = 16;\n return `${sizeInPx / oneRemInPx}rem`;\n};\n\nexport const WebTheme: MantineThemeOverride = {\n colors: {\n // @ts-ignore\n primary: [...Array(10)].fill(colors.primary),\n dark: [\n colors.white,\n colors.grey50,\n colors.grey30,\n colors.grey50,\n colors.grey70,\n colors.grey70,\n colors.grey80,\n colors.grey80,\n colors.grey90,\n colors.grey90,\n ],\n },\n primaryColor: 'primary',\n breakpoints: {\n xs: convertPxToRem(sizeMax.mobile),\n sm: convertPxToRem(sizeMax.tablet),\n md: convertPxToRem(sizeMax.laptop),\n lg: convertPxToRem(sizeMax.desktop),\n xl: convertPxToRem(sizeMax.desktopL),\n },\n};\n","import { ApiAuthErrors } from '../api/types/types';\nimport { TranslateKey, TranslateValues } from '../types';\n\nexport interface FlashMessageInterface {\n type: 'none' | 'default' | 'info' | 'success' | 'danger' | 'warning';\n autoHide?: boolean;\n translation: TranslateKey;\n values?: TranslateValues;\n}\nexport type EventFlashMessageKeys =\n | 'searchEventsListError'\n | 'searchEventsListEmpty'\n | 'searchEventsLocationListEmpty'\n | 'eventUpdatedAsFinishedSuccess'\n | 'eventUpdatedAsFinishedError'\n | 'findEventError'\n | 'joinEventError'\n | 'joinEventSuccess'\n | 'createEventSuccess'\n | 'createEventPermissionError'\n | 'createEventError'\n | 'updateEventSuccess'\n | 'updateEventError'\n | 'updateEventPermissionError'\n | 'deleteEventSuccess'\n | 'deleteEventError'\n | 'joinEventPermissionError'\n | 'joinEventInvalidGender'\n | 'joinEventUnknownGender'\n | 'leaveEventSuccess'\n | 'leaveEventError'\n | 'eventNoSpace';\n\nexport type ProfileFlashMessageKeys =\n | 'updateMyProfileSuccess'\n | 'updateMyProfileError'\n | 'createContactRequestSuccess'\n | 'createContactRequestError'\n | 'createContactPermission'\n | 'accountDeleteSuccess'\n | 'accountDeleteError'\n | 'locationUpdateSuccess'\n | 'locationUpdateError';\n\nexport type AvailabilityFlashMessageKeys =\n | 'availabilityCreateSuccess'\n | 'availabilityCreateError'\n | 'availabilityUpdateSuccess'\n | 'availabilityUpdaterror'\n | 'availabilitiesListError'\n | 'availabilitiesListErrorEmpty'\n | 'availabilityDeleteSuccess'\n | 'availabilityDeleteError';\n\nexport type OrgFlashMessageKeys =\n | 'orgCreateSuccess'\n | 'orgCreateError'\n | 'orgUpdateSuccess'\n | 'orgUpdateError'\n | 'orgJoinSuccess'\n | 'orgJoinError'\n | 'orgListError'\n | 'orgAddMemberSuccess'\n | 'orgAddMemberError'\n | 'orgListErrorEmpty'\n | 'orgFindError'\n | 'orgLeavePermission'\n | 'orgLeaveSuccess'\n | 'orgJoinPermission';\n\nexport type FeedFlashMessagesKeys =\n | 'feedCreateSuccess'\n | 'feedCreateError'\n | 'feedUpdateSuccess'\n | 'feedUpdateError'\n | 'feedListError'\n | 'feedDeleteSuccess'\n | 'feedDeleteError';\n\nexport type PlacesFlashMessagesKeys =\n | 'placeCreateSuccess'\n | 'placeCreateError'\n | 'placeUpdateSuccess'\n | 'placeUpdateError';\n\nexport type AppFlashMessageKeys =\n | 'eventInfoEditPlace'\n | 'availabilityEditHasEvent'\n | 'availabilityGender'\n | 'availabilityEditHasAvailability'\n | 'locationServicesSettings'\n | 'locationServicesConfirmed'\n | 'notAdmin'\n | 'qrSaved'\n | 'qrSavedPermission'\n | 'calendarPermission'\n | 'calendarSave'\n | 'calendarError'\n | 'calendarRemove'\n | 'calendarRemoveError'\n | 'calendarUpdate'\n | 'calendarUpdateError'\n | 'uploadImage'\n | 'qrSavedError'\n | 'qrSelectPermission'\n | 'qrSelectError'\n | 'qrRecognitionError'\n | 'connectionError'\n | 'connectionSuccess'\n | 'pushNotificationError'\n | 'notSignInError'\n | 'paymentError'\n | 'changesApplied'\n | 'changesNotApplied';\n\nexport type NoteFlashMessageKeys = 'noteUserPermission';\n\nexport type ReportFlashMessageKeys =\n | 'reportCreateSuccess'\n | 'reportCreateError'\n | 'reportCreatePermissionError';\n\nexport type NotificationFlashMessageKeys =\n | 'notificationDeleteAllError'\n | 'notificationDeleteAllSuccess';\n\nexport type ChatMessagesKeys =\n | 'chatLeaveSuccess'\n | 'chatLeaveError'\n | 'sendMessageError';\n\nexport type AuthMessageKeys =\n | 'signUpSuccess'\n | 'requestNewPasswordSuccess'\n | 'submitNewPasswordSuccess'\n | 'changePasswordSuccess';\n\nexport type FlashMessagesKeys =\n | AuthMessageKeys\n | ReportFlashMessageKeys\n | NotificationFlashMessageKeys\n | ChatMessagesKeys\n | OrgFlashMessageKeys\n | AvailabilityFlashMessageKeys\n | EventFlashMessageKeys\n | ProfileFlashMessageKeys\n | ApiAuthErrors\n | PlacesFlashMessagesKeys\n | FeedFlashMessagesKeys\n | AppFlashMessageKeys\n | NoteFlashMessageKeys;\n\nexport const flashMessages: Record = {\n eventNoSpace: {\n type: 'info',\n translation: 'event.info.nospace',\n },\n changesNotApplied: {\n type: 'danger',\n translation: 'error.changesnotapplied',\n },\n changesApplied: {\n type: 'success',\n translation: 'success.changesapplied',\n },\n sendMessageError: {\n type: 'danger',\n translation: 'error.messageSend',\n },\n paymentError: {\n type: 'danger',\n translation: 'payment.error',\n },\n qrSelectPermission: {\n type: 'info',\n translation: 'qr.select.permission',\n },\n qrSelectError: {\n type: 'danger',\n translation: 'qr.select.error',\n },\n qrRecognitionError: {\n type: 'danger',\n translation: 'qr.recognition.error',\n },\n qrSaved: {\n type: 'info',\n translation: 'qr.saved',\n },\n uploadImage: {\n type: 'info',\n translation: 'upload.image.error',\n },\n qrSavedPermission: {\n type: 'info',\n translation: 'qr.qrSavedPermission',\n },\n calendarPermission: {\n type: 'info',\n translation: 'calendar.permission',\n },\n calendarSave: {\n type: 'success',\n translation: 'calendar.successSave',\n },\n calendarRemove: {\n type: 'success',\n translation: 'calendar.remove.success',\n },\n calendarRemoveError: {\n type: 'danger',\n translation: 'calendar.remove.error',\n },\n calendarUpdate: {\n type: 'info',\n translation: 'calendar.update.success',\n },\n calendarUpdateError: {\n type: 'danger',\n translation: 'calendar.update.error',\n },\n calendarError: {\n type: 'danger',\n translation: 'calendar.saveError',\n },\n qrSavedError: {\n type: 'danger',\n translation: 'qr.savedError',\n },\n notAdmin: {\n type: 'danger',\n autoHide: true,\n translation: 'auth.not.admin',\n },\n locationServicesSettings: {\n type: 'info',\n autoHide: false,\n translation: 'location.services.openSettings',\n },\n locationServicesConfirmed: {\n type: 'success',\n translation: 'location.services.liveConfirm',\n },\n availabilityGender: {\n type: 'warning',\n autoHide: false,\n translation: 'availability.enter.text',\n },\n feedCreateError: {\n type: 'danger',\n translation: 'error.createFeed',\n },\n feedUpdateError: {\n type: 'danger',\n translation: 'error.updateFeed',\n },\n feedListError: {\n type: 'danger',\n translation: 'error.listFeeds',\n },\n feedCreateSuccess: {\n type: 'success',\n translation: 'success.createFeed',\n },\n feedUpdateSuccess: {\n type: 'success',\n translation: 'success.updateFeed',\n },\n feedDeleteError: {\n type: 'danger',\n translation: 'error.deleteFeed',\n },\n feedDeleteSuccess: {\n type: 'success',\n translation: 'success.deleteFeed',\n },\n noteUserPermission: {\n type: 'danger',\n translation: 'error.noteUserPermission',\n },\n notSignInError: {\n type: 'warning',\n translation: 'error.notSignInError',\n },\n availabilityEditHasEvent: {\n type: 'warning',\n translation: 'availability.new.error.event',\n },\n availabilityEditHasAvailability: {\n type: 'warning',\n translation: 'availability.new.error.availability',\n },\n eventInfoEditPlace: {\n type: 'warning',\n translation: 'events.new.place.error.body',\n },\n locationUpdateError: { type: 'danger', translation: 'error.location.update' },\n locationUpdateSuccess: {\n type: 'success',\n translation: 'success.location.update',\n },\n notificationDeleteAllError: {\n type: 'danger',\n translation: 'error.deleteAllNotifications',\n },\n notificationDeleteAllSuccess: {\n type: 'success',\n translation: 'success.deleteAllNotifications',\n },\n placeCreateSuccess: {\n type: 'success',\n translation: 'success.createPlace',\n },\n placeCreateError: {\n type: 'danger',\n translation: 'error.createPlace',\n },\n placeUpdateSuccess: {\n type: 'success',\n translation: 'success.updatePlace',\n },\n placeUpdateError: {\n type: 'danger',\n translation: 'error.updatePlace',\n },\n chatLeaveSuccess: {\n type: 'success',\n translation: 'success.leaveChat',\n },\n chatLeaveError: {\n type: 'danger',\n translation: 'error.leaveChat',\n },\n leaveEventSuccess: { type: 'success', translation: 'success.leaveEvent' },\n leaveEventError: { type: 'danger', translation: 'error.leaveEvent' },\n accountDeleteError: { type: 'danger', translation: 'error.deleteAccount' },\n accountDeleteSuccess: {\n type: 'success',\n translation: 'success.deleteAccount',\n },\n createContactRequestSuccess: {\n type: 'success',\n translation: 'success.contactRequest',\n },\n createContactRequestError: {\n type: 'danger',\n translation: 'error.contactRequest',\n },\n createContactPermission: {\n type: 'info',\n translation: 'error.permission.contactRequest',\n },\n updateMyProfileSuccess: {\n type: 'success',\n translation: 'success.updateProfile',\n },\n updateMyProfileError: {\n type: 'danger',\n translation: 'error.updateProfile',\n },\n joinEventPermissionError: {\n type: 'danger',\n translation: 'error.joinEventPermission',\n },\n joinEventInvalidGender: {\n type: 'danger',\n translation: 'events.invalid.gender',\n },\n joinEventUnknownGender: {\n type: 'danger',\n translation: 'events.unknown.gender',\n },\n deleteEventSuccess: {\n type: 'success',\n translation: 'success.deleteEvent',\n },\n deleteEventError: {\n type: 'danger',\n translation: 'error.deleteEvent',\n },\n updateEventSuccess: {\n type: 'success',\n translation: 'success.updateEvent',\n },\n updateEventError: {\n type: 'danger',\n translation: 'error.eventUpdate',\n },\n updateEventPermissionError: {\n type: 'danger',\n translation: 'error.permission.eventUpdate',\n },\n createEventError: {\n type: 'danger',\n translation: 'error.eventCreate',\n },\n createEventPermissionError: {\n type: 'danger',\n translation: 'error.permission.eventCreate',\n },\n createEventSuccess: {\n type: 'success',\n translation: 'success.createEvent',\n },\n pushNotificationError: {\n type: 'info',\n autoHide: false,\n translation: 'error.pushNotification',\n },\n joinEventError: {\n type: 'danger',\n translation: 'error.joinEvent',\n },\n joinEventSuccess: {\n type: 'success',\n translation: 'success.joinEvent',\n },\n findEventError: {\n type: 'danger',\n translation: 'error.findEvent',\n },\n eventUpdatedAsFinishedError: {\n type: 'danger',\n translation: 'error.eventUpdatedAsFinished',\n },\n eventUpdatedAsFinishedSuccess: {\n type: 'success',\n translation: 'success.eventUpdatedAsFinished',\n },\n searchEventsListEmpty: {\n type: 'info',\n translation: 'error.empty.searchEventList',\n },\n searchEventsListError: {\n type: 'danger',\n translation: 'error.searchEventList',\n },\n searchEventsLocationListEmpty: {\n type: 'info',\n translation: 'error.empty.searchEventLocationList',\n },\n availabilityDeleteSuccess: {\n type: 'success',\n translation: 'success.availability.delete',\n },\n availabilityDeleteError: {\n type: 'danger',\n translation: 'error.availability.delete',\n },\n availabilityCreateSuccess: {\n type: 'success',\n translation: 'success.availability.create',\n },\n availabilityCreateError: {\n type: 'danger',\n translation: 'error.availability.create',\n },\n availabilityUpdateSuccess: {\n type: 'success',\n translation: 'success.availability.update',\n },\n availabilityUpdaterror: {\n type: 'danger',\n translation: 'error.availability.update',\n },\n availabilitiesListError: {\n type: 'danger',\n translation: 'error.availabilities.list',\n },\n availabilitiesListErrorEmpty: {\n type: 'info',\n translation: 'error.empty.availabilities.list',\n },\n reportCreatePermissionError: {\n type: 'warning',\n translation: 'error.permission.createReport',\n },\n reportCreateError: {\n type: 'danger',\n translation: 'error.createReport',\n },\n reportCreateSuccess: {\n type: 'success',\n translation: 'success.createreport',\n },\n orgAddMemberError: { type: 'danger', translation: 'error.orgAddMember' },\n orgAddMemberSuccess: { type: 'success', translation: 'success.orgAddMember' },\n orgCreateSuccess: {\n type: 'success',\n translation: 'success.CreateOrg',\n },\n orgCreateError: {\n type: 'danger',\n translation: 'error.CreateOrg',\n },\n orgUpdateError: {\n type: 'danger',\n translation: 'error.UpdateOrg',\n },\n orgUpdateSuccess: {\n type: 'success',\n translation: 'success.UpdateOrg',\n },\n orgJoinError: {\n type: 'danger',\n translation: 'error.JoinOrg',\n },\n orgJoinPermission: {\n type: 'danger',\n translation: 'error.JoinOrgPermission',\n },\n orgLeavePermission: {\n type: 'info',\n translation: 'error.LeaveOrgPermission',\n },\n orgLeaveSuccess: {\n type: 'success',\n translation: 'success.leaveOrg',\n },\n orgJoinSuccess: {\n type: 'success',\n translation: 'success.JoinOrg',\n },\n orgListError: {\n type: 'danger',\n translation: 'error.ListOrg',\n },\n orgListErrorEmpty: {\n type: 'info',\n translation: 'error.empty.ListOrg',\n },\n orgFindError: {\n type: 'danger',\n translation: 'error.FindOrg',\n },\n signUpSuccess: {\n type: 'info',\n translation: 'success.register',\n },\n requestNewPasswordSuccess: {\n type: 'success',\n translation: 'success.requestNewPassword',\n },\n submitNewPasswordSuccess: {\n type: 'success',\n translation: 'success.submitNewPassword',\n },\n changePasswordSuccess: {\n type: 'success',\n translation: 'success.changePassword',\n },\n NotAuthorizedException: {\n type: 'danger',\n translation: 'error.NotAuthorizedException',\n },\n UserNotConfirmedException: {\n type: 'danger',\n translation: 'error.UserNotConfirmedException',\n },\n AttributesErrorException: {\n type: 'danger',\n translation: 'error.AttributesErrorException',\n },\n ExpiredCodeException: {\n type: 'danger',\n translation: 'error.ExpiredCodeException',\n },\n LimitExceededException: {\n type: 'danger',\n translation: 'error.LimitExceededException',\n },\n InvalidParameterException: {\n type: 'danger',\n translation: 'error.InvalidParameterException',\n },\n InvalidPasswordException: {\n type: 'danger',\n translation: 'error.InvalidPasswordException',\n },\n UsernameExistsException: {\n type: 'danger',\n translation: 'error.UsernameExistsException',\n },\n NoUserException: {\n type: 'danger',\n translation: 'error.NoUserException',\n },\n PasswordErrorException: {\n type: 'danger',\n translation: 'error.PasswordErrorException',\n },\n PasswordResetRequiredException: {\n type: 'danger',\n translation: 'error.PasswordResetRequiredException',\n },\n UserNotFoundException: {\n type: 'danger',\n translation: 'error.NotAuthorizedException',\n },\n UserLambdaValidationException: {\n type: 'danger',\n translation: 'error.UserLambdaValidationException',\n },\n connectionError: {\n type: 'danger',\n translation: 'error.noconnection',\n autoHide: false,\n },\n connectionSuccess: {\n type: 'success',\n translation: 'success.noconnection',\n },\n};\n","import { FlashMessageInterface } from './flashMessage';\n\nimport { colors } from '@aclito/shared/theme/colors';\nimport { SnackBarIconType } from '@aclito/shared/types';\n\nexport const getBackgroundColor = (type: FlashMessageInterface['type']) => {\n const backgroundColors: Record = {\n danger: colors.red,\n default: colors.red,\n info: colors.notificationInfo,\n none: colors.notificationInfo,\n success: colors.primary,\n warning: colors.orange,\n };\n\n return backgroundColors[type];\n};\n\nexport const getIcon = (type: FlashMessageInterface['type']) => {\n const icons: Record = {\n danger: 'notificationError',\n default: 'notificationError',\n info: 'notificationWarning',\n none: 'notificationWarning',\n success: 'notificationSuccess',\n warning: 'notificationWarning',\n };\n\n return icons[type];\n};\n","import { createIntl, createIntlCache } from 'react-intl';\n\nimport { messages } from '../i18n/I18nProvider';\nimport { LocaleType, TranslateKey, TranslateValues } from '../types';\n\nconst cache = createIntlCache();\nexport const makeMessage = (\n id: TranslateKey,\n locale: LocaleType,\n values?: TranslateValues,\n) => {\n const intl = createIntl({ locale, messages: messages[locale] }, cache);\n return intl.formatMessage({ id }, values);\n};\n","import { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport { SnackBarIconType } from '@aclito/shared/types';\nimport React, { cloneElement, HTMLAttributes } from 'react';\nimport { IconBaseProps } from 'react-icons';\nimport { AiOutlineLock, AiOutlineTrophy } from 'react-icons/ai';\nimport { RiErrorWarningLine } from 'react-icons/ri';\nimport {\n BsFillCaretDownFill,\n BsFillCaretUpFill,\n BsFillCreditCardFill,\n BsFillShiftFill,\n BsGenderAmbiguous,\n BsTelephone,\n} from 'react-icons/bs';\nimport { FaCheck } from 'react-icons/fa6';\nimport { FcGoogle } from 'react-icons/fc';\nimport {\n IoMdLink,\n IoMdPhotos,\n IoMdPodium,\n IoMdTime,\n IoMdPower,\n IoMdTrash,\n} from 'react-icons/io';\nimport {\n IoLogoInstagram,\n IoLogoFacebook,\n IoLogoYoutube,\n IoChevronDown,\n IoChevronUp,\n IoChevronDownOutline,\n IoChevronUpOutline,\n IoExit,\n IoHandRight,\n IoInfinite,\n IoLocation,\n IoLogoApple,\n IoMenu,\n IoPersonAdd,\n IoPersonCircle,\n IoPlayCircle,\n IoPricetagOutline,\n IoRefresh,\n IoSendSharp,\n IoFilter,\n IoChevronBackOutline,\n IoChevronForwardOutline,\n IoLogoLinkedin,\n IoChevronForward,\n} from 'react-icons/io5';\nimport {\n MdOutlineEmojiEmotions,\n MdAdd,\n MdOutlineCalendarMonth,\n MdArrowBack,\n MdArrowForward,\n MdKey,\n MdCheck,\n MdChevronLeft,\n MdClose,\n MdContentCopy,\n MdDangerous,\n MdDownload,\n MdOutlineEmail,\n MdLanguage,\n MdOutlineLocationOn,\n MdMessage,\n MdMoreHoriz,\n MdNotes,\n MdNotificationsNone,\n MdOutlineMyLocation,\n MdOutlineGroup,\n MdOutlineAccountCircle,\n MdPersonAdd,\n MdPersonSearch,\n MdRemoveCircleOutline,\n MdRepeat,\n MdReport,\n MdSave,\n MdSearch,\n MdOutlineSettings,\n MdOutlineTextsms,\n MdTimer,\n MdWarning,\n MdHelpOutline,\n MdPostAdd,\n MdEdit,\n MdOutlineLightMode,\n MdOutlineDarkMode,\n MdOutlineCancel,\n MdExpandMore,\n MdOutlineEvent,\n MdOutlineAssignment,\n MdOutlineShare,\n MdOutlinePersonRemove,\n MdOutlineCheckCircleOutline,\n MdPrint,\n MdHeartBroken,\n MdOutlineHeartBroken,\n MdOutlineThumbUpOffAlt,\n MdOutlinePayments,\n MdOutlinePending,\n MdOutlineShoppingCart,\n MdQrCode,\n MdPercent,\n MdInfoOutline,\n} from 'react-icons/md';\nimport { ImEmbed } from 'react-icons/im';\nimport { Loader } from '@mantine/core';\nimport { useTheme } from 'styled-components';\nimport {\n BiCalendarCheck,\n BiCommentAdd,\n BiSolidCommentCheck,\n} from 'react-icons/bi';\nimport { TbFlame } from 'react-icons/tb';\n\nexport type IconTypes = keyof typeof iconRegistry | keyof SnackBarIconType;\n\nexport interface IconProps extends HTMLAttributes {\n icon: IconTypes;\n containerStyle?: React.CSSProperties;\n color?: ThemeColorsKeys;\n size?: '8' | '16' | '20' | '24' | '32' | '48' | number;\n originalColor?: string;\n iconProps?: IconBaseProps;\n}\n\nexport const Icon: React.FC = ({\n icon,\n color,\n size,\n containerStyle,\n originalColor,\n iconProps,\n ...wrapperProps\n}) => {\n const theme = useTheme();\n const overrideColor = color ? theme[color] : theme.grey80;\n\n const overrideSize = size\n ? typeof size === 'string'\n ? parseInt(size, 10)\n : size\n : 24;\n\n const i = iconRegistry[icon as IconType] as React.ReactElement;\n\n const el = cloneElement(i ??
, {\n color: originalColor || overrideColor,\n size: overrideSize,\n ...iconProps,\n style: {\n margin: 'auto',\n display: 'block',\n },\n });\n\n return (\n
\n {el}\n
\n );\n};\n\nconst snackBarIconRegistry: Record = {\n notificationError: ,\n notificationWarning: ,\n notificationSuccess: ,\n};\n\nexport const iconRegistry = {\n streak: ,\n info: ,\n percent: ,\n shopping: ,\n language: ,\n credentials: ,\n payment: ,\n pending: ,\n telephone: ,\n facebook: ,\n emoji: ,\n instagram: ,\n linkedin: ,\n youtube: ,\n lock: ,\n apple: ,\n google: ,\n time: ,\n timer: ,\n calendar: ,\n availability: ,\n alert: ,\n remove: ,\n add: ,\n share: ,\n infinite: ,\n repeat: ,\n bannerPerson: ,\n bannerPlay: ,\n place: ,\n myLocation: ,\n chevronUp: ,\n chevronRight: ,\n chevronDown: ,\n chevronUpOutline: ,\n chevronDownOutline: ,\n level: ,\n gender: ,\n price: ,\n menu: ,\n edit: ,\n personRemove: ,\n checkmarkCircle: ,\n checkmark: ,\n copy: ,\n qr: ,\n questionMarkCircle: ,\n map: ,\n caretDown: ,\n caretUp: ,\n backArrow: ,\n back: ,\n notifications: ,\n settings: ,\n logout: ,\n person: ,\n chat: ,\n search: ,\n close: ,\n forward: ,\n send: ,\n refresh: ,\n delete: ,\n more: ,\n personSearch: ,\n link: ,\n feedback: ,\n commentAdd: ,\n commentCheck: ,\n karmaProvided: ,\n karmaRemove: ,\n org: ,\n contactRequest: ,\n personAdd: ,\n email: ,\n warning: ,\n leave: ,\n multisport: ,\n message: ,\n picture: ,\n queueShift: ,\n download: ,\n addPerson: ,\n suggest: ,\n clear: ,\n filter: ,\n report: ,\n leftArrow: ,\n rightArrow: ,\n leftDrop: ,\n embed: ,\n loading: ,\n note: ,\n save: ,\n dark: ,\n light: ,\n feedAdd: ,\n feed: ,\n expandMore: ,\n datePicker: ,\n upload: ,\n print: ,\n ...snackBarIconRegistry,\n trophy: ,\n};\n\nexport type IconType = keyof typeof iconRegistry;\n","import {\n FlashMessageInterface,\n flashMessages,\n FlashMessagesKeys,\n} from '@aclito/shared/util/flashMessage';\nimport { cleanNotifications, showNotification } from '@mantine/notifications';\nimport { colors } from '@aclito/shared/theme/colors';\nimport {\n getBackgroundColor,\n getIcon,\n} from '@aclito/shared/util/snackBarConfig';\nimport { LocaleType } from '@aclito/shared/types';\nimport { NotificationProps } from '@mantine/notifications/lib/types';\nimport { makeMessage } from '@aclito/shared/util/makeTranslatedMessage';\n\nimport { Icon } from '../components/Icons/Icon';\n\ntype FlashMessageProps =\n | {\n locale: LocaleType;\n onClick?: () => void;\n key: FlashMessagesKeys;\n options?: Partial;\n }\n | {\n message: string;\n onClick?: () => void;\n type: FlashMessageInterface['type'];\n options?: Partial;\n };\n\nexport const showFlashMessage = (props: FlashMessageProps) => {\n let type: FlashMessageInterface['type'] = 'none';\n let autoHide = true;\n let options: Partial = {};\n let message = '';\n if ('type' in props) {\n type = props.type;\n options = props.options ?? {};\n message = props.message;\n }\n if ('key' in props) {\n const {\n translation,\n values,\n type: messageType,\n autoHide: messageAutoHide,\n ...messageOptions\n } = flashMessages[props.key];\n options = messageOptions;\n type = messageType;\n autoHide = messageAutoHide || autoHide;\n message = makeMessage(translation, props.locale, values);\n }\n\n const backgroundColor = getBackgroundColor(type);\n\n showNotification({\n ...options,\n autoClose: autoHide,\n onClick: () => {\n if (props.onClick) props.onClick();\n cleanNotifications();\n },\n message: message,\n icon: ,\n styles: {\n description: {\n color: colors.whiteText,\n },\n closeButton: {\n color: colors.whiteText,\n backgroundColor,\n ':hover': { backgroundColor },\n },\n icon: {\n backgroundColor,\n },\n root: {\n borderRadius: 10,\n color: colors.whiteText,\n backgroundColor,\n },\n },\n });\n};\n","import { useDispatch } from 'react-redux';\n\nimport { AppDispatch } from '../redux/store';\n\nexport const useAppDispatch: () => AppDispatch = useDispatch;\n","import { useEffect } from 'react';\nimport { WS_URL } from '@aclito/client';\nimport type { Notification } from '@aclito/entities';\n\nimport { useAppDispatch } from '../../../hooks/useDispatch';\nimport { notificationActions } from '../../../redux/slices';\nimport { useAppSelector } from '../../../hooks';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\n\nexport const useNotificationWS = () => {\n const dispatch = useAppDispatch();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n useEffect(() => {\n let ws: WebSocket;\n\n if (userInfo) {\n ws = new WebSocket(`${WS_URL}?userId=${userInfo.id}`);\n try {\n //MessageEvent - TS error in RN\n const listener = (event: any) => {\n const data = JSON.parse(event.data) as Notification;\n dispatch(notificationActions.addNotification(data));\n };\n\n ws.addEventListener('message', listener);\n } catch {\n return;\n }\n }\n\n return () => ws?.close();\n }, [userInfo?.id]);\n};\n","import dayjs from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport utc from 'dayjs/plugin/utc';\nimport duration from 'dayjs/plugin/duration';\nimport isoWeek from 'dayjs/plugin/isoWeek';\nimport { createContext, ReactNode, useEffect, useState } from 'react';\n\nimport { storage } from '../lib/storage';\nimport { LOCALE } from '../util/constants';\nimport { LocaleType } from '../types';\nimport { useAppDispatch } from '../hooks/useDispatch';\nimport { commonActions } from '../redux/slices';\nimport { useAppSelector } from '../hooks';\nimport { commonSelectors } from '../redux/slices/commonSlices';\n\nimport 'dayjs/locale/cs';\nimport 'dayjs/locale/en-gb';\nimport 'dayjs/locale/sk';\n\ndayjs.extend(relativeTime);\ndayjs.extend(utc);\ndayjs.extend(duration);\ndayjs.extend(isoWeek);\n\nexport const LocaleContext = createContext(null);\n\nconst LocaleProvider = ({ children }: { children: ReactNode }) => {\n const [initialLocale, setInitialLocale] = useState(null);\n const dispatch = useAppDispatch();\n const locale = useAppSelector(commonSelectors.locale);\n\n useEffect(() => {\n const initialize = async () => {\n const initial = ((await storage.getItem(LOCALE)) || 'cs') as LocaleType;\n dispatch(commonActions.updateLocale({ locale: initial }));\n setInitialLocale(initial);\n };\n\n if (!initialLocale) {\n initialize();\n }\n }, [initialLocale]);\n\n dayjs.locale(locale);\n\n return (\n {children}\n );\n};\n\nexport default LocaleProvider;\n","import React from 'react';\nimport { Modal as MTModal, ModalProps } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\nconst Modal: React.FC = ({ opened, onClose, ...props }) => {\n const theme = useTheme();\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default Modal;\n","import { TextProps as MTTextProps, Text as MTText } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey, TranslateValues } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\n\nexport interface TextProps extends MTTextProps {\n tx?: TranslateKey;\n text?: string | number;\n txOptions?: TranslateValues;\n}\n\nexport const Text = (props: TextProps) => {\n const { children, style, tx, text, txOptions, ...rest } = props;\n\n const t = useTranslate();\n const theme = useTheme();\n\n const i18nText = tx && t(tx, { bold: (str) => {str}, ...txOptions });\n const content = i18nText || text || children;\n\n const styles: React.CSSProperties = {\n ...style,\n lineHeight: 'normal',\n };\n\n return (\n \n {content}\n \n );\n};\n","import { Group, GroupProps } from '@mantine/core';\nimport React from 'react';\n\ntype HStackProps = GroupProps;\n\nconst HStack: React.FC = ({ children, ...rest }) => (\n {children}\n);\n\nexport default HStack;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey } from '@aclito/shared/types';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useDisclosure } from '@mantine/hooks';\nimport { Collapse } from '@mantine/core';\nimport { motion } from 'framer-motion';\n\nimport { Text } from '../Text';\nimport { Icon } from '../Icons/Icon';\n\nimport HStack from './HStack';\n\ninterface CollapsibleProps {\n children: React.ReactNode;\n defaultOpen?: boolean;\n buttonLabelTx?: TranslateKey;\n text?: string;\n}\n\nexport function Collapsible({\n children,\n buttonLabelTx,\n defaultOpen,\n text,\n}: CollapsibleProps) {\n const [opened, { toggle }] = useDisclosure(defaultOpen ?? false);\n const t = useTranslate();\n\n const textValue = buttonLabelTx ? t(buttonLabelTx) : text;\n\n return (\n <>\n \n \n {textValue}\n \n \n \n \n \n {children && (\n \n {children}\n \n )}\n \n );\n}\n\nconst CollapseButton = styled.button`\n display: flex;\n width: 100%;\n padding: 8px 16px;\n align-items: center;\n justify-content: space-between;\n background: ${({ theme }) => theme.grey10};\n color: ${({ theme }) => theme.grey80};\n font-weight: bold;\n border: unset;\n cursor: pointer;\n`;\n\nexport default Collapsible;\n","import React from 'react';\nimport styled from 'styled-components';\n\nconst Container: React.FC<\n { style?: React.CSSProperties } & { children: React.ReactNode }\n> = ({ children, style }) => {children};\nconst StyledDiv = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n background-color: ${({ theme }) => theme.background};\n`;\nexport default Container;\n","import styled from 'styled-components';\n\nimport { deviceMin } from '../../utils/mediaQueries';\n\nexport const Overlay = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.65);\n border-radius: 0;\n z-index: 3;\n @media ${deviceMin.laptop} {\n display: none;\n }\n`;\n\nexport default Overlay;\n","import { StackProps, Stack } from '@mantine/core';\nimport React from 'react';\n\ntype VStackProps = StackProps;\n\nconst VStack: React.FC = ({ children, ...rest }) => (\n {children}\n);\n\nexport default VStack;\n","import styled from 'styled-components';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { Icon } from '../Icons/Icon';\nimport { Text } from '../Text';\n\nimport HStack from './HStack';\n\ninterface SectionProps {\n buttonLabelTx?: TranslateKey;\n text?: string;\n onClick?: () => void;\n testID?: string;\n}\n\nfunction SectionTitle({ text, buttonLabelTx, onClick, testID }: SectionProps) {\n const t = useTranslate();\n\n const textValue = buttonLabelTx ? t(buttonLabelTx) : text;\n\n return (\n \n <HStack spacing={0}>\n <Text>{textValue}</Text>\n </HStack>\n {onClick && <Icon icon=\"chevronRight\" />}\n \n );\n}\n\nconst Title = styled.button`\n display: flex;\n width: 100%;\n padding: 8px 16px;\n align-items: center;\n justify-content: space-between;\n background: ${({ theme }) => theme.grey10};\n color: ${({ theme }) => theme.grey80};\n font-weight: bold;\n border: unset;\n cursor: pointer;\n`;\n\nexport default SectionTitle;\n","import { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst FeedbackTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default FeedbackTooltip;\n","import { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\nimport { Text } from '../Text';\n\nconst OrganizationTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default OrganizationTooltip;\n","import { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst SearchTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default SearchTooltip;\n","import { useTheme } from 'styled-components';\n\nimport { HStack } from './Layout';\n\ninterface KarmaProps {\n points: number;\n}\n\nconst Karma = ({ points }: KarmaProps) => {\n const theme = useTheme();\n\n return (\n \n {[9, 8, 7, 6, 5, 4, 3, 2, 1].map((item, i) => (\n points ? theme.lowKarma : theme.karma,\n marginTop: 1.5,\n }}\n />\n ))}\n \n );\n};\n\nexport default Karma;\n","import { config } from '@aclito/shared/config';\n\nimport { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport Karma from '../Karma';\n\nconst ProfileTooltip = () => {\n return (\n \n \n \n \n \n \n {config.emojis.medal1.item}\n \n \n \n );\n};\n\nexport default ProfileTooltip;\n","import { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst EventTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default EventTooltip;\n","import { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst FeedTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default FeedTooltip;\n","import { BannersKey, TranslateKey } from '@aclito/shared/types';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\n\nimport { Icon } from '../Icons/Icon';\n\nexport interface BannersProps {\n icon?: JSX.Element;\n color: ThemeColorsKeys;\n text: TranslateKey;\n}\n\nexport const banners: Record = {\n eventRunning: {\n icon: ,\n color: 'bannerRunning',\n text: 'card.banner.running',\n },\n orgAdmin: {\n icon: ,\n color: 'bannerAdmin',\n text: 'card.banner.admin',\n },\n orgPowerUser: {\n icon: ,\n color: 'bannerPowerUser',\n text: 'card.banner.powerUser',\n },\n orgMember: {\n icon: ,\n color: 'primary',\n text: 'member',\n },\n alias: {\n icon: ,\n color: 'primary',\n text: 'alias',\n },\n joinedAlias: {\n color: 'bannerJoinedAlias',\n text: 'card.banner.joined',\n },\n queuedAlias: {\n color: 'bannerQueued',\n text: 'card.banner.queued',\n },\n confirmedAlias: {\n color: 'bannerConfirmed',\n text: 'card.banner.confirmed',\n },\n eventOrganizer: {\n icon: ,\n color: 'bannerEventOrganizer',\n text: 'card.banner.eventOrganizer',\n },\n eventTrainer: {\n icon: ,\n color: 'primary',\n text: 'card.banner.eventTrainer',\n },\n eventForAdults: {\n color: 'yellow',\n text: 'events.new.tab.adults',\n },\n eventForKids: {\n color: 'yellow',\n text: 'events.new.tab.kids',\n },\n orgTypeClub: {\n color: 'orange',\n text: 'org.new.tab.club',\n },\n orgTypeOrganization: {\n color: 'orange',\n text: 'org.new.tab.organization',\n },\n orgTypeTeam: {\n color: 'orange',\n text: 'org.new.tab.team',\n },\n eventRepeating: {\n color: 'blue',\n text: 'card.banner.eventRepeating',\n },\n CHYTRA_REZERVACE: {\n color: 'chytrarezervace',\n text: 'card.banner.external',\n },\n RESERVANTO: {\n color: 'reservanto',\n text: 'card.banner.external',\n },\n cancelled: {\n icon: ,\n color: 'red',\n text: 'card.banner.cancelled',\n },\n pending: {\n icon: ,\n color: 'orange',\n text: 'card.banner.pending',\n },\n paid: {\n icon: ,\n color: 'primary',\n text: 'card.banner.paid',\n },\n expired: {\n icon: ,\n color: 'red',\n text: 'card.banner.expired',\n },\n refunded: {\n icon: ,\n color: 'blue',\n text: 'card.banner.refunded',\n },\n 'one-off': {\n color: 'blue',\n text: 'product.one-off',\n },\n subscription: {\n color: 'primary',\n text: 'product.subscription',\n },\n};\n","import styled, { useTheme } from 'styled-components';\nimport { ThemeColorsType } from '@aclito/shared/theme/colors';\nimport React from 'react';\nimport { TranslateKey, ValueOf } from '@aclito/shared/types';\n\nimport { HStack } from '../Layout';\nimport { Text } from '../Text';\n\ninterface BannerProps {\n icon?: JSX.Element;\n color: ValueOf;\n tx: TranslateKey;\n}\n\nconst Banner: React.FC = ({ icon, color, tx }) => {\n const theme = useTheme();\n return (\n \n {icon}\n \n \n );\n};\n\nconst StyledText = styled(Text)`\n white-space: nowrap;\n`;\n\nconst Container = styled(HStack)<{ $color: string }>`\n background: ${({ $color }) => $color};\n border-radius: 25px;\n width: fit-content;\n padding: 2px 8px;\n`;\n\nexport default Banner;\n","import { ThemeColorsType } from '@aclito/shared/theme/colors';\nimport React from 'react';\nimport { BannersKey, ValueOf } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\n\nimport { banners } from './BannersConfig';\nimport Banner from './Banner';\n\ninterface CardStatusBannerTextProps {\n type: BannersKey;\n bannerColor?: ValueOf;\n}\n\nconst CardStatusBannerText: React.FC = ({\n type,\n bannerColor,\n}) => {\n const { color, icon, text } = banners[type];\n const theme = useTheme();\n\n const c = bannerColor ?? theme[color];\n return ;\n};\n\nexport default CardStatusBannerText;\n","import React, { cloneElement } from 'react';\nimport { BannersKey } from '@aclito/shared/types';\nimport styled, { useTheme } from 'styled-components';\n\nimport { HStack } from '../Layout';\n\nimport { banners } from './BannersConfig';\n\ninterface CardStatusBannerIconProps {\n type: BannersKey;\n}\n\nconst CardStatusBannerIcon: React.FC = ({\n type,\n}) => {\n const { icon, color } = banners[type];\n const Icon = cloneElement(icon ?? <>);\n const theme = useTheme();\n return {Icon};\n};\n\nconst Container = styled(HStack)<{ color: string }>`\n background: ${({ theme, color }) => color ?? theme.whiteText};\n border-radius: 25px;\n padding: 2px 2px;\n`;\n\nexport default CardStatusBannerIcon;\n","import { ActivitiesKey, BannersKey, ValueOf } from '../types';\nimport {\n activityColors,\n ActivitiesColorsType,\n ThemeColorsKeys,\n} from '../theme/colors';\n\nexport const actionMappings: Record<\n string,\n {\n color?: ThemeColorsKeys;\n colorIcon?: ThemeColorsKeys;\n colorIcon2?: ThemeColorsKeys;\n icon?: any;\n icon2?: any;\n }\n> = {\n pay: {\n color: 'white',\n colorIcon: 'red',\n colorIcon2: 'red',\n icon: 'payment',\n icon2: 'forward',\n },\n add: {\n color: 'white',\n colorIcon: 'primary',\n icon: 'add',\n },\n refund: {\n color: 'white',\n colorIcon: 'blue',\n icon: 'payment',\n icon2: 'back',\n colorIcon2: 'blue',\n },\n};\n\nexport const statusMappings: Record<\n string,\n { color: ThemeColorsKeys; type: BannersKey }\n> = {\n pending: { color: 'orange10', type: 'pending' },\n paid: { color: 'primary10', type: 'paid' },\n expired: { color: 'red10', type: 'expired' },\n cancelled: { color: 'red10', type: 'cancelled' },\n refunded: { color: 'blue10', type: 'refunded' },\n};\n\nexport const cardColorPicker = (\n type: ActivitiesKey,\n): ValueOf => {\n const colors: Record> = {\n icehockey: activityColors.icehockey,\n football: activityColors.football,\n volleyball: activityColors.volleyball,\n badminton: activityColors.badminton,\n running: activityColors.running,\n tennis: activityColors.tennis,\n golf: activityColors.golf,\n tabletennis: activityColors.tabletennis,\n handball: activityColors.handball,\n box: activityColors.box,\n swimming: activityColors.swimming,\n iceskating: activityColors.iceskating,\n archery: activityColors.archery,\n baseball: activityColors.baseball,\n bowling: activityColors.bowling,\n cricket: activityColors.cricket,\n curling: activityColors.curling,\n cycling: activityColors.cycling,\n darts: activityColors.darts,\n billiard: activityColors.billiard,\n wallclimbing: activityColors.wallclimbing,\n rugby: activityColors.rugby,\n skateboarding: activityColors.skateboarding,\n skiing: activityColors.skiing,\n snowboarding: activityColors.snowboarding,\n squash: activityColors.squash,\n fencing: activityColors.fencing,\n karate: activityColors.karate,\n taekwondo: activityColors.taekwondo,\n beachvolleyball: activityColors.beachvolleyball,\n chess: activityColors.chess,\n wrestling: activityColors.wrestling,\n horseriding: activityColors.horseriding,\n fitness: activityColors.fitness,\n pilates: activityColors.pilates,\n gym: activityColors.gym,\n yoga: activityColors.yoga,\n hiking: activityColors.hiking,\n basketball: activityColors.basketball,\n circletraining: activityColors.circletraining,\n personaltraining: activityColors.personaltraining,\n aerobic: activityColors.aerobic,\n spinning: activityColors.spinning,\n tabata: activityColors.tabata,\n trx: activityColors.trx,\n bosu: activityColors.bosu,\n heat: activityColors.heat,\n hiit: activityColors.hiit,\n zumba: activityColors.zumba,\n trampoline: activityColors.trampoline,\n ballet: activityColors.ballet,\n poledance: activityColors.poledance,\n hathayoga: activityColors.hathayoga,\n poweryoga: activityColors.poweryoga,\n dance: activityColors.dance,\n bachata: activityColors.bachata,\n crossfit: activityColors.crossfit,\n bodyform: activityColors.bodyform,\n any: activityColors.any,\n };\n return colors[type];\n};\n","import * as React from 'react';\nimport { GenderKey, RepeatingKey, ActivitiesKey } from '@aclito/shared/types';\nimport {\n FaHockeyPuck,\n FaRunning,\n FaGolfBall,\n FaTableTennis,\n FaSkating,\n FaBowlingBall,\n FaBicycle,\n FaSkiing,\n FaSnowboarding,\n FaChess,\n FaHorse,\n FaDumbbell,\n FaHiking,\n FaBasketballBall,\n} from 'react-icons/fa';\nimport {\n IoFootball,\n IoTennisball,\n IoBaseball,\n IoFitness,\n IoMaleFemale,\n IoMale,\n IoFemale,\n IoBody,\n} from 'react-icons/io5';\nimport {\n GiBoxingGlove,\n GiTennisRacket,\n GiPoolTriangle,\n GiMountainClimbing,\n GiFencer,\n GiBallerinaShoes,\n} from 'react-icons/gi';\nimport {\n MdSportsVolleyball,\n MdSportsHandball,\n MdPool,\n MdSportsCricket,\n MdSportsRugby,\n MdSkateboarding,\n MdSportsKabaddi,\n MdRepeat,\n MdStar,\n} from 'react-icons/md';\nimport { FiTarget } from 'react-icons/fi';\nimport { TbCurling, TbKarate, TbYoga } from 'react-icons/tb';\nimport { useTheme } from 'styled-components';\n\nexport const iconSelectRegistry = {\n icehockey: ,\n football: ,\n volleyball: ,\n badminton: ,\n running: ,\n tennis: ,\n golf: ,\n tabletennis: ,\n handball: ,\n box: ,\n swimming: ,\n iceskating: ,\n archery: ,\n baseball: ,\n bowling: ,\n cricket: ,\n curling: ,\n cycling: ,\n darts: ,\n billiard: ,\n wallclimbing: ,\n rugby: ,\n skateboarding: ,\n skiing: ,\n snowboarding: ,\n squash: ,\n fencing: ,\n karate: ,\n taekwondo: ,\n beachvolleyball: ,\n chess: ,\n wrestling: ,\n horseriding: ,\n fitness: ,\n pilates: ,\n gym: ,\n yoga: ,\n hiking: ,\n basketball: ,\n circletraining: ,\n personaltraining: ,\n aerobic: ,\n spinning: ,\n tabata: ,\n trx: ,\n bosu: ,\n heat: ,\n hiit: ,\n zumba: ,\n trampoline: ,\n ballet: ,\n poledance: ,\n hathayoga: ,\n poweryoga: ,\n dance: ,\n bachata: ,\n crossfit: ,\n bodyform: ,\n male: ,\n female: ,\n any: ,\n repeating: ,\n default: ,\n};\n\nconst IconSelect: React.FC<{\n type: ActivitiesKey | GenderKey | RepeatingKey;\n iconColor?: string;\n iconSize?: number;\n style?: React.CSSProperties;\n}> = ({ type, iconColor, iconSize, style }) => {\n const icons: Record<\n ActivitiesKey | GenderKey | RepeatingKey,\n React.ReactElement\n > = iconSelectRegistry;\n const theme = useTheme();\n\n const Icon = () =>\n icons[type] &&\n React.cloneElement(icons[type], {\n size: iconSize ?? 24,\n color: iconColor ?? theme.grey80,\n });\n\n return (\n <>\n {style ? (\n
\n \n
\n ) : (\n <>\n \n \n )}\n \n );\n};\n\nexport default IconSelect;\n","import React from 'react';\nimport { getById } from '@aclito/shared/util/selectObject';\nimport { ActivitiesKey, TranslateKey } from '@aclito/shared/types';\nimport { config } from '@aclito/shared/config';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { useTheme } from 'styled-components';\n\nimport IconSelect from '../Icons/IconSelect';\n\nimport Banner from './Banner';\n\ninterface ActivityBannerTextProps {\n activityType: ActivitiesKey;\n}\n\nconst ActivityBannerText: React.FC = ({\n activityType,\n}) => {\n const theme = useTheme();\n return (\n \n ) : (\n <>\n )\n }\n color={\n activityType !== config.activities.any.id\n ? cardColorPicker(activityType)\n : theme.primary\n }\n tx={\n activityType !== config.activities.any.id\n ? (getById(activityType, config.activities).item as TranslateKey)\n : 'availability.new.anyactivity'\n }\n />\n );\n};\n\nexport default ActivityBannerText;\n","import { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\nimport { CardStatusBannerText } from '../Banner';\n\nconst ProductAdminTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ProductAdminTooltip;\n","import { useTheme } from 'styled-components';\n\nimport { Text } from '../Text';\nimport { VStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst ProductShoppingTooltip = () => {\n const theme = useTheme();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ProductShoppingTooltip;\n","import { Divider } from '@mantine/core';\n\nimport { Text } from '../Text';\nimport { VStack, HStack } from '../Layout';\nimport { Icon } from '../Icons/Icon';\n\nconst SettingsTooltip = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n );\n};\n\nexport default SettingsTooltip;\n","import { createContext, ReactNode, useContext, useMemo, useState } from 'react';\nimport { useDisclosure } from '@mantine/hooks';\nimport { TooltipKey } from '@aclito/shared/types';\n\nimport { Modal } from '../components/Modal';\nimport {\n FeedbackTooltip,\n EventTooltip,\n SearchTooltip,\n ProfileTooltip,\n OrganizationTooltip,\n FeedTooltip,\n ProductAdminTooltip,\n ProductShoppingTooltip,\n SettingsTooltip,\n} from '../components/Tooltips';\n\ntype ModalTooltipProviderProps = { children: ReactNode };\nexport const ModalTooltipContext = createContext<\n | {\n hideModal: () => void;\n showModal: (node: ReactNode) => void;\n }\n | undefined\n>(undefined);\n\nconst ModalTooltipProvider = ({ children }: ModalTooltipProviderProps) => {\n const [content, setContent] = useState(null);\n const [isOpen, { open, close }] = useDisclosure(false);\n\n const showModal = (newContent: ReactNode) => {\n setContent(newContent);\n open();\n };\n\n const hideModal = () => {\n close();\n };\n\n return (\n \n {children}\n\n \n {content}\n \n \n );\n};\n\nexport default ModalTooltipProvider;\n\nexport const useTooltipModal = () => {\n const context = useContext(ModalTooltipContext);\n\n if (!context) {\n throw new Error(\n 'useTooltipModal must be used within a ModalTooltipProvider',\n );\n }\n\n return context;\n};\n\nexport const useShowTooltipModal = (key: TooltipKey) => {\n const { showModal } = useTooltipModal();\n\n const modals = useMemo(() => {\n const record: Record = {\n organizationTooltip: ,\n feedbackTooltip: ,\n profileTooltip: ,\n searchTooltip: ,\n eventTooltip: ,\n feedTooltip: ,\n productAdminTooltip: ,\n productShoppingTooltip: ,\n streakTooltip: null,\n settingsTooltip: ,\n };\n return record;\n }, [key]);\n\n /*useEffect(() => {\n const init = async () => {\n try {\n const seen = await getSeenMap(key);\n\n if (!seen) {\n setTimeout(() => showModal(modals[key]), DEFAULT_SHEET_DELAY);\n await setSeenMap(key, true);\n }\n } catch (e) {\n logger.error('Failed to show tooltip', { message: e });\n }\n };\n\n init();\n }, [key]);*/\n\n const handleShowSheet = () => {\n showModal(modals[key]);\n };\n\n return [handleShowSheet];\n};\n","import {\n NotificationSettingsInput,\n NotificationSettingType,\n UserSettings,\n} from '@aclito/entities';\nimport { unwrapResult } from '@reduxjs/toolkit';\n\nimport { useAppSelector, useShowFlashMessage } from '../../../hooks';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\nimport { LocaleType, TranslateKey } from '../../../types';\n\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { commonActions, profileActions } from '@aclito/shared/redux/slices';\n\nexport const useSharedSettings = () => {\n const dispatch = useAppDispatch();\n const showMessage = useShowFlashMessage();\n const isLoading = useAppSelector(profileSelectors.isLoadingSettings);\n\n const settings = useAppSelector(profileSelectors.userInfo)?.settings;\n const initialNotificationValues = settings?.notifications;\n const initialOtherValues = {\n hideReviews: settings?.hideReviews,\n hideEmoji: settings.hideEmoji,\n };\n\n const handleLocaleChange = (locale: LocaleType) => {\n dispatch(commonActions.updateLocale({ locale }));\n dispatch(\n profileActions.updateUserSettingsAsync({ preferredLanguage: locale }),\n );\n };\n\n const handleUpdateNotifications = async (\n newNotificationSettings: NotificationSettingsInput,\n ) => {\n if (settings) {\n try {\n unwrapResult(\n await dispatch(\n profileActions.updateUserSettingsAsync({\n settings: { ...settings, notifications: newNotificationSettings },\n }),\n ),\n );\n showMessage('changesApplied');\n } catch (e) {\n showMessage('changesNotApplied');\n }\n }\n };\n\n const handleUpdateOther = async (\n newOtherSettings: Exclude,\n ) => {\n if (settings) {\n try {\n unwrapResult(\n await dispatch(\n profileActions.updateUserSettingsAsync({\n settings: { ...settings, ...newOtherSettings },\n }),\n ),\n );\n showMessage('changesApplied');\n } catch (e) {\n showMessage('changesNotApplied');\n }\n }\n };\n\n const deleteUserAccount = async () => {\n await dispatch(profileActions.deleteAccountAsync());\n };\n\n const translationNotificationTable: Record<\n NotificationSettingType,\n TranslateKey\n > = {\n eventLifecycle: 'settings.notifications.eventLifecycle',\n eventInteractions: 'settings.notifications.eventInteractions',\n eventChanges: 'settings.notifications.eventChanges',\n organizations: 'settings.notifications.organizations',\n feed: 'settings.notifications.feed',\n feedback: 'settings.notifications.feedback',\n chat: 'settings.notifications.chat',\n };\n\n const translationOtherTable: Record<\n keyof Pick,\n TranslateKey\n > = {\n hideReviews: 'settings.hideReviews',\n hideEmoji: 'settings.hideEmoji',\n };\n\n return {\n handleLocaleChange,\n handleUpdateNotifications,\n initialNotificationValues,\n initialOtherValues,\n translationNotificationTable,\n deleteUserAccount,\n translationOtherTable,\n handleUpdateOther,\n isLoading,\n };\n};\n","type AnyObject = { [key: string]: any };\nexport type ObjectKeys = `${Exclude}`;\n\nexport const objectKeys = Object.keys as (\n value: Type,\n) => Array>;\n\nexport function flattenObject(\n obj: AnyObject,\n parent = '',\n res: AnyObject = {},\n): AnyObject {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n const propName = parent ? `${parent}.${key}` : key;\n if (\n typeof obj[key] === 'object' &&\n obj[key] !== null &&\n !Array.isArray(obj[key])\n ) {\n flattenObject(obj[key], propName, res);\n } else {\n res[propName] = obj[key];\n }\n }\n }\n return res;\n}\n\nexport function unflattenObject(data: AnyObject): AnyObject {\n const result: AnyObject = {};\n for (const i in data) {\n const keys = i.split('.');\n keys.reduce((acc: AnyObject, key: string, index: number) => {\n return (acc[key] = index === keys.length - 1 ? data[i] : acc[key] || {});\n }, result);\n }\n return result;\n}\n\nexport function findKeyByValue(\n obj: Record,\n value: any,\n): string | undefined {\n return Object.keys(obj).find((key) => obj[key] === value) || undefined;\n}\n","import styled from 'styled-components';\n\nimport { HStack } from '../components/Layout';\n\nexport const TitleBar = styled(HStack)`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 24px;\n`;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { Tabs } from '@mantine/core';\nimport styled from 'styled-components';\n\nimport { Text } from '../Text';\n\nexport type ITab = {\n children?: React.ReactNode;\n title?: string;\n tx?: TranslateKey;\n setSelectedIndex?: (val: string) => void;\n value?: string;\n selectedIndex?: string;\n};\n\nconst Tab: React.FC = ({ setSelectedIndex, title, tx, value }) => {\n const t = useTranslate();\n const i18nText = tx && t(tx);\n const text = i18nText || title;\n\n const handleOnTabClick = () => {\n if (value && setSelectedIndex) setSelectedIndex(value);\n };\n\n const getOnlyHeader = () => (\n \n \n {text}\n \n \n );\n\n return <>{getOnlyHeader()};\n};\n\nconst StyledTab = styled(Tabs.Tab)`\n &:hover {\n background-color: transparent;\n }\n`;\n\nexport default Tab;\n","import { createStyles, Tabs as MantineTabs, TabsProps } from '@mantine/core';\nimport React, { Children, cloneElement } from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport { ITab } from './Tab';\n\ntype ITabs = {\n children: React.ReactElement[];\n selectedIndex: string;\n setSelectedIndex: (val: string) => void;\n growList?: boolean;\n tabWidth?: number;\n} & TabsProps;\n\nconst useStyles = () =>\n createStyles(() => ({\n tab: {\n fontSize: 14,\n fontWeight: 500,\n },\n }));\n\nconst Tabs: React.FC = ({\n children,\n selectedIndex,\n setSelectedIndex,\n growList = true,\n tabWidth,\n ...rest\n}) => {\n const theme = useTheme();\n const { classes } = useStyles()();\n\n return (\n \n \n {Children.map(children, (child: React.ReactElement, i) =>\n cloneElement(child, {\n selectedIndex,\n key: `tab-header-${child.key}`,\n setSelectedIndex,\n value: child.props.value ?? i.toString(),\n }),\n )}\n \n\n {Children.map(children, (child: React.ReactElement, i) => (\n \n {child.props.children}\n \n ))}\n \n );\n};\n\nconst StyledList = styled(MantineTabs.List)`\n display: flex;\n flex-wrap: nowrap;\n`;\n\nexport default Tabs;\n","import { IconBaseProps } from 'react-icons';\nimport { useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { CSSProperties } from 'react';\n\nimport { Icon } from '../Icons/Icon';\n\ninterface BackButtonProps extends IconBaseProps {\n style?: CSSProperties;\n}\n\nconst BackButton = ({ onClick, style, ...rest }: BackButtonProps) => {\n const nav = useNavigate();\n\n const handleClick = (e: any) => {\n if (onClick) {\n onClick?.(e);\n } else {\n nav(-1);\n }\n };\n return (\n \n \n \n );\n};\n\nconst StyledButton = styled.div`\n cursor: pointer;\n display: flex;\n align-items: center;\n padding: 8px;\n max-width: 40px;\n background-color: ${({ theme }) => theme.primary10};\n border-radius: 10px;\n`;\n\nconst StyledIcon = styled(Icon)`\n transition: transform 200ms ease-in-out;\n &:hover {\n cursor: pointer;\n transform: scale(1.3);\n }\n` as typeof Icon;\n\nexport default BackButton;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey, TranslateValues } from '@aclito/shared/types';\nimport {\n ButtonProps as MTButtonProps,\n Button as MTButton,\n} from '@mantine/core';\nimport React, { forwardRef } from 'react';\nimport styled from 'styled-components';\n\nexport interface ButtonProps\n extends MTButtonProps,\n Omit<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >,\n 'color' | 'children' | 'ref'\n > {\n tx?: TranslateKey;\n text?: string;\n txOptions?: TranslateValues;\n ref?: React.ForwardedRef;\n}\n\n// eslint-disable-next-line react/display-name\nconst Button = forwardRef(\n ({ tx, txOptions, text, children, ...rest }, ref) => {\n {\n const t = useTranslate();\n\n const i18nText = tx && t(tx, txOptions);\n const content = i18nText || text || children;\n\n return (\n \n {content}\n \n );\n }\n },\n);\n\nconst StyledButton = styled(MTButton)``;\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport styled, { css, useTheme } from 'styled-components';\n\nimport Button, { ButtonProps } from './Button';\n\nexport interface SmallButtonProps extends ButtonProps {\n bg: ThemeColorsKeys;\n shape?: 'round';\n minWidth?: number;\n textcolor?: ThemeColorsKeys;\n}\n\n// eslint-disable-next-line react/display-name\nconst SmallButton = forwardRef(\n ({ bg, ...rest }, ref) => {\n {\n const theme = useTheme();\n return (\n \n );\n }\n },\n);\n\nconst StyledButton = styled(Button)`\n background-color: ${(props) => props.bg};\n border-radius: 10px;\n color: ${(props) => props.theme[props.textcolor ?? 'whiteText']};\n ${(p) =>\n p.minWidth &&\n css`\n min-width: ${p.minWidth}rem;\n `};\n\n ${(p) =>\n p.shape === 'round' &&\n css`\n padding: 0;\n width: 42px;\n `};\n\n &:hover {\n background-color: ${(props) => props.bg};\n filter: brightness(95%);\n }\n`;\n\nexport { SmallButton };\n","import React, { cloneElement, forwardRef } from 'react';\nimport { IconBaseProps } from 'react-icons';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport { Indicator } from '@mantine/core';\n\nimport { Icon, iconRegistry, IconType } from '../Icons/Icon';\nimport { HStack } from '../Layout';\n\nimport { SmallButton, SmallButtonProps } from './SmallButton';\n\n/* eslint-disable react/display-name */\ninterface ActionButtonsProps extends Omit {\n iconType?: IconType;\n isLoading?: boolean;\n primary?: boolean;\n tx?: TranslateKey;\n bg?: ThemeColorsKeys;\n badge?: number;\n}\nconst ActionButton = forwardRef(\n (\n { iconType, primary, tx, bg, isLoading, textcolor, badge, ...rest },\n ref,\n ) => {\n {\n const t = useTranslate();\n const icons: Record = { ...iconRegistry };\n const theme = useTheme();\n\n const iconColor = textcolor\n ? textcolor\n : !primary\n ? 'primary'\n : 'whiteText';\n\n const bgColor = bg ? bg : primary ? 'primary' : 'primary10';\n\n return (\n ({\n root: {\n '&[data-disabled]': {\n backgroundColor: theme[bgColor],\n color: iconColor,\n },\n },\n })}\n {...rest}\n >\n \n {badge && (\n \n <>\n \n )}\n \n {!isLoading ? (\n iconType &&\n icons[iconType] &&\n cloneElement(icons[iconType], {\n size: 24,\n color: theme[iconColor],\n })\n ) : (\n \n )}\n
\n {tx && !isLoading && (\n \n {t(tx)}\n \n )}\n \n \n );\n }\n },\n);\n\nexport default ActionButton;\n","import {\n FieldValues,\n SubmitErrorHandler,\n SubmitHandler,\n useFormContext,\n} from 'react-hook-form';\n\nimport { SmallButton, SmallButtonProps } from './SmallButton';\n\n// @ts-ignore\ntype SubmitProps = {\n onSubmit: SubmitHandler;\n onError?: SubmitErrorHandler;\n};\n\nconst SubmitButton = ({\n children,\n onSubmit,\n onError,\n bg,\n ...props\n}: Omit & SubmitProps) => {\n const { handleSubmit } = useFormContext();\n\n const handleSubmitButton = () => {\n handleSubmit(onSubmit, onError)();\n };\n\n return (\n \n {children}\n \n );\n};\n\nexport default SubmitButton;\n","import React from 'react';\n\nimport { ITab } from '../Tabs/Tab';\n\nimport { SmallButton, SmallButtonProps } from './SmallButton';\n\ninterface TagButtonProps extends Omit, ITab {\n value: string;\n}\n\nconst TagButton: React.FC = ({\n value,\n setSelectedIndex,\n selectedIndex,\n ...rest\n}) => {\n const handleTabIndexChange = () => setSelectedIndex?.(value);\n\n return (\n \n );\n};\n\nexport default TagButton;\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport { Button } from '../Button';\nimport { ButtonProps } from '../Button/Button';\n\nimport { ITab } from './Tab';\n\ninterface TabButtonProps extends ButtonProps, ITab {\n value: string;\n}\n\nconst TabButton: React.FC = ({\n value,\n setSelectedIndex,\n selectedIndex,\n ...rest\n}) => {\n const handleTabIndexChange = () => setSelectedIndex?.(value);\n\n return (\n \n );\n};\n\nconst StyledButton = styled(Button)`\n &:hover {\n color: ${({ theme }) => theme.white};\n }\n width: 120px;\n height: 40px;\n border-radius: 10px;\n` as typeof Button;\n\nexport default TabButton;\n","import { ImageValueShape } from '@aclito/shared/types';\nimport React, { CSSProperties } from 'react';\nimport styled from 'styled-components';\n\ninterface ImageProps {\n image: ImageValueShape;\n height?: number | string;\n width?: number | string;\n timeStamp?: string;\n style?: CSSProperties;\n}\n\nconst Image: React.FC = ({\n image,\n height,\n width,\n timeStamp,\n style,\n}) => {\n let pic = image.slice(5);\n\n if (!pic) return null;\n\n if (pic.includes('FILE:') || (pic.includes('https://') && timeStamp)) {\n pic = pic + `?ts=${timeStamp}`;\n }\n\n return pic.trim().length ? (\n \n ) : null;\n};\n\nconst StyledImage = styled.img<{\n height?: number | string;\n width?: number | string;\n}>`\n height: ${({ height }) => height ?? 'auto'};\n width: ${({ width }) => width ?? '100%'};\n object-fit: cover;\n`;\n\nexport default Image;\n","import { useState } from 'react';\n\nexport const useStepper = (def?: number) => {\n const [active, setActive] = useState(def ?? 0);\n const nextStep = () =>\n setActive((current) => (current < 3 ? current + 1 : current));\n const prevStep = () =>\n setActive((current) => (current > 0 ? current - 1 : current));\n\n return { active, nextStep, prevStep, setActive };\n};\n","import React from 'react';\nimport { Stepper as MantineStepper } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\ninterface StepperProps {\n active: number;\n setActive: (value: React.SetStateAction) => void;\n complete?: React.ReactNode;\n steps: {\n component: React.ReactNode;\n label: string;\n description?: string;\n }[];\n}\n\nconst Stepper: React.FC = ({\n active,\n setActive,\n steps,\n complete,\n}) => {\n const theme = useTheme();\n return (\n <>\n \n {steps.map((step, index) => (\n \n {step.component}\n \n ))}\n {complete}\n \n \n );\n};\n\nexport default Stepper;\n","import styled from 'styled-components';\n\nimport { Text } from './Text';\n\nexport const Title = styled(Text)`\n font-size: 1.5rem;\n font-weight: bold;\n color: ${({ theme }) => theme.grey80};\n`;\n","import styled from 'styled-components';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\n\nimport { HStack } from '../components/Layout';\nimport { Title } from '../components/Title';\n\nexport const StyledTitle = styled(Title)`\n color: ${({ theme }) => theme.grey80};\n font-size: 25px;\n`;\n\nexport const HStackButtons = styled(HStack)`\n display: flex;\n justify-content: space-between;\n .next {\n margin-left: auto;\n }\n .back {\n margin-right: auto;\n }\n`;\n\nexport const getCommonInputLabelStyle = (theme: ThemeColorsRecord) => ({\n color: theme.grey50,\n fontFamily: 'Roboto',\n fontSize: ' 0.8rem',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: 'normal',\n});\n","import {\n FieldValues,\n SubmitErrorHandler,\n SubmitHandler,\n useFormContext,\n} from 'react-hook-form';\n\nimport { HStackButtons } from '../../utils/styles';\nimport { ActionButton } from '../Button';\nimport { Icon } from '../Icons/Icon';\n\ntype StepperButtonsProps = {\n active: number;\n prevStep: () => void;\n nextStep: () => void;\n onSubmit: SubmitHandler;\n onError: SubmitErrorHandler;\n steps: number;\n create?: boolean;\n};\n\nconst StepperButtons = ({\n active,\n prevStep,\n nextStep,\n onSubmit,\n onError,\n steps,\n create = true,\n}: StepperButtonsProps) => {\n const { handleSubmit, formState } = useFormContext();\n\n const handleButtonSubmit = () => {\n handleSubmit(onSubmit, onError)();\n };\n return (\n \n {active !== 0 && (\n \n )}\n {active !== steps && active !== steps - 1 && (\n }\n className=\"next\"\n onClick={nextStep}\n tx=\"next\"\n />\n )}\n {active === steps - 1 && (\n \n )}\n \n );\n};\n\nexport default StepperButtons;\n","export default \"__VITE_ASSET__7fe58c85__\"","import React, { useState } from 'react';\nimport DefaultAvatar from '@aclito/shared/resources/default-person.svg';\nconst S3Image = ({\n imageURL,\n ...props\n}: { imageURL: string } & React.DetailedHTMLProps<\n React.ImgHTMLAttributes,\n HTMLImageElement\n>) => {\n const [isLoaded, setIsLoaded] = useState(false);\n\n if (!imageURL) return null;\n\n return (\n <>\n setIsLoaded(true)}\n style={{\n display: isLoaded ? 'unset' : 'none',\n borderRadius: '50%',\n maxHeight: '100%',\n maxWidth: '100%',\n ...props.style,\n }}\n />\n {!isLoaded && (\n \n )}\n \n );\n};\n\nexport default S3Image;\n","import { TranslateKey } from '@aclito/shared/types';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport { useTheme } from 'styled-components';\n\nimport { Text } from './Text';\nimport { HStack, VStack } from './Layout';\nimport { Icon } from './Icons/Icon';\n\nconst InlineTooltip = ({\n txTitle,\n txBody,\n color,\n}: {\n txTitle: TranslateKey;\n txBody?: TranslateKey;\n color?: ThemeColorsKeys;\n}) => {\n const theme = useTheme();\n return (\n <>\n \n \n \n \n \n {txBody && (\n \n )}\n \n \n );\n};\n\nexport default InlineTooltip;\n","import { useTheme } from 'styled-components';\n\nimport { Text } from './Text';\nimport { HStack } from './Layout';\nimport { Icon } from './Icons/Icon';\n\nconst Streak = ({ streak }: { streak: number }) => {\n const theme = useTheme();\n\n return (\n \n \n \n \n {streak !== 0 ? (\n \n ) : (\n \n )}\n \n {streak !== 0 && (\n 1 && streak < 5\n ? 'events.duration2'\n : 'events.duration3'\n }\n txOptions={{ value: streak }}\n />\n )}\n \n \n );\n};\n\nexport default Streak;\n","import { TranslateKey } from '@aclito/shared/types';\n\nimport { Icon, IconType } from './Icons/Icon';\nimport { VStack, HStack } from './Layout';\nimport { Text } from './Text';\n\ninterface EmptyFlashListTextProps {\n tx: TranslateKey;\n iconType?: IconType;\n action?: keyof typeof actions;\n vertical?: boolean;\n}\n\nconst actions = {\n addEvent: ,\n addAvailability: ,\n map: ,\n org: ,\n addFeed: ,\n addPayment: ,\n addAlias: ,\n};\n\nexport const EmptyList: React.FC = ({\n tx,\n iconType,\n action,\n vertical,\n}) => {\n const isVertical = vertical ?? !action;\n\n const Wrapper = isVertical ? VStack : HStack;\n\n return (\n \n \n {iconType && !isVertical && }\n\n \n {iconType && isVertical && (\n \n )}\n \n {action && actions[action]}\n \n );\n};\n\nfunction ActionAddEvent() {\n return (\n \n \n \n \n );\n}\n\nfunction ActionAddAlias() {\n return (\n \n \n \n \n );\n}\n\nfunction ActionAddAvailability() {\n return (\n \n \n \n \n );\n}\n\nfunction ActionMap() {\n return (\n \n \n \n \n );\n}\n\nfunction ActionAddFeed() {\n return (\n \n \n \n \n );\n}\n\nfunction ActionOrg() {\n return (\n \n \n \n \n \n\n \n \n \n \n );\n}\n\nfunction ActionAddPayment() {\n return (\n \n \n \n \n \n \n );\n}\n","import { NotificationType } from '@aclito/enums';\nimport { ReactElement } from 'react';\n\nimport { Icon } from '@/components';\n\nconst LocalNotificationIcons = (type: NotificationType) => {\n const icons: Record = {\n EVENT_LEFT: ,\n EVENT_MULTIPLE_LEFT: ,\n EVENT_LEFT_REPEATING: ,\n EVENT_MULTIPLE_QUEUE_LEFT: (\n \n ),\n EVENT_KICK: ,\n EVENT_JOIN: ,\n EVENT_JOIN_REPEATING: ,\n EVENT_MULTIPLE_JOIN: ,\n EVENT_QUEUE_MULTIPLE_JOIN: (\n \n ),\n EVENT_QUEUE_REPEATING_JOIN: (\n \n ),\n EVENT_QUEUE_REPEATING_LEFT: (\n \n ),\n EVENT_QUEUE_JOIN: ,\n EVENT_PLAYER_CONFIRMED: (\n \n ),\n EVENT_MULTIPLE_PLAYER_CONFIRMED: (\n \n ),\n EVENT_INVITE: ,\n EVENT_CHANGE: ,\n EVENT_CHANGE_REPEATING: ,\n EVENT_DELETE: ,\n EVENT_DELETE_REPEATING: ,\n EVENT_STARTING: ,\n EVENT_END: ,\n EVENT_QUEUE_KICK: ,\n EVENT_QUEUE_LEFT: ,\n EVENT_QUEUE_SHIFT: ,\n EVENT_CONFIRM: ,\n ORG_ROLE_CHANGE: ,\n ORG_DELETE: ,\n ORG_JOIN: ,\n ORG_LEFT: ,\n ORG_KICK: ,\n FEED_CREATE: ,\n FEED_UPDATE: ,\n PROFILE_COMMENT_CREATE: ,\n };\n\n return icons[type] ?? null;\n};\n\nexport default LocalNotificationIcons;\n","import React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { Icon, SmallButton, Text } from '@/components';\n\ninterface ShowMoreButtonProps {\n onClick: () => void;\n}\n\nconst ShowMoreButton: React.FC = ({ onClick }) => {\n const theme = useTheme();\n return (\n \n \n \n \n );\n};\n\nexport default ShowMoreButton;\n","import styled, { useTheme } from 'styled-components';\n\nimport { VStack, SmallButton, Text } from '@/components';\n\nconst Fallback = () => {\n const theme = useTheme();\n return (\n \n \n \n\n \n \n );\n};\n\nconst Heading = styled(Text)`\n margin-bottom: 16px;\n color: ${({ theme }) => theme.error};\n`;\n\nexport default Fallback;\n","import * as Sentry from '@sentry/react';\nimport { config } from '@aclito/shared/config';\nimport { isEnabledConfig } from '@aclito/shared/util/isEnabledConfig';\nimport { IS_DEV } from '@aclito/shared/lib/env';\nimport { ReactElement } from 'react';\nimport { logger } from '@aclito/shared/lib/logger';\n\nimport { Fallback } from './components';\n\ninterface ErrorBoundaryProps {\n children: ReactElement;\n}\n\nconst ErrorBoundary = ({ children }: ErrorBoundaryProps) => {\n if (isEnabledConfig(config.catchErrors, IS_DEV)) {\n return (\n logger.error(error)}\n fallback={Fallback}\n >\n {children}\n \n );\n }\n\n return children;\n};\n\nexport default ErrorBoundary;\n","export const openInNewTab = (url: string) => {\n const newWindow = window.open(url, '_blank', 'noopener,noreferrer');\n if (newWindow) newWindow.opener = null;\n};\n","import styled from 'styled-components';\nimport { isMobile, isAndroid, isIOS } from 'react-device-detect';\nimport { config } from '@aclito/shared/config';\nimport { useDisclosure } from '@mantine/hooks';\n\nimport { SmallButton, Icon } from '@/components';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\n\nconst MobileBanner = () => {\n const [bannerVisible, { toggle }] = useDisclosure(true);\n\n const handleDownload = () => {\n if (isIOS) {\n openInNewTab(config.URL.appleStoreURL);\n } else if (isAndroid) {\n openInNewTab(config.URL.googleStoreURL);\n }\n };\n\n return (\n <>\n {isMobile && bannerVisible && (\n \n \n }\n onClick={handleDownload}\n />\n \n \n \n )}\n \n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n`;\n\nconst Banner = styled.div`\n padding: 16px;\n position: fixed;\n bottom: 0;\n left: 0;\n z-index: 100;\n width: 100%;\n background: ${({ theme }) => theme.white};\n color: ${({ theme }) => theme.white};\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);\n box-sizing: border-box;\n`;\n\nexport default MobileBanner;\n","import { getParticipantsCount } from '@aclito/shared/features/event/utils/getParticipantsCount';\nimport styled, { useTheme } from 'styled-components';\nimport { Organization, Event } from '@aclito/entities';\nimport dayjs from 'dayjs';\n\nimport { HStack, Icon, Text } from '@/components';\n\ntype PlayersMembersNumberProps = {\n event?: Event;\n organization?: Organization;\n textSize?: number;\n iconSize?: number;\n withIcon?: boolean;\n};\n\nconst PlayersMembersNumber = ({\n event,\n organization,\n textSize = 16,\n iconSize = 24,\n withIcon = false,\n}: PlayersMembersNumberProps) => {\n const theme = useTheme();\n\n let max = -1;\n let count = 0;\n let isInPast = false;\n\n if (event) {\n max = event.maxPlayers;\n isInPast = event.date < dayjs().toISOString();\n count = getParticipantsCount(event);\n } else if (organization) {\n max = organization.maxMembers;\n count = organization.members.length;\n }\n\n if (isInPast) return null;\n\n return (\n \n {max === -1 ? (\n \n {`${count}/`}\n \n \n ) : (\n {`${count}/${max}`}\n )}\n {withIcon && }\n \n );\n};\n\nconst StyledIcon = styled(Icon)`\n padding-left: 4px;\n`;\n\nexport default PlayersMembersNumber;\n","import { useTheme } from 'styled-components';\nimport { useDispatch } from 'react-redux';\nimport { commonActions } from '@aclito/shared/redux/slices';\nimport { useSelectObject } from '@aclito/shared/hooks/useSelectObject';\nimport { Menu } from '@mantine/core';\nimport { LocaleType } from '@aclito/shared/types';\n\nimport { Icon, Text } from '@/components';\n\nconst Language = () => {\n const dispatch = useDispatch();\n const { translatedLocaleOptions } = useSelectObject();\n const theme = useTheme();\n\n return (\n <>\n \n \n
\n \n
\n
\n\n \n {translatedLocaleOptions.map((lang, index) => (\n {\n dispatch(\n commonActions.updateLocale({ locale: lang.id as LocaleType }),\n );\n }}\n key={lang.id}\n data-cy={`language-${index}`}\n >\n {lang.item}\n \n ))}\n \n \n \n );\n};\n\nexport default Language;\n","/* eslint-disable react/display-name */\nimport { forwardRef } from 'react';\nimport { Input as MantineInput } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { InputProps } from './types';\n\nconst Input = forwardRef(\n (\n {\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n rightSection,\n optional,\n ...props\n },\n ref,\n ) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = optional\n ? `${i18nLabel || label} ${t('optional')}`\n : i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n return (\n // @ts-ignore\n \n \n \n );\n },\n);\nexport default Input;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Checkbox as MantineCheckbox } from '@mantine/core';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { CheckboxProps } from './types';\n\nconst Checkbox: React.FC = ({\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n ...props\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n return (\n \n );\n};\n\nexport default Checkbox;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Select as MantineSelect } from '@mantine/core';\nimport React, { useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { Icon } from '../Icons/Icon';\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { SelectProps } from './types';\n\nconst Select: React.FC = ({\n options,\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n optional,\n isLoading,\n ...props\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = optional\n ? `${i18nLabel || label} ${t('optional')}`\n : i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n const isLoadingPlc = t('flatlist.loading');\n const selectRef = useRef(null);\n\n return (\n props.onChange && props.onChange('')}\n icon={'close'}\n color=\"grey30\"\n />\n ) : (\n selectRef.current && selectRef.current.focus()}\n icon={'expandMore'}\n color=\"grey30\"\n />\n )\n }\n radius={10}\n clearable\n styles={{\n input: {\n backgroundColor: theme.white,\n color: theme.grey80,\n },\n label: { ...getCommonInputLabelStyle(theme) },\n ...props.styles,\n }}\n data={options.map((o) => ({ value: o.id, label: o.item }))}\n label={labelContent}\n placeholder={isLoading ? isLoadingPlc : placeholderContent}\n {...props}\n />\n );\n};\n\nexport default Select;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport Checkbox from './Checkbox';\nimport { CheckboxProps } from './types';\n\nconst ValidatedCheckbox: React.FC = ({\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange },\n fieldState: { error },\n } = useController({ name });\n return (\n onChange(val.target.checked)}\n data-testid={name}\n {...rest}\n />\n );\n};\n\nexport default ValidatedCheckbox;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport Input from './Input';\nimport { InputProps } from './types';\n\nconst ValidatedInput: React.FC = ({\n placeholder,\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n return (\n \n );\n};\n\nexport default ValidatedInput;\n","export const formatTimeInput = (input: string) => {\n if (input.length > 2) {\n input = `${input.slice(0, 2)}:${input.slice(2)}`;\n }\n\n const modifiedRegex = /(\\D+)?(\\d{2}:)?(\\D+)?/g;\n input = input.replace(modifiedRegex, (_, _p1, p2) => p2 || '');\n\n if (input.length > 5) {\n input = input.slice(0, 5);\n }\n\n const [hours, minutes] = input.split(':').map(Number);\n if (hours > 23) input = '23:' + input.slice(3);\n if (minutes > 59) input = input.slice(0, 3) + '59';\n\n return input;\n};\n","import React, { ChangeEvent } from 'react';\nimport { useController } from 'react-hook-form';\nimport { formatTimeInput } from '@aclito/shared/util/formatTimeInput';\n\nimport { InputProps } from './types';\nimport Input from './Input';\nconst ValidatedTimeInput: React.FC = ({\n placeholder,\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n\n const handleDurationChange = (e: ChangeEvent) => {\n onChange(formatTimeInput(e.target.value));\n };\n\n return (\n // @ts-ignore\n \n );\n};\n\nexport default ValidatedTimeInput;\n","import React from 'react';\nimport { Textarea as MTTextarea } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { TextareaProps } from './types';\n\nconst Textarea: React.FC = ({\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n optional,\n ...props\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = optional\n ? `${i18nLabel || label} ${t('optional')}`\n : i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n return (\n \n );\n};\n\nexport default Textarea;\n","import * as React from 'react';\nimport { Switch as MantineSwitch } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport styled, { useTheme } from 'styled-components';\n\nimport { Text } from '../Text';\nimport { VStack } from '../Layout';\n\nimport { SwitchProps } from './types';\n\nconst Switch: React.FC = ({\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n txSubLabel,\n ...props\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n const switchHeight = 28;\n\n return (\n \n {labelContent}\n {txSubLabel ? (\n \n ) : null}\n \n }\n placeholder={placeholderContent}\n {...props}\n />\n );\n};\n\nconst StyledInput = styled(MantineSwitch)`\n input:checked + * > * {\n left: calc(100% - 1.125rem - 0.25rem);\n }\n`;\n\nexport default Switch;\n","import * as React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport Switch from './Switch';\nimport { SwitchProps } from './types';\n\nconst ValidatedSwitch: React.FC = ({\n name,\n ...props\n}) => {\n const {\n field: { value, onChange },\n fieldState: { error },\n } = useController({ name });\n return (\n {\n onChange(val.target.checked);\n if (props.onChange) {\n props.onChange(val);\n }\n }}\n />\n );\n};\n\nexport default ValidatedSwitch;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport Select from './Select';\nimport { SelectProps } from './types';\n\n/**\n * @deprecated Use `ValidatedSelectV2` instead. Select V2 works with id only\n */\nconst ValidatedSelect: React.FC<\n SelectProps & {\n name: string;\n }\n> = ({ name, ...rest }) => {\n const {\n field: { value, onChange },\n fieldState: { error },\n } = useController({\n name,\n });\n return (\n {\n if (!item) {\n onChange('');\n return;\n }\n onChange(rest.options?.find((o) => o.id === item));\n if (rest.onChange) {\n rest?.onChange(item);\n }\n }}\n />\n );\n};\n\nexport default ValidatedSelect;\n","/* eslint-disable react/display-name */\nimport { forwardRef } from 'react';\nimport { NumberInput as MantineInput } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { InputProps } from './types';\n\nconst NumberInput = forwardRef(\n ({ label, placeholder, txLabel, txPlaceholder, optional, ...props }, ref) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = optional\n ? `${i18nLabel || label} ${t('optional')}`\n : i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n const computeValue = (value: InputProps['value']) => {\n if (value === null || value === undefined) {\n return '';\n }\n if (typeof props.value === 'string') {\n const result = parseInt(props.value);\n return isNaN(result) ? '' : result;\n }\n return value as number | '' | undefined;\n };\n\n return (\n // @ts-ignore\n }\n styles={{\n input: { backgroundColor: theme.white, color: theme.grey80 },\n label: { ...getCommonInputLabelStyle(theme) },\n }}\n size=\"md\"\n radius={10}\n label={labelContent}\n placeholder={placeholderContent}\n {...props}\n value={computeValue(props.value)}\n />\n );\n },\n);\nexport default NumberInput;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport NumberInput from './NumberInput';\nimport { InputProps } from './types';\n\nconst ValidatedNumberInput: React.FC = ({\n placeholder,\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n return (\n \n );\n};\n\nexport default ValidatedNumberInput;\n","import { DateTimePicker as MDateTimePicker } from '@mantine/dates';\nimport React from 'react';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\nimport { Icon } from '../Icons/Icon';\n\nimport { DateTimePickerProps } from './types';\n\nconst DateTimePicker: React.FC = (props) => {\n const {\n txPlaceholder,\n placeholder,\n txLabel,\n label,\n clearable = true,\n ...rest\n } = props;\n const t = useTranslate();\n const theme = useTheme();\n const i18nDateLabel = txLabel && t(txLabel);\n const dateLabelContent = i18nDateLabel || label;\n\n const i18nDatePlaceholder = txPlaceholder && t(txPlaceholder);\n const datePlaceholderContent = i18nDatePlaceholder || placeholder;\n\n return (\n // @ts-ignore\n }\n />\n );\n};\n\nexport default DateTimePicker;\n","import React, { useCallback } from 'react';\nimport dayjs, { Dayjs } from 'dayjs';\nimport { useController } from 'react-hook-form';\nimport { DateValue } from '@mantine/dates';\n\nimport DateTimePicker from './DateTimePicker';\nimport { DateTimePickerProps } from './types';\n\nconst ValidatedDateTimePicker: React.FC<\n DateTimePickerProps & { name: string }\n> = ({ name, ...props }) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n\n const updateWithDate = (val: DateValue) => {\n if (!val) {\n onChange('');\n } else {\n onChange(val);\n }\n };\n\n const handleValue = useCallback(\n (val: Date | string | Dayjs) => {\n let convertedValue;\n if (!val) {\n convertedValue = undefined;\n } else if (value instanceof dayjs) {\n // @ts-ignore\n convertedValue = val.toDate();\n } else if (typeof val === 'string') {\n convertedValue = dayjs(value).toDate();\n } else {\n convertedValue = val;\n }\n return convertedValue;\n },\n [value],\n );\n\n return (\n updateWithDate(d),\n }}\n />\n );\n};\n\nexport default ValidatedDateTimePicker;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport { TextareaProps } from './types';\nimport Textarea from './Textarea';\n\nconst ValidatedTextArea: React.FC = ({\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n return (\n onChange(val.target.value)}\n onBlur={onBlur}\n error={error?.message}\n autoComplete={'on'}\n variant=\"filled\"\n size=\"md\"\n autosize\n minRows={4}\n radius={10}\n {...rest}\n />\n );\n};\n\nexport default ValidatedTextArea;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { MultiSelect as MantineMultiSelect } from '@mantine/core';\nimport React, { useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { Icon } from '../Icons/Icon';\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { MultiSelectProps } from './types';\n\nconst MultiSelect: React.FC = ({\n label,\n placeholder,\n txLabel,\n txPlaceholder,\n options,\n optional,\n ...props\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = optional\n ? `${i18nLabel || label} ${t('optional')}`\n : i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n const selectRef = useRef(null);\n\n return (\n selectRef.current && selectRef.current.focus()}\n icon={'expandMore'}\n color=\"grey30\"\n />\n }\n styles={{\n input: { backgroundColor: theme.white },\n value: {\n backgroundColor: theme.primary,\n color: theme.whiteText,\n },\n label: { ...getCommonInputLabelStyle(theme) },\n }}\n data={options?.map((o) => ({ value: o.id, label: o.item }))}\n label={labelContent}\n placeholder={placeholderContent}\n searchable\n {...props}\n />\n );\n};\n\nexport default MultiSelect;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\nimport { SelectObject } from '@aclito/shared/types';\n\nimport MultiSelect from './MultiSelect';\nimport { MultiSelectProps } from './types';\n\nconst ValidatedMultiSelect: React.FC = ({\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n return (\n v.id) : []}\n onChange={(item) => {\n onChange(rest.options.filter((o) => item.some((i) => i === o.id)));\n }}\n name={name}\n onBlur={onBlur}\n error={error?.message}\n {...rest}\n />\n );\n};\n\nexport default ValidatedMultiSelect;\n","import React, { useRef } from 'react';\n\nimport { Icon } from '../Icons/Icon';\n\nimport Input from './Input';\nimport { InputProps } from './types';\n\ninterface SearchBarProps extends InputProps {\n onClear: () => void;\n}\n\nconst SearchBar: React.FC = ({ onClear, ...rest }) => {\n const ref = useRef(null);\n const handleClear = () => {\n onClear?.();\n if (ref?.current?.value) ref.current.value = '';\n };\n return (\n }\n rightSection={\n \n }\n {...rest}\n />\n );\n};\n\nexport default SearchBar;\n","import { Radio, RadioGroupProps } from '@mantine/core';\n\nconst RadioGroup = ({ children, ...props }: RadioGroupProps) => {\n return {children};\n};\n\nexport default RadioGroup;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Radio } from '@mantine/core';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { RadioProps } from './types';\n\nconst RadioButton: React.FC = ({ label, txLabel, ...props }) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n return (\n \n );\n};\n\nexport default RadioButton;\n","/* eslint-disable react/display-name */\nimport { forwardRef } from 'react';\nimport {\n PasswordInputProps,\n PasswordInput as MantinePasswordInput,\n} from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { InputProps } from './types';\n\nconst PasswordInput = forwardRef<\n HTMLInputElement,\n InputProps & PasswordInputProps\n>(({ label, placeholder, txLabel, txPlaceholder, ...props }, ref) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n return (\n \n );\n});\n\nexport default PasswordInput;\n","import React from 'react';\nimport { PasswordInputProps } from '@mantine/core';\nimport { useController } from 'react-hook-form';\n\nimport { InputProps } from './types';\nimport PasswordInput from './PasswordInput';\n\nconst ValidatedPasswordInput: React.FC<\n InputProps & PasswordInputProps & { name: string }\n> = ({ placeholder, name, ...rest }) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n\n return (\n \n );\n};\n\nexport default ValidatedPasswordInput;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport Select from './Select';\nimport { SelectProps } from './types';\n\nconst ValidatedSelectV2: React.FC<\n SelectProps & {\n name: string;\n }\n> = ({ name, ...rest }) => {\n const {\n field: { value, onChange },\n fieldState: { error },\n } = useController({\n name,\n });\n return (\n {\n if (rest.onChange) {\n rest?.onChange(item);\n }\n if (!item) {\n onChange('');\n return;\n }\n onChange(rest.options?.find((o) => o.id === item)?.id);\n }}\n />\n );\n};\n\nexport default ValidatedSelectV2;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport NumberInput from './NumberInput';\nimport { InputProps } from './types';\n\nconst ValidatedNumberInputV2: React.FC = ({\n placeholder,\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange, onBlur },\n fieldState: { error },\n } = useController({ name });\n return (\n {\n if ((v as unknown) === '') return onChange(null);\n onChange(v);\n }}\n onBlur={onBlur}\n placeholder={placeholder}\n error={error?.message}\n // @ts-ignore\n invalid={error}\n autoComplete={'on'}\n {...rest}\n />\n );\n};\n\nexport default ValidatedNumberInputV2;\n","import { createAvatar } from '@dicebear/avatars';\nimport * as styles from '@dicebear/pixel-art';\n\nconst SVG = (seed?: string) =>\n createAvatar(styles, {\n seed: seed ?? '',\n radius: 50,\n // ... and other options\n });\n\nexport default SVG;\n","import SVG from '@aclito/shared/util/SVG';\nimport styled from 'styled-components';\nimport React from 'react';\nimport DefaultAvatar from '@aclito/shared/resources/default-person.svg';\nimport { ImageValueShape } from '@aclito/shared/types';\n\nimport S3Image from '../S3Image';\n\ninterface AvatarProps\n extends React.DetailedHTMLProps<\n React.HTMLAttributes,\n HTMLDivElement\n > {\n size: number | string;\n image: ImageValueShape;\n timeStamp?: string;\n}\n\nconst Avatar: React.FC = ({ size, image, timeStamp, ...rest }) => {\n if (!image) {\n return ;\n }\n const picType = image.slice(0, 5) ?? '';\n const picValue = image.slice(5) ?? '';\n\n return (\n
\n {picType === 'BASIC' && (\n \n \n \n )}\n {picType === 'FILE:' && (\n \n \n \n )}\n {picType === 'SEED:' && (\n \n )}\n
\n );\n};\n\nconst AvatarView = styled.div<{ size: number | string }>`\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 100%;\n :hover {\n cursor: pointer;\n }\n\n min-height: ${(props) => props.size}px;\n max-height: ${(props) => props.size}px;\n min-width: ${(props) => props.size}px;\n max-width: ${(props) => props.size}px;\n`;\n\nconst DefaultImage = styled.img<{ size: number | string }>`\n min-height: ${(props) => props.size}px;\n max-height: ${(props) => props.size}px;\n min-width: ${(props) => props.size}px;\n max-width: ${(props) => props.size}px;\n`;\n\nconst AvatarPlaceholder = styled.div<{ size: number | string }>`\n min-height: ${(props) => props.size}px;\n max-height: ${(props) => props.size}px;\n min-width: ${(props) => props.size}px;\n max-width: ${(props) => props.size}px;\n border-radius: 100%;\n background-color: ${({ theme }) => theme.grey20};\n`;\n\nexport default Avatar;\n","export const generateColor = (name: string): string => {\n const hash = Array.from(name).reduce(\n (acc, char) => acc + char.charCodeAt(0),\n 0,\n );\n\n const hue = 100 + (hash % 150);\n const saturation = 40 + (hash % 40);\n const lightness = 40 + (hash % 30);\n\n return `hsl(${hue}, ${saturation}%, ${lightness}%)`;\n};\n\nexport const getInitials = (name: string): string => {\n const words = name.trim().split(/\\s+/);\n if (words.length === 1) {\n return words[0].slice(0, 2).toUpperCase();\n }\n const firstInitial = words[0].charAt(0).toUpperCase();\n const secondInitial = words[1]?.charAt(0).toUpperCase() || '';\n return firstInitial + secondInitial;\n};\n","import { Organization } from '@aclito/entities';\nimport styled from 'styled-components';\nimport { generateColor, getInitials } from '@aclito/shared/util/avatarOrg';\n\nimport S3Image from '../S3Image';\n\nconst OrgAvatar = ({\n org,\n size,\n}: {\n org: Organization;\n background?: [number, number, number, number];\n size?: number;\n}) => {\n const picType = org.image?.slice(0, 5) ?? '';\n const initials = getInitials(org.name) || '?';\n const bgColor = generateColor(org.name);\n\n return !org.image || picType === 'BASIC' ? (\n
\n \n {initials}\n \n
\n ) : (\n \n );\n};\n\nconst Avatar = styled.div<{ size: string; $bgColor: string }>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${({ size }) => size};\n height: ${({ size }) => size};\n border-radius: 50%;\n background-color: ${({ $bgColor }) => $bgColor};\n color: ${({ theme }) => theme.whiteText};\n font-size: ${({ size }) => `calc(${size} / 3)`};\n font-weight: bold;\n text-transform: uppercase;\n`;\n\nexport default OrgAvatar;\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport { Avatar } from '../Avatar';\nimport Image from '../Image';\n\ninterface ImagePreviewProps {\n preview: string | Blob;\n circular: boolean;\n}\n\nconst ImagePreview: React.FC = ({ preview, circular }) => {\n return typeof preview === 'string' ? (\n circular ? (\n \n ) : (\n \n )\n ) : (\n \n );\n};\n\nconst PreviewImage = styled.img<{ circular?: boolean }>`\n max-width: 200px;\n max-height: 200px;\n border-radius: ${({ circular }) => (circular ? '50%' : 0)};\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.grey20};\n`;\n\nexport default ImagePreview;\n","import { useTheme } from 'styled-components';\n\nimport { Avatar } from '../Avatar';\nimport Image from '../Image';\n\nimport { CurrentPictureProps } from './types';\n\nconst CurrentPicture = ({ currentImage, circular }: CurrentPictureProps) => {\n const theme = useTheme();\n return (\n \n <>\n {currentImage &&\n (circular ? (\n \n ) : (\n \n ))}\n \n \n );\n};\n\nexport default CurrentPicture;\n","import { Group } from '@mantine/core';\n\nimport { Icon } from '../Icons/Icon';\n\nconst DropzoneContent = () => {\n return (\n \n \n \n );\n};\n\nexport default DropzoneContent;\n","import { txFn } from '../types';\n\nexport const getRandomUserName = (t: txFn): string => {\n return t('user');\n};\n\nexport const getRandomUserSurname = () => {\n return Date.now().toString().slice(-5);\n};\n\nexport const getRandomAvatarSeed = (): string =>\n (Math.random() + 1).toString(36).substring(5);\n","// Demo https://github.com/DominicTobias/react-image-crop\nimport { PixelCrop } from 'react-image-crop';\n\nconst TO_RADIANS = Math.PI / 180;\n\nexport async function canvasPreview(\n image: HTMLImageElement,\n canvas: HTMLCanvasElement,\n crop: PixelCrop,\n scale = 1,\n rotate = 0,\n) {\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n throw new Error('No 2d context');\n }\n\n const scaleX = image.naturalWidth / image.width;\n const scaleY = image.naturalHeight / image.height;\n // devicePixelRatio slightly increases sharpness on retina devices\n // at the expense of slightly slower render times and needing to\n // size the image back down if you want to download/upload and be\n // true to the images natural size.\n const pixelRatio = window.devicePixelRatio;\n // const pixelRatio = 1\n\n canvas.width = Math.floor(crop.width * scaleX * pixelRatio);\n canvas.height = Math.floor(crop.height * scaleY * pixelRatio);\n\n ctx.scale(pixelRatio, pixelRatio);\n ctx.imageSmoothingQuality = 'high';\n\n const cropX = crop.x * scaleX;\n const cropY = crop.y * scaleY;\n\n const rotateRads = rotate * TO_RADIANS;\n const centerX = image.naturalWidth / 2;\n const centerY = image.naturalHeight / 2;\n\n ctx.save();\n\n // 5) Move the crop origin to the canvas origin (0,0)\n ctx.translate(-cropX, -cropY);\n // 4) Move the origin to the center of the original position\n ctx.translate(centerX, centerY);\n // 3) Rotate around the origin\n ctx.rotate(rotateRads);\n // 2) Scale the image\n ctx.scale(scale, scale);\n // 1) Move the center of the image to the origin (0,0)\n ctx.translate(-centerX, -centerY);\n ctx.drawImage(\n image,\n 0,\n 0,\n image.naturalWidth,\n image.naturalHeight,\n 0,\n 0,\n image.naturalWidth,\n image.naturalHeight,\n );\n\n ctx.restore();\n}\n","import {\n centerCrop,\n Crop,\n makeAspectCrop,\n PercentCrop,\n PixelCrop,\n} from 'react-image-crop';\nimport React, { useRef, useState } from 'react';\nimport { useDisclosure } from '@mantine/hooks';\nimport blobReduce from 'image-blob-reduce';\nimport { getRandomAvatarSeed } from '@aclito/shared/util/getRandomUserAttributes';\nimport { useDebounceEffect } from '@aclito/shared/hooks';\n\nimport { canvasPreview } from './canvasPreview';\n\nconst aspect = 1;\n\nexport const useDropZone = (\n onChange?: (blob: Blob | string) => void,\n circular = false,\n) => {\n const previewCanvasRef = useRef(null);\n const ref = useRef(null);\n\n const [imgSrc, setImgSrc] = useState('');\n const imgRef = useRef(null);\n const [crop, setCrop] = useState(undefined);\n const [completedCrop, setCompletedCrop] = useState(\n undefined,\n );\n const [scale, setScale] = useState(1);\n const [rotate, setRotate] = useState(0);\n const [preview, setPreview] = useState();\n const [open, { toggle }] = useDisclosure(false);\n\n const rotateMarks = [\n { value: -180, label: '-180' },\n { value: 0, label: '0' },\n { value: 180, label: '180' },\n ];\n\n const scaleMarks = [\n { value: 1, label: '1' },\n { value: 5, label: '5' },\n ];\n\n const handleUploadClick = () => {\n // @ts-ignore\n ref.current.value = '';\n ref?.current?.click();\n };\n\n const handleAvatarClick = () => {\n const seed = getRandomAvatarSeed();\n setPreview(seed);\n onChange?.(seed);\n };\n\n const submit = () => {\n previewCanvasRef?.current?.toBlob?.(async (blob) => {\n if (blob) {\n toggle();\n\n const newBlob = await finalResize(blob);\n onChange?.(newBlob);\n setPreview(newBlob);\n setRotate(0);\n setScale(1);\n }\n });\n };\n\n const finalResize = async (inBlob: Blob) => {\n return await blobReduce().toBlob(inBlob, { max: 1000 });\n };\n\n useDebounceEffect(\n async () => {\n if (\n completedCrop?.width &&\n completedCrop?.height &&\n imgRef.current &&\n previewCanvasRef.current\n ) {\n await canvasPreview(\n imgRef.current,\n previewCanvasRef.current,\n completedCrop,\n scale,\n rotate,\n );\n }\n },\n 100,\n [completedCrop, scale, rotate],\n );\n\n function onSelectFile(e: React.ChangeEvent) {\n if (e.target.files && e.target.files.length > 0) {\n setCrop(undefined); // Makes crop preview update between images.\n const reader = new FileReader();\n reader.addEventListener('load', () =>\n setImgSrc(reader.result?.toString() || ''),\n );\n reader.readAsDataURL(e.target.files[0]);\n }\n }\n\n function onImageLoad(e: React.SyntheticEvent) {\n const { width, height } = e.currentTarget;\n setCrop(centerAspectCrop(width, height));\n }\n\n function centerAspectCrop(mediaWidth: number, mediaHeight: number) {\n return circular\n ? centerCrop(\n makeAspectCrop(\n {\n unit: '%',\n width: 90,\n },\n 1,\n mediaWidth,\n mediaHeight,\n ),\n mediaWidth,\n mediaHeight,\n )\n : ({\n unit: '%',\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n } as Crop);\n }\n\n const onCompleteCrop = (c: PixelCrop) => {\n setCompletedCrop(c);\n };\n\n const onChangeCrop = (_: PixelCrop, percentCrop: PercentCrop) => {\n setCrop(percentCrop);\n };\n\n return {\n onSelectFile,\n imgSrc,\n imgRef,\n aspect,\n onImageLoad,\n onCompleteCrop,\n completedCrop,\n previewCanvasRef,\n onChangeCrop,\n crop,\n scale,\n rotate,\n setRotate,\n setScale,\n preview,\n submit,\n open,\n toggle,\n setPreview,\n generateSeed: handleAvatarClick,\n rotateMarks,\n scaleMarks,\n ref,\n handleUploadClick,\n };\n};\n","import ReactCrop from 'react-image-crop';\nimport styled, { useTheme } from 'styled-components';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { Modal } from '../Modal';\nimport { HStack, VStack } from '../Layout';\nimport { Slider } from '../Form';\nimport { Button } from '../Button';\n\nimport ImagePreview from './ImagePreview';\nimport CurrentPicture from './CurrentPicture';\nimport DropzoneContent from './DropzoneContent';\nimport { ImageDropzoneProps } from './types';\nimport { useDropZone } from './useDropZone';\n\nimport 'react-image-crop/dist/ReactCrop.css';\n\nconst ImageDropzone = ({\n onChange,\n currentImage,\n onRemove,\n imageOnly,\n circular = true,\n}: ImageDropzoneProps) => {\n const {\n onSelectFile,\n imgSrc,\n imgRef,\n aspect,\n onImageLoad,\n onCompleteCrop,\n completedCrop,\n previewCanvasRef,\n onChangeCrop,\n crop,\n scale,\n rotate,\n setRotate,\n setScale,\n preview,\n submit,\n open,\n toggle,\n generateSeed,\n rotateMarks,\n scaleMarks,\n handleUploadClick,\n ref,\n setPreview,\n } = useDropZone(onChange, circular);\n\n const t = useTranslate();\n const theme = useTheme();\n return (\n \n {\n onSelectFile(e);\n toggle();\n }}\n />\n {currentImage && !preview ? (\n \n \n \n ) : (\n \n <>\n {preview ? (\n \n ) : (\n \n )}\n \n \n )}\n\n \n \n {t('image.upload')}\n \n {!imageOnly && (\n \n {t('avatar.generate')}\n \n )}\n {currentImage && (\n {\n setPreview(undefined);\n onRemove?.();\n // @ts-ignore\n ref.current.value = '';\n }}\n style={{ background: theme.red10, color: theme.red }}\n >\n {t('remove')}\n \n )}\n \n\n \n \n
\n {imgSrc && (\n \n \n \n )}\n
\n\n {!!completedCrop && (\n <>\n {circular ? (\n \n ) : (\n \n )}\n \n )}\n\n {imgSrc && (\n \n \n \n \n \n )}\n
\n \n
\n );\n};\n\nconst StyledInput = styled.input`\n display: none;\n`;\n\nconst PreviewCanvas = styled.canvas`\n max-height: 400px;\n width: auto;\n max-width: 600px;\n object-fit: contain;\n border: 1px solid ${({ theme }) => theme.grey20};\n`;\n\nconst PreviewCanvasCircular = styled.canvas`\n width: 400px;\n height: 400px;\n border-radius: 50%;\n object-fit: contain;\n border: 1px solid ${({ theme }) => theme.grey20};\n`;\n\nconst StyledButton = styled.button`\n flex: 8rem 1 0;\n display: flex;\n width: 100%;\n border-radius: 10px;\n justify-content: center;\n align-items: center;\n background: ${({ theme }) => theme.primary10};\n padding: 10px 0;\n border: 0;\n color: ${({ theme }) => theme.primary};\n &:hover {\n filter: brightness(95%);\n cursor: pointer;\n }\n`;\n\nconst ImageContainer = styled.div`\n display: flex;\n width: 100%;\n border-radius: 10px;\n justify-content: center;\n align-items: center;\n background: ${({ theme }) => theme.white};\n padding: 10px 0;\n`;\n\nexport default ImageDropzone;\n","import React from 'react';\nimport { useController } from 'react-hook-form';\nimport { DELETED_FILE } from '@aclito/shared/util/constants';\n\nimport { ImageDropzoneProps } from '../Dropzone/types';\nimport { AvatarDropzone } from '../Dropzone';\n\ntype ValidatedDropzoneProps = { name: string } & Pick<\n ImageDropzoneProps,\n 'imageOnly' | 'circular'\n>;\n\nconst ValidatedDropzone: React.FC = ({\n name,\n imageOnly,\n circular = true,\n}) => {\n // NOTE: This component relies on 'file' field inside form values.\n const { field: fileField } = useController({ name: 'file' });\n const { field: imageField } = useController({ name: name });\n\n const onRemove = () => {\n imageField.onChange('');\n fileField.onChange(DELETED_FILE);\n };\n\n const onCrop = async (data: Blob | string) => {\n if (typeof data === 'string') {\n fileField.onChange(undefined);\n imageField.onChange('SEED:' + data);\n } else {\n fileField.onChange(await _convertBlobToBase64(data));\n imageField.onChange('FILE:' + URL.createObjectURL(data));\n }\n };\n\n const _convertBlobToBase64 = (blob: Blob) =>\n new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n if (reader.result && typeof reader.result === 'string') {\n resolve(reader.result.split(',')[1]);\n } else {\n resolve(reader.result);\n }\n };\n reader.readAsDataURL(blob);\n });\n\n return (\n \n );\n};\n\nexport default ValidatedDropzone;\n","import React from 'react';\nimport {\n Slider as MantineSlider,\n RangeSlider as MantineRangeSlider,\n Input,\n} from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\nimport { colors } from '@aclito/shared/theme/colors';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { SliderProps, RangeSliderProps } from './types';\n\nexport const Slider: React.FC = ({ label, txLabel, ...rest }) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n return (\n \n \n \n );\n};\n\nexport const RangeSlider: React.FC = ({\n label,\n txLabel,\n ...rest\n}) => {\n const theme = useTheme();\n const t = useTranslate();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n return (\n \n \n \n );\n};\n","import React from 'react';\nimport { useController } from 'react-hook-form';\n\nimport { RangeSlider, Slider } from './Slider';\nimport { RangeSliderProps, SliderProps } from './types';\n\nexport const ValidatedSlider: React.FC = ({\n name,\n ...rest\n}) => {\n const {\n field: { value, onChange },\n } = useController({ name });\n return ;\n};\nexport const ValidatedRangeSlider: React.FC<\n RangeSliderProps & { name: string }\n> = ({ name, ...rest }) => {\n const {\n field: { value, onChange },\n } = useController({ name });\n return ;\n};\n","/* eslint-disable react/display-name */\nimport { forwardRef } from 'react';\nimport {\n FileInput as MantineFInput,\n Input as MantineInput,\n} from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useTheme } from 'styled-components';\n\nimport { getCommonInputLabelStyle } from '../../utils/styles';\n\nimport { FileInputProps } from './types';\n\nconst FileInput = forwardRef(\n (\n { label, placeholder, txLabel, txPlaceholder, rightSection, ...props },\n ref,\n ) => {\n const t = useTranslate();\n const theme = useTheme();\n const i18nLabel = txLabel && t(txLabel);\n const labelContent = i18nLabel || label;\n\n const i18nPlaceholder = txPlaceholder && t(txPlaceholder);\n const placeholderContent = i18nPlaceholder || placeholder;\n\n return (\n // @ts-ignore\n \n \n \n );\n },\n);\nexport default FileInput;\n","import styled from 'styled-components';\n\nimport { HStack } from './Layout';\nimport { Text } from './Text';\n\nconst BasicCard = styled.div<{\n color?: string;\n $borderColor?: string;\n}>`\n background-color: ${(props) =>\n props.color ? props.color : props.theme.white};\n border-radius: 10px;\n justify-content: center;\n padding: 12px;\n border-left: 2px solid;\n border-left-color: ${(props) =>\n props.$borderColor\n ? props.$borderColor\n : props.color\n ? props.color\n : 'red'};\n border-left-width: ${(props) => (props.$borderColor ? '8px' : '0px')};\n`;\nconst PlainCard = styled(BasicCard)`\n cursor: pointer;\n transition: transform 250ms ease-in-out;\n\n &:hover {\n background: ${({ theme }) => `${theme.black}03`};\n }\n\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);\n\n &.selected {\n background: ${({ theme }) => theme.primary10};\n }\n`;\n\nconst CardTitle = styled(Text)`\n font-weight: 700;\n color: ${({ theme }) => theme.grey80};\n font-size: 14px;\n`;\n\nconst TimeText = styled(Text)`\n font-weight: 700;\n font-size: 14px;\n overflow: hidden;\n white-space: nowrap;\n`;\n\nconst StyledText = styled(Text)`\n color: ${({ theme }) => theme.grey80};\n font-weight: normal;\n overflow: hidden;\n white-space: nowrap;\n` as typeof Text;\n\nconst GroupedContent = styled(HStack)`\n align-items: center;\n overflow: hidden;\n`;\n\nconst IconHolder = styled(HStack)`\n z-index: 1;\n margin-left: auto;\n margin-right: 24px;\n margin-top: 4px;\n`;\n\nexport {\n PlainCard,\n BasicCard,\n CardTitle,\n StyledText,\n GroupedContent,\n TimeText,\n IconHolder,\n};\n","import styled from 'styled-components';\n\nimport { deviceMax, deviceMin, sizeMax } from '../../utils/mediaQueries';\n\nimport HStack from './HStack';\n\nexport const LeftSectionTitle = styled(HStack)`\n justify-content: space-between;\n`;\nexport const SectionGrid = styled.div<{ $isOpen: boolean }>`\n margin: auto;\n max-width: ${sizeMax.desktopXL}px;\n display: grid;\n ${(props) =>\n !props.$isOpen\n ? 'grid-template-columns: 1fr'\n : 'grid-template-columns: 400px 1fr '};\n column-gap: 2rem;\n @media ${deviceMax.laptop} {\n grid-template-columns: 1fr;\n }\n`;\nexport const TitleButtons = styled.div`\n display: flex;\n justify-content: space-between;\n flex-grow: 1;\n`;\nexport const LeftSectionLarge = styled.div`\n @media ${deviceMax.laptop} {\n display: none;\n }\n padding-right: 2rem;\n border-right: 1px solid ${({ theme }) => theme.grey10};\n`;\nexport const LeftSectionSmall = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n z-index: 3;\n top: 0;\n bottom: 0;\n left: 70px;\n background-color: ${({ theme }) => theme.background};\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);\n padding: 2rem;\n @media ${deviceMin.laptop} {\n display: none;\n }\n @media ${deviceMax.tablet} {\n left: 0;\n top: 3.5rem;\n }\n @media ${deviceMax.mobile} {\n width: 100%;\n }\n`;\n","import { SimpleGrid } from '@mantine/core';\nimport { Fragment } from 'react';\nimport styled from 'styled-components';\nimport { useSharedSettings } from '@aclito/shared/features/misc/hooks/useSettings';\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { NotificationSettingsInput } from '@aclito/validators';\nimport { objectKeys } from '@aclito/shared/util/object';\n\nimport {\n ActionButton,\n Text,\n VStack,\n ValidatedCheckbox,\n HStack,\n Icon,\n} from '@/components';\n\nconst NotificationSettings = () => {\n const {\n handleUpdateNotifications,\n initialNotificationValues,\n translationNotificationTable,\n isLoading,\n } = useSharedSettings();\n\n const methods = useForm({\n defaultValues: initialNotificationValues,\n });\n\n const onSubmit: SubmitHandler = (values) => {\n handleUpdateNotifications(values);\n };\n\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const Component = queryMobile ? Fragment : SimpleGrid;\n return (\n \n \n {!queryMobile && (\n \n \n \n \n \n \n \n )}\n \n \n {objectKeys(translationNotificationTable).map((key) => (\n \n \n \n \n {key === 'chat' ? null : (\n \n )}\n \n \n ))}\n \n \n \n \n );\n};\n\nconst SubTitle = styled(Text)`\n font-size: 20px;\n font-weight: 600;\n`;\n\nexport default NotificationSettings;\n","export const ROUTE_ADMIN = '/admin';\nexport const ROUTE_ADMIN_EDIT_ORG = '/admin-edit-org';\nexport const ROUTE_SIGN_IN = '/sign-in';\nexport const ROUTE_SIGN_UP = '/sign-up';\nexport const ROUTE_EVENTS = '/events';\nexport const ROUTE_SEARCH = '/search';\nexport const ROUTE_PROFILE = '/profile';\nexport const ROUTE_PROFILE_ALIASES = '/profile-aliases';\nexport const ROUTE_PROFILE_ALIASES_EDIT = '/profile-aliases-edit';\nexport const ROUTE_PROFILE_ALIASES_CREATE = '/profile-aliases-create';\nexport const ROUTE_CALENDAR = '/calendar';\nexport const ROUTE_EMBEDDED_CALENDAR = '/calendar-embedded';\nexport const ROUTE_ORGANIZATIONS = '/organizations';\nexport const ROUTE_SETTINGS = '/settings';\nexport const ROUTE_AVAILABILITY = '/availability';\nexport const ROUTE_ALIAS_INFO = '/alias-info';\nexport const ROUTE_NEW_AVAILABILITY = '/new-availability';\nexport const ROUTE_AVAILABILITY_INFO = '/availability-info';\nexport const ROUTE_AVAILABILITY_EDIT = '/availability-edit';\nexport const ROUTE_REQUEST_PASSWORD = '/request-password';\nexport const ROUTE_SUBMIT_PASSWORD = '/submit-password';\nexport const ROUTE_ABOUT_USER = '/about-user';\nexport const ROUTE_NEW_EVENT = '/new-event';\nexport const ROUTE_PROFILE_EDIT = '/profile-edit';\nexport const ROUTE_EVENT_INFO = '/event-info';\nexport const ROUTE_NOTES = '/notes';\nexport const ROUTE_NOTES_USER = '/notes-user';\nexport const ROUTE_MAP = '/map';\nexport const ROUTE_GOALS = '/goals';\nexport const ROUTE_FEEDBACK = '/feedback';\nexport const ROUTE_ORGANIZATION_POSTER = '/organization-poster';\n\nexport const ROUTE_VERIFICATION = '/verification';\nexport const ROUTE_INVITE = '/invite';\nexport const ROUTE_STATUS = '/status';\nexport const ROUTE_TAC_UPDATE = '/tac-update';\n\nexport const ROUTE_EVENT_INFO_PROVIDERS = '/event-info-providers';\nexport const ROUTE_NEW_ORGANIZATION = '/new-organization';\nexport const ROUTE_FEED_EDIT = '/edit-feed';\nexport const ROUTE_FEED_INFO = '/info-feed';\nexport const ROUTE_FEEDS = '/feeds';\nexport const ROUTE_EDIT_ORGANIZATION = '/edit-organization';\nexport const ROUTE_USER_PROFILE = '/user-profile';\nexport const ROUTE_USER_LOCATION = '/user-location';\nexport const ROUTE_EVENT_EDIT = '/event-edit';\nexport const ROUTE_REPORT_USER = '/report-user';\nexport const ROUTE_NOTIFICATIONS = '/notifications';\nexport const ROUTE_USER_PAYMENTS = '/payments';\nexport const ROUTE_PRODUCTS_BUY = '/products/:id/buy';\nexport const ROUTE_PRODUCTS_FINISH = '/products/finish';\nexport const ROUTE_PRODUCTS_EDIT = '/products/:id/edit/:productId';\nexport const ROUTE_PRODUCTS_CREATE = '/products/:id/create';\nexport const ROUTE_PRODUCTS_RECHARGE = '/credit/recharge';\nexport const ROUTE_PRODUCTS_LIST = '/products/:id/list';\nexport const ROUTE_PRODUCTS_STATS = '/products/:id/stats';\nexport const ROUTE_PRODUCTS_LIST_DETAIL = '/products/:id/list/:productId';\nexport const ROUTE_SOCIAL = '/social';\nexport const ROUTE_SHARE_ITEM = '/share-item';\nexport const ROUTE_RESERVANTO = '/reservanto';\nexport const ROUTE_CHANGE_PASSWORD = '/change-password';\nexport const MAP_API_KEY = 'AIzaSyBW2osQQT2A356oCvy_hI6D7firVcNaj5c'; // AIzaSyBW2osQQT2A356oCvy_hI6D7firVcNaj5c\nexport const FB_APP_ID = '691780612239180';\nexport const SHARE_URL = `${window.location.protocol}//${window.location.host}${ROUTE_SHARE_ITEM}`;\n\nexport const VAPID_KEY =\n 'BJ9gXOnIUTLctbeIBzDCvEuVSwld9tOwMigMCcr-I1N0UF197LdnjuzVzYkfxFrLMIBPaHElempwWT-v5bTK4lg';\n\nexport const MAP_BORDER_RADIUS = 20;\n","import {\n useNavigate as RRDUseNavigate,\n NavigateOptions,\n} from 'react-router-dom';\n\nimport { ParamList } from '@/util/types';\n\ntype Keyof = Extract;\n\ninterface DefaultOptions extends Omit {\n state: T;\n}\n\ndeclare function DefaultFunction<\n RouteName extends keyof ParamList = Keyof,\n>(\n to: RouteName | number | `${RouteName}/${string}`,\n options?: DefaultOptions,\n): void;\n\nexport type UseNavigateType = ReturnType;\nexport const useNavigate = (): typeof DefaultFunction => RRDUseNavigate();\n","import { ALIAS_PREFIX } from './constants';\n\nexport const extractId = (id: string) => {\n return id.startsWith(ALIAS_PREFIX) ? id.split('__')[1] : id;\n};\nexport const isAlias = (id: string) => {\n return id.startsWith(ALIAS_PREFIX);\n};\n","import { Event, Payment } from '@aclito/entities';\nimport dayjs from 'dayjs';\n\nimport { NONE } from '../../../util/constants';\nimport { isAlias } from '../../../util/alias';\n\nexport const isLeaveChargeApplied = (event: Event) => {\n if (!event.oneOffProduct || !event.oneOffProduct.leaveChargeDate)\n return false;\n\n return (\n dayjs().unix() >\n dayjs(event.date)\n .subtract(event.oneOffProduct.leaveChargeDate, 'hour')\n .unix()\n );\n};\n\nexport const calculateLeaveCharge = (\n payments: Payment[],\n leaveCharge: number,\n id: string, // may be aliasId,\n) => {\n const payment = payments.find((p) =>\n isAlias(id) ? p.aliasId === id : p.aliasId === NONE,\n );\n\n if (!payment) {\n return { total: 0, paymentToCancel: null };\n }\n\n const newAmount = calculateCharge(payment.amount, leaveCharge);\n\n return { total: newAmount, paymentToCancel: payment };\n};\n\nexport const calculateCharge = (\n originalAmount: number,\n leaveCharge: number,\n) => {\n if (originalAmount === 0) return 0;\n\n const charge = (100 - leaveCharge) / 100;\n return originalAmount * charge;\n};\n","import dayjs from 'dayjs';\nimport { EventRaw } from '@aclito/entities';\nimport type { Duration } from 'dayjs/plugin/duration';\n\nimport { EventWithDateObject } from '@aclito/shared/types';\n\nexport const formatEventDuration = (\n event: T,\n) => {\n const duration = getDuration(event.endDate, event.date);\n return getDurationString(duration);\n};\n\nexport const getDuration = (endDate: string | Date, date: string | Date) => {\n return dayjs.duration(dayjs(endDate).diff(dayjs(date)));\n};\n\nexport const getDurationString = (duration: Duration) => {\n // Get Days\n const days = Math.floor(duration.asDays());\n const daysFormatted = days ? `${days}d ` : '';\n // Get Hours\n const hours = duration.hours();\n const hoursFormatted = hours > 0 ? `${hours}h ` : '';\n\n // Get Minutes\n const minutes = duration.minutes();\n const minutesFormatted = minutes > 0 ? `${minutes}m` : '';\n\n return [daysFormatted, hoursFormatted, minutesFormatted].join('').trim();\n};\n","import React from 'react';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\n\nimport { Icon, IconTypes, HStack, VStack, Text } from '@/components';\n\nexport type BuilderData = {\n icon?: IconTypes;\n label: TranslateKey;\n onPress?: () => void;\n text: ({ tx: TranslateKey } | { text: string }) & {\n style?: React.CSSProperties;\n };\n testID?: string;\n vertical?: boolean;\n visible?: boolean;\n divider?: boolean;\n};\n\ntype InfoBuilderProps = {\n data: BuilderData[];\n hideCollapsible?: boolean;\n sectionTx?: TranslateKey;\n};\n\n/**\n * InfoBuilder builds a list of information items based on the provided data.\n * @param {Object} props - The props object containing the data array.\n * @param {Array} props.data - An array of information items.\n * @returns {JSX.Element} - The JSX element representing the list of information items.\n */\nconst InfoBuilder: React.FC = ({ data }) => {\n data.forEach((item) => {\n if (item.visible === undefined || item.visible === null) {\n item.visible = true;\n }\n if (item.divider === undefined || item.divider === null) {\n item.divider = true;\n }\n });\n const theme = useTheme();\n\n return (\n <>\n {data.map((item, i) => {\n const Stack = item.vertical ? VStack : HStack;\n return (\n item.visible && (\n
\n
\n \n \n \n {item.icon && (\n \n )}\n \n \n \n \n {item.onPress && (\n \n )}\n \n \n \n
\n
\n )\n );\n })}\n \n );\n};\n\nexport default InfoBuilder;\n","import styled from 'styled-components';\nimport { Menu } from '@mantine/core';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { HStack, Text, VStack } from '@/components';\n\nexport const DisplayMobile = styled(Menu)`\n @media ${deviceMin.tablet} {\n display: none;\n }\n`;\n\nexport const DisplayFull = styled(HStack)`\n @media ${deviceMax.tablet} {\n display: none;\n }\n`;\n\nexport const Content = styled(VStack)`\n min-height: 100%;\n width: 100%;\n gap: unset;\n`;\n\nexport const EventName = styled(Text)`\n color: ${({ theme }) => theme.grey80};\n font-size: 1.25rem;\n font-weight: 700;\n`;\nexport const EventHeader = styled(VStack)`\n padding-bottom: 1.6rem;\n`;\n","import React from 'react';\nimport { FormattedEventWithPlayers } from '@aclito/shared/types';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\nimport { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport { useTheme } from 'styled-components';\nimport { DEFAULT_CURRENCY } from '@aclito/shared/util/constants';\n\nimport InfoBuilder from './InfoBuilder';\n\nimport { Content } from '@/features/event/styles/eventInfoStyles';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\n\ninterface InfoMidProps {\n event: FormattedEventWithPlayers;\n handleRedirectToOrg: (event: FormattedEventWithPlayers) => void;\n handleRedirectToLeader: (event: FormattedEventWithPlayers) => void;\n handleRedirectToMap: (event: FormattedEventWithPlayers) => void;\n}\n\nconst Info: React.FC = ({\n handleRedirectToLeader,\n handleRedirectToOrg,\n handleRedirectToMap,\n ...rest\n}) => {\n const t = useTranslate();\n const theme = useTheme();\n const tDate = useTranslateDate();\n const event = formatEvent(rest.event, t);\n const date = tDate(event.date, 'date.card');\n const duration = formatEventDuration(event);\n const currency = event.org?.currency ?? DEFAULT_CURRENCY;\n\n const eventPrice = event.oneOffProduct?.price ?? event.price;\n const multisportPrice = event.oneOffProduct?.priceMultisport ?? -1;\n\n const showPrice = eventPrice > 0;\n const showMultisportPrice = multisportPrice > -1;\n const showSub = !!event.subscriptionProduct;\n\n const handleOrg = () => {\n handleRedirectToOrg(event);\n };\n\n const handleMap = () => {\n handleRedirectToMap(event);\n };\n\n const handleLeader = () => {\n handleRedirectToLeader(event);\n };\n\n return (\n \n openInNewTab(event.externalLink ?? ''),\n visible: !!event.externalLink,\n },\n {\n text: {\n text: event?.org?.name || '',\n style: { textDecorationLine: 'underline' },\n },\n icon: 'person',\n label: 'events.info.org',\n onPress: handleOrg,\n visible: !!event.org,\n },\n {\n text: {\n text: tDate(event.confirmationDate ?? '', 'date.display'),\n },\n icon: 'time',\n label: 'events.info.confirm',\n visible: !!event.requireConfirmation,\n },\n {\n text: {\n text: event.info,\n },\n icon: 'edit',\n label: 'events.info.description',\n vertical: true,\n visible: !!event.info,\n },\n ]}\n />\n \n );\n};\n\nexport default Info;\n","import { ShareType, TranslateKey } from '@aclito/shared/types';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { Organization } from '@aclito/entities';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nimport { SHARE_URL } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useWebShare = (org?: Organization, print?: boolean) => {\n const t = useTranslate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { openModal } = useModal();\n const handleShare = (id: string, shareType: ShareType, name: string) => {\n const type = t(`share.${shareType}` as TranslateKey);\n\n openModal({\n txTitle: 'share.modal.tile' as TranslateKey,\n txOptions: { type, name },\n type: 'webShare',\n values: {\n msg: getUrl(id, shareType),\n print: print,\n org: org,\n },\n });\n };\n\n const getUrl = (id: string, shareType: ShareType) =>\n `${SHARE_URL}/${shareType}/${id}${userInfo ? `?ref=${userInfo.id}` : ''}`;\n\n return { handleShare, getUrl };\n};\n","import { useCallback } from 'react';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { FormattedEventWithPlayers } from '@aclito/shared/types';\nimport { Event } from '@aclito/entities';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n ROUTE_EVENT_INFO,\n ROUTE_MAP,\n ROUTE_ORGANIZATIONS,\n ROUTE_PROFILE,\n ROUTE_USER_PROFILE,\n} from '@/util/constants';\nimport { useWebShare } from '@/hooks/useWebShare';\n\nexport const useEventInfoHandlers = () => {\n const nav = useNavigate();\n const { handleShare } = useWebShare();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const handleRedirectToOrg = useCallback((event: Event) => {\n if (event.org) {\n nav(`${ROUTE_ORGANIZATIONS}/${event.org.id}`);\n }\n }, []);\n\n const handleRedirectToEventInfo = useCallback((id: string) => {\n nav(ROUTE_EVENT_INFO, {\n state: { id },\n });\n }, []);\n\n const handleRedirectToMap = useCallback(\n (event: FormattedEventWithPlayers) => {\n nav(ROUTE_MAP, {\n state: { event },\n });\n },\n [],\n );\n\n const handleRedirectToLeader = useCallback(\n (event: FormattedEventWithPlayers) => {\n const linkTo =\n event.leaderInfo.id === userInfo.id\n ? ROUTE_PROFILE\n : ROUTE_USER_PROFILE;\n if (event.leader) {\n nav(linkTo, { state: { userId: event.leaderInfo.id } });\n }\n },\n [],\n );\n\n return {\n handleRedirectToOrg,\n handleRedirectToEventInfo,\n handleRedirectToLeader,\n handleShare,\n handleRedirectToMap,\n };\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useEventInfoHandlers } from '../hooks/useEventInfoHandlers';\n\nimport Info from './Info';\n\nimport { HStack, VStack, BasicCard } from '@/components';\n\ntype InfoLeftProps = { model: EventModel };\n\nconst InfoLeft: React.FC = ({ model }) => {\n const { event } = model;\n const { handleRedirectToOrg, handleRedirectToLeader, handleRedirectToMap } =\n useEventInfoHandlers();\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nconst Content = styled(VStack)`\n width: 100%;\n height: auto;\n @media ${deviceMax.desktopL} {\n width: 100%;\n }\n`;\n\nconst CardBehindStyled = styled(BasicCard)`\n height: 100%;\n width: auto;\n background: unset;\n padding: unset;\n @media ${deviceMax.desktopL} {\n width: 100%;\n }\n`;\n\nconst HStackStyled = styled(HStack)`\n width: 100%;\n display: flex;\n align-items: center;\n @media ${deviceMax.tabletS} {\n display: flex;\n flex-direction: row;\n }\n`;\n\nexport default InfoLeft;\n","import {\n useJsApiLoader,\n GoogleMap,\n Circle,\n Marker,\n} from '@react-google-maps/api';\nimport { Location } from '@aclito/entities';\nimport React, { useRef } from 'react';\nimport { config } from '@aclito/shared/config';\nimport { useTheme } from 'styled-components';\nimport { M_TO_KM_CONVERSION } from '@aclito/shared/util/constants';\n\nimport { MAP_API_KEY, MAP_BORDER_RADIUS } from '@/util/constants';\n\ninterface ViewOnlyMapProps {\n location: Location;\n name: string;\n type: 'marker' | 'circle';\n}\n\nconst ViewOnlyMap: React.FC = ({ location, name, type }) => {\n const { isLoaded: isMapLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n const handleOnClick = () => {\n mapRef?.current?.state?.map?.panTo({\n lat: location.lat,\n lng: location.lon,\n });\n\n const zoom = mapRef?.current?.state?.map?.getZoom();\n if (zoom) {\n mapRef?.current?.state?.map?.setZoom(zoom + 2);\n }\n };\n\n const circleRadius =\n parseInt(config.distance.availabilitiesDefaultDistance) *\n M_TO_KM_CONVERSION;\n\n const mapRef = useRef(null);\n const theme = useTheme();\n return (\n <>\n {isMapLoaded && (\n \n {type === 'circle' && (\n \n )}\n {type === 'marker' && (\n \n )}\n \n )}\n \n );\n};\n\nexport default ViewOnlyMap;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport ViewOnlyMap from '@/common/Maps/ViewOnlyMap';\n\ntype InfoRightProps = { model: EventModel };\n\nconst InfoRight: React.FC = ({ model }) => {\n const { event } = model;\n return (\n \n {event && (\n \n )}\n \n );\n};\n\nconst Content = styled.div`\n height: 100%;\n @media ${deviceMax.desktopL} {\n width: 100%;\n height: 300px;\n }\n`;\n\nexport default InfoRight;\n","import {\n useJoinChatMutation,\n useLeaveChatMutation,\n} from '../../../redux/api/messageApi';\n\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { TranslateKey } from '@aclito/shared/types';\n\nexport const useChatHandlers = (model: EventModel) => {\n const [leave] = useLeaveChatMutation();\n const [join] = useJoinChatMutation();\n\n const leaveChat = async () => {\n if (model.event.eventChatId) {\n await leave({ id: model.event.eventChatId, eventId: model.event.id });\n }\n };\n\n const joinChat = async () => {\n if (model.event.eventChatId) {\n await join({ id: model.event.eventChatId, eventId: model.event.id });\n }\n };\n\n const txChatPlaceholderText: TranslateKey =\n !model.isJoined && model.canJoin\n ? 'event.chat.join.event'\n : model.canJoinQueue\n ? 'event.chat.join.full'\n : 'event.chat.join.chat';\n\n return { leaveChat, joinChat, txChatPlaceholderText };\n};\n","import { closeAllModals } from '@mantine/modals';\nimport type { Event } from '@aclito/entities';\nimport { FormattedEventWithPlayers } from '@aclito/shared/types';\nimport { useDeleteEventMutation } from '@aclito/shared/redux/api/eventApi';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_EVENT_EDIT } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useEventInfoEditDelete = () => {\n const [deleteEventTrigger] = useDeleteEventMutation();\n const nav = useNavigate();\n const { openConfirmModal } = useModal();\n\n const handleEdit = (event: Event) => {\n nav(ROUTE_EVENT_EDIT, { state: { event, orgId: event.eventOrgId } });\n };\n\n const handleDelete = (event: FormattedEventWithPlayers) => {\n const hasProduct = event.oneOffProductId || event.subscriptionProductId;\n const isRepeating = !!event.repetitionId;\n\n const allowRepeating = isRepeating && !hasProduct;\n\n const onConfirmRepetition = async () => {\n await deleteEventTrigger({\n repId: event.repetitionId ?? '',\n id: event.id,\n });\n closeAllModals();\n nav(-1);\n };\n\n const onConfirmSingle = async () => {\n await deleteEventTrigger({ id: event.id });\n closeAllModals();\n nav(-1);\n };\n\n openConfirmModal({\n confirmProps: { color: 'red' },\n closeOnConfirm: false,\n txTitle: 'modal.confirmation',\n txLabels: { confirm: 'delete', cancel: 'close' },\n type: 'eventDelete',\n onConfirm: () => {\n if (allowRepeating) {\n openConfirmModal({\n confirmProps: { color: 'red', w: 100 },\n txTitle: 'delete.repeating',\n closeOnConfirm: false,\n type: 'eventDeleteConfirm',\n values: { onConfirm: onConfirmRepetition },\n txLabels: { confirm: 'delete', cancel: 'close' },\n onConfirm: onConfirmSingle,\n });\n } else {\n onConfirmSingle();\n }\n },\n });\n };\n\n return { handleDelete, handleEdit };\n};\n","import { EventPlayer, UserInfo } from '@aclito/entities';\n\nexport const filterJoinedAliases = (\n players: EventPlayer[],\n leader: string,\n userInfo: UserInfo,\n) =>\n players\n .filter((p) => p.id === userInfo.id && !p.isTrainer)\n .map((player) =>\n player.aliasId\n ? userInfo.aliases.find((alias) => alias.id === player.aliasId)\n : userInfo,\n )\n .filter(Boolean)\n .filter((p) => p.id !== leader);\n","import { useState } from 'react';\n\nimport { filterJoinedAliases } from '../utils/filterJoinedAliases';\n\nimport { EventModel } from '@aclito/shared/classes/EventModel';\n\nexport const useEventInfoAliasesLeave = (model: EventModel) => {\n const { event, userInfo } = model;\n\n const [selectedIds, setSelectedIds] = useState([]);\n\n const handleOnPress = (id: string) =>\n setSelectedIds((prevValues) =>\n prevValues.includes(id)\n ? prevValues.filter((val) => val !== id)\n : [...prevValues, id],\n );\n\n const isSelected = (id: string) => selectedIds.includes(id);\n\n return {\n selectedIds,\n isSelected,\n handleOnPress,\n joinedPlayers: filterJoinedAliases(event.players, event.leader, userInfo),\n };\n};\n","import { Card } from '@mantine/core';\nimport styled from 'styled-components';\n\nexport const StyledPlayerCard = styled(Card)`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ${({ theme }) => theme.grey10};\n margin: 0;\n padding: 20px 20px;\n` as typeof Card;\n","import type { UserAlias } from '@aclito/entities';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { StyledPlayerCard } from '@/common/Modals/ItemStyles';\nimport { HStack, Text, VStack, Icon, Avatar } from '@/components';\n\ninterface AliasModalLeaveItemProps {\n alias: UserAlias;\n handleOnPress: (id: string) => void;\n isSelected: (id: string) => boolean;\n}\n\nconst AliasModalLeaveItem: React.FC = ({\n alias,\n isSelected,\n handleOnPress,\n}) => {\n const theme = useTheme();\n return (\n handleOnPress(alias.id)}\n key={alias.id}\n bg={isSelected(alias.id) ? `${theme.red}1A` : `${theme.white}`}\n mb={10}\n >\n \n \n \n \n \n \n\n {isSelected(alias.id) && }\n \n );\n};\n\nexport default AliasModalLeaveItem;\n","import { PlayerDataType } from '@aclito/shared/features/event/types/types';\nimport { TranslateKey } from '@aclito/shared/types';\nimport React from 'react';\n\nimport { Button, VStack, Modal, ButtonProps, Title } from '@/components';\n\ninterface PlayerSelectModalProps {\n topText: TranslateKey;\n renderItem: (item: PlayerDataType) => JSX.Element;\n renderEmpty?: JSX.Element;\n opened: boolean;\n onClose: () => void;\n buttonProps: ButtonProps;\n data: PlayerDataType[];\n}\n\nconst PlayerSelectModal: React.FC = ({\n opened,\n onClose,\n buttonProps,\n renderItem,\n data,\n topText,\n renderEmpty,\n}) => {\n return (\n \n \n {data.length\n ? data.map((item, index) => (\n <React.Fragment key={item.id ? item.id : index}>\n {renderItem(item)}\n </React.Fragment>\n ))\n : renderEmpty}\n <VStack mt={20} pb={20}>\n <Button {...buttonProps} />\n </VStack>\n </Modal>\n );\n};\n\nexport default PlayerSelectModal;\n","import type { UserAlias } from '@aclito/entities';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useEventInfoAliasesLeave } from '@aclito/shared/features/event/hooks/useEventInfoAliasesLeave';\nimport React from 'react';\n\nimport AliasModalLeaveItem from './AliasModalLeaveItem';\n\nimport PlayerSelectModal from '@/common/Modals/PlayerSelectModal';\n\ninterface AliasModalProps {\n model: EventModel;\n opened: boolean;\n onClose: () => void;\n handleLeaveAliases: (selectedIds: string[]) => void;\n}\n\nconst AliasModalLeave: React.FC<AliasModalProps> = ({\n model,\n opened,\n onClose,\n handleLeaveAliases,\n}) => {\n const { selectedIds, isSelected, handleOnPress, joinedPlayers } =\n useEventInfoAliasesLeave(model);\n\n const handleLeaveButtonClick = () => {\n handleLeaveAliases(selectedIds);\n onClose();\n };\n\n const noAliases = joinedPlayers ? joinedPlayers.length > 0 : true;\n\n const renderItem = (alias: UserAlias) => (\n <AliasModalLeaveItem\n {...{\n isSelected,\n alias,\n handleOnPress,\n }}\n />\n );\n return (\n <PlayerSelectModal\n data={joinedPlayers}\n renderItem={renderItem}\n topText={\n noAliases\n ? 'events.info.alias.leave.title'\n : 'events.info.alias.leave.noAliases'\n }\n opened={opened}\n onClose={onClose}\n buttonProps={{\n color: 'red',\n disabled: !selectedIds.length,\n onClick: handleLeaveButtonClick,\n tx: 'events.info.alias.leave.button',\n }}\n />\n );\n};\n\nexport default AliasModalLeave;\n","import { EventRaw } from '@aclito/entities';\n\nimport { LeaveForm } from '../../../types';\nimport { EventModel } from '../../../classes/EventModel';\nimport { useLeaveEventMutation } from '../../../redux/api/eventApi';\n\nexport const useEventInfoLeave = () => {\n const [leaveEventTrigger, { isLoading }] = useLeaveEventMutation();\n\n const leaveEvent = async (\n value: LeaveForm,\n model: EventModel,\n selectedIds?: string[],\n repId?: string,\n ): Promise<EventRaw | EventRaw[]> => {\n return await leaveEventTrigger({\n id: model.event.id,\n aliasIds: selectedIds,\n message: value.area,\n ...(repId && { repId: model.event.repetitionId ?? '' }),\n }).unwrap();\n };\n\n return {\n isLoading,\n leaveEvent,\n };\n};\n","import { LeaveForm } from '@aclito/shared/types';\nimport { closeAllModals } from '@mantine/modals';\nimport { useForm } from 'react-hook-form';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useEventInfoLeave as useEventInfoLeaveShared } from '@aclito/shared/features/event/hooks/useEventInfoLeave';\nimport { useDisclosure } from '@mantine/hooks';\n\nimport { useModal } from '@/hooks/useModal';\n\nexport const useEventInfoLeave = (model: EventModel) => {\n const { openModal } = useModal();\n\n const [\n isOpenedLeaveModal,\n { open: onOpenLeaveModal, close: onCloseLeaveModal },\n ] = useDisclosure(false);\n\n const { leaveEvent, isLoading } = useEventInfoLeaveShared();\n\n const handleAliasesLeave = (selectedIds: string[]) => {\n handleLeave(selectedIds);\n };\n\n const methods = useForm<LeaveForm>({\n defaultValues: { area: '' },\n });\n\n const handleLeave = async (selectedIds?: string[]) => {\n const { event, hasProduct } = model;\n\n const leaveSingle = async (value: LeaveForm) => {\n await leaveEvent(value, model, selectedIds);\n closeAllModals();\n };\n\n const leaveRepeating = async (value: LeaveForm) => {\n await leaveEvent(value, model, selectedIds, model.event.repetitionId);\n closeAllModals();\n };\n\n const isRepeatingVisible = event.repetitionId && !hasProduct;\n\n openModal({\n type: 'leaveEvent',\n size: 'auto',\n values: {\n event,\n methods,\n onConfirm: (value) => leaveSingle(value),\n onConfirmRep: isRepeatingVisible\n ? (value) => leaveRepeating(value)\n : undefined,\n },\n });\n };\n\n return {\n handleLeave,\n handleAliasesLeave,\n isOpenedLeaveModal,\n onOpenLeaveModal,\n onCloseLeaveModal,\n isLoading,\n };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Menu } from '@mantine/core';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useChatHandlers } from '@aclito/shared/features/event/hooks/useChatHandlers';\n\nimport { useEventInfoEditDelete } from '../hooks/useEventInfoEditDelete';\nimport { useEventInfoHandlers } from '../hooks/useEventInfoHandlers';\n\nimport AliasModalLeave from './AliasModalLeave';\n\nimport { ActionButton, HStack, Text, Icon } from '@/components';\nimport { useEventInfoLeave } from '@/features/event/screens/EventInfo/hooks/useEventInfoLeave';\n\ninterface ButtonsProps {\n model: EventModel;\n compact?: boolean;\n}\n\nconst Buttons: React.FC<ButtonsProps> = ({ model, compact }) => {\n const t = useTranslate();\n\n const {\n event,\n isLeader,\n userInfo,\n isJoined,\n isInQueue,\n canEdit,\n canLeave,\n isInPast,\n displayOnly,\n isJoinedInChat,\n } = model;\n const { handleShare } = useEventInfoHandlers();\n\n const {\n handleLeave,\n handleAliasesLeave,\n isOpenedLeaveModal,\n onCloseLeaveModal,\n onOpenLeaveModal,\n } = useEventInfoLeave(model);\n\n const { leaveChat, joinChat } = useChatHandlers(model);\n\n const { handleDelete, handleEdit } = useEventInfoEditDelete();\n\n const shareEvent = () => {\n handleShare(event.id, 'event', event.name);\n };\n\n const handleLeaveButtonClick = () => {\n if (userInfo.aliases.length) {\n onOpenLeaveModal();\n return;\n }\n\n handleLeave();\n };\n\n const handleChats = async () =>\n isJoinedInChat ? await leaveChat() : await joinChat();\n\n const theme = useTheme();\n\n return (\n <>\n <AliasModalLeave\n handleLeaveAliases={handleAliasesLeave}\n opened={isOpenedLeaveModal}\n onClose={onCloseLeaveModal}\n model={model}\n />\n {compact ? (\n <Menu>\n <Menu.Target>\n <ActionButton iconType={'more'} />\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n {!isInPast ? (\n <>\n {canEdit && (\n <Menu.Item\n icon={<Icon icon=\"edit\" size={24} />}\n onClick={() => handleEdit(event)}\n >\n <Text>{t('json.edit')}</Text>\n </Menu.Item>\n )}\n <Menu.Item\n onClick={shareEvent}\n icon={<Icon icon=\"share\" size={24} />}\n >\n <Text>{t('nav.share')}</Text>\n </Menu.Item>\n {/*{canEdit && !displayOnly && (*/}\n {/* <Menu.Item*/}\n {/* icon={<Icon icon=\"personSearch\" size={24} />}*/}\n {/* onClick={() => handlePlayerSearch(event)}*/}\n {/* >*/}\n {/* <Text>{t('availability.info.suggestions')}</Text>*/}\n {/* </Menu.Item>*/}\n {/*)}*/}\n\n {isJoined && !isInQueue && (\n <Menu.Item\n icon={<Icon icon={'chat'} size={24} />}\n onClick={handleChats}\n >\n <Text tx={isJoinedInChat ? 'leave.chat' : 'join.chat'} />\n </Menu.Item>\n )}\n\n {canLeave && (\n <Menu.Item\n icon={<Icon icon=\"leave\" size={24} />}\n onClick={handleLeaveButtonClick}\n >\n <Text>{t('leave')}</Text>\n </Menu.Item>\n )}\n {canEdit && isLeader && !displayOnly && (\n <Menu.Item\n icon={<Icon icon=\"delete\" size={24} />}\n onClick={() => handleDelete(event)}\n >\n <Text>{t('delete')}</Text>\n </Menu.Item>\n )}\n </>\n ) : null}\n </Menu.Dropdown>\n </Menu>\n ) : (\n <HStack>\n {canEdit && (\n <ActionButton\n tx={'json.edit'}\n iconType={'edit'}\n onClick={() => handleEdit(event)}\n />\n )}\n <ActionButton\n onClick={shareEvent}\n iconType={'share'}\n tx={'nav.share'}\n />\n\n {/*{canEdit && !displayOnly && (*/}\n {/* <ActionButton*/}\n {/* iconType={'personSearch'}*/}\n {/* onClick={() => handlePlayerSearch(event)}*/}\n {/* tx={'availability.info.suggestions'}*/}\n {/* />*/}\n {/*)}*/}\n\n {isJoined && (\n <ActionButton\n iconType={'chat'}\n onClick={handleChats}\n tx={isJoinedInChat ? 'leave.chat' : 'join.chat'}\n />\n )}\n {canEdit && isLeader && !displayOnly && (\n <ActionButton\n bg={'red10'}\n textcolor={'red'}\n iconType=\"delete\"\n tx={'delete'}\n onClick={() => handleDelete(event)}\n />\n )}\n </HStack>\n )}\n </>\n );\n};\n\nexport default Buttons;\n","import { useEffect, useState } from 'react';\n\nimport { useShowFlashMessage } from '../../../hooks';\nimport { isAlias } from '../../../util/alias';\n\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { EVENT_QUEUE_SIZE } from '@aclito/shared/util/constants';\nimport {\n getParticipantsCount,\n getPlayersInQueueCount,\n} from '@aclito/shared/features/event/utils/getParticipantsCount';\n\nexport const useEventInfoAliasJoin = (model: EventModel) => {\n const { event, userInfo } = model;\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [selectedQueueIds, setSelectedQueueIds] = useState<string[]>([]);\n const showMessage = useShowFlashMessage();\n const topText: TranslateKey = 'events.info.alias.join.title';\n\n useEffect(() => {\n // initial add\n handleOnPress(userInfo.id);\n }, [userInfo.id, userInfo.aliases]);\n\n const willEventBeFull =\n event.maxPlayers !== -1 &&\n getParticipantsCount(event) + selectedIds.length >= event.maxPlayers;\n\n const willQueueBeFull =\n getPlayersInQueueCount(event) + selectedQueueIds.length > EVENT_QUEUE_SIZE;\n\n const toggleSelected = (id: string) => (selected: string[]) =>\n selected.includes(id)\n ? selected.filter((val) => val !== id)\n : [...selected, id];\n\n const handleOnPress = (id: string) => {\n if (isJoined(id)) {\n return;\n }\n if (\n (!willEventBeFull || selectedIds.includes(id)) &&\n !selectedQueueIds.includes(id)\n ) {\n setSelectedIds(toggleSelected(id));\n } else if (\n (event.enableQueue && !willQueueBeFull) ||\n selectedQueueIds.includes(id)\n ) {\n setSelectedQueueIds(toggleSelected(id));\n } else {\n showMessage('eventNoSpace');\n }\n };\n\n const isSelected = (id: string) => selectedIds.includes(id);\n const isSelectedQueue = (id: string) => selectedQueueIds.includes(id);\n\n const isJoined = (id: string) => {\n if (isAlias(id)) {\n return event.players.some((player) => player?.aliasId === id);\n } else {\n return event.players.some(\n (player) => player.id === id && !player.aliasId,\n );\n }\n };\n\n const isInQueue = (id: string) => {\n if (isAlias(id)) {\n return event.queuePlayersInfo.some((player) => player?.aliasId === id);\n } else {\n return event.queuePlayersInfo.some(\n (player) => player.id === id && !player.aliasId,\n );\n }\n };\n\n const itemBg = (id: string, theme: ThemeColorsRecord) =>\n isSelectedQueue(id)\n ? `${theme.yellow}4D`\n : isSelected(id)\n ? `${theme.primary}1A`\n : willEventBeFull && event.enableQueue\n ? `${theme.yellow}1A`\n : theme.white;\n\n return {\n isSelected,\n isSelectedQueue,\n isJoined,\n isInQueue,\n handleOnPress,\n selectedIds,\n selectedQueueIds,\n topText,\n itemBg,\n setSelectedIds,\n setSelectedQueueIds,\n };\n};\n","import type { UserAlias } from '@aclito/entities';\nimport React from 'react';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\nimport { useTheme } from 'styled-components';\n\nimport { StyledPlayerCard } from '@/common/Modals/ItemStyles';\nimport {\n Avatar,\n HStack,\n Text,\n VStack,\n Icon,\n CardStatusBannerText,\n} from '@/components';\n\ninterface AliasModalJoinItemProps {\n alias: UserAlias;\n handleOnAliasPress: (id: string) => void;\n itemBg: (id: string, theme: ThemeColorsRecord) => string;\n isAliasJoined: (aliasId: string) => boolean;\n isAliasInQueue: (aliasId: string) => boolean;\n isSelected: (id: string) => boolean;\n isSelectedQueue: (id: string) => boolean;\n}\n\nconst AliasModalJoinItem: React.FC<AliasModalJoinItemProps> = ({\n alias,\n isSelected,\n isSelectedQueue,\n isAliasJoined,\n isAliasInQueue,\n handleOnAliasPress,\n itemBg,\n}) => {\n const theme = useTheme();\n return (\n <StyledPlayerCard\n onClick={() => handleOnAliasPress(alias.id)}\n key={alias.id}\n bg={itemBg(alias.id, theme)}\n mb={10}\n data-testid={alias.name}\n >\n <HStack>\n <Avatar image={alias.image} size={48} />\n <VStack spacing={8}>\n <Text size={16} text={`${alias.name} ${alias.surname}`} />\n <HStack>\n {isAliasJoined(alias.id) ? (\n <CardStatusBannerText type=\"joinedAlias\" />\n ) : (\n isAliasInQueue(alias.id) && (\n <CardStatusBannerText type=\"queuedAlias\" />\n )\n )}\n </HStack>\n </VStack>\n </HStack>\n\n {(isSelected(alias.id) || isSelectedQueue(alias.id)) && (\n <Icon icon={'checkmark'} color=\"primary\" />\n )}\n </StyledPlayerCard>\n );\n};\n\nexport default AliasModalJoinItem;\n","import { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useEventInfoAliasJoin } from '@aclito/shared/features/event/hooks/useEventInfoAliasesJoin';\nimport React from 'react';\n\nimport AliasModalJoinItem from './AliasModalJoinItem';\n\nimport PlayerSelectModal from '@/common/Modals/PlayerSelectModal';\n\ninterface AliasModalProps {\n model: EventModel;\n opened: boolean;\n onClose: () => void;\n isLoading: boolean;\n handleJoinAliases: (\n model: EventModel,\n selectedIds: string[],\n ) => Promise<void>;\n}\n\nconst AliasModalJoin: React.FC<AliasModalProps> = ({\n model,\n opened,\n onClose,\n isLoading,\n handleJoinAliases,\n}) => {\n const {\n isSelected,\n isSelectedQueue,\n isJoined,\n isInQueue,\n handleOnPress,\n selectedIds,\n selectedQueueIds,\n topText,\n itemBg,\n setSelectedIds,\n setSelectedQueueIds,\n } = useEventInfoAliasJoin(model);\n const { userInfo } = model;\n\n const handleJoinButtonClick = async () => {\n await handleJoinAliases(model, [...selectedIds, ...selectedQueueIds]);\n setSelectedIds([]);\n setSelectedQueueIds([]);\n onClose();\n };\n\n return (\n <PlayerSelectModal\n data={[...userInfo.aliases].concat(\n model.event.leader !== userInfo.id ? [userInfo] : [],\n )}\n renderItem={(alias) => (\n <AliasModalJoinItem\n {...{\n alias,\n isSelected,\n isSelectedQueue,\n isAliasJoined: isJoined,\n isAliasInQueue: isInQueue,\n handleOnAliasPress: handleOnPress,\n itemBg,\n }}\n />\n )}\n topText={topText}\n opened={opened}\n onClose={onClose}\n buttonProps={{\n disabled: !selectedIds.length && !selectedQueueIds.length,\n onClick: handleJoinButtonClick,\n loading: isLoading,\n tx: 'events.info.alias.join.button',\n }}\n />\n );\n};\n\nexport default AliasModalJoin;\n","import { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport { TranslateKey } from '@aclito/shared/types';\nimport React, { ReactNode } from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport { Button, HStack, Text } from '@/components';\n\ninterface JoinLeaveButtonProps {\n tx?: TranslateKey;\n bg?: ThemeColorsKeys;\n children?: ReactNode;\n onClick?: () => void;\n isLoading?: boolean;\n}\n\nconst JoinLeaveButton: React.FC<JoinLeaveButtonProps> = ({\n tx,\n bg,\n onClick,\n children,\n isLoading,\n}) => {\n const theme = useTheme();\n\n return (\n <StyledButton\n loading={isLoading}\n style={{ backgroundColor: bg ? theme[bg] : theme.primary }}\n onClick={onClick}\n data-testid={`JoinAndLeaveButton-${tx}`}\n >\n <HStack spacing={8}>\n {children}\n {tx && <ButtonText tx={tx} />}\n </HStack>\n </StyledButton>\n );\n};\n\nconst StyledButton = styled(Button)`\n display: flex;\n height: 2.5rem;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n color: ${({ theme }) => theme.whiteText};\n &:hover {\n filter: brightness(95%);\n }\n`;\n\nconst ButtonText = styled(Text)`\n font-size: 1rem;\n font-weight: 500;\n color: ${({ theme }) => theme.whiteText};\n`;\n\nexport default JoinLeaveButton;\n","import { EventRaw } from '@aclito/entities';\n\nimport { useJoinEventMutation } from '../../../redux/api/eventApi';\nimport { RESERVED_GENDER } from '../../../util/constants';\n\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { FlashMessagesKeys } from '@aclito/shared/util/flashMessage';\n\nexport const useEventInfoJoin = () => {\n const [joinEventTrigger, { isLoading }] = useJoinEventMutation();\n\n const genderValidation = (\n model: EventModel,\n genderValidationCallback: (\n model: EventModel,\n type: FlashMessagesKeys,\n ) => void,\n ) => {\n const { event, userInfo } = model;\n const genderNotSet = userInfo.gender === RESERVED_GENDER;\n\n if (event.gender !== 'any' && event.gender !== userInfo.gender) {\n genderValidationCallback(\n model,\n genderNotSet ? 'joinEventUnknownGender' : 'joinEventInvalidGender',\n );\n\n return true;\n }\n\n return false;\n };\n\n const joinEvent = async (\n event: EventRaw,\n selectedIds: string[],\n repId?: string,\n ): Promise<{ data: unknown } | { error: unknown }> => {\n try {\n return {\n data: await joinEventTrigger({\n id: event.id,\n aliasIds: selectedIds,\n ...(repId && { repId: event.repetitionId ?? '' }),\n }).unwrap(),\n };\n } catch (e) {\n return { error: e };\n }\n };\n\n return {\n joinEvent,\n genderValidation,\n isLoading,\n };\n};\n","import {\n canJoinEvent,\n canJoinQueue,\n} from '@aclito/shared/features/event/utils/canJoinEvent';\nimport { closeAllModals } from '@mantine/modals';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useEventInfoJoin as useSharedEventInfoJoin } from '@aclito/shared/features/event/hooks/useEventInfoJoin';\nimport { FlashMessagesKeys } from '@aclito/shared/util/flashMessage';\nimport { RESERVED_GENDER } from '@aclito/shared/util/constants';\nimport { useShowFlashMessage } from '@aclito/shared/hooks';\nimport { useCheckStatusMutation } from '@aclito/shared/redux/api/paymentApi';\n\nimport { useModal } from '@/hooks/useModal';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_PROFILE } from '@/util/constants';\n\nexport const useEventInfoJoin = () => {\n const nav = useNavigate();\n const showMessage = useShowFlashMessage();\n\n const {\n joinEvent,\n genderValidation,\n isLoading: isLoadingJoin,\n } = useSharedEventInfoJoin();\n const { openConfirmModal, openModal } = useModal();\n const [checkStatus, { isLoading: isLoadingStatus }] =\n useCheckStatusMutation();\n\n const joinWithInvalidGender = (\n model: EventModel,\n type: FlashMessagesKeys,\n ) => {\n const genderNotSet = model.userInfo.gender === RESERVED_GENDER;\n\n showMessage(type, genderNotSet ? () => nav(ROUTE_PROFILE) : undefined);\n };\n\n const handleJoin = async (model: EventModel, selectedIds?: string[]) => {\n if (genderValidation(model, joinWithInvalidGender)) {\n return;\n }\n\n if (model.event.externalLink) {\n openInNewTab(model.event.externalLink);\n await _handleJoinDialog(model, selectedIds);\n } else {\n await _handleJoinDialog(model, selectedIds);\n }\n };\n\n const _handleJoinDialog = async (\n model: EventModel,\n selectedIds?: string[],\n ) => {\n const { event, userInfo } = model;\n const canJoinPlayers = canJoinEvent(event, userInfo);\n const canJoinPlayersInQueue = canJoinQueue(event);\n const ids = selectedIds ?? [];\n const isAllowedToJoin = event.enableQueue\n ? canJoinPlayers || canJoinPlayersInQueue\n : canJoinPlayers;\n\n const joinRepeating = async () => {\n await joinEvent(model.event, ids, model.event.repetitionId);\n closeAllModals();\n };\n const joinSingle = async () => {\n await joinEvent(model.event, ids);\n closeAllModals();\n };\n\n if (!isAllowedToJoin) {\n //Not sure why this should happen - button should not be visible at that time\n openConfirmModal({\n txTitle: 'events.info.req',\n });\n return;\n }\n\n if (model.event.repetitionId && !model.hasProduct) {\n openModal({\n type: 'joinChoice',\n size: 'auto',\n values: {\n onConfirm: joinSingle,\n onConfirmRep: joinRepeating,\n },\n });\n return;\n }\n\n if (!model.hasProduct) {\n await joinSingle();\n closeAllModals();\n } else {\n // Need to check the payments first\n const result = await checkStatus({\n eventId: model.event.id,\n data: { aliasIds: ids },\n });\n\n if ('error' in result) {\n return closeAllModals();\n }\n\n if (!result.data.paid) {\n openModal({\n type: 'eventPayment',\n size: 'auto',\n values: {\n paid: result.data.paid,\n ids: result.data.ids,\n event: event,\n },\n });\n } else {\n if (result.data.type === 'subscription' && model.event.repetitionId) {\n openModal({\n type: 'joinChoice',\n size: 'auto',\n values: {\n onConfirm: joinSingle,\n onConfirmRep: joinRepeating,\n },\n });\n } else {\n await joinSingle();\n closeAllModals();\n }\n }\n }\n };\n\n return { handleJoin, isLoading: isLoadingJoin || isLoadingStatus };\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useDisclosure } from '@mantine/hooks';\n\nimport AliasModalJoin from './AliasModalJoin';\nimport JoinLeaveButton from './JoinLeaveButton';\nimport AliasModalLeave from './AliasModalLeave';\n\nimport { useEventInfoJoin } from '@/features/event/screens/EventInfo/hooks/useEventInfoJoin';\nimport { HStack, Icon } from '@/components';\nimport { useEventInfoLeave } from '@/features/event/screens/EventInfo/hooks/useEventInfoLeave';\n\ninterface JoinLeaveProps {\n model: EventModel;\n}\n\nconst JoinLeave: React.FC<JoinLeaveProps> = ({ model }) => {\n const [\n isOpenedJoinModal,\n { open: onOpenJoinModal, close: onCloseJoinModal },\n ] = useDisclosure(false);\n\n const { handleJoin, isLoading } = useEventInfoJoin();\n\n const disabledJoin = model.isLeader && !model.userInfo.aliases.length;\n\n const handleJoinButtonClick = () => {\n if (model.userInfo.aliases.length) {\n onOpenJoinModal();\n return;\n }\n handleJoin(model);\n };\n\n const {\n handleLeave,\n handleAliasesLeave,\n isOpenedLeaveModal,\n onCloseLeaveModal,\n onOpenLeaveModal,\n } = useEventInfoLeave(model);\n\n const handleLeaveButtonClick = () => {\n if (model.userInfo.aliases.length) {\n onOpenLeaveModal();\n return;\n }\n\n handleLeave();\n };\n\n return (\n <Container>\n <AliasModalJoin\n isLoading={isLoading}\n handleJoinAliases={handleJoin}\n opened={isOpenedJoinModal}\n onClose={onCloseJoinModal}\n model={model}\n />\n <AliasModalLeave\n handleLeaveAliases={handleAliasesLeave}\n opened={isOpenedLeaveModal}\n onClose={onCloseLeaveModal}\n model={model}\n />\n {!model.isInPast && !disabledJoin && (\n <HStack spacing={16}>\n {!model.isJoinedFully && (\n <>\n {model.canJoin ? (\n <JoinLeaveButton\n isLoading={isLoading}\n onClick={handleJoinButtonClick}\n tx={'events.info.join'}\n bg={'primary'}\n >\n <Icon icon=\"forward\" color=\"whiteText\" />\n </JoinLeaveButton>\n ) : model.canJoinQueue ? (\n <JoinLeaveButton\n isLoading={isLoading}\n onClick={handleJoinButtonClick}\n tx={'events.info.joinQueue'}\n bg={'yellow'}\n >\n <Icon icon=\"forward\" color=\"whiteText\" />\n </JoinLeaveButton>\n ) : (\n <JoinLeaveButton\n isLoading={isLoading}\n tx=\"events.info.isFull\"\n bg=\"red\"\n >\n <Icon icon=\"forward\" color=\"whiteText\" />\n </JoinLeaveButton>\n )}\n </>\n )}\n {model.canLeave && (\n <JoinLeaveButton\n onClick={handleLeaveButtonClick}\n tx=\"leave\"\n isLoading={isLoading}\n bg=\"red\"\n >\n <Icon icon=\"leave\" color=\"whiteText\" />\n </JoinLeaveButton>\n )}\n </HStack>\n )}\n </Container>\n );\n};\n\nconst Container = styled.div``;\n\nexport default JoinLeave;\n","import styled from 'styled-components';\nimport { closeAllModals } from '@mantine/modals';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { CloseButton, Loader } from '@mantine/core';\nimport { config } from '@aclito/shared/config';\nimport { getById } from '@aclito/shared/util/selectObject';\nimport { FormattedEventWithPlayers, TranslateKey } from '@aclito/shared/types';\nimport { useDisplayEvent } from '@aclito/shared/redux/api/eventApi';\n\nimport { HStack, VStack, Text, Icon, Title, PlainCard } from '@/components';\nimport { Info } from '@/features/event/screens/EventInfo/components';\nimport JoinLeaveButton from '@/features/event/screens/EventInfo/components/JoinLeaveButton';\n\ninterface EventModalProps {\n id: string;\n handleRedirectToOrg: (event: FormattedEventWithPlayers) => void;\n handleRedirectToLeader: (event: FormattedEventWithPlayers) => void;\n handleRedirectToMap: (event: FormattedEventWithPlayers) => void;\n navigation: (id: string) => void;\n}\n\nconst EventModal: React.FC<EventModalProps> = ({\n id,\n navigation,\n handleRedirectToLeader,\n handleRedirectToOrg,\n handleRedirectToMap,\n}) => {\n const { model } = useDisplayEvent(id);\n\n const handleOrg = (event: FormattedEventWithPlayers) => {\n handleRedirectToOrg(event);\n closeAllModals();\n };\n\n const handleMap = (event: FormattedEventWithPlayers) => {\n handleRedirectToMap(event);\n closeAllModals();\n };\n\n const handleLeader = (event: FormattedEventWithPlayers) => {\n handleRedirectToLeader(event);\n closeAllModals();\n };\n\n return (\n <>\n {model?.event ? (\n <PlainCard\n style={{ width: 600 }}\n $borderColor={cardColorPicker(model.event.activityType)}\n >\n <VStack>\n <HStack\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n <VStack spacing={0}>\n <EventTitle text={model.event.name} />\n <SportTitle\n tx={\n getById(model.event.activityType, config.activities)\n .item as TranslateKey\n }\n color={cardColorPicker(model.event.activityType)}\n />\n </VStack>\n <CloseButton\n style={{\n position: 'absolute',\n top: '24px',\n right: '24px',\n }}\n onClick={() => {\n closeAllModals();\n }}\n />\n </HStack>\n <Info\n event={model.event}\n handleRedirectToLeader={handleLeader}\n handleRedirectToOrg={handleOrg}\n handleRedirectToMap={handleMap}\n />\n <HStack\n style={{\n justifyContent: 'flex-end',\n }}\n >\n <JoinLeaveButton\n onClick={() => {\n navigation(model.event.id);\n closeAllModals();\n }}\n tx=\"modal.goToEvent\"\n >\n <Icon icon=\"forward\" color=\"whiteText\" />\n </JoinLeaveButton>\n </HStack>\n </VStack>\n </PlainCard>\n ) : (\n <LoaderContainer>\n <Loader />\n </LoaderContainer>\n )}\n </>\n );\n};\nconst LoaderContainer = styled.div`\n width: 600px;\n height: 400px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: 10px;\n`;\n\nconst SportTitle = styled(Text)<{ color: string }>`\n font-weight: bold;\n display: flex;\n justify-content: center;\n color: ${(props) => props.color};\n` as typeof Text;\n\nconst EventTitle = styled(Title)`\n font-size: 1rem;\n`;\n\nexport default EventModal;\n","import React from 'react';\nimport { MemberType } from '@aclito/shared/types';\nimport { Box } from '@mantine/core';\nimport { closeAllModals } from '@mantine/modals';\nimport { useUpdateMyOrganizationsMembersMutation } from '@aclito/shared/redux/api/organizationApi';\nimport { Organization } from '@aclito/entities';\n\nimport { VStack, Button, Text } from '@/components';\n\ninterface EditModalProps {\n type: MemberType;\n myRole: MemberType;\n id: string;\n org: Organization;\n}\nconst EditModal: React.FC<EditModalProps> = ({ myRole, type, id, org }) => {\n const isAdmin = myRole === 'admin';\n const isPowerUser = myRole === 'powerUser';\n\n const [updateOrgMembers] = useUpdateMyOrganizationsMembersMutation();\n\n const update = async (newRole: MemberType) => {\n closeAllModals();\n if (org && id) {\n await updateOrgMembers({\n orgId: org.id,\n data: {\n memberId: id,\n newRole,\n },\n }).unwrap();\n }\n };\n\n return (\n <Box\n sx={{\n width: 200,\n marginLeft: 'auto',\n marginRight: 'auto',\n }}\n >\n {isAdmin && org && (\n <VStack spacing={10}>\n {type === 'member' ? (\n <Button\n onClick={() => {\n update('powerUser');\n }}\n >\n <Text color=\"white\" tx=\"powerUser\" />\n </Button>\n ) : (\n <Button\n onClick={() => {\n update('member');\n }}\n >\n <Text color=\"white\" tx=\"member\" />\n </Button>\n )}\n\n {type === 'admin' ? (\n <Button\n onClick={() => {\n update('powerUser');\n }}\n >\n <Text color=\"white\" tx=\"powerUser\" />\n </Button>\n ) : (\n <Button\n onClick={() => {\n update('admin');\n }}\n >\n <Text color=\"white\" tx=\"admin\" />\n </Button>\n )}\n </VStack>\n )}\n {isPowerUser && (\n <VStack spacing={10}>\n {type === 'member' ? (\n <Button onClick={() => update('powerUser')}>\n <Text color=\"white\" tx=\"powerUser\" />\n </Button>\n ) : (\n <Button onClick={() => update('member')}>\n <Text color=\"white\" tx=\"member\" />\n </Button>\n )}\n </VStack>\n )}\n </Box>\n );\n};\nexport default EditModal;\n","import { EventRaw } from '@aclito/entities';\n\nimport { isUserTrainer } from '../utils/getEventRole';\nimport { useKickFromEventMutation } from '../../../redux/api/eventApi';\n\nimport { EventWithPlayers, UserInfoWithAlias } from '@aclito/shared/types';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nexport const useEventInfoKick = () => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const [kickPlayer] = useKickFromEventMutation();\n\n const canBePlayerKicked = (\n event: EventRaw,\n canKick: boolean,\n player: UserInfoWithAlias,\n ) =>\n userInfo.id !== player.id &&\n !isUserTrainer(player, event) &&\n player.id !== event.leader &&\n canKick;\n\n const kickUserFromEvent = async (\n event: EventWithPlayers,\n user: UserInfoWithAlias,\n value: string,\n ) => {\n const id = user.aliasId ? user.aliasId : user.id;\n\n await kickPlayer({ eventId: event.id, idOrAliasId: id, message: value });\n };\n\n return { kickUserFromEvent, canBePlayerKicked };\n};\n","import { closeAllModals } from '@mantine/modals';\nimport type { UserInfo } from '@aclito/entities';\nimport { useSchema, useSelectObject } from '@aclito/shared/hooks';\nimport { EventWithPlayers, TranslateKey } from '@aclito/shared/types';\nimport { makeMessage } from '@aclito/shared/util/makeTranslatedMessage';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useTheme } from 'styled-components';\nimport { useEventInfoKick } from '@aclito/shared/features/event/hooks/useEventInfoKick';\nimport { config } from '@aclito/shared/config';\nimport { getById } from '@aclito/shared/util/selectObject';\n\nimport {\n SmallButton,\n VStack,\n ValidatedSelect,\n ValidatedTextArea,\n} from '@/components';\n\ntype KickFormType = {\n area: { id: string; item: string };\n otherText: string;\n};\n\ninterface KickFormProps {\n event: EventWithPlayers;\n user: UserInfo;\n}\n\nexport const KickForm = ({ event, user }: KickFormProps) => {\n const { kickUserValidationSchema } = useSchema();\n const { translatedKickReasonsTypes } = useSelectObject();\n const { kickUserFromEvent: kickShared } = useEventInfoKick();\n\n const methods = useForm<KickFormType>({\n defaultValues: { otherText: '', area: { item: '', id: '' } },\n //@ts-ignore\n resolver: yupResolver(kickUserValidationSchema),\n });\n\n const watchArea = methods.watch('area');\n\n const kickUserFromEvent = async (otherReason: string, reason: string) => {\n const { kick } = config;\n let value = '';\n if (reason === 'other') {\n value = otherReason.length ? otherReason : '';\n } else {\n const txKey = getById(reason, kick)?.item;\n if (txKey) {\n value = makeMessage(txKey as TranslateKey, user.preferredLanguage);\n }\n }\n kickShared(event, user, value);\n closeAllModals();\n };\n\n const onSubmit = () => {\n methods.handleSubmit((values) =>\n kickUserFromEvent(values.otherText, values.area.id),\n )();\n };\n\n const theme = useTheme();\n\n return (\n <FormProvider {...methods}>\n <VStack style={{ height: 300, justifyContent: 'space-between' }}>\n <VStack>\n <ValidatedSelect\n styles={{\n input: {\n backgroundColor: theme.background,\n color: theme.text,\n },\n }}\n options={translatedKickReasonsTypes}\n name=\"area\"\n txPlaceholder=\"reason.message\"\n />\n {watchArea?.id === 'other' && (\n <ValidatedTextArea\n styles={{\n input: { backgroundColor: theme.background },\n }}\n txPlaceholder=\"reason.text\"\n name=\"otherText\"\n />\n )}\n </VStack>\n\n <SmallButton onClick={onSubmit} bg=\"primary\" tx=\"kick\" />\n </VStack>\n </FormProvider>\n );\n};\n","import styled from 'styled-components';\n\nimport { HStack } from '@/components';\n\nexport const InviteHStack = styled(HStack)`\n align-items: flex-start;\n & div,\n button {\n transition: transform 250ms ease-in-out;\n &:hover {\n transform: scale(1.1);\n }\n cursor: pointer;\n }\n`;\n\nexport const CopyLinkButton = styled.div`\n width: 64px;\n height: 64px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${({ theme }) => theme.primary};\n`;\n","import { useClipboard } from '@mantine/hooks';\nimport {\n FacebookShareButton,\n FacebookIcon,\n TwitterShareButton,\n XIcon,\n} from 'react-share';\nimport { useTheme } from 'styled-components';\nimport { QRCode } from 'react-qrcode-logo';\nimport { Divider } from '@mantine/core';\nimport { VStack } from '@aclito/ui-web/components/Layout';\nimport { useRef } from 'react';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { closeAllModals } from '@mantine/modals';\nimport { Organization } from '@aclito/entities';\n\nimport { InviteHStack, CopyLinkButton } from './InviteLayouts';\n\nimport { Icon, Button, ActionButton } from '@/components';\nimport { ROUTE_ORGANIZATION_POSTER } from '@/util/constants';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\n\ntype ShareProps = {\n msg: string;\n print?: boolean;\n org?: Organization;\n};\n\nconst ShareModal = ({ msg, print = false, org }: ShareProps) => {\n const { copy, copied } = useClipboard();\n const qrRef = useRef<QRCode>(null);\n\n const handleCopy = () => {\n copy(msg);\n };\n\n const download = () => {\n qrRef.current?.download('png', Date.now().toString());\n };\n\n const handleNavigation = () => {\n openInNewTab(\n window.location.origin +\n ROUTE_ORGANIZATION_POSTER +\n `?name=${org?.name}&id=${org?.id}&updatedAt=${org?.updatedAt}&image=${org?.image}`,\n );\n closeAllModals();\n };\n\n const theme = useTheme();\n\n return (\n <VStack spacing={16}>\n <InviteHStack style={{ justifyContent: 'center' }}>\n <FacebookShareButton url={msg}>\n <FacebookIcon size={64} round />\n </FacebookShareButton>\n <TwitterShareButton url={msg}>\n <XIcon size={64} round />\n </TwitterShareButton>\n <CopyLinkButton onClick={handleCopy}>\n <Icon icon=\"share\" size=\"32\" color=\"white\" />\n </CopyLinkButton>\n </InviteHStack>\n {copied && <Button tx=\"modal.copied\" w={'100%'} color={theme.copied} />}\n <Divider\n labelPosition=\"center\"\n label={\n <>\n {\n <Text\n size={14}\n weight={500}\n tx=\"divider.title\"\n style={{ color: theme.grey30 }}\n ></Text>\n }\n </>\n }\n />\n <VStack align={'center'} justify={'center'} spacing={16}>\n <QRCode\n ref={qrRef}\n logoHeight={80}\n logoWidth={80}\n size={250}\n logoOpacity={1}\n removeQrCodeBehindLogo={true}\n logoImage={\n new URL('../../images/logos/icon.png', import.meta.url).href\n }\n value={msg}\n />\n <ActionButton\n iconType={'download'}\n w={'100%'}\n tx=\"qr.download\"\n onClick={download}\n color={theme.primary10}\n />\n {print && (\n <ActionButton\n iconType={'print'}\n w={'100%'}\n tx=\"qr.posterPrint.button\"\n onClick={handleNavigation}\n color={theme.primary10}\n />\n )}\n </VStack>\n </VStack>\n );\n};\n\nexport default ShareModal;\n","import { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport { EventWithDateObject, txFn } from '@aclito/shared/types';\nimport dayjs from 'dayjs';\n\nexport const formatEventWithDate = (event: EventWithDateObject, t: txFn) => ({\n ...formatEvent(\n {\n ...event,\n date: dayjs(event.date).toISOString(),\n endDate: dayjs(event.endDate).toISOString(),\n },\n\n t,\n ),\n});\n","import React from 'react';\nimport { EventWithDateObject } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\n\nimport InfoBuilder from './InfoBuilder';\n\nimport { Content } from '@/features/event/styles/eventInfoStyles';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\nimport { formatEventWithDate } from '@/util/formatEventWithDateObject';\n\ninterface EmbeddedInfoProps {\n event: EventWithDateObject;\n}\n\nconst EmbeddedInfo: React.FC<EmbeddedInfoProps> = ({ event }) => {\n const t = useTranslate();\n const date = `${event.formattedDate} ${event.formattedTime} - ${event.formattedEndDate}`;\n const formattedEventWithDate = formatEventWithDate(event, t);\n\n const duration = formatEventDuration(formattedEventWithDate);\n\n return (\n <Content>\n <InfoBuilder\n data={[\n {\n text: { text: date },\n icon: 'calendar',\n label: 'events.info.date',\n },\n {\n text: { text: duration },\n icon: 'time',\n label: 'events.info.duration',\n },\n {\n text: { text: event.txGender || '' },\n icon: 'gender',\n label: 'events.info.gender',\n },\n {\n text: { text: event.txLevel || '' },\n icon: 'level',\n label: 'events.info.level',\n },\n {\n text:\n event.price === 0\n ? { tx: 'events.info.forFree' }\n : { text: event.price.toString() },\n icon: 'price',\n label: 'events.info.price',\n },\n {\n text: { tx: 'events.info.external.link' },\n icon: 'link',\n label: 'events.info.external.link',\n visible: !!event.externalLink,\n onPress: () => openInNewTab(event.externalLink ?? ''),\n },\n {\n text: { text: event.org?.name || '' },\n icon: 'org',\n label: 'events.info.org',\n visible: !!event.org,\n },\n {\n text: { text: event.info },\n icon: 'edit',\n label: 'events.info.description',\n visible: !!event.info,\n },\n ]}\n />\n </Content>\n );\n};\n\nexport default EmbeddedInfo;\n","import styled from 'styled-components';\nimport { closeAllModals } from '@mantine/modals';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { CloseButton, Loader } from '@mantine/core';\nimport { config } from '@aclito/shared/config';\nimport { getById } from '@aclito/shared/util/selectObject';\nimport { EventWithDateObject, TranslateKey } from '@aclito/shared/types';\n\nimport { HStack, VStack, Text, Title, PlainCard, Icon } from '@/components';\nimport EmbeddedInfo from '@/features/event/screens/EventInfo/components/EmbeddedInfo';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\nimport { useWebShare } from '@/hooks/useWebShare';\nimport JoinLeaveButton from '@/features/event/screens/EventInfo/components/JoinLeaveButton';\n\ninterface LoadedEventModalProps {\n event: EventWithDateObject;\n navigation: (id: string) => void;\n}\n\nconst LoadedEventModal: React.FC<LoadedEventModalProps> = ({ event }) => {\n const { getUrl } = useWebShare();\n const eventUrl = getUrl(event.id, 'event');\n return (\n <>\n {event ? (\n <PlainCard $borderColor={cardColorPicker(event.activityType)}>\n <VStack>\n <HStack\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n <VStack spacing={0}>\n <Title text={event.name} />\n <SportTitle\n tx={\n getById(event.activityType, config.activities)\n .item as TranslateKey\n }\n color={cardColorPicker(event.activityType)}\n />\n </VStack>\n <CloseButton\n style={{\n position: 'absolute',\n top: '24px',\n right: '24px',\n }}\n onClick={() => {\n closeAllModals();\n }}\n />\n </HStack>\n <EmbeddedInfo event={event} />\n <HStack\n style={{\n justifyContent: 'flex-end',\n }}\n >\n <JoinLeaveButton\n onClick={() => {\n openInNewTab(eventUrl);\n }}\n tx=\"modal.goToEvent\"\n >\n <Icon icon=\"forward\" color=\"whiteText\" />\n </JoinLeaveButton>\n </HStack>\n </VStack>\n </PlainCard>\n ) : (\n <LoaderContainer>\n <Loader />\n </LoaderContainer>\n )}\n </>\n );\n};\nconst LoaderContainer = styled.div`\n width: 500px;\n height: 400px;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: 10px;\n`;\n\nconst SportTitle = styled(Text)<{ color: string }>`\n font-weight: bold;\n display: flex;\n justify-content: center;\n color: ${(props) => props.color};\n` as typeof Text;\n\nexport default LoadedEventModal;\n","import { noteActions, noteSelectors } from '../../redux/slices/noteSlices';\nimport { useAppDispatch } from '../../hooks/useDispatch';\nimport { useAppSelector } from '../../hooks';\n\nexport const useNotesShared = () => {\n const notes = useAppSelector(noteSelectors.notes);\n\n const dispatch = useAppDispatch();\n\n const handleSubmit = async (data: { tel: string; email: string }) => {\n await dispatch(noteActions.saveNoteAsync(data)).unwrap();\n };\n\n const handleClear = async () => {\n await dispatch(noteActions.clearNoteAsync()).unwrap();\n };\n\n const contactFilled = !!notes?.email.length && !!notes?.tel.length;\n return {\n handleSubmit,\n handleClear,\n data: notes,\n contactFilled,\n };\n};\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { noteSelectors } from '@aclito/shared/redux/slices/noteSlices';\nimport { useNotesShared } from '@aclito/shared/features/notes/useNotesShared';\n\nimport { useModal } from '@/hooks/useModal';\n\nexport const useNotes = () => {\n const isLoading = useAppSelector(noteSelectors.isLoading);\n\n const { openModal } = useModal();\n\n const openDialog = () => {\n openModal({\n txTitle: 'admin.notes.info.text',\n });\n };\n\n const { handleSubmit, data, handleClear, contactFilled } = useNotesShared();\n return {\n data,\n isLoading,\n contactFilled,\n handleClear,\n handleSubmit,\n openDialog,\n };\n};\n","import { Center, Divider, Loader, Space } from '@mantine/core';\nimport { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { useTheme } from 'styled-components';\nimport { ValidatedInput } from '@aclito/ui-web/components/Form';\n\nimport { useNotes } from '@/features/notes/screens/Notes/hooks/useNotes';\n\nconst NotesListing = ({ isEdit }: { isEdit: boolean }) => {\n const { data, isLoading } = useNotes();\n const theme = useTheme();\n\n if (isLoading) {\n return (\n <Center>\n <Loader />\n </Center>\n );\n }\n return (\n <>\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack spacing={8}>\n <Text text={'Tel:'} size={'xs'} style={{ color: theme.grey50 }} />\n <HStack>\n {!isEdit ? (\n <Text\n text={data?.tel}\n style={{\n color: theme.grey80,\n fontSize: 14,\n }}\n />\n ) : (\n <ValidatedInput\n name={'tel'}\n w={300}\n //@ts-ignore\n size={'xs'}\n data-testid={`Tel:input`}\n />\n )}\n </HStack>\n </VStack>\n </HStack>\n\n <Space h={8} />\n <Divider />\n <Space h={16} />\n\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack spacing={8}>\n <Text text={'Email:'} size={'xs'} style={{ color: theme.grey50 }} />\n <HStack>\n {!isEdit ? (\n <Text\n text={data?.email}\n style={{\n color: theme.grey80,\n fontSize: 14,\n }}\n />\n ) : (\n <ValidatedInput\n name={'email'}\n //@ts-ignore\n size={'xs'}\n w={300}\n data-testid={`Email:input`}\n />\n )}\n </HStack>\n </VStack>\n </HStack>\n </>\n );\n};\n\nexport default NotesListing;\n","import { useSchema, useTranslate } from '@aclito/shared/hooks';\nimport styled from 'styled-components';\nimport { Button as MTButton } from '@mantine/core';\nimport { closeAllModals } from '@mantine/modals';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport z from 'zod';\n\nimport NotesListing from '@/features/notes/screens/Notes/components/NotesListing';\nimport { useNotes } from '@/features/notes/screens/Notes/hooks/useNotes';\nimport { HStack, Text, ValidatedCheckbox, VStack } from '@/components';\nexport const GrantModal = ({\n handleGrant,\n orgName,\n}: {\n handleGrant: () => Promise<void>;\n orgName?: string;\n}) => {\n const t = useTranslate();\n const { notesValidationSchema } = useSchema();\n const { handleSubmit, data } = useNotes();\n\n const methods = useForm({\n values: { tel: data?.tel ?? '', email: data?.email ?? '', gdpr: false },\n resolver: zodResolver(\n notesValidationSchema.extend(z.object({ gdpr: z.boolean() }).shape),\n ),\n });\n\n const handleSubmitForm = async (note: { tel: string; email: string }) => {\n await handleSubmit(note);\n await handleGrant();\n closeAllModals();\n };\n\n const watchCheckBox = methods.watch('gdpr');\n const watchTel = methods.watch('tel');\n const watchEmail = methods.watch('email');\n const isValid = methods.formState.isValid;\n\n const isOk = isValid && watchEmail.length && watchTel.length && watchCheckBox;\n\n return (\n <FormProvider {...methods}>\n <GrantModalBody spacing={15}>\n <Text tx=\"org.contact.modal.text\" align=\"center\" weight={'bolder'} />\n <VStack spacing={5}>\n <GrantInfo>{t('grant.modal.about')}</GrantInfo>\n </VStack>\n <InputsWrapper spacing={6}>\n <NotesListing isEdit={true} />\n </InputsWrapper>\n <GDPRWrapper>\n <GDPRText>\n {t('grant.modal.gdpr')} <OrgName>{orgName}</OrgName>\n </GDPRText>\n <ValidatedCheckbox name={'gdpr'} />\n </GDPRWrapper>\n <MTButton\n onClick={methods.handleSubmit(handleSubmitForm)}\n disabled={!isOk}\n >\n {t('grant.modal.button')}\n </MTButton>\n </GrantModalBody>\n </FormProvider>\n );\n};\n\nconst GrantModalBody = styled(VStack)`\n padding: 0 1rem 1rem 1rem;\n`;\n\nconst GDPRWrapper = styled(HStack)`\n width: 100%;\n margin: 0 auto;\n justify-content: center;\n`;\n\nconst InputsWrapper = styled(VStack)`\n width: 100%;\n padding-bottom: 1rem;\n`;\n\nconst GDPRText = styled(Text)`\n font-size: 0.825rem;\n max-width: 27.5rem;\n`;\n\nconst GrantInfo = styled(Text)`\n text-align: center;\n font-size: 0.9rem;\n max-width: 30rem;\n`;\n\nconst OrgName = styled.span`\n font-weight: 700;\n`;\n","import { Button as MTButton, CopyButton, Divider } from '@mantine/core';\nimport styled, { useTheme } from 'styled-components';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport {\n EmojisKey,\n EventWithDateObject,\n EventWithPlayers,\n FormattedEventWithPlayers,\n LeaveForm,\n MemberType,\n ProductFinishMap,\n UserInfoWithAlias,\n} from '@aclito/shared/types';\nimport { FormProvider, useForm, UseFormReturn } from 'react-hook-form';\nimport { Event, EventRaw, Organization, Product } from '@aclito/entities';\nimport { closeAllModals } from '@mantine/modals';\nimport { config } from '@aclito/shared/config';\nimport { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { NONE } from '@aclito/shared/util/constants';\nimport { isLeaveChargeApplied } from '@aclito/shared/features/event/utils/leaveCharge';\n\nimport {\n Icon,\n ActionButton,\n Button,\n HStack,\n Input,\n Text,\n VStack,\n ValidatedTextArea,\n Title,\n RadioButton,\n CardStatusBannerText,\n InlineTooltip,\n} from '@/components';\nimport EventModal from '@/common/Modals/EventModal';\nimport EditModal from '@/features/organization/components/EditModal';\nimport { KickForm } from '@/features/event/components/KickForm';\nimport ShareModal from '@/common/InviteLayouts/ShareModal';\nimport LoadedEventModal from '@/common/Modals/LoadedEventModal';\nimport { GrantModal } from '@/common/Modals/GrantModal';\nimport { ROUTE_EVENT_INFO } from '@/util/constants';\n\ntype VoidFn = () => void;\n\ntype EmbedCalBody = { url: string };\ntype EmbedCalModalBody = {\n event: EventWithDateObject;\n navigation: (id: string) => void;\n};\ntype ShareUrlBody = { msg: string };\ntype CalModalBody = {\n id: string;\n navigation: (id: string) => void;\n handleRedirectToOrg: (event: FormattedEventWithPlayers) => void;\n handleRedirectToLeader: (event: FormattedEventWithPlayers) => void;\n handleRedirectToMap: (event: FormattedEventWithPlayers) => void;\n};\ntype UpdateEventBody = { onUpdate: VoidFn; onUpdateRepeating: VoidFn };\ntype NewPlaceBody = void;\ntype DeleteAvailabilityBody = void;\ntype DeleteAccountBody = void;\ntype DeleteAliasBody = void;\ntype DeleteFeedBody = void;\ntype RemoveMemberBody = void;\ntype GrantNotesBody = { handleGrant: () => Promise<void>; orgName?: string };\ntype EditMemberBody = {\n id: string;\n myRole: MemberType;\n type: MemberType;\n org: Organization;\n};\ntype DeleteOrgPermissionBody = void;\ntype DeleteOrgConfirmBody = void;\ntype LeaveOrgBody = { methods: UseFormReturn<LeaveForm, any> };\ntype LeaveEventBody = {\n methods: UseFormReturn<LeaveForm, any>;\n event: Event;\n onConfirm: (value: LeaveForm) => void;\n onConfirmRep: ((value: LeaveForm) => void) | undefined;\n};\ntype EventDeleteBody = void;\ntype EventDeleteConfirmBody = { onConfirm: VoidFn };\ntype EventJoinChoiceBody = {\n onConfirm: VoidFn;\n onConfirmRep?: VoidFn;\n};\ntype KickPlayerBody = { event: EventWithPlayers; user: UserInfoWithAlias };\ntype PlayerAttendanceBody = { onConfirm: VoidFn; onLeave: VoidFn };\ntype WebShareBody = {\n msg: string;\n print?: boolean;\n org?: Organization;\n};\ntype CreatePlaceBody = { onCreate: VoidFn; onBack: VoidFn };\ntype AliasEventsBody = { events: EventRaw[] };\ntype KarmaFeedbackBody = {\n karmaProvided: boolean;\n onConfirm: VoidFn;\n};\ntype CommentFeedbackBody = {\n text: string | undefined;\n isReviewHidden: boolean;\n onConfirm: (text: string | null) => void;\n};\ntype EmojiFeedbackBody = {\n emoji: EmojisKey | null;\n onConfirm: (emoji: EmojisKey | null) => void;\n};\ntype FinishFeedbackBody = void;\n\ntype DiscontinueProductBody = void;\ntype EventPaymentBody = {\n paid: boolean;\n ids: string[];\n event: Event;\n};\n\ntype PaymentConfirmBody = {\n onConfirm: VoidFn;\n};\n\ntype ProductPageLeaveBody = void;\n\nexport type ModalBodiesProps = {\n feedbackKarma: KarmaFeedbackBody;\n feedbackComment: CommentFeedbackBody;\n feedbackEmoji: EmojiFeedbackBody;\n feedbackFinish: FinishFeedbackBody;\n embedCal: EmbedCalBody;\n aliasEvents: AliasEventsBody;\n embedCalModal: EmbedCalModalBody;\n calModal: CalModalBody;\n shareUrl: ShareUrlBody;\n updateEvent: UpdateEventBody;\n newPlace: NewPlaceBody;\n deleteAvailability: DeleteAvailabilityBody;\n deleteAccount: DeleteAccountBody;\n deleteAlias: DeleteAliasBody;\n deleteFeed: DeleteFeedBody;\n removeMember: RemoveMemberBody;\n editMember: EditMemberBody;\n deleteOrgPermission: DeleteOrgPermissionBody;\n deleteOrgConfirm: DeleteOrgConfirmBody;\n leaveOrg: LeaveOrgBody;\n eventDelete: EventDeleteBody;\n eventDeleteConfirm: EventDeleteConfirmBody;\n leaveEvent: LeaveEventBody;\n kickPlayer: KickPlayerBody;\n playerAttendance: PlayerAttendanceBody;\n webShare: WebShareBody;\n grantNotes: GrantNotesBody;\n createPlace: CreatePlaceBody;\n discontinueProduct: DiscontinueProductBody;\n cancelPayment: void;\n joinChoice: EventJoinChoiceBody;\n eventPayment: EventPaymentBody;\n paymentConfirm: PaymentConfirmBody;\n productLeavePage: ProductPageLeaveBody;\n};\n\nexport type ModalBodyTypes = keyof ModalBodiesProps;\n\nexport const modalBodies = <T extends ModalBodyTypes>(\n type: T,\n values: ModalBodiesProps[T] | undefined,\n) => {\n const modalRecord: Record<ModalBodyTypes, (props: any) => JSX.Element> = {\n cancelPayment: () => <CancelPayment />,\n discontinueProduct: () => <DiscontinueProduct />,\n feedbackKarma: (props: KarmaFeedbackBody) => <FeedbackKarma {...props} />,\n feedbackComment: (props: CommentFeedbackBody) => (\n <FeedbackComment {...props} />\n ),\n feedbackEmoji: (props: EmojiFeedbackBody) => <FeedbackEmoji {...props} />,\n feedbackFinish: () => <FeedbackFinish />,\n aliasEvents: (props: AliasEventsBody) => <AliasEvents {...props} />,\n embedCal: (props: EmbedCalBody) => <EmbedCalModal url={props.url} />,\n embedCalModal: (props: EmbedCalModalBody) => <EmbeddedModal {...props} />,\n calModal: (props: CalModalBody) => <CalModal {...props} />,\n shareUrl: (props: ShareUrlBody) => <ShareUrlModal msg={props.msg} />,\n updateEvent: (props: UpdateEventBody) => <UpdateEvent {...props} />,\n newPlace: () => <NewPlace />,\n deleteAvailability: () => <DeleteAvailability />,\n deleteAccount: () => <DeleteAccount />,\n deleteAlias: () => <DeleteAlias />,\n deleteFeed: () => <DeleteFeed />,\n removeMember: () => <RemoveMember />,\n editMember: (props: EditMemberBody) => <EditMember {...props} />,\n deleteOrgConfirm: () => <DeleteOrgConfirm />,\n deleteOrgPermission: () => <DeleteOrgPermission />,\n leaveOrg: (props: LeaveOrgBody) => <LeaveOrg methods={props.methods} />,\n eventDelete: () => <EventDelete />,\n eventDeleteConfirm: (props: EventDeleteConfirmBody) => (\n <EventDeleteConfirm onConfirm={props.onConfirm} />\n ),\n leaveEvent: (props: LeaveEventBody) => <LeaveEvent {...props} />,\n\n kickPlayer: (props: KickPlayerBody) => <KickPlayer {...props} />,\n playerAttendance: (props: PlayerAttendanceBody) => (\n <PlayerAttendance {...props} />\n ),\n webShare: (props: WebShareBody) => <WebShare {...props} />,\n grantNotes: (props: GrantNotesBody) => (\n <GrantNotes handleGrant={props.handleGrant} orgName={props.orgName} />\n ),\n createPlace: (props: CreatePlaceBody) => <CreatePlace {...props} />,\n joinChoice: (props: EventJoinChoiceBody) => <JoinChoice {...props} />,\n eventPayment: (props: EventPaymentBody) => <EventPayment {...props} />,\n productLeavePage: () => <ProductPageLeave />,\n paymentConfirm: (props: PaymentConfirmBody) => (\n <PaymentConfirm {...props} />\n ),\n };\n\n return modalRecord[type](values);\n};\n\nconst CancelPayment = () => {\n return <Text weight={'500'} size={'lg'} tx={'payments.cancel.info'} />;\n};\n\nconst DiscontinueProduct = () => {\n return <Text weight={'500'} size={'lg'} tx={'product.discontinue.info'} />;\n};\n\nconst FeedbackEmoji = (props: EmojiFeedbackBody) => {\n const theme = useTheme();\n return (\n <VStack>\n <InlineTooltip txTitle={'tooltip.feedback.emoji.delete'} />\n <GridContainer>\n {Object.keys(config.emojis).map((item) => (\n <GridItem\n style={{\n backgroundColor:\n props.emoji === item ? theme.primary : 'transparent',\n }}\n onClick={() =>\n props.onConfirm(item === props.emoji ? null : (item as EmojisKey))\n }\n key={item}\n >\n <Text size={24}>{config.emojis[item as EmojisKey].item}</Text>\n </GridItem>\n ))}\n </GridContainer>\n </VStack>\n );\n};\n\nconst GridContainer = styled.div`\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-gap: 10px;\n padding: 20px;\n`;\n\nconst GridItem = styled.div`\n padding: 8px;\n width: 48px;\n height: 48px;\n transition: transform 150ms ease-in-out;\n cursor: pointer;\n &:hover {\n transform: scale(1.3);\n }\n text-align: center;\n font-size: 18px;\n border-radius: 8px;\n`;\n\nconst FeedbackKarma = (props: KarmaFeedbackBody) => {\n return (\n <VStack>\n <Text\n tx={\n props.karmaProvided\n ? 'feedback.karma.undo.title'\n : 'feedback.karma.title'\n }\n />\n <ActionButton onClick={props.onConfirm} tx={'yes'} />\n </VStack>\n );\n};\nconst FeedbackComment = (props: CommentFeedbackBody) => {\n const methods = useForm<{ review: string }>({\n defaultValues: { review: props.text ?? '' },\n });\n\n return (\n <VStack>\n <InlineTooltip\n txTitle={'tabs.comments'}\n txBody={\n props.isReviewHidden\n ? 'tooltip.settings.reviews.disabled'\n : 'feedback.reviewTitle'\n }\n />\n <FormProvider {...methods}>\n <ValidatedTextArea\n txPlaceholder=\"feedback.review\"\n name=\"review\"\n maxLength={100}\n />\n </FormProvider>\n <ActionButton\n onClick={methods.handleSubmit((values) =>\n props.onConfirm(values.review.length ? values.review : null),\n )}\n tx={'submit.button'}\n primary\n />\n </VStack>\n );\n};\nconst FeedbackFinish = () => {\n return <Text tx=\"feedback.finish\" size=\"sm\" />;\n};\n\nconst AliasEvents = (props: AliasEventsBody) => {\n const nav = useNavigate();\n const theme = useTheme();\n return (\n <VStack\n spacing={16}\n style={{ minWidth: 400, marginTop: 4, maxHeight: 600 }}\n >\n <Text\n style={{ marginBottom: 8 }}\n size={'lg'}\n color={theme.red}\n tx={'alias.leave.title'}\n />\n {props.events.map((item, index) => (\n <>\n <VStack spacing={1}>\n <HStack\n style={{\n justifyContent: 'space-between',\n }}\n >\n <HStack spacing={8}>\n <Icon icon={'calendar'} />\n <Text text={item.name} />\n </HStack>\n <ActionButton\n iconType={'rightArrow'}\n onClick={() => {\n nav(ROUTE_EVENT_INFO, { state: { id: item.id } });\n closeAllModals();\n }}\n />\n </HStack>\n </VStack>\n {index < props.events.length - 1 && (\n <Divider style={{ marginBottom: 8, marginTop: 8 }} />\n )}\n </>\n ))}\n </VStack>\n );\n};\n\nconst CreatePlace = (props: CreatePlaceBody) => {\n const theme = useTheme();\n\n return (\n <VStack align=\"center\" justify={'center'}>\n <Text\n align=\"center\"\n size={18}\n weight={500}\n color={theme.primary}\n tx=\"events.new.place.create.alert.header\"\n />\n <Text align=\"center\" size={16} tx=\"events.new.place.create.alert.body\" />\n <HStack\n style={{\n justifyContent: 'center',\n }}\n >\n <ActionButton miw={140} w={'auto'} tx=\"back\" onClick={props.onBack} />\n <ActionButton\n miw={140}\n w={'auto'}\n primary\n onClick={props.onCreate}\n tx=\"create\"\n />\n </HStack>\n </VStack>\n );\n};\n\nconst JoinChoice = (props: EventJoinChoiceBody) => {\n const [isLoading, setIsLoading] = useState(false);\n\n return (\n <VStack>\n <Text align=\"center\" size={18} weight={500} tx={'modal.confirmation'} />\n <HStack\n style={{\n justifyContent: 'center',\n }}\n >\n <ActionButton\n tx=\"back\"\n iconType={'backArrow'}\n bg={'red10'}\n textcolor={'red'}\n onClick={() => closeAllModals()}\n />\n <ActionButton\n w={'auto'}\n miw={140}\n isLoading={isLoading}\n iconType={'forward'}\n primary={!!props.onConfirmRep}\n onClick={() => {\n setIsLoading(true);\n props.onConfirm();\n }}\n tx=\"join.event\"\n />\n {props.onConfirmRep && (\n <ActionButton\n w={'auto'}\n miw={140}\n primary\n isLoading={isLoading}\n iconType={'repeat'}\n onClick={() => {\n setIsLoading(true);\n props.onConfirmRep?.();\n }}\n tx=\"join.all\"\n />\n )}\n </HStack>\n </VStack>\n );\n};\nconst EventPayment = ({ event, ids }: EventPaymentBody) => {\n const showOptions = event.subscriptionProductId && event.oneOffProductId;\n\n const [active, setActive] = useState<string | null>(\n showOptions\n ? null\n : (event.subscriptionProductId || event.oneOffProductId) ?? null,\n );\n const nav = useNavigate();\n const theme = useTheme();\n\n const kartItems: ProductFinishMap = new Map();\n\n if (active !== null) {\n if (active === event.subscriptionProductId && event.subscriptionProduct) {\n kartItems.set(active, {\n ...event.subscriptionProduct,\n amount: ids.length,\n eventId: NONE,\n });\n }\n if (active === event.oneOffProductId && event.oneOffProduct) {\n kartItems.set(active, {\n ...event.oneOffProduct,\n amount: ids.length,\n eventId: event.id,\n });\n }\n }\n\n const navigateToPayment = () => {\n nav(`/products/finish`, {\n state: { kart: kartItems, ids, event },\n });\n closeAllModals();\n };\n\n return (\n <VStack>\n <Text\n align=\"center\"\n size={18}\n weight={500}\n tx={'join.event.payment.req'}\n />\n <VStack>\n {showOptions ? (\n <VStack spacing={8}>\n <Chip onClick={() => setActive(event.oneOffProductId ?? null)}>\n <VStack style={{ flex: 1 }} spacing={4}>\n <HStack style={{ marginBottom: 8 }}>\n <RadioButton\n checked={active === event.oneOffProductId}\n onChange={() => {\n setActive(event.oneOffProductId ?? null);\n }}\n />\n <Text\n text={event.oneOffProduct?.title}\n size={'md'}\n weight={'bold'}\n />\n </HStack>\n <HStack>\n <CardStatusBannerText type={'one-off'} />\n {event.oneOffProduct && (\n <Price product={event.oneOffProduct} />\n )}\n </HStack>\n <Divider color={theme.grey10} />\n <Text text={event.oneOffProduct?.description} size={'xs'} />\n </VStack>\n </Chip>\n <Chip\n onClick={() => setActive(event.subscriptionProductId ?? null)}\n >\n <VStack style={{ flex: 1 }} spacing={4}>\n <HStack style={{ marginBottom: 8 }}>\n <RadioButton\n checked={active === event.subscriptionProductId}\n onChange={() => {\n setActive(event.subscriptionProductId ?? null);\n }}\n />\n <Text\n text={event.subscriptionProduct?.title}\n size={'md'}\n weight={'bold'}\n />\n </HStack>\n <HStack>\n <CardStatusBannerText type={'subscription'} />\n {event.subscriptionProduct && (\n <Price product={event.subscriptionProduct} />\n )}\n </HStack>\n <Divider color={theme.grey10} />\n <Text\n text={event.subscriptionProduct?.description}\n size={'xs'}\n />\n </VStack>\n </Chip>\n </VStack>\n ) : (\n <Chip>\n <VStack style={{ flex: 1 }} spacing={4}>\n <HStack style={{ marginBottom: 8 }}>\n <RadioButton checked={true} />\n <Text\n text={\n event.oneOffProduct?.title ??\n event.subscriptionProduct?.title\n }\n size={'md'}\n weight={'bold'}\n />\n </HStack>\n <HStack>\n <CardStatusBannerText\n type={\n event.oneOffProduct?.type ??\n event.subscriptionProduct?.type ??\n 'one-off'\n }\n />\n {(event.oneOffProduct || event.subscriptionProduct) && (\n <Price\n product={event.oneOffProduct ?? event.subscriptionProduct!}\n />\n )}\n </HStack>\n\n <Divider color={theme.grey10} />\n <Text\n text={\n event.oneOffProduct?.description ??\n event.subscriptionProduct?.description\n }\n size={'xs'}\n />\n </VStack>\n </Chip>\n )}\n\n <Divider w={'100%'} color={theme.grey10} />\n\n <HStack style={{ justifyContent: 'center' }}>\n <ActionButton\n tx=\"back\"\n iconType={'backArrow'}\n bg={'red10'}\n textcolor={'red'}\n onClick={() => closeAllModals()}\n />\n {active && (\n <ActionButton\n tx=\"product.add\"\n iconType={'shopping'}\n onClick={navigateToPayment}\n />\n )}\n </HStack>\n </VStack>\n </VStack>\n );\n};\n\nconst Price = ({ product }: { product: Product }) => {\n const t = useTranslate();\n const theme = useTheme();\n return (\n <HStack style={{ alignItems: 'center' }} spacing={8}>\n <Text weight={'500'} size={'sm'}>\n {product.price} {t(`currency.${product.currency}`)}\n </Text>\n {Number.isInteger(product.priceMultisport) && (\n <HStack style={{ alignItems: 'center' }} spacing={8}>\n <Icon icon={'multisport'} color={'grey50'} size={14} />\n <Text\n color={theme.grey50}\n text={\n product.priceMultisport === 0\n ? t('events.info.forFree')\n : `${product.priceMultisport} ${t(\n `currency.${product.currency}`,\n )}`\n }\n size={'xs'}\n />\n </HStack>\n )}\n </HStack>\n );\n};\n\nconst PaymentConfirm = (props: PaymentConfirmBody) => {\n const [isLoading, setIsLoading] = useState(false);\n return (\n <VStack>\n <Text\n align=\"center\"\n size={18}\n weight={500}\n tx={'product.payment.finish'}\n />\n <HStack\n style={{\n justifyContent: 'center',\n }}\n >\n <ActionButton\n tx=\"back\"\n iconType={'backArrow'}\n bg={'red10'}\n textcolor={'red'}\n onClick={() => closeAllModals()}\n />\n <ActionButton\n iconType={'forward'}\n tx={'product.buy.pay'}\n isLoading={isLoading}\n miw={140}\n onClick={() => {\n setIsLoading(true);\n props.onConfirm();\n }}\n />\n </HStack>\n </VStack>\n );\n};\n\nconst ProductPageLeave = () => {\n const nav = useNavigate();\n\n return (\n <VStack>\n <Text align=\"center\" size={18} weight={500} tx={'product.leave.page'} />\n <HStack\n style={{\n justifyContent: 'center',\n }}\n >\n <ActionButton\n tx=\"back\"\n iconType={'backArrow'}\n bg={'red10'}\n textcolor={'red'}\n onClick={() => closeAllModals()}\n />\n <ActionButton\n iconType={'forward'}\n tx={'tooltip.leave'}\n miw={140}\n onClick={() => {\n closeAllModals();\n nav(-1);\n }}\n />\n </HStack>\n </VStack>\n );\n};\n\nconst PlayerAttendance = (props: PlayerAttendanceBody) => {\n return (\n <VStack justify={'center'}>\n <Text tx=\"events.info.attendance.confirm.text\" />\n <HStack spacing={15} style={{ justifyContent: 'space-between' }}>\n <Button\n w={195}\n color={'yellow'}\n onClick={props.onConfirm}\n tx=\"events.info.attendance.confirm.button\"\n />\n <Button w={195} color={'gray'} onClick={props.onLeave} tx=\"leave\" />\n </HStack>\n </VStack>\n );\n};\n\nconst KickPlayer = ({ event, user }: KickPlayerBody) => {\n return (\n <VStack spacing={10}>\n <Title tx=\"events.info.alert.body\" />\n <KickForm event={event} user={user} />\n </VStack>\n );\n};\n\nconst LeaveEvent = ({ methods, onConfirmRep, ...props }: LeaveEventBody) => {\n const [isLoading, setIsLoading] = useState(false);\n const leave = (callback: (value: LeaveForm) => void) => {\n setIsLoading(true);\n methods.handleSubmit((value) => {\n callback(value);\n })();\n };\n const theme = useTheme();\n return (\n <>\n <VStack>\n <Text align=\"center\" size={18} weight={500} tx={'modal.confirmation'} />\n <Text tx=\"events.info.alert.body\" />\n <FormProvider {...methods}>\n <ValidatedTextArea\n txPlaceholder=\"alert.message\"\n name=\"area\"\n minRows={3}\n maxRows={3}\n maxLength={80}\n />\n </FormProvider>\n {isLeaveChargeApplied(props.event) && (\n <VStack align={'center'} spacing={4}>\n <Text\n size={'lg'}\n color={theme.red}\n tx=\"product.modal.event.leavecharge\"\n />\n <Text\n size={'sm'}\n tx=\"product.modal.event.leavecharge.fee\"\n txOptions={{\n value: props.event?.oneOffProduct?.leaveCharge ?? 0,\n }}\n />\n </VStack>\n )}\n <HStack\n style={{\n justifyContent: 'center',\n }}\n >\n <ActionButton\n w={'auto'}\n miw={140}\n iconType={'backArrow'}\n tx=\"back\"\n bg={'red10'}\n textcolor={'red'}\n onClick={() => closeAllModals()}\n />\n <ActionButton\n w={'auto'}\n miw={140}\n iconType={'leave'}\n isLoading={isLoading}\n primary={!!onConfirmRep}\n onClick={() => leave(props.onConfirm)}\n tx=\"leave\"\n />\n {onConfirmRep && (\n <ActionButton\n w={'auto'}\n primary\n isLoading={isLoading}\n iconType={'repeat'}\n onClick={() => leave(onConfirmRep)}\n tx=\"leave.all\"\n />\n )}\n </HStack>\n </VStack>\n </>\n );\n};\n\nconst LeaveOrg = ({ methods }: LeaveOrgBody) => {\n return (\n <>\n <Text tx=\"org.info.leave.body\" />\n <FormProvider {...methods}>\n <ValidatedTextArea\n txPlaceholder=\"alert.message.org\"\n name=\"area\"\n maxLength={80}\n />\n </FormProvider>\n </>\n );\n};\n\nconst EventDeleteConfirm = (props: EventDeleteConfirmBody) => {\n return (\n <div\n style={{\n display: 'flex',\n alignItems: 'flex-end',\n justifyContent: 'flex-end',\n marginBottom: 10,\n }}\n >\n <Button\n w={'auto'}\n onClick={props.onConfirm}\n color={'red'}\n tx=\"delete.all\"\n />\n </div>\n );\n};\n\nconst EventDelete = () => {\n return <Text tx=\"events.info.alert.body\" size=\"sm\" />;\n};\n\nconst RemoveMember = () => {\n return <Text tx=\"org.kick.member\" />;\n};\n\nconst EditMember = (props: EditMemberBody) => {\n return <EditModal {...props} />;\n};\n\nconst UpdateEvent = ({ onUpdateRepeating, onUpdate }: UpdateEventBody) => {\n return (\n <HStack>\n <Button miw={220} color={'gray'} onClick={onUpdate} tx=\"update.one\" />\n <Button\n miw={220}\n color={'gray'}\n onClick={onUpdateRepeating}\n tx=\"update.all\"\n />\n </HStack>\n );\n};\n\nconst DeleteAlias = () => {\n return <Text tx={'profile.alert.body'} />;\n};\nconst DeleteFeed = () => {\n return <Text tx=\"org.info.delete.body\" />;\n};\n\nconst DeleteOrgPermission = () => {\n return <Text tx=\"org.info.delete.permissions.body\" />;\n};\n\nconst DeleteOrgConfirm = () => {\n return <Text tx=\"org.info.delete.body\" />;\n};\n\nconst DeleteAccount = () => {\n return <Text tx={'profile.deleteaccount.alert.body'} />;\n};\n\nconst NewPlace = () => {\n return <Text align=\"center\" tx=\"events.new.place.alert.body\" />;\n};\n\nconst DeleteAvailability = () => {\n return <Text tx=\"availability.info.alert.body\" size=\"sm\" />;\n};\n\nconst CalModal = ({\n id,\n navigation,\n handleRedirectToLeader,\n handleRedirectToOrg,\n handleRedirectToMap,\n}: CalModalBody) => {\n return (\n <EventModal\n id={id}\n navigation={navigation}\n handleRedirectToLeader={handleRedirectToLeader}\n handleRedirectToOrg={handleRedirectToOrg}\n handleRedirectToMap={handleRedirectToMap}\n />\n );\n};\n\nconst EmbeddedModal = ({ event, navigation }: EmbedCalModalBody) => {\n return <LoadedEventModal event={event} navigation={navigation} />;\n};\n\nconst EmbedCalModal = ({ url }: EmbedCalBody) => {\n const t = useTranslate();\n return (\n <VStack spacing={10}>\n <Input value={url} />\n <AboutModal>\n <Text tx=\"calendar.share\" />\n </AboutModal>\n <CopyButton value={url}>\n {({ copied, copy }) => (\n <MTButton onClick={copy}>\n <HStack>\n {copied ? t('modal.copied') : t('modal.copy')}\n {copied ? (\n <Icon icon=\"checkmark\" color=\"whiteText\" />\n ) : (\n <Icon icon=\"copy\" color=\"whiteText\" />\n )}\n </HStack>\n </MTButton>\n )}\n </CopyButton>\n </VStack>\n );\n};\n\nconst WebShare = ({ msg, print, org }: WebShareBody) => {\n return <ShareModal msg={msg} print={print} org={org} />;\n};\n\nconst GrantNotes = ({ handleGrant, orgName }: GrantNotesBody) => {\n return <GrantModal handleGrant={handleGrant} orgName={orgName} />;\n};\n\nconst ShareUrlModal = ({ msg }: ShareUrlBody) => {\n const theme = useTheme();\n const t = useTranslate();\n return (\n <VStack spacing={10}>\n <Input value={msg} />\n <CopyButton value={msg}>\n {({ copied, copy }) => (\n <MTButton color={copied ? theme.copied : theme.copy} onClick={copy}>\n {copied ? t('modal.copied') : t('modal.copy')}\n </MTButton>\n )}\n </CopyButton>\n </VStack>\n );\n};\n\nconst AboutModal = styled.div`\n padding: 1rem 0;\n text-align: center;\n`;\n\nconst Chip = styled.div`\n background-color: ${({ theme }) => theme.white};\n cursor: pointer;\n border-radius: 10px;\n padding: 16px;\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n`;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey, TranslateValues } from '@aclito/shared/types';\nimport { openConfirmModal as MTCM, openModal as MTOM } from '@mantine/modals';\nimport { ModalSettings, OpenConfirmModal } from '@mantine/modals/lib/context';\nimport { useTheme } from 'styled-components';\n\nimport {\n modalBodies,\n ModalBodiesProps,\n ModalBodyTypes,\n} from '@/components/ModalBodies/ModalBodies';\n\ntype OpenModalProps<T extends ModalBodyTypes> = Omit<ModalSettings, 'title'> & {\n txTitle?: TranslateKey;\n txOptions?: TranslateValues;\n title?: string;\n type?: T;\n values?: ModalBodiesProps[T];\n};\n\ntype OpenConfirmModalProps<T extends ModalBodyTypes> = Omit<\n OpenConfirmModal,\n 'title' | 'labels'\n> & {\n txTitle?: TranslateKey;\n txOptions?: TranslateValues;\n txLabels?: { cancel: TranslateKey; confirm: TranslateKey };\n type?: T;\n values?: ModalBodiesProps[T];\n};\n\nexport const useModal = () => {\n const t = useTranslate();\n const theme = useTheme();\n\n const styles = {\n content: {\n background: theme.background,\n },\n header: {\n background: theme.background,\n },\n title: {\n color: theme.text,\n },\n };\n\n const openConfirmModal = <T extends ModalBodyTypes>(\n payload: OpenConfirmModalProps<T>,\n ) => {\n MTCM({\n ...payload,\n ...(payload.txTitle && { title: t(payload.txTitle, payload.txOptions) }),\n ...(payload.txLabels && {\n labels: {\n cancel: t(payload.txLabels.cancel),\n confirm: t(payload.txLabels.confirm),\n },\n }),\n styles,\n radius: 10,\n overlayProps: { color: theme.modalOverlay },\n ...(payload.type && {\n children: modalBodies(payload.type, payload.values),\n }),\n });\n };\n\n const openModal = <T extends ModalBodyTypes>(payload: OpenModalProps<T>) => {\n MTOM({\n ...payload,\n ...(payload.txTitle && {\n title: payload.title || t(payload.txTitle, payload.txOptions),\n }),\n radius: 10,\n overlayProps: { color: theme.modalOverlay },\n ...(payload.type && {\n children: modalBodies(payload.type, payload.values),\n }),\n styles: { ...styles, ...payload.styles },\n });\n };\n\n return { openModal, openConfirmModal };\n};\n","import { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { commonActions } from '@aclito/shared/redux/slices';\nimport { LocaleType } from '@aclito/shared/types';\nimport { useSharedSettings } from '@aclito/shared/features/misc/hooks/useSettings';\n\nimport { openInNewTab } from '@/util/openLinkInNewTab';\nimport {\n ROUTE_CHANGE_PASSWORD,\n ROUTE_RESERVANTO,\n ROUTE_SIGN_IN,\n} from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useSettings = () => {\n const dispatch = useAppDispatch();\n const { deleteUserAccount } = useSharedSettings();\n const { openConfirmModal } = useModal();\n\n const nav = useNavigate();\n\n const handleDeleteAccount = () => {\n openConfirmModal({\n txTitle: 'profile.deleteaccount.alert.header',\n confirmProps: { color: 'red' },\n type: 'deleteAccount',\n txLabels: { cancel: 'close', confirm: 'delete' },\n onConfirm: async () => {\n await deleteUserAccount();\n nav(ROUTE_SIGN_IN);\n },\n });\n };\n\n const handleLocaleChange = (locale: LocaleType) =>\n dispatch(commonActions.updateLocale({ locale }));\n\n const goToReservanto = () => {\n const url = `${window.location.protocol}//${window.location.host}${ROUTE_RESERVANTO}`;\n const reservantoUrl = `https://api.reservanto.cz/v1/Authorize/GetLongTimeToken?clientId=f74c6437-a5b2-43ec-9f78-10a1afdb64d2&redirectUrl=${url}&rights=Event_r&rights=Merchant_r&rights=FreeSpace_r&rights=Location_r&rights=Segment_r`;\n openInNewTab(reservantoUrl);\n };\n\n const navigateToChangePassword = () => {\n nav(ROUTE_CHANGE_PASSWORD);\n };\n\n return {\n handleDeleteAccount,\n handleLocaleChange,\n goToReservanto,\n navigateToChangePassword,\n };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { TranslateKey, TranslateValues } from '@aclito/shared/types';\nimport React from 'react';\nimport styled from 'styled-components';\n\ntype AnchorLinkProps = React.DetailedHTMLProps<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n tx?: TranslateKey;\n text?: string;\n txOptions?: TranslateValues;\n};\nconst AnchorLink: React.FC<AnchorLinkProps> = ({\n tx,\n text,\n children,\n txOptions,\n ...props\n}) => {\n const t = useTranslate();\n\n const i18nText = tx && t(tx, txOptions);\n const content = i18nText || text || children;\n\n return (\n // @ts-ignore\n <StyledAnchorTag {...props}>{content}</StyledAnchorTag>\n );\n};\n\nconst StyledAnchorTag = styled.a`\n font-size: 16px;\n`;\n\nexport default AnchorLink;\n","import styled from 'styled-components';\nimport { Box, Sx } from '@mantine/core';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { HStack, Text } from '@/components';\nimport AnchorLink from '@/common/Text/AnchorLink';\n\nexport const MenuItemContainer = styled(Box)`` as typeof Box;\n\nexport const menuStyle = (theme: ThemeColorsRecord): Sx => ({\n ':hover': { backgroundColor: theme.grey10 },\n padding: '0 24px',\n fontSize: 14,\n cursor: 'pointer',\n});\n\nexport const activeMenuStyle = (theme: ThemeColorsRecord): Sx => ({\n borderLeft: `4px solid`,\n padding: '0 20px',\n borderLeftColor: theme.primary,\n '& svg': {\n fill: theme.primary,\n },\n});\n\nexport const StyledText = styled(Text)<{\n $active?: boolean;\n}>`\n color: ${({ theme, $active }) => ($active ? theme.primary : theme.grey80)};\n @media (${deviceMax.desktop}) and (${deviceMin.tablet}) {\n display: none;\n }\n`;\n\nexport const StyledHStack = styled(HStack)`\n height: 40px;\n gap: 16px;\n align-items: center;\n`;\n\nexport const SmallText = styled(Text)`\n color: ${({ theme }) => theme.grey50};\n font-size: 10px;\n @media (${deviceMax.desktop}) and (${deviceMin.tablet}) {\n display: none;\n }\n` as typeof Text;\n\nexport const AnchorText = styled(AnchorLink)`\n color: ${({ theme }) => theme.grey50};\n font-size: 16px;\n text-decoration: underline;\n cursor: pointer;\n` as typeof AnchorLink;\n","import { useSharedSettings } from '@aclito/shared/features/misc/hooks/useSettings';\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form';\nimport { UserSettings } from '@aclito/entities';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { SimpleGrid } from '@mantine/core';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { Fragment } from 'react';\nimport styled from 'styled-components';\n\nimport { ValidatedCheckbox, VStack } from '@/components';\n\nconst OtherSettings = () => {\n const {\n initialOtherValues,\n translationOtherTable,\n handleUpdateOther,\n isLoading,\n } = useSharedSettings();\n\n const methods = useForm<Exclude<UserSettings, 'notifications'>>({\n defaultValues: initialOtherValues,\n });\n\n const onSubmit: SubmitHandler<Exclude<UserSettings, 'notifications'>> = (\n values,\n ) => {\n handleUpdateOther(values);\n };\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const Component = queryMobile ? Fragment : SimpleGrid;\n return (\n <FormProvider {...methods}>\n <VStack>\n <SubTitle tx=\"settings.notifications.other\" />\n\n <Component cols={2}>\n <VStack spacing={4}>\n <Text size={'sm'} tx={translationOtherTable['hideReviews']} />\n <Text size={'xs'} tx=\"settings.hideReviews.info\" />\n </VStack>\n <ValidatedCheckbox name={'hideReviews'} data-testid={'hideReviews'} />\n </Component>\n\n <ActionButton\n primary\n onClick={methods.handleSubmit(onSubmit)}\n tx=\"submit\"\n loading={isLoading}\n w={200}\n />\n </VStack>\n </FormProvider>\n );\n};\nconst SubTitle = styled(Text)`\n font-size: 20px;\n font-weight: 600;\n`;\nexport default OtherSettings;\n","import { useAppSelector, useSelectObject } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { Divider } from '@mantine/core';\nimport styled from 'styled-components';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { config } from '@aclito/shared/config';\nimport { APP_NAME, VERSION } from '@aclito/shared/util/constants';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport NotificationSettings from './components';\nimport { useSettings } from './hooks/useSettings';\n\nimport {\n SectionGrid,\n VStack,\n TitleBar,\n Select,\n Text,\n ActionButton,\n Title,\n Icon,\n HStack,\n} from '@/components';\nimport {\n AnchorText,\n SmallText,\n} from '@/components/Drawer/components/DrawerStyles';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\nimport OtherSettings from '@/features/misc/screens/Settings/components/OtherSettings';\n\nconst Settings = () => {\n const { translatedLocaleOptions } = useSelectObject();\n const locale = useAppSelector(commonSelectors.locale);\n const isDeleteLoading = useAppSelector(\n profileSelectors.isLoadingDeleteAccount,\n );\n const [showModalTooltip] = useShowTooltipModal('settingsTooltip');\n\n const {\n handleDeleteAccount,\n handleLocaleChange,\n goToReservanto,\n navigateToChangePassword,\n } = useSettings();\n\n return (\n <>\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <Title tx=\"nav.settings\" />\n <Icon icon={'info'} color={'primary'} onClick={showModalTooltip} />\n </HStack>\n </TitleBar>\n <VStack>\n <SubTitle tx=\"profile.languages\" />\n <Select\n style={{ maxWidth: 400 }}\n value={locale}\n onChange={handleLocaleChange}\n options={translatedLocaleOptions}\n />\n <Divider h={24} />\n <SubTitle tx=\"profile.deleteaccount.alert.header\" />\n <ActionButton\n w={200}\n tx=\"profile.deleteaccount.alert.header\"\n onClick={handleDeleteAccount}\n bg=\"red\"\n loading={isDeleteLoading}\n textcolor={'white'}\n />\n <Divider h={24} />\n <SubTitle tx=\"auth.password\" />\n <ActionButton\n w={200}\n tx=\"auth.changePassword\"\n onClick={navigateToChangePassword}\n bg=\"primary\"\n textcolor={'whiteText'}\n />\n <Divider h={24} />\n <NotificationSettings />\n <Divider h={24} />\n <OtherSettings />\n <Divider h={24} />\n <SubTitle tx={'settings.reservanto.title'} />\n <ReservantoImg\n onClick={goToReservanto}\n src={\n new URL('../../../../images/reservanto.png', import.meta.url).href\n }\n />\n <Divider h={1} />\n\n <VStack spacing={8}>\n <AnchorText\n onClick={() => openInNewTab(config.URL.aclitoTacURL)}\n tx={'footer.terms'}\n />\n <AnchorText\n onClick={() => openInNewTab(config.URL.aclitoPpURL)}\n tx={'footer.privacy'}\n />\n\n <AnchorText\n onClick={() => openInNewTab(config.URL.aclitoManualURL)}\n tx={'aclito.manual.link'}\n />\n <SmallText\n style={{ fontSize: 12 }}\n >{`${APP_NAME} - ${VERSION}`}</SmallText>\n </VStack>\n </VStack>\n </SectionGrid>\n </>\n );\n};\n\nconst ReservantoImg = styled.img`\n display: block;\n max-width: 230px;\n max-height: 95px;\n width: auto;\n height: auto;\n border-radius: 10px;\n padding: 8px;\n background: ${({ theme }) => theme.reservanto};\n :hover {\n cursor: pointer;\n }\n`;\n\nconst SubTitle = styled(Text)`\n font-size: 20px;\n font-weight: 600;\n`;\n\nexport default Settings;\n","import type { UserInfo } from '@aclito/entities';\n\nimport { config } from '../../../config';\nimport { FormattedUserInfo, TranslateKey, txFn } from '../../../types';\n\nconst { age, activities, gender, allLanguages } = config;\nexport const composeUser = (t: txFn, userInfo: UserInfo) => {\n const ageItem = age[userInfo.age].item;\n const genderItem = gender.signup[userInfo.gender].item;\n const user: FormattedUserInfo = {\n ...userInfo,\n formattedAge:\n userInfo.age === age.unknown.id ? t(ageItem as TranslateKey) : ageItem,\n formattedGender: t(genderItem as TranslateKey),\n formattedLanguages: userInfo.languages.length\n ? userInfo.languages.map((lang) => allLanguages[lang].name)\n : ['-'],\n formattedActivities: userInfo.activities.length\n ? userInfo.activities.map((act) =>\n t(activities[act].item as TranslateKey),\n )\n : ['-'],\n };\n return user;\n};\n","import { EventRaw } from '@aclito/entities';\n\nimport { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport { dateSort } from '@aclito/shared/util/sorter';\n\nexport const composeEvents = (events: EventRaw[]) => {\n return dateSort(\n events.map((event) => formatEvent(event)),\n 'date',\n 'desc',\n );\n};\n","import { composeUser } from '../utils/composeUser';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\nimport { composeEvents } from '../utils/composeEvents';\nimport { FormattedUserInfo } from '../../../types';\nimport { useEventHistoryQuery } from '../../../redux/api/eventApi';\n\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\n\nexport const useProfile = () => {\n const { data } = useEventHistoryQuery();\n const t = useTranslate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const stats = useAppSelector(profileSelectors.stats);\n\n const pastEvents = composeEvents(data ?? []);\n\n const user: FormattedUserInfo = composeUser(t, userInfo);\n\n return { user, pastEvents, stats };\n};\n","export enum MyProfileTabType {\n INFO = 'info',\n HISTORY = 'history',\n}\n","import dayjs from 'dayjs';\nimport { Availability, EventRaw } from '@aclito/entities';\n\nimport { FormattedEvent } from '../types';\n\nexport const calculateEventDaySplit = (\n index: number,\n events: FormattedEvent[],\n) =>\n (index > 0 &&\n events[index - 1].formattedDate !== events[index].formattedDate) ||\n index === 0;\n\nexport const calculateEventMonthSplit = (index: number, events: EventRaw[]) =>\n (index > 0 &&\n dayjs(events[index - 1].date).month() !==\n dayjs(events[index].date).month()) ||\n index === 0;\n\nexport const calculateAvailabilityDaySplit = (\n index: number,\n availabilities: Availability[],\n) =>\n (index > 0 &&\n dayjs(availabilities[index - 1].from).date() !==\n dayjs(availabilities[index].from).date()) ||\n index === 0;\n\nexport const calculateAvailabilityMonthSplit = (\n index: number,\n availabilities: Availability[],\n) =>\n (index > 0 &&\n dayjs(availabilities[index - 1].from).month() !==\n dayjs(availabilities[index].from).month()) ||\n index === 0;\n","import { EventProviderType } from '@aclito/enums';\n\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\n\nexport const externalColorPicker = (\n eventProvider: EventProviderType,\n theme: ThemeColorsRecord,\n) => {\n let externalEventColor: string;\n switch (eventProvider) {\n case EventProviderType.CHYTRA_REZERVACE:\n externalEventColor = theme.chytrarezervace;\n break;\n case EventProviderType.RESERVANTO:\n externalEventColor = theme.reservanto;\n break;\n default:\n externalEventColor = theme.primary;\n }\n\n return externalEventColor;\n};\n","export const hashIds = (myId: string, otherId: string) => {\n const [s1, s2] = [myId, otherId].sort((x, y) => x.localeCompare(y));\n return `${s1}#${s2}`;\n};\n","import { storage } from '../lib/storage';\n\nimport { LAST_SEEN_CHAT } from './constants';\nimport { hashIds } from './getHash';\n\nexport const shouldShowBadge = async (data: {\n chatId: string;\n userId: string;\n lastUpdate: string;\n}) => {\n const { chatId, userId, lastUpdate } = data;\n const lastSeenData = await storage.getParsedItems(LAST_SEEN_CHAT);\n const hash = hashIds(chatId, userId);\n if (Object.keys(lastSeenData).length === 0) return false;\n const hasData = lastSeenData[hash];\n return hasData ? hasData.lastSeen < lastUpdate : false;\n};\n","import { useEffect, useState } from 'react';\nimport { Chat, Event } from '@aclito/entities';\n\nimport { isJoinedInChat } from '../utils/isJoinedInChat';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { shouldShowBadge } from '@aclito/shared/util/shouldShowBadge';\n\nexport const useShowCardBadge = (event: Event) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const [showBadge, setShowBadge] = useState(false);\n\n useEffect(() => {\n const showRead = async (chat: Chat) => {\n const show = await shouldShowBadge({\n chatId: chat.id,\n userId: userInfo.id,\n lastUpdate: chat.updatedAt,\n });\n setShowBadge(show && isJoinedInChat(chat, userInfo));\n };\n if (event.chat) {\n showRead(event.chat);\n }\n }, [event.chat]);\n\n return { showBadge };\n};\n","import { ImageValueShape } from '../../../types';\n\nexport interface PlayerDataType {\n id: string;\n name: string;\n surname: string;\n image: ImageValueShape;\n}\n\nexport enum EventTag {\n ALL = 'ALL',\n KIDS = 'KIDS',\n ADULTS = 'ADULTS',\n}\n\nexport type EventTags = { adults: boolean; all: boolean; kids: boolean };\n","import { EventRaw } from '@aclito/entities';\n\nimport { EventTag, EventTags } from '../types/types';\n\nexport const isForKids = (event: EventRaw) => event.tags.kids;\nexport const isForAdults = (event: EventRaw) => event.tags.adults;\n\nexport const getCurrentTag = (tags: EventTags) => {\n if (tags.adults) return EventTag.ADULTS;\n if (tags.kids) return EventTag.KIDS;\n if (tags.all) return EventTag.ALL;\n\n return EventTag.ALL;\n};\n","import { ImageValueShape, SelectObject } from '@aclito/shared/types';\n\nexport enum OrganizationTag {\n TEAM = 'TEAM',\n CLUB = 'CLUB',\n ORGANIZATION = 'ORGANIZATION',\n}\n\nexport type OrganizationTags = {\n team: boolean;\n club: boolean;\n organization: boolean;\n};\n\nexport interface FeedForm {\n feedOrg: SelectObject | undefined;\n feedText: string;\n file: string | undefined;\n image?: ImageValueShape;\n}\n","import { Organization } from '@aclito/entities';\n\nimport { OrganizationTag, OrganizationTags } from '../types/types';\n\nexport const isTeam = (org: Organization) => org.tags.team;\nexport const isClub = (org: Organization) => org.tags.club;\nexport const isOrganization = (org: Organization) => org.tags.organization;\n\nexport const getCurentTag = (tags: OrganizationTags) => {\n if (tags.team) return OrganizationTag.TEAM;\n if (tags.club) return OrganizationTag.CLUB;\n if (tags.organization) return OrganizationTag.ORGANIZATION;\n\n return OrganizationTag.TEAM;\n};\n","import { EventProviderType } from '@aclito/enums';\n\nconst providerImage: Record<EventProviderType, string> = {\n [EventProviderType.CHYTRA_REZERVACE]: new URL(\n '../images/logos/chytra-rezervace-logo.png',\n import.meta.url,\n ).href,\n [EventProviderType.RESERVANTO]: new URL(\n '../images/logos/reservanto.png',\n import.meta.url,\n ).href,\n [EventProviderType.ACLITO]: new URL('', import.meta.url).href,\n};\n\nconst providerStyle: Record<EventProviderType, React.CSSProperties> = {\n [EventProviderType.CHYTRA_REZERVACE]: {\n width: 60,\n height: 30,\n },\n [EventProviderType.RESERVANTO]: {\n width: 90,\n height: 30,\n },\n [EventProviderType.ACLITO]: {},\n};\n\nexport { providerImage, providerStyle };\n","import React from 'react';\nimport { eventIsRunning } from '@aclito/shared/features/event/utils/eventIsRunning';\nimport {\n isUserOrganizer,\n isUserTrainer,\n} from '@aclito/shared/features/event/utils/getEventRole';\nimport {\n isForAdults,\n isForKids,\n} from '@aclito/shared/features/event/utils/getEventTag';\nimport {\n isClub,\n isOrganization,\n isTeam,\n} from '@aclito/shared/features/organization/utils/getOrgTag';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { Event } from '@aclito/entities';\nimport { EventProviderType } from '@aclito/enums';\n\nimport {\n GroupedContent,\n CardStatusBannerIcon,\n CardStatusBannerText,\n ActivityBannerText,\n} from '@/components';\nimport { providerImage, providerStyle } from '@/util/providerData';\ninterface EventTagsProps {\n event: Event;\n fullText?: boolean;\n}\n\nconst EventTags: React.FC<EventTagsProps> = ({ event, fullText }) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n return (\n <GroupedContent style={{ justifyContent: 'space-between' }}>\n <GroupedContent spacing={4} style={{ flexWrap: 'nowrap' }}>\n {userInfo &&\n isUserOrganizer(userInfo, event) &&\n (!fullText ? (\n <CardStatusBannerIcon type=\"eventOrganizer\" />\n ) : (\n <CardStatusBannerText type=\"eventOrganizer\" />\n ))}\n {userInfo &&\n isUserTrainer(userInfo, event) &&\n (!fullText ? (\n <CardStatusBannerIcon type=\"eventTrainer\" />\n ) : (\n <CardStatusBannerText type=\"eventTrainer\" />\n ))}\n {eventIsRunning(event) &&\n (!fullText ? (\n <CardStatusBannerIcon type=\"eventRunning\" />\n ) : (\n <CardStatusBannerText type=\"eventRunning\" />\n ))}\n {event.activityType && (\n <ActivityBannerText activityType={event.activityType} />\n )}\n {isForKids(event) && <CardStatusBannerText type=\"eventForKids\" />}\n {isForAdults(event) && <CardStatusBannerText type=\"eventForAdults\" />}\n {event.org && isOrganization(event.org) && (\n <CardStatusBannerText type=\"orgTypeOrganization\" />\n )}\n {event.org && isTeam(event.org) && (\n <CardStatusBannerText type=\"orgTypeTeam\" />\n )}\n {event.org && isClub(event.org) && (\n <CardStatusBannerText type=\"orgTypeClub\" />\n )}\n {event.repetitionId && <CardStatusBannerText type=\"eventRepeating\" />}\n {event.provider !== EventProviderType.ACLITO && (\n <CardStatusBannerText type={event.provider} />\n )}\n </GroupedContent>\n {event.provider !== EventProviderType.ACLITO && (\n <img\n alt={'provider-logo'}\n src={providerImage[event.provider]}\n style={providerStyle[event.provider]}\n />\n )}\n </GroupedContent>\n );\n};\n\nexport default EventTags;\n","import React from 'react';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\nimport { externalColorPicker } from '@aclito/shared/util/externalColorPicker';\nimport { useTranslateDate } from '@aclito/shared/hooks';\nimport { Indicator } from '@mantine/core';\nimport { useShowCardBadge } from '@aclito/shared/features/event/hooks/useShowCardBadge';\n\nimport PlayersMembersNumber from '../PlayersMembersNumber';\n\nimport EventTags from './EventTags';\n\nimport {\n StyledText,\n CardTitle,\n GroupedContent,\n PlainCard,\n HStack,\n VStack,\n Icon,\n} from '@/components';\nimport { ROUTE_EVENT_INFO, ROUTE_EVENT_INFO_PROVIDERS } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ParamList } from '@/util/types';\n\ninterface CardProps {\n event: FormattedEvent;\n onClick?: (event: FormattedEvent) => void;\n}\n\nconst EventCard: React.FC<CardProps> = ({ event, onClick }) => {\n const nav = useNavigate();\n const tDate = useTranslateDate();\n const date = tDate(event.date, 'date.card');\n const duration = formatEventDuration(event);\n const theme = useTheme();\n const isAclitoEvent = event.isAclitoEvent ?? true;\n\n const tintColor: string = event.activityType\n ? cardColorPicker(event.activityType)\n : externalColorPicker(event.provider, theme);\n\n const navigationKey: keyof ParamList = isAclitoEvent\n ? ROUTE_EVENT_INFO\n : ROUTE_EVENT_INFO_PROVIDERS;\n\n const navigate = () => {\n nav(navigationKey, { state: { id: event.id } });\n };\n\n const handleOnClick = onClick ? () => onClick(event) : navigate;\n\n const { showBadge } = useShowCardBadge(event);\n\n return (\n <Indicator disabled={!showBadge} color={theme.red} size={13}>\n <PlainCard\n $borderColor={tintColor}\n onClick={handleOnClick}\n style={{ height: '100%' }}\n data-testid={event.name}\n >\n <VStack\n spacing={16}\n style={{\n height: '100%',\n }}\n >\n <GroupedContent noWrap spacing={8}>\n <HStack noWrap style={{ justifyContent: 'space-between', flex: 1 }}>\n <CardTitle lineClamp={1} text={event.name} />\n {isAclitoEvent && (\n <PlayersMembersNumber\n textSize={14}\n withIcon\n iconSize={16}\n event={event}\n />\n )}\n </HStack>\n </GroupedContent>\n\n <VStack spacing={8}>\n <HStack noWrap spacing={10}>\n <Icon icon=\"time\" size={16} color=\"grey30\" />\n <StyledText>{event.formattedTime}</StyledText>\n <StyledText\n style={{\n fontWeight: 'bold',\n color: theme.grey50,\n }}\n >\n ({duration})\n </StyledText>\n </HStack>\n <HStack noWrap spacing={10}>\n <Icon icon=\"calendar\" size={16} color=\"grey30\" />\n <StyledText>{date}</StyledText>\n </HStack>\n {event.place && (\n <HStack noWrap spacing={10}>\n {event.place ? (\n <>\n <Icon icon=\"place\" size={16} color=\"grey30\" />\n <StyledText lineClamp={1}>{event.place.name}</StyledText>\n </>\n ) : (\n <div> </div>\n )}\n </HStack>\n )}\n </VStack>\n <EventTags event={event} />\n </VStack>\n </PlainCard>\n </Indicator>\n );\n};\n\nexport default EventCard;\n","import { Grid } from '@mantine/core';\nimport {\n columnsFullWidth,\n columnsThreeFourths,\n} from '@aclito/ui-web/utils/mediaQueries';\n\ninterface GridColumnProps {\n fullWidth: boolean;\n children?: React.ReactNode;\n}\nconst GridColumn: React.FC<GridColumnProps> = ({ children, fullWidth }) => {\n const columns = fullWidth ? columnsFullWidth : columnsThreeFourths;\n return (\n <Grid.Col\n xl={columns.xl}\n lg={columns.lg}\n md={columns.md}\n sm={columns.sm}\n xs={columns.xs}\n >\n {children}\n </Grid.Col>\n );\n};\n\nexport default GridColumn;\n","import React, { Fragment, useEffect, useState } from 'react';\nimport {\n calculateEventMonthSplit,\n calculateEventDaySplit,\n} from '@aclito/shared/util/calculateDateSplit';\nimport dayjs from 'dayjs';\nimport styled, { useTheme } from 'styled-components';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport { Grid } from '@mantine/core';\n\nimport EventCard from './EventCard';\nimport GridColumn from './GridColumn';\n\nimport { HStack, Text, Icon } from '@/components';\n\ninterface MyEventsCardProps {\n data: FormattedEvent[];\n showDateType?: ShowDateType;\n showAds?: boolean;\n fullWidth?: boolean;\n onClick?: (event: FormattedEvent) => void;\n}\ntype ShowDateType = 'day' | 'month';\ntype FunctionSplitType = Record<\n ShowDateType,\n (index: number, events: FormattedEvent[]) => boolean\n>;\n\nconst EventsCards: React.FC<MyEventsCardProps> = ({\n data,\n showDateType,\n fullWidth,\n onClick,\n}) => {\n const [hiddenDates, setHiddenDates] = useState<{ id: number }[]>([]);\n const theme = useTheme();\n const handleHiddenDate = (id: number) => {\n const date = hiddenDates.findIndex((d) => d.id === id);\n if (date > -1) {\n setHiddenDates((prev) => prev.filter((d) => d.id !== id));\n } else {\n setHiddenDates((prev) => [...prev, { id }]);\n }\n };\n\n useEffect(() => {\n setHiddenDates([]);\n }, [showDateType]);\n\n const renderCards = () => (\n <Grid gutter=\"md\">\n {data.map((event) => (\n <GridColumn key={event.id} fullWidth={!!fullWidth}>\n <EventCard event={event} onClick={onClick} />\n </GridColumn>\n ))}\n </Grid>\n );\n\n const renderCardsWithDate = () => {\n const dataToRender = calculateSplit(showDateType ?? 'day', data);\n return (\n <Box>\n {dataToRender.map((arr, index) => {\n const weekday = dayjs(arr[0].date).format('DD. dddd, MMMM');\n const month = dayjs(arr[0].date).format('MMMM');\n const isHidden = !hiddenDates.some((date) => date.id === index);\n return (\n <Fragment key={weekday + month}>\n <DateToggle spacing={8} onClick={() => handleHiddenDate(index)}>\n <DateText color={theme.grey30}>\n {showDateType === 'day' ? weekday : month}\n </DateText>\n {isHidden ? (\n <Icon icon=\"chevronDown\" size={24} color=\"grey20\" />\n ) : (\n <Icon icon=\"chevronUp\" size={24} color=\"grey20\" />\n )}\n </DateToggle>\n {isHidden && (\n <Grid gutter=\"sm\" key={index}>\n {arr.map((e) => {\n // const ad = AManager.start().getAd();\n // const canShowAd =\n // showAds &&\n // (i % 10 === 0 || i === arr.length - 1) &&\n // i > 0 &&\n // showDateType === 'month' &&\n // ad;\n\n return (\n <Fragment key={e.id}>\n <GridColumn fullWidth={!!fullWidth}>\n <EventCard event={e} onClick={onClick} />\n </GridColumn>\n {/*{canShowAd && (*/}\n {/* <GridColumn key={e.id} fullWidth={!!fullWidth}>*/}\n {/* <ABanner ad={ad} />*/}\n {/* </GridColumn>*/}\n {/*)}*/}\n </Fragment>\n );\n })}\n </Grid>\n )}\n </Fragment>\n );\n })}\n </Box>\n );\n };\n\n return <>{showDateType ? renderCardsWithDate() : renderCards()}</>;\n};\nconst calculateSplit = (\n type: ShowDateType,\n data: FormattedEvent[],\n): FormattedEvent[][] => {\n const functionObject: FunctionSplitType = {\n day: calculateEventDaySplit,\n month: calculateEventMonthSplit,\n };\n const dataToReturn = [];\n let tempData = [];\n for (let index = 0; index < data.length; index++) {\n if (functionObject[type](index, data) && index > 0) {\n dataToReturn.push(tempData);\n tempData = [];\n tempData.push(data[index]);\n } else {\n tempData.push(data[index]);\n }\n if (data.length === index + 1) {\n dataToReturn.push(tempData);\n }\n }\n return dataToReturn;\n};\n\nconst Box = styled.div`\n width: 100%;\n`;\nconst DateToggle = styled(HStack)`\n cursor: pointer;\n align-items: center;\n padding-top: 16px;\n padding-bottom: 10px;\n`;\n\nconst DateText = styled(Text)`\n font-size: 14px;\n`;\n\nexport default EventsCards;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { FormattedUserInfo } from '@aclito/shared/types';\nimport { SectionTitle } from '@aclito/ui-web/components/Layout';\nimport { useNavigate } from 'react-router-dom';\n\nimport InfoBuilder from '../../features/event/screens/EventInfo/components/InfoBuilder';\n\nimport { HStack, Avatar, Text, Icon } from '@/components';\nimport { ROUTE_PROFILE_ALIASES } from '@/util/constants';\nexport interface AboutUserAttributesProps {\n userInfo: FormattedUserInfo;\n myProfile: boolean;\n}\n\nconst AboutUserAttributes: React.FC<AboutUserAttributesProps> = ({\n userInfo,\n myProfile,\n}) => {\n const nav = useNavigate();\n\n const onAliasNavigation = () => {\n myProfile\n ? nav(ROUTE_PROFILE_ALIASES)\n : nav(`${ROUTE_PROFILE_ALIASES}/${userInfo.id}`);\n };\n\n return (\n <Content>\n <InfoBuilder\n data={[\n {\n text: { text: userInfo.formattedActivities.join(', ') },\n label: 'profile.activities',\n },\n {\n text: { text: userInfo.formattedLanguages.join(', ') },\n label: 'profile.languages',\n },\n {\n text: { text: userInfo.formattedAge || '' },\n label: 'profile.age',\n },\n {\n text: { text: userInfo.formattedGender || '' },\n label: 'profile.gender',\n },\n {\n text: {\n text: userInfo.description || '',\n },\n label: 'profile.description',\n vertical: true,\n visible: !!userInfo.description,\n },\n ]}\n />\n {(myProfile || !!userInfo.aliases.length) && (\n <div style={{ paddingTop: 8 }}>\n <SectionTitle\n testID={'user-alias'}\n onClick={onAliasNavigation}\n buttonLabelTx={'profile.alias'}\n />\n {myProfile && !userInfo.aliases.length && (\n <HStack onClick={onAliasNavigation} style={{ paddingTop: 24 }}>\n <Icon icon={'add'} color=\"primary\" />\n <Text tx={'tooltip.alias.add'} size={'sm'} color=\"primary\" />\n </HStack>\n )}\n <HStack style={{ paddingTop: 8 }}>\n {userInfo.aliases.map((alias) => (\n <Avatar key={alias.id} size={60} image={alias.image} />\n ))}\n </HStack>\n </div>\n )}\n </Content>\n );\n};\n\nconst Content = styled.div`\n flex: 1;\n`;\n\nexport default AboutUserAttributes;\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport AboutUserAttributes, {\n AboutUserAttributesProps,\n} from './AboutUserAttributes';\nimport { AboutUserMainProps } from './AboutUserMain';\n\nimport { Collapsible } from '@/components';\n\nconst AboutUserSection: React.FC<\n AboutUserMainProps & AboutUserAttributesProps\n> = ({ userInfo, myProfile }) => (\n <AboutUser>\n <Container>\n <Collapsible buttonLabelTx=\"tabs.aboutme\" defaultOpen>\n <AboutUserAttributes {...{ userInfo, myProfile }} />\n </Collapsible>\n </Container>\n </AboutUser>\n);\n\nconst AboutUser = styled.div`\n min-width: 90%;\n width: 100%;\n margin: auto;\n`;\n\nconst Container = styled.div`\n display: flex;\n gap: 16px;\n flex-direction: column;\n`;\n\nexport default AboutUserSection;\n","import { handleError } from '../utils/handleError';\n\nexport const GET_USER = 'getUser';\nexport const GET_USER_REVIEWS = 'getUserReviews';\nexport const GET_USER_STATS = 'getUserStats';\nimport { userClient } from '@aclito/client';\nimport { Review, Stats, UserInfo } from '@aclito/entities';\n\nimport { aclitoApi } from '../api';\nexport const userApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [GET_USER]: builder.query<{ user: UserInfo; stats: Stats }, { id: string }>(\n {\n queryFn: async (args) => {\n try {\n const data = await userClient.user.getUserProfile(args.id);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n },\n ),\n [GET_USER_REVIEWS]: builder.query<Review[], { id: string }>({\n queryFn: async (args) => {\n try {\n const data = await userClient.user.getUserReviews(args.id);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [GET_USER_STATS]: builder.query<Stats, { id: string }>({\n queryFn: async (args) => {\n try {\n const data = await userClient.user.getUserStats(args.id);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const { useGetUserQuery, useGetUserReviewsQuery, useGetUserStatsQuery } =\n userApi;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Review } from '@aclito/entities';\nimport dayjs from 'dayjs';\n\nimport { Avatar, HStack, Text, VStack, BasicCard } from '@/components';\n\ninterface CommentCardsProps {\n reviews: Review[];\n}\n\nconst ReviewCards: React.FC<CommentCardsProps> = ({ reviews }) => (\n <>\n {(reviews ?? []).map((review) => (\n <BasicCard key={review.id}>\n <VStack>\n <HStack>\n <Avatar size={50} image={review.user.image} />\n <VStack spacing={4}>\n <Title>\n {review.user.name} {review.user.surname}\n \n {dayjs(review.updatedAt).fromNow()}\n \n \n {review.title}\n {review.text}\n \n \n ))}\n \n);\n\nconst SecondaryTitle = styled(Text)`\n font-size: 24px;\n color: ${({ theme }) => theme.grey50};\n font-weight: 400;\n`;\n\nconst Title = styled(Text)`\n font-size: 24px;\n color: ${({ theme }) => theme.grey80};\n font-weight: 500;\n margin-right: 16px;\n`;\n\nconst TimeText = styled(Text)`\n font-size: 10px;\n color: ${({ theme }) => theme.grey30};\n`;\nconst Body = styled(Text)`\n font-size: 12px;\n`;\n\nexport default ReviewCards;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useGetUserReviewsQuery } from '@aclito/shared/redux/api/userApi';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { Space } from '@mantine/core';\nimport { extractId } from '@aclito/shared/util/alias';\n\nimport ReviewCards from './ReviewCards';\n\nimport { Collapsible, EmptyList, InlineTooltip } from '@/components';\n\ninterface AboutUserCommentsProps {\n id: string;\n isReviewHidden: boolean;\n}\n\nconst Reviews: React.FC = ({ id, isReviewHidden }) => {\n const myId = useAppSelector(profileSelectors.userInfo).id;\n const actualId = extractId(id);\n const isMyProfile = actualId === myId;\n\n const { data, isUninitialized, isSuccess } = useGetUserReviewsQuery(\n { id },\n { skip: !isMyProfile && isReviewHidden },\n );\n const sortedData = dateSort(data ?? [], 'updatedAt', 'desc');\n const showEmpty = !isUninitialized && isSuccess && !sortedData.length;\n\n return (\n \n {isMyProfile ? (\n <>\n \n \n \n ) : (\n <>\n {isReviewHidden && (\n \n )}\n \n \n )}\n \n {showEmpty ? (\n <>\n \n \n \n ) : (\n \n )}\n \n \n );\n};\n\nconst Comments = styled.div`\n & > div:not(:last-child) {\n margin-bottom: 10px;\n }\n`;\n\nexport default Reviews;\n","export const debounce = (\n callback: (...args: any[]) => void,\n wait: number,\n) => {\n let timeoutId: any;\n return (...args: Array) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n // eslint-disable-next-line prefer-spread\n callback.apply(null, args);\n }, wait);\n };\n};\n","import { DependencyList, useLayoutEffect, useState } from 'react';\nimport { debounce } from '@aclito/shared/util/debounce';\n\n//WARNING: This will cause issues when changing window size frequently. Once the component behind isFlexWrapped is removed from the tree, it has nothing to calculate with.\nexport const useFlexWrap = (id: string, deps?: DependencyList) => {\n const [isFlexWrapped, setIsFlexWrapped] = useState(false);\n\n useLayoutEffect(() => {\n const checkFlexWrap = () => {\n const flexContainer = document.getElementById(id);\n const containerWidth = flexContainer?.clientWidth ?? 0;\n const totalItemsWidth = Array.from(flexContainer?.children ?? []).reduce(\n (total, item) => total + item.clientWidth,\n 0,\n );\n setIsFlexWrapped(totalItemsWidth > containerWidth);\n };\n\n // Check initially\n checkFlexWrap();\n const debouncedCheckFlexWrap = debounce(checkFlexWrap, 200);\n // Add an event listener for window resize using the debounced function\n window.addEventListener('resize', debouncedCheckFlexWrap);\n\n // Clean up the event listener on component unmount\n return () => {\n window.removeEventListener('resize', debouncedCheckFlexWrap);\n };\n }, deps ?? []);\n\n return isFlexWrapped;\n};\n","import { EmojiMap } from '@aclito/entities';\nimport { EmojisKey } from '@aclito/shared/types';\nimport { Fragment } from 'react';\nimport { config } from '@aclito/shared/config';\nimport { unique } from '@aclito/shared/util/unique';\n\nimport { HStack, Text } from '@/components';\n\ninterface StatsProps {\n emojis: EmojiMap;\n compact?: boolean;\n}\n\nconst DEFAULT_EMOJIS: EmojisKey[] = [\n 'medal1',\n 'medal2',\n 'medal3',\n 'trophy',\n 'crown',\n];\nconst MAX_EMOJIS = 5;\n\nconst Stats: React.FC = ({ emojis, compact }) => {\n const sortedEmojis = Object.fromEntries(\n Object.entries(emojis).sort(([, valueA], [, valueB]) => valueB - valueA),\n );\n\n const emojisArray = Object.keys(sortedEmojis).filter(\n (e) => (emojis[e as EmojisKey] ?? 0) > 0,\n );\n\n const slicedEmojisArray = unique([\n ...emojisArray,\n ...(compact ? [] : DEFAULT_EMOJIS),\n ]).slice(0, MAX_EMOJIS);\n\n return (\n \n {slicedEmojisArray.map((stat) => (\n \n \n \n {emojis[stat as EmojisKey] ?? ''}\n \n \n {config.emojis[stat as EmojisKey].item}\n \n \n \n ))}\n \n );\n};\n\nexport default Stats;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { FormattedUserInfo } from '@aclito/shared/types';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { Stats as StatsType } from '@aclito/entities';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport { Avatar, HStack, VStack, Text, Karma } from '@/components';\nimport Stats from '@/common/Profile/Stats';\n\nexport interface AboutUserMainProps {\n userInfo: FormattedUserInfo;\n stats?: StatsType;\n deleted?: boolean;\n myProfile?: boolean;\n}\n\nconst AboutUserMain: React.FC = ({\n userInfo,\n stats,\n deleted,\n myProfile,\n}) => {\n const [showTooltipModal] = useShowTooltipModal('profileTooltip');\n\n const handleModal = () => {\n if (!deleted && myProfile) {\n showTooltipModal();\n }\n };\n\n return (\n \n \n \n \n {!deleted ? (\n <>\n \n {stats && }\n \n ) : (\n \n )}\n \n \n {stats && }\n \n );\n};\n\nconst UserDeletedText = styled(Text)`\n color: ${({ theme }) => theme.red};\n`;\n\nconst GroupedContent = styled(HStack)`\n width: 100%;\n @media ${deviceMax.mobileS} {\n flex-direction: column;\n }\n`;\n\nconst StyledVStack = styled(VStack)`\n gap: 0.3rem;\n align-items: unset;\n`;\n\nconst Content = styled(VStack)`\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst NameText = styled(Text)`\n font-family: Roboto;\n font-size: 1.25rem;\n font-weight: 500;\n`;\n\nexport default AboutUserMain;\n","import {\n Achievement,\n AchievementOrgId,\n UserAchievement,\n} from '@aclito/entities';\nimport { achievementClient } from '@aclito/client';\n\nimport { aclitoApi } from '../api';\nimport { MyRank, UserRank } from '../../types';\nimport { handleError } from '../utils/handleError';\n\nexport const achievementApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n getAchievements: builder.query({\n queryFn: async (args) => {\n try {\n const { data } = await achievementClient.achievements.getAll(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n getRank: builder.query<{ rank: UserRank[]; myRanks: MyRank[] }, string>({\n queryFn: async (args) => {\n try {\n const { data } = await achievementClient.rank.getRank(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n getUserAchievementsByUserId: builder.query<\n UserAchievement[],\n { id: string; orgId?: string }\n >({\n queryFn: async ({ id, orgId }) => {\n try {\n const { data } = await achievementClient.user.getAllUserAchievements(\n id,\n orgId,\n );\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const {\n useGetAchievementsQuery,\n useGetUserAchievementsByUserIdQuery,\n useGetRankQuery,\n} = achievementApi;\n","export const getLevel = (current: number, levelSteps: number[]) => {\n if (!levelSteps) {\n return 0;\n }\n let cumulativeSum = 0;\n\n for (let i = 0; i < levelSteps.length; i++) {\n cumulativeSum += levelSteps[i];\n if (cumulativeSum > current) {\n return i;\n }\n }\n\n return levelSteps.length;\n};\n\nexport const getLevelCumulativeSum = (idx: number, levelSteps: number[]) => {\n let cumulativeSum = 0;\n\n for (let i = 0; i <= idx; i++) {\n cumulativeSum += levelSteps[i];\n }\n return cumulativeSum;\n};\n","import { Achievement, UserAchievement } from '@aclito/entities';\n\nimport { getLevel } from './getLevel';\n\nexport interface AchievementCardData extends Achievement {\n classic: boolean;\n unlocked: boolean;\n achievementProgress: number;\n currentProgress: number;\n totalProgress: number;\n level: number;\n}\n\nexport const createDataForAchievementsCards = (\n achievements?: Achievement[],\n userAchievements?: UserAchievement[],\n aliasId?: string,\n): AchievementCardData[] => {\n if (!achievements) {\n return [];\n }\n\n const filteredUserAchievements = aliasId\n ? userAchievements?.filter((item) => item.aliasId === aliasId)\n : userAchievements?.filter((item) => !item.aliasId);\n\n return achievements\n .map((achievement) =>\n calculateAchievementCardData(achievement, filteredUserAchievements),\n )\n .sort(sortAchievements);\n};\n\nconst calculateAchievementCardData = (\n achievement: Achievement,\n userAchievements?: UserAchievement[],\n): AchievementCardData => {\n const userAchievement = userAchievements?.find(\n (item) => item.achievementId === achievement.id,\n );\n\n const achievementProgress = userAchievement?.progress ?? 0;\n const { levelSteps } = achievement.config;\n\n // Handle classic achievements (no level steps)\n if (!levelSteps.length) {\n return {\n ...achievement,\n classic: true,\n unlocked: achievementProgress !== 0,\n achievementProgress,\n currentProgress: achievementProgress,\n totalProgress: 0,\n level: 0,\n };\n }\n\n // Handle single-step achievements\n if (levelSteps.length === 1) {\n const progressRequired = levelSteps[0];\n const level = achievementProgress >= progressRequired ? 1 : 0;\n return {\n ...achievement,\n classic: level === 1,\n unlocked: level === 1,\n achievementProgress,\n currentProgress: achievementProgress,\n totalProgress: progressRequired,\n level: level,\n };\n }\n\n // Handle multi-step achievements\n const level = getLevel(achievementProgress, levelSteps);\n const sumOfPreviousSteps = levelSteps\n .slice(0, level)\n .reduce((sum, step) => sum + step, 0);\n\n const currentProgress = achievementProgress - sumOfPreviousSteps;\n const totalProgress = levelSteps[level];\n\n return {\n ...achievement,\n classic: false,\n unlocked: level > 0,\n achievementProgress,\n currentProgress,\n totalProgress,\n level: level,\n };\n};\n\nconst sortAchievements = (\n a: AchievementCardData,\n b: AchievementCardData,\n): number => {\n if (a.level === 0 && b.level === 0) {\n return b.currentProgress - a.currentProgress;\n }\n return b.level - a.level;\n};\n","export const splitIconArrayIntoPairs = (arr: T[]): T[][] => {\n const result: T[][] = [];\n for (let i = 0; i < arr.length; i += 2) {\n result.push(arr.slice(i, i + 2));\n }\n return result;\n};\n","import React, { cloneElement, HTMLAttributes } from 'react';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\nimport { useTheme } from 'styled-components';\nimport type { AllIcons } from '@aclito/shared/types';\nimport { IconBaseProps } from 'react-icons';\n\nimport { iconRegistry } from './Icon';\nimport { iconSelectRegistry } from './IconSelect';\n\nexport interface AllIconsProps extends HTMLAttributes {\n icon: AllIcons;\n containerStyle?: React.CSSProperties;\n color?: ThemeColorsKeys;\n size?: '8' | '16' | '20' | '24' | '32' | '48' | number;\n originalColor?: string;\n iconProps?: IconBaseProps;\n}\n\nconst AllIcons: React.FC = ({\n icon,\n color,\n size,\n containerStyle,\n originalColor,\n iconProps,\n ...wrapperProps\n}) => {\n const theme = useTheme();\n const overrideColor = color ? theme[color] : theme.grey80;\n\n const overrideSize = size\n ? typeof size === 'string'\n ? parseInt(size, 10)\n : size\n : 24;\n\n const allIconsRegistry = {\n ...iconRegistry,\n ...iconSelectRegistry,\n };\n\n const i = allIconsRegistry[icon] as React.ReactElement;\n\n const el = cloneElement(i ??
, {\n color: originalColor || overrideColor,\n size: overrideSize,\n ...iconProps,\n style: {\n margin: 'auto',\n display: 'block',\n },\n });\n\n return (\n
\n {el}\n
\n );\n};\n\nexport default AllIcons;\n","import { AllIcons } from '@aclito/shared/types';\nimport { BIG_ICON_SIZE_CLASSIC_ACHIEVEMENT } from '@aclito/shared/util/constants';\n\nimport { IconType } from '../../components/Icons/Icon';\n\nimport IconAll from '@aclito/ui-web/components/Icons/IconAll';\n\nconst checkIconNameType = (iconName: string): iconName is IconType => {\n return (iconName as AllIcons) !== undefined;\n};\n\nconst createIcons = (icons: string[], size: number) => {\n if (!icons || icons.length === 0) {\n return (\n \n );\n }\n\n return icons.map((iconName, index) => (\n \n ));\n};\n\nexport default createIcons;\n","import React from 'react';\nimport styled, { useTheme } from 'styled-components';\nimport { splitIconArrayIntoPairs } from '@aclito/shared/features/goals/utils';\nimport {\n BIG_ICON_SIZE_CLASSIC_ACHIEVEMENT,\n BIG_ICON_SIZE_LEVEL_ACHIEVEMENT,\n SMALL_ICON_SIZE_CLASSIC_ACHIEVEMENT,\n SMALL_ICON_SIZE_LEVEL_ACHIEVEMENT,\n} from '@aclito/shared/util/constants';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { Text } from '../components/Text';\nimport { Icon } from '../components/Icons/Icon';\n\nimport createIcons from './utils/createIcons';\n\ninterface IconProps {\n unlocked: boolean;\n classic: boolean;\n icons: string[] | undefined;\n backgroundColor: string;\n level: number;\n preview?: boolean;\n}\n\nconst AchievementIcon: React.FC = ({\n unlocked,\n classic,\n icons = [],\n level,\n preview,\n backgroundColor,\n}) => {\n const theme = useTheme();\n const t = useTranslate();\n\n const AchievementView = preview ? NoCircle : Box;\n\n const sizeClassic =\n icons.length > 1\n ? SMALL_ICON_SIZE_CLASSIC_ACHIEVEMENT\n : BIG_ICON_SIZE_CLASSIC_ACHIEVEMENT;\n\n const sizeNonClassic =\n icons.length > 1\n ? SMALL_ICON_SIZE_LEVEL_ACHIEVEMENT\n : BIG_ICON_SIZE_LEVEL_ACHIEVEMENT;\n\n const size = classic ? sizeClassic : sizeNonClassic;\n\n return (\n \n {classic ? (\n <>\n {unlocked ? (\n \n {splitIconArrayIntoPairs(icons ?? []).map((icon, index) => (\n \n {createIcons(icon, size)}\n \n ))}\n \n ) : (\n \n \n \n )}\n \n ) : (\n <>\n {unlocked ? (\n \n {splitIconArrayIntoPairs(icons ?? []).map((icon, index) => (\n \n {createIcons(icon, size)}\n \n ))}\n \n {t('admin.achievements.create.tier')} {level}\n \n \n ) : (\n \n \n \n )}\n \n )}\n \n );\n};\n\nconst NoCircle = styled.div``;\n\nconst Container = styled.div<{ $preview?: boolean }>`\n height: 100%;\n border-radius: ${({ $preview }) => ($preview ? '10px' : '10px 0 0 10px')};\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0.5rem;\n`;\n\nconst Box = styled.div`\n width: 4rem;\n height: 4rem;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n`;\n\nconst IconContainer = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n`;\n\nexport default AchievementIcon;\n","import styled from 'styled-components';\nimport { ThemeColorsKeys } from '@aclito/shared/theme/colors';\n\ninterface ProgressBarProps {\n currentProgressValue: number;\n totalProgressValue: number | undefined;\n color?: ThemeColorsKeys;\n}\n\nconst ProgressBar = ({\n currentProgressValue,\n totalProgressValue,\n color = 'primary',\n}: ProgressBarProps) => {\n return (\n \n {!!totalProgressValue && (\n \n )}\n \n );\n};\n\nconst ProgressBarContainer = styled.div`\n width: 70%;\n height: 1rem;\n background-color: ${({ theme }) => theme.grey10};\n border-radius: 8px;\n`;\n\nconst ProgressBarFiller = styled.div<{\n $current: number;\n $total: number;\n $color: ThemeColorsKeys;\n}>`\n width: ${(props) => `min(${(props.$current / props.$total) * 100}%, 100%)`};\n height: 100%;\n background-color: ${({ theme, $color }) => theme[$color]};\n border-radius: inherit;\n`;\n\nexport default ProgressBar;\n","import { useTheme } from 'styled-components';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { AchievementCardProps } from '@aclito/shared/types';\n\nimport { BasicCard } from '../components/CardStyles';\nimport { HStack, VStack } from '../components/Layout';\nimport { Text } from '../components/Text';\n\nimport AchievementIcon from './AchievementIcon';\nimport ProgressBar from './ProgressBar';\n\nconst AchievementCard = ({\n title,\n description,\n currentProgress,\n totalProgress,\n level,\n icons,\n unlocked,\n classic,\n}: AchievementCardProps) => {\n const locale = useAppSelector(commonSelectors.locale);\n\n const theme = useTheme();\n const backgroundColor = classic\n ? theme.primary\n : theme[`achievement${level}`];\n return (\n \n \n \n \n \n {title[locale]}\n \n \n \n {description[locale]}\n \n \n {!classic && (\n \n \n \n {currentProgress}/{totalProgress}\n \n \n )}\n \n \n \n );\n};\n\nexport default AchievementCard;\n","import { Grid } from '@mantine/core';\nimport {\n useGetAchievementsQuery,\n useGetUserAchievementsByUserIdQuery,\n} from '@aclito/shared/redux/api/achievementApi';\nimport { createDataForAchievementsCards } from '@aclito/shared/features/goals/utils';\nimport AchievementIcon from '@aclito/ui-web/achievements/AchievementIcon';\nimport { useLocation } from 'react-router-dom';\nimport HStack from '@aclito/ui-web/components/Layout/HStack';\nimport styled, { useTheme } from 'styled-components';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport AchievementCard from '@aclito/ui-web/achievements/AchievementCard';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport { AchievementCardData } from '@aclito/shared/features/goals/utils/createDataForAchievementCards';\n\nimport GridColumn from '@/components/Cards/GridColumn';\n\ntype AchievementProps = {\n id: string;\n aliasId?: string;\n orgId?: string;\n preview?: boolean;\n onClick?: (value: AchievementCardData) => void;\n};\n\nconst Achievements = ({\n id,\n aliasId,\n preview,\n orgId,\n onClick,\n}: AchievementProps) => {\n const { search } = useLocation();\n const query = new URLSearchParams(search);\n\n const myAliasId = query.get('aliasId') || aliasId;\n\n const {\n data: achievements,\n isFetching: isFetchingAchievements,\n isUninitialized,\n isSuccess,\n } = useGetAchievementsQuery(orgId ?? 'none');\n\n const { data: userAchievements, isFetching: isFetchingUserAchievements } =\n useGetUserAchievementsByUserIdQuery({ id, orgId });\n\n const theme = useTheme();\n\n return (\n <>\n {preview ? (\n \n {!isFetchingAchievements &&\n !isFetchingUserAchievements &&\n createDataForAchievementsCards(\n achievements,\n userAchievements,\n myAliasId,\n ).map((achievement) => (\n
\n \n
\n ))}\n
\n ) : (\n \n {onClick && !!achievements?.length && (\n \n \n \n \n )}\n \n {!isFetchingAchievements &&\n !isFetchingUserAchievements &&\n createDataForAchievementsCards(\n achievements,\n userAchievements,\n myAliasId,\n ).map((achievement) => (\n \n {onClick ? (\n onClick(achievement)}>\n \n \n ) : (\n \n )}\n \n ))}\n \n {!achievements?.length && !isUninitialized && isSuccess && orgId && (\n \n \n \n )}\n \n )}\n \n );\n};\n\nconst StyledCard = styled.div`\n transition: transform 200ms ease-in-out;\n &:hover {\n cursor: pointer;\n transform: scale(1.02);\n }\n`;\n\nexport default Achievements;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { useProfile } from '@aclito/shared/features/profile/hooks/useProfile';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useNavigate } from 'react-router-dom';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\nimport { Space } from '@mantine/core';\n\nimport { MyProfileTabType } from './types';\n\nimport {\n SectionGrid,\n VStack,\n TitleBar,\n ActionButton,\n Title,\n Tab,\n Tabs,\n SectionTitle,\n Icon,\n HStack,\n InlineTooltip,\n EmptyList,\n} from '@/components';\nimport { ROUTE_GOALS, ROUTE_PROFILE_EDIT } from '@/util/constants';\nimport EventsCards from '@/components/Cards/EventsCards';\nimport AboutUserSection from '@/common/Profile/AboutUserSection';\nimport Reviews from '@/common/Profile/Reviews';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\nimport { AboutUserMain } from '@/common/Profile';\nimport Achievements from '@/features/goals/Achievements';\n\nconst Profile: React.FC = () => {\n const navigation = useNavigate();\n\n const { user, stats, pastEvents } = useProfile();\n const [tabIndex, setTabIndex] = useState(MyProfileTabType.INFO);\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const [showTooltipModal] = useShowTooltipModal('profileTooltip');\n const nav = useNavigate();\n\n const handleNavigation = () => {\n navigation(ROUTE_PROFILE_EDIT);\n };\n\n const handleNavigationToGoals = (userId: string) => {\n nav(ROUTE_GOALS + `/${userId}`);\n };\n\n const handleTabChange = (val: string) =>\n val === '0'\n ? setTabIndex(MyProfileTabType.INFO)\n : setTabIndex(MyProfileTabType.HISTORY);\n\n return (\n \n \n \n \n <Icon icon={'info'} color={'primary'} onClick={showTooltipModal} />\n </HStack>\n {isFlexWrapped || queryMobile ? (\n <ActionButton onClick={handleNavigation} iconType={'edit'} />\n ) : (\n <ActionButton\n iconType={'edit'}\n onClick={handleNavigation}\n tx={'tooltip.edit'}\n />\n )}\n </TitleBar>\n\n {user && stats && (\n <AboutUserMain {...{ userInfo: user, stats, myProfile: true }} />\n )}\n\n <Tabs\n style={{ paddingBottom: 16 }}\n selectedIndex={tabIndex === MyProfileTabType.INFO ? '0' : '1'}\n setSelectedIndex={handleTabChange}\n >\n <Tab tx=\"tabs.info\" />\n <Tab tx=\"tabs.history\" />\n </Tabs>\n\n <>\n {tabIndex === MyProfileTabType.INFO && (\n <Container>\n {user && (\n <AboutUserSection\n {...{ userInfo: user, stats, myProfile: true }}\n />\n )}\n <SectionTitle\n onClick={() => handleNavigationToGoals(user.id)}\n buttonLabelTx=\"tabs.achievements\"\n />\n <Achievements preview id={user.id} />\n <Reviews id={user.id} isReviewHidden={true} />\n </Container>\n )}\n\n {tabIndex === MyProfileTabType.HISTORY && (\n <Container>\n <InlineTooltip\n txTitle={'tooltip.history.title'}\n txBody={'tooltip.history'}\n />\n <MyActivities>\n {pastEvents.length ? (\n <EventsCards data={pastEvents} />\n ) : (\n <>\n <Space h={24} />\n <EmptyList\n iconType={'calendar'}\n tx={'flashlist.no.pastevents'}\n />\n </>\n )}\n </MyActivities>\n </Container>\n )}\n </>\n </SectionGrid>\n );\n};\n\nconst MyActivities = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1;\n\n .body {\n display: grid;\n grid-template-columns: repeat(2, min-content);\n gap: 24px;\n }\n`;\n\nconst Container = styled(VStack)`\n display: flex;\n`;\n\nexport default Profile;\n","/* eslint-disable no-restricted-syntax */\nimport {\n Location,\n useLocation as RRDUseLocation,\n useSearchParams,\n} from 'react-router-dom';\n\nexport interface TypedLocation<T, K = {}>\n extends Partial<Omit<Location, 'state'>> {\n state?: T;\n query?: K;\n}\nexport const useLocation = <T, K = {}>(): TypedLocation<T, K> => {\n const { state, ...location } = RRDUseLocation();\n const [params] = useSearchParams();\n const paramObject = {} as K;\n params.forEach((value, key) => {\n paramObject[key as keyof K] = value as K[keyof K];\n });\n const typedState = state as T;\n\n return { state: typedState, query: paramObject, ...location };\n};\n","import { useEffect } from 'react';\n\nexport function useOnClickOutside<T extends Element | null>(\n refsToIgnore: React.RefObject<T>[],\n handler: (event: MouseEvent | TouchEvent) => void,\n) {\n useEffect(\n () => {\n const listener = (event: MouseEvent | TouchEvent) => {\n for (let i = 0; i < refsToIgnore.length; i++) {\n // Do nothing if clicking ref's element or descendent elements\n if (\n refsToIgnore[i].current &&\n refsToIgnore[i].current?.contains(event.target as Node)\n ) {\n return;\n }\n }\n handler(event);\n };\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n },\n // Add ref and handler to effect dependencies\n // It's worth noting that because the passed-in handler is a new ...\n // ... function on every render that will cause this effect ...\n // ... callback/cleanup to run every render. It's not a big deal ...\n // ... but to optimize you can wrap handler in useCallback before ...\n // ... passing it into this hook.\n [refsToIgnore, handler],\n );\n}\n\nexport default useOnClickOutside;\n","import { FC } from 'react';\n\nimport { useLocation } from '../hooks';\n\nconst withRouter = <T extends object>(Component: FC<T>): FC<T> => {\n const Router: FC<T> = (props) => {\n const { key, ...location } = useLocation<T>();\n\n if (location.state === undefined) {\n location.state = {} as T;\n }\n\n return <Component {...(props as T)} {...location} />;\n };\n return Router;\n};\nexport default withRouter;\n","import dayjs from 'dayjs';\n\nexport const compareByMonth = (fstDate: Date, sndDate: Date) =>\n dayjs(fstDate).month() === dayjs(sndDate).month();\n\nexport const compareByDay = (fstDate: Date, sndDate: Date) =>\n dayjs(fstDate).date() === dayjs(sndDate).date();\n\nexport const compareByYear = (fstDate: Date, sndDate: Date) =>\n dayjs(fstDate).year() === dayjs(sndDate).year();\n\nexport const compareByMonthAndYear = (fstDate: Date, sndDate: Date) =>\n compareByMonth(fstDate, sndDate) && compareByYear(fstDate, sndDate);\n\nexport const compareByMonthAndDayAndYear = (fstDate: Date, sndDate: Date) =>\n compareByMonthAndYear(fstDate, sndDate) && compareByDay(fstDate, sndDate);\n","import { EventWithDateObject } from '@aclito/shared/types';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { Indicator } from '@mantine/core';\nimport dayjs from 'dayjs';\nimport React from 'react';\nimport styled from 'styled-components';\n\nimport { HStack, VStack } from '@/components';\n\ninterface CalendarDayProps {\n date: Date;\n eventsByDay: EventWithDateObject[];\n selectedDay: Date | undefined;\n onDayClick: (date: Date) => void;\n}\n\nconst CalendarDay: React.FC<CalendarDayProps> = ({\n date,\n selectedDay,\n eventsByDay,\n onDayClick,\n}) => {\n const day = date.getDate();\n const handleClick = () => {\n onDayClick(date);\n };\n\n return (\n <SelectedCalendarDay\n isCurrent={dayjs().startOf('D').diff(dayjs(date)) === 0}\n isSelected={dayjs(selectedDay).diff(dayjs(date)) === 0}\n onClick={handleClick}\n spacing={6}\n align=\"center\"\n >\n <div>{day}</div>\n <HStack spacing={8}>\n {eventsByDay.length > 0 &&\n (eventsByDay.length > 3 ? (\n <Indicator size={6} color=\"red\" children={null} />\n ) : (\n eventsByDay.map((e) => (\n <Indicator\n key={e.id}\n size={6}\n color={cardColorPicker(e.activityType)}\n children={null}\n />\n ))\n ))}\n </HStack>\n </SelectedCalendarDay>\n );\n};\n\nconst SelectedCalendarDay = styled(VStack)<{\n isSelected: boolean;\n isCurrent: boolean;\n}>`\n background-color: ${({ isSelected, isCurrent, theme }) =>\n isSelected ? theme.primary : isCurrent ? theme.primary10 : 'transparent'};\n border-radius: 6px;\n padding: 10px;\n color: ${({ isSelected, theme }) => isSelected && theme.whiteText};\n`;\n\nexport default CalendarDay;\n","import { Calendar, CalendarProps } from '@mantine/dates';\nimport React, { useEffect, useState } from 'react';\nimport { EventWithDateObject, FormattedEvent } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport styled, { useTheme } from 'styled-components';\nimport {\n compareByMonthAndDayAndYear,\n compareByMonthAndYear,\n} from '@aclito/shared/util/compareDates';\nimport dayjs from 'dayjs';\n\nimport EventsCards from '../Cards/EventsCards';\n\nimport CalendarDay from './components/CalendarDay';\n\nimport { Text, Icon, HStack, VStack } from '@/components';\nimport { formatEventWithDate } from '@/util/formatEventWithDateObject';\ninterface MobileCalendarProps extends Omit<CalendarProps, 'onClick'> {\n events: EventWithDateObject[];\n onClick?: (event: FormattedEvent) => void;\n topBarElement?: React.ReactNode;\n}\n\nconst MobileCalendar: React.FC<MobileCalendarProps> = ({\n events,\n onClick,\n topBarElement,\n ...props\n}) => {\n const t = useTranslate();\n\n const [showCal, setShowCal] = useState(true);\n const [filteredEvents, setFilteredEvents] =\n useState<EventWithDateObject[]>(events);\n const [selectedDay, setSelectedDay] = useState<Date>();\n\n const theme = useTheme();\n\n const handleShowCal = () => {\n setShowCal(!showCal);\n };\n\n const onDateChange = (date: Date) => {\n const filtered = events.filter((event) =>\n compareByMonthAndYear(event.date, date),\n );\n\n setFilteredEvents(filtered);\n };\n\n const filterEventsByDay = (date: Date) =>\n events.filter((event) => compareByMonthAndDayAndYear(event.date, date));\n\n useEffect(() => {\n onDayClick(dayjs().startOf('D').toDate());\n }, [events]);\n\n const onDayClick = (date: Date) => {\n setFilteredEvents(filterEventsByDay(date));\n setSelectedDay(date);\n };\n\n return (\n events && (\n <VStack bg={theme.background} p={3}>\n <TopBar repeat={topBarElement ? 3 : 2} onClick={handleShowCal}>\n <Text\n style={{\n justifySelf: 'start',\n }}\n color={theme.text}\n text={'Calendar'}\n weight={500}\n />\n {topBarElement}\n <Icon\n style={{\n justifySelf: 'end',\n }}\n size={14}\n icon={showCal ? 'caretUp' : 'caretDown'}\n />\n </TopBar>\n {showCal && (\n <Calendar\n onPointerEnterCapture={() => {\n return;\n }}\n onPointerLeaveCapture={() => {\n return;\n }}\n placeholder={''}\n onDateChange={onDateChange}\n styles={{\n month: {\n width: '100%',\n height: '30vh',\n },\n monthCell: {\n textAlign: 'center',\n verticalAlign: 'middle',\n },\n calendarHeader: {\n margin: 'auto',\n },\n calendarHeaderLevel: {\n color: theme.text,\n ':hover': {\n background: theme.grey10,\n },\n },\n calendarHeaderControl: {\n color: theme.text,\n ':hover': {\n background: theme.grey10,\n },\n },\n day: {\n color: theme.black,\n ':hover': {\n background: theme.grey10,\n },\n },\n }}\n {...props}\n renderDay={(date) => (\n <CalendarDay\n {...{\n date,\n eventsByDay: filterEventsByDay(date),\n selectedDay,\n onDayClick,\n }}\n />\n )}\n />\n )}\n <EventsCards\n data={filteredEvents.map((e) => formatEventWithDate(e, t))}\n showDateType=\"day\"\n onClick={onClick}\n />\n </VStack>\n )\n );\n};\n\nconst TopBar = styled(HStack)<{ repeat: number }>`\n display: inline-grid;\n grid-template-columns: ${({ repeat }) => `repeat(${repeat}, 1fr)`};\n width: 100%;\n height: 4.5vh;\n padding: 0 7%;\n background-color: ${({ theme }) => theme.grey10};\n`;\n\nexport default MobileCalendar;\n","import { ROUTE_EMBEDDED_CALENDAR } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useEmbed = () => {\n const { openModal } = useModal();\n\n const makeUrl = (orgId: string) =>\n `${window.location.protocol}//${window.location.host}${ROUTE_EMBEDDED_CALENDAR}?orgId=${orgId}`;\n\n const embedModal = async (orgId: string) => {\n const url = makeUrl(orgId);\n openModal({\n txTitle: 'calendar.embed',\n type: 'embedCal',\n values: { url },\n });\n };\n\n return { embedModal };\n};\n","import { Event } from '@aclito/entities';\nimport { eventClient, publicClient } from '@aclito/client';\n\nimport { aclitoApi } from '../api';\nimport { handleError } from '../utils/handleError';\n\nexport const SEARCH_CALENDAR_EVENTS = 'searchCalendarEvents';\nexport const SEARCH_EMBEDDED_CALENDAR_EVENTS = 'searchEmbeddedCalendarEvents';\n\nexport const calendarEventsApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [SEARCH_CALENDAR_EVENTS]: builder.query<\n Event[],\n { viewStartDate?: string; viewEndDate?: string; orgId: string }\n >({\n queryFn: async ({ viewStartDate, viewEndDate, orgId }) => {\n try {\n const data = await eventClient.events.getEventsByOrg(orgId, {\n startDate: viewStartDate,\n endDate: viewEndDate,\n });\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [SEARCH_EMBEDDED_CALENDAR_EVENTS]: builder.query<\n Event[],\n { viewStartDate?: string; viewEndDate?: string; orgId: string }\n >({\n queryFn: async ({ viewStartDate, viewEndDate, orgId }) => {\n try {\n const data = await publicClient.public.calendar(orgId, {\n startDate: viewStartDate,\n endDate: viewEndDate,\n });\n\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const {\n useSearchCalendarEventsQuery,\n useSearchEmbeddedCalendarEventsQuery,\n} = calendarEventsApi;\n","import { EventWithDateObject } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport dayjs from 'dayjs';\nimport { useMemo, useState } from 'react';\nimport { debounce } from '@aclito/shared/util/debounce';\nimport { View, Views } from 'react-big-calendar';\nimport {\n useSearchCalendarEventsQuery,\n useSearchEmbeddedCalendarEventsQuery,\n} from '@aclito/shared/redux/api/calendarEventsApi';\nimport { Event } from '@aclito/entities';\n\ntype Range = Date[] | { start: Date; end: Date };\n\nexport const useCalendar = (orgId: string, isPublic = false) => {\n const t = useTranslate();\n const offsetMonthViewDate = (date: Date, end = false) =>\n end\n ? dayjs(date).endOf('month').add(1, 'week').endOf('day')\n : dayjs(date).startOf('month').subtract(1, 'week').startOf('day');\n\n const [viewStartDate, setViewStartDate] = useState<string>(\n offsetMonthViewDate(new Date()).toISOString(),\n );\n const [viewEndDate, setViewEndDate] = useState<string>(\n offsetMonthViewDate(new Date(), true).toISOString(),\n );\n\n const { data: events, isFetching } = useSearchCalendarEventsQuery(\n {\n viewStartDate,\n viewEndDate,\n orgId,\n },\n { skip: isPublic },\n );\n\n const { data: publicEvents, isLoading } =\n useSearchEmbeddedCalendarEventsQuery(\n {\n viewStartDate,\n viewEndDate,\n orgId,\n },\n { skip: !isPublic || !orgId },\n );\n\n const handleNavigate = (newDate: Date, view: View) => {\n let startDate;\n let endDate;\n switch (view) {\n case Views.MONTH:\n startDate = offsetMonthViewDate(newDate);\n endDate = offsetMonthViewDate(newDate, true);\n break;\n case Views.WEEK:\n startDate = dayjs(newDate).startOf('week');\n endDate = dayjs(newDate).endOf('week');\n break;\n case Views.DAY:\n startDate = dayjs(newDate).startOf('day');\n endDate = dayjs(newDate).endOf('day');\n break;\n default:\n startDate = dayjs();\n endDate = dayjs();\n break;\n }\n\n setViewStartDate(startDate.toISOString());\n setViewEndDate(endDate.toISOString());\n };\n\n const handleRangeChange = (range: Range, view?: View) => {\n if (!view) {\n return;\n }\n\n let startDate;\n let endDate;\n switch (view) {\n case Views.MONTH: {\n const { start, end } = range as { start: Date; end: Date };\n startDate = offsetMonthViewDate(start);\n endDate = offsetMonthViewDate(end, true);\n break;\n }\n\n case Views.WEEK: {\n const weekRange = range as Date[];\n startDate = dayjs(weekRange[0]).startOf('day');\n endDate = dayjs(weekRange[weekRange.length - 1]).endOf('day');\n break;\n }\n case Views.DAY: {\n const [dayStart] = range as Date[];\n startDate = dayjs(dayStart).startOf('day');\n endDate = dayjs(dayStart).endOf('day');\n break;\n }\n default:\n startDate = dayjs();\n endDate = dayjs();\n break;\n }\n\n setViewStartDate(startDate.toISOString());\n setViewEndDate(endDate.toISOString());\n };\n\n const debouncedNavigate = useMemo(() => debounce(handleNavigate, 300), []);\n\n const debouncedRangeChange = useMemo(\n () => debounce(handleRangeChange, 300),\n [],\n );\n\n const mapEvent = (event: Event): EventWithDateObject => ({\n ...event,\n ...formatEvent(event, t),\n date: new Date(event.date),\n endDate: new Date(event.endDate),\n });\n\n const mappedEvents: EventWithDateObject[] = (\n isPublic ? publicEvents ?? [] : events ?? []\n )\n .filter((event) => dayjs(event.endDate) > dayjs())\n .map((event) => mapEvent(event));\n\n return {\n mappedEvents,\n debouncedNavigate,\n debouncedRangeChange,\n isFetching: isFetching || isLoading,\n };\n};\n","import styled from 'styled-components';\n\nexport const CalendarStyleWrapper = styled.div`\n height: 800px;\n & .rbc-header,\n & .rbc-label,\n & .rbc-date-cell {\n color: ${({ theme }) => theme.black};\n }\n\n & .rbc-header.rbc-today {\n color: white;\n background: ${({ theme }) => theme.primary};\n }\n\n & .rbc-today.rbc-day-bg {\n background: ${({ theme }) => theme.primary10};\n }\n\n & .rbc-day-bg,\n & .rbc-time-slot {\n background: ${({ theme }) => theme.white};\n }\n\n & .rbc-time-content > * + * > *,\n & .rbc-day-bg + .rbc-day-bg {\n border-left: 1px solid ${({ theme }) => theme.grey20};\n }\n\n & .rbc-timeslot-group {\n border-bottom: 1px solid ${({ theme }) => theme.grey20};\n }\n\n & .rbc-time-content {\n border-top: 2px solid ${({ theme }) => theme.grey20};\n }\n & .rbc-day-slot .rbc-time-slot {\n border-top: 1px solid ${({ theme }) => theme.grey10};\n }\n & .rbc-day-slot .rbc-time-slot:first-child {\n border-top: unset;\n }\n & .rbc-event {\n background: unset;\n padding: unset;\n border-radius: unset;\n min-height: unset !important;\n border: unset;\n }\n & .rbc-event:focus {\n outline: 1px solid ${({ theme }) => theme.primary};\n }\n`;\n","import dayjs from 'dayjs';\n\nexport const formattedWeekDate = (monthDate: Date) => {\n const formatStart = dayjs(monthDate).startOf('isoWeek').format(`MMM DD/MM`);\n const formatEndSameMonth = `${dayjs(monthDate)\n .endOf('isoWeek')\n .format(`DD/MM`)}`;\n const formatEndDifferentMonth = `${dayjs(monthDate)\n .endOf('isoWeek')\n .format(`MMM DD/MM`)}`;\n const formatYear = `${dayjs(monthDate).endOf('isoWeek').format('YYYY')}`;\n\n return `${\n dayjs(monthDate).startOf('isoWeek').get('month') ===\n dayjs(monthDate).endOf('isoWeek').get('month')\n ? `${formatStart} - ${formatEndSameMonth} ${formatYear}`\n : `${formatStart} - ${formatEndDifferentMonth} ${formatYear}`\n }`;\n};\n","import dayjs from 'dayjs';\nimport { useState } from 'react';\nimport { ToolbarProps, View, Navigate } from 'react-big-calendar';\nimport styled from 'styled-components';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport { EventWithDateObject } from '@aclito/shared/types';\n\nimport { ActionButton, HStack, Button, Select, Title } from '@/components';\nimport { formattedWeekDate } from '@/util/formattedWeekDate';\n\nconst CustomToolbar = ({\n onView,\n date,\n onNavigate,\n}: ToolbarProps<EventWithDateObject>) => {\n const [tabIndex, setTabIndex] = useState('0');\n const goToView = (timeFormat: View) => {\n onView(timeFormat);\n };\n const goToBack = () => {\n onNavigate(Navigate.PREVIOUS);\n };\n\n const goToNext = () => {\n onNavigate(Navigate.NEXT);\n };\n\n const goToToday = () => {\n onNavigate(Navigate.TODAY);\n };\n\n const tDate = useTranslateDate();\n\n const handleTabIndexChange = (index: string) => {\n setTabIndex(index);\n switch (index) {\n case '0':\n goToView('month');\n break;\n case '1':\n goToView('week');\n break;\n\n case '2':\n goToView('day');\n break;\n default:\n return null;\n }\n return null;\n };\n\n const dateFormat = (index: string) => {\n switch (index) {\n case '0':\n return tDate(dayjs(date).toISOString(), 'date.calendar.year');\n case '1':\n return formattedWeekDate(date);\n case '2':\n return tDate(dayjs(date).toISOString(), 'date.calendar.day');\n default:\n return null;\n }\n };\n\n const t = useTranslate();\n return (\n <ToolBar>\n <Select\n clearable={false}\n value={tabIndex}\n onChange={handleTabIndexChange}\n options={[\n { id: '0', item: t('calendar.month') },\n { id: '1', item: t('calendar.week') },\n { id: '2', item: t('calendar.day') },\n ]}\n />\n\n <Title text={dateFormat(tabIndex) || undefined} />\n <StyledButtonBox>\n <HStack spacing={8}>\n <ActionButton\n iconType=\"leftArrow\"\n data-testid=\"leftArrow\"\n onClick={goToBack}\n />\n <ActionButton\n iconType=\"rightArrow\"\n data-testid=\"rightArrow\"\n onClick={goToNext}\n />\n <TodayButton tx=\"calendar.today\" onClick={goToToday} />\n </HStack>\n </StyledButtonBox>\n </ToolBar>\n );\n};\n\nconst TodayButton = styled(Button)`\n font-size: 16px;\n border-radius: 10px;\n height: 100%;\n :hover {\n opacity: 0.95;\n }\n` as typeof Button;\n\nconst ToolBar = styled(HStack)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n`;\n\nconst StyledButtonBox = styled.div`\n display: flex;\n`;\n\nexport default CustomToolbar;\n","import styled from 'styled-components';\nimport dayjs from 'dayjs';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { EventWithDateObject } from '@aclito/shared/types';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { EventProps } from 'react-big-calendar';\n\nimport { IconSelect } from '@/components';\n\nconst EventComponent = ({ event }: EventProps<EventWithDateObject>) => {\n const sportColor = cardColorPicker(event.activityType);\n\n const mqLaptop = useMediaQuery(deviceMax.laptop);\n\n return (\n <StyledLine $sportColor={sportColor}>\n <StyledBox>\n <StyledTime>{dayjs(event.date).format('H:mm')} </StyledTime>\n <StyledText>{event.name}</StyledText>\n </StyledBox>\n <IconSelect\n iconSize={mqLaptop ? 12 : 16}\n iconColor={cardColorPicker(event.activityType)}\n type={event.activityType}\n style={styleIconSelect}\n />\n </StyledLine>\n );\n};\n\nconst styleIconSelect: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n};\n\nconst StyledLine = styled.span<{ $sportColor: string }>`\n display: flex;\n justify-content: space-between;\n color: ${(props) => props.$sportColor};\n background: ${(props) => `${props.$sportColor}26`};\n transition: transform 0.3s ease-in-out;\n border-left: ${(props) => `solid 8px ${props.$sportColor}`};\n @media ${deviceMax.desktop} {\n border-left: ${(props) => `solid 6px ${props.$sportColor}`};\n }\n @media ${deviceMax.laptop} {\n border-left: ${(props) => `solid 4px ${props.$sportColor}`};\n }\n`;\n\nconst StyledBox = styled.span`\n display: flex;\n gap: 4px;\n @media ${deviceMax.tablet} {\n gap: 2px;\n }\n`;\n\nconst StyledText = styled.span`\n font-weight: 700;\n width: 50%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n @media ${deviceMax.desktop} {\n font-size: 12px;\n }\n`;\nconst StyledTime = styled.span`\n @media ${deviceMax.desktop} {\n font-size: 12px;\n }\n`;\n\nexport default EventComponent;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { EventWithDateObject } from '@aclito/shared/types';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { HStack, IconSelect } from '@/components';\n\ninterface WeekComponentProps {\n event: EventWithDateObject;\n}\n\nconst OPACITY = 26;\n\nconst WeekComponent: React.FC<WeekComponentProps> = ({ event }) => {\n const sportColor = cardColorPicker(event.activityType);\n\n const mqLaptop = useMediaQuery(deviceMax.laptop);\n\n return (\n <StyledContainer sportColor={sportColor} spacing={4}>\n <IconSelect\n iconSize={mqLaptop ? 8 : 16}\n iconColor={cardColorPicker(event.activityType)}\n type={event.activityType}\n style={styleIconSelect}\n ></IconSelect>\n <StyledName>{event.name}</StyledName>\n </StyledContainer>\n );\n};\n\nconst styleIconSelect: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n};\n\nconst StyledContainer = styled(HStack)<{ sportColor: string }>`\n color: ${(props) => props.sportColor};\n padding: 8px;\n background-color: ${(props) => `${props.sportColor}${OPACITY}`};\n border-left: ${(props) => `solid 8px ${props.sportColor}`};\n height: 100%;\n flex-wrap: nowrap;\n @media ${deviceMax.desktop} {\n height: 80%;\n border-left: ${(props) => `solid 6px ${props.sportColor}`};\n }\n @media ${deviceMax.laptop} {\n height: 70%;\n }\n @media ${deviceMax.tablet} {\n height: 60%;\n border-left: ${(props) => `solid 4px ${props.sportColor}`};\n }\n`;\n\nconst StyledName = styled.span`\n font-family: Roboto, sans-serif;\n font-weight: 700;\n font-size: 16px;\n @media ${deviceMax.desktop} {\n font-size: 12px;\n }\n @media ${deviceMax.laptop} {\n font-size: 10px;\n }\n @media ${deviceMax.tablet} {\n font-size: 8px;\n }\n`;\n\nexport default WeekComponent;\n","import { Components, EventProps } from 'react-big-calendar';\nimport { EventWithDateObject } from '@aclito/shared/types';\nimport dayjs from 'dayjs';\n\nimport CustomToolBar from './components/CustomToolBar';\nimport EventComponent from './components/EventComponent';\n\nimport SlotComponent from '@/common/Calendar/components/SlotComponent';\n\nexport const components: Components<EventWithDateObject> = {\n toolbar: CustomToolBar,\n day: {\n event: (props: EventProps<EventWithDateObject>) => (\n <SlotComponent {...props} />\n ),\n },\n week: {\n header: (p) => <span>{dayjs(p.date).format('dddd').substring(0, 3)}</span>,\n event: (props: EventProps<EventWithDateObject>) => (\n <SlotComponent {...props} />\n ),\n },\n month: {\n header: (p) => <span>{dayjs(p.date).format('dddd').substring(0, 3)}</span>,\n event: EventComponent,\n },\n};\n","import { Culture, dayjsLocalizer, Formats } from 'react-big-calendar';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport dayjs from 'dayjs';\nimport sk from 'dayjs/locale/sk';\nimport en from 'dayjs/locale/en';\nimport cs from 'dayjs/locale/cs';\n\nexport const useLocalizer = () => {\n const locale = useAppSelector(commonSelectors.locale);\n const localizer = dayjsLocalizer(dayjs);\n\n const formatFunction = (format: string) => (date: Date, culture?: Culture) =>\n localizer?.format(date, format, culture) ?? '';\n\n const formats: Formats = {\n dateFormat: formatFunction('D.'),\n dayFormat: formatFunction('ddd D.M.'),\n weekdayFormat: formatFunction('ddd D.M.'),\n timeGutterFormat: formatFunction('H:mm'),\n };\n\n const localeRecord = {\n sk,\n cs,\n en,\n };\n\n dayjs.locale({\n // @ts-ignore\n ...localeRecord[locale],\n weekStart: 1,\n });\n\n return { formats, localizer };\n};\n","import React from 'react';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { Loader } from '@mantine/core';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { Calendar as BigCalendar, Views } from 'react-big-calendar';\nimport { EventRaw } from '@aclito/entities';\n\nimport withRouter from '../../navigation/withRouter';\nimport { MobileCalendar } from '../MobileCalendar';\n\nimport { useEmbed } from './hooks/useEmbed';\nimport { useCalendar } from './hooks/useCalendar';\nimport { CalendarProps } from './interface';\nimport './index.css';\nimport { CalendarStyleWrapper } from './CalendarStyleWrapper';\n\nimport {\n BackButton,\n ActionButton,\n HStack,\n SectionGrid,\n TitleBar,\n Title,\n} from '@/components';\nimport { components } from '@/common/Calendar';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useModal } from '@/hooks/useModal';\nimport { useEventInfoHandlers } from '@/features/event/screens/EventInfo/hooks/useEventInfoHandlers';\nimport { useLocalizer } from '@/components/Calendar/hooks/useLocalizer';\n\nconst Calendar: React.FC<CalendarProps> = ({ state }) => {\n const nav = useNavigate();\n const org = state?.org;\n const {\n handleRedirectToOrg,\n handleRedirectToLeader,\n handleRedirectToEventInfo,\n handleRedirectToMap,\n } = useEventInfoHandlers();\n\n const { embedModal } = useEmbed();\n const { openModal } = useModal();\n\n const { mappedEvents, isFetching, debouncedNavigate, debouncedRangeChange } =\n useCalendar(org?.id ?? '');\n const { formats, localizer } = useLocalizer();\n\n const mqTabletS = useMediaQuery(deviceMax.tabletS);\n\n return org ? (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton onClick={() => nav(-1)} />\n <Title text={org.name} />\n </HStack>\n {isFetching ? <Loader /> : null}\n <ActionButton iconType=\"share\" onClick={() => embedModal(org.id)} />\n </TitleBar>\n {mqTabletS ? (\n <MobileCalendar\n onMonthSelect={(date) => debouncedNavigate(date, Views.MONTH)}\n onNextMonth={(date) => debouncedNavigate(date, Views.MONTH)}\n onPreviousMonth={(date) => debouncedNavigate(date, Views.MONTH)}\n events={mappedEvents}\n />\n ) : (\n <CalendarStyleWrapper>\n {/*@ts-ignore*/}\n <BigCalendar\n formats={formats}\n localizer={localizer}\n {...{\n events: mappedEvents,\n startAccessor: 'date',\n endAccessor: 'endDate',\n components,\n onNavigate: debouncedNavigate,\n onRangeChange: debouncedRangeChange,\n onSelectEvent: (event: EventRaw) => {\n openModal({\n withCloseButton: false,\n size: 'auto',\n padding: 0,\n type: 'calModal',\n values: {\n id: event.id,\n navigation: handleRedirectToEventInfo,\n handleRedirectToLeader,\n handleRedirectToOrg,\n handleRedirectToMap,\n },\n });\n },\n }}\n />\n </CalendarStyleWrapper>\n )}\n </SectionGrid>\n ) : (\n <Title tx=\"error\" />\n );\n};\n\nexport default withRouter(Calendar);\n","import type { UserInfo } from '@aclito/entities';\n\nimport { config } from '../../../config';\n\nimport { ActivitiesKey, ProfileInfoForm, txFn } from '@aclito/shared/types';\nimport {\n getById,\n getByIdTranslate,\n translate,\n} from '@aclito/shared/util/selectObject';\nimport { RESERVED_USER_NAME } from '@aclito/shared/util/constants';\n\nconst { age, activities, gender, allLanguages } = config;\nexport const composeInitialEditValues = (\n t: txFn,\n currentUser: UserInfo,\n): ProfileInfoForm => ({\n age:\n currentUser.age === age.unknown.id\n ? getByIdTranslate(currentUser?.age, age, t)\n : getById(currentUser?.age, age),\n gender: getByIdTranslate(currentUser?.gender, gender.signup, t),\n image: currentUser?.image,\n languages: currentUser?.languages.length\n ? currentUser.languages.map((l) => ({\n item: allLanguages[l].name,\n id: l,\n }))\n : [],\n name: currentUser?.name === RESERVED_USER_NAME ? '' : currentUser.name,\n activities: currentUser?.activities.length\n ? translate(\n currentUser.activities.map((s) => ({\n item: activities[s as ActivitiesKey].item,\n id: s,\n })),\n t,\n )\n : [],\n surname:\n currentUser?.surname === RESERVED_USER_NAME ? '' : currentUser.surname,\n description: currentUser?.description || '',\n file: undefined,\n});\n","import { colors } from '@aclito/shared/theme/colors';\n\nimport { Text } from '@/components';\n\nconst MapGuide = () => {\n return (\n <Text\n align=\"center\"\n style={{\n color: colors.grey50,\n }}\n tx=\"tooltip.map.guide\"\n />\n );\n};\n\nexport default MapGuide;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { profileActions } from '@aclito/shared/redux/slices';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { debounce } from '@aclito/shared/util/debounce';\nimport { GoogleMap, useJsApiLoader } from '@react-google-maps/api';\nimport { useMemo, useRef, useState } from 'react';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { locationSelectors } from '@aclito/shared/redux/slices/locationSlice';\nimport { LocationInput } from '@aclito/entities';\n\nimport { MAP_API_KEY } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useDefaultLocation = () => {\n const isLoading = useAppSelector(profileSelectors.isLoadingLocation);\n const userLocation = useAppSelector(locationSelectors.userLocation);\n const dispatch = useAppDispatch();\n\n const { openModal } = useModal();\n\n const [mapLocation, setMapLocation] = useState<LocationInput>(userLocation);\n const mapRef = useRef<GoogleMap>(null);\n\n const { isLoaded: isMapLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n\n const confirmMapLocation = () => {\n if (mapLocation) {\n dispatch(profileActions.addLocationAsync({ location: mapLocation }));\n }\n };\n\n const handleUpdateLocation = () => {\n confirmMapLocation();\n };\n const handleCenterChanged = useMemo(\n () =>\n debounce((region: LocationInput) => {\n setMapLocation(region);\n }, 100),\n [],\n );\n const getLocation = () => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition, showError);\n } else {\n locationNotAllowed();\n }\n };\n\n const showPosition = (position: GeolocationPosition) => {\n mapRef.current?.state.map?.panTo({\n lat: position.coords.latitude,\n lng: position.coords.longitude,\n });\n };\n\n const locationNotAllowed = () => {\n openModal({ txTitle: 'location.notallowed' });\n };\n\n const showError = (error: GeolocationPositionError) => {\n switch (error.code) {\n case error.PERMISSION_DENIED:\n locationNotAllowed();\n break;\n case error.POSITION_UNAVAILABLE:\n locationNotAllowed();\n break;\n case error.TIMEOUT:\n locationNotAllowed();\n break;\n\n default:\n }\n };\n\n return {\n mapRef,\n isMapLoaded,\n handleUpdateLocation,\n mapLocation,\n handleCenterChanged,\n isLoading,\n getLocation,\n };\n};\n","import { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { GoogleMap, Marker } from '@react-google-maps/api';\nimport React from 'react';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { locationSelectors } from '@aclito/shared/redux/slices/locationSlice';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useTheme } from 'styled-components';\n\nimport MapGuide from '../Maps/MapGuide';\n\nimport { useDefaultLocation } from './hooks/useDefaultLocation';\n\nimport { VStack, HStack, ActionButton, SectionGrid } from '@/components';\nimport { MAP_BORDER_RADIUS } from '@/util/constants';\n\nconst DefaultLocation: React.FC = () => {\n const {\n mapRef,\n isMapLoaded,\n handleCenterChanged,\n handleUpdateLocation,\n getLocation,\n isLoading,\n mapLocation,\n } = useDefaultLocation();\n\n const userLocation = useAppSelector(locationSelectors.userLocation);\n const t = useTranslate();\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const disabled = !mapLocation.lat || !mapLocation.lon;\n const theme = useTheme();\n\n return (\n <SectionGrid\n style={{\n width: '100%',\n }}\n $isOpen={false}\n >\n {isMapLoaded && (\n <>\n <div\n style={{\n display: 'flex',\n justifyContent: queryMobile ? 'center' : 'flex-start',\n }}\n >\n <VStack\n style={{\n width: '100%',\n }}\n spacing={16}\n >\n <VStack\n style={{\n height: '500px',\n }}\n align={'center'}\n justify={'center'}\n >\n <GoogleMap\n ref={mapRef}\n options={{\n streetViewControl: false,\n fullscreenControl: false,\n }}\n onClick={(e) =>\n handleCenterChanged({\n lat: e.latLng?.lat(),\n lon: e.latLng?.lng(),\n })\n }\n mapContainerStyle={mapContainer}\n center={userLocation}\n zoom={7}\n >\n <>\n {userLocation && (\n <Marker\n title={t('current.location')}\n position={userLocation}\n />\n )}\n <Marker\n icon={{\n path: google.maps.SymbolPath.CIRCLE,\n fillColor: theme.primary,\n fillOpacity: 1,\n strokeWeight: 0.5,\n scale: 10,\n }}\n position={{\n lat: mapLocation.lat,\n lng: mapLocation.lon,\n }}\n />\n </>\n </GoogleMap>\n </VStack>\n <MapGuide />\n\n <HStack style={{ justifyContent: 'center' }}>\n <ActionButton\n tx={'center'}\n iconType={'myLocation'}\n onClick={getLocation}\n />\n <ActionButton\n disabled={disabled}\n primary\n loading={isLoading}\n iconType={!isLoading ? 'forward' : undefined}\n onClick={handleUpdateLocation}\n tx=\"location.set\"\n />\n </HStack>\n </VStack>\n </div>\n </>\n )}\n </SectionGrid>\n );\n};\n\nconst mapContainer: React.CSSProperties = {\n width: '100%',\n height: '100%',\n borderRadius: MAP_BORDER_RADIUS,\n};\n\nexport default DefaultLocation;\n","import styled from 'styled-components';\nimport { VStack } from '@aclito/ui-web/components/Layout';\n\nconst FormWrapper = styled(VStack)`\n width: 100%;\n`;\n\nconst FormScreen = styled.div`\n background-color: ${({ theme }) => theme.background};\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n`;\n\nexport { FormScreen, FormWrapper };\n","import { useSelectObject, useTranslate } from '@aclito/shared/hooks';\nimport { Divider } from '@mantine/core';\nimport React, { useState } from 'react';\nimport { ProfileInfoForm } from '@aclito/shared/types';\nimport { config } from '@aclito/shared/config';\nimport { useTheme } from 'styled-components';\nimport { getCommonInputLabelStyle } from '@aclito/ui-web/utils/styles';\n\nimport {\n ValidatedMultiSelect,\n ValidatedSelect,\n ValidatedInput,\n SubmitButton,\n HStack,\n VStack,\n ValidatedTextArea,\n ValidatedDropzone,\n Text,\n Checkbox,\n SmallButton,\n Input,\n Icon,\n Collapsible,\n} from '@/components';\nimport { FormScreen, FormWrapper } from '@/features/profile/styles/styles';\n\ninterface ProfileEditFormProps {\n submit: (values: ProfileInfoForm) => void;\n isLoading: boolean;\n showTac: boolean;\n placeholderName: string;\n placeholderSurname: string;\n toggle: () => void;\n email?: string;\n}\n\nconst ProfileEditForm: React.FC<ProfileEditFormProps> = ({\n submit,\n isLoading,\n showTac = false,\n placeholderName,\n placeholderSurname,\n toggle,\n email,\n}) => {\n const {\n ageOptions,\n translatedGender,\n translatedActivities,\n translatedLanguages,\n } = useSelectObject();\n\n const t = useTranslate();\n const theme = useTheme();\n\n const [tac, setTac] = useState(false);\n const [tacVisible, setTacVisible] = useState(showTac);\n const [pp, setPP] = useState(false);\n const handleCheckboxChangeTac = () => {\n setTac((prev) => !prev);\n };\n const handleCheckboxChangePP = () => {\n setPP((prev) => !prev);\n };\n\n return (\n <FormScreen>\n <FormWrapper>\n <ValidatedInput\n optional\n placeholder={placeholderName}\n txLabel=\"auth.userinfo.name\"\n name=\"name\"\n />\n <ValidatedInput\n optional\n placeholder={placeholderSurname}\n txLabel=\"auth.userinfo.surname\"\n name=\"surname\"\n />\n\n <HStack spacing={4} style={{ width: '100%' }}>\n <Text\n style={{ ...getCommonInputLabelStyle(theme) }}\n tx={'auth.userinfo.location'}\n />\n <SmallButton\n fullWidth\n leftIcon={<Icon icon={'myLocation'} color={'primary'} />}\n textcolor={'primary'}\n tx={'auth.userinfo.setLocation'}\n bg={'primary10'}\n onClick={toggle}\n ></SmallButton>\n </HStack>\n\n <Collapsible\n defaultOpen={false}\n buttonLabelTx={'events.new.advancedOptions'}\n >\n <VStack>\n <ValidatedSelect\n optional\n txLabel=\"auth.userinfo.age\"\n txPlaceholder=\"auth.userinfo.age\"\n name=\"age\"\n options={ageOptions}\n />\n\n <ValidatedSelect\n name=\"gender\"\n optional\n options={translatedGender}\n txLabel=\"auth.userinfo.gender\"\n txPlaceholder=\"auth.userinfo.gender\"\n />\n <ValidatedMultiSelect\n name=\"activities\"\n optional\n options={translatedActivities}\n txLabel=\"auth.userinfo.activities\"\n txPlaceholder=\"auth.userinfo.activities\"\n />\n <ValidatedMultiSelect\n name=\"languages\"\n optional\n options={translatedLanguages}\n txLabel=\"auth.userinfo.languages\"\n txPlaceholder=\"auth.userinfo.languages\"\n />\n <ValidatedTextArea\n name=\"description\"\n optional\n txLabel=\"auth.userinfo.description\"\n txPlaceholder=\"auth.userinfo.description\"\n />\n\n <ValidatedDropzone name=\"image\" />\n </VStack>\n </Collapsible>\n\n {tacVisible && email && (\n <VStack spacing={8}>\n <Divider m={'sm'} />\n\n <Input\n value={email}\n txLabel={'org.email'}\n disabled\n styles={{\n label: { ...getCommonInputLabelStyle(theme) },\n input: {\n color: theme.grey80,\n borderColor: theme.grey10,\n },\n }}\n />\n <HStack style={{ alignItems: 'center' }} spacing={8}>\n <Icon icon={'info'} size={20} color={'primary'} />\n <Text size={'xs'} color={'grey50'} tx={'auth.userinfo.email'} />\n </HStack>\n </VStack>\n )}\n\n <Divider m={'sm'} />\n\n {!tacVisible && (\n <div>\n <SubmitButton\n loading={isLoading}\n fullWidth\n bg=\"primary\"\n tx=\"continue\"\n onSubmit={submit}\n />\n </div>\n )}\n\n {tacVisible && (\n <>\n <Text\n weight={'500'}\n italic\n align={'center'}\n tx={'auth.termsAndConditions'}\n />\n <VStack style={{ paddingTop: 16 }}>\n <VStack>\n <HStack style={{ flexWrap: 'nowrap' }}>\n <Checkbox\n onChange={handleCheckboxChangeTac}\n data-testid=\"CheckboxTac\"\n checked={tac}\n size={'md'}\n required\n />\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`${config.URL.aclitoTacURL}`}\n >\n {t('footer.terms')}\n </a>\n </HStack>\n <HStack style={{ flexWrap: 'nowrap' }}>\n <Checkbox\n onChange={handleCheckboxChangePP}\n data-testid=\"CheckboxPP\"\n checked={pp}\n size={'md'}\n required\n />\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`${config.URL.aclitoPpURL}`}\n >\n {t('footer.privacy')}\n </a>\n </HStack>\n </VStack>\n </VStack>\n <SmallButton\n fullWidth\n disabled={!pp || !tac}\n bg=\"primary\"\n tx=\"termsAndConditions.agree\"\n onClick={() => setTacVisible(false)}\n />\n <Divider m={'sm'} />\n </>\n )}\n </FormWrapper>\n </FormScreen>\n );\n};\n\nexport default ProfileEditForm;\n","import { config } from '../../../config';\n\nimport { ProfileInfoForm, txFn } from '@aclito/shared/types';\nimport { getByIdTranslate } from '@aclito/shared/util/selectObject';\nimport { RESERVED_AGE, RESERVED_GENDER } from '@aclito/shared/util/constants';\n\nexport const composeInitialCreateValues = (t: txFn): ProfileInfoForm => ({\n age: getByIdTranslate(RESERVED_AGE, config.age, t),\n gender: getByIdTranslate(RESERVED_GENDER, config.gender.signup, t),\n image: 'BASIC',\n languages: [],\n name: '',\n activities: [],\n surname: '',\n description: '',\n file: undefined,\n});\n","import { useMemo, useState } from 'react';\n\nimport {\n getRandomUserName,\n getRandomUserSurname,\n} from '../../../util/getRandomUserAttributes';\nimport { composeInitialCreateValues } from '../utils/composeInitialCreateValues';\nimport { useTranslate } from '../../../hooks';\nimport { ProfileInfoForm } from '../../../types';\n\nexport const useProfilePrefill = () => {\n const t = useTranslate();\n\n const [prefill, setPrefill] = useState<ProfileInfoForm & { email?: string }>(\n composeInitialCreateValues(t),\n );\n\n const placeholderName = useMemo(\n () => prefill.name || getRandomUserName(t),\n [prefill],\n );\n const placeholderSurname = useMemo(\n () => prefill.surname || getRandomUserSurname(),\n [prefill],\n );\n\n return { prefill, setPrefill, placeholderSurname, placeholderName };\n};\n","import { useEffect } from 'react';\nimport { unwrapResult } from '@reduxjs/toolkit';\nimport type { UpdateUserInfoInput } from '@aclito/entities';\n\nimport {\n ActivitiesKey,\n AgeKey,\n GenderUserKey,\n LanguagesKey,\n ProfileInfoForm,\n} from '../../../types';\n\nimport { useProfilePrefill } from './useProfilePrefill';\n\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { getUserData } from '@aclito/shared/util/cognitoUser';\nimport { profileActions } from '@aclito/shared/redux/slices';\nimport { RESERVED_AGE, RESERVED_GENDER } from '@aclito/shared/util/constants';\n\nexport const useAboutUser = () => {\n const dispatch = useAppDispatch();\n\n const { placeholderName, placeholderSurname, prefill, setPrefill } =\n useProfilePrefill();\n\n useEffect(() => {\n populateFirstTime();\n }, []);\n\n const populateFirstTime = async () => {\n const data = await getUserData();\n await dispatch(profileActions.populateIfFirstTimeAsync());\n if (data) {\n const { name, surname, email } = data;\n setPrefill({ ...prefill, name, surname, email });\n }\n };\n\n const updateUser = async (attributes: ProfileInfoForm) => {\n attributes.image = attributes.image?.trim() ? attributes.image : 'BASIC';\n\n if (!attributes.file) {\n delete attributes.file;\n }\n\n const user: UpdateUserInfoInput = {\n ...attributes,\n name: attributes.name.trim() ? attributes.name : placeholderName,\n surname: attributes.surname.trim()\n ? attributes.surname\n : placeholderSurname,\n age: (attributes.age ? attributes.age.id : RESERVED_AGE) as AgeKey,\n description: attributes.description ?? '',\n languages: (attributes.languages?.length\n ? attributes.languages.map((l) => l.id)\n : []) as LanguagesKey[],\n activities: (attributes.activities?.length\n ? attributes.activities.map((s) => s.id)\n : []) as ActivitiesKey[],\n gender: (attributes.gender\n ? attributes.gender.id\n : RESERVED_GENDER) as GenderUserKey,\n image: attributes.image,\n };\n return unwrapResult(\n await dispatch(profileActions.updateMyProfileAsync(user)),\n );\n };\n\n return { placeholderName, placeholderSurname, prefill, updateUser };\n};\n","import { getUserData } from '@aclito/shared/util/cognitoUser';\nimport { FIRST_TIME } from '@aclito/shared/util/constants';\nimport { useAboutUser } from '@aclito/shared/features/profile/hooks/useAboutUser';\nimport { ProfileInfoForm } from '@aclito/shared/types';\n\nimport { useNavigate } from './useNavigate';\n\nimport { ROUTE_EVENTS } from '@/util/constants';\n\nexport const useUserInformation = () => {\n const nav = useNavigate();\n const { updateUser, placeholderName, placeholderSurname, prefill } =\n useAboutUser();\n\n const handleUpdateUser = async (attributes: ProfileInfoForm) => {\n const data = await getUserData();\n const updated = await updateUser(attributes);\n\n if (updated && data?.login === FIRST_TIME) {\n nav(0);\n nav(ROUTE_EVENTS);\n }\n };\n return { handleUpdateUser, placeholderName, placeholderSurname, prefill };\n};\n","import { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useDisclosure } from '@mantine/hooks';\nimport React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useSchema } from '@aclito/shared/hooks/useSchema';\nimport { composeInitialEditValues } from '@aclito/shared/features/profile/utils/composeInitialEditValues';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport {\n SectionGrid,\n ActionButton,\n BackButton,\n TitleBar,\n Title,\n VStack,\n HStack,\n} from '@/components';\nimport DefaultLocation from '@/common/DefaultLocation/DefaultLocation';\nimport ProfileEditForm from '@/common/ProfileEditForm/ProfileEditForm';\nimport { useUserInformation } from '@/hooks/useUserInformation';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nconst ProfileEdit: React.FC = () => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const isLoading = useAppSelector(profileSelectors.isLoadingUpdateMyProfile);\n const { handleUpdateUser, placeholderName, placeholderSurname } =\n useUserInformation();\n const t = useTranslate();\n\n const initialValues = composeInitialEditValues(t, userInfo);\n const [isMap, { toggle }] = useDisclosure(false);\n\n const { userInfoValidationSchema } = useSchema();\n\n const methods = useForm({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(userInfoValidationSchema),\n mode: 'onChange',\n });\n const nav = useNavigate();\n const navBack = () => {\n nav(-1);\n };\n return (\n <SectionGrid\n $isOpen={false}\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n >\n <TitleBar>\n <HStack>\n <BackButton onClick={isMap ? toggle : undefined} />\n <Title tx=\"nav.profile\" />\n </HStack>\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n <FormProvider {...methods}>\n {isMap ? (\n <VStack>\n <DefaultLocation />\n </VStack>\n ) : (\n <ProfileEditForm\n {...{\n isLoading,\n initialValues,\n submit: handleUpdateUser,\n showTac: false,\n placeholderName,\n placeholderSurname,\n toggle,\n }}\n />\n )}\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default ProfileEdit;\n","import { initializeApp } from 'firebase/app';\nimport { getMessaging, getToken, isSupported } from 'firebase/messaging';\nimport { logger } from '@aclito/shared/lib/logger';\n\nimport { VAPID_KEY } from './constants';\n\nconst firebaseConfig = {\n apiKey: 'AIzaSyBW2osQQT2A356oCvy_hI6D7firVcNaj5c',\n authDomain: 'aclito-eee333.firebaseapp.com',\n projectId: 'aclito-eee333',\n storageBucket: 'aclito-eee333.appspot.com',\n messagingSenderId: '1064553150682',\n appId: '1:1064553150682:web:5ee7d6eedc96e88cc0cde3',\n measurementId: 'G-NZBCJHC6LV',\n};\n\nconst firebaseApp = initializeApp(firebaseConfig);\nexport const messaging = (await isSupported())\n ? getMessaging(firebaseApp)\n : null;\n\nexport const getFirebaseToken = async () => {\n if (!messaging) {\n logger.warn('Messaging firebase token not supported');\n return null;\n }\n\n try {\n // Check if notifications are blocked\n if (Notification.permission === 'denied') {\n return null;\n }\n\n // Request permission if needed\n if (Notification.permission !== 'granted') {\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n return null;\n }\n }\n\n const currentToken = await getToken(messaging, {\n vapidKey: VAPID_KEY,\n });\n\n return currentToken || null;\n } catch (err) {\n logger.error('Failed to get token', { message: err });\n return null;\n }\n};\n","import { MessagePayload, onMessage } from 'firebase/messaging';\nimport { useEffect } from 'react';\nimport { showNotification as showMantineNotification } from '@mantine/notifications';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { userClient } from '@aclito/client';\nimport { NotificationDataType } from '@aclito/enums';\n\nimport { getFirebaseToken, messaging } from '@/util/firebase';\nimport { Icon } from '@/components';\n\nconst FirebaseProvider = ({ children }: { children: React.ReactNode }) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n useEffect(() => {\n if (userInfo) {\n getToken();\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const sub = messaging ? onMessage(messaging, showNotification) : () => {};\n\n return () => sub();\n }, [userInfo]);\n\n const getToken = async () => {\n const token = await getFirebaseToken();\n if (token && token !== userInfo.webToken) {\n await userClient.user.updateUser({\n webToken: token,\n });\n }\n };\n\n const showNotification = (payload: MessagePayload) => {\n if (payload.notification && payload.data) {\n showMantineNotification({\n title: payload.notification.title,\n message: payload.notification.body,\n color: 'blue',\n icon: getIcon(payload.data.type as NotificationDataType),\n });\n }\n };\n\n const getIcon = (type: NotificationDataType) => {\n const icons: Record<NotificationDataType, React.ReactNode> = {\n GroupMessage: <Icon icon=\"message\" />,\n Event: <Icon icon=\"timer\" />,\n Org: <Icon icon=\"org\" />,\n Profile: <Icon icon=\"person\" />,\n };\n\n return icons[type] ?? null;\n };\n\n return <>{children}</>;\n};\n\nexport default FirebaseProvider;\n","import styled from 'styled-components';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { commonActions } from '@aclito/shared/redux/slices';\nimport { useEffect } from 'react';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { useMediaQuery } from '@mantine/hooks';\nimport ThemeProvider from '@aclito/ui-web/providers/ThemeProvider';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { Calendar as BigCalendar, Views } from 'react-big-calendar';\nimport { EventWithDateObject } from '@aclito/shared/types';\nimport { Center, Loader } from '@mantine/core';\n\nimport withRouter from '../../navigation/withRouter';\nimport MobileCalendar from '../MobileCalendar/MobileCalendar';\nimport { CalendarStyleWrapper } from '../Calendar/CalendarStyleWrapper';\n\nimport { HStack } from '@/components';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { QueryEmbeddedCalendar } from '@/util/types';\nimport { components } from '@/common/Calendar';\nimport Language from '@/components/Language';\nimport { useModal } from '@/hooks/useModal';\nimport { formatEventWithDate } from '@/util/formatEventWithDateObject';\nimport { useEventInfoHandlers } from '@/features/event/screens/EventInfo/hooks/useEventInfoHandlers';\nimport { useCalendar } from '@/components/Calendar/hooks/useCalendar';\nimport { useLocalizer } from '@/components/Calendar/hooks/useLocalizer';\ntype EmbeddedCalendarProps = TypedLocation<void, QueryEmbeddedCalendar>;\n\nconst EmbeddedCalendar = ({ query }: EmbeddedCalendarProps) => {\n const orgId = query?.orgId;\n const theme = query?.theme ?? 'light';\n const dispatch = useAppDispatch();\n const locale = useAppSelector(commonSelectors.locale);\n const t = useTranslate();\n const { openModal } = useModal();\n const { handleRedirectToEventInfo } = useEventInfoHandlers();\n\n const mqTabletS = useMediaQuery(deviceMax.tabletS);\n\n document.body.style.height = '0';\n\n useEffect(() => {\n dispatch(commonActions.updateLocale({ locale }));\n }, [dispatch, locale]);\n\n const { mappedEvents, debouncedNavigate, debouncedRangeChange, isFetching } =\n useCalendar(orgId ?? '', true);\n const { formats, localizer } = useLocalizer();\n\n if (!orgId) {\n return <div>{t('validation.url')}</div>;\n }\n\n if (isFetching) {\n return (\n <LoaderContainer>\n <Center>\n <Loader />\n </Center>\n </LoaderContainer>\n );\n }\n\n return (\n <ThemeProvider defaultTheme={theme}>\n <ScreenWrapper>\n <TopContainer>\n <LanguageContainer>\n <Language />\n </LanguageContainer>\n <CalendarStyleWrapper>\n {mqTabletS ? (\n <MobileCalendar\n events={mappedEvents}\n onMonthSelect={(date) => debouncedNavigate(date, Views.MONTH)}\n onNextMonth={(date) => debouncedNavigate(date, Views.MONTH)}\n onPreviousMonth={(date) => debouncedNavigate(date, Views.MONTH)}\n onClick={(event) => {\n openModal({\n withCloseButton: false,\n centered: true,\n size: 'auto',\n padding: 0,\n type: 'embedCalModal',\n styles: {\n content: {\n width: '30rem',\n },\n },\n values: {\n event: {\n ...event,\n date: new Date(event.date),\n endDate: new Date(event.endDate),\n },\n navigation: handleRedirectToEventInfo,\n },\n });\n }}\n />\n ) : (\n <Container>\n <BigCalendar\n localizer={localizer}\n formats={formats}\n {...{\n components,\n events: mappedEvents,\n startAccessor: 'date',\n endAccessor: 'endDate',\n onNavigate: debouncedNavigate,\n onRangeChange: debouncedRangeChange,\n onSelectEvent: (event: EventWithDateObject) => {\n openModal({\n withCloseButton: false,\n centered: true,\n size: 'auto',\n padding: 0,\n type: 'embedCalModal',\n styles: {\n content: {\n width: '30rem',\n },\n },\n values: {\n event: {\n ...formatEventWithDate(event, t),\n ...event,\n },\n navigation: handleRedirectToEventInfo,\n },\n });\n },\n }}\n />\n </Container>\n )}\n </CalendarStyleWrapper>\n </TopContainer>\n </ScreenWrapper>\n </ThemeProvider>\n );\n};\n\nconst ScreenWrapper = styled.div`\n background: ${({ theme }) => theme.background};\n width: 100dvw;\n height: 100dvh;\n margin-top: -2rem;\n`;\n\nconst TopContainer = styled.div`\n margin-top: 32px;\n height: 100vh;\n padding: 16px;\n`;\n\nconst Container = styled.div`\n height: 800px;\n padding: 16px;\n`;\n\nconst LanguageContainer = styled(HStack)`\n justify-content: flex-end;\n`;\nconst LoaderContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100vh;\n`;\n\nexport default withRouter(EmbeddedCalendar);\n","import { ApiSignIn } from '@aclito/shared/api/types/authentication';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { authActions } from '@aclito/shared/redux/slices';\n\nexport const useLogin = () => {\n const dispatch = useAppDispatch();\n\n const login = async (values: ApiSignIn) =>\n dispatch(authActions.signInAsync(values));\n\n return { login };\n};\n","import { useTheme } from 'styled-components';\n\nimport { VStack } from '../components/Layout';\nimport { Text } from '../components/Text';\nconst AuthLogo = () => {\n const theme = useTheme();\n\n return (\n <VStack\n spacing={0}\n style={{ justifyContent: 'center', alignItems: 'center' }}\n >\n <img\n style={{ width: 144, height: 144 }}\n src={new URL('../images/aclito.png', import.meta.url).href}\n />\n <Text\n style={{ fontFamily: 'Acme' }}\n weight={500}\n color={theme.orange}\n size={40}\n >\n ACLITO\n </Text>\n </VStack>\n );\n};\n\nexport default AuthLogo;\n","import React, { PropsWithChildren } from 'react';\nimport styled from 'styled-components';\n\nimport { HStack } from '../components/Layout';\nimport { SubmitButton } from '../components/Button';\nimport { SmallButtonProps } from '../components/Button/SmallButton';\n\nconst Button: React.FC<PropsWithChildren<Omit<SmallButtonProps, 'bg'>>> = ({\n children,\n ...rest\n}) => {\n return (\n // @ts-ignore\n <StyledButton bg={'primary'} {...rest}>\n <ButtonContent spacing={8}>{children}</ButtonContent>\n </StyledButton>\n );\n};\nconst StyledButton = styled(SubmitButton)`\n width: 100%;\n height: auto;\n background-color: ${({ theme }) => theme.primary};\n margin-top: 24px;\n padding: 12px 24px;\n border-radius: 10px;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);\n color: white;\n\n &:hover {\n filter: brightness(95%);\n }\n\n cursor: pointer;\n` as typeof SubmitButton;\n\nconst ButtonContent = styled(HStack)`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 400;\n font-size: 16px;\n`;\n\nexport default Button;\n","import styled from 'styled-components';\n\nimport { Text } from '../components/Text';\nexport const Title = styled(Text)`\n font-size: 32px;\n margin: 0 0 32px 0;\n color: ${({ theme }) => theme.primary};\n`;\n","import { CognitoHostedUIIdentityProvider } from '@aws-amplify/auth/lib/types';\nimport styled, { css } from 'styled-components';\nimport { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { ThemeColorsType } from '@aclito/shared/theme/colors';\nimport { ValueOf } from '@aclito/shared/types';\n\nimport { Icon } from '../components/Icons/Icon';\nimport { VStack } from '../components/Layout';\nimport { SmallButton } from '../components/Button';\nimport { Text } from '../components/Text';\n\nconst Social = ({\n onSocialClick,\n}: {\n onSocialClick: (type: CognitoHostedUIIdentityProvider) => void;\n}) => {\n const t = useTranslate();\n\n const socialLogin = (type: CognitoHostedUIIdentityProvider) => {\n onSocialClick(type);\n };\n return (\n <VStack spacing={12}>\n <LinkButton\n bg={'facebookBlue'}\n textcolor={'white'}\n onClick={() => socialLogin(CognitoHostedUIIdentityProvider.Facebook)}\n >\n <LinkButtonContent>\n <StyledIcon icon={'facebook'} color=\"whiteText\" size={24} />\n {t('auth.signin.facebook')}\n </LinkButtonContent>\n </LinkButton>\n <LinkButton\n bg={'black'}\n textcolor={'white'}\n onClick={() => socialLogin(CognitoHostedUIIdentityProvider.Apple)}\n >\n <LinkButtonContent>\n <StyledIcon icon={'apple'} color=\"whiteText\" size={24} />\n {t('auth.signin.apple')}\n </LinkButtonContent>\n </LinkButton>\n <LinkButton\n bg=\"white\"\n textcolor={'black'}\n onClick={() => socialLogin(CognitoHostedUIIdentityProvider.Google)}\n >\n <LinkButtonContent>\n <StyledIcon icon={'google'} size={24} />\n <Text color=\"googleText\">{t('auth.signin.google')}</Text>\n </LinkButtonContent>\n </LinkButton>\n </VStack>\n );\n};\n\nconst StyledIcon = styled(Icon)`\n margin-right: 8px;\n display: flex;\n`;\n\nconst LinkButton = styled(SmallButton)<{\n textcolor: ValueOf<ThemeColorsType>;\n}>`\n width: 100%;\n background-color: ${(props) => props.bg};\n color: ${(props) => props.textcolor};\n border-radius: 10px;\n height: 100%;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);\n cursor: pointer;\n &:hover {\n background-color: ${(props) => props.bg};\n filter: brightness(95%);\n }\n ${(p) =>\n p.bg === p.theme.black &&\n css`\n &:hover {\n opacity: 0.9;\n }\n `};\n`;\n\nconst LinkButtonContent = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 12px;\n font-size: 16px;\n font-weight: 400;\n`;\n\nexport default Social;\n","import styled from 'styled-components';\nimport React, { PropsWithChildren } from 'react';\n\nconst Screen: React.FC<PropsWithChildren<unknown>> = ({ children }) => (\n <StyledScreen>{children}</StyledScreen>\n);\n\nconst StyledScreen = styled.div`\n width: 100%;\n max-width: 400px;\n width: 400px;\n padding: 48px 16px 64px;\n margin-bottom: auto;\n`;\n\nexport { Screen };\n","import styled from 'styled-components';\n\nconst Background = () => (\n <StyledBackground>\n <BackgroundShape />\n </StyledBackground>\n);\nconst StyledBackground = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 0;\n clip-path: inset(0 0 0 0 round 5px);\n`;\n\nconst BackgroundShape = styled.div`\n transform: rotate(45deg);\n position: absolute;\n height: 520px;\n width: 520px;\n background: ${({ theme }) => theme.background};\n top: -50px;\n right: 120px;\n border-radius: 0 72px 72px 0;\n`;\nexport default Background;\n","export default \"__VITE_ASSET__c24fa1c6__\"","import React from 'react';\nimport styled from 'styled-components';\nimport { config } from '@aclito/shared/config';\n\nimport logo from '../images/aclito.svg';\n\nconst Header: React.FC = () => {\n const navToLanding = () => {\n document.location = config.URL.aclitoWebURL;\n };\n\n const logoURL = new URL(logo, import.meta.url).href;\n\n return (\n <Container>\n <img style={{ cursor: 'pointer' }} onClick={navToLanding} src={logoURL} />\n </Container>\n );\n};\n\nconst Container = styled.div`\n position: sticky;\n top: 0;\n display: flex;\n z-index: 1;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n background-color: ${({ theme }) => theme.white};\n padding: 16px 24px;\n box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);\n`;\n\nexport default Header;\n","import styled from 'styled-components';\nimport React, { PropsWithChildren } from 'react';\n\nconst Box: React.FC<PropsWithChildren<unknown>> = ({ children }) => (\n <StyledBox>{children}</StyledBox>\n);\n\nconst StyledBox = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\nexport { Box };\n","import { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { config } from '@aclito/shared/config';\nimport { useTheme } from 'styled-components';\nimport { Link } from 'react-router-dom';\n\nconst Contacts = () => {\n const theme = useTheme();\n\n return (\n <VStack align=\"center\" spacing={8}>\n <Link\n to=\"mailto:info@aclito.com\"\n style={{ color: theme.primary, textDecoration: 'none' }}\n >\n info@aclito.com\n </Link>\n <HStack spacing={16}>\n <Link to={config.URL.instagramURL} target=\"_blank\">\n <Icon icon=\"instagram\" color=\"primary\" />\n </Link>\n <Link to={config.URL.facebookURL} target=\"_blank\">\n <Icon icon=\"facebook\" color=\"primary\" />\n </Link>\n <Link to={config.URL.linkedinURL} target=\"_blank\">\n <Icon icon=\"linkedin\" color=\"primary\" />\n </Link>\n <Link to={config.URL.linkedinURL} target=\"_blank\">\n <Icon icon=\"youtube\" color=\"primary\" />\n </Link>\n </HStack>\n </VStack>\n );\n};\n\nexport default Contacts;\n","import { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { HStack } from '@aclito/ui-web/components/Layout';\nimport styled from 'styled-components';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { config } from '@aclito/shared/config';\nimport { Link } from 'react-router-dom';\n\nconst Copyright: React.FC = () => {\n const t = useTranslate();\n const locale = useAppSelector((state) => state.locale);\n\n // Aclito web has only en|cs\n const urlLocale = locale === 'en' ? 'en' : 'cs';\n\n return (\n <Container align=\"center\" style={{ textAlign: 'center' }} spacing={8}>\n <div>{t('footer.rights')}</div>\n <DotDivider>•</DotDivider>\n <Link\n to={`${config.URL.aclitoWebURL}/${urlLocale}/terms-and-conditions`}\n style={{\n color: 'inherit',\n textDecoration: 'none',\n }}\n >\n {t('footer.terms')}\n </Link>\n <DotDivider>•</DotDivider>\n <Link\n to={`${config.URL.aclitoWebURL}/${urlLocale}/privacy-policy`}\n style={{ color: 'inherit', textDecoration: 'none' }}\n >\n {t('footer.privacy')}\n </Link>\n </Container>\n );\n};\n\nconst Container = styled(HStack)`\n border-top: 1px solid ${({ theme }) => theme.grey10};\n padding: 24px 0;\n color: ${({ theme }) => theme.grey40};\n width: 100%;\n font-size: 14px;\n justify-content: center;\n\n @media (max-width: 576px) {\n flex-direction: column;\n }\n`;\n\nconst DotDivider = styled.div`\n @media (max-width: 576px) {\n display: none;\n }\n`;\n\nexport default Copyright;\n","import React from 'react';\nimport { VStack } from '@aclito/ui-web/components/Layout';\nimport styled from 'styled-components';\n\nimport Contacts from './components/Contacts';\nimport Copyright from './components/Copyright';\n\nconst Footer: React.FC = () => {\n return (\n <Container px={24} spacing={0}>\n <TopContainer py={32}>\n <Contacts />\n </TopContainer>\n <Copyright />\n </Container>\n );\n};\n\nconst TopContainer = styled(VStack)``;\n\nconst Container = styled(VStack)`\n background-color: ${({ theme }) => theme.white};\n box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.05);\n width: 100%;\n`;\n\nexport default Footer;\n","import React from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport styled from 'styled-components';\n\nimport { Text, TextProps } from '@/components';\n\ninterface LinkProps extends NavLinkProps {\n textProps?: TextProps;\n}\n\nconst Link: React.FC<\n Omit<LinkProps, 'children'> & { children?: React.ReactNode }\n> = ({ children, textProps, to, ...rest }) => (\n <StyledLink to={to} {...rest}>\n {children}\n <Text {...textProps} />\n </StyledLink>\n);\nconst StyledLink = styled(NavLink)`\n z-index: 2;\n padding: 16px;\n`;\nexport default Link;\n","import styled from 'styled-components';\nimport { Loader } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { Button } from '@aclito/ui-web/auth';\n\nimport { LoginFormProps } from '../../interface';\n\nimport {\n ValidatedInput,\n VStack,\n Icon,\n ValidatedPasswordInput,\n} from '@/components';\nimport Link from '@/common/Text/Link';\nimport { ROUTE_REQUEST_PASSWORD } from '@/util/constants';\n\nconst LoginForm = ({ isLoading, onSubmit }: LoginFormProps) => {\n const t = useTranslate();\n return (\n <>\n <VStack spacing={16}>\n <ValidatedInput\n name=\"username\"\n txLabel=\"auth.email\"\n txPlaceholder=\"auth.email\"\n type=\"email\"\n autoComplete={'email'}\n />\n <ValidatedPasswordInput\n name=\"password\"\n txLabel=\"auth.password\"\n autoComplete={'current-password'}\n txPlaceholder=\"auth.password\"\n />\n <ForgotPasswordText\n to={ROUTE_REQUEST_PASSWORD}\n textProps={{ tx: 'auth.pswsubmit.title', color: 'primary' }}\n />\n </VStack>\n\n <Button onClick={onSubmit}>\n {t('auth.signin.button')}\n {!isLoading ? (\n <Icon icon=\"forward\" size={24} color=\"whiteText\" />\n ) : (\n <Loader size={24} color=\"white\" />\n )}\n </Button>\n </>\n );\n};\n\nconst ForgotPasswordText = styled(Link)`\n color: ${({ theme }) => theme.primary};\n right: 0;\n padding: 0;\n margin-left: auto;\n`;\n\nexport default LoginForm;\n","import { useAuthenticator } from '@aws-amplify/ui-react';\nimport { FC, useEffect, useState } from 'react';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_EVENTS } from '@/util/constants';\n\nconst WithAuth = <T extends object>(Component: FC<T>): FC<T> => {\n const Auth: FC<T> = (props) => {\n const { route } = useAuthenticator((context) => [context.route]);\n const navigate = useNavigate();\n const [afterRun, setAfterRun] = useState(false);\n\n useEffect(() => {\n setAfterRun(true);\n if (route === 'authenticated') {\n navigate(ROUTE_EVENTS);\n }\n }, [navigate, route]);\n\n return afterRun ? <Component {...props} /> : null;\n };\n\n return Auth;\n};\n\nexport default WithAuth;\n","export const submitOnKeyPress = (\n e: React.KeyboardEvent<HTMLDivElement>,\n onSubmit: () => void,\n) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n onSubmit();\n }\n};\n","import { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport { useSchema } from '@aclito/shared/hooks/useSchema';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport styled, { useTheme } from 'styled-components';\nimport {\n authActions,\n authSelectors,\n} from '@aclito/shared/redux/slices/authSlices';\nimport { SignInForm } from '@aclito/shared/types';\nimport { useLogin } from '@aclito/shared/features/auth/hooks/useLogin';\nimport { ApiSignIn } from '@aclito/shared/api/types/authentication';\nimport { Divider } from '@mantine/core';\nimport { useSearchParams } from 'react-router-dom';\nimport { PRE_SIGN_UP_DUPLICATE_ERROR } from '@aclito/shared/util/constants';\nimport AuthLogo from '@aclito/ui-web/auth/AuthLogo';\nimport { useEffect } from 'react';\nimport { Social, Header, Screen, Box } from '@aclito/ui-web/auth';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { useShowFlashMessage } from '@aclito/shared/hooks';\n\nimport Footer from '../../components/Footer/Footer';\n\nimport { LoginForm } from './components';\n\nimport { Container, VStack } from '@/components';\nimport WithAuth from '@/navigation/withAuth';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport Link from '@/common/Text/Link';\nimport { ROUTE_SIGN_UP } from '@/util/constants';\nimport { submitOnKeyPress } from '@/util/submitOnKeyPress';\n\nconst Login = () => {\n const isLoading = useAppSelector(authSelectors.isLoadingSignIn);\n const navigate = useNavigate();\n const { login } = useLogin();\n const theme = useTheme();\n const { signInValidationSchema } = useSchema();\n const showMessage = useShowFlashMessage();\n\n const handleSubmit = async (values: ApiSignIn) => {\n const res = await login(values);\n if (!res.payload) {\n navigate(0);\n }\n };\n\n const [searchParams] = useSearchParams();\n\n useEffect(() => {\n const error = searchParams.get('error_description');\n\n if (error?.includes(PRE_SIGN_UP_DUPLICATE_ERROR)) {\n showMessage('UsernameExistsException');\n }\n }, []);\n\n const methods = useForm<SignInForm>({\n defaultValues: { username: '', password: '' } as SignInForm,\n resolver: yupResolver(signInValidationSchema),\n mode: 'onChange',\n });\n\n const dispatch = useAppDispatch();\n\n return (\n <Box>\n <Header />\n <Container>\n <Screen>\n <VStack>\n <VStack spacing={16}>\n <AuthLogo />\n <FormProvider {...methods}>\n <div\n onKeyDown={(e) =>\n submitOnKeyPress(e, methods.handleSubmit(handleSubmit))\n }\n >\n <Social\n onSocialClick={(type) => {\n dispatch(authActions.federatedSignInAsync(type));\n }}\n />\n <Divider\n style={{ marginTop: 20, marginBottom: 20 }}\n h={1}\n bg={theme.grey10}\n />\n <LoginForm\n isLoading={isLoading}\n onSubmit={methods.handleSubmit(handleSubmit)}\n />\n </div>\n </FormProvider>\n <NoAccountLink\n to={ROUTE_SIGN_UP}\n textProps={{ tx: 'auth.signin.noacc', color: 'primary' }}\n />\n </VStack>\n </VStack>\n </Screen>\n </Container>\n <Footer />\n </Box>\n );\n};\n\nconst NoAccountLink = styled(Link)`\n padding: 0;\n margin-top: 16px;\n color: ${({ theme }) => theme.primary};\n display: flex;\n text-decoration: none;\n justify-content: center;\n`;\n\nexport default WithAuth(Login);\n","import * as yup from 'yup';\n\nimport { useSchema } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { SignUpForm } from '@aclito/shared/types';\nimport { authActions } from '@aclito/shared/redux/slices';\n\nexport const useRegister = () => {\n const dispatch = useAppDispatch();\n const initialValues: SignUpForm = {\n username: '',\n password: '',\n };\n\n const { passwordValidationSchema, userNameValidationSchema } = useSchema();\n\n const registerValidationSchema = yup\n .object()\n .concat(passwordValidationSchema)\n .concat(userNameValidationSchema)\n .required();\n\n const register = async (values: SignUpForm) =>\n await dispatch(\n authActions.singUpAsync({\n ...values,\n username: values.username.toLowerCase(),\n }),\n ).unwrap();\n\n return { register, initialValues, registerValidationSchema };\n};\n","import React from 'react';\nimport { Loader } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { Button } from '@aclito/ui-web/auth';\nimport { useTheme } from 'styled-components';\n\nimport { RegisterFormProps } from '../../interface';\n\nimport {\n VStack,\n ValidatedInput,\n Icon,\n ValidatedPasswordInput,\n} from '@/components';\n\nconst RegisterForm: React.FC<RegisterFormProps> = ({ isLoading, onSubmit }) => {\n const t = useTranslate();\n const theme = useTheme();\n return (\n <>\n <VStack spacing={16}>\n <ValidatedInput\n name=\"username\"\n txLabel=\"auth.email\"\n autoComplete={'email'}\n txPlaceholder=\"auth.email\"\n type=\"email\"\n />\n <ValidatedPasswordInput\n name=\"password\"\n txLabel=\"auth.password\"\n autoComplete={'new-password'}\n txPlaceholder=\"auth.password\"\n />\n </VStack>\n\n <Button onClick={onSubmit}>\n {t('auth.signup.button')}\n {!isLoading ? (\n <Icon icon=\"forward\" size={24} color=\"whiteText\" />\n ) : (\n <Loader size={24} color={theme.whiteText} />\n )}\n </Button>\n </>\n );\n};\n\nexport default RegisterForm;\n","import { useRegister } from '@aclito/shared/features/auth/hooks/useRegister';\nimport { SignUpForm } from '@aclito/shared/types';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_SIGN_IN } from '@/util/constants';\n\nexport const useRegisterWeb = () => {\n const navigate = useNavigate();\n const { register } = useRegister();\n\n const signUp = async (values: SignUpForm) => {\n try {\n await register(values);\n navigate(ROUTE_SIGN_IN);\n } catch (e) {\n return;\n }\n };\n\n return { signUp };\n};\n","import { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport {\n authActions,\n authSelectors,\n} from '@aclito/shared/redux/slices/authSlices';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport React from 'react';\nimport styled, { useTheme } from 'styled-components';\nimport { useRegister } from '@aclito/shared/features/auth/hooks/useRegister';\nimport { Divider } from '@mantine/core';\nimport * as yup from 'yup';\nimport AuthLogo from '@aclito/ui-web/auth/AuthLogo';\nimport { Social, Screen, Header, Box } from '@aclito/ui-web/auth';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\n\nimport Footer from '../../components/Footer/Footer';\n\nimport RegisterForm from './components/Form/Form';\nimport { useRegisterWeb } from './hooks';\n\nimport { Container, VStack } from '@/components';\nimport WithAuth from '@/navigation/withAuth';\nimport Link from '@/common/Text/Link';\nimport withRouter from '@/navigation/withRouter';\nimport { ROUTE_SIGN_IN } from '@/util/constants';\nimport { submitOnKeyPress } from '@/util/submitOnKeyPress';\n\nconst Register: React.FC = () => {\n const isLoading = useAppSelector(authSelectors.isLoadingSignUp);\n const theme = useTheme();\n const { initialValues, registerValidationSchema } = useRegister();\n const { signUp } = useRegisterWeb();\n\n type RegisterSchemaType = yup.InferType<typeof registerValidationSchema>;\n\n const methods = useForm<RegisterSchemaType>({\n defaultValues: initialValues,\n resolver: yupResolver(registerValidationSchema),\n });\n\n const dispatch = useAppDispatch();\n\n return (\n <Box>\n <Header />\n <Container>\n <Screen>\n <VStack spacing={16}>\n <AuthLogo />\n <FormProvider {...methods}>\n <div\n onKeyDown={(e) =>\n submitOnKeyPress(e, methods.handleSubmit(signUp))\n }\n >\n <Social\n onSocialClick={(type) => {\n dispatch(authActions.federatedSignInAsync(type));\n }}\n />\n <Divider\n style={{ marginTop: 20, marginBottom: 20 }}\n h={1}\n bg={theme.grey10}\n />\n <RegisterForm\n isLoading={isLoading}\n onSubmit={methods.handleSubmit(signUp)}\n />\n </div>\n </FormProvider>\n\n <AlreadyHaveAccLink\n textProps={{ tx: 'auth.signin.acc', color: 'primary' }}\n to={ROUTE_SIGN_IN}\n />\n </VStack>\n </Screen>\n </Container>\n <Footer />\n </Box>\n );\n};\n\nconst AlreadyHaveAccLink = styled(Link)`\n padding: 0;\n margin: 16px 0px 32px 0px;\n color: ${({ theme }) => theme.primary};\n display: flex;\n justify-content: center;\n`;\n\nexport default WithAuth(withRouter(Register));\n","import { useSchema } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { authActions } from '@aclito/shared/redux/slices';\nimport { PasswordRequestForm } from '@aclito/shared/types';\n\nexport const useRequestNewPassword = () => {\n const dispatch = useAppDispatch();\n const initialValues = { username: '' };\n const { passwordRequestSchema } = useSchema();\n\n const requestNewPassword = (values: PasswordRequestForm) =>\n dispatch(authActions.requestNewPasswordAsync(values.username)).unwrap();\n\n return { initialValues, passwordRequestSchema, requestNewPassword };\n};\n","import React from 'react';\nimport { Loader } from '@mantine/core';\nimport { Button } from '@aclito/ui-web/auth';\n\nimport { EmailFormProps } from '../../interface';\n\nimport { VStack, ValidatedInput, Icon } from '@/components';\n\nconst EmailForm: React.FC<EmailFormProps> = ({ isLoading, onSubmit }) => {\n return (\n <>\n <VStack>\n <ValidatedInput\n name=\"username\"\n txLabel=\"auth.email\"\n autoComplete={'email'}\n txPlaceholder=\"auth.email\"\n type=\"email\"\n />\n </VStack>\n\n <Button onClick={onSubmit}>\n {!isLoading ? (\n <Icon icon=\"forward\" size={24} color=\"whiteText\" />\n ) : (\n <Loader size={24} color=\"white\" />\n )}\n </Button>\n </>\n );\n};\n\nexport default EmailForm;\n","import React from 'react';\nimport { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useRequestNewPassword } from '@aclito/shared/features/auth/hooks/useRequestNewPassword';\nimport { authSelectors } from '@aclito/shared/redux/slices/authSlices';\nimport { PasswordRequestForm } from '@aclito/shared/types';\nimport { Screen } from '@aclito/ui-web/auth/Screen';\nimport { Title, Header, Box } from '@aclito/ui-web/auth';\nimport { zodResolver } from '@hookform/resolvers/zod';\n\nimport Footer from '../../components/Footer/Footer';\n\nimport { EmailForm } from './components';\n\nimport { Container } from '@/components';\nimport { ROUTE_SUBMIT_PASSWORD } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nconst RequestNewPassword: React.FC = () => {\n const isLoading = useAppSelector(authSelectors.isLoadingRequestPassword);\n const navigate = useNavigate();\n\n const { initialValues, passwordRequestSchema, requestNewPassword } =\n useRequestNewPassword();\n\n const handleSubmit = async (values: PasswordRequestForm) => {\n try {\n await requestNewPassword(values);\n navigate(ROUTE_SUBMIT_PASSWORD);\n } catch (e) {\n return;\n }\n };\n\n const methods = useForm({\n defaultValues: initialValues,\n resolver: zodResolver(passwordRequestSchema),\n });\n\n return (\n <Box>\n <Header />\n <Container>\n <Screen>\n <Title tx=\"auth.signin.reset\" />\n <FormProvider {...methods}>\n <EmailForm\n isLoading={isLoading}\n onSubmit={methods.handleSubmit(handleSubmit)}\n />\n </FormProvider>\n </Screen>\n </Container>\n <Footer />\n </Box>\n );\n};\n\nexport default RequestNewPassword;\n","import { useAppSelector, useSchema } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { ForgotPasswordForm } from '@aclito/shared/types';\nimport { authActions } from '@aclito/shared/redux/slices';\nimport { authSelectors } from '@aclito/shared/redux/slices/authSlices';\n\nexport const useSubmitNewPassword = () => {\n const isLoading = useAppSelector(authSelectors.isLoadingSubmitPassword);\n const initialValues = { username: '', code: '', newPassword: '' };\n const { passwordSubmitSchema } = useSchema();\n\n const dispatch = useAppDispatch();\n\n const submitNewPassword = (values: ForgotPasswordForm) =>\n dispatch(authActions.submitNewPasswordAsync(values)).unwrap();\n\n return {\n initialValues,\n passwordSubmitSchema,\n submitNewPassword,\n isLoading,\n };\n};\n","import React from 'react';\nimport { Loader } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { Button } from '@aclito/ui-web/auth';\n\nimport { PasswordFormProps } from '../../interface';\n\nimport {\n VStack,\n ValidatedInput,\n Icon,\n ValidatedPasswordInput,\n} from '@/components';\n\nconst PasswordForm: React.FC<PasswordFormProps> = ({ isLoading, onSubmit }) => {\n const t = useTranslate();\n\n return (\n <>\n <VStack spacing={16}>\n <ValidatedInput\n name=\"username\"\n txLabel=\"auth.email\"\n autoComplete={'email'}\n txPlaceholder=\"auth.email\"\n type=\"email\"\n />\n <ValidatedPasswordInput\n name=\"newPassword\"\n autoComplete={'new-password'}\n txLabel=\"auth.new.password\"\n txPlaceholder=\"auth.new.password\"\n />\n <ValidatedInput\n name=\"code\"\n type=\"number\"\n autoComplete={'one-time-code'}\n txLabel=\"auth.code\"\n txPlaceholder=\"auth.code\"\n />\n </VStack>\n\n <Button onClick={onSubmit}>\n {t('auth.confirm.button')}\n {!isLoading ? (\n <Icon icon=\"forward\" size={24} color=\"whiteText\" />\n ) : (\n <Loader size={24} color=\"white\" />\n )}\n </Button>\n </>\n );\n};\n\nexport default PasswordForm;\n","import React from 'react';\nimport { useSubmitNewPassword } from '@aclito/shared/features/auth/hooks/useSubmitNewPassword';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { ForgotPasswordForm } from '@aclito/shared/types';\nimport { Screen } from '@aclito/ui-web/auth/Screen';\nimport { Title, Header, Box } from '@aclito/ui-web/auth';\nimport { zodResolver } from '@hookform/resolvers/zod';\n\nimport Footer from '../../components/Footer/Footer';\n\nimport { PasswordForm } from './components';\n\nimport { Container } from '@/components';\nimport { ROUTE_SIGN_IN } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nconst SubmitNewPassword: React.FC = () => {\n const navigate = useNavigate();\n\n const { initialValues, passwordSubmitSchema, submitNewPassword, isLoading } =\n useSubmitNewPassword();\n\n const handleSubmit = async (values: ForgotPasswordForm) => {\n try {\n await submitNewPassword(values);\n navigate(ROUTE_SIGN_IN);\n } catch (e) {\n return;\n }\n };\n\n const methods = useForm<ForgotPasswordForm>({\n defaultValues: initialValues,\n resolver: zodResolver(passwordSubmitSchema),\n });\n\n return (\n <Box>\n <Header />\n <Container>\n <Screen>\n <Title tx=\"auth.signin.reset\" />\n <FormProvider {...methods}>\n <PasswordForm\n isLoading={isLoading}\n onSubmit={methods.handleSubmit(handleSubmit)}\n />\n </FormProvider>\n </Screen>\n </Container>\n <Footer />\n </Box>\n );\n};\n\nexport default SubmitNewPassword;\n","import { useEffect, useState } from 'react';\n\nimport { storage } from '../lib/storage';\nimport { TooltipKey } from '../types';\n\nimport { SEEN_MAP } from './constants';\n\nconst otherKey = ['calendarCheckbox', 'availabilityGender'] as const;\n\nexport type OtherKey = (typeof otherKey)[number];\nexport type UniqueKey =\n | OtherKey\n | Extract<TooltipKey, 'eventTooltip' | 'productShoppingTooltip'>;\ntype Binary = '1' | '0';\n\nexport type SeenMap = Record<UniqueKey, Binary | undefined>;\n\n/**\n * Converts a Binary ('1' | '0') to a boolean.\n * @param param - The binary value as a string.\n * @returns boolean - True if '1', false otherwise.\n */\nfunction convert(param: Binary): boolean {\n return param === '1';\n}\n\n/**\n * Converts a boolean to a Binary ('1' | '0').\n * @param value - The boolean value.\n * @returns Binary - '1' if true, '0' if false.\n */\nfunction getBinary(value: boolean): Binary {\n return value ? '1' : '0';\n}\n\n/**\n * Retrieves the seen state from storage.\n * @param key - The unique key for the item.\n * @returns boolean - The seen state as a boolean.\n */\nexport const getSeenMap = async (key: UniqueKey): Promise<boolean> => {\n const result = await storage.getParsedItems(SEEN_MAP);\n return convert(result[key] ?? '0');\n};\n\n/**\n * Sets the seen state in storage.\n * @param key - The unique key for the item.\n * @param value - The new seen state as a boolean.\n */\nexport const setSeenMap = async (key: UniqueKey, value: boolean) => {\n const result = await storage.getParsedItems(SEEN_MAP);\n result[key] = getBinary(value);\n await storage.setItem(SEEN_MAP, JSON.stringify(result));\n};\n\nexport const clearSeenMap = async () => {\n await storage.removeItem(SEEN_MAP);\n};\n\nexport const useHasSeen = (key: UniqueKey) => {\n const [seen, setSeen] = useState(false);\n\n useEffect(() => {\n const run = async () => {\n try {\n setSeen(await getSeenMap(key));\n } catch (error) {\n setSeen(false);\n }\n };\n\n run();\n }, [key]);\n\n return [seen];\n};\n","import { config } from '@aclito/shared/config';\nimport { useAppSelector, useShowFlashMessage } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { RESERVED_GENDER } from '@aclito/shared/util/constants';\nimport { useEffect } from 'react';\nimport { getSeenMap, setSeenMap } from '@aclito/shared/util/seenMap';\n\nimport { ROUTE_PROFILE_EDIT } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useAvailabilities = () => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const nav = useNavigate();\n const showMessage = useShowFlashMessage();\n const onProfileClick = () => {\n nav(ROUTE_PROFILE_EDIT);\n };\n useEffect(() => {\n const shouldShowMessage = async () => {\n if (config.gender.signup[userInfo.gender].id === RESERVED_GENDER) {\n const seen = await getSeenMap('availabilityGender');\n if (!seen) {\n await setSeenMap('availabilityGender', true);\n showMessage('availabilityGender', onProfileClick);\n }\n }\n };\n\n shouldShowMessage();\n }, [userInfo.gender]);\n};\n","import React from 'react';\nimport { ActivitiesKey } from '@aclito/shared/types';\n\nimport { HStack, ActivityBannerText } from '@/components';\n\ninterface AvailabilityTagsProps {\n activities: ActivitiesKey[];\n}\n\nconst AvailabilityTags: React.FC<AvailabilityTagsProps> = ({ activities }) => {\n return (\n <HStack spacing={4}>\n {activities?.map((activity) => (\n <ActivityBannerText key={activity} activityType={activity} />\n ))}\n </HStack>\n );\n};\n\nexport default AvailabilityTags;\n","import { Grid } from '@mantine/core';\nimport React from 'react';\nimport { useTranslateDate } from '@aclito/shared/hooks';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport { ActivitiesKey } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\nimport { Availability } from '@aclito/entities';\nimport { config } from '@aclito/shared/config';\n\nimport GridColumn from './GridColumn';\nimport AvailabilityTags from './AvailabilityTags';\n\nimport {\n HStack,\n VStack,\n Icon,\n PlainCard,\n StyledText,\n TimeText,\n} from '@/components';\nimport { ROUTE_AVAILABILITY_INFO } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ninterface AvailabilitiesCardsProps {\n availabilities: Availability[];\n}\n\ninterface CardProps {\n availability: Availability;\n}\n\nconst AvailabilitiesCards: React.FC<AvailabilitiesCardsProps> = ({\n availabilities,\n}) => (\n <Grid gutter=\"sm\">\n {availabilities?.map((availability) => (\n <GridColumn key={availability.id} fullWidth={false}>\n <Card {...{ availability }} />\n </GridColumn>\n ))}\n </Grid>\n);\n\nconst Card: React.FC<CardProps> = ({ availability }) => {\n const nav = useNavigate();\n const theme = useTheme();\n const tDate = useTranslateDate();\n const timeFrom = tDate(availability.from, 'time.display');\n const timeTo = tDate(availability.to, 'time.display');\n\n const date = tDate(availability.from, 'date.card');\n\n const color = availability.activities?.length\n ? cardColorPicker(availability.activities[0] as ActivitiesKey)\n : theme.primary;\n\n const activities = availability.activities?.length\n ? availability.activities\n : ([config.activities.any.id] as ActivitiesKey[]);\n\n const navigate = () =>\n nav(ROUTE_AVAILABILITY_INFO, {\n state: {\n availability,\n },\n });\n return (\n <PlainCard\n $borderColor={color}\n onClick={navigate}\n style={{ height: '100%' }}\n >\n <VStack spacing={7}>\n <HStack noWrap spacing={10}>\n <TimeText>{`${timeFrom} - ${timeTo}`}</TimeText>\n </HStack>\n <HStack noWrap style={{ alignItems: 'center' }} spacing={10}>\n <Icon icon={'calendar'} size={16} color=\"grey30\" />\n <StyledText text={date} />\n </HStack>\n <AvailabilityTags {...{ activities }} />\n </VStack>\n </PlainCard>\n );\n};\n\nexport default AvailabilitiesCards;\n","import { Center, Divider, Loader } from '@mantine/core';\nimport { useMediaQuery } from '@mantine/hooks';\nimport {\n useLazyListAvailabilitiesQuery,\n useListAvailabilitiesQuery,\n} from '@aclito/shared/redux/api/availabilityApi';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { dateSort } from '@aclito/shared/util/sorter';\n\nimport { useAvailabilities } from './hooks/useAvailabilities';\n\nimport {\n TitleBar,\n ActionButton,\n ShowMoreButton,\n Title,\n SectionGrid,\n InlineTooltip,\n HStack,\n VStack,\n BackButton,\n EmptyList,\n} from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_NEW_AVAILABILITY } from '@/util/constants';\nimport AvailabilitiesCards from '@/components/Cards/AvailabilitiesCards';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\nconst Availabilities = () => {\n const navigation = useNavigate();\n\n const { data, isFetching, isUninitialized, isSuccess } =\n useListAvailabilitiesQuery({\n nextToken: null,\n });\n\n const availabilities = data?.result || [];\n\n const [trigger] = useLazyListAvailabilitiesQuery();\n\n const loadNextAvailabilities = async () => {\n trigger({ nextToken: data?.nextToken ?? null });\n };\n\n useAvailabilities();\n\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const handleNav = () => navigation(ROUTE_NEW_AVAILABILITY);\n return (\n <>\n <SectionGrid $isOpen={false}>\n <VStack>\n <TitleBar id={id}>\n <HStack>\n <BackButton />\n <Title tx=\"nav.availability\" />\n </HStack>\n {isFlexWrapped || queryMobile ? (\n <ActionButton iconType={'add'} primary onClick={handleNav} />\n ) : (\n <ActionButton\n iconType={'add'}\n primary\n onClick={handleNav}\n tx={'create'}\n />\n )}\n </TitleBar>\n\n <InlineTooltip txTitle={'tooltip.ava.title'} txBody={'tooltip.ava'} />\n <Divider />\n\n {!isUninitialized && isSuccess && !availabilities.length && (\n <EmptyList\n iconType=\"availability\"\n action=\"addAvailability\"\n tx=\"flatlist.noavailabilities\"\n />\n )}\n\n {availabilities?.length ? (\n <>\n {!isFetching && (\n <AvailabilitiesCards\n availabilities={\n availabilities\n ? dateSort(availabilities, 'from', 'asc')\n : []\n }\n />\n )}\n {data?.nextToken && (\n <Center mt=\"xl\">\n <ShowMoreButton onClick={loadNextAvailabilities} />\n </Center>\n )}\n </>\n ) : (\n isFetching && (\n <Center>\n <Loader />\n </Center>\n )\n )}\n </VStack>\n </SectionGrid>\n </>\n );\n};\n\nexport default Availabilities;\n","import dayjs from 'dayjs';\nimport { UseFormGetValues } from 'react-hook-form';\n\nimport { useLoadMyEventsQuery } from '../../../redux/api/eventApi';\nimport { safeStringDateParse } from '../../../util/safeStringDateParse';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { AvailabilityForm } from '@aclito/shared/types';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { selectAvailabilities } from '@aclito/shared/redux/api/availabilityApi';\n\nexport const useAvailabilityCompleteEdit = (\n getValues: UseFormGetValues<AvailabilityForm>,\n availabilityId: string | undefined,\n) => {\n const { data } = useLoadMyEventsQuery({\n nextToken: null,\n });\n const myEvents = data?.result ?? [];\n\n const cachedAvailabilities = useAppSelector(selectAvailabilities);\n\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const alreadyHasEvent = () => {\n if (userInfo.aliases.length) return false;\n\n const values = getValues();\n const date = dayjs(values.date);\n const dateTo = dayjs(values.date).add(\n safeStringDateParse(values.duration),\n 'hours',\n );\n\n return myEvents.some(\n (event) =>\n (date <= dayjs(event.date) && dateTo >= dayjs(event.endDate)) ||\n (date >= dayjs(event.date) && dateTo <= dayjs(event.endDate)),\n );\n };\n\n const alreadyHasAvailability = () => {\n if (userInfo.aliases.length || !cachedAvailabilities) return false;\n\n const values = getValues();\n const date = dayjs(values.date);\n const dateTo = dayjs(values.date).add(\n safeStringDateParse(values.duration),\n 'hours',\n );\n return cachedAvailabilities.some(\n (availability) =>\n availability.id !== availabilityId &&\n ((date <= dayjs(availability.from) &&\n dateTo >= dayjs(availability.to)) ||\n (date >= dayjs(availability.from) &&\n dateTo <= dayjs(availability.to))),\n );\n };\n\n return { alreadyHasAvailability, alreadyHasEvent };\n};\n","import { FieldErrors, FieldValues } from 'react-hook-form';\n\nexport const formErrorMapper = <K extends string, T extends FieldValues>(\n errorRecord: FieldErrors<T>,\n tx: Record<K, string>,\n) => {\n const errs: Partial<Record<K, string>> = (\n Object.keys(errorRecord) as Array<K>\n ).reduce(\n (obj, key) =>\n Object.assign(obj, {\n [key]: `${tx[key]}: ${errorRecord[key]?.message}`,\n }),\n {},\n );\n return errs;\n};\n","import { FieldValues, SubmitErrorHandler } from 'react-hook-form';\n\nimport { useFlashMessageContext } from '../providers/FlashMessageProvider';\n\nimport { formErrorMapper } from '@aclito/shared/util/formErrorMapper';\n\nexport const useFormErrorMap = <K extends string, T extends FieldValues>(\n translatedErrorKeys: Record<K, string>,\n) => {\n const { showMessage } = useFlashMessageContext();\n\n const onError: SubmitErrorHandler<T> = (err) => {\n const errs = formErrorMapper(err, translatedErrorKeys);\n Object.values(errs).forEach((errorMessage) => {\n showMessage({ message: errorMessage as string, type: 'danger' });\n });\n };\n\n return { onError };\n};\n","import { useShowFlashMessage, useTranslate } from '@aclito/shared/hooks';\nimport { SubmitHandler } from 'react-hook-form';\nimport {\n AlertErrorAvailabilityKeys,\n AvailabilityForm,\n} from '@aclito/shared/types';\nimport { useFormErrorMap } from '@aclito/shared/hooks/useFormErrorMap';\n\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useAvailabilityCreateEdit = (\n handleSubmit: (formValues: AvailabilityForm) => Promise<void>,\n alreadyHasEvent: boolean,\n alreadyHasAvailability: boolean,\n) => {\n const t = useTranslate();\n\n const showMessage = useShowFlashMessage();\n\n const nav = useNavigate();\n const navBack = () => {\n nav(-1);\n };\n\n const onSubmit: SubmitHandler<AvailabilityForm> = async (values) => {\n if (alreadyHasEvent) {\n showMessage('availabilityEditHasEvent');\n return;\n }\n if (alreadyHasAvailability) {\n showMessage('availabilityEditHasAvailability');\n return;\n }\n\n await handleSubmit(values);\n };\n\n const tx: Record<AlertErrorAvailabilityKeys, string> = {\n date: t('events.new.date'),\n repeatAfter: t('availability.new.repetitionInterval'),\n numberOfAvailabilities: t('availability.new.numberOfAvailabilities'),\n duration: t('events.new.duration'),\n };\n const { onError } = useFormErrorMap(tx);\n\n return { onSubmit, onError, navBack };\n};\n","import dayjs from 'dayjs';\n\nexport const calculateDateDiff = (fstDate: string, sndDate: string) =>\n dayjs(fstDate).diff(sndDate);\n","import dayjs from 'dayjs';\nimport { Availability } from '@aclito/entities';\n\nimport { config } from '../../../config';\nimport { AvailabilityForm, txFn } from '../../../types';\nimport { translate } from '../../../util/selectObject';\nimport { calculateDateDiff } from '../../../util/calculateDateDiff';\n\nimport { translateDateFormat } from '@aclito/shared/util/translateDateFormat';\n\nexport const composeInitialEditValues = (\n t: txFn,\n availability: Availability,\n): AvailabilityForm => ({\n date: availability.from,\n duration: translateDateFormat(\n dayjs()\n .startOf('day')\n .add(\n calculateDateDiff(availability.to, availability.from),\n 'milliseconds',\n )\n .toString(),\n 'time.display',\n ),\n activities: availability?.activities?.length\n ? translate(\n availability.activities.map((s) => ({\n item: config.activities[s].item,\n id: s,\n })),\n t,\n )\n : undefined,\n repeatAfter: undefined,\n repetitionId: availability.repetitionId ?? null,\n numberOfAvailabilities: undefined,\n location: undefined,\n repeating: false,\n});\n","import type { Availability } from '@aclito/entities';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { ActivitiesKey, AvailabilityForm } from '@aclito/shared/types';\nimport { composeInitialEditValues } from '@aclito/shared/features/availability/utils/composeInitialEditValues';\nimport { useUpdateAvailabilityMutation } from '@aclito/shared/redux/api/availabilityApi';\n\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useAvailabilityEdit = (availability: Availability | undefined) => {\n const t = useTranslate();\n const nav = useNavigate();\n const [updateAvailability] = useUpdateAvailabilityMutation();\n\n const initialValues =\n availability && composeInitialEditValues(t, availability);\n\n const handleSubmit = async (formValues: AvailabilityForm) => {\n if (availability) {\n nav(-1);\n\n await updateAvailability({\n id: availability.id,\n from: formValues.date,\n duration: formValues.duration ?? undefined,\n location: formValues.location,\n activities: formValues.activities?.length\n ? (formValues.activities.map(\n (activity) => activity.id,\n ) as ActivitiesKey[])\n : [],\n }).unwrap();\n }\n };\n\n return { initialValues, handleSubmit };\n};\n","import dayjs, { Dayjs, ManipulateType } from 'dayjs';\n\nimport { SelectObject } from '../types';\n\ninterface GenerateDatesData {\n repeatAfter: SelectObject;\n numberToGenerate: string;\n date: string;\n}\n\nexport const generateDates = (data: GenerateDatesData): string[] => {\n const startDate = dayjs(data.date);\n const minutes = dayjs(data.date).minute();\n const hours = dayjs(data.date).hour();\n\n const frequency: ManipulateType =\n data.repeatAfter.id === 'daily'\n ? 'day'\n : data.repeatAfter.id === 'weekly'\n ? 'week'\n : data.repeatAfter.id === 'monthly'\n ? 'month'\n : 'day';\n\n const arrayDates: Dayjs[] = [];\n\n for (let i = 0; i < Number(data.numberToGenerate); ++i) {\n arrayDates.push(\n dayjs(\n startDate\n .add(i === 0 ? 0 : i, frequency)\n .minute(minutes)\n .hour(hours),\n ),\n );\n }\n\n return arrayDates.map((generatedDate) =>\n generatedDate.set('seconds', 0).set('milliseconds', 0).toISOString(),\n );\n};\n","import { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { useFormContext } from 'react-hook-form';\n\nimport { AvailabilityForm } from '../../../types';\n\nimport { generateDates } from '@aclito/shared/util/generateDates';\nimport { useSelectObject } from '@aclito/shared/hooks';\nimport { availabilityActions } from '@aclito/shared/redux/slices';\n\nexport const useRepeatingForm = () => {\n const dispatch = useDispatch();\n\n const { getValues, watch } = useFormContext<AvailabilityForm>();\n\n const { translatedRepeatChoices } = useSelectObject();\n\n const watchDate = watch('date');\n const watchRepeat = watch('repeating');\n const watchNumberOfAvailabilities = watch('numberOfAvailabilities');\n const watchRepeatAfter = watch('repeatAfter');\n const watchDuration = watch('duration');\n\n useEffect(() => {\n if (watchRepeat) {\n if (watchDate && watchRepeatAfter?.item) {\n if (watchRepeatAfter && watchNumberOfAvailabilities) {\n dispatch(\n availabilityActions.updateAvailabilityDates({\n date: generateDates({\n repeatAfter: watchRepeatAfter,\n date: watchDate,\n numberToGenerate: watchNumberOfAvailabilities,\n }),\n }),\n );\n } else {\n dispatch(\n availabilityActions.updateAvailabilityDates({\n date: watchDate ? [watchDate] : [],\n }),\n );\n }\n }\n } else {\n dispatch(\n availabilityActions.updateAvailabilityDates({\n date: watchDate ? [watchDate] : [],\n }),\n );\n }\n }, [watchRepeat, watchRepeatAfter, watchDate, watchNumberOfAvailabilities]);\n\n return {\n ...getValues(),\n translatedRepeatChoices,\n watchDuration,\n watchDate,\n };\n};\n","import { translateDateFormat } from './translateDateFormat';\n\nexport const formatDate = (firstDate: string, secondDate: string) =>\n `${translateDateFormat(firstDate, 'date.full')} - ${translateDateFormat(\n secondDate,\n 'time.display',\n )}`;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { useRepeatingForm } from '@aclito/shared/features/availability/hooks/useRepeatingForm';\nimport React from 'react';\nimport { availabilitySelectors } from '@aclito/shared/redux/slices/availabilitySlices';\nimport dayjs from 'dayjs';\nimport styled from 'styled-components';\nimport { formatDate } from '@aclito/shared/util/formatRepeatingDate';\nimport { Space } from '@mantine/core';\nimport { safeStringDateParse } from '@aclito/shared/util/safeStringDateParse';\n\nimport {\n HStack,\n VStack,\n Text,\n ValidatedSelect,\n ValidatedSwitch,\n ValidatedDateTimePicker,\n ValidatedTimeInput,\n ValidatedNumberInput,\n} from '@/components';\n\ninterface DateFormProps {\n showRepeating: boolean;\n}\n\nconst DateForm: React.FC<DateFormProps> = ({ showRepeating }) => {\n const availabilityDates = useAppSelector(\n availabilitySelectors.availabilityDates,\n );\n\n const { repeating, translatedRepeatChoices, watchDuration } =\n useRepeatingForm();\n\n return (\n <VStack>\n <VStack>\n <ValidatedDateTimePicker\n name=\"date\"\n {...{\n required: true,\n txLabel: 'availability.new.datefrom',\n txPlaceholder: 'availability.new.datefrom',\n minDate: dayjs().toDate(),\n maxDate: dayjs().add(1, 'year').toDate(),\n }}\n />\n\n <ValidatedTimeInput\n required\n txLabel=\"events.new.duration\"\n name=\"duration\"\n txPlaceholder=\"time.display\"\n />\n\n {showRepeating && (\n <ValidatedSwitch\n txLabel=\"availability.new.repeating\"\n name=\"repeating\"\n />\n )}\n </VStack>\n\n {repeating && (\n <VStack>\n <ValidatedSelect\n txLabel=\"availability.new.repetitionInterval\"\n txPlaceholder=\"availability.new.repetitionInterval\"\n name=\"repeatAfter\"\n options={translatedRepeatChoices}\n required\n />\n <ValidatedNumberInput\n txLabel=\"availability.new.numberOfAvailabilities\"\n txPlaceholder=\"availability.new.numberOfAvailabilities\"\n name=\"numberOfAvailabilities\"\n min={1}\n max={180}\n />\n </VStack>\n )}\n <Space h={20} />\n {watchDuration &&\n availabilityDates.date?.map((startDate: string, index: number) => {\n const [hour, minute] = watchDuration.split(':');\n return (\n <Items key={index}>\n <Text>\n {formatDate(\n startDate,\n dayjs(availabilityDates.date[index])\n .add(safeStringDateParse(hour), 'hour')\n .add(safeStringDateParse(minute), 'minute')\n .toISOString(),\n )}\n </Text>\n {/*TODO: update BE payload #940*/}\n {/*{availabilityDates.date.length > 1 && (*/}\n {/* <>*/}\n {/* <StyledIcon*/}\n {/* icon={'remove'}*/}\n {/* size={20}*/}\n {/* color=\"red\"*/}\n {/* onClick={() => {*/}\n {/* dispatch(*/}\n {/* availabilityActions.removeAvailabilityDate(index),*/}\n {/* );*/}\n {/* }}*/}\n {/* />*/}\n {/* </>*/}\n {/*)}*/}\n </Items>\n );\n })}\n </VStack>\n );\n};\n\nconst Items = styled(HStack)`\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid;\n border-bottom-color: ${({ theme }) => theme.grey50};\n`;\n\n// const StyledIcon = styled(Icon)`\n// transition: transform 200ms ease-in-out;\n// &:hover {\n// cursor: pointer;\n// transform: scale(1.3);\n// }\n// `;\n\nexport default DateForm;\n","import { config } from '../../../config';\nimport { M_TO_KM_CONVERSION } from '../../../util/constants';\n\nexport const calculateCircleRadius = () =>\n parseInt(config.distance.availabilitiesDefaultDistance) * M_TO_KM_CONVERSION;\n","import { GoogleMap, useJsApiLoader, Circle } from '@react-google-maps/api';\nimport { Box } from '@mantine/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled, { useTheme } from 'styled-components';\nimport { AvailabilityForm, UserLocation } from '@aclito/shared/types';\nimport { calculateCircleRadius } from '@aclito/shared/features/availability/utils/calculateCircleRadius';\nimport { useFormContext } from 'react-hook-form';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { locationSelectors } from '@aclito/shared/redux/slices/locationSlice';\n\nimport MapGuide from '../Maps/MapGuide';\n\nimport { HStack, VStack } from '@/components';\nimport { MAP_API_KEY, MAP_BORDER_RADIUS } from '@/util/constants';\n\nconst Place: React.FC = () => {\n const { setValue } = useFormContext<AvailabilityForm>();\n const { isLoaded: isMapLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n const mapRef = useRef(null);\n const circleRadius = calculateCircleRadius();\n\n const userLocation = useAppSelector(locationSelectors.userLocation);\n\n const [currentCenter] = useState<UserLocation>(userLocation);\n\n const [circleCenter, setCircleCenter] = useState({\n lat: userLocation.latitude,\n lng: userLocation.longitude,\n });\n\n const onMapClick = (event: google.maps.MapMouseEvent) => {\n const latitude = event?.latLng?.lat();\n const longitude = event?.latLng?.lng();\n\n if (latitude && longitude) {\n setCircleCenter({\n lat: latitude,\n lng: longitude,\n });\n\n setValue('location', {\n lat: latitude,\n lon: longitude,\n });\n }\n };\n\n useEffect(() => {\n setValue('location', {\n lat: userLocation.latitude,\n lon: userLocation.longitude,\n });\n }, [setValue, userLocation.latitude, userLocation.longitude]);\n\n const theme = useTheme();\n\n return (\n <>\n {isMapLoaded && (\n <VStack>\n <ContainerPlace>\n <Box sx={{ position: 'relative', zIndex: 1, width: '100%' }}>\n <GoogleMap\n onClick={onMapClick}\n ref={mapRef}\n options={{\n streetViewControl: false,\n fullscreenControl: false,\n }}\n mapContainerStyle={mapContainer}\n center={currentCenter}\n zoom={7}\n >\n <Circle\n radius={circleRadius}\n center={circleCenter}\n options={{\n fillColor: theme.mapCircle,\n strokeColor: theme.mapCircleStroke,\n strokeWeight: 1,\n fillOpacity: 1,\n }}\n onClick={onMapClick}\n />\n </GoogleMap>\n </Box>\n <MapGuide />\n </ContainerPlace>\n </VStack>\n )}\n </>\n );\n};\n\nconst mapContainer = {\n height: 400,\n borderRadius: MAP_BORDER_RADIUS,\n};\n\nconst ContainerPlace = styled(HStack)`\n align-items: flex-start;\n justify-content: center;\n width: 100%;\n`;\n\nexport default Place;\n","import type { FormatXMLElementFn, PrimitiveType } from 'intl-messageformat';\nimport {\n Message,\n UserInfo,\n Event,\n Location,\n Organization,\n EmojiMap,\n Product,\n PaymentStatus,\n PaymentArray,\n ProductType,\n} from '@aclito/entities';\nimport type { IconType } from '@aclito/ui-web/components/Icons/Icon';\n\nimport en from '../i18n/messages/en.json';\nimport cs from '../i18n/messages/cs.json';\nimport sk from '../i18n/messages/sk.json';\nimport { config } from '../config';\nimport { useTranslate, useTranslateDate } from '../hooks';\nimport { OrganizationTags } from '../features/organization/types/types';\nimport { EventTags } from '../features/event/types/types';\n\nexport type ProductFinishMap = Map<\n string,\n Product & { amount: number; eventId?: string }\n>;\nexport type ProductFinishRecord = Record<string, PaymentArray>;\n\nexport type UserLocation = Omit<\n InitialLocation,\n 'latitudeDelta' | 'longitudeDelta'\n>;\nexport type MemberType = 'admin' | 'powerUser' | 'member';\nexport interface UserWithMembershipType extends UserInfo {\n type: MemberType;\n}\nexport type UserRank = { id: string; name: string; rank: { pts: number } };\nexport type MyRank = {\n id: string;\n name: string;\n rank: { pts: number; position: number };\n};\nexport type txFn = ReturnType<typeof useTranslate>;\nexport type txDateFn = ReturnType<typeof useTranslateDate>;\nexport type AlertErrorEventKeys = keyof Omit<\n EventForm,\n | 'switchRepeating'\n | 'org'\n | 'productSub'\n | 'productOneOff'\n | 'forFree'\n | 'repetitionInterval'\n | 'enableQueue'\n | 'private'\n | 'dontParticipate'\n | 'unlimited'\n | 'tags'\n>;\nexport type AlertErrorAvailabilityKeys = keyof Pick<\n AvailabilityForm,\n 'date' | 'repeatAfter' | 'numberOfAvailabilities' | 'duration'\n>;\nexport type ShareType = 'org' | 'event';\n\nexport type LocaleType = keyof typeof config.language;\n\nexport type Theme = 'light' | 'dark';\n\nexport type ValueOf<T> = T[keyof T];\n\nexport type NoUndefinedField<T> = {\n [P in keyof T]-?: NoUndefinedField<NonNullable<T[P]>>;\n};\n\nexport type UnionToIntersection<U> = (\n U extends any ? (k: U) => void : never\n) extends (k: infer I) => void\n ? I\n : never;\nexport type PickEnum<T, K extends T> = {\n [P in keyof K]: P extends K ? P : never;\n};\nexport type TranslateKey = keyof typeof en & keyof typeof cs & keyof typeof sk;\nexport type ActivitiesKey = keyof typeof config.activities;\nexport type EmojisKey = keyof typeof config.emojis;\nexport type EmojiObject = Record<EmojisKey, { item: string }>;\nexport type AllIcons = IconType | ActivitiesKey | GenderKey | RepeatingKey;\nexport type GenderKey = keyof typeof config.gender.filter;\nexport type GenderUserKey = keyof typeof config.gender.signup;\nexport type LanguagesKey = keyof typeof config.allLanguages;\nexport type AgeKey = keyof typeof config.age;\nexport type RepeatingKey = 'repeating';\n\nexport enum AvailabilityActivities {\n ANY_ACTIVITY = 'anyActivity',\n CHOOSE_ACTIVITY = 'chooseActivity',\n MY_ACTIVITIES = 'myActivities',\n}\n\nexport type TranslateValues = Record<\n string,\n PrimitiveType | FormatXMLElementFn<string, any>\n>;\n\nexport type ObjectFromList<T extends ReadonlyArray<string>, V = string> = {\n [K in T extends ReadonlyArray<infer U> ? U : never]: V;\n};\n\nexport interface SignInForm {\n username: string;\n password: string;\n}\nexport type LeaveForm = { area: string };\n\nexport interface InitialLocation {\n latitude: number;\n longitude: number;\n lat: number;\n lng: number;\n lon: number;\n latitudeDelta: number;\n longitudeDelta: number;\n}\n\nexport interface OrgFilter {\n name: string;\n}\n\nexport interface OrganizationForm {\n name: string;\n maxMembers: number | undefined;\n description: string;\n private: boolean;\n address: string;\n unlimited: boolean;\n file: string | undefined;\n image: ImageValueShape;\n contact: boolean;\n tags: OrganizationTags;\n telephone: string;\n email: string;\n}\n\nexport interface AvailabilityForm {\n duration: string | null;\n date: string | undefined;\n location: Location | undefined;\n activities: SelectObject[] | undefined;\n repeating: boolean;\n repeatAfter: SelectObject | undefined;\n numberOfAvailabilities: string | undefined;\n repetitionId: string | null;\n}\n\nexport interface NotificationBody {\n bodyTranslations?: string;\n titleTranslations: string;\n secondaryTitle?: string;\n action?: string;\n message?: string;\n}\n\nexport interface ProfileInfoForm {\n languages: SelectObject[];\n activities: SelectObject[];\n age: SelectObject;\n gender: SelectObject;\n name: string;\n surname: string;\n description: string;\n image: ImageValueShape;\n file: string | undefined;\n}\n\nexport type OnRemoveMemberFunction = (id: string) => void;\nexport type OnEditMemberFunction = (type: MemberType, id: string) => void;\n\nexport interface i18<T extends string> {\n translations: Record<T, string>;\n}\n\nexport interface ForgotPasswordForm {\n username: string;\n code: string;\n newPassword: string;\n}\n\nexport interface PasswordRequestForm {\n username: string;\n}\n\nexport interface SignUpForm {\n username: string;\n password: string;\n}\n\nexport interface IMessage extends Omit<Message, 'createdAt' | 'user'> {\n user: {\n _id: string | number;\n userInfo: UserInfo | undefined;\n };\n text: string;\n _id: string | number;\n sent: boolean;\n createdAt: Date | number;\n}\n\nexport interface EventForm {\n switchRepeating: boolean;\n repeatAfter: SelectObject | undefined;\n numberOfEvents: string | undefined;\n price: number | '' | undefined;\n forFree: boolean;\n players: number | '' | undefined;\n info: string;\n activity: SelectObject | undefined;\n date: string | null;\n duration: string | null;\n gender: SelectObject;\n place: SelectObject | undefined;\n level: SelectObject;\n name: string;\n newPlace?: string;\n externalLink: string;\n linkRequired: boolean;\n org: SelectObject | undefined;\n productOneOff: SelectObject | undefined;\n productSub: SelectObject | undefined;\n requireConfirm: boolean;\n hoursConfirm: string | undefined;\n dontParticipate: boolean;\n trainer?: SelectObject | null;\n enableQueue: boolean;\n private: boolean;\n unlimited: boolean;\n tags: EventTags;\n}\n\nexport interface EventWithPlayers extends Event {\n leaderInfo: UserInfo;\n playersInfo: UserInfoWithAlias[];\n queuePlayersInfo: UserInfoWithAlias[];\n}\n\nexport interface UserInfoWithAlias extends UserInfo {\n aliasId?: string;\n}\n\nexport interface FormattedEvent extends Omit<Event, 'activityType'> {\n activityType: ActivitiesKey;\n formattedEndDate: string;\n formattedEndTime: string;\n formattedTime: string;\n formattedDate: string;\n txActivity?: string;\n txLevel?: string;\n txGender?: string;\n}\n\nexport interface FormattedUserInfo extends UserInfo {\n formattedGender: string;\n formattedLanguages: string[];\n formattedAge: string;\n formattedActivities: string[];\n}\n\nexport interface FormattedEventWithPlayers\n extends FormattedEvent,\n Omit<EventWithPlayers, 'activityType'> {\n activityType: ActivitiesKey;\n}\n\nexport interface EventWithDateObject\n extends Omit<FormattedEvent, 'date' | 'endDate'> {\n date: Date;\n endDate: Date;\n}\n\nexport type SnackBarIconType =\n | 'notificationError'\n | 'notificationWarning'\n | 'notificationSuccess';\n\nexport type LocaleIconType = 'localeEN' | 'localeCS' | 'localeSK';\n\nexport interface SelectObject {\n item: string;\n id: string;\n}\n\nexport interface MarkerSimpleMap {\n latitude: number;\n longitude: number;\n name?: string;\n id: string;\n activityType?: ActivitiesKey;\n place?: string;\n placeId?: string;\n}\n\nexport interface MemberCardProps {\n member: UserWithMembershipType;\n withControls?: boolean;\n onRemoveMember?: OnRemoveMemberFunction;\n onEditMember?: OnEditMemberFunction;\n myRole: MemberType;\n myId: string;\n org: Organization;\n emojis: EmojiMap | undefined;\n index: number;\n}\n\nexport type BannersKey =\n | 'eventRunning'\n | 'eventRepeating'\n | 'orgAdmin'\n | 'orgMember'\n | 'orgPowerUser'\n | 'orgTypeTeam'\n | 'orgTypeClub'\n | 'orgTypeOrganization'\n | 'joinedAlias'\n | 'queuedAlias'\n | 'confirmedAlias'\n | 'eventOrganizer'\n | 'eventTrainer'\n | 'eventForKids'\n | 'eventForAdults'\n | 'alias'\n | 'RESERVANTO'\n | 'CHYTRA_REZERVACE'\n | PaymentStatus\n | ProductType;\nexport type ImageValuePrefix = 'SEED:' | 'FILE:';\nexport type ImageValueShape = `${ImageValuePrefix}${string}` | 'BASIC';\nexport type LocationServices = 'unset' | 'manual' | 'live';\n\nexport interface AchievementCardProps {\n title: Record<LocaleType, string>;\n description: Record<LocaleType, string>;\n currentProgress: number;\n totalProgress: number | undefined;\n level: number;\n unlocked: boolean;\n classic: boolean;\n icons: string[] | undefined;\n onPress?: () => void;\n}\n\nconst tooltipKey = [\n 'organizationTooltip',\n 'feedbackTooltip',\n 'eventTooltip',\n 'profileTooltip',\n 'searchTooltip',\n 'feedTooltip',\n 'productAdminTooltip',\n 'productShoppingTooltip',\n 'streakTooltip',\n 'settingsTooltip',\n] as const;\nexport type TooltipKey = (typeof tooltipKey)[number];\n\nexport type VerificationData = {\n clientId: string;\n code: string;\n username: string;\n email: string;\n};\n","import { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nimport {\n AvailabilityActivities,\n AvailabilityForm,\n SelectObject,\n} from '@aclito/shared/types';\nimport { config } from '@aclito/shared/config';\nimport { useAppSelector, useSelectObject } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nexport const useAvailabilityEdit = () => {\n const { setValue, getValues } = useFormContext<AvailabilityForm>();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const [radioValue, setRadioValue] = useState<AvailabilityActivities>(\n getValues().activities?.length\n ? AvailabilityActivities.CHOOSE_ACTIVITY\n : AvailabilityActivities.ANY_ACTIVITY,\n );\n\n const { translate, translatedActivities } = useSelectObject();\n\n const handleRadioChange = (\n value: AvailabilityActivities,\n initialActivities: SelectObject[],\n ) => {\n setRadioValue(value);\n if (value === AvailabilityActivities.MY_ACTIVITIES) {\n setValue(\n 'activities',\n translate(\n userInfo.activities.map((s) => ({\n item: config.activities[s].item,\n id: s,\n })),\n ),\n );\n }\n if (value === AvailabilityActivities.CHOOSE_ACTIVITY) {\n setValue('activities', initialActivities);\n }\n\n if (value === AvailabilityActivities.ANY_ACTIVITY) {\n setValue('activities', undefined);\n }\n };\n\n return {\n handleRadioChange,\n radioValue,\n setRadioValue,\n translatedActivities,\n };\n};\n","import React from 'react';\nimport { AvailabilityActivities, SelectObject } from '@aclito/shared/types';\nimport { useAvailabilityEdit } from '@aclito/shared/features/availability/hooks/useAvailabilityEdit';\n\nimport {\n VStack,\n ValidatedMultiSelect,\n RadioGroup,\n RadioButton,\n} from '@/components';\n\ninterface ActivitiesProps {\n initialActivities?: SelectObject[];\n}\n\nconst Activities: React.FC<ActivitiesProps> = ({ initialActivities = [] }) => {\n const { handleRadioChange, radioValue, translatedActivities } =\n useAvailabilityEdit();\n\n const onRadioChange = (value: AvailabilityActivities) => {\n handleRadioChange(value, initialActivities);\n };\n\n return (\n <VStack>\n <RadioGroup value={radioValue} onChange={onRadioChange}>\n <VStack>\n <RadioButton\n value={AvailabilityActivities.ANY_ACTIVITY}\n txLabel=\"availability.new.anyactivity\"\n />\n <RadioButton\n value={AvailabilityActivities.MY_ACTIVITIES}\n txLabel=\"availability.new.myactivities\"\n />\n <RadioButton\n value={AvailabilityActivities.CHOOSE_ACTIVITY}\n txLabel=\"availability.new.chooseactivities\"\n />\n </VStack>\n </RadioGroup>\n {radioValue === AvailabilityActivities.CHOOSE_ACTIVITY && (\n <ValidatedMultiSelect\n options={translatedActivities}\n name=\"activities\"\n txLabel=\"availability.new.activities\"\n txPlaceholder=\"availability.new.activities\"\n />\n )}\n </VStack>\n );\n};\n\nexport default Activities;\n","import { useSchema, useTranslate } from '@aclito/shared/hooks';\nimport React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { AvailabilityForm } from '@aclito/shared/types';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useAvailabilityCompleteEdit } from '@aclito/shared/features/availability/hooks/useAvailaiblityCompleteEdit';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useAvailabilityCreateEdit } from '../../hooks/useAvailabilityCreateEdit';\n\nimport { useAvailabilityEdit } from './hooks/useAvailabilityEdit';\nimport { AvailabilityEditProps } from './interface';\n\nimport {\n SectionGrid,\n ActionButton,\n Stepper,\n TitleBar,\n useStepper,\n VStack,\n StepperButtons,\n} from '@/components';\nimport { Activities, Place, Date } from '@/common/AvailabilityForm';\nimport withRouter from '@/navigation/withRouter';\n\nconst AvailabilityEdit: React.FC<AvailabilityEditProps> = ({ state }) => {\n const availability = state?.availability;\n\n const { initialValues, handleSubmit } = useAvailabilityEdit(availability);\n const t = useTranslate();\n const { newAvailabilityValidationSchema } = useSchema();\n const { active, setActive, nextStep, prevStep } = useStepper();\n\n const steps = [\n {\n component: <Date showRepeating={false} />,\n label: t('date'),\n },\n {\n component: (\n <Activities initialActivities={initialValues?.activities ?? []} />\n ),\n label: t('availability.new.activities'),\n },\n {\n component: <Place />,\n label: t('events.new.place'),\n },\n ];\n\n const methods = useForm<AvailabilityForm>({\n //@ts-ignore\n resolver: yupResolver(newAvailabilityValidationSchema),\n defaultValues: initialValues,\n });\n\n const { alreadyHasAvailability, alreadyHasEvent } =\n useAvailabilityCompleteEdit(methods.getValues, availability?.id);\n\n const { onSubmit, onError, navBack } = useAvailabilityCreateEdit(\n handleSubmit,\n alreadyHasEvent(),\n alreadyHasAvailability(),\n );\n\n return (\n <>\n {initialValues && availability && (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"nav.availability.edit\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <StepperButtons\n {...{\n active,\n steps: steps.length,\n nextStep,\n prevStep,\n onError,\n onSubmit,\n create: false,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n )}\n </>\n );\n};\n\nexport default withRouter(AvailabilityEdit);\n","import dayjs from 'dayjs';\nimport type { Availability } from '@aclito/entities';\n\nimport { config } from '../../../config';\nimport { ActivitiesKey } from '../../../types';\nimport { useSuggestEventsQuery } from '../../../redux/api/availabilityApi';\nimport { formatEvents } from '../../event/utils/formatEvents';\n\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nexport const useAvailabilityInfo = (\n displayedAvailability: Availability | undefined,\n) => {\n const t = useTranslate();\n\n const user = useAppSelector(profileSelectors.userInfo);\n\n const { data, refetch, isSuccess, isUninitialized, isFetching } =\n useSuggestEventsQuery(displayedAvailability?.id ?? '', {\n skip: !displayedAvailability,\n });\n\n const activities = displayedAvailability?.activities?.length\n ? displayedAvailability?.activities\n : ([config.activities.any.id] as ActivitiesKey[]);\n\n const date = displayedAvailability\n ? `${dayjs(displayedAvailability?.from).format('D. MMMM HH:mm')} - ${dayjs(\n displayedAvailability.to,\n ).format('HH:mm')}`\n : t('error.availabilities.list');\n\n return {\n activities,\n suggestedEvents: formatEvents(data ?? []),\n user,\n displayedAvailability,\n date,\n refetch,\n isSuccess,\n isUninitialized,\n isFetching,\n };\n};\n","import React from 'react';\nimport { Menu } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\nimport { ButtonsProps } from '../interface';\n\nimport { Icon, ActionButton, HStack, Text } from '@/components';\n\nconst Buttons: React.FC<ButtonsProps> = ({\n handleEdit,\n handleDelete,\n compact,\n}) => {\n const theme = useTheme();\n return (\n <>\n {compact ? (\n <Menu>\n <Menu.Target>\n <ActionButton iconType={'more'} />\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n <Menu.Item\n icon={<Icon icon=\"edit\" size={20} />}\n onClick={handleEdit}\n >\n <Text tx=\"tooltip.edit\" />\n </Menu.Item>\n <Menu.Item\n icon={<Icon icon=\"delete\" size={20} />}\n onClick={handleDelete}\n >\n <Text tx=\"tooltip.delete\" />\n </Menu.Item>\n </Menu.Dropdown>\n </Menu>\n ) : (\n <HStack>\n <ActionButton\n onClick={handleEdit}\n iconType={'edit'}\n tx={'tooltip.edit'}\n />\n <ActionButton\n bg={'red10'}\n onClick={handleDelete}\n textcolor={'red'}\n iconType={'delete'}\n tx={'tooltip.delete'}\n />\n </HStack>\n )}\n </>\n );\n};\n\nexport default Buttons;\n","import React from 'react';\nimport { useAvailabilityInfo } from '@aclito/shared/features/availability/hooks/useAvailabilityInfo';\nimport styled from 'styled-components';\n\nimport { InfoProps } from '../interface';\n\nimport { Text, VStack } from '@/components';\nimport AvailabilityTags from '@/components/Cards/AvailabilityTags';\n\nconst Info: React.FC<InfoProps> = ({ availability }) => {\n const { activities, date } = useAvailabilityInfo(availability);\n\n return (\n <InfoContainer spacing={8}>\n <Data text={date} />\n <AvailabilityTags {...{ activities }} />\n </InfoContainer>\n );\n};\n\nconst InfoContainer = styled(VStack)`\n height: 100%;\n width: 100%;\n`;\n\nconst Data = styled(Text)`\n color: ${({ theme }) => theme.grey80};\n font-family: Roboto;\n font-size: 1.25rem;\n font-weight: 500;\n`;\n\nexport default Info;\n","import { Loader } from '@mantine/core';\n\nimport { SuggestionsProps } from '../interface';\n\nimport { HStack, Icon, Text } from '@/components';\nimport EventsCard from '@/components/Cards/EventsCards';\n\nconst Suggestions: React.FC<SuggestionsProps> = ({\n suggestedEvents,\n loading,\n showEmpty,\n}) => {\n if (showEmpty) {\n return (\n <HStack>\n <Icon icon={'availability'} />\n <Text tx={'flatlist.empty'} />\n </HStack>\n );\n }\n\n if (loading) {\n return <Loader />;\n }\n\n return <EventsCard data={suggestedEvents} />;\n};\n\nexport default Suggestions;\n","import { useDeleteAvailabilityMutation } from '@aclito/shared/redux/api/availabilityApi';\nimport { Availability } from '@aclito/entities';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_AVAILABILITY_EDIT } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useAvailabilityInfoWeb = (\n availability: Availability | undefined,\n) => {\n const nav = useNavigate();\n const { openConfirmModal } = useModal();\n const [deleteAvailability] = useDeleteAvailabilityMutation();\n\n const handleEdit = () => {\n if (availability) {\n nav(ROUTE_AVAILABILITY_EDIT, {\n state: { availability },\n });\n }\n };\n\n const onConfirmDelete = async () => {\n if (availability) {\n await deleteAvailability({ availabilityId: availability.id });\n }\n nav(-1);\n };\n\n const handleDelete = () => {\n openConfirmModal({\n confirmProps: { color: 'red' },\n closeOnConfirm: true,\n txTitle: 'availability.info.alert.header',\n txLabels: { confirm: 'delete', cancel: 'close' },\n onConfirm: onConfirmDelete,\n });\n };\n\n return {\n handleEdit,\n handleDelete,\n };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { useAvailabilityInfo } from '@aclito/shared/features/availability/hooks/useAvailabilityInfo';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { useListAvailabilitiesQuery } from '@aclito/shared/redux/api/availabilityApi';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { AvailabilityInfoProps } from './interface';\nimport { Buttons, Info, Suggestions } from './components';\nimport { useAvailabilityInfoWeb } from './hooks/useAvailabilityInfoWeb';\n\nimport {\n Collapsible,\n SectionGrid,\n TitleBar,\n HStack,\n VStack,\n Title,\n BackButton,\n} from '@/components';\nimport withRouter from '@/navigation/withRouter';\nimport ViewOnlyMap from '@/common/Maps/ViewOnlyMap';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\nconst AvailabilityInfo: React.FC<AvailabilityInfoProps> = ({ state }) => {\n const { data } = useListAvailabilitiesQuery({\n nextToken: null,\n });\n\n const displayedAvailability = data?.result.find(\n (item) => item.id === state?.availability.id,\n );\n\n const { suggestedEvents, isSuccess, isUninitialized, isFetching } =\n useAvailabilityInfo(displayedAvailability);\n\n const { handleDelete, handleEdit } = useAvailabilityInfoWeb(\n displayedAvailability,\n );\n\n const t = useTranslate();\n\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar id={id}>\n <HStack>\n <BackButton />\n <Title tx=\"nav.availability.info\" />\n </HStack>\n <Buttons\n {...{\n handleEdit,\n handleDelete,\n compact: isFlexWrapped || queryMobile,\n }}\n />\n </TitleBar>\n <VStack>\n <TopSection spacing={0} align={'center'}>\n <InfoSection>\n {displayedAvailability && (\n <Info {...{ availability: displayedAvailability }} />\n )}\n </InfoSection>\n </TopSection>\n {displayedAvailability && (\n <Collapsible buttonLabelTx=\"nav.map\" defaultOpen>\n <MapSection>\n <ViewOnlyMap\n type=\"circle\"\n location={displayedAvailability?.location}\n name={t('nav.availability')}\n />\n </MapSection>\n </Collapsible>\n )}\n {displayedAvailability && (\n <Collapsible buttonLabelTx=\"nav.suggestions\" defaultOpen>\n <Suggestions\n {...{\n suggestedEvents,\n loading: isFetching,\n showEmpty:\n !isUninitialized && isSuccess && !suggestedEvents.length,\n }}\n />\n </Collapsible>\n )}\n </VStack>\n </SectionGrid>\n );\n};\n\nconst TopSection = styled(HStack)`\n height: 100%;\n`;\n\nconst InfoSection = styled(VStack)``;\n\nconst MapSection = styled.div`\n height: 406px;\n width: 50%;\n`;\n\nexport default withRouter(AvailabilityInfo);\n","import { AvailabilityForm, txFn } from '../../../types';\n\nexport const composeInitialCreateValues = (_t: txFn): AvailabilityForm => ({\n date: undefined,\n duration: null,\n activities: undefined,\n location: undefined,\n numberOfAvailabilities: undefined,\n repeating: false,\n repeatAfter: undefined,\n repetitionId: null,\n});\n","import { CreateAvailabilityInput } from '@aclito/entities';\n\nimport { ActivitiesKey, AvailabilityForm } from '@aclito/shared/types';\nimport { useCreateAvailabilityMutation } from '@aclito/shared/redux/api/availabilityApi';\n\nexport const useAvailabilityCreate = () => {\n const [createAvailability] = useCreateAvailabilityMutation();\n\n const createAvailabilities = async (data: AvailabilityForm) => {\n const input: Omit<CreateAvailabilityInput, 'userID'> = {\n from: data.date!,\n duration: data.duration!,\n ...(data.numberOfAvailabilities && {\n numberOfAvailabilities: Number(data.numberOfAvailabilities),\n }),\n repeatAfter: data.repeatAfter?.id,\n location: data.location!,\n activities: data.activities?.length\n ? (data.activities.map((activity) => activity.id) as ActivitiesKey[])\n : [],\n };\n\n await createAvailability(input);\n };\n\n return {\n createAvailabilities,\n };\n};\n","import { AvailabilityForm } from '@aclito/shared/types';\nimport { composeInitialCreateValues } from '@aclito/shared/features/availability/utils/composeInitialCreateValues';\nimport { useAvailabilityCreate } from '@aclito/shared/features/availability/hooks/useAvailabilityCreate';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_AVAILABILITY } from '@/util/constants';\n\nexport const useAvailabilityNew = () => {\n const { createAvailabilities } = useAvailabilityCreate();\n const nav = useNavigate();\n const t = useTranslate();\n const initialValues = composeInitialCreateValues(t);\n\n const handleSubmit = async (formValues: AvailabilityForm) => {\n await createAvailabilities(formValues);\n\n nav(ROUTE_AVAILABILITY);\n };\n\n return { initialValues, handleSubmit };\n};\n","import { useSchema, useTranslate } from '@aclito/shared/hooks';\nimport React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { AvailabilityForm } from '@aclito/shared/types';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useAvailabilityCompleteEdit } from '@aclito/shared/features/availability/hooks/useAvailaiblityCompleteEdit';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useAvailabilityCreateEdit } from '../../hooks/useAvailabilityCreateEdit';\n\nimport { useAvailabilityNew } from './hooks/useAvailabilityNew';\n\nimport {\n SectionGrid,\n ActionButton,\n Stepper,\n TitleBar,\n useStepper,\n VStack,\n StepperButtons,\n} from '@/components';\nimport { Date, Place, Activities } from '@/common/AvailabilityForm';\n\nconst NewAvailability: React.FC = () => {\n const t = useTranslate();\n\n const { newAvailabilityValidationSchema } = useSchema();\n\n const { initialValues, handleSubmit } = useAvailabilityNew();\n const { active, setActive, nextStep, prevStep } = useStepper();\n\n const steps = [\n {\n component: <Date showRepeating={true} />,\n label: t('date'),\n },\n {\n component: <Activities />,\n label: t('availability.new.activities'),\n },\n {\n component: <Place />,\n label: t('events.new.place'),\n },\n ];\n\n const methods = useForm<AvailabilityForm>({\n //@ts-ignore\n resolver: yupResolver(newAvailabilityValidationSchema),\n defaultValues: initialValues,\n mode: 'onBlur',\n });\n\n const { alreadyHasAvailability, alreadyHasEvent } =\n useAvailabilityCompleteEdit(methods.getValues, undefined);\n\n const { onSubmit, onError, navBack } = useAvailabilityCreateEdit(\n handleSubmit,\n alreadyHasEvent(),\n alreadyHasAvailability(),\n );\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"nav.availability\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <StepperButtons\n {...{\n onSubmit,\n onError,\n active,\n steps: steps.length,\n nextStep,\n prevStep,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\nexport default NewAvailability;\n","import { createContext, useContext } from 'react';\n\nimport { EventModel } from '../classes/EventModel';\n\ntype EventFormContextType = { model: EventModel | undefined };\n\nconst EventFormContext = createContext<EventFormContextType>({\n model: undefined,\n});\n\nconst EventFormProvider = ({\n children,\n model,\n}: {\n children: React.ReactNode;\n model: EventModel | undefined;\n}) => {\n return (\n <EventFormContext.Provider value={{ model }}>\n {children}\n </EventFormContext.Provider>\n );\n};\n\nexport const useEventFormContext = () => {\n const value = useContext(EventFormContext);\n\n if (!value)\n throw new Error(\n 'useEventFormContext must be used within EventFormProvider',\n );\n\n return value;\n};\n\nexport default EventFormProvider;\n","import { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { AlertErrorEventKeys, EventForm } from '@aclito/shared/types';\nimport { SubmitHandler } from 'react-hook-form';\nimport { useFormErrorMap } from '@aclito/shared/hooks/useFormErrorMap';\n\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useEventCreateEdit = (\n handleSubmit: (data: EventForm) => Promise<void>,\n) => {\n const t = useTranslate();\n\n const nav = useNavigate();\n const navBack = () => {\n nav(-1);\n };\n\n const tx: Record<AlertErrorEventKeys, string> = {\n requireConfirm: t('events.new.confirmation.required'),\n hoursConfirm: t('events.new.confirmation.hours'),\n date: t('events.new.date'),\n gender: t('events.new.gender'),\n info: t('events.new.description'),\n level: t('events.new.level'),\n name: t('events.new.name'),\n players: t('events.new.players'),\n price: t('events.new.price'),\n activity: t('events.new.activity'),\n place: t('events.new.place'),\n newPlace: t('events.new.place'),\n externalLink: t('events.new.external.link'),\n linkRequired: t('events.new.external.link.required'),\n repeatAfter: t('events.new.repetitionInterval'),\n duration: t('events.new.duration'),\n numberOfEvents: t('events.new.numberOfEvents'),\n trainer: t('events.new.trainer'),\n };\n\n const { onError } = useFormErrorMap(tx);\n\n const onSubmit: SubmitHandler<EventForm> = async (values) => {\n await handleSubmit(values);\n };\n\n return { onSubmit, onError, navBack };\n};\n","import { useState, useEffect } from 'react';\nimport type { UserInfo } from '@aclito/entities';\n\nimport { useSelectObject } from '../../../hooks';\nimport { config } from '../../../config';\nimport { SelectObject } from '../../../types';\n\nexport const useGetActivityAndGenders = (userInfo: UserInfo) => {\n const { translate, translatedActivities, translatedFilterGender } =\n useSelectObject();\n const [allActivities, setAllActivities] =\n useState<SelectObject[]>(translatedActivities);\n\n useEffect(() => {\n if (userInfo) {\n const userActivity = translate(\n userInfo.activities.map((id) => config.activities[id]),\n );\n setAllActivities(\n [...userActivity, ...translatedActivities].filter(\n (value, index, self) =>\n index === self.findIndex((t) => t.id === value.id),\n ),\n );\n }\n }, [userInfo]);\n return { allActivities, possibleGenders: translatedFilterGender };\n};\n","import dayjs from 'dayjs';\nimport { UserInfo, Event } from '@aclito/entities';\n\nimport { config } from '../../../config';\nimport { calculateDateDiff } from '../../../util/calculateDateDiff';\nimport { EventForm, SelectObject, txFn } from '../../../types';\nimport { getByIdTranslate } from '../../../util/selectObject';\n\nimport { translateDateFormat } from '@aclito/shared/util/translateDateFormat';\n\nexport const composeInitialEditValues = (\n t: txFn,\n userInfo: UserInfo,\n event: Event,\n userPool: UserInfo[],\n): EventForm => {\n const place = event.place\n ? ({ ...event.place, item: event.place.name } as SelectObject)\n : undefined;\n\n const trainer = event.players.find((player) => player.isTrainer);\n const trainerInfo = userPool.find((user) => user.id === trainer?.id);\n\n return {\n name: event.name,\n date: event.date,\n duration: translateDateFormat(\n dayjs()\n .startOf('day')\n .add(calculateDateDiff(event.endDate, event.date), 'milliseconds')\n .toString(),\n 'time.display',\n ),\n gender: getByIdTranslate(event.gender, config.gender.filter, t),\n info: event.info,\n level: getByIdTranslate(event.minLevel.toString(), config.levels, t),\n place,\n players: event.maxPlayers === -1 ? undefined : event.maxPlayers,\n price: event.price === 0 ? undefined : event.price,\n activity: getByIdTranslate(event.activityType, config.activities, t),\n externalLink: event.externalLink ?? '',\n linkRequired: !!event.externalLink && event.externalLink.length > 0,\n forFree: event.price === 0,\n org: event.org ? { item: event.org.name, id: event.org.id } : undefined,\n productOneOff: undefined,\n unlimited: event.maxPlayers === -1,\n productSub: undefined,\n requireConfirm: event.requireConfirmation,\n hoursConfirm:\n event.requireConfirmation && event.confirmationDate\n ? dayjs(calculateDateDiff(event.date, event.confirmationDate))\n .hour()\n .toString()\n : undefined,\n dontParticipate: !event.players.find((player) => player.id === userInfo.id)\n ?.willParticipate,\n enableQueue: event.enableQueue,\n newPlace: '',\n numberOfEvents: undefined,\n repeatAfter: undefined,\n switchRepeating: false,\n tags: event.tags,\n private: !event.isVisible,\n trainer: trainerInfo\n ? ({\n id: trainerInfo.id,\n item: `${trainerInfo.name} ${trainerInfo.surname}`,\n } as SelectObject)\n : null,\n };\n};\n","import { useUpdateEventMutation } from '../../../redux/api/eventApi';\n\nimport { EventForm, EventWithPlayers } from '@aclito/shared/types';\n\nexport const useEventInfoUpdate = () => {\n const [updateEventTrigger] = useUpdateEventMutation();\n\n const updateRepeatingEvents = async (\n data: EventForm,\n eventToEdit: EventWithPlayers,\n ) => {\n await updateEventTrigger({\n data,\n id: eventToEdit.id,\n repeatingId: eventToEdit.repetitionId,\n });\n };\n\n const updateEvent = async (\n data: EventForm,\n eventToEdit: EventWithPlayers,\n ) => {\n await updateEventTrigger({ data, id: eventToEdit.id });\n };\n\n return { updateEvent, updateRepeatingEvents };\n};\n","import { Organization } from '@aclito/entities';\n\nimport { unique } from './unique';\n\nexport const getMyOrgsSelectOptions = (\n orgs: Organization[],\n userId: string,\n) => [\n ...orgs\n .filter((o) =>\n unique([...o.admins, ...o.powerUsers]).some(\n (member) => member === userId,\n ),\n )\n .map((org) => ({ ...org, item: org.name })),\n];\n","import {\n useAppSelector,\n useSchema,\n useSelectObject,\n useTranslate,\n} from '@aclito/shared/hooks';\nimport { placeSelectors } from '@aclito/shared/redux/slices/placeSlices';\nimport { useGetActivityAndGenders } from '@aclito/shared/features/event/hooks/useGetActivityAndGender';\nimport { useNavigate } from 'react-router-dom';\nimport { EventWithPlayers, EventForm } from '@aclito/shared/types';\nimport { closeAllModals } from '@mantine/modals';\nimport { composeInitialEditValues } from '@aclito/shared/features/event/utils/composeInitialEditValues';\nimport { useEventInfoUpdate } from '@aclito/shared/features/event/hooks/useEventInfoUpdate';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { getMyOrgsSelectOptions } from '@aclito/shared/util/getMyOrgsSelectOptions';\n\nimport { useModal } from '@/hooks/useModal';\nimport { ROUTE_EVENTS } from '@/util/constants';\n\nexport const useEventEdit = (model: EventModel) => {\n const { userInfo, event } = model;\n\n const t = useTranslate();\n const nav = useNavigate();\n const { editEventValidationSchema } = useSchema();\n const { levelOptions } = useSelectObject();\n const { allActivities, possibleGenders } = useGetActivityAndGenders(userInfo);\n const { openModal } = useModal();\n\n const myOrgs = useAppSelector(selectMyOrganizations);\n const isLoadingPlaces = useAppSelector(placeSelectors.placesLoading);\n\n const orgOptions = getMyOrgsSelectOptions(myOrgs, userInfo.id);\n\n const isJoined = event?.players.some((player) => player.id === userInfo?.id);\n\n const initialValues = event\n ? composeInitialEditValues(t, userInfo, event, model.event.playersInfo)\n : undefined;\n\n const { updateEvent, updateRepeatingEvents } = useEventInfoUpdate();\n\n const handleUpdateEvents = async (data: EventForm) => {\n if (event.repetitionId) {\n _updateDialog(data, event);\n } else {\n await updateEvent(data, event);\n nav(ROUTE_EVENTS);\n }\n };\n\n const _updateDialog = async (data: EventForm, e: EventWithPlayers) => {\n const onUpdate = async () => {\n closeAllModals();\n await updateEvent(data, e);\n nav(ROUTE_EVENTS);\n };\n\n const onUpdateRepeating = async () => {\n closeAllModals();\n await updateRepeatingEvents(data, event);\n nav(ROUTE_EVENTS);\n };\n\n openModal({\n txTitle: 'update.repeating',\n type: 'updateEvent',\n values: { onUpdate, onUpdateRepeating },\n });\n };\n\n return {\n isJoined,\n initialValues,\n levelOptions,\n allActivities,\n possibleGenders,\n isLoadingPlaces,\n editEventValidationSchema,\n handleUpdateEvents,\n orgOptions,\n };\n};\n","import { EventTag, EventTags } from '../types/types';\n\nexport const generateTagMappings = (selectedTag: EventTag): EventTags => {\n const tagMappings: Record<EventTag, EventTags> = {\n [EventTag.ADULTS]: { adults: true, all: false, kids: false },\n [EventTag.KIDS]: { adults: false, all: false, kids: true },\n [EventTag.ALL]: { adults: false, all: true, kids: false },\n };\n\n return tagMappings[selectedTag];\n};\n","import { getCommonInputLabelStyle } from '@aclito/ui-web/utils/styles';\nimport { getCurrentTag } from '@aclito/shared/features/event/utils/getEventTag';\nimport { EventTag } from '@aclito/shared/features/event/types/types';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\nimport { generateTagMappings } from '@aclito/shared/features/event/utils/mapEventTags';\nimport { EventForm, SelectObject } from '@aclito/shared/types';\nimport { useFormContext } from 'react-hook-form';\n\nimport {\n HStack,\n ValidatedInput,\n ValidatedSelect,\n VStack,\n ValidatedTextArea,\n Text,\n Tabs,\n TagButton,\n ValidatedSwitch,\n} from '@/components';\n\ninterface DescriptionProps {\n allActivities: SelectObject[];\n possibleGenders: SelectObject[];\n levelOptions: SelectObject[];\n}\n\nconst Description: React.FC<DescriptionProps> = ({\n allActivities,\n possibleGenders,\n levelOptions,\n}) => {\n const { watch, setValue } = useFormContext<EventForm>();\n\n const allActivitiesNoAny = allActivities.filter(\n (activity) => activity.id !== 'any',\n );\n\n const watchLinkRequired = watch('linkRequired');\n const tags = watch('tags');\n\n const theme = useTheme();\n\n const handleTabIndexChange = (eventTag: EventTag) => {\n setValue('tags', generateTagMappings(eventTag));\n };\n\n return (\n <VStack>\n <ValidatedInput\n txLabel=\"events.new.name\"\n txPlaceholder=\"events.new.name\"\n name=\"name\"\n required\n />\n <ValidatedSelect\n name=\"activity\"\n options={allActivitiesNoAny}\n txLabel=\"events.new.activity\"\n txPlaceholder=\"events.new.activity\"\n required\n />\n\n <VStack spacing={4}>\n <Text\n style={{ ...getCommonInputLabelStyle(theme) }}\n tx=\"events.new.tab.tags\"\n />\n <Text\n style={{\n ...getCommonInputLabelStyle(theme),\n color: theme.grey30,\n }}\n tx=\"events.new.tab.tags.info\"\n />\n <Tabs\n unstyled\n mt={'5px'}\n maw={'max-content'}\n style={{\n flexDirection: 'row',\n flex: 1,\n rowGap: 20,\n }}\n selectedIndex={getCurrentTag(tags)}\n setSelectedIndex={(index) => handleTabIndexChange(index as EventTag)}\n >\n <TagButton value={EventTag.ALL} tx=\"events.new.tab.all\" />\n <TagButton value={EventTag.KIDS} tx=\"events.new.tab.kids\" />\n <TagButton value={EventTag.ADULTS} tx=\"events.new.tab.adults\" />\n </Tabs>\n </VStack>\n\n <ValidatedTextArea\n optional\n txLabel=\"events.new.description\"\n txPlaceholder=\"events.new.description\"\n name=\"info\"\n />\n\n <HStack>\n <ValidatedSelect\n style={inputStyle}\n name=\"gender\"\n options={possibleGenders}\n txLabel=\"events.new.gender\"\n txPlaceholder=\"events.new.gender\"\n required\n />\n <ValidatedSelect\n style={inputStyle}\n txLabel=\"events.new.level\"\n txPlaceholder=\"events.new.level\"\n name=\"level\"\n options={levelOptions}\n required\n />\n </HStack>\n\n <ValidatedSwitch\n name=\"private\"\n txLabel=\"org.private\"\n data-testid=\"private\"\n />\n\n <ValidatedSwitch\n name=\"linkRequired\"\n txSubLabel=\"events.new.external.link.info\"\n txLabel=\"events.new.external.link.required\"\n data-testid=\"linkRequired\"\n />\n {watchLinkRequired && (\n <ValidatedInput\n name=\"externalLink\"\n txLabel=\"events.new.external.link\"\n txPlaceholder=\"events.new.external.link\"\n required={watchLinkRequired}\n />\n )}\n </VStack>\n );\n};\n\nconst inputStyle = {\n flexGrow: 1,\n flexBasis: 0,\n};\n\nexport default Description;\n","import { PLACE_PROVIDER } from '../../../util/constants';\n\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { placeSelectors } from '@aclito/shared/redux/slices/placeSlices';\n\nexport const usePlace = (activity?: string) => {\n const places = useAppSelector(placeSelectors.places);\n const isLoading = useAppSelector(placeSelectors.placesLoading);\n const t = useTranslate();\n\n const placeSelectList = places.map((place) => ({\n ...place,\n item: place.userId.includes(PLACE_PROVIDER)\n ? `(${t('provider.aclito')}) ${place.name}`\n : place.name,\n }));\n\n return {\n placeSelectList: placeSelectList.filter((p) =>\n p.activities.includes(activity ?? ''),\n ),\n allList: placeSelectList,\n isLoading,\n };\n};\n","import { useAppSelector, useSchema } from '@aclito/shared/hooks';\nimport { locationActions, placeActions } from '@aclito/shared/redux/slices';\nimport { useState } from 'react';\nimport { EventForm, UserLocation } from '@aclito/shared/types';\nimport { useJsApiLoader } from '@react-google-maps/api';\nimport { config } from '@aclito/shared/config';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { locationSelectors } from '@aclito/shared/redux/slices/locationSlice';\nimport { usePlace } from '@aclito/shared/features/event/hooks/usePlace';\nimport { Place, Event } from '@aclito/entities';\nimport {\n M_TO_KM_CONVERSION,\n PLACE_PROVIDER,\n} from '@aclito/shared/util/constants';\n\nimport { MAP_API_KEY } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\ntype PlaceValue = { newPlace: string; newPlaceAddress?: string };\n\nexport const usePlaceWeb = (event?: Event) => {\n const dispatch = useAppDispatch();\n const userLocation = useAppSelector(locationSelectors.userLocation);\n const placesMapLocation = useAppSelector(locationSelectors.placesMapLocation);\n const delta = useAppSelector(locationSelectors.delta);\n\n const { setValue, getValues, resetField } = useFormContext();\n const { openConfirmModal } = useModal();\n\n const [activity] = useWatch<EventForm, ['activity']>({\n name: ['activity'],\n });\n\n const { allList, placeSelectList, isLoading } = usePlace(activity?.id);\n\n const [selectedPlace, setSelectedPlace] = useState<Place>();\n const [mapLocation, setMapLocation] =\n useState<UserLocation>(placesMapLocation);\n const [currentCenter, setCurrentCenter] =\n useState<UserLocation>(userLocation);\n const { newPlaceSchema } = useSchema();\n\n const { isLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n\n const circleRadius =\n parseInt(config.distance.placesDefaultDistance) * M_TO_KM_CONVERSION;\n const beenPlayed = selectedPlace?.activities?.includes(\n getValues()?.activity.id,\n );\n\n const handleUpdatePlaceActivities = async (handledPlace: Place) => {\n const shouldUpdate = !handledPlace.userId.includes(PLACE_PROVIDER);\n\n if (!handledPlace.activities?.includes(getValues()?.activity.id)) {\n openConfirmModal({\n txTitle: 'events.new.place.alert.header',\n type: 'newPlace',\n confirmProps: { color: 'red' },\n centered: true,\n txLabels: { cancel: 'no', confirm: 'continue' },\n\n onConfirm: async () => {\n await updatePlaceActivities(handledPlace, shouldUpdate);\n },\n });\n } else {\n await updatePlaceActivities(handledPlace, false);\n }\n };\n\n const updatePlaceActivities = async (\n placeToUpdate: Place,\n update: boolean,\n ) => {\n const activities = placeToUpdate.activities\n ? [...placeToUpdate.activities, getValues()?.activity.id]\n : [getValues()?.activity.id];\n\n if (getValues()?.activity && update) {\n await dispatch(\n placeActions.updatePlaceAsync({\n id: placeToUpdate.id,\n activities,\n }),\n );\n }\n\n placeToUpdate.activities = activities;\n\n setValue('place', placeToUpdate);\n dispatch(placeActions.addPlace(placeToUpdate));\n };\n\n const handleCreatePlace = async (values: PlaceValue) => {\n const newPlace = await dispatch(\n placeActions.createPlaceAsync({\n name: values.newPlace,\n location: { lat: mapLocation.lat, lon: mapLocation.lon },\n activities: [getValues()?.activity.id],\n address: values.newPlaceAddress,\n }),\n ).unwrap();\n setValue('place', { ...newPlace, item: newPlace.name });\n resetField('newPlace');\n resetField('newPlaceAddress');\n };\n const onMapClick = (e: google.maps.MapMouseEvent) => {\n if (!e.latLng) return;\n loadPlaces({\n latitude: e.latLng.lat(),\n longitude: e.latLng.lng(),\n });\n\n setCurrentCenter({\n latitude: e.latLng.lat(),\n longitude: e.latLng.lng(),\n lat: e.latLng.lat(),\n lon: e.latLng.lng(),\n lng: e.latLng.lng(),\n });\n setSelectedPlace(undefined);\n };\n\n const loadPlaces = (coords: { latitude: number; longitude: number }) => {\n const location = {\n lat: coords.latitude,\n latitude: coords.latitude,\n lng: coords.longitude,\n lon: coords.longitude,\n longitude: coords.longitude,\n };\n\n dispatch(locationActions.updatePlacesLocation(location));\n setMapLocation(location);\n\n dispatch(\n placeActions.searchNearbyPlacesAsync({\n location: {\n lat: coords.latitude,\n lon: coords.longitude,\n },\n }),\n );\n };\n const eventPlace = allList.find((p) => p.id === event?.place?.id);\n if (!eventPlace && event?.place) {\n allList.push({ ...event.place, item: event.place.name });\n }\n\n const allPlaces = event?.place\n ? [{ item: event.place.name, id: event.place.id }, ...placeSelectList]\n : placeSelectList;\n\n return {\n handleUpdatePlaceActivities,\n selectedPlace,\n setSelectedPlace,\n beenPlayed,\n activity: getValues()?.activity,\n place: getValues()?.place,\n currentCenter,\n setCurrentCenter,\n handleCreatePlace,\n setMapLocation,\n delta,\n mapLocation,\n circleRadius,\n isLoaded,\n newPlaceSchema,\n onMapClick,\n loadPlaces,\n allList,\n placeSelectList: allPlaces,\n isLoading,\n };\n};\n","import { Box, Stack } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport styled, { useTheme } from 'styled-components';\nimport { GoogleMap, Marker, Circle } from '@react-google-maps/api';\nimport {\n SubmitHandler,\n useForm,\n FormProvider,\n useFormContext,\n} from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\nimport * as yup from 'yup';\nimport { closeAllModals } from '@mantine/modals';\nimport { useEventFormContext } from '@aclito/shared/providers/EventFormProvider';\n\nimport MapGuide from '../Maps/MapGuide';\n\nimport { usePlaceWeb } from './hooks/usePlaceWeb';\n\nimport {\n ValidatedSelect,\n HStack,\n VStack,\n SmallButton,\n SubmitButton,\n Text,\n ValidatedInput,\n} from '@/components';\nimport { MAP_BORDER_RADIUS } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nconst Place = () => {\n const t = useTranslate();\n const { openModal } = useModal();\n\n const model = useEventFormContext().model;\n\n const {\n handleUpdatePlaceActivities,\n selectedPlace,\n setSelectedPlace,\n beenPlayed,\n activity,\n currentCenter,\n handleCreatePlace,\n mapLocation,\n newPlaceSchema,\n isLoaded,\n circleRadius,\n onMapClick,\n loadPlaces,\n allList,\n placeSelectList,\n isLoading,\n } = usePlaceWeb(model?.event);\n\n const theme = useTheme();\n type NewPlaceForm = yup.InferType<typeof newPlaceSchema>;\n const initialValues: NewPlaceForm = {\n newPlace: '',\n newPlaceAddress: '',\n };\n\n const methods = useForm<NewPlaceForm>({\n defaultValues: initialValues,\n resolver: yupResolver(newPlaceSchema),\n });\n\n const { watch } = useFormContext();\n\n const watchPlace = watch('place');\n\n const onSubmit: SubmitHandler<NewPlaceForm> = async (values) => {\n openModal({\n type: 'createPlace',\n values: {\n onCreate: async () => {\n await handleCreatePlace(values);\n closeAllModals();\n },\n onBack: closeAllModals,\n },\n });\n };\n\n return (\n <VStack>\n <ValidatedSelect\n txLabel={\n activity\n ? 'events.new.place.label'\n : 'events.new.place.label.activity.not.selected'\n }\n txPlaceholder=\"events.new.place.existing\"\n name=\"place\"\n isLoading={isLoading}\n options={placeSelectList}\n disabled={!activity}\n />\n <VStack>\n {isLoaded && activity && !watchPlace && (\n <ContainerPlace>\n <ContainerPlaceBox>\n <FormProvider {...methods}>\n <Stack justify=\"center\" align=\"center\">\n <NewPlaceTitleWrapper>\n <Divider />\n <NewPlaceTitle tx=\"events.new.place.search.or.create\" />\n <Divider />\n </NewPlaceTitleWrapper>\n <Box\n sx={{\n position: 'relative',\n zIndex: 1,\n width: '100%',\n }}\n >\n <GoogleMap\n onClick={onMapClick}\n onLoad={() => loadPlaces(currentCenter)}\n options={{\n streetViewControl: false,\n fullscreenControl: false,\n }}\n mapContainerStyle={mapContainer}\n center={currentCenter}\n zoom={11}\n >\n <Marker\n draggable\n onDragEnd={onMapClick}\n icon={markerMain(theme)}\n position={mapLocation}\n />\n {allList.map((mapPlace) => (\n <Marker\n key={mapPlace.id}\n position={{\n lat: mapPlace.location.lat,\n lng: mapPlace.location.lon,\n }}\n onClick={() => setSelectedPlace(mapPlace)}\n />\n ))}\n <Circle\n onClick={onMapClick}\n radius={circleRadius}\n center={currentCenter}\n options={circleOptions(theme)}\n />\n </GoogleMap>\n </Box>\n <MapGuide />\n {!!selectedPlace &&\n allList.find((p) => p?.id === selectedPlace.id) ? (\n <InfoBox>\n <StyledVStack>\n <VStack spacing={8}>\n <Title text={selectedPlace.name} />\n <Text size={'0.9rem'} style={{ textAlign: 'center' }}>\n {beenPlayed\n ? `${activity.item} ${t(\n 'events.new.place.played',\n )}`\n : `${activity.item} ${t(\n 'events.new.place.notplayed',\n )}`}\n </Text>\n </VStack>\n <SmallButton\n fullWidth\n bg=\"primary\"\n onClick={() =>\n handleUpdatePlaceActivities(selectedPlace)\n }\n tx=\"events.new.place.select\"\n />\n </StyledVStack>\n </InfoBox>\n ) : (\n <NewPlaceFormWrapper>\n <NewPlaceFormInputs>\n <StyledValidatedInput\n name=\"newPlace\"\n txPlaceholder=\"events.new.place.name\"\n required={true}\n txLabel=\"events.new.place.name\"\n />\n <StyledValidatedInput\n name=\"newPlaceAddress\"\n txPlaceholder=\"events.new.place.address\"\n txLabel=\"events.new.place.address\"\n />\n </NewPlaceFormInputs>\n <StyledSubmitButton\n onSubmit={onSubmit}\n shape=\"round\"\n textcolor=\"primary\"\n bg=\"primary10\"\n tx=\"events.new.place.new.create\"\n />\n </NewPlaceFormWrapper>\n )}\n </Stack>\n </FormProvider>\n </ContainerPlaceBox>\n </ContainerPlace>\n )}\n </VStack>\n </VStack>\n );\n};\nconst InfoBox = styled(Box)`\n background: ${({ theme }) => theme.white};\n padding: 0.8rem 1rem;\n border-radius: 10px;\n width: 100%;\n`;\n\nconst NewPlaceFormWrapper = styled(VStack)`\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nconst NewPlaceFormInputs = styled(HStack)`\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nconst StyledValidatedInput = styled(ValidatedInput)`\n width: 100%;\n`;\n\nconst StyledSubmitButton = styled(SubmitButton)`\n width: 100%;\n`;\n\nconst Divider = styled.span`\n border-top: 1px solid ${({ theme }) => theme.grey10};\n width: 100%;\n margin: 0.5rem 0;\n`;\n\nconst NewPlaceTitleWrapper = styled.div`\n display: flex;\n width: 100%;\n gap: 1rem;\n`;\n\nconst NewPlaceTitle = styled(Text)`\n color: ${({ theme }) => theme.grey40};\n text-align: center;\n font-family: Roboto;\n font-size: 0.875rem;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n white-space: nowrap;\n`;\n\nconst Title = styled(Text)`\n text-align: center;\n font-weight: bold;\n font-size: 1rem;\n`;\nconst StyledVStack = styled(VStack)`\n justify-content: space-between;\n height: 100%;\n`;\n\nconst ContainerPlace = styled(HStack)`\n align-items: flex-start;\n justify-content: center;\n width: 100%;\n`;\n\nconst circleOptions = (theme: ThemeColorsRecord) => ({\n fillColor: theme.mapCircle,\n strokeColor: theme.mapCircleStroke,\n strokeWeight: 1,\n fillOpacity: 1,\n});\n\nconst mapContainer = {\n height: 300,\n borderRadius: MAP_BORDER_RADIUS,\n};\n\nconst ContainerPlaceBox = styled.div`\n width: 100%;\n`;\n\nconst markerMain = (theme: ThemeColorsRecord) => ({\n // eslint-disable-next-line max-len\n path: 'M -1.547 12 z M 0 0 q 2.906 0 4.945 2.039 t 2.039 4.945 q 0 1.453 -0.727 3.328 t -1.758 3.516 t -2.039 3.07 t -1.711 2.273 l -0.75 0.797 q -0.281 -0.328 -0.75 -0.867 t -1.688 -2.156 t -2.133 -3.141 t -1.664 -3.445 t -0.75 -3.375 q 0 -2.906 2.039 -4.945 t 4.945 -2.039 z',\n fillColor: theme.blue,\n fillOpacity: 1,\n strokeWeight: 0.2,\n rotation: 0,\n scale: 1.75,\n anchor: window?.google?.maps && new window.google.maps.Point(0, 20),\n});\nexport default Place;\n","import { useFormContext } from 'react-hook-form';\nimport { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { EventForm } from '../../../types';\n\nimport { generateDates } from '@aclito/shared/util/generateDates';\nimport { useSelectObject } from '@aclito/shared/hooks';\nimport { eventActions } from '@aclito/shared/redux/slices';\n\nexport const useRepeatingForm = () => {\n const dispatch = useDispatch();\n\n const { getValues, watch } = useFormContext<EventForm>();\n\n const { translatedRepeatChoices } = useSelectObject();\n\n const watchDate = watch('date');\n const watchSwitch = watch('switchRepeating');\n const watchNumberOfEvents = watch('numberOfEvents');\n const watchRepeatAfter = watch('repeatAfter');\n const watchDuration = watch('duration');\n\n useEffect(() => {\n if (watchSwitch) {\n if (watchDate && watchRepeatAfter?.item) {\n if (watchRepeatAfter && watchNumberOfEvents) {\n dispatch(\n eventActions.updateEventDates({\n date: generateDates({\n repeatAfter: watchRepeatAfter,\n date: watchDate,\n numberToGenerate: watchNumberOfEvents,\n }),\n }),\n );\n } else {\n dispatch(\n eventActions.updateEventDates({\n date: watchDate ? [watchDate] : [],\n }),\n );\n }\n }\n } else {\n dispatch(\n eventActions.updateEventDates({\n date: watchDate ? [watchDate] : [],\n }),\n );\n }\n }, [watchSwitch, watchNumberOfEvents, watchDate, watchRepeatAfter]);\n return {\n ...getValues(),\n watchDuration,\n generateDates,\n translatedRepeatChoices,\n };\n};\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport dayjs from 'dayjs';\nimport { useRepeatingForm } from '@aclito/shared/features/event/hooks/useRepeatingForm';\nimport { eventSelectors } from '@aclito/shared/redux/slices/eventSlices';\nimport { formatDate } from '@aclito/shared/util/formatRepeatingDate';\nimport styled, { useTheme } from 'styled-components';\nimport { useEventFormContext } from '@aclito/shared/providers/EventFormProvider';\nimport { safeStringDateParse } from '@aclito/shared/util/safeStringDateParse';\n\nimport {\n VStack,\n HStack,\n Text,\n ValidatedNumberInput,\n Collapsible,\n ValidatedSwitch,\n ValidatedTimeInput,\n ValidatedSelect,\n ValidatedDateTimePicker,\n} from '@/components';\n\nconst DateForm = () => {\n const eventDates = useAppSelector(eventSelectors.eventDates);\n const { translatedRepeatChoices, switchRepeating, date, watchDuration } =\n useRepeatingForm();\n const theme = useTheme();\n const model = useEventFormContext().model;\n\n return (\n <VStack>\n <VStack>\n <ValidatedDateTimePicker\n name=\"date\"\n {...{\n required: true,\n txLabel: 'events.new.date',\n txPlaceholder: 'events.new.date',\n minDate: dayjs().toDate(),\n maxDate: dayjs().add(6, 'months').toDate(),\n }}\n />\n <ValidatedTimeInput\n required\n txLabel=\"events.new.duration\"\n name=\"duration\"\n txPlaceholder=\"time.display\"\n />\n {!model && (\n <ValidatedSwitch\n txLabel=\"events.new.switchRepeating\"\n name=\"switchRepeating\"\n />\n )}\n </VStack>\n {switchRepeating && date && (\n <FormRow spacing={16}>\n <ValidatedSelect\n txLabel=\"events.new.repetitionInterval\"\n txPlaceholder=\"events.new.repetitionInterval\"\n name=\"repeatAfter\"\n options={translatedRepeatChoices}\n required\n />\n\n <ValidatedNumberInput\n txLabel=\"events.new.numberOfEvents\"\n txPlaceholder=\"events.new.numberOfEvents\"\n name=\"numberOfEvents\"\n min={1}\n max={180}\n />\n </FormRow>\n )}\n\n <Collapsible defaultOpen={false} buttonLabelTx=\"events.new.plannedEvents\">\n {watchDuration && (\n <VStack style={{ maxHeight: 300, overflowY: 'auto' }} spacing={4}>\n {eventDates.date?.map((startDate: string, index: number) => {\n const [hour, minute] = watchDuration.split(':');\n\n return (\n <Items key={index}>\n <Text color={theme.grey80}>\n {formatDate(\n startDate,\n dayjs(eventDates.date[index])\n .add(safeStringDateParse(hour), 'hour')\n .add(safeStringDateParse(minute), 'minute')\n .toISOString(),\n )}\n </Text>\n </Items>\n );\n })}\n </VStack>\n )}\n </Collapsible>\n </VStack>\n );\n};\n\nconst Items = styled(HStack)`\n display: flex;\n justify-content: space-between;\n border-radius: 0.625rem;\n padding: 0.75rem;\n background-color: ${({ theme }) => theme.primary10};\n`;\n\nconst FormRow = styled(HStack)`\n & > * {\n flex-grow: 1;\n }\n`;\n\nexport default DateForm;\n","import { Organization, UserInfo } from '@aclito/entities';\n\nimport { MemberType, UserWithMembershipType } from '../types';\n\nexport const sectionMembers = (\n org: Organization | undefined,\n membersInfo: UserInfo[],\n me: UserInfo,\n) => {\n const adminInfo: UserWithMembershipType[] =\n org?.admins?.map((admin) => ({\n ...membersInfo.find((member) => member.id === admin)!,\n type: 'admin',\n })) ?? [];\n const powerUsersInfo: UserWithMembershipType[] =\n org?.powerUsers\n ?.filter((member) => member !== org.admins.find((p) => p === member))\n .map((admin) => ({\n ...membersInfo.find((member) => member.id === admin)!,\n type: 'powerUser',\n })) ?? [];\n const memberInfo: UserWithMembershipType[] =\n org?.members\n ?.filter((member) => member !== org.admins.find((ad) => ad === member))\n ?.filter((member) => member !== org.powerUsers.find((p) => p === member))\n .map((admin) => ({\n ...membersInfo.find((member) => member.id === admin)!,\n type: 'member',\n })) ?? [];\n const adminNames: string[] =\n adminInfo?.map((a) => `${a.name} ${a.surname}`) ?? [];\n const memberNames: string[] =\n memberInfo?.map((m) => `${m.name} ${m.surname}`) ?? [];\n const myRole: MemberType = [\n ...(adminInfo ?? []),\n ...(memberInfo ?? []),\n ...(powerUsersInfo ?? []),\n ].find((m) => m.id === me.id)?.type!;\n\n return {\n adminInfo,\n memberInfo,\n powerUsersInfo,\n adminNames,\n memberNames,\n myRole,\n };\n};\n","import { useState } from 'react';\nimport { Organization } from '@aclito/entities';\n\nimport { PlayerDataType } from '../types/types';\nimport { ThemeColorsRecord } from '../../../theme/colors';\nimport { EventModel } from '../../../classes/EventModel';\n\nimport { TranslateKey, UserWithMembershipType } from '@aclito/shared/types';\nimport { sectionMembers } from '@aclito/shared/util/sectionOrgMembers';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useEventInfoSelectTrainer = (\n org?: Organization,\n model?: EventModel,\n) => {\n const { data } = useFindOrganizationQuery(\n { id: org?.id ?? '' },\n { skip: !org?.id },\n );\n\n const [selected, setSelected] = useState<PlayerDataType | undefined>();\n let playersToSelect: UserWithMembershipType[] = [];\n\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const orgMembers = data?.members ?? [];\n\n if (orgMembers) {\n const { adminInfo, powerUsersInfo } = sectionMembers(\n org,\n orgMembers,\n userInfo,\n );\n\n playersToSelect = [\n ...adminInfo.filter((a) => a.id !== userInfo.id),\n ...powerUsersInfo.filter((p) => p.id !== userInfo.id),\n ].filter((player) => player.id !== model?.event?.leader);\n }\n\n const handleOnPlayerPress = (player: PlayerDataType) => {\n setSelected(player);\n };\n\n const isSelected = (id: string) => selected?.id === id;\n\n const topText: TranslateKey = 'events.info.alias.join.title';\n\n const isPlayerPowerUser = (playerId: string) =>\n org?.powerUsers.includes(playerId) ?? false;\n\n const isPlayerAdmin = (playerId: string) =>\n org?.admins.includes(playerId) ?? false;\n\n const itemBg = (id: string, theme: ThemeColorsRecord) =>\n isSelected(id) ? `${theme.primary}1A` : theme.white;\n\n return {\n itemBg,\n topText,\n isSelected,\n selected,\n setSelected,\n handleOnPlayerPress,\n playersToSelect,\n isPlayerPowerUser,\n isPlayerAdmin,\n };\n};\n","import { Organization } from '@aclito/entities';\n\nimport { SelectObject } from '../types';\n\nexport const getOrgForTrainer = (\n formOrg: SelectObject | undefined,\n displayedOrg: Organization | undefined,\n orgsInState: Organization[],\n) => {\n if (formOrg?.id === displayedOrg?.id) {\n return displayedOrg;\n }\n return orgsInState.find((o) => formOrg?.id === o.id);\n};\n","import { Organization } from '@aclito/entities';\n\nimport { MemberType } from '../types';\n\nexport const getOrgUserRole = (\n org: Organization,\n userID: string,\n): MemberType => {\n if (org.admins?.some((memberId) => memberId === userID)) {\n return 'admin';\n }\n if (org.powerUsers?.some((memberId) => memberId === userID)) {\n return 'powerUser';\n }\n\n return 'member';\n};\n","import { Organization } from '@aclito/entities';\n\nimport { getOrgUserRole } from '@aclito/shared/util/getOrgUserRole';\n\nexport const canEditFeed = (userId: string, org: Organization) => {\n const currentUserRole = getOrgUserRole(org, userId);\n return currentUserRole === 'admin' || currentUserRole === 'powerUser';\n};\n","import { Organization } from '@aclito/entities';\n\nimport { getOrgUserRole } from '@aclito/shared/util/getOrgUserRole';\n\nexport const canCreateFeed = (userId: string, org: Organization) => {\n const currentUserRole = getOrgUserRole(org, userId);\n return currentUserRole === 'admin' || currentUserRole === 'powerUser';\n};\n","import { Organization, UserInfo } from '@aclito/entities';\n\nimport { canEditFeed } from '../features/organization/utils/canEditFeed';\nimport { canCreateFeed } from '../features/organization/utils/canCreateFeed';\nexport type OrganizationModelDetermined = Omit<\n OrganizationModel,\n 'organization'\n> & {\n organization: Organization;\n};\nexport class OrganizationModel {\n get canLeave(): boolean {\n return this._canLeave;\n }\n\n set canLeave(value: boolean) {\n this._canLeave = value;\n }\n private _organization: Organization | undefined;\n private _userInfo: UserInfo;\n private _isAdmin = false;\n private _isPowerUser = false;\n private _isMember = false;\n private _canJoin = false;\n private _canShareOrg = false;\n private _canControl = false;\n private _canEdit = false;\n private _showLeave = false;\n private _showDelete = false;\n private _showEdit = false;\n private _showAdd = false;\n private _canEditFeed = false;\n private _canCreateFeed = false;\n private _canLeave = false;\n\n constructor(organization: Organization | undefined, userInfo: UserInfo) {\n this._userInfo = userInfo;\n this._organization = organization;\n this.init();\n }\n\n init() {\n this._isAdmin = !!this._organization?.admins?.some(\n (admin) => admin === this._userInfo.id,\n );\n this._isPowerUser = !!this._organization?.powerUsers?.some(\n (member) => member === this._userInfo.id,\n );\n this._isMember = !!this._organization?.members?.some(\n (member) => member === this._userInfo.id,\n );\n this._canControl = this._isAdmin || this._isPowerUser;\n\n this._canJoin =\n !!this._organization &&\n (this._isMember === undefined ? false : !this._isMember) &&\n (this._organization.maxMembers === -1 ||\n this._organization.maxMembers > this._organization.members.length);\n\n this._canEdit = this._isAdmin;\n\n this._showLeave = this._isMember || this._isAdmin || this._isPowerUser;\n\n this._showDelete = this._isAdmin;\n\n this._showEdit = this._canControl;\n\n this._showAdd = this._canControl;\n\n this._canLeave = !this._isAdmin && this._isMember;\n\n this._canEditFeed = !!(\n this._organization && canEditFeed(this.userInfo.id, this._organization)\n );\n this._canCreateFeed = !!(\n this._organization && canCreateFeed(this.userInfo.id, this._organization)\n );\n }\n\n get canEditFeed(): boolean {\n return this._canEditFeed;\n }\n\n set canEditFeed(value: boolean) {\n this._canEditFeed = value;\n }\n\n get canCreateFeed(): boolean {\n return this._canCreateFeed;\n }\n\n set canCreateFeed(value: boolean) {\n this._canCreateFeed = value;\n }\n\n get organization(): Organization | undefined {\n return this._organization;\n }\n\n set organization(value: Organization) {\n this._organization = value;\n }\n\n get userInfo(): UserInfo {\n return this._userInfo;\n }\n\n set userInfo(value: UserInfo) {\n this._userInfo = value;\n }\n\n get isAdmin(): boolean {\n return this._isAdmin;\n }\n\n set isAdmin(value: boolean) {\n this._isAdmin = value;\n }\n\n get showLeave(): boolean {\n return this._showLeave;\n }\n\n set showLeave(value: boolean) {\n this._showLeave = value;\n }\n\n get isPowerUser(): boolean {\n return this._isPowerUser;\n }\n\n set isPowerUser(value: boolean) {\n this._isPowerUser = value;\n }\n\n get isMember(): boolean {\n return this._isMember;\n }\n\n set isMember(value: boolean) {\n this._isMember = value;\n }\n\n get canJoin(): boolean {\n return this._canJoin;\n }\n\n set canJoin(value: boolean) {\n this._canJoin = value;\n }\n\n get canShareOrg(): boolean {\n return this._canShareOrg;\n }\n\n set canShareOrg(value: boolean) {\n this._canShareOrg = value;\n }\n\n get canControl(): boolean {\n return this._canControl;\n }\n\n set canControl(value: boolean) {\n this._canControl = value;\n }\n\n get canEdit(): boolean {\n return this._canEdit;\n }\n\n set canEdit(value: boolean) {\n this._canEdit = value;\n }\n\n get showDelete(): boolean {\n return this._showDelete;\n }\n\n set showDelete(value: boolean) {\n this._showDelete = value;\n }\n\n get showEdit(): boolean {\n return this._showEdit;\n }\n\n set showEdit(value: boolean) {\n this._showEdit = value;\n }\n\n get showAdd(): boolean {\n return this._showAdd;\n }\n\n set showAdd(value: boolean) {\n this._showAdd = value;\n }\n}\n","import { Product } from '@aclito/entities';\n\nimport { SelectObject, txFn } from '../../../types';\n\nexport const getProductOptions = (products: Product[] | undefined, t: txFn) => {\n const productOptionsOneOff: SelectObject[] =\n products\n ?.filter((p) => p.type === 'one-off')\n .map((product) => ({\n id: product.id,\n item:\n product.title +\n ' ' +\n product.price +\n t(`currency.${product.currency}`),\n })) ?? [];\n const productOptionsSub: SelectObject[] =\n products\n ?.filter((p) => p.type === 'subscription')\n .map((product) => ({\n id: product.id,\n item:\n product.title +\n ' ' +\n product.price +\n t(`currency.${product.currency}`),\n })) ?? [];\n\n return { productOptionsOneOff, productOptionsSub };\n};\n","import { useFormContext } from 'react-hook-form';\nimport { EventForm } from '@aclito/shared/types';\nimport { useEffect } from 'react';\nimport { VStack } from '@aclito/ui-web/components/Layout';\nimport { useGetProductsQuery } from '@aclito/shared/redux/api/paymentApi';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { useEventFormContext } from '@aclito/shared/providers/EventFormProvider';\nimport { getProductOptions } from '@aclito/shared/features/payments/utils/productOptions';\nimport { MAX_PRICE, MIN_PRICE } from '@aclito/shared/util/constants';\n\nimport {\n ValidatedNumberInput,\n ValidatedSelect,\n ValidatedSwitch,\n} from '@/components';\n\nconst Price = () => {\n const { setValue, watch, resetField } = useFormContext<EventForm>();\n const myOrganizations = useAppSelector(selectMyOrganizations);\n const model = useEventFormContext().model;\n const eventId = model?.event.id;\n const t = useTranslate();\n\n const watchPrice = watch('price');\n const watchForFree = watch('forFree');\n const watchOrg = watch('org');\n const watchProductSub = watch('productSub');\n const watchProductOneOff = watch('productOneOff');\n\n const canDisplayProducts = !watchForFree && !!watchOrg?.id;\n const { data: products } = useGetProductsQuery(watchOrg?.id ?? '', {\n skip: !canDisplayProducts,\n });\n const organization = myOrganizations.find((o) => o.id === watchOrg?.id);\n const { productOptionsSub, productOptionsOneOff } = getProductOptions(\n products,\n t,\n );\n useEffect(() => {\n if (watchProductSub || watchProductOneOff) return;\n setValue('forFree', !watchPrice || watchPrice === 0);\n }, [watchPrice, setValue, watchProductOneOff, watchProductSub]);\n\n useEffect(() => {\n if (watchForFree) {\n resetField('price');\n setValue('price', '');\n }\n }, [setValue, watchForFree]);\n\n return (\n <VStack>\n <ValidatedSwitch\n name=\"forFree\"\n txLabel=\"event.form.price\"\n required={!watchPrice || watchPrice === 0}\n data-testid=\"forFree\"\n />\n\n {!watchForFree && (\n <>\n {!eventId && watchOrg?.id && organization?.isRegistered ? (\n <>\n <ValidatedSelect\n name=\"productOneOff\"\n options={productOptionsOneOff}\n txLabel=\"product.one-off\"\n txPlaceholder=\"payments.products\"\n data-testid=\"one-off\"\n />\n <ValidatedSelect\n name=\"productSub\"\n options={productOptionsSub}\n txLabel=\"product.subscription\"\n txPlaceholder=\"payments.products\"\n data-testid=\"subscription\"\n />\n </>\n ) : (\n <ValidatedNumberInput\n name=\"price\"\n txLabel=\"events.new.price\"\n txPlaceholder=\"events.new.price\"\n required={!watchForFree}\n min={MIN_PRICE}\n max={MAX_PRICE}\n />\n )}\n </>\n )}\n </VStack>\n );\n};\n\nexport default Price;\n","import { VStack } from '@aclito/ui-web/components/Layout';\nimport { useTheme } from 'styled-components';\nimport { useFormContext } from 'react-hook-form';\nimport { EventForm, SelectObject } from '@aclito/shared/types';\nimport { useEffect } from 'react';\nimport { Divider } from '@mantine/core';\nimport { colors } from '@aclito/shared/theme/colors';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useSearchParams } from 'react-router-dom';\nimport { useEventInfoSelectTrainer } from '@aclito/shared/features/event/hooks/useEventInfoSelectTrainer';\nimport { getOrgForTrainer } from '@aclito/shared/util/getOrgForTrainer';\nimport { OrganizationModel } from '@aclito/shared/classes/OrganizationModel';\nimport { useEventFormContext } from '@aclito/shared/providers/EventFormProvider';\n\nimport {\n ValidatedNumberInput,\n ValidatedSelect,\n ValidatedSwitch,\n} from '@/components';\nimport Price from '@/common/EventForm/Price';\n\ninterface PlayersSectionProps {\n orgOptions: SelectObject[];\n orgId?: string;\n}\n\nconst Players = ({ orgId, orgOptions }: PlayersSectionProps) => {\n const myOrgs = useAppSelector(selectMyOrganizations);\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { setValue, watch, resetField } = useFormContext<EventForm>();\n const model = useEventFormContext().model;\n const [, setParams] = useSearchParams();\n const theme = useTheme();\n\n const displayedOrg = myOrgs.find((o) => o.id === orgId);\n const modelOrg = new OrganizationModel(displayedOrg, userInfo);\n const eventId = model?.event.id;\n const isJoined = model?.isJoined;\n\n const watchRequireConfirm = watch('requireConfirm');\n\n const watchOrg = watch('org');\n const watchDontParticipate = watch('dontParticipate');\n const watchEnableQueue = watch('enableQueue');\n const watchProductSub = watch('productSub');\n const watchProductOneOff = watch('productOneOff');\n\n const { playersToSelect } = useEventInfoSelectTrainer(\n getOrgForTrainer(watchOrg, displayedOrg, myOrgs),\n model,\n );\n\n useEffect(() => {\n if (watchProductSub || watchProductOneOff) {\n setValue('enableQueue', false);\n setValue('requireConfirm', false);\n setValue('hoursConfirm', undefined);\n }\n }, [watchProductOneOff, watchProductSub]);\n\n useEffect(() => {\n if (!watchOrg) {\n setValue('dontParticipate', false);\n }\n }, [watchOrg]);\n\n const playersRequired = !!watchEnableQueue && !eventId;\n\n return (\n <VStack>\n {!(!!watchEnableQueue && !!eventId) && (\n <ValidatedNumberInput\n txLabel=\"events.new.players\"\n txPlaceholder=\"events.new.players\"\n name=\"players\"\n optional={!playersRequired}\n required={playersRequired}\n min={2}\n max={99}\n style={inputStyle}\n />\n )}\n\n {!eventId && (\n <>\n <ValidatedSelect\n optional\n name=\"org\"\n txLabel=\"nav.org\"\n txPlaceholder=\"nav.org\"\n onChange={(value) => {\n setParams((prev) => {\n if (!value) {\n prev.delete('org');\n return prev.toString();\n }\n prev.set('org', value);\n prev.set('active', '2');\n return prev.toString();\n });\n resetField('trainer');\n }}\n options={orgOptions}\n />\n <Divider color={colors.grey10} />\n </>\n )}\n\n {(!eventId || isJoined) && modelOrg.isAdmin && watchOrg && (\n <ValidatedSwitch\n onChange={() => resetField('trainer', { defaultValue: null })}\n name=\"dontParticipate\"\n txLabel=\"events.new.dontParticipate\"\n />\n )}\n {(!eventId || model?.hasTrainer || orgId) &&\n watchDontParticipate &&\n watchOrg && (\n <ValidatedSelect\n name=\"trainer\"\n txLabel=\"events.new.trainer\"\n txPlaceholder={\n !playersToSelect.length\n ? 'events.new.no.trainer'\n : 'events.new.trainer'\n }\n disabled={!playersToSelect.length}\n searchable={false}\n options={playersToSelect.map((p) => ({\n id: p.id,\n item: `${p.name} ${p.surname}`,\n }))}\n />\n )}\n\n {!eventId && (\n <>\n <ValidatedSwitch\n disabled={!!watchProductSub || !!watchProductOneOff}\n name=\"requireConfirm\"\n txSubLabel=\"events.new.confirmation.info\"\n txLabel=\"events.new.confirmation.required\"\n data-testid=\"requireConfirm\"\n />\n {watchRequireConfirm && (\n <ValidatedNumberInput\n name=\"hoursConfirm\"\n min={1}\n txLabel=\"events.new.confirmation.hours\"\n txPlaceholder=\"events.new.confirmation.hours\"\n />\n )}\n </>\n )}\n\n {!eventId && (\n <ValidatedSwitch\n disabled={!!watchProductSub || !!watchProductOneOff}\n name=\"enableQueue\"\n txLabel=\"events.new.enableQueue\"\n data-testid=\"enableQueue\"\n />\n )}\n {model?.hasProduct ? null : (\n <>\n <Divider color={theme.grey10} />\n <Price />\n </>\n )}\n </VStack>\n );\n};\n\nconst inputStyle = {\n flexGrow: 1,\n flexBasis: 0,\n};\n\nexport default Players;\n","import React from 'react';\nimport { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { Divider } from '@mantine/core';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { EventForm } from '@aclito/shared/types';\nimport { useForm, FormProvider } from 'react-hook-form';\nimport { getParticipantsCount } from '@aclito/shared/features/event/utils/getParticipantsCount';\nimport { useTheme } from 'styled-components';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useDisplayEvent } from '@aclito/shared/redux/api/eventApi';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport EventFormProvider from '@aclito/shared/providers/EventFormProvider';\n\nimport { useEventCreateEdit } from '../../hooks/useEventCreateEdit';\n\nimport { useEventEdit } from './hooks/useEventEdit';\n\nimport {\n SectionGrid,\n ActionButton,\n Stepper,\n TitleBar,\n useStepper,\n VStack,\n StepperButtons,\n} from '@/components';\nimport Description from '@/common/EventForm/Description';\nimport Place from '@/common/EventForm/Place';\nimport DateForm from '@/common/EventForm/DateForm';\nimport withRouter from '@/navigation/withRouter';\nimport { StateEventEdit } from '@/util/types';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport Players from '@/common/EventForm/Players';\n\ntype EventEditProps = TypedLocation<StateEventEdit>;\n\nconst EventEdit: React.FC<EventEditProps> = ({ state }) => {\n const event = state?.event;\n const orgId = state?.orgId;\n\n const { model } = useDisplayEvent(event?.id);\n\n if (!model) return null;\n\n return (\n <EventFormProvider model={model}>\n <EventEditComponent model={model} orgId={orgId} />\n </EventFormProvider>\n );\n};\n\nconst EventEditComponent = ({\n model,\n orgId,\n}: {\n model: EventModel;\n orgId: string | undefined;\n}) => {\n const t = useTranslate();\n const {\n initialValues,\n editEventValidationSchema,\n allActivities,\n possibleGenders,\n levelOptions,\n handleUpdateEvents,\n orgOptions,\n } = useEventEdit(model);\n\n const { onSubmit, onError, navBack } = useEventCreateEdit(handleUpdateEvents);\n\n const { active, setActive, nextStep, prevStep } = useStepper();\n\n const methods = useForm<EventForm>({\n defaultValues: initialValues,\n // @ts-ignore\n resolver: yupResolver(\n editEventValidationSchema(\n getParticipantsCount(model.event),\n model.hasTrainer,\n ),\n ),\n });\n\n const steps = [\n {\n component: (\n <Description {...{ allActivities, possibleGenders, levelOptions }} />\n ),\n label: t('event.form.description'),\n },\n {\n component: <Place />,\n label: t('event.form.place'),\n },\n {\n component: <Players orgOptions={orgOptions} orgId={orgId} />,\n label: t('event.form.players'),\n },\n {\n component: <DateForm />,\n label: t('event.form.dap'),\n },\n ];\n\n const theme = useTheme();\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"nav.eventInfoEdit\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <Divider color={theme.grey10} />\n <StepperButtons\n {...{\n active,\n steps: steps.length,\n nextStep,\n prevStep,\n onError,\n onSubmit,\n create: false,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default withRouter(EventEdit);\n","import { Organization } from '@aclito/entities';\n\nimport { config } from '../../../config';\nimport { getByIdTranslate } from '../../../util/selectObject';\nimport { EventForm, txFn } from '../../../types';\n\nexport const composeInitialCreateValues = (\n t: txFn,\n org: Organization | undefined,\n): EventForm => ({\n switchRepeating: false,\n repeatAfter: undefined,\n numberOfEvents: undefined,\n date: null,\n duration: null,\n gender: getByIdTranslate('any', config.gender.filter, t),\n info: '',\n level: getByIdTranslate('0', config.levels, t),\n place: undefined,\n players: undefined,\n price: undefined,\n activity: undefined,\n name: '',\n newPlace: '',\n unlimited: false,\n externalLink: '',\n linkRequired: false,\n org: org ? { item: org.name, id: org.id } : undefined,\n productOneOff: undefined,\n productSub: undefined,\n forFree: true,\n requireConfirm: false,\n hoursConfirm: undefined,\n dontParticipate: false,\n enableQueue: false,\n trainer: undefined,\n private: !!org?.private,\n tags: {\n all: true,\n kids: false,\n adults: false,\n },\n});\n","import {\n useAppSelector,\n useSchema,\n useSelectObject,\n useTranslate,\n} from '@aclito/shared/hooks';\nimport { useGetActivityAndGenders } from '@aclito/shared/features/event/hooks/useGetActivityAndGender';\nimport { EventForm } from '@aclito/shared/types';\nimport { composeInitialCreateValues } from '@aclito/shared/features/event/utils/composeInitialCreateValues';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { UserInfo } from '@aclito/entities';\nimport { useCreateEventMutation } from '@aclito/shared/redux/api/eventApi';\nimport { getMyOrgsSelectOptions } from '@aclito/shared/util/getMyOrgsSelectOptions';\n\nimport { ROUTE_EVENTS } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useNewEvent = (userInfo: UserInfo, orgId: string | undefined) => {\n const myOrgs = useAppSelector(selectMyOrganizations);\n const [createEventTrigger, { isLoading }] = useCreateEventMutation();\n\n const nav = useNavigate();\n const t = useTranslate();\n const { levelOptions, translatedActivities } = useSelectObject();\n const { newEventValidationSchema } = useSchema();\n const { allActivities, possibleGenders } = useGetActivityAndGenders(userInfo);\n\n const orgOptions = getMyOrgsSelectOptions(myOrgs, userInfo.id);\n const displayedOrg = orgId ? myOrgs.find((o) => o.id === orgId) : undefined;\n const initialValues = composeInitialCreateValues(t, displayedOrg);\n\n const createNewEvent = async (data: EventForm) => {\n await createEventTrigger(data);\n nav(ROUTE_EVENTS);\n };\n\n return {\n initialValues,\n createNewEvent,\n newEventValidationSchema,\n translatedActivities,\n levelOptions,\n allActivities,\n possibleGenders,\n isLoading,\n orgOptions,\n };\n};\n","import React from 'react';\nimport { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { Divider } from '@mantine/core';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { EventForm } from '@aclito/shared/types';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useTheme } from 'styled-components';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useSearchParams } from 'react-router-dom';\nimport EventFormProvider from '@aclito/shared/providers/EventFormProvider';\n\nimport { useEventCreateEdit } from '../../hooks/useEventCreateEdit';\n\nimport { useNewEvent } from './hooks/useNewEvent';\n\nimport { TypedLocation } from '@/hooks/useLocation';\nimport {\n SectionGrid,\n useStepper,\n Stepper,\n VStack,\n ActionButton,\n TitleBar,\n StepperButtons,\n} from '@/components';\nimport Description from '@/common/EventForm/Description';\nimport DateForm from '@/common/EventForm/DateForm';\nimport { QueryNewEvent } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\nimport Players from '@/common/EventForm/Players';\nimport Place from '@/common/EventForm/Place';\n\ntype EventNewProps = TypedLocation<void, QueryNewEvent>;\n\nconst EventNew: React.FC = (props: EventNewProps) => {\n const t = useTranslate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const orgId = props.query?.org;\n const {\n initialValues,\n newEventValidationSchema,\n allActivities,\n possibleGenders,\n levelOptions,\n createNewEvent,\n orgOptions,\n } = useNewEvent(userInfo, orgId);\n\n const { onSubmit, onError, navBack } = useEventCreateEdit(createNewEvent);\n\n const methods = useForm<EventForm>({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(newEventValidationSchema),\n });\n\n const [params] = useSearchParams();\n\n const { active, setActive, nextStep, prevStep } = useStepper(\n Number(params.get('active') ?? 0),\n );\n\n const steps = [\n {\n component: (\n <Description {...{ allActivities, possibleGenders, levelOptions }} />\n ),\n label: t('event.form.description'),\n },\n {\n component: <Place />,\n label: t('event.form.place'),\n },\n {\n component: <Players orgOptions={orgOptions} orgId={orgId} />,\n label: t('event.form.players'),\n },\n {\n component: <DateForm />,\n label: t('event.form.dap'),\n },\n ];\n\n const theme = useTheme();\n\n return (\n <EventFormProvider model={undefined}>\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"nav.eventInfo\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <Divider color={theme.grey10} />\n <StepperButtons\n {...{\n active,\n steps: steps.length,\n nextStep,\n onSubmit,\n onError,\n prevStep,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n </EventFormProvider>\n );\n};\nexport default withRouter(EventNew);\n","import { Stats } from '@aclito/entities';\nimport dayjs from 'dayjs';\n\nexport const calculateStreak = (stats: Stats) => {\n const streak = stats.streak;\n\n const endToday = dayjs().endOf('week');\n const diffInWeeks = endToday.diff(\n dayjs(streak.lastIncrement).endOf('week'),\n 'week',\n );\n if (diffInWeeks < 2) return streak.value;\n else return 0;\n};\n","export enum MyEventsTabType {\n LIST = 'list',\n MAP = 'map',\n}\n","import { Center } from '@mantine/core';\nimport React from 'react';\n\nimport { EventCardsProps } from '../interface';\n\nimport { ShowMoreButton } from '@/components';\nimport EventsCards from '@/components/Cards/EventsCards';\n\nconst EventCards: React.FC<EventCardsProps> = ({\n onClick,\n data,\n nextToken,\n day,\n}) => {\n return (\n <>\n <EventsCards\n {...{\n data,\n showDateType: day ? 'day' : 'month',\n }}\n />\n {data.length && nextToken ? (\n <Center mt=\"xl\">\n <ShowMoreButton onClick={onClick} />\n </Center>\n ) : null}\n </>\n );\n};\n\nexport default EventCards;\n","import { GoogleMap } from '@react-google-maps/api';\nimport { Event } from '@aclito/entities';\nimport { MutableRefObject } from 'react';\n\nexport const handleClusterClick = <T extends Event[]>(\n location: { lat: string; lon: string },\n data: T,\n mapRef: MutableRefObject<GoogleMap>,\n) => {\n const eventsAtMarker = data.filter(\n (e) =>\n e.place?.location.lat.toFixed(4) === location.lat &&\n e.place?.location.lon.toFixed(4) === location.lon,\n );\n\n mapRef.current?.state.map?.panTo({\n lng: parseFloat(location.lon),\n lat: parseFloat(location.lat),\n });\n return eventsAtMarker;\n};\n","import {\n GoogleMap,\n GoogleMarkerClusterer,\n Marker,\n useJsApiLoader,\n} from '@react-google-maps/api';\nimport React, { MutableRefObject, useRef } from 'react';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { locationSelectors } from '@aclito/shared/redux/slices/locationSlice';\nimport { Event } from '@aclito/entities';\nimport { useLoadMyEventsQuery } from '@aclito/shared/redux/api/eventApi';\n\nimport { MAP_API_KEY, MAP_BORDER_RADIUS } from '@/util/constants';\nimport { handleClusterClick } from '@/util/clusterClick';\n\ninterface SimpleMapProps {\n data: FormattedEvent[];\n size?: { width: string | number; height: string | number };\n onMarkerClick?: (id: string) => void;\n onMapClusterClick?: (events: Event[]) => void;\n}\n\nconst SimpleMap: React.FC<SimpleMapProps> = ({\n data,\n size = { width: 800, height: 600 },\n onMapClusterClick,\n onMarkerClick,\n}) => {\n const { isLoaded: isMapLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n const userLocation = useAppSelector(locationSelectors.userLocation);\n const mapRef = useRef<GoogleMap>(null) as MutableRefObject<GoogleMap>;\n const myEvents = useLoadMyEventsQuery({\n nextToken: null,\n });\n const events = myEvents.data?.result ?? [];\n const handleMarkerClick = (event: Event) => {\n if (onMarkerClick) {\n onMarkerClick?.(event.id);\n return;\n }\n\n if (onMapClusterClick) {\n if (event.place) {\n const e = handleClusterClick(\n {\n lat: event.place.location.lat.toFixed(4),\n lon: event.place.location.lon.toFixed(4),\n },\n events,\n mapRef,\n );\n onMapClusterClick?.(e);\n }\n }\n };\n\n return (\n <>\n {isMapLoaded && (\n <GoogleMap\n ref={mapRef}\n options={{\n streetViewControl: false,\n fullscreenControl: false,\n mapTypeControl: false,\n }}\n mapContainerStyle={{\n ...size,\n borderRadius: MAP_BORDER_RADIUS,\n }}\n center={userLocation}\n zoom={7}\n >\n <GoogleMarkerClusterer options={{}}>\n {(clusterer) => (\n <React.Fragment>\n {data.map((event) => (\n <>\n {event.place && (\n <Marker\n key={event.id}\n clickable\n title={event.name}\n onClick={() => handleMarkerClick(event)}\n clusterer={clusterer}\n position={{\n lat: event.place.location.lat,\n lng: event.place.location.lon,\n }}\n />\n )}\n </>\n ))}\n </React.Fragment>\n )}\n </GoogleMarkerClusterer>\n </GoogleMap>\n )}\n </>\n );\n};\n\nexport default SimpleMap;\n","import React, { useState } from 'react';\nimport { Space } from '@mantine/core';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\n\nimport { EventsMapProps } from '../interface';\n\nimport SimpleMap from '@/common/Maps/SimpleMap';\nimport EventsCards from '@/components/Cards/EventsCards';\n\nconst EventsMap: React.FC<EventsMapProps> = ({ data }) => {\n const [selectedEvents, setSelectedEvents] = useState<FormattedEvent[]>([]);\n\n return (\n <>\n <Space h={16} />\n <SimpleMap\n data={data}\n size={{ width: '100%', height: '75vh' }}\n onMapClusterClick={(e) => {\n setSelectedEvents(formatEvents(e));\n }}\n />\n <Space h={24} />\n <EventsCards data={selectedEvents} />\n </>\n );\n};\n\nexport default EventsMap;\n","import { Center, Loader, Menu } from '@mantine/core';\nimport React, { useState } from 'react';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport {\n useLazyLoadMyEventsQuery,\n useLoadMyEventsQuery,\n} from '@aclito/shared/redux/api/eventApi';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { useDisclosure, useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\nimport { useTheme } from 'styled-components';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { HStack } from '@aclito/ui-web/components/Layout';\nimport { Title } from '@aclito/ui-web/components/Title';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { calculateStreak } from '@aclito/shared/util/calculateStreak';\n\nimport { ROUTE_NEW_EVENT } from '@/util/constants';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { MyEventsTabType } from '@/features/event/screens/Events/types';\nimport EventCards from '@/features/event/screens/Events/components/EventCards';\nimport EventsMap from '@/features/event/screens/Events/components/EventsMap';\nimport { Streak, SectionGrid, Tab, Tabs, EmptyList } from '@/components';\n\nconst id = 'titleFlexContainer';\n\nconst Events: React.FC = () => {\n const { data, isLoading, isUninitialized, isSuccess } = useLoadMyEventsQuery({\n nextToken: null,\n });\n const [trigger] = useLazyLoadMyEventsQuery();\n const stats = useAppSelector(profileSelectors.stats);\n const navigation = useNavigate();\n const [tabIndex, setTabIndex] = useState(MyEventsTabType.LIST);\n const [day, { toggle }] = useDisclosure(true);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n const [showModalTooltip] = useShowTooltipModal('eventTooltip');\n const theme = useTheme();\n const isFlexWrapped = useFlexWrap(id);\n\n const nextToken = data?.nextToken ?? null;\n const mappedMyEvents: FormattedEvent[] = dateSort(\n formatEvents(data?.result ?? []),\n 'date',\n 'asc',\n );\n\n const handleTabChange = (val: string) =>\n val === '0'\n ? setTabIndex(MyEventsTabType.LIST)\n : setTabIndex(MyEventsTabType.MAP);\n\n const handleShowMore = () => {\n trigger({ nextToken });\n };\n\n const handleNav = () => navigation(ROUTE_NEW_EVENT);\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <Title tx={'tabs.myevents'} />\n <Icon icon={'info'} onClick={showModalTooltip} color={'primary'} />\n {stats && <Streak streak={calculateStreak(stats)} />}\n </HStack>\n {isFlexWrapped || queryMobile ? (\n <Menu>\n <Menu.Target>\n <ActionButton iconType={'more'} />\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n <Menu.Item\n icon={<Icon icon=\"add\" size={20} />}\n onClick={handleNav}\n >\n <Text tx=\"create\" />\n </Menu.Item>\n {tabIndex === MyEventsTabType.LIST && (\n <Menu.Item\n icon={<Icon icon=\"chevronDown\" size={20} />}\n onClick={toggle}\n >\n <Text tx={day ? 'json.monthly' : 'json.daily'} />\n </Menu.Item>\n )}\n </Menu.Dropdown>\n </Menu>\n ) : (\n <HStack>\n <ActionButton\n tx=\"create\"\n primary\n iconType=\"add\"\n onClick={handleNav}\n />\n {tabIndex === MyEventsTabType.LIST && (\n <ActionButton\n tx={day ? 'json.monthly' : 'json.daily'}\n iconType={'chevronDown'}\n onClick={toggle}\n />\n )}\n </HStack>\n )}\n </TitleBar>\n\n <Tabs\n selectedIndex={tabIndex === MyEventsTabType.LIST ? '0' : '1'}\n setSelectedIndex={handleTabChange}\n >\n <Tab tx=\"tabs.list\" />\n <Tab tx=\"tabs.map\" />\n </Tabs>\n\n {mappedMyEvents.length ? (\n <>\n {tabIndex === MyEventsTabType.LIST && (\n <EventCards\n {...{\n data: mappedMyEvents,\n nextToken,\n onClick: handleShowMore,\n day: day,\n }}\n />\n )}\n\n {tabIndex === MyEventsTabType.MAP && (\n <EventsMap {...{ data: mappedMyEvents }} />\n )}\n </>\n ) : (\n <div style={{ paddingTop: 24 }}>\n {isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <>\n {!isUninitialized && isSuccess && (\n <EmptyList\n iconType=\"calendar\"\n action=\"addEvent\"\n tx=\"flatlist.noeventyet\"\n />\n )}\n </>\n )}\n </div>\n )}\n </SectionGrid>\n );\n};\n\nexport default Events;\n","import { UserInfo } from '@aclito/entities';\n\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\n\nimport { useCreateReportMutation } from '@aclito/shared/redux/api/reportApi';\nimport { useAppSelector, useSchema } from '@aclito/shared/hooks';\n\nexport const useReportUser = (userToReport: UserInfo | undefined) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { reportUserValidationSchema } = useSchema();\n const initialValues = {\n message: '',\n };\n const [createReport, { isLoading }] = useCreateReportMutation();\n const handleReport = async (data: typeof initialValues) => {\n if (!userToReport) return undefined;\n\n return await createReport({\n message: `User with id: ${userToReport.id} was reported with message: ${data.message}`,\n reportUserId: userToReport.id,\n reporter: userInfo.id,\n }).unwrap();\n };\n\n return { reportUserValidationSchema, initialValues, handleReport, isLoading };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Center, Loader } from '@mantine/core';\nimport React from 'react';\nimport { useReportUser } from '@aclito/shared/features/misc/hooks/useReportUser';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { ReportUserProps } from './interface';\n\nimport {\n SectionGrid,\n VStack,\n SubmitButton,\n Text,\n ValidatedTextArea,\n Title,\n} from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport withRouter from '@/navigation/withRouter';\n\nconst ReportUser: React.FC<ReportUserProps> = ({ state }) => {\n const userToReport = state?.userToReport;\n\n const nav = useNavigate();\n const t = useTranslate();\n\n const { reportUserValidationSchema, initialValues, handleReport, isLoading } =\n useReportUser(userToReport);\n\n const handleSubmit = async (data: typeof initialValues) => {\n try {\n if (await handleReport(data)) nav(-1);\n } catch (e) {\n /* empty */\n }\n };\n\n const methods = useForm<typeof initialValues>({\n defaultValues: initialValues,\n resolver: yupResolver(reportUserValidationSchema),\n });\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n {isLoading ? (\n <Center style={{ height: '100%' }}>\n <Loader />\n </Center>\n ) : (\n <VStack>\n <Title>{`${t('nav.report')} - ${userToReport?.name} ${\n userToReport?.surname\n }`}\n \n \n \n \n \n \n \n \n )}\n \n );\n};\n\nexport default withRouter(ReportUser);\n","import { useEffect } from 'react';\n\nimport { ShareType, TranslateKey } from '../../../types';\nimport { useDisplayEventQuery } from '../../../redux/api/eventApi';\nimport { useFindOrganizationQuery } from '../../../redux/api/organizationApi';\nimport { useAppDispatch } from '../../../hooks/useDispatch';\nimport { commonActions } from '../../../redux/slices';\n\nimport { useTranslate } from '@aclito/shared/hooks';\n\nexport interface useShareProps {\n id: string | undefined;\n type: ShareType | undefined;\n ref: string | undefined | null;\n}\n\nexport const useShare = (data: useShareProps) => {\n const { id, type, ref } = data;\n const t = useTranslate();\n\n const dispatch = useAppDispatch();\n\n useEffect(() => {\n if (id) {\n dispatch(commonActions.setReferral(ref ? { ref, entityId: id } : null));\n }\n }, [ref]);\n\n const {\n data: event,\n isLoading: isLoadingEvent,\n error: eventError,\n } = useDisplayEventQuery({ id: id ?? '' }, { skip: type === 'org' || !id });\n\n const {\n data: org,\n isLoading: isLoadingOrg,\n error: orgError,\n } = useFindOrganizationQuery(\n { id: id ?? '' },\n { skip: type === 'event' || !id },\n );\n\n const isLoading = isLoadingEvent || isLoadingOrg;\n\n return {\n org: type === 'org' && org,\n event: type === 'event' && event,\n error:\n (eventError || orgError) &&\n t('share.error' as TranslateKey, {\n type: t(`share.${type}` as TranslateKey),\n }),\n isLoading,\n };\n};\n","import { referralClient } from '@aclito/client';\nimport { CreateClickReferralInput } from '@aclito/entities';\n\nimport { aclitoApi } from '../api';\nimport { handleError } from '../utils/handleError';\n\nexport const CLICK_REFERRAL = 'clickReferral';\n\nexport const referralApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [CLICK_REFERRAL]: builder.mutation({\n queryFn: async (args) => {\n try {\n const data = await referralClient.referral.click(args);\n return { data: data.data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const { useClickReferralMutation } = referralApi;\n","import styled from 'styled-components';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { Text, VStack } from '@/components';\n\nexport const Content = styled(VStack)`\n width: 33%;\n @media ${deviceMax.tablet} {\n width: 100%;\n }\n height: 100%;\n background-color: ${({ theme }) => theme.white};\n border-radius: 20px;\n padding: 20px;\n`;\n\nexport const Name = styled(Text)`\n font-weight: bold;\n font-size: 25px;\n`;\n","import { FC } from 'react';\nimport { useSelectObject } from '@aclito/shared/hooks';\nimport { cardColorPicker } from '@aclito/shared/util/cardColorPicker';\nimport styled, { useTheme } from 'styled-components';\nimport { config } from '@aclito/shared/config';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\nimport { Divider } from '@mantine/core';\n\nimport { EventViewProps } from '../interface';\nimport { Content, Name } from '../styles';\n\nimport { HStack, SmallButton, IconSelect, Text, Icon } from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_EVENT_INFO, ROUTE_EVENT_INFO_PROVIDERS } from '@/util/constants';\nimport InfoBuilder from '@/features/event/screens/EventInfo/components/InfoBuilder';\n\nconst EventView: FC = (event) => {\n const { getById } = useSelectObject();\n const duration = formatEventDuration(event);\n const theme = useTheme();\n const date =\n event.formattedDate === event.formattedEndDate\n ? event.formattedDate\n : `${event.formattedDate} - ${event.formattedEndDate}`;\n\n const nav = useNavigate();\n const handleNavigation = () =>\n nav(event.isAclitoEvent ? ROUTE_EVENT_INFO : ROUTE_EVENT_INFO_PROVIDERS, {\n state: { id: event.id },\n });\n return (\n \n {event.name}\n \n \n \n {getById(event.activityType, config.activities).item}\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst ActivityText = styled(Text)`` as typeof Text;\n\nexport default EventView;\n","import { FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { OrgViewProps } from '../interface';\nimport { Content, Name } from '../styles';\n\nimport { OrgAvatar, Icon, HStack, SmallButton, Text } from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_ORGANIZATIONS } from '@/util/constants';\nimport InfoBuilder from '@/features/event/screens/EventInfo/components/InfoBuilder';\n\nconst OrgView: FC = (org) => {\n const theme = useTheme();\n const nav = useNavigate();\n const handleNavigation = () => nav(`${ROUTE_ORGANIZATIONS}/${org.id}`);\n\n return (\n \n {org.name}\n \n \n\n \n \n \n \n \n \n \n );\n};\n\nexport default OrgView;\n","import { useShare } from '@aclito/shared/features/misc/hooks/useShare';\nimport { ShareType } from '@aclito/shared/types';\nimport styled from 'styled-components';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport { Loader } from '@mantine/core';\nimport { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport { useClickReferralMutation } from '@aclito/shared/redux/api/referralApi';\nimport { useEffect } from 'react';\n\nimport { EventView, OrgView } from './components';\n\nimport { VStack } from '@/components';\n\nconst ShareItem = () => {\n const location = useParams();\n const [searchParams] = useSearchParams();\n const type = location?.type as ShareType | undefined;\n const id = location?.id;\n const ref = searchParams.get('ref');\n const [click] = useClickReferralMutation();\n\n useEffect(() => {\n if (ref) {\n click({ ref });\n }\n }, [ref]);\n\n const { event, org, isLoading } = useShare({\n id,\n type,\n ref,\n });\n\n return (\n \n {isLoading ? (\n \n ) : (\n <>\n {event && }\n {org && }\n \n )}\n \n );\n};\n\nconst Container = styled(VStack)`\n margin-top: 80px;\n`;\n\nexport default ShareItem;\n","import { FC, useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { ShareProps } from './interface';\n\nimport withRouter from '@/navigation/withRouter';\nimport { ROUTE_EVENTS, ROUTE_SHARE_ITEM } from '@/util/constants';\n\n// For backwards compatibility\nconst ShareItemOld: FC = ({ query }) => {\n const type = query?.type;\n const id = query?.id;\n const nav = useNavigate();\n\n useEffect(() => {\n if (type && id) {\n nav(`${ROUTE_SHARE_ITEM}/${type}/${id}`);\n } else {\n nav(ROUTE_EVENTS);\n }\n }, [type, id]);\n\n return null;\n};\n\nexport default withRouter(ShareItemOld);\n","import { Notification } from '@aclito/entities';\nimport { NotificationType } from '@aclito/enums';\n\nimport { config } from '../../../config';\nimport { NotificationBody } from '../../../types';\n\nimport {\n APP_NOTIFICATION_PROVIDER,\n RESERVED_USER_NAME,\n} from '@aclito/shared/util/constants';\nimport {\n useSelectObject,\n useTranslate,\n useTranslateDate,\n} from '@aclito/shared/hooks';\n\nexport const useLocalNotifications = () => {\n const t = useTranslate();\n const tDate = useTranslateDate();\n const { getById } = useSelectObject();\n\n const getNotificationBody = (item: Notification): NotificationBody | null => {\n const userName =\n item.senderId === APP_NOTIFICATION_PROVIDER\n ? ''\n : !item.sender\n ? t('userprofile.unknown')\n : item.sender.name === RESERVED_USER_NAME\n ? t('userprofile.unknown')\n : `${item.sender.name} ${item.sender.surname}`;\n\n switch (item.type) {\n case NotificationType.EVENT_LEFT:\n return {\n titleTranslations: t('notification.event.left', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n message: item.body ?? undefined,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_LEFT_REPEATING:\n return {\n titleTranslations: t('notification.event.left.repeating', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n message: item.body ?? undefined,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_MULTIPLE_LEFT:\n return {\n titleTranslations: t('notification.event.left.multiple', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_KICK:\n return {\n bodyTranslations: item.body ?? undefined,\n titleTranslations: t('notification.event.kicked', {\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n };\n case NotificationType.EVENT_JOIN:\n return {\n titleTranslations: t('notification.event.joined', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_JOIN_REPEATING:\n return {\n titleTranslations: t('notification.event.joined.repeating', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_JOIN:\n return {\n titleTranslations: t('notification.event.queue.joined', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_KICK:\n return {\n bodyTranslations: item.body ?? undefined,\n titleTranslations: t('notification.event.kicked.queue', {\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n };\n case NotificationType.EVENT_MULTIPLE_JOIN:\n return {\n titleTranslations: t('notification.event.joined.multiple', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_PLAYER_CONFIRMED:\n return {\n titleTranslations: t('notification.event.player.confirmed', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_MULTIPLE_PLAYER_CONFIRMED:\n return {\n titleTranslations: t('notification.event.multiple.player.confirmed', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_INVITE:\n return {\n bodyTranslations: t('notification.event.invited', {\n value: userName,\n }),\n titleTranslations: t('notification.event.invite'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_STARTING:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n titleTranslations: t('notification.event.starting'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_END:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n titleTranslations: t('notification.event.end'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_SHIFT:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n bodyTranslations: t(\n item.event?.requireConfirmation\n ? 'notification.event.queue.shift.req.body'\n : 'notification.event.queue.shift.body',\n ),\n titleTranslations: t('notification.event.queue.shift', {\n name: `${item.event?.name}`,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_MULTIPLE_JOIN:\n return {\n titleTranslations: t('notification.event.queue.multiple.joined', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_REPEATING_JOIN:\n return {\n titleTranslations: t('notification.event.queue.repeating.joined', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_REPEATING_LEFT:\n return {\n secondaryTitle: item.body ?? undefined,\n titleTranslations: t('notification.event.queue.repeating.left', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_CHANGE:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n titleTranslations: t('notification.event.changed'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_CHANGE_REPEATING:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n titleTranslations: t('notification.event.changed.repeating'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_DELETE:\n return {\n secondaryTitle: item.body ?? undefined,\n titleTranslations: t('notification.event.deleted'),\n };\n case NotificationType.EVENT_MULTIPLE_QUEUE_LEFT:\n return {\n secondaryTitle: item.body ?? undefined,\n titleTranslations: t('notification.event.queue.multiple.left', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.EVENT_QUEUE_LEFT:\n return {\n secondaryTitle: item.body ?? undefined,\n titleTranslations: t('notification.event.queue.left', {\n user: userName,\n name: `${item.event?.name}`,\n }),\n };\n case NotificationType.EVENT_DELETE_REPEATING:\n return {\n secondaryTitle: item.body ?? undefined,\n titleTranslations: t('notification.event.deleted.repeating'),\n };\n case NotificationType.EVENT_CONFIRM:\n return {\n secondaryTitle: `${_getSport(item)} - ${_getDate(item)}`,\n titleTranslations: t('notification.event.confirm'),\n action: t('notification.moreinfo'),\n };\n case NotificationType.ORG_ROLE_CHANGE:\n return {\n titleTranslations: t('notification.org.rolechanged', {\n org: item.org?.name,\n }),\n secondaryTitle: t('notification.org.role', {\n role: item.body?.trim() && getById(item.body, config.orgRoles).item,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.FEED_CREATE:\n return {\n titleTranslations: t('notification.feed.create', {\n name: item.org?.name,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.FEED_UPDATE:\n return {\n titleTranslations: t('notification.feed.update', {\n name: item.org?.name,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.ORG_KICK:\n return {\n titleTranslations: t('notification.org.kick', {\n org: item.org?.name,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.ORG_LEFT:\n return {\n titleTranslations: t('notification.org.left', {\n user: userName,\n name: `${item.org?.name}`,\n }),\n bodyTranslations: item.body ?? undefined,\n action: t('notification.moreinfo'),\n };\n case NotificationType.ORG_DELETE:\n return {\n bodyTranslations: item.body ?? undefined,\n titleTranslations: t('notification.org.deleted'),\n };\n case NotificationType.ORG_JOIN:\n return {\n titleTranslations: t('notification.org.join', {\n user: userName,\n name: `${item.org?.name}`,\n }),\n action: t('notification.moreinfo'),\n };\n case NotificationType.PROFILE_COMMENT_CREATE:\n return {\n titleTranslations: t('notification.profile.comment.create', {\n user: userName,\n }),\n };\n\n default:\n break;\n }\n\n return null;\n };\n const _getDate = (item: Notification) =>\n `${tDate(item.event?.date ?? '', 'date.notification')}`;\n\n const _getSport = (item: Notification) =>\n item.event && getById(item.event.activityType, config.activities).item;\n\n return {\n getNotificationBody,\n };\n};\n","import { useState } from 'react';\nimport { Notification } from '@aclito/entities';\nimport { NotificationType } from '@aclito/enums';\n\nimport { TranslateKey } from '../../../types';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { notificationSelectors } from '@aclito/shared/redux/slices/notificationsSlices';\n\nexport type BinType = 'org' | 'event' | 'other';\n\ntype NotificationBins = Record[]>;\n\nexport const useFilterNotifications = () => {\n const notifications = useAppSelector(notificationSelectors.getNotifications);\n const [chipValue, setChipValue] = useState>([]);\n const [filter, setFilter] = useState(false);\n\n const handleChipFilter = (values: BinType[]) => {\n setChipValue(values);\n };\n const handleFilter = () => setFilter((prev) => !prev);\n\n const _whichNotificationsToDisplay = (values: BinType[]) => {\n // iterate over selected types and add notification with the matching type to shared array\n const filtered: Notification[][] = [[]];\n for (let index = 0; index < values.length; index++) {\n const bin = _bins[values[index]];\n const temp = notifications.filter((n) => bin.includes(n.type));\n filtered.push(temp);\n }\n return values.length ? filtered.flat() : notifications;\n };\n\n const _makeNotificationBins = () => {\n const options = Object.entries(NotificationType);\n const bins: NotificationBins = {\n event: [],\n org: [],\n other: [],\n };\n for (let index = 0; index < options.length; index++) {\n const [, type] = options[index];\n if (type.startsWith('EVENT')) {\n bins.event.push(type);\n } else if (type.startsWith('ORG')) {\n bins.org.push(type);\n } else {\n bins.other.push(type);\n }\n }\n return bins;\n };\n\n const _bins = _makeNotificationBins();\n const options = Object.keys(_bins) as Array;\n const translations: Record = {\n event: 'notification.filter.event',\n org: 'notification.filter.org',\n other: 'notification.filter.other',\n };\n\n const filteredNotifications = _whichNotificationsToDisplay(chipValue);\n\n return {\n filteredNotifications,\n filter,\n handleFilter,\n handleChipFilter,\n chipValue,\n options,\n translations,\n };\n};\n","import React from 'react';\nimport { Menu } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\nimport { ActionButton, HStack, Text, Icon } from '@/components';\n\ninterface ButtonsProps {\n handleDelete: () => void;\n handleFilter: () => void;\n compact?: boolean;\n}\n\nconst Buttons: React.FC = ({\n handleDelete,\n handleFilter,\n compact,\n}) => {\n const theme = useTheme();\n\n return (\n <>\n {compact ? (\n \n \n \n \n \n }\n onClick={handleFilter}\n >\n \n \n }\n onClick={handleDelete}\n >\n \n \n \n \n ) : (\n \n \n \n \n )}\n \n );\n};\n\nexport default Buttons;\n","import { notificationActions } from '@aclito/shared/redux/slices';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { Notification } from '@aclito/entities';\nimport { NotificationType } from '@aclito/enums';\nimport { useNavigate } from 'react-router-dom';\n\nimport {\n ROUTE_EVENT_INFO,\n ROUTE_EVENT_INFO_PROVIDERS,\n ROUTE_FEED_INFO,\n ROUTE_FEEDBACK,\n ROUTE_ORGANIZATIONS,\n ROUTE_PROFILE,\n} from '@/util/constants';\n\nexport const useLocalNotificationsWeb = () => {\n const dispatch = useAppDispatch();\n const nav = useNavigate();\n\n const getOnClick = (\n type: NotificationType | 'DELETE',\n item: Notification,\n ) => {\n switch (type) {\n case 'DELETE':\n dispatch(notificationActions.deleteDBNotificationAsync(item.id));\n break;\n case NotificationType.EVENT_END: {\n _navigateToFeedback(item);\n break;\n }\n case NotificationType.EVENT_STARTING:\n case NotificationType.EVENT_QUEUE_SHIFT:\n case NotificationType.EVENT_CONFIRM:\n case NotificationType.EVENT_CHANGE:\n case NotificationType.EVENT_JOIN:\n case NotificationType.EVENT_JOIN_REPEATING:\n case NotificationType.EVENT_MULTIPLE_JOIN:\n case NotificationType.EVENT_QUEUE_MULTIPLE_JOIN:\n case NotificationType.EVENT_QUEUE_REPEATING_JOIN:\n case NotificationType.EVENT_QUEUE_REPEATING_LEFT:\n case NotificationType.EVENT_QUEUE_JOIN:\n case NotificationType.EVENT_PLAYER_CONFIRMED:\n case NotificationType.EVENT_MULTIPLE_PLAYER_CONFIRMED:\n case NotificationType.EVENT_INVITE:\n case NotificationType.EVENT_LEFT:\n case NotificationType.EVENT_LEFT_REPEATING:\n case NotificationType.EVENT_MULTIPLE_LEFT:\n case NotificationType.EVENT_QUEUE_LEFT:\n case NotificationType.EVENT_MULTIPLE_QUEUE_LEFT:\n case NotificationType.EVENT_CHANGE_REPEATING:\n case NotificationType.EVENT_KICK:\n case NotificationType.EVENT_QUEUE_KICK:\n _navigateToEvent(item);\n break;\n case NotificationType.ORG_JOIN:\n case NotificationType.ORG_LEFT:\n case NotificationType.ORG_ROLE_CHANGE:\n case NotificationType.ORG_KICK:\n _navigateToOrg(item);\n break;\n case NotificationType.FEED_CREATE:\n case NotificationType.FEED_UPDATE:\n _navigateToFeed(item);\n break;\n case NotificationType.PROFILE_COMMENT_CREATE:\n _navigateToProfile();\n break;\n default:\n break;\n }\n };\n\n const _navigateToFeed = (item: Notification) => {\n if (item.feed) {\n nav(ROUTE_FEED_INFO, {\n state: {\n feedId: item.feed.id,\n },\n });\n }\n };\n const _navigateToProfile = () => {\n nav(ROUTE_PROFILE);\n };\n const _navigateToFeedback = (item: Notification) => {\n if (item.eventId && item.event?.isAclitoEvent) {\n nav(ROUTE_FEEDBACK);\n }\n };\n\n const _navigateToEvent = async (item: Notification) => {\n if (item.event) {\n nav(\n item.event.isAclitoEvent\n ? ROUTE_EVENT_INFO\n : ROUTE_EVENT_INFO_PROVIDERS,\n {\n state: {\n id: item.event.id,\n },\n },\n );\n }\n };\n\n const _navigateToOrg = async (item: Notification) => {\n if (item.org) {\n nav(`${ROUTE_ORGANIZATIONS}/${item.org.id}`);\n }\n };\n\n const handleRefresh = () => {\n dispatch(notificationActions.loadNotificationsAsync());\n };\n\n return { handleRefresh, getOnClick };\n};\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { notificationSelectors } from '@aclito/shared/redux/slices/notificationsSlices';\nimport { Variants } from 'framer-motion';\nimport useMeasure from 'react-use-measure';\n\nexport const useNotificationAnimation = (filter: boolean) => {\n const notifications = useAppSelector(notificationSelectors.getNotifications);\n\n const [ref, bounds] = useMeasure();\n\n const height = notifications.length ? bounds.height + 20 : 0.1;\n const containerVariants: Variants = {\n init: { y: 0 },\n enter: { y: filter ? height : 0, transition: { duration: 0.25 } },\n };\n\n const filterVariants: Variants = {\n init: { opacity: 0, y: 0, zIndex: -1 },\n enter: {\n opacity: 1,\n y: filter ? -height : 0,\n transition: { delay: 0.3 },\n },\n exit: {\n opacity: 0,\n y: height,\n transition: { duration: 0.5 },\n },\n };\n\n const cardVariant: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0, transition: { duration: 0.1 } },\n };\n return { containerVariants, filterVariants, cardVariant, ref, bounds };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { BinType } from '@aclito/shared/features/notification/hooks/useFilterNotifications';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { Chip } from '@mantine/core';\nimport { AnimatePresence, motion, Variants } from 'framer-motion';\nimport { forwardRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport { HStack } from '@/components';\n\ntype Props = {\n variant: Variants;\n filter: boolean;\n chipValue: BinType[];\n handleChipFilter: (value: BinType[]) => void;\n options: BinType[];\n translations: Record;\n};\n\nconst NotificationFilter = (\n {\n variant,\n filter,\n chipValue,\n handleChipFilter,\n options,\n translations,\n }: Props,\n ref: Ref,\n) => {\n const t = useTranslate();\n\n return (\n \n {filter && (\n \n \n \n {options.map((type) => (\n \n {t(translations[type])}\n \n ))}\n \n \n \n )}\n \n );\n};\n\nconst LabelContainer = styled(HStack)``;\n\nexport default forwardRef(NotificationFilter);\n","import React from 'react';\nimport styled from 'styled-components';\nimport dayjs from 'dayjs';\nimport { NotificationBody } from '@aclito/shared/types';\nimport { Notification } from '@aclito/entities';\nimport { NotificationType } from '@aclito/enums';\n\nimport {\n HStack,\n VStack,\n LocalNotificationIcons,\n Text,\n Icon,\n PlainCard,\n} from '@/components';\n\ninterface NotificationCardProps {\n getOnClick: (type: NotificationType | 'DELETE', item: Notification) => void;\n notification: Notification;\n notificationBody: NotificationBody;\n}\n\nconst NotificationCard: React.FC = ({\n notification,\n notificationBody,\n getOnClick,\n}) => {\n const icon = LocalNotificationIcons(notification.type);\n const {\n secondaryTitle,\n titleTranslations,\n bodyTranslations,\n action,\n message,\n } = notificationBody;\n\n const handleAction = () => getOnClick(notification.type, notification);\n\n return (\n \n \n \n {icon}\n \n {!!titleTranslations && {titleTranslations}}\n {!!secondaryTitle && (\n {secondaryTitle}\n )}\n {!!bodyTranslations && {bodyTranslations}}\n {!!message && {message}}\n \n \n {\n e.stopPropagation();\n getOnClick('DELETE', notification);\n }}\n >\n \n
\n \n\n \n
{!!action && {action}}
\n
\n {dayjs(notification.createdAt).fromNow()}\n
\n
\n \n );\n};\n\nexport default NotificationCard;\n\nconst TopContent = styled(HStack)`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-wrap: nowrap;\n`;\n\nconst Content = styled(HStack)`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-wrap: nowrap;\n`;\nconst Title = styled(Text)`\n font-size: 16px;\n color: ${({ theme }) => theme.grey80};\n font-weight: bold;\n margin-right: 24px;\n`;\n\nconst BottomText = styled(Text)`\n font-size: 14px;\n color: ${({ theme }) => theme.grey30};\n`;\nconst Body = styled(Text)`\n font-size: 14px;\n color: ${({ theme }) => theme.grey50};\n`;\n\nconst SecondaryTitle = styled(Text)`\n font-size: 14px;\n color: ${({ theme }) => theme.primary};\n`;\n\nconst Message = styled(Text)`\n font-size: 14px;\n color: ${({ theme }) => theme.grey50};\n` as typeof Text;\n","import React from 'react';\nimport { useLocalNotifications } from '@aclito/shared/features/notification/hooks/useLocalNotifications';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport {\n notificationActions,\n notificationSelectors,\n} from '@aclito/shared/redux/slices/notificationsSlices';\nimport { Center, Loader, Stack } from '@mantine/core';\nimport { openConfirmModal } from '@mantine/modals';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { motion, AnimatePresence } from 'framer-motion';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { useFilterNotifications } from '@aclito/shared/features/notification/hooks/useFilterNotifications';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { Buttons } from './components';\nimport { useLocalNotificationsWeb } from './hooks/useLocalNotificationsWeb';\nimport { useNotificationAnimation } from './hooks/useNotificationAnimation';\nimport NotificationFilter from './components/NotificationFilter';\n\nimport { SectionGrid, TitleBar, Title } from '@/components';\nimport NotificationCard from '@/components/Cards/NotificationCard';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\nconst Notifications: React.FC = () => {\n const t = useTranslate();\n const dispatch = useAppDispatch();\n const isLoading = useAppSelector(notificationSelectors.isLoading);\n\n const {\n filter,\n filteredNotifications,\n handleFilter,\n chipValue,\n handleChipFilter,\n options,\n translations,\n } = useFilterNotifications();\n\n const { getNotificationBody } = useLocalNotifications();\n\n const { getOnClick } = useLocalNotificationsWeb();\n\n const { containerVariants, filterVariants, cardVariant, ref, bounds } =\n useNotificationAnimation(filter);\n\n const deleteNotifications = () => {\n dispatch(notificationActions.deleteAllNotificationsAsync());\n };\n\n const handleDelete = () => {\n openConfirmModal({\n confirmProps: { color: 'red' },\n title: t('modal.confirmation'),\n labels: { confirm: t('delete.all'), cancel: t('close') },\n onConfirm: deleteNotifications,\n });\n };\n\n const sortedNotifications = dateSort(\n filteredNotifications,\n 'createdAt',\n 'desc',\n );\n\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n\n return (\n \n \n \n <Buttons\n {...{\n handleDelete,\n handleFilter,\n compact: isFlexWrapped || queryMobile,\n }}\n />\n </TitleBar>\n {isLoading ? (\n <Center style={{ height: '100%' }}>\n <Loader />\n </Center>\n ) : (\n <MotionContainer\n variants={containerVariants}\n initial=\"init\"\n animate=\"enter\"\n >\n <NotificationFilter\n {...{\n chipValue,\n filter,\n handleChipFilter,\n variant: filterVariants,\n ref,\n options,\n translations,\n }}\n />\n <AnimatePresence>\n {sortedNotifications.map((notification) => {\n const notificationBody = getNotificationBody(notification);\n\n if (!notificationBody) {\n return null;\n }\n\n return (\n <motion.div {...cardVariant} layout key={notification.id}>\n <NotificationCard\n {...{\n notificationBody,\n notification,\n getOnClick,\n }}\n />\n </motion.div>\n );\n })}\n </AnimatePresence>\n </MotionContainer>\n )}\n </SectionGrid>\n );\n};\n\nconst MotionVStack = motion(Stack);\nconst MotionContainer = motion(MotionVStack);\nexport default Notifications;\n","import * as yup from 'yup';\nimport { Organization } from '@aclito/entities';\n\nimport { useSchema, useTranslate } from '../../../hooks';\n\nexport const useOrganizationSchema = (org?: Organization) => {\n const t = useTranslate();\n const { newOrgSchema } = useSchema();\n\n const getMaxMembersValidationSchema = yup.object({\n maxMembers: yup\n .number()\n .when('unlimited', {\n is: true,\n then: yup.number().notRequired(),\n otherwise: yup\n .number()\n .max(100, t('validation.max', { max: 100 }))\n .min(\n org ? org.members.length : 1,\n org ? t('validation.members') : t('validation.min', { min: 1 }),\n )\n .required(t('validation.req'))\n .nullable(),\n })\n .nullable(),\n });\n\n const newOrganizationSchema = newOrgSchema.concat(\n getMaxMembersValidationSchema,\n );\n\n return { newOrganizationSchema };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { OrganizationForm } from '@aclito/shared/types';\nimport { useFormErrorMap } from '@aclito/shared/hooks/useFormErrorMap';\n\nimport { useNavigate } from '@/hooks/useNavigate';\n\ntype AlertErrorKeys = keyof Pick<OrganizationForm, 'name' | 'telephone'>;\n\nexport const useOrgCreateEdit = () => {\n const t = useTranslate();\n\n const nav = useNavigate();\n const navBack = () => {\n nav(-1);\n };\n\n const tx: Record<AlertErrorKeys, string> = {\n name: t('org.name'),\n telephone: t('org.telephone'),\n };\n\n const { onError } = useFormErrorMap(tx);\n\n return { onError, navBack };\n};\n","import { Organization } from '@aclito/entities';\n\nimport { OrganizationForm } from '../../../types';\n\nimport { useUpdateOrganizationMutation } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useOrganizationEdit = (org: Organization | undefined) => {\n const [updateOrg, { isLoading }] = useUpdateOrganizationMutation();\n\n const editOrg = async (data: OrganizationForm) => {\n data.image = data.image?.trim() ? data.image : 'BASIC';\n if (org) {\n await updateOrg({\n ...data,\n id: org.id,\n }).unwrap();\n }\n };\n\n return { editOrg, isLoading };\n};\n","import { Organization } from '@aclito/entities';\n\nimport { OrganizationForm } from '../../../types';\n\nexport const composeInitialEditValues = (\n org: Organization,\n): OrganizationForm => ({\n name: org.name,\n maxMembers: org.maxMembers === -1 ? undefined : org.maxMembers,\n description: org.description,\n private: org.private,\n address: org.address,\n unlimited: org.maxMembers === -1,\n image: org.image || 'BASIC',\n file: undefined,\n contact: org.contact,\n tags: org.tags,\n telephone: org.telephone || '',\n email: org.email || '',\n});\n","import { Organization } from '@aclito/entities';\nimport { useOrganizationEdit as useOrgEdit } from '@aclito/shared/features/organization/hooks/useOrganizationEdit';\nimport { OrganizationForm } from '@aclito/shared/types';\nimport { composeInitialEditValues } from '@aclito/shared/features/organization/utils/composeInitialEditValues';\n\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useOrganizationEdit = (org: Organization | undefined) => {\n const nav = useNavigate();\n const { editOrg, isLoading } = useOrgEdit(org);\n const initialValues = org ? composeInitialEditValues(org) : undefined;\n\n const handleSubmit = async (data: OrganizationForm) => {\n await editOrg(data);\n nav(-1);\n };\n\n return { initialValues, handleSubmit, isLoading };\n};\n","import { OrganizationTag, OrganizationTags } from '../types/types';\n\nexport const generateTagMappings = (\n selectedTag: OrganizationTag,\n): OrganizationTags => {\n const tagMappings: Record<OrganizationTag, OrganizationTags> = {\n [OrganizationTag.ORGANIZATION]: {\n organization: true,\n team: false,\n club: false,\n },\n [OrganizationTag.CLUB]: { organization: false, team: false, club: true },\n [OrganizationTag.TEAM]: { organization: false, team: true, club: false },\n };\n\n return tagMappings[selectedTag];\n};\n","import { OrganizationTag, OrganizationTags } from '../types/types';\n\nimport { getCurentTag } from './getOrgTag';\n\nimport { TranslateKey, txFn } from '@aclito/shared/types';\n\nexport const orgTypeLabelText = (tags: OrganizationTags, t?: txFn) => {\n const translations: Record<OrganizationTag, TranslateKey> = {\n [OrganizationTag.TEAM]: 'org.new.tab.sublabel.team',\n [OrganizationTag.CLUB]: 'org.new.tab.sublabel.club',\n [OrganizationTag.ORGANIZATION]: 'org.new.tab.sublabel.organization',\n };\n\n if (!t) {\n return translations[getCurentTag(tags)];\n }\n\n const [firstWord, ...rest] = t(translations[getCurentTag(tags)]).split(' ');\n return [firstWord + ' ', rest.join(' ')];\n};\n","import React, { useEffect } from 'react';\nimport { OrganizationTag } from '@aclito/shared/features/organization/types/types';\nimport { useFormContext } from 'react-hook-form';\nimport { OrganizationForm } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { generateTagMappings } from '@aclito/shared/features/organization/utils/mapOrgTags';\nimport { getCurentTag } from '@aclito/shared/features/organization/utils/getOrgTag';\nimport { orgTypeLabelText } from '@aclito/shared/features/organization/utils/orgTypeLabelText';\nimport { useTheme } from 'styled-components';\nimport { getCommonInputLabelStyle } from '@aclito/ui-web/utils/styles';\n\nimport {\n ValidatedInput,\n ValidatedCheckbox,\n Text,\n Tabs,\n HStack,\n VStack,\n ValidatedNumberInput,\n ValidatedTextArea,\n TabButton,\n} from '@/components';\n\ninterface DescriptionProps {\n isCreating?: boolean;\n}\n\nconst Description: React.FC<DescriptionProps> = ({ isCreating = false }) => {\n const { setValue, watch } = useFormContext<OrganizationForm>();\n const theme = useTheme();\n const tags = watch('tags');\n const t = useTranslate();\n\n const handleTabIndexChange = (val: OrganizationTag) =>\n setValue('tags', generateTagMappings(val));\n\n const watchMaxMembers = watch('maxMembers');\n const watchUnlimited = watch('unlimited');\n useEffect(() => {\n if (!watchMaxMembers) {\n setValue('unlimited', true);\n } else {\n setValue('unlimited', false);\n }\n }, [watchMaxMembers]);\n\n useEffect(() => {\n if (watchUnlimited) {\n setValue('maxMembers', 0);\n }\n }, [watchUnlimited]);\n\n return (\n <VStack spacing={20}>\n <ValidatedInput\n name=\"name\"\n txLabel=\"org.name\"\n txPlaceholder=\"org.name\"\n required\n />\n\n <HStack\n style={{ display: 'flex', alignItems: 'flex-end', flexWrap: 'nowrap' }}\n >\n <ValidatedNumberInput\n name=\"maxMembers\"\n txLabel=\"org.members\"\n txPlaceholder=\"org.members\"\n min={1}\n />\n <ValidatedCheckbox name=\"unlimited\" txLabel=\"org.unlimited\" />\n </HStack>\n {isCreating && <ValidatedCheckbox name=\"private\" txLabel=\"org.private\" />}\n <ValidatedCheckbox name=\"contact\" txLabel=\"org.contact.text\" />\n\n <ValidatedInput\n name=\"email\"\n txLabel=\"org.email\"\n txPlaceholder=\"org.email\"\n />\n\n <ValidatedInput\n name=\"telephone\"\n txLabel=\"org.telephone\"\n txPlaceholder=\"org.telephone\"\n />\n\n <ValidatedInput\n name=\"address\"\n txLabel=\"org.address\"\n txPlaceholder=\"org.address\"\n />\n\n <ValidatedTextArea\n name=\"description\"\n txLabel=\"org.description\"\n txPlaceholder=\"org.description\"\n />\n\n <VStack spacing={5}>\n <Text\n style={{ ...getCommonInputLabelStyle(theme) }}\n tx=\"org.new.tab.label\"\n />\n <Text\n style={{ ...getCommonInputLabelStyle(theme), color: theme.grey30 }}\n >\n <Text span weight={700}>\n {orgTypeLabelText(tags, t)[0]}\n </Text>\n {orgTypeLabelText(tags, t)[1]}\n </Text>\n <Tabs\n unstyled\n bg={theme.primary10}\n p={'5px'}\n maw={'max-content'}\n style={{\n border: 1,\n borderRadius: 10,\n }}\n selectedIndex={getCurentTag(tags)}\n setSelectedIndex={(tag) =>\n handleTabIndexChange(tag as OrganizationTag)\n }\n >\n <TabButton value={OrganizationTag.TEAM} tx=\"org.new.tab.team\" />\n <TabButton value={OrganizationTag.CLUB} tx=\"org.new.tab.club\" />\n <TabButton\n value={OrganizationTag.ORGANIZATION}\n tx=\"org.new.tab.organization\"\n />\n </Tabs>\n </VStack>\n </VStack>\n );\n};\n\nexport default Description;\n","import React from 'react';\nimport { Divider } from '@mantine/core';\nimport { useOrganizationSchema } from '@aclito/shared/features/organization/hooks/useOrganizationSchema';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useTheme } from 'styled-components';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useOrgCreateEdit } from '../../hooks/useOrgCreateEdit';\n\nimport { useOrganizationEdit } from './hooks/useOrganizationEdit';\n\nimport {\n SectionGrid,\n ActionButton,\n Stepper,\n TitleBar,\n useStepper,\n VStack,\n ValidatedDropzone,\n StepperButtons,\n} from '@/components';\nimport Description from '@/common/OrganizationForm/Description';\nimport { StateOrganizationEdit } from '@/util/types';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport withRouter from '@/navigation/withRouter';\n\n// type AlertErrorKeys = keyof Pick<OrganizationForm, 'name' | 'telephone'>;\n\ntype OrganizationEditProps = TypedLocation<StateOrganizationEdit>;\nconst OrganizationEdit: React.FC<OrganizationEditProps> = ({ state }) => {\n const org = state?.org;\n\n const { handleSubmit, initialValues } = useOrganizationEdit(org);\n const { newOrganizationSchema } = useOrganizationSchema(org);\n\n const { active, setActive, nextStep, prevStep } = useStepper();\n const t = useTranslate();\n const steps = [\n {\n component: <Description />,\n label: t('org.info.description'),\n },\n {\n component: <ValidatedDropzone name=\"image\" imageOnly />,\n label: t('org.info.avatar'),\n },\n ];\n\n const methods = useForm({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(newOrganizationSchema),\n });\n\n const theme = useTheme();\n\n const { onError, navBack } = useOrgCreateEdit();\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"org.title\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <Divider color={theme.grey10} />\n <StepperButtons\n {...{\n active,\n steps: steps.length,\n nextStep,\n onError,\n onSubmit: handleSubmit,\n prevStep,\n create: false,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default withRouter(OrganizationEdit);\n","import { OrganizationForm } from '../../../types';\n\nexport const composeInitialCreateValues = (): OrganizationForm => ({\n name: '',\n maxMembers: undefined,\n description: '',\n private: false,\n address: '',\n unlimited: true,\n image: 'BASIC',\n telephone: '',\n email: '',\n file: undefined,\n contact: false,\n tags: {\n team: true,\n club: false,\n organization: false,\n },\n});\n","import { OrganizationForm } from '../../../types';\n\nimport { useCreateOrganizationMutation } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useOrganizationCreate = () => {\n const [createOrganization, { isLoading }] = useCreateOrganizationMutation();\n const createOrg = async (formValues: OrganizationForm) => {\n await createOrganization(formValues);\n };\n\n return { createOrg, isLoading };\n};\n","import { OrganizationForm } from '@aclito/shared/types';\nimport { composeInitialCreateValues } from '@aclito/shared/features/organization/utils/composeInitialCreateValues';\nimport { useOrganizationSchema } from '@aclito/shared/features/organization/hooks/useOrganizationSchema';\nimport { useOrganizationCreate } from '@aclito/shared/features/organization/hooks/useOrganizationCreate';\n\nimport { ROUTE_ORGANIZATIONS } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nexport const useNewOrganization = () => {\n const nav = useNavigate();\n\n const initialValues = composeInitialCreateValues();\n const { createOrg, isLoading } = useOrganizationCreate();\n\n const { newOrganizationSchema } = useOrganizationSchema();\n\n const createNewOrganization = async (data: OrganizationForm) => {\n await createOrg(data);\n nav(ROUTE_ORGANIZATIONS);\n };\n\n return {\n initialValues,\n createNewOrganization,\n newOrganizationSchema,\n isLoading,\n };\n};\n","import React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Divider } from '@mantine/core';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { OrganizationForm } from '@aclito/shared/types';\nimport { useTheme } from 'styled-components';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useOrgCreateEdit } from '../../hooks/useOrgCreateEdit';\n\nimport { useNewOrganization } from './hooks/useNewOrganization';\n\nimport {\n SectionGrid,\n ActionButton,\n Stepper,\n TitleBar,\n useStepper,\n VStack,\n ValidatedDropzone,\n StepperButtons,\n} from '@/components';\nimport Description from '@/common/OrganizationForm/Description';\n\nconst OrganizationNew: React.FC = () => {\n const { initialValues, newOrganizationSchema, createNewOrganization } =\n useNewOrganization();\n\n const { active, setActive, nextStep, prevStep } = useStepper();\n const t = useTranslate();\n const steps = [\n {\n component: <Description isCreating={true} />,\n label: t('org.info.description'),\n },\n {\n component: <ValidatedDropzone name=\"image\" imageOnly />,\n label: t('org.info.avatar'),\n },\n ];\n\n const methods = useForm<OrganizationForm>({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(newOrganizationSchema),\n });\n\n const theme = useTheme();\n\n const { onError, navBack } = useOrgCreateEdit();\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"nav.org\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n <Stepper\n {...{\n active,\n steps,\n setActive,\n nextStep,\n prevStep,\n }}\n />\n <Divider color={theme.grey10} />\n <StepperButtons\n {...{\n active,\n steps: steps.length,\n nextStep,\n prevStep,\n onError,\n onSubmit: createNewOrganization,\n }}\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default OrganizationNew;\n","import { Organization } from '@aclito/entities';\n\nimport { UseNavigateType } from '@/hooks/useNavigate';\n\ninterface OrganizationListingProps {\n selected: string | undefined;\n setSelected: (val: Organization) => void;\n navigation: UseNavigateType;\n search: string;\n tabIndex: OrgsTabType;\n getSelectedOrgs: Organization[];\n setTabIndex: React.Dispatch<React.SetStateAction<OrgsTabType>>;\n handleSearch: (val: string) => void;\n resetSearch: () => void;\n loading: boolean;\n open: boolean;\n toggle: () => void;\n nextToken: string | undefined | null;\n handleShowMore: () => void;\n showEmpty: boolean;\n}\n\ninterface OrganizationInfoProps {\n selected: string;\n toggle: () => void;\n}\n\nexport enum OrgsTabType {\n MYORGS = 'myOrgs',\n ALLORGS = 'allOrgs',\n}\n\nexport type { OrganizationListingProps, OrganizationInfoProps };\n","import React from 'react';\nimport { getOrgUserRole } from '@aclito/shared/util/getOrgUserRole';\nimport {\n isClub,\n isOrganization,\n isTeam,\n} from '@aclito/shared/features/organization/utils/getOrgTag';\nimport { Organization, UserInfo } from '@aclito/entities';\n\nimport PlayersMembersNumber from '../PlayersMembersNumber';\n\nimport {\n PlainCard,\n HStack,\n Text,\n VStack,\n OrgAvatar,\n CardStatusBannerIcon,\n CardStatusBannerText,\n} from '@/components';\n\ntype OrganizationCardProps = {\n organization: Organization;\n userInfo: UserInfo;\n selected: string | undefined;\n setSelected: (val: Organization) => void;\n};\n\nconst OrganizationCard: React.FC<OrganizationCardProps> = ({\n organization,\n userInfo,\n setSelected,\n selected,\n}) => {\n return (\n <PlainCard\n className={selected === organization.id ? 'selected' : ''}\n onClick={() => setSelected(organization)}\n >\n <HStack style={{ flexWrap: 'nowrap' }}>\n <OrgAvatar org={organization} size={50} />\n\n <VStack spacing={8} style={{ width: '100%' }}>\n <HStack\n style={{ justifyContent: 'space-between', flexWrap: 'nowrap' }}\n >\n <Text size={16} lineClamp={1} weight={700}>\n {organization.name}\n </Text>\n {organization.maxMembers === -1 && (\n <PlayersMembersNumber\n textSize={14}\n withIcon\n iconSize={16}\n organization={organization}\n />\n )}\n </HStack>\n\n <HStack spacing={4}>\n {getOrgUserRole(organization, userInfo.id) === 'admin' && (\n <CardStatusBannerIcon type=\"orgAdmin\" />\n )}\n {getOrgUserRole(organization, userInfo.id) === 'powerUser' && (\n <CardStatusBannerIcon type=\"orgPowerUser\" />\n )}\n {isClub(organization) && (\n <CardStatusBannerText type=\"orgTypeClub\" />\n )}\n {isTeam(organization) && (\n <CardStatusBannerText type=\"orgTypeTeam\" />\n )}\n {isOrganization(organization) && (\n <CardStatusBannerText type=\"orgTypeOrganization\" />\n )}\n </HStack>\n </VStack>\n </HStack>\n </PlainCard>\n );\n};\n\nexport default OrganizationCard;\n","import styled from 'styled-components';\nimport { Center, Loader, Space } from '@mantine/core';\nimport React from 'react';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport { OrganizationListingProps, OrgsTabType } from '../interface';\n\nimport {\n ActionButton,\n EmptyList,\n HStack,\n Icon,\n SearchBar,\n ShowMoreButton,\n Tab,\n Tabs,\n Title,\n TitleBar,\n} from '@/components';\nimport { ROUTE_NEW_ORGANIZATION } from '@/util/constants';\nimport OrganizationCard from '@/components/Cards/OrganizationCard';\n\nconst OrganizationListing: React.FC<OrganizationListingProps> = ({\n selected,\n setSelected,\n navigation,\n tabIndex,\n search,\n setTabIndex,\n handleSearch,\n resetSearch,\n handleShowMore,\n nextToken,\n getSelectedOrgs,\n loading,\n toggle,\n showEmpty,\n}) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const [showModalTooltip] = useShowTooltipModal('organizationTooltip');\n\n const handleNavigation = () => {\n navigation(ROUTE_NEW_ORGANIZATION);\n };\n\n const handleTabChange = (val: string) =>\n val === '0'\n ? setTabIndex(OrgsTabType.MYORGS)\n : setTabIndex(OrgsTabType.ALLORGS);\n\n return (\n <ListingSection>\n <TitleBar>\n <HStackTop>\n <HStack>\n <Title tx={'org.title'} />\n <Icon icon={'info'} onClick={showModalTooltip} color={'primary'} />\n </HStack>\n <HStack>\n <ActionButton\n iconType={'add'}\n data-testid=\"add-organnization\"\n primary\n onClick={handleNavigation}\n />\n <SlideMenu iconType=\"leftDrop\" onClick={toggle} />\n </HStack>\n </HStackTop>\n </TitleBar>\n <Tabs\n selectedIndex={tabIndex === OrgsTabType.MYORGS ? '0' : '1'}\n setSelectedIndex={handleTabChange}\n >\n <Tab tx=\"tabs.myOrg\" />\n <Tab tx=\"tabs.all\" />\n </Tabs>\n\n <Orgs>\n {showEmpty && tabIndex === OrgsTabType.MYORGS && (\n <>\n <Space h={24} />\n <EmptyList iconType={'org'} action=\"org\" tx=\"flatlist.noorgsyet\" />\n </>\n )}\n\n <SearchBar\n mt={8}\n onClear={resetSearch}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleSearch(e.target.value)\n }\n value={search}\n />\n\n {loading ? (\n <Center style={{ marginTop: 16 }}>\n <Loader />\n </Center>\n ) : (\n <>\n {getSelectedOrgs.map((o) => (\n <OrganizationCard\n key={o.id}\n organization={o}\n userInfo={userInfo}\n selected={selected}\n setSelected={setSelected}\n />\n ))}\n <Space h={24} />\n <Center>\n {nextToken && tabIndex === OrgsTabType.ALLORGS && (\n <ShowMoreButton onClick={handleShowMore} />\n )}\n </Center>\n </>\n )}\n </Orgs>\n </ListingSection>\n );\n};\n\nconst ListingSection = styled.div`\n height: 100%;\n width: 100%;\n`;\n\n// Custom media queries to handle element wrapping movements\nconst Orgs = styled.div`\n display: flex;\n flex-direction: column;\n\n & > :not(:last-child) {\n margin-bottom: 10px;\n }\n height: calc(100vh - 13rem);\n @media (${deviceMax.laptop}) {\n height: calc(100vh - 13rem);\n }\n @media (${deviceMax.tablet}) {\n height: calc(100vh - 16rem);\n }\n @media (max-width: 308px) {\n height: calc(100vh - 21rem);\n }\n overflow-y: auto;\n`;\n\nconst HStackTop = styled(HStack)`\n width: 100%;\n justify-content: space-between;\n`;\n\nconst SlideMenu = styled(ActionButton)`\n @media ${deviceMin.laptop} {\n display: none;\n }\n`;\n\nexport default OrganizationListing;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { debounce } from '@aclito/shared/util/debounce';\nimport { useMemo, useState } from 'react';\nimport {\n useListMyOrganizationsQuery,\n useListAllOrganizationsQuery,\n selectMyOrganizations,\n useLazyListAllOrganizationsQuery,\n useCreateOrganizationMutation,\n useUpdateOrganizationMutation,\n} from '@aclito/shared/redux/api/organizationApi';\n\nimport { OrgsTabType } from '../interface';\n\nexport const useOrganizations = () => {\n const [search, setSearch] = useState<string>('');\n const [debouncedSearch, setDebouncedSearch] = useState<string>('');\n const {\n isLoading: myOrgsLoading,\n isUninitialized,\n isSuccess,\n } = useListMyOrganizationsQuery({\n nextToken: null,\n });\n const { data, isLoading: allOrgsLoading } = useListAllOrganizationsQuery({\n nextToken: null,\n ...(debouncedSearch.length && { name: debouncedSearch }),\n });\n const myOrgs = useAppSelector(selectMyOrganizations);\n const allOrgs = data?.orgs ?? [];\n\n const [, { isLoading: myOrgsCreateLoading }] =\n useCreateOrganizationMutation();\n\n const [, { isLoading: myOrgsUpdateLoading }] =\n useUpdateOrganizationMutation();\n\n const [tabIndex, setTabIndex] = useState<OrgsTabType>(OrgsTabType.MYORGS);\n const [trigger] = useLazyListAllOrganizationsQuery();\n const handleShowMore = () => {\n trigger({\n ...(debouncedSearch.length && { name: debouncedSearch }),\n nextToken: data?.nextToken ?? null,\n });\n };\n\n const handleFilters = useMemo(\n () =>\n debounce((name: string) => {\n setDebouncedSearch(name);\n }, 200),\n [setDebouncedSearch],\n );\n\n const handleSearch = (val: string) => {\n setSearch(val);\n if (!myOrgsSelected && (val.length === 0 || val.length > 2)) {\n handleFilters(val);\n }\n };\n const resetSearch = () => {\n setSearch('');\n };\n\n const myOrgsSelected = tabIndex === OrgsTabType.MYORGS;\n const getSelectedOrgs = myOrgsSelected\n ? myOrgs?.filter((o) =>\n o.name.toLowerCase().includes(search.toLowerCase()),\n ) ?? []\n : allOrgs;\n return {\n handleFilters,\n search,\n tabIndex,\n myOrgsSelected,\n getSelectedOrgs,\n setTabIndex,\n handleSearch,\n resetSearch,\n myOrgsLoading,\n allOrgsLoading,\n myOrgsCreateLoading,\n myOrgsUpdateLoading,\n handleShowMore,\n showEmpty: !isUninitialized && isSuccess && !myOrgs.length,\n nextToken: data?.nextToken,\n };\n};\n","import { ComponentType, createContext, FC, useContext } from 'react';\nimport { useDisclosure } from '@mantine/hooks';\n\ntype EventFormContextType = { toggle: () => void; open: boolean };\n\nconst ToggleContext = createContext<EventFormContextType>({\n open: false,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n toggle: () => {},\n});\n\nconst ToggleProvider = ({\n children,\n initial,\n}: {\n children: React.ReactNode;\n initial: boolean;\n}) => {\n const [open, { toggle }] = useDisclosure(initial);\n\n return (\n <ToggleContext.Provider value={{ open, toggle }}>\n {children}\n </ToggleContext.Provider>\n );\n};\n\nexport const useToggleProvider = () => {\n const value = useContext(ToggleContext);\n\n if (!value)\n throw new Error('useToggleContext must be used within ToggleProvider');\n\n return value;\n};\n\nexport default ToggleProvider;\n\nexport const withToggleProvider = <P extends object>(\n WrappedComponent: ComponentType<P>,\n): FC<P> => {\n return function ComponentWithProvider(props: P) {\n return (\n <ToggleProvider initial={false}>\n <WrappedComponent {...props} />\n </ToggleProvider>\n );\n };\n};\n","import { Organization, UserInfo } from '@aclito/entities';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport {\n OrganizationModel,\n OrganizationModelDetermined,\n} from '@aclito/shared/classes/OrganizationModel';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\n\ntype Extra = { isFetching: boolean };\n\nexport const useOrganizationModel = <T extends string | Organization>(\n arg: T | undefined,\n): T extends string\n ? { model: OrganizationModel } & Extra & {\n data: { org: Organization; members: UserInfo[] };\n }\n : T extends Organization\n ? {\n model: OrganizationModelDetermined;\n } & Extra\n : unknown => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { data, ...rest } = useFindOrganizationQuery(\n { id: arg as string },\n { skip: !arg || typeof arg !== 'string' },\n );\n if (typeof arg !== 'string') {\n // @ts-ignore\n return {\n model: new OrganizationModel(arg, userInfo) as Omit<\n OrganizationModel,\n 'organization'\n > & { organization: Organization },\n ...rest,\n };\n }\n // @ts-ignore\n return {\n data,\n model: new OrganizationModel(data?.org, userInfo),\n ...rest,\n };\n};\n","import { MemberType, UserWithMembershipType } from '../types';\n\nexport const memberControls = (\n member: UserWithMembershipType,\n myRole: MemberType,\n withControls: boolean | undefined,\n myId: string,\n) => {\n if (withControls) {\n if (myId === member.id || myRole === 'member') {\n return false;\n }\n if (\n myRole === 'admin' ||\n (myRole === 'powerUser' &&\n (member.type === 'member' || member.type === 'powerUser'))\n ) {\n return true;\n }\n\n return false;\n }\n return false;\n};\n","import { Organization } from '@aclito/entities';\n\nimport { getOrgUserRole } from '@aclito/shared/util/getOrgUserRole';\n\nexport const canSeeNotes = (\n userInfoId: string,\n playerId: string,\n org?: Organization,\n) => {\n const currentUserRole = org ? getOrgUserRole(org, userInfoId) : null;\n\n if (!currentUserRole) return false;\n const hasApplicableRole =\n currentUserRole === 'admin' || currentUserRole === 'powerUser';\n return playerId !== userInfoId && hasApplicableRole && org?.contact;\n};\n","type ItemWithKey<T> = {\n [K in keyof T]: T[K] extends string ? K : never;\n}[keyof T];\n\nexport function mergeAndFilter<T extends Record<string, any>>(\n a1: T[],\n a2: T[],\n key: ItemWithKey<T>,\n): T[] {\n const a2Map = new Map(a2.map((item) => [item[key], item]));\n\n const merged = a1.reduce((acc, item) => {\n const matchedItem = a2Map.get(item[key]);\n if (matchedItem) {\n acc[item[key]] = Object.assign({}, item, matchedItem);\n }\n return acc;\n }, {} as Record<string, T>);\n\n // Add items from a2 that were not in a1\n a2.forEach((item) => {\n if (!merged[item[key]]) {\n merged[item[key]] = item;\n }\n });\n\n return Object.values(merged);\n}\n","import { EventPlayer, UserInfo, Event } from '@aclito/entities';\n\nimport { EventWithPlayers } from '@aclito/shared/types';\n\nexport const mapFeedbackEvent = (\n event: Event,\n pool: UserInfo[],\n): EventWithPlayers => {\n const _mapAlias = (player: EventPlayer) => {\n const foundUser = pool.find((user) => user.id === player.id);\n const foundAlias = foundUser?.aliases.find(\n (alias) => alias.id === player.aliasId,\n );\n\n if (foundAlias && foundUser) {\n return {\n ...foundUser,\n name: foundAlias.name,\n image: foundAlias.image,\n surname: foundAlias.surname,\n aliasId: foundAlias.id,\n };\n }\n };\n\n const playersInfo = event.players\n .map((player) => {\n if (player.aliasId) {\n return _mapAlias(player);\n }\n\n return pool.find((user) => user.id === player.id);\n })\n .filter(Boolean);\n\n return {\n ...event,\n leaderInfo: null as any,\n playersInfo,\n queuePlayersInfo: [],\n };\n};\n","import { feedbackClient } from '@aclito/client';\nimport {\n EmittedEmojiBatchFeedbackEvent,\n EmittedFeedbackEvent,\n EmojiByOrgMap,\n Event,\n FeedbackEvent,\n} from '@aclito/entities';\n\nimport { aclitoApi } from '../api';\nimport { AppState } from '../store';\nimport { EventWithPlayers } from '../../types';\nimport { useAppSelector } from '../../hooks';\nimport { profileSelectors } from '../slices/profileSlices';\nimport { EventModel } from '../../classes/EventModel';\nimport { formatEvent } from '../../features/event/utils/formatEvents';\nimport { mergeAndFilter } from '../../features/event/utils/mergeAndFilter';\nimport { mapFeedbackEvent } from '../../features/event/utils/mapFeedbackEvent';\nimport { logger } from '../../lib/logger';\nimport { handleError } from '../utils/handleError';\n\nexport const LIST_PAST_EVENTS = 'listPastEvents';\nexport const GET_PAST_EVENT = 'getPastEvent';\nexport const EMIT_FEEDBACK_EVENT = 'emitFeedbackEvent';\nexport const EMIT_EMOJI_BATCH_FEEDBACK_EVENT = 'emitEmojiBatchFeedbackEvent';\nexport const FINISH_EVENT = 'finishEvent';\nexport const EMOJIS_BY_ORG = 'emojisByOrg';\n\nexport const feedbackApi = aclitoApi.injectEndpoints({\n endpoints: (builder) => ({\n [EMIT_FEEDBACK_EVENT]: builder.mutation<\n FeedbackEvent[],\n EmittedFeedbackEvent\n >({\n queryFn: async (args) => {\n try {\n const { data } = await feedbackClient.feedback.emit(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ eventId }, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled;\n dispatch(\n feedbackApi.util.updateQueryData(\n 'getPastEvent',\n eventId,\n (draft) => {\n return {\n ...draft,\n ratings: mergeAndFilter(draft.ratings, data, 'id'),\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [EMIT_EMOJI_BATCH_FEEDBACK_EVENT]: builder.mutation<\n FeedbackEvent[],\n EmittedEmojiBatchFeedbackEvent\n >({\n queryFn: async (args) => {\n try {\n const { data } = await feedbackClient.feedback.emitEmojiBatch(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted({ eventId }, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled;\n dispatch(\n feedbackApi.util.updateQueryData(\n 'getPastEvent',\n eventId,\n (draft) => {\n return {\n ...draft,\n ratings: mergeAndFilter(draft.ratings, data, 'id'),\n };\n },\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [FINISH_EVENT]: builder.mutation<string, string>({\n queryFn: async (args) => {\n try {\n await feedbackClient.feedback.finish(args);\n return { data: args };\n } catch (error) {\n return handleError(error);\n }\n },\n async onQueryStarted(id, { dispatch, queryFulfilled, getState }) {\n try {\n await queryFulfilled;\n const orgId = (getState() as AppState).userInfo.orgId;\n dispatch(\n feedbackApi.util.updateQueryData(\n 'listPastEvents',\n undefined,\n (draft) => draft.filter((e) => e.id !== id),\n ),\n );\n dispatch(\n feedbackApi.util.updateQueryData('listPastEvents', orgId, (draft) =>\n draft.filter((e) => e.id !== id),\n ),\n );\n } catch (e) {\n logger.debug('API error', { err: e });\n }\n },\n }),\n [LIST_PAST_EVENTS]: builder.query<Event[], undefined | string>({\n queryFn: async (args) => {\n try {\n const { data } = await feedbackClient.feedback.getEvents(args);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [GET_PAST_EVENT]: builder.query<\n EventWithPlayers & { ratings: FeedbackEvent[] },\n string\n >({\n queryFn: async (id) => {\n try {\n const { data } = await feedbackClient.feedback.getEvent(id);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n [EMOJIS_BY_ORG]: builder.query<EmojiByOrgMap, string>({\n queryFn: async (id) => {\n try {\n const { data } = await feedbackClient.org.byOrg(id);\n return { data: data };\n } catch (error) {\n return handleError(error);\n }\n },\n }),\n }),\n});\n\nexport const useFeedbackEvent = <T extends string | undefined>(id: T) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const { data, ...rest } = useGetPastEventQuery(id ?? '', { skip: !id });\n\n if (!data) {\n return {\n model: undefined,\n ratings: [] as FeedbackEvent[],\n ...rest,\n };\n }\n const mappedEvent = mapFeedbackEvent(data, data.playersInfo);\n return {\n model: new EventModel(formatEvent(mappedEvent), userInfo),\n ratings: data.ratings,\n ...rest,\n };\n};\n\nexport const {\n useGetPastEventQuery,\n useListPastEventsQuery,\n useEmitFeedbackEventMutation,\n useEmitEmojiBatchFeedbackEventMutation,\n useFinishEventMutation,\n useEmojisByOrgQuery,\n} = feedbackApi;\n","import { EmojiByOrgMap } from '@aclito/entities';\n\nimport { EmojisKey } from '../types';\n\nexport function sortUsersByTopEmoji<T extends { id: string }>(\n users: T[],\n emojiData: EmojiByOrgMap,\n emojiName: EmojisKey,\n) {\n return [...users].sort((a, b) => {\n const userAEmojiValue = emojiData[a.id]?.[emojiName] || 0;\n const userBEmojiValue = emojiData[b.id]?.[emojiName] || 0;\n\n return userBEmojiValue - userAEmojiValue;\n });\n}\n","import { MemberType } from '@aclito/shared/types';\nimport React from 'react';\n\nimport { CardStatusBannerText } from '@/components';\n\ninterface RoleBannerProps {\n myRole: MemberType;\n}\n\nconst RoleBanner: React.FC<RoleBannerProps> = ({ myRole }) => {\n const canDisplayRole = myRole && myRole !== 'member';\n return (\n <>\n {canDisplayRole && (\n <CardStatusBannerText\n type={myRole === 'admin' ? 'orgAdmin' : 'orgPowerUser'}\n />\n )}\n </>\n );\n};\n\nexport default RoleBanner;\n","import {\n EmojisKey,\n MemberCardProps,\n MemberType,\n OnEditMemberFunction,\n OnRemoveMemberFunction,\n UserWithMembershipType,\n} from '@aclito/shared/types';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport React, { useState } from 'react';\nimport { memberControls } from '@aclito/shared/util/memberControls';\nimport { canSeeNotes } from '@aclito/shared/features/event/utils/canSeeNotes';\nimport { Organization } from '@aclito/entities';\nimport { useEmojisByOrgQuery } from '@aclito/shared/redux/api/feedbackApi';\nimport { Divider } from '@mantine/core';\nimport { useTheme } from 'styled-components';\nimport { sortUsersByTopEmoji } from '@aclito/shared/util/sortByEmojis';\nimport { closeAllModals } from '@mantine/modals';\nimport { config } from '@aclito/shared/config';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n Avatar,\n HStack,\n Text,\n VStack,\n Icon,\n IconHolder,\n PlainCard,\n InlineTooltip,\n} from '@/components';\nimport {\n ROUTE_NOTES_USER,\n ROUTE_PROFILE,\n ROUTE_USER_PROFILE,\n} from '@/util/constants';\nimport RoleBanner from '@/features/organization/screens/OrganizationInfo/components/RoleBanner';\nimport Stats from '@/common/Profile/Stats';\nimport { useModal } from '@/hooks/useModal';\n\ninterface OrgMemberCardsProps {\n members: UserWithMembershipType[];\n withControls: boolean;\n myRole: MemberType;\n onRemoveMember?: OnRemoveMemberFunction;\n onEditMember?: OnEditMemberFunction;\n org: Organization;\n}\n\nconst OrgMemberCards: React.FC<OrgMemberCardsProps> = ({\n members,\n onRemoveMember,\n onEditMember,\n withControls,\n myRole,\n org,\n}) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { data: emojiMap } = useEmojisByOrgQuery(org.id, {\n skip: !org.members.includes(userInfo.id),\n });\n const { openModal } = useModal();\n const theme = useTheme();\n const [emoji, setEmoji] = useState<EmojisKey | null>(null);\n\n const showSorting = !!Object.keys(emojiMap ?? {}).length;\n const sortedMembers = emoji\n ? sortUsersByTopEmoji(members, emojiMap ?? {}, emoji)\n : members;\n\n const handleEmoji = async () => {\n openModal({\n type: 'feedbackEmoji',\n values: {\n emoji,\n onConfirm: async (e) => {\n closeAllModals();\n setEmoji(e);\n },\n },\n });\n };\n\n return (\n <>\n {showSorting && (\n <HStack\n onClick={handleEmoji}\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'end',\n }}\n >\n <InlineTooltip\n txTitle={'tooltip.emoji.title'}\n txBody={'tooltip.emoji'}\n />\n\n <HStack spacing={8}>\n <Text color={theme.primary} tx={'sortBy'} />\n {emoji ? (\n <Text\n style={{\n fontSize: 18,\n width: 24,\n height: 24,\n lineHeight: 'unset',\n }}\n text={config.emojis[emoji].item}\n />\n ) : (\n <Icon color={'primary'} icon={'chevronDown'} />\n )}\n </HStack>\n </HStack>\n )}\n {sortedMembers.map((member, index: number) => {\n const emojis = emojiMap?.[member.id];\n return (\n <Card\n key={member.id}\n {...{\n member,\n emojis,\n onEditMember,\n onRemoveMember,\n myId: userInfo.id,\n myRole,\n withControls,\n org,\n index,\n }}\n index={index}\n />\n );\n })}\n </>\n );\n};\n\nconst Card: React.FC<MemberCardProps> = ({\n member,\n withControls,\n onEditMember,\n onRemoveMember,\n myRole,\n myId,\n org,\n index,\n emojis,\n}) => {\n const nav = useNavigate();\n const theme = useTheme();\n const hasControl = memberControls(member, myRole, withControls, myId);\n\n const handleRemoveMember = (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>,\n ) => {\n event.stopPropagation();\n onRemoveMember?.(member.id);\n };\n\n const handleEditMember = (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>,\n ) => {\n event.stopPropagation();\n onEditMember?.(member.type, member.id);\n };\n\n const handleClickUserNotes = (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>,\n ) => {\n event.stopPropagation();\n nav(ROUTE_NOTES_USER, { state: { id: member.id, orgId: org.id } });\n };\n\n const navigate = () =>\n myId === member.id\n ? nav(ROUTE_PROFILE)\n : nav(ROUTE_USER_PROFILE, { state: { userId: member.id } });\n\n return (\n <PlainCard\n onClick={navigate}\n data-testid={`${member.name} ${member.surname}`}\n >\n <VStack spacing={10}>\n <HStack>\n <Avatar size={48} image={member.image} />\n <VStack spacing={8}>\n <Text weight={700}>{`${member.name} ${member.surname}`}</Text>\n <RoleBanner myRole={member.type} />\n </VStack>\n\n <IconHolder style={{ cursor: 'pointer' }}>\n <>\n {canSeeNotes(myId, member.id, org) && (\n <Icon\n icon=\"note\"\n size=\"24\"\n color={'yellow'}\n onClick={handleClickUserNotes}\n data-testid={`notes-user-${index}`}\n />\n )}\n </>\n {hasControl && myRole === 'admin' && (\n <>\n <Icon\n onClick={handleRemoveMember}\n icon=\"personRemove\"\n size={'24'}\n color=\"red\"\n data-testid={`kick-user-${index}`}\n />\n <Icon\n color=\"primary\"\n onClick={handleEditMember}\n icon=\"edit\"\n size={'24'}\n data-testid={`edit-user-${index}`}\n />\n </>\n )}\n </IconHolder>\n </HStack>\n {!!Object.keys(emojis ?? {}).length && emojis && (\n <>\n <Divider color={theme.grey10} />\n <Stats compact emojis={emojis} />\n </>\n )}\n </VStack>\n </PlainCard>\n );\n};\n\nexport default OrgMemberCards;\n","import { Organization } from '@aclito/entities';\n\nimport { useUpdateMyOrganizationsMembersMutation } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useOrganizationMembers = (org: Organization) => {\n const [updateOrgMembers] = useUpdateMyOrganizationsMembersMutation();\n\n const removeMember = async (id: string) => {\n await updateOrgMembers({\n orgId: org.id,\n data: {\n memberId: id,\n },\n }).unwrap();\n };\n\n return {\n removeMember,\n };\n};\n","import { MemberType } from '@aclito/shared/types';\nimport { Organization } from '@aclito/entities';\nimport { useOrganizationMembers } from '@aclito/shared/features/organization/hooks/useOrganizationMembers';\n\nimport { useModal } from '@/hooks/useModal';\n\nexport const useOrgMembers = (org: Organization, myRole: MemberType) => {\n const { openConfirmModal, openModal } = useModal();\n const { removeMember } = useOrganizationMembers(org);\n\n const onRemoveMember = (id: string) => {\n openConfirmModal({\n txTitle: 'kick',\n txLabels: { cancel: 'close', confirm: 'kick' },\n type: 'removeMember',\n onConfirm: async () => await removeMember(id),\n });\n };\n const onEditMember = (type: MemberType, id: string) => {\n openModal({\n txTitle: 'org.changerole',\n type: 'editMember',\n values: { id, myRole, type, org },\n });\n };\n return {\n onRemoveMember,\n onEditMember,\n };\n};\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { sectionMembers } from '@aclito/shared/util/sectionOrgMembers';\nimport { Organization } from '@aclito/entities';\n\nexport const useOrganizationInfoSection = (org: Organization | undefined) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const { data } = useFindOrganizationQuery(\n { id: org?.id ?? '' },\n { skip: !org },\n );\n\n const { adminInfo, adminNames, powerUsersInfo, memberInfo, myRole } =\n sectionMembers(org, data?.members ?? [], userInfo);\n return {\n adminInfo,\n adminNames,\n powerUsersInfo,\n memberInfo,\n myRole,\n };\n};\n","import styled from 'styled-components';\nimport { useParams } from 'react-router-dom';\nimport { Organization } from '@aclito/entities';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { BackButton } from '@aclito/ui-web/components/Button';\nimport { useOrganizationModel } from '@aclito/shared/hooks/useOrganizationModel';\nimport { Center, Loader } from '@mantine/core';\nimport { Title } from '@aclito/ui-web/components/Title';\nimport { HStack } from '@aclito/ui-web/components/Layout';\n\nimport OrgMemberCards from '@/components/Cards/OrgMemberCards';\nimport { useOrgMembers } from '@/features/organization/screens/OrganizationInfo/hooks/useOrgMembers';\nimport { useOrganizationInfoSection } from '@/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoSection';\n\nconst Members = () => {\n const id = useParams()?.id;\n const { isFetching, model } = useOrganizationModel(id);\n\n if (!id)\n return (\n <TitleBar>\n <BackButton />\n </TitleBar>\n );\n\n if (isFetching) {\n return (\n <Center>\n <Loader />\n </Center>\n );\n }\n if (!model?.organization) return null;\n\n return <MembersInner organization={model.organization} />;\n};\n\nconst MembersInner = ({ organization }: { organization: Organization }) => {\n const { myRole, adminInfo, memberInfo, powerUsersInfo } =\n useOrganizationInfoSection(organization);\n const { onEditMember, onRemoveMember } = useOrgMembers(organization, myRole);\n\n const members = [...adminInfo, ...powerUsersInfo, ...memberInfo];\n\n return (\n <>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"org.members\" />\n </HStack>\n </TitleBar>\n <Content>\n <OrgMemberCards\n withControls\n {...{\n members,\n myRole,\n onEditMember,\n onRemoveMember,\n org: organization,\n }}\n />\n </Content>\n </>\n );\n};\n\nconst Content = styled.div`\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n & > :first-child {\n margin-top: 1rem;\n }\n`;\n\nexport default Members;\n","import styled from 'styled-components';\nimport { Organization } from '@aclito/entities';\nimport {\n Outlet,\n useNavigate,\n useParams,\n useSearchParams,\n} from 'react-router-dom';\nimport { deviceMin } from '@aclito/ui-web/utils/mediaQueries';\n\nimport OrganizationListing from './components/OrganizationListing';\nimport { useOrganizations } from './hooks/useOrganizations';\nimport { OrganizationListingProps, OrgsTabType } from './interface';\n\nimport {\n Overlay,\n LeftSectionLarge,\n LeftSectionSmall,\n SectionGrid,\n ActionButton,\n VStack,\n} from '@/components';\nimport {\n useToggleProvider,\n withToggleProvider,\n} from '@/providers/ToggleProvider';\nimport { ROUTE_ORGANIZATIONS } from '@/util/constants';\nimport Members from '@/features/organization/screens/OrganizationInfo/components/Members';\n\nconst Organizations = () => {\n const navigation = useNavigate();\n const id = useParams().id;\n const [params] = useSearchParams();\n const {\n search,\n tabIndex,\n getSelectedOrgs,\n setTabIndex,\n handleSearch,\n resetSearch,\n myOrgsLoading,\n allOrgsLoading,\n myOrgsCreateLoading,\n myOrgsUpdateLoading,\n handleShowMore,\n nextToken,\n showEmpty,\n } = useOrganizations();\n\n const { open, toggle } = useToggleProvider();\n\n const handleSelectedOrg = (org: Organization) => {\n navigation(`${ROUTE_ORGANIZATIONS}/${org.id}`);\n toggle();\n };\n const props: OrganizationListingProps = {\n navigation,\n handleShowMore,\n nextToken,\n selected: id,\n setSelected: handleSelectedOrg,\n resetSearch,\n handleSearch,\n setTabIndex,\n search,\n tabIndex,\n getSelectedOrgs,\n showEmpty,\n loading:\n tabIndex === OrgsTabType.MYORGS\n ? myOrgsLoading || myOrgsCreateLoading || myOrgsUpdateLoading\n : allOrgsLoading,\n open,\n toggle,\n };\n return (\n <SectionGrid $isOpen={true}>\n {open && <Overlay />}\n <LeftSectionLarge>\n <OrganizationListing {...props} />\n </LeftSectionLarge>\n {open && (\n <LeftSectionSmall>\n <OrganizationListing {...props} />\n </LeftSectionSmall>\n )}\n <div>\n {!id && (\n <EmptySelectWrapper>\n {!open && (\n <ToggleBack iconType=\"rightArrow\" onClick={toggle} tx=\"nav.org\" />\n )}\n </EmptySelectWrapper>\n )}\n {params.get('tab') === 'members' ? <Members /> : <Outlet />}\n </div>\n </SectionGrid>\n );\n};\n\nconst EmptySelectWrapper = styled(VStack)`\n height: 100%;\n`;\n\nconst ToggleBack = styled(ActionButton)`\n @media ${deviceMin.laptop} {\n display: none;\n }\n`;\n\nexport default withToggleProvider(Organizations);\n","import { useSchema } from '@aclito/shared/hooks';\n\nimport { useUserInformation } from '@/hooks/useUserInformation';\n\nexport const useAboutUser = () => {\n const { userInfoValidationSchema } = useSchema();\n\n const { handleUpdateUser, prefill, placeholderName, placeholderSurname } =\n useUserInformation();\n\n const initialValues = { ...prefill };\n\n return {\n initialValues,\n userInfoValidationSchema,\n handleUpdateUser,\n placeholderName,\n placeholderSurname,\n email: prefill.email,\n };\n};\n","import { useAuthenticator } from '@aws-amplify/ui-react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport styled from 'styled-components';\nimport { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useNavigate } from 'react-router-dom';\nimport { useDisclosure } from '@mantine/hooks';\nimport { useSchema } from '@aclito/shared/hooks/useSchema';\nimport { Loader } from '@mantine/core';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { useAboutUser } from './hooks/useAboutUser';\n\nimport {\n SectionGrid,\n VStack,\n Text,\n ActionButton,\n BackButton,\n TitleBar,\n Title,\n Container,\n HStack,\n} from '@/components';\nimport DefaultLocation from '@/common/DefaultLocation/DefaultLocation';\nimport ProfileEditForm from '@/common/ProfileEditForm/ProfileEditForm';\nimport { ROUTE_EVENTS } from '@/util/constants';\n\nconst AboutUser = () => {\n const { signOut, user } = useAuthenticator((context) => [\n context.route,\n context.signOut,\n ]);\n const isLoading = useAppSelector(profileSelectors.isLoadingUpdateMyProfile);\n const isLoadingPopulate = useAppSelector(profileSelectors.isLoadingPopulate);\n const nav = useNavigate();\n if (user?.attributes?.['custom:Login'] !== 'FIRST_TIME') {\n nav(ROUTE_EVENTS);\n }\n\n const [isMap, { toggle }] = useDisclosure(false);\n\n const {\n initialValues,\n handleUpdateUser,\n placeholderName,\n placeholderSurname,\n email,\n } = useAboutUser();\n\n const { userInfoValidationSchema } = useSchema();\n\n const methods = useForm({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(userInfoValidationSchema),\n mode: 'onChange',\n });\n\n return !isLoadingPopulate ? (\n <PageWrapper>\n <ContentContainer>\n <SectionGrid\n $isOpen={false}\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n >\n <TitleDiv>\n <TitleBar>\n <HStack>\n {isMap && <BackButton onClick={toggle} />}\n {!isMap && <Title tx=\"aboutuser.title\" />}\n </HStack>\n <ActionButton\n onClick={signOut}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n {isMap ? (\n <DefaultLocation />\n ) : (\n <ProfileEditForm\n {...{\n isLoading,\n initialValues,\n submit: handleUpdateUser,\n showTac: true,\n placeholderName,\n placeholderSurname,\n email,\n toggle,\n }}\n />\n )}\n </FormProvider>\n </TitleDiv>\n </SectionGrid>\n </ContentContainer>\n </PageWrapper>\n ) : (\n <Container>\n <VStack h={'100vh'} justify=\"center\" align=\"center\">\n <Loader />\n <Text weight={500} tx=\"loading.warning\" />\n </VStack>\n </Container>\n );\n};\n\nconst PageWrapper = styled.div`\n width: 100%;\n min-height: 100vh;\n background-color: ${({ theme }) => theme.background};\n overflow-x: hidden;\n`;\n\nconst ContentContainer = styled.div`\n padding: 16px;\n`;\n\nconst TitleDiv = styled.div`\n padding-top: 20px;\n background-color: ${({ theme }) => theme.background};\n color: ${({ theme }) => theme.grey80};\n`;\n\nexport default AboutUser;\n","import { composeUser } from '../utils/composeUser';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\nimport { useGetUserQuery } from '../../../redux/api/userApi';\n\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\n\nexport const useUserProfile = (id: string) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const t = useTranslate();\n\n const { data, refetch } = useGetUserQuery({ id });\n\n const canBeReported = userInfo?.id !== id;\n\n return {\n displayedUser: data && composeUser(t, data.user),\n stats: data?.stats,\n canBeReported,\n refetch,\n };\n};\n","import React from 'react';\nimport { FormattedUserInfo } from '@aclito/shared/types';\n\nimport { HStack, ActionButton } from '@/components';\nimport { ROUTE_REPORT_USER } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ninterface ButtonsProps {\n userInfo: FormattedUserInfo;\n canBeReported: boolean;\n}\n\nconst Buttons: React.FC<ButtonsProps> = ({ userInfo, canBeReported }) => {\n const nav = useNavigate();\n\n return (\n <HStack>\n {canBeReported && (\n <ActionButton\n onClick={() => {\n nav(ROUTE_REPORT_USER, { state: { userToReport: userInfo } });\n }}\n iconType={'report'}\n />\n )}\n </HStack>\n );\n};\n\nexport default Buttons;\n","import { FormattedUserInfo } from '@aclito/shared/types';\nimport React from 'react';\n\nimport { AboutUserMain } from '@/common/Profile';\n\ninterface DeletedUserProfileProps {\n userInfo: FormattedUserInfo;\n}\n\nconst DeletedUserProfile: React.FC<DeletedUserProfileProps> = ({\n userInfo,\n}) => {\n return <AboutUserMain userInfo={userInfo} deleted />;\n};\n\nexport default DeletedUserProfile;\n","import { Center, Loader } from '@mantine/core';\nimport React from 'react';\nimport { useUserProfile } from '@aclito/shared/features/profile/hooks/useUserProfile';\nimport { useNavigate } from 'react-router-dom';\n\nimport Achievements from '../../../goals/Achievements';\n\nimport { Buttons } from './components';\nimport { UserProfileProps } from './interface';\nimport DeletedUserProfile from './components/DeletedUserProfile';\n\nimport {\n VStack,\n TitleBar,\n Title,\n SectionGrid,\n HStack,\n BackButton,\n SectionTitle,\n} from '@/components';\nimport { AboutUserSection, AboutUserMain } from '@/common/Profile';\nimport withRouter from '@/navigation/withRouter';\nimport Reviews from '@/common/Profile/Reviews';\nimport { ROUTE_GOALS } from '@/util/constants';\n\nconst UserProfile: React.FC<UserProfileProps> = ({ state }) => {\n const userId = state?.userId ?? '';\n const navigate = useNavigate();\n\n const { displayedUser, canBeReported, stats } = useUserProfile(userId);\n\n const handleNavigationToGoals = (id: string) => {\n navigate(ROUTE_GOALS + `/${id}`);\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx={'nav.profile'} />\n </HStack>\n {displayedUser && !displayedUser.deleted && (\n <Buttons\n {...{\n userInfo: displayedUser,\n canBeReported,\n }}\n />\n )}\n </TitleBar>\n {displayedUser?.deleted ? (\n <DeletedUserProfile {...{ userInfo: displayedUser }} />\n ) : (\n <VStack>\n {!displayedUser || !stats ? (\n <Center style={{ height: '100%' }}>\n <Loader />\n </Center>\n ) : (\n <>\n {displayedUser && (\n <AboutUserMain\n {...{ userInfo: displayedUser, stats, myProfile: false }}\n />\n )}\n <AboutUserSection\n {...{ userInfo: displayedUser, stats, myProfile: false }}\n />\n </>\n )}\n\n {displayedUser && (\n <>\n <SectionTitle\n onClick={() => handleNavigationToGoals(displayedUser.id)}\n buttonLabelTx=\"tabs.achievements\"\n />\n <Achievements preview id={displayedUser.id} />\n <Reviews\n id={displayedUser.id}\n isReviewHidden={displayedUser.settings.hideReviews}\n />\n </>\n )}\n </VStack>\n )}\n </SectionGrid>\n );\n};\n\nexport default withRouter(UserProfile);\n","import { EventFilters } from '@aclito/shared/redux/types';\nimport { getById } from '@aclito/shared/util/selectObject';\nimport { config } from '@aclito/shared/config';\nimport dayjs from 'dayjs';\nimport { SelectObject } from '@aclito/shared/types';\nimport { FiltersInitialState } from '@aclito/shared/redux/initialStates';\nimport { EventTags } from '@aclito/shared/features/event/types/types';\n\nimport { QuerySearch } from '@/util/types';\n\nexport const applyQueryParams = (\n prev: URLSearchParams,\n filter: EventFilters,\n) => {\n const { level, price, freeOnly, distance, ...rest } = filter;\n const params = {\n ...rest,\n freeOnly: freeOnly?.toString(),\n gender: filter.gender?.id,\n activityType: filter.activityType?.id,\n org: filter.org?.id,\n tags: JSON.stringify(filter.tags),\n level: JSON.stringify(filter.level),\n price: JSON.stringify(filter.price),\n };\n\n const queryParams = new URLSearchParams();\n\n if (params.freeOnly !== undefined)\n queryParams.append('freeOnly', params.freeOnly);\n if (params.gender !== undefined) queryParams.append('gender', params.gender);\n if (params.level !== undefined) queryParams.append('level', params.level);\n if (params.price !== undefined) queryParams.append('price', params.price);\n if (params.activityType !== undefined)\n queryParams.append('activityType', params.activityType);\n if (params.org !== undefined) queryParams.append('org', params.org);\n if (params.tags !== undefined) queryParams.append('tags', params.tags);\n if (params.to !== undefined) queryParams.append('to', params.to);\n if (params.from !== undefined) queryParams.append('from', params.from);\n if (distance !== undefined) queryParams.append('distance', distance);\n if (params.location !== undefined)\n queryParams.append('lat', params.location.lat.toString());\n if (params.location !== undefined)\n queryParams.append('lon', params.location.lon.toString());\n\n const query = prev.get('q') || params.query;\n if (query) {\n queryParams.append('q', query);\n }\n return queryParams.toString();\n};\n\nexport const objectifyQuerySearch = (\n query: QuerySearch,\n orgOptions: SelectObject[],\n): EventFilters => {\n const q = query.q || undefined;\n const org = query.org\n ? orgOptions.some((o) => o.id === query.org)\n ? orgOptions.find((o) => o.id === query.org)\n : FiltersInitialState.org\n : FiltersInitialState.org;\n\n const activityType = query.activityType\n ? getById(query.activityType, config.activities)\n : getById(FiltersInitialState.activityType?.id ?? 'any', config.activities);\n\n const from = query.from ? _getDate(query.from) : FiltersInitialState.from;\n\n const to = query.to ? _getDate(query.to) : FiltersInitialState.to;\n\n const gender = query.gender\n ? getById(query.gender, config.gender.filter)\n : getById(FiltersInitialState.gender?.id ?? 'any', config.gender.filter);\n\n const level = query.level?.length\n ? (JSON.parse(query.level) as SelectObject[])\n : FiltersInitialState.level;\n\n const price = query.price?.length\n ? (JSON.parse(query.price) as number[])\n : FiltersInitialState.price;\n\n const distance = query.distance || FiltersInitialState.distance;\n\n const freeOnly = query.freeOnly\n ? _getBoolean(query.freeOnly as unknown as string)\n : FiltersInitialState.freeOnly;\n\n const tags = query.tags\n ? (JSON.parse(query.tags) as EventTags)\n : FiltersInitialState.tags;\n\n const location =\n query.lat && query.lon\n ? { lat: Number(query.lat), lon: Number(query.lon) }\n : undefined;\n\n return {\n org,\n activityType,\n from,\n to,\n gender,\n level,\n price,\n distance,\n location,\n tags,\n freeOnly,\n query: q,\n isDirty: true,\n };\n};\n\nconst _getBoolean = (value: string) => value === 'true';\n\nconst _getDate = (isoString: string) => {\n return dayjs(isoString).startOf('minutes').toISOString();\n};\n","import { EventFilters } from '@aclito/shared/redux/types';\nimport { useSelectObject } from '@aclito/shared/hooks/useSelectObject';\nimport dayjs from 'dayjs';\nimport { useSearchParams } from 'react-router-dom';\n\nimport { FilterProps } from '@/features/search/types';\nimport { applyQueryParams } from '@/features/search/utils/queryParams';\n\nexport const useSearchFilters = ({\n filters: filterInitialValue,\n orgOptions,\n ...props\n}: FilterProps) => {\n const [, setQueryParams] = useSearchParams();\n const { translatedFilterGender, translatedActivities, translatedLevels } =\n useSelectObject();\n\n const clearFilter = () => {\n setQueryParams({});\n props.onClearFilter?.();\n };\n\n const handleFilters = (filters: EventFilters) => {\n filters.to = dayjs(filters.to).toISOString();\n filters.from = dayjs(filters.from).toISOString();\n props.onFilterChange?.(filters);\n setQueryParams((prev) => applyQueryParams(prev, filters));\n };\n\n return {\n filterInitialValue,\n handleFilters,\n clearFilter,\n orgOptions,\n translatedActivities,\n translatedLevels,\n translatedFilterGender,\n applyQueryParams,\n };\n};\n","import dayjs from 'dayjs';\nimport styled, { useTheme } from 'styled-components';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { EventFilters } from '@aclito/shared/redux/types';\nimport { EventTag } from '@aclito/shared/features/event/types/types';\nimport { getCurrentTag } from '@aclito/shared/features/event/utils/getEventTag';\nimport { generateTagMappings } from '@aclito/shared/features/event/utils/mapEventTags';\nimport { Divider, Space } from '@mantine/core';\nimport { getCommonInputLabelStyle } from '@aclito/ui-web/utils/styles';\nimport { MAX_PRICE, MIN_PRICE } from '@aclito/shared/util/constants';\n\nimport { useSearchFilters } from '../hooks/useSearchFilters';\n\nimport {\n ActionButton,\n HStack,\n Tabs,\n TagButton,\n Text,\n ValidatedDateTimePicker,\n ValidatedMultiSelect,\n ValidatedNumberInput,\n ValidatedRangeSlider,\n ValidatedSelect,\n ValidatedSwitch,\n VStack,\n} from '@/components';\nimport { FilterProps } from '@/features/search/types';\n\nconst Filter = (props: FilterProps) => {\n const {\n filterInitialValue,\n orgOptions,\n translatedActivities,\n translatedFilterGender,\n clearFilter,\n handleFilters,\n translatedLevels,\n } = useSearchFilters(props);\n\n const methods = useForm<EventFilters>({ defaultValues: filterInitialValue });\n\n const tags = methods.watch('tags');\n\n const handleTabIndexChange = (val: EventTag) =>\n methods.setValue('tags', generateTagMappings(val));\n\n const theme = useTheme();\n\n return (\n <FormProvider {...methods}>\n <VStack spacing={16} data-testid=\"LargeFilter\">\n <ValidatedSelect\n options={translatedActivities}\n name=\"activityType\"\n txLabel=\"filters.activityType\"\n txPlaceholder=\"filters.activityType\"\n />\n <ValidatedSelect\n options={orgOptions}\n name=\"org\"\n txLabel=\"nav.org\"\n txPlaceholder=\"nav.org\"\n data-testid=\"organisation\"\n />\n <ValidatedDateTimePicker\n {...{\n txLabel: 'filters.from',\n minDate: dayjs().toDate(),\n }}\n clearable={false}\n name=\"from\"\n data-testid=\"from\"\n />\n <ValidatedDateTimePicker\n {...{\n txLabel: 'filters.to',\n minDate: dayjs().toDate(),\n }}\n clearable={false}\n name=\"to\"\n data-testid=\"to\"\n />\n <ValidatedMultiSelect\n options={translatedLevels}\n name=\"level\"\n txLabel=\"events.new.level\"\n txPlaceholder=\"events.new.level\"\n data-testid=\"level\"\n />\n <ValidatedSelect\n options={translatedFilterGender}\n name=\"gender\"\n txLabel=\"filters.gender\"\n txPlaceholder=\"filters.gender\"\n />\n <ValidatedNumberInput\n txLabel=\"filters.distance\"\n name=\"distance\"\n min={0}\n data-testid=\"distance\"\n />\n <Space />\n <Divider />\n <ValidatedSwitch name=\"freeOnly\" txLabel=\"filters.freeOnly\" />\n <ValidatedRangeSlider\n name=\"price\"\n min={MIN_PRICE}\n step={10}\n max={MAX_PRICE}\n txLabel=\"filters.price\"\n marks={[\n { value: MIN_PRICE, label: MIN_PRICE.toString() },\n { value: MAX_PRICE, label: MAX_PRICE.toString() },\n ]}\n />\n <Space h={16} />\n <VStack spacing={5}>\n <Text\n style={{ ...getCommonInputLabelStyle(theme) }}\n tx=\"filters.tags\"\n />\n <Tabs\n unstyled\n mt={'5px'}\n maw={'max-content'}\n style={{\n flexDirection: 'row',\n flex: 1,\n rowGap: 20,\n }}\n selectedIndex={tags ? getCurrentTag(tags) : EventTag.ALL}\n setSelectedIndex={(tag) => handleTabIndexChange(tag as EventTag)}\n >\n <TagButton value={EventTag.ALL} tx=\"events.new.tab.all\" />\n <TagButton value={EventTag.KIDS} tx=\"events.new.tab.kids\" />\n <TagButton value={EventTag.ADULTS} tx=\"events.new.tab.adults\" />\n </Tabs>\n </VStack>\n <Divider />\n <ButtonSection>\n <ActionButton tx=\"clear\" fullWidth onClick={clearFilter} />\n <ActionButton\n tx=\"filter\"\n primary\n fullWidth\n onClick={methods.handleSubmit(handleFilters)}\n />\n </ButtonSection>\n </VStack>\n </FormProvider>\n );\n};\n\nconst ButtonSection = styled(HStack)`\n flex-wrap: nowrap;\n`;\n\nexport default Filter;\n","import { LocationInput, Event } from '@aclito/entities';\nimport { EventFilters } from '@aclito/shared/redux/types';\nimport { InputProps } from '@aclito/ui-web/components/Form/types';\nimport { SelectObject } from '@aclito/shared/types';\n\nexport type MarkedMapProps = {\n onCenterChange: (region: LocationInput & { radius: number }) => void;\n radius?: number;\n filters: EventFilters;\n panToCenterOnLoad: boolean;\n displayCircle: boolean;\n onMapClusterClick: (events: Event[]) => void;\n events: Event[];\n};\n\nexport type FilterProps = {\n filters: EventFilters;\n orgOptions: SelectObject[];\n onFilterChange?: (filters: EventFilters) => void;\n onClearFilter?: () => void;\n};\n\nexport interface SearchBarProps extends InputProps {\n value: string;\n debounce?: number;\n onQueryChange: (query: string) => void;\n}\n\nexport enum SearchTabType {\n LIST = 'list',\n MAP = 'map',\n}\n","import { debounce } from '@aclito/shared/util/debounce';\nimport { useRef, useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nexport const useSearchBar = (\n onQueryChange: (query: string) => void,\n deb: number,\n) => {\n const ref = useRef<HTMLInputElement>();\n const [, setQueryParams] = useSearchParams();\n const handleDebounceQuery = useMemo(\n () =>\n debounce((value: string) => {\n setQueryParams((prev) => {\n prev.set('q', value);\n return prev.toString();\n });\n onQueryChange?.(value);\n }, deb),\n [],\n );\n\n return { ref, handleDebounceQuery };\n};\n","import React, { MutableRefObject, useState } from 'react';\n\nimport { Icon, Input } from '@/components';\nimport { useSearchBar } from '@/features/search/hooks/useSearchBar';\nimport { SearchBarProps } from '@/features/search/types';\n\nconst SearchBar: React.FC<SearchBarProps> = ({\n onQueryChange,\n value,\n txLabel,\n debounce = 1000,\n}) => {\n const { ref, handleDebounceQuery } = useSearchBar(onQueryChange, debounce);\n\n const inputRef = (ref ||\n React.createRef()) as MutableRefObject<HTMLInputElement>;\n\n const [v, setV] = useState(value);\n\n return (\n <Input\n txLabel={txLabel}\n txPlaceholder=\"search\"\n style={{ flexGrow: '1' }}\n ref={inputRef}\n value={v}\n icon={<Icon icon=\"search\" size={24} color={'primary'} />}\n onChange={(text: React.ChangeEvent<HTMLInputElement>) => {\n setV(text.target.value);\n handleDebounceQuery(text.target.value);\n }}\n />\n );\n};\n\nexport default SearchBar;\n","import { eventActions } from '@aclito/shared/redux/slices/eventSlices';\nimport { M_TO_KM_CONVERSION } from '@aclito/shared/util/constants';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { EventFilters } from '@aclito/shared/redux/types';\nimport { useSearchParams } from 'react-router-dom';\n\nimport { MarkedMapProps } from '@/features/search/types';\n\nexport const useSearchMap = (filters: EventFilters) => {\n const dispatch = useAppDispatch();\n const [, setQueryParams] = useSearchParams();\n const findEventsOnMap: MarkedMapProps['onCenterChange'] = ({\n radius,\n ...region\n }) => {\n if (Object.keys(region).length) {\n setQueryParams((prev) => {\n prev.set('lon', region.lon.toString());\n prev.set('lat', region.lat.toString());\n return prev.toString();\n });\n\n dispatch(\n eventActions.applyFilters({\n ...filters,\n distance: (radius / M_TO_KM_CONVERSION).toString(),\n location: region,\n }),\n );\n }\n };\n\n return { findEventsOnMap, showCircle: !!filters.distance };\n};\n","import { useState } from 'react';\nimport { LocationInput } from '@aclito/entities';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport {\n locationActions,\n locationSelectors,\n} from '@aclito/shared/redux/slices/locationSlice';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { UserLocation } from '@aclito/shared/types';\n\nexport const useCenterChange = (locationFilter: LocationInput | undefined) => {\n const dispatch = useAppDispatch();\n\n const searchMapLocation = useAppSelector(locationSelectors.searchMapLocation);\n const [center, setCenter] = useState(\n locationFilter\n ? {\n lat: locationFilter.lat,\n lon: locationFilter.lon,\n lng: locationFilter.lon,\n latitude: locationFilter.lat,\n longitude: locationFilter.lon,\n }\n : searchMapLocation,\n );\n\n const centerChanged = (region: LocationInput) => {\n if (region && region.lat) {\n setCenter(() => {\n const location: UserLocation = {\n lat: region.lat,\n lon: region.lon,\n lng: region.lon,\n latitude: region.lat,\n longitude: region.lon,\n };\n dispatch(locationActions.updateSearchMapLocations({ value: location }));\n return location;\n });\n return region;\n }\n };\n\n return { center, centerChanged };\n};\n","import { useJsApiLoader, GoogleMap } from '@react-google-maps/api';\nimport { ForwardedRef, MutableRefObject, createRef } from 'react';\nimport { config } from '@aclito/shared/config';\nimport { debounce } from '@aclito/shared/util/debounce';\nimport { M_TO_KM_CONVERSION } from '@aclito/shared/util/constants';\n\nimport { handleClusterClick } from '@/util/clusterClick';\nimport { MAP_API_KEY } from '@/util/constants';\nimport { useCenterChange } from '@/features/search/hooks/useCenterChange';\nimport { MarkedMapProps } from '@/features/search/types';\n\nexport const useSearchMap = (\n {\n radius,\n panToCenterOnLoad,\n onCenterChange,\n displayCircle,\n onMapClusterClick,\n events,\n filters,\n }: MarkedMapProps,\n ref: ForwardedRef<GoogleMap>,\n) => {\n const mapRef = (ref || createRef<GoogleMap>()) as MutableRefObject<GoogleMap>;\n const { isLoaded: isMapLoaded } = useJsApiLoader({\n id: 'google-map-script',\n googleMapsApiKey: MAP_API_KEY,\n });\n\n const circleRadius =\n radius ||\n parseInt(filters?.distance || config.distance.eventsDefaultDistance) *\n M_TO_KM_CONVERSION;\n\n const { center, centerChanged } = useCenterChange(filters.location);\n\n const handleMapClusterClick = (location: { lat: string; lon: string }) => {\n const e = handleClusterClick(location, events, mapRef);\n onMapClusterClick?.(e);\n };\n\n const handleOnCenterChange = (e: google.maps.MapMouseEvent) => {\n const lng = e.latLng?.lng();\n const lat = e.latLng?.lat();\n if (displayCircle && center.lat !== lat && center.lng !== lng) {\n _debouncedSearch(lat, lng);\n }\n };\n\n const _debouncedSearch = debounce((lat: number, lon: number) => {\n const changed = centerChanged({\n lat,\n lon,\n });\n if (changed) onCenterChange?.({ ...changed, radius: circleRadius });\n }, 200);\n\n const handleOnLoad = (map: google.maps.Map) => {\n if (panToCenterOnLoad) {\n setTimeout(() => {\n map.panTo({ ...center });\n }, 500);\n }\n };\n\n return {\n handleOnCenterChange,\n center,\n isMapLoaded,\n mapRef,\n circleRadius,\n handleMapClusterClick,\n handleOnLoad,\n };\n};\n","import React, { ForwardedRef, forwardRef } from 'react';\nimport { Stack } from '@mantine/core';\nimport {\n Circle,\n GoogleMap,\n GoogleMarkerClusterer,\n Marker,\n} from '@react-google-maps/api';\nimport styled, { useTheme } from 'styled-components';\nimport { ThemeColorsRecord } from '@aclito/shared/theme/colors';\n\nimport { VStack } from '@/components';\nimport { MarkedMapProps } from '@/features/search/types';\nimport { useSearchMap } from '@/features/search/hooks/useSearchMap';\nimport { MAP_BORDER_RADIUS } from '@/util/constants';\nimport MapGuide from '@/common/Maps/MapGuide';\n// eslint-disable-next-line react/display-name\nconst MarkedMap = forwardRef(\n (props: MarkedMapProps, ref: ForwardedRef<GoogleMap>) => {\n const {\n circleRadius,\n isMapLoaded,\n center,\n handleMapClusterClick,\n handleOnCenterChange,\n handleOnLoad,\n mapRef,\n } = useSearchMap(props, ref);\n\n const theme = useTheme();\n\n return (\n <>\n {isMapLoaded && (\n <Content spacing={3} align=\"center\">\n <Stack w={'100%'} justify=\"center\">\n <GoogleMap\n ref={mapRef}\n options={{\n streetViewControl: false,\n fullscreenControl: false,\n }}\n onLoad={handleOnLoad}\n mapContainerStyle={mapContainer}\n center={center}\n zoom={7}\n onClick={handleOnCenterChange}\n >\n {props.displayCircle && (\n <Circle\n radius={circleRadius}\n {...(center && {\n center,\n })}\n options={circleOptions(theme)}\n />\n )}\n <GoogleMarkerClusterer options={{}}>\n {(clusterer) => (\n <React.Fragment>\n {props.events.map(\n (event) =>\n event.place && (\n <Marker\n key={event.id}\n clickable\n clusterer={clusterer}\n onClick={() => {\n if (event.place) {\n handleMapClusterClick({\n lat: event.place.location.lat.toFixed(4),\n lon: event.place.location.lon.toFixed(4),\n });\n }\n }}\n position={{\n lat: event.place.location.lat,\n lng: event.place.location.lon,\n }}\n />\n ),\n )}\n </React.Fragment>\n )}\n </GoogleMarkerClusterer>\n </GoogleMap>\n <MapGuide />\n </Stack>\n </Content>\n )}\n </>\n );\n },\n);\n\nconst mapContainer = {\n width: '100%',\n height: 600,\n borderRadius: MAP_BORDER_RADIUS,\n};\n\nconst circleOptions = (theme: ThemeColorsRecord) => ({\n fillColor: theme.mapCircle,\n strokeColor: theme.mapCircleStroke,\n strokeWeight: 1,\n fillOpacity: 1,\n});\n\nconst Content = styled(VStack)`\n width: 100%;\n flex: 1;\n`;\n\nexport default MarkedMap;\n","import React, { useState } from 'react';\nimport { Space } from '@mantine/core';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\nimport { FormattedEvent } from '@aclito/shared/types';\nimport { Event } from '@aclito/entities';\nimport { EventFilters } from '@aclito/shared/redux/types';\n\nimport { useSearchMap } from '../hooks/useSearchMap';\n\nimport Map from '@/features/search/components/Map';\nimport EventsCards from '@/components/Cards/EventsCards';\n\ntype SearchMapProps = {\n events: Event[];\n filters: EventFilters;\n};\n\nconst SearchMap: React.FC<SearchMapProps> = ({ events, filters }) => {\n const { findEventsOnMap, showCircle } = useSearchMap(filters);\n\n const [selectedEvents, setSelectedEvents] = useState<FormattedEvent[]>([]);\n\n return (\n <>\n <div style={{ position: 'relative' }}>\n <Map\n filters={filters}\n events={events}\n displayCircle={showCircle}\n onMapClusterClick={(e) => setSelectedEvents(formatEvents(e))}\n panToCenterOnLoad={true}\n onCenterChange={findEventsOnMap}\n />\n <Space h={24} />\n <EventsCards data={selectedEvents} />\n </div>\n </>\n );\n};\n\nexport default SearchMap;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { eventActions } from '@aclito/shared/redux/slices/eventSlices';\nimport { useState } from 'react';\nimport { EventFilters } from '@aclito/shared/redux/types';\nimport { useDisclosure } from '@mantine/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport {\n useLazySearchEventsQuery,\n useSearchEventsQuery,\n} from '@aclito/shared/redux/api/eventApi';\nimport {\n commonActions,\n commonSelectors,\n} from '@aclito/shared/redux/slices/commonSlices';\n\nimport { SearchTabType } from '@/features/search/types';\n\nexport const useSearch = (filters: EventFilters) => {\n const isSearchOpen = useAppSelector(commonSelectors.isSearchOpen);\n const [searchValue, setSearchValue] = useState(filters.query ?? '');\n const [day, { toggle }] = useDisclosure(true);\n\n const dispatch = useAppDispatch();\n\n const [trigger] = useLazySearchEventsQuery();\n const { data, isLoading } = useSearchEventsQuery({\n ...filters,\n nextToken: null,\n });\n\n const events = data?.data ?? [];\n\n const handleShowMore = () => {\n trigger({\n ...filters,\n nextToken: data?.nextToken ?? null,\n });\n };\n\n const handleSearchBar = (q: string) => {\n setSearchValue(q);\n dispatch(eventActions.applyFilters({ ...filters, query: q }));\n };\n\n const onFilterChange = (f: EventFilters) => {\n dispatch(eventActions.applyFilters({ ...f, query: searchValue }));\n };\n\n const [tabIndex, setTabIndex] = useState(SearchTabType.LIST);\n\n const handleTabChange = (val: string) =>\n val === '0'\n ? setTabIndex(SearchTabType.LIST)\n : setTabIndex(SearchTabType.MAP);\n\n const [isOpen, handler] = useDisclosure(filters.isDirty || isSearchOpen, {\n onOpen() {\n dispatch(commonActions.setIsSearchOpen(true));\n },\n onClose() {\n dispatch(commonActions.setIsSearchOpen(false));\n },\n });\n\n const onClearFilter = () => {\n dispatch(eventActions.clearFilter());\n handler.close();\n };\n\n const filterProps = {\n onFilterChange,\n onClearFilter,\n };\n\n return {\n filterProps,\n isOpen,\n handler,\n toggle,\n day,\n events,\n searchValue,\n handleShowMore,\n nextToken: data?.nextToken,\n isLoading,\n handleSearchBar,\n tabIndex,\n handleTabChange,\n };\n};\n","import { dateSort } from '@aclito/shared/util/sorter';\nimport { Center, Loader, Space } from '@mantine/core';\nimport React from 'react';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { SelectObject } from '@aclito/shared/types';\nimport { FiltersInitialState } from '@aclito/shared/redux/initialStates';\nimport { EventFilters } from '@aclito/shared/redux/types';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport Filter from '../../components/Filter';\nimport { SearchTabType } from '../../types';\n\nimport {\n Overlay,\n LeftSectionLarge,\n LeftSectionSmall,\n LeftSectionTitle,\n SectionGrid,\n HStack,\n TitleBar,\n ShowMoreButton,\n ActionButton,\n Tabs,\n Tab,\n Title,\n Icon,\n EmptyList,\n} from '@/components';\nimport EventsCards from '@/components/Cards/EventsCards';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport withRouter from '@/navigation/withRouter';\nimport { QuerySearch } from '@/util/types';\nimport SearchBar from '@/features/search/components/Searchbar';\nimport SearchMap from '@/features/search/screens/Search/components/SearchMap';\nimport { useSearch } from '@/features/search/screens/Search/hooks/useSearch';\nimport { objectifyQuerySearch } from '@/features/search/utils/queryParams';\n\ntype SearchProps = TypedLocation<void, QuerySearch>;\n\nconst Search: React.FC<SearchProps> = ({ query }) => {\n const organizations = useAppSelector(selectMyOrganizations);\n const [showModalTooltip] = useShowTooltipModal('searchTooltip');\n\n const orgOptions: SelectObject[] =\n organizations.map((org) => ({\n id: org.id,\n item: org.name,\n })) ?? [];\n\n let filters: EventFilters;\n\n if (query && Object.keys(query).length) {\n filters = objectifyQuerySearch(query, orgOptions);\n } else {\n filters = FiltersInitialState;\n }\n\n const {\n isOpen,\n handler,\n filterProps,\n toggle,\n day,\n events,\n searchValue,\n nextToken,\n isLoading,\n handleSearchBar,\n handleShowMore,\n tabIndex,\n handleTabChange,\n } = useSearch(filters);\n\n return (\n <SectionGrid $isOpen={isOpen}>\n {isOpen && <Overlay onClick={handler.toggle} />}\n {isOpen && (\n <LeftSectionLarge>\n <LeftSectionTitle>\n <Title tx={'intro.title.filter'} />\n <ActionButton onClick={handler.toggle} iconType=\"leftDrop\" />\n </LeftSectionTitle>\n <Filter {...{ ...filterProps, orgOptions, filters }} />\n </LeftSectionLarge>\n )}\n {isOpen && (\n <LeftSectionSmall>\n <LeftSectionTitle>\n <Title tx={'intro.title.filter'} />\n <ActionButton onClick={handler.toggle} iconType=\"leftDrop\" />\n </LeftSectionTitle>\n <Filter {...{ ...filterProps, orgOptions, filters }} />\n </LeftSectionSmall>\n )}\n <div>\n <TitleBar>\n <HStack>\n <ActionButton\n onClick={handler.toggle}\n iconType={'filter'}\n tx=\"nav.filters\"\n />\n <Title tx={'nav.search'} />\n <Icon icon={'info'} color={'primary'} onClick={showModalTooltip} />\n </HStack>\n </TitleBar>\n <Tabs\n selectedIndex={tabIndex === SearchTabType.LIST ? '0' : '1'}\n setSelectedIndex={handleTabChange}\n >\n <Tab tx=\"tabs.list\" />\n <Tab tx=\"tabs.map\" />\n </Tabs>\n <Space h={16} />\n {tabIndex === SearchTabType.LIST && (\n <HStack>\n <SearchBar value={searchValue} onQueryChange={handleSearchBar} />\n <ActionButton\n tx={day ? 'json.monthly' : 'json.daily'}\n iconType={'chevronUp'}\n onClick={toggle}\n />\n </HStack>\n )}\n\n {isLoading && tabIndex !== SearchTabType.MAP ? (\n <Center style={{ width: '100%', height: '80%' }}>\n <Loader />\n </Center>\n ) : (\n <>\n {tabIndex === SearchTabType.MAP ? (\n <SearchMap filters={filters} events={events.filter(Boolean)} />\n ) : (\n <>\n {events.length ? (\n <>\n <EventsCards\n showAds\n showDateType={day ? 'day' : 'month'}\n fullWidth={false}\n data={formatEvents(dateSort(events, 'date', 'asc'))}\n />\n <Space h={24} />\n <Center>\n {nextToken && <ShowMoreButton onClick={handleShowMore} />}\n </Center>\n </>\n ) : (\n <>\n <Space h={24} />\n <EmptyList tx=\"flatlist.search.empty\" action=\"map\" />\n </>\n )}\n </>\n )}\n </>\n )}\n </div>\n </SectionGrid>\n );\n};\n\nexport default withRouter(Search);\n","import { useState } from 'react';\n\nimport { filterJoinedAliases } from '../utils/filterJoinedAliases';\nimport { getPlayersByFlag } from '../utils/getPlayers';\nimport { isAlias } from '../../../util/alias';\n\nimport { EventModel } from '@aclito/shared/classes/EventModel';\n\nexport const useEventInfoAliasesConfirmation = (model: EventModel) => {\n const { event, userInfo } = model;\n\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n\n const isAliasConfirmed = (aliasId: string) => {\n if (isAlias(aliasId)) {\n return event.players.some(\n (player) => player?.aliasId === aliasId && player.isConfirmed,\n );\n } else {\n return event.players.some(\n (player) =>\n player.id === aliasId && !player.aliasId && player.isConfirmed,\n );\n }\n };\n\n const handleOnAliasPress = (id: string) => {\n const toggleSelected = (selected: string[]) =>\n selected.includes(id)\n ? selected.filter((val) => val !== id)\n : [...selected, id];\n\n if (!isAliasConfirmed(id)) {\n setSelectedIds(toggleSelected);\n }\n };\n\n const isSelected = (id: string) => selectedIds.includes(id);\n\n return {\n handleOnAliasPress,\n selectedIds,\n isSelected,\n joinedAliases: filterJoinedAliases(\n getPlayersByFlag(event),\n event.leader,\n userInfo,\n ),\n isAliasConfirmed,\n };\n};\n","import type { UserAlias } from '@aclito/entities';\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { StyledPlayerCard } from '@/common/Modals/ItemStyles';\nimport {\n HStack,\n Text,\n VStack,\n Icon,\n Avatar,\n CardStatusBannerText,\n} from '@/components';\n\ninterface AliasModalConfirmItemProps {\n alias: UserAlias;\n handleOnAliasPress: (id: string) => void;\n isSelected: (id: string) => boolean;\n isAliasConfirmed: (aliasId: string) => boolean;\n}\n\nconst AliasModalConfirmItem: React.FC<AliasModalConfirmItemProps> = ({\n alias,\n handleOnAliasPress,\n isSelected,\n isAliasConfirmed,\n}) => {\n const theme = useTheme();\n return (\n <StyledPlayerCard\n onClick={() => handleOnAliasPress(alias.id)}\n key={alias.id}\n bg={isSelected(alias.id) ? `${theme.yellow}1A` : `${theme.white}`}\n mb={20}\n >\n <HStack>\n <Avatar image={alias.image} size={80} />\n <VStack>\n <Text size={20} text={`${alias.name} ${alias.surname}`} />\n <HStack>\n {isAliasConfirmed(alias.id) && (\n <CardStatusBannerText type=\"confirmedAlias\" />\n )}\n </HStack>\n </VStack>\n </HStack>\n\n {isSelected(alias.id) && <Icon icon={'close'} color=\"red\" />}\n </StyledPlayerCard>\n );\n};\n\nexport default AliasModalConfirmItem;\n","import type { UserAlias } from '@aclito/entities';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useEventInfoAliasesConfirmation } from '@aclito/shared/features/event/hooks/useEventInfoAliasesConfirmation';\nimport React from 'react';\n\nimport AliasModalConfirmItem from './AliasModalConfirmItem';\n\nimport PlayerSelectModal from '@/common/Modals/PlayerSelectModal';\n\ninterface AliasModalProps {\n model: EventModel;\n opened: boolean;\n onClose: () => void;\n handleConfirmAliases: (selectedIds: string[]) => Promise<void>;\n}\n\nconst AliasModalConfirm: React.FC<AliasModalProps> = ({\n model,\n opened,\n onClose,\n handleConfirmAliases,\n}) => {\n const {\n selectedIds,\n isSelected,\n handleOnAliasPress,\n joinedAliases,\n isAliasConfirmed,\n } = useEventInfoAliasesConfirmation(model);\n\n const handleConfirmButtonClick = async () => {\n await handleConfirmAliases(selectedIds);\n onClose();\n };\n\n const renderItem = (alias: UserAlias) => (\n <AliasModalConfirmItem\n {...{\n event: model.event,\n alias,\n isSelected,\n handleOnAliasPress,\n isAliasConfirmed,\n }}\n />\n );\n\n return (\n <PlayerSelectModal\n data={joinedAliases}\n renderItem={renderItem}\n topText={'events.info.alias.confirm.title'}\n opened={opened}\n onClose={onClose}\n buttonProps={{\n color: 'yellow',\n disabled: !selectedIds.length,\n onClick: handleConfirmButtonClick,\n tx: 'events.info.alias.confirm.button',\n }}\n />\n );\n};\n\nexport default AliasModalConfirm;\n","import React from 'react';\n\nimport { Button, HStack, Text, VStack, Modal } from '@/components';\n\ninterface InitialConfirmModalProps {\n opened: boolean;\n close: () => void;\n onConfirmPress: () => void;\n onLeavePress: () => void;\n}\n\nconst InitialConfirmModal: React.FC<InitialConfirmModalProps> = ({\n opened,\n close,\n onConfirmPress,\n onLeavePress,\n}) => {\n return (\n <Modal\n styles={{\n body: {\n height: '100%',\n },\n }}\n opened={opened}\n onClose={close}\n >\n <VStack justify={'center'}>\n <Text tx=\"events.info.attendance.confirm.text\" />\n <HStack spacing={15} style={{ justifyContent: 'space-between' }}>\n <Button\n w={195}\n color={'yellow'}\n onClick={onConfirmPress}\n tx=\"events.info.attendance.confirm.button\"\n />\n <Button w={195} color={'gray'} onClick={onLeavePress} tx=\"leave\" />\n </HStack>\n </VStack>\n </Modal>\n );\n};\n\nexport default InitialConfirmModal;\n","import dayjs from 'dayjs';\nimport { EventRaw } from '@aclito/entities';\n\nimport { UserInfoWithAlias } from '../../../types';\n\nexport const showConfirmationIcon = (event: EventRaw) =>\n event.requireConfirmation && dayjs() >= dayjs(event.confirmationDate);\n\nconst _findPlayer = (user: UserInfoWithAlias, event: EventRaw) => {\n if (user.aliasId) {\n return event.players.find((player) => player.aliasId === user.aliasId);\n }\n\n return event.players.find(\n (player) => player.id === user.id && !player.aliasId,\n );\n};\n\nexport const isPlayerConfirmed = (user: UserInfoWithAlias, event: EventRaw) =>\n _findPlayer(user, event)?.isConfirmed;\n\nexport const isConfirmed = (event: EventRaw) =>\n event.requireConfirmation\n ? dayjs() >= dayjs(event.confirmationDate)\n : !event.requireConfirmation;\n","import { EventRaw } from '@aclito/entities';\n\nimport { UserInfoWithAlias } from '@aclito/shared/types';\n\nexport const willUserWithAliasParticipate = (\n player: UserInfoWithAlias,\n event: EventRaw,\n) =>\n event.players.find((p) => {\n if (player.aliasId) {\n return player.aliasId === p.aliasId;\n }\n\n return p.id === player.id;\n })?.willParticipate;\n","import { EventRaw } from '@aclito/entities';\n\nimport { UserInfoWithAlias } from '@aclito/shared/types';\n\nexport const isPlayerInQueue = (event: EventRaw, player: UserInfoWithAlias) => {\n if (player.aliasId) {\n return event.players.some(\n (p) => p.aliasId === player.aliasId && p.queueDate,\n );\n }\n\n return event.players.some(\n (p) => p.id === player.id && p.queueDate && !p.aliasId,\n );\n};\n\nexport const isAliasInQueue = (event: EventRaw, aliasId: string) =>\n event.players.some((p) => p.aliasId === aliasId && p.queueDate);\n","import { EventWithPlayers, UserInfoWithAlias } from '@aclito/shared/types';\nimport { useEventInfoKick as useEventInfoKickShared } from '@aclito/shared/features/event/hooks/useEventInfoKick';\n\nimport { useModal } from '@/hooks/useModal';\n\nexport const useEventInfoKick = () => {\n const { openModal } = useModal();\n\n const { canBePlayerKicked } = useEventInfoKickShared();\n\n const handlePlayerKick = (\n event: EventWithPlayers,\n user: UserInfoWithAlias,\n ) => {\n openModal({\n txTitle: 'events.info.kick.header',\n type: 'kickPlayer',\n values: { event, user },\n });\n };\n\n return { handlePlayerKick, canBePlayerKicked };\n};\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { useDisclosure } from '@mantine/hooks';\nimport { useConfirmEventMutation } from '@aclito/shared/redux/api/eventApi';\n\nimport { useEventInfoLeave } from '@/features/event/screens/EventInfo/hooks/useEventInfoLeave';\n\nexport const useEventInfoConfirmation = (\n model: EventModel,\n onOpenLeaveModal: () => void,\n) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const [confirmEvent] = useConfirmEventMutation();\n\n const confirmAliasesAttendance = async (aliasIds: string[]) => {\n await confirmEvent({ id: model.event.id, aliasIds });\n };\n\n const [\n isOpenedConfirmModal,\n { open: openConfirmModal, close: closeConfirmModal },\n ] = useDisclosure(false);\n\n const [opened, { open, close }] = useDisclosure(false);\n\n const { handleLeave } = useEventInfoLeave(model);\n\n const onConfirmPress = () => {\n close();\n\n if (model.event) {\n if (userInfo.aliases.length) {\n openConfirmModal();\n return;\n }\n confirmEvent({ id: model.event.id });\n }\n };\n\n const onLeavePress = () => {\n close();\n\n if (model.event) {\n if (userInfo.aliases.length) {\n onOpenLeaveModal();\n return;\n }\n handleLeave();\n }\n };\n\n return {\n isOpenedConfirmModal,\n closeConfirmModal,\n confirmAliasesAttendance,\n onConfirmPress,\n onLeavePress,\n close,\n open,\n opened,\n };\n};\n","import React from 'react';\nimport {\n isPlayerConfirmed,\n showConfirmationIcon,\n} from '@aclito/shared/features/event/utils/confirmation';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport styled from 'styled-components';\nimport { UserInfoWithAlias } from '@aclito/shared/types';\nimport {\n isUserOrganizer,\n isUserTrainer,\n} from '@aclito/shared/features/event/utils/getEventRole';\nimport { willUserWithAliasParticipate } from '@aclito/shared/features/event/utils/willPlayerParticipate';\nimport { isPlayerInQueue } from '@aclito/shared/features/event/utils/isPlayerInQueue';\nimport { canSeeNotes } from '@aclito/shared/features/event/utils/canSeeNotes';\nimport { getOrgUserRole } from '@aclito/shared/util/getOrgUserRole';\n\nimport {\n Icon,\n HStack,\n Text,\n VStack,\n Avatar,\n IconHolder,\n PlainCard,\n CardStatusBannerText,\n} from '@/components';\nimport { useEventInfoKick } from '@/features/event/screens/EventInfo/hooks/useEventInfoKick';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n ROUTE_NOTES_USER,\n ROUTE_PROFILE,\n ROUTE_USER_PROFILE,\n} from '@/util/constants';\nimport { useEventInfoConfirmation } from '@/features/event/screens/EventInfo/hooks/useEventInfoConfirmation';\nimport AliasModalConfirm from '@/features/event/screens/EventInfo/components/AliasModalConfirm';\nimport { useEventInfoLeave } from '@/features/event/screens/EventInfo/hooks/useEventInfoLeave';\nimport AliasModalLeave from '@/features/event/screens/EventInfo/components/AliasModalLeave';\nimport InitialConfirmModal from '@/features/event/screens/EventInfo/components/InitialConfirmModal';\n\ninterface PlayerCardsProps {\n model: EventModel;\n isQueue?: boolean;\n}\n\nconst PlayerCards: React.FC<PlayerCardsProps> = ({ model, isQueue }) => {\n const { event } = model;\n const cardMapper = (player: UserInfoWithAlias, index: number) =>\n willUserWithAliasParticipate(player, event) && (\n <Card\n key={player.aliasId ?? player.id}\n {...{\n player,\n model,\n }}\n index={index}\n />\n );\n\n return (\n <PlayerStack>\n {!isQueue\n ? event.playersInfo.map(cardMapper)\n : event.queuePlayersInfo.map(cardMapper)}\n </PlayerStack>\n );\n};\n\nconst PlayerStack = styled(VStack)`\n padding-top: 1rem;\n`;\n\ninterface CardProps {\n player: UserInfoWithAlias;\n model: EventModel;\n index: number;\n}\n\nconst Card: React.FC<CardProps> = ({ player, model, index }) => {\n const nav = useNavigate();\n const { handlePlayerKick, canBePlayerKicked } = useEventInfoKick();\n\n const {\n isOpenedLeaveModal,\n onCloseLeaveModal,\n handleAliasesLeave,\n onOpenLeaveModal,\n } = useEventInfoLeave(model);\n\n const {\n open,\n opened,\n close,\n onConfirmPress,\n onLeavePress,\n isOpenedConfirmModal,\n closeConfirmModal,\n confirmAliasesAttendance,\n } = useEventInfoConfirmation(model, onOpenLeaveModal);\n\n const { canKick, event, userInfo } = model;\n const kickPlayer = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n e.stopPropagation();\n handlePlayerKick(event, player);\n };\n\n const handleQuestionMarkClick = (\n e: React.MouseEvent<HTMLDivElement, MouseEvent>,\n eventPlayer: UserInfoWithAlias,\n ) => {\n if (userInfo.id === eventPlayer.id) {\n e.stopPropagation();\n open();\n }\n };\n\n const handleNotesClick = (\n e: React.MouseEvent<HTMLDivElement, MouseEvent>,\n ) => {\n e.stopPropagation();\n const orgId = model.event.org?.id;\n if (orgId) {\n nav(ROUTE_NOTES_USER, {\n state: { id: player.id, orgId },\n });\n }\n };\n\n const onPlayerClick = () =>\n userInfo.id === player.id\n ? nav(ROUTE_PROFILE)\n : nav(ROUTE_USER_PROFILE, { state: { userId: player.id } });\n\n const isCurrentUserAdmin = event.org\n ? getOrgUserRole(event.org, userInfo.id) === 'admin'\n : false;\n\n return (\n <>\n {event && (\n <>\n <InitialConfirmModal\n {...{ opened, close, onConfirmPress, onLeavePress }}\n />\n <AliasModalConfirm\n model={model}\n opened={isOpenedConfirmModal}\n onClose={closeConfirmModal}\n handleConfirmAliases={confirmAliasesAttendance}\n />\n <AliasModalLeave\n model={model}\n opened={isOpenedLeaveModal}\n onClose={onCloseLeaveModal}\n handleLeaveAliases={handleAliasesLeave}\n />\n </>\n )}\n <PlainCard\n onClick={onPlayerClick}\n data-testid={`${player.name} ${player.surname}`}\n >\n <HStack>\n <Avatar size={50} image={player.image} />\n <VStack spacing={8}>\n <Text weight={500} text={`${player.name} ${player.surname}`} />\n {isUserOrganizer(player, event) && (\n <CardStatusBannerText type=\"eventOrganizer\" />\n )}\n {isUserTrainer(player, event) && (\n <CardStatusBannerText type=\"eventTrainer\" />\n )}\n </VStack>\n <IconHolder style={{ cursor: 'pointer' }}>\n {showConfirmationIcon(event) &&\n !isPlayerInQueue(event, player) &&\n (isPlayerConfirmed(player, event) ? (\n <Icon icon=\"checkmarkCircle\" size={'24'} color=\"primary\" />\n ) : (\n <Icon\n icon=\"questionMarkCircle\"\n size={'24'}\n color=\"yellow\"\n onClick={(e) => handleQuestionMarkClick(e, player)}\n />\n ))}\n\n {canSeeNotes(userInfo.id, player.id, event.org ?? undefined) && (\n <Icon\n icon=\"note\"\n size=\"24\"\n color={'yellow'}\n onClick={handleNotesClick}\n data-testid={`notes-user-${index}`}\n />\n )}\n {!model.isInPast &&\n canBePlayerKicked(\n event,\n canKick || isCurrentUserAdmin,\n player,\n ) && (\n <HStack onClick={kickPlayer} data-testid={`kick-user-${index}`}>\n <Icon icon=\"personRemove\" size={'24'} color={'red'} />\n </HStack>\n )}\n </IconHolder>\n </HStack>\n </PlainCard>\n </>\n );\n};\n\nexport default PlayerCards;\n","import { Center, Loader } from '@mantine/core';\nimport styled from 'styled-components';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { InfoLeft, InfoRight } from '../components';\n\nimport { Collapsible, HStack, VStack, Title } from '@/components';\nimport PlayersCards from '@/components/Cards/PlayersCards';\n\ninterface SectionInfoProps {\n model: EventModel;\n}\n\nconst InfoTab = ({ model }: SectionInfoProps) => {\n const { event } = model;\n\n return (\n <Container spacing={0}>\n <SectionInfo>\n {!event ? (\n <Center style={{ height: '100%' }}>\n <Loader />\n </Center>\n ) : (\n <Collapsible buttonLabelTx=\"event.info.about\" defaultOpen>\n <InfoContent spacing={20}>\n <InfoLeft model={model} />\n <InfoRight model={model} />\n </InfoContent>\n </Collapsible>\n )}\n </SectionInfo>\n <Collapsible buttonLabelTx=\"tabs.players\" defaultOpen>\n <SectionPlayers>\n {event && (\n <PlayersCards\n {...{\n model,\n }}\n />\n )}\n </SectionPlayers>\n {event?.enableQueue && !!event.queuePlayersInfo.length && (\n <QueueHeader>\n <Divider />\n <QueueTitle tx=\"events.info.queue\" />\n <Divider />\n </QueueHeader>\n )}\n <SectionPlayers>\n {event && (\n <PlayersCards\n {...{\n model,\n isQueue: true,\n }}\n />\n )}\n </SectionPlayers>\n </Collapsible>\n </Container>\n );\n};\n\nconst QueueHeader = styled.div`\n display: flex;\n`;\n\nconst Divider = styled.div`\n width: 100%;\n border-top: 1px solid ${({ theme }) => theme.grey10};\n margin: 1.65rem 1rem 0;\n`;\n\nconst QueueTitle = styled(Title)`\n color: ${({ theme }) => theme.grey30};\n text-align: center;\n font-size: 0.875rem;\n font-weight: 500;\n margin-top: 1rem;\n`;\n\nconst InfoContent = styled(HStack)`\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr;\n height: auto;\n @media ${deviceMax.desktopL} {\n display: flex;\n }\n`;\n\nconst Container = styled(VStack)`\n width: 100%;\n`;\n\nconst SectionInfo = styled(VStack)`\n margin-left: auto;\n margin-right: auto;\n height: auto;\n width: 100%;\n gap: 1rem;\n padding-bottom: 1rem;\n`;\n\nconst SectionPlayers = styled(VStack)`\n width: 100%;\n height: auto;\n`;\n\nexport default InfoTab;\n","import dayjs from 'dayjs';\nimport type { Message } from '@aclito/entities';\n\nimport { LastSeenData, storage } from '../lib/storage';\n\nimport { LAST_SEEN_CHAT } from './constants';\n\nimport { hashIds } from '@aclito/shared/util/getHash';\n\nexport const updateLastSeen = async (props: {\n messages: Message[];\n chatId: string;\n userId: string;\n}) => {\n const { messages, chatId, userId } = props;\n\n if (messages?.length && chatId) {\n const lastMessage = messages[0];\n const hash = hashIds(chatId, userId);\n const lastSeenData: LastSeenData = {\n [hash]: {\n lastMessage,\n lastSeen: dayjs().add(2, 'seconds').toISOString(),\n },\n };\n\n const data = await storage.getParsedItems(LAST_SEEN_CHAT);\n\n const findData = data[hash];\n\n if (findData) {\n if (\n lastMessage.id !== findData.lastMessage.id ||\n lastSeenData[hash].lastSeen > findData.lastSeen\n ) {\n data[hash] = lastSeenData[hash];\n storage.setItem(LAST_SEEN_CHAT, JSON.stringify(data));\n }\n } else {\n data[hash] = lastSeenData[hash];\n storage.setItem(LAST_SEEN_CHAT, JSON.stringify(data));\n }\n }\n};\n","import dayjs from 'dayjs';\nimport { useEffect } from 'react';\nimport type { Message, Chat } from '@aclito/entities';\nimport { updateLastSeen } from '@aclito/shared/util/updateLastSeen';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nexport const useChatWeb = (messages: Message[], chat?: Chat) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const isMyMessage = (m: Message) => userInfo.id === m.from;\n const sortedMessages = [...messages].sort((x, y) =>\n dayjs(x.createdAt).diff(dayjs(y.createdAt)),\n );\n\n useEffect(() => {\n if (chat?.id) {\n updateLastSeen({\n chatId: chat.id,\n messages,\n userId: userInfo.id,\n });\n }\n }, [chat?.id, messages, userInfo.id]);\n\n return {\n sortedMessages,\n isMyMessage,\n };\n};\n","import React, { useRef, useState, useEffect } from 'react';\nimport styled, { css } from 'styled-components';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport type { Chat, Message } from '@aclito/entities';\nimport {\n useFindAndDisplayChatQuery,\n useLazyFindAndDisplayChatQuery,\n} from '@aclito/shared/redux/api/messageApi';\n\nimport { Avatar, Icon, Text } from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_USER_PROFILE } from '@/util/constants';\n\ntype Props = {\n items: Message[];\n isLoading: boolean;\n hasMore: boolean;\n isMyMessage: (m: Message) => boolean;\n chat: Chat;\n};\n\nconst MessagesList: React.FC<Props> = ({\n items,\n isLoading,\n hasMore,\n isMyMessage,\n chat,\n}) => {\n const t = useTranslate();\n const [observerLoading, setObserverLoading] = useState<boolean>(false);\n\n const { data } = useFindAndDisplayChatQuery({\n nextToken: null,\n id: chat.id,\n });\n\n const [trigger] = useLazyFindAndDisplayChatQuery();\n\n const loadNext = async () => {\n await trigger({ id: chat.id, nextToken: data?.nextToken ?? null });\n setObserverLoading(false);\n };\n\n const observer = useRef<IntersectionObserver>();\n const refM = useRef<HTMLDivElement | null>(null);\n const refPrevLastItem = useRef<HTMLDivElement | null>(null);\n const tDate = useTranslateDate();\n const nav = useNavigate();\n\n const lastElementRef = (node: HTMLDivElement | null) => {\n if (isLoading) return;\n if (observer.current) {\n observer.current.disconnect();\n }\n observer.current = new IntersectionObserver(async (entries) => {\n if (entries[0].isIntersecting && hasMore && !observerLoading && chat) {\n setObserverLoading((prev) => !prev);\n await loadNext();\n if (refPrevLastItem.current) {\n refPrevLastItem.current.scrollIntoView();\n }\n }\n });\n if (node) observer.current.observe(node);\n };\n\n useEffect(() => {\n if (refM.current && items.length > 0) {\n refM.current.scrollIntoView({ block: 'end' });\n }\n }, [items.length]);\n\n useEffect(() => {\n if (!observerLoading && refM.current) {\n refM.current.scrollIntoView({ block: 'end' });\n }\n }, [items.length]);\n\n const getRef = (i: number) => {\n if (i === 0) {\n // date is always first:\n return lastElementRef;\n }\n if (i === 1) {\n // first message:\n return refPrevLastItem;\n }\n return null;\n };\n const navigateToUserProfile = (id: string) => () =>\n nav(ROUTE_USER_PROFILE, {\n state: { userId: id },\n });\n\n const getMessage = (m: Message & { dateOnly?: boolean }, i: number) => (\n <MessageCard\n key={m.id}\n ref={getRef(i)}\n alignment={isMyMessage(m) ? 'right' : 'left'}\n >\n {m.dateOnly ? (\n <SystemDate>{m.message}</SystemDate>\n ) : (\n <>\n {m.system ? (\n <SystemMessage>{m.message}</SystemMessage>\n ) : (\n <>\n {!isMyMessage(m) && (\n <Avatar\n onClick={navigateToUserProfile(m.user.id)}\n size={48}\n image={m.user.image}\n />\n )}\n <Cloud $sending={m.sent}>\n {!m.user.deleted ? (\n <MessageText\n $isMyMessage={isMyMessage(m)}\n text={m.user.name}\n weight={'bold'}\n />\n ) : (\n <MessageText\n $isMyMessage={isMyMessage(m)}\n tx={'userprofile.unknown'}\n weight={'bold'}\n />\n )}\n <MessageText\n $isMyMessage={isMyMessage(m)}\n text={m.message}\n weight={400}\n />\n <div className=\"last-row\">\n <MessageText\n $isMyMessage={isMyMessage(m)}\n text={tDate(m.createdAt.toString(), 'time.message')}\n weight={400}\n />\n {isMyMessage(m) && (\n <Icon color=\"white\" icon=\"checkmark\" size={15} />\n )}\n </div>\n </Cloud>\n </>\n )}\n </>\n )}\n </MessageCard>\n );\n\n return (\n <Wrapper>\n <Scrollbar ref={refM}>\n <h4 style={{ margin: '0' }}>\n {observerLoading && t('flatlist.loading')}\n </h4>\n {items.map((item, i) => getMessage(item, i))}\n </Scrollbar>\n </Wrapper>\n );\n};\n\nconst MessageText = styled(Text)<{ $isMyMessage?: boolean }>`\n color: ${({ theme, $isMyMessage }) =>\n $isMyMessage ? theme.grey10 : theme.text};\n font-size: 12px;\n`;\n\nconst Wrapper = styled.div`\n height: 100%;\n overflow-y: auto;\n`;\n\nconst Scrollbar = styled.div`\n display: flex;\n flex-direction: column;\n\n & > :not(:last-child) {\n margin-bottom: 2rem;\n }\n\n & > :last-child {\n margin-bottom: 53px;\n }\n`;\n\nconst SystemDate = styled(Text)`\n font-size: 14px;\n font-weight: 400;\n margin-left: auto;\n margin-right: auto;\n`;\n\nconst SystemMessage = styled(Text)`\n font-size: 12px;\n font-weight: 400;\n margin-left: auto;\n margin-right: auto;\n`;\n\nconst Cloud = styled.div<{ $sending?: boolean }>`\n min-height: 78px;\n min-width: 228px;\n border-radius: 5px 25px 25px 25px;\n background-color: ${({ theme }) => theme.white};\n\n padding: 10px 16px;\n opacity: ${(p) => (p.$sending === false ? 0.3 : 1)};\n\n .last-row {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n }\n`;\n\nconst MessageCard = styled.div<{ alignment: 'left' | 'right' }>`\n display: flex;\n align-items: center;\n justify-content: ${(p) => p.alignment};\n gap: 16px;\n\n ${(p) =>\n p.alignment === 'right' &&\n css`\n flex-direction: row-reverse;\n `};\n\n ${Cloud} {\n ${(p) =>\n p.alignment === 'right' &&\n css`\n border-radius: 25px 5px 25px 25px;\n background-color: ${({ theme }) => theme.blue};\n color: ${({ theme }) => theme.white};\n `};\n }\n`;\n\nexport default MessagesList;\n","import { EventModel } from '@aclito/shared/classes/EventModel';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useChatHandlers } from '@aclito/shared/features/event/hooks/useChatHandlers';\n\nimport { HStack, Icon, Text, VStack } from '@/components';\n\ninterface ChatPlaceholderrProps {\n model: EventModel;\n}\n\nconst ChatPlaceholder: React.FC<ChatPlaceholderrProps> = ({ model }) => {\n const { txChatPlaceholderText } = useChatHandlers(model);\n\n return !model.isJoinedInChat ? (\n <Container align=\"center\">\n <HStack>\n <Icon icon={'chat'} />\n <Text tx={txChatPlaceholderText} />\n </HStack>\n </Container>\n ) : null;\n};\n\nconst Container = styled(VStack)`\n margin-top: 60px;\n`;\n\nexport default ChatPlaceholder;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Center, Loader } from '@mantine/core';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\nimport {\n useFindAndDisplayChatQuery,\n useSendMessageMutation,\n} from '@aclito/shared/redux/api/messageApi';\nimport { Message } from '@aclito/entities';\nimport dayjs, { Dayjs } from 'dayjs';\nimport { txDateFn, txFn } from '@aclito/shared/types';\nimport { updateLastSeen } from '@aclito/shared/util/updateLastSeen';\nimport { ChatMessageMetaData } from '@aclito/enums';\n\nimport { useChatWeb } from '../../hooks/useChatWeb';\n\nimport MessagesList from './MessagesList';\nimport ChatPlaceholder from './ChatPlaceholder';\n\nimport { SmallButton, Textarea, Icon } from '@/components';\n\ninterface ChatProps {\n model: EventModel;\n}\n\nconst getMessages = (m: Message[], tDate: txDateFn, t: txFn) => {\n const result: Message[] = [];\n let prevDay: Dayjs | undefined = undefined;\n structuredClone(m).forEach((message) => {\n const currentDay = dayjs(message.createdAt).startOf('day');\n const dateString = tDate(message.createdAt.toString(), 'date.chat');\n const item: Message & { dateOnly: boolean } = {\n ...message,\n message: dateString,\n id: dateString,\n dateOnly: true,\n };\n\n if (message.system) {\n switch (message.meta) {\n case ChatMessageMetaData.Joined: {\n message.message = t('chat.join', {\n name: `${message.user.name} ${message.user.surname}`,\n });\n break;\n }\n case ChatMessageMetaData.Left: {\n message.message = t('chat.left', {\n name: `${message.user.name} ${message.user.surname}`,\n });\n break;\n }\n }\n }\n\n if (!prevDay) {\n result.push(item);\n }\n\n if (prevDay && !currentDay.isSame(prevDay)) {\n result.push(item);\n }\n\n result.push(message);\n\n prevDay = currentDay;\n });\n return result;\n};\n\nconst Chat: React.FC<ChatProps> = ({ model }) => {\n const chatId = model.event.eventChatId ?? '';\n\n const { data, isLoading } = useFindAndDisplayChatQuery(\n { id: chatId, nextToken: null },\n { skip: !model.event.eventChatId },\n );\n\n const [onSend] = useSendMessageMutation();\n\n const chat = model.event.chat;\n const messages = data?.messages ?? [];\n\n const [text, setText] = useState<string>('');\n\n const handleSendMessage = async () => {\n setText('');\n const message = await onSend({ chatId, message: text }).unwrap();\n await updateLastSeen({\n chatId,\n messages: [message],\n userId: model.userInfo.id,\n });\n };\n\n const handleOnMessageChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setText(e.target.value);\n };\n const tDate = useTranslateDate();\n\n const hasMore = !!data?.nextToken;\n\n const handleKeyPress = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (!e.shiftKey && e.key === 'Enter') {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const { sortedMessages, isMyMessage } = useChatWeb(messages, chat);\n const t = useTranslate();\n return (\n <Wrapper>\n {isLoading ? (\n <Center style={{ height: '100%' }}>\n <Loader />\n </Center>\n ) : (\n <>\n {chat && model.isJoinedInChat ? (\n <>\n <MessagesList\n items={getMessages(sortedMessages, tDate, t)}\n isLoading={isLoading}\n hasMore={hasMore}\n isMyMessage={isMyMessage}\n chat={chat}\n />\n <>\n {chat && (\n <WritingBox>\n <Textarea\n txPlaceholder=\"chat.writingPlaceholder\"\n autosize\n minRows={1}\n maxRows={3}\n onChange={handleOnMessageChange}\n value={text}\n onKeyDown={handleKeyPress}\n rightSection={\n <SmallButton\n shape=\"round\"\n bg={'transparent'}\n onClick={handleSendMessage}\n >\n <Icon icon=\"send\" size={18} color=\"primary\" />\n </SmallButton>\n }\n />\n </WritingBox>\n )}\n </>\n </>\n ) : (\n <ChatPlaceholder model={model} />\n )}\n </>\n )}\n </Wrapper>\n );\n};\n\nconst Wrapper = styled.div`\n width: 100%;\n height: 70vh;\n @media ${deviceMax.laptop} {\n width: 100%;\n }\n @media ${deviceMin.desktopL} {\n width: 75%;\n }\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n`;\n\nconst WritingBox = styled.div`\n border-top: 2px solid ${({ theme }) => theme.grey30};\n display: flex;\n & > * {\n width: 100%;\n }\n\n textarea {\n border-radius: unset;\n border: unset;\n }\n\n button {\n align-self: flex-start;\n margin-right: 20px;\n }\n`;\n\nexport default Chat;\n","import { useEffect } from 'react';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\n\nimport { useEventInfoConfirmation } from '@/features/event/screens/EventInfo/hooks/useEventInfoConfirmation';\n\nexport const useEventInfoInitial = (\n model: EventModel,\n onOpenLeaveModal: () => void,\n) => {\n const {\n isOpenedConfirmModal,\n closeConfirmModal,\n confirmAliasesAttendance,\n onConfirmPress,\n onLeavePress,\n close,\n opened,\n open,\n } = useEventInfoConfirmation(model, onOpenLeaveModal);\n\n useEffect(() => {\n if (model.shouldConfirm) {\n open();\n }\n }, [model?.event?.id]);\n\n return {\n isOpenedConfirmModal,\n closeConfirmModal,\n confirmAliasesAttendance,\n onConfirmPress,\n onLeavePress,\n opened,\n close,\n };\n};\n","import React, { useState } from 'react';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { Center, Loader, Space } from '@mantine/core';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useDisplayEvent } from '@aclito/shared/redux/api/eventApi';\nimport { EventModel } from '@aclito/shared/classes/EventModel';\n\nimport { Buttons, JoinLeave } from './components';\nimport AliasModalConfirm from './components/AliasModalConfirm';\nimport AliasModalLeave from './components/AliasModalLeave';\nimport { useEventInfoLeave } from './hooks/useEventInfoLeave';\nimport InitialConfirmModal from './components/InitialConfirmModal';\nimport InfoTab from './components/InfoTab';\nimport Chat from './components/Chat/Chat';\n\nimport {\n SectionGrid,\n HStack,\n Tab,\n Tabs,\n TitleBar,\n VStack,\n PlayersMembersNumber,\n Title,\n BackButton,\n} from '@/components';\nimport { StateEventInfo } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { useEventInfoInitial } from '@/features/event/screens/EventInfo/hooks/useEventInfoInitial';\nimport {\n EventHeader,\n EventName,\n} from '@/features/event/styles/eventInfoStyles';\nimport EventTags from '@/components/Cards/EventTags';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\ntype EventInfoProps = TypedLocation<StateEventInfo, { id: string }>;\n\nconst EventInfo: React.FC<EventInfoProps> = ({ state, query }) => {\n const id = query?.id ? query.id : state?.id ?? '';\n const { model, isLoading } = useDisplayEvent(id);\n\n if (!model)\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"nav.eventInfo\" />\n </HStack>\n </TitleBar>\n {isLoading && (\n <Center mt={16}>\n <Loader />\n </Center>\n )}\n </SectionGrid>\n );\n\n return <EventInfoComponent model={model} />;\n};\n\nconst EventInfoComponent = ({ model }: { model: EventModel }) => {\n const {\n isOpenedLeaveModal,\n onCloseLeaveModal,\n handleAliasesLeave,\n onOpenLeaveModal,\n } = useEventInfoLeave(model);\n\n const {\n isOpenedConfirmModal,\n closeConfirmModal,\n confirmAliasesAttendance,\n onConfirmPress,\n onLeavePress,\n opened,\n close,\n } = useEventInfoInitial(model, onOpenLeaveModal);\n\n const [tabIndex, setTabIndex] = useState('0');\n\n const handleTabIndexChange = (index: string) => {\n setTabIndex(index);\n };\n\n const { event } = model;\n\n const idContainer = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(idContainer, [event]);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n\n return (\n <>\n {event && event.isAclitoEvent && (\n <SectionGrid $isOpen={false}>\n {event && (\n <>\n <InitialConfirmModal\n {...{ opened, close, onConfirmPress, onLeavePress }}\n />\n <AliasModalConfirm\n model={model}\n opened={isOpenedConfirmModal}\n onClose={closeConfirmModal}\n handleConfirmAliases={confirmAliasesAttendance}\n />\n <AliasModalLeave\n model={model}\n opened={isOpenedLeaveModal}\n onClose={onCloseLeaveModal}\n handleLeaveAliases={handleAliasesLeave}\n />\n </>\n )}\n <TitleBar id={idContainer}>\n <HStack>\n <BackButton />\n <Title tx=\"nav.eventInfo\" />\n </HStack>\n\n {model.event && (\n <Buttons model={model} compact={isFlexWrapped || queryMobile} />\n )}\n </TitleBar>\n <EventHeader spacing={16}>\n <VStack spacing={8}>\n <HStack\n spacing={8}\n style={{\n justifyContent: 'space-between',\n }}\n >\n <EventName>{event?.name}</EventName>\n <PlayersMembersNumber\n textSize={20}\n withIcon\n event={model.event}\n />\n </HStack>\n {event && <EventTags fullText event={event} />}\n </VStack>\n {model.event && <JoinLeave model={model} />}\n </EventHeader>\n\n {model.canDisplayChat ? (\n <Tabs\n selectedIndex={tabIndex}\n setSelectedIndex={handleTabIndexChange}\n >\n <Tab tx=\"tabs.info\" />\n <Tab tx=\"tabs.chat\" />\n </Tabs>\n ) : (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n <Tabs\n selectedIndex={tabIndex}\n setSelectedIndex={handleTabIndexChange}\n >\n <Tab tx=\"tabs.info\" />\n </Tabs>\n )}\n <Space h={16} />\n {tabIndex === '0' ? <InfoTab model={model} /> : null}\n {tabIndex === '1' ? <Chat model={model} /> : null}\n </SectionGrid>\n )}\n </>\n );\n};\n\nexport default withRouter(EventInfo);\n","import { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { Divider } from '@mantine/core';\nimport { BasicCard } from '@aclito/ui-web/components/CardStyles';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { config } from '@aclito/shared/config';\nimport { MyRank, UserRank } from '@aclito/shared/types';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport styled, { useTheme } from 'styled-components';\nimport { AchievementCardData } from '@aclito/shared/features/goals/utils/createDataForAchievementCards';\n\ntype RankProps = {\n achievement: AchievementCardData;\n rank: { rank: UserRank[]; myRanks: MyRank[] };\n};\n\nconst Rank = ({ rank, achievement }: RankProps) => {\n const locale = useAppSelector(commonSelectors.locale);\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const theme = useTheme();\n\n return (\n <VStack>\n <Divider style={{ marginTop: 16, marginBottom: 16 }} />\n\n <BasicCard>\n <VStack>\n <TableHeader>\n <Icon color={'primary'} size={32} icon={'level'} />\n <Text size={'lg'} weight={'bold'}>\n {achievement.title[locale]}\n </Text>\n </TableHeader>\n\n {!rank.rank.length ? (\n <Text tx={'goals.noone'} />\n ) : (\n <VStack spacing={0} style={{ width: '100%' }}>\n {rank.rank.map((r, index) => (\n <TableRow key={r.id}>\n <MedalCell>\n {index === 0 && (\n <Text size={'xl'}>{config.emojis.medal1.item}</Text>\n )}\n {index === 1 && (\n <Text size={'xl'}>{config.emojis.medal2.item}</Text>\n )}\n {index === 2 && (\n <Text size={'xl'}>{config.emojis.medal3.item}</Text>\n )}\n </MedalCell>\n <NameCell>\n <Text\n color={\n r.id.includes(userInfo.id) ? theme.primary : theme.text\n }\n >\n {r.name}\n </Text>\n </NameCell>\n <PointsCell>\n <Text\n weight={'bold'}\n tx={`goals.pts`}\n txOptions={{ value: r.rank.pts }}\n />\n </PointsCell>\n </TableRow>\n ))}\n </VStack>\n )}\n </VStack>\n </BasicCard>\n\n {!!rank.myRanks.length && (\n <BasicCard>\n <VStack>\n <TableHeader>\n <Icon color={'primary'} size={32} icon={'person'} />\n <Text size={'lg'} weight={'bold'}>\n <Text tx={'goals.myrank'} />\n </Text>\n </TableHeader>\n\n <VStack spacing={0} style={{ width: '100%' }}>\n {rank.myRanks.map((r) => (\n <TableRow key={r.id}>\n <MedalCell>\n <Text weight={'bold'}>{r.rank.position}.</Text>\n </MedalCell>\n <NameCell>\n <Text>{r.name}</Text>\n </NameCell>\n <PointsCell>\n <Text\n weight={'bold'}\n tx={`goals.pts`}\n txOptions={{ value: r.rank.pts }}\n />\n </PointsCell>\n </TableRow>\n ))}\n </VStack>\n </VStack>\n </BasicCard>\n )}\n </VStack>\n );\n};\n\nconst TableRow = styled.div`\n display: flex;\n padding: 12px 0;\n width: 100%;\n border-bottom: 1px solid ${(props) => props.theme.background};\n\n &:last-child {\n border-bottom: none;\n }\n`;\n\nconst MedalCell = styled.div`\n width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst NameCell = styled.div`\n flex: 1;\n display: flex;\n align-items: center;\n`;\n\nconst PointsCell = styled.div`\n width: 80px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n`;\n\nconst TableHeader = styled(HStack)`\n justify-content: center;\n`;\n\nexport default Rank;\n","import { AchievementCardData } from '@aclito/shared/features/goals/utils/createDataForAchievementCards';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { getLevelCumulativeSum } from '@aclito/shared/features/goals/utils/getLevel';\nimport { config } from '@aclito/shared/config';\nimport { Divider } from '@mantine/core';\nimport ProgressBar from '@aclito/ui-web/achievements/ProgressBar';\n\nimport {\n VStack,\n InlineTooltip,\n Text,\n SectionTitle,\n HStack,\n} from '@/components';\n\nconst Info = ({ achievement }: { achievement: AchievementCardData }) => {\n const locale = useAppSelector(commonSelectors.locale);\n const t = useTranslate();\n return (\n <>\n <VStack>\n <Divider style={{ marginTop: 16, marginBottom: 16 }} />\n <>\n <SectionTitle\n buttonLabelTx={'admin.achievements.create.description'}\n />\n <div>\n <Text size={'sm'}>{achievement.description[locale]}</Text>\n </div>\n </>\n\n {achievement.detail && (\n <>\n <SectionTitle buttonLabelTx={'admin.achievements.create.detail'} />\n <div>\n <Text size={'sm'}>{achievement.detail[locale]}</Text>\n </div>\n </>\n )}\n\n <>\n <SectionTitle buttonLabelTx={'admin.achievements.create.tier'} />\n <VStack>\n {!achievement.config.levelSteps.length ? (\n <InlineTooltip\n txTitle={'tooltip.achievement.level.title'}\n txBody={'tooltip.achievement.level.none.body'}\n />\n ) : achievement.config.levelSteps.length === 1 ? (\n <InlineTooltip\n txTitle={'tooltip.achievement.level.title'}\n txBody={'tooltip.achievement.level.one.body'}\n />\n ) : (\n <InlineTooltip\n txTitle={'tooltip.achievement.level.title'}\n txBody={'tooltip.achievement.level.multiple.body'}\n />\n )}\n\n <Divider />\n\n <VStack>\n {achievement.config.levelSteps.map((_, idx) => {\n const total = getLevelCumulativeSum(\n idx,\n achievement.config.levelSteps,\n );\n const isCompleted = achievement.achievementProgress >= total;\n const currentProgress =\n idx < achievement.level\n ? Infinity\n : idx === achievement.level\n ? achievement.currentProgress\n : 0;\n\n const goal = achievement.config.levelSteps[idx];\n const goalProgress = Math.min(\n Math.max(currentProgress, 0),\n goal,\n );\n return (\n <VStack spacing={4} key={idx}>\n <Text weight={'bold'} size={'md'}>\n {t('admin.achievements.create.tier')} {idx + 1}\n </Text>\n <HStack style={{ alignItems: 'center' }}>\n <ProgressBar\n currentProgressValue={currentProgress}\n totalProgressValue={total}\n />\n {isCompleted && (\n <Text\n size={'xl'}\n text={config.emojis.partyPopper.item}\n />\n )}\n </HStack>\n <Text color={'primary'} weight={'bold'}>\n {goalProgress}/{goal}\n </Text>\n </VStack>\n );\n })}\n </VStack>\n </VStack>\n </>\n </VStack>\n </>\n );\n};\n\nexport default Info;\n","import { Divider, Space } from '@mantine/core';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useParams } from 'react-router-dom';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\nimport { SelectObject } from '@aclito/shared/types';\nimport { useState } from 'react';\nimport { useGetRankQuery } from '@aclito/shared/redux/api/achievementApi';\nimport { AchievementCardData } from '@aclito/shared/features/goals/utils/createDataForAchievementCards';\nimport { NONE } from '@aclito/shared/util/constants';\n\nimport Achievements from './Achievements';\n\nimport {\n TitleBar,\n SectionGrid,\n Title,\n BackButton,\n HStack,\n Tabs,\n TagButton,\n VStack,\n Select,\n InlineTooltip,\n} from '@/components';\nimport Rank from '@/features/goals/Rank';\nimport Info from '@/features/goals/Info';\n\nconst Goals = () => {\n const { userId } = useParams();\n\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const id = userId || userInfo.id;\n\n const myOrgs = useAppSelector(selectMyOrganizations);\n const orgOptions: SelectObject[] = myOrgs.map((org) => ({\n id: org.id,\n item: org.name,\n }));\n\n const [orgId, setOrgId] = useState<string | undefined>();\n const [isOrgTab, setIsOrgTab] = useState(false);\n const [tabId, setTabId] = useState('global');\n const [achievement, setAchievement] = useState<AchievementCardData | null>(\n null,\n );\n\n const isMyProfile = userInfo.id === id;\n const isRankDisabled = achievement ? achievement.orgId === NONE : true;\n\n const { data } = useGetRankQuery(achievement?.id || '', {\n skip: isRankDisabled,\n });\n\n const rank = isRankDisabled ? undefined : data;\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx={'goals.title'} />\n </HStack>\n </TitleBar>\n <Space h={16} />\n\n <VStack>\n <div>\n {isMyProfile && (\n <>\n <VStack spacing={8}>\n <Tabs\n unstyled\n maw={'max-content'}\n style={{\n flexDirection: 'row',\n flex: 1,\n rowGap: 20,\n }}\n selectedIndex={tabId}\n setSelectedIndex={(newTabId) => {\n setTabId(newTabId);\n setAchievement(null);\n newTabId === 'org' ? setIsOrgTab(true) : setIsOrgTab(false);\n }}\n >\n <TagButton value={'global'} tx=\"tabs.all\" />\n <TagButton value={'org'} tx=\"org.new.tab.organization\" />\n </Tabs>\n\n <Divider style={{ marginTop: 16, marginBottom: 16 }} />\n\n {!isOrgTab ? (\n <VStack>\n <InlineTooltip\n txTitle={'tabs.all'}\n txBody={'tooltip.achievements.all'}\n />\n <Divider />\n </VStack>\n ) : (\n <>\n {!!orgOptions.length && (\n <InlineTooltip\n txTitle={'org.new.tab.organization'}\n txBody={'tooltip.achievements.org'}\n />\n )}\n </>\n )}\n\n {isOrgTab && (\n <>\n {orgOptions.length ? (\n <>\n <Select\n options={orgOptions}\n value={orgId}\n txPlaceholder=\"org.new.tab.organization\"\n onChange={(value) => {\n setOrgId(value ?? undefined);\n setAchievement(null);\n }}\n />\n <Divider style={{ marginTop: 16, marginBottom: 16 }} />\n </>\n ) : (\n <InlineTooltip\n txTitle={'tooltip.goals.org.title'}\n txBody={'tooltip.goals.org'}\n color=\"red\"\n />\n )}\n </>\n )}\n\n <div style={{ marginBottom: 8 }} />\n </VStack>\n </>\n )}\n {isOrgTab ? (\n orgId ? (\n <VStack>\n <Achievements onClick={setAchievement} orgId={orgId} id={id} />\n </VStack>\n ) : null\n ) : (\n <Achievements onClick={setAchievement} orgId={undefined} id={id} />\n )}\n </div>\n\n <VStack>\n {achievement && rank && (\n <Rank achievement={achievement} rank={rank} />\n )}\n {achievement && <Info achievement={achievement} />}\n </VStack>\n </VStack>\n </SectionGrid>\n );\n};\n\nexport default Goals;\n","import { StatusData } from '../api/requests/custom/status/getStatus';\n\nimport { BREAKING_CHANGES_VERSION } from './constants';\n\nexport const isLoginDisabled = (status: StatusData): boolean => {\n if (status.status === 'offline') return true;\n return status.breakingChangesVersion > BREAKING_CHANGES_VERSION;\n};\n\nexport const isTACUpdateRequired = (\n currentVersion = 0,\n status: StatusData,\n skippedUntil: string | null,\n): boolean => {\n const isRequired = currentVersion < status.termsAndConditionsVersion;\n\n if (\n isRequired &&\n skippedUntil &&\n new Date().getTime() < new Date(skippedUntil).getTime()\n ) {\n return false;\n }\n\n return isRequired;\n};\n","const contextKey = 'context';\n\nexport type WebContext = {\n pathname: string;\n search: string;\n hash: string;\n state: object | undefined;\n};\n\nconst contextInitialState: WebContext = {\n pathname: '',\n search: '',\n hash: '',\n state: undefined,\n};\n\nexport const getContextFromLocalStorage = () => {\n const context = localStorage.getItem(contextKey);\n return context ? (JSON.parse(context) as WebContext) : contextInitialState;\n};\n\nexport const saveContextToLocalStorage = (context: WebContext) => {\n localStorage.setItem(contextKey, JSON.stringify(context));\n};\n\nexport const removeContextFromLocalStorage = () => {\n localStorage.removeItem(contextKey);\n};\n","import { useLocation, Navigate } from 'react-router-dom';\nimport { useAuthenticator } from '@aws-amplify/ui-react';\nimport { useEffect, useState } from 'react';\nimport { CognitoData, getUserData } from '@aclito/shared/util/cognitoUser';\nimport {\n isLoginDisabled,\n isTACUpdateRequired,\n} from '@aclito/shared/util/handleStatus';\nimport api from '@aclito/shared/api/api';\nimport { StatusData } from '@aclito/shared/api/requests/custom/status/getStatus';\nimport {\n FIRST_TIME,\n NOT_FIRST_TIME,\n TERMS_AND_CONDITIONS_SKIP_DATE,\n} from '@aclito/shared/util/constants';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { commonActions } from '@aclito/shared/redux/slices';\nimport { storage } from '@aclito/shared/lib/storage';\nimport { logger } from '@aclito/shared/lib/logger';\n\nimport {\n ROUTE_ABOUT_USER,\n ROUTE_SIGN_IN,\n ROUTE_STATUS,\n ROUTE_TAC_UPDATE,\n} from '@/util/constants';\nimport { saveContextToLocalStorage } from '@/util/context';\n\ntype RequireAuthProps = {\n children: JSX.Element;\n};\n\nexport const RequireAuth = ({ children }: RequireAuthProps) => {\n const location = useLocation();\n const dispatch = useAppDispatch();\n const [status, setStatus] = useState<StatusData | undefined>();\n const [userData, setUserData] = useState<CognitoData | undefined>();\n const [skipDate, setSkipDate] = useState<string | null>(null);\n const { route, user } = useAuthenticator((context) => [\n context.route,\n context.user,\n ]);\n\n useEffect(() => {\n if (!status) {\n api.custom.status.getStatus().then((data) => {\n setStatus(data);\n dispatch(commonActions.updateStatus({ status: data }));\n });\n }\n }, [status]);\n\n useEffect(() => {\n const getData = async () => {\n try {\n if (user) {\n const data = await getUserData();\n\n if (data) {\n setUserData(data);\n setSkipDate(await storage.getItem(TERMS_AND_CONDITIONS_SKIP_DATE));\n } else {\n logger.debug(\n 'Unable to authenticate user, credentials may be missing or are expired',\n );\n }\n }\n } catch (e) {\n logger.error('Unable to authenticate user', { message: e });\n }\n };\n getData();\n }, [user]);\n\n const getRoute = () => {\n if (route !== 'authenticated' && route !== 'idle') {\n if (route !== 'signOut') {\n saveContextToLocalStorage(location);\n }\n return <Navigate to={ROUTE_SIGN_IN} state={{ from: location }} replace />;\n }\n\n if (status && isLoginDisabled(status)) {\n return <Navigate to={ROUTE_STATUS} />;\n }\n\n if (\n user?.attributes?.['custom:Login'] === FIRST_TIME &&\n location.pathname !== ROUTE_ABOUT_USER\n ) {\n return <Navigate to={ROUTE_ABOUT_USER} />;\n }\n\n if (\n status &&\n userData &&\n user &&\n user.attributes?.['custom:Login'] === NOT_FIRST_TIME &&\n isTACUpdateRequired(userData.termsAndConditionsVersion, status, skipDate)\n ) {\n return <Navigate to={ROUTE_TAC_UPDATE} />;\n }\n\n return children;\n };\n\n return getRoute();\n};\n","import { Center } from '@mantine/core';\nimport {\n FacebookIcon,\n FacebookShareButton,\n TwitterIcon,\n TwitterShareButton,\n WhatsappIcon,\n WhatsappShareButton,\n FacebookMessengerIcon,\n FacebookMessengerShareButton,\n LinkedinShareButton,\n LinkedinIcon,\n EmailIcon,\n EmailShareButton,\n} from 'react-share';\nimport styled from 'styled-components';\nimport { config } from '@aclito/shared/config';\n\nimport { VStack, Icon, Title } from '@/components';\nimport {\n CopyLinkButton,\n InviteHStack,\n} from '@/common/InviteLayouts/InviteLayouts';\nimport { FB_APP_ID } from '@/util/constants';\nimport { useModal } from '@/hooks/useModal';\n\nconst Social = () => {\n const { openModal } = useModal();\n const handleInvite = () => {\n openModal({\n txTitle: 'nav.share',\n type: 'shareUrl',\n values: { msg: config.URL.aclitoInviteUrl },\n });\n };\n return (\n <Center>\n <StyledVStack>\n <Title tx=\"aclito.share.message.web\" />\n <InviteHStack>\n <FacebookShareButton url={config.URL.aclitoInviteUrl}>\n <FacebookIcon size={64} round data-testid=\"facebook\" />\n </FacebookShareButton>\n <TwitterShareButton url={config.URL.aclitoInviteUrl}>\n <TwitterIcon size={64} round data-testid=\"twitter\" />\n </TwitterShareButton>\n <WhatsappShareButton url={config.URL.aclitoInviteUrl}>\n <WhatsappIcon size={64} round data-testid=\"whatsapp\" />\n </WhatsappShareButton>\n <FacebookMessengerShareButton\n appId={FB_APP_ID}\n url={config.URL.aclitoInviteUrl}\n data-testid=\"facebookmessenger\"\n >\n <FacebookMessengerIcon size={64} round />\n </FacebookMessengerShareButton>\n <EmailShareButton url={config.URL.aclitoInviteUrl}>\n <EmailIcon size={64} round data-testid=\"email\" />\n </EmailShareButton>\n <LinkedinShareButton url={config.URL.aclitoInviteUrl}>\n <LinkedinIcon size={64} round data-testid=\"linkedin\" />\n </LinkedinShareButton>\n <CopyLinkButton onClick={handleInvite}>\n <Icon icon=\"share\" size={32} color=\"white\" data-testid=\"copylink\" />\n </CopyLinkButton>\n </InviteHStack>\n </StyledVStack>\n </Center>\n );\n};\nconst StyledVStack = styled(VStack)`\n align-items: center;\n margin-top: 32px;\n`;\n\nexport default Social;\n","import { useEffect, useState } from 'react';\nimport { TranslateKey } from '@aclito/shared/types';\nimport { reservantoClient } from '@aclito/client';\n\nexport const useReservanto = (\n token: string | undefined,\n accepted: number | undefined,\n) => {\n const [isLoading, setIsLoading] = useState(false);\n const [message, setMessage] = useState<TranslateKey>();\n const saveToken = async () => {\n if (token) {\n setIsLoading(true);\n try {\n const res = await reservantoClient.reservanto.createReservantoToken(\n token,\n );\n if (res.status === 400) {\n setMessage('reservanto.invalidtoken');\n }\n if (res.status === 201) {\n setMessage('reservanto.newtoken');\n }\n setIsLoading(false);\n } catch (e) {\n setIsLoading(false);\n }\n }\n };\n\n useEffect(() => {\n if (token && accepted) {\n saveToken();\n }\n }, [token, accepted]);\n\n return { isLoading, message };\n};\n","export default \"__VITE_ASSET__efce83a5__\"","export default \"__VITE_ASSET__97a235e9__\"","import { IconUrl } from '@aclito/shared/resources';\nimport styled from 'styled-components';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport { Text } from '@/components';\n\ninterface LogoProps {\n text?: string;\n logoSize: string | number;\n}\n\nconst Logo: React.FC<LogoProps> = (props) => (\n <>\n <StyledLogo logoSize={props.logoSize} src={IconUrl} />\n <BottomText text={props.text} />\n </>\n);\n\nconst StyledLogo = styled.img<LogoProps>`\n width: ${(props) => props.logoSize}px;\n height: ${(props) => props.logoSize}px;\n`;\n\nconst BottomText = styled(Text)`\n font-weight: 500;\n color: ${({ theme }) => theme.white};\n padding-bottom: 0;\n padding-left: 10px;\n @media ${deviceMax.tablet} {\n display: none;\n }\n`;\n\nexport default Logo;\n","import { Loader, Center } from '@mantine/core';\n\nimport withRouter from '@/navigation/withRouter';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { QueryReservanto } from '@/util/types';\nimport { useReservanto } from '@/features/misc/screens/Reservanto/hooks/useReservanto';\nimport { Text, VStack } from '@/components';\nimport { Logo } from '@/common/Logo';\ntype ReservantoProps = TypedLocation<void, QueryReservanto>;\n\nconst Reservanto = ({ query }: ReservantoProps) => {\n const accepted = query?.accepted;\n const token = query?.token;\n\n const { isLoading, message } = useReservanto(token, accepted);\n\n if (!token || !accepted) {\n return <Text tx={'reservanto.badurl'} />;\n }\n\n return (\n <Center style={{ height: '100vh' }}>\n <VStack style={{ alignItems: 'center' }}>\n <Logo logoSize={150} />\n\n {!isLoading ? <Text tx={message} /> : <Loader />}\n </VStack>\n </Center>\n );\n};\n\nexport default withRouter(Reservanto);\n","import { EventRaw } from '@aclito/entities';\n\nimport {\n useJoinProviderEventMutation,\n useLeaveProviderEventMutation,\n} from '../../../redux/api/eventApi';\n\nexport const useEventInfoProviders = () => {\n const [join] = useJoinProviderEventMutation();\n const [leave] = useLeaveProviderEventMutation();\n const addEventToMyEvents = async (event: EventRaw) => {\n await join({ id: event.id });\n };\n\n const removeEventFromMyEvents = async (\n event: EventRaw,\n goBack: () => void,\n ) => {\n await leave({ id: event.id }).unwrap();\n\n goBack();\n };\n\n return { addEventToMyEvents, removeEventFromMyEvents };\n};\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { ActionIcon, Center, Loader, Menu } from '@mantine/core';\nimport { useEventInfoProviders } from '@aclito/shared/features/event/hooks/useEventInfoProviders';\nimport { formatEvent } from '@aclito/shared/features/event/utils/formatEvents';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\nimport styled, { useTheme } from 'styled-components';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useDisplayEvent } from '@aclito/shared/redux/api/eventApi';\nimport React from 'react';\n\nimport { InfoRight } from '../EventInfo/components';\nimport JoinLeaveButton from '../EventInfo/components/JoinLeaveButton';\nimport InfoBuilder from '../EventInfo/components/InfoBuilder';\n\nimport {\n SectionGrid,\n HStack,\n Text,\n TitleBar,\n Icon,\n Title,\n BackButton,\n} from '@/components';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { StateEventInfoProviders } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\nimport { providerImage } from '@/util/providerData';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n Content,\n DisplayFull,\n DisplayMobile,\n EventHeader,\n EventName,\n} from '@/features/event/styles/eventInfoStyles';\nimport { openInNewTab } from '@/util/openLinkInNewTab';\n\ntype EventInfoProps = TypedLocation<StateEventInfoProviders, { id: string }>;\nconst EventInfoProviders: React.FC<EventInfoProps> = ({ state, query }) => {\n const id = query?.id ? query.id : state?.id;\n\n const { model, isFetching } = useDisplayEvent(id);\n\n const nav = useNavigate();\n const t = useTranslate();\n const theme = useTheme();\n\n const { addEventToMyEvents, removeEventFromMyEvents } =\n useEventInfoProviders();\n\n if (!model?.event || isFetching) {\n return (\n <Center>\n <Loader />\n </Center>\n );\n }\n const goBack = () => nav(-1);\n\n const event = formatEvent(model.event);\n const duration = formatEventDuration(event);\n const date = `${event.formattedDate} ${event.formattedTime} - ${event.formattedEndDate}`;\n\n if (!model.event) return null;\n\n const removeEvent = () => {\n removeEventFromMyEvents(model.event, goBack);\n };\n const addEvent = () => {\n addEventToMyEvents(model.event);\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"nav.eventInfo\" />\n </HStack>\n </TitleBar>\n\n <EventHeader>\n <EventName>{model.event.name}</EventName>\n\n <DisplayMobile position=\"bottom-end\">\n <Menu.Target>\n <ActionIcon\n variant=\"filled\"\n size=\"xl\"\n style={{\n backgroundColor: `${theme.primary}`,\n borderRadius: '10px',\n }}\n >\n <Icon icon=\"more\" color={'whiteText'} size={24} />\n </ActionIcon>\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n {!model.isJoined && model.canJoin && (\n <Menu.Item\n icon={<Icon icon=\"add\" size={20} />}\n onClick={addEvent}\n >\n <Text>{t('events.info.join.provider')}</Text>\n </Menu.Item>\n )}\n {model.canLeave && (\n <Menu.Item\n icon={<Icon icon=\"remove\" size={20} />}\n onClick={removeEvent}\n >\n <Text>{t('events.info.leave.provider')}</Text>\n </Menu.Item>\n )}\n </Menu.Dropdown>\n </DisplayMobile>\n <DisplayFull>\n {!model.isJoined && model.canJoin && (\n <JoinLeaveButton onClick={addEvent}>\n <Icon icon=\"add\" size={30} color=\"whiteText\" />\n <Text tx={'events.info.join.provider'} color=\"white\" />\n </JoinLeaveButton>\n )}\n {model.canLeave && (\n <JoinLeaveButton onClick={removeEvent}>\n <Icon icon=\"remove\" size={30} color=\"whiteText\" />\n <Text tx={'events.info.leave.provider'} color=\"white\" />\n </JoinLeaveButton>\n )}\n </DisplayFull>\n </EventHeader>\n <InfoContent>\n <Content>\n <InfoBuilder\n data={[\n {\n text: { text: date },\n icon: 'calendar',\n label: 'events.info.date',\n },\n {\n text: { text: duration },\n icon: 'time',\n label: 'events.info.duration',\n },\n {\n text: { text: event?.place?.address || '' },\n icon: 'place',\n label: 'events.info.place',\n visible: !!event?.place?.address,\n },\n {\n text: { text: event.externalLink ?? '' },\n icon: 'place',\n label: 'events.info.external.link.provider',\n visible: !!event.externalLink,\n onPress: () => openInNewTab(event.externalLink ?? ''),\n },\n {\n text: { text: event.info || '' },\n icon: 'edit',\n label: 'events.info.description',\n visible: !!event.info,\n },\n ]}\n />\n </Content>\n {event.place && <InfoRight model={model} />}\n </InfoContent>\n <img\n src={providerImage[model.event.provider]}\n style={{ width: 'auto', height: 100, marginTop: 5 }}\n alt={'Logo of event provider'}\n />\n </SectionGrid>\n );\n};\n\nconst InfoContent = styled(HStack)`\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr;\n height: auto;\n @media ${deviceMax.desktopL} {\n display: flex;\n }\n`;\n\nexport default withRouter(EventInfoProviders);\n","import type { UserAlias } from '@aclito/entities';\nimport { Card } from '@mantine/core';\nimport React, { MouseEvent } from 'react';\nimport styled from 'styled-components';\nimport { profileActions } from '@aclito/shared/redux/slices';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nimport { ROUTE_PROFILE_ALIASES_EDIT } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { HStack, Text, Icon, Avatar, IconHolder } from '@/components';\nimport { useModal } from '@/hooks/useModal';\n\ninterface AliasCardProps {\n alias: UserAlias;\n showButtons: boolean;\n onClick: (alias: UserAlias) => void;\n}\n\nconst AliasCard: React.FC<AliasCardProps> = ({\n alias,\n onClick,\n showButtons = true,\n}) => {\n const navigation = useNavigate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const dispatch = useAppDispatch();\n const { openModal, openConfirmModal } = useModal();\n\n const onEditAliasPress = (e: MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n navigation(ROUTE_PROFILE_ALIASES_EDIT, { state: { alias } });\n };\n\n const onDeleteAliasPress = (e: MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n const handleRemove = async () => {\n const result = await dispatch(\n profileActions.removeUserAliasAsync({ aliasData: alias }),\n ).unwrap();\n\n if (Array.isArray(result)) {\n openModal({\n centered: true,\n size: 'auto',\n type: 'aliasEvents',\n values: {\n events: result,\n },\n });\n }\n };\n\n openConfirmModal({\n confirmProps: { color: 'red', w: 100 },\n txTitle: 'profile.alias.alert.header',\n closeOnConfirm: true,\n txLabels: { confirm: 'delete', cancel: 'close' },\n onConfirm: handleRemove,\n });\n };\n\n return (\n <StyledCard onClick={() => onClick(alias)} mb={10} radius={10}>\n <HStack>\n <Avatar timeStamp={userInfo.updatedAt} image={alias.image} size={48} />\n <Text size={16} text={`${alias.name} ${alias.surname}`} />\n </HStack>\n {showButtons && (\n <IconHolder style={{ cursor: 'pointer' }}>\n <Icon\n icon=\"edit\"\n color={'primary'}\n onClick={onEditAliasPress}\n data-testid={`${alias.name} ${alias.surname}-edit`}\n size={24}\n />\n <Icon\n icon=\"delete\"\n color={'red'}\n onClick={onDeleteAliasPress}\n size={24}\n data-testid={`${alias.name} ${alias.surname}-delete`}\n />\n </IconHolder>\n )}\n </StyledCard>\n );\n};\n\nconst StyledCard = styled(Card)`\n display: flex;\n background-color: ${({ theme }) => theme.white};\n justify-content: space-between;\n overflow: unset;\n` as typeof Card;\n\nexport default AliasCard;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useGetUserQuery } from '@aclito/shared/redux/api/userApi';\nimport { useParams } from 'react-router-dom';\nimport { UserAlias } from '@aclito/entities';\nimport { Divider } from '@mantine/core';\n\nimport AliasCard from './components/AliasCard';\n\nimport {\n SectionGrid,\n ActionButton,\n BackButton,\n HStack,\n TitleBar,\n VStack,\n Title,\n InlineTooltip,\n EmptyList,\n} from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n ROUTE_ALIAS_INFO,\n ROUTE_PROFILE_ALIASES_CREATE,\n} from '@/util/constants';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\nconst ProfileAliases = () => {\n const { userId } = useParams();\n const navigation = useNavigate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const id = userId || userInfo.id;\n const isMyProfile = id === userInfo.id;\n\n const { data } = useGetUserQuery({ id }, { skip: isMyProfile });\n const aliases = isMyProfile ? userInfo.aliases : data?.user?.aliases ?? [];\n const settings = isMyProfile\n ? userInfo.settings\n : data?.user?.settings ?? null;\n\n const onCreatePress = () => {\n navigation(ROUTE_PROFILE_ALIASES_CREATE);\n };\n\n const onNavigateInfo = (alias: UserAlias) => {\n navigation(ROUTE_ALIAS_INFO, { state: { alias, settings } });\n };\n\n const onBackPress = () => navigation(-1);\n const containerId = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(containerId);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar id={containerId}>\n <HStack>\n <BackButton onClick={onBackPress} />\n <Title tx=\"nav.profile\" />\n </HStack>\n {isMyProfile && (\n <>\n {isFlexWrapped || queryMobile ? (\n <ActionButton iconType={'add'} primary onClick={onCreatePress} />\n ) : (\n <ActionButton\n iconType={'add'}\n primary\n onClick={onCreatePress}\n tx={'add'}\n />\n )}\n </>\n )}\n </TitleBar>\n\n <VStack>\n {isMyProfile && (\n <>\n <InlineTooltip txTitle={'alias'} txBody={'tooltip.profile.alias'} />\n <Divider />\n </>\n )}\n {!aliases.length ? (\n <EmptyList\n action=\"addAlias\"\n iconType={'person'}\n tx=\"flatlist.noalias\"\n />\n ) : (\n <>\n {aliases.map((alias) => (\n <AliasCard\n onClick={onNavigateInfo}\n showButtons={isMyProfile}\n key={alias.id}\n {...{ alias }}\n />\n ))}\n </>\n )}\n </VStack>\n </SectionGrid>\n );\n};\n\nexport default ProfileAliases;\n","import { unwrapResult } from '@reduxjs/toolkit';\nimport type { UserAlias } from '@aclito/entities';\n\nimport { ImageValueShape } from '../../../types';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { profileActions } from '@aclito/shared/redux/slices';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nexport interface UserAliasForm extends Omit<UserAlias, 'id'> {\n file?: string;\n}\n\nexport const useProfileAliasesEdit = (id: string) => {\n const dispatch = useAppDispatch();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const currentAlias = userInfo.aliases.find((alias) => alias.id === id)!;\n\n const updateSecondaryProfile = async (aliasData: UserAliasForm) => {\n aliasData.image = aliasData.image?.trim() ? aliasData.image : 'BASIC';\n if (!aliasData.file) {\n delete aliasData.file;\n }\n return unwrapResult(\n await dispatch(\n profileActions.updateUserAliasAsync({\n aliasData: {\n id,\n ...aliasData,\n },\n }),\n ),\n );\n };\n\n const initialValues: UserAliasForm = {\n name: currentAlias.name,\n surname: currentAlias.surname,\n image: currentAlias.image as ImageValueShape,\n };\n\n return {\n updateSecondaryProfile,\n initialValues,\n };\n};\n","import type { UserAlias } from '@aclito/entities';\nimport { UserAliasForm } from '@aclito/shared/features/profile/hooks/useProfileAliasesEdit';\nimport { Divider } from '@mantine/core';\nimport React from 'react';\nimport { FormProvider, UseFormReturn } from 'react-hook-form';\n\nimport {\n HStack,\n SubmitButton,\n ValidatedInput,\n ValidatedDropzone,\n} from '@/components';\nimport { FormScreen, FormWrapper } from '@/features/profile/styles/styles';\n\ninterface AliasFormProps {\n methods: UseFormReturn<UserAliasForm>;\n handleSubmit: (aliasData: UserAlias) => Promise<void>;\n placeholderName: string;\n placeholderSurname: string;\n isLoading: boolean;\n}\n\nconst AliasForm: React.FC<AliasFormProps> = ({\n methods,\n handleSubmit,\n placeholderName,\n placeholderSurname,\n isLoading,\n}) => {\n return (\n <FormScreen>\n <FormWrapper>\n <FormProvider {...methods}>\n <ValidatedInput\n placeholder={placeholderName}\n txLabel=\"auth.userinfo.name\"\n name=\"name\"\n />\n <ValidatedInput\n placeholder={placeholderSurname}\n txLabel=\"auth.userinfo.surname\"\n name=\"surname\"\n />\n\n <HStack m={'auto'} style={{ width: '100%' }}>\n <ValidatedDropzone name=\"image\" />\n </HStack>\n <Divider m={'sm'} />\n <div>\n <SubmitButton\n loading={isLoading}\n fullWidth\n bg=\"primary\"\n tx=\"continue\"\n onSubmit={handleSubmit}\n />\n </div>\n </FormProvider>\n </FormWrapper>\n </FormScreen>\n );\n};\n\nexport default AliasForm;\n","import { useAppSelector, useSchema, useTranslate } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport {\n UserAliasForm,\n useProfileAliasesEdit,\n} from '@aclito/shared/features/profile/hooks/useProfileAliasesEdit';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport React from 'react';\nimport { useForm } from 'react-hook-form';\nimport type { UserAlias } from '@aclito/entities';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { SectionGrid } from '@aclito/ui-web/components/Layout/Sections';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\n\nimport AliasForm from '../../components/AliasForm';\n\nimport withRouter from '@/navigation/withRouter';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { StateAliasEdit } from '@/util/types';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ntype ProfileAliasesEditProps = TypedLocation<StateAliasEdit>;\n\nconst ProfileAliasesEdit: React.FC<ProfileAliasesEditProps> = ({ state }) => {\n const alias = state?.alias;\n const nav = useNavigate();\n const t = useTranslate();\n\n const { aliasesEditValidationSchema } = useSchema();\n const isLoadingUpdateMyProfile = useAppSelector(\n profileSelectors.isLoadingUpdateMyProfile,\n );\n\n const { updateSecondaryProfile, initialValues } = useProfileAliasesEdit(\n alias?.id ?? '',\n );\n\n const handleSubmit = async (aliasData: UserAlias) => {\n if (await updateSecondaryProfile(aliasData)) {\n nav(-1);\n }\n };\n\n const methods = useForm<UserAliasForm>({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(aliasesEditValidationSchema),\n });\n\n const navBack = () => nav(-1);\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"profile.alias\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <AliasForm\n {...{\n methods,\n handleSubmit,\n isLoading: isLoadingUpdateMyProfile,\n placeholderName: t('auth.userinfo.name'),\n placeholderSurname: t('auth.userinfo.surname'),\n }}\n />\n </SectionGrid>\n );\n};\n\nexport default withRouter(ProfileAliasesEdit);\n","import { unwrapResult } from '@reduxjs/toolkit';\nimport { useMemo } from 'react';\n\nimport { UserAliasForm } from './useProfileAliasesEdit';\n\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { profileActions } from '@aclito/shared/redux/slices';\nimport {\n getRandomUserName,\n getRandomUserSurname,\n} from '@aclito/shared/util/getRandomUserAttributes';\n\nexport const useProfileAliasesCreate = () => {\n const dispatch = useAppDispatch();\n const t = useTranslate();\n\n const placeholderName = useMemo(() => getRandomUserName(t), []);\n const placeholderSurname = useMemo(() => getRandomUserSurname(), []);\n\n const createSecondaryProfile = async (\n aliasData: Omit<UserAliasForm, 'id'>,\n ) => {\n aliasData.image = aliasData.image?.trim() ? aliasData.image : 'BASIC';\n\n if (!aliasData.file) {\n delete aliasData.file;\n }\n\n return unwrapResult(\n await dispatch(\n profileActions.createUserAliasAsync({\n aliasData: {\n file: aliasData.file,\n name: aliasData.name.trim() ? aliasData.name : placeholderName,\n surname: aliasData.surname.trim()\n ? aliasData.surname\n : placeholderSurname,\n image: aliasData.image,\n },\n }),\n ),\n );\n };\n\n const initialValues: UserAliasForm = {\n name: '',\n surname: '',\n image: 'BASIC',\n };\n\n return {\n placeholderName,\n placeholderSurname,\n createSecondaryProfile,\n initialValues,\n };\n};\n","import { useProfileAliasesCreate } from '@aclito/shared/features/profile/hooks/useProfileAliasesCreate';\nimport type { UserAlias } from '@aclito/entities';\nimport { useAppSelector, useSchema } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useForm } from 'react-hook-form';\nimport { UserAliasForm } from '@aclito/shared/features/profile/hooks/useProfileAliasesEdit';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { yupResolver } from '@hookform/resolvers/yup';\n\nimport AliasForm from '../../components/AliasForm';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { SectionGrid } from '@/components';\n\nconst ProfileAliasesCreate = () => {\n const nav = useNavigate();\n const { aliasesEditValidationSchema } = useSchema();\n\n const isLoadingUpdateMyProfile = useAppSelector(\n profileSelectors.isLoadingUpdateMyProfile,\n );\n\n const {\n placeholderName,\n placeholderSurname,\n createSecondaryProfile,\n initialValues,\n } = useProfileAliasesCreate();\n\n const handleSubmit = async (aliasData: Omit<UserAlias, 'id'>) => {\n if (await createSecondaryProfile(aliasData)) {\n nav(-1);\n }\n };\n\n const methods = useForm<UserAliasForm>({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(aliasesEditValidationSchema),\n });\n\n const navBack = () => nav(-1);\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"create\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n <AliasForm\n {...{\n methods,\n handleSubmit,\n placeholderName,\n isLoading: isLoadingUpdateMyProfile,\n placeholderSurname,\n }}\n />\n </SectionGrid>\n );\n};\n\nexport default ProfileAliasesCreate;\n","import { useCallback, useEffect } from 'react';\nimport {\n noteActions,\n noteSelectors,\n} from '@aclito/shared/redux/slices/noteSlices';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\n\nexport const useNoteGrants = () => {\n const dispatch = useAppDispatch();\n\n const noteGrants = useAppSelector(noteSelectors.myGrants);\n\n const loadGrantOnFocus = useCallback(() => {\n dispatch(noteActions.getMyNoteGrants());\n }, [dispatch]);\n\n useEffect(loadGrantOnFocus, [loadGrantOnFocus]);\n\n return { noteGrants };\n};\n","import { Divider } from '@mantine/core';\n\nimport { useNoteGrants } from '@/features/notes/screens/Notes/hooks/useNoteGrants';\nimport { ActionButton, HStack, Icon, Text, VStack } from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\n\nconst NoteGrantListing = () => {\n const { noteGrants } = useNoteGrants();\n const nav = useNavigate();\n return (\n <div>\n {noteGrants\n .filter((grant) => grant.org)\n .map((item, index) => (\n <>\n <VStack spacing={1} style={{ alignSelf: 'flex-end' }}>\n <HStack\n style={{\n justifyContent: 'space-between',\n }}\n >\n <HStack spacing={8}>\n <Icon icon={'org'} />\n <Text text={item.org?.name} />\n </HStack>\n <ActionButton\n iconType={'rightArrow'}\n onClick={() =>\n nav('/organizations', { state: { id: item.org.id } })\n }\n />\n </HStack>\n </VStack>\n {index < noteGrants.length && (\n <Divider style={{ marginBottom: 8, marginTop: 8 }} />\n )}\n </>\n ))}\n </div>\n );\n};\nexport default NoteGrantListing;\n","import { useState } from 'react';\nimport { Space } from '@mantine/core';\nimport { useSchema, useTranslate } from '@aclito/shared/hooks';\nimport { useDisclosure } from '@mantine/hooks';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\n\nimport {\n SectionGrid,\n Tab,\n Tabs,\n VStack,\n Title,\n TitleBar,\n ActionButton,\n HStack,\n InlineTooltip,\n} from '@/components';\nimport NotesListing from '@/features/notes/screens/Notes/components/NotesListing';\nimport NoteGrantListing from '@/features/notes/screens/Notes/components/NoteGrantListing';\nimport { useNotes } from '@/features/notes/screens/Notes/hooks/useNotes';\n\nconst Notes = () => {\n const t = useTranslate();\n const { data, handleSubmit } = useNotes();\n const { notesValidationSchema } = useSchema();\n const { handleClear } = useNotes();\n const [isEdit, { toggle }] = useDisclosure(false);\n const [tabIndex, setTabIndex] = useState({\n index: '0',\n });\n\n const methods = useForm({\n values: { tel: data?.tel ?? '', email: data?.email ?? '' },\n resolver: zodResolver(notesValidationSchema),\n });\n\n const handleSubmitForm = async (note: { tel: string; email: string }) => {\n await handleSubmit(note);\n toggle();\n };\n\n const handleTabIndexChange = (index: string) => {\n setTabIndex({\n index,\n });\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <VStack>\n <TitleBar>\n <Title>{t('admin.notes.title')}\n \n \n \n \n \n {tabIndex.index === '0' && (\n \n )}\n {tabIndex.index === '1' && (\n \n )}\n \n \n \n \n \n \n <>\n {tabIndex.index === '0' && (\n \n \n \n )}\n {tabIndex.index === '1' && }\n \n \n );\n};\n\nexport default Notes;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { useCallback, useEffect } from 'react';\nimport {\n noteActions,\n noteSelectors,\n} from '@aclito/shared/redux/slices/noteSlices';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\n\nexport const useNotesUser = (\n id: string | undefined,\n orgId: string | undefined,\n) => {\n const dispatch = useAppDispatch();\n const isLoading = useAppSelector(noteSelectors.isLoading);\n const notes = useAppSelector(noteSelectors.notes);\n const loadApiData = useCallback(() => {\n if (id && orgId) {\n dispatch(noteActions.getNoteForUserAsync({ id, orgId }));\n }\n }, [dispatch, id, orgId]);\n\n useEffect(loadApiData, [loadApiData]);\n\n if (!id || !orgId) {\n return { notes: undefined, isLoading: false };\n }\n\n return {\n notes,\n isLoading,\n };\n};\n","import { Center, Divider, Loader } from '@mantine/core';\nimport { useTheme } from 'styled-components';\nimport { FC } from 'react';\n\nimport {\n SectionGrid,\n BackButton,\n TitleBar,\n VStack,\n HStack,\n Text,\n Title,\n} from '@/components';\nimport { useNotesUser } from '@/features/notes/screens/NotesUser/hooks/useNotesUser';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { StateNotesUser } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ntype NotesUserProps = TypedLocation;\n\nconst NotesUser: FC = ({ state }) => {\n const { notes, isLoading } = useNotesUser(state?.id, state?.orgId);\n const nav = useNavigate();\n const theme = useTheme();\n\n if (isLoading) {\n return (\n
\n \n
\n );\n }\n\n return (\n \n \n \n nav(-1)} />\n \n </HStack>\n </TitleBar>\n\n <div>\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack spacing={8} style={{ alignSelf: 'flex-end' }}>\n <HStack spacing={8}>\n <Text text={'Tel:'} size={'xs'} style={{ color: theme.grey50 }} />\n </HStack>\n <HStack spacing={8}>\n <Text\n text={notes?.tel ?? ''}\n style={{\n color: theme.grey80,\n fontSize: 14,\n }}\n />\n </HStack>\n </VStack>\n </HStack>\n\n <Divider style={{ margin: '16px 0px' }} />\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack spacing={8} style={{ alignSelf: 'flex-end' }}>\n <HStack spacing={8}>\n <Text\n text={'E-mail:'}\n size={'xs'}\n style={{ color: theme.grey50 }}\n />\n </HStack>\n <HStack spacing={8}>\n <Text\n text={notes?.email ?? ''}\n style={{\n color: theme.grey80,\n fontSize: 14,\n }}\n />\n </HStack>\n </VStack>\n </HStack>\n </div>\n </SectionGrid>\n );\n};\n\nexport default withRouter(NotesUser);\n","export const confirmSignUpHeaders = {\n 'x-amz-target': 'AWSCognitoIdentityProviderService.ConfirmSignUp',\n 'Content-Type': 'application/x-amz-json-1.1',\n};\nexport const resendCodeHeaders = {\n 'x-amz-target': 'AWSCognitoIdentityProviderService.ResendConfirmationCode',\n 'Content-Type': 'application/x-amz-json-1.1',\n};\n","import { useEffect, useState } from 'react';\n\nimport { CodeType } from '../utils/verificationErrorCodes';\nimport {\n confirmSignUpHeaders,\n resendCodeHeaders,\n} from '../utils/verifyHeaders';\n\nimport { VerificationData } from '@aclito/shared/types';\n\nconst url = 'https://cognito-idp.eu-central-1.amazonaws.com/';\n\nexport const useVerify = ({\n username,\n code,\n clientId,\n email,\n}: VerificationData) => {\n const [response, setResponse] = useState<CodeType>();\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [hasError, setHasError] = useState(false);\n\n const confirmSignUpBody = {\n ClientId: clientId,\n ConfirmationCode: code,\n Username: username,\n };\n\n const resendCodeBody = {\n ClientId: clientId,\n Username: email,\n };\n\n const sendRequest = async (headers: any, body: string, welcome: boolean) => {\n try {\n let result: CodeType;\n setHasError(false);\n const resp = await fetch(url, {\n method: 'POST',\n body,\n headers,\n });\n\n if (resp.ok) {\n if (welcome) {\n setResponse('Welcome');\n result = 'Welcome';\n } else {\n setResponse('OK');\n result = 'OK';\n }\n } else {\n const data = (await resp.json()) as { __type: CodeType };\n const error = data.__type;\n result = error;\n setHasError(true);\n setResponse(error);\n }\n\n setIsLoading(false);\n return result;\n } catch (error) {\n setIsLoading(false);\n setHasError(true);\n setResponse('Unknown');\n }\n };\n\n const resendRequest = async () => {\n setResponse(undefined);\n setIsLoading(true);\n await sendRequest(resendCodeHeaders, JSON.stringify(resendCodeBody), false);\n };\n\n const handleVerification = async () => {\n if (clientId && code && username) {\n setIsLoading(true);\n await sendRequest(\n confirmSignUpHeaders,\n JSON.stringify(confirmSignUpBody),\n true,\n );\n }\n };\n\n useEffect(() => {\n handleVerification();\n }, [clientId, code, username]);\n\n return {\n sendRequest,\n isLoading,\n hasError,\n response,\n setIsLoading,\n resendRequest,\n };\n};\n","import { TranslateKey } from '@aclito/shared/types';\n\nexport type CodeType =\n | 'AliasExistsException'\n | 'CodeMismatchException'\n | 'ExpiredCodeException'\n | 'InternalErrorException'\n | 'InvalidLambdaResponseException'\n | 'InvalidParameterException'\n | 'LimitExceededException'\n | 'NotAuthorizedException'\n | 'ResourceNotFoundException'\n | 'TooManyFailedAttemptsException'\n | 'TooManyRequestsException'\n | 'UnexpectedLambdaException'\n | 'UserLambdaValidationException'\n | 'UserNotFoundException'\n | 'OK'\n | 'Welcome'\n | 'Unknown';\n\nexport const codes: Record<CodeType, TranslateKey> = {\n AliasExistsException: 'error.couldntverify',\n CodeMismatchException: 'error.codemismatch',\n ExpiredCodeException: 'error.codeexpiry',\n InternalErrorException: 'error.internal',\n InvalidLambdaResponseException: 'error.couldntverify',\n InvalidParameterException: 'error.invalidparam',\n LimitExceededException: 'error.limit',\n NotAuthorizedException: 'error.notauth',\n ResourceNotFoundException: 'error.couldntverify',\n TooManyFailedAttemptsException: 'error.toomanyattempts',\n TooManyRequestsException: 'error.toomanyrequests',\n UnexpectedLambdaException: 'error.couldntverify',\n UserLambdaValidationException: 'error.couldntverify',\n UserNotFoundException: 'error.usernotfound',\n OK: 'confirmed',\n Welcome: 'welcome',\n Unknown: 'error.unknown',\n};\n\nexport const getCode = (code: CodeType) => codes[code] || codes.Unknown;\n","import { useTranslate } from '@aclito/shared/hooks';\nimport { Loader } from '@mantine/core';\nimport styled from 'styled-components';\nimport {\n CodeType,\n getCode,\n} from '@aclito/shared/features/misc/utils/verificationErrorCodes';\n\nimport { Text } from '@/components';\n\ntype ResultProps = {\n isLoading: boolean;\n response: CodeType | undefined;\n resendRequest: () => void;\n};\n\nconst Result = ({ isLoading, response, resendRequest }: ResultProps) => {\n const t = useTranslate();\n const canShowLink =\n response === 'ExpiredCodeException' || response === 'CodeMismatchException';\n\n return (\n <ResultTextContainer>\n {!isLoading ? (\n <Text size={'lg'} text={t(getCode(response as CodeType))} />\n ) : (\n <Loader />\n )}\n {canShowLink && (\n <NewLink onClick={resendRequest}>{t('verification.request')}</NewLink>\n )}\n </ResultTextContainer>\n );\n};\n\nconst NewLink = styled.div`\n background: ${({ theme }) => theme.primary};\n border-radius: 10px;\n padding: 12px 30px;\n margin-top: 30px;\n font-size: 20px;\n color: ${({ theme }) => theme.white};\n &:hover {\n cursor: pointer;\n }\n`;\n\nconst ResultTextContainer = styled.div`\n display: flex;\n margin-top: 25vh;\n justify-content: center;\n align-items: center;\n margin-bottom: 3vh;\n flex-direction: column;\n`;\n\nexport default Result;\n","export default \"__VITE_ASSET__1f7aeb25__\"","export default \"__VITE_ASSET__abfd2351__\"","import styled from 'styled-components';\nimport { CodeType } from '@aclito/shared/features/misc/utils/verificationErrorCodes';\n\nimport Result from './Result';\n\nimport { Figure2 } from '@/images';\n\ntype VerificationBodyProps = {\n isLoading: boolean;\n response?: CodeType;\n resendRequest: () => void;\n};\n\nconst VerificationBody = ({\n isLoading,\n response,\n resendRequest,\n}: VerificationBodyProps) => {\n return (\n <Center>\n <Wrapper>\n <Result {...{ isLoading, response }} resendRequest={resendRequest} />\n <Center>{response === 'Welcome' && <Figure2 />}</Center>\n </Wrapper>\n </Center>\n );\n};\n\nconst Center = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst Wrapper = styled.div`\n height: 100vh;\n z-index: 3;\n`;\n\nexport default VerificationBody;\n","import { VerificationData } from '@aclito/shared/types';\nimport { useVerify } from '@aclito/shared/features/misc/hooks/useVerify';\nimport Container from '@aclito/ui-web/components/Layout/Container';\n\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { QueryVerification } from '@/util/types';\nimport VerificationBody from '@/features/integration/screens/Verification/components/VerificationBody';\nimport withRouter from '@/navigation/withRouter';\n\ntype VerificationProps = TypedLocation<void, QueryVerification>;\n\nconst Verification = ({ query }: VerificationProps) => {\n const clientId = query?.clientId;\n const code = query?.code;\n const username = query?.username;\n const email = query?.email;\n\n if (!clientId || !code || !username || !email) {\n return null;\n }\n\n return (\n <VerificationInner\n clientId={clientId}\n code={code}\n username={username}\n email={email}\n />\n );\n};\n\nconst VerificationInner = ({\n clientId,\n code,\n username,\n email,\n}: VerificationData) => {\n const { response, isLoading, resendRequest } = useVerify({\n clientId,\n code,\n username,\n email,\n });\n\n return (\n <Container>\n <VerificationBody\n isLoading={isLoading}\n response={response}\n resendRequest={resendRequest}\n />\n </Container>\n );\n};\n\nexport default withRouter(Verification);\n","import { useEffect } from 'react';\nimport { isAndroid, isMobile } from 'react-device-detect';\nimport { config } from '@aclito/shared/config';\nimport { useSearchParams } from 'react-router-dom';\n\nconst aclitoWebURL = `${window.location.protocol}//${window.location.host}`;\n\nconst Invite = () => {\n const [searchParams] = useSearchParams();\n const type = searchParams.get('type') === 'lite' ? 'lite' : 'full';\n\n const aclitoURL = isAndroid\n ? type === 'full'\n ? config.URL.googleStoreURL\n : config.URL.googleStoreLiteURL\n : type === 'full'\n ? config.URL.appleStoreURL\n : config.URL.appleStoreLiteURL;\n\n useEffect(() => {\n if (isMobile) {\n document.location = aclitoURL;\n } else {\n document.location = aclitoWebURL;\n }\n }, [aclitoURL]);\n\n return <div />;\n};\n\nexport default Invite;\n","import { Feed } from '@aclito/entities';\n\nimport { FeedForm } from '../types/types';\n\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport {\n useCreateFeedMutation,\n useUpdateFeedMutation,\n} from '@aclito/shared/redux/api/feedApi';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { getMyOrgsSelectOptions } from '@aclito/shared/util/getMyOrgsSelectOptions';\nimport { ImageValueShape } from '@aclito/shared/types';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useFeedEdit = (feed: Feed | undefined) => {\n const myOrgs = useAppSelector(selectMyOrganizations);\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const displayedOrg = myOrgs.find((o) => o.id === feed?.feedOrgId);\n\n const [createFeed] = useCreateFeedMutation();\n\n const [updateFeed] = useUpdateFeedMutation();\n\n const orgOptions = getMyOrgsSelectOptions(myOrgs, userInfo.id);\n\n const createOrUpdateFeed = async (data: FeedForm) => {\n if (feed) {\n await updateFeed({\n id: feed.id,\n text: data.feedText,\n file: data.file,\n orgId: feed.feedOrgId,\n }).unwrap();\n } else {\n if (data.feedOrg?.id.length) {\n await createFeed({\n text: data.feedText,\n feedOrgId: data.feedOrg.id,\n file: data.file,\n }).unwrap();\n }\n }\n };\n\n const initialValues: FeedForm = feed\n ? {\n feedText: feed.text,\n feedOrg: { item: '', id: '' },\n image: feed.image as ImageValueShape,\n file: undefined,\n }\n : {\n feedText: '',\n feedOrg: displayedOrg\n ? { item: displayedOrg.name, id: displayedOrg.id }\n : undefined,\n image: undefined,\n file: undefined,\n };\n\n return {\n orgOptions,\n initialValues,\n createOrUpdateFeed,\n };\n};\n","import { FeedForm } from '@aclito/shared/features/organization/types/types';\nimport { useAppSelector, useSchema } from '@aclito/shared/hooks';\nimport React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useFeedEdit } from '@aclito/shared/features/organization/hooks/useFeedEdit';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { ImageValueShape } from '@aclito/shared/types';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport {\n selectAllFeeds,\n useGetFeedQuery,\n} from '@aclito/shared/redux/api/feedApi';\nimport { Feed } from '@aclito/entities';\n\nimport {\n SectionGrid,\n ActionButton,\n SmallButton,\n TitleBar,\n VStack,\n ValidatedSelect,\n ValidatedTextArea,\n ValidatedDropzone,\n InlineTooltip,\n} from '@/components';\nimport withRouter from '@/navigation/withRouter';\nimport { StateFeedEdit } from '@/util/types';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ntype OrganizationFeedEditWrapperProps = TypedLocation<StateFeedEdit>;\ntype OrganizationFeedEditProps = { feed: Feed | undefined };\ntype WebFeedForm = FeedForm & {\n file: string | undefined;\n image?: ImageValueShape;\n};\n\nconst OrganizationFeedEdit: React.FC<OrganizationFeedEditProps> = ({\n feed,\n}) => {\n const { createFeedSchema, editFeedSchema } = useSchema();\n const {\n orgOptions,\n initialValues,\n createOrUpdateFeed: handleCreateOrUpdateFeed,\n } = useFeedEdit(feed);\n\n const schema = feed ? editFeedSchema : createFeedSchema;\n\n const methods = useForm<WebFeedForm>({\n defaultValues: initialValues,\n //@ts-ignore\n resolver: yupResolver(schema),\n });\n\n const handleButtonSubmit = () => {\n methods.handleSubmit((values) => {\n handleCreateOrUpdateFeed(values);\n nav(-1);\n })();\n };\n\n const nav = useNavigate();\n const navBack = () => {\n nav(-1);\n };\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx={feed ? 'nav.feedEdit' : 'org.add.feed'} />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n\n <FormProvider {...methods}>\n <VStack>\n {!orgOptions.length ? (\n <InlineTooltip\n txTitle={'tooltip.feed.org.title'}\n txBody={'tooltip.feed.org'}\n color=\"red\"\n />\n ) : (\n <InlineTooltip\n txTitle={'tooltip.feed.perm.title'}\n txBody={'tooltip.feed.perm'}\n />\n )}\n\n {!feed && (\n <ValidatedSelect\n txLabel=\"org.feed.org\"\n txPlaceholder=\"org.feed.org\"\n name=\"feedOrg\"\n options={orgOptions}\n />\n )}\n <ValidatedTextArea\n name=\"feedText\"\n txPlaceholder=\"org.feed.description\"\n txLabel=\"org.feed.description\"\n />\n <ValidatedDropzone name=\"image\" imageOnly circular={false} />\n <SmallButton onClick={handleButtonSubmit} bg=\"primary\" tx=\"submit\" />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nfunction OrganizationFeedEditWrapper({\n state,\n}: OrganizationFeedEditWrapperProps) {\n const feedId = state?.feedId;\n const selectedFeed = useAppSelector(selectAllFeeds).find(\n (f) => f.id === feedId,\n );\n const { data } = useGetFeedQuery(feedId ?? '', {\n skip: !!selectedFeed || !feedId,\n });\n\n const feed = selectedFeed ?? data;\n\n return <OrganizationFeedEdit feed={feed} />;\n}\n\nexport default withRouter(OrganizationFeedEditWrapper);\n","import { Feed } from '@aclito/entities';\nimport { useDeleteFeedMutation } from '@aclito/shared/redux/api/feedApi';\n\nimport { useLocation } from '@/hooks';\nimport { useModal } from '@/hooks/useModal';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_FEED_INFO } from '@/util/constants';\n\nexport const useFeedDelete = (feed: Feed) => {\n const nav = useNavigate();\n const { openConfirmModal } = useModal();\n const location = useLocation();\n\n const [deleteFeed] = useDeleteFeedMutation();\n\n const handleDelete = () => {\n openConfirmModal({\n txTitle: 'org.feed.delete.title',\n txLabels: { cancel: 'close', confirm: 'delete' },\n type: 'deleteFeed',\n onConfirm: async () => {\n await deleteFeed({ id: feed.id, feedOrgId: feed.feedOrgId });\n if (location.pathname === ROUTE_FEED_INFO) {\n nav(-1);\n }\n },\n });\n };\n\n return { handleDelete };\n};\n","import { Feed } from '@aclito/entities';\nimport { Menu } from '@mantine/core';\nimport React from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport { useFeedDelete } from '../hooks/useFeedDelete';\n\nimport { Icon, ActionButton, HStack, Text } from '@/components';\nimport { ROUTE_FEED_EDIT } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ninterface FeedMenuOptionsProps {\n feed: Feed;\n compact?: boolean;\n}\n\nconst FeedMenuOptions: React.FC<FeedMenuOptionsProps> = ({ feed, compact }) => {\n const nav = useNavigate();\n const theme = useTheme();\n const { handleDelete } = useFeedDelete(feed);\n\n return (\n <>\n {compact ? (\n <Menu>\n <Menu.Target>\n <StyledMoreButton>\n <Icon icon=\"more\" color={'primary'} size={24} />\n </StyledMoreButton>\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n <Menu.Item\n onClick={() =>\n nav(ROUTE_FEED_EDIT, { state: { feedId: feed.id } })\n }\n icon={<Icon icon=\"edit\" size={20} />}\n >\n <Text tx=\"json.edit\" />\n </Menu.Item>\n <Menu.Item\n onClick={handleDelete}\n icon={<Icon icon=\"delete\" size={20} />}\n >\n <Text tx=\"delete\" />\n </Menu.Item>\n </Menu.Dropdown>\n </Menu>\n ) : (\n <HStack>\n <ActionButton\n tx=\"json.edit\"\n iconType=\"edit\"\n onClick={() => nav(ROUTE_FEED_EDIT, { state: { feedId: feed.id } })}\n />\n <ActionButton\n tx=\"delete\"\n bg={'red10'}\n textcolor={'red'}\n iconType=\"delete\"\n onClick={handleDelete}\n />\n </HStack>\n )}\n </>\n );\n};\n\nconst StyledMoreButton = styled.button`\n background: unset;\n border: unset;\n cursor: pointer;\n margin-top: 0.5rem;\n`;\n\nexport default FeedMenuOptions;\n","import { useAppSelector, useTranslateDate } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport React from 'react';\nimport { canEditFeed } from '@aclito/shared/features/organization/utils/canEditFeed';\nimport styled from 'styled-components';\nimport { ImageValueShape } from '@aclito/shared/types';\nimport { Stack } from '@mantine/core';\nimport {\n selectAllFeeds,\n useGetFeedQuery,\n} from '@aclito/shared/redux/api/feedApi';\n\nimport FeedMenuOptions from '../../components/FeedMenuOptions';\n\nimport {\n SectionGrid,\n Image,\n BackButton,\n HStack,\n Text,\n TitleBar,\n VStack,\n Title,\n OrgAvatar,\n} from '@/components';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { StateFeedInfo } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\n\nexport type OrganizationFeedInfoProps = TypedLocation<StateFeedInfo>;\n\nconst OrganizationFeedInfo: React.FC<OrganizationFeedInfoProps> = ({\n state,\n}) => {\n const feedId = state?.feedId;\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const tDate = useTranslateDate();\n\n const selectedFeed = useAppSelector(selectAllFeeds).find(\n (f) => f.id === feedId,\n );\n const { data } = useGetFeedQuery(feedId ?? '', {\n skip: !!selectedFeed || !feedId,\n });\n if (!selectedFeed && !data) return null;\n\n const feed = selectedFeed ?? data;\n\n if (!feed) return null;\n\n const canEdit = canEditFeed(userInfo.id, feed.org);\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"nav.feed\" />\n </HStack>\n {canEdit && <FeedMenuOptions feed={feed} />}\n </TitleBar>\n <VStack>\n <HStack>\n <OrgAvatar org={feed.org} size={50} />\n <VStack spacing={10}>\n <NameText lineClamp={1} text={feed.org.name} />\n <DateText text={tDate(feed.createdAt, 'date.short')} />\n </VStack>\n </HStack>\n <Stack pl={6}>\n <FeedText text={feed.text} />\n <div style={{ maxWidth: 600 }}>\n {feed.image?.trim().length ? (\n <Image\n image={feed.image as ImageValueShape}\n timeStamp={feed.updatedAt}\n />\n ) : null}\n </div>\n </Stack>\n </VStack>\n </SectionGrid>\n );\n};\n\nconst DateText = styled(Text)`\n color: ${({ theme }) => theme.grey30};\n font-weight: 400;\n line-height: normal;\n font-size: 16px;\n`;\n\nconst NameText = styled(Text)`\n line-height: normal;\n font-weight: 500;\n color: ${({ theme }) => theme.grey80};\n`;\n\nconst FeedText = styled(Text)`\n padding-left: 4px;\n color: ${({ theme }) => theme.grey50};\n font-size: 14px;\n line-height: normal;\n font-weight: 400;\n`;\n\nexport default withRouter(OrganizationFeedInfo);\n","import { Feed } from '@aclito/entities';\nimport { ImageValueShape } from '@aclito/shared/types';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useAppSelector, useTranslateDate } from '@aclito/shared/hooks';\nimport { canEditFeed } from '@aclito/shared/features/organization/utils/canEditFeed';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nimport FeedMenuOptions from './FeedMenuOptions';\n\nimport {\n HStack,\n Text,\n VStack,\n Image,\n OrgAvatar,\n PlainCard,\n} from '@/components';\nimport { ROUTE_FEED_INFO } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\n\ninterface FeedCardProps {\n feed: Feed;\n}\n\nconst FeedCard: React.FC<FeedCardProps> = ({ feed }) => {\n const nav = useNavigate();\n const tDate = useTranslateDate();\n\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const canEdit = canEditFeed(userInfo.id, feed.org);\n\n return (\n <PlainCard\n onClick={() => nav(ROUTE_FEED_INFO, { state: { feedId: feed.id } })}\n style={{ height: '100%', maxWidth: 600 }}\n >\n <VStack>\n <HStack style={{ flexWrap: 'nowrap' }}>\n <HStack style={{ justifyContent: 'space-between', width: '100%' }}>\n <HStack>\n <OrgAvatar org={feed.org} size={50} />\n <VStack spacing={2}>\n <NameText size={18} lineClamp={1} weight={500}>\n {feed.org.name}\n </NameText>\n <DateText size=\"xs\">{`${feed.postedBy.name} ${feed.postedBy.surname}`}</DateText>\n <DateText>{tDate(feed.createdAt, 'date.short')}</DateText>\n </VStack>\n </HStack>\n {canEdit && (\n <HStack onClick={(e) => e.stopPropagation()}>\n <FeedMenuOptions feed={feed} compact={true} />\n </HStack>\n )}\n </HStack>\n </HStack>\n <FeedText lineClamp={17}>{feed.text}</FeedText>\n {feed.image?.trim().length ? (\n <Image\n style={{ borderRadius: 10 }}\n image={feed.image as ImageValueShape}\n timeStamp={feed.updatedAt}\n />\n ) : null}\n </VStack>\n </PlainCard>\n );\n};\n\nconst DateText = styled(Text)`\n color: ${({ theme }) => theme.grey30};\n font-weight: 400;\n line-height: normal;\n font-size: 12px;\n`;\n\nconst NameText = styled(Text)`\n line-height: normal;\n`;\n\nconst FeedText = styled(Text)`\n padding-left: 4px;\n color: ${({ theme }) => theme.grey50};\n font-size: 14px;\n line-height: normal;\n font-weight: 400;\n`;\n\nexport default FeedCard;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport {\n useListFeedsByMyOrgsQuery,\n useListFeedsByOrgQuery,\n} from '@aclito/shared/redux/api/feedApi';\nimport { organizationsSelectors } from '@aclito/shared/redux/slices/organizationSlices';\nimport { Center, Grid, Loader } from '@mantine/core';\nimport React from 'react';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\n\nimport FeedCard from './FeedCard';\n\nimport { EmptyList } from '@/components';\n\ninterface FeedListProps {\n orgId?: string;\n}\n\nconst FeedList: React.FC<FeedListProps> = ({ orgId }) => {\n const feedFilters = useAppSelector(organizationsSelectors.getFeedFilter);\n const myOrgs = useAppSelector(selectMyOrganizations);\n\n const { data, isFetching } = useListFeedsByOrgQuery(orgId ?? '', {\n skip: !orgId,\n });\n const { data: allData, isFetching: isAllFetching } =\n useListFeedsByMyOrgsQuery(feedFilters.feedOrg.id, {\n skip: !!orgId?.length || !myOrgs.length,\n });\n\n const feeds = (orgId ? data : allData) ?? [];\n\n return (\n <>\n {isFetching || isAllFetching ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <>\n {feeds?.length ? (\n <Grid columns={1} gutter=\"md\">\n {dateSort(feeds, 'updatedAt', 'desc').map((feed) => (\n <Grid.Col key={feed.id}>\n <FeedCard feed={feed} />\n </Grid.Col>\n ))}\n </Grid>\n ) : orgId ? (\n <EmptyList iconType=\"feed\" tx=\"error.empty.listFeeds\" />\n ) : (\n <EmptyList\n iconType=\"feed\"\n action=\"addFeed\"\n tx=\"error.empty.listFeeds\"\n />\n )}\n </>\n )}\n </>\n );\n};\n\nexport default FeedList;\n","import { useForm } from 'react-hook-form';\n\nimport { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport {\n organizationsActions,\n organizationsSelectors,\n} from '@aclito/shared/redux/slices/organizationSlices';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { FeedFilters } from '@aclito/shared/redux/types';\nimport { SelectObject } from '@aclito/shared/types';\nimport { getById } from '@aclito/shared/util/selectObject';\nimport { config } from '@aclito/shared/config';\nimport { useListFeedsByMyOrgsQuery } from '@aclito/shared/redux/api/feedApi';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { selectMyOrganizations } from '@aclito/shared/redux/api/organizationApi';\n\nexport const useFeedFilters = () => {\n const dispatch = useAppDispatch();\n const myOrgs = useAppSelector(selectMyOrganizations);\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const feedFilter = useAppSelector(organizationsSelectors.getFeedFilter);\n\n useListFeedsByMyOrgsQuery(feedFilter.feedOrg.id, { skip: !myOrgs.length });\n\n const orgOptions: SelectObject[] = myOrgs.map((org) => ({\n id: org.id,\n item: org.name,\n }));\n\n const filterInitialValue: FeedFilters = {\n feedOrg: feedFilter.feedOrg\n ? feedFilter.feedOrg\n : getById('any', config.activities),\n };\n\n const methods = useForm<FeedFilters>({ defaultValues: filterInitialValue });\n\n const clearFilter = () => {\n dispatch(organizationsActions.clearFeedFilters());\n methods.reset();\n };\n\n const submitFilters = async (values: FeedFilters) => {\n if (!values.feedOrg || typeof values.feedOrg === 'string') {\n dispatch(\n organizationsActions.setFeedFilters({ feedOrg: { id: '', item: '' } }),\n );\n } else {\n dispatch(organizationsActions.setFeedFilters(values));\n }\n };\n\n return {\n orgOptions,\n clearFilter,\n userInfo,\n submitFilters,\n methods,\n };\n};\n","import { useFeedFilters } from '@aclito/shared/features/organization/hooks/useFeedFilters';\nimport { FormProvider } from 'react-hook-form';\nimport styled from 'styled-components';\nimport { Space } from '@mantine/core';\n\nimport {\n ValidatedSelect,\n ActionButton,\n HStack,\n VStack,\n InlineTooltip,\n} from '@/components';\n\nconst FeedFilter = () => {\n const { orgOptions, clearFilter, methods, submitFilters } = useFeedFilters();\n\n if (!orgOptions.length) {\n return (\n <>\n <Space h={24} />\n <InlineTooltip\n color=\"red\"\n txTitle=\"tooltip.feed.org.title\"\n txBody=\"flatlist.noorgsyet\"\n />\n </>\n );\n }\n\n return (\n <FormProvider {...methods}>\n <VStack spacing={16}>\n <ValidatedSelect\n options={orgOptions}\n name=\"feedOrg\"\n txLabel=\"org.feed.org\"\n txPlaceholder=\"org.feed.org\"\n />\n <ButtonSection spacing={16}>\n <ActionButton fullWidth tx=\"clear\" onClick={clearFilter} />\n <ActionButton\n fullWidth\n primary\n tx=\"filter\"\n onClick={methods.handleSubmit(submitFilters)}\n />\n </ButtonSection>\n </VStack>\n </FormProvider>\n );\n};\n\nconst ButtonSection = styled(HStack)`\n flex-wrap: nowrap;\n`;\n\nexport default FeedFilter;\n","import { useDisclosure } from '@mantine/hooks';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport FeedList from '../../components/FeedList';\n\nimport FeedFilter from './components/FeedFilter';\n\nimport {\n LeftSectionLarge,\n LeftSectionSmall,\n LeftSectionTitle,\n SectionGrid,\n TitleButtons,\n ActionButton,\n HStack,\n TitleBar,\n Overlay,\n Title,\n Icon,\n} from '@/components';\nimport { ROUTE_FEED_EDIT } from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\n\nconst OrganizationFeed = () => {\n const [isOpen, handler] = useDisclosure(false);\n const nav = useNavigate();\n const [showModalTooltip] = useShowTooltipModal('feedTooltip');\n\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id);\n\n const handleAddPost = () => nav(ROUTE_FEED_EDIT);\n\n return (\n <SectionGrid $isOpen={isOpen}>\n {isOpen && <Overlay onClick={handler.toggle} />}\n {isOpen && (\n <LeftSectionLarge>\n <LeftSectionTitle>\n <Title tx={'intro.title.filter'} />\n <ActionButton iconType=\"leftDrop\" onClick={handler.toggle} />\n </LeftSectionTitle>\n <FeedFilter />\n </LeftSectionLarge>\n )}\n {isOpen && (\n <LeftSectionSmall>\n <LeftSectionTitle>\n <Title tx={'intro.title.filter'} />\n <ActionButton iconType=\"leftDrop\" onClick={handler.toggle} />\n </LeftSectionTitle>\n <FeedFilter />\n </LeftSectionSmall>\n )}\n <div>\n <TitleBar id={id}>\n <TitleButtons>\n <HStack>\n {!isOpen && (\n <ActionButton\n onClick={handler.toggle}\n iconType={'filter'}\n tx=\"nav.filters\"\n />\n )}\n <Title tx=\"nav.feed\" />\n <Icon\n icon={'info'}\n onClick={showModalTooltip}\n color={'primary'}\n />\n </HStack>\n </TitleButtons>\n {!isFlexWrapped ? (\n <ActionButton\n iconType={'add'}\n primary\n onClick={handleAddPost}\n tx={'org.add.feed'}\n />\n ) : (\n <ActionButton iconType={'add'} primary onClick={handleAddPost} />\n )}\n </TitleBar>\n <FeedList />\n </div>\n </SectionGrid>\n );\n};\n\nexport default OrganizationFeed;\n","import { useEventInfoHandlers } from '../../EventInfo/hooks/useEventInfoHandlers';\n\nimport { useModal } from '@/hooks/useModal';\n\nexport const useMarkerClick = () => {\n const { openModal } = useModal();\n\n const {\n handleRedirectToEventInfo,\n handleRedirectToLeader,\n handleRedirectToMap,\n handleRedirectToOrg,\n } = useEventInfoHandlers();\n\n const handleMarkerClick = (id: string) => {\n openModal({\n withCloseButton: false,\n centered: true,\n size: 'auto',\n padding: 0,\n type: 'calModal',\n values: {\n id,\n navigation: handleRedirectToEventInfo,\n handleRedirectToLeader,\n handleRedirectToOrg,\n handleRedirectToMap,\n },\n });\n };\n return { handleMarkerClick };\n};\n","import React from 'react';\n\nimport { ViewMapProps } from '../types/types';\n\nimport { SectionGrid, BackButton, HStack, TitleBar, Title } from '@/components';\nimport withRouter from '@/navigation/withRouter';\nimport SimpleMap from '@/common/Maps/SimpleMap';\nimport { useMarkerClick } from '@/features/event/screens/Events/hooks/useMarkerClick';\n\nconst ViewMap: React.FC<ViewMapProps> = ({ state }) => {\n const { handleMarkerClick } = useMarkerClick();\n\n const event = state?.event;\n\n return event ? (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title text={event.name} />\n </HStack>\n </TitleBar>\n <SimpleMap\n onMarkerClick={handleMarkerClick}\n size={{ width: '100%', height: '75vh' }}\n data={[event]}\n />\n </SectionGrid>\n ) : (\n <Title tx=\"error\" />\n );\n};\n\nexport default withRouter(ViewMap);\n","import { QRCode } from 'react-qrcode-logo';\nimport styled, { useTheme } from 'styled-components';\nimport { useEffect, useRef, useState } from 'react';\nimport { useTranslate } from '@aclito/shared/hooks/useTranslate';\nimport { Organization } from '@aclito/entities';\n\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { QueryOrganizationPoster } from '@/util/types';\nimport { ActionButton, HStack, OrgAvatar, VStack } from '@/components';\nimport { AclitoLogoWhite, PosterTexture } from '@/images';\nimport withRouter from '@/navigation/withRouter';\nimport { useWebShare } from '@/hooks/useWebShare';\nimport './Poster.css';\n\ntype OrganizationPosterProps = TypedLocation<void, QueryOrganizationPoster>;\n\nconst PX_TO_MM = 0.2645833333;\nconst MM_TO_PX = 3.7795275591;\n\nconst OrganizationPoster: React.FC<OrganizationPosterProps> = ({ query }) => {\n const theme = useTheme();\n const t = useTranslate();\n const qrRef = useRef<QRCode>(null);\n\n const refTop = useRef<HTMLDivElement>(null);\n const refBottom = useRef<HTMLDivElement>(null);\n\n const [qrSize, setQrSize] = useState(0);\n const [whiteBoxSize, setWhiteBoxSize] = useState(0);\n\n const { getUrl } = useWebShare();\n\n // NOTE: Design is 72 DPI, Print is 300 DPI\n // All on-screen values are set to 300 DPI for correct printing conditions, but are displayed scaled down using the \"zoom\" function\n\n useEffect(() => {\n const calculateSizes = () => {\n const topHeight = refTop.current?.clientHeight || 0;\n const bottomHeight = refBottom.current?.clientHeight || 0;\n\n const qrSizeCalculated =\n MM_TO_PX *\n (_pixelsToMmNumber(842) -\n PX_TO_MM * topHeight -\n PX_TO_MM * bottomHeight -\n _pixelsToMmNumber(160) -\n _pixelsToMmNumber(148));\n\n const whiteBoxSizeCalculated =\n _pixelsToMmNumber(842) -\n _pixelsToMmNumber(80) -\n PX_TO_MM * topHeight -\n (PX_TO_MM * qrSizeCalculated) / 2 -\n _pixelsToMmNumber(48) -\n _pixelsToMmNumber(50);\n\n setQrSize(qrSizeCalculated);\n setWhiteBoxSize(whiteBoxSizeCalculated);\n };\n\n const resizeObserver = new ResizeObserver(() => {\n calculateSizes();\n });\n\n if (refTop.current) resizeObserver.observe(refTop.current);\n if (refBottom.current) resizeObserver.observe(refBottom.current);\n\n calculateSizes();\n\n return () => resizeObserver.disconnect();\n }, []);\n\n return (\n <Box>\n <Poster align=\"center\" spacing={0} pixelsToMmString={_pixelsToMmString}>\n <Texture pixelsToMmString={_pixelsToMmString} />\n <div ref={refTop}>\n <VStack align=\"center\" spacing={_pixelsToMmString(16)}>\n <HStack noWrap spacing={_pixelsToMmString(4)}>\n <AclitoLogoWhite\n style={{ height: _pixelsToMmString(32), width: '100%' }}\n />\n <Aclito pixelsToMmString={_pixelsToMmString}>Aclito</Aclito>\n </HStack>\n\n <VStack spacing={_pixelsToMmString(4)}>\n <HStack\n spacing={0}\n style={{ justifyContent: 'center', padding: '0 20px' }}\n >\n <Title pixelsToMmString={_pixelsToMmString}>\n {t('qr.posterPrint.title')}\n <TitleYellow pixelsToMmString={_pixelsToMmString}>\n {t('qr.posterPrint.titleYellow')}\n </TitleYellow>\n \n \n \n \n \n \n \n \n \n
\n \n {query && }\n\n \n \n {query?.name}\n \n \n {t('qr.posterPrint.text')}\n \n \n \n
\n \n window.print()}\n color={theme.primary10}\n />\n \n );\n};\n\nconst _pixelsToMmNumber = (pixels: number, dpi = 72) => (pixels * 25.4) / dpi;\nconst _pixelsToMmString = (pixels: number, dpi = 72): string =>\n `${_pixelsToMmNumber(pixels, dpi)}mm`;\n\nconst Box = styled(VStack)`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 48px;\n\n @media print {\n padding: 0;\n }\n`;\n\nconst Poster = styled(VStack)<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n position: relative;\n background-color: ${({ theme }) => theme.primary} !important;\n width: 210mm;\n height: 297mm;\n padding: ${({ pixelsToMmString }) => pixelsToMmString(80)} 0;\n overflow: hidden;\n zoom: 75%;\n\n @media print {\n zoom: 100%;\n }\n`;\n\nconst Texture = styled(PosterTexture)<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n position: absolute;\n top: ${({ pixelsToMmString }) => pixelsToMmString(-80)};\n left: ${({ pixelsToMmString }) => pixelsToMmString(-40)};\n width: 170%;\n height: 170%;\n z-index: 0;\n opacity: 10%;\n`;\n\nconst WhiteBox = styled.div<{\n height: number;\n pixelsToMmString: (pixels: number) => string;\n}>`\n position: absolute;\n background-color: white;\n width: 210mm;\n height: ${({ height }) => height}mm;\n bottom: 0px;\n`;\n\nconst QRBox = styled.div<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n display: flex;\n overflow: hidden;\n\n margin: 0 ${({ pixelsToMmString }) => pixelsToMmString(80)};\n margin-top: ${({ pixelsToMmString }) => pixelsToMmString(48)};\n border: ${({ pixelsToMmString }) => pixelsToMmString(10)} solid white;\n border-radius: ${({ pixelsToMmString }) => pixelsToMmString(20)};\n padding: ${({ pixelsToMmString }) => pixelsToMmString(24)};\n --s: ${({ pixelsToMmString }) => pixelsToMmString(100)};\n\n mask: conic-gradient(at var(--s) var(--s), #0000 75%, #000 0) 0 0 /\n calc(100% - var(--s)) calc(100% - var(--s)),\n linear-gradient(#000 0 0) content-box;\n`;\n\nconst Title = styled.span<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: ${({ theme }) => theme.whiteText};\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(64)};\n line-height: ${({ pixelsToMmString }) => pixelsToMmString(72)};\n font-style: italic;\n font-weight: 900;\n text-transform: uppercase;\n z-index: 9999;\n`;\n\nconst TitleYellow = styled.span<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: ${({ theme }) => theme.yellow};\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(64)};\n line-height: ${({ pixelsToMmString }) => pixelsToMmString(72)};\n font-style: italic;\n font-weight: 900;\n text-transform: uppercase;\n z-index: 9999;\n`;\n\n/*\nconst Subtitle = styled.div<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: ${({ theme }) => theme.whiteText};\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(32)};\n line-height: ${({ pixelsToMmString }) => pixelsToMmString(48)};\n font-style: normal;\n font-weight: 700;\n z-index: 9999;\n`;\n*/\n\nconst Aclito = styled.div<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: ${({ theme }) => theme.whiteText};\n font-family: Acme;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(24)};\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n text-transform: uppercase;\n`;\n\nconst OrganizationInfo = styled(HStack)<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n padding: 0 ${({ pixelsToMmString }) => pixelsToMmString(80)};\n`;\n\nconst OrgTitle = styled.div<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: #333333;\n font-family: 'Poppins', sans-serif;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(20)};\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n`;\n\nconst OrgDescription = styled.div<{\n pixelsToMmString: (pixels: number) => string;\n}>`\n color: #333333;\n font-family: 'Poppins', sans-serif;\n font-size: ${({ pixelsToMmString }) => pixelsToMmString(14)};\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n`;\n\nconst PrintButton = styled(ActionButton)`\n @media print {\n display: none;\n }\n`;\n\nexport default withRouter(OrganizationPoster);\n","import { Center, Divider, Loader } from '@mantine/core';\nimport { useListPastEventsQuery } from '@aclito/shared/redux/api/feedbackApi';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\nimport { useNavigate } from 'react-router-dom';\n\nimport {\n BackButton,\n HStack,\n SectionGrid,\n Title,\n TitleBar,\n VStack,\n InlineTooltip,\n EmptyList,\n} from '@/components';\nimport EventsCards from '@/components/Cards/EventsCards';\nimport { ROUTE_FEEDBACK } from '@/util/constants';\n\nfunction Feedback() {\n const { data, isLoading, isUninitialized, isSuccess } =\n useListPastEventsQuery(undefined);\n\n const nav = useNavigate();\n\n const events = dateSort(formatEvents(data ?? []), 'date', 'asc');\n\n return (\n \n \n \n \n \n </HStack>\n </TitleBar>\n\n {\n <VStack>\n <InlineTooltip\n txTitle={'tooltip.feedbackmatters.title'}\n txBody={'feedback.info'}\n />\n <Divider />\n {!isUninitialized && isSuccess && !events.length && (\n <EmptyList iconType={'feedback'} tx=\"flashlist.no.pastevents\" />\n )}\n {isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <EventsCards\n {...{\n onClick: (event) => nav(ROUTE_FEEDBACK + `/${event.id}`),\n data: events,\n showDateType: 'day',\n }}\n />\n )}\n </VStack>\n }\n </SectionGrid>\n );\n}\n\nexport default Feedback;\n","import {\n useEmitEmojiBatchFeedbackEventMutation,\n useEmitFeedbackEventMutation,\n useFinishEventMutation,\n} from '@aclito/shared/redux/api/feedbackApi';\nimport { EmojisKey } from '@aclito/shared/types';\nimport { FeedbackType } from '@aclito/enums';\nimport { closeAllModals } from '@mantine/modals';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useFeedbackHandlers = (eventId: string) => {\n const { openModal, openConfirmModal } = useModal();\n const nav = useNavigate();\n\n const handleFinish = () => {\n openConfirmModal({\n confirmProps: { color: 'primary', w: 100 },\n txTitle: 'nav.feedback',\n type: 'feedbackFinish',\n closeOnConfirm: true,\n txLabels: { confirm: 'yes', cancel: 'close' },\n onConfirm: async () => {\n await finishEvent(eventId);\n nav(-1);\n },\n });\n };\n\n const handleCommentClick = (\n userOrAliasId: string,\n name: string,\n text: string | undefined,\n isReviewHidden: boolean,\n ) => {\n openModal({\n type: 'feedbackComment',\n title: name,\n values: {\n text,\n isReviewHidden,\n onConfirm: async (res) => {\n closeAllModals();\n await emitFeedback({\n type: FeedbackType.REVIEW,\n eventId,\n text: res,\n userOrAliasId,\n });\n },\n },\n });\n };\n\n const handleKarmaClick = (\n userOrAliasId: string,\n name: string,\n karmaProvided: boolean,\n ) => {\n openModal({\n type: 'feedbackKarma',\n title: name,\n values: {\n karmaProvided,\n onConfirm: async () => {\n closeAllModals();\n await emitFeedback({\n type: FeedbackType.KARMA,\n eventId,\n userOrAliasId,\n });\n },\n },\n });\n };\n\n const handleEmojiSubmit = async (\n userOrAliasId: string,\n emoji: EmojisKey | null,\n ) => {\n openModal({\n type: 'feedbackEmoji',\n values: {\n emoji,\n onConfirm: async (e) => {\n closeAllModals();\n await emitFeedback({\n type: FeedbackType.EMOJI,\n emoji: e,\n eventId,\n userOrAliasId,\n });\n },\n },\n });\n };\n\n const handleBatchEmojiSubmit = async (emoji: EmojisKey | null) => {\n openModal({\n type: 'feedbackEmoji',\n values: {\n emoji,\n onConfirm: async (e) => {\n closeAllModals();\n await batchEmitEmoji({ emoji: e, type: FeedbackType.EMOJI, eventId });\n },\n },\n });\n };\n\n const [finishEvent] = useFinishEventMutation();\n const [emitFeedback, { isLoading: isLoadingSingle }] =\n useEmitFeedbackEventMutation();\n const [batchEmitEmoji, { isLoading: isLoadingBatch }] =\n useEmitEmojiBatchFeedbackEventMutation();\n\n return {\n handleFinish,\n handleEmojiSubmit,\n handleCommentClick,\n handleKarmaClick,\n handleBatchEmojiSubmit,\n isLoading: isLoadingSingle || isLoadingBatch,\n };\n};\n","import { FeedbackType } from '@aclito/enums';\nimport { FeedbackEvent } from '@aclito/entities';\n\nimport { EmojisKey, UserInfoWithAlias } from '../../../types';\n\nexport const useGetRatings = (\n player: UserInfoWithAlias,\n ratings: FeedbackEvent[],\n) => {\n const playerId = player.aliasId ? player.aliasId : player.id;\n\n const userRatings = ratings.filter((r) => r.toUserId === playerId);\n\n const emoji = userRatings.find((r) => r.eventType === FeedbackType.EMOJI)\n ?.data as EmojisKey | undefined;\n\n const comment = userRatings.find(\n (r) => r.eventType === FeedbackType.REVIEW,\n )?.data;\n\n const karma = userRatings.find((r) => r.eventType === FeedbackType.KARMA);\n\n return { karma, comment, emoji, playerId };\n};\n","import React from 'react';\nimport { EmojisKey, UserInfoWithAlias } from '@aclito/shared/types';\nimport {\n isUserOrganizer,\n isUserTrainer,\n} from '@aclito/shared/features/event/utils/getEventRole';\nimport { EventRaw, FeedbackEvent } from '@aclito/entities';\nimport { useGetRatings } from '@aclito/shared/features/feedback/hooks/useGetRatings';\nimport styled, { useTheme } from 'styled-components';\nimport { config } from '@aclito/shared/config';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport {\n IconHolder,\n PlainCard,\n HStack,\n VStack,\n Icon,\n Avatar,\n Text,\n CardStatusBannerText,\n} from '@/components';\nimport { ROUTE_USER_PROFILE } from '@/util/constants';\n\ninterface FeedbackEventsCardProps {\n data: UserInfoWithAlias[];\n event: EventRaw;\n ratings: FeedbackEvent[];\n onCommentClick: (\n id: string,\n name: string,\n text: string | undefined,\n isReviewHidden: boolean,\n ) => void;\n onKarmaClick: (id: string, name: string, karma: boolean) => void;\n onEmojiClickSubmit: (id: string, emoji: EmojisKey | null) => void;\n}\ninterface FeedbackCardProps {\n player: UserInfoWithAlias;\n event: EventRaw;\n onCommentClick: (\n id: string,\n name: string,\n text: string | undefined,\n isReviewHidden: boolean,\n ) => void;\n onKarmaClick: (id: string, name: string, karma: boolean) => void;\n onEmojiClickSubmit: (id: string, emoji: EmojisKey | null) => void;\n ratings: FeedbackEvent[];\n}\n\nconst FeedbackCards: React.FC<FeedbackEventsCardProps> = ({\n data,\n event,\n ratings,\n onEmojiClickSubmit,\n onKarmaClick,\n onCommentClick,\n}) => (\n <>\n {data.map((player) => (\n <FeedbackCard\n key={player.id + player.aliasId}\n player={player}\n event={event}\n ratings={ratings}\n onEmojiClickSubmit={onEmojiClickSubmit}\n onCommentClick={onCommentClick}\n onKarmaClick={onKarmaClick}\n />\n ))}\n </>\n);\n\nconst FeedbackCard: React.FC<FeedbackCardProps> = ({\n player,\n event,\n ratings,\n onEmojiClickSubmit,\n onKarmaClick,\n onCommentClick,\n}) => {\n const nav = useNavigate();\n const theme = useTheme();\n const navigate = () => {\n nav(ROUTE_USER_PROFILE, { state: { userId: player.id } });\n };\n\n const { emoji, comment, karma, playerId } = useGetRatings(player, ratings);\n\n const isOrganizer = isUserOrganizer(player, event);\n const isTrainer = isUserTrainer(player, event);\n const canRemoveKarma = !(isOrganizer || isTrainer);\n\n return (\n <PlainCard\n color={comment || emoji || !!karma ? theme.primary10 : theme.white}\n data-testid={`${player.name} ${player.surname}`}\n onClick={navigate}\n >\n <HStack>\n <Avatar size={48} image={player.image} />\n <VStack spacing={8}>\n <Text weight={700}>{`${player.name} ${player.surname}`}</Text>\n {isUserOrganizer(player, event) && (\n <CardStatusBannerText type={'eventOrganizer'} />\n )}\n {isUserTrainer(player, event) && (\n <CardStatusBannerText type={'eventTrainer'} />\n )}\n {player.aliasId && <CardStatusBannerText type={'alias'} />}\n </VStack>\n <IconHolder spacing={24} style={{ cursor: 'pointer' }}>\n {canRemoveKarma && (\n <StyledIcon\n color={'red'}\n icon={karma ? 'karmaProvided' : 'karmaRemove'}\n data-testid=\"karma\"\n size=\"24\"\n onClick={(e) => {\n e.stopPropagation();\n onKarmaClick(\n playerId,\n `${player.name} ${player.surname}`,\n !!karma,\n );\n }}\n />\n )}\n <StyledIcon\n size={24}\n onClick={(e) => {\n e.stopPropagation();\n onCommentClick(\n playerId,\n `${player.name} ${player.surname}`,\n comment,\n player.settings.hideReviews,\n );\n }}\n icon={comment ? 'commentCheck' : 'commentAdd'}\n data-testid=\"comment\"\n />\n {emoji ? (\n <StyledText\n onClick={(e: any) => {\n e.stopPropagation();\n onEmojiClickSubmit(playerId, emoji);\n }}\n size={'xl'}\n >\n {config.emojis[emoji].item}\n </StyledText>\n ) : (\n <StyledIcon\n onClick={(e) => {\n e.stopPropagation();\n onEmojiClickSubmit(playerId, emoji ?? null);\n }}\n icon=\"emoji\"\n data-testid=\"emoji\"\n size={'24'}\n />\n )}\n </IconHolder>\n </HStack>\n </PlainCard>\n );\n};\n\nconst StyledIcon = styled(Icon)`\n transition: transform 150ms ease-in-out;\n &:hover {\n transform: scale(1.3);\n }\n`;\nconst StyledText = styled(Text)`\n transition: transform 150ms ease-in-out;\n &:hover {\n transform: scale(1.3);\n }\n` as any;\n\nexport default FeedbackCards;\n","import { useParams } from 'react-router-dom';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { HStack } from '@aclito/ui-web/components/Layout';\nimport { ActionButton, BackButton } from '@aclito/ui-web/components/Button';\nimport { Title } from '@aclito/ui-web/components/Title';\nimport { useFeedbackEvent } from '@aclito/shared/redux/api/feedbackApi';\nimport { formatEventDuration } from '@aclito/shared/features/event/utils/formatEventDuration';\nimport { Center, Loader } from '@mantine/core';\nimport { FeedbackType } from '@aclito/enums';\nimport { EmojisKey } from '@aclito/shared/types';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport { useFeedbackHandlers } from './hooks/useFeedbackHandlers';\n\nimport InfoBuilder from '@/features/event/screens/EventInfo/components/InfoBuilder';\nimport { SectionGrid, VStack, Text, Icon } from '@/components';\nimport FeedbackCards from '@/components/Cards/FeedbackCards';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_EVENT_INFO } from '@/util/constants';\n\nconst FeedbackInfo = () => {\n const { eventId } = useParams();\n const nav = useNavigate();\n const { model, ratings } = useFeedbackEvent(eventId);\n const [showModalTooltip] = useShowTooltipModal('feedbackTooltip');\n\n const {\n handleFinish,\n handleEmojiSubmit,\n handleCommentClick,\n handleKarmaClick,\n isLoading,\n handleBatchEmojiSubmit,\n } = useFeedbackHandlers(eventId ?? '');\n\n const players = model?.event?.playersInfo ?? [];\n\n const emojiRatings = ratings.filter(\n (r) => r.eventType === FeedbackType.EMOJI,\n );\n const currentEmoji = emojiRatings.every(\n (r) => r?.data === emojiRatings[0]?.data,\n )\n ? players.length === emojiRatings.length\n ? (emojiRatings[0]?.data as EmojisKey)\n : undefined\n : undefined;\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx={'nav.feedback'} />\n <Icon onClick={showModalTooltip} icon={'info'} color={'primary'} />\n </HStack>\n {model && (\n <ActionButton\n onClick={handleFinish}\n tx={'finish'}\n iconType={'checkmark'}\n />\n )}\n </TitleBar>\n\n {model ? (\n <VStack>\n <Text\n size={30}\n weight={'700'}\n style={{\n padding: '0 8px',\n }}\n >\n {model.event.name}\n </Text>\n <div>\n <InfoBuilder\n data={[\n {\n text: {\n text: `${model.event.formattedDate} ${model.event.formattedTime}`,\n },\n icon: 'calendar',\n label: 'events.info.date',\n onPress: eventId\n ? () => nav(ROUTE_EVENT_INFO, { state: { id: eventId } })\n : undefined,\n },\n {\n text: { text: `${formatEventDuration(model.event)}` },\n icon: 'time',\n label: 'events.info.duration',\n },\n {\n text: {\n text: model.event.place?.name || '',\n },\n icon: 'map',\n label: 'events.info.place',\n divider: false,\n },\n ]}\n />\n </div>\n\n {players.length > 1 && (\n <ActionButton\n tx={'feedback.all'}\n maw={300}\n primary\n isLoading={isLoading}\n iconType={isLoading ? undefined : 'emoji'}\n onClick={() => handleBatchEmojiSubmit(currentEmoji ?? null)}\n />\n )}\n\n <VStack>\n <FeedbackCards\n event={model.event}\n onKarmaClick={handleKarmaClick}\n onCommentClick={handleCommentClick}\n onEmojiClickSubmit={handleEmojiSubmit}\n data={players}\n ratings={ratings}\n />\n </VStack>\n </VStack>\n ) : (\n <Center>\n <Loader />\n </Center>\n )}\n </SectionGrid>\n );\n};\n\nexport default FeedbackInfo;\n","import { useGetUserStatsQuery } from '@aclito/shared/redux/api/userApi';\nimport { createSearchParams, useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { Center } from '@mantine/core';\nimport { calculateStreak } from '@aclito/shared/util/calculateStreak';\nimport { extractId } from '@aclito/shared/util/alias';\n\nimport {\n Avatar,\n BackButton,\n HStack,\n SectionGrid,\n SectionTitle,\n Text,\n Title,\n TitleBar,\n VStack,\n Karma,\n Streak,\n} from '@/components';\nimport { TypedLocation } from '@/hooks/useLocation';\nimport { StateAliasInfo } from '@/util/types';\nimport withRouter from '@/navigation/withRouter';\nimport Stats from '@/common/Profile/Stats';\nimport Reviews from '@/common/Profile/Reviews';\nimport Achievements from '@/features/goals/Achievements';\nimport { ROUTE_GOALS } from '@/util/constants';\n\ntype AliasInfoProps = TypedLocation<StateAliasInfo>;\nconst AliasInfo = (props: AliasInfoProps) => {\n const alias = props.state?.alias;\n const aliasId = alias?.id ?? '';\n const settings = props.state?.settings;\n const userId = extractId(aliasId);\n\n const { data: stats } = useGetUserStatsQuery({ id: aliasId });\n\n const nav = useNavigate();\n\n if (!alias) return null;\n\n const handleNavigationToGoals = (id: string) => {\n nav({\n pathname: ROUTE_GOALS + `/${id}`,\n search: createSearchParams({ aliasId: alias.id }).toString(),\n });\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"alias\" />\n </HStack>\n </TitleBar>\n <VStack spacing={16}>\n <GroupedContent>\n <Avatar image={alias.image} size={64} />\n <VStack spacing={4}>\n <Text text={`${alias.name} ${alias.surname}`} />\n {stats && <Karma points={stats.karma.value} />}\n </VStack>\n </GroupedContent>\n\n {stats && (\n <Center style={{ paddingBottom: 16 }}>\n <Stats emojis={stats?.emoji ?? {}} />\n </Center>\n )}\n </VStack>\n\n {stats && (\n <HStack style={{ paddingBottom: 16 }}>\n <Streak streak={calculateStreak(stats)} />\n </HStack>\n )}\n\n <VStack>\n <SectionTitle\n onClick={() => handleNavigationToGoals(userId)}\n buttonLabelTx=\"tabs.achievements\"\n />\n <Achievements preview aliasId={alias.id} id={userId} />\n <Reviews id={alias.id} isReviewHidden={!!settings?.hideReviews} />\n </VStack>\n </SectionGrid>\n );\n};\nconst GroupedContent = styled(HStack)`\n width: 100%;\n @media ${deviceMax.mobileS} {\n flex-direction: column;\n }\n`;\n\nexport default withRouter(AliasInfo);\n","import { Text } from '@aclito/ui-web/components/Text';\nimport { Container } from '@aclito/ui-web/components/Layout';\nimport { Center } from '@mantine/core';\n\nconst Status = () => {\n return (\n <Center style={{ height: '100%' }}>\n <Container style={{ height: '100%' }}>\n <Text tx={'maintenance'} />\n </Container>\n </Center>\n );\n};\n\nexport default Status;\n","import { PaymentWithProduct } from '@aclito/entities';\n\nimport {\n useCancelPaymentMutation,\n useGetCreditQuery,\n useGetPaymentLogQuery,\n useGetPaymentsQuery,\n} from '../../../redux/api/paymentApi';\nimport { dateSort } from '../../../util/sorter';\nimport { ProductFinishMap } from '../../../types';\n\nexport const useUserPayments = () => {\n const { data: logs, ...restLogs } = useGetPaymentLogQuery();\n const { data: credit } = useGetCreditQuery();\n const { data: payments, ...restPayments } = useGetPaymentsQuery();\n const [cancelPayment, { isLoading: isCancelling }] =\n useCancelPaymentMutation();\n\n const userPayments = payments ?? [];\n const userLogs = logs ?? [];\n\n const sortedLogs = dateSort(userLogs, 'createdAt', 'desc');\n const sortedPayments = dateSort(userPayments, 'updatedAt', 'desc');\n\n const createKart = (payment: PaymentWithProduct) => {\n const kart: ProductFinishMap = new Map();\n kart.set(payment.product.id, {\n ...payment.product,\n amount: 1,\n eventId: payment.eventId,\n });\n return kart;\n };\n\n return {\n sortedLogs,\n sortedPayments,\n cancelPayment,\n isCancelling,\n payments,\n credit,\n logs,\n restLogs,\n restPayments,\n createKart,\n };\n};\n","import { PaymentLog } from '@aclito/entities';\nimport { BasicCard } from '@aclito/ui-web/components/CardStyles';\nimport { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { useTheme } from 'styled-components';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport { actionMappings } from '@aclito/shared/util/cardColorPicker';\n\ntype PaymentLogCardProps = {\n paymentLog: PaymentLog;\n};\n\nconst PaymentLogCard: React.FC<PaymentLogCardProps> = ({ paymentLog }) => {\n const theme = useTheme();\n\n const { color, colorIcon, colorIcon2, icon, icon2 } =\n actionMappings[paymentLog.action];\n const t = useTranslate();\n const tDate = useTranslateDate();\n\n return (\n <BasicCard color={theme[color ?? 'white']} style={{ padding: 8 }}>\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack spacing={4}>\n <Text color={theme.grey80} weight={'bold'} size={'md'}>\n {tDate(paymentLog.createdAt, 'date.short')}\n </Text>\n <Text color={theme.grey50} size={'xs'}>\n {t('payments.creditavailable')}: {paymentLog.creditAvailable}{' '}\n <span style={{ fontStyle: 'italic' }}>\n {t(`currency.${paymentLog.currency}`)}\n </span>\n </Text>\n <Text color={theme.grey50} size={'xs'}>\n {t('payments.amountprocessed')}: {paymentLog.amount}{' '}\n <span style={{ fontStyle: 'italic' }}>\n {t(`currency.${paymentLog.currency}`)}\n </span>\n </Text>\n </VStack>\n <HStack style={{ justifyContent: 'space-between' }}>\n <HStack spacing={4} style={{ alignItems: 'center' }}>\n <>\n {icon && <Icon icon={icon} color={colorIcon} />}\n {icon2 && <Icon size={16} icon={icon2} color={colorIcon2} />}\n </>\n </HStack>\n </HStack>\n </HStack>\n </BasicCard>\n );\n};\n\nexport default PaymentLogCard;\n","import {\n Payment,\n PaymentWithProduct,\n Product,\n UserAlias,\n} from '@aclito/entities';\nimport styled, { useTheme } from 'styled-components';\nimport React from 'react';\nimport {\n useAppSelector,\n useTranslate,\n useTranslateDate,\n} from '@aclito/shared/hooks';\nimport { statusMappings } from '@aclito/shared/util/cardColorPicker';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { NONE } from '@aclito/shared/util/constants';\n\nimport {\n ActionButton,\n BasicCard,\n HStack,\n Icon,\n Text,\n VStack,\n CardStatusBannerText,\n} from '@/components';\n\ntype PaymentCardProps = {\n payment: Payment;\n product: Product;\n onCancel?: (payment: Payment) => void;\n onClick?: (payment: PaymentWithProduct) => void;\n disabledButtons?: boolean;\n aliases: UserAlias[];\n};\n\nconst PaymentCard: React.FC<PaymentCardProps> = ({\n payment,\n product,\n onCancel,\n onClick,\n disabledButtons,\n aliases,\n}) => {\n const theme = useTheme();\n const t = useTranslate();\n const tDate = useTranslateDate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const { color, type } = statusMappings[payment.status];\n const userFound =\n payment.aliasId !== NONE\n ? aliases.find((alias) => alias.id === payment.aliasId) ?? null\n : userInfo;\n\n return (\n <StyledPlainCard\n onClick={() => {\n if (onClick && product) {\n onClick({ ...payment, product });\n }\n }}\n $isClickable={!!onClick}\n color={theme[color]}\n style={{ padding: 12, flex: 1 }}\n >\n <HStack style={{ justifyContent: 'space-between' }}>\n <VStack style={{ flex: 1 }} spacing={6}>\n <HStack style={{ justifyContent: 'space-between' }}>\n <HStack spacing={8}>\n <Text color={theme.grey80} size={'lg'} weight={'bold'}>\n {product.title}\n </Text>\n <CardStatusBannerText type={type} />\n </HStack>\n </HStack>\n\n <VStack spacing={2}>\n {userFound && (\n <Text color={theme.grey40} size={'xs'}>\n {`${userFound.name} ${userFound.surname}`}\n </Text>\n )}\n <Text color={theme.grey40} size={'xs'}>\n {tDate(payment.createdAt, 'date.full')}\n </Text>\n </VStack>\n </VStack>\n <HStack>\n <HStack style={{ alignItems: 'center' }} spacing={8}>\n {payment.multisport && (\n <Icon icon={'multisport'} size={'16'} color={'grey50'} />\n )}\n <Text>\n <b>{payment.amount}</b>{' '}\n <span>{t(`currency.${payment.currency}`)}</span>\n </Text>\n </HStack>\n\n {onCancel && (\n <>\n <ActionButton\n onClick={(e) => {\n e.stopPropagation();\n onCancel(payment);\n }}\n textcolor={disabledButtons ? 'grey50' : 'red'}\n bg={'transparent'}\n disabled={disabledButtons}\n iconType={'close'}\n />\n </>\n )}\n </HStack>\n </HStack>\n </StyledPlainCard>\n );\n};\n\nconst StyledPlainCard = styled(BasicCard)<{ $isClickable: boolean }>`\n transition: transform 250ms ease-in-out;\n &:hover {\n ${(props) =>\n props.$isClickable &&\n `\n cursor: pointer;\n transform: scale(0.98);\n `}\n }\n`;\n\nexport default PaymentCard;\n","import { useNavigate } from 'react-router-dom';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport { TitleBar } from '@aclito/ui-web/components/TitleBar';\nimport { Title } from '@aclito/ui-web/components/Title';\nimport { Center, Divider, Loader } from '@mantine/core';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { HStack } from '@aclito/ui-web/components/Layout';\nimport { Payment, PaymentWithProduct } from '@aclito/entities';\nimport { useTheme } from 'styled-components';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useState } from 'react';\nimport { useUserPayments } from '@aclito/shared/features/payments/hooks/useUserPayments';\n\nimport {\n ActionButton,\n BackButton,\n BasicCard,\n EmptyList,\n InlineTooltip,\n SectionGrid,\n Tab,\n Tabs,\n} from '@/components';\nimport PaymentLogCard from '@/components/Cards/PaymentLogCard';\nimport PaymentCard from '@/components/Cards/PaymentCard';\nimport { useModal } from '@/hooks/useModal';\nimport { ROUTE_PRODUCTS_RECHARGE } from '@/util/constants';\n\nconst UserPayments = () => {\n const {\n sortedLogs,\n sortedPayments,\n cancelPayment,\n isCancelling,\n credit,\n restLogs,\n restPayments,\n createKart,\n } = useUserPayments();\n\n const [tabIndex, setTabIndex] = useState({\n index: '0',\n });\n\n const theme = useTheme();\n const t = useTranslate();\n const nav = useNavigate();\n const { openConfirmModal } = useModal();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const onPay = (payment: PaymentWithProduct) => {\n const kart = createKart(payment);\n\n nav(`/products/finish`, {\n state: {\n kart,\n retry: payment.id,\n },\n });\n };\n\n const navigateToTopUp = () => {\n nav(ROUTE_PRODUCTS_RECHARGE);\n };\n\n const onCancel = async (payment: Payment) => {\n openConfirmModal({\n type: 'cancelPayment',\n confirmProps: { color: 'red' },\n closeOnConfirm: true,\n txTitle: 'payments.mypayments',\n txLabels: { confirm: 'submit', cancel: 'close' },\n onConfirm: async () => await cancelPayment(payment.id),\n });\n };\n\n const handleTabIndexChange = (index: string) => {\n setTabIndex({\n index,\n });\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <VStack>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"nav.payments\" />\n </HStack>\n <ActionButton\n tx={'product.buy.recharge'}\n onClick={navigateToTopUp}\n iconType={'add'}\n />\n </TitleBar>\n\n {restPayments.isLoading && restLogs.isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <>\n <BasicCard style={{ width: 'fit-content' }}>\n <HStack>\n <HStack spacing={8}>\n <Icon icon={'multisport'} color={'grey50'} />\n <Text size={'lg'} weight={'500'} tx={'payments.credit'} />\n </HStack>\n <Text\n size={'lg'}\n weight={'500'}\n text={\n credit ? `${credit.CZK.credit} ${t('currency.CZK')}` : ''\n }\n />\n </HStack>\n </BasicCard>\n\n <Tabs\n selectedIndex={tabIndex.index}\n setSelectedIndex={handleTabIndexChange}\n >\n <Tab tx=\"payments.mypayments\" />\n <Tab tx=\"payments.paymentlog\" />\n </Tabs>\n\n <>\n {tabIndex.index === '0' && (\n <div>\n <VStack>\n <InlineTooltip\n txTitle={'tooltip.credit'}\n txBody={'payments.payall.info'}\n />\n <Divider />\n\n {!sortedPayments.length && (\n <EmptyList\n tx={'payments.nopaymentsyet'}\n action=\"addPayment\"\n iconType={'payment'}\n />\n )}\n {sortedPayments.some((p) => p.status === 'pending') && (\n <HStack spacing={8}>\n <Icon icon={'pending'} color={'orange'} />\n <Text\n tx={'payments.payall'}\n italic\n color={theme.orange}\n weight={'500'}\n size={'lg'}\n />\n </HStack>\n )}\n\n <VStack spacing={4}>\n {sortedPayments.map((payment) => (\n <PaymentCard\n {...(payment.status === 'pending' && {\n onCancel,\n onClick: onPay,\n disabledButtons: isCancelling,\n })}\n key={payment.id}\n payment={payment}\n aliases={userInfo.aliases}\n product={payment.product}\n />\n ))}\n </VStack>\n </VStack>\n </div>\n )}\n {tabIndex.index === '1' && (\n <>\n <VStack>\n <InlineTooltip\n txTitle={'tooltip.transactions.title'}\n txBody={'tooltip.transactions'}\n />\n\n <Divider />\n {!sortedLogs.length && (\n <EmptyList\n tx={'flatlist.notransactions'}\n iconType={'shopping'}\n />\n )}\n\n <VStack spacing={4}>\n {sortedLogs.map((log) => (\n <PaymentLogCard key={log.id} paymentLog={log} />\n ))}\n </VStack>\n </VStack>\n </>\n )}\n </>\n </>\n )}\n </VStack>\n </SectionGrid>\n );\n};\n\nexport default UserPayments;\n","import { useState } from 'react';\nimport { Product } from '@aclito/entities';\n\nimport { useGetProductsQuery } from '../../../redux/api/paymentApi';\nimport { ProductFinishMap } from '../../../types';\n\nexport const useProductsBuy = (id: string, kart?: ProductFinishMap) => {\n const { data, isLoading, isUninitialized, isSuccess } =\n useGetProductsQuery(id);\n const products =\n data?.filter((p) => p.status === 'active' && p.type === 'subscription') ??\n [];\n\n const [kartItems, setKartItems] = useState<ProductFinishMap>(\n kart || new Map(),\n );\n\n const createKart = (product: Product) => {\n const k: ProductFinishMap = new Map();\n k.set(product.id, {\n ...product,\n amount: 1,\n });\n return k;\n };\n\n const onAdd = (product: Product) => {\n setKartItems((prev) => {\n const amount = prev.get(product.id)?.amount;\n if (!amount) {\n prev.set(product.id, { ...product, amount: 1 });\n } else {\n const newAmount = amount + 1;\n prev.set(product.id, { ...product, amount: newAmount });\n }\n return new Map(prev);\n });\n };\n const onRemove = (product: Product) => {\n setKartItems((prev) => {\n const amount = prev.get(product.id)?.amount;\n if (!amount) {\n return prev;\n } else {\n const newAmount = amount - 1;\n if (newAmount <= 0) {\n prev.delete(product.id);\n } else {\n prev.set(product.id, { ...product, amount: newAmount });\n }\n }\n return new Map(prev);\n });\n };\n\n return {\n kartItems,\n isLoading,\n onAdd,\n onRemove,\n products,\n createKart,\n isQuerySuccess: !isUninitialized && isSuccess,\n };\n};\n","import { BasicCard } from '@aclito/ui-web/components/CardStyles';\nimport { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { Product } from '@aclito/entities';\nimport styled, { useTheme } from 'styled-components';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { ImageValueShape } from '@aclito/shared/types';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { Image } from '@/components';\n\ntype ProductCardType = {\n product: Product;\n onEdit?: (product: Product) => void;\n onClick?: (product: Product) => void;\n onRemove?: (product: Product) => void;\n onAdd?: (product: Product) => void;\n onDiscontinue?: (product: Product) => void;\n onInfo?: (product: Product) => void;\n selected?: boolean;\n};\n\nconst ProductCard = ({\n product,\n onInfo,\n onDiscontinue,\n onEdit,\n onAdd,\n onRemove,\n onClick,\n selected = false,\n}: ProductCardType) => {\n const theme = useTheme();\n const t = useTranslate();\n return (\n <Card\n $isClickable={!!onClick}\n onClick={() => onClick?.(product)}\n color={product.status === 'discontinued' ? theme.grey10 : theme.white}\n style={{ flex: 1, justifyContent: 'flex-start' }}\n >\n <VStack spacing={8} style={{ flex: 1 }}>\n <HStack style={{ justifyContent: 'flex-end' }}>\n {onInfo && (\n <StyledIcon\n onClick={(e) => {\n e.stopPropagation();\n onInfo(product);\n }}\n color={'orange'}\n icon={'info'}\n data-testid=\"product-info\"\n />\n )}\n {onEdit && (\n <StyledIcon\n onClick={(e) => {\n e.stopPropagation();\n onEdit(product);\n }}\n color={'primary'}\n icon={'edit'}\n data-testid=\"product-edit\"\n />\n )}\n {onDiscontinue && (\n <StyledIcon\n onClick={(e) => {\n e.stopPropagation();\n onDiscontinue(product);\n }}\n color={'red'}\n icon={'close'}\n data-testid=\"product-close\"\n />\n )}\n </HStack>\n {product.image?.trim().length ? (\n <Image\n height={150}\n style={{ borderRadius: 10 }}\n image={product.image as ImageValueShape}\n timeStamp={product.updatedAt}\n />\n ) : null}\n <Text size={'xl'} weight={700}>\n {product.title}\n </Text>\n <VStack\n style={{\n flex: 1,\n overflow: 'auto',\n }}\n >\n <Text size={'sm'}>{product.description}</Text>\n </VStack>\n <VStack spacing={4}>\n <Text style={{ alignSelf: 'flex-end' }} weight={'500'} size={'xl'}>\n {product.price} {t(`currency.${product.currency}`)}\n </Text>\n {Number.isInteger(product.priceMultisport) && (\n <HStack\n style={{ alignItems: 'center', alignSelf: 'flex-end' }}\n spacing={4}\n >\n <Icon icon={'multisport'} color={'grey50'} size={'16'} />\n <Text\n color={theme.grey50}\n text={\n product.priceMultisport === 0\n ? t('events.info.forFree')\n : `${product.priceMultisport} ${t(\n `currency.${product.currency}`,\n )}`\n }\n size={'sm'}\n />\n </HStack>\n )}\n </VStack>\n\n {selected && onRemove ? (\n <>\n <ActionButton\n tx={'product.added'}\n fullWidth\n bg={'transparent'}\n onClick={(e) => {\n e.stopPropagation();\n onRemove(product);\n }}\n />\n </>\n ) : (\n <>\n {onAdd && onRemove && (\n <ActionButton\n tx={'product.add'}\n iconType={'shopping'}\n fullWidth\n onClick={(e) => {\n e.stopPropagation();\n onAdd(product);\n }}\n />\n )}\n </>\n )}\n </VStack>\n </Card>\n );\n};\n\nconst Card = styled(BasicCard)<{ $isClickable: boolean }>`\n height: 400px;\n display: flex;\n min-width: 320px;\n max-width: 320px;\n @media (${deviceMax.laptop}) {\n max-width: unset;\n }\n\n transition: transform 150ms ease-in-out;\n &:hover {\n ${(props) =>\n props.$isClickable &&\n `\n cursor: pointer;\n transform: scale(1.02);\n `}\n }\n`;\nconst StyledIcon = styled(Icon)`\n transition: transform 150ms ease-in-out;\n &:hover {\n transform: scale(1.2);\n }\n cursor: pointer;\n`;\n\nexport default ProductCard;\n","import { useLocation, useNavigate, useParams } from 'react-router-dom';\nimport { Center, Divider, Loader } from '@mantine/core';\nimport styled from 'styled-components';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useProductsBuy } from '@aclito/shared/features/payments/hooks/useProductsBuy';\n\nimport {\n ActionButton,\n BackButton,\n EmptyList,\n HStack,\n InlineTooltip,\n SectionGrid,\n Title,\n TitleBar,\n VStack,\n} from '@/components';\nimport ProductCard from '@/components/Cards/ProductCard';\nimport { useModal } from '@/hooks/useModal';\n\nconst ProductsBuy = () => {\n const params = useParams();\n if (!params.id) return null;\n return <ProductsBuyInner id={params.id} />;\n};\n\nconst ProductsBuyInner = ({ id }: { id: string }) => {\n const nav = useNavigate();\n const { openModal } = useModal();\n const state = useLocation().state;\n\n const { products, isLoading, kartItems, onAdd, onRemove } = useProductsBuy(\n id,\n state?.kart,\n );\n\n const navigateToPayment = () => {\n if (kartItems.size) {\n nav(`/products/finish`, { state: { kart: kartItems } });\n }\n };\n return (\n <SectionGrid $isOpen={false}>\n <HStack style={{ alignItems: 'flex-start' }}>\n <div style={{ flex: 1 }}>\n <TitleBar>\n <HStack>\n <BackButton\n onClick={\n kartItems.size > 0\n ? () => openModal({ type: 'productLeavePage' })\n : undefined\n }\n />\n <Title tx=\"payments.products\" />\n </HStack>\n\n <ActionButton\n badge={kartItems.size}\n onClick={navigateToPayment}\n iconType={'shopping'}\n data-testid=\"BucketIcon\"\n />\n </TitleBar>\n\n <VStack>\n <InlineTooltip\n txTitle={'tooltip.product.buy.title'}\n txBody={'tooltip.product.buy'}\n />\n <Divider />\n {isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <>\n {products?.length ? (\n <GridContainer>\n {dateSort(products ?? [], 'createdAt', 'desc')?.map(\n (product) => (\n <ProductCard\n selected={!!kartItems.get(product.id)}\n onAdd={onAdd}\n onRemove={onRemove}\n key={product.id}\n product={product}\n />\n ),\n )}\n </GridContainer>\n ) : (\n <EmptyList iconType={'shopping'} tx={'payments.noproducts'} />\n )}\n </>\n )}\n </VStack>\n </div>\n </HStack>\n </SectionGrid>\n );\n};\n\nconst GridContainer = styled.div`\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n gap: 16px;\n @media (${deviceMax.tablet}) {\n flex-direction: column;\n }\n`;\n\nexport default ProductsBuy;\n","import { z } from 'zod';\n\nexport const deleteNotificationValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport type DeleteNotificationInput = z.infer<\n typeof deleteNotificationValidator\n>;\n","import { z } from 'zod';\nimport { DELETED_FILE } from '@aclito/shared/util/constants';\n\n//https://github.com/dankogai/js-base64/blob/main/base64.js#L245\nconst base64IsValid = function (src: string) {\n if (src === DELETED_FILE) return true;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n\nexport const fileValidator = z.object({\n file: z.string().refine(base64IsValid).optional(),\n});\n","import { z } from 'zod';\n\nexport const paginationSchema = z.object({\n limit: z.number({ coerce: true }).transform((val) => {\n if (!val) return 50;\n\n if (val > 50) {\n return 50;\n } else return val;\n }),\n nextToken: z.string().optional().nullable(),\n});\n","import { z } from 'zod';\nimport { Bank } from '@aclito/enums';\nimport {\n CURRENCIES,\n MAX_PRICE,\n MIN_PRICE,\n NONE,\n} from '@aclito/shared/util/constants';\n\nimport { fileValidator } from './utils';\n\nexport const productTypeValidator = z.strictObject({\n type: z.union([z.literal('one-off'), z.literal('subscription')]),\n});\n\nexport const paymentPaidValidator = z\n .strictObject({\n paid: z.boolean(),\n ids: z.array(z.string()),\n })\n .extend(\n z.object({\n type: z.union([productTypeValidator.shape.type, z.literal('none')]),\n }).shape,\n );\n\nexport const paymentStatusValidator = z.strictObject({\n status: z.union([\n z.literal('pending'),\n z.literal('paid'),\n z.literal('expired'),\n z.literal('cancelled'),\n z.literal('refunded'),\n ]),\n});\n\nexport const productStatusValidator = z.strictObject({\n status: z.union([z.literal('active'), z.literal('discontinued')]),\n});\n\nexport const createProductInputValidator = z\n .strictObject({\n orgId: z.union([z.string().uuid(), z.literal(NONE)]),\n title: z.string().min(1).max(256),\n description: z.string().min(1).max(1024),\n image: z.string().min(1).max(1024).optional(),\n autoJoin: z.boolean(),\n price: z\n .number()\n .min(1)\n .max(MAX_PRICE)\n .nullable()\n .transform((value, ctx) => {\n if (value === null) {\n ctx.addIssue({\n code: 'too_small',\n inclusive: true,\n type: 'number',\n minimum: 1,\n path: undefined,\n });\n return z.NEVER;\n }\n return value;\n }),\n priceMultisport: z.number().min(MIN_PRICE).max(MAX_PRICE).nullable(),\n // expirationDate: z.string().datetime().optional().nullable(),\n leaveCharge: z.number().min(1).max(100).optional().nullable(),\n leaveChargeDate: z.number().min(1).max(999).optional().nullable(),\n })\n .extend(fileValidator.shape)\n .extend(productTypeValidator.shape)\n .superRefine(\n (\n {\n // expirationDate, type,\n leaveCharge,\n leaveChargeDate,\n },\n refinementContext,\n ) => {\n // if (type === 'subscription' && !expirationDate) {\n // return refinementContext.addIssue({\n // code: z.ZodIssueCode.too_small,\n // minimum: 1,\n // type: 'string',\n // inclusive: true,\n // path: ['expirationDate'],\n // });\n // }\n\n if (leaveCharge && !leaveChargeDate) {\n return refinementContext.addIssue({\n code: z.ZodIssueCode.too_small,\n minimum: 1,\n type: 'number',\n inclusive: true,\n path: ['leaveChargeDate'],\n });\n }\n },\n );\n\nexport const paymentArrayValidator = z.array(\n z.strictObject({\n orgId: z.union([z.string().uuid(), z.literal(NONE)]),\n eventId: z.union([z.string().uuid(), z.literal(NONE)]),\n multisport: z.boolean(),\n aliasId: z.string().nullable().optional(),\n productId: z.string().uuid(),\n }),\n);\nexport const createPaymentInputValidator = z.object({\n retryId: z.string().uuid().optional(),\n payments: paymentArrayValidator.max(40),\n});\n\nexport const paymentCheckValidator = z.object({\n aliasIds: z.array(z.string()).optional(),\n});\n\nexport const updateProductInputValidator = z\n .strictObject({\n id: z.string().uuid(),\n title: z.string().min(1).max(256),\n image: z.string().min(1).max(1024).optional(),\n autoJoin: z.boolean().optional(),\n price: z\n .number()\n .min(1)\n .max(MAX_PRICE)\n .nullable()\n .transform((value, ctx) => {\n if (value === null) {\n ctx.addIssue({\n code: 'too_small',\n inclusive: true,\n type: 'number',\n minimum: 1,\n path: undefined,\n });\n return z.NEVER;\n }\n return value;\n }),\n priceMultisport: z.number().min(MIN_PRICE).max(MAX_PRICE).nullable(),\n description: z.string().min(1).max(1024),\n })\n .extend(fileValidator.shape);\n\nconst columnData = z.object({ name: z.string(), id: z.number() });\nconst column22 = z\n .object({ value: z.number().positive() })\n .extend(columnData.shape);\nconst column0 = z.object({ value: z.string() }).extend(columnData.shape);\nconst column1 = z.object({ value: z.number() }).extend(columnData.shape);\nconst column14 = z\n .object({ value: z.string().length(3) })\n .extend(columnData.shape);\nconst column2 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column10 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column3 = z\n .object({ value: z.string().max(10) })\n .extend(columnData.shape);\nconst column12 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column4 = z.object({ value: z.string() }).extend(columnData.shape);\nconst column5 = z.object({ value: z.string() }).extend(columnData.shape);\nconst column6 = z.object({ value: z.string() }).extend(columnData.shape);\nconst column7 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column16 = z\n .object({ value: z.string().max(140) })\n .extend(columnData.shape);\nconst column8 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column9 = z\n .object({ value: z.string().max(50) })\n .extend(columnData.shape);\nconst column18 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column25 = z\n .object({ value: z.string().max(255) })\n .extend(columnData.shape);\nconst column26 = z\n .object({ value: z.string().max(11) })\n .extend(columnData.shape);\nconst column17 = z.object({ value: z.number() }).extend(columnData.shape);\n\nconst fioTransactionSchema = z.object({\n column22, // ID pohybu - \"10n\" exactly 10 numeric characters as a string\n column0, // Datum\n column1, // Objem - \"18d\" for decimal values up to 18 digits\n column14, // Měna - \"3!x\" exactly 3 characters (ISO 4217 currency code)\n column2: column2.nullable(), // Protiúčet - \"255x\" alphanumeric, optional\n column10: column10.nullable(), // Název protiúčtu - \"255i\" alphanumeric with diacritics, optional\n column3: column3.nullable(), // Kód banky - \"10x\" alphanumeric, optional\n column12: column12.nullable(), // Název banky - \"255i\" alphanumeric with diacritics, optional\n column4: column4.nullable(), // KS - \"4n\" exactly 4 numeric characters as a string\n column5: column5.nullable(), // VS - \"10n\" exactly 10 numeric characters as a string\n column6: column6.nullable(), // SS - \"10n\" exactly 10 numeric characters as a string\n column7: column7.nullable(), // Uživatelská identifikace - \"255i\" alphanumeric with diacritics, optional\n column16: column16.nullable(), // Zpráva pro příjemce - \"140i\" message for the recipient, optional\n column8, // Typ pohybu - \"255i\" mandatory\n column9: column9.nullable(), // Provedl - \"50i\" authorized person, optional\n column18: column18.nullable(), // Upřesnění - \"255i\" clarification for the movement, optional\n column25: column25.nullable(), // Komentář - \"255i\" comment, optional\n column26: column26.nullable(), // BIC - \"11x\" exactly 11 alphanumeric characters, optional\n column17: column17.nullable(), // ID pokynu - \"12n\" exactly 12 numeric characters as a string\n});\n\nexport const fioPeriodPaymentSchema = z.object({\n accountStatement: z.object({\n info: z.object({\n accountId: z.string(),\n bankId: z.string(),\n currency: z.string().max(3),\n iban: z.string(),\n bic: z.string(),\n openingBalance: z.number(),\n closingBalance: z.number(),\n dateStart: z.string(),\n dateEnd: z.string(),\n yearList: z.number().nullable(),\n idList: z.number().nullable(),\n idFrom: z.number().nullable(),\n idTo: z.number().nullable(),\n idLastDownload: z.number().nullable(),\n }),\n transactionList: z.object({\n transaction: z.array(fioTransactionSchema),\n }),\n }),\n});\n\nexport const transactionSchema = z.object({\n bank: z.nativeEnum(Bank),\n iban: z.string(),\n txId: z.string().optional(),\n date: z.string().datetime(),\n specificSymbol: z.string(),\n variableSymbol: z.number(),\n currency: z.string().max(3),\n accountFrom: z.string().max(255).optional(),\n accountTo: z.string().max(255),\n value: z.number(),\n});\n\nconst transactionAction = z.union([\n z.literal('refund'),\n z.literal('pay'),\n z.literal('add'),\n]);\n\nexport const paymentLogInputSchema = z.object({\n amount: z.number(),\n variableSymbol: z.number(),\n creditAvailable: z.number(),\n productId: z.string().uuid(),\n orgId: z.union([z.string().uuid(), z.literal(NONE)]),\n eventId: z.union([z.string().uuid(), z.literal(NONE)]),\n action: transactionAction,\n currency: z.enum(CURRENCIES),\n});\n\nexport type PaymentLogInput = z.infer<typeof paymentLogInputSchema>;\nexport type TransactionAction = z.infer<typeof transactionAction>;\nexport type FioPeriodPayment = z.infer<typeof fioPeriodPaymentSchema>;\nexport type PaymentTransaction = z.infer<typeof transactionSchema>;\n\nexport type CreateProductInput = z.infer<typeof createProductInputValidator>;\nexport type PaymentArray = z.infer<typeof paymentArrayValidator>;\nexport type CreatePaymentInput = z.infer<typeof createPaymentInputValidator>;\nexport type UpdateProductInput = z.infer<typeof updateProductInputValidator>;\n\nexport type PaymentStatus = z.infer<typeof paymentStatusValidator>['status'];\nexport type PaymentStatusInput = z.infer<typeof paymentCheckValidator>;\nexport type PaymentPaid = z.infer<typeof paymentPaidValidator>;\nexport type ProductStatus = z.infer<typeof productStatusValidator>['status'];\nexport type ProductType = z.infer<typeof productTypeValidator>['type'];\n","import { z } from 'zod';\nimport { FeedbackType } from '@aclito/enums';\nimport { config } from '@aclito/shared/config';\nimport { EmojisKey } from '@aclito/shared/types';\n\nimport { paginationSchema } from './utils';\n\nexport const getReviewsByUserInputValidator = z\n .object({\n userId: z.string().uuid(),\n })\n .extend(paginationSchema.shape);\n\nexport const getStatsByUserInputValidator = z.object({\n userId: z.string().uuid(),\n});\n\nconst emojiEventValidator = z.object({\n type: z.literal(FeedbackType.EMOJI),\n emoji: z\n .string()\n .refine((value) => Object.keys(config.emojis).includes(value))\n .transform((value) => value as EmojisKey)\n .nullable(),\n});\nconst karmaEventValidator = z.object({\n type: z.literal(FeedbackType.KARMA),\n});\nconst reviewEventValidator = z.object({\n type: z.literal(FeedbackType.REVIEW),\n text: z.string().max(100).nullable(),\n});\n\nexport const emitFeedbackEventInputValidator = z.intersection(\n z.object({\n userOrAliasId: z.string(),\n eventId: z.string().uuid(),\n }),\n z.union([karmaEventValidator, emojiEventValidator, reviewEventValidator]),\n);\n\nexport const emitBatchEmojisEventInputValidator = z\n .object({\n eventId: z.string().uuid(),\n })\n .extend(emojiEventValidator.shape);\n\nexport type GetReviewsByUserIdParams = z.infer<\n typeof getReviewsByUserInputValidator\n>;\n\nexport type EmittedFeedbackEvent = z.infer<\n typeof emitFeedbackEventInputValidator\n>;\nexport type EmittedEmojiBatchFeedbackEvent = z.infer<\n typeof emitBatchEmojisEventInputValidator\n>;\n\nexport type GetStatsByUserIdParams = z.infer<\n typeof getStatsByUserInputValidator\n>;\n","import { z } from 'zod';\n\nexport const createPlaceInputValidator = z.object({\n name: z.string(),\n address: z.string().optional(),\n activities: z.array(z.string()).default([]),\n location: z.object({\n lat: z.number({ coerce: true }),\n lon: z.number({ coerce: true }),\n }),\n});\n\nexport const updatePlaceInputValidator = z.object({\n activities: z.array(z.string()).default([]),\n});\n\nexport const placeIdInputValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const listPlacesInputValidator = z.object({\n lat: z.number({ coerce: true }).optional(),\n lon: z.number({ coerce: true }).optional(),\n});\nexport const adminListPlacesInputValidator = z.object({});\nexport const adminUpdatePlacesInputValidator = z.object({\n userId: z.string(),\n});\n\nexport type CreatePlaceInput = z.infer<typeof createPlaceInputValidator>;\nexport type UpdatePlaceInput = z.infer<typeof updatePlaceInputValidator>;\nexport type ListPlaceInput = z.infer<typeof listPlacesInputValidator>;\nexport type AdminListPlaceInput = z.infer<typeof adminListPlacesInputValidator>;\nexport type AdminUpdatePlaceInput = z.infer<\n typeof adminUpdatePlacesInputValidator\n>;\n","import { z } from 'zod';\n\nexport const createReportInputValidator = z.object({\n message: z.string(),\n reporter: z.string().uuid(),\n reportUserId: z.string().uuid(),\n});\n\nexport type CreateReportInput = z.infer<typeof createReportInputValidator>;\n","import { z } from 'zod';\n\nexport const reservantoTokenValidator = z.object({\n token: z.string().uuid(),\n});\n\nexport type createReservantoTokenInput = z.infer<\n typeof reservantoTokenValidator\n>;\n","import { z } from 'zod';\n\nexport const createUserAchievementInputValidator = z.object({\n userId: z.string().uuid(),\n achievementId: z.string().uuid(),\n progress: z.number(),\n});\n\nexport const updateUserAchievementInputValidator = z.object({\n progress: z.number(),\n});\n\nexport const getUserAchievementIdValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const upsertUserAchievementValidator = z.object({\n achievementId: z.string().uuid(),\n userId: z.string().uuid(),\n});\n\nexport const getUserAchievementByUserIdValidator = z.object({\n userId: z.string().uuid(),\n});\n\nexport type GetUserAchievementId = z.infer<\n typeof getUserAchievementIdValidator\n>;\n\nexport type UpsertUserAchievementBody = z.infer<\n typeof updateUserAchievementInputValidator\n>;\n\nexport type UpsertUserAchievement = z.infer<\n typeof upsertUserAchievementValidator\n>;\n\nexport type GetUserAchievementByUserId = z.infer<\n typeof getUserAchievementByUserIdValidator\n>;\n","import { z } from 'zod';\nimport { config } from '@aclito/shared/config';\nimport {\n ActivitiesKey,\n AgeKey,\n GenderUserKey,\n ImageValueShape,\n LanguagesKey,\n} from '@aclito/shared/types';\n\nimport { fileValidator } from './utils';\n\nexport const userIdValidator = z.object({ id: z.string().uuid() });\nconst notificationTypesValidator = z.enum([\n 'eventChanges',\n 'eventInteractions',\n 'eventLifecycle',\n 'organizations',\n 'feed',\n 'feedback',\n 'chat',\n]);\n\nexport const notificationsSettingsInputValidator = z\n .record(\n notificationTypesValidator,\n z.object({ push: z.boolean(), email: z.boolean() }),\n )\n .refine((obj): obj is typeof obj extends Partial<infer R> ? R : never =>\n notificationTypesValidator.options.every((key) => !!obj[key]),\n );\n\nexport const updateUserInfoInputValidator = z\n .strictObject({\n name: z.string().max(128).optional(),\n surname: z.string().max(128).optional(),\n age: z\n .string()\n .refine((value) => Object.keys(config.age).includes(value))\n .transform((value) => value as AgeKey)\n .optional(),\n gender: z\n .string()\n .refine((value) => Object.keys(config.gender.signup).includes(value))\n .transform((value) => value as GenderUserKey)\n .optional(),\n preferredLanguage: z\n .union([z.literal('en'), z.literal('cs'), z.literal('sk')])\n .optional(),\n pushToken: z.string().max(128).optional(),\n webToken: z.string().max(512).optional(),\n description: z.string().max(2000).optional(),\n image: z\n .string()\n .transform((value) => value as ImageValueShape)\n .optional(),\n languages: z\n .array(\n z\n .string()\n .refine((value) => Object.keys(config.allLanguages).includes(value))\n .transform((value) => value as LanguagesKey),\n )\n .optional(),\n activities: z\n .array(\n z\n .string()\n .refine((value) => Object.keys(config.activities).includes(value))\n .transform((value) => value as ActivitiesKey),\n )\n .optional(),\n settings: z\n .object({\n hideReviews: z.boolean(),\n hideEmoji: z.boolean(),\n notifications: notificationsSettingsInputValidator,\n })\n .optional(),\n location: z\n .object({\n lat: z.number({ coerce: true }),\n lon: z.number({ coerce: true }),\n })\n .optional(),\n })\n .extend(fileValidator.shape);\n\nexport const createAliasInputValidator = z\n .object({\n name: z.string().min(1),\n surname: z.string().min(1),\n image: z\n .string()\n .transform((value) => value as ImageValueShape)\n .optional(),\n })\n .extend(fileValidator.shape);\nexport const updateAliasInputValidator = z\n .object({\n id: z.string().min(1),\n name: z.string().min(1),\n surname: z.string().min(1),\n image: z\n .string()\n .min(1)\n .transform((value) => value as ImageValueShape),\n })\n .extend(fileValidator.shape);\n\nexport const deleteAliasInputValidator = z.object({\n id: z.string().min(1),\n});\n\nexport const profileInputValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport type NotificationSettingType = z.infer<\n typeof notificationTypesValidator\n>;\n\nexport type NotificationSettingsInput = z.infer<\n typeof notificationsSettingsInputValidator\n>;\nexport type UpdateUserInfoInput = z.infer<typeof updateUserInfoInputValidator>;\nexport type UpdateAliasInput = z.infer<typeof updateAliasInputValidator>;\nexport type CreateAliasInput = z.infer<typeof createAliasInputValidator>;\nexport type DeleteAliasInput = z.infer<typeof deleteAliasInputValidator>;\n","import { z } from 'zod';\nimport { AchievementEventEnum } from '@aclito/enums';\nimport { config } from '@aclito/shared/config';\nimport { ActivitiesKey } from '@aclito/shared/types';\n\nexport const functionLiteral = z.union([\n z.literal('simpleSum'),\n z.literal('uniqueSet'),\n z.literal('consecutiveStreak'),\n z.literal('samePeriod'),\n]);\n\nexport const functionParamsUniqueSet = z.union([\n z.literal('trainer'),\n z.literal('activityType'),\n]);\nexport const functionParamsConsecutiveStreak = z.union([\n z.literal('day'),\n z.literal('week'),\n]);\nexport const functionParamsSamePeriod = z.union([\n z.literal('week'),\n z.literal('month'),\n z.number(),\n]);\nexport const functionParamsSecondarySamePeriod = z.number().positive();\n\nexport const functionParamsSimpleSum = z.literal('activityType').optional();\nexport const functionParamsSecondarySimpleSum = z\n .string()\n .refine((value) => Object.keys(config.activities).includes(value))\n .transform((value) => value as ActivitiesKey)\n .optional();\n\nexport const functionParams = z.union([\n functionParamsUniqueSet,\n functionParamsConsecutiveStreak,\n functionParamsSimpleSum,\n functionParamsSamePeriod,\n]);\n\nexport const functionParamsSecondary = z.union([\n functionParamsSecondarySimpleSum,\n functionParamsSecondarySamePeriod,\n]);\n\nexport const encodedLanguage = z.object({\n cs: z.string(),\n en: z.string(),\n sk: z.string(),\n});\n\nexport const createAchievementInputValidator = z.object({\n config: z.object({\n levelSteps: z.array(z.number()),\n icons: z.array(z.string()),\n }),\n eventType: z.nativeEnum(AchievementEventEnum),\n title: encodedLanguage,\n function: functionLiteral,\n fnParams: functionParams.optional(),\n fnParamsSecondary: functionParamsSecondary.optional(),\n description: encodedLanguage,\n detail: encodedLanguage.optional(),\n orgId: z.string().optional(),\n});\n\nexport const updateAchievementInputValidator = z.object({\n config: z\n .object({\n levelSteps: z.array(z.number()),\n icons: z.array(z.string()),\n })\n .optional(),\n orgId: z.string().optional(),\n function: functionLiteral.optional(),\n fnParams: functionParams.optional(),\n fnParamsSecondary: functionParamsSecondary.optional(),\n eventType: z.nativeEnum(AchievementEventEnum).optional(),\n description: encodedLanguage.optional(),\n detail: encodedLanguage.optional(),\n title: encodedLanguage.optional(),\n});\n\nexport const getAchievementByIdValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const getAchievementsByConstantValidator = z.object({\n constant: z.string(),\n});\n\nexport type CreateAchievementInput = z.infer<\n typeof createAchievementInputValidator\n>;\nexport type UpdateAchievementInput = z.infer<\n typeof updateAchievementInputValidator\n>;\n\nexport type GetAchievementByIdParams = z.infer<\n typeof getAchievementByIdValidator\n>;\nexport type GetAchievementsByConstantParams = z.infer<\n typeof getAchievementsByConstantValidator\n>;\nexport type FunctionType = z.infer<typeof functionLiteral>;\nexport type FunctionParams = z.infer<typeof functionParams>;\nexport type FunctionParamsSecondary = z.infer<typeof functionParamsSecondary>;\nexport type FunctionParamsSimpleSum = z.infer<typeof functionParamsSimpleSum>;\nexport type FunctionParamsSecondarySimpleSum = z.infer<\n typeof functionParamsSecondarySimpleSum\n>;\nexport type FunctionParamsSecondarySamePeriod = z.infer<\n typeof functionParamsSecondarySamePeriod\n>;\nexport type FunctionParamsConsecutiveStreak = z.infer<\n typeof functionParamsConsecutiveStreak\n>;\nexport type FunctionParamsUniqueSet = z.infer<typeof functionParamsUniqueSet>;\nexport type FunctionParamsSamePeriod = z.infer<typeof functionParamsSamePeriod>;\n","import { z } from 'zod';\n\nexport const getAchievementEventTempByIdValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const createAchievementEventTempInputValidator = z.object({\n users: z.array(z.string()),\n achievementId: z.string().uuid(),\n data: z.string(),\n});\n","import { z } from 'zod';\nimport { config } from '@aclito/shared/config';\nimport type { ActivitiesKey, GenderKey } from '@aclito/shared/types';\nimport { EventTag } from '@aclito/enums';\nimport { MAX_PRICE } from '@aclito/shared/util/constants';\n\nimport { paginationSchema } from './utils';\n\nexport const dateIsFutureRefine = (date: string) =>\n new Date(date).getTime() >= new Date().getTime();\nexport const booleanRefine = (value: number) => value === 0 || value === 1;\n\nexport const createEventInputValidator = z.strictObject({\n name: z.string().max(256),\n minLevel: z.number().refine((num) => num >= 0 && num <= 5),\n date: z.string().datetime().refine(dateIsFutureRefine),\n duration: z.string(),\n activityType: z\n .string()\n .refine((value) => Object.keys(config.activities).includes(value))\n .transform((value) => value as ActivitiesKey),\n trainer: z.string().uuid().optional(),\n eventPlaceId: z.string().uuid(),\n maxPlayers: z.number().min(-1).max(99).optional().default(-1),\n gender: z\n .string()\n .refine((value) => Object.keys(config.gender.filter).includes(value))\n .transform((value) => value as GenderKey),\n info: z.string().max(2000),\n price: z.number().min(-1).max(MAX_PRICE).optional().default(-1),\n willParticipate: z.boolean(),\n eventOrgId: z.string().uuid().optional(),\n oneOffProductId: z.string().uuid().optional(),\n subscriptionProductId: z.string().uuid().optional(),\n externalLink: z.string().max(512).optional(),\n hoursConfirm: z.number().optional(),\n enableQueue: z.boolean(),\n numberOfEvents: z.number().max(180).optional(),\n private: z.boolean(),\n repeatAfter: z\n .string()\n .refine((value) => Object.keys(config.repeat).includes(value))\n .optional(),\n tags: z.object({\n all: z.boolean(),\n kids: z.boolean(),\n adults: z.boolean(),\n }),\n});\n\nexport const createAdminEventInputValidator = createEventInputValidator\n .omit({\n duration: true,\n tags: true,\n trainer: true,\n eventOrgId: true,\n private: true,\n })\n .extend(\n z.strictObject({\n tags: z.nativeEnum(EventTag),\n leader: z.string().uuid(),\n trainer: z.string().uuid().optional(),\n interval: z.string(),\n requireConfirmation: z.boolean(),\n repetitionId: z.string().uuid().optional(),\n eventOrgId: z.string().uuid(),\n location: z.object({\n lat: z.number({ coerce: true }),\n lon: z.number({ coerce: true }),\n }),\n endDate: z.string().datetime().refine(dateIsFutureRefine),\n confirmationDate: z.string().datetime().optional(),\n }).shape,\n );\n\nexport const getEventByOrgIdValidator = z.object({\n eventOrgId: z.string().uuid(),\n});\n\nexport const searchEventValidator = z\n .object({\n query: z.string().optional(),\n eventOrgId: z.string().uuid().optional(),\n freeOnly: z\n .enum(['true', 'false'])\n .transform((value) => value === 'true')\n .optional(),\n distance: z.number({ coerce: true }).optional(),\n lat: z.number({ coerce: true }).optional(),\n lon: z.number({ coerce: true }).optional(),\n gender: z.string().optional(),\n level: z\n .string()\n .optional()\n .refine((val) =>\n val ? val.split('|').map(Number).every(Number.isInteger) : true,\n ),\n activityType: z.string().optional(),\n to: z.string().datetime().optional(),\n from: z.string().datetime().optional(),\n tags: z.string().optional(),\n price: z\n .string()\n .optional()\n .refine((val) =>\n val ? val.split('|').map(Number).every(Number.isInteger) : true,\n ),\n })\n .extend(paginationSchema.shape);\n\nexport const eventIdValidator = z.object({\n id: z.string(),\n});\n\nexport const myEventValidator = z\n .object({\n orgId: z.string().uuid().optional(),\n })\n .extend(paginationSchema.shape);\n\nexport const providerIdValidator = z.object({\n id: z.string(),\n});\n\nexport const getEventByChatIdValidator = z.object({\n eventChatId: z.string().uuid(),\n});\n\nexport const getEventByPlaceIdValidator = z.object({\n eventPlaceId: z.string().uuid(),\n});\n\nexport const getEventByRepetitionIdValidator = z.object({\n repetitionId: z.string().uuid(),\n});\nexport const joinLeaveEventValidator = z.object({\n aliasIds: z.array(z.string()).optional(),\n message: z.string().max(200).optional(),\n ref: z.string().nullable().optional(),\n});\n\nexport const joinLeaveEventRepeatingValidator = z.object({\n eventId: z.string().uuid(),\n aliasIds: z.array(z.string()).optional(),\n message: z.string().max(200).optional(),\n ref: z.string().nullable().optional(),\n});\n\nexport const byOrgValidator = z.object({\n startDate: z.string().datetime().optional(),\n endDate: z.string().datetime().optional(),\n});\n\nexport const kickFromEventValidator = z.object({\n idOrAliasId: z.string(),\n message: z.string().max(200),\n});\n\nexport const confirmEventValidator = z.array(z.string()).optional();\n\nexport const updateEventInputValidator = createEventInputValidator\n .omit({\n eventOrgId: true,\n numberOfEvents: true,\n })\n .merge(\n z.object({\n eventId: z.string().uuid(),\n }),\n );\n\nexport type CreateEventInput = z.infer<typeof createEventInputValidator>;\nexport type CreateAdminEventInput = z.infer<\n typeof createAdminEventInputValidator\n>;\nexport type UpdateEventInput = z.infer<typeof updateEventInputValidator>;\nexport type SearchEventInput = z.infer<typeof searchEventValidator>;\nexport type JoinLeaveEventParams = z.infer<typeof joinLeaveEventValidator>;\nexport type JoinLeaveEventRepeatingParams = z.infer<\n typeof joinLeaveEventRepeatingValidator\n>;\nexport type ConfirmEventParams = z.infer<typeof confirmEventValidator>;\nexport type EventsByOrgParams = z.infer<typeof byOrgValidator>;\nexport type KickFromEventParams = z.infer<typeof kickFromEventValidator>;\n","import { z } from 'zod';\nimport { config } from '@aclito/shared/config';\nimport { ActivitiesKey } from '@aclito/shared/types';\n\nimport { paginationSchema } from './utils';\nimport { dateIsFutureRefine } from './event';\n\nexport const getAvailabilityByUserIdValidator = z\n .object({})\n .extend(paginationSchema.shape);\n\nexport const deleteAvailabilityValidator = z.object({\n availabilityId: z.string().uuid(),\n});\n\nexport const createAvailabilityInputValidator = z.object({\n activities: z\n .array(\n z\n .string()\n .refine((value) => Object.keys(config.activities).includes(value))\n .transform((value) => value as ActivitiesKey),\n )\n .optional(),\n from: z.string().datetime().refine(dateIsFutureRefine),\n duration: z.string(),\n numberOfAvailabilities: z.number().max(180).optional(),\n repeatAfter: z\n .string()\n .refine((value) => Object.keys(config.repeat).includes(value))\n .optional(),\n location: z.object({\n lat: z.number(),\n lon: z.number(),\n }),\n});\n\nexport const updateAvailabilityInputValidator = z.object({\n id: z.string().uuid(),\n activities: z\n .array(\n z\n .string()\n .refine((value) => Object.keys(config.activities).includes(value))\n .transform((value) => value as ActivitiesKey),\n )\n .optional(),\n duration: z.string().optional(),\n from: z.string().datetime().refine(dateIsFutureRefine).optional(),\n location: z\n .object({\n lat: z.number(),\n lon: z.number(),\n })\n .optional(),\n});\n\nexport const availabilitySuggestValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport type DeleteAvailabilityInput = z.infer<\n typeof deleteAvailabilityValidator\n>;\n\nexport type GetAvailabilityByUserIdInput = z.infer<\n typeof getAvailabilityByUserIdValidator\n>;\n\nexport type CreateAvailabilityInput = z.infer<\n typeof createAvailabilityInputValidator\n>;\n\nexport type UpdateAvailabilityInput = z.infer<\n typeof updateAvailabilityInputValidator\n>;\n\nexport type SuggestInput = z.infer<typeof availabilitySuggestValidator>;\n\nexport type GetAvailabilitiesByUserIdParams = z.infer<\n typeof getAvailabilityByUserIdValidator\n>;\n","import { z } from 'zod';\n\nexport const createChatInputValidator = z.object({\n participants: z.array(z.string().uuid()),\n eventId: z.string(),\n});\n\nexport const getChatByEventIdValidator = z.object({\n eventId: z.string().uuid(),\n});\n\nexport const getChatByIdValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const chatIdValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport type CreateChatInput = z.infer<typeof createChatInputValidator>;\n\nexport type ChatIdInput = z.infer<typeof chatIdValidator>;\n\nexport type GetChatByEventIdInput = z.infer<typeof getChatByEventIdValidator>;\n\nexport type GetChatByIdInput = z.infer<typeof getChatByIdValidator>;\n","import { z } from 'zod';\n\nimport { fileValidator } from './utils';\n\nexport const createFeedInputValidator = z\n .object({\n feedOrgId: z.string().uuid(),\n feedPostedById: z.string().uuid(),\n text: z.string(),\n })\n .extend(fileValidator.shape);\n\nexport const deleteFeedInputValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const updateFeedInputValidator = z\n .object({\n id: z.string().uuid(),\n feedPostedById: z.string().uuid(),\n text: z.string().optional(),\n })\n .extend(fileValidator.shape);\n\nexport const getFeedByFeedOrgIdValidator = z.object({\n feedOrgId: z.string().uuid(),\n});\n\nexport const getMyFeedsValidator = z.object({\n orgs: z.string(),\n});\n\nexport const getFeedValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport type CreateFeedInput = z.infer<typeof createFeedInputValidator>;\n\nexport type DeleteFeedInput = z.infer<typeof deleteFeedInputValidator>;\n\nexport type UpdateFeedInput = z.infer<typeof updateFeedInputValidator>;\n\nexport type GetFeedByFeedOrgIdParams = z.infer<\n typeof getFeedByFeedOrgIdValidator\n>;\n\nexport type GetMyFeedQueryParams = z.infer<typeof getMyFeedsValidator>;\n","import { z } from 'zod';\n\nimport { paginationSchema } from './utils';\n\nexport const createMessageInputValidator = z.object({\n message: z.string().max(2000),\n chatId: z.string().uuid(),\n});\n\nexport const getMessagesByChatIdValidator = z\n .object({})\n .extend(paginationSchema.shape);\n\nexport type CreateMessageInput = z.infer<typeof createMessageInputValidator>;\n\nexport type GetMessagesByEventIdParams = z.infer<\n typeof getMessagesByChatIdValidator\n>;\n","import { z } from 'zod';\n\nexport const editNoteInputValidator = z.object({\n tel: z.string().max(256),\n email: z.union([z.literal(''), z.string().email()]),\n});\n\nexport const noteIdInputValidator = z.object({\n id: z.string().uuid(),\n});\n\nexport const noteOrgIdInputValidator = z.object({\n orgId: z.string().uuid().optional(),\n});\n\nexport type UpdateNoteInput = z.infer<typeof editNoteInputValidator>;\n","import { z } from 'zod';\n\nimport { paginationSchema, fileValidator } from './utils';\n\nexport const createOrganizationInputValidator = z\n .object({\n members: z.array(z.string().uuid()),\n powerUsers: z.array(z.string().uuid()),\n admins: z.array(z.string().uuid()),\n name: z.string(),\n private: z.boolean(),\n maxMembers: z.number(),\n description: z.string(),\n address: z.string(),\n image: z.string(),\n contact: z.boolean(),\n tags: z.object({\n team: z.boolean(),\n club: z.boolean(),\n organization: z.boolean(),\n }),\n email: z.string().optional(),\n telephone: z.string().optional(),\n })\n .extend(fileValidator.shape);\n\nexport const updateOrganizationInputValidator = z\n .object({\n id: z.string().uuid(),\n members: z.array(z.string().uuid()).optional(),\n powerUsers: z.array(z.string().uuid()).optional(),\n admins: z.array(z.string().uuid()).optional(),\n name: z.string().optional(),\n private: z.boolean().optional(),\n maxMembers: z.number().optional(),\n description: z.string().optional(),\n address: z.string().optional(),\n image: z.string(),\n contact: z.boolean().optional(),\n tags: z\n .object({\n team: z.boolean(),\n club: z.boolean(),\n organization: z.boolean(),\n })\n .optional(),\n email: z.string().optional(),\n telephone: z.string().optional(),\n })\n .extend(fileValidator.shape);\n\nexport const organizationIdValidator = z.object({\n orgId: z.string().uuid(),\n});\n\nexport const organizationJoinBodyValidator = z.object({\n ref: z.string().nullable().optional(),\n});\n\nexport const organizationMessageValidator = z.object({\n message: z.string(),\n});\n\nexport const organizationUpdateMemberValidator = z.object({\n memberId: z.string().uuid(),\n // if undefined, member is to be kicked\n newRole: z\n .union([z.literal('admin'), z.literal('powerUser'), z.literal('member')])\n .optional(),\n});\n\nexport const getAllOrganizationsInputValidator = z\n .object({\n name: z.string().optional(),\n })\n .extend(paginationSchema.shape);\n\nexport const getMyOrganizationsInputValidator = z\n .object({})\n .extend(paginationSchema.shape);\n\nexport type CreateOrganizationInput = z.infer<\n typeof createOrganizationInputValidator\n>;\n\nexport type UpdateOrganizationInput = z.infer<\n typeof updateOrganizationInputValidator\n>;\n\nexport type DeleteOrganizationInput = z.infer<typeof organizationIdValidator>;\n\nexport type GetOrganizationParams = z.infer<typeof organizationIdValidator>;\n\nexport type GetAllOrganizationsParams = z.infer<\n typeof getAllOrganizationsInputValidator\n>;\n\nexport type GetMyOrganizationsParams = z.infer<\n typeof getMyOrganizationsInputValidator\n>;\n\nexport type UpdateOrganizationMemberParams = z.infer<\n typeof organizationUpdateMemberValidator\n>;\nexport type JoinOrgBodyInput = z.infer<typeof organizationJoinBodyValidator>;\n","import { z } from 'zod';\n\nexport const createClickInputValidator = z.object({\n ref: z.string().uuid(),\n});\n\nexport type CreateClickReferralInput = z.infer<\n typeof createClickInputValidator\n>;\n","import { z } from 'zod';\n\nexport { deleteNotificationValidator } from './notification';\n\nexport type { DeleteNotificationInput } from './notification';\n\nexport type {\n PaymentStatus,\n PaymentTransaction,\n ProductStatus,\n ProductType,\n CreateProductInput,\n UpdateProductInput,\n FioPeriodPayment,\n TransactionAction,\n PaymentLogInput,\n CreatePaymentInput,\n PaymentArray,\n PaymentPaid,\n PaymentStatusInput,\n} from './payments';\nexport {\n paymentStatusValidator,\n paymentCheckValidator,\n productStatusValidator,\n paymentPaidValidator,\n productTypeValidator,\n updateProductInputValidator,\n createProductInputValidator,\n paymentArrayValidator,\n fioPeriodPaymentSchema,\n createPaymentInputValidator,\n transactionSchema,\n} from './payments';\n\nexport type {\n EmittedFeedbackEvent,\n EmittedEmojiBatchFeedbackEvent,\n GetReviewsByUserIdParams,\n GetStatsByUserIdParams,\n} from './feedback';\nexport {\n emitFeedbackEventInputValidator,\n emitBatchEmojisEventInputValidator,\n getReviewsByUserInputValidator,\n getStatsByUserInputValidator,\n} from './feedback';\n\nexport {\n createPlaceInputValidator,\n updatePlaceInputValidator,\n placeIdInputValidator,\n listPlacesInputValidator,\n adminListPlacesInputValidator,\n adminUpdatePlacesInputValidator,\n} from './place';\n\nexport type {\n CreatePlaceInput,\n UpdatePlaceInput,\n ListPlaceInput,\n AdminListPlaceInput,\n AdminUpdatePlaceInput,\n} from './place';\n\nexport { createReportInputValidator } from './report';\n\nexport type { CreateReportInput } from './report';\n\nexport { reservantoTokenValidator } from './reservanto';\n\nexport type { createReservantoTokenInput } from './reservanto';\n\nexport {\n createUserAchievementInputValidator,\n updateUserAchievementInputValidator,\n getUserAchievementByUserIdValidator,\n upsertUserAchievementValidator,\n getUserAchievementIdValidator,\n} from './userAchievement';\n\nexport type {\n GetUserAchievementId,\n UpsertUserAchievement,\n UpsertUserAchievementBody,\n GetUserAchievementByUserId,\n} from './userAchievement';\n\nexport {\n userIdValidator,\n notificationsSettingsInputValidator,\n updateUserInfoInputValidator,\n createAliasInputValidator,\n updateAliasInputValidator,\n deleteAliasInputValidator,\n profileInputValidator,\n} from './user';\n\nexport type {\n NotificationSettingsInput,\n NotificationSettingType,\n UpdateUserInfoInput,\n UpdateAliasInput,\n CreateAliasInput,\n DeleteAliasInput,\n} from './user';\n\nexport {\n createAchievementInputValidator,\n updateAchievementInputValidator,\n getAchievementByIdValidator,\n getAchievementsByConstantValidator,\n functionParamsSimpleSum,\n functionParamsConsecutiveStreak,\n functionParamsUniqueSet,\n functionParamsSecondary,\n functionParamsSecondarySimpleSum,\n functionParamsSecondarySamePeriod,\n functionParamsSamePeriod,\n} from './achievement';\n\nexport type {\n GetAchievementByIdParams,\n GetAchievementsByConstantParams,\n CreateAchievementInput,\n UpdateAchievementInput,\n FunctionParams,\n FunctionParamsConsecutiveStreak,\n FunctionParamsUniqueSet,\n FunctionParamsSimpleSum,\n FunctionType,\n FunctionParamsSecondarySamePeriod,\n FunctionParamsSecondarySimpleSum,\n FunctionParamsSecondary,\n FunctionParamsSamePeriod,\n} from './achievement';\n\nexport {\n getAchievementEventTempByIdValidator,\n createAchievementEventTempInputValidator,\n} from './achievementEventTemp';\n\nexport {\n getAvailabilityByUserIdValidator,\n deleteAvailabilityValidator,\n createAvailabilityInputValidator,\n updateAvailabilityInputValidator,\n availabilitySuggestValidator,\n} from './availability';\n\nexport type {\n DeleteAvailabilityInput,\n GetAvailabilitiesByUserIdParams,\n GetAvailabilityByUserIdInput,\n CreateAvailabilityInput,\n UpdateAvailabilityInput,\n SuggestInput,\n} from './availability';\n\nexport {\n createChatInputValidator,\n getChatByEventIdValidator,\n getChatByIdValidator,\n chatIdValidator,\n} from './chat';\n\nexport type {\n CreateChatInput,\n ChatIdInput,\n GetChatByEventIdInput,\n GetChatByIdInput,\n} from './chat';\n\nexport {\n createEventInputValidator,\n getEventByOrgIdValidator,\n createAdminEventInputValidator,\n searchEventValidator,\n eventIdValidator,\n providerIdValidator,\n getEventByChatIdValidator,\n getEventByPlaceIdValidator,\n getEventByRepetitionIdValidator,\n joinLeaveEventValidator,\n joinLeaveEventRepeatingValidator,\n byOrgValidator,\n kickFromEventValidator,\n confirmEventValidator,\n updateEventInputValidator,\n myEventValidator,\n dateIsFutureRefine,\n booleanRefine,\n} from './event';\n\nexport type {\n CreateEventInput,\n CreateAdminEventInput,\n UpdateEventInput,\n SearchEventInput,\n JoinLeaveEventParams,\n JoinLeaveEventRepeatingParams,\n ConfirmEventParams,\n EventsByOrgParams,\n KickFromEventParams,\n} from './event';\n\nexport {\n createFeedInputValidator,\n deleteFeedInputValidator,\n updateFeedInputValidator,\n getFeedByFeedOrgIdValidator,\n getMyFeedsValidator,\n getFeedValidator,\n} from './feed';\n\nexport type {\n CreateFeedInput,\n DeleteFeedInput,\n UpdateFeedInput,\n GetFeedByFeedOrgIdParams,\n GetMyFeedQueryParams,\n} from './feed';\n\nexport {\n createMessageInputValidator,\n getMessagesByChatIdValidator,\n} from './message';\n\nexport type { CreateMessageInput, GetMessagesByEventIdParams } from './message';\n\nexport {\n editNoteInputValidator,\n noteIdInputValidator,\n noteOrgIdInputValidator,\n} from './note';\n\nexport type { UpdateNoteInput } from './note';\n\nexport {\n createOrganizationInputValidator,\n updateOrganizationInputValidator,\n organizationIdValidator,\n organizationMessageValidator,\n organizationUpdateMemberValidator,\n getAllOrganizationsInputValidator,\n getMyOrganizationsInputValidator,\n organizationJoinBodyValidator,\n} from './organization';\n\nexport type {\n CreateOrganizationInput,\n JoinOrgBodyInput,\n UpdateOrganizationInput,\n DeleteOrganizationInput,\n GetOrganizationParams,\n GetAllOrganizationsParams,\n GetMyOrganizationsParams,\n UpdateOrganizationMemberParams,\n} from './organization';\nexport { createClickInputValidator } from './referral';\n\nexport type { CreateClickReferralInput } from './referral';\n\nexport const uuIdValidator = z.object({\n id: z.string().uuid(),\n});\n","import { useNavigate, useParams } from 'react-router-dom';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport {\n useGetProductQuery,\n useUpdateProductMutation,\n} from '@aclito/shared/redux/api/paymentApi';\nimport { Center, Loader } from '@mantine/core';\nimport { Product, UpdateProductInput } from '@aclito/entities';\nimport { updateProductInputValidator } from '@aclito/validators';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { MAX_PRICE, MIN_PRICE } from '@aclito/shared/util/constants';\nimport { useTheme } from 'styled-components';\n\nimport {\n ActionButton,\n Icon,\n SectionGrid,\n SmallButton,\n Text,\n TitleBar,\n ValidatedDropzone,\n ValidatedInput,\n ValidatedNumberInput,\n ValidatedTextArea,\n} from '@/components';\n\nconst ProductsEdit = () => {\n const params = useParams();\n return (\n <>\n {params.id && params.productId ? (\n <ProductsInner productId={params.productId} />\n ) : null}\n </>\n );\n};\n\nconst ProductsInner = ({ productId }: { productId: string }) => {\n const { data: product, isFetching } = useGetProductQuery(productId);\n\n if (isFetching) {\n return (\n <Center>\n <Loader />\n </Center>\n );\n }\n\n if (product) return <ProductsInnerForm product={product} />;\n\n return null;\n};\n\nconst ProductsInnerForm = ({ product }: { product: Product }) => {\n const nav = useNavigate();\n const theme = useTheme();\n const [update, { isLoading }] = useUpdateProductMutation();\n\n const methods = useForm<UpdateProductInput>({\n defaultValues: {\n id: product.id,\n title: product.title,\n description: product.description,\n price: product.price,\n image: product.image,\n priceMultisport: product.priceMultisport ?? null,\n },\n resolver: zodResolver(updateProductInputValidator),\n mode: 'onSubmit',\n });\n\n const updateProduct = async (data: UpdateProductInput) => {\n if (\n methods.formState.isSubmitting ||\n methods.formState.isSubmitSuccessful\n ) {\n return;\n } else {\n await handleSubmit(data);\n }\n };\n\n const handleSubmit = async (data: UpdateProductInput) => {\n await update(data);\n nav(-1);\n };\n\n const navBack = () => {\n nav(-1);\n };\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"payments.products.edit\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n <FormProvider {...methods}>\n <VStack>\n <ValidatedNumberInput\n name=\"price\"\n txLabel=\"product.price\"\n data-testid=\"price\"\n icon={<Icon icon={'price'} size={20} color={'grey50'} />}\n min={1}\n max={MAX_PRICE}\n />\n\n <VStack spacing={4}>\n <ValidatedNumberInput\n name=\"priceMultisport\"\n icon={<Icon icon={'multisport'} size={20} color={'grey50'} />}\n txLabel=\"product.priceMultisport\"\n min={MIN_PRICE}\n max={MAX_PRICE}\n data-testid=\"multisport\"\n />\n <Text tx={'product.create.free'} color={theme.grey50} size={'xs'} />\n </VStack>\n\n <ValidatedInput\n name=\"title\"\n txLabel=\"product.title\"\n txPlaceholder=\"product.title\"\n maxLength={256}\n />\n\n <ValidatedTextArea\n name=\"description\"\n txLabel=\"product.description\"\n txPlaceholder=\"product.description\"\n maxLength={1024}\n />\n\n <ValidatedDropzone name=\"image\" imageOnly circular={false} />\n\n <SmallButton\n bg={'primary'}\n disabled={isLoading}\n textcolor={'white'}\n onClick={() => {\n methods.handleSubmit(updateProduct)();\n }}\n tx={'payments.edit'}\n data-testid=\"productEdit\"\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default ProductsEdit;\n","import { useNavigate, useParams } from 'react-router-dom';\nimport {\n useDiscontinueProductMutation,\n useGetProductsQuery,\n} from '@aclito/shared/redux/api/paymentApi';\nimport { Product } from '@aclito/entities';\nimport { Center, Loader } from '@mantine/core';\nimport dayjs from 'dayjs';\nimport styled from 'styled-components';\nimport { deviceMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { useState } from 'react';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport {\n ActionButton,\n BackButton,\n HStack,\n Icon,\n SectionGrid,\n Tabs,\n TagButton,\n Title,\n TitleBar,\n Switch,\n EmptyList,\n} from '@/components';\nimport ProductCard from '@/components/Cards/ProductCard';\nimport { useModal } from '@/hooks/useModal';\n\nconst ProductsList = () => {\n const params = useParams();\n if (!params.id) return null;\n return <ProductsListInner id={params.id} />;\n};\n\nconst ProductsListInner = ({ id }: { id: string }) => {\n const { data: productData, isLoading } = useGetProductsQuery(id);\n const [discontinue] = useDiscontinueProductMutation();\n\n const { openConfirmModal } = useModal();\n const [showModalTooltip] = useShowTooltipModal('productAdminTooltip');\n const nav = useNavigate();\n const [tabId, setTabId] = useState('all');\n const [showDiscontinued, setShowDiscontinued] = useState(false);\n const unFilteredProducts = productData ?? [];\n const allProducts =\n tabId === 'all'\n ? unFilteredProducts\n : unFilteredProducts.filter((p) => p.type === tabId);\n const products = allProducts.filter((p) =>\n showDiscontinued ? true : p.status === 'active',\n );\n\n const navigateToDetail = (product: Product) => {\n nav(window.location.pathname + `/${product.id}`);\n };\n\n const navigateToEdit = (product: Product) => {\n nav(`/products/${id}/edit/${product.id}`);\n };\n\n const navigateToCreate = () => {\n nav(`/products/${id}/create`);\n };\n\n const navigateToBuy = () => {\n nav(`/products/${id}/buy`);\n };\n const navigateToStats = () => {\n nav(`/products/${id}/stats`);\n };\n\n const discontinueProduct = async (product: Product) => {\n openConfirmModal({\n type: 'discontinueProduct',\n confirmProps: { color: 'red' },\n closeOnConfirm: true,\n txTitle: 'payments.discontinued',\n txLabels: { confirm: 'payments.discontinued', cancel: 'close' },\n onConfirm: async () => await discontinue(product.id),\n });\n };\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"nav.products\" />\n <Icon icon={'info'} color={'primary'} onClick={showModalTooltip} />\n </HStack>\n <HStack>\n <ActionButton\n tx={'create'}\n primary\n iconType={'add'}\n onClick={navigateToCreate}\n />\n <ActionButton\n tx={'payments.buy'}\n iconType={'shopping'}\n onClick={navigateToBuy}\n />\n <ActionButton iconType={'level'} onClick={navigateToStats} />\n </HStack>\n </TitleBar>\n\n {!!allProducts.length && (\n <HStack style={{ marginBottom: 16 }}>\n <Tabs\n unstyled\n maw={'max-content'}\n style={{\n flexDirection: 'row',\n flex: 1,\n rowGap: 20,\n }}\n selectedIndex={tabId}\n setSelectedIndex={(newTabId) => {\n setTabId(newTabId);\n }}\n >\n <TagButton value={'all'} tx=\"tabs.all\" />\n <TagButton value={'one-off'} tx=\"product.one-off\" />\n <TagButton value={'subscription'} tx=\"product.subscription\" />\n </Tabs>\n <Switch\n onChange={(val) => setShowDiscontinued(val.target.checked)}\n txLabel=\"product.discontinued\"\n />\n </HStack>\n )}\n\n {!products.length && (\n <Center style={{ marginTop: 16 }}>\n <EmptyList iconType={'shopping'} tx={'payments.noproducts'} />\n </Center>\n )}\n\n {isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <GridContainer>\n {[...products]\n .sort((a, b) => {\n if (a.status === 'discontinued' && b.status !== 'discontinued')\n return 1;\n if (a.status !== 'discontinued' && b.status === 'discontinued')\n return -1;\n\n return (\n dayjs(b.createdAt).valueOf() - dayjs(a.createdAt).valueOf()\n );\n })\n .map((product) => {\n const disabled = product.status !== 'active';\n\n return disabled ? (\n <ProductCard\n onClick={navigateToDetail}\n key={product.id}\n product={product}\n />\n ) : (\n <ProductCard\n key={product.id}\n onClick={navigateToDetail}\n onEdit={navigateToEdit}\n onInfo={navigateToDetail}\n onDiscontinue={discontinueProduct}\n product={product}\n />\n );\n })}\n </GridContainer>\n )}\n </SectionGrid>\n );\n};\n\nconst GridContainer = styled.div`\n display: flex;\n gap: 16px;\n flex: 1;\n flex-wrap: wrap;\n\n @media (${deviceMax.tablet}) {\n flex-direction: column;\n }\n`;\nexport default ProductsList;\n","import styled from 'styled-components';\n\nexport const StyledAgGrid = styled.div`\n --ag-background-color: ${({ theme }) => theme.white};\n --ag-header-background-color: ${({ theme }) => theme.grey10};\n --ag-odd-row-background-color: ${({ theme }) => theme.white};\n --ag-header-foreground-color: ${({ theme }) => theme.white};\n --ag-accent-color: ${({ theme }) => theme.primary};\n --ag-borders: none;\n --ag-border-color: ${({ theme }) => theme.transparent};\n --ag-row-border-color: ${({ theme }) => theme.transparent};\n --ag-row-height: 48px;\n --ag-header-height: 48px;\n --ag-cell-horizontal-padding: 12px;\n\n .ag-root-wrapper {\n border: 0;\n }\n\n .ag-header-cell {\n padding: 12px;\n font-weight: 500;\n }\n\n .ag-cell {\n padding: 12px;\n }\n\n .ag-header-cell-sorted-asc,\n .ag-header-cell-sorted-desc {\n color: ${({ theme }) => theme.grey50};\n }\n`;\n","import { Currency, PaymentStatus } from '@aclito/entities';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport { HStack } from '../components/Layout';\nimport { Text } from '../components/Text';\nimport { Icon } from '../components/Icons/Icon';\nimport { CardStatusBannerText } from '../components/Banner';\n\nexport interface AmountCellRendererProps {\n value: number;\n data: { currency: Currency; multisport: boolean };\n}\n\nexport const AmountCellRenderer = ({\n value,\n data,\n}: AmountCellRendererProps) => {\n const t = useTranslate();\n return (\n <HStack style={{ alignItems: 'center' }} spacing={8}>\n <Text>\n <b>{value}</b> <span>{t(`currency.${data.currency}`)}</span>\n </Text>\n {data.multisport && <Icon icon=\"multisport\" size=\"16\" color=\"grey50\" />}\n </HStack>\n );\n};\n\nexport interface StatusCellRendererProps {\n value: PaymentStatus;\n}\n\nexport const StatusCellRenderer = ({ value }: StatusCellRendererProps) => (\n <CardStatusBannerText type={value} />\n);\n","import { lazy, Suspense, useRef, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport {\n useGetPaidQuery,\n useGetProductsQuery,\n} from '@aclito/shared/redux/api/paymentApi';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\nimport {\n Currency,\n Payment,\n PaymentStatus,\n ProductType,\n UserInfo,\n} from '@aclito/entities';\nimport { Center, Loader } from '@mantine/core';\nimport { useTranslate, useTranslateDate } from '@aclito/shared/hooks';\nimport type { AgGridReact } from 'ag-grid-react';\nimport type { ColDef } from 'ag-grid-community';\nimport { StyledAgGrid } from '@aclito/ui-web/components/StyledAgGrid';\nimport {\n AmountCellRenderer,\n StatusCellRenderer,\n} from '@aclito/ui-web/payments/AgGridRenderers';\n\nimport {\n BackButton,\n EmptyList,\n HStack,\n Icon,\n Input,\n SectionGrid,\n Select,\n Title,\n TitleBar,\n} from '@/components';\n\n// Lazy load AG Grid\nconst AgGrid = lazy(() =>\n Promise.all([import('ag-grid-react'), import('ag-grid-community')]).then(\n ([{ AgGridReact }, { AllCommunityModule, ModuleRegistry }]) => {\n ModuleRegistry.registerModules([AllCommunityModule]);\n return { default: AgGridReact };\n },\n ),\n);\n\ntype TableData = {\n id: string;\n name: string;\n alias: string;\n date: string;\n amount: number;\n multisport: boolean;\n status: PaymentStatus;\n currency: Currency;\n};\n\ninterface ProductsListDetailInnerProps {\n id: string;\n productId: string;\n}\n\nconst ProductsListDetail = () => {\n const params = useParams();\n return params.id && params.productId ? (\n <ProductsListDetailInner id={params.id} productId={params.productId} />\n ) : null;\n};\n\nconst ProductsListDetailInner = ({\n productId,\n id,\n}: ProductsListDetailInnerProps) => {\n const [tempId, setTempId] = useState(productId);\n const gridRef = useRef<AgGridReact>(null);\n const { data: paymentData, isFetching, isLoading } = useGetPaidQuery(tempId);\n const { data: dataOrganization } = useFindOrganizationQuery({ id });\n const { data: products, isLoading: isLoadingProducts } =\n useGetProductsQuery(id);\n const t = useTranslate();\n const tDate = useTranslateDate();\n\n const payments = paymentData?.payments ?? [];\n const members = dataOrganization?.members ?? [];\n\n const getRowData = (): TableData[] => {\n const membersMap = new Map<UserInfo, Payment[]>();\n\n for (const member of members) {\n const paymentsArray = payments.filter(\n (payment) => payment.variableSymbol === member.userSymbol,\n );\n if (paymentsArray.length) {\n membersMap.set(member, paymentsArray);\n }\n }\n\n const data: TableData[] = [];\n membersMap.forEach((memberPayments, member) => {\n memberPayments.forEach((payment) => {\n const aliasFound = payment.aliasId\n ? member.aliases.find((alias) => alias.id === payment.aliasId)\n : null;\n\n data.push({\n id: payment.id,\n name: `${member.name} ${member.surname}`,\n alias: aliasFound ? `${aliasFound.name} ${aliasFound.surname}` : '',\n date: payment.createdAt,\n amount: payment.amount,\n multisport: payment.multisport,\n status: payment.status,\n currency: payment.currency,\n });\n });\n });\n return data;\n };\n\n const onFilterTextBoxChanged = () => {\n gridRef.current?.api.setGridOption(\n 'quickFilterText',\n (document.getElementById('filter-text-box') as HTMLInputElement).value,\n );\n };\n\n const productOptions =\n products?.map((product) => ({\n id: product.id,\n item: `${product.title} - ${t(`product.${product.type as ProductType}`)}`,\n })) ?? [];\n\n const columnDefs: ColDef<TableData>[] = [\n {\n field: 'name',\n headerName: t('auth.userinfo.name'),\n sortable: true,\n },\n {\n field: 'alias',\n headerName: t('alias'),\n sortable: true,\n },\n {\n field: 'date',\n headerName: t('date'),\n sortable: true,\n valueFormatter: (params) => tDate(params.value, 'date.short'),\n },\n {\n field: 'amount',\n headerName: t('payments.amountprocessed'),\n sortable: true,\n cellRenderer: AmountCellRenderer,\n },\n {\n field: 'status',\n headerName: t('product.status'),\n sortable: true,\n cellRenderer: StatusCellRenderer,\n },\n ];\n\n const rowData = getRowData();\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"payments.products.detail\" />\n </HStack>\n </TitleBar>\n\n <Select\n txLabel={'nav.products'}\n isLoading={isLoadingProducts}\n value={tempId}\n onChange={(newId) => newId && setTempId(newId)}\n options={productOptions}\n />\n\n {!(isFetching || isLoading) ? (\n <VStack spacing={4}>\n {rowData.length ? (\n <Suspense fallback={null}>\n <Input\n mt={16}\n txPlaceholder={'search'}\n w={250}\n icon={<Icon color={'grey50'} icon=\"search\" />}\n id={'filter-text-box'}\n onChange={onFilterTextBoxChanged}\n />\n <StyledAgGrid>\n <AgGrid\n rowData={rowData}\n domLayout=\"autoHeight\"\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n columnDefs={columnDefs}\n defaultColDef={{\n cellStyle: () => ({\n display: 'flex',\n alignItems: 'center',\n }),\n flex: 1,\n minWidth: 100,\n resizable: false,\n }}\n ref={gridRef}\n animateRows={true}\n enableCellTextSelection\n suppressMovableColumns={true}\n />\n </StyledAgGrid>\n </Suspense>\n ) : (\n <Center style={{ paddingTop: 24 }}>\n <EmptyList tx=\"payments.nopaymentsyet\" iconType=\"payment\" />\n </Center>\n )}\n </VStack>\n ) : (\n <Center style={{ padding: 24 }}>\n <Loader />\n </Center>\n )}\n </SectionGrid>\n );\n};\n\nexport default ProductsListDetail;\n","import { useNavigate, useParams } from 'react-router-dom';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\nimport { StyledTitle } from '@aclito/ui-web/utils/styles';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport {\n CreateProductInput,\n createProductInputValidator,\n ProductType,\n} from '@aclito/validators';\nimport { useCreateProductMutation } from '@aclito/shared/redux/api/paymentApi';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { SelectObject } from '@aclito/shared/types';\nimport { useEffect } from 'react';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\nimport { Organization } from '@aclito/entities';\nimport { MAX_PRICE, MIN_PRICE } from '@aclito/shared/util/constants';\nimport { useTheme } from 'styled-components';\n\nimport {\n ActionButton,\n SectionGrid,\n SmallButton,\n Text,\n TitleBar,\n ValidatedInput,\n ValidatedSelectV2,\n ValidatedNumberInputV2,\n ValidatedTextArea,\n Icon,\n ValidatedDropzone,\n ValidatedCheckbox,\n} from '@/components';\n\nconst ProductsEdit = () => {\n const params = useParams();\n const { data: org } = useFindOrganizationQuery(\n { id: params?.id ?? '' },\n { skip: !params.id },\n );\n\n if (!params.id || !org) return null;\n return <ProductsCreateInner org={org.org} />;\n};\n\nconst ProductsCreateInner = ({ org }: { org: Organization }) => {\n const id = org.id;\n const nav = useNavigate();\n const [create, { isLoading }] = useCreateProductMutation();\n\n const navBack = () => {\n nav(-1);\n };\n\n const methods = useForm<CreateProductInput>({\n defaultValues: {\n orgId: id,\n price: 0,\n priceMultisport: null,\n title: '',\n description: '',\n type: '' as ProductType,\n // expirationDate: null,\n leaveCharge: null,\n leaveChargeDate: null,\n autoJoin: false,\n file: undefined,\n },\n resolver: zodResolver(createProductInputValidator),\n mode: 'onSubmit',\n });\n const createNewProduct = async (data: CreateProductInput) => {\n if (\n methods.formState.isSubmitting ||\n methods.formState.isSubmitSuccessful\n ) {\n return;\n } else {\n await handleSubmit(data);\n }\n };\n\n const handleSubmit = async (data: CreateProductInput) => {\n await create(data);\n nav(-1);\n };\n\n const t = useTranslate();\n const theme = useTheme();\n\n const typeObject: Record<ProductType, string> = {\n 'one-off': t('product.one-off'),\n subscription: t('product.subscription'),\n };\n const typeOptions: SelectObject[] = Object.keys(typeObject).map((key) => ({\n id: key,\n item: typeObject[key as keyof typeof typeObject],\n }));\n const { watch, setValue } = methods;\n const watchType = watch('type');\n const watchLeaveCharge = watch('leaveCharge');\n\n useEffect(() => {\n if (watchType === 'one-off') {\n // setValue('expirationDate', null);\n setValue('autoJoin', false);\n }\n if (watchType === 'subscription') {\n setValue('leaveCharge', null);\n setValue('leaveChargeDate', null);\n }\n }, [setValue, watchType]);\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <StyledTitle tx=\"payments.products.create\" />\n <ActionButton\n onClick={navBack}\n bg={'red10'}\n textcolor={'red'}\n iconType={'close'}\n />\n </TitleBar>\n <FormProvider {...methods}>\n <VStack>\n <Text size={'lg'} tx={'product.create.info.note'} weight={'500'} />\n <div>\n <li>{t('product.create.info.discontinue')}</li>\n <li>{t('product.create.info.type')}</li>\n </div>\n\n <ValidatedNumberInputV2\n name=\"price\"\n icon={<Icon icon={'price'} size={20} color={'grey50'} />}\n required={true}\n txLabel=\"product.price\"\n placeholder={'0 ' + t(`currency.${org.currency}`)}\n min={1}\n max={MAX_PRICE}\n data-testid=\"price\"\n />\n\n <VStack spacing={4}>\n <ValidatedNumberInputV2\n name=\"priceMultisport\"\n icon={<Icon icon={'multisport'} size={20} color={'grey50'} />}\n txLabel=\"product.priceMultisport\"\n placeholder={'- ' + t(`currency.${org.currency}`)}\n min={MIN_PRICE}\n max={MAX_PRICE}\n data-testid=\"multisport\"\n />\n <Text tx={'product.create.free'} color={theme.grey50} size={'xs'} />\n </VStack>\n\n <ValidatedInput\n name=\"title\"\n required={true}\n txLabel=\"product.title\"\n txPlaceholder=\"product.title\"\n maxLength={256}\n />\n\n <ValidatedTextArea\n name=\"description\"\n required={true}\n txLabel=\"product.description\"\n txPlaceholder=\"product.description\"\n maxLength={1024}\n />\n <ValidatedSelectV2\n options={typeOptions}\n name=\"type\"\n required={true}\n txLabel=\"product.type\"\n txPlaceholder=\"product.type\"\n />\n {/*{watchType === 'subscription' && (*/}\n {/* <ValidatedDatePicker*/}\n {/* required={true}*/}\n {/* minDate={dayjs().add(1, 'day').toDate()}*/}\n {/* maxDate={dayjs().add(1, 'year').toDate()}*/}\n {/* txLabel={'product.subscription.exp'}*/}\n {/* name={'expirationDate'}*/}\n {/* />*/}\n {/*)}*/}\n\n {watchType === 'subscription' && (\n <ValidatedCheckbox\n txLabel={'product.subscription.autojoin'}\n name={'autoJoin'}\n />\n )}\n\n {watchType === 'one-off' && (\n <>\n <ValidatedNumberInputV2\n placeholder={'%'}\n txLabel={'product.oneoff.leavecharge'}\n name={'leaveCharge'}\n min={0}\n max={100}\n />\n\n <ValidatedNumberInputV2\n required={!!watchLeaveCharge}\n txLabel={'product.oneoff.leavecharge.date'}\n name={'leaveChargeDate'}\n min={1}\n max={999}\n data-testid=\"payment-time\"\n />\n </>\n )}\n\n <ValidatedDropzone name=\"image\" imageOnly circular={false} />\n\n <SmallButton\n bg={'primary'}\n disabled={isLoading}\n textcolor={'white'}\n onClick={() => {\n methods.handleSubmit(createNewProduct)();\n }}\n tx={'create'}\n data-testid=\"create-Button\"\n />\n </VStack>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default ProductsEdit;\n","import { Product } from '@aclito/entities';\n\nimport { ProductFinishRecord } from '@aclito/shared/types';\nimport { objectKeys } from '@aclito/shared/util/object';\n\nexport const getTotalPrice = (\n items: ProductFinishRecord,\n products: Product[],\n) => {\n let total = 0;\n\n const payments = objectKeys(items).flatMap((key) => items[key]);\n\n payments.forEach((payment) => {\n const product = products.find((p) => p.id === payment.productId);\n if (product) {\n total += payment.multisport\n ? product.priceMultisport ?? product.price\n : product.price;\n }\n });\n\n return total;\n};\n","import { Product } from '@aclito/entities';\n\nimport { DEFAULT_CURRENCY } from './constants';\n\nexport const allSameCurrency = (array: Product[]) => {\n if (array.length === 0) return true;\n const firstValue = array[0]['currency'];\n return array.every((item) => item['currency'] === firstValue);\n};\n\nexport const getCurrency = (array: Product[]) => {\n if (array.length === 0) return DEFAULT_CURRENCY;\n return array[0].currency;\n};\n","import { useForm } from 'react-hook-form';\nimport { PaymentArray } from '@aclito/validators';\nimport { EventRaw } from '@aclito/entities';\n\nimport { getTotalPrice } from '../utils/getTotalPrice';\nimport {\n useCreatePaymentsMutation,\n useGetCreditQuery,\n} from '../../../redux/api/paymentApi';\nimport { useAppSelector, useShowFlashMessage } from '../../../hooks';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\nimport { useEventInfoJoin } from '../../event/hooks/useEventInfoJoin';\nimport { ProductFinishMap, ProductFinishRecord } from '../../../types';\nimport { objectKeys } from '../../../util/object';\nimport { NONE } from '../../../util/constants';\nimport { getCurrency } from '../../../util/currency';\nimport { isAlias } from '../../../util/alias';\n\nexport const useProductsFinish = ({\n kart,\n ids,\n event,\n retryId,\n}: {\n kart: ProductFinishMap;\n ids: string[];\n event: EventRaw | undefined;\n retryId?: string;\n}) => {\n const { data: credit } = useGetCreditQuery();\n const [createPayments, { isLoading }] = useCreatePaymentsMutation();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const { joinEvent } = useEventInfoJoin();\n const showMessage = useShowFlashMessage();\n\n const products = Array.from(kart.values()) ?? [];\n const idsCopy = [...ids];\n const isSelectEnabled = !ids.length && !!userInfo.aliases.length && !retryId;\n const entries = Object.fromEntries(kart);\n const initialValues: ProductFinishRecord = {};\n for (const key of objectKeys(entries)) {\n const data = entries[key];\n initialValues[key] = [...Array<number>(data.amount)].fill(1).map(() => {\n const id = idsCopy.shift();\n const shouldFill = isAlias(id || '');\n const alias = userInfo.aliases.find((a) => a.id === id);\n const aliasId = shouldFill ? alias?.id ?? userInfo.id : userInfo.id;\n return {\n aliasId: aliasId,\n orgId: data.orgId,\n multisport: false,\n eventId: data.eventId ?? NONE,\n productId: key,\n };\n });\n }\n const methods = useForm<{ payments: ProductFinishRecord }>({\n defaultValues: { payments: initialValues },\n });\n const watchPayments = methods.watch('payments') ?? {};\n const totalPrice = getTotalPrice(watchPayments, products);\n\n const currency = getCurrency(products);\n const hasEnoughCredit = !!(credit && credit[currency].credit >= totalPrice);\n const canPay = hasEnoughCredit && !!objectKeys(watchPayments).length;\n\n const isAutoJoin = !!event && !!products[0]?.autoJoin; // there should be only one when going via event flow\n\n const handleSubmitData = async (\n paymentObject: ProductFinishRecord,\n ): Promise<boolean> => {\n const payments: PaymentArray = objectKeys(paymentObject).flatMap(\n (key) => paymentObject[key],\n );\n try {\n await createPayments({ payments, retryId }).unwrap();\n } catch (e) {\n showMessage('paymentError');\n return false;\n }\n if (event) {\n let result: { data: unknown } | { error: unknown };\n if (isAutoJoin) {\n result = await joinEvent(event, ids, event.repetitionId);\n } else {\n result = await joinEvent(event, ids);\n }\n\n if ('error' in result) {\n showMessage('joinEventError');\n return false;\n }\n }\n return true;\n };\n\n return {\n totalPrice,\n handleSubmitData,\n isSelectEnabled,\n createPayments,\n credit,\n methods,\n joinEvent,\n products,\n watchPayments,\n isLoading,\n currency,\n hasEnoughCredit,\n canPay,\n isAutoJoin,\n };\n};\n","import { TranslateKey } from '@aclito/shared/types';\nimport { useState } from 'react';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport styled from 'styled-components';\n\ntype TooltipProps = {\n children: React.ReactNode;\n txLabel: TranslateKey;\n position?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nconst Tooltip: React.FC<TooltipProps> = ({\n children,\n txLabel,\n position = 'top',\n}) => {\n const [isVisible, setIsVisible] = useState(false);\n const t = useTranslate();\n const getTooltipPosition = () => {\n switch (position) {\n case 'top':\n return 'bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px;';\n case 'right':\n return 'top: 50%; left: 100%; transform: translateY(-50%); margin-left: 8px;';\n case 'bottom':\n return 'top: 100%; left: 50%; transform: translateX(-50%); margin-top: 8px;';\n case 'left':\n return 'top: 50%; right: 100%; transform: translateY(-50%); margin-right: 8px;';\n default:\n return '';\n }\n };\n\n return (\n <TooltipWrapper\n onMouseEnter={() => setIsVisible(true)}\n onMouseLeave={() => setIsVisible(false)}\n >\n {children}\n {isVisible && (\n <TooltipText position={getTooltipPosition()}>{t(txLabel)}</TooltipText>\n )}\n </TooltipWrapper>\n );\n};\n\nconst TooltipWrapper = styled.div`\n display: inline-block;\n position: relative;\n`;\n\nconst TooltipText = styled.div<{ position: string }>`\n position: absolute;\n background-color: ${({ theme }) => theme.grey80};\n color: ${({ theme }) => theme.whiteText};\n padding: 8px;\n border-radius: 4px;\n font-size: 14px;\n white-space: nowrap;\n z-index: 10;\n ${({ position }) => position};\n`;\n\nexport default Tooltip;\n","import { useFieldArray, useFormContext } from 'react-hook-form';\nimport { PaymentArray } from '@aclito/validators';\nimport { Product } from '@aclito/entities';\n\nimport { ProductFinishRecord } from '../../../types';\nimport { useAppSelector } from '../../../hooks';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\n\nexport const useProductCard = ({\n initialValue,\n product,\n}: {\n initialValue: PaymentArray[number];\n product: Product;\n}) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n\n const { control, unregister, watch } = useFormContext<{\n payments: ProductFinishRecord;\n }>();\n\n const { fields, append, remove } = useFieldArray({\n control,\n name: `payments.${product.id}`,\n });\n const onRemove = () => {\n unregister(`payments.${product.id}`);\n };\n\n const onSubtract = (val: number) => {\n if (fields.length === 1) return;\n remove(val - 1);\n };\n const onAdd = () => {\n append({\n ...initialValue,\n multisport: false,\n aliasId: null,\n });\n };\n\n const aliasOptions = [userInfo, ...userInfo.aliases].map((alias) => ({\n id: alias.id,\n item: `${alias.name} ${alias.surname}`,\n }));\n\n const paymentArray = watch(`payments.${product.id}`);\n function findDuplicateIndices(payments: PaymentArray): number[] {\n const seen: Record<string, number> = {};\n const duplicates: number[] = [];\n for (const item of payments) {\n const index = payments.indexOf(item);\n const value = item.aliasId;\n if (!value) {\n duplicates.push(index);\n } else if (seen[value] !== undefined) {\n duplicates.push(index);\n } else {\n seen[value] = index;\n }\n }\n return duplicates;\n }\n\n return {\n invalidIndexes: findDuplicateIndices(paymentArray),\n aliasOptions,\n onAdd,\n onSubtract,\n onRemove,\n fields,\n };\n};\n","import { useState } from 'react';\nimport styled from 'styled-components';\n\nconst CounterContainer = styled.div`\n display: flex;\n gap: 16px;\n align-items: center;\n justify-content: space-between;\n border: 1px solid ${({ theme }) => theme.grey10};\n border-radius: 12px;\n padding: 5px 10px;\n background-color: ${({ theme }) => theme.white};\n`;\n\nconst Button = styled.button`\n background: none;\n border: none;\n font-size: 20px;\n color: ${({ theme }) => theme.grey80};\n cursor: pointer;\n`;\n\nconst CountDisplay = styled.span`\n font-size: 14px;\n font-weight: bold;\n`;\n\nconst ProductCounter = ({\n max,\n onAdd,\n onSubtract,\n min,\n}: {\n max: number;\n onAdd: () => void;\n onSubtract: (val: number) => void;\n min: number;\n}) => {\n const [current, setCount] = useState(1);\n\n const increment = () => {\n if (current >= max) return;\n setCount((prev) => {\n const res = prev + 1;\n onAdd();\n return res;\n });\n };\n const decrement = () => {\n setCount((prev) => {\n const res = Math.max(prev - 1, min);\n if (res >= min) {\n onSubtract(res);\n }\n return res;\n });\n };\n\n return (\n <CounterContainer>\n <Button onClick={decrement} disabled={current === 0}>\n –\n </Button>\n <CountDisplay>{current}x</CountDisplay>\n <Button onClick={increment}>+</Button>\n </CounterContainer>\n );\n};\n\nexport default ProductCounter;\n","import { PaymentArray, Product } from '@aclito/entities';\nimport { Fragment } from 'react';\nimport { BasicCard } from '@aclito/ui-web/components/CardStyles';\nimport { HStack, VStack } from '@aclito/ui-web/components/Layout';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport Tooltip from '@aclito/ui-web/components/Tooltip';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { useTheme } from 'styled-components';\nimport { useProductCard } from '@aclito/shared/features/payments/hooks/useProductCard';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport ProductCounter from '@/features/payments/components/ProductCounter';\nimport { Icon, ValidatedCheckbox, ValidatedSelectV2 } from '@/components';\n\nconst ProductFinishCard = ({\n product,\n initialValue,\n isSelectEnabled,\n}: {\n product: Product;\n isSelectEnabled: boolean;\n initialValue: PaymentArray[number];\n}) => {\n const theme = useTheme();\n const t = useTranslate();\n\n const { onAdd, aliasOptions, onSubtract, onRemove, fields, invalidIndexes } =\n useProductCard({\n initialValue,\n product,\n });\n\n return (\n <BasicCard key={product.id}>\n <HStack\n style={{\n justifyContent: 'space-between',\n paddingBottom: 16,\n }}\n >\n {product && (\n <>\n <Text text={product.title} size={'lg'} weight={'500'} />\n <HStack>\n <Text\n text={product.price + ` ${t(`currency.${product.currency}`)}`}\n size={'lg'}\n weight={'500'}\n />\n {Number.isInteger(product.priceMultisport) && (\n <HStack style={{ alignItems: 'center' }} spacing={4}>\n <Tooltip txLabel={'events.new.multisport'}>\n <Icon icon={'multisport'} color={'grey50'} size={'16'} />\n </Tooltip>\n <Text\n color={theme.grey50}\n text={\n product.priceMultisport === 0\n ? t('events.info.forFree')\n : `${product.priceMultisport} ${t(\n `currency.${product.currency}`,\n )}`\n }\n size={'sm'}\n />\n </HStack>\n )}\n {isSelectEnabled && (\n <>\n <ProductCounter\n min={1}\n max={aliasOptions.length}\n onAdd={onAdd}\n onSubtract={onSubtract}\n />\n <ActionButton\n onClick={onRemove}\n bg={'transparent'}\n iconType={'delete'}\n textcolor={'red'}\n />\n </>\n )}\n </HStack>\n </>\n )}\n </HStack>\n <VStack style={{ paddingLeft: 16 }}>\n {fields.map((field, index) => (\n <Fragment key={field.productId + index}>\n <HStack>\n {isSelectEnabled && <Text>{index + 1}.</Text>}\n <ValidatedSelectV2\n styles={{\n input: {\n backgroundColor: theme.white,\n color: theme.grey80,\n borderColor: theme.grey10,\n width: 300,\n ...(invalidIndexes.includes(index) && {\n borderColor: theme.red,\n }),\n },\n }}\n disabled={!isSelectEnabled}\n options={aliasOptions}\n name={`payments.${product.id}.${index}.aliasId`}\n txPlaceholder={'alias'}\n />\n {Number.isInteger(product.priceMultisport) && (\n <HStack>\n <Tooltip txLabel={'events.new.multisport'}>\n <Icon icon={'multisport'} color={'grey50'} size={'24'} />\n </Tooltip>\n <ValidatedCheckbox\n name={`payments.${product.id}.${index}.multisport`}\n />\n </HStack>\n )}\n </HStack>\n </Fragment>\n ))}\n {product.leaveCharge && product.leaveChargeDate && (\n <Text\n size={'sm'}\n color={theme.red}\n tx=\"product.modal.event.leavecharge.info\"\n txOptions={{\n value: product.leaveCharge,\n hours: product.leaveChargeDate,\n }}\n />\n )}\n </VStack>\n </BasicCard>\n );\n};\n\nexport default ProductFinishCard;\n","import styled, { keyframes } from 'styled-components';\nimport { Center } from '@mantine/core';\nimport { ActionButton } from '@aclito/ui-web/components/Button';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { Event } from '@aclito/entities';\n\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { ROUTE_EVENT_INFO } from '@/util/constants';\n\nconst drawCheck = keyframes`\n 0% {\n stroke-dashoffset: 100;\n }\n 100% {\n stroke-dashoffset: 0;\n }\n`;\n\nconst iconBounce = keyframes`\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.1);\n }\n`;\n\nconst Card = styled.div`\n background-color: white;\n border-radius: 8px;\n padding: 2rem;\n text-align: center;\n`;\n\nconst Title = styled(Text)`\n margin-bottom: 1rem;\n`;\n\nconst Message = styled(Text)`\n margin-bottom: 2rem;\n`;\n\nconst IconWrapper = styled.div`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n background-color: ${({ theme }) => theme.primary};\n border-radius: 50%;\n margin-bottom: 1rem;\n animation: ${iconBounce} 0.5s ease-in-out 0.5s;\n`;\n\nconst CheckmarkCircle = styled.circle`\n fill: none;\n stroke: white;\n stroke-width: 4;\n stroke-dasharray: 180;\n stroke-dashoffset: 180;\n animation: ${drawCheck} 0.5s ease-in-out forwards;\n`;\n\nconst CheckmarkPath = styled.path`\n fill: none;\n stroke: white;\n stroke-width: 4;\n stroke-dasharray: 100;\n stroke-dashoffset: 100;\n animation: ${drawCheck} 0.5s ease-in-out 0.3s forwards;\n`;\n\nexport default function PaymentSuccess({\n event,\n}: {\n event: Event | undefined;\n}) {\n const nav = useNavigate();\n\n return (\n <Center>\n <Card>\n <IconWrapper>\n <svg width=\"60\" height=\"60\" viewBox=\"0 0 60 60\">\n <CheckmarkCircle cx=\"30\" cy=\"30\" r=\"28\" />\n <CheckmarkPath d=\"M 20 30 L 28 38 L 40 22\" />\n </svg>\n </IconWrapper>\n <Title size={'xl'} weight={'500'} tx={'product.payment.success'} />\n\n <Message tx={'product.payment.continue'} />\n\n {event && (\n <ActionButton\n tx={'continue'}\n iconType={'forward'}\n onClick={() =>\n nav(ROUTE_EVENT_INFO, { state: { id: event.id }, replace: true })\n }\n />\n )}\n </Card>\n </Center>\n );\n}\n","import { useLocation, useNavigate } from 'react-router-dom';\nimport { Center, Divider } from '@mantine/core';\nimport { FormProvider } from 'react-hook-form';\nimport { Event } from '@aclito/entities';\nimport { useTheme } from 'styled-components';\nimport { closeAllModals } from '@mantine/modals';\nimport { ProductFinishMap, ProductFinishRecord } from '@aclito/shared/types';\nimport { objectKeys } from '@aclito/shared/util/object';\nimport { useProductsFinish } from '@aclito/shared/features/payments/hooks/useProductsFinish';\nimport { allSameCurrency } from '@aclito/shared/util/currency';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useShowTooltipModal } from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport ProductFinishCard from '../components/ProductFinishCard';\n\nimport {\n ActionButton,\n BackButton,\n HStack,\n Icon,\n InlineTooltip,\n SectionGrid,\n Text,\n Title,\n TitleBar,\n VStack,\n} from '@/components';\nimport { useModal } from '@/hooks/useModal';\nimport { ROUTE_PRODUCTS_RECHARGE } from '@/util/constants';\nimport PaymentSuccess from '@/features/payments/components/PaymentSuccess';\n\nconst ProductsFinish = () => {\n const state = useLocation().state;\n\n if (!state) return null;\n\n const ids = state.ids ?? [];\n const event = state.event;\n const retryId = state.retry;\n\n if (state.finished) {\n return <PaymentSuccess event={event} />;\n }\n if (!state.kart) {\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"payments.kart\" />\n </HStack>\n </TitleBar>\n <HStack>\n <Icon icon={'shopping'} />\n <Text tx={'product.kartempty'} />\n </HStack>\n </SectionGrid>\n );\n }\n return (\n <ProductsFinishInnerForm\n ids={ids}\n event={event}\n retryId={retryId}\n kart={state.kart as ProductFinishMap}\n />\n );\n};\n\nconst ProductsFinishInnerForm = ({\n kart,\n event,\n retryId,\n ids,\n}: {\n ids: string[];\n retryId: string | undefined;\n event: Event | undefined;\n kart: ProductFinishMap;\n}) => {\n const nav = useNavigate();\n const t = useTranslate();\n const [showModalTooltip] = useShowTooltipModal('productShoppingTooltip');\n\n const {\n totalPrice,\n credit,\n methods,\n watchPayments,\n products,\n isSelectEnabled,\n currency,\n canPay,\n hasEnoughCredit,\n handleSubmitData,\n isAutoJoin,\n } = useProductsFinish({ kart, ids, retryId, event });\n\n const handleSubmit = async (paymentObject: ProductFinishRecord) => {\n const success = handleSubmitData(paymentObject);\n if (!success) return;\n\n closeAllModals();\n nav(`/products/finish`, {\n state: { kart: {}, finished: true, event },\n replace: true,\n });\n };\n\n const navigateToRecharge = () => {\n nav(ROUTE_PRODUCTS_RECHARGE);\n };\n\n const theme = useTheme();\n const { openModal } = useModal();\n\n const openSubmitModal = () => {\n openModal({\n type: 'paymentConfirm',\n size: 'lg',\n values: {\n onConfirm: () => {\n methods.handleSubmit((data) => handleSubmit(data.payments))();\n },\n },\n });\n };\n\n if (!allSameCurrency(products)) {\n return <DifferentCurrency />;\n }\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"payments.kart\" />\n <Icon icon={'info'} color={'primary'} onClick={showModalTooltip} />\n </HStack>\n </TitleBar>\n {event && (\n <>\n <VStack spacing={8}>\n <InlineTooltip\n txTitle={'product.event.name'}\n txBody={isAutoJoin ? 'tooltip.product.buy.autojoin' : undefined}\n />\n <HStack style={{ alignItems: 'center' }} spacing={4}>\n <Icon icon={'datePicker'} size={24} />\n <Text text={event.name} size={'xl'} weight={'bold'} />\n </HStack>\n </VStack>\n <Divider my={8} />\n </>\n )}\n <VStack>\n <FormProvider {...methods}>\n {objectKeys(watchPayments).map((productId) => {\n const product = products.find((p) => p.id === productId);\n const initialData = watchPayments[productId][0]; //should be the same for each item;\n\n if (!product) {\n return null;\n }\n\n return (\n <ProductFinishCard\n key={productId}\n product={product}\n isSelectEnabled={isSelectEnabled}\n initialValue={{ ...initialData }}\n />\n );\n })}\n </FormProvider>\n <Divider />\n <HStack style={{ justifyContent: 'space-between' }}>\n <Text weight={'500'} tx={'product.buy.total'} size={'lg'} />{' '}\n <Text\n weight={'500'}\n text={totalPrice + ` ${t(`currency.${currency}`)}`}\n size={'lg'}\n />\n </HStack>\n\n {credit && (\n <HStack style={{ justifyContent: 'space-between' }}>\n <Text weight={'500'} tx={'product.buy.credit'} size={'lg'} />\n <HStack spacing={16}>\n {!hasEnoughCredit && (\n <HStack spacing={4}>\n <Icon icon={'info'} color={'red'} />\n <Text color={theme.red} tx={'product.notenoughtcredit'} />\n </HStack>\n )}\n <Text\n color={hasEnoughCredit ? theme.text : theme.red}\n weight={'500'}\n text={credit[currency].credit + ` ${t(`currency.${currency}`)}`}\n size={'lg'}\n />\n </HStack>\n </HStack>\n )}\n <HStack style={{ justifyContent: 'end' }}>\n <ActionButton\n onClick={navigateToRecharge}\n tx={'product.buy.recharge'}\n iconType={'add'}\n />\n {canPay && (\n <ActionButton\n onClick={openSubmitModal}\n tx={'product.buy.pay'}\n iconType={'payment'}\n />\n )}\n </HStack>\n </VStack>\n </SectionGrid>\n );\n};\n\nconst DifferentCurrency = () => (\n <SectionGrid $isOpen={false}>\n <Center>\n <Text tx={'currency.error'} />\n </Center>\n </SectionGrid>\n);\n\nexport default ProductsFinish;\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { useAppSelector, useSchema, useTranslate } from '@aclito/shared/hooks';\nimport {\n authActions,\n authSelectors,\n} from '@aclito/shared/redux/slices/authSlices';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport z from 'zod';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { Button } from '@aclito/ui-web/auth';\nimport { useNavigate } from 'react-router-dom';\nimport { Loader } from '@mantine/core';\nimport { sizeMax } from '@aclito/ui-web/utils/mediaQueries';\n\nimport {\n BackButton,\n HStack,\n Icon,\n SectionGrid,\n Title,\n TitleBar,\n ValidatedPasswordInput,\n VStack,\n} from '@/components';\n\nconst ChangePassword = () => {\n const isLoading = useAppSelector(authSelectors.isLoadingChangePassword);\n const navigation = useNavigate();\n const { passwordChangeSchema } = useSchema();\n const dispatch = useAppDispatch();\n\n type PasswordChange = z.infer<typeof passwordChangeSchema>;\n\n const submitNewPassword = async (values: PasswordChange) => {\n await dispatch(\n authActions.changePasswordAsync({\n new: values.newPassword,\n old: values.oldPassword,\n }),\n ).unwrap();\n };\n\n const handleSubmit = async (values: PasswordChange) => {\n await submitNewPassword(values);\n navigation(-1);\n };\n\n const { ...methods } = useForm<PasswordChange>({\n resolver: zodResolver(passwordChangeSchema),\n defaultValues: { newPassword: '', oldPassword: '' },\n });\n\n const t = useTranslate();\n\n return (\n <SectionGrid\n style={{ alignSelf: 'center', maxWidth: sizeMax.tablet }}\n $isOpen={false}\n >\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"auth.changePassword\" />\n </HStack>\n </TitleBar>\n <FormProvider {...methods}>\n <VStack>\n <ValidatedPasswordInput\n name=\"oldPassword\"\n data-testid=\"oldPassword\"\n txLabel=\"auth.password\"\n autoComplete={'current-password'}\n txPlaceholder=\"auth.password\"\n />\n\n <ValidatedPasswordInput\n name=\"newPassword\"\n data-testid=\"newPassword\"\n txLabel=\"auth.new.password\"\n autoComplete={'new-password'}\n txPlaceholder=\"auth.password\"\n />\n </VStack>\n <Button onClick={() => methods.handleSubmit(handleSubmit)()}>\n {t('auth.confirm.button')}\n {!isLoading ? (\n <Icon icon=\"forward\" size={24} color=\"whiteText\" />\n ) : (\n <Loader size={24} color=\"white\" />\n )}\n </Button>\n </FormProvider>\n </SectionGrid>\n );\n};\n\nexport default ChangePassword;\n","import { Modal } from '@mantine/core';\nimport { Title } from '@aclito/ui-web/components/Title';\nimport { config } from '@aclito/shared/config';\nimport { useAppSelector, useTranslate } from '@aclito/shared/hooks';\nimport styled, { useTheme } from 'styled-components';\nimport { VStack } from '@aclito/ui-web/components/Layout';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport { commonSelectors } from '@aclito/shared/redux/slices/commonSlices';\nimport { useEffect, useState } from 'react';\nimport { TAC } from '@aclito/shared/api/requests/custom/tac/getTac';\nimport api from '@aclito/shared/api/api';\nimport { updateAttributes } from '@aclito/shared/util/helpersApi';\nimport { TERMS_AND_CONDITIONS_SKIP_DATE } from '@aclito/shared/util/constants';\nimport dayjs from 'dayjs';\nimport { useNavigate } from 'react-router-dom';\nimport { useAuthenticator } from '@aws-amplify/ui-react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { StatusData } from '@aclito/shared/api/requests/custom/status/getStatus';\nimport { storage } from '@aclito/shared/lib/storage';\n\nimport { ActionButton, ValidatedCheckbox } from '@/components';\nimport { ROUTE_EVENTS, ROUTE_SIGN_IN } from '@/util/constants';\n\nconst TacUpdate = () => {\n const { signOut } = useAuthenticator((context) => [context.signOut]);\n const t = useTranslate();\n const theme = useTheme();\n const navigation = useNavigate();\n const [status, setStatus] = useState<StatusData | undefined>();\n const locale = useAppSelector(commonSelectors.locale);\n\n const [tac, setTac] = useState<TAC>({\n cs: [],\n en: [],\n sk: [],\n });\n\n useEffect(() => {\n if (!status) {\n api.custom.status.getStatus().then((data) => setStatus(data));\n }\n }, [status]);\n\n useEffect(() => {\n api.custom.tac.getTac().then((data) => setTac(data));\n }, []);\n\n const handleUpdate = async (s: StatusData) => {\n await updateAttributes({\n 'custom:termsAndConditions': s.termsAndConditionsVersion.toString(),\n });\n\n navigation(ROUTE_EVENTS);\n };\n\n const handleSkip = async () => {\n await storage.setItem(\n TERMS_AND_CONDITIONS_SKIP_DATE,\n dayjs().add(1, 'day').toISOString(),\n );\n\n navigation(ROUTE_EVENTS);\n };\n\n const methods = useForm({\n defaultValues: {\n pp: false,\n tac: false,\n },\n });\n\n const values = methods.watch();\n\n return (\n <Modal\n opened={true}\n onClose={() => {\n signOut();\n navigation(ROUTE_SIGN_IN);\n }}\n >\n <VStack>\n <Title tx={'auth.termsAndConditions.title'} />\n <VStack>\n <Text tx={'auth.termsAndConditionsUpdate'} />\n <VStack spacing={8}>\n <Link\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`${config.URL.aclitoTacURL}`}\n >\n {t('footer.terms')}\n </Link>\n <Link\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`${config.URL.aclitoPpURL}`}\n >\n {t('footer.privacy')}\n </Link>\n </VStack>\n </VStack>\n </VStack>\n <div\n style={{\n height: 300,\n backgroundColor: theme.background,\n borderRadius: 10,\n padding: 8,\n marginTop: 8,\n marginBottom: 8,\n overflowY: 'auto',\n }}\n >\n <VStack>\n {tac[locale].map((data, index) => (\n <div key={index}>\n <Text size={'xl'} style={{ paddingTop: 10 }} weight={'medium'}>\n {data.title}\n </Text>\n <Text size={'sm'}>{data.text}</Text>\n </div>\n ))}\n </VStack>\n </div>\n <VStack spacing={16}>\n <FormProvider {...methods}>\n <VStack style={{ alignItems: 'flex-start' }} spacing={8}>\n <ValidatedCheckbox name=\"pp\" txLabel={'footer.terms'} />\n <ValidatedCheckbox name=\"tac\" txLabel={'footer.privacy'} />\n {/*<ValidatedCheckbox name=\"gdpr\" txLabel={'gdpr'} />*/}\n </VStack>\n </FormProvider>\n\n {status && (\n <VStack spacing={8}>\n {new Date(status.termsAndConditionsVersionEffectiveDate).getTime() >\n new Date().getTime() && (\n <ActionButton tx=\"skip\" bg=\"primary10\" onClick={handleSkip} />\n )}\n\n <ActionButton\n tx=\"termsAndConditions.agree\"\n bg=\"primary\"\n textcolor={'whiteText'}\n disabled={!values.pp || !values.tac}\n onClick={() => handleUpdate(status)}\n />\n </VStack>\n )}\n </VStack>\n </Modal>\n );\n};\n\nconst Link = styled.a`\n color: ${({ theme }) => theme.primary};\n`;\n\nexport default TacUpdate;\n","//https://github.com/spayd/spayd-java/blob/master/ShortPaymentGenerator/src/org/spayd/utilities/IBANUtilities.java\ninterface CzechBankAccount {\n prefix: string;\n number: string;\n bankCode: string;\n}\n\nexport class IBAN {\n /**\n * Computes the IBAN number from a given Czech account information.\n * @param account A Czech account model class.\n * @return An IBAN number.\n */\n public static computeIBANFromCzechBankAccount(\n account: CzechBankAccount,\n ): string {\n // Preprocess the numbers\n const prefix = String(account.prefix).padStart(6, '0');\n const number = String(account.number).padStart(10, '0');\n const bank = String(account.bankCode).padStart(4, '0');\n\n // Calculate the checksum\n const buf = bank + prefix + number + '123500';\n let index = 0;\n let pz = -1;\n let dividend: string;\n\n while (index <= buf.length) {\n if (pz < 0) {\n dividend = buf.substring(index, Math.min(index + 9, buf.length));\n index += 9;\n } else if (pz >= 0 && pz <= 9) {\n dividend = pz + buf.substring(index, Math.min(index + 8, buf.length));\n index += 8;\n } else {\n dividend = pz + buf.substring(index, Math.min(index + 7, buf.length));\n index += 7;\n }\n pz = parseInt(dividend, 10) % 97;\n }\n\n pz = 98 - pz;\n\n // Assign the checksum\n const checksum = String(pz).padStart(2, '0');\n\n // Build the IBAN number\n return `CZ${checksum}${bank}${prefix}${number}`;\n }\n}\n\nexport const constructAccForDB = (\n prefix: string | undefined,\n acc: string,\n bank: string,\n) => {\n return prefix ? `${prefix}-${acc}/${bank}` : `${acc}/${bank}`;\n};\n\nexport const deconstructAccFromDB = (accountString: string) => {\n const [prefixAcc, bank] = accountString.split('/');\n const [prefix, acc] = prefixAcc.includes('-')\n ? prefixAcc.split('-')\n : `-${prefixAcc}`.split('-');\n\n return {\n prefix,\n acc,\n bank,\n };\n};\n","import { useAppSelector } from '../../../hooks';\nimport { profileSelectors } from '../../../redux/slices/profileSlices';\nimport { deconstructAccFromDB, IBAN } from '../../../util/bankUtils';\nimport { SPECIFIC_SYMBOL } from '../../../util/constants';\nimport { commonSelectors } from '../../../redux/slices/commonSlices';\n\nexport const useCreditRecharge = (price: string | number) => {\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const acc = useAppSelector(commonSelectors.status)?.bankAcc ?? '';\n const vs = userInfo.userSymbol.toString();\n\n const decomposedAcc = deconstructAccFromDB(acc);\n\n const iban = IBAN.computeIBANFromCzechBankAccount({\n bankCode: decomposedAcc.bank,\n number: decomposedAcc.acc,\n prefix: decomposedAcc.prefix,\n });\n const spayd = `SPD*1.0*ACC:${iban}*AM:${price}.00*CC:CZK*X-VS:${vs}*X-SS:${SPECIFIC_SYMBOL}`;\n\n return { spayd, acc, vs };\n};\n","import { QRCode } from 'react-qrcode-logo';\nimport { useRef, useState } from 'react';\nimport {\n MAX_PRICE,\n MIN_PRICE,\n SPECIFIC_SYMBOL,\n} from '@aclito/shared/util/constants';\nimport { useTheme } from 'styled-components';\nimport NumberInput from '@aclito/ui-web/components/Form/NumberInput';\nimport { useCreditRecharge } from '@aclito/shared/features/payments/hooks/useCreditRecharge';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport InfoBuilder from '@/features/event/screens/EventInfo/components/InfoBuilder';\nimport {\n BackButton,\n HStack,\n InlineTooltip,\n SectionGrid,\n Title,\n TitleBar,\n VStack,\n} from '@/components';\n\nconst CreditRecharge = () => {\n const qrRef = useRef<QRCode>(null);\n const [price, setPrice] = useState<number | null>(null);\n const { spayd, acc, vs } = useCreditRecharge(price ?? 0);\n const t = useTranslate();\n const theme = useTheme();\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"payments.finish\" />\n </HStack>\n </TitleBar>\n <VStack>\n <InlineTooltip\n txTitle={'tooltip.qrpayment'}\n txBody={'payment.finish.info'}\n />\n <div>\n <InfoBuilder\n data={[\n {\n label: 'payments.credentials.acc',\n text: {\n text: acc,\n style: { fontWeight: 'bold' },\n },\n },\n {\n label: 'payment.vs',\n text: { text: vs, style: { fontWeight: 'bold' } },\n },\n {\n label: 'payment.ss',\n text: { text: SPECIFIC_SYMBOL, style: { fontWeight: 'bold' } },\n },\n ]}\n />\n </div>\n\n <NumberInput\n value={price ?? 0}\n onChange={(value) => {\n setPrice(value as unknown as number);\n }}\n name=\"price\"\n txLabel={'events.new.price'}\n placeholder={`0${t(`currency.CZK`)}`}\n required={true}\n min={MIN_PRICE}\n w={270}\n max={MAX_PRICE}\n />\n <QRCode\n ref={qrRef}\n logoHeight={80}\n logoWidth={80}\n size={250}\n style={{ borderRadius: 10, padding: 6, background: theme.whiteText }}\n value={spayd}\n />\n </VStack>\n </SectionGrid>\n );\n};\n\nexport default CreditRecharge;\n","import { Organization } from '@aclito/entities';\nimport { LeaveForm } from '@aclito/shared/types';\nimport { useForm } from 'react-hook-form';\nimport { closeAllModals } from '@mantine/modals';\nimport {\n useJoinOrganizationMutation,\n useDeleteOrganizationMutation,\n useLeaveOrganizationMutation,\n} from '@aclito/shared/redux/api/organizationApi';\n\nimport {\n ROUTE_CALENDAR,\n ROUTE_FEED_EDIT,\n ROUTE_ORGANIZATIONS,\n} from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useWebShare } from '@/hooks/useWebShare';\nimport { useModal } from '@/hooks/useModal';\n\nexport const useOrganizationInfoHandlers = (org: Organization) => {\n const nav = useNavigate();\n const { handleShare } = useWebShare(org, true);\n const { openConfirmModal, openModal } = useModal();\n const [deleteOrganization] = useDeleteOrganizationMutation();\n const [joinOrganization] = useJoinOrganizationMutation();\n const [leaveOrganization] = useLeaveOrganizationMutation();\n const events = [];\n\n const methods = useForm<LeaveForm>({\n defaultValues: { area: '' },\n });\n\n const handleJoin = async () => {\n if (org.contact) {\n openModal({\n withCloseButton: true,\n size: 'auto',\n padding: 10,\n type: 'grantNotes',\n values: { handleGrant: join, orgName: org.name },\n });\n } else {\n openConfirmModal({\n txTitle: 'modal.confirmation',\n confirmProps: { color: 'primary' },\n txLabels: { cancel: 'close', confirm: 'org.join' },\n onConfirm: async () => {\n await join();\n },\n });\n }\n };\n\n const join = async () => {\n closeAllModals();\n await joinOrganization({ orgId: org.id }).unwrap();\n };\n\n const handleLeave = () => {\n openConfirmModal({\n txTitle: 'org.info.leave.header',\n txLabels: { cancel: 'close', confirm: 'leave' },\n type: 'leaveOrg',\n values: { methods },\n onConfirm: async () => {\n await leaveOrganization({\n orgId: org.id,\n message: methods.getValues().area,\n });\n\n nav(-1);\n },\n });\n };\n\n const handleAddPost = () => nav(ROUTE_FEED_EDIT);\n\n const handleDelete = () => {\n //TODO: move to BE\n if (events.length) {\n openConfirmModal({\n txTitle: 'org.info.delete.permissions.title',\n type: 'deleteOrgPermission',\n txLabels: { cancel: 'close', confirm: 'cancel' },\n });\n } else {\n openConfirmModal({\n txTitle: 'delete',\n txLabels: { cancel: 'close', confirm: 'delete' },\n type: 'deleteOrgConfirm',\n onConfirm: async () => {\n nav(ROUTE_ORGANIZATIONS);\n await deleteOrganization({ orgId: org.id });\n },\n });\n }\n };\n\n const handleCalendar = () => {\n nav(ROUTE_CALENDAR, { state: { org } });\n };\n\n return {\n handleJoin,\n handleLeave,\n handleDelete,\n handleCalendar,\n handleShare,\n handleAddPost,\n };\n};\n","import React from 'react';\nimport { useTheme } from 'styled-components';\nimport { Organization } from '@aclito/entities';\nimport { Menu } from '@mantine/core';\nimport { OrganizationModel } from '@aclito/shared/classes/OrganizationModel';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMin } from '@aclito/ui-web/utils/mediaQueries';\nimport {\n useNavigate as useReactRouterNavigate,\n createSearchParams,\n useNavigate,\n} from 'react-router-dom';\n\nimport { useOrganizationInfoHandlers } from '../hooks/useOrganizationInfoHandlers';\n\nimport { ActionButton, HStack, Text, Icon } from '@/components';\nimport { ROUTE_EDIT_ORGANIZATION, ROUTE_NEW_EVENT } from '@/util/constants';\n\ninterface ButtonsProps {\n org: Organization;\n compact?: boolean;\n}\n\nconst Buttons: React.FC<ButtonsProps> = ({ org, compact }) => {\n const queryTablet = useMediaQuery(deviceMin.tablet);\n\n const nav = useNavigate();\n const navigate = useReactRouterNavigate();\n const theme = useTheme();\n const { handleLeave, handleShare, handleDelete, handleAddPost } =\n useOrganizationInfoHandlers(org);\n\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const modelOrg = new OrganizationModel(org, userInfo);\n\n const handleButton = () => {\n navigate({\n pathname: ROUTE_NEW_EVENT,\n search: createSearchParams({ org: org.id }).toString(),\n });\n };\n const handleEdit = () => {\n nav(ROUTE_EDIT_ORGANIZATION, { state: { org } });\n };\n\n const shareOrg = () => {\n handleShare(org.id, 'org', org.name);\n };\n\n return (\n <>\n {compact ? (\n <HStack>\n {queryTablet && (\n <>\n {(modelOrg.isAdmin || modelOrg.isPowerUser) && (\n <ActionButton\n primary\n onClick={handleButton}\n iconType={'add'}\n tx={'create.event'}\n />\n )}\n {modelOrg.canCreateFeed && (\n <ActionButton\n primary\n iconType={'feed'}\n onClick={handleAddPost}\n tx={'org.add.feed'}\n />\n )}\n </>\n )}\n <Menu>\n <Menu.Target>\n <ActionButton iconType={'more'} />\n </Menu.Target>\n <Menu.Dropdown\n style={{\n borderRadius: '10px',\n backgroundColor: theme.white,\n color: theme.grey80,\n border: 'none',\n }}\n >\n {!queryTablet && (modelOrg.isAdmin || modelOrg.isPowerUser) && (\n <Menu.Item\n icon={<Icon icon=\"add\" size={24} />}\n onClick={handleButton}\n >\n <Text tx=\"create.event\" />\n </Menu.Item>\n )}\n {!queryTablet && modelOrg.canControl && (\n <Menu.Item\n icon={<Icon icon=\"feed\" size={24} />}\n onClick={handleAddPost}\n >\n <Text tx=\"org.add.feed\" />\n </Menu.Item>\n )}\n {modelOrg.canControl && (\n <Menu.Item\n icon={<Icon icon=\"edit\" size={24} />}\n onClick={handleEdit}\n >\n <Text tx=\"tooltip.edit\" />\n </Menu.Item>\n )}\n <Menu.Item\n icon={<Icon icon=\"share\" size={24} />}\n onClick={shareOrg}\n >\n <Text tx=\"tooltip.share\" />\n </Menu.Item>\n {modelOrg.canEdit && (\n <Menu.Item\n icon={<Icon icon=\"delete\" size={24} />}\n onClick={handleDelete}\n >\n <Text tx=\"tooltip.delete\" />\n </Menu.Item>\n )}\n {!modelOrg.isAdmin && modelOrg.isMember && (\n <Menu.Item\n icon={<Icon icon=\"leave\" size={24} />}\n onClick={handleLeave}\n >\n <Text tx=\"tooltip.leave\" />\n </Menu.Item>\n )}\n </Menu.Dropdown>\n </Menu>\n </HStack>\n ) : (\n <HStack>\n {(modelOrg.isAdmin || modelOrg.isPowerUser) && (\n <>\n <ActionButton\n primary\n onClick={handleButton}\n iconType={'add'}\n tx={'create.event'}\n />\n <ActionButton\n primary\n iconType={'feed'}\n onClick={handleAddPost}\n tx={'org.add.feed'}\n />\n </>\n )}\n {modelOrg.canControl && (\n <ActionButton\n iconType={'edit'}\n onClick={handleEdit}\n tx={'tooltip.edit'}\n />\n )}\n <ActionButton\n iconType={'share'}\n onClick={shareOrg}\n tx={'tooltip.share'}\n />\n {!modelOrg.isAdmin && modelOrg.isMember && (\n <ActionButton\n bg={'red10'}\n textcolor={'red'}\n iconType={'leave'}\n onClick={handleLeave}\n tx={'tooltip.leave'}\n />\n )}\n {modelOrg.canEdit && (\n <ActionButton\n bg={'red10'}\n textcolor={'red'}\n iconType={'delete'}\n onClick={handleDelete}\n tx={'tooltip.delete'}\n />\n )}\n </HStack>\n )}\n </>\n );\n};\n\nexport default Buttons;\n","import React from 'react';\nimport { Organization } from '@aclito/entities';\nimport { useSearchCalendarEventsQuery } from '@aclito/shared/redux/api/calendarEventsApi';\nimport { formatEvents } from '@aclito/shared/features/event/utils/formatEvents';\nimport VStack from '@aclito/ui-web/components/Layout/VStack';\nimport { BasicCard } from '@aclito/ui-web/components/CardStyles';\nimport { HStack } from '@aclito/ui-web/components/Layout';\nimport { Icon } from '@aclito/ui-web/components/Icons/Icon';\nimport { Text } from '@aclito/ui-web/components/Text';\nimport styled from 'styled-components';\nimport { EmptyList } from '@aclito/ui-web/components/EmptyList';\n\nimport EventsCards from '@/components/Cards/EventsCards';\nimport { useOrganizationInfoHandlers } from '@/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoHandlers';\n\ninterface TabContentProps {\n displayedOrg: Organization;\n}\n\nconst OrgEvents: React.FC<TabContentProps> = ({ displayedOrg }) => {\n const { data, isUninitialized, isSuccess } = useSearchCalendarEventsQuery({\n orgId: displayedOrg.id,\n });\n const events = formatEvents(data ?? []);\n\n const { handleCalendar } = useOrganizationInfoHandlers(displayedOrg);\n\n const showEmpty = !isUninitialized && isSuccess && !events?.length;\n\n return (\n <VStack>\n <Card onClick={handleCalendar}>\n <HStack>\n <Icon icon={'forward'} color={'primary'} />\n <Text\n size={'lg'}\n color={'primary'}\n weight={'500'}\n tx={'nav.calendar'}\n />\n </HStack>\n </Card>\n {showEmpty ? (\n <EmptyList tx=\"flatlist.noeventyet.other\" iconType=\"calendar\" />\n ) : (\n <EventsCards\n {...{\n data: events,\n showDateType: 'month',\n }}\n />\n )}\n </VStack>\n );\n};\n\nconst Card = styled(BasicCard)`\n transition: background-color 150ms ease-in-out;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.grey10};\n }\n`;\n\nexport default OrgEvents;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Organization } from '@aclito/entities';\nimport { useTranslate } from '@aclito/shared/hooks';\n\nimport InfoBuilder from '../../../../event/screens/EventInfo/components/InfoBuilder';\n\nimport { useOrganizationInfoSection } from '@/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoSection';\n\ntype DescriptionProps = {\n displayedOrg: Organization;\n};\n\nconst Description: React.FC<DescriptionProps> = ({ displayedOrg }) => {\n const { adminNames } = useOrganizationInfoSection(displayedOrg);\n const t = useTranslate();\n return (\n <Content>\n <InfoBuilder\n data={[\n {\n text: { text: adminNames.join(', ') },\n icon: 'person',\n label: 'org.info.admin',\n },\n {\n text: { text: displayedOrg?.telephone || '' },\n icon: 'telephone',\n label: 'org.telephone',\n visible: !!displayedOrg?.telephone,\n },\n {\n text: { text: displayedOrg?.email || '' },\n icon: 'email',\n label: 'org.email',\n visible: !!displayedOrg?.email,\n },\n {\n text: {\n text: t(displayedOrg?.private ? 'yes' : 'no'),\n },\n icon: 'lock',\n label: 'org.private',\n },\n {\n text: { text: displayedOrg?.address || '' },\n icon: 'place',\n label: 'org.info.address',\n visible: !!displayedOrg?.address,\n },\n {\n text: {\n text: t(displayedOrg?.contact ? 'yes' : 'no'),\n },\n icon: 'note',\n label: 'org.contact',\n },\n {\n text: { text: displayedOrg?.description || '' },\n icon: 'edit',\n label: 'org.info.description',\n visible: !!displayedOrg?.description,\n vertical: true,\n },\n ]}\n />\n </Content>\n );\n};\n\nconst Content = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport default Description;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Organization } from '@aclito/entities';\n\nimport { useOrganizationInfoHandlers } from '../hooks/useOrganizationInfoHandlers';\n\nimport { Icon, HStack, Text } from '@/components';\n\ninterface JoinOrganizationButtonProps {\n org: Organization;\n canJoin: boolean;\n}\n\nconst JoinOrganizationButton: React.FC<JoinOrganizationButtonProps> = ({\n org,\n canJoin,\n}) => {\n const { handleJoin } = useOrganizationInfoHandlers(org);\n\n return (\n <>\n {canJoin && (\n <StyledButton onClick={handleJoin}>\n <HStack spacing={8}>\n <Icon icon={'forward'} color=\"whiteText\"></Icon>\n <Text weight=\"500\" tx={'org.join'} color=\"whiteText\"></Text>\n </HStack>\n </StyledButton>\n )}\n </>\n );\n};\n\nconst StyledButton = styled.button`\n display: flex;\n height: 2.5rem;\n padding: 0.75rem 1rem;\n justify-content: center;\n align-items: center;\n align-self: flex-start;\n border-radius: 10px;\n border: unset;\n background: ${({ theme }) => theme.primary};\n color: ${({ theme }) => theme.whiteText};\n &:hover {\n filter: brightness(95%);\n }\n cursor: pointer;\n`;\n\nexport default JoinOrganizationButton;\n","import { Organization } from '@aclito/entities';\nimport HStack from '@aclito/ui-web/components/Layout/HStack';\nimport { useLayoutEffect, useState } from 'react';\nimport { debounce } from '@aclito/shared/util/debounce';\nimport { useTheme } from 'styled-components';\nimport { Center } from '@mantine/core';\nimport { useNavigate } from 'react-router-dom';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\n\nimport { Avatar, Text } from '@/components';\nimport { useOrganizationInfoSection } from '@/features/organization/screens/OrganizationInfo/hooks/useOrganizationInfoSection';\nimport { ROUTE_PROFILE, ROUTE_USER_PROFILE } from '@/util/constants';\n\ntype MembersProps = {\n organization: Organization;\n};\n\nconst MembersMini = ({ organization }: MembersProps) => {\n const { adminInfo, memberInfo, powerUsersInfo } =\n useOrganizationInfoSection(organization);\n\n const nav = useNavigate();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const [howManyAvatarsToFit, setHowManyAvatarsToFit] = useState<number | null>(\n null,\n );\n const containerId = 'avatarFlexContainer';\n const avatarSpacing = 8;\n const avatarSize = 50;\n const approximateChildWidth = avatarSize + avatarSpacing;\n\n useLayoutEffect(() => {\n const checkContainer = () => {\n const flexContainer = document.getElementById(containerId);\n const containerWidth = flexContainer?.clientWidth ?? 0;\n setHowManyAvatarsToFit(\n Math.floor(\n (containerWidth - approximateChildWidth) / approximateChildWidth,\n ),\n );\n };\n\n checkContainer();\n const debouncedCheckFlexWrap = debounce(checkContainer, 200);\n window.addEventListener('resize', debouncedCheckFlexWrap);\n\n return () => {\n window.removeEventListener('resize', debouncedCheckFlexWrap);\n };\n }, [approximateChildWidth, containerId]);\n\n const members = [...adminInfo, ...powerUsersInfo, ...memberInfo];\n const theme = useTheme();\n\n const isToBeSliced = howManyAvatarsToFit\n ? members.length > howManyAvatarsToFit\n : false;\n const avatars = isToBeSliced\n ? members.slice(0, howManyAvatarsToFit ?? Infinity)\n : members;\n\n const navigate = (memberId: string) =>\n userInfo.id === memberId\n ? nav(ROUTE_PROFILE)\n : nav(ROUTE_USER_PROFILE, { state: { userId: memberId } });\n\n return (\n <HStack id={containerId} spacing={avatarSpacing}>\n {avatars.map((member) => (\n <Avatar\n onClick={() => navigate(member.id)}\n key={member.id}\n size={avatarSize}\n image={member.image}\n />\n ))}\n {isToBeSliced && (\n <Center\n style={{\n height: 50,\n width: 50,\n backgroundColor: theme.primary10,\n borderRadius: '50%',\n }}\n >\n <Text style={{ color: theme.primary }}>\n {members.length - (howManyAvatarsToFit || 0)}+\n </Text>\n </Center>\n )}\n </HStack>\n );\n};\n\nexport default MembersMini;\n","import { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Center, Loader, Space } from '@mantine/core';\nimport {\n isClub,\n isOrganization,\n isTeam,\n} from '@aclito/shared/features/organization/utils/getOrgTag';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\nimport { useOrganizationModel } from '@aclito/shared/hooks/useOrganizationModel';\nimport { closeAllModals } from '@mantine/modals';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { OrganizationModelDetermined } from '@aclito/shared/classes/OrganizationModel';\nimport { dateSort } from '@aclito/shared/util/sorter';\nimport { ProductFinishMap } from '@aclito/shared/types';\nimport { Product } from '@aclito/entities';\nimport { useProductsBuy } from '@aclito/shared/features/payments/hooks/useProductsBuy';\n\nimport FeedList from '../../components/FeedList';\n\nimport { useOrganizationInfoSection } from './hooks/useOrganizationInfoSection';\nimport { Buttons, OrgEvents } from './components';\nimport Description from './components/Description';\nimport JoinOrganizationButton from './components/JoinOrganizationButton';\n\nimport {\n TitleButtons,\n Collapsible,\n ActionButton,\n HStack,\n Tab,\n Tabs,\n Text,\n TitleBar,\n VStack,\n PlayersMembersNumber,\n Title,\n OrgAvatar,\n SectionTitle,\n CardStatusBannerText,\n EmptyList,\n} from '@/components';\nimport RoleBanner from '@/features/organization/screens/OrganizationInfo/components/RoleBanner';\nimport { useFlexWrap } from '@/hooks/useFlexWrap';\nimport { useModal } from '@/hooks/useModal';\nimport { useNotes } from '@/features/notes/screens/Notes/hooks/useNotes';\nimport { useToggleProvider } from '@/providers/ToggleProvider';\nimport ProductCard from '@/components/Cards/ProductCard';\nimport MembersMini from '@/features/organization/screens/OrganizationInfo/components/MembersMini';\nimport { ROUTE_ORGANIZATIONS } from '@/util/constants';\n\nconst OrganizationInfo = () => {\n const id = useParams()?.id;\n const { data, isFetching, model } = useOrganizationModel(id);\n\n if (!id) return null;\n\n if (isFetching) {\n return (\n <CenterLoader>\n <Loader />\n </CenterLoader>\n );\n }\n\n if (!data?.org || !model) return null;\n\n return <OrganizationInfoInner model={model as OrganizationModelDetermined} />;\n};\n\nconst OrganizationInfoInner = ({\n model,\n}: {\n model: OrganizationModelDetermined;\n}) => {\n const organization = model.organization;\n const { products, createKart, isQuerySuccess, isLoading } = useProductsBuy(\n organization.id,\n );\n const { myRole } = useOrganizationInfoSection(organization);\n const { toggle } = useToggleProvider();\n const nav = useNavigate();\n const [tabIndex, setTabIndex] = useState({\n index: '0',\n });\n\n const handleTabIndexChange = (index: string) => {\n setTabIndex({\n index,\n });\n };\n\n const handleNavigateProducts = () => {\n nav(`/products/${organization.id}/list`);\n };\n\n const handleNavigateProductsBuy = (kart?: ProductFinishMap) => {\n nav(`/products/${organization.id}/buy`, { state: { kart } });\n };\n\n const handleNavigateMembers = () => {\n nav(`${ROUTE_ORGANIZATIONS}/${organization.id}?tab=members`);\n };\n\n const { openModal } = useModal();\n const { contactFilled } = useNotes();\n\n useEffect(() => {\n if (\n organization &&\n organization.contact &&\n model.isMember &&\n !contactFilled\n ) {\n openModal({\n withCloseButton: true,\n size: 'auto',\n padding: 10,\n type: 'grantNotes',\n values: {\n handleGrant: async () => closeAllModals(),\n orgName: organization.name,\n },\n });\n }\n }, [organization]);\n\n const onProductClick = (product: Product) => {\n const kart = createKart(product);\n handleNavigateProductsBuy(kart);\n };\n const id = 'titleFlexContainer';\n const isFlexWrapped = useFlexWrap(id, [organization]);\n const queryMobile = useMediaQuery(deviceMax.mobile);\n\n return (\n <>\n <TitleBar id={id}>\n <TitleButtons>\n <HStack>\n <OrganizationsButton\n onClick={toggle}\n iconType={'leftDrop'}\n tx=\"org.title\"\n />\n <Title tx=\"org.info\" />\n </HStack>\n </TitleButtons>\n <Buttons org={organization} compact={isFlexWrapped || queryMobile} />\n </TitleBar>\n\n <VStack spacing={16}>\n <HStack spacing={16} align={'center'}>\n <OrgAvatar org={organization} size={64} />\n <VStack spacing={4} style={{ flex: 1 }}>\n <HStack\n spacing={8}\n style={{\n justifyContent: 'space-between',\n }}\n >\n <Text style={{ fontWeight: 500 }} size={20}>\n {organization.name}\n </Text>\n <PlayersMembersNumber\n textSize={20}\n withIcon\n organization={organization}\n />\n </HStack>\n <HStack spacing={4}>\n <RoleBanner myRole={myRole} />\n {isClub(organization) && (\n <CardStatusBannerText type={'orgTypeClub'} />\n )}\n {isTeam(organization) && (\n <CardStatusBannerText type={'orgTypeTeam'} />\n )}\n {isOrganization(organization) && (\n <CardStatusBannerText type={'orgTypeOrganization'} />\n )}\n </HStack>\n </VStack>\n </HStack>\n <JoinOrganizationButton org={organization} canJoin={model.canJoin} />\n </VStack>\n <Space h={24} />\n <Tabs\n selectedIndex={tabIndex.index}\n setSelectedIndex={handleTabIndexChange}\n data-testid=\"org-list\"\n >\n <Tab tx=\"org.info\" data-testid=\"org-info\" />\n <Tab tx=\"org.events\" data-testid=\"org-events\" />\n <Tab tx=\"nav.feed\" data-testid=\"org-comments\" />\n </Tabs>\n <Space h={16} />\n {tabIndex.index === '0' && (\n <>\n <Collapsible buttonLabelTx=\"org.description\" defaultOpen>\n <Description displayedOrg={organization} data-testid=\"org-info\" />\n </Collapsible>\n <Space h={16} />\n <SectionTitle\n onClick={handleNavigateMembers}\n buttonLabelTx=\"org.members\"\n />\n <Space h={16} />\n <MembersMini organization={organization} />\n <Space h={16} />\n {model.organization.isRegistered && (\n <>\n <SectionTitle\n onClick={\n model.isAdmin\n ? handleNavigateProducts\n : () => handleNavigateProductsBuy()\n }\n buttonLabelTx=\"nav.products\"\n />\n <Space h={16} />\n {isLoading ? (\n <Center>\n <Loader />\n </Center>\n ) : (\n <>\n {isQuerySuccess && !products.length ? (\n <EmptyList\n iconType={'shopping'}\n tx={'payments.noproducts'}\n />\n ) : (\n <GridContainer>\n {dateSort(products, 'updatedAt', 'desc')\n .slice(0, 3)\n .map((product) => (\n <ProductCard\n onAdd={onProductClick}\n onRemove={() => {\n return;\n }}\n key={product.id}\n product={product}\n />\n ))}\n </GridContainer>\n )}\n </>\n )}\n </>\n )}\n </>\n )}\n\n {tabIndex.index === '1' && (\n <OrgEvents data-testid=\"org-events\" displayedOrg={organization} />\n )}\n {tabIndex.index === '2' && (\n <FeedList data-testid=\"org-comments\" orgId={organization.id} />\n )}\n </>\n );\n};\n\nconst GridContainer = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: 16px;\n`;\n\nconst CenterLoader = styled(Center)`\n width: 100%;\n height: 100%;\n`;\n\nconst OrganizationsButton = styled(ActionButton)`\n @media ${deviceMin.laptop} {\n display: none;\n }\n`;\n\nexport default OrganizationInfo;\n","import { useState } from 'react';\nimport { useGetStatsQuery } from '@aclito/shared/redux/api/paymentApi';\nimport { NONE } from '@aclito/shared/util/constants';\nimport dayjs from 'dayjs';\nimport { UserAlias, UserInfo } from '@aclito/entities';\nimport { useTranslateDate } from '@aclito/shared/hooks';\n\nexport const useInvoice = (id: string, endpoint: 'org' | 'admin') => {\n const [value, setValue] = useState<[Date | null, Date | null]>([null, null]);\n const tDate = useTranslateDate();\n const { data, isFetching } = useGetStatsQuery(\n {\n id,\n startDate: value[0] ? dayjs(value[0]).startOf('day').toISOString() : '',\n endDate: value[1] ? dayjs(value[1]).endOf('day').toISOString() : '',\n endpoint,\n },\n { skip: value.some((v) => v === null) },\n );\n\n const payments = data?.payments ?? [];\n const events = data?.events ?? [];\n const users = data?.users ?? [];\n const products = data?.products ?? [];\n const paid = payments.filter((d) => d.status === 'paid') ?? [];\n const refunded = payments.filter((d) => d.status === 'refunded') ?? [];\n const allPayments = [...paid, ...refunded];\n\n const allOneOffPayments = [\n ...paid.filter((d) => d.eventId !== NONE),\n ...refunded.filter((d) => d.leaveCharge > 0),\n ];\n const numberOfOneOffPayments = allOneOffPayments.length;\n\n const allSubscriptionPayments = paid.filter((d) => d.eventId === NONE);\n const numberOfSubscriptionPayments = allSubscriptionPayments.length;\n\n const totalSubscription = allPayments\n .filter((d) => d.eventId === NONE)\n .reduce(\n (partialSum, a) =>\n a.status === 'paid'\n ? partialSum + a.amount\n : partialSum + a.leaveCharge,\n 0,\n );\n\n const totalOneOff = allPayments\n .filter((d) => d.eventId !== NONE)\n .reduce(\n (partialSum, a) =>\n a.status === 'paid'\n ? partialSum + a.amount\n : partialSum + a.leaveCharge,\n 0,\n );\n\n const tableSubscriptionPayments = allSubscriptionPayments.map((payment) => {\n let userName = '';\n const date = payment?.datePaid ? tDate(payment.datePaid, 'date.full') : '';\n const user = users.find((u) => u.id === payment.userId);\n const actualUser: (UserInfo | UserAlias) | undefined =\n payment.aliasId !== NONE\n ? user?.aliases.find((a) => a.id === payment.aliasId)\n : user;\n\n if (actualUser) {\n userName = `${actualUser.name} ${actualUser.surname}`;\n }\n\n const productName =\n products.find((p) => p.id === payment.productId)?.title ?? '';\n\n return {\n name: userName,\n date,\n rawDate: payment?.datePaid ?? '',\n ...payment,\n productName,\n };\n });\n\n const tableOneOffPayments = allOneOffPayments.map((payment) => {\n let userName = '';\n const event = events.find((e) => e.id === payment.eventId);\n const eventName = event?.name ?? '';\n const eventDate = event?.date ? tDate(event.date, 'date.display') : '';\n\n const user = users.find((u) => u.id === payment.userId);\n const actualUser: (UserInfo | UserAlias) | undefined =\n payment.aliasId !== NONE\n ? user?.aliases.find((a) => a.id === payment.aliasId)\n : user;\n\n if (actualUser) {\n userName = `${actualUser.name} ${actualUser.surname}`;\n }\n\n return {\n userName,\n eventName,\n eventDate,\n rawDate: event?.date ?? '',\n ...payment,\n amount: payment.status === 'paid' ? payment.amount : payment.leaveCharge,\n };\n });\n\n return {\n tableSubscriptionPayments,\n tableOneOffPayments,\n numberOfOneOffPayments,\n totalOneOff,\n totalSubscription,\n numberOfSubscriptionPayments,\n value,\n setValue,\n isReady: !!data,\n isFetching,\n };\n};\n","import styled from 'styled-components';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { Organization } from '@aclito/entities';\n\ninterface InvoiceTableProps {\n isReady: boolean;\n org: Organization;\n totalSubscription: number;\n totalOneOff: number;\n numberOfOneOffPayments: number;\n numberOfSubscriptionPayments: number;\n}\n\nconst InvoiceTable = ({\n isReady,\n numberOfOneOffPayments,\n org,\n totalSubscription,\n numberOfSubscriptionPayments,\n totalOneOff,\n}: InvoiceTableProps) => {\n const t = useTranslate();\n return (\n <TableContainer>\n <StyledTable>\n <TableHeader>\n <tr>\n <HeaderCell>{t('product.type')}</HeaderCell>\n <HeaderCell>#</HeaderCell>\n <HeaderCell>{t('product.buy.total').slice(0, -1)}</HeaderCell>\n </tr>\n </TableHeader>\n <TableBody>\n <TableRow>\n <TableCell>{t('product.one-off')}</TableCell>\n <TableCell>{!isReady ? '-' : numberOfOneOffPayments}</TableCell>\n <TableCell>\n {!isReady\n ? '-'\n : `${totalOneOff} ${t(`currency.${org.currency}`)}`}\n </TableCell>\n </TableRow>\n <TableRow>\n <TableCell>{t('product.subscription')}</TableCell>\n <TableCell>\n {!isReady ? '-' : numberOfSubscriptionPayments}\n </TableCell>\n <TableCell>\n {!isReady\n ? '-'\n : `${totalSubscription} ${t(`currency.${org.currency}`)}`}\n </TableCell>\n </TableRow>\n </TableBody>\n </StyledTable>\n </TableContainer>\n );\n};\n\nconst TableContainer = styled.div`\n width: 100%;\n margin: 20px 0;\n border-collapse: collapse;\n border-radius: 8px;\n overflow: hidden;\n background-color: ${({ theme }) => theme.white};\n`;\n\nconst StyledTable = styled.table`\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n`;\n\nconst TableHeader = styled.thead`\n background-color: ${({ theme }) => theme.grey10};\n text-align: left;\n`;\n\nconst HeaderCell = styled.th`\n padding: 12px;\n font-size: 14px;\n color: ${({ theme }) => theme.grey40};\n`;\n\nconst TableBody = styled.tbody`\n font-size: 14px;\n`;\n\nconst TableRow = styled.tr``;\n\nconst TableCell = styled.td`\n padding: 12px;\n`;\n\nexport default InvoiceTable;\n","import { DatePickerInput } from '@mantine/dates';\nimport { useTheme } from 'styled-components';\nimport { useTranslate } from '@aclito/shared/hooks';\nimport { useParams } from 'react-router-dom';\nimport dayjs from 'dayjs';\nimport { useFindOrganizationQuery } from '@aclito/shared/redux/api/organizationApi';\nimport { Organization } from '@aclito/entities';\nimport { useInvoice } from '@aclito/ui-web/payments/useInvoice';\nimport InvoiceTable from '@aclito/ui-web/payments/InvoiceTable';\n\nimport {\n BackButton,\n HStack,\n Icon,\n SectionGrid,\n Title,\n TitleBar,\n} from '@/components';\n\nconst OrganizationStats = () => {\n const params = useParams();\n const { data: org } = useFindOrganizationQuery(\n { id: params?.id ?? '' },\n { skip: !params.id },\n );\n if (!params.id || !org) return null;\n\n return <OrganizationStatsInner org={org.org} />;\n};\n\nconst OrganizationStatsInner = ({ org }: { org: Organization }) => {\n const id = org.id;\n const {\n numberOfSubscriptionPayments,\n totalSubscription,\n totalOneOff,\n numberOfOneOffPayments,\n value,\n isReady,\n setValue,\n } = useInvoice(id, 'org');\n\n const theme = useTheme();\n const t = useTranslate();\n\n return (\n <SectionGrid $isOpen={false}>\n <TitleBar>\n <HStack>\n <BackButton />\n <Title tx=\"empty.space\" />\n </HStack>\n </TitleBar>\n <DatePickerInput\n type=\"range\"\n variant=\"filled\"\n mb={16}\n // @ts-ignore\n placeholder={t('date')}\n icon={<Icon color=\"grey50\" icon={'calendar'} />}\n styles={{\n input: {\n backgroundColor: theme.white,\n color: theme.grey80,\n },\n }}\n size=\"md\"\n radius={10}\n value={value}\n onChange={setValue}\n minDate={dayjs().subtract(1, 'year').toDate()}\n maxDate={dayjs().toDate()}\n />\n <InvoiceTable\n {...{\n numberOfSubscriptionPayments,\n totalSubscription,\n totalOneOff,\n numberOfOneOffPayments,\n isReady,\n org,\n }}\n />\n </SectionGrid>\n );\n};\n\nexport default OrganizationStats;\n","export default \"__VITE_ASSET__9a8e5aeb__\"","import { EventFilters } from '@aclito/shared/redux/types';\n\nexport const getLiteFilters = (\n orgId: string | undefined,\n filters: EventFilters,\n) => {\n const orgFilter = { item: '', id: orgId ?? '' };\n\n return {\n org: orgFilter,\n freeOnly: filters.freeOnly,\n price: filters.price,\n from: filters.from,\n to: filters.to,\n activityType: filters.activityType,\n query: filters.query,\n tags: filters.tags,\n };\n};\n","import { createAsyncThunk, unwrapResult } from '@reduxjs/toolkit';\nimport { getLiteFilters } from '@aclito/ui-mobile/utils/getLiteFilters';\n\nimport { ThunkType } from '../types';\nimport {\n profileActions,\n commonActions,\n notificationActions,\n authActions,\n} from '../slices';\nimport { AppState } from '../store';\nimport { eventApi } from '../api/eventApi';\nimport { noteActions } from '../slices/noteSlices';\nimport { feedApi } from '../api/feedApi';\nimport { achievementApi } from '../api/achievementApi';\nimport { setupUser } from '../../lib/sentry';\n\nimport { organizationApi } from '@aclito/shared/redux/api/organizationApi';\n\nexport const REDUX_LOAD_ALL = 'loadAll';\n\nexport const loadAllAsync = createAsyncThunk<boolean, void, ThunkType>(\n REDUX_LOAD_ALL,\n async (_data, { dispatch, ...thunkAPI }) => {\n try {\n const { canLoadAgain } = (thunkAPI.getState() as AppState).isFirstLoaded;\n\n if (canLoadAgain) {\n dispatch(\n commonActions.updateFirstLoad({\n isLoading: true,\n canLoadAgain: true,\n }),\n );\n }\n\n const { user } = unwrapResult(\n await dispatch(profileActions.loadUserInfoAsync()),\n );\n\n setupUser(user);\n\n dispatch(achievementApi.endpoints.getAchievements.initiate('none'));\n dispatch(\n achievementApi.endpoints.getUserAchievementsByUserId.initiate({\n id: user.id,\n }),\n );\n dispatch(notificationActions.loadNotificationsAsync());\n dispatch(noteActions.getNoteAsync());\n dispatch(\n organizationApi.endpoints.listMyOrganizations.initiate({\n nextToken: null,\n }),\n );\n\n dispatch(eventApi.endpoints.loadMyEvents.initiate({ nextToken: null }));\n\n dispatch(\n commonActions.updateFirstLoad({\n isLoading: false,\n canLoadAgain: false,\n }),\n );\n\n return true;\n } catch (error: any) {\n if (error.type === 'fail') {\n dispatch(authActions.signOutAsync());\n return thunkAPI.rejectWithValue({ type: 'fail' });\n } else {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n }\n },\n);\n\nexport const loadAllLiteAsync = createAsyncThunk<\n boolean,\n { orgId?: string },\n ThunkType\n>(REDUX_LOAD_ALL, async ({ orgId }, { dispatch, ...thunkAPI }) => {\n try {\n const { user } = unwrapResult(\n await dispatch(profileActions.loadUserInfoAsync()),\n );\n setupUser(user);\n dispatch(noteActions.getNoteAsync());\n\n const filters = (thunkAPI.getState() as AppState).searchFilters;\n const liteFilters = getLiteFilters(orgId, filters);\n\n if (orgId) {\n dispatch(notificationActions.loadNotificationsAsync());\n dispatch(\n eventApi.endpoints.loadMyOrgEvents.initiate({\n nextToken: null,\n orgId: orgId,\n }),\n );\n dispatch(\n eventApi.endpoints.searchEvents.initiate({\n nextToken: null,\n ...liteFilters,\n }),\n );\n dispatch(feedApi.endpoints.listFeedsByOrg.initiate(orgId));\n }\n\n return true;\n } catch (error: any) {\n if (error.type === 'fail') {\n dispatch(authActions.signOutAsync());\n return thunkAPI.rejectWithValue({ type: 'fail' });\n } else {\n return thunkAPI.rejectWithValue({ type: 'fail', payload: error });\n }\n }\n});\n","import { FC, useEffect, useState } from 'react';\nimport { useAppSelector } from '@aclito/shared/hooks/useSelector';\nimport { logger } from '@aclito/shared/lib/logger';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { authSelectors } from '@aclito/shared/redux/slices/authSlices';\nimport { loadAllAsync } from '@aclito/shared/redux/thunks/thunks';\nimport { LoadingOverlay } from '@mantine/core';\nimport { useAuthenticator } from '@aws-amplify/ui-react';\nimport { useAppDispatch } from '@aclito/shared/hooks/useDispatch';\nimport { locationActions } from '@aclito/shared/redux/slices';\nimport { useShowFlashMessage } from '@aclito/shared/hooks';\n\nconst withData = <T extends object>(Component: FC<T>): FC<T> => {\n const Data: FC<T> = (props) => {\n logger.render('rerender-withData');\n const dispatch = useAppDispatch();\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const firstTimeLogin = useAppSelector(authSelectors.firstTimeLogin);\n const [completed, setCompleted] = useState(false);\n const { signOut } = useAuthenticator((context) => [context.route]);\n const showMessage = useShowFlashMessage();\n const isLoading = firstTimeLogin ? false : !completed;\n\n const checkData = async () => {\n if (!userInfo) {\n try {\n if (!firstTimeLogin) {\n try {\n const res = await dispatch(loadAllAsync()).unwrap();\n setCompleted(res);\n } catch (error) {\n signOut();\n }\n }\n } catch (error) {\n showMessage('notSignInError');\n }\n }\n setCompleted(true);\n };\n\n useEffect(() => {\n checkData();\n }, [userInfo]);\n\n useEffect(() => {\n if (userInfo?.location) {\n dispatch(\n locationActions.updateUserLocation({\n lon: userInfo.location.lon,\n latitude: userInfo.location.lat,\n lng: userInfo.location.lon,\n longitude: userInfo.location.lon,\n lat: userInfo.location.lat,\n }),\n );\n }\n }, [userInfo?.location]);\n\n return isLoading ? (\n <LoadingOverlay visible={isLoading} />\n ) : (\n <Component {...props} />\n );\n };\n return Data;\n};\n\nexport default withData;\n","import { useAppSelector } from '@aclito/shared/hooks';\nimport { notificationSelectors } from '@aclito/shared/redux/slices/notificationsSlices';\nimport { useTheme } from 'styled-components';\n\nimport { useLocation } from '@/hooks';\nimport {\n ROUTE_AVAILABILITY,\n ROUTE_EVENTS,\n ROUTE_SOCIAL,\n ROUTE_NOTES,\n ROUTE_NOTIFICATIONS,\n ROUTE_ORGANIZATIONS,\n ROUTE_PROFILE,\n ROUTE_SEARCH,\n ROUTE_SETTINGS,\n ROUTE_USER_LOCATION,\n ROUTE_FEEDS,\n ROUTE_GOALS,\n ROUTE_FEEDBACK,\n ROUTE_USER_PAYMENTS,\n} from '@/util/constants';\nimport {\n activeMenuStyle,\n menuStyle,\n} from '@/components/Drawer/components/DrawerStyles';\n\nexport const useDrawer = () => {\n const notifications = useAppSelector(notificationSelectors.getNotifications);\n\n const count = notifications.length;\n const label = count > 9 ? '9+' : count;\n\n const location = useLocation();\n const theme = useTheme();\n\n const matchers = {\n isNotifications: location.pathname === ROUTE_NOTIFICATIONS,\n isEvents: location.pathname === ROUTE_EVENTS,\n isFeeds: location.pathname === ROUTE_FEEDS,\n isSearch: location.pathname === ROUTE_SEARCH,\n isOrganizations: !!location.pathname?.includes(ROUTE_ORGANIZATIONS),\n isProfile: location.pathname === ROUTE_PROFILE,\n isAvailability: location.pathname === ROUTE_AVAILABILITY,\n isLocation: location.pathname === ROUTE_USER_LOCATION,\n isSettings: location.pathname === ROUTE_SETTINGS,\n isSocial: location.pathname === ROUTE_SOCIAL,\n isNote: location.pathname === ROUTE_NOTES,\n isGoals: location.pathname === ROUTE_GOALS,\n isFeedback: location.pathname === ROUTE_FEEDBACK,\n isPayments: !!location.pathname?.includes(ROUTE_USER_PAYMENTS),\n };\n\n const getSxStyle = (isActive: boolean) => [\n menuStyle(theme),\n ...(isActive ? [activeMenuStyle(theme)] : []),\n ];\n\n return { count, label, getSxStyle, matchers };\n};\n","import React from 'react';\nimport { SimpleGrid } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\nimport { FooterProps } from '../../interface';\nimport {\n MenuItemContainer,\n menuStyle,\n StyledHStack,\n StyledText,\n} from '../DrawerStyles';\n\nimport { Icon } from '@/components';\nimport {\n ROUTE_NOTES,\n ROUTE_SETTINGS,\n ROUTE_SOCIAL,\n ROUTE_USER_LOCATION,\n} from '@/util/constants';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport { useDrawer } from '@/components/Drawer/hooks/useDrawer';\n\nconst Footer: React.FC<FooterProps> = ({ signOut, closeNavigation }) => {\n const navigate = useNavigate();\n\n const { matchers, getSxStyle } = useDrawer();\n const theme = useTheme();\n\n return (\n <SimpleGrid cols={1} verticalSpacing={0}>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_NOTES);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isNote)}\n >\n <StyledHStack>\n <Icon icon=\"note\" size=\"24\" />\n <StyledText tx=\"admin.notes.title\" $active={matchers.isNote} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_USER_LOCATION);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isLocation)}\n >\n <StyledHStack>\n <Icon icon=\"map\" size=\"24\" />\n <StyledText tx=\"nav.location\" $active={matchers.isLocation} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_SOCIAL);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isSocial)}\n >\n <StyledHStack>\n <Icon icon=\"share\" color=\"grey80\" size=\"24\" />\n <StyledText tx=\"invite\" $active={matchers.isSocial} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_SETTINGS);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isSettings)}\n >\n <StyledHStack>\n <Icon icon=\"settings\" color=\"grey80\" size=\"24\" />\n <StyledText tx=\"nav.settings\" $active={matchers.isSettings} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => signOut()}\n sx={{\n ...menuStyle(theme),\n marginBottom: 16,\n }}\n >\n <StyledHStack>\n <Icon icon=\"logout\" color=\"grey80\" size=\"24\" />\n <StyledText tx=\"auth.signout.button\" />\n </StyledHStack>\n </MenuItemContainer>\n </SimpleGrid>\n );\n};\n\nexport default Footer;\n","import { Divider } from '@mantine/core';\nimport { useTheme } from 'styled-components';\n\nconst DrawerDivider = () => {\n const theme = useTheme();\n\n return <Divider h={1} style={{ margin: '8px 24px' }} color={theme.grey10} />;\n};\n\nexport default DrawerDivider;\n","import { Indicator, MediaQuery, SimpleGrid } from '@mantine/core';\nimport React from 'react';\nimport { ThemeContext } from '@aclito/ui-web/providers/ThemeProvider';\n\nimport { HeaderProps } from '../../interface';\nimport { MenuItemContainer, StyledHStack, StyledText } from '../DrawerStyles';\n\nimport {\n ROUTE_AVAILABILITY,\n ROUTE_EVENTS,\n ROUTE_FEEDS,\n ROUTE_NOTIFICATIONS,\n ROUTE_ORGANIZATIONS,\n ROUTE_PROFILE,\n ROUTE_SEARCH,\n ROUTE_GOALS,\n ROUTE_FEEDBACK,\n ROUTE_USER_PAYMENTS,\n} from '@/util/constants';\nimport { Icon } from '@/components';\nimport { useNavigate } from '@/hooks/useNavigate';\nimport DrawerDivider from '@/components/Drawer/components/DrawerDivider';\nimport { useDrawer } from '@/components/Drawer/hooks/useDrawer';\n\nconst Header: React.FC<HeaderProps> = ({ closeNavigation }) => {\n const navigate = useNavigate();\n\n const { count, label, matchers, getSxStyle } = useDrawer();\n\n return (\n <SimpleGrid cols={1} verticalSpacing={0} style={{ marginTop: '16px' }}>\n <MenuItemContainer sx={getSxStyle(false)}>\n <ThemeContext.Consumer>\n {({ toggleTheme, theme: themeType }) => (\n <>\n {themeType === 'light' ? (\n <StyledHStack onClick={toggleTheme}>\n <Icon icon={'dark'} />\n <StyledText tx=\"darkmode\" $active={false} />\n </StyledHStack>\n ) : (\n <StyledHStack onClick={toggleTheme}>\n <Icon icon={'light'} />\n <StyledText tx=\"lightmode\" $active={false} />\n </StyledHStack>\n )}\n </>\n )}\n </ThemeContext.Consumer>\n </MenuItemContainer>\n\n <DrawerDivider />\n\n <MenuItemContainer\n sx={getSxStyle(matchers.isNotifications)}\n onClick={() => {\n navigate(ROUTE_NOTIFICATIONS);\n closeNavigation();\n }}\n >\n <StyledHStack>\n <Icon icon=\"notifications\" size=\"24\" />\n <StyledText\n tx=\"nav.notifications\"\n $active={matchers.isNotifications}\n />\n <MediaQuery smallerThan=\"lg\" styles={{ display: 'none' }}>\n {count ? (\n <Indicator\n label={label}\n color={'red'}\n style={{ marginLeft: 16 }}\n size={18}\n >\n <></>\n </Indicator>\n ) : (\n <></>\n )}\n </MediaQuery>\n </StyledHStack>\n </MenuItemContainer>\n\n <DrawerDivider />\n\n <MenuItemContainer\n sx={getSxStyle(matchers.isEvents)}\n onClick={() => {\n navigate(ROUTE_EVENTS);\n closeNavigation();\n }}\n >\n <StyledHStack>\n <Icon icon=\"calendar\" size=\"24\" />\n <StyledText tx=\"nav.event\" $active={matchers.isEvents} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_SEARCH);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isSearch)}\n >\n <StyledHStack>\n <Icon icon=\"search\" size=\"24\" />\n <StyledText tx=\"nav.search\" $active={matchers.isSearch} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_FEEDS);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isFeeds)}\n >\n <StyledHStack>\n <Icon icon=\"feed\" size=\"24\" />\n <StyledText tx=\"nav.feed\" $active={matchers.isFeeds} />\n </StyledHStack>\n </MenuItemContainer>\n\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_PROFILE);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isProfile)}\n >\n <StyledHStack>\n <Icon icon=\"person\" size=\"24\" />\n <StyledText tx=\"nav.profile\" $active={matchers.isProfile} />\n </StyledHStack>\n </MenuItemContainer>\n\n <DrawerDivider />\n\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_ORGANIZATIONS);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isOrganizations)}\n >\n <StyledHStack>\n <Icon icon=\"org\" size=\"24\" />\n <StyledText tx=\"nav.org\" $active={matchers.isOrganizations} />\n </StyledHStack>\n </MenuItemContainer>\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_AVAILABILITY);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isAvailability)}\n >\n <StyledHStack>\n <Icon icon=\"availability\" size=\"24\" />\n <StyledText tx=\"nav.availability\" $active={matchers.isAvailability} />\n </StyledHStack>\n </MenuItemContainer>\n\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_GOALS);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isGoals)}\n >\n <StyledHStack>\n <Icon icon=\"trophy\" size=\"24\" />\n <StyledText tx=\"nav.goals\" $active={matchers.isGoals} />\n </StyledHStack>\n </MenuItemContainer>\n\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_FEEDBACK);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isFeedback)}\n >\n <StyledHStack>\n <Icon icon=\"feedback\" size=\"24\" />\n <StyledText tx=\"nav.feedback\" $active={matchers.isFeedback} />\n </StyledHStack>\n </MenuItemContainer>\n\n <MenuItemContainer\n onClick={() => {\n navigate(ROUTE_USER_PAYMENTS);\n closeNavigation();\n }}\n sx={getSxStyle(matchers.isPayments)}\n >\n <StyledHStack>\n <Icon icon=\"payment\" size=\"24\" />\n <StyledText tx=\"nav.payments\" $active={matchers.isPayments} />\n </StyledHStack>\n </MenuItemContainer>\n </SimpleGrid>\n );\n};\n\nexport default Header;\n","import * as React from 'react';\nimport {\n AppShell,\n Burger,\n Header,\n MediaQuery,\n Navbar,\n Text,\n} from '@mantine/core';\nimport styled, { useTheme } from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { profileSelectors } from '@aclito/shared/redux/slices/profileSlices';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { getUserData } from '@aclito/shared/util/cognitoUser';\nimport AclitoLogo from '@aclito/shared/resources/icons/aclito.svg';\nimport { useEffect, useState } from 'react';\nimport { useMediaQuery } from '@mantine/hooks';\nimport { deviceMax, deviceMin } from '@aclito/ui-web/utils/mediaQueries';\n\nimport withData from '../../navigation/withData';\n\nimport { DrawerProps } from './interface';\nimport { Footer as BottomDrawer } from './components/Footer';\nimport { Header as TopDrawer } from './components/Header';\n\nimport { Avatar, VStack, HStack } from '@/components';\nimport { ROUTE_PROFILE, ROUTE_EVENTS } from '@/util/constants';\nimport { useOnClickOutside } from '@/hooks/useOnClickOutside';\n\nconst PermanentDrawer: React.FC<DrawerProps> = ({ signOut, children }) => {\n const [opened, setOpened] = React.useState(false);\n const userInfo = useAppSelector(profileSelectors.userInfo);\n const [email, setEmail] = useState('');\n\n const navRef = React.useRef(null);\n const toggleRef = React.useRef(null);\n\n const matches = useMediaQuery(deviceMin.tablet);\n\n const theme = useTheme();\n\n useEffect(() => {\n getUserData().then((data) => setEmail(data?.email ?? ''));\n }, []);\n\n useOnClickOutside([navRef, toggleRef], () => {\n setOpened(false);\n });\n\n return (\n <AppShell\n styles={{\n main: {\n background: theme.background,\n height: '100%',\n width: '100%',\n },\n body: {\n width: '100%',\n },\n root: {\n width: '100%',\n },\n }}\n padding=\"xl\"\n navbarOffsetBreakpoint=\"sm\"\n navbar={\n <Navbar\n style={{\n overflowY: 'auto',\n borderRight: `0.0625rem solid ${theme.grey10}`,\n }}\n hiddenBreakpoint=\"sm\"\n hidden={!opened}\n bg={theme.white}\n width={{ sm: 72, lg: 280, xs: 250 }}\n ref={navRef}\n >\n <HStack style={{ justifyContent: 'space-between', padding: '16px' }}>\n {matches && (\n <AppHeader to={ROUTE_EVENTS} onClick={() => setOpened(false)}>\n <img src={AclitoLogo} style={{ width: '40px' }} />\n <AppHeaderText>ACLITO</AppHeaderText>\n </AppHeader>\n )}\n </HStack>\n\n <>\n {userInfo && (\n <StyledLink to={ROUTE_PROFILE} onClick={() => setOpened(false)}>\n <AvatarView>\n <Avatar\n size={40}\n image={userInfo.image}\n timeStamp={userInfo.updatedAt}\n />\n </AvatarView>\n <VStack spacing={0}>\n <StyledText>{`${userInfo.name} ${userInfo.surname}`}</StyledText>\n <StyledTextEmail color={theme.white}>{email}</StyledTextEmail>\n </VStack>\n </StyledLink>\n )}\n </>\n\n <Navbar.Section grow>\n <TopDrawer closeNavigation={() => setOpened(false)} />\n </Navbar.Section>\n\n <Navbar.Section>\n <BottomDrawer\n signOut={signOut}\n closeNavigation={() => setOpened(false)}\n />\n </Navbar.Section>\n </Navbar>\n }\n header={\n <>\n {!matches && (\n <HeaderWrapper height={60} p=\"md\">\n <MediaQuery largerThan=\"sm\" styles={{ display: 'none' }}>\n <>\n <AppHeader to={ROUTE_EVENTS} onClick={() => setOpened(false)}>\n <img src={AclitoLogo} style={{ width: '40px' }} />\n <AppHeaderText>ACLITO</AppHeaderText>\n </AppHeader>\n <Burger\n opened={opened}\n onClick={() => setOpened((o) => !o)}\n size=\"sm\"\n color={theme.yellow}\n mr=\"xl\"\n ref={toggleRef}\n />\n </>\n </MediaQuery>\n </HeaderWrapper>\n )}\n </>\n }\n >\n {children}\n </AppShell>\n );\n};\n\nconst AppHeader = styled(Link)`\n display: flex;\n gap: 8px;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n @media (${deviceMax.desktop}) {\n justify-content: center;\n }\n`;\n\nconst AppHeaderText = styled.span`\n font-family: 'Acme', sans-serif;\n color: ${({ theme }) => theme.orange};\n font-size: 24px;\n @media (${deviceMax.desktop}) and (${deviceMin.tablet}) {\n display: none;\n }\n`;\n\nconst AvatarView = styled.div`\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst HeaderWrapper = styled(Header)`\n background-color: ${({ theme }) => theme.white};\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n border-bottom: 0.0625rem solid ${({ theme }) => theme.grey10};\n`;\n\nconst StyledLink = styled(Link)`\n text-decoration: none;\n display: flex;\n padding: 0 16px;\n gap: 16px;\n`;\n\nconst StyledText = styled(Text)`\n color: ${({ theme }) => theme.grey80};\n @media (${deviceMax.desktop}) and (${deviceMin.tablet}) {\n display: none;\n }\n`;\n\nconst StyledTextEmail = styled(Text)`\n font-size: 10px;\n color: ${({ theme }) => theme.grey60};\n @media (${deviceMax.desktop}) and (${deviceMin.tablet}) {\n display: none;\n }\n` as typeof Text;\n\nexport default withData(PermanentDrawer);\n","import React, { useEffect } from 'react';\nimport { useAuthenticator } from '@aws-amplify/ui-react';\nimport { Outlet, useNavigate } from 'react-router-dom';\n\nimport { Drawer } from '../components/Drawer';\n\nimport {\n getContextFromLocalStorage,\n removeContextFromLocalStorage,\n} from '@/util/context';\n\nconst DrawerOutlet: React.FC = () => {\n const { signOut } = useAuthenticator((context) => [context.signOut]);\n\n const nav = useNavigate();\n useEffect(() => {\n const context = getContextFromLocalStorage();\n if (context.pathname) {\n removeContextFromLocalStorage();\n nav(context);\n }\n }, [nav]);\n return (\n <Drawer signOut={signOut}>\n <Outlet />\n </Drawer>\n );\n};\n\nexport default DrawerOutlet;\n","import {\n Routes as RDRoutes,\n Route,\n Navigate,\n BrowserRouter,\n} from 'react-router-dom';\nimport { ModalsProvider } from '@mantine/modals';\nimport { useSchema } from '@aclito/shared/hooks';\nimport ModalTooltipProvider from '@aclito/ui-web/providers/ModalTooltipProvider';\n\nimport { Settings } from '../features/misc/screens/Settings';\nimport { Profile } from '../features/profile/screens/Profile';\nimport { Calendar } from '../components/Calendar';\nimport { ProfileEdit } from '../features/profile/screens/ProfileEdit';\nimport FirebaseProvider from '../providers/FirebaseProvider';\nimport EmbeddedCalendar from '../components/EmbeddedCalendar/EmbeddedCalendar';\nimport DefaultLocation from '../common/DefaultLocation/DefaultLocation';\nimport { Login } from '../features/auth/screens/Login';\nimport { Register } from '../features/auth/screens/Register';\nimport { RequestNewPassword } from '../features/auth/screens/RequestNewPassword';\nimport { SubmitNewPassword } from '../features/auth/screens/SubmitNewPassword';\nimport { Availabilities } from '../features/availability/screens/Availabilities';\nimport { AvailabilityEdit } from '../features/availability/screens/AvailabilityEdit';\nimport { AvailabilityInfo } from '../features/availability/screens/AvailabilityInfo';\nimport { AvailabilityNew } from '../features/availability/screens/AvailabilityNew';\nimport EventEdit from '../features/event/screens/EventEdit/EventEdit';\nimport EventNew from '../features/event/screens/EventNew/EventNew';\nimport { Events } from '../features/event/screens/Events';\nimport { ReportUser } from '../features/misc/screens/ReportUser';\nimport { ShareItem, ShareItemOld } from '../features/misc/screens/ShareItem';\nimport { Notifications } from '../features/notification/screens/Notifications';\nimport OrganizationEdit from '../features/organization/screens/OrganizationEdit/OrganizationEdit';\nimport OrganizationNew from '../features/organization/screens/OrganizationNew/OrganizationNew';\nimport Organizations from '../features/organization/screens/Organizations/Organizations';\nimport { AboutUser } from '../features/profile/screens/AboutUser';\nimport { UserProfile } from '../features/profile/screens/UserProfile';\nimport { Search } from '../features/search/screens/Search';\nimport EventInfo from '../features/event/screens/EventInfo/EventInfo';\nimport Goals from '../features/goals/Goals';\n\nimport { RequireAuth } from './RequireAuth';\n\nimport {\n ROUTE_ABOUT_USER,\n ROUTE_EVENTS,\n ROUTE_SEARCH,\n ROUTE_SIGN_IN,\n ROUTE_SIGN_UP,\n ROUTE_REQUEST_PASSWORD,\n ROUTE_SUBMIT_PASSWORD,\n ROUTE_PROFILE,\n ROUTE_CALENDAR,\n ROUTE_SETTINGS,\n ROUTE_NEW_EVENT,\n ROUTE_PROFILE_EDIT,\n ROUTE_EVENT_INFO,\n ROUTE_ORGANIZATIONS,\n ROUTE_NEW_ORGANIZATION,\n ROUTE_AVAILABILITY,\n ROUTE_NEW_AVAILABILITY,\n ROUTE_EVENT_EDIT,\n ROUTE_AVAILABILITY_INFO,\n ROUTE_USER_PROFILE,\n ROUTE_REPORT_USER,\n ROUTE_NOTIFICATIONS,\n ROUTE_AVAILABILITY_EDIT,\n ROUTE_SOCIAL,\n ROUTE_USER_LOCATION,\n ROUTE_EDIT_ORGANIZATION,\n ROUTE_SHARE_ITEM,\n ROUTE_EMBEDDED_CALENDAR,\n ROUTE_RESERVANTO,\n ROUTE_EVENT_INFO_PROVIDERS,\n ROUTE_PROFILE_ALIASES,\n ROUTE_PROFILE_ALIASES_EDIT,\n ROUTE_PROFILE_ALIASES_CREATE,\n ROUTE_NOTES,\n ROUTE_NOTES_USER,\n ROUTE_VERIFICATION,\n ROUTE_INVITE,\n ROUTE_FEED_EDIT,\n ROUTE_FEED_INFO,\n ROUTE_FEEDS,\n ROUTE_MAP,\n ROUTE_GOALS,\n ROUTE_ORGANIZATION_POSTER,\n ROUTE_FEEDBACK,\n ROUTE_ALIAS_INFO,\n ROUTE_STATUS,\n ROUTE_USER_PAYMENTS,\n ROUTE_PRODUCTS_BUY,\n ROUTE_PRODUCTS_EDIT,\n ROUTE_PRODUCTS_LIST_DETAIL,\n ROUTE_PRODUCTS_LIST,\n ROUTE_PRODUCTS_CREATE,\n ROUTE_PRODUCTS_FINISH,\n ROUTE_CHANGE_PASSWORD,\n ROUTE_TAC_UPDATE,\n ROUTE_PRODUCTS_RECHARGE,\n ROUTE_PRODUCTS_STATS,\n} from '@/util/constants';\nimport { Text, Container } from '@/components';\nimport Social from '@/features/misc/screens/Social/Social';\nimport Reservanto from '@/features/misc/screens/Reservanto/Reservanto';\nimport { EventInfoProviders } from '@/features/event/screens/EventInfoProviders';\nimport { ProfileAliases } from '@/features/profile/screens/ProfileAliases';\nimport ProfileAliasesEdit from '@/features/profile/screens/ProfileAliasesEdit/ProfileAliasesEdit';\nimport ProfileAliasesCreate from '@/features/profile/screens/ProfielAliasesCreate/ProfileAliasesCreate';\nimport { Notes } from '@/features/notes/screens/Notes';\nimport NotesUser from '@/features/notes/screens/NotesUser/NotesUser';\nimport Verification from '@/features/integration/screens/Verification/Verification';\nimport Invite from '@/features/integration/screens/Invite/Invite';\nimport OrganizationFeedEdit from '@/features/organization/screens/OrganizationFeedEdit/OrganizationFeedEdit';\nimport OrganizationFeedInfo from '@/features/organization/screens/OrganizationFeedInfo/OrganizationFeedInfo';\nimport OrganizationFeed from '@/features/organization/screens/OrganizationFeed/OrganizationFeed';\nimport ViewMap from '@/features/map/screens/ViewMap/components/ViewMap';\nimport OrganizationPoster from '@/features/organization/screens/OrganizationPoster/OrganizationPoster';\nimport Feedback from '@/features/feedback/screens/Feedback/Feedback';\nimport FeedbackInfo from '@/features/feedback/screens/FeedbackInfo/FeedbackInfo';\nimport AliasInfo from '@/features/profile/screens/AliasInfo/AliasInfo';\nimport Status from '@/features/misc/screens/Status/Status';\nimport UserPayments from '@/features/payments/screens/UserPayments';\nimport ProductsBuy from '@/features/payments/screens/ProductsBuy';\nimport ProductsEdit from '@/features/payments/screens/ProductsEdit';\nimport ProductsList from '@/features/payments/screens/ProductsList';\nimport ProductListDetail from '@/features/payments/screens/ProductListDetail';\nimport ProductsCreate from '@/features/payments/screens/ProductsCreate';\nimport ProductsFinish from '@/features/payments/screens/ProductsFinish';\nimport ChangePassword from '@/features/auth/screens/ChangePassword/ChangePassword';\nimport TacUpdate from '@/features/misc/screens/TacUpdate/TacUpdate';\nimport CreditRecharge from '@/features/payments/screens/CreditRecharge';\nimport OrganizationInfo from '@/features/organization/screens/OrganizationInfo/OrganizationInfo';\nimport OrganizationStats from '@/features/payments/screens/OrganizationStats';\nimport DrawerOutlet from '@/navigation/DrawerOutlet';\n\nconst Routes = () => {\n useSchema().setZodErrorMap();\n return (\n <BrowserRouter>\n <ModalsProvider>\n <ModalTooltipProvider>\n <RDRoutes>\n <Route path={'/'} element={<Navigate to={ROUTE_SIGN_IN} />} />\n <Route path={ROUTE_SIGN_IN} element={<Login />} />\n <Route\n path={ROUTE_EMBEDDED_CALENDAR}\n element={<EmbeddedCalendar />}\n />\n <Route path={ROUTE_SIGN_IN} element={<Login />} />\n <Route path={ROUTE_SIGN_UP} element={<Register />} />\n <Route\n path={ROUTE_REQUEST_PASSWORD}\n element={<RequestNewPassword />}\n />\n <Route\n path={ROUTE_SUBMIT_PASSWORD}\n element={<SubmitNewPassword />}\n />\n <Route\n path={ROUTE_ORGANIZATION_POSTER}\n element={<OrganizationPoster />}\n />\n\n <Route path={ROUTE_RESERVANTO} element={<Reservanto />} />\n <Route path={ROUTE_VERIFICATION} element={<Verification />} />\n <Route path={ROUTE_INVITE} element={<Invite />} />\n <Route path={ROUTE_STATUS} element={<Status />} />\n <Route path={ROUTE_TAC_UPDATE} element={<TacUpdate />} />\n\n <Route\n path={ROUTE_ABOUT_USER}\n element={\n <RequireAuth>\n <AboutUser />\n </RequireAuth>\n }\n />\n\n <Route\n element={\n <RequireAuth>\n <FirebaseProvider>\n <DrawerOutlet />\n </FirebaseProvider>\n </RequireAuth>\n }\n >\n <Route path={ROUTE_NOTES} element={<Notes />} />\n <Route path={ROUTE_USER_PAYMENTS} element={<UserPayments />} />\n\n <Route path={ROUTE_PRODUCTS_BUY} element={<ProductsBuy />} />\n <Route path={ROUTE_PRODUCTS_EDIT} element={<ProductsEdit />} />\n <Route\n path={ROUTE_PRODUCTS_STATS}\n element={<OrganizationStats />}\n />\n <Route path={ROUTE_PRODUCTS_LIST} element={<ProductsList />} />\n <Route\n path={ROUTE_PRODUCTS_FINISH}\n element={<ProductsFinish />}\n />\n <Route\n path={ROUTE_PRODUCTS_CREATE}\n element={<ProductsCreate />}\n />\n <Route\n path={ROUTE_PRODUCTS_RECHARGE}\n element={<CreditRecharge />}\n />\n <Route\n path={ROUTE_PRODUCTS_LIST_DETAIL}\n element={<ProductListDetail />}\n />\n <Route\n path={ROUTE_CHANGE_PASSWORD}\n element={<ChangePassword />}\n />\n <Route path={ROUTE_NOTES_USER} element={<NotesUser />} />\n <Route path={ROUTE_EVENTS} element={<Events />} />\n <Route path={ROUTE_SEARCH} element={<Search />} />\n <Route path={ROUTE_PROFILE} element={<Profile />} />\n <Route path={ROUTE_ALIAS_INFO} element={<AliasInfo />} />\n\n <Route\n path={`${ROUTE_PROFILE_ALIASES}/:userId`}\n element={<ProfileAliases />}\n />\n <Route\n path={ROUTE_PROFILE_ALIASES}\n element={<ProfileAliases />}\n />\n <Route\n path={ROUTE_PROFILE_ALIASES_EDIT}\n element={<ProfileAliasesEdit />}\n />\n <Route\n path={ROUTE_PROFILE_ALIASES_CREATE}\n element={<ProfileAliasesCreate />}\n />\n <Route path={ROUTE_ORGANIZATIONS} element={<Organizations />}>\n <Route path={':id'} element={<OrganizationInfo />} />\n </Route>\n <Route path={ROUTE_USER_PROFILE} element={<UserProfile />} />\n <Route path={ROUTE_SETTINGS} element={<Settings />} />\n <Route path={ROUTE_AVAILABILITY} element={<Availabilities />} />\n <Route\n path={ROUTE_NEW_AVAILABILITY}\n element={<AvailabilityNew />}\n />\n <Route\n path={ROUTE_NEW_ORGANIZATION}\n element={<OrganizationNew />}\n />\n <Route\n path={ROUTE_FEED_EDIT}\n element={<OrganizationFeedEdit />}\n />\n <Route\n path={ROUTE_FEED_INFO}\n element={<OrganizationFeedInfo />}\n />\n <Route path={ROUTE_MAP} element={<ViewMap />} />\n <Route path={ROUTE_FEEDS} element={<OrganizationFeed />} />\n <Route\n path={`${ROUTE_GOALS}/:userId`}\n element={<Goals />}\n ></Route>\n <Route path={ROUTE_GOALS} element={<Goals />}></Route>\n <Route path={ROUTE_FEEDBACK} element={<Feedback />}></Route>\n <Route\n path={`${ROUTE_FEEDBACK}/:eventId`}\n element={<FeedbackInfo />}\n />\n\n <Route\n path={ROUTE_EDIT_ORGANIZATION}\n element={<OrganizationEdit />}\n />\n <Route\n path={ROUTE_AVAILABILITY_INFO}\n element={<AvailabilityInfo />}\n />\n <Route\n path={ROUTE_AVAILABILITY_EDIT}\n element={<AvailabilityEdit />}\n />\n <Route path={ROUTE_PROFILE_EDIT} element={<ProfileEdit />} />\n <Route path={ROUTE_CALENDAR} element={<Calendar />} />\n <Route path={ROUTE_NEW_EVENT} element={<EventNew />} />\n <Route path={ROUTE_EVENT_INFO} element={<EventInfo />} />\n <Route\n path={ROUTE_EVENT_INFO_PROVIDERS}\n element={<EventInfoProviders />}\n />\n <Route path={ROUTE_EVENT_EDIT} element={<EventEdit />} />\n <Route path={ROUTE_REPORT_USER} element={<ReportUser />} />\n <Route path={ROUTE_NOTIFICATIONS} element={<Notifications />} />\n\n <Route path={ROUTE_SOCIAL} element={<Social />} />\n <Route path={ROUTE_USER_LOCATION} element={<DefaultLocation />} />\n\n <Route\n path={`${ROUTE_SHARE_ITEM}/:type/:id`}\n element={<ShareItem />}\n />\n <Route path={ROUTE_SHARE_ITEM} element={<ShareItemOld />} />\n </Route>\n\n <Route\n path=\"*\"\n element={\n <Container style={{ height: '100vh' }}>\n <Text>There is nothing here!</Text>\n </Container>\n }\n />\n </RDRoutes>\n </ModalTooltipProvider>\n </ModalsProvider>\n </BrowserRouter>\n );\n};\n\nexport default Routes;\n","import '@total-typescript/ts-reset';\nimport 'react-big-calendar/lib/css/react-big-calendar.css';\nimport '@aclito/shared/lib/sentry';\n\n// IMPORTANT: NEEDS TO BE FIRST\n// eslint-disable-next-line import/order\nimport { store } from '@aclito/shared/redux/store';\n//\nimport I18nProvider from '@aclito/shared/i18n/I18nProvider';\nimport { Provider as ReduxProvider } from 'react-redux';\nimport awsConfig from '@aclito/shared/aws/aws-exports';\nimport { Authenticator } from '@aws-amplify/ui-react';\nimport { Amplify } from 'aws-amplify';\nimport { MantineProvider } from '@mantine/core';\nimport { Notifications } from '@mantine/notifications';\nimport { useEffect } from 'react';\nimport { setupUiMessageMiddleware } from '@aclito/shared/redux/middleware/UiMessageMiddleware';\nimport {\n addMiddleware,\n removeMiddleware,\n} from '@aclito/shared/redux/dynamicMiddleware';\nimport ThemeProvider, {\n ThemeContext,\n} from '@aclito/ui-web/providers/ThemeProvider';\nimport { useAppSelector } from '@aclito/shared/hooks';\nimport { WebTheme } from '@aclito/ui-web/utils/theme';\nimport { showFlashMessage } from '@aclito/ui-web/utils/showFlashMessage';\nimport { useNotificationWS } from '@aclito/shared/features/notification/hooks/useNotificationWS';\nimport LocaleProvider from '@aclito/shared/providers/LocaleProvider';\nimport FlashMessageProvider from '@aclito/shared/providers/FlashMessageProvider';\n\nimport Routes from './navigation/Routes';\nimport { ROUTE_SIGN_IN } from './util/constants';\n\nimport { ErrorBoundary, MobileBanner } from '@/components';\n\nconst App = () => {\n const url = `${window.location.protocol}//${window.location.host}${ROUTE_SIGN_IN}`;\n awsConfig.oauth.redirectSignIn = url;\n awsConfig.oauth.redirectSignOut = url;\n Amplify.configure({\n ...awsConfig,\n oauth: {\n ...awsConfig.oauth,\n },\n });\n\n useEffect(() => {\n addMiddleware(setupUiMessageMiddleware(showFlashMessage).middleware);\n return () => {\n removeMiddleware(setupUiMessageMiddleware(showFlashMessage).middleware);\n };\n }, []);\n\n return (\n <Authenticator.Provider>\n <ReduxProvider store={store}>\n <MyApp />\n </ReduxProvider>\n </Authenticator.Provider>\n );\n};\n\nconst MyApp = () => {\n const locale = useAppSelector((state) => state.locale);\n useNotificationWS();\n\n return (\n <LocaleProvider>\n <I18nProvider locale={locale}>\n <ThemeProvider withStorage>\n <ThemeContext.Consumer>\n {({ theme }) => (\n <>\n <MantineProvider\n withGlobalStyles\n withNormalizeCSS\n theme={{\n fontFamily: 'Roboto, sans-serif',\n ...WebTheme,\n colorScheme: theme,\n }}\n >\n <ErrorBoundary>\n <FlashMessageProvider showMessage={showFlashMessage}>\n <Notifications position=\"top-center\" limit={3} />\n <Routes />\n <MobileBanner />\n </FlashMessageProvider>\n </ErrorBoundary>\n </MantineProvider>\n </>\n )}\n </ThemeContext.Consumer>\n </ThemeProvider>\n </I18nProvider>\n </LocaleProvider>\n );\n};\n\nexport default App;\n","// @ts-nocheck\nimport { createRoot } from 'react-dom/client';\n\nimport './index.css';\nimport App from './App';\n\ncreateRoot(document.getElementById('root')!).render(<App />);\n"],"file":"assets/index-408042f4.js"}