openrtc 2.0.0-rc.2 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DelegatingRuntimeAdapter-BLNigcS4.d.ts +134 -0
- package/dist/{OpenRTCShared-ZQPu5LqL.d.ts → OpenRTCShared-BswnbjpG.d.ts} +3 -4
- package/dist/chunk-6OLYXEOG.js +1 -0
- package/dist/chunk-GHGHBGHY.js +1 -0
- package/dist/chunk-HXMHYSZF.js +1 -0
- package/dist/{chunk-IEQTFQ3Q.js → chunk-PRBVSCKN.js} +1 -1
- package/dist/{chunk-3USHQ7QW.js → chunk-XPEDISSU.js} +3 -3
- package/dist/factories-PLRICK7J.js +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/ipcFactory-MYHIVIM2.js +1 -0
- package/dist/native.d.ts +5 -5
- package/dist/native.js +1 -1
- package/dist/openrtc-UU4BBJLG.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -3
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +2 -2
- package/dist/runtime/index.d.ts +10 -25
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/legacy.d.ts +3 -3
- package/dist/runtime/legacy.js +1 -1
- package/dist/runtime/tauri.d.ts +4 -4
- package/dist/{tauri-Cz9n17g8.d.ts → tauri-BgLgJoQA.d.ts} +2 -2
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-BVJr065k.d.ts → types-BHePJWbM.d.ts} +1 -1
- package/dist/{types-DkgaCyqS.d.ts → types-D0pqNSOf.d.ts} +1 -1
- package/dist/{types-DNl4KHHY.d.ts → types-DzJ8-t1p.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/DelegatingRuntimeAdapter-DqfHkjLy.d.ts +0 -373
- package/dist/chunk-6TAVJ46R.js +0 -1
- package/dist/chunk-GW7P3D54.js +0 -1
- package/dist/chunk-YQWQDTQ3.js +0 -2
- package/dist/factories-SIVMTIHJ.js +0 -1
- package/dist/ipcFactory-QY44OIKA.js +0 -1
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import { D as Device, n as DiscoveryMode, o as AuthMode, p as SignalingMode, i as ClientOptions, E as ExplicitFileDataSendParams, q as ISignalingBackend, j as RoomMember, R as RuntimeIdentity, r as SignalingEnvelope, h as DeviceStatusSnapshot, m as PeerSessionSnapshot, s as BackendPeerBiStream, t as BackendPeerUniStream, u as ManagedConnectionRecord, v as ResolvedPeerIdentity, w as DeviceEvent, x as DesiredPeerProjection, y as CoreClientBridgeHost, N as NativeConnectParams, z as NativeConnectResult, S as SignalingSession, F as SessionEvent, B as BackendConnectionState, L as LocalDeviceInfo, G as NativeManagedSessionStartResult, H as GrantScope } from './types-BVJr065k.js';
|
|
2
|
-
import { R as RuntimeCapabilities } from './capabilities-YSskrE8H.js';
|
|
3
|
-
import { A as AuthContext } from './IEngineBridge-BbsT8hof.js';
|
|
4
|
-
|
|
5
|
-
interface NativeTrustToken {
|
|
6
|
-
token: string;
|
|
7
|
-
expiresAtMs: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Internal-only gateway record before normalization; includes namespace fields omitted from the public Device type. */
|
|
11
|
-
type RawDeviceDoc = Device & {
|
|
12
|
-
appTag?: string;
|
|
13
|
-
tag?: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
interface WasmBridgeOptions {
|
|
17
|
-
apiKey?: string;
|
|
18
|
-
discoveryMode?: DiscoveryMode;
|
|
19
|
-
space?: string;
|
|
20
|
-
spaceKey?: string;
|
|
21
|
-
authMode?: AuthMode;
|
|
22
|
-
signalingMode?: SignalingMode;
|
|
23
|
-
projectId?: string;
|
|
24
|
-
coordinationGateway?: ClientOptions['coordinationGateway'];
|
|
25
|
-
coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
|
|
26
|
-
platformAttestationTokenProvider?: ClientOptions['platformAttestationTokenProvider'];
|
|
27
|
-
/** Internal host hint used by the provider-neutral gateway projection. */
|
|
28
|
-
coordinationPlatformType?: 'web' | 'desktop' | 'mobile';
|
|
29
|
-
storagePrefix?: string;
|
|
30
|
-
deviceIdPersistence?: 'persistent' | 'ephemeral';
|
|
31
|
-
endpointIdPersistence?: 'persistent' | 'ephemeral';
|
|
32
|
-
nodeIdPersistence?: 'persistent' | 'ephemeral';
|
|
33
|
-
localDeviceId?: string;
|
|
34
|
-
deviceName?: string;
|
|
35
|
-
turnCredentialsProvider?: () => Promise<{
|
|
36
|
-
iceServers?: RTCIceServer[];
|
|
37
|
-
} | null | undefined>;
|
|
38
|
-
applicationCrypto?: ExplicitFileDataSendParams['applicationCrypto'];
|
|
39
|
-
spaceAuth?: 'scoped-token';
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* WasmBridge is the browser host wrapper over the Rust/WASM runtime.
|
|
43
|
-
*
|
|
44
|
-
* Allowed:
|
|
45
|
-
* - normalize JS/WASM binding shapes
|
|
46
|
-
* - forward auth, discovery, signaling, and lifecycle calls into Rust
|
|
47
|
-
* - expose typed browser-facing results
|
|
48
|
-
*
|
|
49
|
-
* Not allowed:
|
|
50
|
-
* - become a second lifecycle engine
|
|
51
|
-
* - invent peer identity or connect policy that is not backed by Rust
|
|
52
|
-
* - normalize app-specific payload protocols into runtime behavior
|
|
53
|
-
*
|
|
54
|
-
* Source of truth:
|
|
55
|
-
* - Rust/WASM owns transport/runtime connection state and lifecycle primitives
|
|
56
|
-
* - The selected coordination provider owns browser delivery projections
|
|
57
|
-
* - RuntimeClient owns app-facing orchestration across those surfaces
|
|
58
|
-
*/
|
|
59
|
-
declare class WasmBridge implements ISignalingBackend {
|
|
60
|
-
private static readonly EXPLICIT_FILE_PROTOCOL_TYPE;
|
|
61
|
-
private static readonly EXPLICIT_FILE_CHUNK_SIZE_BYTES;
|
|
62
|
-
private static readonly MAX_EXPLICIT_TRANSFER_HEADER_BYTES;
|
|
63
|
-
private static readonly FALLBACK_EXPLICIT_FILE_NAME;
|
|
64
|
-
private static readonly MAX_EXPLICIT_FILE_NAME_CHARS;
|
|
65
|
-
private static readonly FALLBACK_EXPLICIT_MIME_TYPE;
|
|
66
|
-
private static readonly MAX_EXPLICIT_MIME_TYPE_CHARS;
|
|
67
|
-
app: any | null;
|
|
68
|
-
auth: any | null;
|
|
69
|
-
private readonly appTag;
|
|
70
|
-
protected options: {
|
|
71
|
-
appTag: string;
|
|
72
|
-
apiKey?: string;
|
|
73
|
-
discoveryMode?: DiscoveryMode;
|
|
74
|
-
space?: string;
|
|
75
|
-
spaceKey?: string;
|
|
76
|
-
authMode: AuthMode;
|
|
77
|
-
signalingMode?: SignalingMode;
|
|
78
|
-
projectId: string;
|
|
79
|
-
coordinationGateway?: ClientOptions['coordinationGateway'];
|
|
80
|
-
coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
|
|
81
|
-
platformAttestationTokenProvider?: ClientOptions['platformAttestationTokenProvider'];
|
|
82
|
-
coordinationPlatformType?: 'web' | 'desktop' | 'mobile';
|
|
83
|
-
storagePrefix?: string;
|
|
84
|
-
deviceIdPersistence?: 'persistent' | 'ephemeral';
|
|
85
|
-
endpointIdPersistence?: 'persistent' | 'ephemeral';
|
|
86
|
-
nodeIdPersistence?: 'persistent' | 'ephemeral';
|
|
87
|
-
localDeviceId?: string;
|
|
88
|
-
deviceName?: string;
|
|
89
|
-
strictMode?: boolean;
|
|
90
|
-
turnCredentialsProvider?: () => Promise<{
|
|
91
|
-
iceServers?: RTCIceServer[];
|
|
92
|
-
} | null | undefined>;
|
|
93
|
-
applicationCrypto?: ExplicitFileDataSendParams['applicationCrypto'];
|
|
94
|
-
spaceTokenProvider?: ClientOptions['spaceTokenProvider'];
|
|
95
|
-
spaceAuth?: 'scoped-token';
|
|
96
|
-
};
|
|
97
|
-
private spaceNamespaceIdPromise;
|
|
98
|
-
private cachedSpaceNamespaceId;
|
|
99
|
-
private authListeners;
|
|
100
|
-
private persistenceReady;
|
|
101
|
-
wasmClient: any;
|
|
102
|
-
private readonly createdAtMs;
|
|
103
|
-
private missingWasmWarnings;
|
|
104
|
-
private readonly wasmReadyWarningDelayMs;
|
|
105
|
-
private browserCoordinationSignaling;
|
|
106
|
-
private readonly nativeTrustTokens;
|
|
107
|
-
private lastObservedFirebaseUserId;
|
|
108
|
-
private sessionReaders;
|
|
109
|
-
protected authContext: {
|
|
110
|
-
userId: string;
|
|
111
|
-
token?: string | null;
|
|
112
|
-
refreshToken?: string | null;
|
|
113
|
-
customToken?: string | null;
|
|
114
|
-
tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
115
|
-
appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
116
|
-
expiresAtMs?: number | null;
|
|
117
|
-
} | null;
|
|
118
|
-
private injectedBrowserAuthSessionActive;
|
|
119
|
-
private readonly presenceManager;
|
|
120
|
-
private hasSyncedAuthToWasmClient;
|
|
121
|
-
private lastWasmAuthUserId;
|
|
122
|
-
private lastWasmAuthToken;
|
|
123
|
-
private lastDeliveredConnectionStates;
|
|
124
|
-
private authScopedRuntimeGeneration;
|
|
125
|
-
private coreClient;
|
|
126
|
-
private readonly applicationRouteEscalations;
|
|
127
|
-
private applicationRouteEscalationUnsubscribe;
|
|
128
|
-
private applicationRouteEscalationSubscriptionGeneration;
|
|
129
|
-
private applicationRouteEscalationSubscriptionEpoch;
|
|
130
|
-
constructor(options: WasmBridgeOptions);
|
|
131
|
-
get tag(): string;
|
|
132
|
-
getRuntimeCapabilities(): RuntimeCapabilities;
|
|
133
|
-
private static readonly WEB_DEVICE_ID_STORAGE_PREFIX;
|
|
134
|
-
private static readonly EPHEMERAL_DEVICE_ID_TTL_MS;
|
|
135
|
-
private getDeviceIdentityStorageKey;
|
|
136
|
-
private getDeviceIdPersistenceMode;
|
|
137
|
-
private isTicketOnlyMode;
|
|
138
|
-
private usesProviderNeutralGrant;
|
|
139
|
-
private createRandomDeviceId;
|
|
140
|
-
protected resolveWebLogicalDeviceId(): string;
|
|
141
|
-
private getDefaultBrowserDeviceName;
|
|
142
|
-
private getCoordinationSignaling;
|
|
143
|
-
usesCoordinationGateway(): boolean;
|
|
144
|
-
/** Restore the existing gateway delivery subscription after a native host resumes. */
|
|
145
|
-
reconnectCoordinationAfterHostResume(): Promise<void>;
|
|
146
|
-
getCoordinationNativeTrustToken(forceRefresh?: boolean): Promise<NativeTrustToken>;
|
|
147
|
-
invalidateCoordinationNativeTrustToken(): void;
|
|
148
|
-
subscribeCoordinationNativeTrustToken(listener: (token: NativeTrustToken | null) => void, options?: {
|
|
149
|
-
emitCurrent?: boolean;
|
|
150
|
-
}): () => void;
|
|
151
|
-
setCoordinationLocalDeviceId(deviceId: string): void;
|
|
152
|
-
/** Internal native-host hint for provider-neutral roster presentation. */
|
|
153
|
-
setCoordinationPlatformType(platformType: 'desktop' | 'mobile'): void;
|
|
154
|
-
setCoordinationExcludedPeers(excludedPeers: string[]): Promise<void>;
|
|
155
|
-
joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
|
|
156
|
-
leaveCoordinationRoom(roomId: string): Promise<void>;
|
|
157
|
-
getCoordinationRoomMembers(roomId: string): Promise<RoomMember[]>;
|
|
158
|
-
watchCoordinationRoomMembers(roomId: string, callback: (members: RoomMember[]) => void): () => void;
|
|
159
|
-
private withWebPresenceMetadata;
|
|
160
|
-
setAuthContext(context: {
|
|
161
|
-
userId: string;
|
|
162
|
-
token?: string | null;
|
|
163
|
-
refreshToken?: string | null;
|
|
164
|
-
customToken?: string | null;
|
|
165
|
-
tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
166
|
-
appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
167
|
-
expiresAtMs?: number | null;
|
|
168
|
-
} | null): Promise<void>;
|
|
169
|
-
private ensureBrowserPlatformAuth;
|
|
170
|
-
private syncWasmAuthToken;
|
|
171
|
-
private toRuntimeIdentity;
|
|
172
|
-
protected getCurrentUserId(): string | null;
|
|
173
|
-
getCurrentUserIdForScope(): string | null;
|
|
174
|
-
getAuthContext(): Readonly<typeof this.authContext> | null;
|
|
175
|
-
protected isSpaceMode(): boolean;
|
|
176
|
-
getResolvedOptions(): Readonly<typeof this.options>;
|
|
177
|
-
protected getDiscoveryScopeId(): string | null;
|
|
178
|
-
protected matchesTag(device: Pick<RawDeviceDoc, 'tag' | 'appTag'>): boolean;
|
|
179
|
-
matchesLegacyOrCurrentTag(device: Pick<RawDeviceDoc, 'tag' | 'appTag'>): boolean;
|
|
180
|
-
private stopSessionSubscriptions;
|
|
181
|
-
private stopRuntimeAuthScopedLoops;
|
|
182
|
-
stopAuthScopedActivity(options?: {
|
|
183
|
-
userId?: string | null;
|
|
184
|
-
}): Promise<void>;
|
|
185
|
-
setWasmClient(client: any): void;
|
|
186
|
-
private warnMissingWasmOnce;
|
|
187
|
-
private waitForWasmClient;
|
|
188
|
-
protected normalizeDevice(raw: Record<string, any>, fallbackId?: string): Device;
|
|
189
|
-
normalizeDeviceRecord(raw: Record<string, any>, fallbackId?: string): Device;
|
|
190
|
-
getResolvedWebLogicalDeviceId(): string;
|
|
191
|
-
private normalizeDeviceStatusSnapshot;
|
|
192
|
-
private normalizePeerSessionSnapshot;
|
|
193
|
-
private toBackendConnectionStateFromPeerSession;
|
|
194
|
-
private normalizeConnectionStateSnapshot;
|
|
195
|
-
private stabilizeConnectionState;
|
|
196
|
-
private sameConnectionState;
|
|
197
|
-
private deliverConnectionState;
|
|
198
|
-
private get browserPresenceLoopState();
|
|
199
|
-
private set browserPresenceLoopState(value);
|
|
200
|
-
get currentUser(): RuntimeIdentity | null;
|
|
201
|
-
onAuthChange(callback: (user: RuntimeIdentity | null) => void): () => void;
|
|
202
|
-
checkForSSOToken(): Promise<void>;
|
|
203
|
-
waitForAuth(): Promise<void>;
|
|
204
|
-
signInAnonymously(): Promise<void>;
|
|
205
|
-
signInWithPluto(): Promise<void>;
|
|
206
|
-
signOut(): Promise<void>;
|
|
207
|
-
getTurnCredentials(): Promise<any>;
|
|
208
|
-
updatePresence(localNodeId: string, ticketStr: string, isOnline?: boolean, ttlMs?: number, metadata?: string, deviceNameOverride?: string): Promise<void>;
|
|
209
|
-
refreshLivePresence(localNodeId: string, ticketStr: string, metadata?: string, deviceNameOverride?: string): Promise<void>;
|
|
210
|
-
setOffline(localNodeId: string): Promise<void>;
|
|
211
|
-
updateDevice(deviceId: string, updates: {
|
|
212
|
-
deviceName?: string;
|
|
213
|
-
capabilities?: Device['capabilities'];
|
|
214
|
-
metadata?: string;
|
|
215
|
-
excludedPeers?: string[];
|
|
216
|
-
}): Promise<void>;
|
|
217
|
-
deleteDevice(deviceId: string): Promise<void>;
|
|
218
|
-
cleanupStaleDevices(): Promise<void>;
|
|
219
|
-
sendMessage(targetId: string, payload: string, state?: string, replyPayload?: string): Promise<string>;
|
|
220
|
-
pollMessages(targetId: string): Promise<SignalingEnvelope[]>;
|
|
221
|
-
searchDevices(excludeNodeId?: string): Promise<Device[]>;
|
|
222
|
-
listDevicesWithStatus(): Promise<DeviceStatusSnapshot[]>;
|
|
223
|
-
getPeerSession(id: string): Promise<PeerSessionSnapshot | null>;
|
|
224
|
-
listPeerSessions(): Promise<PeerSessionSnapshot[]>;
|
|
225
|
-
waitForSettledPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
226
|
-
openPeerBi(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
227
|
-
openPeerNativeBi(id: string, label: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
228
|
-
openPeerBiTransportOnly(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
229
|
-
openPeerUni(id: string, timeoutMs?: number): Promise<BackendPeerUniStream>;
|
|
230
|
-
resolvePeerConnectionRecords(id: string): Promise<ManagedConnectionRecord[]>;
|
|
231
|
-
resolvePeerIdentity(id: string): Promise<ResolvedPeerIdentity>;
|
|
232
|
-
onDevicesChange(callback: (devices: Device[]) => void, excludeNodeId?: string): () => void;
|
|
233
|
-
subscribeDevices(userId: string): Promise<ReadableStream<DeviceEvent[]>>;
|
|
234
|
-
startAutoConnect(userId: string, localDeviceId: string): Promise<void>;
|
|
235
|
-
startAutoConnectOnce(userId: string, localDeviceId: string): Promise<void>;
|
|
236
|
-
notifyDisconnectRequested(remoteNodeId: string): void;
|
|
237
|
-
setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
|
|
238
|
-
disconnectDevice(deviceId: string): Promise<void>;
|
|
239
|
-
submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
240
|
-
setCoreClient(client: CoreClientBridgeHost | null): void;
|
|
241
|
-
private startApplicationRouteEscalationSubscription;
|
|
242
|
-
private stopApplicationRouteEscalationSubscription;
|
|
243
|
-
private retryManagedApplicationRouteEscalations;
|
|
244
|
-
private escalateManagedApplicationRoute;
|
|
245
|
-
connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
|
|
246
|
-
forceReconnectSnapshot(): void;
|
|
247
|
-
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
248
|
-
private ensureSpaceNamespaceIdPromise;
|
|
249
|
-
createSession(session: SignalingSession): Promise<void>;
|
|
250
|
-
updateSession(sessionId: string, updateData: any): Promise<void>;
|
|
251
|
-
subscribeSessions(localDeviceId: string): Promise<ReadableStream<SessionEvent[]>>;
|
|
252
|
-
getLocalDeviceId(): Promise<string | null>;
|
|
253
|
-
isConnected(node_id: string): Promise<boolean>;
|
|
254
|
-
private hasConnectedIndependentPeerRoute;
|
|
255
|
-
getConnectionStates(): Promise<BackendConnectionState[]>;
|
|
256
|
-
onConnectionStateChange(callback: (state: BackendConnectionState) => void): Promise<() => void> | (() => void);
|
|
257
|
-
sendExplicitFilePath(connectionId: string, filePath: string, transferId?: string): Promise<string>;
|
|
258
|
-
private sanitizeExplicitFileName;
|
|
259
|
-
private sanitizeExplicitMimeType;
|
|
260
|
-
private assertExplicitTransferHeaderSize;
|
|
261
|
-
private createWebRTCExplicitTransferId;
|
|
262
|
-
private createWebRTCExplicitTransferFrame;
|
|
263
|
-
sendExplicitFileData(params: ExplicitFileDataSendParams): Promise<void>;
|
|
264
|
-
getTransferHistory(limit?: number): Promise<Array<[string, unknown]>>;
|
|
265
|
-
deleteTransferJob(jobId: string): Promise<void>;
|
|
266
|
-
watchFriendDevices(friendUserIds: string[], callback: (friendDevices: Map<string, any[]>) => void): () => void;
|
|
267
|
-
updateFriendTicket(friendTicket: string | null): Promise<void>;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
declare abstract class DelegatingRuntimeAdapter implements ISignalingBackend {
|
|
271
|
-
protected readonly backend: ISignalingBackend;
|
|
272
|
-
protected constructor(backend: ISignalingBackend);
|
|
273
|
-
get currentUser(): RuntimeIdentity | null;
|
|
274
|
-
setAuthContext(context: AuthContext | null): Promise<void> | void;
|
|
275
|
-
signInAnonymously(): Promise<void>;
|
|
276
|
-
signInWithPluto(): Promise<void>;
|
|
277
|
-
signOut(): Promise<void>;
|
|
278
|
-
stopAuthScopedActivity(): Promise<void>;
|
|
279
|
-
usesCoordinationGateway(): boolean;
|
|
280
|
-
joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
|
|
281
|
-
leaveCoordinationRoom(roomId: string): Promise<void>;
|
|
282
|
-
getCoordinationRoomMembers(roomId: string): Promise<RoomMember[]>;
|
|
283
|
-
watchCoordinationRoomMembers(roomId: string, callback: (members: RoomMember[]) => void): () => void;
|
|
284
|
-
getTurnCredentials(): Promise<any>;
|
|
285
|
-
updatePresence(localNodeId: string, ticketStr: string, isOnline: boolean, ttlMs: number, metadata?: string): Promise<void>;
|
|
286
|
-
refreshLivePresence(localNodeId: string, ticketStr: string, metadata?: string): Promise<void>;
|
|
287
|
-
setOffline(localNodeId: string): Promise<void>;
|
|
288
|
-
cleanupStaleDevices(): Promise<void>;
|
|
289
|
-
searchDevices(excludeNodeId?: string): Promise<Device[]>;
|
|
290
|
-
listDevicesWithStatus(): Promise<DeviceStatusSnapshot[]>;
|
|
291
|
-
getPeerSession(id: string): Promise<PeerSessionSnapshot | null>;
|
|
292
|
-
listPeerSessions(): Promise<PeerSessionSnapshot[]>;
|
|
293
|
-
waitForSettledPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
294
|
-
resolvePeerIdentity(id: string): Promise<ResolvedPeerIdentity>;
|
|
295
|
-
resolvePeerConnectionRecords(id: string): Promise<ManagedConnectionRecord[]>;
|
|
296
|
-
updateDevice(deviceId: string, updates: {
|
|
297
|
-
deviceName?: string;
|
|
298
|
-
capabilities?: Device['capabilities'];
|
|
299
|
-
metadata?: string;
|
|
300
|
-
}): Promise<void>;
|
|
301
|
-
deleteDevice(deviceId: string): Promise<void>;
|
|
302
|
-
onDevicesChange(callback: (devices: Device[]) => void, excludeNodeId?: string): () => void;
|
|
303
|
-
onAuthChange(callback: (user: RuntimeIdentity | null) => void): () => void;
|
|
304
|
-
checkForSSOToken(): Promise<void>;
|
|
305
|
-
waitForAuth(): Promise<void>;
|
|
306
|
-
sendMessage(targetId: string, payload: string, state?: string, replyPayload?: string): Promise<string>;
|
|
307
|
-
pollMessages(targetId: string): Promise<SignalingEnvelope[]>;
|
|
308
|
-
watchFriendDevices(friendUserIds: string[], callback: (friendDevices: Map<string, Device[]>) => void): () => void;
|
|
309
|
-
updateFriendTicket(friendTicket: string | null): Promise<void>;
|
|
310
|
-
subscribeDevices(userId: string): Promise<ReadableStream<DeviceEvent[]>>;
|
|
311
|
-
startAutoConnect(userId: string, localDeviceId: string): void;
|
|
312
|
-
submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
313
|
-
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
314
|
-
createSession(session: SignalingSession): Promise<void>;
|
|
315
|
-
updateSession(sessionId: string, updateData: any): Promise<void>;
|
|
316
|
-
subscribeSessions(localDeviceId: string): Promise<ReadableStream<SessionEvent[]>>;
|
|
317
|
-
forceReconnectSnapshot(): void;
|
|
318
|
-
getLocalDeviceId(): Promise<string | null>;
|
|
319
|
-
getLocalDeviceInfo(): Promise<LocalDeviceInfo | null>;
|
|
320
|
-
updateLocalDeviceName(deviceName: string): Promise<LocalDeviceInfo | null>;
|
|
321
|
-
startManagedSessionNative(options: {
|
|
322
|
-
userId: string;
|
|
323
|
-
deviceName?: string;
|
|
324
|
-
localDeviceId?: string | null;
|
|
325
|
-
metadata?: string;
|
|
326
|
-
autoConnect?: boolean;
|
|
327
|
-
presence?: boolean;
|
|
328
|
-
}): Promise<NativeManagedSessionStartResult>;
|
|
329
|
-
notifyNetworkChange(options?: {
|
|
330
|
-
reason?: string;
|
|
331
|
-
}): Promise<unknown>;
|
|
332
|
-
getManagedNodeId(options?: {
|
|
333
|
-
initializeIfMissing?: boolean;
|
|
334
|
-
}): Promise<string | null>;
|
|
335
|
-
startPresenceLoopOnce(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): Promise<void>;
|
|
336
|
-
startAutoConnectOnce(userId: string, localDeviceId: string): Promise<void>;
|
|
337
|
-
getEndpointTicket(): Promise<string>;
|
|
338
|
-
getEndpointTicketWithToken(scope: GrantScope, maxConnections: number): Promise<string | null>;
|
|
339
|
-
registerSessionToken(token: string, scope: GrantScope, maxConnections: number): Promise<void>;
|
|
340
|
-
revokeSessionTokensByScope(scope: GrantScope): Promise<string[]>;
|
|
341
|
-
openPeerBi(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
342
|
-
incoming_streams(): Promise<ReadableStream<unknown>>;
|
|
343
|
-
is_current_transport_stable_id(endpointId: string, transportStableId: bigint): Promise<boolean>;
|
|
344
|
-
openPeerNativeBi(id: string, label: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
345
|
-
openPeerBiTransportOnly(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
346
|
-
openPeerUni(id: string, timeoutMs?: number): Promise<BackendPeerUniStream>;
|
|
347
|
-
connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
|
|
348
|
-
disconnectDevice(deviceId: string): Promise<void>;
|
|
349
|
-
setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
|
|
350
|
-
isConnected(nodeId: string): Promise<boolean>;
|
|
351
|
-
getConnectionStates(): Promise<BackendConnectionState[]>;
|
|
352
|
-
onConnectionStateChange(callback: (state: BackendConnectionState) => void): Promise<() => void> | (() => void);
|
|
353
|
-
/** @deprecated Use named channels or `openrtc-file-transfer`. */
|
|
354
|
-
sendExplicitFilePath(connectionId: string, filePath: string, transferId?: string): Promise<string>;
|
|
355
|
-
/** @deprecated Use named channels or `openrtc-file-transfer`. */
|
|
356
|
-
sendExplicitFileData(params: ExplicitFileDataSendParams): Promise<void>;
|
|
357
|
-
/** @deprecated Transfer history belongs to the consumer application. */
|
|
358
|
-
getTransferHistory(limit?: number): Promise<Array<[string, unknown]>>;
|
|
359
|
-
/** @deprecated Transfer history belongs to the consumer application. */
|
|
360
|
-
deleteTransferJob(jobId: string): Promise<void>;
|
|
361
|
-
getRuntimeCapabilities(): RuntimeCapabilities;
|
|
362
|
-
onIncomingNativeMessage(callback: (connectionId: string, remoteNodeId: string | null, message: any) => void): Promise<() => void>;
|
|
363
|
-
unwrap(): ISignalingBackend;
|
|
364
|
-
/**
|
|
365
|
-
* Forward setCoreClient() to the inner backend if it implements it. This
|
|
366
|
-
* lets the core Client inject a reference into backends (e.g. WasmBridge)
|
|
367
|
-
* that need to escalate transport-level dials into full Client.connect()
|
|
368
|
-
* handshakes.
|
|
369
|
-
*/
|
|
370
|
-
setCoreClient(client: unknown): void;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export { DelegatingRuntimeAdapter as D, type WasmBridgeOptions as W, WasmBridge as a };
|
package/dist/chunk-6TAVJ46R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {u}from'./chunk-3USHQ7QW.js';import {f}from'./chunk-F2XGNLXL.js';import {c}from'./chunk-RD3JEGGF.js';function s(i,r){let t=c(i);return u(t,new f({...t,bridge:r}))}export{s as a};
|
package/dist/chunk-GW7P3D54.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-A3IAG6EL.js';import {w}from'./chunk-YBXGNKM7.js';var n=class extends a{constructor(e){super(new w(e));}setWasmClient(e){this.unwrap().setWasmClient(e);}};export{n as a};
|
package/dist/chunk-YQWQDTQ3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1,u as u$1}from'./chunk-3USHQ7QW.js';import {f as f$1}from'./chunk-F2XGNLXL.js';import {c}from'./chunk-RD3JEGGF.js';var B=class c{static __wrap(t){let e=Object.create(c.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),t}free(){let t=this.__destroy_into_raw();n.__wbg_bistream_free(t,0);}get applicationCryptoWrapped(){return n.bistream_applicationCryptoWrapped(this.__wbg_ptr)!==0}get endpoint_id(){let t,e;try{let i=n.__wbindgen_add_to_stack_pointer(-16);n.bistream_endpoint_id(i,this.__wbg_ptr);var _=f().getInt32(i+0,!0),r=f().getInt32(i+4,!0);return t=_,e=r,v(_,r)}finally{n.__wbindgen_add_to_stack_pointer(16),n.__wbindgen_export4(t,e,1);}}finishSend(){let t=n.bistream_finishSend(this.__wbg_ptr);return p(t)}get recv(){let t=n.bistream_recv(this.__wbg_ptr);return p(t)}get send(){let t=n.bistream_send(this.__wbg_ptr);return p(t)}};Symbol.dispose&&(B.prototype[Symbol.dispose]=B.prototype.free);var N=class c{static __wrap(t){let e=Object.create(c.prototype);return e.__wbg_ptr=t,Z.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();n.__wbg_intounderlyingsink_free(t,0);}abort(t){let e=this.__destroy_into_raw(),_=n.intounderlyingsink_abort(e,w(t));return p(_)}close(){let t=this.__destroy_into_raw(),e=n.intounderlyingsink_close(t);return p(e)}write(t){let e=n.intounderlyingsink_write(this.__wbg_ptr,w(t));return p(e)}};Symbol.dispose&&(N.prototype[Symbol.dispose]=N.prototype.free);var q=class c{static __wrap(t){let e=Object.create(c.prototype);return e.__wbg_ptr=t,tt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();n.__wbg_intounderlyingsource_free(t,0);}cancel(){let t=this.__destroy_into_raw();n.intounderlyingsource_cancel(t);}pull(t){let e=n.intounderlyingsource_pull(this.__wbg_ptr,w(t));return p(e)}};Symbol.dispose&&(q.prototype[Symbol.dispose]=q.prototype.free);var L=class c{static __wrap(t){let e=Object.create(c.prototype);return e.__wbg_ptr=t,et.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),t}free(){let t=this.__destroy_into_raw();n.__wbg_peerunistream_free(t,0);}get applicationCryptoWrapped(){return n.peerunistream_applicationCryptoWrapped(this.__wbg_ptr)!==0}finishSend(){let t=n.peerunistream_finishSend(this.__wbg_ptr);return p(t)}get writable(){let t=n.peerunistream_writable(this.__wbg_ptr);return p(t)}};Symbol.dispose&&(L.prototype[Symbol.dispose]=L.prototype.free);var C=class c{static __wrap(t){let e=Object.create(c.prototype);return e.__wbg_ptr=t,nt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();n.__wbg_wasmclient_free(t,0);}add_peer_scope(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_add_peer_scope(this.__wbg_ptr,_,r,i,b);return p(g)}bind_connection_device_id(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_bind_connection_device_id(this.__wbg_ptr,_,r,i,b);return p(g)}bind_node_device_id(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_bind_node_device_id(this.__wbg_ptr,_,r,i,b);return p(g)}clearConnectionApplicationCryptoKey(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s;n.wasmclient_clearConnectionApplicationCryptoKey(this.__wbg_ptr,e,_);}clearIdentityCredential(){n.wasmclient_clearIdentityCredential(this.__wbg_ptr);}clear_session_tokens(){n.wasmclient_clear_session_tokens(this.__wbg_ptr);}confirm_inline_reciprocal_session_admission(t,e,_,r,i,b){let g=a(t,n.__wbindgen_export,n.__wbindgen_export2),d=s,m=a(_,n.__wbindgen_export,n.__wbindgen_export2),l=s,y=a(r,n.__wbindgen_export,n.__wbindgen_export2),h=s;var k=u(b)?0:a(b,n.__wbindgen_export,n.__wbindgen_export2),I=s;let A=n.wasmclient_confirm_inline_reciprocal_session_admission(this.__wbg_ptr,g,d,e,m,l,y,h,i,k,I);return p(A)}connect(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_connect(this.__wbg_ptr,e,_);return p(r)}connect_device(t,e){var _=u(t)?0:a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s;let i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_connect_device(this.__wbg_ptr,_,r,i,b);return p(g)}connection_state(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_connection_state(this.__wbg_ptr,e,_);return p(r)}connection_states(){let t=n.wasmclient_connection_states(this.__wbg_ptr);return p(t)}create_room(t,e,_,r,i,b){let g=a(t,n.__wbindgen_export,n.__wbindgen_export2),d=s,m=a(e,n.__wbindgen_export,n.__wbindgen_export2),l=s,y=a(_,n.__wbindgen_export,n.__wbindgen_export2),h=s,k=a(r,n.__wbindgen_export,n.__wbindgen_export2),I=s,A=a(i,n.__wbindgen_export,n.__wbindgen_export2),O=s,G=n.wasmclient_create_room(this.__wbg_ptr,g,d,m,l,y,h,k,I,A,O,u(b)?Number.MAX_SAFE_INTEGER:b>>>0);return p(G)}create_session(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_create_session(this.__wbg_ptr,e,_);return p(r)}delete_device(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_delete_device(this.__wbg_ptr,_,r,i,b);return p(g)}devices_with_status(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_devices_with_status(this.__wbg_ptr,e,_);return p(r)}disconnect(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_disconnect(this.__wbg_ptr,e,_);return p(r)}disconnect_device(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s;var i=u(e)?0:a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s;let g=n.wasmclient_disconnect_device(this.__wbg_ptr,_,r,i,b);return p(g)}disconnect_transient(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_disconnect_transient(this.__wbg_ptr,e,_);return p(r)}endpoint_id_from_ticket(t){let e,_;try{let l=n.__wbindgen_add_to_stack_pointer(-16),y=a(t,n.__wbindgen_export,n.__wbindgen_export2),h=s;n.wasmclient_endpoint_id_from_ticket(l,this.__wbg_ptr,y,h);var r=f().getInt32(l+0,!0),i=f().getInt32(l+4,!0),b=f().getInt32(l+8,!0),g=f().getInt32(l+12,!0),d=r,m=i;if(g)throw d=0,m=0,p(b);return e=d,_=m,v(d,m)}finally{n.__wbindgen_add_to_stack_pointer(16),n.__wbindgen_export4(e,_,1);}}endpoint_ticket(){let t=n.wasmclient_endpoint_ticket(this.__wbg_ptr);return p(t)}endpoint_ticket_with_token(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_endpoint_ticket_with_token(this.__wbg_ptr,_,r,e);return p(i)}force_reconnect_snapshot(){n.wasmclient_force_reconnect_snapshot(this.__wbg_ptr);}get_members(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(_,n.__wbindgen_export,n.__wbindgen_export2),m=s,l=n.wasmclient_get_members(this.__wbg_ptr,r,i,b,g,d,m);return p(l)}heartbeat_tick(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(_,n.__wbindgen_export,n.__wbindgen_export2),m=s,l=n.wasmclient_heartbeat_tick(this.__wbg_ptr,r,i,b,g,d,m);return p(l)}incoming_streams(){let t=n.wasmclient_incoming_streams(this.__wbg_ptr);return p(t)}initIrohWithTestRelay(t,e){var _=u(t)?0:W(t,n.__wbindgen_export),r=s,i=u(e)?0:a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s;let g=n.wasmclient_initIrohWithTestRelay(this.__wbg_ptr,_,r,i,b);return p(g)}init_iroh(t){var e=u(t)?0:W(t,n.__wbindgen_export),_=s;let r=n.wasmclient_init_iroh(this.__wbg_ptr,e,_);return p(r)}iroh_path_kind(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_iroh_path_kind(this.__wbg_ptr,e,_);return p(r)}iroh_secret_key(){let t=n.wasmclient_iroh_secret_key(this.__wbg_ptr);return p(t)}iroh_transport_rtt_ms(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_iroh_transport_rtt_ms(this.__wbg_ptr,e,_);return p(r)}is_auto_connect_excluded(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s;return n.wasmclient_is_auto_connect_excluded(this.__wbg_ptr,e,_)!==0}is_connected(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_is_connected(this.__wbg_ptr,e,_);return p(r)}is_current_transport_stable_id(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_is_current_transport_stable_id(this.__wbg_ptr,_,r,e);return p(i)}join_room(t,e,_,r,i){let b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(e,n.__wbindgen_export,n.__wbindgen_export2),m=s,l=a(_,n.__wbindgen_export,n.__wbindgen_export2),y=s,h=a(r,n.__wbindgen_export,n.__wbindgen_export2),k=s,I=a(i,n.__wbindgen_export,n.__wbindgen_export2),A=s,O=n.wasmclient_join_room(this.__wbg_ptr,b,g,d,m,l,y,h,k,I,A);return p(O)}leave_room(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(_,n.__wbindgen_export,n.__wbindgen_export2),m=s,l=n.wasmclient_leave_room(this.__wbg_ptr,r,i,b,g,d,m);return p(l)}list_managed_connections(){let t=n.wasmclient_list_managed_connections(this.__wbg_ptr);return p(t)}static newV2(t){try{let i=n.__wbindgen_add_to_stack_pointer(-16),b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s;n.wasmclient_newV2(i,b,g);var e=f().getInt32(i+0,!0),_=f().getInt32(i+4,!0),r=f().getInt32(i+8,!0);if(r)throw p(_);return c.__wrap(e)}finally{n.__wbindgen_add_to_stack_pointer(16);}}node_addr(){let t=n.wasmclient_node_addr(this.__wbg_ptr);return p(t)}open_bi(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_open_bi(this.__wbg_ptr,e,_);return p(r)}open_native_main_control_bi(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_open_native_main_control_bi(this.__wbg_ptr,e,_);return p(r)}open_peer_bi(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_open_peer_bi(this.__wbg_ptr,_,r,u(e)?Number.MAX_SAFE_INTEGER:e>>>0);return p(i)}open_peer_bi_explicit_file_sender(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_open_peer_bi_explicit_file_sender(this.__wbg_ptr,_,r,u(e)?Number.MAX_SAFE_INTEGER:e>>>0);return p(i)}open_peer_bi_transport_only(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_open_peer_bi_transport_only(this.__wbg_ptr,_,r,u(e)?Number.MAX_SAFE_INTEGER:e>>>0);return p(i)}open_peer_native_bi(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=n.wasmclient_open_peer_native_bi(this.__wbg_ptr,r,i,b,g,u(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(d)}open_peer_uni(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_open_peer_uni(this.__wbg_ptr,_,r,u(e)?Number.MAX_SAFE_INTEGER:e>>>0);return p(i)}open_uni(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_open_uni(this.__wbg_ptr,e,_);return p(r)}peer_scopes(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_peer_scopes(this.__wbg_ptr,e,_);return p(r)}peer_session(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_peer_session(this.__wbg_ptr,e,_);return p(r)}peer_sessions(){let t=n.wasmclient_peer_sessions(this.__wbg_ptr);return p(t)}peer_snapshot(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_peer_snapshot(this.__wbg_ptr,e,_);return p(r)}prepare_inline_reciprocal_session_admission(t,e,_,r,i,b,g,d){let m=a(t,n.__wbindgen_export,n.__wbindgen_export2),l=s,y=a(_,n.__wbindgen_export,n.__wbindgen_export2),h=s,k=a(r,n.__wbindgen_export,n.__wbindgen_export2),I=s,A=a(i,n.__wbindgen_export,n.__wbindgen_export2),O=s,G=a(b,n.__wbindgen_export,n.__wbindgen_export2),st=s,ct=a(g,n.__wbindgen_export,n.__wbindgen_export2),at=s,bt=a(d,n.__wbindgen_export,n.__wbindgen_export2),pt=s,wt=n.wasmclient_prepare_inline_reciprocal_session_admission(this.__wbg_ptr,m,l,e,y,h,k,I,A,O,G,st,ct,at,bt,pt);return p(wt)}present_session_token_to_host(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_present_session_token_to_host(this.__wbg_ptr,_,r,i,b);return p(g)}present_session_token_to_host_with_payload(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s;var d=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),m=s;let l=n.wasmclient_present_session_token_to_host_with_payload(this.__wbg_ptr,r,i,b,g,d,m);return p(l)}present_session_token_to_host_with_payload_and_device_id(t,e,_,r){let i=a(t,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=a(e,n.__wbindgen_export,n.__wbindgen_export2),d=s;var m=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),l=s,y=u(r)?0:a(r,n.__wbindgen_export,n.__wbindgen_export2),h=s;let k=n.wasmclient_present_session_token_to_host_with_payload_and_device_id(this.__wbg_ptr,i,b,g,d,m,l,y,h);return p(k)}rankRoutes(t,e){try{let b=n.__wbindgen_add_to_stack_pointer(-16),g=rt(t,n.__wbindgen_export),d=s,m=rt(e,n.__wbindgen_export),l=s;n.wasmclient_rankRoutes(b,this.__wbg_ptr,g,d,m,l);var _=f().getInt32(b+0,!0),r=f().getInt32(b+4,!0),i=Tt(_,r).slice();return n.__wbindgen_export4(_,r*4,4),i}finally{n.__wbindgen_add_to_stack_pointer(16);}}register_session_token(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s;n.wasmclient_register_session_token(this.__wbg_ptr,r,i,b,g,_);}register_session_token_with_expiry_ms(t,e,_,r){let i=a(t,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=a(e,n.__wbindgen_export,n.__wbindgen_export2),d=s;n.wasmclient_register_session_token_with_expiry_ms(this.__wbg_ptr,i,b,g,d,_,r);}reject_connection_admission(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_reject_connection_admission(this.__wbg_ptr,_,r,i,b);return p(g)}release_peer_scope(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s;var i=u(e)?0:a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s;let g=n.wasmclient_release_peer_scope(this.__wbg_ptr,_,r,i,b);return p(g)}remote_session_admission_ready_for_ticket(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_remote_session_admission_ready_for_ticket(this.__wbg_ptr,e,_);return p(r)}report_managed_connection_settled(t,e,_,r,i,b){let g=a(t,n.__wbindgen_export,n.__wbindgen_export2),d=s;var m=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),l=s;let y=n.wasmclient_report_managed_connection_settled(this.__wbg_ptr,g,d,e,m,l,!u(r),u(r)?BigInt(0):r,!u(i),u(i)?BigInt(0):i,!u(b),u(b)?BigInt(0):b);return p(y)}report_transport_status(t,e,_,r,i,b){let g=a(t,n.__wbindgen_export,n.__wbindgen_export2),d=s,m=a(e,n.__wbindgen_export,n.__wbindgen_export2),l=s;var y=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),h=s;let k=n.wasmclient_report_transport_status(this.__wbg_ptr,g,d,m,l,y,h,!u(r),u(r)?BigInt(0):r,!u(i),u(i)?BigInt(0):i,!u(b),u(b)?BigInt(0):b);return p(k)}resolve_peer_connection_records(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_resolve_peer_connection_records(this.__wbg_ptr,e,_);return p(r)}revoke_session_token(t){try{let i=n.__wbindgen_add_to_stack_pointer(-16),b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s;n.wasmclient_revoke_session_token(i,this.__wbg_ptr,b,g);var e=f().getInt32(i+0,!0),_=f().getInt32(i+4,!0),r=f().getInt32(i+8,!0);if(r)throw p(_);return p(e)}finally{n.__wbindgen_add_to_stack_pointer(16);}}revoke_tokens_by_scope(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_revoke_tokens_by_scope(this.__wbg_ptr,e,_);return p(r)}runtime_policy(){try{let r=n.__wbindgen_add_to_stack_pointer(-16);n.wasmclient_runtime_policy(r,this.__wbg_ptr);var t=f().getInt32(r+0,!0),e=f().getInt32(r+4,!0),_=f().getInt32(r+8,!0);if(_)throw p(e);return p(t)}finally{n.__wbindgen_add_to_stack_pointer(16);}}same_peer(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_same_peer(this.__wbg_ptr,_,r,i,b);return p(g)}search_devices(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_search_devices(this.__wbg_ptr,e,_);return p(r)}send_message(t,e,_,r){let i=a(t,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=a(e,n.__wbindgen_export,n.__wbindgen_export2),d=s;var m=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),l=s,y=u(r)?0:a(r,n.__wbindgen_export,n.__wbindgen_export2),h=s;let k=n.wasmclient_send_message(this.__wbg_ptr,i,b,g,d,m,l,y,h);return p(k)}send_peer(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=W(e,n.__wbindgen_export),b=s,g=n.wasmclient_send_peer(this.__wbg_ptr,_,r,i,b);return p(g)}send_peer_application_frame(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=W(e,n.__wbindgen_export),g=s,d=n.wasmclient_send_peer_application_frame(this.__wbg_ptr,r,i,b,g,u(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(d)}setConnectionApplicationCryptoKey(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=W(e,n.__wbindgen_export),b=s,g=n.wasmclient_setConnectionApplicationCryptoKey(this.__wbg_ptr,_,r,i,b);return p(g)}setConnectionApplicationCryptoRequired(t){try{let r=n.__wbindgen_add_to_stack_pointer(-16),i=a(t,n.__wbindgen_export,n.__wbindgen_export2),b=s;n.wasmclient_setConnectionApplicationCryptoRequired(r,this.__wbg_ptr,i,b);var e=f().getInt32(r+0,!0),_=f().getInt32(r+4,!0);if(_)throw p(e)}finally{n.__wbindgen_add_to_stack_pointer(16);}}setIdentityCredential(t){var e=u(t)?0:a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s;n.wasmclient_setIdentityCredential(this.__wbg_ptr,e,_);}set_auto_connect_excluded(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_set_auto_connect_excluded(this.__wbg_ptr,_,r,e);return p(i)}set_offline(t){let e=a(t,n.__wbindgen_export,n.__wbindgen_export2),_=s,r=n.wasmclient_set_offline(this.__wbg_ptr,e,_);return p(r)}start_auto_connect(t,e){try{let i=n.__wbindgen_add_to_stack_pointer(-16),b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(e,n.__wbindgen_export,n.__wbindgen_export2),m=s;n.wasmclient_start_auto_connect(i,this.__wbg_ptr,b,g,d,m);var _=f().getInt32(i+0,!0),r=f().getInt32(i+4,!0);if(r)throw p(_)}finally{n.__wbindgen_add_to_stack_pointer(16);}}start_presence_loop(t,e,_,r){let i=a(t,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=a(e,n.__wbindgen_export,n.__wbindgen_export2),d=s,m=a(_,n.__wbindgen_export,n.__wbindgen_export2),l=s;var y=u(r)?0:a(r,n.__wbindgen_export,n.__wbindgen_export2),h=s;n.wasmclient_start_presence_loop(this.__wbg_ptr,i,b,g,d,m,l,y,h);}stop_auth_scoped_activity(){n.wasmclient_stop_auth_scoped_activity(this.__wbg_ptr);}stop_auto_connect(){n.wasmclient_stop_auto_connect(this.__wbg_ptr);}stop_presence_loop(){n.wasmclient_stop_presence_loop(this.__wbg_ptr);}submit_browser_desired_peers(t,e){try{let b=n.__wbindgen_add_to_stack_pointer(-16),g=a(e,n.__wbindgen_export,n.__wbindgen_export2),d=s;n.wasmclient_submit_browser_desired_peers(b,this.__wbg_ptr,t,g,d);var _=f().getInt32(b+0,!0),r=f().getInt32(b+4,!0),i=f().getInt32(b+8,!0);if(i)throw p(r);return _!==0}finally{n.__wbindgen_add_to_stack_pointer(16);}}update_device(t,e,_,r,i){let b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(e,n.__wbindgen_export,n.__wbindgen_export2),m=s;var l=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),y=s,h=u(i)?0:a(i,n.__wbindgen_export,n.__wbindgen_export2),k=s;let I=n.wasmclient_update_device(this.__wbg_ptr,b,g,d,m,l,y,u(r)?0:w(r),h,k);return p(I)}update_presence(t,e,_,r,i){let b=a(t,n.__wbindgen_export,n.__wbindgen_export2),g=s,d=a(e,n.__wbindgen_export,n.__wbindgen_export2),m=s,l=a(_,n.__wbindgen_export,n.__wbindgen_export2),y=s;var h=u(r)?0:a(r,n.__wbindgen_export,n.__wbindgen_export2),k=s;let I=n.wasmclient_update_presence(this.__wbg_ptr,b,g,d,m,l,y,h,k,!u(i),u(i)?BigInt(0):i);return p(I)}update_session(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_update_session(this.__wbg_ptr,_,r,i,b);return p(g)}validate_session_token(t){let e,_;try{let l=n.__wbindgen_add_to_stack_pointer(-16),y=a(t,n.__wbindgen_export,n.__wbindgen_export2),h=s;n.wasmclient_validate_session_token(l,this.__wbg_ptr,y,h);var r=f().getInt32(l+0,!0),i=f().getInt32(l+4,!0),b=f().getInt32(l+8,!0),g=f().getInt32(l+12,!0),d=r,m=i;if(g)throw d=0,m=0,p(b);return e=d,_=m,v(d,m)}finally{n.__wbindgen_add_to_stack_pointer(16),n.__wbindgen_export4(e,_,1);}}validate_session_token_for_connection(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=a(e,n.__wbindgen_export,n.__wbindgen_export2),b=s,g=n.wasmclient_validate_session_token_for_connection(this.__wbg_ptr,_,r,i,b);return p(g)}validate_session_token_for_connection_with_payload(t,e,_){let r=a(t,n.__wbindgen_export,n.__wbindgen_export2),i=s,b=a(e,n.__wbindgen_export,n.__wbindgen_export2),g=s;var d=u(_)?0:a(_,n.__wbindgen_export,n.__wbindgen_export2),m=s;let l=n.wasmclient_validate_session_token_for_connection_with_payload(this.__wbg_ptr,r,i,b,g,d,m);return p(l)}wait_for_settled_peer(t,e){let _=a(t,n.__wbindgen_export,n.__wbindgen_export2),r=s,i=n.wasmclient_wait_for_settled_peer(this.__wbg_ptr,_,r,u(e)?Number.MAX_SAFE_INTEGER:e>>>0);return p(i)}wake_browser_auto_connect(){return n.wasmclient_wake_browser_auto_connect(this.__wbg_ptr)!==0}};Symbol.dispose&&(C.prototype[Symbol.dispose]=C.prototype.free);function ot(){n.start();}function gt(){return {__proto__:null,"./openrtc_bg.js":{__proto__:null,__wbg_Error_9dc85fe1bc224456:function(t,e){let _=Error(v(t,e));return w(_)},__wbg_String_8564e559799eccda:function(t,e){let _=String(o(e)),r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(t){let e=o(t),_=typeof e=="boolean"?e:void 0;return u(_)?16777215:_?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(t,e){let _=K(o(e)),r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg___wbindgen_in_ce8569b2fc6f5088:function(t,e){return o(t)in o(e)},__wbg___wbindgen_is_function_147961669f068cd4:function(t){return typeof o(t)=="function"},__wbg___wbindgen_is_null_ced4761460071341:function(t){return o(t)===null},__wbg___wbindgen_is_object_3a2c414391dbf751:function(t){let e=o(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(t){return typeof o(t)=="string"},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(t){return o(t)===void 0},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(t,e){return o(t)===o(e)},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(t,e){return o(t)==o(e)},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(t,e){let _=o(e),r=typeof _=="number"?_:void 0;f().setFloat64(t+8,u(r)?0:r,true),f().setInt32(t+0,!u(r),true);},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(t,e){let _=o(e),r=typeof _=="string"?_:void 0;var i=u(r)?0:a(r,n.__wbindgen_export,n.__wbindgen_export2),b=s;f().setInt32(t+4,b,true),f().setInt32(t+0,i,true);},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(t,e){throw new Error(v(t,e))},__wbg__wbg_cb_unref_c2301a3c9b78104b:function(t){o(t)._wbg_cb_unref();},__wbg_abort_56c00f462c9261d9:function(t,e){o(t).abort(o(e));},__wbg_abort_f2416f4a9852003e:function(t){o(t).abort();},__wbg_addEventListener_b635263c509aa7de:function(){return x(function(t,e,_,r){o(t).addEventListener(v(e,_),o(r));},arguments)},__wbg_append_c5a0c94a6a73b22e:function(){return x(function(t,e,_,r,i){o(t).append(v(e,_),v(r,i));},arguments)},__wbg_arrayBuffer_cc7704fa158b907a:function(){return x(function(t){let e=o(t).arrayBuffer();return w(e)},arguments)},__wbg_bistream_new:function(t){let e=B.__wrap(t);return w(e)},__wbg_body_442a47f02322d7b0:function(t){let e=o(t).body;return u(e)?0:w(e)},__wbg_buffer_8524b3453cde4918:function(t){let e=o(t).buffer;return w(e)},__wbg_byobRequest_cc72d210de793e64:function(t){let e=o(t).byobRequest;return u(e)?0:w(e)},__wbg_byteLength_96807b1d9ab24a4c:function(t){return o(t).byteLength},__wbg_byteOffset_a9c7002428843c41:function(t){return o(t).byteOffset},__wbg_call_ec09a4cf93377d3a:function(){return x(function(t,e,_){let r=o(t).call(o(e),o(_));return w(r)},arguments)},__wbg_cancel_f3a197b26dc88b39:function(t){let e=o(t).cancel();return w(e)},__wbg_catch_66060324c27be6f7:function(t,e){let _=o(t).catch(o(e));return w(_)},__wbg_clearTimeout_113b1cde814ec762:function(t){let e=clearTimeout(p(t));return w(e)},__wbg_clearTimeout_333bba87532ab9d3:function(t){let e=clearTimeout(p(t));return w(e)},__wbg_clearTimeout_47a40e3be01ed7a3:function(){return x(function(t,e){o(t).clearTimeout(p(e));},arguments)},__wbg_close_296263cfe1bb2999:function(){return x(function(t){o(t).close();},arguments)},__wbg_close_388d99468213b286:function(){return x(function(t){o(t).close();},arguments)},__wbg_close_4857e22d08b71356:function(){return x(function(t){o(t).close();},arguments)},__wbg_code_1cda2855fcd9b009:function(t){return o(t).code},__wbg_code_70beb7b22374d55e:function(t){return o(t).code},__wbg_createDataChannel_122bd3d8aacee49b:function(t,e,_){let r=o(t).createDataChannel(v(e,_));return w(r)},__wbg_crypto_38df2bab126b63dc:function(t){let e=o(t).crypto;return w(e)},__wbg_data_8a04443c1e5a8cd3:function(t){let e=o(t).data;return w(e)},__wbg_dispatchEvent_cc62a6a43d28b01c:function(){return x(function(t,e){return o(t).dispatchEvent(o(e))},arguments)},__wbg_done_6a8439e544ec6206:function(t){return o(t).done},__wbg_enqueue_bbeb09ba0b140f76:function(){return x(function(t,e){o(t).enqueue(o(e));},arguments)},__wbg_entries_4e00eefd3fd54cf1:function(t){let e=o(t).entries();return w(e)},__wbg_error_6651fee1c71e5da9:function(t){console.error(o(t));},__wbg_error_a6fa202b58aa1cd3:function(t,e){let _,r;try{_=t,r=e,console.error(v(t,e));}finally{n.__wbindgen_export4(_,r,1);}},__wbg_fetch_074561c3e313c86f:function(t){let e=fetch(o(t));return w(e)},__wbg_fetch_22858a12fcf93152:function(t,e){let _=o(t).fetch(o(e));return w(_)},__wbg_getRandomValues_76dfc69825c9c552:function(){return x(function(t,e){globalThis.crypto.getRandomValues(F(t,e));},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return x(function(t,e){o(t).getRandomValues(o(e));},arguments)},__wbg_getReader_9facd4f899beac89:function(){return x(function(t){let e=o(t).getReader();return w(e)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(t,e){let _=o(t)[e>>>0];return w(_)},__wbg_get_52a8a619f7b88df6:function(){return x(function(t,e){let _=Reflect.get(o(t),o(e));return w(_)},arguments)},__wbg_get_done_c21b9933fc9a9e9c:function(t){let e=o(t).done;return u(e)?16777215:e?1:0},__wbg_get_value_ad568c7d3db9073f:function(t){let e=o(t).value;return w(e)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let _=o(t)[o(e)];return w(_)},__wbg_has_14676d88c1340d2c:function(){return x(function(t,e){return Reflect.has(o(t),o(e))},arguments)},__wbg_headers_5b19cf40627ae54d:function(t){let e=o(t).headers;return w(e)},__wbg_info_a2b5f8a5dae8b26c:function(t){console.info(o(t));},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(t){let e;try{e=o(t)instanceof ArrayBuffer;}catch{e=false;}return e},__wbg_instanceof_Blob_5c4e145be35f9b1e:function(t){let e;try{e=o(t)instanceof Blob;}catch{e=false;}return e},__wbg_instanceof_Response_36a65a969abaa7c6:function(t){let e;try{e=o(t)instanceof Response;}catch{e=false;}return e},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(t){let e;try{e=o(t)instanceof Uint8Array;}catch{e=false;}return e},__wbg_instanceof_Window_9e0fe7d3d1ff4342:function(t){let e;try{e=o(t)instanceof Window;}catch{e=false;}return e},__wbg_isArray_139f48e3c057ede8:function(t){return Array.isArray(o(t))},__wbg_length_68a9d5278d084f4f:function(t){return o(t).length},__wbg_log_6614a4effdb4e983:function(t){console.log(o(t));},__wbg_message_12958526424a887b:function(t,e){let _=o(e).message,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_msCrypto_bd5a034af96bcba6:function(t){let e=o(t).msCrypto;return w(e)},__wbg_new_0b303268aa395a38:function(){let t=new Array;return w(t)},__wbg_new_189262ff31890c23:function(){return x(function(){let t=new Headers;return w(t)},arguments)},__wbg_new_20b778a4c5c691c3:function(){let t=new Object;return w(t)},__wbg_new_227d7c05414eb861:function(){let t=new Error;return w(t)},__wbg_new_24739629d416f982:function(){return x(function(){let t=new AbortController;return w(t)},arguments)},__wbg_new_5fae30e6b23db8df:function(t,e){let _=new Error(v(t,e));return w(_)},__wbg_new_883c0db065f06efd:function(){return w(new Map)},__wbg_new_a3e5112401a82338:function(){return x(function(t,e){let _=new WebSocket(v(t,e));return w(_)},arguments)},__wbg_new_b06772b280cc6e52:function(t){let e=new Uint8Array(o(t));return w(e)},__wbg_new_from_slice_bb2d1778c0b87eb1:function(t,e){let _=new Uint8Array(F(t,e));return w(_)},__wbg_new_typed_90c3f6c29ba36d19:function(t,e){try{var _={a:t,b:e},r=(b,g)=>{let d=_.a;_.a=0;try{return vt(d,_.b,b,g)}finally{_.a=d;}};let i=new Promise(r);return w(i)}finally{_.a=0;}},__wbg_new_with_byte_offset_and_length_9e1e664fe1a5d385:function(t,e,_){let r=new Uint8Array(o(t),e>>>0,_>>>0);return w(r)},__wbg_new_with_configuration_3a96aa953ca17197:function(){return x(function(t){let e=new RTCPeerConnection(o(t));return w(e)},arguments)},__wbg_new_with_event_init_dict_bd850674488710b1:function(){return x(function(t,e,_){let r=new CustomEvent(v(t,e),o(_));return w(r)},arguments)},__wbg_new_with_into_underlying_sink_2596343f9b6c8e58:function(t){let e=new WritableStream(N.__wrap(t));return w(e)},__wbg_new_with_into_underlying_source_fd904252f385f59c:function(t,e){let _=new ReadableStream(q.__wrap(t),p(e));return w(_)},__wbg_new_with_length_4b57a7a5dc67221c:function(t){let e=new Uint8Array(t>>>0);return w(e)},__wbg_new_with_str_and_init_df876572184fe639:function(){return x(function(t,e,_){let r=new Request(v(t,e),o(_));return w(r)},arguments)},__wbg_new_with_str_sequence_505a4829cc247e79:function(){return x(function(t,e,_){let r=new WebSocket(v(t,e),o(_));return w(r)},arguments)},__wbg_next_8cb028b6ba50743f:function(){return x(function(t){let e=o(t).next();return w(e)},arguments)},__wbg_node_84ea875411254db1:function(t){let e=o(t).node;return w(e)},__wbg_now_bce4dc999095ea77:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(t){return o(t).now()},__wbg_parse_a5c06e19bc1187fd:function(t,e){return Date.parse(v(t,e))},__wbg_peerunistream_new:function(t){let e=L.__wrap(t);return w(e)},__wbg_performance_3fcf6e32a7e1ed0a:function(t){let e=o(t).performance;return w(e)},__wbg_process_44c7a14e11e9f69e:function(t){let e=o(t).process;return w(e)},__wbg_protocol_28aaef5ea42981d6:function(t,e){let _=o(e).protocol,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_prototypesetcall_956c7493c68e29b4:function(t,e,_){Uint8Array.prototype.set.call(F(t,e),o(_));},__wbg_push_ceb8ef046afb2041:function(t,e){return o(t).push(o(e))},__wbg_queueMicrotask_4698f900840e3286:function(t){queueMicrotask(o(t));},__wbg_queueMicrotask_477a5533c7100338:function(t){let e=o(t).queueMicrotask;return w(e)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return x(function(t,e){o(t).randomFillSync(p(e));},arguments)},__wbg_read_8426c146431f2905:function(t){let e=o(t).read();return w(e)},__wbg_readyState_25243ad6ce649774:function(t){return o(t).readyState},__wbg_reason_4ec455bac79b33ce:function(t,e){let _=o(e).reason,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_releaseLock_188846ef719acb10:function(t){o(t).releaseLock();},__wbg_removeEventListener_016c1d24523b4730:function(){return x(function(t,e,_,r){o(t).removeEventListener(v(e,_),o(r));},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return x(function(){let t=module.require;return w(t)},arguments)},__wbg_resolve_0183de2e8c6b1d54:function(t){let e=Promise.resolve(o(t));return w(e)},__wbg_respond_3cdb4cf32683fd79:function(){return x(function(t,e){o(t).respond(e>>>0);},arguments)},__wbg_send_99d049cae69c53cc:function(){return x(function(t,e,_){o(t).send(F(e,_));},arguments)},__wbg_send_bac9d3dc4f21ef28:function(){return x(function(t,e,_){o(t).send(v(e,_));},arguments)},__wbg_setTimeout_3a808dd861dd3c12:function(t,e){let _=setTimeout(o(t),e);return w(_)},__wbg_setTimeout_6613a51400c1bf9f:function(){return x(function(t,e,_){let r=o(t).setTimeout(p(e),_);return w(r)},arguments)},__wbg_setTimeout_ef24d2fc3ad97385:function(){return x(function(t,e){let _=setTimeout(o(t),e);return w(_)},arguments)},__wbg_set_5f806304fb633ab3:function(t,e,_){let r=o(t).set(o(e),o(_));return w(r)},__wbg_set_6be42768c690e380:function(t,e,_){o(t)[p(e)]=p(_);},__wbg_set_86698c227e5b9dad:function(t,e,_){o(t).set(F(e,_));},__wbg_set_a6ba3ac0e634b822:function(){return x(function(t,e,_){return Reflect.set(o(t),o(e),o(_))},arguments)},__wbg_set_binaryType_8c2dd2cf1cfc2e28:function(t,e){o(t).binaryType=kt[e];},__wbg_set_body_d1153b16a2b95ca1:function(t,e){o(t).body=o(e);},__wbg_set_cache_5a01a8b5e6ca6cf2:function(t,e){o(t).cache=Rt[e];},__wbg_set_credentials_e9120ed88b1fc0b8:function(t,e){o(t).credentials=At[e];},__wbg_set_da33c120a6584674:function(t,e,_){o(t)[e>>>0]=p(_);},__wbg_set_detail_c7af5edea934390b:function(t,e){o(t).detail=o(e);},__wbg_set_handle_event_6147c38b782c7b42:function(t,e){o(t).handleEvent=o(e);},__wbg_set_headers_877ed41890d28af2:function(t,e){o(t).headers=o(e);},__wbg_set_high_water_mark_77da20c49668427d:function(t,e){o(t).highWaterMark=e;},__wbg_set_method_b4ede299b2064f37:function(t,e,_){o(t).method=v(e,_);},__wbg_set_mode_d6c2e1991aa963c6:function(t,e){o(t).mode=Ft[e];},__wbg_set_onclose_9cb5c3372e16c192:function(t,e){o(t).onclose=o(e);},__wbg_set_onerror_190fe67e911ebf28:function(t,e){o(t).onerror=o(e);},__wbg_set_onmessage_96337495f0bfb796:function(t,e){o(t).onmessage=o(e);},__wbg_set_onopen_3e2bf6b11d434c2d:function(t,e){o(t).onopen=o(e);},__wbg_set_signal_9022b5aa06a6ce5b:function(t,e){o(t).signal=o(e);},__wbg_signal_41dd1a8913cd0b7d:function(t){let e=o(t).signal;return w(e)},__wbg_stack_3b0d974bbf31e44f:function(t,e){let _=o(e).stack,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_static_accessor_GLOBAL_60a4124bab7dcc9a:function(){let t=typeof global>"u"?null:global;return u(t)?0:w(t)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){let t=typeof globalThis>"u"?null:globalThis;return u(t)?0:w(t)},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){let t=typeof self>"u"?null:self;return u(t)?0:w(t)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){let t=typeof window>"u"?null:window;return u(t)?0:w(t)},__wbg_status_9e6505cfa3e73a7c:function(t){return o(t).status},__wbg_subarray_42216645a367cd7a:function(t,e,_){let r=o(t).subarray(e>>>0,_>>>0);return w(r)},__wbg_then_254bab9b266a77a5:function(t,e,_){let r=o(t).then(o(e),o(_));return w(r)},__wbg_then_3ea18602c6a5123b:function(t,e){let _=o(t).then(o(e));return w(_)},__wbg_url_72c67c175685a054:function(t,e){let _=o(e).url,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_url_d0b8042af0d1bbba:function(t,e){let _=o(e).url,r=a(_,n.__wbindgen_export,n.__wbindgen_export2),i=s;f().setInt32(t+4,i,true),f().setInt32(t+0,r,true);},__wbg_value_3d3defe09fb1ffca:function(t){let e=o(t).value;return w(e)},__wbg_versions_276b2795b1c6a219:function(t){let e=o(t).versions;return w(e)},__wbg_view_15fa5865c6b336e3:function(t){let e=o(t).view;return u(e)?0:w(e)},__wbg_warn_633bacc13ba7e6c3:function(t){console.warn(o(t));},__wbg_wasClean_f17429d064911939:function(t){return o(t).wasClean},__wbindgen_cast_0000000000000001:function(t,e){let _=S(t,e,mt);return w(_)},__wbindgen_cast_0000000000000002:function(t,e){let _=S(t,e,ht);return w(_)},__wbindgen_cast_0000000000000003:function(t,e){let _=S(t,e,xt);return w(_)},__wbindgen_cast_0000000000000004:function(t,e){let _=S(t,e,yt);return w(_)},__wbindgen_cast_0000000000000005:function(t,e){let _=S(t,e,dt);return w(_)},__wbindgen_cast_0000000000000006:function(t,e){let _=S(t,e,ut);return w(_)},__wbindgen_cast_0000000000000007:function(t,e){let _=Ct(t,e,ft);return w(_)},__wbindgen_cast_0000000000000008:function(t,e){let _=S(t,e,lt);return w(_)},__wbindgen_cast_0000000000000009:function(t){return w(t)},__wbindgen_cast_000000000000000a:function(t){return w(t)},__wbindgen_cast_000000000000000b:function(t,e){let _=F(t,e);return w(_)},__wbindgen_cast_000000000000000c:function(t,e){let _=v(t,e);return w(_)},__wbindgen_cast_000000000000000d:function(t){let e=BigInt.asUintN(64,t);return w(e)},__wbindgen_cast_000000000000000e:function(t,e){var _=F(t,e).slice();return n.__wbindgen_export4(t,e*1,1),w(_)},__wbindgen_object_clone_ref:function(t){let e=o(t);return w(e)},__wbindgen_object_drop_ref:function(t){p(t);}}}}function dt(c,t){n.__wasm_bindgen_func_elem_8835(c,t);}function ut(c,t){n.__wasm_bindgen_func_elem_9957(c,t);}function ft(c,t){n.__wasm_bindgen_func_elem_10010(c,t);}function lt(c,t){n.__wasm_bindgen_func_elem_17816(c,t);}function mt(c,t,e){n.__wasm_bindgen_func_elem_9037(c,t,w(e));}function xt(c,t,e){n.__wasm_bindgen_func_elem_6495(c,t,w(e));}function yt(c,t,e){n.__wasm_bindgen_func_elem_10645(c,t,w(e));}function ht(c,t,e){try{let i=n.__wbindgen_add_to_stack_pointer(-16);n.__wasm_bindgen_func_elem_17961(i,c,t,w(e));var _=f().getInt32(i+0,!0),r=f().getInt32(i+4,!0);if(r)throw p(_)}finally{n.__wbindgen_add_to_stack_pointer(16);}}function vt(c,t,e,_){n.__wasm_bindgen_func_elem_17963(c,t,w(e),w(_));}var kt=["blob","arraybuffer"],Rt=["default","no-store","reload","no-cache","force-cache","only-if-cached"],At=["omit","same-origin","include"],Ft=["same-origin","no-cors","cors","navigate"],Q=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbg_bistream_free(c,1));typeof FinalizationRegistry>"u"?{}:new FinalizationRegistry(c=>n.__wbg_intounderlyingbytesource_free(c,1));var Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbg_intounderlyingsink_free(c,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbg_intounderlyingsource_free(c,1)),et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbg_peerunistream_free(c,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbg_wasmclient_free(c,1));typeof FinalizationRegistry>"u"?{}:new FinalizationRegistry(c=>n.__wbg_wasmconnection_free(c,1));function w(c){M===R.length&&R.push(R.length+1);let t=M;return M=R[t],R[t]=c,t}var V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(c=>n.__wbindgen_export5(c.a,c.b));function K(c){let t=typeof c;if(t=="number"||t=="boolean"||c==null)return `${c}`;if(t=="string")return `"${c}"`;if(t=="symbol"){let r=c.description;return r==null?"Symbol":`Symbol(${r})`}if(t=="function"){let r=c.name;return typeof r=="string"&&r.length>0?`Function(${r})`:"Function"}if(Array.isArray(c)){let r=c.length,i="[";r>0&&(i+=K(c[0]));for(let b=1;b<r;b++)i+=", "+K(c[b]);return i+="]",i}let e=/\[object ([^\]]+)\]/.exec(toString.call(c)),_;if(e&&e.length>1)_=e[1];else return toString.call(c);if(_=="Object")try{return "Object("+JSON.stringify(c)+")"}catch{return "Object"}return c instanceof Error?`${c.name}: ${c.message}
|
|
2
|
-
${c.stack}`:_}function Et(c){c<1028||(R[c]=M,M=c);}function Tt(c,t){c=c>>>0;let e=f(),_=[];for(let r=c;r<c+4*t;r+=4)_.push(p(e.getUint32(r,true)));return _}function F(c,t){return c=c>>>0,T().subarray(c/1,c/1+t)}var E=null;function f(){return (E===null||E.buffer.detached===true||E.buffer.detached===void 0&&E.buffer!==n.memory.buffer)&&(E=new DataView(n.memory.buffer)),E}function v(c,t){return Wt(c>>>0,t)}var j=null;function T(){return (j===null||j.byteLength===0)&&(j=new Uint8Array(n.memory.buffer)),j}function o(c){return R[c]}function x(c,t){try{return c.apply(this,t)}catch(e){n.__wbindgen_export3(w(e));}}var R=new Array(1024).fill(void 0);R.push(void 0,null,true,false);var M=R.length;function u(c){return c==null}function Ct(c,t,e){let _={a:c,b:t,cnt:1},r=(...i)=>{_.cnt++;try{return e(_.a,_.b,...i)}finally{r._wbg_cb_unref();}};return r._wbg_cb_unref=()=>{--_.cnt===0&&(n.__wbindgen_export5(_.a,_.b),_.a=0,V.unregister(_));},V.register(r,_,_),r}function S(c,t,e){let _={a:c,b:t,cnt:1},r=(...i)=>{_.cnt++;let b=_.a;_.a=0;try{return e(b,_.b,...i)}finally{_.a=b,r._wbg_cb_unref();}};return r._wbg_cb_unref=()=>{--_.cnt===0&&(n.__wbindgen_export5(_.a,_.b),_.a=0,V.unregister(_));},V.register(r,_,_),r}function W(c,t){let e=t(c.length*1,1)>>>0;return T().set(c,e/1),s=c.length,e}function rt(c,t){let e=t(c.length*4,4)>>>0,_=f();for(let r=0;r<c.length;r++)_.setUint32(e+4*r,w(c[r]),true);return s=c.length,e}function a(c,t,e){if(e===void 0){let g=z.encode(c),d=t(g.length,1)>>>0;return T().subarray(d,d+g.length).set(g),s=g.length,d}let _=c.length,r=t(_,1)>>>0,i=T(),b=0;for(;b<_;b++){let g=c.charCodeAt(b);if(g>127)break;i[r+b]=g;}if(b!==_){b!==0&&(c=c.slice(b)),r=e(r,_,_=b+c.length*3,1)>>>0;let g=T().subarray(r+b,r+_),d=z.encodeInto(c,g);b+=d.written,r=e(r,_,b,1)>>>0;}return s=b,r}function p(c){let t=o(c);return Et(c),t}var U=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});U.decode();var Ot=2146435072,H=0;function Wt(c,t){return H+=t,H>=Ot&&(U=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}),U.decode(),H=t),U.decode(T().subarray(c,c+t))}var z=new TextEncoder;"encodeInto"in z||(z.encodeInto=function(c,t){let e=z.encode(c);return t.set(e),{read:c.length,written:e.length}});var s=0,n;function zt(c,t){return n=c.exports,E=null,j=null,n.__wbindgen_start(),n}async function Bt(c,t){if(typeof Response=="function"&&c instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(c,t)}catch(r){if(c.ok&&e(c.type)&&c.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let _=await c.arrayBuffer();return await WebAssembly.instantiate(_,t)}else {let _=await WebAssembly.instantiate(c,t);return _ instanceof WebAssembly.Instance?{instance:_,module:c}:_}function e(_){switch(_){case "basic":case "cors":case "default":return true}return false}}async function it(c){if(n!==void 0)return n;c!==void 0&&(Object.getPrototypeOf(c)===Object.prototype?{module_or_path:c}=c:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),c===void 0&&(c=new URL("openrtc_bg.wasm",import.meta.url));let t=gt();(typeof c=="string"||typeof Request=="function"&&c instanceof Request||typeof URL=="function"&&c instanceof URL)&&(c=fetch(c));let{instance:e,module:_}=await Bt(await c,t);return zt(e)}a$1(async()=>({initWasm:it,WasmClient:C,start:ot}));async function Vt(c$1){let t=c(c$1),{WasmBridge:e}=await import('./WasmBridge-2A22U7RU.js');return u$1(t,new e(t))}function Gt(c$1,t){let e=c(c$1);return u$1(e,new f$1({...e,bridge:t}))}export{Vt as a,Gt as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as createIpcClient,a as createWasmClient}from'./chunk-YQWQDTQ3.js';import'./chunk-3USHQ7QW.js';import'./chunk-F2XGNLXL.js';import'./chunk-A3IAG6EL.js';import'./chunk-7Z6N46RB.js';import'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-K37WVIZL.js';import'./chunk-BXFXPIXO.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as createIpcClient}from'./chunk-6TAVJ46R.js';import'./chunk-3USHQ7QW.js';import'./chunk-F2XGNLXL.js';import'./chunk-A3IAG6EL.js';import'./chunk-7Z6N46RB.js';import'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-K37WVIZL.js';import'./chunk-BXFXPIXO.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
|