@tempots/beatui 0.95.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ar-BVXPzVJB.cjs → ar-CuI1Jgt6.cjs} +1 -1
- package/dist/{ar-B4jDJwHQ.js → ar-DaKbK_t8.js} +87 -11
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-BPwKk8MW.js → auth-divider-CbME_yVQ.js} +87 -86
- package/dist/auth-divider-MMhfmLBu.cjs +1 -0
- package/dist/beatui.css +1628 -545
- package/dist/beatui.tailwind.css +1628 -545
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +6 -6
- package/dist/codehighlight/index.cjs.js +22 -0
- package/dist/codehighlight/index.es.js +76 -0
- package/dist/colors-B-p6IzX9.cjs +1 -0
- package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
- package/dist/{de-Dd33yWzb.js → de-3MTPDS1i.js} +82 -6
- package/dist/{de-BdfPZskW.cjs → de-DthHehbh.cjs} +1 -1
- package/dist/{deep-merge-C8dSqIXI.js → deep-merge-BzIheQtH.js} +511 -517
- package/dist/deep-merge-EkjEgK0N.cjs +1 -0
- package/dist/{duration-input-IuFWywO5.cjs → duration-input-ClgYjeBa.cjs} +1 -1
- package/dist/{duration-input-DFZwkg6M.js → duration-input-DGzmIImj.js} +5 -5
- package/dist/{editor-toolbar-group-DiJFgGcI.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
- package/dist/{editor-toolbar-group-BCBfu8pG.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
- package/dist/es-B6GJLk9h.cjs +1 -0
- package/dist/{es-jHMT3_7O.js → es-DwMUvBeU.js} +94 -18
- package/dist/{fa-eX3_BAZR.js → fa-0rvQiKrJ.js} +87 -11
- package/dist/{fa-BXnP4pbN.cjs → fa-BwgP93iV.cjs} +1 -1
- package/dist/{fr-Bj-GjMJm.js → fr-B4i6NzLl.js} +86 -10
- package/dist/{fr-HJDhGjI2.cjs → fr-CQzk5zqY.cjs} +1 -1
- package/dist/{he-DYgmPPkG.js → he-C71n-hsn.js} +87 -11
- package/dist/{he-C6nEVZhN.cjs → he-DcxxvRfs.cjs} +1 -1
- package/dist/{hi-DMVSXAJt.cjs → hi-D-KHVWg4.cjs} +1 -1
- package/dist/{hi-CgYLonE9.js → hi-xmrXpeVU.js} +87 -11
- package/dist/index-B5MAsOC-.cjs +1 -0
- package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +8055 -5285
- package/dist/input-container-BvEcp7FU.js +275 -0
- package/dist/input-container-Di1YvVB_.cjs +1 -0
- package/dist/{it-CO2BPqah.js → it-CDZTtOBC.js} +83 -7
- package/dist/{it-DhfVcjKb.cjs → it-D344Dutu.cjs} +1 -1
- package/dist/{ja-Bt6fGS_Q.cjs → ja-BNgnDZ27.cjs} +1 -1
- package/dist/{ja-BrzwjH8T.js → ja-Zz1LzidW.js} +91 -15
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +261 -257
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +132 -133
- package/dist/{ko-D-lJ4wYQ.js → ko-9laUsZDL.js} +90 -14
- package/dist/{ko-DfAaBGrz.cjs → ko-D-WJ9NK7.cjs} +1 -1
- package/dist/lexical/index.cjs.js +2 -39
- package/dist/lexical/index.es.js +2056 -20626
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +41 -4
- package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
- package/dist/menu-B92oSDct.cjs +1 -0
- package/dist/modal-BT0jjDqX.cjs +1 -0
- package/dist/{modal-CwZuWiSK.js → modal-DBguyX-b.js} +9 -9
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +7 -7
- package/dist/{nl-CNWBQjK5.cjs → nl-CrqUlFie.cjs} +1 -1
- package/dist/{nl-ClsworIe.js → nl-Dcll9fVA.js} +86 -10
- package/dist/notice-B5wTXoTq.cjs +1 -0
- package/dist/{notice-D7hYFM5A.js → notice-BKcyJD5w.js} +37 -37
- package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
- package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
- package/dist/{pl-CqHTeu3-.cjs → pl-9UksIrvX.cjs} +1 -1
- package/dist/{pl-WTwLAxnV.js → pl-Dm9N9Gbr.js} +83 -7
- package/dist/prosemirror/index.cjs.js +3 -1
- package/dist/prosemirror/index.es.js +636 -4
- package/dist/{pt-CgkjJnsG.js → pt-CFi5cn0k.js} +88 -12
- package/dist/{pt-BQmsiqbo.cjs → pt-_kfdzwqi.cjs} +1 -1
- package/dist/{ru-CtgH7OY9.js → ru-CEhZUw8R.js} +91 -15
- package/dist/{ru-CG56A2To.cjs → ru-CW1WNNlr.cjs} +1 -1
- package/dist/stack-BLMteGTn.js +15 -0
- package/dist/stack-dwLevGa2.cjs +1 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/text-input-DfqXolVe.js +55 -0
- package/dist/text-input-X_q01NsY.cjs +1 -0
- package/dist/toolbar-DY0ax2Qd.js +130 -0
- package/dist/toolbar-DoKdYXIL.cjs +1 -0
- package/dist/{tr-DE7_VtKu.cjs → tr-B6GIRegf.cjs} +1 -1
- package/dist/{tr-D1O1vEmr.js → tr-ZmnVDhLP.js} +81 -5
- package/dist/{translations-yu4gNqlP.js → translations-A4kR7CW8.js} +1 -1
- package/dist/{translations-DyCmyLE_.js → translations-B1_yyDUK.js} +207 -129
- package/dist/{translations-DBxIjvWR.cjs → translations-C81buKAw.cjs} +1 -1
- package/dist/translations-Dbx7L7Q1.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +71 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +71 -0
- package/dist/types/beatui-i18n/translations.d.ts +71 -0
- package/dist/types/codehighlight/code-highlight.d.ts +21 -0
- package/dist/types/codehighlight/index.d.ts +14 -0
- package/dist/types/components/button/toggle-button.d.ts +4 -4
- package/dist/types/components/data/avatar.d.ts +3 -1
- package/dist/types/components/data/badge.d.ts +10 -18
- package/dist/types/components/data/column-filter-panel.d.ts +31 -0
- package/dist/types/components/data/column-filter.d.ts +110 -0
- package/dist/types/components/data/column-header-menu.d.ts +42 -0
- package/dist/types/components/data/data-source.d.ts +190 -0
- package/dist/types/components/data/data-table-body.d.ts +12 -0
- package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
- package/dist/types/components/data/data-table-context.d.ts +53 -0
- package/dist/types/components/data/data-table-header.d.ts +6 -0
- package/dist/types/components/data/data-table-resolve.d.ts +26 -0
- package/dist/types/components/data/data-table-types.d.ts +201 -0
- package/dist/types/components/data/data-table.d.ts +38 -0
- package/dist/types/components/data/data-toolbar.d.ts +44 -0
- package/dist/types/components/data/date-picker-shared.d.ts +55 -0
- package/dist/types/components/data/date-picker.d.ts +58 -0
- package/dist/types/components/data/date-range-picker.d.ts +56 -0
- package/dist/types/components/data/filter.d.ts +268 -0
- package/dist/types/components/data/index.d.ts +13 -4
- package/dist/types/components/data/indicator.d.ts +41 -0
- package/dist/types/components/data/progress-bar.d.ts +2 -2
- package/dist/types/components/data/selection-checkbox.d.ts +63 -0
- package/dist/types/components/data/skeleton.d.ts +1 -1
- package/dist/types/components/data/sortable-header.d.ts +55 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
- package/dist/types/components/form/control/control.d.ts +9 -9
- package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
- package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
- package/dist/types/components/form/input/bigint-input.d.ts +3 -3
- package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
- package/dist/types/components/form/input/color-input.d.ts +1 -1
- package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
- package/dist/types/components/form/input/combobox-input.d.ts +5 -5
- package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/date-input.d.ts +4 -4
- package/dist/types/components/form/input/date-time-input.d.ts +4 -4
- package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
- package/dist/types/components/form/input/editable-text.d.ts +2 -2
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +28 -1
- package/dist/types/components/form/input/mask-input.d.ts +8 -2
- package/dist/types/components/form/input/native-select.d.ts +3 -3
- package/dist/types/components/form/input/nullable-bigint-input.d.ts +3 -3
- package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-date-time-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
- package/dist/types/components/form/input/number-input.d.ts +3 -3
- package/dist/types/components/form/input/otp-input.d.ts +12 -12
- package/dist/types/components/form/input/rating-input.d.ts +7 -8
- package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/switch.d.ts +2 -2
- package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -2
- package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/collapse.d.ts +2 -2
- package/dist/types/components/layout/flex.d.ts +26 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
- package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
- package/dist/types/components/misc/index.d.ts +1 -0
- package/dist/types/components/misc/loading-overlay.d.ts +29 -0
- package/dist/types/components/misc/notice.d.ts +4 -4
- package/dist/types/components/misc/notification-provider.d.ts +9 -3
- package/dist/types/components/misc/notification.d.ts +9 -9
- package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
- package/dist/types/components/navigation/menu.d.ts +6 -6
- package/dist/types/components/navigation/pagination.d.ts +17 -4
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
- package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
- package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
- package/dist/types/components/overlay/dialogs.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +9 -2
- package/dist/types/components/overlay/tooltip.d.ts +6 -6
- package/dist/types/components/theme/types.d.ts +15 -4
- package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
- package/dist/types/tokens/z-index.d.ts +18 -18
- package/dist/types/utils/use-animated-toggle.d.ts +12 -4
- package/dist/{ur-ZJgsSpG2.cjs → ur-CtFl_tz6.cjs} +1 -1
- package/dist/{ur-BcuB7IqE.js → ur-yYgj3NmT.js} +87 -11
- package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
- package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
- package/dist/use-form-CaW192gw.cjs +2 -0
- package/dist/{use-form-CfxvyTfd.js → use-form-Dn6v2tEh.js} +153 -152
- package/dist/utils-DmEuG3Np.cjs +1 -0
- package/dist/utils-vUtP6iPG.js +165 -0
- package/dist/{vi-D0rQ3dIx.js → vi-D5u4CLQO.js} +88 -12
- package/dist/{vi-BOgLRkuK.cjs → vi-DyCZSpsk.cjs} +1 -1
- package/dist/widget-customization-B49MeU4E.cjs +1 -0
- package/dist/widget-customization-DEiQ_31d.js +1063 -0
- package/dist/{zh-DoYqiZO1.js → zh-B0kwMMer.js} +90 -14
- package/dist/{zh-BTZ8OZ4H.cjs → zh-C3ZxMQKb.cjs} +1 -1
- package/package.json +208 -37
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/auth-divider-BgaQ8ifw.cjs +0 -1
- package/dist/colors-BI0YhONJ.cjs +0 -1
- package/dist/deep-merge-ChJQbUKq.cjs +0 -1
- package/dist/es-C8TpneCm.cjs +0 -1
- package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
- package/dist/hls.light.min-hEMf_E8u.js +0 -8311
- package/dist/index-1JaBwDB-.js +0 -921
- package/dist/index-CN10Cyqr.cjs +0 -1
- package/dist/index-CTcbhnPw.cjs +0 -4
- package/dist/index-DF7RFzD9.cjs +0 -1
- package/dist/index-D_zOXmU5.cjs +0 -36
- package/dist/index-DfPkCwdC.js +0 -2709
- package/dist/index-vowHNIPH.js +0 -14308
- package/dist/index-yOU4Ceaq.js +0 -68
- package/dist/index-zQ3IYJFH.cjs +0 -1
- package/dist/input-container-BWYHj0Iq.cjs +0 -1
- package/dist/input-container-DMoVdH6E.js +0 -263
- package/dist/menu-De_-sGeb.cjs +0 -1
- package/dist/modal-CiGmgsOI.cjs +0 -1
- package/dist/notice-CPZQuxcA.cjs +0 -1
- package/dist/oneof-branch-detection-BFxukD63.cjs +0 -8
- package/dist/oneof-branch-detection-izpPjBCR.js +0 -6290
- package/dist/stack-4VUGISn6.cjs +0 -1
- package/dist/stack-Bm-UZosx.js +0 -879
- package/dist/string-B9vVyfq3.cjs +0 -1
- package/dist/string-DYyMxBl-.js +0 -19
- package/dist/text-input-BLupB3cU.js +0 -45
- package/dist/text-input-M6WBhhVj.cjs +0 -1
- package/dist/timer-BJHOsuS6.cjs +0 -1
- package/dist/timer-Rd2sKnvH.js +0 -65
- package/dist/toolbar-Be1eU0qU.js +0 -118
- package/dist/toolbar-WWv5kcYG.cjs +0 -1
- package/dist/translations-OOsMRpX9.cjs +0 -1
- package/dist/types/components/data/calendar-shared.d.ts +0 -59
- package/dist/types/components/data/calendar.d.ts +0 -107
- package/dist/types/components/data/icon-badge.d.ts +0 -14
- package/dist/types/components/data/range-calendar.d.ts +0 -104
- package/dist/types/components/data/tag.d.ts +0 -51
- package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
- package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
- package/dist/use-form-ClA0ZRco.cjs +0 -2
- package/dist/utils-DEbsp9Q9.js +0 -129
- package/dist/utils-DIUEhA-Z.cjs +0 -1
- package/dist/widget-customization-CLZNGavL.js +0 -1042
- package/dist/widget-customization-DtEEo35Y.cjs +0 -1
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
import { Validation as z, upperCaseFirst as B, humanize as W } from "@tempots/std";
|
|
2
|
+
import { attr as c, prop as _, html as h, computedOf as g, aria as F, on as w } from "@tempots/dom";
|
|
3
|
+
import { g as H, C as J } from "./utils-vUtP6iPG.js";
|
|
4
|
+
import { S as y, L as K } from "./stack-BLMteGTn.js";
|
|
5
|
+
import { d as V, I as x } from "./translations-B1_yyDUK.js";
|
|
6
|
+
import U from "ajv";
|
|
7
|
+
import G from "ajv/dist/2019";
|
|
8
|
+
import X from "ajv/dist/2020";
|
|
9
|
+
import Q from "ajv-formats";
|
|
10
|
+
function M(t) {
|
|
11
|
+
return t.split("/").slice(1).map((e) => e.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
12
|
+
}
|
|
13
|
+
function Y(t) {
|
|
14
|
+
const e = M(t.instancePath || "");
|
|
15
|
+
if (t.keyword === "required") {
|
|
16
|
+
const n = t.params.missingProperty;
|
|
17
|
+
if (n != null) return [...e, n];
|
|
18
|
+
}
|
|
19
|
+
if (t.keyword === "additionalProperties") {
|
|
20
|
+
const n = t.params.additionalProperty;
|
|
21
|
+
if (n != null) return [...e, n];
|
|
22
|
+
}
|
|
23
|
+
if (t.keyword === "unevaluatedProperties") {
|
|
24
|
+
const n = t.params.unevaluatedProperty;
|
|
25
|
+
if (n != null) return [...e, n];
|
|
26
|
+
}
|
|
27
|
+
return e.length > 0 ? e : void 0;
|
|
28
|
+
}
|
|
29
|
+
function Z(t) {
|
|
30
|
+
return t.message ?? `${t.keyword} validation failed`;
|
|
31
|
+
}
|
|
32
|
+
function N(t) {
|
|
33
|
+
return t.reduce((e, n) => {
|
|
34
|
+
const r = Y(n);
|
|
35
|
+
if (r == null) return e;
|
|
36
|
+
let i = e;
|
|
37
|
+
for (const o of r) {
|
|
38
|
+
const s = o;
|
|
39
|
+
i.dependencies == null && (i.dependencies = {}), i.dependencies[s] == null && (i.dependencies[s] = {}), i = i.dependencies[s];
|
|
40
|
+
}
|
|
41
|
+
return i.message = Z(n), e;
|
|
42
|
+
}, {});
|
|
43
|
+
}
|
|
44
|
+
function Ve(t) {
|
|
45
|
+
const e = N(t);
|
|
46
|
+
return z.invalid(e);
|
|
47
|
+
}
|
|
48
|
+
function ee(t) {
|
|
49
|
+
const e = {
|
|
50
|
+
keyword: "x:ui",
|
|
51
|
+
// Accept both string and object shapes for future-proofing
|
|
52
|
+
schemaType: ["string", "object"],
|
|
53
|
+
errors: !1,
|
|
54
|
+
// No-op validation – vendor annotation only
|
|
55
|
+
validate: () => !0
|
|
56
|
+
};
|
|
57
|
+
t.addKeyword(e);
|
|
58
|
+
}
|
|
59
|
+
let A = /* @__PURE__ */ new WeakMap();
|
|
60
|
+
function xe() {
|
|
61
|
+
A = /* @__PURE__ */ new WeakMap();
|
|
62
|
+
}
|
|
63
|
+
function Me(t) {
|
|
64
|
+
A.delete(t);
|
|
65
|
+
}
|
|
66
|
+
function Ee() {
|
|
67
|
+
return {
|
|
68
|
+
ajvInstances: 0
|
|
69
|
+
// WeakMap doesn't expose size for privacy/security
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function te(t, e) {
|
|
73
|
+
let n = A.get(t);
|
|
74
|
+
n == null && (n = /* @__PURE__ */ new WeakMap(), A.set(t, n));
|
|
75
|
+
const r = n.get(e);
|
|
76
|
+
if (r) return r;
|
|
77
|
+
const i = t.compile(e);
|
|
78
|
+
return n.set(e, i), i;
|
|
79
|
+
}
|
|
80
|
+
async function k(t, e, n) {
|
|
81
|
+
const i = {
|
|
82
|
+
"2020-12": X,
|
|
83
|
+
"2019-09": G,
|
|
84
|
+
"draft-07": U
|
|
85
|
+
}[t], o = new i({
|
|
86
|
+
meta: n,
|
|
87
|
+
strictSchema: !1,
|
|
88
|
+
// Allow more flexible schema validation for tuple arrays
|
|
89
|
+
allErrors: !0,
|
|
90
|
+
removeAdditional: e
|
|
91
|
+
});
|
|
92
|
+
switch (t) {
|
|
93
|
+
case "2020-12":
|
|
94
|
+
o.opts.defaultMeta = "https://json-schema.org/draft/2020-12/schema";
|
|
95
|
+
break;
|
|
96
|
+
case "2019-09":
|
|
97
|
+
o.opts.defaultMeta = "https://json-schema.org/draft/2019-09/schema";
|
|
98
|
+
break;
|
|
99
|
+
case "draft-07":
|
|
100
|
+
o.opts.defaultMeta = "http://json-schema.org/draft-07/schema#";
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
return Q(o), ee(o), o;
|
|
104
|
+
}
|
|
105
|
+
function ne(t) {
|
|
106
|
+
return t == null || t.includes("draft/2020-12") ? "2020-12" : t.includes("draft/2019-09") ? "2019-09" : "draft-07";
|
|
107
|
+
}
|
|
108
|
+
function re(t) {
|
|
109
|
+
const e = t.indexOf("#");
|
|
110
|
+
return e >= 0 ? t.slice(0, e) : t;
|
|
111
|
+
}
|
|
112
|
+
function $(t, e = !0) {
|
|
113
|
+
if (Array.isArray(t))
|
|
114
|
+
return t.map((n) => $(n, !1));
|
|
115
|
+
if (t != null && typeof t == "object") {
|
|
116
|
+
const n = t, r = {};
|
|
117
|
+
for (const [i, o] of Object.entries(n))
|
|
118
|
+
!e && (i === "$id" || i === "$schema" || i === "$dynamicAnchor") || (r[i] = $(o, !1));
|
|
119
|
+
return r;
|
|
120
|
+
}
|
|
121
|
+
return t;
|
|
122
|
+
}
|
|
123
|
+
function R(t) {
|
|
124
|
+
const e = /* @__PURE__ */ new Set(), n = (r) => {
|
|
125
|
+
if (r != null) {
|
|
126
|
+
if (Array.isArray(r)) {
|
|
127
|
+
for (const i of r) n(i);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (typeof r == "object") {
|
|
131
|
+
const i = r, o = i.$ref;
|
|
132
|
+
typeof o == "string" && o.length > 0 && o[0] !== "#" && e.add(re(o));
|
|
133
|
+
for (const s of Object.values(i)) n(s);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
return n(t), [...e];
|
|
138
|
+
}
|
|
139
|
+
function E(t, e) {
|
|
140
|
+
for (const n of e) {
|
|
141
|
+
const r = n.$id;
|
|
142
|
+
if (typeof r == "string" && r.length > 0 && !t.getSchema(r))
|
|
143
|
+
try {
|
|
144
|
+
t.addSchema(n);
|
|
145
|
+
} catch {
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async function ie(t, e, n, r) {
|
|
150
|
+
if (n == null) return null;
|
|
151
|
+
const i = /* @__PURE__ */ new Set();
|
|
152
|
+
if (r && r.length > 0)
|
|
153
|
+
for (const a of r) {
|
|
154
|
+
const l = a.$id;
|
|
155
|
+
typeof l == "string" && l.length > 0 && i.add(l);
|
|
156
|
+
}
|
|
157
|
+
const o = [], s = 5;
|
|
158
|
+
for (let a = 0; a < s; a++) {
|
|
159
|
+
const l = R(e), u = o.flatMap(
|
|
160
|
+
(p) => R(p)
|
|
161
|
+
), f = /* @__PURE__ */ new Set([...l, ...u]), d = [];
|
|
162
|
+
for (const p of f)
|
|
163
|
+
if (!i.has(p)) {
|
|
164
|
+
if (t.getSchema(p)) {
|
|
165
|
+
i.add(p);
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
d.push(p);
|
|
169
|
+
}
|
|
170
|
+
if (d.length === 0) return null;
|
|
171
|
+
try {
|
|
172
|
+
const p = await n(d);
|
|
173
|
+
if (!Array.isArray(p) || p.length === 0)
|
|
174
|
+
return null;
|
|
175
|
+
E(t, p);
|
|
176
|
+
for (const m of p) {
|
|
177
|
+
const b = m.$id;
|
|
178
|
+
typeof b == "string" && b.length > 0 && (i.add(b), o.push(m));
|
|
179
|
+
}
|
|
180
|
+
} catch (p) {
|
|
181
|
+
return `refResolver failed: ${p instanceof Error ? p.message : String(p)}`;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return "refResolver reached iteration limit while resolving external $refs";
|
|
185
|
+
}
|
|
186
|
+
async function Te(t, e) {
|
|
187
|
+
try {
|
|
188
|
+
const n = ne(t.$schema), r = e?.sanitizeAdditional === !1 ? !1 : e?.sanitizeAdditional ?? !1, i = (f) => typeof f == "string" && f.endsWith("#") ? f.slice(0, -1) : f ?? "", o = t.$id, s = i(o);
|
|
189
|
+
if (s !== "" && (/* @__PURE__ */ new Set([
|
|
190
|
+
"https://json-schema.org/draft/2020-12/schema",
|
|
191
|
+
"https://json-schema.org/draft/2019-09/schema",
|
|
192
|
+
"http://json-schema.org/draft-07/schema"
|
|
193
|
+
])).has(s)) {
|
|
194
|
+
const f = await k(n, r, !1), d = $(
|
|
195
|
+
t
|
|
196
|
+
);
|
|
197
|
+
try {
|
|
198
|
+
f.addMetaSchema(d);
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
const p = f.getSchema(o ?? s) ?? f.compile(d);
|
|
202
|
+
return { ok: !0, value: { ajv: f, validate: p } };
|
|
203
|
+
}
|
|
204
|
+
const l = await k(n, r, !0);
|
|
205
|
+
if (e?.externalSchemas && e.externalSchemas.length > 0 && E(l, e.externalSchemas), e?.refResolver) {
|
|
206
|
+
const f = await ie(
|
|
207
|
+
l,
|
|
208
|
+
t,
|
|
209
|
+
e.refResolver,
|
|
210
|
+
e.externalSchemas
|
|
211
|
+
);
|
|
212
|
+
if (f != null)
|
|
213
|
+
return { ok: !1, error: f };
|
|
214
|
+
}
|
|
215
|
+
const u = l.compile(t);
|
|
216
|
+
return { ok: !0, value: { ajv: l, validate: u } };
|
|
217
|
+
} catch (n) {
|
|
218
|
+
return { ok: !1, error: n instanceof Error ? n.message : String(n) };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function se(t, e) {
|
|
222
|
+
if (typeof t == "boolean" || typeof e == "boolean")
|
|
223
|
+
return e;
|
|
224
|
+
const n = { ...t };
|
|
225
|
+
for (const [r, i] of Object.entries(e))
|
|
226
|
+
r === "required" && Array.isArray(t.required) && Array.isArray(i) ? n.required = [.../* @__PURE__ */ new Set([...t.required, ...i])] : r === "properties" && t.properties && typeof i == "object" && i != null ? n.properties = { ...t.properties, ...i } : n[r] = i;
|
|
227
|
+
return n;
|
|
228
|
+
}
|
|
229
|
+
function oe(t, e) {
|
|
230
|
+
if (typeof t == "boolean" || typeof e == "boolean")
|
|
231
|
+
return t === e;
|
|
232
|
+
const n = t.type, r = e.type;
|
|
233
|
+
return !(n != null && r != null && n !== r || n === "string" && r === "string" && (t.minLength != null && e.maxLength != null && t.minLength > e.maxLength || t.maxLength != null && e.minLength != null && t.maxLength < e.minLength) || (n === "number" || n === "integer") && (r === "number" || r === "integer") && (t.minimum != null && e.maximum != null && t.minimum > e.maximum || t.maximum != null && e.minimum != null && t.maximum < e.minimum));
|
|
234
|
+
}
|
|
235
|
+
function ae(t, e, n, r) {
|
|
236
|
+
if (typeof e == "boolean" || typeof n == "boolean")
|
|
237
|
+
return {
|
|
238
|
+
path: r,
|
|
239
|
+
message: `Property "${t}" has conflicting boolean schema definitions in allOf branches`,
|
|
240
|
+
conflictingValues: [e, n]
|
|
241
|
+
};
|
|
242
|
+
const i = e.type, o = n.type;
|
|
243
|
+
if (i != null && o != null && i !== o) {
|
|
244
|
+
const s = Array.isArray(i) ? i : [i], a = Array.isArray(o) ? o : [o];
|
|
245
|
+
return {
|
|
246
|
+
path: r,
|
|
247
|
+
message: `Property "${t}" has conflicting types: ${s.join("|")} vs ${a.join("|")}`,
|
|
248
|
+
conflictingValues: [e, n]
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
if (i === o && i === "string") {
|
|
252
|
+
const s = [];
|
|
253
|
+
if (e.minLength != null && n.maxLength != null && e.minLength > n.maxLength && s.push(
|
|
254
|
+
`minLength ${e.minLength} > maxLength ${n.maxLength}`
|
|
255
|
+
), e.maxLength != null && n.minLength != null && e.maxLength < n.minLength && s.push(
|
|
256
|
+
`maxLength ${e.maxLength} < minLength ${n.minLength}`
|
|
257
|
+
), s.length > 0)
|
|
258
|
+
return {
|
|
259
|
+
path: r,
|
|
260
|
+
message: `Property "${t}" has conflicting string constraints: ${s.join(", ")}`,
|
|
261
|
+
conflictingValues: [e, n]
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
if (i === o && (i === "number" || i === "integer")) {
|
|
265
|
+
const s = [];
|
|
266
|
+
if (e.minimum != null && n.maximum != null && e.minimum > n.maximum && s.push(
|
|
267
|
+
`minimum ${e.minimum} > maximum ${n.maximum}`
|
|
268
|
+
), e.maximum != null && n.minimum != null && e.maximum < n.minimum && s.push(
|
|
269
|
+
`maximum ${e.maximum} < minimum ${n.minimum}`
|
|
270
|
+
), s.length > 0)
|
|
271
|
+
return {
|
|
272
|
+
path: r,
|
|
273
|
+
message: `Property "${t}" has conflicting numeric constraints: ${s.join(", ")}`,
|
|
274
|
+
conflictingValues: [e, n]
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
return oe(e, n) ? null : {
|
|
278
|
+
path: r,
|
|
279
|
+
message: `Property "${t}" has conflicting definitions in allOf branches`,
|
|
280
|
+
conflictingValues: [e, n]
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function le(t) {
|
|
284
|
+
const e = Array.isArray(t) ? t : [t], n = new Set(
|
|
285
|
+
e.map((r) => r)
|
|
286
|
+
);
|
|
287
|
+
return n.has("number") && n.add("integer"), n;
|
|
288
|
+
}
|
|
289
|
+
function ce(t, e, n, r) {
|
|
290
|
+
for (const [i, o] of Object.entries(e)) {
|
|
291
|
+
if (t[i] != null && t[i] !== o) {
|
|
292
|
+
const s = t[i], a = ae(i, s, o, [
|
|
293
|
+
...n,
|
|
294
|
+
"properties",
|
|
295
|
+
i
|
|
296
|
+
]);
|
|
297
|
+
a != null && r.push(a);
|
|
298
|
+
}
|
|
299
|
+
t[i] != null ? t[i] = se(t[i], o) : t[i] = o;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function fe(t, e, n, r) {
|
|
303
|
+
e != null && t.additionalProperties != null && t.additionalProperties !== e && r.push({
|
|
304
|
+
path: [...n, "additionalProperties"],
|
|
305
|
+
message: `Conflicting additionalProperties values in allOf: ${t.additionalProperties} vs ${e}`,
|
|
306
|
+
conflictingValues: [t.additionalProperties, e]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function ue(t, e, n, r, i) {
|
|
310
|
+
e != null && t.maxProperties != null && e > t.maxProperties && i.push({
|
|
311
|
+
path: [...r, "minProperties"],
|
|
312
|
+
message: `minProperties ${e} conflicts with existing maxProperties ${t.maxProperties}`,
|
|
313
|
+
conflictingValues: [e, t.maxProperties]
|
|
314
|
+
}), n != null && t.minProperties != null && n < t.minProperties && i.push({
|
|
315
|
+
path: [...r, "maxProperties"],
|
|
316
|
+
message: `maxProperties ${n} conflicts with existing minProperties ${t.minProperties}`,
|
|
317
|
+
conflictingValues: [n, t.minProperties]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function de(t, e, n) {
|
|
321
|
+
if (t.length === 0)
|
|
322
|
+
return;
|
|
323
|
+
let r = null;
|
|
324
|
+
for (const o of t)
|
|
325
|
+
if (r == null)
|
|
326
|
+
r = new Set(o);
|
|
327
|
+
else {
|
|
328
|
+
const s = /* @__PURE__ */ new Set();
|
|
329
|
+
for (const a of r)
|
|
330
|
+
o.has(a) && s.add(a);
|
|
331
|
+
r = s;
|
|
332
|
+
}
|
|
333
|
+
const i = Array.from(r ?? []);
|
|
334
|
+
if (i.length === 0) {
|
|
335
|
+
const o = t.map((s) => Array.from(s));
|
|
336
|
+
n.push({
|
|
337
|
+
path: [...e, "type"],
|
|
338
|
+
message: "Incompatible types in allOf (no common types)",
|
|
339
|
+
conflictingValues: o
|
|
340
|
+
});
|
|
341
|
+
return;
|
|
342
|
+
} else return i.length === 1 ? i[0] : i;
|
|
343
|
+
}
|
|
344
|
+
function qe(t, e = []) {
|
|
345
|
+
const n = [], r = {}, i = [], o = [], s = {};
|
|
346
|
+
for (const l of t) {
|
|
347
|
+
l.type != null && i.push(le(l.type)), Array.isArray(l.required) && o.push(...l.required), l.properties != null && ce(
|
|
348
|
+
s,
|
|
349
|
+
l.properties,
|
|
350
|
+
e,
|
|
351
|
+
n
|
|
352
|
+
);
|
|
353
|
+
const {
|
|
354
|
+
type: u,
|
|
355
|
+
required: f,
|
|
356
|
+
properties: d,
|
|
357
|
+
allOf: p,
|
|
358
|
+
additionalProperties: m,
|
|
359
|
+
patternProperties: b,
|
|
360
|
+
minProperties: v,
|
|
361
|
+
maxProperties: j,
|
|
362
|
+
...D
|
|
363
|
+
} = l;
|
|
364
|
+
fe(
|
|
365
|
+
r,
|
|
366
|
+
m,
|
|
367
|
+
e,
|
|
368
|
+
n
|
|
369
|
+
), ue(
|
|
370
|
+
r,
|
|
371
|
+
v,
|
|
372
|
+
j,
|
|
373
|
+
e,
|
|
374
|
+
n
|
|
375
|
+
), Object.assign(r, D), m != null && (r.additionalProperties = m), b != null && (r.patternProperties = b), v != null && (r.minProperties = v), j != null && (r.maxProperties = j);
|
|
376
|
+
}
|
|
377
|
+
const a = de(i, e, n);
|
|
378
|
+
return a != null && (r.type = a), o.length > 0 && (r.required = [...new Set(o)]), Object.keys(s).length > 0 && (r.properties = s), {
|
|
379
|
+
mergedSchema: r,
|
|
380
|
+
conflicts: n
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
class T {
|
|
384
|
+
schema;
|
|
385
|
+
definition;
|
|
386
|
+
horizontal;
|
|
387
|
+
path;
|
|
388
|
+
ajv;
|
|
389
|
+
isPropertyRequired;
|
|
390
|
+
suppressLabel;
|
|
391
|
+
schemaConflicts;
|
|
392
|
+
notViolations;
|
|
393
|
+
widgetRegistry;
|
|
394
|
+
/**
|
|
395
|
+
* Function to set the form's validation status.
|
|
396
|
+
* Available for custom widgets that need to perform their own validation.
|
|
397
|
+
*/
|
|
398
|
+
setStatus;
|
|
399
|
+
/**
|
|
400
|
+
* Signal containing the entire form's current value.
|
|
401
|
+
* Useful for cross-field validation or conditional rendering.
|
|
402
|
+
*/
|
|
403
|
+
formValue;
|
|
404
|
+
/**
|
|
405
|
+
* Current validation mode ('eager', 'onTouched', 'onSubmit').
|
|
406
|
+
* Custom widgets may want to behave differently based on this.
|
|
407
|
+
*/
|
|
408
|
+
validationMode;
|
|
409
|
+
/**
|
|
410
|
+
* Signal indicating whether the form is currently submitting.
|
|
411
|
+
* Widgets should typically disable during submission.
|
|
412
|
+
*/
|
|
413
|
+
submitting;
|
|
414
|
+
constructor(e) {
|
|
415
|
+
const {
|
|
416
|
+
schema: n,
|
|
417
|
+
definition: r,
|
|
418
|
+
horizontal: i,
|
|
419
|
+
path: o,
|
|
420
|
+
ajv: s,
|
|
421
|
+
isPropertyRequired: a,
|
|
422
|
+
suppressLabel: l,
|
|
423
|
+
schemaConflicts: u,
|
|
424
|
+
notViolations: f,
|
|
425
|
+
widgetRegistry: d,
|
|
426
|
+
setStatus: p,
|
|
427
|
+
formValue: m,
|
|
428
|
+
validationMode: b,
|
|
429
|
+
submitting: v
|
|
430
|
+
} = e;
|
|
431
|
+
this.schema = n, this.definition = r, this.horizontal = i, this.path = o, this.ajv = s, this.isPropertyRequired = a ?? !1, this.suppressLabel = l ?? !1, this.schemaConflicts = u ?? [], this.notViolations = f ?? [], this.widgetRegistry = d, this.setStatus = p, this.formValue = m, this.validationMode = b, this.submitting = v;
|
|
432
|
+
}
|
|
433
|
+
with = (e) => new T({
|
|
434
|
+
schema: e.schema ?? this.schema,
|
|
435
|
+
definition: e.definition ?? this.definition,
|
|
436
|
+
horizontal: e.horizontal ?? this.horizontal,
|
|
437
|
+
path: e.path ?? this.path,
|
|
438
|
+
ajv: e.ajv ?? this.ajv,
|
|
439
|
+
isPropertyRequired: e.isPropertyRequired ?? this.isPropertyRequired,
|
|
440
|
+
suppressLabel: e.suppressLabel ?? this.suppressLabel,
|
|
441
|
+
schemaConflicts: e.schemaConflicts ?? this.schemaConflicts,
|
|
442
|
+
notViolations: e.notViolations ?? this.notViolations,
|
|
443
|
+
widgetRegistry: e.widgetRegistry ?? this.widgetRegistry,
|
|
444
|
+
setStatus: e.setStatus ?? this.setStatus,
|
|
445
|
+
formValue: e.formValue ?? this.formValue,
|
|
446
|
+
validationMode: e.validationMode ?? this.validationMode,
|
|
447
|
+
submitting: e.submitting ?? this.submitting
|
|
448
|
+
});
|
|
449
|
+
append = (e) => this.with({ path: [...this.path, e] });
|
|
450
|
+
get isRoot() {
|
|
451
|
+
return this.path.length === 0;
|
|
452
|
+
}
|
|
453
|
+
get name() {
|
|
454
|
+
const e = this.path[this.path.length - 1];
|
|
455
|
+
if (typeof e == "string")
|
|
456
|
+
return e;
|
|
457
|
+
}
|
|
458
|
+
get widgetName() {
|
|
459
|
+
return this.path.map(String).join(".");
|
|
460
|
+
}
|
|
461
|
+
get widgetLabel() {
|
|
462
|
+
const e = this.name;
|
|
463
|
+
return (typeof this.definition == "object" && this.definition !== null ? this.definition.title : void 0) ?? (e != null ? B(W(e)) : void 0);
|
|
464
|
+
}
|
|
465
|
+
hasRequiredProperty = (e) => typeof this.definition == "boolean" ? !1 : this.definition.required != null && this.definition.required.includes(e);
|
|
466
|
+
get nullable() {
|
|
467
|
+
return this.definition.nullable ?? !1;
|
|
468
|
+
}
|
|
469
|
+
get isNullable() {
|
|
470
|
+
return this.nullable || this.hasType("null") || this.hasEnumValue(null) || this.hasConstValue(null) || (this.anyOf?.some((e) => e.isNullable) ?? !1) || (this.oneOf?.some((e) => e.isNullable) ?? !1);
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Determines if this property is optional (can be absent from parent object).
|
|
474
|
+
* This is different from nullable - optional means the key can be missing,
|
|
475
|
+
* while nullable means the value can be explicitly null.
|
|
476
|
+
*/
|
|
477
|
+
get isOptional() {
|
|
478
|
+
return !this.isPropertyRequired;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Determines if this property should show a presence toggle.
|
|
482
|
+
* Optional properties that are not at the root level should have presence toggles,
|
|
483
|
+
* but primitive values that allow null should use nullable controls instead.
|
|
484
|
+
*/
|
|
485
|
+
get shouldShowPresenceToggle() {
|
|
486
|
+
return !(!this.isOptional || this.isRoot || (this.isNullable || this.isOptional) && this.isPrimitive);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Determines if this schema represents a primitive type (string, number, boolean, null).
|
|
490
|
+
*/
|
|
491
|
+
get isPrimitive() {
|
|
492
|
+
if (typeof this.definition == "boolean")
|
|
493
|
+
return !1;
|
|
494
|
+
const e = this.definition;
|
|
495
|
+
if (e.const !== void 0 || e.enum !== void 0)
|
|
496
|
+
return !0;
|
|
497
|
+
if (e.type) {
|
|
498
|
+
const n = Array.isArray(e.type) ? e.type : [e.type], r = ["string", "number", "integer", "boolean"];
|
|
499
|
+
return n.every((i) => r.includes(i));
|
|
500
|
+
}
|
|
501
|
+
return !1;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Determines if this property is marked as readOnly.
|
|
505
|
+
*/
|
|
506
|
+
get isReadOnly() {
|
|
507
|
+
return typeof this.definition == "boolean" ? !1 : !!this.definition.readOnly;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Determines if this property is marked as writeOnly.
|
|
511
|
+
*/
|
|
512
|
+
get isWriteOnly() {
|
|
513
|
+
return typeof this.definition == "boolean" ? !1 : !!this.definition.writeOnly;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Determines if this property is marked as deprecated.
|
|
517
|
+
*/
|
|
518
|
+
get isDeprecated() {
|
|
519
|
+
return typeof this.definition == "boolean" ? !1 : !!this.definition.deprecated;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Checks if readOnly should be ignored based on x:ui.ignoreReadOnly.
|
|
523
|
+
*/
|
|
524
|
+
get shouldIgnoreReadOnly() {
|
|
525
|
+
if (typeof this.definition == "boolean") return !1;
|
|
526
|
+
const e = this.definition["x:ui"];
|
|
527
|
+
return e && typeof e == "object" ? !!e.ignoreReadOnly : !1;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Checks if writeOnly should be shown based on x:ui.showWriteOnly.
|
|
531
|
+
*/
|
|
532
|
+
get shouldShowWriteOnly() {
|
|
533
|
+
if (typeof this.definition == "boolean") return !1;
|
|
534
|
+
const e = this.definition["x:ui"];
|
|
535
|
+
return e && typeof e == "object" ? !!e.showWriteOnly : !1;
|
|
536
|
+
}
|
|
537
|
+
get anyOf() {
|
|
538
|
+
if (typeof this.definition != "boolean")
|
|
539
|
+
return Array.isArray(this.definition.anyOf) ? this.definition.anyOf.map((e) => this.with({ definition: e })) : void 0;
|
|
540
|
+
}
|
|
541
|
+
get oneOf() {
|
|
542
|
+
if (typeof this.definition != "boolean")
|
|
543
|
+
return Array.isArray(this.definition.oneOf) ? this.definition.oneOf.map((e) => this.with({ definition: e })) : void 0;
|
|
544
|
+
}
|
|
545
|
+
get allOf() {
|
|
546
|
+
if (typeof this.definition != "boolean")
|
|
547
|
+
return Array.isArray(this.definition.allOf) ? this.definition.allOf.map((e) => this.with({ definition: e })) : void 0;
|
|
548
|
+
}
|
|
549
|
+
hasType = (e) => this.definition === !0 ? !0 : this.definition === !1 ? !1 : Array.isArray(this.definition.type) ? this.definition.type.includes(e) : this.definition.type === e;
|
|
550
|
+
hasEnumValue = (e) => typeof this.definition == "boolean" ? !1 : Array.isArray(this.definition.enum) ? this.definition.enum.includes(e) : !1;
|
|
551
|
+
hasConstValue = (e) => typeof this.definition == "boolean" ? !1 : this.definition.const === e;
|
|
552
|
+
get description() {
|
|
553
|
+
if (typeof this.definition != "boolean")
|
|
554
|
+
return this.definition.description;
|
|
555
|
+
}
|
|
556
|
+
get examples() {
|
|
557
|
+
if (typeof this.definition != "boolean")
|
|
558
|
+
return this.definition.examples;
|
|
559
|
+
}
|
|
560
|
+
get default() {
|
|
561
|
+
if (typeof this.definition != "boolean")
|
|
562
|
+
return this.definition.default;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
let S = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
|
|
566
|
+
function he(t, e) {
|
|
567
|
+
const n = typeof e == "object" && e != null ? e : null;
|
|
568
|
+
if (n != null) {
|
|
569
|
+
const s = S.get(n)?.get(t);
|
|
570
|
+
if (s != null) return s;
|
|
571
|
+
}
|
|
572
|
+
let r = t;
|
|
573
|
+
const i = /* @__PURE__ */ new Set();
|
|
574
|
+
for (; q(r); ) {
|
|
575
|
+
const o = r.$ref;
|
|
576
|
+
if (!o.startsWith("#")) {
|
|
577
|
+
console.warn(`resolveRef: external $ref not supported here: ${o}`);
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
if (i.has(o)) {
|
|
581
|
+
console.warn(
|
|
582
|
+
`resolveRef: cycle detected while resolving in-document $ref chain: ${[...i, o].join(" -> ")}`
|
|
583
|
+
);
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
i.add(o);
|
|
587
|
+
const s = I(e, o);
|
|
588
|
+
if (!O(s)) {
|
|
589
|
+
console.warn(`resolveRef: could not resolve JSON Pointer ${o}`);
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
const { $ref: a, ...l } = r;
|
|
593
|
+
r = { ...s, ...l };
|
|
594
|
+
}
|
|
595
|
+
if (n != null) {
|
|
596
|
+
let o = S.get(n);
|
|
597
|
+
o == null && (o = /* @__PURE__ */ new WeakMap(), S.set(n, o)), o.set(t, r);
|
|
598
|
+
}
|
|
599
|
+
return r;
|
|
600
|
+
}
|
|
601
|
+
function q(t) {
|
|
602
|
+
return O(t) && typeof t.$ref == "string";
|
|
603
|
+
}
|
|
604
|
+
function O(t) {
|
|
605
|
+
return typeof t == "object" && t != null && !Array.isArray(t);
|
|
606
|
+
}
|
|
607
|
+
function I(t, e) {
|
|
608
|
+
if (!e.startsWith("#")) return;
|
|
609
|
+
if (e === "#") return t;
|
|
610
|
+
if (typeof t != "object" || t == null) return;
|
|
611
|
+
const n = t;
|
|
612
|
+
let r = P.get(n);
|
|
613
|
+
r == null && (r = /* @__PURE__ */ new Map(), P.set(n, r));
|
|
614
|
+
const i = r.get(e);
|
|
615
|
+
if (i !== void 0) return i;
|
|
616
|
+
const o = M(e);
|
|
617
|
+
let s = t;
|
|
618
|
+
for (const a of o) {
|
|
619
|
+
if (!O(s) && !Array.isArray(s)) {
|
|
620
|
+
r.set(e, void 0);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
s = s[a];
|
|
624
|
+
}
|
|
625
|
+
return r.set(e, s), s;
|
|
626
|
+
}
|
|
627
|
+
function Ie(t, e, n) {
|
|
628
|
+
let r = t;
|
|
629
|
+
const i = /* @__PURE__ */ new Set(), o = (s, a) => {
|
|
630
|
+
const { $ref: l, ...u } = a;
|
|
631
|
+
return { ...s, ...u };
|
|
632
|
+
};
|
|
633
|
+
for (; q(r); ) {
|
|
634
|
+
const s = r.$ref;
|
|
635
|
+
if (i.has(s)) {
|
|
636
|
+
console.warn(
|
|
637
|
+
`resolveAnyRef: cycle detected while resolving $ref chain: ${[...i, s].join(" -> ")}`
|
|
638
|
+
);
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
if (i.add(s), s.startsWith("#")) {
|
|
642
|
+
const d = I(e, s);
|
|
643
|
+
if (!O(d)) {
|
|
644
|
+
console.warn(`resolveAnyRef: could not resolve JSON Pointer ${s}`);
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
r = o(d, r);
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
if (!n) {
|
|
651
|
+
console.warn(
|
|
652
|
+
`resolveAnyRef: external $ref without AJV not resolved: ${s}`
|
|
653
|
+
);
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
const a = s.indexOf("#"), l = a >= 0 ? s.slice(0, a) : s;
|
|
657
|
+
let u = n.getSchema(s) || n.getSchema(l);
|
|
658
|
+
if (!u)
|
|
659
|
+
try {
|
|
660
|
+
u = n.compile({ $ref: s });
|
|
661
|
+
} catch {
|
|
662
|
+
}
|
|
663
|
+
const f = u?.schema;
|
|
664
|
+
if (!f || typeof f != "object") {
|
|
665
|
+
console.warn(`resolveAnyRef: AJV could not provide schema for ${s}`);
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
r = o(f, r);
|
|
669
|
+
}
|
|
670
|
+
return r;
|
|
671
|
+
}
|
|
672
|
+
function De(t) {
|
|
673
|
+
if (typeof t.definition == "boolean") return;
|
|
674
|
+
const e = H(t.definition);
|
|
675
|
+
if (typeof e != "object") return;
|
|
676
|
+
const n = {};
|
|
677
|
+
return typeof e.format == "string" && ["fieldset", "tabs", "accordion", "group", "grid"].includes(e.format) && (n.format = e.format), Array.isArray(e.order) && (n.order = e.order.filter(
|
|
678
|
+
(r) => typeof r == "string"
|
|
679
|
+
)), e.groups && typeof e.groups == "object" && (n.groups = e.groups), (typeof e.cols == "number" || e.cols && typeof e.cols == "object") && (n.cols = e.cols), Object.keys(n).length > 0 ? n : void 0;
|
|
680
|
+
}
|
|
681
|
+
function pe({
|
|
682
|
+
title: t,
|
|
683
|
+
children: e
|
|
684
|
+
}) {
|
|
685
|
+
return h.fieldset(
|
|
686
|
+
c.class("bc-fieldset"),
|
|
687
|
+
t ? h.legend(c.class("bc-fieldset__legend"), t) : null,
|
|
688
|
+
h.div(
|
|
689
|
+
c.class("bc-fieldset__content"),
|
|
690
|
+
y(c.class("bc-stack--gap-1"), ...e)
|
|
691
|
+
)
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
function me({
|
|
695
|
+
title: t,
|
|
696
|
+
children: e
|
|
697
|
+
}) {
|
|
698
|
+
return J(
|
|
699
|
+
{ variant: "outlined", size: "md" },
|
|
700
|
+
y(
|
|
701
|
+
c.class("bc-stack--gap-1"),
|
|
702
|
+
t ? K(t) : null,
|
|
703
|
+
...e
|
|
704
|
+
)
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
function ye({
|
|
708
|
+
cols: t = 1,
|
|
709
|
+
children: e
|
|
710
|
+
}) {
|
|
711
|
+
const n = typeof t == "number" ? `bc-schema-grid bc-schema-grid--cols-${t}` : g(t)((r) => {
|
|
712
|
+
if (typeof r == "number")
|
|
713
|
+
return `bc-schema-grid bc-schema-grid--cols-${r}`;
|
|
714
|
+
if (r && typeof r == "object") {
|
|
715
|
+
const i = ["bc-schema-grid"];
|
|
716
|
+
return r.sm && i.push(`bc-schema-grid--cols-sm-${r.sm}`), r.md && i.push(`bc-schema-grid--cols-md-${r.md}`), r.lg && i.push(`bc-schema-grid--cols-lg-${r.lg}`), r.xl && i.push(`bc-schema-grid--cols-xl-${r.xl}`), r["2xl"] && i.push(`bc-schema-grid--cols-2xl-${r["2xl"]}`), i.join(" ");
|
|
717
|
+
}
|
|
718
|
+
return "bc-schema-grid bc-schema-grid--cols-1";
|
|
719
|
+
});
|
|
720
|
+
return h.div(
|
|
721
|
+
c.class(n),
|
|
722
|
+
c.class("bc-schema-grid--gap-4"),
|
|
723
|
+
...e
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
function be({
|
|
727
|
+
groups: t,
|
|
728
|
+
children: e
|
|
729
|
+
}) {
|
|
730
|
+
if (!t || Object.keys(t).length === 0)
|
|
731
|
+
return ge({ title: V.properties, children: e });
|
|
732
|
+
const n = _(Object.keys(t)[0]), r = Object.entries(t);
|
|
733
|
+
return h.div(
|
|
734
|
+
c.class("bc-tabs"),
|
|
735
|
+
// Tab headers
|
|
736
|
+
h.div(
|
|
737
|
+
c.class("bc-tabs__header"),
|
|
738
|
+
c.role("tablist"),
|
|
739
|
+
...r.map(
|
|
740
|
+
([i], o) => h.button(
|
|
741
|
+
c.type("button"),
|
|
742
|
+
c.class("bc-tabs__tab"),
|
|
743
|
+
c.class(
|
|
744
|
+
g(n)(
|
|
745
|
+
(s) => s === i ? "bc-tabs__tab--active" : ""
|
|
746
|
+
)
|
|
747
|
+
),
|
|
748
|
+
c.role("tab"),
|
|
749
|
+
c.tabindex(
|
|
750
|
+
n.map((s) => s === i ? 0 : -1)
|
|
751
|
+
),
|
|
752
|
+
w.click(() => n.set(i)),
|
|
753
|
+
w.keydown((s) => {
|
|
754
|
+
switch (s.key) {
|
|
755
|
+
case "ArrowLeft":
|
|
756
|
+
s.preventDefault();
|
|
757
|
+
const a = o > 0 ? o - 1 : r.length - 1;
|
|
758
|
+
n.set(r[a][0]);
|
|
759
|
+
break;
|
|
760
|
+
case "ArrowRight":
|
|
761
|
+
s.preventDefault();
|
|
762
|
+
const l = o < r.length - 1 ? o + 1 : 0;
|
|
763
|
+
n.set(r[l][0]);
|
|
764
|
+
break;
|
|
765
|
+
case "Home":
|
|
766
|
+
s.preventDefault(), n.set(r[0][0]);
|
|
767
|
+
break;
|
|
768
|
+
case "End":
|
|
769
|
+
s.preventDefault(), n.set(r[r.length - 1][0]);
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
}),
|
|
773
|
+
i
|
|
774
|
+
)
|
|
775
|
+
)
|
|
776
|
+
),
|
|
777
|
+
// Tab content
|
|
778
|
+
h.div(
|
|
779
|
+
c.class("bc-tabs__content"),
|
|
780
|
+
...r.map(
|
|
781
|
+
([i, o]) => h.div(
|
|
782
|
+
c.class("bc-tabs__panel"),
|
|
783
|
+
c.class(
|
|
784
|
+
g(n)(
|
|
785
|
+
(s) => s === i ? "bc-tabs__panel--active" : "bc-tabs__panel--hidden"
|
|
786
|
+
)
|
|
787
|
+
),
|
|
788
|
+
c.role("tabpanel"),
|
|
789
|
+
y(
|
|
790
|
+
c.class("bc-stack--gap-1"),
|
|
791
|
+
...e.filter((s, a) => o.length === 0 || a < o.length)
|
|
792
|
+
)
|
|
793
|
+
)
|
|
794
|
+
)
|
|
795
|
+
)
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
function ge({
|
|
799
|
+
title: t,
|
|
800
|
+
children: e
|
|
801
|
+
}) {
|
|
802
|
+
return h.div(
|
|
803
|
+
c.class("bc-tabs"),
|
|
804
|
+
h.div(
|
|
805
|
+
c.class("bc-tabs__header"),
|
|
806
|
+
h.div(c.class("bc-tabs__tab bc-tabs__tab--active"), t)
|
|
807
|
+
),
|
|
808
|
+
h.div(
|
|
809
|
+
c.class("bc-tabs__content"),
|
|
810
|
+
h.div(
|
|
811
|
+
c.class("bc-tabs__panel bc-tabs__panel--active"),
|
|
812
|
+
y(c.class("bc-stack--gap-1"), ...e)
|
|
813
|
+
)
|
|
814
|
+
)
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
function ve({
|
|
818
|
+
groups: t,
|
|
819
|
+
children: e
|
|
820
|
+
}) {
|
|
821
|
+
if (!t || Object.keys(t).length === 0)
|
|
822
|
+
return we({
|
|
823
|
+
title: V.properties,
|
|
824
|
+
children: e
|
|
825
|
+
});
|
|
826
|
+
const n = Object.entries(t), r = _(new Set([n[0]?.[0]].filter(Boolean)));
|
|
827
|
+
return h.div(
|
|
828
|
+
c.class("bc-accordion"),
|
|
829
|
+
...n.map(([i, o]) => {
|
|
830
|
+
const s = g(r)(
|
|
831
|
+
(a) => a.has(i)
|
|
832
|
+
);
|
|
833
|
+
return h.div(
|
|
834
|
+
c.class("bc-accordion__item"),
|
|
835
|
+
h.button(
|
|
836
|
+
c.type("button"),
|
|
837
|
+
c.class("bc-accordion__header"),
|
|
838
|
+
F.expanded(s),
|
|
839
|
+
w.click(() => {
|
|
840
|
+
const a = r.value, l = new Set(a);
|
|
841
|
+
l.has(i) ? l.delete(i) : l.add(i), r.set(l);
|
|
842
|
+
}),
|
|
843
|
+
w.keydown((a) => {
|
|
844
|
+
if (a.key === "Enter" || a.key === " ") {
|
|
845
|
+
a.preventDefault();
|
|
846
|
+
const l = r.value, u = new Set(l);
|
|
847
|
+
u.has(i) ? u.delete(i) : u.add(i), r.set(u);
|
|
848
|
+
}
|
|
849
|
+
}),
|
|
850
|
+
h.span(i),
|
|
851
|
+
x({
|
|
852
|
+
icon: g(s)(
|
|
853
|
+
(a) => a ? "chevron-up" : "chevron-down"
|
|
854
|
+
),
|
|
855
|
+
size: "sm"
|
|
856
|
+
})
|
|
857
|
+
),
|
|
858
|
+
h.div(
|
|
859
|
+
c.class("bc-accordion__content"),
|
|
860
|
+
c.class(
|
|
861
|
+
g(s)(
|
|
862
|
+
(a) => a ? "bc-accordion__content--open" : "bc-accordion__content--closed"
|
|
863
|
+
)
|
|
864
|
+
),
|
|
865
|
+
y(
|
|
866
|
+
c.class("bc-stack--gap-1"),
|
|
867
|
+
...e.filter((a, l) => o.length === 0 || l < o.length)
|
|
868
|
+
)
|
|
869
|
+
)
|
|
870
|
+
);
|
|
871
|
+
})
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
function we({
|
|
875
|
+
title: t,
|
|
876
|
+
children: e
|
|
877
|
+
}) {
|
|
878
|
+
const n = _(!0);
|
|
879
|
+
return h.div(
|
|
880
|
+
c.class("bc-accordion"),
|
|
881
|
+
h.div(
|
|
882
|
+
c.class("bc-accordion__item"),
|
|
883
|
+
h.button(
|
|
884
|
+
c.type("button"),
|
|
885
|
+
c.class("bc-accordion__header"),
|
|
886
|
+
w.click(() => n.set(!n.value)),
|
|
887
|
+
h.span(t),
|
|
888
|
+
x({
|
|
889
|
+
icon: g(n)(
|
|
890
|
+
(r) => r ? "chevron-up" : "chevron-down"
|
|
891
|
+
),
|
|
892
|
+
size: "sm"
|
|
893
|
+
})
|
|
894
|
+
),
|
|
895
|
+
h.div(
|
|
896
|
+
c.class("bc-accordion__content"),
|
|
897
|
+
c.class(
|
|
898
|
+
g(n)(
|
|
899
|
+
(r) => r ? "bc-accordion__content--open" : "bc-accordion__content--closed"
|
|
900
|
+
)
|
|
901
|
+
),
|
|
902
|
+
y(c.class("bc-stack--gap-1"), ...e)
|
|
903
|
+
)
|
|
904
|
+
)
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
function C(t, e, n) {
|
|
908
|
+
const r = /* @__PURE__ */ new Map();
|
|
909
|
+
n.forEach((s, a) => {
|
|
910
|
+
t[a] && r.set(s, t[a]);
|
|
911
|
+
});
|
|
912
|
+
let i = t;
|
|
913
|
+
if (e.order && e.order.length > 0) {
|
|
914
|
+
const s = /* @__PURE__ */ new Map(), a = [];
|
|
915
|
+
e.order.forEach((l) => {
|
|
916
|
+
const u = r.get(l);
|
|
917
|
+
u && s.set(l, u);
|
|
918
|
+
}), n.forEach((l, u) => {
|
|
919
|
+
!e.order.includes(l) && t[u] && a.push(t[u]);
|
|
920
|
+
}), i = [...Array.from(s.values()), ...a];
|
|
921
|
+
}
|
|
922
|
+
let o;
|
|
923
|
+
if (e.groups && Object.keys(e.groups).length > 0) {
|
|
924
|
+
o = {};
|
|
925
|
+
const s = /* @__PURE__ */ new Set();
|
|
926
|
+
Object.entries(e.groups).forEach(([l, u]) => {
|
|
927
|
+
o[l] = [], u.forEach((f) => {
|
|
928
|
+
const d = r.get(f);
|
|
929
|
+
d && (o[l].push(d), s.add(d));
|
|
930
|
+
});
|
|
931
|
+
});
|
|
932
|
+
const a = i.filter(
|
|
933
|
+
(l) => !s.has(l)
|
|
934
|
+
);
|
|
935
|
+
a.length > 0 && (o.Other = a);
|
|
936
|
+
}
|
|
937
|
+
return { orderedChildren: i, groupedChildren: o };
|
|
938
|
+
}
|
|
939
|
+
function ze(t, e, n, r = []) {
|
|
940
|
+
if (!t || !t.format) {
|
|
941
|
+
if (t?.order) {
|
|
942
|
+
const { orderedChildren: a } = C(
|
|
943
|
+
n,
|
|
944
|
+
t,
|
|
945
|
+
r
|
|
946
|
+
);
|
|
947
|
+
return y(c.class("bc-stack--gap-1"), ...a);
|
|
948
|
+
}
|
|
949
|
+
return y(c.class("bc-stack--gap-1"), ...n);
|
|
950
|
+
}
|
|
951
|
+
const i = e.widgetLabel || e.name, { orderedChildren: o, groupedChildren: s } = C(
|
|
952
|
+
n,
|
|
953
|
+
t,
|
|
954
|
+
r
|
|
955
|
+
);
|
|
956
|
+
switch (t.format) {
|
|
957
|
+
case "fieldset":
|
|
958
|
+
return pe({ title: i, children: o });
|
|
959
|
+
case "group":
|
|
960
|
+
return me({ title: i, children: o });
|
|
961
|
+
case "grid":
|
|
962
|
+
return ye({ cols: t.cols, children: o });
|
|
963
|
+
case "tabs":
|
|
964
|
+
return be({
|
|
965
|
+
groups: s || t.groups,
|
|
966
|
+
children: s ? Object.values(s).flat() : o
|
|
967
|
+
});
|
|
968
|
+
case "accordion":
|
|
969
|
+
return ve({
|
|
970
|
+
groups: s || t.groups,
|
|
971
|
+
children: s ? Object.values(s).flat() : o
|
|
972
|
+
});
|
|
973
|
+
default:
|
|
974
|
+
return y(c.class("bc-stack--gap-1"), ...o);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
function Ae(t, e, n) {
|
|
978
|
+
const i = t.definition.oneOf;
|
|
979
|
+
if (!Array.isArray(i) || i.length === 0)
|
|
980
|
+
return {
|
|
981
|
+
matchingBranch: -1,
|
|
982
|
+
validBranches: [],
|
|
983
|
+
isAmbiguous: !1,
|
|
984
|
+
hasNoMatch: !0
|
|
985
|
+
};
|
|
986
|
+
const o = i.map((f) => {
|
|
987
|
+
if (typeof f == "object" && f != null && "$ref" in f) {
|
|
988
|
+
const d = f.$ref;
|
|
989
|
+
if (typeof d == "string" && d.startsWith("#"))
|
|
990
|
+
return he(f, t.schema);
|
|
991
|
+
}
|
|
992
|
+
return f;
|
|
993
|
+
}), s = [];
|
|
994
|
+
for (let f = 0; f < o.length; f++) {
|
|
995
|
+
const d = o[f];
|
|
996
|
+
if (typeof d == "boolean") {
|
|
997
|
+
d === !0 && s.push(f);
|
|
998
|
+
continue;
|
|
999
|
+
}
|
|
1000
|
+
if (n)
|
|
1001
|
+
try {
|
|
1002
|
+
te(n, d)(e) && s.push(f);
|
|
1003
|
+
} catch (p) {
|
|
1004
|
+
console.warn(`Failed to compile oneOf branch ${f}:`, p), L(d, e) && s.push(f);
|
|
1005
|
+
}
|
|
1006
|
+
else
|
|
1007
|
+
L(d, e) && s.push(f);
|
|
1008
|
+
}
|
|
1009
|
+
const a = s.length > 1, l = s.length === 0;
|
|
1010
|
+
return {
|
|
1011
|
+
matchingBranch: s.length === 1 ? s[0] : -1,
|
|
1012
|
+
validBranches: s,
|
|
1013
|
+
isAmbiguous: a,
|
|
1014
|
+
hasNoMatch: l
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
function L(t, e) {
|
|
1018
|
+
if ("const" in t)
|
|
1019
|
+
return t.const === e;
|
|
1020
|
+
if (Array.isArray(t.enum))
|
|
1021
|
+
return t.enum.includes(e);
|
|
1022
|
+
if (t.type != null) {
|
|
1023
|
+
const n = Array.isArray(t.type) ? t.type : [t.type], r = Oe(e);
|
|
1024
|
+
if (r === "unknown" || !n.includes(r))
|
|
1025
|
+
return !1;
|
|
1026
|
+
}
|
|
1027
|
+
if (t.properties && typeof e == "object" && e != null) {
|
|
1028
|
+
const n = e;
|
|
1029
|
+
for (const [r, i] of Object.entries(t.properties))
|
|
1030
|
+
if (typeof i == "object" && i != null && "const" in i && n[r] !== i.const)
|
|
1031
|
+
return !1;
|
|
1032
|
+
}
|
|
1033
|
+
return !0;
|
|
1034
|
+
}
|
|
1035
|
+
function Oe(t) {
|
|
1036
|
+
return t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "object" : typeof t == "string" ? "string" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "number" : typeof t == "boolean" ? "boolean" : "unknown";
|
|
1037
|
+
}
|
|
1038
|
+
function Be(t, e, n = `Option ${e + 1}`) {
|
|
1039
|
+
if (typeof t == "boolean")
|
|
1040
|
+
return t ? "Any Value" : "No Value";
|
|
1041
|
+
if (t.title)
|
|
1042
|
+
return t.title;
|
|
1043
|
+
if (t.properties) {
|
|
1044
|
+
for (const [r, i] of Object.entries(t.properties))
|
|
1045
|
+
if (typeof i == "object" && i != null && "const" in i) {
|
|
1046
|
+
const o = i.const;
|
|
1047
|
+
if (typeof o == "string")
|
|
1048
|
+
return `${r}: ${o}`;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
return "const" in t && typeof t.const == "string" ? t.const : t.type ? (Array.isArray(t.type) ? t.type : [t.type]).join(" | ") : n;
|
|
1052
|
+
}
|
|
1053
|
+
function We(t, e, n) {
|
|
1054
|
+
const r = Ae(t, e, n);
|
|
1055
|
+
return r.matchingBranch !== -1 ? r.matchingBranch : -1;
|
|
1056
|
+
}
|
|
1057
|
+
export {
|
|
1058
|
+
T as S,
|
|
1059
|
+
ze as a,
|
|
1060
|
+
he as b,
|
|
1061
|
+
te as c,
|
|
1062
|
+
Ae as d,
|
|
1063
|
+
Be as e,
|
|
1064
|
+
We as f,
|
|
1065
|
+
De as g,
|
|
1066
|
+
Ve as h,
|
|
1067
|
+
Te as i,
|
|
1068
|
+
N as j,
|
|
1069
|
+
Z as k,
|
|
1070
|
+
Y as l,
|
|
1071
|
+
qe as m,
|
|
1072
|
+
xe as n,
|
|
1073
|
+
Me as o,
|
|
1074
|
+
Ee as p,
|
|
1075
|
+
M as q,
|
|
1076
|
+
Ie as r
|
|
1077
|
+
};
|