@gpustack/core-ui 1.0.16 → 1.0.18
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/index.es.js +167 -157
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2140,16 +2140,23 @@ function Oi(e, t) {
|
|
|
2140
2140
|
}));
|
|
2141
2141
|
}
|
|
2142
2142
|
//#endregion
|
|
2143
|
-
//#region src/lib/
|
|
2144
|
-
var ki = (
|
|
2145
|
-
let {
|
|
2143
|
+
//#region src/lib/hooks/useAccess.ts
|
|
2144
|
+
var ki = () => {
|
|
2145
|
+
let { access: e } = a();
|
|
2146
|
+
return e?.useAccess?.() ?? {};
|
|
2147
|
+
}, Ai = (e) => {
|
|
2148
|
+
let { menu: t, trigger: n = ["hover"], placement: r = "bottomRight", children: i, ...a } = e, s = o(), c = ki();
|
|
2146
2149
|
return /* @__PURE__ */ H(dt, {
|
|
2147
2150
|
menu: {
|
|
2148
2151
|
items: R(() => t?.items?.map((e) => ({
|
|
2149
2152
|
...Z.default.omit(e, "locale"),
|
|
2150
2153
|
icon: e.icon ? E.cloneElement(e.icon, { style: { fontSize: 14 } }) : null,
|
|
2151
2154
|
label: e.locale ? s.formatMessage({ id: e.label }) : e.label
|
|
2152
|
-
}))
|
|
2155
|
+
})).filter((e) => e?.access ? c?.[e.access] : !0), [
|
|
2156
|
+
t?.items,
|
|
2157
|
+
s,
|
|
2158
|
+
c
|
|
2159
|
+
]),
|
|
2153
2160
|
onClick: t?.onClick
|
|
2154
2161
|
},
|
|
2155
2162
|
trigger: n,
|
|
@@ -2157,11 +2164,11 @@ var ki = (e) => {
|
|
|
2157
2164
|
...a,
|
|
2158
2165
|
children: i
|
|
2159
2166
|
});
|
|
2160
|
-
},
|
|
2167
|
+
}, ji = [
|
|
2161
2168
|
"image/png",
|
|
2162
2169
|
"image/jpg",
|
|
2163
2170
|
"image/jpeg"
|
|
2164
|
-
],
|
|
2171
|
+
], Mi = ({ handleUpdateImgList: e, multiple: t = !0, drag: n = !1, disabled: r = !1, children: i, icon: a, title: s, accept: c = ji.join(","), size: l = "small", maxSize: u, width: d, height: f, verifySize: p = !1 }) => {
|
|
2165
2172
|
let m = o(), h = z(null), g = N((e) => {
|
|
2166
2173
|
let t = c.split(",").map((e) => e.trim());
|
|
2167
2174
|
return t.includes(e.type) ? u !== void 0 && e.size > u * 1024 ? (Ft.error(m.formatMessage({ id: "common.file.size.limit" }, { size: `${u}KB` })), !1) : !0 : (Ft.error(m.formatMessage({ id: "common.file.format.limit" }, { formats: t.join(", ") })), !1);
|
|
@@ -2223,7 +2230,7 @@ var ki = (e) => {
|
|
|
2223
2230
|
})
|
|
2224
2231
|
})
|
|
2225
2232
|
}) });
|
|
2226
|
-
},
|
|
2233
|
+
}, Ni = Y.div`
|
|
2227
2234
|
position: relative;
|
|
2228
2235
|
.del-btn {
|
|
2229
2236
|
display: none;
|
|
@@ -2239,7 +2246,7 @@ var ki = (e) => {
|
|
|
2239
2246
|
display: flex;
|
|
2240
2247
|
}
|
|
2241
2248
|
}
|
|
2242
|
-
`,
|
|
2249
|
+
`, Pi = (e) => {
|
|
2243
2250
|
let { handleUpdateImgList: t, updateUidCount: n, size: r = "middle", inputProps: i } = e, a = o(), [s, c] = B(!1), [l, u] = B(!1), [d, f] = B(!1), p = (e) => {
|
|
2244
2251
|
f(e), console.log("handleOnOpenChange", e);
|
|
2245
2252
|
}, m = z(null), h = () => {
|
|
@@ -2266,7 +2273,7 @@ var ki = (e) => {
|
|
|
2266
2273
|
ImageURLInput: s ? /* @__PURE__ */ H(J, {
|
|
2267
2274
|
open: l,
|
|
2268
2275
|
title: a.formatMessage({ id: "playground.uploadImage.url.invalid" }),
|
|
2269
|
-
children: /* @__PURE__ */ U(
|
|
2276
|
+
children: /* @__PURE__ */ U(Ni, { children: [/* @__PURE__ */ H(ht, {
|
|
2270
2277
|
...i,
|
|
2271
2278
|
ref: m,
|
|
2272
2279
|
status: l ? "error" : "",
|
|
@@ -2289,11 +2296,11 @@ var ki = (e) => {
|
|
|
2289
2296
|
})] })
|
|
2290
2297
|
}) : null,
|
|
2291
2298
|
dropDownOpen: d,
|
|
2292
|
-
UploadImageButton: /* @__PURE__ */ H(
|
|
2299
|
+
UploadImageButton: /* @__PURE__ */ H(Ai, {
|
|
2293
2300
|
onOpenChange: p,
|
|
2294
2301
|
placement: "topLeft",
|
|
2295
2302
|
menu: { items: [{
|
|
2296
|
-
label: /* @__PURE__ */ U(
|
|
2303
|
+
label: /* @__PURE__ */ U(Mi, {
|
|
2297
2304
|
handleUpdateImgList: t,
|
|
2298
2305
|
size: "middle",
|
|
2299
2306
|
children: [/* @__PURE__ */ H(Xe, { className: "m-r-8" }), a.formatMessage({ id: "playground.img.upload" })]
|
|
@@ -2315,7 +2322,7 @@ var ki = (e) => {
|
|
|
2315
2322
|
})
|
|
2316
2323
|
})
|
|
2317
2324
|
};
|
|
2318
|
-
},
|
|
2325
|
+
}, Fi = () => {
|
|
2319
2326
|
let e = o(), [t, n] = Ft.useMessage();
|
|
2320
2327
|
return {
|
|
2321
2328
|
getRuleMessage: (t, n, r = !0) => {
|
|
@@ -2329,7 +2336,7 @@ var ki = (e) => {
|
|
|
2329
2336
|
};
|
|
2330
2337
|
//#endregion
|
|
2331
2338
|
//#region src/lib/hooks/use-body-scroll.ts
|
|
2332
|
-
function
|
|
2339
|
+
function Ii() {
|
|
2333
2340
|
let e = E.useRef(0), t = E.useRef({}), n = E.useRef(null), r = E.useRef(null), i = E.useRef(null), a = () => {
|
|
2334
2341
|
n.current = window.__GPUSTACK_BODY_SCROLLER__?.elements()?.scrollEventElement, r.current = window.__GPUSTACK_BODY_SCROLLER__;
|
|
2335
2342
|
};
|
|
@@ -2355,14 +2362,14 @@ function Fi() {
|
|
|
2355
2362
|
}
|
|
2356
2363
|
//#endregion
|
|
2357
2364
|
//#region src/lib/hooks/use-chunk-fetch.ts
|
|
2358
|
-
async function
|
|
2365
|
+
async function Li(e) {
|
|
2359
2366
|
try {
|
|
2360
2367
|
return (e.headers.get("content-type") || "").includes("application/json") ? await e.json() : { message: await e.text() || "Unknown error" };
|
|
2361
2368
|
} catch {
|
|
2362
2369
|
return { message: "Failed to parse error response" };
|
|
2363
2370
|
}
|
|
2364
2371
|
}
|
|
2365
|
-
var
|
|
2372
|
+
var Ri = class {
|
|
2366
2373
|
buffer = [];
|
|
2367
2374
|
contentLength = null;
|
|
2368
2375
|
progress = 0;
|
|
@@ -2374,110 +2381,116 @@ var Li = class {
|
|
|
2374
2381
|
totalBytes = 0;
|
|
2375
2382
|
avgSpeed = 0;
|
|
2376
2383
|
callback;
|
|
2377
|
-
encoder = new TextEncoder();
|
|
2378
2384
|
constructor(e) {
|
|
2379
2385
|
this.callback = e.callback, this.contentLength = e.contentLength ? parseInt(e.contentLength, 10) : null;
|
|
2380
2386
|
}
|
|
2381
2387
|
updateProgress(e) {
|
|
2382
|
-
this.contentLength && (this.progress +=
|
|
2388
|
+
this.contentLength && (this.progress += new TextEncoder().encode(e).length, this.percent = Math.floor(this.progress / this.contentLength * 100));
|
|
2383
2389
|
}
|
|
2384
2390
|
logSpeed(e) {
|
|
2385
2391
|
this.speedHistory.push(e), this.speedHistory.length > this.maxHistory && this.speedHistory.shift(), this.avgSpeed = this.speedHistory.reduce((e, t) => e + t, 0) / this.speedHistory.length, console.log(`瞬时均值: ${b(this.avgSpeed)}/s`);
|
|
2386
2392
|
}
|
|
2393
|
+
updateSpeed(e) {
|
|
2394
|
+
let t = performance.now(), n = (t - this.lastTime) / 1e3;
|
|
2395
|
+
if (n > .3) {
|
|
2396
|
+
let r = (this.totalBytes + e - this.lastBytes) / n;
|
|
2397
|
+
this.logSpeed(r), this.lastTime = t, this.lastBytes = this.totalBytes + e;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2387
2400
|
add(e) {
|
|
2388
2401
|
this.buffer.push(e), this.updateProgress(e);
|
|
2389
2402
|
}
|
|
2390
|
-
flush(e) {
|
|
2403
|
+
async flush(e) {
|
|
2391
2404
|
if (this.buffer.length > 0) for (; this.buffer.length > 0;) {
|
|
2392
2405
|
let t = this.buffer.shift(), n = this.buffer.length === 0 && e;
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2406
|
+
await new Promise((e) => {
|
|
2407
|
+
this.callback(t, {
|
|
2408
|
+
isComplete: n || this.percent === 100,
|
|
2409
|
+
percent: this.percent,
|
|
2410
|
+
progress: this.progress,
|
|
2411
|
+
contentLength: this.contentLength
|
|
2412
|
+
}), e();
|
|
2398
2413
|
});
|
|
2399
2414
|
}
|
|
2400
2415
|
}
|
|
2401
2416
|
getBuffer() {
|
|
2402
2417
|
return this.buffer;
|
|
2403
2418
|
}
|
|
2404
|
-
},
|
|
2405
|
-
let { config: e } = a(), { apiBaseUrl: t } = e, n = z(null), r = z({}), i = async (e, t, n = 100) => {
|
|
2406
|
-
let r = e?.body?.getReader(),
|
|
2419
|
+
}, zi = () => {
|
|
2420
|
+
let { config: e } = a(), { apiBaseUrl: t } = e, n = z(null), r = z({}), i = z(null), o = async (e, t, n = 100) => {
|
|
2421
|
+
let r = e?.body?.getReader(), a = new TextDecoder("utf-8"), o = new Ri({
|
|
2407
2422
|
contentLength: e.headers.get("content-length"),
|
|
2408
2423
|
callback: t
|
|
2409
|
-
}),
|
|
2410
|
-
|
|
2411
|
-
|
|
2424
|
+
}), s = (0, Z.throttle)(async () => {
|
|
2425
|
+
await o.flush();
|
|
2426
|
+
}, n);
|
|
2427
|
+
i.current = s;
|
|
2428
|
+
try {
|
|
2429
|
+
for (;;) {
|
|
2430
|
+
let { done: e, value: t } = await r.read();
|
|
2412
2431
|
try {
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2432
|
+
let e = a.decode(t, { stream: !0 });
|
|
2433
|
+
o.add(e), s();
|
|
2434
|
+
} catch {}
|
|
2435
|
+
if (e) {
|
|
2436
|
+
await o.flush(!0), s.cancel(), r.releaseLock();
|
|
2437
|
+
break;
|
|
2416
2438
|
}
|
|
2417
2439
|
}
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
let { done: e, value: t } = await r.read();
|
|
2440
|
+
} finally {
|
|
2441
|
+
s.cancel(), i.current === s && (i.current = null);
|
|
2421
2442
|
try {
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
a.add(e);
|
|
2425
|
-
}
|
|
2426
|
-
await s();
|
|
2427
|
-
} catch (e) {
|
|
2428
|
-
console.error("Error processing chunk:", e);
|
|
2429
|
-
}
|
|
2430
|
-
if (e) {
|
|
2431
|
-
c = !1, await s(), a.flush(e), r.releaseLock();
|
|
2432
|
-
break;
|
|
2433
|
-
}
|
|
2443
|
+
r.releaseLock();
|
|
2444
|
+
} catch {}
|
|
2434
2445
|
}
|
|
2435
|
-
},
|
|
2436
|
-
n.current?.abort?.(), n.current = new AbortController();
|
|
2446
|
+
}, s = async ({ url: e, handler: r, errorHandler: a, watch: s, watchable: c = !0, params: l = {} }) => {
|
|
2447
|
+
n.current?.abort?.(), i.current?.cancel?.(), i.current = null, n.current = new AbortController();
|
|
2437
2448
|
try {
|
|
2438
|
-
let
|
|
2439
|
-
...
|
|
2440
|
-
...
|
|
2449
|
+
let i = await fetch(`${t}${e}?${m.stringify({
|
|
2450
|
+
...l,
|
|
2451
|
+
...c ? { watch: s ?? !0 } : {}
|
|
2441
2452
|
})}`, {
|
|
2442
2453
|
method: "GET",
|
|
2443
2454
|
body: null,
|
|
2444
2455
|
headers: { "Content-Type": "application/octet-stream" },
|
|
2445
2456
|
signal: n.current.signal
|
|
2446
2457
|
});
|
|
2447
|
-
if (!
|
|
2448
|
-
let e = await
|
|
2458
|
+
if (!i.ok) {
|
|
2459
|
+
let e = await Li(i);
|
|
2449
2460
|
a ? a(e) : r(e?.message);
|
|
2450
2461
|
return;
|
|
2451
2462
|
}
|
|
2452
|
-
await i
|
|
2453
|
-
} catch {
|
|
2463
|
+
await o(i, r);
|
|
2464
|
+
} catch (e) {
|
|
2465
|
+
e?.name !== "AbortError" && console.error("Chunk request error:", e);
|
|
2466
|
+
}
|
|
2454
2467
|
return n.current;
|
|
2455
|
-
},
|
|
2468
|
+
}, c = zt((e) => (r.current = { ...e }, s(r.current), n));
|
|
2456
2469
|
return F(() => {
|
|
2457
2470
|
let e = () => {
|
|
2458
|
-
n.current?.abort?.();
|
|
2471
|
+
n.current?.abort?.(), i.current?.cancel?.();
|
|
2459
2472
|
};
|
|
2460
2473
|
return window.addEventListener("beforeunload", e), () => {
|
|
2461
|
-
n.current?.abort?.(), window.removeEventListener("beforeunload", e);
|
|
2474
|
+
n.current?.abort?.(), i.current?.cancel?.(), window.removeEventListener("beforeunload", e);
|
|
2462
2475
|
};
|
|
2463
|
-
}, []), { setChunkFetch:
|
|
2464
|
-
},
|
|
2465
|
-
StatusColorMap: () =>
|
|
2466
|
-
StatusMaps: () =>
|
|
2467
|
-
WatchEventType: () =>
|
|
2468
|
-
breakpoints: () =>
|
|
2469
|
-
}),
|
|
2476
|
+
}, []), { setChunkFetch: c };
|
|
2477
|
+
}, Bi = /* @__PURE__ */ t({
|
|
2478
|
+
StatusColorMap: () => Ui,
|
|
2479
|
+
StatusMaps: () => Wi,
|
|
2480
|
+
WatchEventType: () => Hi,
|
|
2481
|
+
breakpoints: () => Vi
|
|
2482
|
+
}), Vi = {
|
|
2470
2483
|
xs: 0,
|
|
2471
2484
|
sm: 576,
|
|
2472
2485
|
md: 768,
|
|
2473
2486
|
lg: 992,
|
|
2474
2487
|
xl: 1200,
|
|
2475
2488
|
xxl: 1600
|
|
2476
|
-
},
|
|
2489
|
+
}, Hi = {
|
|
2477
2490
|
CREATE: 1,
|
|
2478
2491
|
UPDATE: 2,
|
|
2479
2492
|
DELETE: 3
|
|
2480
|
-
},
|
|
2493
|
+
}, Ui = {
|
|
2481
2494
|
error: {
|
|
2482
2495
|
text: "var(--ant-red-6)",
|
|
2483
2496
|
bg: "var(--ant-red-1)"
|
|
@@ -2499,7 +2512,7 @@ var Li = class {
|
|
|
2499
2512
|
border: "var(--ant-color-border)",
|
|
2500
2513
|
bg: "var(--ant-color-fill)"
|
|
2501
2514
|
}
|
|
2502
|
-
},
|
|
2515
|
+
}, Wi = {
|
|
2503
2516
|
error: "error",
|
|
2504
2517
|
warning: "warning",
|
|
2505
2518
|
transitioning: "transitioning",
|
|
@@ -2512,38 +2525,38 @@ window.__GPUSTACK_WATCH_REQUEST_CLEAR__ = {
|
|
|
2512
2525
|
watchIDValue: 0,
|
|
2513
2526
|
requestList: []
|
|
2514
2527
|
};
|
|
2515
|
-
var
|
|
2528
|
+
var Gi = () => (window.__GPUSTACK_WATCH_REQUEST_CLEAR__.watchIDValue = window.__GPUSTACK_WATCH_REQUEST_CLEAR__.watchIDValue + 1, window.__GPUSTACK_WATCH_REQUEST_CLEAR__.watchIDValue), Ki = (e) => {
|
|
2516
2529
|
window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList.push(e);
|
|
2517
|
-
},
|
|
2530
|
+
}, qi = (e) => {
|
|
2518
2531
|
let t = window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList;
|
|
2519
2532
|
for (let n = 0; n < e; n++) t[n]?.cancel?.();
|
|
2520
2533
|
window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList = t.slice(e);
|
|
2521
|
-
},
|
|
2534
|
+
}, Ji = (e) => {
|
|
2522
2535
|
let t = window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList.filter((t) => t.id !== e);
|
|
2523
2536
|
window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList = t;
|
|
2524
|
-
},
|
|
2537
|
+
}, Yi = () => {
|
|
2525
2538
|
let { CancelToken: e } = w;
|
|
2526
2539
|
return e.source();
|
|
2527
|
-
},
|
|
2540
|
+
}, Xi = (e, t, n) => {
|
|
2528
2541
|
let r = e.slice(n.current);
|
|
2529
2542
|
return n.current = t, r;
|
|
2530
|
-
},
|
|
2543
|
+
}, Zi = () => {
|
|
2531
2544
|
let { services: e } = a(), { request: t } = e, n = window.__GPUSTACK_WATCH_REQUEST_CLEAR__.requestList, [r, i] = B(0), o = z(null), s = z({}), c = z(0), l = z(0), u = z(5), d = {
|
|
2532
2545
|
params: {},
|
|
2533
2546
|
contentType: "json"
|
|
2534
2547
|
}, f = z(null), p = z(0), m = z(null), h = () => {
|
|
2535
2548
|
c.current = 0, l.current = 0, p.current = 0, i(0);
|
|
2536
2549
|
}, g = () => {
|
|
2537
|
-
let { CancelToken: e } = w, t = e.source(), n =
|
|
2550
|
+
let { CancelToken: e } = w, t = e.source(), n = Gi();
|
|
2538
2551
|
return {
|
|
2539
2552
|
id: n,
|
|
2540
2553
|
token: t.token,
|
|
2541
2554
|
cancel() {
|
|
2542
|
-
t.cancel(),
|
|
2555
|
+
t.cancel(), Ji(n);
|
|
2543
2556
|
}
|
|
2544
2557
|
};
|
|
2545
|
-
}, _ = (e) => Z.default.map(e, (e) => (e.type ===
|
|
2546
|
-
h(), o.current?.cancel?.(), o.current = g(),
|
|
2558
|
+
}, _ = (e) => Z.default.map(e, (e) => (e.type === Hi.DELETE && (e.ids = e.data?.id ? [e.data.id] : []), e.collection = e.data ? [e.data] : [], e)), v = async ({ url: e, handler: r, beforeReconnect: a, params: s = {}, contentType: d = "json" }) => {
|
|
2559
|
+
h(), o.current?.cancel?.(), o.current = g(), Ki(o.current), n.length >= 4 && qi(n.length - 4 || 1), d === "json" && (m.current?.terminate(), m.current = new Worker(new URL(
|
|
2547
2560
|
/* @vite-ignore */
|
|
2548
2561
|
"" + new URL("assets/json-parser-worker-DtJw0BTZ.js", import.meta.url).href,
|
|
2549
2562
|
"" + import.meta.url
|
|
@@ -2563,7 +2576,7 @@ var Wi = () => (window.__GPUSTACK_WATCH_REQUEST_CLEAR__.watchIDValue = window.__
|
|
|
2563
2576
|
async onDownloadProgress(e) {
|
|
2564
2577
|
let { response: t, readyState: n } = e.currentTarget;
|
|
2565
2578
|
if (i(n), c.current = e.loaded || 0, l.current = e.total || 0, d === "json") {
|
|
2566
|
-
let n =
|
|
2579
|
+
let n = Xi(t, e.loaded, p);
|
|
2567
2580
|
m.current.postMessage(n);
|
|
2568
2581
|
} else r(t);
|
|
2569
2582
|
}
|
|
@@ -2595,7 +2608,7 @@ var Wi = () => (window.__GPUSTACK_WATCH_REQUEST_CLEAR__.watchIDValue = window.__
|
|
|
2595
2608
|
};
|
|
2596
2609
|
//#endregion
|
|
2597
2610
|
//#region src/lib/hooks/use-container-scroll.ts
|
|
2598
|
-
function
|
|
2611
|
+
function Qi(e, t) {
|
|
2599
2612
|
let n = z(!1), r = z(e), i = z(t), a = z(t?.toBottom);
|
|
2600
2613
|
z(null);
|
|
2601
2614
|
let o = R(() => Z.default.debounce(() => {
|
|
@@ -2618,14 +2631,14 @@ function Zi(e, t) {
|
|
|
2618
2631
|
}
|
|
2619
2632
|
//#endregion
|
|
2620
2633
|
//#region src/lib/hooks/use-deferred-request.ts
|
|
2621
|
-
function
|
|
2634
|
+
function $i(e, t = 100) {
|
|
2622
2635
|
return Bt(async (...n) => (await new Promise((e) => {
|
|
2623
2636
|
setTimeout(e, t);
|
|
2624
2637
|
}), await e(...n)), { manual: !0 });
|
|
2625
2638
|
}
|
|
2626
2639
|
//#endregion
|
|
2627
2640
|
//#region ../../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/dayjs.min.js
|
|
2628
|
-
var
|
|
2641
|
+
var ea = /* @__PURE__ */ n(((e, t) => {
|
|
2629
2642
|
(function(n, r) {
|
|
2630
2643
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
|
|
2631
2644
|
})(e, (function() {
|
|
@@ -2922,8 +2935,8 @@ var $i = /* @__PURE__ */ n(((e, t) => {
|
|
|
2922
2935
|
}));
|
|
2923
2936
|
//#endregion
|
|
2924
2937
|
//#region src/lib/hooks/use-download-stream.ts
|
|
2925
|
-
function
|
|
2926
|
-
let e = z(null), t = z(null), n = z(!1), r = z("log"), i = z(null), { setChunkFetch: a } =
|
|
2938
|
+
function ta() {
|
|
2939
|
+
let e = z(null), t = z(null), n = z(!1), r = z("log"), i = z(null), { setChunkFetch: a } = zi(), o = (e) => {
|
|
2927
2940
|
let t = new Blob([e], { type: "text/plain" }), n = URL.createObjectURL(t), i = document.createElement("a");
|
|
2928
2941
|
i.href = n, i.download = r.current, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(n);
|
|
2929
2942
|
}, s = (e, r) => {
|
|
@@ -2988,7 +3001,7 @@ function ea() {
|
|
|
2988
3001
|
}
|
|
2989
3002
|
//#endregion
|
|
2990
3003
|
//#region src/lib/hooks/use-download-logs.tsx
|
|
2991
|
-
var
|
|
3004
|
+
var na = /* @__PURE__ */ e(ea(), 1), ra = (e) => /* @__PURE__ */ H("div", {
|
|
2992
3005
|
style: {
|
|
2993
3006
|
width: 280,
|
|
2994
3007
|
textOverflow: "ellipsis",
|
|
@@ -2996,11 +3009,11 @@ var ta = /* @__PURE__ */ e($i(), 1), na = (e) => /* @__PURE__ */ H("div", {
|
|
|
2996
3009
|
overflow: "hidden"
|
|
2997
3010
|
},
|
|
2998
3011
|
children: e
|
|
2999
|
-
}),
|
|
3000
|
-
let { downloadStream: e } =
|
|
3012
|
+
}), ia = (e) => `${e}_${(0, na.default)().format("YYYY-MM-DD_HH-mm-ss")}.txt`, aa = () => {
|
|
3013
|
+
let { downloadStream: e } = ta(), t = o(), [n, r] = It.useNotification({ stack: { threshold: 1 } }), i = (e) => {
|
|
3001
3014
|
n.open({
|
|
3002
3015
|
duration: e.duration,
|
|
3003
|
-
message:
|
|
3016
|
+
message: ra(e.filename),
|
|
3004
3017
|
key: e.filename,
|
|
3005
3018
|
closeIcon: /* @__PURE__ */ H("span", { children: t.formatMessage({ id: "common.button.cancel" }) }),
|
|
3006
3019
|
description: /* @__PURE__ */ H(bt, {
|
|
@@ -3016,7 +3029,7 @@ var ta = /* @__PURE__ */ e($i(), 1), na = (e) => /* @__PURE__ */ H("div", {
|
|
|
3016
3029
|
onDownloadLog: async (t) => {
|
|
3017
3030
|
e({
|
|
3018
3031
|
url: t.url,
|
|
3019
|
-
filename:
|
|
3032
|
+
filename: ia(t.name),
|
|
3020
3033
|
downloadNotification: i
|
|
3021
3034
|
});
|
|
3022
3035
|
},
|
|
@@ -3025,7 +3038,7 @@ var ta = /* @__PURE__ */ e($i(), 1), na = (e) => /* @__PURE__ */ H("div", {
|
|
|
3025
3038
|
};
|
|
3026
3039
|
//#endregion
|
|
3027
3040
|
//#region src/lib/hooks/use-expanded-row-keys.ts
|
|
3028
|
-
function
|
|
3041
|
+
function oa(e = []) {
|
|
3029
3042
|
let [t, n] = B(e), [r, i] = B(null);
|
|
3030
3043
|
return {
|
|
3031
3044
|
expandedRowKeys: t,
|
|
@@ -3050,9 +3063,9 @@ function aa(e = []) {
|
|
|
3050
3063
|
}
|
|
3051
3064
|
//#endregion
|
|
3052
3065
|
//#region src/lib/hooks/use-query-data-list.ts
|
|
3053
|
-
function
|
|
3066
|
+
function sa(e) {
|
|
3054
3067
|
let { key: t, fetchList: n, getLabel: r, getValue: i, responseType: a = "array", errorMsg: o } = e, s = z(null), [c, l] = B([]), { runAsync: u, loading: d, cancel: f } = Bt(async (e, t) => {
|
|
3055
|
-
s.current?.cancel(), s.current =
|
|
3068
|
+
s.current?.cancel(), s.current = Yi();
|
|
3056
3069
|
let o = await n(e, {
|
|
3057
3070
|
token: s.current?.token,
|
|
3058
3071
|
...t || {}
|
|
@@ -3080,9 +3093,9 @@ function oa(e) {
|
|
|
3080
3093
|
fetchData: (e, t) => u(e, t)
|
|
3081
3094
|
};
|
|
3082
3095
|
}
|
|
3083
|
-
function
|
|
3096
|
+
function ca(e) {
|
|
3084
3097
|
let { key: t, fetchDetail: n, getData: r, errorMsg: i, delay: a } = e, o = z(null), [s, c] = B({}), { runAsync: l, loading: u, cancel: d } = Bt(async (e, t) => {
|
|
3085
|
-
o.current?.cancel(), o.current =
|
|
3098
|
+
o.current?.cancel(), o.current = Yi();
|
|
3086
3099
|
let i = await n(e, {
|
|
3087
3100
|
token: o.current?.token,
|
|
3088
3101
|
...t || {}
|
|
@@ -3110,14 +3123,14 @@ function sa(e) {
|
|
|
3110
3123
|
}
|
|
3111
3124
|
//#endregion
|
|
3112
3125
|
//#region src/lib/hooks/use-request-token.ts
|
|
3113
|
-
function
|
|
3126
|
+
function la() {
|
|
3114
3127
|
let { source: e } = w.CancelToken;
|
|
3115
3128
|
return e;
|
|
3116
3129
|
}
|
|
3117
3130
|
//#endregion
|
|
3118
3131
|
//#region src/lib/hooks/use-responsive.ts
|
|
3119
|
-
var
|
|
3120
|
-
let [t, n] = B(e), r = (e) => e <
|
|
3132
|
+
var ua = ({ defaultSpan: e = 8 }) => {
|
|
3133
|
+
let [t, n] = B(e), r = (e) => e < Vi.md ? 24 : e < Vi.lg ? 12 : 8;
|
|
3121
3134
|
return {
|
|
3122
3135
|
span: t,
|
|
3123
3136
|
handleResize: zt(Z.default.throttle((e) => {
|
|
@@ -3127,7 +3140,7 @@ var la = ({ defaultSpan: e = 8 }) => {
|
|
|
3127
3140
|
};
|
|
3128
3141
|
//#endregion
|
|
3129
3142
|
//#region src/lib/hooks/use-table-row-selection.ts
|
|
3130
|
-
function
|
|
3143
|
+
function da() {
|
|
3131
3144
|
let [e, t] = B([]), [n, r] = B([]);
|
|
3132
3145
|
return {
|
|
3133
3146
|
selectedRowKeys: e,
|
|
@@ -3156,7 +3169,7 @@ function ua() {
|
|
|
3156
3169
|
}
|
|
3157
3170
|
//#endregion
|
|
3158
3171
|
//#region src/lib/hooks/use-table-sort.ts
|
|
3159
|
-
function
|
|
3172
|
+
function fa({ defaultSortOrder: e = "descend" }) {
|
|
3160
3173
|
let [t, n] = B(e);
|
|
3161
3174
|
return {
|
|
3162
3175
|
sortOrder: t,
|
|
@@ -3165,7 +3178,7 @@ function da({ defaultSortOrder: e = "descend" }) {
|
|
|
3165
3178
|
}
|
|
3166
3179
|
};
|
|
3167
3180
|
}
|
|
3168
|
-
function
|
|
3181
|
+
function pa() {
|
|
3169
3182
|
let [e, t] = B([]);
|
|
3170
3183
|
return {
|
|
3171
3184
|
sortOrder: e,
|
|
@@ -3180,7 +3193,7 @@ function fa() {
|
|
|
3180
3193
|
}
|
|
3181
3194
|
//#endregion
|
|
3182
3195
|
//#region src/lib/hooks/use-update-chunk-list.ts
|
|
3183
|
-
function
|
|
3196
|
+
function ma(e) {
|
|
3184
3197
|
let { events: t = [
|
|
3185
3198
|
"CREATE",
|
|
3186
3199
|
"DELETE",
|
|
@@ -3202,18 +3215,18 @@ function pa(e) {
|
|
|
3202
3215
|
let l = a?.collection || [];
|
|
3203
3216
|
e?.computedID && (l = l?.map((t) => (t.id = e?.computedID?.(t), t))), e?.filterFun && (l = a?.collection?.filter(e?.filterFun)), e?.mapFun && (l = a?.collection?.map(e?.mapFun));
|
|
3204
3217
|
let u = a?.ids || [];
|
|
3205
|
-
if (a?.type ===
|
|
3218
|
+
if (a?.type === Hi.CREATE && t.includes("CREATE")) {
|
|
3206
3219
|
let t = [];
|
|
3207
3220
|
i.current = [...l.reduce((e, r) => {
|
|
3208
3221
|
let a = i.current?.findIndex((e) => e.id === r.id), o = { ...r };
|
|
3209
3222
|
return a === -1 && !n?.current ? e.push(o) : n?.current || (i.current[a] = o), n?.current && Date.parse(r.created_at) >= n.current && t.push(o), e;
|
|
3210
3223
|
}, []), ...i.current].slice(0, o), e.onCreate?.(t);
|
|
3211
3224
|
}
|
|
3212
|
-
if (a?.type ===
|
|
3225
|
+
if (a?.type === Hi.DELETE && t.includes("DELETE")) {
|
|
3213
3226
|
let t = [];
|
|
3214
3227
|
i.current = i.current?.filter((e) => (n?.current && u?.includes(e.id) && t.push(e), !u?.includes(e.id))), s(u), e.setDataList?.([...i.current], { deletedIds: [...r.current] }), e.onDelete?.(t);
|
|
3215
3228
|
}
|
|
3216
|
-
a?.type ===
|
|
3229
|
+
a?.type === Hi.UPDATE && t.includes("UPDATE") && l?.forEach((r) => {
|
|
3217
3230
|
let a = i.current?.findIndex((e) => e.id === r.id), s = { ...r };
|
|
3218
3231
|
a > -1 ? i.current[a] = s : a === -1 && t.includes("INSERT") && (i.current = [s, ...i.current.slice(0, o - 1)], e.onUpdate && n?.current && Date.parse(r.created_at) >= n.current && e.onUpdate?.([s]));
|
|
3219
3232
|
}), c(), e?.callback && e?.callback(i.current);
|
|
@@ -3224,8 +3237,8 @@ function pa(e) {
|
|
|
3224
3237
|
}
|
|
3225
3238
|
//#endregion
|
|
3226
3239
|
//#region src/lib/hooks/use-watch-list.ts
|
|
3227
|
-
function
|
|
3228
|
-
let t = e, { services: n } = a(), { request: r } = n, [i, o] = B([]), s = z(null), c = z(null), { setChunkRequest: l, createAxiosToken: u } =
|
|
3240
|
+
function ha(e) {
|
|
3241
|
+
let t = e, { services: n } = a(), { request: r } = n, [i, o] = B([]), s = z(null), c = z(null), { setChunkRequest: l, createAxiosToken: u } = Zi(), { updateChunkedList: d, cacheDataListRef: f } = ma({
|
|
3229
3242
|
dataList: i,
|
|
3230
3243
|
limit: 100,
|
|
3231
3244
|
setDataList: o
|
|
@@ -3267,23 +3280,23 @@ function ma(e) {
|
|
|
3267
3280
|
}
|
|
3268
3281
|
//#endregion
|
|
3269
3282
|
//#region src/lib/hooks/use-window-resize.ts
|
|
3270
|
-
function
|
|
3283
|
+
function ga() {
|
|
3271
3284
|
let [e, t] = B({
|
|
3272
3285
|
width: window.innerWidth,
|
|
3273
3286
|
height: window.innerHeight
|
|
3274
3287
|
}), n = R(() => {
|
|
3275
3288
|
let t = e.width;
|
|
3276
|
-
return t <
|
|
3289
|
+
return t < Vi.sm ? {
|
|
3277
3290
|
isMobile: !0,
|
|
3278
3291
|
isTablet: !1,
|
|
3279
3292
|
isDesktop: !1,
|
|
3280
3293
|
currentPoint: "sm"
|
|
3281
|
-
} : t <
|
|
3294
|
+
} : t < Vi.md ? {
|
|
3282
3295
|
isMobile: !1,
|
|
3283
3296
|
isTablet: !0,
|
|
3284
3297
|
isDesktop: !1,
|
|
3285
3298
|
currentPoint: "md"
|
|
3286
|
-
} : t <
|
|
3299
|
+
} : t < Vi.lg ? {
|
|
3287
3300
|
isMobile: !1,
|
|
3288
3301
|
isTablet: !1,
|
|
3289
3302
|
isDesktop: !0,
|
|
@@ -3310,11 +3323,8 @@ function ha() {
|
|
|
3310
3323
|
};
|
|
3311
3324
|
}
|
|
3312
3325
|
//#endregion
|
|
3313
|
-
//#region src/lib/hooks/
|
|
3314
|
-
var
|
|
3315
|
-
let { access: e } = a();
|
|
3316
|
-
return e?.useAccess?.() ?? {};
|
|
3317
|
-
}, _a = {}, va = () => {
|
|
3326
|
+
//#region src/lib/hooks/useCoreUISlots.ts
|
|
3327
|
+
var _a = {}, va = () => {
|
|
3318
3328
|
let { slots: e } = a();
|
|
3319
3329
|
return e ?? _a;
|
|
3320
3330
|
}, ya = () => {
|
|
@@ -3689,7 +3699,7 @@ var ga = () => {
|
|
|
3689
3699
|
color: var(--ant-color-warning);
|
|
3690
3700
|
}
|
|
3691
3701
|
`, Va = A((e, t) => {
|
|
3692
|
-
let n = o(), { styles: r } = za(), { saveScrollHeight: i, restoreScrollHeight: a } =
|
|
3702
|
+
let n = o(), { styles: r } = za(), { saveScrollHeight: i, restoreScrollHeight: a } = Ii(), [s, c] = B(!1), [l, u] = B({ checked: !1 }), [d, f] = B(!1), [p, m] = B({}), h = (e) => {
|
|
3693
3703
|
i(), m(e), u({ checked: e.checkConfig?.defautlChecked || !1 }), c(!0);
|
|
3694
3704
|
}, g = () => {
|
|
3695
3705
|
c(!1), a();
|
|
@@ -3783,41 +3793,41 @@ var ga = () => {
|
|
|
3783
3793
|
})]
|
|
3784
3794
|
})] });
|
|
3785
3795
|
}, Ka = { middle: "index-module__middle___pMpZ3" }, qa = ({ items: e, size: t = "middle", trigger: n = ["hover"], showText: r, disabled: i, variant: a, color: s, extra: c, onSelect: l }) => {
|
|
3786
|
-
let u = Z.default.
|
|
3787
|
-
let
|
|
3788
|
-
l(
|
|
3789
|
-
},
|
|
3790
|
-
let
|
|
3791
|
-
l(
|
|
3796
|
+
let u = o(), d = ki(), f = Z.default.filter(e, (e) => e?.access ? d?.[e.access] : !0), p = (e) => {
|
|
3797
|
+
let t = Z.default.find(f, { key: e.key });
|
|
3798
|
+
l(e.key, t);
|
|
3799
|
+
}, m = Z.default.head(f), h = (e) => {
|
|
3800
|
+
let t = Z.default.head(f);
|
|
3801
|
+
l(t.key, t);
|
|
3792
3802
|
};
|
|
3793
|
-
return
|
|
3794
|
-
title:
|
|
3803
|
+
return f?.length ? /* @__PURE__ */ H(V, { children: f?.length === 1 ? /* @__PURE__ */ H(J, {
|
|
3804
|
+
title: u.formatMessage({ id: m?.label }),
|
|
3795
3805
|
children: /* @__PURE__ */ H(G, {
|
|
3796
3806
|
className: Ka[t],
|
|
3797
|
-
icon:
|
|
3807
|
+
icon: m?.icon,
|
|
3798
3808
|
size: t,
|
|
3799
|
-
...
|
|
3800
|
-
onClick:
|
|
3809
|
+
...m?.props,
|
|
3810
|
+
onClick: h
|
|
3801
3811
|
})
|
|
3802
3812
|
}) : /* @__PURE__ */ U(Et.Compact, { children: [/* @__PURE__ */ H(V, { children: r ? /* @__PURE__ */ U(G, {
|
|
3803
|
-
...
|
|
3804
|
-
disabled:
|
|
3813
|
+
...m?.props,
|
|
3814
|
+
disabled: m?.disabled || i,
|
|
3805
3815
|
className: Ka[t],
|
|
3806
|
-
onClick:
|
|
3816
|
+
onClick: h,
|
|
3807
3817
|
size: t,
|
|
3808
|
-
icon:
|
|
3818
|
+
icon: m?.icon,
|
|
3809
3819
|
variant: a,
|
|
3810
3820
|
color: s,
|
|
3811
|
-
children: [
|
|
3821
|
+
children: [u.formatMessage({ id: m?.label }), c]
|
|
3812
3822
|
}) : /* @__PURE__ */ H(J, {
|
|
3813
|
-
title:
|
|
3823
|
+
title: u.formatMessage({ id: m?.label }),
|
|
3814
3824
|
children: /* @__PURE__ */ H(G, {
|
|
3815
|
-
...
|
|
3825
|
+
...m?.props,
|
|
3816
3826
|
className: Ka[t],
|
|
3817
|
-
onClick:
|
|
3827
|
+
onClick: h,
|
|
3818
3828
|
size: t,
|
|
3819
|
-
icon:
|
|
3820
|
-
disabled:
|
|
3829
|
+
icon: m?.icon,
|
|
3830
|
+
disabled: m?.disabled
|
|
3821
3831
|
})
|
|
3822
3832
|
}, "leftButton") }), /* @__PURE__ */ H(dt, {
|
|
3823
3833
|
disabled: i,
|
|
@@ -3828,11 +3838,11 @@ var ga = () => {
|
|
|
3828
3838
|
itemIcon: { fontSize: 14 }
|
|
3829
3839
|
},
|
|
3830
3840
|
menu: {
|
|
3831
|
-
onClick:
|
|
3832
|
-
items: Z.default.tail(
|
|
3841
|
+
onClick: p,
|
|
3842
|
+
items: Z.default.tail(f).map((e) => ({
|
|
3833
3843
|
...Z.default.omit(e, ["label", "locale"]),
|
|
3834
3844
|
...e.props,
|
|
3835
|
-
label: e.locale || e.locale === void 0 ?
|
|
3845
|
+
label: e.locale || e.locale === void 0 ? u.formatMessage({ id: e.label }) : e.label
|
|
3836
3846
|
}))
|
|
3837
3847
|
},
|
|
3838
3848
|
children: /* @__PURE__ */ H(G, {
|
|
@@ -7058,7 +7068,7 @@ var Is = (e) => {
|
|
|
7058
7068
|
beforeText: i,
|
|
7059
7069
|
afterText: o
|
|
7060
7070
|
});
|
|
7061
|
-
}, { ImageURLInput: x, UploadImageButton: S, isFromUrl: C, dropDownOpen: w } =
|
|
7071
|
+
}, { ImageURLInput: x, UploadImageButton: S, isFromUrl: C, dropDownOpen: w } = Pi({
|
|
7062
7072
|
size: "small",
|
|
7063
7073
|
inputProps: { variant: "filled" },
|
|
7064
7074
|
handleUpdateImgList: (e) => {
|
|
@@ -7543,13 +7553,13 @@ var lc = {
|
|
|
7543
7553
|
children: /* @__PURE__ */ H(ae, { className: "font-size-14" })
|
|
7544
7554
|
})
|
|
7545
7555
|
}),
|
|
7546
|
-
/* @__PURE__ */ H(
|
|
7556
|
+
/* @__PURE__ */ H(Mi, {
|
|
7547
7557
|
disabled: n || i,
|
|
7548
7558
|
handleUpdateImgList: d,
|
|
7549
7559
|
size: "middle",
|
|
7550
7560
|
accept: a
|
|
7551
7561
|
}),
|
|
7552
|
-
/* @__PURE__ */ H(
|
|
7562
|
+
/* @__PURE__ */ H(Mi, {
|
|
7553
7563
|
title: p.formatMessage({ id: "playground.image.mask.upload" }),
|
|
7554
7564
|
icon: /* @__PURE__ */ H(Q, { type: "icon-mosaic-2" }),
|
|
7555
7565
|
disabled: n || i,
|
|
@@ -7663,7 +7673,7 @@ var lc = {
|
|
|
7663
7673
|
t.width = e.width, t.height = e.height, n.width = e.width, n.height = e.height;
|
|
7664
7674
|
}, []), Ce = N(() => {
|
|
7665
7675
|
let e = ce(), t = document.createElement("a");
|
|
7666
|
-
t.download = `mask_${(0,
|
|
7676
|
+
t.download = `mask_${(0, na.default)().format("YYYYMMDDHHmmss")}.png`, t.href = e || "", t.click();
|
|
7667
7677
|
}, [ce]), we = N(() => {
|
|
7668
7678
|
pe(), de([]), L([]), ae(), O.current = [], console.log("Resetting strokes", O.current);
|
|
7669
7679
|
}, []), Te = (e, t) => {
|
|
@@ -7705,14 +7715,14 @@ var lc = {
|
|
|
7705
7715
|
}, 100);
|
|
7706
7716
|
}, []), Oe = () => {
|
|
7707
7717
|
let e = C.current, t = document.createElement("a");
|
|
7708
|
-
t.download = `image_${(0,
|
|
7718
|
+
t.download = `image_${(0, na.default)().format("YYYYMMDDHHmmss")}.png`, t.href = e.toDataURL("image/png"), t.click(), t.remove();
|
|
7709
7719
|
}, ke = () => {
|
|
7710
7720
|
if (!t) return;
|
|
7711
7721
|
let e = new Image();
|
|
7712
7722
|
e.src = t, e.onload = () => {
|
|
7713
7723
|
let t = document.createElement("canvas");
|
|
7714
7724
|
t.width = r.width, t.height = r.height, t.getContext("2d").drawImage(e, 0, 0, t.width, t.height);
|
|
7715
|
-
let n = t.toDataURL("image/png"), i = `${t.width}x${t.height}_${(0,
|
|
7725
|
+
let n = t.toDataURL("image/png"), i = `${t.width}x${t.height}_${(0, na.default)().format("YYYYMMDDHHmmss")}.png`, a = document.createElement("a");
|
|
7716
7726
|
a.href = n, a.download = i, document.body.appendChild(a), a.click(), a.remove();
|
|
7717
7727
|
};
|
|
7718
7728
|
}, Ae = () => {
|
|
@@ -8631,7 +8641,7 @@ var Nc = (e) => {
|
|
|
8631
8641
|
totalPage: i
|
|
8632
8642
|
};
|
|
8633
8643
|
}, tl = A((e, t) => {
|
|
8634
|
-
let { diffHeight: n, url: r, tail: i, enableScorllLoad: a = !0, isDownloading: o, watchable: s, params: c } = e, { pageSize: l, page: u, setPage: d, setTotalPage: f, totalPage: p } = el(), { setChunkFetch: m } =
|
|
8644
|
+
let { diffHeight: n, url: r, tail: i, enableScorllLoad: a = !0, isDownloading: o, watchable: s, params: c } = e, { pageSize: l, page: u, setPage: d, setTotalPage: f, totalPage: p } = el(), { setChunkFetch: m } = zi(), h = z(null), [g, _] = B([]), v = z(null), y = z(i), [b, x] = B(!1), [S, C] = B(!1), [w, T] = B([]), E = z(null), D = z(!1), O = z(u), k = z(p), A = z(!1), [j, M] = B([]), P = z({
|
|
8635
8645
|
pos: "bottom",
|
|
8636
8646
|
page: 1
|
|
8637
8647
|
}), L = z(0), R = z(!1);
|
|
@@ -9041,7 +9051,7 @@ var Nc = (e) => {
|
|
|
9041
9051
|
] }),
|
|
9042
9052
|
right: y || (!a && !i ? null : /* @__PURE__ */ U(Et, {
|
|
9043
9053
|
size: 16,
|
|
9044
|
-
children: [a ? p === "dropdown" ? /* @__PURE__ */ H(
|
|
9054
|
+
children: [a ? p === "dropdown" ? /* @__PURE__ */ H(Ai, {
|
|
9045
9055
|
styles: { root: { minWidth: "140px" } },
|
|
9046
9056
|
menu: {
|
|
9047
9057
|
items: c,
|
|
@@ -9131,7 +9141,7 @@ var Nc = (e) => {
|
|
|
9131
9141
|
}, e.value))
|
|
9132
9142
|
});
|
|
9133
9143
|
}, Tl = ({ defaultSpan: e = 8, dataList: t, renderItem: n, resizable: r = !0 }) => {
|
|
9134
|
-
let { span: i, handleResize: a } =
|
|
9144
|
+
let { span: i, handleResize: a } = ua({ defaultSpan: e });
|
|
9135
9145
|
return /* @__PURE__ */ H(di, {
|
|
9136
9146
|
onResize: a,
|
|
9137
9147
|
disabled: !r,
|
|
@@ -9259,7 +9269,7 @@ var Dl = Y.div`
|
|
|
9259
9269
|
overflow: hidden;
|
|
9260
9270
|
white-space: nowrap;
|
|
9261
9271
|
`, Nl = (e) => {
|
|
9262
|
-
let t = E.useRef(null), { saveScrollHeight: n, restoreScrollHeight: r } =
|
|
9272
|
+
let t = E.useRef(null), { saveScrollHeight: n, restoreScrollHeight: r } = Ii(), { initialize: i, destroyInstance: a, scrollToBottom: o } = d();
|
|
9263
9273
|
return E.useEffect(() => {
|
|
9264
9274
|
e.open ? n() : r();
|
|
9265
9275
|
}, [e.open]), E.useEffect(() => {
|
|
@@ -10271,7 +10281,7 @@ var qu = Y.div`
|
|
|
10271
10281
|
g.current?.seekTo(e / s), f(e);
|
|
10272
10282
|
}, []);
|
|
10273
10283
|
let A = () => e.format === "pcm" ? "wav" : e.format, j = N(() => {
|
|
10274
|
-
let t = e.audioUrl || "", n = `audio-${(0,
|
|
10284
|
+
let t = e.audioUrl || "", n = `audio-${(0, na.default)().format("YYYYMMDDHHmmss")}.${A()}`, r = document.createElement("a");
|
|
10275
10285
|
r.href = t, r.download = n, document.body.appendChild(r), r.click(), r.remove();
|
|
10276
10286
|
}, [e.audioUrl, e.format]);
|
|
10277
10287
|
console.log("isPCMStream:", _, i), console.log("props.analyserData:", e.analyserData);
|
|
@@ -10361,7 +10371,7 @@ var qu = Y.div`
|
|
|
10361
10371
|
overflow: hidden;
|
|
10362
10372
|
text-overflow: ellipsis;
|
|
10363
10373
|
`, id = /<a (.*?)>(.*?)<\/a>/g, ad = ({ style: e, statusValue: t, download: n, extra: r, actions: i = [], maxTooltipWidth: a = 250, suffix: o }) => {
|
|
10364
|
-
let { text: s, status: l } = t, d = R(() =>
|
|
10374
|
+
let { text: s, status: l } = t, d = R(() => Ui[l], [l]), f = R(() => t.message ? id.test(t.message || "") : !1, [t.message]), p = R(() => t.message ? t.message?.match(id) ? t.message?.replace(id, "<a $1 target=\"_blank\">$2</a>") : t.message : "", [t.message]), m = () => {
|
|
10365
10375
|
let e = n?.percent || 0;
|
|
10366
10376
|
return n && e > 0 && e <= 100 ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ U("span", {
|
|
10367
10377
|
className: "progress",
|
|
@@ -10446,10 +10456,10 @@ var qu = Y.div`
|
|
|
10446
10456
|
content: "styles-module__content___d1qHZ",
|
|
10447
10457
|
footer: "styles-module__footer___wE8uH"
|
|
10448
10458
|
}, sd = ({ title: e, open: t, onCancel: n, onSubmit: r, children: i, subTitle: a, footer: o, width: s = 600, className: c, style: l, maskClosable: u = !1, styles: d, getContainer: f }) => {
|
|
10449
|
-
let [p, m] = E.useState(null), [h, g] = E.useState(!1), [_, v] = E.useState(!1), y =
|
|
10459
|
+
let [p, m] = E.useState(null), [h, g] = E.useState(!1), [_, v] = E.useState(!1), y = zt(() => {
|
|
10450
10460
|
let e = document.querySelectorAll(".ant-layout-content");
|
|
10451
10461
|
return e[e.length - 1] ?? null;
|
|
10452
|
-
}
|
|
10462
|
+
});
|
|
10453
10463
|
E.useEffect(() => {
|
|
10454
10464
|
if (t) {
|
|
10455
10465
|
m(f?.() ?? y()), g(!0);
|
|
@@ -10853,7 +10863,7 @@ var qu = Y.div`
|
|
|
10853
10863
|
}
|
|
10854
10864
|
}, P = zt(async () => {
|
|
10855
10865
|
try {
|
|
10856
|
-
w.current?.cancel?.(), w.current =
|
|
10866
|
+
w.current?.cancel?.(), w.current = Yi(), b(!0), v(await m?.(t, { token: w.current?.token }) || []), b(!1);
|
|
10857
10867
|
} catch {
|
|
10858
10868
|
v([]), b(!1);
|
|
10859
10869
|
}
|
|
@@ -19394,4 +19404,4 @@ var yf = A((e, t) => {
|
|
|
19394
19404
|
});
|
|
19395
19405
|
});
|
|
19396
19406
|
//#endregion
|
|
19397
|
-
export { dn as Access, gn as AlertBlockInfo, fn as AlertInfo, yn as AudioAnimation, Sn as AudioPlayer, mo as AutoComplete, jn as AutoImage, f as AutoTooltip, Ho as BarChart, Co as BaseSelect, mi as BibtexViewer, gi as CardWrapper, Bs as Cascader, yd as CellContent, Ro as Chart, xi as CheckButtons, Hs as Checkbox, Us as CheckboxField, wi as CollapseContainer, Di as CollapsePanel, wa as ColumnSettings, Aa as ColumnWrapper, Ia as CommandViewer, Ra as ContentWrapper, u as CopyButton, un as CoreUIProvider, Va as DeleteModal, Ua as DividerLine, Ga as DocLink,
|
|
19407
|
+
export { dn as Access, gn as AlertBlockInfo, fn as AlertInfo, yn as AudioAnimation, Sn as AudioPlayer, mo as AutoComplete, jn as AutoImage, f as AutoTooltip, Ho as BarChart, Co as BaseSelect, mi as BibtexViewer, gi as CardWrapper, Bs as Cascader, yd as CellContent, Ro as Chart, xi as CheckButtons, Hs as Checkbox, Us as CheckboxField, wi as CollapseContainer, Di as CollapsePanel, wa as ColumnSettings, Aa as ColumnWrapper, Ia as CommandViewer, Ra as ContentWrapper, u as CopyButton, un as CoreUIProvider, Va as DeleteModal, Ua as DividerLine, Ga as DocLink, Ai as DropdownActions, qa as DropdownButtons, Ja as DynamicForm, C as EditorWrap, Zo as ErrorMessage, Ws as FieldComponent, bl as FilterBar, $o as FilterForm, vl as FiltersButton, es as FormButtons, Rs as FormDrawer, Is as GSDrawer, Wo as GaugeChart, ic as GrafanaIcon, Go as HBarChart, Ti as HeadlessCollapse, p as HighlightCode, To as INPUT_WIDTH, Q as IconFont, gc as ImageEditor, Nc as InfiniteScroller, Ic as InfiniteScrollerProvider, $u as InfoColumn, xo as Input, go as InputNumber, _o as InputSearch, Rc as LabelCell, Ya as LabelInfo, Wc as LabelSelector, Gc as LabelSelectorProvider, qo as LineChart, Yc as ListInput, Fo as ListMap, tl as LogsViewer, rl as MetadataList, Jo as MixLineBarChart, ns as ModalFooter, al as MoreButton, Xs as MultipleSelect, ul as NoResult, l as OverlayScroller, hl as PageBox, fl as PageBreadcrumb, ml as PageContainerInner, $c as PageSize, yl as PageTools, vo as Password, Sl as Popover, Cl as ProgressBar, wl as RadioButtons, Tl as ResizeContainer, yf as ResizePanel, dd as RowChildren, ec as RowTextarea, Yo as ScatterChart, Ol as ScrollSpyTabs, Nl as ScrollerModal, Pa as SegmentLine, wo as Select, Bl as SelectPanel, Hl as Shortcut, On as SimpleAudio, bi as SimpleCard, Ju as SimpleOverlay, Ys as SimpleSelect, Qu as SimpleTable, fi as SingleImage, Do as Slider, Qs as SmallCloseButton, nd as SpeechContent, ad as StatusTag, sd as SubDrawer, ko as Switch, rc as SwitchInput, Dd as Table, Od as TableProvider, kd as TableRowProvider, Ad as TagsWrapper, Rd as TemplateCard, Ud as TemplateCardList, Bd as TemplateCardSkeleton, Sf as TerminalTabs, bo as Textarea, Md as ThemeTag, $s as ThumbImage, wf as TooltipList, c as TooltipOverlayScroller, Ef as Transfer, Df as TransitionWrapper, Of as UploadAudio, Mi as UploadImage, kf as ViewerEditor, Xd as XTerminal, Bi as config, ac as icons, Sc as processImage, ki as useAccess, Oi as useActions, Pi as useAddImage, Fi as useAppUtils, Ii as useBodyScroll, zi as useChunkFetch, Zi as useChunkRequest, Ea as useColumnWrapperContext, Ea as useWrapperContext, Qi as useContainerScroll, a as useCoreUIContext, va as useCoreUISlots, ya as useCurrentUser, $i as useDeferredRequest, aa as useDownloadLogs, ta as useDownloadStream, oa as useExpandedRowKeys, kl as useFinishFailed, o as useIntl, d as useOverlayScroller, ca as useQueryData, ca as useRequest, sa as useQueryDataList, la as useRequestToken, ua as useResponsive, Al as useScrollActiveChange, Fc as useScrollerContext, ba as useTableFetch, pa as useTableMultiSort, da as useTableRowSelection, fa as useTableSort, Td as useTableSorter, ma as useUpdateChunkedList, Io as useValidateFields, ha as useWatchList, ga as useWindowResize, S as utils };
|