react-native-executorch 0.3.2 → 0.4.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/README.md +30 -13
- package/android/build.gradle +1 -1
- package/android/libs/executorch.aar +0 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/ETModule.kt +1 -2
- package/android/src/main/java/com/swmansion/rnexecutorch/ImageSegmentation.kt +58 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +13 -49
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/StyleTransfer.kt +1 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/TextEmbeddings.kt +51 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/Tokenizer.kt +86 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/BaseModel.kt +3 -4
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsModel.kt +48 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsUtils.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/ClassificationModel.kt +1 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/Constants.kt +26 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/ImageSegmentationModel.kt +142 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt +3 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/{StyleTransferModel.kt → styleTransfer/StyleTransferModel.kt} +2 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ArrayUtils.kt +0 -8
- package/android/src/main/java/com/swmansion/rnexecutorch/{models/classification/Utils.kt → utils/Numerical.kt} +1 -1
- package/ios/ExecutorchLib.xcframework/Info.plist +4 -4
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/Classification.mm +15 -18
- package/ios/RnExecutorch/ETModule.mm +6 -5
- package/ios/RnExecutorch/ImageSegmentation.h +5 -0
- package/ios/RnExecutorch/ImageSegmentation.mm +60 -0
- package/ios/RnExecutorch/LLM.mm +12 -53
- package/ios/RnExecutorch/OCR.mm +39 -43
- package/ios/RnExecutorch/ObjectDetection.mm +20 -20
- package/ios/RnExecutorch/SpeechToText.mm +6 -7
- package/ios/RnExecutorch/StyleTransfer.mm +16 -19
- package/ios/RnExecutorch/TextEmbeddings.h +5 -0
- package/ios/RnExecutorch/TextEmbeddings.mm +62 -0
- package/ios/RnExecutorch/Tokenizer.h +5 -0
- package/ios/RnExecutorch/Tokenizer.mm +83 -0
- package/ios/RnExecutorch/VerticalOCR.mm +36 -36
- package/ios/RnExecutorch/models/BaseModel.h +2 -5
- package/ios/RnExecutorch/models/BaseModel.mm +5 -15
- package/ios/RnExecutorch/models/classification/ClassificationModel.mm +2 -3
- package/ios/RnExecutorch/models/classification/Constants.mm +0 -1
- package/ios/RnExecutorch/models/image_segmentation/Constants.h +4 -0
- package/ios/RnExecutorch/models/image_segmentation/Constants.mm +8 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.h +10 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm +146 -0
- package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.mm +1 -2
- package/ios/RnExecutorch/models/ocr/Detector.h +0 -2
- package/ios/RnExecutorch/models/ocr/Detector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.h +5 -4
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.mm +9 -26
- package/ios/RnExecutorch/models/ocr/Recognizer.mm +1 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.h +0 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/utils/OCRUtils.mm +0 -1
- package/ios/RnExecutorch/models/stt/Moonshine.mm +1 -6
- package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.mm +7 -11
- package/ios/RnExecutorch/models/stt/Whisper.mm +0 -5
- package/ios/RnExecutorch/models/{StyleTransferModel.h → style_transfer/StyleTransferModel.h} +1 -1
- package/ios/RnExecutorch/models/{StyleTransferModel.mm → style_transfer/StyleTransferModel.mm} +2 -3
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.h +15 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.mm +45 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.h +8 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.mm +49 -0
- package/ios/RnExecutorch/utils/Conversions.h +15 -0
- package/ios/RnExecutorch/utils/ImageProcessor.h +0 -1
- package/ios/RnExecutorch/{models/classification/Utils.h → utils/Numerical.h} +0 -2
- package/ios/RnExecutorch/{models/classification/Utils.mm → utils/Numerical.mm} +0 -2
- package/ios/RnExecutorch/utils/ObjectDetectionUtils.mm +0 -2
- package/ios/RnExecutorch/utils/SFFT.mm +1 -1
- package/ios/RnExecutorch/utils/ScalarType.h +0 -2
- package/lib/module/Error.js +16 -2
- package/lib/module/Error.js.map +1 -1
- package/lib/module/constants/{llamaDefaults.js → llmDefaults.js} +7 -3
- package/lib/module/constants/llmDefaults.js.map +1 -0
- package/lib/module/constants/modelUrls.js +88 -27
- package/lib/module/constants/modelUrls.js.map +1 -1
- package/lib/module/constants/ocr/models.js +290 -0
- package/lib/module/constants/ocr/models.js.map +1 -0
- package/lib/module/constants/ocr/symbols.js +137 -2
- package/lib/module/constants/ocr/symbols.js.map +1 -1
- package/lib/module/constants/sttDefaults.js +50 -25
- package/lib/module/constants/sttDefaults.js.map +1 -1
- package/lib/module/controllers/LLMController.js +205 -0
- package/lib/module/controllers/LLMController.js.map +1 -0
- package/lib/module/controllers/OCRController.js +5 -10
- package/lib/module/controllers/OCRController.js.map +1 -1
- package/lib/module/controllers/SpeechToTextController.js +225 -122
- package/lib/module/controllers/SpeechToTextController.js.map +1 -1
- package/lib/module/controllers/VerticalOCRController.js +6 -10
- package/lib/module/controllers/VerticalOCRController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +8 -23
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +13 -0
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -0
- package/lib/module/hooks/computer_vision/useOCR.js +11 -6
- package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +8 -23
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +8 -23
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/computer_vision/useVerticalOCR.js +10 -7
- package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +8 -36
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useLLM.js +54 -63
- package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js +15 -11
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +14 -0
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js +54 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -0
- package/lib/module/hooks/useModule.js +18 -62
- package/lib/module/hooks/useModule.js.map +1 -1
- package/lib/module/index.js +16 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +9 -10
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ClassificationModule.js +8 -5
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +28 -0
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -0
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +8 -5
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +8 -5
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +8 -5
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/LLMModule.js +46 -27
- package/lib/module/modules/natural_language_processing/LLMModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +8 -5
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +14 -0
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js +26 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js.map +1 -0
- package/lib/module/native/NativeClassification.js.map +1 -1
- package/lib/module/native/NativeImageSegmentation.js +5 -0
- package/lib/module/native/NativeImageSegmentation.js.map +1 -0
- package/lib/module/native/NativeLLM.js.map +1 -1
- package/lib/module/native/NativeTextEmbeddings.js +5 -0
- package/lib/module/native/NativeTextEmbeddings.js.map +1 -0
- package/lib/module/native/NativeTokenizer.js +5 -0
- package/lib/module/native/NativeTokenizer.js.map +1 -0
- package/lib/module/native/RnExecutorchModules.js +18 -113
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/imageSegmentation.js +29 -0
- package/lib/module/types/imageSegmentation.js.map +1 -0
- package/lib/module/types/llm.js +7 -0
- package/lib/module/types/llm.js.map +1 -0
- package/lib/module/types/{object_detection.js → objectDetection.js} +1 -1
- package/lib/module/types/objectDetection.js.map +1 -0
- package/lib/module/types/ocr.js +2 -0
- package/lib/module/types/stt.js +82 -0
- package/lib/module/types/stt.js.map +1 -0
- package/lib/module/utils/ResourceFetcher.js +156 -0
- package/lib/module/utils/ResourceFetcher.js.map +1 -0
- package/lib/module/utils/llm.js +25 -0
- package/lib/module/utils/llm.js.map +1 -0
- package/lib/module/utils/stt.js +22 -0
- package/lib/module/utils/stt.js.map +1 -0
- package/lib/typescript/Error.d.ts +4 -1
- package/lib/typescript/Error.d.ts.map +1 -1
- package/lib/typescript/constants/{llamaDefaults.d.ts → llmDefaults.d.ts} +5 -5
- package/lib/typescript/constants/llmDefaults.d.ts.map +1 -0
- package/lib/typescript/constants/modelUrls.d.ts +74 -28
- package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
- package/lib/typescript/constants/ocr/models.d.ts +285 -0
- package/lib/typescript/constants/ocr/models.d.ts.map +1 -0
- package/lib/typescript/constants/ocr/symbols.d.ts +73 -1
- package/lib/typescript/constants/ocr/symbols.d.ts.map +1 -1
- package/lib/typescript/constants/sttDefaults.d.ts +8 -13
- package/lib/typescript/constants/sttDefaults.d.ts.map +1 -1
- package/lib/typescript/controllers/LLMController.d.ts +46 -0
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -0
- package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
- package/lib/typescript/controllers/SpeechToTextController.d.ts +30 -16
- package/lib/typescript/controllers/SpeechToTextController.d.ts.map +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts +5 -5
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts +37 -0
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts +5 -4
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts +4 -2
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts +5 -6
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts +6 -6
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +7 -3
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts +13 -0
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts +16 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts.map +1 -0
- package/lib/typescript/hooks/useModule.d.ts +11 -10
- package/lib/typescript/hooks/useModule.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +15 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +4 -5
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +7 -7
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +32 -0
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +4 -3
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts +19 -5
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +7 -4
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +8 -0
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeClassification.d.ts.map +1 -1
- package/lib/typescript/native/NativeImageSegmentation.d.ts +10 -0
- package/lib/typescript/native/NativeImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/native/NativeLLM.d.ts +3 -4
- package/lib/typescript/native/NativeLLM.d.ts.map +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts.map +1 -1
- package/lib/typescript/native/NativeSpeechToText.d.ts +2 -2
- package/lib/typescript/native/NativeSpeechToText.d.ts.map +1 -1
- package/lib/typescript/native/NativeTextEmbeddings.d.ts +8 -0
- package/lib/typescript/native/NativeTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/native/NativeTokenizer.d.ts +12 -0
- package/lib/typescript/native/NativeTokenizer.d.ts.map +1 -0
- package/lib/typescript/native/RnExecutorchModules.d.ts +18 -41
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/typescript/types/common.d.ts +1 -26
- package/lib/typescript/types/common.d.ts.map +1 -1
- package/lib/typescript/types/imageSegmentation.d.ts +25 -0
- package/lib/typescript/types/imageSegmentation.d.ts.map +1 -0
- package/lib/typescript/types/llm.d.ts +38 -0
- package/lib/typescript/types/llm.d.ts.map +1 -0
- package/lib/typescript/types/{object_detection.d.ts → objectDetection.d.ts} +1 -1
- package/lib/typescript/types/objectDetection.d.ts.map +1 -0
- package/lib/typescript/types/ocr.d.ts +2 -1
- package/lib/typescript/types/ocr.d.ts.map +1 -1
- package/lib/typescript/types/stt.d.ts +91 -0
- package/lib/typescript/types/stt.d.ts.map +1 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts +17 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -0
- package/lib/typescript/utils/llm.d.ts +3 -0
- package/lib/typescript/utils/llm.d.ts.map +1 -0
- package/lib/typescript/utils/stt.d.ts +2 -0
- package/lib/typescript/utils/stt.d.ts.map +1 -0
- package/package.json +12 -48
- package/react-native-executorch.podspec +1 -1
- package/src/Error.ts +16 -3
- package/src/constants/llmDefaults.ts +14 -0
- package/src/constants/modelUrls.ts +146 -39
- package/src/constants/ocr/models.ts +453 -0
- package/src/constants/ocr/symbols.ts +147 -3
- package/src/constants/sttDefaults.ts +55 -37
- package/src/controllers/LLMController.ts +286 -0
- package/src/controllers/OCRController.ts +14 -28
- package/src/controllers/SpeechToTextController.ts +318 -180
- package/src/controllers/VerticalOCRController.ts +17 -32
- package/src/hooks/computer_vision/useClassification.ts +11 -26
- package/src/hooks/computer_vision/useImageSegmentation.ts +18 -0
- package/src/hooks/computer_vision/useOCR.ts +17 -5
- package/src/hooks/computer_vision/useObjectDetection.ts +10 -24
- package/src/hooks/computer_vision/useStyleTransfer.ts +9 -25
- package/src/hooks/computer_vision/useVerticalOCR.ts +11 -4
- package/src/hooks/general/useExecutorchModule.ts +10 -50
- package/src/hooks/natural_language_processing/useLLM.ts +80 -97
- package/src/hooks/natural_language_processing/useSpeechToText.ts +39 -12
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +18 -0
- package/src/hooks/natural_language_processing/useTokenizer.ts +61 -0
- package/src/hooks/useModule.ts +32 -92
- package/src/index.tsx +16 -2
- package/src/modules/BaseModule.ts +16 -26
- package/src/modules/computer_vision/ClassificationModule.ts +13 -8
- package/src/modules/computer_vision/ImageSegmentationModule.ts +39 -0
- package/src/modules/computer_vision/ObjectDetectionModule.ts +13 -8
- package/src/modules/computer_vision/StyleTransferModule.ts +13 -8
- package/src/modules/general/ExecutorchModule.ts +11 -6
- package/src/modules/natural_language_processing/LLMModule.ts +64 -51
- package/src/modules/natural_language_processing/SpeechToTextModule.ts +25 -10
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +18 -0
- package/src/modules/natural_language_processing/TokenizerModule.ts +34 -0
- package/src/native/NativeClassification.ts +0 -1
- package/src/native/NativeImageSegmentation.ts +14 -0
- package/src/native/NativeLLM.ts +3 -10
- package/src/native/NativeObjectDetection.ts +1 -1
- package/src/native/NativeSpeechToText.ts +2 -2
- package/src/native/NativeTextEmbeddings.ts +9 -0
- package/src/native/NativeTokenizer.ts +13 -0
- package/src/native/RnExecutorchModules.ts +54 -234
- package/src/types/common.ts +1 -44
- package/src/types/imageSegmentation.ts +25 -0
- package/src/types/llm.ts +57 -0
- package/src/types/ocr.ts +3 -1
- package/src/types/stt.ts +93 -0
- package/src/utils/ResourceFetcher.ts +196 -0
- package/src/utils/llm.ts +34 -0
- package/src/utils/stt.ts +28 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/llms/ConversationManager.kt +0 -68
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/_CodeSignature/CodeResources +0 -124
- package/ios/RnExecutorch/utils/llms/Constants.h +0 -6
- package/ios/RnExecutorch/utils/llms/Constants.mm +0 -23
- package/ios/RnExecutorch/utils/llms/ConversationManager.h +0 -26
- package/ios/RnExecutorch/utils/llms/ConversationManager.mm +0 -71
- package/lib/module/constants/llamaDefaults.js.map +0 -1
- package/lib/module/modules/computer_vision/BaseCVModule.js +0 -14
- package/lib/module/modules/computer_vision/BaseCVModule.js.map +0 -1
- package/lib/module/types/object_detection.js.map +0 -1
- package/lib/module/utils/fetchResource.js +0 -93
- package/lib/module/utils/fetchResource.js.map +0 -1
- package/lib/module/utils/listDownloadedResources.js +0 -13
- package/lib/module/utils/listDownloadedResources.js.map +0 -1
- package/lib/typescript/constants/llamaDefaults.d.ts.map +0 -1
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts +0 -9
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts.map +0 -1
- package/lib/typescript/types/object_detection.d.ts.map +0 -1
- package/lib/typescript/utils/fetchResource.d.ts +0 -3
- package/lib/typescript/utils/fetchResource.d.ts.map +0 -1
- package/lib/typescript/utils/listDownloadedResources.d.ts +0 -3
- package/lib/typescript/utils/listDownloadedResources.d.ts.map +0 -1
- package/src/constants/llamaDefaults.ts +0 -9
- package/src/modules/computer_vision/BaseCVModule.ts +0 -22
- package/src/utils/fetchResource.ts +0 -106
- package/src/utils/listDownloadedResources.ts +0 -12
- /package/src/types/{object_detection.ts → objectDetection.ts} +0 -0
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { OCRController } from '../../controllers/OCRController';
|
|
5
5
|
export const useOCR = ({
|
|
6
6
|
detectorSource,
|
|
7
7
|
recognizerSources,
|
|
8
|
-
language = 'en'
|
|
8
|
+
language = 'en',
|
|
9
|
+
preventLoad = false
|
|
9
10
|
}) => {
|
|
10
11
|
const [error, setError] = useState(null);
|
|
11
12
|
const [isReady, setIsReady] = useState(false);
|
|
12
13
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
13
14
|
const [downloadProgress, setDownloadProgress] = useState(0);
|
|
14
|
-
const
|
|
15
|
+
const model = useMemo(() => new OCRController({
|
|
15
16
|
modelDownloadProgressCallback: setDownloadProgress,
|
|
16
17
|
isReadyCallback: setIsReady,
|
|
17
18
|
isGeneratingCallback: setIsGenerating,
|
|
18
19
|
errorCallback: setError
|
|
19
|
-
}));
|
|
20
|
+
}), []);
|
|
20
21
|
useEffect(() => {
|
|
21
22
|
const loadModel = async () => {
|
|
22
23
|
await model.loadModel(detectorSource, recognizerSources, language);
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
if (!preventLoad) {
|
|
26
|
+
loadModel();
|
|
27
|
+
}
|
|
25
28
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26
|
-
}, [detectorSource, language,
|
|
29
|
+
}, [model, detectorSource, language,
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
JSON.stringify(recognizerSources), preventLoad]);
|
|
27
32
|
return {
|
|
28
33
|
error,
|
|
29
34
|
isReady,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","OCRController","useOCR","detectorSource","recognizerSources","language","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","model","
|
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useState","OCRController","useOCR","detectorSource","recognizerSources","language","preventLoad","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","model","modelDownloadProgressCallback","isReadyCallback","isGeneratingCallback","errorCallback","loadModel","JSON","stringify","forward"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useOCR.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAGpD,SAASC,aAAa,QAAQ,iCAAiC;AAU/D,OAAO,MAAMC,MAAM,GAAGA,CAAC;EACrBC,cAAc;EACdC,iBAAiB;EACjBC,QAAQ,GAAG,IAAI;EACfC,WAAW,GAAG;AAUhB,CAAC,KAAgB;EACf,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAAgB,IAAI,CAAC;EACvD,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACW,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACa,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAE3D,MAAMe,KAAK,GAAGhB,OAAO,CACnB,MACE,IAAIE,aAAa,CAAC;IAChBe,6BAA6B,EAAEF,mBAAmB;IAClDG,eAAe,EAAEP,UAAU;IAC3BQ,oBAAoB,EAAEN,eAAe;IACrCO,aAAa,EAAEX;EACjB,CAAC,CAAC,EACJ,EACF,CAAC;EAEDV,SAAS,CAAC,MAAM;IACd,MAAMsB,SAAS,GAAG,MAAAA,CAAA,KAAY;MAC5B,MAAML,KAAK,CAACK,SAAS,CAACjB,cAAc,EAAEC,iBAAiB,EAAEC,QAAQ,CAAC;IACpE,CAAC;IAED,IAAI,CAACC,WAAW,EAAE;MAChBc,SAAS,CAAC,CAAC;IACb;IACA;EACF,CAAC,EAAE,CACDL,KAAK,EACLZ,cAAc,EACdE,QAAQ;EACR;EACAgB,IAAI,CAACC,SAAS,CAAClB,iBAAiB,CAAC,EACjCE,WAAW,CACZ,CAAC;EAEF,OAAO;IACLC,KAAK;IACLE,OAAO;IACPE,YAAY;IACZY,OAAO,EAAER,KAAK,CAACQ,OAAO;IACtBV;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { _ObjectDetectionModule } from '../../native/RnExecutorchModules';
|
|
5
3
|
import { useModule } from '../useModule';
|
|
4
|
+
import { ObjectDetectionModule } from '../../modules/computer_vision/ObjectDetectionModule';
|
|
6
5
|
export const useObjectDetection = ({
|
|
7
|
-
modelSource
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
downloadProgress,
|
|
15
|
-
forwardImage: forward
|
|
16
|
-
} = useModule({
|
|
17
|
-
modelSource,
|
|
18
|
-
module
|
|
19
|
-
});
|
|
20
|
-
return {
|
|
21
|
-
error,
|
|
22
|
-
isReady,
|
|
23
|
-
isGenerating,
|
|
24
|
-
downloadProgress,
|
|
25
|
-
forward
|
|
26
|
-
};
|
|
27
|
-
};
|
|
6
|
+
modelSource,
|
|
7
|
+
preventLoad = false
|
|
8
|
+
}) => useModule({
|
|
9
|
+
module: ObjectDetectionModule,
|
|
10
|
+
loadArgs: [modelSource],
|
|
11
|
+
preventLoad
|
|
12
|
+
});
|
|
28
13
|
//# sourceMappingURL=useObjectDetection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useModule","ObjectDetectionModule","useObjectDetection","modelSource","preventLoad","module","loadArgs"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useObjectDetection.ts"],"mappings":";;AACA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,qBAAqB,QAAQ,qDAAqD;AAO3F,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,WAAW;EACXC,WAAW,GAAG;AACT,CAAC,KACNJ,SAAS,CAAC;EACRK,MAAM,EAAEJ,qBAAqB;EAC7BK,QAAQ,EAAE,CAACH,WAAW,CAAC;EACvBC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { _StyleTransferModule } from '../../native/RnExecutorchModules';
|
|
5
3
|
import { useModule } from '../useModule';
|
|
4
|
+
import { StyleTransferModule } from '../../modules/computer_vision/StyleTransferModule';
|
|
6
5
|
export const useStyleTransfer = ({
|
|
7
|
-
modelSource
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
downloadProgress,
|
|
15
|
-
forwardImage: forward
|
|
16
|
-
} = useModule({
|
|
17
|
-
modelSource,
|
|
18
|
-
module
|
|
19
|
-
});
|
|
20
|
-
return {
|
|
21
|
-
error,
|
|
22
|
-
isReady,
|
|
23
|
-
isGenerating,
|
|
24
|
-
downloadProgress,
|
|
25
|
-
forward
|
|
26
|
-
};
|
|
27
|
-
};
|
|
6
|
+
modelSource,
|
|
7
|
+
preventLoad = false
|
|
8
|
+
}) => useModule({
|
|
9
|
+
module: StyleTransferModule,
|
|
10
|
+
loadArgs: [modelSource],
|
|
11
|
+
preventLoad
|
|
12
|
+
});
|
|
28
13
|
//# sourceMappingURL=useStyleTransfer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useModule","StyleTransferModule","useStyleTransfer","modelSource","preventLoad","module","loadArgs"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useStyleTransfer.ts"],"mappings":";;AACA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,mBAAmB,QAAQ,mDAAmD;AAOvF,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,WAAW;EAAEC,WAAW,GAAG;AAAa,CAAC,KAC1EJ,SAAS,CAAC;EACRK,MAAM,EAAEJ,mBAAmB;EAC3BK,QAAQ,EAAE,CAACH,WAAW,CAAC;EACvBC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { VerticalOCRController } from '../../controllers/VerticalOCRController';
|
|
5
5
|
export const useVerticalOCR = ({
|
|
6
6
|
detectorSources,
|
|
7
7
|
recognizerSources,
|
|
8
8
|
language = 'en',
|
|
9
|
-
independentCharacters = false
|
|
9
|
+
independentCharacters = false,
|
|
10
|
+
preventLoad = false
|
|
10
11
|
}) => {
|
|
11
12
|
const [error, setError] = useState(null);
|
|
12
13
|
const [isReady, setIsReady] = useState(false);
|
|
13
14
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
14
15
|
const [downloadProgress, setDownloadProgress] = useState(0);
|
|
15
|
-
const
|
|
16
|
+
const model = useMemo(() => new VerticalOCRController({
|
|
16
17
|
modelDownloadProgressCallback: setDownloadProgress,
|
|
17
18
|
isReadyCallback: setIsReady,
|
|
18
19
|
isGeneratingCallback: setIsGenerating,
|
|
19
20
|
errorCallback: setError
|
|
20
|
-
}));
|
|
21
|
+
}), []);
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
const loadModel = async () => {
|
|
23
24
|
await model.loadModel(detectorSources, recognizerSources, language, independentCharacters);
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
if (!preventLoad) {
|
|
27
|
+
loadModel();
|
|
28
|
+
}
|
|
26
29
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
|
-
}, [
|
|
30
|
+
}, [model,
|
|
28
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29
32
|
JSON.stringify(detectorSources), language, independentCharacters,
|
|
30
33
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
-
JSON.stringify(recognizerSources)]);
|
|
34
|
+
JSON.stringify(recognizerSources), preventLoad]);
|
|
32
35
|
return {
|
|
33
36
|
error,
|
|
34
37
|
isReady,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","VerticalOCRController","useVerticalOCR","detectorSources","recognizerSources","language","independentCharacters","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","model","
|
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useState","VerticalOCRController","useVerticalOCR","detectorSources","recognizerSources","language","independentCharacters","preventLoad","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","model","modelDownloadProgressCallback","isReadyCallback","isGeneratingCallback","errorCallback","loadModel","JSON","stringify","forward"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useVerticalOCR.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAGpD,SAASC,qBAAqB,QAAQ,yCAAyC;AAU/E,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAC7BC,eAAe;EACfC,iBAAiB;EACjBC,QAAQ,GAAG,IAAI;EACfC,qBAAqB,GAAG,KAAK;EAC7BC,WAAW,GAAG;AAahB,CAAC,KAAgB;EACf,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGT,QAAQ,CAAgB,IAAI,CAAC;EACvD,MAAM,CAACU,OAAO,EAAEC,UAAU,CAAC,GAAGX,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACY,YAAY,EAAEC,eAAe,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACc,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGf,QAAQ,CAAC,CAAC,CAAC;EAE3D,MAAMgB,KAAK,GAAGjB,OAAO,CACnB,MACE,IAAIE,qBAAqB,CAAC;IACxBgB,6BAA6B,EAAEF,mBAAmB;IAClDG,eAAe,EAAEP,UAAU;IAC3BQ,oBAAoB,EAAEN,eAAe;IACrCO,aAAa,EAAEX;EACjB,CAAC,CAAC,EACJ,EACF,CAAC;EAEDX,SAAS,CAAC,MAAM;IACd,MAAMuB,SAAS,GAAG,MAAAA,CAAA,KAAY;MAC5B,MAAML,KAAK,CAACK,SAAS,CACnBlB,eAAe,EACfC,iBAAiB,EACjBC,QAAQ,EACRC,qBACF,CAAC;IACH,CAAC;IAED,IAAI,CAACC,WAAW,EAAE;MAChBc,SAAS,CAAC,CAAC;IACb;IACA;EACF,CAAC,EAAE,CACDL,KAAK;EACL;EACAM,IAAI,CAACC,SAAS,CAACpB,eAAe,CAAC,EAC/BE,QAAQ,EACRC,qBAAqB;EACrB;EACAgB,IAAI,CAACC,SAAS,CAACnB,iBAAiB,CAAC,EACjCG,WAAW,CACZ,CAAC;EAEF,OAAO;IACLC,KAAK;IACLE,OAAO;IACPE,YAAY;IACZY,OAAO,EAAER,KAAK,CAACQ,OAAO;IACtBV;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,41 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { _ETModule } from '../../native/RnExecutorchModules';
|
|
3
|
+
import { ExecutorchModule } from '../../modules/general/ExecutorchModule';
|
|
5
4
|
import { useModule } from '../useModule';
|
|
6
|
-
import { getError } from '../../Error';
|
|
7
5
|
export const useExecutorchModule = ({
|
|
8
|
-
modelSource
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
downloadProgress,
|
|
16
|
-
forwardETInput: forward
|
|
17
|
-
} = useModule({
|
|
18
|
-
modelSource,
|
|
19
|
-
module
|
|
20
|
-
});
|
|
21
|
-
const loadMethod = async methodName => {
|
|
22
|
-
try {
|
|
23
|
-
await module.loadMethod(methodName);
|
|
24
|
-
} catch (e) {
|
|
25
|
-
throw new Error(getError(e));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const loadForward = async () => {
|
|
29
|
-
await loadMethod('forward');
|
|
30
|
-
};
|
|
31
|
-
return {
|
|
32
|
-
error,
|
|
33
|
-
isReady,
|
|
34
|
-
isGenerating,
|
|
35
|
-
downloadProgress,
|
|
36
|
-
forward,
|
|
37
|
-
loadMethod,
|
|
38
|
-
loadForward
|
|
39
|
-
};
|
|
40
|
-
};
|
|
6
|
+
modelSource,
|
|
7
|
+
preventLoad = false
|
|
8
|
+
}) => useModule({
|
|
9
|
+
module: ExecutorchModule,
|
|
10
|
+
loadArgs: [modelSource],
|
|
11
|
+
preventLoad
|
|
12
|
+
});
|
|
41
13
|
//# sourceMappingURL=useExecutorchModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ExecutorchModule","useModule","useExecutorchModule","modelSource","preventLoad","module","loadArgs"],"sourceRoot":"../../../../src","sources":["hooks/general/useExecutorchModule.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,wCAAwC;AAEzE,SAASC,SAAS,QAAQ,cAAc;AAOxC,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,WAAW;EACXC,WAAW,GAAG;AACT,CAAC,KACNH,SAAS,CAAC;EACRI,MAAM,EAAEL,gBAAgB;EACxBM,QAAQ,EAAE,CAACH,WAAW,CAAC;EACvBC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,84 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useEffect,
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
|
+
import { LLMController } from '../../controllers/LLMController';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Hook version of LLMController
|
|
8
|
+
*/
|
|
10
9
|
export const useLLM = ({
|
|
11
10
|
modelSource,
|
|
12
11
|
tokenizerSource,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
contextWindowLength = DEFAULT_CONTEXT_WINDOW_LENGTH
|
|
12
|
+
tokenizerConfigSource,
|
|
13
|
+
preventLoad = false
|
|
16
14
|
}) => {
|
|
17
|
-
const [
|
|
15
|
+
const [response, setResponse] = useState('');
|
|
16
|
+
const [messageHistory, setMessageHistory] = useState([]);
|
|
18
17
|
const [isReady, setIsReady] = useState(false);
|
|
19
18
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
20
|
-
const [response, setResponse] = useState('');
|
|
21
19
|
const [downloadProgress, setDownloadProgress] = useState(0);
|
|
22
|
-
const
|
|
20
|
+
const [error, setError] = useState(null);
|
|
21
|
+
const model = useMemo(() => new LLMController({
|
|
22
|
+
responseCallback: setResponse,
|
|
23
|
+
messageHistoryCallback: setMessageHistory,
|
|
24
|
+
isReadyCallback: setIsReady,
|
|
25
|
+
isGeneratingCallback: setIsGenerating,
|
|
26
|
+
onDownloadProgressCallback: setDownloadProgress
|
|
27
|
+
}), []);
|
|
23
28
|
useEffect(() => {
|
|
24
|
-
|
|
29
|
+
setDownloadProgress(0);
|
|
30
|
+
setError(null);
|
|
31
|
+
if (!preventLoad) {
|
|
25
32
|
try {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (data !== EOT_TOKEN) {
|
|
36
|
-
setResponse(prevResponse => prevResponse + data);
|
|
37
|
-
} else {
|
|
38
|
-
setIsGenerating(false);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
} catch (err) {
|
|
42
|
-
const message = err.message;
|
|
43
|
-
setIsReady(false);
|
|
44
|
-
setError(message);
|
|
45
|
-
} finally {
|
|
46
|
-
setDownloadProgress(0);
|
|
33
|
+
(async () => {
|
|
34
|
+
await model.load({
|
|
35
|
+
modelSource,
|
|
36
|
+
tokenizerSource,
|
|
37
|
+
tokenizerConfigSource
|
|
38
|
+
});
|
|
39
|
+
})();
|
|
40
|
+
} catch (e) {
|
|
41
|
+
setError(e);
|
|
47
42
|
}
|
|
48
|
-
}
|
|
49
|
-
loadModel();
|
|
43
|
+
}
|
|
50
44
|
return () => {
|
|
51
|
-
|
|
52
|
-
tokenGeneratedListener.current = null;
|
|
53
|
-
LLM.deleteModule();
|
|
45
|
+
model.delete();
|
|
54
46
|
};
|
|
55
|
-
}, [modelSource, tokenizerSource,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
throw new Error(err.message);
|
|
70
|
-
}
|
|
71
|
-
}, [isReady, error]);
|
|
47
|
+
}, [modelSource, tokenizerSource, tokenizerConfigSource, preventLoad, model]);
|
|
48
|
+
|
|
49
|
+
// memoization of returned functions
|
|
50
|
+
const configure = useCallback(({
|
|
51
|
+
chatConfig,
|
|
52
|
+
toolsConfig
|
|
53
|
+
}) => model.configure({
|
|
54
|
+
chatConfig,
|
|
55
|
+
toolsConfig
|
|
56
|
+
}), [model]);
|
|
57
|
+
const generate = useCallback((messages, tools) => model.generate(messages, tools), [model]);
|
|
58
|
+
const sendMessage = useCallback(message => model.sendMessage(message), [model]);
|
|
59
|
+
const deleteMessage = useCallback(index => model.deleteMessage(index), [model]);
|
|
60
|
+
const interrupt = useCallback(() => model.interrupt(), [model]);
|
|
72
61
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
messageHistory,
|
|
63
|
+
response,
|
|
75
64
|
isReady,
|
|
76
65
|
isGenerating,
|
|
77
|
-
isModelReady: isReady,
|
|
78
|
-
isModelGenerating: isGenerating,
|
|
79
|
-
response,
|
|
80
66
|
downloadProgress,
|
|
81
|
-
|
|
67
|
+
error,
|
|
68
|
+
configure: configure,
|
|
69
|
+
generate: generate,
|
|
70
|
+
sendMessage: sendMessage,
|
|
71
|
+
deleteMessage: deleteMessage,
|
|
72
|
+
interrupt: interrupt
|
|
82
73
|
};
|
|
83
74
|
};
|
|
84
75
|
//# sourceMappingURL=useLLM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useMemo","useState","LLMController","useLLM","modelSource","tokenizerSource","tokenizerConfigSource","preventLoad","response","setResponse","messageHistory","setMessageHistory","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","error","setError","model","responseCallback","messageHistoryCallback","isReadyCallback","isGeneratingCallback","onDownloadProgressCallback","load","e","delete","configure","chatConfig","toolsConfig","generate","messages","tools","sendMessage","message","deleteMessage","index","interrupt"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useLLM.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AASjE,SAASC,aAAa,QAAQ,iCAAiC;;AAE/D;AACA;AACA;AACA,OAAO,MAAMC,MAAM,GAAGA,CAAC;EACrBC,WAAW;EACXC,eAAe;EACfC,qBAAqB;EACrBC,WAAW,GAAG;AAMhB,CAAC,KAAc;EACb,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGR,QAAQ,CAAC,EAAE,CAAC;EAC5C,MAAM,CAACS,cAAc,EAAEC,iBAAiB,CAAC,GAAGV,QAAQ,CAAY,EAAE,CAAC;EACnE,MAAM,CAACW,OAAO,EAAEC,UAAU,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACa,YAAY,EAAEC,eAAe,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACe,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGhB,QAAQ,CAAC,CAAC,CAAC;EAC3D,MAAM,CAACiB,KAAK,EAAEC,QAAQ,CAAC,GAAGlB,QAAQ,CAAM,IAAI,CAAC;EAE7C,MAAMmB,KAAK,GAAGpB,OAAO,CACnB,MACE,IAAIE,aAAa,CAAC;IAChBmB,gBAAgB,EAAEZ,WAAW;IAC7Ba,sBAAsB,EAAEX,iBAAiB;IACzCY,eAAe,EAAEV,UAAU;IAC3BW,oBAAoB,EAAET,eAAe;IACrCU,0BAA0B,EAAER;EAC9B,CAAC,CAAC,EACJ,EACF,CAAC;EAEDlB,SAAS,CAAC,MAAM;IACdkB,mBAAmB,CAAC,CAAC,CAAC;IACtBE,QAAQ,CAAC,IAAI,CAAC;IAEd,IAAI,CAACZ,WAAW,EAAE;MAChB,IAAI;QACF,CAAC,YAAY;UACX,MAAMa,KAAK,CAACM,IAAI,CAAC;YACftB,WAAW;YACXC,eAAe;YACfC;UACF,CAAC,CAAC;QACJ,CAAC,EAAE,CAAC;MACN,CAAC,CAAC,OAAOqB,CAAC,EAAE;QACVR,QAAQ,CAACQ,CAAC,CAAC;MACb;IACF;IAEA,OAAO,MAAM;MACXP,KAAK,CAACQ,MAAM,CAAC,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,CAACxB,WAAW,EAAEC,eAAe,EAAEC,qBAAqB,EAAEC,WAAW,EAAEa,KAAK,CAAC,CAAC;;EAE7E;EACA,MAAMS,SAAS,GAAG/B,WAAW,CAC3B,CAAC;IACCgC,UAAU;IACVC;EAIF,CAAC,KAAKX,KAAK,CAACS,SAAS,CAAC;IAAEC,UAAU;IAAEC;EAAY,CAAC,CAAC,EAClD,CAACX,KAAK,CACR,CAAC;EAED,MAAMY,QAAQ,GAAGlC,WAAW,CAC1B,CAACmC,QAAmB,EAAEC,KAAiB,KAAKd,KAAK,CAACY,QAAQ,CAACC,QAAQ,EAAEC,KAAK,CAAC,EAC3E,CAACd,KAAK,CACR,CAAC;EAED,MAAMe,WAAW,GAAGrC,WAAW,CAC5BsC,OAAe,IAAKhB,KAAK,CAACe,WAAW,CAACC,OAAO,CAAC,EAC/C,CAAChB,KAAK,CACR,CAAC;EAED,MAAMiB,aAAa,GAAGvC,WAAW,CAC9BwC,KAAa,IAAKlB,KAAK,CAACiB,aAAa,CAACC,KAAK,CAAC,EAC7C,CAAClB,KAAK,CACR,CAAC;EACD,MAAMmB,SAAS,GAAGzC,WAAW,CAAC,MAAMsB,KAAK,CAACmB,SAAS,CAAC,CAAC,EAAE,CAACnB,KAAK,CAAC,CAAC;EAE/D,OAAO;IACLV,cAAc;IACdF,QAAQ;IACRI,OAAO;IACPE,YAAY;IACZE,gBAAgB;IAChBE,KAAK;IACLW,SAAS,EAAEA,SAAS;IACpBG,QAAQ,EAAEA,QAAQ;IAClBG,WAAW,EAAEA,WAAW;IACxBE,aAAa,EAAEA,aAAa;IAC5BE,SAAS,EAAEA;EACb,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { SpeechToTextController } from '../../controllers/SpeechToTextController';
|
|
5
5
|
export const useSpeechToText = ({
|
|
6
6
|
modelName,
|
|
@@ -9,29 +9,32 @@ export const useSpeechToText = ({
|
|
|
9
9
|
tokenizerSource,
|
|
10
10
|
overlapSeconds,
|
|
11
11
|
windowSize,
|
|
12
|
-
streamingConfig
|
|
12
|
+
streamingConfig,
|
|
13
|
+
preventLoad = false
|
|
13
14
|
}) => {
|
|
14
15
|
const [sequence, setSequence] = useState('');
|
|
15
16
|
const [isReady, setIsReady] = useState(false);
|
|
16
17
|
const [downloadProgress, setDownloadProgress] = useState(0);
|
|
17
18
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
18
19
|
const [error, setError] = useState();
|
|
19
|
-
const
|
|
20
|
+
const model = useMemo(() => new SpeechToTextController({
|
|
20
21
|
transcribeCallback: setSequence,
|
|
21
22
|
isReadyCallback: setIsReady,
|
|
22
23
|
isGeneratingCallback: setIsGenerating,
|
|
23
24
|
onErrorCallback: setError,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
25
|
+
modelDownloadProgressCallback: setDownloadProgress
|
|
26
|
+
}), []);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
model.configureStreaming(overlapSeconds, windowSize, streamingConfig);
|
|
29
|
+
}, [model, overlapSeconds, windowSize, streamingConfig]);
|
|
29
30
|
useEffect(() => {
|
|
30
31
|
const loadModel = async () => {
|
|
31
32
|
await model.loadModel(modelName, encoderSource, decoderSource, tokenizerSource);
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
if (!preventLoad) {
|
|
35
|
+
loadModel();
|
|
36
|
+
}
|
|
37
|
+
}, [model, modelName, encoderSource, decoderSource, tokenizerSource, preventLoad]);
|
|
35
38
|
return {
|
|
36
39
|
isReady,
|
|
37
40
|
isGenerating,
|
|
@@ -39,7 +42,8 @@ export const useSpeechToText = ({
|
|
|
39
42
|
configureStreaming: model.configureStreaming,
|
|
40
43
|
sequence,
|
|
41
44
|
error,
|
|
42
|
-
transcribe: waveform => model.transcribe(waveform)
|
|
45
|
+
transcribe: (waveform, audioLanguage) => model.transcribe(waveform, audioLanguage),
|
|
46
|
+
streamingTranscribe: (streamAction, waveform, audioLanguage) => model.streamingTranscribe(streamAction, waveform, audioLanguage)
|
|
43
47
|
};
|
|
44
48
|
};
|
|
45
49
|
//# sourceMappingURL=useSpeechToText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","SpeechToTextController","useSpeechToText","modelName","encoderSource","decoderSource","tokenizerSource","overlapSeconds","windowSize","streamingConfig","sequence","setSequence","isReady","setIsReady","downloadProgress","setDownloadProgress","isGenerating","setIsGenerating","error","setError","model","
|
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useState","SpeechToTextController","useSpeechToText","modelName","encoderSource","decoderSource","tokenizerSource","overlapSeconds","windowSize","streamingConfig","preventLoad","sequence","setSequence","isReady","setIsReady","downloadProgress","setDownloadProgress","isGenerating","setIsGenerating","error","setError","model","transcribeCallback","isReadyCallback","isGeneratingCallback","onErrorCallback","modelDownloadProgressCallback","configureStreaming","loadModel","transcribe","waveform","audioLanguage","streamingTranscribe","streamAction"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useSpeechToText.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,sBAAsB,QAAQ,0CAA0C;AAuBjF,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,SAAS;EACTC,aAAa;EACbC,aAAa;EACbC,eAAe;EACfC,cAAc;EACdC,UAAU;EACVC,eAAe;EACfC,WAAW,GAAG;AAgBhB,CAAC,KAAyB;EACxB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGZ,QAAQ,CAAS,EAAE,CAAC;EACpD,MAAM,CAACa,OAAO,EAAEC,UAAU,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACe,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGhB,QAAQ,CAAC,CAAC,CAAC;EAC3D,MAAM,CAACiB,YAAY,EAAEC,eAAe,CAAC,GAAGlB,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACmB,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,CAAoB,CAAC;EAEvD,MAAMqB,KAAK,GAAGtB,OAAO,CACnB,MACE,IAAIE,sBAAsB,CAAC;IACzBqB,kBAAkB,EAAEV,WAAW;IAC/BW,eAAe,EAAET,UAAU;IAC3BU,oBAAoB,EAAEN,eAAe;IACrCO,eAAe,EAAEL,QAAQ;IACzBM,6BAA6B,EAAEV;EACjC,CAAC,CAAC,EACJ,EACF,CAAC;EAEDlB,SAAS,CAAC,MAAM;IACduB,KAAK,CAACM,kBAAkB,CAACpB,cAAc,EAAEC,UAAU,EAAEC,eAAe,CAAC;EACvE,CAAC,EAAE,CAACY,KAAK,EAAEd,cAAc,EAAEC,UAAU,EAAEC,eAAe,CAAC,CAAC;EAExDX,SAAS,CAAC,MAAM;IACd,MAAM8B,SAAS,GAAG,MAAAA,CAAA,KAAY;MAC5B,MAAMP,KAAK,CAACO,SAAS,CACnBzB,SAAS,EACTC,aAAa,EACbC,aAAa,EACbC,eACF,CAAC;IACH,CAAC;IACD,IAAI,CAACI,WAAW,EAAE;MAChBkB,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EAAE,CACDP,KAAK,EACLlB,SAAS,EACTC,aAAa,EACbC,aAAa,EACbC,eAAe,EACfI,WAAW,CACZ,CAAC;EAEF,OAAO;IACLG,OAAO;IACPI,YAAY;IACZF,gBAAgB;IAChBY,kBAAkB,EAAEN,KAAK,CAACM,kBAAkB;IAC5ChB,QAAQ;IACRQ,KAAK;IACLU,UAAU,EAAEA,CAACC,QAAkB,EAAEC,aAAoC,KACnEV,KAAK,CAACQ,UAAU,CAACC,QAAQ,EAAEC,aAAa,CAAC;IAC3CC,mBAAmB,EAAEA,CACnBC,YAA8B,EAC9BH,QAAmB,EACnBC,aAAoC,KACjCV,KAAK,CAACW,mBAAmB,CAACC,YAAY,EAAEH,QAAQ,EAAEC,aAAa;EACtE,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TextEmbeddingsModule } from '../../modules/natural_language_processing/TextEmbeddingsModule';
|
|
4
|
+
import { useModule } from '../useModule';
|
|
5
|
+
export const useTextEmbeddings = ({
|
|
6
|
+
modelSource,
|
|
7
|
+
tokenizerSource,
|
|
8
|
+
preventLoad = false
|
|
9
|
+
}) => useModule({
|
|
10
|
+
module: TextEmbeddingsModule,
|
|
11
|
+
loadArgs: [modelSource, tokenizerSource],
|
|
12
|
+
preventLoad
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=useTextEmbeddings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TextEmbeddingsModule","useModule","useTextEmbeddings","modelSource","tokenizerSource","preventLoad","module","loadArgs"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useTextEmbeddings.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,gEAAgE;AAErG,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,WAAW;EACXC,eAAe;EACfC,WAAW,GAAG;AAKhB,CAAC,KACCJ,SAAS,CAAC;EACRK,MAAM,EAAEN,oBAAoB;EAC5BO,QAAQ,EAAE,CAACJ,WAAW,EAAEC,eAAe,CAAC;EACxCC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { TokenizerModule } from '../../modules/natural_language_processing/TokenizerModule';
|
|
5
|
+
import { ETError, getError } from '../../Error';
|
|
6
|
+
export const useTokenizer = ({
|
|
7
|
+
tokenizerSource,
|
|
8
|
+
preventLoad = false
|
|
9
|
+
}) => {
|
|
10
|
+
const [error, setError] = useState(null);
|
|
11
|
+
const [isReady, setIsReady] = useState(false);
|
|
12
|
+
const [isGenerating, setIsGenerating] = useState(false);
|
|
13
|
+
const [downloadProgress, setDownloadProgress] = useState(0);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const loadModule = async () => {
|
|
16
|
+
try {
|
|
17
|
+
setIsReady(false);
|
|
18
|
+
TokenizerModule.onDownloadProgress(setDownloadProgress);
|
|
19
|
+
await TokenizerModule.load(tokenizerSource);
|
|
20
|
+
setIsReady(true);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
setError(err.message);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
if (!preventLoad) {
|
|
26
|
+
loadModule();
|
|
27
|
+
}
|
|
28
|
+
}, [tokenizerSource, preventLoad]);
|
|
29
|
+
const stateWrapper = fn => {
|
|
30
|
+
const boundFn = fn.bind(TokenizerModule);
|
|
31
|
+
return async (...args) => {
|
|
32
|
+
if (!isReady) throw new Error(getError(ETError.ModuleNotLoaded));
|
|
33
|
+
if (isGenerating) throw new Error(getError(ETError.ModelGenerating));
|
|
34
|
+
setIsGenerating(true);
|
|
35
|
+
try {
|
|
36
|
+
return await boundFn(...args);
|
|
37
|
+
} finally {
|
|
38
|
+
setIsGenerating(false);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
error,
|
|
44
|
+
isReady,
|
|
45
|
+
isGenerating,
|
|
46
|
+
downloadProgress,
|
|
47
|
+
decode: stateWrapper(TokenizerModule.decode),
|
|
48
|
+
encode: stateWrapper(TokenizerModule.encode),
|
|
49
|
+
getVocabSize: stateWrapper(TokenizerModule.getVocabSize),
|
|
50
|
+
idToToken: stateWrapper(TokenizerModule.idToToken),
|
|
51
|
+
tokenToId: stateWrapper(TokenizerModule.tokenToId)
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=useTokenizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","TokenizerModule","ETError","getError","useTokenizer","tokenizerSource","preventLoad","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","loadModule","onDownloadProgress","load","err","message","stateWrapper","fn","boundFn","bind","args","Error","ModuleNotLoaded","ModelGenerating","decode","encode","getVocabSize","idToToken","tokenToId"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useTokenizer.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,eAAe,QAAQ,2DAA2D;AAE3F,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAE/C,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAC3BC,eAAe;EACfC,WAAW,GAAG;AAIhB,CAAC,KAAK;EACJ,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAAgB,IAAI,CAAC;EACvD,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACW,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACa,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAE3DD,SAAS,CAAC,MAAM;IACd,MAAMgB,UAAU,GAAG,MAAAA,CAAA,KAAY;MAC7B,IAAI;QACFL,UAAU,CAAC,KAAK,CAAC;QACjBT,eAAe,CAACe,kBAAkB,CAACF,mBAAmB,CAAC;QACvD,MAAMb,eAAe,CAACgB,IAAI,CAACZ,eAAe,CAAC;QAC3CK,UAAU,CAAC,IAAI,CAAC;MAClB,CAAC,CAAC,OAAOQ,GAAG,EAAE;QACZV,QAAQ,CAAEU,GAAG,CAAWC,OAAO,CAAC;MAClC;IACF,CAAC;IACD,IAAI,CAACb,WAAW,EAAE;MAChBS,UAAU,CAAC,CAAC;IACd;EACF,CAAC,EAAE,CAACV,eAAe,EAAEC,WAAW,CAAC,CAAC;EAElC,MAAMc,YAAY,GAAgDC,EAAK,IAAK;IAC1E,MAAMC,OAAO,GAAGD,EAAE,CAACE,IAAI,CAACtB,eAAe,CAAC;IAExC,OAAO,OAAO,GAAGuB,IAAmB,KAA6B;MAC/D,IAAI,CAACf,OAAO,EAAE,MAAM,IAAIgB,KAAK,CAACtB,QAAQ,CAACD,OAAO,CAACwB,eAAe,CAAC,CAAC;MAChE,IAAIf,YAAY,EAAE,MAAM,IAAIc,KAAK,CAACtB,QAAQ,CAACD,OAAO,CAACyB,eAAe,CAAC,CAAC;MAEpEf,eAAe,CAAC,IAAI,CAAC;MACrB,IAAI;QACF,OAAO,MAAMU,OAAO,CAAC,GAAGE,IAAI,CAAC;MAC/B,CAAC,SAAS;QACRZ,eAAe,CAAC,KAAK,CAAC;MACxB;IACF,CAAC;EACH,CAAC;EAED,OAAO;IACLL,KAAK;IACLE,OAAO;IACPE,YAAY;IACZE,gBAAgB;IAChBe,MAAM,EAAER,YAAY,CAACnB,eAAe,CAAC2B,MAAM,CAAC;IAC5CC,MAAM,EAAET,YAAY,CAACnB,eAAe,CAAC4B,MAAM,CAAC;IAC5CC,YAAY,EAAEV,YAAY,CAACnB,eAAe,CAAC6B,YAAY,CAAC;IACxDC,SAAS,EAAEX,YAAY,CAACnB,eAAe,CAAC8B,SAAS,CAAC;IAClDC,SAAS,EAAEZ,YAAY,CAACnB,eAAe,CAAC+B,SAAS;EACnD,CAAC;AACH,CAAC","ignoreList":[]}
|