@genome-spy/app 0.75.0 → 0.77.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 (71) hide show
  1. package/dist/AbortablePromiseCache-beUIcZcW.js +96 -0
  2. package/dist/agentApi-ClsLtELB.js +26994 -0
  3. package/dist/agentApi.es.js +11145 -0
  4. package/dist/agentShared.es.js +4742 -0
  5. package/dist/{blosc-oa0DlI6G.js → blosc-BX4BJ8sR.js} +1 -1
  6. package/dist/blosc-DL1kZHdE.js +692 -0
  7. package/dist/chunk-INHXZS53-Dx2aFznx.js +13 -0
  8. package/dist/componentStyles-CIXoKEp0.js +2182 -0
  9. package/dist/dialog.es.js +377 -0
  10. package/dist/esm-CHVYSGF2.js +1084 -0
  11. package/dist/esm-CZvS2Ldm.js +155 -0
  12. package/dist/esm-C_XrKaCY.js +137 -0
  13. package/dist/{esm-DCCYNvaz.js → esm-CqrZuhTF.js} +50 -50
  14. package/dist/{esm-D-WfYOx7.js → esm-Cz4iCfzF.js} +25 -25
  15. package/dist/esm-D-y0Ce1M.js +573 -0
  16. package/dist/esm-D2-C5ZzN.js +1084 -0
  17. package/dist/esm-DPS6pYKF.js +1248 -0
  18. package/dist/esm-Dfo2M18m.js +461 -0
  19. package/dist/esm-DjF6pKy5.js +369 -0
  20. package/dist/{esm-n0auOe11.js → esm-Q6nrd9vJ.js} +1 -1
  21. package/dist/esm-aOLxLL7A.js +121 -0
  22. package/dist/esm-id9DWBZW.js +137 -0
  23. package/dist/esm-kXhrPIYy.js +1426 -0
  24. package/dist/esm-s_SlArJ8.js +298 -0
  25. package/dist/index.es.js +15272 -37563
  26. package/dist/index.js +1202 -741
  27. package/dist/lit-ymUSmGBw.js +510 -0
  28. package/dist/{lz4-jZ0zyLBa.js → lz4-BSYl80V8.js} +1 -1
  29. package/dist/lz4-Csz5aoFA.js +626 -0
  30. package/dist/parquetRead-m8-8_SpH.js +1609 -0
  31. package/dist/schema.json +489 -85
  32. package/dist/style.css +1 -1
  33. package/dist/viewUtils-3_xHIxmy.js +14292 -0
  34. package/dist/{zstd-C6ksIG9r.js → zstd-BAfRM3IH.js} +1 -1
  35. package/dist/zstd-dJuUp1fl.js +583 -0
  36. package/package.json +30 -5
  37. package/src/agentApi/index.d.ts +147 -0
  38. package/src/agentShared/index.d.ts +97 -0
  39. package/src/agentShared/types.d.ts +8 -0
  40. package/src/appTypes.d.ts +75 -0
  41. package/src/bookmark/databaseSchema.d.ts +33 -0
  42. package/src/charts/boxplotTypes.d.ts +15 -0
  43. package/src/charts/sampleAttributePlotTypes.d.ts +149 -0
  44. package/src/coreSpecAugmentation.d.ts +29 -0
  45. package/src/dialog/index.d.ts +5 -0
  46. package/src/embedTypes.d.ts +9 -0
  47. package/src/index.d.ts +16 -0
  48. package/src/sampleView/sampleViewTypes.d.ts +176 -0
  49. package/src/sampleView/state/payloadTypes.d.ts +484 -0
  50. package/src/sampleView/state/sampleState.d.ts +76 -0
  51. package/src/sampleView/types.d.ts +128 -0
  52. package/src/spec/appSpec.d.ts +54 -0
  53. package/src/spec/sampleView.d.ts +545 -0
  54. package/src/spec/view.d.ts +124 -0
  55. package/src/state/paramProvenanceTypes.d.ts +215 -0
  56. package/src/state/selectionExpansionTypes.d.ts +77 -0
  57. package/src/state.d.ts +97 -0
  58. package/src/types/lz-string.d.ts +24 -0
  59. package/src/types/vega-loader.d.ts +1 -0
  60. package/src/utils/colorScaleSummary.d.ts +15 -0
  61. package/src/utils/statistics/fieldSummary.d.ts +49 -0
  62. package/src/vite-env.d.ts +6 -0
  63. package/dist/browser-Dvlo92rx.js +0 -126
  64. package/dist/esm-Cmo4qEPr.js +0 -1015
  65. /package/dist/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BDH1cqFl.js} +0 -0
  66. /package/dist/{chunk-INHXZS53-fPMmEwMt.js → chunk-INHXZS53-DwEV9sMh.js} +0 -0
  67. /package/dist/{esm-BygJiwh0.js → esm-BL9SNSnj.js} +0 -0
  68. /package/dist/{esm-B8-vSu-c.js → esm-BwW--bVV.js} +0 -0
  69. /package/dist/{esm-CGX-qz1d.js → esm-Bz_92nH0.js} +0 -0
  70. /package/dist/{esm-CuMSzCHy.js → esm-D2_c7lXY.js} +0 -0
  71. /package/dist/{parquetRead-CJe1UPsz.js → parquetRead-C33mgLEo.js} +0 -0
@@ -0,0 +1,215 @@
1
+ import type { Scalar } from "@genome-spy/core/spec/channel.js";
2
+ import type { ChromosomalLocus } from "@genome-spy/core/spec/genome.js";
3
+ import type {
4
+ ParamSelector,
5
+ ViewSelector,
6
+ } from "@genome-spy/core/view/viewUtilTypes.d.ts";
7
+ import type {
8
+ SelectionExpansionPredicate,
9
+ SelectionExpansionRule,
10
+ } from "./selectionExpansionTypes.d.ts";
11
+
12
+ /**
13
+ * Shared type aliases for param provenance payloads.
14
+ *
15
+ * These types describe the bookmarkable selection state that can be replayed
16
+ * and surfaced to the agent.
17
+ */
18
+ export type ParamValueLiteral = {
19
+ /**
20
+ * Literal param value.
21
+ */
22
+ type: "value";
23
+
24
+ /**
25
+ * Stored literal value.
26
+ */
27
+ value: any;
28
+ };
29
+
30
+ export type ParamValueInterval = {
31
+ /**
32
+ * Interval selection value.
33
+ */
34
+ type: "interval";
35
+
36
+ /**
37
+ * Interval endpoints keyed by encoding channel.
38
+ */
39
+ intervals: Partial<
40
+ Record<
41
+ "x" | "y",
42
+ [number, number] | [ChromosomalLocus, ChromosomalLocus] | null
43
+ >
44
+ >;
45
+ };
46
+
47
+ export type ParamValuePoint = {
48
+ /**
49
+ * Point selection value.
50
+ */
51
+ type: "point";
52
+
53
+ /**
54
+ * Fields used to identify selected points.
55
+ */
56
+ keyFields: string[];
57
+
58
+ /**
59
+ * Selected key tuples.
60
+ */
61
+ keys: Scalar[][];
62
+ };
63
+
64
+ /**
65
+ * Origin of a param value derived from a datum or interval lookup.
66
+ */
67
+ export type ParamOrigin = {
68
+ /**
69
+ * Origin type.
70
+ */
71
+ type: "datum";
72
+
73
+ /**
74
+ * View that contributed the value.
75
+ */
76
+ view: ViewSelector;
77
+
78
+ /**
79
+ * Field that supplied the value.
80
+ */
81
+ keyField: string;
82
+
83
+ /**
84
+ * Scalar value captured from the source datum.
85
+ */
86
+ key: Scalar;
87
+
88
+ /**
89
+ * Optional interval sources used for replay and diagnostics.
90
+ */
91
+ intervalSources?: Record<string, { start?: string; end?: string }>;
92
+ };
93
+
94
+ /**
95
+ * Back-reference for point selection expansion.
96
+ */
97
+ export type PointExpandOrigin = {
98
+ /**
99
+ * View that produced the point selection.
100
+ */
101
+ view: ViewSelector;
102
+
103
+ /**
104
+ * Selected tuple captured at expansion time.
105
+ */
106
+ keyTuple: Scalar[];
107
+
108
+ /**
109
+ * Legacy support: older bookmarks may include these.
110
+ * New payloads should omit them.
111
+ */
112
+ keyFields?: string[];
113
+
114
+ /**
115
+ * Legacy datum marker retained for old bookmarks.
116
+ */
117
+ type?: "datum";
118
+ };
119
+
120
+ /**
121
+ * Matcher used to expand a point selection either by rule or predicate.
122
+ */
123
+ export type PointExpandMatcher =
124
+ | { rule: SelectionExpansionRule; predicate?: never }
125
+ | { predicate: SelectionExpansionPredicate; rule?: never };
126
+
127
+ /**
128
+ * Expanded point selection value stored in provenance.
129
+ */
130
+ export type ParamValuePointExpand = {
131
+ /**
132
+ * Expanded point-selection value.
133
+ */
134
+ type: "pointExpand";
135
+
136
+ /**
137
+ * Operation applied to the current selection.
138
+ */
139
+ operation: "replace" | "add" | "remove" | "toggle";
140
+
141
+ /**
142
+ * Optional partitioning fields used during expansion.
143
+ */
144
+ partitionBy?: string[];
145
+
146
+ /**
147
+ * Original point selection that was expanded.
148
+ */
149
+ origin: PointExpandOrigin;
150
+ } & PointExpandMatcher;
151
+
152
+ /**
153
+ * Bookmarkable param value stored in provenance.
154
+ */
155
+ export type ParamValue =
156
+ | ParamValueLiteral
157
+ | ParamValueInterval
158
+ | ParamValuePoint
159
+ | ParamValuePointExpand;
160
+
161
+ /**
162
+ * Payload for creating or updating a reactive selection or parameter value,
163
+ * including point selections, interval selections, and genomic-region
164
+ * selections.
165
+ */
166
+ export interface ParamProvenanceEntry {
167
+ /**
168
+ * Structured selector for the parameter.
169
+ */
170
+ selector: ParamSelector;
171
+
172
+ /**
173
+ * Serialized parameter value.
174
+ */
175
+ value: ParamValue;
176
+
177
+ /**
178
+ * Optional datum origin for replayable values.
179
+ */
180
+ origin?: ParamOrigin;
181
+ }
182
+
183
+ /**
184
+ * Payload for expanding a point selection.
185
+ */
186
+ export type ExpandPointSelectionActionPayload = {
187
+ /**
188
+ * Target param selector.
189
+ */
190
+ selector: ParamSelector;
191
+
192
+ /**
193
+ * Expansion operation.
194
+ */
195
+ operation: "replace" | "add" | "remove" | "toggle";
196
+
197
+ /**
198
+ * Optional partitioning fields for the expansion.
199
+ */
200
+ partitionBy?: string[];
201
+
202
+ /**
203
+ * Back-reference to the point selection origin.
204
+ */
205
+ origin: PointExpandOrigin;
206
+ // TODO(app): Consider optional replay-drift diagnostics here, for example
207
+ // expectedMatchCount/sourceDataFingerprint, if semantic replay warnings are needed.
208
+ } & PointExpandMatcher;
209
+
210
+ /**
211
+ * Param provenance map keyed by selector key.
212
+ */
213
+ export type ParamProvenanceState = {
214
+ entries: Record<string, ParamProvenanceEntry>;
215
+ };
@@ -0,0 +1,77 @@
1
+ import type { Scalar } from "@genome-spy/core/spec/channel.js";
2
+
3
+ export type SelectionLeafValue = Scalar | null;
4
+
5
+ export type SelectionExpansionLeafPredicate =
6
+ | {
7
+ field: string;
8
+ op: "eq";
9
+ value: SelectionLeafValue;
10
+ }
11
+ | {
12
+ field: string;
13
+ op: "eq";
14
+ valueFromField: string;
15
+ }
16
+ | {
17
+ field: string;
18
+ op: "in";
19
+ values: SelectionLeafValue[];
20
+ };
21
+
22
+ export type LogicalAnd = {
23
+ and: SelectionExpansionPredicate[];
24
+ };
25
+
26
+ export type LogicalOr = {
27
+ or: SelectionExpansionPredicate[];
28
+ };
29
+
30
+ export type LogicalNot = {
31
+ not: SelectionExpansionPredicate;
32
+ };
33
+
34
+ export type SelectionExpansionPredicate =
35
+ | SelectionExpansionLeafPredicate
36
+ | LogicalAnd
37
+ | LogicalOr
38
+ | LogicalNot;
39
+
40
+ export type SelectionExpansionRule = {
41
+ kind: "sameFieldValue";
42
+ field: string;
43
+ };
44
+
45
+ export type SelectionExpansionMatcher =
46
+ | SelectionExpansionPredicate
47
+ | SelectionExpansionRule;
48
+
49
+ export type ResolvedSelectionExpansionLeafPredicate =
50
+ | {
51
+ field: string;
52
+ op: "eq";
53
+ value: SelectionLeafValue;
54
+ }
55
+ | {
56
+ field: string;
57
+ op: "in";
58
+ values: SelectionLeafValue[];
59
+ };
60
+
61
+ export type ResolvedLogicalAnd = {
62
+ and: ResolvedSelectionExpansionPredicate[];
63
+ };
64
+
65
+ export type ResolvedLogicalOr = {
66
+ or: ResolvedSelectionExpansionPredicate[];
67
+ };
68
+
69
+ export type ResolvedLogicalNot = {
70
+ not: ResolvedSelectionExpansionPredicate;
71
+ };
72
+
73
+ export type ResolvedSelectionExpansionPredicate =
74
+ | ResolvedSelectionExpansionLeafPredicate
75
+ | ResolvedLogicalAnd
76
+ | ResolvedLogicalOr
77
+ | ResolvedLogicalNot;
package/src/state.d.ts ADDED
@@ -0,0 +1,97 @@
1
+ import { StateWithHistory } from "redux-undo";
2
+ import { SampleHierarchy } from "./sampleView/state/sampleState.js";
3
+ import {
4
+ ParamSelector,
5
+ ViewSelector,
6
+ } from "@genome-spy/core/view/viewUtilTypes.d.ts";
7
+ import { Scalar } from "@genome-spy/core/spec/channel.js";
8
+ import { ChromosomalLocus } from "@genome-spy/core/spec/genome.js";
9
+
10
+ export interface ParamValueLiteral {
11
+ type: "value";
12
+ value: any;
13
+ }
14
+
15
+ export interface ParamValueInterval {
16
+ type: "interval";
17
+ intervals: Partial<
18
+ Record<
19
+ "x" | "y",
20
+ [number, number] | [ChromosomalLocus, ChromosomalLocus] | null
21
+ >
22
+ >;
23
+ }
24
+
25
+ export interface ParamValuePoint {
26
+ type: "point";
27
+ keyFields: string[];
28
+ keys: Scalar[][];
29
+ }
30
+
31
+ export type ParamValue =
32
+ | ParamValueLiteral
33
+ | ParamValueInterval
34
+ | ParamValuePoint;
35
+
36
+ export interface ParamOrigin {
37
+ type: "datum";
38
+ view: ViewSelector;
39
+ keyField: string;
40
+ key: Scalar;
41
+ intervalSources?: Record<string, { start?: string; end?: string }>;
42
+ }
43
+
44
+ export interface ParamProvenanceEntry {
45
+ selector: ParamSelector;
46
+ value: ParamValue;
47
+ origin?: ParamOrigin;
48
+ }
49
+
50
+ export interface ParamProvenanceState {
51
+ entries: Record<string, ParamProvenanceEntry>;
52
+ }
53
+
54
+ export interface ViewSettings {
55
+ /**
56
+ * Visibilities of views keyed by selector keys. The keys are derived from
57
+ * view selectors and may also include legacy view names from old bookmarks.
58
+ */
59
+ visibilities: Record<string, boolean>;
60
+ }
61
+
62
+ export interface ViewVisibilityEntry {
63
+ scope: string[];
64
+ view: string;
65
+ visible: boolean;
66
+ }
67
+
68
+ export type ViewVisibilityWire =
69
+ | ViewVisibilityEntry[]
70
+ | Record<string, boolean>;
71
+
72
+ export interface ViewSettingsPayload {
73
+ visibilities?: ViewVisibilityWire;
74
+ }
75
+
76
+ export interface State {
77
+ viewSettings: ViewSettings;
78
+ /**
79
+ * Tracks async intent status and records provenance indices for rollback.
80
+ */
81
+ intentStatus?: {
82
+ status: "idle" | "running" | "error" | "canceled";
83
+ submissionKind?: "user" | "agent" | "bookmark";
84
+ startIndex?: number;
85
+ lastSuccessfulIndex?: number;
86
+ totalActions?: number;
87
+ currentIndex?: number;
88
+ currentAction?: import("@reduxjs/toolkit").Action;
89
+ failedAction?: import("@reduxjs/toolkit").Action;
90
+ error?: string;
91
+ };
92
+ provenance?: StateWithHistory<{
93
+ sampleView: SampleHierarchy;
94
+ paramProvenance: ParamProvenanceState;
95
+ lastAction: import("@reduxjs/toolkit").Action;
96
+ }>;
97
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Source: https://github.com/pieroxy/lz-string/blob/master/typings/lz-string.d.ts
3
+
4
+ * The original typings didn't resolve for some reason
5
+ */
6
+
7
+ declare module "lz-string" {
8
+ export function compressToBase64(input: string): string;
9
+ export function decompressFromBase64(input: string): string;
10
+
11
+ export function compressToUTF16(input: string): string;
12
+ export function decompressFromUTF16(compressed: string): string;
13
+
14
+ export function compressToUint8Array(uncompressed: string): Uint8Array;
15
+ export function decompressFromUint8Array(compressed: Uint8Array): string;
16
+
17
+ export function compressToEncodedURIComponent(input: string): string;
18
+ export function decompressFromEncodedURIComponent(
19
+ compressed: string
20
+ ): string;
21
+
22
+ export function compress(input: string): string;
23
+ export function decompress(compressed: string): string;
24
+ }
@@ -0,0 +1 @@
1
+ declare module "vega-loader";
@@ -0,0 +1,15 @@
1
+ export interface ConcreteColorScale {
2
+ domain: unknown[];
3
+ range: string[];
4
+ }
5
+
6
+ export declare function getConcreteColorScale(
7
+ scale: unknown
8
+ ): ConcreteColorScale | undefined;
9
+
10
+ export declare function addValueColors<T>(
11
+ items: T[],
12
+ getValue: (item: T) => unknown,
13
+ domain: unknown,
14
+ range: unknown
15
+ ): Array<T & { color?: string }>;
@@ -0,0 +1,49 @@
1
+ export interface QuantitativeFieldSummary {
2
+ nonMissingCount: number;
3
+ missingCount: number;
4
+ min?: number;
5
+ max?: number;
6
+ mean?: number;
7
+ median?: number;
8
+ p05?: number;
9
+ p95?: number;
10
+ q1?: number;
11
+ q3?: number;
12
+ iqr?: number;
13
+ }
14
+
15
+ export interface CategoryCountSummary {
16
+ value: unknown;
17
+ count: number;
18
+ share: number;
19
+ }
20
+
21
+ export interface CategoricalFieldSummary {
22
+ nonMissingCount: number;
23
+ missingCount: number;
24
+ distinctCount: number;
25
+ categories: CategoryCountSummary[];
26
+ truncated: boolean;
27
+ otherCount?: number;
28
+ otherShare?: number;
29
+ }
30
+
31
+ export declare function buildQuantitativeFieldSummary(
32
+ values: unknown[]
33
+ ): QuantitativeFieldSummary;
34
+
35
+ export declare function buildCategoricalFieldSummary(
36
+ values: unknown[]
37
+ ): CategoricalFieldSummary;
38
+
39
+ export declare function buildCategoricalCountsSummary(
40
+ counts: Map<unknown, number>,
41
+ nonMissingCount: number,
42
+ missingCount: number,
43
+ maxCategories?: number
44
+ ): CategoricalFieldSummary;
45
+
46
+ export declare function buildTopCategorySummary(
47
+ counts: Map<unknown, number>,
48
+ nonMissingCount: number
49
+ ): CategoryCountSummary | undefined;
@@ -0,0 +1,6 @@
1
+ /* eslint-disable no-unused-vars */
2
+ /// <reference types="vite/client" />
3
+
4
+ interface ImportMetaEnv {
5
+ readonly VITE_AGENT_BASE_URL?: string;
6
+ }
@@ -1,126 +0,0 @@
1
- import { n as e } from "./chunk-CPXzm0be.js";
2
- //#region ../../node_modules/generic-filehandle2/esm/blobFile.js
3
- var t = class {
4
- constructor(e) {
5
- this.blob = e;
6
- }
7
- async read(e, t = 0) {
8
- if (!e) return new Uint8Array();
9
- let n = t, r = n + e, i = this.blob.slice(n, r);
10
- return i.bytes ? i.bytes() : new Uint8Array(await i.arrayBuffer());
11
- }
12
- async readFile(e) {
13
- let t = typeof e == "string" ? e : e?.encoding;
14
- if (t === "utf8") return this.blob.text();
15
- if (t) throw Error(`unsupported encoding: ${t}`);
16
- return this.blob.bytes ? this.blob.bytes() : new Uint8Array(await this.blob.arrayBuffer());
17
- }
18
- async stat() {
19
- return { size: this.blob.size };
20
- }
21
- async close() {}
22
- };
23
- //#endregion
24
- //#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
25
- function n(e) {
26
- return (typeof e == "object" && e && "message" in e ? e.message : `${e}`).replace(/\.$/, "");
27
- }
28
- var r = class {
29
- constructor(e, t = {}) {
30
- this.baseOverrides = {}, this.url = e;
31
- let n = t.fetch || globalThis.fetch.bind(globalThis);
32
- t.overrides && (this.baseOverrides = t.overrides), this.fetchImplementation = n;
33
- }
34
- async fetch(e, t) {
35
- let r = (t) => Error(`${n(t)} fetching ${e}`, { cause: t }), i;
36
- try {
37
- i = await this.fetchImplementation(e, t);
38
- } catch (n) {
39
- if (`${n}`.includes("Failed to fetch")) {
40
- console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
41
- try {
42
- i = await this.fetchImplementation(e, {
43
- ...t,
44
- cache: "reload"
45
- });
46
- } catch (e) {
47
- throw r(e);
48
- }
49
- } else throw r(n);
50
- }
51
- return i;
52
- }
53
- async read(e, t, n = {}) {
54
- if (e === 0) return new Uint8Array();
55
- let { headers: r = {}, signal: i, overrides: a = {} } = n;
56
- e < Infinity ? r.range = `bytes=${t}-${t + e - 1}` : e === Infinity && t !== 0 && (r.range = `bytes=${t}-`);
57
- let o = await this.fetch(this.url, {
58
- ...this.baseOverrides,
59
- ...a,
60
- headers: {
61
- ...this.baseOverrides.headers,
62
- ...a.headers,
63
- ...r
64
- },
65
- method: "GET",
66
- redirect: "follow",
67
- mode: "cors",
68
- signal: i
69
- });
70
- if (!o.ok) throw Error(`HTTP ${o.status} fetching ${this.url}`);
71
- if (o.status === 200 && t === 0 || o.status === 206) {
72
- let t = o.headers.get("content-range"), n = /\/(\d+)$/.exec(t || "");
73
- n?.[1] && (this._stat = { size: parseInt(n[1], 10) });
74
- let r = o.bytes ? await o.bytes() : new Uint8Array(await o.arrayBuffer());
75
- return r.byteLength <= e ? r : r.subarray(0, e);
76
- }
77
- throw Error(o.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${o.status} fetching ${this.url}`);
78
- }
79
- async readFile(e = {}) {
80
- let t, n;
81
- if (typeof e == "string") t = e, n = {};
82
- else {
83
- t = e.encoding;
84
- let { encoding: r, ...i } = e;
85
- n = i;
86
- }
87
- let { headers: r = {}, signal: i, overrides: a = {} } = n, o = await this.fetch(this.url, {
88
- ...this.baseOverrides,
89
- ...a,
90
- headers: {
91
- ...this.baseOverrides.headers,
92
- ...a.headers,
93
- ...r
94
- },
95
- method: "GET",
96
- redirect: "follow",
97
- mode: "cors",
98
- signal: i
99
- });
100
- if (!o.ok) throw Error(`HTTP ${o.status} fetching ${this.url}`);
101
- if (t === "utf8") return o.text();
102
- if (t) throw Error(`unsupported encoding: ${t}`);
103
- return o.bytes ? o.bytes() : new Uint8Array(await o.arrayBuffer());
104
- }
105
- async stat() {
106
- if (!this._stat && (await this.read(10, 0), !this._stat)) throw Error(`unable to determine size of file at ${this.url}`);
107
- return this._stat;
108
- }
109
- async close() {}
110
- }, i = /* @__PURE__ */ e({
111
- BlobFile: () => t,
112
- LocalFile: () => a,
113
- RemoteFile: () => r
114
- }), a = class {
115
- readFile() {
116
- throw Error("unimplemented");
117
- }
118
- read() {
119
- throw Error("unimplemented");
120
- }
121
- close() {
122
- throw Error("unimplemented");
123
- }
124
- };
125
- //#endregion
126
- export { i as n, r, a as t };