@septkit/ui 0.0.74 → 0.0.76
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/dialecte/composables/use-live-data.js +2 -1
- package/dist/dialecte/create-document-store.js +4 -4
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/dialecte-gIPrRzni.js +4415 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers-DVShv41E.js +179 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers.js +3 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/index.js +5 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/project-key-Ch34EtFa.js +1370 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/rolldown-runtime-CYdcPHCu.js +13 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/running-operations-vnijBvn7.js +61 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/same-json-value-C6kUaoyt.js +1543 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/utils-USNkj4sT.js +962 -0
- package/dist/external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/utils.js +2 -0
- package/dist/external/.pnpm/{@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/hooks-C05NpRNi.js → @dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js} +974 -242
- package/dist/external/.pnpm/{@dialecte_scl@0.8.1 → @dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10}/node_modules/@dialecte/scl/dist/v2019C1/index.js +4 -4
- package/dist/merge/check-files/identity-warning.js +1 -1
- package/dist/merge/confirm/outcome.js +4 -3
- package/dist/merge/match/match.js +6 -7
- package/dist/merge/session/merge.service.js +2 -2
- package/dist/merge/session/use-merge-session.js +2 -0
- package/dist/merge/wording.js +6 -7
- package/dist/xpath-input/xpath-input.vue_vue_type_script_setup_true_lang.js +6 -2
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/helpers.js +0 -229
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/index.js +0 -3
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/project-sK-5Xc-5.js +0 -7371
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils-CTBHUFs9.js +0 -440
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils.js +0 -2
package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils-CTBHUFs9.js
DELETED
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@dialecte+core@0.6.1/node_modules/@dialecte/core/dist/utils-CTBHUFs9.js
|
|
2
|
-
var e = {
|
|
3
|
-
UNKNOWN: {
|
|
4
|
-
code: "D0001",
|
|
5
|
-
message: "An unknown error occurred"
|
|
6
|
-
},
|
|
7
|
-
ASSERTION_FAILED: {
|
|
8
|
-
code: "D0002",
|
|
9
|
-
message: "Assertion failed"
|
|
10
|
-
},
|
|
11
|
-
STORE_CONNECTION_FAILED: {
|
|
12
|
-
code: "D1001",
|
|
13
|
-
message: "Failed to open database"
|
|
14
|
-
},
|
|
15
|
-
STORE_COMMIT_FAILED: {
|
|
16
|
-
code: "D1002",
|
|
17
|
-
message: "Failed to commit changes"
|
|
18
|
-
},
|
|
19
|
-
STORE_RECORD_NOT_FOUND: {
|
|
20
|
-
code: "D1003",
|
|
21
|
-
message: "Record not found in database"
|
|
22
|
-
},
|
|
23
|
-
STORE_BULK_ADD_FAILED: {
|
|
24
|
-
code: "D1004",
|
|
25
|
-
message: "Failed to add records to database"
|
|
26
|
-
},
|
|
27
|
-
STORE_BULK_UPDATE_FAILED: {
|
|
28
|
-
code: "D1005",
|
|
29
|
-
message: "Failed to update records in database"
|
|
30
|
-
},
|
|
31
|
-
STORE_DELETE_FAILED: {
|
|
32
|
-
code: "D1006",
|
|
33
|
-
message: "Failed to delete records from database"
|
|
34
|
-
},
|
|
35
|
-
STORE_NOT_WRITABLE: {
|
|
36
|
-
code: "D1007",
|
|
37
|
-
message: "Store is not writable"
|
|
38
|
-
},
|
|
39
|
-
STORE_BLOB_NOT_FOUND: {
|
|
40
|
-
code: "D1008",
|
|
41
|
-
message: "Blob not found"
|
|
42
|
-
},
|
|
43
|
-
ELEMENT_NOT_FOUND: {
|
|
44
|
-
code: "D2001",
|
|
45
|
-
message: "Element not found"
|
|
46
|
-
},
|
|
47
|
-
ROOT_NOT_FOUND: {
|
|
48
|
-
code: "D2002",
|
|
49
|
-
message: "Root element not found"
|
|
50
|
-
},
|
|
51
|
-
DUPLICATE_ID: {
|
|
52
|
-
code: "D2003",
|
|
53
|
-
message: "Duplicate element ID"
|
|
54
|
-
},
|
|
55
|
-
ELEMENT_TAGNAME_MISMATCH: {
|
|
56
|
-
code: "D2004",
|
|
57
|
-
message: "Element tagName does not match the expected type"
|
|
58
|
-
},
|
|
59
|
-
INVALID_PARENT_CHILD: {
|
|
60
|
-
code: "D3001",
|
|
61
|
-
message: "Invalid parent-child relationship"
|
|
62
|
-
},
|
|
63
|
-
INVALID_ATTRIBUTE: {
|
|
64
|
-
code: "D3002",
|
|
65
|
-
message: "Invalid attribute for element"
|
|
66
|
-
},
|
|
67
|
-
PROTECTED_ROOT: {
|
|
68
|
-
code: "D3003",
|
|
69
|
-
message: "Root element cannot be deleted"
|
|
70
|
-
},
|
|
71
|
-
REQUIRED_ATTRIBUTE_MISSING: {
|
|
72
|
-
code: "D3004",
|
|
73
|
-
message: "Required attribute is missing"
|
|
74
|
-
},
|
|
75
|
-
UNIQUE_CONSTRAINT_VIOLATION: {
|
|
76
|
-
code: "D3005",
|
|
77
|
-
message: "Value is already used within its scope"
|
|
78
|
-
},
|
|
79
|
-
UNKNOWN_NAMESPACE_PREFIX: {
|
|
80
|
-
code: "D3006",
|
|
81
|
-
message: "Unknown namespace prefix on attribute — pass it explicitly as { name, namespace: { prefix, uri } }"
|
|
82
|
-
},
|
|
83
|
-
PREFIXED_ATTRIBUTE_NAME: {
|
|
84
|
-
code: "D3007",
|
|
85
|
-
message: "Authored attribute name must be a local name — pass the namespace separately as { name, namespace }, not a prefixed name"
|
|
86
|
-
},
|
|
87
|
-
FIXED_VALUE_VIOLATION: {
|
|
88
|
-
code: "D3008",
|
|
89
|
-
message: "Attribute value differs from the schema-fixed value"
|
|
90
|
-
},
|
|
91
|
-
XSI_TYPE_REQUIRED: {
|
|
92
|
-
code: "D3009",
|
|
93
|
-
message: "The element is declared with an abstract type: name a type with xsi:type"
|
|
94
|
-
},
|
|
95
|
-
XSI_TYPE_NOT_ADMITTED: {
|
|
96
|
-
code: "D3010",
|
|
97
|
-
message: "The element may not take the type named with xsi:type"
|
|
98
|
-
},
|
|
99
|
-
XSI_TYPE_CHANGE_LEAVES_CONTENT: {
|
|
100
|
-
code: "D3011",
|
|
101
|
-
message: "The new xsi:type does not admit content the element still holds"
|
|
102
|
-
},
|
|
103
|
-
ALREADY_COMMITTED: {
|
|
104
|
-
code: "D4001",
|
|
105
|
-
message: "Transaction already committed"
|
|
106
|
-
},
|
|
107
|
-
ALREADY_FAILED: {
|
|
108
|
-
code: "D4002",
|
|
109
|
-
message: "Transaction already failed"
|
|
110
|
-
},
|
|
111
|
-
DATABASE_COMMIT_ERROR: {
|
|
112
|
-
code: "D4003",
|
|
113
|
-
message: "An error occurred while committing changes to the database"
|
|
114
|
-
},
|
|
115
|
-
CONCURRENT_TRANSACTION: {
|
|
116
|
-
code: "D4004",
|
|
117
|
-
message: "A transaction is already in progress. Concurrent transactions are not supported yet — serialize them or implement a transaction queue."
|
|
118
|
-
},
|
|
119
|
-
EXPORT_ROOT_NOT_FOUND: {
|
|
120
|
-
code: "D5001",
|
|
121
|
-
message: "Root element not found in records during export"
|
|
122
|
-
},
|
|
123
|
-
EXPORT_ORPHAN_CHILD_REF: {
|
|
124
|
-
code: "D5002",
|
|
125
|
-
message: "Parent references non-existent child record"
|
|
126
|
-
},
|
|
127
|
-
PARSE_ERROR: {
|
|
128
|
-
code: "D5003",
|
|
129
|
-
message: "Failed to parse XML"
|
|
130
|
-
},
|
|
131
|
-
EXTENSION_METHOD_COLLISION: {
|
|
132
|
-
code: "D6001",
|
|
133
|
-
message: "Extension method name collision detected"
|
|
134
|
-
},
|
|
135
|
-
UNKNOWN_CONFIG_KEY: {
|
|
136
|
-
code: "D7001",
|
|
137
|
-
message: "Unknown config key"
|
|
138
|
-
},
|
|
139
|
-
DOCUMENT_NOT_REGISTERED: {
|
|
140
|
-
code: "D7002",
|
|
141
|
-
message: "Document not registered in project"
|
|
142
|
-
},
|
|
143
|
-
PROJECT_NOT_OPENED: {
|
|
144
|
-
code: "D7003",
|
|
145
|
-
message: "Project not opened"
|
|
146
|
-
},
|
|
147
|
-
BLOB_NOT_FOUND: {
|
|
148
|
-
code: "D7004",
|
|
149
|
-
message: "Blob not found in store"
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
function t(e, t) {
|
|
153
|
-
throw n(e, t);
|
|
154
|
-
}
|
|
155
|
-
function n(t, n) {
|
|
156
|
-
let r = typeof t == "string" ? {
|
|
157
|
-
key: t,
|
|
158
|
-
...e[t]
|
|
159
|
-
} : t, i = {
|
|
160
|
-
code: r.code,
|
|
161
|
-
key: r.key,
|
|
162
|
-
message: n.message ?? r.message,
|
|
163
|
-
detail: n.detail,
|
|
164
|
-
method: c((/* @__PURE__ */ Error()).stack),
|
|
165
|
-
ref: n.ref,
|
|
166
|
-
meta: n.meta,
|
|
167
|
-
cause: n.cause
|
|
168
|
-
}, a = Error(n.detail);
|
|
169
|
-
return a.cause = i, a;
|
|
170
|
-
}
|
|
171
|
-
function r(n) {
|
|
172
|
-
let r = {}, a = /* @__PURE__ */ new Map();
|
|
173
|
-
for (let [o, s] of Object.entries(n)) {
|
|
174
|
-
Object.hasOwn(e, o) && t("ASSERTION_FAILED", { detail: `defineErrors: "${o}" is a key of the core catalogue` }), i.has(s.code) && t("ASSERTION_FAILED", { detail: `defineErrors: "${o}" uses "${s.code}", a code of the core catalogue` });
|
|
175
|
-
let n = a.get(s.code);
|
|
176
|
-
n && t("ASSERTION_FAILED", { detail: `defineErrors: "${o}" uses "${s.code}", the code of "${n}"` }), a.set(s.code, o), r[o] = {
|
|
177
|
-
key: o,
|
|
178
|
-
...s
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
return r;
|
|
182
|
-
}
|
|
183
|
-
var i = new Set(Object.values(e).map((e) => e.code));
|
|
184
|
-
function a(e) {
|
|
185
|
-
if (!(e instanceof Error)) return;
|
|
186
|
-
let t = e.cause;
|
|
187
|
-
if (!(!t || t instanceof Error) && !(typeof t.key != "string" || typeof t.code != "string")) return t;
|
|
188
|
-
}
|
|
189
|
-
function o(t, n) {
|
|
190
|
-
return Object.hasOwn(e, t.key) ? !0 : n.catalogues.some((e) => Object.hasOwn(e, t.key) && e[t.key]?.code === t.code);
|
|
191
|
-
}
|
|
192
|
-
var s = /* @__PURE__ */ new Set([
|
|
193
|
-
"throwDialecteError",
|
|
194
|
-
"createDialecteError",
|
|
195
|
-
"invariant",
|
|
196
|
-
"reportFailure"
|
|
197
|
-
]);
|
|
198
|
-
function c(e) {
|
|
199
|
-
if (!e) return "unknown";
|
|
200
|
-
let t = e.split("\n").slice(1).map((e) => e.match(/\bat\s+(?:async\s+)?(\S+)(?:\s+\[as\s+[^\]]+\])?\s+\(([^)]+)\)/)).find((e) => !l(e?.[1])), n = t?.[1]?.replace(/^Object\./, ""), r = t?.[2];
|
|
201
|
-
if (!r || !n) return n ?? "unknown";
|
|
202
|
-
let i = r.match(/(\w[\w-]*\/src\/[^?:]+)/);
|
|
203
|
-
return i ? `${i[1].replace(/\.[^/.]+$/, "")}::${n}` : n;
|
|
204
|
-
}
|
|
205
|
-
function l(e) {
|
|
206
|
-
return e ? s.has(e.slice(e.lastIndexOf(".") + 1)) : !1;
|
|
207
|
-
}
|
|
208
|
-
var u = "db-id", d = {
|
|
209
|
-
uri: "http://dialecte.dev/XML/DEV",
|
|
210
|
-
prefix: "dev"
|
|
211
|
-
};
|
|
212
|
-
`${d.prefix}${u}`;
|
|
213
|
-
var f = {
|
|
214
|
-
uri: "http://www.w3.org/2001/XMLSchema-instance",
|
|
215
|
-
prefix: "xsi"
|
|
216
|
-
}, p = "http://www.w3.org/2000/xmlns/";
|
|
217
|
-
`${f.prefix}${f.uri}`;
|
|
218
|
-
function m(e) {
|
|
219
|
-
return e.namespace?.uri === f.uri && e.name.split(":").at(-1) === "type";
|
|
220
|
-
}
|
|
221
|
-
function h(e) {
|
|
222
|
-
let { namespaceOf: t } = e, n = e.value.trim();
|
|
223
|
-
if (n.startsWith("{")) {
|
|
224
|
-
let e = n.indexOf("}");
|
|
225
|
-
return e === -1 ? void 0 : b({
|
|
226
|
-
uri: n.slice(1, e),
|
|
227
|
-
local: n.slice(e + 1)
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
let r = n.indexOf(":"), i = r === -1 ? "" : n.slice(0, r), a = r === -1 ? n : n.slice(r + 1), o = i ? t(i) : t("") ?? "";
|
|
231
|
-
if (o !== void 0) return b({
|
|
232
|
-
uri: o,
|
|
233
|
-
local: a
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
function g(e) {
|
|
237
|
-
let { dialecteConfig: t, record: n } = e, r = n.attributes.find(m);
|
|
238
|
-
if (r === void 0 || typeof r.value != "string") return;
|
|
239
|
-
let i = _({
|
|
240
|
-
dialecteConfig: t,
|
|
241
|
-
attributes: n.attributes
|
|
242
|
-
});
|
|
243
|
-
return h({
|
|
244
|
-
value: r.value,
|
|
245
|
-
namespaceOf: i
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function _(e) {
|
|
249
|
-
let { dialecteConfig: t, attributes: n } = e, r = Object.values(t.namespaces);
|
|
250
|
-
return function(e) {
|
|
251
|
-
if (!e) return t.namespaces.default.uri;
|
|
252
|
-
let i = r.find((t) => t.prefix === e);
|
|
253
|
-
if (i) return i.uri;
|
|
254
|
-
let a = n.find((t) => t.name === `xmlns:${e}` || t.namespace?.uri === "http://www.w3.org/2000/xmlns/" && t.name === e);
|
|
255
|
-
return typeof a?.value == "string" ? a.value : void 0;
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
function v(e) {
|
|
259
|
-
let { dialecteConfig: t, value: n, namespaceOf: r } = e, i = h({
|
|
260
|
-
value: n,
|
|
261
|
-
namespaceOf: r
|
|
262
|
-
});
|
|
263
|
-
if (i === void 0) return n;
|
|
264
|
-
if (i.namespace === t.namespaces.default.uri) return i.local;
|
|
265
|
-
let a = Object.values(t.namespaces).find((e) => e.uri === i.namespace && e.prefix !== "");
|
|
266
|
-
return a ? `${a.prefix}:${i.local}` : n;
|
|
267
|
-
}
|
|
268
|
-
function y(e) {
|
|
269
|
-
let { dialecteConfig: t, attributes: n, namespaceOf: r } = e;
|
|
270
|
-
return n.map((e) => m(e) && typeof e.value == "string" ? {
|
|
271
|
-
...e,
|
|
272
|
-
value: v({
|
|
273
|
-
dialecteConfig: t,
|
|
274
|
-
value: e.value,
|
|
275
|
-
namespaceOf: r
|
|
276
|
-
})
|
|
277
|
-
} : e);
|
|
278
|
-
}
|
|
279
|
-
function b(e) {
|
|
280
|
-
let { uri: t, local: n } = e;
|
|
281
|
-
return {
|
|
282
|
-
clark: t ? `{${t}}${n}` : n,
|
|
283
|
-
namespace: t,
|
|
284
|
-
local: n
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
function x(e) {
|
|
288
|
-
let { dialecteConfig: t, record: n, parentDefinition: r } = e, i = t.definition[n.tagName];
|
|
289
|
-
if (i === void 0) return;
|
|
290
|
-
let a = C({
|
|
291
|
-
dialecteConfig: t,
|
|
292
|
-
record: n,
|
|
293
|
-
tagLevel: i,
|
|
294
|
-
parentDefinition: r
|
|
295
|
-
}), o = w({
|
|
296
|
-
dialecteConfig: t,
|
|
297
|
-
record: n
|
|
298
|
-
}), s = a === i ? Object.values(i.declarations ?? {}).concat(i) : [a], c = o !== void 0 && s.some((e) => e.variants?.includes(o)) ? t.types[o] : void 0;
|
|
299
|
-
return a === i && c === void 0 && i.declarations === void 0 ? i : T({
|
|
300
|
-
tagLevel: i,
|
|
301
|
-
declaration: a,
|
|
302
|
-
type: c
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
function S(e) {
|
|
306
|
-
let { dialecteConfig: t, record: n, parentDefinition: r } = e, i = t.definition[n.tagName];
|
|
307
|
-
if (i === void 0) return [];
|
|
308
|
-
let a = C({
|
|
309
|
-
dialecteConfig: t,
|
|
310
|
-
record: n,
|
|
311
|
-
tagLevel: i,
|
|
312
|
-
parentDefinition: r
|
|
313
|
-
}), o = (a === i ? [i, ...Object.values(i.declarations ?? {})] : [a]).flatMap((e) => [...e.type === void 0 || e.abstractType ? [] : [e.type], ...e.variants ?? []]);
|
|
314
|
-
return [...new Set(o)];
|
|
315
|
-
}
|
|
316
|
-
function C(e) {
|
|
317
|
-
let { dialecteConfig: t, record: n, tagLevel: r, parentDefinition: i } = e, a = r.declarations;
|
|
318
|
-
if (a === void 0) return r;
|
|
319
|
-
let o = i ?? (n.parent ? t.definition[n.parent.tagName] : void 0), s = o?.children.details[n.tagName]?.declarations;
|
|
320
|
-
if (s !== void 0) {
|
|
321
|
-
let e = Object.keys(s), t = n.namespace?.uri ?? (e.length === 1 ? e[0] : void 0), i = t === void 0 ? void 0 : s[t];
|
|
322
|
-
if (i !== void 0) return i.length === 1 ? a[i[0]] ?? r : r;
|
|
323
|
-
}
|
|
324
|
-
let c = o === void 0 || o.children.any === !0, l = n.namespace?.uri;
|
|
325
|
-
return !c || l === void 0 ? r : Object.values(a).find((e) => e.global && e.namespace.uri === l) ?? r;
|
|
326
|
-
}
|
|
327
|
-
function w(e) {
|
|
328
|
-
return g(e)?.clark;
|
|
329
|
-
}
|
|
330
|
-
function T(e) {
|
|
331
|
-
let { tagLevel: t, declaration: n, type: r } = e, i = E.get(n) ?? /* @__PURE__ */ new Map();
|
|
332
|
-
E.set(n, i);
|
|
333
|
-
let a = i.get(r);
|
|
334
|
-
if (a?.tag === t.tag && a.parents === t.parents) return a;
|
|
335
|
-
let { declarations: o, abstractType: s, ...c } = n, l = {
|
|
336
|
-
...c,
|
|
337
|
-
tag: t.tag,
|
|
338
|
-
parents: t.parents
|
|
339
|
-
}, u = r === void 0 ? {
|
|
340
|
-
...l,
|
|
341
|
-
...n.abstractType ? { abstractType: !0 } : {}
|
|
342
|
-
} : {
|
|
343
|
-
...l,
|
|
344
|
-
attributes: n.attributes.identityFields === void 0 ? r.attributes : {
|
|
345
|
-
...r.attributes,
|
|
346
|
-
identityFields: n.attributes.identityFields
|
|
347
|
-
},
|
|
348
|
-
children: r.children,
|
|
349
|
-
contentModel: r.contentModel,
|
|
350
|
-
textContent: r.textContent
|
|
351
|
-
};
|
|
352
|
-
return u.contentModel === void 0 && delete u.contentModel, u.textContent === void 0 && delete u.textContent, i.set(r, u), u;
|
|
353
|
-
}
|
|
354
|
-
var E = /* @__PURE__ */ new WeakMap();
|
|
355
|
-
function D(e) {
|
|
356
|
-
let { dialecteConfig: t, record: n, attributeName: r } = e, i = t.elements.includes(n.tagName), a = i ? x({
|
|
357
|
-
dialecteConfig: t,
|
|
358
|
-
record: n
|
|
359
|
-
}) : void 0, o = a?.attributes.details[r];
|
|
360
|
-
return {
|
|
361
|
-
isKnownElement: i,
|
|
362
|
-
isDefined: !!o,
|
|
363
|
-
isRequired: !!o?.required,
|
|
364
|
-
isIdentityField: a?.attributes.identityFields?.includes(r) ?? !1,
|
|
365
|
-
fixed: o?.fixed,
|
|
366
|
-
default: o?.default,
|
|
367
|
-
namespace: o?.namespace || void 0
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
function O(e) {
|
|
371
|
-
let { dialecteConfig: t, record: n, attributeName: r, defaults: i } = e;
|
|
372
|
-
if (i === "none") return;
|
|
373
|
-
let a = D({
|
|
374
|
-
dialecteConfig: t,
|
|
375
|
-
record: n,
|
|
376
|
-
attributeName: r
|
|
377
|
-
});
|
|
378
|
-
if (i === "required") return a.isRequired || a.fixed !== void 0 ? a.fixed ?? a.default ?? "" : void 0;
|
|
379
|
-
if (a.fixed !== void 0) return a.fixed;
|
|
380
|
-
if (a.default) return a.default;
|
|
381
|
-
}
|
|
382
|
-
function k(e) {
|
|
383
|
-
let t = e.lastIndexOf(":");
|
|
384
|
-
return t === -1 ? e : e.slice(t + 1);
|
|
385
|
-
}
|
|
386
|
-
function A(e) {
|
|
387
|
-
return e === void 0 ? [] : e.facets?.enumeration === void 0 ? "union" in e ? [...new Set(e.union.flatMap(A))] : [] : e.facets.enumeration;
|
|
388
|
-
}
|
|
389
|
-
function j(e) {
|
|
390
|
-
return (e?.facets?.pattern ?? []).map((e) => RegExp(`^(?:${e.map((e) => `(?:${e})`).join("|")})$`, "u"));
|
|
391
|
-
}
|
|
392
|
-
function M(e, n) {
|
|
393
|
-
if (e) return;
|
|
394
|
-
let { detail: r, key: i = "ASSERTION_FAILED", ref: a, meta: o } = n;
|
|
395
|
-
t(i, {
|
|
396
|
-
detail: r,
|
|
397
|
-
ref: a,
|
|
398
|
-
meta: o
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
function N(e, t) {
|
|
402
|
-
if (t) return Object.values(e.namespaces).find((e) => e.prefix === t);
|
|
403
|
-
}
|
|
404
|
-
function P(e, t) {
|
|
405
|
-
return e.namespaces[t] ?? N(e, t);
|
|
406
|
-
}
|
|
407
|
-
function F(e, t) {
|
|
408
|
-
return e.namespaces[t]?.prefix ?? t;
|
|
409
|
-
}
|
|
410
|
-
function I(e, t) {
|
|
411
|
-
let n = e.namespace?.uri ?? "", r = t.namespace?.uri ?? "";
|
|
412
|
-
return n === r ? e.name === t.name ? 0 : e.name < t.name ? -1 : 1 : n < r ? -1 : 1;
|
|
413
|
-
}
|
|
414
|
-
function L(e, t) {
|
|
415
|
-
let n = t.flatMap((t) => e.filter((e) => e.name === t)), r = e.filter((e) => !t.includes(e.name)).sort(I);
|
|
416
|
-
return [...n, ...r];
|
|
417
|
-
}
|
|
418
|
-
function R(e) {
|
|
419
|
-
let { wildcard: t, namespaceUri: n } = e;
|
|
420
|
-
return t === void 0 ? !1 : t.namespace === void 0 ? !(t.notNamespace ?? []).includes(n) : t.namespace.includes(n);
|
|
421
|
-
}
|
|
422
|
-
function z(e) {
|
|
423
|
-
let { parentTagName: t, children: n, childrenConfig: r } = e, i = r[t];
|
|
424
|
-
if (!i || i.length === 0) return n;
|
|
425
|
-
let a = new Set(i), o = /* @__PURE__ */ new Map();
|
|
426
|
-
for (let e of a) o.set(e, []);
|
|
427
|
-
let s = [];
|
|
428
|
-
for (let e of n) {
|
|
429
|
-
let t = o.get(e.tagName);
|
|
430
|
-
t ? t.push(e) : s.push(e);
|
|
431
|
-
}
|
|
432
|
-
let c = [];
|
|
433
|
-
for (let e of a) {
|
|
434
|
-
let t = o.get(e);
|
|
435
|
-
t && t.length && c.push(...t);
|
|
436
|
-
}
|
|
437
|
-
return c.push(...s), c;
|
|
438
|
-
}
|
|
439
|
-
//#endregion
|
|
440
|
-
export { p as A, _ as C, u as D, r as F, o as I, t as L, f as N, d as O, n as P, a as R, g as S, h as T, O as _, L as a, v as b, F as c, A as f, D as h, R as i, M as l, k as m, z as n, N as o, j as p, I as r, P as s, S as v, y as w, m as x, x as y, e as z };
|