@camstack/addon-provider-homematic 1.2.194 → 1.2.196

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 (27) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/.bundle-modules.json +21 -11
  3. package/dist/_stub.js +2690 -1433
  4. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-Da2xbO9l.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-D8eX6qCZ.mjs} +4 -4
  5. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BPCGkZg7.mjs +26 -0
  6. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-D_jZoh_U.mjs +26 -0
  7. package/dist/addon-provider-homematic.css +1 -1
  8. package/dist/addon.js +13130 -2358
  9. package/dist/addon.mjs +13130 -2358
  10. package/dist/{hostInit-DAlzBsEA.mjs → hostInit-DuBY5RFc.mjs} +3 -3
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BvA2vFCp.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-v2rx1eLb.mjs} +1 -1
  13. package/dist/widgets/_stub.js +4786 -0
  14. package/dist/widgets/_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-Cn_SmgI_.mjs +156 -0
  15. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-jVV0iLqt.mjs +26 -0
  16. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react__loadShare__.js-Cz6ebdBh.mjs +26 -0
  17. package/dist/{_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-15LkOsGv.mjs → widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B8RWlLTT.mjs} +2 -2
  18. package/dist/widgets/dist-CYZr2fwk.mjs +2726 -0
  19. package/dist/widgets/hostInit-qp7M4JAF.mjs +129 -0
  20. package/dist/widgets/remoteEntry.js +134 -0
  21. package/dist/widgets/remoteEntry.ssr.js +33 -0
  22. package/dist/widgets/virtualExposes-C91wF3sM.mjs +27 -0
  23. package/dist/widgets/virtual_mf-exposes-ssr___mfe_internal__addon_provider_homematic_widgets__remoteEntry_js-DpwWfhOB.mjs +10 -0
  24. package/i18n/en.json +6 -1
  25. package/i18n/it.json +6 -1
  26. package/package.json +9 -5
  27. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CqBgrgbo.mjs +0 -26
@@ -0,0 +1,4786 @@
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-jVV0iLqt.mjs";
2
+ import { a as p, i as m, n as h, o as ee, r as g, s as _, t as v } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react__loadShare__.js-Cz6ebdBh.mjs";
3
+ import { n as y, t as b } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B8RWlLTT.mjs";
4
+ //#region ../../node_modules/zod/v4/core/core.js
5
+ var x;
6
+ function S(e, t, n) {
7
+ function r(n, r) {
8
+ if (n._zod || Object.defineProperty(n, "_zod", {
9
+ value: {
10
+ def: r,
11
+ constr: o,
12
+ traits: /* @__PURE__ */ new Set()
13
+ },
14
+ enumerable: !1
15
+ }), n._zod.traits.has(e)) return;
16
+ n._zod.traits.add(e), t(n, r);
17
+ let i = o.prototype, a = Object.keys(i);
18
+ for (let e = 0; e < a.length; e++) {
19
+ let t = a[e];
20
+ t in n || (n[t] = i[t].bind(n));
21
+ }
22
+ }
23
+ let i = n?.Parent ?? Object;
24
+ class a extends i {}
25
+ Object.defineProperty(a, "name", { value: e });
26
+ function o(e) {
27
+ var t;
28
+ let i = n?.Parent ? new a() : this;
29
+ r(i, e), (t = i._zod).deferred ?? (t.deferred = []);
30
+ for (let e of i._zod.deferred) e();
31
+ return i;
32
+ }
33
+ return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
34
+ }
35
+ var C = class extends Error {
36
+ constructor() {
37
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
38
+ }
39
+ }, te = class extends Error {
40
+ constructor(e) {
41
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
42
+ }
43
+ };
44
+ (x = globalThis).__zod_globalConfig ?? (x.__zod_globalConfig = {});
45
+ var w = globalThis.__zod_globalConfig;
46
+ function T(e) {
47
+ return e && Object.assign(w, e), w;
48
+ }
49
+ //#endregion
50
+ //#region ../../node_modules/zod/v4/core/util.js
51
+ function ne(e) {
52
+ let t = Object.values(e).filter((e) => typeof e == "number");
53
+ return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
54
+ }
55
+ function re(e, t) {
56
+ return typeof t == "bigint" ? t.toString() : t;
57
+ }
58
+ function ie(e) {
59
+ return { get value() {
60
+ {
61
+ let t = e();
62
+ return Object.defineProperty(this, "value", { value: t }), t;
63
+ }
64
+ throw Error("cached value already set");
65
+ } };
66
+ }
67
+ function ae(e) {
68
+ return e == null;
69
+ }
70
+ function oe(e) {
71
+ let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
72
+ return e.slice(t, n);
73
+ }
74
+ function se(e, t) {
75
+ let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
76
+ return Math.abs(n - r) < i ? 0 : n - r;
77
+ }
78
+ var ce = /* @__PURE__*/ Symbol("evaluating");
79
+ function E(e, t, n) {
80
+ let r;
81
+ Object.defineProperty(e, t, {
82
+ get() {
83
+ if (r !== ce) return r === void 0 && (r = ce, r = n()), r;
84
+ },
85
+ set(n) {
86
+ Object.defineProperty(e, t, { value: n });
87
+ },
88
+ configurable: !0
89
+ });
90
+ }
91
+ function D(e, t, n) {
92
+ Object.defineProperty(e, t, {
93
+ value: n,
94
+ writable: !0,
95
+ enumerable: !0,
96
+ configurable: !0
97
+ });
98
+ }
99
+ function O(...e) {
100
+ let t = {};
101
+ for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
102
+ return Object.defineProperties({}, t);
103
+ }
104
+ function le(e) {
105
+ return JSON.stringify(e);
106
+ }
107
+ function ue(e) {
108
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
109
+ }
110
+ var de = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
111
+ function fe(e) {
112
+ return typeof e == "object" && !!e && !Array.isArray(e);
113
+ }
114
+ var pe = /* @__PURE__*/ ie(() => {
115
+ if (w.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
116
+ try {
117
+ return Function(""), !0;
118
+ } catch {
119
+ return !1;
120
+ }
121
+ });
122
+ function k(e) {
123
+ if (fe(e) === !1) return !1;
124
+ let t = e.constructor;
125
+ if (t === void 0 || typeof t != "function") return !0;
126
+ let n = t.prototype;
127
+ return !(fe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
128
+ }
129
+ function me(e) {
130
+ return k(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
131
+ }
132
+ var he = /* @__PURE__*/ new Set([
133
+ "string",
134
+ "number",
135
+ "symbol"
136
+ ]);
137
+ function A(e) {
138
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
139
+ }
140
+ function j(e, t, n) {
141
+ let r = new e._zod.constr(t ?? e._zod.def);
142
+ return (!t || n?.parent) && (r._zod.parent = e), r;
143
+ }
144
+ function M(e) {
145
+ let t = e;
146
+ if (!t) return {};
147
+ if (typeof t == "string") return { error: () => t };
148
+ if (t?.message !== void 0) {
149
+ if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
150
+ t.error = t.message;
151
+ }
152
+ return delete t.message, typeof t.error == "string" ? {
153
+ ...t,
154
+ error: () => t.error
155
+ } : t;
156
+ }
157
+ function ge(e) {
158
+ return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
159
+ }
160
+ var _e = {
161
+ safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
162
+ int32: [-2147483648, 2147483647],
163
+ uint32: [0, 4294967295],
164
+ float32: [-34028234663852886e22, 34028234663852886e22],
165
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
166
+ };
167
+ function ve(e, t) {
168
+ let n = e._zod.def, r = n.checks;
169
+ if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
170
+ return j(e, O(e._zod.def, {
171
+ get shape() {
172
+ let e = {};
173
+ for (let r in t) {
174
+ if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
175
+ t[r] && (e[r] = n.shape[r]);
176
+ }
177
+ return D(this, "shape", e), e;
178
+ },
179
+ checks: []
180
+ }));
181
+ }
182
+ function ye(e, t) {
183
+ let n = e._zod.def, r = n.checks;
184
+ if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
185
+ return j(e, O(e._zod.def, {
186
+ get shape() {
187
+ let r = { ...e._zod.def.shape };
188
+ for (let e in t) {
189
+ if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
190
+ t[e] && delete r[e];
191
+ }
192
+ return D(this, "shape", r), r;
193
+ },
194
+ checks: []
195
+ }));
196
+ }
197
+ function be(e, t) {
198
+ if (!k(t)) throw Error("Invalid input to extend: expected a plain object");
199
+ let n = e._zod.def.checks;
200
+ if (n && n.length > 0) {
201
+ let n = e._zod.def.shape;
202
+ for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
203
+ }
204
+ return j(e, O(e._zod.def, { get shape() {
205
+ let n = {
206
+ ...e._zod.def.shape,
207
+ ...t
208
+ };
209
+ return D(this, "shape", n), n;
210
+ } }));
211
+ }
212
+ function xe(e, t) {
213
+ if (!k(t)) throw Error("Invalid input to safeExtend: expected a plain object");
214
+ return j(e, O(e._zod.def, { get shape() {
215
+ let n = {
216
+ ...e._zod.def.shape,
217
+ ...t
218
+ };
219
+ return D(this, "shape", n), n;
220
+ } }));
221
+ }
222
+ function Se(e, t) {
223
+ if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
224
+ return j(e, O(e._zod.def, {
225
+ get shape() {
226
+ let n = {
227
+ ...e._zod.def.shape,
228
+ ...t._zod.def.shape
229
+ };
230
+ return D(this, "shape", n), n;
231
+ },
232
+ get catchall() {
233
+ return t._zod.def.catchall;
234
+ },
235
+ checks: t._zod.def.checks ?? []
236
+ }));
237
+ }
238
+ function Ce(e, t, n) {
239
+ let r = t._zod.def.checks;
240
+ if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
241
+ return j(t, O(t._zod.def, {
242
+ get shape() {
243
+ let r = t._zod.def.shape, i = { ...r };
244
+ if (n) for (let t in n) {
245
+ if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
246
+ n[t] && (i[t] = e ? new e({
247
+ type: "optional",
248
+ innerType: r[t]
249
+ }) : r[t]);
250
+ }
251
+ else for (let t in r) i[t] = e ? new e({
252
+ type: "optional",
253
+ innerType: r[t]
254
+ }) : r[t];
255
+ return D(this, "shape", i), i;
256
+ },
257
+ checks: []
258
+ }));
259
+ }
260
+ function we(e, t, n) {
261
+ return j(t, O(t._zod.def, { get shape() {
262
+ let r = t._zod.def.shape, i = { ...r };
263
+ if (n) for (let t in n) {
264
+ if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
265
+ n[t] && (i[t] = new e({
266
+ type: "nonoptional",
267
+ innerType: r[t]
268
+ }));
269
+ }
270
+ else for (let t in r) i[t] = new e({
271
+ type: "nonoptional",
272
+ innerType: r[t]
273
+ });
274
+ return D(this, "shape", i), i;
275
+ } }));
276
+ }
277
+ function N(e, t = 0) {
278
+ if (e.aborted === !0) return !0;
279
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
280
+ return !1;
281
+ }
282
+ function Te(e, t = 0) {
283
+ if (e.aborted === !0) return !0;
284
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
285
+ return !1;
286
+ }
287
+ function P(e, t) {
288
+ return t.map((t) => {
289
+ var n;
290
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
291
+ });
292
+ }
293
+ function Ee(e) {
294
+ return typeof e == "string" ? e : e?.message;
295
+ }
296
+ function F(e, t, n) {
297
+ let r = e.message ? e.message : Ee(e.inst?._zod.def?.error?.(e)) ?? Ee(t?.error?.(e)) ?? Ee(n.customError?.(e)) ?? Ee(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
298
+ return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
299
+ }
300
+ function De(e) {
301
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
302
+ }
303
+ function Oe(...e) {
304
+ let [t, n, r] = e;
305
+ return typeof t == "string" ? {
306
+ message: t,
307
+ code: "custom",
308
+ input: n,
309
+ inst: r
310
+ } : { ...t };
311
+ }
312
+ //#endregion
313
+ //#region ../../node_modules/zod/v4/core/errors.js
314
+ var ke = (e, t) => {
315
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
316
+ value: e._zod,
317
+ enumerable: !1
318
+ }), Object.defineProperty(e, "issues", {
319
+ value: t,
320
+ enumerable: !1
321
+ }), e.message = JSON.stringify(t, re, 2), Object.defineProperty(e, "toString", {
322
+ value: () => e.message,
323
+ enumerable: !1
324
+ });
325
+ }, Ae = S("$ZodError", ke), je = S("$ZodError", ke, { Parent: Error });
326
+ function Me(e, t = (e) => e.message) {
327
+ let n = {}, r = [];
328
+ for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
329
+ return {
330
+ formErrors: r,
331
+ fieldErrors: n
332
+ };
333
+ }
334
+ function Ne(e, t = (e) => e.message) {
335
+ let n = { _errors: [] }, r = (e, i = []) => {
336
+ for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
337
+ else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
338
+ else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
339
+ else {
340
+ let e = [...i, ...a.path];
341
+ if (e.length === 0) n._errors.push(t(a));
342
+ else {
343
+ let r = n, i = 0;
344
+ for (; i < e.length;) {
345
+ let n = e[i];
346
+ i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++;
347
+ }
348
+ }
349
+ }
350
+ };
351
+ return r(e), n;
352
+ }
353
+ //#endregion
354
+ //#region ../../node_modules/zod/v4/core/parse.js
355
+ var Pe = (e) => (t, n, r, i) => {
356
+ let a = r ? {
357
+ ...r,
358
+ async: !1
359
+ } : { async: !1 }, o = t._zod.run({
360
+ value: n,
361
+ issues: []
362
+ }, a);
363
+ if (o instanceof Promise) throw new C();
364
+ if (o.issues.length) {
365
+ let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, T())));
366
+ throw de(t, i?.callee), t;
367
+ }
368
+ return o.value;
369
+ }, Fe = (e) => async (t, n, r, i) => {
370
+ let a = r ? {
371
+ ...r,
372
+ async: !0
373
+ } : { async: !0 }, o = t._zod.run({
374
+ value: n,
375
+ issues: []
376
+ }, a);
377
+ if (o instanceof Promise && (o = await o), o.issues.length) {
378
+ let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, T())));
379
+ throw de(t, i?.callee), t;
380
+ }
381
+ return o.value;
382
+ }, Ie = (e) => (t, n, r) => {
383
+ let i = r ? {
384
+ ...r,
385
+ async: !1
386
+ } : { async: !1 }, a = t._zod.run({
387
+ value: n,
388
+ issues: []
389
+ }, i);
390
+ if (a instanceof Promise) throw new C();
391
+ return a.issues.length ? {
392
+ success: !1,
393
+ error: new (e ?? Ae)(a.issues.map((e) => F(e, i, T())))
394
+ } : {
395
+ success: !0,
396
+ data: a.value
397
+ };
398
+ }, Le = /* @__PURE__*/ Ie(je), Re = (e) => async (t, n, r) => {
399
+ let i = r ? {
400
+ ...r,
401
+ async: !0
402
+ } : { async: !0 }, a = t._zod.run({
403
+ value: n,
404
+ issues: []
405
+ }, i);
406
+ return a instanceof Promise && (a = await a), a.issues.length ? {
407
+ success: !1,
408
+ error: new e(a.issues.map((e) => F(e, i, T())))
409
+ } : {
410
+ success: !0,
411
+ data: a.value
412
+ };
413
+ }, ze = /* @__PURE__*/ Re(je), Be = (e) => (t, n, r) => {
414
+ let i = r ? {
415
+ ...r,
416
+ direction: "backward"
417
+ } : { direction: "backward" };
418
+ return Pe(e)(t, n, i);
419
+ }, Ve = (e) => (t, n, r) => Pe(e)(t, n, r), He = (e) => async (t, n, r) => {
420
+ let i = r ? {
421
+ ...r,
422
+ direction: "backward"
423
+ } : { direction: "backward" };
424
+ return Fe(e)(t, n, i);
425
+ }, Ue = (e) => async (t, n, r) => Fe(e)(t, n, r), We = (e) => (t, n, r) => {
426
+ let i = r ? {
427
+ ...r,
428
+ direction: "backward"
429
+ } : { direction: "backward" };
430
+ return Ie(e)(t, n, i);
431
+ }, Ge = (e) => (t, n, r) => Ie(e)(t, n, r), Ke = (e) => async (t, n, r) => {
432
+ let i = r ? {
433
+ ...r,
434
+ direction: "backward"
435
+ } : { direction: "backward" };
436
+ return Re(e)(t, n, i);
437
+ }, qe = (e) => async (t, n, r) => Re(e)(t, n, r), Je = /^[cC][0-9a-z]{6,}$/, Ye = /^[0-9a-z]+$/, Xe = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ze = /^[0-9a-vA-V]{20}$/, Qe = /^[A-Za-z0-9]{27}$/, $e = /^[a-zA-Z0-9_-]{21}$/, et = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, tt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, nt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, rt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, it = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
438
+ function at() {
439
+ return new RegExp(it, "u");
440
+ }
441
+ var ot = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, st = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ct = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, lt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ut = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, dt = /^[A-Za-z0-9_-]*$/, ft = /^https?$/, pt = /^\+[1-9]\d{6,14}$/, mt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", ht = /*@__PURE__*/ RegExp(`^${mt}$`);
442
+ function gt(e) {
443
+ let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
444
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
445
+ }
446
+ function _t(e) {
447
+ return RegExp(`^${gt(e)}$`);
448
+ }
449
+ function vt(e) {
450
+ let t = gt({ precision: e.precision }), n = ["Z"];
451
+ e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
452
+ let r = `${t}(?:${n.join("|")})`;
453
+ return RegExp(`^${mt}T(?:${r})$`);
454
+ }
455
+ var yt = (e) => {
456
+ let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
457
+ return RegExp(`^${t}$`);
458
+ }, bt = /^-?\d+$/, xt = /^-?\d+(?:\.\d+)?$/, St = /^(?:true|false)$/i, Ct = /^null$/i, wt = /^[^A-Z]*$/, Tt = /^[^a-z]*$/, I = /*@__PURE__*/ S("$ZodCheck", (e, t) => {
459
+ var n;
460
+ e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
461
+ }), Et = {
462
+ number: "number",
463
+ bigint: "bigint",
464
+ object: "date"
465
+ }, Dt = /*@__PURE__*/ S("$ZodCheckLessThan", (e, t) => {
466
+ I.init(e, t);
467
+ let n = Et[typeof t.value];
468
+ e._zod.onattach.push((e) => {
469
+ let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
470
+ t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
471
+ }), e._zod.check = (r) => {
472
+ (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
473
+ origin: n,
474
+ code: "too_big",
475
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
476
+ input: r.value,
477
+ inclusive: t.inclusive,
478
+ inst: e,
479
+ continue: !t.abort
480
+ });
481
+ };
482
+ }), Ot = /*@__PURE__*/ S("$ZodCheckGreaterThan", (e, t) => {
483
+ I.init(e, t);
484
+ let n = Et[typeof t.value];
485
+ e._zod.onattach.push((e) => {
486
+ let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
487
+ t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
488
+ }), e._zod.check = (r) => {
489
+ (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
490
+ origin: n,
491
+ code: "too_small",
492
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
493
+ input: r.value,
494
+ inclusive: t.inclusive,
495
+ inst: e,
496
+ continue: !t.abort
497
+ });
498
+ };
499
+ }), kt = /*@__PURE__*/ S("$ZodCheckMultipleOf", (e, t) => {
500
+ I.init(e, t), e._zod.onattach.push((e) => {
501
+ var n;
502
+ (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
503
+ }), e._zod.check = (n) => {
504
+ if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
505
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : se(n.value, t.value) === 0) || n.issues.push({
506
+ origin: typeof n.value,
507
+ code: "not_multiple_of",
508
+ divisor: t.value,
509
+ input: n.value,
510
+ inst: e,
511
+ continue: !t.abort
512
+ });
513
+ };
514
+ }), At = /*@__PURE__*/ S("$ZodCheckNumberFormat", (e, t) => {
515
+ I.init(e, t), t.format = t.format || "float64";
516
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = _e[t.format];
517
+ e._zod.onattach.push((e) => {
518
+ let r = e._zod.bag;
519
+ r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = bt);
520
+ }), e._zod.check = (o) => {
521
+ let s = o.value;
522
+ if (n) {
523
+ if (!Number.isInteger(s)) {
524
+ o.issues.push({
525
+ expected: r,
526
+ format: t.format,
527
+ code: "invalid_type",
528
+ continue: !1,
529
+ input: s,
530
+ inst: e
531
+ });
532
+ return;
533
+ }
534
+ if (!Number.isSafeInteger(s)) {
535
+ s > 0 ? o.issues.push({
536
+ input: s,
537
+ code: "too_big",
538
+ maximum: 2 ** 53 - 1,
539
+ note: "Integers must be within the safe integer range.",
540
+ inst: e,
541
+ origin: r,
542
+ inclusive: !0,
543
+ continue: !t.abort
544
+ }) : o.issues.push({
545
+ input: s,
546
+ code: "too_small",
547
+ minimum: -(2 ** 53 - 1),
548
+ note: "Integers must be within the safe integer range.",
549
+ inst: e,
550
+ origin: r,
551
+ inclusive: !0,
552
+ continue: !t.abort
553
+ });
554
+ return;
555
+ }
556
+ }
557
+ s < i && o.issues.push({
558
+ origin: "number",
559
+ input: s,
560
+ code: "too_small",
561
+ minimum: i,
562
+ inclusive: !0,
563
+ inst: e,
564
+ continue: !t.abort
565
+ }), s > a && o.issues.push({
566
+ origin: "number",
567
+ input: s,
568
+ code: "too_big",
569
+ maximum: a,
570
+ inclusive: !0,
571
+ inst: e,
572
+ continue: !t.abort
573
+ });
574
+ };
575
+ }), jt = /*@__PURE__*/ S("$ZodCheckMaxLength", (e, t) => {
576
+ var n;
577
+ I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
578
+ let t = e.value;
579
+ return !ae(t) && t.length !== void 0;
580
+ }), e._zod.onattach.push((e) => {
581
+ let n = e._zod.bag.maximum ?? Infinity;
582
+ t.maximum < n && (e._zod.bag.maximum = t.maximum);
583
+ }), e._zod.check = (n) => {
584
+ let r = n.value;
585
+ if (r.length <= t.maximum) return;
586
+ let i = De(r);
587
+ n.issues.push({
588
+ origin: i,
589
+ code: "too_big",
590
+ maximum: t.maximum,
591
+ inclusive: !0,
592
+ input: r,
593
+ inst: e,
594
+ continue: !t.abort
595
+ });
596
+ };
597
+ }), Mt = /*@__PURE__*/ S("$ZodCheckMinLength", (e, t) => {
598
+ var n;
599
+ I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
600
+ let t = e.value;
601
+ return !ae(t) && t.length !== void 0;
602
+ }), e._zod.onattach.push((e) => {
603
+ let n = e._zod.bag.minimum ?? -Infinity;
604
+ t.minimum > n && (e._zod.bag.minimum = t.minimum);
605
+ }), e._zod.check = (n) => {
606
+ let r = n.value;
607
+ if (r.length >= t.minimum) return;
608
+ let i = De(r);
609
+ n.issues.push({
610
+ origin: i,
611
+ code: "too_small",
612
+ minimum: t.minimum,
613
+ inclusive: !0,
614
+ input: r,
615
+ inst: e,
616
+ continue: !t.abort
617
+ });
618
+ };
619
+ }), Nt = /*@__PURE__*/ S("$ZodCheckLengthEquals", (e, t) => {
620
+ var n;
621
+ I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
622
+ let t = e.value;
623
+ return !ae(t) && t.length !== void 0;
624
+ }), e._zod.onattach.push((e) => {
625
+ let n = e._zod.bag;
626
+ n.minimum = t.length, n.maximum = t.length, n.length = t.length;
627
+ }), e._zod.check = (n) => {
628
+ let r = n.value, i = r.length;
629
+ if (i === t.length) return;
630
+ let a = De(r), o = i > t.length;
631
+ n.issues.push({
632
+ origin: a,
633
+ ...o ? {
634
+ code: "too_big",
635
+ maximum: t.length
636
+ } : {
637
+ code: "too_small",
638
+ minimum: t.length
639
+ },
640
+ inclusive: !0,
641
+ exact: !0,
642
+ input: n.value,
643
+ inst: e,
644
+ continue: !t.abort
645
+ });
646
+ };
647
+ }), Pt = /*@__PURE__*/ S("$ZodCheckStringFormat", (e, t) => {
648
+ var n, r;
649
+ I.init(e, t), e._zod.onattach.push((e) => {
650
+ let n = e._zod.bag;
651
+ n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
652
+ }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
653
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
654
+ origin: "string",
655
+ code: "invalid_format",
656
+ format: t.format,
657
+ input: n.value,
658
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
659
+ inst: e,
660
+ continue: !t.abort
661
+ });
662
+ }) : (r = e._zod).check ?? (r.check = () => {});
663
+ }), Ft = /*@__PURE__*/ S("$ZodCheckRegex", (e, t) => {
664
+ Pt.init(e, t), e._zod.check = (n) => {
665
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
666
+ origin: "string",
667
+ code: "invalid_format",
668
+ format: "regex",
669
+ input: n.value,
670
+ pattern: t.pattern.toString(),
671
+ inst: e,
672
+ continue: !t.abort
673
+ });
674
+ };
675
+ }), It = /*@__PURE__*/ S("$ZodCheckLowerCase", (e, t) => {
676
+ t.pattern ??= wt, Pt.init(e, t);
677
+ }), Lt = /*@__PURE__*/ S("$ZodCheckUpperCase", (e, t) => {
678
+ t.pattern ??= Tt, Pt.init(e, t);
679
+ }), Rt = /*@__PURE__*/ S("$ZodCheckIncludes", (e, t) => {
680
+ I.init(e, t);
681
+ let n = A(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
682
+ t.pattern = r, e._zod.onattach.push((e) => {
683
+ let t = e._zod.bag;
684
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
685
+ }), e._zod.check = (n) => {
686
+ n.value.includes(t.includes, t.position) || n.issues.push({
687
+ origin: "string",
688
+ code: "invalid_format",
689
+ format: "includes",
690
+ includes: t.includes,
691
+ input: n.value,
692
+ inst: e,
693
+ continue: !t.abort
694
+ });
695
+ };
696
+ }), zt = /*@__PURE__*/ S("$ZodCheckStartsWith", (e, t) => {
697
+ I.init(e, t);
698
+ let n = RegExp(`^${A(t.prefix)}.*`);
699
+ t.pattern ??= n, e._zod.onattach.push((e) => {
700
+ let t = e._zod.bag;
701
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
702
+ }), e._zod.check = (n) => {
703
+ n.value.startsWith(t.prefix) || n.issues.push({
704
+ origin: "string",
705
+ code: "invalid_format",
706
+ format: "starts_with",
707
+ prefix: t.prefix,
708
+ input: n.value,
709
+ inst: e,
710
+ continue: !t.abort
711
+ });
712
+ };
713
+ }), Bt = /*@__PURE__*/ S("$ZodCheckEndsWith", (e, t) => {
714
+ I.init(e, t);
715
+ let n = RegExp(`.*${A(t.suffix)}$`);
716
+ t.pattern ??= n, e._zod.onattach.push((e) => {
717
+ let t = e._zod.bag;
718
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
719
+ }), e._zod.check = (n) => {
720
+ n.value.endsWith(t.suffix) || n.issues.push({
721
+ origin: "string",
722
+ code: "invalid_format",
723
+ format: "ends_with",
724
+ suffix: t.suffix,
725
+ input: n.value,
726
+ inst: e,
727
+ continue: !t.abort
728
+ });
729
+ };
730
+ }), Vt = /*@__PURE__*/ S("$ZodCheckOverwrite", (e, t) => {
731
+ I.init(e, t), e._zod.check = (e) => {
732
+ e.value = t.tx(e.value);
733
+ };
734
+ }), Ht = class {
735
+ constructor(e = []) {
736
+ this.content = [], this.indent = 0, this && (this.args = e);
737
+ }
738
+ indented(e) {
739
+ this.indent += 1, e(this), --this.indent;
740
+ }
741
+ write(e) {
742
+ if (typeof e == "function") {
743
+ e(this, { execution: "sync" }), e(this, { execution: "async" });
744
+ return;
745
+ }
746
+ let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
747
+ for (let e of r) this.content.push(e);
748
+ }
749
+ compile() {
750
+ let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
751
+ return new e(...t, n.join("\n"));
752
+ }
753
+ }, Ut = {
754
+ major: 4,
755
+ minor: 4,
756
+ patch: 3
757
+ }, L = /*@__PURE__*/ S("$ZodType", (e, t) => {
758
+ var n;
759
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ut;
760
+ let r = [...e._zod.def.checks ?? []];
761
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
762
+ for (let t of r) for (let n of t._zod.onattach) n(e);
763
+ if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
764
+ e._zod.run = e._zod.parse;
765
+ });
766
+ else {
767
+ let t = (e, t, n) => {
768
+ let r = N(e), i;
769
+ for (let a of t) {
770
+ if (a._zod.def.when) {
771
+ if (Te(e) || !a._zod.def.when(e)) continue;
772
+ } else if (r) continue;
773
+ let t = e.issues.length, o = a._zod.check(e);
774
+ if (o instanceof Promise && n?.async === !1) throw new C();
775
+ if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
776
+ await o, e.issues.length !== t && (r ||= N(e, t));
777
+ });
778
+ else {
779
+ if (e.issues.length === t) continue;
780
+ r ||= N(e, t);
781
+ }
782
+ }
783
+ return i ? i.then(() => e) : e;
784
+ }, n = (n, i, a) => {
785
+ if (N(n)) return n.aborted = !0, n;
786
+ let o = t(i, r, a);
787
+ if (o instanceof Promise) {
788
+ if (a.async === !1) throw new C();
789
+ return o.then((t) => e._zod.parse(t, a));
790
+ }
791
+ return e._zod.parse(o, a);
792
+ };
793
+ e._zod.run = (i, a) => {
794
+ if (a.skipChecks) return e._zod.parse(i, a);
795
+ if (a.direction === "backward") {
796
+ let t = e._zod.parse({
797
+ value: i.value,
798
+ issues: []
799
+ }, {
800
+ ...a,
801
+ skipChecks: !0
802
+ });
803
+ return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a);
804
+ }
805
+ let o = e._zod.parse(i, a);
806
+ if (o instanceof Promise) {
807
+ if (a.async === !1) throw new C();
808
+ return o.then((e) => t(e, r, a));
809
+ }
810
+ return t(o, r, a);
811
+ };
812
+ }
813
+ E(e, "~standard", () => ({
814
+ validate: (t) => {
815
+ try {
816
+ let n = Le(e, t);
817
+ return n.success ? { value: n.data } : { issues: n.error?.issues };
818
+ } catch {
819
+ return ze(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
820
+ }
821
+ },
822
+ vendor: "zod",
823
+ version: 1
824
+ }));
825
+ }), Wt = /*@__PURE__*/ S("$ZodString", (e, t) => {
826
+ L.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? yt(e._zod.bag), e._zod.parse = (n, r) => {
827
+ if (t.coerce) try {
828
+ n.value = String(n.value);
829
+ } catch {}
830
+ return typeof n.value == "string" || n.issues.push({
831
+ expected: "string",
832
+ code: "invalid_type",
833
+ input: n.value,
834
+ inst: e
835
+ }), n;
836
+ };
837
+ }), R = /*@__PURE__*/ S("$ZodStringFormat", (e, t) => {
838
+ Pt.init(e, t), Wt.init(e, t);
839
+ }), Gt = /*@__PURE__*/ S("$ZodGUID", (e, t) => {
840
+ t.pattern ??= tt, R.init(e, t);
841
+ }), Kt = /*@__PURE__*/ S("$ZodUUID", (e, t) => {
842
+ if (t.version) {
843
+ let e = {
844
+ v1: 1,
845
+ v2: 2,
846
+ v3: 3,
847
+ v4: 4,
848
+ v5: 5,
849
+ v6: 6,
850
+ v7: 7,
851
+ v8: 8
852
+ }[t.version];
853
+ if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
854
+ t.pattern ??= nt(e);
855
+ } else t.pattern ??= nt();
856
+ R.init(e, t);
857
+ }), qt = /*@__PURE__*/ S("$ZodEmail", (e, t) => {
858
+ t.pattern ??= rt, R.init(e, t);
859
+ }), Jt = /*@__PURE__*/ S("$ZodURL", (e, t) => {
860
+ R.init(e, t), e._zod.check = (n) => {
861
+ try {
862
+ let r = n.value.trim();
863
+ if (!t.normalize && t.protocol?.source === ft.source && !/^https?:\/\//i.test(r)) {
864
+ n.issues.push({
865
+ code: "invalid_format",
866
+ format: "url",
867
+ note: "Invalid URL format",
868
+ input: n.value,
869
+ inst: e,
870
+ continue: !t.abort
871
+ });
872
+ return;
873
+ }
874
+ let i = new URL(r);
875
+ t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
876
+ code: "invalid_format",
877
+ format: "url",
878
+ note: "Invalid hostname",
879
+ pattern: t.hostname.source,
880
+ input: n.value,
881
+ inst: e,
882
+ continue: !t.abort
883
+ })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(":") ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({
884
+ code: "invalid_format",
885
+ format: "url",
886
+ note: "Invalid protocol",
887
+ pattern: t.protocol.source,
888
+ input: n.value,
889
+ inst: e,
890
+ continue: !t.abort
891
+ })), t.normalize ? n.value = i.href : n.value = r;
892
+ return;
893
+ } catch {
894
+ n.issues.push({
895
+ code: "invalid_format",
896
+ format: "url",
897
+ input: n.value,
898
+ inst: e,
899
+ continue: !t.abort
900
+ });
901
+ }
902
+ };
903
+ }), Yt = /*@__PURE__*/ S("$ZodEmoji", (e, t) => {
904
+ t.pattern ??= at(), R.init(e, t);
905
+ }), Xt = /*@__PURE__*/ S("$ZodNanoID", (e, t) => {
906
+ t.pattern ??= $e, R.init(e, t);
907
+ }), Zt = /*@__PURE__*/ S("$ZodCUID", (e, t) => {
908
+ t.pattern ??= Je, R.init(e, t);
909
+ }), Qt = /*@__PURE__*/ S("$ZodCUID2", (e, t) => {
910
+ t.pattern ??= Ye, R.init(e, t);
911
+ }), $t = /*@__PURE__*/ S("$ZodULID", (e, t) => {
912
+ t.pattern ??= Xe, R.init(e, t);
913
+ }), en = /*@__PURE__*/ S("$ZodXID", (e, t) => {
914
+ t.pattern ??= Ze, R.init(e, t);
915
+ }), tn = /*@__PURE__*/ S("$ZodKSUID", (e, t) => {
916
+ t.pattern ??= Qe, R.init(e, t);
917
+ }), nn = /*@__PURE__*/ S("$ZodISODateTime", (e, t) => {
918
+ t.pattern ??= vt(t), R.init(e, t);
919
+ }), rn = /*@__PURE__*/ S("$ZodISODate", (e, t) => {
920
+ t.pattern ??= ht, R.init(e, t);
921
+ }), an = /*@__PURE__*/ S("$ZodISOTime", (e, t) => {
922
+ t.pattern ??= _t(t), R.init(e, t);
923
+ }), on = /*@__PURE__*/ S("$ZodISODuration", (e, t) => {
924
+ t.pattern ??= et, R.init(e, t);
925
+ }), sn = /*@__PURE__*/ S("$ZodIPv4", (e, t) => {
926
+ t.pattern ??= ot, R.init(e, t), e._zod.bag.format = "ipv4";
927
+ }), cn = /*@__PURE__*/ S("$ZodIPv6", (e, t) => {
928
+ t.pattern ??= st, R.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
929
+ try {
930
+ new URL(`http://[${n.value}]`);
931
+ } catch {
932
+ n.issues.push({
933
+ code: "invalid_format",
934
+ format: "ipv6",
935
+ input: n.value,
936
+ inst: e,
937
+ continue: !t.abort
938
+ });
939
+ }
940
+ };
941
+ }), ln = /*@__PURE__*/ S("$ZodCIDRv4", (e, t) => {
942
+ t.pattern ??= ct, R.init(e, t);
943
+ }), un = /*@__PURE__*/ S("$ZodCIDRv6", (e, t) => {
944
+ t.pattern ??= lt, R.init(e, t), e._zod.check = (n) => {
945
+ let r = n.value.split("/");
946
+ try {
947
+ if (r.length !== 2) throw Error();
948
+ let [e, t] = r;
949
+ if (!t) throw Error();
950
+ let n = Number(t);
951
+ if (`${n}` !== t || n < 0 || n > 128) throw Error();
952
+ new URL(`http://[${e}]`);
953
+ } catch {
954
+ n.issues.push({
955
+ code: "invalid_format",
956
+ format: "cidrv6",
957
+ input: n.value,
958
+ inst: e,
959
+ continue: !t.abort
960
+ });
961
+ }
962
+ };
963
+ });
964
+ function dn(e) {
965
+ if (e === "") return !0;
966
+ if (/\s/.test(e) || e.length % 4 != 0) return !1;
967
+ try {
968
+ return atob(e), !0;
969
+ } catch {
970
+ return !1;
971
+ }
972
+ }
973
+ var fn = /*@__PURE__*/ S("$ZodBase64", (e, t) => {
974
+ t.pattern ??= ut, R.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
975
+ dn(n.value) || n.issues.push({
976
+ code: "invalid_format",
977
+ format: "base64",
978
+ input: n.value,
979
+ inst: e,
980
+ continue: !t.abort
981
+ });
982
+ };
983
+ });
984
+ function pn(e) {
985
+ if (!dt.test(e)) return !1;
986
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
987
+ return dn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
988
+ }
989
+ var mn = /*@__PURE__*/ S("$ZodBase64URL", (e, t) => {
990
+ t.pattern ??= dt, R.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
991
+ pn(n.value) || n.issues.push({
992
+ code: "invalid_format",
993
+ format: "base64url",
994
+ input: n.value,
995
+ inst: e,
996
+ continue: !t.abort
997
+ });
998
+ };
999
+ }), hn = /*@__PURE__*/ S("$ZodE164", (e, t) => {
1000
+ t.pattern ??= pt, R.init(e, t);
1001
+ });
1002
+ function gn(e, t = null) {
1003
+ try {
1004
+ let n = e.split(".");
1005
+ if (n.length !== 3) return !1;
1006
+ let [r] = n;
1007
+ if (!r) return !1;
1008
+ let i = JSON.parse(atob(r));
1009
+ return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
1010
+ } catch {
1011
+ return !1;
1012
+ }
1013
+ }
1014
+ var _n = /*@__PURE__*/ S("$ZodJWT", (e, t) => {
1015
+ R.init(e, t), e._zod.check = (n) => {
1016
+ gn(n.value, t.alg) || n.issues.push({
1017
+ code: "invalid_format",
1018
+ format: "jwt",
1019
+ input: n.value,
1020
+ inst: e,
1021
+ continue: !t.abort
1022
+ });
1023
+ };
1024
+ }), vn = /*@__PURE__*/ S("$ZodNumber", (e, t) => {
1025
+ L.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? xt, e._zod.parse = (n, r) => {
1026
+ if (t.coerce) try {
1027
+ n.value = Number(n.value);
1028
+ } catch {}
1029
+ let i = n.value;
1030
+ if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
1031
+ let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : "Infinity" : void 0;
1032
+ return n.issues.push({
1033
+ expected: "number",
1034
+ code: "invalid_type",
1035
+ input: i,
1036
+ inst: e,
1037
+ ...a ? { received: a } : {}
1038
+ }), n;
1039
+ };
1040
+ }), yn = /*@__PURE__*/ S("$ZodNumberFormat", (e, t) => {
1041
+ At.init(e, t), vn.init(e, t);
1042
+ }), bn = /*@__PURE__*/ S("$ZodBoolean", (e, t) => {
1043
+ L.init(e, t), e._zod.pattern = St, e._zod.parse = (n, r) => {
1044
+ if (t.coerce) try {
1045
+ n.value = !!n.value;
1046
+ } catch {}
1047
+ let i = n.value;
1048
+ return typeof i == "boolean" || n.issues.push({
1049
+ expected: "boolean",
1050
+ code: "invalid_type",
1051
+ input: i,
1052
+ inst: e
1053
+ }), n;
1054
+ };
1055
+ }), xn = /*@__PURE__*/ S("$ZodNull", (e, t) => {
1056
+ L.init(e, t), e._zod.pattern = Ct, e._zod.values = new Set([null]), e._zod.parse = (t, n) => {
1057
+ let r = t.value;
1058
+ return r === null || t.issues.push({
1059
+ expected: "null",
1060
+ code: "invalid_type",
1061
+ input: r,
1062
+ inst: e
1063
+ }), t;
1064
+ };
1065
+ }), Sn = /*@__PURE__*/ S("$ZodUnknown", (e, t) => {
1066
+ L.init(e, t), e._zod.parse = (e) => e;
1067
+ }), Cn = /*@__PURE__*/ S("$ZodNever", (e, t) => {
1068
+ L.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1069
+ expected: "never",
1070
+ code: "invalid_type",
1071
+ input: t.value,
1072
+ inst: e
1073
+ }), t);
1074
+ });
1075
+ function wn(e, t, n) {
1076
+ e.issues.length && t.issues.push(...P(n, e.issues)), t.value[n] = e.value;
1077
+ }
1078
+ var Tn = /*@__PURE__*/ S("$ZodArray", (e, t) => {
1079
+ L.init(e, t), e._zod.parse = (n, r) => {
1080
+ let i = n.value;
1081
+ if (!Array.isArray(i)) return n.issues.push({
1082
+ expected: "array",
1083
+ code: "invalid_type",
1084
+ input: i,
1085
+ inst: e
1086
+ }), n;
1087
+ n.value = Array(i.length);
1088
+ let a = [];
1089
+ for (let e = 0; e < i.length; e++) {
1090
+ let o = i[e], s = t.element._zod.run({
1091
+ value: o,
1092
+ issues: []
1093
+ }, r);
1094
+ s instanceof Promise ? a.push(s.then((t) => wn(t, n, e))) : wn(s, n, e);
1095
+ }
1096
+ return a.length ? Promise.all(a).then(() => n) : n;
1097
+ };
1098
+ });
1099
+ function En(e, t, n, r, i, a) {
1100
+ let o = n in r;
1101
+ if (e.issues.length) {
1102
+ if (i && a && !o) return;
1103
+ t.issues.push(...P(n, e.issues));
1104
+ }
1105
+ if (!o && !i) {
1106
+ e.issues.length || t.issues.push({
1107
+ code: "invalid_type",
1108
+ expected: "nonoptional",
1109
+ input: void 0,
1110
+ path: [n]
1111
+ });
1112
+ return;
1113
+ }
1114
+ e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
1115
+ }
1116
+ function Dn(e) {
1117
+ let t = Object.keys(e.shape);
1118
+ for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
1119
+ let n = ge(e.shape);
1120
+ return {
1121
+ ...e,
1122
+ keys: t,
1123
+ keySet: new Set(t),
1124
+ numKeys: t.length,
1125
+ optionalKeys: new Set(n)
1126
+ };
1127
+ }
1128
+ function On(e, t, n, r, i, a) {
1129
+ let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
1130
+ for (let i in t) {
1131
+ if (i === "__proto__" || s.has(i)) continue;
1132
+ if (l === "never") {
1133
+ o.push(i);
1134
+ continue;
1135
+ }
1136
+ let a = c.run({
1137
+ value: t[i],
1138
+ issues: []
1139
+ }, r);
1140
+ a instanceof Promise ? e.push(a.then((e) => En(e, n, i, t, u, d))) : En(a, n, i, t, u, d);
1141
+ }
1142
+ return o.length && n.issues.push({
1143
+ code: "unrecognized_keys",
1144
+ keys: o,
1145
+ input: t,
1146
+ inst: a
1147
+ }), e.length ? Promise.all(e).then(() => n) : n;
1148
+ }
1149
+ var kn = /*@__PURE__*/ S("$ZodObject", (e, t) => {
1150
+ if (L.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1151
+ let e = t.shape;
1152
+ Object.defineProperty(t, "shape", { get: () => {
1153
+ let n = { ...e };
1154
+ return Object.defineProperty(t, "shape", { value: n }), n;
1155
+ } });
1156
+ }
1157
+ let n = ie(() => Dn(t));
1158
+ E(e._zod, "propValues", () => {
1159
+ let e = t.shape, n = {};
1160
+ for (let t in e) {
1161
+ let r = e[t]._zod;
1162
+ if (r.values) {
1163
+ n[t] ?? (n[t] = /* @__PURE__ */ new Set());
1164
+ for (let e of r.values) n[t].add(e);
1165
+ }
1166
+ }
1167
+ return n;
1168
+ });
1169
+ let r = fe, i = t.catchall, a;
1170
+ e._zod.parse = (t, o) => {
1171
+ a ??= n.value;
1172
+ let s = t.value;
1173
+ if (!r(s)) return t.issues.push({
1174
+ expected: "object",
1175
+ code: "invalid_type",
1176
+ input: s,
1177
+ inst: e
1178
+ }), t;
1179
+ t.value = {};
1180
+ let c = [], l = a.shape;
1181
+ for (let e of a.keys) {
1182
+ let n = l[e], r = n._zod.optin === "optional", i = n._zod.optout === "optional", a = n._zod.run({
1183
+ value: s[e],
1184
+ issues: []
1185
+ }, o);
1186
+ a instanceof Promise ? c.push(a.then((n) => En(n, t, e, s, r, i))) : En(a, t, e, s, r, i);
1187
+ }
1188
+ return i ? On(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
1189
+ };
1190
+ }), An = /*@__PURE__*/ S("$ZodObjectJIT", (e, t) => {
1191
+ kn.init(e, t);
1192
+ let n = e._zod.parse, r = ie(() => Dn(t)), i = (e) => {
1193
+ let t = new Ht([
1194
+ "shape",
1195
+ "payload",
1196
+ "ctx"
1197
+ ]), n = r.value, i = (e) => {
1198
+ let t = le(e);
1199
+ return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
1200
+ };
1201
+ t.write("const input = payload.value;");
1202
+ let a = Object.create(null), o = 0;
1203
+ for (let e of n.keys) a[e] = `key_${o++}`;
1204
+ t.write("const newResult = {};");
1205
+ for (let r of n.keys) {
1206
+ let n = a[r], o = le(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
1207
+ t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
1208
+ if (${n}.issues.length) {
1209
+ if (${o} in input) {
1210
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1211
+ ...iss,
1212
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
1213
+ })));
1214
+ }
1215
+ }
1216
+
1217
+ if (${n}.value === undefined) {
1218
+ if (${o} in input) {
1219
+ newResult[${o}] = undefined;
1220
+ }
1221
+ } else {
1222
+ newResult[${o}] = ${n}.value;
1223
+ }
1224
+
1225
+ `) : c ? t.write(`
1226
+ if (${n}.issues.length) {
1227
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1228
+ ...iss,
1229
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
1230
+ })));
1231
+ }
1232
+
1233
+ if (${n}.value === undefined) {
1234
+ if (${o} in input) {
1235
+ newResult[${o}] = undefined;
1236
+ }
1237
+ } else {
1238
+ newResult[${o}] = ${n}.value;
1239
+ }
1240
+
1241
+ `) : t.write(`
1242
+ const ${n}_present = ${o} in input;
1243
+ if (${n}.issues.length) {
1244
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1245
+ ...iss,
1246
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
1247
+ })));
1248
+ }
1249
+ if (!${n}_present && !${n}.issues.length) {
1250
+ payload.issues.push({
1251
+ code: "invalid_type",
1252
+ expected: "nonoptional",
1253
+ input: undefined,
1254
+ path: [${o}]
1255
+ });
1256
+ }
1257
+
1258
+ if (${n}_present) {
1259
+ if (${n}.value === undefined) {
1260
+ newResult[${o}] = undefined;
1261
+ } else {
1262
+ newResult[${o}] = ${n}.value;
1263
+ }
1264
+ }
1265
+
1266
+ `);
1267
+ }
1268
+ t.write("payload.value = newResult;"), t.write("return payload;");
1269
+ let s = t.compile();
1270
+ return (t, n) => s(e, t, n);
1271
+ }, a, o = fe, s = !w.jitless, c = s && pe.value, l = t.catchall, u;
1272
+ e._zod.parse = (d, f) => {
1273
+ u ??= r.value;
1274
+ let p = d.value;
1275
+ return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? On([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
1276
+ expected: "object",
1277
+ code: "invalid_type",
1278
+ input: p,
1279
+ inst: e
1280
+ }), d);
1281
+ };
1282
+ });
1283
+ function jn(e, t, n, r) {
1284
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1285
+ let i = e.filter((e) => !N(e));
1286
+ return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1287
+ code: "invalid_union",
1288
+ input: t.value,
1289
+ inst: n,
1290
+ errors: e.map((e) => e.issues.map((e) => F(e, r, T())))
1291
+ }), t);
1292
+ }
1293
+ var Mn = /*@__PURE__*/ S("$ZodUnion", (e, t) => {
1294
+ L.init(e, t), E(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), E(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), E(e._zod, "values", () => {
1295
+ if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
1296
+ }), E(e._zod, "pattern", () => {
1297
+ if (t.options.every((e) => e._zod.pattern)) {
1298
+ let e = t.options.map((e) => e._zod.pattern);
1299
+ return RegExp(`^(${e.map((e) => oe(e.source)).join("|")})$`);
1300
+ }
1301
+ });
1302
+ let n = t.options.length === 1 ? t.options[0]._zod.run : null;
1303
+ e._zod.parse = (r, i) => {
1304
+ if (n) return n(r, i);
1305
+ let a = !1, o = [];
1306
+ for (let e of t.options) {
1307
+ let t = e._zod.run({
1308
+ value: r.value,
1309
+ issues: []
1310
+ }, i);
1311
+ if (t instanceof Promise) o.push(t), a = !0;
1312
+ else {
1313
+ if (t.issues.length === 0) return t;
1314
+ o.push(t);
1315
+ }
1316
+ }
1317
+ return a ? Promise.all(o).then((t) => jn(t, r, e, i)) : jn(o, r, e, i);
1318
+ };
1319
+ }), Nn = /*@__PURE__*/ S("$ZodDiscriminatedUnion", (e, t) => {
1320
+ t.inclusive = !1, Mn.init(e, t);
1321
+ let n = e._zod.parse;
1322
+ E(e._zod, "propValues", () => {
1323
+ let e = {};
1324
+ for (let n of t.options) {
1325
+ let r = n._zod.propValues;
1326
+ if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);
1327
+ for (let [t, n] of Object.entries(r)) {
1328
+ e[t] || (e[t] = /* @__PURE__ */ new Set());
1329
+ for (let r of n) e[t].add(r);
1330
+ }
1331
+ }
1332
+ return e;
1333
+ });
1334
+ let r = ie(() => {
1335
+ let e = t.options, n = /* @__PURE__ */ new Map();
1336
+ for (let r of e) {
1337
+ let e = r._zod.propValues?.[t.discriminator];
1338
+ if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);
1339
+ for (let t of e) {
1340
+ if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`);
1341
+ n.set(t, r);
1342
+ }
1343
+ }
1344
+ return n;
1345
+ });
1346
+ e._zod.parse = (i, a) => {
1347
+ let o = i.value;
1348
+ if (!fe(o)) return i.issues.push({
1349
+ code: "invalid_type",
1350
+ expected: "object",
1351
+ input: o,
1352
+ inst: e
1353
+ }), i;
1354
+ let s = r.value.get(o?.[t.discriminator]);
1355
+ return s ? s._zod.run(i, a) : t.unionFallback || a.direction === "backward" ? n(i, a) : (i.issues.push({
1356
+ code: "invalid_union",
1357
+ errors: [],
1358
+ note: "No matching discriminator",
1359
+ discriminator: t.discriminator,
1360
+ options: Array.from(r.value.keys()),
1361
+ input: o,
1362
+ path: [t.discriminator],
1363
+ inst: e
1364
+ }), i);
1365
+ };
1366
+ }), Pn = /*@__PURE__*/ S("$ZodIntersection", (e, t) => {
1367
+ L.init(e, t), e._zod.parse = (e, n) => {
1368
+ let r = e.value, i = t.left._zod.run({
1369
+ value: r,
1370
+ issues: []
1371
+ }, n), a = t.right._zod.run({
1372
+ value: r,
1373
+ issues: []
1374
+ }, n);
1375
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => In(e, t, n)) : In(e, i, a);
1376
+ };
1377
+ });
1378
+ function Fn(e, t) {
1379
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1380
+ valid: !0,
1381
+ data: e
1382
+ };
1383
+ if (k(e) && k(t)) {
1384
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1385
+ ...e,
1386
+ ...t
1387
+ };
1388
+ for (let n of r) {
1389
+ let r = Fn(e[n], t[n]);
1390
+ if (!r.valid) return {
1391
+ valid: !1,
1392
+ mergeErrorPath: [n, ...r.mergeErrorPath]
1393
+ };
1394
+ i[n] = r.data;
1395
+ }
1396
+ return {
1397
+ valid: !0,
1398
+ data: i
1399
+ };
1400
+ }
1401
+ if (Array.isArray(e) && Array.isArray(t)) {
1402
+ if (e.length !== t.length) return {
1403
+ valid: !1,
1404
+ mergeErrorPath: []
1405
+ };
1406
+ let n = [];
1407
+ for (let r = 0; r < e.length; r++) {
1408
+ let i = e[r], a = t[r], o = Fn(i, a);
1409
+ if (!o.valid) return {
1410
+ valid: !1,
1411
+ mergeErrorPath: [r, ...o.mergeErrorPath]
1412
+ };
1413
+ n.push(o.data);
1414
+ }
1415
+ return {
1416
+ valid: !0,
1417
+ data: n
1418
+ };
1419
+ }
1420
+ return {
1421
+ valid: !1,
1422
+ mergeErrorPath: []
1423
+ };
1424
+ }
1425
+ function In(e, t, n) {
1426
+ let r = /* @__PURE__ */ new Map(), i;
1427
+ for (let n of t.issues) if (n.code === "unrecognized_keys") {
1428
+ i ??= n;
1429
+ for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
1430
+ } else e.issues.push(n);
1431
+ for (let t of n.issues) if (t.code === "unrecognized_keys") for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0;
1432
+ else e.issues.push(t);
1433
+ let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
1434
+ if (a.length && i && e.issues.push({
1435
+ ...i,
1436
+ keys: a
1437
+ }), N(e)) return e;
1438
+ let o = Fn(t.value, n.value);
1439
+ if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
1440
+ return e.value = o.data, e;
1441
+ }
1442
+ var Ln = /*@__PURE__*/ S("$ZodRecord", (e, t) => {
1443
+ L.init(e, t), e._zod.parse = (n, r) => {
1444
+ let i = n.value;
1445
+ if (!k(i)) return n.issues.push({
1446
+ expected: "record",
1447
+ code: "invalid_type",
1448
+ input: i,
1449
+ inst: e
1450
+ }), n;
1451
+ let a = [], o = t.keyType._zod.values;
1452
+ if (o) {
1453
+ n.value = {};
1454
+ let s = /* @__PURE__ */ new Set();
1455
+ for (let c of o) if (typeof c == "string" || typeof c == "number" || typeof c == "symbol") {
1456
+ s.add(typeof c == "number" ? c.toString() : c);
1457
+ let o = t.keyType._zod.run({
1458
+ value: c,
1459
+ issues: []
1460
+ }, r);
1461
+ if (o instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1462
+ if (o.issues.length) {
1463
+ n.issues.push({
1464
+ code: "invalid_key",
1465
+ origin: "record",
1466
+ issues: o.issues.map((e) => F(e, r, T())),
1467
+ input: c,
1468
+ path: [c],
1469
+ inst: e
1470
+ });
1471
+ continue;
1472
+ }
1473
+ let l = o.value, u = t.valueType._zod.run({
1474
+ value: i[c],
1475
+ issues: []
1476
+ }, r);
1477
+ u instanceof Promise ? a.push(u.then((e) => {
1478
+ e.issues.length && n.issues.push(...P(c, e.issues)), n.value[l] = e.value;
1479
+ })) : (u.issues.length && n.issues.push(...P(c, u.issues)), n.value[l] = u.value);
1480
+ }
1481
+ let c;
1482
+ for (let e in i) s.has(e) || (c ??= [], c.push(e));
1483
+ c && c.length > 0 && n.issues.push({
1484
+ code: "unrecognized_keys",
1485
+ input: i,
1486
+ inst: e,
1487
+ keys: c
1488
+ });
1489
+ } else {
1490
+ n.value = {};
1491
+ for (let o of Reflect.ownKeys(i)) {
1492
+ if (o === "__proto__" || !Object.prototype.propertyIsEnumerable.call(i, o)) continue;
1493
+ let s = t.keyType._zod.run({
1494
+ value: o,
1495
+ issues: []
1496
+ }, r);
1497
+ if (s instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1498
+ if (typeof o == "string" && xt.test(o) && s.issues.length) {
1499
+ let e = t.keyType._zod.run({
1500
+ value: Number(o),
1501
+ issues: []
1502
+ }, r);
1503
+ if (e instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1504
+ e.issues.length === 0 && (s = e);
1505
+ }
1506
+ if (s.issues.length) {
1507
+ t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
1508
+ code: "invalid_key",
1509
+ origin: "record",
1510
+ issues: s.issues.map((e) => F(e, r, T())),
1511
+ input: o,
1512
+ path: [o],
1513
+ inst: e
1514
+ });
1515
+ continue;
1516
+ }
1517
+ let c = t.valueType._zod.run({
1518
+ value: i[o],
1519
+ issues: []
1520
+ }, r);
1521
+ c instanceof Promise ? a.push(c.then((e) => {
1522
+ e.issues.length && n.issues.push(...P(o, e.issues)), n.value[s.value] = e.value;
1523
+ })) : (c.issues.length && n.issues.push(...P(o, c.issues)), n.value[s.value] = c.value);
1524
+ }
1525
+ }
1526
+ return a.length ? Promise.all(a).then(() => n) : n;
1527
+ };
1528
+ }), Rn = /*@__PURE__*/ S("$ZodEnum", (e, t) => {
1529
+ L.init(e, t);
1530
+ let n = ne(t.entries), r = new Set(n);
1531
+ e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => he.has(typeof e)).map((e) => typeof e == "string" ? A(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
1532
+ let a = t.value;
1533
+ return r.has(a) || t.issues.push({
1534
+ code: "invalid_value",
1535
+ values: n,
1536
+ input: a,
1537
+ inst: e
1538
+ }), t;
1539
+ };
1540
+ }), zn = /*@__PURE__*/ S("$ZodLiteral", (e, t) => {
1541
+ if (L.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
1542
+ let n = new Set(t.values);
1543
+ e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? A(e) : e ? A(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
1544
+ let a = r.value;
1545
+ return n.has(a) || r.issues.push({
1546
+ code: "invalid_value",
1547
+ values: t.values,
1548
+ input: a,
1549
+ inst: e
1550
+ }), r;
1551
+ };
1552
+ }), Bn = /*@__PURE__*/ S("$ZodTransform", (e, t) => {
1553
+ L.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
1554
+ if (r.direction === "backward") throw new te(e.constructor.name);
1555
+ let i = t.transform(n.value, n);
1556
+ if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
1557
+ if (i instanceof Promise) throw new C();
1558
+ return n.value = i, n.fallback = !0, n;
1559
+ };
1560
+ });
1561
+ function Vn(e, t) {
1562
+ return t === void 0 && (e.issues.length || e.fallback) ? {
1563
+ issues: [],
1564
+ value: void 0
1565
+ } : e;
1566
+ }
1567
+ var Hn = /*@__PURE__*/ S("$ZodOptional", (e, t) => {
1568
+ L.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", E(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), E(e._zod, "pattern", () => {
1569
+ let e = t.innerType._zod.pattern;
1570
+ return e ? RegExp(`^(${oe(e.source)})?$`) : void 0;
1571
+ }), e._zod.parse = (e, n) => {
1572
+ if (t.innerType._zod.optin === "optional") {
1573
+ let r = e.value, i = t.innerType._zod.run(e, n);
1574
+ return i instanceof Promise ? i.then((e) => Vn(e, r)) : Vn(i, r);
1575
+ }
1576
+ return e.value === void 0 ? e : t.innerType._zod.run(e, n);
1577
+ };
1578
+ }), Un = /*@__PURE__*/ S("$ZodExactOptional", (e, t) => {
1579
+ Hn.init(e, t), E(e._zod, "values", () => t.innerType._zod.values), E(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1580
+ }), Wn = /*@__PURE__*/ S("$ZodNullable", (e, t) => {
1581
+ L.init(e, t), E(e._zod, "optin", () => t.innerType._zod.optin), E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "pattern", () => {
1582
+ let e = t.innerType._zod.pattern;
1583
+ return e ? RegExp(`^(${oe(e.source)}|null)$`) : void 0;
1584
+ }), E(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1585
+ }), Gn = /*@__PURE__*/ S("$ZodDefault", (e, t) => {
1586
+ L.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1587
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1588
+ if (e.value === void 0) return e.value = t.defaultValue, e;
1589
+ let r = t.innerType._zod.run(e, n);
1590
+ return r instanceof Promise ? r.then((e) => Kn(e, t)) : Kn(r, t);
1591
+ };
1592
+ });
1593
+ function Kn(e, t) {
1594
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1595
+ }
1596
+ var qn = /*@__PURE__*/ S("$ZodPrefault", (e, t) => {
1597
+ L.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1598
+ }), Jn = /*@__PURE__*/ S("$ZodNonOptional", (e, t) => {
1599
+ L.init(e, t), E(e._zod, "values", () => {
1600
+ let e = t.innerType._zod.values;
1601
+ return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
1602
+ }), e._zod.parse = (n, r) => {
1603
+ let i = t.innerType._zod.run(n, r);
1604
+ return i instanceof Promise ? i.then((t) => Yn(t, e)) : Yn(i, e);
1605
+ };
1606
+ });
1607
+ function Yn(e, t) {
1608
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1609
+ code: "invalid_type",
1610
+ expected: "nonoptional",
1611
+ input: e.value,
1612
+ inst: t
1613
+ }), e;
1614
+ }
1615
+ var Xn = /*@__PURE__*/ S("$ZodCatch", (e, t) => {
1616
+ L.init(e, t), e._zod.optin = "optional", E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1617
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1618
+ let r = t.innerType._zod.run(e, n);
1619
+ return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1620
+ ...e,
1621
+ error: { issues: r.issues.map((e) => F(e, n, T())) },
1622
+ input: e.value
1623
+ }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1624
+ ...e,
1625
+ error: { issues: r.issues.map((e) => F(e, n, T())) },
1626
+ input: e.value
1627
+ }), e.issues = [], e.fallback = !0), e);
1628
+ };
1629
+ }), Zn = /*@__PURE__*/ S("$ZodPipe", (e, t) => {
1630
+ L.init(e, t), E(e._zod, "values", () => t.in._zod.values), E(e._zod, "optin", () => t.in._zod.optin), E(e._zod, "optout", () => t.out._zod.optout), E(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
1631
+ if (n.direction === "backward") {
1632
+ let r = t.out._zod.run(e, n);
1633
+ return r instanceof Promise ? r.then((e) => Qn(e, t.in, n)) : Qn(r, t.in, n);
1634
+ }
1635
+ let r = t.in._zod.run(e, n);
1636
+ return r instanceof Promise ? r.then((e) => Qn(e, t.out, n)) : Qn(r, t.out, n);
1637
+ };
1638
+ });
1639
+ function Qn(e, t, n) {
1640
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
1641
+ value: e.value,
1642
+ issues: e.issues,
1643
+ fallback: e.fallback
1644
+ }, n);
1645
+ }
1646
+ var $n = /*@__PURE__*/ S("$ZodReadonly", (e, t) => {
1647
+ L.init(e, t), E(e._zod, "propValues", () => t.innerType._zod.propValues), E(e._zod, "values", () => t.innerType._zod.values), E(e._zod, "optin", () => t.innerType?._zod?.optin), E(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
1648
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1649
+ let r = t.innerType._zod.run(e, n);
1650
+ return r instanceof Promise ? r.then(er) : er(r);
1651
+ };
1652
+ });
1653
+ function er(e) {
1654
+ return e.value = Object.freeze(e.value), e;
1655
+ }
1656
+ var tr = /*@__PURE__*/ S("$ZodCustom", (e, t) => {
1657
+ I.init(e, t), L.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1658
+ let r = n.value, i = t.fn(r);
1659
+ if (i instanceof Promise) return i.then((t) => nr(t, n, r, e));
1660
+ nr(i, n, r, e);
1661
+ };
1662
+ });
1663
+ function nr(e, t, n, r) {
1664
+ if (!e) {
1665
+ let e = {
1666
+ code: "custom",
1667
+ input: n,
1668
+ inst: r,
1669
+ path: [...r._zod.def.path ?? []],
1670
+ continue: !r._zod.def.abort
1671
+ };
1672
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Oe(e));
1673
+ }
1674
+ }
1675
+ //#endregion
1676
+ //#region ../../node_modules/zod/v4/core/registries.js
1677
+ var rr, ir = class {
1678
+ constructor() {
1679
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1680
+ }
1681
+ add(e, ...t) {
1682
+ let n = t[0];
1683
+ return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
1684
+ }
1685
+ clear() {
1686
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1687
+ }
1688
+ remove(e) {
1689
+ let t = this._map.get(e);
1690
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
1691
+ }
1692
+ get(e) {
1693
+ let t = e._zod.parent;
1694
+ if (t) {
1695
+ let n = { ...this.get(t) ?? {} };
1696
+ delete n.id;
1697
+ let r = {
1698
+ ...n,
1699
+ ...this._map.get(e)
1700
+ };
1701
+ return Object.keys(r).length ? r : void 0;
1702
+ }
1703
+ return this._map.get(e);
1704
+ }
1705
+ has(e) {
1706
+ return this._map.has(e);
1707
+ }
1708
+ };
1709
+ function ar() {
1710
+ return new ir();
1711
+ }
1712
+ (rr = globalThis).__zod_globalRegistry ?? (rr.__zod_globalRegistry = ar());
1713
+ var or = globalThis.__zod_globalRegistry;
1714
+ //#endregion
1715
+ //#region ../../node_modules/zod/v4/core/api.js
1716
+ // @__NO_SIDE_EFFECTS__
1717
+ function sr(e, t) {
1718
+ return new e({
1719
+ type: "string",
1720
+ ...M(t)
1721
+ });
1722
+ }
1723
+ // @__NO_SIDE_EFFECTS__
1724
+ function cr(e, t) {
1725
+ return new e({
1726
+ type: "string",
1727
+ format: "email",
1728
+ check: "string_format",
1729
+ abort: !1,
1730
+ ...M(t)
1731
+ });
1732
+ }
1733
+ // @__NO_SIDE_EFFECTS__
1734
+ function lr(e, t) {
1735
+ return new e({
1736
+ type: "string",
1737
+ format: "guid",
1738
+ check: "string_format",
1739
+ abort: !1,
1740
+ ...M(t)
1741
+ });
1742
+ }
1743
+ // @__NO_SIDE_EFFECTS__
1744
+ function ur(e, t) {
1745
+ return new e({
1746
+ type: "string",
1747
+ format: "uuid",
1748
+ check: "string_format",
1749
+ abort: !1,
1750
+ ...M(t)
1751
+ });
1752
+ }
1753
+ // @__NO_SIDE_EFFECTS__
1754
+ function dr(e, t) {
1755
+ return new e({
1756
+ type: "string",
1757
+ format: "uuid",
1758
+ check: "string_format",
1759
+ abort: !1,
1760
+ version: "v4",
1761
+ ...M(t)
1762
+ });
1763
+ }
1764
+ // @__NO_SIDE_EFFECTS__
1765
+ function fr(e, t) {
1766
+ return new e({
1767
+ type: "string",
1768
+ format: "uuid",
1769
+ check: "string_format",
1770
+ abort: !1,
1771
+ version: "v6",
1772
+ ...M(t)
1773
+ });
1774
+ }
1775
+ // @__NO_SIDE_EFFECTS__
1776
+ function pr(e, t) {
1777
+ return new e({
1778
+ type: "string",
1779
+ format: "uuid",
1780
+ check: "string_format",
1781
+ abort: !1,
1782
+ version: "v7",
1783
+ ...M(t)
1784
+ });
1785
+ }
1786
+ // @__NO_SIDE_EFFECTS__
1787
+ function mr(e, t) {
1788
+ return new e({
1789
+ type: "string",
1790
+ format: "url",
1791
+ check: "string_format",
1792
+ abort: !1,
1793
+ ...M(t)
1794
+ });
1795
+ }
1796
+ // @__NO_SIDE_EFFECTS__
1797
+ function hr(e, t) {
1798
+ return new e({
1799
+ type: "string",
1800
+ format: "emoji",
1801
+ check: "string_format",
1802
+ abort: !1,
1803
+ ...M(t)
1804
+ });
1805
+ }
1806
+ // @__NO_SIDE_EFFECTS__
1807
+ function gr(e, t) {
1808
+ return new e({
1809
+ type: "string",
1810
+ format: "nanoid",
1811
+ check: "string_format",
1812
+ abort: !1,
1813
+ ...M(t)
1814
+ });
1815
+ }
1816
+ // @__NO_SIDE_EFFECTS__
1817
+ function _r(e, t) {
1818
+ return new e({
1819
+ type: "string",
1820
+ format: "cuid",
1821
+ check: "string_format",
1822
+ abort: !1,
1823
+ ...M(t)
1824
+ });
1825
+ }
1826
+ // @__NO_SIDE_EFFECTS__
1827
+ function vr(e, t) {
1828
+ return new e({
1829
+ type: "string",
1830
+ format: "cuid2",
1831
+ check: "string_format",
1832
+ abort: !1,
1833
+ ...M(t)
1834
+ });
1835
+ }
1836
+ // @__NO_SIDE_EFFECTS__
1837
+ function yr(e, t) {
1838
+ return new e({
1839
+ type: "string",
1840
+ format: "ulid",
1841
+ check: "string_format",
1842
+ abort: !1,
1843
+ ...M(t)
1844
+ });
1845
+ }
1846
+ // @__NO_SIDE_EFFECTS__
1847
+ function br(e, t) {
1848
+ return new e({
1849
+ type: "string",
1850
+ format: "xid",
1851
+ check: "string_format",
1852
+ abort: !1,
1853
+ ...M(t)
1854
+ });
1855
+ }
1856
+ // @__NO_SIDE_EFFECTS__
1857
+ function xr(e, t) {
1858
+ return new e({
1859
+ type: "string",
1860
+ format: "ksuid",
1861
+ check: "string_format",
1862
+ abort: !1,
1863
+ ...M(t)
1864
+ });
1865
+ }
1866
+ // @__NO_SIDE_EFFECTS__
1867
+ function Sr(e, t) {
1868
+ return new e({
1869
+ type: "string",
1870
+ format: "ipv4",
1871
+ check: "string_format",
1872
+ abort: !1,
1873
+ ...M(t)
1874
+ });
1875
+ }
1876
+ // @__NO_SIDE_EFFECTS__
1877
+ function Cr(e, t) {
1878
+ return new e({
1879
+ type: "string",
1880
+ format: "ipv6",
1881
+ check: "string_format",
1882
+ abort: !1,
1883
+ ...M(t)
1884
+ });
1885
+ }
1886
+ // @__NO_SIDE_EFFECTS__
1887
+ function wr(e, t) {
1888
+ return new e({
1889
+ type: "string",
1890
+ format: "cidrv4",
1891
+ check: "string_format",
1892
+ abort: !1,
1893
+ ...M(t)
1894
+ });
1895
+ }
1896
+ // @__NO_SIDE_EFFECTS__
1897
+ function Tr(e, t) {
1898
+ return new e({
1899
+ type: "string",
1900
+ format: "cidrv6",
1901
+ check: "string_format",
1902
+ abort: !1,
1903
+ ...M(t)
1904
+ });
1905
+ }
1906
+ // @__NO_SIDE_EFFECTS__
1907
+ function Er(e, t) {
1908
+ return new e({
1909
+ type: "string",
1910
+ format: "base64",
1911
+ check: "string_format",
1912
+ abort: !1,
1913
+ ...M(t)
1914
+ });
1915
+ }
1916
+ // @__NO_SIDE_EFFECTS__
1917
+ function Dr(e, t) {
1918
+ return new e({
1919
+ type: "string",
1920
+ format: "base64url",
1921
+ check: "string_format",
1922
+ abort: !1,
1923
+ ...M(t)
1924
+ });
1925
+ }
1926
+ // @__NO_SIDE_EFFECTS__
1927
+ function Or(e, t) {
1928
+ return new e({
1929
+ type: "string",
1930
+ format: "e164",
1931
+ check: "string_format",
1932
+ abort: !1,
1933
+ ...M(t)
1934
+ });
1935
+ }
1936
+ // @__NO_SIDE_EFFECTS__
1937
+ function kr(e, t) {
1938
+ return new e({
1939
+ type: "string",
1940
+ format: "jwt",
1941
+ check: "string_format",
1942
+ abort: !1,
1943
+ ...M(t)
1944
+ });
1945
+ }
1946
+ // @__NO_SIDE_EFFECTS__
1947
+ function Ar(e, t) {
1948
+ return new e({
1949
+ type: "string",
1950
+ format: "datetime",
1951
+ check: "string_format",
1952
+ offset: !1,
1953
+ local: !1,
1954
+ precision: null,
1955
+ ...M(t)
1956
+ });
1957
+ }
1958
+ // @__NO_SIDE_EFFECTS__
1959
+ function jr(e, t) {
1960
+ return new e({
1961
+ type: "string",
1962
+ format: "date",
1963
+ check: "string_format",
1964
+ ...M(t)
1965
+ });
1966
+ }
1967
+ // @__NO_SIDE_EFFECTS__
1968
+ function Mr(e, t) {
1969
+ return new e({
1970
+ type: "string",
1971
+ format: "time",
1972
+ check: "string_format",
1973
+ precision: null,
1974
+ ...M(t)
1975
+ });
1976
+ }
1977
+ // @__NO_SIDE_EFFECTS__
1978
+ function Nr(e, t) {
1979
+ return new e({
1980
+ type: "string",
1981
+ format: "duration",
1982
+ check: "string_format",
1983
+ ...M(t)
1984
+ });
1985
+ }
1986
+ // @__NO_SIDE_EFFECTS__
1987
+ function Pr(e, t) {
1988
+ return new e({
1989
+ type: "number",
1990
+ checks: [],
1991
+ ...M(t)
1992
+ });
1993
+ }
1994
+ // @__NO_SIDE_EFFECTS__
1995
+ function Fr(e, t) {
1996
+ return new e({
1997
+ type: "number",
1998
+ check: "number_format",
1999
+ abort: !1,
2000
+ format: "safeint",
2001
+ ...M(t)
2002
+ });
2003
+ }
2004
+ // @__NO_SIDE_EFFECTS__
2005
+ function Ir(e, t) {
2006
+ return new e({
2007
+ type: "boolean",
2008
+ ...M(t)
2009
+ });
2010
+ }
2011
+ // @__NO_SIDE_EFFECTS__
2012
+ function Lr(e, t) {
2013
+ return new e({
2014
+ type: "null",
2015
+ ...M(t)
2016
+ });
2017
+ }
2018
+ // @__NO_SIDE_EFFECTS__
2019
+ function Rr(e) {
2020
+ return new e({ type: "unknown" });
2021
+ }
2022
+ // @__NO_SIDE_EFFECTS__
2023
+ function zr(e, t) {
2024
+ return new e({
2025
+ type: "never",
2026
+ ...M(t)
2027
+ });
2028
+ }
2029
+ // @__NO_SIDE_EFFECTS__
2030
+ function Br(e, t) {
2031
+ return new Dt({
2032
+ check: "less_than",
2033
+ ...M(t),
2034
+ value: e,
2035
+ inclusive: !1
2036
+ });
2037
+ }
2038
+ // @__NO_SIDE_EFFECTS__
2039
+ function Vr(e, t) {
2040
+ return new Dt({
2041
+ check: "less_than",
2042
+ ...M(t),
2043
+ value: e,
2044
+ inclusive: !0
2045
+ });
2046
+ }
2047
+ // @__NO_SIDE_EFFECTS__
2048
+ function Hr(e, t) {
2049
+ return new Ot({
2050
+ check: "greater_than",
2051
+ ...M(t),
2052
+ value: e,
2053
+ inclusive: !1
2054
+ });
2055
+ }
2056
+ // @__NO_SIDE_EFFECTS__
2057
+ function Ur(e, t) {
2058
+ return new Ot({
2059
+ check: "greater_than",
2060
+ ...M(t),
2061
+ value: e,
2062
+ inclusive: !0
2063
+ });
2064
+ }
2065
+ // @__NO_SIDE_EFFECTS__
2066
+ function Wr(e, t) {
2067
+ return new kt({
2068
+ check: "multiple_of",
2069
+ ...M(t),
2070
+ value: e
2071
+ });
2072
+ }
2073
+ // @__NO_SIDE_EFFECTS__
2074
+ function Gr(e, t) {
2075
+ return new jt({
2076
+ check: "max_length",
2077
+ ...M(t),
2078
+ maximum: e
2079
+ });
2080
+ }
2081
+ // @__NO_SIDE_EFFECTS__
2082
+ function Kr(e, t) {
2083
+ return new Mt({
2084
+ check: "min_length",
2085
+ ...M(t),
2086
+ minimum: e
2087
+ });
2088
+ }
2089
+ // @__NO_SIDE_EFFECTS__
2090
+ function qr(e, t) {
2091
+ return new Nt({
2092
+ check: "length_equals",
2093
+ ...M(t),
2094
+ length: e
2095
+ });
2096
+ }
2097
+ // @__NO_SIDE_EFFECTS__
2098
+ function Jr(e, t) {
2099
+ return new Ft({
2100
+ check: "string_format",
2101
+ format: "regex",
2102
+ ...M(t),
2103
+ pattern: e
2104
+ });
2105
+ }
2106
+ // @__NO_SIDE_EFFECTS__
2107
+ function Yr(e) {
2108
+ return new It({
2109
+ check: "string_format",
2110
+ format: "lowercase",
2111
+ ...M(e)
2112
+ });
2113
+ }
2114
+ // @__NO_SIDE_EFFECTS__
2115
+ function Xr(e) {
2116
+ return new Lt({
2117
+ check: "string_format",
2118
+ format: "uppercase",
2119
+ ...M(e)
2120
+ });
2121
+ }
2122
+ // @__NO_SIDE_EFFECTS__
2123
+ function Zr(e, t) {
2124
+ return new Rt({
2125
+ check: "string_format",
2126
+ format: "includes",
2127
+ ...M(t),
2128
+ includes: e
2129
+ });
2130
+ }
2131
+ // @__NO_SIDE_EFFECTS__
2132
+ function Qr(e, t) {
2133
+ return new zt({
2134
+ check: "string_format",
2135
+ format: "starts_with",
2136
+ ...M(t),
2137
+ prefix: e
2138
+ });
2139
+ }
2140
+ // @__NO_SIDE_EFFECTS__
2141
+ function $r(e, t) {
2142
+ return new Bt({
2143
+ check: "string_format",
2144
+ format: "ends_with",
2145
+ ...M(t),
2146
+ suffix: e
2147
+ });
2148
+ }
2149
+ // @__NO_SIDE_EFFECTS__
2150
+ function z(e) {
2151
+ return new Vt({
2152
+ check: "overwrite",
2153
+ tx: e
2154
+ });
2155
+ }
2156
+ // @__NO_SIDE_EFFECTS__
2157
+ function ei(e) {
2158
+ return /* @__PURE__ */ z((t) => t.normalize(e));
2159
+ }
2160
+ // @__NO_SIDE_EFFECTS__
2161
+ function ti() {
2162
+ return /* @__PURE__ */ z((e) => e.trim());
2163
+ }
2164
+ // @__NO_SIDE_EFFECTS__
2165
+ function ni() {
2166
+ return /* @__PURE__ */ z((e) => e.toLowerCase());
2167
+ }
2168
+ // @__NO_SIDE_EFFECTS__
2169
+ function ri() {
2170
+ return /* @__PURE__ */ z((e) => e.toUpperCase());
2171
+ }
2172
+ // @__NO_SIDE_EFFECTS__
2173
+ function ii() {
2174
+ return /* @__PURE__ */ z((e) => ue(e));
2175
+ }
2176
+ // @__NO_SIDE_EFFECTS__
2177
+ function ai(e, t, n) {
2178
+ return new e({
2179
+ type: "array",
2180
+ element: t,
2181
+ ...M(n)
2182
+ });
2183
+ }
2184
+ // @__NO_SIDE_EFFECTS__
2185
+ function oi(e, t, n) {
2186
+ return new e({
2187
+ type: "custom",
2188
+ check: "custom",
2189
+ fn: t,
2190
+ ...M(n)
2191
+ });
2192
+ }
2193
+ // @__NO_SIDE_EFFECTS__
2194
+ function si(e, t) {
2195
+ let n = /* @__PURE__ */ ci((t) => (t.addIssue = (e) => {
2196
+ if (typeof e == "string") t.issues.push(Oe(e, t.value, n._zod.def));
2197
+ else {
2198
+ let r = e;
2199
+ r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Oe(r));
2200
+ }
2201
+ }, e(t.value, t)), t);
2202
+ return n;
2203
+ }
2204
+ // @__NO_SIDE_EFFECTS__
2205
+ function ci(e, t) {
2206
+ let n = new I({
2207
+ check: "custom",
2208
+ ...M(t)
2209
+ });
2210
+ return n._zod.check = e, n;
2211
+ }
2212
+ //#endregion
2213
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
2214
+ function li(e) {
2215
+ let t = e?.target ?? "draft-2020-12";
2216
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2217
+ processors: e.processors ?? {},
2218
+ metadataRegistry: e?.metadata ?? or,
2219
+ target: t,
2220
+ unrepresentable: e?.unrepresentable ?? "throw",
2221
+ override: e?.override ?? (() => {}),
2222
+ io: e?.io ?? "output",
2223
+ counter: 0,
2224
+ seen: /* @__PURE__ */ new Map(),
2225
+ cycles: e?.cycles ?? "ref",
2226
+ reused: e?.reused ?? "inline",
2227
+ external: e?.external ?? void 0
2228
+ };
2229
+ }
2230
+ function B(e, t, n = {
2231
+ path: [],
2232
+ schemaPath: []
2233
+ }) {
2234
+ var r;
2235
+ let i = e._zod.def, a = t.seen.get(e);
2236
+ if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
2237
+ let o = {
2238
+ schema: {},
2239
+ count: 1,
2240
+ cycle: void 0,
2241
+ path: n.path
2242
+ };
2243
+ t.seen.set(e, o);
2244
+ let s = e._zod.toJSONSchema?.();
2245
+ if (s) o.schema = s;
2246
+ else {
2247
+ let r = {
2248
+ ...n,
2249
+ schemaPath: [...n.schemaPath, e],
2250
+ path: n.path
2251
+ };
2252
+ if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
2253
+ else {
2254
+ let n = o.schema, a = t.processors[i.type];
2255
+ if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
2256
+ a(e, t, n, r);
2257
+ }
2258
+ let a = e._zod.parent;
2259
+ a && (o.ref ||= a, B(a, t, r), t.seen.get(a).isParent = !0);
2260
+ }
2261
+ let c = t.metadataRegistry.get(e);
2262
+ return c && Object.assign(o.schema, c), t.io === "input" && V(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2263
+ }
2264
+ function ui(e, t) {
2265
+ let n = e.seen.get(t);
2266
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2267
+ let r = /* @__PURE__ */ new Map();
2268
+ for (let t of e.seen.entries()) {
2269
+ let n = e.metadataRegistry.get(t[0])?.id;
2270
+ if (n) {
2271
+ let e = r.get(n);
2272
+ if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2273
+ r.set(n, t[0]);
2274
+ }
2275
+ }
2276
+ let i = (t) => {
2277
+ let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
2278
+ if (e.external) {
2279
+ let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
2280
+ if (n) return { ref: i(n) };
2281
+ let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2282
+ return t[1].defId = a, {
2283
+ defId: a,
2284
+ ref: `${i("__shared")}#/${r}/${a}`
2285
+ };
2286
+ }
2287
+ if (t[1] === n) return { ref: "#" };
2288
+ let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`;
2289
+ return {
2290
+ defId: a,
2291
+ ref: i + a
2292
+ };
2293
+ }, a = (e) => {
2294
+ if (e[1].schema.$ref) return;
2295
+ let t = e[1], { ref: n, defId: r } = i(e);
2296
+ t.def = { ...t.schema }, r && (t.defId = r);
2297
+ let a = t.schema;
2298
+ for (let e in a) delete a[e];
2299
+ a.$ref = n;
2300
+ };
2301
+ if (e.cycles === "throw") for (let t of e.seen.entries()) {
2302
+ let e = t[1];
2303
+ if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
2304
+
2305
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2306
+ }
2307
+ for (let n of e.seen.entries()) {
2308
+ let r = n[1];
2309
+ if (t === n[0]) {
2310
+ a(n);
2311
+ continue;
2312
+ }
2313
+ if (e.external) {
2314
+ let r = e.external.registry.get(n[0])?.id;
2315
+ if (t !== n[0] && r) {
2316
+ a(n);
2317
+ continue;
2318
+ }
2319
+ }
2320
+ if (e.metadataRegistry.get(n[0])?.id) {
2321
+ a(n);
2322
+ continue;
2323
+ }
2324
+ if (r.cycle) {
2325
+ a(n);
2326
+ continue;
2327
+ }
2328
+ if (r.count > 1 && e.reused === "ref") {
2329
+ a(n);
2330
+ continue;
2331
+ }
2332
+ }
2333
+ }
2334
+ function di(e, t) {
2335
+ let n = e.seen.get(t);
2336
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2337
+ let r = (t) => {
2338
+ let n = e.seen.get(t);
2339
+ if (n.ref === null) return;
2340
+ let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
2341
+ if (n.ref = null, o) {
2342
+ r(o);
2343
+ let n = e.seen.get(o), s = n.schema;
2344
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === "$ref" || e === "allOf" || e in a || delete i[e];
2345
+ if (s.$ref && n.def) for (let e in i) e === "$ref" || e === "allOf" || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
2346
+ }
2347
+ let s = t._zod.parent;
2348
+ if (s && s !== o) {
2349
+ r(s);
2350
+ let t = e.seen.get(s);
2351
+ if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
2352
+ }
2353
+ e.override({
2354
+ zodSchema: t,
2355
+ jsonSchema: i,
2356
+ path: n.path ?? []
2357
+ });
2358
+ };
2359
+ for (let t of [...e.seen.entries()].reverse()) r(t[0]);
2360
+ let i = {};
2361
+ if (e.target === "draft-2020-12" ? i.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? i.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? i.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2362
+ let n = e.external.registry.get(t)?.id;
2363
+ if (!n) throw Error("Schema is missing an `id` property");
2364
+ i.$id = e.external.uri(n);
2365
+ }
2366
+ Object.assign(i, n.def ?? n.schema);
2367
+ let a = e.metadataRegistry.get(t)?.id;
2368
+ a !== void 0 && i.id === a && delete i.id;
2369
+ let o = e.external?.defs ?? {};
2370
+ for (let t of e.seen.entries()) {
2371
+ let e = t[1];
2372
+ e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def);
2373
+ }
2374
+ e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
2375
+ try {
2376
+ let n = JSON.parse(JSON.stringify(i));
2377
+ return Object.defineProperty(n, "~standard", {
2378
+ value: {
2379
+ ...t["~standard"],
2380
+ jsonSchema: {
2381
+ input: pi(t, "input", e.processors),
2382
+ output: pi(t, "output", e.processors)
2383
+ }
2384
+ },
2385
+ enumerable: !1,
2386
+ writable: !1
2387
+ }), n;
2388
+ } catch {
2389
+ throw Error("Error converting schema to JSON.");
2390
+ }
2391
+ }
2392
+ function V(e, t) {
2393
+ let n = t ?? { seen: /* @__PURE__ */ new Set() };
2394
+ if (n.seen.has(e)) return !1;
2395
+ n.seen.add(e);
2396
+ let r = e._zod.def;
2397
+ if (r.type === "transform") return !0;
2398
+ if (r.type === "array") return V(r.element, n);
2399
+ if (r.type === "set") return V(r.valueType, n);
2400
+ if (r.type === "lazy") return V(r.getter(), n);
2401
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return V(r.innerType, n);
2402
+ if (r.type === "intersection") return V(r.left, n) || V(r.right, n);
2403
+ if (r.type === "record" || r.type === "map") return V(r.keyType, n) || V(r.valueType, n);
2404
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : V(r.in, n) || V(r.out, n);
2405
+ if (r.type === "object") {
2406
+ for (let e in r.shape) if (V(r.shape[e], n)) return !0;
2407
+ return !1;
2408
+ }
2409
+ if (r.type === "union") {
2410
+ for (let e of r.options) if (V(e, n)) return !0;
2411
+ return !1;
2412
+ }
2413
+ if (r.type === "tuple") {
2414
+ for (let e of r.items) if (V(e, n)) return !0;
2415
+ return !!(r.rest && V(r.rest, n));
2416
+ }
2417
+ return !1;
2418
+ }
2419
+ var fi = (e, t = {}) => (n) => {
2420
+ let r = li({
2421
+ ...n,
2422
+ processors: t
2423
+ });
2424
+ return B(e, r), ui(r, e), di(r, e);
2425
+ }, pi = (e, t, n = {}) => (r) => {
2426
+ let { libraryOptions: i, target: a } = r ?? {}, o = li({
2427
+ ...i ?? {},
2428
+ target: a,
2429
+ io: t,
2430
+ processors: n
2431
+ });
2432
+ return B(e, o), ui(o, e), di(o, e);
2433
+ }, mi = {
2434
+ guid: "uuid",
2435
+ url: "uri",
2436
+ datetime: "date-time",
2437
+ json_string: "json-string",
2438
+ regex: ""
2439
+ }, hi = (e, t, n, r) => {
2440
+ let i = n;
2441
+ i.type = "string";
2442
+ let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
2443
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = mi[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
2444
+ let e = [...c];
2445
+ e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
2446
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2447
+ pattern: e.source
2448
+ }))]);
2449
+ }
2450
+ }, gi = (e, t, n, r) => {
2451
+ let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
2452
+ typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
2453
+ let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
2454
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
2455
+ }, _i = (e, t, n, r) => {
2456
+ n.type = "boolean";
2457
+ }, vi = (e, t, n, r) => {
2458
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
2459
+ }, yi = (e, t, n, r) => {
2460
+ n.not = {};
2461
+ }, bi = (e, t, n, r) => {
2462
+ let i = e._zod.def, a = ne(i.entries);
2463
+ a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
2464
+ }, xi = (e, t, n, r) => {
2465
+ let i = e._zod.def, a = [];
2466
+ for (let e of i.values) if (e === void 0) {
2467
+ if (t.unrepresentable === "throw") throw Error("Literal `undefined` cannot be represented in JSON Schema");
2468
+ } else if (typeof e == "bigint") {
2469
+ if (t.unrepresentable === "throw") throw Error("BigInt literals cannot be represented in JSON Schema");
2470
+ a.push(Number(e));
2471
+ } else a.push(e);
2472
+ if (a.length !== 0) if (a.length === 1) {
2473
+ let e = a[0];
2474
+ n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
2475
+ } else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
2476
+ }, Si = (e, t, n, r) => {
2477
+ if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
2478
+ }, Ci = (e, t, n, r) => {
2479
+ if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
2480
+ }, wi = (e, t, n, r) => {
2481
+ let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
2482
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = B(a.element, t, {
2483
+ ...r,
2484
+ path: [...r.path, "items"]
2485
+ });
2486
+ }, Ti = (e, t, n, r) => {
2487
+ let i = n, a = e._zod.def;
2488
+ i.type = "object", i.properties = {};
2489
+ let o = a.shape;
2490
+ for (let e in o) i.properties[e] = B(o[e], t, {
2491
+ ...r,
2492
+ path: [
2493
+ ...r.path,
2494
+ "properties",
2495
+ e
2496
+ ]
2497
+ });
2498
+ let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
2499
+ let n = a.shape[e]._zod;
2500
+ return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
2501
+ }));
2502
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = B(a.catchall, t, {
2503
+ ...r,
2504
+ path: [...r.path, "additionalProperties"]
2505
+ })) : t.io === "output" && (i.additionalProperties = !1);
2506
+ }, Ei = (e, t, n, r) => {
2507
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => B(e, t, {
2508
+ ...r,
2509
+ path: [
2510
+ ...r.path,
2511
+ a ? "oneOf" : "anyOf",
2512
+ n
2513
+ ]
2514
+ }));
2515
+ a ? n.oneOf = o : n.anyOf = o;
2516
+ }, Di = (e, t, n, r) => {
2517
+ let i = e._zod.def, a = B(i.left, t, {
2518
+ ...r,
2519
+ path: [
2520
+ ...r.path,
2521
+ "allOf",
2522
+ 0
2523
+ ]
2524
+ }), o = B(i.right, t, {
2525
+ ...r,
2526
+ path: [
2527
+ ...r.path,
2528
+ "allOf",
2529
+ 1
2530
+ ]
2531
+ }), s = (e) => "allOf" in e && Object.keys(e).length === 1;
2532
+ n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
2533
+ }, Oi = (e, t, n, r) => {
2534
+ let i = n, a = e._zod.def;
2535
+ i.type = "object";
2536
+ let o = a.keyType, s = o._zod.bag?.patterns;
2537
+ if (a.mode === "loose" && s && s.size > 0) {
2538
+ let e = B(a.valueType, t, {
2539
+ ...r,
2540
+ path: [
2541
+ ...r.path,
2542
+ "patternProperties",
2543
+ "*"
2544
+ ]
2545
+ });
2546
+ i.patternProperties = {};
2547
+ for (let t of s) i.patternProperties[t.source] = e;
2548
+ } else (t.target === "draft-07" || t.target === "draft-2020-12") && (i.propertyNames = B(a.keyType, t, {
2549
+ ...r,
2550
+ path: [...r.path, "propertyNames"]
2551
+ })), i.additionalProperties = B(a.valueType, t, {
2552
+ ...r,
2553
+ path: [...r.path, "additionalProperties"]
2554
+ });
2555
+ let c = o._zod.values;
2556
+ if (c) {
2557
+ let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
2558
+ e.length > 0 && (i.required = e);
2559
+ }
2560
+ }, ki = (e, t, n, r) => {
2561
+ let i = e._zod.def, a = B(i.innerType, t, r), o = t.seen.get(e);
2562
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
2563
+ }, Ai = (e, t, n, r) => {
2564
+ let i = e._zod.def;
2565
+ B(i.innerType, t, r);
2566
+ let a = t.seen.get(e);
2567
+ a.ref = i.innerType;
2568
+ }, ji = (e, t, n, r) => {
2569
+ let i = e._zod.def;
2570
+ B(i.innerType, t, r);
2571
+ let a = t.seen.get(e);
2572
+ a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
2573
+ }, Mi = (e, t, n, r) => {
2574
+ let i = e._zod.def;
2575
+ B(i.innerType, t, r);
2576
+ let a = t.seen.get(e);
2577
+ a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
2578
+ }, Ni = (e, t, n, r) => {
2579
+ let i = e._zod.def;
2580
+ B(i.innerType, t, r);
2581
+ let a = t.seen.get(e);
2582
+ a.ref = i.innerType;
2583
+ let o;
2584
+ try {
2585
+ o = i.catchValue(void 0);
2586
+ } catch {
2587
+ throw Error("Dynamic catch values are not supported in JSON Schema");
2588
+ }
2589
+ n.default = o;
2590
+ }, Pi = (e, t, n, r) => {
2591
+ let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
2592
+ B(o, t, r);
2593
+ let s = t.seen.get(e);
2594
+ s.ref = o;
2595
+ }, Fi = (e, t, n, r) => {
2596
+ let i = e._zod.def;
2597
+ B(i.innerType, t, r);
2598
+ let a = t.seen.get(e);
2599
+ a.ref = i.innerType, n.readOnly = !0;
2600
+ }, Ii = (e, t, n, r) => {
2601
+ let i = e._zod.def;
2602
+ B(i.innerType, t, r);
2603
+ let a = t.seen.get(e);
2604
+ a.ref = i.innerType;
2605
+ }, Li = /*@__PURE__*/ S("ZodISODateTime", (e, t) => {
2606
+ nn.init(e, t), G.init(e, t);
2607
+ });
2608
+ function Ri(e) {
2609
+ return /* @__PURE__ */ Ar(Li, e);
2610
+ }
2611
+ var zi = /*@__PURE__*/ S("ZodISODate", (e, t) => {
2612
+ rn.init(e, t), G.init(e, t);
2613
+ });
2614
+ function Bi(e) {
2615
+ return /* @__PURE__ */ jr(zi, e);
2616
+ }
2617
+ var Vi = /*@__PURE__*/ S("ZodISOTime", (e, t) => {
2618
+ an.init(e, t), G.init(e, t);
2619
+ });
2620
+ function Hi(e) {
2621
+ return /* @__PURE__ */ Mr(Vi, e);
2622
+ }
2623
+ var Ui = /*@__PURE__*/ S("ZodISODuration", (e, t) => {
2624
+ on.init(e, t), G.init(e, t);
2625
+ });
2626
+ function Wi(e) {
2627
+ return /* @__PURE__ */ Nr(Ui, e);
2628
+ }
2629
+ var H = /*@__PURE__*/ S("ZodError", (e, t) => {
2630
+ Ae.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2631
+ format: { value: (t) => Ne(e, t) },
2632
+ flatten: { value: (t) => Me(e, t) },
2633
+ addIssue: { value: (t) => {
2634
+ e.issues.push(t), e.message = JSON.stringify(e.issues, re, 2);
2635
+ } },
2636
+ addIssues: { value: (t) => {
2637
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, re, 2);
2638
+ } },
2639
+ isEmpty: { get() {
2640
+ return e.issues.length === 0;
2641
+ } }
2642
+ });
2643
+ }, { Parent: Error }), Gi = /* @__PURE__ */ Pe(H), Ki = /* @__PURE__ */ Fe(H), qi = /* @__PURE__ */ Ie(H), Ji = /* @__PURE__ */ Re(H), Yi = /* @__PURE__ */ Be(H), Xi = /* @__PURE__ */ Ve(H), Zi = /* @__PURE__ */ He(H), Qi = /* @__PURE__ */ Ue(H), $i = /* @__PURE__ */ We(H), ea = /* @__PURE__ */ Ge(H), ta = /* @__PURE__ */ Ke(H), na = /* @__PURE__ */ qe(H), ra = /* @__PURE__ */ new WeakMap();
2644
+ function ia(e, t, n) {
2645
+ let r = Object.getPrototypeOf(e), i = ra.get(r);
2646
+ if (i || (i = /* @__PURE__ */ new Set(), ra.set(r, i)), !i.has(t)) {
2647
+ i.add(t);
2648
+ for (let e in n) {
2649
+ let t = n[e];
2650
+ Object.defineProperty(r, e, {
2651
+ configurable: !0,
2652
+ enumerable: !1,
2653
+ get() {
2654
+ let n = t.bind(this);
2655
+ return Object.defineProperty(this, e, {
2656
+ configurable: !0,
2657
+ writable: !0,
2658
+ enumerable: !0,
2659
+ value: n
2660
+ }), n;
2661
+ },
2662
+ set(t) {
2663
+ Object.defineProperty(this, e, {
2664
+ configurable: !0,
2665
+ writable: !0,
2666
+ enumerable: !0,
2667
+ value: t
2668
+ });
2669
+ }
2670
+ });
2671
+ }
2672
+ }
2673
+ }
2674
+ var U = /*@__PURE__*/ S("ZodType", (e, t) => (L.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
2675
+ input: pi(e, "input"),
2676
+ output: pi(e, "output")
2677
+ } }), e.toJSONSchema = fi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Gi(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => qi(e, t, n), e.parseAsync = async (t, n) => Ki(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Ji(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Yi(e, t, n), e.decode = (t, n) => Xi(e, t, n), e.encodeAsync = async (t, n) => Zi(e, t, n), e.decodeAsync = async (t, n) => Qi(e, t, n), e.safeEncode = (t, n) => $i(e, t, n), e.safeDecode = (t, n) => ea(e, t, n), e.safeEncodeAsync = async (t, n) => ta(e, t, n), e.safeDecodeAsync = async (t, n) => na(e, t, n), ia(e, "ZodType", {
2678
+ check(...e) {
2679
+ let t = this.def;
2680
+ return this.clone(O(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
2681
+ check: e,
2682
+ def: { check: "custom" },
2683
+ onattach: []
2684
+ } } : e)] }), { parent: !0 });
2685
+ },
2686
+ with(...e) {
2687
+ return this.check(...e);
2688
+ },
2689
+ clone(e, t) {
2690
+ return j(this, e, t);
2691
+ },
2692
+ brand() {
2693
+ return this;
2694
+ },
2695
+ register(e, t) {
2696
+ return e.add(this, t), this;
2697
+ },
2698
+ refine(e, t) {
2699
+ return this.check(_o(e, t));
2700
+ },
2701
+ superRefine(e, t) {
2702
+ return this.check(vo(e, t));
2703
+ },
2704
+ overwrite(e) {
2705
+ return this.check(/* @__PURE__ */ z(e));
2706
+ },
2707
+ optional() {
2708
+ return Qa(this);
2709
+ },
2710
+ exactOptional() {
2711
+ return eo(this);
2712
+ },
2713
+ nullable() {
2714
+ return no(this);
2715
+ },
2716
+ nullish() {
2717
+ return Qa(no(this));
2718
+ },
2719
+ nonoptional(e) {
2720
+ return co(this, e);
2721
+ },
2722
+ array() {
2723
+ return J(this);
2724
+ },
2725
+ or(e) {
2726
+ return za([this, e]);
2727
+ },
2728
+ and(e) {
2729
+ return Ua(this, e);
2730
+ },
2731
+ transform(e) {
2732
+ return po(this, Xa(e));
2733
+ },
2734
+ default(e) {
2735
+ return io(this, e);
2736
+ },
2737
+ prefault(e) {
2738
+ return oo(this, e);
2739
+ },
2740
+ catch(e) {
2741
+ return uo(this, e);
2742
+ },
2743
+ pipe(e) {
2744
+ return po(this, e);
2745
+ },
2746
+ readonly() {
2747
+ return ho(this);
2748
+ },
2749
+ describe(e) {
2750
+ let t = this.clone();
2751
+ return or.add(t, { description: e }), t;
2752
+ },
2753
+ meta(...e) {
2754
+ if (e.length === 0) return or.get(this);
2755
+ let t = this.clone();
2756
+ return or.add(t, e[0]), t;
2757
+ },
2758
+ isOptional() {
2759
+ return this.safeParse(void 0).success;
2760
+ },
2761
+ isNullable() {
2762
+ return this.safeParse(null).success;
2763
+ },
2764
+ apply(e) {
2765
+ return e(this);
2766
+ }
2767
+ }), Object.defineProperty(e, "description", {
2768
+ get() {
2769
+ return or.get(e)?.description;
2770
+ },
2771
+ configurable: !0
2772
+ }), e)), aa = /*@__PURE__*/ S("_ZodString", (e, t) => {
2773
+ Wt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => hi(e, t, n, r);
2774
+ let n = e._zod.bag;
2775
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, ia(e, "_ZodString", {
2776
+ regex(...e) {
2777
+ return this.check(/* @__PURE__ */ Jr(...e));
2778
+ },
2779
+ includes(...e) {
2780
+ return this.check(/* @__PURE__ */ Zr(...e));
2781
+ },
2782
+ startsWith(...e) {
2783
+ return this.check(/* @__PURE__ */ Qr(...e));
2784
+ },
2785
+ endsWith(...e) {
2786
+ return this.check(/* @__PURE__ */ $r(...e));
2787
+ },
2788
+ min(...e) {
2789
+ return this.check(/* @__PURE__ */ Kr(...e));
2790
+ },
2791
+ max(...e) {
2792
+ return this.check(/* @__PURE__ */ Gr(...e));
2793
+ },
2794
+ length(...e) {
2795
+ return this.check(/* @__PURE__ */ qr(...e));
2796
+ },
2797
+ nonempty(...e) {
2798
+ return this.check(/* @__PURE__ */ Kr(1, ...e));
2799
+ },
2800
+ lowercase(e) {
2801
+ return this.check(/* @__PURE__ */ Yr(e));
2802
+ },
2803
+ uppercase(e) {
2804
+ return this.check(/* @__PURE__ */ Xr(e));
2805
+ },
2806
+ trim() {
2807
+ return this.check(/* @__PURE__ */ ti());
2808
+ },
2809
+ normalize(...e) {
2810
+ return this.check(/* @__PURE__ */ ei(...e));
2811
+ },
2812
+ toLowerCase() {
2813
+ return this.check(/* @__PURE__ */ ni());
2814
+ },
2815
+ toUpperCase() {
2816
+ return this.check(/* @__PURE__ */ ri());
2817
+ },
2818
+ slugify() {
2819
+ return this.check(/* @__PURE__ */ ii());
2820
+ }
2821
+ });
2822
+ }), oa = /*@__PURE__*/ S("ZodString", (e, t) => {
2823
+ Wt.init(e, t), aa.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ cr(sa, t)), e.url = (t) => e.check(/* @__PURE__ */ mr(ua, t)), e.jwt = (t) => e.check(/* @__PURE__ */ kr(Ta, t)), e.emoji = (t) => e.check(/* @__PURE__ */ hr(da, t)), e.guid = (t) => e.check(/* @__PURE__ */ lr(ca, t)), e.uuid = (t) => e.check(/* @__PURE__ */ ur(la, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ dr(la, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ fr(la, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ pr(la, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ gr(fa, t)), e.guid = (t) => e.check(/* @__PURE__ */ lr(ca, t)), e.cuid = (t) => e.check(/* @__PURE__ */ _r(pa, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ vr(ma, t)), e.ulid = (t) => e.check(/* @__PURE__ */ yr(ha, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Er(Sa, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Dr(Ca, t)), e.xid = (t) => e.check(/* @__PURE__ */ br(ga, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ xr(_a, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Sr(va, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ Cr(ya, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ wr(ba, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Tr(xa, t)), e.e164 = (t) => e.check(/* @__PURE__ */ Or(wa, t)), e.datetime = (t) => e.check(Ri(t)), e.date = (t) => e.check(Bi(t)), e.time = (t) => e.check(Hi(t)), e.duration = (t) => e.check(Wi(t));
2824
+ });
2825
+ function W(e) {
2826
+ return /* @__PURE__ */ sr(oa, e);
2827
+ }
2828
+ var G = /*@__PURE__*/ S("ZodStringFormat", (e, t) => {
2829
+ R.init(e, t), aa.init(e, t);
2830
+ }), sa = /*@__PURE__*/ S("ZodEmail", (e, t) => {
2831
+ qt.init(e, t), G.init(e, t);
2832
+ }), ca = /*@__PURE__*/ S("ZodGUID", (e, t) => {
2833
+ Gt.init(e, t), G.init(e, t);
2834
+ }), la = /*@__PURE__*/ S("ZodUUID", (e, t) => {
2835
+ Kt.init(e, t), G.init(e, t);
2836
+ }), ua = /*@__PURE__*/ S("ZodURL", (e, t) => {
2837
+ Jt.init(e, t), G.init(e, t);
2838
+ }), da = /*@__PURE__*/ S("ZodEmoji", (e, t) => {
2839
+ Yt.init(e, t), G.init(e, t);
2840
+ }), fa = /*@__PURE__*/ S("ZodNanoID", (e, t) => {
2841
+ Xt.init(e, t), G.init(e, t);
2842
+ }), pa = /*@__PURE__*/ S("ZodCUID", (e, t) => {
2843
+ Zt.init(e, t), G.init(e, t);
2844
+ }), ma = /*@__PURE__*/ S("ZodCUID2", (e, t) => {
2845
+ Qt.init(e, t), G.init(e, t);
2846
+ }), ha = /*@__PURE__*/ S("ZodULID", (e, t) => {
2847
+ $t.init(e, t), G.init(e, t);
2848
+ }), ga = /*@__PURE__*/ S("ZodXID", (e, t) => {
2849
+ en.init(e, t), G.init(e, t);
2850
+ }), _a = /*@__PURE__*/ S("ZodKSUID", (e, t) => {
2851
+ tn.init(e, t), G.init(e, t);
2852
+ }), va = /*@__PURE__*/ S("ZodIPv4", (e, t) => {
2853
+ sn.init(e, t), G.init(e, t);
2854
+ }), ya = /*@__PURE__*/ S("ZodIPv6", (e, t) => {
2855
+ cn.init(e, t), G.init(e, t);
2856
+ }), ba = /*@__PURE__*/ S("ZodCIDRv4", (e, t) => {
2857
+ ln.init(e, t), G.init(e, t);
2858
+ }), xa = /*@__PURE__*/ S("ZodCIDRv6", (e, t) => {
2859
+ un.init(e, t), G.init(e, t);
2860
+ }), Sa = /*@__PURE__*/ S("ZodBase64", (e, t) => {
2861
+ fn.init(e, t), G.init(e, t);
2862
+ }), Ca = /*@__PURE__*/ S("ZodBase64URL", (e, t) => {
2863
+ mn.init(e, t), G.init(e, t);
2864
+ }), wa = /*@__PURE__*/ S("ZodE164", (e, t) => {
2865
+ hn.init(e, t), G.init(e, t);
2866
+ }), Ta = /*@__PURE__*/ S("ZodJWT", (e, t) => {
2867
+ _n.init(e, t), G.init(e, t);
2868
+ }), Ea = /*@__PURE__*/ S("ZodNumber", (e, t) => {
2869
+ vn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => gi(e, t, n, r), ia(e, "ZodNumber", {
2870
+ gt(e, t) {
2871
+ return this.check(/* @__PURE__ */ Hr(e, t));
2872
+ },
2873
+ gte(e, t) {
2874
+ return this.check(/* @__PURE__ */ Ur(e, t));
2875
+ },
2876
+ min(e, t) {
2877
+ return this.check(/* @__PURE__ */ Ur(e, t));
2878
+ },
2879
+ lt(e, t) {
2880
+ return this.check(/* @__PURE__ */ Br(e, t));
2881
+ },
2882
+ lte(e, t) {
2883
+ return this.check(/* @__PURE__ */ Vr(e, t));
2884
+ },
2885
+ max(e, t) {
2886
+ return this.check(/* @__PURE__ */ Vr(e, t));
2887
+ },
2888
+ int(e) {
2889
+ return this.check(Oa(e));
2890
+ },
2891
+ safe(e) {
2892
+ return this.check(Oa(e));
2893
+ },
2894
+ positive(e) {
2895
+ return this.check(/* @__PURE__ */ Hr(0, e));
2896
+ },
2897
+ nonnegative(e) {
2898
+ return this.check(/* @__PURE__ */ Ur(0, e));
2899
+ },
2900
+ negative(e) {
2901
+ return this.check(/* @__PURE__ */ Br(0, e));
2902
+ },
2903
+ nonpositive(e) {
2904
+ return this.check(/* @__PURE__ */ Vr(0, e));
2905
+ },
2906
+ multipleOf(e, t) {
2907
+ return this.check(/* @__PURE__ */ Wr(e, t));
2908
+ },
2909
+ step(e, t) {
2910
+ return this.check(/* @__PURE__ */ Wr(e, t));
2911
+ },
2912
+ finite() {
2913
+ return this;
2914
+ }
2915
+ });
2916
+ let n = e._zod.bag;
2917
+ e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
2918
+ });
2919
+ function K(e) {
2920
+ return /* @__PURE__ */ Pr(Ea, e);
2921
+ }
2922
+ var Da = /*@__PURE__*/ S("ZodNumberFormat", (e, t) => {
2923
+ yn.init(e, t), Ea.init(e, t);
2924
+ });
2925
+ function Oa(e) {
2926
+ return /* @__PURE__ */ Fr(Da, e);
2927
+ }
2928
+ var ka = /*@__PURE__*/ S("ZodBoolean", (e, t) => {
2929
+ bn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => _i(e, t, n, r);
2930
+ });
2931
+ function q(e) {
2932
+ return /* @__PURE__ */ Ir(ka, e);
2933
+ }
2934
+ var Aa = /*@__PURE__*/ S("ZodNull", (e, t) => {
2935
+ xn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => vi(e, t, n, r);
2936
+ });
2937
+ function ja(e) {
2938
+ return /* @__PURE__ */ Lr(Aa, e);
2939
+ }
2940
+ var Ma = /*@__PURE__*/ S("ZodUnknown", (e, t) => {
2941
+ Sn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
2942
+ });
2943
+ function Na() {
2944
+ return /* @__PURE__ */ Rr(Ma);
2945
+ }
2946
+ var Pa = /*@__PURE__*/ S("ZodNever", (e, t) => {
2947
+ Cn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => yi(e, t, n, r);
2948
+ });
2949
+ function Fa(e) {
2950
+ return /* @__PURE__ */ zr(Pa, e);
2951
+ }
2952
+ var Ia = /*@__PURE__*/ S("ZodArray", (e, t) => {
2953
+ Tn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => wi(e, t, n, r), e.element = t.element, ia(e, "ZodArray", {
2954
+ min(e, t) {
2955
+ return this.check(/* @__PURE__ */ Kr(e, t));
2956
+ },
2957
+ nonempty(e) {
2958
+ return this.check(/* @__PURE__ */ Kr(1, e));
2959
+ },
2960
+ max(e, t) {
2961
+ return this.check(/* @__PURE__ */ Gr(e, t));
2962
+ },
2963
+ length(e, t) {
2964
+ return this.check(/* @__PURE__ */ qr(e, t));
2965
+ },
2966
+ unwrap() {
2967
+ return this.element;
2968
+ }
2969
+ });
2970
+ });
2971
+ function J(e, t) {
2972
+ return /* @__PURE__ */ ai(Ia, e, t);
2973
+ }
2974
+ var La = /*@__PURE__*/ S("ZodObject", (e, t) => {
2975
+ An.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ti(e, t, n, r), E(e, "shape", () => t.shape), ia(e, "ZodObject", {
2976
+ keyof() {
2977
+ return X(Object.keys(this._zod.def.shape));
2978
+ },
2979
+ catchall(e) {
2980
+ return this.clone({
2981
+ ...this._zod.def,
2982
+ catchall: e
2983
+ });
2984
+ },
2985
+ passthrough() {
2986
+ return this.clone({
2987
+ ...this._zod.def,
2988
+ catchall: Na()
2989
+ });
2990
+ },
2991
+ loose() {
2992
+ return this.clone({
2993
+ ...this._zod.def,
2994
+ catchall: Na()
2995
+ });
2996
+ },
2997
+ strict() {
2998
+ return this.clone({
2999
+ ...this._zod.def,
3000
+ catchall: Fa()
3001
+ });
3002
+ },
3003
+ strip() {
3004
+ return this.clone({
3005
+ ...this._zod.def,
3006
+ catchall: void 0
3007
+ });
3008
+ },
3009
+ extend(e) {
3010
+ return be(this, e);
3011
+ },
3012
+ safeExtend(e) {
3013
+ return xe(this, e);
3014
+ },
3015
+ merge(e) {
3016
+ return Se(this, e);
3017
+ },
3018
+ pick(e) {
3019
+ return ve(this, e);
3020
+ },
3021
+ omit(e) {
3022
+ return ye(this, e);
3023
+ },
3024
+ partial(...e) {
3025
+ return Ce(Za, this, e[0]);
3026
+ },
3027
+ required(...e) {
3028
+ return we(so, this, e[0]);
3029
+ }
3030
+ });
3031
+ });
3032
+ function Y(e, t) {
3033
+ return new La({
3034
+ type: "object",
3035
+ shape: e ?? {},
3036
+ ...M(t)
3037
+ });
3038
+ }
3039
+ var Ra = /*@__PURE__*/ S("ZodUnion", (e, t) => {
3040
+ Mn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ei(e, t, n, r), e.options = t.options;
3041
+ });
3042
+ function za(e, t) {
3043
+ return new Ra({
3044
+ type: "union",
3045
+ options: e,
3046
+ ...M(t)
3047
+ });
3048
+ }
3049
+ var Ba = /*@__PURE__*/ S("ZodDiscriminatedUnion", (e, t) => {
3050
+ Ra.init(e, t), Nn.init(e, t);
3051
+ });
3052
+ function Va(e, t, n) {
3053
+ return new Ba({
3054
+ type: "union",
3055
+ options: t,
3056
+ discriminator: e,
3057
+ ...M(n)
3058
+ });
3059
+ }
3060
+ var Ha = /*@__PURE__*/ S("ZodIntersection", (e, t) => {
3061
+ Pn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Di(e, t, n, r);
3062
+ });
3063
+ function Ua(e, t) {
3064
+ return new Ha({
3065
+ type: "intersection",
3066
+ left: e,
3067
+ right: t
3068
+ });
3069
+ }
3070
+ var Wa = /*@__PURE__*/ S("ZodRecord", (e, t) => {
3071
+ Ln.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oi(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
3072
+ });
3073
+ function Ga(e, t, n) {
3074
+ return !t || !t._zod ? new Wa({
3075
+ type: "record",
3076
+ keyType: W(),
3077
+ valueType: e,
3078
+ ...M(t)
3079
+ }) : new Wa({
3080
+ type: "record",
3081
+ keyType: e,
3082
+ valueType: t,
3083
+ ...M(n)
3084
+ });
3085
+ }
3086
+ var Ka = /*@__PURE__*/ S("ZodEnum", (e, t) => {
3087
+ Rn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => bi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
3088
+ let n = new Set(Object.keys(t.entries));
3089
+ e.extract = (e, r) => {
3090
+ let i = {};
3091
+ for (let r of e) if (n.has(r)) i[r] = t.entries[r];
3092
+ else throw Error(`Key ${r} not found in enum`);
3093
+ return new Ka({
3094
+ ...t,
3095
+ checks: [],
3096
+ ...M(r),
3097
+ entries: i
3098
+ });
3099
+ }, e.exclude = (e, r) => {
3100
+ let i = { ...t.entries };
3101
+ for (let t of e) if (n.has(t)) delete i[t];
3102
+ else throw Error(`Key ${t} not found in enum`);
3103
+ return new Ka({
3104
+ ...t,
3105
+ checks: [],
3106
+ ...M(r),
3107
+ entries: i
3108
+ });
3109
+ };
3110
+ });
3111
+ function X(e, t) {
3112
+ return new Ka({
3113
+ type: "enum",
3114
+ entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
3115
+ ...M(t)
3116
+ });
3117
+ }
3118
+ var qa = /*@__PURE__*/ S("ZodLiteral", (e, t) => {
3119
+ zn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => xi(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
3120
+ if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
3121
+ return t.values[0];
3122
+ } });
3123
+ });
3124
+ function Ja(e, t) {
3125
+ return new qa({
3126
+ type: "literal",
3127
+ values: Array.isArray(e) ? e : [e],
3128
+ ...M(t)
3129
+ });
3130
+ }
3131
+ var Ya = /*@__PURE__*/ S("ZodTransform", (e, t) => {
3132
+ Bn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r), e._zod.parse = (n, r) => {
3133
+ if (r.direction === "backward") throw new te(e.constructor.name);
3134
+ n.addIssue = (r) => {
3135
+ if (typeof r == "string") n.issues.push(Oe(r, n.value, t));
3136
+ else {
3137
+ let t = r;
3138
+ t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(Oe(t));
3139
+ }
3140
+ };
3141
+ let i = t.transform(n.value, n);
3142
+ return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
3143
+ };
3144
+ });
3145
+ function Xa(e) {
3146
+ return new Ya({
3147
+ type: "transform",
3148
+ transform: e
3149
+ });
3150
+ }
3151
+ var Za = /*@__PURE__*/ S("ZodOptional", (e, t) => {
3152
+ Hn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3153
+ });
3154
+ function Qa(e) {
3155
+ return new Za({
3156
+ type: "optional",
3157
+ innerType: e
3158
+ });
3159
+ }
3160
+ var $a = /*@__PURE__*/ S("ZodExactOptional", (e, t) => {
3161
+ Un.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3162
+ });
3163
+ function eo(e) {
3164
+ return new $a({
3165
+ type: "optional",
3166
+ innerType: e
3167
+ });
3168
+ }
3169
+ var to = /*@__PURE__*/ S("ZodNullable", (e, t) => {
3170
+ Wn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => ki(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3171
+ });
3172
+ function no(e) {
3173
+ return new to({
3174
+ type: "nullable",
3175
+ innerType: e
3176
+ });
3177
+ }
3178
+ var ro = /*@__PURE__*/ S("ZodDefault", (e, t) => {
3179
+ Gn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => ji(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3180
+ });
3181
+ function io(e, t) {
3182
+ return new ro({
3183
+ type: "default",
3184
+ innerType: e,
3185
+ get defaultValue() {
3186
+ return typeof t == "function" ? t() : me(t);
3187
+ }
3188
+ });
3189
+ }
3190
+ var ao = /*@__PURE__*/ S("ZodPrefault", (e, t) => {
3191
+ qn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3192
+ });
3193
+ function oo(e, t) {
3194
+ return new ao({
3195
+ type: "prefault",
3196
+ innerType: e,
3197
+ get defaultValue() {
3198
+ return typeof t == "function" ? t() : me(t);
3199
+ }
3200
+ });
3201
+ }
3202
+ var so = /*@__PURE__*/ S("ZodNonOptional", (e, t) => {
3203
+ Jn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ai(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3204
+ });
3205
+ function co(e, t) {
3206
+ return new so({
3207
+ type: "nonoptional",
3208
+ innerType: e,
3209
+ ...M(t)
3210
+ });
3211
+ }
3212
+ var lo = /*@__PURE__*/ S("ZodCatch", (e, t) => {
3213
+ Xn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ni(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3214
+ });
3215
+ function uo(e, t) {
3216
+ return new lo({
3217
+ type: "catch",
3218
+ innerType: e,
3219
+ catchValue: typeof t == "function" ? t : () => t
3220
+ });
3221
+ }
3222
+ var fo = /*@__PURE__*/ S("ZodPipe", (e, t) => {
3223
+ Zn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pi(e, t, n, r), e.in = t.in, e.out = t.out;
3224
+ });
3225
+ function po(e, t) {
3226
+ return new fo({
3227
+ type: "pipe",
3228
+ in: e,
3229
+ out: t
3230
+ });
3231
+ }
3232
+ var mo = /*@__PURE__*/ S("ZodReadonly", (e, t) => {
3233
+ $n.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3234
+ });
3235
+ function ho(e) {
3236
+ return new mo({
3237
+ type: "readonly",
3238
+ innerType: e
3239
+ });
3240
+ }
3241
+ var go = /*@__PURE__*/ S("ZodCustom", (e, t) => {
3242
+ tr.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Si(e, t, n, r);
3243
+ });
3244
+ function _o(e, t = {}) {
3245
+ return /* @__PURE__ */ oi(go, e, t);
3246
+ }
3247
+ function vo(e, t) {
3248
+ return /* @__PURE__ */ si(e, t);
3249
+ }
3250
+ //#endregion
3251
+ //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
3252
+ var yo = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), bo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), xo = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), So = (e) => {
3253
+ let t = xo(e);
3254
+ return t.charAt(0).toUpperCase() + t.slice(1);
3255
+ }, Co = {
3256
+ xmlns: "http://www.w3.org/2000/svg",
3257
+ width: 24,
3258
+ height: 24,
3259
+ viewBox: "0 0 24 24",
3260
+ fill: "none",
3261
+ stroke: "currentColor",
3262
+ strokeWidth: 2,
3263
+ strokeLinecap: "round",
3264
+ strokeLinejoin: "round"
3265
+ }, wo = (e) => {
3266
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
3267
+ return !1;
3268
+ }, To = h(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => v("svg", {
3269
+ ref: c,
3270
+ ...Co,
3271
+ width: t,
3272
+ height: t,
3273
+ stroke: e,
3274
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
3275
+ className: yo("lucide", i),
3276
+ ...!a && !wo(s) && { "aria-hidden": "true" },
3277
+ ...s
3278
+ }, [...o.map(([e, t]) => v(e, t)), ...Array.isArray(a) ? a : [a]])), Eo = (e, t) => {
3279
+ let n = h(({ className: n, ...r }, i) => v(To, {
3280
+ ref: i,
3281
+ iconNode: t,
3282
+ className: yo(`lucide-${bo(So(e))}`, `lucide-${e}`, n),
3283
+ ...r
3284
+ }));
3285
+ return n.displayName = So(e), n;
3286
+ }, Do = Eo("refresh-cw", [
3287
+ ["path", {
3288
+ d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
3289
+ key: "v9h5vc"
3290
+ }],
3291
+ ["path", {
3292
+ d: "M21 3v5h-5",
3293
+ key: "1q7to0"
3294
+ }],
3295
+ ["path", {
3296
+ d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",
3297
+ key: "3uifl3"
3298
+ }],
3299
+ ["path", {
3300
+ d: "M8 16H3v5",
3301
+ key: "1cv678"
3302
+ }]
3303
+ ]), Oo = Eo("send", [["path", {
3304
+ d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
3305
+ key: "1ffxy3"
3306
+ }], ["path", {
3307
+ d: "m21.854 2.147-10.94 10.939",
3308
+ key: "12cjpa"
3309
+ }]]), ko = Eo("sliders-horizontal", [
3310
+ ["path", {
3311
+ d: "M10 5H3",
3312
+ key: "1qgfaw"
3313
+ }],
3314
+ ["path", {
3315
+ d: "M12 19H3",
3316
+ key: "yhmn1j"
3317
+ }],
3318
+ ["path", {
3319
+ d: "M14 3v4",
3320
+ key: "1sua03"
3321
+ }],
3322
+ ["path", {
3323
+ d: "M16 17v4",
3324
+ key: "1q0r14"
3325
+ }],
3326
+ ["path", {
3327
+ d: "M21 12h-9",
3328
+ key: "1o4lsq"
3329
+ }],
3330
+ ["path", {
3331
+ d: "M21 19h-5",
3332
+ key: "1rlt1p"
3333
+ }],
3334
+ ["path", {
3335
+ d: "M21 5h-7",
3336
+ key: "1oszz2"
3337
+ }],
3338
+ ["path", {
3339
+ d: "M8 10v4",
3340
+ key: "tgpxqk"
3341
+ }],
3342
+ ["path", {
3343
+ d: "M8 12H3",
3344
+ key: "a7s4jb"
3345
+ }]
3346
+ ]), Z = Y({ integrationId: W().min(1) }), Q = q();
3347
+ Y({
3348
+ integrationId: W(),
3349
+ name: W(),
3350
+ connected: q()
3351
+ });
3352
+ var Ao = Y({
3353
+ version: W().nullable(),
3354
+ product: W().nullable(),
3355
+ productFamily: X([
3356
+ "ccu3",
3357
+ "openccu",
3358
+ "unknown"
3359
+ ]),
3360
+ platform: W().nullable(),
3361
+ serial: W().nullable(),
3362
+ hostname: W().nullable()
3363
+ }), jo = Y({
3364
+ address: W(),
3365
+ description: W().nullable(),
3366
+ dutyCycle: K().nullable(),
3367
+ connected: q().nullable(),
3368
+ isDefault: q(),
3369
+ firmware: W().nullable(),
3370
+ type: W().nullable()
3371
+ }), Mo = Y({
3372
+ name: W(),
3373
+ port: K().nullable(),
3374
+ info: W().nullable(),
3375
+ connected: q().nullable(),
3376
+ dutyCycle: K().nullable(),
3377
+ firmware: W().nullable(),
3378
+ type: W().nullable(),
3379
+ gateways: J(jo)
3380
+ });
3381
+ Y({
3382
+ info: Ao.nullable(),
3383
+ infoError: W().nullable(),
3384
+ interfaces: J(Mo),
3385
+ interfacesError: W().nullable()
3386
+ }), Y({
3387
+ messages: J(Y({
3388
+ id: W(),
3389
+ name: W().nullable(),
3390
+ address: W().nullable(),
3391
+ channel: K().nullable(),
3392
+ type: W().nullable(),
3393
+ timestamp: K().nullable(),
3394
+ acknowledgeable: q()
3395
+ })),
3396
+ error: W().nullable()
3397
+ }), Z.extend({
3398
+ id: W().min(1),
3399
+ confirmed: Q
3400
+ });
3401
+ var No = Y({ ok: Ja(!0) });
3402
+ Z.extend({
3403
+ address: W().min(1),
3404
+ enabled: q(),
3405
+ confirmed: Q
3406
+ });
3407
+ var Po = Y({
3408
+ receiver: W(),
3409
+ receiverName: W().nullable(),
3410
+ receiverDeviceName: W().nullable()
3411
+ }), Fo = Y({
3412
+ address: W(),
3413
+ index: W(),
3414
+ name: W().nullable(),
3415
+ central: X([
3416
+ "on",
3417
+ "off",
3418
+ "unknown"
3419
+ ]),
3420
+ links: J(Po)
3421
+ }), Io = Y({
3422
+ address: W(),
3423
+ index: K(),
3424
+ type: W().nullable(),
3425
+ name: W().nullable()
3426
+ });
3427
+ Y({ devices: J(Y({
3428
+ address: W(),
3429
+ type: W(),
3430
+ name: W().nullable(),
3431
+ rooms: J(W()),
3432
+ functions: J(W()),
3433
+ firmware: W().nullable(),
3434
+ availableFirmware: W().nullable(),
3435
+ updatable: q().nullable(),
3436
+ rssi: K().nullable(),
3437
+ rssiPeer: K().nullable(),
3438
+ dutyCycle: K().nullable(),
3439
+ dutyCycleLimited: q().nullable(),
3440
+ lowBattery: q().nullable(),
3441
+ unreach: q().nullable(),
3442
+ configPending: q().nullable(),
3443
+ sabotage: q().nullable(),
3444
+ deviceId: K().int().nullable().default(null),
3445
+ keyChannels: J(Fo).default([]),
3446
+ channels: J(Io).default([])
3447
+ })) });
3448
+ var Lo = ["hmip.heating.group", "HomeMatic.heating"], Ro = Y({
3449
+ address: W(),
3450
+ type: W(),
3451
+ deviceName: W().nullable()
3452
+ }), zo = Y({
3453
+ id: K(),
3454
+ name: W(),
3455
+ type: W(),
3456
+ typeLabel: W().nullable(),
3457
+ deviceAddress: W().nullable(),
3458
+ forbidSingleOperation: q(),
3459
+ members: J(Ro)
3460
+ }), Bo = Y({
3461
+ device: W(),
3462
+ channel: W(),
3463
+ name: W().nullable(),
3464
+ currentTemperature: K().nullable(),
3465
+ targetTemperature: K().nullable(),
3466
+ mode: X([
3467
+ "auto",
3468
+ "heat",
3469
+ "off"
3470
+ ]),
3471
+ activity: X([
3472
+ "heating",
3473
+ "idle",
3474
+ "off"
3475
+ ])
3476
+ }), Vo = Y({
3477
+ address: W(),
3478
+ type: W(),
3479
+ deviceName: W().nullable()
3480
+ });
3481
+ Y({
3482
+ groups: J(zo),
3483
+ groupsError: W().nullable(),
3484
+ thermostats: J(Bo),
3485
+ candidates: J(Vo)
3486
+ }), Z.extend({
3487
+ name: W(),
3488
+ type: X(Lo),
3489
+ members: J(W()),
3490
+ confirmed: Q
3491
+ }), Z.extend({
3492
+ id: K(),
3493
+ name: W().optional(),
3494
+ members: J(W()).optional(),
3495
+ confirmed: Q
3496
+ }), Z.extend({
3497
+ id: K(),
3498
+ confirmed: Q
3499
+ }), Y({
3500
+ interfaces: J(Y({
3501
+ name: W(),
3502
+ secondsLeft: K().nullable(),
3503
+ supportsSecure: q(),
3504
+ error: W().nullable()
3505
+ })),
3506
+ error: W().nullable()
3507
+ }), Z.extend({
3508
+ interface: W().min(1),
3509
+ on: q(),
3510
+ seconds: K().int().min(1).max(3600).optional(),
3511
+ mode: X(["normal", "secure"]).optional(),
3512
+ confirmed: Q
3513
+ }), Z.extend({
3514
+ address: W().min(1),
3515
+ reset: q(),
3516
+ force: q(),
3517
+ confirmed: Q
3518
+ });
3519
+ var Ho = za([
3520
+ q(),
3521
+ K(),
3522
+ W(),
3523
+ ja()
3524
+ ]), Uo = Y({
3525
+ parameter: W(),
3526
+ type: W(),
3527
+ min: K().nullable(),
3528
+ max: K().nullable(),
3529
+ unit: W().nullable(),
3530
+ valueList: J(W()).nullable(),
3531
+ writable: q(),
3532
+ value: Ho
3533
+ }), Wo = Y({ channels: J(Y({
3534
+ channel: W(),
3535
+ channelType: W().nullable(),
3536
+ params: J(Uo),
3537
+ error: W().nullable()
3538
+ })) });
3539
+ Z.extend({ address: W().min(1) }), Z.extend({
3540
+ channel: W().min(1),
3541
+ values: Ga(W(), Ho),
3542
+ confirmed: Q
3543
+ });
3544
+ var Go = X([
3545
+ "toggle",
3546
+ "on",
3547
+ "off",
3548
+ "none"
3549
+ ]), Ko = Va("kind", [Y({
3550
+ kind: Ja("switch"),
3551
+ short: Go,
3552
+ long: Go
3553
+ }), Y({ kind: Ja("custom") })]).nullable(), qo = Y({
3554
+ address: W(),
3555
+ name: W().nullable(),
3556
+ deviceName: W().nullable(),
3557
+ deviceType: W().nullable()
3558
+ }), Jo = Y({
3559
+ sender: qo,
3560
+ receiver: qo,
3561
+ name: W(),
3562
+ description: W(),
3563
+ profile: Ko
3564
+ }), Yo = Y({
3565
+ address: W(),
3566
+ deviceName: W().nullable(),
3567
+ error: W()
3568
+ });
3569
+ Y({
3570
+ links: J(Jo),
3571
+ senders: J(qo),
3572
+ receivers: J(qo),
3573
+ failures: J(Yo)
3574
+ }), Z.extend({
3575
+ sender: W().min(1),
3576
+ receiver: W().min(1),
3577
+ confirmed: Q
3578
+ }).extend({
3579
+ short: Go,
3580
+ long: Go
3581
+ });
3582
+ var Xo = Y({
3583
+ address: W(),
3584
+ name: W()
3585
+ });
3586
+ Y({
3587
+ device: Xo,
3588
+ channels: J(Xo)
3589
+ }), Z.extend({
3590
+ address: W().min(1),
3591
+ name: W(),
3592
+ renameChannels: q(),
3593
+ confirmed: Q
3594
+ }), Z.extend({
3595
+ address: W().min(1),
3596
+ name: W(),
3597
+ confirmed: Q
3598
+ }), Y({
3599
+ rooms: J(Y({
3600
+ id: W(),
3601
+ name: W(),
3602
+ channels: J(qo)
3603
+ })),
3604
+ channels: J(qo)
3605
+ }), Z.extend({
3606
+ name: W(),
3607
+ confirmed: Q
3608
+ }), Z.extend({
3609
+ id: W().min(1),
3610
+ name: W(),
3611
+ confirmed: Q
3612
+ }), Z.extend({
3613
+ id: W().min(1),
3614
+ confirmed: Q
3615
+ }), Z.extend({
3616
+ id: W().min(1),
3617
+ channels: J(W().min(1)),
3618
+ confirmed: Q
3619
+ }), Y({
3620
+ added: J(W()),
3621
+ removed: J(W())
3622
+ });
3623
+ var Zo = Uo.extend({ readable: q() }), Qo = Y({
3624
+ address: W(),
3625
+ index: K(),
3626
+ type: W().nullable(),
3627
+ name: W().nullable(),
3628
+ values: J(Zo)
3629
+ }), $o = Y({
3630
+ rssiDevice: K().nullable(),
3631
+ rssiPeer: K().nullable(),
3632
+ unreach: q().nullable(),
3633
+ lowBattery: q().nullable(),
3634
+ dutyCycle: za([q(), K()]).nullable(),
3635
+ configPending: q().nullable()
3636
+ }), es = Y({
3637
+ installed: W().nullable(),
3638
+ available: W().nullable(),
3639
+ updatable: q().nullable(),
3640
+ state: W().nullable()
3641
+ }), ts = Y({
3642
+ address: W(),
3643
+ name: W().nullable(),
3644
+ type: W(),
3645
+ firmware: es,
3646
+ diagnostics: $o,
3647
+ channels: J(Qo)
3648
+ });
3649
+ Z.extend({
3650
+ channel: W().min(1),
3651
+ parameter: W().min(1),
3652
+ value: Ho,
3653
+ deviceId: K().int().optional(),
3654
+ confirmed: Q
3655
+ });
3656
+ //#endregion
3657
+ //#region src/i18n/index.ts
3658
+ var { useT: $, Trans: ns, translate: rs } = c("provider-homematic", {
3659
+ en: {
3660
+ common: { loading: "Loading…" },
3661
+ write: { failedTitle: "The CCU refused the change" },
3662
+ page: {
3663
+ title: "Homematic CCU",
3664
+ subtitle: "Manage the CCU without opening its web interface",
3665
+ sectionsLabel: "CCU sections",
3666
+ ccuPicker: "CCU",
3667
+ tabOverview: "Overview",
3668
+ loadFailed: "Could not load the CCUs",
3669
+ noCcu: "No Homematic CCU is set up",
3670
+ noCcuHint: "Add a CCU from Integrations, then manage it here.",
3671
+ notConnected: "{{name}} is not connected",
3672
+ notConnectedHint: "The page works on a connected CCU. Check the connection in the integration.",
3673
+ tabDevices: "Devices",
3674
+ tabHeating: "Heating",
3675
+ tabPairing: "Pairing",
3676
+ tabLinks: "Direct links",
3677
+ tabSettings: "Settings"
3678
+ },
3679
+ overview: {
3680
+ loadFailed: "Could not read the CCU",
3681
+ ccuTitle: "CCU",
3682
+ infoUnavailable: "CCU details unavailable",
3683
+ infoNoAnswer: "The CCU did not answer. Version and serial need the WebUI credentials set in the integration.",
3684
+ version: "Version",
3685
+ product: "Product",
3686
+ hostname: "Hostname",
3687
+ serial: "Serial",
3688
+ interfacesTitle: "Interfaces",
3689
+ interfacesUnavailable: "Interfaces unavailable",
3690
+ noInterfaces: "The CCU reported no interfaces",
3691
+ colInterface: "Interface",
3692
+ colState: "State",
3693
+ colDutyCycle: "Duty cycle",
3694
+ colFirmware: "Firmware",
3695
+ colType: "Type",
3696
+ colGateways: "Gateways",
3697
+ messagesTitle: "Service messages",
3698
+ messagesUnavailable: "Service messages unavailable",
3699
+ noMessages: "No service messages",
3700
+ colWhen: "Since",
3701
+ colMessage: "Message",
3702
+ colDevice: "Device",
3703
+ ack: "Acknowledge",
3704
+ ackTitle: "Acknowledge service message",
3705
+ ackMessage: "Acknowledge {{type}} for {{name}} on the CCU? The message disappears from the CCU as well.",
3706
+ ackConfirm: "Acknowledge"
3707
+ },
3708
+ devices: {
3709
+ colDevice: "Device",
3710
+ colType: "Type",
3711
+ colPlace: "Room / function",
3712
+ colFirmware: "Firmware",
3713
+ colSignal: "Signal",
3714
+ colDutyCycle: "Duty cycle",
3715
+ colHealth: "Health",
3716
+ updateTo: "Update to {{version}}",
3717
+ dutyLimited: "Limit reached",
3718
+ unreach: "Unreachable",
3719
+ sabotage: "Sabotage",
3720
+ lowBattery: "Low battery",
3721
+ configPending: "Config pending",
3722
+ ok: "OK",
3723
+ loadFailed: "Could not read the devices",
3724
+ groupIssue: "Health",
3725
+ groupType: "Type",
3726
+ searchPlaceholder: "Search name, address, type, room",
3727
+ searchLabel: "Search CCU devices",
3728
+ facetsLabel: "Filter CCU devices",
3729
+ clearFilters: "Clear filters",
3730
+ noMatch: "No device matches the filter",
3731
+ none: "The CCU has no devices",
3732
+ deleteAction: "Delete from CCU",
3733
+ deleteDialogTitle: "Delete {{name}} from the CCU",
3734
+ deleteContinue: "Continue",
3735
+ deleteResetLabel: "Factory reset",
3736
+ deleteResetHint: "Reset the device to factory settings while removing it, so it can be paired again.",
3737
+ deleteResetOption: "Factory-reset the device",
3738
+ deleteForceLabel: "Unreachable device",
3739
+ deleteForceHint: "Remove it even when the CCU cannot reach it.",
3740
+ deleteForceOption: "Remove even if unreachable",
3741
+ deleteTitle: "Delete device from the CCU",
3742
+ deleteMessage: "{{name}} will be removed from the CCU. Its programs and links on the CCU are lost.",
3743
+ deleteMessageReset: "{{name}} will be factory-reset and removed from the CCU. Its programs and links on the CCU are lost.",
3744
+ deleteConfirm: "Delete device",
3745
+ configureAction: "Configure",
3746
+ buttonEventsOn: "on",
3747
+ buttonEventsOff: "off",
3748
+ buttonEventsUnknown: "unknown",
3749
+ buttonEventsAction: "Button events",
3750
+ buttonEventsTitle: "Button events — {{name}}",
3751
+ buttonEventsHint: "The CCU sends a press only when the key channel has a central link. Direct links stay.",
3752
+ buttonEventsStatus: "button events: {{state}}",
3753
+ buttonEventsBadge: "ch{{index}} {{state}}",
3754
+ buttonChannel: "Channel {{index}}",
3755
+ enableButtonEvents: "Enable button events",
3756
+ disableButtonEvents: "Disable button events",
3757
+ enableButtonEventsMessage: "Create a central link for {{name}}. Direct links stay.",
3758
+ disableButtonEventsMessage: "Remove the central link for {{name}}. Direct links stay.",
3759
+ directLinks: "Direct links: {{targets}}",
3760
+ directLinksNone: "No direct links",
3761
+ renameAction: "Rename on the CCU",
3762
+ buttonEventsSaving: "Saving…",
3763
+ buttonEventsSaved: "Saved",
3764
+ openDevicePage: "Open device page"
3765
+ },
3766
+ heating: {
3767
+ loadFailed: "Could not read the heating setup",
3768
+ groupsTitle: "Heating groups",
3769
+ groupsUnavailable: "Heating groups unavailable",
3770
+ noGroups: "No heating groups on the CCU",
3771
+ thermostatsTitle: "Thermostats",
3772
+ noThermostats: "The CCU reports no thermostats",
3773
+ newGroup: "New group",
3774
+ editGroup: "Edit {{name}}",
3775
+ save: "Save",
3776
+ edit: "Edit",
3777
+ delete: "Delete",
3778
+ colGroup: "Group",
3779
+ colType: "Type",
3780
+ colMembers: "Members",
3781
+ colThermostat: "Thermostat",
3782
+ colCurrent: "Current",
3783
+ colTarget: "Target",
3784
+ colMode: "Mode",
3785
+ colActivity: "Activity",
3786
+ mode_auto: "Auto",
3787
+ mode_heat: "Manual",
3788
+ mode_off: "Off",
3789
+ activity_heating: "Heating",
3790
+ activity_idle: "Idle",
3791
+ activity_off: "Off",
3792
+ fieldName: "Name",
3793
+ fieldType: "Group type",
3794
+ typeHmip: "HomematicIP heating group",
3795
+ typeHomematic: "Homematic heating group",
3796
+ fieldMembers: "Members",
3797
+ fieldMembersHint: "Thermostat channels on the CCU. The list you tick replaces the current members.",
3798
+ noCandidates: "The CCU has no thermostat channels to group",
3799
+ createTitle: "Create heating group",
3800
+ createMessage: "Create the group {{name}} with {{count}} member(s) on the CCU?",
3801
+ createConfirm: "Create group",
3802
+ updateTitle: "Change heating group",
3803
+ updateMessage: "Save the name and the {{count}} member(s) of {{name}} on the CCU? The members you ticked replace the current ones.",
3804
+ updateConfirm: "Save changes",
3805
+ deleteTitle: "Delete heating group",
3806
+ deleteMessage: "Delete the group {{name}} from the CCU? The thermostats stay on the CCU.",
3807
+ deleteConfirm: "Delete group"
3808
+ },
3809
+ pairing: {
3810
+ loadFailed: "Could not read the pairing windows",
3811
+ noInterfaces: "This CCU has no radio interface that can pair devices.",
3812
+ hmipKeyNote: "HmIP devices are paired with the window below; entering a device key or SGTIN is not offered by the CCU interface this page uses, use the CCU WebUI for that.",
3813
+ statusOpen: "Open, {{seconds}} s left",
3814
+ statusClosed: "Closed",
3815
+ statusUnknown: "Unknown",
3816
+ fieldSeconds: "Window length (seconds)",
3817
+ fieldMode: "Mode",
3818
+ modeNormal: "Normal",
3819
+ modeSecure: "Secure (also teaches the HomeMatic Secure key)",
3820
+ start: "Start pairing",
3821
+ stop: "Stop pairing",
3822
+ startTitle: "Open the {{name}} pairing window",
3823
+ startMessage: "{{name}} will accept new devices for {{seconds}} seconds. Put the device in pairing mode now.",
3824
+ stopTitle: "Close the {{name}} pairing window",
3825
+ stopMessage: "{{name}} will stop accepting new devices.",
3826
+ foundTitle: "Devices found",
3827
+ foundNone: "No new device since this tab opened.",
3828
+ foundWaiting: "Waiting for a device to pair..."
3829
+ },
3830
+ config: {
3831
+ title: "Configure {{name}}",
3832
+ loadFailed: "Could not read the device configuration",
3833
+ none: "This device has no configurable parameters.",
3834
+ channel: "Channel",
3835
+ range: "Between {{min}} and {{max}}",
3836
+ unknown: "Unknown",
3837
+ valuesUnreadable: "The current values could not be read: {{error}}",
3838
+ save: "Save changes",
3839
+ confirmTitle: "Write device configuration",
3840
+ confirmMessage: "{{count}} parameter(s) will be written to {{channel}}: {{names}}. A wrong value can change how the device behaves.",
3841
+ confirmLabel: "Write configuration"
3842
+ },
3843
+ links: {
3844
+ title: "Direct links",
3845
+ hint: "Links the CCU keeps between a sender channel and a receiver channel. Key → switch actuator links can be created and edited here; other links are shown as they are.",
3846
+ newLink: "New link",
3847
+ editProfile: "Change profile",
3848
+ delete: "Delete link",
3849
+ save: "Save",
3850
+ pick: "Pick a channel",
3851
+ fieldSender: "Key channel (sender)",
3852
+ fieldSenderHint: "Only key channels can start a link created here.",
3853
+ fieldReceiver: "Switch actuator channel (receiver)",
3854
+ fieldReceiverHint: "Only switch actuator channels for now.",
3855
+ fieldShort: "Short press",
3856
+ fieldLong: "Long press",
3857
+ action_toggle: "Toggle",
3858
+ action_on: "On",
3859
+ action_off: "Off",
3860
+ action_none: "Nothing",
3861
+ colSender: "Sender",
3862
+ colReceiver: "Receiver",
3863
+ colName: "Name",
3864
+ colProfile: "Profile",
3865
+ profileCustom: "Custom (not editable here)",
3866
+ profileSwitch: "Short: {{short}} · Long: {{long}}",
3867
+ none: "No direct links on this CCU.",
3868
+ loadFailed: "Could not read the direct links",
3869
+ partial_one: "The links of {{count}} device could not be read; the list is incomplete",
3870
+ partial_other: "The links of {{count}} devices could not be read; the list is incomplete",
3871
+ createTitle: "Create direct link",
3872
+ createMessage: "Create the link {{link}} on the CCU (short press: {{short}}, long press: {{long}})? The key will switch the actuator directly.",
3873
+ createConfirm: "Create link",
3874
+ profileTitle: "Change link profile",
3875
+ profileMessage: "Write short press: {{short}}, long press: {{long}} to the link {{link}} on the CCU?",
3876
+ profileConfirm: "Write profile",
3877
+ deleteTitle: "Delete direct link",
3878
+ deleteMessage: "Delete the link {{link}} on the CCU? The key will no longer switch that actuator directly.",
3879
+ deleteConfirm: "Delete link",
3880
+ searchPlaceholder: "Search sender, receiver, name, profile",
3881
+ searchLabel: "Search links",
3882
+ facetsLabel: "Profile",
3883
+ clearFilters: "Clear filters",
3884
+ noMatch: "No links match the filter"
3885
+ },
3886
+ rename: {
3887
+ title: "Rename {{name}}",
3888
+ deviceName: "Device name",
3889
+ deviceSave: "Rename device",
3890
+ renameChannels: "Also rename every channel to the device name followed by :1, :2 …",
3891
+ channels: "Channels",
3892
+ channelsHint: "Rename one channel at a time; each rename asks first.",
3893
+ channelName: "Name of channel {{index}}",
3894
+ channelSave: "Rename",
3895
+ deviceTitle: "Rename device on the CCU",
3896
+ deviceMessage: "Rename {{from}} to {{to}} on the CCU?",
3897
+ deviceMessageChannels: "Rename {{from}} to {{to}} on the CCU, and every channel to {{to}}:1, {{to}}:2 …? Channel names you set by hand are replaced.",
3898
+ deviceConfirm: "Rename",
3899
+ channelTitle: "Rename channel on the CCU",
3900
+ channelMessage: "Rename the channel {{from}} to {{to}} on the CCU?",
3901
+ channelConfirm: "Rename"
3902
+ },
3903
+ rooms: {
3904
+ title: "Rooms",
3905
+ newRoom: "New room",
3906
+ fieldName: "Room name",
3907
+ colRoom: "Room",
3908
+ colChannels: "Channels",
3909
+ none: "The CCU has no rooms.",
3910
+ loadFailed: "Could not read the rooms",
3911
+ editChannels: "Choose channels",
3912
+ rename: "Rename",
3913
+ delete: "Delete room",
3914
+ save: "Save",
3915
+ search: "Search channels",
3916
+ selected_one: "{{count}} channel selected",
3917
+ selected_other: "{{count}} channels selected",
3918
+ channelsTitle: "Channels in {{name}}",
3919
+ createTitle: "Create room",
3920
+ createMessage: "Create the room {{name}} on the CCU?",
3921
+ createConfirm: "Create room",
3922
+ renameTitle: "Rename room",
3923
+ renameMessage: "Rename the room {{from}} to {{to}} on the CCU?",
3924
+ renameConfirm: "Rename",
3925
+ deleteTitle: "Delete room",
3926
+ deleteMessage: "Delete the room {{name}} on the CCU? Its channels stay, they just leave the room.",
3927
+ deleteConfirm: "Delete room",
3928
+ membersTitle: "Change room channels",
3929
+ membersMessage_one: "Set the room {{name}} to hold {{count}} channel on the CCU?",
3930
+ membersMessage_other: "Set the room {{name}} to hold {{count}} channels on the CCU?",
3931
+ membersConfirm: "Save channels"
3932
+ },
3933
+ panel: {
3934
+ loadFailed: "The device could not be read from the CCU",
3935
+ badConfig: "This panel is missing its CCU device",
3936
+ reload: "Reload",
3937
+ configure: "Configure",
3938
+ reachable: "Reachable",
3939
+ unreachable: "Unreachable",
3940
+ lowBattery: "Low battery",
3941
+ configPending: "Configuration pending",
3942
+ dutyCycleReached: "Duty cycle limit reached",
3943
+ dutyCycle: "Duty cycle {{value}}%",
3944
+ rssi: "RSSI {{device}} / {{peer}} dBm",
3945
+ firmware: "Firmware {{version}}",
3946
+ firmwareUpdate: "Update available: {{version}}",
3947
+ maintenance: "Maintenance",
3948
+ colParameter: "Parameter",
3949
+ colValue: "Value",
3950
+ yes: "Yes",
3951
+ no: "No",
3952
+ press: "Press",
3953
+ turnOn: "Turn on",
3954
+ turnOff: "Turn off",
3955
+ setAction: "Set…",
3956
+ set: "Send",
3957
+ setTitle: "Set {{parameter}} · {{channel}}",
3958
+ writeTitle: "Change a value on the CCU",
3959
+ writeMessage: "Set {{parameter}} of {{channel}} to {{value}}?",
3960
+ pressMessage: "Send {{parameter}} on {{channel}}? Whatever this key is linked to will run.",
3961
+ writeConfirm: "Send to the CCU",
3962
+ none: "No values"
3963
+ }
3964
+ },
3965
+ it: {
3966
+ common: { loading: "Caricamento…" },
3967
+ write: { failedTitle: "La CCU ha rifiutato la modifica" },
3968
+ page: {
3969
+ title: "Homematic CCU",
3970
+ subtitle: "Gestisci la CCU senza aprire la sua interfaccia web",
3971
+ sectionsLabel: "Sezioni della CCU",
3972
+ ccuPicker: "CCU",
3973
+ tabOverview: "Panoramica",
3974
+ loadFailed: "Impossibile caricare le CCU",
3975
+ noCcu: "Nessuna CCU Homematic configurata",
3976
+ noCcuHint: "Aggiungi una CCU da Integrazioni, poi gestiscila qui.",
3977
+ notConnected: "{{name}} non è connessa",
3978
+ notConnectedHint: "La pagina lavora su una CCU connessa. Controlla la connessione nell'integrazione.",
3979
+ tabDevices: "Dispositivi",
3980
+ tabHeating: "Riscaldamento",
3981
+ tabPairing: "Associazione",
3982
+ tabLinks: "Collegamenti diretti",
3983
+ tabSettings: "Impostazioni"
3984
+ },
3985
+ overview: {
3986
+ loadFailed: "Impossibile leggere la CCU",
3987
+ ccuTitle: "CCU",
3988
+ infoUnavailable: "Dettagli della CCU non disponibili",
3989
+ infoNoAnswer: "La CCU non ha risposto. Versione e seriale richiedono le credenziali WebUI impostate nell'integrazione.",
3990
+ version: "Versione",
3991
+ product: "Prodotto",
3992
+ hostname: "Nome host",
3993
+ serial: "Seriale",
3994
+ interfacesTitle: "Interfacce",
3995
+ interfacesUnavailable: "Interfacce non disponibili",
3996
+ noInterfaces: "La CCU non ha segnalato interfacce",
3997
+ colInterface: "Interfaccia",
3998
+ colState: "Stato",
3999
+ colDutyCycle: "Duty cycle",
4000
+ colFirmware: "Firmware",
4001
+ colType: "Tipo",
4002
+ colGateways: "Gateway",
4003
+ messagesTitle: "Messaggi di servizio",
4004
+ messagesUnavailable: "Messaggi di servizio non disponibili",
4005
+ noMessages: "Nessun messaggio di servizio",
4006
+ colWhen: "Da",
4007
+ colMessage: "Messaggio",
4008
+ colDevice: "Dispositivo",
4009
+ ack: "Conferma",
4010
+ ackTitle: "Conferma messaggio di servizio",
4011
+ ackMessage: "Confermare {{type}} per {{name}} sulla CCU? Il messaggio sparisce anche dalla CCU.",
4012
+ ackConfirm: "Conferma"
4013
+ },
4014
+ devices: {
4015
+ colDevice: "Dispositivo",
4016
+ colType: "Tipo",
4017
+ colPlace: "Stanza / funzione",
4018
+ colFirmware: "Firmware",
4019
+ colSignal: "Segnale",
4020
+ colDutyCycle: "Duty cycle",
4021
+ colHealth: "Stato",
4022
+ updateTo: "Aggiorna a {{version}}",
4023
+ dutyLimited: "Limite raggiunto",
4024
+ unreach: "Non raggiungibile",
4025
+ sabotage: "Sabotaggio",
4026
+ lowBattery: "Batteria scarica",
4027
+ configPending: "Configurazione in sospeso",
4028
+ ok: "OK",
4029
+ loadFailed: "Impossibile leggere i dispositivi",
4030
+ groupIssue: "Stato",
4031
+ groupType: "Tipo",
4032
+ searchPlaceholder: "Cerca nome, indirizzo, tipo, stanza",
4033
+ searchLabel: "Cerca dispositivi della CCU",
4034
+ facetsLabel: "Filtra dispositivi della CCU",
4035
+ clearFilters: "Azzera filtri",
4036
+ noMatch: "Nessun dispositivo corrisponde al filtro",
4037
+ none: "La CCU non ha dispositivi",
4038
+ deleteAction: "Elimina dalla CCU",
4039
+ deleteDialogTitle: "Elimina {{name}} dalla CCU",
4040
+ deleteContinue: "Continua",
4041
+ deleteResetLabel: "Ripristino di fabbrica",
4042
+ deleteResetHint: "Ripristina il dispositivo alle impostazioni di fabbrica mentre lo rimuovi, così potrà essere associato di nuovo.",
4043
+ deleteResetOption: "Ripristina il dispositivo di fabbrica",
4044
+ deleteForceLabel: "Dispositivo non raggiungibile",
4045
+ deleteForceHint: "Rimuovilo anche se la CCU non riesce a raggiungerlo.",
4046
+ deleteForceOption: "Rimuovi anche se non raggiungibile",
4047
+ deleteTitle: "Elimina dispositivo dalla CCU",
4048
+ deleteMessage: "{{name}} sarà rimosso dalla CCU. Programmi e collegamenti sulla CCU andranno persi.",
4049
+ deleteMessageReset: "{{name}} sarà ripristinato di fabbrica e rimosso dalla CCU. Programmi e collegamenti sulla CCU andranno persi.",
4050
+ deleteConfirm: "Elimina dispositivo",
4051
+ configureAction: "Configura",
4052
+ buttonEventsOn: "attivo",
4053
+ buttonEventsOff: "disattivo",
4054
+ buttonEventsUnknown: "sconosciuto",
4055
+ buttonEventsAction: "Eventi pulsante",
4056
+ buttonEventsTitle: "Eventi pulsante — {{name}}",
4057
+ buttonEventsHint: "La CCU invia una pressione solo se il canale tasto ha un collegamento centrale. I collegamenti diretti restano.",
4058
+ buttonEventsStatus: "eventi pulsante: {{state}}",
4059
+ buttonEventsBadge: "ch{{index}} {{state}}",
4060
+ buttonChannel: "Canale {{index}}",
4061
+ enableButtonEvents: "Abilita eventi pulsante",
4062
+ disableButtonEvents: "Disabilita eventi pulsante",
4063
+ enableButtonEventsMessage: "Crea un collegamento centrale per {{name}}. I collegamenti diretti restano.",
4064
+ disableButtonEventsMessage: "Rimuove il collegamento centrale di {{name}}. I collegamenti diretti restano.",
4065
+ directLinks: "Collegamenti diretti: {{targets}}",
4066
+ directLinksNone: "Nessun collegamento diretto",
4067
+ renameAction: "Rinomina sulla CCU",
4068
+ buttonEventsSaving: "Salvataggio…",
4069
+ buttonEventsSaved: "Salvato",
4070
+ openDevicePage: "Apri la pagina del dispositivo"
4071
+ },
4072
+ heating: {
4073
+ loadFailed: "Impossibile leggere il riscaldamento",
4074
+ groupsTitle: "Gruppi di riscaldamento",
4075
+ groupsUnavailable: "Gruppi di riscaldamento non disponibili",
4076
+ noGroups: "Nessun gruppo di riscaldamento sulla CCU",
4077
+ thermostatsTitle: "Termostati",
4078
+ noThermostats: "La CCU non segnala termostati",
4079
+ newGroup: "Nuovo gruppo",
4080
+ editGroup: "Modifica {{name}}",
4081
+ save: "Salva",
4082
+ edit: "Modifica",
4083
+ delete: "Elimina",
4084
+ colGroup: "Gruppo",
4085
+ colType: "Tipo",
4086
+ colMembers: "Membri",
4087
+ colThermostat: "Termostato",
4088
+ colCurrent: "Attuale",
4089
+ colTarget: "Obiettivo",
4090
+ colMode: "Modo",
4091
+ colActivity: "Attività",
4092
+ mode_auto: "Auto",
4093
+ mode_heat: "Manuale",
4094
+ mode_off: "Spento",
4095
+ activity_heating: "Riscalda",
4096
+ activity_idle: "Inattivo",
4097
+ activity_off: "Spento",
4098
+ fieldName: "Nome",
4099
+ fieldType: "Tipo di gruppo",
4100
+ typeHmip: "Gruppo di riscaldamento HomematicIP",
4101
+ typeHomematic: "Gruppo di riscaldamento Homematic",
4102
+ fieldMembers: "Membri",
4103
+ fieldMembersHint: "Canali termostato sulla CCU. L'elenco selezionato sostituisce i membri attuali.",
4104
+ noCandidates: "La CCU non ha canali termostato da raggruppare",
4105
+ createTitle: "Crea gruppo di riscaldamento",
4106
+ createMessage: "Creare sulla CCU il gruppo {{name}} con {{count}} membri?",
4107
+ createConfirm: "Crea gruppo",
4108
+ updateTitle: "Modifica gruppo di riscaldamento",
4109
+ updateMessage: "Salvare sulla CCU nome e {{count}} membri di {{name}}? I membri selezionati sostituiscono quelli attuali.",
4110
+ updateConfirm: "Salva modifiche",
4111
+ deleteTitle: "Elimina gruppo di riscaldamento",
4112
+ deleteMessage: "Eliminare il gruppo {{name}} dalla CCU? I termostati restano sulla CCU.",
4113
+ deleteConfirm: "Elimina gruppo"
4114
+ },
4115
+ pairing: {
4116
+ loadFailed: "Impossibile leggere le finestre di associazione",
4117
+ noInterfaces: "Questa CCU non ha interfacce radio che possano associare dispositivi.",
4118
+ hmipKeyNote: "I dispositivi HmIP si associano con la finestra qui sotto; l'inserimento di chiave o SGTIN non è offerto dall'interfaccia CCU usata da questa pagina, usa la WebUI della CCU.",
4119
+ statusOpen: "Aperta, {{seconds}} s rimanenti",
4120
+ statusClosed: "Chiusa",
4121
+ statusUnknown: "Sconosciuto",
4122
+ fieldSeconds: "Durata finestra (secondi)",
4123
+ fieldMode: "Modalità",
4124
+ modeNormal: "Normale",
4125
+ modeSecure: "Sicura (insegna anche la chiave HomeMatic Secure)",
4126
+ start: "Avvia associazione",
4127
+ stop: "Ferma associazione",
4128
+ startTitle: "Apri la finestra di associazione {{name}}",
4129
+ startMessage: "{{name}} accetterà nuovi dispositivi per {{seconds}} secondi. Metti ora il dispositivo in modalità associazione.",
4130
+ stopTitle: "Chiudi la finestra di associazione {{name}}",
4131
+ stopMessage: "{{name}} smetterà di accettare nuovi dispositivi.",
4132
+ foundTitle: "Dispositivi trovati",
4133
+ foundNone: "Nessun nuovo dispositivo da quando hai aperto questa scheda.",
4134
+ foundWaiting: "In attesa di un dispositivo da associare..."
4135
+ },
4136
+ config: {
4137
+ title: "Configura {{name}}",
4138
+ loadFailed: "Impossibile leggere la configurazione del dispositivo",
4139
+ none: "Questo dispositivo non ha parametri configurabili.",
4140
+ channel: "Canale",
4141
+ range: "Tra {{min}} e {{max}}",
4142
+ unknown: "Sconosciuto",
4143
+ valuesUnreadable: "Impossibile leggere i valori attuali: {{error}}",
4144
+ save: "Salva modifiche",
4145
+ confirmTitle: "Scrivi configurazione dispositivo",
4146
+ confirmMessage: "{{count}} parametro/i verranno scritti su {{channel}}: {{names}}. Un valore sbagliato può cambiare il comportamento del dispositivo.",
4147
+ confirmLabel: "Scrivi configurazione"
4148
+ },
4149
+ links: {
4150
+ title: "Collegamenti diretti",
4151
+ hint: "Collegamenti che la CCU mantiene tra un canale mittente e un canale ricevente. Qui si possono creare e modificare i collegamenti tasto → attuatore; gli altri sono mostrati così come sono.",
4152
+ newLink: "Nuovo collegamento",
4153
+ editProfile: "Cambia profilo",
4154
+ delete: "Elimina collegamento",
4155
+ save: "Salva",
4156
+ pick: "Scegli un canale",
4157
+ fieldSender: "Canale tasto (mittente)",
4158
+ fieldSenderHint: "Solo i canali tasto possono avviare un collegamento creato qui.",
4159
+ fieldReceiver: "Canale attuatore (ricevente)",
4160
+ fieldReceiverHint: "Per ora solo canali attuatore di commutazione.",
4161
+ fieldShort: "Pressione breve",
4162
+ fieldLong: "Pressione lunga",
4163
+ action_toggle: "Commuta",
4164
+ action_on: "Accendi",
4165
+ action_off: "Spegni",
4166
+ action_none: "Nulla",
4167
+ colSender: "Mittente",
4168
+ colReceiver: "Ricevente",
4169
+ colName: "Nome",
4170
+ colProfile: "Profilo",
4171
+ profileCustom: "Personalizzato (non modificabile qui)",
4172
+ profileSwitch: "Breve: {{short}} · Lunga: {{long}}",
4173
+ none: "Nessun collegamento diretto su questa CCU.",
4174
+ loadFailed: "Impossibile leggere i collegamenti diretti",
4175
+ partial_one: "Non è stato possibile leggere i collegamenti di {{count}} dispositivo; l'elenco è incompleto",
4176
+ partial_other: "Non è stato possibile leggere i collegamenti di {{count}} dispositivi; l'elenco è incompleto",
4177
+ createTitle: "Crea collegamento diretto",
4178
+ createMessage: "Creare il collegamento {{link}} sulla CCU (pressione breve: {{short}}, lunga: {{long}})? Il tasto comanderà l'attuatore direttamente.",
4179
+ createConfirm: "Crea collegamento",
4180
+ profileTitle: "Cambia profilo del collegamento",
4181
+ profileMessage: "Scrivere pressione breve: {{short}}, lunga: {{long}} sul collegamento {{link}} nella CCU?",
4182
+ profileConfirm: "Scrivi profilo",
4183
+ deleteTitle: "Elimina collegamento diretto",
4184
+ deleteMessage: "Eliminare il collegamento {{link}} sulla CCU? Il tasto non comanderà più direttamente quell'attuatore.",
4185
+ deleteConfirm: "Elimina collegamento",
4186
+ searchPlaceholder: "Cerca mittente, destinatario, nome, profilo",
4187
+ searchLabel: "Cerca collegamenti",
4188
+ facetsLabel: "Profilo",
4189
+ clearFilters: "Azzera filtri",
4190
+ noMatch: "Nessun collegamento corrisponde al filtro"
4191
+ },
4192
+ rename: {
4193
+ title: "Rinomina {{name}}",
4194
+ deviceName: "Nome del dispositivo",
4195
+ deviceSave: "Rinomina dispositivo",
4196
+ renameChannels: "Rinomina anche ogni canale con il nome del dispositivo seguito da :1, :2 …",
4197
+ channels: "Canali",
4198
+ channelsHint: "Rinomina un canale alla volta; ogni rinomina chiede conferma.",
4199
+ channelName: "Nome del canale {{index}}",
4200
+ channelSave: "Rinomina",
4201
+ deviceTitle: "Rinomina dispositivo sulla CCU",
4202
+ deviceMessage: "Rinominare {{from}} in {{to}} sulla CCU?",
4203
+ deviceMessageChannels: "Rinominare {{from}} in {{to}} sulla CCU, e ogni canale in {{to}}:1, {{to}}:2 …? I nomi dei canali impostati a mano vengono sostituiti.",
4204
+ deviceConfirm: "Rinomina",
4205
+ channelTitle: "Rinomina canale sulla CCU",
4206
+ channelMessage: "Rinominare il canale {{from}} in {{to}} sulla CCU?",
4207
+ channelConfirm: "Rinomina"
4208
+ },
4209
+ rooms: {
4210
+ title: "Stanze",
4211
+ newRoom: "Nuova stanza",
4212
+ fieldName: "Nome della stanza",
4213
+ colRoom: "Stanza",
4214
+ colChannels: "Canali",
4215
+ none: "La CCU non ha stanze.",
4216
+ loadFailed: "Impossibile leggere le stanze",
4217
+ editChannels: "Scegli i canali",
4218
+ rename: "Rinomina",
4219
+ delete: "Elimina stanza",
4220
+ save: "Salva",
4221
+ search: "Cerca canali",
4222
+ selected_one: "{{count}} canale selezionato",
4223
+ selected_other: "{{count}} canali selezionati",
4224
+ channelsTitle: "Canali in {{name}}",
4225
+ createTitle: "Crea stanza",
4226
+ createMessage: "Creare la stanza {{name}} sulla CCU?",
4227
+ createConfirm: "Crea stanza",
4228
+ renameTitle: "Rinomina stanza",
4229
+ renameMessage: "Rinominare la stanza {{from}} in {{to}} sulla CCU?",
4230
+ renameConfirm: "Rinomina",
4231
+ deleteTitle: "Elimina stanza",
4232
+ deleteMessage: "Eliminare la stanza {{name}} sulla CCU? I canali restano, escono solo dalla stanza.",
4233
+ deleteConfirm: "Elimina stanza",
4234
+ membersTitle: "Cambia i canali della stanza",
4235
+ membersMessage_one: "Impostare la stanza {{name}} con {{count}} canale sulla CCU?",
4236
+ membersMessage_other: "Impostare la stanza {{name}} con {{count}} canali sulla CCU?",
4237
+ membersConfirm: "Salva canali"
4238
+ },
4239
+ panel: {
4240
+ loadFailed: "Impossibile leggere il dispositivo dalla CCU",
4241
+ badConfig: "A questo pannello manca il dispositivo CCU",
4242
+ reload: "Ricarica",
4243
+ configure: "Configura",
4244
+ reachable: "Raggiungibile",
4245
+ unreachable: "Non raggiungibile",
4246
+ lowBattery: "Batteria scarica",
4247
+ configPending: "Configurazione in sospeso",
4248
+ dutyCycleReached: "Limite duty cycle raggiunto",
4249
+ dutyCycle: "Duty cycle {{value}}%",
4250
+ rssi: "RSSI {{device}} / {{peer}} dBm",
4251
+ firmware: "Firmware {{version}}",
4252
+ firmwareUpdate: "Aggiornamento disponibile: {{version}}",
4253
+ maintenance: "Manutenzione",
4254
+ colParameter: "Parametro",
4255
+ colValue: "Valore",
4256
+ yes: "Sì",
4257
+ no: "No",
4258
+ press: "Premi",
4259
+ turnOn: "Accendi",
4260
+ turnOff: "Spegni",
4261
+ setAction: "Imposta…",
4262
+ set: "Invia",
4263
+ setTitle: "Imposta {{parameter}} · {{channel}}",
4264
+ writeTitle: "Modifica un valore sulla CCU",
4265
+ writeMessage: "Impostare {{parameter}} di {{channel}} a {{value}}?",
4266
+ pressMessage: "Inviare {{parameter}} su {{channel}}? Verrà eseguito ciò a cui il tasto è collegato.",
4267
+ writeConfirm: "Invia alla CCU",
4268
+ none: "Nessun valore"
4269
+ }
4270
+ }
4271
+ });
4272
+ //#endregion
4273
+ //#region src/ui/ParamField.tsx
4274
+ function is(e, t) {
4275
+ if (typeof t == "boolean") return t;
4276
+ if (e.type === "INTEGER" || e.type === "FLOAT") {
4277
+ if (t.trim() === "") return;
4278
+ let e = Number(t);
4279
+ return Number.isFinite(e) ? e : void 0;
4280
+ }
4281
+ return t;
4282
+ }
4283
+ function as(e) {
4284
+ let { param: r, edit: i, onEdit: a } = e, { t: o } = $(), s = r.unit === null ? r.parameter : `${r.parameter} (${r.unit})`, c = r.min !== null && r.max !== null ? o("config.range", {
4285
+ min: r.min,
4286
+ max: r.max
4287
+ }) : void 0;
4288
+ if (r.type === "BOOL") {
4289
+ let e = typeof i == "boolean" ? i : r.value === !0;
4290
+ return /* @__PURE__ */ b(u, {
4291
+ label: s,
4292
+ children: /* @__PURE__ */ b(d, {
4293
+ checked: e,
4294
+ disabled: !r.writable,
4295
+ onChange: () => a(!e)
4296
+ })
4297
+ });
4298
+ }
4299
+ if (r.type === "ENUM" && r.valueList !== null) {
4300
+ let e = typeof i == "string" ? i : typeof r.value == "string" ? r.value : "";
4301
+ return /* @__PURE__ */ b(u, {
4302
+ label: s,
4303
+ children: /* @__PURE__ */ b(n, {
4304
+ value: e,
4305
+ disabled: !r.writable,
4306
+ onChange: (e) => a(e.target.value),
4307
+ options: [...e === "" ? [{
4308
+ value: "",
4309
+ label: o("config.unknown")
4310
+ }] : [], ...r.valueList.map((e) => ({
4311
+ value: e,
4312
+ label: e
4313
+ }))]
4314
+ })
4315
+ });
4316
+ }
4317
+ let l = r.type === "INTEGER" || r.type === "FLOAT", f = typeof i == "string" ? i : r.value === null ? "" : String(r.value);
4318
+ return /* @__PURE__ */ b(u, {
4319
+ label: s,
4320
+ ...c === void 0 ? {} : { description: c },
4321
+ children: /* @__PURE__ */ b(t, {
4322
+ type: l ? "number" : "text",
4323
+ value: f,
4324
+ disabled: !r.writable,
4325
+ ...r.min === null ? {} : { min: r.min },
4326
+ ...r.max === null ? {} : { max: r.max },
4327
+ onChange: (e) => a(e.target.value)
4328
+ })
4329
+ });
4330
+ }
4331
+ //#endregion
4332
+ //#region src/ui/ccu-client.ts
4333
+ var os = "provider-homematic";
4334
+ async function ss(e, t, n, r) {
4335
+ let i = await e.addons.custom.mutate({
4336
+ addonId: os,
4337
+ action: t,
4338
+ input: n
4339
+ });
4340
+ return r.parse(i);
4341
+ }
4342
+ //#endregion
4343
+ //#region src/ui/use-ccu-data.ts
4344
+ function cs(e, t, n, r, i = {}) {
4345
+ let [a, o] = _(void 0), [s, c] = _(null), [l, u] = _(n !== null), [d, f] = _(0), p = ee(0), h = JSON.stringify(n), v = i.pollMs;
4346
+ return m(() => {
4347
+ if (n === null) {
4348
+ o(void 0), u(!1);
4349
+ return;
4350
+ }
4351
+ let i = ++p.current, a, s = (l) => {
4352
+ l && u(!0), ss(e, t, n, r).then((e) => {
4353
+ p.current === i && (o(e), c(null), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
4354
+ }, (e) => {
4355
+ p.current === i && (c(e instanceof Error ? e.message : String(e)), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
4356
+ });
4357
+ };
4358
+ return s(!0), () => {
4359
+ p.current++, a !== void 0 && clearTimeout(a);
4360
+ };
4361
+ }, [
4362
+ e,
4363
+ t,
4364
+ h,
4365
+ r,
4366
+ d,
4367
+ v
4368
+ ]), {
4369
+ data: a,
4370
+ error: s,
4371
+ loading: l,
4372
+ reload: g(() => f((e) => e + 1), [])
4373
+ };
4374
+ }
4375
+ //#endregion
4376
+ //#region src/ui/use-ccu-write.ts
4377
+ function ls(e) {
4378
+ let t = l(), n = o(), { t: r } = $();
4379
+ return g(async (i) => {
4380
+ if (!await t({
4381
+ title: i.title,
4382
+ message: i.message,
4383
+ confirmLabel: i.confirmLabel,
4384
+ variant: i.variant ?? "default"
4385
+ })) return null;
4386
+ try {
4387
+ return await ss(e, i.action, {
4388
+ ...i.input,
4389
+ confirmed: !0
4390
+ }, i.schema);
4391
+ } catch (e) {
4392
+ return await n({
4393
+ title: r("write.failedTitle"),
4394
+ message: e instanceof Error ? e.message : String(e),
4395
+ variant: "danger"
4396
+ }), null;
4397
+ }
4398
+ }, [
4399
+ e,
4400
+ t,
4401
+ n,
4402
+ r
4403
+ ]);
4404
+ }
4405
+ //#endregion
4406
+ //#region src/ui/ChannelConfigDialog.tsx
4407
+ function us(e) {
4408
+ let { trpc: t, integrationId: i, device: o, onClose: c } = e, { t: l } = $(), d = ls(t), f = cs(t, "getCcuDeviceConfig", p(() => ({
4409
+ integrationId: i,
4410
+ address: o.address
4411
+ }), [i, o.address]), Wo), [m, h] = _(null), [ee, g] = _({}), [v, x] = _(!1), S = f.data?.channels ?? [], C = S.find((e) => e.channel === m) ?? S[0], te = p(() => {
4412
+ let e = {};
4413
+ for (let t of C?.params ?? []) {
4414
+ let n = ee[`${C?.channel}/${t.parameter}`];
4415
+ if (n === void 0) continue;
4416
+ let r = is(t, n);
4417
+ r !== void 0 && r !== t.value && (e[t.parameter] = r);
4418
+ }
4419
+ return e;
4420
+ }, [C, ee]), w = Object.keys(te).length, T = async () => {
4421
+ if (C !== void 0) {
4422
+ x(!0);
4423
+ try {
4424
+ await d({
4425
+ action: "setCcuChannelConfig",
4426
+ input: {
4427
+ integrationId: i,
4428
+ channel: C.channel,
4429
+ values: te
4430
+ },
4431
+ schema: No,
4432
+ title: l("config.confirmTitle"),
4433
+ message: l("config.confirmMessage", {
4434
+ channel: C.channel,
4435
+ count: w,
4436
+ names: Object.keys(te).join(", ")
4437
+ }),
4438
+ confirmLabel: l("config.confirmLabel"),
4439
+ variant: "warning"
4440
+ }) !== null && (g({}), f.reload());
4441
+ } finally {
4442
+ x(!1);
4443
+ }
4444
+ }
4445
+ };
4446
+ return /* @__PURE__ */ b(a, {
4447
+ open: !0,
4448
+ onClose: c,
4449
+ icon: ko,
4450
+ width: "lg",
4451
+ title: l("config.title", { name: o.name ?? o.address }),
4452
+ testId: "hm-config-dialog",
4453
+ footer: /* @__PURE__ */ b(r, {
4454
+ type: "button",
4455
+ onClick: () => void T(),
4456
+ disabled: w === 0 || v,
4457
+ children: l("config.save")
4458
+ }),
4459
+ children: f.error === null ? f.data === void 0 ? /* @__PURE__ */ b("p", {
4460
+ className: "text-sm text-foreground-subtle",
4461
+ children: l("common.loading")
4462
+ }) : C === void 0 ? /* @__PURE__ */ b("p", {
4463
+ className: "text-sm text-foreground-subtle",
4464
+ children: l("config.none")
4465
+ }) : /* @__PURE__ */ y("div", {
4466
+ className: "flex flex-col gap-3",
4467
+ children: [
4468
+ S.length > 1 && /* @__PURE__ */ b(u, {
4469
+ label: l("config.channel"),
4470
+ children: /* @__PURE__ */ b(n, {
4471
+ value: C.channel,
4472
+ onChange: (e) => {
4473
+ h(e.target.value), g({});
4474
+ },
4475
+ options: S.map((e) => ({
4476
+ value: e.channel,
4477
+ label: e.channelType === null ? e.channel : `${e.channel} · ${e.channelType}`
4478
+ }))
4479
+ })
4480
+ }),
4481
+ C.error !== null && /* @__PURE__ */ b("p", {
4482
+ className: "text-xs text-danger",
4483
+ children: l("config.valuesUnreadable", { error: C.error })
4484
+ }),
4485
+ C.params.map((e) => /* @__PURE__ */ b(as, {
4486
+ param: e,
4487
+ edit: ee[`${C.channel}/${e.parameter}`],
4488
+ onEdit: (t) => g((n) => ({
4489
+ ...n,
4490
+ [`${C.channel}/${e.parameter}`]: t
4491
+ }))
4492
+ }, e.parameter))
4493
+ ]
4494
+ }) : /* @__PURE__ */ b(s, {
4495
+ title: l("config.loadFailed"),
4496
+ message: f.error,
4497
+ onRetry: f.reload
4498
+ })
4499
+ });
4500
+ }
4501
+ //#endregion
4502
+ //#region src/ui/value-format.ts
4503
+ function ds(e) {
4504
+ return e.type !== "ENUM" || e.valueList === null || typeof e.value != "number" ? e : {
4505
+ ...e,
4506
+ value: e.valueList[e.value] ?? null
4507
+ };
4508
+ }
4509
+ function fs(e, t) {
4510
+ if (e.type === "ENUM" && e.valueList !== null && typeof t == "string") {
4511
+ let n = e.valueList.indexOf(t);
4512
+ return n < 0 ? void 0 : n;
4513
+ }
4514
+ return is(e, t);
4515
+ }
4516
+ function ps(e) {
4517
+ if (!e.readable || e.value === null || typeof e.value == "boolean") return null;
4518
+ let t = ds(e).value;
4519
+ return t === null ? null : e.unit === null || e.unit === "" ? String(t) : `${String(t)} ${e.unit}`;
4520
+ }
4521
+ //#endregion
4522
+ //#region src/ui/SetValueDialog.tsx
4523
+ function ms(e) {
4524
+ let { param: t, channelLabel: n, onClose: i, onSet: o } = e, { t: s } = $(), [c, l] = _(void 0), [u, d] = _(!1), f = c === void 0 ? void 0 : fs(t, c), p = async () => {
4525
+ if (f !== void 0) {
4526
+ d(!0);
4527
+ try {
4528
+ await o(f);
4529
+ } finally {
4530
+ d(!1);
4531
+ }
4532
+ }
4533
+ };
4534
+ return /* @__PURE__ */ b(a, {
4535
+ open: !0,
4536
+ onClose: i,
4537
+ icon: Oo,
4538
+ title: s("panel.setTitle", {
4539
+ parameter: t.parameter,
4540
+ channel: n
4541
+ }),
4542
+ testId: "hm-set-value-dialog",
4543
+ footer: /* @__PURE__ */ b(r, {
4544
+ type: "button",
4545
+ onClick: () => void p(),
4546
+ disabled: f === void 0 || u,
4547
+ children: s("panel.set")
4548
+ }),
4549
+ children: /* @__PURE__ */ b(as, {
4550
+ param: ds(t),
4551
+ edit: c,
4552
+ onEdit: l
4553
+ })
4554
+ });
4555
+ }
4556
+ //#endregion
4557
+ //#region src/ui/DevicePanel.tsx
4558
+ function hs(e) {
4559
+ return e.name ?? `${e.type ?? e.address} · ${e.index}`;
4560
+ }
4561
+ function gs(e) {
4562
+ let { diagnostics: t, firmware: n } = e.state, { t: r } = $(), i = (e) => e === null ? "—" : String(e);
4563
+ return /* @__PURE__ */ y("div", {
4564
+ className: "flex flex-wrap items-center gap-2",
4565
+ "data-testid": "hm-panel-diagnostics",
4566
+ children: [
4567
+ t.unreach !== null && /* @__PURE__ */ b(f, {
4568
+ variant: t.unreach ? "danger" : "success",
4569
+ children: t.unreach ? r("panel.unreachable") : r("panel.reachable")
4570
+ }),
4571
+ t.lowBattery === !0 && /* @__PURE__ */ b(f, {
4572
+ variant: "warning",
4573
+ children: r("panel.lowBattery")
4574
+ }),
4575
+ t.configPending === !0 && /* @__PURE__ */ b(f, {
4576
+ variant: "info",
4577
+ children: r("panel.configPending")
4578
+ }),
4579
+ t.dutyCycle === !0 && /* @__PURE__ */ b(f, {
4580
+ variant: "warning",
4581
+ children: r("panel.dutyCycleReached")
4582
+ }),
4583
+ typeof t.dutyCycle == "number" && /* @__PURE__ */ b(f, { children: r("panel.dutyCycle", { value: t.dutyCycle }) }),
4584
+ (t.rssiDevice !== null || t.rssiPeer !== null) && /* @__PURE__ */ b(f, { children: r("panel.rssi", {
4585
+ device: i(t.rssiDevice),
4586
+ peer: i(t.rssiPeer)
4587
+ }) }),
4588
+ n.installed !== null && /* @__PURE__ */ b(f, { children: r("panel.firmware", { version: n.installed }) }),
4589
+ n.available !== null && n.available !== n.installed && /* @__PURE__ */ b(f, {
4590
+ variant: "info",
4591
+ children: r("panel.firmwareUpdate", { version: n.available })
4592
+ })
4593
+ ]
4594
+ });
4595
+ }
4596
+ function _s(e) {
4597
+ let { trpc: t, integrationId: n, address: a, deviceId: o } = e, { t: c } = $(), l = cs(t, "getCcuDeviceState", p(() => ({
4598
+ integrationId: n,
4599
+ address: a
4600
+ }), [n, a]), ts), u = ls(t), [d, m] = _({ kind: "closed" }), h = async (e, t, r) => {
4601
+ let i = t.type === "ACTION", a = ds({
4602
+ ...t,
4603
+ value: r
4604
+ }).value;
4605
+ return await u({
4606
+ action: "setCcuValue",
4607
+ input: {
4608
+ integrationId: n,
4609
+ channel: e.address,
4610
+ parameter: t.parameter,
4611
+ value: r,
4612
+ ...o === void 0 ? {} : { deviceId: o }
4613
+ },
4614
+ schema: No,
4615
+ title: c("panel.writeTitle"),
4616
+ message: i ? c("panel.pressMessage", {
4617
+ parameter: t.parameter,
4618
+ channel: hs(e)
4619
+ }) : c("panel.writeMessage", {
4620
+ parameter: t.parameter,
4621
+ channel: hs(e),
4622
+ value: String(a)
4623
+ }),
4624
+ confirmLabel: c("panel.writeConfirm"),
4625
+ variant: "warning"
4626
+ }) === null ? !1 : (l.reload(), !0);
4627
+ }, ee = (e, t) => {
4628
+ if (!t.writable) return null;
4629
+ if (t.type === "ACTION") return /* @__PURE__ */ b(r, {
4630
+ type: "button",
4631
+ size: "sm",
4632
+ variant: "outline",
4633
+ onClick: () => void h(e, t, !0),
4634
+ children: c("panel.press")
4635
+ });
4636
+ if (t.type === "BOOL") {
4637
+ let n = t.value !== !0;
4638
+ return /* @__PURE__ */ b(r, {
4639
+ type: "button",
4640
+ size: "sm",
4641
+ variant: "outline",
4642
+ onClick: () => void h(e, t, n),
4643
+ children: c(n ? "panel.turnOn" : "panel.turnOff")
4644
+ });
4645
+ }
4646
+ return /* @__PURE__ */ b(r, {
4647
+ type: "button",
4648
+ size: "sm",
4649
+ variant: "outline",
4650
+ onClick: () => m({
4651
+ kind: "set",
4652
+ channel: e,
4653
+ param: t
4654
+ }),
4655
+ children: c("panel.setAction")
4656
+ });
4657
+ }, g = (e) => e.readable && typeof e.value == "boolean" ? /* @__PURE__ */ b(f, {
4658
+ variant: e.value ? "success" : "default",
4659
+ children: e.value ? c("panel.yes") : c("panel.no")
4660
+ }) : /* @__PURE__ */ b("span", {
4661
+ className: "text-sm text-foreground",
4662
+ children: ps(e) ?? "—"
4663
+ }), v = (e) => [
4664
+ {
4665
+ key: "parameter",
4666
+ header: c("panel.colParameter"),
4667
+ render: (e) => /* @__PURE__ */ b("span", {
4668
+ className: "font-mono text-xs text-foreground",
4669
+ children: e.parameter
4670
+ }),
4671
+ sortValue: (e) => e.parameter
4672
+ },
4673
+ {
4674
+ key: "value",
4675
+ header: c("panel.colValue"),
4676
+ render: g,
4677
+ notSortableReason: "Mixed value types"
4678
+ },
4679
+ {
4680
+ key: "actions",
4681
+ header: "",
4682
+ align: "right",
4683
+ notSortableReason: "Action column",
4684
+ render: (t) => ee(e, t)
4685
+ }
4686
+ ];
4687
+ if (l.error !== null) return /* @__PURE__ */ b(s, {
4688
+ title: c("panel.loadFailed"),
4689
+ message: l.error,
4690
+ onRetry: l.reload
4691
+ });
4692
+ let x = l.data;
4693
+ return x === void 0 ? /* @__PURE__ */ b("p", {
4694
+ className: "text-sm text-foreground-subtle",
4695
+ children: c("common.loading")
4696
+ }) : /* @__PURE__ */ y("div", {
4697
+ className: "flex flex-col gap-3",
4698
+ "data-testid": "hm-device-panel",
4699
+ children: [
4700
+ /* @__PURE__ */ y("div", {
4701
+ className: "flex flex-wrap items-center justify-between gap-2",
4702
+ children: [/* @__PURE__ */ y("span", {
4703
+ className: "text-sm text-foreground-muted",
4704
+ children: [
4705
+ x.type,
4706
+ " · ",
4707
+ x.address
4708
+ ]
4709
+ }), /* @__PURE__ */ y("div", {
4710
+ className: "flex gap-2",
4711
+ children: [/* @__PURE__ */ y(r, {
4712
+ type: "button",
4713
+ size: "sm",
4714
+ variant: "outline",
4715
+ onClick: l.reload,
4716
+ children: [/* @__PURE__ */ b(Do, { className: "h-4 w-4" }), c("panel.reload")]
4717
+ }), /* @__PURE__ */ y(r, {
4718
+ type: "button",
4719
+ size: "sm",
4720
+ onClick: () => m({ kind: "configure" }),
4721
+ children: [/* @__PURE__ */ b(ko, { className: "h-4 w-4" }), c("panel.configure")]
4722
+ })]
4723
+ })]
4724
+ }),
4725
+ /* @__PURE__ */ b(gs, { state: x }),
4726
+ x.channels.filter((e) => e.values.length > 0).map((e) => /* @__PURE__ */ y("div", {
4727
+ className: "flex flex-col gap-1",
4728
+ children: [/* @__PURE__ */ y("span", {
4729
+ className: "text-xs font-medium text-foreground-muted",
4730
+ children: [
4731
+ e.index === 0 ? c("panel.maintenance") : hs(e),
4732
+ " ·",
4733
+ " ",
4734
+ e.address
4735
+ ]
4736
+ }), /* @__PURE__ */ b(i, {
4737
+ columns: v(e),
4738
+ rows: e.values,
4739
+ rowKey: (e) => e.parameter,
4740
+ minWidthPx: 280,
4741
+ emptyMessage: c("panel.none")
4742
+ })]
4743
+ }, e.address)),
4744
+ d.kind === "configure" && /* @__PURE__ */ b(us, {
4745
+ trpc: t,
4746
+ integrationId: n,
4747
+ device: {
4748
+ address: x.address,
4749
+ name: x.name
4750
+ },
4751
+ onClose: () => m({ kind: "closed" })
4752
+ }),
4753
+ d.kind === "set" && /* @__PURE__ */ b(ms, {
4754
+ param: d.param,
4755
+ channelLabel: hs(d.channel),
4756
+ onClose: () => m({ kind: "closed" }),
4757
+ onSet: async (e) => {
4758
+ await h(d.channel, d.param, e) && m({ kind: "closed" });
4759
+ }
4760
+ })
4761
+ ]
4762
+ });
4763
+ }
4764
+ //#endregion
4765
+ //#region src/widgets/DevicePanelWidget.tsx
4766
+ var vs = Y({
4767
+ integrationId: W().min(1),
4768
+ address: W().min(1)
4769
+ });
4770
+ function ys(t) {
4771
+ let n = e(), { t: r } = $(), i = vs.safeParse(t.config ?? {});
4772
+ return i.success ? /* @__PURE__ */ b(_s, {
4773
+ trpc: n,
4774
+ integrationId: i.data.integrationId,
4775
+ address: i.data.address,
4776
+ ...t.deviceId === void 0 ? {} : { deviceId: t.deviceId }
4777
+ }) : /* @__PURE__ */ b("p", {
4778
+ className: "text-sm text-danger",
4779
+ children: r("panel.badConfig")
4780
+ });
4781
+ }
4782
+ //#endregion
4783
+ //#region src/widgets/index.tsx
4784
+ var bs = { "device-panel": ys };
4785
+ //#endregion
4786
+ export { bs as default };