@aippy/runtime 0.2.7-dev.3 → 0.2.7-dev.5

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.
@@ -1,118 +1,83 @@
1
- import { DEFAULT_CONFIG as a, SDK_NAME as s, VERSION as o, getConfigFromEnv as t, getVersionInfo as n, mergeConfig as i } from "../core/index.js";
2
- import { A as p, E as d, c as m } from "../errors-CDEBaBxB.js";
1
+ import { DEFAULT_CONFIG as o, SDK_NAME as r, VERSION as s, getConfigFromEnv as t, getVersionInfo as i, mergeConfig as n } from "../core/index.js";
2
+ import { A, E as f, c as m } from "../errors-CDEBaBxB.js";
3
3
  import { s as C } from "../container-message-DGrno17o.js";
4
- import { A as I, C as c, R as l, a as g, p as U } from "../runtime-CmoG3v2m.js";
5
- import { CameraAPI as S, FileSystemAPI as h, GeolocationAPI as P, SensorsAPI as y, camera as T, fileSystem as x, geolocation as F, isMotionSupported as _, isOrientationSupported as D, requestMotionPermission as R, sensors as M, vibrate as k, watchMotion as O, watchOrientation as v } from "../device/index.js";
6
- import { P as w, p as L, s as q } from "../ui-D6IZ1jrR.js";
7
- import { a as N, P as B, p as H, b as V } from "../pwa-CilSlaik.js";
8
- import { a as Q, b as z } from "../useTweaks-QxMRmg7i.js";
9
- import { c as K, a as W, b as Y, i as X, p as Z, u as $ } from "../useAudioContext-CNQQSTab.js";
10
- import { reportScore as re, sendEvent as ae, updateScore as se } from "../leaderboard/index.js";
11
- import { A as te, D as ne, d as ie, e as fe, c as pe, U as de, f as me, a as ue, a as Ce, b as Ae, j as Ie, i as ce, l as le, m as ge, g as Ue, n as Ee, h as Se, p as he, s as Pe, v as ye } from "../helper-CKiqfKle.js";
12
- import { f as xe, q as Fe, b as _e, h as De, l as Re, o as Me, j as ke, n as Oe, w as ve, g as be, k as we, p as Le, e as qe, i as Ge, c as Ne, d as Be, r as He, u as Ve, m as je, s as Qe, a as ze, t as Je, v as Ke } from "../bridge-N9ELFpfV.js";
13
- import { i as Ye, f as Xe, h as Ze, g as $e, a as er, u as rr, b as ar, d as sr, c as or, e as tr, j as nr } from "../userSessionInfo-DFvsuELU.js";
14
- import { hasNativeBridge as fr } from "../native-bridge-BnvipFJc.js";
4
+ import { A as E, C as d, R as l, a as g, p as u } from "../runtime-CmoG3v2m.js";
5
+ import { CameraAPI as x, FileSystemAPI as T, GeolocationAPI as _, SensorsAPI as D, camera as U, fileSystem as M, geolocation as P, isMotionSupported as R, isOrientationSupported as y, requestMotionPermission as h, sensors as v, vibrate as O, watchMotion as F, watchOrientation as L } from "../device/index.js";
6
+ import { P as N, c as b, i as V, p as H, s as k } from "../ui-y5N62DqC.js";
7
+ import { a as G, P as q, p as z, b as K } from "../pwa-CilSlaik.js";
8
+ import { a as Y, b as j } from "../useTweaks-QxMRmg7i.js";
9
+ import { c as Q, a as X, i as Z, p as $, u as ee } from "../useAudioContext-D9F3x80Y.js";
10
+ import { reportScore as oe, sendEvent as re, updateScore as se } from "../leaderboard/index.js";
11
+ import { A as ie, D as ne, d as pe, e as Ae, c as fe, U as me, a as ce, b as Ce, f as Ie, g as Ee, l as de, n as le, p as ge, s as ue, v as Se } from "../helper-BENVYOU-.js";
12
+ import { c as Te, u as _e } from "../hooks-CE9cjXHP.js";
13
+ import { getAuthTokenAsync as Ue } from "../bridge-Ca3H2iN1.js";
14
+ import { hasNativeBridge as Pe } from "../native-bridge-BnvipFJc.js";
15
15
  export {
16
- te as AIConfigValidationError,
17
- I as AippyRuntime,
18
- p as AippyRuntimeError,
19
- S as CameraAPI,
20
- c as Cancellable,
16
+ ie as AIConfigValidationError,
17
+ E as AippyRuntime,
18
+ A as AippyRuntimeError,
19
+ x as CameraAPI,
20
+ d as Cancellable,
21
21
  ne as DEFAULT_BASE_URL,
22
- ie as DEFAULT_CHAT_MODEL,
23
- fe as DEFAULT_CHAT_SYSTEM,
24
- a as DEFAULT_CONFIG,
25
- pe as DEFAULT_UI_BASE_URL,
26
- d as ERROR_CODES,
27
- h as FileSystemAPI,
28
- P as GeolocationAPI,
29
- N as PWAUtils,
30
- B as PerformanceMonitor,
31
- w as PlatformDetector,
22
+ pe as DEFAULT_CHAT_MODEL,
23
+ Ae as DEFAULT_CHAT_SYSTEM,
24
+ o as DEFAULT_CONFIG,
25
+ fe as DEFAULT_UI_BASE_URL,
26
+ f as ERROR_CODES,
27
+ T as FileSystemAPI,
28
+ _ as GeolocationAPI,
29
+ G as PWAUtils,
30
+ q as PerformanceMonitor,
31
+ N as PlatformDetector,
32
32
  l as ReceiveChannel,
33
- s as SDK_NAME,
34
- y as SensorsAPI,
35
- de as UI_CHAT_ENDPOINT,
36
- o as VERSION,
37
- me as abortedError,
38
- ue as aippy,
39
- Ce as aippyAIProvider,
40
- Ae as aippyChatConfig,
33
+ r as SDK_NAME,
34
+ D as SensorsAPI,
35
+ me as UI_CHAT_ENDPOINT,
36
+ s as VERSION,
37
+ ce as aippyAIProvider,
38
+ Ce as aippyChatConfig,
41
39
  g as aippyRuntime,
42
- Q as aippyTweaks,
43
- z as aippyTweaksRuntime,
44
- xe as autoRequestCredentials,
45
- T as camera,
46
- Fe as clearCachedUserInfo,
47
- Ye as clearProfileCache,
48
- Xe as clearUserInfoCache,
40
+ Y as aippyTweaks,
41
+ j as aippyTweaksRuntime,
42
+ U as camera,
43
+ Te as clearUserInfoCache,
44
+ b as compareVersions,
49
45
  Ie as createAIConfig,
50
46
  m as createError,
51
- K as createHiddenMediaElement,
52
- W as createHiddenVideoElement,
53
- Ze as fetchUserProfile,
54
- x as fileSystem,
55
- F as geolocation,
56
- ce as getAIConfigValue,
57
- _e as getAuthToken,
58
- De as getAuthTokenAsync,
59
- Re as getCachedCredentials,
60
- Me as getCachedUserInfo,
47
+ Q as createHiddenMediaElement,
48
+ M as fileSystem,
49
+ P as geolocation,
50
+ Ee as getAIConfigValue,
51
+ Ue as getAuthTokenAsync,
61
52
  t as getConfigFromEnv,
62
- $e as getCurrentUserId,
63
- ke as getCurrentUserIdAsync,
64
- Oe as getUserInfoAsync,
65
- ve as getUserInfoFromParent,
66
- be as getUserSdkConfig,
67
- n as getVersionInfo,
68
- we as hasCredentials,
69
- fr as hasNativeBridge,
70
- Le as hasUserInfo,
71
- qe as initUserBridge,
72
- Ge as initUserSdk,
73
- Y as isIOSDevice,
74
- Ne as isInIframe,
75
- X as isMediaStreamAudioSupported,
76
- _ as isMotionSupported,
77
- D as isOrientationSupported,
78
- le as loadAIConfig,
79
- i as mergeConfig,
80
- ge as missingTokenError,
81
- Ue as networkError,
82
- Ee as normalizeError,
83
- Se as parseAIConfig,
84
- he as parseError,
85
- Z as patchAudioContext,
86
- H as performanceMonitor,
87
- L as platform,
88
- U as processMotionData,
89
- V as pwa,
90
- re as reportScore,
91
- Be as requestCredentialsFromParent,
92
- He as requestCredentialsFromiOS,
93
- R as requestMotionPermission,
94
- Ve as requestUserInfoFromParent,
95
- je as requestUserInfoFromiOS,
96
- Pe as sendAIConfigToContainer,
97
- ae as sendEvent,
53
+ i as getVersionInfo,
54
+ Pe as hasNativeBridge,
55
+ X as isIOSDevice,
56
+ V as isInIframe,
57
+ Z as isMediaStreamAudioSupported,
58
+ R as isMotionSupported,
59
+ y as isOrientationSupported,
60
+ de as loadAIConfig,
61
+ n as mergeConfig,
62
+ le as normalizeError,
63
+ ge as parseAIConfig,
64
+ $ as patchAudioContext,
65
+ z as performanceMonitor,
66
+ H as platform,
67
+ u as processMotionData,
68
+ K as pwa,
69
+ oe as reportScore,
70
+ h as requestMotionPermission,
71
+ ue as sendAIConfigToContainer,
72
+ re as sendEvent,
98
73
  C as sendMessageToContainer,
99
- M as sensors,
100
- Qe as setAuthToken,
101
- ze as setCurrentUserId,
102
- q as showAlert,
103
- Je as tryGetCredentialsFromParentStorage,
104
- Ke as tryGetUserInfoFromParentStorage,
74
+ v as sensors,
75
+ k as showAlert,
105
76
  se as updateScore,
106
- $ as useAudioContext,
107
- er as useAuthToken,
108
- rr as useCurrentUserId,
109
- ar as useGetCurrentUserProfileQuery,
110
- sr as useGetJoinedUserProfilesQuery,
111
- or as useGetUserProfileByIdQuery,
112
- tr as useUserInfo,
113
- nr as userSessionInfo,
114
- ye as validateAIConfig,
115
- k as vibrate,
116
- O as watchMotion,
117
- v as watchOrientation
77
+ ee as useAudioContext,
78
+ _e as useUserInfo,
79
+ Se as validateAIConfig,
80
+ O as vibrate,
81
+ F as watchMotion,
82
+ L as watchOrientation
118
83
  };
@@ -1,26 +1,49 @@
1
- var a = Object.defineProperty;
2
- var c = (o, e, n) => e in o ? a(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
- var s = (o, e, n) => c(o, typeof e != "symbol" ? e + "" : e, n);
4
- import { UAParser as d } from "ua-parser-js";
5
- class l {
1
+ var d = Object.defineProperty;
2
+ var l = (o, e, n) => e in o ? d(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
+ var c = (o, e, n) => l(o, typeof e != "symbol" ? e + "" : e, n);
4
+ import { UAParser as u } from "ua-parser-js";
5
+ import { hasNativeBridge as p } from "./native-bridge-BnvipFJc.js";
6
+ function m() {
7
+ try {
8
+ return typeof window < "u" && window.parent !== window;
9
+ } catch {
10
+ return !0;
11
+ }
12
+ }
13
+ function f(o, e) {
14
+ const n = o.split(".").map(Number), r = e.split(".").map(Number), t = Math.max(n.length, r.length);
15
+ for (let i = 0; i < t; i++) {
16
+ const s = n[i] || 0, a = r[i] || 0;
17
+ if (s < a) return -1;
18
+ if (s > a) return 1;
19
+ }
20
+ return 0;
21
+ }
22
+ class w {
6
23
  constructor() {
7
- s(this, "parser");
8
- this.parser = new d();
24
+ c(this, "parser");
25
+ this.parser = new u();
9
26
  }
10
27
  /**
11
28
  * Get platform information
12
29
  */
13
30
  getPlatformInfo() {
14
- const e = this.parser.getResult(), n = this.normalizePlatformName(e.os.name), t = this.normalizeBrowserName(e.browser.name), r = this.isMobileDevice(), i = !r;
31
+ const e = this.parser.getResult(), n = this.normalizePlatformName(e.os.name), r = this.normalizeBrowserName(e.browser.name), t = this.isMobileDevice(), i = !t;
15
32
  return {
16
33
  name: n,
17
34
  version: e.os.version,
18
- browser: t,
35
+ browser: r,
19
36
  browserVersion: e.browser.version,
20
- isMobile: r,
37
+ isMobile: t,
21
38
  isDesktop: i
22
39
  };
23
40
  }
41
+ /**
42
+ * Get raw UA parser result
43
+ */
44
+ getRawParserResult() {
45
+ return this.parser.getResult();
46
+ }
24
47
  /**
25
48
  * Get platform capabilities
26
49
  */
@@ -69,15 +92,46 @@ class l {
69
92
  return e.name === "android" && e.browser === "chrome";
70
93
  }
71
94
  /**
72
- * 解析 User-Agent 中的 Aippy App 信息
95
+ * Check if running in Android WebView (old app version)
96
+ * Detects by checking if browser name contains "webview"
97
+ */
98
+ isAndroidWebView() {
99
+ return (this.parser.getResult().browser.name || "").toLowerCase().includes("webview");
100
+ }
101
+ /**
102
+ * Check app environment and validate version
103
+ */
104
+ checkAppEnvironment(e) {
105
+ const n = this.parseAippyInfo();
106
+ if (n) {
107
+ const r = e[n.platform], t = f(n.version, r) >= 0;
108
+ return {
109
+ type: "new_app",
110
+ isValid: t,
111
+ aippyInfo: n,
112
+ message: t ? void 0 : `App version ${n.version} < ${r}`
113
+ };
114
+ }
115
+ return p() ? {
116
+ type: "old_ios_app",
117
+ isValid: !1,
118
+ message: "Native bridge exists but no Aippy info (old iOS version)"
119
+ } : this.isAndroidWebView() ? {
120
+ type: "old_android_app",
121
+ isValid: !1,
122
+ message: "Android WebView detected but no Aippy info (old Android version)"
123
+ } : m() ? { type: "iframe", isValid: !0 } : { type: "web", isValid: !0 };
124
+ }
125
+ /**
126
+ * Parse Aippy App info from User-Agent
73
127
  */
74
128
  parseAippyInfo() {
75
- const e = navigator.userAgent, n = /Aippy\/([^\/]+)\/[^\/]+\/(iOS|Android)/i, t = e.match(n);
76
- if (t) {
77
- const r = t[1];
129
+ const e = navigator.userAgent, n = /Aippy\/([^/]+)\/[^/]+\/(iOS|Android)/i, r = e.match(n);
130
+ if (r) {
131
+ const t = r[1];
78
132
  return {
79
- platform: t[2],
80
- version: r
133
+ platform: r[2],
134
+ version: t
81
135
  };
82
136
  }
83
137
  return null;
@@ -101,19 +155,21 @@ class l {
101
155
  }
102
156
  }
103
157
  }
104
- const f = new l();
105
- function p(o) {
158
+ const x = new w();
159
+ function v(o) {
106
160
  const e = document.createElement("div");
107
161
  e.style.cssText = "position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:999999";
108
162
  const n = document.createElement("div");
109
163
  n.style.cssText = "background:#fff;border-radius:12px;padding:24px 32px;max-width:80%;text-align:center;box-shadow:0 4px 20px rgba(0,0,0,0.15)";
110
- const t = document.createElement("p");
111
- t.style.cssText = "margin:0 0 20px;font-size:16px;color:#333;line-height:1.5", t.textContent = o;
112
- const r = document.createElement("button");
113
- r.style.cssText = "background:#007AFF;color:#fff;border:none;border-radius:8px;padding:10px 32px;font-size:15px;cursor:pointer", r.textContent = "OK", r.onclick = () => e.remove(), n.appendChild(t), n.appendChild(r), e.appendChild(n), document.body.appendChild(e);
164
+ const r = document.createElement("p");
165
+ r.style.cssText = "margin:0 0 20px;font-size:16px;color:#333;line-height:1.5", r.textContent = o;
166
+ const t = document.createElement("button");
167
+ t.style.cssText = "background:#007AFF;color:#fff;border:none;border-radius:8px;padding:10px 32px;font-size:15px;cursor:pointer", t.textContent = "OK", t.onclick = () => e.remove(), n.appendChild(r), n.appendChild(t), e.appendChild(n), document.body.appendChild(e);
114
168
  }
115
169
  export {
116
- l as P,
117
- f as p,
118
- p as s
170
+ w as P,
171
+ f as c,
172
+ m as i,
173
+ x as p,
174
+ v as s
119
175
  };
@@ -1,8 +1,8 @@
1
- var b = Object.defineProperty;
2
- var w = (e, t, n) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var s = (e, t, n) => w(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { useState as k, useRef as T, useEffect as p } from "react";
5
- function E() {
1
+ var D = Object.defineProperty;
2
+ var b = (e, t, n) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var i = (e, t, n) => b(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { useState as k, useRef as w, useEffect as p } from "react";
5
+ function T() {
6
6
  const e = navigator.userAgent;
7
7
  return !!(/iPad|iPhone|iPod/.test(e) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
8
8
  }
@@ -16,33 +16,30 @@ function P() {
16
16
  return !1;
17
17
  }
18
18
  }
19
- function v(e = "video", t = !1) {
19
+ function E(e = "video", t = !1) {
20
20
  const n = document.createElement(e);
21
21
  return n.muted = !1, n.autoplay = !0, e === "video" && (n.playsInline = !0), t ? n.style.cssText = "position:fixed;bottom:10px;right:10px;width:200px;background:#ff0000;z-index:9999;" : n.style.cssText = "position:fixed;width:1px;height:1px;opacity:0;pointer-events:none;", n;
22
22
  }
23
- function C(e = !1) {
24
- return v("video", e);
25
- }
26
23
  class I {
27
- constructor(t, n, i, o = !1) {
28
- s(this, "analyser");
29
- s(this, "dataArray");
30
- s(this, "rafId", null);
31
- s(this, "silenceStartTime", 0);
32
- s(this, "isPaused", !1);
33
- s(this, "lastCheckTime", 0);
34
- s(this, "silenceThreshold");
35
- s(this, "silenceDuration");
36
- s(this, "checkInterval");
37
- s(this, "debug");
24
+ constructor(t, n, s, o = !1) {
25
+ i(this, "analyser");
26
+ i(this, "dataArray");
27
+ i(this, "rafId", null);
28
+ i(this, "silenceStartTime", 0);
29
+ i(this, "isPaused", !1);
30
+ i(this, "lastCheckTime", 0);
31
+ i(this, "silenceThreshold");
32
+ i(this, "silenceDuration");
33
+ i(this, "checkInterval");
34
+ i(this, "debug");
38
35
  /**
39
36
  * Check audio levels and pause/resume as needed
40
37
  */
41
- s(this, "check", () => {
38
+ i(this, "check", () => {
42
39
  const t = performance.now();
43
40
  t - this.lastCheckTime >= this.checkInterval && (this.lastCheckTime = t, this.getAudioLevel() < this.silenceThreshold ? this.silenceStartTime === 0 ? this.silenceStartTime = t : t - this.silenceStartTime >= this.silenceDuration && !this.isPaused && this.pauseMedia() : (this.silenceStartTime = 0, this.isPaused && this.resumeMedia())), this.rafId = requestAnimationFrame(this.check);
44
41
  });
45
- this.audioContext = t, this.mediaElement = n, this.silenceThreshold = i.silenceThreshold, this.silenceDuration = i.silenceDuration, this.checkInterval = i.checkInterval, this.debug = o, this.analyser = t.createAnalyser(), this.analyser.fftSize = 512, this.analyser.smoothingTimeConstant = 0.3, this.dataArray = new Uint8Array(this.analyser.frequencyBinCount);
42
+ this.audioContext = t, this.mediaElement = n, this.silenceThreshold = s.silenceThreshold, this.silenceDuration = s.silenceDuration, this.checkInterval = s.checkInterval, this.debug = o, this.analyser = t.createAnalyser(), this.analyser.fftSize = 512, this.analyser.smoothingTimeConstant = 0.3, this.dataArray = new Uint8Array(this.analyser.frequencyBinCount);
46
43
  }
47
44
  /**
48
45
  * Connect the detector to the audio stream
@@ -75,8 +72,8 @@ class I {
75
72
  this.analyser.getByteTimeDomainData(this.dataArray);
76
73
  let t = 0;
77
74
  for (let n = 0; n < this.dataArray.length; n++) {
78
- const i = (this.dataArray[n] - 128) / 128;
79
- t += i * i;
75
+ const s = (this.dataArray[n] - 128) / 128;
76
+ t += s * s;
80
77
  }
81
78
  return Math.sqrt(t / this.dataArray.length);
82
79
  }
@@ -106,7 +103,7 @@ class I {
106
103
  function S(e, t = {}) {
107
104
  const {
108
105
  forceEnable: n = !1,
109
- autoCleanup: i = !0,
106
+ autoCleanup: s = !0,
110
107
  debug: o = !1,
111
108
  mediaElementType: m = "video",
112
109
  autoPause: d = {}
@@ -116,7 +113,7 @@ function S(e, t = {}) {
116
113
  silenceDuration: d.silenceDuration ?? 50,
117
114
  checkInterval: d.checkInterval ?? 16
118
115
  };
119
- if (!(n || E()))
116
+ if (!(n || T()))
120
117
  return Object.assign(e, {
121
118
  unlock: async () => {
122
119
  e.state === "suspended" && await e.resume();
@@ -138,7 +135,7 @@ function S(e, t = {}) {
138
135
  });
139
136
  const c = e.destination, y = e.createMediaStreamDestination(), f = e.createGain();
140
137
  f.gain.value = 1, f.connect(y);
141
- const l = v(m, o);
138
+ const l = E(m, o);
142
139
  l.srcObject = y.stream, document.body.appendChild(l);
143
140
  let u = null;
144
141
  h.enabled && (u = new I(
@@ -155,7 +152,7 @@ function S(e, t = {}) {
155
152
  enumerable: !0
156
153
  });
157
154
  let g = !1;
158
- const D = async () => {
155
+ const v = async () => {
159
156
  if (!g)
160
157
  try {
161
158
  await l.play(), e.state === "suspended" && await e.resume(), u && u.start(), g = !0;
@@ -169,55 +166,54 @@ function S(e, t = {}) {
169
166
  console.error("[AudioContext] Cleanup error:", a);
170
167
  }
171
168
  };
172
- if (i) {
169
+ if (s) {
173
170
  const a = e.close.bind(e);
174
171
  e.close = async () => (A(), a());
175
172
  }
176
173
  return Object.assign(e, {
177
- unlock: D,
174
+ unlock: v,
178
175
  cleanup: A,
179
176
  isPatched: !0,
180
177
  originalDestination: c
181
178
  });
182
179
  }
183
- function O(e = {}) {
184
- const { autoUnlock: t = !0, ...n } = e, [i, o] = k(null), [m, d] = k(!1), h = T(null);
180
+ function C(e = {}) {
181
+ const { autoUnlock: t = !0, ...n } = e, [s, o] = k(null), [m, d] = k(!1), h = w(null);
185
182
  return p(() => {
186
183
  const r = new AudioContext(), c = S(r, n);
187
184
  return o(c), () => {
188
185
  c.cleanup(), c.close();
189
186
  };
190
187
  }, []), p(() => {
191
- i && (h.current = async () => {
188
+ s && (h.current = async () => {
192
189
  if (!m)
193
190
  try {
194
- await i.unlock(), d(!0);
191
+ await s.unlock(), d(!0);
195
192
  } catch (r) {
196
193
  if (r instanceof DOMException && r.name === "NotAllowedError")
197
194
  return;
198
195
  console.warn("Failed to unlock audio:", r);
199
196
  }
200
197
  });
201
- }, [i, m]), p(() => {
202
- if (!t || !i) return;
198
+ }, [s, m]), p(() => {
199
+ if (!t || !s) return;
203
200
  const r = async (c) => {
204
201
  c.isTrusted && await h.current?.();
205
202
  };
206
203
  return document.addEventListener("click", r, { once: !0, capture: !0 }), document.addEventListener("touchstart", r, { once: !0, capture: !0 }), () => {
207
204
  document.removeEventListener("click", r, { capture: !0 }), document.removeEventListener("touchstart", r, { capture: !0 });
208
205
  };
209
- }, [t, i]), {
210
- audioContext: i,
206
+ }, [t, s]), {
207
+ audioContext: s,
211
208
  isUnlocked: m,
212
209
  unlock: h.current || (async () => {
213
210
  })
214
211
  };
215
212
  }
216
213
  export {
217
- C as a,
218
- E as b,
219
- v as c,
214
+ T as a,
215
+ E as c,
220
216
  P as i,
221
217
  S as p,
222
- O as u
218
+ C as u
223
219
  };