@hintergrund/ui 0.1.12 → 0.1.14
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/{Builder-NIu11kXz.js → Builder-CeAPIdQ9.js} +8504 -8592
- package/dist/admin.js +297 -295
- package/dist/{anthropic-BsoQ0bpx.js → anthropic-BJBSVFAF.js} +2 -2
- package/dist/{azure-openai-responses-BxjJrt7d.js → azure-openai-responses-B13_C2U1.js} +9 -9
- package/dist/builder.js +3 -2
- package/dist/class-D-7kXFKU.js +96 -0
- package/dist/{global-lQxDrO8J.js → global-sT-BxRei.js} +1074 -1133
- package/dist/{google-Bf7vRqiN.js → google-DkGaABDn.js} +22 -22
- package/dist/{google-shared-BzeZwkT7.js → google-shared-DwNDktpf.js} +1 -1
- package/dist/{google-vertex-DYuHOnPk.js → google-vertex-CSDaY4Og.js} +5 -5
- package/dist/{json-parse-Bp36xxKy.js → json-parse-B4gFxgnW.js} +1 -1
- package/dist/login.js +21 -20
- package/dist/{mistral-D37W4xET.js → mistral-CyHo42hq.js} +2 -2
- package/dist/{openai-codex-responses-VfVpBcjM.js → openai-codex-responses-lR1Rk7Qg.js} +13 -13
- package/dist/{openai-completions-CskA3Ikc.js → openai-completions-C82SBiye.js} +11 -11
- package/dist/{openai-responses-Be_cc8Kw.js → openai-responses-oQmN7b31.js} +2 -2
- package/dist/{openai-responses-shared-Bseol-Xr.js → openai-responses-shared-x2D0MKUa.js} +2 -2
- package/dist/props-DkIpnWKa.js +122 -0
- package/dist/setup.js +172 -0
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as cs, w as rn, x as It } from "./Builder-CeAPIdQ9.js";
|
|
2
2
|
import { h as an } from "./headers-u7rXGJ9f.js";
|
|
3
|
-
import { p as Ot, a as on } from "./json-parse-
|
|
3
|
+
import { p as Ot, a as on } from "./json-parse-B4gFxgnW.js";
|
|
4
4
|
import { b as cn, a as ln, s as W, t as un } from "./transform-messages-CkpQp6fJ.js";
|
|
5
5
|
import { h as hn, b as dn, r as fn } from "./github-copilot-headers-DWh_6bE3.js";
|
|
6
6
|
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(r) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { O as
|
|
2
|
-
import {
|
|
1
|
+
import { O as E, a as c, r as p, i as h, b as _ } from "./client-Sh7wNjbG.js";
|
|
2
|
+
import { v as f, y as R, w as y } from "./Builder-CeAPIdQ9.js";
|
|
3
3
|
import { h as g } from "./headers-u7rXGJ9f.js";
|
|
4
|
-
import { p as I, c as v, a as O } from "./openai-responses-shared-
|
|
4
|
+
import { p as I, c as v, a as O } from "./openai-responses-shared-x2D0MKUa.js";
|
|
5
5
|
import { b } from "./transform-messages-CkpQp6fJ.js";
|
|
6
6
|
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(r) {
|
|
7
7
|
return Promise.resolve().then(r);
|
|
8
8
|
} });
|
|
9
|
-
class
|
|
9
|
+
class w extends E {
|
|
10
10
|
/**
|
|
11
11
|
* API Client for interfacing with the Azure OpenAI API.
|
|
12
12
|
*
|
|
@@ -47,7 +47,7 @@ class N extends A {
|
|
|
47
47
|
}), this.apiVersion = "", this.apiVersion = a, this.deploymentName = s;
|
|
48
48
|
}
|
|
49
49
|
async buildRequest(n, e = {}) {
|
|
50
|
-
if (
|
|
50
|
+
if (N.has(n.path) && n.method === "post" && n.body !== void 0) {
|
|
51
51
|
if (!h(n.body))
|
|
52
52
|
throw new Error("Expected request body to be an object");
|
|
53
53
|
const a = this.deploymentName || n.body.model || n.__metadata?.model;
|
|
@@ -59,7 +59,7 @@ class N extends A {
|
|
|
59
59
|
return typeof this._options.apiKey == "string" ? _([{ "api-key": this.apiKey }]) : super.authHeaders(n);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const N = /* @__PURE__ */ new Set([
|
|
63
63
|
"/completions",
|
|
64
64
|
"/chat/completions",
|
|
65
65
|
"/embeddings",
|
|
@@ -115,8 +115,8 @@ const M = (r, n, e) => {
|
|
|
115
115
|
...e?.signal ? { signal: e.signal } : {},
|
|
116
116
|
...e?.timeoutMs !== void 0 ? { timeout: e.timeoutMs } : {},
|
|
117
117
|
...e?.maxRetries !== void 0 ? { maxRetries: e.maxRetries } : {}
|
|
118
|
-
}, { data:
|
|
119
|
-
if (await e?.onResponse?.({ status: d.status, headers: g(d.headers) }, r), a.push({ type: "start", partial: s }), await I(
|
|
118
|
+
}, { data: A, response: d } = await i.responses.create(u, l).withResponse();
|
|
119
|
+
if (await e?.onResponse?.({ status: d.status, headers: g(d.headers) }, r), a.push({ type: "start", partial: s }), await I(A, s, a, r), e?.signal?.aborted)
|
|
120
120
|
throw new Error("Request was aborted");
|
|
121
121
|
if (s.stopReason === "aborted" || s.stopReason === "error")
|
|
122
122
|
throw new Error("An unknown error occurred");
|
|
@@ -170,7 +170,7 @@ function Z(r, n, e) {
|
|
|
170
170
|
const a = { ...r.headers };
|
|
171
171
|
e?.headers && Object.assign(a, e.headers);
|
|
172
172
|
const { baseUrl: t, apiVersion: s } = T(r, e);
|
|
173
|
-
return new
|
|
173
|
+
return new w({
|
|
174
174
|
apiKey: n,
|
|
175
175
|
apiVersion: s,
|
|
176
176
|
dangerouslyAllowBrowser: !0,
|
package/dist/builder.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./global-
|
|
2
|
-
import
|
|
1
|
+
import "./global-sT-BxRei.js";
|
|
2
|
+
import "./props-DkIpnWKa.js";
|
|
3
|
+
import { t as i } from "./Builder-CeAPIdQ9.js";
|
|
3
4
|
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
|
|
4
5
|
return Promise.resolve().then(e);
|
|
5
6
|
} });
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { h as v } from "./global-sT-BxRei.js";
|
|
2
|
+
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(r) {
|
|
3
|
+
return Promise.resolve().then(r);
|
|
4
|
+
} });
|
|
5
|
+
function j(r) {
|
|
6
|
+
var t, i, f = "";
|
|
7
|
+
if (typeof r == "string" || typeof r == "number") f += r;
|
|
8
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
9
|
+
var u = r.length;
|
|
10
|
+
for (t = 0; t < u; t++) r[t] && (i = j(r[t])) && (f && (f += " "), f += i);
|
|
11
|
+
} else for (i in r) r[i] && (f && (f += " "), f += i);
|
|
12
|
+
return f;
|
|
13
|
+
}
|
|
14
|
+
function T() {
|
|
15
|
+
for (var r, t, i = 0, f = "", u = arguments.length; i < u; i++) (r = arguments[i]) && (t = j(r)) && (f && (f += " "), f += t);
|
|
16
|
+
return f;
|
|
17
|
+
}
|
|
18
|
+
function C(r) {
|
|
19
|
+
return typeof r == "object" ? T(r) : r ?? "";
|
|
20
|
+
}
|
|
21
|
+
const h = [...`
|
|
22
|
+
\r\f \v\uFEFF`];
|
|
23
|
+
function L(r, t, i) {
|
|
24
|
+
var f = r == null ? "" : "" + r;
|
|
25
|
+
if (t && (f = f ? f + " " + t : t), i) {
|
|
26
|
+
for (var u of Object.keys(i))
|
|
27
|
+
if (i[u])
|
|
28
|
+
f = f ? f + " " + u : u;
|
|
29
|
+
else if (f.length)
|
|
30
|
+
for (var o = u.length, s = 0; (s = f.indexOf(u, s)) >= 0; ) {
|
|
31
|
+
var g = s + o;
|
|
32
|
+
(s === 0 || h.includes(f[s - 1])) && (g === f.length || h.includes(f[g])) ? f = (s === 0 ? "" : f.substring(0, s)) + f.substring(g + 1) : s = g;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return f === "" ? null : f;
|
|
36
|
+
}
|
|
37
|
+
function A(r, t = !1) {
|
|
38
|
+
var i = t ? " !important;" : ";", f = "";
|
|
39
|
+
for (var u of Object.keys(r)) {
|
|
40
|
+
var o = r[u];
|
|
41
|
+
o != null && o !== "" && (f += " " + u + ": " + o + i);
|
|
42
|
+
}
|
|
43
|
+
return f;
|
|
44
|
+
}
|
|
45
|
+
function a(r) {
|
|
46
|
+
return r[0] !== "-" || r[1] !== "-" ? r.toLowerCase() : r;
|
|
47
|
+
}
|
|
48
|
+
function P(r, t) {
|
|
49
|
+
if (t) {
|
|
50
|
+
var i = "", f, u;
|
|
51
|
+
if (Array.isArray(t) ? (f = t[0], u = t[1]) : f = t, r) {
|
|
52
|
+
r = String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
53
|
+
var o = !1, s = 0, g = !1, b = [];
|
|
54
|
+
f && b.push(...Object.keys(f).map(a)), u && b.push(...Object.keys(u).map(a));
|
|
55
|
+
var c = 0, e = -1;
|
|
56
|
+
const p = r.length;
|
|
57
|
+
for (var l = 0; l < p; l++) {
|
|
58
|
+
var n = r[l];
|
|
59
|
+
if (g ? n === "/" && r[l - 1] === "*" && (g = !1) : o ? o === n && (o = !1) : n === "/" && r[l + 1] === "*" ? g = !0 : n === '"' || n === "'" ? o = n : n === "(" ? s++ : n === ")" && s--, !g && o === !1 && s === 0) {
|
|
60
|
+
if (n === ":" && e === -1)
|
|
61
|
+
e = l;
|
|
62
|
+
else if (n === ";" || l === p - 1) {
|
|
63
|
+
if (e !== -1) {
|
|
64
|
+
var O = a(r.substring(c, e).trim());
|
|
65
|
+
if (!b.includes(O)) {
|
|
66
|
+
n !== ";" && l++;
|
|
67
|
+
var N = r.substring(c, l).trim();
|
|
68
|
+
i += " " + N + ";";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
c = l + 1, e = -1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return f && (i += A(f)), u && (i += A(u, !0)), i = i.trim(), i === "" ? null : i;
|
|
77
|
+
}
|
|
78
|
+
return r == null ? null : String(r);
|
|
79
|
+
}
|
|
80
|
+
function $(r, t, i, f, u, o) {
|
|
81
|
+
var s = r.__className;
|
|
82
|
+
if (v || s !== i || s === void 0) {
|
|
83
|
+
var g = L(i, f, o);
|
|
84
|
+
(!v || g !== r.getAttribute("class")) && (g == null ? r.removeAttribute("class") : t ? r.className = g : r.setAttribute("class", g)), r.__className = i;
|
|
85
|
+
} else if (o && u !== o)
|
|
86
|
+
for (var b in o) {
|
|
87
|
+
var c = !!o[b];
|
|
88
|
+
(u == null || c !== !!u[b]) && r.classList.toggle(b, c);
|
|
89
|
+
}
|
|
90
|
+
return o;
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
C as c,
|
|
94
|
+
$ as s,
|
|
95
|
+
P as t
|
|
96
|
+
};
|