@everframe/react-native 0.9.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 (38) hide show
  1. package/EverframeRN.podspec +88 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +8 -0
  4. package/README.md +505 -0
  5. package/android/build.gradle.kts +209 -0
  6. package/android/settings.gradle.kts +8 -0
  7. package/android/src/main/AndroidManifest.xml +9 -0
  8. package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +1670 -0
  9. package/android/src/main/java/dev/everframe/rn/EverframePackage.kt +40 -0
  10. package/android/src/main/java/dev/everframe/rn/EverframeSensitiveViewManager.kt +20 -0
  11. package/android/src/main/java/dev/everframe/rn/RnVideoPrivacyAdapter.kt +65 -0
  12. package/dist/NativeEverframe.d.ts +308 -0
  13. package/dist/NativeEverframe.js +1 -0
  14. package/dist/browser-ZQAY6B4M.js +1 -0
  15. package/dist/chunk-LPIKPZNX.js +1 -0
  16. package/dist/chunk-QRPINMCR.js +1 -0
  17. package/dist/chunk-QZRTTQRS.js +1 -0
  18. package/dist/chunk-XFLFA52R.js +1 -0
  19. package/dist/chunk-XUSV3KOD.js +1 -0
  20. package/dist/index.d.ts +1006 -0
  21. package/dist/index.js +51 -0
  22. package/dist/integrations/console.d.ts +8 -0
  23. package/dist/integrations/console.js +1 -0
  24. package/dist/integrations/react-native-video.d.ts +44 -0
  25. package/dist/integrations/react-native-video.js +1 -0
  26. package/dist/integrations/react-navigation.d.ts +21 -0
  27. package/dist/integrations/react-navigation.js +1 -0
  28. package/dist/integrations/theoplayer.d.ts +37 -0
  29. package/dist/integrations/theoplayer.js +1 -0
  30. package/dist/types-D5e4kWaw.d.ts +12 -0
  31. package/ios/Sources/EverframeBridge.swift +1043 -0
  32. package/ios/Sources/EverframeEventEmitter.swift +204 -0
  33. package/ios/Sources/EverframeModule.h +36 -0
  34. package/ios/Sources/EverframeModule.mm +489 -0
  35. package/ios/Sources/RemoteVitalsBridge.swift +99 -0
  36. package/package.json +121 -0
  37. package/src/NativeEverframe.ts +439 -0
  38. package/src/codegen-types.ts +11 -0
@@ -0,0 +1,40 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // SPDX-FileCopyrightText: 2026 ScriptX
3
+ //
4
+ // EverframePackage — registers EverframeModule with React Native's TurboModule
5
+ // manager. Hosts add this to their `getPackages()` list (Application or
6
+ // MainApplication.kt) to expose the bridge.
7
+ //
8
+ // Plan 06-03 — declares isTurboModule = true so the host's new-architecture
9
+ // codegen wires this through TurboModuleManagerDelegate; on legacy (paper)
10
+ // hosts, RN falls back to the same ReactContextBaseJavaModule surface.
11
+
12
+ package dev.everframe.rn
13
+
14
+ import com.facebook.react.BaseReactPackage
15
+ import com.facebook.react.bridge.NativeModule
16
+ import com.facebook.react.bridge.ReactApplicationContext
17
+ import com.facebook.react.module.model.ReactModuleInfo
18
+ import com.facebook.react.module.model.ReactModuleInfoProvider
19
+
20
+ class EverframePackage : BaseReactPackage() {
21
+
22
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<com.facebook.react.uimanager.ViewManager<*, *>> =
23
+ listOf(EverframeSensitiveViewManager())
24
+
25
+ override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? =
26
+ if (name == EverframeModule.NAME) EverframeModule(reactContext) else null
27
+
28
+ override fun getReactModuleInfoProvider(): ReactModuleInfoProvider = ReactModuleInfoProvider {
29
+ mapOf(
30
+ EverframeModule.NAME to ReactModuleInfo(
31
+ /* name = */ EverframeModule.NAME,
32
+ /* className = */ EverframeModule::class.java.name,
33
+ /* canOverrideExistingModule = */ false,
34
+ /* needsEagerInit = */ false,
35
+ /* isCxxModule = */ false,
36
+ /* isTurboModule = */ true,
37
+ ),
38
+ )
39
+ }
40
+ }
@@ -0,0 +1,20 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // SPDX-FileCopyrightText: 2026 ScriptX
3
+
4
+ package dev.everframe.rn
5
+
6
+ import com.facebook.react.uimanager.ThemedReactContext
7
+ import com.facebook.react.views.view.ReactViewGroup
8
+ import com.facebook.react.views.view.ReactViewManager
9
+ import dev.everframe.Everframe
10
+
11
+ /** Same props/Yoga node as View; sensitivity exists before native mount or JS onLayout. */
12
+ class EverframeSensitiveViewManager : ReactViewManager() {
13
+ override fun getName(): String = "EverframeSensitiveView"
14
+ public override fun createViewInstance(context: ThemedReactContext): ReactViewGroup =
15
+ EverframeSensitiveView(context)
16
+ }
17
+
18
+ class EverframeSensitiveView(context: ThemedReactContext) : ReactViewGroup(context) {
19
+ init { Everframe.markSensitive(this) }
20
+ }
@@ -0,0 +1,65 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // SPDX-FileCopyrightText: 2026 ScriptX
3
+
4
+ package dev.everframe.rn
5
+
6
+ import android.view.View
7
+ import dev.everframe.Everframe
8
+ import dev.everframe.capture.video.VideoPrivacyAdapter
9
+ import dev.everframe.capture.video.VideoPrivacyAdapter.Classification
10
+
11
+ /** Reads native mount-time RN state; never treats a caller nativeID as authorization. */
12
+ internal object RnVideoPrivacyAdapter : VideoPrivacyAdapter {
13
+ override fun classify(view: View): Classification = try {
14
+ if (view.getTag(com.facebook.react.R.id.view_tag_native_id) == "everframe-sensitive")
15
+ Classification.EXCLUDE else Classification.ORDINARY_VIEW
16
+ } catch (_: Throwable) { Classification.UNKNOWN }
17
+ }
18
+
19
+ /** One process-lifetime scalar token: module invalidation cannot prove native surface detach. */
20
+ internal object RnVideoPrivacyUncertainty {
21
+ private var retained: AutoCloseable? = null
22
+ @Synchronized fun retain(token: AutoCloseable) {
23
+ if (retained == null) retained = token else token.close()
24
+ }
25
+ }
26
+
27
+ /** One latched uncertainty/token per RN instance, with scalar outstanding work accounting. */
28
+ internal class RnSensitiveRegistration(
29
+ private val resolve: (Int) -> View?,
30
+ private val dispatch: (() -> Unit) -> Unit,
31
+ ) : AutoCloseable {
32
+ private var token: AutoCloseable? = null
33
+ private var outstanding = 0L
34
+ private var uncertain = false
35
+ private var destroyed = false
36
+
37
+ @Synchronized fun register(tag: Double) {
38
+ if (destroyed) return
39
+ if (token == null) token = Everframe.__beginSensitiveRegistration()
40
+ if (!tag.isFinite() || tag <= 0 || tag > Int.MAX_VALUE || tag != tag.toInt().toDouble()) {
41
+ uncertain = true; return
42
+ }
43
+ outstanding++
44
+ try {
45
+ dispatch {
46
+ synchronized(this) {
47
+ if (destroyed) return@synchronized
48
+ try {
49
+ val view = resolve(tag.toInt())
50
+ if (view == null) uncertain = true else {
51
+ Everframe.markSensitive(view)
52
+ if (view.getTag(dev.everframe.R.id.tx_sensitive) != true) uncertain = true
53
+ }
54
+ } catch (_: Throwable) { uncertain = true }
55
+ outstanding--
56
+ if (outstanding == 0L && !uncertain) { token?.close(); token = null }
57
+ }
58
+ }
59
+ } catch (_: Throwable) { outstanding--; uncertain = true }
60
+ }
61
+ @Synchronized override fun close() {
62
+ destroyed = true
63
+ token?.let(RnVideoPrivacyUncertainty::retain); token = null
64
+ }
65
+ }
@@ -0,0 +1,308 @@
1
+ import { TurboModule } from 'react-native';
2
+
3
+ /**
4
+ * React Native codegen recognizes the `UnsafeObject` identifier as its
5
+ * generic-object escape hatch. Keeping the structural TypeScript alias local
6
+ * avoids the legacy `react-native/Libraries/Types/CodegenTypes` deep import,
7
+ * whose declaration is disabled by default in React Native 0.87.
8
+ */
9
+ type UnsafeObject = object;
10
+
11
+ /**
12
+ * Geometry rect crossing the bridge. Flat-object only; codegen cannot express
13
+ * the richer UI-tree `Rect` from @everframe/sdk-core in a spec position.
14
+ */
15
+ type Rect = {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
20
+ };
21
+ /**
22
+ * Configure-time options for the native Everframe runtime. Flat-object only.
23
+ * Rich variants (e.g., callbacks, function refs) MUST stay on the JS side.
24
+ */
25
+ type ConfigOpts = {
26
+ apiKey?: string;
27
+ sdkVersion?: string;
28
+ /**
29
+ * If true, the native side captures a UIWindow/SurfaceFlinger screenshot
30
+ * on every `captureNow()`. Defaults to true.
31
+ */
32
+ captureScreenshot?: boolean;
33
+ /**
34
+ * Client veto for network body capture. `true` disables bodies regardless
35
+ * of server config; the server's `captureBodies` gate must still say ON for
36
+ * capture to happen at all. Flat because RN codegen rejects nested objects —
37
+ * the host-facing nested `networkBodies: { disabled }` is flattened here by
38
+ * `extractBridgeConfig`.
39
+ */
40
+ networkBodiesDisabled?: boolean;
41
+ /**
42
+ * Client veto for the install identifier (MAI meter spec 2026-08-27).
43
+ * `true` stops this app sending one; it can never force it on. Flat because
44
+ * RN codegen rejects nested objects — the host-facing nested
45
+ * `installIdentifier: { disabled }` is flattened here by
46
+ * `extractBridgeConfig`, the same constraint `networkBodiesDisabled` above
47
+ * documents. Absent defaults to `false` (identifier sent) on both natives,
48
+ * matching `EverframeConfig.installIdentifierEnabled`'s own `true` default
49
+ * once polarity is flipped.
50
+ */
51
+ installIdentifierDisabled?: boolean;
52
+ /**
53
+ * Built-in attach-PIN surface mode (spec 2026-08-19): 'builtin' (default —
54
+ * the native SDK presents the code itself), 'custom' (host renders it from
55
+ * onAttachChallenge; the device still announces the capability), 'off'
56
+ * (legacy one-click dashboard attach, no PIN). Flat string, not a union —
57
+ * codegen cannot express string-literal unions; the natives coerce unknown
58
+ * values to 'builtin'.
59
+ */
60
+ attachPinUi?: string;
61
+ /**
62
+ * Explicit companion device-identity override (naming spec 2026-08-24) —
63
+ * an MDM id or provisioning serial the host already trusts. Hashed
64
+ * (SHA-256 → UUID shape) natively before it ever reaches the announce
65
+ * `device` block — see `CompanionDeviceId.resolve` (iOS) /
66
+ * `CompanionDeviceId.resolve` (Android). Flat optional string, same
67
+ * codegen shape as `attachPinUi` above. `undefined`/absent falls through
68
+ * to each native side's own Keychain/SSAID-then-stored-UUID chain.
69
+ */
70
+ companionDeviceId?: string;
71
+ /**
72
+ * Companion on-screen name-badge visibility (naming spec 2026-08-24,
73
+ * controller ruling / Task 6b) — "a production app that finds it
74
+ * intrusive turns it off in one line". `undefined`/absent defaults to
75
+ * `true` (badge shown) on both natives, matching
76
+ * `CompanionBadgeOptions.enabled`'s own default. Flat because RN codegen
77
+ * rejects nested objects, same constraint `networkBodiesDisabled` above
78
+ * documents — the host-facing nested `companionBadge: { enabled }` is
79
+ * flattened here by `extractBridgeConfig`.
80
+ */
81
+ companionBadgeEnabled?: boolean;
82
+ /** Local veto for native mobile shake-to-report. Absent defaults to enabled. */
83
+ shakeToReportEnabled?: boolean;
84
+ /**
85
+ * Companion on-screen name-badge corner (naming spec 2026-08-24,
86
+ * controller ruling / Task 6b). Flat optional STRING, not a literal
87
+ * union — same codegen ceiling as `attachPinUi` above (RN codegen cannot
88
+ * express a string-literal union in a struct field): the host-facing
89
+ * `RuntimeConfig.companionBadge.position` narrows to the real
90
+ * `'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'` union and
91
+ * `extractBridgeConfig` passes it through unchanged onto this wire field.
92
+ * Each native side re-parses the string into its own
93
+ * `CompanionBadgePosition` enum, coercing `undefined`/an unrecognised
94
+ * value to `.bottomRight`/`BOTTOM_RIGHT` — the same default
95
+ * `CompanionBadgeOptions.position` already uses.
96
+ */
97
+ companionBadgePosition?: string;
98
+ /**
99
+ * Inline reporter theme (reporter branding spec 2026-08-25, RN slice) —
100
+ * 8 optional `#rrggbb` role strings, flattened from the host-facing nested
101
+ * `RuntimeConfig.theme` by `extractBridgeConfig` (RN codegen cannot express
102
+ * a nested object in a struct field — the `companionBadge` constraint
103
+ * above). Pure passthrough: NO hex validation happens on the RN side; each
104
+ * native ThemeResolver revalidates per-field and ignores invalid values.
105
+ * The theme only ever renders once the server entitles it (server
106
+ * `watermark: false`) — the entitlement gate lives natively and cannot be
107
+ * bypassed from here; free plan keeps the watermark (fail closed).
108
+ */
109
+ themeBackground?: string;
110
+ themeSurface?: string;
111
+ themeBorder?: string;
112
+ themeText?: string;
113
+ themeTextMuted?: string;
114
+ themeAccent?: string;
115
+ themeAccentForeground?: string;
116
+ themeDestructive?: string;
117
+ /**
118
+ * Session Vitals local config (spec 2026-09-06, RN). Three FLAT fields
119
+ * flattened from the host-facing nested `RuntimeConfig.vitals` by
120
+ * `extractBridgeConfig` — same codegen reason as `companionBadge*`.
121
+ * `vitalsEnabled`: absent = follow the dashboard toggle; `false` = opt out
122
+ * locally; `true` never forces it on. `vitalsSampleRate`: [0, 1], min()'d
123
+ * with the server rate, clamped natively; absent = server rate.
124
+ * `vitalsCaptureSourceQuery`: keep query strings on `source_change.src`
125
+ * (default false — signed CDN URLs carry tokens). Each native maps present
126
+ * fields onto its own `VitalsConfig` and leaves SDK defaults alone.
127
+ */
128
+ vitalsEnabled?: boolean;
129
+ vitalsSampleRate?: number;
130
+ vitalsCaptureSourceQuery?: boolean;
131
+ };
132
+ /**
133
+ * Host-declared user for self-declared recognition (spec 2026-08-12). Flat by
134
+ * design — RN codegen rejects recursive shapes, and this needs none.
135
+ *
136
+ * JS-FACING TYPE ONLY — this is what `runtime.ts`/`contextSeam.ts`/
137
+ * `index.ts` type their `setUser` as. It is NOT the type of `Spec.setUser`'s
138
+ * bridge parameter below: codegen only honours `?` optionality for
139
+ * `UnsafeObject`-typed params, not named aliases like this one (see the file
140
+ * header's `setUser` D-decision note for the verified codegen output), so
141
+ * the bridge method itself is typed `UnsafeObject` and this shape is
142
+ * re-asserted at the JS boundary instead.
143
+ */
144
+ type EverframeUserSpec = {
145
+ id?: string;
146
+ email?: string;
147
+ displayName?: string;
148
+ };
149
+ interface Spec extends TurboModule {
150
+ configure(opts: ConfigOpts): void;
151
+ /**
152
+ * Synchronous startup entry used by the current JS runtime. The legacy
153
+ * void configure method remains for already-compiled native callers, but
154
+ * React Native dispatches void TurboModule methods asynchronously.
155
+ */
156
+ configureSync(opts: ConfigOpts): boolean;
157
+ /**
158
+ * Opens the native reporter modal (TXReporterPresenter on iOS / Android).
159
+ * Captures screenshot+uiTree+metadata, lets the user annotate/redact/fill
160
+ * out the form, and resolves when they submit or cancel.
161
+ *
162
+ * Resolves with `{ status: 'submitted' | 'queued' | 'cancelled', reportId? }`.
163
+ * Typed `UnsafeObject` at codegen boundary; facade casts to `ReporterResult`.
164
+ */
165
+ openReporter(): Promise<UnsafeObject>;
166
+ registerSensitiveRect(viewTag: number, rect: Rect): void;
167
+ /**
168
+ * Set host-supplied free-form metadata for the next report. Single opaque
169
+ * string — callers JSON.stringify any structured payload themselves. The
170
+ * native side truncates at 2000 chars. Each call REPLACES the previous
171
+ * value. Auto-cleared after the next openReporter() resolves. Pass empty
172
+ * string to detach.
173
+ */
174
+ setExtra(value: string): void;
175
+ /**
176
+ * Extra-resolver presence flag (spec 2026-09-17 setExtra-resolver — RN
177
+ * parity with the resolver form core/web already have). JS calls this
178
+ * from EVERY `setExtra` call: `true` the instant the RESOLVER form
179
+ * registers, `false` the instant the string/object form pushes a plain
180
+ * value (which also supersedes any previously-registered resolver).
181
+ * Carries NO extra CONTENT, only a presence bit — this is not the "push
182
+ * the resolver's value eagerly" mistake the resolver's own doc comment
183
+ * warns against (see `contextSeam.ts`/`runtime.ts`). It exists purely so
184
+ * the native pre-capture wait (`signalExtraResolverReady` below) can be
185
+ * skipped ENTIRELY — no event emitted, no wait, zero added latency — for
186
+ * a string/object-only host, which is the common case and must see no
187
+ * behaviour change from this feature at all.
188
+ */
189
+ setExtraResolverActive(active: boolean): void;
190
+ /**
191
+ * Companion-precedent-shaped ack (mirrors `signalCompanionReportRequestReady`
192
+ * below exactly): called by the JS-side `everframe.extra.resolveRequested`
193
+ * listener once it has — IF a resolver is currently registered — invoked
194
+ * it, budgeted the result exactly like `@everframe/sdk-core`'s
195
+ * `resolveClientExtra`, and pushed it through the existing `setExtra`
196
+ * method above. Releases the native bridge's bounded wait right before
197
+ * `consumePendingAttachments`/`__consumePendingAttachments` drains.
198
+ * Bounded on the native side: if JS never calls back (old JS bundle,
199
+ * frozen thread, or the correlation id simply times out), native
200
+ * proceeds with whatever `extra` was last pushed — fail open, always; a
201
+ * report that never arrives is worse than one with stale `extra`.
202
+ */
203
+ signalExtraResolverReady(correlationId: string): void;
204
+ /**
205
+ * Manual escape hatch (Plan 4 / Task 14): drop a host-supplied marker into
206
+ * the native action-timeline chain. RN apps already inherit ALL native
207
+ * auto-capture (lifecycle/error/console/network-opt-in/tap/nav — Tasks
208
+ * 7-8/11-12) underneath RN; JS-side auto-capture (fetch/react-navigation/
209
+ * touch patches) is an explicit non-goal of this plan. `addBreadcrumb` and
210
+ * `recordScreen` (spec 2026-07-14) are the only JS-initiated crumb paths.
211
+ *
212
+ * Fire-and-forget, positional, fail-soft. NO validation/coercion happens
213
+ * on the bridge — it forwards straight to the platform singleton
214
+ * (`Everframe.shared.addBreadcrumb` on iOS / `Everframe.addBreadcrumb` on
215
+ * Android), which owns ALL coercion (unknown `kind` → `custom`, invalid
216
+ * `level` dropped rather than defaulted, `data` JSON-coerced) and gating
217
+ * (no-op pre-start / while killed). `data` is typed `UnsafeObject` — the
218
+ * documented codegen escape hatch for freeform objects (see file header).
219
+ */
220
+ addBreadcrumb(message: string, kind?: string, level?: string, data?: UnsafeObject): void;
221
+ /**
222
+ * Navigation screen marker (spec 2026-07-14 — the D-decision for this
223
+ * method). Records "this screen is now visible"; the NATIVE side derives
224
+ * the `from → to` transition from its global previous-screen state — the
225
+ * same chain the Activity/ViewController auto-capture feeds — and owns
226
+ * all gating/coercion. Fire-and-forget, positional, fail-soft, exactly
227
+ * like `addBreadcrumb` above. `data` is the codegen `UnsafeObject`
228
+ * freeform-object escape hatch; `from`/`to` win over its keys.
229
+ */
230
+ recordScreen(name: string, data?: UnsafeObject): void;
231
+ /**
232
+ * Crash/error reporting (spec 2026-07-18). SYNCHRONOUS by design (non-void
233
+ * return forces a sync TurboModule method): the fatal path must complete
234
+ * before RN's default fatal handling kills the process. Input is the
235
+ * crash-facts JSON: { exceptionType, message, framesRaw[], mechanism,
236
+ * fatal, occurredAt }. Native builds/redacts/persists the envelope with
237
+ * state it already owns (crumb ring, device metadata, outbox).
238
+ * Returns true when the report was persisted.
239
+ */
240
+ reportCrash(crashJson: string): boolean;
241
+ /** Register a remote player. A token already live is ignored. */
242
+ trackPlayer(token: string, library: string, name?: string, libraryVersion?: string): void;
243
+ /** `handle.detach()` + drop the token. Native emits `player_detach`. */
244
+ detachPlayer(token: string): void;
245
+ /**
246
+ * Forward one phase-4 player event. `t` is REQUIRED — epoch ms stamped by
247
+ * JS when the library fired (bridge delivery is async; same clock as
248
+ * breadcrumbs). `type` is a plain string (codegen cannot express the
249
+ * enum); the native context's `emit` refuses anything outside
250
+ * `VitalsPlayerEventType`. `data` is the `UnsafeObject` escape hatch.
251
+ */
252
+ recordPlayerEvent(token: string, type: string, t: number, data?: UnsafeObject): void;
253
+ /**
254
+ * Refresh the native snapshot cache: `{ bufferAheadMs, bandwidthEstimate?,
255
+ * bitrate?, width?, height?, droppedFrames? }`. `droppedFrames` is
256
+ * CUMULATIVE; native derives the delta. Adapters throttle to ~1/s.
257
+ */
258
+ updatePlayerStats(token: string, stats: UnsafeObject): void;
259
+ /**
260
+ * Custom log line on the session timeline. `dataJson` is a JSON STRING
261
+ * (the `reportCrash` precedent) because a custom entry legitimately carries
262
+ * scalars/arrays that `UnsafeObject` cannot express. Player-scoped when
263
+ * `token` resolves to a live player, else session-scoped.
264
+ */
265
+ trackVitals(name: string, dataJson?: string, token?: string): void;
266
+ /** Explicit handled capture; native enforces handled=true, fatal=false. */
267
+ captureHandledException(crashJson: string): boolean;
268
+ startCompanion(): void;
269
+ stopCompanion(): void;
270
+ /**
271
+ * Companion handshake: called by the JS-side `onReportRequested` listener
272
+ * once it is ready for native capture to proceed. (It used to walk the
273
+ * React fiber tree and attach it via `attachReactTree` first; both are
274
+ * gone — spec 2026-08-29.) Releases the native bridge's bounded wait.
275
+ *
276
+ * Bounded: if JS never calls back, the native side times out after
277
+ * ~250ms and captures anyway.
278
+ */
279
+ signalCompanionReportRequestReady(correlationId: string): void;
280
+ /**
281
+ * RN's `NativeEventEmitter` contract requires `addListener` /
282
+ * `removeListeners` to exist on the underlying native module — RN warns
283
+ * loudly otherwise. Both are intentional no-ops at the spec level: the
284
+ * native event-emitter subscriptions are installed by `startCompanion`.
285
+ */
286
+ addListener(eventName: string): void;
287
+ removeListeners(count: number): void;
288
+ /**
289
+ * Set or clear the active user. Forwards to the native singleton's
290
+ * `setUser`, which owns storage and gating. Call with NO argument to clear
291
+ * (the bridge forbids `T | null`).
292
+ *
293
+ * Typed `UnsafeObject`, NOT `EverframeUserSpec` — a named struct alias like
294
+ * `EverframeUserSpec` always generates as a REQUIRED ObjC reference regardless of
295
+ * its `?`, which would silently break "no argument = clear" (see the file
296
+ * header's D-decision note for the verified codegen output).
297
+ * `EverframeUserSpec` is the richer type the JS facade (`runtime.ts` /
298
+ * `contextSeam.ts` / `index.ts`) casts through at this boundary — same
299
+ * split `addBreadcrumb`'s `data` uses.
300
+ *
301
+ * Unverified by construction: this is a label the app asserts, never a
302
+ * credential. It groups reports in the dashboard and does nothing else.
303
+ */
304
+ setUser(user?: UnsafeObject): void;
305
+ }
306
+ declare const _default: Spec;
307
+
308
+ export { type ConfigOpts, type EverframeUserSpec, type Rect, type Spec, _default as default };
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-XFLFA52R.js";import"./chunk-XUSV3KOD.js";export{a as default};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-XUSV3KOD.js";var pn={},Xn=f((function(n,r,t,e,i){var a=new Worker(pn[r]||(pn[r]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(o){var s=o.data,v=s.$e$;if(v){var h=new Error(v[0]);h.code=v[1],h.stack=v[2],i(h,null)}else i(null,s)},a.postMessage(t,e),a}),"wk"),U=Uint8Array,J=Uint16Array,Zr=Int32Array,xr=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),zr=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ir=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mn=f(function(n,r){for(var t=new J(31),e=0;e<31;++e)t[e]=r+=1<<n[e-1];for(var i=new Zr(t[30]),e=1;e<30;++e)for(var a=t[e];a<t[e+1];++a)i[a]=a-t[e]<<5|e;return{b:t,r:i}},"freb"),Sn=Mn(xr,2),an=Sn.b,Rr=Sn.r;an[28]=258,Rr[258]=28;var Un=Mn(zr,0),Fn=Un.b,kr=Un.r,Br=new J(32768);for(B=0;B<32768;++B)ir=(B&43690)>>1|(B&21845)<<1,ir=(ir&52428)>>2|(ir&13107)<<2,ir=(ir&61680)>>4|(ir&3855)<<4,Br[B]=((ir&65280)>>8|(ir&255)<<8)>>1;var ir,B,k=f((function(n,r,t){for(var e=n.length,i=0,a=new J(r);i<e;++i)n[i]&&++a[n[i]-1];var o=new J(r);for(i=1;i<r;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new J(1<<r);var v=15-r;for(i=0;i<e;++i)if(n[i])for(var h=i<<4|n[i],u=r-n[i],l=o[n[i]-1]++<<u,c=l|(1<<u)-1;l<=c;++l)s[Br[l]>>v]=h}else for(s=new J(e),i=0;i<e;++i)n[i]&&(s[i]=Br[o[n[i]-1]++]>>15-n[i]);return s}),"hMap"),ar=new U(288);for(B=0;B<144;++B)ar[B]=8;var B;for(B=144;B<256;++B)ar[B]=9;var B;for(B=256;B<280;++B)ar[B]=7;var B;for(B=280;B<288;++B)ar[B]=8;var B,wr=new U(32);for(B=0;B<32;++B)wr[B]=5;var B,Dn=k(ar,9,0),Tn=k(ar,9,1),Cn=k(wr,5,0),In=k(wr,5,1),$r=f(function(n){for(var r=n[0],t=1;t<n.length;++t)n[t]>r&&(r=n[t]);return r},"max"),X=f(function(n,r,t){var e=r/8|0;return(n[e]|n[e+1]<<8)>>(r&7)&t},"bits"),Hr=f(function(n,r){var t=r/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(r&7)},"bits16"),Ar=f(function(n){return(n+7)/8|0},"shft"),d=f(function(n,r,t){return(r==null||r<0)&&(r=0),(t==null||t>n.length)&&(t=n.length),new U(n.subarray(r,t))},"slc"),it={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Bn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],p=f(function(n,r,t){var e=new Error(r||Bn[n]);if(e.code=n,Error.captureStackTrace&&Error.captureStackTrace(e,p),!t)throw e;return e},"err"),Er=f(function(n,r,t,e){var i=n.length,a=e?e.length:0;if(!i||r.f&&!r.l)return t||new U(0);var o=!t,s=o||r.i!=2,v=r.i;o&&(t=new U(i*3));var h=f(function(Tr){var Cr=t.length;if(Tr>Cr){var pr=new U(Math.max(Cr*2,Tr));pr.set(t),t=pr}},"cbuf"),u=r.f||0,l=r.p||0,c=r.b||0,S=r.l,x=r.d,M=r.m,g=r.n,z=i*8;do{if(!S){u=X(n,l,1);var F=X(n,l+1,3);if(l+=3,F)if(F==1)S=Tn,x=In,M=9,g=5;else if(F==2){var G=X(n,l,31)+257,D=X(n,l+10,15)+4,m=G+X(n,l+5,31)+1;l+=14;for(var y=new U(m),O=new U(19),C=0;C<D;++C)O[Ir[C]]=X(n,l+C*3,7);l+=D*3;for(var q=$r(O),R=(1<<q)-1,P=k(O,q,1),C=0;C<m;){var H=P[X(n,l,R)];l+=H&15;var A=H>>4;if(A<16)y[C++]=A;else{var E=0,T=0;for(A==16?(T=3+X(n,l,3),l+=2,E=y[C-1]):A==17?(T=3+X(n,l,7),l+=3):A==18&&(T=11+X(n,l,127),l+=7);T--;)y[C++]=E}}var V=y.subarray(0,G),N=y.subarray(G);M=$r(V),g=$r(N),S=k(V,M,1),x=k(N,g,1)}else p(1);else{var A=Ar(l)+4,w=n[A-4]|n[A-3]<<8,Z=A+w;if(Z>i){v&&p(0);break}s&&h(c+w),t.set(n.subarray(A,Z),c),r.b=c+=w,r.p=l=Z*8,r.f=u;continue}if(l>z){v&&p(0);break}}s&&h(c+131072);for(var or=(1<<M)-1,K=(1<<g)-1,_=l;;_=l){var E=S[Hr(n,l)&or],W=E>>4;if(l+=E&15,l>z){v&&p(0);break}if(E||p(2),W<256)t[c++]=W;else if(W==256){_=l,S=null;break}else{var Y=W-254;if(W>264){var C=W-257,$=xr[C];Y=X(n,l,(1<<$)-1)+an[C],l+=$}var nr=x[Hr(n,l)&K],vr=nr>>4;nr||p(3),l+=nr&15;var N=Fn[vr];if(vr>3){var $=zr[vr];N+=Hr(n,l)&(1<<$)-1,l+=$}if(l>z){v&&p(0);break}s&&h(c+131072);var cr=c+Y;if(c<N){var qr=a-N,Lr=Math.min(N,cr);for(qr+c<0&&p(3);c<Lr;++c)t[c]=e[qr+c]}for(;c<cr;++c)t[c]=t[c-N]}}r.l=S,r.p=_,r.b=c,r.f=u,S&&(u=1,r.m=M,r.d=x,r.n=g)}while(!u);return c!=t.length&&o?d(t,0,c):t.subarray(0,c)},"inflt"),tr=f(function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>8},"wbits"),gr=f(function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>8,n[e+2]|=t>>16},"wbits16"),Nr=f(function(n,r){for(var t=[],e=0;e<n.length;++e)n[e]&&t.push({s:e,f:n[e]});var i=t.length,a=t.slice();if(!i)return{t:er,l:0};if(i==1){var o=new U(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(Z,G){return Z.f-G.f}),t.push({s:-1,f:25001});var s=t[0],v=t[1],h=0,u=1,l=2;for(t[0]={s:-1,f:s.f+v.f,l:s,r:v};u!=i-1;)s=t[t[h].f<t[l].f?h++:l++],v=t[h!=u&&t[h].f<t[l].f?h++:l++],t[u++]={s:-1,f:s.f+v.f,l:s,r:v};for(var c=a[0].s,e=1;e<i;++e)a[e].s>c&&(c=a[e].s);var S=new J(c+1),x=Vr(t[u-1],S,0);if(x>r){var e=0,M=0,g=x-r,z=1<<g;for(a.sort(function(G,D){return S[D.s]-S[G.s]||G.f-D.f});e<i;++e){var F=a[e].s;if(S[F]>r)M+=z-(1<<x-S[F]),S[F]=r;else break}for(M>>=g;M>0;){var A=a[e].s;S[A]<r?M-=1<<r-S[A]++-1:++e}for(;e>=0&&M;--e){var w=a[e].s;S[w]==r&&(--S[w],++M)}x=r}return{t:new U(S),l:x}},"hTree"),Vr=f(function(n,r,t){return n.s==-1?Math.max(Vr(n.l,r,t+1),Vr(n.r,r,t+1)):r[n.s]=t},"ln"),dr=f(function(n){for(var r=n.length;r&&!n[--r];);for(var t=new J(++r),e=0,i=n[0],a=1,o=f(function(v){t[e++]=v},"w"),s=1;s<=r;++s)if(n[s]==i&&s!=r)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[s]}return{c:t.subarray(0,e),n:r}},"lc"),yr=f(function(n,r){for(var t=0,e=0;e<r.length;++e)t+=n[e]*r[e];return t},"clen"),jr=f(function(n,r,t){var e=t.length,i=Ar(r+2);n[i]=e&255,n[i+1]=e>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a<e;++a)n[i+a+4]=t[a];return(i+4+e)*8},"wfblk"),br=f(function(n,r,t,e,i,a,o,s,v,h,u){tr(r,u++,t),++i[256];for(var l=Nr(i,15),c=l.t,S=l.l,x=Nr(a,15),M=x.t,g=x.l,z=dr(c),F=z.c,A=z.n,w=dr(M),Z=w.c,G=w.n,D=new J(19),m=0;m<F.length;++m)++D[F[m]&31];for(var m=0;m<Z.length;++m)++D[Z[m]&31];for(var y=Nr(D,7),O=y.t,C=y.l,q=19;q>4&&!O[Ir[q-1]];--q);var R=h+5<<3,P=yr(i,ar)+yr(a,wr)+o,H=yr(i,c)+yr(a,M)+o+14+3*q+yr(D,O)+2*D[16]+3*D[17]+7*D[18];if(v>=0&&R<=P&&R<=H)return jr(r,u,n.subarray(v,v+h));var E,T,V,N;if(tr(r,u,1+(H<P)),u+=2,H<P){E=k(c,S,0),T=c,V=k(M,g,0),N=M;var or=k(O,C,0);tr(r,u,A-257),tr(r,u+5,G-1),tr(r,u+10,q-4),u+=14;for(var m=0;m<q;++m)tr(r,u+3*m,O[Ir[m]]);u+=3*q;for(var K=[F,Z],_=0;_<2;++_)for(var W=K[_],m=0;m<W.length;++m){var Y=W[m]&31;tr(r,u,or[Y]),u+=O[Y],Y>15&&(tr(r,u,W[m]>>5&127),u+=W[m]>>12)}}else E=Dn,T=ar,V=Cn,N=wr;for(var m=0;m<s;++m){var $=e[m];if($>255){var Y=$>>18&31;gr(r,u,E[Y+257]),u+=T[Y+257],Y>7&&(tr(r,u,$>>23&31),u+=xr[Y]);var nr=$&31;gr(r,u,V[nr]),u+=N[nr],nr>3&&(gr(r,u,$>>5&8191),u+=zr[nr])}else gr(r,u,E[$]),u+=T[$]}return gr(r,u,E[256]),u+T[256]},"wblk"),Zn=new Zr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new U(0),En=f(function(n,r,t,e,i,a){var o=a.z||n.length,s=new U(e+o+5*(1+Math.ceil(o/7e3))+i),v=s.subarray(e,s.length-i),h=a.l,u=(a.r||0)&7;if(r){u&&(v[0]=a.r>>3);for(var l=Zn[r-1],c=l>>13,S=l&8191,x=(1<<t)-1,M=a.p||new J(32768),g=a.h||new J(x+1),z=Math.ceil(t/3),F=2*z,A=f(function(Qr){return(n[Qr]^n[Qr+1]<<z^n[Qr+2]<<F)&x},"hsh"),w=new Zr(25e3),Z=new J(288),G=new J(32),D=0,m=0,y=a.i||0,O=0,C=a.w||0,q=0;y+2<o;++y){var R=A(y),P=y&32767,H=g[R];if(M[P]=H,g[R]=P,C<=y){var E=o-y;if((D>7e3||O>24576)&&(E>423||!h)){u=br(n,v,0,w,Z,G,m,O,q,y-q,u),O=D=m=0,q=y;for(var T=0;T<286;++T)Z[T]=0;for(var T=0;T<30;++T)G[T]=0}var V=2,N=0,or=S,K=P-H&32767;if(E>2&&R==A(y-K))for(var _=Math.min(c,E)-1,W=Math.min(32767,y),Y=Math.min(258,E);K<=W&&--or&&P!=H;){if(n[y+V]==n[y+V-K]){for(var $=0;$<Y&&n[y+$]==n[y+$-K];++$);if($>V){if(V=$,N=K,$>_)break;for(var nr=Math.min(K,$-2),vr=0,T=0;T<nr;++T){var cr=y-K+T&32767,qr=M[cr],Lr=cr-qr&32767;Lr>vr&&(vr=Lr,H=cr)}}}P=H,H=M[P],K+=P-H&32767}if(N){w[O++]=268435456|Rr[V]<<18|kr[N];var Tr=Rr[V]&31,Cr=kr[N]&31;m+=xr[Tr]+zr[Cr],++Z[257+Tr],++G[Cr],C=y+V,++D}else w[O++]=n[y],++Z[n[y]]}}for(y=Math.max(y,C);y<o;++y)w[O++]=n[y],++Z[n[y]];u=br(n,v,h,w,Z,G,m,O,q,y-q,u),h||(a.r=u&7|v[u/8|0]<<3,u-=7,a.h=g,a.p=M,a.i=y,a.w=C)}else{for(var y=a.w||0;y<o+h;y+=65535){var pr=y+65535;pr>=o&&(v[u/8|0]=h,pr=o),u=jr(v,u+1,n.subarray(y,pr))}a.i=o}return d(s,0,e+Ar(u)+i)},"dflt"),Gn=(function(){for(var n=new Int32Array(256),r=0;r<256;++r){for(var t=r,e=9;--e;)t=(t&1&&-306674912)^t>>>1;n[r]=t}return n})(),Mr=f(function(){var n=-1;return{p:f(function(r){for(var t=n,e=0;e<r.length;++e)t=Gn[t&255^r[e]]^t>>>8;n=t},"p"),d:f(function(){return~n},"d")}},"crc"),Jr=f(function(){var n=1,r=0;return{p:f(function(t){for(var e=n,i=r,a=t.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=e+=t[o];e=(e&65535)+15*(e>>16),i=(i&65535)+15*(i>>16)}n=e,r=i},"p"),d:f(function(){return n%=65521,r%=65521,(n&255)<<24|(n&65280)<<8|(r&255)<<8|r>>8},"d")}},"adler"),ur=f(function(n,r,t,e,i){if(!i&&(i={l:1},r.dictionary)){var a=r.dictionary.subarray(-32768),o=new U(a.length+n.length);o.set(a),o.set(n,a.length),n=o,i.w=a.length}return En(n,r.level==null?6:r.level,r.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+r.mem,t,e,i)},"dopt"),Gr=f(function(n,r){var t={};for(var e in n)t[e]=n[e];for(var e in r)t[e]=r[e];return t},"mrg"),gn=f(function(n,r,t){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<e.length;++o){var s=e[o],v=a[o];if(typeof s=="function"){r+=";"+v+"=";var h=s.toString();if(s.prototype)if(h.indexOf("[native code]")!=-1){var u=h.indexOf(" ",8)+1;r+=h.slice(u,h.indexOf("(",u))}else{r+=h;for(var l in s.prototype)r+=";"+v+".prototype."+l+"="+s.prototype[l].toString()}else r+=h}else t[v]=s}return r},"wcln"),Pr=[],kn=f(function(n){var r=[];for(var t in n)n[t].buffer&&r.push((n[t]=new n[t].constructor(n[t])).buffer);return r},"cbfs"),On=f(function(n,r,t,e){if(!Pr[t]){for(var i="",a={},o=n.length-1,s=0;s<o;++s)i=gn(n[s],i,a);Pr[t]={c:gn(n[o],i,a),e:a}}var v=Gr({},Pr[t].e);return Xn(Pr[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,v,kn(v),e)},"wrkr"),Sr=f(function(){return[U,J,Zr,xr,zr,Ir,an,Fn,Tn,In,Br,Bn,k,$r,X,Hr,Ar,d,p,Er,Or,fr,on]},"bInflt"),Ur=f(function(){return[U,J,Zr,xr,zr,Ir,Rr,kr,Dn,ar,Cn,wr,Br,Zn,er,k,tr,gr,Nr,Vr,dr,yr,jr,br,Ar,d,En,ur,Kr,fr]},"bDflt"),qn=f(function(){return[sn,hn,I,Mr,Gn]},"gze"),Ln=f(function(){return[fn,Hn]},"guze"),Pn=f(function(){return[un,I,Jr]},"zle"),$n=f(function(){return[ln]},"zule"),fr=f(function(n){return postMessage(n,[n.buffer])},"pbf"),on=f(function(n){return n&&{out:n.size&&new U(n.size),dictionary:n.dictionary}},"gopt"),Fr=f(function(n,r,t,e,i,a){var o=On(t,e,i,function(s,v){o.terminate(),a(s,v)});return o.postMessage([n,r],r.consume?[n.buffer]:[]),function(){o.terminate()}},"cbify"),b=f(function(n){return n.ondata=function(r,t){return postMessage([r,t],[r.buffer])},function(r){r.data[0]?(n.push(r.data[0],r.data[1]),postMessage([r.data[0].length])):n.flush(r.data[1])}},"astrm"),Dr=f(function(n,r,t,e,i,a,o){var s,v=On(n,e,i,function(h,u){h?(v.terminate(),r.ondata.call(r,h)):Array.isArray(u)?u.length==1?(r.queuedSize-=u[0],r.ondrain&&r.ondrain(u[0])):(u[1]&&v.terminate(),r.ondata.call(r,h,u[0],u[1])):o(u)});v.postMessage(t),r.queuedSize=0,r.push=function(h,u){r.ondata||p(5),s&&r.ondata(p(4,0,1),null,!!u),r.queuedSize+=h.length,v.postMessage([h,s=u],h.buffer instanceof ArrayBuffer?[h.buffer]:[])},r.terminate=function(){v.terminate()},a&&(r.flush=function(h){v.postMessage([0,h])})},"astrmify"),j=f(function(n,r){return n[r]|n[r+1]<<8},"b2"),L=f(function(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16|n[r+3]<<24)>>>0},"b4"),Xr=f(function(n,r){return L(n,r)+L(n,r+4)*4294967296},"b8"),I=f(function(n,r,t){for(;t;++r)n[r]=t,t>>>=8},"wbytes"),sn=f(function(n,r){var t=r.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=r.level<2?4:r.level==9?2:0,n[9]=3,r.mtime!=0&&I(n,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){n[3]=8;for(var e=0;e<=t.length;++e)n[e+10]=t.charCodeAt(e)}},"gzh"),fn=f(function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&p(6,"invalid gzip data");var r=n[3],t=10;r&4&&(t+=(n[10]|n[11]<<8)+2);for(var e=(r>>3&1)+(r>>4&1);e>0;e-=!n[t++]);return t+(r&2)},"gzs"),Hn=f(function(n){var r=n.length;return(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0},"gzl"),hn=f(function(n){return 10+(n.filename?n.filename.length+1:0)},"gzhl"),un=f(function(n,r){var t=r.level,e=t==0?0:t<6?1:t==9?3:2;if(n[0]=120,n[1]=e<<6|(r.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,r.dictionary){var i=Jr();i.p(r.dictionary),I(n,2,i.d())}},"zlh"),ln=f(function(n,r){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&p(6,"invalid zlib data"),(n[1]>>5&1)==+!r&&p(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2},"zls");function lr(n,r){return typeof n=="function"&&(r=n,n={}),this.ondata=r,n}f(lr,"StrmOpt");var rr=(function(){function n(r,t){if(typeof r=="function"&&(t=r,r={}),this.ondata=t,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new U(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return f(n,"Deflate"),n.prototype.p=function(r,t){this.ondata(ur(r,this.o,0,0,this.s),t)},n.prototype.push=function(r,t){this.ondata||p(5),this.s.l&&p(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new U(e&-32768);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;this.b.set(r.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(a),32768),this.s.z=r.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=t&1,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2),t&&(this.s=this.o={},this.b=er)},n.prototype.flush=function(r){if(this.ondata||p(5),this.s.l&&p(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var t=new U(6);t[0]=this.s.r>>3;var e=jr(t,this.s.r,er);this.s.r=0,this.ondata(t.subarray(0,e>>3),!1)}},n})();var dn=(function(){function n(r,t){Dr([Ur,function(){return[b,rr]}],this,lr.call(this,r,t),function(e){var i=new rr(e.data);onmessage=b(i)},6,1)}return f(n,"AsyncDeflate"),n})();function bn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur],function(e){return fr(Kr(e.data[0],e.data[1]))},0,t)}f(bn,"deflate");function Kr(n,r){return ur(n,r||{},0,0)}f(Kr,"deflateSync");var Q=(function(){function n(r,t){typeof r=="function"&&(t=r,r={}),this.ondata=t;var e=r&&r.dictionary&&r.dictionary.subarray(-32768);this.s={i:0,b:e?e.length:0},this.o=new U(32768),this.p=new U(0),e&&this.o.set(e)}return f(n,"Inflate"),n.prototype.e=function(r){if(this.ondata||p(5),this.d&&p(4),!this.p.length)this.p=r;else if(r.length){var t=new U(this.p.length+r.length);t.set(this.p),t.set(r,this.p.length),this.p=t}},n.prototype.c=function(r){this.s.i=+(this.d=r||!1);var t=this.s.b,e=Er(this.p,this.s,this.o);this.ondata(d(e,t,this.s.b),this.d),this.o=d(e,this.s.b-32768),this.s.b=this.o.length,this.p=d(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(r,t){this.e(r),this.c(t)},n})();var Nn=(function(){function n(r,t){Dr([Sr,function(){return[b,Q]}],this,lr.call(this,r,t),function(e){var i=new Q(e.data);onmessage=b(i)},7,0)}return f(n,"AsyncInflate"),n})();function Rn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr],function(e){return fr(Or(e.data[0],on(e.data[1])))},1,t)}f(Rn,"inflate");function Or(n,r){return Er(n,{i:2},r&&r.out,r&&r.dictionary)}f(Or,"inflateSync");var yn=(function(){function n(r,t){this.c=Mr(),this.l=0,this.v=1,rr.call(this,r,t)}return f(n,"Gzip"),n.prototype.push=function(r,t){this.c.p(r),this.l+=r.length,rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){var e=ur(r,this.o,this.v&&hn(this.o),t&&8,this.s);this.v&&(sn(e,this.o),this.v=0),t&&(I(e,e.length-8,this.c.d()),I(e,e.length-4,this.l)),this.ondata(e,t)},n.prototype.flush=function(r){rr.prototype.flush.call(this,r)},n})();var at=(function(){function n(r,t){Dr([Ur,qn,function(){return[b,rr,yn]}],this,lr.call(this,r,t),function(e){var i=new yn(e.data);onmessage=b(i)},8,1)}return f(n,"AsyncGzip"),n})();function ot(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur,qn,function(){return[wn]}],function(e){return fr(wn(e.data[0],e.data[1]))},2,t)}f(ot,"gzip");function wn(n,r){r||(r={});var t=Mr(),e=n.length;t.p(n);var i=ur(n,r,hn(r),8),a=i.length;return sn(i,r),I(i,a-8,t.d()),I(i,a-4,e),i}f(wn,"gzipSync");var _r=(function(){function n(r,t){this.v=1,this.r=0,Q.call(this,r,t)}return f(n,"Gunzip"),n.prototype.push=function(r,t){if(Q.prototype.e.call(this,r),this.r+=r.length,this.v){var e=this.p.subarray(this.v-1),i=e.length>3?fn(e):4;if(i>e.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-e.length);this.p=e.subarray(i),this.v=0}Q.prototype.c.call(this,0),this.s.f&&!this.s.l?(this.v=Ar(this.s.p)+9,this.s={i:0},this.o=new U(0),this.push(new U(0),t)):t&&Q.prototype.c.call(this,t)},n})();var _n=(function(){function n(r,t){var e=this;Dr([Sr,Ln,function(){return[b,Q,_r]}],this,lr.call(this,r,t),function(i){var a=new _r(i.data);a.onmember=function(o){return postMessage(o)},onmessage=b(a)},9,0,function(i){return e.onmember&&e.onmember(i)})}return f(n,"AsyncGunzip"),n})();function rt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr,Ln,function(){return[rn]}],function(e){return fr(rn(e.data[0],e.data[1]))},3,t)}f(rt,"gunzip");function rn(n,r){var t=fn(n);return t+8>n.length&&p(6,"invalid gzip data"),Er(n.subarray(t,-8),{i:2},r&&r.out||new U(Hn(n)),r&&r.dictionary)}f(rn,"gunzipSync");var mn=(function(){function n(r,t){this.c=Jr(),this.v=1,rr.call(this,r,t)}return f(n,"Zlib"),n.prototype.push=function(r,t){this.c.p(r),rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){var e=ur(r,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(un(e,this.o),this.v=0),t&&I(e,e.length-4,this.c.d()),this.ondata(e,t)},n.prototype.flush=function(r){rr.prototype.flush.call(this,r)},n})();var st=(function(){function n(r,t){Dr([Ur,Pn,function(){return[b,rr,mn]}],this,lr.call(this,r,t),function(e){var i=new mn(e.data);onmessage=b(i)},10,1)}return f(n,"AsyncZlib"),n})();function ft(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur,Pn,function(){return[xn]}],function(e){return fr(xn(e.data[0],e.data[1]))},4,t)}f(ft,"zlib");function xn(n,r){r||(r={});var t=Jr();t.p(n);var e=ur(n,r,r.dictionary?6:2,4);return un(e,r),I(e,e.length-4,t.d()),e}f(xn,"zlibSync");var nn=(function(){function n(r,t){Q.call(this,r,t),this.v=r&&r.dictionary?2:1}return f(n,"Unzlib"),n.prototype.push=function(r,t){if(Q.prototype.e.call(this,r),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(ln(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&p(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Q.prototype.c.call(this,t)},n})();var nt=(function(){function n(r,t){Dr([Sr,$n,function(){return[b,Q,nn]}],this,lr.call(this,r,t),function(e){var i=new nn(e.data);onmessage=b(i)},11,0)}return f(n,"AsyncUnzlib"),n})();function tt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr,$n,function(){return[tn]}],function(e){return fr(tn(e.data[0],on(e.data[1])))},5,t)}f(tt,"unzlib");function tn(n,r){return Er(n.subarray(ln(n,r&&r.dictionary),-4),{i:2},r&&r.out,r&&r.dictionary)}f(tn,"unzlibSync");var zn=(function(){function n(r,t){this.o=lr.call(this,r,t)||{},this.G=_r,this.I=Q,this.Z=nn}return f(n,"Decompress"),n.prototype.i=function(){var r=this;this.s.ondata=function(t,e){r.ondata(t,e)}},n.prototype.push=function(r,t){if(this.ondata||p(5),this.s)this.s.push(r,t);else{if(this.p&&this.p.length){var e=new U(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length)}else this.p=r;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},n})();var ht=(function(){function n(r,t){zn.call(this,r,t),this.queuedSize=0,this.G=_n,this.I=Nn,this.Z=nt}return f(n,"AsyncDecompress"),n.prototype.i=function(){var r=this;this.s.ondata=function(t,e,i){r.ondata(t,e,i)},this.s.ondrain=function(t){r.queuedSize-=t,r.ondrain&&r.ondrain(t)}},n.prototype.push=function(r,t){this.queuedSize+=r.length,zn.prototype.push.call(this,r,t)},n})();function ut(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),n[0]==31&&n[1]==139&&n[2]==8?rt(n,r,t):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Rn(n,r,t):tt(n,r,t)}f(ut,"decompress");function lt(n,r){return n[0]==31&&n[1]==139&&n[2]==8?rn(n,r):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Or(n,r):tn(n,r)}f(lt,"decompressSync");var vn=f(function(n,r,t,e){for(var i in n){var a=n[i],o=r+i,s=e;Array.isArray(a)&&(s=Gr(e,a[1]),a=a[0]),ArrayBuffer.isView(a)?t[o]=[a,s]:(t[o+="/"]=[new U(0),s],vn(a,o,t,e))}},"fltn"),An=typeof TextEncoder<"u"&&new TextEncoder,en=typeof TextDecoder<"u"&&new TextDecoder,Vn=0;try{en.decode(er,{stream:!0}),Vn=1}catch{}var Wn=f(function(n){for(var r="",t=0;;){var e=n[t++],i=(e>127)+(e>223)+(e>239);if(t+i>n.length)return{s:r,r:d(n,t-1)};i?i==3?(e=((e&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,r+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?r+=String.fromCharCode((e&31)<<6|n[t++]&63):r+=String.fromCharCode((e&15)<<12|(n[t++]&63)<<6|n[t++]&63):r+=String.fromCharCode(e)}},"dutf8"),vt=(function(){function n(r){this.ondata=r,Vn?this.t=new TextDecoder:this.p=er}return f(n,"DecodeUTF8"),n.prototype.push=function(r,t){if(this.ondata||p(5),t=!!t,this.t){this.ondata(this.t.decode(r,{stream:!0}),t),t&&(this.t.decode().length&&p(8),this.t=null);return}this.p||p(4);var e=new U(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length);var i=Wn(e),a=i.s,o=i.r;t?(o.length&&p(8),this.p=null):this.p=o,this.ondata(a,t)},n})();var ct=(function(){function n(r){this.ondata=r}return f(n,"EncodeUTF8"),n.prototype.push=function(r,t){this.ondata||p(5),this.d&&p(4),this.ondata(hr(r),this.d=t||!1)},n})();function hr(n,r){if(r){for(var t=new U(n.length),e=0;e<n.length;++e)t[e]=n.charCodeAt(e);return t}if(An)return An.encode(n);for(var i=n.length,a=new U(n.length+(n.length>>1)),o=0,s=f(function(u){a[o++]=u},"w"),e=0;e<i;++e){if(o+5>a.length){var v=new U(o+8+(i-e<<1));v.set(a),a=v}var h=n.charCodeAt(e);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|h&63)):h>55295&&h<57344?(h=65536+(h&1047552)|n.charCodeAt(++e)&1023,s(240|h>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|h&63)):(s(224|h>>12),s(128|h>>6&63),s(128|h&63))}return d(a,0,o)}f(hr,"strToU8");function Yn(n,r){if(r){for(var t="",e=0;e<n.length;e+=16384)t+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return t}else{if(en)return en.decode(n);var i=Wn(n),a=i.s,t=i.r;return t.length&&p(8),a}}f(Yn,"strFromU8");var jn=f(function(n){return n==1?3:n<6?2:n==9?1:0},"dbf"),Jn=f(function(n,r){return r+30+j(n,r+26)+j(n,r+28)},"slzh"),Kn=f(function(n,r,t){var e=j(n,r+28),i=j(n,r+30),a=Yn(n.subarray(r+46,r+46+e),!(j(n,r+8)&2048)),o=r+46+e,s=Qn(n,o,i,t,L(n,r+20),L(n,r+24),L(n,r+42)),v=s[0],h=s[1],u=s[2];return[j(n,r+10),v,h,a,o+i+j(n,r+32),u]},"zh"),Qn=f(function(n,r,t,e,i,a,o){var s=i==4294967295,v=a==4294967295,h=o==4294967295,u=r+t,l=s+v+h;if(e&&l){for(;r+4<u;r+=4+j(n,r+2))if(j(n,r)==1)return[s?Xr(n,r+4+8*v):i,v?Xr(n,r+4):a,h?Xr(n,r+4+8*(v+s)):o,1];e<2&&p(13)}return[i,a,o,0]},"z64hs"),sr=f(function(n){var r=0;if(n)for(var t in n){var e=n[t].length;e>65535&&p(9),r+=e+4}return r},"exfl"),mr=f(function(n,r,t,e,i,a,o,s){var v=e.length,h=t.extra,u=s&&s.length,l=sr(h);I(n,r,o!=null?33639248:67324752),r+=4,o!=null&&(n[r++]=20,n[r++]=t.os),n[r]=20,r+=2,n[r++]=t.flag<<1|(a<0&&8),n[r++]=i&&8,n[r++]=t.compression&255,n[r++]=t.compression>>8;var c=new Date(t.mtime==null?Date.now():t.mtime),S=c.getFullYear()-1980;if((S<0||S>119)&&p(10),I(n,r,S<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>1),r+=4,a!=-1&&(I(n,r,t.crc),I(n,r+4,a<0?-a-2:a),I(n,r+8,t.size)),I(n,r+12,v),I(n,r+14,l),r+=16,o!=null&&(I(n,r,u),I(n,r+6,t.attrs),I(n,r+10,o),r+=14),n.set(e,r),r+=v,l)for(var x in h){var M=h[x],g=M.length;I(n,r,+x),I(n,r+2,g),n.set(M,r+4),r+=4+g}return u&&(n.set(s,r),r+=u),r},"wzh"),cn=f(function(n,r,t,e,i){I(n,r,101010256),I(n,r+8,t),I(n,r+10,t),I(n,r+12,e),I(n,r+16,i)},"wzf"),Wr=(function(){function n(r){this.filename=r,this.c=Mr(),this.size=0,this.compression=0}return f(n,"ZipPassThrough"),n.prototype.process=function(r,t){this.ondata(null,r,t)},n.prototype.push=function(r,t){this.ondata||p(5),this.c.p(r),this.size+=r.length,t&&(this.crc=this.c.d()),this.process(r,t||!1)},n})();var pt=(function(){function n(r,t){var e=this;t||(t={}),Wr.call(this,r),this.d=new rr(t,function(i,a){e.ondata(null,i,a)}),this.compression=8,this.flag=jn(t.level)}return f(n,"ZipDeflate"),n.prototype.process=function(r,t){try{this.d.push(r,t)}catch(e){this.ondata(e,null,t)}},n.prototype.push=function(r,t){Wr.prototype.push.call(this,r,t)},n})();var gt=(function(){function n(r,t){var e=this;t||(t={}),Wr.call(this,r),this.d=new dn(t,function(i,a,o){e.ondata(i,a,o)}),this.compression=8,this.flag=jn(t.level),this.terminate=this.d.terminate}return f(n,"AsyncZipDeflate"),n.prototype.process=function(r,t){this.d.push(r,t)},n.prototype.push=function(r,t){Wr.prototype.push.call(this,r,t)},n})();var yt=(function(){function n(r){this.ondata=r,this.u=[],this.d=1}return f(n,"Zip"),n.prototype.add=function(r){var t=this;if(this.ondata||p(5),this.d&2)this.ondata(p(4+(this.d&1)*8,0,1),null,!1);else{var e=hr(r.filename),i=e.length,a=r.comment,o=a&&hr(a),s=i!=r.filename.length||o&&a.length!=o.length,v=i+sr(r.extra)+30;i>65535&&this.ondata(p(11,0,1),null,!1);var h=new U(v);mr(h,0,r,e,s,-1);var u=[h],l=f(function(){for(var g=0,z=u;g<z.length;g++){var F=z[g];t.ondata(null,F,!1)}u=[]},"pAll_1"),c=this.d;this.d=0;var S=this.u.length,x=Gr(r,{f:e,u:s,o,t:f(function(){r.terminate&&r.terminate()},"t"),r:f(function(){if(l(),c){var g=t.u[S+1];g?g.r():t.d=1}c=1},"r")}),M=0;r.ondata=function(g,z,F){if(g)t.ondata(g,z,F),t.terminate();else if(M+=z.length,u.push(z),F){var A=new U(16);I(A,0,134695760),I(A,4,r.crc),I(A,8,M),I(A,12,r.size),u.push(A),x.c=M,x.b=v+M+16,x.crc=r.crc,x.size=r.size,c&&x.r(),c=1}else c&&l()},this.u.push(x)}},n.prototype.end=function(){var r=this;if(this.d&2){this.ondata(p(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:f(function(){r.d&1&&(r.u.splice(-1,1),r.e())},"r"),t:f(function(){},"t")}),this.d=3},n.prototype.e=function(){for(var r=0,t=0,e=0,i=0,a=this.u;i<a.length;i++){var o=a[i];e+=46+o.f.length+sr(o.extra)+(o.o?o.o.length:0)}for(var s=new U(e+22),v=0,h=this.u;v<h.length;v++){var o=h[v];mr(s,r,o,o.f,o.u,-o.c-2,t,o.o),r+=46+o.f.length+sr(o.extra)+(o.o?o.o.length:0),t+=o.b}cn(s,r,this.u.length,e,t),this.ondata(null,s,!0),this.d=2},n.prototype.terminate=function(){for(var r=0,t=this.u;r<t.length;r++){var e=t[r];e.t()}this.d=2},n})();function wt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e={};vn(n,"",e,r);var i=Object.keys(e),a=i.length,o=0,s=0,v=a,h=new Array(a),u=[],l=f(function(){for(var g=0;g<u.length;++g)u[g]()},"tAll"),c=f(function(g,z){Yr(function(){t(g,z)})},"cbd");Yr(function(){c=t});var S=f(function(){var g=new U(s+22),z=o,F=s-o;s=0;for(var A=0;A<v;++A){var w=h[A];try{var Z=w.c.length;mr(g,s,w,w.f,w.u,Z);var G=30+w.f.length+sr(w.extra),D=s+G;g.set(w.c,D),mr(g,o,w,w.f,w.u,Z,s,w.m),o+=16+G+(w.m?w.m.length:0),s=D+Z}catch(m){return c(m,null)}}cn(g,o,h.length,F,z),c(null,g)},"cbf");a||S();for(var x=f(function(g){var z=i[g],F=e[z],A=F[0],w=F[1],Z=Mr(),G=A.length;Z.p(A);var D=hr(z),m=D.length,y=w.comment,O=y&&hr(y),C=O&&O.length,q=sr(w.extra),R=w.level==0?0:8,P=f(function(H,E){if(H)l(),c(H,null);else{var T=E.length;h[g]=Gr(w,{size:G,crc:Z.d(),c:E,f:D,m:O,u:m!=z.length||O&&y.length!=C,compression:R}),o+=30+m+q+T,s+=76+2*(m+q)+(C||0)+T,--a||S()}},"cbl");if(m>65535&&P(p(11,0,1),null),!R)P(null,A);else if(G<16e4)try{P(null,Kr(A,w))}catch(H){P(H,null)}else u.push(bn(A,w,P))},"_loop_1"),M=0;M<v;++M)x(M);return l}f(wt,"zip");function mt(n,r){r||(r={});var t={},e=[];vn(n,"",t,r);var i=0,a=0;for(var o in t){var s=t[o],v=s[0],h=s[1],u=h.level==0?0:8,l=hr(o),c=l.length,S=h.comment,x=S&&hr(S),M=x&&x.length,g=sr(h.extra);c>65535&&p(11);var z=u?Kr(v,h):v,F=z.length,A=Mr();A.p(v),e.push(Gr(h,{size:v.length,crc:A.d(),c:z,f:l,m:x,u:c!=o.length||x&&S.length!=M,o:i,compression:u})),i+=30+c+g+F,a+=76+2*(c+g)+(M||0)+F}for(var w=new U(a+22),Z=i,G=a-i,D=0;D<e.length;++D){var l=e[D];mr(w,l.o,l,l.f,l.u,l.c.length);var m=30+l.f.length+sr(l.extra);w.set(l.c,l.o+m),mr(w,i,l,l.f,l.u,l.c.length,l.o,l.m),i+=16+m+(l.m?l.m.length:0)}return cn(w,i,e.length,G,Z),w}f(mt,"zipSync");var et=(function(){function n(){}return f(n,"UnzipPassThrough"),n.prototype.push=function(r,t){this.ondata(null,r,t)},n.compression=0,n})();var xt=(function(){function n(){var r=this;this.i=new Q(function(t,e){r.ondata(null,t,e)})}return f(n,"UnzipInflate"),n.prototype.push=function(r,t){try{this.i.push(r,t)}catch(e){this.ondata(e,null,t)}},n.compression=8,n})();var zt=(function(){function n(r,t){var e=this;t<32e4?this.i=new Q(function(i,a){e.ondata(null,i,a)}):(this.i=new Nn(function(i,a,o){e.ondata(i,a,o)}),this.terminate=this.i.terminate)}return f(n,"AsyncUnzipInflate"),n.prototype.push=function(r,t){this.i.terminate&&(r=d(r,0)),this.i.push(r,t)},n.compression=8,n})();var At=(function(){function n(r){this.onfile=r,this.k=[],this.o={0:et},this.p=er}return f(n,"Unzip"),n.prototype.push=function(r,t){var e=this;if(this.onfile||p(5),this.p||p(4),this.c>0){var i=Math.min(this.c,r.length),a=r.subarray(0,i);if(this.c-=i,this.d?this.d.push(a,!this.c):this.k[0].push(a),r=r.subarray(i),r.length)return this.push(r,t)}else{var o=0,s=0,v=void 0,h=void 0;this.p.length?r.length?(h=new U(this.p.length+r.length),h.set(this.p),h.set(r,this.p.length)):h=this.p:h=r;for(var u=h.length,l=this.c,c=l&&this.d,S=f(function(){var z=L(h,s);if(z==67324752){o=1,v=s,x.d=null,x.c=0;var F=j(h,s+6),A=j(h,s+8),w=F&2048,Z=F&8,G=j(h,s+26),D=j(h,s+28);if(u>s+30+G+D){var m=[];x.k.unshift(m),o=2;var y=L(h,s+18),O=L(h,s+22),C=Yn(h.subarray(s+30,s+=30+G),!w),q=Qn(h,s,D,2,y,O,0),R=q[0],P=q[1],H=q[3];Z&&(R=-1-H),s+=D,x.c=R;var E,T={name:C,compression:A,start:f(function(){if(T.ondata||p(5),!R)T.ondata(null,er,!0);else{var V=e.o[A];V||T.ondata(p(14,"unknown compression type "+A,1),null,!1),E=R<0?new V(C):new V(C,R,P),E.ondata=function(_,W,Y){T.ondata(_,W,Y)};for(var N=0,or=m;N<or.length;N++){var K=or[N];E.push(K,!1)}e.k[0]==m&&e.c?e.d=E:E.push(er,!0)}},"start"),terminate:f(function(){E&&E.terminate&&E.terminate()},"terminate")};R>=0&&(T.size=R,T.originalSize=P),x.onfile(T)}return"break"}else if(l){if(z==134695760)return v=s+=12+(l==-2&&8),o=3,x.c=0,"break";if(z==33639248)return v=s-=4,o=3,x.c=0,"break"}},"_loop_2"),x=this;s<u-4;++s){var M=S();if(M==="break")break}if(this.p=er,l<0){var g=o?h.subarray(0,v-12-(l==-2&&8)-(L(h,v-16)==134695760&&4)):h.subarray(0,s);c?c.push(g,!!o):this.k[+(o==2)].push(g)}if(o&2)return this.push(h.subarray(s),t);this.p=h.subarray(s)}t&&(this.c&&p(13),this.p=null)},n.prototype.register=function(r){this.o[r.compression]=r},n})();var Yr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function Mt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e=[],i=f(function(){for(var g=0;g<e.length;++g)e[g]()},"tAll"),a={},o=f(function(g,z){Yr(function(){t(g,z)})},"cbd");Yr(function(){o=t});for(var s=n.length-22;L(n,s)!=101010256;--s)if(!s||n.length-s>65558)return o(p(13,0,1),null),i;var v=j(n,s+8);if(v){var h=v,u=L(n,s+16),l=L(n,s-20)==117853008;if(l){var c=L(n,s-12);l=L(n,c)==101075792,l&&(h=v=L(n,c+32),u=L(n,c+48))}for(var S=r&&r.filter,x=f(function(g){var z=Kn(n,u,l),F=z[0],A=z[1],w=z[2],Z=z[3],G=z[4],D=z[5],m=Jn(n,D);u=G;var y=f(function(C,q){C?(i(),o(C,null)):(q&&(a[Z]=q),--v||o(null,a))},"cbl");if(!S||S({name:Z,size:A,originalSize:w,compression:F}))if(!F)y(null,d(n,m,m+A));else if(F==8){var O=n.subarray(m,m+A);if(w<524288||A>.8*w)try{y(null,Or(O,{out:new U(w)}))}catch(C){y(C,null)}else e.push(Rn(O,{size:w},y))}else y(p(14,"unknown compression type "+F,1),null);else y(null,null)},"_loop_3"),M=0;M<h;++M)x(M)}else o(null,{});return i}f(Mt,"unzip");function St(n,r){for(var t={},e=n.length-22;L(n,e)!=101010256;--e)(!e||n.length-e>65558)&&p(13);var i=j(n,e+8);if(!i)return{};var a=L(n,e+16),o=L(n,e-20)==117853008;if(o){var s=L(n,e-12);o=L(n,s)==101075792,o&&(i=L(n,s+32),a=L(n,s+48))}for(var v=r&&r.filter,h=0;h<i;++h){var u=Kn(n,a,o),l=u[0],c=u[1],S=u[2],x=u[3],M=u[4],g=u[5],z=Jn(n,g);a=M,(!v||v({name:x,size:c,originalSize:S,compression:l}))&&(l?l==8?t[x]=Or(n.subarray(z,z+c),{out:new U(S)}):p(14,"unknown compression type "+l):t[x]=d(n,z,z+c))}return t}f(St,"unzipSync");export{at as AsyncCompress,ht as AsyncDecompress,dn as AsyncDeflate,_n as AsyncGunzip,at as AsyncGzip,Nn as AsyncInflate,zt as AsyncUnzipInflate,nt as AsyncUnzlib,gt as AsyncZipDeflate,st as AsyncZlib,yn as Compress,vt as DecodeUTF8,zn as Decompress,rr as Deflate,ct as EncodeUTF8,it as FlateErrorCode,_r as Gunzip,yn as Gzip,Q as Inflate,At as Unzip,xt as UnzipInflate,et as UnzipPassThrough,nn as Unzlib,yt as Zip,pt as ZipDeflate,Wr as ZipPassThrough,mn as Zlib,ot as compress,wn as compressSync,ut as decompress,lt as decompressSync,bn as deflate,Kr as deflateSync,rt as gunzip,rn as gunzipSync,ot as gzip,wn as gzipSync,Rn as inflate,Or as inflateSync,Yn as strFromU8,hr as strToU8,Mt as unzip,St as unzipSync,tt as unzlib,tn as unzlibSync,wt as zip,mt as zipSync,ft as zlib,xn as zlibSync};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-XFLFA52R.js";import{a}from"./chunk-XUSV3KOD.js";import{useEffect as f,useMemo as y,useRef as p}from"react";var k=0;function d(t){try{t()}catch(e){typeof __DEV__<"u"&&__DEV__&&console.warn("[everframe] vitals bridge call failed",e)}}a(d,"guarded");function l(t){if(t!==void 0)try{let e=JSON.stringify(t);return e===void 0?void 0:e}catch(e){typeof __DEV__<"u"&&__DEV__&&console.warn("[everframe] trackVitals data is not JSON-serialisable; sent without data",e);return}}a(l,"serializeVitalsData");function m(t){let e=`rp${++k}`,r=!1;return d(()=>o.trackPlayer(e,t.library,t.name,t.libraryVersion)),{token:e,get detached(){return r},emit(i,u,n){if(r)return;let c=n??Date.now();d(()=>o.recordPlayerEvent(e,i,c,u))},updateStats(i){r||d(()=>o.updatePlayerStats(e,i))},track(i,u){r||d(()=>o.trackVitals(i,l(u),e))},detach(){r||(r=!0,d(()=>o.detachPlayer(e)))}}}a(m,"trackPlayer");function _(t,e,r){if(r){r.track(t,e);return}d(()=>o.trackVitals(t,l(e),void 0))}a(_,"trackVitals");function b(t){let e=p(null),{library:r,libraryVersion:i,name:u}=t;return f(()=>{let n=m(t);return e.current=n,()=>{n.detach(),e.current===n&&(e.current=null)}},[r,i,u]),y(()=>({get token(){return e.current?.token??""},get detached(){return e.current?.detached??!0},emit:a((n,c,s)=>e.current?.emit(n,c,s),"emit"),updateStats:a(n=>e.current?.updateStats(n),"updateStats"),track:a((n,c)=>e.current?.track(n,c),"track"),detach:a(()=>e.current?.detach(),"detach")}),[])}a(b,"useTrackPlayer");export{m as a,_ as b,b as c};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-XUSV3KOD.js";var n=class extends Error{static{r(this,"EverframeNotMountedError")}name="EverframeNotMountedError";constructor(o){super(o??"EverframeProvider is not mounted; wrap your app root.")}};var t=null;function a(e){t=e}r(a,"__setCurrentContext");function d(){return t}r(d,"__getCurrentContext");function p(){let e=t;return e?e.open():Promise.reject(new n("EverframeProvider not mounted; wrap your root with <EverframeProvider>."))}r(p,"open");function c(e){t?.setExtra(e)}r(c,"setExtra");function v(e){t?.addBreadcrumb(e)}r(v,"addBreadcrumb");function x(e,o){o!==void 0?t?.recordScreen(e,o):t?.recordScreen(e)}r(x,"recordScreen");function m(e){t?.setUser(e)}r(m,"setUser");function f(e,o){t?.captureException(e,o)}r(f,"captureException");export{n as a,a as b,d as c,p as d,c as e,v as f,x as g,m as h,f as i};
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-XUSV3KOD.js";function T(c,a={now:i(()=>Date.now(),"now")}){let m=!1,_,g=!1,o=!1,y=!1,f,S,b,v=-1/0,u=[],r=i((e,n)=>{m||c.emit(e,n,a.now())},"emit"),p=i(()=>{y||(y=!0,r("play"))},"openPlay"),l=i(()=>{y&&(y=!1,r("pause"))},"closePlay"),d=i(()=>{if(f!==void 0){let e=a.now()-f;f=void 0,r("buffer_end",{durationMs:Math.max(0,e)})}},"closeBuffer"),w=i((e,n)=>{let t={};e&&(t.src=e),n?.mime&&(t.mime=n.mime),n?.live!==void 0&&(t.live=n.live),r("source_change",t),n?.keySystem&&r("drm",{keySystem:n.keySystem})},"emitSource");return{loadStart(e,n){d(),l(),S=void 0,b=void 0,o=!1,_=a.now(),g=!0,w(e,n)},seedSource(e,n){w(e,n)},playing(){g&&_!==void 0&&(g=!1,r("startup",{ttffMs:Math.max(0,a.now()-_)})),o=!0,p()},paused(){d(),l()},ended(){d(),l()},bufferingChanged(e){o&&(e?f===void 0&&(f=a.now(),r("buffer_start")):d())},seek(){r("seek")},rateChanged(e){!(e>0)||e===S||(S=e,r("rate_change",{rate:e}))},bitrateChanged(e,n,t){let s={bitrate:e};n!==void 0&&(s.width=n),t!==void 0&&(s.height=t),r("bitrate_change",s)},sizeChanged(e,n){let t=`${e}x${n}`;t===b||!(e>0)||!(n>0)||(b=t,r("quality_change",{width:e,height:n}))},error(e,n,t){if(!t){let h=a.now();for(;u.length>0&&h-u[0]>=6e4;)u.shift();if(u.length>=10)return;u.push(h)}let s={message:e,fatal:t};n!==void 0&&(s.code=n),r("error",s),t&&(d(),l())},stats(e){let n=a.now();n-v<1e3||(v=n,m||c.updateStats(e))},seedPlaying(){g=!1,o=!0,p()},seedStarted(){o=!0},close(){m||(d(),l(),m=!0,c.detach())},wrap:i(e=>(...n)=>{try{e(...n)}catch(t){typeof __DEV__<"u"&&__DEV__&&console.warn("[everframe] player adapter handler failed",t)}},"wrap")}}i(T,"createPlayerTranslator");export{T as a};
@@ -0,0 +1 @@
1
+ import{TurboModuleRegistry as e}from"react-native";var r=e.getEnforcing("Everframe");export{r as a};
@@ -0,0 +1 @@
1
+ var d=Object.defineProperty;var e=(b,a)=>d(b,"name",{value:a,configurable:!0});var f=(b,a)=>{for(var c in a)d(b,c,{get:a[c],enumerable:!0})};export{e as a,f as b};