@magmamath/students-features 0.4.5 → 0.5.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +2 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +41 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +30 -47
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +32 -32
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +11 -13
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +8 -28
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +5 -7
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +17 -0
- package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +57 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +130 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
- package/dist/commonjs/features/chatbot/index.js +0 -7
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +147 -122
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +44 -22
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +22 -0
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/{api.js → ChatbotApi.js} +15 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +110 -0
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +12 -12
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +16 -8
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/messagesHelper.js +7 -7
- package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +18 -13
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +54 -45
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/api.types.js +4 -0
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +2 -0
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -0
- package/dist/commonjs/index.js +0 -24
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +4 -0
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/commonjs/lib/effector/withEvent.js +13 -0
- package/dist/commonjs/lib/effector/withEvent.js.map +1 -0
- package/dist/commonjs/lib/helpers/helpers.js +1 -3
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/lib/helpers/randomElements.js +24 -0
- package/dist/commonjs/lib/helpers/randomElements.js.map +1 -0
- package/dist/commonjs/lib/types/keys.js +2 -0
- package/dist/commonjs/lib/types/keys.js.map +1 -0
- package/dist/commonjs/shared/icons/HighlighterIcon.js +36 -0
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/{Valentine.js → StopIcon.js} +12 -9
- package/dist/commonjs/shared/icons/StopIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/icon.types.js +4 -0
- package/dist/commonjs/shared/translation/constants.js +3 -3
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/helpers.js +22 -6
- package/dist/commonjs/shared/translation/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/hooks.js +3 -5
- package/dist/commonjs/shared/translation/hooks.js.map +1 -1
- package/{src/lib → dist/commonjs/shared/translation}/localization/en.json +8 -1
- package/dist/{module/lib → commonjs/shared/translation}/localization/gb.json +8 -1
- package/dist/commonjs/{lib → shared/translation}/localization/sw.json +8 -1
- package/dist/commonjs/shared/translation/model.js +1 -1
- package/dist/commonjs/shared/translation/model.js.map +1 -1
- package/dist/commonjs/shared/translation/types.js +1 -1
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/commonjs/shared/translation/validation.types.js +6 -0
- package/dist/commonjs/shared/translation/validation.types.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +2 -1
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +35 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +31 -48
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +32 -32
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +11 -13
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +8 -28
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +6 -8
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/context/ChatBotModelContext.js +12 -0
- package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +51 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +125 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
- package/dist/module/features/chatbot/index.js +0 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +149 -124
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +42 -20
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +17 -0
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -0
- package/dist/module/features/chatbot/model/{api.js → ChatbotApi.js} +15 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +104 -0
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -0
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +16 -8
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/model/constants.js.map +1 -1
- package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
- package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +19 -14
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +54 -45
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/api.types.js +2 -0
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/units.types.js +2 -0
- package/dist/module/features/chatbot/types/units.types.js.map +1 -0
- package/dist/module/index.js +0 -2
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createEntityFieldStore.js +4 -0
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/module/lib/effector/withEvent.js +9 -0
- package/dist/module/lib/effector/withEvent.js.map +1 -0
- package/dist/module/lib/helpers/helpers.js +0 -1
- package/dist/module/lib/helpers/helpers.js.map +1 -1
- package/dist/module/lib/helpers/randomElements.js +20 -0
- package/dist/module/lib/helpers/randomElements.js.map +1 -0
- package/dist/module/lib/types/keys.js +2 -0
- package/dist/module/lib/types/keys.js.map +1 -0
- package/dist/module/shared/icons/HighlighterIcon.js +29 -0
- package/dist/module/shared/icons/HighlighterIcon.js.map +1 -0
- package/dist/module/shared/icons/StopIcon.js +26 -0
- package/dist/module/shared/icons/StopIcon.js.map +1 -0
- package/dist/module/shared/icons/icon.types.js +2 -0
- package/dist/module/shared/translation/constants.js +3 -3
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/helpers.js +19 -5
- package/dist/module/shared/translation/helpers.js.map +1 -1
- package/dist/module/shared/translation/hooks.js +4 -6
- package/dist/module/shared/translation/hooks.js.map +1 -1
- package/dist/{commonjs/lib → module/shared/translation}/localization/en.json +8 -1
- package/{src/lib → dist/module/shared/translation}/localization/gb.json +8 -1
- package/dist/module/{lib → shared/translation}/localization/sw.json +8 -1
- package/dist/module/shared/translation/model.js +1 -1
- package/dist/module/shared/translation/model.js.map +1 -1
- package/dist/module/shared/translation/types.js +2 -0
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/module/shared/translation/validation.types.js +4 -0
- package/dist/module/shared/translation/validation.types.js.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +2 -5
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +4 -3
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +24 -18
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +13 -7
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +7 -5
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +16 -6
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +7 -8
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +12 -11
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +19 -24
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +2 -7
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +34 -0
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +0 -3
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +2 -0
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +2 -0
- package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +0 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +2 -0
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/types/keys.d.ts +8 -0
- package/dist/typescript/commonjs/lib/types/keys.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +2 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +21 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts +3 -2
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/index.d.ts +0 -1
- package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +43 -3
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +17 -0
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +2 -5
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +8 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts +4 -3
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +24 -18
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +13 -7
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +7 -5
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +16 -6
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +7 -8
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +12 -11
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +19 -24
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +2 -7
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +34 -0
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +0 -3
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +2 -0
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/withEvent.d.ts +2 -0
- package/dist/typescript/module/lib/effector/withEvent.d.ts.map +1 -0
- package/dist/typescript/module/lib/helpers/helpers.d.ts +0 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/randomElements.d.ts +2 -0
- package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +1 -0
- package/dist/typescript/module/lib/types/keys.d.ts +8 -0
- package/dist/typescript/module/lib/types/keys.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/StopIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts +2 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +21 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/helpers.d.ts +3 -2
- package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
- package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/index.d.ts +0 -1
- package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +43 -3
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +4 -4
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +17 -0
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -0
- package/package.json +3 -6
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +2 -4
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +5 -5
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +36 -0
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +37 -47
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +27 -26
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +9 -9
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +9 -31
- package/src/features/chatbot/components/Chatbot.tsx +5 -11
- package/src/features/chatbot/context/ChatBotModelContext.ts +14 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +53 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +150 -0
- package/src/features/chatbot/index.ts +3 -4
- package/src/features/chatbot/model/ChatBotModel.ts +141 -133
- package/src/features/chatbot/model/{ChatBotMessageHandler.ts → ChatBotThreadManager.ts} +53 -27
- package/src/features/chatbot/model/ChatBoxTextManager.ts +18 -0
- package/src/features/chatbot/model/{api.ts → ChatbotApi.ts} +18 -2
- package/src/features/chatbot/model/ChatsCacheModel.ts +95 -0
- package/src/features/chatbot/model/DefaultMessageCreator.ts +17 -16
- package/src/features/chatbot/model/ThreadItem.ts +15 -10
- package/src/features/chatbot/model/constants.ts +2 -0
- package/src/features/chatbot/model/messagesHelper.ts +12 -7
- package/src/features/chatbot/model/t2s.ts +28 -13
- package/src/features/chatbot/model/translation.helpers.ts +2 -1
- package/src/features/chatbot/model/translation.ts +52 -46
- package/src/features/chatbot/types/api.types.ts +12 -12
- package/src/features/chatbot/types/model.types.ts +31 -32
- package/src/features/chatbot/types/t2s.types.ts +10 -15
- package/src/features/chatbot/types/translation.types.ts +2 -1
- package/src/features/chatbot/types/units.types.ts +37 -0
- package/src/index.ts +0 -3
- package/src/lib/effector/createEntityFieldStore.ts +9 -1
- package/src/lib/effector/withEvent.ts +7 -0
- package/src/lib/helpers/helpers.ts +0 -2
- package/src/lib/helpers/randomElements.ts +22 -0
- package/src/lib/types/keys.ts +18 -0
- package/src/shared/icons/HighlighterIcon.tsx +21 -0
- package/src/shared/icons/StopIcon.tsx +17 -0
- package/src/shared/icons/icon.types.ts +9 -6
- package/src/shared/translation/constants.ts +3 -3
- package/src/shared/translation/helpers.ts +22 -9
- package/src/shared/translation/hooks.ts +12 -16
- package/src/shared/translation/index.ts +0 -1
- package/{dist/module/lib → src/shared/translation}/localization/en.json +8 -1
- package/{dist/commonjs/lib → src/shared/translation}/localization/gb.json +8 -1
- package/src/{lib → shared/translation}/localization/sw.json +8 -1
- package/src/shared/translation/model.ts +8 -8
- package/src/shared/translation/types.ts +11 -8
- package/src/shared/translation/validation.types.ts +26 -0
- package/dist/commonjs/features/celebrations/components/Celebrations.js +0 -51
- package/dist/commonjs/features/celebrations/components/Celebrations.js.map +0 -1
- package/dist/commonjs/features/celebrations/components/Particle.js +0 -85
- package/dist/commonjs/features/celebrations/components/Particle.js.map +0 -1
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js +0 -47
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +0 -1
- package/dist/commonjs/features/celebrations/components/Spark.js +0 -23
- package/dist/commonjs/features/celebrations/components/Spark.js.map +0 -1
- package/dist/commonjs/features/celebrations/config.js +0 -224
- package/dist/commonjs/features/celebrations/config.js.map +0 -1
- package/dist/commonjs/features/celebrations/helpers.js +0 -99
- package/dist/commonjs/features/celebrations/helpers.js.map +0 -1
- package/dist/commonjs/features/celebrations/index.js +0 -28
- package/dist/commonjs/features/celebrations/index.js.map +0 -1
- package/dist/commonjs/features/celebrations/types.js +0 -15
- package/dist/commonjs/features/celebrations/types.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/api.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -65
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -255
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -133
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -56
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -68
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -53
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +0 -47
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -76
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -62
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -109
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -83
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +0 -96
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +0 -44
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -233
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -63
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +0 -34
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -108
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -107
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/constants.js +0 -55
- package/dist/commonjs/features/endOfAssignment/constants.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/helpers.js +0 -64
- package/dist/commonjs/features/endOfAssignment/helpers.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +0 -51
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/index.js +0 -40
- package/dist/commonjs/features/endOfAssignment/index.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/model/model.js +0 -53
- package/dist/commonjs/features/endOfAssignment/model/model.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/types.js +0 -33
- package/dist/commonjs/features/endOfAssignment/types.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +0 -43
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +0 -30
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -64
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +0 -29
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +0 -32
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
- package/dist/commonjs/lib/constants.js +0 -11
- package/dist/commonjs/lib/constants.js.map +0 -1
- package/dist/commonjs/shared/hooks/useKeyDownListener.js +0 -27
- package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +0 -1
- package/dist/commonjs/shared/hooks/useKeyboard.js +0 -23
- package/dist/commonjs/shared/hooks/useKeyboard.js.map +0 -1
- package/dist/commonjs/shared/icons/Halloween.js +0 -54
- package/dist/commonjs/shared/icons/Halloween.js.map +0 -1
- package/dist/commonjs/shared/icons/Pi.js +0 -30
- package/dist/commonjs/shared/icons/Pi.js.map +0 -1
- package/dist/commonjs/shared/icons/Star.js +0 -30
- package/dist/commonjs/shared/icons/Star.js.map +0 -1
- package/dist/commonjs/shared/icons/Valentine.js.map +0 -1
- package/dist/commonjs/shared/icons/Winter.js +0 -32
- package/dist/commonjs/shared/icons/Winter.js.map +0 -1
- package/dist/module/features/celebrations/components/Celebrations.js +0 -45
- package/dist/module/features/celebrations/components/Celebrations.js.map +0 -1
- package/dist/module/features/celebrations/components/Particle.js +0 -77
- package/dist/module/features/celebrations/components/Particle.js.map +0 -1
- package/dist/module/features/celebrations/components/ParticleBatch.js +0 -40
- package/dist/module/features/celebrations/components/ParticleBatch.js.map +0 -1
- package/dist/module/features/celebrations/components/Spark.js +0 -17
- package/dist/module/features/celebrations/components/Spark.js.map +0 -1
- package/dist/module/features/celebrations/config.js +0 -219
- package/dist/module/features/celebrations/config.js.map +0 -1
- package/dist/module/features/celebrations/helpers.js +0 -92
- package/dist/module/features/celebrations/helpers.js.map +0 -1
- package/dist/module/features/celebrations/index.js +0 -5
- package/dist/module/features/celebrations/index.js.map +0 -1
- package/dist/module/features/celebrations/types.js +0 -11
- package/dist/module/features/celebrations/types.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
- package/dist/module/features/chatbot/model/api.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -59
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -249
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -126
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -50
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -62
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -47
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/EOAModal.js +0 -41
- package/dist/module/features/endOfAssignment/components/EOAModal.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -70
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -56
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -103
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -77
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +0 -89
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +0 -38
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -226
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -56
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/Modal/model.js +0 -29
- package/dist/module/features/endOfAssignment/components/Modal/model.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -102
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -100
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
- package/dist/module/features/endOfAssignment/constants.js +0 -51
- package/dist/module/features/endOfAssignment/constants.js.map +0 -1
- package/dist/module/features/endOfAssignment/helpers.js +0 -58
- package/dist/module/features/endOfAssignment/helpers.js.map +0 -1
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +0 -46
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
- package/dist/module/features/endOfAssignment/index.js +0 -6
- package/dist/module/features/endOfAssignment/index.js.map +0 -1
- package/dist/module/features/endOfAssignment/model/model.js +0 -48
- package/dist/module/features/endOfAssignment/model/model.js.map +0 -1
- package/dist/module/features/endOfAssignment/types.js +0 -29
- package/dist/module/features/endOfAssignment/types.js.map +0 -1
- package/dist/module/features/endOfAssignment/ui/EOABadge.js +0 -37
- package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +0 -1
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js +0 -24
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -57
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js +0 -21
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +0 -24
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
- package/dist/module/lib/constants.js +0 -7
- package/dist/module/lib/constants.js.map +0 -1
- package/dist/module/shared/hooks/useKeyDownListener.js +0 -22
- package/dist/module/shared/hooks/useKeyDownListener.js.map +0 -1
- package/dist/module/shared/hooks/useKeyboard.js +0 -20
- package/dist/module/shared/hooks/useKeyboard.js.map +0 -1
- package/dist/module/shared/icons/Halloween.js +0 -47
- package/dist/module/shared/icons/Halloween.js.map +0 -1
- package/dist/module/shared/icons/Pi.js +0 -23
- package/dist/module/shared/icons/Pi.js.map +0 -1
- package/dist/module/shared/icons/Star.js +0 -23
- package/dist/module/shared/icons/Star.js.map +0 -1
- package/dist/module/shared/icons/Valentine.js +0 -23
- package/dist/module/shared/icons/Valentine.js.map +0 -1
- package/dist/module/shared/icons/Winter.js +0 -25
- package/dist/module/shared/icons/Winter.js.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +0 -10
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +0 -20
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +0 -26
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +0 -4
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/config.d.ts +0 -192
- package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +0 -6
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/index.d.ts +0 -3
- package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/celebrations/types.d.ts +0 -11
- package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +0 -11
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +0 -14
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +0 -41
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +0 -9
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +0 -14
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +0 -60
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/constants.d.ts +0 -4
- package/dist/typescript/commonjs/lib/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +0 -3
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +0 -11
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +0 -5
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts +0 -5
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/Star.d.ts +0 -5
- package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +0 -5
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts +0 -5
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +0 -10
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts +0 -20
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +0 -26
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts +0 -4
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/config.d.ts +0 -192
- package/dist/typescript/module/features/celebrations/config.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts +0 -6
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/index.d.ts +0 -3
- package/dist/typescript/module/features/celebrations/index.d.ts.map +0 -1
- package/dist/typescript/module/features/celebrations/types.d.ts +0 -11
- package/dist/typescript/module/features/celebrations/types.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +0 -11
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +0 -14
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts +0 -41
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +0 -9
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/index.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +0 -14
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +0 -60
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
- package/dist/typescript/module/lib/constants.d.ts +0 -4
- package/dist/typescript/module/lib/constants.d.ts.map +0 -1
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +0 -3
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +0 -1
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +0 -11
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts +0 -5
- package/dist/typescript/module/shared/icons/Halloween.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/Pi.d.ts +0 -5
- package/dist/typescript/module/shared/icons/Pi.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/Star.d.ts +0 -5
- package/dist/typescript/module/shared/icons/Star.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/Valentine.d.ts +0 -5
- package/dist/typescript/module/shared/icons/Valentine.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/Winter.d.ts +0 -5
- package/dist/typescript/module/shared/icons/Winter.d.ts.map +0 -1
- package/src/features/celebrations/components/Celebrations.tsx +0 -62
- package/src/features/celebrations/components/Particle.tsx +0 -101
- package/src/features/celebrations/components/ParticleBatch.tsx +0 -57
- package/src/features/celebrations/components/Spark.tsx +0 -14
- package/src/features/celebrations/config.ts +0 -224
- package/src/features/celebrations/helpers.ts +0 -103
- package/src/features/celebrations/index.ts +0 -2
- package/src/features/celebrations/types.ts +0 -11
- package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +0 -65
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +0 -298
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +0 -141
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +0 -39
- package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +0 -40
- package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +0 -45
- package/src/features/endOfAssignment/components/EOAModal.tsx +0 -64
- package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +0 -77
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +0 -62
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +0 -110
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +0 -69
- package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +0 -121
- package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +0 -33
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +0 -196
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +0 -62
- package/src/features/endOfAssignment/components/Modal/model.ts +0 -34
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +0 -103
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +0 -107
- package/src/features/endOfAssignment/constants.ts +0 -53
- package/src/features/endOfAssignment/helpers.ts +0 -28
- package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +0 -78
- package/src/features/endOfAssignment/index.ts +0 -3
- package/src/features/endOfAssignment/model/model.ts +0 -57
- package/src/features/endOfAssignment/types.ts +0 -65
- package/src/features/endOfAssignment/ui/EOABadge.tsx +0 -47
- package/src/features/endOfAssignment/ui/PracticeButton.tsx +0 -27
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +0 -73
- package/src/features/endOfAssignment/ui/SparkIcon.tsx +0 -15
- package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +0 -17
- package/src/lib/constants.ts +0 -3
- package/src/shared/hooks/useKeyDownListener.ts +0 -27
- package/src/shared/hooks/useKeyboard.ts +0 -18
- package/src/shared/icons/Halloween.tsx +0 -33
- package/src/shared/icons/Pi.tsx +0 -16
- package/src/shared/icons/Star.tsx +0 -16
- package/src/shared/icons/Valentine.tsx +0 -16
- package/src/shared/icons/Winter.tsx +0 -19
|
@@ -10,26 +10,35 @@ export class ChatbotTranslation {
|
|
|
10
10
|
api,
|
|
11
11
|
$key,
|
|
12
12
|
defaultMessages,
|
|
13
|
-
messagesModel,
|
|
14
13
|
alternativesModel,
|
|
15
|
-
$context
|
|
14
|
+
$context,
|
|
15
|
+
chats
|
|
16
16
|
}) {
|
|
17
17
|
this.api = api;
|
|
18
18
|
this.$key = $key;
|
|
19
19
|
this.$context = $context;
|
|
20
20
|
this.defaultMessages = defaultMessages;
|
|
21
|
-
this.messagesModel = messagesModel;
|
|
22
21
|
this.alternativesModel = alternativesModel;
|
|
23
22
|
this.translateAllMessagesFx = attach({
|
|
24
|
-
source: [this.$key,
|
|
25
|
-
mapParams: (_, [key,
|
|
23
|
+
source: [this.$key, chats.$data, this.alternativesModel.$store, this.$context],
|
|
24
|
+
mapParams: (_, [key, chats, alternatives, context]) => ({
|
|
26
25
|
targetLanguage: context?.translationTargetLanguage ?? '',
|
|
27
|
-
messages:
|
|
26
|
+
messages: chats[key]?.messages ?? [],
|
|
28
27
|
alternatives
|
|
29
28
|
}),
|
|
30
29
|
effect: this.translateBatchFx
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
sample({
|
|
32
|
+
clock: this.translateAllMessagesFx.doneData,
|
|
33
|
+
source: [this.$key],
|
|
34
|
+
fn: ([key], translatedMessages) => ({
|
|
35
|
+
key,
|
|
36
|
+
data: {
|
|
37
|
+
messages: translatedMessages
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
target: chats.update
|
|
41
|
+
});
|
|
33
42
|
}
|
|
34
43
|
shouldSkipTranslation(messages) {
|
|
35
44
|
if (this.$isTranslated.getState()) {
|
|
@@ -43,17 +52,6 @@ export class ChatbotTranslation {
|
|
|
43
52
|
}
|
|
44
53
|
return false;
|
|
45
54
|
}
|
|
46
|
-
initTranslationSamples() {
|
|
47
|
-
sample({
|
|
48
|
-
clock: this.translateAllMessagesFx.doneData,
|
|
49
|
-
source: [this.$key],
|
|
50
|
-
fn: ([key], translatedMessages) => ({
|
|
51
|
-
key,
|
|
52
|
-
data: translatedMessages
|
|
53
|
-
}),
|
|
54
|
-
target: this.messagesModel.setField
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
55
|
async translateRequest({
|
|
58
56
|
textList,
|
|
59
57
|
targetLanguage
|
|
@@ -130,34 +128,45 @@ export class ChatbotTranslation {
|
|
|
130
128
|
};
|
|
131
129
|
});
|
|
132
130
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
applyTranslationFx = attach({
|
|
132
|
+
source: {
|
|
133
|
+
isTranslated: this.$isTranslated
|
|
134
|
+
},
|
|
135
|
+
mapParams: (props, source) => ({
|
|
136
|
+
...props,
|
|
137
|
+
...source
|
|
138
|
+
}),
|
|
139
|
+
effect: createEffect(async ({
|
|
140
|
+
messages,
|
|
141
|
+
targetLanguage,
|
|
142
|
+
preventTranslate
|
|
140
143
|
}) => {
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
144
|
+
if (!preventTranslate) return messages;
|
|
145
|
+
const text = messages.map(({
|
|
146
|
+
options,
|
|
147
|
+
message
|
|
148
|
+
}) => {
|
|
149
|
+
return [message, ...options.map(({
|
|
150
|
+
text
|
|
151
|
+
}) => text)];
|
|
152
|
+
}).flat();
|
|
153
|
+
const response = await this.api.translateTextFx({
|
|
154
|
+
text,
|
|
155
|
+
targetLanguage
|
|
156
|
+
});
|
|
157
|
+
const translatedTexts = response.data.translations.map(({
|
|
158
|
+
translatedText
|
|
159
|
+
}) => decodeHTMLEntities(translatedText));
|
|
160
|
+
return messages.map(message => {
|
|
161
|
+
const options = message.options;
|
|
162
|
+
const translatedMessage = translatedTexts.shift();
|
|
163
|
+
return {
|
|
164
|
+
...message,
|
|
165
|
+
translatedMessage,
|
|
166
|
+
options: addTranslationToOptions(options, translatedTexts.splice(0, options.length))
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
})
|
|
161
170
|
});
|
|
162
171
|
reset() {
|
|
163
172
|
this.setIsTranslated(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","
|
|
1
|
+
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","alternativesModel","$context","chats","translateAllMessagesFx","source","$data","$store","mapParams","_","key","alternatives","context","targetLanguage","translationTargetLanguage","messages","effect","translateBatchFx","clock","doneData","fn","translatedMessages","data","target","update","shouldSkipTranslation","getState","allTranslated","every","message","translatedMessage","translateRequest","textList","text","Object","values","flat","response","translateTextFx","translatedText","translations","map","entries","reduce","result","texts","splice","length","addTranslationToAlternatives","props","set","error","endMessage","defaultOptions","anotherHintOption","options","lastMessage","at","translatedTextsList","alternativesHints","hints","alternativesDefaults","default","forEach","index","translatedHints","translatedDefaults","isLastMessage","applyTranslationFx","isTranslated","preventTranslate","translatedTexts","shift","reset"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AAgEA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/units.types.ts"],"mappings":"","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
|
@@ -4,6 +4,4 @@ export { useFeaturesLocalization, setFeaturesLocalization, Locale } from "./shar
|
|
|
4
4
|
export { generateRandomId } from "./lib/helpers/helpers.js";
|
|
5
5
|
export * from "./features/chatbot/index.js";
|
|
6
6
|
export * from "./features/feedback/index.js";
|
|
7
|
-
export * from "./features/celebrations/index.js";
|
|
8
|
-
export * from "./features/endOfAssignment/index.js";
|
|
9
7
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;
|
|
1
|
+
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","EntityFieldStore","setField","reset","$state","on","state","key","data","fn","currentData","newData","undefined","createEntityFieldStore"],"sourceRoot":"../../../../src","sources":["lib/effector/createEntityFieldStore.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","EntityFieldStore","setField","reset","$state","on","state","key","data","fn","currentData","newData","undefined","event","createEntityFieldStore"],"sourceRoot":"../../../../src","sources":["lib/effector/createEntityFieldStore.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAe,UAAU;AAM1D,OAAO,MAAMC,gBAAgB,CAAI;EACfC,QAAQ,GAAGH,WAAW,CAAiB,CAAC;EACxCI,KAAK,GAAGJ,WAAW,CAAC,CAAC;EAErBK,MAAM,GAAGJ,WAAW,CAAoB,CAAC,CAAC,CAAC,CACxDK,EAAE,CAAC,IAAI,CAACH,QAAQ,EAAE,CAACI,KAAK,EAAE;IAAEC,GAAG;IAAEC,IAAI;IAAEC;EAAG,CAAC,KAAK;IAC/C,IAAIA,EAAE,EAAE;MACN,MAAMC,WAAW,GAAGJ,KAAK,CAACC,GAAG,CAAC;MAC9B,MAAMI,OAAO,GAAGF,EAAE,CAACC,WAAW,CAAC;MAC/B,IAAIC,OAAO,KAAKC,SAAS,EAAE,OAAON,KAAK;MACvC,OAAO;QAAE,GAAGA,KAAK;QAAE,CAACC,GAAG,GAAGI;MAAQ,CAAC;IACrC;IACA,OAAO;MAAE,GAAGL,KAAK;MAAE,CAACC,GAAG,GAAGC;IAAK,CAAC;EAClC,CAAC,CAAC,CACDL,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAEbE,EAAEA,CACPQ,KAAgB,EAChBJ,EAAuE,EACvE;IACA,IAAI,CAACL,MAAM,CAACC,EAAE,CAACQ,KAAK,EAAEJ,EAAE,CAAC;IACzB,OAAO,IAAI;EACb;AACF;AAEA,OAAO,SAASK,sBAAsBA,CAAA,EAAM;EAC1C,OAAO,IAAIb,gBAAgB,CAAI,CAAC;AAClC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createEvent","withEvent","cb","event","watch"],"sourceRoot":"../../../../src","sources":["lib/effector/withEvent.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,UAAU;AAEtC,OAAO,SAASC,SAASA,CAAWC,EAAsB,EAAE;EAC1D,MAAMC,KAAK,GAAGH,WAAW,CAAI,CAAC;EAC9BG,KAAK,CAACC,KAAK,CAACF,EAAE,CAAC;EACf,OAAOC,KAAK;AACd","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { getText } from "../../shared/translation/helpers.js";
|
|
4
|
-
export const noop = () => {};
|
|
5
4
|
export const generateRandomId = () => Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
6
5
|
const getYears = days => Math.floor(days / 365);
|
|
7
6
|
const getMonths = days => Math.floor(days / 30);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getText","
|
|
1
|
+
{"version":3,"names":["getText","generateRandomId","Date","now","toString","Math","random","substring","getYears","days","floor","getMonths","getDays","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getRelativeTimeText","date","timeBufferMs","getTime","targetDate","diffTime","months","years"],"sourceRoot":"../../../../src","sources":["lib/helpers/helpers.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,qCAAkC;AAE1D,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAC9BC,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,GAAGC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACF,QAAQ,CAAC,EAAE,CAAC,CAACG,SAAS,CAAC,CAAC,CAAC;AAEnE,MAAMC,QAAQ,GAAIC,IAAY,IAAKJ,IAAI,CAACK,KAAK,CAACD,IAAI,GAAG,GAAG,CAAC;AACzD,MAAME,SAAS,GAAIF,IAAY,IAAKJ,IAAI,CAACK,KAAK,CAACD,IAAI,GAAG,EAAE,CAAC;AACzD,MAAMG,OAAO,GAAIC,KAAa,IAAKR,IAAI,CAACK,KAAK,CAACG,KAAK,GAAG,EAAE,CAAC;AACzD,MAAMC,QAAQ,GAAIC,OAAe,IAAKV,IAAI,CAACK,KAAK,CAACK,OAAO,GAAG,EAAE,CAAC;AAC9D,MAAMC,UAAU,GAAIC,OAAe,IAAKZ,IAAI,CAACK,KAAK,CAACO,OAAO,GAAG,EAAE,CAAC;AAChE,MAAMC,UAAU,GAAIC,YAAoB,IAAKd,IAAI,CAACK,KAAK,CAACS,YAAY,GAAG,IAAI,CAAC;AAE5E,OAAO,MAAMC,mBAAmB,GAAIC,IAAU,IAAK;EACjD,MAAMC,YAAY,GAAG,IAAI,EAAC;;EAE1B,MAAMnB,GAAG,GAAG,IAAID,IAAI,CAAC,CAAC,CAACqB,OAAO,CAAC,CAAC;EAChC,MAAMC,UAAU,GAAG,IAAItB,IAAI,CAACmB,IAAI,CAAC,CAACE,OAAO,CAAC,CAAC,GAAGD,YAAY;EAC1D,MAAMG,QAAQ,GAAGtB,GAAG,GAAGqB,UAAU;EAEjC,MAAMP,OAAO,GAAGC,UAAU,CAACO,QAAQ,CAAC;EACpC,MAAMV,OAAO,GAAGC,UAAU,CAACC,OAAO,CAAC;EACnC,MAAMJ,KAAK,GAAGC,QAAQ,CAACC,OAAO,CAAC;EAC/B,MAAMN,IAAI,GAAGG,OAAO,CAACC,KAAK,CAAC;EAC3B,MAAMa,MAAM,GAAGf,SAAS,CAACF,IAAI,CAAC;EAC9B,MAAMkB,KAAK,GAAGnB,QAAQ,CAACC,IAAI,CAAC;EAE5B,IAAIQ,OAAO,GAAG,EAAE,EAAE,OAAOjB,OAAO,CAAC,cAAc,CAAC;EAChD,IAAIe,OAAO,GAAG,EAAE,EACd,OAAO,GAAGA,OAAO,IAAIA,OAAO,KAAK,CAAC,GAAGf,OAAO,CAAC,gBAAgB,CAAC,GAAGA,OAAO,CAAC,iBAAiB,CAAC,EAAE;EAC/F,IAAIa,KAAK,GAAG,EAAE,EACZ,OAAO,GAAGA,KAAK,IAAIA,KAAK,KAAK,CAAC,GAAGb,OAAO,CAAC,cAAc,CAAC,GAAGA,OAAO,CAAC,eAAe,CAAC,EAAE;EACvF,IAAIS,IAAI,GAAG,EAAE,EAAE,OAAO,GAAGA,IAAI,IAAIA,IAAI,KAAK,CAAC,GAAGT,OAAO,CAAC,aAAa,CAAC,GAAGA,OAAO,CAAC,cAAc,CAAC,EAAE;EAChG,IAAI0B,MAAM,GAAG,EAAE,EACb,OAAO,GAAGA,MAAM,IAAIA,MAAM,KAAK,CAAC,GAAG1B,OAAO,CAAC,eAAe,CAAC,GAAGA,OAAO,CAAC,gBAAgB,CAAC,EAAE;EAC3F,OAAO,GAAG2B,KAAK,IAAIA,KAAK,KAAK,CAAC,GAAG3B,OAAO,CAAC,cAAc,CAAC,GAAGA,OAAO,CAAC,eAAe,CAAC,EAAE;AACvF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function getRandomElements(array, limit = array.length) {
|
|
4
|
+
if (array.length === 0) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
const randomCount = Math.min(Math.floor(Math.random() * array.length) + 1, limit);
|
|
8
|
+
const arrayCopy = [...array];
|
|
9
|
+
const result = [];
|
|
10
|
+
for (let i = 0; i < randomCount; i++) {
|
|
11
|
+
if (arrayCopy.length === 0) {
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
const randomIndex = Math.floor(Math.random() * arrayCopy.length);
|
|
15
|
+
result.push(arrayCopy[randomIndex]);
|
|
16
|
+
arrayCopy.splice(randomIndex, 1);
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=randomElements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getRandomElements","array","limit","length","randomCount","Math","min","floor","random","arrayCopy","result","i","randomIndex","push","splice"],"sourceRoot":"../../../../src","sources":["lib/helpers/randomElements.ts"],"mappings":";;AAAA,OAAO,SAASA,iBAAiBA,CAAIC,KAAU,EAAEC,KAAK,GAAGD,KAAK,CAACE,MAAM,EAAO;EAC1E,IAAIF,KAAK,CAACE,MAAM,KAAK,CAAC,EAAE;IACtB,OAAO,EAAE;EACX;EAEA,MAAMC,WAAW,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,KAAK,CAACF,IAAI,CAACG,MAAM,CAAC,CAAC,GAAGP,KAAK,CAACE,MAAM,CAAC,GAAG,CAAC,EAAED,KAAK,CAAC;EAEjF,MAAMO,SAAS,GAAG,CAAC,GAAGR,KAAK,CAAC;EAC5B,MAAMS,MAAW,GAAG,EAAE;EAEtB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,WAAW,EAAEO,CAAC,EAAE,EAAE;IACpC,IAAIF,SAAS,CAACN,MAAM,KAAK,CAAC,EAAE;MAC1B;IACF;IAEA,MAAMS,WAAW,GAAGP,IAAI,CAACE,KAAK,CAACF,IAAI,CAACG,MAAM,CAAC,CAAC,GAAGC,SAAS,CAACN,MAAM,CAAC;IAChEO,MAAM,CAACG,IAAI,CAACJ,SAAS,CAACG,WAAW,CAAC,CAAC;IACnCH,SAAS,CAACK,MAAM,CAACF,WAAW,EAAE,CAAC,CAAC;EAClC;EAEA,OAAOF,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["lib/types/keys.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Svg, { Path } from 'react-native-svg';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function HighlighterIcon({
|
|
8
|
+
size = 17,
|
|
9
|
+
color = COLORS.NEUTRAL_9,
|
|
10
|
+
style
|
|
11
|
+
}) {
|
|
12
|
+
return /*#__PURE__*/_jsxs(Svg, {
|
|
13
|
+
style: style,
|
|
14
|
+
width: size,
|
|
15
|
+
height: size,
|
|
16
|
+
viewBox: "0 0 17 17",
|
|
17
|
+
fill: "none",
|
|
18
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
19
|
+
d: "M6.02 1.557a.596.596 0 011.108 0l.42 1.067c.06.153.182.275.336.335l1.066.42a.596.596 0 010 1.109l-1.066.42a.596.596 0 00-.336.336l-.42 1.066a.596.596 0 01-1.109 0L5.6 5.244a.596.596 0 00-.336-.336l-1.066-.42a.596.596 0 010-1.108l1.066-.42a.596.596 0 00.336-.336l.42-1.067z",
|
|
20
|
+
fill: color
|
|
21
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
22
|
+
fillRule: "evenodd",
|
|
23
|
+
clipRule: "evenodd",
|
|
24
|
+
d: "M8.843 3.338l-.974.73-2.11 1.583.26.66a.596.596 0 001.109 0l.42-1.067a.596.596 0 01.336-.336l1.066-.42a.596.596 0 000-1.108l-.107-.042zm.67-.502c.497.346.665.964.506 1.495l.476-.357 2.868 2.868-3.636 4.849-4.08-4.08.38-.286a1.316 1.316 0 01-.705-.74l-.185-.468-.898.674a.95.95 0 00-.33 1.065 1.75 1.75 0 00-.2.53l-.602 3.016-1.752 1.752a.95.95 0 00.297 1.545l1.83.784a1.35 1.35 0 001.487-.286l.966-.966 3.016-.604c.187-.037.366-.105.53-.199a.95.95 0 001.065-.33l5.445-7.26a2.25 2.25 0 00-.209-2.94L14.44 1.554a2.25 2.25 0 00-2.941-.209l-1.986 1.49zm3.866-.22a.75.75 0 00-.98-.07l-.692.519 2.565 2.565.52-.692a.75.75 0 00-.07-.98l-1.343-1.342zM3.797 12.832l-.807.808.99.425.525-.525-.708-.707zm2.015-.107l2.357-.47-3.086-3.087-.471 2.357 1.2 1.2z",
|
|
25
|
+
fill: color
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=HighlighterIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Svg","Path","COLORS","jsx","_jsx","jsxs","_jsxs","HighlighterIcon","size","color","NEUTRAL_9","style","width","height","viewBox","fill","children","d","fillRule","clipRule"],"sourceRoot":"../../../../src","sources":["shared/icons/HighlighterIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAE5C,SAASC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnD,OAAO,SAASC,eAAeA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGP,MAAM,CAACQ,SAAS;EAAEC;AAAiB,CAAC,EAAE;EACzF,oBACEL,KAAA,CAACN,GAAG;IAACW,KAAK,EAAEA,KAAM;IAACC,KAAK,EAAEJ,IAAK;IAACK,MAAM,EAAEL,IAAK;IAACM,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,gBAC3EZ,IAAA,CAACH,IAAI;MACHgB,CAAC,EAAC,kRAAkR;MACpRF,IAAI,EAAEN;IAAM,CACb,CAAC,eACFL,IAAA,CAACH,IAAI;MACHiB,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBF,CAAC,EAAC,2uBAA2uB;MAC7uBF,IAAI,EAAEN;IAAM,CACb,CAAC;EAAA,CACC,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Svg, { Path } from 'react-native-svg';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function StopIcon({
|
|
8
|
+
size = 17,
|
|
9
|
+
color = COLORS.NEUTRAL_9,
|
|
10
|
+
style
|
|
11
|
+
}) {
|
|
12
|
+
return /*#__PURE__*/_jsx(Svg, {
|
|
13
|
+
width: size,
|
|
14
|
+
height: size,
|
|
15
|
+
viewBox: "0 0 17 17",
|
|
16
|
+
fill: "none",
|
|
17
|
+
style: style,
|
|
18
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M1.759 2.996c0-.967.784-1.752 1.752-1.752h10.496c.967 0 1.752.785 1.752 1.752v10.496c0 .968-.785 1.752-1.752 1.752H3.51a1.752 1.752 0 01-1.752-1.752V2.996z",
|
|
22
|
+
fill: color
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=StopIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Svg","Path","COLORS","jsx","_jsx","StopIcon","size","color","NEUTRAL_9","style","width","height","viewBox","fill","children","fillRule","clipRule","d"],"sourceRoot":"../../../../src","sources":["shared/icons/StopIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAE5C,SAASC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,SAASC,QAAQA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGL,MAAM,CAACM,SAAS;EAAEC;AAAiB,CAAC,EAAE;EAClF,oBACEL,IAAA,CAACJ,GAAG;IAACU,KAAK,EAAEJ,IAAK;IAACK,MAAM,EAAEL,IAAK;IAACM,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAACJ,KAAK,EAAEA,KAAM;IAAAK,QAAA,eAC3EV,IAAA,CAACH,IAAI;MACHc,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,6JAA6J;MAC/JJ,IAAI,EAAEN;IAAM,CACb;EAAC,CACC,CAAC;AAEV","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Locale } from "./types.js";
|
|
4
|
-
import EN from '
|
|
5
|
-
import GB from '
|
|
6
|
-
import SW from '
|
|
4
|
+
import EN from './localization/en.json';
|
|
5
|
+
import GB from './localization/gb.json';
|
|
6
|
+
import SW from './localization/sw.json';
|
|
7
7
|
export const LOCALIZATION_CONFIGS = {
|
|
8
8
|
[Locale.EN]: EN,
|
|
9
9
|
[Locale.GB]: GB,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale","EN","GB","SW","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"names":["Locale","EN","GB","SW","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AAEvC,OAAO,MAAMC,oBAAoB,GAAG;EAClC,CAACJ,MAAM,CAACC,EAAE,GAAGA,EAAE;EACf,CAACD,MAAM,CAACE,EAAE,GAAGA,EAAE;EACf,CAACF,MAAM,CAACG,EAAE,GAAGA;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { $localization, setLocalization } from "./model.js";
|
|
4
|
+
export function getTranslation(config, key) {
|
|
5
|
+
const rawTranslation = config?.[key];
|
|
6
|
+
if (typeof rawTranslation === 'string' || !key.includes('.')) {
|
|
7
|
+
return rawTranslation;
|
|
8
|
+
}
|
|
9
|
+
const keys = key.split('.');
|
|
10
|
+
let translation = config;
|
|
11
|
+
for (const k of keys) {
|
|
12
|
+
if (translation[k] === undefined) return key;
|
|
13
|
+
translation = translation[k];
|
|
14
|
+
}
|
|
15
|
+
if (typeof translation === 'string') {
|
|
16
|
+
return translation;
|
|
17
|
+
}
|
|
18
|
+
return key;
|
|
19
|
+
}
|
|
4
20
|
export const getSubstitutedString = (str, substitutions = {}) => {
|
|
5
21
|
const substitutionsArray = Object.entries(substitutions);
|
|
6
22
|
let result = str;
|
|
@@ -12,11 +28,9 @@ export const getSubstitutedString = (str, substitutions = {}) => {
|
|
|
12
28
|
};
|
|
13
29
|
export const getText = (key, args = null) => {
|
|
14
30
|
const config = $localization.getState();
|
|
15
|
-
const translation = config
|
|
16
|
-
if (translation
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return translation ?? key;
|
|
31
|
+
const translation = getTranslation(config, key);
|
|
32
|
+
if (args) return getSubstitutedString(translation, args);
|
|
33
|
+
return translation;
|
|
20
34
|
};
|
|
21
35
|
export const setFeaturesLocalization = generator => {
|
|
22
36
|
setLocalization(generator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["$localization","setLocalization","getSubstitutedString","str","substitutions","substitutionsArray","Object","entries","result","length","forEach","
|
|
1
|
+
{"version":3,"names":["$localization","setLocalization","getTranslation","config","key","rawTranslation","includes","keys","split","translation","k","undefined","getSubstitutedString","str","substitutions","substitutionsArray","Object","entries","result","length","forEach","value","replace","getText","args","getState","setFeaturesLocalization","generator"],"sourceRoot":"../../../../src","sources":["shared/translation/helpers.ts"],"mappings":";;AACA,SAASA,aAAa,EAAEC,eAAe,QAAQ,YAAS;AAGxD,OAAO,SAASC,cAAcA,CAACC,MAAoB,EAAEC,GAAoB,EAAE;EACzE,MAAMC,cAAc,GAAGF,MAAM,GAAGC,GAAG,CAAuB;EAC1D,IAAI,OAAOC,cAAc,KAAK,QAAQ,IAAI,CAACD,GAAG,CAACE,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC5D,OAAOD,cAAc;EACvB;EACA,MAAME,IAAI,GAAGH,GAAG,CAACI,KAAK,CAAC,GAAG,CAAC;EAC3B,IAAIC,WAAW,GAAGN,MAAM;EACxB,KAAK,MAAMO,CAAC,IAAIH,IAAI,EAAE;IACpB,IAAIE,WAAW,CAACC,CAAC,CAAuB,KAAKC,SAAS,EAAE,OAAOP,GAAG;IAClEK,WAAW,GAAGA,WAAW,CAACC,CAAC,CAA8B;EAC3D;EACA,IAAI,OAAOD,WAAW,KAAK,QAAQ,EAAE;IACnC,OAAOA,WAAW;EACpB;EACA,OAAOL,GAAG;AACZ;AAEA,OAAO,MAAMQ,oBAAoB,GAAGA,CAACC,GAAW,EAAEC,aAAqC,GAAG,CAAC,CAAC,KAAK;EAC/F,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,OAAO,CAACH,aAAa,CAAC;EACxD,IAAII,MAAM,GAAGL,GAAG;EAEhB,IAAI,CAACE,kBAAkB,CAACI,MAAM,EAAE,OAAOD,MAAM;EAE7CH,kBAAkB,CAACK,OAAO,CAAC,CAAC,CAAChB,GAAG,EAAEiB,KAAK,CAAC,KAAK;IAC3CH,MAAM,GAAGA,MAAM,CAACI,OAAO,CAAC,KAAKlB,GAAG,IAAI,EAAEiB,KAAK,CAAC;EAC9C,CAAC,CAAC;EAEF,OAAOH,MAAM;AACf,CAAC;AAED,OAAO,MAAMK,OAAgB,GAAGA,CAACnB,GAAoB,EAAEoB,IAAI,GAAG,IAAI,KAAK;EACrE,MAAMrB,MAAM,GAAGH,aAAa,CAACyB,QAAQ,CAAC,CAAC;EAEvC,MAAMhB,WAAW,GAAGP,cAAc,CAACC,MAAM,EAAEC,GAAG,CAAC;EAC/C,IAAIoB,IAAI,EAAE,OAAOZ,oBAAoB,CAACH,WAAW,EAAEe,IAAI,CAAC;EACxD,OAAOf,WAAW;AACpB,CAAC;AAED,OAAO,MAAMiB,uBAAuB,GAClCC,SAAiF,IAC9E;EACH1B,eAAe,CAAC0B,SAAS,CAAC;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
import { useUnit } from 'effector-react';
|
|
4
4
|
import { $localization, setLocalization } from "./model.js";
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
|
-
import { getSubstitutedString } from "./helpers.js";
|
|
6
|
+
import { getSubstitutedString, getTranslation } from "./helpers.js";
|
|
7
7
|
export const useText = () => {
|
|
8
8
|
const config = useUnit($localization);
|
|
9
9
|
return (key, args = null) => {
|
|
10
|
-
const translation = config
|
|
11
|
-
if (translation
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return translation ?? key;
|
|
10
|
+
const translation = getTranslation(config, key);
|
|
11
|
+
if (args) return getSubstitutedString(translation, args);
|
|
12
|
+
return translation;
|
|
15
13
|
};
|
|
16
14
|
};
|
|
17
15
|
export const useFeaturesLocalization = generator => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useUnit","$localization","setLocalization","useEffect","getSubstitutedString","useText","config","key","args","translation","useFeaturesLocalization","generator"],"sourceRoot":"../../../../src","sources":["shared/translation/hooks.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,EAAEC,eAAe,QAAQ,YAAS;AAExD,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,oBAAoB,QAAQ,cAAW;
|
|
1
|
+
{"version":3,"names":["useUnit","$localization","setLocalization","useEffect","getSubstitutedString","getTranslation","useText","config","key","args","translation","useFeaturesLocalization","generator"],"sourceRoot":"../../../../src","sources":["shared/translation/hooks.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,EAAEC,eAAe,QAAQ,YAAS;AAExD,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,oBAAoB,EAAEC,cAAc,QAAQ,cAAW;AAEhE,OAAO,MAAMC,OAAO,GAAGA,CAAA,KAAe;EACpC,MAAMC,MAAM,GAAGP,OAAO,CAACC,aAAa,CAAC;EAErC,OAAO,CAACO,GAAG,EAAEC,IAAI,GAAG,IAAI,KAAK;IAC3B,MAAMC,WAAW,GAAGL,cAAc,CAACE,MAAM,EAAEC,GAAG,CAAC;IAC/C,IAAIC,IAAI,EAAE,OAAOL,oBAAoB,CAACM,WAAW,EAAED,IAAI,CAAC;IACxD,OAAOC,WAAW;EACpB,CAAC;AACH,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAClCC,SAAiF,IAC9E;EACHT,SAAS,CAAC,MAAM;IACdD,eAAe,CAACU,SAAS,CAAC;EAC5B,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;AACjB,CAAC","ignoreList":[]}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"answerAgain": "Answer again to get another hint!",
|
|
17
|
+
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
+
"showError": "Show error"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"answerAgain": "Answer again to get another hint!",
|
|
17
|
+
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
+
"showError": "Show error"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "månad sedan",
|
|
11
11
|
"time.monthsAgo": "månader sedan",
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
|
-
"time.yearsAgo": "år sedan"
|
|
13
|
+
"time.yearsAgo": "år sedan",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
+
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
17
|
+
"errorMessage": "Tyvärr kan jag inte hjälpa dig just nu 😔.",
|
|
18
|
+
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
19
|
+
"showError": "Visa fel"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -6,6 +6,6 @@ import { LOCALIZATION_CONFIGS } from "./constants.js";
|
|
|
6
6
|
export const setLocalization = createEvent();
|
|
7
7
|
export const $localization = createStore(LOCALIZATION_CONFIGS[Locale.EN]).on(setLocalization, (state, payload) => {
|
|
8
8
|
if (typeof payload === 'function') return payload(LOCALIZATION_CONFIGS);
|
|
9
|
-
|
|
9
|
+
return payload;
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","Locale","LOCALIZATION_CONFIGS","setLocalization","$localization","EN","on","state","payload"
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","Locale","LOCALIZATION_CONFIGS","setLocalization","$localization","EN","on","state","payload"],"sourceRoot":"../../../../src","sources":["shared/translation/model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AACnD,SAASC,MAAM,QAAsB,YAAS;AAC9C,SAASC,oBAAoB,QAAQ,gBAAa;AAElD,OAAO,MAAMC,eAAe,GAAGJ,WAAW,CAExC,CAAC;AAEH,OAAO,MAAMK,aAAa,GAAGJ,WAAW,CAAeE,oBAAoB,CAACD,MAAM,CAACI,EAAE,CAAC,CAAC,CAACC,EAAE,CACxFH,eAAe,EACf,CAACI,KAAK,EAAEC,OAAO,KAAK;EAClB,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE,OAAOA,OAAO,CAACN,oBAAoB,CAAC;EACvE,OAAOM,OAAO;AAChB,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;AAUA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;AAUA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAMlB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/translation/validation.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChatbotModel } from '../../model/ChatBotModel';
|
|
3
2
|
type AlternativesProps = {
|
|
4
|
-
model: ChatbotModel;
|
|
5
3
|
onPressAlternative: (message: string, translatedMessage?: string) => void;
|
|
6
4
|
hasMessages: boolean;
|
|
7
5
|
isHintFeedback: boolean;
|
|
8
6
|
};
|
|
9
|
-
export declare const Alternatives: ({
|
|
7
|
+
export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
|
|
10
8
|
export {};
|
|
11
9
|
//# sourceMappingURL=Alternatives.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,iBAAiB,GAAG;IACvB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,yDAItB,iBAAiB,sBA4BnB,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AudioStatus } from '../../types/t2s.types';
|
|
3
|
-
import { MessageVariant
|
|
3
|
+
import { MessageVariant } from '../../types/model.types';
|
|
4
|
+
import { ConversationMessage } from '../../types/units.types';
|
|
4
5
|
type ChatMessageProps = {
|
|
5
6
|
variant: MessageVariant;
|
|
6
|
-
message: string;
|
|
7
|
-
onPressTextToSpeech: () => void;
|
|
8
7
|
isTextToSpeechPending: boolean;
|
|
9
8
|
isActive: boolean;
|
|
10
9
|
withTextToSpeech?: boolean;
|
|
11
10
|
audioStatus: AudioStatus;
|
|
12
|
-
|
|
11
|
+
message: ConversationMessage;
|
|
12
|
+
isTranslated?: boolean;
|
|
13
13
|
};
|
|
14
14
|
export type VariantProps = Omit<ChatMessageProps, 'variant'>;
|
|
15
15
|
export declare const ChatMessage: ({ variant, ...props }: ChatMessageProps) => React.JSX.Element;
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
|