livevoice-sdk-react-native 1.0.3 → 2.0.0

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.
Files changed (185) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/android/{generated/java/io/livevoice/react → app/build/generated/source/codegen/java/com/facebook/fbreact/specs}/NativeLiveVoiceSdkSpec.java +2 -2
  4. package/android/{generated → app/build/generated/source/codegen}/jni/CMakeLists.txt +1 -9
  5. package/android/{generated → app/build/generated/source/codegen}/jni/RNLiveVoiceSpec-generated.cpp +3 -3
  6. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +341 -0
  7. package/android/build.gradle +41 -84
  8. package/android/gradle.properties +10 -6
  9. package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +17 -16
  10. package/android/src/main/java/io/livevoice/react/LiveVoiceSdkReactNativePackage.kt +12 -13
  11. package/android/src/main/java/io/livevoice/react/Mappings.kt +36 -5
  12. package/android/src/main/java/io/livevoice/react/NativeModels.kt +2 -0
  13. package/android/src/main/java/io/livevoice/react/__SDK.kt +1 -1
  14. package/ios/LiveVoiceSdkReactNative.h +5 -5
  15. package/ios/{LivevoiceSdkReactNative.mm → LiveVoiceSdkReactNative.mm} +59 -74
  16. package/ios/__SDK.h +1 -1
  17. package/lib/module/components/ChannelView.js +14 -38
  18. package/lib/module/components/ChannelView.js.map +1 -1
  19. package/lib/module/components/LiveVoiceView.js +46 -23
  20. package/lib/module/components/LiveVoiceView.js.map +1 -1
  21. package/lib/module/components/PlayButtonView.js +243 -84
  22. package/lib/module/components/PlayButtonView.js.map +1 -1
  23. package/lib/module/icons/captions@1x.png +0 -0
  24. package/lib/module/icons/captions@2x.png +0 -0
  25. package/lib/module/icons/pause@1x.png +0 -0
  26. package/lib/module/icons/pause@2x.png +0 -0
  27. package/lib/module/icons/play@1x.png +0 -0
  28. package/lib/module/icons/play@2x.png +0 -0
  29. package/lib/module/index.js +19 -21
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/module/specs/NativeLiveVoiceSdk.js +4 -0
  32. package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -1
  33. package/lib/module/util/Colors.js +2 -1
  34. package/lib/module/util/Colors.js.map +1 -1
  35. package/lib/typescript/package.json +1 -0
  36. package/lib/typescript/src/components/AudioOutputSwitchView.d.ts.map +1 -0
  37. package/lib/typescript/src/components/BrandingView.d.ts.map +1 -0
  38. package/lib/typescript/{commonjs/src → src}/components/ChannelView.d.ts +4 -2
  39. package/lib/typescript/src/components/ChannelView.d.ts.map +1 -0
  40. package/lib/typescript/src/components/ErrorView.d.ts.map +1 -0
  41. package/lib/typescript/src/components/LiveVoiceView.d.ts.map +1 -0
  42. package/lib/typescript/src/components/PlayButtonView.d.ts +341 -0
  43. package/lib/typescript/src/components/PlayButtonView.d.ts.map +1 -0
  44. package/lib/typescript/src/components/ReconnectingView.d.ts.map +1 -0
  45. package/lib/typescript/src/components/WarningView.d.ts.map +1 -0
  46. package/lib/typescript/src/components/index.d.ts.map +1 -0
  47. package/lib/typescript/{commonjs/src → src}/index.d.ts +11 -15
  48. package/lib/typescript/src/index.d.ts.map +1 -0
  49. package/lib/typescript/{commonjs/src → src}/specs/NativeLiveVoiceSdk.d.ts +3 -3
  50. package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -0
  51. package/lib/typescript/{commonjs/src → src}/util/Colors.d.ts +2 -1
  52. package/lib/typescript/src/util/Colors.d.ts.map +1 -0
  53. package/lib/typescript/src/util/ForegroundServiceConfig.d.ts.map +1 -0
  54. package/lib/typescript/src/util/PlayingState.d.ts.map +1 -0
  55. package/lib/typescript/src/util/Translations.d.ts.map +1 -0
  56. package/lib/typescript/{module/src → src}/util/UIState.d.ts +22 -1
  57. package/lib/typescript/src/util/UIState.d.ts.map +1 -0
  58. package/livevoice-sdk-react-native.podspec +6 -27
  59. package/package.json +33 -123
  60. package/src/components/ChannelView.tsx +18 -25
  61. package/src/components/LiveVoiceView.tsx +110 -59
  62. package/src/components/PlayButtonView.tsx +280 -87
  63. package/src/icons/captions@1x.png +0 -0
  64. package/src/icons/captions@2x.png +0 -0
  65. package/src/icons/pause@1x.png +0 -0
  66. package/src/icons/pause@2x.png +0 -0
  67. package/src/icons/play@1x.png +0 -0
  68. package/src/icons/play@2x.png +0 -0
  69. package/src/index.tsx +95 -79
  70. package/src/specs/NativeLiveVoiceSdk.ts +7 -5
  71. package/src/util/Colors.ts +3 -1
  72. package/src/util/UIState.ts +25 -1
  73. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI-generated.cpp +0 -245
  74. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +0 -398
  75. package/android/src/main/AndroidManifest.xml +0 -3
  76. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec-generated.mm +0 -292
  77. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec.h +0 -101
  78. package/ios/generated/RNLiveVoiceSpecJSI-generated.cpp +0 -245
  79. package/ios/generated/RNLiveVoiceSpecJSI.h +0 -398
  80. package/lib/commonjs/components/AudioOutputSwitchView.js +0 -144
  81. package/lib/commonjs/components/AudioOutputSwitchView.js.map +0 -1
  82. package/lib/commonjs/components/BrandingView.js +0 -78
  83. package/lib/commonjs/components/BrandingView.js.map +0 -1
  84. package/lib/commonjs/components/ChannelView.js +0 -117
  85. package/lib/commonjs/components/ChannelView.js.map +0 -1
  86. package/lib/commonjs/components/ErrorView.js +0 -88
  87. package/lib/commonjs/components/ErrorView.js.map +0 -1
  88. package/lib/commonjs/components/LiveVoiceView.js +0 -107
  89. package/lib/commonjs/components/LiveVoiceView.js.map +0 -1
  90. package/lib/commonjs/components/PlayButtonView.js +0 -161
  91. package/lib/commonjs/components/PlayButtonView.js.map +0 -1
  92. package/lib/commonjs/components/ReconnectingView.js +0 -109
  93. package/lib/commonjs/components/ReconnectingView.js.map +0 -1
  94. package/lib/commonjs/components/WarningView.js +0 -58
  95. package/lib/commonjs/components/WarningView.js.map +0 -1
  96. package/lib/commonjs/components/index.js +0 -94
  97. package/lib/commonjs/components/index.js.map +0 -1
  98. package/lib/commonjs/icons/branding.png +0 -0
  99. package/lib/commonjs/icons/cpu.png +0 -0
  100. package/lib/commonjs/icons/headphones.png +0 -0
  101. package/lib/commonjs/icons/mic.png +0 -0
  102. package/lib/commonjs/icons/pause.png +0 -0
  103. package/lib/commonjs/icons/play.png +0 -0
  104. package/lib/commonjs/icons/speaker.png +0 -0
  105. package/lib/commonjs/index.js +0 -327
  106. package/lib/commonjs/index.js.map +0 -1
  107. package/lib/commonjs/specs/NativeLiveVoiceSdk.js +0 -19
  108. package/lib/commonjs/specs/NativeLiveVoiceSdk.js.map +0 -1
  109. package/lib/commonjs/util/Colors.js +0 -30
  110. package/lib/commonjs/util/Colors.js.map +0 -1
  111. package/lib/commonjs/util/ForegroundServiceConfig.js +0 -33
  112. package/lib/commonjs/util/ForegroundServiceConfig.js.map +0 -1
  113. package/lib/commonjs/util/PlayingState.js +0 -24
  114. package/lib/commonjs/util/PlayingState.js.map +0 -1
  115. package/lib/commonjs/util/Translations.js +0 -47
  116. package/lib/commonjs/util/Translations.js.map +0 -1
  117. package/lib/commonjs/util/UIState.js +0 -6
  118. package/lib/commonjs/util/UIState.js.map +0 -1
  119. package/lib/module/icons/pause.png +0 -0
  120. package/lib/module/icons/play.png +0 -0
  121. package/lib/typescript/commonjs/package.json +0 -1
  122. package/lib/typescript/commonjs/src/components/AudioOutputSwitchView.d.ts.map +0 -1
  123. package/lib/typescript/commonjs/src/components/BrandingView.d.ts.map +0 -1
  124. package/lib/typescript/commonjs/src/components/ChannelView.d.ts.map +0 -1
  125. package/lib/typescript/commonjs/src/components/ErrorView.d.ts.map +0 -1
  126. package/lib/typescript/commonjs/src/components/LiveVoiceView.d.ts.map +0 -1
  127. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts +0 -146
  128. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts.map +0 -1
  129. package/lib/typescript/commonjs/src/components/ReconnectingView.d.ts.map +0 -1
  130. package/lib/typescript/commonjs/src/components/WarningView.d.ts.map +0 -1
  131. package/lib/typescript/commonjs/src/components/index.d.ts.map +0 -1
  132. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  133. package/lib/typescript/commonjs/src/specs/NativeLiveVoiceSdk.d.ts.map +0 -1
  134. package/lib/typescript/commonjs/src/util/Colors.d.ts.map +0 -1
  135. package/lib/typescript/commonjs/src/util/ForegroundServiceConfig.d.ts.map +0 -1
  136. package/lib/typescript/commonjs/src/util/PlayingState.d.ts.map +0 -1
  137. package/lib/typescript/commonjs/src/util/Translations.d.ts.map +0 -1
  138. package/lib/typescript/commonjs/src/util/UIState.d.ts +0 -45
  139. package/lib/typescript/commonjs/src/util/UIState.d.ts.map +0 -1
  140. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts +0 -6
  141. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts.map +0 -1
  142. package/lib/typescript/module/src/components/BrandingView.d.ts +0 -6
  143. package/lib/typescript/module/src/components/BrandingView.d.ts.map +0 -1
  144. package/lib/typescript/module/src/components/ChannelView.d.ts +0 -13
  145. package/lib/typescript/module/src/components/ChannelView.d.ts.map +0 -1
  146. package/lib/typescript/module/src/components/ErrorView.d.ts +0 -9
  147. package/lib/typescript/module/src/components/ErrorView.d.ts.map +0 -1
  148. package/lib/typescript/module/src/components/LiveVoiceView.d.ts +0 -6
  149. package/lib/typescript/module/src/components/LiveVoiceView.d.ts.map +0 -1
  150. package/lib/typescript/module/src/components/PlayButtonView.d.ts +0 -146
  151. package/lib/typescript/module/src/components/PlayButtonView.d.ts.map +0 -1
  152. package/lib/typescript/module/src/components/ReconnectingView.d.ts +0 -9
  153. package/lib/typescript/module/src/components/ReconnectingView.d.ts.map +0 -1
  154. package/lib/typescript/module/src/components/WarningView.d.ts +0 -8
  155. package/lib/typescript/module/src/components/WarningView.d.ts.map +0 -1
  156. package/lib/typescript/module/src/components/index.d.ts +0 -9
  157. package/lib/typescript/module/src/components/index.d.ts.map +0 -1
  158. package/lib/typescript/module/src/index.d.ts +0 -149
  159. package/lib/typescript/module/src/index.d.ts.map +0 -1
  160. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts +0 -48
  161. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts.map +0 -1
  162. package/lib/typescript/module/src/util/Colors.d.ts +0 -13
  163. package/lib/typescript/module/src/util/Colors.d.ts.map +0 -1
  164. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts +0 -12
  165. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts.map +0 -1
  166. package/lib/typescript/module/src/util/PlayingState.d.ts +0 -7
  167. package/lib/typescript/module/src/util/PlayingState.d.ts.map +0 -1
  168. package/lib/typescript/module/src/util/Translations.d.ts +0 -22
  169. package/lib/typescript/module/src/util/Translations.d.ts.map +0 -1
  170. package/lib/typescript/module/src/util/UIState.d.ts.map +0 -1
  171. package/react-native.config.js +0 -12
  172. package/src/icons/pause.png +0 -0
  173. package/src/icons/play.png +0 -0
  174. /package/android/{generated → app/build/generated/source/codegen}/jni/RNLiveVoiceSpec.h +0 -0
  175. /package/lib/{typescript/module → module}/package.json +0 -0
  176. /package/lib/typescript/{commonjs/src → src}/components/AudioOutputSwitchView.d.ts +0 -0
  177. /package/lib/typescript/{commonjs/src → src}/components/BrandingView.d.ts +0 -0
  178. /package/lib/typescript/{commonjs/src → src}/components/ErrorView.d.ts +0 -0
  179. /package/lib/typescript/{commonjs/src → src}/components/LiveVoiceView.d.ts +0 -0
  180. /package/lib/typescript/{commonjs/src → src}/components/ReconnectingView.d.ts +0 -0
  181. /package/lib/typescript/{commonjs/src → src}/components/WarningView.d.ts +0 -0
  182. /package/lib/typescript/{commonjs/src → src}/components/index.d.ts +0 -0
  183. /package/lib/typescript/{commonjs/src → src}/util/ForegroundServiceConfig.d.ts +0 -0
  184. /package/lib/typescript/{commonjs/src → src}/util/PlayingState.d.ts +0 -0
  185. /package/lib/typescript/{commonjs/src → src}/util/Translations.d.ts +0 -0
@@ -23,15 +23,16 @@ import com.facebook.react.modules.systeminfo.ReactNativeVersion
23
23
  import io.livevoice.sdk.android.publicApi.core.LiveVoice
24
24
  import io.livevoice.sdk.android.publicApi.core.model.ForegroundServiceConfig
25
25
  import io.livevoice.sdk.android.publicApi.core.model.LiveVoiceOutput
26
- import io.livevoice.sdk.android.publicApi.core.model.LiveVoicePlayingState.CONNECTING
27
- import io.livevoice.sdk.android.publicApi.core.model.LiveVoicePlayingState.PLAYING
26
+ import io.livevoice.sdk.android.publicApi.core.model.channel.LiveVoicePlayingState.Connecting
27
+ import io.livevoice.sdk.android.publicApi.core.model.channel.LiveVoicePlayingState.Playing
28
28
  import io.livevoice.sdk.android.publicApi.core.model.NotificationText
29
29
  import io.livevoice.sdk.android.publicApi.core.model.SdkPlatform
30
- import io.livevoice.sdk.android.publicApi.core.model.SdkSubtitleLanguage
31
- import io.livevoice.sdk.android.publicApi.core.model.SdkSubtitleState
30
+ import io.livevoice.sdk.android.publicApi.core.model.subtitle.SdkSubtitleLanguage
31
+ import io.livevoice.sdk.android.publicApi.core.model.subtitle.SdkSubtitleState
32
32
  import io.livevoice.sdk.android.publicApi.core.model.SdkUiState
33
33
  import io.livevoice.sdk.android.publicApi.core.model.SdkUiState.Ready
34
34
  import io.livevoice.sdk.android.publicApi.core.model.exceptions.SdkUninitializedException
35
+ import kotlinx.serialization.encodeToString
35
36
  import kotlinx.coroutines.flow.collectLatest
36
37
  import kotlinx.coroutines.launch
37
38
  import kotlinx.serialization.ExperimentalSerializationApi
@@ -116,13 +117,16 @@ class LiveVoiceModule(reactContext: ReactApplicationContext) :
116
117
  }
117
118
 
118
119
  private fun launchAvailableSubtitleObservation(activity: AppCompatActivity) {
120
+ activity.lifecycleScope.launch {
121
+ LiveVoice.availableSubtitles.collectLatest { subtitles ->
122
+ val encodedSubtitles = json.encodeToString(subtitles.map { it.mapToNative() })
123
+ emitOnAvailableSubtitleConfigsChanged(encodedSubtitles)
124
+ }
125
+ }
119
126
  activity.lifecycleScope.launch {
120
127
  emitOnSubtitlesChanged("[]")
121
128
  //collectLatest will cancel previous lambda when new subtitleState arrives
122
129
  LiveVoice.subtitleState.collectLatest { state: SdkSubtitleState ->
123
- val encodedSubtitles = json.encodeToString(state.availableSubtitles)
124
- emitOnAvailableSubtitleConfigsChanged(encodedSubtitles)
125
-
126
130
  if (state is SdkSubtitleState.Enabled) {
127
131
  //forward/emit all subtitle fragments that arrive!
128
132
  state.fragments.collect { fragments: List<String> ->
@@ -143,7 +147,7 @@ class LiveVoiceModule(reactContext: ReactApplicationContext) :
143
147
 
144
148
  override fun stopChannel() {
145
149
  val state = getStateOrNull<Ready>("stopChannel") ?: return
146
- val channel = state.channels.firstOrNull { it.playingState in listOf(CONNECTING, PLAYING) }
150
+ val channel = state.channels.firstOrNull { it.playingState in listOf(Connecting, Playing) }
147
151
  ?: run {
148
152
  timber.w("No channel in connecting or playing state to stop!")
149
153
  return
@@ -181,8 +185,8 @@ class LiveVoiceModule(reactContext: ReactApplicationContext) :
181
185
  }
182
186
 
183
187
  override fun getCurrentAvailableSubtitleConfigs(): String {
184
- val value: SdkSubtitleState = LiveVoice.subtitleState.value
185
- return json.encodeToString(value.availableSubtitles)
188
+ val value = LiveVoice.availableSubtitles.value
189
+ return json.encodeToString(value.map { it.mapToNative() })
186
190
  }
187
191
 
188
192
  override fun getCurrentClaims(): String? {
@@ -194,15 +198,12 @@ class LiveVoiceModule(reactContext: ReactApplicationContext) :
194
198
  LiveVoice.changeOutput(value)
195
199
  }
196
200
 
197
- override fun startSubtitles(channelId: Double, languageCode: String?) {
201
+ override fun startSubtitles(channelId: Double) {
198
202
  val state = getStateOrNull<Ready>("startSubtitles") ?: return
199
- val sdkSubtitleLanguage = when (languageCode) {
200
- null -> SdkSubtitleLanguage.Transcript
201
- else -> SdkSubtitleLanguage.Translated(languageCode)
202
- }
203
+ val sdkSubtitleLanguage = SdkSubtitleLanguage.Transcript
203
204
 
204
205
  val nullableChannelId = if (channelId.toLong() == -1L) null else channelId.toLong()
205
- state.onStartSubtitles(nullableChannelId, sdkSubtitleLanguage)
206
+ state.onStartSubtitles(nullableChannelId)
206
207
  }
207
208
 
208
209
  override fun stopSubtitles() {
@@ -18,28 +18,27 @@ import com.facebook.react.bridge.NativeModule
18
18
  import com.facebook.react.bridge.ReactApplicationContext
19
19
  import com.facebook.react.module.model.ReactModuleInfo
20
20
  import com.facebook.react.module.model.ReactModuleInfoProvider
21
+ import java.util.HashMap
21
22
 
22
23
  class LiveVoiceSdkReactNativePackage : BaseReactPackage() {
23
24
  override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
24
25
  return if (name == LiveVoiceModule.NAME) {
25
- LiveVoiceModule(reactContext)
26
+ LiveVoiceModule(reactContext)
26
27
  } else {
27
28
  null
28
29
  }
29
30
  }
30
31
 
31
- override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
32
- return ReactModuleInfoProvider {
33
- val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
34
- moduleInfos[LiveVoiceModule.NAME] = ReactModuleInfo(
35
- LiveVoiceModule.NAME,
36
- LiveVoiceModule.NAME,
37
- false, // canOverrideExistingModule
38
- false, // needsEagerInit
39
- false, // isCxxModule
40
- true // isTurboModule
32
+ override fun getReactModuleInfoProvider() = ReactModuleInfoProvider {
33
+ mapOf(
34
+ LiveVoiceModule.NAME to ReactModuleInfo(
35
+ name = LiveVoiceModule.NAME,
36
+ className = LiveVoiceModule.NAME,
37
+ canOverrideExistingModule = false,
38
+ needsEagerInit = false,
39
+ isCxxModule = false,
40
+ isTurboModule = true
41
41
  )
42
- moduleInfos
43
- }
42
+ )
44
43
  }
45
44
  }
@@ -13,9 +13,38 @@
13
13
 
14
14
  package io.livevoice.react
15
15
 
16
- import io.livevoice.sdk.android.publicApi.core.model.LiveVoicePlayingState
16
+ import io.livevoice.sdk.android.publicApi.core.model.channel.LiveVoicePlayingState
17
17
  import io.livevoice.sdk.android.publicApi.core.model.SdkRetryState
18
18
  import io.livevoice.sdk.android.publicApi.core.model.SdkUiState
19
+ import io.livevoice.sdk.android.publicApi.core.model.subtitle.AvailableSubtitle
20
+ import kotlinx.serialization.Serializable
21
+ import kotlinx.serialization.SerialName
22
+
23
+ @Serializable
24
+ sealed interface NativeAvailableSubtitle {
25
+ @Serializable
26
+ @SerialName("Transcript")
27
+ data class Transcript(
28
+ val channelId: Long,
29
+ val name: String,
30
+ val language: String? = null,
31
+ val parentChannelId: Long? = null
32
+ ) : NativeAvailableSubtitle
33
+
34
+ @Serializable
35
+ @SerialName("Translated")
36
+ data class Translated(
37
+ val channelId: Long,
38
+ val name: String,
39
+ val language: String,
40
+ val parentChannelId: Long
41
+ ) : NativeAvailableSubtitle
42
+ }
43
+
44
+ fun AvailableSubtitle.mapToNative(): NativeAvailableSubtitle = when (this) {
45
+ is AvailableSubtitle.Transcript -> NativeAvailableSubtitle.Transcript(channelId, name)
46
+ is AvailableSubtitle.Translated -> NativeAvailableSubtitle.Translated(channelId, name, language, parentChannelId)
47
+ }
19
48
 
20
49
  fun SdkUiState.mapToTransferable(): NativeUiState = when (this) {
21
50
  SdkUiState.Loading -> NativeLoading
@@ -27,7 +56,9 @@ fun SdkUiState.mapToTransferable(): NativeUiState = when (this) {
27
56
  isOnline = it.isOnline,
28
57
  isAudioMuted = it.isAudioMuted,
29
58
  isAiSpeaker = it.isAiSpeaker,
30
- playingState = it.playingState.mapToNative()
59
+ playingState = it.playingState.mapToNative(),
60
+ hasSubtitles = it.hasSubtitles,
61
+ hasAudio = it.hasAudio,
31
62
  )
32
63
  },
33
64
  )
@@ -48,7 +79,7 @@ fun SdkUiState.mapToTransferable(): NativeUiState = when (this) {
48
79
  }
49
80
 
50
81
  private fun LiveVoicePlayingState.mapToNative() = when (this) {
51
- LiveVoicePlayingState.STOPPED -> NativePlayingState.STOPPED
52
- LiveVoicePlayingState.PLAYING -> NativePlayingState.PLAYING
53
- LiveVoicePlayingState.CONNECTING, LiveVoicePlayingState.STOPPING -> NativePlayingState.TRANSITIONING
82
+ LiveVoicePlayingState.Stopped -> NativePlayingState.STOPPED
83
+ LiveVoicePlayingState.Playing -> NativePlayingState.PLAYING
84
+ LiveVoicePlayingState.Connecting, LiveVoicePlayingState.Stopping -> NativePlayingState.TRANSITIONING
54
85
  }
@@ -26,6 +26,8 @@ data class NativeChannel(
26
26
  val isAiSpeaker: Boolean,
27
27
  /** State of the channel reflecting the local playback */
28
28
  val playingState: NativePlayingState,
29
+ val hasSubtitles: Boolean,
30
+ val hasAudio: Boolean,
29
31
  )
30
32
 
31
33
  @Serializable
@@ -2,5 +2,5 @@
2
2
  package io.livevoice.react
3
3
 
4
4
  object Version {
5
- const val SDK_VERSION = "1.0.3"
5
+ const val SDK_VERSION = "2.0.0"
6
6
  }
@@ -11,11 +11,11 @@
11
11
  //
12
12
  //===----------------------------------------------------------------------===//
13
13
 
14
- #import "generated/RNLiveVoiceSpec/RNLiveVoiceSpec.h"
15
- //
16
- //// See https://reactnative.dev/docs/next/legacy/native-modules-ios
17
- //#import <React/RCTEventEmitter.h>
14
+ #ifdef __cplusplus
15
+ #import "RNLiveVoiceSpec.h"
18
16
 
19
- @interface LiveVoiceSdkReactNative : NativeLiveVoiceSdkSpecBase <NativeLiveVoiceSdkSpec>
17
+ @interface LiveVoiceSdkReactNative
18
+ : NativeLiveVoiceSdkSpecBase <NativeLiveVoiceSdkSpec>
20
19
 
21
20
  @end
21
+ #endif
@@ -13,32 +13,34 @@
13
13
 
14
14
  #import "LiveVoiceSdkReactNative.h"
15
15
  #import "LiveVoiceSDK/LiveVoiceSDK.h"
16
- #import "__SDK.h"
17
16
  #import "React/RCTVersion.h"
17
+ #import "__SDK.h"
18
18
 
19
19
  // Declare conformance privately
20
20
  @interface LiveVoiceSdkReactNative () <LiveVoiceDelegate>
21
21
  @end
22
22
 
23
23
  @implementation LiveVoiceSdkReactNative
24
+
24
25
  RCT_EXPORT_MODULE(LiveVoiceModule)
25
26
 
26
27
  - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
27
- (const facebook::react::ObjCTurboModule::InitParams &)params
28
- {
28
+ (const facebook::react::ObjCTurboModule::InitParams &)params {
29
29
  return std::make_shared<facebook::react::NativeLiveVoiceSdkSpecJSI>(params);
30
30
  }
31
31
 
32
- - (void)initialize:(NSString * _Nullable)androidServiceConfig
33
- {
32
+
33
+
34
+ - (void)initialize:(NSString *_Nullable)androidServiceConfig {
34
35
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
35
-
36
- NSDictionary* versionInfo = RCTGetReactNativeVersion();
37
- NSString* major = versionInfo[RCTVersionMajor];
38
- NSString* minor = versionInfo[RCTVersionMinor];
39
- NSString* patch = versionInfo[RCTVersionPatch];
40
- NSString* const PLATFORM_VERSION = [NSString stringWithFormat:@"%@.%@.%@", major, minor, patch];
41
-
36
+
37
+ NSDictionary *versionInfo = RCTGetReactNativeVersion();
38
+ NSString *major = versionInfo[RCTVersionMajor];
39
+ NSString *minor = versionInfo[RCTVersionMinor];
40
+ NSString *patch = versionInfo[RCTVersionPatch];
41
+ NSString *const PLATFORM_VERSION =
42
+ [NSString stringWithFormat:@"%@.%@.%@", major, minor, patch];
43
+
42
44
  [LiveVoice initializeWithDelegate:self
43
45
  platform:SDKPlatformReactNative
44
46
  platformVersion:PLATFORM_VERSION
@@ -47,54 +49,46 @@ RCT_EXPORT_MODULE(LiveVoiceModule)
47
49
 
48
50
  - (void)joinEvent:(nonnull NSString *)joinCode
49
51
  password:(nullable NSString *)password
50
- apiKey:(nonnull NSString *)apiKey
51
- {
52
+ apiKey:(nonnull NSString *)apiKey {
52
53
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
53
54
  [LiveVoice joinEventWithCode:joinCode password:password apiKey:apiKey];
54
55
  }
55
56
 
56
- - (void)leaveEvent
57
- {
57
+ - (void)leaveEvent {
58
58
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
59
59
  [LiveVoice leaveEvent];
60
60
  }
61
61
 
62
- - (void)reconnect
63
- {
62
+ - (void)reconnect {
64
63
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
65
64
  [LiveVoice reconnect];
66
65
  }
67
66
 
68
67
  #pragma mark - Initial values
69
68
 
70
- - (nullable NSString *)getCurrentClaims
71
- {
69
+ - (nullable NSString *)getCurrentClaims {
72
70
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
73
71
  return [LiveVoice currentClaims];
74
72
  }
75
73
 
76
- - (nonnull NSString *)getCurrentUiState
77
- {
74
+ - (nonnull NSString *)getCurrentUiState {
78
75
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
79
76
  return [LiveVoice currentViewState];
80
77
  }
81
78
 
82
- //true=speaker, false=headphones
83
- - (nonnull NSNumber *)getCurrentAudioState
84
- {
79
+ // true=speaker, false=headphones
80
+ - (nonnull NSNumber *)getCurrentAudioState {
85
81
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
86
82
  return [NSNumber numberWithBool:[LiveVoice currentAudioOutputIsSpeaker]];
87
83
  }
88
84
 
89
- - (nonnull NSString *)getCurrentAvailableSubtitleConfigs
90
- {
85
+ - (nonnull NSString *)getCurrentAvailableSubtitleConfigs {
91
86
  NSString *current = [LiveVoice currentAvailableSubtitles];
92
87
  NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, current);
93
88
  return current;
94
89
  }
95
90
 
96
- - (nonnull NSString *)getCurrentSubtitles
97
- {
91
+ - (nonnull NSString *)getCurrentSubtitles {
98
92
  NSString *current = [LiveVoice currentSubtitles];
99
93
  NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, current);
100
94
  return current;
@@ -102,35 +96,32 @@ RCT_EXPORT_MODULE(LiveVoiceModule)
102
96
 
103
97
  #pragma mark - Actions
104
98
 
105
- - (void)setLiveVoiceUseSpeaker:(BOOL)useSpeaker
106
- {
107
- NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, useSpeaker ? @"speaker" : @"receiver");
99
+ - (void)setLiveVoiceUseSpeaker:(BOOL)useSpeaker {
100
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__,
101
+ useSpeaker ? @"speaker" : @"receiver");
108
102
  [LiveVoice setAudioOutputToSpeaker:useSpeaker];
109
103
  }
110
104
 
111
- - (void)startChannel:(double)channelID
112
- {
105
+ - (void)startChannel:(double)channelID {
113
106
  NSLog(@"[SDK] %s %d", __PRETTY_FUNCTION__, (int)channelID);
114
107
  [LiveVoice startWithChannelID:channelID];
115
108
  }
116
109
 
117
- - (void)stopChannel
118
- {
110
+ - (void)stopChannel {
119
111
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
120
112
  [LiveVoice stop];
121
113
  }
122
114
 
123
115
  #pragma mark - Subtitles
124
116
 
125
- - (void)startSubtitles:(double)channelId languageCode:(nullable NSString *)languageCode
126
- {
127
- NSLog(@"[SDK] %s channel: %f, language: %@", __PRETTY_FUNCTION__, channelId, languageCode);
128
- NSNumber * _Nullable optionalChannelID = (channelId == -1) ? nil : [NSNumber numberWithLongLong:channelId];
129
- [LiveVoice startSubtitlesWithChannelID:optionalChannelID languageCode:languageCode];
117
+ - (void)startSubtitles:(double)channelId {
118
+ NSLog(@"[SDK] %s channel: %f", __PRETTY_FUNCTION__, channelId);
119
+ NSNumber *_Nullable optionalChannelID =
120
+ (channelId == -1) ? nil : [NSNumber numberWithLongLong:channelId];
121
+ [LiveVoice startSubtitlesWithChannelID:optionalChannelID];
130
122
  }
131
123
 
132
- - (void)stopSubtitles
133
- {
124
+ - (void)stopSubtitles {
134
125
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
135
126
  [LiveVoice stopSubtitles];
136
127
  }
@@ -141,11 +132,11 @@ RCT_EXPORT_MODULE(LiveVoiceModule)
141
132
 
142
133
  #pragma mark - Translations
143
134
 
144
- - (nonnull NSString *)channelStatusOffline {
135
+ - (nonnull NSString *)channelStatusOffline {
145
136
  return [Translations channel_status_offline];
146
137
  }
147
138
 
148
- - (nonnull NSString *)errorScreenRetrying {
139
+ - (nonnull NSString *)errorScreenRetrying {
149
140
  return [Translations error_screen_retrying];
150
141
  }
151
142
 
@@ -153,96 +144,90 @@ RCT_EXPORT_MODULE(LiveVoiceModule)
153
144
  return [Translations error_screen_retrying_in:(int)seconds];
154
145
  }
155
146
 
156
- - (nonnull NSString *)sdkErrorGeneric {
147
+ - (nonnull NSString *)sdkErrorGeneric {
157
148
  return [Translations sdk_error_generic];
158
149
  }
159
150
 
160
- - (nonnull NSString *)sdkErrorInactive {
151
+ - (nonnull NSString *)sdkErrorInactive {
161
152
  return [Translations sdk_error_inactive];
162
153
  }
163
154
 
164
- - (nonnull NSString *)sdkErrorInvalidApiKey {
155
+ - (nonnull NSString *)sdkErrorInvalidApiKey {
165
156
  return [Translations sdk_error_invalid_api_key];
166
157
  }
167
158
 
168
- - (nonnull NSString *)sdkErrorListenerLimitReached {
159
+ - (nonnull NSString *)sdkErrorListenerLimitReached {
169
160
  return [Translations sdk_error_listener_limit_reached];
170
161
  }
171
162
 
172
- - (nonnull NSString *)sdkErrorNoNetwork {
163
+ - (nonnull NSString *)sdkErrorNoNetwork {
173
164
  return [Translations sdk_error_no_network];
174
165
  }
175
166
 
176
- - (nonnull NSString *)sdkErrorNotFound {
167
+ - (nonnull NSString *)sdkErrorNotFound {
177
168
  return [Translations sdk_error_not_found];
178
169
  }
179
170
 
180
171
  - (nonnull NSString *)sdkErrorRequestFailed:(double)errorCode {
181
- return [Translations sdk_error_request_failed:[NSString stringWithFormat:@"%1.0f", errorCode]];
172
+ return [Translations
173
+ sdk_error_request_failed:[NSString stringWithFormat:@"%1.0f", errorCode]];
182
174
  }
183
175
 
184
- - (nonnull NSString *)sdkErrorWrongPassword {
176
+ - (nonnull NSString *)sdkErrorWrongPassword {
185
177
  return [Translations sdk_error_wrong_password];
186
178
  }
187
179
 
188
- - (nonnull NSString *)sdkNoMatchingChannels {
180
+ - (nonnull NSString *)sdkNoMatchingChannels {
189
181
  return [Translations sdk_no_matching_channels];
190
182
  }
191
183
 
192
- - (nonnull NSString *)streamingByTitle {
184
+ - (nonnull NSString *)streamingByTitle {
193
185
  return [Translations streaming_by_title];
194
186
  }
195
187
 
196
- - (nonnull NSString *)accessibilityChannelPlay {
188
+ - (nonnull NSString *)accessibilityChannelPlay {
197
189
  return [Translations a11y_channel_play];
198
190
  }
199
191
 
200
-
201
- - (nonnull NSString *)accessibilityChannelStatusMuted {
192
+ - (nonnull NSString *)accessibilityChannelStatusMuted {
202
193
  return [Translations a11y_channel_status_muted];
203
194
  }
204
195
 
205
-
206
- - (nonnull NSString *)accessibilityChannelStop {
196
+ - (nonnull NSString *)accessibilityChannelStop {
207
197
  return [Translations a11y_channel_stop];
208
198
  }
209
199
 
210
-
211
- - (nonnull NSString *)isAiChannelStatusMessage {
200
+ - (nonnull NSString *)isAiChannelStatusMessage {
212
201
  return [Translations channel_status_is_ai];
213
202
  }
214
203
 
215
-
216
- - (nonnull NSString *)noChannels {
204
+ - (nonnull NSString *)noChannels {
217
205
  return [Translations sdk_no_matching_channels];
218
206
  }
219
207
 
220
- - (nonnull NSString *)errorRetryNowButton {
208
+ - (nonnull NSString *)errorRetryNowButton {
221
209
  return [Translations action_retry_now];
222
210
  }
223
211
 
224
212
  #pragma mark - LiveVoiceDelegate
225
213
 
226
- - (void)viewStateDidChange:(nonnull NSString *)serializedState
227
- {
214
+ - (void)viewStateDidChange:(nonnull NSString *)serializedState {
228
215
  NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
229
216
  [self emitOnUiStateChanged:serializedState];
230
217
  }
231
218
 
232
- - (void)audioOutputDidChange:(BOOL)useSpeaker
233
- {
234
- NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, useSpeaker ? @"speaker" : @"receiver");
219
+ - (void)audioOutputDidChange:(BOOL)useSpeaker {
220
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__,
221
+ useSpeaker ? @"speaker" : @"receiver");
235
222
  [self emitOnAudioOutputChanged:useSpeaker];
236
223
  }
237
224
 
238
- - (void)availableSubtitlesDidChange:(NSString *)available
239
- {
225
+ - (void)availableSubtitlesDidChange:(NSString *)available {
240
226
  NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, available);
241
227
  [self emitOnAvailableSubtitleConfigsChanged:available];
242
228
  }
243
229
 
244
- - (void)subtitlesDidChange:(NSString *)subtitles
245
- {
230
+ - (void)subtitlesDidChange:(NSString *)subtitles {
246
231
  NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, subtitles);
247
232
  [self emitOnSubtitlesChanged:subtitles];
248
233
  }
package/ios/__SDK.h CHANGED
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED FILE
2
2
  #import <Foundation/Foundation.h>
3
3
 
4
- NSString* const SDK_VERSION = @"1.0.3";
4
+ NSString* const SDK_VERSION = @"2.0.0";
@@ -14,7 +14,6 @@
14
14
  import React, { useState } from 'react';
15
15
  import { View, Text, StyleSheet, TouchableOpacity, useColorScheme, Image } from 'react-native';
16
16
  import { COLORS } from "../util/Colors.js";
17
- import { Translations } from "../util/Translations.js";
18
17
  import PlayButtonView from "./PlayButtonView.js";
19
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  export const ChannelView = ({
@@ -22,29 +21,30 @@ export const ChannelView = ({
22
21
  playingState,
23
22
  muted,
24
23
  isOnline,
25
- aiSpeaker,
24
+ hasAudio,
25
+ hasSubtitles,
26
26
  isDarkMode = useColorScheme() === 'dark',
27
- onPress
27
+ onAudioPress,
28
+ onSubtitlesPress
28
29
  }) => {
29
30
  const [collapsed, setCollapsed] = useState(true);
30
- const backgroundColor = isDarkMode ? COLORS.cardBgDark : COLORS.cardBg;
31
- const secondaryColor = isDarkMode ? COLORS['gray-300'] : COLORS.gray;
32
31
  const iconColor = isDarkMode ? COLORS.white : COLORS.black;
33
32
  return /*#__PURE__*/_jsxs(View, {
34
- style: [styles.container, {
35
- backgroundColor
36
- }],
33
+ style: styles.container,
37
34
  children: [/*#__PURE__*/_jsx(PlayButtonView, {
38
35
  playingState: playingState,
39
- onPress: onPress,
36
+ onAudioPress: onAudioPress,
37
+ onSubtitlesPress: onSubtitlesPress,
40
38
  isDarkMode: isDarkMode,
41
- isChannelOnline: isOnline
42
- }), /*#__PURE__*/_jsxs(View, {
39
+ isChannelOnline: isOnline,
40
+ hasAudio: hasAudio,
41
+ hasSubtitles: hasSubtitles
42
+ }), /*#__PURE__*/_jsx(View, {
43
43
  style: {
44
44
  flex: 1,
45
45
  marginLeft: 10
46
46
  },
47
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
47
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
48
48
  onPress: () => setCollapsed(!collapsed),
49
49
  activeOpacity: 1,
50
50
  children: /*#__PURE__*/_jsx(Text, {
@@ -55,28 +55,7 @@ export const ChannelView = ({
55
55
  }],
56
56
  children: channelName
57
57
  })
58
- }), /* Ai-Speaker status message */
59
- aiSpeaker && /*#__PURE__*/_jsxs(View, {
60
- style: {
61
- flex: 1,
62
- flexDirection: 'row',
63
- alignItems: 'center'
64
- },
65
- children: [/*#__PURE__*/_jsx(Image, {
66
- source: require('../icons/cpu.png'),
67
- style: {
68
- width: 16,
69
- height: 16,
70
- tintColor: secondaryColor,
71
- resizeMode: 'contain'
72
- }
73
- }), /*#__PURE__*/_jsx(Text, {
74
- style: [styles.aiText, {
75
- color: secondaryColor
76
- }],
77
- children: Translations.isAiChannelStatusMessage()
78
- })]
79
- })]
58
+ })
80
59
  }), muted && /*#__PURE__*/_jsx(Image, {
81
60
  source: require('../icons/mic.png'),
82
61
  style: {
@@ -92,10 +71,7 @@ const styles = StyleSheet.create({
92
71
  container: {
93
72
  flexDirection: 'row',
94
73
  alignItems: 'center',
95
- padding: 10,
96
- backgroundColor: '#fff',
97
- borderRadius: 8,
98
- marginBottom: 10
74
+ padding: 10
99
75
  },
100
76
  text: {
101
77
  fontSize: 16,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","View","Text","StyleSheet","TouchableOpacity","useColorScheme","Image","COLORS","Translations","PlayButtonView","jsx","_jsx","jsxs","_jsxs","ChannelView","channelName","playingState","muted","isOnline","aiSpeaker","isDarkMode","onPress","collapsed","setCollapsed","backgroundColor","cardBgDark","cardBg","secondaryColor","gray","iconColor","white","black","style","styles","container","children","isChannelOnline","flex","marginLeft","activeOpacity","numberOfLines","undefined","ellipsizeMode","text","color","flexDirection","alignItems","source","require","width","height","tintColor","resizeMode","aiText","isAiChannelStatusMessage","create","padding","borderRadius","marginBottom","fontSize","fontWeight"],"sourceRoot":"../../../src","sources":["components/ChannelView.tsx"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["React","useState","View","Text","StyleSheet","TouchableOpacity","useColorScheme","Image","COLORS","PlayButtonView","jsx","_jsx","jsxs","_jsxs","ChannelView","channelName","playingState","muted","isOnline","hasAudio","hasSubtitles","isDarkMode","onAudioPress","onSubtitlesPress","collapsed","setCollapsed","iconColor","white","black","style","styles","container","children","isChannelOnline","flex","marginLeft","onPress","activeOpacity","numberOfLines","undefined","ellipsizeMode","text","color","source","require","tintColor","width","height","resizeMode","create","flexDirection","alignItems","padding","fontSize","fontWeight","aiText"],"sourceRoot":"../../../src","sources":["components/ChannelView.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,cAAc,EAAEC,KAAK,QAAQ,cAAc;AAC9F,SAASC,MAAM,QAAQ,mBAAgB;AAEvC,OAAOC,cAAc,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAe9C,OAAO,MAAMC,WAAmC,GAAGA,CAAC;EAClDC,WAAW;EACXC,YAAY;EACZC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EACZC,UAAU,GAAGf,cAAc,CAAC,CAAC,KAAK,MAAM;EACxCgB,YAAY;EACZC;AACF,CAAC,KAAK;EAEJ,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGxB,QAAQ,CAAC,IAAI,CAAC;EAEhD,MAAMyB,SAAS,GAAGL,UAAU,GAAGb,MAAM,CAACmB,KAAK,GAAGnB,MAAM,CAACoB,KAAK;EAE1D,oBACEf,KAAA,CAACX,IAAI;IAAC2B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BrB,IAAA,CAACF,cAAc;MACbO,YAAY,EAAEA,YAAa;MAC3BM,YAAY,EAAEA,YAAa;MAC3BC,gBAAgB,EAAEA,gBAAiB;MACnCF,UAAU,EAAEA,UAAW;MACvBY,eAAe,EAAEf,QAAS;MAC1BC,QAAQ,EAAEA,QAAS;MACnBC,YAAY,EAAEA;IAAa,CAC5B,CAAC,eAGFT,IAAA,CAACT,IAAI;MAAC2B,KAAK,EAAE;QAAEK,IAAI,EAAE,CAAC;QAAEC,UAAU,EAAE;MAAG,CAAE;MAAAH,QAAA,eACvCrB,IAAA,CAACN,gBAAgB;QAAC+B,OAAO,EAAEA,CAAA,KAAMX,YAAY,CAAC,CAACD,SAAS,CAAE;QAACa,aAAa,EAAE,CAAE;QAAAL,QAAA,eAC1ErB,IAAA,CAACR,IAAI;UAACmC,aAAa,EAAEd,SAAS,GAAG,CAAC,GAAGe,SAAU;UAACC,aAAa,EAAC,MAAM;UAACX,KAAK,EAAE,CAACC,MAAM,CAACW,IAAI,EAAE;YAAEC,KAAK,EAAErB,UAAU,GAAGb,MAAM,CAACmB,KAAK,GAAGnB,MAAM,CAACoB;UAAM,CAAC,CAAE;UAAAI,QAAA,EAC5IjB;QAAW,CACR;MAAC,CACS;IAAC,CACf,CAAC,EAELE,KAAK,iBACLN,IAAA,CAACJ,KAAK;MACJoC,MAAM,EAAEC,OAAO,CAAC,kBAAkB,CAAE;MACpCf,KAAK,EAAE;QAAEgB,SAAS,EAAEnB,SAAS;QAAEoB,KAAK,EAAE,EAAE;QAAEC,MAAM,EAAE,EAAE;QAAEC,UAAU,EAAE;MAAU;IAAE,CAAE,CAAC;EAAA,CAEjF,CAAC;AAEX,CAAC;AAED,MAAMlB,MAAM,GAAG1B,UAAU,CAAC6C,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE;EACX,CAAC;EACDX,IAAI,EAAE;IACJY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDC,MAAM,EAAE;IACNF,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBnB,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}