@hintergrund/ui 0.3.4 → 0.3.7
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/BuilderAgentPane-Vj3NCGvZ.js +25916 -0
- package/dist/IntegrationHealth-D1HcBrQn.js +218 -0
- package/dist/admin.js +22766 -28480
- package/dist/anthropic-messages-D8Vp-Ncs.js +3772 -0
- package/dist/azure-openai-responses-DnjyYuiz.js +168 -0
- package/dist/builder.js +27 -22
- package/dist/config.types-DZ5yfeqq.js +20 -0
- package/dist/deferred-tools-nxpq94I4.js +34 -0
- package/dist/diagnostics-x5QOwca_.js +91 -0
- package/dist/error-body-pXgvw5vV.js +68 -0
- package/dist/font-pool/LICENSES.txt +22 -0
- package/dist/font-pool/inter.ttf +0 -0
- package/dist/font-pool/inter.woff2 +0 -0
- package/dist/font-pool/jetbrains-mono.ttf +0 -0
- package/dist/font-pool/jetbrains-mono.woff2 +0 -0
- package/dist/font-pool/lora.ttf +0 -0
- package/dist/font-pool/lora.woff2 +0 -0
- package/dist/font-pool/merriweather.ttf +0 -0
- package/dist/font-pool/merriweather.woff2 +0 -0
- package/dist/font-pool/montserrat.ttf +0 -0
- package/dist/font-pool/montserrat.woff2 +0 -0
- package/dist/font-pool/playfair-display.ttf +0 -0
- package/dist/font-pool/playfair-display.woff2 +0 -0
- package/dist/font-pool/poppins.ttf +0 -0
- package/dist/font-pool/poppins.woff2 +0 -0
- package/dist/font-pool/roboto.ttf +0 -0
- package/dist/font-pool/roboto.woff2 +0 -0
- package/dist/font-pool/space-grotesk.ttf +0 -0
- package/dist/font-pool/space-grotesk.woff2 +0 -0
- package/dist/font-pool/work-sans.ttf +0 -0
- package/dist/font-pool/work-sans.woff2 +0 -0
- package/dist/github-copilot-headers-pRo3v4t7.js +27 -0
- package/dist/global-xsR9gLDa.js +30568 -0
- package/dist/google-generative-ai-BmzNjEvl.js +291 -0
- package/dist/google-shared-CG2Lbh1z.js +8746 -0
- package/dist/google-vertex-Dfla93V_.js +329 -0
- package/dist/hash-BixfZjoG.js +21 -0
- package/dist/headers-CnTiKpOL.js +24 -0
- package/dist/json-parse-CxjAnWaM.js +231 -0
- package/dist/legacy-Zmnk-v81.js +14 -0
- package/dist/login.js +131 -146
- package/dist/mail.js +694 -789
- package/dist/mistral-conversations-DeDb7Gbd.js +558 -0
- package/dist/openai-ClxLHXsh.js +5371 -0
- package/dist/openai-codex-responses-usgOtWUT.js +909 -0
- package/dist/openai-completions-D_nFQy7A.js +730 -0
- package/dist/openai-prompt-cache-Bm8Re6Vv.js +17 -0
- package/dist/openai-responses-BqL3PFsb.js +192 -0
- package/dist/openai-responses-shared-BhQj78KM.js +481 -0
- package/dist/pi-messages-CRx0yqMp.js +268 -0
- package/dist/pi-user-agent-CsXkkH60.js +20 -0
- package/dist/provider-env-Cj6X7Wly.js +35 -0
- package/dist/provider-retry-BGImU1PV.js +68 -0
- package/dist/rolldown-runtime-nTTD767F.js +37 -0
- package/dist/setup.js +391 -418
- package/dist/transform-messages-DvxSeyBQ.js +383 -0
- package/dist/ui.css +2 -1
- package/package.json +5 -5
- package/dist/BuilderAgentPane-CwG29LOX.js +0 -13938
- package/dist/IntegrationHealth-G_4vzV66.js +0 -209
- package/dist/anthropic-messages-BmLfYiwX.js +0 -5605
- package/dist/azure-openai-responses-yf2M6GVe.js +0 -222
- package/dist/client-Cd7yMX39.js +0 -7860
- package/dist/config.types-iZoywORE.js +0 -15
- package/dist/deferred-tools-BZWMWBYN.js +0 -28
- package/dist/error-body-BUPcH4GF.js +0 -71
- package/dist/github-copilot-headers-B1RBGoZi.js +0 -21
- package/dist/global-CTQcFve1.js +0 -36177
- package/dist/google-generative-ai-DkzwUYzL.js +0 -264
- package/dist/google-shared-DTgKMtfJ.js +0 -11710
- package/dist/google-vertex-D2IzqvQM.js +0 -305
- package/dist/hash-DFlR084x.js +0 -14
- package/dist/headers-D4iLzGaS.js +0 -21
- package/dist/json-parse-LZdWp-Nd.js +0 -232
- package/dist/legacy-CckexQcJ.js +0 -5
- package/dist/mistral-conversations-CNfKG0tU.js +0 -513
- package/dist/openai-codex-responses-BLNjExaC.js +0 -947
- package/dist/openai-completions-46IVoF2N.js +0 -741
- package/dist/openai-prompt-cache-BJwqbEDx.js +0 -13
- package/dist/openai-responses-BfHoZFHI.js +0 -184
- package/dist/openai-responses-shared-DOTQAbCj.js +0 -477
- package/dist/pi-messages-fnW87Z4Z.js +0 -251
- package/dist/pi-user-agent-CUqx-qiX.js +0 -13
- package/dist/provider-env-D2VjEV3S.js +0 -26
- package/dist/provider-retry-BsigVlMg.js +0 -67
- package/dist/select-Cke4DYH1.js +0 -78
- package/dist/transform-messages-CsKsy6b4.js +0 -398
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
+
env: {},
|
|
3
|
+
platform: "browser",
|
|
4
|
+
version: "",
|
|
5
|
+
versions: {},
|
|
6
|
+
browser: !0,
|
|
7
|
+
nextTick: function(e) {
|
|
8
|
+
return Promise.resolve().then(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
import { g as e, h as t } from "./BuilderAgentPane-Vj3NCGvZ.js";
|
|
12
|
+
import { i as n } from "./diagnostics-x5QOwca_.js";
|
|
13
|
+
import { t as r } from "./provider-env-Cj6X7Wly.js";
|
|
14
|
+
import { n as i } from "./headers-CnTiKpOL.js";
|
|
15
|
+
import { i as a, p as o } from "./transform-messages-DvxSeyBQ.js";
|
|
16
|
+
import { n as s, t as c } from "./error-body-pXgvw5vV.js";
|
|
17
|
+
import { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./google-shared-CG2Lbh1z.js";
|
|
18
|
+
//#region ../../../../node_modules/.pnpm/@earendil-works+pi-ai@0.84.2_supports-color@10.2.2_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js
|
|
19
|
+
var b = "v1", x = "gcp-vertex-credentials", S = {
|
|
20
|
+
THINKING_LEVEL_UNSPECIFIED: d.THINKING_LEVEL_UNSPECIFIED,
|
|
21
|
+
MINIMAL: d.MINIMAL,
|
|
22
|
+
LOW: d.LOW,
|
|
23
|
+
MEDIUM: d.MEDIUM,
|
|
24
|
+
HIGH: d.HIGH
|
|
25
|
+
}, C = 0, w = (e, r, i) => {
|
|
26
|
+
let a = new n();
|
|
27
|
+
return (async () => {
|
|
28
|
+
let n = {
|
|
29
|
+
role: "assistant",
|
|
30
|
+
content: [],
|
|
31
|
+
api: "google-vertex",
|
|
32
|
+
provider: e.provider,
|
|
33
|
+
model: e.id,
|
|
34
|
+
usage: {
|
|
35
|
+
input: 0,
|
|
36
|
+
output: 0,
|
|
37
|
+
cacheRead: 0,
|
|
38
|
+
cacheWrite: 0,
|
|
39
|
+
totalTokens: 0,
|
|
40
|
+
cost: {
|
|
41
|
+
input: 0,
|
|
42
|
+
output: 0,
|
|
43
|
+
cacheRead: 0,
|
|
44
|
+
cacheWrite: 0,
|
|
45
|
+
total: 0
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
stopReason: "pending",
|
|
49
|
+
timestamp: Date.now()
|
|
50
|
+
};
|
|
51
|
+
try {
|
|
52
|
+
if (i?.fetch && i.fetch !== globalThis.fetch) throw Error("Custom fetch is not supported by the Google Vertex adapter");
|
|
53
|
+
let o = M(i), s = o ? D(e, o, i?.headers) : E(e, P(i), F(i), i?.headers, i?.env), c = I(e, r, i), l = await i?.onPayload?.(c, e);
|
|
54
|
+
l !== void 0 && (c = l);
|
|
55
|
+
let u = await _(() => s.models.generateContentStream(c), i);
|
|
56
|
+
a.push({
|
|
57
|
+
type: "start",
|
|
58
|
+
partial: n
|
|
59
|
+
});
|
|
60
|
+
let d = null, p = n.content, m = () => p.length - 1;
|
|
61
|
+
for await (let r of u) {
|
|
62
|
+
n.responseId ||= r.responseId;
|
|
63
|
+
let i = r.candidates?.[0];
|
|
64
|
+
if (i?.content?.parts) for (let e of i.content.parts) {
|
|
65
|
+
if (e.text !== void 0) {
|
|
66
|
+
let t = g(e);
|
|
67
|
+
(!d || t && d.type !== "thinking" || !t && d.type !== "text") && (d && (d.type === "text" ? a.push({
|
|
68
|
+
type: "text_end",
|
|
69
|
+
contentIndex: p.length - 1,
|
|
70
|
+
content: d.text,
|
|
71
|
+
partial: n
|
|
72
|
+
}) : a.push({
|
|
73
|
+
type: "thinking_end",
|
|
74
|
+
contentIndex: m(),
|
|
75
|
+
content: d.thinking,
|
|
76
|
+
partial: n
|
|
77
|
+
})), t ? (d = {
|
|
78
|
+
type: "thinking",
|
|
79
|
+
thinking: "",
|
|
80
|
+
thinkingSignature: void 0
|
|
81
|
+
}, n.content.push(d), a.push({
|
|
82
|
+
type: "thinking_start",
|
|
83
|
+
contentIndex: m(),
|
|
84
|
+
partial: n
|
|
85
|
+
})) : (d = {
|
|
86
|
+
type: "text",
|
|
87
|
+
text: ""
|
|
88
|
+
}, n.content.push(d), a.push({
|
|
89
|
+
type: "text_start",
|
|
90
|
+
contentIndex: m(),
|
|
91
|
+
partial: n
|
|
92
|
+
}))), d.type === "thinking" ? (d.thinking += e.text, d.thinkingSignature = h(d.thinkingSignature, e.thoughtSignature), a.push({
|
|
93
|
+
type: "thinking_delta",
|
|
94
|
+
contentIndex: m(),
|
|
95
|
+
delta: e.text,
|
|
96
|
+
partial: n
|
|
97
|
+
})) : (d.text += e.text, d.textSignature = h(d.textSignature, e.thoughtSignature), a.push({
|
|
98
|
+
type: "text_delta",
|
|
99
|
+
contentIndex: m(),
|
|
100
|
+
delta: e.text,
|
|
101
|
+
partial: n
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
if (e.functionCall) {
|
|
105
|
+
d &&= (d.type === "text" ? a.push({
|
|
106
|
+
type: "text_end",
|
|
107
|
+
contentIndex: m(),
|
|
108
|
+
content: d.text,
|
|
109
|
+
partial: n
|
|
110
|
+
}) : a.push({
|
|
111
|
+
type: "thinking_end",
|
|
112
|
+
contentIndex: m(),
|
|
113
|
+
content: d.thinking,
|
|
114
|
+
partial: n
|
|
115
|
+
}), null);
|
|
116
|
+
let t = e.functionCall.id, r = {
|
|
117
|
+
type: "toolCall",
|
|
118
|
+
id: !t || n.content.some((e) => e.type === "toolCall" && e.id === t) ? `${e.functionCall.name}_${Date.now()}_${++C}` : t,
|
|
119
|
+
name: e.functionCall.name || "",
|
|
120
|
+
arguments: e.functionCall.args ?? {},
|
|
121
|
+
...e.thoughtSignature && { thoughtSignature: e.thoughtSignature }
|
|
122
|
+
};
|
|
123
|
+
n.content.push(r), a.push({
|
|
124
|
+
type: "toolcall_start",
|
|
125
|
+
contentIndex: m(),
|
|
126
|
+
partial: n
|
|
127
|
+
}), a.push({
|
|
128
|
+
type: "toolcall_delta",
|
|
129
|
+
contentIndex: m(),
|
|
130
|
+
delta: JSON.stringify(r.arguments),
|
|
131
|
+
partial: n
|
|
132
|
+
}), a.push({
|
|
133
|
+
type: "toolcall_end",
|
|
134
|
+
contentIndex: m(),
|
|
135
|
+
toolCall: r,
|
|
136
|
+
partial: n
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
i?.finishReason && (n.rawStopReason = i.finishReason, n.stopReason = f(i.finishReason), n.content.some((e) => e.type === "toolCall") && n.stopReason === "stop" && (n.stopReason = "toolUse")), r.usageMetadata && (n.usage = {
|
|
141
|
+
input: (r.usageMetadata.promptTokenCount || 0) - (r.usageMetadata.cachedContentTokenCount || 0),
|
|
142
|
+
output: (r.usageMetadata.candidatesTokenCount || 0) + (r.usageMetadata.thoughtsTokenCount || 0),
|
|
143
|
+
cacheRead: r.usageMetadata.cachedContentTokenCount || 0,
|
|
144
|
+
cacheWrite: 0,
|
|
145
|
+
reasoning: r.usageMetadata.thoughtsTokenCount || 0,
|
|
146
|
+
totalTokens: r.usageMetadata.totalTokenCount || 0,
|
|
147
|
+
cost: {
|
|
148
|
+
input: 0,
|
|
149
|
+
output: 0,
|
|
150
|
+
cacheRead: 0,
|
|
151
|
+
cacheWrite: 0,
|
|
152
|
+
total: 0
|
|
153
|
+
}
|
|
154
|
+
}, t(e, n.usage));
|
|
155
|
+
}
|
|
156
|
+
if (d && (d.type === "text" ? a.push({
|
|
157
|
+
type: "text_end",
|
|
158
|
+
contentIndex: m(),
|
|
159
|
+
content: d.text,
|
|
160
|
+
partial: n
|
|
161
|
+
}) : a.push({
|
|
162
|
+
type: "thinking_end",
|
|
163
|
+
contentIndex: m(),
|
|
164
|
+
content: d.thinking,
|
|
165
|
+
partial: n
|
|
166
|
+
})), i?.signal?.aborted) throw Error("Request was aborted");
|
|
167
|
+
if (n.stopReason === "pending") throw Error("Google Vertex stream ended without a finish reason");
|
|
168
|
+
if (n.stopReason === "aborted" || n.stopReason === "error") {
|
|
169
|
+
let e = n.rawStopReason ? `Provider stopped with: ${n.rawStopReason}` : "An unknown error occurred";
|
|
170
|
+
throw Error(e);
|
|
171
|
+
}
|
|
172
|
+
a.push({
|
|
173
|
+
type: "done",
|
|
174
|
+
reason: n.stopReason,
|
|
175
|
+
message: n
|
|
176
|
+
}), a.end();
|
|
177
|
+
} catch (e) {
|
|
178
|
+
for (let e of n.content) "index" in e && delete e.index;
|
|
179
|
+
n.stopReason = i?.signal?.aborted ? "aborted" : "error", n.errorMessage = c(s(e)), a.push({
|
|
180
|
+
type: "error",
|
|
181
|
+
reason: n.stopReason,
|
|
182
|
+
error: n
|
|
183
|
+
}), a.end();
|
|
184
|
+
}
|
|
185
|
+
})(), a;
|
|
186
|
+
}, T = (t, n, r) => {
|
|
187
|
+
let i = a(t, n, r, void 0);
|
|
188
|
+
if (!r?.reasoning) return w(t, n, {
|
|
189
|
+
...i,
|
|
190
|
+
thinking: { enabled: !1 }
|
|
191
|
+
});
|
|
192
|
+
let o = e(t, r.reasoning), s = o === "off" ? "high" : o, c = t;
|
|
193
|
+
return L(c) || R(c) ? w(t, n, {
|
|
194
|
+
...i,
|
|
195
|
+
thinking: {
|
|
196
|
+
enabled: !0,
|
|
197
|
+
level: B(s, c)
|
|
198
|
+
}
|
|
199
|
+
}) : w(t, n, {
|
|
200
|
+
...i,
|
|
201
|
+
thinking: {
|
|
202
|
+
enabled: !0,
|
|
203
|
+
budgetTokens: V(c, s, r.thinkingBudgets)
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
function E(e, t, n, r, i) {
|
|
208
|
+
let a = j(i);
|
|
209
|
+
return new p({
|
|
210
|
+
vertexai: !0,
|
|
211
|
+
project: t,
|
|
212
|
+
location: n,
|
|
213
|
+
apiVersion: b,
|
|
214
|
+
...a ? { googleAuthOptions: a } : {},
|
|
215
|
+
httpOptions: O(e, r)
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function D(e, t, n) {
|
|
219
|
+
return new p({
|
|
220
|
+
vertexai: !0,
|
|
221
|
+
apiKey: t,
|
|
222
|
+
apiVersion: b,
|
|
223
|
+
httpOptions: O(e, n)
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function O(e, t) {
|
|
227
|
+
let n = {}, r = k(e.baseUrl);
|
|
228
|
+
r && (n.baseUrl = r, n.baseUrlResourceScope = y.COLLECTION, A(r) && (n.apiVersion = ""));
|
|
229
|
+
let a = i({
|
|
230
|
+
...e.headers,
|
|
231
|
+
...t
|
|
232
|
+
});
|
|
233
|
+
return a && (n.headers = a), Object.keys(n).length > 0 ? n : void 0;
|
|
234
|
+
}
|
|
235
|
+
function k(e) {
|
|
236
|
+
let t = e.trim();
|
|
237
|
+
if (t && !t.includes("{location}")) return t;
|
|
238
|
+
}
|
|
239
|
+
function A(e) {
|
|
240
|
+
try {
|
|
241
|
+
return new URL(e).pathname.split("/").some((e) => /^v\d+(?:beta\d*)?$/.test(e));
|
|
242
|
+
} catch {
|
|
243
|
+
return /(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function j(e) {
|
|
247
|
+
let t = r("GOOGLE_APPLICATION_CREDENTIALS", e);
|
|
248
|
+
return t ? { keyFilename: t } : void 0;
|
|
249
|
+
}
|
|
250
|
+
function M(e) {
|
|
251
|
+
let t = e?.apiKey?.trim();
|
|
252
|
+
if (t && t !== x && !N(t)) return t;
|
|
253
|
+
}
|
|
254
|
+
function N(e) {
|
|
255
|
+
return /^<[^>]+>$/.test(e);
|
|
256
|
+
}
|
|
257
|
+
function P(e) {
|
|
258
|
+
let t = e?.project || r("GOOGLE_CLOUD_PROJECT", e?.env) || r("GCLOUD_PROJECT", e?.env);
|
|
259
|
+
if (!t) throw Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");
|
|
260
|
+
return t;
|
|
261
|
+
}
|
|
262
|
+
function F(e) {
|
|
263
|
+
let t = e?.location || r("GOOGLE_CLOUD_LOCATION", e?.env);
|
|
264
|
+
if (!t) throw Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");
|
|
265
|
+
return t;
|
|
266
|
+
}
|
|
267
|
+
function I(e, t, n = {}) {
|
|
268
|
+
let r = v(e, t), i = {};
|
|
269
|
+
n.temperature !== void 0 && (i.temperature = n.temperature), n.maxTokens !== void 0 && (i.maxOutputTokens = n.maxTokens);
|
|
270
|
+
let a = u(e.id), s = t.tools?.length ? l(t.tools, n.toolChoice, a) : void 0, c = {
|
|
271
|
+
...Object.keys(i).length > 0 && i,
|
|
272
|
+
...t.systemPrompt && { systemInstruction: o(t.systemPrompt) },
|
|
273
|
+
...t.tools && t.tools.length > 0 && { tools: m(t.tools, !1, a) },
|
|
274
|
+
...s !== void 0 && { toolConfig: { functionCallingConfig: { mode: s } } }
|
|
275
|
+
};
|
|
276
|
+
if (n.thinking?.enabled && e.reasoning) {
|
|
277
|
+
let e = { includeThoughts: !0 };
|
|
278
|
+
n.thinking.level === void 0 ? n.thinking.budgetTokens !== void 0 && (e.thinkingBudget = n.thinking.budgetTokens) : e.thinkingLevel = S[n.thinking.level], c.thinkingConfig = e;
|
|
279
|
+
} else e.reasoning && n.thinking && !n.thinking.enabled && (c.thinkingConfig = z(e));
|
|
280
|
+
if (n.signal) {
|
|
281
|
+
if (n.signal.aborted) throw Error("Request aborted");
|
|
282
|
+
c.abortSignal = n.signal;
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
|
+
model: e.id,
|
|
286
|
+
contents: r,
|
|
287
|
+
config: c
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function L(e) {
|
|
291
|
+
return /gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase());
|
|
292
|
+
}
|
|
293
|
+
function R(e) {
|
|
294
|
+
let t = e.id.toLowerCase();
|
|
295
|
+
return /gemini-3(?:\.\d+)?-flash/.test(t) || t === "gemini-flash-latest" || t === "gemini-flash-lite-latest";
|
|
296
|
+
}
|
|
297
|
+
function z(e) {
|
|
298
|
+
let t = e;
|
|
299
|
+
return L(t) ? { thinkingLevel: d.LOW } : R(t) ? { thinkingLevel: d.MINIMAL } : { thinkingBudget: 0 };
|
|
300
|
+
}
|
|
301
|
+
function B(e, t) {
|
|
302
|
+
if (L(t)) switch (e) {
|
|
303
|
+
case "minimal":
|
|
304
|
+
case "low": return "LOW";
|
|
305
|
+
case "medium":
|
|
306
|
+
case "high": return "HIGH";
|
|
307
|
+
}
|
|
308
|
+
switch (e) {
|
|
309
|
+
case "minimal": return "MINIMAL";
|
|
310
|
+
case "low": return "LOW";
|
|
311
|
+
case "medium": return "MEDIUM";
|
|
312
|
+
case "high": return "HIGH";
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function V(e, t, n) {
|
|
316
|
+
return n?.[t] === void 0 ? e.id.includes("2.5-pro") ? {
|
|
317
|
+
minimal: 128,
|
|
318
|
+
low: 2048,
|
|
319
|
+
medium: 8192,
|
|
320
|
+
high: 32768
|
|
321
|
+
}[t] : e.id.includes("2.5-flash") ? {
|
|
322
|
+
minimal: 128,
|
|
323
|
+
low: 2048,
|
|
324
|
+
medium: 8192,
|
|
325
|
+
high: 24576
|
|
326
|
+
}[t] : -1 : n[t];
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
export { w as stream, T as streamSimple };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
+
env: {},
|
|
3
|
+
platform: "browser",
|
|
4
|
+
version: "",
|
|
5
|
+
versions: {},
|
|
6
|
+
browser: !0,
|
|
7
|
+
nextTick: function(e) {
|
|
8
|
+
return Promise.resolve().then(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
//#region ../../../../node_modules/.pnpm/@earendil-works+pi-ai@0.84.2_supports-color@10.2.2_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/utils/hash.js
|
|
12
|
+
function e(e) {
|
|
13
|
+
let t = 3735928559, n = 1103547991;
|
|
14
|
+
for (let r = 0; r < e.length; r++) {
|
|
15
|
+
let i = e.charCodeAt(r);
|
|
16
|
+
t = Math.imul(t ^ i, 2654435761), n = Math.imul(n ^ i, 1597334677);
|
|
17
|
+
}
|
|
18
|
+
return t = Math.imul(t ^ t >>> 16, 2246822507) ^ Math.imul(n ^ n >>> 13, 3266489909), n = Math.imul(n ^ n >>> 16, 2246822507) ^ Math.imul(t ^ t >>> 13, 3266489909), (n >>> 0).toString(36) + (t >>> 0).toString(36);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { e as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
+
env: {},
|
|
3
|
+
platform: "browser",
|
|
4
|
+
version: "",
|
|
5
|
+
versions: {},
|
|
6
|
+
browser: !0,
|
|
7
|
+
nextTick: function(e) {
|
|
8
|
+
return Promise.resolve().then(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
//#region ../../../../node_modules/.pnpm/@earendil-works+pi-ai@0.84.2_supports-color@10.2.2_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/utils/headers.js
|
|
12
|
+
function e(e) {
|
|
13
|
+
let t = {};
|
|
14
|
+
for (let [n, r] of e.entries()) t[n] = r;
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
function t(e) {
|
|
18
|
+
if (!e) return;
|
|
19
|
+
let t = {};
|
|
20
|
+
for (let [n, r] of Object.entries(e)) r !== null && (t[n] = r);
|
|
21
|
+
return Object.keys(t).length > 0 ? t : void 0;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { t as n, e as t };
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
+
env: {},
|
|
3
|
+
platform: "browser",
|
|
4
|
+
version: "",
|
|
5
|
+
versions: {},
|
|
6
|
+
browser: !0,
|
|
7
|
+
nextTick: function(e) {
|
|
8
|
+
return Promise.resolve().then(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
import { t as e } from "./rolldown-runtime-nTTD767F.js";
|
|
12
|
+
//#region ../../../../node_modules/.pnpm/partial-json@0.1.7/node_modules/partial-json/dist/options.js
|
|
13
|
+
var t = /* @__PURE__ */ e(((e) => {
|
|
14
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.Allow = e.ALL = e.COLLECTION = e.ATOM = e.SPECIAL = e.INF = e._INFINITY = e.INFINITY = e.NAN = e.BOOL = e.NULL = e.OBJ = e.ARR = e.NUM = e.STR = void 0, e.STR = 1, e.NUM = 2, e.ARR = 4, e.OBJ = 8, e.NULL = 16, e.BOOL = 32, e.NAN = 64, e.INFINITY = 128, e._INFINITY = 256, e.INF = e.INFINITY | e._INFINITY, e.SPECIAL = e.NULL | e.BOOL | e.INF | e.NAN, e.ATOM = e.STR | e.NUM | e.SPECIAL, e.COLLECTION = e.ARR | e.OBJ, e.ALL = e.ATOM | e.COLLECTION, e.Allow = {
|
|
15
|
+
STR: e.STR,
|
|
16
|
+
NUM: e.NUM,
|
|
17
|
+
ARR: e.ARR,
|
|
18
|
+
OBJ: e.OBJ,
|
|
19
|
+
NULL: e.NULL,
|
|
20
|
+
BOOL: e.BOOL,
|
|
21
|
+
NAN: e.NAN,
|
|
22
|
+
INFINITY: e.INFINITY,
|
|
23
|
+
_INFINITY: e._INFINITY,
|
|
24
|
+
INF: e.INF,
|
|
25
|
+
SPECIAL: e.SPECIAL,
|
|
26
|
+
ATOM: e.ATOM,
|
|
27
|
+
COLLECTION: e.COLLECTION,
|
|
28
|
+
ALL: e.ALL
|
|
29
|
+
}, e.default = e.Allow;
|
|
30
|
+
})), n = (/* @__PURE__ */ e(((e) => {
|
|
31
|
+
var n = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
32
|
+
r === void 0 && (r = n);
|
|
33
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
34
|
+
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
35
|
+
enumerable: !0,
|
|
36
|
+
get: function() {
|
|
37
|
+
return t[n];
|
|
38
|
+
}
|
|
39
|
+
}), Object.defineProperty(e, r, i);
|
|
40
|
+
}) : (function(e, t, n, r) {
|
|
41
|
+
r === void 0 && (r = n), e[r] = t[n];
|
|
42
|
+
})), r = e && e.__exportStar || function(e, t) {
|
|
43
|
+
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(t, r) && n(t, e, r);
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.Allow = e.MalformedJSON = e.PartialJSON = e.parseJSON = e.parse = void 0;
|
|
46
|
+
var i = t();
|
|
47
|
+
Object.defineProperty(e, "Allow", {
|
|
48
|
+
enumerable: !0,
|
|
49
|
+
get: function() {
|
|
50
|
+
return i.Allow;
|
|
51
|
+
}
|
|
52
|
+
}), r(t(), e);
|
|
53
|
+
var a = class extends Error {};
|
|
54
|
+
e.PartialJSON = a;
|
|
55
|
+
var o = class extends Error {};
|
|
56
|
+
e.MalformedJSON = o;
|
|
57
|
+
function s(e, t = i.Allow.ALL) {
|
|
58
|
+
if (typeof e != "string") throw TypeError(`expecting str, got ${typeof e}`);
|
|
59
|
+
if (!e.trim()) throw Error(`${e} is empty`);
|
|
60
|
+
return c(e.trim(), t);
|
|
61
|
+
}
|
|
62
|
+
e.parseJSON = s;
|
|
63
|
+
var c = (e, t) => {
|
|
64
|
+
let n = e.length, r = 0, s = (e) => {
|
|
65
|
+
throw new a(`${e} at position ${r}`);
|
|
66
|
+
}, c = (e) => {
|
|
67
|
+
throw new o(`${e} at position ${r}`);
|
|
68
|
+
}, l = () => (m(), r >= n && s("Unexpected end of input"), e[r] === "\"" ? u() : e[r] === "{" ? d() : e[r] === "[" ? f() : e.substring(r, r + 4) === "null" || i.Allow.NULL & t && n - r < 4 && "null".startsWith(e.substring(r)) ? (r += 4, null) : e.substring(r, r + 4) === "true" || i.Allow.BOOL & t && n - r < 4 && "true".startsWith(e.substring(r)) ? (r += 4, !0) : e.substring(r, r + 5) === "false" || i.Allow.BOOL & t && n - r < 5 && "false".startsWith(e.substring(r)) ? (r += 5, !1) : e.substring(r, r + 8) === "Infinity" || i.Allow.INFINITY & t && n - r < 8 && "Infinity".startsWith(e.substring(r)) ? (r += 8, Infinity) : e.substring(r, r + 9) === "-Infinity" || i.Allow._INFINITY & t && 1 < n - r && n - r < 9 && "-Infinity".startsWith(e.substring(r)) ? (r += 9, -Infinity) : e.substring(r, r + 3) === "NaN" || i.Allow.NAN & t && n - r < 3 && "NaN".startsWith(e.substring(r)) ? (r += 3, NaN) : p()), u = () => {
|
|
69
|
+
let a = r, o = !1;
|
|
70
|
+
for (r++; r < n && (e[r] !== "\"" || o && e[r - 1] === "\\");) o = e[r] === "\\" && !o, r++;
|
|
71
|
+
if (e.charAt(r) == "\"") try {
|
|
72
|
+
return JSON.parse(e.substring(a, ++r - Number(o)));
|
|
73
|
+
} catch (e) {
|
|
74
|
+
c(String(e));
|
|
75
|
+
}
|
|
76
|
+
else if (i.Allow.STR & t) try {
|
|
77
|
+
return JSON.parse(e.substring(a, r - Number(o)) + "\"");
|
|
78
|
+
} catch {
|
|
79
|
+
return JSON.parse(e.substring(a, e.lastIndexOf("\\")) + "\"");
|
|
80
|
+
}
|
|
81
|
+
s("Unterminated string literal");
|
|
82
|
+
}, d = () => {
|
|
83
|
+
r++, m();
|
|
84
|
+
let a = {};
|
|
85
|
+
try {
|
|
86
|
+
for (; e[r] !== "}";) {
|
|
87
|
+
if (m(), r >= n && i.Allow.OBJ & t) return a;
|
|
88
|
+
let o = u();
|
|
89
|
+
m(), r++;
|
|
90
|
+
try {
|
|
91
|
+
a[o] = l();
|
|
92
|
+
} catch (e) {
|
|
93
|
+
if (i.Allow.OBJ & t) return a;
|
|
94
|
+
throw e;
|
|
95
|
+
}
|
|
96
|
+
m(), e[r] === "," && r++;
|
|
97
|
+
}
|
|
98
|
+
} catch {
|
|
99
|
+
if (i.Allow.OBJ & t) return a;
|
|
100
|
+
s("Expected '}' at end of object");
|
|
101
|
+
}
|
|
102
|
+
return r++, a;
|
|
103
|
+
}, f = () => {
|
|
104
|
+
r++;
|
|
105
|
+
let n = [];
|
|
106
|
+
try {
|
|
107
|
+
for (; e[r] !== "]";) n.push(l()), m(), e[r] === "," && r++;
|
|
108
|
+
} catch {
|
|
109
|
+
if (i.Allow.ARR & t) return n;
|
|
110
|
+
s("Expected ']' at end of array");
|
|
111
|
+
}
|
|
112
|
+
return r++, n;
|
|
113
|
+
}, p = () => {
|
|
114
|
+
if (r === 0) {
|
|
115
|
+
e === "-" && c("Not sure what '-' is");
|
|
116
|
+
try {
|
|
117
|
+
return JSON.parse(e);
|
|
118
|
+
} catch (n) {
|
|
119
|
+
if (i.Allow.NUM & t) try {
|
|
120
|
+
return JSON.parse(e.substring(0, e.lastIndexOf("e")));
|
|
121
|
+
} catch {}
|
|
122
|
+
c(String(n));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
let a = r;
|
|
126
|
+
for (e[r] === "-" && r++; e[r] && ",]}".indexOf(e[r]) === -1;) r++;
|
|
127
|
+
r == n && !(i.Allow.NUM & t) && s("Unterminated number literal");
|
|
128
|
+
try {
|
|
129
|
+
return JSON.parse(e.substring(a, r));
|
|
130
|
+
} catch {
|
|
131
|
+
e.substring(a, r) === "-" && s("Not sure what '-' is");
|
|
132
|
+
try {
|
|
133
|
+
return JSON.parse(e.substring(a, e.lastIndexOf("e")));
|
|
134
|
+
} catch (e) {
|
|
135
|
+
c(String(e));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, m = () => {
|
|
139
|
+
for (; r < n && " \n\r ".includes(e[r]);) r++;
|
|
140
|
+
};
|
|
141
|
+
return l();
|
|
142
|
+
};
|
|
143
|
+
e.parse = s;
|
|
144
|
+
})))(), r = /* @__PURE__ */ new Set([
|
|
145
|
+
"\"",
|
|
146
|
+
"\\",
|
|
147
|
+
"/",
|
|
148
|
+
"b",
|
|
149
|
+
"f",
|
|
150
|
+
"n",
|
|
151
|
+
"r",
|
|
152
|
+
"t",
|
|
153
|
+
"u"
|
|
154
|
+
]);
|
|
155
|
+
function i(e) {
|
|
156
|
+
let t = e.codePointAt(0);
|
|
157
|
+
return t !== void 0 && t >= 0 && t <= 31;
|
|
158
|
+
}
|
|
159
|
+
function a(e) {
|
|
160
|
+
switch (e) {
|
|
161
|
+
case "\b": return "\\b";
|
|
162
|
+
case "\f": return "\\f";
|
|
163
|
+
case "\n": return "\\n";
|
|
164
|
+
case "\r": return "\\r";
|
|
165
|
+
case " ": return "\\t";
|
|
166
|
+
default: return `\\u${e.codePointAt(0)?.toString(16).padStart(4, "0") ?? "0000"}`;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function o(e) {
|
|
170
|
+
let t = "", n = !1;
|
|
171
|
+
for (let o = 0; o < e.length; o++) {
|
|
172
|
+
let s = e[o];
|
|
173
|
+
if (!n) {
|
|
174
|
+
t += s, s === "\"" && (n = !0);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (s === "\"") {
|
|
178
|
+
t += s, n = !1;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (s === "\\") {
|
|
182
|
+
let n = e[o + 1];
|
|
183
|
+
if (n === void 0) {
|
|
184
|
+
t += "\\\\";
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (n === "u") {
|
|
188
|
+
let n = e.slice(o + 2, o + 6);
|
|
189
|
+
if (/^[0-9a-fA-F]{4}$/.test(n)) {
|
|
190
|
+
t += `\\u${n}`, o += 5;
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (r.has(n)) {
|
|
195
|
+
t += `\\${n}`, o += 1;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
t += "\\\\";
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
t += i(s) ? a(s) : s;
|
|
202
|
+
}
|
|
203
|
+
return t;
|
|
204
|
+
}
|
|
205
|
+
function s(e) {
|
|
206
|
+
try {
|
|
207
|
+
return JSON.parse(e);
|
|
208
|
+
} catch (t) {
|
|
209
|
+
let n = o(e);
|
|
210
|
+
if (n !== e) return JSON.parse(n);
|
|
211
|
+
throw t;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function c(e) {
|
|
215
|
+
if (!e || e.trim() === "") return {};
|
|
216
|
+
try {
|
|
217
|
+
return s(e);
|
|
218
|
+
} catch {
|
|
219
|
+
try {
|
|
220
|
+
return (0, n.parse)(e) ?? {};
|
|
221
|
+
} catch {
|
|
222
|
+
try {
|
|
223
|
+
return (0, n.parse)(o(e)) ?? {};
|
|
224
|
+
} catch {
|
|
225
|
+
return {};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
export { c as n, s as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
+
env: {},
|
|
3
|
+
platform: "browser",
|
|
4
|
+
version: "",
|
|
5
|
+
versions: {},
|
|
6
|
+
browser: !0,
|
|
7
|
+
nextTick: function(e) {
|
|
8
|
+
return Promise.resolve().then(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
import { Gn as e } from "./global-xsR9gLDa.js";
|
|
12
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.57.0/node_modules/svelte/src/internal/flags/legacy.js
|
|
13
|
+
e();
|
|
14
|
+
//#endregion
|